@deankwan/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/components/ui/accordion.mjs +64 -0
- package/dist/app/components/ui/alert-dialog.mjs +146 -0
- package/dist/app/components/ui/alert.mjs +66 -0
- package/dist/app/components/ui/aspect-ratio.mjs +10 -0
- package/dist/app/components/ui/avatar.mjs +53 -0
- package/dist/app/components/ui/badge.mjs +39 -0
- package/dist/app/components/ui/breadcrumb.mjs +102 -0
- package/dist/app/components/ui/button.mjs +49 -0
- package/dist/app/components/ui/calendar.mjs +61 -0
- package/dist/app/components/ui/card.mjs +90 -0
- package/dist/app/components/ui/carousel.mjs +177 -0
- package/dist/app/components/ui/chart.mjs +215 -0
- package/dist/app/components/ui/checkbox.mjs +31 -0
- package/dist/app/components/ui/collapsible.mjs +34 -0
- package/dist/app/components/ui/command.mjs +161 -0
- package/dist/app/components/ui/context-menu.mjs +223 -0
- package/dist/app/components/ui/dialog.mjs +128 -0
- package/dist/app/components/ui/drawer.mjs +125 -0
- package/dist/app/components/ui/dropdown-menu.mjs +231 -0
- package/dist/app/components/ui/form.mjs +101 -0
- package/dist/app/components/ui/hover-card.mjs +38 -0
- package/dist/app/components/ui/input-otp.mjs +65 -0
- package/dist/app/components/ui/input.mjs +21 -0
- package/dist/app/components/ui/label.mjs +22 -0
- package/dist/app/components/ui/menubar.mjs +251 -0
- package/dist/app/components/ui/navigation-menu.mjs +170 -0
- package/dist/app/components/ui/pagination.mjs +118 -0
- package/dist/app/components/ui/popover.mjs +44 -0
- package/dist/app/components/ui/progress.mjs +31 -0
- package/dist/app/components/ui/radio-group.mjs +45 -0
- package/dist/app/components/ui/resizable.mjs +48 -0
- package/dist/app/components/ui/scroll-area.mjs +60 -0
- package/dist/app/components/ui/select.mjs +169 -0
- package/dist/app/components/ui/separator.mjs +26 -0
- package/dist/app/components/ui/sheet.mjs +126 -0
- package/dist/app/components/ui/sidebar.mjs +593 -0
- package/dist/app/components/ui/skeleton.mjs +15 -0
- package/dist/app/components/ui/slider.mjs +63 -0
- package/dist/app/components/ui/sonner.mjs +22 -0
- package/dist/app/components/ui/switch.mjs +31 -0
- package/dist/app/components/ui/table.mjs +114 -0
- package/dist/app/components/ui/tabs.mjs +67 -0
- package/dist/app/components/ui/textarea.mjs +18 -0
- package/dist/app/components/ui/toggle-group.mjs +62 -0
- package/dist/app/components/ui/toggle.mjs +43 -0
- package/dist/app/components/ui/tooltip.mjs +55 -0
- package/dist/app/components/ui/use-mobile.mjs +16 -0
- package/dist/app/components/ui/utils.mjs +8 -0
- package/dist/index.mjs +297 -0
- package/dist/src/app/components/ui/accordion.d.ts +7 -0
- package/dist/src/app/components/ui/alert-dialog.d.ts +14 -0
- package/dist/src/app/components/ui/alert.d.ts +9 -0
- package/dist/src/app/components/ui/avatar.d.ts +6 -0
- package/dist/src/app/components/ui/badge.d.ts +9 -0
- package/dist/src/app/components/ui/breadcrumb.d.ts +11 -0
- package/dist/src/app/components/ui/button.d.ts +10 -0
- package/dist/src/app/components/ui/calendar.d.ts +4 -0
- package/dist/src/app/components/ui/card.d.ts +9 -0
- package/dist/src/app/components/ui/carousel.d.ts +19 -0
- package/dist/src/app/components/ui/chart.d.ts +40 -0
- package/dist/src/app/components/ui/checkbox.d.ts +4 -0
- package/dist/src/app/components/ui/command.d.ts +16 -0
- package/dist/src/app/components/ui/context-menu.d.ts +25 -0
- package/dist/src/app/components/ui/dialog.d.ts +13 -0
- package/dist/src/app/components/ui/drawer.d.ts +13 -0
- package/dist/src/app/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/src/app/components/ui/hover-card.d.ts +6 -0
- package/dist/src/app/components/ui/input-otp.d.ts +11 -0
- package/dist/src/app/components/ui/input.d.ts +3 -0
- package/dist/src/app/components/ui/label.d.ts +4 -0
- package/dist/src/app/components/ui/menubar.d.ts +26 -0
- package/dist/src/app/components/ui/navigation-menu.d.ts +14 -0
- package/dist/src/app/components/ui/pagination.d.ts +13 -0
- package/dist/src/app/components/ui/popover.d.ts +7 -0
- package/dist/src/app/components/ui/progress.d.ts +4 -0
- package/dist/src/app/components/ui/radio-group.d.ts +5 -0
- package/dist/src/app/components/ui/resizable.d.ts +8 -0
- package/dist/src/app/components/ui/scroll-area.d.ts +5 -0
- package/dist/src/app/components/ui/select.d.ts +15 -0
- package/dist/src/app/components/ui/separator.d.ts +4 -0
- package/dist/src/app/components/ui/sheet.d.ts +13 -0
- package/dist/src/app/components/ui/sidebar.d.ts +60 -0
- package/dist/src/app/components/ui/slider.d.ts +4 -0
- package/dist/src/app/components/ui/switch.d.ts +4 -0
- package/dist/src/app/components/ui/table.d.ts +10 -0
- package/dist/src/app/components/ui/tabs.d.ts +7 -0
- package/dist/src/app/components/ui/textarea.d.ts +3 -0
- package/dist/src/app/components/ui/toggle-group.d.ts +7 -0
- package/dist/src/app/components/ui/toggle.d.ts +9 -0
- package/dist/src/app/components/ui/tooltip.d.ts +7 -0
- package/dist/src/app/components/ui/use-mobile.d.ts +1 -0
- package/dist/src/app/components/ui/utils.d.ts +2 -0
- package/dist/src/index.d.ts +48 -0
- package/dist/style.css +1 -0
- package/package.json +166 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import z from "embla-carousel-react";
|
|
4
|
+
import { ArrowRight as g, ArrowLeft as p } from "lucide-react";
|
|
5
|
+
import { cn as d } from "./utils.mjs";
|
|
6
|
+
import { Button as v } from "./button.mjs";
|
|
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 [b, e] = z(
|
|
24
|
+
{
|
|
25
|
+
...r,
|
|
26
|
+
axis: o === "horizontal" ? "x" : "y"
|
|
27
|
+
},
|
|
28
|
+
s
|
|
29
|
+
), [w, S] = l.useState(!1), [y, P] = l.useState(!1), f = l.useCallback((a) => {
|
|
30
|
+
a && (S(a.canScrollPrev()), P(a.canScrollNext()));
|
|
31
|
+
}, []), x = l.useCallback(() => {
|
|
32
|
+
e == null || e.scrollPrev();
|
|
33
|
+
}, [e]), C = l.useCallback(() => {
|
|
34
|
+
e == null || e.scrollNext();
|
|
35
|
+
}, [e]), k = l.useCallback(
|
|
36
|
+
(a) => {
|
|
37
|
+
a.key === "ArrowLeft" ? (a.preventDefault(), x()) : a.key === "ArrowRight" && (a.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 == null || e.off("select", f);
|
|
47
|
+
};
|
|
48
|
+
}, [e, f]), /* @__PURE__ */ n(
|
|
49
|
+
N.Provider,
|
|
50
|
+
{
|
|
51
|
+
value: {
|
|
52
|
+
carouselRef: b,
|
|
53
|
+
api: e,
|
|
54
|
+
opts: r,
|
|
55
|
+
orientation: o || ((r == null ? void 0 : r.axis) === "y" ? "vertical" : "horizontal"),
|
|
56
|
+
scrollPrev: x,
|
|
57
|
+
scrollNext: C,
|
|
58
|
+
canScrollPrev: w,
|
|
59
|
+
canScrollNext: y
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ n(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
onKeyDownCapture: k,
|
|
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__ */ n(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref: t,
|
|
82
|
+
className: "overflow-hidden",
|
|
83
|
+
"data-slot": "carousel-content",
|
|
84
|
+
children: /* @__PURE__ */ n(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: d(
|
|
88
|
+
"flex",
|
|
89
|
+
s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
90
|
+
o
|
|
91
|
+
),
|
|
92
|
+
...r
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function L({ className: o, ...r }) {
|
|
99
|
+
const { orientation: t } = m();
|
|
100
|
+
return /* @__PURE__ */ n(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
role: "group",
|
|
104
|
+
"aria-roledescription": "slide",
|
|
105
|
+
"data-slot": "carousel-item",
|
|
106
|
+
className: d(
|
|
107
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
108
|
+
t === "horizontal" ? "pl-4" : "pt-4",
|
|
109
|
+
o
|
|
110
|
+
),
|
|
111
|
+
...r
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function B({
|
|
116
|
+
className: o,
|
|
117
|
+
variant: r = "outline",
|
|
118
|
+
size: t = "icon",
|
|
119
|
+
...s
|
|
120
|
+
}) {
|
|
121
|
+
const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
|
|
122
|
+
return /* @__PURE__ */ h(
|
|
123
|
+
v,
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "carousel-previous",
|
|
126
|
+
variant: r,
|
|
127
|
+
size: t,
|
|
128
|
+
className: d(
|
|
129
|
+
"absolute size-8 rounded-full",
|
|
130
|
+
c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
131
|
+
o
|
|
132
|
+
),
|
|
133
|
+
disabled: !u,
|
|
134
|
+
onClick: i,
|
|
135
|
+
...s,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ n(p, {}),
|
|
138
|
+
/* @__PURE__ */ n("span", { className: "sr-only", children: "Previous slide" })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function q({
|
|
144
|
+
className: o,
|
|
145
|
+
variant: r = "outline",
|
|
146
|
+
size: t = "icon",
|
|
147
|
+
...s
|
|
148
|
+
}) {
|
|
149
|
+
const { orientation: c, scrollNext: i, canScrollNext: u } = m();
|
|
150
|
+
return /* @__PURE__ */ h(
|
|
151
|
+
v,
|
|
152
|
+
{
|
|
153
|
+
"data-slot": "carousel-next",
|
|
154
|
+
variant: r,
|
|
155
|
+
size: t,
|
|
156
|
+
className: d(
|
|
157
|
+
"absolute size-8 rounded-full",
|
|
158
|
+
c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
159
|
+
o
|
|
160
|
+
),
|
|
161
|
+
disabled: !u,
|
|
162
|
+
onClick: i,
|
|
163
|
+
...s,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ n(g, {}),
|
|
166
|
+
/* @__PURE__ */ n("span", { className: "sr-only", children: "Next slide" })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
export {
|
|
172
|
+
I as Carousel,
|
|
173
|
+
K as CarouselContent,
|
|
174
|
+
L as CarouselItem,
|
|
175
|
+
q as CarouselNext,
|
|
176
|
+
B as CarouselPrevious
|
|
177
|
+
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { jsx as s, jsxs as f, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import * as w from "recharts";
|
|
4
|
+
import { cn as u } from "./utils.mjs";
|
|
5
|
+
const I = { light: "", dark: ".dark" }, j = m.createContext(null);
|
|
6
|
+
function $() {
|
|
7
|
+
const c = m.useContext(j);
|
|
8
|
+
if (!c)
|
|
9
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
10
|
+
return c;
|
|
11
|
+
}
|
|
12
|
+
function M({
|
|
13
|
+
id: c,
|
|
14
|
+
className: r,
|
|
15
|
+
children: n,
|
|
16
|
+
config: t,
|
|
17
|
+
...a
|
|
18
|
+
}) {
|
|
19
|
+
const h = m.useId(), o = `chart-${c || h.replace(/:/g, "")}`;
|
|
20
|
+
return /* @__PURE__ */ s(j.Provider, { value: { config: t }, children: /* @__PURE__ */ f(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "chart",
|
|
24
|
+
"data-chart": o,
|
|
25
|
+
className: u(
|
|
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
|
+
r
|
|
28
|
+
),
|
|
29
|
+
...a,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ s(S, { id: o, config: t }),
|
|
32
|
+
/* @__PURE__ */ s(w.ResponsiveContainer, { children: n })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
const S = ({ id: c, config: r }) => {
|
|
38
|
+
const n = Object.entries(r).filter(
|
|
39
|
+
([, t]) => t.theme || t.color
|
|
40
|
+
);
|
|
41
|
+
return n.length ? /* @__PURE__ */ s(
|
|
42
|
+
"style",
|
|
43
|
+
{
|
|
44
|
+
dangerouslySetInnerHTML: {
|
|
45
|
+
__html: Object.entries(I).map(
|
|
46
|
+
([t, a]) => `
|
|
47
|
+
${a} [data-chart=${c}] {
|
|
48
|
+
${n.map(([h, o]) => {
|
|
49
|
+
var l;
|
|
50
|
+
const i = ((l = o.theme) == null ? void 0 : l[t]) || o.color;
|
|
51
|
+
return i ? ` --color-${h}: ${i};` : null;
|
|
52
|
+
}).join(`
|
|
53
|
+
`)}
|
|
54
|
+
}
|
|
55
|
+
`
|
|
56
|
+
).join(`
|
|
57
|
+
`)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
) : null;
|
|
61
|
+
}, R = w.Tooltip;
|
|
62
|
+
function H({
|
|
63
|
+
active: c,
|
|
64
|
+
payload: r,
|
|
65
|
+
className: n,
|
|
66
|
+
indicator: t = "dot",
|
|
67
|
+
hideLabel: a = !1,
|
|
68
|
+
hideIndicator: h = !1,
|
|
69
|
+
label: o,
|
|
70
|
+
labelFormatter: i,
|
|
71
|
+
labelClassName: l,
|
|
72
|
+
formatter: C,
|
|
73
|
+
color: L,
|
|
74
|
+
nameKey: P,
|
|
75
|
+
labelKey: p
|
|
76
|
+
}) {
|
|
77
|
+
const { config: x } = $(), N = m.useMemo(() => {
|
|
78
|
+
var v;
|
|
79
|
+
if (a || !(r != null && r.length))
|
|
80
|
+
return null;
|
|
81
|
+
const [e] = r, _ = `${p || (e == null ? void 0 : e.dataKey) || (e == null ? void 0 : e.name) || "value"}`, g = k(x, e, _), d = !p && typeof o == "string" ? ((v = x[o]) == null ? void 0 : v.label) || o : g == null ? void 0 : g.label;
|
|
82
|
+
return i ? /* @__PURE__ */ s("div", { className: u("font-medium", l), children: i(d, r) }) : d ? /* @__PURE__ */ s("div", { className: u("font-medium", l), children: d }) : null;
|
|
83
|
+
}, [
|
|
84
|
+
o,
|
|
85
|
+
i,
|
|
86
|
+
r,
|
|
87
|
+
a,
|
|
88
|
+
l,
|
|
89
|
+
x,
|
|
90
|
+
p
|
|
91
|
+
]);
|
|
92
|
+
if (!c || !(r != null && r.length))
|
|
93
|
+
return null;
|
|
94
|
+
const b = r.length === 1 && t !== "dot";
|
|
95
|
+
return /* @__PURE__ */ f(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: u(
|
|
99
|
+
"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",
|
|
100
|
+
n
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
b ? null : N,
|
|
104
|
+
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: r.map((e, _) => {
|
|
105
|
+
const g = `${P || e.name || e.dataKey || "value"}`, d = k(x, e, g), v = L || e.payload.fill || e.color;
|
|
106
|
+
return /* @__PURE__ */ s(
|
|
107
|
+
"div",
|
|
108
|
+
{
|
|
109
|
+
className: u(
|
|
110
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
111
|
+
t === "dot" && "items-center"
|
|
112
|
+
),
|
|
113
|
+
children: C && (e == null ? void 0 : e.value) !== void 0 && e.name ? C(e.value, e.name, e, _, e.payload) : /* @__PURE__ */ f(T, { children: [
|
|
114
|
+
d != null && d.icon ? /* @__PURE__ */ s(d.icon, {}) : !h && /* @__PURE__ */ s(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
className: u(
|
|
118
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
119
|
+
{
|
|
120
|
+
"h-2.5 w-2.5": t === "dot",
|
|
121
|
+
"w-1": t === "line",
|
|
122
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": t === "dashed",
|
|
123
|
+
"my-0.5": b && t === "dashed"
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
style: {
|
|
127
|
+
"--color-bg": v,
|
|
128
|
+
"--color-border": v
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ f(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: u(
|
|
136
|
+
"flex flex-1 justify-between leading-none",
|
|
137
|
+
b ? "items-end" : "items-center"
|
|
138
|
+
),
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ f("div", { className: "grid gap-1.5", children: [
|
|
141
|
+
b ? N : null,
|
|
142
|
+
/* @__PURE__ */ s("span", { className: "text-muted-foreground", children: (d == null ? void 0 : d.label) || e.name })
|
|
143
|
+
] }),
|
|
144
|
+
e.value && /* @__PURE__ */ s("span", { className: "text-foreground font-mono font-medium tabular-nums", children: e.value.toLocaleString() })
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
] })
|
|
149
|
+
},
|
|
150
|
+
e.dataKey
|
|
151
|
+
);
|
|
152
|
+
}) })
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const O = w.Legend;
|
|
158
|
+
function q({
|
|
159
|
+
className: c,
|
|
160
|
+
hideIcon: r = !1,
|
|
161
|
+
payload: n,
|
|
162
|
+
verticalAlign: t = "bottom",
|
|
163
|
+
nameKey: a
|
|
164
|
+
}) {
|
|
165
|
+
const { config: h } = $();
|
|
166
|
+
return n != null && n.length ? /* @__PURE__ */ s(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: u(
|
|
170
|
+
"flex items-center justify-center gap-4",
|
|
171
|
+
t === "top" ? "pb-3" : "pt-3",
|
|
172
|
+
c
|
|
173
|
+
),
|
|
174
|
+
children: n.map((o) => {
|
|
175
|
+
const i = `${a || o.dataKey || "value"}`, l = k(h, o, i);
|
|
176
|
+
return /* @__PURE__ */ f(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: u(
|
|
180
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
181
|
+
),
|
|
182
|
+
children: [
|
|
183
|
+
l != null && l.icon && !r ? /* @__PURE__ */ s(l.icon, {}) : /* @__PURE__ */ s(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
187
|
+
style: {
|
|
188
|
+
backgroundColor: o.color
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
l == null ? void 0 : l.label
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
o.value
|
|
196
|
+
);
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
) : null;
|
|
200
|
+
}
|
|
201
|
+
function k(c, r, n) {
|
|
202
|
+
if (typeof r != "object" || r === null)
|
|
203
|
+
return;
|
|
204
|
+
const t = "payload" in r && typeof r.payload == "object" && r.payload !== null ? r.payload : void 0;
|
|
205
|
+
let a = n;
|
|
206
|
+
return n in r && typeof r[n] == "string" ? a = r[n] : t && n in t && typeof t[n] == "string" && (a = t[n]), a in c ? c[a] : c[n];
|
|
207
|
+
}
|
|
208
|
+
export {
|
|
209
|
+
M as ChartContainer,
|
|
210
|
+
O as ChartLegend,
|
|
211
|
+
q as ChartLegendContent,
|
|
212
|
+
S as ChartStyle,
|
|
213
|
+
R as ChartTooltip,
|
|
214
|
+
H as ChartTooltipContent
|
|
215
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-checkbox";
|
|
3
|
+
import { CheckIcon as a } from "lucide-react";
|
|
4
|
+
import { cn as o } from "./utils.mjs";
|
|
5
|
+
function s({
|
|
6
|
+
className: i,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ r(
|
|
10
|
+
e.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "checkbox",
|
|
13
|
+
className: o(
|
|
14
|
+
"peer border bg-input-background 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",
|
|
15
|
+
i
|
|
16
|
+
),
|
|
17
|
+
...t,
|
|
18
|
+
children: /* @__PURE__ */ r(
|
|
19
|
+
e.Indicator,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "checkbox-indicator",
|
|
22
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
23
|
+
children: /* @__PURE__ */ r(a, { className: "size-3.5" })
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
s as Checkbox
|
|
31
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-collapsible";
|
|
3
|
+
function i({
|
|
4
|
+
...l
|
|
5
|
+
}) {
|
|
6
|
+
return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
|
|
7
|
+
}
|
|
8
|
+
function r({
|
|
9
|
+
...l
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
12
|
+
t.CollapsibleTrigger,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "collapsible-trigger",
|
|
15
|
+
...l
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function a({
|
|
20
|
+
...l
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ o(
|
|
23
|
+
t.CollapsibleContent,
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "collapsible-content",
|
|
26
|
+
...l
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
i as Collapsible,
|
|
32
|
+
a as CollapsibleContent,
|
|
33
|
+
r as CollapsibleTrigger
|
|
34
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Command as a } from "cmdk";
|
|
3
|
+
import { SearchIcon as s } from "lucide-react";
|
|
4
|
+
import { cn as n } from "./utils.mjs";
|
|
5
|
+
import { Dialog as c, DialogHeader as i, DialogTitle as l, DialogDescription as u, DialogContent as p } from "./dialog.mjs";
|
|
6
|
+
function g({
|
|
7
|
+
className: e,
|
|
8
|
+
...t
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ o(
|
|
11
|
+
a,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "command",
|
|
14
|
+
className: n(
|
|
15
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
...t
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function v({
|
|
23
|
+
title: e = "Command Palette",
|
|
24
|
+
description: t = "Search for a command to run...",
|
|
25
|
+
children: r,
|
|
26
|
+
...m
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ d(c, { ...m, children: [
|
|
29
|
+
/* @__PURE__ */ d(i, { className: "sr-only", children: [
|
|
30
|
+
/* @__PURE__ */ o(l, { children: e }),
|
|
31
|
+
/* @__PURE__ */ o(u, { children: t })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ o(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(g, { 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 }) })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
function w({
|
|
37
|
+
className: e,
|
|
38
|
+
...t
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "command-input-wrapper",
|
|
44
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ o(s, { className: "size-4 shrink-0 opacity-50" }),
|
|
47
|
+
/* @__PURE__ */ o(
|
|
48
|
+
a.Input,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "command-input",
|
|
51
|
+
className: n(
|
|
52
|
+
"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",
|
|
53
|
+
e
|
|
54
|
+
),
|
|
55
|
+
...t
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function y({
|
|
63
|
+
className: e,
|
|
64
|
+
...t
|
|
65
|
+
}) {
|
|
66
|
+
return /* @__PURE__ */ o(
|
|
67
|
+
a.List,
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "command-list",
|
|
70
|
+
className: n(
|
|
71
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
72
|
+
e
|
|
73
|
+
),
|
|
74
|
+
...t
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function C({
|
|
79
|
+
...e
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ o(
|
|
82
|
+
a.Empty,
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "command-empty",
|
|
85
|
+
className: "py-6 text-center text-sm",
|
|
86
|
+
...e
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function N({
|
|
91
|
+
className: e,
|
|
92
|
+
...t
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ o(
|
|
95
|
+
a.Group,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "command-group",
|
|
98
|
+
className: n(
|
|
99
|
+
"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",
|
|
100
|
+
e
|
|
101
|
+
),
|
|
102
|
+
...t
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function b({
|
|
107
|
+
className: e,
|
|
108
|
+
...t
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ o(
|
|
111
|
+
a.Separator,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "command-separator",
|
|
114
|
+
className: n("bg-border -mx-1 h-px", e),
|
|
115
|
+
...t
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function D({
|
|
120
|
+
className: e,
|
|
121
|
+
...t
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ o(
|
|
124
|
+
a.Item,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "command-item",
|
|
127
|
+
className: n(
|
|
128
|
+
"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",
|
|
129
|
+
e
|
|
130
|
+
),
|
|
131
|
+
...t
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function I({
|
|
136
|
+
className: e,
|
|
137
|
+
...t
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ o(
|
|
140
|
+
"span",
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "command-shortcut",
|
|
143
|
+
className: n(
|
|
144
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
145
|
+
e
|
|
146
|
+
),
|
|
147
|
+
...t
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
g as Command,
|
|
153
|
+
v as CommandDialog,
|
|
154
|
+
C as CommandEmpty,
|
|
155
|
+
N as CommandGroup,
|
|
156
|
+
w as CommandInput,
|
|
157
|
+
D as CommandItem,
|
|
158
|
+
y as CommandList,
|
|
159
|
+
b as CommandSeparator,
|
|
160
|
+
I as CommandShortcut
|
|
161
|
+
};
|