Skip to content

Commit be1aab4

Browse files
committed
feat: updated Slider for MDC v10
1 parent 81091eb commit be1aab4

File tree

12 files changed

+660
-317
lines changed

12 files changed

+660
-317
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Update Progress Checklist:
224224
- [ ] Select Menus
225225
- [ ] Select Helper Text
226226
- [ ] Select Icon
227-
- [ ] Sliders
227+
- [x] Sliders
228228
- [ ] Switches
229229
- [ ] Text Field
230230
- [ ] Text Field Character Counter

packages/checkbox/Checkbox.svelte

-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@
116116
let context = getContext('SMUI:checkbox:context');
117117
let dataTableHeader = getContext('SMUI:data-table:row:header');
118118
let getDataTableRowIndex = getContext('SMUI:data-table:row:getIndex');
119-
let instantiate = getContext('SMUI:checkbox:instantiate');
120-
let getInstance = getContext('SMUI:checkbox:getInstance');
121119
122120
$: if (setChecked) {
123121
setChecked(nativeChecked);

packages/paper/Paper.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
? 'smui-paper--elevation-z' + elevation
77
: ''} {!square ? 'smui-paper--rounded' : ''} {color !== 'default'
88
? 'smui-paper--color-' + color
9-
: ''} {transition ? 'mdc-elevation-transition' : ''}"
9+
: ''} {transition ? 'smui-paper-transition' : ''}"
1010
{...exclude($$props, ['use', 'class', 'square', 'color', 'transition'])}
1111
>
1212
<slot />

packages/paper/_mixins.scss

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $paper-padding: 24px 16px !default;
88

99
@mixin core-styles($query: feature-targeting.all()) {
1010
$feat-color: feature-targeting.create-target($query, color);
11+
$feat-animation: feature-targeting.create-target($query, animation);
1112
$feat-structure: feature-targeting.create-target($query, structure);
1213

1314
.smui-paper {
@@ -21,6 +22,16 @@ $paper-padding: 24px 16px !default;
2122
@include shape-radius(medium, $query: $query);
2223
}
2324

25+
&.smui-paper-transition {
26+
@include feature-targeting.targets($feat-animation) {
27+
transition: elevation.transition-value();
28+
}
29+
30+
@include feature-targeting.targets($feat-structure) {
31+
will-change: elevation.$property;
32+
}
33+
}
34+
2435
.smui-paper__title {
2536
@include typography.typography(headline5, $query);
2637
margin-top: 0;

0 commit comments

Comments
 (0)