@acronis-platform/ui-react 5.0.0 → 5.1.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 (65) hide show
  1. package/dist/components/ui/area-chart/area-chart.js +191 -85
  2. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  3. package/dist/components/ui/bar-chart/bar-chart.js +288 -225
  4. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  5. package/dist/components/ui/card-widget-carousel/card-widget-carousel.js +85 -0
  6. package/dist/components/ui/card-widget-carousel/card-widget-carousel.js.map +1 -0
  7. package/dist/components/ui/card-widget-carousel/card-widget.js +82 -0
  8. package/dist/components/ui/card-widget-carousel/card-widget.js.map +1 -0
  9. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  10. package/dist/components/ui/chart/chart-format.js +25 -22
  11. package/dist/components/ui/chart/chart-format.js.map +1 -1
  12. package/dist/components/ui/chart/chart-palette.js +9 -8
  13. package/dist/components/ui/chart/chart-palette.js.map +1 -1
  14. package/dist/components/ui/chart/chart.js +118 -83
  15. package/dist/components/ui/chart/chart.js.map +1 -1
  16. package/dist/components/ui/line-chart/line-chart.js +194 -86
  17. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  18. package/dist/components/ui/scatter-chart/scatter-chart.js +5 -2
  19. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  20. package/dist/components/ui/separator/separator.js +52 -10
  21. package/dist/components/ui/separator/separator.js.map +1 -1
  22. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +144 -121
  23. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  24. package/dist/components/ui/tree-item/tree-item.js +67 -0
  25. package/dist/components/ui/tree-item/tree-item.js.map +1 -0
  26. package/dist/components/ui/treemap/treemap.js +73 -66
  27. package/dist/components/ui/treemap/treemap.js.map +1 -1
  28. package/dist/index.js +109 -107
  29. package/dist/llms/area-chart.md +2 -1
  30. package/dist/llms/bar-chart.md +132 -33
  31. package/dist/llms/card-widget-carousel.md +252 -0
  32. package/dist/llms/category-bar.md +2 -2
  33. package/dist/llms/line-chart.md +2 -1
  34. package/dist/llms/metric.md +10 -5
  35. package/dist/llms/scatter-chart.md +2 -1
  36. package/dist/llms/separator.md +27 -8
  37. package/dist/llms/sidebar-secondary.md +235 -4
  38. package/dist/llms/tree-item.md +359 -0
  39. package/dist/llms/treemap.md +47 -36
  40. package/dist/llms.txt +4 -3
  41. package/dist/react.js +109 -107
  42. package/dist/src/components/ui/area-chart/area-chart.d.ts +10 -0
  43. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +75 -10
  44. package/dist/src/components/ui/bar-chart/bar-chart.docs.d.ts +146 -0
  45. package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
  46. package/dist/src/components/ui/card-widget-carousel/card-widget-carousel.d.ts +9 -0
  47. package/dist/src/components/ui/card-widget-carousel/card-widget.d.ts +43 -0
  48. package/dist/src/components/ui/card-widget-carousel/index.d.ts +2 -0
  49. package/dist/src/components/ui/chart/chart-format.d.ts +9 -1
  50. package/dist/src/components/ui/chart/chart-palette.d.ts +38 -10
  51. package/dist/src/components/ui/chart/index.d.ts +2 -2
  52. package/dist/src/components/ui/line-chart/line-chart.d.ts +11 -1
  53. package/dist/src/components/ui/separator/separator.d.ts +9 -1
  54. package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +23 -3
  55. package/dist/src/components/ui/tree-item/index.d.ts +1 -0
  56. package/dist/src/components/ui/tree-item/tree-item.d.ts +64 -0
  57. package/dist/src/components/ui/treemap/treemap.d.ts +16 -5
  58. package/dist/src/index.d.ts +2 -1
  59. package/dist/ui-react.css +1 -1
  60. package/package.json +3 -3
  61. package/dist/components/ui/meter/meter.js +0 -79
  62. package/dist/components/ui/meter/meter.js.map +0 -1
  63. package/dist/llms/meter.md +0 -177
  64. package/dist/src/components/ui/meter/index.d.ts +0 -1
  65. package/dist/src/components/ui/meter/meter.d.ts +0 -25
