twico-ui 1.8.0 → 1.9.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/CHANGELOG.md +21 -0
- package/dist/index.cjs +2849 -826
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +674 -10
- package/dist/index.d.ts +674 -10
- package/dist/index.mjs +2836 -827
- package/dist/index.mjs.map +1 -1
- package/llms.txt +508 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -546,23 +546,40 @@ declare function Carousel(props: CarouselProps): React.JSX.Element;
|
|
|
546
546
|
type ChartDatum<K extends string = "value"> = { label: React.ReactNode } & { [P in K]: number };
|
|
547
547
|
|
|
548
548
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
549
|
+
* Cartesian chart — vertical/horizontal bars (grouped or stacked), line, and area
|
|
550
|
+
* (straight / smooth / stepped), single or multi-series, with grid, axes, tooltips,
|
|
551
|
+
* and an optional legend. Dependency-free inline SVG. Generic over the series keys
|
|
552
|
+
* `K` so the data rows are type-checked (e.g.
|
|
553
|
+
* `<Chart series={["sales"]} data={[{ label, sales: 12 }]} />`). For pie/donut,
|
|
554
|
+
* scatter/bubble, radar, heatmap, gauge, funnel, treemap, candlestick, boxplot and
|
|
555
|
+
* range charts use the dedicated sibling components.
|
|
553
556
|
*
|
|
554
|
-
* @startingPoint section="Data display" subtitle="Bar / line chart (no deps)" viewport="700x280"
|
|
557
|
+
* @startingPoint section="Data display" subtitle="Bar / line / area chart (no deps)" viewport="700x280"
|
|
555
558
|
*/
|
|
556
559
|
interface ChartProps<K extends string = "value"> extends React.HTMLAttributes<HTMLDivElement> {
|
|
557
|
-
/** @default "bar" */
|
|
558
|
-
type?: "bar" | "line";
|
|
560
|
+
/** Chart type. `"column"` is an alias of `"bar"` (vertical bars). @default "bar" */
|
|
561
|
+
type?: "bar" | "column" | "line" | "area";
|
|
559
562
|
/** Data points. Each has a `label` + one numeric field per series key. (`K` is inferred from `series`, not from `data`.) */
|
|
560
563
|
data: ChartDatum<NoInfer<K>>[];
|
|
561
|
-
/** Series field names (defaults to `["value"]`). Multiple = grouped bars / multi-line. */
|
|
564
|
+
/** Series field names (defaults to `["value"]`). Multiple = grouped bars / multi-line / stacked. */
|
|
562
565
|
series?: K[];
|
|
563
566
|
/** Pixel height. @default 220 */
|
|
564
567
|
height?: number;
|
|
565
|
-
/**
|
|
568
|
+
/** Stack multi-series bars/areas instead of grouping them side by side. @default false */
|
|
569
|
+
stacked?: boolean;
|
|
570
|
+
/** Render bars horizontally (value axis along the bottom). Ignored for line/area. @default false */
|
|
571
|
+
horizontal?: boolean;
|
|
572
|
+
/** Line/area interpolation. @default "straight" */
|
|
573
|
+
curve?: "straight" | "smooth" | "stepped";
|
|
574
|
+
/** Shorthand for `curve="smooth"`. @default false */
|
|
575
|
+
smooth?: boolean;
|
|
576
|
+
/** Show point markers on line charts. @default true */
|
|
577
|
+
showDots?: boolean;
|
|
578
|
+
/** Print each value as a data label on the bars/points. @default false */
|
|
579
|
+
showValues?: boolean;
|
|
580
|
+
/** Play the entrance animation (bars grow, lines draw); respects `prefers-reduced-motion`. @default true */
|
|
581
|
+
animate?: boolean;
|
|
582
|
+
/** Grid lines. @default true */
|
|
566
583
|
showGrid?: boolean;
|
|
567
584
|
/** Axis labels. @default true */
|
|
568
585
|
showAxis?: boolean;
|
|
@@ -582,6 +599,653 @@ interface ChartProps<K extends string = "value"> extends React.HTMLAttributes<HT
|
|
|
582
599
|
|
|
583
600
|
declare function Chart<K extends string = "value">(props: ChartProps<K>): React.JSX.Element;
|
|
584
601
|
|
|
602
|
+
/** A single pie/donut slice: a `label`, its numeric `value`, and an optional override `color`. */
|
|
603
|
+
interface PieChartDatum {
|
|
604
|
+
/** Slice label (shown in the legend, tooltip, and hidden data table). */
|
|
605
|
+
label: React.ReactNode;
|
|
606
|
+
/** Slice magnitude; the share is `value / total`. Negative values are treated as `0`. */
|
|
607
|
+
value: number;
|
|
608
|
+
/** Optional per-slice CSS color; falls back to the cycled token palette. */
|
|
609
|
+
color?: string;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Pie / donut chart — proportional slices of a whole from a single value series,
|
|
614
|
+
* with per-slice tooltips, an optional legend, optional percentage labels, and a
|
|
615
|
+
* donut center label. Dependency-free inline SVG. For bar/line/area use `Chart`;
|
|
616
|
+
* for other shapes use the dedicated sibling components (gauge, radar, funnel, …).
|
|
617
|
+
*
|
|
618
|
+
* @startingPoint section="Data display" subtitle="Pie / donut chart (no deps)" viewport="700x280"
|
|
619
|
+
*/
|
|
620
|
+
interface PieChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
|
|
621
|
+
/** Slices to plot; each is a `{ label, value, color? }`. Only positive values contribute a slice. */
|
|
622
|
+
data: PieChartDatum[];
|
|
623
|
+
/** Render as a donut (ring) instead of a filled pie, using the default `innerRadius`. @default false */
|
|
624
|
+
donut?: boolean;
|
|
625
|
+
/** Inner-hole radius as a fraction (0..1) of the outer radius. @default 0.6 when `donut`, else 0 */
|
|
626
|
+
innerRadius?: number;
|
|
627
|
+
/** Angle (deg, clockwise from 12 o'clock) where the first slice starts. @default 0 */
|
|
628
|
+
startAngle?: number;
|
|
629
|
+
/** Gap (deg) inserted between adjacent slices. @default 0 */
|
|
630
|
+
padAngle?: number;
|
|
631
|
+
/** Draw a percentage label centered on each non-hairline slice. @default false */
|
|
632
|
+
showLabels?: boolean;
|
|
633
|
+
/** Show the slice legend below the chart. @default true */
|
|
634
|
+
showLegend?: boolean;
|
|
635
|
+
/** Content for a donut's center; defaults to the formatted total when `donut`. Ignored for a solid pie. */
|
|
636
|
+
centerLabel?: React.ReactNode;
|
|
637
|
+
/** Formatter for tooltip and hidden data-table values. @default toLocaleString */
|
|
638
|
+
valueFormat?: (value: number) => string;
|
|
639
|
+
/** Pixel height; the square chart is sized from this. @default 260 */
|
|
640
|
+
height?: number;
|
|
641
|
+
/** Per-slice colors (any CSS color), cycled when shorter than `data`. Defaults to the built-in token palette. */
|
|
642
|
+
colors?: string[];
|
|
643
|
+
/** Accessible name for the `<svg role="img">`. Per-slice values live in the hidden data table, not this label. Defaults to `"pie chart"`/`"donut chart"`; also accepts `aria-label`. */
|
|
644
|
+
ariaLabel?: string;
|
|
645
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
646
|
+
tableFallback?: boolean;
|
|
647
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
648
|
+
caption?: React.ReactNode;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
declare function PieChart(props: PieChartProps): React.JSX.Element;
|
|
652
|
+
|
|
653
|
+
/** A single donut slice — same shape as {@link PieChartDatum}. */
|
|
654
|
+
type DonutChartDatum = PieChartDatum;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Donut chart — a {@link PieChart} preset rendered as a ring (hollow center).
|
|
658
|
+
* Accepts every PieChart prop; `donut` defaults to `true`.
|
|
659
|
+
*
|
|
660
|
+
* @startingPoint section="Data display" subtitle="Donut chart (no deps)" viewport="700x280"
|
|
661
|
+
*/
|
|
662
|
+
interface DonutChartProps extends PieChartProps {}
|
|
663
|
+
|
|
664
|
+
declare function DonutChart(props: DonutChartProps): React.JSX.Element;
|
|
665
|
+
|
|
666
|
+
/** One radial bar in a multi-ring gauge — a value plus an optional label/color. */
|
|
667
|
+
interface GaugeSeries {
|
|
668
|
+
/** The ring's value, mapped through the shared `min`/`max` domain. */
|
|
669
|
+
value: number;
|
|
670
|
+
/** Legend label for this ring. */
|
|
671
|
+
label?: React.ReactNode;
|
|
672
|
+
/** Ring color (any CSS color); defaults to the built-in token palette, cycled. */
|
|
673
|
+
color?: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Radial gauge / radial-bar chart — renders a single `value` as a thick arc that
|
|
678
|
+
* sweeps between `startAngle` and `endAngle`, with the value + an optional caption
|
|
679
|
+
* in the center. Pass `series` to draw multiple concentric rings (radial-bar).
|
|
680
|
+
* Dependency-free inline SVG; every color/size is a design token so dark mode is
|
|
681
|
+
* automatic. For bar/line/area use `Chart`; for slices use `PieChart`/`DonutChart`.
|
|
682
|
+
*
|
|
683
|
+
* @startingPoint section="Data display" subtitle="Radial gauge / radial-bar (no deps)" viewport="700x280"
|
|
684
|
+
*/
|
|
685
|
+
interface GaugeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
|
|
686
|
+
/** The value to display, mapped from `min`..`max` onto the arc sweep. @default 0 */
|
|
687
|
+
value?: number;
|
|
688
|
+
/** Lower bound of the value domain (maps to `startAngle`). @default 0 */
|
|
689
|
+
min?: number;
|
|
690
|
+
/** Upper bound of the value domain (maps to `endAngle`). @default 100 */
|
|
691
|
+
max?: number;
|
|
692
|
+
/** Sweep start angle in degrees (0 = top, clockwise). @default -110 */
|
|
693
|
+
startAngle?: number;
|
|
694
|
+
/** Sweep end angle in degrees (0 = top, clockwise). @default 110 */
|
|
695
|
+
endAngle?: number;
|
|
696
|
+
/** Ring stroke width as a fraction of the radius. @default 0.16 */
|
|
697
|
+
thickness?: number;
|
|
698
|
+
/** Show the formatted value in the center (single gauge only). @default true */
|
|
699
|
+
showValue?: boolean;
|
|
700
|
+
/** Small caption rendered under the center value (single gauge only). */
|
|
701
|
+
label?: React.ReactNode;
|
|
702
|
+
/** Formats the center value + hidden-table cells; defaults to a rounded integer. */
|
|
703
|
+
valueFormat?: (value: number) => string;
|
|
704
|
+
/** Value-arc color (any CSS color). @default "var(--color-primary)" */
|
|
705
|
+
color?: string;
|
|
706
|
+
/** Background track color (any CSS color). @default "var(--color-surface-sunken)" */
|
|
707
|
+
trackColor?: string;
|
|
708
|
+
/** SVG width/height in pixels (the gauge is square). @default 200 */
|
|
709
|
+
size?: number;
|
|
710
|
+
/** Multiple concentric radial bars; when set, the single `value`/`label` are ignored. */
|
|
711
|
+
series?: GaugeSeries[];
|
|
712
|
+
/** Show the legend for a multi-ring (`series`) gauge. @default true */
|
|
713
|
+
showLegend?: boolean;
|
|
714
|
+
/** Accessible name for the `<svg role="img">`; defaults to a value summary. Also accepts `aria-label`. */
|
|
715
|
+
ariaLabel?: string;
|
|
716
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
717
|
+
tableFallback?: boolean;
|
|
718
|
+
/** Caption for the hidden data table; defaults to the gauge's accessible label. */
|
|
719
|
+
caption?: React.ReactNode;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
declare function Gauge(props: GaugeProps): React.JSX.Element;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* A Sparkline data point: either a bare number, or an object with a numeric
|
|
726
|
+
* `value` plus an optional `label` (used only for tooltips / the hidden table).
|
|
727
|
+
*/
|
|
728
|
+
type SparklineDatum = number | { value: number; label?: React.ReactNode };
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Sparkline — a minimal, word-sized trend chart (line, area, or bars) with no
|
|
732
|
+
* axes, grid, ticks, or legend, meant to sit inline beside text or inside a
|
|
733
|
+
* table cell / stat tile. Dependency-free inline SVG that scales to fill its
|
|
734
|
+
* vertical space, with an optional emphasised trailing dot. For a full chart
|
|
735
|
+
* with axes, tooltips, and a legend use the `Chart` component.
|
|
736
|
+
*
|
|
737
|
+
* @startingPoint section="Data display" subtitle="Tiny inline trend line (no deps)" viewport="700x280"
|
|
738
|
+
*/
|
|
739
|
+
interface SparklineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
|
|
740
|
+
/** Data points: bare numbers, or `{ value, label }` objects. */
|
|
741
|
+
data: SparklineDatum[];
|
|
742
|
+
/** Trend style. `"area"` fills below the line; `"bar"` draws thin columns. @default "line" */
|
|
743
|
+
type?: "line" | "area" | "bar";
|
|
744
|
+
/** Shorthand for `type="area"` (fills the region below the line). @default false */
|
|
745
|
+
area?: boolean;
|
|
746
|
+
/** Stroke / fill color (any CSS color). @default "var(--color-primary)" */
|
|
747
|
+
color?: string;
|
|
748
|
+
/** Viewbox width in pixels. @default 120 */
|
|
749
|
+
width?: number;
|
|
750
|
+
/** Pixel height. @default 40 */
|
|
751
|
+
height?: number;
|
|
752
|
+
/** Line stroke width in pixels (ignored for bars). @default 2 */
|
|
753
|
+
strokeWidth?: number;
|
|
754
|
+
/** Line/area interpolation. @default "smooth" */
|
|
755
|
+
curve?: "straight" | "smooth" | "stepped";
|
|
756
|
+
/** Emphasize the last point with a filled dot. @default false */
|
|
757
|
+
showDots?: boolean;
|
|
758
|
+
/** Pin the low end of the value scale (else derived from the data's minimum). */
|
|
759
|
+
min?: number;
|
|
760
|
+
/** Pin the high end of the value scale (else derived from the data's maximum). */
|
|
761
|
+
max?: number;
|
|
762
|
+
/** Value formatter for tooltips + the hidden data table. @default toLocaleString */
|
|
763
|
+
valueFormat?: (value: number) => string;
|
|
764
|
+
/** Accessible name for the `<svg role="img">`; defaults to a spoken summary (point count + first/last/min/max, or +latest when a table is present). Also accepts `aria-label`. */
|
|
765
|
+
ariaLabel?: string;
|
|
766
|
+
/** Render a visually-hidden data table as a text alternative (WCAG 1.1.1); off by default since the summarizing aria-label usually suffices for a sparkline. @default false */
|
|
767
|
+
tableFallback?: boolean;
|
|
768
|
+
/** Caption for the hidden data table; defaults to the accessible label. */
|
|
769
|
+
caption?: React.ReactNode;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
declare function Sparkline(props: SparklineProps): React.JSX.Element;
|
|
773
|
+
|
|
774
|
+
/** A single x/y point, with an optional `z` (bubble size) and a display `label`. */
|
|
775
|
+
interface ScatterPoint {
|
|
776
|
+
/** Horizontal value (mapped to the x axis). */
|
|
777
|
+
x: number;
|
|
778
|
+
/** Vertical value (mapped to the y axis). */
|
|
779
|
+
y: number;
|
|
780
|
+
/** Optional third dimension — sizes the dot when the chart is in bubble mode. */
|
|
781
|
+
z?: number;
|
|
782
|
+
/** Optional per-point label used in the tooltip (falls back to the series name). */
|
|
783
|
+
label?: React.ReactNode;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/** One plotted series: an optional name/color plus its list of points. */
|
|
787
|
+
interface ScatterSeries {
|
|
788
|
+
/** Series name — shown in the legend and used as the tooltip/table label. */
|
|
789
|
+
name?: string;
|
|
790
|
+
/** Series color (any CSS color); defaults to the built-in token palette, cycled. */
|
|
791
|
+
color?: string;
|
|
792
|
+
/** The series' data points. */
|
|
793
|
+
points: ScatterPoint[];
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Scatter / bubble chart — plots x/y points across two nice-scaled numeric axes,
|
|
798
|
+
* one or many series, with grid, axis titles, tooltips, an optional legend and a
|
|
799
|
+
* hidden data table. Give points a numeric `z` (or set `bubble`) to size the dots
|
|
800
|
+
* by a third dimension. Dependency-free inline SVG; keeps its aspect ratio so the
|
|
801
|
+
* dots stay round. For bars/line/area use `Chart`; for other shapes use the
|
|
802
|
+
* dedicated sibling components.
|
|
803
|
+
*
|
|
804
|
+
* @startingPoint section="Data display" subtitle="Scatter / bubble plot (no deps)" viewport="700x280"
|
|
805
|
+
*/
|
|
806
|
+
interface ScatterChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
|
|
807
|
+
/** The series to plot; each has optional `name`/`color` and a list of `{ x, y, z?, label? }` points. */
|
|
808
|
+
series: ScatterSeries[];
|
|
809
|
+
/** Size the dots by their `z` value (bubble chart). Auto-enabled when any point has a numeric `z`. @default false */
|
|
810
|
+
bubble?: boolean;
|
|
811
|
+
/** Maximum bubble radius in pixels (the largest `z` maps to this). @default 26 */
|
|
812
|
+
maxBubble?: number;
|
|
813
|
+
/** Fixed dot radius in pixels when not in bubble mode. @default 4.5 */
|
|
814
|
+
dotRadius?: number;
|
|
815
|
+
/** Pixel height (also sets the SVG aspect ratio). @default 300 */
|
|
816
|
+
height?: number;
|
|
817
|
+
/** Axis title drawn beneath the x axis. */
|
|
818
|
+
xLabel?: React.ReactNode;
|
|
819
|
+
/** Axis title drawn (rotated) beside the y axis. */
|
|
820
|
+
yLabel?: React.ReactNode;
|
|
821
|
+
/** Grid lines. @default true */
|
|
822
|
+
showGrid?: boolean;
|
|
823
|
+
/** Series legend. Defaults to `true` when there is more than one series. */
|
|
824
|
+
showLegend?: boolean;
|
|
825
|
+
/** Formatter for x values in tooltips + the hidden table (defaults to `valueFormat`). */
|
|
826
|
+
xFormat?: (value: number) => string;
|
|
827
|
+
/** Formatter for y values in tooltips + the hidden table (defaults to `valueFormat`). */
|
|
828
|
+
yFormat?: (value: number) => string;
|
|
829
|
+
/** Fallback value formatter for x/y/z (locale-grouped numbers by default). */
|
|
830
|
+
valueFormat?: (value: number) => string;
|
|
831
|
+
/** Accessible name for the chart's `<svg role="img">`. Per-point values are exposed via the hidden data table, not this label. Defaults to `"scatter chart"` / `"bubble chart"`; also accepts `aria-label`. */
|
|
832
|
+
ariaLabel?: string;
|
|
833
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
834
|
+
tableFallback?: boolean;
|
|
835
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
836
|
+
caption?: React.ReactNode;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare function ScatterChart(props: ScatterChartProps): React.JSX.Element;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Bubble chart — a {@link ScatterChart} preset that sizes each dot by its point's
|
|
843
|
+
* `z` value. Accepts every ScatterChart prop; `bubble` defaults to `true`.
|
|
844
|
+
*
|
|
845
|
+
* @startingPoint section="Data display" subtitle="Bubble chart (no deps)" viewport="700x280"
|
|
846
|
+
*/
|
|
847
|
+
interface BubbleChartProps extends ScatterChartProps {}
|
|
848
|
+
|
|
849
|
+
declare function BubbleChart(props: BubbleChartProps): React.JSX.Element;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* A radar-chart row: each row is one **axis** (category), carrying a `label`
|
|
853
|
+
* plus one numeric field per series key `K`. `K` is normally inferred from the
|
|
854
|
+
* `series` prop (e.g. `{ label: "Speed", team: 80, rival: 65 }`).
|
|
855
|
+
*/
|
|
856
|
+
type RadarDatum<K extends string = "value"> = { label: React.ReactNode } & { [P in K]: number };
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Radar / spider chart — one or more series drawn as closed polygons over a
|
|
860
|
+
* shared set of categorical axes radiating from a center, with concentric grid
|
|
861
|
+
* rings, spokes, per-axis labels, tooltips, and an optional legend. Dependency-free
|
|
862
|
+
* inline SVG. Generic over the series keys `K` so the data rows are type-checked
|
|
863
|
+
* (e.g. `<RadarChart series={["team"]} data={[{ label: "Speed", team: 80 }]} />`).
|
|
864
|
+
* For cartesian bars/lines/areas use `Chart`; for other shapes use the dedicated
|
|
865
|
+
* sibling components.
|
|
866
|
+
*
|
|
867
|
+
* @startingPoint section="Data display" subtitle="Radar / spider chart (no deps)" viewport="700x280"
|
|
868
|
+
*/
|
|
869
|
+
interface RadarChartProps<K extends string = "value"> extends React.HTMLAttributes<HTMLDivElement> {
|
|
870
|
+
/** Data rows — one per **axis**. Each has a `label` + one numeric field per series key. (`K` is inferred from `series`, not from `data`.) */
|
|
871
|
+
data: RadarDatum<NoInfer<K>>[];
|
|
872
|
+
/** Series field names to plot as polygons (defaults to `["value"]`). Multiple = several overlaid polygons. */
|
|
873
|
+
series?: K[];
|
|
874
|
+
/** Radial maximum (the value at the outer ring). Defaults to a "nice" ceiling of the largest datum. */
|
|
875
|
+
max?: number;
|
|
876
|
+
/** Number of concentric grid rings. @default 4 */
|
|
877
|
+
levels?: number;
|
|
878
|
+
/** Fill each polygon at low opacity (in addition to its stroke). @default true */
|
|
879
|
+
fill?: boolean;
|
|
880
|
+
/** Series legend. Defaults to `true` when more than one series is plotted, else `false`. */
|
|
881
|
+
showLegend?: boolean;
|
|
882
|
+
/** Draw a marker dot at each polygon vertex. @default true */
|
|
883
|
+
showDots?: boolean;
|
|
884
|
+
/** Per-series colors (any CSS color), cycled when shorter than `series`. Defaults to the built-in token palette. */
|
|
885
|
+
colors?: string[];
|
|
886
|
+
/** Tooltip value formatter (also formats the hidden data-table cells). */
|
|
887
|
+
valueFormat?: (value: number) => string;
|
|
888
|
+
/** Pixel height; the chart uses a square canvas of this size. @default 300 */
|
|
889
|
+
height?: number;
|
|
890
|
+
/** Accessible name for the chart's `<svg role="img">`. Per-point values are exposed via the hidden data table, not this label. Defaults to `"radar chart"`; also accepts `aria-label`. */
|
|
891
|
+
ariaLabel?: string;
|
|
892
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
893
|
+
tableFallback?: boolean;
|
|
894
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
895
|
+
caption?: React.ReactNode;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
declare function RadarChart<K extends string = "value">(props: RadarChartProps<K>): React.JSX.Element;
|
|
899
|
+
|
|
900
|
+
/** A single polar-area slice: a `label`, its numeric `value`, and an optional override `color`. */
|
|
901
|
+
interface PolarAreaDatum {
|
|
902
|
+
/** Category label — shown in the legend, the per-slice tooltip, and the hidden data table. */
|
|
903
|
+
label: React.ReactNode;
|
|
904
|
+
/** The value this slice encodes; its radius scales with the square root so the slice's area is proportional. */
|
|
905
|
+
value: number;
|
|
906
|
+
/** Optional fixed CSS color for this slice (overrides the cycled palette color). */
|
|
907
|
+
color?: string;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Polar-area (Coxcomb / Nightingale rose) chart — equal-angle slices whose
|
|
912
|
+
* *radius* encodes each value, laid over concentric value rings. Radius scales
|
|
913
|
+
* with `√value` so a slice's **area** is proportional to its value (the
|
|
914
|
+
* statistically honest encoding). Dependency-free inline SVG, with per-slice
|
|
915
|
+
* tooltips, an optional legend, and a visually-hidden data table. For plain
|
|
916
|
+
* proportional wedges use `PieChart` / `DonutChart`; for a spoked multi-axis
|
|
917
|
+
* shape use `RadarChart`.
|
|
918
|
+
*
|
|
919
|
+
* @startingPoint section="Data display" subtitle="Polar-area / rose chart (no deps)" viewport="700x280"
|
|
920
|
+
*/
|
|
921
|
+
interface PolarAreaChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
922
|
+
/** Data points — one equal-angle slice each, in order clockwise from `startAngle`. */
|
|
923
|
+
data: PolarAreaDatum[];
|
|
924
|
+
/** Radial maximum (the value at the outer ring). Defaults to a "nice" ceiling of the largest value. */
|
|
925
|
+
max?: number;
|
|
926
|
+
/** Number of concentric grid rings (and value tick labels). @default 4 */
|
|
927
|
+
levels?: number;
|
|
928
|
+
/** Angle in degrees of the first slice's leading edge, clockwise from 12 o'clock. @default 0 */
|
|
929
|
+
startAngle?: number;
|
|
930
|
+
/** Show the per-slice legend. @default true */
|
|
931
|
+
showLegend?: boolean;
|
|
932
|
+
/** Tooltip value formatter (also formats the hidden data-table cells). @default fmtNumber */
|
|
933
|
+
valueFormat?: (value: number) => string;
|
|
934
|
+
/** Pixel height; the square plotting area is centered within the full-width container. @default 280 */
|
|
935
|
+
height?: number;
|
|
936
|
+
/** Per-slice colors (any CSS color), cycled across slices. Defaults to the built-in token palette. */
|
|
937
|
+
colors?: string[];
|
|
938
|
+
/** Accessible name for the chart's `<svg role="img">`. Defaults to `"polar area chart"`; also accepts `aria-label`. */
|
|
939
|
+
ariaLabel?: string;
|
|
940
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
941
|
+
tableFallback?: boolean;
|
|
942
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
943
|
+
caption?: React.ReactNode;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
declare function PolarAreaChart(props: PolarAreaChartProps): React.JSX.Element;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* One heatmap cell: an `x` (column) and `y` (row) coordinate plus a numeric
|
|
950
|
+
* `value` that drives the cell's color intensity. Missing (x, y) combinations
|
|
951
|
+
* render as faint empty cells.
|
|
952
|
+
*/
|
|
953
|
+
interface HeatmapDatum {
|
|
954
|
+
/** Column key. Column order follows first appearance in `data`. */
|
|
955
|
+
x: string | number;
|
|
956
|
+
/** Row key. Row order follows first appearance in `data`. */
|
|
957
|
+
y: string | number;
|
|
958
|
+
/** Numeric magnitude mapped onto the `min`…`max` color scale. */
|
|
959
|
+
value: number;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Heatmap — a matrix of colored cells keyed by (x, y), each shaded by a
|
|
964
|
+
* single-hue intensity scale between `min` and `max`. Ordered X columns and Y
|
|
965
|
+
* rows are derived from the data in first-seen order; absent cells render faint.
|
|
966
|
+
* Dependency-free inline SVG, with per-cell tooltips, a gradient scale legend,
|
|
967
|
+
* and a visually-hidden data table. Dark mode is automatic through tokens.
|
|
968
|
+
*
|
|
969
|
+
* @startingPoint section="Data display" subtitle="Matrix heatmap (no deps)" viewport="700x280"
|
|
970
|
+
*/
|
|
971
|
+
interface HeatmapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
972
|
+
/** Cells to plot. X columns and Y rows are derived from these in first-seen order. */
|
|
973
|
+
data: HeatmapDatum[];
|
|
974
|
+
/** Low end of the color scale. Defaults to the minimum value in `data`. */
|
|
975
|
+
min?: number;
|
|
976
|
+
/** High end of the color scale. Defaults to the maximum value in `data`. */
|
|
977
|
+
max?: number;
|
|
978
|
+
/** Base token color for the high end; cells mix it over transparent by intensity. @default "var(--brand-500)" */
|
|
979
|
+
colorScale?: string;
|
|
980
|
+
/** Print each cell's formatted value at its center. @default false */
|
|
981
|
+
showValues?: boolean;
|
|
982
|
+
/** Gap in pixels between adjacent cells. @default 2 */
|
|
983
|
+
cellGap?: number;
|
|
984
|
+
/** Cell corner radius in pixels. @default 2 */
|
|
985
|
+
radius?: number;
|
|
986
|
+
/** Optional title rendered beneath the X-axis category labels. */
|
|
987
|
+
xLabel?: React.ReactNode;
|
|
988
|
+
/** Optional title rendered rotated alongside the Y-axis category labels. */
|
|
989
|
+
yLabel?: React.ReactNode;
|
|
990
|
+
/** Show the low→high gradient scale legend below the grid. @default true */
|
|
991
|
+
showLegend?: boolean;
|
|
992
|
+
/** Value formatter for tooltips, printed cell values, and the hidden table. @default fmtNumber */
|
|
993
|
+
valueFormat?: (value: number) => string;
|
|
994
|
+
/** Pixel height of the chart. @default 300 */
|
|
995
|
+
height?: number;
|
|
996
|
+
/** Accessible name for the chart's `<svg role="img">`. Per-cell values are exposed via the hidden data table, not this label. Defaults to `"heatmap"`; also accepts `aria-label`. */
|
|
997
|
+
ariaLabel?: string;
|
|
998
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
999
|
+
tableFallback?: boolean;
|
|
1000
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1001
|
+
caption?: React.ReactNode;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
declare function Heatmap(props: HeatmapProps): React.JSX.Element;
|
|
1005
|
+
|
|
1006
|
+
/** A funnel stage: a `label`, its numeric `value`, and an optional override `color`. */
|
|
1007
|
+
interface FunnelDatum {
|
|
1008
|
+
/** Stage name, rendered centered on the band and in the hidden data table. */
|
|
1009
|
+
label: React.ReactNode;
|
|
1010
|
+
/** Stage magnitude. Band width (or height, when horizontal) is scaled to the largest stage. */
|
|
1011
|
+
value: number;
|
|
1012
|
+
/** Optional fill for this stage (any CSS color); defaults to the cycled token palette. */
|
|
1013
|
+
color?: string;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Funnel chart — descending stages drawn as centered trapezoids that taper from
|
|
1018
|
+
* each stage's value to the next, for conversion / drop-off flows. Each band is
|
|
1019
|
+
* scaled to the largest stage, with the top stage as the 100% baseline for the
|
|
1020
|
+
* per-stage percentage. Dependency-free inline SVG with per-band `<title>` tooltips
|
|
1021
|
+
* and a visually-hidden data table. For bars/lines/areas use `Chart`; for part-of-whole
|
|
1022
|
+
* shares use `PieChart`.
|
|
1023
|
+
*
|
|
1024
|
+
* @startingPoint section="Data display" subtitle="Descending funnel stages (no deps)" viewport="700x280"
|
|
1025
|
+
*/
|
|
1026
|
+
interface FunnelChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1027
|
+
/** Funnel stages, ordered from the widest/top stage to the narrowest. */
|
|
1028
|
+
data: FunnelDatum[];
|
|
1029
|
+
/** Print each stage's formatted value in its centered caption. @default true */
|
|
1030
|
+
showValues?: boolean;
|
|
1031
|
+
/** Print each stage's percentage of the first (top) stage in its caption. @default true */
|
|
1032
|
+
showPercent?: boolean;
|
|
1033
|
+
/** Lay the funnel out left→right (tapering vertically) instead of top→bottom. @default false */
|
|
1034
|
+
horizontal?: boolean;
|
|
1035
|
+
/** Pixel gap between adjacent stages. @default 2 */
|
|
1036
|
+
gap?: number;
|
|
1037
|
+
/** Pixel height of the chart. @default 300 */
|
|
1038
|
+
height?: number;
|
|
1039
|
+
/** Per-stage colors (any CSS color), cycled when shorter than `data`. Defaults to the token palette. */
|
|
1040
|
+
colors?: string[];
|
|
1041
|
+
/** Value formatter for captions, tooltips, and the hidden data-table cells. @default toLocaleString */
|
|
1042
|
+
valueFormat?: (value: number) => string;
|
|
1043
|
+
/** Accessible name for the chart's `<svg role="img">`; per-stage values live in the hidden table. Defaults to `"funnel chart"`; also accepts `aria-label`. */
|
|
1044
|
+
ariaLabel?: string;
|
|
1045
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
1046
|
+
tableFallback?: boolean;
|
|
1047
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1048
|
+
caption?: React.ReactNode;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
declare function FunnelChart(props: FunnelChartProps): React.JSX.Element;
|
|
1052
|
+
|
|
1053
|
+
/** One treemap tile: a `label`, its numeric `value` (relative area), and an optional override `color`. */
|
|
1054
|
+
interface TreemapDatum {
|
|
1055
|
+
/** Tile label — rendered inside the tile when it fits and as the data-table row header. */
|
|
1056
|
+
label: React.ReactNode;
|
|
1057
|
+
/** Non-negative magnitude; the tile's area is this value as a share of the total (negatives are clamped to 0). */
|
|
1058
|
+
value: number;
|
|
1059
|
+
/** Optional per-tile fill (any CSS color); overrides the cycled palette color for this tile. */
|
|
1060
|
+
color?: string;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Treemap — a squarified partition of a rectangle into tiles sized in proportion
|
|
1065
|
+
* to a flat list of values (Bruls/Huizing/van Wijk squarified layout), packed to
|
|
1066
|
+
* keep tile aspect ratios near 1:1. Dependency-free inline SVG with per-tile
|
|
1067
|
+
* labels, hover tooltips, and a visually-hidden data table. Good for showing the
|
|
1068
|
+
* relative weight of parts within a whole (spend by category, storage by bucket).
|
|
1069
|
+
*
|
|
1070
|
+
* @startingPoint section="Data display" subtitle="Squarified treemap (no deps)" viewport="700x280"
|
|
1071
|
+
*/
|
|
1072
|
+
interface TreemapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1073
|
+
/** Tiles to lay out. Each has a `label`, a non-negative `value`, and an optional `color`. */
|
|
1074
|
+
data: TreemapDatum[];
|
|
1075
|
+
/** Draw the value under the label inside tiles tall enough to fit both lines. @default true */
|
|
1076
|
+
showValues?: boolean;
|
|
1077
|
+
/** Formatter for the tooltip, in-tile value, and data-table cells. @default toLocaleString */
|
|
1078
|
+
valueFormat?: (value: number) => string;
|
|
1079
|
+
/** Pixel height (also sets the SVG's aspect ratio; width fills the container). @default 300 */
|
|
1080
|
+
height?: number;
|
|
1081
|
+
/** Tile colors (any CSS color), cycled by index. Defaults to the built-in token palette; a datum's `color` wins. */
|
|
1082
|
+
colors?: string[];
|
|
1083
|
+
/** Gap in px inset between adjacent tiles. @default 2 */
|
|
1084
|
+
gap?: number;
|
|
1085
|
+
/** Accessible name for the chart's `<svg role="img">`. Per-tile values are exposed via the hidden data table, not this label. Defaults to `"treemap"`; also accepts `aria-label`. */
|
|
1086
|
+
ariaLabel?: string;
|
|
1087
|
+
/** Render a visually-hidden data table (value + share) as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
1088
|
+
tableFallback?: boolean;
|
|
1089
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1090
|
+
caption?: React.ReactNode;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
declare function Treemap(props: TreemapProps): React.JSX.Element;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* One OHLC period: a `label` plus the `open`, `high`, `low` and `close` prices.
|
|
1097
|
+
* The body spans open→close and the wick spans low→high.
|
|
1098
|
+
*/
|
|
1099
|
+
interface CandlestickDatum {
|
|
1100
|
+
/** Period label shown on the x axis (and in the hidden data table). */
|
|
1101
|
+
label: React.ReactNode;
|
|
1102
|
+
/** Opening price for the period. */
|
|
1103
|
+
open: number;
|
|
1104
|
+
/** Highest price reached in the period (top of the wick). */
|
|
1105
|
+
high: number;
|
|
1106
|
+
/** Lowest price reached in the period (bottom of the wick). */
|
|
1107
|
+
low: number;
|
|
1108
|
+
/** Closing price for the period; `close >= open` renders an up (green) candle. */
|
|
1109
|
+
close: number;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Candlestick (OHLC) chart — one candle per period with a high→low wick and an
|
|
1114
|
+
* open→close body, colored by direction (up vs. down), plus a shared value axis,
|
|
1115
|
+
* grid, per-candle tooltips and an accessible data table. Dependency-free inline
|
|
1116
|
+
* SVG. For bars/lines/areas use `Chart`; for other shapes use the dedicated
|
|
1117
|
+
* sibling chart components.
|
|
1118
|
+
*
|
|
1119
|
+
* @startingPoint section="Data display" subtitle="OHLC candlestick chart (no deps)" viewport="700x280"
|
|
1120
|
+
*/
|
|
1121
|
+
interface CandlestickProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1122
|
+
/** OHLC data points, one candle each, in chronological order. */
|
|
1123
|
+
data: CandlestickDatum[];
|
|
1124
|
+
/** Color for up candles (`close >= open`), any CSS color. @default "var(--color-success)" */
|
|
1125
|
+
upColor?: string;
|
|
1126
|
+
/** Color for down candles (`close < open`), any CSS color. @default "var(--color-danger)" */
|
|
1127
|
+
downColor?: string;
|
|
1128
|
+
/** Pixel height. @default 300 */
|
|
1129
|
+
height?: number;
|
|
1130
|
+
/** Horizontal value grid lines. @default true */
|
|
1131
|
+
showGrid?: boolean;
|
|
1132
|
+
/** Value axis + category labels. @default true */
|
|
1133
|
+
showAxis?: boolean;
|
|
1134
|
+
/** Tooltip value formatter (also formats the hidden data-table cells). @default toLocaleString */
|
|
1135
|
+
valueFormat?: (value: number) => string;
|
|
1136
|
+
/** Accessible name for the chart's `<svg role="img">`. Defaults to `"candlestick chart"`; also accepts `aria-label`. */
|
|
1137
|
+
ariaLabel?: string;
|
|
1138
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
1139
|
+
tableFallback?: boolean;
|
|
1140
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1141
|
+
caption?: React.ReactNode;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
declare function Candlestick(props: CandlestickProps): React.JSX.Element;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* A single box-and-whisker summary: a `label` plus the five-number distribution
|
|
1148
|
+
* (`min`, `q1`, `median`, `q3`, `max`) and optional `outliers` drawn as points.
|
|
1149
|
+
*/
|
|
1150
|
+
interface BoxplotDatum {
|
|
1151
|
+
/** Category label, rendered under the box and in the hidden data table. */
|
|
1152
|
+
label: React.ReactNode;
|
|
1153
|
+
/** Lower whisker end (distribution minimum, excluding outliers). */
|
|
1154
|
+
min: number;
|
|
1155
|
+
/** First quartile — the bottom edge of the box. */
|
|
1156
|
+
q1: number;
|
|
1157
|
+
/** Median — the bold line inside the box. */
|
|
1158
|
+
median: number;
|
|
1159
|
+
/** Third quartile — the top edge of the box. */
|
|
1160
|
+
q3: number;
|
|
1161
|
+
/** Upper whisker end (distribution maximum, excluding outliers). */
|
|
1162
|
+
max: number;
|
|
1163
|
+
/** Individual outlier values drawn as small circles beyond the whiskers. */
|
|
1164
|
+
outliers?: number[];
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Box-and-whisker chart — one box per category summarising a five-number
|
|
1169
|
+
* distribution (min, Q1, median, Q3, max) with whiskers, a bold median line,
|
|
1170
|
+
* and optional outlier points. Dependency-free inline SVG, theme-aware via
|
|
1171
|
+
* design tokens. For bar/line/area use `Chart`; for other shapes use the
|
|
1172
|
+
* dedicated sibling components.
|
|
1173
|
+
*
|
|
1174
|
+
* @startingPoint section="Data display" subtitle="Box-and-whisker distribution chart" viewport="700x280"
|
|
1175
|
+
*/
|
|
1176
|
+
interface BoxplotProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1177
|
+
/** The boxes to plot, one per category, each a five-number summary. */
|
|
1178
|
+
data: BoxplotDatum[];
|
|
1179
|
+
/** Box fill/stroke accent (any CSS color). @default "var(--color-primary)" */
|
|
1180
|
+
color?: string;
|
|
1181
|
+
/** Pixel height. @default 300 */
|
|
1182
|
+
height?: number;
|
|
1183
|
+
/** Horizontal grid lines at the value ticks. @default true */
|
|
1184
|
+
showGrid?: boolean;
|
|
1185
|
+
/** Value axis and category labels. @default true */
|
|
1186
|
+
showAxis?: boolean;
|
|
1187
|
+
/** Tooltip/table value formatter. @default toLocaleString */
|
|
1188
|
+
valueFormat?: (value: number) => string;
|
|
1189
|
+
/** Accessible name for the chart's `<svg role="img">`. Per-box values are exposed via the hidden data table, not this label. @default "box plot" */
|
|
1190
|
+
ariaLabel?: string;
|
|
1191
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
1192
|
+
tableFallback?: boolean;
|
|
1193
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1194
|
+
caption?: React.ReactNode;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
declare function Boxplot(props: BoxplotProps): React.JSX.Element;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* One range value: a `label` plus its numeric `min` and `max` bounds. For a
|
|
1201
|
+
* range bar this is the start→end of a timeline row; for a range area it is the
|
|
1202
|
+
* lower/upper value at that category position.
|
|
1203
|
+
*/
|
|
1204
|
+
interface RangeDatum {
|
|
1205
|
+
/** Row/category label — shown on the axis and in the hidden data table. */
|
|
1206
|
+
label: React.ReactNode;
|
|
1207
|
+
/** Lower bound of the range (bar start / lower band edge). */
|
|
1208
|
+
min: number;
|
|
1209
|
+
/** Upper bound of the range (bar end / upper band edge). */
|
|
1210
|
+
max: number;
|
|
1211
|
+
/** Optional per-row bar color (any CSS color); overrides the palette. Applies to `type="bar"` only. */
|
|
1212
|
+
color?: string;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Range chart — horizontal range bars (a timeline / Gantt of one min→max band
|
|
1217
|
+
* per row) or a range area (a shaded band between a per-category min line and
|
|
1218
|
+
* max line), with a shared value axis, grid, tooltips and an accessible data
|
|
1219
|
+
* table. Dependency-free inline SVG. For bars/lines/areas use `Chart`; for other
|
|
1220
|
+
* shapes use the dedicated sibling chart components.
|
|
1221
|
+
*
|
|
1222
|
+
* @startingPoint section="Data display" subtitle="Range bar / range area chart (no deps)" viewport="700x280"
|
|
1223
|
+
*/
|
|
1224
|
+
interface RangeChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1225
|
+
/** `"bar"` = horizontal range bars (timeline/Gantt); `"area"` = a band between a min and max line. @default "bar" */
|
|
1226
|
+
type?: "bar" | "area";
|
|
1227
|
+
/** Range data points, each with a `label`, `min` and `max` (bars run top→bottom; the area runs left→right). */
|
|
1228
|
+
data: RangeDatum[];
|
|
1229
|
+
/** Pixel height. @default 300 */
|
|
1230
|
+
height?: number;
|
|
1231
|
+
/** Value grid lines (vertical for bars, horizontal for the area). @default true */
|
|
1232
|
+
showGrid?: boolean;
|
|
1233
|
+
/** Value axis + category labels. @default true */
|
|
1234
|
+
showAxis?: boolean;
|
|
1235
|
+
/** Palette for bar fills / the area band, cycled by index. Defaults to the built-in token palette. */
|
|
1236
|
+
colors?: string[];
|
|
1237
|
+
/** Tooltip value formatter (also formats the hidden data-table cells). @default toLocaleString */
|
|
1238
|
+
valueFormat?: (value: number) => string;
|
|
1239
|
+
/** Accessible name for the chart's `<svg role="img">`. Defaults to `"range <type> chart"`; also accepts `aria-label`. */
|
|
1240
|
+
ariaLabel?: string;
|
|
1241
|
+
/** Render a visually-hidden data table as an accessible text alternative (WCAG 1.1.1). @default true */
|
|
1242
|
+
tableFallback?: boolean;
|
|
1243
|
+
/** Caption for the hidden data table; defaults to the chart's accessible label. */
|
|
1244
|
+
caption?: React.ReactNode;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
declare function RangeChart(props: RangeChartProps): React.JSX.Element;
|
|
1248
|
+
|
|
585
1249
|
/**
|
|
586
1250
|
* Checkbox with animated checkmark, label, description, and indeterminate state.
|
|
587
1251
|
*/
|
|
@@ -2840,4 +3504,4 @@ declare function useFocusTrap<T extends HTMLElement = HTMLElement>(
|
|
|
2840
3504
|
*/
|
|
2841
3505
|
declare function usePortal(): (node: React.ReactNode) => React.ReactPortal | React.ReactNode | null;
|
|
2842
3506
|
|
|
2843
|
-
export { Accordion, type AccordionItem, type AccordionProps, type ActionTone, Alert, type AlertProps, Anchor, type AnchorProps, AppShell, type AppShellProps, Avatar, AvatarMenu, type AvatarMenuProps, type AvatarProps, Badge, type BadgeProps, type BarTone, Box, type BoxOwnProps, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartDatum, type ChartProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorPicker, type ColorPickerProps, ColorSchemeScript, type ColorSchemeScriptOptions, type ColorSchemeScriptProps, Combobox, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type Command, CommandPalette, type CommandPaletteProps, Container, type ContainerOwnProps, type ContainerProps, Currency, CurrencyField, type CurrencyFieldProps, type CurrencyOption, type CurrencyProps, Datatable, type DatatableBatchAction, type DatatableColumn, type DatatableFilter, type DatatableFilterOp, type DatatableNumberOp, type DatatableProps, type DatatableQuery, type DatatableRowAction, type DatatableStringOp, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, type DialogProps, Divider, type DividerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, Field, type FieldProps, FileUpload, type FileUploadProps, Form, type FormProps, Grid, type GridOwnProps, type GridProps, Heading, type HeadingOwnProps, type HeadingProps, type HeadingSize, IconButton, type IconButtonProps, Image, type ImageProps, Input, type InputProps, Kanban, type KanbanCard, type KanbanColumn, type KanbanProps, Kbd, type KbdProps, Label, type LabelProps, List, type ListItemData, type ListProps, Menu, type MenuItemDef, type MenuProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, Navbar, type NavbarLink, type NavbarProps, type Option, type OptionGroup, Pagination, type PaginationProps, type PolymorphicAs, type PolymorphicComponent, type PolymorphicProps, type PolymorphicPropsWithRef, type PolymorphicRef, Popover, type PopoverProps, Portal, type PortalProps, Pre, type PreProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ResponsiveColumns, Select, type SelectGroup, type SelectOption, type SelectProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackOwnProps, type StackProps, Stat, type StatProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, type Sx, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextOwnProps, type TextProps, type TextTone, Textarea, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeTokens, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastTone, ToastViewport, type ToastViewportProps, type Tone, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps, TwicoProvider, type TwicoProviderProps, type UseColorSchemeOptions, type UseFocusTrapOptions, type UseKeyPressOptions, type UseMediaQueryOptions, VisuallyHidden, type VisuallyHiddenProps, createTheme, getColorSchemeScript, runDatatableQuery, useClickOutside, useColorScheme, useControllableState, useCopyToClipboard, useDebouncedCallback, useDebouncedValue, useDisclosure, useEventListener, useFocusTrap, useHover, useId, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyPress, useLocalStorage, useMediaQuery, useMounted, usePortal, usePrefersReducedMotion, usePrevious, useScrollLock, useTimeout, useToast, useToggle, useWindowSize };
|
|
3507
|
+
export { Accordion, type AccordionItem, type AccordionProps, type ActionTone, Alert, type AlertProps, Anchor, type AnchorProps, AppShell, type AppShellProps, Avatar, AvatarMenu, type AvatarMenuProps, type AvatarProps, Badge, type BadgeProps, type BarTone, Box, type BoxOwnProps, type BoxProps, Boxplot, type BoxplotDatum, type BoxplotProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, BubbleChart, type BubbleChartProps, Button, type ButtonProps, Candlestick, type CandlestickDatum, type CandlestickProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartDatum, type ChartProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorPicker, type ColorPickerProps, ColorSchemeScript, type ColorSchemeScriptOptions, type ColorSchemeScriptProps, Combobox, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type Command, CommandPalette, type CommandPaletteProps, Container, type ContainerOwnProps, type ContainerProps, Currency, CurrencyField, type CurrencyFieldProps, type CurrencyOption, type CurrencyProps, Datatable, type DatatableBatchAction, type DatatableColumn, type DatatableFilter, type DatatableFilterOp, type DatatableNumberOp, type DatatableProps, type DatatableQuery, type DatatableRowAction, type DatatableStringOp, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, type DialogProps, Divider, type DividerProps, DonutChart, type DonutChartDatum, type DonutChartProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, Field, type FieldProps, FileUpload, type FileUploadProps, Form, type FormProps, FunnelChart, type FunnelChartProps, type FunnelDatum, Gauge, type GaugeProps, type GaugeSeries, Grid, type GridOwnProps, type GridProps, Heading, type HeadingOwnProps, type HeadingProps, type HeadingSize, Heatmap, type HeatmapDatum, type HeatmapProps, IconButton, type IconButtonProps, Image, type ImageProps, Input, type InputProps, Kanban, type KanbanCard, type KanbanColumn, type KanbanProps, Kbd, type KbdProps, Label, type LabelProps, List, type ListItemData, type ListProps, Menu, type MenuItemDef, type MenuProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, Navbar, type NavbarLink, type NavbarProps, type Option, type OptionGroup, Pagination, type PaginationProps, PieChart, type PieChartDatum, type PieChartProps, PolarAreaChart, type PolarAreaChartProps, type PolarAreaDatum, type PolymorphicAs, type PolymorphicComponent, type PolymorphicProps, type PolymorphicPropsWithRef, type PolymorphicRef, Popover, type PopoverProps, Portal, type PortalProps, Pre, type PreProps, Progress, type ProgressProps, RadarChart, type RadarChartProps, type RadarDatum, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, RangeChart, type RangeChartProps, type RangeDatum, Rating, type RatingProps, type ResponsiveColumns, ScatterChart, type ScatterChartProps, type ScatterPoint, type ScatterSeries, Select, type SelectGroup, type SelectOption, type SelectProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Sparkline, type SparklineDatum, type SparklineProps, Spinner, type SpinnerProps, Stack, type StackOwnProps, type StackProps, Stat, type StatProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, type Sx, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextOwnProps, type TextProps, type TextTone, Textarea, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeTokens, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastTone, ToastViewport, type ToastViewportProps, type Tone, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps, Treemap, type TreemapDatum, type TreemapProps, TwicoProvider, type TwicoProviderProps, type UseColorSchemeOptions, type UseFocusTrapOptions, type UseKeyPressOptions, type UseMediaQueryOptions, VisuallyHidden, type VisuallyHiddenProps, createTheme, getColorSchemeScript, runDatatableQuery, useClickOutside, useColorScheme, useControllableState, useCopyToClipboard, useDebouncedCallback, useDebouncedValue, useDisclosure, useEventListener, useFocusTrap, useHover, useId, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyPress, useLocalStorage, useMediaQuery, useMounted, usePortal, usePrefersReducedMotion, usePrevious, useScrollLock, useTimeout, useToast, useToggle, useWindowSize };
|