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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -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);
@@ -1041,8 +1063,9 @@
1041
1063
  font-family: var(--slotted-font-family-sans);
1042
1064
  font-size: var(--_content-font-size);
1043
1065
  grid-template-columns: auto minmax(0, 1fr) auto;
1044
- max-block-size: calc(
1045
- var(--slotted-positioner-available-height, 100vh) - var(--slotted-space-5, 0.75rem)
1066
+ max-block-size: min(
1067
+ var(--slotted-overlay-max-block-size, 100vh),
1068
+ calc(var(--slotted-positioner-available-height, 100vh) - var(--slotted-space-5, 0.75rem))
1046
1069
  );
1047
1070
  outline: none;
1048
1071
  overflow-y: auto;
@@ -1057,14 +1080,14 @@
1057
1080
  * interaction — the highlight is `aria-activedescendant`, not focus — so a
1058
1081
  * ring here would draw a box around something nobody is operating.
1059
1082
  */
1060
- [data-ui='multi-select'] > [data-part='content']:focus-visible {
1083
+ [data-ui-multi-select] > [data-part-content]:focus-visible {
1061
1084
  outline: none;
1062
1085
  }
1063
1086
 
1064
1087
  /**
1065
1088
  * Every chosen value, whatever the row in the control did with them. It is
1066
1089
  * 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
1090
+ * chip in the control summarizes, and this band is where the whole set stays
1068
1091
  * reachable. It is drawn only while something is chosen.
1069
1092
  *
1070
1093
  * Its chips carry no remove control, and the reason is keyboard reach rather
@@ -1073,7 +1096,7 @@
1073
1096
  * option's own row, which the list has open beside it, and the chips in the
1074
1097
  * control, which are focusable. `select` recorded the same decision.
1075
1098
  */
1076
- [data-ui='multi-select'] [data-part='chosen'] {
1099
+ [data-ui-multi-select] [data-part-chosen] {
1077
1100
  background: var(--_surface);
1078
1101
  border-block-end: var(--_border-width) solid var(--_border-color);
1079
1102
  box-sizing: border-box;
@@ -1097,12 +1120,13 @@
1097
1120
  padding-block: var(--_inset-block);
1098
1121
  padding-inline: var(--_inset-inline);
1099
1122
  position: sticky;
1100
- z-index: 1;
1123
+ /* Above a group label stuck to the same edge. */
1124
+ z-index: 2;
1101
1125
  }
1102
1126
 
1103
1127
  /* ── Groups ───────────────────────────────────────────────────────────── */
1104
1128
 
1105
- [data-ui='multi-select'] [data-part='group'] {
1129
+ [data-ui-multi-select] [data-part-group] {
1106
1130
  display: grid;
1107
1131
  grid-column: 1 / -1;
1108
1132
  grid-template-columns: subgrid;
@@ -1116,24 +1140,60 @@
1116
1140
  * author rule wins over the user agent sheet. Without this the search
1117
1141
  * filtered nothing the reader could see.
1118
1142
  */
1119
- [data-ui='multi-select'] [data-part='item'][hidden],
1120
- [data-ui='multi-select'] [data-part='group'][hidden] {
1143
+ [data-ui-multi-select] [data-part-item][hidden],
1144
+ [data-ui-multi-select] [data-part-group][hidden] {
1121
1145
  display: none;
1122
1146
  }
1123
1147
 
1124
- [data-ui='multi-select'] [data-part='group-label'] {
1148
+ /**
1149
+ * A group's label stays at the top of the list while its group is in view.
1150
+ * The group is the label's containing block, so the next label pushes it out
1151
+ * and a group scrolled past takes its label with it. It sticks to the
1152
+ * scrollport's edge rather than the padding's, on the surface's ground, above
1153
+ * the items and below the parts the surface draws over them.
1154
+ */
1155
+ [data-ui-multi-select] [data-part-group-label] {
1156
+ background: var(--_surface);
1157
+ box-sizing: border-box;
1125
1158
  color: var(--_muted);
1126
1159
  font-size: var(--_secondary-font-size);
1127
1160
  font-weight: var(--slotted-font-weight-semibold, 600);
1128
1161
  grid-column: 1 / -1;
1162
+ inset-block-start: calc(-1 * var(--_inset-block));
1129
1163
  line-height: var(--slotted-line-height-sm, 1.45);
1164
+ min-block-size: var(--_group-label-height);
1130
1165
  padding-block: var(--slotted-space-2, 0.25rem);
1131
1166
  padding-inline: var(--_item-inset);
1167
+ position: sticky;
1168
+ z-index: 1;
1169
+ }
1170
+
1171
+ @media (forced-colors: active) {
1172
+ [data-ui-multi-select] [data-part-group-label] {
1173
+ background: Canvas;
1174
+ }
1175
+ }
1176
+
1177
+ /**
1178
+ * The label's height, which the list keeps clear above an item the keys
1179
+ * bring into view (`revealWithin` reads the scroll padding), so the item is
1180
+ * never drawn under a label stuck to the top.
1181
+ */
1182
+ [data-ui-multi-select] > [data-part-content]:has([data-part-group-label]) {
1183
+ --_group-label-height: var(
1184
+ --slotted-multi-select-group-label-height,
1185
+ calc(
1186
+ var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
1187
+ var(--slotted-space-2, 0.25rem)
1188
+ )
1189
+ );
1190
+
1191
+ scroll-padding-block-start: var(--_group-label-height);
1132
1192
  }
1133
1193
 
1134
1194
  /* ── Options ──────────────────────────────────────────────────────────── */
1135
1195
 
1136
- [data-ui='multi-select'] [data-part='item'] {
1196
+ [data-ui-multi-select] [data-part-item] {
1137
1197
  align-content: center;
1138
1198
  border-radius: var(--_item-radius);
1139
1199
  box-sizing: border-box;
@@ -1157,7 +1217,7 @@
1157
1217
  var(--slotted-control-transition-easing, var(--slotted-easing-standard));
1158
1218
  }
1159
1219
 
1160
- [data-ui='multi-select'] [data-part='item'][data-current] {
1220
+ [data-ui-multi-select] [data-part-item][data-current] {
1161
1221
  background-color: var(--_highlight);
1162
1222
  /**
1163
1223
  * A ring as well as a ground. Nothing on this surface holds focus — DOM
@@ -1171,11 +1231,11 @@
1171
1231
  var(--slotted-multi-select-highlight-ring, var(--slotted-tone-accent-border));
1172
1232
  }
1173
1233
 
1174
- [data-ui='multi-select'] [data-part='item']:not([data-disabled]):active {
1234
+ [data-ui-multi-select] [data-part-item]:not([data-disabled]):active {
1175
1235
  background-color: var(--_highlight-active);
1176
1236
  }
1177
1237
 
1178
- [data-ui='multi-select'] [data-part='item'][data-selected] {
1238
+ [data-ui-multi-select] [data-part-item][data-selected] {
1179
1239
  color: var(--_selected-color);
1180
1240
  }
1181
1241
 
@@ -1188,22 +1248,21 @@
1188
1248
  * and ends. `select` and `combobox` answer the same way, and
1189
1249
  * `selection-block.test.mjs` holds all of them to it.
1190
1250
  */
1191
- [data-ui='multi-select'] [data-part='item'][data-selected] + [data-part='item'][data-selected] {
1251
+ [data-ui-multi-select] [data-part-item][data-selected] + [data-part-item][data-selected] {
1192
1252
  border-start-end-radius: 0;
1193
1253
  border-start-start-radius: 0;
1194
1254
  }
1195
1255
 
1196
- [data-ui='multi-select']
1197
- [data-part='item'][data-selected]:has(+ [data-part='item'][data-selected]) {
1256
+ [data-ui-multi-select] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
1198
1257
  border-end-end-radius: 0;
1199
1258
  border-end-start-radius: 0;
1200
1259
  }
1201
1260
 
1202
- [data-ui='multi-select'] [data-part='item'][data-selected] > [data-part='label'] {
1261
+ [data-ui-multi-select] [data-part-item][data-selected] > [data-part-label] {
1203
1262
  font-weight: var(--slotted-font-weight-medium, 500);
1204
1263
  }
1205
1264
 
1206
- [data-ui='multi-select'] [data-part='item'][data-disabled] {
1265
+ [data-ui-multi-select] [data-part-item][data-disabled] {
1207
1266
  color: var(--slotted-disabled-foreground, #64748b);
1208
1267
  cursor: not-allowed;
1209
1268
  }
@@ -1221,7 +1280,7 @@
1221
1280
  * the row cannot do is said by the ink and by the ring, which both step down
1222
1281
  * to the disabled pair.
1223
1282
  */
1224
- [data-ui='multi-select'] [data-part='item'][data-disabled][data-current] {
1283
+ [data-ui-multi-select] [data-part-item][data-disabled][data-current] {
1225
1284
  box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
1226
1285
  var(--slotted-disabled-border, #cbd5e1);
1227
1286
  color: var(--slotted-disabled-foreground, #64748b);
@@ -1229,13 +1288,13 @@
1229
1288
 
1230
1289
  /* ── The cells ────────────────────────────────────────────────────────── */
1231
1290
 
1232
- [data-ui='multi-select'] [data-part='item'] > :is([data-part='indicator'], [data-part='icon']) {
1291
+ [data-ui-multi-select] [data-part-item] > :is([data-part-indicator], [data-part-icon]) {
1233
1292
  block-size: 1lh;
1234
1293
  }
1235
1294
 
1236
1295
  /* 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'] {
1296
+ artwork of the consumer's own, centerd and sized from the column. */
1297
+ [data-ui-multi-select] [data-part-item] > [data-part-icon] {
1239
1298
  --slotted-icon-size: var(--_content-icon-size);
1240
1299
 
1241
1300
  align-items: center;
@@ -1248,7 +1307,7 @@
1248
1307
  margin-inline-end: var(--_column-gap);
1249
1308
  }
1250
1309
 
1251
- [data-ui='multi-select'] [data-part='item'] > [data-part='label'] {
1310
+ [data-ui-multi-select] [data-part-item] > [data-part-label] {
1252
1311
  grid-column: 2;
1253
1312
  grid-row: 1;
1254
1313
  min-inline-size: 0;
@@ -1259,7 +1318,7 @@
1259
1318
  overflow-wrap: anywhere;
1260
1319
  }
1261
1320
 
1262
- [data-ui='multi-select'] [data-part='item'] > [data-part='description'] {
1321
+ [data-ui-multi-select] [data-part-item] > [data-part-description] {
1263
1322
  color: var(--_muted);
1264
1323
  font-size: var(--_secondary-font-size);
1265
1324
  grid-column: 2;
@@ -1269,12 +1328,12 @@
1269
1328
  overflow-wrap: anywhere;
1270
1329
  }
1271
1330
 
1272
- [data-ui='multi-select'] [data-part='item'][data-disabled] > [data-part='description'] {
1331
+ [data-ui-multi-select] [data-part-item][data-disabled] > [data-part-description] {
1273
1332
  color: inherit;
1274
1333
  }
1275
1334
 
1276
1335
  /* 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'] {
1336
+ [data-ui-multi-select] [data-part-item] > [data-part-indicator] {
1278
1337
  --slotted-icon-size: var(--_content-icon-size);
1279
1338
 
1280
1339
  align-items: center;
@@ -1289,7 +1348,7 @@
1289
1348
  transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
1290
1349
  }
1291
1350
 
1292
- [data-ui='multi-select'] [data-part='item'][data-selected] > [data-part='indicator'] {
1351
+ [data-ui-multi-select] [data-part-item][data-selected] > [data-part-indicator] {
1293
1352
  opacity: 1;
1294
1353
  }
1295
1354
 
@@ -1299,7 +1358,7 @@
1299
1358
  * plus rather than the check: the check says "this is in the set" and nothing
1300
1359
  * is in the set yet. The binding draws the plus; the rule only shows it.
1301
1360
  */
1302
- [data-ui='multi-select'] [data-part='item'][data-create] > [data-part='indicator'] {
1361
+ [data-ui-multi-select] [data-part-item][data-create] > [data-part-indicator] {
1303
1362
  opacity: 1;
1304
1363
  }
1305
1364
 
@@ -1312,13 +1371,13 @@
1312
1371
  * Latin word between them. The repair `status`, `empty` and the counter all
1313
1372
  * make, for the same reason.
1314
1373
  */
1315
- [data-ui='multi-select'] [data-part='item'][data-create] > [data-part='label'] {
1374
+ [data-ui-multi-select] [data-part-item][data-create] > [data-part-label] {
1316
1375
  unicode-bidi: plaintext;
1317
1376
  }
1318
1377
 
1319
1378
  /* ── Separator, empty, status ─────────────────────────────────────────── */
1320
1379
 
1321
- [data-ui='multi-select'] [data-part='separator'] {
1380
+ [data-ui-multi-select] [data-part-separator] {
1322
1381
  background-color: var(--slotted-multi-select-separator-color, var(--_border-color));
1323
1382
  block-size: var(--_border-width);
1324
1383
  border: 0;
@@ -1332,7 +1391,7 @@
1332
1391
  * keep the surface's measure rather than collapsing, so nothing jumps when
1333
1392
  * the results land.
1334
1393
  */
1335
- [data-ui='multi-select'] :is([data-part='empty'], [data-part='status']) {
1394
+ [data-ui-multi-select] :is([data-part-empty], [data-part-status]) {
1336
1395
  color: var(--_muted);
1337
1396
  /* Its own bidi run, ordered by its own content: "3 results" is a European
1338
1397
  number, a neutral space and a Latin word, and in a right-to-left document
@@ -1349,7 +1408,7 @@
1349
1408
  * width as nothing while the browser is computing that width, so the `min()`
1350
1409
  * collapsed to zero, the surface sized itself to the widest thing left — the
1351
1410
  * 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
1411
+ * box narrower than that and hung out of both sides of it, centerd. Stating
1353
1412
  * the floor and the ceiling separately means the floor is counted while the
1354
1413
  * surface is being measured and the ceiling is applied once it has a width.
1355
1414
  *
@@ -1368,10 +1427,23 @@
1368
1427
  * The status row is also the live region that announces the count, so it is
1369
1428
  * often present with nothing to draw. A row with no text takes no space.
1370
1429
  */
1371
- [data-ui='multi-select'] [data-part='status']:empty {
1430
+ [data-ui-multi-select] [data-part-status]:empty {
1372
1431
  display: none;
1373
1432
  }
1374
1433
 
1434
+ /* Beside the empty message the status says the same thing to the eye. It
1435
+ stays the live region that announces the count, clipped to one pixel. */
1436
+ [data-ui-multi-select] [data-part-empty] ~ [data-part-status] {
1437
+ block-size: 1px;
1438
+ clip-path: inset(50%);
1439
+ inline-size: 1px;
1440
+ min-inline-size: 0;
1441
+ overflow: hidden;
1442
+ padding: 0;
1443
+ position: absolute;
1444
+ white-space: nowrap;
1445
+ }
1446
+
1375
1447
  /**
1376
1448
  * The wait, as the shape of the list that is coming: rows the height of an
1377
1449
  * option rather than one sentence, so the surface a reader is looking at
@@ -1379,47 +1451,47 @@
1379
1451
  * bars are `skeleton/skeleton.css`'s, and they are hidden from assistive
1380
1452
  * technology because the `status` row beside them is the live region.
1381
1453
  */
1382
- [data-ui='multi-select'] [data-part='placeholder'] {
1454
+ [data-ui-multi-select] [data-part-placeholder] {
1383
1455
  display: grid;
1384
1456
  grid-column: 1 / -1;
1385
1457
  padding-block: var(--slotted-space-2, 0.25rem);
1386
1458
  padding-inline: var(--_item-inset);
1387
1459
  }
1388
1460
 
1389
- [data-ui='multi-select'] [data-part='placeholder'] > * {
1461
+ [data-ui-multi-select] [data-part-placeholder] > * {
1390
1462
  align-items: center;
1391
1463
  display: flex;
1392
1464
  min-block-size: var(--_item-height);
1393
1465
  }
1394
1466
 
1395
- [data-ui='multi-select'] [data-part='placeholder'] > [data-ui='skeleton'] {
1467
+ [data-ui-multi-select] [data-part-placeholder] > [data-ui-skeleton] {
1396
1468
  align-self: center;
1397
1469
  }
1398
1470
 
1399
1471
  /* Three ragged widths: three identical bars read as a table, and a list of
1400
1472
  labels is ragged. */
1401
- [data-ui='multi-select'] [data-part='placeholder'] > :nth-child(2) [data-ui='skeleton'] {
1473
+ [data-ui-multi-select] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
1402
1474
  inline-size: 78%;
1403
1475
  }
1404
1476
 
1405
- [data-ui='multi-select'] [data-part='placeholder'] > :nth-child(3) [data-ui='skeleton'] {
1477
+ [data-ui-multi-select] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
1406
1478
  inline-size: 56%;
1407
1479
  }
1408
1480
 
1409
- [data-ui='multi-select'] > [data-part='content'][data-loading] {
1481
+ [data-ui-multi-select] > [data-part-content][data-loading] {
1410
1482
  cursor: progress;
1411
1483
  }
1412
1484
 
1413
- /* ── Forced colours ───────────────────────────────────────────────────── */
1485
+ /* ── Forced colors ───────────────────────────────────────────────────── */
1414
1486
 
1415
1487
  @media (forced-colors: active) {
1416
- [data-ui='multi-select'] [data-part='item'][data-current] {
1488
+ [data-ui-multi-select] [data-part-item][data-current] {
1417
1489
  background-color: Highlight;
1418
1490
  color: HighlightText;
1419
1491
  forced-color-adjust: none;
1420
1492
  }
1421
1493
 
1422
- [data-ui='multi-select'] [data-part='item'][data-disabled][data-current] {
1494
+ [data-ui-multi-select] [data-part-item][data-disabled][data-current] {
1423
1495
  background-color: Highlight;
1424
1496
  color: GrayText;
1425
1497
  }