laif-ds 0.1.74 → 0.1.76
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 +1 -1
- package/dist/components/ui/alert-dialog.js +3 -3
- package/dist/components/ui/alert.js +3 -3
- package/dist/components/ui/app-multiple-select-dropdown.js +12 -12
- package/dist/components/ui/async-select.js +53 -53
- package/dist/components/ui/card.js +26 -26
- package/dist/components/ui/chat-message.js +6 -6
- package/dist/components/ui/chat.js +44 -44
- package/dist/components/ui/context-menu.js +2 -2
- package/dist/components/ui/date-picker.js +10 -10
- package/dist/components/ui/dialog.js +7 -7
- package/dist/components/ui/drawer.js +33 -33
- package/dist/components/ui/dropdown-menu.js +20 -20
- package/dist/components/ui/file-preview.js +51 -51
- package/dist/components/ui/gantt/components/Controls/Controls.js +60 -51
- package/dist/components/ui/hover-card.js +5 -5
- package/dist/components/ui/input-selector.js +19 -19
- package/dist/components/ui/input.js +6 -6
- package/dist/components/ui/interrupt-prompt.js +6 -6
- package/dist/components/ui/markdown-renderer.js +16 -16
- package/dist/components/ui/menubar.js +26 -26
- package/dist/components/ui/message-input.js +9 -9
- package/dist/components/ui/multiple-selector.js +20 -20
- package/dist/components/ui/navigation-menu.js +5 -5
- package/dist/components/ui/popover.js +4 -4
- package/dist/components/ui/prompt-suggestions.js +11 -11
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/select.js +5 -2
- package/dist/components/ui/sheet.js +16 -16
- package/dist/components/ui/sidebar.js +23 -24
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table-skeleton.js +36 -36
- package/dist/components/ui/table.js +25 -25
- package/dist/components/ui/toggle-group.js +15 -15
- package/dist/components/ui/weekly-calendar/appointment-card.js +24 -24
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
|
3
3
|
import { Root as n, Trigger as i, Content as s, Title as d, Description as c, Action as g, Cancel as u, Portal as f, Overlay as m } from "../../node_modules/@radix-ui/react-alert-dialog/dist/index.js";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import { buttonVariants as l } from "./button.js";
|
|
6
|
-
function
|
|
6
|
+
function N({ ...t }) {
|
|
7
7
|
return /* @__PURE__ */ e(n, { "data-slot": "alert-dialog", ...t });
|
|
8
8
|
}
|
|
9
9
|
function y({ ...t }) {
|
|
@@ -33,7 +33,7 @@ function T({ className: t, ...a }) {
|
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "alert-dialog-content",
|
|
35
35
|
className: o(
|
|
36
|
-
"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",
|
|
36
|
+
"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 border-d-border 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",
|
|
37
37
|
t
|
|
38
38
|
),
|
|
39
39
|
...a
|
|
@@ -106,7 +106,7 @@ function O({ className: t, ...a }) {
|
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
N as AlertDialog,
|
|
110
110
|
j as AlertDialogAction,
|
|
111
111
|
O as AlertDialogCancel,
|
|
112
112
|
T as AlertDialogContent,
|
|
@@ -3,7 +3,7 @@ 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
5
|
const d = i(
|
|
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",
|
|
6
|
+
"relative w-full rounded-lg border border-d-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: {
|
|
@@ -16,7 +16,7 @@ const d = i(
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
|
-
function
|
|
19
|
+
function c({ className: t, variant: r, ...s }) {
|
|
20
20
|
return /* @__PURE__ */ e(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
@@ -57,7 +57,7 @@ function u({
|
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
c as Alert,
|
|
61
61
|
u as AlertDescription,
|
|
62
62
|
g as AlertTitle
|
|
63
63
|
};
|
|
@@ -30,7 +30,7 @@ function oe({
|
|
|
30
30
|
cancelButtonLabel: R = "Cancella",
|
|
31
31
|
maxSelectedItems: t
|
|
32
32
|
}) {
|
|
33
|
-
const m = n.useId(), [u, h] = n.useState(!1), [
|
|
33
|
+
const m = n.useId(), [u, h] = n.useState(!1), [d, b] = n.useState(""), g = n.useRef(null), v = n.useCallback(
|
|
34
34
|
(e) => {
|
|
35
35
|
if (a.includes(e))
|
|
36
36
|
o(a.filter((i) => i !== e));
|
|
@@ -43,9 +43,9 @@ function oe({
|
|
|
43
43
|
[a, o, t]
|
|
44
44
|
), w = n.useCallback(() => {
|
|
45
45
|
o([]), b("");
|
|
46
|
-
}, [o]),
|
|
47
|
-
(e) => e.label.toLowerCase().includes(
|
|
48
|
-
) : s, [s,
|
|
46
|
+
}, [o]), c = n.useMemo(() => s.filter((e) => a.includes(e.value)), [s, a]), S = n.useMemo(() => d ? s.filter(
|
|
47
|
+
(e) => e.label.toLowerCase().includes(d.toLowerCase())
|
|
48
|
+
) : s, [s, d]), x = n.useMemo(() => t ? a.length >= t : !1, [a, t]);
|
|
49
49
|
return /* @__PURE__ */ r(T.Provider, { value: { size: f, id: m }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
50
50
|
p && /* @__PURE__ */ r(B, { htmlFor: m, className: z, children: p }),
|
|
51
51
|
/* @__PURE__ */ l(
|
|
@@ -65,22 +65,22 @@ function oe({
|
|
|
65
65
|
"aria-expanded": u,
|
|
66
66
|
disabled: k,
|
|
67
67
|
className: N(
|
|
68
|
-
"relative w-full justify-between border bg-transparent font-normal",
|
|
68
|
+
"border-d-border relative w-full justify-between border bg-transparent font-normal",
|
|
69
69
|
"border-d-input ring-offset-background focus:ring-ring flex items-center rounded-md border !bg-transparent whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
70
70
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
71
71
|
j
|
|
72
72
|
),
|
|
73
73
|
onClick: () => h(!u),
|
|
74
74
|
children: [
|
|
75
|
-
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children:
|
|
75
|
+
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: c.length > 0 ? /* @__PURE__ */ l(A, { children: [
|
|
76
76
|
/* @__PURE__ */ l(
|
|
77
77
|
F,
|
|
78
78
|
{
|
|
79
79
|
variant: "secondary",
|
|
80
80
|
className: "flex items-center gap-1",
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */ r("span", { children:
|
|
83
|
-
|
|
82
|
+
/* @__PURE__ */ r("span", { children: c.length }),
|
|
83
|
+
c.length === 1 ? " elemento selezionato" : " elementi selezionati"
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
),
|
|
@@ -108,8 +108,8 @@ function oe({
|
|
|
108
108
|
open: u,
|
|
109
109
|
triggerRef: g,
|
|
110
110
|
onClose: () => h(!1),
|
|
111
|
-
children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(E, { className: "bg-d-popover w-full rounded-md border shadow-md", children: [
|
|
112
|
-
D && /* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b px-3", children: [
|
|
111
|
+
children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(E, { className: "bg-d-popover border-d-border w-full rounded-md border shadow-md", children: [
|
|
112
|
+
D && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
|
|
113
113
|
/* @__PURE__ */ l("div", { className: "flex items-center", children: [
|
|
114
114
|
/* @__PURE__ */ r(I, { name: "Search", className: "text-d-accent", size: "sm" }),
|
|
115
115
|
/* @__PURE__ */ r(
|
|
@@ -117,13 +117,13 @@ function oe({
|
|
|
117
117
|
{
|
|
118
118
|
id: "app-multiple-select-dropdown-filter",
|
|
119
119
|
placeholder: P,
|
|
120
|
-
value:
|
|
120
|
+
value: d,
|
|
121
121
|
onChange: (e) => b(e.target.value),
|
|
122
122
|
className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${q({ size: f })} !shadow-none`
|
|
123
123
|
}
|
|
124
124
|
)
|
|
125
125
|
] }),
|
|
126
|
-
|
|
126
|
+
c.length > 0 && /* @__PURE__ */ r(
|
|
127
127
|
C,
|
|
128
128
|
{
|
|
129
129
|
variant: "ghost",
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as Y from "react";
|
|
4
|
-
import { useState as i, useEffect as
|
|
4
|
+
import { useState as i, useEffect as k, useCallback as D } from "react";
|
|
5
5
|
import { useDebounce as Z } from "../../hooks/use-debounce.js";
|
|
6
6
|
import { cva as _ } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
7
|
-
import { cn as
|
|
7
|
+
import { cn as z } from "../../lib/utils.js";
|
|
8
8
|
import { Button as V } from "./button.js";
|
|
9
9
|
import { Label as ee } from "./label.js";
|
|
10
|
-
import { Command as te, CommandInput as oe, CommandList as
|
|
10
|
+
import { Command as te, CommandInput as oe, CommandList as ne, CommandEmpty as se, CommandGroup as O, CommandItem as R } from "./command.js";
|
|
11
11
|
import { Popover as re, PopoverTrigger as ae, PopoverContent as ie } from "./popover.js";
|
|
12
12
|
import ce from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
13
13
|
import le from "../../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js";
|
|
14
14
|
import de from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
15
15
|
import me from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
16
16
|
const fe = _(
|
|
17
|
-
"flex items-center justify-between whitespace-nowrap rounded-md border border-input bg-
|
|
17
|
+
"flex items-center justify-between whitespace-nowrap rounded-md border border-input bg-d-input px-3 py-2 shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
18
18
|
{
|
|
19
19
|
variants: {
|
|
20
20
|
size: {
|
|
@@ -31,18 +31,18 @@ const fe = _(
|
|
|
31
31
|
function ke({
|
|
32
32
|
fetcher: c,
|
|
33
33
|
preload: m,
|
|
34
|
-
filterFn:
|
|
34
|
+
filterFn: y,
|
|
35
35
|
renderOption: A,
|
|
36
36
|
getOptionValue: a,
|
|
37
|
-
getDisplayValue:
|
|
37
|
+
getDisplayValue: b,
|
|
38
38
|
notFound: F,
|
|
39
39
|
loadingSkeleton: $,
|
|
40
40
|
label: l,
|
|
41
41
|
labelClassName: B,
|
|
42
42
|
placeholder: G = "Select...",
|
|
43
|
-
value:
|
|
43
|
+
value: s,
|
|
44
44
|
onChange: u,
|
|
45
|
-
disabled:
|
|
45
|
+
disabled: v = !1,
|
|
46
46
|
width: E = "200px",
|
|
47
47
|
className: M,
|
|
48
48
|
triggerClassName: U,
|
|
@@ -50,8 +50,8 @@ function ke({
|
|
|
50
50
|
clearable: w = !0,
|
|
51
51
|
size: q
|
|
52
52
|
}) {
|
|
53
|
-
const [p, N] = i(!1), [r, d] = i([]), [
|
|
54
|
-
|
|
53
|
+
const [p, N] = i(!1), [r, d] = i([]), [C, h] = i(!1), [S, g] = i(null), [L, x] = i(null), [I, H] = i(""), f = Z(I, m ? 0 : 300), [j, P] = i([]);
|
|
54
|
+
k(() => ((async () => {
|
|
55
55
|
try {
|
|
56
56
|
if (h(!0), g(null), m) {
|
|
57
57
|
console.log(
|
|
@@ -60,7 +60,7 @@ function ke({
|
|
|
60
60
|
const o = await c("");
|
|
61
61
|
P(o), d(o);
|
|
62
62
|
} else {
|
|
63
|
-
const o = await c(
|
|
63
|
+
const o = await c(s);
|
|
64
64
|
d(o);
|
|
65
65
|
}
|
|
66
66
|
} catch (o) {
|
|
@@ -72,16 +72,16 @@ function ke({
|
|
|
72
72
|
}
|
|
73
73
|
})(), () => {
|
|
74
74
|
d([]), P([]);
|
|
75
|
-
}), [c,
|
|
75
|
+
}), [c, s, m]), k(() => {
|
|
76
76
|
if (p)
|
|
77
77
|
if (m)
|
|
78
78
|
if (f) {
|
|
79
|
-
const t =
|
|
80
|
-
(o) =>
|
|
79
|
+
const t = j.filter(
|
|
80
|
+
(o) => y ? y(o, f) : String(b(o)).toLowerCase().includes(f.toLowerCase())
|
|
81
81
|
);
|
|
82
82
|
d(t);
|
|
83
83
|
} else
|
|
84
|
-
d(
|
|
84
|
+
d(j);
|
|
85
85
|
else
|
|
86
86
|
(async () => {
|
|
87
87
|
try {
|
|
@@ -100,31 +100,31 @@ function ke({
|
|
|
100
100
|
p,
|
|
101
101
|
f,
|
|
102
102
|
m,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
]),
|
|
107
|
-
if (
|
|
108
|
-
const t = r.find((o) => a(o) ===
|
|
109
|
-
|
|
110
|
-
} else
|
|
111
|
-
}, [
|
|
103
|
+
y,
|
|
104
|
+
j,
|
|
105
|
+
b
|
|
106
|
+
]), k(() => {
|
|
107
|
+
if (s && r.length > 0) {
|
|
108
|
+
const t = r.find((o) => a(o) === s);
|
|
109
|
+
x(t || null);
|
|
110
|
+
} else s || x(null);
|
|
111
|
+
}, [s, r, a]);
|
|
112
112
|
const J = D(
|
|
113
113
|
(t) => {
|
|
114
|
-
const o = w && t ===
|
|
115
|
-
|
|
114
|
+
const o = w && t === s ? "" : t, Q = r.find((W) => a(W) === o) || null;
|
|
115
|
+
x(Q), u(o), N(!1);
|
|
116
116
|
},
|
|
117
|
-
[
|
|
117
|
+
[s, u, w, r, a]
|
|
118
118
|
), K = D(
|
|
119
119
|
(t) => {
|
|
120
|
-
t.stopPropagation(), t.preventDefault(),
|
|
120
|
+
t.stopPropagation(), t.preventDefault(), x(null), u(""), N(!1);
|
|
121
121
|
},
|
|
122
122
|
[u]
|
|
123
123
|
), T = Y.useId();
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
|
|
125
125
|
l && /* @__PURE__ */ e(ee, { htmlFor: T, className: B, children: l }),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
126
|
+
/* @__PURE__ */ n(re, { open: p, onOpenChange: N, children: [
|
|
127
|
+
/* @__PURE__ */ e(ae, { disabled: v, children: /* @__PURE__ */ e(
|
|
128
128
|
V,
|
|
129
129
|
{
|
|
130
130
|
id: T,
|
|
@@ -132,21 +132,21 @@ function ke({
|
|
|
132
132
|
variant: "ghost",
|
|
133
133
|
role: "combobox",
|
|
134
134
|
"aria-expanded": p,
|
|
135
|
-
className:
|
|
135
|
+
className: z(
|
|
136
136
|
fe({ size: q }),
|
|
137
|
-
|
|
137
|
+
v && "cursor-not-allowed opacity-50",
|
|
138
138
|
U,
|
|
139
139
|
"font-normal"
|
|
140
140
|
),
|
|
141
141
|
style: { width: E },
|
|
142
|
-
disabled:
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
w &&
|
|
142
|
+
disabled: v,
|
|
143
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-between overflow-hidden", children: [
|
|
144
|
+
L ? /* @__PURE__ */ e("div", { className: "truncate", children: b(L) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: G }),
|
|
145
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
|
|
146
|
+
w && L && /* @__PURE__ */ e(
|
|
147
147
|
"div",
|
|
148
148
|
{
|
|
149
|
-
className: "bg-d-
|
|
149
|
+
className: "bg-d-input hover:bg-d-input/30 border-d-border z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
|
|
150
150
|
onClick: K,
|
|
151
151
|
onMouseDown: (t) => t.preventDefault(),
|
|
152
152
|
"aria-label": "Clear selection",
|
|
@@ -162,9 +162,9 @@ function ke({
|
|
|
162
162
|
ie,
|
|
163
163
|
{
|
|
164
164
|
style: { width: E },
|
|
165
|
-
className:
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
165
|
+
className: z("p-0", M),
|
|
166
|
+
children: /* @__PURE__ */ n(te, { shouldFilter: !1, children: [
|
|
167
|
+
/* @__PURE__ */ n("div", { className: "border-d-border relative w-full border-b", children: [
|
|
168
168
|
/* @__PURE__ */ e(
|
|
169
169
|
oe,
|
|
170
170
|
{
|
|
@@ -176,13 +176,13 @@ function ke({
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
|
-
|
|
179
|
+
C && r.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center", children: /* @__PURE__ */ e(de, { className: "h-4 w-4 animate-spin" }) })
|
|
180
180
|
] }),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
!
|
|
185
|
-
/* @__PURE__ */ e(O, { children: r.map((t) => /* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ n(ne, { children: [
|
|
182
|
+
S && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: S }),
|
|
183
|
+
C && r.length === 0 && ($ || /* @__PURE__ */ e(ue, {})),
|
|
184
|
+
!C && !S && r.length === 0 && (F || /* @__PURE__ */ e(se, { children: X ?? `No ${typeof l == "string" ? l.toLowerCase() : "options"} found.` })),
|
|
185
|
+
/* @__PURE__ */ e(O, { children: r.map((t) => /* @__PURE__ */ n(
|
|
186
186
|
R,
|
|
187
187
|
{
|
|
188
188
|
value: a(t),
|
|
@@ -192,9 +192,9 @@ function ke({
|
|
|
192
192
|
/* @__PURE__ */ e(
|
|
193
193
|
me,
|
|
194
194
|
{
|
|
195
|
-
className:
|
|
195
|
+
className: z(
|
|
196
196
|
"ml-auto h-3 w-3",
|
|
197
|
-
|
|
197
|
+
s === a(t) ? "opacity-100" : "opacity-0"
|
|
198
198
|
)
|
|
199
199
|
}
|
|
200
200
|
)
|
|
@@ -210,9 +210,9 @@ function ke({
|
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
212
|
function ue() {
|
|
213
|
-
return /* @__PURE__ */ e(O, { children: [1, 2, 3].map((c) => /* @__PURE__ */ e(R, { disabled: !0, children: /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ e(O, { children: [1, 2, 3].map((c) => /* @__PURE__ */ e(R, { disabled: !0, children: /* @__PURE__ */ n("div", { className: "flex w-full items-center gap-2", children: [
|
|
214
214
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ n("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
216
216
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
|
|
217
217
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
|
|
218
218
|
] })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
const s = n.createContext({
|
|
@@ -26,73 +26,73 @@ const s = n.createContext({
|
|
|
26
26
|
gap: ""
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
function l({ className:
|
|
30
|
-
return /* @__PURE__ */
|
|
29
|
+
function l({ className: r, size: t = "default", ...a }) {
|
|
30
|
+
return /* @__PURE__ */ e(s.Provider, { value: { size: t }, children: /* @__PURE__ */ e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
"data-slot": "card",
|
|
34
34
|
className: o(
|
|
35
|
-
`bg-d-card text-d-card-foreground flex flex-col rounded-xl border shadow-sm ${d[t].py} ${d[t].gap}`,
|
|
36
|
-
|
|
35
|
+
`bg-d-card text-d-card-foreground border-d-border flex flex-col rounded-xl border shadow-sm ${d[t].py} ${d[t].gap}`,
|
|
36
|
+
r
|
|
37
37
|
),
|
|
38
|
-
...
|
|
38
|
+
...a
|
|
39
39
|
}
|
|
40
40
|
) });
|
|
41
41
|
}
|
|
42
|
-
function u({ className:
|
|
43
|
-
const { size:
|
|
44
|
-
return /* @__PURE__ */
|
|
42
|
+
function u({ className: r, ...t }) {
|
|
43
|
+
const { size: a } = n.useContext(s);
|
|
44
|
+
return /* @__PURE__ */ e(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
"data-slot": "card-header",
|
|
48
48
|
className: o(
|
|
49
|
-
`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 ${d[
|
|
50
|
-
|
|
49
|
+
`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 ${d[a].px} has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6 border-d-border`,
|
|
50
|
+
r
|
|
51
51
|
),
|
|
52
52
|
...t
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
function x({ className:
|
|
57
|
-
return /* @__PURE__ */
|
|
56
|
+
function x({ className: r, ...t }) {
|
|
57
|
+
return /* @__PURE__ */ e(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
"data-slot": "card-title",
|
|
61
|
-
className: o("leading-none font-semibold",
|
|
61
|
+
className: o("leading-none font-semibold", r),
|
|
62
62
|
...t
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
function f({ className:
|
|
67
|
-
return /* @__PURE__ */
|
|
66
|
+
function f({ className: r, ...t }) {
|
|
67
|
+
return /* @__PURE__ */ e(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
"data-slot": "card-description",
|
|
71
|
-
className: o("text-d-secondary-foreground text-sm",
|
|
71
|
+
className: o("text-d-secondary-foreground text-sm", r),
|
|
72
72
|
...t
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
function m({ className:
|
|
77
|
-
const { size:
|
|
78
|
-
return /* @__PURE__ */
|
|
76
|
+
function m({ className: r, ...t }) {
|
|
77
|
+
const { size: a } = n.useContext(s);
|
|
78
|
+
return /* @__PURE__ */ e(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
81
|
"data-slot": "card-content",
|
|
82
|
-
className: o(d[
|
|
82
|
+
className: o(d[a].px, r),
|
|
83
83
|
...t
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
|
-
function g({ className:
|
|
88
|
-
const { size:
|
|
89
|
-
return /* @__PURE__ */
|
|
87
|
+
function g({ className: r, ...t }) {
|
|
88
|
+
const { size: a } = n.useContext(s);
|
|
89
|
+
return /* @__PURE__ */ e(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
"data-slot": "card-footer",
|
|
93
93
|
className: o(
|
|
94
|
-
`flex items-center ${d[
|
|
95
|
-
|
|
94
|
+
`flex items-center ${d[a].px} [.border-t]:pt-6`,
|
|
95
|
+
r
|
|
96
96
|
),
|
|
97
97
|
...t
|
|
98
98
|
}
|
|
@@ -110,7 +110,7 @@ const x = C(
|
|
|
110
110
|
children: /* @__PURE__ */ e(h, { children: l.text })
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-d-foreground absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
|
|
113
|
+
m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-d-foreground border-d-border absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
|
|
114
114
|
] }),
|
|
115
115
|
c && n ? /* @__PURE__ */ e(
|
|
116
116
|
"time",
|
|
@@ -167,7 +167,7 @@ const F = ({ part: s }) => {
|
|
|
167
167
|
{
|
|
168
168
|
open: a,
|
|
169
169
|
onOpenChange: n,
|
|
170
|
-
className: "group bg-d-secondary/50 w-full overflow-hidden rounded-lg
|
|
170
|
+
className: "group bg-d-secondary/50 border-d-border w-full overflow-hidden rounded-lg",
|
|
171
171
|
children: [
|
|
172
172
|
/* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ r("button", { className: "text-d-secondary-foreground hover:text-d-foreground flex items-center gap-2 text-sm", children: [
|
|
173
173
|
/* @__PURE__ */ e(B, { className: "h-4 w-4 transition-transform group-data-[state=open]:rotate-90" }),
|
|
@@ -183,7 +183,7 @@ const F = ({ part: s }) => {
|
|
|
183
183
|
closed: { height: 0, opacity: 0 }
|
|
184
184
|
},
|
|
185
185
|
transition: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] },
|
|
186
|
-
className: "border-t",
|
|
186
|
+
className: "border-d-border border-t",
|
|
187
187
|
children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "text-xs whitespace-pre-wrap", children: s.reasoning }) })
|
|
188
188
|
}
|
|
189
189
|
) })
|
|
@@ -199,7 +199,7 @@ function y({
|
|
|
199
199
|
return /* @__PURE__ */ r(
|
|
200
200
|
"div",
|
|
201
201
|
{
|
|
202
|
-
className: "bg-d-secondary/50 text-d-secondary-foreground flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
|
|
202
|
+
className: "bg-d-secondary/50 text-d-secondary-foreground border-d-border flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
|
|
203
203
|
children: [
|
|
204
204
|
/* @__PURE__ */ e(M, { className: "h-4 w-4" }),
|
|
205
205
|
/* @__PURE__ */ r("span", { children: [
|
|
@@ -221,7 +221,7 @@ function y({
|
|
|
221
221
|
return /* @__PURE__ */ r(
|
|
222
222
|
"div",
|
|
223
223
|
{
|
|
224
|
-
className: "bg-d-secondary/50 text-d-secondary-foreground flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
|
|
224
|
+
className: "bg-d-secondary/50 text-d-secondary-foreground border-d-border flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
|
|
225
225
|
children: [
|
|
226
226
|
/* @__PURE__ */ e(I, { className: "h-4 w-4" }),
|
|
227
227
|
/* @__PURE__ */ r("span", { children: [
|
|
@@ -243,7 +243,7 @@ function y({
|
|
|
243
243
|
return /* @__PURE__ */ r(
|
|
244
244
|
"div",
|
|
245
245
|
{
|
|
246
|
-
className: "bg-d-secondary/50 flex flex-col gap-1.5 rounded-lg border px-3 py-2 text-sm",
|
|
246
|
+
className: "bg-d-secondary/50 border-d-border flex flex-col gap-1.5 rounded-lg border px-3 py-2 text-sm",
|
|
247
247
|
children: [
|
|
248
248
|
/* @__PURE__ */ r("div", { className: "text-d-secondary-foreground flex items-center gap-2", children: [
|
|
249
249
|
/* @__PURE__ */ e(R, { className: "h-4 w-4" }),
|