laif-ds 0.2.56 → 0.2.58
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/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/components/DataTable.md +331 -254
- package/dist/{lib → components}/design-tokens.js +2 -2
- package/dist/components/ui/app-kanban.js +1 -1
- package/dist/components/ui/app-radio-group.js +1 -1
- package/dist/components/ui/app-select.js +1 -1
- package/dist/components/ui/async-select.js +154 -142
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/date-picker.js +2 -8
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/{kanban.js → ui/kanban.js} +7 -7
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +10 -10
- package/dist/components/ui/tables/data-table/data-table.js +40 -38
- package/dist/components/ui/tables/data-table/data-table.utils.js +22 -19
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as l, Fragment as z } from "react/jsx-runtime";
|
|
3
3
|
import { useState as L } from "react";
|
|
4
|
-
import { KanbanBoardProvider as H, KanbanBoard as I, KanbanBoardColumn as P, KanbanBoardColumnHeader as S, KanbanBoardColumnList as A, KanbanBoardColumnListItem as F, KanbanBoardCard as J, KanbanBoardCardTitle as R, KanbanBoardCardDescription as W } from "
|
|
4
|
+
import { KanbanBoardProvider as H, KanbanBoard as I, KanbanBoardColumn as P, KanbanBoardColumnHeader as S, KanbanBoardColumnList as A, KanbanBoardColumnListItem as F, KanbanBoardCard as J, KanbanBoardCardTitle as R, KanbanBoardCardDescription as W } from "./kanban.js";
|
|
5
5
|
import { stringToHexColor as q, hexToRgba as E } from "../../lib/utils.js";
|
|
6
6
|
import { Button as G } from "./button.js";
|
|
7
7
|
import { Icon as Q } from "./icon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as r, jsx as t, Fragment as O } from "react/jsx-runtime";
|
|
3
|
-
import { designTokens as h } from "
|
|
3
|
+
import { designTokens as h } from "../design-tokens.js";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import { Icon as j } from "./icon.js";
|
|
6
6
|
import { Label as C } from "./label.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as l, Fragment as re } from "react/jsx-runtime";
|
|
3
|
+
import { designTokens as i } from "../design-tokens.js";
|
|
3
4
|
import { Badge as ne } from "./badge.js";
|
|
4
5
|
import { Command as te, CommandInput as se, CommandList as ie, CommandEmpty as oe, CommandGroup as R, CommandItem as A } from "./command.js";
|
|
5
6
|
import { Label as de } from "./label.js";
|
|
6
|
-
import { designTokens as i } from "../../lib/design-tokens.js";
|
|
7
7
|
import { cn as y } from "../../lib/utils.js";
|
|
8
8
|
import { useState as h, useRef as ce, useMemo as S, useCallback as ue, useEffect as me } from "react";
|
|
9
9
|
import { Checkbox as fe } from "./checkbox.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useDebounce as
|
|
2
|
+
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useDebounce as le } from "../../hooks/use-debounce.js";
|
|
4
4
|
import { cva as ie } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
-
import * as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { designTokens as u } from "
|
|
8
|
-
import { cn as
|
|
5
|
+
import * as k from "react";
|
|
6
|
+
import { useState as y, useEffect as A, useCallback as j } from "react";
|
|
7
|
+
import { designTokens as u } from "../design-tokens.js";
|
|
8
|
+
import { cn as z } from "../../lib/utils.js";
|
|
9
9
|
import { Checkbox as fe } from "./checkbox.js";
|
|
10
|
-
import { Command as me, CommandInput as ue, CommandList as he, CommandEmpty as ge, CommandGroup as
|
|
11
|
-
import { Icon as
|
|
10
|
+
import { Command as me, CommandInput as ue, CommandList as he, CommandEmpty as ge, CommandGroup as _, CommandItem as O } from "./command.js";
|
|
11
|
+
import { Icon as Z } from "./icon.js";
|
|
12
12
|
import { Label as pe } from "./label.js";
|
|
13
13
|
import { Popover as we, PopoverTrigger as xe, PopoverContent as ye } from "./popover.js";
|
|
14
14
|
import Ne from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
15
15
|
const be = ie(
|
|
16
|
-
|
|
16
|
+
z(
|
|
17
17
|
u.input.base,
|
|
18
18
|
u.radius.default,
|
|
19
19
|
u.interaction.disabled,
|
|
@@ -37,128 +37,140 @@ const be = ie(
|
|
|
37
37
|
function Fe({
|
|
38
38
|
fetcher: i,
|
|
39
39
|
initialOptions: t,
|
|
40
|
-
debounce:
|
|
41
|
-
renderOptionItem:
|
|
42
|
-
resolveOptionValue:
|
|
43
|
-
renderSelectedValue:
|
|
40
|
+
debounce: N = 300,
|
|
41
|
+
renderOptionItem: S,
|
|
42
|
+
resolveOptionValue: s,
|
|
43
|
+
renderSelectedValue: c,
|
|
44
44
|
notFound: h,
|
|
45
|
-
label:
|
|
45
|
+
label: C,
|
|
46
46
|
placeholder: f = "Select...",
|
|
47
47
|
value: n,
|
|
48
48
|
onChange: g,
|
|
49
|
-
disabled:
|
|
49
|
+
disabled: M = !1,
|
|
50
50
|
className: v,
|
|
51
|
-
wrpClassName:
|
|
52
|
-
noResultsMessage:
|
|
53
|
-
clearable:
|
|
54
|
-
multiple:
|
|
55
|
-
size:
|
|
51
|
+
wrpClassName: E,
|
|
52
|
+
noResultsMessage: I,
|
|
53
|
+
clearable: R = !0,
|
|
54
|
+
multiple: o = !1,
|
|
55
|
+
size: V
|
|
56
56
|
}) {
|
|
57
|
-
const [m,
|
|
58
|
-
t.map((e) => [
|
|
57
|
+
const [m, L] = y(!1), P = k.useRef(null), F = k.useRef(null), ee = k.useRef(null), [re, W] = y({ loading: !1, error: null }), [X, ne] = y(""), B = le(X, N), [$, te] = y(/* @__PURE__ */ new Map()), [G, K] = y([]), [q, se] = y(0), [H, J] = y(() => t?.length ? new Map(
|
|
58
|
+
t.map((e) => [s(e), e])
|
|
59
59
|
) : /* @__PURE__ */ new Map());
|
|
60
|
-
|
|
61
|
-
t?.length && (
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
}), G((e) => e.length ? e : t), Q((e) => {
|
|
65
|
-
const o = new Map(e);
|
|
66
|
-
return t.forEach((c) => o.set(a(c), c)), o;
|
|
60
|
+
A(() => {
|
|
61
|
+
t?.length && (K((e) => e.length ? e : t), J((e) => {
|
|
62
|
+
const p = new Map(e);
|
|
63
|
+
return t.forEach((a) => p.set(s(a), a)), p;
|
|
67
64
|
}));
|
|
68
|
-
}, [t,
|
|
69
|
-
const [
|
|
65
|
+
}, [t, s]);
|
|
66
|
+
const [D, Q] = y([]), T = j(
|
|
70
67
|
(e) => {
|
|
71
68
|
if (!e) {
|
|
72
|
-
|
|
69
|
+
Q([]);
|
|
73
70
|
return;
|
|
74
71
|
}
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
72
|
+
const a = (Array.isArray(e) ? e : [e]).map((l) => {
|
|
73
|
+
const d = H.get(l);
|
|
74
|
+
if (d) return d;
|
|
78
75
|
if (t?.length) {
|
|
79
|
-
const
|
|
80
|
-
(
|
|
76
|
+
const b = t.find(
|
|
77
|
+
(de) => s(de) === l
|
|
81
78
|
);
|
|
82
|
-
if (
|
|
79
|
+
if (b) return b;
|
|
83
80
|
}
|
|
84
|
-
return
|
|
85
|
-
(
|
|
81
|
+
return G.find(
|
|
82
|
+
(b) => s(b) === l
|
|
86
83
|
) ?? null;
|
|
87
84
|
}).filter(Boolean);
|
|
88
|
-
|
|
85
|
+
Q(a);
|
|
89
86
|
},
|
|
90
|
-
[
|
|
87
|
+
[H, s, t, G]
|
|
91
88
|
);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, [n,
|
|
95
|
-
const
|
|
96
|
-
|
|
89
|
+
A(() => {
|
|
90
|
+
T(n);
|
|
91
|
+
}, [n, T]);
|
|
92
|
+
const U = k.useMemo(() => o ? null : D[0] ?? null, [o, D]);
|
|
93
|
+
A(() => {
|
|
97
94
|
if (!m) return;
|
|
98
|
-
const e =
|
|
99
|
-
if (
|
|
100
|
-
|
|
95
|
+
const e = B || "";
|
|
96
|
+
if ($.has(e)) {
|
|
97
|
+
K($.get(e));
|
|
101
98
|
return;
|
|
102
99
|
}
|
|
103
100
|
(async () => {
|
|
104
101
|
try {
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
return
|
|
102
|
+
W({ loading: !0, error: null });
|
|
103
|
+
const a = await i(B), l = (() => {
|
|
104
|
+
if (!t?.length) return a;
|
|
105
|
+
const d = /* @__PURE__ */ new Map();
|
|
106
|
+
return t.forEach((w) => {
|
|
107
|
+
d.set(s(w), w);
|
|
108
|
+
}), a.forEach((w) => {
|
|
109
|
+
d.set(s(w), w);
|
|
110
|
+
}), Array.from(d.values());
|
|
111
|
+
})();
|
|
112
|
+
te((d) => new Map(d).set(e, l)), K(l), J((d) => {
|
|
113
|
+
const w = new Map(d);
|
|
114
|
+
return l.forEach((b) => w.set(s(b), b)), w;
|
|
110
115
|
});
|
|
111
|
-
} catch (
|
|
112
|
-
|
|
116
|
+
} catch (a) {
|
|
117
|
+
W({
|
|
113
118
|
loading: !1,
|
|
114
|
-
error:
|
|
119
|
+
error: a instanceof Error ? a.message : "Failed to fetch options"
|
|
115
120
|
});
|
|
116
121
|
} finally {
|
|
117
|
-
|
|
122
|
+
W((a) => ({ ...a, loading: !1 }));
|
|
118
123
|
}
|
|
119
124
|
})();
|
|
120
|
-
}, [
|
|
121
|
-
m
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
}, [
|
|
126
|
+
m,
|
|
127
|
+
B,
|
|
128
|
+
$,
|
|
129
|
+
i,
|
|
130
|
+
s,
|
|
131
|
+
t
|
|
132
|
+
]), A(() => {
|
|
133
|
+
m && T(n);
|
|
134
|
+
}, [m, T, n]), A(() => {
|
|
135
|
+
m && P.current && P.current.focus();
|
|
136
|
+
}, [m]), A(() => {
|
|
137
|
+
if (!m || !F.current) return;
|
|
138
|
+
const e = F.current.getBoundingClientRect();
|
|
127
139
|
se(e.width);
|
|
128
140
|
}, [m]);
|
|
129
141
|
const ce = j(
|
|
130
142
|
(e) => {
|
|
131
|
-
g?.(
|
|
143
|
+
g?.(R && e === n ? "" : e), L(!1);
|
|
132
144
|
},
|
|
133
|
-
[n, g,
|
|
145
|
+
[n, g, R]
|
|
134
146
|
), ae = j(
|
|
135
147
|
(e) => {
|
|
136
|
-
if (!
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
|
|
148
|
+
if (!o) return;
|
|
149
|
+
const p = Array.isArray(n) ? n : [], a = p.includes(e);
|
|
150
|
+
let l;
|
|
151
|
+
a ? l = p.filter((d) => d !== e) : l = [...p, e], g?.(l);
|
|
140
152
|
},
|
|
141
|
-
[n, g,
|
|
153
|
+
[n, g, o]
|
|
142
154
|
), oe = j(
|
|
143
155
|
(e) => {
|
|
144
|
-
e.stopPropagation(), e.preventDefault(), g?.(
|
|
156
|
+
e.stopPropagation(), e.preventDefault(), g?.(o ? [] : ""), L(!1);
|
|
145
157
|
},
|
|
146
158
|
[g]
|
|
147
|
-
),
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */
|
|
159
|
+
), Y = k.useId();
|
|
160
|
+
return /* @__PURE__ */ x("div", { className: z("flex flex-col gap-1.5", E), children: [
|
|
161
|
+
C && /* @__PURE__ */ r(pe, { htmlFor: Y, children: C }),
|
|
162
|
+
/* @__PURE__ */ x(we, { open: m, onOpenChange: L, children: [
|
|
151
163
|
/* @__PURE__ */ r(xe, { asChild: !0, children: /* @__PURE__ */ r(
|
|
152
164
|
"button",
|
|
153
165
|
{
|
|
154
|
-
id:
|
|
155
|
-
ref:
|
|
166
|
+
id: Y,
|
|
167
|
+
ref: F,
|
|
156
168
|
type: "button",
|
|
157
|
-
disabled:
|
|
158
|
-
className:
|
|
159
|
-
be({ size:
|
|
169
|
+
disabled: M,
|
|
170
|
+
className: z(
|
|
171
|
+
be({ size: V }),
|
|
160
172
|
"!border-d-border/50 border !shadow-none",
|
|
161
|
-
|
|
173
|
+
M && "cursor-not-allowed opacity-50",
|
|
162
174
|
"font-normal",
|
|
163
175
|
"w-full",
|
|
164
176
|
"w-full",
|
|
@@ -166,10 +178,10 @@ function Fe({
|
|
|
166
178
|
m && u.activeRing,
|
|
167
179
|
v
|
|
168
180
|
),
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
181
|
+
children: /* @__PURE__ */ x("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
|
|
182
|
+
o ? Array.isArray(n) && n.length > 0 ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: n.length === 1 ? D[0] && c(D[0]) : `${n.length} elementi selezionati` }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }) : U ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: c(U) }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }),
|
|
183
|
+
/* @__PURE__ */ x("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
|
|
184
|
+
R && (o && Array.isArray(n) && n.length > 0 || !o && U) && /* @__PURE__ */ r(
|
|
173
185
|
"div",
|
|
174
186
|
{
|
|
175
187
|
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
@@ -177,7 +189,7 @@ function Fe({
|
|
|
177
189
|
onMouseDown: (e) => e.preventDefault(),
|
|
178
190
|
"aria-label": "Clear selection",
|
|
179
191
|
children: /* @__PURE__ */ r(
|
|
180
|
-
|
|
192
|
+
Z,
|
|
181
193
|
{
|
|
182
194
|
name: "X",
|
|
183
195
|
size: "xs",
|
|
@@ -187,7 +199,7 @@ function Fe({
|
|
|
187
199
|
}
|
|
188
200
|
),
|
|
189
201
|
/* @__PURE__ */ r(
|
|
190
|
-
|
|
202
|
+
Z,
|
|
191
203
|
{
|
|
192
204
|
name: "ChevronsUpDown",
|
|
193
205
|
size: "xs",
|
|
@@ -201,8 +213,8 @@ function Fe({
|
|
|
201
213
|
/* @__PURE__ */ r(
|
|
202
214
|
ye,
|
|
203
215
|
{
|
|
204
|
-
className:
|
|
205
|
-
style: { width:
|
|
216
|
+
className: z("p-0"),
|
|
217
|
+
style: { width: q ? `${q}px` : void 0 },
|
|
206
218
|
align: "start",
|
|
207
219
|
side: "bottom",
|
|
208
220
|
sideOffset: 4,
|
|
@@ -211,20 +223,20 @@ function Fe({
|
|
|
211
223
|
children: /* @__PURE__ */ r(
|
|
212
224
|
Ae,
|
|
213
225
|
{
|
|
214
|
-
inputRef:
|
|
215
|
-
commandListRef:
|
|
226
|
+
inputRef: P,
|
|
227
|
+
commandListRef: ee,
|
|
216
228
|
placeholder: f,
|
|
217
229
|
searchTerm: X,
|
|
218
|
-
onSearchTermChange:
|
|
219
|
-
fetchState:
|
|
220
|
-
options:
|
|
230
|
+
onSearchTermChange: ne,
|
|
231
|
+
fetchState: re,
|
|
232
|
+
options: G,
|
|
221
233
|
notFound: h,
|
|
222
|
-
noResultsMessage:
|
|
223
|
-
multiple:
|
|
234
|
+
noResultsMessage: I,
|
|
235
|
+
multiple: o,
|
|
224
236
|
value: n,
|
|
225
|
-
resolveOptionValue:
|
|
226
|
-
renderSelectedValue:
|
|
227
|
-
renderOptionItem:
|
|
237
|
+
resolveOptionValue: s,
|
|
238
|
+
renderSelectedValue: c,
|
|
239
|
+
renderOptionItem: S,
|
|
228
240
|
onSelect: ce,
|
|
229
241
|
onSelectMultiple: ae
|
|
230
242
|
}
|
|
@@ -237,28 +249,28 @@ function Fe({
|
|
|
237
249
|
function Ce({
|
|
238
250
|
option: i,
|
|
239
251
|
multiple: t,
|
|
240
|
-
value:
|
|
241
|
-
resolveOptionValue:
|
|
242
|
-
renderSelectedValue:
|
|
243
|
-
renderOptionItem:
|
|
252
|
+
value: N,
|
|
253
|
+
resolveOptionValue: S,
|
|
254
|
+
renderSelectedValue: s,
|
|
255
|
+
renderOptionItem: c,
|
|
244
256
|
onSelect: h,
|
|
245
|
-
onSelectMultiple:
|
|
257
|
+
onSelectMultiple: C
|
|
246
258
|
}) {
|
|
247
|
-
const f =
|
|
259
|
+
const f = S(i);
|
|
248
260
|
let n = !1;
|
|
249
|
-
return t ? n = Array.isArray(
|
|
250
|
-
|
|
261
|
+
return t ? n = Array.isArray(N) && N.includes(f) : n = N === f, /* @__PURE__ */ r(
|
|
262
|
+
O,
|
|
251
263
|
{
|
|
252
264
|
value: f,
|
|
253
|
-
onSelect: t ?
|
|
254
|
-
className:
|
|
265
|
+
onSelect: t ? C : h,
|
|
266
|
+
className: z(
|
|
255
267
|
"cursor-pointer",
|
|
256
268
|
u.dropdownItem.hover,
|
|
257
|
-
|
|
269
|
+
n && u.dropdownItem.selected
|
|
258
270
|
),
|
|
259
|
-
children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between overflow-hidden", children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between overflow-hidden", children: /* @__PURE__ */ x("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
260
272
|
t && /* @__PURE__ */ r(fe, { checked: n }),
|
|
261
|
-
|
|
273
|
+
c ? /* @__PURE__ */ r("div", { className: "truncate", children: c(i) }) : /* @__PURE__ */ r("span", { className: "truncate", children: s(i) })
|
|
262
274
|
] }) })
|
|
263
275
|
},
|
|
264
276
|
f
|
|
@@ -267,58 +279,58 @@ function Ce({
|
|
|
267
279
|
function Ae({
|
|
268
280
|
inputRef: i,
|
|
269
281
|
commandListRef: t,
|
|
270
|
-
placeholder:
|
|
271
|
-
searchTerm:
|
|
272
|
-
onSearchTermChange:
|
|
273
|
-
fetchState:
|
|
282
|
+
placeholder: N,
|
|
283
|
+
searchTerm: S,
|
|
284
|
+
onSearchTermChange: s,
|
|
285
|
+
fetchState: c,
|
|
274
286
|
options: h,
|
|
275
|
-
notFound:
|
|
287
|
+
notFound: C,
|
|
276
288
|
noResultsMessage: f,
|
|
277
289
|
multiple: n,
|
|
278
290
|
value: g,
|
|
279
|
-
resolveOptionValue:
|
|
291
|
+
resolveOptionValue: M,
|
|
280
292
|
renderSelectedValue: v,
|
|
281
|
-
renderOptionItem:
|
|
282
|
-
onSelect:
|
|
283
|
-
onSelectMultiple:
|
|
293
|
+
renderOptionItem: E,
|
|
294
|
+
onSelect: I,
|
|
295
|
+
onSelectMultiple: R
|
|
284
296
|
}) {
|
|
285
|
-
return /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ x(me, { shouldFilter: !1, className: "w-full border-none shadow-sm", children: [
|
|
286
298
|
/* @__PURE__ */ r(
|
|
287
299
|
ue,
|
|
288
300
|
{
|
|
289
301
|
ref: i,
|
|
290
|
-
placeholder:
|
|
302
|
+
placeholder: N,
|
|
291
303
|
className: "placeholder:text-d-muted-foreground",
|
|
292
|
-
value:
|
|
293
|
-
onValueChange:
|
|
304
|
+
value: S,
|
|
305
|
+
onValueChange: s
|
|
294
306
|
}
|
|
295
307
|
),
|
|
296
|
-
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
!
|
|
301
|
-
!
|
|
308
|
+
c.loading && h.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ r(Ne, { className: "h-4 w-4 animate-spin" }) }),
|
|
309
|
+
/* @__PURE__ */ x(he, { ref: t, children: [
|
|
310
|
+
c.error && /* @__PURE__ */ r("div", { className: "text-d-destructive p-3 text-center", children: c.error }),
|
|
311
|
+
c.loading && h.length === 0 && /* @__PURE__ */ r(Se, {}),
|
|
312
|
+
!c.loading && !c.error && h.length === 0 && (C || /* @__PURE__ */ r(ge, { children: f || "No results found." })),
|
|
313
|
+
!c.loading && !c.error && h.length > 0 && /* @__PURE__ */ r(_, { children: h.map((o) => /* @__PURE__ */ r(
|
|
302
314
|
Ce,
|
|
303
315
|
{
|
|
304
|
-
option:
|
|
316
|
+
option: o,
|
|
305
317
|
multiple: n,
|
|
306
318
|
value: g,
|
|
307
|
-
resolveOptionValue:
|
|
319
|
+
resolveOptionValue: M,
|
|
308
320
|
renderSelectedValue: v,
|
|
309
|
-
renderOptionItem:
|
|
310
|
-
onSelect:
|
|
311
|
-
onSelectMultiple:
|
|
321
|
+
renderOptionItem: E,
|
|
322
|
+
onSelect: I,
|
|
323
|
+
onSelectMultiple: R
|
|
312
324
|
},
|
|
313
|
-
|
|
325
|
+
M(o)
|
|
314
326
|
)) })
|
|
315
327
|
] })
|
|
316
328
|
] });
|
|
317
329
|
}
|
|
318
330
|
function Se() {
|
|
319
|
-
return /* @__PURE__ */ r(
|
|
331
|
+
return /* @__PURE__ */ r(_, { children: [1, 2, 3].map((i) => /* @__PURE__ */ r(O, { disabled: !0, children: /* @__PURE__ */ x("div", { className: "flex w-full items-center gap-2", children: [
|
|
320
332
|
/* @__PURE__ */ r("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
|
|
321
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ x("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
322
334
|
/* @__PURE__ */ r("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
|
|
323
335
|
/* @__PURE__ */ r("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
|
|
324
336
|
] })
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as e, jsxs as v } from "react/jsx-runtime";
|
|
3
3
|
import { Root as p } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
4
|
import { cva as h } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
-
import { designTokens as t } from "
|
|
5
|
+
import { designTokens as t } from "../design-tokens.js";
|
|
6
6
|
import { cn as a } from "../../lib/utils.js";
|
|
7
7
|
import { Icon as u } from "./icon.js";
|
|
8
8
|
const b = h(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
import { Root as g } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
4
|
import { cva as f } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
-
import { designTokens as r } from "
|
|
5
|
+
import { designTokens as r } from "../design-tokens.js";
|
|
6
6
|
import { cn as d } from "../../lib/utils.js";
|
|
7
7
|
import { Icon as h } from "./icon.js";
|
|
8
8
|
const v = f(
|
|
@@ -67,7 +67,7 @@ function N({
|
|
|
67
67
|
className: d("relative", v({ variant: o, size: e, className: a })),
|
|
68
68
|
...s,
|
|
69
69
|
children: [
|
|
70
|
-
o !== "ghost" && o !== "ghost-destructive" && o !== "ghost-accent" && o !== "link" && /* @__PURE__ */ t("span", { className: "absolute inset-0 overflow-hidden rounded-[inherit]
|
|
70
|
+
o !== "ghost" && o !== "ghost-destructive" && o !== "ghost-accent" && o !== "link" && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-700 ease-out group-hover:translate-x-full" }) }),
|
|
71
71
|
m ? /* @__PURE__ */ l(
|
|
72
72
|
"svg",
|
|
73
73
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { designTokens as c } from "
|
|
3
|
+
import { designTokens as c } from "../design-tokens.js";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import * as n from "react";
|
|
6
6
|
const s = n.createContext({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { Checkbox as a, CheckboxIndicator as n } from "../../node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
4
|
-
import { designTokens as o } from "
|
|
4
|
+
import { designTokens as o } from "../design-tokens.js";
|
|
5
5
|
import { cn as s } from "../../lib/utils.js";
|
|
6
6
|
import c from "../../node_modules/lucide-react/dist/esm/icons/minus.js";
|
|
7
7
|
import m from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { designTokens as o } from "../design-tokens.js";
|
|
3
4
|
import { Calendar as T } from "./calendar.js";
|
|
4
5
|
import { Icon as E } from "./icon.js";
|
|
5
6
|
import { Label as L } from "./label.js";
|
|
6
7
|
import { Popover as q, PopoverTrigger as A, PopoverContent as B } from "./popover.js";
|
|
7
|
-
import { designTokens as o } from "../../lib/design-tokens.js";
|
|
8
8
|
import { cn as P } from "../../lib/utils.js";
|
|
9
9
|
import * as c from "react";
|
|
10
10
|
import { useEffect as F } from "react";
|
|
@@ -71,13 +71,7 @@ function v({
|
|
|
71
71
|
onClick: s ? void 0 : () => {
|
|
72
72
|
},
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */ t(
|
|
75
|
-
E,
|
|
76
|
-
{
|
|
77
|
-
name: "Calendar",
|
|
78
|
-
size: m === "lg" ? "sm" : "xs"
|
|
79
|
-
}
|
|
80
|
-
),
|
|
74
|
+
/* @__PURE__ */ t(E, { name: "Calendar", size: m === "lg" ? "sm" : "xs" }),
|
|
81
75
|
/* @__PURE__ */ t("div", { children: e && typeof e == "object" && "from" in e ? /* @__PURE__ */ f("span", { children: [
|
|
82
76
|
e.from && d(e.from, a),
|
|
83
77
|
e.from && e.to && " - ",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
3
3
|
import { Root as u, Content as m, Close as r, Description as f, Title as p, Trigger as x, Portal as v, Overlay as D } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
-
import { designTokens as l } from "
|
|
4
|
+
import { designTokens as l } from "../design-tokens.js";
|
|
5
5
|
import { cn as o } from "../../lib/utils.js";
|
|
6
6
|
import b from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
7
7
|
function j({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { designTokens as o } from "../design-tokens.js";
|
|
3
4
|
import { Label as se } from "./label.js";
|
|
4
|
-
import { designTokens as o } from "../../lib/design-tokens.js";
|
|
5
5
|
import { cn as n } from "../../lib/utils.js";
|
|
6
6
|
import { cva as j } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
7
7
|
import * as a from "react";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as d, jsxs as D, Fragment as A } from "react/jsx-runtime";
|
|
3
3
|
import { useId as E, useRef as R, useCallback as b, useMemo as M, createContext as $, useState as y, useEffect as O, useContext as S } from "react";
|
|
4
4
|
import { createPortal as I } from "react-dom";
|
|
5
|
-
import { Button as P } from "./
|
|
6
|
-
import { Popover as z, PopoverTrigger as L, PopoverContent as _ } from "./
|
|
7
|
-
import { TooltipProvider as j } from "./
|
|
8
|
-
import { Typo as k } from "./
|
|
9
|
-
import { cn as m } from "
|
|
10
|
-
import F from "
|
|
11
|
-
import H from "
|
|
5
|
+
import { Button as P } from "./button.js";
|
|
6
|
+
import { Popover as z, PopoverTrigger as L, PopoverContent as _ } from "./popover.js";
|
|
7
|
+
import { TooltipProvider as j } from "./tooltip.js";
|
|
8
|
+
import { Typo as k } from "./typo.js";
|
|
9
|
+
import { cn as m } from "../../lib/utils.js";
|
|
10
|
+
import F from "../../node_modules/lucide-react/dist/esm/icons/pencil.js";
|
|
11
|
+
import H from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js";
|
|
12
12
|
const T = $(void 0);
|
|
13
13
|
function J(e) {
|
|
14
14
|
const r = S(T);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { Root as d, Portal as i, Content as s, Trigger as p } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
4
|
-
import { designTokens as m } from "
|
|
4
|
+
import { designTokens as m } from "../design-tokens.js";
|
|
5
5
|
import { cn as f } from "../../lib/utils.js";
|
|
6
6
|
function v({
|
|
7
7
|
...o
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { Root as d, Item as s, Indicator as n } from "../../node_modules/@radix-ui/react-radio-group/dist/index.js";
|
|
4
|
-
import { designTokens as o } from "
|
|
4
|
+
import { designTokens as o } from "../design-tokens.js";
|
|
5
5
|
import { cn as a } from "../../lib/utils.js";
|
|
6
6
|
import l from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
7
7
|
function g({
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { Root as f, Portal as g, Content as x, Viewport as h, Group as v, Item as b, ItemIndicator as y, ItemText as S, Label as z, Separator as w, Trigger as N, Icon as C, Value as I, ScrollUpButton as _, ScrollDownButton as j } from "../../node_modules/@radix-ui/react-select/dist/index.js";
|
|
4
4
|
import * as u from "react";
|
|
5
|
+
import { designTokens as r } from "../design-tokens.js";
|
|
5
6
|
import { Label as k } from "./label.js";
|
|
6
|
-
import { designTokens as r } from "../../lib/design-tokens.js";
|
|
7
7
|
import { cn as o } from "../../lib/utils.js";
|
|
8
8
|
import B from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
9
9
|
import p from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|