@acronis-platform/ui-react 3.0.0 → 4.0.0

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 (219) hide show
  1. package/dist/components/ui/accordion-container/accordion-container.js +14 -14
  2. package/dist/components/ui/accordion-container/accordion-container.js.map +1 -1
  3. package/dist/components/ui/app-shell-chat/app-shell-chat.js.map +1 -1
  4. package/dist/components/ui/area-chart/area-chart.js +141 -139
  5. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  6. package/dist/components/ui/bar-chart/bar-chart.js +295 -293
  7. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  8. package/dist/components/ui/category-bar/category-bar.js +109 -93
  9. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  10. package/dist/components/ui/chart/chart-palette.js +113 -0
  11. package/dist/components/ui/chart/chart-palette.js.map +1 -0
  12. package/dist/components/ui/chart/chart.js +176 -129
  13. package/dist/components/ui/chart/chart.js.map +1 -1
  14. package/dist/components/ui/chart-state/chart-state-illustrations.js +310 -0
  15. package/dist/components/ui/chart-state/chart-state-illustrations.js.map +1 -0
  16. package/dist/components/ui/chart-state/chart-state.js +48 -34
  17. package/dist/components/ui/chart-state/chart-state.js.map +1 -1
  18. package/dist/components/ui/chart-widget/chart-widget.js +87 -0
  19. package/dist/components/ui/chart-widget/chart-widget.js.map +1 -0
  20. package/dist/components/ui/composed-chart/composed-chart.js +117 -115
  21. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  22. package/dist/components/ui/confidence-cone/confidence-cone.js +166 -158
  23. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  24. package/dist/components/ui/funnel-chart/funnel-chart.js +162 -161
  25. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  26. package/dist/components/ui/histogram/histogram.js +94 -92
  27. package/dist/components/ui/histogram/histogram.js.map +1 -1
  28. package/dist/components/ui/input/input.js.map +1 -1
  29. package/dist/components/ui/label/label.js +2 -9
  30. package/dist/components/ui/label/label.js.map +1 -1
  31. package/dist/components/ui/line-chart/line-chart.js +143 -141
  32. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  33. package/dist/components/ui/metric/metric.js +74 -185
  34. package/dist/components/ui/metric/metric.js.map +1 -1
  35. package/dist/components/ui/page-content/page-content.js.map +1 -1
  36. package/dist/components/ui/pie-chart/pie-chart.js +201 -195
  37. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  38. package/dist/components/ui/radar-chart/radar-chart.js +133 -131
  39. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  40. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +297 -265
  41. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  42. package/dist/components/ui/sankey-chart/sankey-chart.js +123 -101
  43. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
  44. package/dist/components/ui/scatter-chart/scatter-chart.js +76 -74
  45. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  46. package/dist/components/ui/section/section.js +157 -31
  47. package/dist/components/ui/section/section.js.map +1 -1
  48. package/dist/components/ui/stepper/stepper.js +24 -24
  49. package/dist/components/ui/stepper/stepper.js.map +1 -1
  50. package/dist/components/ui/stepper-item/stepper-item.js +43 -24
  51. package/dist/components/ui/stepper-item/stepper-item.js.map +1 -1
  52. package/dist/components/ui/treemap/treemap.js +133 -124
  53. package/dist/components/ui/treemap/treemap.js.map +1 -1
  54. package/dist/components/ui/trend-indicator/trend-indicator.js +34 -69
  55. package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -1
  56. package/dist/components/ui/wizard/wizard.js +59 -0
  57. package/dist/components/ui/wizard/wizard.js.map +1 -0
  58. package/dist/hooks/use-wizard.js +75 -0
  59. package/dist/hooks/use-wizard.js.map +1 -0
  60. package/dist/index.js +502 -497
  61. package/dist/index.js.map +1 -1
  62. package/dist/llms/accordion-container.md +181 -0
  63. package/dist/llms/accordion.md +124 -0
  64. package/dist/llms/alert.md +225 -0
  65. package/dist/llms/app-shell-chat.md +415 -0
  66. package/dist/llms/area-chart.md +355 -0
  67. package/dist/llms/avatar.md +208 -0
  68. package/dist/llms/bar-chart.md +406 -0
  69. package/dist/llms/breadcrumb.md +326 -0
  70. package/dist/llms/button-group.md +298 -0
  71. package/dist/llms/button-icon-input.md +142 -0
  72. package/dist/llms/button-icon-menu.md +209 -0
  73. package/dist/llms/button-icon.md +128 -0
  74. package/dist/llms/button-menu.md +172 -0
  75. package/dist/llms/button.md +185 -0
  76. package/dist/llms/calendar-panel.md +733 -0
  77. package/dist/llms/calendar.md +188 -0
  78. package/dist/llms/card-filter.md +214 -0
  79. package/dist/llms/card-section.md +293 -0
  80. package/dist/llms/card.md +447 -0
  81. package/dist/llms/carousel-dialog.md +156 -0
  82. package/dist/llms/category-bar.md +193 -0
  83. package/dist/llms/chart-state.md +190 -0
  84. package/dist/llms/chart-widget.md +209 -0
  85. package/dist/llms/chart.md +182 -0
  86. package/dist/llms/checkbox.md +257 -0
  87. package/dist/llms/chip.md +195 -0
  88. package/dist/llms/combobox.md +164 -0
  89. package/dist/llms/composed-chart.md +508 -0
  90. package/dist/llms/confidence-cone.md +277 -0
  91. package/dist/llms/data-table.md +474 -0
  92. package/dist/llms/date-range-picker.md +272 -0
  93. package/dist/llms/description-list.md +131 -0
  94. package/dist/llms/dialog-footer-carousel.md +147 -0
  95. package/dist/llms/dialog-footer-default.md +142 -0
  96. package/dist/llms/dialog-root.md +246 -0
  97. package/dist/llms/dialog-welcome.md +223 -0
  98. package/dist/llms/dialog.md +403 -0
  99. package/dist/llms/dropdown-menu.md +193 -0
  100. package/dist/llms/empty-overlay.md +146 -0
  101. package/dist/llms/empty.md +156 -0
  102. package/dist/llms/field.md +185 -0
  103. package/dist/llms/filter-cards.md +157 -0
  104. package/dist/llms/filter-chips.md +323 -0
  105. package/dist/llms/filter-search.md +512 -0
  106. package/dist/llms/form.md +154 -0
  107. package/dist/llms/funnel-chart.md +333 -0
  108. package/dist/llms/grid.md +80 -0
  109. package/dist/llms/histogram.md +190 -0
  110. package/dist/llms/input-date-picker.md +203 -0
  111. package/dist/llms/input-otp.md +173 -0
  112. package/dist/llms/input-password.md +197 -0
  113. package/dist/llms/input-search.md +170 -0
  114. package/dist/llms/input-select.md +278 -0
  115. package/dist/llms/input-text-area.md +271 -0
  116. package/dist/llms/input-text.md +192 -0
  117. package/dist/llms/line-chart.md +369 -0
  118. package/dist/llms/link.md +209 -0
  119. package/dist/llms/loading.md +130 -0
  120. package/dist/llms/meter.md +177 -0
  121. package/dist/llms/metric.md +204 -0
  122. package/dist/llms/number-field.md +122 -0
  123. package/dist/llms/page-content.md +69 -0
  124. package/dist/llms/page-header.md +182 -0
  125. package/dist/llms/pagination.md +133 -0
  126. package/dist/llms/pie-chart.md +307 -0
  127. package/dist/llms/popover.md +252 -0
  128. package/dist/llms/progress-circle.md +126 -0
  129. package/dist/llms/progress.md +111 -0
  130. package/dist/llms/radar-chart.md +316 -0
  131. package/dist/llms/radial-bar-chart.md +319 -0
  132. package/dist/llms/radio.md +255 -0
  133. package/dist/llms/resizable.md +195 -0
  134. package/dist/llms/sankey-chart.md +208 -0
  135. package/dist/llms/scatter-chart.md +239 -0
  136. package/dist/llms/scroll-area.md +183 -0
  137. package/dist/llms/section.md +401 -0
  138. package/dist/llms/select.md +210 -0
  139. package/dist/llms/separator.md +87 -0
  140. package/dist/llms/sheet.md +202 -0
  141. package/dist/llms/sidebar-primary.md +360 -0
  142. package/dist/llms/sidebar-secondary.md +417 -0
  143. package/dist/llms/skeleton.md +81 -0
  144. package/dist/llms/slider.md +97 -0
  145. package/dist/llms/spinner.md +100 -0
  146. package/dist/llms/stack.md +80 -0
  147. package/dist/llms/stepper-item.md +309 -0
  148. package/dist/llms/stepper.md +251 -0
  149. package/dist/llms/switch.md +140 -0
  150. package/dist/llms/table.md +436 -0
  151. package/dist/llms/tabs.md +197 -0
  152. package/dist/llms/tag.md +139 -0
  153. package/dist/llms/timeline.md +361 -0
  154. package/dist/llms/timer.md +259 -0
  155. package/dist/llms/toast.md +241 -0
  156. package/dist/llms/toggle-group.md +121 -0
  157. package/dist/llms/toolbar.md +453 -0
  158. package/dist/llms/tooltip.md +164 -0
  159. package/dist/llms/treemap.md +254 -0
  160. package/dist/llms/trend-indicator.md +132 -0
  161. package/dist/llms/widget-placeholder.md +169 -0
  162. package/dist/llms/wizard.md +412 -0
  163. package/dist/llms.txt +142 -0
  164. package/dist/react.js +502 -497
  165. package/dist/react.js.map +1 -1
  166. package/dist/src/components/ui/area-chart/area-chart.d.ts +9 -4
  167. package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
  168. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +9 -4
  169. package/dist/src/components/ui/category-bar/category-bar.d.ts +10 -4
  170. package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +48 -0
  171. package/dist/src/components/ui/chart/__tests__/chart-palette.test.d.ts +1 -0
  172. package/dist/src/components/ui/chart/chart-palette.d.ts +128 -0
  173. package/dist/src/components/ui/chart/chart.d.ts +66 -15
  174. package/dist/src/components/ui/chart/index.d.ts +4 -2
  175. package/dist/src/components/ui/chart-state/chart-state-illustrations.d.ts +6 -0
  176. package/dist/src/components/ui/chart-state/chart-state.d.ts +13 -2
  177. package/dist/src/components/ui/chart-state/index.d.ts +1 -0
  178. package/dist/src/components/ui/chart-widget/chart-widget.d.ts +64 -0
  179. package/dist/src/components/ui/chart-widget/index.d.ts +1 -0
  180. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +12 -7
  181. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +10 -5
  182. package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +1 -1
  183. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +11 -5
  184. package/dist/src/components/ui/histogram/histogram.d.ts +10 -4
  185. package/dist/src/components/ui/label/index.d.ts +1 -1
  186. package/dist/src/components/ui/label/label.d.ts +1 -5
  187. package/dist/src/components/ui/line-chart/line-chart.d.ts +9 -4
  188. package/dist/src/components/ui/metric/metric.d.ts +13 -14
  189. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +17 -8
  190. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +10 -5
  191. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +17 -6
  192. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +10 -5
  193. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +10 -5
  194. package/dist/src/components/ui/section/index.d.ts +1 -1
  195. package/dist/src/components/ui/section/section.d.ts +75 -6
  196. package/dist/src/components/ui/stepper-item/stepper-item.d.ts +6 -5
  197. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  198. package/dist/src/components/ui/treemap/treemap.d.ts +11 -5
  199. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +3 -7
  200. package/dist/src/components/ui/wizard/index.d.ts +1 -0
  201. package/dist/src/components/ui/wizard/wizard.d.ts +6 -0
  202. package/dist/src/hooks/index.d.ts +1 -0
  203. package/dist/src/hooks/use-wizard.d.ts +80 -0
  204. package/dist/src/index.d.ts +2 -3
  205. package/dist/ui-react.css +1 -1
  206. package/package.json +9 -3
  207. package/dist/components/ui/app-shell/app-shell.js +0 -75
  208. package/dist/components/ui/app-shell/app-shell.js.map +0 -1
  209. package/dist/components/ui/auth-layout/auth-layout.js +0 -56
  210. package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
  211. package/dist/components/ui/collapsible/collapsible.js +0 -22
  212. package/dist/components/ui/collapsible/collapsible.js.map +0 -1
  213. package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
  214. package/dist/src/components/ui/app-shell/index.d.ts +0 -1
  215. package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
  216. package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
  217. package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
  218. package/dist/src/components/ui/collapsible/index.d.ts +0 -1
  219. package/dist/src/components/ui/label/label.docs.d.ts +0 -10
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartConfig, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
2
+ import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const areaChartVariants: (props?: ({
5
5
  layout?: "single" | "stacked" | null | undefined;
@@ -34,12 +34,17 @@ export interface AreaChartAreaSettings {
34
34
  labelPosition?: CartesianLabelPosition;
35
35
  }
36
36
  export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof areaChartVariants>, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartDataLabelProps {
37
+ /**
38
+ * The dataviz palette this chart's series are painted from. Series that
39
+ * state no `color` of their own take a stop of it. See `ChartPalette`.
40
+ */
41
+ palette?: ChartPalette;
37
42
  /** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the area unless `connectNulls`). */
38
43
  data: ReadonlyArray<Record<string, string | number | null>>;
39
44
  /**
40
- * Per-series map of `label` / `color` (imported from the shared `Chart`
41
- * primitives). Series colors are caller-supplied — reference an existing
42
- * semantic `--ui-*` token; there is no chart palette tier yet.
45
+ * Per-series map of `label` / `icon` / `tone` (from the shared `Chart`
46
+ * primitives). Series take their colour from the container's `palette`; each
47
+ * entry maps a key to a `label` and an optional `tone`.
43
48
  */
44
49
  config: ChartConfig;
45
50
  /** Series to plot — one `<Area>` per key. Each must exist in `config` and in every data row. */
@@ -2,7 +2,7 @@ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  declare const avatarVariants: (props?: ({
5
- color?: "blue" | "gray" | "green" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
5
+ color?: "blue" | "green" | "gray" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export type AvatarImageProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>;
8
8
  /** The avatar image; hidden by Base UI until it loads, revealing the fallback. */
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { BarShapeProps } from 'recharts/types/cartesian/Bar';
3
- import { ChartLegend, ChartTooltip, ChartConfig, ChartReferenceLine, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
3
+ import { ChartLegend, ChartTooltip, ChartConfig, ChartPalette, ChartReferenceLine, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
4
4
  import * as React from 'react';
5
5
  declare const barChartVariants: (props?: ({
6
6
  orientation?: "horizontal" | "vertical" | null | undefined;
@@ -118,12 +118,17 @@ export declare function createTrackShape({ inRange, trackFill, paint, }: {
118
118
  paint?: BarPaintOverride;
119
119
  }): ({ background: track, index: row, ...bar }: BarShapeProps) => import("react/jsx-runtime").JSX.Element;
120
120
  export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof barChartVariants>, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartDataLabelProps {
121
+ /**
122
+ * The dataviz palette this chart's series are painted from. Series that
123
+ * state no `color` of their own take a stop of it. See `ChartPalette`.
124
+ */
125
+ palette?: ChartPalette;
121
126
  /** Row-per-category data. Each object holds the category key + one numeric field per series. */
122
127
  data: ReadonlyArray<Record<string, string | number>>;
123
128
  /**
124
- * Per-series map of `label` / `color` (imported from the shared `Chart`
125
- * primitives). Series colors are caller-supplied — reference an existing
126
- * semantic `--ui-*` token; there is no chart palette tier yet.
129
+ * Per-series map of `label` / `icon` / `tone` (from the shared `Chart`
130
+ * primitives). Series take their colour from the container's `palette`; each
131
+ * entry maps a key to a `label` and an optional `tone`.
127
132
  */
128
133
  config: ChartConfig;
129
134
  /** Series to plot — one `<Bar>` per key. Each must exist in `config` and in every data row. */
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartConfig } from '../chart';
2
+ import { ChartConfig, ChartPalette } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const categoryBarVariants: (props?: ({
5
5
  size?: "sm" | "md" | "lg" | null | undefined;
@@ -18,16 +18,22 @@ export interface CategoryBarTooltipContext extends CategoryBarSegment {
18
18
  percent: number;
19
19
  /**
20
20
  * CSS color reference for the segment — the `var(--color-<key>)` bridge, which
21
- * resolves the config entry's `color` or its per-theme `theme` value. Usable
22
- * anywhere a CSS color is (e.g. a `style` background); not a literal value.
21
+ * resolves the palette stop assigned to this segment. Usable anywhere a CSS
22
+ * color is (e.g. a `style` background); not a literal value.
23
23
  */
24
24
  color: string;
25
25
  }
26
26
  export interface CategoryBarProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof categoryBarVariants> {
27
27
  /** Ordered segments (left → right). Widths are proportional to `value`. */
28
28
  data: ReadonlyArray<CategoryBarSegment>;
29
- /** Maps each segment `key` to a `label` and `color` (an existing `--ui-*` token). */
29
+ /** Maps each segment `key` to a `label` and, optionally, a palette `tone`. */
30
30
  config: ChartConfig;
31
+ /**
32
+ * The dataviz palette the segments are painted from. Segments take a stop of
33
+ * it in the palette's defined order, or the one their `tone` names. Defaults
34
+ * to `categorical`.
35
+ */
36
+ palette?: ChartPalette;
31
37
  /** Show the legend below the bar (color dot + label + value + %). */
32
38
  showLegend?: boolean;
33
39
  /** Show a hover tooltip per segment (dot + label + value + %). */
@@ -0,0 +1,48 @@
1
+ export declare const paletteArgTypes: {
2
+ palette: {
3
+ name: string;
4
+ description: string;
5
+ control: {
6
+ type: "select";
7
+ };
8
+ options: string[];
9
+ mapping: {
10
+ categorical: {
11
+ type: "categorical";
12
+ };
13
+ 'sequential-blue': {
14
+ type: "sequential";
15
+ ramp: "blue";
16
+ };
17
+ 'sequential-teal': {
18
+ type: "sequential";
19
+ ramp: "teal";
20
+ };
21
+ 'sequential-orange': {
22
+ type: "sequential";
23
+ ramp: "orange";
24
+ };
25
+ 'sequential-violet': {
26
+ type: "sequential";
27
+ ramp: "violet";
28
+ };
29
+ 'diverging-blue-orange': {
30
+ type: "diverging";
31
+ pair: "blue-orange";
32
+ };
33
+ 'diverging-teal-violet': {
34
+ type: "diverging";
35
+ pair: "teal-violet";
36
+ };
37
+ status: {
38
+ type: "status";
39
+ };
40
+ };
41
+ table: {
42
+ category: string;
43
+ defaultValue: {
44
+ summary: string;
45
+ };
46
+ };
47
+ };
48
+ };
@@ -0,0 +1,128 @@
1
+ /** A sequential ramp: one hue, eight stops from lightest to darkest. */
2
+ export type ChartSequentialRamp = 'blue' | 'teal' | 'orange' | 'violet';
3
+ /** A diverging pair: two hues meeting at a pale midpoint. */
4
+ export type ChartDivergingPair = 'blue-orange' | 'teal-violet';
5
+ /**
6
+ * A semantic status tone. Ordered by severity in the product's picker:
7
+ * danger (red) · critical (orange) · warning (yellow) · success (green) ·
8
+ * info (blue) · neutral (gray). Note that `critical` is orange and ranks
9
+ * *below* `danger` — that is what the tokens say, across the whole semantic
10
+ * tier, not a typo here.
11
+ */
12
+ export type ChartStatusTone = 'danger' | 'critical' | 'warning' | 'success' | 'info' | 'neutral';
13
+ /** Which palette a chart's series are painted from. */
14
+ export type ChartPalette = {
15
+ type: 'categorical';
16
+ } | {
17
+ type: 'sequential';
18
+ ramp: ChartSequentialRamp;
19
+ } | {
20
+ type: 'diverging';
21
+ pair: ChartDivergingPair;
22
+ } | {
23
+ type: 'status';
24
+ };
25
+ /**
26
+ * How one series picks its color out of the active palette.
27
+ *
28
+ * Only the two palettes whose colors are independent of each other accept an
29
+ * override:
30
+ *
31
+ * - `categorical` — `{ slot }` picks one of the 16 hues.
32
+ * - `status` — `{ status }` names a tone.
33
+ *
34
+ * `sequential` and `diverging` accept none. Their stops are a *ramp*: the
35
+ * colors mean something only in relation to each other, so letting one series
36
+ * jump to an arbitrary stop would break the reading order the ramp exists to
37
+ * convey. The product's widget editor agrees — it offers a ramp/pair picker
38
+ * and no per-series control. An override passed under those palettes is
39
+ * ignored, with a dev warning.
40
+ *
41
+ * Neither form can express a color from outside the palette — that is the point.
42
+ */
43
+ export type ChartSeriesTone = {
44
+ slot: number;
45
+ status?: never;
46
+ sameAs?: never;
47
+ } | {
48
+ slot?: never;
49
+ status: ChartStatusTone;
50
+ sameAs?: never;
51
+ }
52
+ /**
53
+ * Paint whatever the series under this key paints, under any palette. For a
54
+ * twin series that is the *same* metric drawn differently — a forecast tail
55
+ * continuing its actuals, a projection band behind its bars — where two hues
56
+ * would read as two metrics. Resolved by `resolveChartColors`, which is the
57
+ * only place the whole config is in view.
58
+ */
59
+ | {
60
+ slot?: never;
61
+ status?: never;
62
+ sameAs: string;
63
+ };
64
+ /** The 16 categorical hues, in the order the product's picker lists them. */
65
+ export declare const CHART_CATEGORICAL_TOKENS: readonly string[];
66
+ /** Each sequential ramp's eight stops, lightest (1) to darkest (8). */
67
+ export declare const CHART_SEQUENTIAL_TOKENS: Readonly<Record<ChartSequentialRamp, readonly string[]>>;
68
+ /** Each diverging pair's six stops, one hue's strongest through to the other's. */
69
+ export declare const CHART_DIVERGING_TOKENS: Readonly<Record<ChartDivergingPair, readonly string[]>>;
70
+ /** The six semantic status tones. */
71
+ export declare const CHART_STATUS_TOKENS: Readonly<Record<ChartStatusTone, string>>;
72
+ /** The default palette — what a chart paints with when none is chosen. */
73
+ export declare const CHART_DEFAULT_PALETTE: ChartPalette;
74
+ /**
75
+ * The stops a palette offers, in picker order. `status` has named tones rather
76
+ * than positional stops, so it returns an empty list — use
77
+ * `CHART_STATUS_TOKENS` for those.
78
+ */
79
+ export declare function listPaletteStops(palette: ChartPalette): readonly string[];
80
+ /**
81
+ * Every choice a per-series picker may offer for this palette — what the
82
+ * product's widget editor renders in its dropdown. Pure, so the form can build
83
+ * its UI without re-deriving the palette.
84
+ *
85
+ * Empty for `sequential` and `diverging`: those have no per-series control, so
86
+ * a form driven by this function renders no picker for them, which is exactly
87
+ * the design.
88
+ */
89
+ export declare function listPaletteChoices(palette: ChartPalette): readonly ChartSeriesTone[];
90
+ export interface ResolveSeriesColorOptions {
91
+ /** This series' position among the chart's series. */
92
+ index: number;
93
+ /** This series' explicit choice within the palette, if it may make one. */
94
+ tone?: ChartSeriesTone;
95
+ }
96
+ /**
97
+ * The color one series paints with.
98
+ *
99
+ * Series walk the palette **in its defined order** — series 1 takes stop 1,
100
+ * series 2 takes stop 2, and so on, wrapping once the stops run out. The order
101
+ * is the design's, not something derived here: no re-ordering, no spreading
102
+ * across a ramp, no skipping stops.
103
+ *
104
+ * On top of that, `categorical` and `status` honour a per-series override
105
+ * (see `ChartSeriesTone`); `sequential` and `diverging` do not.
106
+ *
107
+ * Always returns a token from the active palette. A `slot` out of range is
108
+ * clamped (with a dev warning) rather than passed through, so switching
109
+ * palettes can never leave a series painting off-palette.
110
+ */
111
+ export declare function resolveSeriesColor(palette: ChartPalette, { index, tone }: ResolveSeriesColorOptions): string;
112
+ /**
113
+ * Series that would paint the same color — what the widget editor's "duplicate
114
+ * color" warning is keyed to. Returns one group per collision, each holding the
115
+ * colliding series' keys in input order.
116
+ *
117
+ * Only series that named a `tone` can collide: automatic assignment is
118
+ * injective by construction (up to `categorical`'s 16-series wrap).
119
+ *
120
+ * Pass the chart's `config` to exclude intentional aliases: a series with
121
+ * `tone: { sameAs }` shares its target's colour on purpose, so it is not a
122
+ * collision. Without the config every alias reads as a duplicate.
123
+ */
124
+ export declare function findDuplicateTones(colors: Readonly<Record<string, string>>, config?: Readonly<Record<string, {
125
+ tone?: {
126
+ sameAs?: string;
127
+ };
128
+ }>>): string[][];
@@ -2,24 +2,43 @@ import { LegendPayload } from 'recharts/types/component/DefaultLegendContent';
2
2
  import { NameType, Payload, ValueType } from 'recharts/types/component/DefaultTooltipContent';
3
3
  import { Props as LegendProps } from 'recharts/types/component/Legend';
4
4
  import { TooltipContentProps } from 'recharts/types/component/Tooltip';
5
+ import { ChartPalette, ChartSeriesTone } from './chart-palette';
5
6
  import * as React from 'react';
6
7
  import * as RechartsPrimitive from 'recharts';
7
- declare const THEMES: {
8
- readonly light: "";
9
- readonly dark: "[data-theme='dark']";
10
- };
11
8
  export type ChartConfig = {
12
9
  [k in string]: {
13
10
  label?: React.ReactNode;
14
11
  icon?: React.ComponentType;
15
- } & ({
16
- color?: string;
17
- theme?: never;
18
- } | {
19
- color?: never;
20
- theme: Record<keyof typeof THEMES, string>;
21
- });
12
+ /**
13
+ * Which stop of the container's `palette` this series paints with. Left
14
+ * unset, it is assigned from the series' position. See `ChartSeriesTone`.
15
+ *
16
+ * There is deliberately no free-form `color` here: every series colour
17
+ * comes from the chart's palette, so a chart cannot paint a hue the design
18
+ * system does not define. Pick a different palette on `ChartContainer`, or
19
+ * a different stop of it with this.
20
+ */
21
+ tone?: ChartSeriesTone;
22
+ };
23
+ };
24
+ /**
25
+ * A `ChartConfig` with every series' palette colour filled in. This is what the
26
+ * container puts on the context, so the plot, the tooltip rows and the legend
27
+ * markers all read the same resolved colour.
28
+ */
29
+ export type ResolvedChartConfig = {
30
+ [k in string]: ChartConfig[string] & {
31
+ color: string;
32
+ };
22
33
  };
34
+ /**
35
+ * Resolve each series' colour out of `palette` — in the palette's defined
36
+ * order, honouring any `tone` a series named.
37
+ *
38
+ * Exported for tests and for the widget editor, which needs the same resolved
39
+ * map to detect duplicate colours (`findDuplicateTones`) without re-deriving it.
40
+ */
41
+ export declare function resolveChartColors(config: ChartConfig, palette: ChartPalette): ResolvedChartConfig;
23
42
  export type ChartTooltipContentProps = Partial<TooltipContentProps<ValueType, NameType>> & {
24
43
  className?: string;
25
44
  hideLabel?: boolean;
@@ -44,20 +63,52 @@ export type ChartLegendContentProps = {
44
63
  * legend out inside its plot (see `Treemap`).
45
64
  */
46
65
  config?: ChartConfig;
66
+ /**
67
+ * `default` — the current horizontal wrap layout (one row of chips).
68
+ * `list` — a vertical list where each entry is `[dot] [label flex-1] [value]`,
69
+ * matching the Figma donut/radial widget legend. Use alongside a manually-built
70
+ * `payload` passed from outside the chart's recharts composition.
71
+ */
72
+ variant?: 'default' | 'list';
73
+ /**
74
+ * When `variant="list"`, the field on `payload[i].payload` to display as the
75
+ * right-hand value. Typically the chart's `dataKey` (the numeric series field).
76
+ */
77
+ valueKey?: string;
78
+ /**
79
+ * Format the value shown in each list entry. When omitted the raw value is
80
+ * stringified with `String()`.
81
+ */
82
+ valueFormatter?: (value: string | number) => string;
47
83
  };
48
84
  export interface ChartContainerProps extends React.ComponentProps<'div'> {
85
+ /**
86
+ * The series this chart draws, keyed by data field.
87
+ *
88
+ * Declare exactly what the chart plots. A stop is assigned by an entry's
89
+ * position here, not by which series end up rendered, so an entry for a
90
+ * series the chart doesn't draw still consumes a colour and shifts the ones
91
+ * that follow it. (That is deliberate: a series then keeps its colour when a
92
+ * sibling is toggled off, instead of the whole chart recolouring.)
93
+ */
49
94
  config: ChartConfig;
95
+ /**
96
+ * The dataviz palette this chart's series are painted from. Series take a
97
+ * stop of it in the palette's defined order, or the one their `tone` names.
98
+ * Defaults to `categorical` — there is no "no palette" state.
99
+ */
100
+ palette?: ChartPalette;
50
101
  children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
51
102
  }
52
- declare function ChartContainer({ id, className, children, config, ...props }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
53
- declare const ChartStyle: ({ id, config }: {
103
+ declare function ChartContainer({ id, className, children, config, palette, ...props }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
104
+ declare const ChartStyle: ({ id, config, }: {
54
105
  id: string;
55
- config: ChartConfig;
106
+ config: ResolvedChartConfig;
56
107
  }) => import("react/jsx-runtime").JSX.Element | null;
57
108
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
58
109
  /** The `content` a caller passes to override the default tooltip (recharts' `Tooltip['content']`). */
59
110
  export type ChartTooltipContentType = React.ComponentProps<typeof ChartTooltip>['content'];
60
111
  declare function ChartTooltipContent({ active, payload, label, className, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
61
112
  declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
62
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, config: configFromProps, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
113
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, config: configFromProps, variant, valueKey, valueFormatter, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
63
114
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,4 +1,6 @@
1
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, } from './chart';
2
- export type { ChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
1
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, resolveChartColors, } from './chart';
2
+ export type { ChartConfig, ResolvedChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
3
+ export { CHART_CATEGORICAL_TOKENS, CHART_SEQUENTIAL_TOKENS, CHART_DIVERGING_TOKENS, CHART_STATUS_TOKENS, CHART_DEFAULT_PALETTE, listPaletteStops, listPaletteChoices, resolveSeriesColor, findDuplicateTones, } from './chart-palette';
4
+ export type { ChartPalette, ChartSeriesTone, ChartSequentialRamp, ChartDivergingPair, ChartStatusTone, ResolveSeriesColorOptions, } from './chart-palette';
3
5
  export { formatCompactNumber, formatPercent, createTickFormatter, resolveAxisDomain, resolveRotatedTickAnchor, resolveXAxisHeight, resolveXAxisTitle, resolveYAxisTitle, resolveCategoryRange, resolveAnimation, toLabelFormatter, resolveLabelFillClass, resolveCartesianLabelPosition, resolveBrushProps, resolveChartReferenceValue, resolveReferenceLineProps, toReferenceLineList, CHART_REFERENCE_LINE_STROKE, CHART_LABEL_MARGIN, CHART_LABEL_FILL_CLASS, CHART_LABEL_FILL_ON_SERIES_CLASS, CHART_LABEL_FONT_SIZE, CHART_BRUSH_HEIGHT, CHART_BRUSH_ARIA_LABEL, } from './chart-format';
4
6
  export type { TickFormatter, ChartCurveType, ChartReferenceLine, ChartReferenceLabelPosition, CartesianChartProps, ChartCategoryRange, ChartYAxisTarget, SecondaryYAxisProps, ChartAnimationProps, ChartAnimationEasing, ResolvedAnimation, ChartDataLabelProps, CartesianLabelPosition, PolarLabelPosition, ChartLabelPosition, ChartBrushProps, ResolvedBrush, } from './chart-format';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ /** The chart types the design draws an empty state for. */
3
+ export type ChartStateVariant = 'area' | 'bar' | 'line' | 'donut' | 'radial' | 'funnel' | 'radar' | 'sankey' | 'scatter' | 'treemap' | 'table' | 'text';
4
+ export declare const CHART_STATE_ILLUSTRATIONS: Record<ChartStateVariant, (props: {
5
+ className?: string;
6
+ }) => React.ReactElement>;
@@ -1,9 +1,20 @@
1
+ import { ChartStateVariant } from './chart-state-illustrations';
1
2
  import * as React from 'react';
2
3
  export interface ChartStateProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
3
4
  /** Which placeholder to show. Drives the leading glyph and default label. */
4
5
  state: 'loading' | 'empty' | 'error';
5
- /** Overrides the default label for the current `state`. */
6
- message?: string;
6
+ /**
7
+ * Which chart the slot holds. `empty` then draws that type's silhouette
8
+ * instead of the generic inbox glyph — the design defines one per chart type.
9
+ * Ignored by `loading` and `error`, which share one treatment.
10
+ */
11
+ variant?: ChartStateVariant;
12
+ /**
13
+ * Text shown below the illustration or glyph. Defaults to `"Data is
14
+ * loading…"` / `"No data found"` / `"Something went wrong"` based on
15
+ * `state`. Pass a value to override for any state.
16
+ */
17
+ description?: React.ReactNode;
7
18
  /** Trailing action (e.g. a "Try again" button) — shown for `error` only. */
8
19
  action?: React.ReactNode;
9
20
  }
@@ -1 +1,2 @@
1
1
  export { ChartState, type ChartStateProps } from './chart-state';
2
+ export { CHART_STATE_ILLUSTRATIONS, type ChartStateVariant, } from './chart-state-illustrations';
@@ -0,0 +1,64 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { CardHeaderProps } from '../card';
3
+ import { ChartStateProps, ChartStateVariant } from '../chart-state';
4
+ import * as React from 'react';
5
+ export interface ChartWidgetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
6
+ /**
7
+ * Replace the rendered `<div>` with another element or component (Base UI
8
+ * composition), forwarded to `Card`. This is how a dashboard gives each
9
+ * widget a landmark role — `render={<section aria-label="Sessions" />}` — the
10
+ * one thing the widget can't infer for itself.
11
+ */
12
+ render?: useRender.RenderProp;
13
+ /**
14
+ * Which chart the widget holds. Only used while `state="empty"`, to pick the
15
+ * silhouette the design draws for that chart type — the widget itself needs
16
+ * no size, so this carries nothing else.
17
+ */
18
+ variant?: ChartStateVariant;
19
+ /**
20
+ * The card header, forwarded verbatim to `CardHeader`. Everything that
21
+ * component takes works here — `title`, `actions` (the ⋯ menu), `extras` (a
22
+ * filter chip), `isDraggable`, `hasRename`, … Omit it for a header-less
23
+ * widget.
24
+ */
25
+ header?: CardHeaderProps;
26
+ /**
27
+ * The readout beside or above the plot — typically a `Metric`.
28
+ *
29
+ * - `'vertical'` (default) — metric above the plot, full width. The metric
30
+ * takes its natural height; the plot fills the rest of the card body.
31
+ * - `'horizontal'` — metric and plot side by side, each `flex-1`. Use for
32
+ * compact widgets (sm/288px) where vertical space is at a premium.
33
+ *
34
+ * Figma: vertical → `8174:22335`, horizontal → `8982:31681`.
35
+ */
36
+ orientation?: 'vertical' | 'horizontal';
37
+ /**
38
+ * The readout beside or above the plot — typically a `Metric`. Layout is
39
+ * controlled by `orientation`.
40
+ */
41
+ metric?: React.ReactNode;
42
+ /**
43
+ * Show a placeholder instead of the plot, for a widget whose data isn't there
44
+ * yet. `error` also gives the card its error border.
45
+ */
46
+ state?: ChartStateProps['state'];
47
+ /**
48
+ * Text below the placeholder illustration or glyph — defaults to
49
+ * `"Data is loading…"` / `"No data found"` / `"Something went wrong"`.
50
+ */
51
+ stateDescription?: ChartStateProps['description'];
52
+ /** Trailing action on the `error` placeholder — e.g. a "Try again" button. */
53
+ stateAction?: ChartStateProps['action'];
54
+ /**
55
+ * Class for the card body. Rarely needed — the body already fills the card.
56
+ * Use it where nothing above gives a height and the content can't either, e.g.
57
+ * a placeholder-only widget outside a sized grid cell.
58
+ */
59
+ bodyClassName?: string;
60
+ /** The chart. Replaced by the placeholder while `state` is set. */
61
+ children?: React.ReactNode;
62
+ }
63
+ declare const ChartWidget: React.ForwardRefExoticComponent<ChartWidgetProps & React.RefAttributes<HTMLDivElement>>;
64
+ export { ChartWidget };
@@ -0,0 +1 @@
1
+ export { ChartWidget, type ChartWidgetProps } from './chart-widget';
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartConfig, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition, ChartYAxisTarget, SecondaryYAxisProps } from '../chart';
2
+ import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition, ChartYAxisTarget, SecondaryYAxisProps } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const composedChartVariants: (props?: ({
5
5
  orientation?: "horizontal" | "vertical" | null | undefined;
@@ -35,8 +35,8 @@ export interface ComposedSeries {
35
35
  */
36
36
  yAxis?: ChartYAxisTarget;
37
37
  /**
38
- * Paint for this series, overriding its `config` color. Reference an existing
39
- * semantic `--ui-*` token; there is no chart palette tier yet.
38
+ * Paint for this series, overriding the stop of the container's `palette` it
39
+ * would otherwise take. Reference an existing semantic `--ui-*` token.
40
40
  */
41
41
  color?: string;
42
42
  /**
@@ -108,13 +108,18 @@ export interface ComposedChartReferenceArea extends ChartCategoryRange {
108
108
  label?: string;
109
109
  }
110
110
  export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof composedChartVariants>, CartesianChartProps, SecondaryYAxisProps, ChartAnimationProps, ChartBrushProps, ChartDataLabelProps {
111
+ /**
112
+ * The dataviz palette this chart's series are painted from. Series that
113
+ * state no `color` of their own take a stop of it. See `ChartPalette`.
114
+ */
115
+ palette?: ChartPalette;
111
116
  /** Row-per-category data. Each object holds `xKey` + one numeric field per series (`null` breaks a line/area unless `connectNulls`). */
112
117
  data: ReadonlyArray<Record<string, string | number | null>>;
113
118
  /**
114
- * Per-series map of `label` / `color`, keyed by `series[].key` (imported from
115
- * the shared `Chart` primitives). Turned into `--color-<key>` custom
116
- * properties. Colors are caller-supplied — reference an existing semantic
117
- * `--ui-*` token; there is no chart palette tier yet.
119
+ * Per-series map of `label` / `icon` / `tone`, keyed by `series[].key`
120
+ * (imported from the shared `Chart` primitives). Turned into `--color-<key>`
121
+ * custom properties. Series take their colour from the container's `palette`;
122
+ * each entry maps a key to a `label` and an optional `tone`.
118
123
  */
119
124
  config: ChartConfig;
120
125
  /**
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig, CartesianChartProps, ChartAnimationProps } from '../chart';
1
+ import { ChartTooltip, ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
2
2
  import * as React from 'react';
3
3
  /**
4
4
  * Drop every synthetic cone-band range series from a recharts tooltip/legend
@@ -82,6 +82,11 @@ export interface ConfidenceConeReferenceLine {
82
82
  * and a story's. Not re-exported from `index.ts`; not part of the public API.
83
83
  */
84
84
  export interface ConfidenceConeBaseProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps, ChartAnimationProps {
85
+ /**
86
+ * The dataviz palette this chart's series are painted from. Series that
87
+ * state no `color` of their own take a stop of it. See `ChartPalette`.
88
+ */
89
+ palette?: ChartPalette;
85
90
  /**
86
91
  * Row-per-point data — the shared x dimension plus each series' actual /
87
92
  * forecast / bound fields. Rows are naturally sparse (a point has either an
@@ -91,10 +96,10 @@ export interface ConfidenceConeBaseProps extends Omit<React.ComponentProps<'div'
91
96
  */
92
97
  data: ReadonlyArray<Record<string, string | number | null | undefined>>;
93
98
  /**
94
- * Per-series map of `label` / `color` for the actual + forecast lines
95
- * (imported from the shared `Chart` primitives). Colors are caller-supplied —
96
- * reference an existing semantic `--ui-*` token; there is no chart palette tier
97
- * yet. Each metric renders in one hue: its cone band and forecast line both
99
+ * Per-series map of `label` / `icon` / `tone` for the actual + forecast lines
100
+ * (imported from the shared `Chart` primitives). Series take their colour from
101
+ * the container's `palette`; each entry maps a key to a `label` and an optional
102
+ * `tone`. Each metric renders in one hue: its cone band and forecast line both
98
103
  * reuse its actual series' color — actual and forecast differ by line style,
99
104
  * not hue.
100
105
  */
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const emptyOverlayIconVariants: (props?: ({
4
- color?: "blue" | "gray" | "green" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
4
+ color?: "blue" | "green" | "gray" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export interface EmptyOverlayProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'color' | 'children'>, VariantProps<typeof emptyOverlayIconVariants> {
7
7
  /** Icon rendered in the colored badge (e.g. an `icons-react` glyph at 24px). */
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartAnimationProps, ChartConfig, TickFormatter } from '../chart';
2
+ import { ChartTooltip, ChartAnimationProps, ChartConfig, ChartPalette, TickFormatter } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const funnelChartVariants: (props?: ({
5
5
  lastShape?: "triangle" | "rectangle" | null | undefined;
@@ -120,13 +120,19 @@ export declare function funnelChartLabelText(options: {
120
120
  percentFormatter?: TickFormatter;
121
121
  }): string;
122
122
  export interface FunnelChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof funnelChartVariants>, ChartAnimationProps {
123
+ /**
124
+ * The dataviz palette this chart's series are painted from. Series that
125
+ * state no `color` of their own take a stop of it. See `ChartPalette`.
126
+ */
127
+ palette?: ChartPalette;
123
128
  /** Row-per-stage data. Each object holds the stage's `nameKey` label + its `dataKey` numeric value. */
124
129
  data: ReadonlyArray<Record<string, string | number>>;
125
130
  /**
126
- * Per-stage map of `label` / `color`, keyed by the stage's `nameKey` value
127
- * (imported from the shared `Chart` primitives). Turned into `--color-<name>`
128
- * custom properties. Colors are caller-supplied — reference an existing
129
- * semantic `--ui-*` token; there is no chart palette tier yet.
131
+ * Per-stage map of `label` / `icon` / `tone`, keyed by the stage's `nameKey`
132
+ * value (imported from the shared `Chart` primitives). Turned into
133
+ * `--color-<name>` custom properties. Series take their colour from the
134
+ * container's `palette`; each entry maps a key to a `label` and an optional
135
+ * `tone`.
130
136
  */
131
137
  config: ChartConfig;
132
138
  /** Numeric field that sizes each stage (the funnel narrows as it drops). */