@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
@@ -44,7 +44,7 @@
44
44
  * the two-line label clamp are `select`'s decisions, taken in an earlier
45
45
  * session. They are repeated here rather than shared because the three
46
46
  * families have three public identifiers, and a stylesheet that painted
47
- * `[data-ui='select']` from a multi-select would make one family's selector
47
+ * `[data-ui-select]` from a multi-select would make one family's selector
48
48
  * match another's DOM. The duplication is the price of that boundary.
49
49
  *
50
50
  * ── What this sheet decides on its own ───────────────────────────────
@@ -71,7 +71,7 @@
71
71
 
72
72
  /* ── The frame ────────────────────────────────────────────────────────── */
73
73
 
74
- [data-ui='multi-select'][data-part='root'] {
74
+ [data-ui-multi-select][data-part-root] {
75
75
  --_font-size: var(--slotted-control-font-size-md, 13px);
76
76
  --_height: var(--slotted-control-height-md, 34px);
77
77
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -126,6 +126,8 @@
126
126
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
127
127
  font-size: var(--_font-size);
128
128
  gap: var(--slotted-space-1, 0.125rem);
129
+ /* In a flex row the item's basis is its content, not the whole row. */
130
+ flex-basis: content;
129
131
  inline-size: 100%;
130
132
  min-block-size: var(--_height);
131
133
  min-inline-size: 0;
@@ -145,7 +147,7 @@
145
147
  box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
146
148
  }
147
149
 
148
- [data-ui='multi-select'][data-part='root']:not([data-full-width]) {
150
+ [data-ui-multi-select][data-part-root]:not([data-full-width]) {
149
151
  inline-size: auto;
150
152
  }
151
153
 
@@ -154,7 +156,7 @@
154
156
  * role is what the layout-grid pattern asks for, and the geometry belongs to
155
157
  * the row that wraps.
156
158
  */
157
- [data-ui='multi-select'] > [data-part='control'] {
159
+ [data-ui-multi-select] > [data-part-control] {
158
160
  display: flex;
159
161
  flex: 1 1 auto;
160
162
  min-inline-size: 0;
@@ -171,7 +173,7 @@
171
173
  * acts on it was narrower than the rhythm inside it. Whichever part comes
172
174
  * first after the row takes the row's own gap.
173
175
  */
174
- [data-ui='multi-select'] > [data-part='control'] + * {
176
+ [data-ui-multi-select] > [data-part-control] + * {
175
177
  margin-inline-start: var(--_row-gap);
176
178
  }
177
179
 
@@ -180,14 +182,14 @@
180
182
  * which is what keeps `ArrowDown` and `ArrowUp` free for the popup: there is
181
183
  * no cell above or below any cell, so the grid answers neither key.
182
184
  */
183
- [data-ui='multi-select'] [data-part='chips'] {
185
+ [data-ui-multi-select] [data-part-chips] {
184
186
  /**
185
- * `safe`, because this box scrolls. Centring a scroll container's content
187
+ * `safe`, because this box scrolls. Centering a scroll container's content
186
188
  * pushes the first line above the scrollport when there is more than fits,
187
189
  * and the browser gives no way to scroll back to it: the ninth chip was on
188
190
  * screen and the first three were unreachable at 240 pixels. `safe` falls
189
191
  * back to `start` exactly when the content overflows, which is the one case
190
- * where centring is wrong.
192
+ * where centering is wrong.
191
193
  */
192
194
  align-content: safe center;
193
195
  align-items: center;
@@ -216,7 +218,7 @@
216
218
  * Three rows, then it scrolls. Three *whole* rows: a chip drawn to half its
217
219
  * height is not an affordance, it is a chip that looks broken. Every chip
218
220
  * stays in the DOM either way, which is what the feature guide asks of an
219
- * overflow — the set is summarised, never hidden.
221
+ * overflow — the set is summarized, never hidden.
220
222
  */
221
223
  max-block-size: calc(3 * var(--_row-size) + 2 * var(--_row-gap) + 2 * var(--_row-air));
222
224
  overflow-y: auto;
@@ -240,7 +242,7 @@
240
242
  scrollbar-width: none;
241
243
  }
242
244
 
243
- [data-ui='multi-select'] [data-part='chips']::-webkit-scrollbar {
245
+ [data-ui-multi-select] [data-part-chips]::-webkit-scrollbar {
244
246
  display: none;
245
247
  }
246
248
 
@@ -250,7 +252,7 @@
250
252
  * collapsed by `createCollapse` into the counting chip below, and the whole
251
253
  * set is still reachable in the popup's `chosen` band.
252
254
  */
253
- [data-ui='multi-select'][data-overflow='collapse'] [data-part='chips'] {
255
+ [data-ui-multi-select][data-overflow='collapse'] [data-part-chips] {
254
256
  flex-wrap: nowrap;
255
257
  max-block-size: none;
256
258
  overflow: hidden;
@@ -267,7 +269,7 @@
267
269
  * not to this family, so it has no `data-part` of its own to be selected by,
268
270
  * and the query's own input is told apart by the part it does have.
269
271
  */
270
- [data-ui='multi-select'] [data-part='chips'] input:not([data-part='input']) {
272
+ [data-ui-multi-select] [data-part-chips] input:not([data-part-input]) {
271
273
  background-color: transparent;
272
274
  border: 0;
273
275
  color: inherit;
@@ -284,7 +286,7 @@
284
286
  * or goes to the next one; the only chip that gives way is one wider than the
285
287
  * whole row, which is capped here and truncated by `tag.css`.
286
288
  */
287
- [data-ui='multi-select'] [data-part='chips'] > :not([data-part='field']) {
289
+ [data-ui-multi-select] [data-part-chips] > :not([data-part-field]) {
288
290
  flex: 0 0 auto;
289
291
  max-inline-size: 100%;
290
292
  /* The row's own height, so three chips plus their gaps divide the cap the
@@ -296,10 +298,10 @@
296
298
  /**
297
299
  * The chip takes the height the inside of this control has, through the
298
300
  * property `tag` reads for it. Set on the row, inherited by every chip, and
299
- * no rule of this sheet names `[data-ui='tag']`: the host stands beside the
301
+ * no rule of this sheet names `[data-ui-tag]`: the host stands beside the
300
302
  * tag sheet and never reaches into it.
301
303
  */
302
- [data-ui='multi-select'] [data-part='chips'] {
304
+ [data-ui-multi-select] [data-part-chips] {
303
305
  --slotted-control-inner-size: var(--_inner-size);
304
306
  }
305
307
 
@@ -313,7 +315,7 @@
313
315
  * of its own the moment two chips were in front of it, and a control 240
314
316
  * pixels wide holding two values then stood two rows tall with one row empty.
315
317
  */
316
- [data-ui='multi-select'] [data-part='field'] {
318
+ [data-ui-multi-select] [data-part-field] {
317
319
  align-items: center;
318
320
  display: flex;
319
321
  flex: 1 1 var(--slotted-multi-select-field-basis, 4rem);
@@ -326,7 +328,7 @@
326
328
  * everything that makes it a text control: the caret, the selection, IME
327
329
  * composition, autofill and every native attribute the consumer wrote.
328
330
  */
329
- [data-ui='multi-select'] [data-part='input'] {
331
+ [data-ui-multi-select] [data-part-input] {
330
332
  background-color: transparent;
331
333
  border: 0;
332
334
  color: inherit;
@@ -341,18 +343,28 @@
341
343
  text-overflow: ellipsis;
342
344
  }
343
345
 
344
- [data-ui='multi-select'] [data-part='input']::placeholder {
346
+ [data-ui-multi-select] [data-part-input]::placeholder {
345
347
  color: var(--slotted-multi-select-placeholder-color, var(--slotted-text-muted, GrayText));
346
348
  text-overflow: ellipsis;
347
349
  }
348
350
 
349
351
  /**
350
- * Autofill. Chrome paints its own ground over the control's, and a
351
- * hundred-pixel inset shadow is the only way to reach it. The signal is kept
352
- * rather than erased, in the accent surface the theme owns — the repair
353
- * `text-field` makes, for the same reason.
352
+ * Autofill. Chrome paints its own ground over the input, and a hundred-pixel
353
+ * inset shadow is the only way to reach it. The signal is kept rather than
354
+ * erased, in the accent surface the theme owns, and it is the whole
355
+ * control's: the frame takes the tint under its border and inside its
356
+ * corner, and the input repaints the browser's ground in the same color.
357
+ * Painted on the input alone, the tint left the frame's padding, the slots
358
+ * and the buttons bare.
354
359
  */
355
- [data-ui='multi-select'] [data-part='input']:autofill {
360
+ [data-ui-multi-select][data-part-root]:has([data-part-input]:autofill) {
361
+ background-color: var(
362
+ --slotted-multi-select-autofill-background,
363
+ var(--slotted-tone-accent-surface)
364
+ );
365
+ }
366
+
367
+ [data-ui-multi-select] [data-part-input]:autofill {
356
368
  box-shadow: inset 0 0 0 100px
357
369
  var(--slotted-multi-select-autofill-background, var(--slotted-tone-accent-surface));
358
370
  -webkit-text-fill-color: var(--slotted-multi-select-color, var(--slotted-text, CanvasText));
@@ -371,12 +383,12 @@
371
383
  * pixels past the chip; a ring two pixels further out lost its outer half on
372
384
  * every side, at every density. One width inside is `listbox`'s answer for an
373
385
  * option in a scrolling list: the ring covers the chip's own edge and reads
374
- * as the chip's edge turned to the ring colour, whole, with the text clear
386
+ * as the chip's edge turned to the ring color, whole, with the text clear
375
387
  * of it even at `dense`, where the chip has no inset to spare. `tag` draws
376
388
  * its own inner ring two widths in to keep a sliver of ground outside it;
377
389
  * here that sliver would cost the text its leading.
378
390
  */
379
- [data-ui='multi-select'] [data-part='chips'] > :not([data-part='field']):focus-visible {
391
+ [data-ui-multi-select] [data-part-chips] > :not([data-part-field]):focus-visible {
380
392
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
381
393
  outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
382
394
  }
@@ -387,7 +399,7 @@
387
399
  * whose last one happens to be a count, and `createCollapse` measures it the
388
400
  * way it measures every other unit.
389
401
  */
390
- [data-ui='multi-select'] [data-part='chips'] > [data-count] {
402
+ [data-ui-multi-select] [data-part-chips] > [data-count] {
391
403
  flex: none;
392
404
  }
393
405
 
@@ -397,7 +409,7 @@
397
409
  * too narrow for a chip — because a counter with nothing to count against is
398
410
  * furniture.
399
411
  */
400
- [data-ui='multi-select'] > [data-part='counter'] {
412
+ [data-ui-multi-select] > [data-part-counter] {
401
413
  text-box: auto; /* refine the alignment */
402
414
  align-self: center;
403
415
  color: var(--slotted-multi-select-counter-color, var(--slotted-text-muted, GrayText));
@@ -426,25 +438,25 @@
426
438
  * uses for a chosen value. Not a warning tone: reaching the limit is the
427
439
  * reader arriving somewhere, not going wrong.
428
440
  */
429
- [data-ui='multi-select'][data-complete] > [data-part='counter'] {
441
+ [data-ui-multi-select][data-complete] > [data-part-counter] {
430
442
  color: var(--slotted-multi-select-counter-complete-color, var(--slotted-tone-accent-text));
431
443
  font-weight: var(--slotted-font-weight-medium, 500);
432
444
  }
433
445
 
434
446
  /* Too narrow for a chip: the count is the whole answer. */
435
- [data-ui='multi-select'][data-narrow] [data-part='chips'] > :not([data-part='field']) {
447
+ [data-ui-multi-select][data-narrow] [data-part-chips] > :not([data-part-field]) {
436
448
  display: none;
437
449
  }
438
450
 
439
451
  /* The row takes only the room the count and the buttons leave, so the count
440
452
  is what shortens when even that room runs out. */
441
- [data-ui='multi-select'][data-narrow] > [data-part='control'] {
453
+ [data-ui-multi-select][data-narrow] > [data-part-control] {
442
454
  flex-basis: 0;
443
455
  }
444
456
 
445
457
  /* ── The two buttons inside the frame ─────────────────────────────────── */
446
458
 
447
- [data-ui='multi-select'] > :is([data-part='clear'], [data-part='trigger']) {
459
+ [data-ui-multi-select] > :is([data-part-clear], [data-part-trigger]) {
448
460
  align-items: center;
449
461
  align-self: center;
450
462
  appearance: none;
@@ -476,7 +488,7 @@
476
488
  * control is 24 pixels tall — the WCAG 2.2 minimum — so nothing drawn inside
477
489
  * it can also be 24.
478
490
  */
479
- [data-ui='multi-select'] > :is([data-part='clear'], [data-part='trigger'])::after {
491
+ [data-ui-multi-select] > :is([data-part-clear], [data-part-trigger])::after {
480
492
  content: '';
481
493
  inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
482
494
  position: absolute;
@@ -487,23 +499,22 @@
487
499
  the hit area above grows to 44 pixels around them. Side by side, neither
488
500
  button reaches across the edge the two share. */
489
501
  @media (pointer: coarse) {
490
- [data-ui='multi-select'] > :is([data-part='clear'], [data-part='trigger'])::after {
502
+ [data-ui-multi-select] > :is([data-part-clear], [data-part-trigger])::after {
491
503
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
492
504
  }
493
505
 
494
- [data-ui='multi-select']
495
- > [data-part='clear']:has(+ [data-part='trigger']:not([hidden]))::after {
506
+ [data-ui-multi-select] > [data-part-clear]:has(+ [data-part-trigger]:not([hidden]))::after {
496
507
  inset-inline-end: 0;
497
508
  }
498
509
 
499
- [data-ui='multi-select'] > [data-part='clear']:not([hidden]) + [data-part='trigger']::after {
510
+ [data-ui-multi-select] > [data-part-clear]:not([hidden]) + [data-part-trigger]::after {
500
511
  inset-inline-start: 0;
501
512
  }
502
513
  }
503
514
 
504
515
  /* The cross and the chevron are `Glyph` elements the binding draws, sized
505
516
  here to the control's icon step. */
506
- [data-ui='multi-select'] > :is([data-part='clear'], [data-part='trigger']) {
517
+ [data-ui-multi-select] > :is([data-part-clear], [data-part-trigger]) {
507
518
  --slotted-icon-size: var(--_icon-size);
508
519
  }
509
520
 
@@ -512,7 +523,7 @@
512
523
  * button is what a reader presses and the arrow is what turns over. The
513
524
  * library's own `Glyph` in an `icon` box; a character is never an icon.
514
525
  */
515
- [data-ui='multi-select'] [data-part='arrow'] {
526
+ [data-ui-multi-select] [data-part-arrow] {
516
527
  align-items: center;
517
528
  block-size: var(--_icon-size);
518
529
  display: flex;
@@ -520,12 +531,12 @@
520
531
  justify-content: center;
521
532
  }
522
533
 
523
- [data-ui='multi-select'] [data-part='arrow'] > [data-ui='icon'] {
534
+ [data-ui-multi-select] [data-part-arrow] > [data-ui-icon] {
524
535
  transition: rotate var(--slotted-control-transition-duration)
525
536
  var(--slotted-control-transition-easing);
526
537
  }
527
538
 
528
- [data-ui='multi-select'][data-open] [data-part='arrow'] > [data-ui='icon'] {
539
+ [data-ui-multi-select][data-open] [data-part-arrow] > [data-ui-icon] {
529
540
  rotate: 180deg;
530
541
  }
531
542
 
@@ -536,7 +547,7 @@
536
547
  * onto anything yet — and the arc is the one `spinner/spinner.css` draws for
537
548
  * every family that waits.
538
549
  */
539
- [data-ui='multi-select'] [data-part='busy'] {
550
+ [data-ui-multi-select] [data-part-busy] {
540
551
  --slotted-spinner-size: var(--_icon-size);
541
552
 
542
553
  align-self: center;
@@ -546,7 +557,7 @@
546
557
 
547
558
  /* ── Size ─────────────────────────────────────────────────────────────── */
548
559
 
549
- [data-ui='multi-select'][data-part='root'][data-size='sm'] {
560
+ [data-ui-multi-select][data-part-root][data-size='sm'] {
550
561
  --_font-size: var(--slotted-control-font-size-sm, 12px);
551
562
  --_height: var(--slotted-control-height-sm, 30px);
552
563
  --_inner-size: var(--slotted-control-inner-size-sm, 22px);
@@ -555,7 +566,7 @@
555
566
  --_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
556
567
  }
557
568
 
558
- [data-ui='multi-select'][data-part='root'][data-size='md'] {
569
+ [data-ui-multi-select][data-part-root][data-size='md'] {
559
570
  --_font-size: var(--slotted-control-font-size-md, 13px);
560
571
  --_height: var(--slotted-control-height-md, 34px);
561
572
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -564,7 +575,7 @@
564
575
  --_inner-size: var(--slotted-control-inner-size-md, 24px);
565
576
  }
566
577
 
567
- [data-ui='multi-select'][data-part='root'][data-size='lg'] {
578
+ [data-ui-multi-select][data-part-root][data-size='lg'] {
568
579
  --_font-size: var(--slotted-control-font-size-lg, 14px);
569
580
  --_height: var(--slotted-control-height-lg, 38px);
570
581
  --_inner-size: var(--slotted-control-inner-size-lg, 28px);
@@ -575,7 +586,7 @@
575
586
 
576
587
  /* ── Variant ──────────────────────────────────────────────────────────── */
577
588
 
578
- [data-ui='multi-select'][data-part='root'][data-variant='subtle'] {
589
+ [data-ui-multi-select][data-part-root][data-variant='subtle'] {
579
590
  background-color: var(
580
591
  --slotted-multi-select-subtle-background,
581
592
  var(--slotted-surface-sunken, Canvas)
@@ -589,7 +600,7 @@
589
600
  /* No edge, no lift, no ground and no corner of its own: the cell it sits in
590
601
  is the box, the row is the ground, a cell has no corner, and the resting
591
602
  shadow would draw the cell where there is none. */
592
- [data-ui='multi-select'][data-part='root'][data-variant='plain'] {
603
+ [data-ui-multi-select][data-part-root][data-variant='plain'] {
593
604
  background-color: transparent;
594
605
  border-color: transparent;
595
606
  border-radius: var(--slotted-radius-none, 0px);
@@ -597,31 +608,31 @@
597
608
  }
598
609
 
599
610
  @media (forced-colors: active) {
600
- [data-ui='multi-select'][data-part='root'][data-variant='plain'] {
611
+ [data-ui-multi-select][data-part-root][data-variant='plain'] {
601
612
  border-color: ButtonBorder;
602
613
  }
603
614
  }
604
615
 
605
616
  /* ── States on the control ────────────────────────────────────────────── */
606
617
 
607
- [data-ui='multi-select'][data-part='root']:hover:not([data-disabled]):not([data-readonly]):not(
618
+ [data-ui-multi-select][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
608
619
  [data-invalid]
609
620
  ) {
610
621
  border-color: var(--slotted-multi-select-hover-border-color, var(--slotted-tone-accent-border));
611
622
  }
612
623
 
613
- [data-ui='multi-select'][data-part='root'][data-variant='subtle']:hover:not([data-disabled]):not(
624
+ [data-ui-multi-select][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
614
625
  [data-readonly]
615
- ):not([data-invalid]) {
626
+ ):not([data-invalid]):not(:has([data-part-input]:autofill)) {
616
627
  background-color: var(
617
628
  --slotted-multi-select-subtle-hover-background,
618
629
  var(--slotted-tone-secondary-subtle-hover)
619
630
  );
620
631
  }
621
632
 
622
- [data-ui='multi-select'][data-part='root'][data-variant='plain']:hover:not([data-disabled]):not(
633
+ [data-ui-multi-select][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
623
634
  [data-readonly]
624
- ):not([data-invalid]) {
635
+ ):not([data-invalid]):not(:has([data-part-input]:autofill)) {
625
636
  background-color: var(
626
637
  --slotted-multi-select-plain-hover-background,
627
638
  var(--slotted-tone-secondary-subtle-hover)
@@ -637,14 +648,14 @@
637
648
  * script, after a key, and a browser does not always match `:focus-visible`
638
649
  * on an element script moved focus to.
639
650
  */
640
- [data-ui='multi-select'][data-part='root']:has([data-part='input']:focus-visible),
641
- [data-ui='multi-select'][data-part='root']:has(
642
- [data-part='chips'] > :not([data-part='field']):focus-visible
651
+ [data-ui-multi-select][data-part-root]:has([data-part-input]:focus-visible),
652
+ [data-ui-multi-select][data-part-root]:has(
653
+ [data-part-chips] > :not([data-part-field]):focus-visible
643
654
  ) {
644
655
  box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
645
656
  var(--slotted-focus-ring-color, Highlight);
646
657
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
647
- outline-offset: var(--slotted-focus-ring-offset, 2px);
658
+ outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
648
659
  }
649
660
 
650
661
  /**
@@ -654,11 +665,9 @@
654
665
  * shadow that appears only under focus is a cell that changes size when it
655
666
  * is used.
656
667
  */
657
- [data-ui='multi-select'][data-part='root'][data-variant='plain']:has(
658
- [data-part='input']:focus-visible
659
- ),
660
- [data-ui='multi-select'][data-part='root'][data-variant='plain']:has(
661
- [data-part='chips'] > :not([data-part='field']):focus-visible
668
+ [data-ui-multi-select][data-part-root][data-variant='plain']:has([data-part-input]:focus-visible),
669
+ [data-ui-multi-select][data-part-root][data-variant='plain']:has(
670
+ [data-part-chips] > :not([data-part-field]):focus-visible
662
671
  ) {
663
672
  box-shadow: none;
664
673
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
@@ -669,17 +678,17 @@
669
678
  * is two rings for one focus. The frame keeps its lift and gives up the
670
679
  * outline while the ring is inside it.
671
680
  */
672
- [data-ui='multi-select'][data-part='root']:has(
673
- [data-part='chips'] > :not([data-part='field']):focus-visible
681
+ [data-ui-multi-select][data-part-root]:has(
682
+ [data-part-chips] > :not([data-part-field]):focus-visible
674
683
  ) {
675
684
  outline: none;
676
685
  }
677
686
 
678
- [data-ui='multi-select'][data-part='root'][data-open]:not([data-disabled]) {
687
+ [data-ui-multi-select][data-part-root][data-open]:not([data-disabled]) {
679
688
  border-color: var(--slotted-multi-select-open-border-color, var(--slotted-tone-accent-border));
680
689
  }
681
690
 
682
- [data-ui='multi-select'][data-part='root'][data-invalid] {
691
+ [data-ui-multi-select][data-part-root][data-invalid] {
683
692
  --slotted-focus-ring-color: var(
684
693
  --slotted-multi-select-invalid-focus-ring-color,
685
694
  var(--slotted-focus-ring-color-invalid, Highlight)
@@ -699,7 +708,7 @@
699
708
  var(--slotted-tone-danger-border)
700
709
  );
701
710
  /*
702
- * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
711
+ * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
703
712
  * `high-contrast` the danger border is the resting edge's black. The line
704
713
  * is a shadow inside the border, so neither box nor text moves, and it
705
714
  * takes the resting lift's place.
@@ -707,9 +716,9 @@
707
716
  box-shadow: var(--_invalid-edge);
708
717
  }
709
718
 
710
- [data-ui='multi-select'][data-part='root'][data-invalid]:has([data-part='input']:focus-visible),
711
- [data-ui='multi-select'][data-part='root'][data-invalid]:has(
712
- [data-part='chips'] > :not([data-part='field']):focus-visible
719
+ [data-ui-multi-select][data-part-root][data-invalid]:has([data-part-input]:focus-visible),
720
+ [data-ui-multi-select][data-part-root][data-invalid]:has(
721
+ [data-part-chips] > :not([data-part-field]):focus-visible
713
722
  ) {
714
723
  box-shadow:
715
724
  var(--_invalid-edge),
@@ -717,11 +726,11 @@
717
726
  var(--slotted-focus-ring-color, Highlight);
718
727
  }
719
728
 
720
- [data-ui='multi-select'][data-part='root'][data-variant='plain'][data-invalid]:has(
721
- [data-part='input']:focus-visible
729
+ [data-ui-multi-select][data-part-root][data-variant='plain'][data-invalid]:has(
730
+ [data-part-input]:focus-visible
722
731
  ),
723
- [data-ui='multi-select'][data-part='root'][data-variant='plain'][data-invalid]:has(
724
- [data-part='chips'] > :not([data-part='field']):focus-visible
732
+ [data-ui-multi-select][data-part-root][data-variant='plain'][data-invalid]:has(
733
+ [data-part-chips] > :not([data-part-field]):focus-visible
725
734
  ) {
726
735
  /* The ring lies inside the box here, over the border and an edge as wide as
727
736
  it; the edge reaches past the ring. */
@@ -734,28 +743,29 @@
734
743
  }
735
744
 
736
745
  /*
737
- * Forced colours remove every box shadow, and the edge with them. The
746
+ * Forced colors remove every box shadow, and the edge with them. The
738
747
  * width comes back as an outline inside the border, and a focused invalid
739
748
  * control draws its ring double, which a valid ring is not.
740
749
  */
741
750
  @media (forced-colors: active) {
742
- [data-ui='multi-select'][data-part='root'][data-invalid] {
751
+ [data-ui-multi-select][data-part-root][data-invalid] {
743
752
  outline: var(--_invalid-edge-width) solid CanvasText;
744
753
  outline-offset: calc(
745
754
  -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
746
755
  );
747
756
  }
748
757
 
749
- [data-ui='multi-select'][data-part='root'][data-invalid]:has(
750
- [data-part='input']:focus-visible
751
- ) {
758
+ [data-ui-multi-select][data-part-root][data-invalid]:has([data-part-input]:focus-visible) {
752
759
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
753
760
  var(--slotted-focus-ring-color, Highlight);
754
- outline-offset: var(--slotted-focus-ring-offset, 2px);
761
+ outline-offset: var(
762
+ --slotted-control-focus-ring-offset,
763
+ var(--slotted-focus-ring-offset, 2px)
764
+ );
755
765
  }
756
766
 
757
- [data-ui='multi-select'][data-part='root'][data-variant='plain'][data-invalid]:has(
758
- [data-part='input']:focus-visible
767
+ [data-ui-multi-select][data-part-root][data-variant='plain'][data-invalid]:has(
768
+ [data-part-input]:focus-visible
759
769
  ) {
760
770
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
761
771
  var(--slotted-focus-ring-color, Highlight);
@@ -764,11 +774,11 @@
764
774
  );
765
775
  }
766
776
 
767
- [data-ui='multi-select'][data-part='root'][data-invalid]:has(
768
- [data-part='chips'] > :not([data-part='field']):focus-visible
777
+ [data-ui-multi-select][data-part-root][data-invalid]:has(
778
+ [data-part-chips] > :not([data-part-field]):focus-visible
769
779
  ),
770
- [data-ui='multi-select'][data-part='root'][data-variant='plain'][data-invalid]:has(
771
- [data-part='chips'] > :not([data-part='field']):focus-visible
780
+ [data-ui-multi-select][data-part-root][data-variant='plain'][data-invalid]:has(
781
+ [data-part-chips] > :not([data-part-field]):focus-visible
772
782
  ) {
773
783
  outline: var(--_invalid-edge-width) solid CanvasText;
774
784
  outline-offset: calc(
@@ -783,14 +793,14 @@
783
793
  * the text half; the rest is the family's, because neither pattern has a
784
794
  * readonly for a combobox.
785
795
  */
786
- [data-ui='multi-select'][data-part='root'][data-readonly] {
796
+ [data-ui-multi-select][data-part-root][data-readonly] {
787
797
  background-color: var(
788
798
  --slotted-multi-select-readonly-background,
789
799
  var(--slotted-tone-secondary-subtle-hover)
790
800
  );
791
801
  }
792
802
 
793
- [data-ui='multi-select'][data-part='root'][data-readonly] [data-part='arrow'] {
803
+ [data-ui-multi-select][data-part-root][data-readonly] [data-part-arrow] {
794
804
  opacity: 0.5;
795
805
  }
796
806
 
@@ -799,8 +809,8 @@
799
809
  * because a disabled `fieldset` disables every control inside it and the
800
810
  * control has no way to say so.
801
811
  */
802
- [data-ui='multi-select'][data-part='root'][data-disabled],
803
- [data-ui='multi-select'][data-part='root']:has([data-part='input']:disabled) {
812
+ [data-ui-multi-select][data-part-root][data-disabled],
813
+ [data-ui-multi-select][data-part-root]:has([data-part-input]:disabled) {
804
814
  background-color: var(
805
815
  --slotted-multi-select-disabled-background,
806
816
  var(--slotted-disabled-background)
@@ -811,16 +821,16 @@
811
821
  cursor: not-allowed;
812
822
  }
813
823
 
814
- [data-ui='multi-select']
815
- > :is([data-part='clear'], [data-part='trigger']):hover:not(:disabled):not([data-disabled]) {
824
+ [data-ui-multi-select]
825
+ > :is([data-part-clear], [data-part-trigger]):hover:not(:disabled):not([data-disabled]) {
816
826
  background-color: var(
817
827
  --slotted-multi-select-action-hover-background,
818
828
  var(--slotted-tone-secondary-subtle-hover)
819
829
  );
820
830
  }
821
831
 
822
- [data-ui='multi-select']
823
- > :is([data-part='clear'], [data-part='trigger']):active:not(:disabled):not([data-disabled]) {
832
+ [data-ui-multi-select]
833
+ > :is([data-part-clear], [data-part-trigger]):active:not(:disabled):not([data-disabled]) {
824
834
  background-color: var(
825
835
  --slotted-multi-select-action-active-background,
826
836
  var(--slotted-tone-secondary-subtle-active)
@@ -833,14 +843,14 @@
833
843
  * and a ring around the whole frame would sit still while focus moved inside
834
844
  * it.
835
845
  */
836
- [data-ui='multi-select'] > :is([data-part='clear'], [data-part='trigger']):focus-visible {
846
+ [data-ui-multi-select] > :is([data-part-clear], [data-part-trigger]):focus-visible {
837
847
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
838
848
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
839
849
  }
840
850
 
841
851
  /* ── The layer ────────────────────────────────────────────────────────── */
842
852
 
843
- [data-ui='multi-select'][data-part='positioner'] {
853
+ [data-ui-multi-select][data-part-positioner] {
844
854
  --_surface: var(--slotted-multi-select-surface, var(--slotted-surface-raised, #ffffff));
845
855
  --_text: var(--slotted-multi-select-content-text, var(--slotted-text, #0f172a));
846
856
  --_muted: var(--slotted-multi-select-content-text-muted, var(--slotted-text-muted, #5b6b7f));
@@ -879,7 +889,11 @@
879
889
  );
880
890
  --_item-inset: var(--slotted-control-padding-inline-md, 0.8125rem);
881
891
  --_item-height: var(--slotted-control-height-md, 34px);
882
- --_item-radius: var(--slotted-multi-select-item-radius, var(--slotted-control-radius));
892
+ /* Concentric with the panel: its radius less the inset, floored at 0. */
893
+ --_item-radius: var(
894
+ --slotted-multi-select-item-radius,
895
+ max(0px, calc(var(--_radius) - var(--_inset-inline)))
896
+ );
883
897
  --_content-font-size: var(--slotted-control-font-size-md, 13px);
884
898
  --_secondary-font-size: var(--slotted-control-font-size-sm, 12px);
885
899
  --_content-icon-size: var(--slotted-control-icon-size-md, 16px);
@@ -899,7 +913,6 @@
899
913
  box-sizing: border-box;
900
914
  pointer-events: none;
901
915
 
902
- opacity: 0;
903
916
  /**
904
917
  * The layer arrives along the axis it opens on — from one space step above
905
918
  * its place when it opens downward, from one step below when it opens
@@ -909,17 +922,15 @@
909
922
  */
910
923
  --_enter-distance: var(--slotted-space-2, 0.25rem);
911
924
  translate: 0 calc(-1 * var(--_enter-distance));
912
- transition:
913
- opacity var(--slotted-duration-short) var(--slotted-easing-exit),
914
- translate var(--slotted-duration-short) var(--slotted-easing-exit);
925
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
915
926
  }
916
927
 
917
- [data-ui='multi-select'][data-part='positioner'][data-side='top'] {
928
+ [data-ui-multi-select][data-part-positioner][data-side='top'] {
918
929
  translate: 0 var(--_enter-distance);
919
930
  }
920
931
 
921
932
  /* A lateral side has no block direction to arrive from, so it only fades. */
922
- [data-ui='multi-select'][data-part='positioner']:is([data-side='left'], [data-side='right']) {
933
+ [data-ui-multi-select][data-part-positioner]:is([data-side='left'], [data-side='right']) {
923
934
  translate: 0 0;
924
935
  }
925
936
 
@@ -931,8 +942,7 @@
931
942
  * it had one. A keyframe states where it starts. The exit stays a transition:
932
943
  * it leaves from wherever the layer is, on the closed rule's durations.
933
944
  */
934
- [data-ui='multi-select'][data-part='positioner'][data-open] {
935
- opacity: 1;
945
+ [data-ui-multi-select][data-part-positioner][data-open] {
936
946
  translate: 0 0;
937
947
  transition: none;
938
948
  }
@@ -942,32 +952,23 @@
942
952
  * with the side, and a layer written open in static markup — the harness, a
943
953
  * docs snippet — is simply there, and is photographed where it stands.
944
954
  */
945
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned] {
955
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned] {
946
956
  animation: slotted-multi-select-enter-down var(--slotted-duration-medium)
947
957
  var(--slotted-easing-enter);
948
958
  }
949
959
 
950
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned][data-side='top'] {
960
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='top'] {
951
961
  animation-name: slotted-multi-select-enter-up;
952
962
  }
953
963
 
954
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned]:is(
955
- [data-side='left'],
956
- [data-side='right']
957
- ) {
958
- animation-name: slotted-multi-select-fade;
959
- }
960
-
961
964
  @keyframes slotted-multi-select-enter-down {
962
965
  from {
963
- opacity: 0;
964
966
  translate: 0 calc(-1 * var(--_enter-distance));
965
967
  }
966
968
  }
967
969
 
968
970
  @keyframes slotted-multi-select-enter-up {
969
971
  from {
970
- opacity: 0;
971
972
  translate: 0 var(--_enter-distance);
972
973
  }
973
974
  }
@@ -978,39 +979,60 @@
978
979
  }
979
980
  }
980
981
 
982
+ /**
983
+ * The fade belongs to the part that paints the surface, and the layer only
984
+ * moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
985
+ * of what it holds, so a `backdrop-filter` on the content blurs nothing until
986
+ * the layer is opaque and then appears at once. The content's own opacity
987
+ * leaves its own filter drawn on every frame of the motion.
988
+ */
989
+ [data-ui-multi-select][data-part-positioner] > [data-part-content] {
990
+ opacity: 0;
991
+ transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
992
+ }
993
+
994
+ [data-ui-multi-select][data-part-positioner][data-open] > [data-part-content] {
995
+ opacity: 1;
996
+ transition: none;
997
+ }
998
+
999
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned] > [data-part-content] {
1000
+ animation: slotted-multi-select-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
1001
+ }
1002
+
981
1003
  /* Stillness keeps the fade and drops the movement. */
982
1004
  @media (prefers-reduced-motion: reduce) {
983
- [data-ui='multi-select'][data-part='positioner'],
984
- [data-ui='multi-select'][data-part='positioner'][data-side='top'],
985
- [data-ui='multi-select'][data-part='positioner'][data-side='left'],
986
- [data-ui='multi-select'][data-part='positioner'][data-side='right'] {
1005
+ [data-ui-multi-select][data-part-positioner],
1006
+ [data-ui-multi-select][data-part-positioner][data-side='top'],
1007
+ [data-ui-multi-select][data-part-positioner][data-side='left'],
1008
+ [data-ui-multi-select][data-part-positioner][data-side='right'] {
987
1009
  translate: 0 0;
988
- transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
1010
+ transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
989
1011
  }
990
1012
 
991
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned],
992
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned][data-side='top'],
993
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned][data-side='left'],
994
- [data-ui='multi-select'][data-part='positioner'][data-open][data-positioned][data-side='right'] {
995
- animation-name: slotted-multi-select-fade;
1013
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned],
1014
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='top'],
1015
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='left'],
1016
+ [data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='right'] {
1017
+ animation-name: none;
996
1018
  }
997
1019
  }
998
1020
 
999
- [data-ui='multi-select'][data-part='positioner'][data-detached] {
1021
+ [data-ui-multi-select][data-part-positioner][data-detached] {
1000
1022
  visibility: hidden;
1001
1023
  }
1002
1024
 
1003
- [data-ui='multi-select'][data-part='positioner'][data-width='anchor'] {
1025
+ [data-ui-multi-select][data-part-positioner][data-width='anchor'] {
1004
1026
  inline-size: var(--slotted-positioner-anchor-width, auto);
1005
1027
  }
1006
1028
 
1007
- [data-ui='multi-select'][data-part='positioner'][data-width='content'] {
1029
+ [data-ui-multi-select][data-part-positioner][data-width='content'] {
1008
1030
  inline-size: max-content;
1009
1031
  max-inline-size: min(var(--_measure), var(--slotted-positioner-available-width, 100vw));
1010
1032
  min-inline-size: var(--slotted-positioner-anchor-width, auto);
1011
1033
  }
1012
1034
 
1013
- [data-ui='multi-select'][data-part='positioner'][data-size='sm'] {
1035
+ [data-ui-multi-select][data-part-positioner][data-size='sm'] {
1014
1036
  --_item-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
1015
1037
  --_item-height: var(--slotted-control-height-sm, 30px);
1016
1038
  --_content-font-size: var(--slotted-control-font-size-sm, 12px);
@@ -1019,7 +1041,7 @@
1019
1041
  --_column-gap: var(--slotted-control-gap-sm, 0.375rem);
1020
1042
  }
1021
1043
 
1022
- [data-ui='multi-select'][data-part='positioner'][data-size='lg'] {
1044
+ [data-ui-multi-select][data-part-positioner][data-size='lg'] {
1023
1045
  --_item-inset: var(--slotted-control-padding-inline-lg, 1rem);
1024
1046
  --_item-height: var(--slotted-control-height-lg, 38px);
1025
1047
  --_content-font-size: var(--slotted-control-font-size-lg, 14px);
@@ -1030,7 +1052,7 @@
1030
1052
 
1031
1053
  /* ── The surface ──────────────────────────────────────────────────────── */
1032
1054
 
1033
- [data-ui='multi-select'] > [data-part='content'] {
1055
+ [data-ui-multi-select] > [data-part-content] {
1034
1056
  background: var(--_surface);
1035
1057
  border: var(--_border-width) solid var(--_border-color);
1036
1058
  border-radius: var(--_radius);
@@ -1057,14 +1079,14 @@
1057
1079
  * interaction — the highlight is `aria-activedescendant`, not focus — so a
1058
1080
  * ring here would draw a box around something nobody is operating.
1059
1081
  */
1060
- [data-ui='multi-select'] > [data-part='content']:focus-visible {
1082
+ [data-ui-multi-select] > [data-part-content]:focus-visible {
1061
1083
  outline: none;
1062
1084
  }
1063
1085
 
1064
1086
  /**
1065
1087
  * Every chosen value, whatever the row in the control did with them. It is
1066
1088
  * what makes `overflow='collapse'` legal against the feature guide: the `+N`
1067
- * chip in the control summarises, and this band is where the whole set stays
1089
+ * chip in the control summarizes, and this band is where the whole set stays
1068
1090
  * reachable. It is drawn only while something is chosen.
1069
1091
  *
1070
1092
  * Its chips carry no remove control, and the reason is keyboard reach rather
@@ -1073,7 +1095,7 @@
1073
1095
  * option's own row, which the list has open beside it, and the chips in the
1074
1096
  * control, which are focusable. `select` recorded the same decision.
1075
1097
  */
1076
- [data-ui='multi-select'] [data-part='chosen'] {
1098
+ [data-ui-multi-select] [data-part-chosen] {
1077
1099
  background: var(--_surface);
1078
1100
  border-block-end: var(--_border-width) solid var(--_border-color);
1079
1101
  box-sizing: border-box;
@@ -1097,12 +1119,13 @@
1097
1119
  padding-block: var(--_inset-block);
1098
1120
  padding-inline: var(--_inset-inline);
1099
1121
  position: sticky;
1100
- z-index: 1;
1122
+ /* Above a group label stuck to the same edge. */
1123
+ z-index: 2;
1101
1124
  }
1102
1125
 
1103
1126
  /* ── Groups ───────────────────────────────────────────────────────────── */
1104
1127
 
1105
- [data-ui='multi-select'] [data-part='group'] {
1128
+ [data-ui-multi-select] [data-part-group] {
1106
1129
  display: grid;
1107
1130
  grid-column: 1 / -1;
1108
1131
  grid-template-columns: subgrid;
@@ -1116,24 +1139,60 @@
1116
1139
  * author rule wins over the user agent sheet. Without this the search
1117
1140
  * filtered nothing the reader could see.
1118
1141
  */
1119
- [data-ui='multi-select'] [data-part='item'][hidden],
1120
- [data-ui='multi-select'] [data-part='group'][hidden] {
1142
+ [data-ui-multi-select] [data-part-item][hidden],
1143
+ [data-ui-multi-select] [data-part-group][hidden] {
1121
1144
  display: none;
1122
1145
  }
1123
1146
 
1124
- [data-ui='multi-select'] [data-part='group-label'] {
1147
+ /**
1148
+ * A group's label stays at the top of the list while its group is in view.
1149
+ * The group is the label's containing block, so the next label pushes it out
1150
+ * and a group scrolled past takes its label with it. It sticks to the
1151
+ * scrollport's edge rather than the padding's, on the surface's ground, above
1152
+ * the items and below the parts the surface draws over them.
1153
+ */
1154
+ [data-ui-multi-select] [data-part-group-label] {
1155
+ background: var(--_surface);
1156
+ box-sizing: border-box;
1125
1157
  color: var(--_muted);
1126
1158
  font-size: var(--_secondary-font-size);
1127
1159
  font-weight: var(--slotted-font-weight-semibold, 600);
1128
1160
  grid-column: 1 / -1;
1161
+ inset-block-start: calc(-1 * var(--_inset-block));
1129
1162
  line-height: var(--slotted-line-height-sm, 1.45);
1163
+ min-block-size: var(--_group-label-height);
1130
1164
  padding-block: var(--slotted-space-2, 0.25rem);
1131
1165
  padding-inline: var(--_item-inset);
1166
+ position: sticky;
1167
+ z-index: 1;
1168
+ }
1169
+
1170
+ @media (forced-colors: active) {
1171
+ [data-ui-multi-select] [data-part-group-label] {
1172
+ background: Canvas;
1173
+ }
1174
+ }
1175
+
1176
+ /**
1177
+ * The label's height, which the list keeps clear above an item the keys
1178
+ * bring into view (`revealWithin` reads the scroll padding), so the item is
1179
+ * never drawn under a label stuck to the top.
1180
+ */
1181
+ [data-ui-multi-select] > [data-part-content]:has([data-part-group-label]) {
1182
+ --_group-label-height: var(
1183
+ --slotted-multi-select-group-label-height,
1184
+ calc(
1185
+ var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
1186
+ var(--slotted-space-2, 0.25rem)
1187
+ )
1188
+ );
1189
+
1190
+ scroll-padding-block-start: var(--_group-label-height);
1132
1191
  }
1133
1192
 
1134
1193
  /* ── Options ──────────────────────────────────────────────────────────── */
1135
1194
 
1136
- [data-ui='multi-select'] [data-part='item'] {
1195
+ [data-ui-multi-select] [data-part-item] {
1137
1196
  align-content: center;
1138
1197
  border-radius: var(--_item-radius);
1139
1198
  box-sizing: border-box;
@@ -1157,7 +1216,7 @@
1157
1216
  var(--slotted-control-transition-easing, var(--slotted-easing-standard));
1158
1217
  }
1159
1218
 
1160
- [data-ui='multi-select'] [data-part='item'][data-current] {
1219
+ [data-ui-multi-select] [data-part-item][data-current] {
1161
1220
  background-color: var(--_highlight);
1162
1221
  /**
1163
1222
  * A ring as well as a ground. Nothing on this surface holds focus — DOM
@@ -1171,11 +1230,11 @@
1171
1230
  var(--slotted-multi-select-highlight-ring, var(--slotted-tone-accent-border));
1172
1231
  }
1173
1232
 
1174
- [data-ui='multi-select'] [data-part='item']:not([data-disabled]):active {
1233
+ [data-ui-multi-select] [data-part-item]:not([data-disabled]):active {
1175
1234
  background-color: var(--_highlight-active);
1176
1235
  }
1177
1236
 
1178
- [data-ui='multi-select'] [data-part='item'][data-selected] {
1237
+ [data-ui-multi-select] [data-part-item][data-selected] {
1179
1238
  color: var(--_selected-color);
1180
1239
  }
1181
1240
 
@@ -1188,22 +1247,21 @@
1188
1247
  * and ends. `select` and `combobox` answer the same way, and
1189
1248
  * `selection-block.test.mjs` holds all of them to it.
1190
1249
  */
1191
- [data-ui='multi-select'] [data-part='item'][data-selected] + [data-part='item'][data-selected] {
1250
+ [data-ui-multi-select] [data-part-item][data-selected] + [data-part-item][data-selected] {
1192
1251
  border-start-end-radius: 0;
1193
1252
  border-start-start-radius: 0;
1194
1253
  }
1195
1254
 
1196
- [data-ui='multi-select']
1197
- [data-part='item'][data-selected]:has(+ [data-part='item'][data-selected]) {
1255
+ [data-ui-multi-select] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
1198
1256
  border-end-end-radius: 0;
1199
1257
  border-end-start-radius: 0;
1200
1258
  }
1201
1259
 
1202
- [data-ui='multi-select'] [data-part='item'][data-selected] > [data-part='label'] {
1260
+ [data-ui-multi-select] [data-part-item][data-selected] > [data-part-label] {
1203
1261
  font-weight: var(--slotted-font-weight-medium, 500);
1204
1262
  }
1205
1263
 
1206
- [data-ui='multi-select'] [data-part='item'][data-disabled] {
1264
+ [data-ui-multi-select] [data-part-item][data-disabled] {
1207
1265
  color: var(--slotted-disabled-foreground, #64748b);
1208
1266
  cursor: not-allowed;
1209
1267
  }
@@ -1221,7 +1279,7 @@
1221
1279
  * the row cannot do is said by the ink and by the ring, which both step down
1222
1280
  * to the disabled pair.
1223
1281
  */
1224
- [data-ui='multi-select'] [data-part='item'][data-disabled][data-current] {
1282
+ [data-ui-multi-select] [data-part-item][data-disabled][data-current] {
1225
1283
  box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
1226
1284
  var(--slotted-disabled-border, #cbd5e1);
1227
1285
  color: var(--slotted-disabled-foreground, #64748b);
@@ -1229,13 +1287,13 @@
1229
1287
 
1230
1288
  /* ── The cells ────────────────────────────────────────────────────────── */
1231
1289
 
1232
- [data-ui='multi-select'] [data-part='item'] > :is([data-part='indicator'], [data-part='icon']) {
1290
+ [data-ui-multi-select] [data-part-item] > :is([data-part-indicator], [data-part-icon]) {
1233
1291
  block-size: 1lh;
1234
1292
  }
1235
1293
 
1236
1294
  /* Column one holds content and paints none: a `Glyph` in an `Icon` box, or
1237
- artwork of the consumer's own, centred and sized from the column. */
1238
- [data-ui='multi-select'] [data-part='item'] > [data-part='icon'] {
1295
+ artwork of the consumer's own, centerd and sized from the column. */
1296
+ [data-ui-multi-select] [data-part-item] > [data-part-icon] {
1239
1297
  --slotted-icon-size: var(--_content-icon-size);
1240
1298
 
1241
1299
  align-items: center;
@@ -1248,7 +1306,7 @@
1248
1306
  margin-inline-end: var(--_column-gap);
1249
1307
  }
1250
1308
 
1251
- [data-ui='multi-select'] [data-part='item'] > [data-part='label'] {
1309
+ [data-ui-multi-select] [data-part-item] > [data-part-label] {
1252
1310
  grid-column: 2;
1253
1311
  grid-row: 1;
1254
1312
  min-inline-size: 0;
@@ -1259,7 +1317,7 @@
1259
1317
  overflow-wrap: anywhere;
1260
1318
  }
1261
1319
 
1262
- [data-ui='multi-select'] [data-part='item'] > [data-part='description'] {
1320
+ [data-ui-multi-select] [data-part-item] > [data-part-description] {
1263
1321
  color: var(--_muted);
1264
1322
  font-size: var(--_secondary-font-size);
1265
1323
  grid-column: 2;
@@ -1269,12 +1327,12 @@
1269
1327
  overflow-wrap: anywhere;
1270
1328
  }
1271
1329
 
1272
- [data-ui='multi-select'] [data-part='item'][data-disabled] > [data-part='description'] {
1330
+ [data-ui-multi-select] [data-part-item][data-disabled] > [data-part-description] {
1273
1331
  color: inherit;
1274
1332
  }
1275
1333
 
1276
1334
  /* The tick is a `Glyph` the binding draws, at the content's icon step. */
1277
- [data-ui='multi-select'] [data-part='item'] > [data-part='indicator'] {
1335
+ [data-ui-multi-select] [data-part-item] > [data-part-indicator] {
1278
1336
  --slotted-icon-size: var(--_content-icon-size);
1279
1337
 
1280
1338
  align-items: center;
@@ -1289,7 +1347,7 @@
1289
1347
  transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
1290
1348
  }
1291
1349
 
1292
- [data-ui='multi-select'] [data-part='item'][data-selected] > [data-part='indicator'] {
1350
+ [data-ui-multi-select] [data-part-item][data-selected] > [data-part-indicator] {
1293
1351
  opacity: 1;
1294
1352
  }
1295
1353
 
@@ -1299,7 +1357,7 @@
1299
1357
  * plus rather than the check: the check says "this is in the set" and nothing
1300
1358
  * is in the set yet. The binding draws the plus; the rule only shows it.
1301
1359
  */
1302
- [data-ui='multi-select'] [data-part='item'][data-create] > [data-part='indicator'] {
1360
+ [data-ui-multi-select] [data-part-item][data-create] > [data-part-indicator] {
1303
1361
  opacity: 1;
1304
1362
  }
1305
1363
 
@@ -1312,13 +1370,13 @@
1312
1370
  * Latin word between them. The repair `status`, `empty` and the counter all
1313
1371
  * make, for the same reason.
1314
1372
  */
1315
- [data-ui='multi-select'] [data-part='item'][data-create] > [data-part='label'] {
1373
+ [data-ui-multi-select] [data-part-item][data-create] > [data-part-label] {
1316
1374
  unicode-bidi: plaintext;
1317
1375
  }
1318
1376
 
1319
1377
  /* ── Separator, empty, status ─────────────────────────────────────────── */
1320
1378
 
1321
- [data-ui='multi-select'] [data-part='separator'] {
1379
+ [data-ui-multi-select] [data-part-separator] {
1322
1380
  background-color: var(--slotted-multi-select-separator-color, var(--_border-color));
1323
1381
  block-size: var(--_border-width);
1324
1382
  border: 0;
@@ -1332,7 +1390,7 @@
1332
1390
  * keep the surface's measure rather than collapsing, so nothing jumps when
1333
1391
  * the results land.
1334
1392
  */
1335
- [data-ui='multi-select'] :is([data-part='empty'], [data-part='status']) {
1393
+ [data-ui-multi-select] :is([data-part-empty], [data-part-status]) {
1336
1394
  color: var(--_muted);
1337
1395
  /* Its own bidi run, ordered by its own content: "3 results" is a European
1338
1396
  number, a neutral space and a Latin word, and in a right-to-left document
@@ -1349,7 +1407,7 @@
1349
1407
  * width as nothing while the browser is computing that width, so the `min()`
1350
1408
  * collapsed to zero, the surface sized itself to the widest thing left — the
1351
1409
  * three waiting bars — and the message then took its twelve rems inside a
1352
- * box narrower than that and hung out of both sides of it, centred. Stating
1410
+ * box narrower than that and hung out of both sides of it, centerd. Stating
1353
1411
  * the floor and the ceiling separately means the floor is counted while the
1354
1412
  * surface is being measured and the ceiling is applied once it has a width.
1355
1413
  *
@@ -1368,7 +1426,7 @@
1368
1426
  * The status row is also the live region that announces the count, so it is
1369
1427
  * often present with nothing to draw. A row with no text takes no space.
1370
1428
  */
1371
- [data-ui='multi-select'] [data-part='status']:empty {
1429
+ [data-ui-multi-select] [data-part-status]:empty {
1372
1430
  display: none;
1373
1431
  }
1374
1432
 
@@ -1379,47 +1437,47 @@
1379
1437
  * bars are `skeleton/skeleton.css`'s, and they are hidden from assistive
1380
1438
  * technology because the `status` row beside them is the live region.
1381
1439
  */
1382
- [data-ui='multi-select'] [data-part='placeholder'] {
1440
+ [data-ui-multi-select] [data-part-placeholder] {
1383
1441
  display: grid;
1384
1442
  grid-column: 1 / -1;
1385
1443
  padding-block: var(--slotted-space-2, 0.25rem);
1386
1444
  padding-inline: var(--_item-inset);
1387
1445
  }
1388
1446
 
1389
- [data-ui='multi-select'] [data-part='placeholder'] > * {
1447
+ [data-ui-multi-select] [data-part-placeholder] > * {
1390
1448
  align-items: center;
1391
1449
  display: flex;
1392
1450
  min-block-size: var(--_item-height);
1393
1451
  }
1394
1452
 
1395
- [data-ui='multi-select'] [data-part='placeholder'] > [data-ui='skeleton'] {
1453
+ [data-ui-multi-select] [data-part-placeholder] > [data-ui-skeleton] {
1396
1454
  align-self: center;
1397
1455
  }
1398
1456
 
1399
1457
  /* Three ragged widths: three identical bars read as a table, and a list of
1400
1458
  labels is ragged. */
1401
- [data-ui='multi-select'] [data-part='placeholder'] > :nth-child(2) [data-ui='skeleton'] {
1459
+ [data-ui-multi-select] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
1402
1460
  inline-size: 78%;
1403
1461
  }
1404
1462
 
1405
- [data-ui='multi-select'] [data-part='placeholder'] > :nth-child(3) [data-ui='skeleton'] {
1463
+ [data-ui-multi-select] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
1406
1464
  inline-size: 56%;
1407
1465
  }
1408
1466
 
1409
- [data-ui='multi-select'] > [data-part='content'][data-loading] {
1467
+ [data-ui-multi-select] > [data-part-content][data-loading] {
1410
1468
  cursor: progress;
1411
1469
  }
1412
1470
 
1413
- /* ── Forced colours ───────────────────────────────────────────────────── */
1471
+ /* ── Forced colors ───────────────────────────────────────────────────── */
1414
1472
 
1415
1473
  @media (forced-colors: active) {
1416
- [data-ui='multi-select'] [data-part='item'][data-current] {
1474
+ [data-ui-multi-select] [data-part-item][data-current] {
1417
1475
  background-color: Highlight;
1418
1476
  color: HighlightText;
1419
1477
  forced-color-adjust: none;
1420
1478
  }
1421
1479
 
1422
- [data-ui='multi-select'] [data-part='item'][data-disabled][data-current] {
1480
+ [data-ui-multi-select] [data-part-item][data-disabled][data-current] {
1423
1481
  background-color: Highlight;
1424
1482
  color: GrayText;
1425
1483
  }