@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
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 +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- 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 +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
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));
|
|
@@ -78,7 +78,11 @@
|
|
|
78
78
|
--_inset-inline: var(--slotted-listbox-padding-inline, var(--slotted-space-2, 0.25rem));
|
|
79
79
|
--_option-inset: var(--slotted-control-padding-inline-md, 0.8125rem);
|
|
80
80
|
--_option-height: var(--slotted-control-height-md, 34px);
|
|
81
|
-
|
|
81
|
+
/* Concentric with the panel: its radius less the inset, floored at 0. */
|
|
82
|
+
--_option-radius: var(
|
|
83
|
+
--slotted-listbox-option-radius,
|
|
84
|
+
max(0px, calc(var(--_radius) - var(--_inset-inline)))
|
|
85
|
+
);
|
|
82
86
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
83
87
|
--_secondary-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
84
88
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
@@ -126,7 +130,7 @@
|
|
|
126
130
|
scroll-behavior: auto;
|
|
127
131
|
}
|
|
128
132
|
|
|
129
|
-
[data-ui
|
|
133
|
+
[data-ui-listbox][data-size='sm'] {
|
|
130
134
|
--_option-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
131
135
|
--_option-height: var(--slotted-control-height-sm, 30px);
|
|
132
136
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -135,7 +139,7 @@
|
|
|
135
139
|
--_column-gap: var(--slotted-control-gap-sm, 0.375rem);
|
|
136
140
|
}
|
|
137
141
|
|
|
138
|
-
[data-ui
|
|
142
|
+
[data-ui-listbox][data-size='lg'] {
|
|
139
143
|
--_option-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
140
144
|
--_option-height: var(--slotted-control-height-lg, 38px);
|
|
141
145
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -149,18 +153,18 @@
|
|
|
149
153
|
/**
|
|
150
154
|
* `framed` is the standalone control: a box with an edge, which is what
|
|
151
155
|
* `<select multiple>` looks like and what a listbox presented on its own has
|
|
152
|
-
* to look like to be
|
|
156
|
+
* to look like to be recognized as a control at all. `plain` is what `select`
|
|
153
157
|
* and `combobox` render inside their own layer, where the layer already has
|
|
154
158
|
* the edge and a second one would draw a box inside a box.
|
|
155
159
|
*/
|
|
156
|
-
[data-ui
|
|
160
|
+
[data-ui-listbox][data-variant='framed'] {
|
|
157
161
|
background: var(--_surface);
|
|
158
162
|
border: var(--_border-width) solid var(--_border-color);
|
|
159
163
|
border-radius: var(--_radius);
|
|
160
164
|
box-shadow: var(--_shadow);
|
|
161
165
|
}
|
|
162
166
|
|
|
163
|
-
[data-ui
|
|
167
|
+
[data-ui-listbox][data-variant='plain'] {
|
|
164
168
|
background: transparent;
|
|
165
169
|
border: 0;
|
|
166
170
|
}
|
|
@@ -171,30 +175,30 @@
|
|
|
171
175
|
* the option, and a second ring around the whole listbox would say the
|
|
172
176
|
* listbox is the thing being operated.
|
|
173
177
|
*/
|
|
174
|
-
[data-ui
|
|
178
|
+
[data-ui-listbox][data-focus-mode='activedescendant']:focus-visible {
|
|
175
179
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, #2563eb);
|
|
176
180
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
[data-ui
|
|
183
|
+
[data-ui-listbox][data-focus-mode='roving']:focus {
|
|
180
184
|
outline: none;
|
|
181
185
|
}
|
|
182
186
|
|
|
183
|
-
[data-ui
|
|
187
|
+
[data-ui-listbox][data-invalid] {
|
|
184
188
|
--_border-color: var(--slotted-tone-danger-border);
|
|
185
189
|
--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);
|
|
186
190
|
}
|
|
187
191
|
|
|
188
|
-
/* Width as well as
|
|
192
|
+
/* Width as well as color (WCAG 1.4.1): in `high-contrast` the danger border
|
|
189
193
|
is the resting edge's black. An edge inside the border, so nothing moves,
|
|
190
194
|
in place of the resting lift — the one `text-field` draws. Disabled keeps
|
|
191
|
-
its own edge, as it keeps its own border
|
|
192
|
-
[data-ui
|
|
195
|
+
its own edge, as it keeps its own border color. */
|
|
196
|
+
[data-ui-listbox][data-invalid]:not([data-disabled]) {
|
|
193
197
|
--_invalid-edge-width: var(--slotted-control-invalid-edge-width, 1px);
|
|
194
198
|
--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border);
|
|
195
199
|
}
|
|
196
200
|
|
|
197
|
-
[data-ui
|
|
201
|
+
[data-ui-listbox][data-disabled] {
|
|
198
202
|
--_surface: var(--slotted-disabled-background, #e2e8f0);
|
|
199
203
|
--_text: var(--slotted-disabled-foreground, #64748b);
|
|
200
204
|
--_border-color: var(--slotted-disabled-border, #cbd5e1);
|
|
@@ -202,7 +206,7 @@
|
|
|
202
206
|
cursor: not-allowed;
|
|
203
207
|
}
|
|
204
208
|
|
|
205
|
-
[data-ui
|
|
209
|
+
[data-ui-listbox][data-loading] {
|
|
206
210
|
cursor: progress;
|
|
207
211
|
}
|
|
208
212
|
|
|
@@ -215,18 +219,18 @@
|
|
|
215
219
|
* a layout read during a key press; here the number is stated, the arrows
|
|
216
220
|
* step by it, and the picture and the keyboard cannot disagree.
|
|
217
221
|
*/
|
|
218
|
-
[data-ui
|
|
222
|
+
[data-ui-listbox][data-layout='grid'] {
|
|
219
223
|
column-gap: var(--_column-gap);
|
|
220
224
|
grid-template-columns: repeat(var(--_columns), minmax(0, 1fr));
|
|
221
225
|
max-block-size: none;
|
|
222
226
|
}
|
|
223
227
|
|
|
224
|
-
[data-ui
|
|
228
|
+
[data-ui-listbox][data-layout='grid'] [data-part-option] {
|
|
225
229
|
grid-column: auto;
|
|
226
230
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
|
-
[data-ui
|
|
233
|
+
[data-ui-listbox][data-layout='grid'] :is([data-part-group], [data-part-canvas]) {
|
|
230
234
|
grid-template-columns: repeat(var(--_columns), minmax(0, 1fr));
|
|
231
235
|
}
|
|
232
236
|
|
|
@@ -235,7 +239,7 @@
|
|
|
235
239
|
* is one row tall — and the scroll turns with it, so `dir="rtl"` reverses the
|
|
236
240
|
* whole thing without a rule of its own.
|
|
237
241
|
*/
|
|
238
|
-
[data-ui
|
|
242
|
+
[data-ui-listbox][data-orientation='horizontal'] {
|
|
239
243
|
display: flex;
|
|
240
244
|
flex-direction: row;
|
|
241
245
|
max-block-size: none;
|
|
@@ -243,7 +247,7 @@
|
|
|
243
247
|
overflow-y: hidden;
|
|
244
248
|
}
|
|
245
249
|
|
|
246
|
-
[data-ui
|
|
250
|
+
[data-ui-listbox][data-orientation='horizontal'] [data-part-option] {
|
|
247
251
|
flex: 0 0 auto;
|
|
248
252
|
grid-template-columns: auto auto auto;
|
|
249
253
|
}
|
|
@@ -262,7 +266,7 @@
|
|
|
262
266
|
* generic element between a `listbox` and its `option`s is an owned element
|
|
263
267
|
* with no permitted role, and the role is what makes it transparent.
|
|
264
268
|
*/
|
|
265
|
-
[data-ui
|
|
269
|
+
[data-ui-listbox] > [data-part-canvas] {
|
|
266
270
|
/**
|
|
267
271
|
* `align-content: start` and `grid-auto-rows: min-content` together, and
|
|
268
272
|
* neither is optional: a grid with a definite block size and automatic rows
|
|
@@ -291,7 +295,7 @@
|
|
|
291
295
|
* because the reader scrolled it out and moving it back would take the
|
|
292
296
|
* scrollbar away from them.
|
|
293
297
|
*/
|
|
294
|
-
[data-ui
|
|
298
|
+
[data-ui-listbox] [data-part-option][data-pinned] {
|
|
295
299
|
/* Out of flow, so out of the subgrid: it states the three columns itself.
|
|
296
300
|
They are the option's own rather than the listbox's, which is the price
|
|
297
301
|
of rendering a row the window does not reach. */
|
|
@@ -302,13 +306,13 @@
|
|
|
302
306
|
|
|
303
307
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
304
308
|
|
|
305
|
-
[data-ui
|
|
309
|
+
[data-ui-listbox] [data-part-group] {
|
|
306
310
|
display: grid;
|
|
307
311
|
grid-column: 1 / -1;
|
|
308
312
|
grid-template-columns: subgrid;
|
|
309
313
|
}
|
|
310
314
|
|
|
311
|
-
[data-ui
|
|
315
|
+
[data-ui-listbox] [data-part-group-label] {
|
|
312
316
|
color: var(--_muted);
|
|
313
317
|
font-size: var(--_secondary-font-size);
|
|
314
318
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -323,7 +327,7 @@
|
|
|
323
327
|
* element: ARIA 1.2 lets a `listbox` own `option` and `group` and nothing
|
|
324
328
|
* else, so an `hr` inside one is an owned element with no permitted role.
|
|
325
329
|
*/
|
|
326
|
-
[data-ui
|
|
330
|
+
[data-ui-listbox] [data-part-group] + [data-part-group] {
|
|
327
331
|
border-block-start: var(--_border-width) solid
|
|
328
332
|
var(--slotted-listbox-group-border-color, var(--slotted-border-subtle, #e2e8f0));
|
|
329
333
|
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
@@ -332,7 +336,7 @@
|
|
|
332
336
|
|
|
333
337
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
334
338
|
|
|
335
|
-
[data-ui
|
|
339
|
+
[data-ui-listbox] [data-part-option] {
|
|
336
340
|
align-content: center;
|
|
337
341
|
background: transparent;
|
|
338
342
|
border-radius: var(--_option-radius);
|
|
@@ -369,11 +373,11 @@
|
|
|
369
373
|
* highlight, and a hover that moved the highlight would fight the arrow keys
|
|
370
374
|
* a reader is holding down.
|
|
371
375
|
*/
|
|
372
|
-
[data-ui
|
|
376
|
+
[data-ui-listbox]:not([data-disabled]) [data-part-option]:not([data-disabled]):hover {
|
|
373
377
|
background-color: var(--_highlight);
|
|
374
378
|
}
|
|
375
379
|
|
|
376
|
-
[data-ui
|
|
380
|
+
[data-ui-listbox]:not([data-disabled]) [data-part-option]:not([data-disabled]):active {
|
|
377
381
|
background-color: var(--_highlight-active);
|
|
378
382
|
}
|
|
379
383
|
|
|
@@ -387,8 +391,8 @@
|
|
|
387
391
|
* legitimately be elsewhere — a `combobox` keeps it in its own text field and
|
|
388
392
|
* this ground is then the only thing that says which option is live.
|
|
389
393
|
*/
|
|
390
|
-
[data-ui
|
|
391
|
-
[data-ui
|
|
394
|
+
[data-ui-listbox][data-focus-mode='roving']:focus-within [data-part-option][data-current],
|
|
395
|
+
[data-ui-listbox][data-focus-mode='activedescendant'] [data-part-option][data-current] {
|
|
392
396
|
background-color: var(--_highlight);
|
|
393
397
|
}
|
|
394
398
|
|
|
@@ -402,15 +406,15 @@
|
|
|
402
406
|
*
|
|
403
407
|
* An inset `outline` rather than a `::after` border: an outline follows the
|
|
404
408
|
* option's own radius without a second radius to keep in step, and forced
|
|
405
|
-
*
|
|
409
|
+
* colors replace its paint on their own, where a pseudo-element's border
|
|
406
410
|
* would be decoration the theme cannot reach.
|
|
407
411
|
*/
|
|
408
|
-
[data-ui
|
|
412
|
+
[data-ui-listbox]:focus-within [data-part-option][data-current] {
|
|
409
413
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, #2563eb);
|
|
410
414
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
411
415
|
}
|
|
412
416
|
|
|
413
|
-
[data-ui
|
|
417
|
+
[data-ui-listbox] [data-part-option]:focus {
|
|
414
418
|
outline: none;
|
|
415
419
|
}
|
|
416
420
|
|
|
@@ -418,13 +422,13 @@
|
|
|
418
422
|
* What the reader chose. The ground says it at a glance, the ink says it
|
|
419
423
|
* again, and the mark says it where neither can: in the `high-contrast`
|
|
420
424
|
* scheme the accent surface *is* the plain surface, and every tone surface
|
|
421
|
-
* becomes `Canvas` under forced
|
|
425
|
+
* becomes `Canvas` under forced colors, so a selection painted with a fill
|
|
422
426
|
* alone disappears in the mode that needs it most — the same failure WCAG
|
|
423
|
-
* 2.2 SC 1.4.1 describes for
|
|
427
|
+
* 2.2 SC 1.4.1 describes for color on its own. A bar on the start edge said
|
|
424
428
|
* it once; a rail for state is out of the system (R1), and the `indicator`
|
|
425
429
|
* below is the mark that carries it instead.
|
|
426
430
|
*/
|
|
427
|
-
[data-ui
|
|
431
|
+
[data-ui-listbox] [data-part-option][data-selected] {
|
|
428
432
|
background-color: var(--_selected-surface);
|
|
429
433
|
color: var(--_selected-text);
|
|
430
434
|
}
|
|
@@ -438,24 +442,23 @@
|
|
|
438
442
|
* selection begins and ends. `select` and `combobox` draw the same ground
|
|
439
443
|
* and answer the same way; `selection-block.test.mjs` holds the three to it.
|
|
440
444
|
*/
|
|
441
|
-
[data-ui
|
|
445
|
+
[data-ui-listbox] [data-part-option][data-selected] + [data-part-option][data-selected] {
|
|
442
446
|
border-start-end-radius: 0;
|
|
443
447
|
border-start-start-radius: 0;
|
|
444
448
|
}
|
|
445
449
|
|
|
446
|
-
[data-ui
|
|
447
|
-
[data-part='option'][data-selected]:has(+ [data-part='option'][data-selected]) {
|
|
450
|
+
[data-ui-listbox] [data-part-option][data-selected]:has(+ [data-part-option][data-selected]) {
|
|
448
451
|
border-end-end-radius: 0;
|
|
449
452
|
border-end-start-radius: 0;
|
|
450
453
|
}
|
|
451
454
|
|
|
452
|
-
[data-ui
|
|
453
|
-
[data-part
|
|
455
|
+
[data-ui-listbox]:not([data-disabled])
|
|
456
|
+
[data-part-option][data-selected]:not([data-disabled]):hover {
|
|
454
457
|
background-color: var(--slotted-tone-accent-subtle-hover);
|
|
455
458
|
}
|
|
456
459
|
|
|
457
|
-
[data-ui
|
|
458
|
-
[data-part
|
|
460
|
+
[data-ui-listbox]:not([data-disabled])
|
|
461
|
+
[data-part-option][data-selected]:not([data-disabled]):active {
|
|
459
462
|
background-color: var(--slotted-tone-accent-subtle-active);
|
|
460
463
|
}
|
|
461
464
|
|
|
@@ -465,7 +468,7 @@
|
|
|
465
468
|
* control cannot do. It therefore has to answer the highlight with something,
|
|
466
469
|
* and answer it more quietly than an option that would do anything.
|
|
467
470
|
*/
|
|
468
|
-
[data-ui
|
|
471
|
+
[data-ui-listbox] [data-part-option][data-disabled] {
|
|
469
472
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
470
473
|
cursor: not-allowed;
|
|
471
474
|
}
|
|
@@ -475,12 +478,12 @@
|
|
|
475
478
|
* The mark stays drawn — the reader still needs to know which option was
|
|
476
479
|
* chosen — and the ground stops claiming the option is theirs to change.
|
|
477
480
|
*/
|
|
478
|
-
[data-ui
|
|
481
|
+
[data-ui-listbox] [data-part-option][data-disabled]:is([data-selected], [data-current]) {
|
|
479
482
|
background-color: var(--slotted-disabled-background, #e2e8f0);
|
|
480
483
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
481
484
|
}
|
|
482
485
|
|
|
483
|
-
[data-ui
|
|
486
|
+
[data-ui-listbox][data-readonly] [data-part-option] {
|
|
484
487
|
cursor: default;
|
|
485
488
|
}
|
|
486
489
|
|
|
@@ -491,7 +494,7 @@
|
|
|
491
494
|
* labels up: the mark's box exists whether or not the mark is drawn, so a
|
|
492
495
|
* list of options does not shift by sixteen pixels as one is chosen.
|
|
493
496
|
*/
|
|
494
|
-
[data-ui
|
|
497
|
+
[data-ui-listbox] :is([data-part-indicator], [data-part-icon]) {
|
|
495
498
|
/* One line box tall, so a mark beside a label that wrapped onto three lines
|
|
496
499
|
sits on the first of them rather than in the middle of the option. */
|
|
497
500
|
block-size: 1lh;
|
|
@@ -507,7 +510,7 @@
|
|
|
507
510
|
* an `icon` box, sized here to the column so the mark and a consumer's icon
|
|
508
511
|
* in the same column are one size.
|
|
509
512
|
*/
|
|
510
|
-
[data-ui
|
|
513
|
+
[data-ui-listbox] [data-part-indicator] {
|
|
511
514
|
--slotted-icon-size: var(--_icon-size);
|
|
512
515
|
|
|
513
516
|
align-items: center;
|
|
@@ -517,16 +520,16 @@
|
|
|
517
520
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
518
521
|
}
|
|
519
522
|
|
|
520
|
-
[data-ui
|
|
523
|
+
[data-ui-listbox] [data-part-option][data-selected] > [data-part-indicator] {
|
|
521
524
|
opacity: 1;
|
|
522
525
|
}
|
|
523
526
|
|
|
524
527
|
/**
|
|
525
528
|
* The option's own artwork, in the mark column. The box holds content and
|
|
526
529
|
* paints none: a `Glyph` in an `Icon` box, or an element of the consumer's
|
|
527
|
-
* own,
|
|
530
|
+
* own, centerd and sized from the column, as the tick is.
|
|
528
531
|
*/
|
|
529
|
-
[data-ui
|
|
532
|
+
[data-ui-listbox] [data-part-icon] {
|
|
530
533
|
--slotted-icon-size: var(--_icon-size);
|
|
531
534
|
|
|
532
535
|
align-items: center;
|
|
@@ -535,14 +538,14 @@
|
|
|
535
538
|
}
|
|
536
539
|
|
|
537
540
|
/* Column two, and the only column that gives way. */
|
|
538
|
-
[data-ui
|
|
541
|
+
[data-ui-listbox] [data-part-label] {
|
|
539
542
|
grid-column: 2;
|
|
540
543
|
grid-row: 1;
|
|
541
544
|
min-inline-size: 0;
|
|
542
545
|
overflow-wrap: anywhere;
|
|
543
546
|
}
|
|
544
547
|
|
|
545
|
-
[data-ui
|
|
548
|
+
[data-ui-listbox] [data-part-description] {
|
|
546
549
|
color: var(--_muted);
|
|
547
550
|
font-size: var(--_secondary-font-size);
|
|
548
551
|
grid-column: 2;
|
|
@@ -552,9 +555,9 @@
|
|
|
552
555
|
overflow-wrap: anywhere;
|
|
553
556
|
}
|
|
554
557
|
|
|
555
|
-
[data-ui
|
|
556
|
-
[data-part
|
|
557
|
-
> [data-part
|
|
558
|
+
[data-ui-listbox]
|
|
559
|
+
[data-part-option]:is([data-disabled], [data-selected])
|
|
560
|
+
> [data-part-description] {
|
|
558
561
|
color: inherit;
|
|
559
562
|
}
|
|
560
563
|
|
|
@@ -565,7 +568,7 @@
|
|
|
565
568
|
* library. Never narrower than its own content, so a long label wraps in
|
|
566
569
|
* column two rather than pushing the value off the surface.
|
|
567
570
|
*/
|
|
568
|
-
[data-ui
|
|
571
|
+
[data-ui-listbox] [data-part-meta] {
|
|
569
572
|
color: var(--_muted);
|
|
570
573
|
font-variant-numeric: tabular-nums;
|
|
571
574
|
grid-column: 3;
|
|
@@ -575,9 +578,7 @@
|
|
|
575
578
|
white-space: nowrap;
|
|
576
579
|
}
|
|
577
580
|
|
|
578
|
-
[data-ui
|
|
579
|
-
[data-part='option']:is([data-disabled], [data-selected])
|
|
580
|
-
> [data-part='meta'] {
|
|
581
|
+
[data-ui-listbox] [data-part-option]:is([data-disabled], [data-selected]) > [data-part-meta] {
|
|
581
582
|
color: inherit;
|
|
582
583
|
}
|
|
583
584
|
|
|
@@ -589,7 +590,7 @@
|
|
|
589
590
|
* all. The message lives inside the listbox: outside it the reader hears
|
|
590
591
|
* "listbox, 0 items" and then nothing.
|
|
591
592
|
*/
|
|
592
|
-
[data-ui
|
|
593
|
+
[data-ui-listbox] :is([data-part-empty], [data-part-loader]) {
|
|
593
594
|
align-content: center;
|
|
594
595
|
color: var(--_muted);
|
|
595
596
|
display: grid;
|
|
@@ -605,7 +606,7 @@
|
|
|
605
606
|
* role — a listbox owns nothing else — so it carries the same geometry and
|
|
606
607
|
* says what it is with a pulse rather than with a second element.
|
|
607
608
|
*/
|
|
608
|
-
[data-ui
|
|
609
|
+
[data-ui-listbox] [data-part-loader] {
|
|
609
610
|
animation: slotted-listbox-loader var(--slotted-duration-loop) ease-in-out infinite;
|
|
610
611
|
}
|
|
611
612
|
|
|
@@ -626,44 +627,44 @@
|
|
|
626
627
|
* the rest of the motion scale.
|
|
627
628
|
*/
|
|
628
629
|
@media (prefers-reduced-motion: reduce) {
|
|
629
|
-
[data-ui
|
|
630
|
+
[data-ui-listbox] [data-part-loader] {
|
|
630
631
|
animation: none;
|
|
631
632
|
opacity: 0.7;
|
|
632
633
|
}
|
|
633
634
|
}
|
|
634
635
|
|
|
635
|
-
/* ── Forced
|
|
636
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
636
637
|
|
|
637
638
|
/**
|
|
638
639
|
* The two things the theme cannot reach. Every tone surface becomes `Canvas`
|
|
639
|
-
* under forced
|
|
640
|
+
* under forced colors, so both the selection and the highlight — which are
|
|
640
641
|
* this family's whole state vocabulary, not decoration — would disappear and
|
|
641
642
|
* leave a reader unable to tell what they have chosen from what they are on.
|
|
642
643
|
*/
|
|
643
644
|
@media (forced-colors: active) {
|
|
644
|
-
[data-ui
|
|
645
|
+
[data-ui-listbox] [data-part-option][data-selected] {
|
|
645
646
|
background-color: Highlight;
|
|
646
647
|
color: HighlightText;
|
|
647
648
|
forced-color-adjust: none;
|
|
648
649
|
}
|
|
649
650
|
|
|
650
|
-
[data-ui
|
|
651
|
+
[data-ui-listbox] [data-part-option][data-disabled] {
|
|
651
652
|
color: GrayText;
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
655
|
|
|
655
656
|
/*
|
|
656
|
-
* Forced
|
|
657
|
+
* Forced colors remove every box shadow, and the edge with them. The width
|
|
657
658
|
* comes back as an outline inside the border, and where focus draws the ring
|
|
658
659
|
* on the same box an invalid ring is double, which a valid one is not.
|
|
659
660
|
*/
|
|
660
661
|
@media (forced-colors: active) {
|
|
661
|
-
[data-ui
|
|
662
|
+
[data-ui-listbox][data-variant='framed'][data-invalid]:not([data-disabled]) {
|
|
662
663
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
663
664
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
664
665
|
}
|
|
665
666
|
|
|
666
|
-
[data-ui
|
|
667
|
+
[data-ui-listbox][data-variant='framed'][data-invalid]:not(
|
|
667
668
|
[data-disabled]
|
|
668
669
|
)[data-focus-mode='activedescendant']:focus-visible {
|
|
669
670
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"--slotted-control-padding-inline-lg",
|
|
19
19
|
"--slotted-control-padding-inline-md",
|
|
20
20
|
"--slotted-control-padding-inline-sm",
|
|
21
|
-
"--slotted-control-radius",
|
|
22
21
|
"--slotted-control-shadow",
|
|
23
22
|
"--slotted-control-transition-duration",
|
|
24
23
|
"--slotted-control-transition-easing",
|