@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/chart/chart.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the family draws every interaction over. The table is a view of the plot,
|
|
6
6
|
* shown in the plot's own box.
|
|
7
7
|
*
|
|
8
|
-
* ┌ figure [data-ui
|
|
8
|
+
* ┌ figure [data-ui-chart] ─────────────────────────────────────────┐
|
|
9
9
|
* │ header title (help) · description actions toolbar │
|
|
10
10
|
* │ legend ▬ Revenue ■ Cost ● Visits +3 │
|
|
11
11
|
* │ plot ┌ canvas (engine) · table-region (the table view) ───┐ │
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
* resolves them at the plot, so a scheme, a density, a palette or a token a
|
|
25
25
|
* consumer overrides on a wrapper reaches the marks through the cascade.
|
|
26
26
|
*/
|
|
27
|
-
[data-ui
|
|
27
|
+
[data-ui-chart] {
|
|
28
28
|
--_gap: var(--slotted-chart-gap, var(--slotted-space-5, 0.75rem));
|
|
29
29
|
--_plot-size: var(--slotted-chart-plot-block-size, calc(var(--slotted-space-12, 4rem) * 4));
|
|
30
30
|
--_radius: var(--slotted-chart-radius, var(--slotted-radius-md, 6px));
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* ──
|
|
33
|
+
* ── Color ──────────────────────────────────────────────────────────
|
|
34
34
|
*
|
|
35
35
|
* Declared on the root so the legend, the tooltip, the markers and the
|
|
36
36
|
* engine read one palette. `--slotted-chart-color-1` … `-8` retune it for
|
|
37
37
|
* every chart under a wrapper, or for one chart; unset, it is the theme's
|
|
38
38
|
* data scale. A series names a step with `slot` and a meaning with
|
|
39
|
-
* `tone`; no series takes a
|
|
39
|
+
* `tone`; no series takes a color value (`docs/component-features.md`
|
|
40
40
|
* §2.4).
|
|
41
41
|
*/
|
|
42
42
|
--_chart-slot-1: var(--slotted-chart-color-1, var(--slotted-data-1));
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
--_chart-tone-accent: var(--slotted-tone-accent-text, CanvasText);
|
|
52
52
|
--_chart-tone-secondary: var(--slotted-tone-secondary-text, CanvasText);
|
|
53
53
|
--_chart-tone-success: var(--slotted-tone-success-text, CanvasText);
|
|
54
|
+
--_chart-tone-info: var(--slotted-tone-info-text, CanvasText);
|
|
54
55
|
--_chart-tone-warning: var(--slotted-tone-warning-text, CanvasText);
|
|
55
56
|
--_chart-tone-danger: var(--slotted-tone-danger-text, CanvasText);
|
|
56
57
|
--_chart-overflow: var(--slotted-text-muted, GrayText);
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
--_chart-line-width: var(--slotted-chart-line-width, var(--slotted-border-width-thick, 2px));
|
|
73
74
|
--_chart-marker-size: var(--slotted-chart-marker-size, var(--slotted-space-4, 0.5rem));
|
|
74
75
|
--_chart-bar-radius: var(--slotted-chart-bar-radius, var(--slotted-radius-sm, 4px));
|
|
75
|
-
/* The wash under a line, as a share of the series
|
|
76
|
+
/* The wash under a line, as a share of the series color. A number and
|
|
76
77
|
not a token step, for the reason `sparkline` records beside its own:
|
|
77
78
|
no scale in the foundation holds an opacity for a fill read through. */
|
|
78
79
|
--_chart-area-opacity: var(--slotted-chart-area-opacity, 0.18);
|
|
@@ -98,11 +99,11 @@
|
|
|
98
99
|
/* Three heights on the space scale's top step: 12, 16 and 24 rem. A plot
|
|
99
100
|
is content, not a control, so the height does not follow density; what
|
|
100
101
|
density moves is the inset around the marks and the type on the axes. */
|
|
101
|
-
[data-ui
|
|
102
|
+
[data-ui-chart][data-size='sm'] {
|
|
102
103
|
--_plot-size: var(--slotted-chart-plot-block-size-sm, calc(var(--slotted-space-12, 4rem) * 3));
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
[data-ui
|
|
106
|
+
[data-ui-chart][data-size='lg'] {
|
|
106
107
|
--_plot-size: var(--slotted-chart-plot-block-size-lg, calc(var(--slotted-space-12, 4rem) * 6));
|
|
107
108
|
}
|
|
108
109
|
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
* are mixed in CSS from tokens the theme already owns, so they follow every
|
|
118
119
|
* scheme and brand with no scale of their own.
|
|
119
120
|
*/
|
|
120
|
-
[data-ui
|
|
121
|
+
[data-ui-chart][data-palette='sequential'] {
|
|
121
122
|
--_hue: var(--slotted-chart-sequential-color, var(--slotted-tone-accent-text, CanvasText));
|
|
122
123
|
--_chart-slot-1: var(--_hue);
|
|
123
124
|
--_chart-slot-2: color-mix(in oklab, var(--_hue) 76%, var(--_chart-surface));
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
--_chart-slot-8: color-mix(in oklab, var(--_hue) 10%, var(--_chart-surface));
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
[data-ui
|
|
133
|
+
[data-ui-chart][data-palette='focus'] {
|
|
133
134
|
--_muted: var(--slotted-text-muted, GrayText);
|
|
134
135
|
--_chart-slot-1: var(--slotted-chart-focus-color, var(--slotted-tone-accent-text, CanvasText));
|
|
135
136
|
--_chart-slot-2: color-mix(in oklab, var(--_muted) 70%, var(--_chart-surface));
|
|
@@ -151,7 +152,7 @@
|
|
|
151
152
|
* never less than its size step — so tiles in one row end on one line
|
|
152
153
|
* whatever their titles and legends hold.
|
|
153
154
|
*/
|
|
154
|
-
[data-ui
|
|
155
|
+
[data-ui-chart][data-variant='card'] {
|
|
155
156
|
--_chart-surface: var(--slotted-chart-surface, var(--slotted-surface-raised, Canvas));
|
|
156
157
|
|
|
157
158
|
background-color: var(--_chart-surface);
|
|
@@ -167,7 +168,18 @@
|
|
|
167
168
|
`description` and `actions` are also parts of the families a plot
|
|
168
169
|
composes — `result-state` in an empty or failed plot — and a bare
|
|
169
170
|
descendant selector restyled theirs. */
|
|
170
|
-
[data-ui
|
|
171
|
+
[data-ui-chart] > [data-part-header] {
|
|
172
|
+
/* The controls sit on the title's first line and hang past their box by
|
|
173
|
+
the difference, so the row does not grow the header. The actions and
|
|
174
|
+
the toolbar share it, which is what puts them on one center. */
|
|
175
|
+
--_control-bleed: calc(
|
|
176
|
+
(
|
|
177
|
+
var(--slotted-font-size-lg, 1rem) * var(--slotted-line-height-lg, 1.5) -
|
|
178
|
+
var(--slotted-control-height-sm, 1.75rem)
|
|
179
|
+
) /
|
|
180
|
+
2
|
|
181
|
+
);
|
|
182
|
+
|
|
171
183
|
align-items: start;
|
|
172
184
|
display: flex;
|
|
173
185
|
gap: var(--slotted-space-4, 0.5rem);
|
|
@@ -175,22 +187,22 @@
|
|
|
175
187
|
}
|
|
176
188
|
|
|
177
189
|
/* The heading block: title and help on one line, the description under. */
|
|
178
|
-
[data-ui
|
|
190
|
+
[data-ui-chart] > [data-part-header] > :first-child {
|
|
179
191
|
align-content: start;
|
|
180
192
|
display: grid;
|
|
181
193
|
flex: 1 1 auto;
|
|
182
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
194
|
+
gap: var(--slotted-chart-header-gap, var(--slotted-space-1, 0.125rem));
|
|
183
195
|
min-inline-size: 0;
|
|
184
196
|
}
|
|
185
197
|
|
|
186
|
-
[data-ui
|
|
198
|
+
[data-ui-chart] > [data-part-header] > :first-child > :first-child {
|
|
187
199
|
align-items: center;
|
|
188
200
|
display: flex;
|
|
189
201
|
gap: var(--slotted-space-2, 0.25rem);
|
|
190
202
|
min-inline-size: 0;
|
|
191
203
|
}
|
|
192
204
|
|
|
193
|
-
[data-ui
|
|
205
|
+
[data-ui-chart] > [data-part-header] [data-part-title] {
|
|
194
206
|
color: var(--slotted-text, CanvasText);
|
|
195
207
|
font-family: var(
|
|
196
208
|
--slotted-font-family-heading,
|
|
@@ -203,7 +215,7 @@
|
|
|
203
215
|
overflow-wrap: anywhere;
|
|
204
216
|
}
|
|
205
217
|
|
|
206
|
-
[data-ui
|
|
218
|
+
[data-ui-chart] > [data-part-header] [data-part-description] {
|
|
207
219
|
color: var(--slotted-text-muted, GrayText);
|
|
208
220
|
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
209
221
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
@@ -213,34 +225,38 @@
|
|
|
213
225
|
/* A tile's heading is one line of title and one of description, cut with
|
|
214
226
|
an ellipsis and whole in the DOM, so tiles in a row keep one header
|
|
215
227
|
height. The full text stays the figure's name and description. */
|
|
216
|
-
[data-ui
|
|
217
|
-
> [data-part
|
|
218
|
-
:is([data-part
|
|
228
|
+
[data-ui-chart][data-variant='card']
|
|
229
|
+
> [data-part-header]
|
|
230
|
+
:is([data-part-title], [data-part-description]) {
|
|
219
231
|
overflow: hidden;
|
|
220
232
|
text-overflow: ellipsis;
|
|
221
233
|
white-space: nowrap;
|
|
222
234
|
}
|
|
223
235
|
|
|
224
|
-
[data-ui
|
|
236
|
+
[data-ui-chart][data-variant='card'] > [data-part-header] [data-part-title] {
|
|
225
237
|
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
226
238
|
line-height: var(--slotted-line-height-md, 1.5);
|
|
227
239
|
}
|
|
228
240
|
|
|
229
241
|
/* A tile keeps the description's line whether it has one or not, so the
|
|
230
242
|
legends and the plots of a row start on one line too. */
|
|
231
|
-
[data-ui
|
|
243
|
+
[data-ui-chart][data-variant='card'] > [data-part-header] > :first-child {
|
|
232
244
|
min-block-size: calc(
|
|
233
245
|
var(--slotted-font-size-md, 0.875rem) * var(--slotted-line-height-md, 1.5) +
|
|
234
|
-
var(--slotted-
|
|
235
|
-
var(--slotted-line-height-sm, 1.45)
|
|
246
|
+
var(--slotted-chart-header-gap, var(--slotted-space-1, 0.125rem)) +
|
|
247
|
+
var(--slotted-font-size-sm, 0.8125rem) * var(--slotted-line-height-sm, 1.45)
|
|
236
248
|
);
|
|
237
249
|
}
|
|
238
250
|
|
|
239
|
-
[data-ui
|
|
251
|
+
[data-ui-chart] > [data-part-header] > [data-part-actions] {
|
|
252
|
+
/* An action slot states one size for the links it holds. */
|
|
253
|
+
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
254
|
+
|
|
240
255
|
align-items: center;
|
|
241
256
|
display: flex;
|
|
242
257
|
flex: none;
|
|
243
258
|
gap: var(--slotted-space-2, 0.25rem);
|
|
259
|
+
margin-block: var(--_control-bleed);
|
|
244
260
|
}
|
|
245
261
|
|
|
246
262
|
/**
|
|
@@ -252,55 +268,47 @@
|
|
|
252
268
|
* hovered or holds focus (`toolbar="hover"`), and never where the device
|
|
253
269
|
* cannot hover.
|
|
254
270
|
*/
|
|
255
|
-
[data-ui
|
|
271
|
+
[data-ui-chart] > [data-part-header] > [data-part-toolbar] {
|
|
256
272
|
align-items: center;
|
|
257
273
|
display: flex;
|
|
258
274
|
flex: none;
|
|
259
275
|
gap: var(--slotted-space-1, 0.125rem);
|
|
260
|
-
|
|
261
|
-
the difference, so the row does not grow the header. */
|
|
262
|
-
margin-block: calc(
|
|
263
|
-
(
|
|
264
|
-
var(--slotted-font-size-lg, 1rem) * var(--slotted-line-height-lg, 1.5) -
|
|
265
|
-
var(--slotted-control-height-sm, 1.75rem)
|
|
266
|
-
) /
|
|
267
|
-
2
|
|
268
|
-
);
|
|
276
|
+
margin-block: var(--_control-bleed);
|
|
269
277
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
270
278
|
}
|
|
271
279
|
|
|
272
|
-
[data-ui
|
|
280
|
+
[data-ui-chart][data-toolbar='hover'] > [data-part-header] > [data-part-toolbar] {
|
|
273
281
|
opacity: 0;
|
|
274
282
|
}
|
|
275
283
|
|
|
276
284
|
/* While the plot waits, fails or has no data the toolbar keeps its width —
|
|
277
285
|
the title and the description wrap where they will wrap once it is ready —
|
|
278
286
|
and draws nothing: an action nobody can press yet is absent. */
|
|
279
|
-
[data-ui
|
|
287
|
+
[data-ui-chart] > [data-part-header] > [data-part-toolbar][data-waiting] {
|
|
280
288
|
visibility: hidden;
|
|
281
289
|
}
|
|
282
290
|
|
|
283
291
|
/* A chart has no disabled state; the guard is the precedence rule every
|
|
284
292
|
hover in the library states (`packages/styles/src/states.test.mjs`). */
|
|
285
|
-
[data-ui
|
|
286
|
-
> [data-part
|
|
287
|
-
> [data-part
|
|
293
|
+
[data-ui-chart][data-toolbar='hover']:is(:hover, :focus-within):not([data-disabled])
|
|
294
|
+
> [data-part-header]
|
|
295
|
+
> [data-part-toolbar] {
|
|
288
296
|
opacity: 1;
|
|
289
297
|
}
|
|
290
298
|
|
|
291
299
|
@media (hover: none) {
|
|
292
|
-
[data-ui
|
|
300
|
+
[data-ui-chart][data-toolbar='hover'] > [data-part-header] > [data-part-toolbar] {
|
|
293
301
|
opacity: 1;
|
|
294
302
|
}
|
|
295
303
|
}
|
|
296
304
|
|
|
297
|
-
[data-ui
|
|
305
|
+
[data-ui-chart]
|
|
298
306
|
:is(
|
|
299
|
-
[data-part
|
|
300
|
-
[data-part
|
|
301
|
-
[data-part
|
|
302
|
-
[data-part
|
|
303
|
-
[data-part
|
|
307
|
+
[data-part-zoom-reset],
|
|
308
|
+
[data-part-view-toggle],
|
|
309
|
+
[data-part-fullscreen-toggle],
|
|
310
|
+
[data-part-menu-trigger],
|
|
311
|
+
[data-part-help]
|
|
304
312
|
) {
|
|
305
313
|
--_box: var(--slotted-control-height-sm, 1.75rem);
|
|
306
314
|
|
|
@@ -322,7 +330,7 @@
|
|
|
322
330
|
}
|
|
323
331
|
|
|
324
332
|
/* Help sits beside the words it explains, a step smaller than the toolbar. */
|
|
325
|
-
[data-ui
|
|
333
|
+
[data-ui-chart] [data-part-help] {
|
|
326
334
|
--_box: var(--slotted-control-inner-size-sm, 1.25rem);
|
|
327
335
|
|
|
328
336
|
/* It hangs past the title's line by the difference rather than growing
|
|
@@ -332,35 +340,35 @@
|
|
|
332
340
|
);
|
|
333
341
|
}
|
|
334
342
|
|
|
335
|
-
[data-ui
|
|
343
|
+
[data-ui-chart]
|
|
336
344
|
:is(
|
|
337
|
-
[data-part
|
|
338
|
-
[data-part
|
|
339
|
-
[data-part
|
|
340
|
-
[data-part
|
|
341
|
-
[data-part
|
|
345
|
+
[data-part-zoom-reset],
|
|
346
|
+
[data-part-view-toggle],
|
|
347
|
+
[data-part-fullscreen-toggle],
|
|
348
|
+
[data-part-menu-trigger],
|
|
349
|
+
[data-part-help]
|
|
342
350
|
):hover:not(:disabled) {
|
|
343
351
|
background-color: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
344
352
|
color: var(--slotted-text, CanvasText);
|
|
345
353
|
}
|
|
346
354
|
|
|
347
355
|
/* On: the table standing in the plot, the menu or the help open. */
|
|
348
|
-
[data-ui
|
|
349
|
-
:is([data-part
|
|
350
|
-
[data-ui
|
|
356
|
+
[data-ui-chart]
|
|
357
|
+
:is([data-part-view-toggle], [data-part-menu-trigger], [data-part-help])[data-pressed],
|
|
358
|
+
[data-ui-chart] :is([data-part-menu-trigger], [data-part-help])[data-open] {
|
|
351
359
|
background-color: var(--slotted-tone-secondary-surface, ButtonFace);
|
|
352
360
|
color: var(--slotted-text, CanvasText);
|
|
353
361
|
}
|
|
354
362
|
|
|
355
|
-
[data-ui
|
|
363
|
+
[data-ui-chart]
|
|
356
364
|
:is(
|
|
357
|
-
[data-part
|
|
358
|
-
[data-part
|
|
359
|
-
[data-part
|
|
360
|
-
[data-part
|
|
361
|
-
[data-part
|
|
362
|
-
[data-part
|
|
363
|
-
[data-part
|
|
365
|
+
[data-part-zoom-reset],
|
|
366
|
+
[data-part-view-toggle],
|
|
367
|
+
[data-part-fullscreen-toggle],
|
|
368
|
+
[data-part-menu-trigger],
|
|
369
|
+
[data-part-help],
|
|
370
|
+
[data-part-legend-more],
|
|
371
|
+
[data-part-menu-item]
|
|
364
372
|
):focus-visible {
|
|
365
373
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
366
374
|
outline-offset: 0;
|
|
@@ -371,7 +379,7 @@
|
|
|
371
379
|
* every floating layer in the library. They are placed in the viewport's
|
|
372
380
|
* coordinates by the binding, through the chart's two runtime properties.
|
|
373
381
|
*/
|
|
374
|
-
[data-ui
|
|
382
|
+
[data-ui-chart] :is([data-part-menu], [data-part-help-content]) {
|
|
375
383
|
background-color: var(--slotted-surface-raised, Canvas);
|
|
376
384
|
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle, CanvasText);
|
|
377
385
|
border-radius: var(--slotted-radius-md, 6px);
|
|
@@ -389,26 +397,39 @@
|
|
|
389
397
|
z-index: var(--slotted-z-index-popover, 1100);
|
|
390
398
|
}
|
|
391
399
|
|
|
392
|
-
|
|
400
|
+
/* A theme that paints the chart's floating layers as a translucent material blurs the plot under them. */
|
|
401
|
+
[data-ui-chart] :is([data-part-menu], [data-part-help-content], [data-part-tooltip]) {
|
|
402
|
+
-webkit-backdrop-filter: var(--slotted-chart-overlay-backdrop-filter, none);
|
|
403
|
+
backdrop-filter: var(--slotted-chart-overlay-backdrop-filter, none);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
407
|
+
[data-ui-chart] :is([data-part-menu], [data-part-help-content], [data-part-tooltip]) {
|
|
408
|
+
-webkit-backdrop-filter: none;
|
|
409
|
+
backdrop-filter: none;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-ui-chart] [data-part-menu] {
|
|
393
414
|
display: grid;
|
|
394
415
|
min-inline-size: 11rem;
|
|
395
416
|
padding: var(--slotted-space-2, 0.25rem);
|
|
396
417
|
}
|
|
397
418
|
|
|
398
|
-
[data-ui
|
|
419
|
+
[data-ui-chart] [data-part-menu]:not(:popover-open, [data-open]) {
|
|
399
420
|
display: none;
|
|
400
421
|
}
|
|
401
422
|
|
|
402
|
-
[data-ui
|
|
423
|
+
[data-ui-chart] [data-part-help-content] {
|
|
403
424
|
padding-block: var(--slotted-space-4, 0.5rem);
|
|
404
425
|
padding-inline: var(--slotted-space-5, 0.75rem);
|
|
405
426
|
}
|
|
406
427
|
|
|
407
|
-
[data-ui
|
|
428
|
+
[data-ui-chart] [data-part-help-content]:not(:popover-open, [data-open]) {
|
|
408
429
|
display: none;
|
|
409
430
|
}
|
|
410
431
|
|
|
411
|
-
[data-ui
|
|
432
|
+
[data-ui-chart] [data-part-menu-item] {
|
|
412
433
|
align-items: center;
|
|
413
434
|
background: transparent;
|
|
414
435
|
border: 0;
|
|
@@ -425,11 +446,11 @@
|
|
|
425
446
|
|
|
426
447
|
/* The table and full-screen controls are in the toolbar; the menu holds
|
|
427
448
|
them only where the toolbar gives them up (see Narrow). */
|
|
428
|
-
[data-ui
|
|
449
|
+
[data-ui-chart] [data-part-menu-item]:is([data-action='view'], [data-action='fullscreen']) {
|
|
429
450
|
display: none;
|
|
430
451
|
}
|
|
431
452
|
|
|
432
|
-
[data-ui
|
|
453
|
+
[data-ui-chart] [data-part-menu-item]:hover:not(:disabled) {
|
|
433
454
|
background-color: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
434
455
|
}
|
|
435
456
|
|
|
@@ -438,7 +459,7 @@
|
|
|
438
459
|
/* One line: what does not fit waits behind `legend-more`, so a legend of
|
|
439
460
|
three and a legend of twelve are the same height. `legendOverflow="wrap"`
|
|
440
461
|
lets a chart that owns its own page wrap instead. */
|
|
441
|
-
[data-ui
|
|
462
|
+
[data-ui-chart] [data-part-legend] {
|
|
442
463
|
align-items: center;
|
|
443
464
|
display: flex;
|
|
444
465
|
flex: none;
|
|
@@ -455,65 +476,69 @@
|
|
|
455
476
|
padding: 0;
|
|
456
477
|
}
|
|
457
478
|
|
|
458
|
-
[data-ui
|
|
479
|
+
[data-ui-chart][data-legend-overflow='wrap'] [data-part-legend] {
|
|
459
480
|
flex-wrap: wrap;
|
|
460
481
|
overflow: visible;
|
|
461
482
|
}
|
|
462
483
|
|
|
463
484
|
/**
|
|
464
|
-
* The
|
|
485
|
+
* The color of one series, resolved in the order the model resolves it:
|
|
465
486
|
* a tone says what the series means and wins, a slot says which one it is,
|
|
466
487
|
* and the ninth series and on — which the scale never cycles to — takes the
|
|
467
488
|
* muted step with a dash of its own. The legend, the markers and the
|
|
468
489
|
* tooltip read the palette the root declares, as the engine does.
|
|
469
490
|
*/
|
|
470
|
-
[data-ui
|
|
491
|
+
[data-ui-chart] [data-slot='1'] {
|
|
471
492
|
--_series: var(--_chart-slot-1);
|
|
472
493
|
}
|
|
473
|
-
[data-ui
|
|
494
|
+
[data-ui-chart] [data-slot='2'] {
|
|
474
495
|
--_series: var(--_chart-slot-2);
|
|
475
496
|
}
|
|
476
|
-
[data-ui
|
|
497
|
+
[data-ui-chart] [data-slot='3'] {
|
|
477
498
|
--_series: var(--_chart-slot-3);
|
|
478
499
|
}
|
|
479
|
-
[data-ui
|
|
500
|
+
[data-ui-chart] [data-slot='4'] {
|
|
480
501
|
--_series: var(--_chart-slot-4);
|
|
481
502
|
}
|
|
482
|
-
[data-ui
|
|
503
|
+
[data-ui-chart] [data-slot='5'] {
|
|
483
504
|
--_series: var(--_chart-slot-5);
|
|
484
505
|
}
|
|
485
|
-
[data-ui
|
|
506
|
+
[data-ui-chart] [data-slot='6'] {
|
|
486
507
|
--_series: var(--_chart-slot-6);
|
|
487
508
|
}
|
|
488
|
-
[data-ui
|
|
509
|
+
[data-ui-chart] [data-slot='7'] {
|
|
489
510
|
--_series: var(--_chart-slot-7);
|
|
490
511
|
}
|
|
491
|
-
[data-ui
|
|
512
|
+
[data-ui-chart] [data-slot='8'] {
|
|
492
513
|
--_series: var(--_chart-slot-8);
|
|
493
514
|
}
|
|
494
|
-
[data-ui
|
|
515
|
+
[data-ui-chart] [data-tone='neutral'] {
|
|
495
516
|
--_series: var(--_chart-tone-neutral);
|
|
496
517
|
}
|
|
497
|
-
[data-ui
|
|
518
|
+
[data-ui-chart] [data-tone='accent'] {
|
|
498
519
|
--_series: var(--_chart-tone-accent);
|
|
499
520
|
}
|
|
500
|
-
[data-ui
|
|
521
|
+
[data-ui-chart] [data-tone='secondary'] {
|
|
501
522
|
--_series: var(--_chart-tone-secondary);
|
|
502
523
|
}
|
|
503
|
-
[data-ui
|
|
524
|
+
[data-ui-chart] [data-tone='success'] {
|
|
504
525
|
--_series: var(--_chart-tone-success);
|
|
505
526
|
}
|
|
506
|
-
|
|
527
|
+
|
|
528
|
+
[data-ui-chart] [data-tone='info'] {
|
|
529
|
+
--_series: var(--_chart-tone-info);
|
|
530
|
+
}
|
|
531
|
+
[data-ui-chart] [data-tone='warning'] {
|
|
507
532
|
--_series: var(--_chart-tone-warning);
|
|
508
533
|
}
|
|
509
|
-
[data-ui
|
|
534
|
+
[data-ui-chart] [data-tone='danger'] {
|
|
510
535
|
--_series: var(--_chart-tone-danger);
|
|
511
536
|
}
|
|
512
|
-
[data-ui
|
|
537
|
+
[data-ui-chart] [data-overflow] {
|
|
513
538
|
--_series: var(--_chart-overflow);
|
|
514
539
|
}
|
|
515
540
|
|
|
516
|
-
[data-ui
|
|
541
|
+
[data-ui-chart] :is([data-part-legend-item], [data-part-legend-more]) {
|
|
517
542
|
align-items: center;
|
|
518
543
|
background: transparent;
|
|
519
544
|
border: 0;
|
|
@@ -535,11 +560,11 @@
|
|
|
535
560
|
color var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
536
561
|
}
|
|
537
562
|
|
|
538
|
-
[data-ui
|
|
563
|
+
[data-ui-chart] :is([data-part-legend-item], [data-part-legend-more])[hidden] {
|
|
539
564
|
display: none;
|
|
540
565
|
}
|
|
541
566
|
|
|
542
|
-
[data-ui
|
|
567
|
+
[data-ui-chart] [data-part-legend-more] {
|
|
543
568
|
color: var(--slotted-text-muted, GrayText);
|
|
544
569
|
cursor: pointer;
|
|
545
570
|
font-variant-numeric: tabular-nums;
|
|
@@ -547,30 +572,29 @@
|
|
|
547
572
|
}
|
|
548
573
|
|
|
549
574
|
/* An entry moved into the `+N` layer stands in a column there. */
|
|
550
|
-
[data-ui
|
|
575
|
+
[data-ui-chart] [data-part-menu] [data-part-legend-item] {
|
|
551
576
|
inline-size: 100%;
|
|
552
577
|
}
|
|
553
578
|
|
|
554
|
-
[data-ui
|
|
579
|
+
[data-ui-chart] :is(button[data-part-legend-item], [data-part-legend-more]) {
|
|
555
580
|
cursor: pointer;
|
|
556
581
|
}
|
|
557
582
|
|
|
558
|
-
[data-ui
|
|
559
|
-
:is(button[data-part='legend-item'], [data-part='legend-more']):hover:not(:disabled) {
|
|
583
|
+
[data-ui-chart] :is(button[data-part-legend-item], [data-part-legend-more]):hover:not(:disabled) {
|
|
560
584
|
background-color: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
561
585
|
}
|
|
562
586
|
|
|
563
|
-
[data-ui
|
|
587
|
+
[data-ui-chart] [data-part-legend-item]:focus-visible {
|
|
564
588
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
565
589
|
outline-offset: 0;
|
|
566
590
|
}
|
|
567
591
|
|
|
568
592
|
/**
|
|
569
593
|
* The marker is the shape of the mark it stands for, so a combined chart's
|
|
570
|
-
* legend reads without
|
|
594
|
+
* legend reads without color: a stroke for a line, a square for a bar, an
|
|
571
595
|
* area or a slice, a disc for a scatter.
|
|
572
596
|
*/
|
|
573
|
-
[data-ui
|
|
597
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker]) {
|
|
574
598
|
background-color: var(--_series);
|
|
575
599
|
block-size: 0.625rem;
|
|
576
600
|
border-radius: var(--slotted-radius-xs, 2px);
|
|
@@ -578,32 +602,28 @@
|
|
|
578
602
|
inline-size: 0.625rem;
|
|
579
603
|
}
|
|
580
604
|
|
|
581
|
-
[data-ui='
|
|
582
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'])[data-kind='line'] {
|
|
605
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker])[data-kind='line'] {
|
|
583
606
|
block-size: var(--slotted-border-width-thick, 2px);
|
|
584
607
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
585
608
|
inline-size: 0.875rem;
|
|
586
609
|
}
|
|
587
610
|
|
|
588
|
-
[data-ui='
|
|
589
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'])[data-kind='scatter'] {
|
|
611
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker])[data-kind='scatter'] {
|
|
590
612
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
591
613
|
}
|
|
592
614
|
|
|
593
615
|
/* The line's own dash, drawn at the marker's scale, so three series that
|
|
594
|
-
share the muted
|
|
595
|
-
[data-ui='
|
|
596
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'])[data-stroke='dashed'] {
|
|
616
|
+
share the muted color past the eighth slot still read apart. */
|
|
617
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker])[data-stroke='dashed'] {
|
|
597
618
|
background: repeating-linear-gradient(to right, var(--_series) 0 3px, transparent 3px 5px);
|
|
598
619
|
}
|
|
599
620
|
|
|
600
|
-
[data-ui='
|
|
601
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'])[data-stroke='dotted'] {
|
|
621
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker])[data-stroke='dotted'] {
|
|
602
622
|
background: repeating-linear-gradient(to right, var(--_series) 0 2px, transparent 2px 4px);
|
|
603
623
|
}
|
|
604
624
|
|
|
605
|
-
[data-ui
|
|
606
|
-
:is([data-part
|
|
625
|
+
[data-ui-chart]
|
|
626
|
+
:is([data-part-legend-marker], [data-part-tooltip-marker])[data-stroke='dash-dot'] {
|
|
607
627
|
background: repeating-linear-gradient(
|
|
608
628
|
to right,
|
|
609
629
|
var(--_series) 0 5px,
|
|
@@ -613,20 +633,20 @@
|
|
|
613
633
|
);
|
|
614
634
|
}
|
|
615
635
|
|
|
616
|
-
[data-ui
|
|
636
|
+
[data-ui-chart] [data-part-legend-label] {
|
|
617
637
|
min-inline-size: 0;
|
|
618
638
|
overflow: hidden;
|
|
619
639
|
text-overflow: ellipsis;
|
|
620
640
|
white-space: nowrap;
|
|
621
641
|
}
|
|
622
642
|
|
|
623
|
-
[data-ui
|
|
643
|
+
[data-ui-chart] [data-part-legend-value] {
|
|
624
644
|
color: var(--slotted-text-muted, GrayText);
|
|
625
645
|
font-variant-numeric: tabular-nums;
|
|
626
646
|
white-space: nowrap;
|
|
627
647
|
}
|
|
628
648
|
|
|
629
|
-
[data-ui
|
|
649
|
+
[data-ui-chart] [data-part-legend-item][data-current] [data-part-legend-value] {
|
|
630
650
|
color: var(--slotted-text, CanvasText);
|
|
631
651
|
}
|
|
632
652
|
|
|
@@ -634,36 +654,34 @@
|
|
|
634
654
|
* A hidden series keeps its place in the row — a legend that reflowed on
|
|
635
655
|
* every toggle would move the next item from under the pointer — and reads
|
|
636
656
|
* as off: the marker empties to its outline and the label mutes. The
|
|
637
|
-
* outline is the series
|
|
657
|
+
* outline is the series color, so the item still says which series it
|
|
638
658
|
* would bring back.
|
|
639
659
|
*/
|
|
640
|
-
[data-ui
|
|
660
|
+
[data-ui-chart] button[data-part-legend-item]:not([data-pressed]) {
|
|
641
661
|
color: var(--slotted-text-muted, GrayText);
|
|
642
662
|
}
|
|
643
663
|
|
|
644
|
-
[data-ui
|
|
645
|
-
button[data-part='legend-item']:not([data-pressed])
|
|
646
|
-
[data-part='legend-marker'] {
|
|
664
|
+
[data-ui-chart] button[data-part-legend-item]:not([data-pressed]) [data-part-legend-marker] {
|
|
647
665
|
background: transparent;
|
|
648
666
|
box-shadow: inset 0 0 0 var(--slotted-border-width-medium, 1.5px) var(--_series);
|
|
649
667
|
}
|
|
650
668
|
|
|
651
|
-
[data-ui
|
|
652
|
-
button[data-part
|
|
653
|
-
[data-part
|
|
669
|
+
[data-ui-chart]
|
|
670
|
+
button[data-part-legend-item]:not([data-pressed])
|
|
671
|
+
[data-part-legend-marker][data-kind='line'] {
|
|
654
672
|
background: var(--_series);
|
|
655
673
|
box-shadow: none;
|
|
656
674
|
opacity: 0.4;
|
|
657
675
|
}
|
|
658
676
|
|
|
659
|
-
[data-ui
|
|
677
|
+
[data-ui-chart] button[data-part-legend-item]:not([data-pressed]) [data-part-legend-label] {
|
|
660
678
|
text-decoration: line-through;
|
|
661
679
|
text-decoration-color: color-mix(in oklab, currentColor 55%, transparent);
|
|
662
680
|
}
|
|
663
681
|
|
|
664
682
|
/* ── Plot ─────────────────────────────────────────────────────────────── */
|
|
665
683
|
|
|
666
|
-
[data-ui
|
|
684
|
+
[data-ui-chart] [data-part-plot] {
|
|
667
685
|
border-radius: var(--_radius);
|
|
668
686
|
/* Its size step, and whatever more a tile or the full screen gives it. */
|
|
669
687
|
flex: 1 0 var(--_plot-size);
|
|
@@ -678,12 +696,12 @@
|
|
|
678
696
|
position: relative;
|
|
679
697
|
}
|
|
680
698
|
|
|
681
|
-
[data-ui
|
|
699
|
+
[data-ui-chart] [data-part-plot]:focus-visible {
|
|
682
700
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
683
701
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
684
702
|
}
|
|
685
703
|
|
|
686
|
-
[data-ui
|
|
704
|
+
[data-ui-chart] [data-part-canvas] {
|
|
687
705
|
inset: 0;
|
|
688
706
|
position: absolute;
|
|
689
707
|
z-index: 1;
|
|
@@ -691,14 +709,14 @@
|
|
|
691
709
|
|
|
692
710
|
/* The engine keeps its size and its state behind the table, so the chart
|
|
693
711
|
comes back where the reader left it. */
|
|
694
|
-
[data-ui
|
|
695
|
-
[data-part
|
|
712
|
+
[data-ui-chart]
|
|
713
|
+
[data-part-plot]:has(> [data-part-table-region]:not([hidden]))
|
|
696
714
|
> :is(
|
|
697
|
-
[data-part
|
|
698
|
-
[data-part
|
|
699
|
-
[data-part
|
|
700
|
-
[data-part
|
|
701
|
-
[data-part
|
|
715
|
+
[data-part-canvas],
|
|
716
|
+
[data-part-crosshair],
|
|
717
|
+
[data-part-marker],
|
|
718
|
+
[data-part-tooltip],
|
|
719
|
+
[data-part-center]
|
|
702
720
|
) {
|
|
703
721
|
visibility: hidden;
|
|
704
722
|
}
|
|
@@ -714,7 +732,7 @@
|
|
|
714
732
|
* `--slotted-chart-frame-size` for the grid across it. None of them is a
|
|
715
733
|
* design token.
|
|
716
734
|
*/
|
|
717
|
-
[data-ui
|
|
735
|
+
[data-ui-chart] :is([data-part-crosshair], [data-part-marker], [data-part-tooltip]) {
|
|
718
736
|
inset-block-start: 0;
|
|
719
737
|
inset-inline-start: 0;
|
|
720
738
|
pointer-events: none;
|
|
@@ -723,7 +741,7 @@
|
|
|
723
741
|
|
|
724
742
|
/* A line under the marks for a line or an area, where the eye needs the
|
|
725
743
|
exact x; a band for bars, where the category is the whole slot. */
|
|
726
|
-
[data-ui
|
|
744
|
+
[data-ui-chart] [data-part-crosshair] {
|
|
727
745
|
background-color: var(--slotted-chart-crosshair-color, var(--slotted-border-strong, GrayText));
|
|
728
746
|
block-size: var(--slotted-chart-frame-size, 100%);
|
|
729
747
|
inline-size: 1px;
|
|
@@ -734,7 +752,7 @@
|
|
|
734
752
|
z-index: 0;
|
|
735
753
|
}
|
|
736
754
|
|
|
737
|
-
[data-ui
|
|
755
|
+
[data-ui-chart] [data-part-crosshair][data-band] {
|
|
738
756
|
background-color: var(
|
|
739
757
|
--slotted-chart-band-color,
|
|
740
758
|
color-mix(in oklab, var(--slotted-text, CanvasText) 6%, transparent)
|
|
@@ -747,7 +765,7 @@
|
|
|
747
765
|
);
|
|
748
766
|
}
|
|
749
767
|
|
|
750
|
-
[data-ui
|
|
768
|
+
[data-ui-chart] [data-part-crosshair][data-orientation='horizontal'] {
|
|
751
769
|
block-size: 1px;
|
|
752
770
|
inline-size: var(--slotted-chart-frame-size, 100%);
|
|
753
771
|
transform: translate(
|
|
@@ -756,7 +774,7 @@
|
|
|
756
774
|
);
|
|
757
775
|
}
|
|
758
776
|
|
|
759
|
-
[data-ui
|
|
777
|
+
[data-ui-chart] [data-part-crosshair][data-band][data-orientation='horizontal'] {
|
|
760
778
|
block-size: var(--slotted-chart-band-size, 0px);
|
|
761
779
|
transform: translate(
|
|
762
780
|
var(--slotted-chart-frame-start, 0px),
|
|
@@ -765,11 +783,11 @@
|
|
|
765
783
|
}
|
|
766
784
|
|
|
767
785
|
/**
|
|
768
|
-
* The marker on the point the reader is on: the series
|
|
786
|
+
* The marker on the point the reader is on: the series color with a ring
|
|
769
787
|
* of the ground around it, so it separates from the line it sits on and
|
|
770
788
|
* from a neighbouring series crossing at the same place.
|
|
771
789
|
*/
|
|
772
|
-
[data-ui
|
|
790
|
+
[data-ui-chart] [data-part-marker] {
|
|
773
791
|
--_size: calc(var(--_chart-marker-size) + var(--slotted-space-2, 0.25rem));
|
|
774
792
|
|
|
775
793
|
background-color: var(--_series, var(--_chart-slot-1));
|
|
@@ -785,9 +803,9 @@
|
|
|
785
803
|
}
|
|
786
804
|
|
|
787
805
|
/* The point the reader chose stays marked after the pointer leaves: a ring
|
|
788
|
-
in the series
|
|
806
|
+
in the series color around the ground, larger than the hover marker so
|
|
789
807
|
the two read as two states when they meet. */
|
|
790
|
-
[data-ui
|
|
808
|
+
[data-ui-chart] [data-part-marker][data-selected] {
|
|
791
809
|
--_size: calc(var(--_chart-marker-size) * 2 + var(--slotted-space-2, 0.25rem));
|
|
792
810
|
|
|
793
811
|
background-color: transparent;
|
|
@@ -805,7 +823,7 @@
|
|
|
805
823
|
* subgrid of one three-column grid, so the values line up whatever the
|
|
806
824
|
* labels' lengths.
|
|
807
825
|
*/
|
|
808
|
-
[data-ui
|
|
826
|
+
[data-ui-chart] [data-part-tooltip] {
|
|
809
827
|
background-color: var(--slotted-chart-tooltip-surface, var(--slotted-surface-raised, Canvas));
|
|
810
828
|
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle, CanvasText);
|
|
811
829
|
border-radius: var(--slotted-radius-md, 6px);
|
|
@@ -815,7 +833,8 @@
|
|
|
815
833
|
column-gap: var(--slotted-space-4, 0.5rem);
|
|
816
834
|
display: grid;
|
|
817
835
|
font-size: var(--slotted-control-font-size-sm, 0.75rem);
|
|
818
|
-
|
|
836
|
+
/* The label keeps 4rem, so a wide value never takes the whole row. */
|
|
837
|
+
grid-template-columns: auto minmax(4rem, 1fr) auto;
|
|
819
838
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
820
839
|
max-inline-size: min(18rem, 100%);
|
|
821
840
|
min-inline-size: 8rem;
|
|
@@ -837,7 +856,7 @@
|
|
|
837
856
|
* point never hides under, and the crosshair shows which point it is about.
|
|
838
857
|
* The binding docks it; `placeTooltip` says when.
|
|
839
858
|
*/
|
|
840
|
-
[data-ui
|
|
859
|
+
[data-ui-chart] [data-part-tooltip][data-docked] {
|
|
841
860
|
inline-size: 100%;
|
|
842
861
|
max-inline-size: 100%;
|
|
843
862
|
min-inline-size: 0;
|
|
@@ -847,16 +866,16 @@
|
|
|
847
866
|
plot's coordinates: an inset resolves against the element's own
|
|
848
867
|
direction, so the right-to-left box anchors at its inline end, which is
|
|
849
868
|
the same left edge the translation is measured from. */
|
|
850
|
-
[data-ui
|
|
869
|
+
[data-ui-chart]:dir(rtl) :is([data-part-tooltip], [data-part-center]) {
|
|
851
870
|
direction: rtl;
|
|
852
871
|
}
|
|
853
872
|
|
|
854
|
-
[data-ui
|
|
873
|
+
[data-ui-chart]:dir(rtl) [data-part-tooltip] {
|
|
855
874
|
inset-inline-end: 0;
|
|
856
875
|
inset-inline-start: auto;
|
|
857
876
|
}
|
|
858
877
|
|
|
859
|
-
[data-ui
|
|
878
|
+
[data-ui-chart] [data-part-tooltip][data-open] {
|
|
860
879
|
opacity: 1;
|
|
861
880
|
visibility: visible;
|
|
862
881
|
}
|
|
@@ -864,13 +883,20 @@
|
|
|
864
883
|
/* A tooltip that appears slides into place from where it opened; one that
|
|
865
884
|
follows the pointer from point to point moves with it. Opening snaps the
|
|
866
885
|
position so the first frame is not a flight from the corner. */
|
|
867
|
-
[data-ui
|
|
886
|
+
[data-ui-chart] [data-part-tooltip]:not([data-open]) {
|
|
868
887
|
transition:
|
|
869
888
|
opacity var(--slotted-duration-short) var(--slotted-easing-standard),
|
|
870
889
|
visibility var(--slotted-duration-instant) linear var(--slotted-duration-short);
|
|
871
890
|
}
|
|
872
891
|
|
|
873
|
-
|
|
892
|
+
/* Content a consumer adds beside the tooltip's parts, or in their place, takes
|
|
893
|
+
the full width; a family's root carries a `data-part` of its own. */
|
|
894
|
+
[data-ui-chart] [data-part-tooltip] > :not([data-part^='tooltip-']) {
|
|
895
|
+
grid-column: 1 / -1;
|
|
896
|
+
overflow-wrap: anywhere;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
[data-ui-chart] [data-part-tooltip-title] {
|
|
874
900
|
color: var(--slotted-text, CanvasText);
|
|
875
901
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
876
902
|
grid-column: 1 / -1;
|
|
@@ -878,35 +904,35 @@
|
|
|
878
904
|
}
|
|
879
905
|
|
|
880
906
|
/* The label of a line on this category, the plot's own words for it. */
|
|
881
|
-
[data-ui
|
|
907
|
+
[data-ui-chart] [data-part-tooltip-note] {
|
|
882
908
|
color: var(--slotted-text-muted, GrayText);
|
|
883
909
|
grid-column: 1 / -1;
|
|
884
910
|
overflow-wrap: anywhere;
|
|
885
911
|
}
|
|
886
912
|
|
|
887
|
-
[data-ui
|
|
913
|
+
[data-ui-chart] :is([data-part-tooltip-item], [data-part-tooltip-total]) {
|
|
888
914
|
align-items: center;
|
|
889
915
|
display: grid;
|
|
890
916
|
grid-column: 1 / -1;
|
|
891
917
|
grid-template-columns: subgrid;
|
|
892
918
|
}
|
|
893
919
|
|
|
894
|
-
[data-ui
|
|
920
|
+
[data-ui-chart] [data-part-tooltip-item] {
|
|
895
921
|
color: var(--slotted-text-muted, GrayText);
|
|
896
922
|
}
|
|
897
923
|
|
|
898
|
-
[data-ui
|
|
924
|
+
[data-ui-chart] [data-part-tooltip-item][data-current] {
|
|
899
925
|
color: var(--slotted-text, CanvasText);
|
|
900
926
|
}
|
|
901
927
|
|
|
902
|
-
[data-ui
|
|
928
|
+
[data-ui-chart] [data-part-tooltip-label] {
|
|
903
929
|
min-inline-size: 0;
|
|
904
930
|
overflow: hidden;
|
|
905
931
|
text-overflow: ellipsis;
|
|
906
932
|
white-space: nowrap;
|
|
907
933
|
}
|
|
908
934
|
|
|
909
|
-
[data-ui
|
|
935
|
+
[data-ui-chart] [data-part-tooltip-value] {
|
|
910
936
|
color: var(--slotted-text, CanvasText);
|
|
911
937
|
font-variant-numeric: tabular-nums;
|
|
912
938
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
@@ -914,7 +940,7 @@
|
|
|
914
940
|
white-space: nowrap;
|
|
915
941
|
}
|
|
916
942
|
|
|
917
|
-
[data-ui
|
|
943
|
+
[data-ui-chart] [data-part-tooltip-total] {
|
|
918
944
|
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
919
945
|
var(--slotted-border-subtle, CanvasText);
|
|
920
946
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -922,13 +948,13 @@
|
|
|
922
948
|
padding-block-start: var(--slotted-space-3, 0.375rem);
|
|
923
949
|
}
|
|
924
950
|
|
|
925
|
-
[data-ui
|
|
951
|
+
[data-ui-chart] [data-part-tooltip-total] > :first-child {
|
|
926
952
|
grid-column: 1 / 3;
|
|
927
953
|
}
|
|
928
954
|
|
|
929
|
-
/* ── The
|
|
955
|
+
/* ── The center of a donut ────────────────────────────────────────────── */
|
|
930
956
|
|
|
931
|
-
[data-ui
|
|
957
|
+
[data-ui-chart] [data-part-center] {
|
|
932
958
|
align-content: center;
|
|
933
959
|
display: grid;
|
|
934
960
|
inset: 0;
|
|
@@ -939,14 +965,14 @@
|
|
|
939
965
|
z-index: 2;
|
|
940
966
|
}
|
|
941
967
|
|
|
942
|
-
[data-ui
|
|
968
|
+
[data-ui-chart] [data-part-center-value] {
|
|
943
969
|
font-size: var(--slotted-font-size-2xl, 1.25rem);
|
|
944
970
|
font-variant-numeric: tabular-nums;
|
|
945
971
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
946
972
|
line-height: var(--slotted-line-height-2xl, 1.4);
|
|
947
973
|
}
|
|
948
974
|
|
|
949
|
-
[data-ui
|
|
975
|
+
[data-ui-chart] [data-part-center-label] {
|
|
950
976
|
color: var(--slotted-text-muted, GrayText);
|
|
951
977
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
952
978
|
line-height: var(--slotted-line-height-xs, 1.4);
|
|
@@ -962,12 +988,12 @@
|
|
|
962
988
|
* have, a line and its wash, a pie's ring — under one shimmer. It fills the
|
|
963
989
|
* plot's box exactly, so nothing moves when the data lands.
|
|
964
990
|
*/
|
|
965
|
-
[data-ui
|
|
991
|
+
[data-ui-chart] [data-part-skeleton] {
|
|
966
992
|
inset: var(--_chart-inset);
|
|
967
993
|
position: absolute;
|
|
968
994
|
}
|
|
969
995
|
|
|
970
|
-
[data-ui
|
|
996
|
+
[data-ui-chart] [data-part-skeleton] > [data-ui-skeleton] {
|
|
971
997
|
/* A tenth of the text over the ground: a step lighter than the ground
|
|
972
998
|
in a dark scheme and a step darker in a light one, where the skeleton
|
|
973
999
|
family's own fill, made for a sunken field, sank into a dark tile. */
|
|
@@ -990,7 +1016,7 @@
|
|
|
990
1016
|
row-gap: var(--_chart-inset);
|
|
991
1017
|
}
|
|
992
1018
|
|
|
993
|
-
[data-ui
|
|
1019
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='y'] {
|
|
994
1020
|
align-items: end;
|
|
995
1021
|
display: flex;
|
|
996
1022
|
flex-direction: column;
|
|
@@ -998,17 +1024,17 @@
|
|
|
998
1024
|
justify-content: space-between;
|
|
999
1025
|
}
|
|
1000
1026
|
|
|
1001
|
-
[data-ui
|
|
1027
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='x'] {
|
|
1002
1028
|
display: flex;
|
|
1003
1029
|
grid-area: x;
|
|
1004
1030
|
justify-content: space-around;
|
|
1005
1031
|
}
|
|
1006
1032
|
|
|
1007
1033
|
/* An axis label is a short line at the axis type's height. */
|
|
1008
|
-
[data-ui
|
|
1009
|
-
[data-part
|
|
1034
|
+
[data-ui-chart]
|
|
1035
|
+
[data-part-skeleton]
|
|
1010
1036
|
:is([data-skeleton='y'], [data-skeleton='x'])
|
|
1011
|
-
> [data-ui
|
|
1037
|
+
> [data-ui-skeleton] {
|
|
1012
1038
|
block-size: 0.5rem;
|
|
1013
1039
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
1014
1040
|
flex: none;
|
|
@@ -1016,22 +1042,19 @@
|
|
|
1016
1042
|
min-block-size: 0;
|
|
1017
1043
|
}
|
|
1018
1044
|
|
|
1019
|
-
[data-ui='
|
|
1020
|
-
[data-part='skeleton']
|
|
1021
|
-
[data-skeleton='y']
|
|
1022
|
-
> [data-ui='skeleton']:nth-child(odd) {
|
|
1045
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='y'] > [data-ui-skeleton]:nth-child(odd) {
|
|
1023
1046
|
inline-size: 2rem;
|
|
1024
1047
|
}
|
|
1025
1048
|
|
|
1026
1049
|
/* Six category labels at their full width are 144 pixels, more than the
|
|
1027
1050
|
marks column of a quarter-width tile holds; they shrink together with it,
|
|
1028
1051
|
as the engine's labels thin out, rather than run past the plot. */
|
|
1029
|
-
[data-ui
|
|
1052
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='x'] > [data-ui-skeleton] {
|
|
1030
1053
|
flex: 0 1 auto;
|
|
1031
1054
|
min-inline-size: 0;
|
|
1032
1055
|
}
|
|
1033
1056
|
|
|
1034
|
-
[data-ui
|
|
1057
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='marks'] {
|
|
1035
1058
|
align-items: end;
|
|
1036
1059
|
background-image: repeating-linear-gradient(
|
|
1037
1060
|
to bottom,
|
|
@@ -1047,73 +1070,73 @@
|
|
|
1047
1070
|
|
|
1048
1071
|
/* The skeleton family sizes a block on its own; inside the plot a bar takes
|
|
1049
1072
|
its share of the row and nothing more. */
|
|
1050
|
-
[data-ui
|
|
1073
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='marks'] > [data-ui-skeleton] {
|
|
1051
1074
|
border-radius: var(--_chart-bar-radius) var(--_chart-bar-radius) 0 0;
|
|
1052
1075
|
flex: 0 1 9%;
|
|
1053
1076
|
inline-size: auto;
|
|
1054
1077
|
min-inline-size: 0;
|
|
1055
1078
|
}
|
|
1056
1079
|
|
|
1057
|
-
[data-ui
|
|
1058
|
-
[data-part
|
|
1080
|
+
[data-ui-chart]
|
|
1081
|
+
[data-part-skeleton][data-kind='bar']
|
|
1059
1082
|
[data-skeleton='marks']
|
|
1060
|
-
> [data-ui
|
|
1083
|
+
> [data-ui-skeleton]:nth-child(7n + 1) {
|
|
1061
1084
|
block-size: 38%;
|
|
1062
1085
|
}
|
|
1063
|
-
[data-ui
|
|
1064
|
-
[data-part
|
|
1086
|
+
[data-ui-chart]
|
|
1087
|
+
[data-part-skeleton][data-kind='bar']
|
|
1065
1088
|
[data-skeleton='marks']
|
|
1066
|
-
> [data-ui
|
|
1089
|
+
> [data-ui-skeleton]:nth-child(7n + 2) {
|
|
1067
1090
|
block-size: 62%;
|
|
1068
1091
|
}
|
|
1069
|
-
[data-ui
|
|
1070
|
-
[data-part
|
|
1092
|
+
[data-ui-chart]
|
|
1093
|
+
[data-part-skeleton][data-kind='bar']
|
|
1071
1094
|
[data-skeleton='marks']
|
|
1072
|
-
> [data-ui
|
|
1095
|
+
> [data-ui-skeleton]:nth-child(7n + 3) {
|
|
1073
1096
|
block-size: 50%;
|
|
1074
1097
|
}
|
|
1075
|
-
[data-ui
|
|
1076
|
-
[data-part
|
|
1098
|
+
[data-ui-chart]
|
|
1099
|
+
[data-part-skeleton][data-kind='bar']
|
|
1077
1100
|
[data-skeleton='marks']
|
|
1078
|
-
> [data-ui
|
|
1101
|
+
> [data-ui-skeleton]:nth-child(7n + 4) {
|
|
1079
1102
|
block-size: 74%;
|
|
1080
1103
|
}
|
|
1081
|
-
[data-ui
|
|
1082
|
-
[data-part
|
|
1104
|
+
[data-ui-chart]
|
|
1105
|
+
[data-part-skeleton][data-kind='bar']
|
|
1083
1106
|
[data-skeleton='marks']
|
|
1084
|
-
> [data-ui
|
|
1107
|
+
> [data-ui-skeleton]:nth-child(7n + 5) {
|
|
1085
1108
|
block-size: 56%;
|
|
1086
1109
|
}
|
|
1087
|
-
[data-ui
|
|
1088
|
-
[data-part
|
|
1110
|
+
[data-ui-chart]
|
|
1111
|
+
[data-part-skeleton][data-kind='bar']
|
|
1089
1112
|
[data-skeleton='marks']
|
|
1090
|
-
> [data-ui
|
|
1113
|
+
> [data-ui-skeleton]:nth-child(7n + 6) {
|
|
1091
1114
|
block-size: 44%;
|
|
1092
1115
|
}
|
|
1093
|
-
[data-ui
|
|
1094
|
-
[data-part
|
|
1116
|
+
[data-ui-chart]
|
|
1117
|
+
[data-part-skeleton][data-kind='bar']
|
|
1095
1118
|
[data-skeleton='marks']
|
|
1096
|
-
> [data-ui
|
|
1119
|
+
> [data-ui-skeleton]:nth-child(7n + 7) {
|
|
1097
1120
|
block-size: 68%;
|
|
1098
1121
|
}
|
|
1099
1122
|
|
|
1100
1123
|
/* A line is its stroke and the wash under it: two blocks over the whole
|
|
1101
1124
|
marks area, one cut to a band as thick as a line, one to the silhouette
|
|
1102
1125
|
under it at a third of the fill. */
|
|
1103
|
-
[data-ui
|
|
1104
|
-
[data-part
|
|
1126
|
+
[data-ui-chart]
|
|
1127
|
+
[data-part-skeleton][data-kind='line']
|
|
1105
1128
|
[data-skeleton='marks']
|
|
1106
|
-
> [data-ui
|
|
1129
|
+
> [data-ui-skeleton] {
|
|
1107
1130
|
block-size: 100%;
|
|
1108
1131
|
border-radius: 0;
|
|
1109
1132
|
inset: 0;
|
|
1110
1133
|
position: absolute;
|
|
1111
1134
|
}
|
|
1112
1135
|
|
|
1113
|
-
[data-ui
|
|
1114
|
-
[data-part
|
|
1136
|
+
[data-ui-chart]
|
|
1137
|
+
[data-part-skeleton][data-kind='line']
|
|
1115
1138
|
[data-skeleton='marks']
|
|
1116
|
-
> [data-ui
|
|
1139
|
+
> [data-ui-skeleton]:first-child {
|
|
1117
1140
|
clip-path: polygon(
|
|
1118
1141
|
0% 60.5%,
|
|
1119
1142
|
14% 46.5%,
|
|
@@ -1134,10 +1157,10 @@
|
|
|
1134
1157
|
);
|
|
1135
1158
|
}
|
|
1136
1159
|
|
|
1137
|
-
[data-ui
|
|
1138
|
-
[data-part
|
|
1160
|
+
[data-ui-chart]
|
|
1161
|
+
[data-part-skeleton][data-kind='line']
|
|
1139
1162
|
[data-skeleton='marks']
|
|
1140
|
-
> [data-ui
|
|
1163
|
+
> [data-ui-skeleton]:last-child {
|
|
1141
1164
|
clip-path: polygon(
|
|
1142
1165
|
0% 62%,
|
|
1143
1166
|
14% 48%,
|
|
@@ -1153,16 +1176,14 @@
|
|
|
1153
1176
|
opacity: 0.35;
|
|
1154
1177
|
}
|
|
1155
1178
|
|
|
1156
|
-
/* A pie has no axes: its ring,
|
|
1157
|
-
[data-ui
|
|
1179
|
+
/* A pie has no axes: its ring, centerd, at the size the engine draws it. */
|
|
1180
|
+
[data-ui-chart] [data-part-skeleton][data-kind='pie'] > [data-ui-skeleton] {
|
|
1158
1181
|
align-items: center;
|
|
1159
1182
|
display: flex;
|
|
1160
1183
|
justify-content: center;
|
|
1161
1184
|
}
|
|
1162
1185
|
|
|
1163
|
-
[data-ui='
|
|
1164
|
-
[data-part='skeleton'][data-kind='pie']
|
|
1165
|
-
[data-ui='skeleton'][data-shape='circle'] {
|
|
1186
|
+
[data-ui-chart] [data-part-skeleton][data-kind='pie'] [data-ui-skeleton][data-shape='circle'] {
|
|
1166
1187
|
aspect-ratio: 1;
|
|
1167
1188
|
block-size: 76%;
|
|
1168
1189
|
flex: none;
|
|
@@ -1176,7 +1197,7 @@
|
|
|
1176
1197
|
|
|
1177
1198
|
/* A legend whose entries come with the data stands in as three short
|
|
1178
1199
|
lines of the entries' type height. */
|
|
1179
|
-
[data-ui
|
|
1200
|
+
[data-ui-chart] [data-part-legend] > [data-ui-skeleton] {
|
|
1180
1201
|
/* A tenth of the text over the ground: a step lighter than the ground
|
|
1181
1202
|
in a dark scheme and a step darker in a light one, where the skeleton
|
|
1182
1203
|
family's own fill, made for a sunken field, sank into a dark tile. */
|
|
@@ -1198,13 +1219,13 @@
|
|
|
1198
1219
|
min-block-size: 0;
|
|
1199
1220
|
}
|
|
1200
1221
|
|
|
1201
|
-
[data-ui
|
|
1222
|
+
[data-ui-chart] [data-part-legend] > [data-ui-skeleton]:nth-child(2) {
|
|
1202
1223
|
inline-size: 3.25rem;
|
|
1203
1224
|
}
|
|
1204
1225
|
|
|
1205
1226
|
/* ── Empty and failed ─────────────────────────────────────────────────── */
|
|
1206
1227
|
|
|
1207
|
-
[data-ui
|
|
1228
|
+
[data-ui-chart] :is([data-part-empty], [data-part-error]) {
|
|
1208
1229
|
/* A message about one chart, at the size of the chart's own words. */
|
|
1209
1230
|
--slotted-result-state-title-font-size: var(--slotted-font-size-md, 0.875rem);
|
|
1210
1231
|
--slotted-result-state-padding-block: var(--slotted-space-4, 0.5rem);
|
|
@@ -1223,7 +1244,7 @@
|
|
|
1223
1244
|
the message stands on no surface of its own, and the bands the grid drew
|
|
1224
1245
|
every quarter of the height crossed the empty title and ran between the
|
|
1225
1246
|
failed title and its retry. */
|
|
1226
|
-
[data-ui
|
|
1247
|
+
[data-ui-chart] [data-part-plot]:has(> :is([data-part-empty], [data-part-error])) {
|
|
1227
1248
|
background: linear-gradient(var(--_chart-grid), var(--_chart-grid)) 0 100% / 100% 1px no-repeat
|
|
1228
1249
|
content-box;
|
|
1229
1250
|
box-sizing: border-box;
|
|
@@ -1232,7 +1253,7 @@
|
|
|
1232
1253
|
|
|
1233
1254
|
/* ── Text alternatives ────────────────────────────────────────────────── */
|
|
1234
1255
|
|
|
1235
|
-
[data-ui
|
|
1256
|
+
[data-ui-chart] [data-part-summary] {
|
|
1236
1257
|
block-size: 1px;
|
|
1237
1258
|
clip-path: inset(50%);
|
|
1238
1259
|
inline-size: 1px;
|
|
@@ -1243,9 +1264,11 @@
|
|
|
1243
1264
|
}
|
|
1244
1265
|
|
|
1245
1266
|
/* The table view: in the plot's box, scrolling inside it, in the document's
|
|
1246
|
-
direction, on the plot's ground.
|
|
1247
|
-
|
|
1248
|
-
|
|
1267
|
+
direction, on the plot's ground. The ground has a token of its own because
|
|
1268
|
+
`--slotted-chart-surface` is what the series mix with, so it stays opaque
|
|
1269
|
+
where a translucent theme makes the table translucent. */
|
|
1270
|
+
[data-ui-chart] [data-part-table-region] {
|
|
1271
|
+
background-color: var(--slotted-chart-table-surface, var(--_chart-surface));
|
|
1249
1272
|
border-radius: var(--_radius);
|
|
1250
1273
|
inset: 0;
|
|
1251
1274
|
overflow: auto;
|
|
@@ -1254,28 +1277,34 @@
|
|
|
1254
1277
|
z-index: 4;
|
|
1255
1278
|
}
|
|
1256
1279
|
|
|
1257
|
-
[data-ui
|
|
1280
|
+
[data-ui-chart]:dir(rtl) [data-part-table-region] {
|
|
1258
1281
|
direction: rtl;
|
|
1259
1282
|
}
|
|
1260
1283
|
|
|
1261
|
-
/* The region scrolls, so it takes focus to be scrolled by keyboard.
|
|
1262
|
-
|
|
1284
|
+
/* The region scrolls, so it takes focus to be scrolled by keyboard. The ring
|
|
1285
|
+
is drawn for a focus from the keyboard: a click on a cell focuses the region
|
|
1286
|
+
too, and the next Shift would make it match `:focus-visible`
|
|
1287
|
+
(`createFocusOrigin`). The browser's own ring is suppressed for the same focus. */
|
|
1288
|
+
[data-ui-chart] [data-part-table-region]:focus {
|
|
1289
|
+
outline: none;
|
|
1290
|
+
}
|
|
1291
|
+
[data-ui-chart] [data-part-table-region]:focus-visible[data-focus-origin='keyboard'] {
|
|
1263
1292
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1264
1293
|
outline-offset: calc(var(--slotted-focus-ring-width, 2px) * -1);
|
|
1265
1294
|
}
|
|
1266
1295
|
|
|
1267
|
-
[data-ui
|
|
1296
|
+
[data-ui-chart] [data-part-table-region][hidden] {
|
|
1268
1297
|
display: none;
|
|
1269
1298
|
}
|
|
1270
1299
|
|
|
1271
|
-
[data-ui
|
|
1300
|
+
[data-ui-chart] [data-part-table] {
|
|
1272
1301
|
border-collapse: collapse;
|
|
1273
1302
|
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
1274
1303
|
inline-size: 100%;
|
|
1275
1304
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
1276
1305
|
}
|
|
1277
1306
|
|
|
1278
|
-
[data-ui
|
|
1307
|
+
[data-ui-chart] [data-part-table] caption {
|
|
1279
1308
|
caption-side: bottom;
|
|
1280
1309
|
color: var(--slotted-text-muted, GrayText);
|
|
1281
1310
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
@@ -1283,7 +1312,7 @@
|
|
|
1283
1312
|
text-align: start;
|
|
1284
1313
|
}
|
|
1285
1314
|
|
|
1286
|
-
[data-ui
|
|
1315
|
+
[data-ui-chart] [data-part-table] :is(th, td) {
|
|
1287
1316
|
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
1288
1317
|
var(--slotted-border-subtle, CanvasText);
|
|
1289
1318
|
padding-block: var(--slotted-control-gap-sm, 0.375rem);
|
|
@@ -1292,24 +1321,27 @@
|
|
|
1292
1321
|
white-space: nowrap;
|
|
1293
1322
|
}
|
|
1294
1323
|
|
|
1295
|
-
[data-ui
|
|
1324
|
+
[data-ui-chart] [data-part-table] tbody th {
|
|
1296
1325
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1297
1326
|
}
|
|
1298
1327
|
|
|
1299
|
-
[data-ui
|
|
1300
|
-
background-color: var(
|
|
1328
|
+
[data-ui-chart] [data-part-table] thead th {
|
|
1329
|
+
background-color: var(
|
|
1330
|
+
--slotted-chart-table-header-surface,
|
|
1331
|
+
var(--slotted-chart-table-surface, var(--_chart-surface))
|
|
1332
|
+
);
|
|
1301
1333
|
color: var(--slotted-text-muted, GrayText);
|
|
1302
1334
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1303
1335
|
inset-block-start: 0;
|
|
1304
1336
|
position: sticky;
|
|
1305
1337
|
}
|
|
1306
1338
|
|
|
1307
|
-
[data-ui
|
|
1339
|
+
[data-ui-chart] [data-part-table] [data-numeric] {
|
|
1308
1340
|
font-variant-numeric: tabular-nums;
|
|
1309
1341
|
text-align: end;
|
|
1310
1342
|
}
|
|
1311
1343
|
|
|
1312
|
-
[data-ui
|
|
1344
|
+
[data-ui-chart] [data-part-table] tbody tr[data-current] {
|
|
1313
1345
|
background-color: var(--slotted-tone-secondary-subtle-hover, Highlight);
|
|
1314
1346
|
}
|
|
1315
1347
|
|
|
@@ -1322,7 +1354,7 @@
|
|
|
1322
1354
|
* `data-fullscreen`; the plot takes the height the header and the legend
|
|
1323
1355
|
* leave, and the engine redraws at the new size on its own.
|
|
1324
1356
|
*/
|
|
1325
|
-
[data-ui
|
|
1357
|
+
[data-ui-chart][data-fullscreen] {
|
|
1326
1358
|
--_chart-surface: var(--slotted-chart-surface, var(--slotted-surface, Canvas));
|
|
1327
1359
|
|
|
1328
1360
|
background-color: var(--_chart-surface);
|
|
@@ -1336,7 +1368,7 @@
|
|
|
1336
1368
|
z-index: var(--slotted-z-index-overlay, 1000);
|
|
1337
1369
|
}
|
|
1338
1370
|
|
|
1339
|
-
[data-ui
|
|
1371
|
+
[data-ui-chart][data-fullscreen] [data-part-title] {
|
|
1340
1372
|
font-size: var(--slotted-font-size-xl, 1.125rem);
|
|
1341
1373
|
}
|
|
1342
1374
|
|
|
@@ -1353,24 +1385,24 @@
|
|
|
1353
1385
|
* (`docs/token-foundation.md`, rule 4).
|
|
1354
1386
|
*/
|
|
1355
1387
|
@container slotted-chart (max-width: 480px) {
|
|
1356
|
-
[data-ui
|
|
1357
|
-
> [data-part
|
|
1358
|
-
> [data-part
|
|
1359
|
-
> :is([data-part
|
|
1388
|
+
[data-ui-chart]
|
|
1389
|
+
> [data-part-header]
|
|
1390
|
+
> [data-part-toolbar]
|
|
1391
|
+
> :is([data-part-view-toggle], [data-part-fullscreen-toggle]) {
|
|
1360
1392
|
display: none;
|
|
1361
1393
|
}
|
|
1362
1394
|
|
|
1363
|
-
[data-ui
|
|
1395
|
+
[data-ui-chart] [data-part-menu-item]:is([data-action='view'], [data-action='fullscreen']) {
|
|
1364
1396
|
display: flex;
|
|
1365
1397
|
}
|
|
1366
1398
|
|
|
1367
|
-
[data-ui
|
|
1399
|
+
[data-ui-chart] :is([data-part-legend-item], [data-part-legend-more]) {
|
|
1368
1400
|
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
1369
1401
|
}
|
|
1370
1402
|
}
|
|
1371
1403
|
|
|
1372
1404
|
@container slotted-chart (max-width: 360px) {
|
|
1373
|
-
[data-ui
|
|
1405
|
+
[data-ui-chart][data-variant='card'] {
|
|
1374
1406
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
1375
1407
|
padding-inline: var(--slotted-space-5, 0.75rem);
|
|
1376
1408
|
}
|
|
@@ -1382,50 +1414,48 @@
|
|
|
1382
1414
|
* A row in the layer is as wide as the layer, so it grows. An entry in the
|
|
1383
1415
|
* legend's own line keeps the ground a mouse sees — a `+1` grown to the
|
|
1384
1416
|
* comfortable height stood 26 wide and 44 tall — and a transparent
|
|
1385
|
-
* `::after`
|
|
1417
|
+
* `::after` centerd on it reaches 44 pixels in both axes. The line is that
|
|
1386
1418
|
* tall, so its clip does not cut the target, and wrapped lines stand that
|
|
1387
1419
|
* far apart, so one line's targets do not reach into the next. `+N` follows
|
|
1388
1420
|
* the last entry two pixels away and does not reach back across it.
|
|
1389
1421
|
*/
|
|
1390
1422
|
@media (pointer: coarse) {
|
|
1391
|
-
[data-ui
|
|
1423
|
+
[data-ui-chart] [data-part-menu-item] {
|
|
1392
1424
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1393
1425
|
}
|
|
1394
1426
|
|
|
1395
|
-
[data-ui
|
|
1427
|
+
[data-ui-chart] [data-part-menu] [data-part-legend-item] {
|
|
1396
1428
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1397
1429
|
min-inline-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1398
1430
|
}
|
|
1399
1431
|
|
|
1400
|
-
[data-ui
|
|
1432
|
+
[data-ui-chart] [data-part-legend] {
|
|
1401
1433
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1402
1434
|
row-gap: calc(var(--slotted-target-comfortable, 2.75rem) - var(--slotted-target-min, 1.5rem));
|
|
1403
1435
|
}
|
|
1404
1436
|
|
|
1405
|
-
[data-ui
|
|
1406
|
-
[data-part='legend']
|
|
1407
|
-
> :is([data-part='legend-item'], [data-part='legend-more']) {
|
|
1437
|
+
[data-ui-chart] [data-part-legend] > :is([data-part-legend-item], [data-part-legend-more]) {
|
|
1408
1438
|
position: relative;
|
|
1409
1439
|
}
|
|
1410
1440
|
|
|
1411
|
-
[data-ui
|
|
1412
|
-
[data-part
|
|
1413
|
-
> :is([data-part
|
|
1441
|
+
[data-ui-chart]
|
|
1442
|
+
[data-part-legend]
|
|
1443
|
+
> :is([data-part-legend-item], [data-part-legend-more])::after {
|
|
1414
1444
|
content: '';
|
|
1415
1445
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 2.75rem)) / 2));
|
|
1416
1446
|
position: absolute;
|
|
1417
1447
|
}
|
|
1418
1448
|
|
|
1419
|
-
[data-ui
|
|
1449
|
+
[data-ui-chart] [data-part-legend] > [data-part-legend-more]::after {
|
|
1420
1450
|
inset-inline-start: 0;
|
|
1421
1451
|
}
|
|
1422
1452
|
|
|
1423
|
-
[data-ui
|
|
1453
|
+
[data-ui-chart]
|
|
1424
1454
|
:is(
|
|
1425
|
-
[data-part
|
|
1426
|
-
[data-part
|
|
1427
|
-
[data-part
|
|
1428
|
-
[data-part
|
|
1455
|
+
[data-part-zoom-reset],
|
|
1456
|
+
[data-part-view-toggle],
|
|
1457
|
+
[data-part-fullscreen-toggle],
|
|
1458
|
+
[data-part-menu-trigger]
|
|
1429
1459
|
) {
|
|
1430
1460
|
--_box: var(--slotted-target-comfortable, 2.75rem);
|
|
1431
1461
|
}
|
|
@@ -1435,44 +1465,43 @@
|
|
|
1435
1465
|
|
|
1436
1466
|
/* Paper holds the marks and the words: no controls, no hover, no layer. */
|
|
1437
1467
|
@media print {
|
|
1438
|
-
[data-ui
|
|
1468
|
+
[data-ui-chart]
|
|
1439
1469
|
:is(
|
|
1440
|
-
[data-part
|
|
1441
|
-
[data-part
|
|
1442
|
-
[data-part
|
|
1443
|
-
[data-part
|
|
1444
|
-
[data-part
|
|
1445
|
-
[data-part
|
|
1470
|
+
[data-part-toolbar],
|
|
1471
|
+
[data-part-help],
|
|
1472
|
+
[data-part-legend-more],
|
|
1473
|
+
[data-part-tooltip],
|
|
1474
|
+
[data-part-crosshair],
|
|
1475
|
+
[data-part-marker]:not([data-selected])
|
|
1446
1476
|
) {
|
|
1447
1477
|
display: none;
|
|
1448
1478
|
}
|
|
1449
1479
|
|
|
1450
|
-
[data-ui
|
|
1480
|
+
[data-ui-chart] [data-part-legend] {
|
|
1451
1481
|
flex-wrap: wrap;
|
|
1452
1482
|
overflow: visible;
|
|
1453
1483
|
}
|
|
1454
1484
|
|
|
1455
|
-
[data-ui
|
|
1485
|
+
[data-ui-chart] {
|
|
1456
1486
|
break-inside: avoid;
|
|
1457
1487
|
}
|
|
1458
1488
|
}
|
|
1459
1489
|
|
|
1460
|
-
/* ── Forced
|
|
1490
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1461
1491
|
|
|
1462
1492
|
/**
|
|
1463
|
-
* Every series is one system
|
|
1493
|
+
* Every series is one system color here and the engine draws its textures,
|
|
1464
1494
|
* so the legend's filled markers would all read as one: they keep their
|
|
1465
|
-
* shape, and the hidden state keeps its strike-through, which
|
|
1495
|
+
* shape, and the hidden state keeps its strike-through, which color could
|
|
1466
1496
|
* not have carried anyway.
|
|
1467
1497
|
*/
|
|
1468
1498
|
@media (forced-colors: active) {
|
|
1469
|
-
[data-ui
|
|
1470
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'], [data-part='marker']) {
|
|
1499
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker], [data-part-marker]) {
|
|
1471
1500
|
forced-color-adjust: none;
|
|
1472
1501
|
background-color: CanvasText;
|
|
1473
1502
|
}
|
|
1474
1503
|
|
|
1475
|
-
[data-ui
|
|
1504
|
+
[data-ui-chart] [data-part-crosshair] {
|
|
1476
1505
|
background-color: GrayText;
|
|
1477
1506
|
forced-color-adjust: none;
|
|
1478
1507
|
}
|