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.
Files changed (276) hide show
  1. package/README.md +2 -2
  2. package/dist/components/slider/features/controller.js +24 -8
  3. package/dist/elements/css/bottom-app-bar.css +1 -1
  4. package/dist/elements/css/bottom-app-bar.js +1 -1
  5. package/dist/elements/css/card.css +1 -1
  6. package/dist/elements/css/card.js +1 -1
  7. package/dist/elements/css/checkbox.css +1 -1
  8. package/dist/elements/css/checkbox.js +1 -1
  9. package/dist/elements/css/datepicker.css +1 -1
  10. package/dist/elements/css/datepicker.js +1 -1
  11. package/dist/elements/css/dialog.css +1 -1
  12. package/dist/elements/css/dialog.js +1 -1
  13. package/dist/elements/css/menu.css +1 -1
  14. package/dist/elements/css/menu.js +1 -1
  15. package/dist/elements/css/radios.css +1 -1
  16. package/dist/elements/css/radios.js +1 -1
  17. package/dist/elements/css/select.css +1 -1
  18. package/dist/elements/css/select.js +1 -1
  19. package/dist/elements/css/slider.css +1 -1
  20. package/dist/elements/css/slider.js +1 -1
  21. package/dist/elements/css/tabs.css +1 -1
  22. package/dist/elements/css/tabs.js +1 -1
  23. package/dist/elements/css/text-field.css +1 -1
  24. package/dist/elements/css/text-field.js +1 -1
  25. package/dist/elements/css/timepicker.css +1 -1
  26. package/dist/elements/css/timepicker.js +1 -1
  27. package/dist/elements/css/top-app-bar.css +1 -1
  28. package/dist/elements/css/top-app-bar.js +1 -1
  29. package/dist/elements/preupgrade/badge.css +1 -1
  30. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  31. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  32. package/dist/elements/preupgrade/button-group.css +1 -1
  33. package/dist/elements/preupgrade/button.css +1 -1
  34. package/dist/elements/preupgrade/card.css +1 -1
  35. package/dist/elements/preupgrade/carousel.css +1 -1
  36. package/dist/elements/preupgrade/checkbox.css +1 -1
  37. package/dist/elements/preupgrade/chips.css +1 -1
  38. package/dist/elements/preupgrade/datepicker.css +1 -1
  39. package/dist/elements/preupgrade/dialog.css +1 -1
  40. package/dist/elements/preupgrade/divider.css +1 -1
  41. package/dist/elements/preupgrade/drawer.css +1 -1
  42. package/dist/elements/preupgrade/extended-fab.css +1 -1
  43. package/dist/elements/preupgrade/fab-menu.css +1 -1
  44. package/dist/elements/preupgrade/fab.css +1 -1
  45. package/dist/elements/preupgrade/icon-button.css +1 -1
  46. package/dist/elements/preupgrade/list.css +1 -1
  47. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  48. package/dist/elements/preupgrade/menu.css +1 -1
  49. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  50. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  51. package/dist/elements/preupgrade/progress.css +1 -1
  52. package/dist/elements/preupgrade/radios.css +1 -1
  53. package/dist/elements/preupgrade/search.css +1 -1
  54. package/dist/elements/preupgrade/select.css +1 -1
  55. package/dist/elements/preupgrade/side-sheet.css +1 -1
  56. package/dist/elements/preupgrade/slider.css +1 -1
  57. package/dist/elements/preupgrade/snackbar.css +1 -1
  58. package/dist/elements/preupgrade/split-button.css +1 -1
  59. package/dist/elements/preupgrade/switch.css +1 -1
  60. package/dist/elements/preupgrade/tabs.css +1 -1
  61. package/dist/elements/preupgrade/text-field.css +1 -1
  62. package/dist/elements/preupgrade/timepicker.css +1 -1
  63. package/dist/elements/preupgrade/toolbar.css +1 -1
  64. package/dist/elements/preupgrade/tooltip.css +1 -1
  65. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  66. package/dist/elements/preupgrade.css +1 -1
  67. package/dist/styles/badge.css +1 -1
  68. package/dist/styles/base-lite.css +1 -1
  69. package/dist/styles/base.css +1 -1
  70. package/dist/styles/bottom-app-bar.css +2 -2
  71. package/dist/styles/bottom-sheet.css +1 -1
  72. package/dist/styles/button-group.css +1 -1
  73. package/dist/styles/button.css +1 -1
  74. package/dist/styles/card.css +2 -2
  75. package/dist/styles/carousel.css +1 -1
  76. package/dist/styles/checkbox.css +2 -2
  77. package/dist/styles/chips.css +1 -1
  78. package/dist/styles/contrast.css +1 -1
  79. package/dist/styles/datepicker.css +2 -2
  80. package/dist/styles/dialog.css +2 -2
  81. package/dist/styles/divider.css +1 -1
  82. package/dist/styles/drawer.css +1 -1
  83. package/dist/styles/extended-fab.css +1 -1
  84. package/dist/styles/fab-menu.css +1 -1
  85. package/dist/styles/fab.css +1 -1
  86. package/dist/styles/icon-button.css +1 -1
  87. package/dist/styles/list.css +1 -1
  88. package/dist/styles/loading-indicator.css +1 -1
  89. package/dist/styles/menu.css +2 -2
  90. package/dist/styles/navigation-bar.css +1 -1
  91. package/dist/styles/navigation-rail.css +1 -1
  92. package/dist/styles/progress.css +1 -1
  93. package/dist/styles/radios.css +2 -2
  94. package/dist/styles/search.css +1 -1
  95. package/dist/styles/select.css +2 -2
  96. package/dist/styles/side-sheet.css +1 -1
  97. package/dist/styles/slider.css +2 -2
  98. package/dist/styles/snackbar.css +1 -1
  99. package/dist/styles/split-button.css +1 -1
  100. package/dist/styles/switch.css +1 -1
  101. package/dist/styles/tabs.css +2 -2
  102. package/dist/styles/text-field.css +2 -2
  103. package/dist/styles/timepicker.css +2 -2
  104. package/dist/styles/toolbar.css +1 -1
  105. package/dist/styles/tooltip.css +1 -1
  106. package/dist/styles/top-app-bar.css +2 -2
  107. package/dist/styles/typography.css +1 -1
  108. package/dist/styles/utilities.css +1 -1
  109. package/dist/styles.css +2 -2
  110. package/dist/themes/autumn-contrast.css +1 -1
  111. package/dist/themes/autumn.css +1 -1
  112. package/dist/themes/baseline-contrast.css +1 -1
  113. package/dist/themes/baseline.css +1 -1
  114. package/dist/themes/brownbeige-contrast.css +1 -1
  115. package/dist/themes/brownbeige.css +1 -1
  116. package/dist/themes/content-contrast.css +1 -1
  117. package/dist/themes/content.css +1 -1
  118. package/dist/themes/desert-contrast.css +1 -1
  119. package/dist/themes/desert.css +1 -1
  120. package/dist/themes/expressive-contrast.css +1 -1
  121. package/dist/themes/expressive.css +1 -1
  122. package/dist/themes/fidelity-contrast.css +1 -1
  123. package/dist/themes/fidelity.css +1 -1
  124. package/dist/themes/forest-contrast.css +1 -1
  125. package/dist/themes/forest.css +1 -1
  126. package/dist/themes/fruit-salad-contrast.css +1 -1
  127. package/dist/themes/fruit-salad.css +1 -1
  128. package/dist/themes/highcontrast-contrast.css +1 -1
  129. package/dist/themes/highcontrast.css +1 -1
  130. package/dist/themes/monochrome-contrast.css +1 -1
  131. package/dist/themes/monochrome.css +1 -1
  132. package/dist/themes/neutral-contrast.css +1 -1
  133. package/dist/themes/neutral.css +1 -1
  134. package/dist/themes/ocean-contrast.css +1 -1
  135. package/dist/themes/ocean.css +1 -1
  136. package/dist/themes/rainbow-contrast.css +1 -1
  137. package/dist/themes/rainbow.css +1 -1
  138. package/dist/themes/sageivory-contrast.css +1 -1
  139. package/dist/themes/sageivory.css +1 -1
  140. package/dist/themes/spring-contrast.css +1 -1
  141. package/dist/themes/spring.css +1 -1
  142. package/dist/themes/summer-contrast.css +1 -1
  143. package/dist/themes/summer.css +1 -1
  144. package/dist/themes/sunset-contrast.css +1 -1
  145. package/dist/themes/sunset.css +1 -1
  146. package/dist/themes/tealcaramel-contrast.css +1 -1
  147. package/dist/themes/tealcaramel.css +1 -1
  148. package/dist/themes/vibrant-contrast.css +1 -1
  149. package/dist/themes/vibrant.css +1 -1
  150. package/package.json +2 -1
  151. package/src/styles/abstract/_base.scss +0 -1
  152. package/src/styles/abstract/_direction.scss +121 -152
  153. package/src/styles/abstract/_emit.scss +7 -16
  154. package/src/styles/abstract/_floating-placement.scss +9 -10
  155. package/src/styles/abstract/_functions.scss +64 -79
  156. package/src/styles/abstract/_mixins.scss +355 -459
  157. package/src/styles/abstract/_theme.scss +122 -136
  158. package/src/styles/abstract/_variables.scss +320 -390
  159. package/src/styles/abstract/chips/_assist.scss +2 -3
  160. package/src/styles/abstract/chips/_filter.scss +2 -3
  161. package/src/styles/abstract/chips/_input.scss +2 -3
  162. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  163. package/src/styles/base/_body-theme.scss +10 -15
  164. package/src/styles/base/_document.scss +10 -33
  165. package/src/styles/base/_reset.scss +20 -40
  166. package/src/styles/base/_tokens.scss +6 -21
  167. package/src/styles/base/_typescale-tokens.scss +12 -16
  168. package/src/styles/base/_typography.scss +28 -37
  169. package/src/styles/components/_badge.scss +171 -193
  170. package/src/styles/components/_bottom-app-bar.scss +72 -88
  171. package/src/styles/components/_bottom-sheet.scss +188 -232
  172. package/src/styles/components/_button-group.scss +140 -189
  173. package/src/styles/components/_button.scss +382 -478
  174. package/src/styles/components/_card.scss +349 -473
  175. package/src/styles/components/_carousel.scss +134 -156
  176. package/src/styles/components/_checkbox.scss +208 -247
  177. package/src/styles/components/_chips.scss +239 -304
  178. package/src/styles/components/_datepicker.scss +172 -220
  179. package/src/styles/components/_dialog.scss +428 -553
  180. package/src/styles/components/_divider.scss +37 -46
  181. package/src/styles/components/_drawer.scss +571 -678
  182. package/src/styles/components/_extended-fab.scss +263 -294
  183. package/src/styles/components/_fab-menu.scss +225 -267
  184. package/src/styles/components/_fab.scss +197 -218
  185. package/src/styles/components/_icon-button.scss +483 -588
  186. package/src/styles/components/_list.scss +115 -144
  187. package/src/styles/components/_loading-indicator.scss +23 -29
  188. package/src/styles/components/_menu.scss +543 -699
  189. package/src/styles/components/_navigation-bar.scss +189 -234
  190. package/src/styles/components/_navigation-rail.scss +256 -312
  191. package/src/styles/components/_progress.scss +60 -85
  192. package/src/styles/components/_radios.scss +170 -205
  193. package/src/styles/components/_search.scss +369 -455
  194. package/src/styles/components/_select.scss +78 -185
  195. package/src/styles/components/_side-sheet.scss +234 -292
  196. package/src/styles/components/_slider.scss +289 -367
  197. package/src/styles/components/_snackbar.scss +149 -198
  198. package/src/styles/components/_split-button.scss +139 -228
  199. package/src/styles/components/_switch.scss +282 -349
  200. package/src/styles/components/_tabs.scss +350 -547
  201. package/src/styles/components/_text-field.scss +788 -978
  202. package/src/styles/components/_timepicker.scss +435 -506
  203. package/src/styles/components/_toolbar.scss +178 -242
  204. package/src/styles/components/_tooltip.scss +152 -197
  205. package/src/styles/components/_top-app-bar.scss +206 -224
  206. package/src/styles/elements/_badge.scss +42 -61
  207. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  208. package/src/styles/elements/_bottom-sheet.scss +0 -3
  209. package/src/styles/elements/_button-group.scss +80 -80
  210. package/src/styles/elements/_button.scss +72 -88
  211. package/src/styles/elements/_card.scss +48 -57
  212. package/src/styles/elements/_carousel.scss +2 -5
  213. package/src/styles/elements/_checkbox.scss +32 -43
  214. package/src/styles/elements/_chips.scss +18 -22
  215. package/src/styles/elements/_config.scss +11 -26
  216. package/src/styles/elements/_datepicker.scss +17 -22
  217. package/src/styles/elements/_dialog.scss +0 -3
  218. package/src/styles/elements/_divider.scss +11 -13
  219. package/src/styles/elements/_drawer.scss +9 -14
  220. package/src/styles/elements/_extended-fab.scss +36 -40
  221. package/src/styles/elements/_fab-menu.scss +21 -25
  222. package/src/styles/elements/_fab.scss +17 -20
  223. package/src/styles/elements/_field.scss +93 -114
  224. package/src/styles/elements/_icon-button.scss +34 -38
  225. package/src/styles/elements/_index.scss +0 -4
  226. package/src/styles/elements/_list.scss +19 -26
  227. package/src/styles/elements/_loading-indicator.scss +6 -9
  228. package/src/styles/elements/_menu.scss +0 -3
  229. package/src/styles/elements/_navigation-bar.scss +5 -9
  230. package/src/styles/elements/_navigation-rail.scss +10 -15
  231. package/src/styles/elements/_progress.scss +15 -18
  232. package/src/styles/elements/_radios.scss +24 -49
  233. package/src/styles/elements/_search.scss +19 -24
  234. package/src/styles/elements/_select.scss +4 -9
  235. package/src/styles/elements/_side-sheet.scss +0 -3
  236. package/src/styles/elements/_slider.scss +15 -35
  237. package/src/styles/elements/_snackbar.scss +0 -3
  238. package/src/styles/elements/_split-button.scss +33 -39
  239. package/src/styles/elements/_switch.scss +50 -90
  240. package/src/styles/elements/_tabs.scss +9 -13
  241. package/src/styles/elements/_text-field.scss +150 -178
  242. package/src/styles/elements/_timepicker.scss +0 -3
  243. package/src/styles/elements/_toolbar.scss +30 -35
  244. package/src/styles/elements/_tooltip.scss +0 -3
  245. package/src/styles/elements/_top-app-bar.scss +38 -45
  246. package/src/styles/main.scss +0 -15
  247. package/src/styles/themes/_autumn.scss +240 -258
  248. package/src/styles/themes/_base-theme.scss +96 -128
  249. package/src/styles/themes/_baseline.scss +273 -314
  250. package/src/styles/themes/_brownbeige.scss +242 -250
  251. package/src/styles/themes/_content.scss +240 -248
  252. package/src/styles/themes/_desert.scss +242 -250
  253. package/src/styles/themes/_expressive.scss +242 -250
  254. package/src/styles/themes/_fidelity.scss +240 -248
  255. package/src/styles/themes/_forest.scss +242 -259
  256. package/src/styles/themes/_fruit-salad.scss +242 -250
  257. package/src/styles/themes/_highcontrast.scss +164 -172
  258. package/src/styles/themes/_index.scss +0 -1
  259. package/src/styles/themes/_monochrome.scss +226 -234
  260. package/src/styles/themes/_neutral.scss +242 -250
  261. package/src/styles/themes/_ocean.scss +242 -259
  262. package/src/styles/themes/_rainbow.scss +242 -250
  263. package/src/styles/themes/_sageivory.scss +242 -250
  264. package/src/styles/themes/_spring.scss +238 -255
  265. package/src/styles/themes/_summer.scss +242 -250
  266. package/src/styles/themes/_sunset.scss +242 -259
  267. package/src/styles/themes/_tealcaramel.scss +242 -250
  268. package/src/styles/themes/_vibrant.scss +242 -250
  269. package/src/styles/utilities/_colors.scss +44 -50
  270. package/src/styles/utilities/_flexbox.scss +48 -59
  271. package/src/styles/utilities/_layout.scss +516 -591
  272. package/src/styles/utilities/_ripple.scss +61 -70
  273. package/src/styles/utilities/_spacing.scss +120 -127
  274. package/src/styles/utilities/_typography.scss +45 -58
  275. package/src/styles/utilities/_visibility.scss +61 -76
  276. package/dist/package.json +0 -488
