@alpic-ai/ui 0.0.0-dev.g2df19cc → 0.0.0-dev.g2eefcc2
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 +5 -6
- package/dist/components/accordion.d.mts +5 -6
- package/dist/components/alert.d.mts +9 -11
- package/dist/components/area-chart.d.mts +62 -0
- package/dist/components/area-chart.mjs +269 -0
- package/dist/components/attachment-tile.d.mts +1 -3
- package/dist/components/avatar.d.mts +8 -10
- package/dist/components/badge.d.mts +2 -4
- package/dist/components/bar-chart.d.mts +48 -0
- package/dist/components/bar-chart.mjs +256 -0
- package/dist/components/bar-list.d.mts +28 -0
- package/dist/components/bar-list.mjs +98 -0
- package/dist/components/breadcrumb.d.mts +10 -11
- package/dist/components/button.d.mts +6 -8
- package/dist/components/card.d.mts +9 -10
- package/dist/components/chart-card.d.mts +25 -0
- package/dist/components/chart-card.mjs +48 -0
- package/dist/components/chart-container.d.mts +20 -0
- package/dist/components/chart-container.mjs +37 -0
- package/dist/components/chart-legend.d.mts +16 -0
- package/dist/components/chart-legend.mjs +26 -0
- package/dist/components/chart-tooltip.d.mts +33 -0
- package/dist/components/chart-tooltip.mjs +52 -0
- package/dist/components/checkbox.d.mts +2 -3
- package/dist/components/collapsible.d.mts +4 -5
- package/dist/components/combobox.d.mts +12 -11
- package/dist/components/combobox.mjs +7 -4
- package/dist/components/command.d.mts +9 -10
- package/dist/components/copyable.d.mts +2 -3
- package/dist/components/description-list.d.mts +5 -6
- package/dist/components/dialog.d.mts +15 -17
- package/dist/components/donut-chart.d.mts +46 -0
- package/dist/components/donut-chart.mjs +185 -0
- package/dist/components/dropdown-menu.d.mts +18 -20
- package/dist/components/form.d.mts +38 -21
- package/dist/components/form.mjs +6 -6
- package/dist/components/github-button.d.mts +1 -2
- package/dist/components/heatmap-chart.d.mts +40 -0
- package/dist/components/heatmap-chart.mjs +198 -0
- package/dist/components/input-group.d.mts +5 -7
- package/dist/components/input.d.mts +4 -5
- package/dist/components/input.mjs +2 -2
- package/dist/components/label.d.mts +2 -3
- package/dist/components/line-chart.d.mts +55 -0
- package/dist/components/line-chart.mjs +211 -0
- package/dist/components/page-loader.d.mts +1 -3
- package/dist/components/pagination.d.mts +3 -4
- package/dist/components/popover.d.mts +5 -6
- package/dist/components/radio-group.d.mts +3 -4
- package/dist/components/scroll-area.d.mts +3 -4
- package/dist/components/select-trigger-variants.d.mts +1 -3
- package/dist/components/select.d.mts +9 -10
- package/dist/components/separator.d.mts +2 -3
- package/dist/components/sheet.d.mts +11 -12
- package/dist/components/shimmer-text.d.mts +2 -2
- package/dist/components/sidebar.d.mts +34 -36
- package/dist/components/sidebar.mjs +10 -10
- package/dist/components/skeleton.d.mts +2 -4
- package/dist/components/sonner.d.mts +5 -6
- package/dist/components/spinner.d.mts +3 -5
- package/dist/components/stat.d.mts +30 -0
- package/dist/components/stat.mjs +107 -0
- package/dist/components/status-dot.d.mts +2 -4
- package/dist/components/switch.d.mts +2 -3
- package/dist/components/table.d.mts +10 -11
- package/dist/components/tabs.d.mts +12 -14
- package/dist/components/tag.d.mts +3 -5
- package/dist/components/task-progress.d.mts +1 -3
- package/dist/components/textarea.d.mts +3 -4
- package/dist/components/textarea.mjs +2 -2
- package/dist/components/toggle-group.d.mts +4 -6
- package/dist/components/toggle-group.mjs +3 -3
- package/dist/components/tooltip-icon-button.d.mts +1 -2
- package/dist/components/tooltip.d.mts +5 -6
- package/dist/components/typography.d.mts +4 -5
- package/dist/components/wizard.d.mts +4 -23
- 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-mobile.mjs +3 -3
- package/dist/hooks/use-reduced-motion.d.mts +4 -0
- package/dist/hooks/use-reduced-motion.mjs +16 -0
- package/dist/lib/chart-palette.d.mts +4 -0
- package/dist/lib/chart-palette.mjs +95 -0
- package/dist/lib/chart.d.mts +14 -0
- package/dist/lib/chart.mjs +27 -0
- package/package.json +30 -29
- package/src/components/area-chart.tsx +339 -0
- package/src/components/bar-chart.tsx +309 -0
- package/src/components/bar-list.tsx +150 -0
- package/src/components/chart-card.tsx +63 -0
- package/src/components/chart-container.tsx +49 -0
- package/src/components/chart-legend.tsx +41 -0
- package/src/components/chart-tooltip.tsx +93 -0
- package/src/components/combobox.tsx +9 -2
- package/src/components/donut-chart.tsx +217 -0
- package/src/components/heatmap-chart.tsx +287 -0
- package/src/components/line-chart.tsx +264 -0
- package/src/components/stat.tsx +109 -0
- package/src/components/wizard.tsx +1 -35
- package/src/hooks/use-chart-theme.ts +75 -0
- package/src/hooks/use-reduced-motion.ts +17 -0
- package/src/lib/chart-palette.ts +110 -0
- package/src/lib/chart.ts +56 -0
- package/src/stories/area-chart.stories.tsx +198 -0
- package/src/stories/bar-chart.stories.tsx +167 -0
- package/src/stories/bar-list.stories.tsx +83 -0
- package/src/stories/donut-chart.stories.tsx +110 -0
- package/src/stories/heatmap-chart.stories.tsx +105 -0
- package/src/stories/line-chart.stories.tsx +144 -0
- package/src/stories/stat.stories.tsx +64 -0
- package/src/stories/wizard.stories.tsx +22 -4
- package/src/styles/tokens.css +63 -0
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
import { selectTriggerVariants } from "./select-trigger-variants.mjs";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
3
|
+
import * as React$1 from "react";
|
|
5
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
5
|
|
|
7
6
|
//#region src/components/select.d.ts
|
|
8
7
|
declare function Select({
|
|
9
8
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof SelectPrimitive.Root>):
|
|
9
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Root>): React$1.JSX.Element;
|
|
11
10
|
declare function SelectGroup({
|
|
12
11
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof SelectPrimitive.Group>):
|
|
12
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Group>): React$1.JSX.Element;
|
|
14
13
|
declare function SelectValue({
|
|
15
14
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof SelectPrimitive.Value>):
|
|
15
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Value>): React$1.JSX.Element;
|
|
17
16
|
declare function SelectTrigger({
|
|
18
17
|
className,
|
|
19
18
|
size,
|
|
20
19
|
children,
|
|
21
20
|
...props
|
|
22
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & VariantProps<typeof selectTriggerVariants>):
|
|
21
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Trigger> & VariantProps<typeof selectTriggerVariants>): React$1.JSX.Element;
|
|
23
22
|
declare function SelectContent({
|
|
24
23
|
className,
|
|
25
24
|
children,
|
|
26
25
|
position,
|
|
27
26
|
...props
|
|
28
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>):
|
|
27
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Content>): React$1.JSX.Element;
|
|
29
28
|
declare function SelectLabel({
|
|
30
29
|
className,
|
|
31
30
|
...props
|
|
32
|
-
}: React.ComponentProps<typeof SelectPrimitive.Label>):
|
|
31
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Label>): React$1.JSX.Element;
|
|
33
32
|
declare function SelectItem({
|
|
34
33
|
className,
|
|
35
34
|
children,
|
|
36
35
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>):
|
|
36
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Item>): React$1.JSX.Element;
|
|
38
37
|
declare function SelectSeparator({
|
|
39
38
|
className,
|
|
40
39
|
...props
|
|
41
|
-
}: React.ComponentProps<typeof SelectPrimitive.Separator>):
|
|
40
|
+
}: React$1.ComponentProps<typeof SelectPrimitive.Separator>): React$1.JSX.Element;
|
|
42
41
|
//#endregion
|
|
43
42
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, selectTriggerVariants };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React$1 from "react";
|
|
3
2
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
3
|
|
|
5
4
|
//#region src/components/separator.d.ts
|
|
@@ -8,6 +7,6 @@ declare function Separator({
|
|
|
8
7
|
orientation,
|
|
9
8
|
decorative,
|
|
10
9
|
...props
|
|
11
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>):
|
|
10
|
+
}: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): React$1.JSX.Element;
|
|
12
11
|
//#endregion
|
|
13
12
|
export { Separator };
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React$1 from "react";
|
|
3
2
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
3
|
|
|
5
4
|
//#region src/components/sheet.d.ts
|
|
6
5
|
declare function Sheet({
|
|
7
6
|
...props
|
|
8
|
-
}: React.ComponentProps<typeof SheetPrimitive.Root>):
|
|
7
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Root>): React$1.JSX.Element;
|
|
9
8
|
declare function SheetTrigger({
|
|
10
9
|
...props
|
|
11
|
-
}: React.ComponentProps<typeof SheetPrimitive.Trigger>):
|
|
10
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Trigger>): React$1.JSX.Element;
|
|
12
11
|
declare function SheetClose({
|
|
13
12
|
...props
|
|
14
|
-
}: React.ComponentProps<typeof SheetPrimitive.Close>):
|
|
13
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Close>): React$1.JSX.Element;
|
|
15
14
|
declare function SheetPortal({
|
|
16
15
|
...props
|
|
17
|
-
}: React.ComponentProps<typeof SheetPrimitive.Portal>):
|
|
16
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Portal>): React$1.JSX.Element;
|
|
18
17
|
declare function SheetContent({
|
|
19
18
|
className,
|
|
20
19
|
children,
|
|
21
20
|
side,
|
|
22
21
|
...props
|
|
23
|
-
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
22
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
24
23
|
side?: "top" | "right" | "bottom" | "left";
|
|
25
|
-
}):
|
|
24
|
+
}): React$1.JSX.Element;
|
|
26
25
|
declare function SheetHeader({
|
|
27
26
|
className,
|
|
28
27
|
...props
|
|
29
|
-
}: React.ComponentProps<"div">):
|
|
28
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
30
29
|
declare function SheetFooter({
|
|
31
30
|
className,
|
|
32
31
|
...props
|
|
33
|
-
}: React.ComponentProps<"div">):
|
|
32
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
34
33
|
declare function SheetTitle({
|
|
35
34
|
className,
|
|
36
35
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof SheetPrimitive.Title>):
|
|
36
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Title>): React$1.JSX.Element;
|
|
38
37
|
declare function SheetDescription({
|
|
39
38
|
className,
|
|
40
39
|
...props
|
|
41
|
-
}: React.ComponentProps<typeof SheetPrimitive.Description>):
|
|
40
|
+
}: React$1.ComponentProps<typeof SheetPrimitive.Description>): React$1.JSX.Element;
|
|
42
41
|
//#endregion
|
|
43
42
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/shimmer-text.d.ts
|
|
4
4
|
declare function ShimmerText({
|
|
@@ -7,6 +7,6 @@ declare function ShimmerText({
|
|
|
7
7
|
}: {
|
|
8
8
|
children: string | number;
|
|
9
9
|
className?: string;
|
|
10
|
-
}):
|
|
10
|
+
}): React.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ShimmerText };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Button } from "./button.mjs";
|
|
2
2
|
import { TooltipContent } from "./tooltip.mjs";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
|
+
import * as React$1 from "react";
|
|
7
5
|
|
|
8
6
|
//#region src/components/sidebar.d.ts
|
|
9
7
|
type SidebarContextProps = {
|
|
@@ -24,11 +22,11 @@ declare function SidebarProvider({
|
|
|
24
22
|
style,
|
|
25
23
|
children,
|
|
26
24
|
...props
|
|
27
|
-
}: React.ComponentProps<"div"> & {
|
|
25
|
+
}: React$1.ComponentProps<"div"> & {
|
|
28
26
|
defaultOpen?: boolean;
|
|
29
27
|
open?: boolean;
|
|
30
28
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
}):
|
|
29
|
+
}): React$1.JSX.Element;
|
|
32
30
|
declare function Sidebar({
|
|
33
31
|
side,
|
|
34
32
|
variant,
|
|
@@ -36,26 +34,26 @@ declare function Sidebar({
|
|
|
36
34
|
className,
|
|
37
35
|
children,
|
|
38
36
|
...props
|
|
39
|
-
}: React.ComponentProps<"div"> & {
|
|
37
|
+
}: React$1.ComponentProps<"div"> & {
|
|
40
38
|
side?: "left" | "right";
|
|
41
39
|
variant?: "sidebar" | "floating" | "inset";
|
|
42
40
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
43
|
-
}):
|
|
41
|
+
}): React$1.JSX.Element;
|
|
44
42
|
declare function SidebarTrigger({
|
|
45
43
|
className,
|
|
46
44
|
onClick,
|
|
47
45
|
...props
|
|
48
|
-
}: React.ComponentProps<typeof Button>):
|
|
46
|
+
}: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
|
|
49
47
|
declare function SidebarRail({
|
|
50
48
|
className,
|
|
51
49
|
...props
|
|
52
|
-
}: React.ComponentProps<"button">):
|
|
50
|
+
}: React$1.ComponentProps<"button">): React$1.JSX.Element;
|
|
53
51
|
declare function SidebarInset({
|
|
54
52
|
className,
|
|
55
53
|
...props
|
|
56
|
-
}: React.ComponentProps<"main">):
|
|
57
|
-
interface SidebarHeaderProps extends React.ComponentProps<"div"> {
|
|
58
|
-
icon?: React.ReactNode;
|
|
54
|
+
}: React$1.ComponentProps<"main">): React$1.JSX.Element;
|
|
55
|
+
interface SidebarHeaderProps extends React$1.ComponentProps<"div"> {
|
|
56
|
+
icon?: React$1.ReactNode;
|
|
59
57
|
title?: string;
|
|
60
58
|
}
|
|
61
59
|
declare function SidebarHeader({
|
|
@@ -64,52 +62,52 @@ declare function SidebarHeader({
|
|
|
64
62
|
title,
|
|
65
63
|
children,
|
|
66
64
|
...props
|
|
67
|
-
}: SidebarHeaderProps):
|
|
65
|
+
}: SidebarHeaderProps): React$1.JSX.Element;
|
|
68
66
|
declare function SidebarFooter({
|
|
69
67
|
className,
|
|
70
68
|
...props
|
|
71
|
-
}: React.ComponentProps<"div">):
|
|
69
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
72
70
|
declare function SidebarSeparator({
|
|
73
71
|
className
|
|
74
|
-
}: React.ComponentProps<"div">):
|
|
72
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
75
73
|
declare function SidebarContent({
|
|
76
74
|
className,
|
|
77
75
|
...props
|
|
78
|
-
}: React.ComponentProps<"div">):
|
|
76
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
79
77
|
declare function SidebarGroup({
|
|
80
78
|
className,
|
|
81
79
|
...props
|
|
82
|
-
}: React.ComponentProps<"div">):
|
|
80
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
83
81
|
declare function SidebarGroupLabel({
|
|
84
82
|
className,
|
|
85
83
|
asChild,
|
|
86
84
|
...props
|
|
87
|
-
}: React.ComponentProps<"div"> & {
|
|
85
|
+
}: React$1.ComponentProps<"div"> & {
|
|
88
86
|
asChild?: boolean;
|
|
89
|
-
}):
|
|
87
|
+
}): React$1.JSX.Element;
|
|
90
88
|
declare function SidebarGroupAction({
|
|
91
89
|
className,
|
|
92
90
|
asChild,
|
|
93
91
|
...props
|
|
94
|
-
}: React.ComponentProps<"button"> & {
|
|
92
|
+
}: React$1.ComponentProps<"button"> & {
|
|
95
93
|
asChild?: boolean;
|
|
96
|
-
}):
|
|
94
|
+
}): React$1.JSX.Element;
|
|
97
95
|
declare function SidebarGroupContent({
|
|
98
96
|
className,
|
|
99
97
|
...props
|
|
100
|
-
}: React.ComponentProps<"div">):
|
|
98
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
101
99
|
declare function SidebarMenu({
|
|
102
100
|
className,
|
|
103
101
|
...props
|
|
104
|
-
}: React.ComponentProps<"ul">):
|
|
102
|
+
}: React$1.ComponentProps<"ul">): React$1.JSX.Element;
|
|
105
103
|
declare function SidebarMenuItem({
|
|
106
104
|
className,
|
|
107
105
|
...props
|
|
108
|
-
}: React.ComponentProps<"li">):
|
|
106
|
+
}: React$1.ComponentProps<"li">): React$1.JSX.Element;
|
|
109
107
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
110
108
|
variant?: "default" | "outline" | null | undefined;
|
|
111
109
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
112
|
-
} &
|
|
110
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
113
111
|
declare function SidebarMenuButton({
|
|
114
112
|
asChild,
|
|
115
113
|
isActive,
|
|
@@ -118,46 +116,46 @@ declare function SidebarMenuButton({
|
|
|
118
116
|
tooltip,
|
|
119
117
|
className,
|
|
120
118
|
...props
|
|
121
|
-
}: React.ComponentProps<"button"> & {
|
|
119
|
+
}: React$1.ComponentProps<"button"> & {
|
|
122
120
|
asChild?: boolean;
|
|
123
121
|
isActive?: boolean;
|
|
124
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
125
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
122
|
+
tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
|
|
123
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): React$1.JSX.Element;
|
|
126
124
|
declare function SidebarMenuAction({
|
|
127
125
|
className,
|
|
128
126
|
asChild,
|
|
129
127
|
showOnHover,
|
|
130
128
|
...props
|
|
131
|
-
}: React.ComponentProps<"button"> & {
|
|
129
|
+
}: React$1.ComponentProps<"button"> & {
|
|
132
130
|
asChild?: boolean;
|
|
133
131
|
showOnHover?: boolean;
|
|
134
|
-
}):
|
|
132
|
+
}): React$1.JSX.Element;
|
|
135
133
|
declare function SidebarMenuBadge({
|
|
136
134
|
className,
|
|
137
135
|
...props
|
|
138
|
-
}: React.ComponentProps<"div">):
|
|
136
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
139
137
|
declare function SidebarMenuSkeleton({
|
|
140
138
|
className,
|
|
141
139
|
...props
|
|
142
|
-
}: React.ComponentProps<"div">):
|
|
140
|
+
}: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
143
141
|
declare function SidebarMenuSub({
|
|
144
142
|
className,
|
|
145
143
|
...props
|
|
146
|
-
}: React.ComponentProps<"ul">):
|
|
144
|
+
}: React$1.ComponentProps<"ul">): React$1.JSX.Element;
|
|
147
145
|
declare function SidebarMenuSubItem({
|
|
148
146
|
className,
|
|
149
147
|
...props
|
|
150
|
-
}: React.ComponentProps<"li">):
|
|
148
|
+
}: React$1.ComponentProps<"li">): React$1.JSX.Element;
|
|
151
149
|
declare function SidebarMenuSubButton({
|
|
152
150
|
asChild,
|
|
153
151
|
size,
|
|
154
152
|
isActive,
|
|
155
153
|
className,
|
|
156
154
|
...props
|
|
157
|
-
}: React.ComponentProps<"a"> & {
|
|
155
|
+
}: React$1.ComponentProps<"a"> & {
|
|
158
156
|
asChild?: boolean;
|
|
159
157
|
size?: "sm" | "md";
|
|
160
158
|
isActive?: boolean;
|
|
161
|
-
}):
|
|
159
|
+
}): React$1.JSX.Element;
|
|
162
160
|
//#endregion
|
|
163
161
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar };
|
|
@@ -8,7 +8,7 @@ import { useIsMobile } from "../hooks/use-mobile.mjs";
|
|
|
8
8
|
import { Skeleton } from "./skeleton.mjs";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { cva } from "class-variance-authority";
|
|
11
|
-
import * as React from "react";
|
|
11
|
+
import * as React$1 from "react";
|
|
12
12
|
import { Slot } from "@radix-ui/react-slot";
|
|
13
13
|
//#region src/components/sidebar.tsx
|
|
14
14
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
@@ -29,27 +29,27 @@ const INTERACTIVE_SIDEBAR_ELEMENT_SELECTOR = [
|
|
|
29
29
|
"[contenteditable='true']",
|
|
30
30
|
"[tabindex]:not([tabindex='-1'])"
|
|
31
31
|
].join(", ");
|
|
32
|
-
const SidebarContext = React.createContext(null);
|
|
32
|
+
const SidebarContext = React$1.createContext(null);
|
|
33
33
|
function useSidebar() {
|
|
34
|
-
const context = React.useContext(SidebarContext);
|
|
34
|
+
const context = React$1.useContext(SidebarContext);
|
|
35
35
|
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
36
36
|
return context;
|
|
37
37
|
}
|
|
38
38
|
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
39
39
|
const isMobile = useIsMobile();
|
|
40
|
-
const [openMobile, setOpenMobile] = React.useState(false);
|
|
41
|
-
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
40
|
+
const [openMobile, setOpenMobile] = React$1.useState(false);
|
|
41
|
+
const [_open, _setOpen] = React$1.useState(defaultOpen);
|
|
42
42
|
const open = openProp ?? _open;
|
|
43
|
-
const setOpen = React.useCallback((value) => {
|
|
43
|
+
const setOpen = React$1.useCallback((value) => {
|
|
44
44
|
const openState = typeof value === "function" ? value(open) : value;
|
|
45
45
|
if (setOpenProp) setOpenProp(openState);
|
|
46
46
|
else _setOpen(openState);
|
|
47
47
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
48
48
|
}, [setOpenProp, open]);
|
|
49
|
-
const toggleSidebar = React.useCallback(() => {
|
|
49
|
+
const toggleSidebar = React$1.useCallback(() => {
|
|
50
50
|
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
51
51
|
}, [isMobile, setOpen]);
|
|
52
|
-
React.useEffect(() => {
|
|
52
|
+
React$1.useEffect(() => {
|
|
53
53
|
const handleKeyDown = (event) => {
|
|
54
54
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
55
55
|
event.preventDefault();
|
|
@@ -60,7 +60,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
60
60
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
61
61
|
}, [toggleSidebar]);
|
|
62
62
|
const state = open ? "expanded" : "collapsed";
|
|
63
|
-
const contextValue = React.useMemo(() => ({
|
|
63
|
+
const contextValue = React$1.useMemo(() => ({
|
|
64
64
|
state,
|
|
65
65
|
open,
|
|
66
66
|
setOpen,
|
|
@@ -380,7 +380,7 @@ function SidebarMenuBadge({ className, ...props }) {
|
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
382
|
function SidebarMenuSkeleton({ className, ...props }) {
|
|
383
|
-
const [width] = React.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
|
|
383
|
+
const [width] = React$1.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
|
|
384
384
|
return /* @__PURE__ */ jsx("div", {
|
|
385
385
|
"data-slot": "sidebar-menu-skeleton",
|
|
386
386
|
"data-sidebar": "menu-skeleton",
|
|
@@ -1,16 +1,14 @@
|
|
|
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
2
|
|
|
5
3
|
//#region src/components/skeleton.d.ts
|
|
6
4
|
declare const skeletonVariants: (props?: ({
|
|
7
5
|
shape?: "rectangle" | "circle" | null | undefined;
|
|
8
|
-
} &
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
7
|
interface SkeletonProps extends React.ComponentProps<"div">, VariantProps<typeof skeletonVariants> {}
|
|
10
8
|
declare function Skeleton({
|
|
11
9
|
className,
|
|
12
10
|
shape,
|
|
13
11
|
...props
|
|
14
|
-
}: SkeletonProps):
|
|
12
|
+
}: SkeletonProps): import("react").JSX.Element;
|
|
15
13
|
//#endregion
|
|
16
14
|
export { Skeleton, skeletonVariants };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React$1 from "react";
|
|
3
2
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
4
3
|
|
|
5
4
|
//#region src/components/sonner.d.ts
|
|
6
|
-
type ToasterProps = React.ComponentProps<typeof Toaster$1>;
|
|
7
|
-
declare function Toaster(props: ToasterProps):
|
|
5
|
+
type ToasterProps = React$1.ComponentProps<typeof Toaster$1>;
|
|
6
|
+
declare function Toaster(props: ToasterProps): React$1.JSX.Element;
|
|
8
7
|
interface ActionToastProps {
|
|
9
8
|
toastId: string | number;
|
|
10
9
|
title: string;
|
|
@@ -12,7 +11,7 @@ interface ActionToastProps {
|
|
|
12
11
|
onDismiss?: () => void;
|
|
13
12
|
confirm: {
|
|
14
13
|
label: string;
|
|
15
|
-
icon?: React.ReactNode;
|
|
14
|
+
icon?: React$1.ReactNode;
|
|
16
15
|
onClick: () => void;
|
|
17
16
|
loading?: boolean;
|
|
18
17
|
disabled?: boolean;
|
|
@@ -24,6 +23,6 @@ declare function ActionToast({
|
|
|
24
23
|
description,
|
|
25
24
|
onDismiss,
|
|
26
25
|
confirm
|
|
27
|
-
}: ActionToastProps):
|
|
26
|
+
}: ActionToastProps): React$1.JSX.Element;
|
|
28
27
|
//#endregion
|
|
29
28
|
export { ActionToast, type ActionToastProps, Toaster, type ToasterProps, toast };
|
|
@@ -1,19 +1,17 @@
|
|
|
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
2
|
|
|
5
3
|
//#region src/components/spinner.d.ts
|
|
6
4
|
declare const spinnerVariants: (props?: ({
|
|
7
5
|
variant?: "secondary" | "primary" | null | undefined;
|
|
8
6
|
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
} &
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
8
|
interface SpinnerProps extends Omit<React.ComponentProps<"svg">, "children">, VariantProps<typeof spinnerVariants> {}
|
|
11
9
|
declare function Spinner({
|
|
12
10
|
className,
|
|
13
11
|
variant,
|
|
14
12
|
size,
|
|
15
13
|
...props
|
|
16
|
-
}: SpinnerProps):
|
|
14
|
+
}: SpinnerProps): import("react").JSX.Element;
|
|
17
15
|
interface SpinnerBlockProps extends VariantProps<typeof spinnerVariants> {
|
|
18
16
|
className?: string;
|
|
19
17
|
fullscreen?: boolean;
|
|
@@ -25,6 +23,6 @@ declare function SpinnerBlock({
|
|
|
25
23
|
size,
|
|
26
24
|
fullscreen,
|
|
27
25
|
withLabel
|
|
28
|
-
}: SpinnerBlockProps):
|
|
26
|
+
}: SpinnerBlockProps): import("react").JSX.Element;
|
|
29
27
|
//#endregion
|
|
30
28
|
export { Spinner, SpinnerBlock, type SpinnerBlockProps, type SpinnerProps, spinnerVariants };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/stat.d.ts
|
|
4
|
+
declare const statDeltaVariants: (props?: ({
|
|
5
|
+
sentiment?: "positive" | "negative" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
interface StatDelta {
|
|
8
|
+
value: number;
|
|
9
|
+
direction: "up" | "down";
|
|
10
|
+
invert?: boolean;
|
|
11
|
+
label?: React$1.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
interface StatProps extends React$1.ComponentProps<"div"> {
|
|
14
|
+
value: React$1.ReactNode;
|
|
15
|
+
unit?: string;
|
|
16
|
+
delta?: StatDelta;
|
|
17
|
+
sparkline?: number[] | Array<{
|
|
18
|
+
value: number;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
declare function Stat({
|
|
22
|
+
value,
|
|
23
|
+
unit,
|
|
24
|
+
delta,
|
|
25
|
+
sparkline,
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: StatProps): React$1.JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Stat, StatDelta, StatProps, statDeltaVariants };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.mjs";
|
|
3
|
+
import { useChartContext } from "./chart-container.mjs";
|
|
4
|
+
import { ArrowDown, ArrowUp } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import * as React$1 from "react";
|
|
8
|
+
import { Area, AreaChart, ResponsiveContainer } from "recharts";
|
|
9
|
+
//#region src/components/stat.tsx
|
|
10
|
+
const statDeltaVariants = cva("inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-none", {
|
|
11
|
+
variants: { sentiment: {
|
|
12
|
+
positive: "text-success bg-success/12",
|
|
13
|
+
negative: "text-destructive bg-destructive/12"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { sentiment: "positive" }
|
|
16
|
+
});
|
|
17
|
+
const toSparkData = (sparkline) => (sparkline ?? []).map((point, index) => typeof point === "number" ? {
|
|
18
|
+
index,
|
|
19
|
+
value: point
|
|
20
|
+
} : {
|
|
21
|
+
index,
|
|
22
|
+
value: point.value
|
|
23
|
+
});
|
|
24
|
+
function Stat({ value, unit, delta, sparkline, className, ...props }) {
|
|
25
|
+
const { palette } = useChartContext();
|
|
26
|
+
const gradientId = React$1.useId().replace(/:/g, "");
|
|
27
|
+
const sparkData = React$1.useMemo(() => toSparkData(sparkline), [sparkline]);
|
|
28
|
+
const sparkColor = palette[0];
|
|
29
|
+
const sentiment = delta && (delta.invert ? delta.direction === "down" : delta.direction === "up") ? "positive" : "negative";
|
|
30
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
"data-slot": "stat",
|
|
32
|
+
className: cn("flex flex-col gap-2.5", className),
|
|
33
|
+
...props,
|
|
34
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex items-baseline gap-3",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "type-display-sm font-bold leading-none tracking-tight tabular-nums text-foreground",
|
|
39
|
+
children: value
|
|
40
|
+
}),
|
|
41
|
+
unit && /* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: "font-mono text-[11px] leading-none text-quaternary-foreground mb-0.5",
|
|
43
|
+
children: unit
|
|
44
|
+
}),
|
|
45
|
+
delta && /* @__PURE__ */ jsxs(DeltaPill, {
|
|
46
|
+
sentiment,
|
|
47
|
+
className: "mb-0.5",
|
|
48
|
+
children: [delta.direction === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "size-3" }) : /* @__PURE__ */ jsx(ArrowDown, { className: "size-3" }), delta.label ?? `${delta.value}%`]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}), sparkData.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: "h-9 w-full",
|
|
53
|
+
children: /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: "100%",
|
|
56
|
+
children: /* @__PURE__ */ jsxs(AreaChart, {
|
|
57
|
+
data: sparkData,
|
|
58
|
+
margin: {
|
|
59
|
+
top: 4,
|
|
60
|
+
right: 2,
|
|
61
|
+
bottom: 0,
|
|
62
|
+
left: 2
|
|
63
|
+
},
|
|
64
|
+
children: [/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", {
|
|
65
|
+
id: gradientId,
|
|
66
|
+
x1: "0",
|
|
67
|
+
y1: "0",
|
|
68
|
+
x2: "0",
|
|
69
|
+
y2: "1",
|
|
70
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
71
|
+
offset: "0%",
|
|
72
|
+
stopColor: sparkColor,
|
|
73
|
+
stopOpacity: .4
|
|
74
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
75
|
+
offset: "100%",
|
|
76
|
+
stopColor: sparkColor,
|
|
77
|
+
stopOpacity: 0
|
|
78
|
+
})]
|
|
79
|
+
}) }), /* @__PURE__ */ jsx(Area, {
|
|
80
|
+
type: "monotone",
|
|
81
|
+
dataKey: "value",
|
|
82
|
+
stroke: sparkColor,
|
|
83
|
+
strokeWidth: 1.6,
|
|
84
|
+
fill: `url(#${gradientId})`,
|
|
85
|
+
isAnimationActive: false,
|
|
86
|
+
dot: ({ cx, cy, index }) => {
|
|
87
|
+
return index === sparkData.length - 1 && cx != null && cy != null ? /* @__PURE__ */ jsx("circle", {
|
|
88
|
+
cx,
|
|
89
|
+
cy,
|
|
90
|
+
r: 2.5,
|
|
91
|
+
fill: sparkColor
|
|
92
|
+
}, index) : /* @__PURE__ */ jsx("g", {}, index);
|
|
93
|
+
}
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function DeltaPill({ sentiment, className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("span", {
|
|
102
|
+
className: cn(statDeltaVariants({ sentiment }), className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { Stat, statDeltaVariants };
|
|
@@ -1,19 +1,17 @@
|
|
|
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
2
|
|
|
5
3
|
//#region src/components/status-dot.d.ts
|
|
6
4
|
declare const statusDotVariants: (props?: ({
|
|
7
5
|
variant?: "destructive" | "warning" | "success" | "muted" | null | undefined;
|
|
8
6
|
pulse?: boolean | null | undefined;
|
|
9
|
-
} &
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
8
|
interface StatusDotProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statusDotVariants> {}
|
|
11
9
|
declare function StatusDot({
|
|
12
10
|
className,
|
|
13
11
|
variant,
|
|
14
12
|
pulse,
|
|
15
13
|
...props
|
|
16
|
-
}: StatusDotProps):
|
|
14
|
+
}: StatusDotProps): import("react").JSX.Element;
|
|
17
15
|
type StatusDotVariantProps = Required<Pick<VariantProps<typeof statusDotVariants>, "variant" | "pulse">>;
|
|
18
16
|
//#endregion
|
|
19
17
|
export { StatusDot, type StatusDotVariantProps, statusDotVariants };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React$1 from "react";
|
|
3
2
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
3
|
|
|
5
4
|
//#region src/components/switch.d.ts
|
|
6
5
|
declare function Switch({
|
|
7
6
|
className,
|
|
8
7
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof SwitchPrimitive.Root>):
|
|
8
|
+
}: React$1.ComponentProps<typeof SwitchPrimitive.Root>): React$1.JSX.Element;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { Switch };
|