@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- 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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -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 +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -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 +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- 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 +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- 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 +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- 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 +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -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 +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -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 +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- 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 +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- 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 +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -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 +113 -89
- package/src/tag/tag.tokens.json +11 -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 +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -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);
|
|
@@ -83,6 +83,8 @@
|
|
|
83
83
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
84
84
|
font-size: var(--_font-size);
|
|
85
85
|
gap: var(--slotted-space-1, 0.125rem);
|
|
86
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
87
|
+
flex-basis: content;
|
|
86
88
|
inline-size: 100%;
|
|
87
89
|
min-inline-size: 0;
|
|
88
90
|
min-block-size: var(--_height);
|
|
@@ -102,7 +104,7 @@
|
|
|
102
104
|
box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
[data-ui
|
|
107
|
+
[data-ui-combobox][data-part-root]:not([data-full-width]) {
|
|
106
108
|
inline-size: auto;
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -113,7 +115,7 @@
|
|
|
113
115
|
* `autocomplete="both"` writes as a selected range rather than as text, so
|
|
114
116
|
* the next character typed replaces it.
|
|
115
117
|
*/
|
|
116
|
-
[data-ui
|
|
118
|
+
[data-ui-combobox] > [data-part-input] {
|
|
117
119
|
background-color: transparent;
|
|
118
120
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
119
121
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
text-overflow: ellipsis;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
[data-ui
|
|
140
|
+
[data-ui-combobox] > [data-part-input]::placeholder {
|
|
139
141
|
color: var(--slotted-combobox-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
140
142
|
text-overflow: ellipsis;
|
|
141
143
|
}
|
|
@@ -146,7 +148,7 @@
|
|
|
146
148
|
* the theme's accent tone is what that paint should be, rather than the
|
|
147
149
|
* browser's blue in a form that is not blue.
|
|
148
150
|
*/
|
|
149
|
-
[data-ui
|
|
151
|
+
[data-ui-combobox] > [data-part-input]::selection {
|
|
150
152
|
background-color: var(
|
|
151
153
|
--slotted-combobox-completion-background,
|
|
152
154
|
var(--slotted-tone-accent-surface)
|
|
@@ -155,20 +157,32 @@
|
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
|
-
* Autofill. Chrome paints its own ground over the
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
160
|
+
* Autofill. Chrome paints its own ground over the input, and a hundred-pixel
|
|
161
|
+
* inset shadow is the only way to reach it. The signal is kept rather than
|
|
162
|
+
* erased, in the accent surface the theme owns, and it is the whole
|
|
163
|
+
* control's: the frame takes the tint under its border and inside its
|
|
164
|
+
* corner, and the input repaints the browser's ground in the same color.
|
|
165
|
+
* Painted on the input alone, the tint left the frame's padding, the slots
|
|
166
|
+
* and the buttons bare, and covered the border the input overlaps by one width.
|
|
162
167
|
*/
|
|
163
|
-
[data-ui
|
|
168
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:autofill) {
|
|
169
|
+
background-color: var(
|
|
170
|
+
--slotted-combobox-autofill-background,
|
|
171
|
+
var(--slotted-tone-accent-surface)
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
[data-ui-combobox] > [data-part-input]:autofill {
|
|
164
176
|
box-shadow: inset 0 0 0 100px
|
|
165
177
|
var(--slotted-combobox-autofill-background, var(--slotted-tone-accent-surface));
|
|
178
|
+
/* The input overlaps the frame's border by one width; the tint stops at it. */
|
|
179
|
+
clip-path: inset(var(--slotted-control-border-width, 1px) 0);
|
|
166
180
|
-webkit-text-fill-color: var(--slotted-combobox-color, var(--slotted-text, CanvasText));
|
|
167
181
|
}
|
|
168
182
|
|
|
169
183
|
/* ── The two buttons inside the frame ─────────────────────────────────── */
|
|
170
184
|
|
|
171
|
-
[data-ui
|
|
185
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
172
186
|
align-items: center;
|
|
173
187
|
appearance: none;
|
|
174
188
|
background-color: transparent;
|
|
@@ -199,7 +213,7 @@
|
|
|
199
213
|
* control is 24 pixels tall — the WCAG 2.2 minimum — so nothing drawn inside
|
|
200
214
|
* it can also be 24.
|
|
201
215
|
*/
|
|
202
|
-
[data-ui
|
|
216
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
203
217
|
content: '';
|
|
204
218
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
205
219
|
position: absolute;
|
|
@@ -210,22 +224,22 @@
|
|
|
210
224
|
the hit area above grows to 44 pixels around them. Side by side, neither
|
|
211
225
|
button reaches across the edge the two share. */
|
|
212
226
|
@media (pointer: coarse) {
|
|
213
|
-
[data-ui
|
|
227
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
214
228
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
215
229
|
}
|
|
216
230
|
|
|
217
|
-
[data-ui
|
|
231
|
+
[data-ui-combobox] > [data-part-clear]:has(+ [data-part-trigger]:not([hidden]))::after {
|
|
218
232
|
inset-inline-end: 0;
|
|
219
233
|
}
|
|
220
234
|
|
|
221
|
-
[data-ui
|
|
235
|
+
[data-ui-combobox] > [data-part-clear]:not([hidden]) + [data-part-trigger]::after {
|
|
222
236
|
inset-inline-start: 0;
|
|
223
237
|
}
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
/* The cross and the chevron are `Glyph` elements the binding draws, sized
|
|
227
241
|
here to the control's icon step. */
|
|
228
|
-
[data-ui
|
|
242
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
229
243
|
--slotted-icon-size: var(--_icon-size);
|
|
230
244
|
}
|
|
231
245
|
|
|
@@ -234,7 +248,7 @@
|
|
|
234
248
|
* button is what a reader presses and the arrow is what turns over. The
|
|
235
249
|
* library's own `Glyph` in an `icon` box; a character is never an icon.
|
|
236
250
|
*/
|
|
237
|
-
[data-ui
|
|
251
|
+
[data-ui-combobox] [data-part-arrow] {
|
|
238
252
|
align-items: center;
|
|
239
253
|
block-size: var(--_icon-size);
|
|
240
254
|
display: flex;
|
|
@@ -242,12 +256,12 @@
|
|
|
242
256
|
justify-content: center;
|
|
243
257
|
}
|
|
244
258
|
|
|
245
|
-
[data-ui
|
|
259
|
+
[data-ui-combobox] [data-part-arrow] > [data-ui-icon] {
|
|
246
260
|
transition: rotate var(--slotted-control-transition-duration)
|
|
247
261
|
var(--slotted-control-transition-easing);
|
|
248
262
|
}
|
|
249
263
|
|
|
250
|
-
[data-ui
|
|
264
|
+
[data-ui-combobox][data-open] [data-part-arrow] > [data-ui-icon] {
|
|
251
265
|
rotate: 180deg;
|
|
252
266
|
}
|
|
253
267
|
|
|
@@ -258,7 +272,7 @@
|
|
|
258
272
|
* draws for every family that waits, worn as `data-ui='spinner'` beside this
|
|
259
273
|
* family's own part.
|
|
260
274
|
*/
|
|
261
|
-
[data-ui
|
|
275
|
+
[data-ui-combobox] [data-part-busy] {
|
|
262
276
|
--slotted-spinner-size: var(--_icon-size);
|
|
263
277
|
|
|
264
278
|
color: var(--slotted-combobox-arrow-color, var(--slotted-text-muted, GrayText));
|
|
@@ -267,7 +281,7 @@
|
|
|
267
281
|
|
|
268
282
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
269
283
|
|
|
270
|
-
[data-ui
|
|
284
|
+
[data-ui-combobox][data-part-root][data-size='sm'] {
|
|
271
285
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
272
286
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
273
287
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -276,7 +290,7 @@
|
|
|
276
290
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
277
291
|
}
|
|
278
292
|
|
|
279
|
-
[data-ui
|
|
293
|
+
[data-ui-combobox][data-part-root][data-size='md'] {
|
|
280
294
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
281
295
|
--_height: var(--slotted-control-height-md, 34px);
|
|
282
296
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -285,7 +299,7 @@
|
|
|
285
299
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
286
300
|
}
|
|
287
301
|
|
|
288
|
-
[data-ui
|
|
302
|
+
[data-ui-combobox][data-part-root][data-size='lg'] {
|
|
289
303
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
290
304
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
291
305
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -296,7 +310,7 @@
|
|
|
296
310
|
|
|
297
311
|
/* ── Variant ──────────────────────────────────────────────────────────── */
|
|
298
312
|
|
|
299
|
-
[data-ui
|
|
313
|
+
[data-ui-combobox][data-part-root][data-variant='subtle'] {
|
|
300
314
|
background-color: var(
|
|
301
315
|
--slotted-combobox-subtle-background,
|
|
302
316
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -310,7 +324,7 @@
|
|
|
310
324
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
311
325
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
312
326
|
shadow would draw the cell where there is none. */
|
|
313
|
-
[data-ui
|
|
327
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
314
328
|
background-color: transparent;
|
|
315
329
|
border-color: transparent;
|
|
316
330
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -318,31 +332,31 @@
|
|
|
318
332
|
}
|
|
319
333
|
|
|
320
334
|
@media (forced-colors: active) {
|
|
321
|
-
[data-ui
|
|
335
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
322
336
|
border-color: ButtonBorder;
|
|
323
337
|
}
|
|
324
338
|
}
|
|
325
339
|
|
|
326
340
|
/* ── States on the control ────────────────────────────────────────────── */
|
|
327
341
|
|
|
328
|
-
[data-ui
|
|
342
|
+
[data-ui-combobox][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
329
343
|
[data-invalid]
|
|
330
344
|
) {
|
|
331
345
|
border-color: var(--slotted-combobox-hover-border-color, var(--slotted-tone-accent-border));
|
|
332
346
|
}
|
|
333
347
|
|
|
334
|
-
[data-ui
|
|
348
|
+
[data-ui-combobox][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
335
349
|
[data-readonly]
|
|
336
|
-
):not([data-invalid]) {
|
|
350
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
337
351
|
background-color: var(
|
|
338
352
|
--slotted-combobox-subtle-hover-background,
|
|
339
353
|
var(--slotted-tone-secondary-subtle-hover)
|
|
340
354
|
);
|
|
341
355
|
}
|
|
342
356
|
|
|
343
|
-
[data-ui
|
|
357
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
344
358
|
[data-readonly]
|
|
345
|
-
):not([data-invalid]) {
|
|
359
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
346
360
|
background-color: var(
|
|
347
361
|
--slotted-combobox-plain-hover-background,
|
|
348
362
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -351,11 +365,11 @@
|
|
|
351
365
|
border-color: transparent;
|
|
352
366
|
}
|
|
353
367
|
|
|
354
|
-
[data-ui
|
|
368
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
355
369
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
356
370
|
var(--slotted-focus-ring-color, Highlight);
|
|
357
371
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
358
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
372
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
359
373
|
}
|
|
360
374
|
|
|
361
375
|
/**
|
|
@@ -365,18 +379,16 @@
|
|
|
365
379
|
* shadow that appears only under focus is a cell that changes size when it
|
|
366
380
|
* is used.
|
|
367
381
|
*/
|
|
368
|
-
[data-ui
|
|
369
|
-
> [data-part='input']:focus-visible
|
|
370
|
-
) {
|
|
382
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:has(> [data-part-input]:focus-visible) {
|
|
371
383
|
box-shadow: none;
|
|
372
384
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
373
385
|
}
|
|
374
386
|
|
|
375
|
-
[data-ui
|
|
387
|
+
[data-ui-combobox][data-part-root][data-open]:not([data-disabled]) {
|
|
376
388
|
border-color: var(--slotted-combobox-open-border-color, var(--slotted-tone-accent-border));
|
|
377
389
|
}
|
|
378
390
|
|
|
379
|
-
[data-ui
|
|
391
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
380
392
|
--slotted-focus-ring-color: var(
|
|
381
393
|
--slotted-combobox-invalid-focus-ring-color,
|
|
382
394
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -393,7 +405,7 @@
|
|
|
393
405
|
|
|
394
406
|
border-color: var(--slotted-combobox-invalid-border-color, var(--slotted-tone-danger-border));
|
|
395
407
|
/*
|
|
396
|
-
* Width as well as
|
|
408
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
397
409
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
398
410
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
399
411
|
* takes the resting lift's place.
|
|
@@ -401,15 +413,15 @@
|
|
|
401
413
|
box-shadow: var(--_invalid-edge);
|
|
402
414
|
}
|
|
403
415
|
|
|
404
|
-
[data-ui
|
|
416
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
405
417
|
box-shadow:
|
|
406
418
|
var(--_invalid-edge),
|
|
407
419
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
408
420
|
var(--slotted-focus-ring-color, Highlight);
|
|
409
421
|
}
|
|
410
422
|
|
|
411
|
-
[data-ui
|
|
412
|
-
> [data-part
|
|
423
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
424
|
+
> [data-part-input]:focus-visible
|
|
413
425
|
) {
|
|
414
426
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
415
427
|
it; the edge reaches past the ring. */
|
|
@@ -422,26 +434,29 @@
|
|
|
422
434
|
}
|
|
423
435
|
|
|
424
436
|
/*
|
|
425
|
-
* Forced
|
|
437
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
426
438
|
* width comes back as an outline inside the border, and a focused invalid
|
|
427
439
|
* control draws its ring double, which a valid ring is not.
|
|
428
440
|
*/
|
|
429
441
|
@media (forced-colors: active) {
|
|
430
|
-
[data-ui
|
|
442
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
431
443
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
432
444
|
outline-offset: calc(
|
|
433
445
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
434
446
|
);
|
|
435
447
|
}
|
|
436
448
|
|
|
437
|
-
[data-ui
|
|
449
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
438
450
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
439
451
|
var(--slotted-focus-ring-color, Highlight);
|
|
440
|
-
outline-offset: var(
|
|
452
|
+
outline-offset: var(
|
|
453
|
+
--slotted-control-focus-ring-offset,
|
|
454
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
455
|
+
);
|
|
441
456
|
}
|
|
442
457
|
|
|
443
|
-
[data-ui
|
|
444
|
-
> [data-part
|
|
458
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
459
|
+
> [data-part-input]:focus-visible
|
|
445
460
|
) {
|
|
446
461
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
447
462
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -456,14 +471,14 @@
|
|
|
456
471
|
* popup. The native `readonly` gives the first three; the second is the
|
|
457
472
|
* family's, because the pattern has no readonly for a combobox.
|
|
458
473
|
*/
|
|
459
|
-
[data-ui
|
|
474
|
+
[data-ui-combobox][data-part-root][data-readonly] {
|
|
460
475
|
background-color: var(
|
|
461
476
|
--slotted-combobox-readonly-background,
|
|
462
477
|
var(--slotted-tone-secondary-subtle-hover)
|
|
463
478
|
);
|
|
464
479
|
}
|
|
465
480
|
|
|
466
|
-
[data-ui
|
|
481
|
+
[data-ui-combobox][data-part-root][data-readonly] [data-part-arrow] {
|
|
467
482
|
opacity: 0.5;
|
|
468
483
|
}
|
|
469
484
|
|
|
@@ -472,8 +487,8 @@
|
|
|
472
487
|
* because a disabled `fieldset` disables every control inside it and the
|
|
473
488
|
* control has no way to say so.
|
|
474
489
|
*/
|
|
475
|
-
[data-ui
|
|
476
|
-
[data-ui
|
|
490
|
+
[data-ui-combobox][data-part-root][data-disabled],
|
|
491
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:disabled) {
|
|
477
492
|
background-color: var(
|
|
478
493
|
--slotted-combobox-disabled-background,
|
|
479
494
|
var(--slotted-disabled-background)
|
|
@@ -484,16 +499,16 @@
|
|
|
484
499
|
cursor: not-allowed;
|
|
485
500
|
}
|
|
486
501
|
|
|
487
|
-
[data-ui
|
|
488
|
-
> :is([data-part
|
|
502
|
+
[data-ui-combobox]
|
|
503
|
+
> :is([data-part-clear], [data-part-trigger]):hover:not(:disabled):not([data-disabled]) {
|
|
489
504
|
background-color: var(
|
|
490
505
|
--slotted-combobox-action-hover-background,
|
|
491
506
|
var(--slotted-tone-secondary-subtle-hover)
|
|
492
507
|
);
|
|
493
508
|
}
|
|
494
509
|
|
|
495
|
-
[data-ui
|
|
496
|
-
> :is([data-part
|
|
510
|
+
[data-ui-combobox]
|
|
511
|
+
> :is([data-part-clear], [data-part-trigger]):active:not(:disabled):not([data-disabled]) {
|
|
497
512
|
background-color: var(
|
|
498
513
|
--slotted-combobox-action-active-background,
|
|
499
514
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -507,14 +522,14 @@
|
|
|
507
522
|
* it. The trigger is not in the tab sequence and takes the same rule anyway,
|
|
508
523
|
* because a script may focus it.
|
|
509
524
|
*/
|
|
510
|
-
[data-ui
|
|
525
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]):focus-visible {
|
|
511
526
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
512
527
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
513
528
|
}
|
|
514
529
|
|
|
515
530
|
/* ── The layer ────────────────────────────────────────────────────────── */
|
|
516
531
|
|
|
517
|
-
[data-ui
|
|
532
|
+
[data-ui-combobox][data-part-positioner] {
|
|
518
533
|
--_surface: var(--slotted-combobox-surface, var(--slotted-surface-raised, #ffffff));
|
|
519
534
|
--_text: var(--slotted-combobox-content-text, var(--slotted-text, #0f172a));
|
|
520
535
|
--_muted: var(--slotted-combobox-content-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -548,7 +563,11 @@
|
|
|
548
563
|
);
|
|
549
564
|
--_item-inset: var(--slotted-control-padding-inline-md, 0.8125rem);
|
|
550
565
|
--_item-height: var(--slotted-control-height-md, 34px);
|
|
551
|
-
|
|
566
|
+
/* Concentric with the panel: its radius less the inset, floored at 0. */
|
|
567
|
+
--_item-radius: var(
|
|
568
|
+
--slotted-combobox-item-radius,
|
|
569
|
+
max(0px, calc(var(--_radius) - var(--_inset-inline)))
|
|
570
|
+
);
|
|
552
571
|
--_content-font-size: var(--slotted-control-font-size-md, 13px);
|
|
553
572
|
--_secondary-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
554
573
|
--_content-icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
@@ -568,7 +587,6 @@
|
|
|
568
587
|
box-sizing: border-box;
|
|
569
588
|
pointer-events: none;
|
|
570
589
|
|
|
571
|
-
opacity: 0;
|
|
572
590
|
/**
|
|
573
591
|
* R7: the layer arrives along the axis it opens on — from one space step
|
|
574
592
|
* above its place when it opens downward, from one step below when it
|
|
@@ -578,17 +596,15 @@
|
|
|
578
596
|
*/
|
|
579
597
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
580
598
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
581
|
-
transition:
|
|
582
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
583
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
599
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
584
600
|
}
|
|
585
601
|
|
|
586
|
-
[data-ui
|
|
602
|
+
[data-ui-combobox][data-part-positioner][data-side='top'] {
|
|
587
603
|
translate: 0 var(--_enter-distance);
|
|
588
604
|
}
|
|
589
605
|
|
|
590
606
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
591
|
-
[data-ui
|
|
607
|
+
[data-ui-combobox][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
592
608
|
translate: 0 0;
|
|
593
609
|
}
|
|
594
610
|
|
|
@@ -601,8 +617,7 @@
|
|
|
601
617
|
* A keyframe states where it starts. The exit stays a transition: it
|
|
602
618
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
603
619
|
*/
|
|
604
|
-
[data-ui
|
|
605
|
-
opacity: 1;
|
|
620
|
+
[data-ui-combobox][data-part-positioner][data-open] {
|
|
606
621
|
translate: 0 0;
|
|
607
622
|
transition: none;
|
|
608
623
|
}
|
|
@@ -612,32 +627,23 @@
|
|
|
612
627
|
* with the side, and a layer written open in static markup — the harness,
|
|
613
628
|
* a docs snippet — is simply there, and is photographed where it stands.
|
|
614
629
|
*/
|
|
615
|
-
[data-ui
|
|
630
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned] {
|
|
616
631
|
animation: slotted-combobox-enter-down var(--slotted-duration-medium)
|
|
617
632
|
var(--slotted-easing-enter);
|
|
618
633
|
}
|
|
619
634
|
|
|
620
|
-
[data-ui
|
|
635
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
621
636
|
animation-name: slotted-combobox-enter-up;
|
|
622
637
|
}
|
|
623
638
|
|
|
624
|
-
[data-ui='combobox'][data-part='positioner'][data-open][data-positioned]:is(
|
|
625
|
-
[data-side='left'],
|
|
626
|
-
[data-side='right']
|
|
627
|
-
) {
|
|
628
|
-
animation-name: slotted-combobox-fade;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
639
|
@keyframes slotted-combobox-enter-down {
|
|
632
640
|
from {
|
|
633
|
-
opacity: 0;
|
|
634
641
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
635
642
|
}
|
|
636
643
|
}
|
|
637
644
|
|
|
638
645
|
@keyframes slotted-combobox-enter-up {
|
|
639
646
|
from {
|
|
640
|
-
opacity: 0;
|
|
641
647
|
translate: 0 var(--_enter-distance);
|
|
642
648
|
}
|
|
643
649
|
}
|
|
@@ -648,39 +654,60 @@
|
|
|
648
654
|
}
|
|
649
655
|
}
|
|
650
656
|
|
|
657
|
+
/**
|
|
658
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
659
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
660
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
661
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
662
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
663
|
+
*/
|
|
664
|
+
[data-ui-combobox][data-part-positioner] > [data-part-content] {
|
|
665
|
+
opacity: 0;
|
|
666
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
[data-ui-combobox][data-part-positioner][data-open] > [data-part-content] {
|
|
670
|
+
opacity: 1;
|
|
671
|
+
transition: none;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned] > [data-part-content] {
|
|
675
|
+
animation: slotted-combobox-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
676
|
+
}
|
|
677
|
+
|
|
651
678
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
652
679
|
@media (prefers-reduced-motion: reduce) {
|
|
653
|
-
[data-ui
|
|
654
|
-
[data-ui
|
|
655
|
-
[data-ui
|
|
656
|
-
[data-ui
|
|
680
|
+
[data-ui-combobox][data-part-positioner],
|
|
681
|
+
[data-ui-combobox][data-part-positioner][data-side='top'],
|
|
682
|
+
[data-ui-combobox][data-part-positioner][data-side='left'],
|
|
683
|
+
[data-ui-combobox][data-part-positioner][data-side='right'] {
|
|
657
684
|
translate: 0 0;
|
|
658
|
-
transition:
|
|
685
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
659
686
|
}
|
|
660
687
|
|
|
661
|
-
[data-ui
|
|
662
|
-
[data-ui
|
|
663
|
-
[data-ui
|
|
664
|
-
[data-ui
|
|
665
|
-
animation-name:
|
|
688
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned],
|
|
689
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
690
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
691
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
692
|
+
animation-name: none;
|
|
666
693
|
}
|
|
667
694
|
}
|
|
668
695
|
|
|
669
|
-
[data-ui
|
|
696
|
+
[data-ui-combobox][data-part-positioner][data-detached] {
|
|
670
697
|
visibility: hidden;
|
|
671
698
|
}
|
|
672
699
|
|
|
673
|
-
[data-ui
|
|
700
|
+
[data-ui-combobox][data-part-positioner][data-width='anchor'] {
|
|
674
701
|
inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
675
702
|
}
|
|
676
703
|
|
|
677
|
-
[data-ui
|
|
704
|
+
[data-ui-combobox][data-part-positioner][data-width='content'] {
|
|
678
705
|
inline-size: max-content;
|
|
679
706
|
max-inline-size: min(var(--_measure), var(--slotted-positioner-available-width, 100vw));
|
|
680
707
|
min-inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
681
708
|
}
|
|
682
709
|
|
|
683
|
-
[data-ui
|
|
710
|
+
[data-ui-combobox][data-part-positioner][data-size='sm'] {
|
|
684
711
|
--_item-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
685
712
|
--_item-height: var(--slotted-control-height-sm, 30px);
|
|
686
713
|
--_content-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -689,7 +716,7 @@
|
|
|
689
716
|
--_column-gap: var(--slotted-control-gap-sm, 0.375rem);
|
|
690
717
|
}
|
|
691
718
|
|
|
692
|
-
[data-ui
|
|
719
|
+
[data-ui-combobox][data-part-positioner][data-size='lg'] {
|
|
693
720
|
--_item-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
694
721
|
--_item-height: var(--slotted-control-height-lg, 38px);
|
|
695
722
|
--_content-font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -700,7 +727,7 @@
|
|
|
700
727
|
|
|
701
728
|
/* ── The surface ──────────────────────────────────────────────────────── */
|
|
702
729
|
|
|
703
|
-
[data-ui
|
|
730
|
+
[data-ui-combobox] > [data-part-content] {
|
|
704
731
|
background: var(--_surface);
|
|
705
732
|
border: var(--_border-width) solid var(--_border-color);
|
|
706
733
|
border-radius: var(--_radius);
|
|
@@ -711,8 +738,9 @@
|
|
|
711
738
|
font-family: var(--slotted-font-family-sans);
|
|
712
739
|
font-size: var(--_content-font-size);
|
|
713
740
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
714
|
-
max-block-size:
|
|
715
|
-
var(--slotted-
|
|
741
|
+
max-block-size: min(
|
|
742
|
+
var(--slotted-overlay-max-block-size, 100vh),
|
|
743
|
+
calc(var(--slotted-positioner-available-height, 100vh) - var(--slotted-space-5, 0.75rem))
|
|
716
744
|
);
|
|
717
745
|
outline: none;
|
|
718
746
|
overflow-y: auto;
|
|
@@ -720,28 +748,74 @@
|
|
|
720
748
|
padding-block: var(--_inset-block);
|
|
721
749
|
padding-inline: var(--_inset-inline);
|
|
722
750
|
pointer-events: auto;
|
|
751
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
752
|
+
-webkit-backdrop-filter: var(--slotted-combobox-content-backdrop-filter, none);
|
|
753
|
+
backdrop-filter: var(--slotted-combobox-content-backdrop-filter, none);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
757
|
+
[data-ui-combobox] > [data-part-content] {
|
|
758
|
+
-webkit-backdrop-filter: none;
|
|
759
|
+
backdrop-filter: none;
|
|
760
|
+
}
|
|
723
761
|
}
|
|
724
762
|
|
|
725
|
-
[data-ui
|
|
763
|
+
[data-ui-combobox] > [data-part-content]:focus-visible {
|
|
726
764
|
outline: none;
|
|
727
765
|
}
|
|
728
766
|
|
|
729
767
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
730
768
|
|
|
731
|
-
[data-ui
|
|
769
|
+
[data-ui-combobox] [data-part-group] {
|
|
732
770
|
display: grid;
|
|
733
771
|
grid-column: 1 / -1;
|
|
734
772
|
grid-template-columns: subgrid;
|
|
735
773
|
}
|
|
736
774
|
|
|
737
|
-
|
|
775
|
+
/**
|
|
776
|
+
* A group's label stays at the top of the list while its group is in view.
|
|
777
|
+
* The group is the label's containing block, so the next label pushes it out
|
|
778
|
+
* and a group scrolled past takes its label with it. It sticks to the
|
|
779
|
+
* scrollport's edge rather than the padding's, on the surface's ground, above
|
|
780
|
+
* the items and below the parts the surface draws over them.
|
|
781
|
+
*/
|
|
782
|
+
[data-ui-combobox] [data-part-group-label] {
|
|
783
|
+
background: var(--_surface);
|
|
784
|
+
box-sizing: border-box;
|
|
738
785
|
color: var(--_muted);
|
|
739
786
|
font-size: var(--_secondary-font-size);
|
|
740
787
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
741
788
|
grid-column: 1 / -1;
|
|
789
|
+
inset-block-start: calc(-1 * var(--_inset-block));
|
|
742
790
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
791
|
+
min-block-size: var(--_group-label-height);
|
|
743
792
|
padding-block: var(--slotted-space-2, 0.25rem);
|
|
744
793
|
padding-inline: var(--_item-inset);
|
|
794
|
+
position: sticky;
|
|
795
|
+
z-index: 1;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
@media (forced-colors: active) {
|
|
799
|
+
[data-ui-combobox] [data-part-group-label] {
|
|
800
|
+
background: Canvas;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* The label's height, which the list keeps clear above an item the keys
|
|
806
|
+
* bring into view (`revealWithin` reads the scroll padding), so the item is
|
|
807
|
+
* never drawn under a label stuck to the top.
|
|
808
|
+
*/
|
|
809
|
+
[data-ui-combobox] > [data-part-content]:has([data-part-group-label]) {
|
|
810
|
+
--_group-label-height: var(
|
|
811
|
+
--slotted-combobox-group-label-height,
|
|
812
|
+
calc(
|
|
813
|
+
var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
|
|
814
|
+
var(--slotted-space-2, 0.25rem)
|
|
815
|
+
)
|
|
816
|
+
);
|
|
817
|
+
|
|
818
|
+
scroll-padding-block-start: var(--_group-label-height);
|
|
745
819
|
}
|
|
746
820
|
|
|
747
821
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
@@ -753,12 +827,12 @@
|
|
|
753
827
|
* either beats the user agent's own `[hidden] { display: none }`, because an
|
|
754
828
|
* author rule wins over the user agent sheet.
|
|
755
829
|
*/
|
|
756
|
-
[data-ui
|
|
757
|
-
[data-ui
|
|
830
|
+
[data-ui-combobox] [data-part-item][hidden],
|
|
831
|
+
[data-ui-combobox] [data-part-group][hidden] {
|
|
758
832
|
display: none;
|
|
759
833
|
}
|
|
760
834
|
|
|
761
|
-
[data-ui
|
|
835
|
+
[data-ui-combobox] [data-part-item] {
|
|
762
836
|
align-content: center;
|
|
763
837
|
border-radius: var(--_item-radius);
|
|
764
838
|
box-sizing: border-box;
|
|
@@ -784,7 +858,7 @@
|
|
|
784
858
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
785
859
|
}
|
|
786
860
|
|
|
787
|
-
[data-ui
|
|
861
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
788
862
|
background-color: var(--_highlight);
|
|
789
863
|
/**
|
|
790
864
|
* A ring as well as a ground. Nothing on this surface holds focus — DOM
|
|
@@ -798,11 +872,11 @@
|
|
|
798
872
|
var(--slotted-combobox-highlight-ring, var(--slotted-tone-accent-border));
|
|
799
873
|
}
|
|
800
874
|
|
|
801
|
-
[data-ui
|
|
875
|
+
[data-ui-combobox] [data-part-item]:not([data-disabled]):active {
|
|
802
876
|
background-color: var(--_highlight-active);
|
|
803
877
|
}
|
|
804
878
|
|
|
805
|
-
[data-ui
|
|
879
|
+
[data-ui-combobox] [data-part-item][data-selected] {
|
|
806
880
|
color: var(--_selected-color);
|
|
807
881
|
}
|
|
808
882
|
|
|
@@ -815,21 +889,21 @@
|
|
|
815
889
|
* selection begins and ends. `select` and `combobox` draw the same ground
|
|
816
890
|
* and answer the same way; `selection-block.test.mjs` holds the three to it.
|
|
817
891
|
*/
|
|
818
|
-
[data-ui
|
|
892
|
+
[data-ui-combobox] [data-part-item][data-selected] + [data-part-item][data-selected] {
|
|
819
893
|
border-start-end-radius: 0;
|
|
820
894
|
border-start-start-radius: 0;
|
|
821
895
|
}
|
|
822
896
|
|
|
823
|
-
[data-ui
|
|
897
|
+
[data-ui-combobox] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
|
|
824
898
|
border-end-end-radius: 0;
|
|
825
899
|
border-end-start-radius: 0;
|
|
826
900
|
}
|
|
827
901
|
|
|
828
|
-
[data-ui
|
|
902
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-label] {
|
|
829
903
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
830
904
|
}
|
|
831
905
|
|
|
832
|
-
[data-ui
|
|
906
|
+
[data-ui-combobox] [data-part-item][data-disabled] {
|
|
833
907
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
834
908
|
cursor: not-allowed;
|
|
835
909
|
}
|
|
@@ -855,7 +929,7 @@
|
|
|
855
929
|
* would watch it disappear. A cursor lifts, always. What the row cannot do is
|
|
856
930
|
* said by the ink and by the ring, which both step down to the disabled pair.
|
|
857
931
|
*/
|
|
858
|
-
[data-ui
|
|
932
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
859
933
|
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
860
934
|
var(--slotted-disabled-border, #cbd5e1);
|
|
861
935
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
@@ -863,13 +937,13 @@
|
|
|
863
937
|
|
|
864
938
|
/* ── The cells ────────────────────────────────────────────────────────── */
|
|
865
939
|
|
|
866
|
-
[data-ui
|
|
940
|
+
[data-ui-combobox] :is([data-part-indicator], [data-part-icon]) {
|
|
867
941
|
block-size: 1lh;
|
|
868
942
|
}
|
|
869
943
|
|
|
870
944
|
/* Column one holds content and paints none: a `Glyph` in an `Icon` box, or
|
|
871
|
-
artwork of the consumer's own,
|
|
872
|
-
[data-ui
|
|
945
|
+
artwork of the consumer's own, centerd and sized from the column. */
|
|
946
|
+
[data-ui-combobox] [data-part-icon] {
|
|
873
947
|
--slotted-icon-size: var(--_content-icon-size);
|
|
874
948
|
|
|
875
949
|
align-items: center;
|
|
@@ -882,7 +956,7 @@
|
|
|
882
956
|
margin-inline-end: var(--_column-gap);
|
|
883
957
|
}
|
|
884
958
|
|
|
885
|
-
[data-ui
|
|
959
|
+
[data-ui-combobox] [data-part-label] {
|
|
886
960
|
grid-column: 2;
|
|
887
961
|
grid-row: 1;
|
|
888
962
|
min-inline-size: 0;
|
|
@@ -906,7 +980,7 @@
|
|
|
906
980
|
* run moved on every keystroke as the filter re-marked the label (CB6).
|
|
907
981
|
*/
|
|
908
982
|
|
|
909
|
-
[data-ui
|
|
983
|
+
[data-ui-combobox] [data-part-description] {
|
|
910
984
|
color: var(--_muted);
|
|
911
985
|
font-size: var(--_secondary-font-size);
|
|
912
986
|
grid-column: 2;
|
|
@@ -916,12 +990,12 @@
|
|
|
916
990
|
overflow-wrap: anywhere;
|
|
917
991
|
}
|
|
918
992
|
|
|
919
|
-
[data-ui
|
|
993
|
+
[data-ui-combobox] [data-part-item][data-disabled] > [data-part-description] {
|
|
920
994
|
color: inherit;
|
|
921
995
|
}
|
|
922
996
|
|
|
923
997
|
/* The tick is a `Glyph` the binding draws, at the content's icon step. */
|
|
924
|
-
[data-ui
|
|
998
|
+
[data-ui-combobox] [data-part-indicator] {
|
|
925
999
|
--slotted-icon-size: var(--_content-icon-size);
|
|
926
1000
|
|
|
927
1001
|
align-items: center;
|
|
@@ -936,13 +1010,13 @@
|
|
|
936
1010
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
937
1011
|
}
|
|
938
1012
|
|
|
939
|
-
[data-ui
|
|
1013
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-indicator] {
|
|
940
1014
|
opacity: 1;
|
|
941
1015
|
}
|
|
942
1016
|
|
|
943
1017
|
/* ── Separator, empty, status ─────────────────────────────────────────── */
|
|
944
1018
|
|
|
945
|
-
[data-ui
|
|
1019
|
+
[data-ui-combobox] [data-part-separator] {
|
|
946
1020
|
background-color: var(--slotted-combobox-separator-color, var(--_border-color));
|
|
947
1021
|
block-size: var(--_border-width);
|
|
948
1022
|
border: 0;
|
|
@@ -957,7 +1031,7 @@
|
|
|
957
1031
|
* when the results land — which is the gap none of the surveyed
|
|
958
1032
|
* implementations closes.
|
|
959
1033
|
*/
|
|
960
|
-
[data-ui
|
|
1034
|
+
[data-ui-combobox] :is([data-part-empty], [data-part-status]) {
|
|
961
1035
|
color: var(--_muted);
|
|
962
1036
|
/**
|
|
963
1037
|
* Its own bidi run, ordered by its own content. "3 results" is a European
|
|
@@ -967,7 +1041,7 @@
|
|
|
967
1041
|
* takes the direction from the sentence's own first strong character, so an
|
|
968
1042
|
* English count reads as itself and a translated one reads as itself — the
|
|
969
1043
|
* same repair `text-field` makes for an adornment, and for the same reason.
|
|
970
|
-
* These two parts are
|
|
1044
|
+
* These two parts are centerd, so taking their own direction costs no
|
|
971
1045
|
* alignment; an option's label is the consumer's content and keeps the
|
|
972
1046
|
* document's direction unless the consumer says otherwise.
|
|
973
1047
|
*/
|
|
@@ -990,10 +1064,23 @@
|
|
|
990
1064
|
* often present with nothing to draw. A row with no text takes no space, and
|
|
991
1065
|
* a row with text takes the same space as the empty message beside it.
|
|
992
1066
|
*/
|
|
993
|
-
[data-ui
|
|
1067
|
+
[data-ui-combobox] [data-part-status]:empty {
|
|
994
1068
|
display: none;
|
|
995
1069
|
}
|
|
996
1070
|
|
|
1071
|
+
/* Beside the empty message the status says the same thing to the eye. It
|
|
1072
|
+
stays the live region that announces the count, clipped to one pixel. */
|
|
1073
|
+
[data-ui-combobox] [data-part-empty] ~ [data-part-status] {
|
|
1074
|
+
block-size: 1px;
|
|
1075
|
+
clip-path: inset(50%);
|
|
1076
|
+
inline-size: 1px;
|
|
1077
|
+
min-inline-size: 0;
|
|
1078
|
+
overflow: hidden;
|
|
1079
|
+
padding: 0;
|
|
1080
|
+
position: absolute;
|
|
1081
|
+
white-space: nowrap;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
997
1084
|
/**
|
|
998
1085
|
* The wait, as the shape of the list that is coming. `select`'s decision and
|
|
999
1086
|
* `select`'s reasons (SL6/CB5): three rows the height of an option rather
|
|
@@ -1003,7 +1090,7 @@
|
|
|
1003
1090
|
* about how a placeholder is painted — and they are hidden from assistive
|
|
1004
1091
|
* technology, because the `status` row beside them is the live region.
|
|
1005
1092
|
*/
|
|
1006
|
-
[data-ui
|
|
1093
|
+
[data-ui-combobox] [data-part-placeholder] {
|
|
1007
1094
|
display: grid;
|
|
1008
1095
|
/* The surface is a grid of option columns; the rows span all of them, as
|
|
1009
1096
|
the status and empty rows do. */
|
|
@@ -1012,23 +1099,23 @@
|
|
|
1012
1099
|
padding-inline: var(--_item-inset);
|
|
1013
1100
|
}
|
|
1014
1101
|
|
|
1015
|
-
[data-ui
|
|
1102
|
+
[data-ui-combobox] [data-part-placeholder] > * {
|
|
1016
1103
|
align-items: center;
|
|
1017
1104
|
display: flex;
|
|
1018
1105
|
min-block-size: var(--_item-height);
|
|
1019
1106
|
}
|
|
1020
1107
|
|
|
1021
|
-
[data-ui
|
|
1108
|
+
[data-ui-combobox] [data-part-placeholder] > [data-ui-skeleton] {
|
|
1022
1109
|
align-self: center;
|
|
1023
1110
|
}
|
|
1024
1111
|
|
|
1025
1112
|
/* Three ragged widths: three identical bars read as a table, and a list of
|
|
1026
1113
|
labels is ragged. */
|
|
1027
|
-
[data-ui
|
|
1114
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
|
|
1028
1115
|
inline-size: 78%;
|
|
1029
1116
|
}
|
|
1030
1117
|
|
|
1031
|
-
[data-ui
|
|
1118
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
|
|
1032
1119
|
inline-size: 56%;
|
|
1033
1120
|
}
|
|
1034
1121
|
|
|
@@ -1039,20 +1126,20 @@
|
|
|
1039
1126
|
* many for one wait (SL6/CB5).
|
|
1040
1127
|
*/
|
|
1041
1128
|
|
|
1042
|
-
[data-ui
|
|
1129
|
+
[data-ui-combobox] > [data-part-content][data-loading] {
|
|
1043
1130
|
cursor: progress;
|
|
1044
1131
|
}
|
|
1045
1132
|
|
|
1046
|
-
/* ── Forced
|
|
1133
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1047
1134
|
|
|
1048
1135
|
@media (forced-colors: active) {
|
|
1049
|
-
[data-ui
|
|
1136
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
1050
1137
|
background-color: Highlight;
|
|
1051
1138
|
color: HighlightText;
|
|
1052
1139
|
forced-color-adjust: none;
|
|
1053
1140
|
}
|
|
1054
1141
|
|
|
1055
|
-
[data-ui
|
|
1142
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
1056
1143
|
background-color: Highlight;
|
|
1057
1144
|
color: GrayText;
|
|
1058
1145
|
}
|