@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
@@ -2,9 +2,10 @@
2
2
  /**
3
3
  * ── A frame of typed values, with a field that adds more ────────────────
4
4
  *
5
- * One subtree, where the consumer wrote it. Nothing is portalled and
6
- * nothing opens: the input is a text box, and the values beside it are the
7
- * texts the reader typed.
5
+ * One subtree, where the consumer wrote it. Nothing is portalled: the
6
+ * input is a text box, and the values beside it are the texts the reader
7
+ * typed. With `suggestions` the one thing that opens is the listbox of
8
+ * them, placed under the frame by the positioner with a fixed position.
8
9
  *
9
10
  * ┌─ root ─ the frame ─────────────────────────────────────────┐
10
11
  * │ ┌─ control ─ role="grid" ───────────────┐ │
@@ -35,7 +36,7 @@
35
36
  * **An invalid value is a chip with a mark.** The tone is `tag`'s `danger`,
36
37
  * written in the DOM; the alert glyph in the chip's `start` slot is the
37
38
  * `Glyph` element the binding renders there, because `tag` has no opinion
38
- * about what a slot holds. Colour, mark and — in the tree — a description,
39
+ * about what a slot holds. Color, mark and — in the tree — a description,
39
40
  * which is what §2.5 asks of an invalid state.
40
41
  *
41
42
  * **A collapsed row opens where the reader is.** Under `overflow='collapse'`
@@ -53,7 +54,7 @@
53
54
 
54
55
  /* ── The frame ────────────────────────────────────────────────────────── */
55
56
 
