@wallarm-org/design-system 0.31.1 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/components/SimpleCharts/BarList/BarListItem.js +1 -5
  2. package/dist/components/SimpleCharts/PieChart/LegendDot.d.ts +5 -0
  3. package/dist/components/SimpleCharts/PieChart/LegendDot.js +18 -0
  4. package/dist/components/SimpleCharts/PieChart/PieChart.d.ts +35 -0
  5. package/dist/components/SimpleCharts/PieChart/PieChart.figma.d.ts +1 -0
  6. package/dist/components/SimpleCharts/PieChart/PieChart.figma.js +120 -0
  7. package/dist/components/SimpleCharts/PieChart/PieChart.js +117 -0
  8. package/dist/components/SimpleCharts/PieChart/PieChartCenter.d.ts +13 -0
  9. package/dist/components/SimpleCharts/PieChart/PieChartCenter.js +39 -0
  10. package/dist/components/SimpleCharts/PieChart/PieChartContext.d.ts +60 -0
  11. package/dist/components/SimpleCharts/PieChart/PieChartContext.js +11 -0
  12. package/dist/components/SimpleCharts/PieChart/PieChartDonut.d.ts +15 -0
  13. package/dist/components/SimpleCharts/PieChart/PieChartDonut.js +112 -0
  14. package/dist/components/SimpleCharts/PieChart/PieChartLegend.d.ts +5 -0
  15. package/dist/components/SimpleCharts/PieChart/PieChartLegend.js +16 -0
  16. package/dist/components/SimpleCharts/PieChart/PieChartLegendItem.d.ts +26 -0
  17. package/dist/components/SimpleCharts/PieChart/PieChartLegendItem.js +116 -0
  18. package/dist/components/SimpleCharts/PieChart/PieChartLegendPercent.d.ts +15 -0
  19. package/dist/components/SimpleCharts/PieChart/PieChartLegendPercent.js +34 -0
  20. package/dist/components/SimpleCharts/PieChart/PieChartLegendValue.d.ts +5 -0
  21. package/dist/components/SimpleCharts/PieChart/PieChartLegendValue.js +16 -0
  22. package/dist/components/SimpleCharts/PieChart/PieChartSkeleton.d.ts +8 -0
  23. package/dist/components/SimpleCharts/PieChart/PieChartSkeleton.js +49 -0
  24. package/dist/components/SimpleCharts/PieChart/classes.d.ts +22 -0
  25. package/dist/components/SimpleCharts/PieChart/classes.js +62 -0
  26. package/dist/components/SimpleCharts/PieChart/constants.d.ts +9 -0
  27. package/dist/components/SimpleCharts/PieChart/constants.js +22 -0
  28. package/dist/components/SimpleCharts/PieChart/index.d.ts +10 -0
  29. package/dist/components/SimpleCharts/PieChart/index.js +10 -0
  30. package/dist/components/SimpleCharts/index.d.ts +2 -0
  31. package/dist/components/SimpleCharts/index.js +2 -1
  32. package/dist/components/SimpleCharts/lib/clamp01.d.ts +1 -0
  33. package/dist/components/SimpleCharts/lib/clamp01.js +6 -0
  34. package/dist/metadata/components.json +3099 -2
  35. package/package.json +2 -1
