@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
package/src/tree/tree.css
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
* only the frame's own inset, radius and shadow come off the space, radius
|
|
52
52
|
* and shadow scales.
|
|
53
53
|
*/
|
|
54
|
-
[data-ui
|
|
54
|
+
[data-ui-tree] {
|
|
55
55
|
--_surface: var(--slotted-tree-surface, var(--slotted-surface, #ffffff));
|
|
56
56
|
--_text: var(--slotted-tree-text, var(--slotted-text, #0f172a));
|
|
57
57
|
--_muted: var(--slotted-tree-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
*
|
|
109
109
|
* What a reader sees on a row is the distance from its deepest guide line
|
|
110
110
|
* to its own chevron, and that distance is `step - glyph / 2`, because the
|
|
111
|
-
* line sits on the
|
|
111
|
+
* line sits on the center of the chevron one level up. With the step read
|
|
112
112
|
* from the space scale and the glyph from the control scale, the two moved
|
|
113
113
|
* apart: measured on the built page, five pixels at `sm`, eight at `md`,
|
|
114
114
|
* eleven at `lg`, and nought at 240 pixels, where the line met the chevron.
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
text-align: start;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
[data-ui
|
|
180
|
+
[data-ui-tree][data-size='sm'] {
|
|
181
181
|
--_row-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
182
182
|
--_row-height: var(--slotted-control-height-sm, 30px);
|
|
183
183
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
--_check-size: var(--slotted-selection-size-sm, 14px);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
[data-ui
|
|
190
|
+
[data-ui-tree][data-size='lg'] {
|
|
191
191
|
--_row-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
192
192
|
--_row-height: var(--slotted-control-height-lg, 38px);
|
|
193
193
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -201,14 +201,14 @@
|
|
|
201
201
|
* `framed` is the standalone control; `plain` is what a tree renders as
|
|
202
202
|
* inside a panel, a drawer or a page region that already has an edge.
|
|
203
203
|
*/
|
|
204
|
-
[data-ui
|
|
204
|
+
[data-ui-tree][data-variant='framed'] {
|
|
205
205
|
background-color: var(--_surface);
|
|
206
206
|
border: var(--_border-width) solid var(--_border-color);
|
|
207
207
|
border-radius: var(--_radius);
|
|
208
208
|
box-shadow: var(--_shadow);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
[data-ui
|
|
211
|
+
[data-ui-tree] [data-part-canvas] {
|
|
212
212
|
/**
|
|
213
213
|
* The block cap is stated rather than the height: a tree of four branches
|
|
214
214
|
* is four rows tall, and one of four hundred stops at `rows` and scrolls.
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
padding-inline: 0;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
[data-ui
|
|
225
|
+
[data-ui-tree] :is([data-part-canvas], [data-part-group]) {
|
|
226
226
|
list-style: none;
|
|
227
227
|
margin-block: 0;
|
|
228
228
|
margin-inline: 0;
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
* The group carries no inset: the row states the whole indent, so the band
|
|
234
234
|
* can span the tree's full width at every level.
|
|
235
235
|
*/
|
|
236
|
-
[data-ui
|
|
236
|
+
[data-ui-tree] [data-part-group] {
|
|
237
237
|
padding-block: 0;
|
|
238
238
|
padding-inline: 0;
|
|
239
239
|
}
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
* family that only works under one reset is a family waiting for the next
|
|
249
249
|
* one.
|
|
250
250
|
*/
|
|
251
|
-
[data-ui
|
|
251
|
+
[data-ui-tree] [data-part-node] {
|
|
252
252
|
display: block;
|
|
253
253
|
margin-block: 0;
|
|
254
254
|
margin-inline: 0;
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
outline: none;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-tree] [data-part-row] {
|
|
269
269
|
align-items: center;
|
|
270
270
|
background-color: transparent;
|
|
271
271
|
color: inherit;
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
*
|
|
324
324
|
* ── Where the line sits ──────────────────────────────────────────────
|
|
325
325
|
*
|
|
326
|
-
* Under the
|
|
326
|
+
* Under the center of the chevron of the level above, which is half a glyph
|
|
327
327
|
* from the start of that level's cell — not half a step. The two agree only
|
|
328
328
|
* at `md`, where the step and the glyph are both sixteen pixels; at `sm` and
|
|
329
329
|
* `lg` they differ by a pixel, and under the narrow container queries, where
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
* row is what `VS Code`, Primer and Carbon all draw, and what the reviewer
|
|
340
340
|
* asked for at the visual gate.
|
|
341
341
|
*/
|
|
342
|
-
[data-ui
|
|
342
|
+
[data-ui-tree] [data-part-guide] {
|
|
343
343
|
background-image: repeating-linear-gradient(
|
|
344
344
|
to right,
|
|
345
345
|
var(--_guide-color) 0 var(--_border-width),
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
position: absolute;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
[data-ui
|
|
355
|
+
[data-ui-tree] [data-part-guide]:dir(rtl) {
|
|
356
356
|
background-image: repeating-linear-gradient(
|
|
357
357
|
to left,
|
|
358
358
|
var(--_guide-color) 0 var(--_border-width),
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
[data-ui
|
|
363
|
+
[data-ui-tree][data-guides='false'] [data-part-guide] {
|
|
364
364
|
background-image: none;
|
|
365
365
|
}
|
|
366
366
|
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
* as one control moving. A leaf keeps the box and the binding draws nothing
|
|
371
371
|
* in it, which is what holds every label in one column whatever its node is.
|
|
372
372
|
*/
|
|
373
|
-
[data-ui
|
|
373
|
+
[data-ui-tree] [data-part-expander] {
|
|
374
374
|
/**
|
|
375
375
|
* The glyph is the icon size and never the box: under `expandOn="expander"`
|
|
376
376
|
* the box grows by padding to the target minimum, and the `icon` box stays
|
|
@@ -391,20 +391,20 @@
|
|
|
391
391
|
margin-inline-end: var(--_gap);
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
[data-ui
|
|
394
|
+
[data-ui-tree] [data-part-expander] > [data-ui-icon] {
|
|
395
395
|
transition: rotate var(--slotted-control-transition-duration, var(--slotted-duration-short))
|
|
396
396
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
[data-ui
|
|
399
|
+
[data-ui-tree] [data-part-expander]:dir(rtl) > [data-ui-icon] {
|
|
400
400
|
rotate: 180deg;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
[data-ui
|
|
404
|
-
[data-part
|
|
405
|
-
> [data-part
|
|
406
|
-
[data-part
|
|
407
|
-
> [data-ui
|
|
403
|
+
[data-ui-tree]
|
|
404
|
+
[data-part-node][data-expanded]
|
|
405
|
+
> [data-part-row]
|
|
406
|
+
[data-part-expander]
|
|
407
|
+
> [data-ui-icon] {
|
|
408
408
|
rotate: 90deg;
|
|
409
409
|
}
|
|
410
410
|
|
|
@@ -413,10 +413,10 @@
|
|
|
413
413
|
* the target otherwise. Under the first the box is grown to the WCAG minimum
|
|
414
414
|
* without the artwork growing, and the growth is taken back so no label moves.
|
|
415
415
|
*/
|
|
416
|
-
[data-ui
|
|
417
|
-
[data-part
|
|
418
|
-
> [data-part
|
|
419
|
-
[data-part
|
|
416
|
+
[data-ui-tree][data-expand-on='expander']
|
|
417
|
+
[data-part-node][data-branch]
|
|
418
|
+
> [data-part-row]
|
|
419
|
+
[data-part-expander] {
|
|
420
420
|
box-sizing: content-box;
|
|
421
421
|
cursor: pointer;
|
|
422
422
|
margin-block: calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);
|
|
@@ -439,10 +439,8 @@
|
|
|
439
439
|
* leaf is text; and with the chevron as the only target, no row is pressed at
|
|
440
440
|
* all.
|
|
441
441
|
*/
|
|
442
|
-
[data-ui
|
|
443
|
-
[data-ui
|
|
444
|
-
[data-part='node']:not([data-branch])
|
|
445
|
-
> [data-part='row'] {
|
|
442
|
+
[data-ui-tree][data-selection='none'][data-expand-on='expander'] [data-part-row],
|
|
443
|
+
[data-ui-tree][data-selection='none'] [data-part-node]:not([data-branch]) > [data-part-row] {
|
|
446
444
|
cursor: default;
|
|
447
445
|
}
|
|
448
446
|
|
|
@@ -450,7 +448,7 @@
|
|
|
450
448
|
* A tree the reader may read and not move keeps the arrow throughout, as
|
|
451
449
|
* `listbox` does with the same word.
|
|
452
450
|
*/
|
|
453
|
-
[data-ui
|
|
451
|
+
[data-ui-tree][data-readonly] [data-part-row] {
|
|
454
452
|
cursor: default;
|
|
455
453
|
}
|
|
456
454
|
|
|
@@ -462,9 +460,9 @@
|
|
|
462
460
|
* unchosen row is a gutter down the start edge of the whole tree, and a tree
|
|
463
461
|
* already spends one cell on the chevron and one per level on the indent.
|
|
464
462
|
* Every surveyed implementation that highlights — Primer, Carbon, the APG's
|
|
465
|
-
* own examples — draws no mark either, and under forced
|
|
463
|
+
* own examples — draws no mark either, and under forced colors the row takes
|
|
466
464
|
* `Highlight` and `HighlightText`, which is the system's own selection rather
|
|
467
|
-
* than a
|
|
465
|
+
* than a color of ours. `listbox` keeps its check because a flat list has
|
|
468
466
|
* one cell to spare and no indent; this is where the two families part, and
|
|
469
467
|
* the reason is the indent.
|
|
470
468
|
*
|
|
@@ -474,7 +472,7 @@
|
|
|
474
472
|
* ── Why the box is the one `checkbox` draws ────────────────────────────
|
|
475
473
|
*
|
|
476
474
|
* Same square from the selection scale, same medium edge in the strong
|
|
477
|
-
* border
|
|
475
|
+
* border color, same smallest radius, same solid ground when chosen, and the
|
|
478
476
|
* same mark: a whole two pixels of clearance on every side, at every step,
|
|
479
477
|
* revealed by a clip that opens along the stroke rather than by a scale that
|
|
480
478
|
* grows out of the middle. The clearance is a whole number and not a
|
|
@@ -483,7 +481,7 @@
|
|
|
483
481
|
* subpixels — and the two families are held together by
|
|
484
482
|
* `tree.styles.test.mjs`, which reads `checkbox.css` and compares them.
|
|
485
483
|
*/
|
|
486
|
-
[data-ui
|
|
484
|
+
[data-ui-tree] [data-part-indicator] {
|
|
487
485
|
--_mark-inset: var(--slotted-tree-mark-inset, 2px);
|
|
488
486
|
--_check-border: var(--slotted-border-width-medium, 1.5px);
|
|
489
487
|
--_mark-size: calc(var(--_check-size) - 2 * var(--_mark-inset));
|
|
@@ -514,7 +512,7 @@
|
|
|
514
512
|
* two whole pixels from the outside of the square, which is where `checkbox`
|
|
515
513
|
* puts its own.
|
|
516
514
|
*/
|
|
517
|
-
[data-ui
|
|
515
|
+
[data-ui-tree] [data-part-indicator] > [data-ui-icon] {
|
|
518
516
|
/* Physical on purpose: a check is not mirrored in a right-to-left row, so
|
|
519
517
|
neither is the hand that draws it. `checkbox` states the same. */
|
|
520
518
|
clip-path: inset(0% 100% 0% 0%);
|
|
@@ -531,24 +529,24 @@
|
|
|
531
529
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
532
530
|
}
|
|
533
531
|
|
|
534
|
-
[data-ui
|
|
535
|
-
[data-part
|
|
536
|
-
> [data-part
|
|
537
|
-
[data-part
|
|
532
|
+
[data-ui-tree]
|
|
533
|
+
[data-part-node]:is([data-selected], [data-indeterminate])
|
|
534
|
+
> [data-part-row]
|
|
535
|
+
[data-part-indicator] {
|
|
538
536
|
background-color: var(--slotted-tone-accent-solid);
|
|
539
537
|
border-color: var(--slotted-tone-accent-solid);
|
|
540
538
|
}
|
|
541
539
|
|
|
542
|
-
[data-ui
|
|
543
|
-
[data-part
|
|
544
|
-
> [data-part
|
|
545
|
-
[data-part
|
|
546
|
-
> [data-ui
|
|
540
|
+
[data-ui-tree]
|
|
541
|
+
[data-part-node]:is([data-selected], [data-indeterminate])
|
|
542
|
+
> [data-part-row]
|
|
543
|
+
[data-part-indicator]
|
|
544
|
+
> [data-ui-icon] {
|
|
547
545
|
clip-path: inset(0% 0% 0% 0%);
|
|
548
546
|
opacity: 1;
|
|
549
547
|
}
|
|
550
548
|
|
|
551
|
-
[data-ui
|
|
549
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] [data-part-indicator] {
|
|
552
550
|
background-color: var(--slotted-disabled-background, Canvas);
|
|
553
551
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
554
552
|
cursor: not-allowed;
|
|
@@ -559,8 +557,7 @@
|
|
|
559
557
|
* at all, and the rule is written so a consumer who leaves the element in the
|
|
560
558
|
* markup still gets the tree the axis promises.
|
|
561
559
|
*/
|
|
562
|
-
[data-ui
|
|
563
|
-
[data-part='indicator'] {
|
|
560
|
+
[data-ui-tree]:is([data-indicator='highlight'], [data-indicator='none']) [data-part-indicator] {
|
|
564
561
|
display: none;
|
|
565
562
|
}
|
|
566
563
|
|
|
@@ -568,9 +565,12 @@
|
|
|
568
565
|
* The node's own picture, which the consumer supplies. The family owns no
|
|
569
566
|
* folder glyph: a folder is content, and the glyph scale holds none.
|
|
570
567
|
*/
|
|
571
|
-
[data-ui
|
|
568
|
+
[data-ui-tree] [data-part-icon] {
|
|
569
|
+
--slotted-icon-size: var(--_icon-size);
|
|
570
|
+
|
|
572
571
|
block-size: var(--_icon-size);
|
|
573
572
|
color: var(--_muted);
|
|
573
|
+
display: flex;
|
|
574
574
|
flex: none;
|
|
575
575
|
inline-size: var(--_icon-size);
|
|
576
576
|
margin-inline-end: var(--_gap);
|
|
@@ -582,9 +582,9 @@
|
|
|
582
582
|
* taken. Primer asks the consumer to pass a visual on every item or to accept
|
|
583
583
|
* two columns of names; the fact is one the tree can read for itself.
|
|
584
584
|
*/
|
|
585
|
-
[data-ui
|
|
586
|
-
[data-part
|
|
587
|
-
[data-part
|
|
585
|
+
[data-ui-tree][data-part-root]:has([data-part-icon])
|
|
586
|
+
[data-part-row]:not(:has([data-part-icon]))
|
|
587
|
+
[data-part-label] {
|
|
588
588
|
margin-inline-start: calc(var(--_icon-size) + var(--_gap));
|
|
589
589
|
}
|
|
590
590
|
|
|
@@ -601,8 +601,8 @@
|
|
|
601
601
|
* and its count are data of unknown direction, and each one is now its own
|
|
602
602
|
* paragraph.
|
|
603
603
|
*/
|
|
604
|
-
[data-ui
|
|
605
|
-
:is([data-part
|
|
604
|
+
[data-ui-tree]
|
|
605
|
+
:is([data-part-label], [data-part-description], [data-part-meta], [data-part-empty]) {
|
|
606
606
|
unicode-bidi: plaintext;
|
|
607
607
|
}
|
|
608
608
|
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
* reader's own start edge in both directions, and leaves the truncation
|
|
618
618
|
* where it was.
|
|
619
619
|
*/
|
|
620
|
-
[data-ui
|
|
620
|
+
[data-ui-tree] [data-part-label] {
|
|
621
621
|
flex: 0 1 auto;
|
|
622
622
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
623
623
|
/**
|
|
@@ -647,22 +647,22 @@
|
|
|
647
647
|
* they are is a placeholder the eye refuses. They are literals because they
|
|
648
648
|
* are a proportion of a row rather than a step on any scale.
|
|
649
649
|
*/
|
|
650
|
-
[data-ui
|
|
650
|
+
[data-ui-tree] [data-part-label]:has([data-ui-skeleton]) {
|
|
651
651
|
flex: 1 1 auto;
|
|
652
652
|
max-inline-size: 62%;
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
-
[data-ui
|
|
656
|
-
[data-part
|
|
657
|
-
> [data-part
|
|
658
|
-
[data-part
|
|
655
|
+
[data-ui-tree]
|
|
656
|
+
[data-part-node]:nth-child(2n)
|
|
657
|
+
> [data-part-row]
|
|
658
|
+
[data-part-label]:has([data-ui-skeleton]) {
|
|
659
659
|
max-inline-size: 44%;
|
|
660
660
|
}
|
|
661
661
|
|
|
662
|
-
[data-ui
|
|
663
|
-
[data-part
|
|
664
|
-
> [data-part
|
|
665
|
-
[data-part
|
|
662
|
+
[data-ui-tree]
|
|
663
|
+
[data-part-node]:nth-child(3n)
|
|
664
|
+
> [data-part-row]
|
|
665
|
+
[data-part-label]:has([data-ui-skeleton]) {
|
|
666
666
|
max-inline-size: 73%;
|
|
667
667
|
}
|
|
668
668
|
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
* from its ground, which is the rule `--slotted-highlight-tint-opacity`
|
|
672
672
|
* states and what `select` and `combobox` already draw.
|
|
673
673
|
*/
|
|
674
|
-
[data-ui
|
|
674
|
+
[data-ui-tree] [data-part-label] mark {
|
|
675
675
|
background-color: color-mix(
|
|
676
676
|
in oklab,
|
|
677
677
|
var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, 0.075) * 100%),
|
|
@@ -685,17 +685,18 @@
|
|
|
685
685
|
* A matched span on a chosen row keeps its weight and drops its band. The
|
|
686
686
|
* band is seven and a half per cent of the tone's ink mixed into the surface,
|
|
687
687
|
* and over the tone's own ground it is neither visible nor clean — two washes
|
|
688
|
-
* of one
|
|
688
|
+
* of one color, one of them too faint to read as deliberate.
|
|
689
689
|
*/
|
|
690
|
-
[data-ui
|
|
690
|
+
[data-ui-tree] [data-part-node][data-selected] > [data-part-row] [data-part-label] mark {
|
|
691
691
|
background-color: transparent;
|
|
692
692
|
}
|
|
693
693
|
|
|
694
|
-
[data-ui
|
|
694
|
+
[data-ui-tree] [data-part-description] {
|
|
695
695
|
color: var(--_muted);
|
|
696
696
|
margin-inline-start: var(--_gap);
|
|
697
|
-
flex:
|
|
697
|
+
flex: none;
|
|
698
698
|
font-size: var(--_secondary-font-size);
|
|
699
|
+
max-inline-size: 40%;
|
|
699
700
|
min-inline-size: 0;
|
|
700
701
|
overflow: hidden;
|
|
701
702
|
text-overflow: ellipsis;
|
|
@@ -706,7 +707,7 @@
|
|
|
706
707
|
* The trailing count. It keeps its intrinsic width so a label twice as long
|
|
707
708
|
* in translation pushes on itself rather than on the number beside it.
|
|
708
709
|
*/
|
|
709
|
-
[data-ui
|
|
710
|
+
[data-ui-tree] [data-part-meta] {
|
|
710
711
|
color: var(--_muted);
|
|
711
712
|
flex: none;
|
|
712
713
|
font-size: var(--_secondary-font-size);
|
|
@@ -733,7 +734,7 @@
|
|
|
733
734
|
* that drew an arc of its own would be a second answer to the same wait,
|
|
734
735
|
* drifting from the first the moment one of them is retuned.
|
|
735
736
|
*/
|
|
736
|
-
[data-ui
|
|
737
|
+
[data-ui-tree] [data-part-loader] {
|
|
737
738
|
--slotted-spinner-size: var(--_icon-size);
|
|
738
739
|
|
|
739
740
|
block-size: var(--_icon-size);
|
|
@@ -748,7 +749,7 @@
|
|
|
748
749
|
* reachable: revealing them on hover alone puts a control behind a gesture a
|
|
749
750
|
* touch reader does not have.
|
|
750
751
|
*/
|
|
751
|
-
[data-ui
|
|
752
|
+
[data-ui-tree] [data-part-actions] {
|
|
752
753
|
align-items: center;
|
|
753
754
|
display: flex;
|
|
754
755
|
flex: none;
|
|
@@ -759,11 +760,11 @@
|
|
|
759
760
|
|
|
760
761
|
/* The free space is taken once. With a count before them, the controls sit a
|
|
761
762
|
gap after it rather than splitting the row between the two. */
|
|
762
|
-
[data-ui
|
|
763
|
+
[data-ui-tree] [data-part-meta] ~ [data-part-actions] {
|
|
763
764
|
margin-inline-start: 0;
|
|
764
765
|
}
|
|
765
766
|
|
|
766
|
-
[data-ui
|
|
767
|
+
[data-ui-tree] [data-part-empty] {
|
|
767
768
|
color: var(--_muted);
|
|
768
769
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
769
770
|
padding-inline: var(--_row-inset);
|
|
@@ -776,15 +777,13 @@
|
|
|
776
777
|
* A weaker state holds itself back for every stronger one, in the order
|
|
777
778
|
* `STATE_PRECEDENCE` names.
|
|
778
779
|
*/
|
|
779
|
-
[data-ui
|
|
780
|
-
[data-part='node']:not([data-disabled]):not([data-loading])
|
|
781
|
-
> [data-part='row']:hover {
|
|
780
|
+
[data-ui-tree] [data-part-node]:not([data-disabled]):not([data-loading]) > [data-part-row]:hover {
|
|
782
781
|
background-color: var(--_highlight);
|
|
783
782
|
}
|
|
784
783
|
|
|
785
|
-
[data-ui
|
|
786
|
-
[data-part
|
|
787
|
-
> [data-part
|
|
784
|
+
[data-ui-tree]
|
|
785
|
+
[data-part-node]:not([data-disabled]):not([data-loading])
|
|
786
|
+
> [data-part-row]:active {
|
|
788
787
|
background-color: var(--_highlight-active);
|
|
789
788
|
}
|
|
790
789
|
|
|
@@ -792,19 +791,19 @@
|
|
|
792
791
|
* The row the keyboard is on paints the same quiet ground as hover, and the
|
|
793
792
|
* ring is what tells the two apart.
|
|
794
793
|
*/
|
|
795
|
-
[data-ui
|
|
794
|
+
[data-ui-tree] [data-part-node][data-current]:not([data-disabled]) > [data-part-row] {
|
|
796
795
|
background-color: var(--_highlight);
|
|
797
796
|
}
|
|
798
797
|
|
|
799
|
-
[data-ui
|
|
798
|
+
[data-ui-tree] [data-part-node][data-selected]:not([data-disabled]) > [data-part-row] {
|
|
800
799
|
background-color: var(--_selected-surface);
|
|
801
800
|
color: var(--_selected-text);
|
|
802
801
|
}
|
|
803
802
|
|
|
804
|
-
[data-ui
|
|
805
|
-
[data-part
|
|
806
|
-
> [data-part
|
|
807
|
-
:is([data-part
|
|
803
|
+
[data-ui-tree]
|
|
804
|
+
[data-part-node][data-selected]:not([data-disabled])
|
|
805
|
+
> [data-part-row]
|
|
806
|
+
:is([data-part-icon], [data-part-meta], [data-part-expander]) {
|
|
808
807
|
color: inherit;
|
|
809
808
|
}
|
|
810
809
|
|
|
@@ -821,32 +820,32 @@
|
|
|
821
820
|
* one of the three devices R1 names, and it is quieter than a ground, which
|
|
822
821
|
* is right: the reader chose the descendant and not this.
|
|
823
822
|
*/
|
|
824
|
-
[data-ui
|
|
825
|
-
[data-part
|
|
826
|
-
> [data-part
|
|
823
|
+
[data-ui-tree]
|
|
824
|
+
[data-part-node][data-selected-within]:not([data-selected]):not([data-disabled])
|
|
825
|
+
> [data-part-row] {
|
|
827
826
|
color: var(--_selected-text);
|
|
828
827
|
}
|
|
829
828
|
|
|
830
|
-
[data-ui
|
|
831
|
-
[data-part
|
|
832
|
-
> [data-part
|
|
833
|
-
[data-part
|
|
829
|
+
[data-ui-tree]
|
|
830
|
+
[data-part-node][data-selected-within]:not([data-selected]):not([data-disabled])
|
|
831
|
+
> [data-part-row]
|
|
832
|
+
[data-part-expander] {
|
|
834
833
|
color: inherit;
|
|
835
834
|
}
|
|
836
835
|
|
|
837
|
-
[data-ui
|
|
836
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] {
|
|
838
837
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
839
838
|
cursor: not-allowed;
|
|
840
839
|
}
|
|
841
840
|
|
|
842
|
-
[data-ui
|
|
843
|
-
[data-part
|
|
844
|
-
> [data-part
|
|
845
|
-
:is([data-part
|
|
841
|
+
[data-ui-tree]
|
|
842
|
+
[data-part-node][data-disabled]
|
|
843
|
+
> [data-part-row]
|
|
844
|
+
:is([data-part-icon], [data-part-meta], [data-part-expander], [data-part-description]) {
|
|
846
845
|
color: inherit;
|
|
847
846
|
}
|
|
848
847
|
|
|
849
|
-
[data-ui
|
|
848
|
+
[data-ui-tree] [data-part-node][data-loading] > [data-part-row] {
|
|
850
849
|
cursor: progress;
|
|
851
850
|
}
|
|
852
851
|
|
|
@@ -855,19 +854,16 @@
|
|
|
855
854
|
* the top or the bottom of a scrolling canvas is not clipped by its own
|
|
856
855
|
* viewport.
|
|
857
856
|
*/
|
|
858
|
-
[data-ui
|
|
859
|
-
[data-ui
|
|
860
|
-
[data-part='canvas']:focus-visible
|
|
861
|
-
[data-part='node'][data-current]
|
|
862
|
-
> [data-part='row'] {
|
|
857
|
+
[data-ui-tree] [data-part-node]:focus-visible > [data-part-row],
|
|
858
|
+
[data-ui-tree] [data-part-canvas]:focus-visible [data-part-node][data-current] > [data-part-row] {
|
|
863
859
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
864
860
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
865
861
|
}
|
|
866
862
|
|
|
867
|
-
[data-ui
|
|
863
|
+
[data-ui-tree][data-invalid] {
|
|
868
864
|
--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);
|
|
869
865
|
--_border-color: var(--slotted-tone-danger-border);
|
|
870
|
-
/* Width as well as
|
|
866
|
+
/* Width as well as color (WCAG 1.4.1): in `high-contrast` the danger
|
|
871
867
|
border is the resting edge's black. An edge inside the border, so
|
|
872
868
|
nothing moves, in place of the resting lift — the one `text-field`
|
|
873
869
|
draws. */
|
|
@@ -875,11 +871,11 @@
|
|
|
875
871
|
--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border);
|
|
876
872
|
}
|
|
877
873
|
|
|
878
|
-
[data-ui
|
|
874
|
+
[data-ui-tree][data-disabled] {
|
|
879
875
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
880
876
|
}
|
|
881
877
|
|
|
882
|
-
[data-ui
|
|
878
|
+
[data-ui-tree][data-disabled][data-variant='framed'] {
|
|
883
879
|
background-color: var(--slotted-disabled-background, Canvas);
|
|
884
880
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
885
881
|
box-shadow: none;
|
|
@@ -894,12 +890,12 @@
|
|
|
894
890
|
* holds a slice of. The canvas falls back to `auto`, so a flat tree with no
|
|
895
891
|
* window is laid out exactly as a nested one.
|
|
896
892
|
*/
|
|
897
|
-
[data-ui
|
|
893
|
+
[data-ui-tree][data-structure='flat'] {
|
|
898
894
|
max-block-size: calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));
|
|
899
895
|
overflow: auto;
|
|
900
896
|
}
|
|
901
897
|
|
|
902
|
-
[data-ui
|
|
898
|
+
[data-ui-tree][data-structure='flat'] [data-part-canvas] {
|
|
903
899
|
block-size: var(--_canvas-size, auto);
|
|
904
900
|
max-block-size: none;
|
|
905
901
|
overflow: visible;
|
|
@@ -917,7 +913,7 @@
|
|
|
917
913
|
* because the reader scrolled it out and moving it back would take the
|
|
918
914
|
* scrollbar away from them.
|
|
919
915
|
*/
|
|
920
|
-
[data-ui
|
|
916
|
+
[data-ui-tree] [data-part-node][data-pinned] {
|
|
921
917
|
inset-block-start: var(--slotted-tree-row-offset, 0px);
|
|
922
918
|
inset-inline: 0;
|
|
923
919
|
position: absolute;
|
|
@@ -933,45 +929,45 @@
|
|
|
933
929
|
*
|
|
934
930
|
* The retuned value lands on the canvas rather than on the root. A container
|
|
935
931
|
* query styles the container's descendants and never the container itself, so
|
|
936
|
-
* a rule for `[data-ui
|
|
932
|
+
* a rule for `[data-ui-tree]` inside this block matches nothing — the tree
|
|
937
933
|
* is not its own descendant. Written on the root it looked correct and did
|
|
938
934
|
* nothing, and the harness at 240 pixels is what showed the indent had not
|
|
939
935
|
* moved. It is the second half of the two-element decision the briefing
|
|
940
936
|
* records, and the half that is easy to write and hard to see.
|
|
941
937
|
*/
|
|
942
938
|
@container slotted-tree (max-width: 320px) {
|
|
943
|
-
[data-ui
|
|
939
|
+
[data-ui-tree] [data-part-canvas] {
|
|
944
940
|
--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-3, 0.375rem));
|
|
945
941
|
}
|
|
946
942
|
}
|
|
947
943
|
|
|
948
944
|
@container slotted-tree (max-width: 240px) {
|
|
949
|
-
[data-ui
|
|
945
|
+
[data-ui-tree] [data-part-canvas] {
|
|
950
946
|
--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-2, 0.25rem));
|
|
951
947
|
--_row-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
952
948
|
}
|
|
953
949
|
|
|
954
950
|
/* The second line has no room to sit beside the first at this width. */
|
|
955
|
-
[data-ui
|
|
951
|
+
[data-ui-tree] [data-part-description] {
|
|
956
952
|
display: none;
|
|
957
953
|
}
|
|
958
954
|
}
|
|
959
955
|
|
|
960
956
|
/**
|
|
961
957
|
* The one thing the theme cannot reach. Every tone surface becomes `Canvas`
|
|
962
|
-
* under forced
|
|
958
|
+
* under forced colors, so a selection said with a tinted ground alone would
|
|
963
959
|
* say nothing in the mode that needs it most — and under the `highlight`
|
|
964
960
|
* indicator there is no mark to fall back on. `accent` is the selected tone
|
|
965
961
|
* and the theme maps it to `Highlight`, which is what is restated here.
|
|
966
962
|
*/
|
|
967
963
|
@media (forced-colors: active) {
|
|
968
|
-
[data-ui
|
|
964
|
+
[data-ui-tree] [data-part-node][data-selected] > [data-part-row] {
|
|
969
965
|
background-color: Highlight;
|
|
970
966
|
color: HighlightText;
|
|
971
967
|
forced-color-adjust: none;
|
|
972
968
|
}
|
|
973
969
|
|
|
974
|
-
[data-ui
|
|
970
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] {
|
|
975
971
|
color: GrayText;
|
|
976
972
|
}
|
|
977
973
|
|
|
@@ -979,20 +975,20 @@
|
|
|
979
975
|
* The box and its mark are painted from a tone. The theme maps `accent` to
|
|
980
976
|
* `Highlight` and `on-solid` to `HighlightText`, so the chosen box keeps
|
|
981
977
|
* both; the mark opts out as well, or the system forces its ink to the
|
|
982
|
-
* text
|
|
978
|
+
* text color and the tick loses its contrast with the box it stands on.
|
|
983
979
|
*/
|
|
984
|
-
[data-ui
|
|
980
|
+
[data-ui-tree] [data-part-indicator] > [data-ui-icon] {
|
|
985
981
|
forced-color-adjust: none;
|
|
986
982
|
}
|
|
987
983
|
}
|
|
988
984
|
|
|
989
985
|
/*
|
|
990
|
-
* Forced
|
|
986
|
+
* Forced colors remove every box shadow, and the edge with them. The width
|
|
991
987
|
* comes back as an outline inside the border; the
|
|
992
988
|
* ring belongs to a row and leaves it alone.
|
|
993
989
|
*/
|
|
994
990
|
@media (forced-colors: active) {
|
|
995
|
-
[data-ui
|
|
991
|
+
[data-ui-tree][data-variant='framed'][data-invalid] {
|
|
996
992
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
997
993
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
998
994
|
}
|