56
- [data-ui='tags-input'][data-part='root'] {
57
+ [data-ui-tags-input][data-part-root] {
57
58
  --_font-size: var(--slotted-control-font-size-md, 13px);
58
59
  --_height: var(--slotted-control-height-md, 34px);
59
60
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -102,6 +103,8 @@
102
103
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
103
104
  font-size: var(--_font-size);
104
105
  gap: var(--slotted-space-1, 0.125rem);
106
+ /* In a flex row the item's basis is its content, not the whole row. */
107
+ flex-basis: content;
105
108
  inline-size: 100%;
106
109
  min-block-size: var(--_height);
107
110
  min-inline-size: 0;
@@ -123,7 +126,7 @@
123
126
  box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
124
127
  }
125
128
 
126
- [data-ui='tags-input'][data-part='root']:not([data-full-width]) {
129
+ [data-ui-tags-input][data-part-root]:not([data-full-width]) {
127
130
  inline-size: auto;
128
131
  }
129
132
 
@@ -132,7 +135,7 @@
132
135
  * role is what the layout-grid pattern asks for, and the geometry belongs to
133
136
  * the row that wraps.
134
137
  */
135
- [data-ui='tags-input'] > [data-part='control'] {
138
+ [data-ui-tags-input] > [data-part-control] {
136
139
  display: flex;
137
140
  flex: 1 1 auto;
138
141
  min-inline-size: 0;
@@ -145,7 +148,7 @@
145
148
  * what is typed and what acts on it is never narrower than the rhythm inside
146
149
  * it. `multi-select` measured the two-pixel version of this and rejected it.
147
150
  */
148
- [data-ui='tags-input'] > [data-part='control'] + * {
151
+ [data-ui-tags-input] > [data-part-control] + * {
149
152
  margin-inline-start: var(--_row-gap);
150
153
  }
151
154
 
@@ -154,8 +157,8 @@
154
157
  * the reading order stays linear and "previous" and "next" have one meaning
155
158
  * each — which is why the grid answers neither `ArrowDown` nor `ArrowUp`.
156
159
  */
157
- [data-ui='tags-input'] [data-part='chips'] {
158
- /* `safe`, because this box scrolls: centring a scroll container's content
160
+ [data-ui-tags-input] [data-part-chips] {
161
+ /* `safe`, because this box scrolls: centering a scroll container's content
159
162
  pushes the first line above the scrollport when there is more than fits,
160
163
  and nothing can scroll back to it. `multi-select` found the first three
161
164
  chips unreachable at 240 pixels without it. */
@@ -193,7 +196,7 @@
193
196
  scrollbar-width: none;
194
197
  }
195
198
 
196
- [data-ui='tags-input'] [data-part='chips']::-webkit-scrollbar {
199
+ [data-ui-tags-input] [data-part-chips]::-webkit-scrollbar {
197
200
  display: none;
198
201
  }
199
202
 
@@ -203,7 +206,7 @@
203
206
  * hold the rest, so the row itself opens — the rule after this one — while
204
207
  * the control has focus within.
205
208
  */
206
- [data-ui='tags-input'][data-overflow='collapse']:not([data-expanded]) [data-part='chips'] {
209
+ [data-ui-tags-input][data-overflow='collapse']:not([data-expanded]) [data-part-chips] {
207
210
  flex-wrap: nowrap;
208
211
  max-block-size: none;
209
212
  overflow: hidden;
@@ -218,9 +221,7 @@
218
221
  * No transition. The row's height changes as focus arrives, and a transition
219
222
  * would make the reader wait for the chip they are about to reach.
220
223
  */
221
- [data-ui='tags-input'][data-overflow='collapse'][data-expanded]
222
- [data-part='chips']
223
- > [data-count] {
224
+ [data-ui-tags-input][data-overflow='collapse'][data-expanded] [data-part-chips] > [data-count] {
224
225
  display: none;
225
226
  }
226
227
 
@@ -232,7 +233,7 @@
232
233
  * belongs to the chip, and the query's own input is told apart by the part it
233
234
  * does have.
234
235
  */
235
- [data-ui='tags-input'] [data-part='chips'] input:not([data-part='input']) {
236
+ [data-ui-tags-input] [data-part-chips] input:not([data-part-input]) {
236
237
  background-color: transparent;
237
238
  border: 0;
238
239
  color: inherit;
@@ -249,7 +250,7 @@
249
250
  * target minimum — so three of them plus their gaps divide the cap above
250
251
  * exactly, and no fourth row shows as a sliver under the third.
251
252
  */
252
- [data-ui='tags-input'] [data-part='chips'] > :not([data-part='field']) {
253
+ [data-ui-tags-input] [data-part-chips] > :not([data-part-field]) {
253
254
  flex: 0 0 auto;
254
255
  max-inline-size: 100%;
255
256
  min-block-size: var(--_row-size);
@@ -259,10 +260,10 @@
259
260
  /**
260
261
  * The chip takes the height the inside of this control has, through the
261
262
  * property `tag` reads for it. Set on the row, inherited by every chip, and
262
- * no rule of this sheet names `[data-ui='tag']`: the host stands beside the
263
+ * no rule of this sheet names `[data-ui-tag]`: the host stands beside the
263
264
  * tag sheet and never reaches into it.
264
265
  */
265
- [data-ui='tags-input'] [data-part='chips'] {
266
+ [data-ui-tags-input] [data-part-chips] {
266
267
  --slotted-control-inner-size: var(--_inner-size);
267
268
  }
268
269
 
@@ -273,7 +274,7 @@
273
274
  * has somewhere to type and a 240-pixel control holding two values does not
274
275
  * stand two rows tall with one row empty.
275
276
  */
276
- [data-ui='tags-input'] [data-part='field'] {
277
+ [data-ui-tags-input] [data-part-field] {
277
278
  align-items: center;
278
279
  display: flex;
279
280
  flex: 1 1 var(--slotted-tags-input-field-basis, 4rem);
@@ -287,7 +288,7 @@
287
288
  * composition, autofill, the browser's own completion from a `datalist`, and
288
289
  * every native attribute the consumer wrote.
289
290
  */
290
- [data-ui='tags-input'] [data-part='input'] {
291
+ [data-ui-tags-input] [data-part-input] {
291
292
  background-color: transparent;
292
293
  border: 0;
293
294
  color: inherit;
@@ -302,18 +303,28 @@
302
303
  text-overflow: ellipsis;
303
304
  }
304
305
 
305
- [data-ui='tags-input'] [data-part='input']::placeholder {
306
+ [data-ui-tags-input] [data-part-input]::placeholder {
306
307
  color: var(--slotted-tags-input-placeholder-color, var(--slotted-text-muted, GrayText));
307
308
  text-overflow: ellipsis;
308
309
  }
309
310
 
310
311
  /**
311
- * Autofill. Chrome paints its own ground over the control's, and a
312
- * hundred-pixel inset shadow is the only way to reach it. The signal is kept
313
- * rather than erased, in the accent surface the theme owns — the repair
314
- * `text-field` makes, for the same reason.
312
+ * Autofill. Chrome paints its own ground over the input, and a hundred-pixel
313
+ * inset shadow is the only way to reach it. The signal is kept rather than
314
+ * erased, in the accent surface the theme owns, and it is the whole
315
+ * control's: the frame takes the tint under its border and inside its
316
+ * corner, and the input repaints the browser's ground in the same color.
317
+ * Painted on the input alone, the tint left the frame's padding, the slots
318
+ * and the buttons bare.
315
319
  */
316
- [data-ui='tags-input'] [data-part='input']:autofill {
320
+ [data-ui-tags-input][data-part-root]:has([data-part-input]:autofill) {
321
+ background-color: var(
322
+ --slotted-tags-input-autofill-background,
323
+ var(--slotted-tone-accent-surface)
324
+ );
325
+ }
326
+
327
+ [data-ui-tags-input] [data-part-input]:autofill {
317
328
  box-shadow: inset 0 0 0 100px
318
329
  var(--slotted-tags-input-autofill-background, var(--slotted-tone-accent-surface));
319
330
  -webkit-text-fill-color: var(--slotted-tags-input-color, var(--slotted-text, CanvasText));
@@ -332,12 +343,12 @@
332
343
  * pixels past the chip; a ring two pixels further out lost its outer half on
333
344
  * every side, at every density. One width inside is `listbox`'s answer for an
334
345
  * option in a scrolling list: the ring covers the chip's own edge and reads
335
- * as the chip's edge turned to the ring colour, whole, with the text clear
346
+ * as the chip's edge turned to the ring color, whole, with the text clear
336
347
  * of it even at `dense`, where the chip has no inset to spare. `tag` draws
337
348
  * its own inner ring two widths in to keep a sliver of ground outside it;
338
349
  * here that sliver would cost the text its leading.
339
350
  */
340
- [data-ui='tags-input'] [data-part='chips'] > :not([data-part='field']):focus-visible {
351
+ [data-ui-tags-input] [data-part-chips] > :not([data-part-field]):focus-visible {
341
352
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
342
353
  outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
343
354
  }
@@ -347,9 +358,9 @@
347
358
  * takes focus, and for one long step of the motion scale its edge is the
348
359
  * accent's, so a reader who looked away from the ring still sees which chip
349
360
  * answered — through the edge token `tag` reads, so this sheet names
350
- * `[data-ui='tag']` nowhere.
361
+ * `[data-ui-tag]` nowhere.
351
362
  */
352
- [data-ui='tags-input'] [data-part='chips'] > [data-current] {
363
+ [data-ui-tags-input] [data-part-chips] > [data-current] {
353
364
  --slotted-tag-border-color: var(
354
365
  --slotted-tags-input-current-border-color,
355
366
  var(--slotted-tone-accent-border)
@@ -362,7 +373,7 @@
362
373
  * whose last one happens to be a count, and `createCollapse` measures it the
363
374
  * way it measures every other unit.
364
375
  */
365
- [data-ui='tags-input'] [data-part='chips'] > [data-count] {
376
+ [data-ui-tags-input] [data-part-chips] > [data-count] {
366
377
  cursor: pointer;
367
378
  flex: none;
368
379
  }
@@ -373,7 +384,7 @@
373
384
  * too narrow for a chip — because a counter with nothing to count against is
374
385
  * furniture.
375
386
  */
376
- [data-ui='tags-input'] > [data-part='counter'] {
387
+ [data-ui-tags-input] > [data-part-counter] {
377
388
  align-self: center;
378
389
  color: var(--slotted-tags-input-counter-color, var(--slotted-text-muted, GrayText));
379
390
  flex: none;
@@ -393,13 +404,13 @@
393
404
  * uses for a chosen value. Not a warning tone: reaching the limit is the
394
405
  * reader arriving somewhere, not going wrong.
395
406
  */
396
- [data-ui='tags-input'][data-complete] > [data-part='counter'] {
407
+ [data-ui-tags-input][data-complete] > [data-part-counter] {
397
408
  color: var(--slotted-tags-input-counter-complete-color, var(--slotted-tone-accent-text));
398
409
  font-weight: var(--slotted-font-weight-medium, 500);
399
410
  }
400
411
 
401
412
  /* Too narrow for a chip: the count is the whole answer. */
402
- [data-ui='tags-input'][data-narrow] [data-part='chips'] > :not([data-part='field']) {
413
+ [data-ui-tags-input][data-narrow] [data-part-chips] > :not([data-part-field]) {
403
414
  display: none;
404
415
  }
405
416
 
@@ -412,7 +423,7 @@
412
423
  * The `message` lives inside the chip and the `hint` beside the row; both
413
424
  * are positioned against the frame, which is the nearest containing block.
414
425
  */
415
- [data-ui='tags-input'] :is([data-part='message'], [data-part='hint']) {
426
+ [data-ui-tags-input] :is([data-part-message], [data-part-hint]) {
416
427
  block-size: 1px;
417
428
  border: 0;
418
429
  clip-path: inset(50%);
@@ -426,7 +437,7 @@
426
437
 
427
438
  /* ── The button inside the frame ──────────────────────────────────────── */
428
439
 
429
- [data-ui='tags-input'] > [data-part='clear'] {
440
+ [data-ui-tags-input] > [data-part-clear] {
430
441
  align-items: center;
431
442
  align-self: center;
432
443
  appearance: none;
@@ -458,7 +469,7 @@
458
469
  * control is 24 pixels tall — the WCAG 2.2 minimum — so nothing drawn inside
459
470
  * it can also be 24.
460
471
  */
461
- [data-ui='tags-input'] > [data-part='clear']::after {
472
+ [data-ui-tags-input] > [data-part-clear]::after {
462
473
  content: '';
463
474
  inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
464
475
  position: absolute;
@@ -469,7 +480,7 @@
469
480
  the hit area above grows to 44 pixels around them. It does not reach back
470
481
  over the chips, where the last chip's remove stands a few pixels away. */
471
482
  @media (pointer: coarse) {
472
- [data-ui='tags-input'] > [data-part='clear']::after {
483
+ [data-ui-tags-input] > [data-part-clear]::after {
473
484
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
474
485
  inset-inline-start: 0;
475
486
  }
@@ -477,13 +488,13 @@
477
488
 
478
489
  /* The cross is the `Glyph` element the binding renders inside the button,
479
490
  drawn at the control's own icon step. */
480
- [data-ui='tags-input'] > [data-part='clear'] {
491
+ [data-ui-tags-input] > [data-part-clear] {
481
492
  --slotted-icon-size: var(--_icon-size);
482
493
  }
483
494
 
484
495
  /* ── Size ─────────────────────────────────────────────────────────────── */
485
496
 
486
- [data-ui='tags-input'][data-part='root'][data-size='sm'] {
497
+ [data-ui-tags-input][data-part-root][data-size='sm'] {
487
498
  --_font-size: var(--slotted-control-font-size-sm, 12px);
488
499
  --_height: var(--slotted-control-height-sm, 30px);
489
500
  --_inner-size: var(--slotted-control-inner-size-sm, 22px);
@@ -492,7 +503,7 @@
492
503
  --_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
493
504
  }
494
505
 
495
- [data-ui='tags-input'][data-part='root'][data-size='md'] {
506
+ [data-ui-tags-input][data-part-root][data-size='md'] {
496
507
  --_font-size: var(--slotted-control-font-size-md, 13px);
497
508
  --_height: var(--slotted-control-height-md, 34px);
498
509
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -501,7 +512,7 @@
501
512
  --_inner-size: var(--slotted-control-inner-size-md, 24px);
502
513
  }
503
514
 
504
- [data-ui='tags-input'][data-part='root'][data-size='lg'] {
515
+ [data-ui-tags-input][data-part-root][data-size='lg'] {
505
516
  --_font-size: var(--slotted-control-font-size-lg, 14px);
506
517
  --_height: var(--slotted-control-height-lg, 38px);
507
518
  --_inner-size: var(--slotted-control-inner-size-lg, 28px);
@@ -512,7 +523,7 @@
512
523
 
513
524
  /* ── Variant ──────────────────────────────────────────────────────────── */
514
525
 
515
- [data-ui='tags-input'][data-part='root'][data-variant='subtle'] {
526
+ [data-ui-tags-input][data-part-root][data-variant='subtle'] {
516
527
  background-color: var(
517
528
  --slotted-tags-input-subtle-background,
518
529
  var(--slotted-surface-sunken, Canvas)
@@ -526,7 +537,7 @@
526
537
  /* No edge, no lift, no ground and no corner of its own: the cell it sits in
527
538
  is the box, the row is the ground, a cell has no corner, and the resting
528
539
  shadow would draw the cell where there is none. */
529
- [data-ui='tags-input'][data-part='root'][data-variant='plain'] {
540
+ [data-ui-tags-input][data-part-root][data-variant='plain'] {
530
541
  background-color: transparent;
531
542
  border-color: transparent;
532
543
  border-radius: var(--slotted-radius-none, 0px);
@@ -534,31 +545,31 @@
534
545
  }
535
546
 
536
547
  @media (forced-colors: active) {
537
- [data-ui='tags-input'][data-part='root'][data-variant='plain'] {
548
+ [data-ui-tags-input][data-part-root][data-variant='plain'] {
538
549
  border-color: ButtonBorder;
539
550
  }
540
551
  }
541
552
 
542
553
  /* ── States on the control ────────────────────────────────────────────── */
543
554
 
544
- [data-ui='tags-input'][data-part='root']:hover:not([data-disabled]):not([data-readonly]):not(
555
+ [data-ui-tags-input][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
545
556
  [data-invalid]
546
557
  ) {
547
558
  border-color: var(--slotted-tags-input-hover-border-color, var(--slotted-tone-accent-border));
548
559
  }
549
560
 
550
- [data-ui='tags-input'][data-part='root'][data-variant='subtle']:hover:not([data-disabled]):not(
561
+ [data-ui-tags-input][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
551
562
  [data-readonly]
552
- ):not([data-invalid]) {
563
+ ):not([data-invalid]):not(:has([data-part-input]:autofill)) {
553
564
  background-color: var(
554
565
  --slotted-tags-input-subtle-hover-background,
555
566
  var(--slotted-tone-secondary-subtle-hover)
556
567
  );
557
568
  }
558
569
 
559
- [data-ui='tags-input'][data-part='root'][data-variant='plain']:hover:not([data-disabled]):not(
570
+ [data-ui-tags-input][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
560
571
  [data-readonly]
561
- ):not([data-invalid]) {
572
+ ):not([data-invalid]):not(:has([data-part-input]:autofill)) {
562
573
  background-color: var(
563
574
  --slotted-tags-input-plain-hover-background,
564
575
  var(--slotted-tone-secondary-subtle-hover)
@@ -571,14 +582,14 @@
571
582
  * The frame carries the ring for whatever inside it holds focus — the input
572
583
  * or a chip — because the frame is the control a reader is operating.
573
584
  */
574
- [data-ui='tags-input'][data-part='root']:has([data-part='input']:focus-visible),
575
- [data-ui='tags-input'][data-part='root']:has(
576
- [data-part='chips'] > :not([data-part='field']):focus-visible
585
+ [data-ui-tags-input][data-part-root]:has([data-part-input]:focus-visible),
586
+ [data-ui-tags-input][data-part-root]:has(
587
+ [data-part-chips] > :not([data-part-field]):focus-visible
577
588
  ) {
578
589
  box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
579
590
  var(--slotted-focus-ring-color, Highlight);
580
591
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
581
- outline-offset: var(--slotted-focus-ring-offset, 2px);
592
+ outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
582
593
  }
583
594
 
584
595
  /**
@@ -588,11 +599,9 @@
588
599
  * shadow that appears only under focus is a cell that changes size when it
589
600
  * is used.
590
601
  */
591
- [data-ui='tags-input'][data-part='root'][data-variant='plain']:has(
592
- [data-part='input']:focus-visible
593
- ),
594
- [data-ui='tags-input'][data-part='root'][data-variant='plain']:has(
595
- [data-part='chips'] > :not([data-part='field']):focus-visible
602
+ [data-ui-tags-input][data-part-root][data-variant='plain']:has([data-part-input]:focus-visible),
603
+ [data-ui-tags-input][data-part-root][data-variant='plain']:has(
604
+ [data-part-chips] > :not([data-part-field]):focus-visible
596
605
  ) {
597
606
  box-shadow: none;
598
607
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
@@ -603,13 +612,13 @@
603
612
  * is two rings for one focus. The frame keeps its lift and gives up the
604
613
  * outline while the ring is inside it.
605
614
  */
606
- [data-ui='tags-input'][data-part='root']:has(
607
- [data-part='chips'] > :not([data-part='field']):focus-visible
615
+ [data-ui-tags-input][data-part-root]:has(
616
+ [data-part-chips] > :not([data-part-field]):focus-visible
608
617
  ) {
609
618
  outline: none;
610
619
  }
611
620
 
612
- [data-ui='tags-input'][data-part='root'][data-invalid] {
621
+ [data-ui-tags-input][data-part-root][data-invalid] {
613
622
  --slotted-focus-ring-color: var(
614
623
  --slotted-tags-input-invalid-focus-ring-color,
615
624
  var(--slotted-focus-ring-color-invalid, Highlight)
@@ -626,7 +635,7 @@
626
635
 
627
636
  border-color: var(--slotted-tags-input-invalid-border-color, var(--slotted-tone-danger-border));
628
637
  /*
629
- * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
638
+ * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
630
639
  * `high-contrast` the danger border is the resting edge's black. The line
631
640
  * is a shadow inside the border, so neither box nor text moves, and it
632
641
  * takes the resting lift's place.
@@ -634,9 +643,9 @@
634
643
  box-shadow: var(--_invalid-edge);
635
644
  }
636
645
 
637
- [data-ui='tags-input'][data-part='root'][data-invalid]:has([data-part='input']:focus-visible),
638
- [data-ui='tags-input'][data-part='root'][data-invalid]:has(
639
- [data-part='chips'] > :not([data-part='field']):focus-visible
646
+ [data-ui-tags-input][data-part-root][data-invalid]:has([data-part-input]:focus-visible),
647
+ [data-ui-tags-input][data-part-root][data-invalid]:has(
648
+ [data-part-chips] > :not([data-part-field]):focus-visible
640
649
  ) {
641
650
  box-shadow:
642
651
  var(--_invalid-edge),
@@ -644,11 +653,11 @@
644
653
  var(--slotted-focus-ring-color, Highlight);
645
654
  }
646
655
 
647
- [data-ui='tags-input'][data-part='root'][data-variant='plain'][data-invalid]:has(
648
- [data-part='input']:focus-visible
656
+ [data-ui-tags-input][data-part-root][data-variant='plain'][data-invalid]:has(
657
+ [data-part-input]:focus-visible
649
658
  ),
650
- [data-ui='tags-input'][data-part='root'][data-variant='plain'][data-invalid]:has(
651
- [data-part='chips'] > :not([data-part='field']):focus-visible
659
+ [data-ui-tags-input][data-part-root][data-variant='plain'][data-invalid]:has(
660
+ [data-part-chips] > :not([data-part-field]):focus-visible
652
661
  ) {
653
662
  /* The ring lies inside the box here, over the border and an edge as wide as
654
663
  it; the edge reaches past the ring. */
@@ -661,26 +670,29 @@
661
670
  }
662
671
 
663
672
  /*
664
- * Forced colours remove every box shadow, and the edge with them. The
673
+ * Forced colors remove every box shadow, and the edge with them. The
665
674
  * width comes back as an outline inside the border, and a focused invalid
666
675
  * control draws its ring double, which a valid ring is not.
667
676
  */
668
677
  @media (forced-colors: active) {
669
- [data-ui='tags-input'][data-part='root'][data-invalid] {
678
+ [data-ui-tags-input][data-part-root][data-invalid] {
670
679
  outline: var(--_invalid-edge-width) solid CanvasText;
671
680
  outline-offset: calc(
672
681
  -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
673
682
  );
674
683
  }
675
684
 
676
- [data-ui='tags-input'][data-part='root'][data-invalid]:has([data-part='input']:focus-visible) {
685
+ [data-ui-tags-input][data-part-root][data-invalid]:has([data-part-input]:focus-visible) {
677
686
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
678
687
  var(--slotted-focus-ring-color, Highlight);
679
- outline-offset: var(--slotted-focus-ring-offset, 2px);
688
+ outline-offset: var(
689
+ --slotted-control-focus-ring-offset,
690
+ var(--slotted-focus-ring-offset, 2px)
691
+ );
680
692
  }
681
693
 
682
- [data-ui='tags-input'][data-part='root'][data-variant='plain'][data-invalid]:has(
683
- [data-part='input']:focus-visible
694
+ [data-ui-tags-input][data-part-root][data-variant='plain'][data-invalid]:has(
695
+ [data-part-input]:focus-visible
684
696
  ) {
685
697
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
686
698
  var(--slotted-focus-ring-color, Highlight);
@@ -689,11 +701,11 @@
689
701
  );
690
702
  }
691
703
 
692
- [data-ui='tags-input'][data-part='root'][data-invalid]:has(
693
- [data-part='chips'] > :not([data-part='field']):focus-visible
704
+ [data-ui-tags-input][data-part-root][data-invalid]:has(
705
+ [data-part-chips] > :not([data-part-field]):focus-visible
694
706
  ),
695
- [data-ui='tags-input'][data-part='root'][data-variant='plain'][data-invalid]:has(
696
- [data-part='chips'] > :not([data-part='field']):focus-visible
707
+ [data-ui-tags-input][data-part-root][data-variant='plain'][data-invalid]:has(
708
+ [data-part-chips] > :not([data-part-field]):focus-visible
697
709
  ) {
698
710
  outline: var(--_invalid-edge-width) solid CanvasText;
699
711
  outline-offset: calc(
@@ -707,7 +719,7 @@
707
719
  * withholds every remove control. The native `readonly` gives the text half;
708
720
  * the rest is the family's.
709
721
  */
710
- [data-ui='tags-input'][data-part='root'][data-readonly] {
722
+ [data-ui-tags-input][data-part-root][data-readonly] {
711
723
  background-color: var(
712
724
  --slotted-tags-input-readonly-background,
713
725
  var(--slotted-tone-secondary-subtle-hover)
@@ -719,8 +731,8 @@
719
731
  * because a disabled `fieldset` disables every control inside it and the
720
732
  * control has no way to say so.
721
733
  */
722
- [data-ui='tags-input'][data-part='root'][data-disabled],
723
- [data-ui='tags-input'][data-part='root']:has([data-part='input']:disabled) {
734
+ [data-ui-tags-input][data-part-root][data-disabled],
735
+ [data-ui-tags-input][data-part-root]:has([data-part-input]:disabled) {
724
736
  background-color: var(
725
737
  --slotted-tags-input-disabled-background,
726
738
  var(--slotted-disabled-background)
@@ -731,14 +743,14 @@
731
743
  cursor: not-allowed;
732
744
  }
733
745
 
734
- [data-ui='tags-input'] > [data-part='clear']:hover:not(:disabled):not([data-disabled]) {
746
+ [data-ui-tags-input] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
735
747
  background-color: var(
736
748
  --slotted-tags-input-action-hover-background,
737
749
  var(--slotted-tone-secondary-subtle-hover)
738
750
  );
739
751
  }
740
752
 
741
- [data-ui='tags-input'] > [data-part='clear']:active:not(:disabled):not([data-disabled]) {
753
+ [data-ui-tags-input] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
742
754
  background-color: var(
743
755
  --slotted-tags-input-action-active-background,
744
756
  var(--slotted-tone-secondary-subtle-active)
@@ -750,8 +762,61 @@
750
762
  * from the input to it has to move something visible, and a ring around the
751
763
  * whole frame would sit still while focus moved inside it.
752
764
  */
753
- [data-ui='tags-input'] > [data-part='clear']:focus-visible {
765
+ [data-ui-tags-input] > [data-part-clear]:focus-visible {
754
766
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
755
767
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
756
768
  }
769
+
770
+ /* ── The suggestions ──────────────────────────────────────────────────── */
771
+
772
+ /**
773
+ * A raised surface as wide as the frame, written where the positioner puts
774
+ * it: `left` and `top` are its, and the width is the anchor's, which it
775
+ * publishes. Ten options are seen before the list scrolls.
776
+ */
777
+ [data-ui-tags-input] > [data-part-suggestions] {
778
+ background-color: var(--slotted-surface-raised, Canvas);
779
+ border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle, GrayText);
780
+ border-radius: var(--slotted-radius-lg, 8px);
781
+ box-shadow: var(--slotted-shadow-md);
782
+ box-sizing: border-box;
783
+ color: var(--slotted-text, CanvasText);
784
+ font-size: var(--_font-size);
785
+ /* No inset of its own: the positioner writes `left` and `top`, and an
786
+ inline inset would resolve to `right` in a right-to-left document. */
787
+ inline-size: var(--slotted-positioner-anchor-width, 100%);
788
+ max-block-size: calc(10 * var(--_height) + 2 * var(--slotted-space-2, 0.25rem));
789
+ overflow-y: auto;
790
+ overscroll-behavior: contain;
791
+ padding: var(--slotted-space-2, 0.25rem);
792
+ position: fixed;
793
+ z-index: calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));
794
+ }
795
+
796
+ /* One option is one control row, so the list reads at the frame's own step. */
797
+ [data-ui-tags-input] > [data-part-suggestions] > [data-part-suggestion] {
798
+ align-items: center;
799
+ border-radius: var(--slotted-control-radius, 4px);
800
+ cursor: default;
801
+ display: flex;
802
+ min-block-size: var(--_height);
803
+ overflow-wrap: anywhere;
804
+ padding-inline: var(--_padding-inline);
805
+ }
806
+
807
+ /**
808
+ * The highlight follows the arrow keys and the pointer alike. The `-active`
809
+ * step of the neutral tone, the one that lifts off a raised surface in every
810
+ * scheme, as `combobox.css` explains.
811
+ */
812
+ [data-ui-tags-input] > [data-part-suggestions] > [data-highlighted] {
813
+ background-color: var(--slotted-tone-secondary-subtle-active);
814
+ }
815
+
816
+ @media (forced-colors: active) {
817
+ [data-ui-tags-input] > [data-part-suggestions] > [data-highlighted] {
818
+ background-color: Highlight;
819
+ color: HighlightText;
820
+ }
821
+ }
757
822
  }
@@ -1,7 +1,9 @@
1
1
  [
2
2
  "--slotted-border-subtle",
3
+ "--slotted-border-width-thin",
3
4
  "--slotted-control-border-color",
4
5
  "--slotted-control-border-width",
6
+ "--slotted-control-focus-ring-offset",
5
7
  "--slotted-control-font-family",
6
8
  "--slotted-control-font-size-lg",
7
9
  "--slotted-control-font-size-md",
@@ -38,9 +40,12 @@
38
40
  "--slotted-font-size-xs",
39
41
  "--slotted-font-weight-medium",
40
42
  "--slotted-line-height-sm",
43
+ "--slotted-radius-lg",
41
44
  "--slotted-radius-none",
45
+ "--slotted-shadow-md",
42
46
  "--slotted-space-1",
43
47
  "--slotted-space-2",
48
+ "--slotted-surface-raised",
44
49
  "--slotted-surface-sunken",
45
50
  "--slotted-tags-input-action-active-background",
46
51
  "--slotted-tags-input-action-color",
@@ -80,5 +85,6 @@
80
85
  "--slotted-tone-accent-text",
81
86
  "--slotted-tone-danger-border",
82
87
  "--slotted-tone-secondary-subtle-active",
83
- "--slotted-tone-secondary-subtle-hover"
88
+ "--slotted-tone-secondary-subtle-hover",
89
+ "--slotted-z-index-popover"
84
90
  ]