laif-ds 0.1.11 → 0.1.13
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/ui/accordion.js +16 -16
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert.js +5 -5
- package/dist/components/ui/async-select.js +39 -39
- package/dist/components/ui/audio-visualizer.js +7 -7
- package/dist/components/ui/avatar.js +3 -3
- package/dist/components/ui/badge.js +12 -12
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button.js +31 -28
- package/dist/components/ui/calendar.js +23 -23
- package/dist/components/ui/card.js +6 -6
- package/dist/components/ui/chart.js +40 -40
- package/dist/components/ui/chat-message.js +59 -59
- package/dist/components/ui/checkbox.js +7 -7
- package/dist/components/ui/command.js +35 -35
- package/dist/components/ui/context-menu.js +16 -16
- package/dist/components/ui/data-table.js +2 -2
- package/dist/components/ui/date-picker.js +14 -14
- package/dist/components/ui/dialog.js +11 -11
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/file-preview.js +14 -14
- package/dist/components/ui/form.js +18 -18
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -6
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +9 -9
- package/dist/components/ui/hover-card.js +5 -5
- package/dist/components/ui/input-otp.js +5 -5
- package/dist/components/ui/input-selector.js +11 -11
- package/dist/components/ui/input.js +25 -25
- package/dist/components/ui/interrupt-prompt.js +1 -1
- package/dist/components/ui/markdown-renderer.js +19 -19
- package/dist/components/ui/menubar.js +16 -16
- package/dist/components/ui/message-input.js +29 -29
- package/dist/components/ui/multiple-selector.js +92 -92
- package/dist/components/ui/navigation-menu.js +13 -13
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/progress.js +4 -4
- package/dist/components/ui/prompt-suggestions.js +9 -9
- package/dist/components/ui/radio-group.js +5 -5
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/scroll-area.js +7 -7
- package/dist/components/ui/select.js +10 -10
- package/dist/components/ui/separator.js +3 -3
- package/dist/components/ui/sheet.js +8 -8
- package/dist/components/ui/sidebar.js +134 -134
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/switch.js +5 -5
- package/dist/components/ui/table.js +3 -3
- package/dist/components/ui/tabs.js +2 -2
- package/dist/components/ui/textarea.js +7 -7
- package/dist/components/ui/toaster.js +12 -12
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/tooltip.js +2 -2
- package/dist/components/ui/typing-indicator.js +8 -8
- package/dist/components/ui/typo.js +9 -9
- package/dist/dist/components/ui/checkbox.js +5 -5
- package/dist/dist/components/ui/scroll-area.js +2 -2
- package/dist/dist/components/ui/table.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as
|
|
2
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
import { Root as i, Item as s, Header as d, Trigger as c, Content as l } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
4
4
|
import { cn as r } from "../../lib/utils.js";
|
|
5
5
|
import m from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
6
6
|
function b({
|
|
7
|
-
...
|
|
7
|
+
...e
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ t(i, { "data-slot": "accordion", ...e });
|
|
10
10
|
}
|
|
11
11
|
function x({
|
|
12
|
-
className:
|
|
12
|
+
className: e,
|
|
13
13
|
...o
|
|
14
14
|
}) {
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
16
|
s,
|
|
17
17
|
{
|
|
18
18
|
"data-slot": "accordion-item",
|
|
19
|
-
className: r("border-b last:border-b-0",
|
|
19
|
+
className: r("border-b last:border-b-0", e),
|
|
20
20
|
...o
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
function v({
|
|
25
|
-
className:
|
|
25
|
+
className: e,
|
|
26
26
|
children: o,
|
|
27
27
|
...n
|
|
28
28
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
29
|
+
return /* @__PURE__ */ t(d, { className: "flex", children: /* @__PURE__ */ a(
|
|
30
|
+
c,
|
|
31
31
|
{
|
|
32
32
|
"data-slot": "accordion-trigger",
|
|
33
33
|
className: r(
|
|
34
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
35
|
-
|
|
34
|
+
"focus-visible:border-d-ring focus-visible:ring-d-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
35
|
+
e
|
|
36
36
|
),
|
|
37
37
|
...n,
|
|
38
38
|
children: [
|
|
39
39
|
o,
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ t(m, { className: "text-d-secondary-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
43
|
) });
|
|
44
44
|
}
|
|
45
45
|
function h({
|
|
46
|
-
className:
|
|
46
|
+
className: e,
|
|
47
47
|
children: o,
|
|
48
48
|
...n
|
|
49
49
|
}) {
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ t(
|
|
51
51
|
l,
|
|
52
52
|
{
|
|
53
53
|
"data-slot": "accordion-content",
|
|
54
54
|
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
55
55
|
...n,
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ t("div", { className: r("pt-0 pb-4", e), children: o })
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
@@ -45,7 +45,7 @@ function T({
|
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "alert-dialog-content",
|
|
47
47
|
className: o(
|
|
48
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
48
|
+
"bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
49
49
|
t
|
|
50
50
|
),
|
|
51
51
|
...a
|
|
@@ -103,7 +103,7 @@ function h({
|
|
|
103
103
|
c,
|
|
104
104
|
{
|
|
105
105
|
"data-slot": "alert-dialog-description",
|
|
106
|
-
className: o("text-
|
|
106
|
+
className: o("text-d-secondary-foreground text-sm", t),
|
|
107
107
|
...a
|
|
108
108
|
}
|
|
109
109
|
);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { cva as i } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
4
|
import { cn as a } from "../../lib/utils.js";
|
|
5
|
-
const
|
|
5
|
+
const d = i(
|
|
6
6
|
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-card text-card-foreground",
|
|
11
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
10
|
+
default: "bg-d-card text-d-card-foreground",
|
|
11
|
+
destructive: "text-d-destructive bg-d-card [&>svg]:text-current *:data-[slot=alert-description]:text-d-destructive/90"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
defaultVariants: {
|
|
@@ -26,7 +26,7 @@ function o({
|
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "alert",
|
|
28
28
|
role: "alert",
|
|
29
|
-
className: a(
|
|
29
|
+
className: a(d({ variant: r }), t),
|
|
30
30
|
...s
|
|
31
31
|
}
|
|
32
32
|
);
|
|
@@ -53,7 +53,7 @@ function u({
|
|
|
53
53
|
{
|
|
54
54
|
"data-slot": "alert-description",
|
|
55
55
|
className: a(
|
|
56
|
-
"text-
|
|
56
|
+
"text-d-secondary-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
57
57
|
t
|
|
58
58
|
),
|
|
59
59
|
...r
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as Z from "react";
|
|
4
|
-
import { useState as o, useEffect as
|
|
4
|
+
import { useState as o, useEffect as y, useCallback as _ } from "react";
|
|
5
5
|
import { useDebounce as V } from "../../hooks/use-debounce.js";
|
|
6
6
|
import { cva as ee } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
7
7
|
import { cn as v } from "../../lib/utils.js";
|
|
8
8
|
import { Button as te } from "./button.js";
|
|
9
9
|
import { Label as se } from "./label.js";
|
|
10
10
|
import { Command as ne, CommandInput as oe, CommandList as re, CommandEmpty as ae, CommandGroup as F, CommandItem as $ } from "./command.js";
|
|
11
|
-
import { Popover as ie, PopoverTrigger as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import { Popover as ie, PopoverTrigger as ce, PopoverContent as le } from "./popover.js";
|
|
12
|
+
import de from "../../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js";
|
|
13
|
+
import me from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
14
14
|
import fe from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
15
15
|
const pe = ee(
|
|
16
16
|
"justify-between",
|
|
@@ -28,15 +28,15 @@ const pe = ee(
|
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
function Ee({
|
|
31
|
-
fetcher:
|
|
32
|
-
preload:
|
|
33
|
-
filterFn:
|
|
31
|
+
fetcher: c,
|
|
32
|
+
preload: d,
|
|
33
|
+
filterFn: g,
|
|
34
34
|
renderOption: A,
|
|
35
35
|
getOptionValue: i,
|
|
36
36
|
getDisplayValue: B,
|
|
37
37
|
notFound: G,
|
|
38
38
|
loadingSkeleton: M,
|
|
39
|
-
label:
|
|
39
|
+
label: l,
|
|
40
40
|
labelClassName: R,
|
|
41
41
|
placeholder: U = "Select...",
|
|
42
42
|
value: a,
|
|
@@ -49,55 +49,55 @@ function Ee({
|
|
|
49
49
|
clearable: L = !0,
|
|
50
50
|
size: K
|
|
51
51
|
}) {
|
|
52
|
-
const [
|
|
53
|
-
|
|
52
|
+
const [m, Q] = o(!1), [z, E] = o(!1), [n, f] = o([]), [x, p] = o(!1), [N, h] = o(null), [C, O] = o(a), [T, j] = o(null), [k, W] = o(""), u = V(k, d ? 0 : 300), [D, I] = o([]);
|
|
53
|
+
y(() => {
|
|
54
54
|
Q(!0), O(a);
|
|
55
|
-
}, [a]),
|
|
55
|
+
}, [a]), y(() => {
|
|
56
56
|
if (a && n.length > 0) {
|
|
57
57
|
const s = n.find((e) => i(e) === a);
|
|
58
58
|
s && j(s);
|
|
59
59
|
}
|
|
60
|
-
}, [a, n, i]),
|
|
61
|
-
|
|
60
|
+
}, [a, n, i]), y(() => {
|
|
61
|
+
m || (async () => {
|
|
62
62
|
try {
|
|
63
|
-
p(!0),
|
|
64
|
-
const e = await
|
|
63
|
+
p(!0), h(null);
|
|
64
|
+
const e = await c(a);
|
|
65
65
|
I(e), f(e);
|
|
66
66
|
} catch (e) {
|
|
67
|
-
|
|
67
|
+
h(e instanceof Error ? e.message : "Failed to fetch options");
|
|
68
68
|
} finally {
|
|
69
69
|
p(!1);
|
|
70
70
|
}
|
|
71
71
|
})();
|
|
72
|
-
}, [
|
|
72
|
+
}, [m, c, a]), y(() => {
|
|
73
73
|
const s = async () => {
|
|
74
74
|
try {
|
|
75
|
-
p(!0),
|
|
76
|
-
const e = await
|
|
75
|
+
p(!0), h(null);
|
|
76
|
+
const e = await c(u);
|
|
77
77
|
I(e), f(e);
|
|
78
78
|
} catch (e) {
|
|
79
|
-
|
|
79
|
+
h(e instanceof Error ? e.message : "Failed to fetch options");
|
|
80
80
|
} finally {
|
|
81
81
|
p(!1);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
|
|
85
|
-
}, [
|
|
84
|
+
m && d ? d && f(u ? D.filter((e) => g ? g(e, u) : !0) : D) : s();
|
|
85
|
+
}, [c, u, m, d, g]);
|
|
86
86
|
const X = _((s) => {
|
|
87
87
|
const e = L && s === C ? "" : s;
|
|
88
88
|
O(e), j(n.find((Y) => i(Y) === e) || null), w(e), E(!1);
|
|
89
89
|
}, [C, w, L, n, i]), P = Z.useId();
|
|
90
90
|
return /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
91
|
-
|
|
91
|
+
l && /* @__PURE__ */ t(
|
|
92
92
|
se,
|
|
93
93
|
{
|
|
94
94
|
htmlFor: P,
|
|
95
95
|
className: R,
|
|
96
|
-
children:
|
|
96
|
+
children: l
|
|
97
97
|
}
|
|
98
98
|
),
|
|
99
99
|
/* @__PURE__ */ r(ie, { open: z, onOpenChange: E, children: [
|
|
100
|
-
/* @__PURE__ */ t(
|
|
100
|
+
/* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ r(
|
|
101
101
|
te,
|
|
102
102
|
{
|
|
103
103
|
id: P,
|
|
@@ -112,29 +112,29 @@ function Ee({
|
|
|
112
112
|
style: { width: b },
|
|
113
113
|
disabled: S,
|
|
114
114
|
children: [
|
|
115
|
-
T ? B(T) : /* @__PURE__ */ t("span", { className: "text-
|
|
116
|
-
/* @__PURE__ */ t(
|
|
115
|
+
T ? B(T) : /* @__PURE__ */ t("span", { className: "text-d-secondary-foreground hover:text-foreground", children: U }),
|
|
116
|
+
/* @__PURE__ */ t(de, { className: "opacity-50", size: 10 })
|
|
117
117
|
]
|
|
118
118
|
}
|
|
119
119
|
) }),
|
|
120
|
-
/* @__PURE__ */ t(
|
|
120
|
+
/* @__PURE__ */ t(le, { style: { width: b }, className: v("p-0", q), children: /* @__PURE__ */ r(ne, { shouldFilter: !1, children: [
|
|
121
121
|
/* @__PURE__ */ r("div", { className: "relative border-b w-full", children: [
|
|
122
122
|
/* @__PURE__ */ t(
|
|
123
123
|
oe,
|
|
124
124
|
{
|
|
125
|
-
placeholder: `Search ${typeof
|
|
125
|
+
placeholder: `Search ${typeof l == "string" ? l.toLowerCase() : "options"}...`,
|
|
126
126
|
value: k,
|
|
127
127
|
onValueChange: (s) => {
|
|
128
128
|
W(s);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
x && n.length > 0 && /* @__PURE__ */ t("div", { className: "absolute right-2 top-1/2 transform -translate-y-1/2 flex items-center", children: /* @__PURE__ */ t(
|
|
132
|
+
x && n.length > 0 && /* @__PURE__ */ t("div", { className: "absolute right-2 top-1/2 transform -translate-y-1/2 flex items-center", children: /* @__PURE__ */ t(me, { className: "h-4 w-4 animate-spin" }) })
|
|
133
133
|
] }),
|
|
134
134
|
/* @__PURE__ */ r(re, { children: [
|
|
135
|
-
N && /* @__PURE__ */ t("div", { className: "p-4 text-destructive text-center", children: N }),
|
|
136
|
-
x && n.length === 0 && (M || /* @__PURE__ */ t(
|
|
137
|
-
!x && !N && n.length === 0 && (G || /* @__PURE__ */ t(ae, { children: J ?? `No ${typeof
|
|
135
|
+
N && /* @__PURE__ */ t("div", { className: "p-4 text-d-destructive text-center", children: N }),
|
|
136
|
+
x && n.length === 0 && (M || /* @__PURE__ */ t(he, {})),
|
|
137
|
+
!x && !N && n.length === 0 && (G || /* @__PURE__ */ t(ae, { children: J ?? `No ${typeof l == "string" ? l.toLowerCase() : "options"} found.` })),
|
|
138
138
|
/* @__PURE__ */ t(F, { children: n.map((s) => /* @__PURE__ */ r(
|
|
139
139
|
$,
|
|
140
140
|
{
|
|
@@ -160,14 +160,14 @@ function Ee({
|
|
|
160
160
|
] })
|
|
161
161
|
] });
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return /* @__PURE__ */ t(F, { children: [1, 2, 3].map((
|
|
165
|
-
/* @__PURE__ */ t("div", { className: "h-6 w-6 rounded-full animate-pulse bg-
|
|
163
|
+
function he() {
|
|
164
|
+
return /* @__PURE__ */ t(F, { children: [1, 2, 3].map((c) => /* @__PURE__ */ t($, { disabled: !0, children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2 w-full", children: [
|
|
165
|
+
/* @__PURE__ */ t("div", { className: "h-6 w-6 rounded-full animate-pulse bg-d-secondary" }),
|
|
166
166
|
/* @__PURE__ */ r("div", { className: "flex flex-col flex-1 gap-1", children: [
|
|
167
|
-
/* @__PURE__ */ t("div", { className: "h-4 w-24 animate-pulse bg-
|
|
168
|
-
/* @__PURE__ */ t("div", { className: "h-3 w-16 animate-pulse bg-
|
|
167
|
+
/* @__PURE__ */ t("div", { className: "h-4 w-24 animate-pulse bg-d-secondary rounded" }),
|
|
168
|
+
/* @__PURE__ */ t("div", { className: "h-3 w-16 animate-pulse bg-d-secondary rounded" })
|
|
169
169
|
] })
|
|
170
|
-
] }) },
|
|
170
|
+
] }) }, c)) });
|
|
171
171
|
}
|
|
172
172
|
export {
|
|
173
173
|
Ee as AsyncSelect
|
|
@@ -21,8 +21,8 @@ function F({
|
|
|
21
21
|
isRecording: l,
|
|
22
22
|
onClick: S
|
|
23
23
|
}) {
|
|
24
|
-
const a = i(null),
|
|
25
|
-
I.current && cancelAnimationFrame(I.current),
|
|
24
|
+
const a = i(null), d = i(null), f = i(null), I = i(null), h = i(null), R = () => {
|
|
25
|
+
I.current && cancelAnimationFrame(I.current), d.current && d.current.close();
|
|
26
26
|
};
|
|
27
27
|
w(() => R, []), w(() => {
|
|
28
28
|
u && l ? C() : R();
|
|
@@ -38,9 +38,9 @@ function F({
|
|
|
38
38
|
const C = async () => {
|
|
39
39
|
try {
|
|
40
40
|
const e = new AudioContext();
|
|
41
|
-
|
|
41
|
+
d.current = e;
|
|
42
42
|
const t = e.createAnalyser();
|
|
43
|
-
t.fftSize = c.FFT_SIZE, t.smoothingTimeConstant = c.SMOOTHING,
|
|
43
|
+
t.fftSize = c.FFT_SIZE, t.smoothingTimeConstant = c.SMOOTHING, f.current = t, e.createMediaStreamSource(u).connect(t), p();
|
|
44
44
|
} catch (e) {
|
|
45
45
|
console.error("Error starting visualization:", e);
|
|
46
46
|
}
|
|
@@ -52,10 +52,10 @@ function F({
|
|
|
52
52
|
}, p = () => {
|
|
53
53
|
if (!l) return;
|
|
54
54
|
const e = a.current, t = e == null ? void 0 : e.getContext("2d");
|
|
55
|
-
if (!e || !t || !
|
|
55
|
+
if (!e || !t || !f.current) return;
|
|
56
56
|
const n = window.devicePixelRatio || 1;
|
|
57
57
|
t.scale(n, n);
|
|
58
|
-
const o =
|
|
58
|
+
const o = f.current, r = o.frequencyBinCount, s = new Uint8Array(r), A = () => {
|
|
59
59
|
I.current = requestAnimationFrame(A), o.getByteFrequencyData(s), t.clearRect(0, 0, e.width / n, e.height / n);
|
|
60
60
|
const T = Math.max(
|
|
61
61
|
c.MIN_BAR_WIDTH,
|
|
@@ -83,7 +83,7 @@ function F({
|
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
ref: h,
|
|
86
|
-
className: "h-full w-full cursor-pointer rounded-lg bg-background/80 backdrop-blur",
|
|
86
|
+
className: "h-full w-full cursor-pointer rounded-lg bg-d-background/80 backdrop-blur",
|
|
87
87
|
onClick: S,
|
|
88
88
|
children: /* @__PURE__ */ g("canvas", { ref: a, className: "h-full w-full" })
|
|
89
89
|
}
|
|
@@ -18,7 +18,7 @@ function f({
|
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function u({
|
|
22
22
|
className: a,
|
|
23
23
|
...e
|
|
24
24
|
}) {
|
|
@@ -40,7 +40,7 @@ function m({
|
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "avatar-fallback",
|
|
42
42
|
className: r(
|
|
43
|
-
"bg-
|
|
43
|
+
"bg-d-secondary flex size-full items-center justify-center rounded-full",
|
|
44
44
|
a
|
|
45
45
|
),
|
|
46
46
|
...e
|
|
@@ -50,5 +50,5 @@ function m({
|
|
|
50
50
|
export {
|
|
51
51
|
f as Avatar,
|
|
52
52
|
m as AvatarFallback,
|
|
53
|
-
|
|
53
|
+
u as AvatarImage
|
|
54
54
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
3
|
+
import { Root as d } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
+
import { cva as o } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn as n } from "../../lib/utils.js";
|
|
6
|
+
const s = o(
|
|
7
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px] aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive transition-[color,box-shadow] overflow-hidden",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
12
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
13
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
11
|
+
default: "border-transparent bg-d-primary text-d-primary-foreground [a&]:hover:bg-d-primary/90",
|
|
12
|
+
secondary: "border-transparent bg-d-secondary text-d-secondary-foreground [a&]:hover:bg-d-secondary/90",
|
|
13
|
+
destructive: "border-transparent bg-d-destructive text-white [a&]:hover:bg-d-destructive/90 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60",
|
|
14
|
+
outline: "text-foreground [a&]:hover:bg-d-accent [a&]:hover:text-d-accent-foreground"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
defaultVariants: {
|
|
@@ -26,15 +26,15 @@ function b({
|
|
|
26
26
|
...i
|
|
27
27
|
}) {
|
|
28
28
|
return /* @__PURE__ */ a(
|
|
29
|
-
t ?
|
|
29
|
+
t ? d : "span",
|
|
30
30
|
{
|
|
31
31
|
"data-slot": "badge",
|
|
32
|
-
className: s(
|
|
32
|
+
className: n(s({ variant: e }), r),
|
|
33
33
|
...i
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
38
|
b as Badge,
|
|
39
|
-
|
|
39
|
+
s as badgeVariants
|
|
40
40
|
};
|
|
@@ -13,7 +13,7 @@ function g({ className: r, ...e }) {
|
|
|
13
13
|
{
|
|
14
14
|
"data-slot": "breadcrumb-list",
|
|
15
15
|
className: t(
|
|
16
|
-
"text-
|
|
16
|
+
"text-d-secondary-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
17
17
|
r
|
|
18
18
|
),
|
|
19
19
|
...e
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
import { Root as g } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Icon as
|
|
7
|
-
const v =
|
|
8
|
-
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
4
|
+
import { cva as p } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn as o } from "../../lib/utils.js";
|
|
6
|
+
import { Icon as u } from "./icon.js";
|
|
7
|
+
const v = p(
|
|
8
|
+
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px] aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
13
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
16
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
12
|
+
default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90",
|
|
13
|
+
destructive: "bg-d-destructive text-white shadow-xs hover:bg-d-destructive/90 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60",
|
|
14
|
+
outline: "border bg-d-background shadow-xs hover:bg-d-accent hover:text-d-accent-foreground dark:bg-d-input/30 dark:border-d-input dark:hover:bg-d-input/50",
|
|
15
|
+
secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs hover:bg-d-secondary/80",
|
|
16
|
+
ghost: "hover:bg-d-accent hover:text-d-accent-foreground dark:hover:bg-d-accent/50",
|
|
17
|
+
link: "text-d-primary underline-offset-4 hover:underline"
|
|
18
18
|
},
|
|
19
19
|
size: {
|
|
20
20
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
@@ -29,49 +29,52 @@ const v = m(
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
function
|
|
33
|
-
className:
|
|
34
|
-
variant:
|
|
32
|
+
function k({
|
|
33
|
+
className: d,
|
|
34
|
+
variant: i,
|
|
35
35
|
size: e,
|
|
36
|
-
asChild:
|
|
37
|
-
iconLeft:
|
|
38
|
-
iconRight:
|
|
36
|
+
asChild: a = !1,
|
|
37
|
+
iconLeft: n,
|
|
38
|
+
iconRight: s,
|
|
39
|
+
isLoading: m = !1,
|
|
39
40
|
...t
|
|
40
41
|
}) {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
|
|
42
|
+
const c = a ? g : "button";
|
|
43
|
+
return a ? /* @__PURE__ */ r(
|
|
44
|
+
c,
|
|
44
45
|
{
|
|
45
46
|
"data-slot": "button",
|
|
46
|
-
className:
|
|
47
|
+
className: o(v({ variant: i, size: e, className: d })),
|
|
47
48
|
...t
|
|
48
49
|
}
|
|
49
50
|
) : /* @__PURE__ */ l(
|
|
50
|
-
|
|
51
|
+
c,
|
|
51
52
|
{
|
|
52
53
|
"data-slot": "button",
|
|
53
|
-
className:
|
|
54
|
+
className: o(v({ variant: i, size: e, className: d }), "relative"),
|
|
54
55
|
...t,
|
|
55
56
|
children: [
|
|
56
57
|
/* @__PURE__ */ r(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
|
-
className:
|
|
60
|
+
className: o(
|
|
60
61
|
"absolute inset-0",
|
|
61
|
-
// "bg-linear-to-r from-primary/50 via-primary/50 to-primary",
|
|
62
62
|
"opacity-40 group-hover:opacity-80",
|
|
63
63
|
"blur-[2.5px] transition-opacity duration-500"
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
|
|
67
|
+
m ? /* @__PURE__ */ l("svg", { className: "animate-spin -ml-1 mr-1", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: e === "sm" ? 14 : e === "lg" ? 20 : 16, height: e === "sm" ? 14 : e === "lg" ? 20 : 16, children: [
|
|
68
|
+
/* @__PURE__ */ r("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
69
|
+
/* @__PURE__ */ r("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
70
|
+
] }) : n && /* @__PURE__ */ r(u, { name: n, size: e === "default" ? "md" : e === "sm" ? "xs" : "sm" }),
|
|
68
71
|
t.children,
|
|
69
|
-
|
|
72
|
+
s && /* @__PURE__ */ r(u, { name: s, size: e === "default" ? "md" : e === "sm" ? "xs" : "sm" })
|
|
70
73
|
]
|
|
71
74
|
}
|
|
72
75
|
);
|
|
73
76
|
}
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
k as Button,
|
|
76
79
|
v as buttonVariants
|
|
77
80
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { DayPicker as l } from "../../node_modules/react-day-picker/dist/index.esm.js";
|
|
4
4
|
import { cn as e } from "../../lib/utils.js";
|
|
5
|
-
import { buttonVariants as
|
|
5
|
+
import { buttonVariants as o } from "./button.js";
|
|
6
6
|
import c from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
7
7
|
import m from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
8
8
|
function h({
|
|
9
9
|
className: n,
|
|
10
|
-
classNames:
|
|
11
|
-
showOutsideDays:
|
|
12
|
-
...
|
|
10
|
+
classNames: s,
|
|
11
|
+
showOutsideDays: i = !0,
|
|
12
|
+
...d
|
|
13
13
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ t(
|
|
15
15
|
l,
|
|
16
16
|
{
|
|
17
|
-
showOutsideDays:
|
|
17
|
+
showOutsideDays: i,
|
|
18
18
|
className: e("p-3", n),
|
|
19
19
|
classNames: {
|
|
20
20
|
months: "flex flex-col sm:flex-row gap-2",
|
|
@@ -23,38 +23,38 @@ function h({
|
|
|
23
23
|
caption_label: "text-sm font-medium",
|
|
24
24
|
nav: "flex items-center gap-1",
|
|
25
25
|
nav_button: e(
|
|
26
|
-
|
|
26
|
+
o({ variant: "outline" }),
|
|
27
27
|
"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
28
28
|
),
|
|
29
29
|
nav_button_previous: "absolute left-1",
|
|
30
30
|
nav_button_next: "absolute right-1",
|
|
31
31
|
table: "w-full border-collapse space-x-1",
|
|
32
32
|
head_row: "flex",
|
|
33
|
-
head_cell: "text-
|
|
33
|
+
head_cell: "text-d-secondary-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
34
34
|
row: "flex w-full mt-2",
|
|
35
35
|
cell: e(
|
|
36
|
-
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
37
|
-
|
|
36
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-d-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
37
|
+
d.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
|
|
38
38
|
),
|
|
39
39
|
day: e(
|
|
40
|
-
|
|
40
|
+
o({ variant: "ghost" }),
|
|
41
41
|
"size-8 p-0 font-normal aria-selected:opacity-100"
|
|
42
42
|
),
|
|
43
|
-
day_range_start: "day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",
|
|
44
|
-
day_range_end: "day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",
|
|
45
|
-
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
46
|
-
day_today: "bg-accent text-accent-foreground",
|
|
47
|
-
day_outside: "day-outside text-
|
|
48
|
-
day_disabled: "text-
|
|
49
|
-
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
43
|
+
day_range_start: "day-range-start aria-selected:bg-d-primary aria-selected:text-d-primary-foreground",
|
|
44
|
+
day_range_end: "day-range-end aria-selected:bg-d-primary aria-selected:text-d-primary-foreground",
|
|
45
|
+
day_selected: "bg-d-primary text-d-primary-foreground hover:bg-d-primary hover:text-d-primary-foreground focus:bg-d-primary focus:text-d-primary-foreground",
|
|
46
|
+
day_today: "bg-d-accent text-d-accent-foreground",
|
|
47
|
+
day_outside: "day-outside text-d-secondary-foreground aria-selected:text-d-secondary-foreground",
|
|
48
|
+
day_disabled: "text-d-secondary-foreground opacity-50",
|
|
49
|
+
day_range_middle: "aria-selected:bg-d-accent aria-selected:text-d-accent-foreground",
|
|
50
50
|
day_hidden: "invisible",
|
|
51
|
-
...
|
|
51
|
+
...s
|
|
52
52
|
},
|
|
53
53
|
components: {
|
|
54
|
-
IconLeft: ({ className: a, ...
|
|
55
|
-
IconRight: ({ className: a, ...
|
|
54
|
+
IconLeft: ({ className: a, ...r }) => /* @__PURE__ */ t(m, { className: e("size-4", a), ...r }),
|
|
55
|
+
IconRight: ({ className: a, ...r }) => /* @__PURE__ */ t(c, { className: e("size-4", a), ...r })
|
|
56
56
|
},
|
|
57
|
-
...
|
|
57
|
+
...d
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
}
|