@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
@@ -74,7 +74,7 @@
74
74
 
75
75
  /* ── The control ──────────────────────────────────────────────────────── */
76
76
 
77
- [data-ui='select'][data-part='root'] {
77
+ [data-ui-select][data-part-root] {
78
78
  /**
79
79
  * Type, height, inline padding, gap and glyph size come from the control
80
80
  * scales — the only ones the theme restates per density — so a select in a
@@ -125,6 +125,8 @@
125
125
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
126
126
  font-size: var(--_font-size);
127
127
  grid-template-columns: minmax(0, 1fr) auto;
128
+ /* In a flex row the item's basis is its content, not the whole row. */
129
+ flex-basis: content;
128
130
  inline-size: 100%;
129
131
  /* A control in a grid track narrower than its intrinsic width would
130
132
  otherwise refuse to shrink and take the row's edge with it. */
@@ -144,7 +146,7 @@
144
146
  }
145
147
 
146
148
  /* And the clear button's own lane, before the chevron's, when there is one. */
147
- [data-ui='select'][data-part='root']:has(> [data-part='clear']) {
149
+ [data-ui-select][data-part-root]:has(> [data-part-clear]) {
148
150
  grid-template-columns: minmax(0, 1fr) auto auto;
149
151
  }
150
152
 
@@ -153,7 +155,7 @@
153
155
  * value, which is what a filter beside a table needs and what a field never
154
156
  * does — hence the default the contract states, `fullWidth: true`.
155
157
  */
156
- [data-ui='select'][data-part='root']:not([data-full-width]) {
158
+ [data-ui-select][data-part-root]:not([data-full-width]) {
157
159
  inline-size: auto;
158
160
  }
159
161
 
@@ -177,7 +179,7 @@
177
179
  * the chevron still lands on the button that opens the popup — which is why
178
180
  * the chevron can be inert and the arrangement costs nothing.
179
181
  */
180
- [data-ui='select'] > [data-part='trigger'] {
182
+ [data-ui-select] > [data-part-trigger] {
181
183
  align-items: center;
182
184
  appearance: none;
183
185
  background-color: transparent;
@@ -218,7 +220,7 @@
218
220
  }
219
221
 
220
222
  /* And the clear button's own box, plus a second gap, when there is one. */
221
- [data-ui='select'][data-part='root']:has(> [data-part='clear']) > [data-part='trigger'] {
223
+ [data-ui-select][data-part-root]:has(> [data-part-clear]) > [data-part-trigger] {
222
224
  padding-inline-end: calc(
223
225
  var(--_padding-inline) + var(--_icon-size) + var(--_gap) + var(--_action-size) + var(--_gap)
224
226
  );
@@ -229,7 +231,7 @@
229
231
  * control's height as the reader chose, and a form that reflows on selection
230
232
  * is a form that moves under the pointer.
231
233
  */
232
- [data-ui='select'] [data-part='value'] {
234
+ [data-ui-select] [data-part-value] {
233
235
  flex: 1 1 auto;
234
236
  min-inline-size: 0;
235
237
  overflow: hidden;
@@ -241,7 +243,7 @@
241
243
  * Nothing chosen yet. The same weight the reader will see once they choose,
242
244
  * one step quieter, so the control does not change shape when it fills.
243
245
  */
244
- [data-ui='select'] [data-part='value'][data-placeholder] {
246
+ [data-ui-select] [data-part-value][data-placeholder] {
245
247
  color: var(--slotted-select-placeholder-color, var(--slotted-text-muted, GrayText));
246
248
  }
247
249
 
@@ -252,7 +254,7 @@
252
254
  * the same face and marked as unresolved for a stylesheet that wants to say
253
255
  * more.
254
256
  */
255
- [data-ui='select'] [data-part='value'][data-unmatched] {
257
+ [data-ui-select] [data-part-value][data-unmatched] {
256
258
  font-variant-numeric: tabular-nums;
257
259
  }
258
260
 
@@ -280,7 +282,7 @@
280
282
  * trigger spanning underneath, so the frame still opens the popup everywhere
281
283
  * a chip is not.
282
284
  */
283
- [data-ui='select'][data-part='root'] > [data-part='tags'] {
285
+ [data-ui-select][data-part-root] > [data-part-tags] {
284
286
  align-items: center;
285
287
  display: flex;
286
288
  gap: var(--slotted-space-2, 0.25rem);
@@ -293,7 +295,7 @@
293
295
  * the rest of its own target from a transparent halo that stands outside
294
296
  * the chip (TG2), and the clip below would otherwise cut that halo off at
295
297
  * the chip's edge — the press area measured 24 × 22.8 inside the trigger
296
- * and 24 × 24 everywhere else. The chips stay centred in it. It is never
298
+ * and 24 × 24 everywhere else. The chips stay centerd in it. It is never
297
299
  * taller than the control's own inner box, so the height of the frame is
298
300
  * the height of a select that chose one thing.
299
301
  */
@@ -308,7 +310,7 @@
308
310
  pointer-events: none;
309
311
  }
310
312
 
311
- [data-ui='select'] > [data-part='tags'] > * {
313
+ [data-ui-select] > [data-part-tags] > * {
312
314
  /* Each chip takes its own presses back, and stands above the trigger that
313
315
  spans the lane underneath it. */
314
316
  pointer-events: auto;
@@ -321,7 +323,7 @@
321
323
  * to be a count, and `createCollapse` can measure it the way it measures
322
324
  * every other unit.
323
325
  */
324
- [data-ui='select'] > [data-part='tags'] > [data-overflow] {
326
+ [data-ui-select] > [data-part-tags] > [data-overflow] {
325
327
  flex: none;
326
328
  }
327
329
 
@@ -332,7 +334,7 @@
332
334
  * shown: a button whose accessible name disappeared when the frame grew is a
333
335
  * button that changes what it is called when the window is resized.
334
336
  */
335
- [data-ui='select'] [data-part='summary'] {
337
+ [data-ui-select] [data-part-summary] {
336
338
  display: block;
337
339
  overflow: hidden;
338
340
  text-overflow: ellipsis;
@@ -343,7 +345,7 @@
343
345
  white-space: nowrap;
344
346
  }
345
347
 
346
- [data-ui='select'][data-part='root']:not([data-narrow]) [data-part='summary'] {
348
+ [data-ui-select][data-part-root]:not([data-narrow]) [data-part-summary] {
347
349
  block-size: 1px;
348
350
  clip-path: inset(50%);
349
351
  inline-size: 1px;
@@ -351,7 +353,7 @@
351
353
  white-space: nowrap;
352
354
  }
353
355
 
354
- [data-ui='select'][data-part='root'][data-narrow] > [data-part='tags'] {
356
+ [data-ui-select][data-part-root][data-narrow] > [data-part-tags] {
355
357
  display: none;
356
358
  }
357
359
 
@@ -361,7 +363,7 @@
361
363
  * the popup opens: the one movement in the control, and the only thing on the
362
364
  * closed control that says it opens at all.
363
365
  */
364
- [data-ui='select'] > [data-part='arrow'] {
366
+ [data-ui-select] > [data-part-arrow] {
365
367
  --slotted-icon-size: var(--_icon-size);
366
368
 
367
369
  align-items: center;
@@ -378,12 +380,12 @@
378
380
  pointer-events: none;
379
381
  }
380
382
 
381
- [data-ui='select'] > [data-part='arrow'] > [data-ui='icon'] {
383
+ [data-ui-select] > [data-part-arrow] > [data-ui-icon] {
382
384
  transition: rotate var(--slotted-control-transition-duration)
383
385
  var(--slotted-control-transition-easing);
384
386
  }
385
387
 
386
- [data-ui='select'][data-open] > [data-part='arrow'] > [data-ui='icon'] {
388
+ [data-ui-select][data-open] > [data-part-arrow] > [data-ui-icon] {
387
389
  rotate: 180deg;
388
390
  }
389
391
 
@@ -398,7 +400,7 @@
398
400
  * All this rule does is stand it where the chevron stood and give it the
399
401
  * chevron's size and ink, through the size token the shared sheet reads.
400
402
  */
401
- [data-ui='select'] > [data-part='busy'] {
403
+ [data-ui-select] > [data-part-busy] {
402
404
  --slotted-spinner-size: var(--_icon-size);
403
405
 
404
406
  color: var(--slotted-select-arrow-color, var(--slotted-text-muted, GrayText));
@@ -417,7 +419,7 @@
417
419
  * *glyph* keeps the rhythm the value begins with. `text-field`'s arithmetic,
418
420
  * stated in the terms a track states it.
419
421
  */
420
- [data-ui='select'] > [data-part='clear'] {
422
+ [data-ui-select] > [data-part-clear] {
421
423
  align-items: center;
422
424
  appearance: none;
423
425
  background-color: transparent;
@@ -451,7 +453,7 @@
451
453
  * it can also be 24. This grows the target back in both axes and leaves a
452
454
  * larger one alone.
453
455
  */
454
- [data-ui='select'] > [data-part='clear']::after {
456
+ [data-ui-select] > [data-part-clear]::after {
455
457
  content: '';
456
458
  inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
457
459
  position: absolute;
@@ -462,14 +464,14 @@
462
464
  the hit area above grows to 44 pixels around them. It does not reach into
463
465
  the chevron's lane after it, which is the trigger's to answer. */
464
466
  @media (pointer: coarse) {
465
- [data-ui='select'] > [data-part='clear']::after {
467
+ [data-ui-select] > [data-part-clear]::after {
466
468
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
467
469
  inset-inline-end: 0;
468
470
  }
469
471
  }
470
472
 
471
473
  /* The cross is a `Glyph` the binding draws, at the chevron's size. */
472
- [data-ui='select'] > [data-part='clear'] {
474
+ [data-ui-select] > [data-part-clear] {
473
475
  --slotted-icon-size: var(--_icon-size);
474
476
  }
475
477
 
@@ -481,7 +483,7 @@
481
483
  * and a control disagreeing about one row.
482
484
  */
483
485
 
484
- [data-ui='select'][data-part='root'][data-size='sm'] {
486
+ [data-ui-select][data-part-root][data-size='sm'] {
485
487
  --_font-size: var(--slotted-control-font-size-sm, 12px);
486
488
  --_height: var(--slotted-control-height-sm, 30px);
487
489
  --_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
@@ -490,7 +492,7 @@
490
492
  --_inner-size: var(--slotted-control-inner-size-sm, 22px);
491
493
  }
492
494
 
493
- [data-ui='select'][data-part='root'][data-size='md'] {
495
+ [data-ui-select][data-part-root][data-size='md'] {
494
496
  --_font-size: var(--slotted-control-font-size-md, 13px);
495
497
  --_height: var(--slotted-control-height-md, 34px);
496
498
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -499,7 +501,7 @@
499
501
  --_inner-size: var(--slotted-control-inner-size-md, 24px);
500
502
  }
501
503
 
502
- [data-ui='select'][data-part='root'][data-size='lg'] {
504
+ [data-ui-select][data-part-root][data-size='lg'] {
503
505
  --_font-size: var(--slotted-control-font-size-lg, 14px);
504
506
  --_height: var(--slotted-control-height-lg, 38px);
505
507
  --_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
@@ -517,7 +519,7 @@
517
519
  * does not reflow when the pointer crosses it.
518
520
  */
519
521
 
520
- [data-ui='select'][data-part='root'][data-variant='subtle'] {
522
+ [data-ui-select][data-part-root][data-variant='subtle'] {
521
523
  background-color: var(
522
524
  --slotted-select-subtle-background,
523
525
  var(--slotted-surface-sunken, Canvas)
@@ -531,7 +533,7 @@
531
533
  /* No edge, no lift, no ground and no corner of its own: the cell it sits in
532
534
  is the box, the row is the ground, a cell has no corner, and the resting
533
535
  shadow would draw the cell where there is none. */
534
- [data-ui='select'][data-part='root'][data-variant='plain'] {
536
+ [data-ui-select][data-part-root][data-variant='plain'] {
535
537
  background-color: transparent;
536
538
  border-color: transparent;
537
539
  border-radius: var(--slotted-radius-none, 0px);
@@ -540,11 +542,11 @@
540
542
 
541
543
  /**
542
544
  * The one rule the theme cannot write for the family. A transparent border
543
- * has no system colour to be remapped to, so the `plain` control would lose
545
+ * has no system color to be remapped to, so the `plain` control would lose
544
546
  * its only edge exactly where an edge matters most.
545
547
  */
546
548
  @media (forced-colors: active) {
547
- [data-ui='select'][data-part='root'][data-variant='plain'] {
549
+ [data-ui-select][data-part-root][data-variant='plain'] {
548
550
  border-color: ButtonBorder;
549
551
  }
550
552
  }
@@ -555,13 +557,13 @@
555
557
  * it can meet, which is the order `STATE_PRECEDENCE` sets.
556
558
  */
557
559
 
558
- [data-ui='select'][data-part='root']:hover:not([data-disabled]):not([data-readonly]):not(
560
+ [data-ui-select][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
559
561
  [data-invalid]
560
562
  ) {
561
563
  border-color: var(--slotted-select-hover-border-color, var(--slotted-tone-accent-border));
562
564
  }
563
565
 
564
- [data-ui='select'][data-part='root'][data-variant='subtle']:hover:not([data-disabled]):not(
566
+ [data-ui-select][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
565
567
  [data-readonly]
566
568
  ):not([data-invalid]) {
567
569
  background-color: var(
@@ -570,7 +572,7 @@
570
572
  );
571
573
  }
572
574
 
573
- [data-ui='select'][data-part='root'][data-variant='plain']:hover:not([data-disabled]):not(
575
+ [data-ui-select][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
574
576
  [data-readonly]
575
577
  ):not([data-invalid]) {
576
578
  background-color: var(
@@ -587,13 +589,13 @@
587
589
  * press, which is exactly right here: a reader who pressed the control can
588
590
  * see where they pressed, and the popup is already open under it.
589
591
  */
590
- [data-ui='select'][data-part='root']:has(> [data-part='trigger']:focus-visible) {
591
- /* The resting shadow, recoloured: the geometry is the foundation's and the
592
- ink is the ring's, so the lift and the outline are one colour. */
592
+ [data-ui-select][data-part-root]:has(> [data-part-trigger]:focus-visible) {
593
+ /* The resting shadow, recolored: the geometry is the foundation's and the
594
+ ink is the ring's, so the lift and the outline are one color. */
593
595
  box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
594
596
  var(--slotted-focus-ring-color, Highlight);
595
597
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
596
- outline-offset: var(--slotted-focus-ring-offset, 2px);
598
+ outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
597
599
  }
598
600
 
599
601
  /**
@@ -603,9 +605,7 @@
603
605
  * shadow that appears only under focus is a cell that changes size when it
604
606
  * is used.
605
607
  */
606
- [data-ui='select'][data-part='root'][data-variant='plain']:has(
607
- > [data-part='trigger']:focus-visible
608
- ) {
608
+ [data-ui-select][data-part-root][data-variant='plain']:has(> [data-part-trigger]:focus-visible) {
609
609
  box-shadow: none;
610
610
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
611
611
  }
@@ -615,7 +615,7 @@
615
615
  * it. A popup hanging off a control with a resting border reads as two
616
616
  * elements that happen to be adjacent.
617
617
  */
618
- [data-ui='select'][data-part='root'][data-open]:not([data-disabled]) {
618
+ [data-ui-select][data-part-root][data-open]:not([data-disabled]) {
619
619
  border-color: var(--slotted-select-open-border-color, var(--slotted-tone-accent-border));
620
620
  }
621
621
 
@@ -624,9 +624,9 @@
624
624
  * reporting an error should not stop looking wrong because it was opened.
625
625
  * The ring is retargeted rather than repainted — every rule that draws focus
626
626
  * reads `--slotted-focus-ring-color`, so pointing that one name at the
627
- * invalid colour moves the outline and the shadow together.
627
+ * invalid color moves the outline and the shadow together.
628
628
  */
629
- [data-ui='select'][data-part='root'][data-invalid] {
629
+ [data-ui-select][data-part-root][data-invalid] {
630
630
  --slotted-focus-ring-color: var(
631
631
  --slotted-select-invalid-focus-ring-color,
632
632
  var(--slotted-focus-ring-color-invalid, Highlight)
@@ -643,7 +643,7 @@
643
643
 
644
644
  border-color: var(--slotted-select-invalid-border-color, var(--slotted-tone-danger-border));
645
645
  /*
646
- * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
646
+ * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
647
647
  * `high-contrast` the danger border is the resting edge's black. The line
648
648
  * is a shadow inside the border, so neither box nor text moves, and it
649
649
  * takes the resting lift's place.
@@ -651,15 +651,15 @@
651
651
  box-shadow: var(--_invalid-edge);
652
652
  }
653
653
 
654
- [data-ui='select'][data-part='root'][data-invalid]:has(> [data-part='trigger']:focus-visible) {
654
+ [data-ui-select][data-part-root][data-invalid]:has(> [data-part-trigger]:focus-visible) {
655
655
  box-shadow:
656
656
  var(--_invalid-edge),
657
657
  var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
658
658
  var(--slotted-focus-ring-color, Highlight);
659
659
  }
660
660
 
661
- [data-ui='select'][data-part='root'][data-variant='plain'][data-invalid]:has(
662
- > [data-part='trigger']:focus-visible
661
+ [data-ui-select][data-part-root][data-variant='plain'][data-invalid]:has(
662
+ > [data-part-trigger]:focus-visible
663
663
  ) {
664
664
  /* The ring lies inside the box here, over the border and an edge as wide as
665
665
  it; the edge reaches past the ring. */
@@ -672,26 +672,29 @@
672
672
  }
673
673
 
674
674
  /*
675
- * Forced colours remove every box shadow, and the edge with them. The
675
+ * Forced colors remove every box shadow, and the edge with them. The
676
676
  * width comes back as an outline inside the border, and a focused invalid
677
677
  * control draws its ring double, which a valid ring is not.
678
678
  */
679
679
  @media (forced-colors: active) {
680
- [data-ui='select'][data-part='root'][data-invalid] {
680
+ [data-ui-select][data-part-root][data-invalid] {
681
681
  outline: var(--_invalid-edge-width) solid CanvasText;
682
682
  outline-offset: calc(
683
683
  -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
684
684
  );
685
685
  }
686
686
 
687
- [data-ui='select'][data-part='root'][data-invalid]:has(> [data-part='trigger']:focus-visible) {
687
+ [data-ui-select][data-part-root][data-invalid]:has(> [data-part-trigger]:focus-visible) {
688
688
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
689
689
  var(--slotted-focus-ring-color, Highlight);
690
- outline-offset: var(--slotted-focus-ring-offset, 2px);
690
+ outline-offset: var(
691
+ --slotted-control-focus-ring-offset,
692
+ var(--slotted-focus-ring-offset, 2px)
693
+ );
691
694
  }
692
695
 
693
- [data-ui='select'][data-part='root'][data-variant='plain'][data-invalid]:has(
694
- > [data-part='trigger']:focus-visible
696
+ [data-ui-select][data-part-root][data-variant='plain'][data-invalid]:has(
697
+ > [data-part-trigger]:focus-visible
695
698
  ) {
696
699
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
697
700
  var(--slotted-focus-ring-color, Highlight);
@@ -708,14 +711,14 @@
708
711
  * `role="combobox"` has a readonly the platform enforces, so the family
709
712
  * refuses the change itself and this is what the refusal looks like.
710
713
  */
711
- [data-ui='select'][data-part='root'][data-readonly] {
714
+ [data-ui-select][data-part-root][data-readonly] {
712
715
  background-color: var(
713
716
  --slotted-select-readonly-background,
714
717
  var(--slotted-tone-secondary-subtle-hover)
715
718
  );
716
719
  }
717
720
 
718
- [data-ui='select'][data-part='root'][data-readonly] [data-part='arrow'] {
721
+ [data-ui-select][data-part-root][data-readonly] [data-part-arrow] {
719
722
  opacity: 0.5;
720
723
  }
721
724
 
@@ -726,30 +729,30 @@
726
729
  * way to say. The attribute alone left such a control looking operable and
727
730
  * answering nothing.
728
731
  */
729
- [data-ui='select'][data-part='root'][data-disabled],
730
- [data-ui='select'][data-part='root']:has(> [data-part='trigger']:disabled) {
732
+ [data-ui-select][data-part-root][data-disabled],
733
+ [data-ui-select][data-part-root]:has(> [data-part-trigger]:disabled) {
731
734
  background-color: var(--slotted-select-disabled-background, var(--slotted-disabled-background));
732
735
  border-color: var(--slotted-select-disabled-border-color, var(--slotted-disabled-border));
733
736
  /* Nothing a person cannot reach is lifted off the page. */
734
737
  box-shadow: none;
735
- /* Muted to the colour the theme measures rather than faded by opacity: a
738
+ /* Muted to the color the theme measures rather than faded by opacity: a
736
739
  value nobody can read is a field nobody can check. */
737
740
  color: var(--slotted-select-disabled-color, var(--slotted-disabled-foreground));
738
741
  }
739
742
 
740
- [data-ui='select'][data-part='root'][data-disabled] > [data-part='trigger'],
741
- [data-ui='select'][data-part='root'] > [data-part='trigger']:disabled {
743
+ [data-ui-select][data-part-root][data-disabled] > [data-part-trigger],
744
+ [data-ui-select][data-part-root] > [data-part-trigger]:disabled {
742
745
  cursor: not-allowed;
743
746
  }
744
747
 
745
- [data-ui='select'] > [data-part='clear']:hover:not(:disabled):not([data-disabled]) {
748
+ [data-ui-select] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
746
749
  background-color: var(
747
750
  --slotted-select-action-hover-background,
748
751
  var(--slotted-tone-secondary-subtle-hover)
749
752
  );
750
753
  }
751
754
 
752
- [data-ui='select'] > [data-part='clear']:active:not(:disabled):not([data-disabled]) {
755
+ [data-ui-select] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
753
756
  background-color: var(
754
757
  --slotted-select-action-active-background,
755
758
  var(--slotted-tone-secondary-subtle-active)
@@ -761,7 +764,7 @@
761
764
  * Tabbing from the trigger to it has to move something visible, and a ring
762
765
  * around the whole frame would sit still while focus moved inside it.
763
766
  */
764
- [data-ui='select'] > [data-part='clear']:focus-visible {
767
+ [data-ui-select] > [data-part-clear]:focus-visible {
765
768
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
766
769
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
767
770
  }
@@ -774,7 +777,7 @@
774
777
  * purpose. The painted surface is one element in, as `tooltip`, `popover` and
775
778
  * `menu` are built.
776
779
  */
777
- [data-ui='select'][data-part='positioner'] {
780
+ [data-ui-select][data-part-positioner] {
778
781
  --_surface: var(--slotted-select-surface, var(--slotted-surface-raised, #ffffff));
779
782
  --_text: var(--slotted-select-content-text, var(--slotted-text, #0f172a));
780
783
  --_muted: var(--slotted-select-content-text-muted, var(--slotted-text-muted, #5b6b7f));
@@ -805,7 +808,11 @@
805
808
  --_inset-inline: var(--slotted-select-content-padding-inline, var(--slotted-space-2, 0.25rem));
806
809
  --_item-inset: var(--slotted-control-padding-inline-md, 0.8125rem);
807
810
  --_item-height: var(--slotted-control-height-md, 34px);
808
- --_item-radius: var(--slotted-select-item-radius, var(--slotted-control-radius));
811
+ /* Concentric with the panel: its radius less the inset, floored at 0. */
812
+ --_item-radius: var(
813
+ --slotted-select-item-radius,
814
+ max(0px, calc(var(--_radius) - var(--_inset-inline)))
815
+ );
809
816
  --_content-font-size: var(--slotted-control-font-size-md, 13px);
810
817
  --_secondary-font-size: var(--slotted-control-font-size-sm, 12px);
811
818
  --_content-icon-size: var(--slotted-control-icon-size-md, 16px);
@@ -833,7 +840,6 @@
833
840
  pointer, and the frame must not swallow a press meant for the page. */
834
841
  pointer-events: none;
835
842
 
836
- opacity: 0;
837
843
  /**
838
844
  * R7: the layer arrives along the axis it opens on — from one space step
839
845
  * above its place when it opens downward, from one step below when it
@@ -843,17 +849,15 @@
843
849
  */
844
850
  --_enter-distance: var(--slotted-space-2, 0.25rem);
845
851
  translate: 0 calc(-1 * var(--_enter-distance));
846
- transition:
847
- opacity var(--slotted-duration-short) var(--slotted-easing-exit),
848
- translate var(--slotted-duration-short) var(--slotted-easing-exit);
852
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
849
853
  }
850
854
 
851
- [data-ui='select'][data-part='positioner'][data-side='top'] {
855
+ [data-ui-select][data-part-positioner][data-side='top'] {
852
856
  translate: 0 var(--_enter-distance);
853
857
  }
854
858
 
855
859
  /* A lateral side has no block direction to arrive from, so it only fades. */
856
- [data-ui='select'][data-part='positioner']:is([data-side='left'], [data-side='right']) {
860
+ [data-ui-select][data-part-positioner]:is([data-side='left'], [data-side='right']) {
857
861
  translate: 0 0;
858
862
  }
859
863
 
@@ -866,8 +870,7 @@
866
870
  * A keyframe states where it starts. The exit stays a transition: it
867
871
  * leaves from wherever the layer is, on the closed rule's durations.
868
872
  */
869
- [data-ui='select'][data-part='positioner'][data-open] {
870
- opacity: 1;
873
+ [data-ui-select][data-part-positioner][data-open] {
871
874
  translate: 0 0;
872
875
  transition: none;
873
876
  }
@@ -877,31 +880,22 @@
877
880
  * with the side, and a layer written open in static markup — the harness,
878
881
  * a docs snippet — is simply there, and is photographed where it stands.
879
882
  */
880
- [data-ui='select'][data-part='positioner'][data-open][data-positioned] {
883
+ [data-ui-select][data-part-positioner][data-open][data-positioned] {
881
884
  animation: slotted-select-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter);
882
885
  }
883
886
 
884
- [data-ui='select'][data-part='positioner'][data-open][data-positioned][data-side='top'] {
887
+ [data-ui-select][data-part-positioner][data-open][data-positioned][data-side='top'] {
885
888
  animation-name: slotted-select-enter-up;
886
889
  }
887
890
 
888
- [data-ui='select'][data-part='positioner'][data-open][data-positioned]:is(
889
- [data-side='left'],
890
- [data-side='right']
891
- ) {
892
- animation-name: slotted-select-fade;
893
- }
894
-
895
891
  @keyframes slotted-select-enter-down {
896
892
  from {
897
- opacity: 0;
898
893
  translate: 0 calc(-1 * var(--_enter-distance));
899
894
  }
900
895
  }
901
896
 
902
897
  @keyframes slotted-select-enter-up {
903
898
  from {
904
- opacity: 0;
905
899
  translate: 0 var(--_enter-distance);
906
900
  }
907
901
  }
@@ -912,27 +906,48 @@
912
906
  }
913
907
  }
914
908
 
909
+ /**
910
+ * The fade belongs to the part that paints the surface, and the layer only
911
+ * moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
912
+ * of what it holds, so a `backdrop-filter` on the content blurs nothing until
913
+ * the layer is opaque and then appears at once. The content's own opacity
914
+ * leaves its own filter drawn on every frame of the motion.
915
+ */
916
+ [data-ui-select][data-part-positioner] > [data-part-content] {
917
+ opacity: 0;
918
+ transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
919
+ }
920
+
921
+ [data-ui-select][data-part-positioner][data-open] > [data-part-content] {
922
+ opacity: 1;
923
+ transition: none;
924
+ }
925
+
926
+ [data-ui-select][data-part-positioner][data-open][data-positioned] > [data-part-content] {
927
+ animation: slotted-select-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
928
+ }
929
+
915
930
  /* Stillness keeps the fade and drops the movement (R7). */
916
931
  @media (prefers-reduced-motion: reduce) {
917
- [data-ui='select'][data-part='positioner'],
918
- [data-ui='select'][data-part='positioner'][data-side='top'],
919
- [data-ui='select'][data-part='positioner'][data-side='left'],
920
- [data-ui='select'][data-part='positioner'][data-side='right'] {
932
+ [data-ui-select][data-part-positioner],
933
+ [data-ui-select][data-part-positioner][data-side='top'],
934
+ [data-ui-select][data-part-positioner][data-side='left'],
935
+ [data-ui-select][data-part-positioner][data-side='right'] {
921
936
  translate: 0 0;
922
- transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
937
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
923
938
  }
924
939
 
925
- [data-ui='select'][data-part='positioner'][data-open][data-positioned],
926
- [data-ui='select'][data-part='positioner'][data-open][data-positioned][data-side='top'],
927
- [data-ui='select'][data-part='positioner'][data-open][data-positioned][data-side='left'],
928
- [data-ui='select'][data-part='positioner'][data-open][data-positioned][data-side='right'] {
929
- animation-name: slotted-select-fade;
940
+ [data-ui-select][data-part-positioner][data-open][data-positioned],
941
+ [data-ui-select][data-part-positioner][data-open][data-positioned][data-side='top'],
942
+ [data-ui-select][data-part-positioner][data-open][data-positioned][data-side='left'],
943
+ [data-ui-select][data-part-positioner][data-open][data-positioned][data-side='right'] {
944
+ animation-name: none;
930
945
  }
931
946
  }
932
947
 
933
948
  /* The anchor scrolled out of its own clipper. The popup is still open and
934
949
  its options still belong to a control the reader can no longer see. */
935
- [data-ui='select'][data-part='positioner'][data-detached] {
950
+ [data-ui-select][data-part-positioner][data-detached] {
936
951
  visibility: hidden;
937
952
  }
938
953
 
@@ -942,11 +957,11 @@
942
957
  * narrow control does not wrap its option labels. `anchor` pins the popup to
943
958
  * the control's width exactly.
944
959
  */
945
- [data-ui='select'][data-part='positioner'][data-width='anchor'] {
960
+ [data-ui-select][data-part-positioner][data-width='anchor'] {
946
961
  inline-size: var(--slotted-positioner-anchor-width, auto);
947
962
  }
948
963
 
949
- [data-ui='select'][data-part='positioner'][data-width='content'] {
964
+ [data-ui-select][data-part-positioner][data-width='content'] {
950
965
  inline-size: max-content;
951
966
  max-inline-size: min(var(--_measure), var(--slotted-positioner-available-width, 100vw));
952
967
  /* Never narrower than the control it belongs to: a popup that shrank under
@@ -954,7 +969,7 @@
954
969
  min-inline-size: var(--slotted-positioner-anchor-width, auto);
955
970
  }
956
971
 
957
- [data-ui='select'][data-part='positioner'][data-size='sm'] {
972
+ [data-ui-select][data-part-positioner][data-size='sm'] {
958
973
  --_item-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
959
974
  --_item-height: var(--slotted-control-height-sm, 30px);
960
975
  --_content-font-size: var(--slotted-control-font-size-sm, 12px);
@@ -963,7 +978,7 @@
963
978
  --_column-gap: var(--slotted-control-gap-sm, 0.375rem);
964
979
  }
965
980
 
966
- [data-ui='select'][data-part='positioner'][data-size='lg'] {
981
+ [data-ui-select][data-part-positioner][data-size='lg'] {
967
982
  --_item-inset: var(--slotted-control-padding-inline-lg, 1rem);
968
983
  --_item-height: var(--slotted-control-height-lg, 38px);
969
984
  --_content-font-size: var(--slotted-control-font-size-lg, 14px);
@@ -981,7 +996,7 @@
981
996
  * the screen. `overscroll-behavior` keeps the page still once the surface has
982
997
  * scrolled to its end.
983
998
  */
984
- [data-ui='select'] > [data-part='content'] {
999
+ [data-ui-select] > [data-part-content] {
985
1000
  background: var(--_surface);
986
1001
  border: var(--_border-width) solid var(--_border-color);
987
1002
  border-radius: var(--_radius);
@@ -995,6 +1010,16 @@
995
1010
  );
996
1011
  outline: none;
997
1012
  pointer-events: auto;
1013
+ /* A theme that paints this surface as a translucent material blurs what moves behind it. */
1014
+ -webkit-backdrop-filter: var(--slotted-select-content-backdrop-filter, none);
1015
+ backdrop-filter: var(--slotted-select-content-backdrop-filter, none);
1016
+ }
1017
+
1018
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
1019
+ [data-ui-select] > [data-part-content] {
1020
+ -webkit-backdrop-filter: none;
1021
+ backdrop-filter: none;
1022
+ }
998
1023
  }
999
1024
 
1000
1025
  /**
@@ -1010,8 +1035,8 @@
1010
1035
  * `overscroll-behavior` keeps the page still once the scroller has reached
1011
1036
  * its end.
1012
1037
  */
1013
- [data-ui='select'] > [data-part='content']:not([data-search]),
1014
- [data-ui='select'] [data-part='list'] {
1038
+ [data-ui-select] > [data-part-content]:not([data-search]),
1039
+ [data-ui-select] [data-part-list] {
1015
1040
  display: grid;
1016
1041
  grid-template-columns: auto minmax(0, 1fr) auto;
1017
1042
  overflow-y: auto;
@@ -1020,7 +1045,7 @@
1020
1045
  padding-inline: var(--_inset-inline);
1021
1046
  }
1022
1047
 
1023
- [data-ui='select'] > [data-part='content'][data-search] {
1048
+ [data-ui-select] > [data-part-content][data-search] {
1024
1049
  display: flex;
1025
1050
  flex-direction: column;
1026
1051
  /* The field draws to the surface's own edges and the list keeps the inset,
@@ -1030,7 +1055,7 @@
1030
1055
 
1031
1056
  /* `auto` as the flex basis measures the whole list and refuses to shrink;
1032
1057
  the surface is what holds the height, and the list is what gives. */
1033
- [data-ui='select'] [data-part='list'] {
1058
+ [data-ui-select] [data-part-list] {
1034
1059
  flex: 1 1 auto;
1035
1060
  min-block-size: 0;
1036
1061
  }
@@ -1052,7 +1077,7 @@
1052
1077
  * rhythm, with the rule under it drawn from the border scale rather than
1053
1078
  * from a shadow — the same rule the `chosen` band draws above the list.
1054
1079
  */
1055
- [data-ui='select'] [data-part='search'] {
1080
+ [data-ui-select] [data-part-search] {
1056
1081
  align-items: center;
1057
1082
  border-block-end: var(--_border-width) solid var(--_border-color);
1058
1083
  box-sizing: border-box;
@@ -1073,7 +1098,7 @@
1073
1098
  * bare line of placeholder text at the top of a panel reads as a title, and
1074
1099
  * a reader does not type into a title.
1075
1100
  */
1076
- [data-ui='select'] [data-part='search-icon'] {
1101
+ [data-ui-select] [data-part-search-icon] {
1077
1102
  --slotted-icon-size: var(--_content-icon-size);
1078
1103
 
1079
1104
  align-items: center;
@@ -1097,7 +1122,7 @@
1097
1122
  * rather than a state, and the one thing on the surface that never changes
1098
1123
  * would be the loudest. What says where focus is, is the caret.
1099
1124
  */
1100
- [data-ui='select'] [data-part='search-input'] {
1125
+ [data-ui-select] [data-part-search-input] {
1101
1126
  background-color: transparent;
1102
1127
  border: 0;
1103
1128
  color: inherit;
@@ -1111,7 +1136,7 @@
1111
1136
  text-overflow: ellipsis;
1112
1137
  }
1113
1138
 
1114
- [data-ui='select'] [data-part='search-input']::placeholder {
1139
+ [data-ui-select] [data-part-search-input]::placeholder {
1115
1140
  color: var(--slotted-select-placeholder-color, var(--_muted));
1116
1141
  text-overflow: ellipsis;
1117
1142
  }
@@ -1131,7 +1156,7 @@
1131
1156
  * to the surface's own edges, which is where the rule between it and the list
1132
1157
  * has to end — a rule from the border scale, not a shadow.
1133
1158
  */
1134
- [data-ui='select'] [data-part='chosen'] {
1159
+ [data-ui-select] [data-part-chosen] {
1135
1160
  background: var(--_surface);
1136
1161
  border-block-end: var(--_border-width) solid var(--_border-color);
1137
1162
  box-sizing: border-box;
@@ -1161,7 +1186,8 @@
1161
1186
  padding-block: var(--_inset-block);
1162
1187
  padding-inline: var(--_inset-inline);
1163
1188
  position: sticky;
1164
- z-index: 1;
1189
+ /* Above a group label stuck to the same edge. */
1190
+ z-index: 2;
1165
1191
  }
1166
1192
 
1167
1193
  /**
@@ -1169,7 +1195,7 @@
1169
1195
  * interaction — the highlight is `aria-activedescendant`, not focus — so a
1170
1196
  * ring here would draw a box around something nobody is operating.
1171
1197
  */
1172
- [data-ui='select'] > [data-part='content']:focus-visible {
1198
+ [data-ui-select] > [data-part-content]:focus-visible {
1173
1199
  outline: none;
1174
1200
  }
1175
1201
 
@@ -1180,7 +1206,7 @@
1180
1206
  * surface's columns instead of starting a second set. Without the subgrid a
1181
1207
  * group would align its own labels and disagree with the options outside it.
1182
1208
  */
1183
- [data-ui='select'] [data-part='group'] {
1209
+ [data-ui-select] [data-part-group] {
1184
1210
  display: grid;
1185
1211
  grid-column: 1 / -1;
1186
1212
  grid-template-columns: subgrid;
@@ -1194,19 +1220,56 @@
1194
1220
  * author rule wins over the user agent sheet. Without this the search
1195
1221
  * filtered nothing the reader could see.
1196
1222
  */
1197
- [data-ui='select'] [data-part='item'][hidden],
1198
- [data-ui='select'] [data-part='group'][hidden] {
1223
+ [data-ui-select] [data-part-item][hidden],
1224
+ [data-ui-select] [data-part-group][hidden] {
1199
1225
  display: none;
1200
1226
  }
1201
1227
 
1202
- [data-ui='select'] [data-part='group-label'] {
1228
+ /**
1229
+ * A group's label stays at the top of the list while its group is in view.
1230
+ * The group is the label's containing block, so the next label pushes it out
1231
+ * and a group scrolled past takes its label with it. It sticks to the
1232
+ * scrollport's edge rather than the padding's, on the surface's ground, above
1233
+ * the items and below the parts the surface draws over them.
1234
+ */
1235
+ [data-ui-select] [data-part-group-label] {
1236
+ background: var(--_surface);
1237
+ box-sizing: border-box;
1203
1238
  color: var(--_muted);
1204
1239
  font-size: var(--_secondary-font-size);
1205
1240
  font-weight: var(--slotted-font-weight-semibold, 600);
1206
1241
  grid-column: 1 / -1;
1242
+ inset-block-start: calc(-1 * var(--_inset-block));
1207
1243
  line-height: var(--slotted-line-height-sm, 1.45);
1244
+ min-block-size: var(--_group-label-height);
1208
1245
  padding-block: var(--slotted-space-2, 0.25rem);
1209
1246
  padding-inline: var(--_item-inset);
1247
+ position: sticky;
1248
+ z-index: 1;
1249
+ }
1250
+
1251
+ @media (forced-colors: active) {
1252
+ [data-ui-select] [data-part-group-label] {
1253
+ background: Canvas;
1254
+ }
1255
+ }
1256
+
1257
+ /**
1258
+ * The label's height, which the list keeps clear above an item the keys
1259
+ * bring into view (`revealWithin` reads the scroll padding), so the item is
1260
+ * never drawn under a label stuck to the top.
1261
+ */
1262
+ [data-ui-select] > [data-part-content]:not([data-search]):has([data-part-group-label]),
1263
+ [data-ui-select] [data-part-list]:has([data-part-group-label]) {
1264
+ --_group-label-height: var(
1265
+ --slotted-select-group-label-height,
1266
+ calc(
1267
+ var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
1268
+ var(--slotted-space-2, 0.25rem)
1269
+ )
1270
+ );
1271
+
1272
+ scroll-padding-block-start: var(--_group-label-height);
1210
1273
  }
1211
1274
 
1212
1275
  /* ── Options ──────────────────────────────────────────────────────────── */
@@ -1221,7 +1284,7 @@
1221
1284
  * `min-block-size` rather than a height, because an option with a
1222
1285
  * description is two lines tall and still has to clear the target minimum.
1223
1286
  */
1224
- [data-ui='select'] [data-part='item'] {
1287
+ [data-ui-select] [data-part-item] {
1225
1288
  align-content: center;
1226
1289
  border-radius: var(--_item-radius);
1227
1290
  box-sizing: border-box;
@@ -1268,7 +1331,7 @@
1268
1331
  * whichever device is driving, and the state a screen reader announces and
1269
1332
  * the state the eye sees are the same state.
1270
1333
  */
1271
- [data-ui='select'] [data-part='item'][data-current] {
1334
+ [data-ui-select] [data-part-item][data-current] {
1272
1335
  background-color: var(--_highlight);
1273
1336
  /**
1274
1337
  * A ring as well as a ground, because the ground alone carries the whole
@@ -1285,17 +1348,17 @@
1285
1348
  var(--slotted-select-highlight-ring, var(--slotted-tone-accent-border));
1286
1349
  }
1287
1350
 
1288
- [data-ui='select'] [data-part='item']:not([data-disabled]):active {
1351
+ [data-ui-select] [data-part-item]:not([data-disabled]):active {
1289
1352
  background-color: var(--_highlight-active);
1290
1353
  }
1291
1354
 
1292
1355
  /**
1293
1356
  * Chosen, which is not the same as highlighted. The check in the last column
1294
- * is the primary signal — it survives forced colours, where every tone ground
1357
+ * is the primary signal — it survives forced colors, where every tone ground
1295
1358
  * becomes `Canvas` — and the accent ink is the secondary one, so the row a
1296
1359
  * reader is looking for is findable at a glance in a list of forty.
1297
1360
  */
1298
- [data-ui='select'] [data-part='item'][data-selected] {
1361
+ [data-ui-select] [data-part-item][data-selected] {
1299
1362
  color: var(--_selected-color);
1300
1363
  }
1301
1364
 
@@ -1308,17 +1371,17 @@
1308
1371
  * selection begins and ends. `select` and `combobox` draw the same ground
1309
1372
  * and answer the same way; `selection-block.test.mjs` holds the three to it.
1310
1373
  */
1311
- [data-ui='select'] [data-part='item'][data-selected] + [data-part='item'][data-selected] {
1374
+ [data-ui-select] [data-part-item][data-selected] + [data-part-item][data-selected] {
1312
1375
  border-start-end-radius: 0;
1313
1376
  border-start-start-radius: 0;
1314
1377
  }
1315
1378
 
1316
- [data-ui='select'] [data-part='item'][data-selected]:has(+ [data-part='item'][data-selected]) {
1379
+ [data-ui-select] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
1317
1380
  border-end-end-radius: 0;
1318
1381
  border-end-start-radius: 0;
1319
1382
  }
1320
1383
 
1321
- [data-ui='select'] [data-part='item'][data-selected] > [data-part='label'] {
1384
+ [data-ui-select] [data-part-item][data-selected] > [data-part-label] {
1322
1385
  font-weight: var(--slotted-font-weight-medium, 500);
1323
1386
  }
1324
1387
 
@@ -1329,7 +1392,7 @@
1329
1392
  * disabled surface rather than the highlight, and the text stays legible
1330
1393
  * instead of being faded toward it.
1331
1394
  */
1332
- [data-ui='select'] [data-part='item'][data-disabled] {
1395
+ [data-ui-select] [data-part-item][data-disabled] {
1333
1396
  color: var(--slotted-disabled-foreground, #64748b);
1334
1397
  cursor: not-allowed;
1335
1398
  }
@@ -1355,7 +1418,7 @@
1355
1418
  * would watch it disappear. A cursor lifts, always. What the row cannot do is
1356
1419
  * said by the ink and by the ring, which both step down to the disabled pair.
1357
1420
  */
1358
- [data-ui='select'] [data-part='item'][data-disabled][data-current] {
1421
+ [data-ui-select] [data-part-item][data-disabled][data-current] {
1359
1422
  box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
1360
1423
  var(--slotted-disabled-border, #cbd5e1);
1361
1424
  color: var(--slotted-disabled-foreground, #64748b);
@@ -1369,7 +1432,7 @@
1369
1432
  * states the line box every cell inherits, exactly as tall as the line it
1370
1433
  * sits beside.
1371
1434
  */
1372
- [data-ui='select'] :is([data-part='indicator'], [data-part='icon']) {
1435
+ [data-ui-select] :is([data-part-indicator], [data-part-icon]) {
1373
1436
  block-size: 1lh;
1374
1437
  }
1375
1438
 
@@ -1379,10 +1442,10 @@
1379
1442
  * not a given option fills it.
1380
1443
  *
1381
1444
  * The box holds content and paints none: a `Glyph` in an `Icon` box, or
1382
- * artwork of the consumer's own, centred and sized from the column through
1445
+ * artwork of the consumer's own, centerd and sized from the column through
1383
1446
  * `--slotted-icon-size`. No stylesheet fills it.
1384
1447
  */
1385
- [data-ui='select'] [data-part='icon'] {
1448
+ [data-ui-select] [data-part-icon] {
1386
1449
  --slotted-icon-size: var(--_content-icon-size);
1387
1450
 
1388
1451
  align-items: center;
@@ -1398,7 +1461,7 @@
1398
1461
  /* Column two, and the only column that gives way. It is scoped to the option
1399
1462
  rather than to the family: a chip in the control carries a `label` of its
1400
1463
  own, and this rule would have put it in the popup's second column (SL4). */
1401
- [data-ui='select'] [data-part='item'] > [data-part='label'] {
1464
+ [data-ui-select] [data-part-item] > [data-part-label] {
1402
1465
  grid-column: 2;
1403
1466
  grid-row: 1;
1404
1467
  min-inline-size: 0;
@@ -1419,7 +1482,7 @@
1419
1482
  overflow-wrap: anywhere;
1420
1483
  }
1421
1484
 
1422
- [data-ui='select'] [data-part='description'] {
1485
+ [data-ui-select] [data-part-description] {
1423
1486
  color: var(--_muted);
1424
1487
  font-size: var(--_secondary-font-size);
1425
1488
  grid-column: 2;
@@ -1429,7 +1492,7 @@
1429
1492
  overflow-wrap: anywhere;
1430
1493
  }
1431
1494
 
1432
- [data-ui='select'] [data-part='item'][data-disabled] > [data-part='description'] {
1495
+ [data-ui-select] [data-part-item][data-disabled] > [data-part-description] {
1433
1496
  color: inherit;
1434
1497
  }
1435
1498
 
@@ -1438,7 +1501,7 @@
1438
1501
  * reserved whether or not the check is drawn, so a list does not shift by
1439
1502
  * sixteen pixels as the reader moves through it.
1440
1503
  */
1441
- [data-ui='select'] [data-part='indicator'] {
1504
+ [data-ui-select] [data-part-indicator] {
1442
1505
  --slotted-icon-size: var(--_content-icon-size);
1443
1506
 
1444
1507
  align-items: center;
@@ -1455,13 +1518,13 @@
1455
1518
  transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
1456
1519
  }
1457
1520
 
1458
- [data-ui='select'] [data-part='item'][data-selected] > [data-part='indicator'] {
1521
+ [data-ui-select] [data-part-item][data-selected] > [data-part-indicator] {
1459
1522
  opacity: 1;
1460
1523
  }
1461
1524
 
1462
1525
  /* ── Separator, empty, status ─────────────────────────────────────────── */
1463
1526
 
1464
- [data-ui='select'] [data-part='separator'] {
1527
+ [data-ui-select] [data-part-separator] {
1465
1528
  background-color: var(--slotted-select-separator-color, var(--_border-color));
1466
1529
  block-size: var(--_border-width);
1467
1530
  border: 0;
@@ -1477,7 +1540,7 @@
1477
1540
  * refuses to open on an empty collection and Radix paints nothing; the popup
1478
1541
  * here opens onto a sentence.
1479
1542
  */
1480
- [data-ui='select'] :is([data-part='empty'], [data-part='status']) {
1543
+ [data-ui-select] :is([data-part-empty], [data-part-status]) {
1481
1544
  color: var(--_muted);
1482
1545
  /**
1483
1546
  * Its own bidi run, ordered by its own content. "3 results" is a European
@@ -1487,7 +1550,7 @@
1487
1550
  * takes the direction from the sentence's own first strong character, so an
1488
1551
  * English count reads as itself and a translated one reads as itself — the
1489
1552
  * same repair `text-field` makes for an adornment, and for the same reason.
1490
- * These two parts are centred, so taking their own direction costs no
1553
+ * These two parts are centerd, so taking their own direction costs no
1491
1554
  * alignment; an option's label is the consumer's content and keeps the
1492
1555
  * document's direction unless the consumer says otherwise.
1493
1556
  */
@@ -1512,7 +1575,7 @@
1512
1575
  * takes the same space as the empty message beside it. `combobox` draws the
1513
1576
  * count the same way, in the same place, for the same reason.
1514
1577
  */
1515
- [data-ui='select'] [data-part='status']:empty {
1578
+ [data-ui-select] [data-part-status]:empty {
1516
1579
  display: none;
1517
1580
  }
1518
1581
 
@@ -1528,7 +1591,7 @@
1528
1591
  * hidden from assistive technology: the `status` row beside them is the live
1529
1592
  * region and it already says what is happening.
1530
1593
  */
1531
- [data-ui='select'] [data-part='placeholder'] {
1594
+ [data-ui-select] [data-part-placeholder] {
1532
1595
  display: grid;
1533
1596
  /* The surface is a grid of option columns; the rows span all of them, as
1534
1597
  the status and empty rows do. */
@@ -1537,7 +1600,7 @@
1537
1600
  padding-inline: var(--_item-inset);
1538
1601
  }
1539
1602
 
1540
- [data-ui='select'] [data-part='placeholder'] > [data-ui='skeleton'] {
1603
+ [data-ui-select] [data-part-placeholder] > [data-ui-skeleton] {
1541
1604
  align-self: center;
1542
1605
  }
1543
1606
 
@@ -1545,17 +1608,17 @@
1545
1608
  * Each row is an option: the same minimum height, so three of them measure
1546
1609
  * what three options measure and the popup does not resize when they land.
1547
1610
  */
1548
- [data-ui='select'] [data-part='placeholder'] > * {
1611
+ [data-ui-select] [data-part-placeholder] > * {
1549
1612
  align-items: center;
1550
1613
  display: flex;
1551
1614
  min-block-size: var(--_item-height);
1552
1615
  }
1553
1616
 
1554
- [data-ui='select'] [data-part='placeholder'] > :nth-child(2) [data-ui='skeleton'] {
1617
+ [data-ui-select] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
1555
1618
  inline-size: 78%;
1556
1619
  }
1557
1620
 
1558
- [data-ui='select'] [data-part='placeholder'] > :nth-child(3) [data-ui='skeleton'] {
1621
+ [data-ui-select] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
1559
1622
  inline-size: 56%;
1560
1623
  }
1561
1624
 
@@ -1566,26 +1629,26 @@
1566
1629
  * many for one wait (SL6).
1567
1630
  */
1568
1631
 
1569
- [data-ui='select'] > [data-part='content'][data-loading] {
1632
+ [data-ui-select] > [data-part-content][data-loading] {
1570
1633
  cursor: progress;
1571
1634
  }
1572
1635
 
1573
- /* ── Forced colours ───────────────────────────────────────────────────── */
1636
+ /* ── Forced colors ───────────────────────────────────────────────────── */
1574
1637
 
1575
1638
  /**
1576
1639
  * The one thing the theme cannot reach. Every tone surface becomes `Canvas`
1577
- * under forced colours, so the highlight — which is this family's answer to
1640
+ * under forced colors, so the highlight — which is this family's answer to
1578
1641
  * "which option am I on", not decoration — would disappear and leave a reader
1579
1642
  * with no way to tell.
1580
1643
  */
1581
1644
  @media (forced-colors: active) {
1582
- [data-ui='select'] [data-part='item'][data-current] {
1645
+ [data-ui-select] [data-part-item][data-current] {
1583
1646
  background-color: Highlight;
1584
1647
  color: HighlightText;
1585
1648
  forced-color-adjust: none;
1586
1649
  }
1587
1650
 
1588
- [data-ui='select'] [data-part='item'][data-disabled][data-current] {
1651
+ [data-ui-select] [data-part-item][data-disabled][data-current] {
1589
1652
  background-color: Highlight;
1590
1653
  color: GrayText;
1591
1654
  }