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