@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
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.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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" ───────────────┐ │
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
|
|
54
55
|
/* ── The frame ────────────────────────────────────────────────────────── */
|
|
55
56
|
|
|
56
|
-
[data-ui
|
|
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
|
|
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
|
|
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
|
|
151
|
+
[data-ui-tags-input] > [data-part-control] + * {
|
|
149
152
|
margin-inline-start: var(--_row-gap);
|
|
150
153
|
}
|
|
151
154
|
|
|
@@ -154,7 +157,7 @@
|
|
|
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
|
|
160
|
+
[data-ui-tags-input] [data-part-chips] {
|
|
158
161
|
/* `safe`, because this box scrolls: centring 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
|
|
@@ -193,7 +196,7 @@
|
|
|
193
196
|
scrollbar-width: none;
|
|
194
197
|
}
|
|
195
198
|
|
|
196
|
-
[data-ui
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
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 colour.
|
|
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
|
|
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));
|
|
@@ -337,7 +348,7 @@
|
|
|
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
|
|
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
|
|
361
|
+
* `[data-ui-tag]` nowhere.
|
|
351
362
|
*/
|
|
352
|
-
[data-ui
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
575
|
-
[data-ui
|
|
576
|
-
[data-part
|
|
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
|
|
592
|
-
|
|
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
|
|
607
|
-
[data-part
|
|
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
|
|
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)
|
|
@@ -634,9 +643,9 @@
|
|
|
634
643
|
box-shadow: var(--_invalid-edge);
|
|
635
644
|
}
|
|
636
645
|
|
|
637
|
-
[data-ui
|
|
638
|
-
[data-ui
|
|
639
|
-
[data-part
|
|
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
|
|
648
|
-
[data-part
|
|
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
|
|
651
|
-
[data-part
|
|
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. */
|
|
@@ -666,21 +675,24 @@
|
|
|
666
675
|
* control draws its ring double, which a valid ring is not.
|
|
667
676
|
*/
|
|
668
677
|
@media (forced-colors: active) {
|
|
669
|
-
[data-ui
|
|
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
|
|
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(
|
|
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
|
|
683
|
-
[data-part
|
|
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
|
|
693
|
-
[data-part
|
|
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
|
|
696
|
-
[data-part
|
|
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
|
|
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
|
|
723
|
-
[data-ui
|
|
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
|
|
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
|
|
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
|
|
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
|
]
|