@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
package/src/menu/menu.css CHANGED
@@ -53,7 +53,7 @@
53
53
  * menu holds more commands and is the same component; only the surface's own
54
54
  * inset and radius come off the space and radius scales, as `popover`'s do.
55
55
  */
56
- [data-ui='menu'] {
56
+ [data-ui-menu] {
57
57
  --_gap: var(--slotted-menu-gap, var(--slotted-space-2, 0.25rem));
58
58
 
59
59
  --_surface: var(--slotted-menu-surface, var(--slotted-surface-raised, #ffffff));
@@ -86,7 +86,11 @@
86
86
  --_item-padding: var(--slotted-control-padding-inline-md, 0.8125rem);
87
87
  --_item-inset: calc(var(--_item-padding) - var(--_inset-inline));
88
88
  --_item-height: var(--slotted-control-height-md, 34px);
89
- --_item-radius: var(--slotted-menu-item-radius, var(--slotted-control-radius));
89
+ /* Concentric with the panel: its radius less the inset, floored at 0. */
90
+ --_item-radius: var(
91
+ --slotted-menu-item-radius,
92
+ max(0px, calc(var(--_radius) - var(--_inset-inline)))
93
+ );
90
94
  --_font-size: var(--slotted-control-font-size-md, 13px);
91
95
  --_secondary-font-size: var(--slotted-control-font-size-sm, 12px);
92
96
  --_icon-size: var(--slotted-control-icon-size-md, 16px);
@@ -162,7 +166,6 @@
162
166
  pointer, and the frame must not swallow a press meant for the page. */
163
167
  pointer-events: none;
164
168
 
165
- opacity: 0;
166
169
  /**
167
170
  * R7: the layer arrives along the axis it opens on — from one space step
168
171
  * above its place when it opens downward, from one step below when it
@@ -172,26 +175,24 @@
172
175
  */
173
176
  --_enter-distance: var(--slotted-space-2, 0.25rem);
174
177
  translate: 0 calc(-1 * var(--_enter-distance));
175
- transition:
176
- opacity var(--slotted-duration-short) var(--slotted-easing-exit),
177
- translate var(--slotted-duration-short) var(--slotted-easing-exit);
178
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
178
179
  }
179
180
 
180
- [data-ui='menu'][data-side='top'] {
181
+ [data-ui-menu][data-side='top'] {
181
182
  translate: 0 var(--_enter-distance);
182
183
  }
183
184
 
184
185
  /* A submenu, or a menu placed beside its anchor, arrives along the inline
185
186
  axis it opens on: from one step inside the parent's edge (M1). */
186
- [data-ui='menu'][data-side='right'] {
187
+ [data-ui-menu][data-side='right'] {
187
188
  translate: calc(-1 * var(--_enter-distance)) 0;
188
189
  }
189
190
 
190
- [data-ui='menu'][data-side='left'] {
191
+ [data-ui-menu][data-side='left'] {
191
192
  translate: var(--_enter-distance) 0;
192
193
  }
193
194
 
194
- [data-ui='menu']:is([data-side='left'], [data-side='right']) {
195
+ [data-ui-menu]:is([data-side='left'], [data-side='right']) {
195
196
  padding-block: 0;
196
197
  padding-inline: var(--_gap);
197
198
  }
@@ -205,8 +206,7 @@
205
206
  * A keyframe states where it starts. The exit stays a transition: it
206
207
  * leaves from wherever the layer is, on the closed rule's durations.
207
208
  */
208
- [data-ui='menu'][data-open] {
209
- opacity: 1;
209
+ [data-ui-menu][data-open] {
210
210
  translate: 0 0;
211
211
  transition: none;
212
212
  }
@@ -216,46 +216,42 @@
216
216
  * with the side, and a layer written open in static markup — the harness,
217
217
  * a docs snippet — is simply there, and is photographed where it stands.
218
218
  */
219
- [data-ui='menu'][data-open][data-positioned] {
219
+ [data-ui-menu][data-open][data-positioned] {
220
220
  animation: slotted-menu-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter);
221
221
  }
222
222
 
223
- [data-ui='menu'][data-open][data-positioned][data-side='top'] {
223
+ [data-ui-menu][data-open][data-positioned][data-side='top'] {
224
224
  animation-name: slotted-menu-enter-up;
225
225
  }
226
226
 
227
- [data-ui='menu'][data-open][data-positioned][data-side='right'] {
227
+ [data-ui-menu][data-open][data-positioned][data-side='right'] {
228
228
  animation-name: slotted-menu-enter-from-start;
229
229
  }
230
230
 
231
- [data-ui='menu'][data-open][data-positioned][data-side='left'] {
231
+ [data-ui-menu][data-open][data-positioned][data-side='left'] {
232
232
  animation-name: slotted-menu-enter-from-end;
233
233
  }
234
234
 
235
235
  @keyframes slotted-menu-enter-down {
236
236
  from {
237
- opacity: 0;
238
237
  translate: 0 calc(-1 * var(--_enter-distance));
239
238
  }
240
239
  }
241
240
 
242
241
  @keyframes slotted-menu-enter-up {
243
242
  from {
244
- opacity: 0;
245
243
  translate: 0 var(--_enter-distance);
246
244
  }
247
245
  }
248
246
 
249
247
  @keyframes slotted-menu-enter-from-start {
250
248
  from {
251
- opacity: 0;
252
249
  translate: calc(-1 * var(--_enter-distance)) 0;
253
250
  }
254
251
  }
255
252
 
256
253
  @keyframes slotted-menu-enter-from-end {
257
254
  from {
258
- opacity: 0;
259
255
  translate: var(--_enter-distance) 0;
260
256
  }
261
257
  }
@@ -266,31 +262,74 @@
266
262
  }
267
263
  }
268
264
 
265
+ /**
266
+ * The fade belongs to the part that paints the surface, and the layer only
267
+ * moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
268
+ * of what it holds, so a `backdrop-filter` on the content blurs nothing until
269
+ * the layer is opaque and then appears at once. The content's own opacity
270
+ * leaves its own filter drawn on every frame of the motion.
271
+ */
272
+ [data-ui-menu] > [data-part-content] {
273
+ opacity: 0;
274
+ transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
275
+ }
276
+
277
+ [data-ui-menu][data-open] > [data-part-content] {
278
+ opacity: 1;
279
+ transition: none;
280
+ }
281
+
282
+ [data-ui-menu][data-open][data-positioned] > [data-part-content] {
283
+ animation: slotted-menu-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
284
+ }
285
+
269
286
  /* Stillness keeps the fade and drops the movement (R7). */
270
287
  @media (prefers-reduced-motion: reduce) {
271
- [data-ui='menu'],
272
- [data-ui='menu'][data-side='top'],
273
- [data-ui='menu'][data-side='left'],
274
- [data-ui='menu'][data-side='right'] {
288
+ [data-ui-menu],
289
+ [data-ui-menu][data-side='top'],
290
+ [data-ui-menu][data-side='left'],
291
+ [data-ui-menu][data-side='right'] {
275
292
  translate: 0 0;
276
- transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
293
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
277
294
  }
278
295
 
279
- [data-ui='menu'][data-open][data-positioned],
280
- [data-ui='menu'][data-open][data-positioned][data-side='top'],
281
- [data-ui='menu'][data-open][data-positioned][data-side='left'],
282
- [data-ui='menu'][data-open][data-positioned][data-side='right'] {
283
- animation-name: slotted-menu-fade;
296
+ [data-ui-menu][data-open][data-positioned],
297
+ [data-ui-menu][data-open][data-positioned][data-side='top'],
298
+ [data-ui-menu][data-open][data-positioned][data-side='left'],
299
+ [data-ui-menu][data-open][data-positioned][data-side='right'] {
300
+ animation-name: none;
284
301
  }
285
302
  }
286
303
 
287
304
  /* The anchor scrolled out of its own clipper. The menu is still open and its
288
305
  commands still belong to a control the reader can no longer see. */
289
- [data-ui='menu'][data-detached] {
306
+ [data-ui-menu][data-detached] {
290
307
  visibility: hidden;
291
308
  }
292
309
 
293
- [data-ui='menu'][data-size='sm'] {
310
+ /**
311
+ * The surface as wide as its trigger: an account switcher at the foot of a
312
+ * sidebar, opened from a row the column's full width. The content takes the
313
+ * anchor's width as its size and its floor, as `popover`'s `width="anchor"`
314
+ * does, and the room the positioner reports caps both. The layer drops the
315
+ * family's floor and cap, which would hold it narrower or wider than the
316
+ * row. Opened above or below, the layer has no inline padding, so the
317
+ * content and the trigger share both edges.
318
+ */
319
+ [data-ui-menu][data-width='anchor'] {
320
+ max-inline-size: var(--slotted-positioner-available-width, 100vw);
321
+ min-inline-size: 0;
322
+ }
323
+ [data-ui-menu][data-width='anchor'] > [data-part-content] {
324
+ inline-size: var(--slotted-positioner-anchor-width, auto);
325
+ max-inline-size: var(--slotted-positioner-available-width, 100vw);
326
+ min-inline-size: min(
327
+ var(--slotted-positioner-anchor-width, 0px),
328
+ var(--slotted-positioner-available-width, 100vw)
329
+ );
330
+ }
331
+
332
+ [data-ui-menu][data-size='sm'] {
294
333
  --_item-padding: var(--slotted-control-padding-inline-sm, 0.625rem);
295
334
  --_item-height: var(--slotted-control-height-sm, 30px);
296
335
  --_font-size: var(--slotted-control-font-size-sm, 12px);
@@ -300,7 +339,7 @@
300
339
  --_measure: var(--slotted-menu-measure-sm, 14rem);
301
340
  }
302
341
 
303
- [data-ui='menu'][data-size='lg'] {
342
+ [data-ui-menu][data-size='lg'] {
304
343
  --_item-padding: var(--slotted-control-padding-inline-lg, 1rem);
305
344
  --_item-height: var(--slotted-control-height-lg, 38px);
306
345
  --_font-size: var(--slotted-control-font-size-lg, 14px);
@@ -319,7 +358,7 @@
319
358
  * off the bottom of the screen. `overscroll-behavior` keeps the page still
320
359
  * once the surface has scrolled to its end.
321
360
  */
322
- [data-ui='menu'] > [data-part='content'] {
361
+ [data-ui-menu] > [data-part-content] {
323
362
  background: var(--_surface);
324
363
  border: var(--_border-width) solid var(--_border-color);
325
364
  border-radius: var(--_radius);
@@ -330,13 +369,26 @@
330
369
  font-family: var(--slotted-font-family-sans);
331
370
  font-size: var(--_font-size);
332
371
  grid-template-columns: auto minmax(0, 1fr) auto auto;
333
- max-block-size: calc(var(--slotted-positioner-available-height, 100vh) - 2 * var(--_gap));
372
+ max-block-size: min(
373
+ var(--slotted-overlay-max-block-size, 100vh),
374
+ calc(var(--slotted-positioner-available-height, 100vh) - 2 * var(--_gap))
375
+ );
334
376
  outline: none;
335
377
  overflow-y: auto;
336
378
  overscroll-behavior: contain;
337
379
  padding-block: var(--_inset-block);
338
380
  padding-inline: var(--_inset-inline);
339
381
  pointer-events: auto;
382
+ /* A theme that paints this surface as a translucent material blurs what moves behind it. */
383
+ -webkit-backdrop-filter: var(--slotted-menu-backdrop-filter, none);
384
+ backdrop-filter: var(--slotted-menu-backdrop-filter, none);
385
+ }
386
+
387
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
388
+ [data-ui-menu] > [data-part-content] {
389
+ -webkit-backdrop-filter: none;
390
+ backdrop-filter: none;
391
+ }
340
392
  }
341
393
 
342
394
  /**
@@ -344,7 +396,7 @@
344
396
  * the moment the menu opens, and a ring around the whole surface would say
345
397
  * the surface is the thing being operated.
346
398
  */
347
- [data-ui='menu'] > [data-part='content']:focus-visible {
399
+ [data-ui-menu] > [data-part-content]:focus-visible {
348
400
  outline: none;
349
401
  }
350
402
 
@@ -356,20 +408,53 @@
356
408
  * second set. Without the subgrid a group would align its own labels and
357
409
  * disagree with the items outside it.
358
410
  */
359
- [data-ui='menu'] [data-part='group'] {
411
+ [data-ui-menu] [data-part-group] {
360
412
  display: grid;
361
413
  grid-column: 1 / -1;
362
414
  grid-template-columns: subgrid;
363
415
  }
364
416
 
365
- [data-ui='menu'] [data-part='group-label'] {
417
+ /**
418
+ * A group's label stays at the top of the list while its group is in view.
419
+ * The group is the label's containing block, so the next label pushes it out
420
+ * and a group scrolled past takes its label with it. It sticks to the
421
+ * scrollport's edge rather than the padding's, on the surface's ground, above
422
+ * the items and below the parts the surface draws over them.
423
+ */
424
+ [data-ui-menu] [data-part-group-label] {
425
+ background: var(--_surface);
426
+ box-sizing: border-box;
366
427
  color: var(--_muted);
367
428
  font-size: var(--_secondary-font-size);
368
429
  font-weight: var(--slotted-font-weight-semibold, 600);
369
430
  grid-column: 1 / -1;
431
+ inset-block-start: calc(-1 * var(--_inset-block));
370
432
  line-height: var(--_secondary-leading);
433
+ min-block-size: var(--_group-label-height);
371
434
  padding-block: var(--slotted-space-2, 0.25rem);
372
435
  padding-inline: var(--_item-inset);
436
+ position: sticky;
437
+ z-index: 1;
438
+ }
439
+
440
+ @media (forced-colors: active) {
441
+ [data-ui-menu] [data-part-group-label] {
442
+ background: Canvas;
443
+ }
444
+ }
445
+
446
+ /**
447
+ * The label's height, which the list keeps clear above an item the keys
448
+ * bring into view (`revealWithin` reads the scroll padding), so the item is
449
+ * never drawn under a label stuck to the top.
450
+ */
451
+ [data-ui-menu] > [data-part-content]:has([data-part-group-label]) {
452
+ --_group-label-height: var(
453
+ --slotted-menu-group-label-height,
454
+ calc(var(--_secondary-leading) + 2 * var(--slotted-space-2, 0.25rem))
455
+ );
456
+
457
+ scroll-padding-block-start: var(--_group-label-height);
373
458
  }
374
459
 
375
460
  /* ── Header ───────────────────────────────────────────────────────────── */
@@ -382,7 +467,7 @@
382
467
  * lines; the name and its line reuse `label` and `description`. It starts
383
468
  * at the item inset, so the avatar's edge is the icons' edge.
384
469
  */
385
- [data-ui='menu'] [data-part='header'] {
470
+ [data-ui-menu] [data-part-header] {
386
471
  align-items: center;
387
472
  column-gap: var(--slotted-space-5, 0.75rem);
388
473
  display: grid;
@@ -393,12 +478,12 @@
393
478
  padding-inline: var(--_item-inset);
394
479
  }
395
480
 
396
- [data-ui='menu'] [data-part='header'] > :not([data-part='label'], [data-part='description']) {
481
+ [data-ui-menu] [data-part-header] > :not([data-part-label], [data-part-description]) {
397
482
  grid-column: 1;
398
483
  grid-row: 1 / span 2;
399
484
  }
400
485
 
401
- [data-ui='menu'] [data-part='header'] > [data-part='label'] {
486
+ [data-ui-menu] [data-part-header] > [data-part-label] {
402
487
  font-weight: var(--slotted-font-weight-semibold, 600);
403
488
  }
404
489
 
@@ -420,7 +505,7 @@
420
505
  * `select` used to take the hand for its options holds here unchanged. An
421
506
  * unavailable item keeps the hand and refuses the press, as `button` does.
422
507
  */
423
- [data-ui='menu'] [data-part='item'] {
508
+ [data-ui-menu] [data-part-item] {
424
509
  appearance: none;
425
510
  background: transparent;
426
511
  border: 0;
@@ -466,7 +551,7 @@
466
551
  * `data-highlighted` exists to prevent in Radix and Ark; here the platform
467
552
  * prevents it, because there is only ever one focused element.
468
553
  */
469
- [data-ui='menu'] [data-part='item']:focus {
554
+ [data-ui-menu] [data-part-item]:focus {
470
555
  background-color: var(--_highlight);
471
556
  color: var(--_accent);
472
557
  }
@@ -477,13 +562,13 @@
477
562
  * reader did not ask for. Inset, so it never overflows the surface's own
478
563
  * rounded edge.
479
564
  */
480
- [data-ui='menu'] [data-part='item']:focus-visible {
565
+ [data-ui-menu] [data-part-item]:focus-visible {
481
566
  outline: var(--slotted-focus-ring-width, 2px) solid
482
567
  var(--slotted-focus-ring-color, currentColor);
483
568
  outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
484
569
  }
485
570
 
486
- [data-ui='menu'] [data-part='item']:not([data-disabled]):active {
571
+ [data-ui-menu] [data-part-item]:not([data-disabled]):active {
487
572
  background-color: var(--_highlight-active);
488
573
  }
489
574
 
@@ -491,7 +576,7 @@
491
576
  * A parent item stays highlighted while its submenu is open, so the path from
492
577
  * the bar to the surface under the pointer reads as one line.
493
578
  */
494
- [data-ui='menu'] [data-part='item'][data-open] {
579
+ [data-ui-menu] [data-part-item][data-open] {
495
580
  background-color: var(--_highlight);
496
581
  }
497
582
 
@@ -500,17 +585,17 @@
500
585
  * requires. They therefore have to answer focus with something, and answer it
501
586
  * more quietly than an item that would do anything: the ground is the same
502
587
  * highlight, so the reader still sees where they are, and the text keeps the
503
- * disabled colour, so the item still reads as unavailable. The theme's
588
+ * disabled color, so the item still reads as unavailable. The theme's
504
589
  * disabled surface stood where the highlight stands now and measured ΔL 0.005
505
590
  * against the dark surface and 0 against the high-contrast one: the pointer
506
591
  * landed on an item and nothing answered.
507
592
  */
508
- [data-ui='menu'] [data-part='item'][data-disabled] {
593
+ [data-ui-menu] [data-part-item][data-disabled] {
509
594
  color: var(--slotted-disabled-foreground, #64748b);
510
595
  cursor: not-allowed;
511
596
  }
512
597
 
513
- [data-ui='menu'] [data-part='item'][data-disabled]:focus {
598
+ [data-ui-menu] [data-part-item][data-disabled]:focus {
514
599
  background-color: var(--_highlight);
515
600
  color: var(--slotted-disabled-foreground, #64748b);
516
601
  }
@@ -522,13 +607,13 @@
522
607
  * labels up: the mark's box exists whether or not the mark is drawn, so a
523
608
  * menu of options does not shift by sixteen pixels as one is checked.
524
609
  */
525
- [data-ui='menu'] :is([data-part='indicator'], [data-part='icon']),
526
- [data-ui='menu'] [data-part='item'][aria-haspopup='menu'] > [data-ui='icon'] {
610
+ [data-ui-menu] :is([data-part-indicator], [data-part-icon]),
611
+ [data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
527
612
  /**
528
613
  * One line box tall, so a mark beside a label that wrapped onto three
529
614
  * lines sits on the first of them rather than in the middle of the item —
530
615
  * and, because the item states the line box every cell inherits, exactly
531
- * as tall as the line it sits beside. The mark is then centred on the text
616
+ * as tall as the line it sits beside. The mark is then centerd on the text
532
617
  * by construction rather than by a nudge that has to be retuned at every
533
618
  * size and density.
534
619
  */
@@ -540,7 +625,7 @@
540
625
  * a checkbox item, `dot` for a radio item — and it is shown while the item
541
626
  * is checked.
542
627
  */
543
- [data-ui='menu'] [data-part='indicator'] {
628
+ [data-ui-menu] [data-part-indicator] {
544
629
  --slotted-icon-size: var(--_icon-size);
545
630
 
546
631
  align-items: center;
@@ -553,7 +638,7 @@
553
638
  margin-inline-end: var(--_column-gap);
554
639
  opacity: 0;
555
640
  /**
556
- * The mark arrives and leaves: a fade with a small growth from the centre
641
+ * The mark arrives and leaves: a fade with a small growth from the center
557
642
  * of its column. 0.8 rather than the 0.95 a panel starts from, because at
558
643
  * sixteen pixels 0.95 moves the glyph's edge by under half a pixel and the
559
644
  * growth is not seen; 0.8 moves it by 1.6. Leaving takes the exit curve.
@@ -564,7 +649,7 @@
564
649
  scale var(--slotted-duration-short) var(--slotted-easing-exit);
565
650
  }
566
651
 
567
- [data-ui='menu'] [data-part='item'][data-checked] > [data-part='indicator'] {
652
+ [data-ui-menu] [data-part-item][data-checked] > [data-part-indicator] {
568
653
  opacity: 1;
569
654
  scale: 1;
570
655
  transition:
@@ -573,7 +658,7 @@
573
658
  }
574
659
 
575
660
  /* The dot is drawn smaller than the check, at seven tenths of the column's glyph. */
576
- [data-ui='menu'] [data-part='item'][role='menuitemradio'] > [data-part='indicator'] {
661
+ [data-ui-menu] [data-part-item][role='menuitemradio'] > [data-part-indicator] {
577
662
  --slotted-icon-size: calc(var(--_icon-size) * 0.7);
578
663
  }
579
664
 
@@ -583,14 +668,14 @@
583
668
  * whose second and fifth items have icons still reads as one list rather
584
669
  * than as two.
585
670
  *
586
- * The mark takes the item's own colour rather than the muted one. Painted
671
+ * The mark takes the item's own color rather than the muted one. Painted
587
672
  * muted, a disabled item's icon was the same grey as an enabled item's —
588
673
  * `--slotted-text-muted` and `--slotted-disabled-foreground` are four points
589
674
  * apart in the light scheme — so the state the item was in could be read from
590
675
  * its label and not from its mark.
591
676
  *
592
677
  * What fills it is content: the library's own `Glyph` in an icon box, or an
593
- * element of the consumer's own, centred. The stylesheet paints nothing
678
+ * element of the consumer's own, centerd. The stylesheet paints nothing
594
679
  * here.
595
680
  *
596
681
  * The box sizes what it holds: an icon box reads `--slotted-icon-size` from
@@ -600,7 +685,7 @@
600
685
  * the child and not on the box, because the box's `1lh` reads the item's
601
686
  * line box.
602
687
  */
603
- [data-ui='menu'] [data-part='icon'] {
688
+ [data-ui-menu] [data-part-icon] {
604
689
  --slotted-icon-size: var(--_icon-size);
605
690
 
606
691
  align-items: center;
@@ -613,19 +698,19 @@
613
698
  margin-inline-end: var(--_column-gap);
614
699
  }
615
700
 
616
- [data-ui='menu'] [data-part='icon'] > * {
701
+ [data-ui-menu] [data-part-icon] > * {
617
702
  font-size: var(--_icon-size);
618
703
  }
619
704
 
620
705
  /* Column two, and the only column that gives way. */
621
- [data-ui='menu'] [data-part='label'] {
706
+ [data-ui-menu] [data-part-label] {
622
707
  grid-column: 2;
623
708
  grid-row: 1;
624
709
  min-inline-size: 0;
625
710
  overflow-wrap: anywhere;
626
711
  }
627
712
 
628
- [data-ui='menu'] [data-part='description'] {
713
+ [data-ui-menu] [data-part-description] {
629
714
  color: var(--_muted);
630
715
  font-size: var(--_secondary-font-size);
631
716
  grid-column: 2;
@@ -635,7 +720,7 @@
635
720
  overflow-wrap: anywhere;
636
721
  }
637
722
 
638
- [data-ui='menu'] [data-part='item'][data-disabled] > [data-part='description'] {
723
+ [data-ui-menu] [data-part-item][data-disabled] > [data-part-description] {
639
724
  color: inherit;
640
725
  }
641
726
 
@@ -647,7 +732,7 @@
647
732
  * column, so counts stack on their last digit and a word ends where the
648
733
  * numbers end; tabular figures, muted like the shortcut, never wrapped.
649
734
  */
650
- [data-ui='menu'] [data-part='meta'] {
735
+ [data-ui-menu] [data-part-meta] {
651
736
  align-items: center;
652
737
  color: var(--_muted);
653
738
  column-gap: var(--slotted-space-2, 0.25rem);
@@ -667,7 +752,7 @@
667
752
  * alone. Never narrower than its own content: a long label wraps in column
668
753
  * two rather than pushing the binding off the surface.
669
754
  */
670
- [data-ui='menu'] [data-part='shortcut'] {
755
+ [data-ui-menu] [data-part-shortcut] {
671
756
  color: var(--_muted);
672
757
  grid-column: 4;
673
758
  grid-row: 1;
@@ -676,10 +761,8 @@
676
761
  white-space: nowrap;
677
762
  }
678
763
 
679
- [data-ui='menu']
680
- [data-part='item'][data-disabled]
681
- > :is([data-part='shortcut'], [data-part='meta']),
682
- [data-ui='menu'] [data-part='item'][data-disabled][aria-haspopup='menu'] > [data-ui='icon'] {
764
+ [data-ui-menu] [data-part-item][data-disabled] > :is([data-part-shortcut], [data-part-meta]),
765
+ [data-ui-menu] [data-part-item][data-disabled][aria-haspopup='menu'] > [data-ui-icon] {
683
766
  color: inherit;
684
767
  }
685
768
 
@@ -690,7 +773,7 @@
690
773
  * takes the shortcut's column, because an item that opens a submenu runs no
691
774
  * command and so carries no binding.
692
775
  */
693
- [data-ui='menu'] [data-part='item'][aria-haspopup='menu'] > [data-ui='icon'] {
776
+ [data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
694
777
  --slotted-icon-size: var(--_icon-size);
695
778
 
696
779
  grid-column: 4;
@@ -707,7 +790,7 @@
707
790
 
708
791
  /* ── Separator, empty, loading ────────────────────────────────────────── */
709
792
 
710
- [data-ui='menu'] [data-part='separator'] {
793
+ [data-ui-menu] [data-part-separator] {
711
794
  background-color: var(--slotted-menu-separator-color, var(--_border-color));
712
795
  block-size: var(--_border-width);
713
796
  border: 0;
@@ -726,7 +809,7 @@
726
809
  * stated here: a row that was wider than the menu around it made the menu
727
810
  * grow when its list emptied (M3).
728
811
  */
729
- [data-ui='menu'] [data-part='empty'] {
812
+ [data-ui-menu] [data-part-empty] {
730
813
  color: var(--_muted);
731
814
  grid-column: 1 / -1;
732
815
  padding-block: var(--slotted-space-5, 0.75rem);
@@ -734,7 +817,7 @@
734
817
  text-align: center;
735
818
  }
736
819
 
737
- [data-ui='menu'] > [data-part='content'][data-loading] {
820
+ [data-ui-menu] > [data-part-content][data-loading] {
738
821
  cursor: progress;
739
822
  }
740
823
 
@@ -746,7 +829,7 @@
746
829
  * the theme already carries at the contrast every scheme needs; `danger` is
747
830
  * the one a product reaches for, and the other four cost one line each.
748
831
  */
749
- [data-ui='menu'] [data-part='item'][data-tone='accent'] {
832
+ [data-ui-menu] [data-part-item][data-tone='accent'] {
750
833
  --_accent: var(--slotted-tone-accent-text);
751
834
  --_highlight: var(--slotted-tone-accent-surface);
752
835
  --_highlight-active: var(--slotted-tone-accent-subtle-active);
@@ -754,7 +837,7 @@
754
837
  color: var(--slotted-tone-accent-text);
755
838
  }
756
839
 
757
- [data-ui='menu'] [data-part='item'][data-tone='secondary'] {
840
+ [data-ui-menu] [data-part-item][data-tone='secondary'] {
758
841
  --_accent: var(--slotted-tone-secondary-text);
759
842
  --_highlight: var(--slotted-tone-secondary-surface);
760
843
  --_highlight-active: var(--slotted-tone-secondary-subtle-active);
@@ -762,7 +845,7 @@
762
845
  color: var(--slotted-tone-secondary-text);
763
846
  }
764
847
 
765
- [data-ui='menu'] [data-part='item'][data-tone='success'] {
848
+ [data-ui-menu] [data-part-item][data-tone='success'] {
766
849
  --_accent: var(--slotted-tone-success-text);
767
850
  --_highlight: var(--slotted-tone-success-surface);
768
851
  --_highlight-active: var(--slotted-tone-success-subtle-active);
@@ -770,7 +853,7 @@
770
853
  color: var(--slotted-tone-success-text);
771
854
  }
772
855
 
773
- [data-ui='menu'] [data-part='item'][data-tone='warning'] {
856
+ [data-ui-menu] [data-part-item][data-tone='warning'] {
774
857
  --_accent: var(--slotted-tone-warning-text);
775
858
  --_highlight: var(--slotted-tone-warning-surface);
776
859
  --_highlight-active: var(--slotted-tone-warning-subtle-active);
@@ -778,7 +861,7 @@
778
861
  color: var(--slotted-tone-warning-text);
779
862
  }
780
863
 
781
- [data-ui='menu'] [data-part='item'][data-tone='danger'] {
864
+ [data-ui-menu] [data-part-item][data-tone='danger'] {
782
865
  --_accent: var(--slotted-tone-danger-text);
783
866
  --_highlight: var(--slotted-tone-danger-surface);
784
867
  --_highlight-active: var(--slotted-tone-danger-subtle-active);
@@ -787,29 +870,29 @@
787
870
  }
788
871
 
789
872
  /* An unavailable item keeps no tone: its highlight is the neutral one. */
790
- [data-ui='menu'] [data-part='item'][data-tone][data-disabled] {
873
+ [data-ui-menu] [data-part-item][data-tone][data-disabled] {
791
874
  --_accent: var(--slotted-disabled-foreground, #64748b);
792
875
  --_highlight: var(--slotted-menu-highlight, var(--slotted-tone-secondary-subtle-hover));
793
876
 
794
877
  color: var(--slotted-disabled-foreground, #64748b);
795
878
  }
796
879
 
797
- /* ── Forced colours ───────────────────────────────────────────────────── */
880
+ /* ── Forced colors ───────────────────────────────────────────────────── */
798
881
 
799
882
  /**
800
883
  * The one thing the theme cannot reach. Every tone surface becomes `Canvas`
801
- * under forced colours, so the highlight — which is this family's selection
884
+ * under forced colors, so the highlight — which is this family's selection
802
885
  * indicator, not decoration — would disappear and leave a reader with no way
803
886
  * to tell which command they are on.
804
887
  */
805
888
  @media (forced-colors: active) {
806
- [data-ui='menu'] [data-part='item']:focus {
889
+ [data-ui-menu] [data-part-item]:focus {
807
890
  background-color: Highlight;
808
891
  color: HighlightText;
809
892
  forced-color-adjust: none;
810
893
  }
811
894
 
812
- [data-ui='menu'] [data-part='item'][data-disabled]:focus {
895
+ [data-ui-menu] [data-part-item][data-disabled]:focus {
813
896
  background-color: Highlight;
814
897
  color: GrayText;
815
898
  }
@@ -16,7 +16,6 @@
16
16
  "--slotted-control-padding-inline-lg",
17
17
  "--slotted-control-padding-inline-md",
18
18
  "--slotted-control-padding-inline-sm",
19
- "--slotted-control-radius",
20
19
  "--slotted-control-transition-duration",
21
20
  "--slotted-control-transition-easing",
22
21
  "--slotted-disabled-foreground",
@@ -32,8 +31,10 @@
32
31
  "--slotted-font-weight-semibold",
33
32
  "--slotted-line-height-md",
34
33
  "--slotted-line-height-sm",
34
+ "--slotted-menu-backdrop-filter",
35
35
  "--slotted-menu-border-color",
36
36
  "--slotted-menu-gap",
37
+ "--slotted-menu-group-label-height",
37
38
  "--slotted-menu-highlight",
38
39
  "--slotted-menu-highlight-active",
39
40
  "--slotted-menu-item-radius",
@@ -49,6 +50,7 @@
49
50
  "--slotted-menu-surface",
50
51
  "--slotted-menu-text",
51
52
  "--slotted-menu-text-muted",
53
+ "--slotted-overlay-max-block-size",
52
54
  "--slotted-radius-lg",
53
55
  "--slotted-shadow-md",
54
56
  "--slotted-space-1",