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,475 +1,405 @@
|
|
|
1
|
-
// src/styles/abstract/_variables.scss
|
|
2
1
|
@use 'sass:map';
|
|
3
2
|
@use 'sass:math';
|
|
4
3
|
@use 'sass:string';
|
|
5
4
|
@use 'base' as *;
|
|
6
5
|
|
|
7
|
-
// The fast spatial spring (Compose FastSpatial: damping 0.6, stiffness 800),
|
|
8
|
-
// sampled at 25 even steps. Both of its easings below come from these points,
|
|
9
|
-
// so they cannot drift apart.
|
|
10
6
|
$spring-fast-spatial-points: (0.0, 0.102, 0.323, 0.57, 0.784, 0.942, 1.039, 1.085, 1.094, 1.082, 1.06, 1.037, 1.018, 1.004, 0.995, 0.992, 0.991, 0.992, 0.995, 0.997, 0.999, 1.0, 1.001, 1.001, 1);
|
|
11
7
|
|
|
12
|
-
/// A linear() easing through `$points`; with `$clamp`, each point at most 1.
|
|
13
8
|
@function spring-linear($points, $clamp: false) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
$text: '';
|
|
10
|
+
@each $point in $points {
|
|
11
|
+
$value: if($clamp, math.min($point, 1), $point);
|
|
12
|
+
$text: if($text == '', '#{$value}', '#{$text}, #{$value}');
|
|
13
|
+
}
|
|
14
|
+
@return string.unquote('linear(#{$text})');
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
// Core design tokens
|
|
23
17
|
$state: (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
'hover-state-layer-opacity': 0.08,
|
|
19
|
+
'focus-state-layer-opacity': 0.1,
|
|
20
|
+
'pressed-state-layer-opacity': 0.1,
|
|
21
|
+
'dragged-state-layer-opacity': 0.16
|
|
28
22
|
) !default;
|
|
29
23
|
|
|
30
24
|
$motion: (
|
|
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
|
-
// shape and position and may overshoot; effects springs change colour and
|
|
80
|
-
// opacity without overshoot. The duration is the time for the spring to
|
|
81
|
-
// settle within 0.1%.
|
|
82
|
-
'spring-default-spatial-duration': 450ms,
|
|
83
|
-
'spring-default-spatial-easing': linear(0.0, 0.055, 0.18, 0.332, 0.483, 0.619, 0.733, 0.823, 0.891, 0.94, 0.973, 0.994, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.006, 1.005, 1.003, 1.002, 1.001, 1),
|
|
84
|
-
'spring-fast-spatial-duration': 425ms,
|
|
85
|
-
'spring-fast-spatial-easing': spring-linear($spring-fast-spatial-points),
|
|
86
|
-
// The same spring with its progress clamped to 1, for colours: Compose's
|
|
87
|
-
// Color.lerp clamps the fraction, so an overshooting spring never takes a
|
|
88
|
-
// colour past its target
|
|
89
|
-
'spring-fast-spatial-clamped-easing': spring-linear($spring-fast-spatial-points, $clamp: true),
|
|
90
|
-
'spring-slow-spatial-duration': 625ms,
|
|
91
|
-
'spring-slow-spatial-easing': linear(0.0, 0.056, 0.182, 0.335, 0.488, 0.624, 0.738, 0.827, 0.895, 0.943, 0.975, 0.996, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.008, 1.006, 1.004, 1.003, 1.002, 1.001, 1),
|
|
92
|
-
'spring-default-effects-duration': 250ms,
|
|
93
|
-
'spring-default-effects-easing': linear(0.0, 0.066, 0.203, 0.355, 0.496, 0.616, 0.713, 0.788, 0.845, 0.888, 0.92, 0.943, 0.96, 0.971, 0.98, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
|
|
94
|
-
'spring-fast-effects-duration': 175ms,
|
|
95
|
-
'spring-fast-effects-easing': linear(0.0, 0.075, 0.227, 0.39, 0.537, 0.657, 0.751, 0.822, 0.874, 0.912, 0.939, 0.958, 0.971, 0.98, 0.987, 0.991, 0.994, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.0, 1),
|
|
96
|
-
'spring-slow-effects-duration': 350ms,
|
|
97
|
-
'spring-slow-effects-easing': linear(0.0, 0.065, 0.2, 0.351, 0.491, 0.611, 0.708, 0.783, 0.841, 0.885, 0.917, 0.941, 0.958, 0.97, 0.979, 0.985, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
|
|
25
|
+
'duration-short1': 50ms,
|
|
26
|
+
'duration-short2': 100ms,
|
|
27
|
+
'duration-short3': 150ms,
|
|
28
|
+
'duration-short4': 200ms,
|
|
29
|
+
'duration-medium1': 250ms,
|
|
30
|
+
'duration-medium2': 300ms,
|
|
31
|
+
'duration-medium3': 350ms,
|
|
32
|
+
'duration-medium4': 400ms,
|
|
33
|
+
'duration-long1': 450ms,
|
|
34
|
+
'duration-long2': 500ms,
|
|
35
|
+
'duration-long3': 550ms,
|
|
36
|
+
'duration-long4': 600ms,
|
|
37
|
+
'duration-extra-long1': 700ms,
|
|
38
|
+
'duration-extra-long2': 800ms,
|
|
39
|
+
'duration-extra-long3': 900ms,
|
|
40
|
+
'duration-extra-long4': 1000ms,
|
|
41
|
+
|
|
42
|
+
'easing-standard': cubic-bezier(0.2, 0.0, 0.0, 1.0),
|
|
43
|
+
'easing-standard-accelerate': cubic-bezier(0.3, 0.0, 1.0, 1.0),
|
|
44
|
+
'easing-standard-decelerate': cubic-bezier(0.0, 0.0, 0.2, 1.0),
|
|
45
|
+
|
|
46
|
+
'easing-emphasized': cubic-bezier(0.3, 0.0, 0.0, 1.0),
|
|
47
|
+
'easing-emphasized-accelerate': cubic-bezier(0.3, 0.0, 0.8, 0.15),
|
|
48
|
+
'easing-emphasized-decelerate': cubic-bezier(0.05, 0.7, 0.1, 1.0),
|
|
49
|
+
|
|
50
|
+
'easing-accelerated': cubic-bezier(0.3, 0.0, 1.0, 1.0),
|
|
51
|
+
'easing-decelerated': cubic-bezier(0.0, 0.0, 0.2, 1.0),
|
|
52
|
+
'easing-exit': cubic-bezier(0.3, 0.0, 1.0, 1.0),
|
|
53
|
+
'easing-enter': cubic-bezier(0.0, 0.0, 0.2, 1.0),
|
|
54
|
+
|
|
55
|
+
'easing-appear': cubic-bezier(0.0, 0.0, 0.2, 1.0),
|
|
56
|
+
'easing-disappear': cubic-bezier(0.3, 0.0, 1.0, 1.0),
|
|
57
|
+
'easing-expand': cubic-bezier(0.0, 0.0, 0.2, 1.0),
|
|
58
|
+
'easing-collapse': cubic-bezier(0.3, 0.0, 1.0, 1.0),
|
|
59
|
+
|
|
60
|
+
'spring-default-spatial-duration': 450ms,
|
|
61
|
+
'spring-default-spatial-easing': linear(0.0, 0.055, 0.18, 0.332, 0.483, 0.619, 0.733, 0.823, 0.891, 0.94, 0.973, 0.994, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.006, 1.005, 1.003, 1.002, 1.001, 1),
|
|
62
|
+
'spring-fast-spatial-duration': 425ms,
|
|
63
|
+
'spring-fast-spatial-easing': spring-linear($spring-fast-spatial-points),
|
|
64
|
+
'spring-fast-spatial-clamped-easing': spring-linear($spring-fast-spatial-points, $clamp: true),
|
|
65
|
+
'spring-slow-spatial-duration': 625ms,
|
|
66
|
+
'spring-slow-spatial-easing': linear(0.0, 0.056, 0.182, 0.335, 0.488, 0.624, 0.738, 0.827, 0.895, 0.943, 0.975, 0.996, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.008, 1.006, 1.004, 1.003, 1.002, 1.001, 1),
|
|
67
|
+
'spring-default-effects-duration': 250ms,
|
|
68
|
+
'spring-default-effects-easing': linear(0.0, 0.066, 0.203, 0.355, 0.496, 0.616, 0.713, 0.788, 0.845, 0.888, 0.92, 0.943, 0.96, 0.971, 0.98, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
|
|
69
|
+
'spring-fast-effects-duration': 175ms,
|
|
70
|
+
'spring-fast-effects-easing': linear(0.0, 0.075, 0.227, 0.39, 0.537, 0.657, 0.751, 0.822, 0.874, 0.912, 0.939, 0.958, 0.971, 0.98, 0.987, 0.991, 0.994, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.0, 1),
|
|
71
|
+
'spring-slow-effects-duration': 350ms,
|
|
72
|
+
'spring-slow-effects-easing': linear(0.0, 0.065, 0.2, 0.351, 0.491, 0.611, 0.708, 0.783, 0.841, 0.885, 0.917, 0.941, 0.958, 0.97, 0.979, 0.985, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
|
|
98
73
|
) !default;
|
|
99
74
|
|
|
100
75
|
$elevation: (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
76
|
+
'level-0': none,
|
|
77
|
+
'level-1': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)),
|
|
78
|
+
'level-2': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)),
|
|
79
|
+
'level-3': (0px 1px 3px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)),
|
|
80
|
+
'level-4': (0px 2px 3px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)),
|
|
81
|
+
'level-5': (0px 4px 4px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15))
|
|
107
82
|
) !default;
|
|
108
83
|
|
|
109
84
|
$typescale: (
|
|
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
|
-
|
|
85
|
+
'display-large': (
|
|
86
|
+
'font-family': ('Roboto', sans-serif),
|
|
87
|
+
'font-size': 57px,
|
|
88
|
+
'line-height': 64px,
|
|
89
|
+
'letter-spacing': -0.25px,
|
|
90
|
+
'font-weight': 400
|
|
91
|
+
),
|
|
92
|
+
'display-medium': (
|
|
93
|
+
'font-family': ('Roboto', sans-serif),
|
|
94
|
+
'font-size': 45px,
|
|
95
|
+
'line-height': 52px,
|
|
96
|
+
'letter-spacing': 0,
|
|
97
|
+
'font-weight': 400
|
|
98
|
+
),
|
|
99
|
+
'display-small': (
|
|
100
|
+
'font-family': ('Roboto', sans-serif),
|
|
101
|
+
'font-size': 36px,
|
|
102
|
+
'line-height': 44px,
|
|
103
|
+
'letter-spacing': 0,
|
|
104
|
+
'font-weight': 400
|
|
105
|
+
),
|
|
106
|
+
'headline-large': (
|
|
107
|
+
'font-family': ('Roboto', sans-serif),
|
|
108
|
+
'font-size': 32px,
|
|
109
|
+
'line-height': 40px,
|
|
110
|
+
'letter-spacing': 0,
|
|
111
|
+
'font-weight': 400
|
|
112
|
+
),
|
|
113
|
+
'headline-medium': (
|
|
114
|
+
'font-family': ('Roboto', sans-serif),
|
|
115
|
+
'font-size': 28px,
|
|
116
|
+
'line-height': 36px,
|
|
117
|
+
'letter-spacing': 0,
|
|
118
|
+
'font-weight': 400
|
|
119
|
+
),
|
|
120
|
+
'headline-small': (
|
|
121
|
+
'font-family': ('Roboto', sans-serif),
|
|
122
|
+
'font-size': 24px,
|
|
123
|
+
'line-height': 32px,
|
|
124
|
+
'letter-spacing': 0,
|
|
125
|
+
'font-weight': 400
|
|
126
|
+
),
|
|
127
|
+
'title-large': (
|
|
128
|
+
'font-family': ('Roboto', sans-serif),
|
|
129
|
+
'font-size': 22px,
|
|
130
|
+
'line-height': 28px,
|
|
131
|
+
'letter-spacing': 0,
|
|
132
|
+
'font-weight': 400
|
|
133
|
+
),
|
|
134
|
+
'title-medium': (
|
|
135
|
+
'font-family': ('Roboto', sans-serif),
|
|
136
|
+
'font-size': 16px,
|
|
137
|
+
'line-height': 24px,
|
|
138
|
+
'letter-spacing': 0.15px,
|
|
139
|
+
'font-weight': 500
|
|
140
|
+
),
|
|
141
|
+
'title-small': (
|
|
142
|
+
'font-family': ('Roboto', sans-serif),
|
|
143
|
+
'font-size': 14px,
|
|
144
|
+
'line-height': 20px,
|
|
145
|
+
'letter-spacing': 0.1px,
|
|
146
|
+
'font-weight': 500
|
|
147
|
+
),
|
|
148
|
+
'body-large': (
|
|
149
|
+
'font-family': ('Roboto', sans-serif),
|
|
150
|
+
'font-size': 16px,
|
|
151
|
+
'line-height': 24px,
|
|
152
|
+
'letter-spacing': 0.5px,
|
|
153
|
+
'font-weight': 400
|
|
154
|
+
),
|
|
155
|
+
'body-medium': (
|
|
156
|
+
'font-family': ('Roboto', sans-serif),
|
|
157
|
+
'font-size': 14px,
|
|
158
|
+
'line-height': 20px,
|
|
159
|
+
'letter-spacing': 0.25px,
|
|
160
|
+
'font-weight': 400
|
|
161
|
+
),
|
|
162
|
+
'body-small': (
|
|
163
|
+
'font-family': ('Roboto', sans-serif),
|
|
164
|
+
'font-size': 12px,
|
|
165
|
+
'line-height': 16px,
|
|
166
|
+
'letter-spacing': 0.4px,
|
|
167
|
+
'font-weight': 400
|
|
168
|
+
),
|
|
169
|
+
'label-large': (
|
|
170
|
+
'font-family': ('Roboto', sans-serif),
|
|
171
|
+
'font-size': 14px,
|
|
172
|
+
'line-height': 20px,
|
|
173
|
+
'letter-spacing': 0.1px,
|
|
174
|
+
'font-weight': 500
|
|
175
|
+
),
|
|
176
|
+
'label-medium': (
|
|
177
|
+
'font-family': ('Roboto', sans-serif),
|
|
178
|
+
'font-size': 12px,
|
|
179
|
+
'line-height': 16px,
|
|
180
|
+
'letter-spacing': 0.5px,
|
|
181
|
+
'font-weight': 500
|
|
182
|
+
),
|
|
183
|
+
'label-small': (
|
|
184
|
+
'font-family': ('Roboto', sans-serif),
|
|
185
|
+
'font-size': 11px,
|
|
186
|
+
'line-height': 16px,
|
|
187
|
+
'letter-spacing': 0.5px,
|
|
188
|
+
'font-weight': 500
|
|
189
|
+
)
|
|
215
190
|
) !default;
|
|
216
191
|
|
|
217
|
-
// M3's shape scale, Compose ShapeTokens, and nothing else
|
|
218
192
|
$shape: (
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// CornerValueExtraExtraLarge
|
|
230
|
-
'extra-large-increased': 32px,
|
|
231
|
-
'extra-extra-large': 48px,
|
|
232
|
-
'full': 9999px
|
|
193
|
+
'none': 0,
|
|
194
|
+
'extra-small': 4px,
|
|
195
|
+
'small': 8px,
|
|
196
|
+
'medium': 12px,
|
|
197
|
+
'large': 16px,
|
|
198
|
+
'large-increased': 20px,
|
|
199
|
+
'extra-large': 28px,
|
|
200
|
+
'extra-large-increased': 32px,
|
|
201
|
+
'extra-extra-large': 48px,
|
|
202
|
+
'full': 9999px
|
|
233
203
|
) !default;
|
|
234
204
|
|
|
235
205
|
$breakpoints: (
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
206
|
+
'xs': 0,
|
|
207
|
+
'sm': 600px,
|
|
208
|
+
'md': 960px,
|
|
209
|
+
'lg': 1280px,
|
|
210
|
+
'xl': 1920px
|
|
241
211
|
) !default;
|
|
242
212
|
|
|
243
213
|
$z-index: (
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
214
|
+
'modal': 1000,
|
|
215
|
+
'snackbar': 950,
|
|
216
|
+
'popover': 900,
|
|
217
|
+
'drawer': 800,
|
|
218
|
+
'dialog': 700,
|
|
219
|
+
'dropdown': 600,
|
|
220
|
+
'tooltip': 500,
|
|
221
|
+
'menu': 700,
|
|
222
|
+
'sticky': 100,
|
|
223
|
+
'fixed': 50,
|
|
224
|
+
'default': 1,
|
|
225
|
+
'below': -1
|
|
256
226
|
) !default;
|
|
257
227
|
|
|
258
|
-
// Component-specific tokens
|
|
259
228
|
$card: (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
229
|
+
'width': 344px,
|
|
230
|
+
'width-small': 344px,
|
|
231
|
+
'width-medium': 480px,
|
|
232
|
+
'width-large': 624px,
|
|
233
|
+
'border-radius': 12px,
|
|
234
|
+
'padding': 16px
|
|
266
235
|
) !default;
|
|
267
236
|
|
|
268
|
-
// Chip configuration - updated with MD3 values
|
|
269
237
|
$chip-config: (
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
238
|
+
'height': 32px,
|
|
239
|
+
'border-radius': 8px,
|
|
240
|
+
'padding-horizontal': 12px,
|
|
241
|
+
'outlined-border-opacity': 0.12,
|
|
242
|
+
'outlined-border-hover-opacity': 0.29,
|
|
243
|
+
'outlined-border-focus-opacity': 0.38,
|
|
244
|
+
'outlined-selected-border-opacity': 0,
|
|
245
|
+
'icon-size': 18px
|
|
278
246
|
) !default;
|
|
279
247
|
|
|
280
248
|
$button: (
|
|
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
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
// 9999px pill morphing to a 12px pressed shape spends almost the whole
|
|
330
|
-
// transition above half the height, paints as a pill throughout, and then
|
|
331
|
-
// snaps square at the very end. Half the height interpolates linearly and
|
|
332
|
-
// the morph reads as a morph.
|
|
333
|
-
'shape-round-xs': 16px,
|
|
334
|
-
'shape-round-s': 20px,
|
|
335
|
-
'shape-round-m': 28px,
|
|
336
|
-
'shape-round-l': 48px,
|
|
337
|
-
'shape-round-xl': 68px,
|
|
338
|
-
// Pressed container shape per size (round and square)
|
|
339
|
-
'shape-pressed-xs': map.get($shape, 'small'),
|
|
340
|
-
'shape-pressed-s': map.get($shape, 'small'),
|
|
341
|
-
'shape-pressed-m': map.get($shape, 'medium'),
|
|
342
|
-
'shape-pressed-l': map.get($shape, 'large'),
|
|
343
|
-
'shape-pressed-xl': map.get($shape, 'large'),
|
|
344
|
-
// Minimum touch target for the xs and s sizes
|
|
345
|
-
'touch-target': 48px
|
|
249
|
+
'height': 40px,
|
|
250
|
+
'min-width': 58px,
|
|
251
|
+
'padding-horizontal': 16px,
|
|
252
|
+
'padding-horizontal-small': 12px,
|
|
253
|
+
'padding-icon': 12px,
|
|
254
|
+
'transition-duration': map.get($motion, 'duration-short2'),
|
|
255
|
+
'transition-easing': map.get($motion, 'easing-standard'),
|
|
256
|
+
'height-xs': 32px,
|
|
257
|
+
'height-s': 40px,
|
|
258
|
+
'height-m': 56px,
|
|
259
|
+
'height-l': 96px,
|
|
260
|
+
'height-xl': 136px,
|
|
261
|
+
'padding-xs': 12px,
|
|
262
|
+
'padding-s': 16px,
|
|
263
|
+
'padding-m': 24px,
|
|
264
|
+
'padding-l': 48px,
|
|
265
|
+
'padding-xl': 64px,
|
|
266
|
+
'icon-size-xs': 20px,
|
|
267
|
+
'icon-size-s': 20px,
|
|
268
|
+
'icon-size-m': 24px,
|
|
269
|
+
'icon-size-l': 32px,
|
|
270
|
+
'icon-size-xl': 40px,
|
|
271
|
+
'icon-gap-xs': 4px,
|
|
272
|
+
'icon-gap-s': 8px,
|
|
273
|
+
'icon-gap-m': 8px,
|
|
274
|
+
'icon-gap-l': 12px,
|
|
275
|
+
'icon-gap-xl': 16px,
|
|
276
|
+
'outline-width-xs': 1px,
|
|
277
|
+
'outline-width-s': 1px,
|
|
278
|
+
'outline-width-m': 1px,
|
|
279
|
+
'outline-width-l': 2px,
|
|
280
|
+
'outline-width-xl': 3px,
|
|
281
|
+
'shape-square-xs': map.get($shape, 'medium'),
|
|
282
|
+
'shape-square-s': map.get($shape, 'medium'),
|
|
283
|
+
'shape-square-m': map.get($shape, 'large'),
|
|
284
|
+
'shape-square-l': map.get($shape, 'extra-large'),
|
|
285
|
+
'shape-square-xl': map.get($shape, 'extra-large'),
|
|
286
|
+
'shape-round-xs': 16px,
|
|
287
|
+
'shape-round-s': 20px,
|
|
288
|
+
'shape-round-m': 28px,
|
|
289
|
+
'shape-round-l': 48px,
|
|
290
|
+
'shape-round-xl': 68px,
|
|
291
|
+
'shape-pressed-xs': map.get($shape, 'small'),
|
|
292
|
+
'shape-pressed-s': map.get($shape, 'small'),
|
|
293
|
+
'shape-pressed-m': map.get($shape, 'medium'),
|
|
294
|
+
'shape-pressed-l': map.get($shape, 'large'),
|
|
295
|
+
'shape-pressed-xl': map.get($shape, 'large'),
|
|
296
|
+
'touch-target': 48px
|
|
346
297
|
) !default;
|
|
347
298
|
|
|
348
299
|
|
|
349
|
-
// Define spacing scale (this might already exist, if not, add it)
|
|
350
300
|
$spacing-scale: (
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
301
|
+
'0': 0,
|
|
302
|
+
'1': 4px,
|
|
303
|
+
'2': 8px,
|
|
304
|
+
'3': 12px,
|
|
305
|
+
'4': 16px,
|
|
306
|
+
'5': 20px,
|
|
307
|
+
'6': 24px,
|
|
308
|
+
'8': 32px,
|
|
309
|
+
'10': 40px,
|
|
310
|
+
'12': 48px,
|
|
311
|
+
'14': 56px,
|
|
312
|
+
'16': 64px,
|
|
313
|
+
'20': 80px,
|
|
314
|
+
'24': 96px,
|
|
315
|
+
'32': 128px
|
|
366
316
|
);
|
|
367
317
|
|
|
368
|
-
// Add spacing function
|
|
369
318
|
@function spacing($key) {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
319
|
+
@if not map.has-key($spacing-scale, $key) {
|
|
320
|
+
@error 'Spacing key "#{$key}" not found in spacing scale.';
|
|
321
|
+
}
|
|
322
|
+
@return map.get($spacing-scale, $key);
|
|
374
323
|
}
|
|
375
324
|
|
|
376
|
-
// Helper functions for easier token access
|
|
377
325
|
@function state($key) {
|
|
378
|
-
|
|
326
|
+
@return map.get($state, $key);
|
|
379
327
|
}
|
|
380
328
|
|
|
381
329
|
@function motion($key) {
|
|
382
|
-
|
|
330
|
+
@return map.get($motion, $key);
|
|
383
331
|
}
|
|
384
332
|
|
|
385
333
|
@function elevation($level) {
|
|
386
|
-
|
|
334
|
+
@return map.get($elevation, $level);
|
|
387
335
|
}
|
|
388
336
|
|
|
389
337
|
@function typography($scale) {
|
|
390
|
-
|
|
338
|
+
@return map.get($typescale, $scale);
|
|
391
339
|
}
|
|
392
340
|
|
|
393
|
-
// A corner as its token, the compiled value as the fallback: an app or
|
|
394
|
-
// theme sets --{prefix}-sys-shape-corner-<size> (base/_tokens.scss declares them)
|
|
395
341
|
@function shape($size) {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
342
|
+
@if not map.has-key($shape, $size) {
|
|
343
|
+
@error "No shape step '#{$size}'. M3's scale: #{map.keys($shape)}. "
|
|
344
|
+
+ "extra-tiny, tiny and pill were removed in material 3.0.0: write a literal radius, or use full.";
|
|
345
|
+
}
|
|
346
|
+
@return var(--#{$prefix}-sys-shape-corner-#{$size}, #{map.get($shape, $size)});
|
|
401
347
|
}
|
|
402
348
|
|
|
403
349
|
@function z-index($layer) {
|
|
404
|
-
|
|
350
|
+
@return map.get($z-index, $layer);
|
|
405
351
|
}
|
|
406
352
|
|
|
407
353
|
@function breakpoint($size) {
|
|
408
|
-
|
|
354
|
+
@return map.get($breakpoints, $size);
|
|
409
355
|
}
|
|
410
356
|
|
|
411
|
-
// The button shapes that are corner tokens: square and pressed. Round is half
|
|
412
|
-
// the container height, not a token (see shape-round-* in $button).
|
|
413
357
|
$button-shape-tokens: (
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
358
|
+
'shape-square-xs': 'medium', 'shape-square-s': 'medium', 'shape-square-m': 'large',
|
|
359
|
+
'shape-square-l': 'extra-large', 'shape-square-xl': 'extra-large',
|
|
360
|
+
'shape-pressed-xs': 'small', 'shape-pressed-s': 'small', 'shape-pressed-m': 'medium',
|
|
361
|
+
'shape-pressed-l': 'large', 'shape-pressed-xl': 'large'
|
|
418
362
|
);
|
|
419
363
|
|
|
420
364
|
@function button($prop) {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
365
|
+
@if map.has-key($button-shape-tokens, $prop) {
|
|
366
|
+
@return shape(map.get($button-shape-tokens, $prop));
|
|
367
|
+
}
|
|
368
|
+
@return map.get($button, $prop);
|
|
425
369
|
}
|
|
426
370
|
|
|
427
371
|
@function card($key) {
|
|
428
|
-
|
|
429
|
-
|
|
372
|
+
@if $key == 'border-radius' { @return shape('medium'); }
|
|
373
|
+
@return map.get($card, $key);
|
|
430
374
|
}
|
|
431
375
|
|
|
432
376
|
@function chip($key, $fallback: null) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
377
|
+
@if $key == 'border-radius' { @return shape('small'); }
|
|
378
|
+
@if map.has-key($chip-config, $key) {
|
|
379
|
+
@return map.get($chip-config, $key);
|
|
380
|
+
}
|
|
381
|
+
@return $fallback;
|
|
438
382
|
}
|
|
439
383
|
|
|
440
|
-
// TextField configuration
|
|
441
384
|
$text-field: (
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
'padding-top-multiline-label': 24px,
|
|
458
|
-
// Compact multiline keeps the compact field's 40px, and its first line is
|
|
459
|
-
// the compact single-line field's (10.5px, and 13.5px under a filled label).
|
|
460
|
-
'padding-top-multiline-compact': 10px,
|
|
461
|
-
'padding-top-multiline-compact-label': 14px,
|
|
462
|
-
'padding-horizontal': 16px,
|
|
463
|
-
'padding-vertical': 16px,
|
|
464
|
-
'border-radius': map.get($shape, 'extra-small'),
|
|
465
|
-
'border-width': 1px,
|
|
466
|
-
'label-offset': 16px,
|
|
467
|
-
'icon-size': 24px
|
|
385
|
+
'width': 280px,
|
|
386
|
+
'height': 56px,
|
|
387
|
+
'height-small': 48px,
|
|
388
|
+
'height-large': 64px,
|
|
389
|
+
'height-multiline': 100px,
|
|
390
|
+
'padding-top-multiline': 16px,
|
|
391
|
+
'padding-top-multiline-label': 24px,
|
|
392
|
+
'padding-top-multiline-compact': 10px,
|
|
393
|
+
'padding-top-multiline-compact-label': 14px,
|
|
394
|
+
'padding-horizontal': 16px,
|
|
395
|
+
'padding-vertical': 16px,
|
|
396
|
+
'border-radius': map.get($shape, 'extra-small'),
|
|
397
|
+
'border-width': 1px,
|
|
398
|
+
'label-offset': 16px,
|
|
399
|
+
'icon-size': 24px
|
|
468
400
|
) !default;
|
|
469
401
|
|
|
470
|
-
/// A text field measurement: `v.text-field('height')`. 0.10's `$textfield` and
|
|
471
|
-
/// `textfield()` are removed in material 3.0.0.
|
|
472
402
|
@function text-field($key) {
|
|
473
|
-
|
|
474
|
-
|
|
403
|
+
@if $key == 'border-radius' { @return shape('extra-small'); }
|
|
404
|
+
@return map.get($text-field, $key);
|
|
475
405
|
}
|