react-shadcn-kit 0.0.1
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/LICENSE +7 -0
- package/README.md +113 -0
- package/dist/assets/global.css +1 -0
- package/dist/atoms/accordion.d.ts +7 -0
- package/dist/atoms/accordion.js +62 -0
- package/dist/atoms/alert-dialog.d.ts +14 -0
- package/dist/atoms/alert-dialog.js +127 -0
- package/dist/atoms/alert.d.ts +9 -0
- package/dist/atoms/alert.js +60 -0
- package/dist/atoms/aspect-ratio.d.ts +3 -0
- package/dist/atoms/aspect-ratio.js +8 -0
- package/dist/atoms/avatar.d.ts +6 -0
- package/dist/atoms/avatar.js +41 -0
- package/dist/atoms/badge.d.ts +9 -0
- package/dist/atoms/badge.js +32 -0
- package/dist/atoms/breadcrumb.d.ts +11 -0
- package/dist/atoms/breadcrumb.js +95 -0
- package/dist/atoms/button-group.d.ts +11 -0
- package/dist/atoms/button-group.js +75 -0
- package/dist/atoms/button.d.ts +10 -0
- package/dist/atoms/button.js +51 -0
- package/dist/atoms/calendar.d.ts +8 -0
- package/dist/atoms/calendar.js +144 -0
- package/dist/atoms/card.d.ts +9 -0
- package/dist/atoms/card.js +80 -0
- package/dist/atoms/carousel.d.ts +19 -0
- package/dist/atoms/carousel.js +165 -0
- package/dist/atoms/chart.d.ts +43 -0
- package/dist/atoms/chart.js +203 -0
- package/dist/atoms/checkbox.d.ts +4 -0
- package/dist/atoms/checkbox.js +28 -0
- package/dist/atoms/collapsible.d.ts +5 -0
- package/dist/atoms/collapsible.js +20 -0
- package/dist/atoms/command.d.ts +18 -0
- package/dist/atoms/command.js +143 -0
- package/dist/atoms/context-menu.d.ts +25 -0
- package/dist/atoms/context-menu.js +200 -0
- package/dist/atoms/dialog.d.ts +15 -0
- package/dist/atoms/dialog.js +122 -0
- package/dist/atoms/drawer.d.ts +13 -0
- package/dist/atoms/drawer.js +117 -0
- package/dist/atoms/dropdown-menu.d.ts +25 -0
- package/dist/atoms/dropdown-menu.js +204 -0
- package/dist/atoms/empty.d.ts +11 -0
- package/dist/atoms/empty.js +99 -0
- package/dist/atoms/field.d.ts +24 -0
- package/dist/atoms/field.js +208 -0
- package/dist/atoms/form.d.ts +24 -0
- package/dist/atoms/form.js +87 -0
- package/dist/atoms/hover-card.d.ts +6 -0
- package/dist/atoms/hover-card.js +34 -0
- package/dist/atoms/input-group.d.ts +16 -0
- package/dist/atoms/input-group.js +142 -0
- package/dist/atoms/input-otp.d.ts +11 -0
- package/dist/atoms/input-otp.js +55 -0
- package/dist/atoms/input.d.ts +3 -0
- package/dist/atoms/input.js +21 -0
- package/dist/atoms/item.d.ts +23 -0
- package/dist/atoms/item.js +164 -0
- package/dist/atoms/kbd.d.ts +3 -0
- package/dist/atoms/kbd.js +31 -0
- package/dist/atoms/label.d.ts +4 -0
- package/dist/atoms/label.js +19 -0
- package/dist/atoms/menubar.d.ts +26 -0
- package/dist/atoms/menubar.js +229 -0
- package/dist/atoms/navigation-menu.d.ts +14 -0
- package/dist/atoms/navigation-menu.js +159 -0
- package/dist/atoms/pagination.d.ts +13 -0
- package/dist/atoms/pagination.js +100 -0
- package/dist/atoms/popover.d.ts +7 -0
- package/dist/atoms/popover.js +38 -0
- package/dist/atoms/progress.d.ts +4 -0
- package/dist/atoms/progress.js +28 -0
- package/dist/atoms/radio-group.d.ts +5 -0
- package/dist/atoms/radio-group.js +45 -0
- package/dist/atoms/resizable.d.ts +8 -0
- package/dist/atoms/resizable.js +43 -0
- package/dist/atoms/scroll-area.d.ts +5 -0
- package/dist/atoms/scroll-area.js +60 -0
- package/dist/atoms/select.d.ts +15 -0
- package/dist/atoms/select.js +156 -0
- package/dist/atoms/separator.d.ts +4 -0
- package/dist/atoms/separator.js +26 -0
- package/dist/atoms/sheet.d.ts +13 -0
- package/dist/atoms/sheet.js +117 -0
- package/dist/atoms/sidebar.d.ts +69 -0
- package/dist/atoms/sidebar.js +570 -0
- package/dist/atoms/skeleton.d.ts +2 -0
- package/dist/atoms/skeleton.js +15 -0
- package/dist/atoms/slider.d.ts +4 -0
- package/dist/atoms/slider.js +63 -0
- package/dist/atoms/sonner.d.ts +3 -0
- package/dist/atoms/sonner.js +31 -0
- package/dist/atoms/spinner.d.ts +2 -0
- package/dist/atoms/spinner.js +17 -0
- package/dist/atoms/switch.d.ts +4 -0
- package/dist/atoms/switch.js +28 -0
- package/dist/atoms/table.d.ts +10 -0
- package/dist/atoms/table.js +94 -0
- package/dist/atoms/tabs.d.ts +7 -0
- package/dist/atoms/tabs.js +55 -0
- package/dist/atoms/textarea.d.ts +3 -0
- package/dist/atoms/textarea.js +18 -0
- package/dist/atoms/toggle-group.d.ts +9 -0
- package/dist/atoms/toggle-group.js +68 -0
- package/dist/atoms/toggle.d.ts +9 -0
- package/dist/atoms/toggle.js +43 -0
- package/dist/atoms/tooltip.d.ts +7 -0
- package/dist/atoms/tooltip.js +51 -0
- package/dist/config/default-navigation.js +136 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +347 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/molecules/app-navbar.d.ts +11 -0
- package/dist/molecules/app-navbar.js +117 -0
- package/dist/molecules/app-sidebar.d.ts +9 -0
- package/dist/molecules/app-sidebar.js +121 -0
- package/dist/organisms/layout.d.ts +3 -0
- package/dist/organisms/layout.js +16 -0
- package/package.json +120 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import k from "embla-carousel-react";
|
|
4
|
+
import { ArrowLeft as z, ArrowRight as g } from "lucide-react";
|
|
5
|
+
import { cn as d } from "../lib/utils.js";
|
|
6
|
+
import { Button as v } from "./button.js";
|
|
7
|
+
const N = l.createContext(null);
|
|
8
|
+
function m() {
|
|
9
|
+
const o = l.useContext(N);
|
|
10
|
+
if (!o)
|
|
11
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
12
|
+
return o;
|
|
13
|
+
}
|
|
14
|
+
function I({
|
|
15
|
+
orientation: o = "horizontal",
|
|
16
|
+
opts: r,
|
|
17
|
+
setApi: t,
|
|
18
|
+
plugins: s,
|
|
19
|
+
className: c,
|
|
20
|
+
children: i,
|
|
21
|
+
...u
|
|
22
|
+
}) {
|
|
23
|
+
const [p, e] = k(
|
|
24
|
+
{
|
|
25
|
+
...r,
|
|
26
|
+
axis: o === "horizontal" ? "x" : "y"
|
|
27
|
+
},
|
|
28
|
+
s
|
|
29
|
+
), [b, w] = l.useState(!1), [S, y] = l.useState(!1), f = l.useCallback((n) => {
|
|
30
|
+
n && (w(n.canScrollPrev()), y(n.canScrollNext()));
|
|
31
|
+
}, []), x = l.useCallback(() => {
|
|
32
|
+
e?.scrollPrev();
|
|
33
|
+
}, [e]), C = l.useCallback(() => {
|
|
34
|
+
e?.scrollNext();
|
|
35
|
+
}, [e]), P = l.useCallback(
|
|
36
|
+
(n) => {
|
|
37
|
+
n.key === "ArrowLeft" ? (n.preventDefault(), x()) : n.key === "ArrowRight" && (n.preventDefault(), C());
|
|
38
|
+
},
|
|
39
|
+
[x, C]
|
|
40
|
+
);
|
|
41
|
+
return l.useEffect(() => {
|
|
42
|
+
!e || !t || t(e);
|
|
43
|
+
}, [e, t]), l.useEffect(() => {
|
|
44
|
+
if (e)
|
|
45
|
+
return f(e), e.on("reInit", f), e.on("select", f), () => {
|
|
46
|
+
e?.off("select", f);
|
|
47
|
+
};
|
|
48
|
+
}, [e, f]), /* @__PURE__ */ a(
|
|
49
|
+
N.Provider,
|
|
50
|
+
{
|
|
51
|
+
value: {
|
|
52
|
+
carouselRef: p,
|
|
53
|
+
api: e,
|
|
54
|
+
opts: r,
|
|
55
|
+
orientation: o || (r?.axis === "y" ? "vertical" : "horizontal"),
|
|
56
|
+
scrollPrev: x,
|
|
57
|
+
scrollNext: C,
|
|
58
|
+
canScrollPrev: b,
|
|
59
|
+
canScrollNext: S
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ a(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
onKeyDownCapture: P,
|
|
65
|
+
className: d("relative", c),
|
|
66
|
+
role: "region",
|
|
67
|
+
"aria-roledescription": "carousel",
|
|
68
|
+
"data-slot": "carousel",
|
|
69
|
+
...u,
|
|
70
|
+
children: i
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function K({ className: o, ...r }) {
|
|
77
|
+
const { carouselRef: t, orientation: s } = m();
|
|
78
|
+
return /* @__PURE__ */ a("div", { ref: t, className: "overflow-hidden", "data-slot": "carousel-content", children: /* @__PURE__ */ a(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
className: d("flex", s === "horizontal" ? "-ml-4" : "-mt-4 flex-col", o),
|
|
82
|
+
...r
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
85
|
+
}
|
|
86
|
+
function L({ className: o, ...r }) {
|
|
87
|
+
const { orientation: t } = m();
|
|
88
|
+
return /* @__PURE__ */ a(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
role: "group",
|
|
92
|
+
"aria-roledescription": "slide",
|
|
93
|
+
"data-slot": "carousel-item",
|
|
94
|
+
className: d(
|
|
95
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
96
|
+
t === "horizontal" ? "pl-4" : "pt-4",
|
|
97
|
+
o
|
|
98
|
+
),
|
|
99
|
+
...r
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
function B({
|
|
104
|
+
className: o,
|
|
105
|
+
variant: r = "outline",
|
|
106
|
+
size: t = "icon",
|
|
107
|
+
...s
|
|
108
|
+
}) {
|
|
109
|
+
const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
|
|
110
|
+
return /* @__PURE__ */ h(
|
|
111
|
+
v,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "carousel-previous",
|
|
114
|
+
variant: r,
|
|
115
|
+
size: t,
|
|
116
|
+
className: d(
|
|
117
|
+
"absolute size-8 rounded-full",
|
|
118
|
+
c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
119
|
+
o
|
|
120
|
+
),
|
|
121
|
+
disabled: !u,
|
|
122
|
+
onClick: i,
|
|
123
|
+
...s,
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ a(z, {}),
|
|
126
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Previous slide" })
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function q({
|
|
132
|
+
className: o,
|
|
133
|
+
variant: r = "outline",
|
|
134
|
+
size: t = "icon",
|
|
135
|
+
...s
|
|
136
|
+
}) {
|
|
137
|
+
const { orientation: c, scrollNext: i, canScrollNext: u } = m();
|
|
138
|
+
return /* @__PURE__ */ h(
|
|
139
|
+
v,
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "carousel-next",
|
|
142
|
+
variant: r,
|
|
143
|
+
size: t,
|
|
144
|
+
className: d(
|
|
145
|
+
"absolute size-8 rounded-full",
|
|
146
|
+
c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
147
|
+
o
|
|
148
|
+
),
|
|
149
|
+
disabled: !u,
|
|
150
|
+
onClick: i,
|
|
151
|
+
...s,
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ a(g, {}),
|
|
154
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Next slide" })
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
I as Carousel,
|
|
161
|
+
K as CarouselContent,
|
|
162
|
+
L as CarouselItem,
|
|
163
|
+
q as CarouselNext,
|
|
164
|
+
B as CarouselPrevious
|
|
165
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RechartsPrimitive from "recharts";
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
29
|
+
hideLabel?: boolean;
|
|
30
|
+
hideIndicator?: boolean;
|
|
31
|
+
indicator?: "line" | "dot" | "dashed";
|
|
32
|
+
nameKey?: string;
|
|
33
|
+
labelKey?: string;
|
|
34
|
+
payload?: any[];
|
|
35
|
+
label?: string;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
38
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "verticalAlign"> & {
|
|
39
|
+
hideIcon?: boolean;
|
|
40
|
+
nameKey?: string;
|
|
41
|
+
payload?: any[];
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as s, jsxs as f, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import * as _ from "recharts";
|
|
4
|
+
import { cn as l } from "../lib/utils.js";
|
|
5
|
+
const T = { light: "", dark: ".dark" }, N = p.createContext(null);
|
|
6
|
+
function j() {
|
|
7
|
+
const c = p.useContext(N);
|
|
8
|
+
if (!c)
|
|
9
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
10
|
+
return c;
|
|
11
|
+
}
|
|
12
|
+
function K({
|
|
13
|
+
id: c,
|
|
14
|
+
className: e,
|
|
15
|
+
children: n,
|
|
16
|
+
config: r,
|
|
17
|
+
...a
|
|
18
|
+
}) {
|
|
19
|
+
const d = p.useId(), o = `chart-${c || d.replace(/:/g, "")}`;
|
|
20
|
+
return /* @__PURE__ */ s(N.Provider, { value: { config: r }, children: /* @__PURE__ */ f(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "chart",
|
|
24
|
+
"data-chart": o,
|
|
25
|
+
className: l(
|
|
26
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
27
|
+
e
|
|
28
|
+
),
|
|
29
|
+
...a,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ s(I, { id: o, config: r }),
|
|
32
|
+
/* @__PURE__ */ s(_.ResponsiveContainer, { children: n })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
const I = ({ id: c, config: e }) => {
|
|
38
|
+
const n = Object.entries(e).filter(([, r]) => r.theme || r.color);
|
|
39
|
+
return n.length ? /* @__PURE__ */ s(
|
|
40
|
+
"style",
|
|
41
|
+
{
|
|
42
|
+
dangerouslySetInnerHTML: {
|
|
43
|
+
__html: Object.entries(T).map(
|
|
44
|
+
([r, a]) => `
|
|
45
|
+
${a} [data-chart=${c}] {
|
|
46
|
+
${n.map(([d, o]) => {
|
|
47
|
+
const i = o.theme?.[r] || o.color;
|
|
48
|
+
return i ? ` --color-${d}: ${i};` : null;
|
|
49
|
+
}).join(`
|
|
50
|
+
`)}
|
|
51
|
+
}
|
|
52
|
+
`
|
|
53
|
+
).join(`
|
|
54
|
+
`)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
) : null;
|
|
58
|
+
}, M = _.Tooltip;
|
|
59
|
+
function R({
|
|
60
|
+
active: c,
|
|
61
|
+
payload: e,
|
|
62
|
+
className: n,
|
|
63
|
+
indicator: r = "dot",
|
|
64
|
+
hideLabel: a = !1,
|
|
65
|
+
hideIndicator: d = !1,
|
|
66
|
+
label: o,
|
|
67
|
+
labelFormatter: i,
|
|
68
|
+
labelClassName: u,
|
|
69
|
+
formatter: k,
|
|
70
|
+
color: $,
|
|
71
|
+
nameKey: L,
|
|
72
|
+
labelKey: v
|
|
73
|
+
}) {
|
|
74
|
+
const { config: g } = j(), w = p.useMemo(() => {
|
|
75
|
+
if (a || !e?.length)
|
|
76
|
+
return null;
|
|
77
|
+
const [t] = e, x = `${v || t?.dataKey || t?.name || "value"}`, b = C(g, t, x), h = !v && typeof o == "string" ? g[o]?.label || o : b?.label;
|
|
78
|
+
return i ? /* @__PURE__ */ s("div", { className: l("font-medium", u), children: i(h, e) }) : h ? /* @__PURE__ */ s("div", { className: l("font-medium", u), children: h }) : null;
|
|
79
|
+
}, [o, i, e, a, u, g, v]);
|
|
80
|
+
if (!c || !e?.length)
|
|
81
|
+
return null;
|
|
82
|
+
const m = e.length === 1 && r !== "dot";
|
|
83
|
+
return /* @__PURE__ */ f(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: l(
|
|
87
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
88
|
+
n
|
|
89
|
+
),
|
|
90
|
+
children: [
|
|
91
|
+
m ? null : w,
|
|
92
|
+
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: e.filter((t) => t.type !== "none").map((t, x) => {
|
|
93
|
+
const b = `${L || t.name || t.dataKey || "value"}`, h = C(g, t, b), y = $ || t.payload.fill || t.color;
|
|
94
|
+
return /* @__PURE__ */ s(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: l(
|
|
98
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
99
|
+
r === "dot" && "items-center"
|
|
100
|
+
),
|
|
101
|
+
children: k && t?.value !== void 0 && t.name ? k(t.value, t.name, t, x, t.payload) : /* @__PURE__ */ f(P, { children: [
|
|
102
|
+
h?.icon ? /* @__PURE__ */ s(h.icon, {}) : !d && /* @__PURE__ */ s(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: l(
|
|
106
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
107
|
+
{
|
|
108
|
+
"h-2.5 w-2.5": r === "dot",
|
|
109
|
+
"w-1": r === "line",
|
|
110
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": r === "dashed",
|
|
111
|
+
"my-0.5": m && r === "dashed"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
style: {
|
|
115
|
+
"--color-bg": y,
|
|
116
|
+
"--color-border": y
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ f(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: l(
|
|
124
|
+
"flex flex-1 justify-between leading-none",
|
|
125
|
+
m ? "items-end" : "items-center"
|
|
126
|
+
),
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ f("div", { className: "grid gap-1.5", children: [
|
|
129
|
+
m ? w : null,
|
|
130
|
+
/* @__PURE__ */ s("span", { className: "text-muted-foreground", children: h?.label || t.name })
|
|
131
|
+
] }),
|
|
132
|
+
t.value && /* @__PURE__ */ s("span", { className: "text-foreground font-mono font-medium tabular-nums", children: t.value.toLocaleString() })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] })
|
|
137
|
+
},
|
|
138
|
+
t.dataKey
|
|
139
|
+
);
|
|
140
|
+
}) })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
const H = _.Legend;
|
|
146
|
+
function O({
|
|
147
|
+
className: c,
|
|
148
|
+
hideIcon: e = !1,
|
|
149
|
+
payload: n,
|
|
150
|
+
verticalAlign: r = "bottom",
|
|
151
|
+
nameKey: a
|
|
152
|
+
}) {
|
|
153
|
+
const { config: d } = j();
|
|
154
|
+
return n?.length ? /* @__PURE__ */ s(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
className: l(
|
|
158
|
+
"flex items-center justify-center gap-4",
|
|
159
|
+
r === "top" ? "pb-3" : "pt-3",
|
|
160
|
+
c
|
|
161
|
+
),
|
|
162
|
+
children: n.filter((o) => o.type !== "none").map((o) => {
|
|
163
|
+
const i = `${a || o.dataKey || "value"}`, u = C(d, o, i);
|
|
164
|
+
return /* @__PURE__ */ f(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
className: l(
|
|
168
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
169
|
+
),
|
|
170
|
+
children: [
|
|
171
|
+
u?.icon && !e ? /* @__PURE__ */ s(u.icon, {}) : /* @__PURE__ */ s(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
175
|
+
style: {
|
|
176
|
+
backgroundColor: o.color
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
u?.label
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
o.value
|
|
184
|
+
);
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
) : null;
|
|
188
|
+
}
|
|
189
|
+
function C(c, e, n) {
|
|
190
|
+
if (typeof e != "object" || e === null)
|
|
191
|
+
return;
|
|
192
|
+
const r = "payload" in e && typeof e.payload == "object" && e.payload !== null ? e.payload : void 0;
|
|
193
|
+
let a = n;
|
|
194
|
+
return n in e && typeof e[n] == "string" ? a = e[n] : r && n in r && typeof r[n] == "string" && (a = r[n]), a in c ? c[a] : c[n];
|
|
195
|
+
}
|
|
196
|
+
export {
|
|
197
|
+
K as ChartContainer,
|
|
198
|
+
H as ChartLegend,
|
|
199
|
+
O as ChartLegendContent,
|
|
200
|
+
I as ChartStyle,
|
|
201
|
+
M as ChartTooltip,
|
|
202
|
+
R as ChartTooltipContent
|
|
203
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-checkbox";
|
|
3
|
+
import { CheckIcon as t } from "lucide-react";
|
|
4
|
+
import { cn as o } from "../lib/utils.js";
|
|
5
|
+
function s({ className: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
e.Root,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "checkbox",
|
|
10
|
+
className: o(
|
|
11
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
|
+
i
|
|
13
|
+
),
|
|
14
|
+
...a,
|
|
15
|
+
children: /* @__PURE__ */ r(
|
|
16
|
+
e.Indicator,
|
|
17
|
+
{
|
|
18
|
+
"data-slot": "checkbox-indicator",
|
|
19
|
+
className: "grid place-content-center text-current transition-none",
|
|
20
|
+
children: /* @__PURE__ */ r(t, { className: "size-3.5" })
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
s as Checkbox
|
|
28
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-collapsible";
|
|
3
|
+
function i({ ...l }) {
|
|
4
|
+
return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
|
|
5
|
+
}
|
|
6
|
+
function r({
|
|
7
|
+
...l
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ o(t.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...l });
|
|
10
|
+
}
|
|
11
|
+
function a({
|
|
12
|
+
...l
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ o(t.CollapsibleContent, { "data-slot": "collapsible-content", ...l });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
i as Collapsible,
|
|
18
|
+
a as CollapsibleContent,
|
|
19
|
+
r as CollapsibleTrigger
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
+
import { Dialog } from './dialog';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Command as n } from "cmdk";
|
|
3
|
+
import { SearchIcon as i } from "lucide-react";
|
|
4
|
+
import { cn as a } from "../lib/utils.js";
|
|
5
|
+
import { Dialog as l, DialogHeader as u, DialogTitle as p, DialogDescription as g, DialogContent as f } from "./dialog.js";
|
|
6
|
+
function h({ className: e, ...t }) {
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
8
|
+
n,
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "command",
|
|
11
|
+
className: a(
|
|
12
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...t
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function y({
|
|
20
|
+
title: e = "Command Palette",
|
|
21
|
+
description: t = "Search for a command to run...",
|
|
22
|
+
children: r,
|
|
23
|
+
className: m,
|
|
24
|
+
showCloseButton: s = !0,
|
|
25
|
+
...c
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ d(l, { ...c, children: [
|
|
28
|
+
/* @__PURE__ */ d(u, { className: "sr-only", children: [
|
|
29
|
+
/* @__PURE__ */ o(p, { children: e }),
|
|
30
|
+
/* @__PURE__ */ o(g, { children: t })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ o(
|
|
33
|
+
f,
|
|
34
|
+
{
|
|
35
|
+
className: a("overflow-hidden p-0", m),
|
|
36
|
+
showCloseButton: s,
|
|
37
|
+
children: /* @__PURE__ */ o(h, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r })
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
function C({
|
|
43
|
+
className: e,
|
|
44
|
+
...t
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ d("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
|
|
47
|
+
/* @__PURE__ */ o(i, { className: "size-4 shrink-0 opacity-50" }),
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
n.Input,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "command-input",
|
|
52
|
+
className: a(
|
|
53
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
54
|
+
e
|
|
55
|
+
),
|
|
56
|
+
...t
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
function N({ className: e, ...t }) {
|
|
62
|
+
return /* @__PURE__ */ o(
|
|
63
|
+
n.List,
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "command-list",
|
|
66
|
+
className: a("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", e),
|
|
67
|
+
...t
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function b({ ...e }) {
|
|
72
|
+
return /* @__PURE__ */ o(
|
|
73
|
+
n.Empty,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "command-empty",
|
|
76
|
+
className: "py-6 text-center text-sm",
|
|
77
|
+
...e
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function D({
|
|
82
|
+
className: e,
|
|
83
|
+
...t
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ o(
|
|
86
|
+
n.Group,
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "command-group",
|
|
89
|
+
className: a(
|
|
90
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
91
|
+
e
|
|
92
|
+
),
|
|
93
|
+
...t
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function I({
|
|
98
|
+
className: e,
|
|
99
|
+
...t
|
|
100
|
+
}) {
|
|
101
|
+
return /* @__PURE__ */ o(
|
|
102
|
+
n.Separator,
|
|
103
|
+
{
|
|
104
|
+
"data-slot": "command-separator",
|
|
105
|
+
className: a("bg-border -mx-1 h-px", e),
|
|
106
|
+
...t
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function S({ className: e, ...t }) {
|
|
111
|
+
return /* @__PURE__ */ o(
|
|
112
|
+
n.Item,
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "command-item",
|
|
115
|
+
className: a(
|
|
116
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
117
|
+
e
|
|
118
|
+
),
|
|
119
|
+
...t
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function z({ className: e, ...t }) {
|
|
124
|
+
return /* @__PURE__ */ o(
|
|
125
|
+
"span",
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "command-shortcut",
|
|
128
|
+
className: a("text-muted-foreground ml-auto text-xs tracking-widest", e),
|
|
129
|
+
...t
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
h as Command,
|
|
135
|
+
y as CommandDialog,
|
|
136
|
+
b as CommandEmpty,
|
|
137
|
+
D as CommandGroup,
|
|
138
|
+
C as CommandInput,
|
|
139
|
+
S as CommandItem,
|
|
140
|
+
N as CommandList,
|
|
141
|
+
I as CommandSeparator,
|
|
142
|
+
z as CommandShortcut
|
|
143
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
variant?: "default" | "destructive";
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|