@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
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,7 +187,7 @@
|
|
|
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;
|
|
@@ -183,14 +195,14 @@
|
|
|
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,22 +225,22 @@
|
|
|
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
246
|
var(--slotted-space-1, 0.125rem) + var(--slotted-font-size-sm, 0.8125rem) *
|
|
@@ -236,11 +248,15 @@
|
|
|
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);
|
|
@@ -837,7 +855,7 @@
|
|
|
837
855
|
* point never hides under, and the crosshair shows which point it is about.
|
|
838
856
|
* The binding docks it; `placeTooltip` says when.
|
|
839
857
|
*/
|
|
840
|
-
[data-ui
|
|
858
|
+
[data-ui-chart] [data-part-tooltip][data-docked] {
|
|
841
859
|
inline-size: 100%;
|
|
842
860
|
max-inline-size: 100%;
|
|
843
861
|
min-inline-size: 0;
|
|
@@ -847,16 +865,16 @@
|
|
|
847
865
|
plot's coordinates: an inset resolves against the element's own
|
|
848
866
|
direction, so the right-to-left box anchors at its inline end, which is
|
|
849
867
|
the same left edge the translation is measured from. */
|
|
850
|
-
[data-ui
|
|
868
|
+
[data-ui-chart]:dir(rtl) :is([data-part-tooltip], [data-part-center]) {
|
|
851
869
|
direction: rtl;
|
|
852
870
|
}
|
|
853
871
|
|
|
854
|
-
[data-ui
|
|
872
|
+
[data-ui-chart]:dir(rtl) [data-part-tooltip] {
|
|
855
873
|
inset-inline-end: 0;
|
|
856
874
|
inset-inline-start: auto;
|
|
857
875
|
}
|
|
858
876
|
|
|
859
|
-
[data-ui
|
|
877
|
+
[data-ui-chart] [data-part-tooltip][data-open] {
|
|
860
878
|
opacity: 1;
|
|
861
879
|
visibility: visible;
|
|
862
880
|
}
|
|
@@ -864,13 +882,13 @@
|
|
|
864
882
|
/* A tooltip that appears slides into place from where it opened; one that
|
|
865
883
|
follows the pointer from point to point moves with it. Opening snaps the
|
|
866
884
|
position so the first frame is not a flight from the corner. */
|
|
867
|
-
[data-ui
|
|
885
|
+
[data-ui-chart] [data-part-tooltip]:not([data-open]) {
|
|
868
886
|
transition:
|
|
869
887
|
opacity var(--slotted-duration-short) var(--slotted-easing-standard),
|
|
870
888
|
visibility var(--slotted-duration-instant) linear var(--slotted-duration-short);
|
|
871
889
|
}
|
|
872
890
|
|
|
873
|
-
[data-ui
|
|
891
|
+
[data-ui-chart] [data-part-tooltip-title] {
|
|
874
892
|
color: var(--slotted-text, CanvasText);
|
|
875
893
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
876
894
|
grid-column: 1 / -1;
|
|
@@ -878,35 +896,35 @@
|
|
|
878
896
|
}
|
|
879
897
|
|
|
880
898
|
/* The label of a line on this category, the plot's own words for it. */
|
|
881
|
-
[data-ui
|
|
899
|
+
[data-ui-chart] [data-part-tooltip-note] {
|
|
882
900
|
color: var(--slotted-text-muted, GrayText);
|
|
883
901
|
grid-column: 1 / -1;
|
|
884
902
|
overflow-wrap: anywhere;
|
|
885
903
|
}
|
|
886
904
|
|
|
887
|
-
[data-ui
|
|
905
|
+
[data-ui-chart] :is([data-part-tooltip-item], [data-part-tooltip-total]) {
|
|
888
906
|
align-items: center;
|
|
889
907
|
display: grid;
|
|
890
908
|
grid-column: 1 / -1;
|
|
891
909
|
grid-template-columns: subgrid;
|
|
892
910
|
}
|
|
893
911
|
|
|
894
|
-
[data-ui
|
|
912
|
+
[data-ui-chart] [data-part-tooltip-item] {
|
|
895
913
|
color: var(--slotted-text-muted, GrayText);
|
|
896
914
|
}
|
|
897
915
|
|
|
898
|
-
[data-ui
|
|
916
|
+
[data-ui-chart] [data-part-tooltip-item][data-current] {
|
|
899
917
|
color: var(--slotted-text, CanvasText);
|
|
900
918
|
}
|
|
901
919
|
|
|
902
|
-
[data-ui
|
|
920
|
+
[data-ui-chart] [data-part-tooltip-label] {
|
|
903
921
|
min-inline-size: 0;
|
|
904
922
|
overflow: hidden;
|
|
905
923
|
text-overflow: ellipsis;
|
|
906
924
|
white-space: nowrap;
|
|
907
925
|
}
|
|
908
926
|
|
|
909
|
-
[data-ui
|
|
927
|
+
[data-ui-chart] [data-part-tooltip-value] {
|
|
910
928
|
color: var(--slotted-text, CanvasText);
|
|
911
929
|
font-variant-numeric: tabular-nums;
|
|
912
930
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
@@ -914,7 +932,7 @@
|
|
|
914
932
|
white-space: nowrap;
|
|
915
933
|
}
|
|
916
934
|
|
|
917
|
-
[data-ui
|
|
935
|
+
[data-ui-chart] [data-part-tooltip-total] {
|
|
918
936
|
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
919
937
|
var(--slotted-border-subtle, CanvasText);
|
|
920
938
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -922,13 +940,13 @@
|
|
|
922
940
|
padding-block-start: var(--slotted-space-3, 0.375rem);
|
|
923
941
|
}
|
|
924
942
|
|
|
925
|
-
[data-ui
|
|
943
|
+
[data-ui-chart] [data-part-tooltip-total] > :first-child {
|
|
926
944
|
grid-column: 1 / 3;
|
|
927
945
|
}
|
|
928
946
|
|
|
929
|
-
/* ── The
|
|
947
|
+
/* ── The center of a donut ────────────────────────────────────────────── */
|
|
930
948
|
|
|
931
|
-
[data-ui
|
|
949
|
+
[data-ui-chart] [data-part-center] {
|
|
932
950
|
align-content: center;
|
|
933
951
|
display: grid;
|
|
934
952
|
inset: 0;
|
|
@@ -939,14 +957,14 @@
|
|
|
939
957
|
z-index: 2;
|
|
940
958
|
}
|
|
941
959
|
|
|
942
|
-
[data-ui
|
|
960
|
+
[data-ui-chart] [data-part-center-value] {
|
|
943
961
|
font-size: var(--slotted-font-size-2xl, 1.25rem);
|
|
944
962
|
font-variant-numeric: tabular-nums;
|
|
945
963
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
946
964
|
line-height: var(--slotted-line-height-2xl, 1.4);
|
|
947
965
|
}
|
|
948
966
|
|
|
949
|
-
[data-ui
|
|
967
|
+
[data-ui-chart] [data-part-center-label] {
|
|
950
968
|
color: var(--slotted-text-muted, GrayText);
|
|
951
969
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
952
970
|
line-height: var(--slotted-line-height-xs, 1.4);
|
|
@@ -962,12 +980,12 @@
|
|
|
962
980
|
* have, a line and its wash, a pie's ring — under one shimmer. It fills the
|
|
963
981
|
* plot's box exactly, so nothing moves when the data lands.
|
|
964
982
|
*/
|
|
965
|
-
[data-ui
|
|
983
|
+
[data-ui-chart] [data-part-skeleton] {
|
|
966
984
|
inset: var(--_chart-inset);
|
|
967
985
|
position: absolute;
|
|
968
986
|
}
|
|
969
987
|
|
|
970
|
-
[data-ui
|
|
988
|
+
[data-ui-chart] [data-part-skeleton] > [data-ui-skeleton] {
|
|
971
989
|
/* A tenth of the text over the ground: a step lighter than the ground
|
|
972
990
|
in a dark scheme and a step darker in a light one, where the skeleton
|
|
973
991
|
family's own fill, made for a sunken field, sank into a dark tile. */
|
|
@@ -990,7 +1008,7 @@
|
|
|
990
1008
|
row-gap: var(--_chart-inset);
|
|
991
1009
|
}
|
|
992
1010
|
|
|
993
|
-
[data-ui
|
|
1011
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='y'] {
|
|
994
1012
|
align-items: end;
|
|
995
1013
|
display: flex;
|
|
996
1014
|
flex-direction: column;
|
|
@@ -998,17 +1016,17 @@
|
|
|
998
1016
|
justify-content: space-between;
|
|
999
1017
|
}
|
|
1000
1018
|
|
|
1001
|
-
[data-ui
|
|
1019
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='x'] {
|
|
1002
1020
|
display: flex;
|
|
1003
1021
|
grid-area: x;
|
|
1004
1022
|
justify-content: space-around;
|
|
1005
1023
|
}
|
|
1006
1024
|
|
|
1007
1025
|
/* An axis label is a short line at the axis type's height. */
|
|
1008
|
-
[data-ui
|
|
1009
|
-
[data-part
|
|
1026
|
+
[data-ui-chart]
|
|
1027
|
+
[data-part-skeleton]
|
|
1010
1028
|
:is([data-skeleton='y'], [data-skeleton='x'])
|
|
1011
|
-
> [data-ui
|
|
1029
|
+
> [data-ui-skeleton] {
|
|
1012
1030
|
block-size: 0.5rem;
|
|
1013
1031
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
1014
1032
|
flex: none;
|
|
@@ -1016,22 +1034,19 @@
|
|
|
1016
1034
|
min-block-size: 0;
|
|
1017
1035
|
}
|
|
1018
1036
|
|
|
1019
|
-
[data-ui='
|
|
1020
|
-
[data-part='skeleton']
|
|
1021
|
-
[data-skeleton='y']
|
|
1022
|
-
> [data-ui='skeleton']:nth-child(odd) {
|
|
1037
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='y'] > [data-ui-skeleton]:nth-child(odd) {
|
|
1023
1038
|
inline-size: 2rem;
|
|
1024
1039
|
}
|
|
1025
1040
|
|
|
1026
1041
|
/* Six category labels at their full width are 144 pixels, more than the
|
|
1027
1042
|
marks column of a quarter-width tile holds; they shrink together with it,
|
|
1028
1043
|
as the engine's labels thin out, rather than run past the plot. */
|
|
1029
|
-
[data-ui
|
|
1044
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='x'] > [data-ui-skeleton] {
|
|
1030
1045
|
flex: 0 1 auto;
|
|
1031
1046
|
min-inline-size: 0;
|
|
1032
1047
|
}
|
|
1033
1048
|
|
|
1034
|
-
[data-ui
|
|
1049
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='marks'] {
|
|
1035
1050
|
align-items: end;
|
|
1036
1051
|
background-image: repeating-linear-gradient(
|
|
1037
1052
|
to bottom,
|
|
@@ -1047,73 +1062,73 @@
|
|
|
1047
1062
|
|
|
1048
1063
|
/* The skeleton family sizes a block on its own; inside the plot a bar takes
|
|
1049
1064
|
its share of the row and nothing more. */
|
|
1050
|
-
[data-ui
|
|
1065
|
+
[data-ui-chart] [data-part-skeleton] [data-skeleton='marks'] > [data-ui-skeleton] {
|
|
1051
1066
|
border-radius: var(--_chart-bar-radius) var(--_chart-bar-radius) 0 0;
|
|
1052
1067
|
flex: 0 1 9%;
|
|
1053
1068
|
inline-size: auto;
|
|
1054
1069
|
min-inline-size: 0;
|
|
1055
1070
|
}
|
|
1056
1071
|
|
|
1057
|
-
[data-ui
|
|
1058
|
-
[data-part
|
|
1072
|
+
[data-ui-chart]
|
|
1073
|
+
[data-part-skeleton][data-kind='bar']
|
|
1059
1074
|
[data-skeleton='marks']
|
|
1060
|
-
> [data-ui
|
|
1075
|
+
> [data-ui-skeleton]:nth-child(7n + 1) {
|
|
1061
1076
|
block-size: 38%;
|
|
1062
1077
|
}
|
|
1063
|
-
[data-ui
|
|
1064
|
-
[data-part
|
|
1078
|
+
[data-ui-chart]
|
|
1079
|
+
[data-part-skeleton][data-kind='bar']
|
|
1065
1080
|
[data-skeleton='marks']
|
|
1066
|
-
> [data-ui
|
|
1081
|
+
> [data-ui-skeleton]:nth-child(7n + 2) {
|
|
1067
1082
|
block-size: 62%;
|
|
1068
1083
|
}
|
|
1069
|
-
[data-ui
|
|
1070
|
-
[data-part
|
|
1084
|
+
[data-ui-chart]
|
|
1085
|
+
[data-part-skeleton][data-kind='bar']
|
|
1071
1086
|
[data-skeleton='marks']
|
|
1072
|
-
> [data-ui
|
|
1087
|
+
> [data-ui-skeleton]:nth-child(7n + 3) {
|
|
1073
1088
|
block-size: 50%;
|
|
1074
1089
|
}
|
|
1075
|
-
[data-ui
|
|
1076
|
-
[data-part
|
|
1090
|
+
[data-ui-chart]
|
|
1091
|
+
[data-part-skeleton][data-kind='bar']
|
|
1077
1092
|
[data-skeleton='marks']
|
|
1078
|
-
> [data-ui
|
|
1093
|
+
> [data-ui-skeleton]:nth-child(7n + 4) {
|
|
1079
1094
|
block-size: 74%;
|
|
1080
1095
|
}
|
|
1081
|
-
[data-ui
|
|
1082
|
-
[data-part
|
|
1096
|
+
[data-ui-chart]
|
|
1097
|
+
[data-part-skeleton][data-kind='bar']
|
|
1083
1098
|
[data-skeleton='marks']
|
|
1084
|
-
> [data-ui
|
|
1099
|
+
> [data-ui-skeleton]:nth-child(7n + 5) {
|
|
1085
1100
|
block-size: 56%;
|
|
1086
1101
|
}
|
|
1087
|
-
[data-ui
|
|
1088
|
-
[data-part
|
|
1102
|
+
[data-ui-chart]
|
|
1103
|
+
[data-part-skeleton][data-kind='bar']
|
|
1089
1104
|
[data-skeleton='marks']
|
|
1090
|
-
> [data-ui
|
|
1105
|
+
> [data-ui-skeleton]:nth-child(7n + 6) {
|
|
1091
1106
|
block-size: 44%;
|
|
1092
1107
|
}
|
|
1093
|
-
[data-ui
|
|
1094
|
-
[data-part
|
|
1108
|
+
[data-ui-chart]
|
|
1109
|
+
[data-part-skeleton][data-kind='bar']
|
|
1095
1110
|
[data-skeleton='marks']
|
|
1096
|
-
> [data-ui
|
|
1111
|
+
> [data-ui-skeleton]:nth-child(7n + 7) {
|
|
1097
1112
|
block-size: 68%;
|
|
1098
1113
|
}
|
|
1099
1114
|
|
|
1100
1115
|
/* A line is its stroke and the wash under it: two blocks over the whole
|
|
1101
1116
|
marks area, one cut to a band as thick as a line, one to the silhouette
|
|
1102
1117
|
under it at a third of the fill. */
|
|
1103
|
-
[data-ui
|
|
1104
|
-
[data-part
|
|
1118
|
+
[data-ui-chart]
|
|
1119
|
+
[data-part-skeleton][data-kind='line']
|
|
1105
1120
|
[data-skeleton='marks']
|
|
1106
|
-
> [data-ui
|
|
1121
|
+
> [data-ui-skeleton] {
|
|
1107
1122
|
block-size: 100%;
|
|
1108
1123
|
border-radius: 0;
|
|
1109
1124
|
inset: 0;
|
|
1110
1125
|
position: absolute;
|
|
1111
1126
|
}
|
|
1112
1127
|
|
|
1113
|
-
[data-ui
|
|
1114
|
-
[data-part
|
|
1128
|
+
[data-ui-chart]
|
|
1129
|
+
[data-part-skeleton][data-kind='line']
|
|
1115
1130
|
[data-skeleton='marks']
|
|
1116
|
-
> [data-ui
|
|
1131
|
+
> [data-ui-skeleton]:first-child {
|
|
1117
1132
|
clip-path: polygon(
|
|
1118
1133
|
0% 60.5%,
|
|
1119
1134
|
14% 46.5%,
|
|
@@ -1134,10 +1149,10 @@
|
|
|
1134
1149
|
);
|
|
1135
1150
|
}
|
|
1136
1151
|
|
|
1137
|
-
[data-ui
|
|
1138
|
-
[data-part
|
|
1152
|
+
[data-ui-chart]
|
|
1153
|
+
[data-part-skeleton][data-kind='line']
|
|
1139
1154
|
[data-skeleton='marks']
|
|
1140
|
-
> [data-ui
|
|
1155
|
+
> [data-ui-skeleton]:last-child {
|
|
1141
1156
|
clip-path: polygon(
|
|
1142
1157
|
0% 62%,
|
|
1143
1158
|
14% 48%,
|
|
@@ -1153,16 +1168,14 @@
|
|
|
1153
1168
|
opacity: 0.35;
|
|
1154
1169
|
}
|
|
1155
1170
|
|
|
1156
|
-
/* A pie has no axes: its ring,
|
|
1157
|
-
[data-ui
|
|
1171
|
+
/* A pie has no axes: its ring, centerd, at the size the engine draws it. */
|
|
1172
|
+
[data-ui-chart] [data-part-skeleton][data-kind='pie'] > [data-ui-skeleton] {
|
|
1158
1173
|
align-items: center;
|
|
1159
1174
|
display: flex;
|
|
1160
1175
|
justify-content: center;
|
|
1161
1176
|
}
|
|
1162
1177
|
|
|
1163
|
-
[data-ui='
|
|
1164
|
-
[data-part='skeleton'][data-kind='pie']
|
|
1165
|
-
[data-ui='skeleton'][data-shape='circle'] {
|
|
1178
|
+
[data-ui-chart] [data-part-skeleton][data-kind='pie'] [data-ui-skeleton][data-shape='circle'] {
|
|
1166
1179
|
aspect-ratio: 1;
|
|
1167
1180
|
block-size: 76%;
|
|
1168
1181
|
flex: none;
|
|
@@ -1176,7 +1189,7 @@
|
|
|
1176
1189
|
|
|
1177
1190
|
/* A legend whose entries come with the data stands in as three short
|
|
1178
1191
|
lines of the entries' type height. */
|
|
1179
|
-
[data-ui
|
|
1192
|
+
[data-ui-chart] [data-part-legend] > [data-ui-skeleton] {
|
|
1180
1193
|
/* A tenth of the text over the ground: a step lighter than the ground
|
|
1181
1194
|
in a dark scheme and a step darker in a light one, where the skeleton
|
|
1182
1195
|
family's own fill, made for a sunken field, sank into a dark tile. */
|
|
@@ -1198,13 +1211,13 @@
|
|
|
1198
1211
|
min-block-size: 0;
|
|
1199
1212
|
}
|
|
1200
1213
|
|
|
1201
|
-
[data-ui
|
|
1214
|
+
[data-ui-chart] [data-part-legend] > [data-ui-skeleton]:nth-child(2) {
|
|
1202
1215
|
inline-size: 3.25rem;
|
|
1203
1216
|
}
|
|
1204
1217
|
|
|
1205
1218
|
/* ── Empty and failed ─────────────────────────────────────────────────── */
|
|
1206
1219
|
|
|
1207
|
-
[data-ui
|
|
1220
|
+
[data-ui-chart] :is([data-part-empty], [data-part-error]) {
|
|
1208
1221
|
/* A message about one chart, at the size of the chart's own words. */
|
|
1209
1222
|
--slotted-result-state-title-font-size: var(--slotted-font-size-md, 0.875rem);
|
|
1210
1223
|
--slotted-result-state-padding-block: var(--slotted-space-4, 0.5rem);
|
|
@@ -1223,7 +1236,7 @@
|
|
|
1223
1236
|
the message stands on no surface of its own, and the bands the grid drew
|
|
1224
1237
|
every quarter of the height crossed the empty title and ran between the
|
|
1225
1238
|
failed title and its retry. */
|
|
1226
|
-
[data-ui
|
|
1239
|
+
[data-ui-chart] [data-part-plot]:has(> :is([data-part-empty], [data-part-error])) {
|
|
1227
1240
|
background: linear-gradient(var(--_chart-grid), var(--_chart-grid)) 0 100% / 100% 1px no-repeat
|
|
1228
1241
|
content-box;
|
|
1229
1242
|
box-sizing: border-box;
|
|
@@ -1232,7 +1245,7 @@
|
|
|
1232
1245
|
|
|
1233
1246
|
/* ── Text alternatives ────────────────────────────────────────────────── */
|
|
1234
1247
|
|
|
1235
|
-
[data-ui
|
|
1248
|
+
[data-ui-chart] [data-part-summary] {
|
|
1236
1249
|
block-size: 1px;
|
|
1237
1250
|
clip-path: inset(50%);
|
|
1238
1251
|
inline-size: 1px;
|
|
@@ -1243,9 +1256,11 @@
|
|
|
1243
1256
|
}
|
|
1244
1257
|
|
|
1245
1258
|
/* The table view: in the plot's box, scrolling inside it, in the document's
|
|
1246
|
-
direction, on the plot's ground.
|
|
1247
|
-
|
|
1248
|
-
|
|
1259
|
+
direction, on the plot's ground. The ground has a token of its own because
|
|
1260
|
+
`--slotted-chart-surface` is what the series mix with, so it stays opaque
|
|
1261
|
+
where a translucent theme makes the table translucent. */
|
|
1262
|
+
[data-ui-chart] [data-part-table-region] {
|
|
1263
|
+
background-color: var(--slotted-chart-table-surface, var(--_chart-surface));
|
|
1249
1264
|
border-radius: var(--_radius);
|
|
1250
1265
|
inset: 0;
|
|
1251
1266
|
overflow: auto;
|
|
@@ -1254,28 +1269,34 @@
|
|
|
1254
1269
|
z-index: 4;
|
|
1255
1270
|
}
|
|
1256
1271
|
|
|
1257
|
-
[data-ui
|
|
1272
|
+
[data-ui-chart]:dir(rtl) [data-part-table-region] {
|
|
1258
1273
|
direction: rtl;
|
|
1259
1274
|
}
|
|
1260
1275
|
|
|
1261
|
-
/* The region scrolls, so it takes focus to be scrolled by keyboard.
|
|
1262
|
-
|
|
1276
|
+
/* The region scrolls, so it takes focus to be scrolled by keyboard. The ring
|
|
1277
|
+
is drawn for a focus from the keyboard: a click on a cell focuses the region
|
|
1278
|
+
too, and the next Shift would make it match `:focus-visible`
|
|
1279
|
+
(`createFocusOrigin`). The browser's own ring is suppressed for the same focus. */
|
|
1280
|
+
[data-ui-chart] [data-part-table-region]:focus {
|
|
1281
|
+
outline: none;
|
|
1282
|
+
}
|
|
1283
|
+
[data-ui-chart] [data-part-table-region]:focus-visible[data-focus-origin='keyboard'] {
|
|
1263
1284
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1264
1285
|
outline-offset: calc(var(--slotted-focus-ring-width, 2px) * -1);
|
|
1265
1286
|
}
|
|
1266
1287
|
|
|
1267
|
-
[data-ui
|
|
1288
|
+
[data-ui-chart] [data-part-table-region][hidden] {
|
|
1268
1289
|
display: none;
|
|
1269
1290
|
}
|
|
1270
1291
|
|
|
1271
|
-
[data-ui
|
|
1292
|
+
[data-ui-chart] [data-part-table] {
|
|
1272
1293
|
border-collapse: collapse;
|
|
1273
1294
|
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
1274
1295
|
inline-size: 100%;
|
|
1275
1296
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
1276
1297
|
}
|
|
1277
1298
|
|
|
1278
|
-
[data-ui
|
|
1299
|
+
[data-ui-chart] [data-part-table] caption {
|
|
1279
1300
|
caption-side: bottom;
|
|
1280
1301
|
color: var(--slotted-text-muted, GrayText);
|
|
1281
1302
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
@@ -1283,7 +1304,7 @@
|
|
|
1283
1304
|
text-align: start;
|
|
1284
1305
|
}
|
|
1285
1306
|
|
|
1286
|
-
[data-ui
|
|
1307
|
+
[data-ui-chart] [data-part-table] :is(th, td) {
|
|
1287
1308
|
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
1288
1309
|
var(--slotted-border-subtle, CanvasText);
|
|
1289
1310
|
padding-block: var(--slotted-control-gap-sm, 0.375rem);
|
|
@@ -1292,24 +1313,27 @@
|
|
|
1292
1313
|
white-space: nowrap;
|
|
1293
1314
|
}
|
|
1294
1315
|
|
|
1295
|
-
[data-ui
|
|
1316
|
+
[data-ui-chart] [data-part-table] tbody th {
|
|
1296
1317
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1297
1318
|
}
|
|
1298
1319
|
|
|
1299
|
-
[data-ui
|
|
1300
|
-
background-color: var(
|
|
1320
|
+
[data-ui-chart] [data-part-table] thead th {
|
|
1321
|
+
background-color: var(
|
|
1322
|
+
--slotted-chart-table-header-surface,
|
|
1323
|
+
var(--slotted-chart-table-surface, var(--_chart-surface))
|
|
1324
|
+
);
|
|
1301
1325
|
color: var(--slotted-text-muted, GrayText);
|
|
1302
1326
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1303
1327
|
inset-block-start: 0;
|
|
1304
1328
|
position: sticky;
|
|
1305
1329
|
}
|
|
1306
1330
|
|
|
1307
|
-
[data-ui
|
|
1331
|
+
[data-ui-chart] [data-part-table] [data-numeric] {
|
|
1308
1332
|
font-variant-numeric: tabular-nums;
|
|
1309
1333
|
text-align: end;
|
|
1310
1334
|
}
|
|
1311
1335
|
|
|
1312
|
-
[data-ui
|
|
1336
|
+
[data-ui-chart] [data-part-table] tbody tr[data-current] {
|
|
1313
1337
|
background-color: var(--slotted-tone-secondary-subtle-hover, Highlight);
|
|
1314
1338
|
}
|
|
1315
1339
|
|
|
@@ -1322,7 +1346,7 @@
|
|
|
1322
1346
|
* `data-fullscreen`; the plot takes the height the header and the legend
|
|
1323
1347
|
* leave, and the engine redraws at the new size on its own.
|
|
1324
1348
|
*/
|
|
1325
|
-
[data-ui
|
|
1349
|
+
[data-ui-chart][data-fullscreen] {
|
|
1326
1350
|
--_chart-surface: var(--slotted-chart-surface, var(--slotted-surface, Canvas));
|
|
1327
1351
|
|
|
1328
1352
|
background-color: var(--_chart-surface);
|
|
@@ -1336,7 +1360,7 @@
|
|
|
1336
1360
|
z-index: var(--slotted-z-index-overlay, 1000);
|
|
1337
1361
|
}
|
|
1338
1362
|
|
|
1339
|
-
[data-ui
|
|
1363
|
+
[data-ui-chart][data-fullscreen] [data-part-title] {
|
|
1340
1364
|
font-size: var(--slotted-font-size-xl, 1.125rem);
|
|
1341
1365
|
}
|
|
1342
1366
|
|
|
@@ -1353,24 +1377,24 @@
|
|
|
1353
1377
|
* (`docs/token-foundation.md`, rule 4).
|
|
1354
1378
|
*/
|
|
1355
1379
|
@container slotted-chart (max-width: 480px) {
|
|
1356
|
-
[data-ui
|
|
1357
|
-
> [data-part
|
|
1358
|
-
> [data-part
|
|
1359
|
-
> :is([data-part
|
|
1380
|
+
[data-ui-chart]
|
|
1381
|
+
> [data-part-header]
|
|
1382
|
+
> [data-part-toolbar]
|
|
1383
|
+
> :is([data-part-view-toggle], [data-part-fullscreen-toggle]) {
|
|
1360
1384
|
display: none;
|
|
1361
1385
|
}
|
|
1362
1386
|
|
|
1363
|
-
[data-ui
|
|
1387
|
+
[data-ui-chart] [data-part-menu-item]:is([data-action='view'], [data-action='fullscreen']) {
|
|
1364
1388
|
display: flex;
|
|
1365
1389
|
}
|
|
1366
1390
|
|
|
1367
|
-
[data-ui
|
|
1391
|
+
[data-ui-chart] :is([data-part-legend-item], [data-part-legend-more]) {
|
|
1368
1392
|
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
1369
1393
|
}
|
|
1370
1394
|
}
|
|
1371
1395
|
|
|
1372
1396
|
@container slotted-chart (max-width: 360px) {
|
|
1373
|
-
[data-ui
|
|
1397
|
+
[data-ui-chart][data-variant='card'] {
|
|
1374
1398
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
1375
1399
|
padding-inline: var(--slotted-space-5, 0.75rem);
|
|
1376
1400
|
}
|
|
@@ -1382,50 +1406,48 @@
|
|
|
1382
1406
|
* A row in the layer is as wide as the layer, so it grows. An entry in the
|
|
1383
1407
|
* legend's own line keeps the ground a mouse sees — a `+1` grown to the
|
|
1384
1408
|
* comfortable height stood 26 wide and 44 tall — and a transparent
|
|
1385
|
-
* `::after`
|
|
1409
|
+
* `::after` centerd on it reaches 44 pixels in both axes. The line is that
|
|
1386
1410
|
* tall, so its clip does not cut the target, and wrapped lines stand that
|
|
1387
1411
|
* far apart, so one line's targets do not reach into the next. `+N` follows
|
|
1388
1412
|
* the last entry two pixels away and does not reach back across it.
|
|
1389
1413
|
*/
|
|
1390
1414
|
@media (pointer: coarse) {
|
|
1391
|
-
[data-ui
|
|
1415
|
+
[data-ui-chart] [data-part-menu-item] {
|
|
1392
1416
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1393
1417
|
}
|
|
1394
1418
|
|
|
1395
|
-
[data-ui
|
|
1419
|
+
[data-ui-chart] [data-part-menu] [data-part-legend-item] {
|
|
1396
1420
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1397
1421
|
min-inline-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1398
1422
|
}
|
|
1399
1423
|
|
|
1400
|
-
[data-ui
|
|
1424
|
+
[data-ui-chart] [data-part-legend] {
|
|
1401
1425
|
min-block-size: var(--slotted-target-comfortable, 2.75rem);
|
|
1402
1426
|
row-gap: calc(var(--slotted-target-comfortable, 2.75rem) - var(--slotted-target-min, 1.5rem));
|
|
1403
1427
|
}
|
|
1404
1428
|
|
|
1405
|
-
[data-ui
|
|
1406
|
-
[data-part='legend']
|
|
1407
|
-
> :is([data-part='legend-item'], [data-part='legend-more']) {
|
|
1429
|
+
[data-ui-chart] [data-part-legend] > :is([data-part-legend-item], [data-part-legend-more]) {
|
|
1408
1430
|
position: relative;
|
|
1409
1431
|
}
|
|
1410
1432
|
|
|
1411
|
-
[data-ui
|
|
1412
|
-
[data-part
|
|
1413
|
-
> :is([data-part
|
|
1433
|
+
[data-ui-chart]
|
|
1434
|
+
[data-part-legend]
|
|
1435
|
+
> :is([data-part-legend-item], [data-part-legend-more])::after {
|
|
1414
1436
|
content: '';
|
|
1415
1437
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 2.75rem)) / 2));
|
|
1416
1438
|
position: absolute;
|
|
1417
1439
|
}
|
|
1418
1440
|
|
|
1419
|
-
[data-ui
|
|
1441
|
+
[data-ui-chart] [data-part-legend] > [data-part-legend-more]::after {
|
|
1420
1442
|
inset-inline-start: 0;
|
|
1421
1443
|
}
|
|
1422
1444
|
|
|
1423
|
-
[data-ui
|
|
1445
|
+
[data-ui-chart]
|
|
1424
1446
|
:is(
|
|
1425
|
-
[data-part
|
|
1426
|
-
[data-part
|
|
1427
|
-
[data-part
|
|
1428
|
-
[data-part
|
|
1447
|
+
[data-part-zoom-reset],
|
|
1448
|
+
[data-part-view-toggle],
|
|
1449
|
+
[data-part-fullscreen-toggle],
|
|
1450
|
+
[data-part-menu-trigger]
|
|
1429
1451
|
) {
|
|
1430
1452
|
--_box: var(--slotted-target-comfortable, 2.75rem);
|
|
1431
1453
|
}
|
|
@@ -1435,44 +1457,43 @@
|
|
|
1435
1457
|
|
|
1436
1458
|
/* Paper holds the marks and the words: no controls, no hover, no layer. */
|
|
1437
1459
|
@media print {
|
|
1438
|
-
[data-ui
|
|
1460
|
+
[data-ui-chart]
|
|
1439
1461
|
:is(
|
|
1440
|
-
[data-part
|
|
1441
|
-
[data-part
|
|
1442
|
-
[data-part
|
|
1443
|
-
[data-part
|
|
1444
|
-
[data-part
|
|
1445
|
-
[data-part
|
|
1462
|
+
[data-part-toolbar],
|
|
1463
|
+
[data-part-help],
|
|
1464
|
+
[data-part-legend-more],
|
|
1465
|
+
[data-part-tooltip],
|
|
1466
|
+
[data-part-crosshair],
|
|
1467
|
+
[data-part-marker]:not([data-selected])
|
|
1446
1468
|
) {
|
|
1447
1469
|
display: none;
|
|
1448
1470
|
}
|
|
1449
1471
|
|
|
1450
|
-
[data-ui
|
|
1472
|
+
[data-ui-chart] [data-part-legend] {
|
|
1451
1473
|
flex-wrap: wrap;
|
|
1452
1474
|
overflow: visible;
|
|
1453
1475
|
}
|
|
1454
1476
|
|
|
1455
|
-
[data-ui
|
|
1477
|
+
[data-ui-chart] {
|
|
1456
1478
|
break-inside: avoid;
|
|
1457
1479
|
}
|
|
1458
1480
|
}
|
|
1459
1481
|
|
|
1460
|
-
/* ── Forced
|
|
1482
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1461
1483
|
|
|
1462
1484
|
/**
|
|
1463
|
-
* Every series is one system
|
|
1485
|
+
* Every series is one system color here and the engine draws its textures,
|
|
1464
1486
|
* 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
|
|
1487
|
+
* shape, and the hidden state keeps its strike-through, which color could
|
|
1466
1488
|
* not have carried anyway.
|
|
1467
1489
|
*/
|
|
1468
1490
|
@media (forced-colors: active) {
|
|
1469
|
-
[data-ui
|
|
1470
|
-
:is([data-part='legend-marker'], [data-part='tooltip-marker'], [data-part='marker']) {
|
|
1491
|
+
[data-ui-chart] :is([data-part-legend-marker], [data-part-tooltip-marker], [data-part-marker]) {
|
|
1471
1492
|
forced-color-adjust: none;
|
|
1472
1493
|
background-color: CanvasText;
|
|
1473
1494
|
}
|
|
1474
1495
|
|
|
1475
|
-
[data-ui
|
|
1496
|
+
[data-ui-chart] [data-part-crosshair] {
|
|
1476
1497
|
background-color: GrayText;
|
|
1477
1498
|
forced-color-adjust: none;
|
|
1478
1499
|
}
|