@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- 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 +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -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 +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -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 +204 -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 +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -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 +100 -26
- package/src/form/form.tokens.json +6 -1
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- 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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -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 +41 -27
- package/src/page/page.tokens.json +1 -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/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -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 +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- 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 +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 +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 +68 -74
- package/src/tour/tour.tokens.json +1 -0
- 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
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
"--slotted-sparkline-block-size",
|
|
39
39
|
"--slotted-sparkline-block-size-lg",
|
|
40
40
|
"--slotted-sparkline-block-size-sm",
|
|
41
|
+
"--slotted-stat-card-attention-border-color",
|
|
42
|
+
"--slotted-stat-card-attention-ink",
|
|
41
43
|
"--slotted-stat-card-background",
|
|
42
44
|
"--slotted-stat-card-background-subtle",
|
|
43
45
|
"--slotted-stat-card-border-color",
|
|
@@ -72,6 +74,9 @@
|
|
|
72
74
|
"--slotted-stat-card-region-gap-sm",
|
|
73
75
|
"--slotted-stat-card-shadow",
|
|
74
76
|
"--slotted-stat-card-shadow-elevated",
|
|
77
|
+
"--slotted-stat-card-trend-block-size",
|
|
78
|
+
"--slotted-stat-card-trend-block-size-lg",
|
|
79
|
+
"--slotted-stat-card-trend-block-size-sm",
|
|
75
80
|
"--slotted-stat-card-trend-gap",
|
|
76
81
|
"--slotted-stat-card-trend-gap-lg",
|
|
77
82
|
"--slotted-stat-card-trend-gap-sm",
|
|
@@ -90,8 +95,11 @@
|
|
|
90
95
|
"--slotted-text",
|
|
91
96
|
"--slotted-text-muted",
|
|
92
97
|
"--slotted-tone-accent-text",
|
|
98
|
+
"--slotted-tone-danger-border",
|
|
93
99
|
"--slotted-tone-danger-text",
|
|
100
|
+
"--slotted-tone-info-text",
|
|
94
101
|
"--slotted-tone-secondary-text",
|
|
95
102
|
"--slotted-tone-success-text",
|
|
103
|
+
"--slotted-tone-warning-border",
|
|
96
104
|
"--slotted-tone-warning-text"
|
|
97
105
|
]
|
|
@@ -8,19 +8,26 @@
|
|
|
8
8
|
* link, and it holds no state of its own — a component that moved its own
|
|
9
9
|
* status would be describing a system it cannot see.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* the whole box is built around. A status is often a sentence —
|
|
13
|
-
* approval from the security team” — and this family lets it
|
|
14
|
-
* `badge` clips its own label to one line.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* The mark is inside the first line, not in a column beside it, and that is
|
|
12
|
+
* the decision the whole box is built around. A status is often a sentence —
|
|
13
|
+
* “Waiting for approval from the security team” — and this family lets it
|
|
14
|
+
* wrap where `badge` clips its own label to one line. The mark is an inline
|
|
15
|
+
* box before the label, centerd on the capitals, and the label is an
|
|
16
|
+
* `inline-block` beside it: the words wrap inside that block, so every line
|
|
17
|
+
* after the first starts under the first word rather than under the mark,
|
|
18
|
+
* and the block lends its first baseline to whatever aligns the root — a
|
|
19
|
+
* table row aligns on the label, never on a second line under it.
|
|
17
20
|
*
|
|
18
|
-
* The
|
|
21
|
+
* The root is the consumer's element: `span`, `a`, `td`. Only an inline root
|
|
22
|
+
* becomes an `inline-block`; a cell or a block keeps its own display and its
|
|
23
|
+
* own padding.
|
|
24
|
+
*
|
|
25
|
+
* The words take the page's own color. The tone is on the mark, which is
|
|
19
26
|
* what keeps a column of statuses in a table as readable as the column
|
|
20
27
|
* beside it — the answer Spectrum, Chakra and Ant Design all reached, and
|
|
21
|
-
* the opposite of the
|
|
28
|
+
* the opposite of the colored pill Primer and Atlassian draw.
|
|
22
29
|
*/
|
|
23
|
-
[data-ui
|
|
30
|
+
[data-ui-status-indicator][data-part-root] {
|
|
24
31
|
/**
|
|
25
32
|
* Type and glyph come from the control scales, the only ones the theme
|
|
26
33
|
* restates per density, so a status shrinks with the row it sits in. The
|
|
@@ -28,9 +35,13 @@
|
|
|
28
35
|
* small would be sub-pixel, and density already moves the type.
|
|
29
36
|
*/
|
|
30
37
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
31
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The glyph is the words' own size rounded to an even pixel, as
|
|
40
|
+
* `inline-message` draws its mark (R5): 12 pixels at `sm`, 14 at `md` and
|
|
41
|
+
* `lg`, the two grids the status glyphs are drawn on.
|
|
42
|
+
*/
|
|
43
|
+
--_glyph-size: round(nearest, 1em, 2px);
|
|
32
44
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
33
|
-
--_line-height: var(--slotted-line-height-md, 1.5);
|
|
34
45
|
|
|
35
46
|
/**
|
|
36
47
|
* The disc is a whole number of pixels from the space scale: 8 at `md` and
|
|
@@ -38,8 +49,7 @@
|
|
|
38
49
|
* fractional disc lands its edge across two device pixels at 1×. ReUI draws
|
|
39
50
|
* the same light at 6 pixels beside 14-pixel type (0.43 em); 8 beside 13 is
|
|
40
51
|
* 0.62 em, which keeps the tone legible in a table cell without
|
|
41
|
-
* outweighing the word.
|
|
42
|
-
* `docs/history/designs/2026-09-25-status-indicator-reui-dossier.md` § 3.
|
|
52
|
+
* outweighing the word.
|
|
43
53
|
*/
|
|
44
54
|
--_dot-size: var(--slotted-space-4, 0.5rem);
|
|
45
55
|
--_mark-size: var(--_dot-size);
|
|
@@ -52,13 +62,13 @@
|
|
|
52
62
|
* Every tone's fill clears WCAG 2.2 1.4.11's 3:1 against the surface in
|
|
53
63
|
* light and dark except `warning`, whose yellow is 1.53:1 on white; that
|
|
54
64
|
* one status sets `--_edge` to the tone's border role. The rim was the
|
|
55
|
-
* tone's text role on every status, and a second
|
|
65
|
+
* tone's text role on every status, and a second color around the fill
|
|
56
66
|
* drew a bullseye: brown around yellow, near-black around grey, and a pale
|
|
57
67
|
* ring around every tone in dark (dossier § 3).
|
|
58
68
|
*/
|
|
59
69
|
--_rim: var(--slotted-status-indicator-mark-border-color, var(--_edge, var(--_solid)));
|
|
60
70
|
/**
|
|
61
|
-
* The halo: a band of the dot's own
|
|
71
|
+
* The halo: a band of the dot's own color at a fifth of its strength,
|
|
62
72
|
* drawn outside the disc with `box-shadow` so it takes no room in the
|
|
63
73
|
* line. It is what separates a status light from a bullet — the disc
|
|
64
74
|
* reads as lit rather than printed — and it costs no contrast, because
|
|
@@ -70,30 +80,20 @@
|
|
|
70
80
|
--_halo-width: calc(var(--slotted-space-1, 0.125rem) * 1.5);
|
|
71
81
|
|
|
72
82
|
/**
|
|
73
|
-
*
|
|
74
|
-
* than off the mark: when the icon mark was a `mask-image`, the mask
|
|
75
|
-
* clipped the element's pseudo-elements with it, and a ring behind a
|
|
76
|
-
* triangle was cut into the shape of that triangle and then disappeared.
|
|
77
|
-
* Photographed at 300% before it was moved here, and kept here so the
|
|
78
|
-
* ring never depends on how a mark is drawn. Rounded to a whole pixel, the
|
|
79
|
-
* rule `alert` applies to its own mark, so the disc never straddles one.
|
|
80
|
-
*/
|
|
81
|
-
--_pulse-inset: round(nearest, (1lh - var(--_mark-size)) / 2, 1px);
|
|
82
|
-
|
|
83
|
-
align-items: flex-start;
|
|
84
|
-
/**
|
|
85
|
-
* The words keep the page's colour when `render` makes the root an `<a>`;
|
|
83
|
+
* The words keep the page's color when `render` makes the root an `<a>`;
|
|
86
84
|
* without this the user agent paints the label in its link blue.
|
|
87
85
|
*/
|
|
88
86
|
color: inherit;
|
|
89
|
-
display: inline-flex;
|
|
90
87
|
font-family: var(
|
|
91
88
|
--slotted-status-indicator-font-family,
|
|
92
89
|
var(--slotted-control-font-family, sans-serif)
|
|
93
90
|
);
|
|
94
91
|
font-size: var(--_font-size);
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
/**
|
|
93
|
+
* The leading, rounded up to an even pixel: 13 × 1.5 is 19.5 and lands the
|
|
94
|
+
* line, and the mark centerd on it, across two device pixels.
|
|
95
|
+
*/
|
|
96
|
+
line-height: round(up, 1em * var(--slotted-line-height-md, 1.5), 2px);
|
|
97
97
|
/**
|
|
98
98
|
* The indicator never widens the box that holds it. Its own minimum is the
|
|
99
99
|
* longest word of a label it did not choose, and a grid or flex parent
|
|
@@ -103,15 +103,21 @@
|
|
|
103
103
|
* label breaks the token at whatever width it is given.
|
|
104
104
|
*/
|
|
105
105
|
min-inline-size: 0;
|
|
106
|
-
position: relative;
|
|
107
106
|
/**
|
|
108
107
|
* `render` can make the root an `<a>`, and the rule a browser writes on
|
|
109
108
|
* every anchor would put a line under a status at rest. The linked root
|
|
110
109
|
* below draws its own underline, hidden until the pointer arrives.
|
|
111
110
|
*/
|
|
112
111
|
text-decoration: none;
|
|
113
|
-
/*
|
|
114
|
-
|
|
112
|
+
/* The mark and the label never part; the label wraps inside its own box. */
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Written inside a sentence, the indicator sits on the sentence's baseline. */
|
|
117
|
+
[data-ui-status-indicator][data-part-root]:not(td, th, li, div, p) {
|
|
118
|
+
display: inline-block;
|
|
119
|
+
max-inline-size: 100%;
|
|
120
|
+
vertical-align: baseline;
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
/* ── Status: the tone each state speaks in ────────────────────────────
|
|
@@ -119,20 +125,20 @@
|
|
|
119
125
|
* Six values, and the map is `specs/components/status-indicator/contract.json`
|
|
120
126
|
* rather than a decision taken here: the stylesheet, both bindings and the
|
|
121
127
|
* contract test all read the same table. The glyph each status draws is in
|
|
122
|
-
* the same contract, and the bindings render it; the sheet only
|
|
128
|
+
* the same contract, and the bindings render it; the sheet only colors it.
|
|
123
129
|
*
|
|
124
130
|
* `neutral` and `unknown` share `secondary` on purpose, so the difference
|
|
125
131
|
* between “nothing is happening” and “nobody knows” is never carried by
|
|
126
|
-
*
|
|
127
|
-
* in
|
|
132
|
+
* color. The filled disc and the dashed ring say it in `high-contrast` and
|
|
133
|
+
* in grayscale as well as in `light`.
|
|
128
134
|
*/
|
|
129
135
|
|
|
130
|
-
[data-ui
|
|
136
|
+
[data-ui-status-indicator][data-part-root][data-status='neutral'] {
|
|
131
137
|
/**
|
|
132
138
|
* The one neutral the theme calibrates against the surface rather than
|
|
133
139
|
* against a control, and the only fill that makes this dot read as filled.
|
|
134
140
|
*
|
|
135
|
-
* `--slotted-tone-secondary-solid` is the surface's own
|
|
141
|
+
* `--slotted-tone-secondary-solid` is the surface's own color in all
|
|
136
142
|
* three schemes, and its `solid-hover` step — which `badge` reaches for on
|
|
137
143
|
* a chip the size of a word — is one shade off it. Read at 420 pixels on a
|
|
138
144
|
* nine-pixel disc, that was a rim around nothing: `neutral` and `unknown`
|
|
@@ -145,12 +151,12 @@
|
|
|
145
151
|
--_text: var(--slotted-tone-secondary-text);
|
|
146
152
|
}
|
|
147
153
|
|
|
148
|
-
[data-ui
|
|
154
|
+
[data-ui-status-indicator][data-part-root][data-status='info'] {
|
|
149
155
|
--_solid: var(--slotted-tone-accent-solid);
|
|
150
156
|
--_text: var(--slotted-tone-accent-text);
|
|
151
157
|
}
|
|
152
158
|
|
|
153
|
-
[data-ui
|
|
159
|
+
[data-ui-status-indicator][data-part-root][data-status='success'] {
|
|
154
160
|
--_solid: var(--slotted-tone-success-solid);
|
|
155
161
|
--_text: var(--slotted-tone-success-text);
|
|
156
162
|
}
|
|
@@ -159,15 +165,15 @@
|
|
|
159
165
|
* The one fill that cannot hold its edge: `#facc15` is 1.53:1 on the light
|
|
160
166
|
* surface. The tone's border role is the same hue a step darker, 2.94:1 in
|
|
161
167
|
* light, the fill itself in dark and black in `high-contrast` — an edge that
|
|
162
|
-
* reads as the dot's own rim rather than as a second
|
|
168
|
+
* reads as the dot's own rim rather than as a second color around it.
|
|
163
169
|
*/
|
|
164
|
-
[data-ui
|
|
170
|
+
[data-ui-status-indicator][data-part-root][data-status='warning'] {
|
|
165
171
|
--_edge: var(--slotted-tone-warning-border);
|
|
166
172
|
--_solid: var(--slotted-tone-warning-solid);
|
|
167
173
|
--_text: var(--slotted-tone-warning-text);
|
|
168
174
|
}
|
|
169
175
|
|
|
170
|
-
[data-ui
|
|
176
|
+
[data-ui-status-indicator][data-part-root][data-status='danger'] {
|
|
171
177
|
--_solid: var(--slotted-tone-danger-solid);
|
|
172
178
|
--_text: var(--slotted-tone-danger-text);
|
|
173
179
|
}
|
|
@@ -178,7 +184,7 @@
|
|
|
178
184
|
* has no halo of its own; the ring is drawn where the halo of a lit dot
|
|
179
185
|
* ends, below.
|
|
180
186
|
*/
|
|
181
|
-
[data-ui
|
|
187
|
+
[data-ui-status-indicator][data-part-root][data-status='unknown'] {
|
|
182
188
|
--_edge: var(--slotted-border-strong);
|
|
183
189
|
--_halo: transparent;
|
|
184
190
|
--_solid: transparent;
|
|
@@ -192,42 +198,49 @@
|
|
|
192
198
|
* the mark left the ring the size of a dot around a sixteen-pixel glyph, and
|
|
193
199
|
* one and three quarter pixels above where it belonged.
|
|
194
200
|
*/
|
|
195
|
-
[data-ui
|
|
201
|
+
[data-ui-status-indicator][data-part-root][data-mark='icon'] {
|
|
196
202
|
--_mark-size: var(--_glyph-size);
|
|
197
203
|
}
|
|
198
204
|
|
|
199
205
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
200
206
|
|
|
201
|
-
[data-ui
|
|
207
|
+
[data-ui-status-indicator][data-part-root][data-size='sm'] {
|
|
202
208
|
--_dot-size: var(--slotted-space-3, 0.375rem);
|
|
203
209
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
204
|
-
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
205
210
|
--_gap: var(--slotted-space-3, 0.375rem);
|
|
206
211
|
--_halo-width: var(--slotted-space-1, 0.125rem);
|
|
207
212
|
}
|
|
208
213
|
|
|
209
|
-
[data-ui
|
|
214
|
+
[data-ui-status-indicator][data-part-root][data-size='lg'] {
|
|
210
215
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
211
|
-
--_glyph-size: var(--slotted-control-icon-size-lg, 18px);
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
/* ── The mark ─────────────────────────────────────────────────────────
|
|
215
219
|
*
|
|
216
|
-
* One box, painted two ways
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
220
|
+
* One box, painted two ways, inside the first line. Its center is the
|
|
221
|
+
* center of the capitals, `0.5cap` above the baseline — the axis
|
|
222
|
+
* `[data-ui-icon]` aligns every icon on — rounded to the device pixel: half
|
|
223
|
+
* a pixel at 2×, a whole one below 1.5×. Layout containment makes the box's
|
|
224
|
+
* own bottom edge its baseline, whatever it holds.
|
|
221
225
|
*/
|
|
222
|
-
[data-ui
|
|
226
|
+
[data-ui-status-indicator] [data-part-mark] {
|
|
223
227
|
block-size: var(--_mark-size);
|
|
224
228
|
box-sizing: border-box;
|
|
225
|
-
|
|
229
|
+
contain: layout;
|
|
230
|
+
display: inline-flex;
|
|
226
231
|
inline-size: var(--_mark-size);
|
|
227
|
-
margin-
|
|
232
|
+
margin-inline-end: var(--_gap);
|
|
233
|
+
position: relative;
|
|
234
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 0.5px);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (max-resolution: 1.49dppx) {
|
|
238
|
+
[data-ui-status-indicator] [data-part-mark] {
|
|
239
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 1px);
|
|
240
|
+
}
|
|
228
241
|
}
|
|
229
242
|
|
|
230
|
-
[data-ui
|
|
243
|
+
[data-ui-status-indicator][data-mark='dot'] [data-part-mark] {
|
|
231
244
|
background-color: var(--_solid, ButtonFace);
|
|
232
245
|
border: var(--_rim-width) solid var(--_rim, CanvasText);
|
|
233
246
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -239,9 +252,8 @@
|
|
|
239
252
|
* to `neutral` and `unknown` sharing a tone, and it is the only mark in the
|
|
240
253
|
* family that says something by what it is missing.
|
|
241
254
|
*/
|
|
242
|
-
[data-ui
|
|
255
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark] {
|
|
243
256
|
border: 0;
|
|
244
|
-
position: relative;
|
|
245
257
|
}
|
|
246
258
|
|
|
247
259
|
/**
|
|
@@ -253,7 +265,7 @@
|
|
|
253
265
|
* neighbours, and read as a speck rather than as a status. `outline` is
|
|
254
266
|
* reserved for the focus ring (`focus-ring.test.mjs`).
|
|
255
267
|
*/
|
|
256
|
-
[data-ui
|
|
268
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark]::before {
|
|
257
269
|
border: var(--slotted-border-width-thick, 2px) dashed var(--_rim);
|
|
258
270
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
259
271
|
box-sizing: border-box;
|
|
@@ -274,25 +286,26 @@
|
|
|
274
286
|
* the disc is left to the mark that is a disc.
|
|
275
287
|
*
|
|
276
288
|
* The mark is the icon box's container: it hands the box its own size
|
|
277
|
-
* through `--slotted-icon-size` and its
|
|
278
|
-
* binding puts the status's glyph inside
|
|
279
|
-
* no strut of the root's line-height pushes the glyph off the box.
|
|
289
|
+
* through `--slotted-icon-size` and its color through `color`, and the
|
|
290
|
+
* binding puts the status's glyph inside, drawn on the grid of that size.
|
|
280
291
|
*/
|
|
281
|
-
[data-ui
|
|
292
|
+
[data-ui-status-indicator][data-mark='icon'] [data-part-mark] {
|
|
282
293
|
--slotted-icon-size: var(--_mark-size);
|
|
283
294
|
|
|
284
295
|
color: var(--_text, CanvasText);
|
|
285
|
-
display: flex;
|
|
286
296
|
}
|
|
287
297
|
|
|
288
298
|
/* ── The words ────────────────────────────────────────────────────────
|
|
289
299
|
*
|
|
290
|
-
* `
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* a
|
|
294
|
-
*
|
|
295
|
-
*
|
|
300
|
+
* An `inline-block` on the first line, as wide as the root less the mark:
|
|
301
|
+
* the words wrap inside it, so the lines after the first hang under the
|
|
302
|
+
* first word. `baseline-source: first` is what a table row reads — a label
|
|
303
|
+
* with a detail under it aligns the row on its first line, not its last.
|
|
304
|
+
*
|
|
305
|
+
* `overflow-wrap` breaks the one string a status is likeliest to hold that
|
|
306
|
+
* no language can break — a deployment id, a container digest, a hostname
|
|
307
|
+
* without a hyphen. Nothing is ever removed: the whole string stays in the
|
|
308
|
+
* DOM, in the accessibility tree and findable by a page search.
|
|
296
309
|
*
|
|
297
310
|
* `break-word` rather than `anywhere`, and the difference is the one this
|
|
298
311
|
* family was caught by. Both break the token; only `anywhere` also reports a
|
|
@@ -302,21 +315,35 @@
|
|
|
302
315
|
* first column was auto-sized. `break-word` keeps the longest word as the
|
|
303
316
|
* minimum and breaks only what still does not fit.
|
|
304
317
|
*/
|
|
305
|
-
[data-ui
|
|
306
|
-
|
|
307
|
-
|
|
318
|
+
[data-ui-status-indicator] [data-part-label] {
|
|
319
|
+
baseline-source: first;
|
|
320
|
+
display: inline-block;
|
|
321
|
+
max-inline-size: calc(100% - var(--_mark-size) - var(--_gap));
|
|
308
322
|
overflow-wrap: break-word;
|
|
323
|
+
/* No `vertical-align`: the shorthand resets `baseline-source` to `auto`,
|
|
324
|
+
the last line, and the root then aligned on the detail. */
|
|
325
|
+
white-space: normal;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* A second, quieter line under the words — “62% · build”, “4 minutes ago” —
|
|
330
|
+
* in the label's own column, so it hangs under the first word as well.
|
|
331
|
+
*/
|
|
332
|
+
[data-ui-status-indicator] [data-part-detail] {
|
|
333
|
+
color: var(--slotted-text-muted, GrayText);
|
|
334
|
+
display: block;
|
|
309
335
|
}
|
|
310
336
|
|
|
311
337
|
/**
|
|
312
338
|
* The gap taken back when the label holds nothing a reader can see. A mark
|
|
313
339
|
* with no visible words still carries its own word, clipped by
|
|
314
340
|
* `visually-hidden`, and that word is out of flow — so the label box is
|
|
315
|
-
* empty, and a gap
|
|
316
|
-
*
|
|
341
|
+
* empty, and a gap after the mark puts a bare dot off the center of the
|
|
342
|
+
* cell it was meant to sit in.
|
|
317
343
|
*/
|
|
318
|
-
[data-ui
|
|
319
|
-
|
|
344
|
+
[data-ui-status-indicator]:has(> [data-part-label] > [data-part-announcement]:only-child)
|
|
345
|
+
> [data-part-mark] {
|
|
346
|
+
margin-inline-end: 0;
|
|
320
347
|
}
|
|
321
348
|
|
|
322
349
|
/* ── Focus ────────────────────────────────────────────────────────────
|
|
@@ -326,7 +353,7 @@
|
|
|
326
353
|
* root an `<a>` or a `<button>`, and a ring that appears only where a family
|
|
327
354
|
* expects focus is a ring that goes missing.
|
|
328
355
|
*/
|
|
329
|
-
[data-ui
|
|
356
|
+
[data-ui-status-indicator][data-part-root]:focus-visible {
|
|
330
357
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
331
358
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
332
359
|
}
|
|
@@ -340,7 +367,7 @@
|
|
|
340
367
|
* text role, a step hover does not take. The offset is `link`'s own 0.15em
|
|
341
368
|
* (dossier § 4).
|
|
342
369
|
*/
|
|
343
|
-
[data-ui
|
|
370
|
+
[data-ui-status-indicator][data-part-root]:any-link {
|
|
344
371
|
text-decoration-color: transparent;
|
|
345
372
|
text-decoration-line: underline;
|
|
346
373
|
text-decoration-thickness: from-font;
|
|
@@ -350,11 +377,11 @@
|
|
|
350
377
|
text-decoration-color var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
351
378
|
}
|
|
352
379
|
|
|
353
|
-
[data-ui
|
|
380
|
+
[data-ui-status-indicator][data-part-root]:any-link:not([data-disabled]):hover {
|
|
354
381
|
text-decoration-color: currentColor;
|
|
355
382
|
}
|
|
356
383
|
|
|
357
|
-
[data-ui
|
|
384
|
+
[data-ui-status-indicator][data-part-root]:any-link:not([data-disabled]):active {
|
|
358
385
|
color: var(--slotted-text-muted, GrayText);
|
|
359
386
|
text-decoration-color: currentColor;
|
|
360
387
|
}
|
|
@@ -394,28 +421,25 @@
|
|
|
394
421
|
}
|
|
395
422
|
|
|
396
423
|
/**
|
|
397
|
-
* The wave is the dot's rim
|
|
424
|
+
* The wave is the dot's rim color, defined for all six statuses —
|
|
398
425
|
* `unknown` has no fill, and its wave is the neutral edge. It starts at
|
|
399
|
-
* 0.45 of that
|
|
426
|
+
* 0.45 of that color and ends at three times the dot, 24 pixels at `md`,
|
|
400
427
|
* inside the line above and below without reaching the next status in a
|
|
401
428
|
* list (dossier § 5). The root isolates a
|
|
402
429
|
* stacking context so the wave can sit under the mark (`z-index: -1`)
|
|
403
430
|
* without falling behind the surface the indicator is drawn on.
|
|
404
431
|
*/
|
|
405
|
-
[data-ui
|
|
432
|
+
[data-ui-status-indicator][data-pulse] {
|
|
406
433
|
isolation: isolate;
|
|
407
434
|
}
|
|
408
435
|
|
|
409
|
-
[data-ui
|
|
436
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
410
437
|
animation: slotted-status-indicator-pulse var(--slotted-duration-loop-slow)
|
|
411
438
|
var(--slotted-easing-enter) infinite;
|
|
412
439
|
background-color: var(--_rim);
|
|
413
|
-
block-size: var(--_mark-size);
|
|
414
440
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
415
441
|
content: '';
|
|
416
|
-
|
|
417
|
-
inset-block-start: var(--_pulse-inset);
|
|
418
|
-
inset-inline-start: 0;
|
|
442
|
+
inset: 0;
|
|
419
443
|
pointer-events: none;
|
|
420
444
|
position: absolute;
|
|
421
445
|
z-index: -1;
|
|
@@ -429,7 +453,7 @@
|
|
|
429
453
|
* carried by the tone, the glyph and the word, as it is under reduced
|
|
430
454
|
* motion.
|
|
431
455
|
*/
|
|
432
|
-
[data-ui
|
|
456
|
+
[data-ui-status-indicator][data-mark='icon'][data-pulse] [data-part-mark]::after {
|
|
433
457
|
content: none;
|
|
434
458
|
}
|
|
435
459
|
|
|
@@ -440,16 +464,16 @@
|
|
|
440
464
|
* and the status is left to the parts that were always carrying it.
|
|
441
465
|
*/
|
|
442
466
|
@media (prefers-reduced-motion: reduce) {
|
|
443
|
-
[data-ui
|
|
467
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
444
468
|
animation: none;
|
|
445
469
|
content: none;
|
|
446
470
|
}
|
|
447
471
|
}
|
|
448
472
|
|
|
449
473
|
/**
|
|
450
|
-
* ── Forced
|
|
474
|
+
* ── Forced colors ─────────────────────────────────────────────────────
|
|
451
475
|
*
|
|
452
|
-
* The operating system replaces every author
|
|
476
|
+
* The operating system replaces every author color here, so the tone is
|
|
453
477
|
* gone whatever the family writes: the six statuses become one mark. What is
|
|
454
478
|
* left to decide is whether that mark is visible, and a dot painted from a
|
|
455
479
|
* forced `Canvas` background is not — the defect `link` found on its own
|
|
@@ -460,21 +484,21 @@
|
|
|
460
484
|
* would bury it. It keeps its silhouette, which is the whole reason the icon
|
|
461
485
|
* mark exists: a triangle and a circled cross are still different from each
|
|
462
486
|
* other when neither of them is red. The pulse is withdrawn, because its wave
|
|
463
|
-
* is painted from a tone the system replaces with a face
|
|
487
|
+
* is painted from a tone the system replaces with a face color, and a wave
|
|
464
488
|
* in `ButtonFace` on `Canvas` is an animation of nothing. The halo needs no
|
|
465
489
|
* rule: the system sets `box-shadow` to `none`.
|
|
466
490
|
*/
|
|
467
491
|
@media (forced-colors: active) {
|
|
468
|
-
[data-ui
|
|
492
|
+
[data-ui-status-indicator][data-mark='dot'] [data-part-mark] {
|
|
469
493
|
background-color: CanvasText;
|
|
470
494
|
border-color: CanvasText;
|
|
471
495
|
}
|
|
472
496
|
|
|
473
|
-
[data-ui
|
|
497
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark] {
|
|
474
498
|
background-color: Canvas;
|
|
475
499
|
}
|
|
476
500
|
|
|
477
|
-
[data-ui
|
|
501
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
478
502
|
content: none;
|
|
479
503
|
}
|
|
480
504
|
}
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
"--slotted-control-font-size-lg",
|
|
7
7
|
"--slotted-control-font-size-md",
|
|
8
8
|
"--slotted-control-font-size-sm",
|
|
9
|
-
"--slotted-control-icon-size-lg",
|
|
10
|
-
"--slotted-control-icon-size-md",
|
|
11
|
-
"--slotted-control-icon-size-sm",
|
|
12
9
|
"--slotted-duration-loop-slow",
|
|
13
10
|
"--slotted-duration-short",
|
|
14
11
|
"--slotted-easing-enter",
|