@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.
Files changed (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -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=chart] ─────────────────────────────────────────┐
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='chart'] {
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
- * ── Colour ──────────────────────────────────────────────────────────
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 colour value (`docs/component-features.md`
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 colour. A number and
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='chart'][data-size='sm'] {
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='chart'][data-size='lg'] {
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='chart'][data-palette='sequential'] {
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='chart'][data-palette='focus'] {
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='chart'][data-variant='card'] {
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='chart'] > [data-part='header'] {
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='chart'] > [data-part='header'] > :first-child {
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='chart'] > [data-part='header'] > :first-child > :first-child {
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='chart'] > [data-part='header'] [data-part='title'] {
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='chart'] > [data-part='header'] [data-part='description'] {
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='chart'][data-variant='card']
217
- > [data-part='header']
218
- :is([data-part='title'], [data-part='description']) {
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='chart'][data-variant='card'] > [data-part='header'] [data-part='title'] {
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='chart'][data-variant='card'] > [data-part='header'] > :first-child {
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-space-1, 0.125rem) + var(--slotted-font-size-sm, 0.8125rem) *
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='chart'] > [data-part='header'] > [data-part='actions'] {
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='chart'] > [data-part='header'] > [data-part='toolbar'] {
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
- /* The buttons sit on the title's first line and hang past their box by
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='chart'][data-toolbar='hover'] > [data-part='header'] > [data-part='toolbar'] {
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='chart'] > [data-part='header'] > [data-part='toolbar'][data-waiting] {
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='chart'][data-toolbar='hover']:is(:hover, :focus-within):not([data-disabled])
286
- > [data-part='header']
287
- > [data-part='toolbar'] {
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='chart'][data-toolbar='hover'] > [data-part='header'] > [data-part='toolbar'] {
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='chart']
305
+ [data-ui-chart]
298
306
  :is(
299
- [data-part='zoom-reset'],
300
- [data-part='view-toggle'],
301
- [data-part='fullscreen-toggle'],
302
- [data-part='menu-trigger'],
303
- [data-part='help']
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='chart'] [data-part='help'] {
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='chart']
343
+ [data-ui-chart]
336
344
  :is(
337
- [data-part='zoom-reset'],
338
- [data-part='view-toggle'],
339
- [data-part='fullscreen-toggle'],
340
- [data-part='menu-trigger'],
341
- [data-part='help']
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='chart']
349
- :is([data-part='view-toggle'], [data-part='menu-trigger'], [data-part='help'])[data-pressed],
350
- [data-ui='chart'] :is([data-part='menu-trigger'], [data-part='help'])[data-open] {
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='chart']
363
+ [data-ui-chart]
356
364
  :is(
357
- [data-part='zoom-reset'],
358
- [data-part='view-toggle'],
359
- [data-part='fullscreen-toggle'],
360
- [data-part='menu-trigger'],
361
- [data-part='help'],
362
- [data-part='legend-more'],
363
- [data-part='menu-item']
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='chart'] :is([data-part='menu'], [data-part='help-content']) {
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
- [data-ui='chart'] [data-part='menu'] {
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='chart'] [data-part='menu']:not(:popover-open, [data-open]) {
419
+ [data-ui-chart] [data-part-menu]:not(:popover-open, [data-open]) {
399
420
  display: none;
400
421
  }
401
422
 
402
- [data-ui='chart'] [data-part='help-content'] {
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='chart'] [data-part='help-content']:not(:popover-open, [data-open]) {
428
+ [data-ui-chart] [data-part-help-content]:not(:popover-open, [data-open]) {
408
429
  display: none;
409
430
  }
410
431
 
411
- [data-ui='chart'] [data-part='menu-item'] {
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='chart'] [data-part='menu-item']:is([data-action='view'], [data-action='fullscreen']) {
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='chart'] [data-part='menu-item']:hover:not(:disabled) {
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='chart'] [data-part='legend'] {
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='chart'][data-legend-overflow='wrap'] [data-part='legend'] {
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 colour of one series, resolved in the order the model resolves it:
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='chart'] [data-slot='1'] {
491
+ [data-ui-chart] [data-slot='1'] {
471
492
  --_series: var(--_chart-slot-1);
472
493
  }
473
- [data-ui='chart'] [data-slot='2'] {
494
+ [data-ui-chart] [data-slot='2'] {
474
495
  --_series: var(--_chart-slot-2);
475
496
  }
476
- [data-ui='chart'] [data-slot='3'] {
497
+ [data-ui-chart] [data-slot='3'] {
477
498
  --_series: var(--_chart-slot-3);
478
499
  }
479
- [data-ui='chart'] [data-slot='4'] {
500
+ [data-ui-chart] [data-slot='4'] {
480
501
  --_series: var(--_chart-slot-4);
481
502
  }
482
- [data-ui='chart'] [data-slot='5'] {
503
+ [data-ui-chart] [data-slot='5'] {
483
504
  --_series: var(--_chart-slot-5);
484
505
  }
485
- [data-ui='chart'] [data-slot='6'] {
506
+ [data-ui-chart] [data-slot='6'] {
486
507
  --_series: var(--_chart-slot-6);
487
508
  }
488
- [data-ui='chart'] [data-slot='7'] {
509
+ [data-ui-chart] [data-slot='7'] {
489
510
  --_series: var(--_chart-slot-7);
490
511
  }
491
- [data-ui='chart'] [data-slot='8'] {
512
+ [data-ui-chart] [data-slot='8'] {
492
513
  --_series: var(--_chart-slot-8);
493
514
  }
494
- [data-ui='chart'] [data-tone='neutral'] {
515
+ [data-ui-chart] [data-tone='neutral'] {
495
516
  --_series: var(--_chart-tone-neutral);
496
517
  }
497
- [data-ui='chart'] [data-tone='accent'] {
518
+ [data-ui-chart] [data-tone='accent'] {
498
519
  --_series: var(--_chart-tone-accent);
499
520
  }
500
- [data-ui='chart'] [data-tone='secondary'] {
521
+ [data-ui-chart] [data-tone='secondary'] {
501
522
  --_series: var(--_chart-tone-secondary);
502
523
  }
503
- [data-ui='chart'] [data-tone='success'] {
524
+ [data-ui-chart] [data-tone='success'] {
504
525
  --_series: var(--_chart-tone-success);
505
526
  }
506
- [data-ui='chart'] [data-tone='warning'] {
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='chart'] [data-tone='danger'] {
534
+ [data-ui-chart] [data-tone='danger'] {
510
535
  --_series: var(--_chart-tone-danger);
511
536
  }
512
- [data-ui='chart'] [data-overflow] {
537
+ [data-ui-chart] [data-overflow] {
513
538
  --_series: var(--_chart-overflow);
514
539
  }
515
540
 
516
- [data-ui='chart'] :is([data-part='legend-item'], [data-part='legend-more']) {
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='chart'] :is([data-part='legend-item'], [data-part='legend-more'])[hidden] {
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='chart'] [data-part='legend-more'] {
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='chart'] [data-part='menu'] [data-part='legend-item'] {
575
+ [data-ui-chart] [data-part-menu] [data-part-legend-item] {
551
576
  inline-size: 100%;
552
577
  }
553
578
 
554
- [data-ui='chart'] :is(button[data-part='legend-item'], [data-part='legend-more']) {
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='chart']
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='chart'] [data-part='legend-item']:focus-visible {
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 colour: a stroke for a line, a square for a bar, an
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='chart'] :is([data-part='legend-marker'], [data-part='tooltip-marker']) {
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='chart']
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='chart']
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 colour past the eighth slot still read apart. */
595
- [data-ui='chart']
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='chart']
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='chart']
606
- :is([data-part='legend-marker'], [data-part='tooltip-marker'])[data-stroke='dash-dot'] {
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='chart'] [data-part='legend-label'] {
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='chart'] [data-part='legend-value'] {
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='chart'] [data-part='legend-item'][data-current] [data-part='legend-value'] {
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 colour, so the item still says which series it
657
+ * outline is the series color, so the item still says which series it
638
658
  * would bring back.
639
659
  */
640
- [data-ui='chart'] button[data-part='legend-item']:not([data-pressed]) {
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='chart']
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='chart']
652
- button[data-part='legend-item']:not([data-pressed])
653
- [data-part='legend-marker'][data-kind='line'] {
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='chart'] button[data-part='legend-item']:not([data-pressed]) [data-part='legend-label'] {
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='chart'] [data-part='plot'] {
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='chart'] [data-part='plot']:focus-visible {
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='chart'] [data-part='canvas'] {
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='chart']
695
- [data-part='plot']:has(> [data-part='table-region']:not([hidden]))
712
+ [data-ui-chart]
713
+ [data-part-plot]:has(> [data-part-table-region]:not([hidden]))
696
714
  > :is(
697
- [data-part='canvas'],
698
- [data-part='crosshair'],
699
- [data-part='marker'],
700
- [data-part='tooltip'],
701
- [data-part='center']
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='chart'] :is([data-part='crosshair'], [data-part='marker'], [data-part='tooltip']) {
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='chart'] [data-part='crosshair'] {
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='chart'] [data-part='crosshair'][data-band] {
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='chart'] [data-part='crosshair'][data-orientation='horizontal'] {
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='chart'] [data-part='crosshair'][data-band][data-orientation='horizontal'] {
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 colour with a ring
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='chart'] [data-part='marker'] {
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 colour around the ground, larger than the hover marker so
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='chart'] [data-part='marker'][data-selected] {
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='chart'] [data-part='tooltip'] {
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
- grid-template-columns: auto minmax(0, 1fr) auto;
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='chart'] [data-part='tooltip'][data-docked] {
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='chart']:dir(rtl) :is([data-part='tooltip'], [data-part='center']) {
869
+ [data-ui-chart]:dir(rtl) :is([data-part-tooltip], [data-part-center]) {
851
870
  direction: rtl;
852
871
  }
853
872
 
854
- [data-ui='chart']:dir(rtl) [data-part='tooltip'] {
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='chart'] [data-part='tooltip'][data-open] {
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='chart'] [data-part='tooltip']:not([data-open]) {
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
- [data-ui='chart'] [data-part='tooltip-title'] {
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='chart'] [data-part='tooltip-note'] {
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='chart'] :is([data-part='tooltip-item'], [data-part='tooltip-total']) {
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='chart'] [data-part='tooltip-item'] {
920
+ [data-ui-chart] [data-part-tooltip-item] {
895
921
  color: var(--slotted-text-muted, GrayText);
896
922
  }
897
923
 
898
- [data-ui='chart'] [data-part='tooltip-item'][data-current] {
924
+ [data-ui-chart] [data-part-tooltip-item][data-current] {
899
925
  color: var(--slotted-text, CanvasText);
900
926
  }
901
927
 
902
- [data-ui='chart'] [data-part='tooltip-label'] {
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='chart'] [data-part='tooltip-value'] {
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='chart'] [data-part='tooltip-total'] {
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='chart'] [data-part='tooltip-total'] > :first-child {
951
+ [data-ui-chart] [data-part-tooltip-total] > :first-child {
926
952
  grid-column: 1 / 3;
927
953
  }
928
954
 
929
- /* ── The centre of a donut ────────────────────────────────────────────── */
955
+ /* ── The center of a donut ────────────────────────────────────────────── */
930
956
 
931
- [data-ui='chart'] [data-part='center'] {
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='chart'] [data-part='center-value'] {
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='chart'] [data-part='center-label'] {
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='chart'] [data-part='skeleton'] {
991
+ [data-ui-chart] [data-part-skeleton] {
966
992
  inset: var(--_chart-inset);
967
993
  position: absolute;
968
994
  }
969
995
 
970
- [data-ui='chart'] [data-part='skeleton'] > [data-ui='skeleton'] {
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='chart'] [data-part='skeleton'] [data-skeleton='y'] {
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='chart'] [data-part='skeleton'] [data-skeleton='x'] {
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='chart']
1009
- [data-part='skeleton']
1034
+ [data-ui-chart]
1035
+ [data-part-skeleton]
1010
1036
  :is([data-skeleton='y'], [data-skeleton='x'])
1011
- > [data-ui='skeleton'] {
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='chart']
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='chart'] [data-part='skeleton'] [data-skeleton='x'] > [data-ui='skeleton'] {
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='chart'] [data-part='skeleton'] [data-skeleton='marks'] {
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='chart'] [data-part='skeleton'] [data-skeleton='marks'] > [data-ui='skeleton'] {
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='chart']
1058
- [data-part='skeleton'][data-kind='bar']
1080
+ [data-ui-chart]
1081
+ [data-part-skeleton][data-kind='bar']
1059
1082
  [data-skeleton='marks']
1060
- > [data-ui='skeleton']:nth-child(7n + 1) {
1083
+ > [data-ui-skeleton]:nth-child(7n + 1) {
1061
1084
  block-size: 38%;
1062
1085
  }
1063
- [data-ui='chart']
1064
- [data-part='skeleton'][data-kind='bar']
1086
+ [data-ui-chart]
1087
+ [data-part-skeleton][data-kind='bar']
1065
1088
  [data-skeleton='marks']
1066
- > [data-ui='skeleton']:nth-child(7n + 2) {
1089
+ > [data-ui-skeleton]:nth-child(7n + 2) {
1067
1090
  block-size: 62%;
1068
1091
  }
1069
- [data-ui='chart']
1070
- [data-part='skeleton'][data-kind='bar']
1092
+ [data-ui-chart]
1093
+ [data-part-skeleton][data-kind='bar']
1071
1094
  [data-skeleton='marks']
1072
- > [data-ui='skeleton']:nth-child(7n + 3) {
1095
+ > [data-ui-skeleton]:nth-child(7n + 3) {
1073
1096
  block-size: 50%;
1074
1097
  }
1075
- [data-ui='chart']
1076
- [data-part='skeleton'][data-kind='bar']
1098
+ [data-ui-chart]
1099
+ [data-part-skeleton][data-kind='bar']
1077
1100
  [data-skeleton='marks']
1078
- > [data-ui='skeleton']:nth-child(7n + 4) {
1101
+ > [data-ui-skeleton]:nth-child(7n + 4) {
1079
1102
  block-size: 74%;
1080
1103
  }
1081
- [data-ui='chart']
1082
- [data-part='skeleton'][data-kind='bar']
1104
+ [data-ui-chart]
1105
+ [data-part-skeleton][data-kind='bar']
1083
1106
  [data-skeleton='marks']
1084
- > [data-ui='skeleton']:nth-child(7n + 5) {
1107
+ > [data-ui-skeleton]:nth-child(7n + 5) {
1085
1108
  block-size: 56%;
1086
1109
  }
1087
- [data-ui='chart']
1088
- [data-part='skeleton'][data-kind='bar']
1110
+ [data-ui-chart]
1111
+ [data-part-skeleton][data-kind='bar']
1089
1112
  [data-skeleton='marks']
1090
- > [data-ui='skeleton']:nth-child(7n + 6) {
1113
+ > [data-ui-skeleton]:nth-child(7n + 6) {
1091
1114
  block-size: 44%;
1092
1115
  }
1093
- [data-ui='chart']
1094
- [data-part='skeleton'][data-kind='bar']
1116
+ [data-ui-chart]
1117
+ [data-part-skeleton][data-kind='bar']
1095
1118
  [data-skeleton='marks']
1096
- > [data-ui='skeleton']:nth-child(7n + 7) {
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='chart']
1104
- [data-part='skeleton'][data-kind='line']
1126
+ [data-ui-chart]
1127
+ [data-part-skeleton][data-kind='line']
1105
1128
  [data-skeleton='marks']
1106
- > [data-ui='skeleton'] {
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='chart']
1114
- [data-part='skeleton'][data-kind='line']
1136
+ [data-ui-chart]
1137
+ [data-part-skeleton][data-kind='line']
1115
1138
  [data-skeleton='marks']
1116
- > [data-ui='skeleton']:first-child {
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='chart']
1138
- [data-part='skeleton'][data-kind='line']
1160
+ [data-ui-chart]
1161
+ [data-part-skeleton][data-kind='line']
1139
1162
  [data-skeleton='marks']
1140
- > [data-ui='skeleton']:last-child {
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, centred, at the size the engine draws it. */
1157
- [data-ui='chart'] [data-part='skeleton'][data-kind='pie'] > [data-ui='skeleton'] {
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='chart']
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='chart'] [data-part='legend'] > [data-ui='skeleton'] {
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='chart'] [data-part='legend'] > [data-ui='skeleton']:nth-child(2) {
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='chart'] :is([data-part='empty'], [data-part='error']) {
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='chart'] [data-part='plot']:has(> :is([data-part='empty'], [data-part='error'])) {
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='chart'] [data-part='summary'] {
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
- [data-ui='chart'] [data-part='table-region'] {
1248
- background-color: var(--_chart-surface);
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='chart']:dir(rtl) [data-part='table-region'] {
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
- [data-ui='chart'] [data-part='table-region']:focus-visible {
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='chart'] [data-part='table-region'][hidden] {
1296
+ [data-ui-chart] [data-part-table-region][hidden] {
1268
1297
  display: none;
1269
1298
  }
1270
1299
 
1271
- [data-ui='chart'] [data-part='table'] {
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='chart'] [data-part='table'] caption {
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='chart'] [data-part='table'] :is(th, td) {
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='chart'] [data-part='table'] tbody th {
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='chart'] [data-part='table'] thead th {
1300
- background-color: var(--_chart-surface);
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='chart'] [data-part='table'] [data-numeric] {
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='chart'] [data-part='table'] tbody tr[data-current] {
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='chart'][data-fullscreen] {
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='chart'][data-fullscreen] [data-part='title'] {
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='chart']
1357
- > [data-part='header']
1358
- > [data-part='toolbar']
1359
- > :is([data-part='view-toggle'], [data-part='fullscreen-toggle']) {
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='chart'] [data-part='menu-item']:is([data-action='view'], [data-action='fullscreen']) {
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='chart'] :is([data-part='legend-item'], [data-part='legend-more']) {
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='chart'][data-variant='card'] {
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` centred on it reaches 44 pixels in both axes. The line is that
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='chart'] [data-part='menu-item'] {
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='chart'] [data-part='menu'] [data-part='legend-item'] {
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='chart'] [data-part='legend'] {
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='chart']
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='chart']
1412
- [data-part='legend']
1413
- > :is([data-part='legend-item'], [data-part='legend-more'])::after {
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='chart'] [data-part='legend'] > [data-part='legend-more']::after {
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='chart']
1453
+ [data-ui-chart]
1424
1454
  :is(
1425
- [data-part='zoom-reset'],
1426
- [data-part='view-toggle'],
1427
- [data-part='fullscreen-toggle'],
1428
- [data-part='menu-trigger']
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='chart']
1468
+ [data-ui-chart]
1439
1469
  :is(
1440
- [data-part='toolbar'],
1441
- [data-part='help'],
1442
- [data-part='legend-more'],
1443
- [data-part='tooltip'],
1444
- [data-part='crosshair'],
1445
- [data-part='marker']:not([data-selected])
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='chart'] [data-part='legend'] {
1480
+ [data-ui-chart] [data-part-legend] {
1451
1481
  flex-wrap: wrap;
1452
1482
  overflow: visible;
1453
1483
  }
1454
1484
 
1455
- [data-ui='chart'] {
1485
+ [data-ui-chart] {
1456
1486
  break-inside: avoid;
1457
1487
  }
1458
1488
  }
1459
1489
 
1460
- /* ── Forced colours ───────────────────────────────────────────────────── */
1490
+ /* ── Forced colors ───────────────────────────────────────────────────── */
1461
1491
 
1462
1492
  /**
1463
- * Every series is one system colour here and the engine draws its textures,
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 colour could
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='chart']
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='chart'] [data-part='crosshair'] {
1504
+ [data-ui-chart] [data-part-crosshair] {
1476
1505
  background-color: GrayText;
1477
1506
  forced-color-adjust: none;
1478
1507
  }