material 3.7.2 → 3.8.0

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.
Files changed (313) hide show
  1. package/NOTICE +223 -0
  2. package/README.md +5 -3
  3. package/dist/components/extended-fab/types.d.ts +3 -0
  4. package/dist/components/fab/types.d.ts +3 -0
  5. package/dist/components/slider/features/controller.js +24 -8
  6. package/dist/elements/css/card.css +1 -1
  7. package/dist/elements/css/card.js +1 -1
  8. package/dist/elements/css/dialog.css +1 -1
  9. package/dist/elements/css/dialog.js +1 -1
  10. package/dist/elements/css/menu.css +1 -1
  11. package/dist/elements/css/menu.js +1 -1
  12. package/dist/elements/css/select.css +1 -1
  13. package/dist/elements/css/select.js +1 -1
  14. package/dist/elements/css/slider.css +1 -1
  15. package/dist/elements/css/slider.js +1 -1
  16. package/dist/elements/css/tabs.css +1 -1
  17. package/dist/elements/css/tabs.js +1 -1
  18. package/dist/elements/css/timepicker.css +1 -1
  19. package/dist/elements/css/timepicker.js +1 -1
  20. package/dist/elements/extended-fab.d.ts +1 -0
  21. package/dist/elements/fab.d.ts +1 -0
  22. package/dist/elements/preupgrade/badge.css +1 -1
  23. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  24. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  25. package/dist/elements/preupgrade/button-group.css +1 -1
  26. package/dist/elements/preupgrade/button.css +1 -1
  27. package/dist/elements/preupgrade/card.css +1 -1
  28. package/dist/elements/preupgrade/carousel.css +1 -1
  29. package/dist/elements/preupgrade/checkbox.css +1 -1
  30. package/dist/elements/preupgrade/chips.css +1 -1
  31. package/dist/elements/preupgrade/datepicker.css +1 -1
  32. package/dist/elements/preupgrade/dialog.css +1 -1
  33. package/dist/elements/preupgrade/divider.css +1 -1
  34. package/dist/elements/preupgrade/drawer.css +1 -1
  35. package/dist/elements/preupgrade/extended-fab.css +1 -1
  36. package/dist/elements/preupgrade/fab-menu.css +1 -1
  37. package/dist/elements/preupgrade/fab.css +1 -1
  38. package/dist/elements/preupgrade/icon-button.css +1 -1
  39. package/dist/elements/preupgrade/list.css +1 -1
  40. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  41. package/dist/elements/preupgrade/menu.css +1 -1
  42. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  43. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  44. package/dist/elements/preupgrade/progress.css +1 -1
  45. package/dist/elements/preupgrade/radios.css +1 -1
  46. package/dist/elements/preupgrade/search.css +1 -1
  47. package/dist/elements/preupgrade/select.css +1 -1
  48. package/dist/elements/preupgrade/side-sheet.css +1 -1
  49. package/dist/elements/preupgrade/slider.css +1 -1
  50. package/dist/elements/preupgrade/snackbar.css +1 -1
  51. package/dist/elements/preupgrade/split-button.css +1 -1
  52. package/dist/elements/preupgrade/switch.css +1 -1
  53. package/dist/elements/preupgrade/tabs.css +1 -1
  54. package/dist/elements/preupgrade/text-field.css +1 -1
  55. package/dist/elements/preupgrade/timepicker.css +1 -1
  56. package/dist/elements/preupgrade/toolbar.css +1 -1
  57. package/dist/elements/preupgrade/tooltip.css +1 -1
  58. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  59. package/dist/elements/preupgrade.css +1 -1
  60. package/dist/styles/badge.css +1 -1
  61. package/dist/styles/base-lite.css +2 -2
  62. package/dist/styles/base.css +2 -2
  63. package/dist/styles/bottom-app-bar.css +1 -1
  64. package/dist/styles/bottom-sheet.css +1 -1
  65. package/dist/styles/button-group.css +1 -1
  66. package/dist/styles/button.css +1 -1
  67. package/dist/styles/card.css +2 -2
  68. package/dist/styles/carousel.css +1 -1
  69. package/dist/styles/checkbox.css +1 -1
  70. package/dist/styles/chips.css +1 -1
  71. package/dist/styles/contrast.css +2 -2
  72. package/dist/styles/datepicker.css +1 -1
  73. package/dist/styles/dialog.css +2 -2
  74. package/dist/styles/divider.css +1 -1
  75. package/dist/styles/drawer.css +1 -1
  76. package/dist/styles/extended-fab.css +1 -1
  77. package/dist/styles/fab-menu.css +1 -1
  78. package/dist/styles/fab.css +1 -1
  79. package/dist/styles/icon-button.css +1 -1
  80. package/dist/styles/list.css +1 -1
  81. package/dist/styles/loading-indicator.css +1 -1
  82. package/dist/styles/menu.css +2 -2
  83. package/dist/styles/navigation-bar.css +1 -1
  84. package/dist/styles/navigation-rail.css +1 -1
  85. package/dist/styles/progress.css +1 -1
  86. package/dist/styles/radios.css +1 -1
  87. package/dist/styles/search.css +1 -1
  88. package/dist/styles/select.css +2 -2
  89. package/dist/styles/side-sheet.css +1 -1
  90. package/dist/styles/slider.css +2 -2
  91. package/dist/styles/snackbar.css +1 -1
  92. package/dist/styles/split-button.css +1 -1
  93. package/dist/styles/switch.css +1 -1
  94. package/dist/styles/tabs.css +2 -2
  95. package/dist/styles/text-field.css +1 -1
  96. package/dist/styles/timepicker.css +2 -2
  97. package/dist/styles/toolbar.css +1 -1
  98. package/dist/styles/tooltip.css +1 -1
  99. package/dist/styles/top-app-bar.css +1 -1
  100. package/dist/styles/typography.css +1 -1
  101. package/dist/styles/utilities.css +1 -1
  102. package/dist/styles.css +2 -2
  103. package/dist/theme/image.d.ts +2 -0
  104. package/dist/theme/image.js +5 -0
  105. package/dist/theme/index.d.ts +23 -0
  106. package/dist/theme/index.js +32 -0
  107. package/dist/theme/roles.js +68 -0
  108. package/dist/theme/variants.d.ts +9 -0
  109. package/dist/theme/variants.js +17 -0
  110. package/dist/theme/vendor/contrast/contrast.js +72 -0
  111. package/dist/theme/vendor/dislike/dislike_analyzer.js +31 -0
  112. package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +63 -0
  113. package/dist/theme/vendor/dynamiccolor/color_spec_2021.js +663 -0
  114. package/dist/theme/vendor/dynamiccolor/contrast_curve.js +42 -0
  115. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +24 -0
  116. package/dist/theme/vendor/dynamiccolor/dynamic_color.js +264 -0
  117. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +87 -0
  118. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +418 -0
  119. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +124 -0
  120. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.js +311 -0
  121. package/dist/theme/vendor/dynamiccolor/tone_delta_pair.js +27 -0
  122. package/dist/theme/vendor/dynamiccolor/variant.js +28 -0
  123. package/dist/theme/vendor/hct/cam16.js +249 -0
  124. package/dist/theme/vendor/hct/hct.d.ts +23 -0
  125. package/dist/theme/vendor/hct/hct.js +86 -0
  126. package/dist/theme/vendor/hct/hct_solver.js +390 -0
  127. package/dist/theme/vendor/hct/viewing_conditions.js +73 -0
  128. package/dist/theme/vendor/palettes/tonal_palette.js +114 -0
  129. package/dist/theme/vendor/quantize/lab_point_provider.js +31 -0
  130. package/dist/theme/vendor/quantize/quantizer_celebi.js +25 -0
  131. package/dist/theme/vendor/quantize/quantizer_map.js +31 -0
  132. package/dist/theme/vendor/quantize/quantizer_wsmeans.js +178 -0
  133. package/dist/theme/vendor/quantize/quantizer_wu.js +342 -0
  134. package/dist/theme/vendor/scheme/scheme_content.js +30 -0
  135. package/dist/theme/vendor/scheme/scheme_expressive.js +30 -0
  136. package/dist/theme/vendor/scheme/scheme_fidelity.js +30 -0
  137. package/dist/theme/vendor/scheme/scheme_monochrome.js +30 -0
  138. package/dist/theme/vendor/scheme/scheme_neutral.js +30 -0
  139. package/dist/theme/vendor/scheme/scheme_tonal_spot.js +30 -0
  140. package/dist/theme/vendor/scheme/scheme_vibrant.js +30 -0
  141. package/dist/theme/vendor/score/score.js +100 -0
  142. package/dist/theme/vendor/temperature/temperature_cache.js +198 -0
  143. package/dist/theme/vendor/utils/color_utils.js +173 -0
  144. package/dist/theme/vendor/utils/image_utils.js +72 -0
  145. package/dist/theme/vendor/utils/math_utils.js +75 -0
  146. package/dist/theme/vendor/utils/string_utils.js +61 -0
  147. package/dist/themes/autumn-contrast.css +2 -2
  148. package/dist/themes/autumn.css +2 -2
  149. package/dist/themes/baseline-contrast.css +2 -2
  150. package/dist/themes/baseline.css +2 -2
  151. package/dist/themes/brownbeige-contrast.css +2 -2
  152. package/dist/themes/brownbeige.css +2 -2
  153. package/dist/themes/content-contrast.css +2 -2
  154. package/dist/themes/content.css +2 -2
  155. package/dist/themes/desert-contrast.css +2 -2
  156. package/dist/themes/desert.css +2 -2
  157. package/dist/themes/expressive-contrast.css +2 -2
  158. package/dist/themes/expressive.css +2 -2
  159. package/dist/themes/fidelity-contrast.css +2 -2
  160. package/dist/themes/fidelity.css +2 -2
  161. package/dist/themes/forest-contrast.css +2 -2
  162. package/dist/themes/forest.css +2 -2
  163. package/dist/themes/fruit-salad-contrast.css +2 -2
  164. package/dist/themes/fruit-salad.css +2 -2
  165. package/dist/themes/highcontrast-contrast.css +2 -2
  166. package/dist/themes/highcontrast.css +2 -2
  167. package/dist/themes/monochrome-contrast.css +2 -2
  168. package/dist/themes/monochrome.css +2 -2
  169. package/dist/themes/neutral-contrast.css +2 -2
  170. package/dist/themes/neutral.css +2 -2
  171. package/dist/themes/ocean-contrast.css +2 -2
  172. package/dist/themes/ocean.css +2 -2
  173. package/dist/themes/rainbow-contrast.css +2 -2
  174. package/dist/themes/rainbow.css +2 -2
  175. package/dist/themes/sageivory-contrast.css +2 -2
  176. package/dist/themes/sageivory.css +2 -2
  177. package/dist/themes/spring-contrast.css +2 -2
  178. package/dist/themes/spring.css +2 -2
  179. package/dist/themes/summer-contrast.css +2 -2
  180. package/dist/themes/summer.css +2 -2
  181. package/dist/themes/sunset-contrast.css +2 -2
  182. package/dist/themes/sunset.css +2 -2
  183. package/dist/themes/tealcaramel-contrast.css +2 -2
  184. package/dist/themes/tealcaramel.css +2 -2
  185. package/dist/themes/vibrant-contrast.css +2 -2
  186. package/dist/themes/vibrant.css +2 -2
  187. package/package.json +15 -1
  188. package/src/styles/abstract/_base.scss +0 -1
  189. package/src/styles/abstract/_direction.scss +121 -152
  190. package/src/styles/abstract/_emit.scss +7 -16
  191. package/src/styles/abstract/_floating-placement.scss +9 -10
  192. package/src/styles/abstract/_functions.scss +64 -79
  193. package/src/styles/abstract/_mixins.scss +355 -459
  194. package/src/styles/abstract/_theme.scss +122 -136
  195. package/src/styles/abstract/_variables.scss +320 -390
  196. package/src/styles/abstract/chips/_assist.scss +2 -3
  197. package/src/styles/abstract/chips/_filter.scss +2 -3
  198. package/src/styles/abstract/chips/_input.scss +2 -3
  199. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  200. package/src/styles/base/_body-theme.scss +10 -15
  201. package/src/styles/base/_document.scss +10 -33
  202. package/src/styles/base/_reset.scss +20 -40
  203. package/src/styles/base/_tokens.scss +6 -21
  204. package/src/styles/base/_typescale-tokens.scss +12 -16
  205. package/src/styles/base/_typography.scss +28 -37
  206. package/src/styles/components/_badge.scss +171 -193
  207. package/src/styles/components/_bottom-app-bar.scss +72 -90
  208. package/src/styles/components/_bottom-sheet.scss +188 -232
  209. package/src/styles/components/_button-group.scss +140 -189
  210. package/src/styles/components/_button.scss +382 -478
  211. package/src/styles/components/_card.scss +349 -473
  212. package/src/styles/components/_carousel.scss +134 -156
  213. package/src/styles/components/_checkbox.scss +208 -249
  214. package/src/styles/components/_chips.scss +239 -304
  215. package/src/styles/components/_datepicker.scss +172 -222
  216. package/src/styles/components/_dialog.scss +428 -553
  217. package/src/styles/components/_divider.scss +37 -46
  218. package/src/styles/components/_drawer.scss +571 -678
  219. package/src/styles/components/_extended-fab.scss +263 -294
  220. package/src/styles/components/_fab-menu.scss +225 -267
  221. package/src/styles/components/_fab.scss +197 -218
  222. package/src/styles/components/_icon-button.scss +483 -588
  223. package/src/styles/components/_list.scss +115 -144
  224. package/src/styles/components/_loading-indicator.scss +23 -29
  225. package/src/styles/components/_menu.scss +543 -699
  226. package/src/styles/components/_navigation-bar.scss +189 -234
  227. package/src/styles/components/_navigation-rail.scss +256 -312
  228. package/src/styles/components/_progress.scss +60 -85
  229. package/src/styles/components/_radios.scss +170 -207
  230. package/src/styles/components/_search.scss +369 -455
  231. package/src/styles/components/_select.scss +78 -185
  232. package/src/styles/components/_side-sheet.scss +234 -292
  233. package/src/styles/components/_slider.scss +289 -367
  234. package/src/styles/components/_snackbar.scss +149 -198
  235. package/src/styles/components/_split-button.scss +139 -228
  236. package/src/styles/components/_switch.scss +282 -349
  237. package/src/styles/components/_tabs.scss +350 -547
  238. package/src/styles/components/_text-field.scss +788 -980
  239. package/src/styles/components/_timepicker.scss +435 -506
  240. package/src/styles/components/_toolbar.scss +178 -242
  241. package/src/styles/components/_tooltip.scss +152 -197
  242. package/src/styles/components/_top-app-bar.scss +206 -230
  243. package/src/styles/elements/_badge.scss +42 -61
  244. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  245. package/src/styles/elements/_bottom-sheet.scss +0 -3
  246. package/src/styles/elements/_button-group.scss +80 -80
  247. package/src/styles/elements/_button.scss +72 -88
  248. package/src/styles/elements/_card.scss +48 -57
  249. package/src/styles/elements/_carousel.scss +2 -5
  250. package/src/styles/elements/_checkbox.scss +32 -43
  251. package/src/styles/elements/_chips.scss +18 -22
  252. package/src/styles/elements/_config.scss +11 -26
  253. package/src/styles/elements/_datepicker.scss +17 -22
  254. package/src/styles/elements/_dialog.scss +0 -3
  255. package/src/styles/elements/_divider.scss +11 -13
  256. package/src/styles/elements/_drawer.scss +9 -14
  257. package/src/styles/elements/_extended-fab.scss +36 -40
  258. package/src/styles/elements/_fab-menu.scss +21 -25
  259. package/src/styles/elements/_fab.scss +17 -20
  260. package/src/styles/elements/_field.scss +93 -114
  261. package/src/styles/elements/_icon-button.scss +34 -38
  262. package/src/styles/elements/_index.scss +0 -4
  263. package/src/styles/elements/_list.scss +19 -26
  264. package/src/styles/elements/_loading-indicator.scss +6 -9
  265. package/src/styles/elements/_menu.scss +0 -3
  266. package/src/styles/elements/_navigation-bar.scss +5 -9
  267. package/src/styles/elements/_navigation-rail.scss +10 -15
  268. package/src/styles/elements/_progress.scss +15 -18
  269. package/src/styles/elements/_radios.scss +24 -49
  270. package/src/styles/elements/_search.scss +19 -24
  271. package/src/styles/elements/_select.scss +4 -9
  272. package/src/styles/elements/_side-sheet.scss +0 -3
  273. package/src/styles/elements/_slider.scss +15 -35
  274. package/src/styles/elements/_snackbar.scss +0 -3
  275. package/src/styles/elements/_split-button.scss +33 -39
  276. package/src/styles/elements/_switch.scss +50 -90
  277. package/src/styles/elements/_tabs.scss +9 -13
  278. package/src/styles/elements/_text-field.scss +150 -178
  279. package/src/styles/elements/_timepicker.scss +0 -3
  280. package/src/styles/elements/_toolbar.scss +30 -35
  281. package/src/styles/elements/_tooltip.scss +0 -3
  282. package/src/styles/elements/_top-app-bar.scss +38 -45
  283. package/src/styles/main.scss +0 -15
  284. package/src/styles/themes/_autumn.scss +258 -258
  285. package/src/styles/themes/_base-theme.scss +112 -134
  286. package/src/styles/themes/_baseline.scss +291 -314
  287. package/src/styles/themes/_brownbeige.scss +270 -250
  288. package/src/styles/themes/_content.scss +268 -248
  289. package/src/styles/themes/_desert.scss +270 -250
  290. package/src/styles/themes/_expressive.scss +270 -250
  291. package/src/styles/themes/_fidelity.scss +268 -248
  292. package/src/styles/themes/_forest.scss +260 -259
  293. package/src/styles/themes/_fruit-salad.scss +270 -250
  294. package/src/styles/themes/_highcontrast.scss +183 -172
  295. package/src/styles/themes/_index.scss +0 -1
  296. package/src/styles/themes/_monochrome.scss +254 -234
  297. package/src/styles/themes/_neutral.scss +270 -250
  298. package/src/styles/themes/_ocean.scss +260 -259
  299. package/src/styles/themes/_rainbow.scss +270 -250
  300. package/src/styles/themes/_sageivory.scss +270 -250
  301. package/src/styles/themes/_spring.scss +256 -255
  302. package/src/styles/themes/_summer.scss +270 -250
  303. package/src/styles/themes/_sunset.scss +260 -259
  304. package/src/styles/themes/_tealcaramel.scss +270 -250
  305. package/src/styles/themes/_vibrant.scss +270 -250
  306. package/src/styles/utilities/_colors.scss +44 -50
  307. package/src/styles/utilities/_flexbox.scss +48 -59
  308. package/src/styles/utilities/_layout.scss +516 -591
  309. package/src/styles/utilities/_ripple.scss +61 -70
  310. package/src/styles/utilities/_spacing.scss +120 -127
  311. package/src/styles/utilities/_typography.scss +45 -58
  312. package/src/styles/utilities/_visibility.scss +61 -76
  313. package/dist/package.json +0 -488