@@ -0,0 +1,116 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useCallback, useContext, useMemo } from "react";
3
+ import { cn } from "../../../utils/cn.js";
4
+ import { useTestId } from "../../../utils/testId.js";
5
+ import { clamp01 } from "../lib/clamp01.js";
6
+ import { pieChartLegendItemVariants } from "./classes.js";
7
+ import { PieChartActiveContext, PieChartDataContext, PieChartItemContext, PieChartSelectionContext } from "./PieChartContext.js";
8
+ const PieChartLegendItem = ({ name, value, selected: selectedProp, className, children, ref, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props })=>{
9
+ const testId = useTestId('legend-item');
10
+ const dataCtx = useContext(PieChartDataContext);
11
+ const { activeName } = useContext(PieChartActiveContext);
12
+ const { selectedSet } = useContext(PieChartSelectionContext);
13
+ const interactive = 'function' == typeof onClick;
14
+ const active = activeName === name;
15
+ const selected = selectedProp ?? selectedSet.has(name);
16
+ const dimmed = !selected && !active && selectedSet.size > 0;
17
+ const ratio = useMemo(()=>{
18
+ if (!dataCtx?.isValidTotal) return 0;
19
+ const lookupValue = value ?? dataCtx.byName.get(name)?.value ?? 0;
20
+ if (!Number.isFinite(lookupValue)) return 0;
21
+ return clamp01(lookupValue / dataCtx.total);
22
+ }, [
23
+ dataCtx,
24
+ name,
25
+ value
26
+ ]);
27
+ const itemValue = useMemo(()=>({
28
+ ratio,
29
+ selected,
30
+ interactive,
31
+ name,
32
+ active
33
+ }), [
34
+ ratio,
35
+ selected,
36
+ interactive,
37
+ name,
38
+ active
39
+ ]);
40
+ const setActive = dataCtx?.setActive;
41
+ const handleMouseEnter = useCallback((event)=>{
42
+ onMouseEnter?.(event);
43
+ if (event.defaultPrevented) return;
44
+ setActive?.(name);
45
+ }, [
46
+ onMouseEnter,
47
+ setActive,
48
+ name
49
+ ]);
50
+ const handleMouseLeave = useCallback((event)=>{
51
+ onMouseLeave?.(event);
52
+ if (event.defaultPrevented) return;
53
+ setActive?.(null);
54
+ }, [
55
+ onMouseLeave,
56
+ setActive
57
+ ]);
58
+ const handleFocus = useCallback((event)=>{
59
+ onFocus?.(event);
60
+ if (event.defaultPrevented) return;
61
+ setActive?.(name);
62
+ }, [
63
+ onFocus,
64
+ setActive,
65
+ name
66
+ ]);
67
+ const handleBlur = useCallback((event)=>{
68
+ onBlur?.(event);
69
+ if (event.defaultPrevented) return;
70
+ setActive?.(null);
71
+ }, [
72
+ onBlur,
73
+ setActive
74
+ ]);
75
+ const handleKeyDown = useCallback((event)=>{
76
+ onKeyDown?.(event);
77
+ if (!interactive || event.defaultPrevented) return;
78
+ if ('Enter' === event.key || ' ' === event.key) {
79
+ event.preventDefault();
80
+ event.currentTarget.click();
81
+ }
82
+ }, [
83
+ interactive,
84
+ onKeyDown
85
+ ]);
86
+ return /*#__PURE__*/ jsx(PieChartItemContext.Provider, {
87
+ value: itemValue,
88
+ children: /*#__PURE__*/ jsx("div", {
89
+ ...props,
90
+ ref: ref,
91
+ "data-slot": "pie-chart-legend-item",
92
+ "data-testid": testId,
93
+ "data-name": name,
94
+ "data-active": active ? 'true' : void 0,
95
+ "data-selected": selected ? 'true' : void 0,
96
+ role: interactive ? 'button' : void 0,
97
+ tabIndex: interactive ? 0 : void 0,
98
+ "aria-current": selected ? 'true' : void 0,
99
+ onClick: onClick,
100
+ onKeyDown: handleKeyDown,
101
+ onMouseEnter: handleMouseEnter,
102
+ onMouseLeave: handleMouseLeave,
103
+ onFocus: handleFocus,
104
+ onBlur: handleBlur,
105
+ className: cn(pieChartLegendItemVariants({
106
+ interactive,
107
+ active,
108
+ selected,
109
+ dimmed
110
+ }), className),
111
+ children: children
112
+ })
113
+ });
114
+ };
115
+ PieChartLegendItem.displayName = 'PieChartLegendItem';
116
+ export { PieChartLegendItem };
@@ -0,0 +1,15 @@
1
+ import { type FC, type HTMLAttributes, type Ref } from 'react';
2
+ export type PieChartLegendPercentVariant = 'split' | 'muted' | 'inherit';
3
+ export interface PieChartLegendPercentProps extends HTMLAttributes<HTMLSpanElement> {
4
+ ref?: Ref<HTMLSpanElement>;
5
+ /** Number of fractional digits in the percent label. Defaults to `0`. */
6
+ digits?: number;
7
+ /**
8
+ * Color treatment for the value and the `%` symbol. Mirrors `BarListPercent`.
9
+ * - `split` (default, matches Figma) — value uses `text-text-primary`, symbol uses `text-text-secondary`.
10
+ * - `muted` — both tokens use `text-text-secondary`.
11
+ * - `inherit` — both inherit the parent's color (e.g. follow `PieChartLegendValue`).
12
+ */
13
+ variant?: PieChartLegendPercentVariant;
14
+ }
15
+ export declare const PieChartLegendPercent: FC<PieChartLegendPercentProps>;
@@ -0,0 +1,34 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { cn } from "../../../utils/cn.js";
4
+ import { useTestId } from "../../../utils/testId.js";
5
+ import { pieChartLegendPercentClasses, pieChartLegendPercentSymbolVariants, pieChartLegendPercentValueVariants } from "./classes.js";
6
+ import { PieChartItemContext } from "./PieChartContext.js";
7
+ const PieChartLegendPercent = ({ digits = 0, variant = 'split', className, children, ref, ...props })=>{
8
+ const testId = useTestId('legend-percent');
9
+ const itemCtx = useContext(PieChartItemContext);
10
+ const percent = (itemCtx?.ratio ?? 0) * 100;
11
+ return /*#__PURE__*/ jsx("span", {
12
+ ...props,
13
+ ref: ref,
14
+ "data-slot": "pie-chart-legend-percent",
15
+ "data-testid": testId,
16
+ className: cn(pieChartLegendPercentClasses, pieChartLegendPercentValueVariants({
17
+ variant
18
+ }), className),
19
+ children: children ?? /*#__PURE__*/ jsxs(Fragment, {
20
+ children: [
21
+ percent.toFixed(digits),
22
+ /*#__PURE__*/ jsx("span", {
23
+ "data-slot": "pie-chart-legend-percent-symbol",
24
+ className: pieChartLegendPercentSymbolVariants({
25
+ variant
26
+ }),
27
+ children: "%"
28
+ })
29
+ ]
30
+ })
31
+ });
32
+ };
33
+ PieChartLegendPercent.displayName = 'PieChartLegendPercent';
34
+ export { PieChartLegendPercent };
@@ -0,0 +1,5 @@
1
+ import type { FC, HTMLAttributes, Ref } from 'react';
2
+ export interface PieChartLegendValueProps extends HTMLAttributes<HTMLSpanElement> {
3
+ ref?: Ref<HTMLSpanElement>;
4
+ }
5
+ export declare const PieChartLegendValue: FC<PieChartLegendValueProps>;
@@ -0,0 +1,16 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../../utils/cn.js";
3
+ import { useTestId } from "../../../utils/testId.js";
4
+ import { pieChartLegendValueClasses } from "./classes.js";
5
+ const PieChartLegendValue = ({ className, ref, ...props })=>{
6
+ const testId = useTestId('legend-value');
7
+ return /*#__PURE__*/ jsx("span", {
8
+ ...props,
9
+ ref: ref,
10
+ "data-slot": "pie-chart-legend-value",
11
+ "data-testid": testId,
12
+ className: cn(pieChartLegendValueClasses, className)
13
+ });
14
+ };
15
+ PieChartLegendValue.displayName = 'PieChartLegendValue';
16
+ export { PieChartLegendValue };
@@ -0,0 +1,8 @@
1
+ import type { FC, HTMLAttributes, Ref } from 'react';
2
+ import { type TestableProps } from '../../../utils/testId';
3
+ export interface PieChartSkeletonProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
4
+ ref?: Ref<HTMLDivElement>;
5
+ /** Number of skeleton rows in the legend column. Defaults to `5`. */
6
+ rows?: number;
7
+ }
8
+ export declare const PieChartSkeleton: FC<PieChartSkeletonProps>;
@@ -0,0 +1,49 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../utils/cn.js";
3
+ import { TestIdProvider, useTestId } from "../../../utils/testId.js";
4
+ import { Skeleton } from "../../Skeleton/index.js";
5
+ import { pieChartDonutClasses, pieChartLegendClasses, pieChartRootClasses, pieChartSkeletonRowClasses } from "./classes.js";
6
+ const PieChartSkeletonRow = ()=>{
7
+ const testId = useTestId('skeleton-row');
8
+ return /*#__PURE__*/ jsx("div", {
9
+ "data-slot": "pie-chart-skeleton-row",
10
+ "data-testid": testId,
11
+ className: pieChartSkeletonRowClasses,
12
+ children: /*#__PURE__*/ jsx(Skeleton, {
13
+ width: "100%",
14
+ height: "24px",
15
+ rounded: 6
16
+ })
17
+ });
18
+ };
19
+ PieChartSkeletonRow.displayName = 'PieChartSkeletonRow';
20
+ const PieChartSkeleton = ({ rows = 5, className, ref, 'data-testid': testId, ...props })=>/*#__PURE__*/ jsx(TestIdProvider, {
21
+ value: testId,
22
+ children: /*#__PURE__*/ jsxs("div", {
23
+ ...props,
24
+ ref: ref,
25
+ "data-slot": "pie-chart-skeleton",
26
+ "data-testid": testId,
27
+ "aria-busy": "true",
28
+ "aria-live": "polite",
29
+ className: cn(pieChartRootClasses, className),
30
+ children: [
31
+ /*#__PURE__*/ jsx("div", {
32
+ className: cn(pieChartDonutClasses, 'flex items-center justify-center'),
33
+ children: /*#__PURE__*/ jsx(Skeleton, {
34
+ width: "120px",
35
+ height: "120px",
36
+ rounded: "full"
37
+ })
38
+ }),
39
+ /*#__PURE__*/ jsx("div", {
40
+ className: cn(pieChartLegendClasses, 'gap-8 pl-0 pr-12 py-12'),
41
+ children: Array.from({
42
+ length: rows
43
+ }, (_, i)=>/*#__PURE__*/ jsx(PieChartSkeletonRow, {}, i))
44
+ })
45
+ ]
46
+ })
47
+ });
48
+ PieChartSkeleton.displayName = 'PieChartSkeleton';
49
+ export { PieChartSkeleton };
@@ -0,0 +1,22 @@
1
+ export declare const pieChartRootClasses: string;
2
+ export declare const pieChartDonutClasses: string;
3
+ export declare const pieChartCenterClasses: string;
4
+ export declare const pieChartCenterValueClasses: string;
5
+ export declare const pieChartCenterLabelClasses: string;
6
+ export declare const pieChartLegendClasses: string;
7
+ export declare const pieChartLegendItemVariants: (props?: ({
8
+ interactive?: boolean | null | undefined;
9
+ active?: boolean | null | undefined;
10
+ selected?: boolean | null | undefined;
11
+ dimmed?: boolean | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ export declare const pieChartLegendValueClasses: string;
14
+ export declare const pieChartLegendPercentClasses: string;
15
+ export declare const legendDotClasses: string;
16
+ export declare const pieChartLegendPercentValueVariants: (props?: ({
17
+ variant?: "inherit" | "split" | "muted" | null | undefined;
18
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
+ export declare const pieChartLegendPercentSymbolVariants: (props?: ({
20
+ variant?: "inherit" | "split" | "muted" | null | undefined;
21
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
+ export declare const pieChartSkeletonRowClasses: string;
@@ -0,0 +1,62 @@
1
+ import { cva } from "class-variance-authority";
2
+ const pieChartRootClasses = "relative flex flex-row items-start w-full";
3
+ const pieChartDonutClasses = "relative shrink-0 overflow-visible px-24 py-8";
4
+ const pieChartCenterClasses = "pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center text-center w-58";
5
+ const pieChartCenterValueClasses = "font-mono font-medium text-text-primary text-base leading-sm w-full";
6
+ const pieChartCenterLabelClasses = "font-mono font-normal text-text-secondary text-xs leading-xs w-full";
7
+ const pieChartLegendClasses = "flex flex-1 min-w-0 flex-col pt-0 pr-4 pb-0 pl-0";
8
+ const pieChartLegendItemVariants = cva("group/pie-chart-legend-item relative flex items-center w-full h-32 px-8 gap-8 rounded-8 transition-colors outline-none", {
9
+ variants: {
10
+ interactive: {
11
+ true: "cursor-pointer focus-visible:bg-states-primary-hover focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-primary",
12
+ false: ''
13
+ },
14
+ active: {
15
+ true: 'bg-states-primary-hover',
16
+ false: 'hover:bg-states-primary-hover'
17
+ },
18
+ selected: {
19
+ true: 'bg-states-primary-active',
20
+ false: ''
21
+ },
22
+ dimmed: {
23
+ true: 'opacity-60',
24
+ false: ''
25
+ }
26
+ },
27
+ defaultVariants: {
28
+ interactive: false,
29
+ active: false,
30
+ selected: false,
31
+ dimmed: false
32
+ }
33
+ });
34
+ const pieChartLegendValueClasses = "ml-auto shrink-0 flex items-center gap-2 text-xs font-mono font-medium text-text-primary whitespace-nowrap pointer-events-none";
35
+ const pieChartLegendPercentClasses = "inline-flex items-center gap-2 font-medium";
36
+ const legendDotClasses = "text-text-tertiary leading-xs";
37
+ const pieChartLegendPercentValueVariants = cva('inline-flex items-center', {
38
+ variants: {
39
+ variant: {
40
+ split: 'text-text-primary',
41
+ muted: 'text-text-secondary',
42
+ inherit: 'text-inherit'
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ variant: 'split'
47
+ }
48
+ });
49
+ const pieChartLegendPercentSymbolVariants = cva('', {
50
+ variants: {
51
+ variant: {
52
+ split: 'text-text-secondary',
53
+ muted: '',
54
+ inherit: ''
55
+ }
56
+ },
57
+ defaultVariants: {
58
+ variant: 'split'
59
+ }
60
+ });
61
+ const pieChartSkeletonRowClasses = "relative h-24 w-full";
62
+ export { legendDotClasses, pieChartCenterClasses, pieChartCenterLabelClasses, pieChartCenterValueClasses, pieChartDonutClasses, pieChartLegendClasses, pieChartLegendItemVariants, pieChartLegendPercentClasses, pieChartLegendPercentSymbolVariants, pieChartLegendPercentValueVariants, pieChartLegendValueClasses, pieChartRootClasses, pieChartSkeletonRowClasses };
@@ -0,0 +1,9 @@
1
+ import type { ChartColor } from '../types';
2
+ export declare const PIE_DONUT_SIZE = 120;
3
+ export declare const PIE_DONUT_OUTER_RADIUS = 60;
4
+ export declare const PIE_DONUT_INNER_RADIUS = 44;
5
+ export declare const PIE_DONUT_CORNER_RADIUS = 4;
6
+ export declare const PIE_DONUT_PADDING_ANGLE = 2;
7
+ export declare const PIE_DONUT_ANIMATION_DURATION = 400;
8
+ export declare const PIE_DONUT_ANIMATION_BEGIN = 0;
9
+ export declare const PIE_SLICE_FILL: Record<ChartColor, string>;
@@ -0,0 +1,22 @@
1
+ const PIE_DONUT_SIZE = 120;
2
+ const PIE_DONUT_OUTER_RADIUS = 60;
3
+ const PIE_DONUT_INNER_RADIUS = 44;
4
+ const PIE_DONUT_CORNER_RADIUS = 4;
5
+ const PIE_DONUT_PADDING_ANGLE = 2;
6
+ const PIE_DONUT_ANIMATION_DURATION = 400;
7
+ const PIE_DONUT_ANIMATION_BEGIN = 0;
8
+ const PIE_SLICE_FILL = {
9
+ brand: 'var(--color-w-orange-500)',
10
+ blue: 'var(--color-blue-500)',
11
+ green: 'var(--color-green-500)',
12
+ red: 'var(--color-red-500)',
13
+ amber: 'var(--color-amber-500)',
14
+ purple: 'var(--color-purple-500)',
15
+ slate: 'var(--color-badge-slate-dark-alt)',
16
+ teal: 'var(--color-teal-500)',
17
+ cyan: 'var(--color-cyan-500)',
18
+ indigo: 'var(--color-indigo-500)',
19
+ pink: 'var(--color-pink-500)',
20
+ rose: 'var(--color-rose-500)'
21
+ };
22
+ export { PIE_DONUT_ANIMATION_BEGIN, PIE_DONUT_ANIMATION_DURATION, PIE_DONUT_CORNER_RADIUS, PIE_DONUT_INNER_RADIUS, PIE_DONUT_OUTER_RADIUS, PIE_DONUT_PADDING_ANGLE, PIE_DONUT_SIZE, PIE_SLICE_FILL };
@@ -0,0 +1,10 @@
1
+ export { LegendDot, type LegendDotProps } from './LegendDot';
2
+ export { PieChart, type PieChartProps } from './PieChart';
3
+ export { PieChartCenter, PieChartCenterLabel, type PieChartCenterLabelProps, type PieChartCenterProps, PieChartCenterValue, type PieChartCenterValueProps, } from './PieChartCenter';
4
+ export type { PieChartDatum } from './PieChartContext';
5
+ export { PieChartDonut, type PieChartDonutProps } from './PieChartDonut';
6
+ export { PieChartLegend, type PieChartLegendProps } from './PieChartLegend';
7
+ export { PieChartLegendItem, type PieChartLegendItemProps } from './PieChartLegendItem';
8
+ export { PieChartLegendPercent, type PieChartLegendPercentProps, type PieChartLegendPercentVariant, } from './PieChartLegendPercent';
9
+ export { PieChartLegendValue, type PieChartLegendValueProps } from './PieChartLegendValue';
10
+ export { PieChartSkeleton, type PieChartSkeletonProps } from './PieChartSkeleton';
@@ -0,0 +1,10 @@
1
+ import { LegendDot } from "./LegendDot.js";
2
+ import { PieChart } from "./PieChart.js";
3
+ import { PieChartCenter, PieChartCenterLabel, PieChartCenterValue } from "./PieChartCenter.js";
4
+ import { PieChartDonut } from "./PieChartDonut.js";
5
+ import { PieChartLegend } from "./PieChartLegend.js";
6
+ import { PieChartLegendItem } from "./PieChartLegendItem.js";
7
+ import { PieChartLegendPercent } from "./PieChartLegendPercent.js";
8
+ import { PieChartLegendValue } from "./PieChartLegendValue.js";
9
+ import { PieChartSkeleton } from "./PieChartSkeleton.js";
10
+ export { LegendDot, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton };
@@ -1,2 +1,4 @@
1
1
  export { BarList, BarListBar, type BarListBarProps, BarListItem, type BarListItemProps, BarListLabel, type BarListLabelProps, BarListPercent, type BarListPercentProps, type BarListProps, BarListSkeleton, type BarListSkeletonProps, BarListValue, type BarListValueProps, } from './BarList';
2
2
  export { Chart, ChartActions, type ChartActionsProps, ChartEmpty, type ChartEmptyProps, ChartHeader, type ChartHeaderProps, type ChartProps, ChartTitle, type ChartTitleProps, } from './Chart';
3
+ export { LegendDot, type LegendDotProps, PieChart, PieChartCenter, PieChartCenterLabel, type PieChartCenterLabelProps, type PieChartCenterProps, PieChartCenterValue, type PieChartCenterValueProps, type PieChartDatum, PieChartDonut, type PieChartDonutProps, PieChartLegend, PieChartLegendItem, type PieChartLegendItemProps, PieChartLegendPercent, type PieChartLegendPercentProps, type PieChartLegendPercentVariant, type PieChartLegendProps, PieChartLegendValue, type PieChartLegendValueProps, type PieChartProps, PieChartSkeleton, type PieChartSkeletonProps, } from './PieChart';
4
+ export type { ChartColor } from './types';
@@ -1,3 +1,4 @@
1
1
  import { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue } from "./BarList/index.js";
2
2
  import { Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle } from "./Chart/index.js";
3
- export { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue, Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle };
3
+ import { LegendDot, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton } from "./PieChart/index.js";
4
+ export { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue, Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle, LegendDot, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton };
@@ -0,0 +1 @@
1
+ export declare const clamp01: (n: number) => number;
@@ -0,0 +1,6 @@
1
+ const clamp01 = (n)=>{
2
+ if (n < 0) return 0;
3
+ if (n > 1) return 1;
4
+ return n;
5
+ };
6
+ export { clamp01 };