@@ -0,0 +1,146 @@
1
+ import type * as React from 'react';
2
+ type BarChartBarShape = 'rounded' | 'pill' | 'gradient' | 'pattern';
3
+ type CartesianLabelPosition = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'insideTop' | 'insideBottom' | 'insideLeft' | 'insideRight' | 'insideStart' | 'insideEnd';
4
+ export interface BarChartItem {
5
+ /** Row label, shown at the start of the row. */
6
+ label: string;
7
+ /** The value this row represents. */
8
+ value: number;
9
+ /** Fill color — any CSS color; prefer an existing `--ui-*` token. Required when no `palette` is passed to the chart. */
10
+ color?: string;
11
+ /** Palette tone for this row. Resolved against the `palette` prop on the enclosing `BarChart`. */
12
+ tone?: {
13
+ status: 'success' | 'warning' | 'danger' | 'info' | 'neutral';
14
+ };
15
+ /** Projected/forecast total. When greater than `value`, renders a translucent bar (30% opacity) extending from `value` to `forecast`. */
16
+ forecast?: number;
17
+ }
18
+ export interface BarChartVerticalProps {
19
+ /** Selects the recharts bar chart. Omit it — this is the default. */
20
+ orientation?: 'vertical';
21
+ /** Row-per-category data. Each object holds the category key + one numeric field per series. */
22
+ data: ReadonlyArray<Record<string, string | number>>;
23
+ /** Per-series map of `label` / `icon` / `tone`. */
24
+ config: Record<string, {
25
+ label: string;
26
+ icon?: React.ComponentType;
27
+ color?: string;
28
+ tone?: string;
29
+ }>;
30
+ /** Series to plot — one `<Bar>` per key. Each must exist in `config` and in every data row. */
31
+ dataKeys: string[];
32
+ /** Category axis key (the shared dimension across rows, e.g. `"month"`). */
33
+ xKey: string;
34
+ /** Dataviz palette for series colors. Series that state no `color` of their own take a stop from it. */
35
+ palette?: string;
36
+ /** `"grouped"` (side-by-side, default) or `"stacked"` (summed into one column). */
37
+ layout?: 'grouped' | 'stacked';
38
+ /** One or more dashed reference/average lines on the value (Y) axis. */
39
+ referenceLine?: object | object[];
40
+ /** One or more shaded bands behind a range of categories. */
41
+ referenceArea?: object | object[];
42
+ /** Per-series style override for a range of categories, keyed by `dataKeys` entry. */
43
+ barSettings?: Record<string, object>;
44
+ /** Corner radius applied to the growing end of each bar. */
45
+ barRadius?: number;
46
+ /** How every bar is painted. Per-range overrides come from `barSettings`. */
47
+ barShape?: BarChartBarShape;
48
+ /** Fixed bar thickness, in px. */
49
+ barSize?: number;
50
+ /** Upper bound on the computed bar thickness, in px. */
51
+ maxBarSize?: number;
52
+ /** Gap between bars of the same category, in px or a percentage string. */
53
+ barGap?: number | string;
54
+ /** Gap between category groups, in px or a percentage string. */
55
+ barCategoryGap?: number | string;
56
+ /** Minimum rendered length for a bar, in px, so a tiny value stays visible. */
57
+ minPointSize?: number;
58
+ /** Draw a full-height track behind every bar. */
59
+ showBackground?: boolean;
60
+ /** Fill for the track background. Defaults to the secondary surface. */
61
+ backgroundFill?: string;
62
+ /** Highlight the hovered bar. */
63
+ showActiveBar?: boolean;
64
+ /** Painting of the hovered bar. */
65
+ activeBar?: {
66
+ fill?: string;
67
+ opacity?: number;
68
+ };
69
+ /** Show the legend. */
70
+ showLegend?: boolean;
71
+ /** Position of the value labels when `showLabels` is on. */
72
+ labelPosition?: CartesianLabelPosition;
73
+ /** Render the CartesianGrid. Defaults to `true`. */
74
+ showGrid?: boolean;
75
+ /** Render the hover tooltip. Defaults to `true`. */
76
+ showTooltip?: boolean;
77
+ /** Replace the default tooltip content. */
78
+ tooltipContent?: React.ReactNode;
79
+ /** Title rendered beneath the X axis. */
80
+ xAxisLabel?: string;
81
+ /** Title rendered beside the Y axis (rotated). */
82
+ yAxisLabel?: string;
83
+ /** Unit suffix appended to the Y axis's tick values. */
84
+ yUnit?: string;
85
+ /** Show the X axis. Defaults to `true`. */
86
+ showXAxis?: boolean;
87
+ /** Show the Y axis. Defaults to `true`. */
88
+ showYAxis?: boolean;
89
+ /** Format each X-axis tick value. */
90
+ xTickFormatter?: (value: string | number, index: number) => string;
91
+ /** Format each Y-axis tick value. */
92
+ yTickFormatter?: (value: string | number, index: number) => string;
93
+ /** Rotate the X-axis tick labels by this many degrees. */
94
+ xAxisAngle?: number;
95
+ /** X-axis tick density. */
96
+ xAxisInterval?: number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart';
97
+ /** Desired number of ticks on the value axis. */
98
+ yAxisTickCount?: number;
99
+ /** Value-axis domain preset. */
100
+ yAxisDomain?: 'auto' | 'dataMin-dataMax' | 'zero';
101
+ /** Draw grid lines dashed instead of solid. Defaults to `true`. */
102
+ gridDashed?: boolean;
103
+ /** Show horizontal grid lines. */
104
+ gridHorizontal?: boolean;
105
+ /** Show vertical grid lines. */
106
+ gridVertical?: boolean;
107
+ /** Enable entrance animation. Defaults to `false`. */
108
+ animate?: boolean;
109
+ /** Animation duration in ms. */
110
+ animationDuration?: number;
111
+ /** Delay before the animation starts, in ms. */
112
+ animationBegin?: number;
113
+ /** Easing curve. */
114
+ animationEasing?: 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
115
+ /** Render a range brush beneath the chart. */
116
+ showBrush?: boolean;
117
+ /** Height of the brush strip in px. Defaults to 28. */
118
+ brushHeight?: number;
119
+ /** Accessible name for the brush's range handles. */
120
+ brushAriaLabel?: string;
121
+ /** Render a value label on each data point. Defaults to `false`. */
122
+ showLabels?: boolean;
123
+ /** Format each label value. */
124
+ labelFormatter?: (value: string | number, index: number) => string;
125
+ /** Additional CSS class names. */
126
+ className?: string;
127
+ }
128
+ export interface BarChartHorizontalProps {
129
+ /** Selects the labelled bar list. */
130
+ orientation: 'horizontal';
131
+ /** Rows to render — one labelled bar per item. */
132
+ items: BarChartItem[];
133
+ /** Upper bound the values are shares of. Defaults to the sum of every item's value. */
134
+ max?: number;
135
+ /** Format the numeric value in the label. Defaults to `toLocaleString()`. */
136
+ valueFormatter?: (value: number) => string;
137
+ /** Show the hover tooltip per row. On by default. */
138
+ showTooltip?: boolean;
139
+ /** Tooltip content shared by every row (replaces the default). */
140
+ tooltip?: React.ReactNode;
141
+ /** Dataviz palette to resolve each item's color from. Items should carry a `tone` when a palette is set. */
142
+ palette?: string;
143
+ /** Additional CSS class names. */
144
+ className?: string;
145
+ }
146
+ export {};
@@ -1 +1 @@
1
- export { BarChart, barChartVariants, type BarChartProps, type BarChartReferenceArea, type BarChartBarSettings, type BarChartBarShape, } from './bar-chart';
1
+ export { BarChart, barChartVariants, type BarChartProps, type BarChartVerticalProps, type BarChartHorizontalProps, type BarChartItem, type BarChartReferenceArea, type BarChartBarSettings, type BarChartBarShape, } from './bar-chart';
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface CardWidgetCarouselProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Accessible label for the Next chevron button. Defaults to `'Next'`. */
4
+ nextLabel?: string;
5
+ /** Accessible label for the Previous chevron button. Defaults to `'Previous'`. */
6
+ prevLabel?: string;
7
+ }
8
+ declare const CardWidgetCarousel: React.ForwardRefExoticComponent<CardWidgetCarouselProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { CardWidgetCarousel };
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ declare const statusBgToken: {
3
+ readonly danger: "var(--ui-background-status-danger)";
4
+ readonly warning: "var(--ui-background-status-warning)";
5
+ readonly info: "var(--ui-background-status-info)";
6
+ };
7
+ export type CardWidgetStatus = keyof typeof statusBgToken;
8
+ export interface CardWidgetProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ /** Semantic status — drives the icon-box background and icon glyph color. */
10
+ status?: CardWidgetStatus;
11
+ /** The 16 px icon placed inside the status-colored icon box. */
12
+ icon?: React.ReactNode;
13
+ /** Card header title (the widget/category name, e.g. "Phishing attacks"). */
14
+ header?: string;
15
+ /** Insight title in the body (14 px, semibold). Hidden while `skeleton` is true. */
16
+ title?: string;
17
+ /** Supporting description (12 px). Hidden while `skeleton` is true. */
18
+ description?: string;
19
+ /**
20
+ * Primary value / metric (24 px, semibold). Accepts a string or any node.
21
+ * Hidden while `skeleton` is true.
22
+ */
23
+ metric?: React.ReactNode;
24
+ /** Small caption beside the metric (12 px). Hidden while `skeleton` is true. */
25
+ caption?: string;
26
+ /**
27
+ * When true the body shows animated placeholder lines instead of
28
+ * `title` / `description` / `metric` / `caption`.
29
+ */
30
+ skeleton?: boolean;
31
+ /**
32
+ * Accessible label for the skeleton loading indicator (`aria-label`).
33
+ * Defaults to `'Loading'`. Localize when deploying in a non-English context.
34
+ */
35
+ loadingLabel?: string;
36
+ /**
37
+ * Content rendered in the card footer (action buttons). Omit the prop to
38
+ * hide the footer entirely.
39
+ */
40
+ footer?: React.ReactNode;
41
+ }
42
+ declare const CardWidget: React.ForwardRefExoticComponent<CardWidgetProps & React.RefAttributes<HTMLDivElement>>;
43
+ export { CardWidget };
@@ -0,0 +1,2 @@
1
+ export { CardWidgetCarousel, type CardWidgetCarouselProps } from './card-widget-carousel';
2
+ export { CardWidget, type CardWidgetProps, type CardWidgetStatus } from './card-widget';
@@ -26,7 +26,7 @@ export interface CartesianChartProps {
26
26
  yAxisLabel?: string;
27
27
  /**
28
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
29
+ * when the Y axis is the numeric one. `ComposedChart` with
30
30
  * `orientation="horizontal"` puts the values on X instead; use `xUnit` there.
31
31
  */
32
32
  yUnit?: string;
@@ -263,6 +263,14 @@ export interface ResolvedAnimation {
263
263
  * library has no other reduced-motion escape hatch.
264
264
  */
265
265
  export declare function resolveAnimation(props: ChartAnimationProps): ResolvedAnimation;
266
+ /**
267
+ * Remove synthetic `_proj_*` series entries from a recharts payload array so
268
+ * they don't appear in custom tooltip or legend content. Safe to call with
269
+ * `undefined` — returns `undefined` unchanged.
270
+ */
271
+ export declare function dropProjectionPayload<T extends {
272
+ dataKey?: unknown;
273
+ }>(payload: readonly T[] | undefined): T[] | undefined;
266
274
  /** Where a data label sits on a cartesian series (recharts `LabelList` position). */
267
275
  export type CartesianLabelPosition = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'insideTop' | 'insideBottom' | 'insideLeft' | 'insideRight' | 'insideStart' | 'insideEnd';
268
276
  /**
@@ -10,6 +10,8 @@ export type ChartDivergingPair = 'blue-orange' | 'teal-violet';
10
10
  * tier, not a typo here.
11
11
  */
12
12
  export type ChartStatusTone = 'danger' | 'critical' | 'warning' | 'success' | 'info' | 'neutral';
13
+ /** Which hue side of a diverging pair a series belongs to. */
14
+ export type ChartDivergingSide = 'a' | 'b';
13
15
  /** Which palette a chart's series are painted from. */
14
16
  export type ChartPalette = {
15
17
  type: 'categorical';
@@ -25,29 +27,40 @@ export type ChartPalette = {
25
27
  /**
26
28
  * How one series picks its color out of the active palette.
27
29
  *
28
- * Only the two palettes whose colors are independent of each other accept an
29
- * override:
30
+ * Three palettes accept a per-series override:
30
31
  *
31
32
  * - `categorical` — `{ slot }` picks one of the 16 hues.
32
- * - `status` — `{ status }` names a tone.
33
+ * - `status` — `{ status }` names a tone (required; there is no meaningful
34
+ * positional fallback for status colors).
35
+ * - `diverging` — `{ side: 'a' | 'b' }` pins the series to one hue family.
36
+ * All side-`a` series walk the a-hue stops (a3 → a2 → a1, strongest-first,
37
+ * wrapping past three). All side-`b` series walk the b-hue stops likewise.
38
+ * Un-sided series walk the default interleaved ramp (a3-b3-a2-b2-a1-b1),
39
+ * skipping any stop already claimed by a sided series. This assignment
40
+ * requires the full config, so it happens in `resolveChartColors`, not here.
33
41
  *
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
42
+ * `sequential` accepts no override: its stops are a ramp, meaningful only in
43
+ * relation to each other. An override passed under a non-matching palette is
39
44
  * ignored, with a dev warning.
40
45
  *
41
- * Neither form can express a color from outside the palette — that is the point.
46
+ * `{ sameAs: key }` is palette-agnostic: the series mirrors whatever color
47
+ * another series resolves to. Use it for a twin series that is the *same*
48
+ * metric drawn differently (a forecast tail, a projection band), where two
49
+ * distinct hues would read as two separate metrics. An aliased series doesn't
50
+ * consume a stop.
51
+ *
52
+ * No form can express a color from outside the active palette — that is the point.
42
53
  */
43
54
  export type ChartSeriesTone = {
44
55
  slot: number;
45
56
  status?: never;
46
57
  sameAs?: never;
58
+ side?: never;
47
59
  } | {
48
60
  slot?: never;
49
61
  status: ChartStatusTone;
50
62
  sameAs?: never;
63
+ side?: never;
51
64
  }
52
65
  /**
53
66
  * Paint whatever the series under this key paints, under any palette. For a
@@ -60,10 +73,25 @@ export type ChartSeriesTone = {
60
73
  slot?: never;
61
74
  status?: never;
62
75
  sameAs: string;
76
+ side?: never;
77
+ }
78
+ /**
79
+ * Diverging palette only. Pins this series to one of the two hue sides.
80
+ * `resolveChartColors` groups all series that share a side together and
81
+ * assigns them that side's three stops (strongest first, wrapping). Series
82
+ * that declare no side walk the default interleaved ramp.
83
+ *
84
+ * Under any palette other than `diverging`, this is ignored with a dev warning.
85
+ */
86
+ | {
87
+ slot?: never;
88
+ status?: never;
89
+ sameAs?: never;
90
+ side: ChartDivergingSide;
63
91
  };
64
92
  /** The 16 categorical hues, in the order the product's picker lists them. */
65
93
  export declare const CHART_CATEGORICAL_TOKENS: readonly string[];
66
- /** Each sequential ramp's eight stops, lightest (1) to darkest (8). */
94
+ /** Each sequential ramp's eight stops, darkest (8) to lightest (1). */
67
95
  export declare const CHART_SEQUENTIAL_TOKENS: Readonly<Record<ChartSequentialRamp, readonly string[]>>;
68
96
  /** Each diverging pair's six stops, one hue's strongest through to the other's. */
69
97
  export declare const CHART_DIVERGING_TOKENS: Readonly<Record<ChartDivergingPair, readonly string[]>>;
@@ -1,6 +1,6 @@
1
1
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, resolveChartColors, } from './chart';
2
2
  export type { ChartConfig, ResolvedChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, 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
- export type { ChartPalette, ChartSeriesTone, ChartSequentialRamp, ChartDivergingPair, ChartStatusTone, ResolveSeriesColorOptions, } from './chart-palette';
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
+ export type { ChartPalette, ChartSeriesTone, ChartSequentialRamp, ChartDivergingPair, ChartDivergingSide, ChartStatusTone, ResolveSeriesColorOptions, } from './chart-palette';
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';
6
6
  export type { TickFormatter, ChartCurveType, ChartReferenceLine, ChartReferenceLabelPosition, CartesianChartProps, ChartCategoryRange, ChartYAxisTarget, SecondaryYAxisProps, ChartAnimationProps, ChartAnimationEasing, ResolvedAnimation, ChartDataLabelProps, CartesianLabelPosition, PolarLabelPosition, ChartLabelPosition, ChartBrushProps, ResolvedBrush, } from './chart-format';
@@ -26,7 +26,7 @@ type TooltipRenderProps = Parameters<TooltipContentFn>[0];
26
26
  * function-form tooltip keeps its state across re-renders here too. The returned
27
27
  * component is a stable content type (memoize it on `tooltipContent`).
28
28
  */
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>>;
29
+ export declare function createBandStrippedTooltip(tooltipContent: TooltipContentType): (props: TooltipRenderProps) => import("react/jsx-runtime").JSX.Element;
30
30
  /**
31
31
  * Style override for one series, keyed by its `dataKeys` entry. Anything left
32
32
  * unset falls back to the chart-wide prop, so an entry only states what differs
@@ -113,6 +113,16 @@ export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'child
113
113
  * several at once.
114
114
  */
115
115
  referenceLine?: ChartReferenceLine | ChartReferenceLine[];
116
+ /**
117
+ * The category value (matching an `xKey` entry) at which the projection
118
+ * zone starts. Ticks from this point onward render in the disabled text
119
+ * color (`--ui-text-on-surface-disabled`). The chart data and series
120
+ * themselves are not affected — only the X-axis tick appearance changes.
121
+ *
122
+ * Use this when displaying a forecast/projection range where future
123
+ * data points should be visually de-emphasized on the axis.
124
+ */
125
+ projectionStart?: string | number;
116
126
  showLegend?: boolean;
117
127
  /** Position of the value labels when `showLabels` is on. Defaults to `top`. */
118
128
  labelPosition?: CartesianLabelPosition;
@@ -1,3 +1,11 @@
1
+ import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
2
+ import { VariantProps } from 'class-variance-authority';
1
3
  import * as React from 'react';
2
- declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const separatorVariants: (props?: ({
5
+ orientation?: "horizontal" | "vertical" | null | undefined;
6
+ size?: "S1" | "S2" | "S3" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive>, Pick<VariantProps<typeof separatorVariants>, 'size'> {
9
+ }
10
+ declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
3
11
  export { Separator };
@@ -8,6 +8,14 @@ export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'n
8
8
  defaultExpanded?: boolean;
9
9
  /** Fires when the expanded state changes (e.g. a consumer toggle). */
10
10
  onExpandedChange?: (expanded: boolean) => void;
11
+ /**
12
+ * Allow the user to collapse/expand the panel (resize-edge click, drag past
13
+ * the collapse threshold, keyboard, and the footer collapse trigger).
14
+ * When `false` those interactions never change `expanded` and the footer
15
+ * trigger renders `disabled`; dragging still resizes the panel, clamped to
16
+ * the minimum width. Defaults to `true`.
17
+ */
18
+ collapsible?: boolean;
11
19
  /**
12
20
  * Enable the draggable resize edge on the right border.
13
21
  * When `true`, the sidebar can be resized between the expanded-width token
@@ -20,9 +28,17 @@ export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'n
20
28
  onWidthChange?: (width: number) => void;
21
29
  /** Accessible label for the resize edge (`role="separator"`). Defaults to `'Resize sidebar'`. */
22
30
  resizeAriaLabel?: string;
23
- /** Tooltip content shown when the sidebar is expanded. Pass `null` to hide the tooltip entirely. */
31
+ /**
32
+ * Tooltip content shown when the sidebar is expanded. Pass `null` to hide
33
+ * the tooltip entirely. The default omits the "Collapse: Click" line when
34
+ * `collapsible` is `false`, since that gesture does nothing then.
35
+ */
24
36
  resizeTooltipExpanded?: React.ReactNode;
25
- /** Tooltip content shown when the sidebar is collapsed. Pass `null` to hide the tooltip entirely. */
37
+ /**
38
+ * Tooltip content shown when the sidebar is collapsed. Pass `null` to hide
39
+ * the tooltip entirely. When `collapsible` is `false` the default narrows to
40
+ * "Reset size: Double click" — the one gesture that still has an effect.
41
+ */
26
42
  resizeTooltipCollapsed?: React.ReactNode;
27
43
  /**
28
44
  * Replace the rendered `<nav>` with another element or component
@@ -105,7 +121,11 @@ declare const SidebarSecondaryMenuItemExtras: React.ForwardRefExoticComponent<Si
105
121
  export interface SidebarSecondaryCollapseTriggerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'children'> {
106
122
  /** Leading 16px icon (e.g. a panel-left glyph). Rotates 180° between expanded/collapsed — same as `SidebarPrimaryCollapseTrigger`. */
107
123
  icon?: React.ReactNode;
108
- /** Tooltip text shown when the sidebar is collapsed. Defaults to `'Expand'`. */
124
+ /**
125
+ * Tooltip text shown when the sidebar is collapsed. Defaults to `'Expand'`.
126
+ * Not shown when the panel is `collapsible={false}` — the trigger is
127
+ * disabled then, so the copy would advertise an action that can't run.
128
+ */
109
129
  expandTooltip?: React.ReactNode;
110
130
  /** Trailing extras (e.g. a keyboard shortcut hint), same slot as `SidebarSecondaryMenuItem`. */
111
131
  extras?: React.ReactNode;
@@ -0,0 +1 @@
1
+ export { TreeItem, type TreeItemProps } from './tree-item';
@@ -0,0 +1,64 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { Checkbox } from '../checkbox';
3
+ import * as React from 'react';
4
+ export interface TreeItemProps extends React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * The row's label. Rendered as the row's own text, so it is a prop with the
7
+ * literal only as its default (never inlined) — pass a localized string.
8
+ *
9
+ * Note this shadows the native `title` tooltip attribute on the underlying
10
+ * `<div>`: the Figma component names this property `title`, and it is the
11
+ * row's visible label, not a tooltip.
12
+ */
13
+ title?: string;
14
+ /** Show the leading icon slot. */
15
+ hasIcon?: boolean;
16
+ /**
17
+ * The leading icon. Only rendered when `hasIcon` is true; falls back to the
18
+ * design's `SquareDashedIcon` placeholder, which is what the Figma node shows.
19
+ */
20
+ icon?: React.ReactNode;
21
+ /** Show a leading `Checkbox`. */
22
+ hasCheckbox?: boolean;
23
+ /**
24
+ * Props forwarded verbatim to the leading `Checkbox` — this row holds no
25
+ * checked state of its own, so control it from here (`checked` /
26
+ * `onCheckedChange`) exactly as you would a standalone `Checkbox`. Defaults
27
+ * its `aria-label` to `title`, since the box renders without a visible label.
28
+ */
29
+ checkboxProps?: React.ComponentPropsWithoutRef<typeof Checkbox>;
30
+ /**
31
+ * Show the leading expand chevron. Purely a visual affordance: this row does
32
+ * not implement expand/collapse and renders no nested list — the consumer owns
33
+ * that state and composes the child rows.
34
+ */
35
+ isExpandable?: boolean;
36
+ /**
37
+ * Whether the row's nested list is currently expanded. Purely visual — like
38
+ * `isExpandable`, this row owns no expand/collapse state and renders no
39
+ * nested list. Rotates the leading chevron to reflect the state the consumer
40
+ * is already tracking (and should also be reflecting via `aria-expanded` on
41
+ * their own `render` target, e.g. `<li role="treeitem" aria-expanded={open}>`).
42
+ * Has no effect when `isExpandable` is false.
43
+ */
44
+ expanded?: boolean;
45
+ /** Render the trailing extras slot (`children`) at all. */
46
+ hasExtras?: boolean;
47
+ /**
48
+ * Whether the row is selected. Drives the persistent highlighted background —
49
+ * the same fill Figma's `state=active` swatch previews.
50
+ */
51
+ selected?: boolean;
52
+ /**
53
+ * Trailing extras — action buttons, a count badge. Only rendered when
54
+ * `hasExtras` is true.
55
+ */
56
+ children?: React.ReactNode;
57
+ /**
58
+ * Replace the rendered `<div>` with another element or component (Base UI
59
+ * composition) — e.g. the `<li role="treeitem">` of a real ARIA tree.
60
+ */
61
+ render?: useRender.RenderProp;
62
+ }
63
+ declare const TreeItem: React.ForwardRefExoticComponent<TreeItemProps & React.RefAttributes<HTMLDivElement>>;
64
+ export { TreeItem };
@@ -30,8 +30,20 @@ interface TreemapCellProps {
30
30
  secondaryLabel?: string;
31
31
  showLabels?: boolean;
32
32
  labelAlign?: TreemapLabelAlign;
33
+ /**
34
+ * How the leaf's fill relates to text contrast. Stamped by `Treemap` onto each
35
+ * row before recharts hands it to the cell renderer. Auto-computed from the
36
+ * resolved token name suffix:
37
+ *
38
+ * - `'dark'` — saturated/dark in both themes → always white text.
39
+ * - `'pale'` — pale in both themes → always dark text (via theme-adaptive token).
40
+ * - `'inverts'` — dark in light, pale in dark (sequential stops 7–8 whose
41
+ * `light-dark()` values mirror across themes) → white text in light, dark text
42
+ * in dark, achieved by a `light-dark()` color value in CSS.
43
+ */
44
+ fillTone?: 'dark' | 'pale' | 'inverts';
33
45
  }
34
- export declare function TreemapCell({ x, y, width, height, name, primaryLabel, secondaryLabel, showLabels, labelAlign, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function TreemapCell({ x, y, width, height, name, primaryLabel, secondaryLabel, showLabels, labelAlign, fillTone, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
35
47
  export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'children'>, ChartAnimationProps {
36
48
  /**
37
49
  * The dataviz palette this chart's series are painted from. Series that
@@ -70,10 +82,9 @@ export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'childre
70
82
  /** Render each leaf's label inside its cell (when it fits). */
71
83
  showLabels?: boolean;
72
84
  /**
73
- * Where a cell's label sits. Defaults to `bottom-start` — the design's
74
- * placement, which keeps the label anchored to a tile corner as the tiling
75
- * reflows. `top-start` anchors it to the opposite corner; `center` centers the
76
- * block in the tile. The corner variants are named for the tile's *start* edge
85
+ * Where a cell's label sits. Defaults to `center` — the Figma-canonical placement.
86
+ * `bottom-start` anchors the block to the tile's bottom start corner; `top-start`
87
+ * to the top start corner. The corner variants are named for the tile's *start* edge
77
88
  * because they mirror under `dir="rtl"`.
78
89
  */
79
90
  labelAlign?: TreemapLabelAlign;
@@ -18,6 +18,7 @@ export * from './components/ui/calendar-panel';
18
18
  export * from './components/ui/card';
19
19
  export * from './components/ui/card-filter';
20
20
  export * from './components/ui/card-section';
21
+ export * from './components/ui/card-widget-carousel';
21
22
  export * from './components/ui/category-bar';
22
23
  export * from './components/ui/chart';
23
24
  export * from './components/ui/chart-state';
@@ -61,7 +62,6 @@ export * from './components/ui/label';
61
62
  export * from './components/ui/line-chart';
62
63
  export * from './components/ui/link';
63
64
  export * from './components/ui/loading';
64
- export * from './components/ui/meter';
65
65
  export * from './components/ui/metric';
66
66
  export * from './components/ui/number-field';
67
67
  export * from './components/ui/page-content';
@@ -105,6 +105,7 @@ export * from './components/ui/tag';
105
105
  export * from './components/ui/timeline';
106
106
  export * from './components/ui/timer';
107
107
  export { Tag as Badge, type TagProps as BadgeProps, } from './components/ui/tag';
108
+ export * from './components/ui/tree-item';
108
109
  export * from './components/ui/treemap';
109
110
  export * from './components/ui/trend-indicator';
110
111
  export * from './components/ui/widget-placeholder';