@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40

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 (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -27,7 +27,7 @@
27
27
  *
28
28
  * The resizer is a four-pixel gutter whose pointer reach is
29
29
  * `--slotted-target-min`, the WCAG 2.2 floor, drawn by a transparent
30
- * pseudo-element centred on it; it is a row of the panel's grid on a block
30
+ * pseudo-element centerd on it; it is a row of the panel's grid on a block
31
31
  * side and an overlay on its inner edge on an inline side. The section that draws it says why the two
32
32
  * differ; in one sentence, every rule in this panel runs across the inline
33
33
  * axis, and a column would cut all of them.
@@ -36,7 +36,7 @@
36
36
  * a drawer is the ordinary case, and a descendant rule would paint the inner
37
37
  * panel with the outer panel's geometry.
38
38
  */
39
- [data-ui='drawer'] {
39
+ [data-ui-drawer] {
40
40
  /**
41
41
  * The panel's resting measure, per size step. Five named steps rather than
42
42
  * the pixel string Ant and MUI both take: a theme retunes a step and cannot
@@ -47,7 +47,7 @@
47
47
  /**
48
48
  * What the panel actually measures. `--slotted-drawer-extent` is the one
49
49
  * name for it, and it is read from two places: an application setting one
50
- * measure for every drawer writes it on `[data-ui='drawer']`, and the
50
+ * measure for every drawer writes it on `[data-ui-drawer]`, and the
51
51
  * binding writes the length the reader dragged to as an inline custom
52
52
  * property on this element. Both are lengths, so the cascade decides
53
53
  * between them the way it decides everything else.
@@ -82,7 +82,7 @@
82
82
  * of nothing at rest, a two-pixel line under the hand, and a reach the
83
83
  * pointer finds without the eye being told where it is.
84
84
  *
85
- * `--_resizer-reach` is the WCAG 2.2 floor and it is centred on the
85
+ * `--_resizer-reach` is the WCAG 2.2 floor and it is centerd on the
86
86
  * gutter, so it takes ten pixels from each side rather than twenty from
87
87
  * the panel — which is what keeps it off the header of a sheet.
88
88
  */
@@ -98,7 +98,7 @@
98
98
  * showed it.
99
99
  *
100
100
  * It is `splitter`'s track, because the two families draw one picture and a
101
- * picture is a geometry as much as a colour. The panel's rows already read
101
+ * picture is a geometry as much as a color. The panel's rows already read
102
102
  * this through `max(--_padding-inline, --_resizer-thickness)`, so widening
103
103
  * it moves nothing else.
104
104
  */
@@ -117,6 +117,11 @@
117
117
  * the motion scale arriving and one step down leaving, because a reader who
118
118
  * has decided to close is waiting.
119
119
  *
120
+ * The slide arrives on the standard curve, not the entrance one: the
121
+ * entrance curve starts at fourteen times its mean speed, and a bottom
122
+ * sheet on it covered 46 per cent of a 717 px travel in its first frame.
123
+ * The standard curve covers under 3 per cent there.
124
+ *
120
125
  * `--_move` is any measure that changes — an inline drawer opening, and a
121
126
  * separator released onto a snap point. One step below the slide.
122
127
  *
@@ -136,7 +141,8 @@
136
141
  * decide. A property is resolved on the element instead, and the three
137
142
  * states below read as what they are.
138
143
  */
139
- --_slide: var(--slotted-duration-long) var(--slotted-easing-enter);
144
+ --_slide: var(--slotted-drawer-slide-duration, var(--slotted-duration-long))
145
+ var(--slotted-drawer-slide-easing, var(--slotted-easing-standard));
140
146
  --_move: var(--slotted-duration-medium) var(--slotted-easing-enter);
141
147
  /**
142
148
  * `allow-discrete` is the whole of it. Without it the rule that hides a
@@ -155,7 +161,8 @@
155
161
  * it had finished leaving — which is a hundred and fifty milliseconds
156
162
  * before `closed` fires.
157
163
  */
158
- --_reveal: content-visibility var(--slotted-duration-medium) allow-discrete;
164
+ --_reveal: content-visibility
165
+ var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium)) allow-discrete;
159
166
 
160
167
  /**
161
168
  * The repository has no global reset, so a family that gives a box an
@@ -176,8 +183,9 @@
176
183
  }
177
184
 
178
185
  /** Leaving is shorter than arriving: a reader who has decided is waiting. */
179
- [data-ui='drawer']:not([data-open]) {
180
- --_slide: var(--slotted-duration-medium) var(--slotted-easing-exit);
186
+ [data-ui-drawer]:not([data-open]) {
187
+ --_slide: var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium))
188
+ var(--slotted-drawer-slide-exit-easing, var(--slotted-easing-exit));
181
189
  --_move: var(--slotted-duration-medium) var(--slotted-easing-exit);
182
190
  }
183
191
 
@@ -186,27 +194,27 @@
186
194
  * every pointer position would lag the hand by the whole duration, and a
187
195
  * bottom sheet the reader is pulling has to follow it.
188
196
  */
