@opencxh/ui-kit 3.57.1 → 3.57.2
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +632 -632
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,28 +2,28 @@ import { clsx as Ae } from "clsx";
|
|
|
2
2
|
import { jsxs as d, jsx as e, Fragment as Ee } from "react/jsx-runtime";
|
|
3
3
|
import { VideoOff as Ie, User as je, MicOff as Be, Mic as Pe, ChevronDown as _e, FileText as pe, HardDrive as we, X as Oe, ArrowLeft as Ne, Search as Ve, FolderPlus as Fe, Upload as We, Folder as Ce, ChevronDownIcon as Re, ChevronRight as qe } from "lucide-react";
|
|
4
4
|
import se, { useRef as X, useEffect as G, forwardRef as ce, useState as V, useCallback as ae, useMemo as ie, createContext as He, Component as Ue } from "react";
|
|
5
|
-
function
|
|
6
|
-
return Ae(
|
|
5
|
+
function b(...t) {
|
|
6
|
+
return Ae(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return (n,
|
|
8
|
+
function Gt(t) {
|
|
9
|
+
return (n, r) => t[n]?.[r] || "";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return (n) =>
|
|
11
|
+
function Kt(t) {
|
|
12
|
+
return (n) => t[n] || "";
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Jt({ tiles: t, pinned: n, className: r }) {
|
|
15
15
|
if (n)
|
|
16
|
-
return /* @__PURE__ */ d("div", { className:
|
|
16
|
+
return /* @__PURE__ */ d("div", { className: b("flex flex-col md:flex-row gap-2 h-full", r), children: [
|
|
17
17
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-[240px]", children: n }),
|
|
18
|
-
|
|
18
|
+
t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((s, c) => /* @__PURE__ */ e("div", { className: "min-w-[160px] md:min-w-0", children: s }, c)) })
|
|
19
19
|
] });
|
|
20
|
-
const a =
|
|
21
|
-
return /* @__PURE__ */ e("div", { className:
|
|
20
|
+
const a = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
21
|
+
return /* @__PURE__ */ e("div", { className: b("grid gap-2 h-full", a, r), children: t.map((s, c) => /* @__PURE__ */ e("div", { children: s }, c)) });
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
name:
|
|
23
|
+
function Yt({
|
|
24
|
+
name: t,
|
|
25
25
|
avatarUrl: n,
|
|
26
|
-
muted:
|
|
26
|
+
muted: r,
|
|
27
27
|
speaking: a,
|
|
28
28
|
hasVideo: s,
|
|
29
29
|
videoSlot: c,
|
|
@@ -32,36 +32,36 @@ function Yr({
|
|
|
32
32
|
return /* @__PURE__ */ d(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
className:
|
|
35
|
+
className: b(
|
|
36
36
|
"relative rounded-lg overflow-hidden bg-gray-800 aspect-video flex items-center justify-center",
|
|
37
37
|
a && "ring-2 ring-emerald-400",
|
|
38
38
|
h
|
|
39
39
|
),
|
|
40
40
|
children: [
|
|
41
|
-
s && c ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: c }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: n ? /* @__PURE__ */ e("img", { src: n, alt:
|
|
41
|
+
s && c ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: c }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: n ? /* @__PURE__ */ e("img", { src: n, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-gray-700 flex items-center justify-center", children: s ? /* @__PURE__ */ e(Ie, { className: "w-8 h-8" }) : /* @__PURE__ */ e(je, { className: "w-8 h-8" }) }) }),
|
|
42
42
|
/* @__PURE__ */ d("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-black/50 text-white text-xs", children: [
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children:
|
|
43
|
+
r ? /* @__PURE__ */ e(Be, { className: "w-3 h-3" }) : /* @__PURE__ */ e(Pe, { className: "w-3 h-3" }),
|
|
44
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children: t })
|
|
45
45
|
] })
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Zt({ attach: t, active: n = !0, mirrored: r = !1, className: a }) {
|
|
51
51
|
const s = X(null);
|
|
52
52
|
return G(() => {
|
|
53
53
|
if (!n || !s.current) return;
|
|
54
|
-
const c =
|
|
54
|
+
const c = t(s.current);
|
|
55
55
|
return () => {
|
|
56
56
|
typeof c == "function" && c(), s.current && (s.current.innerHTML = "");
|
|
57
57
|
};
|
|
58
|
-
}, [
|
|
58
|
+
}, [t, n]), /* @__PURE__ */ e(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
61
|
ref: s,
|
|
62
|
-
className:
|
|
62
|
+
className: b(
|
|
63
63
|
"w-full h-full bg-gray-900 overflow-hidden",
|
|
64
|
-
|
|
64
|
+
r && "[&>*]:scale-x-[-1]",
|
|
65
65
|
a
|
|
66
66
|
)
|
|
67
67
|
}
|
|
@@ -89,14 +89,14 @@ const Ge = {
|
|
|
89
89
|
full: "p-4"
|
|
90
90
|
}, ee = ce(
|
|
91
91
|
({
|
|
92
|
-
variant:
|
|
92
|
+
variant: t = "primary",
|
|
93
93
|
size: n = "md",
|
|
94
|
-
fullWidth:
|
|
94
|
+
fullWidth: r = !1,
|
|
95
95
|
loading: a = !1,
|
|
96
96
|
leftIcon: s,
|
|
97
97
|
rightIcon: c,
|
|
98
98
|
iconOnly: h = !1,
|
|
99
|
-
className:
|
|
99
|
+
className: g,
|
|
100
100
|
children: p,
|
|
101
101
|
disabled: y,
|
|
102
102
|
...u
|
|
@@ -107,19 +107,19 @@ const Ge = {
|
|
|
107
107
|
{
|
|
108
108
|
ref: l,
|
|
109
109
|
type: "button",
|
|
110
|
-
className:
|
|
110
|
+
className: b(
|
|
111
111
|
// Base styles — radius/focus/colors come from the token-driven `.btn o__*` CSS
|
|
112
112
|
"inline-flex items-center justify-center transition-colors duration-200",
|
|
113
113
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
114
114
|
// Variant styles
|
|
115
|
-
Ge[
|
|
115
|
+
Ge[t],
|
|
116
116
|
// Size styles
|
|
117
117
|
h ? Je[n] : Ke[n],
|
|
118
118
|
// Full width
|
|
119
|
-
|
|
119
|
+
r && "w-full",
|
|
120
120
|
// Loading state
|
|
121
121
|
a && "cursor-wait",
|
|
122
|
-
|
|
122
|
+
g
|
|
123
123
|
),
|
|
124
124
|
disabled: i,
|
|
125
125
|
...u,
|
|
@@ -127,7 +127,7 @@ const Ge = {
|
|
|
127
127
|
a && /* @__PURE__ */ d(
|
|
128
128
|
"svg",
|
|
129
129
|
{
|
|
130
|
-
className:
|
|
130
|
+
className: b(
|
|
131
131
|
"animate-spin",
|
|
132
132
|
h ? "h-4 w-4" : "h-4 w-4 mr-2"
|
|
133
133
|
),
|
|
@@ -156,9 +156,9 @@ const Ge = {
|
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
),
|
|
159
|
-
!a && s && /* @__PURE__ */ e("span", { className:
|
|
159
|
+
!a && s && /* @__PURE__ */ e("span", { className: b("flex-shrink-0", !h && "mr-2"), children: s }),
|
|
160
160
|
!h && p,
|
|
161
|
-
!a && c && /* @__PURE__ */ e("span", { className:
|
|
161
|
+
!a && c && /* @__PURE__ */ e("span", { className: b("flex-shrink-0", !h && "ml-2"), children: c }),
|
|
162
162
|
h && !a && !s && !c && p
|
|
163
163
|
]
|
|
164
164
|
}
|
|
@@ -166,28 +166,28 @@ const Ge = {
|
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
ee.displayName = "Button";
|
|
169
|
-
const
|
|
170
|
-
children:
|
|
169
|
+
const Xt = ({
|
|
170
|
+
children: t,
|
|
171
171
|
size: n = "md",
|
|
172
|
-
orientation:
|
|
172
|
+
orientation: r = "horizontal",
|
|
173
173
|
attached: a = !0,
|
|
174
174
|
className: s
|
|
175
175
|
}) => {
|
|
176
|
-
const c =
|
|
176
|
+
const c = b(
|
|
177
177
|
"inline-flex",
|
|
178
178
|
{
|
|
179
179
|
// Orientation
|
|
180
|
-
"flex-row":
|
|
181
|
-
"flex-col":
|
|
180
|
+
"flex-row": r === "horizontal",
|
|
181
|
+
"flex-col": r === "vertical",
|
|
182
182
|
// Attached styling
|
|
183
183
|
"[&>*:not(:first-child):not(:last-child)]:rounded-none": a,
|
|
184
|
-
"[&>*:first-child]:rounded-r-none": a &&
|
|
185
|
-
"[&>*:last-child]:rounded-l-none": a &&
|
|
186
|
-
"[&>*:first-child]:rounded-b-none": a &&
|
|
187
|
-
"[&>*:last-child]:rounded-t-none": a &&
|
|
184
|
+
"[&>*:first-child]:rounded-r-none": a && r === "horizontal",
|
|
185
|
+
"[&>*:last-child]:rounded-l-none": a && r === "horizontal",
|
|
186
|
+
"[&>*:first-child]:rounded-b-none": a && r === "vertical",
|
|
187
|
+
"[&>*:last-child]:rounded-t-none": a && r === "vertical",
|
|
188
188
|
// Borders for attached buttons
|
|
189
|
-
"[&>*:not(:first-child)]:-ml-px": a &&
|
|
190
|
-
"[&>*:not(:first-child)]:-mt-px": a &&
|
|
189
|
+
"[&>*:not(:first-child)]:-ml-px": a && r === "horizontal",
|
|
190
|
+
"[&>*:not(:first-child)]:-mt-px": a && r === "vertical",
|
|
191
191
|
// Spacing for non-attached buttons
|
|
192
192
|
"gap-1": !a && n === "xs",
|
|
193
193
|
"gap-2": !a && (n === "sm" || n === "md"),
|
|
@@ -195,21 +195,21 @@ const Xr = ({
|
|
|
195
195
|
},
|
|
196
196
|
s
|
|
197
197
|
);
|
|
198
|
-
return /* @__PURE__ */ e("div", { className: c, role: "group", children:
|
|
199
|
-
},
|
|
200
|
-
variant:
|
|
198
|
+
return /* @__PURE__ */ e("div", { className: c, role: "group", children: t });
|
|
199
|
+
}, Qt = ({
|
|
200
|
+
variant: t = "default",
|
|
201
201
|
size: n = "md",
|
|
202
|
-
color:
|
|
202
|
+
color: r = "primary",
|
|
203
203
|
disabled: a = !1,
|
|
204
204
|
external: s = !1,
|
|
205
205
|
className: c,
|
|
206
206
|
children: h,
|
|
207
|
-
href:
|
|
207
|
+
href: g,
|
|
208
208
|
target: p,
|
|
209
209
|
rel: y,
|
|
210
210
|
...u
|
|
211
211
|
}) => {
|
|
212
|
-
const l = s ||
|
|
212
|
+
const l = s || g && (g.startsWith("http") || g.startsWith("mailto:")), i = b(
|
|
213
213
|
// Base styles
|
|
214
214
|
"inline-flex items-center gap-1 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
215
215
|
// Size variants
|
|
@@ -223,40 +223,40 @@ const Xr = ({
|
|
|
223
223
|
// Color variants
|
|
224
224
|
{
|
|
225
225
|
// Primary
|
|
226
|
-
"text-primary hover:text-primary/80 focus:ring-primary/20":
|
|
226
|
+
"text-primary hover:text-primary/80 focus:ring-primary/20": r === "primary" && !a,
|
|
227
227
|
// Secondary
|
|
228
|
-
"text-secondary hover:text-secondary/80 focus:ring-secondary/20":
|
|
228
|
+
"text-secondary hover:text-secondary/80 focus:ring-secondary/20": r === "secondary" && !a,
|
|
229
229
|
// Accent
|
|
230
|
-
"text-accent hover:text-accent/80 focus:ring-accent/20":
|
|
230
|
+
"text-accent hover:text-accent/80 focus:ring-accent/20": r === "accent" && !a,
|
|
231
231
|
// Success
|
|
232
|
-
"text-success hover:text-success/80 focus:ring-success/20":
|
|
232
|
+
"text-success hover:text-success/80 focus:ring-success/20": r === "success" && !a,
|
|
233
233
|
// Warning
|
|
234
|
-
"text-warning hover:text-warning/80 focus:ring-warning/20":
|
|
234
|
+
"text-warning hover:text-warning/80 focus:ring-warning/20": r === "warning" && !a,
|
|
235
235
|
// Error
|
|
236
|
-
"text-error hover:text-error/80 focus:ring-error/20":
|
|
236
|
+
"text-error hover:text-error/80 focus:ring-error/20": r === "error" && !a,
|
|
237
237
|
// Info
|
|
238
|
-
"text-info hover:text-info/80 focus:ring-info/20":
|
|
238
|
+
"text-info hover:text-info/80 focus:ring-info/20": r === "info" && !a,
|
|
239
239
|
// Neutral
|
|
240
|
-
"text-neutral hover:text-neutral/80 focus:ring-neutral/20":
|
|
240
|
+
"text-neutral hover:text-neutral/80 focus:ring-neutral/20": r === "neutral" && !a
|
|
241
241
|
},
|
|
242
242
|
// Variant styles
|
|
243
243
|
{
|
|
244
244
|
// Default - just colored text
|
|
245
|
-
"":
|
|
245
|
+
"": t === "default",
|
|
246
246
|
// Subtle - muted colors
|
|
247
|
-
"text-opacity-70 hover:text-opacity-100":
|
|
247
|
+
"text-opacity-70 hover:text-opacity-100": t === "subtle",
|
|
248
248
|
// Underline - always underlined
|
|
249
|
-
"underline underline-offset-2 decoration-1 hover:decoration-2":
|
|
249
|
+
"underline underline-offset-2 decoration-1 hover:decoration-2": t === "underline",
|
|
250
250
|
// Button - looks like a button
|
|
251
|
-
"px-3 py-1.5 rounded-md bg-opacity-10 hover:bg-opacity-20":
|
|
252
|
-
"bg-primary":
|
|
253
|
-
"bg-secondary":
|
|
254
|
-
"bg-accent":
|
|
255
|
-
"bg-success":
|
|
256
|
-
"bg-warning":
|
|
257
|
-
"bg-error":
|
|
258
|
-
"bg-info":
|
|
259
|
-
"bg-neutral":
|
|
251
|
+
"px-3 py-1.5 rounded-md bg-opacity-10 hover:bg-opacity-20": t === "button",
|
|
252
|
+
"bg-primary": t === "button" && r === "primary",
|
|
253
|
+
"bg-secondary": t === "button" && r === "secondary",
|
|
254
|
+
"bg-accent": t === "button" && r === "accent",
|
|
255
|
+
"bg-success": t === "button" && r === "success",
|
|
256
|
+
"bg-warning": t === "button" && r === "warning",
|
|
257
|
+
"bg-error": t === "button" && r === "error",
|
|
258
|
+
"bg-info": t === "button" && r === "info",
|
|
259
|
+
"bg-neutral": t === "button" && r === "neutral"
|
|
260
260
|
},
|
|
261
261
|
// Disabled state
|
|
262
262
|
{
|
|
@@ -265,7 +265,7 @@ const Xr = ({
|
|
|
265
265
|
c
|
|
266
266
|
), f = {
|
|
267
267
|
...u,
|
|
268
|
-
href: a ? void 0 :
|
|
268
|
+
href: a ? void 0 : g,
|
|
269
269
|
target: l ? "_blank" : p,
|
|
270
270
|
rel: l ? "noopener noreferrer" : y
|
|
271
271
|
};
|
|
@@ -300,15 +300,15 @@ const Xr = ({
|
|
|
300
300
|
md: "px-4 py-2 text-sm"
|
|
301
301
|
};
|
|
302
302
|
function $e({
|
|
303
|
-
label:
|
|
303
|
+
label: t,
|
|
304
304
|
onClick: n,
|
|
305
|
-
variant:
|
|
305
|
+
variant: r = "primary",
|
|
306
306
|
size: a = "md",
|
|
307
307
|
icon: s,
|
|
308
308
|
options: c,
|
|
309
309
|
disabled: h = !1
|
|
310
310
|
}) {
|
|
311
|
-
const [
|
|
311
|
+
const [g, p] = V(!1), y = X(null), u = ae(() => {
|
|
312
312
|
p((l) => !l);
|
|
313
313
|
}, []);
|
|
314
314
|
return G(() => {
|
|
@@ -323,17 +323,17 @@ function $e({
|
|
|
323
323
|
type: "button",
|
|
324
324
|
onClick: n,
|
|
325
325
|
disabled: h,
|
|
326
|
-
className:
|
|
326
|
+
className: b(
|
|
327
327
|
"inline-flex items-center justify-center font-medium transition-colors duration-200",
|
|
328
328
|
"focus:outline-none focus:ring-1 focus:ring-offset-1",
|
|
329
329
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
330
|
-
Se[
|
|
330
|
+
Se[r],
|
|
331
331
|
Ye[a],
|
|
332
332
|
"!rounded-r-none"
|
|
333
333
|
),
|
|
334
334
|
children: [
|
|
335
335
|
s && /* @__PURE__ */ e("span", { className: "mr-2 flex-shrink-0", children: s }),
|
|
336
|
-
|
|
336
|
+
t
|
|
337
337
|
]
|
|
338
338
|
}
|
|
339
339
|
),
|
|
@@ -343,25 +343,25 @@ function $e({
|
|
|
343
343
|
type: "button",
|
|
344
344
|
onClick: u,
|
|
345
345
|
disabled: h,
|
|
346
|
-
className:
|
|
346
|
+
className: b(
|
|
347
347
|
"inline-flex items-center justify-center font-medium transition-colors duration-200",
|
|
348
348
|
"focus:outline-none focus:ring-1 focus:ring-offset-1",
|
|
349
349
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
350
|
-
Se[
|
|
350
|
+
Se[r],
|
|
351
351
|
a === "sm" ? "px-1.5 py-1.5" : "px-2 py-2",
|
|
352
352
|
"!rounded-l-none"
|
|
353
353
|
),
|
|
354
354
|
children: /* @__PURE__ */ e(_e, { className: "h-4 w-4" })
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
|
-
|
|
357
|
+
g && c.length > 0 && /* @__PURE__ */ e("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-lg border border-gray-200 bg-white shadow-lg py-1", children: c.map((l) => /* @__PURE__ */ e(
|
|
358
358
|
"button",
|
|
359
359
|
{
|
|
360
360
|
type: "button",
|
|
361
361
|
onClick: () => {
|
|
362
362
|
l.onClick(), p(!1);
|
|
363
363
|
},
|
|
364
|
-
className:
|
|
364
|
+
className: b(
|
|
365
365
|
"w-full text-left px-3 py-2 text-sm hover:bg-gray-50 transition-colors",
|
|
366
366
|
l.variant === "destructive" ? "text-red-600 hover:bg-red-50" : "text-gray-700"
|
|
367
367
|
),
|
|
@@ -381,23 +381,23 @@ const Ze = {
|
|
|
381
381
|
md: "text-sm",
|
|
382
382
|
lg: "text-base",
|
|
383
383
|
full: "text-base"
|
|
384
|
-
},
|
|
384
|
+
}, ge = ce(
|
|
385
385
|
({
|
|
386
|
-
label:
|
|
386
|
+
label: t,
|
|
387
387
|
helperText: n,
|
|
388
|
-
error:
|
|
388
|
+
error: r,
|
|
389
389
|
size: a = "md",
|
|
390
390
|
indeterminate: s = !1,
|
|
391
391
|
containerClassName: c,
|
|
392
392
|
labelClassName: h,
|
|
393
|
-
className:
|
|
393
|
+
className: g,
|
|
394
394
|
id: p,
|
|
395
395
|
...y
|
|
396
396
|
}, u) => {
|
|
397
|
-
const l = p || `checkbox-${Math.random().toString(36).substr(2, 9)}`, i = !!
|
|
397
|
+
const l = p || `checkbox-${Math.random().toString(36).substr(2, 9)}`, i = !!r;
|
|
398
398
|
return se.useEffect(() => {
|
|
399
399
|
u && typeof u == "object" && u.current && (u.current.indeterminate = s);
|
|
400
|
-
}, [s, u]), /* @__PURE__ */ d("div", { className:
|
|
400
|
+
}, [s, u]), /* @__PURE__ */ d("div", { className: b("flex flex-col", c), children: [
|
|
401
401
|
/* @__PURE__ */ d("div", { className: "flex items-start", children: [
|
|
402
402
|
/* @__PURE__ */ e("div", { className: "flex items-center h-5", children: /* @__PURE__ */ e(
|
|
403
403
|
"input",
|
|
@@ -405,7 +405,7 @@ const Ze = {
|
|
|
405
405
|
ref: u,
|
|
406
406
|
id: l,
|
|
407
407
|
type: "checkbox",
|
|
408
|
-
className:
|
|
408
|
+
className: b(
|
|
409
409
|
// Base styles
|
|
410
410
|
"rounded border transition-colors duration-200",
|
|
411
411
|
"focus:ring-2 focus:ring-offset-2 focus:outline-none",
|
|
@@ -414,46 +414,46 @@ const Ze = {
|
|
|
414
414
|
Ze[a],
|
|
415
415
|
// State styles
|
|
416
416
|
i ? "border-error text-error focus:border-error focus:ring-error" : "border-gray-100 text-primary focus:border-primary focus:ring-primary dark:border-gray-600 dark:bg-secondary-800",
|
|
417
|
-
|
|
417
|
+
g
|
|
418
418
|
),
|
|
419
419
|
...y
|
|
420
420
|
}
|
|
421
421
|
) }),
|
|
422
|
-
|
|
422
|
+
t && /* @__PURE__ */ d("div", { className: "ml-3 flex-1", children: [
|
|
423
423
|
/* @__PURE__ */ e(
|
|
424
424
|
"label",
|
|
425
425
|
{
|
|
426
426
|
htmlFor: l,
|
|
427
|
-
className:
|
|
427
|
+
className: b(
|
|
428
428
|
"font-medium cursor-pointer",
|
|
429
429
|
i ? "text-error" : "text-secondary-900 dark:text-secondary-100",
|
|
430
430
|
Xe[a],
|
|
431
431
|
h
|
|
432
432
|
),
|
|
433
|
-
children:
|
|
433
|
+
children: t
|
|
434
434
|
}
|
|
435
435
|
),
|
|
436
|
-
n && !
|
|
436
|
+
n && !r && /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-secondary-500 dark:text-secondary-400", children: n })
|
|
437
437
|
] })
|
|
438
438
|
] }),
|
|
439
|
-
|
|
439
|
+
r && /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-error", children: r })
|
|
440
440
|
] });
|
|
441
441
|
}
|
|
442
442
|
);
|
|
443
|
-
|
|
444
|
-
const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
|
|
445
|
-
value:
|
|
443
|
+
ge.displayName = "Checkbox";
|
|
444
|
+
const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), et = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m15 18-6-6 6-6" }) }), tt = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m9 18 6-6-6-6" }) }), ye = ce(({
|
|
445
|
+
value: t,
|
|
446
446
|
onChange: n,
|
|
447
|
-
placeholder:
|
|
447
|
+
placeholder: r = "Select date",
|
|
448
448
|
disabled: a = !1,
|
|
449
449
|
required: s = !1,
|
|
450
450
|
size: c = "md",
|
|
451
451
|
className: h,
|
|
452
|
-
minDate:
|
|
452
|
+
minDate: g,
|
|
453
453
|
maxDate: p,
|
|
454
454
|
format: y = "MM/dd/yyyy"
|
|
455
455
|
}, u) => {
|
|
456
|
-
const [l, i] = V(!1), [f, C] = V(() =>
|
|
456
|
+
const [l, i] = V(!1), [f, C] = V(() => t || /* @__PURE__ */ new Date()), N = X(null);
|
|
457
457
|
G(() => {
|
|
458
458
|
const z = (v) => {
|
|
459
459
|
N.current && !N.current.contains(v.target) && i(!1);
|
|
@@ -482,14 +482,14 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
482
482
|
$.push(new Date(L)), L.setDate(L.getDate() + 1);
|
|
483
483
|
return $;
|
|
484
484
|
}, x = (z) => {
|
|
485
|
-
z.getMonth() === f.getMonth() && (
|
|
485
|
+
z.getMonth() === f.getMonth() && (g && z < g || p && z > p || (n?.(z), i(!1)));
|
|
486
486
|
}, q = () => {
|
|
487
487
|
C(new Date(f.getFullYear(), f.getMonth() - 1, 1));
|
|
488
488
|
}, K = () => {
|
|
489
489
|
C(new Date(f.getFullYear(), f.getMonth() + 1, 1));
|
|
490
490
|
}, H = () => {
|
|
491
491
|
n?.(null), i(!1);
|
|
492
|
-
}, F =
|
|
492
|
+
}, F = b(
|
|
493
493
|
"w-full border border-neutral-100 dark:border-neutral-600 rounded-md transition-colors duration-200",
|
|
494
494
|
"bg-white dark:bg-neutral-800 text-gray-700 dark:text-gray-300",
|
|
495
495
|
"placeholder:text-gray-800 dark:placeholder:text-gray-500",
|
|
@@ -523,13 +523,13 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
523
523
|
{
|
|
524
524
|
ref: u,
|
|
525
525
|
type: "text",
|
|
526
|
-
value: k(
|
|
527
|
-
placeholder:
|
|
526
|
+
value: k(t ?? null),
|
|
527
|
+
placeholder: r,
|
|
528
528
|
disabled: a,
|
|
529
529
|
required: s,
|
|
530
530
|
readOnly: !0,
|
|
531
531
|
onClick: () => !a && i(!l),
|
|
532
|
-
className:
|
|
532
|
+
className: b(F, "pr-10 cursor-pointer")
|
|
533
533
|
}
|
|
534
534
|
),
|
|
535
535
|
/* @__PURE__ */ e(
|
|
@@ -550,7 +550,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
550
550
|
{
|
|
551
551
|
onClick: q,
|
|
552
552
|
className: "p-1 hover:bg-neutral-100 dark:hover:bg-neutral-700 rounded",
|
|
553
|
-
children: /* @__PURE__ */ e(
|
|
553
|
+
children: /* @__PURE__ */ e(et, {})
|
|
554
554
|
}
|
|
555
555
|
),
|
|
556
556
|
/* @__PURE__ */ d("h3", { className: "text-sm font-medium text-neutral-900 dark:text-neutral-100", children: [
|
|
@@ -563,19 +563,19 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
563
563
|
{
|
|
564
564
|
onClick: K,
|
|
565
565
|
className: "p-1 hover:bg-neutral-100 dark:hover:bg-neutral-700 rounded",
|
|
566
|
-
children: /* @__PURE__ */ e(
|
|
566
|
+
children: /* @__PURE__ */ e(tt, {})
|
|
567
567
|
}
|
|
568
568
|
)
|
|
569
569
|
] }),
|
|
570
570
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((z) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-neutral-500 dark:text-neutral-400 text-center py-1", children: z }, z)) }),
|
|
571
571
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: E.map((z, v) => {
|
|
572
|
-
const T = z.getMonth() === f.getMonth(), m =
|
|
572
|
+
const T = z.getMonth() === f.getMonth(), m = t && z.toDateString() === t.toDateString(), $ = z.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), L = !T || g && z < g || p && z > p;
|
|
573
573
|
return /* @__PURE__ */ e(
|
|
574
574
|
"button",
|
|
575
575
|
{
|
|
576
576
|
onClick: () => !L && x(z),
|
|
577
577
|
disabled: L,
|
|
578
|
-
className:
|
|
578
|
+
className: b(
|
|
579
579
|
"w-8 h-8 text-sm rounded transition-colors duration-200",
|
|
580
580
|
{
|
|
581
581
|
"text-neutral-900 dark:text-neutral-100 hover:bg-neutral-100 dark:hover:bg-neutral-700": T && !m && !L,
|
|
@@ -609,10 +609,10 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
609
609
|
] })
|
|
610
610
|
] })
|
|
611
611
|
] });
|
|
612
|
-
}), de = (...
|
|
612
|
+
}), de = (...t) => t.filter(Boolean).join(" "), rt = (t) => /* @__PURE__ */ e(
|
|
613
613
|
"svg",
|
|
614
614
|
{
|
|
615
|
-
...
|
|
615
|
+
...t,
|
|
616
616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
617
617
|
fill: "none",
|
|
618
618
|
viewBox: "0 0 24 24",
|
|
@@ -627,10 +627,10 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
627
627
|
}
|
|
628
628
|
)
|
|
629
629
|
}
|
|
630
|
-
),
|
|
630
|
+
), at = (t) => /* @__PURE__ */ e(
|
|
631
631
|
"svg",
|
|
632
632
|
{
|
|
633
|
-
...
|
|
633
|
+
...t,
|
|
634
634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
635
635
|
fill: "none",
|
|
636
636
|
viewBox: "0 0 24 24",
|
|
@@ -645,7 +645,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
645
645
|
}
|
|
646
646
|
)
|
|
647
647
|
}
|
|
648
|
-
),
|
|
648
|
+
), nt = {
|
|
649
649
|
sm: "px-3 py-1.5 text-sm",
|
|
650
650
|
md: "px-3 py-2 text-sm",
|
|
651
651
|
lg: "px-3 py-2 text-sm",
|
|
@@ -655,16 +655,16 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
655
655
|
md: "h-5 w-5",
|
|
656
656
|
lg: "h-6 w-6",
|
|
657
657
|
full: "h-6 w-6"
|
|
658
|
-
},
|
|
658
|
+
}, lt = ce(
|
|
659
659
|
({
|
|
660
|
-
label:
|
|
660
|
+
label: t,
|
|
661
661
|
helperText: n,
|
|
662
|
-
error:
|
|
662
|
+
error: r,
|
|
663
663
|
size: a = "md",
|
|
664
664
|
fullWidth: s = !1,
|
|
665
|
-
startIcon: c = /* @__PURE__ */ e(
|
|
665
|
+
startIcon: c = /* @__PURE__ */ e(rt, {}),
|
|
666
666
|
loading: h = !1,
|
|
667
|
-
containerClassName:
|
|
667
|
+
containerClassName: g,
|
|
668
668
|
labelClassName: p,
|
|
669
669
|
className: y,
|
|
670
670
|
id: u,
|
|
@@ -676,7 +676,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
676
676
|
onChange: k,
|
|
677
677
|
...B
|
|
678
678
|
}, x) => {
|
|
679
|
-
const q = u || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!
|
|
679
|
+
const q = u || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!r, H = X(null), F = X(null), [E, J] = V(N || ""), [z, v] = V(!1), [T, m] = V(!1);
|
|
680
680
|
G(() => {
|
|
681
681
|
N !== void 0 && J(N);
|
|
682
682
|
}, [N]);
|
|
@@ -718,19 +718,19 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
718
718
|
J(W.label), v(!1), f && f(W.value);
|
|
719
719
|
}, P = () => {
|
|
720
720
|
(l.length > 0 || i) && v(!0);
|
|
721
|
-
}, M = h || T,
|
|
721
|
+
}, M = h || T, te = z && ($.length > 0 || M), ne = ie(() => x || F, [x]);
|
|
722
722
|
return /* @__PURE__ */ d(
|
|
723
723
|
"div",
|
|
724
724
|
{
|
|
725
725
|
className: de(
|
|
726
726
|
"flex flex-col",
|
|
727
727
|
s ? "w-full" : "",
|
|
728
|
-
|
|
728
|
+
g || "",
|
|
729
729
|
"relative"
|
|
730
730
|
),
|
|
731
731
|
ref: H,
|
|
732
732
|
children: [
|
|
733
|
-
|
|
733
|
+
t && /* @__PURE__ */ e(
|
|
734
734
|
"label",
|
|
735
735
|
{
|
|
736
736
|
htmlFor: q,
|
|
@@ -739,7 +739,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
739
739
|
K ? "text-red-500" : "text-gray-700 dark:text-gray-300",
|
|
740
740
|
p || ""
|
|
741
741
|
),
|
|
742
|
-
children:
|
|
742
|
+
children: t
|
|
743
743
|
}
|
|
744
744
|
),
|
|
745
745
|
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
@@ -758,7 +758,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
758
758
|
"placeholder-gray-500 dark:placeholder-gray-500 focus:outline-none",
|
|
759
759
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
760
760
|
// Size styles
|
|
761
|
-
|
|
761
|
+
nt[a],
|
|
762
762
|
// Icon padding
|
|
763
763
|
c ? "pl-10" : "",
|
|
764
764
|
"pr-10",
|
|
@@ -805,7 +805,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
805
805
|
) : (
|
|
806
806
|
// Dropdown Chevron
|
|
807
807
|
/* @__PURE__ */ e(
|
|
808
|
-
|
|
808
|
+
at,
|
|
809
809
|
{
|
|
810
810
|
className: de(
|
|
811
811
|
"text-gray-400 cursor-pointer transition-transform",
|
|
@@ -817,7 +817,7 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
817
817
|
)
|
|
818
818
|
) })
|
|
819
819
|
] }),
|
|
820
|
-
|
|
820
|
+
te && /* @__PURE__ */ e(
|
|
821
821
|
"ul",
|
|
822
822
|
{
|
|
823
823
|
className: "absolute z-10 mt-1 w-full bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
@@ -835,14 +835,14 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
835
835
|
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-gray-500 dark:text-gray-400", children: M || h ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
836
836
|
}
|
|
837
837
|
),
|
|
838
|
-
(
|
|
838
|
+
(r || n) && /* @__PURE__ */ e(
|
|
839
839
|
"p",
|
|
840
840
|
{
|
|
841
841
|
className: de(
|
|
842
842
|
"mt-1 text-xs",
|
|
843
843
|
K ? "text-red-500" : "text-gray-500"
|
|
844
844
|
),
|
|
845
|
-
children:
|
|
845
|
+
children: r || n
|
|
846
846
|
}
|
|
847
847
|
),
|
|
848
848
|
i && /* @__PURE__ */ d("p", { className: "mt-2 text-xs text-green-600 dark:text-green-400", children: [
|
|
@@ -854,22 +854,22 @@ const Qe = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
854
854
|
);
|
|
855
855
|
}
|
|
856
856
|
);
|
|
857
|
-
|
|
858
|
-
const
|
|
857
|
+
lt.displayName = "SearchableTextField";
|
|
858
|
+
const st = {
|
|
859
859
|
sm: "px-3 py-1.5 text-sm",
|
|
860
860
|
md: "px-3 py-2 text-sm",
|
|
861
861
|
lg: "px-3 py-2 text-sm",
|
|
862
862
|
full: "px-3 py-2 text-sm"
|
|
863
|
-
}, me = (
|
|
863
|
+
}, me = (t) => t.trim().toLowerCase(), ve = ce(
|
|
864
864
|
({
|
|
865
|
-
label:
|
|
865
|
+
label: t,
|
|
866
866
|
helperText: n,
|
|
867
|
-
error:
|
|
867
|
+
error: r,
|
|
868
868
|
size: a = "md",
|
|
869
869
|
fullWidth: s = !1,
|
|
870
870
|
options: c,
|
|
871
871
|
placeholder: h,
|
|
872
|
-
containerClassName:
|
|
872
|
+
containerClassName: g,
|
|
873
873
|
labelClassName: p,
|
|
874
874
|
className: y,
|
|
875
875
|
id: u,
|
|
@@ -881,7 +881,7 @@ const sr = {
|
|
|
881
881
|
onCreateOption: k,
|
|
882
882
|
...B
|
|
883
883
|
}, x) => {
|
|
884
|
-
const q = u || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!
|
|
884
|
+
const q = u || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!r, [H, F] = se.useState(!1), [E, J] = se.useState(""), z = se.useRef(null), [v, T] = se.useState(c);
|
|
885
885
|
se.useImperativeHandle(x, () => z.current), se.useEffect(() => {
|
|
886
886
|
const S = (I) => {
|
|
887
887
|
z.current && !z.current.contains(I.target) && F(!1);
|
|
@@ -896,8 +896,8 @@ const sr = {
|
|
|
896
896
|
), $ = se.useCallback(
|
|
897
897
|
(S, I) => {
|
|
898
898
|
const O = [...S], A = (Q) => {
|
|
899
|
-
const
|
|
900
|
-
|
|
899
|
+
const re = (Q ?? "").trim();
|
|
900
|
+
re && (m(O, re) || O.push({ value: re, label: re }));
|
|
901
901
|
};
|
|
902
902
|
return Array.isArray(I) ? I.forEach(A) : A(I), O;
|
|
903
903
|
},
|
|
@@ -921,7 +921,7 @@ const sr = {
|
|
|
921
921
|
(S) => Array.isArray(f) && f.includes(S.value)
|
|
922
922
|
) : [], M = l && E ? v.filter(
|
|
923
923
|
(S) => S.label.toLowerCase().includes(E.toLowerCase())
|
|
924
|
-
) : v,
|
|
924
|
+
) : v, te = !!N && !!l && !!E.trim() && !m(v, E), ne = (S) => {
|
|
925
925
|
const I = S.trim();
|
|
926
926
|
if (!I) return;
|
|
927
927
|
const O = k?.(I) ?? {
|
|
@@ -938,24 +938,24 @@ const sr = {
|
|
|
938
938
|
"div",
|
|
939
939
|
{
|
|
940
940
|
ref: z,
|
|
941
|
-
className:
|
|
941
|
+
className: b(
|
|
942
942
|
"relative flex flex-col",
|
|
943
943
|
s && "w-full",
|
|
944
|
-
|
|
944
|
+
g
|
|
945
945
|
),
|
|
946
946
|
...B,
|
|
947
947
|
children: [
|
|
948
|
-
|
|
948
|
+
t && /* @__PURE__ */ e(
|
|
949
949
|
"label",
|
|
950
950
|
{
|
|
951
951
|
htmlFor: q,
|
|
952
952
|
onClick: () => F(!H),
|
|
953
|
-
className:
|
|
953
|
+
className: b(
|
|
954
954
|
"block text-sm font-medium mb-1",
|
|
955
955
|
K ? "text-error" : "text-secondary-700 dark:text-secondary-300",
|
|
956
956
|
p
|
|
957
957
|
),
|
|
958
|
-
children:
|
|
958
|
+
children: t
|
|
959
959
|
}
|
|
960
960
|
),
|
|
961
961
|
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
@@ -965,12 +965,12 @@ const sr = {
|
|
|
965
965
|
type: "button",
|
|
966
966
|
id: q,
|
|
967
967
|
onClick: () => F(!H),
|
|
968
|
-
className:
|
|
968
|
+
className: b(
|
|
969
969
|
"block w-full rounded-lg border transition-colors duration-200 text-left",
|
|
970
970
|
"focus:outline-none focus:ring-0 focus:ring-offset-0",
|
|
971
971
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
972
972
|
"bg-white dark:bg-secondary-800",
|
|
973
|
-
|
|
973
|
+
st[a],
|
|
974
974
|
K ? "border-error text-error focus:border-error focus:ring-error" : "border-neutral text-secondary-900 dark:border-neutral-700 dark:bg-secondary-800 dark:text-secondary-100",
|
|
975
975
|
y
|
|
976
976
|
),
|
|
@@ -986,18 +986,18 @@ const sr = {
|
|
|
986
986
|
value: E,
|
|
987
987
|
onChange: (S) => J(S.target.value),
|
|
988
988
|
onKeyDown: (S) => {
|
|
989
|
-
S.key === "Enter" &&
|
|
989
|
+
S.key === "Enter" && te && (S.preventDefault(), ne(E));
|
|
990
990
|
},
|
|
991
|
-
className:
|
|
991
|
+
className: b(
|
|
992
992
|
"w-full px-3 py-2 text-sm rounded-md border",
|
|
993
993
|
"text-secondary-900 border-gray-100 dark:border-gray-600 focus:outline-none focus:ring-0"
|
|
994
994
|
)
|
|
995
995
|
}
|
|
996
996
|
) }),
|
|
997
|
-
|
|
997
|
+
te && /* @__PURE__ */ d(
|
|
998
998
|
"div",
|
|
999
999
|
{
|
|
1000
|
-
className:
|
|
1000
|
+
className: b(
|
|
1001
1001
|
"px-4 py-2 text-sm cursor-pointer",
|
|
1002
1002
|
"text-primary hover:bg-gray-100 dark:hover:bg-secondary-700"
|
|
1003
1003
|
),
|
|
@@ -1026,7 +1026,7 @@ const sr = {
|
|
|
1026
1026
|
"li",
|
|
1027
1027
|
{
|
|
1028
1028
|
onClick: () => !S.disabled && L(S.value),
|
|
1029
|
-
className:
|
|
1029
|
+
className: b(
|
|
1030
1030
|
"px-4 py-2 text-sm cursor-pointer",
|
|
1031
1031
|
"text-secondary-900 dark:text-secondary-100",
|
|
1032
1032
|
S.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100 dark:hover:bg-secondary-700",
|
|
@@ -1051,14 +1051,14 @@ const sr = {
|
|
|
1051
1051
|
] })
|
|
1052
1052
|
] })
|
|
1053
1053
|
] }),
|
|
1054
|
-
(
|
|
1054
|
+
(r || n) && /* @__PURE__ */ e(
|
|
1055
1055
|
"p",
|
|
1056
1056
|
{
|
|
1057
|
-
className:
|
|
1057
|
+
className: b(
|
|
1058
1058
|
"mt-1 text-xs",
|
|
1059
1059
|
K ? "text-error" : "text-secondary-500"
|
|
1060
1060
|
),
|
|
1061
|
-
children:
|
|
1061
|
+
children: r || n
|
|
1062
1062
|
}
|
|
1063
1063
|
)
|
|
1064
1064
|
]
|
|
@@ -1067,38 +1067,38 @@ const sr = {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
);
|
|
1069
1069
|
ve.displayName = "Select";
|
|
1070
|
-
const
|
|
1070
|
+
const ot = {
|
|
1071
1071
|
sm: "px-3 py-1.5 text-sm",
|
|
1072
1072
|
md: "px-3 py-2 text-sm",
|
|
1073
1073
|
lg: "px-4 py-3 text-base",
|
|
1074
1074
|
full: "px-4 py-3 text-base"
|
|
1075
1075
|
}, ke = ce(
|
|
1076
1076
|
({
|
|
1077
|
-
label:
|
|
1077
|
+
label: t,
|
|
1078
1078
|
helperText: n,
|
|
1079
|
-
error:
|
|
1079
|
+
error: r,
|
|
1080
1080
|
size: a = "md",
|
|
1081
1081
|
fullWidth: s = !1,
|
|
1082
1082
|
loading: c = !1,
|
|
1083
1083
|
containerClassName: h,
|
|
1084
|
-
labelClassName:
|
|
1084
|
+
labelClassName: g,
|
|
1085
1085
|
className: p,
|
|
1086
1086
|
id: y,
|
|
1087
1087
|
rows: u = 4,
|
|
1088
1088
|
...l
|
|
1089
1089
|
}, i) => {
|
|
1090
|
-
const f = y || `textarea-${Math.random().toString(36).substr(2, 9)}`, C = !!
|
|
1091
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1092
|
-
|
|
1090
|
+
const f = y || `textarea-${Math.random().toString(36).substr(2, 9)}`, C = !!r;
|
|
1091
|
+
return /* @__PURE__ */ d("div", { className: b("flex flex-col", s && "w-full", h), children: [
|
|
1092
|
+
t && /* @__PURE__ */ e(
|
|
1093
1093
|
"label",
|
|
1094
1094
|
{
|
|
1095
1095
|
htmlFor: f,
|
|
1096
|
-
className:
|
|
1096
|
+
className: b(
|
|
1097
1097
|
"block text-sm font-medium mb-1",
|
|
1098
1098
|
C ? "text-error" : "text-secondary-700 dark:text-secondary-300",
|
|
1099
|
-
|
|
1099
|
+
g
|
|
1100
1100
|
),
|
|
1101
|
-
children:
|
|
1101
|
+
children: t
|
|
1102
1102
|
}
|
|
1103
1103
|
),
|
|
1104
1104
|
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
@@ -1108,13 +1108,13 @@ const or = {
|
|
|
1108
1108
|
ref: i,
|
|
1109
1109
|
id: f,
|
|
1110
1110
|
rows: u,
|
|
1111
|
-
className:
|
|
1111
|
+
className: b(
|
|
1112
1112
|
// Base styles
|
|
1113
1113
|
"block w-full rounded-lg border transition-colors duration-200 resize-vertical",
|
|
1114
1114
|
"placeholder-secondary-400 focus:outline-none focus:ring-0",
|
|
1115
1115
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1116
1116
|
// Size styles
|
|
1117
|
-
|
|
1117
|
+
ot[a],
|
|
1118
1118
|
// State styles
|
|
1119
1119
|
C ? "border-error text-error focus:border-error focus:ring-error" : "border-gray-100 text-secondary-900 dark:border-gray-600 dark:bg-secondary-800 dark:text-secondary-100",
|
|
1120
1120
|
p
|
|
@@ -1152,75 +1152,75 @@ const or = {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
) })
|
|
1154
1154
|
] }),
|
|
1155
|
-
(
|
|
1155
|
+
(r || n) && /* @__PURE__ */ e(
|
|
1156
1156
|
"p",
|
|
1157
1157
|
{
|
|
1158
|
-
className:
|
|
1158
|
+
className: b(
|
|
1159
1159
|
"mt-1 text-xs",
|
|
1160
1160
|
C ? "text-error" : "text-secondary-500"
|
|
1161
1161
|
),
|
|
1162
|
-
children:
|
|
1162
|
+
children: r || n
|
|
1163
1163
|
}
|
|
1164
1164
|
)
|
|
1165
1165
|
] });
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
1168
|
ke.displayName = "TextArea";
|
|
1169
|
-
const
|
|
1169
|
+
const ct = {
|
|
1170
1170
|
sm: "px-3 py-1.5 text-sm",
|
|
1171
1171
|
md: "px-3 py-2 text-sm",
|
|
1172
1172
|
lg: "px-3 py-2 text-sm",
|
|
1173
1173
|
full: "px-3 py-2 text-sm"
|
|
1174
|
-
},
|
|
1174
|
+
}, be = {
|
|
1175
1175
|
sm: "h-4 w-4",
|
|
1176
1176
|
md: "h-5 w-5",
|
|
1177
1177
|
lg: "h-6 w-6",
|
|
1178
1178
|
full: "h-6 w-6"
|
|
1179
1179
|
}, ue = ce(
|
|
1180
1180
|
({
|
|
1181
|
-
label:
|
|
1181
|
+
label: t,
|
|
1182
1182
|
helperText: n,
|
|
1183
|
-
error:
|
|
1183
|
+
error: r,
|
|
1184
1184
|
size: a = "md",
|
|
1185
1185
|
fullWidth: s = !1,
|
|
1186
1186
|
startIcon: c,
|
|
1187
1187
|
endIcon: h,
|
|
1188
|
-
loading:
|
|
1188
|
+
loading: g = !1,
|
|
1189
1189
|
containerClassName: p,
|
|
1190
1190
|
labelClassName: y,
|
|
1191
1191
|
className: u,
|
|
1192
1192
|
id: l,
|
|
1193
1193
|
...i
|
|
1194
1194
|
}, f) => {
|
|
1195
|
-
const C = l || `textfield-${Math.random().toString(36).substr(2, 9)}`, N = !!
|
|
1196
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1197
|
-
|
|
1195
|
+
const C = l || `textfield-${Math.random().toString(36).substr(2, 9)}`, N = !!r;
|
|
1196
|
+
return /* @__PURE__ */ d("div", { className: b("flex flex-col", s && "w-full", p), children: [
|
|
1197
|
+
t && /* @__PURE__ */ e(
|
|
1198
1198
|
"label",
|
|
1199
1199
|
{
|
|
1200
1200
|
htmlFor: C,
|
|
1201
|
-
className:
|
|
1201
|
+
className: b(
|
|
1202
1202
|
"block text-sm font-medium mb-1",
|
|
1203
1203
|
N ? "text-error" : "text-secondary-700 dark:text-secondary-300",
|
|
1204
1204
|
y
|
|
1205
1205
|
),
|
|
1206
|
-
children:
|
|
1206
|
+
children: t
|
|
1207
1207
|
}
|
|
1208
1208
|
),
|
|
1209
1209
|
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
1210
1210
|
c && // Todo fix inset not showing correctly on different sizes
|
|
1211
|
-
/* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className:
|
|
1211
|
+
/* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: b("text-secondary-400", be[a]), children: c }) }),
|
|
1212
1212
|
/* @__PURE__ */ e(
|
|
1213
1213
|
"input",
|
|
1214
1214
|
{
|
|
1215
1215
|
ref: f,
|
|
1216
1216
|
id: C,
|
|
1217
|
-
className:
|
|
1217
|
+
className: b(
|
|
1218
1218
|
// Base styles
|
|
1219
1219
|
"block w-full rounded-lg border dark:border-gray-600 transition-colors duration-200",
|
|
1220
1220
|
"placeholder-gray-500 dark:placeholder-gray-500 focus:outline-none focus:ring-1 focus:ring-offset-0",
|
|
1221
1221
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1222
1222
|
// Size styles
|
|
1223
|
-
|
|
1223
|
+
ct[a],
|
|
1224
1224
|
// Icon padding
|
|
1225
1225
|
c && "pl-10",
|
|
1226
1226
|
h && "pr-10",
|
|
@@ -1231,10 +1231,10 @@ const cr = {
|
|
|
1231
1231
|
...i
|
|
1232
1232
|
}
|
|
1233
1233
|
),
|
|
1234
|
-
(h ||
|
|
1234
|
+
(h || g) && /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: g ? /* @__PURE__ */ d(
|
|
1235
1235
|
"svg",
|
|
1236
1236
|
{
|
|
1237
|
-
className:
|
|
1237
|
+
className: b("animate-spin text-secondary-400", be[a]),
|
|
1238
1238
|
fill: "none",
|
|
1239
1239
|
viewBox: "0 0 24 24",
|
|
1240
1240
|
children: [
|
|
@@ -1259,16 +1259,16 @@ const cr = {
|
|
|
1259
1259
|
)
|
|
1260
1260
|
]
|
|
1261
1261
|
}
|
|
1262
|
-
) : h && /* @__PURE__ */ e("span", { className:
|
|
1262
|
+
) : h && /* @__PURE__ */ e("span", { className: b("text-secondary-400", be[a]), children: h }) })
|
|
1263
1263
|
] }),
|
|
1264
|
-
(
|
|
1264
|
+
(r || n) && /* @__PURE__ */ e(
|
|
1265
1265
|
"p",
|
|
1266
1266
|
{
|
|
1267
|
-
className:
|
|
1267
|
+
className: b(
|
|
1268
1268
|
"mt-1 text-xs",
|
|
1269
1269
|
N ? "text-error" : "text-secondary-500"
|
|
1270
1270
|
),
|
|
1271
|
-
children:
|
|
1271
|
+
children: r || n
|
|
1272
1272
|
}
|
|
1273
1273
|
)
|
|
1274
1274
|
] });
|
|
@@ -1276,28 +1276,28 @@ const cr = {
|
|
|
1276
1276
|
);
|
|
1277
1277
|
ue.displayName = "TextField";
|
|
1278
1278
|
const oe = ({
|
|
1279
|
-
icon:
|
|
1279
|
+
icon: t,
|
|
1280
1280
|
size: n = "md",
|
|
1281
|
-
color:
|
|
1281
|
+
color: r = "current",
|
|
1282
1282
|
clickable: a = !1,
|
|
1283
1283
|
onClick: s,
|
|
1284
1284
|
className: c,
|
|
1285
1285
|
"aria-label": h,
|
|
1286
|
-
...
|
|
1286
|
+
...g
|
|
1287
1287
|
}) => {
|
|
1288
|
-
const p = typeof n == "number" ? n :
|
|
1288
|
+
const p = typeof n == "number" ? n : dt(n), y = b(
|
|
1289
1289
|
"inline-block",
|
|
1290
1290
|
// Color variants
|
|
1291
1291
|
{
|
|
1292
|
-
"text-primary":
|
|
1293
|
-
"text-secondary":
|
|
1294
|
-
"text-accent":
|
|
1295
|
-
"text-success":
|
|
1296
|
-
"text-warning":
|
|
1297
|
-
"text-error":
|
|
1298
|
-
"text-info":
|
|
1299
|
-
"text-neutral":
|
|
1300
|
-
"text-current":
|
|
1292
|
+
"text-primary": r === "primary",
|
|
1293
|
+
"text-secondary": r === "secondary",
|
|
1294
|
+
"text-accent": r === "accent",
|
|
1295
|
+
"text-success": r === "success",
|
|
1296
|
+
"text-warning": r === "warning",
|
|
1297
|
+
"text-error": r === "error",
|
|
1298
|
+
"text-info": r === "info",
|
|
1299
|
+
"text-neutral": r === "neutral",
|
|
1300
|
+
"text-current": r === "current"
|
|
1301
1301
|
},
|
|
1302
1302
|
// Clickable styles
|
|
1303
1303
|
{
|
|
@@ -1315,51 +1315,51 @@ const oe = ({
|
|
|
1315
1315
|
onKeyDown: a ? (l) => {
|
|
1316
1316
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), s?.());
|
|
1317
1317
|
} : void 0,
|
|
1318
|
-
...
|
|
1318
|
+
...g
|
|
1319
1319
|
};
|
|
1320
|
-
return /* @__PURE__ */ e(
|
|
1320
|
+
return /* @__PURE__ */ e(t, { ...u });
|
|
1321
1321
|
};
|
|
1322
|
-
function
|
|
1322
|
+
function dt(t) {
|
|
1323
1323
|
return {
|
|
1324
1324
|
xs: 12,
|
|
1325
1325
|
sm: 16,
|
|
1326
1326
|
md: 20,
|
|
1327
1327
|
lg: 24,
|
|
1328
1328
|
xl: 32
|
|
1329
|
-
}[
|
|
1329
|
+
}[t];
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
children:
|
|
1331
|
+
function it({
|
|
1332
|
+
children: t,
|
|
1333
1333
|
showTableSkeleton: n = !1,
|
|
1334
|
-
tableColumns:
|
|
1334
|
+
tableColumns: r = 6,
|
|
1335
1335
|
tableRows: a = 8
|
|
1336
1336
|
}) {
|
|
1337
|
-
return
|
|
1337
|
+
return t ? /* @__PURE__ */ e("main", { className: "flex-1 bg-module p-6", children: /* @__PURE__ */ e("div", { className: "w-full max-w-6xl mx-auto animate-pulse", children: t }) }) : /* @__PURE__ */ e("main", { className: "flex-1 bg-module p-6", children: /* @__PURE__ */ d("div", { className: "w-full mx-auto space-y-6 animate-pulse", children: [
|
|
1338
1338
|
!n && /* @__PURE__ */ d(Ee, { children: [
|
|
1339
|
-
/* @__PURE__ */ e("div", { className: "h-6 bg-
|
|
1339
|
+
/* @__PURE__ */ e("div", { className: "h-6 bg-neutral-container-emphasis rounded w-1/4" }),
|
|
1340
1340
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1341
|
-
/* @__PURE__ */ e("div", { className: "h-4 bg-
|
|
1342
|
-
/* @__PURE__ */ e("div", { className: "h-4 bg-
|
|
1341
|
+
/* @__PURE__ */ e("div", { className: "h-4 bg-neutral-container-emphasis rounded w-3/4" }),
|
|
1342
|
+
/* @__PURE__ */ e("div", { className: "h-4 bg-neutral-container-emphasis rounded w-1/2" })
|
|
1343
1343
|
] })
|
|
1344
1344
|
] }),
|
|
1345
1345
|
n && /* @__PURE__ */ d("div", { className: "rounded-lg overflow-hidden", children: [
|
|
1346
|
-
/* @__PURE__ */ e("div", { className: `grid grid-cols-${
|
|
1346
|
+
/* @__PURE__ */ e("div", { className: `grid grid-cols-${r} gap-2 bg-neutral-container p-3`, children: Array.from({ length: r }).map((s, c) => /* @__PURE__ */ e(
|
|
1347
1347
|
"div",
|
|
1348
1348
|
{
|
|
1349
|
-
className: "h-4 bg-
|
|
1349
|
+
className: "h-4 bg-neutral-border-emphasis rounded w-2/3"
|
|
1350
1350
|
},
|
|
1351
1351
|
`header-${c}`
|
|
1352
1352
|
)) }),
|
|
1353
1353
|
Array.from({ length: a }).map((s, c) => /* @__PURE__ */ e(
|
|
1354
1354
|
"div",
|
|
1355
1355
|
{
|
|
1356
|
-
className: `grid grid-cols-${
|
|
1357
|
-
children: Array.from({ length:
|
|
1356
|
+
className: `grid grid-cols-${r} gap-2 p-3 border-t border-neutral`,
|
|
1357
|
+
children: Array.from({ length: r }).map((h, g) => /* @__PURE__ */ e(
|
|
1358
1358
|
"div",
|
|
1359
1359
|
{
|
|
1360
|
-
className: "h-4 bg-
|
|
1360
|
+
className: "h-4 bg-neutral-container-emphasis rounded w-full"
|
|
1361
1361
|
},
|
|
1362
|
-
`cell-${c}-${
|
|
1362
|
+
`cell-${c}-${g}`
|
|
1363
1363
|
))
|
|
1364
1364
|
},
|
|
1365
1365
|
`row-${c}`
|
|
@@ -1367,15 +1367,15 @@ function ir({
|
|
|
1367
1367
|
] })
|
|
1368
1368
|
] }) });
|
|
1369
1369
|
}
|
|
1370
|
-
const
|
|
1371
|
-
trigger:
|
|
1370
|
+
const ut = ({
|
|
1371
|
+
trigger: t,
|
|
1372
1372
|
options: n,
|
|
1373
|
-
value:
|
|
1373
|
+
value: r,
|
|
1374
1374
|
onSelect: a,
|
|
1375
1375
|
placement: s = "bottom-start",
|
|
1376
1376
|
disabled: c = !1,
|
|
1377
1377
|
className: h,
|
|
1378
|
-
showCheck:
|
|
1378
|
+
showCheck: g = !0,
|
|
1379
1379
|
header: p
|
|
1380
1380
|
}) => {
|
|
1381
1381
|
const [y, u] = V(!1), [l, i] = V(null), [f, C] = V({ top: 0, left: 0 }), N = X(null), k = X(null), B = X(null), x = X(null);
|
|
@@ -1421,7 +1421,7 @@ const ur = ({
|
|
|
1421
1421
|
}, 150) : i(null);
|
|
1422
1422
|
}, E = (v, T, m) => {
|
|
1423
1423
|
v.stopPropagation(), !T.disabled && !T.divider && (a?.(T.value, m), u(!1), i(null));
|
|
1424
|
-
}, J =
|
|
1424
|
+
}, J = b(
|
|
1425
1425
|
"absolute z-50 min-w-[200px] bg-white dark:bg-gray-800 rounded-md shadow-xs border border-gray-100 dark:border-gray-600",
|
|
1426
1426
|
"max-h-60 overflow-auto",
|
|
1427
1427
|
{
|
|
@@ -1430,7 +1430,7 @@ const ur = ({
|
|
|
1430
1430
|
"bottom-full left-0 mb-2": s === "top-start",
|
|
1431
1431
|
"bottom-full right-0 mb-2": s === "top-end"
|
|
1432
1432
|
}
|
|
1433
|
-
), z =
|
|
1433
|
+
), z = b(
|
|
1434
1434
|
"fixed z-[60] min-w-[200px] bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-100 dark:border-gray-600",
|
|
1435
1435
|
"max-h-60 overflow-auto"
|
|
1436
1436
|
);
|
|
@@ -1438,7 +1438,7 @@ const ur = ({
|
|
|
1438
1438
|
"div",
|
|
1439
1439
|
{
|
|
1440
1440
|
ref: N,
|
|
1441
|
-
className:
|
|
1441
|
+
className: b(
|
|
1442
1442
|
"relative flex flex-row items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
1443
1443
|
h
|
|
1444
1444
|
),
|
|
@@ -1449,10 +1449,10 @@ const ur = ({
|
|
|
1449
1449
|
ref: k,
|
|
1450
1450
|
onClick: q,
|
|
1451
1451
|
disabled: c,
|
|
1452
|
-
className:
|
|
1452
|
+
className: b("inline-flex items-center justify-center", {
|
|
1453
1453
|
"opacity-50 cursor-not-allowed": c
|
|
1454
1454
|
}),
|
|
1455
|
-
children:
|
|
1455
|
+
children: t
|
|
1456
1456
|
}
|
|
1457
1457
|
),
|
|
1458
1458
|
y && /* @__PURE__ */ e("div", { className: J, children: /* @__PURE__ */ d("div", { className: "p-2", children: [
|
|
@@ -1476,7 +1476,7 @@ const ur = ({
|
|
|
1476
1476
|
onMouseEnter: () => H(v),
|
|
1477
1477
|
onMouseLeave: () => F(v),
|
|
1478
1478
|
disabled: v.disabled,
|
|
1479
|
-
className:
|
|
1479
|
+
className: b(
|
|
1480
1480
|
"w-full flex items-center justify-between px-3 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",
|
|
1481
1481
|
{
|
|
1482
1482
|
"opacity-50 cursor-not-allowed": v.disabled,
|
|
@@ -1492,7 +1492,7 @@ const ur = ({
|
|
|
1492
1492
|
] })
|
|
1493
1493
|
] }),
|
|
1494
1494
|
/* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1495
|
-
|
|
1495
|
+
g && r === v.value && /* @__PURE__ */ e("span", { className: "h-4 w-4 text-green-600 flex-shrink-0 text-sm font-bold", children: "✓" }),
|
|
1496
1496
|
m && /* @__PURE__ */ e("span", { className: "text-gray-400 dark:text-gray-500 text-xs", children: "▶" })
|
|
1497
1497
|
] })
|
|
1498
1498
|
]
|
|
@@ -1524,9 +1524,9 @@ const ur = ({
|
|
|
1524
1524
|
},
|
|
1525
1525
|
`divider-${D}`
|
|
1526
1526
|
);
|
|
1527
|
-
const P = typeof
|
|
1527
|
+
const P = typeof r == "object" && r[v.value] && r[v.value].includes(
|
|
1528
1528
|
L.value
|
|
1529
|
-
) ||
|
|
1529
|
+
) || r === L.value;
|
|
1530
1530
|
return /* @__PURE__ */ d(
|
|
1531
1531
|
"button",
|
|
1532
1532
|
{
|
|
@@ -1536,7 +1536,7 @@ const ur = ({
|
|
|
1536
1536
|
v.value
|
|
1537
1537
|
),
|
|
1538
1538
|
disabled: L.disabled,
|
|
1539
|
-
className:
|
|
1539
|
+
className: b(
|
|
1540
1540
|
"w-full flex items-center justify-between px-3 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",
|
|
1541
1541
|
{
|
|
1542
1542
|
"opacity-50 cursor-not-allowed": L.disabled
|
|
@@ -1550,7 +1550,7 @@ const ur = ({
|
|
|
1550
1550
|
L.description && /* @__PURE__ */ e("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: L.description })
|
|
1551
1551
|
] })
|
|
1552
1552
|
] }),
|
|
1553
|
-
|
|
1553
|
+
g && P && /* @__PURE__ */ e("span", { className: "h-4 w-4 text-green-600 flex-shrink-0 text-sm font-bold", children: "✓" })
|
|
1554
1554
|
]
|
|
1555
1555
|
},
|
|
1556
1556
|
L.value
|
|
@@ -1575,7 +1575,7 @@ const ur = ({
|
|
|
1575
1575
|
]
|
|
1576
1576
|
}
|
|
1577
1577
|
);
|
|
1578
|
-
},
|
|
1578
|
+
}, mt = () => /* @__PURE__ */ e(
|
|
1579
1579
|
"svg",
|
|
1580
1580
|
{
|
|
1581
1581
|
className: "h-4 w-4",
|
|
@@ -1592,12 +1592,12 @@ const ur = ({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
1594
1594
|
}
|
|
1595
|
-
),
|
|
1595
|
+
), ht = ({ active: t }) => /* @__PURE__ */ e(
|
|
1596
1596
|
"svg",
|
|
1597
1597
|
{
|
|
1598
|
-
className:
|
|
1598
|
+
className: b(
|
|
1599
1599
|
"h-3 w-3",
|
|
1600
|
-
|
|
1600
|
+
t ? "text-neutral-900 dark:text-neutral-100" : "text-neutral-400"
|
|
1601
1601
|
),
|
|
1602
1602
|
fill: "none",
|
|
1603
1603
|
stroke: "currentColor",
|
|
@@ -1612,12 +1612,12 @@ const ur = ({
|
|
|
1612
1612
|
}
|
|
1613
1613
|
)
|
|
1614
1614
|
}
|
|
1615
|
-
),
|
|
1615
|
+
), ft = ({ active: t }) => /* @__PURE__ */ e(
|
|
1616
1616
|
"svg",
|
|
1617
1617
|
{
|
|
1618
|
-
className:
|
|
1618
|
+
className: b(
|
|
1619
1619
|
"h-3 w-3",
|
|
1620
|
-
|
|
1620
|
+
t ? "text-neutral-900 dark:text-neutral-100" : "text-neutral-400"
|
|
1621
1621
|
),
|
|
1622
1622
|
fill: "none",
|
|
1623
1623
|
stroke: "currentColor",
|
|
@@ -1632,7 +1632,7 @@ const ur = ({
|
|
|
1632
1632
|
}
|
|
1633
1633
|
)
|
|
1634
1634
|
}
|
|
1635
|
-
),
|
|
1635
|
+
), pt = () => /* @__PURE__ */ e(
|
|
1636
1636
|
"svg",
|
|
1637
1637
|
{
|
|
1638
1638
|
className: "h-4 w-4",
|
|
@@ -1649,7 +1649,7 @@ const ur = ({
|
|
|
1649
1649
|
}
|
|
1650
1650
|
)
|
|
1651
1651
|
}
|
|
1652
|
-
),
|
|
1652
|
+
), xt = () => /* @__PURE__ */ e(
|
|
1653
1653
|
"svg",
|
|
1654
1654
|
{
|
|
1655
1655
|
className: "h-4 w-4",
|
|
@@ -1666,7 +1666,7 @@ const ur = ({
|
|
|
1666
1666
|
}
|
|
1667
1667
|
)
|
|
1668
1668
|
}
|
|
1669
|
-
),
|
|
1669
|
+
), bt = () => /* @__PURE__ */ e(
|
|
1670
1670
|
"svg",
|
|
1671
1671
|
{
|
|
1672
1672
|
className: "h-4 w-4",
|
|
@@ -1683,7 +1683,7 @@ const ur = ({
|
|
|
1683
1683
|
}
|
|
1684
1684
|
)
|
|
1685
1685
|
}
|
|
1686
|
-
),
|
|
1686
|
+
), gt = () => /* @__PURE__ */ e(
|
|
1687
1687
|
"svg",
|
|
1688
1688
|
{
|
|
1689
1689
|
className: "h-4 w-4",
|
|
@@ -1717,62 +1717,62 @@ const ur = ({
|
|
|
1717
1717
|
}
|
|
1718
1718
|
)
|
|
1719
1719
|
}
|
|
1720
|
-
),
|
|
1721
|
-
const n = (a) =>
|
|
1722
|
-
|
|
1720
|
+
), yt = (t) => {
|
|
1721
|
+
const n = (a) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(a) : t.value === a, r = (a) => {
|
|
1722
|
+
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((s) => s !== a)) : t.onChange(a);
|
|
1723
1723
|
};
|
|
1724
|
-
return
|
|
1724
|
+
return t.type === "date" ? /* @__PURE__ */ e("div", { className: "flex items-center space-x-1 max-w-[160px]", children: /* @__PURE__ */ e(
|
|
1725
1725
|
ye,
|
|
1726
1726
|
{
|
|
1727
1727
|
size: "sm",
|
|
1728
|
-
value:
|
|
1729
|
-
onChange: (a) =>
|
|
1730
|
-
placeholder:
|
|
1728
|
+
value: t.value,
|
|
1729
|
+
onChange: (a) => t.onChange(a),
|
|
1730
|
+
placeholder: t.placeholder || `Select ${t.label.toLowerCase()}`,
|
|
1731
1731
|
className: "min-w-[160px] btn btn o__secondary"
|
|
1732
1732
|
}
|
|
1733
1733
|
) }) : /* @__PURE__ */ e("div", { className: "flex items-center space-x-1 max-w-[240px]", children: /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ d("details", { className: "group", children: [
|
|
1734
1734
|
/* @__PURE__ */ d("summary", { className: "flex items-center space-x-2 cursor-pointer rounded-full px-3 py-2 text-sm btn btn o__secondary", children: [
|
|
1735
|
-
/* @__PURE__ */ e("span", { children:
|
|
1736
|
-
/* @__PURE__ */ e("span", { className: "text-default", children:
|
|
1737
|
-
(a) =>
|
|
1738
|
-
).join(", ") :
|
|
1735
|
+
/* @__PURE__ */ e("span", { children: t.label }),
|
|
1736
|
+
/* @__PURE__ */ e("span", { className: "text-default", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1737
|
+
(a) => t.options?.find((s) => s.value === a)?.label
|
|
1738
|
+
).join(", ") : t.options?.find((a) => a.value === t.value)?.label }),
|
|
1739
1739
|
/* @__PURE__ */ e("span", { className: "text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(ze, {}) })
|
|
1740
1740
|
] }),
|
|
1741
1741
|
/* @__PURE__ */ d("div", { className: "absolute z-10 left-0 mt-1 bg-module border border-neutral rounded-lg shadow-lvl-0 p-2 w-48", children: [
|
|
1742
|
-
|
|
1742
|
+
t.options?.map((a) => /* @__PURE__ */ e(
|
|
1743
1743
|
"button",
|
|
1744
1744
|
{
|
|
1745
1745
|
className: "w-full text-left px-3 py-2 rounded-md hover:bg-module-subtle text-sm text-default flex items-center space-x-2",
|
|
1746
|
-
onClick: () =>
|
|
1746
|
+
onClick: () => r(a.value),
|
|
1747
1747
|
children: /* @__PURE__ */ e(
|
|
1748
1748
|
"span",
|
|
1749
1749
|
{
|
|
1750
|
-
className:
|
|
1750
|
+
className: b(n(a.value) && "text-primary-500"),
|
|
1751
1751
|
children: a.label
|
|
1752
1752
|
}
|
|
1753
1753
|
)
|
|
1754
1754
|
},
|
|
1755
1755
|
a.value
|
|
1756
1756
|
)),
|
|
1757
|
-
|
|
1757
|
+
t.value && /* @__PURE__ */ e(
|
|
1758
1758
|
"button",
|
|
1759
1759
|
{
|
|
1760
1760
|
className: "w-full text-left px-3 py-2 rounded-md hover:bg-module-subtle text-sm text-default flex items-center space-x-2 mt-2",
|
|
1761
|
-
onClick: () =>
|
|
1761
|
+
onClick: () => r(null),
|
|
1762
1762
|
children: /* @__PURE__ */ e("span", { className: "text-muted", children: "Clear filter" })
|
|
1763
1763
|
}
|
|
1764
1764
|
)
|
|
1765
1765
|
] })
|
|
1766
1766
|
] }) }) });
|
|
1767
1767
|
}, Le = ({
|
|
1768
|
-
data:
|
|
1768
|
+
data: t,
|
|
1769
1769
|
columns: n,
|
|
1770
|
-
loading:
|
|
1770
|
+
loading: r = !1,
|
|
1771
1771
|
searchable: a = !1,
|
|
1772
1772
|
searchPlaceholder: s = "Search...",
|
|
1773
1773
|
filters: c = [],
|
|
1774
1774
|
paginated: h = !1,
|
|
1775
|
-
pageSizeOptions:
|
|
1775
|
+
pageSizeOptions: g = [10, 25, 50, 100],
|
|
1776
1776
|
defaultPageSize: p = 10,
|
|
1777
1777
|
actions: y = [],
|
|
1778
1778
|
onRowClick: u,
|
|
@@ -1794,7 +1794,7 @@ const ur = ({
|
|
|
1794
1794
|
page: 0,
|
|
1795
1795
|
pageSize: p
|
|
1796
1796
|
}), T = X(null), m = ie(() => {
|
|
1797
|
-
let o =
|
|
1797
|
+
let o = t;
|
|
1798
1798
|
if (a && H.trim()) {
|
|
1799
1799
|
const w = n.filter(
|
|
1800
1800
|
(R) => R.searchable !== !1
|
|
@@ -1812,7 +1812,7 @@ const ur = ({
|
|
|
1812
1812
|
return String(j || "") === w.value;
|
|
1813
1813
|
}));
|
|
1814
1814
|
}), o;
|
|
1815
|
-
}, [
|
|
1815
|
+
}, [t, H, n, a, c]), $ = ie(() => {
|
|
1816
1816
|
if (!E.column || !E.direction) return m;
|
|
1817
1817
|
const o = n.find((w) => w.id === E.column);
|
|
1818
1818
|
return o ? [...m].sort((w, _) => {
|
|
@@ -1833,7 +1833,7 @@ const ur = ({
|
|
|
1833
1833
|
v((w) => ({ ...w, page: o }));
|
|
1834
1834
|
}, []), M = ae((o) => {
|
|
1835
1835
|
v({ page: 0, pageSize: o });
|
|
1836
|
-
}, []),
|
|
1836
|
+
}, []), te = ae(
|
|
1837
1837
|
(o, w) => {
|
|
1838
1838
|
if (!f) return;
|
|
1839
1839
|
const _ = C(o, 0);
|
|
@@ -1863,41 +1863,41 @@ const ur = ({
|
|
|
1863
1863
|
return i.some(
|
|
1864
1864
|
(_, R) => C(_, R) === w
|
|
1865
1865
|
);
|
|
1866
|
-
}),
|
|
1866
|
+
}), re = b(
|
|
1867
1867
|
"w-full text-sm leading-5 text-[var(--text-default)] border-collapse",
|
|
1868
1868
|
q
|
|
1869
|
-
), U =
|
|
1869
|
+
), U = b("bg-[var(--base-module)]"), le = b(
|
|
1870
1870
|
"text-[var(--text-default)] dark:text-[var(--text-on-neutral)] p-3 border-b border-[var(--neutral-border)]"
|
|
1871
|
-
), he =
|
|
1871
|
+
), he = b("h-12", {
|
|
1872
1872
|
"hover:bg-[var(--neutral-container)] dark:hover:bg-[var(--neutral-container-emphasis)]": k,
|
|
1873
1873
|
"cursor-pointer": u
|
|
1874
1874
|
});
|
|
1875
1875
|
return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1876
1876
|
(a || c.length > 0) && /* @__PURE__ */ e("div", { className: "pt-4 pb-2", children: /* @__PURE__ */ d("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
1877
|
-
c.map((o) => /* @__PURE__ */ e(
|
|
1877
|
+
c.map((o) => /* @__PURE__ */ e(yt, { ...o }, o.id)),
|
|
1878
1878
|
/* @__PURE__ */ e("div", { className: "w-full sm:w-auto sm:ml-auto min-w-[200px]", children: /* @__PURE__ */ e(
|
|
1879
1879
|
ue,
|
|
1880
1880
|
{
|
|
1881
1881
|
placeholder: s,
|
|
1882
1882
|
value: H,
|
|
1883
1883
|
onChange: (o) => F(o.target.value),
|
|
1884
|
-
startIcon: /* @__PURE__ */ e(
|
|
1884
|
+
startIcon: /* @__PURE__ */ e(mt, {}),
|
|
1885
1885
|
className: "max-w-sm"
|
|
1886
1886
|
}
|
|
1887
1887
|
) })
|
|
1888
1888
|
] }) }),
|
|
1889
1889
|
/* @__PURE__ */ d("div", { className: "relative w-full overflow-x-auto min-h-[400px]", children: [
|
|
1890
|
-
|
|
1891
|
-
|
|
1890
|
+
r && /* @__PURE__ */ e("div", { className: "flex items-center justify-center z-10", children: /* @__PURE__ */ e(
|
|
1891
|
+
it,
|
|
1892
1892
|
{
|
|
1893
1893
|
showTableSkeleton: !0,
|
|
1894
1894
|
tableRows: 10,
|
|
1895
1895
|
tableColumns: n.length
|
|
1896
1896
|
}
|
|
1897
1897
|
) }),
|
|
1898
|
-
/* @__PURE__ */ d("table", { ref: T, className:
|
|
1898
|
+
/* @__PURE__ */ d("table", { ref: T, className: b(re, "min-w-full"), children: [
|
|
1899
1899
|
/* @__PURE__ */ e("thead", { className: U, children: /* @__PURE__ */ d("tr", { children: [
|
|
1900
|
-
l && /* @__PURE__ */ e("th", { className:
|
|
1900
|
+
l && /* @__PURE__ */ e("th", { className: b(le, "w-12"), children: /* @__PURE__ */ e(
|
|
1901
1901
|
"input",
|
|
1902
1902
|
{
|
|
1903
1903
|
type: "checkbox",
|
|
@@ -1909,10 +1909,10 @@ const ur = ({
|
|
|
1909
1909
|
className: "rounded border-neutral-300 dark:border-neutral-600"
|
|
1910
1910
|
}
|
|
1911
1911
|
) }),
|
|
1912
|
-
!
|
|
1912
|
+
!r && n.map((o) => /* @__PURE__ */ e(
|
|
1913
1913
|
"th",
|
|
1914
1914
|
{
|
|
1915
|
-
className:
|
|
1915
|
+
className: b(
|
|
1916
1916
|
le,
|
|
1917
1917
|
"font-semibold text-xs text-[var(--text-muted)] dark:text-[var(--text-muted)] uppercase tracking-wider",
|
|
1918
1918
|
"group",
|
|
@@ -1932,19 +1932,19 @@ const ur = ({
|
|
|
1932
1932
|
o.sortable && /* @__PURE__ */ d(
|
|
1933
1933
|
"div",
|
|
1934
1934
|
{
|
|
1935
|
-
className:
|
|
1935
|
+
className: b(
|
|
1936
1936
|
"flex flex-col opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1937
1937
|
E.column === o.id && "opacity-100"
|
|
1938
1938
|
),
|
|
1939
1939
|
children: [
|
|
1940
1940
|
/* @__PURE__ */ e(
|
|
1941
|
-
|
|
1941
|
+
ht,
|
|
1942
1942
|
{
|
|
1943
1943
|
active: E.column === o.id && E.direction === "asc"
|
|
1944
1944
|
}
|
|
1945
1945
|
),
|
|
1946
1946
|
/* @__PURE__ */ e(
|
|
1947
|
-
|
|
1947
|
+
ft,
|
|
1948
1948
|
{
|
|
1949
1949
|
active: E.column === o.id && E.direction === "desc"
|
|
1950
1950
|
}
|
|
@@ -1956,13 +1956,13 @@ const ur = ({
|
|
|
1956
1956
|
},
|
|
1957
1957
|
o.id
|
|
1958
1958
|
)),
|
|
1959
|
-
y.length > 0 && /* @__PURE__ */ e("th", { className:
|
|
1959
|
+
y.length > 0 && /* @__PURE__ */ e("th", { className: b(le, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1960
1960
|
] }) }),
|
|
1961
|
-
/* @__PURE__ */ e("tbody", { children: L.length === 0 ||
|
|
1961
|
+
/* @__PURE__ */ e("tbody", { children: L.length === 0 || r ? !r && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1962
1962
|
"td",
|
|
1963
1963
|
{
|
|
1964
1964
|
colSpan: n.length + (l ? 1 : 0) + (y.length > 0 ? 1 : 0),
|
|
1965
|
-
className:
|
|
1965
|
+
className: b(
|
|
1966
1966
|
le,
|
|
1967
1967
|
"text-center py-8 text-neutral-500 dark:text-neutral-400"
|
|
1968
1968
|
),
|
|
@@ -1975,7 +1975,7 @@ const ur = ({
|
|
|
1975
1975
|
return /* @__PURE__ */ d(
|
|
1976
1976
|
"tr",
|
|
1977
1977
|
{
|
|
1978
|
-
className:
|
|
1978
|
+
className: b(
|
|
1979
1979
|
he,
|
|
1980
1980
|
{ "bg-blue-50 dark:bg-blue-900/20": R },
|
|
1981
1981
|
K?.(o, w)
|
|
@@ -1990,7 +1990,7 @@ const ur = ({
|
|
|
1990
1990
|
type: "checkbox",
|
|
1991
1991
|
checked: R,
|
|
1992
1992
|
onChange: (j) => {
|
|
1993
|
-
j.stopPropagation(),
|
|
1993
|
+
j.stopPropagation(), te(o, j.target.checked);
|
|
1994
1994
|
},
|
|
1995
1995
|
className: "rounded border-neutral-300 dark:border-neutral-600"
|
|
1996
1996
|
}
|
|
@@ -2000,7 +2000,7 @@ const ur = ({
|
|
|
2000
2000
|
return /* @__PURE__ */ e(
|
|
2001
2001
|
"td",
|
|
2002
2002
|
{
|
|
2003
|
-
className:
|
|
2003
|
+
className: b(le, {
|
|
2004
2004
|
"text-left": j.align === "left" || !j.align,
|
|
2005
2005
|
"text-center": j.align === "center",
|
|
2006
2006
|
"text-right": j.align === "right",
|
|
@@ -2013,7 +2013,7 @@ const ur = ({
|
|
|
2013
2013
|
);
|
|
2014
2014
|
}),
|
|
2015
2015
|
y.length > 0 && /* @__PURE__ */ e("td", { className: le, children: /* @__PURE__ */ e(
|
|
2016
|
-
|
|
2016
|
+
ut,
|
|
2017
2017
|
{
|
|
2018
2018
|
trigger: /* @__PURE__ */ d("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-100", children: [
|
|
2019
2019
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
@@ -2060,7 +2060,7 @@ const ur = ({
|
|
|
2060
2060
|
value: z.pageSize,
|
|
2061
2061
|
onChange: (o) => M(Number(o.target.value)),
|
|
2062
2062
|
className: "border border-[var(--neutral-border)] text-[var(--text-default)] dark:text-[var(--text-on-neutral)] rounded-md px-2 py-1 text-sm bg-[var(--base-input)] dark:bg-[var(--base-input)] w-16",
|
|
2063
|
-
children:
|
|
2063
|
+
children: g.map((o) => /* @__PURE__ */ e("option", { value: o, children: o }, o))
|
|
2064
2064
|
}
|
|
2065
2065
|
)
|
|
2066
2066
|
] })
|
|
@@ -2074,7 +2074,7 @@ const ur = ({
|
|
|
2074
2074
|
onClick: () => P(0),
|
|
2075
2075
|
disabled: z.page === 0,
|
|
2076
2076
|
iconOnly: !0,
|
|
2077
|
-
children: /* @__PURE__ */ e(
|
|
2077
|
+
children: /* @__PURE__ */ e(bt, {})
|
|
2078
2078
|
}
|
|
2079
2079
|
),
|
|
2080
2080
|
/* @__PURE__ */ e(
|
|
@@ -2085,7 +2085,7 @@ const ur = ({
|
|
|
2085
2085
|
onClick: () => P(z.page - 1),
|
|
2086
2086
|
disabled: z.page === 0,
|
|
2087
2087
|
iconOnly: !0,
|
|
2088
|
-
children: /* @__PURE__ */ e(
|
|
2088
|
+
children: /* @__PURE__ */ e(pt, {})
|
|
2089
2089
|
}
|
|
2090
2090
|
),
|
|
2091
2091
|
/* @__PURE__ */ d("span", { className: "px-3 py-1 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
@@ -2102,7 +2102,7 @@ const ur = ({
|
|
|
2102
2102
|
onClick: () => P(z.page + 1),
|
|
2103
2103
|
disabled: z.page >= S - 1,
|
|
2104
2104
|
iconOnly: !0,
|
|
2105
|
-
children: /* @__PURE__ */ e(
|
|
2105
|
+
children: /* @__PURE__ */ e(xt, {})
|
|
2106
2106
|
}
|
|
2107
2107
|
),
|
|
2108
2108
|
/* @__PURE__ */ e(
|
|
@@ -2113,27 +2113,27 @@ const ur = ({
|
|
|
2113
2113
|
onClick: () => P(S - 1),
|
|
2114
2114
|
disabled: z.page >= S - 1,
|
|
2115
2115
|
iconOnly: !0,
|
|
2116
|
-
children: /* @__PURE__ */ e(
|
|
2116
|
+
children: /* @__PURE__ */ e(gt, {})
|
|
2117
2117
|
}
|
|
2118
2118
|
)
|
|
2119
2119
|
] })
|
|
2120
2120
|
] })
|
|
2121
2121
|
] });
|
|
2122
|
-
},
|
|
2123
|
-
items:
|
|
2122
|
+
}, vt = He(null), er = ({
|
|
2123
|
+
items: t,
|
|
2124
2124
|
activeTab: n,
|
|
2125
|
-
onTabChange:
|
|
2125
|
+
onTabChange: r,
|
|
2126
2126
|
className: a
|
|
2127
2127
|
}) => {
|
|
2128
|
-
const [s, c] = V(
|
|
2129
|
-
|
|
2128
|
+
const [s, c] = V(t[0]?.id || ""), h = n || s, g = (p) => {
|
|
2129
|
+
r ? r(p) : c(p);
|
|
2130
2130
|
};
|
|
2131
|
-
return /* @__PURE__ */ e("div", { className:
|
|
2131
|
+
return /* @__PURE__ */ e("div", { className: b("border-b border-neutral-200 dark:border-neutral-700", a), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((p) => /* @__PURE__ */ e(
|
|
2132
2132
|
"button",
|
|
2133
2133
|
{
|
|
2134
|
-
onClick: () => !p.disabled &&
|
|
2134
|
+
onClick: () => !p.disabled && g(p.id),
|
|
2135
2135
|
disabled: p.disabled,
|
|
2136
|
-
className:
|
|
2136
|
+
className: b(
|
|
2137
2137
|
"border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-200",
|
|
2138
2138
|
{
|
|
2139
2139
|
"border-primary text-primary": h === p.id,
|
|
@@ -2143,7 +2143,7 @@ const ur = ({
|
|
|
2143
2143
|
),
|
|
2144
2144
|
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-2", children: [
|
|
2145
2145
|
p.label,
|
|
2146
|
-
p.badge && /* @__PURE__ */ e("span", { className:
|
|
2146
|
+
p.badge && /* @__PURE__ */ e("span", { className: b(
|
|
2147
2147
|
"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
|
|
2148
2148
|
h === p.id ? "bg-primary/10 text-primary" : "bg-neutral-100 text-neutral-600 dark:bg-neutral-800 dark:text-neutral-400"
|
|
2149
2149
|
), children: p.badge })
|
|
@@ -2151,23 +2151,23 @@ const ur = ({
|
|
|
2151
2151
|
},
|
|
2152
2152
|
p.id
|
|
2153
2153
|
)) }) });
|
|
2154
|
-
},
|
|
2155
|
-
items:
|
|
2154
|
+
}, kt = ({
|
|
2155
|
+
items: t,
|
|
2156
2156
|
defaultTab: n,
|
|
2157
|
-
activeTab:
|
|
2157
|
+
activeTab: r,
|
|
2158
2158
|
onTabChange: a,
|
|
2159
2159
|
variant: s = "default",
|
|
2160
2160
|
size: c = "md",
|
|
2161
2161
|
className: h
|
|
2162
2162
|
}) => {
|
|
2163
|
-
const [
|
|
2164
|
-
n ||
|
|
2165
|
-
), y =
|
|
2163
|
+
const [g, p] = V(
|
|
2164
|
+
n || r || t[0]?.id || ""
|
|
2165
|
+
), y = r || g, u = (N) => {
|
|
2166
2166
|
a ? a(N) : p(N);
|
|
2167
2167
|
}, l = {
|
|
2168
2168
|
activeTab: y,
|
|
2169
2169
|
setActiveTab: u
|
|
2170
|
-
}, i =
|
|
2170
|
+
}, i = t.find((N) => N.id === y), f = b(
|
|
2171
2171
|
"flex",
|
|
2172
2172
|
{
|
|
2173
2173
|
"border-b border-neutral-200 dark:border-neutral-700 px-2": s === "default" || s === "underline",
|
|
@@ -2199,10 +2199,10 @@ const ur = ({
|
|
|
2199
2199
|
"text-neutral-600 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100": s === "pills",
|
|
2200
2200
|
"border-transparent text-neutral-600 hover:text-neutral-900 hover:border-neutral-300 dark:text-neutral-400 dark:hover:text-neutral-100": s === "underline"
|
|
2201
2201
|
} : {};
|
|
2202
|
-
return
|
|
2202
|
+
return b(B, x, q, K, H, F);
|
|
2203
2203
|
};
|
|
2204
|
-
return /* @__PURE__ */ e(
|
|
2205
|
-
/* @__PURE__ */ e("div", { className: f, role: "tablist", children:
|
|
2204
|
+
return /* @__PURE__ */ e(vt.Provider, { value: l, children: /* @__PURE__ */ d("div", { children: [
|
|
2205
|
+
/* @__PURE__ */ e("div", { className: f, role: "tablist", children: t.map((N) => /* @__PURE__ */ e(
|
|
2206
2206
|
"button",
|
|
2207
2207
|
{
|
|
2208
2208
|
type: "button",
|
|
@@ -2230,72 +2230,72 @@ const ur = ({
|
|
|
2230
2230
|
}
|
|
2231
2231
|
)
|
|
2232
2232
|
] }) });
|
|
2233
|
-
},
|
|
2233
|
+
}, Nt = {
|
|
2234
2234
|
sm: "max-w-md",
|
|
2235
2235
|
md: "max-w-lg",
|
|
2236
2236
|
lg: "max-w-2xl",
|
|
2237
2237
|
xl: "max-w-4xl",
|
|
2238
2238
|
full: "max-w-full mx-4"
|
|
2239
2239
|
};
|
|
2240
|
-
function
|
|
2241
|
-
open:
|
|
2240
|
+
function wt({
|
|
2241
|
+
open: t,
|
|
2242
2242
|
onClose: n,
|
|
2243
|
-
title:
|
|
2243
|
+
title: r,
|
|
2244
2244
|
size: a = "md",
|
|
2245
2245
|
closeOnBackdropClick: s = !0,
|
|
2246
2246
|
closeOnEscape: c = !0,
|
|
2247
2247
|
className: h,
|
|
2248
|
-
backdropClassName:
|
|
2248
|
+
backdropClassName: g,
|
|
2249
2249
|
children: p,
|
|
2250
2250
|
footer: y,
|
|
2251
2251
|
showCloseButton: u = !0
|
|
2252
2252
|
}) {
|
|
2253
2253
|
const l = X(null), i = X(null);
|
|
2254
2254
|
G(() => {
|
|
2255
|
-
if (!
|
|
2255
|
+
if (!t || !c) return;
|
|
2256
2256
|
const C = (N) => {
|
|
2257
2257
|
N.key === "Escape" && n();
|
|
2258
2258
|
};
|
|
2259
2259
|
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
2260
|
-
}, [
|
|
2260
|
+
}, [t, c, n]), G(() => (t ? (i.current = document.activeElement, l.current && l.current.focus(), document.body.style.overflow = "hidden") : (i.current && i.current.focus(), document.body.style.overflow = ""), () => {
|
|
2261
2261
|
document.body.style.overflow = "";
|
|
2262
|
-
}), [
|
|
2262
|
+
}), [t]);
|
|
2263
2263
|
const f = (C) => {
|
|
2264
2264
|
s && C.target === C.currentTarget && n();
|
|
2265
2265
|
};
|
|
2266
|
-
return
|
|
2266
|
+
return t ? /* @__PURE__ */ e(
|
|
2267
2267
|
"div",
|
|
2268
2268
|
{
|
|
2269
|
-
className:
|
|
2269
|
+
className: b(
|
|
2270
2270
|
"fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2271
2271
|
"bg-black/20",
|
|
2272
2272
|
// 'animate-fade-in',
|
|
2273
|
-
|
|
2273
|
+
g
|
|
2274
2274
|
),
|
|
2275
2275
|
onClick: f,
|
|
2276
2276
|
children: /* @__PURE__ */ d(
|
|
2277
2277
|
"div",
|
|
2278
2278
|
{
|
|
2279
2279
|
ref: l,
|
|
2280
|
-
className:
|
|
2280
|
+
className: b(
|
|
2281
2281
|
"relative w-full bg-white dark:bg-secondary-800 rounded-modal shadow-modal rounded-md",
|
|
2282
2282
|
// 'animate-scale-in',
|
|
2283
2283
|
"focus:outline-none",
|
|
2284
|
-
|
|
2284
|
+
Nt[a],
|
|
2285
2285
|
h
|
|
2286
2286
|
),
|
|
2287
2287
|
role: "dialog",
|
|
2288
2288
|
"aria-modal": "true",
|
|
2289
|
-
"aria-labelledby":
|
|
2289
|
+
"aria-labelledby": r ? "modal-title" : void 0,
|
|
2290
2290
|
tabIndex: -1,
|
|
2291
2291
|
children: [
|
|
2292
|
-
(
|
|
2293
|
-
|
|
2292
|
+
(r || u) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between p-6 pb-0", children: [
|
|
2293
|
+
r && /* @__PURE__ */ e(
|
|
2294
2294
|
"span",
|
|
2295
2295
|
{
|
|
2296
2296
|
id: "modal-title",
|
|
2297
2297
|
className: "text-lg font-semibold text-secondary-800 dark:text-secondary-200",
|
|
2298
|
-
children:
|
|
2298
|
+
children: r
|
|
2299
2299
|
}
|
|
2300
2300
|
),
|
|
2301
2301
|
u && /* @__PURE__ */ e(
|
|
@@ -2317,32 +2317,32 @@ function wr({
|
|
|
2317
2317
|
) : null;
|
|
2318
2318
|
}
|
|
2319
2319
|
const Z = ({
|
|
2320
|
-
variant:
|
|
2320
|
+
variant: t = "body",
|
|
2321
2321
|
size: n = "md",
|
|
2322
|
-
weight:
|
|
2322
|
+
weight: r = "normal",
|
|
2323
2323
|
color: a = "current",
|
|
2324
2324
|
align: s = "left",
|
|
2325
2325
|
truncate: c = !1,
|
|
2326
2326
|
italic: h = !1,
|
|
2327
|
-
underline:
|
|
2327
|
+
underline: g = !1,
|
|
2328
2328
|
lineHeight: p = "normal",
|
|
2329
2329
|
as: y,
|
|
2330
2330
|
className: u,
|
|
2331
2331
|
children: l,
|
|
2332
2332
|
...i
|
|
2333
2333
|
}) => {
|
|
2334
|
-
const f = y ||
|
|
2334
|
+
const f = y || Ct(t), C = b(
|
|
2335
2335
|
// Base styles
|
|
2336
2336
|
"font-primary",
|
|
2337
2337
|
// Variant styles
|
|
2338
2338
|
{
|
|
2339
|
-
"leading-relaxed":
|
|
2340
|
-
"text-sm leading-tight":
|
|
2341
|
-
"text-sm font-medium leading-none":
|
|
2342
|
-
"font-mono text-sm bg-neutral-100 dark:bg-neutral-800 px-1 py-0.5 rounded":
|
|
2339
|
+
"leading-relaxed": t === "body",
|
|
2340
|
+
"text-sm leading-tight": t === "caption",
|
|
2341
|
+
"text-sm font-medium leading-none": t === "label",
|
|
2342
|
+
"font-mono text-sm bg-neutral-100 dark:bg-neutral-800 px-1 py-0.5 rounded": t === "code"
|
|
2343
2343
|
},
|
|
2344
2344
|
// Size variants (override variant sizes)
|
|
2345
|
-
|
|
2345
|
+
t !== "code" && {
|
|
2346
2346
|
"text-xs": n === "xs",
|
|
2347
2347
|
"text-sm": n === "sm",
|
|
2348
2348
|
"text-base": n === "md",
|
|
@@ -2350,12 +2350,12 @@ const Z = ({
|
|
|
2350
2350
|
"text-xl": n === "xl"
|
|
2351
2351
|
},
|
|
2352
2352
|
// Weight variants
|
|
2353
|
-
|
|
2354
|
-
"font-light":
|
|
2355
|
-
"font-normal":
|
|
2356
|
-
"font-medium":
|
|
2357
|
-
"font-semibold":
|
|
2358
|
-
"font-bold":
|
|
2353
|
+
t !== "label" && {
|
|
2354
|
+
"font-light": r === "light",
|
|
2355
|
+
"font-normal": r === "normal",
|
|
2356
|
+
"font-medium": r === "medium",
|
|
2357
|
+
"font-semibold": r === "semibold",
|
|
2358
|
+
"font-bold": r === "bold"
|
|
2359
2359
|
},
|
|
2360
2360
|
// Color variants. Tekst-tonen lopen via de semantische `--text-*` tokens
|
|
2361
2361
|
// (gedefinieerd voor light én dark in global.css) zodat ze matchen met de
|
|
@@ -2381,7 +2381,7 @@ const Z = ({
|
|
|
2381
2381
|
"text-justify": s === "justify"
|
|
2382
2382
|
},
|
|
2383
2383
|
// Line height (override variant line heights)
|
|
2384
|
-
|
|
2384
|
+
t === "body" && {
|
|
2385
2385
|
"leading-tight": p === "tight",
|
|
2386
2386
|
"leading-normal": p === "normal",
|
|
2387
2387
|
"leading-relaxed": p === "relaxed"
|
|
@@ -2389,42 +2389,42 @@ const Z = ({
|
|
|
2389
2389
|
// Text decorations
|
|
2390
2390
|
{
|
|
2391
2391
|
italic: h,
|
|
2392
|
-
underline:
|
|
2392
|
+
underline: g,
|
|
2393
2393
|
truncate: c
|
|
2394
2394
|
},
|
|
2395
2395
|
u
|
|
2396
2396
|
);
|
|
2397
2397
|
return /* @__PURE__ */ e(f, { className: C, ...i, children: l });
|
|
2398
2398
|
};
|
|
2399
|
-
function
|
|
2399
|
+
function Ct(t) {
|
|
2400
2400
|
return {
|
|
2401
2401
|
body: "p",
|
|
2402
2402
|
caption: "span",
|
|
2403
2403
|
label: "span",
|
|
2404
2404
|
code: "code"
|
|
2405
|
-
}[
|
|
2405
|
+
}[t] || "p";
|
|
2406
2406
|
}
|
|
2407
|
-
const
|
|
2408
|
-
value:
|
|
2407
|
+
const St = ({
|
|
2408
|
+
value: t,
|
|
2409
2409
|
onChange: n,
|
|
2410
|
-
label:
|
|
2410
|
+
label: r,
|
|
2411
2411
|
placeholder: a = "Select or upload a file",
|
|
2412
2412
|
error: s,
|
|
2413
2413
|
disabled: c,
|
|
2414
2414
|
accept: h,
|
|
2415
|
-
onListFiles:
|
|
2415
|
+
onListFiles: g,
|
|
2416
2416
|
onListMounts: p,
|
|
2417
2417
|
onUploadFile: y,
|
|
2418
2418
|
onDownloadFile: u,
|
|
2419
2419
|
onRegisterFile: l
|
|
2420
2420
|
}) => {
|
|
2421
2421
|
const [i, f] = V(!1), [C, N] = V([]), [k, B] = V(null), [x, q] = V("/"), [K, H] = V([]), [F, E] = V(!1), [J, z] = V(""), [v, T] = V(
|
|
2422
|
-
typeof
|
|
2422
|
+
typeof t == "object" ? t : null
|
|
2423
2423
|
), [m, $] = V(!1), [L, D] = V(""), P = X(null);
|
|
2424
2424
|
G(() => {
|
|
2425
2425
|
i && M();
|
|
2426
2426
|
}, [i]), G(() => {
|
|
2427
|
-
i && k &&
|
|
2427
|
+
i && k && te();
|
|
2428
2428
|
}, [i, k, x, J]);
|
|
2429
2429
|
const M = async () => {
|
|
2430
2430
|
E(!0);
|
|
@@ -2436,11 +2436,11 @@ const Sr = ({
|
|
|
2436
2436
|
} finally {
|
|
2437
2437
|
E(!1);
|
|
2438
2438
|
}
|
|
2439
|
-
},
|
|
2439
|
+
}, te = async () => {
|
|
2440
2440
|
if (k) {
|
|
2441
2441
|
E(!0);
|
|
2442
2442
|
try {
|
|
2443
|
-
const o = await
|
|
2443
|
+
const o = await g?.({ mountId: k.id, name: J, path: x });
|
|
2444
2444
|
o?.data && H(o.data);
|
|
2445
2445
|
} catch (o) {
|
|
2446
2446
|
console.error("Failed to load files", o);
|
|
@@ -2507,7 +2507,7 @@ const Sr = ({
|
|
|
2507
2507
|
mountId: k.id,
|
|
2508
2508
|
providerKey: o,
|
|
2509
2509
|
ownerId: "me"
|
|
2510
|
-
}), await
|
|
2510
|
+
}), await te()), $(!1), D("");
|
|
2511
2511
|
} catch (o) {
|
|
2512
2512
|
console.error("Failed to create folder", o);
|
|
2513
2513
|
} finally {
|
|
@@ -2541,7 +2541,7 @@ const Sr = ({
|
|
|
2541
2541
|
};
|
|
2542
2542
|
}, [K, x]), Q = (o) => {
|
|
2543
2543
|
q((w) => `${w}${o}/`);
|
|
2544
|
-
},
|
|
2544
|
+
}, re = () => {
|
|
2545
2545
|
const o = x.split("/").filter((w) => w !== "");
|
|
2546
2546
|
o.pop(), o.length === 0 ? q("/") : q(`${o.join("/")}/`);
|
|
2547
2547
|
}, U = ie(() => {
|
|
@@ -2570,7 +2570,7 @@ const Sr = ({
|
|
|
2570
2570
|
color: w.type === "folder" ? "warning" : "secondary"
|
|
2571
2571
|
}
|
|
2572
2572
|
),
|
|
2573
|
-
/* @__PURE__ */ e("span", { className:
|
|
2573
|
+
/* @__PURE__ */ e("span", { className: b(w.type === "folder" && "font-medium"), children: o })
|
|
2574
2574
|
] })
|
|
2575
2575
|
},
|
|
2576
2576
|
{
|
|
@@ -2620,12 +2620,12 @@ const Sr = ({
|
|
|
2620
2620
|
}
|
|
2621
2621
|
];
|
|
2622
2622
|
return /* @__PURE__ */ d("div", { className: "space-y-1", children: [
|
|
2623
|
-
|
|
2623
|
+
r && /* @__PURE__ */ e(Z, { variant: "label", size: "sm", weight: "medium", children: r }),
|
|
2624
2624
|
/* @__PURE__ */ d(
|
|
2625
2625
|
"div",
|
|
2626
2626
|
{
|
|
2627
2627
|
onClick: () => !c && f(!0),
|
|
2628
|
-
className:
|
|
2628
|
+
className: b(
|
|
2629
2629
|
"flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
|
|
2630
2630
|
"hover:border-primary-400 bg-white dark:bg-secondary-800",
|
|
2631
2631
|
s ? "border-error" : "border-neutral-200 dark:border-neutral-700",
|
|
@@ -2647,7 +2647,7 @@ const Sr = ({
|
|
|
2647
2647
|
),
|
|
2648
2648
|
s && /* @__PURE__ */ e(Z, { variant: "body", size: "xs", className: "text-error", children: s }),
|
|
2649
2649
|
/* @__PURE__ */ e(
|
|
2650
|
-
|
|
2650
|
+
wt,
|
|
2651
2651
|
{
|
|
2652
2652
|
open: i,
|
|
2653
2653
|
onClose: () => {
|
|
@@ -2656,7 +2656,7 @@ const Sr = ({
|
|
|
2656
2656
|
title: k ? `Explorer: ${k.name}` : "Select Storage Mount",
|
|
2657
2657
|
size: "lg",
|
|
2658
2658
|
children: /* @__PURE__ */ e(
|
|
2659
|
-
|
|
2659
|
+
kt,
|
|
2660
2660
|
{
|
|
2661
2661
|
variant: "pills",
|
|
2662
2662
|
items: [
|
|
@@ -2671,7 +2671,7 @@ const Sr = ({
|
|
|
2671
2671
|
variant: "ghost",
|
|
2672
2672
|
size: "sm",
|
|
2673
2673
|
onClick: () => {
|
|
2674
|
-
x && x !== "/" ?
|
|
2674
|
+
x && x !== "/" ? re() : B(null);
|
|
2675
2675
|
},
|
|
2676
2676
|
leftIcon: /* @__PURE__ */ e(oe, { icon: Ne, size: "xs" }),
|
|
2677
2677
|
children: x ? "Back" : "Back to Mounts"
|
|
@@ -2771,7 +2771,7 @@ const Sr = ({
|
|
|
2771
2771
|
" be uploaded to platform storage."
|
|
2772
2772
|
] }),
|
|
2773
2773
|
/* @__PURE__ */ d("label", { className: "cursor-pointer", children: [
|
|
2774
|
-
/* @__PURE__ */ d("div", { className:
|
|
2774
|
+
/* @__PURE__ */ d("div", { className: b(
|
|
2775
2775
|
"inline-flex items-center justify-center font-medium rounded-lg transition-colors duration-200 px-6 py-3 text-base bg-primary text-white hover:bg-primary-600",
|
|
2776
2776
|
F && "opacity-50 cursor-wait"
|
|
2777
2777
|
), children: [
|
|
@@ -2801,40 +2801,40 @@ const Sr = ({
|
|
|
2801
2801
|
)
|
|
2802
2802
|
] });
|
|
2803
2803
|
};
|
|
2804
|
-
function Me(
|
|
2804
|
+
function Me(t, n) {
|
|
2805
2805
|
return n.split(".").reduce(
|
|
2806
|
-
(
|
|
2807
|
-
|
|
2806
|
+
(r, a) => r && typeof r == "object" && a in r ? r[a] : void 0,
|
|
2807
|
+
t
|
|
2808
2808
|
);
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2811
|
-
const a = n.split("."), s = Array.isArray(
|
|
2810
|
+
function Lt(t, n, r) {
|
|
2811
|
+
const a = n.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2812
2812
|
let c = s;
|
|
2813
2813
|
for (let h = 0; h < a.length - 1; h++) {
|
|
2814
|
-
const
|
|
2815
|
-
c[
|
|
2814
|
+
const g = a[h], p = c[g];
|
|
2815
|
+
c[g] = p && typeof p == "object" ? Array.isArray(p) ? [...p] : { ...p } : {}, c = c[g];
|
|
2816
2816
|
}
|
|
2817
|
-
return c[a[a.length - 1]] =
|
|
2817
|
+
return c[a[a.length - 1]] = r, s;
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2820
|
-
const
|
|
2819
|
+
function Mt(t, n) {
|
|
2820
|
+
const r = n.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2821
2821
|
let s = a;
|
|
2822
|
-
for (let c = 0; c <
|
|
2823
|
-
const h =
|
|
2822
|
+
for (let c = 0; c < r.length - 1; c++) {
|
|
2823
|
+
const h = r[c];
|
|
2824
2824
|
if (!s[h] || typeof s[h] != "object") return a;
|
|
2825
2825
|
s[h] = Array.isArray(s[h]) ? [...s[h]] : { ...s[h] }, s = s[h];
|
|
2826
2826
|
}
|
|
2827
|
-
return delete s[
|
|
2827
|
+
return delete s[r[r.length - 1]], a;
|
|
2828
2828
|
}
|
|
2829
|
-
const
|
|
2830
|
-
groups:
|
|
2829
|
+
const tr = ({
|
|
2830
|
+
groups: t,
|
|
2831
2831
|
data: n,
|
|
2832
|
-
onSubmit:
|
|
2832
|
+
onSubmit: r,
|
|
2833
2833
|
onCancel: a,
|
|
2834
2834
|
onChange: s,
|
|
2835
2835
|
transform: c,
|
|
2836
2836
|
validate: h,
|
|
2837
|
-
submitButton:
|
|
2837
|
+
submitButton: g = { label: "Submit", variant: "primary" },
|
|
2838
2838
|
cancelButton: p = { label: "Cancel", variant: "outline" },
|
|
2839
2839
|
showButtons: y = !0,
|
|
2840
2840
|
layout: u = "vertical",
|
|
@@ -2850,7 +2850,7 @@ const rt = ({
|
|
|
2850
2850
|
}, [n]);
|
|
2851
2851
|
const F = ae(
|
|
2852
2852
|
(m, $, L) => {
|
|
2853
|
-
const D =
|
|
2853
|
+
const D = t.flatMap((P) => P.items).find((P) => P.name === m);
|
|
2854
2854
|
if (!D) return null;
|
|
2855
2855
|
if (D.required && ($ == null || $ === ""))
|
|
2856
2856
|
return `${D.label} is required`;
|
|
@@ -2862,14 +2862,14 @@ const rt = ({
|
|
|
2862
2862
|
if (Array.isArray($) && D.arrayFields) {
|
|
2863
2863
|
const P = [];
|
|
2864
2864
|
let M = !1;
|
|
2865
|
-
if ($.forEach((
|
|
2865
|
+
if ($.forEach((te, ne) => {
|
|
2866
2866
|
const W = {};
|
|
2867
2867
|
for (const S of D.arrayFields) {
|
|
2868
|
-
const I =
|
|
2868
|
+
const I = te?.[S.name];
|
|
2869
2869
|
if (S.required && (I == null || I === ""))
|
|
2870
2870
|
W[S.name] = `${S.label} is required`, M = !0;
|
|
2871
2871
|
else if (S.validator) {
|
|
2872
|
-
const O = S.validator(I,
|
|
2872
|
+
const O = S.validator(I, te);
|
|
2873
2873
|
O && (W[S.name] = O, M = !0);
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
@@ -2880,26 +2880,26 @@ const rt = ({
|
|
|
2880
2880
|
}
|
|
2881
2881
|
return D.validator ? D.validator($, L) : null;
|
|
2882
2882
|
},
|
|
2883
|
-
[
|
|
2883
|
+
[t]
|
|
2884
2884
|
), E = ae(
|
|
2885
2885
|
(m, $) => {
|
|
2886
|
-
let L =
|
|
2886
|
+
let L = Lt(
|
|
2887
2887
|
k,
|
|
2888
2888
|
m,
|
|
2889
2889
|
$
|
|
2890
2890
|
);
|
|
2891
|
-
|
|
2891
|
+
t.flatMap((M) => M.items).find((M) => M.name === m)?.removeIfEmpty && ($ == null || $ === "") && (L = Mt(L, m)), B(L), H((M) => ({ ...M, [m]: !0 }));
|
|
2892
2892
|
const P = F(m, $, L);
|
|
2893
2893
|
q((M) => ({
|
|
2894
2894
|
...M,
|
|
2895
2895
|
[m]: P || ""
|
|
2896
2896
|
})), s?.(L, m);
|
|
2897
2897
|
},
|
|
2898
|
-
[k,
|
|
2898
|
+
[k, t, F, s]
|
|
2899
2899
|
), J = ae(
|
|
2900
2900
|
async (m) => {
|
|
2901
2901
|
if (console.log("handleSubmit"), m.preventDefault(), i) return;
|
|
2902
|
-
const $ = {}, L =
|
|
2902
|
+
const $ = {}, L = t.flatMap((P) => P.items);
|
|
2903
2903
|
for (const P of L) {
|
|
2904
2904
|
if (P.hidden || P.conditional && !P.conditional(k))
|
|
2905
2905
|
continue;
|
|
@@ -2917,9 +2917,9 @@ const rt = ({
|
|
|
2917
2917
|
if (q($), console.log("newErrors", $), Object.keys($).some((P) => $[P]))
|
|
2918
2918
|
return;
|
|
2919
2919
|
const D = c ? c(k) : k;
|
|
2920
|
-
await
|
|
2920
|
+
await r?.(k, D);
|
|
2921
2921
|
},
|
|
2922
|
-
[k,
|
|
2922
|
+
[k, t, F, h, c, r, i]
|
|
2923
2923
|
), z = ae(
|
|
2924
2924
|
(m) => {
|
|
2925
2925
|
const $ = Me(k, m.name), L = K[m.name] ? x[m.name] : void 0, D = m.disabled || i, P = {
|
|
@@ -2977,7 +2977,7 @@ const rt = ({
|
|
|
2977
2977
|
);
|
|
2978
2978
|
case "checkbox":
|
|
2979
2979
|
return /* @__PURE__ */ e(
|
|
2980
|
-
|
|
2980
|
+
ge,
|
|
2981
2981
|
{
|
|
2982
2982
|
...P,
|
|
2983
2983
|
checked: !!$,
|
|
@@ -3013,7 +3013,7 @@ const rt = ({
|
|
|
3013
3013
|
);
|
|
3014
3014
|
case "file":
|
|
3015
3015
|
return /* @__PURE__ */ e(
|
|
3016
|
-
|
|
3016
|
+
St,
|
|
3017
3017
|
{
|
|
3018
3018
|
...P,
|
|
3019
3019
|
value: $,
|
|
@@ -3053,10 +3053,10 @@ const rt = ({
|
|
|
3053
3053
|
});
|
|
3054
3054
|
case "array": {
|
|
3055
3055
|
const M = $ || [];
|
|
3056
|
-
let
|
|
3056
|
+
let te = [];
|
|
3057
3057
|
if (typeof L == "string" && L.startsWith("["))
|
|
3058
3058
|
try {
|
|
3059
|
-
|
|
3059
|
+
te = JSON.parse(L);
|
|
3060
3060
|
} catch {
|
|
3061
3061
|
}
|
|
3062
3062
|
const ne = () => {
|
|
@@ -3091,7 +3091,7 @@ const rt = ({
|
|
|
3091
3091
|
}
|
|
3092
3092
|
) }),
|
|
3093
3093
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: m.arrayFields?.map((A) => {
|
|
3094
|
-
const Q =
|
|
3094
|
+
const Q = te?.[O]?.[A.name];
|
|
3095
3095
|
return /* @__PURE__ */ d(
|
|
3096
3096
|
"div",
|
|
3097
3097
|
{
|
|
@@ -3110,7 +3110,7 @@ const rt = ({
|
|
|
3110
3110
|
}
|
|
3111
3111
|
) }),
|
|
3112
3112
|
(() => {
|
|
3113
|
-
const
|
|
3113
|
+
const re = {
|
|
3114
3114
|
value: I?.[A.name] || "",
|
|
3115
3115
|
disabled: D,
|
|
3116
3116
|
required: A.required,
|
|
@@ -3127,7 +3127,7 @@ const rt = ({
|
|
|
3127
3127
|
return /* @__PURE__ */ e(
|
|
3128
3128
|
ue,
|
|
3129
3129
|
{
|
|
3130
|
-
...
|
|
3130
|
+
...re,
|
|
3131
3131
|
onChange: (U) => S(
|
|
3132
3132
|
O,
|
|
3133
3133
|
A.name,
|
|
@@ -3143,7 +3143,7 @@ const rt = ({
|
|
|
3143
3143
|
return /* @__PURE__ */ e(
|
|
3144
3144
|
ke,
|
|
3145
3145
|
{
|
|
3146
|
-
...
|
|
3146
|
+
...re,
|
|
3147
3147
|
onChange: (U) => S(
|
|
3148
3148
|
O,
|
|
3149
3149
|
A.name,
|
|
@@ -3158,7 +3158,7 @@ const rt = ({
|
|
|
3158
3158
|
return /* @__PURE__ */ e(
|
|
3159
3159
|
ve,
|
|
3160
3160
|
{
|
|
3161
|
-
...
|
|
3161
|
+
...re,
|
|
3162
3162
|
onChange: (U) => S(
|
|
3163
3163
|
O,
|
|
3164
3164
|
A.name,
|
|
@@ -3179,9 +3179,9 @@ const rt = ({
|
|
|
3179
3179
|
);
|
|
3180
3180
|
case "checkbox":
|
|
3181
3181
|
return /* @__PURE__ */ e(
|
|
3182
|
-
|
|
3182
|
+
ge,
|
|
3183
3183
|
{
|
|
3184
|
-
...
|
|
3184
|
+
...re,
|
|
3185
3185
|
checked: !!I?.[A.name],
|
|
3186
3186
|
onChange: (U) => S(
|
|
3187
3187
|
O,
|
|
@@ -3223,7 +3223,7 @@ const rt = ({
|
|
|
3223
3223
|
return /* @__PURE__ */ e(
|
|
3224
3224
|
ye,
|
|
3225
3225
|
{
|
|
3226
|
-
...
|
|
3226
|
+
...re,
|
|
3227
3227
|
value: U ? new Date(U) : null,
|
|
3228
3228
|
onChange: (le) => S(
|
|
3229
3229
|
O,
|
|
@@ -3299,7 +3299,7 @@ const rt = ({
|
|
|
3299
3299
|
return null;
|
|
3300
3300
|
const $ = m.items.filter((D) => !(D.hidden || D.conditional && !D.conditional(k)));
|
|
3301
3301
|
if ($.length === 0) return null;
|
|
3302
|
-
const L =
|
|
3302
|
+
const L = b(
|
|
3303
3303
|
"space-y-2",
|
|
3304
3304
|
{
|
|
3305
3305
|
"grid gap-2": m.layout === "grid",
|
|
@@ -3342,7 +3342,7 @@ const rt = ({
|
|
|
3342
3342
|
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: L, children: $.map((D) => (K[D.name] && x[D.name], /* @__PURE__ */ d(
|
|
3343
3343
|
"div",
|
|
3344
3344
|
{
|
|
3345
|
-
className:
|
|
3345
|
+
className: b(
|
|
3346
3346
|
"space-y-1",
|
|
3347
3347
|
D.width && typeof D.width == "string" && `w-[${D.width}]`,
|
|
3348
3348
|
D.width && typeof D.width == "number" && `col-span-${D.width}`
|
|
@@ -3371,7 +3371,7 @@ const rt = ({
|
|
|
3371
3371
|
);
|
|
3372
3372
|
},
|
|
3373
3373
|
[k, K, x, z]
|
|
3374
|
-
), T =
|
|
3374
|
+
), T = b(
|
|
3375
3375
|
"space-y-6",
|
|
3376
3376
|
{
|
|
3377
3377
|
"max-w-md": l === "sm",
|
|
@@ -3382,8 +3382,8 @@ const rt = ({
|
|
|
3382
3382
|
f
|
|
3383
3383
|
);
|
|
3384
3384
|
return /* @__PURE__ */ d("form", { ref: C, onSubmit: J, className: T, children: [
|
|
3385
|
-
/* @__PURE__ */ e("div", { className: "space-y-8", children:
|
|
3386
|
-
y && /* @__PURE__ */ d("div", { className:
|
|
3385
|
+
/* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(v) }),
|
|
3386
|
+
y && /* @__PURE__ */ d("div", { className: b("flex gap-3 justify-end pt-8"), children: [
|
|
3387
3387
|
a && /* @__PURE__ */ e(
|
|
3388
3388
|
ee,
|
|
3389
3389
|
{
|
|
@@ -3400,17 +3400,17 @@ const rt = ({
|
|
|
3400
3400
|
ee,
|
|
3401
3401
|
{
|
|
3402
3402
|
type: "submit",
|
|
3403
|
-
variant:
|
|
3404
|
-
size:
|
|
3405
|
-
disabled:
|
|
3403
|
+
variant: g.variant,
|
|
3404
|
+
size: g.size || l,
|
|
3405
|
+
disabled: g.disabled || i,
|
|
3406
3406
|
loading: i,
|
|
3407
|
-
className:
|
|
3408
|
-
children:
|
|
3407
|
+
className: g.className,
|
|
3408
|
+
children: g.label
|
|
3409
3409
|
}
|
|
3410
3410
|
)
|
|
3411
3411
|
] })
|
|
3412
3412
|
] });
|
|
3413
|
-
},
|
|
3413
|
+
}, Et = {
|
|
3414
3414
|
default: "bg-neutral-container text-default",
|
|
3415
3415
|
primary: "bg-accent-container text-accent",
|
|
3416
3416
|
secondary: "bg-neutral-container text-muted",
|
|
@@ -3418,11 +3418,11 @@ const rt = ({
|
|
|
3418
3418
|
warning: "bg-notice-container text-on-notice",
|
|
3419
3419
|
error: "bg-error-container text-error",
|
|
3420
3420
|
info: "bg-beta-container text-link"
|
|
3421
|
-
}, $
|
|
3421
|
+
}, $t = {
|
|
3422
3422
|
sm: "px-2 py-0.5 text-xs",
|
|
3423
3423
|
md: "px-2.5 py-1 text-sm",
|
|
3424
3424
|
lg: "px-3 py-1.5 text-base"
|
|
3425
|
-
},
|
|
3425
|
+
}, zt = {
|
|
3426
3426
|
default: "bg-neutral-fill",
|
|
3427
3427
|
primary: "bg-accent-fill",
|
|
3428
3428
|
secondary: "bg-neutral-fill",
|
|
@@ -3431,42 +3431,42 @@ const rt = ({
|
|
|
3431
3431
|
error: "bg-error-fill",
|
|
3432
3432
|
info: "bg-beta-fill"
|
|
3433
3433
|
};
|
|
3434
|
-
function
|
|
3435
|
-
variant:
|
|
3434
|
+
function rr({
|
|
3435
|
+
variant: t = "default",
|
|
3436
3436
|
size: n = "md",
|
|
3437
|
-
dot:
|
|
3437
|
+
dot: r = !1,
|
|
3438
3438
|
icon: a,
|
|
3439
3439
|
dismissible: s = !1,
|
|
3440
3440
|
onDismiss: c,
|
|
3441
3441
|
className: h,
|
|
3442
|
-
children:
|
|
3442
|
+
children: g,
|
|
3443
3443
|
...p
|
|
3444
3444
|
}) {
|
|
3445
3445
|
return /* @__PURE__ */ d(
|
|
3446
3446
|
"span",
|
|
3447
3447
|
{
|
|
3448
|
-
className:
|
|
3448
|
+
className: b(
|
|
3449
3449
|
// Base styles
|
|
3450
3450
|
"inline-flex items-center font-medium rounded-full",
|
|
3451
3451
|
// Variant styles
|
|
3452
|
-
|
|
3452
|
+
Et[t],
|
|
3453
3453
|
// Size styles
|
|
3454
|
-
$
|
|
3454
|
+
$t[n],
|
|
3455
3455
|
h
|
|
3456
3456
|
),
|
|
3457
3457
|
...p,
|
|
3458
3458
|
children: [
|
|
3459
|
-
|
|
3459
|
+
r && /* @__PURE__ */ e(
|
|
3460
3460
|
"span",
|
|
3461
3461
|
{
|
|
3462
|
-
className:
|
|
3462
|
+
className: b(
|
|
3463
3463
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3464
|
-
|
|
3464
|
+
zt[t]
|
|
3465
3465
|
)
|
|
3466
3466
|
}
|
|
3467
3467
|
),
|
|
3468
|
-
a && /* @__PURE__ */ e("span", { className:
|
|
3469
|
-
|
|
3468
|
+
a && /* @__PURE__ */ e("span", { className: b("flex-shrink-0", g && "mr-1"), children: a }),
|
|
3469
|
+
g,
|
|
3470
3470
|
s && c && /* @__PURE__ */ e(
|
|
3471
3471
|
"button",
|
|
3472
3472
|
{
|
|
@@ -3487,28 +3487,28 @@ function tt({
|
|
|
3487
3487
|
}
|
|
3488
3488
|
);
|
|
3489
3489
|
}
|
|
3490
|
-
const
|
|
3490
|
+
const Dt = {
|
|
3491
3491
|
xs: "h-3 w-3",
|
|
3492
3492
|
sm: "h-4 w-4",
|
|
3493
3493
|
md: "h-6 w-6",
|
|
3494
3494
|
lg: "h-8 w-8",
|
|
3495
3495
|
xl: "h-12 w-12"
|
|
3496
|
-
},
|
|
3496
|
+
}, Tt = {
|
|
3497
3497
|
primary: "text-primary",
|
|
3498
3498
|
secondary: "text-secondary-600",
|
|
3499
3499
|
white: "text-white",
|
|
3500
3500
|
current: "text-current"
|
|
3501
|
-
},
|
|
3501
|
+
}, At = {
|
|
3502
3502
|
xs: "text-xs",
|
|
3503
3503
|
sm: "text-sm",
|
|
3504
3504
|
md: "text-sm",
|
|
3505
3505
|
lg: "text-base",
|
|
3506
3506
|
xl: "text-lg"
|
|
3507
3507
|
};
|
|
3508
|
-
function
|
|
3509
|
-
size:
|
|
3508
|
+
function ar({
|
|
3509
|
+
size: t = "md",
|
|
3510
3510
|
variant: n = "primary",
|
|
3511
|
-
label:
|
|
3511
|
+
label: r = "Loading...",
|
|
3512
3512
|
showLabel: a = !1,
|
|
3513
3513
|
className: s,
|
|
3514
3514
|
...c
|
|
@@ -3516,7 +3516,7 @@ function at({
|
|
|
3516
3516
|
return /* @__PURE__ */ d(
|
|
3517
3517
|
"div",
|
|
3518
3518
|
{
|
|
3519
|
-
className:
|
|
3519
|
+
className: b(
|
|
3520
3520
|
"inline-flex items-center",
|
|
3521
3521
|
a ? "flex-col space-y-2" : "",
|
|
3522
3522
|
s
|
|
@@ -3526,10 +3526,10 @@ function at({
|
|
|
3526
3526
|
/* @__PURE__ */ d(
|
|
3527
3527
|
"svg",
|
|
3528
3528
|
{
|
|
3529
|
-
className:
|
|
3529
|
+
className: b(
|
|
3530
3530
|
"animate-spin",
|
|
3531
|
-
|
|
3532
|
-
|
|
3531
|
+
Dt[t],
|
|
3532
|
+
Tt[n]
|
|
3533
3533
|
),
|
|
3534
3534
|
fill: "none",
|
|
3535
3535
|
viewBox: "0 0 24 24",
|
|
@@ -3561,27 +3561,27 @@ function at({
|
|
|
3561
3561
|
a && /* @__PURE__ */ e(
|
|
3562
3562
|
"span",
|
|
3563
3563
|
{
|
|
3564
|
-
className:
|
|
3564
|
+
className: b(
|
|
3565
3565
|
"text-secondary-600 dark:text-secondary-400",
|
|
3566
|
-
|
|
3566
|
+
At[t]
|
|
3567
3567
|
),
|
|
3568
|
-
children:
|
|
3568
|
+
children: r
|
|
3569
3569
|
}
|
|
3570
3570
|
),
|
|
3571
|
-
!a && /* @__PURE__ */ e("span", { className: "sr-only", children:
|
|
3571
|
+
!a && /* @__PURE__ */ e("span", { className: "sr-only", children: r })
|
|
3572
3572
|
]
|
|
3573
3573
|
}
|
|
3574
3574
|
);
|
|
3575
3575
|
}
|
|
3576
|
-
const
|
|
3577
|
-
src:
|
|
3576
|
+
const nr = ({
|
|
3577
|
+
src: t,
|
|
3578
3578
|
alt: n,
|
|
3579
|
-
size:
|
|
3579
|
+
size: r = "md",
|
|
3580
3580
|
aspectRatio: a = "auto",
|
|
3581
3581
|
radius: s = "md",
|
|
3582
3582
|
showLoading: c = !0,
|
|
3583
3583
|
showError: h = !0,
|
|
3584
|
-
fallback:
|
|
3584
|
+
fallback: g,
|
|
3585
3585
|
loadingContent: p,
|
|
3586
3586
|
errorContent: y,
|
|
3587
3587
|
className: u,
|
|
@@ -3589,24 +3589,24 @@ const nt = ({
|
|
|
3589
3589
|
onError: i,
|
|
3590
3590
|
...f
|
|
3591
3591
|
}) => {
|
|
3592
|
-
const [C, N] = V(!0), [k, B] = V(!1), [x, q] = V(
|
|
3592
|
+
const [C, N] = V(!0), [k, B] = V(!1), [x, q] = V(t), K = (T) => {
|
|
3593
3593
|
N(!1), B(!1), l?.(T);
|
|
3594
3594
|
}, H = (T) => {
|
|
3595
|
-
if (N(!1), B(!0),
|
|
3596
|
-
q(
|
|
3595
|
+
if (N(!1), B(!0), g && x !== g) {
|
|
3596
|
+
q(g), B(!1), N(!0);
|
|
3597
3597
|
return;
|
|
3598
3598
|
}
|
|
3599
3599
|
i?.(T);
|
|
3600
|
-
}, F =
|
|
3600
|
+
}, F = b(
|
|
3601
3601
|
"relative overflow-hidden bg-neutral-100 dark:bg-neutral-800",
|
|
3602
3602
|
// Size variants
|
|
3603
3603
|
{
|
|
3604
|
-
"w-8 h-8":
|
|
3605
|
-
"w-12 h-12":
|
|
3606
|
-
"w-16 h-16":
|
|
3607
|
-
"w-24 h-24":
|
|
3608
|
-
"w-32 h-32":
|
|
3609
|
-
"w-full h-full":
|
|
3604
|
+
"w-8 h-8": r === "xs",
|
|
3605
|
+
"w-12 h-12": r === "sm",
|
|
3606
|
+
"w-16 h-16": r === "md",
|
|
3607
|
+
"w-24 h-24": r === "lg",
|
|
3608
|
+
"w-32 h-32": r === "xl",
|
|
3609
|
+
"w-full h-full": r === "full"
|
|
3610
3610
|
},
|
|
3611
3611
|
// Aspect ratio variants
|
|
3612
3612
|
{
|
|
@@ -3625,13 +3625,13 @@ const nt = ({
|
|
|
3625
3625
|
"rounded-full": s === "full"
|
|
3626
3626
|
},
|
|
3627
3627
|
u
|
|
3628
|
-
), E =
|
|
3628
|
+
), E = b(
|
|
3629
3629
|
"w-full h-full object-cover transition-opacity duration-200",
|
|
3630
3630
|
{
|
|
3631
3631
|
"opacity-0": C || k,
|
|
3632
3632
|
"opacity-100": !C && !k
|
|
3633
3633
|
}
|
|
3634
|
-
), J =
|
|
3634
|
+
), J = b(
|
|
3635
3635
|
"absolute inset-0 flex items-center justify-center",
|
|
3636
3636
|
"text-neutral-400 dark:text-neutral-500"
|
|
3637
3637
|
), z = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-neutral-300 dark:bg-neutral-600 rounded" }) }), v = /* @__PURE__ */ d("div", { className: "text-center", children: [
|
|
@@ -3670,47 +3670,47 @@ const nt = ({
|
|
|
3670
3670
|
C && c && /* @__PURE__ */ e("div", { className: J, children: p || z }),
|
|
3671
3671
|
k && h && /* @__PURE__ */ e("div", { className: J, children: y || v })
|
|
3672
3672
|
] });
|
|
3673
|
-
},
|
|
3674
|
-
title:
|
|
3673
|
+
}, lr = ({
|
|
3674
|
+
title: t,
|
|
3675
3675
|
subtitle: n,
|
|
3676
|
-
actions:
|
|
3676
|
+
actions: r = [],
|
|
3677
3677
|
children: a,
|
|
3678
3678
|
className: s,
|
|
3679
3679
|
backLabel: c = "Back",
|
|
3680
3680
|
backClassName: h,
|
|
3681
|
-
onBack:
|
|
3681
|
+
onBack: g,
|
|
3682
3682
|
editable: p = !1,
|
|
3683
3683
|
onTitleChange: y
|
|
3684
3684
|
}) => {
|
|
3685
|
-
const [u, l] = V(!1), [i, f] = V(
|
|
3685
|
+
const [u, l] = V(!1), [i, f] = V(t), C = X(null);
|
|
3686
3686
|
G(() => {
|
|
3687
|
-
f(
|
|
3688
|
-
}, [
|
|
3687
|
+
f(t);
|
|
3688
|
+
}, [t]), G(() => {
|
|
3689
3689
|
u && C.current && (C.current.focus(), C.current.select());
|
|
3690
3690
|
}, [u]);
|
|
3691
3691
|
const N = () => {
|
|
3692
3692
|
p && l(!0);
|
|
3693
3693
|
}, k = () => {
|
|
3694
|
-
l(!1), i.trim() !== "" && i !==
|
|
3694
|
+
l(!1), i.trim() !== "" && i !== t && y ? y(i.trim()) : f(t);
|
|
3695
3695
|
}, B = (x) => {
|
|
3696
|
-
x.key === "Enter" ? C.current?.blur() : x.key === "Escape" && (f(
|
|
3696
|
+
x.key === "Enter" ? C.current?.blur() : x.key === "Escape" && (f(t), l(!1));
|
|
3697
3697
|
};
|
|
3698
3698
|
return /* @__PURE__ */ d(
|
|
3699
3699
|
"div",
|
|
3700
3700
|
{
|
|
3701
|
-
className:
|
|
3701
|
+
className: b(
|
|
3702
3702
|
"p-5 pb-3 border-b border-gray-100 dark:border-gray-700",
|
|
3703
3703
|
s
|
|
3704
3704
|
),
|
|
3705
3705
|
children: [
|
|
3706
3706
|
/* @__PURE__ */ d("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
|
|
3707
3707
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-neutral-900 dark:text-neutral-100", children: [
|
|
3708
|
-
|
|
3708
|
+
g && /* @__PURE__ */ e(
|
|
3709
3709
|
"button",
|
|
3710
3710
|
{
|
|
3711
3711
|
type: "button",
|
|
3712
|
-
onClick:
|
|
3713
|
-
className:
|
|
3712
|
+
onClick: g,
|
|
3713
|
+
className: b(
|
|
3714
3714
|
"flex items-center text-sm dark:hover:text-neutral-300 cursor-pointer transition",
|
|
3715
3715
|
h
|
|
3716
3716
|
),
|
|
@@ -3732,16 +3732,16 @@ const nt = ({
|
|
|
3732
3732
|
"h2",
|
|
3733
3733
|
{
|
|
3734
3734
|
onClick: N,
|
|
3735
|
-
className:
|
|
3735
|
+
className: b(
|
|
3736
3736
|
"text-2xl font-semibold truncate",
|
|
3737
3737
|
p && "cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
|
|
3738
3738
|
),
|
|
3739
3739
|
title: p ? "Klik om te bewerken" : void 0,
|
|
3740
|
-
children:
|
|
3740
|
+
children: t
|
|
3741
3741
|
}
|
|
3742
3742
|
)
|
|
3743
3743
|
] }) }),
|
|
3744
|
-
|
|
3744
|
+
r.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: r.map(
|
|
3745
3745
|
(x) => x.splitOptions && x.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
3746
3746
|
$e,
|
|
3747
3747
|
{
|
|
@@ -3761,7 +3761,7 @@ const nt = ({
|
|
|
3761
3761
|
q.stopPropagation(), q.target.blur(), x.onClick();
|
|
3762
3762
|
},
|
|
3763
3763
|
disabled: x.disabled,
|
|
3764
|
-
className:
|
|
3764
|
+
className: b("btn", {
|
|
3765
3765
|
o__primary: x.variant === "primary",
|
|
3766
3766
|
o__secondary: x.variant === "secondary" || x.variant === "outline",
|
|
3767
3767
|
o__ghost: x.variant === "ghost",
|
|
@@ -3780,13 +3780,13 @@ const nt = ({
|
|
|
3780
3780
|
]
|
|
3781
3781
|
}
|
|
3782
3782
|
);
|
|
3783
|
-
},
|
|
3784
|
-
actions:
|
|
3783
|
+
}, sr = ({
|
|
3784
|
+
actions: t = [],
|
|
3785
3785
|
onBack: n,
|
|
3786
|
-
backLabel:
|
|
3786
|
+
backLabel: r = "Back",
|
|
3787
3787
|
className: a,
|
|
3788
3788
|
children: s
|
|
3789
|
-
}) => /* @__PURE__ */ d("div", { className:
|
|
3789
|
+
}) => /* @__PURE__ */ d("div", { className: b("flex items-center gap-2 mb-3", a), children: [
|
|
3790
3790
|
n && /* @__PURE__ */ d(
|
|
3791
3791
|
"button",
|
|
3792
3792
|
{
|
|
@@ -3795,12 +3795,12 @@ const nt = ({
|
|
|
3795
3795
|
className: "flex items-center gap-1 text-sm text-neutral-700 dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-neutral-100 cursor-pointer transition px-2 py-1 rounded",
|
|
3796
3796
|
children: [
|
|
3797
3797
|
/* @__PURE__ */ e(Ne, { size: 16 }),
|
|
3798
|
-
/* @__PURE__ */ e("span", { children:
|
|
3798
|
+
/* @__PURE__ */ e("span", { children: r })
|
|
3799
3799
|
]
|
|
3800
3800
|
}
|
|
3801
3801
|
),
|
|
3802
3802
|
s && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: s }),
|
|
3803
|
-
|
|
3803
|
+
t.length > 0 && /* @__PURE__ */ e("div", { className: b("flex flex-wrap gap-2", !s && "ml-auto"), children: t.map(
|
|
3804
3804
|
(c) => c.splitOptions && c.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
3805
3805
|
$e,
|
|
3806
3806
|
{
|
|
@@ -3820,7 +3820,7 @@ const nt = ({
|
|
|
3820
3820
|
h.stopPropagation(), h.target.blur(), c.onClick();
|
|
3821
3821
|
},
|
|
3822
3822
|
disabled: c.disabled,
|
|
3823
|
-
className:
|
|
3823
|
+
className: b("btn", {
|
|
3824
3824
|
o__primary: c.variant === "primary",
|
|
3825
3825
|
o__secondary: c.variant === "secondary" || c.variant === "outline",
|
|
3826
3826
|
o__ghost: c.variant === "ghost",
|
|
@@ -3835,16 +3835,16 @@ const nt = ({
|
|
|
3835
3835
|
)
|
|
3836
3836
|
) })
|
|
3837
3837
|
] });
|
|
3838
|
-
function
|
|
3838
|
+
function It(t, n) {
|
|
3839
3839
|
return n.split(".").reduce(
|
|
3840
|
-
(
|
|
3841
|
-
|
|
3840
|
+
(r, a) => r && typeof r == "object" && a in r ? r[a] : void 0,
|
|
3841
|
+
t
|
|
3842
3842
|
);
|
|
3843
3843
|
}
|
|
3844
|
-
const
|
|
3845
|
-
groups:
|
|
3844
|
+
const or = ({
|
|
3845
|
+
groups: t,
|
|
3846
3846
|
data: n,
|
|
3847
|
-
size:
|
|
3847
|
+
size: r = "md",
|
|
3848
3848
|
className: a
|
|
3849
3849
|
}) => {
|
|
3850
3850
|
const s = (u) => {
|
|
@@ -3862,9 +3862,9 @@ const ot = ({
|
|
|
3862
3862
|
if (!l) return String(u || "-");
|
|
3863
3863
|
const i = l.find((f) => f.value === u);
|
|
3864
3864
|
return i ? i.label : String(u || "-");
|
|
3865
|
-
},
|
|
3865
|
+
}, g = ae(
|
|
3866
3866
|
(u) => {
|
|
3867
|
-
const l =
|
|
3867
|
+
const l = It(n, u.name);
|
|
3868
3868
|
if (u.type === "array") {
|
|
3869
3869
|
const f = l;
|
|
3870
3870
|
return !f || f.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -4010,7 +4010,7 @@ const ot = ({
|
|
|
4010
4010
|
return null;
|
|
4011
4011
|
const l = u.items.filter((f) => !(f.hidden || f.conditional && !f.conditional(n)));
|
|
4012
4012
|
if (l.length === 0) return null;
|
|
4013
|
-
const i =
|
|
4013
|
+
const i = b(
|
|
4014
4014
|
"space-y-4",
|
|
4015
4015
|
{
|
|
4016
4016
|
"grid gap-4": u.layout === "grid",
|
|
@@ -4053,7 +4053,7 @@ const ot = ({
|
|
|
4053
4053
|
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: i, children: l.map((f) => /* @__PURE__ */ d(
|
|
4054
4054
|
"div",
|
|
4055
4055
|
{
|
|
4056
|
-
className:
|
|
4056
|
+
className: b(
|
|
4057
4057
|
"space-y-1",
|
|
4058
4058
|
f.width && typeof f.width == "string" && `w-[${f.width}]`,
|
|
4059
4059
|
f.width && typeof f.width == "number" && `col-span-${f.width}`
|
|
@@ -4068,7 +4068,7 @@ const ot = ({
|
|
|
4068
4068
|
children: f.label
|
|
4069
4069
|
}
|
|
4070
4070
|
),
|
|
4071
|
-
|
|
4071
|
+
g(f)
|
|
4072
4072
|
]
|
|
4073
4073
|
},
|
|
4074
4074
|
f.name
|
|
@@ -4078,91 +4078,91 @@ const ot = ({
|
|
|
4078
4078
|
u.id
|
|
4079
4079
|
);
|
|
4080
4080
|
},
|
|
4081
|
-
[n,
|
|
4082
|
-
), y =
|
|
4081
|
+
[n, g]
|
|
4082
|
+
), y = b(
|
|
4083
4083
|
"space-y-6",
|
|
4084
4084
|
{
|
|
4085
|
-
"max-w-md":
|
|
4086
|
-
"max-w-2xl":
|
|
4087
|
-
"max-w-4xl":
|
|
4088
|
-
"max-w-full":
|
|
4085
|
+
"max-w-md": r === "sm",
|
|
4086
|
+
"max-w-2xl": r === "md",
|
|
4087
|
+
"max-w-4xl": r === "lg",
|
|
4088
|
+
"max-w-full": r === "full"
|
|
4089
4089
|
},
|
|
4090
4090
|
a
|
|
4091
4091
|
);
|
|
4092
|
-
return /* @__PURE__ */ e("div", { className: y, children: /* @__PURE__ */ e("div", { className: "space-y-8", children:
|
|
4093
|
-
}, De = ({ item:
|
|
4094
|
-
const [a, s] = V(!1), c =
|
|
4092
|
+
return /* @__PURE__ */ e("div", { className: y, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(p) }) });
|
|
4093
|
+
}, De = ({ item: t, isSelectedHandler: n, onClick: r }) => {
|
|
4094
|
+
const [a, s] = V(!1), c = t.children && t.children.length > 0, h = () => {
|
|
4095
4095
|
c && s(!a);
|
|
4096
|
-
},
|
|
4096
|
+
}, g = n ? n(t.path) : !1;
|
|
4097
4097
|
return /* @__PURE__ */ d("li", { children: [
|
|
4098
4098
|
/* @__PURE__ */ d(
|
|
4099
4099
|
"div",
|
|
4100
4100
|
{
|
|
4101
|
-
className:
|
|
4101
|
+
className: b(
|
|
4102
4102
|
"flex flex-row w-full py-1 rounded-lg items-center h-8 transition-colors cursor-pointer px-3 pr-1 no-underline text-sm",
|
|
4103
4103
|
{
|
|
4104
|
-
"active-nav-item":
|
|
4105
|
-
"shadow-lvl-0":
|
|
4106
|
-
"font-semibold":
|
|
4104
|
+
"active-nav-item": g && !c,
|
|
4105
|
+
"shadow-lvl-0": g && !c,
|
|
4106
|
+
"font-semibold": g || c || t.children !== void 0
|
|
4107
4107
|
}
|
|
4108
4108
|
),
|
|
4109
4109
|
onClick: () => {
|
|
4110
|
-
c ? h() :
|
|
4110
|
+
c ? h() : t.path && r?.(t.path);
|
|
4111
4111
|
},
|
|
4112
4112
|
children: [
|
|
4113
|
-
|
|
4114
|
-
/* @__PURE__ */ e("span", { className: "flex-1", children:
|
|
4115
|
-
|
|
4113
|
+
t.icon && /* @__PURE__ */ e("span", { className: "mr-2", children: t.icon }),
|
|
4114
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: t.label }),
|
|
4115
|
+
t.count !== void 0 && t.count > 0 && /* @__PURE__ */ e("span", { className: "ml-2 mr-1.5", children: t.count }),
|
|
4116
4116
|
c && /* @__PURE__ */ e("span", { className: `${a ? "collapsed" : ""}`, children: /* @__PURE__ */ e(Re, { className: "w-4 h-4 text-muted" }) })
|
|
4117
4117
|
]
|
|
4118
4118
|
}
|
|
4119
4119
|
),
|
|
4120
|
-
c && !a && /* @__PURE__ */ e("ul", { className: "sidebar-menu-nested-items mb-1", children:
|
|
4120
|
+
c && !a && /* @__PURE__ */ e("ul", { className: "sidebar-menu-nested-items mb-1", children: t.children?.map((p, y) => /* @__PURE__ */ e(
|
|
4121
4121
|
De,
|
|
4122
4122
|
{
|
|
4123
4123
|
item: p,
|
|
4124
4124
|
isSelectedHandler: n,
|
|
4125
|
-
onClick:
|
|
4125
|
+
onClick: r
|
|
4126
4126
|
},
|
|
4127
4127
|
y
|
|
4128
4128
|
)) })
|
|
4129
4129
|
] });
|
|
4130
|
-
},
|
|
4131
|
-
title:
|
|
4130
|
+
}, cr = ({
|
|
4131
|
+
title: t,
|
|
4132
4132
|
actionIcons: n,
|
|
4133
|
-
items:
|
|
4133
|
+
items: r,
|
|
4134
4134
|
isSelectedHandler: a,
|
|
4135
4135
|
onClick: s,
|
|
4136
4136
|
preMenuItemsComponent: c
|
|
4137
4137
|
}) => /* @__PURE__ */ d("div", { className: "flex flex-col h-screen mb-6", children: [
|
|
4138
4138
|
/* @__PURE__ */ d("div", { className: "sidebar-menu-header", children: [
|
|
4139
|
-
/* @__PURE__ */ e("span", { className: "text-xl font-semibold text-default mb-2", children:
|
|
4140
|
-
/* @__PURE__ */ e("div", { className: "sidebar-menu-actions", children: n?.map((h,
|
|
4139
|
+
/* @__PURE__ */ e("span", { className: "text-xl font-semibold text-default mb-2", children: t }),
|
|
4140
|
+
/* @__PURE__ */ e("div", { className: "sidebar-menu-actions", children: n?.map((h, g) => /* @__PURE__ */ e("span", { className: "sidebar-menu-action-icon", children: h }, g)) })
|
|
4141
4141
|
] }),
|
|
4142
4142
|
c && /* @__PURE__ */ e("div", { className: "sidebar-menu-pre-items mb-4", children: c }),
|
|
4143
|
-
/* @__PURE__ */ e("ul", { children:
|
|
4144
|
-
(h,
|
|
4143
|
+
/* @__PURE__ */ e("ul", { children: r.map(
|
|
4144
|
+
(h, g) => !h.path && !h.label && !h.children ? /* @__PURE__ */ e("span", { className: "flex w-full h-4" }, g) : /* @__PURE__ */ e(
|
|
4145
4145
|
De,
|
|
4146
4146
|
{
|
|
4147
4147
|
item: h,
|
|
4148
4148
|
isSelectedHandler: a,
|
|
4149
4149
|
onClick: s
|
|
4150
4150
|
},
|
|
4151
|
-
|
|
4151
|
+
g
|
|
4152
4152
|
)
|
|
4153
4153
|
) })
|
|
4154
|
-
] }),
|
|
4155
|
-
level:
|
|
4154
|
+
] }), dr = ({
|
|
4155
|
+
level: t = 1,
|
|
4156
4156
|
size: n,
|
|
4157
|
-
weight:
|
|
4157
|
+
weight: r = "bold",
|
|
4158
4158
|
color: a = "current",
|
|
4159
4159
|
align: s = "left",
|
|
4160
4160
|
truncate: c = !1,
|
|
4161
4161
|
className: h,
|
|
4162
|
-
children:
|
|
4162
|
+
children: g,
|
|
4163
4163
|
...p
|
|
4164
4164
|
}) => {
|
|
4165
|
-
const y = n ||
|
|
4165
|
+
const y = n || jt(t), u = b(
|
|
4166
4166
|
"font-primary",
|
|
4167
4167
|
// Size variants
|
|
4168
4168
|
{
|
|
@@ -4177,11 +4177,11 @@ const ot = ({
|
|
|
4177
4177
|
},
|
|
4178
4178
|
// Weight variants
|
|
4179
4179
|
{
|
|
4180
|
-
"font-light":
|
|
4181
|
-
"font-normal":
|
|
4182
|
-
"font-medium":
|
|
4183
|
-
"font-semibold":
|
|
4184
|
-
"font-bold":
|
|
4180
|
+
"font-light": r === "light",
|
|
4181
|
+
"font-normal": r === "normal",
|
|
4182
|
+
"font-medium": r === "medium",
|
|
4183
|
+
"font-semibold": r === "semibold",
|
|
4184
|
+
"font-bold": r === "bold"
|
|
4185
4185
|
},
|
|
4186
4186
|
// Color variants — semantische `--text-*` tokens (light+dark) net als Text/Table.
|
|
4187
4187
|
{
|
|
@@ -4206,10 +4206,10 @@ const ot = ({
|
|
|
4206
4206
|
truncate: c
|
|
4207
4207
|
},
|
|
4208
4208
|
h
|
|
4209
|
-
), l = `h${
|
|
4210
|
-
return /* @__PURE__ */ e(l, { className: u, ...p, children:
|
|
4209
|
+
), l = `h${t}`;
|
|
4210
|
+
return /* @__PURE__ */ e(l, { className: u, ...p, children: g });
|
|
4211
4211
|
};
|
|
4212
|
-
function
|
|
4212
|
+
function jt(t) {
|
|
4213
4213
|
return {
|
|
4214
4214
|
1: "4xl",
|
|
4215
4215
|
2: "3xl",
|
|
@@ -4217,30 +4217,30 @@ function jr(r) {
|
|
|
4217
4217
|
4: "xl",
|
|
4218
4218
|
5: "lg",
|
|
4219
4219
|
6: "md"
|
|
4220
|
-
}[
|
|
4220
|
+
}[t] || "md";
|
|
4221
4221
|
}
|
|
4222
|
-
const
|
|
4223
|
-
items:
|
|
4222
|
+
const ir = ({
|
|
4223
|
+
items: t,
|
|
4224
4224
|
type: n = "unordered",
|
|
4225
|
-
variant:
|
|
4225
|
+
variant: r = "default",
|
|
4226
4226
|
size: a = "md",
|
|
4227
4227
|
interactive: s = !1,
|
|
4228
4228
|
className: c,
|
|
4229
4229
|
itemClassName: h
|
|
4230
4230
|
}) => {
|
|
4231
|
-
const
|
|
4231
|
+
const g = b(
|
|
4232
4232
|
// Base styles
|
|
4233
4233
|
"space-y-1",
|
|
4234
4234
|
// Variant styles
|
|
4235
4235
|
{
|
|
4236
4236
|
// Default - basic spacing
|
|
4237
|
-
"":
|
|
4237
|
+
"": r === "default",
|
|
4238
4238
|
// Flush - no padding
|
|
4239
|
-
"space-y-0":
|
|
4239
|
+
"space-y-0": r === "flush",
|
|
4240
4240
|
// Bordered - border around entire list
|
|
4241
|
-
"border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden":
|
|
4241
|
+
"border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden": r === "bordered",
|
|
4242
4242
|
// Divided - borders between items
|
|
4243
|
-
"divide-y divide-neutral-200 dark:divide-neutral-700":
|
|
4243
|
+
"divide-y divide-neutral-200 dark:divide-neutral-700": r === "divided"
|
|
4244
4244
|
},
|
|
4245
4245
|
// Size variants
|
|
4246
4246
|
{
|
|
@@ -4249,14 +4249,14 @@ const it = ({
|
|
|
4249
4249
|
"text-lg": a === "lg"
|
|
4250
4250
|
},
|
|
4251
4251
|
c
|
|
4252
|
-
), p = (l, i) =>
|
|
4252
|
+
), p = (l, i) => b(
|
|
4253
4253
|
// Base item styles
|
|
4254
4254
|
"transition-colors duration-200",
|
|
4255
4255
|
// Size-based padding
|
|
4256
4256
|
{
|
|
4257
|
-
"py-1 px-2": a === "sm" && (
|
|
4258
|
-
"py-2 px-3": a === "md" && (
|
|
4259
|
-
"py-3 px-4": a === "lg" && (
|
|
4257
|
+
"py-1 px-2": a === "sm" && (r === "bordered" || r === "divided"),
|
|
4258
|
+
"py-2 px-3": a === "md" && (r === "bordered" || r === "divided"),
|
|
4259
|
+
"py-3 px-4": a === "lg" && (r === "bordered" || r === "divided")
|
|
4260
4260
|
},
|
|
4261
4261
|
// Interactive styles
|
|
4262
4262
|
s && !l.disabled && {
|
|
@@ -4273,7 +4273,7 @@ const it = ({
|
|
|
4273
4273
|
}, u = (l, i) => {
|
|
4274
4274
|
s && !i.disabled && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), i.onClick?.());
|
|
4275
4275
|
};
|
|
4276
|
-
return n === "ordered" ? /* @__PURE__ */ e("ol", { className:
|
|
4276
|
+
return n === "ordered" ? /* @__PURE__ */ e("ol", { className: g, children: t.map((l, i) => /* @__PURE__ */ e(
|
|
4277
4277
|
"li",
|
|
4278
4278
|
{
|
|
4279
4279
|
className: p(l),
|
|
@@ -4284,7 +4284,7 @@ const it = ({
|
|
|
4284
4284
|
children: l.content
|
|
4285
4285
|
},
|
|
4286
4286
|
l.id || i
|
|
4287
|
-
)) }) : n === "description" ? /* @__PURE__ */ e("dl", { className:
|
|
4287
|
+
)) }) : n === "description" ? /* @__PURE__ */ e("dl", { className: g, children: t.map((l, i) => /* @__PURE__ */ e(
|
|
4288
4288
|
"div",
|
|
4289
4289
|
{
|
|
4290
4290
|
className: p(l),
|
|
@@ -4295,7 +4295,7 @@ const it = ({
|
|
|
4295
4295
|
children: l.content
|
|
4296
4296
|
},
|
|
4297
4297
|
l.id || i
|
|
4298
|
-
)) }) : /* @__PURE__ */ e("ul", { className:
|
|
4298
|
+
)) }) : /* @__PURE__ */ e("ul", { className: g, children: t.map((l, i) => /* @__PURE__ */ e(
|
|
4299
4299
|
"li",
|
|
4300
4300
|
{
|
|
4301
4301
|
className: p(l),
|
|
@@ -4307,24 +4307,24 @@ const it = ({
|
|
|
4307
4307
|
},
|
|
4308
4308
|
l.id || i
|
|
4309
4309
|
)) });
|
|
4310
|
-
},
|
|
4311
|
-
commands:
|
|
4310
|
+
}, ur = ({
|
|
4311
|
+
commands: t,
|
|
4312
4312
|
isOpen: n,
|
|
4313
|
-
onClose:
|
|
4313
|
+
onClose: r,
|
|
4314
4314
|
labels: a,
|
|
4315
4315
|
initialCommandPath: s,
|
|
4316
4316
|
initialActiveIndex: c
|
|
4317
4317
|
}) => {
|
|
4318
|
-
const [h,
|
|
4318
|
+
const [h, g] = V(""), [p, y] = V(s || []), [u, l] = V(c || 0), i = X(null), f = X(null), N = (p.length ? t.find((k) => k.id === p[0])?.subCommands || [] : t).filter(
|
|
4319
4319
|
(k) => k.label.toLowerCase().includes(h.toLowerCase())
|
|
4320
4320
|
);
|
|
4321
4321
|
return G(() => {
|
|
4322
|
-
n || (
|
|
4322
|
+
n || (g(""), y(s || []), l(c || 0));
|
|
4323
4323
|
}, [n]), G(() => {
|
|
4324
4324
|
const k = (B) => {
|
|
4325
4325
|
if (n) {
|
|
4326
4326
|
if (B.key === "Escape")
|
|
4327
|
-
|
|
4327
|
+
r();
|
|
4328
4328
|
else if (B.key === "ArrowUp")
|
|
4329
4329
|
l(
|
|
4330
4330
|
(x) => x > 0 ? x - 1 : N.length - 1
|
|
@@ -4335,17 +4335,17 @@ const it = ({
|
|
|
4335
4335
|
);
|
|
4336
4336
|
else if (B.key === "Enter") {
|
|
4337
4337
|
const x = N[u];
|
|
4338
|
-
x && (x.subCommands ? (y([...p, x.id]), l(0)) : x.action && (x.action(),
|
|
4338
|
+
x && (x.subCommands ? (y([...p, x.id]), l(0)) : x.action && (x.action(), r()));
|
|
4339
4339
|
}
|
|
4340
4340
|
}
|
|
4341
4341
|
};
|
|
4342
4342
|
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
4343
|
-
}, [n,
|
|
4343
|
+
}, [n, r, N, u, p]), G(() => {
|
|
4344
4344
|
const k = (B) => {
|
|
4345
|
-
i.current && !i.current.contains(B.target) &&
|
|
4345
|
+
i.current && !i.current.contains(B.target) && r();
|
|
4346
4346
|
};
|
|
4347
4347
|
return n && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
4348
|
-
}, [n,
|
|
4348
|
+
}, [n, r]), G(() => {
|
|
4349
4349
|
if (!n) return;
|
|
4350
4350
|
f.current?.querySelector(`[data-index="${u}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4351
4351
|
}, [u, n]), n ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-50 flex items-center justify-center shadow-lvl-0", children: /* @__PURE__ */ d(
|
|
@@ -4360,7 +4360,7 @@ const it = ({
|
|
|
4360
4360
|
type: "text",
|
|
4361
4361
|
placeholder: a?.searchPlaceholder || "Search commands...",
|
|
4362
4362
|
value: h,
|
|
4363
|
-
onChange: (k) =>
|
|
4363
|
+
onChange: (k) => g(k.target.value),
|
|
4364
4364
|
className: "w-full px-4 py-2 text-gray-800 border-none border-b border-gray-200 focus:outline-none focus:ring-0 rounded-lg bg-transparent flex-shrink-0"
|
|
4365
4365
|
}
|
|
4366
4366
|
),
|
|
@@ -4377,7 +4377,7 @@ const it = ({
|
|
|
4377
4377
|
"data-index": B,
|
|
4378
4378
|
className: `flex items-center p-2 cursor-pointer rounded-md text-secondary-800 ${B === u ? "bg-gray-100" : ""}`,
|
|
4379
4379
|
onClick: () => {
|
|
4380
|
-
k.subCommands ? (y([...p, k.id]), l(0)) : k.action && (k.action(),
|
|
4380
|
+
k.subCommands ? (y([...p, k.id]), l(0)) : k.action && (k.action(), r());
|
|
4381
4381
|
},
|
|
4382
4382
|
onMouseEnter: () => l(B),
|
|
4383
4383
|
children: [
|
|
@@ -4411,7 +4411,7 @@ const it = ({
|
|
|
4411
4411
|
]
|
|
4412
4412
|
}
|
|
4413
4413
|
) }) : null;
|
|
4414
|
-
},
|
|
4414
|
+
}, Bt = {
|
|
4415
4415
|
none: "p-0",
|
|
4416
4416
|
xs: "p-1",
|
|
4417
4417
|
sm: "p-2",
|
|
@@ -4419,7 +4419,7 @@ const it = ({
|
|
|
4419
4419
|
lg: "p-6",
|
|
4420
4420
|
xl: "p-8",
|
|
4421
4421
|
"2xl": "p-12"
|
|
4422
|
-
},
|
|
4422
|
+
}, Pt = {
|
|
4423
4423
|
none: "m-0",
|
|
4424
4424
|
xs: "m-1",
|
|
4425
4425
|
sm: "m-2",
|
|
@@ -4427,7 +4427,7 @@ const it = ({
|
|
|
4427
4427
|
lg: "m-6",
|
|
4428
4428
|
xl: "m-8",
|
|
4429
4429
|
"2xl": "m-12"
|
|
4430
|
-
},
|
|
4430
|
+
}, _t = {
|
|
4431
4431
|
none: "",
|
|
4432
4432
|
primary: "bg-primary",
|
|
4433
4433
|
secondary: "bg-secondary",
|
|
@@ -4443,26 +4443,26 @@ const it = ({
|
|
|
4443
4443
|
backdrop: "bg-backdrop",
|
|
4444
4444
|
editor: "bg-editor",
|
|
4445
4445
|
input: "bg-input"
|
|
4446
|
-
},
|
|
4446
|
+
}, Ot = {
|
|
4447
4447
|
none: "rounded-none",
|
|
4448
4448
|
sm: "rounded-sm",
|
|
4449
4449
|
md: "rounded-md",
|
|
4450
4450
|
lg: "rounded-lg",
|
|
4451
4451
|
xl: "rounded-xl",
|
|
4452
4452
|
full: "rounded-full"
|
|
4453
|
-
},
|
|
4453
|
+
}, Vt = {
|
|
4454
4454
|
none: "shadow-none",
|
|
4455
4455
|
sm: "shadow-sm shadow-lvl-0",
|
|
4456
4456
|
md: "shadow-md shadow-lvl-0",
|
|
4457
4457
|
lg: "shadow-lg shadow-lvl-0",
|
|
4458
4458
|
xl: "shadow-xl shadow-lvl-0",
|
|
4459
4459
|
"2xl": "shadow-2xl shadow-lvl-0"
|
|
4460
|
-
},
|
|
4460
|
+
}, Ft = {
|
|
4461
4461
|
none: "border-0",
|
|
4462
4462
|
sm: "border",
|
|
4463
4463
|
md: "border-2",
|
|
4464
4464
|
lg: "border-4"
|
|
4465
|
-
},
|
|
4465
|
+
}, Wt = {
|
|
4466
4466
|
primary: "border-primary",
|
|
4467
4467
|
secondary: "border-secondary",
|
|
4468
4468
|
accent: "border-accent",
|
|
@@ -4474,29 +4474,29 @@ const it = ({
|
|
|
4474
4474
|
white: "border-white"
|
|
4475
4475
|
}, Te = ce(
|
|
4476
4476
|
({
|
|
4477
|
-
padding:
|
|
4477
|
+
padding: t,
|
|
4478
4478
|
margin: n,
|
|
4479
|
-
background:
|
|
4479
|
+
background: r,
|
|
4480
4480
|
radius: a,
|
|
4481
4481
|
shadow: s,
|
|
4482
4482
|
border: c,
|
|
4483
4483
|
borderColor: h,
|
|
4484
|
-
className:
|
|
4484
|
+
className: g,
|
|
4485
4485
|
children: p,
|
|
4486
4486
|
...y
|
|
4487
4487
|
}, u) => /* @__PURE__ */ e(
|
|
4488
4488
|
"div",
|
|
4489
4489
|
{
|
|
4490
4490
|
ref: u,
|
|
4491
|
-
className:
|
|
4492
|
-
|
|
4493
|
-
n &&
|
|
4494
|
-
|
|
4495
|
-
a &&
|
|
4496
|
-
s &&
|
|
4497
|
-
c &&
|
|
4498
|
-
h &&
|
|
4499
|
-
|
|
4491
|
+
className: b(
|
|
4492
|
+
t && Bt[t],
|
|
4493
|
+
n && Pt[n],
|
|
4494
|
+
r && _t[r],
|
|
4495
|
+
a && Ot[a],
|
|
4496
|
+
s && Vt[s],
|
|
4497
|
+
c && Ft[c],
|
|
4498
|
+
h && Wt[h],
|
|
4499
|
+
g
|
|
4500
4500
|
),
|
|
4501
4501
|
...y,
|
|
4502
4502
|
children: p
|
|
@@ -4504,19 +4504,19 @@ const it = ({
|
|
|
4504
4504
|
)
|
|
4505
4505
|
);
|
|
4506
4506
|
Te.displayName = "Box";
|
|
4507
|
-
const
|
|
4507
|
+
const mr = ({ children: t, title: n, ...r }) => /* @__PURE__ */ d(Te, { background: "module", radius: "xl", shadow: "sm", ...r, children: [
|
|
4508
4508
|
n && /* @__PURE__ */ e("span", { className: "text-base font-medium text-default mb-2", children: n }),
|
|
4509
|
-
|
|
4509
|
+
t
|
|
4510
4510
|
] });
|
|
4511
|
-
function
|
|
4512
|
-
identifier:
|
|
4511
|
+
function hr({
|
|
4512
|
+
identifier: t,
|
|
4513
4513
|
resourceLoader: n,
|
|
4514
|
-
framework:
|
|
4514
|
+
framework: r = "react",
|
|
4515
4515
|
fallback: a,
|
|
4516
4516
|
componentProps: s,
|
|
4517
4517
|
className: c
|
|
4518
4518
|
}) {
|
|
4519
|
-
const h = X(null), [
|
|
4519
|
+
const h = X(null), [g, p] = V(!0), [y, u] = V(null), l = X(null);
|
|
4520
4520
|
return X(null), G(() => {
|
|
4521
4521
|
let i = !0;
|
|
4522
4522
|
return (async () => {
|
|
@@ -4525,20 +4525,20 @@ function ht({
|
|
|
4525
4525
|
const C = await n();
|
|
4526
4526
|
if (!i) return;
|
|
4527
4527
|
const N = C.component || C.default || C;
|
|
4528
|
-
u(
|
|
4528
|
+
u(r === "react" ? () => N : () => C);
|
|
4529
4529
|
} catch (C) {
|
|
4530
|
-
console.error(`[FederatedResource] Load failed: ${
|
|
4530
|
+
console.error(`[FederatedResource] Load failed: ${t}`, C);
|
|
4531
4531
|
} finally {
|
|
4532
4532
|
i && p(!1);
|
|
4533
4533
|
}
|
|
4534
4534
|
})(), () => {
|
|
4535
4535
|
i = !1;
|
|
4536
4536
|
};
|
|
4537
|
-
}, [
|
|
4538
|
-
if (
|
|
4537
|
+
}, [t, n]), G(() => {
|
|
4538
|
+
if (g || !y || r === "react") return;
|
|
4539
4539
|
const i = h.current;
|
|
4540
4540
|
if (i) {
|
|
4541
|
-
if (
|
|
4541
|
+
if (r === "svelte") {
|
|
4542
4542
|
const f = y.default || y, C = new f({ target: i, props: s || {} });
|
|
4543
4543
|
return l.current = C, () => C.$destroy();
|
|
4544
4544
|
}
|
|
@@ -4549,14 +4549,14 @@ function ht({
|
|
|
4549
4549
|
};
|
|
4550
4550
|
}
|
|
4551
4551
|
}
|
|
4552
|
-
}, [y,
|
|
4553
|
-
|
|
4554
|
-
}, [s,
|
|
4555
|
-
|
|
4556
|
-
|
|
4552
|
+
}, [y, r, g]), G(() => {
|
|
4553
|
+
r === "svelte" && l.current && l.current.$set?.(s);
|
|
4554
|
+
}, [s, r]), /* @__PURE__ */ d("div", { ref: h, className: c, style: { display: "contents" }, children: [
|
|
4555
|
+
g && a,
|
|
4556
|
+
r === "react" && y && /* @__PURE__ */ e(y, { ...s })
|
|
4557
4557
|
] });
|
|
4558
4558
|
}
|
|
4559
|
-
class
|
|
4559
|
+
class fr extends Ue {
|
|
4560
4560
|
constructor() {
|
|
4561
4561
|
super(...arguments), this.state = {
|
|
4562
4562
|
hasError: !1,
|
|
@@ -4566,8 +4566,8 @@ class ft extends Ue {
|
|
|
4566
4566
|
static getDerivedStateFromError(n) {
|
|
4567
4567
|
return { hasError: !0, error: n };
|
|
4568
4568
|
}
|
|
4569
|
-
componentDidCatch(n,
|
|
4570
|
-
console.error(`[ErrorBoundary] Error in ${this.props.name || "Component"}:`, n,
|
|
4569
|
+
componentDidCatch(n, r) {
|
|
4570
|
+
console.error(`[ErrorBoundary] Error in ${this.props.name || "Component"}:`, n, r);
|
|
4571
4571
|
}
|
|
4572
4572
|
render() {
|
|
4573
4573
|
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ d("div", { className: "p-4 m-4 border border-red-200 bg-red-50 rounded-lg", children: [
|
|
@@ -4585,45 +4585,45 @@ class ft extends Ue {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
4587
|
export {
|
|
4588
|
-
|
|
4588
|
+
rr as Badge,
|
|
4589
4589
|
Te as Box,
|
|
4590
4590
|
ee as Button,
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4591
|
+
Xt as ButtonGroup,
|
|
4592
|
+
mr as Card,
|
|
4593
|
+
ge as Checkbox,
|
|
4594
|
+
ur as CommandPalette,
|
|
4595
|
+
it as ContentLoading,
|
|
4596
4596
|
ye as DatePicker,
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4597
|
+
ut as Dropdown,
|
|
4598
|
+
fr as ErrorBoundary,
|
|
4599
|
+
hr as FederatedResource,
|
|
4600
|
+
tr as Form,
|
|
4601
|
+
dr as Heading,
|
|
4602
4602
|
oe as Icon,
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4603
|
+
nr as Image,
|
|
4604
|
+
Qt as Link,
|
|
4605
|
+
ir as List,
|
|
4606
|
+
Jt as MeetingGrid,
|
|
4607
|
+
wt as Modal,
|
|
4608
|
+
lr as PageHeader,
|
|
4609
|
+
sr as PageToolbar,
|
|
4610
|
+
Yt as ParticipantTile,
|
|
4611
|
+
lt as SearchableTextField,
|
|
4612
4612
|
ve as Select,
|
|
4613
|
-
|
|
4614
|
-
|
|
4613
|
+
cr as SidebarMenu,
|
|
4614
|
+
ar as Spinner,
|
|
4615
4615
|
$e as SplitButton,
|
|
4616
|
-
|
|
4617
|
-
|
|
4616
|
+
St as StorageInput,
|
|
4617
|
+
er as TabBar,
|
|
4618
4618
|
Le as Table,
|
|
4619
|
-
|
|
4619
|
+
kt as Tabs,
|
|
4620
4620
|
Z as Text,
|
|
4621
4621
|
ke as TextArea,
|
|
4622
4622
|
ue as TextField,
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4623
|
+
Zt as VideoSurface,
|
|
4624
|
+
or as View,
|
|
4625
|
+
b as cn,
|
|
4626
|
+
Kt as createSizes,
|
|
4627
|
+
Gt as createVariants
|
|
4628
4628
|
};
|
|
4629
4629
|
//# sourceMappingURL=index.js.map
|