@@ -1,4 +1,3 @@
1
- // src/styles/components/_bottom-sheet.scss
2
1
  @use "../abstract/base" as base;
3
2
  @use "../abstract/functions" as f;
4
3
  @use "../abstract/variables" as v;
@@ -8,237 +7,194 @@
8
7
 
9
8
  $component: "#{base.$prefix}-bottom-sheet";
10
9
 
11
- // -----------------------------------------------------------------------------
12
- // Bottom sheet (Compose SheetBottomTokens and BottomSheetDefaults)
13
- //
14
- // A surface anchored to the bottom edge: surface-container-low, extra-large
15
- // corners on the top two only, elevation level 1, and a 32x4dp handle that says
16
- // it can be dragged. It stops growing at 640dp and centres itself, so it does
17
- // not stretch across a desktop window.
18
- // -----------------------------------------------------------------------------
19
10
  .#{$component} {
20
- position: fixed;
21
- inset: 0;
22
- z-index: v.z-index("modal");
23
- display: flex;
24
- align-items: flex-end;
25
- justify-content: center;
26
-
27
- // A standard sheet leaves the page usable, so the layer itself must not
28
- // swallow clicks meant for what is behind it
29
- pointer-events: none;
30
-
31
- &--scrim-visible,
32
- &--partial,
33
- &--expanded {
34
- pointer-events: auto;
35
- }
36
-
37
- // The scrim, on modal sheets only (ScrimTokens.ContainerOpacity)
38
- &__scrim {
39
- position: absolute;
40
- inset: 0;
41
- background-color: t.alpha("scrim", 0.32);
42
- opacity: 0;
43
- visibility: hidden;
44
- // Compose's ModalBottomSheet fades its scrim on default effects both
45
- // ways; it leaves the accessibility tree once the fade is done
46
- transition:
47
- m.spring(opacity, default-effects),
48
- visibility 0s linear m.spring-duration(default-effects);
49
- }
50
-
51
- // The sheet itself
52
- &__container {
53
- position: relative;
54
- width: 100%;
55
- max-width: 640px; // BottomSheetDefaults.SheetMaxWidth
56
- max-height: 100%;
57
- display: flex;
58
- flex-direction: column;
59
- box-sizing: border-box;
60
- pointer-events: auto;
61
-
62
- background-color: t.color("surface-container-low"); // DockedContainerColor
63
- color: t.color("on-surface");
64
-
65
- // CornerExtraLargeTop: the bottom edge meets the screen, so it is square
66
- // (a block edge: the pair mirrors to itself, no direction arm)
67
- @include d.corners($start-start: v.shape("extra-large"), $start-end: v.shape("extra-large"), $arm: false);
68
- // Level 1 (DockedStandardContainerElevation), plus a shadow of the
69
- // sheet's own colour below it to cover the gap the spring's overshoot
70
- // opens at the bottom edge
71
- box-shadow: f.get-elevation(1), 0 m.$sheet-overshoot-guard 0 0 t.color("surface-container-low");
72
-
73
- // Hidden by default: translated fully out of view. Compose's
74
- // BottomSheet shows on the default spatial spring and hides on fast
75
- // effects
76
- transform: translateY(100%);
77
- transition: m.spring(transform, fast-effects);
78
-
79
- &:focus {
80
- outline: none;
81
- }
82
-
83
- // Focus ring uses the secondary role (FocusIndicatorColor)
84
- &:focus-visible {
85
- outline: 3px solid t.color("secondary");
86
- outline-offset: -3px;
87
- }
88
- }
89
-
90
- // A 48dp button (Compose: 22dp vertical padding round the 4dp bar, and the
91
- // minimum interactive size) drawing the 32x4dp bar
92
- // (DockedDragHandleWidth / DockedDragHandleHeight)
93
- &__handle {
94
- font: inherit;
95
- flex: 0 0 auto;
96
- position: relative;
97
- align-self: center;
98
- width: 48px;
99
- height: 48px;
100
- margin: 0 auto;
101
- padding: 0;
102
- border: 0;
103
- border-radius: 50%;
104
- background: none;
105
- cursor: grab;
106
- touch-action: none; // the sheet handles the gesture, not the browser
107
-
108
- &::before {
109
- content: "";
110
- position: absolute;
111
- inset: 22px 8px;
112
- border-radius: v.shape("extra-large"); // BottomSheetDefaults.DragHandle shape
113
- background-color: t.color("on-surface-variant"); // DockedDragHandleColor
114
- }
115
-
116
- &:active {
117
- cursor: grabbing;
118
- }
119
-
120
- // SheetBottomTokens.FocusIndicatorColor
121
- &:focus-visible {
122
- outline: 3px solid t.color("secondary");
123
- outline-offset: -3px;
124
- }
125
- }
126
-
127
- &__header {
128
- flex: 0 0 auto;
129
- padding: 0 24px 16px;
130
- }
131
-
132
- &__title {
133
- margin: 0;
134
- color: t.color("on-surface");
135
- @include m.typography("headline-small");
136
- }
137
-
138
- &__content {
139
- flex: 1 1 auto;
140
- min-height: 0;
141
- overflow-y: auto;
142
- padding: 0 24px 24px;
143
- @include m.typography("body-medium");
144
- color: t.color("on-surface-variant");
145
- }
146
-
147
- // ---------------------------------------------------------------------
148
- // States
149
- // ---------------------------------------------------------------------
150
- &--partial {
151
- .#{$component}__container {
152
- // the peek height, showing what the sheet holds without covering
153
- // the page: the factory's peekHeight, or its content up to half
154
- // the screen
155
- transform: translateY(0);
156
- max-height: var(--#{$component}-peek-height, 50%);
157
- transition: m.spring(transform, default-spatial);
158
- }
159
-
160
- .#{$component}__scrim {
161
- opacity: 1;
162
- visibility: visible;
163
- transition: m.spring(opacity, default-effects), visibility 0s;
164
- }
165
- }
166
-
167
- &--expanded {
168
- .#{$component}__container {
169
- transform: translateY(0);
170
- max-height: 100%;
171
- transition: m.spring(transform, default-spatial);
172
- // level with the top of the screen, the corners square off
173
- // (DockedMinimizedContainerShape is CornerNone)
174
- &:where(.#{$component}--full-height *) {
175
- @include d.corners($start-start: 0, $start-end: 0, $arm: false);
176
- }
177
- }
178
-
179
- .#{$component}__scrim {
180
- opacity: 1;
181
- visibility: visible;
182
- transition: m.spring(opacity, default-effects), visibility 0s;
183
- }
184
- }
185
-
186
- // A standard sheet has no scrim and does not block the page
187
- &--standard {
188
- pointer-events: none;
189
-
190
- .#{$component}__container {
191
- pointer-events: auto;
192
- }
193
- }
194
-
195
- @include m.reduced-motion {
196
- .#{$component}__container,
197
- .#{$component}__scrim,
198
- &--partial .#{$component}__container,
199
- &--partial .#{$component}__scrim,
200
- &--expanded .#{$component}__container,
201
- &--expanded .#{$component}__scrim {
202
- transition: none;
203
- }
204
- }
205
- }
206
-
207
- // -----------------------------------------------------------------------------
208
- // layer: "top": a modal sheet's root is a <dialog> the browser shows in the top
209
- // layer with showModal(). It stays the fixed layer over the page it is without
210
- // it, so this undoes the user agent's dialog box, and the scrim is its
211
- // ::backdrop, faded as the scrim was. `overlay` changes at the end of the
212
- // transition (allow-discrete), so the sheet slides out in the top layer.
213
- // -----------------------------------------------------------------------------
11
+ position: fixed;
12
+ inset: 0;
13
+ z-index: v.z-index("modal");
14
+ display: flex;
15
+ align-items: flex-end;
16
+ justify-content: center;
17
+
18
+ pointer-events: none;
19
+
20
+ &--scrim-visible,
21
+ &--partial,
22
+ &--expanded {
23
+ pointer-events: auto;
24
+ }
25
+
26
+ &__scrim {
27
+ position: absolute;
28
+ inset: 0;
29
+ background-color: t.alpha("scrim", 0.32);
30
+ opacity: 0;
31
+ visibility: hidden;
32
+ transition:
33
+ m.spring(opacity, default-effects),
34
+ visibility 0s linear m.spring-duration(default-effects);
35
+ }
36
+
37
+ &__container {
38
+ position: relative;
39
+ width: 100%;
40
+ max-width: 640px;
41
+ max-height: 100%;
42
+ display: flex;
43
+ flex-direction: column;
44
+ box-sizing: border-box;
45
+ pointer-events: auto;
46
+
47
+ background-color: t.color("surface-container-low");
48
+ color: t.color("on-surface");
49
+
50
+ @include d.corners($start-start: v.shape("extra-large"), $start-end: v.shape("extra-large"), $arm: false);
51
+ box-shadow: f.get-elevation(1), 0 m.$sheet-overshoot-guard 0 0 t.color("surface-container-low");
52
+
53
+ transform: translateY(100%);
54
+ transition: m.spring(transform, fast-effects);
55
+
56
+ &:focus {
57
+ outline: none;
58
+ }
59
+
60
+ &:focus-visible {
61
+ outline: 3px solid t.color("secondary");
62
+ outline-offset: -3px;
63
+ }
64
+ }
65
+
66
+ &__handle {
67
+ font: inherit;
68
+ flex: 0 0 auto;
69
+ position: relative;
70
+ align-self: center;
71
+ width: 48px;
72
+ height: 48px;
73
+ margin: 0 auto;
74
+ padding: 0;
75
+ border: 0;
76
+ border-radius: 50%;
77
+ background: none;
78
+ cursor: grab;
79
+ touch-action: none;
80
+
81
+ &::before {
82
+ content: "";
83
+ position: absolute;
84
+ inset: 22px 8px;
85
+ border-radius: v.shape("extra-large");
86
+ background-color: t.color("on-surface-variant");
87
+ }
88
+
89
+ &:active {
90
+ cursor: grabbing;
91
+ }
92
+
93
+ &:focus-visible {
94
+ outline: 3px solid t.color("secondary");
95
+ outline-offset: -3px;
96
+ }
97
+ }
98
+
99
+ &__header {
100
+ flex: 0 0 auto;
101
+ padding: 0 24px 16px;
102
+ }
103
+
104
+ &__title {
105
+ margin: 0;
106
+ color: t.color("on-surface");
107
+ @include m.typography("headline-small");
108
+ }
109
+
110
+ &__content {
111
+ flex: 1 1 auto;
112
+ min-height: 0;
113
+ overflow-y: auto;
114
+ padding: 0 24px 24px;
115
+ @include m.typography("body-medium");
116
+ color: t.color("on-surface-variant");
117
+ }
118
+
119
+ &--partial {
120
+ .#{$component}__container {
121
+ transform: translateY(0);
122
+ max-height: var(--#{$component}-peek-height, 50%);
123
+ transition: m.spring(transform, default-spatial);
124
+ }
125
+
126
+ .#{$component}__scrim {
127
+ opacity: 1;
128
+ visibility: visible;
129
+ transition: m.spring(opacity, default-effects), visibility 0s;
130
+ }
131
+ }
132
+
133
+ &--expanded {
134
+ .#{$component}__container {
135
+ transform: translateY(0);
136
+ max-height: 100%;
137
+ transition: m.spring(transform, default-spatial);
138
+ &:where(.#{$component}--full-height *) {
139
+ @include d.corners($start-start: 0, $start-end: 0, $arm: false);
140
+ }
141
+ }
142
+
143
+ .#{$component}__scrim {
144
+ opacity: 1;
145
+ visibility: visible;
146
+ transition: m.spring(opacity, default-effects), visibility 0s;
147
+ }
148
+ }
149
+
150
+ &--standard {
151
+ pointer-events: none;
152
+
153
+ .#{$component}__container {
154
+ pointer-events: auto;
155
+ }
156
+ }
157
+
158
+ @include m.reduced-motion {
159
+ .#{$component}__container,
160
+ .#{$component}__scrim,
161
+ &--partial .#{$component}__container,
162
+ &--partial .#{$component}__scrim,
163
+ &--expanded .#{$component}__container,
164
+ &--expanded .#{$component}__scrim {
165
+ transition: none;
166
+ }
167
+ }
168
+ }
169
+
214
170
  dialog.#{$component} {
