@acronis-platform/ui-react 2.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/accordion-container/accordion-container.js +144 -0
- package/dist/components/ui/accordion-container/accordion-container.js.map +1 -0
- package/dist/components/ui/app-shell-chat/app-shell-chat.js.map +1 -1
- package/dist/components/ui/area-chart/area-chart.js +141 -139
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +33 -22
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +295 -293
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/card/card.js +150 -74
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/card-section/card-section.js +111 -0
- package/dist/components/ui/card-section/card-section.js.map +1 -0
- package/dist/components/ui/category-bar/category-bar.js +109 -93
- package/dist/components/ui/category-bar/category-bar.js.map +1 -1
- package/dist/components/ui/chart/chart-palette.js +113 -0
- package/dist/components/ui/chart/chart-palette.js.map +1 -0
- package/dist/components/ui/chart/chart.js +176 -129
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/chart-state/chart-state-illustrations.js +310 -0
- package/dist/components/ui/chart-state/chart-state-illustrations.js.map +1 -0
- package/dist/components/ui/chart-state/chart-state.js +48 -34
- package/dist/components/ui/chart-state/chart-state.js.map +1 -1
- package/dist/components/ui/chart-widget/chart-widget.js +87 -0
- package/dist/components/ui/chart-widget/chart-widget.js.map +1 -0
- package/dist/components/ui/composed-chart/composed-chart.js +117 -115
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
- package/dist/components/ui/confidence-cone/confidence-cone.js +166 -158
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +4 -2
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/empty-overlay/empty-overlay.js +49 -0
- package/dist/components/ui/empty-overlay/empty-overlay.js.map +1 -0
- package/dist/components/ui/funnel-chart/funnel-chart.js +162 -161
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/ui/histogram/histogram.js +94 -92
- package/dist/components/ui/histogram/histogram.js.map +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/label/label.js +2 -9
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +143 -141
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/metric/metric.js +74 -185
- package/dist/components/ui/metric/metric.js.map +1 -1
- package/dist/components/ui/page-content/page-content.js.map +1 -1
- package/dist/components/ui/pie-chart/pie-chart.js +201 -195
- package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +133 -131
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +297 -265
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
- package/dist/components/ui/sankey-chart/sankey-chart.js +123 -101
- package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
- package/dist/components/ui/scatter-chart/scatter-chart.js +76 -74
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/components/ui/section/section.js +157 -31
- package/dist/components/ui/section/section.js.map +1 -1
- package/dist/components/ui/stepper/stepper.js +24 -24
- package/dist/components/ui/stepper/stepper.js.map +1 -1
- package/dist/components/ui/stepper-item/stepper-item.js +43 -24
- package/dist/components/ui/stepper-item/stepper-item.js.map +1 -1
- package/dist/components/ui/table/table.js +27 -27
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/treemap/treemap.js +133 -124
- package/dist/components/ui/treemap/treemap.js.map +1 -1
- package/dist/components/ui/trend-indicator/trend-indicator.js +34 -69
- package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -1
- package/dist/components/ui/wizard/wizard.js +59 -0
- package/dist/components/ui/wizard/wizard.js.map +1 -0
- package/dist/hooks/use-wizard.js +75 -0
- package/dist/hooks/use-wizard.js.map +1 -0
- package/dist/index.js +540 -525
- package/dist/index.js.map +1 -1
- package/dist/llms/accordion-container.md +181 -0
- package/dist/llms/accordion.md +124 -0
- package/dist/llms/alert.md +225 -0
- package/dist/llms/app-shell-chat.md +415 -0
- package/dist/llms/area-chart.md +355 -0
- package/dist/llms/avatar.md +208 -0
- package/dist/llms/bar-chart.md +406 -0
- package/dist/llms/breadcrumb.md +326 -0
- package/dist/llms/button-group.md +298 -0
- package/dist/llms/button-icon-input.md +142 -0
- package/dist/llms/button-icon-menu.md +209 -0
- package/dist/llms/button-icon.md +128 -0
- package/dist/llms/button-menu.md +172 -0
- package/dist/llms/button.md +185 -0
- package/dist/llms/calendar-panel.md +733 -0
- package/dist/llms/calendar.md +188 -0
- package/dist/llms/card-filter.md +214 -0
- package/dist/llms/card-section.md +293 -0
- package/dist/llms/card.md +447 -0
- package/dist/llms/carousel-dialog.md +156 -0
- package/dist/llms/category-bar.md +193 -0
- package/dist/llms/chart-state.md +190 -0
- package/dist/llms/chart-widget.md +209 -0
- package/dist/llms/chart.md +182 -0
- package/dist/llms/checkbox.md +257 -0
- package/dist/llms/chip.md +195 -0
- package/dist/llms/combobox.md +164 -0
- package/dist/llms/composed-chart.md +508 -0
- package/dist/llms/confidence-cone.md +277 -0
- package/dist/llms/data-table.md +474 -0
- package/dist/llms/date-range-picker.md +272 -0
- package/dist/llms/description-list.md +131 -0
- package/dist/llms/dialog-footer-carousel.md +147 -0
- package/dist/llms/dialog-footer-default.md +142 -0
- package/dist/llms/dialog-root.md +246 -0
- package/dist/llms/dialog-welcome.md +223 -0
- package/dist/llms/dialog.md +403 -0
- package/dist/llms/dropdown-menu.md +193 -0
- package/dist/llms/empty-overlay.md +146 -0
- package/dist/llms/empty.md +156 -0
- package/dist/llms/field.md +185 -0
- package/dist/llms/filter-cards.md +157 -0
- package/dist/llms/filter-chips.md +323 -0
- package/dist/llms/filter-search.md +512 -0
- package/dist/llms/form.md +154 -0
- package/dist/llms/funnel-chart.md +333 -0
- package/dist/llms/grid.md +80 -0
- package/dist/llms/histogram.md +190 -0
- package/dist/llms/input-date-picker.md +203 -0
- package/dist/llms/input-otp.md +173 -0
- package/dist/llms/input-password.md +197 -0
- package/dist/llms/input-search.md +170 -0
- package/dist/llms/input-select.md +278 -0
- package/dist/llms/input-text-area.md +271 -0
- package/dist/llms/input-text.md +192 -0
- package/dist/llms/line-chart.md +369 -0
- package/dist/llms/link.md +209 -0
- package/dist/llms/loading.md +130 -0
- package/dist/llms/meter.md +177 -0
- package/dist/llms/metric.md +204 -0
- package/dist/llms/number-field.md +122 -0
- package/dist/llms/page-content.md +69 -0
- package/dist/llms/page-header.md +182 -0
- package/dist/llms/pagination.md +133 -0
- package/dist/llms/pie-chart.md +307 -0
- package/dist/llms/popover.md +252 -0
- package/dist/llms/progress-circle.md +126 -0
- package/dist/llms/progress.md +111 -0
- package/dist/llms/radar-chart.md +316 -0
- package/dist/llms/radial-bar-chart.md +319 -0
- package/dist/llms/radio.md +255 -0
- package/dist/llms/resizable.md +195 -0
- package/dist/llms/sankey-chart.md +208 -0
- package/dist/llms/scatter-chart.md +239 -0
- package/dist/llms/scroll-area.md +183 -0
- package/dist/llms/section.md +401 -0
- package/dist/llms/select.md +210 -0
- package/dist/llms/separator.md +87 -0
- package/dist/llms/sheet.md +202 -0
- package/dist/llms/sidebar-primary.md +360 -0
- package/dist/llms/sidebar-secondary.md +417 -0
- package/dist/llms/skeleton.md +81 -0
- package/dist/llms/slider.md +97 -0
- package/dist/llms/spinner.md +100 -0
- package/dist/llms/stack.md +80 -0
- package/dist/llms/stepper-item.md +309 -0
- package/dist/llms/stepper.md +251 -0
- package/dist/llms/switch.md +140 -0
- package/dist/llms/table.md +436 -0
- package/dist/llms/tabs.md +197 -0
- package/dist/llms/tag.md +139 -0
- package/dist/llms/timeline.md +361 -0
- package/dist/llms/timer.md +259 -0
- package/dist/llms/toast.md +241 -0
- package/dist/llms/toggle-group.md +121 -0
- package/dist/llms/toolbar.md +453 -0
- package/dist/llms/tooltip.md +164 -0
- package/dist/llms/treemap.md +254 -0
- package/dist/llms/trend-indicator.md +132 -0
- package/dist/llms/widget-placeholder.md +169 -0
- package/dist/llms/wizard.md +412 -0
- package/dist/llms.txt +142 -0
- package/dist/react.js +540 -525
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/accordion-container/accordion-container.d.ts +44 -0
- package/dist/src/components/ui/accordion-container/index.d.ts +1 -0
- package/dist/src/components/ui/area-chart/area-chart.d.ts +9 -4
- package/dist/src/components/ui/avatar/avatar.d.ts +27 -8
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +9 -4
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/card/card.d.ts +69 -8
- package/dist/src/components/ui/card/index.d.ts +1 -1
- package/dist/src/components/ui/card-section/card-section.d.ts +50 -0
- package/dist/src/components/ui/card-section/index.d.ts +1 -0
- package/dist/src/components/ui/category-bar/category-bar.d.ts +10 -4
- package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +48 -0
- package/dist/src/components/ui/chart/__tests__/chart-palette.test.d.ts +1 -0
- package/dist/src/components/ui/chart/chart-palette.d.ts +128 -0
- package/dist/src/components/ui/chart/chart.d.ts +66 -15
- package/dist/src/components/ui/chart/index.d.ts +4 -2
- package/dist/src/components/ui/chart-state/chart-state-illustrations.d.ts +6 -0
- package/dist/src/components/ui/chart-state/chart-state.d.ts +13 -2
- package/dist/src/components/ui/chart-state/index.d.ts +1 -0
- package/dist/src/components/ui/chart-widget/chart-widget.d.ts +64 -0
- package/dist/src/components/ui/chart-widget/index.d.ts +1 -0
- package/dist/src/components/ui/composed-chart/composed-chart.d.ts +12 -7
- package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +10 -5
- package/dist/src/components/ui/dialog/dialog.d.ts +1 -1
- package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +20 -0
- package/dist/src/components/ui/empty-overlay/index.d.ts +2 -0
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +11 -5
- package/dist/src/components/ui/grid/grid.d.ts +1 -1
- package/dist/src/components/ui/histogram/histogram.d.ts +10 -4
- package/dist/src/components/ui/label/index.d.ts +1 -1
- package/dist/src/components/ui/label/label.d.ts +1 -5
- package/dist/src/components/ui/line-chart/line-chart.d.ts +9 -4
- package/dist/src/components/ui/metric/metric.d.ts +13 -14
- package/dist/src/components/ui/pie-chart/pie-chart.d.ts +17 -8
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +10 -5
- package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +17 -6
- package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +10 -5
- package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +10 -5
- package/dist/src/components/ui/section/index.d.ts +1 -1
- package/dist/src/components/ui/section/section.d.ts +75 -6
- package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
- package/dist/src/components/ui/stack/stack.d.ts +1 -1
- package/dist/src/components/ui/stepper-item/stepper-item.d.ts +6 -5
- package/dist/src/components/ui/tag/tag.d.ts +1 -1
- package/dist/src/components/ui/treemap/treemap.d.ts +11 -5
- package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +3 -7
- package/dist/src/components/ui/wizard/index.d.ts +1 -0
- package/dist/src/components/ui/wizard/wizard.d.ts +6 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/use-wizard.d.ts +80 -0
- package/dist/src/index.d.ts +5 -3
- package/dist/ui-react.css +1 -1
- package/package.json +12 -6
- package/dist/components/ui/app-shell/app-shell.js +0 -75
- package/dist/components/ui/app-shell/app-shell.js.map +0 -1
- package/dist/components/ui/auth-layout/auth-layout.js +0 -56
- package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
- package/dist/components/ui/collapsible/collapsible.js +0 -22
- package/dist/components/ui/collapsible/collapsible.js.map +0 -1
- package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
- package/dist/src/components/ui/app-shell/index.d.ts +0 -1
- package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
- package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
- package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
- package/dist/src/components/ui/collapsible/index.d.ts +0 -1
- package/dist/src/components/ui/label/label.docs.d.ts +0 -10
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, } from './chart';
|
|
2
|
-
export type { ChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
|
|
1
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, resolveChartColors, } from './chart';
|
|
2
|
+
export type { ChartConfig, ResolvedChartConfig, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartTooltipContentType, } from './chart';
|
|
3
|
+
export { CHART_CATEGORICAL_TOKENS, CHART_SEQUENTIAL_TOKENS, CHART_DIVERGING_TOKENS, CHART_STATUS_TOKENS, CHART_DEFAULT_PALETTE, listPaletteStops, listPaletteChoices, resolveSeriesColor, findDuplicateTones, } from './chart-palette';
|
|
4
|
+
export type { ChartPalette, ChartSeriesTone, ChartSequentialRamp, ChartDivergingPair, ChartStatusTone, ResolveSeriesColorOptions, } from './chart-palette';
|
|
3
5
|
export { formatCompactNumber, formatPercent, createTickFormatter, resolveAxisDomain, resolveRotatedTickAnchor, resolveXAxisHeight, resolveXAxisTitle, resolveYAxisTitle, resolveCategoryRange, resolveAnimation, toLabelFormatter, resolveLabelFillClass, resolveCartesianLabelPosition, resolveBrushProps, resolveChartReferenceValue, resolveReferenceLineProps, toReferenceLineList, CHART_REFERENCE_LINE_STROKE, CHART_LABEL_MARGIN, CHART_LABEL_FILL_CLASS, CHART_LABEL_FILL_ON_SERIES_CLASS, CHART_LABEL_FONT_SIZE, CHART_BRUSH_HEIGHT, CHART_BRUSH_ARIA_LABEL, } from './chart-format';
|
|
4
6
|
export type { TickFormatter, ChartCurveType, ChartReferenceLine, ChartReferenceLabelPosition, CartesianChartProps, ChartCategoryRange, ChartYAxisTarget, SecondaryYAxisProps, ChartAnimationProps, ChartAnimationEasing, ResolvedAnimation, ChartDataLabelProps, CartesianLabelPosition, PolarLabelPosition, ChartLabelPosition, ChartBrushProps, ResolvedBrush, } from './chart-format';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** The chart types the design draws an empty state for. */
|
|
3
|
+
export type ChartStateVariant = 'area' | 'bar' | 'line' | 'donut' | 'radial' | 'funnel' | 'radar' | 'sankey' | 'scatter' | 'treemap' | 'table' | 'text';
|
|
4
|
+
export declare const CHART_STATE_ILLUSTRATIONS: Record<ChartStateVariant, (props: {
|
|
5
|
+
className?: string;
|
|
6
|
+
}) => React.ReactElement>;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
import { ChartStateVariant } from './chart-state-illustrations';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
export interface ChartStateProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3
4
|
/** Which placeholder to show. Drives the leading glyph and default label. */
|
|
4
5
|
state: 'loading' | 'empty' | 'error';
|
|
5
|
-
/**
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Which chart the slot holds. `empty` then draws that type's silhouette
|
|
8
|
+
* instead of the generic inbox glyph — the design defines one per chart type.
|
|
9
|
+
* Ignored by `loading` and `error`, which share one treatment.
|
|
10
|
+
*/
|
|
11
|
+
variant?: ChartStateVariant;
|
|
12
|
+
/**
|
|
13
|
+
* Text shown below the illustration or glyph. Defaults to `"Data is
|
|
14
|
+
* loading…"` / `"No data found"` / `"Something went wrong"` based on
|
|
15
|
+
* `state`. Pass a value to override for any state.
|
|
16
|
+
*/
|
|
17
|
+
description?: React.ReactNode;
|
|
7
18
|
/** Trailing action (e.g. a "Try again" button) — shown for `error` only. */
|
|
8
19
|
action?: React.ReactNode;
|
|
9
20
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { CardHeaderProps } from '../card';
|
|
3
|
+
import { ChartStateProps, ChartStateVariant } from '../chart-state';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
export interface ChartWidgetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
|
+
/**
|
|
7
|
+
* Replace the rendered `<div>` with another element or component (Base UI
|
|
8
|
+
* composition), forwarded to `Card`. This is how a dashboard gives each
|
|
9
|
+
* widget a landmark role — `render={<section aria-label="Sessions" />}` — the
|
|
10
|
+
* one thing the widget can't infer for itself.
|
|
11
|
+
*/
|
|
12
|
+
render?: useRender.RenderProp;
|
|
13
|
+
/**
|
|
14
|
+
* Which chart the widget holds. Only used while `state="empty"`, to pick the
|
|
15
|
+
* silhouette the design draws for that chart type — the widget itself needs
|
|
16
|
+
* no size, so this carries nothing else.
|
|
17
|
+
*/
|
|
18
|
+
variant?: ChartStateVariant;
|
|
19
|
+
/**
|
|
20
|
+
* The card header, forwarded verbatim to `CardHeader`. Everything that
|
|
21
|
+
* component takes works here — `title`, `actions` (the ⋯ menu), `extras` (a
|
|
22
|
+
* filter chip), `isDraggable`, `hasRename`, … Omit it for a header-less
|
|
23
|
+
* widget.
|
|
24
|
+
*/
|
|
25
|
+
header?: CardHeaderProps;
|
|
26
|
+
/**
|
|
27
|
+
* The readout beside or above the plot — typically a `Metric`.
|
|
28
|
+
*
|
|
29
|
+
* - `'vertical'` (default) — metric above the plot, full width. The metric
|
|
30
|
+
* takes its natural height; the plot fills the rest of the card body.
|
|
31
|
+
* - `'horizontal'` — metric and plot side by side, each `flex-1`. Use for
|
|
32
|
+
* compact widgets (sm/288px) where vertical space is at a premium.
|
|
33
|
+
*
|
|
34
|
+
* Figma: vertical → `8174:22335`, horizontal → `8982:31681`.
|
|
35
|
+
*/
|
|
36
|
+
orientation?: 'vertical' | 'horizontal';
|
|
37
|
+
/**
|
|
38
|
+
* The readout beside or above the plot — typically a `Metric`. Layout is
|
|
39
|
+
* controlled by `orientation`.
|
|
40
|
+
*/
|
|
41
|
+
metric?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Show a placeholder instead of the plot, for a widget whose data isn't there
|
|
44
|
+
* yet. `error` also gives the card its error border.
|
|
45
|
+
*/
|
|
46
|
+
state?: ChartStateProps['state'];
|
|
47
|
+
/**
|
|
48
|
+
* Text below the placeholder illustration or glyph — defaults to
|
|
49
|
+
* `"Data is loading…"` / `"No data found"` / `"Something went wrong"`.
|
|
50
|
+
*/
|
|
51
|
+
stateDescription?: ChartStateProps['description'];
|
|
52
|
+
/** Trailing action on the `error` placeholder — e.g. a "Try again" button. */
|
|
53
|
+
stateAction?: ChartStateProps['action'];
|
|
54
|
+
/**
|
|
55
|
+
* Class for the card body. Rarely needed — the body already fills the card.
|
|
56
|
+
* Use it where nothing above gives a height and the content can't either, e.g.
|
|
57
|
+
* a placeholder-only widget outside a sized grid cell.
|
|
58
|
+
*/
|
|
59
|
+
bodyClassName?: string;
|
|
60
|
+
/** The chart. Replaced by the placeholder while `state` is set. */
|
|
61
|
+
children?: React.ReactNode;
|
|
62
|
+
}
|
|
63
|
+
declare const ChartWidget: React.ForwardRefExoticComponent<ChartWidgetProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
export { ChartWidget };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartWidget, type ChartWidgetProps } from './chart-widget';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ChartConfig, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition, ChartYAxisTarget, SecondaryYAxisProps } from '../chart';
|
|
2
|
+
import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCategoryRange, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition, ChartYAxisTarget, SecondaryYAxisProps } from '../chart';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const composedChartVariants: (props?: ({
|
|
5
5
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
@@ -35,8 +35,8 @@ export interface ComposedSeries {
|
|
|
35
35
|
*/
|
|
36
36
|
yAxis?: ChartYAxisTarget;
|
|
37
37
|
/**
|
|
38
|
-
* Paint for this series, overriding
|
|
39
|
-
*
|
|
38
|
+
* Paint for this series, overriding the stop of the container's `palette` it
|
|
39
|
+
* would otherwise take. Reference an existing semantic `--ui-*` token.
|
|
40
40
|
*/
|
|
41
41
|
color?: string;
|
|
42
42
|
/**
|
|
@@ -108,13 +108,18 @@ export interface ComposedChartReferenceArea extends ChartCategoryRange {
|
|
|
108
108
|
label?: string;
|
|
109
109
|
}
|
|
110
110
|
export interface ComposedChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof composedChartVariants>, CartesianChartProps, SecondaryYAxisProps, ChartAnimationProps, ChartBrushProps, ChartDataLabelProps {
|
|
111
|
+
/**
|
|
112
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
113
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
114
|
+
*/
|
|
115
|
+
palette?: ChartPalette;
|
|
111
116
|
/** Row-per-category data. Each object holds `xKey` + one numeric field per series (`null` breaks a line/area unless `connectNulls`). */
|
|
112
117
|
data: ReadonlyArray<Record<string, string | number | null>>;
|
|
113
118
|
/**
|
|
114
|
-
* Per-series map of `label` / `
|
|
115
|
-
* the shared `Chart` primitives). Turned into `--color-<key>`
|
|
116
|
-
* properties.
|
|
117
|
-
*
|
|
119
|
+
* Per-series map of `label` / `icon` / `tone`, keyed by `series[].key`
|
|
120
|
+
* (imported from the shared `Chart` primitives). Turned into `--color-<key>`
|
|
121
|
+
* custom properties. Series take their colour from the container's `palette`;
|
|
122
|
+
* each entry maps a key to a `label` and an optional `tone`.
|
|
118
123
|
*/
|
|
119
124
|
config: ChartConfig;
|
|
120
125
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartTooltip, ChartConfig, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
1
|
+
import { ChartTooltip, ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Drop every synthetic cone-band range series from a recharts tooltip/legend
|
|
@@ -82,6 +82,11 @@ export interface ConfidenceConeReferenceLine {
|
|
|
82
82
|
* and a story's. Not re-exported from `index.ts`; not part of the public API.
|
|
83
83
|
*/
|
|
84
84
|
export interface ConfidenceConeBaseProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps, ChartAnimationProps {
|
|
85
|
+
/**
|
|
86
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
87
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
88
|
+
*/
|
|
89
|
+
palette?: ChartPalette;
|
|
85
90
|
/**
|
|
86
91
|
* Row-per-point data — the shared x dimension plus each series' actual /
|
|
87
92
|
* forecast / bound fields. Rows are naturally sparse (a point has either an
|
|
@@ -91,10 +96,10 @@ export interface ConfidenceConeBaseProps extends Omit<React.ComponentProps<'div'
|
|
|
91
96
|
*/
|
|
92
97
|
data: ReadonlyArray<Record<string, string | number | null | undefined>>;
|
|
93
98
|
/**
|
|
94
|
-
* Per-series map of `label` / `
|
|
95
|
-
* (imported from the shared `Chart` primitives).
|
|
96
|
-
*
|
|
97
|
-
*
|
|
99
|
+
* Per-series map of `label` / `icon` / `tone` for the actual + forecast lines
|
|
100
|
+
* (imported from the shared `Chart` primitives). Series take their colour from
|
|
101
|
+
* the container's `palette`; each entry maps a key to a `label` and an optional
|
|
102
|
+
* `tone`. Each metric renders in one hue: its cone band and forecast line both
|
|
98
103
|
* reuse its actual series' color — actual and forecast differ by line style,
|
|
99
104
|
* not hue.
|
|
100
105
|
*/
|
|
@@ -2,7 +2,7 @@ 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?: "large" | "sm" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare const DialogRoot: typeof DialogPrimitive.Root;
|
|
8
8
|
declare const DialogTrigger: DialogPrimitive.Trigger;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const emptyOverlayIconVariants: (props?: ({
|
|
4
|
+
color?: "blue" | "green" | "gray" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface EmptyOverlayProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'color' | 'children'>, VariantProps<typeof emptyOverlayIconVariants> {
|
|
7
|
+
/** Icon rendered in the colored badge (e.g. an `icons-react` glyph at 24px). */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** The empty-state headline. */
|
|
10
|
+
title: React.ReactNode;
|
|
11
|
+
/** Supporting copy shown under the title. */
|
|
12
|
+
description?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A full-bleed empty-state overlay: a colored icon badge over a centered
|
|
16
|
+
* title/description, on a fade-to-solid backdrop. Size it via the parent
|
|
17
|
+
* (e.g. `absolute inset-0`) — the component fills whatever box it's given.
|
|
18
|
+
*/
|
|
19
|
+
declare const EmptyOverlay: React.ForwardRefExoticComponent<EmptyOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export { EmptyOverlay, emptyOverlayIconVariants };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ChartTooltip, ChartAnimationProps, ChartConfig, TickFormatter } from '../chart';
|
|
2
|
+
import { ChartTooltip, ChartAnimationProps, ChartConfig, ChartPalette, TickFormatter } from '../chart';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const funnelChartVariants: (props?: ({
|
|
5
5
|
lastShape?: "triangle" | "rectangle" | null | undefined;
|
|
@@ -120,13 +120,19 @@ export declare function funnelChartLabelText(options: {
|
|
|
120
120
|
percentFormatter?: TickFormatter;
|
|
121
121
|
}): string;
|
|
122
122
|
export interface FunnelChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof funnelChartVariants>, ChartAnimationProps {
|
|
123
|
+
/**
|
|
124
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
125
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
126
|
+
*/
|
|
127
|
+
palette?: ChartPalette;
|
|
123
128
|
/** Row-per-stage data. Each object holds the stage's `nameKey` label + its `dataKey` numeric value. */
|
|
124
129
|
data: ReadonlyArray<Record<string, string | number>>;
|
|
125
130
|
/**
|
|
126
|
-
* Per-stage map of `label` / `
|
|
127
|
-
* (imported from the shared `Chart` primitives). Turned into
|
|
128
|
-
* custom properties.
|
|
129
|
-
*
|
|
131
|
+
* Per-stage map of `label` / `icon` / `tone`, keyed by the stage's `nameKey`
|
|
132
|
+
* value (imported from the shared `Chart` primitives). Turned into
|
|
133
|
+
* `--color-<name>` custom properties. Series take their colour from the
|
|
134
|
+
* container's `palette`; each entry maps a key to a `label` and an optional
|
|
135
|
+
* `tone`.
|
|
130
136
|
*/
|
|
131
137
|
config: ChartConfig;
|
|
132
138
|
/** Numeric field that sizes each stage (the funnel narrows as it drops). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const gridVariants: (props?: ({
|
|
4
|
-
cols?: 1 | 2 |
|
|
4
|
+
cols?: 1 | 2 | 3 | 6 | 4 | 12 | null | undefined;
|
|
5
5
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartConfig, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
1
|
+
import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export interface HistogramBin {
|
|
4
4
|
/** Lower bound of the bin (inclusive). */
|
|
@@ -19,12 +19,18 @@ export interface HistogramBin {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function computeHistogramBins(values: ReadonlyArray<number>, binCount: number, domain?: [number, number]): HistogramBin[];
|
|
21
21
|
export interface HistogramProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps, ChartAnimationProps {
|
|
22
|
+
/**
|
|
23
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
24
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
25
|
+
*/
|
|
26
|
+
palette?: ChartPalette;
|
|
22
27
|
/** Raw continuous samples to bin (non-finite values are ignored). */
|
|
23
28
|
values: ReadonlyArray<number>;
|
|
24
29
|
/**
|
|
25
|
-
* Single-series map of `label` / `
|
|
26
|
-
* the shared `Chart` primitives).
|
|
27
|
-
*
|
|
30
|
+
* Single-series map of `label` / `icon` / `tone`, keyed by `dataKey` (imported
|
|
31
|
+
* from the shared `Chart` primitives). Series take their colour from the
|
|
32
|
+
* container's `palette`; each entry maps a key to a `label` and an optional
|
|
33
|
+
* `tone`.
|
|
28
34
|
*/
|
|
29
35
|
config: ChartConfig;
|
|
30
36
|
/** `config` key that colors + labels the frequency bars. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { labelClassName } from './label';
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const labelClassName = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";
|
|
3
|
-
export type LabelProps = React.ComponentPropsWithoutRef<'label'>;
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
export { Label, labelClassName };
|
|
1
|
+
export declare const labelClassName = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ChartTooltip, ChartConfig, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
|
|
2
|
+
import { ChartTooltip, ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartCurveType, ChartDataLabelProps, ChartReferenceLine, CartesianLabelPosition } from '../chart';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const lineChartVariants: (props?: ({
|
|
5
5
|
curve?: "step" | "linear" | "monotone" | "natural" | "basis" | "stepBefore" | "stepAfter" | null | undefined;
|
|
@@ -55,12 +55,17 @@ export interface LineChartLineSettings {
|
|
|
55
55
|
labelPosition?: CartesianLabelPosition;
|
|
56
56
|
}
|
|
57
57
|
export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof lineChartVariants>, CartesianChartProps, ChartAnimationProps, ChartBrushProps, ChartDataLabelProps {
|
|
58
|
+
/**
|
|
59
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
60
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
61
|
+
*/
|
|
62
|
+
palette?: ChartPalette;
|
|
58
63
|
/** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the line unless `connectNulls`). */
|
|
59
64
|
data: ReadonlyArray<Record<string, string | number | null>>;
|
|
60
65
|
/**
|
|
61
|
-
* Per-series map of `label` / `
|
|
62
|
-
* primitives). Series
|
|
63
|
-
*
|
|
66
|
+
* Per-series map of `label` / `icon` / `tone` (from the shared `Chart`
|
|
67
|
+
* primitives). Series take their colour from the container's `palette`; each
|
|
68
|
+
* entry maps a key to a `label` and an optional `tone`.
|
|
64
69
|
*/
|
|
65
70
|
config: ChartConfig;
|
|
66
71
|
/** Series to plot — one `<Line>` per key. Each must exist in `config` and in every data row. */
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
size?: "small" | "medium" | "large" | null | undefined;
|
|
5
|
-
status?: "info" | "success" | "warning" | "critical" | "danger" | "neutral" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface MetricProps extends React.ComponentProps<'div'>, VariantProps<typeof metricVariants> {
|
|
8
|
-
/** What the value measures — e.g. "Gross margin". Rendered as an uppercase note heading. */
|
|
9
|
-
label: React.ReactNode;
|
|
2
|
+
export interface MetricProps extends React.ComponentProps<'div'> {
|
|
10
3
|
/**
|
|
11
4
|
* The primary value, already formatted (`73`, `"94%"`, `"$72K"`, `"2.8"`).
|
|
12
5
|
* The kit does not format currency, units, or decimals.
|
|
@@ -14,15 +7,21 @@ export interface MetricProps extends React.ComponentProps<'div'>, VariantProps<t
|
|
|
14
7
|
value: React.ReactNode;
|
|
15
8
|
/** Unit shown next to the value at a smaller, muted size — e.g. `"%"`, `"hours"`. */
|
|
16
9
|
unit?: React.ReactNode;
|
|
17
|
-
/**
|
|
10
|
+
/** Caption at the right end of the stats row — e.g. a timeframe `Tag`. */
|
|
18
11
|
caption?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Trend direction — renders a `TrendIndicator` on its own row below the value.
|
|
14
|
+
* Sentiment follows direction: `up` → positive, `down` → negative, `stable` → neutral.
|
|
15
|
+
* Pair with `trendValue` for the change text.
|
|
16
|
+
*/
|
|
17
|
+
trend?: 'up' | 'down' | 'stable';
|
|
18
|
+
/** Change text shown next to the trend arrow — e.g. `"20%"`, `"+3"`. Requires `trend`. */
|
|
19
|
+
trendValue?: React.ReactNode;
|
|
20
|
+
/** Secondary line below the trend — e.g. "Target: 99%". */
|
|
22
21
|
supportingText?: React.ReactNode;
|
|
23
22
|
/** A small badge / metadata slot beside the value — e.g. a `Tag`. */
|
|
24
23
|
badge?: React.ReactNode;
|
|
25
|
-
/** Icon rendered in a status-tinted badge before the value. */
|
|
24
|
+
/** Icon rendered in a status-info-tinted badge before the value. */
|
|
26
25
|
icon?: React.ReactNode;
|
|
27
26
|
/** Contextual hint on an info affordance next to the label (Base UI Tooltip). */
|
|
28
27
|
tooltip?: React.ReactNode;
|
|
@@ -30,7 +29,7 @@ export interface MetricProps extends React.ComponentProps<'div'>, VariantProps<t
|
|
|
30
29
|
tooltipLabel?: string;
|
|
31
30
|
/** Show a skeleton in place of the value, preserving its space. */
|
|
32
31
|
loading?: boolean;
|
|
33
|
-
/**
|
|
32
|
+
/** Content below the stats strip — e.g. a chart, a `Separator`, an insight line. */
|
|
34
33
|
children?: React.ReactNode;
|
|
35
34
|
}
|
|
36
35
|
declare const Metric: React.ForwardRefExoticComponent<Omit<MetricProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ChartTooltip, ChartConfig, ChartTooltipContentProps, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
|
|
2
|
+
import { ChartTooltip, ChartConfig, ChartPalette, ChartTooltipContentProps, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const pieChartVariants: (props?: ({
|
|
5
|
-
shape?: "
|
|
5
|
+
shape?: "donut" | "pie" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
/** Row-per-slice datum: the `nameKey` label plus the `dataKey` value. */
|
|
8
8
|
type PieChartDatum = Record<string, string | number>;
|
|
@@ -81,13 +81,19 @@ export interface PieChartCenterLabel {
|
|
|
81
81
|
label?: string | number;
|
|
82
82
|
}
|
|
83
83
|
export interface PieChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof pieChartVariants>, ChartAnimationProps, ChartDataLabelProps {
|
|
84
|
+
/**
|
|
85
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
86
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
87
|
+
*/
|
|
88
|
+
palette?: ChartPalette;
|
|
84
89
|
/** Row-per-slice data. Each object holds the slice's `nameKey` label + its `dataKey` numeric value. */
|
|
85
90
|
data: ReadonlyArray<PieChartDatum>;
|
|
86
91
|
/**
|
|
87
|
-
* Per-slice map of `label` / `
|
|
88
|
-
* (imported from the shared `Chart` primitives). Turned into
|
|
89
|
-
* custom properties.
|
|
90
|
-
*
|
|
92
|
+
* Per-slice map of `label` / `icon` / `tone`, keyed by the slice's `nameKey`
|
|
93
|
+
* value (imported from the shared `Chart` primitives). Turned into
|
|
94
|
+
* `--color-<name>` custom properties. Series take their colour from the
|
|
95
|
+
* container's `palette`; each entry maps a key to a `label` and an optional
|
|
96
|
+
* `tone`.
|
|
91
97
|
*/
|
|
92
98
|
config: ChartConfig;
|
|
93
99
|
/** Numeric field that sizes each slice. */
|
|
@@ -136,8 +142,11 @@ export interface PieChartProps extends Omit<React.ComponentProps<'div'>, 'childr
|
|
|
136
142
|
sliceSettings?: Record<string, PieChartSliceSettings>;
|
|
137
143
|
showTooltip?: boolean;
|
|
138
144
|
showLegend?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Format each slice's value in the list legend. When omitted the raw value is
|
|
147
|
+
* stringified with `String()`.
|
|
148
|
+
*/
|
|
149
|
+
legendValueFormatter?: (value: string | number) => string;
|
|
141
150
|
/** Plot-area margin, in px. Omit to use recharts' default (5 on every side). */
|
|
142
151
|
margin?: {
|
|
143
152
|
top?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { AxisDomainItem } from 'recharts';
|
|
3
|
-
import { ChartTooltip, ChartConfig, ChartAnimationProps, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
|
|
3
|
+
import { ChartTooltip, ChartConfig, ChartPalette, ChartAnimationProps, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
declare const radarChartVariants: (props?: ({
|
|
6
6
|
gridType?: "circle" | "polygon" | null | undefined;
|
|
@@ -79,6 +79,11 @@ export interface RadarSeriesStyle {
|
|
|
79
79
|
*/
|
|
80
80
|
export declare function radarSeriesStyle(key: string, settings: RadarChartSeriesSettings | undefined, defaults: RadarSeriesDefaults): RadarSeriesStyle;
|
|
81
81
|
export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof radarChartVariants>, ChartAnimationProps, ChartDataLabelProps {
|
|
82
|
+
/**
|
|
83
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
84
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
85
|
+
*/
|
|
86
|
+
palette?: ChartPalette;
|
|
82
87
|
/**
|
|
83
88
|
* Row-per-axis data. Each object holds the `angleKey` label + one numeric field
|
|
84
89
|
* per series. Every plotted series needs a value in every row: recharts places a
|
|
@@ -86,10 +91,10 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
86
91
|
*/
|
|
87
92
|
data: ReadonlyArray<Record<string, string | number>>;
|
|
88
93
|
/**
|
|
89
|
-
* Per-series map of `label` / `
|
|
90
|
-
* primitives). Turned into `--color-<key>` custom properties. Series
|
|
91
|
-
*
|
|
92
|
-
*
|
|
94
|
+
* Per-series map of `label` / `icon` / `tone` (imported from the shared
|
|
95
|
+
* `Chart` primitives). Turned into `--color-<key>` custom properties. Series
|
|
96
|
+
* take their colour from the container's `palette`; each entry maps a key to a
|
|
97
|
+
* `label` and an optional `tone`.
|
|
93
98
|
*/
|
|
94
99
|
config: ChartConfig;
|
|
95
100
|
/** Series to plot — one `<Radar>` per key. Each must exist in `config` and in every data row. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartTooltip, ChartConfig, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
|
|
1
|
+
import { ChartTooltip, ChartConfig, ChartPalette, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/** Row-per-arc datum: the `nameKey` label plus each metric's numeric value. */
|
|
4
4
|
type RadialBarChartDatum = Record<string, string | number>;
|
|
@@ -117,14 +117,19 @@ export declare function RadialBarChartSegmentedTooltipContent({ active, payload,
|
|
|
117
117
|
*/
|
|
118
118
|
export declare function radialBarChartBandName(row: RadialBarChartDatum | undefined, nameKey: string): string;
|
|
119
119
|
export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, ChartAnimationProps, ChartDataLabelProps {
|
|
120
|
+
/**
|
|
121
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
122
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
123
|
+
*/
|
|
124
|
+
palette?: ChartPalette;
|
|
120
125
|
/** Row-per-arc data. Each object holds the arc's `nameKey` label + its `dataKey` numeric value. */
|
|
121
126
|
data: ReadonlyArray<RadialBarChartDatum>;
|
|
122
127
|
/**
|
|
123
|
-
* Per-arc map of `label` / `
|
|
124
|
-
* multi-metric mode, by each `dataKeys` entry (imported from the
|
|
125
|
-
* primitives). Turned into `--color-<name>` custom properties.
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
+
* Per-arc map of `label` / `icon` / `tone`, keyed by the arc's `nameKey` value
|
|
129
|
+
* — or, in multi-metric mode, by each `dataKeys` entry (imported from the
|
|
130
|
+
* shared `Chart` primitives). Turned into `--color-<name>` custom properties.
|
|
131
|
+
* Series take their colour from the container's `palette`; each entry maps a
|
|
132
|
+
* key to a `label` and an optional `tone`.
|
|
128
133
|
*/
|
|
129
134
|
config: ChartConfig;
|
|
130
135
|
/** Numeric field that sizes each arc. Ignored when `dataKeys` is set. */
|
|
@@ -223,6 +228,12 @@ export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, '
|
|
|
223
228
|
centerLabel?: RadialBarChartCenterLabel;
|
|
224
229
|
showTooltip?: boolean;
|
|
225
230
|
showLegend?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Format each arc's value in the list legend. In single-metric mode each arc
|
|
233
|
+
* row gets its formatted value next to its label; in multi-metric mode values
|
|
234
|
+
* are per-row (not per-series) so this is ignored.
|
|
235
|
+
*/
|
|
236
|
+
legendValueFormatter?: (value: string | number) => string;
|
|
226
237
|
/**
|
|
227
238
|
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
228
239
|
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartTooltip, ChartConfig } from '../chart';
|
|
1
|
+
import { ChartTooltip, ChartConfig, ChartPalette } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/** A node in the flow — `name` is its color/config key (CSS-safe, unique). */
|
|
4
4
|
export interface SankeyChartNode {
|
|
@@ -20,16 +20,21 @@ export interface SankeyChartLink {
|
|
|
20
20
|
color?: string;
|
|
21
21
|
}
|
|
22
22
|
export interface SankeyChartProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
23
|
+
/**
|
|
24
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
25
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
26
|
+
*/
|
|
27
|
+
palette?: ChartPalette;
|
|
23
28
|
/** The graph: `nodes` (color keys) + `links` (source/target indices + value). */
|
|
24
29
|
data: {
|
|
25
30
|
nodes: ReadonlyArray<SankeyChartNode>;
|
|
26
31
|
links: ReadonlyArray<SankeyChartLink>;
|
|
27
32
|
};
|
|
28
33
|
/**
|
|
29
|
-
* Per-node map of `label` / `
|
|
30
|
-
* the shared `Chart` primitives). Turned into `--color-<name>`
|
|
31
|
-
* properties.
|
|
32
|
-
*
|
|
34
|
+
* Per-node map of `label` / `icon` / `tone`, keyed by the node's `name`
|
|
35
|
+
* (imported from the shared `Chart` primitives). Turned into `--color-<name>`
|
|
36
|
+
* custom properties. Series take their colour from the container's `palette`;
|
|
37
|
+
* each entry maps a key to a `label` and an optional `tone`.
|
|
33
38
|
*/
|
|
34
39
|
config: ChartConfig;
|
|
35
40
|
/** Vertical gap between nodes in the same column. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartConfig, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
1
|
+
import { ChartConfig, ChartPalette, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export type ScatterMarkerShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
|
|
4
4
|
export interface ScatterSeries {
|
|
@@ -8,13 +8,18 @@ export interface ScatterSeries {
|
|
|
8
8
|
data: ReadonlyArray<Record<string, number>>;
|
|
9
9
|
}
|
|
10
10
|
export interface ScatterChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps, ChartAnimationProps {
|
|
11
|
+
/**
|
|
12
|
+
* The dataviz palette this chart's series are painted from. Series that
|
|
13
|
+
* state no `color` of their own take a stop of it. See `ChartPalette`.
|
|
14
|
+
*/
|
|
15
|
+
palette?: ChartPalette;
|
|
11
16
|
/** One `<Scatter>` per entry — each with its own point array. Use a single entry for an ungrouped scatter. */
|
|
12
17
|
series: ScatterSeries[];
|
|
13
18
|
/**
|
|
14
|
-
* Per-series map of `label` / `
|
|
15
|
-
* the shared `Chart` primitives). Turned into `--color-<key>`
|
|
16
|
-
* properties.
|
|
17
|
-
*
|
|
19
|
+
* Per-series map of `label` / `icon` / `tone`, keyed by `series[].key`
|
|
20
|
+
* (imported from the shared `Chart` primitives). Turned into `--color-<key>`
|
|
21
|
+
* custom properties. Series take their colour from the container's `palette`;
|
|
22
|
+
* each entry maps a key to a `label` and an optional `tone`.
|
|
18
23
|
*/
|
|
19
24
|
config: ChartConfig;
|
|
20
25
|
/** Numeric field for the horizontal axis. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Section, SectionHeader,
|
|
1
|
+
export { Section, SectionHeader, SectionContent, sectionVariants, useSectionContext, type SectionVariant, type SectionProps, type SectionHeaderProps, type SectionContentProps, } from './section';
|