@acronis-platform/ui-react 5.4.5 → 5.5.1

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 (58) hide show
  1. package/dist/components/ui/area-chart/area-chart.js +114 -113
  2. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  3. package/dist/components/ui/bar-chart/bar-chart.js +53 -49
  4. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  5. package/dist/components/ui/chart/chart.js +52 -45
  6. package/dist/components/ui/chart/chart.js.map +1 -1
  7. package/dist/components/ui/composed-chart/composed-chart.js +134 -130
  8. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  9. package/dist/components/ui/confidence-cone/confidence-cone.js +36 -35
  10. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  11. package/dist/components/ui/funnel-chart/funnel-chart.js +38 -37
  12. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  13. package/dist/components/ui/line-chart/line-chart.js +35 -34
  14. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  15. package/dist/components/ui/pie-chart/pie-chart.js +28 -27
  16. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  17. package/dist/components/ui/radar-chart/radar-chart.js +68 -65
  18. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  19. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +64 -63
  20. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  21. package/dist/components/ui/scatter-chart/scatter-chart.js +26 -26
  22. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  23. package/dist/components/ui/treemap/treemap.js +22 -22
  24. package/dist/components/ui/treemap/treemap.js.map +1 -1
  25. package/dist/llms/area-chart.md +1 -0
  26. package/dist/llms/bar-chart.md +1 -0
  27. package/dist/llms/chart.md +10 -0
  28. package/dist/llms/composed-chart.md +1 -0
  29. package/dist/llms/confidence-cone.md +1 -0
  30. package/dist/llms/funnel-chart.md +1 -0
  31. package/dist/llms/line-chart.md +1 -0
  32. package/dist/llms/pie-chart.md +1 -0
  33. package/dist/llms/radar-chart.md +1 -0
  34. package/dist/llms/radial-bar-chart.md +1 -0
  35. package/dist/llms/scatter-chart.md +1 -0
  36. package/dist/llms/treemap.md +1 -0
  37. package/dist/llms.txt +1 -1
  38. package/dist/src/components/ui/area-chart/area-chart.d.ts +6 -1
  39. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +8 -2
  40. package/dist/src/components/ui/category-bar/category-bar.d.ts +1 -1
  41. package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +16 -0
  42. package/dist/src/components/ui/chart/chart.d.ts +12 -1
  43. package/dist/src/components/ui/chart/index.d.ts +1 -1
  44. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +6 -1
  45. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +6 -1
  46. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +6 -1
  47. package/dist/src/components/ui/grid/grid.d.ts +1 -1
  48. package/dist/src/components/ui/line-chart/line-chart.d.ts +6 -1
  49. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +6 -1
  50. package/dist/src/components/ui/progress-circle/progress-circle.d.ts +1 -1
  51. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +9 -1
  52. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +6 -1
  53. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +6 -1
  54. package/dist/src/components/ui/spinner/spinner.d.ts +1 -1
  55. package/dist/src/components/ui/stack/stack.d.ts +1 -1
  56. package/dist/src/components/ui/treemap/treemap.d.ts +6 -1
  57. package/dist/ui-react.css +1 -1
  58. package/package.json +3 -3
@@ -104,6 +104,7 @@ the chart primitives (`BarChart`, `Bar`, …) directly from `recharts`.
104
104
  | `hideLabel` | `boolean` | `false` | no | Hide the tooltip's heading label. |
105
105
  | `hideIndicator` | `boolean` | `false` | no | Hide the per-series color dot in the tooltip. |
106
106
  | `hideIcon` | `boolean` | `false` | no | Hide the per-series icon in the legend (use the color swatch). |
107
+ | `fontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text — labels, and the right-hand values of the list variant. |
107
108
  | `nameKey` | `string` | — | no | Config key to resolve each series' label from the payload. |
108
109
  | `labelKey` | `string` | — | no | Config key to resolve the tooltip's heading label. |
109
110
 
@@ -151,6 +152,15 @@ Scenario: Legend
151
152
  And a series icon replaces the swatch unless hideIcon is set
152
153
  ```
153
154
 
