@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30

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 (199) hide show
  1. package/package.json +13 -1
  2. package/src/accordion/accordion.css +11 -11
  3. package/src/action-bar/action-bar.css +47 -44
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +39 -39
  6. package/src/alert/alert.css +96 -96
  7. package/src/alert/alert.tokens.json +5 -0
  8. package/src/app-shell/app-shell.css +455 -328
  9. package/src/app-shell/app-shell.tokens.json +5 -2
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +118 -114
  12. package/src/avatar/avatar.css +96 -66
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +22 -23
  15. package/src/badge/badge.css +54 -46
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +52 -52
  18. package/src/button/button.css +137 -89
  19. package/src/button/button.tokens.json +5 -0
  20. package/src/button-group/button-group.css +80 -79
  21. package/src/button-group/button-group.tokens.json +1 -0
  22. package/src/calendar/calendar.css +139 -109
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +68 -65
  25. package/src/carousel/carousel.css +158 -169
  26. package/src/cascader/cascader.css +158 -157
  27. package/src/cascader/cascader.tokens.json +1 -0
  28. package/src/chart/chart.css +288 -267
  29. package/src/chart/chart.tokens.json +4 -0
  30. package/src/checkbox/checkbox.css +143 -148
  31. package/src/checkbox-group/checkbox-group.css +7 -7
  32. package/src/code-block/code-block.css +85 -89
  33. package/src/collapsible/collapsible.css +76 -80
  34. package/src/color-picker/color-picker.css +106 -114
  35. package/src/column-manager/column-manager.css +111 -119
  36. package/src/combobox/combobox.css +203 -130
  37. package/src/combobox/combobox.tokens.json +3 -0
  38. package/src/command-palette/command-palette.css +155 -102
  39. package/src/command-palette/command-palette.tokens.json +2 -0
  40. package/src/container/container.css +27 -27
  41. package/src/context-menu/context-menu.css +9 -9
  42. package/src/currency-field/currency-field.css +119 -119
  43. package/src/currency-field/currency-field.tokens.json +1 -0
  44. package/src/dashboard-grid/dashboard-grid.css +185 -115
  45. package/src/data-grid/data-grid.css +598 -496
  46. package/src/data-grid/data-grid.tokens.json +5 -1
  47. package/src/data-list/data-list.css +82 -71
  48. package/src/data-list/data-list.tokens.json +2 -1
  49. package/src/date-field/date-field.css +62 -57
  50. package/src/date-field/date-field.tokens.json +1 -0
  51. package/src/date-picker/date-picker.css +117 -58
  52. package/src/date-picker/date-picker.tokens.json +5 -0
  53. package/src/date-range-picker/date-range-picker.css +157 -127
  54. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  55. package/src/datetime-field/datetime-field.css +90 -90
  56. package/src/datetime-field/datetime-field.tokens.json +1 -0
  57. package/src/datetime-picker/datetime-picker.css +123 -70
  58. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  59. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  60. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  61. package/src/description-list/description-list.css +105 -75
  62. package/src/description-list/description-list.tokens.json +1 -0
  63. package/src/detail-panel/detail-panel.css +86 -71
  64. package/src/detail-panel/detail-panel.tokens.json +2 -0
  65. package/src/dialog/dialog.css +434 -198
  66. package/src/dialog/dialog.tokens.json +7 -0
  67. package/src/divider/divider.css +20 -20
  68. package/src/drawer/drawer.css +597 -236
  69. package/src/drawer/drawer.tokens.json +13 -0
  70. package/src/entity-picker/entity-picker.css +323 -270
  71. package/src/entity-picker/entity-picker.tokens.json +3 -0
  72. package/src/event-calendar/event-calendar.css +357 -399
  73. package/src/field/field.css +106 -93
  74. package/src/field/field.tokens.json +2 -0
  75. package/src/field-group/field-group.css +43 -33
  76. package/src/field-group/field-group.tokens.json +3 -0
  77. package/src/filter-bar/filter-bar.css +200 -216
  78. package/src/form/form.css +99 -25
  79. package/src/form/form.tokens.json +5 -0
  80. package/src/fullscreen/fullscreen.css +26 -27
  81. package/src/grid/grid.css +29 -29
  82. package/src/highlight/highlight.css +11 -11
  83. package/src/hover-card/hover-card.css +9 -9
  84. package/src/icon/icon.css +67 -20
  85. package/src/icon/icon.tokens.json +1 -0
  86. package/src/image/image.css +42 -42
  87. package/src/import-export-center/import-export-center.css +144 -165
  88. package/src/inline/inline.css +28 -28
  89. package/src/inline-message/inline-message.css +162 -86
  90. package/src/inline-message/inline-message.tokens.json +4 -0
  91. package/src/kbd/kbd.css +62 -50
  92. package/src/kbd/kbd.tokens.json +3 -0
  93. package/src/link/link.css +54 -33
  94. package/src/link/link.tokens.json +4 -0
  95. package/src/list/list.css +23 -23
  96. package/src/list-item/list-item.css +89 -75
  97. package/src/list-item/list-item.tokens.json +7 -0
  98. package/src/listbox/listbox.css +71 -70
  99. package/src/listbox/listbox.tokens.json +0 -1
  100. package/src/loading-overlay/loading-overlay.css +86 -103
  101. package/src/markdown/markdown.css +20 -20
  102. package/src/media-viewer/media-viewer.css +790 -0
  103. package/src/media-viewer/media-viewer.tokens.json +53 -0
  104. package/src/menu/menu.css +162 -82
  105. package/src/menu/menu.tokens.json +2 -1
  106. package/src/menubar/menubar.css +16 -16
  107. package/src/message/message.css +1250 -1253
  108. package/src/message/message.tokens.json +5 -0
  109. package/src/message-scroller/message-scroller.css +323 -320
  110. package/src/multi-select/multi-select.css +230 -172
  111. package/src/multi-select/multi-select.tokens.json +2 -0
  112. package/src/navigation-menu/navigation-menu.css +169 -190
  113. package/src/notification-center/notification-center.css +153 -161
  114. package/src/notification-center/notification-center.tokens.json +3 -0
  115. package/src/number-field/number-field.css +93 -93
  116. package/src/number-field/number-field.tokens.json +1 -0
  117. package/src/otp-input/otp-input.css +74 -64
  118. package/src/otp-input/otp-input.tokens.json +1 -0
  119. package/src/page/page.css +41 -27
  120. package/src/page/page.tokens.json +1 -0
  121. package/src/page-header/page-header.css +341 -286
  122. package/src/page-header/page-header.tokens.json +5 -0
  123. package/src/pagination/pagination.css +75 -79
  124. package/src/popover/popover.css +81 -64
  125. package/src/popover/popover.tokens.json +1 -0
  126. package/src/progress-indicator/progress-indicator.css +192 -136
  127. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  128. package/src/prompt-composer/prompt-composer.css +260 -113
  129. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  130. package/src/prose/prose.css +77 -82
  131. package/src/radio-group/radio-group.css +107 -112
  132. package/src/rating/rating.css +146 -142
  133. package/src/rating/rating.tokens.json +1 -0
  134. package/src/result-state/result-state.css +94 -101
  135. package/src/runtime-properties.mjs +19 -6
  136. package/src/saved-views/saved-views.css +43 -49
  137. package/src/scroll-area/scroll-area.css +44 -37
  138. package/src/section/section.css +178 -43
  139. package/src/section/section.tokens.json +8 -2
  140. package/src/segmented-control/segmented-control.css +210 -133
  141. package/src/segmented-control/segmented-control.tokens.json +7 -11
  142. package/src/select/select.css +210 -147
  143. package/src/select/select.tokens.json +3 -0
  144. package/src/side-navigation/side-navigation.css +193 -196
  145. package/src/side-navigation/side-navigation.tokens.json +1 -0
  146. package/src/skeleton/skeleton.css +57 -58
  147. package/src/slider/slider.css +101 -103
  148. package/src/sparkline/sparkline.css +75 -53
  149. package/src/sparkline/sparkline.tokens.json +2 -0
  150. package/src/spinner/spinner.css +83 -180
  151. package/src/spinner/spinner.tokens.json +0 -1
  152. package/src/split-button/split-button.css +34 -35
  153. package/src/split-button/split-button.tokens.json +1 -0
  154. package/src/splitter/splitter.css +47 -48
  155. package/src/stack/stack.css +25 -25
  156. package/src/stat-card/stat-card.css +415 -245
  157. package/src/stat-card/stat-card.tokens.json +8 -0
  158. package/src/status-indicator/status-indicator.css +124 -100
  159. package/src/status-indicator/status-indicator.tokens.json +0 -3
  160. package/src/stepper/stepper.css +78 -82
  161. package/src/switch/switch.css +100 -106
  162. package/src/table/table.css +270 -198
  163. package/src/table/table.tokens.json +2 -0
  164. package/src/table-of-contents/table-of-contents.css +60 -59
  165. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  166. package/src/tabs/tabs.css +327 -294
  167. package/src/tabs/tabs.tokens.json +7 -1
  168. package/src/tag/tag.css +109 -88
  169. package/src/tag/tag.tokens.json +10 -0
  170. package/src/tags-input/tags-input.css +152 -87
  171. package/src/tags-input/tags-input.tokens.json +7 -1
  172. package/src/text-field/text-field.css +146 -148
  173. package/src/text-field/text-field.tokens.json +1 -0
  174. package/src/textarea/textarea.css +38 -33
  175. package/src/textarea/textarea.tokens.json +1 -0
  176. package/src/time-field/time-field.css +82 -77
  177. package/src/time-field/time-field.tokens.json +1 -0
  178. package/src/time-picker/time-picker.css +116 -64
  179. package/src/time-picker/time-picker.tokens.json +4 -1
  180. package/src/time-range-picker/time-range-picker.css +168 -140
  181. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  182. package/src/timeline/timeline.css +280 -292
  183. package/src/timeline/timeline.tokens.json +5 -0
  184. package/src/toast/toast.css +138 -121
  185. package/src/toast/toast.tokens.json +6 -0
  186. package/src/toggle/toggle.css +34 -38
  187. package/src/toggle-group/toggle-group.css +73 -77
  188. package/src/toolbar/toolbar.css +33 -38
  189. package/src/tooltip/tooltip.css +65 -39
  190. package/src/tooltip/tooltip.tokens.json +1 -0
  191. package/src/top-navigation/top-navigation.css +252 -268
  192. package/src/tour/tour.css +64 -73
  193. package/src/transfer/transfer.css +164 -168
  194. package/src/tree/tree.css +113 -121
  195. package/src/typography/typography.css +42 -38
  196. package/src/typography/typography.tokens.json +1 -0
  197. package/src/upload/upload.css +256 -257
  198. package/src/visually-hidden/visually-hidden.css +1 -1
  199. 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);
