material 3.7.1 → 3.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/slider/features/controller.js +24 -8
- package/dist/elements/css/bottom-app-bar.css +1 -1
- package/dist/elements/css/bottom-app-bar.js +1 -1
- package/dist/elements/css/card.css +1 -1
- package/dist/elements/css/card.js +1 -1
- package/dist/elements/css/checkbox.css +1 -1
- package/dist/elements/css/checkbox.js +1 -1
- package/dist/elements/css/datepicker.css +1 -1
- package/dist/elements/css/datepicker.js +1 -1
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/dialog.js +1 -1
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +1 -1
- package/dist/elements/css/radios.css +1 -1
- package/dist/elements/css/radios.js +1 -1
- package/dist/elements/css/select.css +1 -1
- package/dist/elements/css/select.js +1 -1
- package/dist/elements/css/slider.css +1 -1
- package/dist/elements/css/slider.js +1 -1
- package/dist/elements/css/tabs.css +1 -1
- package/dist/elements/css/tabs.js +1 -1
- package/dist/elements/css/text-field.css +1 -1
- package/dist/elements/css/text-field.js +1 -1
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/timepicker.js +1 -1
- package/dist/elements/css/top-app-bar.css +1 -1
- package/dist/elements/css/top-app-bar.js +1 -1
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +2 -2
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +2 -2
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +2 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +2 -2
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +2 -2
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +2 -2
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/package.json +2 -1
- package/src/styles/abstract/_base.scss +0 -1
- package/src/styles/abstract/_direction.scss +121 -152
- package/src/styles/abstract/_emit.scss +7 -16
- package/src/styles/abstract/_floating-placement.scss +9 -10
- package/src/styles/abstract/_functions.scss +64 -79
- package/src/styles/abstract/_mixins.scss +355 -459
- package/src/styles/abstract/_theme.scss +122 -136
- package/src/styles/abstract/_variables.scss +320 -390
- package/src/styles/abstract/chips/_assist.scss +2 -3
- package/src/styles/abstract/chips/_filter.scss +2 -3
- package/src/styles/abstract/chips/_input.scss +2 -3
- package/src/styles/abstract/chips/_suggestion.scss +2 -3
- package/src/styles/base/_body-theme.scss +10 -15
- package/src/styles/base/_document.scss +10 -33
- package/src/styles/base/_reset.scss +20 -40
- package/src/styles/base/_tokens.scss +6 -21
- package/src/styles/base/_typescale-tokens.scss +12 -16
- package/src/styles/base/_typography.scss +28 -37
- package/src/styles/components/_badge.scss +171 -193
- package/src/styles/components/_bottom-app-bar.scss +72 -88
- package/src/styles/components/_bottom-sheet.scss +188 -232
- package/src/styles/components/_button-group.scss +140 -189
- package/src/styles/components/_button.scss +382 -478
- package/src/styles/components/_card.scss +349 -473
- package/src/styles/components/_carousel.scss +134 -156
- package/src/styles/components/_checkbox.scss +208 -247
- package/src/styles/components/_chips.scss +239 -304
- package/src/styles/components/_datepicker.scss +172 -220
- package/src/styles/components/_dialog.scss +428 -553
- package/src/styles/components/_divider.scss +37 -46
- package/src/styles/components/_drawer.scss +571 -678
- package/src/styles/components/_extended-fab.scss +263 -294
- package/src/styles/components/_fab-menu.scss +225 -267
- package/src/styles/components/_fab.scss +197 -218
- package/src/styles/components/_icon-button.scss +483 -588
- package/src/styles/components/_list.scss +115 -144
- package/src/styles/components/_loading-indicator.scss +23 -29
- package/src/styles/components/_menu.scss +543 -699
- package/src/styles/components/_navigation-bar.scss +189 -234
- package/src/styles/components/_navigation-rail.scss +256 -312
- package/src/styles/components/_progress.scss +60 -85
- package/src/styles/components/_radios.scss +170 -205
- package/src/styles/components/_search.scss +369 -455
- package/src/styles/components/_select.scss +78 -185
- package/src/styles/components/_side-sheet.scss +234 -292
- package/src/styles/components/_slider.scss +289 -367
- package/src/styles/components/_snackbar.scss +149 -198
- package/src/styles/components/_split-button.scss +139 -228
- package/src/styles/components/_switch.scss +282 -349
- package/src/styles/components/_tabs.scss +350 -547
- package/src/styles/components/_text-field.scss +788 -978
- package/src/styles/components/_timepicker.scss +435 -506
- package/src/styles/components/_toolbar.scss +178 -242
- package/src/styles/components/_tooltip.scss +152 -197
- package/src/styles/components/_top-app-bar.scss +206 -224
- package/src/styles/elements/_badge.scss +42 -61
- package/src/styles/elements/_bottom-app-bar.scss +14 -20
- package/src/styles/elements/_bottom-sheet.scss +0 -3
- package/src/styles/elements/_button-group.scss +80 -80
- package/src/styles/elements/_button.scss +72 -88
- package/src/styles/elements/_card.scss +48 -57
- package/src/styles/elements/_carousel.scss +2 -5
- package/src/styles/elements/_checkbox.scss +32 -43
- package/src/styles/elements/_chips.scss +18 -22
- package/src/styles/elements/_config.scss +11 -26
- package/src/styles/elements/_datepicker.scss +17 -22
- package/src/styles/elements/_dialog.scss +0 -3
- package/src/styles/elements/_divider.scss +11 -13
- package/src/styles/elements/_drawer.scss +9 -14
- package/src/styles/elements/_extended-fab.scss +36 -40
- package/src/styles/elements/_fab-menu.scss +21 -25
- package/src/styles/elements/_fab.scss +17 -20
- package/src/styles/elements/_field.scss +93 -114
- package/src/styles/elements/_icon-button.scss +34 -38
- package/src/styles/elements/_index.scss +0 -4
- package/src/styles/elements/_list.scss +19 -26
- package/src/styles/elements/_loading-indicator.scss +6 -9
- package/src/styles/elements/_menu.scss +0 -3
- package/src/styles/elements/_navigation-bar.scss +5 -9
- package/src/styles/elements/_navigation-rail.scss +10 -15
- package/src/styles/elements/_progress.scss +15 -18
- package/src/styles/elements/_radios.scss +24 -49
- package/src/styles/elements/_search.scss +19 -24
- package/src/styles/elements/_select.scss +4 -9
- package/src/styles/elements/_side-sheet.scss +0 -3
- package/src/styles/elements/_slider.scss +15 -35
- package/src/styles/elements/_snackbar.scss +0 -3
- package/src/styles/elements/_split-button.scss +33 -39
- package/src/styles/elements/_switch.scss +50 -90
- package/src/styles/elements/_tabs.scss +9 -13
- package/src/styles/elements/_text-field.scss +150 -178
- package/src/styles/elements/_timepicker.scss +0 -3
- package/src/styles/elements/_toolbar.scss +30 -35
- package/src/styles/elements/_tooltip.scss +0 -3
- package/src/styles/elements/_top-app-bar.scss +38 -45
- package/src/styles/main.scss +0 -15
- package/src/styles/themes/_autumn.scss +240 -258
- package/src/styles/themes/_base-theme.scss +96 -128
- package/src/styles/themes/_baseline.scss +273 -314
- package/src/styles/themes/_brownbeige.scss +242 -250
- package/src/styles/themes/_content.scss +240 -248
- package/src/styles/themes/_desert.scss +242 -250
- package/src/styles/themes/_expressive.scss +242 -250
- package/src/styles/themes/_fidelity.scss +240 -248
- package/src/styles/themes/_forest.scss +242 -259
- package/src/styles/themes/_fruit-salad.scss +242 -250
- package/src/styles/themes/_highcontrast.scss +164 -172
- package/src/styles/themes/_index.scss +0 -1
- package/src/styles/themes/_monochrome.scss +226 -234
- package/src/styles/themes/_neutral.scss +242 -250
- package/src/styles/themes/_ocean.scss +242 -259
- package/src/styles/themes/_rainbow.scss +242 -250
- package/src/styles/themes/_sageivory.scss +242 -250
- package/src/styles/themes/_spring.scss +238 -255
- package/src/styles/themes/_summer.scss +242 -250
- package/src/styles/themes/_sunset.scss +242 -259
- package/src/styles/themes/_tealcaramel.scss +242 -250
- package/src/styles/themes/_vibrant.scss +242 -250
- package/src/styles/utilities/_colors.scss +44 -50
- package/src/styles/utilities/_flexbox.scss +48 -59
- package/src/styles/utilities/_layout.scss +516 -591
- package/src/styles/utilities/_ripple.scss +61 -70
- package/src/styles/utilities/_spacing.scss +120 -127
- package/src/styles/utilities/_typography.scss +45 -58
- package/src/styles/utilities/_visibility.scss +61 -76
- package/dist/package.json +0 -488
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
// src/components/slider/_styles.scss
|
|
2
1
|
@use '../../styles/abstract/base' as base;
|
|
3
2
|
@use '../../styles/abstract/variables' as v;
|
|
4
3
|
@use '../../styles/abstract/functions' as f;
|
|
5
4
|
@use '../../styles/abstract/mixins' as m;
|
|
6
5
|
@use '../../styles/abstract/theme' as t;
|
|
7
6
|
|
|
8
|
-
// Motion. A value change that does not follow a pointer -- a tap on the
|
|
9
|
-
// track, a key, setValue() -- carries the handle, the value indicator and the track
|
|
10
|
-
// to the new value on the default spatial spring, as the m3.material.io sliders
|
|
11
|
-
// video shows: a tap slides the handle over, peaking about 300ms in with a 3-5%
|
|
12
|
-
// overshoot and settled by 450ms. The default spatial spring peaks at about 270ms
|
|
13
|
-
// with 1.5% and settles in 450ms; the fast one (140ms, 9%) was visibly too strong. The controller sets
|
|
14
|
-
// `--settling` for those changes alone, so a drag follows the pointer and a layout
|
|
15
|
-
// render (the first one, a resize) never moves anything.
|
|
16
|
-
//
|
|
17
|
-
// The value indicator grows out of the handle and shrinks back into it: in on
|
|
18
|
-
// motionDurationMedium4 emphasized decelerate, out on motionDurationShort3
|
|
19
|
-
// emphasized accelerate (material-components-android BaseSlider label animator).
|
|
20
7
|
$bubble-in: v.motion('duration-medium4') v.motion('easing-emphasized-decelerate');
|
|
21
8
|
$bubble-out: v.motion('duration-short3') v.motion('easing-emphasized-accelerate');
|
|
22
9
|
$bubble-transition: scale $bubble-out, opacity $bubble-out, visibility 0s linear v.motion('duration-short3');
|
|
@@ -25,358 +12,293 @@ $bubble-transition-visible: scale $bubble-in, opacity $bubble-in, visibility 0s;
|
|
|
25
12
|
$component: '#{base.$prefix}-slider';
|
|
26
13
|
|
|
27
14
|
.#{$component} {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
&--settling {
|
|
318
|
-
.#{$component}__handle, .#{$component}__inset-icon { transition: $settle-position; }
|
|
319
|
-
.#{$component}__segment { transition: $settle-position, $settle-length; }
|
|
320
|
-
.#{$component}__value { transition: $settle-position, $bubble-transition; }
|
|
321
|
-
.#{$component}__value--visible { transition: $settle-position, $bubble-transition-visible; }
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// Vertical: the same parts turned a quarter. withTracks and the
|
|
325
|
-
// controller write positions along the axis -- to bottom, or to top with
|
|
326
|
-
// topToBottom -- and thicknesses across it; the length is the slider's height.
|
|
327
|
-
&--vertical {
|
|
328
|
-
width: auto;
|
|
329
|
-
height: 100%;
|
|
330
|
-
align-items: center;
|
|
331
|
-
|
|
332
|
-
.#{$component}__container { height: 100%; min-height: 120px; }
|
|
333
|
-
.#{$component}__track { top: 0; left: 50%; width: auto; height: 100%; transform: translateX(-50%); }
|
|
334
|
-
.#{$component}__segment { width: 100%; }
|
|
335
|
-
.#{$component}__ticks { background-repeat: repeat-y; }
|
|
336
|
-
.#{$component}__dot { top: auto; left: calc(50% - 2px); }
|
|
337
|
-
.#{$component}__inset-icon { top: auto; left: 50%; transform: translateX(-50%); }
|
|
338
|
-
.#{$component}__handle {
|
|
339
|
-
top: auto;
|
|
340
|
-
left: 50%;
|
|
341
|
-
height: 14px;
|
|
342
|
-
&::before { width: 100%; height: 4px; }
|
|
343
|
-
}
|
|
344
|
-
&.#{$component}--dragging .#{$component}__handle::before,
|
|
345
|
-
.#{$component}__handle:active::before,
|
|
346
|
-
.#{$component}__handle:focus-visible::before,
|
|
347
|
-
.#{$component}__handle--focused::before {
|
|
348
|
-
width: 100%;
|
|
349
|
-
height: 2px;
|
|
350
|
-
}
|
|
351
|
-
// The value indicator sits beside the handle, on its start side.
|
|
352
|
-
.#{$component}__value {
|
|
353
|
-
left: auto;
|
|
354
|
-
bottom: auto;
|
|
355
|
-
right: calc(50% + var(--#{base.$prefix}-slider-handle-height, 44px) / 2 + 12px);
|
|
356
|
-
transform-origin: 100% 50%;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
&--disabled {
|
|
361
|
-
|
|
362
|
-
// Disabled state
|
|
363
|
-
.#{$component}__handle {
|
|
364
|
-
cursor: default;
|
|
365
|
-
pointer-events: none;
|
|
366
|
-
|
|
367
|
-
&::before {
|
|
368
|
-
opacity: 0.38;
|
|
369
|
-
background-color: t.color('on-surface');
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Discrete slider with steps
|
|
375
|
-
&--discrete {
|
|
376
|
-
.#{$component}__tick {
|
|
377
|
-
width: 4px;
|
|
378
|
-
height: 4px;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
user-select: none;
|
|
20
|
+
touch-action: none;
|
|
21
|
+
|
|
22
|
+
--#{base.$prefix}-slider-track-color: var(--#{base.$prefix}-slider-color, #{t.color('primary')});
|
|
23
|
+
--#{base.$prefix}-slider-inactive-track-color: var(--#{base.$prefix}-slider-container-color, #{t.color('secondary-container')});
|
|
24
|
+
--#{base.$prefix}-slider-tick-color: var(--#{base.$prefix}-slider-on-color, var(--#{base.$prefix}-slider-inactive-track-color));
|
|
25
|
+
--#{base.$prefix}-slider-active-opacity: 1;
|
|
26
|
+
--#{base.$prefix}-slider-inactive-opacity: 1;
|
|
27
|
+
--#{base.$prefix}-slider-tick-opacity: 1;
|
|
28
|
+
--#{base.$prefix}-slider-active-tick-opacity: 1;
|
|
29
|
+
|
|
30
|
+
&:focus {
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__label {
|
|
35
|
+
display: block;
|
|
36
|
+
@include m.typography('body-large');
|
|
37
|
+
color: t.color('on-surface');
|
|
38
|
+
margin-bottom: 4px;
|
|
39
|
+
&--end { margin-bottom: 0; margin-top: 4px; }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__icon {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
color: t.color('on-surface-variant');
|
|
47
|
+
width: 40px;
|
|
48
|
+
height: 40px;
|
|
49
|
+
|
|
50
|
+
svg {
|
|
51
|
+
width: 24px;
|
|
52
|
+
height: 24px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--icon {
|
|
57
|
+
display: grid;
|
|
58
|
+
grid-template-columns: 40px minmax(0, 1fr);
|
|
59
|
+
grid-template-areas: ". label" "icon track";
|
|
60
|
+
column-gap: 8px;
|
|
61
|
+
align-items: center;
|
|
62
|
+
.#{$component}__label { grid-area: label; }
|
|
63
|
+
.#{$component}__container { grid-area: track; }
|
|
64
|
+
.#{$component}__icon { grid-area: icon; }
|
|
65
|
+
}
|
|
66
|
+
&--icon.#{$component}--label-end { grid-template-areas: "icon track" ". label"; }
|
|
67
|
+
&--icon-end {
|
|
68
|
+
grid-template-columns: minmax(0, 1fr) 40px;
|
|
69
|
+
grid-template-areas: "label ." "track icon";
|
|
70
|
+
}
|
|
71
|
+
&--icon-end.#{$component}--label-end { grid-template-areas: "track icon" "label ."; }
|
|
72
|
+
|
|
73
|
+
&__container {
|
|
74
|
+
position: relative;
|
|
75
|
+
height: 40px;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@each $color in (secondary, tertiary, error) {
|
|
81
|
+
&--#{$color} {
|
|
82
|
+
--#{base.$prefix}-slider-track-color: var(--#{base.$prefix}-slider-color, #{t.color($color)});
|
|
83
|
+
--#{base.$prefix}-slider-inactive-track-color: var(--#{base.$prefix}-slider-container-color, #{t.color($color + '-container')});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&--disabled {
|
|
87
|
+
--#{base.$prefix}-slider-track-color: #{t.color('on-surface')};
|
|
88
|
+
--#{base.$prefix}-slider-inactive-track-color: #{t.color('on-surface')};
|
|
89
|
+
--#{base.$prefix}-slider-tick-color: #{t.color('on-surface')};
|
|
90
|
+
--#{base.$prefix}-slider-active-opacity: 0.38;
|
|
91
|
+
--#{base.$prefix}-slider-inactive-opacity: 0.12;
|
|
92
|
+
--#{base.$prefix}-slider-tick-opacity: 0.38;
|
|
93
|
+
--#{base.$prefix}-slider-active-tick-opacity: 0.12;
|
|
94
|
+
}
|
|
95
|
+
&__visual { position: absolute; inset: 0; pointer-events: none; container-type: size; }
|
|
96
|
+
&__track { position: absolute; top: 50%; width: 100%; transform: translateY(-50%); }
|
|
97
|
+
&__segment {
|
|
98
|
+
position: absolute; height: 100%; border-radius: 2px;
|
|
99
|
+
background: var(--#{base.$prefix}-slider-inactive-track-color); opacity: var(--#{base.$prefix}-slider-inactive-opacity);
|
|
100
|
+
&--active { background: var(--#{base.$prefix}-slider-track-color); opacity: var(--#{base.$prefix}-slider-active-opacity); }
|
|
101
|
+
}
|
|
102
|
+
&__ticks {
|
|
103
|
+
position: absolute; inset: 0; color: var(--#{base.$prefix}-slider-track-color); opacity: var(--#{base.$prefix}-slider-tick-opacity);
|
|
104
|
+
background-image: radial-gradient(circle at center, currentColor 2px, transparent 2px);
|
|
105
|
+
background-repeat: repeat-x;
|
|
106
|
+
&--active { color: var(--#{base.$prefix}-slider-tick-color); opacity: var(--#{base.$prefix}-slider-active-tick-opacity); }
|
|
107
|
+
}
|
|
108
|
+
&__inset-icon {
|
|
109
|
+
position: absolute; top: 50%; transform: translateY(-50%);
|
|
110
|
+
display: flex; align-items: center; justify-content: center;
|
|
111
|
+
color: var(--#{base.$prefix}-slider-tick-color); opacity: var(--#{base.$prefix}-slider-active-tick-opacity);
|
|
112
|
+
svg { width: 100%; height: 100%; fill: currentColor; }
|
|
113
|
+
&--inactive { color: var(--#{base.$prefix}-slider-track-color); opacity: var(--#{base.$prefix}-slider-tick-opacity); }
|
|
114
|
+
}
|
|
115
|
+
&__dot { position: absolute; top: calc(50% - 2px); width: 4px; height: 4px;
|
|
116
|
+
border-radius: 50%; background: var(--#{base.$prefix}-slider-track-color); opacity: var(--#{base.$prefix}-slider-active-opacity); }
|
|
117
|
+
|
|
118
|
+
&__handle {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 50%;
|
|
121
|
+
transform: translate(-50%, -50%);
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
z-index: 4;
|
|
124
|
+
width: 14px;
|
|
125
|
+
height: 50px;
|
|
126
|
+
border-radius: 16px;
|
|
127
|
+
background-color: rgba(red, .0);
|
|
128
|
+
|
|
129
|
+
&:focus {
|
|
130
|
+
outline: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&::before {
|
|
134
|
+
content: '';
|
|
135
|
+
position: absolute;
|
|
136
|
+
width: 4px;
|
|
137
|
+
height: 100%;
|
|
138
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('primary')});
|
|
139
|
+
border-radius: v.shape('full');
|
|
140
|
+
left: 50%;
|
|
141
|
+
top: 50%;
|
|
142
|
+
transform: translate(-50%, -50%);
|
|
143
|
+
|
|
144
|
+
.#{$component}--secondary & {
|
|
145
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('secondary')});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.#{$component}--tertiary & {
|
|
149
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('tertiary')});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.#{$component}--error & {
|
|
153
|
+
background-color: t.color('error');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&::before {
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.#{$component}--dragging &::before,
|
|
162
|
+
&:active::before,
|
|
163
|
+
&:focus-visible::before,
|
|
164
|
+
&--focused::before {
|
|
165
|
+
width: 2px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:hover::before {
|
|
169
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('primary')});
|
|
170
|
+
|
|
171
|
+
.#{$component}--secondary & {
|
|
172
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('secondary')});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.#{$component}--tertiary & {
|
|
176
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('tertiary')});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.#{$component}--error & {
|
|
180
|
+
background-color: t.color('error');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.#{$component}--disabled & {
|
|
184
|
+
background-color: t.color('on-surface');
|
|
185
|
+
opacity: 0.38;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:active::before {
|
|
190
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('primary')});
|
|
191
|
+
|
|
192
|
+
.#{$component}--secondary & {
|
|
193
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('secondary')});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.#{$component}--tertiary & {
|
|
197
|
+
background-color: var(--#{base.$prefix}-slider-color, #{t.color('tertiary')});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.#{$component}--error & {
|
|
201
|
+
background-color: t.color('error');
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&--range {
|
|
207
|
+
.#{$component}__handle {
|
|
208
|
+
&:nth-of-type(1) {
|
|
209
|
+
z-index: 3;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.#{$component}__dot {
|
|
214
|
+
z-index: 2;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&__value {
|
|
219
|
+
position: absolute;
|
|
220
|
+
bottom: calc(50% + var(--#{base.$prefix}-slider-handle-height, 44px) / 2 + 12px);
|
|
221
|
+
left: 0;
|
|
222
|
+
box-sizing: border-box;
|
|
223
|
+
min-width: 48px;
|
|
224
|
+
height: 44px;
|
|
225
|
+
padding: 0 16px;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
background-color: t.color('inverse-surface');
|
|
230
|
+
color: t.color('inverse-on-surface');
|
|
231
|
+
border-radius: v.shape('full');
|
|
232
|
+
@include m.typography('label-large');
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
transform: translateX(-50%);
|
|
235
|
+
transform-origin: 50% 100%;
|
|
236
|
+
scale: 0;
|
|
237
|
+
visibility: hidden;
|
|
238
|
+
opacity: 0;
|
|
239
|
+
transition: $bubble-transition;
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
|
|
242
|
+
&--visible {
|
|
243
|
+
visibility: visible;
|
|
244
|
+
opacity: 1;
|
|
245
|
+
scale: 1;
|
|
246
|
+
transition: $bubble-transition-visible;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
$settle-position: m.spring(left, default-spatial), m.spring(right, default-spatial), m.spring(bottom, default-spatial), m.spring(top, default-spatial);
|
|
251
|
+
$settle-length: m.spring(width, default-spatial), m.spring(height, default-spatial);
|
|
252
|
+
&--settling {
|
|
253
|
+
.#{$component}__handle, .#{$component}__inset-icon { transition: $settle-position; }
|
|
254
|
+
.#{$component}__segment { transition: $settle-position, $settle-length; }
|
|
255
|
+
.#{$component}__value { transition: $settle-position, $bubble-transition; }
|
|
256
|
+
.#{$component}__value--visible { transition: $settle-position, $bubble-transition-visible; }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&--vertical {
|
|
260
|
+
width: auto;
|
|
261
|
+
height: 100%;
|
|
262
|
+
align-items: center;
|
|
263
|
+
|
|
264
|
+
.#{$component}__container { height: 100%; min-height: 120px; }
|
|
265
|
+
.#{$component}__track { top: 0; left: 50%; width: auto; height: 100%; transform: translateX(-50%); }
|
|
266
|
+
.#{$component}__segment { width: 100%; }
|
|
267
|
+
.#{$component}__ticks { background-repeat: repeat-y; }
|
|
268
|
+
.#{$component}__dot { top: auto; left: calc(50% - 2px); }
|
|
269
|
+
.#{$component}__inset-icon { top: auto; left: 50%; transform: translateX(-50%); }
|
|
270
|
+
.#{$component}__handle {
|
|
271
|
+
top: auto;
|
|
272
|
+
left: 50%;
|
|
273
|
+
height: 14px;
|
|
274
|
+
&::before { width: 100%; height: 4px; }
|
|
275
|
+
}
|
|
276
|
+
&.#{$component}--dragging .#{$component}__handle::before,
|
|
277
|
+
.#{$component}__handle:active::before,
|
|
278
|
+
.#{$component}__handle:focus-visible::before,
|
|
279
|
+
.#{$component}__handle--focused::before {
|
|
280
|
+
width: 100%;
|
|
281
|
+
height: 2px;
|
|
282
|
+
}
|
|
283
|
+
.#{$component}__value {
|
|
284
|
+
left: auto;
|
|
285
|
+
bottom: auto;
|
|
286
|
+
right: calc(50% + var(--#{base.$prefix}-slider-handle-height, 44px) / 2 + 12px);
|
|
287
|
+
transform-origin: 100% 50%;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&--disabled {
|
|
292
|
+
|
|
293
|
+
.#{$component}__handle {
|
|
294
|
+
cursor: default;
|
|
295
|
+
pointer-events: none;
|
|
296
|
+
|
|
297
|
+
&::before {
|
|
298
|
+
opacity: 0.38;
|
|
299
|
+
background-color: t.color('on-surface');
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
382
304
|
}
|