@alpic-ai/ui 0.0.0-dev.g37dab1d → 0.0.0-dev.g380fab7

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 (109) hide show
  1. package/dist/components/accordion-card.d.mts +5 -5
  2. package/dist/components/accordion.d.mts +5 -5
  3. package/dist/components/alert.d.mts +8 -8
  4. package/dist/components/area-chart.d.mts +62 -0
  5. package/dist/components/area-chart.mjs +269 -0
  6. package/dist/components/attachment-tile.d.mts +1 -1
  7. package/dist/components/avatar.d.mts +7 -7
  8. package/dist/components/badge.d.mts +1 -1
  9. package/dist/components/bar-chart.d.mts +48 -0
  10. package/dist/components/bar-chart.mjs +245 -0
  11. package/dist/components/bar-list.d.mts +28 -0
  12. package/dist/components/bar-list.mjs +98 -0
  13. package/dist/components/breadcrumb.d.mts +10 -10
  14. package/dist/components/button.d.mts +5 -5
  15. package/dist/components/card.d.mts +9 -9
  16. package/dist/components/chart-card.d.mts +25 -0
  17. package/dist/components/chart-card.mjs +48 -0
  18. package/dist/components/chart-container.d.mts +20 -0
  19. package/dist/components/chart-container.mjs +37 -0
  20. package/dist/components/chart-legend.d.mts +16 -0
  21. package/dist/components/chart-legend.mjs +26 -0
  22. package/dist/components/chart-tooltip.d.mts +33 -0
  23. package/dist/components/chart-tooltip.mjs +52 -0
  24. package/dist/components/checkbox.d.mts +2 -2
  25. package/dist/components/collapsible.d.mts +4 -4
  26. package/dist/components/combobox.d.mts +10 -10
  27. package/dist/components/command.d.mts +9 -9
  28. package/dist/components/copyable.d.mts +2 -2
  29. package/dist/components/description-list.d.mts +5 -5
  30. package/dist/components/dialog.d.mts +13 -13
  31. package/dist/components/donut-chart.d.mts +46 -0
  32. package/dist/components/donut-chart.mjs +185 -0
  33. package/dist/components/dropdown-menu.d.mts +17 -17
  34. package/dist/components/form.d.mts +18 -18
  35. package/dist/components/form.mjs +6 -6
  36. package/dist/components/github-button.d.mts +1 -1
  37. package/dist/components/grid-fx.d.mts +13 -0
  38. package/dist/components/grid-fx.mjs +188 -0
  39. package/dist/components/heatmap-chart.d.mts +40 -0
  40. package/dist/components/heatmap-chart.mjs +198 -0
  41. package/dist/components/input-group.d.mts +4 -4
  42. package/dist/components/input.d.mts +4 -4
  43. package/dist/components/input.mjs +2 -2
  44. package/dist/components/label.d.mts +2 -2
  45. package/dist/components/line-chart.d.mts +55 -0
  46. package/dist/components/line-chart.mjs +211 -0
  47. package/dist/components/page-loader.d.mts +1 -1
  48. package/dist/components/pagination.d.mts +3 -3
  49. package/dist/components/popover.d.mts +5 -5
  50. package/dist/components/radio-group.d.mts +3 -3
  51. package/dist/components/scroll-area.d.mts +3 -3
  52. package/dist/components/select.d.mts +9 -9
  53. package/dist/components/separator.d.mts +2 -2
  54. package/dist/components/sheet.d.mts +11 -11
  55. package/dist/components/shimmer-text.d.mts +3 -1
  56. package/dist/components/sidebar.d.mts +33 -33
  57. package/dist/components/sidebar.mjs +10 -10
  58. package/dist/components/skeleton.d.mts +1 -1
  59. package/dist/components/sonner.d.mts +5 -5
  60. package/dist/components/spinner.d.mts +2 -2
  61. package/dist/components/stat.d.mts +30 -0
  62. package/dist/components/stat.mjs +107 -0
  63. package/dist/components/status-dot.d.mts +1 -1
  64. package/dist/components/switch.d.mts +2 -2
  65. package/dist/components/table.d.mts +10 -10
  66. package/dist/components/tabs.d.mts +10 -10
  67. package/dist/components/tag.d.mts +3 -3
  68. package/dist/components/task-progress.d.mts +1 -1
  69. package/dist/components/textarea.d.mts +3 -3
  70. package/dist/components/textarea.mjs +2 -2
  71. package/dist/components/toggle-group.d.mts +3 -3
  72. package/dist/components/toggle-group.mjs +3 -3
  73. package/dist/components/tooltip.d.mts +5 -5
  74. package/dist/components/typography.d.mts +4 -4
  75. package/dist/components/wizard.d.mts +4 -4
  76. package/dist/hooks/use-chart-theme.d.mts +18 -0
  77. package/dist/hooks/use-chart-theme.mjs +57 -0
  78. package/dist/hooks/use-mobile.mjs +3 -3
  79. package/dist/hooks/use-reduced-motion.d.mts +4 -0
  80. package/dist/hooks/use-reduced-motion.mjs +16 -0
  81. package/dist/lib/chart-palette.d.mts +4 -0
  82. package/dist/lib/chart-palette.mjs +95 -0
  83. package/dist/lib/chart.d.mts +14 -0
  84. package/dist/lib/chart.mjs +27 -0
  85. package/package.json +30 -29
  86. package/src/components/area-chart.tsx +339 -0
  87. package/src/components/bar-chart.tsx +300 -0
  88. package/src/components/bar-list.tsx +150 -0
  89. package/src/components/chart-card.tsx +63 -0
  90. package/src/components/chart-container.tsx +49 -0
  91. package/src/components/chart-legend.tsx +41 -0
  92. package/src/components/chart-tooltip.tsx +93 -0
  93. package/src/components/donut-chart.tsx +217 -0
  94. package/src/components/grid-fx.tsx +238 -0
  95. package/src/components/heatmap-chart.tsx +287 -0
  96. package/src/components/line-chart.tsx +264 -0
  97. package/src/components/stat.tsx +109 -0
  98. package/src/hooks/use-chart-theme.ts +75 -0
  99. package/src/hooks/use-reduced-motion.ts +17 -0
  100. package/src/lib/chart-palette.ts +110 -0
  101. package/src/lib/chart.ts +56 -0
  102. package/src/stories/area-chart.stories.tsx +200 -0
  103. package/src/stories/bar-chart.stories.tsx +169 -0
  104. package/src/stories/bar-list.stories.tsx +85 -0
  105. package/src/stories/donut-chart.stories.tsx +112 -0
  106. package/src/stories/heatmap-chart.stories.tsx +107 -0
  107. package/src/stories/line-chart.stories.tsx +146 -0
  108. package/src/stories/stat.stories.tsx +64 -0
  109. package/src/styles/tokens.css +63 -0
