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
|
@@ -5,348 +5,292 @@
|
|
|
5
5
|
@use '../abstract/variables' as v;
|
|
6
6
|
@use '../abstract/direction' as d;
|
|
7
7
|
|
|
8
|
-
// M3 Expressive navigation rail.
|
|
9
|
-
// Geometry: Compose NavigationRailCollapsed/Expanded/BaselineItem/VerticalItem/
|
|
10
|
-
// HorizontalItem tokens v0_11_0 and Android navigationrail/res/values/tokens.xml.
|
|
11
|
-
// Motion: Compose WideNavigationRail animates the width, the item spacing and
|
|
12
|
-
// the item height on the default spatial spring (fast spatial for the modal);
|
|
13
|
-
// Compose NavigationItem glides the icon between its top and start positions
|
|
14
|
-
// on the same spring and swaps the label position at the midpoint behind a
|
|
15
|
-
// fade. The active indicator fades on the effects spring and scales in from
|
|
16
|
-
// its centre as in Android NavigationBarItemView.ActiveIndicatorTransform.
|
|
17
|
-
// Icon, label, badge and indicator are positioned absolutely inside the item
|
|
18
|
-
// so that every one of those moves is a transition rather than a reflow.
|
|
19
8
|
$component: '#{base.$prefix}-navigation-rail';
|
|
20
9
|
$spatial: v.motion('spring-default-spatial-duration') v.motion('spring-default-spatial-easing');
|
|
21
10
|
$fast-spatial: v.motion('spring-fast-spatial-duration') v.motion('spring-fast-spatial-easing');
|
|
22
11
|
$effects: v.motion('spring-default-effects-duration') v.motion('spring-default-effects-easing');
|
|
23
12
|
$midpoint: math.div(v.motion('spring-default-spatial-duration'), 2);
|
|
24
|
-
// Properties that change layout rather than glide snap at the midpoint of the
|
|
25
|
-
// spatial spring, when the swap fade has the element at opacity 0.
|
|
26
13
|
$snap: 0s linear $midpoint;
|
|
27
14
|
|
|
28
15
|
.#{$component} {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
inline-size: 96px;
|
|
21
|
+
block-size: 100%;
|
|
22
|
+
min-block-size: 0;
|
|
23
|
+
padding-block: 44px 16px;
|
|
24
|
+
overflow-x: hidden;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
overscroll-behavior: contain;
|
|
27
|
+
background: t.color('surface');
|
|
28
|
+
color: t.color('on-surface-variant');
|
|
29
|
+
transition: inline-size $spatial;
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
&--expanded { inline-size: var(--#{base.$prefix}-navigation-rail-expanded-width, 280px); }
|
|
45
32
|
|
|
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
|
-
cursor: pointer;
|
|
80
|
-
transition: background-color $effects;
|
|
81
|
-
svg { inline-size: 24px; block-size: 24px; fill: currentColor; }
|
|
82
|
-
&:hover { background: t.alpha('on-surface', v.state('hover-state-layer-opacity')); }
|
|
83
|
-
}
|
|
33
|
+
&__header {
|
|
34
|
+
--#{base.$prefix}-extended-fab-compact: 0;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
margin-block-end: 40px;
|
|
41
|
+
padding-inline-start: 24px;
|
|
42
|
+
transition: padding-inline-start $spatial;
|
|
43
|
+
}
|
|
44
|
+
&--expanded &__header {
|
|
45
|
+
--#{base.$prefix}-extended-fab-compact: initial;
|
|
46
|
+
padding-inline-start: 20px;
|
|
47
|
+
}
|
|
48
|
+
&__toggle {
|
|
49
|
+
font: inherit;
|
|
50
|
+
display: grid;
|
|
51
|
+
place-items: center;
|
|
52
|
+
position: relative;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
inline-size: 48px;
|
|
55
|
+
block-size: 48px;
|
|
56
|
+
padding: 12px;
|
|
57
|
+
border: 0;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: transparent;
|
|
60
|
+
color: t.color('on-surface-variant');
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: background-color $effects;
|
|
63
|
+
svg { inline-size: 24px; block-size: 24px; fill: currentColor; }
|
|
64
|
+
&:hover { background: t.alpha('on-surface', v.state('hover-state-layer-opacity')); }
|
|
65
|
+
}
|
|
84
66
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
67
|
+
&__items {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
gap: 4px;
|
|
72
|
+
transition: gap $spatial;
|
|
73
|
+
}
|
|
74
|
+
&--expanded &__items { gap: 0; }
|
|
75
|
+
&__content { display: contents; }
|
|
94
76
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-webkit-tap-highlight-color: transparent;
|
|
112
|
-
transition: block-size $spatial, color $effects;
|
|
77
|
+
&__item {
|
|
78
|
+
font: inherit;
|
|
79
|
+
position: relative;
|
|
80
|
+
isolation: isolate;
|
|
81
|
+
display: block;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
inline-size: 100%;
|
|
84
|
+
block-size: 64px;
|
|
85
|
+
padding: 0;
|
|
86
|
+
border: 0;
|
|
87
|
+
background: transparent;
|
|
88
|
+
color: inherit;
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
-webkit-tap-highlight-color: transparent;
|
|
92
|
+
transition: block-size $spatial, color $effects;
|
|
113
93
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
&--expanded &__item--active { color: t.color('on-secondary-container'); }
|
|
94
|
+
&[aria-disabled='true'] { opacity: 0.38; cursor: default; }
|
|
95
|
+
&--active { color: t.color('secondary'); }
|
|
96
|
+
}
|
|
97
|
+
&--expanded &__item { block-size: 56px; }
|
|
98
|
+
&--expanded &__item--active { color: t.color('on-secondary-container'); }
|
|
120
99
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
overflow: hidden;
|
|
136
|
-
pointer-events: none;
|
|
137
|
-
transition:
|
|
138
|
-
inset-block-start $spatial,
|
|
139
|
-
inline-size $spatial,
|
|
140
|
-
block-size $spatial;
|
|
100
|
+
&__indicator {
|
|
101
|
+
position: absolute;
|
|
102
|
+
z-index: -1;
|
|
103
|
+
inset-block-start: 6px;
|
|
104
|
+
@include d.start(20px, $arm: false);
|
|
105
|
+
inline-size: 56px;
|
|
106
|
+
block-size: 32px;
|
|
107
|
+
border-radius: v.shape('full');
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
transition:
|
|
111
|
+
inset-block-start $spatial,
|
|
112
|
+
inline-size $spatial,
|
|
113
|
+
block-size $spatial;
|
|
141
114
|
|
|
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
|
-
&__item:focus-visible &__indicator::after { opacity: v.state('focus-state-layer-opacity'); }
|
|
181
|
-
&__item:active &__indicator::after { opacity: v.state('pressed-state-layer-opacity'); }
|
|
182
|
-
&__item[aria-disabled='true'] &__indicator::after { opacity: 0; }
|
|
183
|
-
// The focus ring is drawn around the pill, not the full-width hit target
|
|
184
|
-
&__item:focus-visible { outline: none; }
|
|
185
|
-
&__item:focus-visible &__indicator { outline: 3px solid t.color('secondary'); outline-offset: 2px; }
|
|
115
|
+
&::before {
|
|
116
|
+
content: '';
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: 0;
|
|
119
|
+
border-radius: inherit;
|
|
120
|
+
background: t.color('secondary-container');
|
|
121
|
+
opacity: 0;
|
|
122
|
+
transform: scaleX(0.4);
|
|
123
|
+
transition:
|
|
124
|
+
transform $spatial,
|
|
125
|
+
opacity v.motion('spring-default-spatial-duration') v.motion('spring-default-effects-easing');
|
|
126
|
+
}
|
|
127
|
+
&::after {
|
|
128
|
+
content: '';
|
|
129
|
+
position: absolute;
|
|
130
|
+
inset: 0;
|
|
131
|
+
border-radius: inherit;
|
|
132
|
+
background: t.color('on-secondary-container');
|
|
133
|
+
opacity: 0;
|
|
134
|
+
transition: opacity $effects;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
&--expanded &__indicator {
|
|
138
|
+
inset-block-start: 0;
|
|
139
|
+
inline-size: calc(100% - 40px);
|
|
140
|
+
block-size: 56px;
|
|
141
|
+
}
|
|
142
|
+
&__item--active &__indicator::before {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
transform: scaleX(1);
|
|
145
|
+
transition: transform $spatial, opacity $effects;
|
|
146
|
+
}
|
|
147
|
+
&__item:hover &__indicator::after { opacity: v.state('hover-state-layer-opacity'); }
|
|
148
|
+
&__item:focus-visible &__indicator::after { opacity: v.state('focus-state-layer-opacity'); }
|
|
149
|
+
&__item:active &__indicator::after { opacity: v.state('pressed-state-layer-opacity'); }
|
|
150
|
+
&__item[aria-disabled='true'] &__indicator::after { opacity: 0; }
|
|
151
|
+
&__item:focus-visible { outline: none; }
|
|
152
|
+
&__item:focus-visible &__indicator { outline: 3px solid t.color('secondary'); outline-offset: 2px; }
|
|
186
153
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
154
|
+
&__ripple {
|
|
155
|
+
position: absolute;
|
|
156
|
+
border-radius: 50%;
|
|
157
|
+
pointer-events: none;
|
|
158
|
+
background: t.color('on-secondary-container');
|
|
159
|
+
animation: #{$component}-ripple v.motion('spring-default-spatial-duration') ease-out forwards;
|
|
160
|
+
}
|
|
194
161
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
&--expanded &__icon { inset-block-start: 16px; }
|
|
162
|
+
&__icon {
|
|
163
|
+
position: absolute;
|
|
164
|
+
display: grid;
|
|
165
|
+
place-items: center;
|
|
166
|
+
inset-block-start: 10px;
|
|
167
|
+
@include d.start(36px, $arm: false);
|
|
168
|
+
inline-size: 24px;
|
|
169
|
+
block-size: 24px;
|
|
170
|
+
color: t.color('on-surface-variant');
|
|
171
|
+
transition: inset-block-start $spatial, color $effects;
|
|
172
|
+
svg { inline-size: 24px; block-size: 24px; fill: currentColor; }
|
|
173
|
+
}
|
|
174
|
+
&__item--active &__icon { color: t.color('on-secondary-container'); }
|
|
175
|
+
&--expanded &__icon { inset-block-start: 16px; }
|
|
210
176
|
|
|
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
|
-
&--expanded &__item--badged &__label { inline-size: calc(100% - 140px); }
|
|
246
|
-
&--switching &__label,
|
|
247
|
-
&--switching &__badge {
|
|
248
|
-
animation: #{$component}-swap v.motion('spring-default-spatial-duration') linear;
|
|
249
|
-
}
|
|
177
|
+
&__label {
|
|
178
|
+
position: absolute;
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
inset-block-start: 42px;
|
|
181
|
+
@include d.start(16px, $arm: false);
|
|
182
|
+
inline-size: 64px;
|
|
183
|
+
text-align: center;
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
text-overflow: ellipsis;
|
|
187
|
+
@include m.typography('label-medium');
|
|
188
|
+
transition:
|
|
189
|
+
inset-block-start $snap,
|
|
190
|
+
d.transition(inset-inline-start, $snap),
|
|
191
|
+
inline-size $snap,
|
|
192
|
+
font-size $snap,
|
|
193
|
+
line-height $snap,
|
|
194
|
+
letter-spacing $snap,
|
|
195
|
+
text-align $snap;
|
|
196
|
+
transition-behavior: allow-discrete;
|
|
197
|
+
}
|
|
198
|
+
&--expanded &__label {
|
|
199
|
+
inset-block-start: 18px;
|
|
200
|
+
@include d.start(68px, $arm: false);
|
|
201
|
+
inline-size: calc(100% - 104px);
|
|
202
|
+
text-align: start;
|
|
203
|
+
@include m.typography('label-large');
|
|
204
|
+
}
|
|
205
|
+
&--expanded &__item--badged &__label { inline-size: calc(100% - 140px); }
|
|
206
|
+
&--switching &__label,
|
|
207
|
+
&--switching &__badge {
|
|
208
|
+
animation: #{$component}-swap v.motion('spring-default-spatial-duration') linear;
|
|
209
|
+
}
|
|
250
210
|
|
|
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
|
-
@include d.start(54px, $arm: false);
|
|
278
|
-
inset-block-start: 10px;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
&--expanded &__badge { @include d.sides(auto, 36px, $arm: false); inset-block-start: 20px; }
|
|
282
|
-
&--expanded &__badge--dot { inset-block-start: 25px; }
|
|
211
|
+
&__badge {
|
|
212
|
+
position: absolute;
|
|
213
|
+
box-sizing: border-box;
|
|
214
|
+
@include d.start(48px, $arm: false);
|
|
215
|
+
inset-block-start: 8px;
|
|
216
|
+
min-inline-size: 16px;
|
|
217
|
+
min-block-size: 16px;
|
|
218
|
+
padding-inline: 4px;
|
|
219
|
+
border-radius: v.shape('full');
|
|
220
|
+
background: t.color('error');
|
|
221
|
+
color: t.color('on-error');
|
|
222
|
+
@include m.typography('label-small');
|
|
223
|
+
transition: d.transition(inset-inline-start, $snap), inset-block-start $snap;
|
|
224
|
+
transition-behavior: allow-discrete;
|
|
225
|
+
&--dot {
|
|
226
|
+
inline-size: 6px;
|
|
227
|
+
block-size: 6px;
|
|
228
|
+
min-inline-size: 0;
|
|
229
|
+
min-block-size: 0;
|
|
230
|
+
padding: 0;
|
|
231
|
+
@include d.start(54px, $arm: false);
|
|
232
|
+
inset-block-start: 10px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
&--expanded &__badge { @include d.sides(auto, 36px, $arm: false); inset-block-start: 20px; }
|
|
236
|
+
&--expanded &__badge--dot { inset-block-start: 25px; }
|
|
283
237
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
@include d.arms-selector('.#{$component}__label') { right: 16px; left: auto; }
|
|
290
|
-
@include d.arms-selector('.#{$component}__badge') { right: 48px; left: auto; }
|
|
291
|
-
@include d.arms-selector('.#{$component}__badge--dot') { right: 54px; left: auto; }
|
|
238
|
+
@include d.arms-selector('.#{$component}__indicator') { right: 20px; left: auto; }
|
|
239
|
+
@include d.arms-selector('.#{$component}__icon') { right: 36px; left: auto; }
|
|
240
|
+
@include d.arms-selector('.#{$component}__label') { right: 16px; left: auto; }
|
|
241
|
+
@include d.arms-selector('.#{$component}__badge') { right: 48px; left: auto; }
|
|
242
|
+
@include d.arms-selector('.#{$component}__badge--dot') { right: 54px; left: auto; }
|
|
292
243
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
}
|
|
244
|
+
&--expanded {
|
|
245
|
+
@include d.arms($self: true) {
|
|
246
|
+
.#{$component}__label { right: 68px; left: auto; }
|
|
247
|
+
.#{$component}__badge { left: 36px; right: auto; }
|
|
248
|
+
}
|
|
249
|
+
}
|
|
301
250
|
|
|
302
|
-
|
|
251
|
+
&--hide-collapsed:not(&--expanded) { display: none; }
|
|
303
252
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
@include m.elevation(2);
|
|
320
|
-
&:not([open]) { display: none; }
|
|
321
|
-
&::backdrop { background: t.alpha('scrim', 0.32); }
|
|
253
|
+
&--modal {
|
|
254
|
+
position: fixed;
|
|
255
|
+
inset-block: 0;
|
|
256
|
+
@include d.sides(0, auto, $arm: false);
|
|
257
|
+
margin: 0;
|
|
258
|
+
border: 0;
|
|
259
|
+
max-inline-size: calc(100vw - 56px);
|
|
260
|
+
max-block-size: 100dvh;
|
|
261
|
+
block-size: 100dvh;
|
|
262
|
+
background: t.color('surface-container');
|
|
263
|
+
@include d.corners($start-end: v.shape('large'), $end-end: v.shape('large'), $arm: false);
|
|
264
|
+
transition: inline-size $fast-spatial;
|
|
265
|
+
@include m.elevation(2);
|
|
266
|
+
&:not([open]) { display: none; }
|
|
267
|
+
&::backdrop { background: t.alpha('scrim', 0.32); }
|
|
322
268
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
}
|
|
269
|
+
@include d.arms($self: true) {
|
|
270
|
+
left: auto;
|
|
271
|
+
right: 0;
|
|
272
|
+
border-top-left-radius: v.shape('large');
|
|
273
|
+
border-bottom-left-radius: v.shape('large');
|
|
274
|
+
border-top-right-radius: 0;
|
|
275
|
+
border-bottom-right-radius: 0;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
334
278
|
|
|
335
|
-
|
|
279
|
+
&__toggle:focus-visible { outline: 2px solid t.color('secondary'); outline-offset: -2px; }
|
|
336
280
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
281
|
+
@include m.reduced-motion { &, & *, & *::before, & *::after { transition: none; animation: none; } }
|
|
282
|
+
@include m.high-contrast {
|
|
283
|
+
border-inline-end: 1px solid CanvasText;
|
|
284
|
+
&__item--active .#{$component}__indicator { outline: 2px solid Highlight; outline-offset: -2px; }
|
|
285
|
+
}
|
|
342
286
|
}
|
|
343
287
|
|
|
344
288
|
@keyframes #{$component}-ripple {
|
|
345
|
-
|
|
346
|
-
|
|
289
|
+
from { transform: scale(0); opacity: v.state('pressed-state-layer-opacity'); }
|
|
290
|
+
to { transform: scale(1); opacity: 0; }
|
|
347
291
|
}
|
|
348
292
|
|
|
349
293
|
@keyframes #{$component}-swap {
|
|
350
|
-
|
|
351
|
-
|
|
294
|
+
0%, 100% { opacity: 1; }
|
|
295
|
+
50% { opacity: 0; }
|
|
352
296
|
}
|