155
+ ```gherkin
156
+ Scenario: Legend font size
157
+ Given no fontSize prop
158
+ Then the legend text renders at 'xs' (the historical size)
159
+ When fontSize is set to one of 'xs' | 'sm' | 'base' | 'lg' | 'xl'
160
+ Then the legend text renders at that step of the type scale
161
+ And the 'list' variant sizes both its labels and its right-hand values
162
+ ```
163
+
154
164
  ```gherkin
155
165
  Scenario: Default palette
156
166
  Given a ChartContainer with no explicit palette prop
@@ -222,6 +222,7 @@ across brands until the real data-viz palette lands.
222
222
  | `showGrid` | `boolean` | `true` | no | Render the CartesianGrid. |
223
223
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
224
224
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
225
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
225
226
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
226
227
  | `showXAxis` | `boolean` | `true` | no | Render the X axis (its ticks and title). Set false to hide it. |
227
228
  | `showYAxis` | `boolean` | `true` | no | Render the Y axis (its ticks and title). Set false to hide it. |
@@ -125,6 +125,7 @@ Make the actual and forecast lines meet by giving the hand-off point both an
125
125
  | `showGrid` | `boolean` | `true` | no | Render the CartesianGrid. |
126
126
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip (the band series is filtered out of it). |
127
127
  | `showLegend` | `boolean` | `true` | no | Render the legend (the band series is filtered out of it). |
128
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
128
129
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
129
130
  | `showXAxis` | `boolean` | `true` | no | Render the X axis (its ticks and title). Set false to hide it. |
130
131
  | `showYAxis` | `boolean` | `true` | no | Render the Y axis (its ticks and title). Set false to hide it. |
@@ -160,6 +160,7 @@ names every stage. Turn them on when a funnel is shown without its legend.
160
160
  | `labelFormatter` | `(value: number | string, index?: number) => string` | — | no | Format the numeric part of a label. |
161
161
  | `percentFormatter` | `(value: number | string, index?: number) => string` | — | no | Format the conversion share behind the percent formats. Receives the share as a fraction (0.52); defaults to a one-decimal bare percentage ("52.0%"). Replace it for a locale that doesn't write a bare percent sign. |
162
162
  | `showLegend` | `boolean` | `true` | no | Render the stage list beside the plot — one two-column row per visible stage, a sibling of the plot rather than a renderer legend. On by default, because it is where the design's funnel names its stages. With it off the row centres its lone plot. |
163
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text (stage names and values). |
163
164
  | `legendValueFormatter` | `(value: string | number) => string` | — | no | Format the value in each legend row — the stage's dataKey number. Omit to stringify the raw value. |
164
165
  | `stageSettings` | `Record<string, { color?: string; hidden?: boolean }>` | — | no | Per-stage overrides keyed by the stage's nameKey value. `color` replaces that stage's palette stop, in the funnel and in its legend marker; `hidden` drops the stage from the funnel, its labels, the legend, and the conversion percentages. |
165
166
  | `showActiveShape` | `boolean` | `false` | no | Outline the hovered segment, rather than changing its fill, so it keeps the color that ties it to its legend entry and label. |
@@ -118,6 +118,7 @@ across brands until the real data-viz palette lands.
118
118
  | `showGrid` | `boolean` | `true` | no | Render the CartesianGrid. |
119
119
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
120
120
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
121
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
121
122
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
122
123
  | `showXAxis` | `boolean` | `true` | no | Render the X axis (its ticks and title). Set false to hide it. |
123
124
  | `showYAxis` | `boolean` | `true` | no | Render the Y axis (its ticks and title). Set false to hide it. |
@@ -115,6 +115,7 @@ real data-viz palette lands.
115
115
  | `sliceSettings` | `Record<string, { color?: string; hideLabel?: boolean; labelFormat?: PieChartLabelFormat }>` | — | no | Per-slice overrides keyed by the slice's nameKey value: its color, and whether/how its data label reads. A name with no entry keeps the chart-level behavior. |
116
116
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
117
117
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
118
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text (labels and values). |
118
119
  | `legendValueFormatter` | `(value: string | number) => string` | — | no | Format each slice's value in the list legend. Omit to stringify the raw value. |
119
120
  | `margin` | `{ top?: number; right?: number; bottom?: number; left?: number }` | — | no | Plot-area margin, in px. Omit to use the renderer's default (5 on every side). |
120
121
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Takes precedence over tooltipFormat. Ignored when showTooltip is false. |
@@ -125,6 +125,7 @@ across brands until the real data-viz palette lands.
125
125
  | `margin` | `{ top?: number; right?: number; bottom?: number; left?: number }` | — | no | Plot-area margin, in px. Passing the object replaces all four sides; a side left out is `0`, not the default `5`, so name every side. |
126
126
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
127
127
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
128
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
128
129
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
129
130
  | `animate` | `boolean` | `false` | no | Enable entrance animation. Off by default so output/baselines are unchanged. |
130
131
  | `animationDuration` | `number` | — | no | Animation duration in ms. |
@@ -132,6 +132,7 @@ real data-viz palette lands.
132
132
  | `showBackground` | `boolean` | `true` | no | Render a muted background track behind each arc. |
133
133
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
134
134
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
135
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text (labels and values). |
135
136
  | `legendValueFormatter` | `(value: string | number) => string` | — | no | Format each arc's value in the list legend. Ignored in multi-metric mode (values are per-row, not per-series). |
136
137
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
137
138
  | `animate` | `boolean` | `false` | no | Enable entrance animation. Off by default so output/baselines are unchanged. |
@@ -119,6 +119,7 @@ across brands until the real data-viz palette lands.
119
119
  | `showGrid` | `boolean` | `true` | no | Render the CartesianGrid. |
120
120
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
121
121
  | `showLegend` | `boolean` | `true` | no | Render the legend. |
122
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
122
123
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
123
124
  | `showXAxis` | `boolean` | `true` | no | Render the X axis (its ticks and title). Set false to hide it. |
124
125
  | `showYAxis` | `boolean` | `true` | no | Render the Y axis (its ticks and title). Set false to hide it. |
@@ -108,6 +108,7 @@ so light/dark and brand overrides come for free.
108
108
  | `showTooltip` | `boolean` | `true` | no | Render the hover tooltip. |
109
109
  | `showLegend` | `boolean` | `false` | no | Render the legend — one entry per distinct leaf name. Off by default: a treemap labels its own cells. |
110
110
  | `legendPos` | `'top' | 'bottom'` | `'bottom'` | no | Which edge the legend sits on. |
111
+ | `legendFontSize` | `'xs' | 'sm' | 'base' | 'lg' | 'xl'` | `'xs'` | no | Font size of the legend text. |
111
112
  | `tooltipContent` | `ReactElement | ((props) => ReactNode)` | — | no | Replace the default tooltip. Pass a configured ChartTooltipContent (from this library) — e.g. with a formatter / labelFormatter — to customize the tooltip content without composing recharts. Ignored when showTooltip is false. |
112
113
  | `animate` | `boolean` | `false` | no | Enable entrance animation. Off by default so output/baselines are unchanged. |
113
114
  | `animationDuration` | `number` | — | no | Animation duration in ms. |
package/dist/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Acronis UI Kit for React — LLM Reference
2
2
 
3
- > `@acronis-platform/ui-react` v5.4.5
3
+ > `@acronis-platform/ui-react` v5.5.1
4
4
 
5
5
  Machine-readable component reference compiled from framework-agnostic specs.
6
6
  Each entry links to a self-contained markdown file with props, behavior,
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
2
+ import { ChartConfig, ChartLegendFontSize, 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;
@@ -92,6 +92,11 @@ export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'child
92
92
  */
93
93
  projectionStart?: string | number;
94
94
  showLegend?: boolean;
95
+ /**
96
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
97
+ * always rendered at. See `ChartLegendFontSize`.
98
+ */
99
+ legendFontSize?: ChartLegendFontSize;
95
100
  /** Position of the value labels when `showLabels` is on. Defaults to `top`. */
96
101
  labelPosition?: CartesianLabelPosition;
97
102
  }
@@ -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, ChartPalette, ChartStatusTone, ChartReferenceLine, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
3
+ import { ChartLegend, ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, ChartStatusTone, 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;
@@ -99,8 +99,9 @@ export declare function NormalizedTooltipContent({ content, dataKeys, ...props }
99
99
  * in `dataKeys` order the legend would silently reorder itself depending on
100
100
  * which bar-styling props happen to be set.
101
101
  */
102
- export declare function NormalizedLegendContent({ dataKeys, ...props }: Partial<LegendRenderProps> & {
102
+ export declare function NormalizedLegendContent({ dataKeys, fontSize, ...props }: Partial<LegendRenderProps> & {
103
103
  dataKeys: string[];
104
+ fontSize?: ChartLegendFontSize;
104
105
  }): import("react/jsx-runtime").JSX.Element;
105
106
  /** Paint overrides recharts spreads over a bar to mark it as the active one. */
106
107
  interface BarPaintOverride {
@@ -191,6 +192,11 @@ export interface BarChartVerticalProps extends Omit<React.ComponentProps<'div'>,
191
192
  opacity?: number;
192
193
  };
193
194
  showLegend?: boolean;
195
+ /**
196
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
197
+ * always rendered at. See `ChartLegendFontSize`.
198
+ */
199
+ legendFontSize?: ChartLegendFontSize;
194
200
  /**
195
201
  * Position of the value labels when `showLabels` is on. Defaults to the bar's
196
202
  * growing end (`top`), or the segment centre when the layout is stacked.
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import { ChartConfig, ChartPalette } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const categoryBarVariants: (props?: ({
5
- size?: "sm" | "md" | "lg" | null | undefined;
5
+ size?: "sm" | "lg" | "md" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface CategoryBarSegment {
8
8
  /** Key into `config` for this segment's label + color. */
@@ -46,3 +46,19 @@ export declare const paletteArgTypes: {
46
46
  };
47
47
  };
48
48
  };
49
+ export declare const legendFontSizeArgTypes: {
50
+ legendFontSize: {
51
+ name: string;
52
+ description: string;
53
+ control: {
54
+ type: "select";
55
+ };
56
+ options: string[];
57
+ table: {
58
+ category: string;
59
+ defaultValue: {
60
+ summary: string;
61
+ };
62
+ };
63
+ };
64
+ };
@@ -51,12 +51,23 @@ export type ChartTooltipContentProps = Partial<TooltipContentProps<ValueType, Na
51
51
  labelClassName?: string;
52
52
  color?: string;
53
53
  };
54
+ /**
55
+ * The legend text-size scale. `xs` is the size the legend has always rendered
56
+ * at; the rest of the steps follow Tailwind's `text-*` scale.
57
+ */
58
+ export type ChartLegendFontSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl';
54
59
  export type ChartLegendContentProps = {
55
60
  className?: string;
56
61
  hideIcon?: boolean;
57
62
  verticalAlign?: LegendProps['verticalAlign'];
58
63
  payload?: LegendPayload[];
59
64
  nameKey?: string;
65
+ /**
66
+ * Font size of the legend text — labels, and the right-hand values of the
67
+ * `list` variant. Defaults to `'xs'`, the size the legend has always
68
+ * rendered at.
69
+ */
70
+ fontSize?: ChartLegendFontSize;
60
71
  /**
61
72
  * The series config the entries take their labels and icons from. Defaults to
62
73
  * the enclosing `ChartContainer`'s — pass it only to render the legend *outside*
@@ -118,5 +129,5 @@ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
118
129
  export type ChartTooltipContentType = React.ComponentProps<typeof ChartTooltip>['content'];
119
130
  declare function ChartTooltipContent({ active, payload, label, className, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
120
131
  declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
121
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, config: configFromProps, variant, valueKey, valueFormatter, valueClassName, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
132
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, config: configFromProps, variant, fontSize, valueKey, valueFormatter, valueClassName, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
122
133
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,5 +1,5 @@
1
1
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, resolveChartColors, toCssKey, } from './chart';
2
- export type { ChartConfig, ResolvedChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
2
+ export type { ChartConfig, ResolvedChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartLegendFontSize, ChartTooltipContentType, } from './chart';
3
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
4
  export type { ChartPalette, ChartSeriesTone, ChartSequentialRamp, ChartDivergingPair, ChartDivergingSide, ChartStatusTone, ResolveSeriesColorOptions, } from './chart-palette';
5
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, dropProjectionPayload, } from './chart-format';
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition, ChartYAxisTarget, SecondaryYAxisProps } from '../chart';
2
+ import { ChartConfig, ChartLegendFontSize, 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;
@@ -176,6 +176,11 @@ export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'c
176
176
  showLegend?: boolean;
177
177
  /** Which edge the legend sits on. Defaults to `bottom`. */
178
178
  legendPosition?: 'top' | 'bottom';
179
+ /**
180
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
181
+ * always rendered at. See `ChartLegendFontSize`.
182
+ */
183
+ legendFontSize?: ChartLegendFontSize;
179
184
  /**
180
185
  * Position of the value labels when `showLabels` is on. Defaults to each
181
186
  * series' growing end — `top` (or `right` when horizontal), and the centre of
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
1
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, 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
@@ -161,6 +161,11 @@ export interface ConfidenceConeBaseProps extends Omit<React.ComponentProps<'div'
161
161
  */
162
162
  showForecastRegion?: boolean;
163
163
  showLegend?: boolean;
164
+ /**
165
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
166
+ * always rendered at. See `ChartLegendFontSize`.
167
+ */
168
+ legendFontSize?: ChartLegendFontSize;
164
169
  }
165
170
  /**
166
171
  * Which columns to plot has to be spelled out one way or the other: the `series`
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartAnimationProps, ChartConfig, ChartPalette, TickFormatter } from '../chart';
2
+ import { ChartTooltip, ChartAnimationProps, ChartConfig, ChartLegendFontSize, ChartPalette, TickFormatter } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const funnelChartVariants: (props?: ({
5
5
  lastShape?: "triangle" | "rectangle" | null | undefined;
@@ -267,6 +267,11 @@ export interface FunnelChartProps extends Omit<React.ComponentProps<'div'>, 'chi
267
267
  * carries no on-plot labels, so the legend is where the stages are named.
268
268
  */
269
269
  showLegend?: boolean;
270
+ /**
271
+ * Font size of the legend text (stage names and values). Defaults to `'xs'` —
272
+ * the size the legend has always rendered at. See `ChartLegendFontSize`.
273
+ */
274
+ legendFontSize?: ChartLegendFontSize;
270
275
  /** Format the value in each legend row — the stage's `dataKey` number. */
271
276
  legendValueFormatter?: (value: string | number) => string;
272
277
  /** Per-stage `color` / `hidden` overrides, keyed by the stage's `nameKey` value. */
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const gridVariants: (props?: ({
4
4
  cols?: 1 | 2 | 3 | 6 | 4 | 12 | null | undefined;
5
- gap?: "none" | "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ gap?: "none" | "sm" | "lg" | "xl" | "md" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
8
8
  /**
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
2
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const lineChartVariants: (props?: ({
5
5
  curve?: "step" | "linear" | "monotone" | "natural" | "basis" | "stepBefore" | "stepAfter" | null | undefined;
@@ -124,6 +124,11 @@ export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'child
124
124
  */
125
125
  projectionStart?: string | number;
126
126
  showLegend?: boolean;
127
+ /**
128
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
129
+ * always rendered at. See `ChartLegendFontSize`.
130
+ */
131
+ legendFontSize?: ChartLegendFontSize;
127
132
  /** Position of the value labels when `showLabels` is on. Defaults to `top`. */
128
133
  labelPosition?: CartesianLabelPosition;
129
134
  }
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartConfig, ChartPalette, ChartTooltipContentProps, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
2
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, ChartTooltipContentProps, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const pieChartVariants: (props?: ({
5
5
  shape?: "donut" | "pie" | null | undefined;
@@ -142,6 +142,11 @@ export interface PieChartProps extends Omit<React.ComponentProps<'div'>, 'childr
142
142
  sliceSettings?: Record<string, PieChartSliceSettings>;
143
143
  showTooltip?: boolean;
144
144
  showLegend?: boolean;
145
+ /**
146
+ * Font size of the legend text (labels and values). Defaults to `'xs'` —
147
+ * the size the legend has always rendered at. See `ChartLegendFontSize`.
148
+ */
149
+ legendFontSize?: ChartLegendFontSize;
145
150
  /**
146
151
  * Format each slice's value in the list legend. When omitted the raw value is
147
152
  * stringified with `String()`.
@@ -25,7 +25,7 @@ declare const SIZES: {
25
25
  };
26
26
  export type ProgressCircleSize = keyof typeof SIZES;
27
27
  declare const progressCircleVariants: (props?: ({
28
- size?: "sm" | "md" | "lg" | "tiny" | null | undefined;
28
+ size?: "sm" | "lg" | "md" | "tiny" | null | undefined;
29
29
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
30
30
  export interface ProgressCircleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof progressCircleVariants> {
31
31
  /** Current progress; clamped to `[0, max]`. */
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { AxisDomainItem } from 'recharts';
3
- import { ChartTooltip, ChartConfig, ChartPalette, ChartAnimationProps, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
3
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, ChartAnimationProps, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
4
4
  import * as React from 'react';
5
5
  declare const radarChartVariants: (props?: ({
6
6
  gridType?: "circle" | "polygon" | null | undefined;
@@ -251,6 +251,14 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
251
251
  };
252
252
  showTooltip?: boolean;
253
253
  showLegend?: boolean;
254
+ /**
255
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
256
+ * always rendered at. A larger size grows the legend band the plot is centred
257
+ * above (the band is sized for `xs`; see `radarPlotBox`), so pair it with a
258
+ * taller `className` height if the legend crowds the web. See
259
+ * `ChartLegendFontSize`.
260
+ */
261
+ legendFontSize?: ChartLegendFontSize;
254
262
  /**
255
263
  * Replace the default tooltip. Pass a configured `ChartTooltipContent`
256
264
  * (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig, ChartPalette, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
1
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
2
2
  import * as React from 'react';
3
3
  /** Row-per-arc datum: the `nameKey` label plus each metric's numeric value. */
4
4
  type RadialBarChartDatum = Record<string, string | number>;
@@ -229,6 +229,11 @@ export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, '
229
229
  centerLabel?: RadialBarChartCenterLabel;
230
230
  showTooltip?: boolean;
231
231
  showLegend?: boolean;
232
+ /**
233
+ * Font size of the legend text (labels and values). Defaults to `'xs'` —
234
+ * the size the legend has always rendered at. See `ChartLegendFontSize`.
235
+ */
236
+ legendFontSize?: ChartLegendFontSize;
232
237
  /**
233
238
  * Format each arc's value in the list legend. In single-metric mode each arc
234
239
  * row gets its formatted value next to its label; in multi-metric mode values
@@ -1,4 +1,4 @@
1
- import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
1
+ import { ChartConfig, ChartLegendFontSize, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
2
2
  import * as React from 'react';
3
3
  export type ScatterMarkerShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
4
4
  export interface ScatterSeries {
@@ -35,6 +35,11 @@ export interface ScatterChartProps extends Omit<React.ComponentProps<'div'>, 'ch
35
35
  /** Marker shape for every point. */
36
36
  shape?: ScatterMarkerShape;
37
37
  showLegend?: boolean;
38
+ /**
39
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
40
+ * always rendered at. See `ChartLegendFontSize`.
41
+ */
42
+ legendFontSize?: ChartLegendFontSize;
38
43
  }
39
44
  declare const ScatterChart: React.ForwardRefExoticComponent<Omit<ScatterChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
45
  export { ScatterChart };
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const spinnerVariants: (props?: ({
4
- size?: "sm" | "md" | "lg" | "xl" | null | undefined;
4
+ size?: "sm" | "lg" | "xl" | "md" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
7
7
  }
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const stackVariants: (props?: ({
4
4
  direction?: "horizontal" | "vertical" | null | undefined;
5
- gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
5
+ gap?: "none" | "xs" | "sm" | "lg" | "xl" | "md" | null | undefined;
6
6
  align?: "center" | "end" | "stretch" | "start" | null | undefined;
7
7
  justify?: "center" | "end" | "start" | "between" | null | undefined;
8
8
  wrap?: boolean | null | undefined;
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig, ChartPalette, ChartAnimationProps, TickFormatter } from '../chart';
1
+ import { ChartTooltip, ChartConfig, ChartLegendFontSize, ChartPalette, ChartAnimationProps, TickFormatter } from '../chart';
2
2
  import * as React from 'react';
3
3
  /**
4
4
  * Where a cell's label block sits inside its rectangle. Named logically, not
@@ -110,6 +110,11 @@ export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'childre
110
110
  showLegend?: boolean;
111
111
  /** Which edge the legend sits on. */
112
112
  legendPos?: 'top' | 'bottom';
113
+ /**
114
+ * Font size of the legend text. Defaults to `'xs'` — the size the legend has
115
+ * always rendered at. See `ChartLegendFontSize`.
116
+ */
117
+ legendFontSize?: ChartLegendFontSize;
113
118
  /**
114
119
  * Replace the default tooltip. Pass a configured `ChartTooltipContent`
115
120
  * (imported from this library) — e.g. with a `formatter` / `labelFormatter` —