@@ -1,5 +1,5 @@
1
1
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
2
- import * as React from "react";
2
+ import * as React$1 from "react";
3
3
 
4
4
  //#region src/components/accordion-card.d.ts
5
5
  declare function AccordionCard({
@@ -15,17 +15,17 @@ declare function AccordionCard({
15
15
  open?: boolean;
16
16
  onOpenChange?: (nextOpen: boolean) => void;
17
17
  disabled?: boolean;
18
- } & Omit<React.ComponentProps<typeof AccordionPrimitive.Root>, "type" | "collapsible" | "defaultValue" | "value" | "onValueChange" | "disabled">): import("react/jsx-runtime").JSX.Element;
18
+ } & Omit<React$1.ComponentProps<typeof AccordionPrimitive.Root>, "type" | "collapsible" | "defaultValue" | "value" | "onValueChange" | "disabled">): React$1.JSX.Element;
19
19
  declare function AccordionCardHeader({
20
20
  className,
21
21
  children,
22
22
  ...props
23
- }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
23
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): React$1.JSX.Element;
24
24
  declare function AccordionCardTitle({
25
25
  className,
26
26
  children,
27
27
  ...props
28
- }: React.HTMLAttributes<HTMLHeadingElement>): import("react/jsx-runtime").JSX.Element;
28
+ }: React$1.HTMLAttributes<HTMLHeadingElement>): React$1.JSX.Element;
29
29
  /**
30
30
  * `className` is forwarded to the inner padding wrapper, not the Radix Content root.
31
31
  * The root always applies overflow-hidden and the accordion animations.
@@ -35,6 +35,6 @@ declare function AccordionCardContent({
35
35
  className,
36
36
  children,
37
37
  ...props
38
- }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
38
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): React$1.JSX.Element;
39
39
  //#endregion
40
40
  export { AccordionCard, AccordionCardContent, AccordionCardHeader, AccordionCardTitle };
@@ -1,19 +1,19 @@
1
1
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
2
- import * as React from "react";
2
+ import * as React$1 from "react";
3
3
 
4
4
  //#region src/components/accordion.d.ts
5
5
  declare function Accordion({
6
6
  ...props
7
- }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
7
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): React$1.JSX.Element;
8
8
  declare function AccordionItem({
9
9
  className,
10
10
  ...props
11
- }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
11
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): React$1.JSX.Element;
12
12
  declare function AccordionTrigger({
13
13
  className,
14
14
  children,
15
15
  ...props
16
- }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
16
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): React$1.JSX.Element;
17
17
  /**
18
18
  * `className` is forwarded to the inner padding wrapper, not the Radix Content root.
19
19
  * The root always applies overflow-hidden and the accordion animations.
@@ -23,6 +23,6 @@ declare function AccordionContent({
23
23
  className,
24
24
  children,
25
25
  ...props
26
- }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
26
+ }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): React$1.JSX.Element;
27
27
  //#endregion
28
28
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -1,38 +1,38 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
- import * as React from "react";
2
+ import * as React$1 from "react";
3
3
 
4
4
  //#region src/components/alert.d.ts
5
5
  declare const alertVariants: (props?: ({
6
6
  variant?: "default" | "destructive" | "warning" | "success" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
8
+ interface AlertProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
9
9
  declare function Alert({
10
10
  className,
11
11
  variant,
12
12
  ...props
13
- }: AlertProps): import("react/jsx-runtime").JSX.Element;
13
+ }: AlertProps): React$1.JSX.Element;
14
14
  declare function AlertTitle({
15
15
  className,
16
16
  ...props
17
- }: React.HTMLAttributes<HTMLParagraphElement>): import("react/jsx-runtime").JSX.Element;
17
+ }: React$1.HTMLAttributes<HTMLParagraphElement>): React$1.JSX.Element;
18
18
  declare function AlertDescription({
19
19
  className,
20
20
  ...props
21
- }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
21
+ }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
22
22
  interface ConvenienceAlertProps {
23
23
  title?: string;
24
- description?: React.ReactNode;
24
+ description?: React$1.ReactNode;
25
25
  className?: string;
26
26
  }
27
27
  declare function ErrorAlert({
28
28
  title,
29
29
  description,
30
30
  className
31
- }: ConvenienceAlertProps): import("react/jsx-runtime").JSX.Element;
31
+ }: ConvenienceAlertProps): React$1.JSX.Element;
32
32
  declare function WarningAlert({
33
33
  title,
34
34
  description,
35
35
  className
36
- }: ConvenienceAlertProps): import("react/jsx-runtime").JSX.Element;
36
+ }: ConvenienceAlertProps): React$1.JSX.Element;
37
37
  //#endregion
38
38
  export { Alert, AlertDescription, AlertTitle, ErrorAlert, WarningAlert };
@@ -0,0 +1,62 @@
1
+ import { ChartSeries } from "../lib/chart.mjs";
2
+ import { ChartPaletteName } from "../lib/chart-palette.mjs";
3
+ import * as React$1 from "react";
4
+
5
+ //#region src/components/area-chart.d.ts
6
+ declare const CURVE_TYPE: {
7
+ readonly monotone: "monotone";
8
+ readonly linear: "linear";
9
+ readonly step: "stepAfter";
10
+ };
11
+ interface ChartMarker {
12
+ x: string | number;
13
+ y: number;
14
+ label?: string;
15
+ color?: string;
16
+ }
17
+ interface AreaChartProps {
18
+ data: ReadonlyArray<Record<string, string | number | null | undefined>>;
19
+ index: string;
20
+ series: ChartSeries[];
21
+ variant?: "stacked" | "grouped" | "expand";
22
+ curve?: keyof typeof CURVE_TYPE;
23
+ legend?: boolean;
24
+ valueFlags?: boolean;
25
+ height?: number;
26
+ yAxisWidth?: number;
27
+ palette?: ChartPaletteName;
28
+ referenceLine?: {
29
+ y: number;
30
+ label?: string;
31
+ band?: boolean;
32
+ };
33
+ markers?: ChartMarker[];
34
+ lastValueLabel?: boolean;
35
+ texture?: boolean;
36
+ loading?: boolean;
37
+ valueFormatter?: (value: number) => string;
38
+ labelFormatter?: (label: string | number) => string;
39
+ className?: string;
40
+ }
41
+ declare function AreaChart({
42
+ data,
43
+ index,
44
+ series,
45
+ variant,
46
+ curve,
47
+ legend,
48
+ valueFlags,
49
+ height,
50
+ yAxisWidth,
51
+ palette,
52
+ referenceLine,
53
+ markers,
54
+ lastValueLabel,
55
+ texture,
56
+ loading,
57
+ valueFormatter,
58
+ labelFormatter,
59
+ className
60
+ }: AreaChartProps): React$1.JSX.Element;
61
+ //#endregion
62
+ export { AreaChart, AreaChartProps, ChartMarker };
@@ -0,0 +1,269 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { useReducedMotion } from "../hooks/use-reduced-motion.mjs";
4
+ import { orderByLuminance, resolveSeries } from "../lib/chart.mjs";
5
+ import { useChartContext } from "./chart-container.mjs";
6
+ import { ChartLegend } from "./chart-legend.mjs";
7
+ import { ChartTooltipContent } from "./chart-tooltip.mjs";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import * as React$1 from "react";
10
+ import { Area, AreaChart as AreaChart$1, CartesianGrid, LabelList, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
11
+ //#region src/components/area-chart.tsx
12
+ const CURVE_TYPE = {
13
+ monotone: "monotone",
14
+ linear: "linear",
15
+ step: "stepAfter"
16
+ };
17
+ function AreaChart({ data, index, series, variant = "stacked", curve = "monotone", legend = false, valueFlags = false, height = 200, yAxisWidth = 48, palette, referenceLine, markers, lastValueLabel = false, texture = false, loading = false, valueFormatter = (value) => value.toLocaleString("en-US"), labelFormatter, className }) {
18
+ const { palette: paletteColors, theme } = useChartContext(palette);
19
+ const reactId = React$1.useId().replace(/:/g, "");
20
+ const animated = !useReducedMotion();
21
+ const resolved = resolveSeries(series, paletteColors, theme);
22
+ const stacked = variant === "stacked" || variant === "expand";
23
+ const rendered = stacked ? orderByLuminance(resolved) : resolved;
24
+ const filled = !(variant === "grouped" && rendered.length > 1);
25
+ const lead = resolved[0];
26
+ const withTotal = stacked && rendered.length > 1;
27
+ const numericMax = React$1.useMemo(() => {
28
+ let max = 0;
29
+ for (const row of data) {
30
+ let rowTotal = 0;
31
+ for (const entry of series) {
32
+ const value = Number(row[entry.key]);
33
+ if (Number.isFinite(value)) {
34
+ rowTotal += value;
35
+ if (!stacked && value > max) max = value;
36
+ }
37
+ }
38
+ if (stacked && rowTotal > max) max = rowTotal;
39
+ }
40
+ return max;
41
+ }, [
42
+ data,
43
+ series,
44
+ stacked
45
+ ]);
46
+ const curveType = CURVE_TYPE[curve];
47
+ const margin = {
48
+ top: markers?.length ? 18 : 8,
49
+ right: lastValueLabel ? 56 : 8,
50
+ bottom: 2,
51
+ left: 0
52
+ };
53
+ const axis = {
54
+ stroke: theme.border,
55
+ tick: {
56
+ fill: theme.axisForeground,
57
+ fontSize: 10,
58
+ fontFamily: theme.fontMono
59
+ },
60
+ tickLine: false,
61
+ axisLine: {
62
+ stroke: theme.border,
63
+ strokeOpacity: .6
64
+ }
65
+ };
66
+ const legendItems = resolved.map((entry) => ({
67
+ name: entry.name,
68
+ color: entry.color,
69
+ dashed: entry.dashed
70
+ }));
71
+ const activeDotFor = (entry) => valueFlags ? (dotProps) => {
72
+ if (dotProps.cx == null || dotProps.cy == null) return /* @__PURE__ */ jsx("g", {});
73
+ return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("circle", {
74
+ cx: dotProps.cx,
75
+ cy: dotProps.cy,
76
+ r: 3.5,
77
+ fill: entry.color,
78
+ stroke: theme.card,
79
+ strokeWidth: 2
80
+ }), /* @__PURE__ */ jsx("text", {
81
+ x: dotProps.cx,
82
+ y: dotProps.cy - 8,
83
+ textAnchor: "middle",
84
+ fill: entry.color,
85
+ fontFamily: theme.fontMono,
86
+ fontSize: 10,
87
+ style: { fontVariantNumeric: "tabular-nums" },
88
+ children: valueFormatter(Number(dotProps.value ?? 0))
89
+ })] });
90
+ } : {
91
+ r: 3.5,
92
+ fill: entry.color,
93
+ stroke: theme.card,
94
+ strokeWidth: 2
95
+ };
96
+ const fillFor = (entry, slot) => {
97
+ if (!filled) return "none";
98
+ if (texture && lead && entry.key === lead.key) return `url(#hatch-${reactId})`;
99
+ return `url(#area-${reactId}-${slot})`;
100
+ };
101
+ const renderLastLabel = (color) => (props) => {
102
+ if (props.index !== data.length - 1 || props.x == null || props.y == null) return null;
103
+ return /* @__PURE__ */ jsx("text", {
104
+ x: Number(props.x) + 6,
105
+ y: Number(props.y),
106
+ dy: 3,
107
+ fill: color,
108
+ fontFamily: theme.fontMono,
109
+ fontSize: 10,
110
+ textAnchor: "start",
111
+ style: { fontVariantNumeric: "tabular-nums" },
112
+ children: valueFormatter(Number(props.value ?? 0))
113
+ });
114
+ };
115
+ const isEmpty = data.length === 0 || rendered.length === 0;
116
+ return /* @__PURE__ */ jsxs("div", {
117
+ "data-slot": "area-chart",
118
+ className: cn("flex w-full flex-col gap-3", className),
119
+ children: [/* @__PURE__ */ jsx("div", {
120
+ className: "w-full",
121
+ style: { height },
122
+ children: loading ? /* @__PURE__ */ jsxs("div", {
123
+ className: "flex h-full items-center justify-center gap-2.5 font-mono text-quaternary-foreground text-text-xs",
124
+ children: [/* @__PURE__ */ jsx("span", { className: "size-4 animate-spin rounded-full border-2 border-border border-t-foreground" }), "loading…"]
125
+ }) : isEmpty ? /* @__PURE__ */ jsx("div", {
126
+ className: "flex h-full items-center justify-center rounded-lg border border-border border-dashed font-mono text-quaternary-foreground text-text-xs",
127
+ children: "no data in range"
128
+ }) : /* @__PURE__ */ jsx(ResponsiveContainer, {
129
+ width: "100%",
130
+ height: "100%",
131
+ children: /* @__PURE__ */ jsxs(AreaChart$1, {
132
+ data,
133
+ stackOffset: variant === "expand" ? "expand" : "none",
134
+ margin,
135
+ children: [
136
+ /* @__PURE__ */ jsxs("defs", { children: [filled && rendered.map((entry, slot) => /* @__PURE__ */ jsxs("linearGradient", {
137
+ id: `area-${reactId}-${slot}`,
138
+ x1: "0",
139
+ y1: "0",
140
+ x2: "0",
141
+ y2: "1",
142
+ children: [/* @__PURE__ */ jsx("stop", {
143
+ offset: "0%",
144
+ stopColor: entry.color,
145
+ stopOpacity: stacked ? .78 : .5
146
+ }), /* @__PURE__ */ jsx("stop", {
147
+ offset: "100%",
148
+ stopColor: entry.color,
149
+ stopOpacity: stacked ? .32 : .04
150
+ })]
151
+ }, entry.key)), texture && filled && lead && /* @__PURE__ */ jsxs("pattern", {
152
+ id: `hatch-${reactId}`,
153
+ patternUnits: "userSpaceOnUse",
154
+ width: 6,
155
+ height: 6,
156
+ patternTransform: "rotate(45)",
157
+ children: [/* @__PURE__ */ jsx("rect", {
158
+ width: 6,
159
+ height: 6,
160
+ fill: lead.color,
161
+ fillOpacity: .18
162
+ }), /* @__PURE__ */ jsx("line", {
163
+ x1: 0,
164
+ y1: 0,
165
+ x2: 0,
166
+ y2: 6,
167
+ stroke: lead.color,
168
+ strokeWidth: 1.2,
169
+ strokeOpacity: .6
170
+ })]
171
+ })] }),
172
+ /* @__PURE__ */ jsx(CartesianGrid, {
173
+ vertical: false,
174
+ stroke: theme.grid,
175
+ strokeDasharray: "2 4"
176
+ }),
177
+ /* @__PURE__ */ jsx(XAxis, {
178
+ dataKey: index,
179
+ ...axis,
180
+ interval: "preserveStartEnd",
181
+ minTickGap: 44
182
+ }),
183
+ /* @__PURE__ */ jsx(YAxis, {
184
+ ...axis,
185
+ width: yAxisWidth,
186
+ tickFormatter: (value) => variant === "expand" ? `${Math.round(value * 100)}%` : valueFormatter(value)
187
+ }),
188
+ /* @__PURE__ */ jsx(Tooltip, {
189
+ offset: 12,
190
+ allowEscapeViewBox: {
191
+ x: false,
192
+ y: false
193
+ },
194
+ cursor: {
195
+ stroke: theme.axisForeground,
196
+ strokeWidth: 1,
197
+ strokeDasharray: "3 3"
198
+ },
199
+ content: /* @__PURE__ */ jsx(ChartTooltipContent, {
200
+ valueFormatter,
201
+ labelFormatter,
202
+ showTotal: withTotal
203
+ })
204
+ }),
205
+ referenceLine?.band && /* @__PURE__ */ jsx(ReferenceArea, {
206
+ y1: referenceLine.y,
207
+ y2: numericMax,
208
+ fill: theme.warning,
209
+ fillOpacity: .06,
210
+ ifOverflow: "extendDomain"
211
+ }),
212
+ referenceLine && /* @__PURE__ */ jsx(ReferenceLine, {
213
+ y: referenceLine.y,
214
+ stroke: theme.warning,
215
+ strokeDasharray: "4 4",
216
+ strokeOpacity: .6,
217
+ label: referenceLine.label ? {
218
+ value: referenceLine.label,
219
+ fill: theme.warning,
220
+ fontSize: 9,
221
+ fontFamily: theme.fontMono,
222
+ position: "insideBottomRight"
223
+ } : void 0
224
+ }),
225
+ rendered.map((entry, slot) => /* @__PURE__ */ jsx(Area, {
226
+ type: curveType,
227
+ dataKey: entry.key,
228
+ name: entry.name,
229
+ stackId: stacked ? "stack" : void 0,
230
+ stroke: entry.color,
231
+ strokeWidth: entry.dashed ? 2 : 1.6,
232
+ strokeDasharray: entry.dashed ? "5 3" : void 0,
233
+ fill: fillFor(entry, slot),
234
+ dot: false,
235
+ activeDot: activeDotFor(entry),
236
+ isAnimationActive: animated,
237
+ animationDuration: 650,
238
+ animationEasing: "ease-out",
239
+ children: lastValueLabel && /* @__PURE__ */ jsx(LabelList, {
240
+ dataKey: entry.key,
241
+ content: renderLastLabel(entry.color)
242
+ })
243
+ }, entry.key)),
244
+ markers?.map((marker) => /* @__PURE__ */ jsx(ReferenceDot, {
245
+ x: marker.x,
246
+ y: marker.y,
247
+ r: 3.5,
248
+ fill: marker.color ?? theme.foreground,
249
+ stroke: theme.card,
250
+ strokeWidth: 2,
251
+ label: marker.label ? {
252
+ value: marker.label,
253
+ fill: marker.color ?? theme.foreground,
254
+ fontSize: 9,
255
+ fontFamily: theme.fontMono,
256
+ position: "top"
257
+ } : void 0
258
+ }, `${marker.x}-${marker.y}`))
259
+ ]
260
+ })
261
+ })
262
+ }), legend && !isEmpty && /* @__PURE__ */ jsx(ChartLegend, {
263
+ items: legendItems,
264
+ style: { paddingLeft: yAxisWidth }
265
+ })]
266
+ });
267
+ }
268
+ //#endregion
269
+ export { AreaChart };
@@ -19,6 +19,6 @@ declare function AttachmentTile({
19
19
  onRemove,
20
20
  onClick,
21
21
  className
22
- }: AttachmentTileProps): import("react/jsx-runtime").JSX.Element;
22
+ }: AttachmentTileProps): import("react").JSX.Element;
23
23
  //#endregion
