@slotted/styles 0.1.0-beta.7 → 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 +312 -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 +157 -172
- 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
package/src/listbox/listbox.css
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* component; only the surface's own inset, radius and shadow come off the
|
|
47
47
|
* space, radius and shadow scales.
|
|
48
48
|
*/
|
|
49
|
-
[data-ui
|
|
49
|
+
[data-ui-listbox] {
|
|
50
50
|
--_surface: var(--slotted-listbox-surface, var(--slotted-surface, #ffffff));
|
|
51
51
|
--_text: var(--slotted-listbox-text, var(--slotted-text, #0f172a));
|
|
52
52
|
--_muted: var(--slotted-listbox-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
scroll-behavior: auto;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
[data-ui
|
|
129
|
+
[data-ui-listbox][data-size='sm'] {
|
|
130
130
|
--_option-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
131
131
|
--_option-height: var(--slotted-control-height-sm, 30px);
|
|
132
132
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
--_column-gap: var(--slotted-control-gap-sm, 0.375rem);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-listbox][data-size='lg'] {
|
|
139
139
|
--_option-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
140
140
|
--_option-height: var(--slotted-control-height-lg, 38px);
|
|
141
141
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -153,14 +153,14 @@
|
|
|
153
153
|
* and `combobox` render inside their own layer, where the layer already has
|
|
154
154
|
* the edge and a second one would draw a box inside a box.
|
|
155
155
|
*/
|
|
156
|
-
[data-ui
|
|
156
|
+
[data-ui-listbox][data-variant='framed'] {
|
|
157
157
|
background: var(--_surface);
|
|
158
158
|
border: var(--_border-width) solid var(--_border-color);
|
|
159
159
|
border-radius: var(--_radius);
|
|
160
160
|
box-shadow: var(--_shadow);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
[data-ui
|
|
163
|
+
[data-ui-listbox][data-variant='plain'] {
|
|
164
164
|
background: transparent;
|
|
165
165
|
border: 0;
|
|
166
166
|
}
|
|
@@ -171,16 +171,16 @@
|
|
|
171
171
|
* the option, and a second ring around the whole listbox would say the
|
|
172
172
|
* listbox is the thing being operated.
|
|
173
173
|
*/
|
|
174
|
-
[data-ui
|
|
174
|
+
[data-ui-listbox][data-focus-mode='activedescendant']:focus-visible {
|
|
175
175
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, #2563eb);
|
|
176
176
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
[data-ui
|
|
179
|
+
[data-ui-listbox][data-focus-mode='roving']:focus {
|
|
180
180
|
outline: none;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
[data-ui
|
|
183
|
+
[data-ui-listbox][data-invalid] {
|
|
184
184
|
--_border-color: var(--slotted-tone-danger-border);
|
|
185
185
|
--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);
|
|
186
186
|
}
|
|
@@ -189,12 +189,12 @@
|
|
|
189
189
|
is the resting edge's black. An edge inside the border, so nothing moves,
|
|
190
190
|
in place of the resting lift — the one `text-field` draws. Disabled keeps
|
|
191
191
|
its own edge, as it keeps its own border colour. */
|
|
192
|
-
[data-ui
|
|
192
|
+
[data-ui-listbox][data-invalid]:not([data-disabled]) {
|
|
193
193
|
--_invalid-edge-width: var(--slotted-control-invalid-edge-width, 1px);
|
|
194
194
|
--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
[data-ui
|
|
197
|
+
[data-ui-listbox][data-disabled] {
|
|
198
198
|
--_surface: var(--slotted-disabled-background, #e2e8f0);
|
|
199
199
|
--_text: var(--slotted-disabled-foreground, #64748b);
|
|
200
200
|
--_border-color: var(--slotted-disabled-border, #cbd5e1);
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
cursor: not-allowed;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
[data-ui
|
|
205
|
+
[data-ui-listbox][data-loading] {
|
|
206
206
|
cursor: progress;
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -215,18 +215,18 @@
|
|
|
215
215
|
* a layout read during a key press; here the number is stated, the arrows
|
|
216
216
|
* step by it, and the picture and the keyboard cannot disagree.
|
|
217
217
|
*/
|
|
218
|
-
[data-ui
|
|
218
|
+
[data-ui-listbox][data-layout='grid'] {
|
|
219
219
|
column-gap: var(--_column-gap);
|
|
220
220
|
grid-template-columns: repeat(var(--_columns), minmax(0, 1fr));
|
|
221
221
|
max-block-size: none;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
[data-ui
|
|
224
|
+
[data-ui-listbox][data-layout='grid'] [data-part-option] {
|
|
225
225
|
grid-column: auto;
|
|
226
226
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
[data-ui
|
|
229
|
+
[data-ui-listbox][data-layout='grid'] :is([data-part-group], [data-part-canvas]) {
|
|
230
230
|
grid-template-columns: repeat(var(--_columns), minmax(0, 1fr));
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
* is one row tall — and the scroll turns with it, so `dir="rtl"` reverses the
|
|
236
236
|
* whole thing without a rule of its own.
|
|
237
237
|
*/
|
|
238
|
-
[data-ui
|
|
238
|
+
[data-ui-listbox][data-orientation='horizontal'] {
|
|
239
239
|
display: flex;
|
|
240
240
|
flex-direction: row;
|
|
241
241
|
max-block-size: none;
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
overflow-y: hidden;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
[data-ui
|
|
246
|
+
[data-ui-listbox][data-orientation='horizontal'] [data-part-option] {
|
|
247
247
|
flex: 0 0 auto;
|
|
248
248
|
grid-template-columns: auto auto auto;
|
|
249
249
|
}
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
* generic element between a `listbox` and its `option`s is an owned element
|
|
263
263
|
* with no permitted role, and the role is what makes it transparent.
|
|
264
264
|
*/
|
|
265
|
-
[data-ui
|
|
265
|
+
[data-ui-listbox] > [data-part-canvas] {
|
|
266
266
|
/**
|
|
267
267
|
* `align-content: start` and `grid-auto-rows: min-content` together, and
|
|
268
268
|
* neither is optional: a grid with a definite block size and automatic rows
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
* because the reader scrolled it out and moving it back would take the
|
|
292
292
|
* scrollbar away from them.
|
|
293
293
|
*/
|
|
294
|
-
[data-ui
|
|
294
|
+
[data-ui-listbox] [data-part-option][data-pinned] {
|
|
295
295
|
/* Out of flow, so out of the subgrid: it states the three columns itself.
|
|
296
296
|
They are the option's own rather than the listbox's, which is the price
|
|
297
297
|
of rendering a row the window does not reach. */
|
|
@@ -302,13 +302,13 @@
|
|
|
302
302
|
|
|
303
303
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
304
304
|
|
|
305
|
-
[data-ui
|
|
305
|
+
[data-ui-listbox] [data-part-group] {
|
|
306
306
|
display: grid;
|
|
307
307
|
grid-column: 1 / -1;
|
|
308
308
|
grid-template-columns: subgrid;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
[data-ui
|
|
311
|
+
[data-ui-listbox] [data-part-group-label] {
|
|
312
312
|
color: var(--_muted);
|
|
313
313
|
font-size: var(--_secondary-font-size);
|
|
314
314
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
* element: ARIA 1.2 lets a `listbox` own `option` and `group` and nothing
|
|
324
324
|
* else, so an `hr` inside one is an owned element with no permitted role.
|
|
325
325
|
*/
|
|
326
|
-
[data-ui
|
|
326
|
+
[data-ui-listbox] [data-part-group] + [data-part-group] {
|
|
327
327
|
border-block-start: var(--_border-width) solid
|
|
328
328
|
var(--slotted-listbox-group-border-color, var(--slotted-border-subtle, #e2e8f0));
|
|
329
329
|
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
|
|
333
333
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
334
334
|
|
|
335
|
-
[data-ui
|
|
335
|
+
[data-ui-listbox] [data-part-option] {
|
|
336
336
|
align-content: center;
|
|
337
337
|
background: transparent;
|
|
338
338
|
border-radius: var(--_option-radius);
|
|
@@ -369,11 +369,11 @@
|
|
|
369
369
|
* highlight, and a hover that moved the highlight would fight the arrow keys
|
|
370
370
|
* a reader is holding down.
|
|
371
371
|
*/
|
|
372
|
-
[data-ui
|
|
372
|
+
[data-ui-listbox]:not([data-disabled]) [data-part-option]:not([data-disabled]):hover {
|
|
373
373
|
background-color: var(--_highlight);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
[data-ui
|
|
376
|
+
[data-ui-listbox]:not([data-disabled]) [data-part-option]:not([data-disabled]):active {
|
|
377
377
|
background-color: var(--_highlight-active);
|
|
378
378
|
}
|
|
379
379
|
|
|
@@ -387,8 +387,8 @@
|
|
|
387
387
|
* legitimately be elsewhere — a `combobox` keeps it in its own text field and
|
|
388
388
|
* this ground is then the only thing that says which option is live.
|
|
389
389
|
*/
|
|
390
|
-
[data-ui
|
|
391
|
-
[data-ui
|
|
390
|
+
[data-ui-listbox][data-focus-mode='roving']:focus-within [data-part-option][data-current],
|
|
391
|
+
[data-ui-listbox][data-focus-mode='activedescendant'] [data-part-option][data-current] {
|
|
392
392
|
background-color: var(--_highlight);
|
|
393
393
|
}
|
|
394
394
|
|
|
@@ -405,12 +405,12 @@
|
|
|
405
405
|
* colours replace its paint on their own, where a pseudo-element's border
|
|
406
406
|
* would be decoration the theme cannot reach.
|
|
407
407
|
*/
|
|
408
|
-
[data-ui
|
|
408
|
+
[data-ui-listbox]:focus-within [data-part-option][data-current] {
|
|
409
409
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, #2563eb);
|
|
410
410
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
[data-ui
|
|
413
|
+
[data-ui-listbox] [data-part-option]:focus {
|
|
414
414
|
outline: none;
|
|
415
415
|
}
|
|
416
416
|
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
* it once; a rail for state is out of the system (R1), and the `indicator`
|
|
425
425
|
* below is the mark that carries it instead.
|
|
426
426
|
*/
|
|
427
|
-
[data-ui
|
|
427
|
+
[data-ui-listbox] [data-part-option][data-selected] {
|
|
428
428
|
background-color: var(--_selected-surface);
|
|
429
429
|
color: var(--_selected-text);
|
|
430
430
|
}
|
|
@@ -438,24 +438,23 @@
|
|
|
438
438
|
* selection begins and ends. `select` and `combobox` draw the same ground
|
|
439
439
|
* and answer the same way; `selection-block.test.mjs` holds the three to it.
|
|
440
440
|
*/
|
|
441
|
-
[data-ui
|
|
441
|
+
[data-ui-listbox] [data-part-option][data-selected] + [data-part-option][data-selected] {
|
|
442
442
|
border-start-end-radius: 0;
|
|
443
443
|
border-start-start-radius: 0;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
[data-ui
|
|
447
|
-
[data-part='option'][data-selected]:has(+ [data-part='option'][data-selected]) {
|
|
446
|
+
[data-ui-listbox] [data-part-option][data-selected]:has(+ [data-part-option][data-selected]) {
|
|
448
447
|
border-end-end-radius: 0;
|
|
449
448
|
border-end-start-radius: 0;
|
|
450
449
|
}
|
|
451
450
|
|
|
452
|
-
[data-ui
|
|
453
|
-
[data-part
|
|
451
|
+
[data-ui-listbox]:not([data-disabled])
|
|
452
|
+
[data-part-option][data-selected]:not([data-disabled]):hover {
|
|
454
453
|
background-color: var(--slotted-tone-accent-subtle-hover);
|
|
455
454
|
}
|
|
456
455
|
|
|
457
|
-
[data-ui
|
|
458
|
-
[data-part
|
|
456
|
+
[data-ui-listbox]:not([data-disabled])
|
|
457
|
+
[data-part-option][data-selected]:not([data-disabled]):active {
|
|
459
458
|
background-color: var(--slotted-tone-accent-subtle-active);
|
|
460
459
|
}
|
|
461
460
|
|
|
@@ -465,7 +464,7 @@
|
|
|
465
464
|
* control cannot do. It therefore has to answer the highlight with something,
|
|
466
465
|
* and answer it more quietly than an option that would do anything.
|
|
467
466
|
*/
|
|
468
|
-
[data-ui
|
|
467
|
+
[data-ui-listbox] [data-part-option][data-disabled] {
|
|
469
468
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
470
469
|
cursor: not-allowed;
|
|
471
470
|
}
|
|
@@ -475,12 +474,12 @@
|
|
|
475
474
|
* The mark stays drawn — the reader still needs to know which option was
|
|
476
475
|
* chosen — and the ground stops claiming the option is theirs to change.
|
|
477
476
|
*/
|
|
478
|
-
[data-ui
|
|
477
|
+
[data-ui-listbox] [data-part-option][data-disabled]:is([data-selected], [data-current]) {
|
|
479
478
|
background-color: var(--slotted-disabled-background, #e2e8f0);
|
|
480
479
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
481
480
|
}
|
|
482
481
|
|
|
483
|
-
[data-ui
|
|
482
|
+
[data-ui-listbox][data-readonly] [data-part-option] {
|
|
484
483
|
cursor: default;
|
|
485
484
|
}
|
|
486
485
|
|
|
@@ -491,7 +490,7 @@
|
|
|
491
490
|
* labels up: the mark's box exists whether or not the mark is drawn, so a
|
|
492
491
|
* list of options does not shift by sixteen pixels as one is chosen.
|
|
493
492
|
*/
|
|
494
|
-
[data-ui
|
|
493
|
+
[data-ui-listbox] :is([data-part-indicator], [data-part-icon]) {
|
|
495
494
|
/* One line box tall, so a mark beside a label that wrapped onto three lines
|
|
496
495
|
sits on the first of them rather than in the middle of the option. */
|
|
497
496
|
block-size: 1lh;
|
|
@@ -507,7 +506,7 @@
|
|
|
507
506
|
* an `icon` box, sized here to the column so the mark and a consumer's icon
|
|
508
507
|
* in the same column are one size.
|
|
509
508
|
*/
|
|
510
|
-
[data-ui
|
|
509
|
+
[data-ui-listbox] [data-part-indicator] {
|
|
511
510
|
--slotted-icon-size: var(--_icon-size);
|
|
512
511
|
|
|
513
512
|
align-items: center;
|
|
@@ -517,7 +516,7 @@
|
|
|
517
516
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
518
517
|
}
|
|
519
518
|
|
|
520
|
-
[data-ui
|
|
519
|
+
[data-ui-listbox] [data-part-option][data-selected] > [data-part-indicator] {
|
|
521
520
|
opacity: 1;
|
|
522
521
|
}
|
|
523
522
|
|
|
@@ -526,7 +525,7 @@
|
|
|
526
525
|
* paints none: a `Glyph` in an `Icon` box, or an element of the consumer's
|
|
527
526
|
* own, centred and sized from the column, as the tick is.
|
|
528
527
|
*/
|
|
529
|
-
[data-ui
|
|
528
|
+
[data-ui-listbox] [data-part-icon] {
|
|
530
529
|
--slotted-icon-size: var(--_icon-size);
|
|
531
530
|
|
|
532
531
|
align-items: center;
|
|
@@ -535,14 +534,14 @@
|
|
|
535
534
|
}
|
|
536
535
|
|
|
537
536
|
/* Column two, and the only column that gives way. */
|
|
538
|
-
[data-ui
|
|
537
|
+
[data-ui-listbox] [data-part-label] {
|
|
539
538
|
grid-column: 2;
|
|
540
539
|
grid-row: 1;
|
|
541
540
|
min-inline-size: 0;
|
|
542
541
|
overflow-wrap: anywhere;
|
|
543
542
|
}
|
|
544
543
|
|
|
545
|
-
[data-ui
|
|
544
|
+
[data-ui-listbox] [data-part-description] {
|
|
546
545
|
color: var(--_muted);
|
|
547
546
|
font-size: var(--_secondary-font-size);
|
|
548
547
|
grid-column: 2;
|
|
@@ -552,9 +551,9 @@
|
|
|
552
551
|
overflow-wrap: anywhere;
|
|
553
552
|
}
|
|
554
553
|
|
|
555
|
-
[data-ui
|
|
556
|
-
[data-part
|
|
557
|
-
> [data-part
|
|
554
|
+
[data-ui-listbox]
|
|
555
|
+
[data-part-option]:is([data-disabled], [data-selected])
|
|
556
|
+
> [data-part-description] {
|
|
558
557
|
color: inherit;
|
|
559
558
|
}
|
|
560
559
|
|
|
@@ -565,7 +564,7 @@
|
|
|
565
564
|
* library. Never narrower than its own content, so a long label wraps in
|
|
566
565
|
* column two rather than pushing the value off the surface.
|
|
567
566
|
*/
|
|
568
|
-
[data-ui
|
|
567
|
+
[data-ui-listbox] [data-part-meta] {
|
|
569
568
|
color: var(--_muted);
|
|
570
569
|
font-variant-numeric: tabular-nums;
|
|
571
570
|
grid-column: 3;
|
|
@@ -575,9 +574,7 @@
|
|
|
575
574
|
white-space: nowrap;
|
|
576
575
|
}
|
|
577
576
|
|
|
578
|
-
[data-ui
|
|
579
|
-
[data-part='option']:is([data-disabled], [data-selected])
|
|
580
|
-
> [data-part='meta'] {
|
|
577
|
+
[data-ui-listbox] [data-part-option]:is([data-disabled], [data-selected]) > [data-part-meta] {
|
|
581
578
|
color: inherit;
|
|
582
579
|
}
|
|
583
580
|
|
|
@@ -589,7 +586,7 @@
|
|
|
589
586
|
* all. The message lives inside the listbox: outside it the reader hears
|
|
590
587
|
* "listbox, 0 items" and then nothing.
|
|
591
588
|
*/
|
|
592
|
-
[data-ui
|
|
589
|
+
[data-ui-listbox] :is([data-part-empty], [data-part-loader]) {
|
|
593
590
|
align-content: center;
|
|
594
591
|
color: var(--_muted);
|
|
595
592
|
display: grid;
|
|
@@ -605,7 +602,7 @@
|
|
|
605
602
|
* role — a listbox owns nothing else — so it carries the same geometry and
|
|
606
603
|
* says what it is with a pulse rather than with a second element.
|
|
607
604
|
*/
|
|
608
|
-
[data-ui
|
|
605
|
+
[data-ui-listbox] [data-part-loader] {
|
|
609
606
|
animation: slotted-listbox-loader var(--slotted-duration-loop) ease-in-out infinite;
|
|
610
607
|
}
|
|
611
608
|
|
|
@@ -626,7 +623,7 @@
|
|
|
626
623
|
* the rest of the motion scale.
|
|
627
624
|
*/
|
|
628
625
|
@media (prefers-reduced-motion: reduce) {
|
|
629
|
-
[data-ui
|
|
626
|
+
[data-ui-listbox] [data-part-loader] {
|
|
630
627
|
animation: none;
|
|
631
628
|
opacity: 0.7;
|
|
632
629
|
}
|
|
@@ -641,13 +638,13 @@
|
|
|
641
638
|
* leave a reader unable to tell what they have chosen from what they are on.
|
|
642
639
|
*/
|
|
643
640
|
@media (forced-colors: active) {
|
|
644
|
-
[data-ui
|
|
641
|
+
[data-ui-listbox] [data-part-option][data-selected] {
|
|
645
642
|
background-color: Highlight;
|
|
646
643
|
color: HighlightText;
|
|
647
644
|
forced-color-adjust: none;
|
|
648
645
|
}
|
|
649
646
|
|
|
650
|
-
[data-ui
|
|
647
|
+
[data-ui-listbox] [data-part-option][data-disabled] {
|
|
651
648
|
color: GrayText;
|
|
652
649
|
}
|
|
653
650
|
}
|
|
@@ -658,12 +655,12 @@
|
|
|
658
655
|
* on the same box an invalid ring is double, which a valid one is not.
|
|
659
656
|
*/
|
|
660
657
|
@media (forced-colors: active) {
|
|
661
|
-
[data-ui
|
|
658
|
+
[data-ui-listbox][data-variant='framed'][data-invalid]:not([data-disabled]) {
|
|
662
659
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
663
660
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
664
661
|
}
|
|
665
662
|
|
|
666
|
-
[data-ui
|
|
663
|
+
[data-ui-listbox][data-variant='framed'][data-invalid]:not(
|
|
667
664
|
[data-disabled]
|
|
668
665
|
)[data-focus-mode='activedescendant']:focus-visible {
|
|
669
666
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|