@arolariu/components 0.0.2 → 0.0.4
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/cjs/components/ui/accordion.js +1 -0
- package/dist/cjs/components/ui/alert-dialog.js +1 -0
- package/dist/cjs/components/ui/alert.js +1 -0
- package/dist/cjs/components/ui/aspect-ratio.js +1 -0
- package/dist/cjs/components/ui/avatar.js +1 -0
- package/dist/cjs/components/ui/badge.js +1 -0
- package/dist/cjs/components/ui/breadcrumb.js +1 -0
- package/dist/cjs/components/ui/button.js +1 -0
- package/dist/cjs/components/ui/calendar.js +1 -0
- package/dist/cjs/components/ui/card.js +1 -0
- package/dist/cjs/components/ui/carousel.js +1 -0
- package/dist/cjs/components/ui/chart.js +7 -0
- package/dist/cjs/components/ui/checkbox.js +1 -0
- package/dist/cjs/components/ui/collapsible.js +1 -0
- package/dist/cjs/components/ui/command.js +1 -0
- package/dist/cjs/components/ui/context-menu.js +1 -0
- package/dist/cjs/components/ui/dialog.js +1 -0
- package/dist/cjs/components/ui/drawer.js +1 -0
- package/dist/cjs/components/ui/dropdown-menu.js +1 -0
- package/dist/cjs/components/ui/form.js +1 -0
- package/dist/cjs/components/ui/hover-card.js +1 -0
- package/dist/cjs/components/ui/input-otp.js +1 -0
- package/dist/cjs/components/ui/input.js +1 -0
- package/dist/cjs/components/ui/label.js +1 -0
- package/dist/cjs/components/ui/menubar.js +1 -0
- package/dist/cjs/components/ui/navigation-menu.js +1 -0
- package/dist/cjs/components/ui/pagination.js +1 -0
- package/dist/cjs/components/ui/popover.js +1 -0
- package/dist/cjs/components/ui/progress.js +1 -0
- package/dist/cjs/components/ui/radio-group.js +1 -0
- package/dist/cjs/components/ui/resizable.js +1 -0
- package/dist/cjs/components/ui/scroll-area.js +1 -0
- package/dist/cjs/components/ui/select.js +1 -0
- package/dist/cjs/components/ui/separator.js +1 -0
- package/dist/cjs/components/ui/sheet.js +1 -0
- package/dist/cjs/components/ui/sidebar.js +1 -0
- package/dist/cjs/components/ui/skeleton.js +1 -0
- package/dist/cjs/components/ui/slider.js +1 -0
- package/dist/cjs/components/ui/sonner.js +1 -0
- package/dist/cjs/components/ui/switch.js +1 -0
- package/dist/cjs/components/ui/table.js +1 -0
- package/dist/cjs/components/ui/tabs.js +1 -0
- package/dist/cjs/components/ui/textarea.js +1 -0
- package/dist/cjs/components/ui/toggle-group.js +1 -0
- package/dist/cjs/components/ui/toggle.js +1 -0
- package/dist/cjs/components/ui/tooltip.js +1 -0
- package/dist/cjs/hooks/use-mobile.js +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/lib/utils.js +1 -0
- package/dist/es/components/ui/accordion.js +64 -0
- package/dist/es/components/ui/alert-dialog.js +146 -0
- package/dist/es/components/ui/alert.js +66 -0
- package/dist/es/components/ui/aspect-ratio.js +10 -0
- package/dist/es/components/ui/avatar.js +53 -0
- package/dist/es/components/ui/badge.js +39 -0
- package/dist/es/components/ui/breadcrumb.js +102 -0
- package/dist/es/components/ui/button.js +49 -0
- package/dist/es/components/ui/calendar.js +61 -0
- package/dist/es/components/ui/card.js +73 -0
- package/dist/es/components/ui/carousel.js +177 -0
- package/dist/es/components/ui/chart.js +215 -0
- package/dist/es/components/ui/checkbox.js +31 -0
- package/dist/es/components/ui/collapsible.js +34 -0
- package/dist/es/components/ui/command.js +161 -0
- package/dist/es/components/ui/context-menu.js +223 -0
- package/dist/es/components/ui/dialog.js +128 -0
- package/dist/es/components/ui/drawer.js +125 -0
- package/dist/es/components/ui/dropdown-menu.js +231 -0
- package/dist/es/components/ui/form.js +101 -0
- package/dist/es/components/ui/hover-card.js +38 -0
- package/dist/es/components/ui/input-otp.js +65 -0
- package/dist/es/components/ui/input.js +21 -0
- package/dist/es/components/ui/label.js +22 -0
- package/dist/es/components/ui/menubar.js +251 -0
- package/dist/es/components/ui/navigation-menu.js +170 -0
- package/dist/es/components/ui/pagination.js +118 -0
- package/dist/es/components/ui/popover.js +44 -0
- package/dist/es/components/ui/progress.js +31 -0
- package/dist/es/components/ui/radio-group.js +45 -0
- package/dist/es/components/ui/resizable.js +48 -0
- package/dist/es/components/ui/scroll-area.js +60 -0
- package/dist/es/components/ui/select.js +167 -0
- package/dist/es/components/ui/separator.js +26 -0
- package/dist/es/components/ui/sheet.js +126 -0
- package/dist/es/components/ui/sidebar.js +590 -0
- package/dist/es/components/ui/skeleton.js +15 -0
- package/dist/es/components/ui/slider.js +63 -0
- package/dist/es/components/ui/sonner.js +25 -0
- package/dist/es/components/ui/switch.js +31 -0
- package/dist/es/components/ui/table.js +114 -0
- package/dist/es/components/ui/tabs.js +67 -0
- package/dist/es/components/ui/textarea.js +18 -0
- package/dist/es/components/ui/toggle-group.js +62 -0
- package/dist/es/components/ui/toggle.js +43 -0
- package/dist/es/components/ui/tooltip.js +55 -0
- package/dist/es/hooks/use-mobile.js +14 -0
- package/dist/es/index.js +291 -0
- package/dist/es/lib/utils.js +8 -0
- package/dist/umd/arolariu-components.umd.js +7 -0
- package/package.json +11 -3
- package/dist/arolariu-components.cjs.js +0 -38
- package/dist/arolariu-components.cjs.js.map +0 -1
- package/dist/arolariu-components.es.js +0 -4643
- package/dist/arolariu-components.es.js.map +0 -1
- package/dist/arolariu-components.umd.js +0 -38
- package/dist/arolariu-components.umd.js.map +0 -1
|
@@ -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 { ArrowLeft as g, ArrowRight as p } 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 [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(g, {}),
|
|
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(p, {}),
|
|
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 o, 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 d } from "../../lib/utils.js";
|
|
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
|
+
...l
|
|
18
|
+
}) {
|
|
19
|
+
const h = m.useId(), s = `chart-${c || h.replace(/:/g, "")}`;
|
|
20
|
+
return /* @__PURE__ */ o(j.Provider, { value: { config: t }, children: /* @__PURE__ */ f(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "chart",
|
|
24
|
+
"data-chart": s,
|
|
25
|
+
className: d(
|
|
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
|
+
...l,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ o(S, { id: s, config: t }),
|
|
32
|
+
/* @__PURE__ */ o(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__ */ o(
|
|
42
|
+
"style",
|
|
43
|
+
{
|
|
44
|
+
dangerouslySetInnerHTML: {
|
|
45
|
+
__html: Object.entries(I).map(
|
|
46
|
+
([t, l]) => `
|
|
47
|
+
${l} [data-chart=${c}] {
|
|
48
|
+
${n.map(([h, s]) => {
|
|
49
|
+
var a;
|
|
50
|
+
const i = ((a = s.theme) == null ? void 0 : a[t]) || s.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: l = !1,
|
|
68
|
+
hideIndicator: h = !1,
|
|
69
|
+
label: s,
|
|
70
|
+
labelFormatter: i,
|
|
71
|
+
labelClassName: a,
|
|
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 (l || !(r != null && r.length))
|
|
80
|
+
return null;
|
|
81
|
+
const [e] = r, k = `${p || (e == null ? void 0 : e.dataKey) || (e == null ? void 0 : e.name) || "value"}`, g = _(x, e, k), u = !p && typeof s == "string" ? ((v = x[s]) == null ? void 0 : v.label) || s : g == null ? void 0 : g.label;
|
|
82
|
+
return i ? /* @__PURE__ */ o("div", { className: d("font-medium", a), children: i(u, r) }) : u ? /* @__PURE__ */ o("div", { className: d("font-medium", a), children: u }) : null;
|
|
83
|
+
}, [
|
|
84
|
+
s,
|
|
85
|
+
i,
|
|
86
|
+
r,
|
|
87
|
+
l,
|
|
88
|
+
a,
|
|
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: d(
|
|
99
|
+
"border-neutral-200/50 bg-white grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800/50 dark:bg-neutral-950 dark:border-neutral-800",
|
|
100
|
+
n
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
b ? null : N,
|
|
104
|
+
/* @__PURE__ */ o("div", { className: "grid gap-1.5", children: r.map((e, k) => {
|
|
105
|
+
const g = `${P || e.name || e.dataKey || "value"}`, u = _(x, e, g), v = L || e.payload.fill || e.color;
|
|
106
|
+
return /* @__PURE__ */ o(
|
|
107
|
+
"div",
|
|
108
|
+
{
|
|
109
|
+
className: d(
|
|
110
|
+
"[&>svg]:text-neutral-500 flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 dark:[&>svg]:text-neutral-400",
|
|
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, k, e.payload) : /* @__PURE__ */ f(T, { children: [
|
|
114
|
+
u != null && u.icon ? /* @__PURE__ */ o(u.icon, {}) : !h && /* @__PURE__ */ o(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
className: d(
|
|
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: d(
|
|
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__ */ o("span", { className: "text-neutral-500 dark:text-neutral-400", children: (u == null ? void 0 : u.label) || e.name })
|
|
143
|
+
] }),
|
|
144
|
+
e.value && /* @__PURE__ */ o("span", { className: "text-neutral-950 font-mono font-medium tabular-nums dark:text-neutral-50", 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: l
|
|
164
|
+
}) {
|
|
165
|
+
const { config: h } = $();
|
|
166
|
+
return n != null && n.length ? /* @__PURE__ */ o(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: d(
|
|
170
|
+
"flex items-center justify-center gap-4",
|
|
171
|
+
t === "top" ? "pb-3" : "pt-3",
|
|
172
|
+
c
|
|
173
|
+
),
|
|
174
|
+
children: n.map((s) => {
|
|
175
|
+
const i = `${l || s.dataKey || "value"}`, a = _(h, s, i);
|
|
176
|
+
return /* @__PURE__ */ f(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: d(
|
|
180
|
+
"[&>svg]:text-neutral-500 flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 dark:[&>svg]:text-neutral-400"
|
|
181
|
+
),
|
|
182
|
+
children: [
|
|
183
|
+
a != null && a.icon && !r ? /* @__PURE__ */ o(a.icon, {}) : /* @__PURE__ */ o(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
187
|
+
style: {
|
|
188
|
+
backgroundColor: s.color
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
a == null ? void 0 : a.label
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
s.value
|
|
196
|
+
);
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
) : null;
|
|
200
|
+
}
|
|
201
|
+
function _(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 l = n;
|
|
206
|
+
return n in r && typeof r[n] == "string" ? l = r[n] : t && n in t && typeof t[n] == "string" && (l = t[n]), l in c ? c[l] : 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 i } from "lucide-react";
|
|
4
|
+
import { cn as d } from "../../lib/utils.js";
|
|
5
|
+
function s({
|
|
6
|
+
className: a,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ r(
|
|
10
|
+
e.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "checkbox",
|
|
13
|
+
className: d(
|
|
14
|
+
"peer border-neutral-200 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 data-[state=checked]:border-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900 dark:data-[state=checked]:border-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
15
|
+
a
|
|
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(i, { 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 a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Command as n } from "cmdk";
|
|
3
|
+
import { SearchIcon as l } from "lucide-react";
|
|
4
|
+
import { cn as r } from "../../lib/utils.js";
|
|
5
|
+
import { Dialog as s, DialogHeader as c, DialogTitle as u, DialogDescription as i, DialogContent as p } from "./dialog.js";
|
|
6
|
+
function g({
|
|
7
|
+
className: t,
|
|
8
|
+
...e
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "command",
|
|
14
|
+
className: r(
|
|
15
|
+
"bg-white text-neutral-950 flex h-full w-full flex-col overflow-hidden rounded-md dark:bg-neutral-950 dark:text-neutral-50",
|
|
16
|
+
t
|
|
17
|
+
),
|
|
18
|
+
...e
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function v({
|
|
23
|
+
title: t = "Command Palette",
|
|
24
|
+
description: e = "Search for a command to run...",
|
|
25
|
+
children: o,
|
|
26
|
+
...m
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ d(s, { ...m, children: [
|
|
29
|
+
/* @__PURE__ */ d(c, { className: "sr-only", children: [
|
|
30
|
+
/* @__PURE__ */ a(u, { children: t }),
|
|
31
|
+
/* @__PURE__ */ a(i, { children: e })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ a(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a(g, { className: "[&_[cmdk-group-heading]]:text-neutral-500 **: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 dark:[&_[cmdk-group-heading]]:text-neutral-400", children: o }) })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
function w({
|
|
37
|
+
className: t,
|
|
38
|
+
...e
|
|
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__ */ a(l, { className: "size-4 shrink-0 opacity-50" }),
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
n.Input,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "command-input",
|
|
51
|
+
className: r(
|
|
52
|
+
"placeholder:text-neutral-500 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",
|
|
53
|
+
t
|
|
54
|
+
),
|
|
55
|
+
...e
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function y({
|
|
63
|
+
className: t,
|
|
64
|
+
...e
|
|
65
|
+
}) {
|
|
66
|
+
return /* @__PURE__ */ a(
|
|
67
|
+
n.List,
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "command-list",
|
|
70
|
+
className: r(
|
|
71
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
72
|
+
t
|
|
73
|
+
),
|
|
74
|
+
...e
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function b({
|
|
79
|
+
...t
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ a(
|
|
82
|
+
n.Empty,
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "command-empty",
|
|
85
|
+
className: "py-6 text-center text-sm",
|
|
86
|
+
...t
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function C({
|
|
91
|
+
className: t,
|
|
92
|
+
...e
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ a(
|
|
95
|
+
n.Group,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "command-group",
|
|
98
|
+
className: r(
|
|
99
|
+
"text-neutral-950 [&_[cmdk-group-heading]]:text-neutral-500 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 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",
|
|
100
|
+
t
|
|
101
|
+
),
|
|
102
|
+
...e
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function N({
|
|
107
|
+
className: t,
|
|
108
|
+
...e
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ a(
|
|
111
|
+
n.Separator,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "command-separator",
|
|
114
|
+
className: r("bg-neutral-200 -mx-1 h-px dark:bg-neutral-800", t),
|
|
115
|
+
...e
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function D({
|
|
120
|
+
className: t,
|
|
121
|
+
...e
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ a(
|
|
124
|
+
n.Item,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "command-item",
|
|
127
|
+
className: r(
|
|
128
|
+
"data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 [&_svg:not([class*='text-'])]:text-neutral-500 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 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
129
|
+
t
|
|
130
|
+
),
|
|
131
|
+
...e
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function I({
|
|
136
|
+
className: t,
|
|
137
|
+
...e
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ a(
|
|
140
|
+
"span",
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "command-shortcut",
|
|
143
|
+
className: r(
|
|
144
|
+
"text-neutral-500 ml-auto text-xs tracking-widest dark:text-neutral-400",
|
|
145
|
+
t
|
|
146
|
+
),
|
|
147
|
+
...e
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
g as Command,
|
|
153
|
+
v as CommandDialog,
|
|
154
|
+
b as CommandEmpty,
|
|
155
|
+
C as CommandGroup,
|
|
156
|
+
w as CommandInput,
|
|
157
|
+
D as CommandItem,
|
|
158
|
+
y as CommandList,
|
|
159
|
+
N as CommandSeparator,
|
|
160
|
+
I as CommandShortcut
|
|
161
|
+
};
|