24
24
  export { AttachmentTile, type AttachmentTileProps };
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
- import * as React from "react";
2
+ import * as React$1 from "react";
3
3
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
4
 
5
5
  //#region src/components/avatar.d.ts
@@ -8,7 +8,7 @@ declare const avatarVariants: (props?: ({
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  type AvatarSize = NonNullable<VariantProps<typeof avatarVariants>["size"]>;
10
10
  type AvatarStatus = "online";
11
- interface AvatarProps extends React.ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
11
+ interface AvatarProps extends React$1.ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
12
12
  status?: AvatarStatus;
13
13
  }
14
14
  declare function Avatar({
@@ -17,16 +17,16 @@ declare function Avatar({
17
17
  className,
18
18
  children,
19
19
  ...props
20
- }: AvatarProps): import("react/jsx-runtime").JSX.Element;
20
+ }: AvatarProps): React$1.JSX.Element;
21
21
  declare function AvatarImage({
22
22
  className,
23
23
  ...props
24
- }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
24
+ }: React$1.ComponentProps<typeof AvatarPrimitive.Image>): React$1.JSX.Element;
25
25
  declare function AvatarFallback({
26
26
  className,
27
27
  ...props
28
- }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
29
- interface AvatarLabelGroupProps extends React.ComponentProps<"div"> {
28
+ }: React$1.ComponentProps<typeof AvatarPrimitive.Fallback>): React$1.JSX.Element;
29
+ interface AvatarLabelGroupProps extends React$1.ComponentProps<"div"> {
30
30
  size?: "sm" | "md";
31
31
  src?: string;
32
32
  alt?: string;
@@ -45,6 +45,6 @@ declare function AvatarLabelGroup({
45
45
  status,
46
46
  className,
47
47
  ...props
48
- }: AvatarLabelGroupProps): import("react/jsx-runtime").JSX.Element;
48
+ }: AvatarLabelGroupProps): React$1.JSX.Element;
49
49
  //#endregion
