@slotted/styles 0.1.0-beta.8 → 0.1.0-beta.9
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 +31 -32
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +35 -35
- package/src/app-shell/app-shell.css +280 -299
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +41 -41
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +37 -37
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +88 -69
- package/src/button-group/button-group.css +69 -73
- package/src/calendar/calendar.css +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +147 -151
- package/src/chart/chart.css +225 -240
- 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 +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +99 -101
- package/src/command-palette/command-palette.css +84 -90
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +99 -104
- package/src/dashboard-grid/dashboard-grid.css +104 -107
- package/src/data-grid/data-grid.css +458 -456
- package/src/data-grid/data-grid.tokens.json +2 -0
- package/src/data-list/data-list.css +67 -69
- package/src/date-field/date-field.css +50 -50
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +73 -78
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +70 -70
- package/src/dialog/dialog.css +300 -148
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +186 -209
- package/src/entity-picker/entity-picker.css +220 -239
- 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 +21 -24
- 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 +15 -15
- 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 +28 -28
- package/src/kbd/kbd.css +26 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +20 -20
- package/src/list-item/list-item.css +66 -66
- 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 +63 -65
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +174 -202
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +131 -137
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +134 -148
- package/src/number-field/number-field.css +76 -81
- package/src/otp-input/otp-input.css +48 -48
- package/src/page/page.css +23 -23
- package/src/page-header/page-header.css +219 -280
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +85 -90
- package/src/prompt-composer/prompt-composer.css +94 -99
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +132 -132
- package/src/result-state/result-state.css +74 -77
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +32 -35
- package/src/section/section.css +16 -16
- package/src/segmented-control/segmented-control.css +77 -79
- package/src/select/select.css +113 -115
- package/src/side-navigation/side-navigation.css +170 -180
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +32 -32
- package/src/spinner/spinner.css +4 -4
- package/src/split-button/split-button.css +26 -31
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +102 -103
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +189 -198
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +143 -162
- package/src/tag/tag.css +67 -71
- package/src/tags-input/tags-input.css +124 -74
- package/src/tags-input/tags-input.tokens.json +6 -1
- package/src/text-field/text-field.css +108 -126
- package/src/textarea/textarea.css +26 -26
- package/src/time-field/time-field.css +67 -67
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +244 -266
- package/src/toast/toast.css +81 -90
- package/src/toggle/toggle.css +29 -33
- package/src/toggle-group/toggle-group.css +67 -71
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +26 -26
- 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 +36 -36
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* scrolling surface are all `select`'s decisions, taken in the same session
|
|
29
29
|
* and written out in `packages/styles/src/select/select.css`. They are
|
|
30
30
|
* repeated here rather than shared because the two families have two public
|
|
31
|
-
* identifiers, and a stylesheet that painted `[data-ui
|
|
31
|
+
* identifiers, and a stylesheet that painted `[data-ui-select]` from a
|
|
32
32
|
* combobox would make one family's selector match the other's DOM. The
|
|
33
33
|
* duplication is the price of that boundary and it is paid on purpose.
|
|
34
34
|
*
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
/* ── The control ──────────────────────────────────────────────────────── */
|
|
56
56
|
|
|
57
|
-
[data-ui
|
|
57
|
+
[data-ui-combobox][data-part-root] {
|
|
58
58
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
59
59
|
--_height: var(--slotted-control-height-md, 34px);
|
|
60
60
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
[data-ui
|
|
105
|
+
[data-ui-combobox][data-part-root]:not([data-full-width]) {
|
|
106
106
|
inline-size: auto;
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
* `autocomplete="both"` writes as a selected range rather than as text, so
|
|
114
114
|
* the next character typed replaces it.
|
|
115
115
|
*/
|
|
116
|
-
[data-ui
|
|
116
|
+
[data-ui-combobox] > [data-part-input] {
|
|
117
117
|
background-color: transparent;
|
|
118
118
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
119
119
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
text-overflow: ellipsis;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-combobox] > [data-part-input]::placeholder {
|
|
139
139
|
color: var(--slotted-combobox-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
140
140
|
text-overflow: ellipsis;
|
|
141
141
|
}
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
* the theme's accent tone is what that paint should be, rather than the
|
|
147
147
|
* browser's blue in a form that is not blue.
|
|
148
148
|
*/
|
|
149
|
-
[data-ui
|
|
149
|
+
[data-ui-combobox] > [data-part-input]::selection {
|
|
150
150
|
background-color: var(
|
|
151
151
|
--slotted-combobox-completion-background,
|
|
152
152
|
var(--slotted-tone-accent-surface)
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
* rather than erased, in the accent surface the theme owns — the repair
|
|
161
161
|
* `text-field` makes, for the same reason.
|
|
162
162
|
*/
|
|
163
|
-
[data-ui
|
|
163
|
+
[data-ui-combobox] > [data-part-input]:autofill {
|
|
164
164
|
box-shadow: inset 0 0 0 100px
|
|
165
165
|
var(--slotted-combobox-autofill-background, var(--slotted-tone-accent-surface));
|
|
166
166
|
-webkit-text-fill-color: var(--slotted-combobox-color, var(--slotted-text, CanvasText));
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
/* ── The two buttons inside the frame ─────────────────────────────────── */
|
|
170
170
|
|
|
171
|
-
[data-ui
|
|
171
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
172
172
|
align-items: center;
|
|
173
173
|
appearance: none;
|
|
174
174
|
background-color: transparent;
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
* control is 24 pixels tall — the WCAG 2.2 minimum — so nothing drawn inside
|
|
200
200
|
* it can also be 24.
|
|
201
201
|
*/
|
|
202
|
-
[data-ui
|
|
202
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
203
203
|
content: '';
|
|
204
204
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
205
205
|
position: absolute;
|
|
@@ -210,22 +210,22 @@
|
|
|
210
210
|
the hit area above grows to 44 pixels around them. Side by side, neither
|
|
211
211
|
button reaches across the edge the two share. */
|
|
212
212
|
@media (pointer: coarse) {
|
|
213
|
-
[data-ui
|
|
213
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
214
214
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
[data-ui
|
|
217
|
+
[data-ui-combobox] > [data-part-clear]:has(+ [data-part-trigger]:not([hidden]))::after {
|
|
218
218
|
inset-inline-end: 0;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
[data-ui
|
|
221
|
+
[data-ui-combobox] > [data-part-clear]:not([hidden]) + [data-part-trigger]::after {
|
|
222
222
|
inset-inline-start: 0;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
/* The cross and the chevron are `Glyph` elements the binding draws, sized
|
|
227
227
|
here to the control's icon step. */
|
|
228
|
-
[data-ui
|
|
228
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
229
229
|
--slotted-icon-size: var(--_icon-size);
|
|
230
230
|
}
|
|
231
231
|
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
* button is what a reader presses and the arrow is what turns over. The
|
|
235
235
|
* library's own `Glyph` in an `icon` box; a character is never an icon.
|
|
236
236
|
*/
|
|
237
|
-
[data-ui
|
|
237
|
+
[data-ui-combobox] [data-part-arrow] {
|
|
238
238
|
align-items: center;
|
|
239
239
|
block-size: var(--_icon-size);
|
|
240
240
|
display: flex;
|
|
@@ -242,12 +242,12 @@
|
|
|
242
242
|
justify-content: center;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
[data-ui
|
|
245
|
+
[data-ui-combobox] [data-part-arrow] > [data-ui-icon] {
|
|
246
246
|
transition: rotate var(--slotted-control-transition-duration)
|
|
247
247
|
var(--slotted-control-transition-easing);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
[data-ui
|
|
250
|
+
[data-ui-combobox][data-open] [data-part-arrow] > [data-ui-icon] {
|
|
251
251
|
rotate: 180deg;
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
* draws for every family that waits, worn as `data-ui='spinner'` beside this
|
|
259
259
|
* family's own part.
|
|
260
260
|
*/
|
|
261
|
-
[data-ui
|
|
261
|
+
[data-ui-combobox] [data-part-busy] {
|
|
262
262
|
--slotted-spinner-size: var(--_icon-size);
|
|
263
263
|
|
|
264
264
|
color: var(--slotted-combobox-arrow-color, var(--slotted-text-muted, GrayText));
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
|
|
268
268
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
269
269
|
|
|
270
|
-
[data-ui
|
|
270
|
+
[data-ui-combobox][data-part-root][data-size='sm'] {
|
|
271
271
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
272
272
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
273
273
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
[data-ui
|
|
279
|
+
[data-ui-combobox][data-part-root][data-size='md'] {
|
|
280
280
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
281
281
|
--_height: var(--slotted-control-height-md, 34px);
|
|
282
282
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
[data-ui
|
|
288
|
+
[data-ui-combobox][data-part-root][data-size='lg'] {
|
|
289
289
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
290
290
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
291
291
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
|
|
297
297
|
/* ── Variant ──────────────────────────────────────────────────────────── */
|
|
298
298
|
|
|
299
|
-
[data-ui
|
|
299
|
+
[data-ui-combobox][data-part-root][data-variant='subtle'] {
|
|
300
300
|
background-color: var(
|
|
301
301
|
--slotted-combobox-subtle-background,
|
|
302
302
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
311
311
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
312
312
|
shadow would draw the cell where there is none. */
|
|
313
|
-
[data-ui
|
|
313
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
314
314
|
background-color: transparent;
|
|
315
315
|
border-color: transparent;
|
|
316
316
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -318,20 +318,20 @@
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
@media (forced-colors: active) {
|
|
321
|
-
[data-ui
|
|
321
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
322
322
|
border-color: ButtonBorder;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
/* ── States on the control ────────────────────────────────────────────── */
|
|
327
327
|
|
|
328
|
-
[data-ui
|
|
328
|
+
[data-ui-combobox][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
329
329
|
[data-invalid]
|
|
330
330
|
) {
|
|
331
331
|
border-color: var(--slotted-combobox-hover-border-color, var(--slotted-tone-accent-border));
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
[data-ui
|
|
334
|
+
[data-ui-combobox][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
335
335
|
[data-readonly]
|
|
336
336
|
):not([data-invalid]) {
|
|
337
337
|
background-color: var(
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
[data-ui
|
|
343
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
344
344
|
[data-readonly]
|
|
345
345
|
):not([data-invalid]) {
|
|
346
346
|
background-color: var(
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
border-color: transparent;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
[data-ui
|
|
354
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
355
355
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
356
356
|
var(--slotted-focus-ring-color, Highlight);
|
|
357
357
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
@@ -365,18 +365,16 @@
|
|
|
365
365
|
* shadow that appears only under focus is a cell that changes size when it
|
|
366
366
|
* is used.
|
|
367
367
|
*/
|
|
368
|
-
[data-ui
|
|
369
|
-
> [data-part='input']:focus-visible
|
|
370
|
-
) {
|
|
368
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:has(> [data-part-input]:focus-visible) {
|
|
371
369
|
box-shadow: none;
|
|
372
370
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
373
371
|
}
|
|
374
372
|
|
|
375
|
-
[data-ui
|
|
373
|
+
[data-ui-combobox][data-part-root][data-open]:not([data-disabled]) {
|
|
376
374
|
border-color: var(--slotted-combobox-open-border-color, var(--slotted-tone-accent-border));
|
|
377
375
|
}
|
|
378
376
|
|
|
379
|
-
[data-ui
|
|
377
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
380
378
|
--slotted-focus-ring-color: var(
|
|
381
379
|
--slotted-combobox-invalid-focus-ring-color,
|
|
382
380
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -401,15 +399,15 @@
|
|
|
401
399
|
box-shadow: var(--_invalid-edge);
|
|
402
400
|
}
|
|
403
401
|
|
|
404
|
-
[data-ui
|
|
402
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
405
403
|
box-shadow:
|
|
406
404
|
var(--_invalid-edge),
|
|
407
405
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
408
406
|
var(--slotted-focus-ring-color, Highlight);
|
|
409
407
|
}
|
|
410
408
|
|
|
411
|
-
[data-ui
|
|
412
|
-
> [data-part
|
|
409
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
410
|
+
> [data-part-input]:focus-visible
|
|
413
411
|
) {
|
|
414
412
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
415
413
|
it; the edge reaches past the ring. */
|
|
@@ -427,21 +425,21 @@
|
|
|
427
425
|
* control draws its ring double, which a valid ring is not.
|
|
428
426
|
*/
|
|
429
427
|
@media (forced-colors: active) {
|
|
430
|
-
[data-ui
|
|
428
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
431
429
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
432
430
|
outline-offset: calc(
|
|
433
431
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
434
432
|
);
|
|
435
433
|
}
|
|
436
434
|
|
|
437
|
-
[data-ui
|
|
435
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
438
436
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
439
437
|
var(--slotted-focus-ring-color, Highlight);
|
|
440
438
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
441
439
|
}
|
|
442
440
|
|
|
443
|
-
[data-ui
|
|
444
|
-
> [data-part
|
|
441
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
442
|
+
> [data-part-input]:focus-visible
|
|
445
443
|
) {
|
|
446
444
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
447
445
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -456,14 +454,14 @@
|
|
|
456
454
|
* popup. The native `readonly` gives the first three; the second is the
|
|
457
455
|
* family's, because the pattern has no readonly for a combobox.
|
|
458
456
|
*/
|
|
459
|
-
[data-ui
|
|
457
|
+
[data-ui-combobox][data-part-root][data-readonly] {
|
|
460
458
|
background-color: var(
|
|
461
459
|
--slotted-combobox-readonly-background,
|
|
462
460
|
var(--slotted-tone-secondary-subtle-hover)
|
|
463
461
|
);
|
|
464
462
|
}
|
|
465
463
|
|
|
466
|
-
[data-ui
|
|
464
|
+
[data-ui-combobox][data-part-root][data-readonly] [data-part-arrow] {
|
|
467
465
|
opacity: 0.5;
|
|
468
466
|
}
|
|
469
467
|
|
|
@@ -472,8 +470,8 @@
|
|
|
472
470
|
* because a disabled `fieldset` disables every control inside it and the
|
|
473
471
|
* control has no way to say so.
|
|
474
472
|
*/
|
|
475
|
-
[data-ui
|
|
476
|
-
[data-ui
|
|
473
|
+
[data-ui-combobox][data-part-root][data-disabled],
|
|
474
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:disabled) {
|
|
477
475
|
background-color: var(
|
|
478
476
|
--slotted-combobox-disabled-background,
|
|
479
477
|
var(--slotted-disabled-background)
|
|
@@ -484,16 +482,16 @@
|
|
|
484
482
|
cursor: not-allowed;
|
|
485
483
|
}
|
|
486
484
|
|
|
487
|
-
[data-ui
|
|
488
|
-
> :is([data-part
|
|
485
|
+
[data-ui-combobox]
|
|
486
|
+
> :is([data-part-clear], [data-part-trigger]):hover:not(:disabled):not([data-disabled]) {
|
|
489
487
|
background-color: var(
|
|
490
488
|
--slotted-combobox-action-hover-background,
|
|
491
489
|
var(--slotted-tone-secondary-subtle-hover)
|
|
492
490
|
);
|
|
493
491
|
}
|
|
494
492
|
|
|
495
|
-
[data-ui
|
|
496
|
-
> :is([data-part
|
|
493
|
+
[data-ui-combobox]
|
|
494
|
+
> :is([data-part-clear], [data-part-trigger]):active:not(:disabled):not([data-disabled]) {
|
|
497
495
|
background-color: var(
|
|
498
496
|
--slotted-combobox-action-active-background,
|
|
499
497
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -507,14 +505,14 @@
|
|
|
507
505
|
* it. The trigger is not in the tab sequence and takes the same rule anyway,
|
|
508
506
|
* because a script may focus it.
|
|
509
507
|
*/
|
|
510
|
-
[data-ui
|
|
508
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]):focus-visible {
|
|
511
509
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
512
510
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
513
511
|
}
|
|
514
512
|
|
|
515
513
|
/* ── The layer ────────────────────────────────────────────────────────── */
|
|
516
514
|
|
|
517
|
-
[data-ui
|
|
515
|
+
[data-ui-combobox][data-part-positioner] {
|
|
518
516
|
--_surface: var(--slotted-combobox-surface, var(--slotted-surface-raised, #ffffff));
|
|
519
517
|
--_text: var(--slotted-combobox-content-text, var(--slotted-text, #0f172a));
|
|
520
518
|
--_muted: var(--slotted-combobox-content-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -583,12 +581,12 @@
|
|
|
583
581
|
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
584
582
|
}
|
|
585
583
|
|
|
586
|
-
[data-ui
|
|
584
|
+
[data-ui-combobox][data-part-positioner][data-side='top'] {
|
|
587
585
|
translate: 0 var(--_enter-distance);
|
|
588
586
|
}
|
|
589
587
|
|
|
590
588
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
591
|
-
[data-ui
|
|
589
|
+
[data-ui-combobox][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
592
590
|
translate: 0 0;
|
|
593
591
|
}
|
|
594
592
|
|
|
@@ -601,7 +599,7 @@
|
|
|
601
599
|
* A keyframe states where it starts. The exit stays a transition: it
|
|
602
600
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
603
601
|
*/
|
|
604
|
-
[data-ui
|
|
602
|
+
[data-ui-combobox][data-part-positioner][data-open] {
|
|
605
603
|
opacity: 1;
|
|
606
604
|
translate: 0 0;
|
|
607
605
|
transition: none;
|
|
@@ -612,16 +610,16 @@
|
|
|
612
610
|
* with the side, and a layer written open in static markup — the harness,
|
|
613
611
|
* a docs snippet — is simply there, and is photographed where it stands.
|
|
614
612
|
*/
|
|
615
|
-
[data-ui
|
|
613
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned] {
|
|
616
614
|
animation: slotted-combobox-enter-down var(--slotted-duration-medium)
|
|
617
615
|
var(--slotted-easing-enter);
|
|
618
616
|
}
|
|
619
617
|
|
|
620
|
-
[data-ui
|
|
618
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
621
619
|
animation-name: slotted-combobox-enter-up;
|
|
622
620
|
}
|
|
623
621
|
|
|
624
|
-
[data-ui
|
|
622
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned]:is(
|
|
625
623
|
[data-side='left'],
|
|
626
624
|
[data-side='right']
|
|
627
625
|
) {
|
|
@@ -650,37 +648,37 @@
|
|
|
650
648
|
|
|
651
649
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
652
650
|
@media (prefers-reduced-motion: reduce) {
|
|
653
|
-
[data-ui
|
|
654
|
-
[data-ui
|
|
655
|
-
[data-ui
|
|
656
|
-
[data-ui
|
|
651
|
+
[data-ui-combobox][data-part-positioner],
|
|
652
|
+
[data-ui-combobox][data-part-positioner][data-side='top'],
|
|
653
|
+
[data-ui-combobox][data-part-positioner][data-side='left'],
|
|
654
|
+
[data-ui-combobox][data-part-positioner][data-side='right'] {
|
|
657
655
|
translate: 0 0;
|
|
658
656
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
659
657
|
}
|
|
660
658
|
|
|
661
|
-
[data-ui
|
|
662
|
-
[data-ui
|
|
663
|
-
[data-ui
|
|
664
|
-
[data-ui
|
|
659
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned],
|
|
660
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
661
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
662
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
665
663
|
animation-name: slotted-combobox-fade;
|
|
666
664
|
}
|
|
667
665
|
}
|
|
668
666
|
|
|
669
|
-
[data-ui
|
|
667
|
+
[data-ui-combobox][data-part-positioner][data-detached] {
|
|
670
668
|
visibility: hidden;
|
|
671
669
|
}
|
|
672
670
|
|
|
673
|
-
[data-ui
|
|
671
|
+
[data-ui-combobox][data-part-positioner][data-width='anchor'] {
|
|
674
672
|
inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
675
673
|
}
|
|
676
674
|
|
|
677
|
-
[data-ui
|
|
675
|
+
[data-ui-combobox][data-part-positioner][data-width='content'] {
|
|
678
676
|
inline-size: max-content;
|
|
679
677
|
max-inline-size: min(var(--_measure), var(--slotted-positioner-available-width, 100vw));
|
|
680
678
|
min-inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
681
679
|
}
|
|
682
680
|
|
|
683
|
-
[data-ui
|
|
681
|
+
[data-ui-combobox][data-part-positioner][data-size='sm'] {
|
|
684
682
|
--_item-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
685
683
|
--_item-height: var(--slotted-control-height-sm, 30px);
|
|
686
684
|
--_content-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -689,7 +687,7 @@
|
|
|
689
687
|
--_column-gap: var(--slotted-control-gap-sm, 0.375rem);
|
|
690
688
|
}
|
|
691
689
|
|
|
692
|
-
[data-ui
|
|
690
|
+
[data-ui-combobox][data-part-positioner][data-size='lg'] {
|
|
693
691
|
--_item-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
694
692
|
--_item-height: var(--slotted-control-height-lg, 38px);
|
|
695
693
|
--_content-font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -700,7 +698,7 @@
|
|
|
700
698
|
|
|
701
699
|
/* ── The surface ──────────────────────────────────────────────────────── */
|
|
702
700
|
|
|
703
|
-
[data-ui
|
|
701
|
+
[data-ui-combobox] > [data-part-content] {
|
|
704
702
|
background: var(--_surface);
|
|
705
703
|
border: var(--_border-width) solid var(--_border-color);
|
|
706
704
|
border-radius: var(--_radius);
|
|
@@ -722,19 +720,19 @@
|
|
|
722
720
|
pointer-events: auto;
|
|
723
721
|
}
|
|
724
722
|
|
|
725
|
-
[data-ui
|
|
723
|
+
[data-ui-combobox] > [data-part-content]:focus-visible {
|
|
726
724
|
outline: none;
|
|
727
725
|
}
|
|
728
726
|
|
|
729
727
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
730
728
|
|
|
731
|
-
[data-ui
|
|
729
|
+
[data-ui-combobox] [data-part-group] {
|
|
732
730
|
display: grid;
|
|
733
731
|
grid-column: 1 / -1;
|
|
734
732
|
grid-template-columns: subgrid;
|
|
735
733
|
}
|
|
736
734
|
|
|
737
|
-
[data-ui
|
|
735
|
+
[data-ui-combobox] [data-part-group-label] {
|
|
738
736
|
color: var(--_muted);
|
|
739
737
|
font-size: var(--_secondary-font-size);
|
|
740
738
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -753,12 +751,12 @@
|
|
|
753
751
|
* either beats the user agent's own `[hidden] { display: none }`, because an
|
|
754
752
|
* author rule wins over the user agent sheet.
|
|
755
753
|
*/
|
|
756
|
-
[data-ui
|
|
757
|
-
[data-ui
|
|
754
|
+
[data-ui-combobox] [data-part-item][hidden],
|
|
755
|
+
[data-ui-combobox] [data-part-group][hidden] {
|
|
758
756
|
display: none;
|
|
759
757
|
}
|
|
760
758
|
|
|
761
|
-
[data-ui
|
|
759
|
+
[data-ui-combobox] [data-part-item] {
|
|
762
760
|
align-content: center;
|
|
763
761
|
border-radius: var(--_item-radius);
|
|
764
762
|
box-sizing: border-box;
|
|
@@ -784,7 +782,7 @@
|
|
|
784
782
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
785
783
|
}
|
|
786
784
|
|
|
787
|
-
[data-ui
|
|
785
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
788
786
|
background-color: var(--_highlight);
|
|
789
787
|
/**
|
|
790
788
|
* A ring as well as a ground. Nothing on this surface holds focus — DOM
|
|
@@ -798,11 +796,11 @@
|
|
|
798
796
|
var(--slotted-combobox-highlight-ring, var(--slotted-tone-accent-border));
|
|
799
797
|
}
|
|
800
798
|
|
|
801
|
-
[data-ui
|
|
799
|
+
[data-ui-combobox] [data-part-item]:not([data-disabled]):active {
|
|
802
800
|
background-color: var(--_highlight-active);
|
|
803
801
|
}
|
|
804
802
|
|
|
805
|
-
[data-ui
|
|
803
|
+
[data-ui-combobox] [data-part-item][data-selected] {
|
|
806
804
|
color: var(--_selected-color);
|
|
807
805
|
}
|
|
808
806
|
|
|
@@ -815,21 +813,21 @@
|
|
|
815
813
|
* selection begins and ends. `select` and `combobox` draw the same ground
|
|
816
814
|
* and answer the same way; `selection-block.test.mjs` holds the three to it.
|
|
817
815
|
*/
|
|
818
|
-
[data-ui
|
|
816
|
+
[data-ui-combobox] [data-part-item][data-selected] + [data-part-item][data-selected] {
|
|
819
817
|
border-start-end-radius: 0;
|
|
820
818
|
border-start-start-radius: 0;
|
|
821
819
|
}
|
|
822
820
|
|
|
823
|
-
[data-ui
|
|
821
|
+
[data-ui-combobox] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
|
|
824
822
|
border-end-end-radius: 0;
|
|
825
823
|
border-end-start-radius: 0;
|
|
826
824
|
}
|
|
827
825
|
|
|
828
|
-
[data-ui
|
|
826
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-label] {
|
|
829
827
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
830
828
|
}
|
|
831
829
|
|
|
832
|
-
[data-ui
|
|
830
|
+
[data-ui-combobox] [data-part-item][data-disabled] {
|
|
833
831
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
834
832
|
cursor: not-allowed;
|
|
835
833
|
}
|
|
@@ -855,7 +853,7 @@
|
|
|
855
853
|
* would watch it disappear. A cursor lifts, always. What the row cannot do is
|
|
856
854
|
* said by the ink and by the ring, which both step down to the disabled pair.
|
|
857
855
|
*/
|
|
858
|
-
[data-ui
|
|
856
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
859
857
|
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
860
858
|
var(--slotted-disabled-border, #cbd5e1);
|
|
861
859
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
@@ -863,13 +861,13 @@
|
|
|
863
861
|
|
|
864
862
|
/* ── The cells ────────────────────────────────────────────────────────── */
|
|
865
863
|
|
|
866
|
-
[data-ui
|
|
864
|
+
[data-ui-combobox] :is([data-part-indicator], [data-part-icon]) {
|
|
867
865
|
block-size: 1lh;
|
|
868
866
|
}
|
|
869
867
|
|
|
870
868
|
/* Column one holds content and paints none: a `Glyph` in an `Icon` box, or
|
|
871
869
|
artwork of the consumer's own, centred and sized from the column. */
|
|
872
|
-
[data-ui
|
|
870
|
+
[data-ui-combobox] [data-part-icon] {
|
|
873
871
|
--slotted-icon-size: var(--_content-icon-size);
|
|
874
872
|
|
|
875
873
|
align-items: center;
|
|
@@ -882,7 +880,7 @@
|
|
|
882
880
|
margin-inline-end: var(--_column-gap);
|
|
883
881
|
}
|
|
884
882
|
|
|
885
|
-
[data-ui
|
|
883
|
+
[data-ui-combobox] [data-part-label] {
|
|
886
884
|
grid-column: 2;
|
|
887
885
|
grid-row: 1;
|
|
888
886
|
min-inline-size: 0;
|
|
@@ -906,7 +904,7 @@
|
|
|
906
904
|
* run moved on every keystroke as the filter re-marked the label (CB6).
|
|
907
905
|
*/
|
|
908
906
|
|
|
909
|
-
[data-ui
|
|
907
|
+
[data-ui-combobox] [data-part-description] {
|
|
910
908
|
color: var(--_muted);
|
|
911
909
|
font-size: var(--_secondary-font-size);
|
|
912
910
|
grid-column: 2;
|
|
@@ -916,12 +914,12 @@
|
|
|
916
914
|
overflow-wrap: anywhere;
|
|
917
915
|
}
|
|
918
916
|
|
|
919
|
-
[data-ui
|
|
917
|
+
[data-ui-combobox] [data-part-item][data-disabled] > [data-part-description] {
|
|
920
918
|
color: inherit;
|
|
921
919
|
}
|
|
922
920
|
|
|
923
921
|
/* The tick is a `Glyph` the binding draws, at the content's icon step. */
|
|
924
|
-
[data-ui
|
|
922
|
+
[data-ui-combobox] [data-part-indicator] {
|
|
925
923
|
--slotted-icon-size: var(--_content-icon-size);
|
|
926
924
|
|
|
927
925
|
align-items: center;
|
|
@@ -936,13 +934,13 @@
|
|
|
936
934
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
937
935
|
}
|
|
938
936
|
|
|
939
|
-
[data-ui
|
|
937
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-indicator] {
|
|
940
938
|
opacity: 1;
|
|
941
939
|
}
|
|
942
940
|
|
|
943
941
|
/* ── Separator, empty, status ─────────────────────────────────────────── */
|
|
944
942
|
|
|
945
|
-
[data-ui
|
|
943
|
+
[data-ui-combobox] [data-part-separator] {
|
|
946
944
|
background-color: var(--slotted-combobox-separator-color, var(--_border-color));
|
|
947
945
|
block-size: var(--_border-width);
|
|
948
946
|
border: 0;
|
|
@@ -957,7 +955,7 @@
|
|
|
957
955
|
* when the results land — which is the gap none of the surveyed
|
|
958
956
|
* implementations closes.
|
|
959
957
|
*/
|
|
960
|
-
[data-ui
|
|
958
|
+
[data-ui-combobox] :is([data-part-empty], [data-part-status]) {
|
|
961
959
|
color: var(--_muted);
|
|
962
960
|
/**
|
|
963
961
|
* Its own bidi run, ordered by its own content. "3 results" is a European
|
|
@@ -990,7 +988,7 @@
|
|
|
990
988
|
* often present with nothing to draw. A row with no text takes no space, and
|
|
991
989
|
* a row with text takes the same space as the empty message beside it.
|
|
992
990
|
*/
|
|
993
|
-
[data-ui
|
|
991
|
+
[data-ui-combobox] [data-part-status]:empty {
|
|
994
992
|
display: none;
|
|
995
993
|
}
|
|
996
994
|
|
|
@@ -1003,7 +1001,7 @@
|
|
|
1003
1001
|
* about how a placeholder is painted — and they are hidden from assistive
|
|
1004
1002
|
* technology, because the `status` row beside them is the live region.
|
|
1005
1003
|
*/
|
|
1006
|
-
[data-ui
|
|
1004
|
+
[data-ui-combobox] [data-part-placeholder] {
|
|
1007
1005
|
display: grid;
|
|
1008
1006
|
/* The surface is a grid of option columns; the rows span all of them, as
|
|
1009
1007
|
the status and empty rows do. */
|
|
@@ -1012,23 +1010,23 @@
|
|
|
1012
1010
|
padding-inline: var(--_item-inset);
|
|
1013
1011
|
}
|
|
1014
1012
|
|
|
1015
|
-
[data-ui
|
|
1013
|
+
[data-ui-combobox] [data-part-placeholder] > * {
|
|
1016
1014
|
align-items: center;
|
|
1017
1015
|
display: flex;
|
|
1018
1016
|
min-block-size: var(--_item-height);
|
|
1019
1017
|
}
|
|
1020
1018
|
|
|
1021
|
-
[data-ui
|
|
1019
|
+
[data-ui-combobox] [data-part-placeholder] > [data-ui-skeleton] {
|
|
1022
1020
|
align-self: center;
|
|
1023
1021
|
}
|
|
1024
1022
|
|
|
1025
1023
|
/* Three ragged widths: three identical bars read as a table, and a list of
|
|
1026
1024
|
labels is ragged. */
|
|
1027
|
-
[data-ui
|
|
1025
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
|
|
1028
1026
|
inline-size: 78%;
|
|
1029
1027
|
}
|
|
1030
1028
|
|
|
1031
|
-
[data-ui
|
|
1029
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
|
|
1032
1030
|
inline-size: 56%;
|
|
1033
1031
|
}
|
|
1034
1032
|
|
|
@@ -1039,20 +1037,20 @@
|
|
|
1039
1037
|
* many for one wait (SL6/CB5).
|
|
1040
1038
|
*/
|
|
1041
1039
|
|
|
1042
|
-
[data-ui
|
|
1040
|
+
[data-ui-combobox] > [data-part-content][data-loading] {
|
|
1043
1041
|
cursor: progress;
|
|
1044
1042
|
}
|
|
1045
1043
|
|
|
1046
1044
|
/* ── Forced colours ───────────────────────────────────────────────────── */
|
|
1047
1045
|
|
|
1048
1046
|
@media (forced-colors: active) {
|
|
1049
|
-
[data-ui
|
|
1047
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
1050
1048
|
background-color: Highlight;
|
|
1051
1049
|
color: HighlightText;
|
|
1052
1050
|
forced-color-adjust: none;
|
|
1053
1051
|
}
|
|
1054
1052
|
|
|
1055
|
-
[data-ui
|
|
1053
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
1056
1054
|
background-color: Highlight;
|
|
1057
1055
|
color: GrayText;
|
|
1058
1056
|
}
|