@alpic-ai/ui 0.0.0-staging.gcd4957c → 0.0.0-staging.gcd7c19c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion-card.d.mts +6 -28
- package/dist/components/accordion.d.mts +5 -20
- package/dist/components/alert.d.mts +9 -30
- package/dist/components/area-chart.d.mts +43 -0
- package/dist/components/area-chart.mjs +182 -0
- package/dist/components/attachment-tile.d.mts +1 -10
- package/dist/components/avatar.d.mts +8 -33
- package/dist/components/badge.d.mts +2 -11
- package/dist/components/bar-chart.d.mts +34 -0
- package/dist/components/bar-chart.mjs +238 -0
- package/dist/components/bar-list.d.mts +19 -0
- package/dist/components/bar-list.mjs +104 -0
- package/dist/components/breadcrumb.d.mts +10 -38
- package/dist/components/button.d.mts +6 -21
- package/dist/components/card.d.mts +9 -33
- package/dist/components/chart-card.d.mts +14 -0
- package/dist/components/chart-card.mjs +48 -0
- package/dist/components/chart-container.d.mts +15 -0
- package/dist/components/chart-container.mjs +37 -0
- package/dist/components/chart-legend.d.mts +14 -0
- package/dist/components/chart-legend.mjs +35 -0
- package/dist/components/chart-primitives.d.mts +69 -0
- package/dist/components/chart-primitives.mjs +134 -0
- package/dist/components/chart-tooltip.d.mts +23 -0
- package/dist/components/chart-tooltip.mjs +79 -0
- package/dist/components/checkbox.d.mts +2 -7
- package/dist/components/collapsible.d.mts +4 -12
- package/dist/components/combobox.d.mts +10 -47
- package/dist/components/command.d.mts +9 -34
- package/dist/components/copyable.d.mts +2 -10
- package/dist/components/description-list.d.mts +5 -19
- package/dist/components/dialog.d.mts +15 -49
- package/dist/components/donut-chart.d.mts +31 -0
- package/dist/components/donut-chart.mjs +187 -0
- package/dist/components/dropdown-menu.d.mts +18 -62
- package/dist/components/field.d.mts +14 -0
- package/dist/components/field.mjs +41 -0
- package/dist/components/form.d.mts +19 -102
- package/dist/components/form.mjs +9 -7
- package/dist/components/github-button.d.mts +1 -7
- package/dist/components/heatmap-chart.d.mts +32 -0
- package/dist/components/heatmap-chart.mjs +259 -0
- package/dist/components/input-group.d.mts +5 -19
- package/dist/components/input.d.mts +4 -18
- package/dist/components/input.mjs +27 -51
- package/dist/components/label.d.mts +2 -7
- package/dist/components/line-chart.d.mts +37 -0
- package/dist/components/line-chart.mjs +132 -0
- package/dist/components/page-loader.d.mts +1 -5
- package/dist/components/pagination.d.mts +3 -11
- package/dist/components/popover.d.mts +5 -18
- package/dist/components/radio-group.d.mts +3 -11
- package/dist/components/scroll-area.d.mts +3 -13
- package/dist/components/select-trigger-variants.d.mts +1 -3
- package/dist/components/select.d.mts +9 -37
- package/dist/components/separator.d.mts +2 -9
- package/dist/components/sheet.d.mts +11 -38
- package/dist/components/shimmer-text.d.mts +3 -7
- package/dist/components/sidebar.d.mts +34 -127
- package/dist/components/sidebar.mjs +11 -11
- package/dist/components/skeleton.d.mts +2 -9
- package/dist/components/skeleton.mjs +1 -1
- package/dist/components/sonner.d.mts +5 -13
- package/dist/components/spinner.d.mts +3 -17
- package/dist/components/stat.d.mts +28 -0
- package/dist/components/stat.mjs +124 -0
- package/dist/components/status-dot.d.mts +2 -10
- package/dist/components/switch.d.mts +2 -7
- package/dist/components/table.d.mts +13 -37
- package/dist/components/table.mjs +2 -2
- package/dist/components/tabs.d.mts +12 -43
- package/dist/components/tag.d.mts +3 -22
- package/dist/components/task-progress.d.mts +1 -9
- package/dist/components/textarea.d.mts +3 -14
- package/dist/components/textarea.mjs +19 -43
- package/dist/components/toggle-group.d.mts +4 -19
- package/dist/components/toggle-group.mjs +3 -3
- package/dist/components/tooltip-icon-button.d.mts +1 -3
- package/dist/components/tooltip.d.mts +5 -19
- package/dist/components/typography.d.mts +8 -22
- package/dist/components/wizard.d.mts +4 -29
- package/dist/components/wizard.mjs +1 -19
- package/dist/hooks/use-chart-theme.d.mts +18 -0
- package/dist/hooks/use-chart-theme.mjs +57 -0
- package/dist/hooks/use-copy-to-clipboard.d.mts +1 -3
- package/dist/hooks/use-mobile.mjs +3 -3
- package/dist/lib/chart-palette.d.mts +38 -0
- package/dist/lib/chart-palette.mjs +116 -0
- package/dist/lib/chart.d.mts +19 -0
- package/dist/lib/chart.mjs +42 -0
- package/dist/lib/cn.d.mts +0 -1
- package/package.json +35 -30
- package/src/components/area-chart.tsx +228 -0
- package/src/components/bar-chart.tsx +297 -0
- package/src/components/bar-list.tsx +158 -0
- package/src/components/chart-card.tsx +65 -0
- package/src/components/chart-container.tsx +51 -0
- package/src/components/chart-legend.tsx +49 -0
- package/src/components/chart-primitives.tsx +188 -0
- package/src/components/chart-tooltip.tsx +109 -0
- package/src/components/donut-chart.tsx +214 -0
- package/src/components/field.tsx +57 -0
- package/src/components/form.tsx +4 -2
- package/src/components/heatmap-chart.tsx +375 -0
- package/src/components/input.tsx +3 -33
- package/src/components/line-chart.tsx +167 -0
- package/src/components/skeleton.tsx +1 -1
- package/src/components/stat.tsx +141 -0
- package/src/components/table.tsx +11 -2
- package/src/components/textarea.tsx +4 -34
- package/src/components/wizard.tsx +1 -35
- package/src/hooks/use-chart-theme.ts +75 -0
- package/src/lib/chart-palette.ts +113 -0
- package/src/lib/chart.ts +90 -0
- package/src/stories/area-chart.stories.tsx +200 -0
- package/src/stories/bar-chart.stories.tsx +169 -0
- package/src/stories/bar-list.stories.tsx +83 -0
- package/src/stories/donut-chart.stories.tsx +112 -0
- package/src/stories/heatmap-chart.stories.tsx +105 -0
- package/src/stories/line-chart.stories.tsx +146 -0
- package/src/stories/stat.stories.tsx +66 -0
- package/src/stories/textarea.stories.tsx +7 -0
- package/src/stories/wizard.stories.tsx +23 -5
- package/src/styles/tokens.css +18 -0
|
@@ -1,41 +1,19 @@
|
|
|
1
1
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
-
import * as
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
2
|
+
import * as React$1 from "react";
|
|
5
3
|
//#region src/components/accordion-card.d.ts
|
|
6
|
-
declare function AccordionCard({
|
|
7
|
-
defaultOpen,
|
|
8
|
-
open,
|
|
9
|
-
onOpenChange,
|
|
10
|
-
disabled,
|
|
11
|
-
className,
|
|
12
|
-
children,
|
|
13
|
-
...props
|
|
14
|
-
}: {
|
|
4
|
+
declare function AccordionCard({ defaultOpen, open, onOpenChange, disabled, className, children, ...props }: {
|
|
15
5
|
defaultOpen?: boolean;
|
|
16
6
|
open?: boolean;
|
|
17
7
|
onOpenChange?: (nextOpen: boolean) => void;
|
|
18
8
|
disabled?: boolean;
|
|
19
|
-
} & Omit<React.ComponentProps<typeof AccordionPrimitive.Root>, "type" | "collapsible" | "defaultValue" | "value" | "onValueChange" | "disabled">):
|
|
20
|
-
declare function AccordionCardHeader({
|
|
21
|
-
|
|
22
|
-
children,
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
-
declare function AccordionCardTitle({
|
|
26
|
-
className,
|
|
27
|
-
children,
|
|
28
|
-
...props
|
|
29
|
-
}: React.HTMLAttributes<HTMLHeadingElement>): _$react_jsx_runtime0.JSX.Element;
|
|
9
|
+
} & Omit<React$1.ComponentProps<typeof AccordionPrimitive.Root>, "type" | "collapsible" | "defaultValue" | "value" | "onValueChange" | "disabled">): React$1.JSX.Element;
|
|
10
|
+
declare function AccordionCardHeader({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): React$1.JSX.Element;
|
|
11
|
+
declare function AccordionCardTitle({ className, children, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): React$1.JSX.Element;
|
|
30
12
|
/**
|
|
31
13
|
* `className` is forwarded to the inner padding wrapper, not the Radix Content root.
|
|
32
14
|
* The root always applies overflow-hidden and the accordion animations.
|
|
33
15
|
* To override overflow or animation behavior, wrap this component in an additional element.
|
|
34
16
|
*/
|
|
35
|
-
declare function AccordionCardContent({
|
|
36
|
-
className,
|
|
37
|
-
children,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Content>): _$react_jsx_runtime0.JSX.Element;
|
|
17
|
+
declare function AccordionCardContent({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): React$1.JSX.Element;
|
|
40
18
|
//#endregion
|
|
41
19
|
export { AccordionCard, AccordionCardContent, AccordionCardHeader, AccordionCardTitle };
|
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
-
import * as
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
2
|
+
import * as React$1 from "react";
|
|
5
3
|
//#region src/components/accordion.d.ts
|
|
6
|
-
declare function Accordion({
|
|
7
|
-
|
|
8
|
-
}: React.ComponentProps<typeof AccordionPrimitive.
|
|
9
|
-
declare function AccordionItem({
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Item>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
-
declare function AccordionTrigger({
|
|
14
|
-
className,
|
|
15
|
-
children,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>): _$react_jsx_runtime0.JSX.Element;
|
|
4
|
+
declare function Accordion({ ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function AccordionItem({ className, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): React$1.JSX.Element;
|
|
6
|
+
declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): React$1.JSX.Element;
|
|
18
7
|
/**
|
|
19
8
|
* `className` is forwarded to the inner padding wrapper, not the Radix Content root.
|
|
20
9
|
* The root always applies overflow-hidden and the accordion animations.
|
|
21
10
|
* To override overflow or animation behavior, wrap this component in an additional element.
|
|
22
11
|
*/
|
|
23
|
-
declare function AccordionContent({
|
|
24
|
-
className,
|
|
25
|
-
children,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Content>): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): React$1.JSX.Element;
|
|
28
13
|
//#endregion
|
|
29
14
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,40 +1,19 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
-
|
|
2
|
+
import * as React$1 from "react";
|
|
6
3
|
//#region src/components/alert.d.ts
|
|
7
4
|
declare const alertVariants: (props?: ({
|
|
8
5
|
variant?: "default" | "destructive" | "warning" | "success" | null | undefined;
|
|
9
|
-
} &
|
|
10
|
-
interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
|
|
11
|
-
declare function Alert({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
...props
|
|
15
|
-
}: AlertProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
-
declare function AlertTitle({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: React.HTMLAttributes<HTMLParagraphElement>): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
-
declare function AlertDescription({
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}: React.HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
interface AlertProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
|
|
8
|
+
declare function Alert({ className, variant, ...props }: AlertProps): React$1.JSX.Element;
|
|
9
|
+
declare function AlertTitle({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): React$1.JSX.Element;
|
|
10
|
+
declare function AlertDescription({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
24
11
|
interface ConvenienceAlertProps {
|
|
25
12
|
title?: string;
|
|
26
|
-
description?: React.ReactNode;
|
|
13
|
+
description?: React$1.ReactNode;
|
|
27
14
|
className?: string;
|
|
28
15
|
}
|
|
29
|
-
declare function ErrorAlert({
|
|
30
|
-
|
|
31
|
-
description,
|
|
32
|
-
className
|
|
33
|
-
}: ConvenienceAlertProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
|
-
declare function WarningAlert({
|
|
35
|
-
title,
|
|
36
|
-
description,
|
|
37
|
-
className
|
|
38
|
-
}: ConvenienceAlertProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
+
declare function ErrorAlert({ title, description, className }: ConvenienceAlertProps): React$1.JSX.Element;
|
|
17
|
+
declare function WarningAlert({ title, description, className }: ConvenienceAlertProps): React$1.JSX.Element;
|
|
39
18
|
//#endregion
|
|
40
19
|
export { Alert, AlertDescription, AlertTitle, ErrorAlert, WarningAlert };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ChartSeries } from "../lib/chart.mjs";
|
|
2
|
+
import { ChartPaletteName } from "../lib/chart-palette.mjs";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
//#region src/components/area-chart.d.ts
|
|
5
|
+
declare const CURVE_TYPE: {
|
|
6
|
+
readonly monotone: "monotone";
|
|
7
|
+
readonly linear: "linear";
|
|
8
|
+
readonly step: "stepAfter";
|
|
9
|
+
};
|
|
10
|
+
interface ChartMarker {
|
|
11
|
+
x: string | number;
|
|
12
|
+
y: number;
|
|
13
|
+
label?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
interface AreaChartProps {
|
|
17
|
+
data: ReadonlyArray<Record<string, string | number | null | undefined>>;
|
|
18
|
+
index: string;
|
|
19
|
+
series: ChartSeries[];
|
|
20
|
+
variant?: "stacked" | "grouped" | "expand";
|
|
21
|
+
curve?: keyof typeof CURVE_TYPE;
|
|
22
|
+
legend?: boolean;
|
|
23
|
+
legendAlign?: "left" | "center" | "right";
|
|
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({ data, index, series, variant, curve, legend, legendAlign, valueFlags, height, yAxisWidth, palette, referenceLine, markers, lastValueLabel, texture, loading, valueFormatter, labelFormatter, className }: AreaChartProps): React$1.JSX.Element;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { AreaChart, AreaChartProps, ChartMarker };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.mjs";
|
|
3
|
+
import { makeXAxisTick, orderByLuminance, resolveSeries } from "../lib/chart.mjs";
|
|
4
|
+
import { useChartContext } from "./chart-container.mjs";
|
|
5
|
+
import { ChartLegend } from "./chart-legend.mjs";
|
|
6
|
+
import { computeNumericMax, makeActiveDot, makeChartAxis, makeLastValueLabel, makeLegendItems, renderMarkers, renderReferenceLine } from "./chart-primitives.mjs";
|
|
7
|
+
import { ChartTooltipContent } from "./chart-tooltip.mjs";
|
|
8
|
+
import { Skeleton } from "./skeleton.mjs";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import * as React$1 from "react";
|
|
11
|
+
import { Area, AreaChart as AreaChart$1, CartesianGrid, LabelList, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
|
|
12
|
+
//#region src/components/area-chart.tsx
|
|
13
|
+
const CURVE_TYPE = {
|
|
14
|
+
monotone: "monotone",
|
|
15
|
+
linear: "linear",
|
|
16
|
+
step: "stepAfter"
|
|
17
|
+
};
|
|
18
|
+
function AreaChart({ data, index, series, variant = "stacked", curve = "monotone", legend = false, legendAlign = "left", valueFlags = false, height = 200, yAxisWidth = 48, palette, referenceLine, markers, lastValueLabel = false, texture = false, loading = false, valueFormatter = (value) => value.toLocaleString("en-US"), labelFormatter, className }) {
|
|
19
|
+
const { palette: paletteColors, theme } = useChartContext(palette);
|
|
20
|
+
const reactId = React$1.useId().replace(/:/g, "");
|
|
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(() => computeNumericMax(data, series, stacked), [
|
|
28
|
+
data,
|
|
29
|
+
series,
|
|
30
|
+
stacked
|
|
31
|
+
]);
|
|
32
|
+
const curveType = CURVE_TYPE[curve];
|
|
33
|
+
const margin = {
|
|
34
|
+
top: markers?.length ? 18 : 8,
|
|
35
|
+
right: lastValueLabel ? 56 : 8,
|
|
36
|
+
bottom: 2,
|
|
37
|
+
left: 0
|
|
38
|
+
};
|
|
39
|
+
const axis = makeChartAxis(theme);
|
|
40
|
+
const legendItems = makeLegendItems(resolved);
|
|
41
|
+
const fillFor = (entry, slot) => {
|
|
42
|
+
if (!filled) return "none";
|
|
43
|
+
if (texture && lead && entry.key === lead.key) return `url(#hatch-${reactId})`;
|
|
44
|
+
return `url(#area-${reactId}-${slot})`;
|
|
45
|
+
};
|
|
46
|
+
const isEmpty = data.length === 0 || rendered.length === 0;
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
"data-slot": "area-chart",
|
|
49
|
+
className: cn("flex w-full flex-col gap-3", "[&_.recharts-surface]:outline-none [&_.recharts-wrapper]:outline-none", className),
|
|
50
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: "w-full",
|
|
52
|
+
style: { height },
|
|
53
|
+
children: loading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-full w-full rounded-lg" }) : isEmpty ? /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: "flex h-full items-center justify-center rounded-lg border border-border border-dashed font-mono text-quaternary-foreground text-text-xs",
|
|
55
|
+
children: "no data in range"
|
|
56
|
+
}) : /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
57
|
+
width: "100%",
|
|
58
|
+
height: "100%",
|
|
59
|
+
initialDimension: {
|
|
60
|
+
width: 0,
|
|
61
|
+
height
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ jsxs(AreaChart$1, {
|
|
64
|
+
data,
|
|
65
|
+
stackOffset: variant === "expand" ? "expand" : "none",
|
|
66
|
+
margin,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsxs("defs", { children: [filled && rendered.map((entry, slot) => /* @__PURE__ */ jsxs("linearGradient", {
|
|
69
|
+
id: `area-${reactId}-${slot}`,
|
|
70
|
+
x1: "0",
|
|
71
|
+
y1: "0",
|
|
72
|
+
x2: "0",
|
|
73
|
+
y2: "1",
|
|
74
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
75
|
+
offset: "0%",
|
|
76
|
+
stopColor: entry.color,
|
|
77
|
+
stopOpacity: stacked ? .78 : .5
|
|
78
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
79
|
+
offset: "100%",
|
|
80
|
+
stopColor: entry.color,
|
|
81
|
+
stopOpacity: stacked ? .32 : .04
|
|
82
|
+
})]
|
|
83
|
+
}, entry.key)), texture && filled && lead && /* @__PURE__ */ jsxs("pattern", {
|
|
84
|
+
id: `hatch-${reactId}`,
|
|
85
|
+
patternUnits: "userSpaceOnUse",
|
|
86
|
+
width: 6,
|
|
87
|
+
height: 6,
|
|
88
|
+
patternTransform: "rotate(45)",
|
|
89
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
90
|
+
width: 6,
|
|
91
|
+
height: 6,
|
|
92
|
+
fill: lead.color,
|
|
93
|
+
fillOpacity: .18
|
|
94
|
+
}), /* @__PURE__ */ jsx("line", {
|
|
95
|
+
x1: 0,
|
|
96
|
+
y1: 0,
|
|
97
|
+
x2: 0,
|
|
98
|
+
y2: 6,
|
|
99
|
+
stroke: lead.color,
|
|
100
|
+
strokeWidth: 1.2,
|
|
101
|
+
strokeOpacity: .6
|
|
102
|
+
})]
|
|
103
|
+
})] }),
|
|
104
|
+
/* @__PURE__ */ jsx(CartesianGrid, {
|
|
105
|
+
vertical: false,
|
|
106
|
+
stroke: theme.grid,
|
|
107
|
+
strokeDasharray: "2 4"
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx(XAxis, {
|
|
110
|
+
dataKey: index,
|
|
111
|
+
...axis,
|
|
112
|
+
tick: makeXAxisTick(theme),
|
|
113
|
+
interval: "preserveStartEnd",
|
|
114
|
+
minTickGap: 56
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx(YAxis, {
|
|
117
|
+
...axis,
|
|
118
|
+
width: yAxisWidth,
|
|
119
|
+
tickFormatter: (value) => variant === "expand" ? `${Math.round(value * 100)}%` : valueFormatter(value)
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ jsx(Tooltip, {
|
|
122
|
+
offset: 12,
|
|
123
|
+
allowEscapeViewBox: {
|
|
124
|
+
x: false,
|
|
125
|
+
y: false
|
|
126
|
+
},
|
|
127
|
+
cursor: {
|
|
128
|
+
stroke: theme.axisForeground,
|
|
129
|
+
strokeWidth: 1,
|
|
130
|
+
strokeDasharray: "3 3"
|
|
131
|
+
},
|
|
132
|
+
content: /* @__PURE__ */ jsx(ChartTooltipContent, {
|
|
133
|
+
valueFormatter,
|
|
134
|
+
labelFormatter,
|
|
135
|
+
showTotal: withTotal
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
renderReferenceLine({
|
|
139
|
+
referenceLine,
|
|
140
|
+
numericMax,
|
|
141
|
+
theme
|
|
142
|
+
}),
|
|
143
|
+
rendered.map((entry, slot) => /* @__PURE__ */ jsx(Area, {
|
|
144
|
+
type: curveType,
|
|
145
|
+
dataKey: entry.key,
|
|
146
|
+
name: entry.name,
|
|
147
|
+
stackId: stacked ? "stack" : void 0,
|
|
148
|
+
stroke: entry.color,
|
|
149
|
+
strokeWidth: entry.dashed ? 2 : 1.6,
|
|
150
|
+
strokeDasharray: entry.dashed ? "5 3" : void 0,
|
|
151
|
+
fill: fillFor(entry, slot),
|
|
152
|
+
dot: false,
|
|
153
|
+
activeDot: makeActiveDot(entry, {
|
|
154
|
+
valueFlags,
|
|
155
|
+
theme,
|
|
156
|
+
valueFormatter
|
|
157
|
+
}),
|
|
158
|
+
isAnimationActive: false,
|
|
159
|
+
animationDuration: 650,
|
|
160
|
+
animationEasing: "ease-out",
|
|
161
|
+
children: lastValueLabel && /* @__PURE__ */ jsx(LabelList, {
|
|
162
|
+
dataKey: entry.key,
|
|
163
|
+
content: makeLastValueLabel(entry.color, {
|
|
164
|
+
dataLength: data.length,
|
|
165
|
+
theme,
|
|
166
|
+
valueFormatter
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
}, entry.key)),
|
|
170
|
+
renderMarkers(markers, theme)
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
})
|
|
174
|
+
}), legend && !isEmpty && /* @__PURE__ */ jsx(ChartLegend, {
|
|
175
|
+
items: legendItems,
|
|
176
|
+
align: legendAlign,
|
|
177
|
+
insetLeft: yAxisWidth
|
|
178
|
+
})]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { AreaChart };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/attachment-tile.d.ts
|
|
4
2
|
interface AttachmentTileProps {
|
|
5
3
|
/** Source URL for the attachment thumbnail */
|
|
@@ -14,13 +12,6 @@ interface AttachmentTileProps {
|
|
|
14
12
|
onClick?: () => void;
|
|
15
13
|
className?: string;
|
|
16
14
|
}
|
|
17
|
-
declare function AttachmentTile({
|
|
18
|
-
src,
|
|
19
|
-
isImage,
|
|
20
|
-
label,
|
|
21
|
-
onRemove,
|
|
22
|
-
onClick,
|
|
23
|
-
className
|
|
24
|
-
}: AttachmentTileProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
+
declare function AttachmentTile({ src, isImage, label, onRemove, onClick, className }: AttachmentTileProps): import("react").JSX.Element;
|
|
25
16
|
//#endregion
|
|
26
17
|
export { AttachmentTile, type AttachmentTileProps };
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as React from "react";
|
|
2
|
+
import * as React$1 from "react";
|
|
4
3
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
-
|
|
7
4
|
//#region src/components/avatar.d.ts
|
|
8
5
|
declare const avatarVariants: (props?: ({
|
|
9
6
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
-
} &
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
8
|
type AvatarSize = NonNullable<VariantProps<typeof avatarVariants>["size"]>;
|
|
12
9
|
type AvatarStatus = "online";
|
|
13
|
-
interface AvatarProps extends React.ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
10
|
+
interface AvatarProps extends React$1.ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
14
11
|
status?: AvatarStatus;
|
|
15
12
|
}
|
|
16
|
-
declare function Avatar({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}: AvatarProps): _$react_jsx_runtime0.JSX.Element;
|
|
23
|
-
declare function AvatarImage({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Image>): _$react_jsx_runtime0.JSX.Element;
|
|
27
|
-
declare function AvatarFallback({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>): _$react_jsx_runtime0.JSX.Element;
|
|
31
|
-
interface AvatarLabelGroupProps extends React.ComponentProps<"div"> {
|
|
13
|
+
declare function Avatar({ size, status, className, children, ...props }: AvatarProps): React$1.JSX.Element;
|
|
14
|
+
declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Image>): React$1.JSX.Element;
|
|
15
|
+
declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Fallback>): React$1.JSX.Element;
|
|
16
|
+
interface AvatarLabelGroupProps extends React$1.ComponentProps<"div"> {
|
|
32
17
|
size?: "sm" | "md";
|
|
33
18
|
src?: string;
|
|
34
19
|
alt?: string;
|
|
@@ -37,16 +22,6 @@ interface AvatarLabelGroupProps extends React.ComponentProps<"div"> {
|
|
|
37
22
|
label?: string;
|
|
38
23
|
status?: AvatarStatus;
|
|
39
24
|
}
|
|
40
|
-
declare function AvatarLabelGroup({
|
|
41
|
-
size,
|
|
42
|
-
src,
|
|
43
|
-
alt,
|
|
44
|
-
fallback,
|
|
45
|
-
name,
|
|
46
|
-
label,
|
|
47
|
-
status,
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: AvatarLabelGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
declare function AvatarLabelGroup({ size, src, alt, fallback, name, label, status, className, ...props }: AvatarLabelGroupProps): React$1.JSX.Element;
|
|
51
26
|
//#endregion
|
|
52
27
|
export { Avatar, AvatarFallback, AvatarImage, AvatarLabelGroup, type AvatarSize, type AvatarStatus };
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
|
-
|
|
5
2
|
//#region src/components/badge.d.ts
|
|
6
3
|
declare const badgeVariants: (props?: ({
|
|
7
4
|
variant?: "warning" | "success" | "secondary" | "primary" | "error" | null | undefined;
|
|
8
5
|
size?: "sm" | "md" | null | undefined;
|
|
9
|
-
} &
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
7
|
interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {}
|
|
11
|
-
declare function Badge({
|
|
12
|
-
className,
|
|
13
|
-
variant,
|
|
14
|
-
size,
|
|
15
|
-
children,
|
|
16
|
-
...props
|
|
17
|
-
}: BadgeProps): _$react_jsx_runtime0.JSX.Element;
|
|
8
|
+
declare function Badge({ className, variant, size, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
18
9
|
type BadgeVariant = NonNullable<VariantProps<typeof badgeVariants>["variant"]>;
|
|
19
10
|
//#endregion
|
|
20
11
|
export { Badge, type BadgeVariant, badgeVariants };
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
//#region src/components/bar-chart.d.ts
|
|
6
|
+
interface BarChartProps {
|
|
7
|
+
data: ReadonlyArray<Record<string, string | number | null | undefined>>;
|
|
8
|
+
index: string;
|
|
9
|
+
series: ChartSeries[];
|
|
10
|
+
variant?: "stacked" | "grouped" | "expand";
|
|
11
|
+
legend?: boolean;
|
|
12
|
+
legendAlign?: "left" | "center" | "right";
|
|
13
|
+
valueLabels?: boolean;
|
|
14
|
+
height?: number;
|
|
15
|
+
yAxisWidth?: number;
|
|
16
|
+
bare?: boolean;
|
|
17
|
+
barCategoryGap?: number | string;
|
|
18
|
+
palette?: ChartPaletteName;
|
|
19
|
+
referenceLine?: {
|
|
20
|
+
y: number;
|
|
21
|
+
label?: string;
|
|
22
|
+
band?: boolean;
|
|
23
|
+
};
|
|
24
|
+
markers?: ChartMarker[];
|
|
25
|
+
texture?: boolean;
|
|
26
|
+
partialLastBar?: boolean;
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
valueFormatter?: (value: number) => string;
|
|
29
|
+
labelFormatter?: (label: string | number) => string;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function BarChart({ data, index, series, variant, legend, legendAlign, valueLabels, height, yAxisWidth, bare, barCategoryGap, palette, referenceLine, markers, texture, partialLastBar, loading, valueFormatter, labelFormatter, className }: BarChartProps): React$1.JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { BarChart, BarChartProps };
|