189
- [data-ui='drawer'][data-dragging] {
197
+ [data-ui-drawer][data-dragging] {
190
198
  --_move: var(--slotted-duration-instant) var(--slotted-easing-standard);
191
199
  }
192
200
 
193
- [data-ui='drawer'][data-size='sm'] {
201
+ [data-ui-drawer][data-size='sm'] {
194
202
  --_step: var(--slotted-drawer-extent-sm, 18rem);
195
203
  --_padding-inline: var(--slotted-space-6, 1rem);
196
204
  }
197
205
 
198
- [data-ui='drawer'][data-size='lg'] {
206
+ [data-ui-drawer][data-size='lg'] {
199
207
  --_step: var(--slotted-drawer-extent-lg, 30rem);
200
208
  }
201
209
 
202
- [data-ui='drawer'][data-size='xl'] {
210
+ [data-ui-drawer][data-size='xl'] {
203
211
  --_step: var(--slotted-drawer-extent-xl, 40rem);
204
212
  --_padding-inline: var(--slotted-space-8, 1.5rem);
205
213
  --_title-font-size: var(--slotted-font-size-xl, 1.125rem);
206
214
  }
207
215
 
208
216
  /** The step a drawer that is a page takes: the whole layer, and no measure. */
209
- [data-ui='drawer'][data-size='full'] {
217
+ [data-ui-drawer][data-size='full'] {
210
218
  --_step: 100%;
211
219
  }
212
220
 
@@ -218,7 +226,7 @@
218
226
  * over a dialog is one step above it on the single stack the library keeps
219
227
  * rather than a number this stylesheet guessed.
220
228
  */
221
- [data-ui='drawer'][data-mode='overlay'] {
229
+ [data-ui-drawer][data-mode='overlay'] {
222
230
  position: fixed;
223
231
  inset: 0;
224
232
  z-index: calc(var(--slotted-z-index-overlay, 1000) + var(--slotted-layer-depth, 0));
@@ -235,20 +243,20 @@
235
243
  * a mode here, because a family writing a margin on an element it does not
236
244
  * own is a family deciding someone else's layout.
237
245
  */
238
- [data-ui='drawer'][data-mode='inline'] {
246
+ [data-ui-drawer][data-mode='inline'] {
239
247
  overflow: clip;
240
248
  }
241
249
 
242
- [data-ui='drawer'][data-mode='inline'][data-side='start'],
243
- [data-ui='drawer'][data-mode='inline'][data-side='end'] {
250
+ [data-ui-drawer][data-mode='inline'][data-side='start'],
251
+ [data-ui-drawer][data-mode='inline'][data-side='end'] {
244
252
  inline-size: 0;
245
253
  transition:
246
254
  inline-size var(--_move),
247
255
  var(--_reveal);
248
256
  }
249
257
 
250
- [data-ui='drawer'][data-mode='inline'][data-side='top'],
251
- [data-ui='drawer'][data-mode='inline'][data-side='bottom'] {
258
+ [data-ui-drawer][data-mode='inline'][data-side='top'],
259
+ [data-ui-drawer][data-mode='inline'][data-side='bottom'] {
252
260
  block-size: 0;
253
261
  transition:
254
262
  block-size var(--_move),
@@ -269,14 +277,14 @@
269
277
  * to nought, and a cap against a box on its way to nought is what would
270
278
  * rewrap the panel on the way out.
271
279
  */
272
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='start'],
273
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='end'] {
280
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='start'],
281
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='end'] {
274
282
  inline-size: var(--_extent);
275
283
  max-inline-size: 100%;
276
284
  }
277
285
 
278
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='top'],
279
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='bottom'] {
286
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='top'],
287
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='bottom'] {
280
288
  block-size: var(--_extent);
281
289
  max-block-size: 100%;
282
290
  }
@@ -290,7 +298,7 @@
290
298
  * `data-open`: the entering frame has no `data-open` either, and a hidden
291
299
  * panel in that frame refuses the focus scope's initial focus.
292
300
  */
293
- [data-ui='drawer'][inert] {
301
+ [data-ui-drawer][inert] {
294
302
  content-visibility: hidden;
295
303
  pointer-events: none;
296
304
  }
@@ -299,12 +307,12 @@
299
307
 
300
308
  /**
301
309
  * `--slotted-scrim` is a foundation token the theme restates per scheme and
302
- * remaps to `Canvas` under forced colours, where it becomes an opaque ground.
310
+ * remaps to `Canvas` under forced colors, where it becomes an opaque ground.
303
311
  * That is why the panel below carries an edge of its own: every shadow token
304
312
  * is `none` in that mode, and a panel separated only by elevation would sit on
305
313
  * an opaque ground with nothing marking where it starts.
306
314
  */
307
- [data-ui='drawer'] > [data-part='backdrop'] {
315
+ [data-ui-drawer] > [data-part-backdrop] {
308
316
  grid-area: 1 / 1;
309
317
  background: var(--slotted-drawer-scrim, var(--slotted-scrim, Canvas));
310
318
  opacity: 0;
@@ -321,11 +329,40 @@
321
329
  * close is waiting, and the page behind is back before the panel has finished
322
330
  * going.
323
331
  */
324
- [data-ui='drawer'][data-open] > [data-part='backdrop'] {
332
+ [data-ui-drawer][data-open] > [data-part-backdrop] {
325
333
  opacity: 1;
326
334
  transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
327
335
  }
328
336
 
337
+ /**
338
+ * A theme filters the page under a modal layer with
339
+ * `--slotted-drawer-scrim-backdrop-filter`, `none` unless set. A filter makes
340
+ * the scrim a stacking context, which its place in the document would paint
341
+ * over the panel, so it stands at the bottom of the layer's own. It comes and
342
+ * goes with the scrim's opacity.
343
+ */
344
+ [data-ui-drawer][data-mode='overlay'][data-modal] > [data-part-backdrop] {
345
+ transition-property:
346
+ opacity,
347
+ -webkit-backdrop-filter,
348
+ backdrop-filter;
349
+ z-index: -1;
350
+ }
351
+
352
+ [data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
353
+ > [data-part-backdrop] {
354
+ -webkit-backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
355
+ backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
356
+ }
357
+
358
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
359
+ [data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
360
+ > [data-part-backdrop] {
361
+ -webkit-backdrop-filter: none;
362
+ backdrop-filter: none;
363
+ }
364
+ }
365
+
329
366
  /* ── The panel ────────────────────────────────────────────────────────── */
330
367
 
331
368
  /**
@@ -334,7 +371,7 @@
334
371
  * body is long — the failure Vaul, MUI and Angular Material all leave to each
335
372
  * consumer's own CSS, because none of the three ships a layout.
336
373
  */
337
- [data-ui='drawer'] > [data-part='panel'] {
374
+ [data-ui-drawer] > [data-part-panel] {
338
375
  grid-area: 1 / 1;
339
376
  box-sizing: border-box;
340
377
  /**
@@ -393,6 +430,16 @@
393
430
  border-width: 0;
394
431
  /* So the leading corners clip the row that scrolls under them. */
395
432
  overflow: hidden;
433
+ /* A theme that paints this surface as a translucent material blurs what moves behind it. */
434
+ -webkit-backdrop-filter: var(--slotted-drawer-backdrop-filter, none);
435
+ backdrop-filter: var(--slotted-drawer-backdrop-filter, none);
436
+ }
437
+
438
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
439
+ [data-ui-drawer] > [data-part-panel] {
440
+ -webkit-backdrop-filter: none;
441
+ backdrop-filter: none;
442
+ }
396
443
  }
397
444
 
398
445
  /**
@@ -403,7 +450,7 @@
403
450
  * physical axis, and a start-side panel leaves toward the left of a
404
451
  * left-to-right document and toward the right of a mirrored one.
405
452
  */
406
- [data-ui='drawer'][data-mode='overlay'] > [data-part='panel'] {
453
+ [data-ui-drawer][data-mode='overlay'] > [data-part-panel] {
407
454
  box-shadow: var(--slotted-shadow-lg);
408
455
  translate: 0 0;
409
456
  /* The measure is restated here, or this rule would replace the base one:
@@ -412,10 +459,12 @@
412
459
  transition:
413
460
  translate var(--_slide),
414
461
  inline-size var(--_move),
415
- block-size var(--_move);
462
+ block-size var(--_move),
463
+ border-start-start-radius var(--_move),
464
+ border-start-end-radius var(--_move);
416
465
  }
417
466
 
418
- [data-ui='drawer'][data-mode='overlay']:not([data-open]) > [data-part='panel'] {
467
+ [data-ui-drawer][data-mode='overlay']:not([data-open]) > [data-part-panel] {
419
468
  translate: var(--_shift-x, 0) var(--_shift-y, 0);
420
469
  }
421
470
 
@@ -435,18 +484,18 @@
435
484
  * transition here would put the panel behind the hand by the whole duration.
436
485
  * The slide stays, because a panel released mid-gesture still has an exit.
437
486
  */
438
- [data-ui='drawer'][data-dragging] > [data-part='panel'] {
487
+ [data-ui-drawer][data-dragging] > [data-part-panel] {
439
488
  transition: none;
440
489
  }
441
490
 
442
- [data-ui='drawer'][data-dragging][data-mode='overlay'] > [data-part='panel'] {
491
+ [data-ui-drawer][data-dragging][data-mode='overlay'] > [data-part-panel] {
443
492
  transition: translate var(--_slide);
444
493
  }
445
494
 
446
- [data-ui='drawer'][data-dragging][data-mode='inline'][data-side='start'],
447
- [data-ui='drawer'][data-dragging][data-mode='inline'][data-side='end'],
448
- [data-ui='drawer'][data-dragging][data-mode='inline'][data-side='top'],
449
- [data-ui='drawer'][data-dragging][data-mode='inline'][data-side='bottom'] {
495
+ [data-ui-drawer][data-dragging][data-mode='inline'][data-side='start'],
496
+ [data-ui-drawer][data-dragging][data-mode='inline'][data-side='end'],
497
+ [data-ui-drawer][data-dragging][data-mode='inline'][data-side='top'],
498
+ [data-ui-drawer][data-dragging][data-mode='inline'][data-side='bottom'] {
450
499
  transition: var(--_reveal);
451
500
  }
452
501
 
@@ -456,7 +505,7 @@
456
505
  * closed panel sits at rest because the layer hides it whole, above.
457
506
  */
458
507
  @media (prefers-reduced-motion: reduce) {
459
- [data-ui='drawer'][data-mode='overlay'] > [data-part='panel'] {
508
+ [data-ui-drawer][data-mode='overlay'] > [data-part-panel] {
460
509
  translate: 0 0;
461
510
  transition:
462
511
  inline-size var(--_move),
@@ -464,22 +513,32 @@
464
513
  }
465
514
  }
466
515
 
516
+ /**
517
+ * A form written around the header, the body and the footer, so Enter in
518
+ * any field and the footer's submit belong to one form. It draws no box:
519
+ * its children are the panel's rows, and every rule of a part is written a
520
+ * second time through it, so the parts keep the panel's inset and rows.
521
+ */
522
+ [data-ui-drawer] > [data-part-panel] > form {
523
+ display: contents;
524
+ }
525
+
467
526
  /* ── Where the panel sits, and where it goes when it leaves ───────────── */
468
527
 
469
- [data-ui='drawer'][data-side='start'] > [data-part='panel'],
470
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] {
528
+ [data-ui-drawer][data-side='start'] > [data-part-panel],
529
+ [data-ui-drawer][data-side='end'] > [data-part-panel] {
471
530
  align-self: stretch;
472
531
  inline-size: min(var(--_extent), 100%);
473
532
  grid-template-rows: auto minmax(0, 1fr) auto;
474
533
  }
475
534
 
476
- [data-ui='drawer'][data-side='top'] > [data-part='panel'],
477
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] {
535
+ [data-ui-drawer][data-side='top'] > [data-part-panel],
536
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] {
478
537
  justify-self: stretch;
479
538
  block-size: min(var(--_extent), 100%);
480
539
  }
481
540
 
482
- [data-ui='drawer'][data-side='start'] > [data-part='panel'] {
541
+ [data-ui-drawer][data-side='start'] > [data-part-panel] {
483
542
  justify-self: start;
484
543
  --_shift-x: -100%;
485
544
  /* The resizer lies over this edge, so the rows keep clear of it. */
@@ -487,7 +546,7 @@
487
546
  border-inline-end-width: var(--_rule-size);
488
547
  }
489
548
 
490
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] {
549
+ [data-ui-drawer][data-side='end'] > [data-part-panel] {
491
550
  justify-self: end;
492
551
  --_shift-x: 100%;
493
552
  --_row-padding-inline-start: max(var(--_padding-inline), var(--_resizer-thickness));
@@ -507,7 +566,7 @@
507
566
  * resizer would otherwise put its body in an `auto` track and lose the one
508
567
  * declaration that keeps the footer on screen.
509
568
  */
510
- [data-ui='drawer'][data-side='top'] > [data-part='panel'] {
569
+ [data-ui-drawer][data-side='top'] > [data-part-panel] {
511
570
  align-self: start;
512
571
  grid-template-rows: auto minmax(0, 1fr) auto auto;
513
572
  --_shift-y: -100%;
@@ -516,7 +575,7 @@
516
575
  border-end-end-radius: var(--slotted-drawer-radius, var(--_radius));
517
576
  }
518
577
 
519
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] {
578
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] {
520
579
  align-self: end;
521
580
  grid-template-rows: auto auto minmax(0, 1fr) auto;
522
581
  --_shift-y: 100%;
@@ -525,20 +584,43 @@
525
584
  border-start-end-radius: var(--slotted-drawer-radius, var(--_radius));
526
585
  }
527
586
 
587
+ /**
588
+ * A sheet that reaches the top of the layer is the screen, Material 3's
589
+ * expanded bottom sheet: its top corners square — a theme keeps a radius
590
+ * with `--slotted-drawer-radius-expanded` — and its header clears the safe
591
+ * area the status bar takes. The binding writes `data-expanded` while the
592
+ * extent is the whole layer, and under `size="full"`.
593
+ */
594
+ [data-ui-drawer][data-side='bottom'][data-expanded] > [data-part-panel] {
595
+ border-start-start-radius: var(--slotted-drawer-radius-expanded, 0px);
596
+ border-start-end-radius: var(--slotted-drawer-radius-expanded, 0px);
597
+ }
598
+
599
+ [data-ui-drawer][data-side='bottom'][data-expanded]
600
+ > [data-part-panel]
601
+ > form
602
+ > [data-part-header],
603
+ [data-ui-drawer][data-side='bottom'][data-expanded] > [data-part-panel] > [data-part-header] {
604
+ padding-block-start: calc(var(--_padding-block) + env(safe-area-inset-top, 0px));
605
+ }
606
+
528
607
  /**
529
608
  * A sheet's separator takes the first row, so the three that follow move down
530
609
  * one. `top` needs no such rule: its separator is the fourth row and the
531
610
  * three above it are already where the base puts them.
532
611
  */
533
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='header'] {
612
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > form > [data-part-header],
613
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-header] {
534
614
  grid-row: 2;
535
615
  }
536
616
 
537
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='body'] {
617
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > form > [data-part-body],
618
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-body] {
538
619
  grid-row: 3;
539
620
  }
540
621
 
541
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='footer'] {
622
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > form > [data-part-footer],
623
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-footer] {
542
624
  grid-row: 4;
543
625
  }
544
626
 
@@ -546,18 +628,24 @@
546
628
 
547
629
  /**
548
630
  * A sheet on a wide layer is a card over the page, not a strip across it:
549
- * forty rems, Material 3's 640 dp, centred, with the scrim on both sides. The
550
- * edge then shows on three sides, so the panel draws it on three; on a phone
551
- * the two side edges sit on the screen's own and read as nothing.
631
+ * forty rems, Material 3's 640 dp, centerd, with the scrim on both sides. The
632
+ * edge then shows on three sides, so the panel draws it on three. An overlay
633
+ * layer is the viewport, so at the sheet's measure or under it — a phone —
634
+ * the side edges would sit on the screen's own and are not drawn.
552
635
  */
553
- [data-ui='drawer'][data-mode='overlay'][data-side='top'] > [data-part='panel'],
554
- [data-ui='drawer'][data-mode='overlay'][data-side='bottom'] > [data-part='panel'] {
636
+ [data-ui-drawer][data-mode='overlay'][data-side='top'] > [data-part-panel],
637
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'] > [data-part-panel] {
555
638
  justify-self: center;
556
639
  inline-size: min(
557
640
  100%,
558
641
  var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))
559
642
  );
560
- border-inline-width: var(--_rule-size);
643
+ border-inline-width: clamp(
644
+ 0px,
645
+ (100vw - var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))) *
646
+ 1000,
647
+ var(--_rule-size)
648
+ );
561
649
  }
562
650
 
563
651
  /**
@@ -574,7 +662,7 @@
574
662
  * arrives while the sheet is open, and a release back onto the content stop. A
575
663
  * browser without it jumps, and nothing else changes.
576
664
  */
577
- [data-ui='drawer'][data-size='content'] {
665
+ [data-ui-drawer][data-size='content'] {
578
666
  --_step: auto;
579
667
  --_content-cap: min(
580
668
  var(--slotted-drawer-extent, calc(100% - var(--slotted-space-12, 4rem))),
@@ -583,19 +671,19 @@
583
671
  interpolate-size: allow-keywords;
584
672
  }
585
673
 
586
- [data-ui='drawer'][data-size='content'][data-side='start'],
587
- [data-ui='drawer'][data-size='content'][data-side='end'] {
674
+ [data-ui-drawer][data-size='content'][data-side='start'],
675
+ [data-ui-drawer][data-size='content'][data-side='end'] {
588
676
  --_step: max-content;
589
677
  }
590
678
 
591
- [data-ui='drawer'][data-size='content'][data-side='start'] > [data-part='panel'],
592
- [data-ui='drawer'][data-size='content'][data-side='end'] > [data-part='panel'] {
679
+ [data-ui-drawer][data-size='content'][data-side='start'] > [data-part-panel],
680
+ [data-ui-drawer][data-size='content'][data-side='end'] > [data-part-panel] {
593
681
  inline-size: var(--_extent);
594
682
  max-inline-size: var(--_content-cap);
595
683
  }
596
684
 
597
- [data-ui='drawer'][data-size='content'][data-side='top'] > [data-part='panel'],
598
- [data-ui='drawer'][data-size='content'][data-side='bottom'] > [data-part='panel'] {
685
+ [data-ui-drawer][data-size='content'][data-side='top'] > [data-part-panel],
686
+ [data-ui-drawer][data-size='content'][data-side='bottom'] > [data-part-panel] {
599
687
  block-size: var(--_extent);
600
688
  max-block-size: var(--_content-cap);
601
689
  }
@@ -606,7 +694,7 @@
606
694
  * cell the panel sits in shrinks by it, so a sheet lands above the keys and a
607
695
  * side panel's footer does too, and every `100%` cap shrinks with the cell.
608
696
  */
609
- [data-ui='drawer'][data-mode='overlay'] {
697
+ [data-ui-drawer][data-mode='overlay'] {
610
698
  padding-block-end: var(--slotted-keyboard-inset, 0px);
611
699
  }
612
700
 
@@ -616,18 +704,18 @@
616
704
  * press on it reaches it. The opacity keeps the transition the scrim already
617
705
  * has, so crossing the stop fades rather than blinks.
618
706
  */
619
- [data-ui='drawer'][data-undimmed] > [data-part='backdrop'] {
707
+ [data-ui-drawer][data-undimmed] > [data-part-backdrop] {
620
708
  opacity: 0;
621
709
  pointer-events: none;
622
710
  }
623
711
 
624
712
  /* The layer is fixed over the whole viewport, so the scrim alone letting the
625
713
  press through leaves the root to catch it; the panel takes it back. */
626
- [data-ui='drawer'][data-undimmed] {
714
+ [data-ui-drawer][data-undimmed] {
627
715
  pointer-events: none;
628
716
  }
629
717
 
630
- [data-ui='drawer'][data-undimmed] > [data-part='panel'] {
718
+ [data-ui-drawer][data-undimmed] > [data-part-panel] {
631
719
  pointer-events: auto;
632
720
  }
633
721
 
@@ -636,16 +724,17 @@
636
724
  * sits over its end. The inset is padding inside the scrollport, so the last
637
725
  * line scrolls clear of the indicator rather than stopping under it.
638
726
  */
639
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='body']:last-child {
727
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > form > [data-part-body]:last-child,
728
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-body]:last-child {
640
729
  padding-block-end: calc(var(--_padding-block) + env(safe-area-inset-bottom, 0px));
641
730
  }
642
731
 
643
732
  /** `start` is the left edge in one direction and the right edge in the other. */
644
- [data-ui='drawer'][data-side='start']:dir(rtl) > [data-part='panel'] {
733
+ [data-ui-drawer][data-side='start']:dir(rtl) > [data-part-panel] {
645
734
  --_shift-x: 100%;
646
735
  }
647
736
 
648
- [data-ui='drawer'][data-side='end']:dir(rtl) > [data-part='panel'] {
737
+ [data-ui-drawer][data-side='end']:dir(rtl) > [data-part-panel] {
649
738
  --_shift-x: -100%;
650
739
  }
651
740
 
@@ -655,13 +744,13 @@
655
744
  * which on a phone reads as a stray line under the browser chrome. `dialog`
656
745
  * removed the same line from its own full-screen step for the same reason.
657
746
  *
658
- * A step the layer is too narrow to honour is clamped by `min(…, 100%)` and
747
+ * A step the layer is too narrow to honor is clamped by `min(…, 100%)` and
659
748
  * still draws its edge. CSS cannot compare a resolved length to its
660
749
  * container, and the four container queries that would answer it — one per
661
750
  * step, because a container condition cannot hold a custom property — buy one
662
751
  * hairline at the extreme edge of the viewport.
663
752
  */
664
- [data-ui='drawer'][data-size='full'] > [data-part='panel'] {
753
+ [data-ui-drawer][data-mode][data-size='full'] > [data-part-panel] {
665
754
  border-width: 0;
666
755
  border-radius: 0;
667
756
  }
@@ -671,13 +760,13 @@
671
760
  * from, which is what `overflow: clip` on the root is for. `min(…, 100%)`
672
761
  * would resolve against a box that is on its way to nought.
673
762
  */
674
- [data-ui='drawer'][data-mode='inline'][data-side='start'] > [data-part='panel'],
675
- [data-ui='drawer'][data-mode='inline'][data-side='end'] > [data-part='panel'] {
763
+ [data-ui-drawer][data-mode='inline'][data-side='start'] > [data-part-panel],
764
+ [data-ui-drawer][data-mode='inline'][data-side='end'] > [data-part-panel] {
676
765
  inline-size: var(--_extent);
677
766
  }
678
767
 
679
- [data-ui='drawer'][data-mode='inline'][data-side='top'] > [data-part='panel'],
680
- [data-ui='drawer'][data-mode='inline'][data-side='bottom'] > [data-part='panel'] {
768
+ [data-ui-drawer][data-mode='inline'][data-side='top'] > [data-part-panel],
769
+ [data-ui-drawer][data-mode='inline'][data-side='bottom'] > [data-part-panel] {
681
770
  block-size: var(--_extent);
682
771
  }
683
772
 
@@ -688,13 +777,13 @@
688
777
  * a worse picture than one that wrapped. The cap is on `[data-open]` for the
689
778
  * reason the root's is.
690
779
  */
691
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='start'] > [data-part='panel'],
692
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='end'] > [data-part='panel'] {
780
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='start'] > [data-part-panel],
781
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='end'] > [data-part-panel] {
693
782
  max-inline-size: 100%;
694
783
  }
695
784
 
696
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='top'] > [data-part='panel'],
697
- [data-ui='drawer'][data-mode='inline'][data-open][data-side='bottom'] > [data-part='panel'] {
785
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='top'] > [data-part-panel],
786
+ [data-ui-drawer][data-mode='inline'][data-open][data-side='bottom'] > [data-part-panel] {
698
787
  max-block-size: 100%;
699
788
  }
700
789
 
@@ -712,7 +801,7 @@
712
801
  * separator drawing anything at rest is a decoration on an edge nobody is
713
802
  * touching. Both halves of that were wrong. A resizable edge nobody can see
714
803
  * is a capability nobody finds, and it was reported as exactly that; and the
715
- * accent is the one colour in the library that means "the keyboard is here",
804
+ * accent is the one color in the library that means "the keyboard is here",
716
805
  * so spending it on hover left nothing to say at focus.
717
806
  *
718
807
  * The picture is `splitter`'s, which is the family that settled it: two
@@ -730,8 +819,8 @@
730
819
  * looking.
731
820
  *
732
821
  * **The pointer reach is not the picture.** `::before` is a transparent box
733
- * of `--slotted-target-min`, centred on the gutter, so the target holds at
734
- * the WCAG 2.2 floor while the picture stays thin. Centred rather than run
822
+ * of `--slotted-target-min`, centerd on the gutter, so the target holds at
823
+ * the WCAG 2.2 floor while the picture stays thin. Centerd rather than run
735
824
  * inward: inward it would take twenty pixels of the panel and, on a sheet,
736
825
  * sit over the header.
737
826
  *
@@ -753,7 +842,7 @@
753
842
  *
754
843
  * `touch-action: none` so a drag is not read as a scroll on the way past.
755
844
  */
756
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer'] {
845
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer] {
757
846
  display: flex;
758
847
  align-items: center;
759
848
  justify-content: center;
@@ -762,11 +851,11 @@
762
851
  touch-action: none;
763
852
 
764
853
  /**
765
- * The two steps, and the whole of the colour decision — the same one
854
+ * The two steps, and the whole of the color decision — the same one
766
855
  * `splitter` makes, because the two are one picture in two families.
767
856
  *
768
857
  * The strong border step at rest, not the subtle one and not the accent.
769
- * The accent is the one colour in the library that means "the keyboard is
858
+ * The accent is the one color in the library that means "the keyboard is
770
859
  * here", and this family used to spend it on hover as well: a two-pixel
771
860
  * accent line appearing under the hand on an edge that drew nothing at all
772
861
  * before it. Both halves of that were wrong. An edge nobody can see is a
@@ -781,69 +870,67 @@
781
870
  }
782
871
 
783
872
  /* Under the hand the gap closes and the marks read as one. */
784
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer']:not([data-disabled]):hover,
785
- [data-ui='drawer']
786
- > [data-part='panel']
787
- > [data-part='resizer']:not([data-disabled]):focus-visible,
788
- [data-ui='drawer'][data-dragging] > [data-part='panel'] > [data-part='resizer'] {
873
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer]:not([data-disabled]):hover,
874
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer]:not([data-disabled]):focus-visible,
875
+ [data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] {
789
876
  gap: var(--slotted-space-4, 0.5rem);
790
877
  }
791
878
 
792
- [data-ui='drawer'][data-side='start'] > [data-part='panel'] > [data-part='resizer'],
793
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] > [data-part='resizer'] {
879
+ [data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer],
880
+ [data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
794
881
  flex-direction: column;
795
882
  }
796
883
 
797
884
  /**
798
- * The reach. Transparent, centred on the gutter and above the panel's own
885
+ * The reach. Transparent, centerd on the gutter and above the panel's own
799
886
  * rows, which is what makes a four-pixel picture a twenty-four-pixel target.
800
887
  */
801
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer']::before {
888
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer]::before {
802
889
  content: '';
803
890
  position: absolute;
804
891
  --_reach-overhang: calc((var(--_resizer-reach) - var(--_resizer-thickness)) / -2);
805
892
  }
806
893
 
807
- [data-ui='drawer'][data-side='start'] > [data-part='panel'] > [data-part='resizer']::before,
808
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] > [data-part='resizer']::before {
894
+ [data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer]::before,
895
+ [data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer]::before {
809
896
  inset-block: 0;
810
897
  inset-inline: var(--_reach-overhang);
811
898
  }
812
899
 
813
- [data-ui='drawer'][data-side='top'] > [data-part='panel'] > [data-part='resizer']::before,
814
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='resizer']::before {
900
+ [data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer]::before,
901
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer]::before {
815
902
  inset-inline: 0;
816
903
  inset-block: var(--_reach-overhang);
817
904
  }
818
905
 
819
- [data-ui='drawer'][data-side='start'] > [data-part='panel'] > [data-part='resizer'],
820
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] > [data-part='resizer'] {
906
+ [data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer],
907
+ [data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
821
908
  position: absolute;
822
909
  inset-block: 0;
823
910
  inline-size: var(--_resizer-thickness);
824
911
  cursor: col-resize;
825
912
  }
826
913
 
827
- [data-ui='drawer'][data-side='start'] > [data-part='panel'] > [data-part='resizer'] {
914
+ [data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer] {
828
915
  inset-inline-end: 0;
829
916
  }
830
917
 
831
- [data-ui='drawer'][data-side='end'] > [data-part='panel'] > [data-part='resizer'] {
918
+ [data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
832
919
  inset-inline-start: 0;
833
920
  }
834
921
 
835
- [data-ui='drawer'][data-side='top'] > [data-part='panel'] > [data-part='resizer'],
836
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='resizer'] {
922
+ [data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer],
923
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer] {
837
924
  position: relative;
838
925
  block-size: var(--_resizer-thickness);
839
926
  cursor: row-resize;
840
927
  }
841
928
 
842
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='resizer'] {
929
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer] {
843
930
  grid-row: 1;
844
931
  }
845
932
 
846
- [data-ui='drawer'][data-side='top'] > [data-part='panel'] > [data-part='resizer'] {
933
+ [data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] {
847
934
  grid-row: 4;
848
935
  }
849
936
 
@@ -856,7 +943,7 @@
856
943
  *
857
944
  * A sheet paints none of them — see the grabber below.
858
945
  */
859
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer'] > [data-part='line'] {
946
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer] > [data-part-line] {
860
947
  flex: 0 1 min(var(--slotted-space-12, 4rem), 20%);
861
948
  min-block-size: 0;
862
949
  min-inline-size: 0;
@@ -869,40 +956,37 @@
869
956
  var(--slotted-control-transition-easing, var(--slotted-easing-standard));
870
957
  }
871
958
 
872
- [data-ui='drawer'][data-side='start']
873
- > [data-part='panel']
874
- > [data-part='resizer']
875
- > [data-part='line']:first-child,
876
- [data-ui='drawer'][data-side='end']
877
- > [data-part='panel']
878
- > [data-part='resizer']
879
- > [data-part='line']:first-child {
959
+ [data-ui-drawer][data-side='start']
960
+ > [data-part-panel]
961
+ > [data-part-resizer]
962
+ > [data-part-line]:first-child,
963
+ [data-ui-drawer][data-side='end']
964
+ > [data-part-panel]
965
+ > [data-part-resizer]
966
+ > [data-part-line]:first-child {
880
967
  background: linear-gradient(to bottom, transparent, var(--_rest));
881
968
  }
882
969
 
883
- [data-ui='drawer'][data-side='start']
884
- > [data-part='panel']
885
- > [data-part='resizer']
886
- > [data-part='line']:last-child,
887
- [data-ui='drawer'][data-side='end']
888
- > [data-part='panel']
889
- > [data-part='resizer']
890
- > [data-part='line']:last-child {
970
+ [data-ui-drawer][data-side='start']
971
+ > [data-part-panel]
972
+ > [data-part-resizer]
973
+ > [data-part-line]:last-child,
974
+ [data-ui-drawer][data-side='end']
975
+ > [data-part-panel]
976
+ > [data-part-resizer]
977
+ > [data-part-line]:last-child {
891
978
  background: linear-gradient(to top, transparent, var(--_rest));
892
979
  }
893
980
 
894
- [data-ui='drawer']
895
- > [data-part='panel']
896
- > [data-part='resizer']:not([data-disabled]):hover
897
- > [data-part='line'],
898
- [data-ui='drawer']
899
- > [data-part='panel']
900
- > [data-part='resizer']:not([data-disabled]):focus-visible
901
- > [data-part='line'],
902
- [data-ui='drawer'][data-dragging]
903
- > [data-part='panel']
904
- > [data-part='resizer']
905
- > [data-part='line'] {
981
+ [data-ui-drawer]
982
+ > [data-part-panel]
983
+ > [data-part-resizer]:not([data-disabled]):hover
984
+ > [data-part-line],
985
+ [data-ui-drawer]
986
+ > [data-part-panel]
987
+ > [data-part-resizer]:not([data-disabled]):focus-visible
988
+ > [data-part-line],
989
+ [data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] > [data-part-line] {
906
990
  flex-basis: 100%;
907
991
  background: var(--_active);
908
992
  }
@@ -918,7 +1002,7 @@
918
1002
  * there because a sheet is not held at its corners; it is held in the middle,
919
1003
  * which is where every mobile sheet in the field puts its mark.
920
1004
  */
921
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer'] > [data-part='grip'] {
1005
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
922
1006
  flex: none;
923
1007
  transition:
924
1008
  background-color var(--slotted-control-transition-duration, var(--slotted-duration-short))
@@ -927,14 +1011,8 @@
927
1011
  var(--slotted-control-transition-easing, var(--slotted-easing-standard));
928
1012
  }
929
1013
 
930
- [data-ui='drawer'][data-side='start']
931
- > [data-part='panel']
932
- > [data-part='resizer']
933
- > [data-part='grip'],
934
- [data-ui='drawer'][data-side='end']
935
- > [data-part='panel']
936
- > [data-part='resizer']
937
- > [data-part='grip'] {
1014
+ [data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer] > [data-part-grip],
1015
+ [data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
938
1016
  color: var(--_rest);
939
1017
  background-image: radial-gradient(circle at center, currentColor 40%, transparent 42%);
940
1018
  background-size: var(--slotted-space-2, 0.25rem) var(--slotted-space-2, 0.25rem);
@@ -942,15 +1020,12 @@
942
1020
  block-size: calc(3 * var(--slotted-space-2, 0.25rem));
943
1021
  }
944
1022
 
945
- /* The grabber. Four by thirty-six, full radius, centred above the header. */
946
- [data-ui='drawer'][data-side='top']
947
- > [data-part='panel']
948
- > [data-part='resizer']
949
- > [data-part='grip'],
950
- [data-ui='drawer'][data-side='bottom']
951
- > [data-part='panel']
952
- > [data-part='resizer']
953
- > [data-part='grip'] {
1023
+ /* The grabber. Four by thirty-six, full radius, centerd above the header. */
1024
+ [data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] > [data-part-grip],
1025
+ [data-ui-drawer][data-side='bottom']
1026
+ > [data-part-panel]
1027
+ > [data-part-resizer]
1028
+ > [data-part-grip] {
954
1029
  background-color: var(--_rest);
955
1030
  border-radius: var(--slotted-radius-full, 9999px);
956
1031
  block-size: var(--slotted-space-2, 0.25rem);
@@ -958,63 +1033,57 @@
958
1033
  }
959
1034
 
960
1035
  /* A sheet's lines are not painted: the pill is the whole picture. */
961
- [data-ui='drawer'][data-side='top']
962
- > [data-part='panel']
963
- > [data-part='resizer']
964
- > [data-part='line'],
965
- [data-ui='drawer'][data-side='bottom']
966
- > [data-part='panel']
967
- > [data-part='resizer']
968
- > [data-part='line'] {
1036
+ [data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] > [data-part-line],
1037
+ [data-ui-drawer][data-side='bottom']
1038
+ > [data-part-panel]
1039
+ > [data-part-resizer]
1040
+ > [data-part-line] {
969
1041
  display: none;
970
1042
  }
971
1043
 
972
1044
  /**
973
- * The dot matrix recolours its ink and nothing else: its dots are
1045
+ * The dot matrix recolors its ink and nothing else: its dots are
974
1046
  * `currentColor` over a transparent box, and a `background-color` here filled
975
1047
  * the box — the grip became a solid block under the hand, under hover and
976
1048
  * under focus. `splitter`, which draws the same picture, only ever changed
977
- * `color`. The pill on a block side is a filled box, so it recolours its fill.
1049
+ * `color`. The pill on a block side is a filled box, so it recolors its fill.
978
1050
  */
979
- [data-ui='drawer']
980
- > [data-part='panel']
981
- > [data-part='resizer']:not([data-disabled]):hover
982
- > [data-part='grip'],
983
- [data-ui='drawer']
984
- > [data-part='panel']
985
- > [data-part='resizer']:not([data-disabled]):focus-visible
986
- > [data-part='grip'],
987
- [data-ui='drawer'][data-dragging]
988
- > [data-part='panel']
989
- > [data-part='resizer']
990
- > [data-part='grip'] {
1051
+ [data-ui-drawer]
1052
+ > [data-part-panel]
1053
+ > [data-part-resizer]:not([data-disabled]):hover
1054
+ > [data-part-grip],
1055
+ [data-ui-drawer]
1056
+ > [data-part-panel]
1057
+ > [data-part-resizer]:not([data-disabled]):focus-visible
1058
+ > [data-part-grip],
1059
+ [data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
991
1060
  color: var(--_active);
992
1061
  }
993
1062
 
994
- [data-ui='drawer'][data-side='top']
995
- > [data-part='panel']
996
- > [data-part='resizer']:not([data-disabled]):hover
997
- > [data-part='grip'],
998
- [data-ui='drawer'][data-side='bottom']
999
- > [data-part='panel']
1000
- > [data-part='resizer']:not([data-disabled]):hover
1001
- > [data-part='grip'],
1002
- [data-ui='drawer'][data-side='top']
1003
- > [data-part='panel']
1004
- > [data-part='resizer']:not([data-disabled]):focus-visible
1005
- > [data-part='grip'],
1006
- [data-ui='drawer'][data-side='bottom']
1007
- > [data-part='panel']
1008
- > [data-part='resizer']:not([data-disabled]):focus-visible
1009
- > [data-part='grip'],
1010
- [data-ui='drawer'][data-dragging][data-side='top']
1011
- > [data-part='panel']
1012
- > [data-part='resizer']
1013
- > [data-part='grip'],
1014
- [data-ui='drawer'][data-dragging][data-side='bottom']
1015
- > [data-part='panel']
1016
- > [data-part='resizer']
1017
- > [data-part='grip'] {
1063
+ [data-ui-drawer][data-side='top']
1064
+ > [data-part-panel]
1065
+ > [data-part-resizer]:not([data-disabled]):hover
1066
+ > [data-part-grip],
1067
+ [data-ui-drawer][data-side='bottom']
1068
+ > [data-part-panel]
1069
+ > [data-part-resizer]:not([data-disabled]):hover
1070
+ > [data-part-grip],
1071
+ [data-ui-drawer][data-side='top']
1072
+ > [data-part-panel]
1073
+ > [data-part-resizer]:not([data-disabled]):focus-visible
1074
+ > [data-part-grip],
1075
+ [data-ui-drawer][data-side='bottom']
1076
+ > [data-part-panel]
1077
+ > [data-part-resizer]:not([data-disabled]):focus-visible
1078
+ > [data-part-grip],
1079
+ [data-ui-drawer][data-dragging][data-side='top']
1080
+ > [data-part-panel]
1081
+ > [data-part-resizer]
1082
+ > [data-part-grip],
1083
+ [data-ui-drawer][data-dragging][data-side='bottom']
1084
+ > [data-part-panel]
1085
+ > [data-part-resizer]
1086
+ > [data-part-grip] {
1018
1087
  background-color: var(--_active);
1019
1088
  }
1020
1089
 
@@ -1031,10 +1100,10 @@
1031
1100
  * its middle. The two pictures differ, which is all the ring has to do here.
1032
1101
  *
1033
1102
  * It cannot be drawn on the reach instead. `packages/styles/src/fallbacks.test.mjs`
1034
- * forbids a system colour inside `::before` or `::after`, and the ring's own
1103
+ * forbids a system color inside `::before` or `::after`, and the ring's own
1035
1104
  * last resort is `Highlight`.
1036
1105
  */
1037
- [data-ui='drawer'] > [data-part='panel'] > [data-part='resizer']:focus-visible {
1106
+ [data-ui-drawer] > [data-part-panel] > [data-part-resizer]:focus-visible {
1038
1107
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
1039
1108
  outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
1040
1109
  }
@@ -1046,13 +1115,13 @@
1046
1115
  * between a resize the engine prepares for and one it discovers each frame.
1047
1116
  * It is written on the panel because the panel is what changes size.
1048
1117
  */
1049
- [data-ui='drawer'][data-dragging][data-side='start'] > [data-part='panel'],
1050
- [data-ui='drawer'][data-dragging][data-side='end'] > [data-part='panel'] {
1118
+ [data-ui-drawer][data-dragging][data-side='start'] > [data-part-panel],
1119
+ [data-ui-drawer][data-dragging][data-side='end'] > [data-part-panel] {
1051
1120
  will-change: inline-size;
1052
1121
  }
1053
1122
 
1054
- [data-ui='drawer'][data-dragging][data-side='top'] > [data-part='panel'],
1055
- [data-ui='drawer'][data-dragging][data-side='bottom'] > [data-part='panel'] {
1123
+ [data-ui-drawer][data-dragging][data-side='top'] > [data-part-panel],
1124
+ [data-ui-drawer][data-dragging][data-side='bottom'] > [data-part-panel] {
1056
1125
  will-change: block-size;
1057
1126
  }
1058
1127
 
@@ -1068,7 +1137,8 @@
1068
1137
  * consumer can write: a header, a body and a footer draw two rules; a header
1069
1138
  * and a footer alone draw one; and a panel that is only a body draws none.
1070
1139
  */
1071
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] {
1140
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header],
1141
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] {
1072
1142
  grid-row: 1;
1073
1143
  display: grid;
1074
1144
  grid-template-columns: minmax(0, 1fr) auto;
@@ -1085,7 +1155,8 @@
1085
1155
  * panel past its own measure, and a panel pinned to an edge then pushes its
1086
1156
  * inner edge across the layer.
1087
1157
  */
1088
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] > [data-part='title'] {
1158
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-title],
1159
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-title] {
1089
1160
  grid-column: 1;
1090
1161
  grid-row: 1;
1091
1162
  margin: 0;
@@ -1104,7 +1175,46 @@
1104
1175
  color: var(--slotted-drawer-title-color, var(--slotted-text, CanvasText));
1105
1176
  }
1106
1177
 
1107
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] > [data-part='description'] {
1178
+ /* Actions take a column between the words and the close button, on the title's row. */
1179
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header]:has(> [data-part-actions]),
1180
+ [data-ui-drawer] > [data-part-panel] > [data-part-header]:has(> [data-part-actions]) {
1181
+ grid-template-columns: minmax(0, 1fr) auto auto;
1182
+ }
1183
+
1184
+ /* A column gap is drawn beside an empty track too, so a header holds only the
1185
+ columns of the parts it has. */
1186
+ [data-ui-drawer]
1187
+ > [data-part-panel]
1188
+ > form
1189
+ > [data-part-header]:has(> [data-part-actions]):not(:has(> [data-part-close])),
1190
+ [data-ui-drawer]
1191
+ > [data-part-panel]
1192
+ > [data-part-header]:has(> [data-part-actions]):not(:has(> [data-part-close])) {
1193
+ grid-template-columns: minmax(0, 1fr) auto;
1194
+ }
1195
+
1196
+ [data-ui-drawer]
1197
+ > [data-part-panel]
1198
+ > form
1199
+ > [data-part-header]:not(:has(> [data-part-actions], > [data-part-close])),
1200
+ [data-ui-drawer]
1201
+ > [data-part-panel]
1202
+ > [data-part-header]:not(:has(> [data-part-actions], > [data-part-close])) {
1203
+ grid-template-columns: minmax(0, 1fr);
1204
+ }
1205
+
1206
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-actions],
1207
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-actions] {
1208
+ grid-column: 2;
1209
+ grid-row: 1 / span 2;
1210
+ align-self: start;
1211
+ display: flex;
1212
+ align-items: center;
1213
+ gap: var(--slotted-space-2, 0.25rem);
1214
+ }
1215
+
1216
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-description],
1217
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-description] {
1108
1218
  grid-column: 1;
1109
1219
  grid-row: 2;
1110
1220
  margin: 0;
@@ -1120,15 +1230,17 @@
1120
1230
  /**
1121
1231
  * An inner control, not a button (R2): the box is the glyph plus a step of
1122
1232
  * air on each side, floored at the WCAG 2.2 minimum, and the glyph is
1123
- * centred in it. It was the control height before, a thirty-four pixel
1233
+ * centerd in it. It was the control height before, a thirty-four pixel
1124
1234
  * square beside a sixteen pixel mark. The glyph is the binding's `Glyph` in
1125
1235
  * an `icon` box, sized here through the icon token so the box and the
1126
1236
  * formula above read one length.
1127
1237
  */
1128
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] > [data-part='close'] {
1238
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-close],
1239
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close] {
1129
1240
  --slotted-icon-size: var(--_icon-size);
1130
1241
 
1131
- grid-column: 2;
1242
+ /* The last column, beside the actions when there are any. */
1243
+ grid-column: -2;
1132
1244
  grid-row: 1 / span 2;
1133
1245
  align-self: start;
1134
1246
  display: inline-grid;
@@ -1153,24 +1265,31 @@
1153
1265
  }
1154
1266
 
1155
1267
  /* On a finger the target is the comfortable size in both axes and the box
1156
- is the one a mouse sees: a transparent `::before` centred on the control
1268
+ is the one a mouse sees: a transparent `::before` centerd on the control
1157
1269
  reaches 44 pixels, and the ground and the ring stay square. */
1158
1270
  @media (pointer: coarse) {
1159
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] > [data-part='close'] {
1271
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-close],
1272
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close] {
1160
1273
  position: relative;
1161
1274
  }
1162
1275
 
1163
- [data-ui='drawer'] > [data-part='panel'] > [data-part='header'] > [data-part='close']::before {
1276
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-header] > [data-part-close]::before,
1277
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close]::before {
1164
1278
  content: '';
1165
1279
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
1166
1280
  position: absolute;
1167
1281
  }
1168
1282
  }
1169
1283
 
1170
- [data-ui='drawer']
1171
- > [data-part='panel']
1172
- > [data-part='header']
1173
- > [data-part='close']:not(:disabled):hover {
1284
+ [data-ui-drawer]
1285
+ > [data-part-panel]
1286
+ > form
1287
+ > [data-part-header]
1288
+ > [data-part-close]:not(:disabled):hover,
1289
+ [data-ui-drawer]
1290
+ > [data-part-panel]
1291
+ > [data-part-header]
1292
+ > [data-part-close]:not(:disabled):hover {
1174
1293
  /* The ground moves under the pointer and nothing else does (R2). */
1175
1294
  background-color: var(
1176
1295
  --slotted-drawer-close-hover-background,
@@ -1178,20 +1297,27 @@
1178
1297
  );
1179
1298
  }
1180
1299
 
1181
- [data-ui='drawer']
1182
- > [data-part='panel']
1183
- > [data-part='header']
1184
- > [data-part='close']:not(:disabled):active {
1300
+ [data-ui-drawer]
1301
+ > [data-part-panel]
1302
+ > form
1303
+ > [data-part-header]
1304
+ > [data-part-close]:not(:disabled):active,
1305
+ [data-ui-drawer]
1306
+ > [data-part-panel]
1307
+ > [data-part-header]
1308
+ > [data-part-close]:not(:disabled):active {
1185
1309
  background-color: var(
1186
1310
  --slotted-drawer-close-active-background,
1187
1311
  var(--slotted-tone-secondary-subtle-active)
1188
1312
  );
1189
1313
  }
1190
1314
 
1191
- [data-ui='drawer']
1192
- > [data-part='panel']
1193
- > [data-part='header']
1194
- > [data-part='close']:focus-visible {
1315
+ [data-ui-drawer]
1316
+ > [data-part-panel]
1317
+ > form
1318
+ > [data-part-header]
1319
+ > [data-part-close]:focus-visible,
1320
+ [data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close]:focus-visible {
1195
1321
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
1196
1322
  outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
1197
1323
  }
@@ -1204,7 +1330,8 @@
1204
1330
  * `dismissable-layer` covers the modal case; this covers the other two, where
1205
1331
  * the page behind is not locked at all.
1206
1332
  */
1207
- [data-ui='drawer'] > [data-part='panel'] > [data-part='body'] {
1333
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-body],
1334
+ [data-ui-drawer] > [data-part-panel] > [data-part-body] {
1208
1335
  grid-row: 2;
1209
1336
  min-block-size: 0;
1210
1337
  min-inline-size: 0;
@@ -1221,11 +1348,13 @@
1221
1348
  }
1222
1349
 
1223
1350
  /* Content that brings its own inset — a page, a list on the panel's edges. */
1224
- [data-ui='drawer'] > [data-part='panel'] > [data-part='body'][data-inset='none'] {
1351
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-body][data-inset='none'],
1352
+ [data-ui-drawer] > [data-part-panel] > [data-part-body][data-inset='none'] {
1225
1353
  padding: 0;
1226
1354
  }
1227
1355
 
1228
- [data-ui='drawer'] > [data-part='panel'] > [data-part='body']:not(:first-child) {
1356
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-body]:not(:first-child),
1357
+ [data-ui-drawer] > [data-part-panel] > [data-part-body]:not(:first-child) {
1229
1358
  border-block-start: var(--_rule-size) solid
1230
1359
  var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder));
1231
1360
  }
@@ -1237,7 +1366,8 @@
1237
1366
  * instead, and the header, the close button, Escape and the resizer all stay
1238
1367
  * operable: a loading drawer a reader cannot leave is the worse failure.
1239
1368
  */
1240
- [data-ui='drawer'][data-loading] > [data-part='panel'] > [data-part='body'] {
1369
+ [data-ui-drawer][data-loading] > [data-part-panel] > form > [data-part-body],
1370
+ [data-ui-drawer][data-loading] > [data-part-panel] > [data-part-body] {
1241
1371
  min-block-size: var(--slotted-space-12, 4rem);
1242
1372
  }
1243
1373
 
@@ -1249,16 +1379,28 @@
1249
1379
  * reason the middle one is bounded — an unbounded panel pushes it past the
1250
1380
  * fold, which is the whole failure the three-row grid exists to prevent.
1251
1381
  */
1252
- [data-ui='drawer'] > [data-part='panel'] > [data-part='footer'] {
1382
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-footer],
1383
+ [data-ui-drawer] > [data-part-panel] > [data-part-footer] {
1253
1384
  grid-row: 3;
1254
1385
  display: flex;
1255
1386
  flex-wrap: wrap;
1256
1387
  align-items: center;
1257
1388
  justify-content: flex-end;
1258
- gap: var(--_gap);
1389
+ gap: var(--slotted-action-gap, 8px);
1259
1390
  padding-block: var(--_padding-block);
1260
1391
  padding-inline: var(--_row-padding-inline-start) var(--_row-padding-inline-end);
1261
1392
  background: var(--slotted-drawer-footer-surface, var(--slotted-surface-sunken, Canvas));
1393
+ /* The body scrolls under the footer; the panel's own filter blurs only what lies behind the panel. */
1394
+ -webkit-backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
1395
+ backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
1396
+ }
1397
+
1398
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
1399
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-footer],
1400
+ [data-ui-drawer] > [data-part-panel] > [data-part-footer] {
1401
+ -webkit-backdrop-filter: none;
1402
+ backdrop-filter: none;
1403
+ }
1262
1404
  }
1263
1405
 
1264
1406
  /**
@@ -1274,18 +1416,20 @@
1274
1416
  * above it and the header already clears it; the body scrolls, so an inset on
1275
1417
  * it would be padding inside a scrollport rather than under it.
1276
1418
  */
1277
- [data-ui='drawer'][data-side='bottom'] > [data-part='panel'] > [data-part='footer'] {
1419
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > form > [data-part-footer],
1420
+ [data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-footer] {
1278
1421
  padding-block-end: calc(
1279
1422
  var(--_footer-padding-block, var(--_padding-block)) + env(safe-area-inset-bottom, 0px)
1280
1423
  );
1281
1424
  }
1282
1425
 
1283
- [data-ui='drawer'] > [data-part='panel'] > [data-part='footer']:not(:first-child) {
1426
+ [data-ui-drawer] > [data-part-panel] > form > [data-part-footer]:not(:first-child),
1427
+ [data-ui-drawer] > [data-part-panel] > [data-part-footer]:not(:first-child) {
1284
1428
  border-block-start: var(--_rule-size) solid
1285
1429
  var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder));
1286
1430
  }
1287
1431
 
1288
- /* ── Forced colours ───────────────────────────────────────────────────── */
1432
+ /* ── Forced colors ───────────────────────────────────────────────────── */
1289
1433
 
1290
1434
  /**
1291
1435
  * The theme remaps every token this family reads, so the only rule here is the
@@ -1295,9 +1439,364 @@
1295
1439
  * border is read at, and gives the panel the three edges its side does not.
1296
1440
  */
1297
1441
  @media (forced-colors: active) {
1298
- [data-ui='drawer'] > [data-part='panel'] {
1442
+ [data-ui-drawer] > [data-part-panel] {
1299
1443
  border-width: var(--slotted-border-width-thick, 2px);
1300
1444
  border-color: CanvasText;
1301
1445
  }
1302
1446
  }
1447
+
1448
+ /* ── The sheet on the platform's scroll ─────────────────────────────── */
1449
+
1450
+ /**
1451
+ * An overlay sheet from the bottom that a hand moves (`data-drag`) is moved by
1452
+ * the platform's own scroll: the layer scrolls, a spacer the height of the
1453
+ * layer comes before the panel, and `scrollTop` is how much of the panel is
1454
+ * in sight. The stops are snap points that `attachSheetScroll` in
1455
+ * `@slotted/core/extent` lays out, so the finger, the fling and the landing
1456
+ * are the compositor's. The layer takes no press of its own: the scrim and
1457
+ * the panel do, and a touch on the panel scrolls the layer.
1458
+ */
1459
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] {
1460
+ display: block;
1461
+ overflow-x: hidden;
1462
+ overflow-y: auto;
1463
+ overscroll-behavior: contain;
1464
+ scroll-snap-type: y mandatory;
1465
+ scroll-padding-block-end: var(--slotted-keyboard-inset, 0px);
1466
+ scrollbar-width: none;
1467
+ scroll-timeline: --slotted-drawer-sheet block;
1468
+ pointer-events: none;
1469
+ }
1470
+
1471
+ /**
1472
+ * Opening and closing are a travel of the binding: the scroll lands on the
1473
+ * resting stop or on nothing at once, and the panel slides there from where
1474
+ * it was drawn, in the slide tokens (`attachSheetScroll`). The layer is kept
1475
+ * for as long as the exit takes. Leaving, nothing re-snaps: a re-snap would
1476
+ * lift the panel back into view on its way out.
1477
+ */
1478
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] {
1479
+ --_reveal: content-visibility
1480
+ calc(var(--slotted-duration-long) + var(--slotted-duration-medium)) allow-discrete;
1481
+ }
1482
+
1483
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-open]) {
1484
+ scroll-snap-type: none;
1485
+ }
1486
+
1487
+ /* Nor before the stops are laid out: the opening scrolls up from out of sight, not from the panel's end. */
1488
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-sheet-ready]) {
1489
+ scroll-snap-type: none;
1490
+ }
1491
+
1492
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-open])
1493
+ > [data-part-panel] {
1494
+ translate: 0 0;
1495
+ }
1496
+
1497
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]::-webkit-scrollbar {
1498
+ display: none;
1499
+ }
1500
+
1501
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]::before {
1502
+ content: '';
1503
+ display: block;
1504
+ block-size: 100%;
1505
+ }
1506
+
1507
+ /* Fixed, so a touch on it scrolls nothing and a press on it is a press outside. */
1508
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
1509
+ position: fixed;
1510
+ inset: 0;
1511
+ }
1512
+
1513
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-undimmed])
1514
+ > [data-part-backdrop] {
1515
+ pointer-events: auto;
1516
+ }
1517
+
1518
+ /**
1519
+ * The panel clips its corners without being a scroll container, so what
1520
+ * sticks inside it sticks to the layer's scrollport: the screen. The measure
1521
+ * does not ease; nothing animates it, the scroll moves the panel. The second
1522
+ * shadow is the panel's surface below its edge, which a rubber band past the
1523
+ * highest stop shows instead of a gap.
1524
+ */
1525
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-panel] {
1526
+ pointer-events: auto;
1527
+ scroll-snap-align: end;
1528
+ margin-inline: auto;
1529
+ overflow: clip;
1530
+ max-block-size: none;
1531
+ box-shadow:
1532
+ var(--slotted-shadow-lg),
1533
+ 0 50vh 0 0 var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));
1534
+ transition:
1535
+ translate var(--_slide),
1536
+ border-start-start-radius var(--_move),
1537
+ border-start-end-radius var(--_move);
1538
+ }
1539
+
1540
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1541
+ > [data-part-panel]
1542
+ > form
1543
+ > [data-part-footer],
1544
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1545
+ > [data-part-panel]
1546
+ > [data-part-footer] {
1547
+ position: sticky;
1548
+ /* A close lands the scroll at once and slides the panel with a transform,
1549
+ which sticky positioning ignores: the travel's length holds the footer
1550
+ where it rested in the panel (`--slotted-drawer-sheet-travel`). */
1551
+ inset-block-end: calc(
1552
+ var(--slotted-keyboard-inset, 0px) - var(--slotted-drawer-sheet-travel, 0px)
1553
+ );
1554
+ z-index: 1;
1555
+ background: var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));
1556
+ }
1557
+
1558
+ /**
1559
+ * `drag="panel"`: one scroll for the sheet and what it holds, Android's
1560
+ * nested scrolling in a single scroller. The panel is as tall as its content;
1561
+ * the body does not scroll on its own. A hand pushing up from a lower stop
1562
+ * lifts the sheet to the top of the screen and, without letting go, goes on
1563
+ * scrolling the content under the header that sticks there; pulling down
1564
+ * from the top of the content brings the sheet down. A panel taller than the
1565
+ * layer is a snap area larger than the snapport, so every position inside it
1566
+ * is a resting one. Content at rest past the top is read with the snap off
1567
+ * (`data-sheet-content`); going back below the top turns it on, and that
1568
+ * re-snap stops a fling out of the content at the top.
1569
+ */
1570
+ /* The rows take their content and a last one what is left, so the content's end is read off its parts. */
1571
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'] > [data-part-panel] {
1572
+ block-size: auto;
1573
+ min-block-size: var(--slotted-drawer-sheet-height, 0px);
1574
+ grid-template-rows: auto auto auto auto minmax(0, 1fr);
1575
+ }
1576
+
1577
+ /* `size="full"` is the screen: the footer rests at its bottom, in the row that takes what is left. */
1578
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-size='full']
1579
+ > [data-part-panel]
1580
+ > form
1581
+ > [data-part-footer],
1582
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-size='full']
1583
+ > [data-part-panel]
1584
+ > [data-part-footer] {
1585
+ grid-row: 5;
1586
+ align-self: end;
1587
+ }
1588
+
1589
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-scrolls]
1590
+ > [data-part-panel] {
1591
+ scroll-snap-align: start;
1592
+ }
1593
+
1594
+ /* Content at rest past the top: the snap is off so a layout does not re-snap it to the top. */
1595
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-content] {
1596
+ scroll-snap-type: none;
1597
+ }
1598
+
1599
+ /* No finger on content at rest: the spacer folds, and the top of the content is an edge. */
1600
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-anchored]::before {
1601
+ block-size: 0;
1602
+ }
1603
+
1604
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1605
+ > [data-part-panel]
1606
+ > form
1607
+ > [data-part-body],
1608
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1609
+ > [data-part-panel]
1610
+ > [data-part-body] {
1611
+ overflow: visible;
1612
+ overscroll-behavior: auto;
1613
+ }
1614
+
1615
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1616
+ > [data-part-panel]
1617
+ > [data-part-resizer] {
1618
+ position: sticky;
1619
+ inset-block-start: 0;
1620
+ z-index: 2;
1621
+ }
1622
+
1623
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1624
+ > [data-part-panel]
1625
+ > form
1626
+ > [data-part-header],
1627
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1628
+ > [data-part-panel]
1629
+ > [data-part-header] {
1630
+ position: sticky;
1631
+ inset-block-start: 0;
1632
+ z-index: 1;
1633
+ }
1634
+
1635
+ /**
1636
+ * At rest the panel's own surface is behind the resizer and the header, and
1637
+ * a second coat of a translucent surface read as a darker band. They paint
1638
+ * one only once the content passes under them (`data-stuck`), in tokens of
1639
+ * their own, as the footer has: a frosted theme gives them a blur and a
1640
+ * lighter fill there.
1641
+ */
1642
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1643
+ > [data-part-panel]
1644
+ > form
1645
+ > :is([data-part-resizer], [data-part-header])[data-stuck],
1646
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1647
+ > [data-part-panel]
1648
+ > :is([data-part-resizer], [data-part-header])[data-stuck] {
1649
+ background: var(
1650
+ --slotted-drawer-header-surface,
1651
+ var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas))
1652
+ );
1653
+ -webkit-backdrop-filter: var(--slotted-drawer-header-backdrop-filter, none);
1654
+ backdrop-filter: var(--slotted-drawer-header-backdrop-filter, none);
1655
+ }
1656
+
1657
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
1658
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1659
+ > [data-part-panel]
1660
+ > form
1661
+ > :is([data-part-resizer], [data-part-header])[data-stuck],
1662
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1663
+ > [data-part-panel]
1664
+ > :is([data-part-resizer], [data-part-header])[data-stuck] {
1665
+ -webkit-backdrop-filter: none;
1666
+ backdrop-filter: none;
1667
+ }
1668
+ }
1669
+
1670
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1671
+ > [data-part-panel]:has(> [data-part-resizer])
1672
+ > [data-part-header] {
1673
+ inset-block-start: var(--_resizer-thickness);
1674
+ }
1675
+
1676
+ /**
1677
+ * `drag="resizer"`: only the grabber moves the sheet. The panel is laid out at
1678
+ * the highest stop and the body scrolls inside it, at the highest stop only.
1679
+ */
1680
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']
1681
+ > [data-part-panel] {
1682
+ block-size: var(--slotted-drawer-sheet-height, auto);
1683
+ touch-action: none;
1684
+ }
1685
+
1686
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']
1687
+ > [data-part-panel]
1688
+ > form
1689
+ > [data-part-body],
1690
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']
1691
+ > [data-part-panel]
1692
+ > [data-part-body] {
1693
+ touch-action: pan-y;
1694
+ }
1695
+
1696
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']:not(
1697
+ [data-top-stop]
1698
+ )
1699
+ > [data-part-panel]
1700
+ > form
1701
+ > [data-part-body],
1702
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']:not(
1703
+ [data-top-stop]
1704
+ )
1705
+ > [data-part-panel]
1706
+ > [data-part-body] {
1707
+ overflow: hidden;
1708
+ }
1709
+
1710
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1711
+ > [data-part-panel]
1712
+ > [data-part-resizer] {
1713
+ touch-action: pan-y;
1714
+ }
1715
+
1716
+ /* Every region inside the sheet passes its block-axis overscroll on to the sheet, a family's own `contain` included. */
1717
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
1718
+ > [data-part-panel]
1719
+ * {
1720
+ overscroll-behavior-y: auto;
1721
+ }
1722
+
1723
+ /* A region the consumer keeps from the sheet: its own scroll never passes on to it. */
1724
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] [data-drawer-drag='none'] {
1725
+ overscroll-behavior: contain;
1726
+ }
1727
+
1728
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1729
+ > [data-part-stops]
1730
+ [data-part-stop] {
1731
+ position: absolute;
1732
+ inset-inline: 0;
1733
+ block-size: 0;
1734
+ scroll-snap-align: start;
1735
+ pointer-events: none;
1736
+ }
1737
+
1738
+ /**
1739
+ * The scrim dims with the sheet: out of sight it is clear, at the lowest stop
1740
+ * it is whole. The element keeps the fade it opens and closes with; the
1741
+ * scroll drives a layer inside it, and the two multiply. The scroll drives the
1742
+ * filter of the element itself, from none to the token.
1743
+ */
1744
+ @supports (animation-timeline: scroll()) {
1745
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
1746
+ background: none;
1747
+ }
1748
+
1749
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-modal]:not(
1750
+ [data-sheet-content],
1751
+ [data-sheet-travel]
1752
+ )
1753
+ > [data-part-backdrop] {
1754
+ animation: slotted-drawer-sheet-filter linear both;
1755
+ animation-timeline: --slotted-drawer-sheet;
1756
+ animation-range: 0px var(--slotted-drawer-sheet-floor, 100%);
1757
+ }
1758
+
1759
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1760
+ > [data-part-backdrop]::before {
1761
+ content: '';
1762
+ position: absolute;
1763
+ inset: 0;
1764
+ /* A decoration: unthemed, it is not painted rather than painted in a system color. */
1765
+ background: var(--slotted-drawer-scrim, var(--slotted-scrim));
1766
+ animation: slotted-drawer-sheet-dim linear both;
1767
+ animation-timeline: --slotted-drawer-sheet;
1768
+ animation-range: 0px var(--slotted-drawer-sheet-floor, 100%);
1769
+ }
1770
+
1771
+ /* Reading content, the sheet is at the top: the scrim is whole, wherever the scroll is. */
1772
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-sheet-content]
1773
+ > [data-part-backdrop]::before {
1774
+ animation: none;
1775
+ }
1776
+
1777
+ /* Along a travel the scroll has already landed: the binding animates the layer
1778
+ with the panel, from the value held here for the first frame. */
1779
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-sheet-travel]
1780
+ > [data-part-backdrop]::before {
1781
+ animation: none;
1782
+ opacity: var(--slotted-drawer-sheet-dim, 1);
1783
+ }
1784
+ }
1785
+
1786
+ @keyframes slotted-drawer-sheet-filter {
1787
+ from {
1788
+ -webkit-backdrop-filter: none;
1789
+ backdrop-filter: none;
1790
+ }
1791
+ }
1792
+
1793
+ @keyframes slotted-drawer-sheet-dim {
1794
+ from {
1795
+ opacity: 0;
1796
+ }
1797
+
1798
+ to {
1799
+ opacity: 1;
1800
+ }
1801
+ }
1303
1802
  }