@@ -1,4 +1,3 @@
1
- // src/styles/components/_drawer.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;
@@ -7,687 +6,581 @@
7
6
 
8
7
  $component: "#{base.$prefix}-drawer";
9
8
 
10
- // Must match DRAWER_DEFAULTS.WIDTH in constants.ts
11
- // Only used as a CSS fallback if --#{base.$prefix}-drawer-width is not set by JS
12
9
  $default-width: 360px;
13
10
 
14
- // ==========================================================================
15
- // ROOT CONTAINER
16
- // ==========================================================================
17
11
 
18
12
  .#{$component} {
19
- display: flex;
20
- flex-direction: column;
21
- position: relative;
22
- height: 100%;
23
- z-index: 1200;
24
- pointer-events: none;
25
-
26
- // --open modifier enables interaction
27
- &--open {
28
- pointer-events: auto;
29
-
30
- // Motion follows Compose's ModalNavigationDrawer: the sheet opens on
31
- // the default spatial spring and closes on fast effects, and the scrim's
32
- // opacity rides with the sheet. Opacity past 1 is clamped, so the scrim
33
- // takes the spatial timing without overshooting.
34
- .#{$component}__sheet {
35
- transform: translateX(0);
36
- visibility: visible;
37
- transition: m.spring(transform, default-spatial);
38
- }
39
-
40
- .#{$component}__scrim {
41
- pointer-events: auto;
42
- }
43
-
44
- .#{$component}__scrim--visible {
45
- opacity: 1;
46
- transition: m.spring(opacity, default-spatial);
47
- }
48
- }
49
-
50
- // ========================================================================
51
- // POSITION VARIANTS
52
- // ========================================================================
53
-
54
- &--start {
55
- .#{$component}__sheet {
56
- left: 0;
57
- right: auto;
58
- border-top-right-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
59
- border-bottom-right-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
60
- border-top-left-radius: 0;
61
- border-bottom-left-radius: 0;
62
- transform: translateX(-100%);
63
- }
64
-
65
- @include m.rtl {
66
- .#{$component}__sheet {
67
- left: auto;
68
- right: 0;
69
- border-top-right-radius: 0;
70
- border-bottom-right-radius: 0;
71
- border-top-left-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
72
- border-bottom-left-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
73
- transform: translateX(100%);
74
- }
75
- }
76
-
77
- &.#{$component}--open {
78
- .#{$component}__sheet {
79
- transform: translateX(0);
80
- }
81
- }
82
- }
83
-
84
- &--end {
85
- .#{$component}__sheet {
86
- left: auto;
87
- right: 0;
88
- border-top-left-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
89
- border-bottom-left-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
90
- border-top-right-radius: 0;
91
- border-bottom-right-radius: 0;
92
- transform: translateX(100%);
93
- }
94
-
95
- @include m.rtl {
96
- .#{$component}__sheet {
97
- left: 0;
98
- right: auto;
99
- border-top-left-radius: 0;
100
- border-bottom-left-radius: 0;
101
- border-top-right-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
102
- border-bottom-right-radius: v.shape('large'); // NavigationDrawerTokens container-shape: corner-large-end
103
- transform: translateX(-100%);
104
- }
105
- }
106
-
107
- &.#{$component}--open {
108
- .#{$component}__sheet {
109
- transform: translateX(0);
110
- }
111
- }
112
- }
113
-
114
- // ========================================================================
115
- // VARIANT: STANDARD
116
- // ========================================================================
117
-
118
- &--standard {
119
- position: relative;
120
- z-index: auto;
121
- pointer-events: auto;
122
- flex-shrink: 0;
123
- overflow: hidden;
124
- // Closed: collapse to 0. --#{base.$prefix}-drawer-width is set inline by the JS component.
125
- width: 0;
126
- // Compose's DismissibleNavigationDrawer: open on the default spatial
127
- // spring, close on fast effects
128
- transition: m.spring(width, fast-effects);
129
-
130
- .#{$component}__sheet {
131
- position: relative;
132
- background-color: t.color("surface");
133
- @include m.elevation(0);
134
- // While the width overshoots, the sheet stretches with it rather
135
- // than leaving a strip between its edge and the page
136
- min-width: 100%;
137
- }
138
-
139
- // The growing width is the slide: the sheet hangs from the edge facing
140
- // the page, so it follows that edge without a transform of its own. A
141
- // transform on the same spring would carry the sheet off the screen
142
- // edge while it overshoots, where the root clips anything covering the gap.
143
- &.#{$component}--start .#{$component}__sheet {
144
- align-self: flex-end;
145
- }
146
-
147
- &.#{$component}--end .#{$component}__sheet {
148
- align-self: flex-start;
149
- }
150
-
151
- &.#{$component} .#{$component}__sheet,
152
- &.#{$component}--open .#{$component}__sheet {
153
- transform: none;
154
- }
155
-
156
- // Open — expand to the concrete width value via custom property
157
- &.#{$component}--open {
158
- width: var(--#{base.$prefix}-drawer-width, $default-width);
159
- transition: m.spring(width, default-spatial);
160
- }
161
-
162
- // Border on the end edge (standard variant visual separator)
163
- &.#{$component}--start {
164
- .#{$component}__sheet {
165
- border-right: 1px solid t.color("outline-variant");
166
- border-top-right-radius: 0;
167
- border-bottom-right-radius: 0;
168
- }
169
-
170
- @include m.rtl {
171
- .#{$component}__sheet {
172
- border-right: none;
173
- border-left: 1px solid t.color("outline-variant");
174
- border-top-left-radius: 0;
175
- border-bottom-left-radius: 0;
176
- }
177
- }
178
- }
179
-
180
- &.#{$component}--end {
181
- .#{$component}__sheet {
182
- border-left: 1px solid t.color("outline-variant");
183
- border-top-left-radius: 0;
184
- border-bottom-left-radius: 0;
185
- }
186
-
187
- @include m.rtl {
188
- .#{$component}__sheet {
189
- border-left: none;
190
- border-right: 1px solid t.color("outline-variant");
191
- border-top-right-radius: 0;
192
- border-bottom-right-radius: 0;
193
- }
194
- }
195
- }
196
- }
197
-
198
- // ========================================================================
199
- // VARIANT: MODAL
200
- // ========================================================================
201
-
202
- &--modal {
203
- position: fixed;
204
- top: 0;
205
- left: 0;
206
- right: 0;
207
- bottom: 0;
208
- z-index: 1200;
209
-
210
- .#{$component}__sheet {
211
- position: absolute;
212
- top: 0;
213
- bottom: 0;
214
- background-color: t.color("surface-container-low");
215
- @include m.elevation(1);
216
- }
217
-
218
- // Cover the gap the spring's overshoot opens at the docked edge
219
- &.#{$component}--start .#{$component}__sheet {
220
- box-shadow: f.get-elevation(1), (-1 * m.$sheet-overshoot-guard) 0 0 0 t.color("surface-container-low");
221
- }
222
-
223
- &.#{$component}--end .#{$component}__sheet {
224
- box-shadow: f.get-elevation(1), m.$sheet-overshoot-guard 0 0 0 t.color("surface-container-low");
225
- }
226
-
227
- @include m.rtl {
228
- &.#{$component}--start .#{$component}__sheet {
229
- box-shadow: f.get-elevation(1), m.$sheet-overshoot-guard 0 0 0 t.color("surface-container-low");
230
- }
231
-
232
- &.#{$component}--end .#{$component}__sheet {
233
- box-shadow: f.get-elevation(1), (-1 * m.$sheet-overshoot-guard) 0 0 0 t.color("surface-container-low");
234
- }
235
- }
236
- }
237
-
238
- // ========================================================================
239
- // SHEET (inner panel)
240
- // ========================================================================
241
-
242
- &__sheet {
243
- display: flex;
244
- flex-direction: column;
245
- width: var(--#{base.$prefix}-drawer-width, $default-width);
246
- max-width: calc(100vw - 56px);
247
- height: 100%;
248
- overflow-y: auto;
249
- overflow-x: hidden;
250
- box-sizing: border-box;
251
- padding: 12px 0;
252
- transition: m.spring(transform, fast-effects);
253
-
254
- // Smooth scrollbar
255
- scrollbar-width: thin;
256
- scrollbar-color: t.color("outline-variant") transparent;
257
- }
258
-
259
- // ========================================================================
260
- // SCRIM (modal overlay)
261
- // ========================================================================
262
-
263
- &__scrim {
264
- position: fixed;
265
- top: 0;
266
- left: 0;
267
- right: 0;
268
- bottom: 0;
269
- background-color: t.alpha("scrim", 0.32);
270
- opacity: 0;
271
- pointer-events: none;
272
- z-index: -1;
273
- transition: m.spring(opacity, fast-effects);
274
- }
275
-
276
- // ========================================================================
277
- // HEADLINE
278
- // ========================================================================
279
-
280
- &__headline {
281
- @include m.typography("title-small");
282
- color: t.color("on-surface-variant");
283
- padding: 16px 28px 0;
284
- margin-bottom: 4px;
285
- white-space: nowrap;
286
- overflow: hidden;
287
- text-overflow: ellipsis;
288
- }
289
-
290
- // ========================================================================
291
- // ITEMS CONTAINER
292
- // ========================================================================
293
-
294
- &__items {
295
- display: flex;
296
- flex-direction: column;
297
- flex: 1;
298
- padding: 0;
299
- margin: 0;
300
- }
301
-
302
- // ========================================================================
303
- // NAVIGATION ITEM
304
- // ========================================================================
305
-
306
- &__item {
307
- display: flex;
308
- align-items: center;
309
- position: relative;
310
- width: calc(100% - 24px);
311
- min-height: 56px;
312
- flex-shrink: 0;
313
- height: 56px;
314
- margin: 0 12px;
315
- padding: 0 24px 0 16px;
316
- gap: 12px;
317
- border: none;
318
- border-radius: v.shape('full'); // NavigationDrawerTokens active-indicator-shape
319
- background: none;
320
- cursor: pointer;
321
- color: t.color("on-surface-variant");
322
- text-decoration: none;
323
- box-sizing: border-box;
324
- outline: none;
325
- // Clip the indicator, the state layer and the ripple to the pill
326
- overflow: hidden;
327
- isolation: isolate;
328
- -webkit-tap-highlight-color: transparent;
329
- @include m.typography("label-large");
330
- transition: color v.motion("spring-default-effects-duration")
331
- v.motion("spring-default-effects-easing");
332
-
333
- // Active indicator: a secondary-container pill that scales in from
334
- // the middle of the item when it becomes active and scales back out
335
- // when it stops being active (m3.material.io navigation, Android
336
- // NavigationBarItemView.ActiveIndicatorTransform: scaleX from 0.4).
337
- // The scale takes the spatial spring and the opacity the effects
338
- // spring (Compose NavigationBarItem). Leaving the active state, the
339
- // fade is stretched over the shrink so the pill is seen shrinking
340
- // rather than vanishing; a transition takes the timing of the state
341
- // it moves to, so the base rule holds the outgoing timing.
342
- .#{$component}__active-indicator {
343
- position: absolute;
344
- inset: 0;
345
- border-radius: inherit;
346
- background-color: t.color("secondary-container");
347
- opacity: 0;
348
- transform: scaleX(0.32);
349
- transform-origin: center;
350
- pointer-events: none;
351
- z-index: 0;
352
- transition:
353
- transform v.motion("spring-default-spatial-duration")
354
- v.motion("spring-default-spatial-easing"),
355
- opacity v.motion("spring-default-spatial-duration")
356
- v.motion("spring-default-effects-easing");
357
- }
358
-
359
- // State layer for hover, focus and press, drawn above the indicator
360
- // in the item's current content colour
361
- &::before {
362
- content: "";
363
- position: absolute;
364
- inset: 0;
365
- border-radius: inherit;
366
- background-color: currentColor;
367
- opacity: 0;
368
- pointer-events: none;
369
- z-index: 1;
370
- transition: opacity v.motion("spring-default-effects-duration")
371
- v.motion("spring-default-effects-easing");
372
- }
373
-
374
- // Press ripple, between the indicator and the content
375
- .#{base.$prefix}-ripple {
376
- z-index: 1;
377
- }
378
-
379
- // ======================================================================
380
- // HOVER / FOCUS / PRESSED STATES
381
- // ======================================================================
382
-
383
- &:hover:not([disabled]) {
384
- color: t.color("on-surface");
385
-
386
- &::before {
387
- opacity: v.state("hover-state-layer-opacity");
388
- }
389
- }
390
-
391
- &:focus-visible {
392
- color: t.color("on-surface");
393
-
394
- &::before {
395
- opacity: v.state("focus-state-layer-opacity");
396
- }
397
- }
398
-
399
- &:active:not([disabled]) {
400
- color: t.color("on-surface");
401
-
402
- // A rippled item leaves the press to its ripple.
403
- &:not(:has(> .#{base.$prefix}-ripple))::before {
404
- opacity: v.state("pressed-state-layer-opacity");
405
- }
406
- }
407
-
408
- // ======================================================================
409
- // ACTIVE / SELECTED STATE
410
- // ======================================================================
411
-
412
- &--active,
413
- &--active:hover:not([disabled]),
414
- &--active:focus-visible,
415
- &--active:active:not([disabled]) {
416
- color: t.color("on-secondary-container");
417
- }
418
-
419
- &--active {
420
- .#{$component}__active-indicator {
421
- opacity: 1;
422
- transform: scaleX(1);
423
- transition:
424
- transform v.motion("spring-default-spatial-duration")
425
- v.motion("spring-default-spatial-easing"),
426
- opacity v.motion("spring-default-effects-duration")
427
- v.motion("spring-default-effects-easing");
428
- }
429
-
430
- .#{$component}__item-label {
431
- font-weight: 700;
432
- }
433
- }
434
-
435
- // ======================================================================
436
- // DISABLED STATE
437
- // ======================================================================
438
-
439
- &[disabled] {
440
- cursor: default;
441
- opacity: 0.38;
442
- pointer-events: none;
443
- }
444
- }
445
-
446
- // ========================================================================
447
- // ITEM ICON
448
- // ========================================================================
449
-
450
- &__item-icon {
451
- display: flex;
452
- align-items: center;
453
- justify-content: center;
454
- flex-shrink: 0;
455
- width: 24px;
456
- height: 24px;
457
- color: inherit;
458
- position: relative;
459
- z-index: 2;
460
-
461
- svg {
462
- width: 24px;
463
- height: 24px;
464
- fill: currentColor;
465
- }
466
- }
467
-
468
- // ========================================================================
469
- // ITEM LABEL
470
- // ========================================================================
471
-
472
- &__item-label {
473
- flex: 1;
474
- text-align: left;
475
- white-space: nowrap;
476
- overflow: hidden;
477
- text-overflow: ellipsis;
478
- position: relative;
479
- z-index: 2;
480
- color: inherit;
481
-
482
- @include m.rtl {
483
- text-align: right;
484
- }
485
- }
486
-
487
- // ========================================================================
488
- // ITEM BADGE
489
- // ========================================================================
490
-
491
- &__item-badge {
492
- @include m.typography("label-large");
493
- color: t.color("on-surface-variant");
494
- margin-left: auto;
495
- position: relative;
496
- z-index: 2;
497
- flex-shrink: 0;
498
-
499
- @include m.rtl {
500
- margin-left: 0;
501
- margin-right: auto;
502
- }
503
- }
504
-
505
- // ========================================================================
506
- // DIVIDER
507
- // ========================================================================
508
-
509
- &__divider {
510
- width: calc(100% - 56px);
511
- height: 1px;
512
- margin: 8px 28px;
513
- border: none;
514
- background-color: t.color("outline-variant");
515
- }
516
-
517
- // ========================================================================
518
- // SECTION LABEL
519
- // ========================================================================
520
-
521
- &__section-label {
522
- @include m.typography("title-small");
523
- color: t.color("on-surface-variant");
524
- padding: 18px 28px 4px;
525
- white-space: nowrap;
526
- overflow: hidden;
527
- text-overflow: ellipsis;
528
- }
529
-
530
- // ========================================================================
531
- // DENSE VARIANT — compact items for admin UIs
532
- // ========================================================================
533
-
534
- &--dense {
535
- .#{$component}__sheet {
536
- padding: 8px 0;
537
- }
538
-
539
- .#{$component}__headline {
540
- @include m.typography("label-large");
541
- padding: 10px 20px 0;
542
- margin-bottom: 2px;
543
- }
544
-
545
- .#{$component}__item {
546
- min-height: 36px;
547
- height: 36px;
548
- margin: 0 8px;
549
- padding: 0 16px 0 12px;
550
- width: calc(100% - 16px);
551
- gap: 8px;
552
- border-radius: v.shape('full');
553
- @include m.typography("body-medium");
554
-
555
- .#{$component}__active-indicator {
556
- border-radius: v.shape('full');
557
- }
558
- }
559
-
560
- .#{$component}__item-icon {
561
- width: 20px;
562
- height: 20px;
563
-
564
- svg {
565
- width: 20px;
566
- height: 20px;
567
- }
568
- }
569
-
570
- .#{$component}__item-badge {
571
- @include m.typography("label-medium");
572
- }
573
-
574
- .#{$component}__divider {
575
- width: calc(100% - 40px);
576
- margin: 4px 20px;
577
- }
578
-
579
- .#{$component}__section-label {
580
- @include m.typography("label-large");
581
- padding: 10px 20px 2px;
582
- }
583
- }
584
-
585
- // ========================================================================
586
- // RTL — item padding direction
587
- // ========================================================================
588
-
589
- @include m.rtl-selector('.#{$component}__item') {
590
- padding: 0 16px 0 24px;
591
- }
592
-
593
- @include m.rtl-selector('.#{$component}--dense .#{$component}__item') {
594
- padding: 0 12px 0 16px;
595
- }
596
-
597
- // ========================================================================
598
- // REDUCED MOTION
599
- // ========================================================================
600
-
601
- @include m.reduced-motion {
602
- &--standard,
603
- &--standard.#{$component}--open {
604
- transition: none;
605
- }
606
-
607
- &__sheet,
608
- &--open .#{$component}__sheet {
609
- transition: none;
610
- }
611
-
612
- &__scrim,
613
- &--open .#{$component}__scrim--visible {
614
- transition: none;
615
- }
616
-
617
- &__item,
618
- &__item::before,
619
- &__active-indicator {
620
- transition: none;
621
- }
622
- }
623
-
624
- // ========================================================================
625
- // HIGH CONTRAST (forced-colors)
626
- // ========================================================================
627
-
628
- @include m.high-contrast {
629
- &__sheet {
630
- border: 1px solid currentColor;
631
- }
632
-
633
- &__item {
634
- &--active {
635
- .#{$component}__active-indicator {
636
- outline: 2px solid currentColor;
637
- outline-offset: -2px;
638
- }
639
- }
640
-
641
- &:focus-visible {
642
- outline: 2px solid currentColor;
643
- outline-offset: -2px;
644
- }
645
- }
646
-
647
- &__divider {
648
- background-color: currentColor;
649
- }
650
- }
651
- }
652
-
653
- // ==========================================================================
654
- // layer: "top": a modal drawer's root is a <dialog> the browser shows in the
655
- // top layer with showModal(). It stays the fixed layer over the page it is
656
- // without it, so this undoes the user agent's dialog box, and the scrim is its
657
- // ::backdrop, faded as the scrim was. `overlay` changes at the end of the
658
- // transition (allow-discrete), so the sheet slides out in the top layer.
659
- // ==========================================================================
13
+ display: flex;
14
+ flex-direction: column;
15
+ position: relative;
16
+ height: 100%;
17
+ z-index: 1200;
18
+ pointer-events: none;
19
+
20
+ &--open {
21
+ pointer-events: auto;
22
+
23
+ .#{$component}__sheet {
24
+ transform: translateX(0);
25
+ visibility: visible;
26
+ transition: m.spring(transform, default-spatial);
27
+ }
28
+
29
+ .#{$component}__scrim {
30
+ pointer-events: auto;
31
+ }
32
+
33
+ .#{$component}__scrim--visible {
34
+ opacity: 1;
35
+ transition: m.spring(opacity, default-spatial);
36
+ }
37
+ }
38
+
39
+
40
+ &--start {
41
+ .#{$component}__sheet {
42
+ left: 0;
43
+ right: auto;
44
+ border-top-right-radius: v.shape('large');
45
+ border-bottom-right-radius: v.shape('large');
46
+ border-top-left-radius: 0;
47
+ border-bottom-left-radius: 0;
48
+ transform: translateX(-100%);
49
+ }
50
+
51
+ @include m.rtl {
52
+ .#{$component}__sheet {
53
+ left: auto;
54
+ right: 0;
55
+ border-top-right-radius: 0;
56
+ border-bottom-right-radius: 0;
57
+ border-top-left-radius: v.shape('large');
58
+ border-bottom-left-radius: v.shape('large');
59
+ transform: translateX(100%);
60
+ }
61
+ }
62
+
63
+ &.#{$component}--open {
64
+ .#{$component}__sheet {
65
+ transform: translateX(0);
66
+ }
67
+ }
68
+ }
69
+
70
+ &--end {
71
+ .#{$component}__sheet {
72
+ left: auto;
73
+ right: 0;
74
+ border-top-left-radius: v.shape('large');
75
+ border-bottom-left-radius: v.shape('large');
76
+ border-top-right-radius: 0;
77
+ border-bottom-right-radius: 0;
78
+ transform: translateX(100%);
79
+ }
80
+
81
+ @include m.rtl {
82
+ .#{$component}__sheet {
83
+ left: 0;
84
+ right: auto;
85
+ border-top-left-radius: 0;
86
+ border-bottom-left-radius: 0;
87
+ border-top-right-radius: v.shape('large');
88
+ border-bottom-right-radius: v.shape('large');
89
+ transform: translateX(-100%);
90
+ }
91
+ }
92
+
93
+ &.#{$component}--open {
94
+ .#{$component}__sheet {
95
+ transform: translateX(0);
96
+ }
97
+ }
98
+ }
99
+
100
+
101
+ &--standard {
102
+ position: relative;
103
+ z-index: auto;
104
+ pointer-events: auto;
105
+ flex-shrink: 0;
106
+ overflow: hidden;
107
+ width: 0;
108
+ transition: m.spring(width, fast-effects);
109
+
110
+ .#{$component}__sheet {
111
+ position: relative;
112
+ background-color: t.color("surface");
113
+ @include m.elevation(0);
114
+ min-width: 100%;
115
+ }
116
+
117
+ &.#{$component}--start .#{$component}__sheet {
118
+ align-self: flex-end;
119
+ }
120
+
121
+ &.#{$component}--end .#{$component}__sheet {
122
+ align-self: flex-start;
123
+ }
124
+
125
+ &.#{$component} .#{$component}__sheet,
126
+ &.#{$component}--open .#{$component}__sheet {
127
+ transform: none;
128
+ }
129
+
130
+ &.#{$component}--open {
131
+ width: var(--#{base.$prefix}-drawer-width, $default-width);
132
+ transition: m.spring(width, default-spatial);
133
+ }
134
+
135
+ &.#{$component}--start {
136
+ .#{$component}__sheet {
137
+ border-right: 1px solid t.color("outline-variant");
138
+ border-top-right-radius: 0;
139
+ border-bottom-right-radius: 0;
140
+ }
141
+
142
+ @include m.rtl {
143
+ .#{$component}__sheet {
144
+ border-right: none;
145
+ border-left: 1px solid t.color("outline-variant");
146
+ border-top-left-radius: 0;
147
+ border-bottom-left-radius: 0;
148
+ }
149
+ }
150
+ }
151
+
152
+ &.#{$component}--end {
153
+ .#{$component}__sheet {
154
+ border-left: 1px solid t.color("outline-variant");
155
+ border-top-left-radius: 0;
156
+ border-bottom-left-radius: 0;
157
+ }
158
+
159
+ @include m.rtl {
160
+ .#{$component}__sheet {
161
+ border-left: none;
162
+ border-right: 1px solid t.color("outline-variant");
163
+ border-top-right-radius: 0;
164
+ border-bottom-right-radius: 0;
165
+ }
166
+ }
167
+ }
168
+ }
169
+
170
+
171
+ &--modal {
172
+ position: fixed;
173
+ top: 0;
174
+ left: 0;
175
+ right: 0;
176
+ bottom: 0;
177
+ z-index: 1200;
178
+
179
+ .#{$component}__sheet {
180
+ position: absolute;
181
+ top: 0;
182
+ bottom: 0;
183
+ background-color: t.color("surface-container-low");
184
+ @include m.elevation(1);
185
+ }
186
+
187
+ &.#{$component}--start .#{$component}__sheet {
188
+ box-shadow: f.get-elevation(1), (-1 * m.$sheet-overshoot-guard) 0 0 0 t.color("surface-container-low");
189
+ }
190
+
191
+ &.#{$component}--end .#{$component}__sheet {
192
+ box-shadow: f.get-elevation(1), m.$sheet-overshoot-guard 0 0 0 t.color("surface-container-low");
193
+ }
194
+
195
+ @include m.rtl {
196
+ &.#{$component}--start .#{$component}__sheet {
197
+ box-shadow: f.get-elevation(1), m.$sheet-overshoot-guard 0 0 0 t.color("surface-container-low");
198
+ }
199
+
200
+ &.#{$component}--end .#{$component}__sheet {
201
+ box-shadow: f.get-elevation(1), (-1 * m.$sheet-overshoot-guard) 0 0 0 t.color("surface-container-low");
202
+ }
203
+ }
204
+ }
205
+
206
+
207
+ &__sheet {
208
+ display: flex;
209
+ flex-direction: column;
210
+ width: var(--#{base.$prefix}-drawer-width, $default-width);
211
+ max-width: calc(100vw - 56px);
212
+ height: 100%;
213
+ overflow-y: auto;
214
+ overflow-x: hidden;
215
+ box-sizing: border-box;
216
+ padding: 12px 0;
217
+ transition: m.spring(transform, fast-effects);
218
+
219
+ scrollbar-width: thin;
220
+ scrollbar-color: t.color("outline-variant") transparent;
221
+ }
222
+
223
+
224
+ &__scrim {
225
+ position: fixed;
226
+ top: 0;
227
+ left: 0;
228
+ right: 0;
229
+ bottom: 0;
230
+ background-color: t.alpha("scrim", 0.32);
231
+ opacity: 0;
232
+ pointer-events: none;
233
+ z-index: -1;
234
+ transition: m.spring(opacity, fast-effects);
235
+ }
236
+
237
+
238
+ &__headline {
239
+ @include m.typography("title-small");
240
+ color: t.color("on-surface-variant");
241
+ padding: 16px 28px 0;
242
+ margin-bottom: 4px;
243
+ white-space: nowrap;
244
+ overflow: hidden;
245
+ text-overflow: ellipsis;
246
+ }
247
+
248
+
249
+ &__items {
250
+ display: flex;
251
+ flex-direction: column;
252
+ flex: 1;
253
+ padding: 0;
254
+ margin: 0;
255
+ }
256
+
257
+
258
+ &__item {
259
+ display: flex;
260
+ align-items: center;
261
+ position: relative;
262
+ width: calc(100% - 24px);
263
+ min-height: 56px;
264
+ flex-shrink: 0;
265
+ height: 56px;
266
+ margin: 0 12px;
267
+ padding: 0 24px 0 16px;
268
+ gap: 12px;
269
+ border: none;
270
+ border-radius: v.shape('full');
271
+ background: none;
272
+ cursor: pointer;
273
+ color: t.color("on-surface-variant");
274
+ text-decoration: none;
275
+ box-sizing: border-box;
276
+ outline: none;
277
+ overflow: hidden;
278
+ isolation: isolate;
279
+ -webkit-tap-highlight-color: transparent;
280
+ @include m.typography("label-large");
281
+ transition: color v.motion("spring-default-effects-duration")
282
+ v.motion("spring-default-effects-easing");
283
+
284
+ .#{$component}__active-indicator {
285
+ position: absolute;
286
+ inset: 0;
287
+ border-radius: inherit;
288
+ background-color: t.color("secondary-container");
289
+ opacity: 0;
290
+ transform: scaleX(0.32);
291
+ transform-origin: center;
292
+ pointer-events: none;
293
+ z-index: 0;
294
+ transition:
295
+ transform v.motion("spring-default-spatial-duration")
296
+ v.motion("spring-default-spatial-easing"),
297
+ opacity v.motion("spring-default-spatial-duration")
298
+ v.motion("spring-default-effects-easing");
299
+ }
300
+
301
+ &::before {
302
+ content: "";
303
+ position: absolute;
304
+ inset: 0;
305
+ border-radius: inherit;
306
+ background-color: currentColor;
307
+ opacity: 0;
308
+ pointer-events: none;
309
+ z-index: 1;
310
+ transition: opacity v.motion("spring-default-effects-duration")
311
+ v.motion("spring-default-effects-easing");
312
+ }
313
+
314
+ .#{base.$prefix}-ripple {
315
+ z-index: 1;
316
+ }
317
+
318
+
319
+ &:hover:not([disabled]) {
320
+ color: t.color("on-surface");
321
+
322
+ &::before {
323
+ opacity: v.state("hover-state-layer-opacity");
324
+ }
325
+ }
326
+
327
+ &:focus-visible {
328
+ color: t.color("on-surface");
329
+
330
+ &::before {
331
+ opacity: v.state("focus-state-layer-opacity");
332
+ }
333
+ }
334
+
335
+ &:active:not([disabled]) {
336
+ color: t.color("on-surface");
337
+
338
+ &:not(:has(> .#{base.$prefix}-ripple))::before {
339
+ opacity: v.state("pressed-state-layer-opacity");
340
+ }
341
+ }
342
+
343
+
344
+ &--active,
345
+ &--active:hover:not([disabled]),
346
+ &--active:focus-visible,
347
+ &--active:active:not([disabled]) {
348
+ color: t.color("on-secondary-container");
349
+ }
350
+
351
+ &--active {
352
+ .#{$component}__active-indicator {
353
+ opacity: 1;
354
+ transform: scaleX(1);
355
+ transition:
356
+ transform v.motion("spring-default-spatial-duration")
357
+ v.motion("spring-default-spatial-easing"),
358
+ opacity v.motion("spring-default-effects-duration")
359
+ v.motion("spring-default-effects-easing");
360
+ }
361
+
362
+ .#{$component}__item-label {
363
+ font-weight: 700;
364
+ }
365
+ }
366
+
367
+
368
+ &[disabled] {
369
+ cursor: default;
370
+ opacity: 0.38;
371
+ pointer-events: none;
372
+ }
373
+ }
374
+
375
+
376
+ &__item-icon {
377
+ display: flex;
378
+ align-items: center;
379
+ justify-content: center;
380
+ flex-shrink: 0;
381
+ width: 24px;
382
+ height: 24px;
383
+ color: inherit;
384
+ position: relative;
385
+ z-index: 2;
386
+
387
+ svg {
388
+ width: 24px;
389
+ height: 24px;
390
+ fill: currentColor;
391
+ }
392
+ }
393
+
394
+
395
+ &__item-label {
396
+ flex: 1;
397
+ text-align: left;
398
+ white-space: nowrap;
399
+ overflow: hidden;
400
+ text-overflow: ellipsis;
401
+ position: relative;
402
+ z-index: 2;
403
+ color: inherit;
404
+
405
+ @include m.rtl {
406
+ text-align: right;
407
+ }
408
+ }
409
+
410
+
411
+ &__item-badge {
412
+ @include m.typography("label-large");
413
+ color: t.color("on-surface-variant");
414
+ margin-left: auto;
415
+ position: relative;
416
+ z-index: 2;
417
+ flex-shrink: 0;
418
+
419
+ @include m.rtl {
420
+ margin-left: 0;
421
+ margin-right: auto;
422
+ }
423
+ }
424
+
425
+
426
+ &__divider {
427
+ width: calc(100% - 56px);
428
+ height: 1px;
429
+ margin: 8px 28px;
430
+ border: none;
431
+ background-color: t.color("outline-variant");
432
+ }
433
+
434
+
435
+ &__section-label {
436
+ @include m.typography("title-small");
437
+ color: t.color("on-surface-variant");
438
+ padding: 18px 28px 4px;
439
+ white-space: nowrap;
440
+ overflow: hidden;
441
+ text-overflow: ellipsis;
442
+ }
443
+
444
+
445
+ &--dense {
446
+ .#{$component}__sheet {
447
+ padding: 8px 0;
448
+ }
449
+
450
+ .#{$component}__headline {
451
+ @include m.typography("label-large");
452
+ padding: 10px 20px 0;
453
+ margin-bottom: 2px;
454
+ }
455
+
456
+ .#{$component}__item {
457
+ min-height: 36px;
458
+ height: 36px;
459
+ margin: 0 8px;
460
+ padding: 0 16px 0 12px;
461
+ width: calc(100% - 16px);
462
+ gap: 8px;
463
+ border-radius: v.shape('full');
464
+ @include m.typography("body-medium");
465
+
466
+ .#{$component}__active-indicator {
467
+ border-radius: v.shape('full');
468
+ }
469
+ }
470
+
471
+ .#{$component}__item-icon {
472
+ width: 20px;
473
+ height: 20px;
474
+
475
+ svg {
476
+ width: 20px;
477
+ height: 20px;
478
+ }
479
+ }
480
+
481
+ .#{$component}__item-badge {
482
+ @include m.typography("label-medium");
483
+ }
484
+
485
+ .#{$component}__divider {
486
+ width: calc(100% - 40px);
487
+ margin: 4px 20px;
488
+ }
489
+
490
+ .#{$component}__section-label {
491
+ @include m.typography("label-large");
492
+ padding: 10px 20px 2px;
493
+ }
494
+ }
495
+
496
+
497
+ @include m.rtl-selector('.#{$component}__item') {
498
+ padding: 0 16px 0 24px;
499
+ }
500
+
501
+ @include m.rtl-selector('.#{$component}--dense .#{$component}__item') {
502
+ padding: 0 12px 0 16px;
503
+ }
504
+
505
+
506
+ @include m.reduced-motion {
507
+ &--standard,
508
+ &--standard.#{$component}--open {
509
+ transition: none;
510
+ }
511
+
512
+ &__sheet,
513
+ &--open .#{$component}__sheet {
514
+ transition: none;
515
+ }
516
+
517
+ &__scrim,
518
+ &--open .#{$component}__scrim--visible {
519
+ transition: none;
520
+ }
521
+
522
+ &__item,
523
+ &__item::before,
524
+ &__active-indicator {
525
+ transition: none;
526
+ }
527
+ }
528
+
529
+
530
+ @include m.high-contrast {
531
+ &__sheet {
532
+ border: 1px solid currentColor;
533
+ }
534
+
535
+ &__item {
536
+ &--active {
537
+ .#{$component}__active-indicator {
538
+ outline: 2px solid currentColor;
539
+ outline-offset: -2px;
540
+ }
541
+ }
542
+
543
+ &:focus-visible {
544
+ outline: 2px solid currentColor;
545
+ outline-offset: -2px;
546
+ }
547
+ }
548
+
549
+ &__divider {
550
+ background-color: currentColor;
551
+ }
552
+ }
553
+ }
554
+
660
555
 