@@ -337,6 +376,16 @@
337
376
  padding-block: var(--_inset-block);
338
377
  padding-inline: var(--_inset-inline);
339
378
  pointer-events: auto;
379
+ /* A theme that paints this surface as a translucent material blurs what moves behind it. */
380
+ -webkit-backdrop-filter: var(--slotted-menu-backdrop-filter, none);
381
+ backdrop-filter: var(--slotted-menu-backdrop-filter, none);
382
+ }
383
+
384
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
385
+ [data-ui-menu] > [data-part-content] {
386
+ -webkit-backdrop-filter: none;
387
+ backdrop-filter: none;
388
+ }
340
389
  }
341
390
 
342
391
  /**
@@ -344,7 +393,7 @@
344
393
  * the moment the menu opens, and a ring around the whole surface would say
345
394
  * the surface is the thing being operated.
346
395
  */
347
- [data-ui='menu'] > [data-part='content']:focus-visible {
396
+ [data-ui-menu] > [data-part-content]:focus-visible {
348
397
  outline: none;
349
398
  }
350
399
 
@@ -356,20 +405,53 @@
356
405
  * second set. Without the subgrid a group would align its own labels and
357
406
  * disagree with the items outside it.
358
407
  */
359
- [data-ui='menu'] [data-part='group'] {
408
+ [data-ui-menu] [data-part-group] {
360
409
  display: grid;
361
410
  grid-column: 1 / -1;
362
411
  grid-template-columns: subgrid;
363
412
  }
364
413
 
365
- [data-ui='menu'] [data-part='group-label'] {
414
+ /**
415
+ * A group's label stays at the top of the list while its group is in view.
416
+ * The group is the label's containing block, so the next label pushes it out
417
+ * and a group scrolled past takes its label with it. It sticks to the
418
+ * scrollport's edge rather than the padding's, on the surface's ground, above
419
+ * the items and below the parts the surface draws over them.
420
+ */
421
+ [data-ui-menu] [data-part-group-label] {
422
+ background: var(--_surface);
423
+ box-sizing: border-box;
366
424
  color: var(--_muted);
367
425
  font-size: var(--_secondary-font-size);
368
426
  font-weight: var(--slotted-font-weight-semibold, 600);
369
427
  grid-column: 1 / -1;
428
+ inset-block-start: calc(-1 * var(--_inset-block));
370
429
  line-height: var(--_secondary-leading);
430
+ min-block-size: var(--_group-label-height);
371
431
  padding-block: var(--slotted-space-2, 0.25rem);
372
432
  padding-inline: var(--_item-inset);
433
+ position: sticky;
434
+ z-index: 1;
435
+ }
436
+
437
+ @media (forced-colors: active) {
438
+ [data-ui-menu] [data-part-group-label] {
439
+ background: Canvas;
440
+ }
441
+ }
442
+
443
+ /**
444
+ * The label's height, which the list keeps clear above an item the keys
445
+ * bring into view (`revealWithin` reads the scroll padding), so the item is
446
+ * never drawn under a label stuck to the top.
447
+ */
448
+ [data-ui-menu] > [data-part-content]:has([data-part-group-label]) {
449
+ --_group-label-height: var(
450
+ --slotted-menu-group-label-height,
451
+ calc(var(--_secondary-leading) + 2 * var(--slotted-space-2, 0.25rem))
452
+ );
453
+
454
+ scroll-padding-block-start: var(--_group-label-height);
373
455
  }
374
456
 
375
457
  /* ── Header ───────────────────────────────────────────────────────────── */
@@ -382,7 +464,7 @@
382
464
  * lines; the name and its line reuse `label` and `description`. It starts
383
465
  * at the item inset, so the avatar's edge is the icons' edge.
384
466
  */
385
- [data-ui='menu'] [data-part='header'] {
467
+ [data-ui-menu] [data-part-header] {
386
468
  align-items: center;
387
469
  column-gap: var(--slotted-space-5, 0.75rem);
388
470
  display: grid;
@@ -393,12 +475,12 @@
393
475
  padding-inline: var(--_item-inset);
394
476
  }
395
477
 
396
- [data-ui='menu'] [data-part='header'] > :not([data-part='label'], [data-part='description']) {
478
+ [data-ui-menu] [data-part-header] > :not([data-part-label], [data-part-description]) {
397
479
  grid-column: 1;
398
480
  grid-row: 1 / span 2;
399
481
  }
400
482
 
401
- [data-ui='menu'] [data-part='header'] > [data-part='label'] {
483
+ [data-ui-menu] [data-part-header] > [data-part-label] {
402
484
  font-weight: var(--slotted-font-weight-semibold, 600);
403
485
  }
404
486
 
@@ -420,7 +502,7 @@
420
502
  * `select` used to take the hand for its options holds here unchanged. An
421
503
  * unavailable item keeps the hand and refuses the press, as `button` does.
422
504
  */
423
- [data-ui='menu'] [data-part='item'] {
505
+ [data-ui-menu] [data-part-item] {
424
506
  appearance: none;
425
507
  background: transparent;
426
508
  border: 0;
@@ -466,7 +548,7 @@
466
548
  * `data-highlighted` exists to prevent in Radix and Ark; here the platform
467
549
  * prevents it, because there is only ever one focused element.
468
550
  */
469
- [data-ui='menu'] [data-part='item']:focus {
551
+ [data-ui-menu] [data-part-item]:focus {
470
552
  background-color: var(--_highlight);
471
553
  color: var(--_accent);
472
554
  }
@@ -477,13 +559,13 @@
477
559
  * reader did not ask for. Inset, so it never overflows the surface's own
478
560
  * rounded edge.
479
561
  */
480
- [data-ui='menu'] [data-part='item']:focus-visible {
562
+ [data-ui-menu] [data-part-item]:focus-visible {
481
563
  outline: var(--slotted-focus-ring-width, 2px) solid
482
564
  var(--slotted-focus-ring-color, currentColor);
483
565
  outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
484
566
  }
485
567
 
486
- [data-ui='menu'] [data-part='item']:not([data-disabled]):active {
568
+ [data-ui-menu] [data-part-item]:not([data-disabled]):active {
487
569
  background-color: var(--_highlight-active);
488
570
  }
489
571
 
@@ -491,7 +573,7 @@
491
573
  * A parent item stays highlighted while its submenu is open, so the path from
492
574
  * the bar to the surface under the pointer reads as one line.
493
575
  */
494
- [data-ui='menu'] [data-part='item'][data-open] {
576
+ [data-ui-menu] [data-part-item][data-open] {
495
577
  background-color: var(--_highlight);
496
578
  }
497
579
 
@@ -500,17 +582,17 @@
500
582
  * requires. They therefore have to answer focus with something, and answer it
501
583
  * more quietly than an item that would do anything: the ground is the same
502
584
  * 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
585
+ * disabled color, so the item still reads as unavailable. The theme's
504
586
  * disabled surface stood where the highlight stands now and measured ΔL 0.005
505
587
  * against the dark surface and 0 against the high-contrast one: the pointer
506
588
  * landed on an item and nothing answered.
507
589
  */
508
- [data-ui='menu'] [data-part='item'][data-disabled] {
590
+ [data-ui-menu] [data-part-item][data-disabled] {
509
591
  color: var(--slotted-disabled-foreground, #64748b);
510
592
  cursor: not-allowed;
511
593
  }
512
594
 
513
- [data-ui='menu'] [data-part='item'][data-disabled]:focus {
595
+ [data-ui-menu] [data-part-item][data-disabled]:focus {
514
596
  background-color: var(--_highlight);
515
597
  color: var(--slotted-disabled-foreground, #64748b);
516
598
  }
@@ -522,13 +604,13 @@
522
604
  * labels up: the mark's box exists whether or not the mark is drawn, so a
523
605
  * menu of options does not shift by sixteen pixels as one is checked.
524
606
  */
525
- [data-ui='menu'] :is([data-part='indicator'], [data-part='icon']),
526
- [data-ui='menu'] [data-part='item'][aria-haspopup='menu'] > [data-ui='icon'] {
607
+ [data-ui-menu] :is([data-part-indicator], [data-part-icon]),
608
+ [data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
527
609
  /**
528
610
  * One line box tall, so a mark beside a label that wrapped onto three
529
611
  * lines sits on the first of them rather than in the middle of the item —
530
612
  * 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
613
+ * as tall as the line it sits beside. The mark is then centerd on the text
532
614
  * by construction rather than by a nudge that has to be retuned at every
533
615
  * size and density.
534
616
  */
@@ -540,7 +622,7 @@
540
622
  * a checkbox item, `dot` for a radio item — and it is shown while the item
541
623
  * is checked.
542
624
  */
543
- [data-ui='menu'] [data-part='indicator'] {
625
+ [data-ui-menu] [data-part-indicator] {
544
626
  --slotted-icon-size: var(--_icon-size);
545
627
 
546
628
  align-items: center;
@@ -553,7 +635,7 @@
553
635
  margin-inline-end: var(--_column-gap);
554
636
  opacity: 0;
555
637
  /**
556
- * The mark arrives and leaves: a fade with a small growth from the centre
638
+ * The mark arrives and leaves: a fade with a small growth from the center
557
639
  * of its column. 0.8 rather than the 0.95 a panel starts from, because at
558
640
  * sixteen pixels 0.95 moves the glyph's edge by under half a pixel and the
559
641
  * growth is not seen; 0.8 moves it by 1.6. Leaving takes the exit curve.
@@ -564,7 +646,7 @@
564
646
  scale var(--slotted-duration-short) var(--slotted-easing-exit);
565
647
  }
566
648
 
567
- [data-ui='menu'] [data-part='item'][data-checked] > [data-part='indicator'] {
649
+ [data-ui-menu] [data-part-item][data-checked] > [data-part-indicator] {
568
650
  opacity: 1;
569
651
  scale: 1;
570
652
  transition:
@@ -573,7 +655,7 @@
573
655
  }
574
656
 
575
657
  /* 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'] {
658
+ [data-ui-menu] [data-part-item][role='menuitemradio'] > [data-part-indicator] {
577
659
  --slotted-icon-size: calc(var(--_icon-size) * 0.7);
578
660
  }
579
661
 
@@ -583,14 +665,14 @@
583
665
  * whose second and fifth items have icons still reads as one list rather
584
666
  * than as two.
585
667
  *
586
- * The mark takes the item's own colour rather than the muted one. Painted
668
+ * The mark takes the item's own color rather than the muted one. Painted
587
669
  * muted, a disabled item's icon was the same grey as an enabled item's —
588
670
  * `--slotted-text-muted` and `--slotted-disabled-foreground` are four points
589
671
  * apart in the light scheme — so the state the item was in could be read from
590
672
  * its label and not from its mark.
591
673
  *
592
674
  * 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
675
+ * element of the consumer's own, centerd. The stylesheet paints nothing
594
676
  * here.
595
677
  *
596
678
  * The box sizes what it holds: an icon box reads `--slotted-icon-size` from
@@ -600,7 +682,7 @@
600
682
  * the child and not on the box, because the box's `1lh` reads the item's
601
683
  * line box.
602
684
  */
603
- [data-ui='menu'] [data-part='icon'] {
685
+ [data-ui-menu] [data-part-icon] {
604
686
  --slotted-icon-size: var(--_icon-size);
605
687
 
606
688
  align-items: center;
@@ -613,19 +695,19 @@
613
695
  margin-inline-end: var(--_column-gap);
614
696
  }
615
697
 
616
- [data-ui='menu'] [data-part='icon'] > * {
698
+ [data-ui-menu] [data-part-icon] > * {
617
699
  font-size: var(--_icon-size);
618
700
  }
619
701
 
620
702
  /* Column two, and the only column that gives way. */
621
- [data-ui='menu'] [data-part='label'] {
703
+ [data-ui-menu] [data-part-label] {
622
704
  grid-column: 2;
623
705
  grid-row: 1;
624
706
  min-inline-size: 0;
625
707
  overflow-wrap: anywhere;
626
708
  }
627
709
 
628
- [data-ui='menu'] [data-part='description'] {
710
+ [data-ui-menu] [data-part-description] {
629
711
  color: var(--_muted);
630
712
  font-size: var(--_secondary-font-size);
631
713
  grid-column: 2;
@@ -635,7 +717,7 @@
635
717
  overflow-wrap: anywhere;
636
718
  }
637
719
 
638
- [data-ui='menu'] [data-part='item'][data-disabled] > [data-part='description'] {
720
+ [data-ui-menu] [data-part-item][data-disabled] > [data-part-description] {
639
721
  color: inherit;
640
722
  }
641
723
 
@@ -647,7 +729,7 @@
647
729
  * column, so counts stack on their last digit and a word ends where the
648
730
  * numbers end; tabular figures, muted like the shortcut, never wrapped.
649
731
  */
650
- [data-ui='menu'] [data-part='meta'] {
732
+ [data-ui-menu] [data-part-meta] {
651
733
  align-items: center;
652
734
  color: var(--_muted);
653
735
  column-gap: var(--slotted-space-2, 0.25rem);
@@ -667,7 +749,7 @@
667
749
  * alone. Never narrower than its own content: a long label wraps in column
668
750
  * two rather than pushing the binding off the surface.
669
751
  */
670
- [data-ui='menu'] [data-part='shortcut'] {
752
+ [data-ui-menu] [data-part-shortcut] {
671
753
  color: var(--_muted);
672
754
  grid-column: 4;
673
755
  grid-row: 1;
@@ -676,10 +758,8 @@
676
758
  white-space: nowrap;
677
759
  }
678
760
 
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'] {
761
+ [data-ui-menu] [data-part-item][data-disabled] > :is([data-part-shortcut], [data-part-meta]),
762
+ [data-ui-menu] [data-part-item][data-disabled][aria-haspopup='menu'] > [data-ui-icon] {
683
763
  color: inherit;
684
764
  }
685
765
 
@@ -690,7 +770,7 @@
690
770
  * takes the shortcut's column, because an item that opens a submenu runs no
691
771
  * command and so carries no binding.
692
772
  */
693
- [data-ui='menu'] [data-part='item'][aria-haspopup='menu'] > [data-ui='icon'] {
773
+ [data-ui-menu] [data-part-item][aria-haspopup='menu'] > [data-ui-icon] {
694
774
  --slotted-icon-size: var(--_icon-size);
695
775
 
696
776
  grid-column: 4;
@@ -707,7 +787,7 @@
707
787
 
708
788
  /* ── Separator, empty, loading ────────────────────────────────────────── */
709
789
 
710
- [data-ui='menu'] [data-part='separator'] {
790
+ [data-ui-menu] [data-part-separator] {
711
791
  background-color: var(--slotted-menu-separator-color, var(--_border-color));
712
792
  block-size: var(--_border-width);
713
793
  border: 0;
@@ -726,7 +806,7 @@
726
806
  * stated here: a row that was wider than the menu around it made the menu
727
807
  * grow when its list emptied (M3).
728
808
  */
729
- [data-ui='menu'] [data-part='empty'] {
809
+ [data-ui-menu] [data-part-empty] {
730
810
  color: var(--_muted);
731
811
  grid-column: 1 / -1;
732
812
  padding-block: var(--slotted-space-5, 0.75rem);
@@ -734,7 +814,7 @@
734
814
  text-align: center;
735
815
  }
736
816
 
737
- [data-ui='menu'] > [data-part='content'][data-loading] {
817
+ [data-ui-menu] > [data-part-content][data-loading] {
738
818
  cursor: progress;
739
819
  }
740
820
 
@@ -746,7 +826,7 @@
746
826
  * the theme already carries at the contrast every scheme needs; `danger` is
747
827
  * the one a product reaches for, and the other four cost one line each.
748
828
  */
749
- [data-ui='menu'] [data-part='item'][data-tone='accent'] {
829
+ [data-ui-menu] [data-part-item][data-tone='accent'] {
750
830
  --_accent: var(--slotted-tone-accent-text);
751
831
  --_highlight: var(--slotted-tone-accent-surface);
752
832
  --_highlight-active: var(--slotted-tone-accent-subtle-active);
@@ -754,7 +834,7 @@
754
834
  color: var(--slotted-tone-accent-text);
755
835
  }
756
836
 
757
- [data-ui='menu'] [data-part='item'][data-tone='secondary'] {
837
+ [data-ui-menu] [data-part-item][data-tone='secondary'] {
758
838
  --_accent: var(--slotted-tone-secondary-text);
759
839
  --_highlight: var(--slotted-tone-secondary-surface);
760
840
  --_highlight-active: var(--slotted-tone-secondary-subtle-active);
@@ -762,7 +842,7 @@
762
842
  color: var(--slotted-tone-secondary-text);
763
843
  }
764
844
 
765
- [data-ui='menu'] [data-part='item'][data-tone='success'] {
845
+ [data-ui-menu] [data-part-item][data-tone='success'] {
766
846
  --_accent: var(--slotted-tone-success-text);
767
847
  --_highlight: var(--slotted-tone-success-surface);
768
848
  --_highlight-active: var(--slotted-tone-success-subtle-active);
@@ -770,7 +850,7 @@
770
850
  color: var(--slotted-tone-success-text);
771
851
  }
772
852
 
773
- [data-ui='menu'] [data-part='item'][data-tone='warning'] {
853
+ [data-ui-menu] [data-part-item][data-tone='warning'] {
774
854
  --_accent: var(--slotted-tone-warning-text);
775
855
  --_highlight: var(--slotted-tone-warning-surface);
776
856
  --_highlight-active: var(--slotted-tone-warning-subtle-active);
@@ -778,7 +858,7 @@
778
858
  color: var(--slotted-tone-warning-text);
779
859
  }
780
860
 
781
- [data-ui='menu'] [data-part='item'][data-tone='danger'] {
861
+ [data-ui-menu] [data-part-item][data-tone='danger'] {
782
862
  --_accent: var(--slotted-tone-danger-text);
783
863
  --_highlight: var(--slotted-tone-danger-surface);
784
864
  --_highlight-active: var(--slotted-tone-danger-subtle-active);
@@ -787,29 +867,29 @@
787
867
  }
788
868
 
789
869
  /* An unavailable item keeps no tone: its highlight is the neutral one. */
790
- [data-ui='menu'] [data-part='item'][data-tone][data-disabled] {
870
+ [data-ui-menu] [data-part-item][data-tone][data-disabled] {
791
871
  --_accent: var(--slotted-disabled-foreground, #64748b);
792
872
  --_highlight: var(--slotted-menu-highlight, var(--slotted-tone-secondary-subtle-hover));
793
873
 
794
874
  color: var(--slotted-disabled-foreground, #64748b);
795
875
  }
796
876
 
797
- /* ── Forced colours ───────────────────────────────────────────────────── */
877
+ /* ── Forced colors ───────────────────────────────────────────────────── */
798
878
 
799
879
  /**
800
880
  * 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
881
+ * under forced colors, so the highlight — which is this family's selection
802
882
  * indicator, not decoration — would disappear and leave a reader with no way
803
883
  * to tell which command they are on.
804
884
  */
805
885
  @media (forced-colors: active) {
806
- [data-ui='menu'] [data-part='item']:focus {
886
+ [data-ui-menu] [data-part-item]:focus {
807
887
  background-color: Highlight;
808
888
  color: HighlightText;
809
889
  forced-color-adjust: none;
810
890
  }
811
891
 
812
- [data-ui='menu'] [data-part='item'][data-disabled]:focus {
892
+ [data-ui-menu] [data-part-item][data-disabled]:focus {
813
893
  background-color: Highlight;
814
894
  color: GrayText;
815
895
  }
@@ -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",