50
50
  export { Avatar, AvatarFallback, AvatarImage, AvatarLabelGroup, type AvatarSize, type AvatarStatus };
@@ -12,7 +12,7 @@ declare function Badge({
12
12
  size,
13
13
  children,
14
14
  ...props
15
- }: BadgeProps): import("react/jsx-runtime").JSX.Element;
15
+ }: BadgeProps): import("react").JSX.Element;
16
16
  type BadgeVariant = NonNullable<VariantProps<typeof badgeVariants>["variant"]>;
17
17
  //#endregion
18
18
  export { Badge, type BadgeVariant, badgeVariants };
@@ -0,0 +1,48 @@
1
+ import { ChartSeries } from "../lib/chart.mjs";
2
+ import { ChartPaletteName } from "../lib/chart-palette.mjs";
3
+ import { ChartMarker } from "./area-chart.mjs";
4
+ import * as React$1 from "react";
5
+
6
+ //#region src/components/bar-chart.d.ts
7
+ interface BarChartProps {
8
+ data: ReadonlyArray<Record<string, string | number | null | undefined>>;
9
+ index: string;
10
+ series: ChartSeries[];
11
+ variant?: "stacked" | "grouped" | "expand";
12
+ legend?: boolean;
13
+ valueLabels?: boolean;
14
+ height?: number;
15
+ yAxisWidth?: number;
16
+ palette?: ChartPaletteName;
17
+ referenceLine?: {
18
+ y: number;
19
+ label?: string;
20
+ band?: boolean;
21
+ };
22
+ markers?: ChartMarker[];
23
+ texture?: boolean;
24
+ loading?: boolean;
25
+ valueFormatter?: (value: number) => string;
26
+ labelFormatter?: (label: string | number) => string;
27
+ className?: string;
28
+ }
29
+ declare function BarChart({
30
+ data,
31
+ index,
32
+ series,
33
+ variant,
34
+ legend,
35
+ valueLabels,
36
+ height,
37
+ yAxisWidth,
38
+ palette,
39
+ referenceLine,
40
+ markers,
41
+ texture,
42
+ loading,
43
+ valueFormatter,
44
+ labelFormatter,
45
+ className
46
+ }: BarChartProps): React$1.JSX.Element;
47
+ //#endregion
48
+ export { BarChart, BarChartProps };