661
556
  dialog.#{$component} {
662
- width: auto;
663
- height: auto;
664
- max-width: none;
665
- max-height: none;
666
- margin: 0;
667
- padding: 0;
668
- border: 0;
669
- overflow: visible;
670
- background: transparent;
671
- color: inherit;
672
- transition: overlay m.spring-duration(fast-effects) allow-discrete;
673
-
674
- &::backdrop {
675
- background-color: t.alpha("scrim", 0.32);
676
- opacity: 0;
677
- transition: m.spring(opacity, fast-effects);
678
- }
679
-
680
- // Opacity past 1 is clamped, so the backdrop takes the sheet's timing
681
- // without overshooting
682
- &.#{$component}--open::backdrop {
683
- opacity: 1;
684
- transition: m.spring(opacity, default-spatial);
685
- }
686
-
687
- @include m.reduced-motion {
688
- &,
689
- &::backdrop {
690
- transition: none;
691
- }
692
- }
557
+ width: auto;
558
+ height: auto;
559
+ max-width: none;
560
+ max-height: none;
561
+ margin: 0;
562
+ padding: 0;
563
+ border: 0;
564
+ overflow: visible;
565
+ background: transparent;
566
+ color: inherit;
567
+ transition: overlay m.spring-duration(fast-effects) allow-discrete;
568
+
569
+ &::backdrop {
570
+ background-color: t.alpha("scrim", 0.32);
571
+ opacity: 0;
572
+ transition: m.spring(opacity, fast-effects);
573
+ }
574
+
575
+ &.#{$component}--open::backdrop {
576
+ opacity: 1;
577
+ transition: m.spring(opacity, default-spatial);
578
+ }
579
+
580
+ @include m.reduced-motion {
581
+ &,
582
+ &::backdrop {
583
+ transition: none;
584
+ }
585
+ }
693
586
  }