215
- width: auto;
216
- height: auto;
217
- max-width: none;
218
- max-height: none;
219
- margin: 0;
220
- padding: 0;
221
- border: 0;
222
- overflow: visible;
223
- background: transparent;
224
- color: inherit;
225
- transition: overlay m.spring-duration(default-effects) allow-discrete;
226
-
227
- &::backdrop {
228
- background-color: t.alpha("scrim", 0.32);
229
- opacity: 0;
230
- transition: m.spring(opacity, default-effects);
231
- }
232
-
233
- &.#{$component}--partial::backdrop,
234
- &.#{$component}--expanded::backdrop {
235
- opacity: 1;
236
- }
237
-
238
- @include m.reduced-motion {
239
- &,
240
- &::backdrop {
241
- transition: none;
242
- }
243
- }
171
+ width: auto;
172
+ height: auto;
173
+ max-width: none;
174
+ max-height: none;
175
+ margin: 0;
176
+ padding: 0;
177
+ border: 0;
178
+ overflow: visible;
179
+ background: transparent;
180
+ color: inherit;
181
+ transition: overlay m.spring-duration(default-effects) allow-discrete;
182
+
183
+ &::backdrop {
184
+ background-color: t.alpha("scrim", 0.32);
185
+ opacity: 0;
186
+ transition: m.spring(opacity, default-effects);
187
+ }
188
+
189
+ &.#{$component}--partial::backdrop,
190
+ &.#{$component}--expanded::backdrop {
191
+ opacity: 1;
192
+ }
193
+
194
+ @include m.reduced-motion {
195
+ &,
196
+ &::backdrop {
197
+ transition: none;
198
+ }
199
+ }
244
200
  }