@acronis-platform/ui-react 0.58.0 → 0.60.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 (73) hide show
  1. package/dist/components/ui/area-chart/area-chart.js +91 -63
  2. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  3. package/dist/components/ui/bar-chart/bar-chart.js +104 -73
  4. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  5. package/dist/components/ui/calendar/calendar.js +17 -15
  6. package/dist/components/ui/calendar/calendar.js.map +1 -1
  7. package/dist/components/ui/carousel-dialog/carousel-dialog.js +87 -0
  8. package/dist/components/ui/carousel-dialog/carousel-dialog.js.map +1 -0
  9. package/dist/components/ui/category-bar/category-bar.js +126 -0
  10. package/dist/components/ui/category-bar/category-bar.js.map +1 -0
  11. package/dist/components/ui/chart/chart-format.js +40 -0
  12. package/dist/components/ui/chart/chart-format.js.map +1 -0
  13. package/dist/components/ui/chart/chart.js.map +1 -1
  14. package/dist/components/ui/composed-chart/composed-chart.js +91 -63
  15. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  16. package/dist/components/ui/confidence-cone/confidence-cone.js +113 -85
  17. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  18. package/dist/components/ui/dialog/dialog.js +29 -29
  19. package/dist/components/ui/dialog/dialog.js.map +1 -1
  20. package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js +57 -0
  21. package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js.map +1 -0
  22. package/dist/components/ui/dialog-footer-default/dialog-footer-default.js +1 -1
  23. package/dist/components/ui/dialog-footer-default/dialog-footer-default.js.map +1 -1
  24. package/dist/components/ui/dialog-welcome/dialog-welcome.js +272 -0
  25. package/dist/components/ui/dialog-welcome/dialog-welcome.js.map +1 -0
  26. package/dist/components/ui/histogram/histogram.js +89 -61
  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/line-chart/line-chart.js +120 -92
  30. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  31. package/dist/components/ui/sankey-chart/sankey-chart.js +192 -0
  32. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -0
  33. package/dist/components/ui/scatter-chart/scatter-chart.js +79 -51
  34. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  35. package/dist/components/ui/toolbar/toolbar.js +82 -92
  36. package/dist/components/ui/toolbar/toolbar.js.map +1 -1
  37. package/dist/index.js +461 -439
  38. package/dist/index.js.map +1 -1
  39. package/dist/lib/breakpoints.js +9 -6
  40. package/dist/lib/breakpoints.js.map +1 -1
  41. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +25 -0
  42. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -0
  43. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +36 -0
  44. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
  45. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1205 -0
  46. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
  47. package/dist/react.js +461 -439
  48. package/dist/react.js.map +1 -1
  49. package/dist/src/components/ui/area-chart/area-chart.d.ts +2 -17
  50. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +2 -17
  51. package/dist/src/components/ui/carousel-dialog/carousel-dialog.d.ts +28 -0
  52. package/dist/src/components/ui/carousel-dialog/index.d.ts +1 -0
  53. package/dist/src/components/ui/category-bar/category-bar.d.ts +51 -0
  54. package/dist/src/components/ui/category-bar/index.d.ts +1 -0
  55. package/dist/src/components/ui/chart/__tests__/chart-format.test.d.ts +1 -0
  56. package/dist/src/components/ui/chart/chart-format.d.ts +111 -0
  57. package/dist/src/components/ui/chart/chart.d.ts +2 -0
  58. package/dist/src/components/ui/chart/index.d.ts +3 -1
  59. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +2 -17
  60. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +2 -19
  61. package/dist/src/components/ui/dialog-footer-carousel/dialog-footer-carousel.d.ts +9 -0
  62. package/dist/src/components/ui/dialog-footer-carousel/index.d.ts +1 -0
  63. package/dist/src/components/ui/dialog-welcome/dialog-welcome.d.ts +54 -0
  64. package/dist/src/components/ui/dialog-welcome/dialog-welcome.docs.d.ts +55 -0
  65. package/dist/src/components/ui/dialog-welcome/index.d.ts +1 -0
  66. package/dist/src/components/ui/histogram/histogram.d.ts +2 -17
  67. package/dist/src/components/ui/line-chart/line-chart.d.ts +2 -17
  68. package/dist/src/components/ui/sankey-chart/index.d.ts +2 -0
  69. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +69 -0
  70. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +2 -17
  71. package/dist/src/index.d.ts +5 -0
  72. package/dist/ui-react.css +1 -1
  73. package/package.json +5 -4
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,11 +1,11 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartConfig } from '../chart';
2
+ import { ChartConfig, CartesianChartProps } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const areaChartVariants: (props?: ({
5
5
  layout?: "single" | "stacked" | null | undefined;
6
6
  fill?: "solid" | "gradient" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
- export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof areaChartVariants> {
8
+ export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof areaChartVariants>, CartesianChartProps {
9
9
  /** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the area unless `connectNulls`). */
10
10
  data: ReadonlyArray<Record<string, string | number | null>>;
11
11
  /**
@@ -18,12 +18,6 @@ export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'child
18
18
  dataKeys: string[];
19
19
  /** Category axis key (the shared dimension across rows, e.g. `"month"`). */
20
20
  xKey: string;
21
- /** Title rendered beneath the horizontal (X) axis. */
22
- xAxisLabel?: string;
23
- /** Title rendered beside the vertical (Y) axis (rotated). */
24
- yAxisLabel?: string;
25
- /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */
26
- yUnit?: string;
27
21
  /** Interpolation between points. */
28
22
  curve?: 'linear' | 'monotone' | 'step';
29
23
  /** Stroke width of each area's top border. */
@@ -34,16 +28,7 @@ export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'child
34
28
  showDots?: boolean;
35
29
  /** Bridge `null` gaps in the data instead of breaking the area. */
36
30
  connectNulls?: boolean;
37
- showGrid?: boolean;
38
- showTooltip?: boolean;
39
31
  showLegend?: boolean;
40
- /**
41
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
42
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /
43
- * `indicator` — to customize formatting, per-series rows, or extra fields
44
- * without composing recharts yourself. Ignored when `showTooltip` is false.
45
- */
46
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
47
32
  }
48
33
  declare const AreaChart: React.ForwardRefExoticComponent<Omit<AreaChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
49
34
  export { AreaChart, areaChartVariants };
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartConfig } from '../chart';
2
+ import { ChartConfig, CartesianChartProps } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const barChartVariants: (props?: ({
5
5
  orientation?: "horizontal" | "vertical" | null | undefined;
@@ -24,7 +24,7 @@ export interface BarChartReferenceLine {
24
24
  * Exported for unit tests; not part of the package's public API.
25
25
  */
26
26
  export declare function barChartReferenceValue(referenceLine: BarChartReferenceLine | undefined, data: ReadonlyArray<Record<string, string | number>>, dataKeys: string[]): number | undefined;
27
- export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof barChartVariants> {
27
+ export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof barChartVariants>, CartesianChartProps {
28
28
  /** Row-per-category data. Each object holds the category key + one numeric field per series. */
29
29
  data: ReadonlyArray<Record<string, string | number>>;
30
30
  /**
@@ -43,26 +43,11 @@ export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'childr
43
43
  * series `average`. Pass a single object or an array to draw several at once.
44
44
  */
45
45
  referenceLine?: BarChartReferenceLine | BarChartReferenceLine[];
46
- /** Title rendered beneath the horizontal (X) axis. */
47
- xAxisLabel?: string;
48
- /** Title rendered beside the vertical (Y) axis (rotated). */
49
- yAxisLabel?: string;
50
46
  /** Unit suffix on X-axis tick values (recharts `unit`) — applies when the X axis is numeric (`orientation="horizontal"`). */
51
47
  xUnit?: string;
52
- /** Unit suffix on Y-axis tick values (recharts `unit`) — applies when the Y axis is numeric (`orientation="vertical"`). */
53
- yUnit?: string;
54
48
  /** Corner radius applied to the growing end of each bar. */
55
49
  barRadius?: number;
56
- showGrid?: boolean;
57
- showTooltip?: boolean;
58
50
  showLegend?: boolean;
59
- /**
60
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
61
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /
62
- * `indicator` — to customize formatting, per-series rows, or extra fields
63
- * without composing recharts yourself. Ignored when `showTooltip` is false.
64
- */
65
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
66
51
  }
67
52
  declare const BarChart: React.ForwardRefExoticComponent<Omit<BarChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
68
53
  export { BarChart, barChartVariants };
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ export type CarouselDialogVariant = 'first' | 'middle' | 'last';
3
+ export interface CarouselDialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
4
+ /** Which slide position this renders for. Defaults to `'first'`. */
5
+ variant?: CarouselDialogVariant;
6
+ /** Total number of slides, used to render the dot `ListIndicator`. Defaults to `1`. */
7
+ slideCount?: number;
8
+ /** The currently active slide index (0-based). Defaults to `0`. */
9
+ selectedIndex?: number;
10
+ /** Fires when a dot is activated, with the dot's slide index. */
11
+ onSelectIndex?: (index: number) => void;
12
+ /** Fires when `Back` (hidden on `variant="first"`) is activated. */
13
+ onBack?: () => void;
14
+ /** Fires when `Next` (`variant="first" | "middle"`) is activated. */
15
+ onNext?: () => void;
16
+ /** Fires when the call-to-action button (`variant="last"`) is activated. */
17
+ onPrimaryAction?: () => void;
18
+ /** `Back` button label. Defaults to `'Back'`. */
19
+ backLabel?: string;
20
+ /** `Next` button label (`variant="first" | "middle"`). Defaults to `'Next'`. */
21
+ nextLabel?: string;
22
+ /** Call-to-action button label (`variant="last"`). Defaults to `'Call to action'`. */
23
+ primaryLabel?: string;
24
+ /** Builds each dot's accessible name from its 0-based index and the slide count. */
25
+ goToSlideLabel?: (index: number, count: number) => string;
26
+ }
27
+ declare const CarouselDialog: React.ForwardRefExoticComponent<CarouselDialogProps & React.RefAttributes<HTMLDivElement>>;
28
+ export { CarouselDialog };
@@ -0,0 +1 @@
1
+ export { CarouselDialog, type CarouselDialogProps, type CarouselDialogVariant, } from './carousel-dialog';
@@ -0,0 +1,51 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { ChartConfig } from '../chart';
3
+ import * as React from 'react';
4
+ declare const categoryBarVariants: (props?: ({
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface CategoryBarSegment {
8
+ /** Key into `config` for this segment's label + color. */
9
+ key: string;
10
+ /** The segment's value — its width is this over the sum of all values. */
11
+ value: number;
12
+ }
13
+ /** The resolved segment passed to a custom `tooltipContent` renderer. */
14
+ export interface CategoryBarTooltipContext extends CategoryBarSegment {
15
+ /** Resolved `config` label (falls back to the key); may be any `ReactNode`. */
16
+ label: React.ReactNode;
17
+ /** Share of the total as a rounded percentage (0–100). */
18
+ percent: number;
19
+ /**
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.
23
+ */
24
+ color: string;
25
+ }
26
+ export interface CategoryBarProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof categoryBarVariants> {
27
+ /** Ordered segments (left → right). Widths are proportional to `value`. */
28
+ data: ReadonlyArray<CategoryBarSegment>;
29
+ /** Maps each segment `key` to a `label` and `color` (an existing `--ui-*` token). */
30
+ config: ChartConfig;
31
+ /** Show the legend below the bar (color dot + label + value + %). */
32
+ showLegend?: boolean;
33
+ /** Show a hover tooltip per segment (dot + label + value + %). */
34
+ showTooltip?: boolean;
35
+ /**
36
+ * Custom tooltip content per segment — replaces the default (dot + label +
37
+ * `value · %`) inside the same card. Ignored when `showTooltip` is false.
38
+ */
39
+ tooltipContent?: (segment: CategoryBarTooltipContext) => React.ReactNode;
40
+ /** Format the numeric value (legend + tooltip). Defaults to `toLocaleString()`. */
41
+ valueFormatter?: (value: number) => string;
42
+ /** Render the tooltip for this segment index initially open (VR/testing). */
43
+ defaultOpenIndex?: number;
44
+ /**
45
+ * Accessible summary of the whole bar. Defaults to a `label value` list built
46
+ * from the data; pass a fuller sentence for screen readers if you have one.
47
+ */
48
+ 'aria-label'?: string;
49
+ }
50
+ declare const CategoryBar: React.ForwardRefExoticComponent<Omit<CategoryBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
51
+ export { CategoryBar, categoryBarVariants };
@@ -0,0 +1 @@
1
+ export { CategoryBar, categoryBarVariants, type CategoryBarProps, type CategoryBarSegment, type CategoryBarTooltipContext, } from './category-bar';
@@ -0,0 +1,111 @@
1
+ import { AxisDomainItem } from 'recharts';
2
+ import { ChartTooltipContentType } from './chart';
3
+ /** A recharts-compatible tick formatter: `(value, index) => label`. */
4
+ export type TickFormatter = (value: number | string, index?: number) => string;
5
+ /**
6
+ * Props shared by every cartesian chart (Bar, Line, Area, Composed, Scatter,
7
+ * ConfidenceCone, Histogram) — chrome toggles, axis titles/units, tick
8
+ * formatting/visibility, and grid trim. All optional. `showLegend` and `xUnit`
9
+ * are deliberately *not* here: `showLegend` doesn't apply to `Histogram` and
10
+ * `xUnit` only to charts with a numeric X axis, so they stay per-component.
11
+ */
12
+ export interface CartesianChartProps {
13
+ /** Render the CartesianGrid. Defaults to `true`. */
14
+ showGrid?: boolean;
15
+ /** Render the hover tooltip. Defaults to `true`. */
16
+ showTooltip?: boolean;
17
+ /**
18
+ * Replace the default tooltip. Pass a configured `ChartTooltipContent` (from
19
+ * this library) — e.g. with a `formatter` / `labelFormatter` — to customize it
20
+ * without composing recharts yourself. Ignored when `showTooltip` is false.
21
+ */
22
+ tooltipContent?: ChartTooltipContentType;
23
+ /** Title rendered beneath the X axis. */
24
+ xAxisLabel?: string;
25
+ /** Title rendered beside the Y axis (rotated). */
26
+ yAxisLabel?: string;
27
+ /**
28
+ * Unit suffix appended to the Y axis's tick values (recharts `unit`) — applies
29
+ * when the Y axis is the numeric one. `BarChart` with
30
+ * `orientation="horizontal"` puts the values on X instead; use `xUnit` there.
31
+ */
32
+ yUnit?: string;
33
+ /** Show the X axis (its ticks + title). Defaults to `true`. */
34
+ showXAxis?: boolean;
35
+ /** Show the Y axis (its ticks + title). Defaults to `true`. */
36
+ showYAxis?: boolean;
37
+ /** Format each X-axis tick value — e.g. `formatCompactNumber` or a `createTickFormatter(...)`. */
38
+ xTickFormatter?: TickFormatter;
39
+ /** Format each Y-axis tick value — e.g. `formatCompactNumber` or a `createTickFormatter(...)`. */
40
+ yTickFormatter?: TickFormatter;
41
+ /**
42
+ * Rotate the X-axis tick labels by this many degrees. A negative angle (e.g.
43
+ * `-45`) tilts them up toward the right; the tick anchor + axis height adjust
44
+ * to keep long labels readable.
45
+ */
46
+ xAxisAngle?: number;
47
+ /**
48
+ * X-axis tick density — a recharts placement strategy, or a fixed number of
49
+ * ticks to *skip* between two rendered ones (recharts `interval`: `0` shows
50
+ * every tick, `1` every other one, `2` every third, …).
51
+ */
52
+ xAxisInterval?: number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart';
53
+ /**
54
+ * Desired number of ticks on the value axis (recharts `tickCount`; a hint, not
55
+ * exact). Applies to whichever axis holds the values — Y for most charts, X for
56
+ * `BarChart` with `orientation="horizontal"`.
57
+ */
58
+ yAxisTickCount?: number;
59
+ /**
60
+ * Value-axis domain preset. Applies to whichever axis holds the values — Y for
61
+ * most charts, X for `BarChart` with `orientation="horizontal"`.
62
+ *
63
+ * - `auto` — fit the data at both ends; the axis need not include 0.
64
+ * - `zero` — anchor the axis at 0. This is also recharts' behavior when the
65
+ * prop is omitted, so it's the explicit form of the default.
66
+ * - `dataMin-dataMax` — tight to the data, with no padding.
67
+ */
68
+ yAxisDomain?: 'auto' | 'dataMin-dataMax' | 'zero';
69
+ /** Draw grid lines dashed instead of solid. */
70
+ gridDashed?: boolean;
71
+ /** Show horizontal grid lines. Defaults to each chart's own default when unset. */
72
+ gridHorizontal?: boolean;
73
+ /** Show vertical grid lines. Defaults to each chart's own default when unset. */
74
+ gridVertical?: boolean;
75
+ }
76
+ /**
77
+ * Map a `yAxisDomain` preset to a recharts `domain`. Shared by all 7 cartesian
78
+ * charts, and applied to whichever axis holds the values (X for horizontal bars).
79
+ *
80
+ * `undefined` (no preset) is left to recharts, whose default is `[0, 'auto']` —
81
+ * i.e. already zero-anchored. That's why `auto` has to be spelled out as
82
+ * `['auto', 'auto']`: passing `undefined` for it would silently anchor at 0 and
83
+ * make the preset indistinguishable from `zero`.
84
+ */
85
+ export declare function resolveAxisDomain(preset: 'auto' | 'dataMin-dataMax' | 'zero' | undefined): Readonly<[AxisDomainItem, AxisDomainItem]> | undefined;
86
+ /**
87
+ * Compact thousands/millions: `1234 → "1.2K"`, `1_500_000 → "1.5M"`. Non-numeric
88
+ * values (including blank strings) pass through unchanged. Use for large-count
89
+ * axes (revenue, users, …).
90
+ *
91
+ * Formats in `en`. For another locale use
92
+ * `createTickFormatter({ notation: 'compact', maximumFractionDigits: 1 }, locale)`.
93
+ */
94
+ export declare const formatCompactNumber: TickFormatter;
95
+ /**
96
+ * Append a percent sign to an already-scaled value: `41.8 → "41.8%"`. (The value
97
+ * is treated as a percentage, not a 0–1 fraction.) Non-numeric values (including
98
+ * blank strings) pass through.
99
+ *
100
+ * Appends a bare `%`, which is not how every locale writes it. For locale-correct
101
+ * output on values that really are fractions, use
102
+ * `createTickFormatter({ style: 'percent' }, locale)`.
103
+ */
104
+ export declare const formatPercent: TickFormatter;
105
+ /**
106
+ * Build a tick formatter from `Intl.NumberFormat` options — the escape hatch for
107
+ * currency, fixed decimals, or a specific locale. E.g.
108
+ * `createTickFormatter({ style: 'currency', currency: 'USD', notation: 'compact' })`
109
+ * → `146500 → "$147K"`. Non-numeric values pass through unchanged.
110
+ */
111
+ export declare function createTickFormatter(options: Intl.NumberFormatOptions, locale?: string): TickFormatter;
@@ -49,6 +49,8 @@ declare const ChartStyle: ({ id, config }: {
49
49
  config: ChartConfig;
50
50
  }) => import("react/jsx-runtime").JSX.Element | null;
51
51
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
52
+ /** The `content` a caller passes to override the default tooltip (recharts' `Tooltip['content']`). */
53
+ export type ChartTooltipContentType = React.ComponentProps<typeof ChartTooltip>['content'];
52
54
  declare function ChartTooltipContent({ active, payload, label, className, indicator, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
53
55
  declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
54
56
  declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,4 @@
1
1
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, } from './chart';
2
- export type { ChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, } from './chart';
2
+ export type { ChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
3
+ export { formatCompactNumber, formatPercent, createTickFormatter, resolveAxisDomain, } from './chart-format';
4
+ export type { TickFormatter, CartesianChartProps } from './chart-format';
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig } from '../chart';
1
+ import { ChartConfig, CartesianChartProps } from '../chart';
2
2
  import * as React from 'react';
3
3
  export type ComposedSeriesType = 'bar' | 'line' | 'area';
4
4
  export interface ComposedSeries {
@@ -7,7 +7,7 @@ export interface ComposedSeries {
7
7
  /** How this series renders. */
8
8
  type: ComposedSeriesType;
9
9
  }
10
- export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'children'> {
10
+ export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps {
11
11
  /** Row-per-category data. Each object holds `xKey` + one numeric field per series. */
12
12
  data: ReadonlyArray<Record<string, string | number>>;
13
13
  /**
@@ -21,28 +21,13 @@ export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'c
21
21
  series: ComposedSeries[];
22
22
  /** Category axis key (the shared dimension across rows, e.g. `"month"`). */
23
23
  xKey: string;
24
- /** Title rendered beneath the horizontal (X) axis. */
25
- xAxisLabel?: string;
26
- /** Title rendered beside the vertical (Y) axis (rotated). */
27
- yAxisLabel?: string;
28
- /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */
29
- yUnit?: string;
30
24
  /** Interpolation for the line and area series. */
31
25
  curve?: 'linear' | 'monotone' | 'step';
32
26
  /** Corner radius on the growing end of bar series. */
33
27
  barRadius?: number;
34
28
  /** Flat-fill opacity for area series. */
35
29
  fillOpacity?: number;
36
- showGrid?: boolean;
37
- showTooltip?: boolean;
38
30
  showLegend?: boolean;
39
- /**
40
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
41
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /
42
- * `indicator` — to customize formatting, per-series rows, or extra fields
43
- * without composing recharts yourself. Ignored when `showTooltip` is false.
44
- */
45
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
46
31
  }
47
32
  declare const ComposedChart: React.ForwardRefExoticComponent<Omit<ComposedChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
48
33
  export { ComposedChart };
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig } from '../chart';
1
+ import { ChartTooltip, ChartConfig, CartesianChartProps } from '../chart';
2
2
  import * as React from 'react';
3
3
  /**
4
4
  * Drop the synthetic cone-band range series from a recharts tooltip/legend
@@ -22,7 +22,7 @@ type TooltipContentType = NonNullable<React.ComponentProps<typeof ChartTooltip>[
22
22
  type TooltipContentFn = Extract<TooltipContentType, (...args: never[]) => unknown>;
23
23
  type TooltipRenderProps = Parameters<TooltipContentFn>[0];
24
24
  export declare function createConeTooltip(tooltipContent: TooltipContentType): (props: TooltipRenderProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.FunctionComponentElement<import('recharts').TooltipContentProps<import('recharts').TooltipValueType, import('recharts/types/component/DefaultTooltipContent').NameType>>;
25
- export interface ConfidenceConeProps extends Omit<React.ComponentProps<'div'>, 'children'> {
25
+ export interface ConfidenceConeProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps {
26
26
  /**
27
27
  * Row-per-point data — the shared x dimension plus the actual / forecast /
28
28
  * bound fields. Rows are naturally sparse (a point has either an actual or a
@@ -48,12 +48,6 @@ export interface ConfidenceConeProps extends Omit<React.ComponentProps<'div'>, '
48
48
  lowerKey: string;
49
49
  /** Field for the cone's upper bound. */
50
50
  upperKey: string;
51
- /** Title rendered beneath the horizontal (X) axis. */
52
- xAxisLabel?: string;
53
- /** Title rendered beside the vertical (Y) axis (rotated). */
54
- yAxisLabel?: string;
55
- /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */
56
- yUnit?: string;
57
51
  /** Stroke width of the actual + forecast lines. */
58
52
  strokeWidth?: number;
59
53
  /**
@@ -62,18 +56,7 @@ export interface ConfidenceConeProps extends Omit<React.ComponentProps<'div'>, '
62
56
  * band over the forecast region.
63
57
  */
64
58
  showForecastRegion?: boolean;
65
- showGrid?: boolean;
66
- showTooltip?: boolean;
67
59
  showLegend?: boolean;
68
- /**
69
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
70
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
71
- * to customize the tooltip without composing recharts yourself. The synthetic
72
- * cone band is filtered out of the payload before your tooltip sees it, so a
73
- * `__cone` item never reaches your formatter. Ignored when `showTooltip` is
74
- * false.
75
- */
76
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
77
60
  }
78
61
  declare const ConfidenceCone: React.ForwardRefExoticComponent<Omit<ConfidenceConeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
79
62
  export { ConfidenceCone };
@@ -0,0 +1,9 @@
1
+ import { CarouselDialogProps } from '../carousel-dialog';
2
+ import * as React from 'react';
3
+ export type DialogFooterCarouselVariant = 'start' | 'middle' | 'end';
4
+ export interface DialogFooterCarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, Pick<CarouselDialogProps, 'slideCount' | 'selectedIndex' | 'onSelectIndex' | 'onBack' | 'onNext' | 'onPrimaryAction' | 'backLabel' | 'nextLabel' | 'primaryLabel' | 'goToSlideLabel'> {
5
+ /** Which slide position this renders for. Defaults to `'start'`. */
6
+ variant?: DialogFooterCarouselVariant;
7
+ }
8
+ declare const DialogFooterCarousel: React.ForwardRefExoticComponent<DialogFooterCarouselProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { DialogFooterCarousel };
@@ -0,0 +1 @@
1
+ export { DialogFooterCarousel, type DialogFooterCarouselProps, type DialogFooterCarouselVariant, } from './dialog-footer-carousel';
@@ -0,0 +1,54 @@
1
+ import { DialogContentProps, DialogRoot } from '../dialog';
2
+ import * as React from 'react';
3
+ export interface DialogWelcomeSlide {
4
+ /** Illustration/media for the slide. Falls back to a placeholder surface when omitted. */
5
+ image?: React.ReactNode;
6
+ title: string;
7
+ description: string;
8
+ }
9
+ export type DialogWelcomeVariant = 'carousel' | 'single';
10
+ type DialogRootProps = React.ComponentPropsWithoutRef<typeof DialogRoot>;
11
+ export interface DialogWelcomeProps extends Omit<DialogRootProps, 'children'> {
12
+ /** Selects the Figma-defined layout. Defaults to `'carousel'`. */
13
+ variant?: DialogWelcomeVariant;
14
+ /** Slides shown one at a time (`variant="carousel"`). Defaults to a 3-slide placeholder. */
15
+ slides?: DialogWelcomeSlide[];
16
+ /** Controls the active slide (`variant="carousel"`). Uncontrolled when omitted. */
17
+ selectedIndex?: number;
18
+ /** Fires whenever the active slide changes (`variant="carousel"`). */
19
+ onSelectedIndexChange?: (index: number) => void;
20
+ /** `Back` button label (`variant="carousel"`). Defaults to `'Back'`. */
21
+ backLabel?: string;
22
+ /** `Next` button label (`variant="carousel"`). Defaults to `'Next'`. */
23
+ nextLabel?: string;
24
+ /** Builds each carousel dot's accessible name (`variant="carousel"`). */
25
+ goToSlideLabel?: (index: number, count: number) => string;
26
+ /** Illustration/media (`variant="single"`). */
27
+ image?: React.ReactNode;
28
+ /** Title (`variant="single"`). Defaults to `'Title'`. */
29
+ title?: string;
30
+ /** Description (`variant="single"`). Defaults to `'Feature description.'`. */
31
+ description?: string;
32
+ /** `Close` link label (`variant="single"`). Defaults to `'Close'`. */
33
+ closeLabel?: string;
34
+ /** Fires when `Close` (`variant="single"`) is activated, before the dialog closes. */
35
+ onCloseAction?: () => void;
36
+ /**
37
+ * Call-to-action button label — the last carousel slide's button
38
+ * (`variant="carousel"`) or the single body's primary button
39
+ * (`variant="single"`). Defaults to `'Call to action'`.
40
+ */
41
+ primaryLabel?: string;
42
+ /** Fires when the call-to-action button is activated. */
43
+ onPrimaryAction?: () => void;
44
+ /** Render inside a portal (forwarded to `DialogContent`). Defaults to `true`. */
45
+ portal?: boolean;
46
+ /** Portal container (forwarded to `DialogContent`). */
47
+ portalContainer?: DialogContentProps['portalContainer'];
48
+ /** Keep the content mounted while closed (forwarded to `DialogContent`). */
49
+ keepMounted?: DialogContentProps['keepMounted'];
50
+ /** Extra classes merged onto the popup container. */
51
+ className?: string;
52
+ }
53
+ declare const DialogWelcome: React.ForwardRefExoticComponent<DialogWelcomeProps & React.RefAttributes<HTMLDivElement>>;
54
+ export { DialogWelcome };
@@ -0,0 +1,55 @@
1
+ /** Props for `DialogWelcome` — the onboarding/announcement dialog recipe. */
2
+ export interface DialogWelcomeProps {
3
+ /** Selects the Figma-defined layout. Defaults to `'carousel'`. */
4
+ variant?: 'carousel' | 'single';
5
+ /** Slides shown one at a time (`variant="carousel"`). Defaults to a 3-slide placeholder. */
6
+ slides?: Array<{
7
+ image?: unknown;
8
+ title: string;
9
+ description: string;
10
+ }>;
11
+ /** Controls the active slide (`variant="carousel"`). Uncontrolled when omitted. */
12
+ selectedIndex?: number;
13
+ /** Fires whenever the active slide changes (`variant="carousel"`). */
14
+ onSelectedIndexChange?: (index: number) => void;
15
+ /** `Back` button label (`variant="carousel"`). Defaults to `'Back'`. */
16
+ backLabel?: string;
17
+ /** `Next` button label (`variant="carousel"`). Defaults to `'Next'`. */
18
+ nextLabel?: string;
19
+ /** Builds each carousel dot's accessible name (`variant="carousel"`). */
20
+ goToSlideLabel?: (index: number, count: number) => string;
21
+ /** Illustration/media (`variant="single"`). */
22
+ image?: unknown;
23
+ /** Title (`variant="single"`). Defaults to `'Title'`. */
24
+ title?: string;
25
+ /** Description (`variant="single"`). Defaults to `'Feature description.'`. */
26
+ description?: string;
27
+ /** `Close` link label (`variant="single"`). Defaults to `'Close'`. */
28
+ closeLabel?: string;
29
+ /** Fires when `Close` (`variant="single"`) is activated, before the dialog closes. */
30
+ onCloseAction?: () => void;
31
+ /**
32
+ * Call-to-action button label — the last carousel slide's button
33
+ * (`variant="carousel"`) or the single body's primary button
34
+ * (`variant="single"`). Defaults to `'Call to action'`.
35
+ */
36
+ primaryLabel?: string;
37
+ /** Fires when the call-to-action button is activated. */
38
+ onPrimaryAction?: () => void;
39
+ /** Render inside a portal (forwarded to `DialogContent`). Defaults to `true`. */
40
+ portal?: boolean;
41
+ /** Portal container (forwarded to `DialogContent`). */
42
+ portalContainer?: HTMLElement | null;
43
+ /** Keep the content mounted while closed (forwarded to `DialogContent`). */
44
+ keepMounted?: boolean;
45
+ /** Extra classes merged onto the popup container. */
46
+ className?: string;
47
+ /** Controlled open state. Pair with `onOpenChange`. */
48
+ open?: boolean;
49
+ /** Open on mount, uncontrolled. */
50
+ defaultOpen?: boolean;
51
+ /** Modal behavior — focus trap and scroll lock while open. Defaults to `true`. */
52
+ modal?: boolean | 'trap-focus';
53
+ /** Fires when the dialog opens or closes. */
54
+ onOpenChange?: (open: boolean, eventDetails: unknown) => void;
55
+ }
@@ -0,0 +1 @@
1
+ export { DialogWelcome, type DialogWelcomeProps, type DialogWelcomeSlide, type DialogWelcomeVariant, } from './dialog-welcome';
@@ -1,4 +1,4 @@
1
- import { ChartTooltip, ChartConfig } from '../chart';
1
+ import { ChartConfig, CartesianChartProps } from '../chart';
2
2
  import * as React from 'react';
3
3
  export interface HistogramBin {
4
4
  /** Lower bound of the bin (inclusive). */
@@ -18,7 +18,7 @@ export interface HistogramBin {
18
18
  * the package's public API.
19
19
  */
20
20
  export declare function computeHistogramBins(values: ReadonlyArray<number>, binCount: number, domain?: [number, number]): HistogramBin[];
21
- export interface HistogramProps extends Omit<React.ComponentProps<'div'>, 'children'> {
21
+ export interface HistogramProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps {
22
22
  /** Raw continuous samples to bin (non-finite values are ignored). */
23
23
  values: ReadonlyArray<number>;
24
24
  /**
@@ -33,23 +33,8 @@ export interface HistogramProps extends Omit<React.ComponentProps<'div'>, 'child
33
33
  binCount?: number;
34
34
  /** Fix the binning range instead of deriving it from the data's min/max. */
35
35
  domain?: [number, number];
36
- /** Title rendered beneath the horizontal (X) axis. */
37
- xAxisLabel?: string;
38
- /** Title rendered beside the vertical (Y) axis (rotated). */
39
- yAxisLabel?: string;
40
- /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is the bin label). */
41
- yUnit?: string;
42
36
  /** Corner radius on the top of each bar. */
43
37
  barRadius?: number;
44
- showGrid?: boolean;
45
- showTooltip?: boolean;
46
- /**
47
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
48
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
49
- * to customize the tooltip without composing recharts yourself. Ignored when
50
- * `showTooltip` is false.
51
- */
52
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
53
38
  }
54
39
  declare const Histogram: React.ForwardRefExoticComponent<Omit<HistogramProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
40
  export { Histogram };
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { ChartTooltip, ChartConfig } from '../chart';
2
+ import { ChartTooltip, ChartConfig, CartesianChartProps } from '../chart';
3
3
  import * as React from 'react';
4
4
  declare const lineChartVariants: (props?: ({
5
5
  curve?: "step" | "linear" | "monotone" | null | undefined;
@@ -27,7 +27,7 @@ type TooltipRenderProps = Parameters<TooltipContentFn>[0];
27
27
  * component is a stable content type (memoize it on `tooltipContent`).
28
28
  */
29
29
  export declare function createBandStrippedTooltip(tooltipContent: TooltipContentType): (props: TooltipRenderProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.FunctionComponentElement<import('recharts').TooltipContentProps<import('recharts').TooltipValueType, import('recharts/types/component/DefaultTooltipContent').NameType>>;
30
- export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof lineChartVariants> {
30
+ export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof lineChartVariants>, CartesianChartProps {
31
31
  /** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the line unless `connectNulls`). */
32
32
  data: ReadonlyArray<Record<string, string | number | null>>;
33
33
  /**
@@ -56,28 +56,13 @@ export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'child
56
56
  deltaBands?: Array<[string, string]>;
57
57
  /** Category axis key (the shared dimension across rows, e.g. `"month"`). */
58
58
  xKey: string;
59
- /** Title rendered beneath the horizontal (X) axis. */
60
- xAxisLabel?: string;
61
- /** Title rendered beside the vertical (Y) axis (rotated). */
62
- yAxisLabel?: string;
63
- /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */
64
- yUnit?: string;
65
59
  /** Stroke width of each line. */
66
60
  strokeWidth?: number;
67
61
  /** Render a dot at each data point. */
68
62
  showDots?: boolean;
69
63
  /** Bridge `null` gaps in the data instead of breaking the line. */
70
64
  connectNulls?: boolean;
71
- showGrid?: boolean;
72
- showTooltip?: boolean;
73
65
  showLegend?: boolean;
74
- /**
75
- * Replace the default tooltip. Pass a configured `ChartTooltipContent`
76
- * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /
77
- * `indicator` — to customize formatting, per-series rows, or extra fields
78
- * without composing recharts yourself. Ignored when `showTooltip` is false.
79
- */
80
- tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
81
66
  }
82
67
  declare const LineChart: React.ForwardRefExoticComponent<Omit<LineChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
83
68
  export { LineChart, lineChartVariants };
@@ -0,0 +1,2 @@
1
+ export { SankeyChart } from './sankey-chart';
2
+ export type { SankeyChartProps, SankeyChartNode, SankeyChartLink, } from './sankey-chart';