@opencxh/ui-kit 3.136.0 → 3.136.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.js
CHANGED
|
@@ -18,10 +18,10 @@ function nn({ tiles: t, pinned: r, className: n }) {
|
|
|
18
18
|
if (r)
|
|
19
19
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
|
|
20
20
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
|
|
21
|
-
t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((a,
|
|
21
|
+
t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-w-40 md:min-w-0", children: a }, l)) })
|
|
22
22
|
] });
|
|
23
23
|
const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
24
|
-
return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a,
|
|
24
|
+
return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
|
|
25
25
|
}
|
|
26
26
|
function sn({
|
|
27
27
|
name: t,
|
|
@@ -29,21 +29,21 @@ function sn({
|
|
|
29
29
|
muted: n,
|
|
30
30
|
speaking: s,
|
|
31
31
|
hasVideo: a,
|
|
32
|
-
videoSlot:
|
|
33
|
-
className:
|
|
34
|
-
fill:
|
|
32
|
+
videoSlot: l,
|
|
33
|
+
className: o,
|
|
34
|
+
fill: h
|
|
35
35
|
}) {
|
|
36
36
|
return /* @__PURE__ */ c(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: d(
|
|
40
40
|
"relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
|
|
41
|
-
|
|
41
|
+
h ? "h-full w-full" : "aspect-video",
|
|
42
42
|
s && "ring-2 ring-speaking",
|
|
43
|
-
|
|
43
|
+
o
|
|
44
44
|
),
|
|
45
45
|
children: [
|
|
46
|
-
a &&
|
|
46
|
+
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(Ke, { className: "w-8 h-8" }) : /* @__PURE__ */ e(Ge, { className: "w-8 h-8" }) }) }),
|
|
47
47
|
/* @__PURE__ */ c("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
|
|
48
48
|
n ? /* @__PURE__ */ e(Je, { className: "w-3 h-3" }) : /* @__PURE__ */ e(Ye, { className: "w-3 h-3" }),
|
|
49
49
|
/* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
|
|
@@ -56,9 +56,9 @@ function an({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
56
56
|
const a = se(null);
|
|
57
57
|
return Q(() => {
|
|
58
58
|
if (!r || !a.current) return;
|
|
59
|
-
const
|
|
59
|
+
const l = t(a.current);
|
|
60
60
|
return () => {
|
|
61
|
-
typeof
|
|
61
|
+
typeof l == "function" && l(), a.current && (a.current.innerHTML = "");
|
|
62
62
|
};
|
|
63
63
|
}, [t, r]), /* @__PURE__ */ e(
|
|
64
64
|
"div",
|
|
@@ -74,10 +74,10 @@ function an({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
74
74
|
}
|
|
75
75
|
const vt = {
|
|
76
76
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
|
|
77
|
-
secondary: "bg-
|
|
77
|
+
secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
|
|
78
78
|
// No resting fill, so no disabled fill either — a greyed-out plate where
|
|
79
79
|
// there was nothing reads as a different control, not as a disabled one.
|
|
80
|
-
outline: "border border-border text-
|
|
80
|
+
outline: "border border-border text-text-strong hover:bg-surface-hover",
|
|
81
81
|
ghost: "text-text-muted hover:bg-surface-hover hover:text-text",
|
|
82
82
|
destructive: "border border-danger-border bg-danger-soft text-danger-fg hover:border-danger disabled:bg-surface-hover",
|
|
83
83
|
// Solid status fills. Reserved for a control whose colour IS the answer —
|
|
@@ -108,36 +108,39 @@ const vt = {
|
|
|
108
108
|
fullWidth: n = !1,
|
|
109
109
|
loading: s = !1,
|
|
110
110
|
leftIcon: a,
|
|
111
|
-
rightIcon:
|
|
112
|
-
iconOnly:
|
|
113
|
-
shape:
|
|
114
|
-
className:
|
|
111
|
+
rightIcon: l,
|
|
112
|
+
iconOnly: o = !1,
|
|
113
|
+
shape: h = "default",
|
|
114
|
+
className: u,
|
|
115
115
|
children: N,
|
|
116
|
-
disabled:
|
|
117
|
-
...
|
|
116
|
+
disabled: m,
|
|
117
|
+
...f
|
|
118
118
|
}, b) => {
|
|
119
|
-
const p =
|
|
119
|
+
const p = m || s;
|
|
120
120
|
return /* @__PURE__ */ c(
|
|
121
121
|
"button",
|
|
122
122
|
{
|
|
123
123
|
ref: b,
|
|
124
124
|
type: "button",
|
|
125
125
|
className: d(
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
// font-medium, not semibold: in the design a button's label carries
|
|
127
|
+
// the same weight as an emphasised nav item, and 600 at 12–13px
|
|
128
|
+
// reads as a heavier control than the surrounding chrome.
|
|
129
|
+
"inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-medium",
|
|
130
|
+
h === "circle" ? "rounded-full" : "rounded-md",
|
|
128
131
|
"transition-colors duration-fast ease-out",
|
|
129
132
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
130
133
|
"disabled:cursor-not-allowed disabled:border-border-subtle",
|
|
131
134
|
"disabled:text-text-disabled",
|
|
132
135
|
vt[t],
|
|
133
|
-
|
|
136
|
+
o ? Nt[r] : yt[r],
|
|
134
137
|
(n || r === "full") && "w-full",
|
|
135
138
|
s && "cursor-wait",
|
|
136
|
-
|
|
139
|
+
u
|
|
137
140
|
),
|
|
138
141
|
disabled: p,
|
|
139
142
|
"aria-busy": s || void 0,
|
|
140
|
-
...
|
|
143
|
+
...f,
|
|
141
144
|
children: [
|
|
142
145
|
s && /* @__PURE__ */ e(
|
|
143
146
|
"span",
|
|
@@ -147,9 +150,9 @@ const vt = {
|
|
|
147
150
|
}
|
|
148
151
|
),
|
|
149
152
|
!s && a && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: a }),
|
|
150
|
-
!
|
|
151
|
-
!s &&
|
|
152
|
-
|
|
153
|
+
!o && N,
|
|
154
|
+
!s && l && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: l }),
|
|
155
|
+
o && !s && !a && !l && N
|
|
153
156
|
]
|
|
154
157
|
}
|
|
155
158
|
);
|
|
@@ -163,7 +166,7 @@ const ln = ({
|
|
|
163
166
|
attached: s = !0,
|
|
164
167
|
className: a
|
|
165
168
|
}) => {
|
|
166
|
-
const
|
|
169
|
+
const l = d(
|
|
167
170
|
"inline-flex",
|
|
168
171
|
{
|
|
169
172
|
// Orientation
|
|
@@ -185,7 +188,7 @@ const ln = ({
|
|
|
185
188
|
},
|
|
186
189
|
a
|
|
187
190
|
);
|
|
188
|
-
return /* @__PURE__ */ e("div", { className:
|
|
191
|
+
return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
|
|
189
192
|
}, wt = {
|
|
190
193
|
primary: "text-text",
|
|
191
194
|
secondary: "text-text-muted",
|
|
@@ -202,33 +205,33 @@ const ln = ({
|
|
|
202
205
|
color: n = "current",
|
|
203
206
|
clickable: s = !1,
|
|
204
207
|
onClick: a,
|
|
205
|
-
className:
|
|
206
|
-
"aria-label":
|
|
207
|
-
...
|
|
208
|
+
className: l,
|
|
209
|
+
"aria-label": o,
|
|
210
|
+
...h
|
|
208
211
|
}) => {
|
|
209
|
-
const
|
|
212
|
+
const u = typeof r == "number" ? r : kt(r), N = d(
|
|
210
213
|
"inline-block shrink-0",
|
|
211
214
|
wt[n],
|
|
212
215
|
s && [
|
|
213
216
|
"cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
|
|
214
217
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
215
218
|
],
|
|
216
|
-
|
|
217
|
-
),
|
|
218
|
-
size:
|
|
219
|
+
l
|
|
220
|
+
), m = {
|
|
221
|
+
size: u,
|
|
219
222
|
strokeWidth: 2,
|
|
220
223
|
className: N,
|
|
221
224
|
onClick: s ? a : void 0,
|
|
222
|
-
"aria-label":
|
|
223
|
-
"aria-hidden":
|
|
225
|
+
"aria-label": o,
|
|
226
|
+
"aria-hidden": o ? void 0 : !0,
|
|
224
227
|
role: s ? "button" : void 0,
|
|
225
228
|
tabIndex: s ? 0 : void 0,
|
|
226
|
-
onKeyDown: s ? (
|
|
227
|
-
(
|
|
229
|
+
onKeyDown: s ? (f) => {
|
|
230
|
+
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), a?.());
|
|
228
231
|
} : void 0,
|
|
229
|
-
...
|
|
232
|
+
...h
|
|
230
233
|
};
|
|
231
|
-
return /* @__PURE__ */ e(t, { ...
|
|
234
|
+
return /* @__PURE__ */ e(t, { ...m });
|
|
232
235
|
};
|
|
233
236
|
function kt(t) {
|
|
234
237
|
return {
|
|
@@ -240,58 +243,58 @@ function kt(t) {
|
|
|
240
243
|
}[t];
|
|
241
244
|
}
|
|
242
245
|
const Ct = {
|
|
243
|
-
none: "
|
|
244
|
-
default: "
|
|
245
|
-
muted: "
|
|
246
|
-
warning: "
|
|
247
|
-
danger: "
|
|
246
|
+
none: "hover:bg-surface-sunk hover:text-text",
|
|
247
|
+
default: "bg-surface-sunk text-text-muted hover:text-text",
|
|
248
|
+
muted: "bg-surface-sunk text-text-subtle hover:text-text",
|
|
249
|
+
warning: "bg-warning-soft text-warning-fg",
|
|
250
|
+
danger: "bg-danger-soft text-danger-fg"
|
|
248
251
|
};
|
|
249
252
|
function on({
|
|
250
253
|
label: t,
|
|
251
254
|
icon: r,
|
|
252
255
|
tone: n = "default",
|
|
253
|
-
shape: s = "
|
|
256
|
+
shape: s = "rect",
|
|
254
257
|
size: a = "md",
|
|
255
|
-
active:
|
|
256
|
-
caret:
|
|
257
|
-
onClear:
|
|
258
|
-
clearLabel:
|
|
258
|
+
active: l = !1,
|
|
259
|
+
caret: o = !1,
|
|
260
|
+
onClear: h,
|
|
261
|
+
clearLabel: u = "Filter wissen",
|
|
259
262
|
onClick: N,
|
|
260
|
-
title:
|
|
261
|
-
className:
|
|
263
|
+
title: m,
|
|
264
|
+
className: f
|
|
262
265
|
}) {
|
|
263
|
-
const b =
|
|
266
|
+
const b = l && !!h, p = s === "pill" ? "rounded-full" : "rounded-md", C = d(
|
|
264
267
|
// A button's default cursor is an arrow, so it has to be asked for.
|
|
265
|
-
"inline-flex cursor-pointer select-none items-center text-sm font-
|
|
268
|
+
"inline-flex cursor-pointer select-none items-center text-sm font-medium",
|
|
266
269
|
a === "sm" ? "h-control-sm" : "h-control-md",
|
|
267
270
|
"transition-colors duration-fast ease-out",
|
|
268
271
|
p,
|
|
269
272
|
// Picking a value outranks whatever the value happens to mean.
|
|
270
|
-
|
|
271
|
-
|
|
273
|
+
l ? "bg-info-soft text-info-fg" : Ct[n],
|
|
274
|
+
f
|
|
272
275
|
), g = /* @__PURE__ */ c(xe, { children: [
|
|
273
276
|
r,
|
|
274
277
|
t,
|
|
275
|
-
|
|
278
|
+
o && /* @__PURE__ */ e(Y, { icon: ge, size: "xs" })
|
|
276
279
|
] }), x = d(
|
|
277
280
|
"inline-flex items-center gap-1.5 pl-3",
|
|
278
281
|
p,
|
|
279
282
|
b ? "pr-1.5" : "pr-3",
|
|
280
283
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
281
284
|
);
|
|
282
|
-
return b ? /* @__PURE__ */ c("span", { className: C, title:
|
|
285
|
+
return b ? /* @__PURE__ */ c("span", { className: C, title: m, children: [
|
|
283
286
|
/* @__PURE__ */ e("button", { type: "button", onClick: N, className: x, children: g }),
|
|
284
287
|
/* @__PURE__ */ e(
|
|
285
288
|
"button",
|
|
286
289
|
{
|
|
287
290
|
type: "button",
|
|
288
|
-
"aria-label":
|
|
289
|
-
onClick:
|
|
291
|
+
"aria-label": u,
|
|
292
|
+
onClick: h,
|
|
290
293
|
className: d("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
|
|
291
294
|
children: /* @__PURE__ */ e(Y, { icon: we, size: "xs" })
|
|
292
295
|
}
|
|
293
296
|
)
|
|
294
|
-
] }) : /* @__PURE__ */ e("button", { type: "button", title:
|
|
297
|
+
] }) : /* @__PURE__ */ e("button", { type: "button", title: m, onClick: N, className: d(C, x), children: g });
|
|
295
298
|
}
|
|
296
299
|
const St = {
|
|
297
300
|
xs: "text-xs",
|
|
@@ -323,14 +326,14 @@ const St = {
|
|
|
323
326
|
color: n = "primary",
|
|
324
327
|
disabled: s = !1,
|
|
325
328
|
external: a = !1,
|
|
326
|
-
className:
|
|
327
|
-
children:
|
|
328
|
-
href:
|
|
329
|
-
target:
|
|
329
|
+
className: l,
|
|
330
|
+
children: o,
|
|
331
|
+
href: h,
|
|
332
|
+
target: u,
|
|
330
333
|
rel: N,
|
|
331
|
-
...
|
|
334
|
+
...m
|
|
332
335
|
}) => {
|
|
333
|
-
const
|
|
336
|
+
const f = a || h && (h.startsWith("http") || h.startsWith("mailto:")), b = d(
|
|
334
337
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
335
338
|
"transition-colors duration-fast ease-out",
|
|
336
339
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -343,17 +346,17 @@ const St = {
|
|
|
343
346
|
Et[n]
|
|
344
347
|
],
|
|
345
348
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
346
|
-
|
|
349
|
+
l
|
|
347
350
|
), p = {
|
|
348
|
-
...
|
|
349
|
-
href: s ? void 0 :
|
|
350
|
-
target:
|
|
351
|
-
rel:
|
|
351
|
+
...m,
|
|
352
|
+
href: s ? void 0 : h,
|
|
353
|
+
target: f ? "_blank" : u,
|
|
354
|
+
rel: f ? "noopener noreferrer" : N,
|
|
352
355
|
"aria-disabled": s || void 0
|
|
353
356
|
};
|
|
354
357
|
return /* @__PURE__ */ c("a", { className: b, ...p, children: [
|
|
355
|
-
|
|
356
|
-
|
|
358
|
+
o,
|
|
359
|
+
f && /* @__PURE__ */ e(Xe, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
357
360
|
] });
|
|
358
361
|
}, Mt = {
|
|
359
362
|
sm: "h-control-sm px-3 text-sm",
|
|
@@ -365,52 +368,52 @@ function dn({
|
|
|
365
368
|
onChange: n,
|
|
366
369
|
size: s = "sm",
|
|
367
370
|
className: a,
|
|
368
|
-
"aria-label":
|
|
371
|
+
"aria-label": l
|
|
369
372
|
}) {
|
|
370
373
|
return /* @__PURE__ */ e(
|
|
371
374
|
"div",
|
|
372
375
|
{
|
|
373
376
|
role: "tablist",
|
|
374
|
-
"aria-label":
|
|
375
|
-
className: d("inline-flex gap-0.5 rounded-md bg-surface-
|
|
376
|
-
children: t.map((
|
|
377
|
-
const
|
|
377
|
+
"aria-label": l,
|
|
378
|
+
className: d("inline-flex gap-0.5 rounded-md bg-surface-sunk p-0.5", a),
|
|
379
|
+
children: t.map((o) => {
|
|
380
|
+
const h = o.value === r;
|
|
378
381
|
return /* @__PURE__ */ e(
|
|
379
382
|
"button",
|
|
380
383
|
{
|
|
381
384
|
role: "tab",
|
|
382
|
-
"aria-selected":
|
|
385
|
+
"aria-selected": h,
|
|
383
386
|
type: "button",
|
|
384
|
-
onClick: () => n(
|
|
387
|
+
onClick: () => n(o.value),
|
|
385
388
|
className: d(
|
|
386
389
|
"inline-flex items-center justify-center rounded-sm",
|
|
387
390
|
"transition-colors duration-fast ease-out",
|
|
388
391
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
389
392
|
Mt[s],
|
|
390
|
-
|
|
393
|
+
h ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
|
|
391
394
|
),
|
|
392
|
-
children:
|
|
395
|
+
children: o.label
|
|
393
396
|
},
|
|
394
|
-
|
|
397
|
+
o.value
|
|
395
398
|
);
|
|
396
399
|
})
|
|
397
400
|
}
|
|
398
401
|
);
|
|
399
402
|
}
|
|
400
403
|
function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
401
|
-
const [
|
|
404
|
+
const [l, o] = R({});
|
|
402
405
|
return ft(() => {
|
|
403
406
|
if (!t) return;
|
|
404
|
-
const
|
|
405
|
-
const
|
|
406
|
-
if (!
|
|
407
|
-
const N =
|
|
408
|
-
C ? (g.bottom = window.innerHeight - N.top + n, g.maxHeight = Math.max(120,
|
|
407
|
+
const h = () => {
|
|
408
|
+
const u = r.current;
|
|
409
|
+
if (!u) return;
|
|
410
|
+
const N = u.getBoundingClientRect(), m = window.innerHeight - N.bottom, f = N.top, b = a.startsWith("top"), p = b ? f < 200 && m > f : m < 200 && f > m, C = b !== p, g = { position: "fixed" };
|
|
411
|
+
C ? (g.bottom = window.innerHeight - N.top + n, g.maxHeight = Math.max(120, f - n * 2)) : (g.top = N.bottom + n, g.maxHeight = Math.max(120, m - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - N.right : g.left = N.left, s && (g.width = N.width), o(g);
|
|
409
412
|
};
|
|
410
|
-
return
|
|
411
|
-
window.removeEventListener("scroll",
|
|
413
|
+
return h(), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
|
|
414
|
+
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
412
415
|
};
|
|
413
|
-
}, [t, r, n, s, a]),
|
|
416
|
+
}, [t, r, n, s, a]), l;
|
|
414
417
|
}
|
|
415
418
|
const $t = ({
|
|
416
419
|
trigger: t,
|
|
@@ -418,44 +421,44 @@ const $t = ({
|
|
|
418
421
|
placement: n = "bottom-start",
|
|
419
422
|
className: s,
|
|
420
423
|
rootClassName: a,
|
|
421
|
-
triggerClassName:
|
|
422
|
-
disabled:
|
|
423
|
-
triggerLabel:
|
|
424
|
+
triggerClassName: l,
|
|
425
|
+
disabled: o = !1,
|
|
426
|
+
triggerLabel: h
|
|
424
427
|
}) => {
|
|
425
|
-
const [
|
|
428
|
+
const [u, N] = R(!1), m = se(null), f = se(null), b = ze(u, f, { placement: n });
|
|
426
429
|
Q(() => {
|
|
427
|
-
if (!
|
|
430
|
+
if (!u) return;
|
|
428
431
|
const g = (_) => {
|
|
429
|
-
|
|
432
|
+
m.current && !m.current.contains(_.target) && N(!1);
|
|
430
433
|
}, x = (_) => {
|
|
431
434
|
_.key === "Escape" && N(!1);
|
|
432
435
|
};
|
|
433
436
|
return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
|
|
434
437
|
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
|
|
435
438
|
};
|
|
436
|
-
}, [
|
|
439
|
+
}, [u]);
|
|
437
440
|
const p = (g) => {
|
|
438
|
-
g.stopPropagation(), !
|
|
441
|
+
g.stopPropagation(), !o && N((x) => !x);
|
|
439
442
|
}, C = () => N(!1);
|
|
440
|
-
return /* @__PURE__ */ c("div", { ref:
|
|
443
|
+
return /* @__PURE__ */ c("div", { ref: m, className: d("relative inline-flex", a), children: [
|
|
441
444
|
/* @__PURE__ */ e(
|
|
442
445
|
"button",
|
|
443
446
|
{
|
|
444
|
-
ref:
|
|
447
|
+
ref: f,
|
|
445
448
|
type: "button",
|
|
446
449
|
onClick: p,
|
|
447
|
-
disabled:
|
|
448
|
-
"aria-label":
|
|
449
|
-
"aria-expanded":
|
|
450
|
+
disabled: o,
|
|
451
|
+
"aria-label": h,
|
|
452
|
+
"aria-expanded": u,
|
|
450
453
|
className: d(
|
|
451
454
|
"inline-flex items-center",
|
|
452
|
-
|
|
453
|
-
|
|
455
|
+
o && "cursor-not-allowed opacity-50",
|
|
456
|
+
l
|
|
454
457
|
),
|
|
455
458
|
children: t
|
|
456
459
|
}
|
|
457
460
|
),
|
|
458
|
-
|
|
461
|
+
u && /* @__PURE__ */ e(
|
|
459
462
|
"div",
|
|
460
463
|
{
|
|
461
464
|
className: d(
|
|
@@ -483,13 +486,13 @@ function Re({
|
|
|
483
486
|
variant: n = "primary",
|
|
484
487
|
size: s = "md",
|
|
485
488
|
icon: a,
|
|
486
|
-
options:
|
|
487
|
-
disabled:
|
|
488
|
-
loading:
|
|
489
|
-
menuPlacement:
|
|
489
|
+
options: l,
|
|
490
|
+
disabled: o = !1,
|
|
491
|
+
loading: h = !1,
|
|
492
|
+
menuPlacement: u = "bottom-end",
|
|
490
493
|
menuLabel: N = "More options"
|
|
491
494
|
}) {
|
|
492
|
-
const
|
|
495
|
+
const m = o || h, f = l.length > 0;
|
|
493
496
|
return /* @__PURE__ */ c("div", { className: d("inline-flex items-center", n === "primary" && "gap-0.5"), children: [
|
|
494
497
|
/* @__PURE__ */ e(
|
|
495
498
|
ne,
|
|
@@ -497,18 +500,18 @@ function Re({
|
|
|
497
500
|
variant: n,
|
|
498
501
|
size: s,
|
|
499
502
|
onClick: r,
|
|
500
|
-
disabled:
|
|
501
|
-
loading:
|
|
503
|
+
disabled: o,
|
|
504
|
+
loading: h,
|
|
502
505
|
leftIcon: a,
|
|
503
|
-
className: d(
|
|
506
|
+
className: d(f && "rounded-r-none"),
|
|
504
507
|
children: t
|
|
505
508
|
}
|
|
506
509
|
),
|
|
507
|
-
|
|
510
|
+
f && /* @__PURE__ */ e(
|
|
508
511
|
$t,
|
|
509
512
|
{
|
|
510
|
-
placement:
|
|
511
|
-
disabled:
|
|
513
|
+
placement: u,
|
|
514
|
+
disabled: m,
|
|
512
515
|
triggerLabel: N,
|
|
513
516
|
className: "min-w-menu py-1",
|
|
514
517
|
trigger: /* @__PURE__ */ e(
|
|
@@ -520,12 +523,12 @@ function Re({
|
|
|
520
523
|
"transition-colors duration-fast ease-out",
|
|
521
524
|
Dt[n],
|
|
522
525
|
Tt[s],
|
|
523
|
-
|
|
526
|
+
m && "cursor-not-allowed opacity-50"
|
|
524
527
|
),
|
|
525
528
|
children: /* @__PURE__ */ e(ge, { className: "size-icon-md" })
|
|
526
529
|
}
|
|
527
530
|
),
|
|
528
|
-
children: (b) => /* @__PURE__ */ e(xe, { children:
|
|
531
|
+
children: (b) => /* @__PURE__ */ e(xe, { children: l.map((p) => /* @__PURE__ */ c(
|
|
529
532
|
"button",
|
|
530
533
|
{
|
|
531
534
|
type: "button",
|
|
@@ -571,21 +574,21 @@ const _t = {
|
|
|
571
574
|
error: n,
|
|
572
575
|
size: s = "md",
|
|
573
576
|
indeterminate: a = !1,
|
|
574
|
-
containerClassName:
|
|
575
|
-
labelClassName:
|
|
576
|
-
className:
|
|
577
|
-
id:
|
|
577
|
+
containerClassName: l,
|
|
578
|
+
labelClassName: o,
|
|
579
|
+
className: h,
|
|
580
|
+
id: u,
|
|
578
581
|
...N
|
|
579
|
-
},
|
|
580
|
-
const
|
|
582
|
+
}, m) => {
|
|
583
|
+
const f = oe.useId(), b = u || `checkbox-${f}`, p = !!n, C = oe.useRef(null), g = oe.useCallback(
|
|
581
584
|
(x) => {
|
|
582
|
-
C.current = x, typeof
|
|
585
|
+
C.current = x, typeof m == "function" ? m(x) : m && typeof m == "object" && (m.current = x);
|
|
583
586
|
},
|
|
584
|
-
[
|
|
587
|
+
[m]
|
|
585
588
|
);
|
|
586
589
|
return oe.useEffect(() => {
|
|
587
590
|
C.current && (C.current.indeterminate = a);
|
|
588
|
-
}, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col",
|
|
591
|
+
}, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col", l), children: [
|
|
589
592
|
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3", At[s]), children: [
|
|
590
593
|
/* @__PURE__ */ e(
|
|
591
594
|
"input",
|
|
@@ -603,7 +606,7 @@ const _t = {
|
|
|
603
606
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
604
607
|
_t[s],
|
|
605
608
|
p ? "border-danger-border" : "border-border-strong",
|
|
606
|
-
|
|
609
|
+
h
|
|
607
610
|
),
|
|
608
611
|
...N
|
|
609
612
|
}
|
|
@@ -617,7 +620,7 @@ const _t = {
|
|
|
617
620
|
"cursor-pointer",
|
|
618
621
|
p ? "text-danger-fg" : "text-text",
|
|
619
622
|
Lt[s],
|
|
620
|
-
|
|
623
|
+
o
|
|
621
624
|
),
|
|
622
625
|
children: t
|
|
623
626
|
}
|
|
@@ -630,19 +633,19 @@ const _t = {
|
|
|
630
633
|
}
|
|
631
634
|
);
|
|
632
635
|
pe.displayName = "Checkbox";
|
|
633
|
-
const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }),
|
|
636
|
+
const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }), Pt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), jt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), $e = me(({
|
|
634
637
|
value: t,
|
|
635
638
|
onChange: r,
|
|
636
639
|
placeholder: n = "Select date",
|
|
637
640
|
disabled: s = !1,
|
|
638
641
|
required: a = !1,
|
|
639
|
-
size:
|
|
640
|
-
className:
|
|
641
|
-
minDate:
|
|
642
|
-
maxDate:
|
|
642
|
+
size: l = "md",
|
|
643
|
+
className: o,
|
|
644
|
+
minDate: h,
|
|
645
|
+
maxDate: u,
|
|
643
646
|
format: N = "MM/dd/yyyy",
|
|
644
|
-
withTime:
|
|
645
|
-
},
|
|
647
|
+
withTime: m = !1
|
|
648
|
+
}, f) => {
|
|
646
649
|
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null), _ = se(null), E = ze(b, _);
|
|
647
650
|
Q(() => {
|
|
648
651
|
const i = (S) => {
|
|
@@ -655,7 +658,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
655
658
|
const W = (i) => {
|
|
656
659
|
if (!i) return "";
|
|
657
660
|
const S = i.getDate().toString().padStart(2, "0"), y = (i.getMonth() + 1).toString().padStart(2, "0"), A = i.getFullYear(), w = N === "dd/MM/yyyy" ? `${S}/${y}/${A}` : N === "yyyy-MM-dd" ? `${A}-${y}-${S}` : `${y}/${S}/${A}`;
|
|
658
|
-
return
|
|
661
|
+
return m ? `${w} ${D(i)}` : w;
|
|
659
662
|
}, D = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, X = (i) => {
|
|
660
663
|
const [S, y] = i.split(":").map(Number);
|
|
661
664
|
if (Number.isNaN(S) || Number.isNaN(y)) return;
|
|
@@ -669,8 +672,8 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
669
672
|
w.push(new Date(ee)), ee.setDate(ee.getDate() + 1);
|
|
670
673
|
return w;
|
|
671
674
|
}, I = (i) => {
|
|
672
|
-
if (i.getMonth() === C.getMonth() && !(
|
|
673
|
-
if (
|
|
675
|
+
if (i.getMonth() === C.getMonth() && !(h && i < h) && !(u && i > u)) {
|
|
676
|
+
if (m) {
|
|
674
677
|
const y = new Date(i);
|
|
675
678
|
y.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(y);
|
|
676
679
|
return;
|
|
@@ -683,19 +686,19 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
683
686
|
g(new Date(C.getFullYear(), C.getMonth() + 1, 1));
|
|
684
687
|
}, re = () => {
|
|
685
688
|
r?.(null), p(!1);
|
|
686
|
-
},
|
|
689
|
+
}, j = d(
|
|
687
690
|
"w-full border border-border rounded-md transition-colors duration-fast",
|
|
688
691
|
"bg-surface text-text",
|
|
689
692
|
"placeholder:text-text-muted",
|
|
690
693
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
691
694
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
692
695
|
{
|
|
693
|
-
"h-control-sm px-3 text-sm":
|
|
694
|
-
"h-control-md px-3 text-base":
|
|
695
|
-
"h-control-lg px-3 text-base":
|
|
696
|
-
"h-control-md w-full px-3 text-base":
|
|
696
|
+
"h-control-sm px-3 text-sm": l === "sm",
|
|
697
|
+
"h-control-md px-3 text-base": l === "md",
|
|
698
|
+
"h-control-lg px-3 text-base": l === "lg",
|
|
699
|
+
"h-control-md w-full px-3 text-base": l === "full"
|
|
697
700
|
},
|
|
698
|
-
|
|
701
|
+
o
|
|
699
702
|
), ce = U(), k = [
|
|
700
703
|
"January",
|
|
701
704
|
"February",
|
|
@@ -715,7 +718,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
715
718
|
/* @__PURE__ */ e(
|
|
716
719
|
"input",
|
|
717
720
|
{
|
|
718
|
-
ref:
|
|
721
|
+
ref: f,
|
|
719
722
|
type: "text",
|
|
720
723
|
value: W(t ?? null),
|
|
721
724
|
placeholder: n,
|
|
@@ -723,7 +726,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
723
726
|
required: a,
|
|
724
727
|
readOnly: !0,
|
|
725
728
|
onClick: () => !s && p(!b),
|
|
726
|
-
className: d(
|
|
729
|
+
className: d(j, "pr-10 cursor-pointer")
|
|
727
730
|
}
|
|
728
731
|
),
|
|
729
732
|
/* @__PURE__ */ e(
|
|
@@ -744,7 +747,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
744
747
|
{
|
|
745
748
|
onClick: q,
|
|
746
749
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
747
|
-
children: /* @__PURE__ */ e(
|
|
750
|
+
children: /* @__PURE__ */ e(Pt, {})
|
|
748
751
|
}
|
|
749
752
|
),
|
|
750
753
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
@@ -757,13 +760,13 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
757
760
|
{
|
|
758
761
|
onClick: K,
|
|
759
762
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
760
|
-
children: /* @__PURE__ */ e(
|
|
763
|
+
children: /* @__PURE__ */ e(jt, {})
|
|
761
764
|
}
|
|
762
765
|
)
|
|
763
766
|
] }),
|
|
764
767
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((i) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: i }, i)) }),
|
|
765
768
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ce.map((i, S) => {
|
|
766
|
-
const y = i.getMonth() === C.getMonth(), A = t && i.toDateString() === t.toDateString(), w = i.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), ee = !y ||
|
|
769
|
+
const y = i.getMonth() === C.getMonth(), A = t && i.toDateString() === t.toDateString(), w = i.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), ee = !y || h && i < h || u && i > u;
|
|
767
770
|
return /* @__PURE__ */ e(
|
|
768
771
|
"button",
|
|
769
772
|
{
|
|
@@ -783,7 +786,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
783
786
|
S
|
|
784
787
|
);
|
|
785
788
|
}) }),
|
|
786
|
-
|
|
789
|
+
m && /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
|
|
787
790
|
/* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
|
|
788
791
|
/* @__PURE__ */ e(
|
|
789
792
|
"input",
|
|
@@ -828,13 +831,13 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
828
831
|
error: n,
|
|
829
832
|
size: s = "md",
|
|
830
833
|
fullWidth: a = !1,
|
|
831
|
-
disabled:
|
|
832
|
-
options:
|
|
833
|
-
placeholder:
|
|
834
|
-
containerClassName:
|
|
834
|
+
disabled: l = !1,
|
|
835
|
+
options: o,
|
|
836
|
+
placeholder: h,
|
|
837
|
+
containerClassName: u,
|
|
835
838
|
labelClassName: N,
|
|
836
|
-
className:
|
|
837
|
-
id:
|
|
839
|
+
className: m,
|
|
840
|
+
id: f,
|
|
838
841
|
searchable: b,
|
|
839
842
|
multiple: p,
|
|
840
843
|
value: C,
|
|
@@ -843,7 +846,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
843
846
|
onCreateOption: _,
|
|
844
847
|
...E
|
|
845
848
|
}, W) => {
|
|
846
|
-
const D =
|
|
849
|
+
const D = f || `select-${Math.random().toString(36).substr(2, 9)}`, X = !!n, [U, I] = oe.useState(!1), [q, K] = oe.useState(""), re = oe.useRef(null), j = oe.useRef(null), ce = ze(U, j, { matchWidth: !0 }), [k, i] = oe.useState(o);
|
|
847
850
|
oe.useImperativeHandle(W, () => re.current), oe.useEffect(() => {
|
|
848
851
|
const M = (T) => {
|
|
849
852
|
re.current && !re.current.contains(T.target) && I(!1);
|
|
@@ -867,12 +870,12 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
867
870
|
);
|
|
868
871
|
oe.useEffect(() => {
|
|
869
872
|
i((M) => {
|
|
870
|
-
const T = [...
|
|
873
|
+
const T = [...o];
|
|
871
874
|
return M.forEach((z) => {
|
|
872
875
|
!S(T, z.value) && !S(T, z.label) && T.push(z);
|
|
873
876
|
}), y(T, C);
|
|
874
877
|
});
|
|
875
|
-
}, [
|
|
878
|
+
}, [o, C, y, S]);
|
|
876
879
|
const A = (M) => {
|
|
877
880
|
if (p) {
|
|
878
881
|
const T = Array.isArray(C) ? C : [], z = T.includes(M) ? T.filter((B) => B !== M) : [...T, M];
|
|
@@ -895,7 +898,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
895
898
|
return;
|
|
896
899
|
}
|
|
897
900
|
i((B) => [...B, z]), A(z.value), K(""), p || I(!1);
|
|
898
|
-
},
|
|
901
|
+
}, P = () => p ? ee.length > 0 ? ee.map((M) => M.label).join(", ") : h || "Select options" : w?.label || h || "Select an option";
|
|
899
902
|
return /* @__PURE__ */ c(
|
|
900
903
|
"div",
|
|
901
904
|
{
|
|
@@ -903,7 +906,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
903
906
|
className: d(
|
|
904
907
|
"relative flex flex-col",
|
|
905
908
|
a && "w-full",
|
|
906
|
-
|
|
909
|
+
u
|
|
907
910
|
),
|
|
908
911
|
...E,
|
|
909
912
|
children: [
|
|
@@ -924,10 +927,10 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
924
927
|
/* @__PURE__ */ c(
|
|
925
928
|
"button",
|
|
926
929
|
{
|
|
927
|
-
ref:
|
|
930
|
+
ref: j,
|
|
928
931
|
type: "button",
|
|
929
932
|
id: D,
|
|
930
|
-
disabled:
|
|
933
|
+
disabled: l,
|
|
931
934
|
onClick: () => I(!U),
|
|
932
935
|
className: d(
|
|
933
936
|
"flex w-full items-center justify-between gap-2 rounded-md border transition-colors duration-fast text-left",
|
|
@@ -936,10 +939,10 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
936
939
|
"bg-surface",
|
|
937
940
|
Ot[s],
|
|
938
941
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
939
|
-
|
|
942
|
+
m
|
|
940
943
|
),
|
|
941
944
|
children: [
|
|
942
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children:
|
|
945
|
+
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: P() }),
|
|
943
946
|
/* @__PURE__ */ e(
|
|
944
947
|
Qe,
|
|
945
948
|
{
|
|
@@ -986,14 +989,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
986
989
|
}
|
|
987
990
|
),
|
|
988
991
|
/* @__PURE__ */ c("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
|
|
989
|
-
|
|
992
|
+
h && !p && /* @__PURE__ */ e(
|
|
990
993
|
"li",
|
|
991
994
|
{
|
|
992
995
|
className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
|
|
993
996
|
onClick: () => {
|
|
994
997
|
g?.(""), I(!1);
|
|
995
998
|
},
|
|
996
|
-
children:
|
|
999
|
+
children: h
|
|
997
1000
|
}
|
|
998
1001
|
),
|
|
999
1002
|
ae.map((M) => {
|
|
@@ -1055,17 +1058,17 @@ const Ft = {
|
|
|
1055
1058
|
error: n,
|
|
1056
1059
|
size: s = "md",
|
|
1057
1060
|
fullWidth: a = !1,
|
|
1058
|
-
startIcon:
|
|
1059
|
-
endIcon:
|
|
1060
|
-
loading:
|
|
1061
|
-
containerClassName:
|
|
1061
|
+
startIcon: l,
|
|
1062
|
+
endIcon: o,
|
|
1063
|
+
loading: h = !1,
|
|
1064
|
+
containerClassName: u,
|
|
1062
1065
|
labelClassName: N,
|
|
1063
|
-
className:
|
|
1064
|
-
id:
|
|
1066
|
+
className: m,
|
|
1067
|
+
id: f,
|
|
1065
1068
|
...b
|
|
1066
1069
|
}, p) => {
|
|
1067
|
-
const C = oe.useId(), g =
|
|
1068
|
-
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full",
|
|
1070
|
+
const C = oe.useId(), g = f || `textfield-${C}`, x = !!n, _ = n || r ? `${g}-description` : void 0;
|
|
1071
|
+
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", u), children: [
|
|
1069
1072
|
t && /* @__PURE__ */ e(
|
|
1070
1073
|
"label",
|
|
1071
1074
|
{
|
|
@@ -1079,7 +1082,7 @@ const Ft = {
|
|
|
1079
1082
|
}
|
|
1080
1083
|
),
|
|
1081
1084
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
1082
|
-
|
|
1085
|
+
l && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-muted", children: l }),
|
|
1083
1086
|
/* @__PURE__ */ e(
|
|
1084
1087
|
"input",
|
|
1085
1088
|
{
|
|
@@ -1094,21 +1097,21 @@ const Ft = {
|
|
|
1094
1097
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1095
1098
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1096
1099
|
Ft[s],
|
|
1097
|
-
|
|
1098
|
-
(
|
|
1100
|
+
l && "pl-9",
|
|
1101
|
+
(o || h) && "pr-9",
|
|
1099
1102
|
x ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
1100
|
-
|
|
1103
|
+
m
|
|
1101
1104
|
),
|
|
1102
1105
|
...b
|
|
1103
1106
|
}
|
|
1104
1107
|
),
|
|
1105
|
-
(
|
|
1108
|
+
(o || h) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: h ? /* @__PURE__ */ e(
|
|
1106
1109
|
"span",
|
|
1107
1110
|
{
|
|
1108
1111
|
"aria-hidden": !0,
|
|
1109
1112
|
className: "size-icon-md animate-spin rounded-full border-2 border-border border-t-transparent"
|
|
1110
1113
|
}
|
|
1111
|
-
) :
|
|
1114
|
+
) : o })
|
|
1112
1115
|
] }),
|
|
1113
1116
|
(n || r) && /* @__PURE__ */ e(
|
|
1114
1117
|
"p",
|
|
@@ -1128,41 +1131,41 @@ function Rt({
|
|
|
1128
1131
|
onListFolders: n,
|
|
1129
1132
|
disabled: s,
|
|
1130
1133
|
size: a = "md",
|
|
1131
|
-
placeholder:
|
|
1132
|
-
templatePlaceholder:
|
|
1133
|
-
showTemplate:
|
|
1134
|
+
placeholder: l,
|
|
1135
|
+
templatePlaceholder: o,
|
|
1136
|
+
showTemplate: h = !0
|
|
1134
1137
|
}) {
|
|
1135
|
-
const [
|
|
1138
|
+
const [u, N] = R([]);
|
|
1136
1139
|
Q(() => {
|
|
1137
|
-
let
|
|
1140
|
+
let f = !0;
|
|
1138
1141
|
return Promise.resolve(n?.()).then((b) => {
|
|
1139
|
-
|
|
1142
|
+
f && b && N(b.data ?? []);
|
|
1140
1143
|
}).catch(() => {
|
|
1141
1144
|
}), () => {
|
|
1142
|
-
|
|
1145
|
+
f = !1;
|
|
1143
1146
|
};
|
|
1144
1147
|
}, []);
|
|
1145
|
-
const
|
|
1148
|
+
const m = t ?? {};
|
|
1146
1149
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
1147
1150
|
/* @__PURE__ */ e(
|
|
1148
1151
|
Ne,
|
|
1149
1152
|
{
|
|
1150
1153
|
size: a,
|
|
1151
1154
|
fullWidth: !0,
|
|
1152
|
-
value:
|
|
1153
|
-
options:
|
|
1154
|
-
placeholder:
|
|
1155
|
-
onChange: (
|
|
1155
|
+
value: m.folderId ?? "",
|
|
1156
|
+
options: u.map((f) => ({ value: f.id, label: f.name })),
|
|
1157
|
+
placeholder: l ?? "Select a folder",
|
|
1158
|
+
onChange: (f) => r?.({ ...m, folderId: f })
|
|
1156
1159
|
}
|
|
1157
1160
|
),
|
|
1158
|
-
|
|
1161
|
+
h && /* @__PURE__ */ e(
|
|
1159
1162
|
be,
|
|
1160
1163
|
{
|
|
1161
1164
|
size: a,
|
|
1162
1165
|
disabled: s ?? !1,
|
|
1163
|
-
value:
|
|
1164
|
-
placeholder:
|
|
1165
|
-
onChange: (
|
|
1166
|
+
value: m.pathTemplate ?? "",
|
|
1167
|
+
placeholder: o ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
|
|
1168
|
+
onChange: (f) => r?.({ ...m, pathTemplate: f.target.value })
|
|
1166
1169
|
}
|
|
1167
1170
|
)
|
|
1168
1171
|
] });
|
|
@@ -1184,13 +1187,13 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1184
1187
|
error: n,
|
|
1185
1188
|
size: s = "md",
|
|
1186
1189
|
fullWidth: a = !1,
|
|
1187
|
-
startIcon:
|
|
1188
|
-
loading:
|
|
1189
|
-
containerClassName:
|
|
1190
|
-
labelClassName:
|
|
1190
|
+
startIcon: l = /* @__PURE__ */ e(Bt, {}),
|
|
1191
|
+
loading: o = !1,
|
|
1192
|
+
containerClassName: h,
|
|
1193
|
+
labelClassName: u,
|
|
1191
1194
|
className: N,
|
|
1192
|
-
id:
|
|
1193
|
-
options:
|
|
1195
|
+
id: m,
|
|
1196
|
+
options: f,
|
|
1194
1197
|
onRemoteSearch: b,
|
|
1195
1198
|
onSelect: p,
|
|
1196
1199
|
debounceTime: C = 500,
|
|
@@ -1199,23 +1202,23 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1199
1202
|
onChange: _,
|
|
1200
1203
|
...E
|
|
1201
1204
|
}, W) => {
|
|
1202
|
-
const D =
|
|
1205
|
+
const D = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, K] = R(x || ""), [re, j] = R(!1), [ce, k] = R(!1), [i, S] = R(!1);
|
|
1203
1206
|
Q(() => {
|
|
1204
1207
|
x !== void 0 && K(x);
|
|
1205
1208
|
}, [x]);
|
|
1206
1209
|
const y = he(() => {
|
|
1207
|
-
if (g && !i || !q) return
|
|
1208
|
-
const
|
|
1209
|
-
return
|
|
1210
|
-
(M) => String(M.label).toLowerCase().includes(
|
|
1210
|
+
if (g && !i || !q) return f;
|
|
1211
|
+
const P = String(q).toLowerCase();
|
|
1212
|
+
return f.filter(
|
|
1213
|
+
(M) => String(M.label).toLowerCase().includes(P)
|
|
1211
1214
|
);
|
|
1212
|
-
}, [q,
|
|
1215
|
+
}, [q, f, g, i]);
|
|
1213
1216
|
Q(() => {
|
|
1214
1217
|
if (!b || !q) {
|
|
1215
1218
|
k(!1);
|
|
1216
1219
|
return;
|
|
1217
1220
|
}
|
|
1218
|
-
const
|
|
1221
|
+
const P = setTimeout(async () => {
|
|
1219
1222
|
k(!0);
|
|
1220
1223
|
try {
|
|
1221
1224
|
await b(String(q));
|
|
@@ -1226,29 +1229,29 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1226
1229
|
}
|
|
1227
1230
|
}, C);
|
|
1228
1231
|
return () => {
|
|
1229
|
-
clearTimeout(
|
|
1232
|
+
clearTimeout(P), k(!1);
|
|
1230
1233
|
};
|
|
1231
1234
|
}, [q, C, b]), Q(() => {
|
|
1232
|
-
const
|
|
1233
|
-
U.current && !U.current.contains(M.target) &&
|
|
1235
|
+
const P = (M) => {
|
|
1236
|
+
U.current && !U.current.contains(M.target) && j(!1);
|
|
1234
1237
|
};
|
|
1235
|
-
return document.addEventListener("mousedown",
|
|
1238
|
+
return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
|
|
1236
1239
|
}, []);
|
|
1237
|
-
const A = (
|
|
1238
|
-
const M =
|
|
1239
|
-
K(M),
|
|
1240
|
-
}, w = (
|
|
1241
|
-
K(
|
|
1240
|
+
const A = (P) => {
|
|
1241
|
+
const M = P.target.value;
|
|
1242
|
+
K(M), j(!0), S(!0), _ && _(P);
|
|
1243
|
+
}, w = (P) => {
|
|
1244
|
+
K(P.label), j(!1), S(!1), p && p(P.value);
|
|
1242
1245
|
}, ee = () => {
|
|
1243
|
-
(
|
|
1244
|
-
}, ae =
|
|
1246
|
+
(f.length > 0 || b) && (j(!0), S(!1));
|
|
1247
|
+
}, ae = o || ce, le = re && (y.length > 0 || ae), G = he(() => W || I, [W]);
|
|
1245
1248
|
return /* @__PURE__ */ c(
|
|
1246
1249
|
"div",
|
|
1247
1250
|
{
|
|
1248
1251
|
className: fe(
|
|
1249
1252
|
"flex flex-col",
|
|
1250
1253
|
a ? "w-full" : "",
|
|
1251
|
-
|
|
1254
|
+
h || "",
|
|
1252
1255
|
"relative"
|
|
1253
1256
|
),
|
|
1254
1257
|
ref: U,
|
|
@@ -1260,13 +1263,13 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1260
1263
|
className: fe(
|
|
1261
1264
|
"block text-sm font-medium mb-1",
|
|
1262
1265
|
X ? "text-danger-fg" : "text-text",
|
|
1263
|
-
|
|
1266
|
+
u || ""
|
|
1264
1267
|
),
|
|
1265
1268
|
children: t
|
|
1266
1269
|
}
|
|
1267
1270
|
),
|
|
1268
1271
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
1269
|
-
|
|
1272
|
+
l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: fe("text-text-muted", Me[s]), children: l }) }),
|
|
1270
1273
|
/* @__PURE__ */ e(
|
|
1271
1274
|
"input",
|
|
1272
1275
|
{
|
|
@@ -1283,7 +1286,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1283
1286
|
// Size styles
|
|
1284
1287
|
Vt[s],
|
|
1285
1288
|
// Icon padding
|
|
1286
|
-
|
|
1289
|
+
l ? "pl-10" : "",
|
|
1287
1290
|
"pr-10",
|
|
1288
1291
|
// Altijd padding rechts voor de dropdown/loading icon
|
|
1289
1292
|
// State styles
|
|
@@ -1293,7 +1296,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1293
1296
|
...E
|
|
1294
1297
|
}
|
|
1295
1298
|
),
|
|
1296
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae ||
|
|
1299
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || o ? (
|
|
1297
1300
|
// Loading Spinner
|
|
1298
1301
|
/* @__PURE__ */ e(
|
|
1299
1302
|
et,
|
|
@@ -1313,7 +1316,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1313
1316
|
re ? "rotate-180" : "rotate-0"
|
|
1314
1317
|
),
|
|
1315
1318
|
onClick: () => {
|
|
1316
|
-
|
|
1319
|
+
j((P) => (P || S(!1), !P));
|
|
1317
1320
|
}
|
|
1318
1321
|
}
|
|
1319
1322
|
)
|
|
@@ -1324,17 +1327,17 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1324
1327
|
{
|
|
1325
1328
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1326
1329
|
role: "listbox",
|
|
1327
|
-
children: y.length > 0 ? y.map((
|
|
1330
|
+
children: y.length > 0 ? y.map((P) => /* @__PURE__ */ e(
|
|
1328
1331
|
"li",
|
|
1329
1332
|
{
|
|
1330
1333
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1331
|
-
onClick: () => w(
|
|
1334
|
+
onClick: () => w(P),
|
|
1332
1335
|
role: "option",
|
|
1333
|
-
"aria-selected": q ===
|
|
1334
|
-
children:
|
|
1336
|
+
"aria-selected": q === P.label,
|
|
1337
|
+
children: P.label
|
|
1335
1338
|
},
|
|
1336
|
-
|
|
1337
|
-
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ae ||
|
|
1339
|
+
P.value
|
|
1340
|
+
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ae || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
1338
1341
|
}
|
|
1339
1342
|
),
|
|
1340
1343
|
(n || r) && /* @__PURE__ */ e(
|
|
@@ -1358,8 +1361,8 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1358
1361
|
);
|
|
1359
1362
|
qt.displayName = "SearchableTextField";
|
|
1360
1363
|
const Ut = me(
|
|
1361
|
-
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...
|
|
1362
|
-
const
|
|
1364
|
+
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
1365
|
+
const h = /* @__PURE__ */ e(
|
|
1363
1366
|
"span",
|
|
1364
1367
|
{
|
|
1365
1368
|
"aria-hidden": !0,
|
|
@@ -1393,17 +1396,17 @@ const Ut = me(
|
|
|
1393
1396
|
/* @__PURE__ */ e(
|
|
1394
1397
|
"input",
|
|
1395
1398
|
{
|
|
1396
|
-
ref:
|
|
1399
|
+
ref: o,
|
|
1397
1400
|
type: "checkbox",
|
|
1398
1401
|
role: "switch",
|
|
1399
1402
|
checked: t,
|
|
1400
1403
|
disabled: s,
|
|
1401
|
-
onChange: (
|
|
1404
|
+
onChange: (u) => r(u.target.checked),
|
|
1402
1405
|
className: "peer sr-only",
|
|
1403
|
-
...
|
|
1406
|
+
...l
|
|
1404
1407
|
}
|
|
1405
1408
|
),
|
|
1406
|
-
/* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children:
|
|
1409
|
+
/* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: h }),
|
|
1407
1410
|
n && /* @__PURE__ */ e("span", { className: "text-sm text-text", children: n })
|
|
1408
1411
|
]
|
|
1409
1412
|
}
|
|
@@ -1418,8 +1421,8 @@ function Wt({
|
|
|
1418
1421
|
tableColumns: s = 6,
|
|
1419
1422
|
tableRows: a = 8
|
|
1420
1423
|
}) {
|
|
1421
|
-
const
|
|
1422
|
-
return r ? /* @__PURE__ */ e(
|
|
1424
|
+
const l = ({ children: o }) => t === "inline" ? /* @__PURE__ */ e(xe, { children: o }) : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: o });
|
|
1425
|
+
return r ? /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { className: "w-full max-w-6xl mx-auto animate-pulse", children: r }) }) : /* @__PURE__ */ e(l, { children: /* @__PURE__ */ c("div", { className: "w-full mx-auto space-y-6 animate-pulse", children: [
|
|
1423
1426
|
!n && /* @__PURE__ */ c(xe, { children: [
|
|
1424
1427
|
/* @__PURE__ */ e("div", { className: "h-6 w-1/4 rounded-sm bg-surface-hover" }),
|
|
1425
1428
|
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
@@ -1433,29 +1436,29 @@ function Wt({
|
|
|
1433
1436
|
{
|
|
1434
1437
|
className: "grid gap-2 bg-surface-hover p-3",
|
|
1435
1438
|
style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
|
|
1436
|
-
children: Array.from({ length: s }).map((
|
|
1439
|
+
children: Array.from({ length: s }).map((o, h) => /* @__PURE__ */ e(
|
|
1437
1440
|
"div",
|
|
1438
1441
|
{
|
|
1439
1442
|
className: "h-4 w-2/3 rounded-sm bg-border-strong"
|
|
1440
1443
|
},
|
|
1441
|
-
`header-${
|
|
1444
|
+
`header-${h}`
|
|
1442
1445
|
))
|
|
1443
1446
|
}
|
|
1444
1447
|
),
|
|
1445
|
-
Array.from({ length: a }).map((
|
|
1448
|
+
Array.from({ length: a }).map((o, h) => /* @__PURE__ */ e(
|
|
1446
1449
|
"div",
|
|
1447
1450
|
{
|
|
1448
1451
|
className: "grid gap-2 border-t border-border-subtle p-3",
|
|
1449
1452
|
style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
|
|
1450
|
-
children: Array.from({ length: s }).map((
|
|
1453
|
+
children: Array.from({ length: s }).map((u, N) => /* @__PURE__ */ e(
|
|
1451
1454
|
"div",
|
|
1452
1455
|
{
|
|
1453
1456
|
className: "h-4 w-full rounded-sm bg-surface-hover"
|
|
1454
1457
|
},
|
|
1455
|
-
`cell-${
|
|
1458
|
+
`cell-${h}-${N}`
|
|
1456
1459
|
))
|
|
1457
1460
|
},
|
|
1458
|
-
`row-${
|
|
1461
|
+
`row-${h}`
|
|
1459
1462
|
))
|
|
1460
1463
|
] })
|
|
1461
1464
|
] }) });
|
|
@@ -1466,12 +1469,12 @@ const Kt = ({
|
|
|
1466
1469
|
value: n,
|
|
1467
1470
|
onSelect: s,
|
|
1468
1471
|
placement: a = "bottom-start",
|
|
1469
|
-
disabled:
|
|
1470
|
-
className:
|
|
1471
|
-
showCheck:
|
|
1472
|
-
header:
|
|
1472
|
+
disabled: l = !1,
|
|
1473
|
+
className: o,
|
|
1474
|
+
showCheck: h = !0,
|
|
1475
|
+
header: u
|
|
1473
1476
|
}) => {
|
|
1474
|
-
const [N,
|
|
1477
|
+
const [N, m] = R(!1), [f, b] = R(null), [p, C] = R({ top: 0, left: 0 }), g = se(null), x = se(null), _ = se(null), E = se(null), W = ze(N, x, { placement: a }), D = se(null), X = () => Array.from(
|
|
1475
1478
|
E.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1476
1479
|
);
|
|
1477
1480
|
Q(() => {
|
|
@@ -1487,22 +1490,22 @@ const Kt = ({
|
|
|
1487
1490
|
};
|
|
1488
1491
|
Q(() => {
|
|
1489
1492
|
const i = (S) => {
|
|
1490
|
-
g.current && (!g.current.contains(S.target) || _.current && !_.current.contains(S.target)) && (
|
|
1493
|
+
g.current && (!g.current.contains(S.target) || _.current && !_.current.contains(S.target)) && (m(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1491
1494
|
};
|
|
1492
1495
|
return N && document.addEventListener("mousedown", i), () => {
|
|
1493
1496
|
document.removeEventListener("mousedown", i);
|
|
1494
1497
|
};
|
|
1495
1498
|
}, [N]), Q(() => {
|
|
1496
1499
|
const i = (S) => {
|
|
1497
|
-
S.key === "Escape" && (
|
|
1500
|
+
S.key === "Escape" && (m(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
|
|
1498
1501
|
};
|
|
1499
1502
|
return N && document.addEventListener("keydown", i), () => {
|
|
1500
1503
|
document.removeEventListener("keydown", i);
|
|
1501
1504
|
};
|
|
1502
1505
|
}, [N]), Q(() => {
|
|
1503
|
-
if (
|
|
1506
|
+
if (f && g.current) {
|
|
1504
1507
|
const i = g.current.querySelector(
|
|
1505
|
-
`[data-option-value="${
|
|
1508
|
+
`[data-option-value="${f}"]`
|
|
1506
1509
|
);
|
|
1507
1510
|
if (i) {
|
|
1508
1511
|
const S = i.getBoundingClientRect();
|
|
@@ -1512,21 +1515,21 @@ const Kt = ({
|
|
|
1512
1515
|
});
|
|
1513
1516
|
}
|
|
1514
1517
|
}
|
|
1515
|
-
}, [
|
|
1518
|
+
}, [f]), Q(() => () => {
|
|
1516
1519
|
D.current && clearTimeout(D.current);
|
|
1517
1520
|
}, []);
|
|
1518
1521
|
const I = (i) => {
|
|
1519
|
-
i.stopPropagation(), !
|
|
1522
|
+
i.stopPropagation(), !l && (m(!N), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1520
1523
|
}, q = (i, S, y) => {
|
|
1521
|
-
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, y),
|
|
1524
|
+
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, y), m(!1), b(null));
|
|
1522
1525
|
}, K = (i) => {
|
|
1523
1526
|
D.current && (clearTimeout(D.current), D.current = null), i.children && i.children.length > 0 ? b(i.value) : b(null);
|
|
1524
1527
|
}, re = (i) => {
|
|
1525
1528
|
i.children && i.children.length > 0 ? D.current = setTimeout(() => {
|
|
1526
1529
|
b(null);
|
|
1527
1530
|
}, 150) : b(null);
|
|
1528
|
-
},
|
|
1529
|
-
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, y),
|
|
1531
|
+
}, j = (i, S, y) => {
|
|
1532
|
+
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, y), m(!1), b(null));
|
|
1530
1533
|
}, ce = d(
|
|
1531
1534
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1532
1535
|
"max-h-60 overflow-auto"
|
|
@@ -1540,7 +1543,7 @@ const Kt = ({
|
|
|
1540
1543
|
ref: g,
|
|
1541
1544
|
className: d(
|
|
1542
1545
|
"relative flex flex-row items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
1543
|
-
|
|
1546
|
+
o
|
|
1544
1547
|
),
|
|
1545
1548
|
children: [
|
|
1546
1549
|
/* @__PURE__ */ e(
|
|
@@ -1548,17 +1551,17 @@ const Kt = ({
|
|
|
1548
1551
|
{
|
|
1549
1552
|
ref: x,
|
|
1550
1553
|
onClick: I,
|
|
1551
|
-
disabled:
|
|
1554
|
+
disabled: l,
|
|
1552
1555
|
"aria-haspopup": "menu",
|
|
1553
1556
|
"aria-expanded": N,
|
|
1554
1557
|
className: d("inline-flex items-center justify-center", {
|
|
1555
|
-
"opacity-50 cursor-not-allowed":
|
|
1558
|
+
"opacity-50 cursor-not-allowed": l
|
|
1556
1559
|
}),
|
|
1557
1560
|
children: t
|
|
1558
1561
|
}
|
|
1559
1562
|
),
|
|
1560
1563
|
N && /* @__PURE__ */ e("div", { ref: E, className: ce, style: W, onKeyDown: U, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
|
|
1561
|
-
|
|
1564
|
+
u && (typeof u == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: u }) : u),
|
|
1562
1565
|
r.map((i, S) => {
|
|
1563
1566
|
if (i.divider)
|
|
1564
1567
|
return /* @__PURE__ */ e(
|
|
@@ -1568,7 +1571,7 @@ const Kt = ({
|
|
|
1568
1571
|
},
|
|
1569
1572
|
`divider-${S}`
|
|
1570
1573
|
);
|
|
1571
|
-
const y = i.children && i.children.length > 0, A =
|
|
1574
|
+
const y = i.children && i.children.length > 0, A = f === i.value;
|
|
1572
1575
|
return /* @__PURE__ */ c("div", { className: "relative group", children: [
|
|
1573
1576
|
/* @__PURE__ */ c(
|
|
1574
1577
|
"button",
|
|
@@ -1596,7 +1599,7 @@ const Kt = ({
|
|
|
1596
1599
|
] })
|
|
1597
1600
|
] }),
|
|
1598
1601
|
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
|
|
1599
|
-
|
|
1602
|
+
h && n === i.value && /* @__PURE__ */ e(Te, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
|
|
1600
1603
|
y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
|
|
1601
1604
|
] })
|
|
1602
1605
|
]
|
|
@@ -1634,7 +1637,7 @@ const Kt = ({
|
|
|
1634
1637
|
return /* @__PURE__ */ c(
|
|
1635
1638
|
"button",
|
|
1636
1639
|
{
|
|
1637
|
-
onClick: (le) =>
|
|
1640
|
+
onClick: (le) => j(
|
|
1638
1641
|
le,
|
|
1639
1642
|
w,
|
|
1640
1643
|
i.value
|
|
@@ -1654,7 +1657,7 @@ const Kt = ({
|
|
|
1654
1657
|
w.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: w.description })
|
|
1655
1658
|
] })
|
|
1656
1659
|
] }),
|
|
1657
|
-
|
|
1660
|
+
h && ae && /* @__PURE__ */ e(Te, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
|
|
1658
1661
|
]
|
|
1659
1662
|
},
|
|
1660
1663
|
w.value
|
|
@@ -1736,19 +1739,19 @@ const Kt = ({
|
|
|
1736
1739
|
)
|
|
1737
1740
|
] })
|
|
1738
1741
|
] }) }) });
|
|
1739
|
-
},
|
|
1742
|
+
}, Pe = ({
|
|
1740
1743
|
data: t,
|
|
1741
1744
|
columns: r,
|
|
1742
1745
|
loading: n = !1,
|
|
1743
1746
|
searchable: s = !1,
|
|
1744
1747
|
searchPlaceholder: a = "Search...",
|
|
1745
|
-
filters:
|
|
1746
|
-
paginated:
|
|
1747
|
-
pageSizeOptions:
|
|
1748
|
-
defaultPageSize:
|
|
1748
|
+
filters: l = [],
|
|
1749
|
+
paginated: o = !1,
|
|
1750
|
+
pageSizeOptions: h = [10, 25, 50, 100],
|
|
1751
|
+
defaultPageSize: u = 10,
|
|
1749
1752
|
actions: N = [],
|
|
1750
|
-
onRowClick:
|
|
1751
|
-
selectable:
|
|
1753
|
+
onRowClick: m,
|
|
1754
|
+
selectable: f = !1,
|
|
1752
1755
|
selectedRows: b = [],
|
|
1753
1756
|
onSelectionChange: p,
|
|
1754
1757
|
getRowKey: C = (I, q) => q,
|
|
@@ -1764,9 +1767,9 @@ const Kt = ({
|
|
|
1764
1767
|
const [I, q] = R(""), [K, re] = R({
|
|
1765
1768
|
column: null,
|
|
1766
1769
|
direction: null
|
|
1767
|
-
}), [
|
|
1770
|
+
}), [j, ce] = R({
|
|
1768
1771
|
page: 0,
|
|
1769
|
-
pageSize:
|
|
1772
|
+
pageSize: u
|
|
1770
1773
|
}), k = se(null), i = he(() => {
|
|
1771
1774
|
let v = t;
|
|
1772
1775
|
if (s && I.trim()) {
|
|
@@ -1778,7 +1781,7 @@ const Kt = ({
|
|
|
1778
1781
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1779
1782
|
}));
|
|
1780
1783
|
}
|
|
1781
|
-
return
|
|
1784
|
+
return l.forEach((V) => {
|
|
1782
1785
|
V.value && V.value !== "all" && (v = v.filter((Z) => {
|
|
1783
1786
|
const J = r.find((ie) => ie.id === V.id);
|
|
1784
1787
|
if (!J) return !0;
|
|
@@ -1786,7 +1789,7 @@ const Kt = ({
|
|
|
1786
1789
|
return String(O || "") === V.value;
|
|
1787
1790
|
}));
|
|
1788
1791
|
}), v;
|
|
1789
|
-
}, [t, I, r, s,
|
|
1792
|
+
}, [t, I, r, s, l]), S = he(() => {
|
|
1790
1793
|
if (!K.column || !K.direction) return i;
|
|
1791
1794
|
const v = r.find((V) => V.id === K.column);
|
|
1792
1795
|
return v ? [...i].sort((V, Z) => {
|
|
@@ -1795,10 +1798,10 @@ const Kt = ({
|
|
|
1795
1798
|
return J < O ? ie = -1 : J > O && (ie = 1), K.direction === "desc" ? -ie : ie;
|
|
1796
1799
|
}) : i;
|
|
1797
1800
|
}, [i, K, r]), y = he(() => {
|
|
1798
|
-
if (!
|
|
1799
|
-
const v =
|
|
1801
|
+
if (!o) return S;
|
|
1802
|
+
const v = j.page * j.pageSize, V = v + j.pageSize;
|
|
1800
1803
|
return S.slice(v, V);
|
|
1801
|
-
}, [S,
|
|
1804
|
+
}, [S, j, o]), A = ue(
|
|
1802
1805
|
(v) => {
|
|
1803
1806
|
r.find((Z) => Z.id === v)?.sortable && re((Z) => Z.column !== v ? { column: v, direction: "asc" } : Z.direction === "asc" ? { column: v, direction: "desc" } : { column: null, direction: null });
|
|
1804
1807
|
},
|
|
@@ -1826,8 +1829,8 @@ const Kt = ({
|
|
|
1826
1829
|
ce((v) => ({ ...v, page: 0 }));
|
|
1827
1830
|
}, [I, K]), Q(() => {
|
|
1828
1831
|
ce((v) => ({ ...v, page: 0 }));
|
|
1829
|
-
}, [
|
|
1830
|
-
const G = S.length,
|
|
1832
|
+
}, [l.map((v) => v.value).join(",")]);
|
|
1833
|
+
const G = S.length, P = Math.ceil(G / j.pageSize), M = j.page * j.pageSize + 1, T = Math.min(M + j.pageSize - 1, G), z = y.length > 0 && y.every((v) => {
|
|
1831
1834
|
const V = C(v, 0);
|
|
1832
1835
|
return b.some(
|
|
1833
1836
|
(Z, J) => C(Z, J) === V
|
|
@@ -1844,11 +1847,11 @@ const Kt = ({
|
|
|
1844
1847
|
"text-text border-b border-border p-2"
|
|
1845
1848
|
), te = d("h-row-lg", {
|
|
1846
1849
|
"hover:bg-surface-sunk": x,
|
|
1847
|
-
"cursor-pointer":
|
|
1850
|
+
"cursor-pointer": m
|
|
1848
1851
|
});
|
|
1849
1852
|
return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
1850
|
-
(s ||
|
|
1851
|
-
|
|
1853
|
+
(s || l.length > 0) && /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
1854
|
+
l.map((v) => /* @__PURE__ */ e(tr, { ...v }, v.id)),
|
|
1852
1855
|
/* @__PURE__ */ e("div", { className: "w-full sm:w-auto sm:ml-auto min-w-menu", children: /* @__PURE__ */ e(
|
|
1853
1856
|
be,
|
|
1854
1857
|
{
|
|
@@ -1871,7 +1874,7 @@ const Kt = ({
|
|
|
1871
1874
|
) }),
|
|
1872
1875
|
/* @__PURE__ */ c("table", { ref: k, className: d(F, "min-w-full"), children: [
|
|
1873
1876
|
/* @__PURE__ */ e("thead", { className: $, children: /* @__PURE__ */ c("tr", { children: [
|
|
1874
|
-
|
|
1877
|
+
f && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1875
1878
|
"input",
|
|
1876
1879
|
{
|
|
1877
1880
|
type: "checkbox",
|
|
@@ -1937,7 +1940,7 @@ const Kt = ({
|
|
|
1937
1940
|
/* @__PURE__ */ e("tbody", { children: y.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1938
1941
|
"td",
|
|
1939
1942
|
{
|
|
1940
|
-
colSpan: r.length + (
|
|
1943
|
+
colSpan: r.length + (f ? 1 : 0) + (N.length > 0 ? 1 : 0),
|
|
1941
1944
|
className: d(
|
|
1942
1945
|
L,
|
|
1943
1946
|
"text-center py-8 text-text-muted"
|
|
@@ -1957,10 +1960,10 @@ const Kt = ({
|
|
|
1957
1960
|
X?.(v, V)
|
|
1958
1961
|
),
|
|
1959
1962
|
onClick: (O) => {
|
|
1960
|
-
O.stopPropagation(),
|
|
1963
|
+
O.stopPropagation(), m?.(v, V);
|
|
1961
1964
|
},
|
|
1962
1965
|
children: [
|
|
1963
|
-
|
|
1966
|
+
f && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
1964
1967
|
"input",
|
|
1965
1968
|
{
|
|
1966
1969
|
type: "checkbox",
|
|
@@ -2022,7 +2025,7 @@ const Kt = ({
|
|
|
2022
2025
|
}) })
|
|
2023
2026
|
] })
|
|
2024
2027
|
] }),
|
|
2025
|
-
|
|
2028
|
+
o && G > 0 && /* @__PURE__ */ c("div", { className: "flex items-center justify-between px-6", children: [
|
|
2026
2029
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-4", children: [
|
|
2027
2030
|
/* @__PURE__ */ c("span", { className: "text-sm text-text-muted", children: [
|
|
2028
2031
|
"Showing ",
|
|
@@ -2038,10 +2041,10 @@ const Kt = ({
|
|
|
2038
2041
|
/* @__PURE__ */ e(
|
|
2039
2042
|
"select",
|
|
2040
2043
|
{
|
|
2041
|
-
value:
|
|
2044
|
+
value: j.pageSize,
|
|
2042
2045
|
onChange: (v) => ee(Number(v.target.value)),
|
|
2043
2046
|
className: "h-control-sm w-16 rounded-md border border-border bg-surface-input px-2 text-sm text-text",
|
|
2044
|
-
children:
|
|
2047
|
+
children: h.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
|
|
2045
2048
|
}
|
|
2046
2049
|
)
|
|
2047
2050
|
] })
|
|
@@ -2053,7 +2056,7 @@ const Kt = ({
|
|
|
2053
2056
|
size: "sm",
|
|
2054
2057
|
variant: "ghost",
|
|
2055
2058
|
onClick: () => w(0),
|
|
2056
|
-
disabled:
|
|
2059
|
+
disabled: j.page === 0,
|
|
2057
2060
|
iconOnly: !0,
|
|
2058
2061
|
children: /* @__PURE__ */ e(Qt, {})
|
|
2059
2062
|
}
|
|
@@ -2063,25 +2066,25 @@ const Kt = ({
|
|
|
2063
2066
|
{
|
|
2064
2067
|
size: "sm",
|
|
2065
2068
|
variant: "ghost",
|
|
2066
|
-
onClick: () => w(
|
|
2067
|
-
disabled:
|
|
2069
|
+
onClick: () => w(j.page - 1),
|
|
2070
|
+
disabled: j.page === 0,
|
|
2068
2071
|
iconOnly: !0,
|
|
2069
2072
|
children: /* @__PURE__ */ e(Xt, {})
|
|
2070
2073
|
}
|
|
2071
2074
|
),
|
|
2072
2075
|
/* @__PURE__ */ c("span", { className: "px-3 py-1 text-sm text-text-muted", children: [
|
|
2073
2076
|
"Page ",
|
|
2074
|
-
|
|
2077
|
+
j.page + 1,
|
|
2075
2078
|
" of ",
|
|
2076
|
-
|
|
2079
|
+
P
|
|
2077
2080
|
] }),
|
|
2078
2081
|
/* @__PURE__ */ e(
|
|
2079
2082
|
ne,
|
|
2080
2083
|
{
|
|
2081
2084
|
size: "sm",
|
|
2082
2085
|
variant: "ghost",
|
|
2083
|
-
onClick: () => w(
|
|
2084
|
-
disabled:
|
|
2086
|
+
onClick: () => w(j.page + 1),
|
|
2087
|
+
disabled: j.page >= P - 1,
|
|
2085
2088
|
iconOnly: !0,
|
|
2086
2089
|
children: /* @__PURE__ */ e(Zt, {})
|
|
2087
2090
|
}
|
|
@@ -2091,8 +2094,8 @@ const Kt = ({
|
|
|
2091
2094
|
{
|
|
2092
2095
|
size: "sm",
|
|
2093
2096
|
variant: "ghost",
|
|
2094
|
-
onClick: () => w(
|
|
2095
|
-
disabled:
|
|
2097
|
+
onClick: () => w(P - 1),
|
|
2098
|
+
disabled: j.page >= P - 1,
|
|
2096
2099
|
iconOnly: !0,
|
|
2097
2100
|
children: /* @__PURE__ */ e(er, {})
|
|
2098
2101
|
}
|
|
@@ -2106,31 +2109,31 @@ const Kt = ({
|
|
|
2106
2109
|
onTabChange: n,
|
|
2107
2110
|
className: s
|
|
2108
2111
|
}) => {
|
|
2109
|
-
const [a,
|
|
2110
|
-
n ? n(
|
|
2112
|
+
const [a, l] = R(t[0]?.id || ""), o = r || a, h = (u) => {
|
|
2113
|
+
n ? n(u) : l(u);
|
|
2111
2114
|
};
|
|
2112
|
-
return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((
|
|
2115
|
+
return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((u) => /* @__PURE__ */ e(
|
|
2113
2116
|
"button",
|
|
2114
2117
|
{
|
|
2115
|
-
onClick: () => !
|
|
2116
|
-
disabled:
|
|
2118
|
+
onClick: () => !u.disabled && h(u.id),
|
|
2119
|
+
disabled: u.disabled,
|
|
2117
2120
|
className: d(
|
|
2118
2121
|
"border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
|
|
2119
2122
|
{
|
|
2120
|
-
"border-accent-border text-text":
|
|
2121
|
-
"border-transparent text-text-muted hover:text-text":
|
|
2122
|
-
"border-transparent text-disabled cursor-not-allowed":
|
|
2123
|
+
"border-accent-border text-text": o === u.id,
|
|
2124
|
+
"border-transparent text-text-muted hover:text-text": o !== u.id && !u.disabled,
|
|
2125
|
+
"border-transparent text-disabled cursor-not-allowed": u.disabled
|
|
2123
2126
|
}
|
|
2124
2127
|
),
|
|
2125
2128
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
2126
|
-
|
|
2127
|
-
|
|
2129
|
+
u.label,
|
|
2130
|
+
u.badge && /* @__PURE__ */ e("span", { className: d(
|
|
2128
2131
|
"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
|
|
2129
|
-
|
|
2130
|
-
), children:
|
|
2132
|
+
o === u.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
|
|
2133
|
+
), children: u.badge })
|
|
2131
2134
|
] })
|
|
2132
2135
|
},
|
|
2133
|
-
|
|
2136
|
+
u.id
|
|
2134
2137
|
)) }) });
|
|
2135
2138
|
}, nr = ({
|
|
2136
2139
|
items: t,
|
|
@@ -2138,16 +2141,16 @@ const Kt = ({
|
|
|
2138
2141
|
activeTab: n,
|
|
2139
2142
|
onTabChange: s,
|
|
2140
2143
|
variant: a = "default",
|
|
2141
|
-
size:
|
|
2142
|
-
className:
|
|
2144
|
+
size: l = "md",
|
|
2145
|
+
className: o
|
|
2143
2146
|
}) => {
|
|
2144
|
-
const [
|
|
2147
|
+
const [h, u] = R(
|
|
2145
2148
|
r || n || t[0]?.id || ""
|
|
2146
|
-
), N = n ||
|
|
2147
|
-
s ? s(g) :
|
|
2148
|
-
},
|
|
2149
|
+
), N = n || h, m = (g) => {
|
|
2150
|
+
s ? s(g) : u(g);
|
|
2151
|
+
}, f = {
|
|
2149
2152
|
activeTab: N,
|
|
2150
|
-
setActiveTab:
|
|
2153
|
+
setActiveTab: m
|
|
2151
2154
|
}, b = t.find((g) => g.id === N), p = d(
|
|
2152
2155
|
"flex",
|
|
2153
2156
|
{
|
|
@@ -2156,12 +2159,12 @@ const Kt = ({
|
|
|
2156
2159
|
"space-x-1": a === "pills",
|
|
2157
2160
|
"space-x-8": a === "default" || a === "underline"
|
|
2158
2161
|
},
|
|
2159
|
-
|
|
2162
|
+
o
|
|
2160
2163
|
), C = (g, x) => {
|
|
2161
2164
|
const _ = "transition-colors duration-fast font-medium", E = {
|
|
2162
|
-
"text-xs px-2 py-1":
|
|
2163
|
-
"text-sm px-3 py-2":
|
|
2164
|
-
"text-base px-4 py-3":
|
|
2165
|
+
"text-xs px-2 py-1": l === "sm",
|
|
2166
|
+
"text-sm px-3 py-2": l === "md",
|
|
2167
|
+
"text-base px-4 py-3": l === "lg"
|
|
2165
2168
|
}, W = {
|
|
2166
2169
|
// Default variant
|
|
2167
2170
|
"border-b-2 -mb-px": a === "default",
|
|
@@ -2182,7 +2185,7 @@ const Kt = ({
|
|
|
2182
2185
|
} : {};
|
|
2183
2186
|
return d(_, E, W, D, X, U);
|
|
2184
2187
|
};
|
|
2185
|
-
return /* @__PURE__ */ e(rr.Provider, { value:
|
|
2188
|
+
return /* @__PURE__ */ e(rr.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
2186
2189
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2187
2190
|
"button",
|
|
2188
2191
|
{
|
|
@@ -2191,7 +2194,7 @@ const Kt = ({
|
|
|
2191
2194
|
"aria-selected": N === g.id,
|
|
2192
2195
|
"aria-controls": `tabpanel-${g.id}`,
|
|
2193
2196
|
disabled: g.disabled,
|
|
2194
|
-
onClick: () => !g.disabled &&
|
|
2197
|
+
onClick: () => !g.disabled && m(g.id),
|
|
2195
2198
|
className: C(g, N === g.id),
|
|
2196
2199
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
2197
2200
|
g.label,
|
|
@@ -2224,21 +2227,21 @@ function Ve({
|
|
|
2224
2227
|
title: n,
|
|
2225
2228
|
size: s = "md",
|
|
2226
2229
|
closeOnBackdropClick: a = !0,
|
|
2227
|
-
closeOnEscape:
|
|
2228
|
-
className:
|
|
2229
|
-
backdropClassName:
|
|
2230
|
-
children:
|
|
2230
|
+
closeOnEscape: l = !0,
|
|
2231
|
+
className: o,
|
|
2232
|
+
backdropClassName: h,
|
|
2233
|
+
children: u,
|
|
2231
2234
|
footer: N,
|
|
2232
|
-
showCloseButton:
|
|
2235
|
+
showCloseButton: m = !0
|
|
2233
2236
|
}) {
|
|
2234
|
-
const
|
|
2237
|
+
const f = se(null), b = se(null);
|
|
2235
2238
|
Q(() => {
|
|
2236
|
-
if (!t || !
|
|
2239
|
+
if (!t || !l) return;
|
|
2237
2240
|
const C = (g) => {
|
|
2238
2241
|
g.key === "Escape" && r();
|
|
2239
2242
|
};
|
|
2240
2243
|
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
2241
|
-
}, [t,
|
|
2244
|
+
}, [t, l, r]), Q(() => (t ? (b.current = document.activeElement, f.current && f.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
|
|
2242
2245
|
document.body.style.overflow = "";
|
|
2243
2246
|
}), [t]);
|
|
2244
2247
|
const p = (C) => {
|
|
@@ -2251,26 +2254,26 @@ function Ve({
|
|
|
2251
2254
|
"fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2252
2255
|
"bg-scrim",
|
|
2253
2256
|
// 'animate-fade-in',
|
|
2254
|
-
|
|
2257
|
+
h
|
|
2255
2258
|
),
|
|
2256
2259
|
onClick: p,
|
|
2257
2260
|
children: /* @__PURE__ */ c(
|
|
2258
2261
|
"div",
|
|
2259
2262
|
{
|
|
2260
|
-
ref:
|
|
2263
|
+
ref: f,
|
|
2261
2264
|
className: d(
|
|
2262
2265
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2263
2266
|
// 'animate-scale-in',
|
|
2264
2267
|
"focus:outline-none",
|
|
2265
2268
|
sr[s],
|
|
2266
|
-
|
|
2269
|
+
o
|
|
2267
2270
|
),
|
|
2268
2271
|
role: "dialog",
|
|
2269
2272
|
"aria-modal": "true",
|
|
2270
2273
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
2271
2274
|
tabIndex: -1,
|
|
2272
2275
|
children: [
|
|
2273
|
-
(n ||
|
|
2276
|
+
(n || m) && /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-6 pb-0", children: [
|
|
2274
2277
|
n && /* @__PURE__ */ e(
|
|
2275
2278
|
"span",
|
|
2276
2279
|
{
|
|
@@ -2279,7 +2282,7 @@ function Ve({
|
|
|
2279
2282
|
children: n
|
|
2280
2283
|
}
|
|
2281
2284
|
),
|
|
2282
|
-
|
|
2285
|
+
m && /* @__PURE__ */ e(
|
|
2283
2286
|
"button",
|
|
2284
2287
|
{
|
|
2285
2288
|
onClick: r,
|
|
@@ -2289,7 +2292,7 @@ function Ve({
|
|
|
2289
2292
|
}
|
|
2290
2293
|
)
|
|
2291
2294
|
] }),
|
|
2292
|
-
/* @__PURE__ */ e("div", { className: "p-6", children:
|
|
2295
|
+
/* @__PURE__ */ e("div", { className: "p-6", children: u }),
|
|
2293
2296
|
N && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: N })
|
|
2294
2297
|
]
|
|
2295
2298
|
}
|
|
@@ -2335,13 +2338,13 @@ const ar = {
|
|
|
2335
2338
|
weight: n = "normal",
|
|
2336
2339
|
color: s = "current",
|
|
2337
2340
|
align: a = "left",
|
|
2338
|
-
truncate:
|
|
2339
|
-
italic:
|
|
2340
|
-
underline:
|
|
2341
|
-
lineHeight:
|
|
2341
|
+
truncate: l = !1,
|
|
2342
|
+
italic: o = !1,
|
|
2343
|
+
underline: h = !1,
|
|
2344
|
+
lineHeight: u = "normal",
|
|
2342
2345
|
as: N,
|
|
2343
|
-
className:
|
|
2344
|
-
children:
|
|
2346
|
+
className: m,
|
|
2347
|
+
children: f,
|
|
2345
2348
|
...b
|
|
2346
2349
|
}) => {
|
|
2347
2350
|
const p = N || dr(t), C = t === "caption", g = t === "label", x = t === "code", _ = d(
|
|
@@ -2357,13 +2360,13 @@ const ar = {
|
|
|
2357
2360
|
or[s],
|
|
2358
2361
|
cr[a],
|
|
2359
2362
|
// Line height only overrides the body variant
|
|
2360
|
-
t === "body" && ir[
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2363
|
+
t === "body" && ir[u],
|
|
2364
|
+
o && "italic",
|
|
2365
|
+
h && "underline",
|
|
2366
|
+
l && "truncate",
|
|
2367
|
+
m
|
|
2365
2368
|
);
|
|
2366
|
-
return /* @__PURE__ */ e(p, { className: _, ...b, children:
|
|
2369
|
+
return /* @__PURE__ */ e(p, { className: _, ...b, children: f });
|
|
2367
2370
|
};
|
|
2368
2371
|
function dr(t) {
|
|
2369
2372
|
return {
|
|
@@ -2379,15 +2382,15 @@ const ur = ({
|
|
|
2379
2382
|
label: n,
|
|
2380
2383
|
placeholder: s = "Select or upload a file",
|
|
2381
2384
|
error: a,
|
|
2382
|
-
disabled:
|
|
2383
|
-
accept:
|
|
2384
|
-
onListFiles:
|
|
2385
|
-
onListMounts:
|
|
2385
|
+
disabled: l,
|
|
2386
|
+
accept: o,
|
|
2387
|
+
onListFiles: h,
|
|
2388
|
+
onListMounts: u,
|
|
2386
2389
|
onUploadFile: N,
|
|
2387
|
-
onDownloadFile:
|
|
2388
|
-
onRegisterFile:
|
|
2390
|
+
onDownloadFile: m,
|
|
2391
|
+
onRegisterFile: f
|
|
2389
2392
|
}) => {
|
|
2390
|
-
const [b, p] = R(!1), [C, g] = R([]), [x, _] = R(null), [E, W] = R("/"), [D, X] = R([]), [U, I] = R(!1), [q, K] = R(""), [re,
|
|
2393
|
+
const [b, p] = R(!1), [C, g] = R([]), [x, _] = R(null), [E, W] = R("/"), [D, X] = R([]), [U, I] = R(!1), [q, K] = R(""), [re, j] = R(
|
|
2391
2394
|
typeof t == "object" ? t : null
|
|
2392
2395
|
), [ce, k] = R(!1), [i, S] = R(""), y = se(null);
|
|
2393
2396
|
Q(() => {
|
|
@@ -2398,7 +2401,7 @@ const ur = ({
|
|
|
2398
2401
|
const A = async () => {
|
|
2399
2402
|
I(!0);
|
|
2400
2403
|
try {
|
|
2401
|
-
const $ = await
|
|
2404
|
+
const $ = await u?.();
|
|
2402
2405
|
$?.data && g($.data);
|
|
2403
2406
|
} catch ($) {
|
|
2404
2407
|
console.error("Failed to load mounts", $);
|
|
@@ -2409,7 +2412,7 @@ const ur = ({
|
|
|
2409
2412
|
if (x) {
|
|
2410
2413
|
I(!0);
|
|
2411
2414
|
try {
|
|
2412
|
-
const $ = await
|
|
2415
|
+
const $ = await h?.({ mountId: x.id, name: q, path: E });
|
|
2413
2416
|
$?.data && X($.data);
|
|
2414
2417
|
} catch ($) {
|
|
2415
2418
|
console.error("Failed to load files", $);
|
|
@@ -2433,7 +2436,7 @@ const ur = ({
|
|
|
2433
2436
|
providerKey: L.name,
|
|
2434
2437
|
ownerId: "me"
|
|
2435
2438
|
};
|
|
2436
|
-
|
|
2439
|
+
j(V), r(V, v), p(!1);
|
|
2437
2440
|
} catch (te) {
|
|
2438
2441
|
console.error("Local file selection failed", te);
|
|
2439
2442
|
} finally {
|
|
@@ -2454,7 +2457,7 @@ const ur = ({
|
|
|
2454
2457
|
});
|
|
2455
2458
|
if (v?.data) {
|
|
2456
2459
|
const V = v.data;
|
|
2457
|
-
|
|
2460
|
+
j(V), r(V, new Uint8Array(te)), p(!1);
|
|
2458
2461
|
}
|
|
2459
2462
|
} catch (te) {
|
|
2460
2463
|
console.error("Upload failed", te);
|
|
@@ -2467,7 +2470,7 @@ const ur = ({
|
|
|
2467
2470
|
I(!0);
|
|
2468
2471
|
try {
|
|
2469
2472
|
const $ = `${E}${i}/`;
|
|
2470
|
-
|
|
2473
|
+
f && (await f({
|
|
2471
2474
|
name: i,
|
|
2472
2475
|
type: "folder",
|
|
2473
2476
|
path: E,
|
|
@@ -2486,15 +2489,15 @@ const ur = ({
|
|
|
2486
2489
|
}, G = async ($) => {
|
|
2487
2490
|
I(!0);
|
|
2488
2491
|
try {
|
|
2489
|
-
const L = await
|
|
2490
|
-
|
|
2492
|
+
const L = await m?.($.id);
|
|
2493
|
+
j($), r($, L), p(!1);
|
|
2491
2494
|
} catch (L) {
|
|
2492
2495
|
console.error("Failed to download file", L);
|
|
2493
2496
|
} finally {
|
|
2494
2497
|
I(!1);
|
|
2495
2498
|
}
|
|
2496
|
-
},
|
|
2497
|
-
$.stopPropagation(),
|
|
2499
|
+
}, P = ($) => {
|
|
2500
|
+
$.stopPropagation(), j(null), r(null);
|
|
2498
2501
|
}, M = he(() => {
|
|
2499
2502
|
const $ = /* @__PURE__ */ new Set(), L = [];
|
|
2500
2503
|
return D.forEach((te) => {
|
|
@@ -2593,20 +2596,20 @@ const ur = ({
|
|
|
2593
2596
|
/* @__PURE__ */ c(
|
|
2594
2597
|
"div",
|
|
2595
2598
|
{
|
|
2596
|
-
onClick: () => !
|
|
2599
|
+
onClick: () => !l && p(!0),
|
|
2597
2600
|
className: d(
|
|
2598
2601
|
"flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
|
|
2599
2602
|
"hover:border-border-strong bg-surface",
|
|
2600
2603
|
a ? "border-danger-border" : "border-border",
|
|
2601
|
-
|
|
2604
|
+
l && "opacity-50 cursor-not-allowed bg-surface-sunk"
|
|
2602
2605
|
),
|
|
2603
2606
|
children: [
|
|
2604
2607
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Y, { icon: re ? Ee : _e, color: re ? "primary" : "secondary" }) }),
|
|
2605
2608
|
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children: re ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: re.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
|
|
2606
|
-
re && !
|
|
2609
|
+
re && !l && /* @__PURE__ */ e(
|
|
2607
2610
|
"button",
|
|
2608
2611
|
{
|
|
2609
|
-
onClick:
|
|
2612
|
+
onClick: P,
|
|
2610
2613
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2611
2614
|
children: /* @__PURE__ */ e(Y, { icon: we, size: "xs" })
|
|
2612
2615
|
}
|
|
@@ -2687,7 +2690,7 @@ const ur = ({
|
|
|
2687
2690
|
className: "hidden",
|
|
2688
2691
|
ref: y,
|
|
2689
2692
|
onChange: ae,
|
|
2690
|
-
accept:
|
|
2693
|
+
accept: o
|
|
2691
2694
|
}
|
|
2692
2695
|
)
|
|
2693
2696
|
] })
|
|
@@ -2708,7 +2711,7 @@ const ur = ({
|
|
|
2708
2711
|
/* @__PURE__ */ e(ne, { size: "sm", variant: "ghost", onClick: () => k(!1), children: "Cancel" })
|
|
2709
2712
|
] }),
|
|
2710
2713
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2711
|
-
|
|
2714
|
+
Pe,
|
|
2712
2715
|
{
|
|
2713
2716
|
data: B,
|
|
2714
2717
|
columns: F,
|
|
@@ -2718,7 +2721,7 @@ const ur = ({
|
|
|
2718
2721
|
}
|
|
2719
2722
|
) })
|
|
2720
2723
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2721
|
-
|
|
2724
|
+
Pe,
|
|
2722
2725
|
{
|
|
2723
2726
|
data: C,
|
|
2724
2727
|
columns: H,
|
|
@@ -2747,7 +2750,7 @@ const ur = ({
|
|
|
2747
2750
|
type: "file",
|
|
2748
2751
|
className: "hidden",
|
|
2749
2752
|
onChange: ee,
|
|
2750
|
-
accept:
|
|
2753
|
+
accept: o,
|
|
2751
2754
|
disabled: U
|
|
2752
2755
|
}
|
|
2753
2756
|
)
|
|
@@ -2772,16 +2775,16 @@ const ur = ({
|
|
|
2772
2775
|
error: n,
|
|
2773
2776
|
size: s = "md",
|
|
2774
2777
|
fullWidth: a = !1,
|
|
2775
|
-
loading:
|
|
2776
|
-
containerClassName:
|
|
2777
|
-
labelClassName:
|
|
2778
|
-
className:
|
|
2778
|
+
loading: l = !1,
|
|
2779
|
+
containerClassName: o,
|
|
2780
|
+
labelClassName: h,
|
|
2781
|
+
className: u,
|
|
2779
2782
|
id: N,
|
|
2780
|
-
rows:
|
|
2781
|
-
...
|
|
2783
|
+
rows: m = 4,
|
|
2784
|
+
...f
|
|
2782
2785
|
}, b) => {
|
|
2783
2786
|
const p = oe.useId(), C = N || `textarea-${p}`, g = !!n, x = n || r ? `${C}-description` : void 0;
|
|
2784
|
-
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full",
|
|
2787
|
+
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", o), children: [
|
|
2785
2788
|
t && /* @__PURE__ */ e(
|
|
2786
2789
|
"label",
|
|
2787
2790
|
{
|
|
@@ -2789,7 +2792,7 @@ const ur = ({
|
|
|
2789
2792
|
className: d(
|
|
2790
2793
|
Be,
|
|
2791
2794
|
g ? "text-danger-fg" : "text-text-subtle",
|
|
2792
|
-
|
|
2795
|
+
h
|
|
2793
2796
|
),
|
|
2794
2797
|
children: t
|
|
2795
2798
|
}
|
|
@@ -2800,7 +2803,7 @@ const ur = ({
|
|
|
2800
2803
|
{
|
|
2801
2804
|
ref: b,
|
|
2802
2805
|
id: C,
|
|
2803
|
-
rows:
|
|
2806
|
+
rows: m,
|
|
2804
2807
|
"aria-invalid": g || void 0,
|
|
2805
2808
|
"aria-describedby": x,
|
|
2806
2809
|
className: d(
|
|
@@ -2811,12 +2814,12 @@ const ur = ({
|
|
|
2811
2814
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
2812
2815
|
mr[s],
|
|
2813
2816
|
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2814
|
-
|
|
2817
|
+
u
|
|
2815
2818
|
),
|
|
2816
|
-
...
|
|
2819
|
+
...f
|
|
2817
2820
|
}
|
|
2818
2821
|
),
|
|
2819
|
-
|
|
2822
|
+
l && /* @__PURE__ */ e(
|
|
2820
2823
|
"span",
|
|
2821
2824
|
{
|
|
2822
2825
|
"aria-hidden": !0,
|
|
@@ -2836,7 +2839,7 @@ const ur = ({
|
|
|
2836
2839
|
}
|
|
2837
2840
|
);
|
|
2838
2841
|
De.displayName = "TextArea";
|
|
2839
|
-
function
|
|
2842
|
+
function je(t, r) {
|
|
2840
2843
|
return r.split(".").reduce(
|
|
2841
2844
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2842
2845
|
t
|
|
@@ -2844,20 +2847,20 @@ function Pe(t, r) {
|
|
|
2844
2847
|
}
|
|
2845
2848
|
function fr(t, r, n) {
|
|
2846
2849
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2847
|
-
let
|
|
2848
|
-
for (let
|
|
2849
|
-
const
|
|
2850
|
-
|
|
2850
|
+
let l = a;
|
|
2851
|
+
for (let o = 0; o < s.length - 1; o++) {
|
|
2852
|
+
const h = s[o], u = l[h];
|
|
2853
|
+
l[h] = u && typeof u == "object" ? Array.isArray(u) ? [...u] : { ...u } : {}, l = l[h];
|
|
2851
2854
|
}
|
|
2852
|
-
return
|
|
2855
|
+
return l[s[s.length - 1]] = n, a;
|
|
2853
2856
|
}
|
|
2854
2857
|
function hr(t, r) {
|
|
2855
2858
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2856
2859
|
let a = s;
|
|
2857
|
-
for (let
|
|
2858
|
-
const
|
|
2859
|
-
if (!a[
|
|
2860
|
-
a[
|
|
2860
|
+
for (let l = 0; l < n.length - 1; l++) {
|
|
2861
|
+
const o = n[l];
|
|
2862
|
+
if (!a[o] || typeof a[o] != "object") return s;
|
|
2863
|
+
a[o] = Array.isArray(a[o]) ? [...a[o]] : { ...a[o] }, a = a[o];
|
|
2861
2864
|
}
|
|
2862
2865
|
return delete a[n[n.length - 1]], s;
|
|
2863
2866
|
}
|
|
@@ -2867,13 +2870,13 @@ const hn = ({
|
|
|
2867
2870
|
onSubmit: n,
|
|
2868
2871
|
onCancel: s,
|
|
2869
2872
|
onChange: a,
|
|
2870
|
-
transform:
|
|
2871
|
-
validate:
|
|
2872
|
-
submitButton:
|
|
2873
|
-
cancelButton:
|
|
2873
|
+
transform: l,
|
|
2874
|
+
validate: o,
|
|
2875
|
+
submitButton: h = { label: "Submit", variant: "primary" },
|
|
2876
|
+
cancelButton: u = { label: "Cancel", variant: "outline" },
|
|
2874
2877
|
showButtons: N = !0,
|
|
2875
|
-
layout:
|
|
2876
|
-
size:
|
|
2878
|
+
layout: m = "vertical",
|
|
2879
|
+
size: f = "md",
|
|
2877
2880
|
loading: b = !1,
|
|
2878
2881
|
className: p,
|
|
2879
2882
|
ref: C,
|
|
@@ -2900,11 +2903,11 @@ const hn = ({
|
|
|
2900
2903
|
if (i.forEach((ee, ae) => {
|
|
2901
2904
|
const le = {};
|
|
2902
2905
|
for (const G of y.arrayFields) {
|
|
2903
|
-
const
|
|
2904
|
-
if (G.required && (
|
|
2906
|
+
const P = ee?.[G.name];
|
|
2907
|
+
if (G.required && (P == null || P === ""))
|
|
2905
2908
|
le[G.name] = `${G.label} is required`, w = !0;
|
|
2906
2909
|
else if (G.validator) {
|
|
2907
|
-
const M = G.validator(
|
|
2910
|
+
const M = G.validator(P, ee);
|
|
2908
2911
|
M && (le[G.name] = M, w = !0);
|
|
2909
2912
|
}
|
|
2910
2913
|
}
|
|
@@ -2940,24 +2943,24 @@ const hn = ({
|
|
|
2940
2943
|
continue;
|
|
2941
2944
|
const w = U(
|
|
2942
2945
|
A.name,
|
|
2943
|
-
|
|
2946
|
+
je(x, A.name),
|
|
2944
2947
|
x
|
|
2945
2948
|
);
|
|
2946
2949
|
w && (i[A.name] = w);
|
|
2947
2950
|
}
|
|
2948
|
-
if (
|
|
2949
|
-
const A =
|
|
2951
|
+
if (o) {
|
|
2952
|
+
const A = o(x);
|
|
2950
2953
|
A && Object.assign(i, A);
|
|
2951
2954
|
}
|
|
2952
2955
|
if (W(i), Object.keys(i).some((A) => i[A]))
|
|
2953
2956
|
return;
|
|
2954
|
-
const y =
|
|
2957
|
+
const y = l ? l(x) : x;
|
|
2955
2958
|
await n?.(x, y);
|
|
2956
2959
|
},
|
|
2957
|
-
[x, t, U,
|
|
2960
|
+
[x, t, U, o, l, n, b]
|
|
2958
2961
|
), K = ue(
|
|
2959
2962
|
(k) => {
|
|
2960
|
-
const i =
|
|
2963
|
+
const i = je(x, k.name), S = D[k.name] ? E[k.name] : void 0, y = k.disabled || b, A = {
|
|
2961
2964
|
value: i || "",
|
|
2962
2965
|
disabled: y,
|
|
2963
2966
|
required: k.required,
|
|
@@ -2979,7 +2982,7 @@ const hn = ({
|
|
|
2979
2982
|
type: k.textType || k.type,
|
|
2980
2983
|
autoComplete: k.autocomplete,
|
|
2981
2984
|
error: S,
|
|
2982
|
-
size:
|
|
2985
|
+
size: f
|
|
2983
2986
|
}
|
|
2984
2987
|
);
|
|
2985
2988
|
case "textarea":
|
|
@@ -2990,7 +2993,7 @@ const hn = ({
|
|
|
2990
2993
|
onChange: (w) => I(k.name, w.target.value),
|
|
2991
2994
|
rows: 4,
|
|
2992
2995
|
error: S,
|
|
2993
|
-
size:
|
|
2996
|
+
size: f
|
|
2994
2997
|
}
|
|
2995
2998
|
);
|
|
2996
2999
|
case "select":
|
|
@@ -3007,7 +3010,7 @@ const hn = ({
|
|
|
3007
3010
|
multiple: k.multiple,
|
|
3008
3011
|
allowCreate: k.allowCreate,
|
|
3009
3012
|
error: S,
|
|
3010
|
-
size:
|
|
3013
|
+
size: f
|
|
3011
3014
|
}
|
|
3012
3015
|
);
|
|
3013
3016
|
case "checkbox":
|
|
@@ -3018,7 +3021,7 @@ const hn = ({
|
|
|
3018
3021
|
label: k.label,
|
|
3019
3022
|
checked: !!i,
|
|
3020
3023
|
onChange: (w) => I(k.name, w.target.checked),
|
|
3021
|
-
size:
|
|
3024
|
+
size: f
|
|
3022
3025
|
}
|
|
3023
3026
|
);
|
|
3024
3027
|
case "radio":
|
|
@@ -3051,7 +3054,7 @@ const hn = ({
|
|
|
3051
3054
|
...A,
|
|
3052
3055
|
value: i ? new Date(i) : null,
|
|
3053
3056
|
onChange: (w) => I(k.name, w),
|
|
3054
|
-
size:
|
|
3057
|
+
size: f
|
|
3055
3058
|
}
|
|
3056
3059
|
);
|
|
3057
3060
|
case "file":
|
|
@@ -3098,7 +3101,7 @@ const hn = ({
|
|
|
3098
3101
|
action: "storage.mount"
|
|
3099
3102
|
}),
|
|
3100
3103
|
disabled: y,
|
|
3101
|
-
size:
|
|
3104
|
+
size: f,
|
|
3102
3105
|
placeholder: k.placeholder
|
|
3103
3106
|
}
|
|
3104
3107
|
);
|
|
@@ -3119,20 +3122,20 @@ const hn = ({
|
|
|
3119
3122
|
}
|
|
3120
3123
|
const ae = () => {
|
|
3121
3124
|
I(k.name, [...w, {}]);
|
|
3122
|
-
}, le = (
|
|
3125
|
+
}, le = (P) => {
|
|
3123
3126
|
I(
|
|
3124
3127
|
k.name,
|
|
3125
|
-
w.filter((M, T) => T !==
|
|
3128
|
+
w.filter((M, T) => T !== P)
|
|
3126
3129
|
);
|
|
3127
|
-
}, G = (
|
|
3130
|
+
}, G = (P, M, T) => {
|
|
3128
3131
|
const z = [...w];
|
|
3129
|
-
z[
|
|
3130
|
-
...z[
|
|
3132
|
+
z[P] = {
|
|
3133
|
+
...z[P],
|
|
3131
3134
|
[M]: T
|
|
3132
3135
|
}, I(k.name, z);
|
|
3133
3136
|
};
|
|
3134
3137
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
3135
|
-
w.map((
|
|
3138
|
+
w.map((P, M) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3136
3139
|
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((T) => {
|
|
3137
3140
|
const z = ee?.[M]?.[T.name];
|
|
3138
3141
|
return /* @__PURE__ */ c(
|
|
@@ -3146,7 +3149,7 @@ const hn = ({
|
|
|
3146
3149
|
] }),
|
|
3147
3150
|
(() => {
|
|
3148
3151
|
const B = {
|
|
3149
|
-
value:
|
|
3152
|
+
value: P?.[T.name] || "",
|
|
3150
3153
|
disabled: y,
|
|
3151
3154
|
required: T.required,
|
|
3152
3155
|
placeholder: T.placeholder,
|
|
@@ -3171,7 +3174,7 @@ const hn = ({
|
|
|
3171
3174
|
type: T.textType || T.type,
|
|
3172
3175
|
autoComplete: T.autocomplete,
|
|
3173
3176
|
error: z,
|
|
3174
|
-
size:
|
|
3177
|
+
size: f
|
|
3175
3178
|
}
|
|
3176
3179
|
);
|
|
3177
3180
|
case "textarea":
|
|
@@ -3186,7 +3189,7 @@ const hn = ({
|
|
|
3186
3189
|
),
|
|
3187
3190
|
rows: 4,
|
|
3188
3191
|
error: z,
|
|
3189
|
-
size:
|
|
3192
|
+
size: f
|
|
3190
3193
|
}
|
|
3191
3194
|
);
|
|
3192
3195
|
case "select":
|
|
@@ -3209,7 +3212,7 @@ const hn = ({
|
|
|
3209
3212
|
multiple: T.multiple,
|
|
3210
3213
|
allowCreate: T.allowCreate,
|
|
3211
3214
|
error: z,
|
|
3212
|
-
size:
|
|
3215
|
+
size: f
|
|
3213
3216
|
}
|
|
3214
3217
|
);
|
|
3215
3218
|
case "checkbox":
|
|
@@ -3217,13 +3220,13 @@ const hn = ({
|
|
|
3217
3220
|
pe,
|
|
3218
3221
|
{
|
|
3219
3222
|
...B,
|
|
3220
|
-
checked: !!
|
|
3223
|
+
checked: !!P?.[T.name],
|
|
3221
3224
|
onChange: (F) => G(
|
|
3222
3225
|
M,
|
|
3223
3226
|
T.name,
|
|
3224
3227
|
F.target.checked
|
|
3225
3228
|
),
|
|
3226
|
-
size:
|
|
3229
|
+
size: f
|
|
3227
3230
|
}
|
|
3228
3231
|
);
|
|
3229
3232
|
case "radio":
|
|
@@ -3238,7 +3241,7 @@ const hn = ({
|
|
|
3238
3241
|
type: "radio",
|
|
3239
3242
|
name: `${k.name}.${M}.${T.name}`,
|
|
3240
3243
|
value: F.value,
|
|
3241
|
-
checked:
|
|
3244
|
+
checked: P?.[T.name] === F.value,
|
|
3242
3245
|
onChange: () => G(
|
|
3243
3246
|
M,
|
|
3244
3247
|
T.name,
|
|
@@ -3254,7 +3257,7 @@ const hn = ({
|
|
|
3254
3257
|
F.value
|
|
3255
3258
|
)) });
|
|
3256
3259
|
case "date": {
|
|
3257
|
-
const F =
|
|
3260
|
+
const F = P?.[T.name];
|
|
3258
3261
|
return /* @__PURE__ */ e(
|
|
3259
3262
|
$e,
|
|
3260
3263
|
{
|
|
@@ -3265,13 +3268,13 @@ const hn = ({
|
|
|
3265
3268
|
T.name,
|
|
3266
3269
|
H
|
|
3267
3270
|
),
|
|
3268
|
-
size:
|
|
3271
|
+
size: f
|
|
3269
3272
|
}
|
|
3270
3273
|
);
|
|
3271
3274
|
}
|
|
3272
3275
|
case "custom":
|
|
3273
3276
|
return T.customComponent?.({
|
|
3274
|
-
value:
|
|
3277
|
+
value: P?.[T.name],
|
|
3275
3278
|
onChange: (F) => G(
|
|
3276
3279
|
M,
|
|
3277
3280
|
T.name,
|
|
@@ -3331,7 +3334,7 @@ const hn = ({
|
|
|
3331
3334
|
return null;
|
|
3332
3335
|
}
|
|
3333
3336
|
},
|
|
3334
|
-
[x, D, E, b,
|
|
3337
|
+
[x, D, E, b, f, I]
|
|
3335
3338
|
), re = ue(
|
|
3336
3339
|
(k) => {
|
|
3337
3340
|
if (k.conditional && !k.conditional(x))
|
|
@@ -3388,17 +3391,17 @@ const hn = ({
|
|
|
3388
3391
|
);
|
|
3389
3392
|
},
|
|
3390
3393
|
[x, D, E, K]
|
|
3391
|
-
),
|
|
3394
|
+
), j = d(
|
|
3392
3395
|
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3393
3396
|
{
|
|
3394
|
-
"max-w-md":
|
|
3395
|
-
"max-w-2xl":
|
|
3396
|
-
"max-w-4xl":
|
|
3397
|
-
"max-w-full":
|
|
3397
|
+
"max-w-md": f === "sm",
|
|
3398
|
+
"max-w-2xl": f === "md",
|
|
3399
|
+
"max-w-4xl": f === "lg",
|
|
3400
|
+
"max-w-full": f === "full"
|
|
3398
3401
|
},
|
|
3399
3402
|
p
|
|
3400
|
-
), ce =
|
|
3401
|
-
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className:
|
|
3403
|
+
), ce = f === "full" ? "md" : f;
|
|
3404
|
+
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className: j, children: [
|
|
3402
3405
|
!N && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3403
3406
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(re) }),
|
|
3404
3407
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: N && /* @__PURE__ */ c(xe, { children: [
|
|
@@ -3407,24 +3410,24 @@ const hn = ({
|
|
|
3407
3410
|
ne,
|
|
3408
3411
|
{
|
|
3409
3412
|
type: "button",
|
|
3410
|
-
variant:
|
|
3411
|
-
size:
|
|
3412
|
-
disabled:
|
|
3413
|
+
variant: u.variant ?? "ghost",
|
|
3414
|
+
size: u.size || ce,
|
|
3415
|
+
disabled: u.disabled || b,
|
|
3413
3416
|
onClick: s,
|
|
3414
|
-
className:
|
|
3415
|
-
children:
|
|
3417
|
+
className: u.className,
|
|
3418
|
+
children: u.label
|
|
3416
3419
|
}
|
|
3417
3420
|
),
|
|
3418
3421
|
/* @__PURE__ */ e(
|
|
3419
3422
|
ne,
|
|
3420
3423
|
{
|
|
3421
3424
|
type: "submit",
|
|
3422
|
-
variant:
|
|
3423
|
-
size:
|
|
3424
|
-
disabled:
|
|
3425
|
+
variant: h.variant,
|
|
3426
|
+
size: h.size || ce,
|
|
3427
|
+
disabled: h.disabled || b,
|
|
3425
3428
|
loading: b,
|
|
3426
|
-
className:
|
|
3427
|
-
children:
|
|
3429
|
+
className: h.className,
|
|
3430
|
+
children: h.label
|
|
3428
3431
|
}
|
|
3429
3432
|
)
|
|
3430
3433
|
] }) })
|
|
@@ -3436,26 +3439,26 @@ function xn({
|
|
|
3436
3439
|
description: n,
|
|
3437
3440
|
confirmLabel: s = "Bevestigen",
|
|
3438
3441
|
cancelLabel: a = "Annuleren",
|
|
3439
|
-
tone:
|
|
3440
|
-
loading:
|
|
3441
|
-
onConfirm:
|
|
3442
|
-
onCancel:
|
|
3442
|
+
tone: l = "default",
|
|
3443
|
+
loading: o = !1,
|
|
3444
|
+
onConfirm: h,
|
|
3445
|
+
onCancel: u
|
|
3443
3446
|
}) {
|
|
3444
3447
|
return /* @__PURE__ */ e(
|
|
3445
3448
|
Ve,
|
|
3446
3449
|
{
|
|
3447
3450
|
open: t,
|
|
3448
|
-
onClose:
|
|
3451
|
+
onClose: u,
|
|
3449
3452
|
title: r,
|
|
3450
3453
|
size: "sm",
|
|
3451
3454
|
footer: /* @__PURE__ */ c("div", { className: "flex w-full items-center justify-end gap-2", children: [
|
|
3452
|
-
/* @__PURE__ */ e(ne, { variant: "ghost", onClick:
|
|
3455
|
+
/* @__PURE__ */ e(ne, { variant: "ghost", onClick: u, disabled: o, children: a }),
|
|
3453
3456
|
/* @__PURE__ */ e(
|
|
3454
3457
|
ne,
|
|
3455
3458
|
{
|
|
3456
|
-
variant:
|
|
3457
|
-
onClick:
|
|
3458
|
-
loading:
|
|
3459
|
+
variant: l === "danger" ? "destructive" : "primary",
|
|
3460
|
+
onClick: h,
|
|
3461
|
+
loading: o,
|
|
3459
3462
|
children: s
|
|
3460
3463
|
}
|
|
3461
3464
|
)
|
|
@@ -3494,10 +3497,10 @@ function bn({
|
|
|
3494
3497
|
dot: n = !1,
|
|
3495
3498
|
icon: s,
|
|
3496
3499
|
dismissible: a = !1,
|
|
3497
|
-
onDismiss:
|
|
3498
|
-
className:
|
|
3499
|
-
children:
|
|
3500
|
-
...
|
|
3500
|
+
onDismiss: l,
|
|
3501
|
+
className: o,
|
|
3502
|
+
children: h,
|
|
3503
|
+
...u
|
|
3501
3504
|
}) {
|
|
3502
3505
|
return /* @__PURE__ */ c(
|
|
3503
3506
|
"span",
|
|
@@ -3509,9 +3512,9 @@ function bn({
|
|
|
3509
3512
|
xr[t],
|
|
3510
3513
|
// Size styles
|
|
3511
3514
|
br[r],
|
|
3512
|
-
|
|
3515
|
+
o
|
|
3513
3516
|
),
|
|
3514
|
-
...
|
|
3517
|
+
...u,
|
|
3515
3518
|
children: [
|
|
3516
3519
|
n && /* @__PURE__ */ e(
|
|
3517
3520
|
"span",
|
|
@@ -3522,12 +3525,12 @@ function bn({
|
|
|
3522
3525
|
)
|
|
3523
3526
|
}
|
|
3524
3527
|
),
|
|
3525
|
-
s && /* @__PURE__ */ e("span", { className: d("flex-shrink-0",
|
|
3526
|
-
|
|
3527
|
-
a &&
|
|
3528
|
+
s && /* @__PURE__ */ e("span", { className: d("flex-shrink-0", h && "mr-1"), children: s }),
|
|
3529
|
+
h,
|
|
3530
|
+
a && l && /* @__PURE__ */ e(
|
|
3528
3531
|
"button",
|
|
3529
3532
|
{
|
|
3530
|
-
onClick:
|
|
3533
|
+
onClick: l,
|
|
3531
3534
|
className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
|
|
3532
3535
|
"aria-label": "Remove badge",
|
|
3533
3536
|
children: /* @__PURE__ */ e(Y, { icon: we, size: "xs", color: "current" })
|
|
@@ -3547,19 +3550,19 @@ function pn({
|
|
|
3547
3550
|
title: n,
|
|
3548
3551
|
description: s,
|
|
3549
3552
|
actions: a,
|
|
3550
|
-
card:
|
|
3551
|
-
className:
|
|
3552
|
-
...
|
|
3553
|
+
card: l = !1,
|
|
3554
|
+
className: o,
|
|
3555
|
+
...h
|
|
3553
3556
|
}) {
|
|
3554
3557
|
return /* @__PURE__ */ c(
|
|
3555
3558
|
"div",
|
|
3556
3559
|
{
|
|
3557
3560
|
className: d(
|
|
3558
3561
|
"flex flex-col items-center gap-2.5 text-center",
|
|
3559
|
-
|
|
3560
|
-
|
|
3562
|
+
l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
|
|
3563
|
+
o
|
|
3561
3564
|
),
|
|
3562
|
-
...
|
|
3565
|
+
...h,
|
|
3563
3566
|
children: [
|
|
3564
3567
|
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", gr[r]), children: t }),
|
|
3565
3568
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
@@ -3590,12 +3593,12 @@ const vr = {
|
|
|
3590
3593
|
success: "bg-success"
|
|
3591
3594
|
};
|
|
3592
3595
|
function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3593
|
-
const
|
|
3596
|
+
const l = Math.max(0, Math.min(100, t));
|
|
3594
3597
|
return /* @__PURE__ */ e(
|
|
3595
3598
|
"div",
|
|
3596
3599
|
{
|
|
3597
3600
|
role: "progressbar",
|
|
3598
|
-
"aria-valuenow": Math.round(
|
|
3601
|
+
"aria-valuenow": Math.round(l),
|
|
3599
3602
|
"aria-valuemin": 0,
|
|
3600
3603
|
"aria-valuemax": 100,
|
|
3601
3604
|
className: d("w-full overflow-hidden rounded-full bg-surface-hover", vr[n], s),
|
|
@@ -3604,7 +3607,7 @@ function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3604
3607
|
"div",
|
|
3605
3608
|
{
|
|
3606
3609
|
className: d("h-full rounded-full transition-[width] duration-300 ease-out", yr[r]),
|
|
3607
|
-
style: { width: `${
|
|
3610
|
+
style: { width: `${l}%` }
|
|
3608
3611
|
}
|
|
3609
3612
|
)
|
|
3610
3613
|
}
|
|
@@ -3634,7 +3637,7 @@ function yn({
|
|
|
3634
3637
|
label: n = "Loading...",
|
|
3635
3638
|
showLabel: s = !1,
|
|
3636
3639
|
className: a,
|
|
3637
|
-
...
|
|
3640
|
+
...l
|
|
3638
3641
|
}) {
|
|
3639
3642
|
return /* @__PURE__ */ c(
|
|
3640
3643
|
"div",
|
|
@@ -3644,7 +3647,7 @@ function yn({
|
|
|
3644
3647
|
s ? "flex-col space-y-2" : "",
|
|
3645
3648
|
a
|
|
3646
3649
|
),
|
|
3647
|
-
...
|
|
3650
|
+
...l,
|
|
3648
3651
|
children: [
|
|
3649
3652
|
/* @__PURE__ */ c(
|
|
3650
3653
|
"svg",
|
|
@@ -3740,36 +3743,36 @@ function wn({
|
|
|
3740
3743
|
label: s,
|
|
3741
3744
|
className: a
|
|
3742
3745
|
}) {
|
|
3743
|
-
const
|
|
3744
|
-
return n === "dots" ? /* @__PURE__ */ e("div", { ...
|
|
3746
|
+
const l = t.indexOf(r), o = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
|
|
3747
|
+
return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-1.5", a), children: t.map((h, u) => /* @__PURE__ */ e(
|
|
3745
3748
|
"span",
|
|
3746
3749
|
{
|
|
3747
3750
|
className: d(
|
|
3748
3751
|
"h-step-bar rounded-full transition-all duration-fast ease-out",
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
+
u === l ? "w-5 bg-accent" : "w-3.5",
|
|
3753
|
+
u < l && "bg-border-strong",
|
|
3754
|
+
u > l && "bg-border"
|
|
3752
3755
|
)
|
|
3753
3756
|
},
|
|
3754
|
-
|
|
3755
|
-
)) }) : /* @__PURE__ */ e("div", { ...
|
|
3757
|
+
h
|
|
3758
|
+
)) }) : /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-2", a), children: t.map((h, u) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
3756
3759
|
/* @__PURE__ */ e(
|
|
3757
3760
|
"span",
|
|
3758
3761
|
{
|
|
3759
|
-
"aria-current":
|
|
3762
|
+
"aria-current": u === l ? "step" : void 0,
|
|
3760
3763
|
className: d(
|
|
3761
3764
|
"flex size-tile-sm items-center justify-center rounded-full text-xs font-medium",
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
+
u === l && "bg-accent text-accent-fg",
|
|
3766
|
+
u < l && "bg-accent-soft text-accent",
|
|
3767
|
+
u > l && "bg-surface-hover text-text-muted"
|
|
3765
3768
|
),
|
|
3766
|
-
children:
|
|
3769
|
+
children: u + 1
|
|
3767
3770
|
}
|
|
3768
3771
|
),
|
|
3769
|
-
|
|
3770
|
-
] },
|
|
3772
|
+
u < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3773
|
+
] }, h)) });
|
|
3771
3774
|
}
|
|
3772
|
-
function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...
|
|
3775
|
+
function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
|
|
3773
3776
|
return /* @__PURE__ */ c(
|
|
3774
3777
|
"div",
|
|
3775
3778
|
{
|
|
@@ -3778,7 +3781,7 @@ function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-
|
|
|
3778
3781
|
"border-assistant-border bg-assistant-soft",
|
|
3779
3782
|
a
|
|
3780
3783
|
),
|
|
3781
|
-
...
|
|
3784
|
+
...l,
|
|
3782
3785
|
children: [
|
|
3783
3786
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-assistant", children: [
|
|
3784
3787
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, children: r }),
|
|
@@ -3802,41 +3805,41 @@ function zr(t) {
|
|
|
3802
3805
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3803
3806
|
}
|
|
3804
3807
|
const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
3805
|
-
const [
|
|
3808
|
+
const [l, o] = oe.useState(!1), h = d(
|
|
3806
3809
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover text-text",
|
|
3807
3810
|
Sr[n],
|
|
3808
3811
|
s
|
|
3809
3812
|
);
|
|
3810
|
-
return r && !
|
|
3813
|
+
return r && !l ? /* @__PURE__ */ e(
|
|
3811
3814
|
"img",
|
|
3812
3815
|
{
|
|
3813
3816
|
src: r,
|
|
3814
3817
|
alt: t ?? "",
|
|
3815
3818
|
title: a ?? t,
|
|
3816
|
-
className: d(
|
|
3817
|
-
onError: () =>
|
|
3819
|
+
className: d(h, "object-cover"),
|
|
3820
|
+
onError: () => o(!0)
|
|
3818
3821
|
}
|
|
3819
|
-
) : /* @__PURE__ */ e("span", { className:
|
|
3822
|
+
) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children: zr(t) });
|
|
3820
3823
|
}, Oe = "ring-surface", Mr = "ring-surface-accent", Cn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3821
3824
|
if (t.length === 0) return null;
|
|
3822
|
-
const a = t.slice(0, r),
|
|
3825
|
+
const a = t.slice(0, r), l = t.length - a.length;
|
|
3823
3826
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
3824
|
-
a.map((
|
|
3827
|
+
a.map((o, h) => /* @__PURE__ */ e(
|
|
3825
3828
|
Er,
|
|
3826
3829
|
{
|
|
3827
|
-
name:
|
|
3828
|
-
src:
|
|
3830
|
+
name: o.name,
|
|
3831
|
+
src: o.src,
|
|
3829
3832
|
size: n,
|
|
3830
|
-
title:
|
|
3833
|
+
title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
|
|
3831
3834
|
className: d(
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
+
h > 0 && "-ml-2",
|
|
3836
|
+
o.owner ? Mr : Oe,
|
|
3837
|
+
o.seen === !1 && "opacity-40"
|
|
3835
3838
|
)
|
|
3836
3839
|
},
|
|
3837
|
-
|
|
3840
|
+
o.id ?? `${o.name}-${h}`
|
|
3838
3841
|
)),
|
|
3839
|
-
|
|
3842
|
+
l > 0 && /* @__PURE__ */ c(
|
|
3840
3843
|
"span",
|
|
3841
3844
|
{
|
|
3842
3845
|
className: d(
|
|
@@ -3846,7 +3849,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3846
3849
|
),
|
|
3847
3850
|
children: [
|
|
3848
3851
|
"+",
|
|
3849
|
-
|
|
3852
|
+
l
|
|
3850
3853
|
]
|
|
3851
3854
|
}
|
|
3852
3855
|
)
|
|
@@ -3863,7 +3866,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3863
3866
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3864
3867
|
};
|
|
3865
3868
|
function Sn({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3866
|
-
const
|
|
3869
|
+
const l = Fe[t in Fe ? t : "note"];
|
|
3867
3870
|
return /* @__PURE__ */ e(
|
|
3868
3871
|
"span",
|
|
3869
3872
|
{
|
|
@@ -3871,8 +3874,8 @@ function Sn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3871
3874
|
className: d(
|
|
3872
3875
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
3873
3876
|
$r[n],
|
|
3874
|
-
|
|
3875
|
-
|
|
3877
|
+
l.fg,
|
|
3878
|
+
l.bg,
|
|
3876
3879
|
s
|
|
3877
3880
|
),
|
|
3878
3881
|
children: r
|
|
@@ -3885,24 +3888,24 @@ const zn = ({
|
|
|
3885
3888
|
size: n = "md",
|
|
3886
3889
|
aspectRatio: s = "auto",
|
|
3887
3890
|
radius: a = "md",
|
|
3888
|
-
showLoading:
|
|
3889
|
-
showError:
|
|
3890
|
-
fallback:
|
|
3891
|
-
loadingContent:
|
|
3891
|
+
showLoading: l = !0,
|
|
3892
|
+
showError: o = !0,
|
|
3893
|
+
fallback: h,
|
|
3894
|
+
loadingContent: u,
|
|
3892
3895
|
errorContent: N,
|
|
3893
|
-
className:
|
|
3894
|
-
onLoad:
|
|
3896
|
+
className: m,
|
|
3897
|
+
onLoad: f,
|
|
3895
3898
|
onError: b,
|
|
3896
3899
|
...p
|
|
3897
3900
|
}) => {
|
|
3898
|
-
const [C, g] = R(!0), [x, _] = R(!1), [E, W] = R(t), D = (
|
|
3899
|
-
g(!1), _(!1),
|
|
3900
|
-
}, X = (
|
|
3901
|
-
if (g(!1), _(!0),
|
|
3902
|
-
W(
|
|
3901
|
+
const [C, g] = R(!0), [x, _] = R(!1), [E, W] = R(t), D = (j) => {
|
|
3902
|
+
g(!1), _(!1), f?.(j);
|
|
3903
|
+
}, X = (j) => {
|
|
3904
|
+
if (g(!1), _(!0), h && E !== h) {
|
|
3905
|
+
W(h), _(!1), g(!0);
|
|
3903
3906
|
return;
|
|
3904
3907
|
}
|
|
3905
|
-
b?.(
|
|
3908
|
+
b?.(j);
|
|
3906
3909
|
}, U = d(
|
|
3907
3910
|
"relative overflow-hidden bg-surface-hover",
|
|
3908
3911
|
// Size variants
|
|
@@ -3930,7 +3933,7 @@ const zn = ({
|
|
|
3930
3933
|
"rounded-xl": a === "xl",
|
|
3931
3934
|
"rounded-full": a === "full"
|
|
3932
3935
|
},
|
|
3933
|
-
|
|
3936
|
+
m
|
|
3934
3937
|
), I = d(
|
|
3935
3938
|
"w-full h-full object-cover transition-opacity duration-fast",
|
|
3936
3939
|
{
|
|
@@ -3956,8 +3959,8 @@ const zn = ({
|
|
|
3956
3959
|
onError: X
|
|
3957
3960
|
}
|
|
3958
3961
|
),
|
|
3959
|
-
C &&
|
|
3960
|
-
x &&
|
|
3962
|
+
C && l && /* @__PURE__ */ e("div", { className: q, children: u || K }),
|
|
3963
|
+
x && o && /* @__PURE__ */ e("div", { className: q, children: N || re })
|
|
3961
3964
|
] });
|
|
3962
3965
|
};
|
|
3963
3966
|
function En({
|
|
@@ -3966,13 +3969,13 @@ function En({
|
|
|
3966
3969
|
variant: n = "divided",
|
|
3967
3970
|
leading: s,
|
|
3968
3971
|
renderItem: a,
|
|
3969
|
-
trailing:
|
|
3970
|
-
onSelect:
|
|
3971
|
-
onActiveIndexChange:
|
|
3972
|
-
isActive:
|
|
3972
|
+
trailing: l,
|
|
3973
|
+
onSelect: o,
|
|
3974
|
+
onActiveIndexChange: h,
|
|
3975
|
+
isActive: u,
|
|
3973
3976
|
unread: N,
|
|
3974
|
-
dimmed:
|
|
3975
|
-
groupBy:
|
|
3977
|
+
dimmed: m,
|
|
3978
|
+
groupBy: f,
|
|
3976
3979
|
groups: b,
|
|
3977
3980
|
renderGroupHeader: p,
|
|
3978
3981
|
stickyGroupHeaders: C = !1,
|
|
@@ -3988,7 +3991,7 @@ function En({
|
|
|
3988
3991
|
emptyContent: q,
|
|
3989
3992
|
loading: K = !1,
|
|
3990
3993
|
loadingRows: re = 4,
|
|
3991
|
-
className:
|
|
3994
|
+
className: j,
|
|
3992
3995
|
"aria-label": ce
|
|
3993
3996
|
}) {
|
|
3994
3997
|
const [k, i] = oe.useState(
|
|
@@ -4011,7 +4014,7 @@ function En({
|
|
|
4011
4014
|
}, ae = (z) => W?.(z ? [...t] : []), le = d(
|
|
4012
4015
|
"flex flex-col",
|
|
4013
4016
|
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4014
|
-
|
|
4017
|
+
j
|
|
4015
4018
|
);
|
|
4016
4019
|
if (K)
|
|
4017
4020
|
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z, B) => /* @__PURE__ */ c(
|
|
@@ -4032,28 +4035,28 @@ function En({
|
|
|
4032
4035
|
)) });
|
|
4033
4036
|
if (t.length === 0 && q)
|
|
4034
4037
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4035
|
-
const G = t.length > 0 && E.length === t.length,
|
|
4036
|
-
const H =
|
|
4038
|
+
const G = t.length > 0 && E.length === t.length, P = E.length > 0 && !G, M = (z, B, F) => {
|
|
4039
|
+
const H = u?.(z, B) ?? !1, $ = N?.(z, B) ?? !1, L = m?.(z, B) ?? !1, te = _ && w(z);
|
|
4037
4040
|
return /* @__PURE__ */ c(
|
|
4038
4041
|
"li",
|
|
4039
4042
|
{
|
|
4040
|
-
...
|
|
4043
|
+
...o ? {
|
|
4041
4044
|
role: "button",
|
|
4042
4045
|
tabIndex: 0,
|
|
4043
4046
|
"data-list-row": "",
|
|
4044
4047
|
"aria-current": H || void 0,
|
|
4045
|
-
onClick: () =>
|
|
4046
|
-
onFocus: () =>
|
|
4048
|
+
onClick: () => o(z, B),
|
|
4049
|
+
onFocus: () => h?.(B),
|
|
4047
4050
|
onKeyDown: (v) => {
|
|
4048
|
-
v.key !== "Enter" && v.key !== " " || (v.preventDefault(),
|
|
4051
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), o(z, B));
|
|
4049
4052
|
}
|
|
4050
4053
|
} : {},
|
|
4051
4054
|
className: d(
|
|
4052
4055
|
"flex items-center gap-3 px-4 py-2 text-base",
|
|
4053
4056
|
"transition-colors duration-fast ease-out",
|
|
4054
4057
|
n === "divided" && !F && "border-t border-border-subtle",
|
|
4055
|
-
|
|
4056
|
-
H || te ? "bg-accent-soft text-text" :
|
|
4058
|
+
o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4059
|
+
H || te ? "bg-accent-soft text-text" : o && "hover:bg-surface-hover",
|
|
4057
4060
|
$ && "font-bold",
|
|
4058
4061
|
L && "opacity-55"
|
|
4059
4062
|
),
|
|
@@ -4075,17 +4078,17 @@ function En({
|
|
|
4075
4078
|
),
|
|
4076
4079
|
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z, B) }),
|
|
4077
4080
|
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z, B) : String(z) }),
|
|
4078
|
-
|
|
4081
|
+
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(z, B) })
|
|
4079
4082
|
]
|
|
4080
4083
|
},
|
|
4081
4084
|
A(z, B)
|
|
4082
4085
|
);
|
|
4083
4086
|
}, T = (() => {
|
|
4084
|
-
if (!
|
|
4087
|
+
if (!f)
|
|
4085
4088
|
return t.map((H, $) => M(H, $, $ === 0));
|
|
4086
4089
|
const z = /* @__PURE__ */ new Map();
|
|
4087
4090
|
t.forEach((H, $) => {
|
|
4088
|
-
const L =
|
|
4091
|
+
const L = f(H, $);
|
|
4089
4092
|
z.has(L) || z.set(L, []), z.get(L).push({ item: H, index: $ });
|
|
4090
4093
|
});
|
|
4091
4094
|
const B = b ?? [];
|
|
@@ -4133,13 +4136,13 @@ function En({
|
|
|
4133
4136
|
];
|
|
4134
4137
|
});
|
|
4135
4138
|
})();
|
|
4136
|
-
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown:
|
|
4139
|
+
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown: o ? y : void 0, children: [
|
|
4137
4140
|
_ && E.length > 0 && /* @__PURE__ */ c("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
|
|
4138
4141
|
/* @__PURE__ */ e(
|
|
4139
4142
|
pe,
|
|
4140
4143
|
{
|
|
4141
4144
|
checked: G,
|
|
4142
|
-
indeterminate:
|
|
4145
|
+
indeterminate: P,
|
|
4143
4146
|
onChange: (z) => ae(z.target.checked),
|
|
4144
4147
|
"aria-label": "Alles selecteren"
|
|
4145
4148
|
}
|
|
@@ -4200,7 +4203,7 @@ const Dr = {
|
|
|
4200
4203
|
success: "text-success-fg"
|
|
4201
4204
|
};
|
|
4202
4205
|
function $n({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4203
|
-
return /* @__PURE__ */ c("div", { className: d("rounded-xl
|
|
4206
|
+
return /* @__PURE__ */ c("div", { className: d("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
|
|
4204
4207
|
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Dr[n]), children: t }),
|
|
4205
4208
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4206
4209
|
] });
|
|
@@ -4211,13 +4214,13 @@ const Dn = ({
|
|
|
4211
4214
|
subtitle: n,
|
|
4212
4215
|
meta: s,
|
|
4213
4216
|
actions: a = [],
|
|
4214
|
-
children:
|
|
4215
|
-
className:
|
|
4216
|
-
backLabel:
|
|
4217
|
-
backClassName:
|
|
4217
|
+
children: l,
|
|
4218
|
+
className: o,
|
|
4219
|
+
backLabel: h = "Back",
|
|
4220
|
+
backClassName: u,
|
|
4218
4221
|
onBack: N,
|
|
4219
|
-
editable:
|
|
4220
|
-
onTitleChange:
|
|
4222
|
+
editable: m = !1,
|
|
4223
|
+
onTitleChange: f
|
|
4221
4224
|
}) => {
|
|
4222
4225
|
const [b, p] = R(!1), [C, g] = R(r), x = se(null);
|
|
4223
4226
|
Q(() => {
|
|
@@ -4226,9 +4229,9 @@ const Dn = ({
|
|
|
4226
4229
|
b && x.current && (x.current.focus(), x.current.select());
|
|
4227
4230
|
}, [b]);
|
|
4228
4231
|
const _ = () => {
|
|
4229
|
-
|
|
4232
|
+
m && p(!0);
|
|
4230
4233
|
}, E = () => {
|
|
4231
|
-
p(!1), C.trim() !== "" && C !== r &&
|
|
4234
|
+
p(!1), C.trim() !== "" && C !== r && f ? f(C.trim()) : g(r);
|
|
4232
4235
|
}, W = (D) => {
|
|
4233
4236
|
D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), p(!1));
|
|
4234
4237
|
};
|
|
@@ -4236,10 +4239,13 @@ const Dn = ({
|
|
|
4236
4239
|
"div",
|
|
4237
4240
|
{
|
|
4238
4241
|
className: d(
|
|
4239
|
-
"
|
|
4240
|
-
//
|
|
4241
|
-
|
|
4242
|
-
|
|
4242
|
+
"px-5 pt-4 pb-2.5",
|
|
4243
|
+
// Inside the content card the header shares the card's surface; the
|
|
4244
|
+
// rule is the only thing that still closes it off. `surface` therefore
|
|
4245
|
+
// only draws the rule — the background it used to paint is now the
|
|
4246
|
+
// card itself.
|
|
4247
|
+
t && "border-b border-border",
|
|
4248
|
+
o
|
|
4243
4249
|
),
|
|
4244
4250
|
children: [
|
|
4245
4251
|
/* @__PURE__ */ c("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
|
|
@@ -4263,15 +4269,15 @@ const Dn = ({
|
|
|
4263
4269
|
{
|
|
4264
4270
|
onClick: _,
|
|
4265
4271
|
className: d(
|
|
4266
|
-
"text-
|
|
4267
|
-
|
|
4272
|
+
"text-lg font-semibold tracking-title truncate",
|
|
4273
|
+
m && "cursor-pointer"
|
|
4268
4274
|
),
|
|
4269
|
-
title:
|
|
4275
|
+
title: m ? "Click to edit" : void 0,
|
|
4270
4276
|
children: r
|
|
4271
4277
|
}
|
|
4272
4278
|
),
|
|
4273
4279
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4274
|
-
|
|
4280
|
+
m && /* @__PURE__ */ e(
|
|
4275
4281
|
ut,
|
|
4276
4282
|
{
|
|
4277
4283
|
size: 15,
|
|
@@ -4280,7 +4286,7 @@ const Dn = ({
|
|
|
4280
4286
|
}
|
|
4281
4287
|
)
|
|
4282
4288
|
] }),
|
|
4283
|
-
s && /* @__PURE__ */ e("div", { className: "mt-0.5 truncate text-
|
|
4289
|
+
s && /* @__PURE__ */ e("div", { className: "mt-0.5 truncate text-sm text-text-subtle", children: s })
|
|
4284
4290
|
] })
|
|
4285
4291
|
] }) }),
|
|
4286
4292
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
@@ -4310,7 +4316,7 @@ const Dn = ({
|
|
|
4310
4316
|
)
|
|
4311
4317
|
) })
|
|
4312
4318
|
] }),
|
|
4313
|
-
|
|
4319
|
+
l && /* @__PURE__ */ e("div", { className: "mt-4", children: l })
|
|
4314
4320
|
]
|
|
4315
4321
|
}
|
|
4316
4322
|
);
|
|
@@ -4325,35 +4331,35 @@ const Dn = ({
|
|
|
4325
4331
|
backLabel: n = "Back",
|
|
4326
4332
|
className: s,
|
|
4327
4333
|
padding: a = "md",
|
|
4328
|
-
children:
|
|
4334
|
+
children: l
|
|
4329
4335
|
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3", Tr[a], s), children: [
|
|
4330
4336
|
r && /* @__PURE__ */ e(ne, { variant: "secondary", onClick: r, leftIcon: /* @__PURE__ */ e(Y, { icon: ke, size: "sm" }), iconOnly: !0 }),
|
|
4331
|
-
|
|
4332
|
-
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !
|
|
4333
|
-
(
|
|
4337
|
+
l && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: l }),
|
|
4338
|
+
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !l && "ml-auto"), children: t.map(
|
|
4339
|
+
(o) => o.splitOptions && o.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4334
4340
|
Re,
|
|
4335
4341
|
{
|
|
4336
|
-
label:
|
|
4337
|
-
onClick:
|
|
4338
|
-
icon:
|
|
4339
|
-
variant:
|
|
4340
|
-
options:
|
|
4341
|
-
disabled:
|
|
4342
|
+
label: o.label,
|
|
4343
|
+
onClick: o.onClick,
|
|
4344
|
+
icon: o.icon,
|
|
4345
|
+
variant: o.variant === "primary" ? "primary" : "secondary",
|
|
4346
|
+
options: o.splitOptions,
|
|
4347
|
+
disabled: o.disabled
|
|
4342
4348
|
},
|
|
4343
|
-
|
|
4349
|
+
o.id
|
|
4344
4350
|
) : /* @__PURE__ */ e(
|
|
4345
4351
|
ne,
|
|
4346
4352
|
{
|
|
4347
|
-
variant:
|
|
4353
|
+
variant: o.variant ?? "secondary",
|
|
4348
4354
|
size: "sm",
|
|
4349
|
-
onClick: (
|
|
4350
|
-
|
|
4355
|
+
onClick: (h) => {
|
|
4356
|
+
h.stopPropagation(), h.target.blur(), o.onClick();
|
|
4351
4357
|
},
|
|
4352
|
-
disabled:
|
|
4353
|
-
leftIcon:
|
|
4354
|
-
children:
|
|
4358
|
+
disabled: o.disabled,
|
|
4359
|
+
leftIcon: o.icon,
|
|
4360
|
+
children: o.label
|
|
4355
4361
|
},
|
|
4356
|
-
|
|
4362
|
+
o.id
|
|
4357
4363
|
)
|
|
4358
4364
|
) })
|
|
4359
4365
|
] }), _r = /<[a-z][\s\S]*>/i, Ar = [
|
|
@@ -4419,7 +4425,7 @@ function Ln({
|
|
|
4419
4425
|
control: n,
|
|
4420
4426
|
bordered: s = !1,
|
|
4421
4427
|
disabled: a = !1,
|
|
4422
|
-
className:
|
|
4428
|
+
className: l
|
|
4423
4429
|
}) {
|
|
4424
4430
|
return /* @__PURE__ */ c(
|
|
4425
4431
|
"div",
|
|
@@ -4428,7 +4434,7 @@ function Ln({
|
|
|
4428
4434
|
"flex items-center justify-between gap-4 py-2",
|
|
4429
4435
|
s && "rounded-lg border border-border px-3",
|
|
4430
4436
|
a && "opacity-50",
|
|
4431
|
-
|
|
4437
|
+
l
|
|
4432
4438
|
),
|
|
4433
4439
|
children: [
|
|
4434
4440
|
/* @__PURE__ */ c("div", { className: "min-w-0", children: [
|
|
@@ -4446,9 +4452,9 @@ function In({
|
|
|
4446
4452
|
description: n,
|
|
4447
4453
|
actions: s,
|
|
4448
4454
|
children: a,
|
|
4449
|
-
className:
|
|
4455
|
+
className: l
|
|
4450
4456
|
}) {
|
|
4451
|
-
return /* @__PURE__ */ c("section", { className: d("flex flex-col gap-2",
|
|
4457
|
+
return /* @__PURE__ */ c("section", { className: d("flex flex-col gap-2", l), children: [
|
|
4452
4458
|
/* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
4453
4459
|
t && /* @__PURE__ */ e(Y, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
|
|
4454
4460
|
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -4460,7 +4466,7 @@ function In({
|
|
|
4460
4466
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4461
4467
|
] });
|
|
4462
4468
|
}
|
|
4463
|
-
function
|
|
4469
|
+
function Pn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4464
4470
|
return /* @__PURE__ */ c(
|
|
4465
4471
|
"button",
|
|
4466
4472
|
{
|
|
@@ -4484,32 +4490,32 @@ function Ir(t, r) {
|
|
|
4484
4490
|
t
|
|
4485
4491
|
);
|
|
4486
4492
|
}
|
|
4487
|
-
const
|
|
4493
|
+
const jn = ({
|
|
4488
4494
|
groups: t,
|
|
4489
4495
|
data: r,
|
|
4490
4496
|
size: n = "md",
|
|
4491
4497
|
className: s
|
|
4492
4498
|
}) => {
|
|
4493
|
-
const a = (
|
|
4494
|
-
if (!
|
|
4499
|
+
const a = (m) => {
|
|
4500
|
+
if (!m) return "-";
|
|
4495
4501
|
try {
|
|
4496
|
-
return new Date(
|
|
4502
|
+
return new Date(m).toLocaleDateString("nl-NL", {
|
|
4497
4503
|
year: "numeric",
|
|
4498
4504
|
month: "long",
|
|
4499
4505
|
day: "numeric"
|
|
4500
4506
|
});
|
|
4501
4507
|
} catch {
|
|
4502
|
-
return String(
|
|
4508
|
+
return String(m);
|
|
4503
4509
|
}
|
|
4504
|
-
},
|
|
4505
|
-
if (!
|
|
4506
|
-
const b =
|
|
4507
|
-
return b ? b.label : String(
|
|
4508
|
-
},
|
|
4509
|
-
(
|
|
4510
|
-
const
|
|
4511
|
-
if (
|
|
4512
|
-
const p =
|
|
4510
|
+
}, l = (m) => m ? "Ja" : "Nee", o = (m, f) => {
|
|
4511
|
+
if (!f) return String(m || "-");
|
|
4512
|
+
const b = f.find((p) => p.value === m);
|
|
4513
|
+
return b ? b.label : String(m || "-");
|
|
4514
|
+
}, h = ue(
|
|
4515
|
+
(m) => {
|
|
4516
|
+
const f = Ir(r, m.name);
|
|
4517
|
+
if (m.type === "array") {
|
|
4518
|
+
const p = f;
|
|
4513
4519
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
4514
4520
|
de,
|
|
4515
4521
|
{
|
|
@@ -4531,13 +4537,13 @@ const Pn = ({
|
|
|
4531
4537
|
weight: "medium",
|
|
4532
4538
|
className: "text-text-muted",
|
|
4533
4539
|
children: [
|
|
4534
|
-
|
|
4540
|
+
m.label,
|
|
4535
4541
|
" ",
|
|
4536
4542
|
g + 1
|
|
4537
4543
|
]
|
|
4538
4544
|
}
|
|
4539
4545
|
) }),
|
|
4540
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children:
|
|
4546
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: m.arrayFields?.map((x) => {
|
|
4541
4547
|
const _ = C?.[x.name];
|
|
4542
4548
|
let E = "-";
|
|
4543
4549
|
switch (x.type) {
|
|
@@ -4551,13 +4557,13 @@ const Pn = ({
|
|
|
4551
4557
|
break;
|
|
4552
4558
|
case "select":
|
|
4553
4559
|
case "radio":
|
|
4554
|
-
E =
|
|
4560
|
+
E = o(
|
|
4555
4561
|
_,
|
|
4556
4562
|
x.options
|
|
4557
4563
|
);
|
|
4558
4564
|
break;
|
|
4559
4565
|
case "checkbox":
|
|
4560
|
-
E =
|
|
4566
|
+
E = l(_);
|
|
4561
4567
|
break;
|
|
4562
4568
|
case "date":
|
|
4563
4569
|
E = a(_);
|
|
@@ -4596,10 +4602,10 @@ const Pn = ({
|
|
|
4596
4602
|
g
|
|
4597
4603
|
)) });
|
|
4598
4604
|
}
|
|
4599
|
-
if (
|
|
4600
|
-
return
|
|
4601
|
-
if (
|
|
4602
|
-
const p =
|
|
4605
|
+
if (m.type === "custom" && m.customComponent)
|
|
4606
|
+
return m.customComponent({ value: f });
|
|
4607
|
+
if (m.format) {
|
|
4608
|
+
const p = m.format(f, r);
|
|
4603
4609
|
return /* @__PURE__ */ e(
|
|
4604
4610
|
de,
|
|
4605
4611
|
{
|
|
@@ -4611,30 +4617,30 @@ const Pn = ({
|
|
|
4611
4617
|
);
|
|
4612
4618
|
}
|
|
4613
4619
|
let b = "-";
|
|
4614
|
-
switch (
|
|
4620
|
+
switch (m.type) {
|
|
4615
4621
|
case "text":
|
|
4616
4622
|
case "email":
|
|
4617
4623
|
case "password":
|
|
4618
4624
|
case "number":
|
|
4619
4625
|
case "tel":
|
|
4620
4626
|
case "url":
|
|
4621
|
-
b =
|
|
4627
|
+
b = f ? String(f) : "-";
|
|
4622
4628
|
break;
|
|
4623
4629
|
case "textarea":
|
|
4624
|
-
b =
|
|
4630
|
+
b = f ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(f || "-") }) : "-";
|
|
4625
4631
|
break;
|
|
4626
4632
|
case "select":
|
|
4627
4633
|
case "radio":
|
|
4628
|
-
b =
|
|
4634
|
+
b = o(f, m.options);
|
|
4629
4635
|
break;
|
|
4630
4636
|
case "checkbox":
|
|
4631
|
-
b =
|
|
4637
|
+
b = l(f);
|
|
4632
4638
|
break;
|
|
4633
4639
|
case "date":
|
|
4634
|
-
b = a(
|
|
4640
|
+
b = a(f);
|
|
4635
4641
|
break;
|
|
4636
4642
|
default:
|
|
4637
|
-
b =
|
|
4643
|
+
b = f ? String(f) : "-";
|
|
4638
4644
|
}
|
|
4639
4645
|
return /* @__PURE__ */ e(
|
|
4640
4646
|
de,
|
|
@@ -4647,25 +4653,25 @@ const Pn = ({
|
|
|
4647
4653
|
);
|
|
4648
4654
|
},
|
|
4649
4655
|
[r]
|
|
4650
|
-
),
|
|
4651
|
-
(
|
|
4652
|
-
if (
|
|
4656
|
+
), u = ue(
|
|
4657
|
+
(m) => {
|
|
4658
|
+
if (m.conditional && !m.conditional(r))
|
|
4653
4659
|
return null;
|
|
4654
|
-
const
|
|
4655
|
-
if (
|
|
4660
|
+
const f = m.items.filter((p) => !(p.hidden || p.conditional && !p.conditional(r)));
|
|
4661
|
+
if (f.length === 0) return null;
|
|
4656
4662
|
const b = d(
|
|
4657
4663
|
"space-y-4",
|
|
4658
4664
|
{
|
|
4659
|
-
"grid gap-4":
|
|
4660
|
-
"flex flex-wrap gap-4":
|
|
4665
|
+
"grid gap-4": m.layout === "grid",
|
|
4666
|
+
"flex flex-wrap gap-4": m.layout === "flex"
|
|
4661
4667
|
},
|
|
4662
|
-
|
|
4663
|
-
"grid-cols-1": !
|
|
4664
|
-
"grid-cols-2":
|
|
4665
|
-
"grid-cols-3":
|
|
4666
|
-
"grid-cols-4":
|
|
4668
|
+
m.layout === "grid" && {
|
|
4669
|
+
"grid-cols-1": !m.columns || m.columns === 1,
|
|
4670
|
+
"grid-cols-2": m.columns === 2,
|
|
4671
|
+
"grid-cols-3": m.columns === 3,
|
|
4672
|
+
"grid-cols-4": m.columns === 4
|
|
4667
4673
|
},
|
|
4668
|
-
|
|
4674
|
+
m.className
|
|
4669
4675
|
);
|
|
4670
4676
|
return /* @__PURE__ */ c(
|
|
4671
4677
|
"div",
|
|
@@ -4680,20 +4686,20 @@ const Pn = ({
|
|
|
4680
4686
|
size: "lg",
|
|
4681
4687
|
weight: "semibold",
|
|
4682
4688
|
className: "text-text",
|
|
4683
|
-
children:
|
|
4689
|
+
children: m.title
|
|
4684
4690
|
}
|
|
4685
4691
|
),
|
|
4686
|
-
|
|
4692
|
+
m.description && /* @__PURE__ */ e(
|
|
4687
4693
|
de,
|
|
4688
4694
|
{
|
|
4689
4695
|
variant: "body",
|
|
4690
4696
|
size: "sm",
|
|
4691
4697
|
className: "text-text-muted mt-1",
|
|
4692
|
-
children:
|
|
4698
|
+
children: m.description
|
|
4693
4699
|
}
|
|
4694
4700
|
)
|
|
4695
4701
|
] }),
|
|
4696
|
-
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children:
|
|
4702
|
+
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: f.map((p) => /* @__PURE__ */ c(
|
|
4697
4703
|
"div",
|
|
4698
4704
|
{
|
|
4699
4705
|
className: "space-y-1",
|
|
@@ -4711,17 +4717,17 @@ const Pn = ({
|
|
|
4711
4717
|
children: p.label
|
|
4712
4718
|
}
|
|
4713
4719
|
),
|
|
4714
|
-
|
|
4720
|
+
h(p)
|
|
4715
4721
|
]
|
|
4716
4722
|
},
|
|
4717
4723
|
p.name
|
|
4718
4724
|
)) }) })
|
|
4719
4725
|
]
|
|
4720
4726
|
},
|
|
4721
|
-
|
|
4727
|
+
m.id
|
|
4722
4728
|
);
|
|
4723
4729
|
},
|
|
4724
|
-
[r,
|
|
4730
|
+
[r, h]
|
|
4725
4731
|
), N = d(
|
|
4726
4732
|
"space-y-6",
|
|
4727
4733
|
{
|
|
@@ -4732,16 +4738,16 @@ const Pn = ({
|
|
|
4732
4738
|
},
|
|
4733
4739
|
s
|
|
4734
4740
|
);
|
|
4735
|
-
return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(
|
|
4741
|
+
return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(u) }) });
|
|
4736
4742
|
}, qe = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
4737
|
-
const a = !!(t.children && t.children.length > 0),
|
|
4743
|
+
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
4738
4744
|
if (a)
|
|
4739
4745
|
return /* @__PURE__ */ c("li", { children: [
|
|
4740
4746
|
/* @__PURE__ */ c(
|
|
4741
4747
|
"div",
|
|
4742
4748
|
{
|
|
4743
4749
|
className: d(
|
|
4744
|
-
"flex items-center gap-2 px-2 pt-
|
|
4750
|
+
"flex items-center gap-2 px-2.5 pt-5 pb-2 text-2xs font-semibold uppercase tracking-label text-text-disabled"
|
|
4745
4751
|
),
|
|
4746
4752
|
children: [
|
|
4747
4753
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
|
|
@@ -4749,10 +4755,10 @@ const Pn = ({
|
|
|
4749
4755
|
]
|
|
4750
4756
|
}
|
|
4751
4757
|
),
|
|
4752
|
-
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-
|
|
4758
|
+
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((u, N) => /* @__PURE__ */ e(
|
|
4753
4759
|
qe,
|
|
4754
4760
|
{
|
|
4755
|
-
item:
|
|
4761
|
+
item: u,
|
|
4756
4762
|
isSelectedHandler: r,
|
|
4757
4763
|
onClick: n,
|
|
4758
4764
|
depth: s + 1
|
|
@@ -4760,95 +4766,90 @@ const Pn = ({
|
|
|
4760
4766
|
N
|
|
4761
4767
|
)) })
|
|
4762
4768
|
] });
|
|
4763
|
-
const
|
|
4769
|
+
const o = t.action, h = o?.visibility !== "always";
|
|
4764
4770
|
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
|
|
4765
4771
|
"div",
|
|
4766
4772
|
{
|
|
4767
4773
|
role: "button",
|
|
4768
4774
|
tabIndex: 0,
|
|
4769
4775
|
onClick: () => t.path && n?.(t.path),
|
|
4770
|
-
onKeyDown: (
|
|
4771
|
-
(
|
|
4776
|
+
onKeyDown: (u) => {
|
|
4777
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), t.path && n?.(t.path));
|
|
4772
4778
|
},
|
|
4773
4779
|
className: d(
|
|
4774
|
-
|
|
4780
|
+
// De kolom ligt op de backdrop, niet op een paneel: het actieve item
|
|
4781
|
+
// is daarom een opliggende witte plaat, en de hover is de backdrop-
|
|
4782
|
+
// hover (donkerder) in plaats van de surface-hover (lichter).
|
|
4783
|
+
"group/item flex h-row-md cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-base no-underline",
|
|
4775
4784
|
"transition-colors duration-fast ease-out",
|
|
4776
4785
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
4777
|
-
|
|
4786
|
+
l ? "bg-surface font-medium text-text shadow-sm" : "text-text-muted hover:bg-page-hover hover:text-text"
|
|
4778
4787
|
),
|
|
4779
4788
|
children: [
|
|
4780
|
-
t.icon && /* @__PURE__ */ e(
|
|
4789
|
+
t.icon && /* @__PURE__ */ e(
|
|
4790
|
+
"span",
|
|
4791
|
+
{
|
|
4792
|
+
className: d(
|
|
4793
|
+
"flex w-5 shrink-0 items-center justify-center",
|
|
4794
|
+
l ? "text-text-muted" : "text-text-subtle"
|
|
4795
|
+
),
|
|
4796
|
+
children: t.icon
|
|
4797
|
+
}
|
|
4798
|
+
),
|
|
4781
4799
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
|
|
4782
4800
|
t.count !== void 0 && t.count > 0 && /* @__PURE__ */ e(
|
|
4783
4801
|
"span",
|
|
4784
4802
|
{
|
|
4785
4803
|
className: d(
|
|
4786
4804
|
"shrink-0 text-xs tabular-nums",
|
|
4787
|
-
|
|
4788
|
-
|
|
4805
|
+
l ? "rounded-full bg-accent px-1.5 font-semibold text-accent-fg" : "text-text-subtle",
|
|
4806
|
+
o && h && "group-hover/item:hidden group-focus-within/item:hidden"
|
|
4789
4807
|
),
|
|
4790
4808
|
children: t.count
|
|
4791
4809
|
}
|
|
4792
4810
|
),
|
|
4793
|
-
|
|
4811
|
+
o && /* @__PURE__ */ e(
|
|
4794
4812
|
"button",
|
|
4795
4813
|
{
|
|
4796
4814
|
type: "button",
|
|
4797
|
-
"aria-label":
|
|
4798
|
-
title:
|
|
4799
|
-
onClick: (
|
|
4800
|
-
|
|
4815
|
+
"aria-label": o.label,
|
|
4816
|
+
title: o.label,
|
|
4817
|
+
onClick: (u) => {
|
|
4818
|
+
u.stopPropagation(), o.onClick();
|
|
4801
4819
|
},
|
|
4802
|
-
onKeyDown: (
|
|
4820
|
+
onKeyDown: (u) => u.stopPropagation(),
|
|
4803
4821
|
className: d(
|
|
4804
|
-
"flex size-5 shrink-0 items-center justify-center rounded",
|
|
4822
|
+
"flex size-5 shrink-0 items-center justify-center rounded-sm",
|
|
4805
4823
|
"text-text-subtle transition-colors duration-fast ease-out",
|
|
4806
|
-
"hover:bg-
|
|
4824
|
+
"hover:bg-page-hover hover:text-text",
|
|
4807
4825
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
4808
|
-
|
|
4826
|
+
h && "opacity-0 group-hover/item:opacity-100 focus-visible:opacity-100"
|
|
4809
4827
|
),
|
|
4810
|
-
children:
|
|
4828
|
+
children: o.icon
|
|
4811
4829
|
}
|
|
4812
4830
|
)
|
|
4813
4831
|
]
|
|
4814
4832
|
}
|
|
4815
4833
|
) });
|
|
4816
4834
|
}, On = ({
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-lg font-semibold text-text", children: t }),
|
|
4826
|
-
r && r.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: r.map((l, u) => /* @__PURE__ */ e(
|
|
4827
|
-
"span",
|
|
4828
|
-
{
|
|
4829
|
-
className: d(
|
|
4830
|
-
"flex h-control-sm w-7 cursor-pointer items-center justify-center rounded-md text-text-strong",
|
|
4831
|
-
"transition-colors duration-fast ease-out hover:bg-surface-hover hover:text-text-strong",
|
|
4832
|
-
"focus-visible:outline-none focus-visible:focus-ring"
|
|
4833
|
-
),
|
|
4834
|
-
children: l
|
|
4835
|
-
},
|
|
4836
|
-
u
|
|
4837
|
-
)) })
|
|
4838
|
-
] }),
|
|
4839
|
-
o && /* @__PURE__ */ e("div", { className: "px-1 pb-3", children: o }),
|
|
4840
|
-
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto", children: n.map(
|
|
4841
|
-
(l, u) => !l.path && !l.label && !l.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, u) : /* @__PURE__ */ e(
|
|
4835
|
+
items: t,
|
|
4836
|
+
isSelectedHandler: r,
|
|
4837
|
+
onClick: n,
|
|
4838
|
+
preMenuItemsComponent: s
|
|
4839
|
+
}) => /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
4840
|
+
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
4841
|
+
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
4842
|
+
(a, l) => !a.path && !a.label && !a.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, l) : /* @__PURE__ */ e(
|
|
4842
4843
|
qe,
|
|
4843
4844
|
{
|
|
4844
|
-
item:
|
|
4845
|
-
isSelectedHandler:
|
|
4846
|
-
onClick:
|
|
4845
|
+
item: a,
|
|
4846
|
+
isSelectedHandler: r,
|
|
4847
|
+
onClick: n
|
|
4847
4848
|
},
|
|
4848
|
-
|
|
4849
|
+
l
|
|
4849
4850
|
)
|
|
4850
4851
|
) })
|
|
4851
|
-
] }),
|
|
4852
|
+
] }), Pr = {
|
|
4852
4853
|
xs: "text-xs",
|
|
4853
4854
|
sm: "text-sm",
|
|
4854
4855
|
md: "text-base",
|
|
@@ -4857,7 +4858,7 @@ const Pn = ({
|
|
|
4857
4858
|
"2xl": "text-2xl",
|
|
4858
4859
|
"3xl": "text-3xl",
|
|
4859
4860
|
"4xl": "text-3xl"
|
|
4860
|
-
},
|
|
4861
|
+
}, jr = {
|
|
4861
4862
|
light: "font-normal",
|
|
4862
4863
|
normal: "font-normal",
|
|
4863
4864
|
medium: "font-medium",
|
|
@@ -4883,21 +4884,21 @@ const Pn = ({
|
|
|
4883
4884
|
weight: n = "semibold",
|
|
4884
4885
|
color: s = "current",
|
|
4885
4886
|
align: a = "left",
|
|
4886
|
-
truncate:
|
|
4887
|
-
className:
|
|
4888
|
-
children:
|
|
4889
|
-
...
|
|
4887
|
+
truncate: l = !1,
|
|
4888
|
+
className: o,
|
|
4889
|
+
children: h,
|
|
4890
|
+
...u
|
|
4890
4891
|
}) => {
|
|
4891
|
-
const N = `h${t}`,
|
|
4892
|
+
const N = `h${t}`, m = d(
|
|
4892
4893
|
"font-sans text-pretty",
|
|
4893
|
-
|
|
4894
|
-
|
|
4894
|
+
Pr[r || Rr(t)],
|
|
4895
|
+
jr[n],
|
|
4895
4896
|
Or[s],
|
|
4896
4897
|
Fr[a],
|
|
4897
|
-
|
|
4898
|
-
|
|
4898
|
+
l && "truncate",
|
|
4899
|
+
o
|
|
4899
4900
|
);
|
|
4900
|
-
return /* @__PURE__ */ e(N, { className:
|
|
4901
|
+
return /* @__PURE__ */ e(N, { className: m, ...u, children: h });
|
|
4901
4902
|
};
|
|
4902
4903
|
function Rr(t) {
|
|
4903
4904
|
return {
|
|
@@ -4915,42 +4916,42 @@ const Rn = ({
|
|
|
4915
4916
|
onClose: n,
|
|
4916
4917
|
labels: s,
|
|
4917
4918
|
initialCommandPath: a,
|
|
4918
|
-
initialActiveIndex:
|
|
4919
|
+
initialActiveIndex: l
|
|
4919
4920
|
}) => {
|
|
4920
|
-
const [
|
|
4921
|
-
(x) => x.label.toLowerCase().includes(
|
|
4921
|
+
const [o, h] = R(""), [u, N] = R(a || []), [m, f] = R(l || 0), b = se(null), p = se(null), g = (u.length ? t.find((x) => x.id === u[0])?.subCommands || [] : t).filter(
|
|
4922
|
+
(x) => x.label.toLowerCase().includes(o.toLowerCase())
|
|
4922
4923
|
);
|
|
4923
4924
|
return Q(() => {
|
|
4924
|
-
r || (
|
|
4925
|
+
r || (h(""), N(a || []), f(l || 0));
|
|
4925
4926
|
}, [r]), Q(() => {
|
|
4926
4927
|
const x = (_) => {
|
|
4927
4928
|
if (r) {
|
|
4928
4929
|
if (_.key === "Escape")
|
|
4929
4930
|
n();
|
|
4930
4931
|
else if (_.key === "ArrowUp")
|
|
4931
|
-
|
|
4932
|
+
f(
|
|
4932
4933
|
(E) => E > 0 ? E - 1 : g.length - 1
|
|
4933
4934
|
);
|
|
4934
4935
|
else if (_.key === "ArrowDown")
|
|
4935
|
-
|
|
4936
|
+
f(
|
|
4936
4937
|
(E) => E < g.length - 1 ? E + 1 : 0
|
|
4937
4938
|
);
|
|
4938
4939
|
else if (_.key === "Enter") {
|
|
4939
|
-
const E = g[
|
|
4940
|
-
E && (E.subCommands ? (N([...
|
|
4940
|
+
const E = g[m];
|
|
4941
|
+
E && (E.subCommands ? (N([...u, E.id]), f(0)) : E.action && (E.action(), n()));
|
|
4941
4942
|
}
|
|
4942
4943
|
}
|
|
4943
4944
|
};
|
|
4944
4945
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
4945
|
-
}, [r, n, g,
|
|
4946
|
+
}, [r, n, g, m, u]), Q(() => {
|
|
4946
4947
|
const x = (_) => {
|
|
4947
4948
|
b.current && !b.current.contains(_.target) && n();
|
|
4948
4949
|
};
|
|
4949
4950
|
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
4950
4951
|
}, [r, n]), Q(() => {
|
|
4951
4952
|
if (!r) return;
|
|
4952
|
-
p.current?.querySelector(`[data-index="${
|
|
4953
|
-
}, [
|
|
4953
|
+
p.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4954
|
+
}, [m, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
|
|
4954
4955
|
"div",
|
|
4955
4956
|
{
|
|
4956
4957
|
className: "flex flex-col w-full max-w-lg max-h-dialog p-2 mx-auto rounded-lg border border-border shadow-modal bg-surface",
|
|
@@ -4964,8 +4965,8 @@ const Rn = ({
|
|
|
4964
4965
|
type: "text",
|
|
4965
4966
|
autoFocus: !0,
|
|
4966
4967
|
placeholder: s?.searchPlaceholder || "Search commands...",
|
|
4967
|
-
value:
|
|
4968
|
-
onChange: (x) =>
|
|
4968
|
+
value: o,
|
|
4969
|
+
onChange: (x) => h(x.target.value),
|
|
4969
4970
|
className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
|
|
4970
4971
|
}
|
|
4971
4972
|
)
|
|
@@ -4981,11 +4982,11 @@ const Rn = ({
|
|
|
4981
4982
|
"div",
|
|
4982
4983
|
{
|
|
4983
4984
|
"data-index": _,
|
|
4984
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${_ ===
|
|
4985
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${_ === m ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4985
4986
|
onClick: () => {
|
|
4986
|
-
x.subCommands ? (N([...
|
|
4987
|
+
x.subCommands ? (N([...u, x.id]), f(0)) : x.action && (x.action(), n());
|
|
4987
4988
|
},
|
|
4988
|
-
onMouseEnter: () =>
|
|
4989
|
+
onMouseEnter: () => f(_),
|
|
4989
4990
|
children: [
|
|
4990
4991
|
x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
|
|
4991
4992
|
/* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
|
|
@@ -5082,27 +5083,27 @@ const Rn = ({
|
|
|
5082
5083
|
background: n,
|
|
5083
5084
|
radius: s,
|
|
5084
5085
|
shadow: a,
|
|
5085
|
-
border:
|
|
5086
|
-
borderColor:
|
|
5087
|
-
className:
|
|
5088
|
-
children:
|
|
5086
|
+
border: l,
|
|
5087
|
+
borderColor: o,
|
|
5088
|
+
className: h,
|
|
5089
|
+
children: u,
|
|
5089
5090
|
...N
|
|
5090
|
-
},
|
|
5091
|
+
}, m) => /* @__PURE__ */ e(
|
|
5091
5092
|
"div",
|
|
5092
5093
|
{
|
|
5093
|
-
ref:
|
|
5094
|
+
ref: m,
|
|
5094
5095
|
className: d(
|
|
5095
5096
|
t && Br[t],
|
|
5096
5097
|
r && Hr[r],
|
|
5097
5098
|
n && Vr[n],
|
|
5098
5099
|
s && qr[s],
|
|
5099
5100
|
a && Ur[a],
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5101
|
+
l && Wr[l],
|
|
5102
|
+
o && Kr[o],
|
|
5103
|
+
h
|
|
5103
5104
|
),
|
|
5104
5105
|
...N,
|
|
5105
|
-
children:
|
|
5106
|
+
children: u
|
|
5106
5107
|
}
|
|
5107
5108
|
)
|
|
5108
5109
|
);
|
|
@@ -5128,23 +5129,23 @@ function Hn({
|
|
|
5128
5129
|
framework: n = "react",
|
|
5129
5130
|
fallback: s,
|
|
5130
5131
|
errorFallback: a,
|
|
5131
|
-
componentProps:
|
|
5132
|
-
className:
|
|
5132
|
+
componentProps: l,
|
|
5133
|
+
className: o
|
|
5133
5134
|
}) {
|
|
5134
|
-
const
|
|
5135
|
+
const h = se(null), [u, N] = R(!0), [m, f] = R(!1), [b, p] = R(null), C = se(null);
|
|
5135
5136
|
se(null);
|
|
5136
5137
|
const g = se(r);
|
|
5137
5138
|
return g.current = r, Q(() => {
|
|
5138
5139
|
let x = !0;
|
|
5139
5140
|
return (async () => {
|
|
5140
|
-
N(!0),
|
|
5141
|
+
N(!0), f(!1), p(null);
|
|
5141
5142
|
try {
|
|
5142
5143
|
const E = await g.current();
|
|
5143
5144
|
if (!x) return;
|
|
5144
5145
|
const W = E.component || E.default || E;
|
|
5145
5146
|
p(n === "react" ? () => W : () => E);
|
|
5146
5147
|
} catch (E) {
|
|
5147
|
-
console.error(`[FederatedResource] Load failed: ${t}`, E), x &&
|
|
5148
|
+
console.error(`[FederatedResource] Load failed: ${t}`, E), x && f(!0);
|
|
5148
5149
|
} finally {
|
|
5149
5150
|
x && N(!1);
|
|
5150
5151
|
}
|
|
@@ -5152,26 +5153,26 @@ function Hn({
|
|
|
5152
5153
|
x = !1;
|
|
5153
5154
|
};
|
|
5154
5155
|
}, [t, n]), Q(() => {
|
|
5155
|
-
if (
|
|
5156
|
-
const x =
|
|
5156
|
+
if (u || !b || n === "react") return;
|
|
5157
|
+
const x = h.current;
|
|
5157
5158
|
if (x) {
|
|
5158
5159
|
if (n === "svelte") {
|
|
5159
|
-
const _ = b.default || b, E = new _({ target: x, props:
|
|
5160
|
+
const _ = b.default || b, E = new _({ target: x, props: l || {} });
|
|
5160
5161
|
return C.current = E, () => E.$destroy();
|
|
5161
5162
|
}
|
|
5162
5163
|
if (b.mount) {
|
|
5163
|
-
const _ = b.mount({ container: x, props:
|
|
5164
|
+
const _ = b.mount({ container: x, props: l || {} });
|
|
5164
5165
|
return () => {
|
|
5165
5166
|
typeof _ == "function" ? _() : b.unmount?.(x);
|
|
5166
5167
|
};
|
|
5167
5168
|
}
|
|
5168
5169
|
}
|
|
5169
|
-
}, [b, n,
|
|
5170
|
-
n === "svelte" && C.current && C.current.$set?.(
|
|
5171
|
-
}, [
|
|
5172
|
-
|
|
5173
|
-
!
|
|
5174
|
-
n === "react" && !
|
|
5170
|
+
}, [b, n, u]), Q(() => {
|
|
5171
|
+
n === "svelte" && C.current && C.current.$set?.(l);
|
|
5172
|
+
}, [l, n]), /* @__PURE__ */ c("div", { ref: h, className: o, style: { display: "contents" }, children: [
|
|
5173
|
+
u && s,
|
|
5174
|
+
!u && m && a,
|
|
5175
|
+
n === "react" && !m && b && /* @__PURE__ */ e(b, { ...l })
|
|
5175
5176
|
] });
|
|
5176
5177
|
}
|
|
5177
5178
|
class Vn extends xt {
|
|
@@ -5247,7 +5248,7 @@ export {
|
|
|
5247
5248
|
Ln as SettingsRow,
|
|
5248
5249
|
In as SettingsSection,
|
|
5249
5250
|
On as SidebarMenu,
|
|
5250
|
-
|
|
5251
|
+
Pn as SourceChip,
|
|
5251
5252
|
yn as Spinner,
|
|
5252
5253
|
Re as SplitButton,
|
|
5253
5254
|
Nn as StatusDot,
|
|
@@ -5255,13 +5256,13 @@ export {
|
|
|
5255
5256
|
ur as StorageInput,
|
|
5256
5257
|
Ut as Switch,
|
|
5257
5258
|
fn as TabBar,
|
|
5258
|
-
|
|
5259
|
+
Pe as Table,
|
|
5259
5260
|
nr as Tabs,
|
|
5260
5261
|
de as Text,
|
|
5261
5262
|
De as TextArea,
|
|
5262
5263
|
be as TextField,
|
|
5263
5264
|
an as VideoSurface,
|
|
5264
|
-
|
|
5265
|
+
jn as View,
|
|
5265
5266
|
d as cn,
|
|
5266
5267
|
rn as createSizes,
|
|
5267
5268
|
tn as createVariants,
|