@acronis-platform/ui-react 0.57.1 → 0.58.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.
- package/dist/components/ui/area-chart/area-chart.js +149 -0
- package/dist/components/ui/area-chart/area-chart.js.map +1 -0
- package/dist/components/ui/bar-chart/bar-chart.js +152 -77
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/button-icon-input/button-icon-input.js +36 -0
- package/dist/components/ui/button-icon-input/button-icon-input.js.map +1 -0
- package/dist/components/ui/button-menu/button-menu.js +1 -1
- package/dist/components/ui/button-menu/button-menu.js.map +1 -1
- package/dist/components/ui/card-filter/card-filter.js +40 -27
- package/dist/components/ui/card-filter/card-filter.js.map +1 -1
- package/dist/components/ui/chart-state/chart-state.js +42 -0
- package/dist/components/ui/chart-state/chart-state.js.map +1 -0
- package/dist/components/ui/chip/chip.js +13 -13
- package/dist/components/ui/chip/chip.js.map +1 -1
- package/dist/components/ui/composed-chart/composed-chart.js +107 -0
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -0
- package/dist/components/ui/confidence-cone/confidence-cone.js +195 -0
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -0
- package/dist/components/ui/date-range-picker/date-range-picker.js +21 -21
- package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +250 -78
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js +26 -0
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +21 -21
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/filter-search/filter-search.js +91 -90
- package/dist/components/ui/filter-search/filter-search.js.map +1 -1
- package/dist/components/ui/funnel-chart/funnel-chart.js +87 -0
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -0
- package/dist/components/ui/histogram/histogram.js +108 -0
- package/dist/components/ui/histogram/histogram.js.map +1 -0
- package/dist/components/ui/input-otp/input-otp.js +104 -0
- package/dist/components/ui/input-otp/input-otp.js.map +1 -0
- package/dist/components/ui/input-password/input-password.js +120 -0
- package/dist/components/ui/input-password/input-password.js.map +1 -0
- package/dist/components/ui/input-text/input-text.js +9 -9
- package/dist/components/ui/input-text/input-text.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +206 -0
- package/dist/components/ui/line-chart/line-chart.js.map +1 -0
- package/dist/components/ui/link/link.js +5 -5
- package/dist/components/ui/link/link.js.map +1 -1
- package/dist/components/ui/loading/loading.js +79 -0
- package/dist/components/ui/loading/loading.js.map +1 -0
- package/dist/components/ui/meter/meter.js +93 -0
- package/dist/components/ui/meter/meter.js.map +1 -0
- package/dist/components/ui/metric/metric.js +185 -0
- package/dist/components/ui/metric/metric.js.map +1 -0
- package/dist/components/ui/pie-chart/pie-chart.js +113 -0
- package/dist/components/ui/pie-chart/pie-chart.js.map +1 -0
- package/dist/components/ui/popover/popover.js +57 -27
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +74 -0
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -0
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +69 -0
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -0
- package/dist/components/ui/scatter-chart/scatter-chart.js +102 -0
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -0
- package/dist/components/ui/search/search.js +16 -16
- package/dist/components/ui/search/search.js.map +1 -1
- package/dist/components/ui/sheet/sheet-details.js +16 -16
- package/dist/components/ui/sheet/sheet-details.js.map +1 -1
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/timeline/timeline.js +175 -0
- package/dist/components/ui/timeline/timeline.js.map +1 -0
- package/dist/components/ui/treemap/treemap.js +83 -0
- package/dist/components/ui/treemap/treemap.js.map +1 -0
- package/dist/components/ui/trend-indicator/trend-indicator.js +97 -0
- package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -0
- package/dist/index.js +423 -384
- package/dist/index.js.map +1 -1
- package/dist/react.js +423 -384
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/area-chart/area-chart.d.ts +49 -0
- package/dist/src/components/ui/area-chart/index.d.ts +1 -0
- package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +42 -2
- package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/button-icon-input/button-icon-input.d.ts +21 -0
- package/dist/src/components/ui/button-icon-input/index.d.ts +1 -0
- package/dist/src/components/ui/card-filter/card-filter.d.ts +5 -0
- package/dist/src/components/ui/chart-state/chart-state.d.ts +11 -0
- package/dist/src/components/ui/chart-state/index.d.ts +1 -0
- package/dist/src/components/ui/composed-chart/composed-chart.d.ts +48 -0
- package/dist/src/components/ui/composed-chart/index.d.ts +1 -0
- package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +79 -0
- package/dist/src/components/ui/confidence-cone/index.d.ts +1 -0
- package/dist/src/components/ui/dialog/dialog.d.ts +105 -9
- package/dist/src/components/ui/dialog/dialog.docs.d.ts +82 -5
- package/dist/src/components/ui/dialog/index.d.ts +1 -1
- package/dist/src/components/ui/dialog-footer-default/dialog-footer-default.d.ts +11 -0
- package/dist/src/components/ui/dialog-footer-default/index.d.ts +1 -0
- package/dist/src/components/ui/filter-search/filter-search.d.ts +1 -1
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +39 -0
- package/dist/src/components/ui/funnel-chart/index.d.ts +1 -0
- package/dist/src/components/ui/histogram/histogram.d.ts +55 -0
- package/dist/src/components/ui/histogram/index.d.ts +1 -0
- package/dist/src/components/ui/input-otp/index.d.ts +1 -0
- package/dist/src/components/ui/input-otp/input-otp.d.ts +23 -0
- package/dist/src/components/ui/input-password/index.d.ts +1 -0
- package/dist/src/components/ui/input-password/input-password.d.ts +21 -0
- package/dist/src/components/ui/line-chart/index.d.ts +1 -0
- package/dist/src/components/ui/line-chart/line-chart.d.ts +83 -0
- package/dist/src/components/ui/loading/index.d.ts +1 -0
- package/dist/src/components/ui/loading/loading.d.ts +13 -0
- package/dist/src/components/ui/meter/index.d.ts +1 -0
- package/dist/src/components/ui/meter/meter.d.ts +25 -0
- package/dist/src/components/ui/metric/index.d.ts +1 -0
- package/dist/src/components/ui/metric/metric.d.ts +37 -0
- package/dist/src/components/ui/pie-chart/index.d.ts +1 -0
- package/dist/src/components/ui/pie-chart/pie-chart.d.ts +54 -0
- package/dist/src/components/ui/popover/index.d.ts +1 -1
- package/dist/src/components/ui/popover/popover.d.ts +13 -1
- package/dist/src/components/ui/radar-chart/index.d.ts +1 -0
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +40 -0
- package/dist/src/components/ui/radial-bar-chart/index.d.ts +1 -0
- package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +45 -0
- package/dist/src/components/ui/scatter-chart/index.d.ts +1 -0
- package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +50 -0
- package/dist/src/components/ui/stack/stack.d.ts +1 -1
- package/dist/src/components/ui/timeline/index.d.ts +1 -0
- package/dist/src/components/ui/timeline/timeline.d.ts +41 -0
- package/dist/src/components/ui/treemap/index.d.ts +1 -0
- package/dist/src/components/ui/treemap/treemap.d.ts +44 -0
- package/dist/src/components/ui/trend-indicator/index.d.ts +1 -0
- package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +32 -0
- package/dist/src/index.d.ts +22 -2
- package/dist/ui-react.css +1 -1
- package/package.json +3 -3
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const areaChartVariants: (props?: ({
|
|
5
|
+
layout?: "single" | "stacked" | null | undefined;
|
|
6
|
+
fill?: "solid" | "gradient" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface AreaChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof areaChartVariants> {
|
|
9
|
+
/** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the area unless `connectNulls`). */
|
|
10
|
+
data: ReadonlyArray<Record<string, string | number | null>>;
|
|
11
|
+
/**
|
|
12
|
+
* Per-series map of `label` / `color` (imported from the shared `Chart`
|
|
13
|
+
* primitives). Series colors are caller-supplied — reference an existing
|
|
14
|
+
* semantic `--ui-*` token; there is no chart palette tier yet.
|
|
15
|
+
*/
|
|
16
|
+
config: ChartConfig;
|
|
17
|
+
/** Series to plot — one `<Area>` per key. Each must exist in `config` and in every data row. */
|
|
18
|
+
dataKeys: string[];
|
|
19
|
+
/** Category axis key (the shared dimension across rows, e.g. `"month"`). */
|
|
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
|
+
/** Interpolation between points. */
|
|
28
|
+
curve?: 'linear' | 'monotone' | 'step';
|
|
29
|
+
/** Stroke width of each area's top border. */
|
|
30
|
+
strokeWidth?: number;
|
|
31
|
+
/** Flat-fill opacity — used only when `fill="solid"` (gradient controls its own stops). */
|
|
32
|
+
fillOpacity?: number;
|
|
33
|
+
/** Render a dot at each data point. */
|
|
34
|
+
showDots?: boolean;
|
|
35
|
+
/** Bridge `null` gaps in the data instead of breaking the area. */
|
|
36
|
+
connectNulls?: boolean;
|
|
37
|
+
showGrid?: boolean;
|
|
38
|
+
showTooltip?: boolean;
|
|
39
|
+
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
|
+
}
|
|
48
|
+
declare const AreaChart: React.ForwardRefExoticComponent<Omit<AreaChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
export { AreaChart, areaChartVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AreaChart, areaChartVariants, type AreaChartProps } from './area-chart';
|
|
@@ -2,7 +2,7 @@ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const avatarVariants: (props?: ({
|
|
5
|
-
color?: "
|
|
5
|
+
color?: "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
8
8
|
}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ChartConfig } from '../chart';
|
|
2
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const barChartVariants: (props?: ({
|
|
5
5
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
-
layout?: "
|
|
6
|
+
layout?: "stacked" | "grouped" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface BarChartReferenceLine {
|
|
9
|
+
/** Fixed position on the value axis. Takes precedence over `average`. */
|
|
10
|
+
value?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Draw the line at the mean of one series (a `dataKeys` entry) or, when
|
|
13
|
+
* `true`, of every plotted series' values.
|
|
14
|
+
*/
|
|
15
|
+
average?: boolean | string;
|
|
16
|
+
/** Optional caption rendered alongside the line. */
|
|
17
|
+
label?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a `referenceLine` config to a position on the value axis: a fixed
|
|
21
|
+
* `value` wins; otherwise the mean of the requested series (a single `dataKeys`
|
|
22
|
+
* entry, or all of them when `average` is `true`). Returns `undefined` when
|
|
23
|
+
* there is nothing to draw (no config, or no numeric values to average).
|
|
24
|
+
* Exported for unit tests; not part of the package's public API.
|
|
25
|
+
*/
|
|
26
|
+
export declare function barChartReferenceValue(referenceLine: BarChartReferenceLine | undefined, data: ReadonlyArray<Record<string, string | number>>, dataKeys: string[]): number | undefined;
|
|
8
27
|
export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof barChartVariants> {
|
|
9
28
|
/** Row-per-category data. Each object holds the category key + one numeric field per series. */
|
|
10
29
|
data: ReadonlyArray<Record<string, string | number>>;
|
|
@@ -18,11 +37,32 @@ export interface BarChartProps extends Omit<React.ComponentProps<'div'>, 'childr
|
|
|
18
37
|
dataKeys: string[];
|
|
19
38
|
/** Category axis key (the shared dimension across rows, e.g. `"month"`). */
|
|
20
39
|
xKey: string;
|
|
40
|
+
/**
|
|
41
|
+
* One or more dashed reference/average lines on the value axis (Y for vertical
|
|
42
|
+
* bars, X for horizontal). Each is driven by a fixed `value` or a computed
|
|
43
|
+
* series `average`. Pass a single object or an array to draw several at once.
|
|
44
|
+
*/
|
|
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
|
+
/** Unit suffix on X-axis tick values (recharts `unit`) — applies when the X axis is numeric (`orientation="horizontal"`). */
|
|
51
|
+
xUnit?: string;
|
|
52
|
+
/** Unit suffix on Y-axis tick values (recharts `unit`) — applies when the Y axis is numeric (`orientation="vertical"`). */
|
|
53
|
+
yUnit?: string;
|
|
21
54
|
/** Corner radius applied to the growing end of each bar. */
|
|
22
55
|
barRadius?: number;
|
|
23
56
|
showGrid?: boolean;
|
|
24
57
|
showTooltip?: boolean;
|
|
25
58
|
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'];
|
|
26
66
|
}
|
|
27
67
|
declare const BarChart: React.ForwardRefExoticComponent<Omit<BarChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
68
|
export { BarChart, barChartVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BarChart, barChartVariants, type BarChartProps } from './bar-chart';
|
|
1
|
+
export { BarChart, barChartVariants, type BarChartProps, type BarChartReferenceLine, } from './bar-chart';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const buttonIconInputVariants: (props?: ({
|
|
5
|
+
variant?: "error" | "normal" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonIconInputProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonIconInputVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* Replace the rendered `<button>` with another element or component
|
|
10
|
+
* (Base UI composition). Accepts a React element or a render function —
|
|
11
|
+
* the component's props and class names are merged onto it.
|
|
12
|
+
*/
|
|
13
|
+
render?: useRender.RenderProp;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Small icon-only button meant to sit inside an input's box. The icon is
|
|
17
|
+
* passed as `children`; provide an `aria-label` (or `aria-labelledby`) so the
|
|
18
|
+
* control has an accessible name.
|
|
19
|
+
*/
|
|
20
|
+
declare const ButtonIconInput: React.ForwardRefExoticComponent<ButtonIconInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export { ButtonIconInput, buttonIconInputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonIconInput, buttonIconInputVariants, type ButtonIconInputProps, } from './button-icon-input';
|
|
@@ -11,6 +11,11 @@ export interface CardFilterProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
11
11
|
value?: React.ReactNode;
|
|
12
12
|
/** Optional leading icon (16px) rendered before the value. Hidden for `static-empty`. */
|
|
13
13
|
icon?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* `clickable` only — applies the selected (active) styling and exposes the
|
|
16
|
+
* card as a pressed toggle (`aria-pressed`). Controlled only.
|
|
17
|
+
*/
|
|
18
|
+
selected?: boolean;
|
|
14
19
|
/**
|
|
15
20
|
* Replace the rendered element (`<button>` for `clickable`, otherwise `<div>`)
|
|
16
21
|
* with another element or component (Base UI composition) — e.g. a router link
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ChartStateProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3
|
+
/** Which placeholder to show. Drives the leading glyph and default label. */
|
|
4
|
+
state: 'loading' | 'empty' | 'error';
|
|
5
|
+
/** Overrides the default label for the current `state`. */
|
|
6
|
+
message?: string;
|
|
7
|
+
/** Trailing action (e.g. a "Try again" button) — shown for `error` only. */
|
|
8
|
+
action?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const ChartState: React.ForwardRefExoticComponent<ChartStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { ChartState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartState, type ChartStateProps } from './chart-state';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type ComposedSeriesType = 'bar' | 'line' | 'area';
|
|
4
|
+
export interface ComposedSeries {
|
|
5
|
+
/** Column key to plot — must match a `config` entry; drives its `--color-<key>` paint. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** How this series renders. */
|
|
8
|
+
type: ComposedSeriesType;
|
|
9
|
+
}
|
|
10
|
+
export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
11
|
+
/** Row-per-category data. Each object holds `xKey` + one numeric field per series. */
|
|
12
|
+
data: ReadonlyArray<Record<string, string | number>>;
|
|
13
|
+
/**
|
|
14
|
+
* Per-series map of `label` / `color`, keyed by `series[].key` (imported from
|
|
15
|
+
* the shared `Chart` primitives). Turned into `--color-<key>` custom
|
|
16
|
+
* properties. Colors are caller-supplied — reference an existing semantic
|
|
17
|
+
* `--ui-*` token; there is no chart palette tier yet.
|
|
18
|
+
*/
|
|
19
|
+
config: ChartConfig;
|
|
20
|
+
/** Series to plot, each `{ key, type }` — one bar/line/area per entry. Each key must exist in `config` and every data row. */
|
|
21
|
+
series: ComposedSeries[];
|
|
22
|
+
/** Category axis key (the shared dimension across rows, e.g. `"month"`). */
|
|
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
|
+
/** Interpolation for the line and area series. */
|
|
31
|
+
curve?: 'linear' | 'monotone' | 'step';
|
|
32
|
+
/** Corner radius on the growing end of bar series. */
|
|
33
|
+
barRadius?: number;
|
|
34
|
+
/** Flat-fill opacity for area series. */
|
|
35
|
+
fillOpacity?: number;
|
|
36
|
+
showGrid?: boolean;
|
|
37
|
+
showTooltip?: boolean;
|
|
38
|
+
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
|
+
}
|
|
47
|
+
declare const ComposedChart: React.ForwardRefExoticComponent<Omit<ComposedChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export { ComposedChart };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComposedChart, type ComposedChartProps, type ComposedSeries, type ComposedSeriesType, } from './composed-chart';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Drop the synthetic cone-band range series from a recharts tooltip/legend
|
|
5
|
+
* payload, keeping the real actual/forecast series (and their order). Applied to
|
|
6
|
+
* both the default tooltip and any caller-supplied `tooltipContent`, so the
|
|
7
|
+
* `__cone` band never surfaces regardless of which path renders.
|
|
8
|
+
*/
|
|
9
|
+
export declare function dropConeBand<T extends {
|
|
10
|
+
dataKey?: unknown;
|
|
11
|
+
}>(payload: readonly T[] | undefined): T[] | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Wrap a caller-supplied `tooltipContent` so the synthetic cone band is stripped
|
|
14
|
+
* from the payload before it renders, while preserving recharts' own mount
|
|
15
|
+
* semantics — a function is mounted via `createElement` (its own component
|
|
16
|
+
* identity + hook state), an element via `cloneElement`. This mirrors what the
|
|
17
|
+
* pass-through charts get by handing `content` straight to recharts, so a
|
|
18
|
+
* function-form tooltip keeps its state across re-renders here too. The returned
|
|
19
|
+
* component is a stable content type (memoize it on `tooltipContent`).
|
|
20
|
+
*/
|
|
21
|
+
type TooltipContentType = NonNullable<React.ComponentProps<typeof ChartTooltip>['content']>;
|
|
22
|
+
type TooltipContentFn = Extract<TooltipContentType, (...args: never[]) => unknown>;
|
|
23
|
+
type TooltipRenderProps = Parameters<TooltipContentFn>[0];
|
|
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'> {
|
|
26
|
+
/**
|
|
27
|
+
* Row-per-point data — the shared x dimension plus the actual / forecast /
|
|
28
|
+
* bound fields. Rows are naturally sparse (a point has either an actual or a
|
|
29
|
+
* forecast + bounds), so missing fields are allowed. Avoid a field named
|
|
30
|
+
* `__cone` — it's reserved for the internal prediction-band series.
|
|
31
|
+
*/
|
|
32
|
+
data: ReadonlyArray<Record<string, string | number | null | undefined>>;
|
|
33
|
+
/**
|
|
34
|
+
* Per-series map of `label` / `color` for the actual + forecast lines
|
|
35
|
+
* (imported from the shared `Chart` primitives). Colors are caller-supplied —
|
|
36
|
+
* reference an existing semantic `--ui-*` token; there is no chart palette tier
|
|
37
|
+
* yet. The cone band and the forecast line both reuse the actual series'
|
|
38
|
+
* color — actual and forecast differ by line style, not hue.
|
|
39
|
+
*/
|
|
40
|
+
config: ChartConfig;
|
|
41
|
+
/** Category / time axis key (the shared dimension across rows). */
|
|
42
|
+
xKey: string;
|
|
43
|
+
/** Field for the known/actual values — drawn as a solid line with a filled area. */
|
|
44
|
+
actualKey: string;
|
|
45
|
+
/** Field for the projected values — drawn as a dashed line. */
|
|
46
|
+
forecastKey: string;
|
|
47
|
+
/** Field for the cone's lower bound. */
|
|
48
|
+
lowerKey: string;
|
|
49
|
+
/** Field for the cone's upper bound. */
|
|
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
|
+
/** Stroke width of the actual + forecast lines. */
|
|
58
|
+
strokeWidth?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Set off the forecast period from the actuals with a dashed divider at the
|
|
61
|
+
* hand-off point (the first row with a forecast value) and a subtle shaded
|
|
62
|
+
* band over the forecast region.
|
|
63
|
+
*/
|
|
64
|
+
showForecastRegion?: boolean;
|
|
65
|
+
showGrid?: boolean;
|
|
66
|
+
showTooltip?: boolean;
|
|
67
|
+
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
|
+
}
|
|
78
|
+
declare const ConfidenceCone: React.ForwardRefExoticComponent<Omit<ConfidenceConeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
79
|
+
export { ConfidenceCone };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfidenceCone, type ConfidenceConeProps } from './confidence-cone';
|
|
@@ -2,17 +2,18 @@ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const dialogContentVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "sm" | "large" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
declare const
|
|
7
|
+
declare const DialogRoot: typeof DialogPrimitive.Root;
|
|
8
8
|
declare const DialogTrigger: DialogPrimitive.Trigger;
|
|
9
9
|
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const DialogClose: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').AlertDialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AlertDialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Popup>, VariantProps<typeof dialogContentVariants> {
|
|
13
13
|
/**
|
|
14
|
-
* Popup max-width. `sm`
|
|
15
|
-
*
|
|
14
|
+
* Popup max-width. `sm` (512px, default) is the Figma-defined size; `large`
|
|
15
|
+
* (832px) is a backward-compatibility size with no design token (see the
|
|
16
|
+
* `Large` story).
|
|
16
17
|
*/
|
|
17
18
|
size?: VariantProps<typeof dialogContentVariants>['size'];
|
|
18
19
|
/**
|
|
@@ -30,10 +31,105 @@ export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeo
|
|
|
30
31
|
keepMounted?: DialogPrimitive.Portal.Props['keepMounted'];
|
|
31
32
|
}
|
|
32
33
|
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const
|
|
34
|
-
declare const
|
|
35
|
-
declare const
|
|
34
|
+
declare const DialogHeaderRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
declare const DialogFooterRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const DialogBodyRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
36
37
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AlertDialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
37
38
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AlertDialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
export interface DialogCloseButtonProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close> {
|
|
40
|
+
/** Accessible name for screen readers. Defaults to `'Close'`. */
|
|
41
|
+
closeLabel?: string;
|
|
42
|
+
}
|
|
43
|
+
declare const DialogCloseButton: React.ForwardRefExoticComponent<DialogCloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
export type DialogVariant = 'default' | 'rename' | 'save changes' | 'reset password' | 'discard changes' | 'accept' | 'read-only' | 'wide';
|
|
45
|
+
type DialogRootProps = React.ComponentPropsWithoutRef<typeof DialogRoot>;
|
|
46
|
+
export interface DialogProps extends Omit<DialogRootProps, 'children'> {
|
|
47
|
+
/**
|
|
48
|
+
* Selects the canned title / body / footer preset. Defaults to `'default'`.
|
|
49
|
+
* `'wide'` is a legacy escape hatch (no canned preset) kept for backward
|
|
50
|
+
* compatibility — pair it with `size="large"` and the `footer` prop.
|
|
51
|
+
*/
|
|
52
|
+
variant?: DialogVariant;
|
|
53
|
+
/**
|
|
54
|
+
* Show a spinner overlay across the body + footer, and make both `inert`
|
|
55
|
+
* (unfocusable, unclickable, hidden from assistive tech) so a keyboard user
|
|
56
|
+
* can't activate the visually obscured footer buttons while busy.
|
|
57
|
+
*/
|
|
58
|
+
hasLoading?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Overrides the loading overlay's accessible label. Defaults to `Loading`'s
|
|
61
|
+
* own default (`'Data is loading…'`). Ignored when `hasLoading` is `false`.
|
|
62
|
+
*/
|
|
63
|
+
loadingLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Show the header (title + close button). Defaults to `true`. When `false`,
|
|
66
|
+
* the title is still rendered off-screen so the dialog keeps an accessible
|
|
67
|
+
* name — only the visible bar and close button are omitted. Beyond the
|
|
68
|
+
* strict Figma contract (all seven `DialogDefault` variants always show the
|
|
69
|
+
* header); a ui-react-only extension, like `wide`/`size="large"`.
|
|
70
|
+
*/
|
|
71
|
+
hasHeader?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Show the footer (action buttons). Defaults to `true`. Beyond the strict
|
|
74
|
+
* Figma contract (all seven `DialogDefault` variants always show the
|
|
75
|
+
* footer); a ui-react-only extension, like `wide`/`size="large"`. When
|
|
76
|
+
* `false`, `footer` (and the canned footer it would otherwise replace) is
|
|
77
|
+
* not rendered either.
|
|
78
|
+
*/
|
|
79
|
+
hasFooter?: boolean;
|
|
80
|
+
/** Overrides the variant's default body content. */
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
/** Overrides the variant's default title. */
|
|
83
|
+
title?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The real name of the object being acted on (e.g. a file or resource
|
|
86
|
+
* name). Interpolated into the `rename`/`discard changes`/`accept`
|
|
87
|
+
* variants' canned title/body in place of the generic placeholder text;
|
|
88
|
+
* ignored by variants that don't reference an object name.
|
|
89
|
+
*/
|
|
90
|
+
objectName?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Overrides the accessible name of the `rename` variant's text field
|
|
93
|
+
* (default `'Object name'`). Ignored by every other variant.
|
|
94
|
+
*/
|
|
95
|
+
objectNameLabel?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Overrides the variant's default secondary (dismiss) button label. Passing
|
|
98
|
+
* this for a variant with no secondary button by default (e.g. `read-only`)
|
|
99
|
+
* also makes the button appear. Ignored when `footer` is provided.
|
|
100
|
+
*/
|
|
101
|
+
secondaryLabel?: string;
|
|
102
|
+
/** Overrides the variant's default primary button label. Ignored when `footer` is provided. */
|
|
103
|
+
primaryLabel?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Fires when the primary footer button is clicked. The dialog does not
|
|
106
|
+
* close automatically afterwards — pair this with `open`/`onOpenChange` to
|
|
107
|
+
* close it once the action completes. Ignored when `footer` is provided
|
|
108
|
+
* (wire behavior onto your own buttons there instead).
|
|
109
|
+
*/
|
|
110
|
+
onPrimaryAction?: () => void;
|
|
111
|
+
/**
|
|
112
|
+
* Replaces the footer's action content entirely with free-form buttons —
|
|
113
|
+
* the escape hatch the `wide` variant is meant to be paired with, for
|
|
114
|
+
* legacy call sites that don't fit one of the seven canned presets. Ignored
|
|
115
|
+
* (along with the canned footer) when `hasFooter` is `false`.
|
|
116
|
+
*/
|
|
117
|
+
footer?: React.ReactNode;
|
|
118
|
+
/** Overrides the close button's accessible name. Defaults to `'Close'`. */
|
|
119
|
+
closeLabel?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Popup max-width (forwarded to `DialogContent`). Defaults to `'sm'`, or to
|
|
122
|
+
* `'large'` when `variant` is `'wide'`.
|
|
123
|
+
*/
|
|
124
|
+
size?: DialogContentProps['size'];
|
|
125
|
+
/** Render inside a portal (forwarded to `DialogContent`). Defaults to `true`. */
|
|
126
|
+
portal?: boolean;
|
|
127
|
+
/** Portal container (forwarded to `DialogContent`). */
|
|
128
|
+
portalContainer?: DialogContentProps['portalContainer'];
|
|
129
|
+
/** Keep the content mounted while closed (forwarded to `DialogContent`). */
|
|
130
|
+
keepMounted?: DialogContentProps['keepMounted'];
|
|
131
|
+
/** Extra classes merged onto the popup container. */
|
|
132
|
+
className?: string;
|
|
133
|
+
}
|
|
134
|
+
declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
export { DialogRoot, DialogPortal, DialogOverlay, DialogClose, DialogCloseButton, DialogTrigger, DialogContent, DialogHeaderRoot, DialogFooterRoot, DialogTitle, DialogBodyRoot, DialogDescription, dialogContentVariants, Dialog, };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
/** Props for `DialogContent` — the portaled, centered dialog popup. */
|
|
3
3
|
export interface DialogContentProps {
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
* · `lg` (832px) · `xl` (992px) · `2xl` (1136px).
|
|
7
|
-
*/
|
|
8
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
4
|
+
/** Popup max-width. `sm` (512px, default) is the Figma-defined size; `large` (832px) is a legacy backward-compatibility size. */
|
|
5
|
+
size?: 'sm' | 'large';
|
|
9
6
|
/**
|
|
10
7
|
* Render the content inside a portal (default `true`). Disable only when you
|
|
11
8
|
* supply your own `DialogPortal` ancestor (e.g. inline usage).
|
|
@@ -22,3 +19,83 @@ export interface DialogContentProps {
|
|
|
22
19
|
className?: string;
|
|
23
20
|
children?: React.ReactNode;
|
|
24
21
|
}
|
|
22
|
+
/** Props for `Dialog` — the public, variant-driven dialog recipe. */
|
|
23
|
+
export interface DialogProps {
|
|
24
|
+
/**
|
|
25
|
+
* Selects the canned title / body / footer preset. Defaults to `'default'`.
|
|
26
|
+
* `'wide'` is a legacy escape hatch (no Figma preset) kept for backward
|
|
27
|
+
* compatibility — pair it with `size="large"` and the `footer` prop.
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'default' | 'rename' | 'save changes' | 'reset password' | 'discard changes' | 'accept' | 'read-only' | 'wide';
|
|
30
|
+
/**
|
|
31
|
+
* Show a spinner overlay across the body + footer, and make both `inert`
|
|
32
|
+
* so a keyboard user can't activate the obscured footer buttons.
|
|
33
|
+
*/
|
|
34
|
+
hasLoading?: boolean;
|
|
35
|
+
/** Overrides the loading overlay's accessible label. Ignored when `hasLoading` is `false`. */
|
|
36
|
+
loadingLabel?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Show the header (title + close button). Defaults to `true`. When `false`,
|
|
39
|
+
* the title is still rendered off-screen so the dialog keeps an accessible
|
|
40
|
+
* name — only the visible bar and close button are omitted.
|
|
41
|
+
*/
|
|
42
|
+
hasHeader?: boolean;
|
|
43
|
+
/** Show the footer (action buttons). Defaults to `true`. When `false`, `footer` is not rendered either. */
|
|
44
|
+
hasFooter?: boolean;
|
|
45
|
+
/** Overrides the variant's default body content. */
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
/** Overrides the variant's default title. */
|
|
48
|
+
title?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The real name of the object being acted on (e.g. a file or resource
|
|
51
|
+
* name). Interpolated into the `rename`/`discard changes`/`accept`
|
|
52
|
+
* variants' canned title/body in place of the generic placeholder text;
|
|
53
|
+
* ignored by variants that don't reference an object name.
|
|
54
|
+
*/
|
|
55
|
+
objectName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Overrides the accessible name of the `rename` variant's text field
|
|
58
|
+
* (default `'Object name'`). Ignored by every other variant.
|
|
59
|
+
*/
|
|
60
|
+
objectNameLabel?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Overrides the variant's default secondary (dismiss) button label. Passing
|
|
63
|
+
* this on a variant with no secondary button by default (e.g. `read-only`)
|
|
64
|
+
* also makes the button appear. Ignored when `footer` is provided.
|
|
65
|
+
*/
|
|
66
|
+
secondaryLabel?: string;
|
|
67
|
+
/** Overrides the variant's default primary button label. Ignored when `footer` is provided. */
|
|
68
|
+
primaryLabel?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Fires when the primary footer button is clicked. The dialog does not
|
|
71
|
+
* close automatically afterwards — pair this with `open`/`onOpenChange` to
|
|
72
|
+
* close it once the action completes. Ignored when `footer` is provided.
|
|
73
|
+
*/
|
|
74
|
+
onPrimaryAction?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Replaces the footer's action content entirely with free-form buttons —
|
|
77
|
+
* the escape hatch the `wide` variant is meant to be paired with, for
|
|
78
|
+
* legacy call sites that don't fit one of the seven canned presets.
|
|
79
|
+
*/
|
|
80
|
+
footer?: React.ReactNode;
|
|
81
|
+
/** Overrides the close button's accessible name. Defaults to `'Close'`. */
|
|
82
|
+
closeLabel?: string;
|
|
83
|
+
/** Popup max-width. Defaults to `'sm'`, or to `'large'` when `variant` is `'wide'`. */
|
|
84
|
+
size?: 'sm' | 'large';
|
|
85
|
+
/** Render inside a portal (default `true`). */
|
|
86
|
+
portal?: boolean;
|
|
87
|
+
/** Portal container. Pass a shadow-root mount for isolated-style previews. */
|
|
88
|
+
portalContainer?: HTMLElement | null;
|
|
89
|
+
/** Keep the content mounted while closed. */
|
|
90
|
+
keepMounted?: boolean;
|
|
91
|
+
/** Extra classes merged onto the popup container. */
|
|
92
|
+
className?: string;
|
|
93
|
+
/** Controlled open state. Pair with `onOpenChange`. */
|
|
94
|
+
open?: boolean;
|
|
95
|
+
/** Open on mount, uncontrolled. */
|
|
96
|
+
defaultOpen?: boolean;
|
|
97
|
+
/** Modal behavior — focus trap and scroll lock while open. Defaults to `true`. */
|
|
98
|
+
modal?: boolean | 'trap-focus';
|
|
99
|
+
/** Fires when the dialog opens or closes. */
|
|
100
|
+
onOpenChange?: (open: boolean, eventDetails: unknown) => void;
|
|
101
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DialogRoot, DialogPortal, DialogOverlay, DialogClose, DialogCloseButton, DialogTrigger, DialogContent, DialogHeaderRoot, DialogFooterRoot, DialogTitle, DialogBodyRoot, DialogDescription, dialogContentVariants, Dialog, type DialogContentProps, type DialogCloseButtonProps, type DialogProps, type DialogVariant, } from './dialog';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DialogFooterDefaultProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/** Truncated description text next to the actions. Mutually exclusive with `link`. */
|
|
4
|
+
description?: string;
|
|
5
|
+
/** A `Link` (or similar) element next to the actions. Mutually exclusive with `description`. */
|
|
6
|
+
link?: React.ReactNode;
|
|
7
|
+
/** End-aligned actions — typically a secondary and a primary `Button`. */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const DialogFooterDefault: React.ForwardRefExoticComponent<DialogFooterDefaultProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { DialogFooterDefault };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DialogFooterDefault, type DialogFooterDefaultProps } from './dialog-footer-default';
|
|
@@ -16,7 +16,7 @@ interface FilterSearchFiltersContextValue {
|
|
|
16
16
|
* `onChange` to `setFilter`; Apply commits the draft, Cancel/dismiss reverts it.
|
|
17
17
|
*/
|
|
18
18
|
export declare function useFilterSearchFilters(): FilterSearchFiltersContextValue;
|
|
19
|
-
export interface FilterSearchFiltersProps {
|
|
19
|
+
export interface FilterSearchFiltersProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'onValueChange'> {
|
|
20
20
|
/** The applied filter values, keyed by an arbitrary consumer-chosen id. */
|
|
21
21
|
value: Record<string, unknown>;
|
|
22
22
|
/** Called with the committed filters when Apply is pressed. */
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const funnelChartVariants: (props?: ({
|
|
5
|
+
lastShape?: "triangle" | "rectangle" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface FunnelChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof funnelChartVariants> {
|
|
8
|
+
/** Row-per-stage data. Each object holds the stage's `nameKey` label + its `dataKey` numeric value. */
|
|
9
|
+
data: ReadonlyArray<Record<string, string | number>>;
|
|
10
|
+
/**
|
|
11
|
+
* Per-stage map of `label` / `color`, keyed by the stage's `nameKey` value
|
|
12
|
+
* (imported from the shared `Chart` primitives). Turned into `--color-<name>`
|
|
13
|
+
* custom properties. Colors are caller-supplied — reference an existing
|
|
14
|
+
* semantic `--ui-*` token; there is no chart palette tier yet.
|
|
15
|
+
*/
|
|
16
|
+
config: ChartConfig;
|
|
17
|
+
/** Numeric field that sizes each stage (the funnel narrows as it drops). */
|
|
18
|
+
dataKey: string;
|
|
19
|
+
/**
|
|
20
|
+
* Label field that names each stage (drives the legend, tooltip, on-chart
|
|
21
|
+
* labels, and the `--color-<name>` lookup). Values should be unique per chart —
|
|
22
|
+
* stages sharing a name share one `config`/color entry.
|
|
23
|
+
*/
|
|
24
|
+
nameKey: string;
|
|
25
|
+
/** Flip the funnel so it widens toward the bottom instead of narrowing. */
|
|
26
|
+
reversed?: boolean;
|
|
27
|
+
/** Render each stage's name beside its segment. */
|
|
28
|
+
showLabels?: boolean;
|
|
29
|
+
showTooltip?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
32
|
+
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
33
|
+
* to customize formatting, per-series rows, or extra fields without composing
|
|
34
|
+
* recharts yourself. Ignored when `showTooltip` is false.
|
|
35
|
+
*/
|
|
36
|
+
tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
|
|
37
|
+
}
|
|
38
|
+
declare const FunnelChart: React.ForwardRefExoticComponent<Omit<FunnelChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export { FunnelChart, funnelChartVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FunnelChart, funnelChartVariants, type FunnelChartProps, } from './funnel-chart';
|