@base-framework/ui 1.2.16 → 1.2.17
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/atoms.es.js +1 -1
- package/dist/{confirmation-DIaNfDm8.js → confirmation-Dn9GDvhl.js} +1 -1
- package/dist/{full-page-B0EJ6uzY.js → full-page-BJUvF3X2.js} +595 -581
- package/dist/index.es.js +5 -5
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +3 -3
- package/dist/pages.es.js +2 -2
- package/dist/{sidebar-menu-BpgoQxtT.js → sidebar-menu-BRTZ4oP4.js} +1 -1
- package/dist/{sidebar-menu-page-CUihu9QC.js → sidebar-menu-page-BfPM2fof.js} +2 -2
- package/dist/{signature-panel-Cm15deyP.js → signature-panel-Bu-traik.js} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as Y, Span as
|
|
2
|
-
import { Atom as r, Jot as M, Component as C, Html as ft, Data as z, Events as
|
|
3
|
-
import { Icons as
|
|
4
|
-
import { Timer as mt, TableBody as
|
|
1
|
+
import { I as Y, Span as g, Button as w, OnState as T, Div as o, Legend as nt, Fieldset as at, H4 as Ee, P as k, Label as V, Checkbox as ce, Input as p, Textarea as ot, UseParent as W, Img as de, H5 as lt, H2 as J, Form as rt, Header as Z, Footer as ue, A as Ue, H3 as he, Nav as fe, Ul as X, Li as ge, OnStateOpen as me, On as Q, Dialog as it, Th as Ye, Thead as ct, Tr as dt, Table as be, Time as ut, H1 as ht } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as r, Jot as M, Component as C, Html as ft, Data as z, Events as j, DateTime as ee, NavLink as gt, router as ve, DataTracker as Ve } from "@base-framework/base";
|
|
3
|
+
import { Icons as u } from "./icons.es.js";
|
|
4
|
+
import { Timer as mt, TableBody as bt, DataTableBody as xt, ScrollableTableBody as pt, List as yt } from "@base-framework/organisms";
|
|
5
5
|
import { F as U } from "./format-DE4rFWuD.js";
|
|
6
6
|
import { F as wt } from "./bside-template-C7AQgQ6H.js";
|
|
7
7
|
const vt = {
|
|
@@ -20,7 +20,7 @@ const vt = {
|
|
|
20
20
|
class: `stroke-current icon-size ${s} ${e.class || ""}`,
|
|
21
21
|
html: t[0]?.textContent
|
|
22
22
|
});
|
|
23
|
-
}),
|
|
23
|
+
}), ke = {
|
|
24
24
|
xs: "w-4 h-4",
|
|
25
25
|
// 16px - matches Icon
|
|
26
26
|
sm: "w-6 h-6",
|
|
@@ -35,7 +35,7 @@ const vt = {
|
|
|
35
35
|
// 56px - matches Icon
|
|
36
36
|
"3xl": "w-16 h-16"
|
|
37
37
|
// 64px - matches Icon
|
|
38
|
-
},
|
|
38
|
+
}, Ce = {
|
|
39
39
|
xs: "16px",
|
|
40
40
|
sm: "24px",
|
|
41
41
|
md: "32px",
|
|
@@ -43,14 +43,14 @@ const vt = {
|
|
|
43
43
|
xl: "48px",
|
|
44
44
|
"2xl": "56px",
|
|
45
45
|
"3xl": "64px"
|
|
46
|
-
},
|
|
46
|
+
}, Se = {
|
|
47
47
|
outlined: "material-symbols-outlined",
|
|
48
48
|
filled: "material-symbols-filled",
|
|
49
49
|
rounded: "material-symbols-rounded",
|
|
50
50
|
sharp: "material-symbols-sharp"
|
|
51
|
-
},
|
|
52
|
-
const t = e.size || "sm", s = e.variant || "outlined", n =
|
|
53
|
-
return
|
|
51
|
+
}, $e = r((e) => {
|
|
52
|
+
const t = e.size || "sm", s = e.variant || "outlined", n = ke[t] || ke.sm, a = Ce[t] || Ce.sm, l = Se[s] || Se.outlined;
|
|
53
|
+
return g({
|
|
54
54
|
...e,
|
|
55
55
|
// @ts-ignore
|
|
56
56
|
class: `inline-flex items-center justify-center ${l} ${n} ${e.class || ""}`,
|
|
@@ -62,14 +62,14 @@ const vt = {
|
|
|
62
62
|
name: void 0
|
|
63
63
|
// @ts-ignore
|
|
64
64
|
}, e.name);
|
|
65
|
-
}),
|
|
65
|
+
}), x = (e = {}, t) => t ? typeof t == "string" && t.includes("<svg") ? ie(e, t) : typeof t == "object" && t.name ? $e({
|
|
66
66
|
...e,
|
|
67
67
|
name: t.name,
|
|
68
68
|
variant: t.variant || e.variant || "outlined"
|
|
69
|
-
}) : typeof t == "string" ?
|
|
69
|
+
}) : typeof t == "string" ? $e({
|
|
70
70
|
...e,
|
|
71
71
|
name: t
|
|
72
|
-
}) : ie(e, t) : null,
|
|
72
|
+
}) : ie(e, t) : null, ra = (e) => e ? !!(typeof e == "object" && e.name || typeof e == "string" && !e.includes("<svg")) : !1, ia = (e) => typeof e == "string" && e.includes("<svg"), De = {
|
|
73
73
|
gray: {
|
|
74
74
|
backgroundColor: "bg-gray-50",
|
|
75
75
|
textColor: "text-gray-600",
|
|
@@ -150,17 +150,17 @@ const vt = {
|
|
|
150
150
|
textColor: "text-foreground",
|
|
151
151
|
ringColor: "ring-white/10"
|
|
152
152
|
}
|
|
153
|
-
}, kt = (e) =>
|
|
153
|
+
}, kt = (e) => De[e] || De.gray, Ct = (e, t = {}) => {
|
|
154
154
|
const s = kt(e), n = t.backgroundColor ?? s.backgroundColor, a = t.textColor ?? s.textColor, l = t.ringColor ?? s.ringColor;
|
|
155
155
|
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${n} ${a} ${l}`;
|
|
156
|
-
},
|
|
157
|
-
const { type: s, icon: n, size: a = "xs", backgroundColor: l, textColor: i, ringColor: c, ...
|
|
158
|
-
return
|
|
159
|
-
n ?
|
|
156
|
+
}, ca = r((e, t) => {
|
|
157
|
+
const { type: s, icon: n, size: a = "xs", backgroundColor: l, textColor: i, ringColor: c, ...h } = e, m = Ct(s, { backgroundColor: l, textColor: i, ringColor: c });
|
|
158
|
+
return g({ ...h, class: m }, [
|
|
159
|
+
n ? x({ size: a, class: "mr-1" }, n) : null,
|
|
160
160
|
...t || []
|
|
161
161
|
]);
|
|
162
162
|
});
|
|
163
|
-
class
|
|
163
|
+
class We extends C {
|
|
164
164
|
/**
|
|
165
165
|
* This will set the component context.
|
|
166
166
|
*
|
|
@@ -176,9 +176,9 @@ class Ve extends C {
|
|
|
176
176
|
}
|
|
177
177
|
const O = (e) => (
|
|
178
178
|
/** @type {VeilComponentConstructor} */
|
|
179
|
-
M(e,
|
|
179
|
+
M(e, We)
|
|
180
180
|
);
|
|
181
|
-
class
|
|
181
|
+
class da extends We {
|
|
182
182
|
/**
|
|
183
183
|
* Declare public props and their defaults.
|
|
184
184
|
*/
|
|
@@ -212,9 +212,9 @@ class ia extends Ve {
|
|
|
212
212
|
const t = this.size, s = this.icon, n = this.activeIcon || this.icon, a = (() => {
|
|
213
213
|
if (this.dataKey) {
|
|
214
214
|
let l = `[[${this.dataKey}]]`;
|
|
215
|
-
return this.formatType === "number" ? l = U.number(l, "0") : this.formatType === "money" ? l = U.roundMoney(l) : this.formatType === "date" ? l = U.date(l) : this.formatType === "percent" && (l = U.percentage(l)),
|
|
215
|
+
return this.formatType === "number" ? l = U.number(l, "0") : this.formatType === "money" ? l = U.roundMoney(l) : this.formatType === "date" ? l = U.date(l) : this.formatType === "percent" && (l = U.percentage(l)), g({ class: "toggle-btn-value text-sm tabular-nums capitalize" }, l);
|
|
216
216
|
}
|
|
217
|
-
return this.value !== null && this.value !== void 0 ?
|
|
217
|
+
return this.value !== null && this.value !== void 0 ? g({ class: "toggle-btn-value text-sm tabular-nums" }, String(this.value)) : null;
|
|
218
218
|
})();
|
|
219
219
|
return w({
|
|
220
220
|
click: () => this.handleToggle(),
|
|
@@ -223,7 +223,7 @@ class ia extends Ve {
|
|
|
223
223
|
}, [
|
|
224
224
|
T(
|
|
225
225
|
"active",
|
|
226
|
-
(l) =>
|
|
226
|
+
(l) => x({ size: t }, l ? n : s)
|
|
227
227
|
),
|
|
228
228
|
a
|
|
229
229
|
]);
|
|
@@ -237,7 +237,7 @@ const ne = {
|
|
|
237
237
|
xl: "w-14 h-14",
|
|
238
238
|
"2xl": "w-16 h-16"
|
|
239
239
|
};
|
|
240
|
-
class
|
|
240
|
+
class ua extends C {
|
|
241
241
|
/**
|
|
242
242
|
* Declare public props.
|
|
243
243
|
*/
|
|
@@ -268,14 +268,14 @@ class ca extends C {
|
|
|
268
268
|
* @returns {object}
|
|
269
269
|
*/
|
|
270
270
|
render() {
|
|
271
|
-
const t = this.icon, s = this.activeIcon || this.icon, n = ne[this.size] || ne.md, a = ["xs", "sm"].includes(this.size) ? "xs" : "sm", l = this.class ?? "bg-background/40 backdrop-blur-sm", i = "text-foreground", c = this.activeClass || i,
|
|
271
|
+
const t = this.icon, s = this.activeIcon || this.icon, n = ne[this.size] || ne.md, a = ["xs", "sm"].includes(this.size) ? "xs" : "sm", l = this.class ?? "bg-background/40 backdrop-blur-sm", i = "text-foreground", c = this.activeClass || i, h = this.circle ?? !1;
|
|
272
272
|
return w({
|
|
273
273
|
click: () => this.handleToggle(),
|
|
274
274
|
// @ts-ignore
|
|
275
|
-
class: `circle-toggle-btn inline-flex items-center justify-center rounded-full border-0 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 ${n} ${l}${
|
|
275
|
+
class: `circle-toggle-btn inline-flex items-center justify-center rounded-full border-0 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 ${n} ${l}${h ? " rounded-full w-[40px] h-[40px] max-w-[40px]" : ""}`
|
|
276
276
|
}, [
|
|
277
277
|
T("active", (m) => [
|
|
278
|
-
|
|
278
|
+
x({
|
|
279
279
|
size: a,
|
|
280
280
|
class: `transition-colors ${m ? c : i}`
|
|
281
281
|
}, m ? s : t)
|
|
@@ -283,7 +283,7 @@ class ca extends C {
|
|
|
283
283
|
]);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const ha = r((e, t) => {
|
|
287
287
|
const s = e.size || "md", n = ne[s] || ne.md, a = ["xs", "sm"].includes(s) ? "xs" : "sm";
|
|
288
288
|
return w({
|
|
289
289
|
...e,
|
|
@@ -291,7 +291,7 @@ const da = r((e, t) => {
|
|
|
291
291
|
class: `circle-btn inline-flex items-center justify-center rounded-full border-0 bg-background/40 backdrop-blur-sm text-foreground cursor-pointer transition-colors hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 ${n} ${e.class || ""}`
|
|
292
292
|
}, [
|
|
293
293
|
// @ts-ignore
|
|
294
|
-
e.icon ?
|
|
294
|
+
e.icon ? x({ size: a }, e.icon) : null,
|
|
295
295
|
...t || []
|
|
296
296
|
]);
|
|
297
297
|
}), F = (e) => r((t, s) => w({
|
|
@@ -299,19 +299,19 @@ const da = r((e, t) => {
|
|
|
299
299
|
...t,
|
|
300
300
|
// @ts-ignore
|
|
301
301
|
class: `bttn ${e.class} ${t.class || ""}`
|
|
302
|
-
}, s)),
|
|
302
|
+
}, s)), xe = r(
|
|
303
303
|
(e, t) => w({
|
|
304
304
|
...e,
|
|
305
305
|
// @ts-ignore
|
|
306
306
|
class: e.class
|
|
307
307
|
}, [
|
|
308
308
|
// @ts-ignore
|
|
309
|
-
e.icon && e.position !== "right" ?
|
|
309
|
+
e.icon && e.position !== "right" ? x({ size: e.size || "sm", class: e.animation ?? null }, e.icon) : null,
|
|
310
310
|
...t || [],
|
|
311
311
|
// @ts-ignore
|
|
312
|
-
e.icon && e.position === "right" ?
|
|
312
|
+
e.icon && e.position === "right" ? x({ size: e.size || "sm", class: e.animation ?? null }, e.icon) : null
|
|
313
313
|
])
|
|
314
|
-
),
|
|
314
|
+
), Ie = (e) => r((t, s) => xe({
|
|
315
315
|
...e,
|
|
316
316
|
...t,
|
|
317
317
|
// @ts-ignore
|
|
@@ -322,10 +322,23 @@ const da = r((e, t) => {
|
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
e.backUrl && app.navigate(e.backUrl);
|
|
325
|
-
}, $t = (e) => r((t, s) => (t.icon = t.icon ||
|
|
325
|
+
}, $t = (e) => r((t, s) => (t.icon = t.icon || u.arrows.left, t.click = t.click || St(t), xe({
|
|
326
|
+
...e,
|
|
327
|
+
...t
|
|
328
|
+
}, s))), Dt = (e) => {
|
|
329
|
+
const t = globalThis.history.length;
|
|
330
|
+
return () => {
|
|
331
|
+
const a = globalThis.history.length - t + 1;
|
|
332
|
+
if (t > 1) {
|
|
333
|
+
globalThis.history.go(-a);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
e.backUrl && app.navigate(e.backUrl);
|
|
337
|
+
};
|
|
338
|
+
}, It = (e) => r((t, s) => (t.icon = t.icon || u.arrows.left, t.click = t.click || Dt(t), xe({
|
|
326
339
|
...e,
|
|
327
340
|
...t
|
|
328
|
-
}, s))),
|
|
341
|
+
}, s))), Tt = r((e, t) => {
|
|
329
342
|
const s = e.size || "md", n = {
|
|
330
343
|
xs: "w-6 h-6",
|
|
331
344
|
sm: "w-8 h-8",
|
|
@@ -339,10 +352,10 @@ const da = r((e, t) => {
|
|
|
339
352
|
class: `circle-icon-btn inline-flex items-center justify-center rounded-full ${a} text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ring-offset-background transition-colors disabled:pointer-events-none disabled:opacity-50 cursor-pointer ${n[s] || n.md} ${e.class || ""}`
|
|
340
353
|
}, [
|
|
341
354
|
// @ts-ignore
|
|
342
|
-
e.icon ?
|
|
355
|
+
e.icon ? x({ size: s === "xs" ? "xs" : "sm" }, e.icon) : null,
|
|
343
356
|
...t || []
|
|
344
357
|
]);
|
|
345
|
-
}),
|
|
358
|
+
}), Te = {
|
|
346
359
|
primary: F({ class: "primary" }),
|
|
347
360
|
secondary: F({ class: "secondary" }),
|
|
348
361
|
destructive: F({ class: "destructive" }),
|
|
@@ -350,22 +363,23 @@ const da = r((e, t) => {
|
|
|
350
363
|
outline: F({ class: "outline" }),
|
|
351
364
|
ghost: F({ class: "ghost" }),
|
|
352
365
|
link: F({ class: "link" }),
|
|
353
|
-
icon:
|
|
354
|
-
withIcon:
|
|
366
|
+
icon: Ie({ class: "icon" }),
|
|
367
|
+
withIcon: Ie({ class: "with-icon" }),
|
|
355
368
|
back: $t({ class: "with-icon back-button" }),
|
|
356
|
-
|
|
357
|
-
|
|
369
|
+
smartBack: It({ class: "with-icon back-button" }),
|
|
370
|
+
circleIcon: Tt
|
|
371
|
+
}, b = r((e, t) => (Te[e.variant] || Te.primary)(e, t)), fa = r((e, t) => b({ ...e, variant: "withIcon", icon: u.loading, animation: "animate-spin" }, t)), Mt = r((e, t) => {
|
|
358
372
|
const s = e.margin ?? "my-5 mx-5", n = e.padding ?? "p-4", a = e.border ?? "border-border";
|
|
359
373
|
return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), o({
|
|
360
374
|
...e,
|
|
361
375
|
// @ts-ignore
|
|
362
376
|
class: `rounded-lg ${a} bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${s} ${n} ${e.class || ""}`
|
|
363
377
|
}, t);
|
|
364
|
-
}),
|
|
378
|
+
}), Bt = r((e, t) => nt({
|
|
365
379
|
...e,
|
|
366
380
|
// @ts-ignore
|
|
367
381
|
class: ` font-medium -mt-4 -mx-1 px-2 py-2 ${e.class || ""}`
|
|
368
|
-
}, t)),
|
|
382
|
+
}, t)), ga = r((e, t) => {
|
|
369
383
|
const s = e.border === "full" ? "border rounded-md" : "border-t";
|
|
370
384
|
return at({
|
|
371
385
|
...e,
|
|
@@ -373,10 +387,10 @@ const da = r((e, t) => {
|
|
|
373
387
|
class: `p-6 ${s} ${e.class || ""}`
|
|
374
388
|
}, [
|
|
375
389
|
// @ts-ignore
|
|
376
|
-
e.legend &&
|
|
390
|
+
e.legend && Bt(e.legend),
|
|
377
391
|
o({ class: "flex flex-auto flex-col gap-y-6" }, t)
|
|
378
392
|
]);
|
|
379
|
-
}),
|
|
393
|
+
}), Pt = r((e, t) => {
|
|
380
394
|
const s = e.border === !0 ? "border-t" : "";
|
|
381
395
|
return o({
|
|
382
396
|
...e,
|
|
@@ -391,14 +405,14 @@ const da = r((e, t) => {
|
|
|
391
405
|
class: `flex flex-auto flex-col gap-y-1 ${e.labelProps?.class || ""}`
|
|
392
406
|
}, [
|
|
393
407
|
// @ts-ignore
|
|
394
|
-
|
|
408
|
+
Ee({ class: "text-base" }, e.label),
|
|
395
409
|
// @ts-ignore
|
|
396
410
|
e.description && k({ class: "text-sm text-muted-foreground" }, e.description)
|
|
397
411
|
]),
|
|
398
412
|
// Controls container: grows to fill remaining space, spacing between items
|
|
399
413
|
o({ class: "flex flex-col gap-y-4" }, t)
|
|
400
414
|
]);
|
|
401
|
-
}),
|
|
415
|
+
}), zt = "flex h-10 w-full px-3 py-2 text-sm", B = "rounded-md border border-border bg-input", I = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", D = "disabled:cursor-not-allowed disabled:opacity-50 [&:user-invalid]:border-destructive", A = "placeholder:text-muted-foreground", pe = `${zt} ${B} ${I} ${A} ${D}`, Ot = ({ id: e, checked: t, bind: s, required: n }) => ce({
|
|
402
416
|
id: e,
|
|
403
417
|
cache: "checkbox",
|
|
404
418
|
class: "absolute opacity-0 w-full h-full cursor-pointer pointer-events-none",
|
|
@@ -408,15 +422,15 @@ const da = r((e, t) => {
|
|
|
408
422
|
required: n,
|
|
409
423
|
checked: t,
|
|
410
424
|
bind: s
|
|
411
|
-
}),
|
|
425
|
+
}), Nt = () => g({ class: "absolute text-xs pointer-events-none" }, [
|
|
412
426
|
T(
|
|
413
427
|
"checked",
|
|
414
428
|
(e) => e ? Y({
|
|
415
429
|
class: "w-2 h-2 pointer-events-none",
|
|
416
|
-
html:
|
|
430
|
+
html: u.check
|
|
417
431
|
}) : null
|
|
418
432
|
)
|
|
419
|
-
]),
|
|
433
|
+
]), Rt = ({ id: e, bind: t, checked: s, required: n, clickHandler: a }) => o({
|
|
420
434
|
class: `relative flex items-center justify-center w-5 h-5 transition-colors duration-200 hover:border-accent-foreground
|
|
421
435
|
rounded-md border
|
|
422
436
|
${I}
|
|
@@ -436,13 +450,13 @@ const da = r((e, t) => {
|
|
|
436
450
|
tabIndex: 0,
|
|
437
451
|
click: a
|
|
438
452
|
}, [
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
]),
|
|
453
|
+
Ot({ bind: t, checked: s, id: e, required: n }),
|
|
454
|
+
Nt()
|
|
455
|
+
]), Ft = ({ id: e, label: t, clickHandler: s }) => V({
|
|
442
456
|
class: "text-base cursor-pointer",
|
|
443
457
|
htmlFor: e,
|
|
444
458
|
click: s
|
|
445
|
-
}, t),
|
|
459
|
+
}, t), Lt = M(
|
|
446
460
|
{
|
|
447
461
|
/**
|
|
448
462
|
* This will initialize the state of the checkbox.
|
|
@@ -481,7 +495,7 @@ const da = r((e, t) => {
|
|
|
481
495
|
render() {
|
|
482
496
|
const e = this.getId(), t = (s) => this.clickHandler(s);
|
|
483
497
|
return o({ class: `flex items-center gap-x-2 cursor-pointer ${this.class || ""}` }, [
|
|
484
|
-
|
|
498
|
+
Rt({
|
|
485
499
|
id: e,
|
|
486
500
|
// @ts-ignore
|
|
487
501
|
bind: this.bind,
|
|
@@ -493,22 +507,22 @@ const da = r((e, t) => {
|
|
|
493
507
|
clickHandler: t
|
|
494
508
|
}),
|
|
495
509
|
// @ts-ignore
|
|
496
|
-
this.label &&
|
|
510
|
+
this.label && Ft({ id: e, label: this.label, clickHandler: t })
|
|
497
511
|
]);
|
|
498
512
|
}
|
|
499
513
|
}
|
|
500
|
-
),
|
|
514
|
+
), jt = (e) => {
|
|
501
515
|
if (!e || e.length === 0) return "";
|
|
502
516
|
const s = e.replace(/\D/g, "").match(/^(\d{0,3})(\d{0,3})(\d{0,4})$/);
|
|
503
517
|
return s ? s[2] ? `(${s[1]}) ${s[2]}${s[3] ? "-" + s[3] : ""}` : s[1] || "" : e;
|
|
504
|
-
},
|
|
505
|
-
const t = e.target, s =
|
|
518
|
+
}, At = (e) => {
|
|
519
|
+
const t = e.target, s = jt(t.value);
|
|
506
520
|
s && (t.value = s);
|
|
507
521
|
}, N = r((e) => p({
|
|
508
522
|
...e,
|
|
509
523
|
// @ts-ignore
|
|
510
|
-
class: `${
|
|
511
|
-
})),
|
|
524
|
+
class: `${pe} ${e.class || ""}`.trim()
|
|
525
|
+
})), ma = r((e) => N({
|
|
512
526
|
...e,
|
|
513
527
|
type: "tel",
|
|
514
528
|
// @ts-ignore
|
|
@@ -518,8 +532,8 @@ const da = r((e, t) => {
|
|
|
518
532
|
placeholder: "(555) 555-5555",
|
|
519
533
|
// @ts-ignore
|
|
520
534
|
pattern: e.pattern || "\\(\\d{3}\\) \\d{3}-\\d{4}",
|
|
521
|
-
keyup:
|
|
522
|
-
})),
|
|
535
|
+
keyup: At
|
|
536
|
+
})), ba = r((e) => N({
|
|
523
537
|
...e,
|
|
524
538
|
type: "email",
|
|
525
539
|
// @ts-ignore
|
|
@@ -527,47 +541,47 @@ const da = r((e, t) => {
|
|
|
527
541
|
// @ts-ignore
|
|
528
542
|
label: e.label || "Email",
|
|
529
543
|
placeholder: "Email address"
|
|
530
|
-
})),
|
|
544
|
+
})), xa = r((e) => ot({
|
|
531
545
|
...e,
|
|
532
546
|
as: "textarea",
|
|
533
547
|
// @ts-ignore
|
|
534
|
-
class: `flex w-full h-24 px-3 py-2 text-sm ${B} ${I} ${
|
|
535
|
-
})),
|
|
548
|
+
class: `flex w-full h-24 px-3 py-2 text-sm ${B} ${I} ${A} ${D} ${e.class || ""}`.trim()
|
|
549
|
+
})), pa = (e = {}) => o({ class: "flex items-center gap-x-2" }, [
|
|
536
550
|
p({
|
|
537
551
|
...e,
|
|
538
552
|
type: "radio",
|
|
539
553
|
class: "cursor-pointer appearance-none h-4 w-4 border rounded-full checked:border-primary checked:bg-primary focus:ring focus:ring-primary".trim()
|
|
540
554
|
}),
|
|
541
555
|
e.label && V({ forHTML: e.value, class: "cursor-pointer" }, e.label)
|
|
542
|
-
]),
|
|
556
|
+
]), ya = r((e) => p({
|
|
543
557
|
...e,
|
|
544
558
|
type: "date",
|
|
545
559
|
// @ts-ignore
|
|
546
|
-
class: `${B} ${I} ${
|
|
547
|
-
})),
|
|
560
|
+
class: `${B} ${I} ${A} ${D} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
561
|
+
})), wa = r((e) => p({
|
|
548
562
|
...e,
|
|
549
563
|
type: "time",
|
|
550
564
|
// @ts-ignore
|
|
551
|
-
class: `${B} ${I} ${
|
|
552
|
-
})),
|
|
565
|
+
class: `${B} ${I} ${A} ${D} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
566
|
+
})), va = r((e) => p({
|
|
553
567
|
...e,
|
|
554
568
|
type: "datetime-local",
|
|
555
569
|
// @ts-ignore
|
|
556
|
-
class: `${B} ${I} ${
|
|
557
|
-
})),
|
|
570
|
+
class: `${B} ${I} ${A} ${D} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
571
|
+
})), ka = r((e) => p({
|
|
558
572
|
...e,
|
|
559
573
|
type: "month",
|
|
560
574
|
// @ts-ignore
|
|
561
|
-
class: `${B} ${I} ${
|
|
562
|
-
})),
|
|
575
|
+
class: `${B} ${I} ${A} ${D} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
576
|
+
})), Ca = r((e) => p({
|
|
563
577
|
...e,
|
|
564
578
|
type: "week",
|
|
565
579
|
// @ts-ignore
|
|
566
|
-
class: `${B} ${I} ${
|
|
567
|
-
})),
|
|
580
|
+
class: `${B} ${I} ${A} ${D} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
581
|
+
})), Sa = r((e) => N({
|
|
568
582
|
...e,
|
|
569
583
|
type: "number"
|
|
570
|
-
})),
|
|
584
|
+
})), $a = r((e) => N({
|
|
571
585
|
...e,
|
|
572
586
|
type: "password"
|
|
573
587
|
}));
|
|
@@ -575,13 +589,13 @@ r((e) => N({
|
|
|
575
589
|
...e,
|
|
576
590
|
type: "search"
|
|
577
591
|
}));
|
|
578
|
-
const
|
|
592
|
+
const Da = r((e) => N({
|
|
579
593
|
...e,
|
|
580
594
|
type: "url"
|
|
581
|
-
})),
|
|
595
|
+
})), Ia = r((e) => N({
|
|
582
596
|
...e,
|
|
583
597
|
type: "hidden"
|
|
584
|
-
})),
|
|
598
|
+
})), Ta = r((e) => p({
|
|
585
599
|
...e,
|
|
586
600
|
type: "color",
|
|
587
601
|
// @ts-ignore
|
|
@@ -592,12 +606,12 @@ r((e) => ce({
|
|
|
592
606
|
// @ts-ignore
|
|
593
607
|
class: `flex h-4 w-4 text-foreground ${B} ${I} ${D} ${e.class || ""}`.trim()
|
|
594
608
|
}));
|
|
595
|
-
const
|
|
609
|
+
const Ht = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", Ma = r((e) => p({
|
|
596
610
|
...e,
|
|
597
611
|
type: "file",
|
|
598
612
|
// @ts-ignore
|
|
599
|
-
class: `${
|
|
600
|
-
})),
|
|
613
|
+
class: `${pe} ${Ht} ${e.class || ""}`.trim()
|
|
614
|
+
})), Ba = O(
|
|
601
615
|
{
|
|
602
616
|
/**
|
|
603
617
|
* This will create the initial state of the RangeSlider.
|
|
@@ -669,15 +683,15 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
669
683
|
]);
|
|
670
684
|
}
|
|
671
685
|
}
|
|
672
|
-
),
|
|
686
|
+
), Pa = r((e) => ({
|
|
673
687
|
tag: "select",
|
|
674
688
|
onCreated(t) {
|
|
675
689
|
e.options && ft.setupSelectOptions(t, e.options);
|
|
676
690
|
},
|
|
677
691
|
...e,
|
|
678
692
|
// @ts-ignore
|
|
679
|
-
class: `${
|
|
680
|
-
})),
|
|
693
|
+
class: `${pe} ${e.class || ""}`.trim()
|
|
694
|
+
})), Et = r(({ src: e, alt: t, class: s, checkPath: n = !0 }) => !e || (s = s || "", n && e.indexOf(".") === -1 && e.indexOf("[[") === -1) ? null : de({
|
|
681
695
|
class: `absolute w-full h-full object-cover fadeIn ${s}`,
|
|
682
696
|
src: e,
|
|
683
697
|
alt: t,
|
|
@@ -686,7 +700,7 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
686
700
|
* If there's an error loading the image, hide it.
|
|
687
701
|
*/
|
|
688
702
|
error: (a) => a.target.style.visibility = "hidden"
|
|
689
|
-
})),
|
|
703
|
+
})), Ut = (e) => !e || isNaN(e) ? null : e, Me = (e, t) => {
|
|
690
704
|
const s = e, n = 16, a = 2 * Math.PI * n, l = s / 100 * a, i = `
|
|
691
705
|
<svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
|
|
692
706
|
<!-- Background Circle -->
|
|
@@ -729,20 +743,20 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
729
743
|
class: "circle-graph text-inherit",
|
|
730
744
|
html: i
|
|
731
745
|
});
|
|
732
|
-
},
|
|
733
|
-
const t = e.progress || 0, s = e.class || "", n =
|
|
746
|
+
}, za = r((e) => {
|
|
747
|
+
const t = e.progress || 0, s = e.class || "", n = Me(t, s);
|
|
734
748
|
return o({
|
|
735
749
|
class: "circle-graph-wrap",
|
|
736
750
|
onSet: [
|
|
737
751
|
// @ts-ignore
|
|
738
752
|
e.prop,
|
|
739
|
-
(a) => (a =
|
|
753
|
+
(a) => (a = Ut(a), a ? Me(a, s) : n)
|
|
740
754
|
]
|
|
741
755
|
}, [n]);
|
|
742
|
-
}),
|
|
756
|
+
}), Yt = () => W(({ state: e }) => o({
|
|
743
757
|
class: "absolute h-full rounded-full bg-primary transition-all duration-300",
|
|
744
758
|
style: ["width: [[progress]]%;", e]
|
|
745
|
-
})),
|
|
759
|
+
})), Oa = O(
|
|
746
760
|
{
|
|
747
761
|
/**
|
|
748
762
|
* This will render the progress bar component.
|
|
@@ -751,7 +765,7 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
751
765
|
*/
|
|
752
766
|
render() {
|
|
753
767
|
return o({ class: "relative w-full h-4 rounded-full bg-muted" }, [
|
|
754
|
-
|
|
768
|
+
Yt()
|
|
755
769
|
]);
|
|
756
770
|
},
|
|
757
771
|
/**
|
|
@@ -794,7 +808,7 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
794
808
|
e < 0 && (e = 0), e > 100 && (e = 100), this.state.progress = e;
|
|
795
809
|
}
|
|
796
810
|
}
|
|
797
|
-
),
|
|
811
|
+
), Na = r((e = {}) => {
|
|
798
812
|
const {
|
|
799
813
|
class: t = "",
|
|
800
814
|
background: s = !0,
|
|
@@ -803,7 +817,7 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
803
817
|
blurClass: l = "backdrop-blur",
|
|
804
818
|
zIndexClass: i = "z-9999",
|
|
805
819
|
style: c = ""
|
|
806
|
-
} = e,
|
|
820
|
+
} = e, h = [
|
|
807
821
|
"sticky bottom-0 left-0 right-0 w-full",
|
|
808
822
|
i,
|
|
809
823
|
s ? a : "",
|
|
@@ -811,11 +825,11 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
811
825
|
t
|
|
812
826
|
].filter(Boolean).join(" "), m = `height: env(safe-area-inset-bottom, 0px);${c ? ` ${c}` : ""}`;
|
|
813
827
|
return o({
|
|
814
|
-
class:
|
|
828
|
+
class: h,
|
|
815
829
|
style: m,
|
|
816
830
|
"aria-hidden": "true"
|
|
817
831
|
});
|
|
818
|
-
}),
|
|
832
|
+
}), Ra = r((e = {}) => {
|
|
819
833
|
const {
|
|
820
834
|
class: t = "",
|
|
821
835
|
background: s = !0,
|
|
@@ -824,7 +838,7 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
824
838
|
blurClass: l = "backdrop-blur",
|
|
825
839
|
zIndexClass: i = "z-9999",
|
|
826
840
|
style: c = ""
|
|
827
|
-
} = e,
|
|
841
|
+
} = e, h = [
|
|
828
842
|
"fixed top-0 left-0 right-0 w-full",
|
|
829
843
|
i,
|
|
830
844
|
s ? a : "",
|
|
@@ -832,11 +846,11 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
832
846
|
t
|
|
833
847
|
].filter(Boolean).join(" "), m = `height: env(safe-area-inset-top, 0px);${c ? ` ${c}` : ""}`;
|
|
834
848
|
return o({
|
|
835
|
-
class:
|
|
849
|
+
class: h,
|
|
836
850
|
style: m,
|
|
837
851
|
"aria-hidden": "true"
|
|
838
852
|
});
|
|
839
|
-
}),
|
|
853
|
+
}), Be = {
|
|
840
854
|
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
841
855
|
"top-right": "bottom-full left-full transform -translate-x-1 mb-2",
|
|
842
856
|
"top-left": "bottom-full right-full transform translate-x-1 mb-2",
|
|
@@ -845,19 +859,19 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
845
859
|
"bottom-left": "top-full right-full transform translate-x-1 mt-2",
|
|
846
860
|
left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
|
|
847
861
|
right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
|
|
848
|
-
},
|
|
849
|
-
const n =
|
|
862
|
+
}, Vt = (e) => Be[String(e)] || Be.top, Fa = r(({ position: e = "top", content: t }, s) => {
|
|
863
|
+
const n = Vt(e);
|
|
850
864
|
return Array.isArray(s) === !1 && (s = [s]), o({ class: "relative group inline-block" }, [
|
|
851
865
|
...s,
|
|
852
866
|
// Tooltip box
|
|
853
|
-
|
|
867
|
+
g({
|
|
854
868
|
class: `
|
|
855
869
|
absolute z-20 px-2 py-1 border text-sm bg-background rounded shadow-md opacity-0 whitespace-nowrap
|
|
856
870
|
group-hover:opacity-100 transition-opacity duration-200 ${n} pointer-events-none
|
|
857
871
|
`
|
|
858
872
|
}, t)
|
|
859
873
|
]);
|
|
860
|
-
}),
|
|
874
|
+
}), Pe = {
|
|
861
875
|
info: {
|
|
862
876
|
borderColor: "border-blue-500",
|
|
863
877
|
bgColor: "bg-muted/10",
|
|
@@ -883,23 +897,23 @@ const Lt = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
883
897
|
bgColor: "bg-muted/10",
|
|
884
898
|
iconColor: "text-muted-foreground"
|
|
885
899
|
}
|
|
886
|
-
},
|
|
887
|
-
|
|
888
|
-
]),
|
|
889
|
-
const { borderColor: a, bgColor: l, iconColor: i } =
|
|
900
|
+
}, Wt = (e, t) => o({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
901
|
+
x({ size: "sm" }, e)
|
|
902
|
+
]), qt = (e) => lt({ class: "font-semibold" }, e), Gt = (e) => k({ class: "text-sm text-muted-foreground" }, e), La = r(({ title: e, description: t, icon: s, type: n = "default" }) => {
|
|
903
|
+
const { borderColor: a, bgColor: l, iconColor: i } = Pe[n] || Pe.default;
|
|
890
904
|
return o({ class: `flex items-start p-4 border rounded-lg ${l} ${a}` }, [
|
|
891
905
|
// Icon and content
|
|
892
|
-
s &&
|
|
906
|
+
s && Wt(s, i),
|
|
893
907
|
o({ class: "flex flex-col" }, [
|
|
894
|
-
|
|
895
|
-
|
|
908
|
+
qt(e),
|
|
909
|
+
Gt(t)
|
|
896
910
|
])
|
|
897
911
|
]);
|
|
898
|
-
}),
|
|
912
|
+
}), _t = (e, t) => {
|
|
899
913
|
const s = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, n = t.getBoundingClientRect(), a = 10, l = globalThis.scrollX, i = globalThis.scrollY;
|
|
900
|
-
let c = s.left + l,
|
|
914
|
+
let c = s.left + l, h = s.bottom + i;
|
|
901
915
|
const m = globalThis.innerHeight - s.bottom, v = s.top;
|
|
902
|
-
return c + n.width > globalThis.innerWidth && (c = globalThis.innerWidth - n.width - a), m < n.height && v > m ?
|
|
916
|
+
return c + n.width > globalThis.innerWidth && (c = globalThis.innerWidth - n.width - a), m < n.height && v > m ? h = s.top + i - n.height - a : m < n.height && (h = s.bottom + i - (n.height - m) - a), { x: c, y: h };
|
|
903
917
|
};
|
|
904
918
|
class te extends C {
|
|
905
919
|
/**
|
|
@@ -978,7 +992,7 @@ class te extends C {
|
|
|
978
992
|
* @returns {void}
|
|
979
993
|
*/
|
|
980
994
|
updatePosition() {
|
|
981
|
-
const t = this.button ?? null, s = this.panel, n =
|
|
995
|
+
const t = this.button ?? null, s = this.panel, n = _t(t, s);
|
|
982
996
|
this.data.position = n;
|
|
983
997
|
}
|
|
984
998
|
/**
|
|
@@ -1030,28 +1044,28 @@ class te extends C {
|
|
|
1030
1044
|
this?.panel?.hidePopover();
|
|
1031
1045
|
}
|
|
1032
1046
|
}
|
|
1033
|
-
const
|
|
1047
|
+
const Kt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), Qt = r((e, t) => V({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), Jt = r((e, t) => k({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Zt = r((e, t) => k({ ...e, class: "text-sm text-destructive" }, t)), ja = r((e, t = []) => Mt({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
|
|
1034
1048
|
// @ts-ignore
|
|
1035
1049
|
e.title && J({ class: "text-lg font-semibold py-4 px-6" }, e.title),
|
|
1036
1050
|
// @ts-ignore
|
|
1037
1051
|
e.description && k({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
|
|
1038
1052
|
...t
|
|
1039
|
-
])),
|
|
1053
|
+
])), Aa = r((e, t = []) => (
|
|
1040
1054
|
// @ts-ignore
|
|
1041
|
-
|
|
1055
|
+
Pt({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
|
|
1042
1056
|
o({ class: "flex flex-col gap-y-6" }, t)
|
|
1043
1057
|
])
|
|
1044
|
-
)),
|
|
1058
|
+
)), Ha = r((e, t = []) => {
|
|
1045
1059
|
const s = e.border ? "border-t" : "";
|
|
1046
1060
|
return o({ ...e, class: `flex flex-col pb-4 px-6 gap-y-4 ${s} ${e.class || ""}` }, t);
|
|
1047
|
-
}),
|
|
1061
|
+
}), Xt = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", qe = (e, t, s) => e.map((n) => !n || (n.children && n.children.length > 0 && (n.children = qe(n.children, t, s)), !n.required) ? n : Xt(n) ? {
|
|
1048
1062
|
...n,
|
|
1049
1063
|
aria: {
|
|
1050
1064
|
invalid: ["hasError"]
|
|
1051
1065
|
},
|
|
1052
1066
|
invalid: s,
|
|
1053
1067
|
input: t
|
|
1054
|
-
} : n),
|
|
1068
|
+
} : n), es = r((e, t) => {
|
|
1055
1069
|
const a = qe(t, (l) => {
|
|
1056
1070
|
l.target.checkValidity() && e.setError(null);
|
|
1057
1071
|
}, (l) => {
|
|
@@ -1061,7 +1075,7 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1061
1075
|
...e,
|
|
1062
1076
|
class: "w-full"
|
|
1063
1077
|
}, a);
|
|
1064
|
-
}),
|
|
1078
|
+
}), Ea = O(
|
|
1065
1079
|
{
|
|
1066
1080
|
/**
|
|
1067
1081
|
* The initial state of the FormField.
|
|
@@ -1086,47 +1100,47 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1086
1100
|
this.state.error = l, this.state.hasError = !!l;
|
|
1087
1101
|
};
|
|
1088
1102
|
return o({ class: "flex flex-auto gap-y-4" }, [
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1103
|
+
Kt([
|
|
1104
|
+
Qt({ htmlFor: t }, s),
|
|
1105
|
+
es({
|
|
1092
1106
|
id: t,
|
|
1093
1107
|
name: e,
|
|
1094
1108
|
value: this.state.value,
|
|
1095
1109
|
setError: a
|
|
1096
1110
|
}, this.children),
|
|
1097
|
-
n &&
|
|
1098
|
-
o({ onState: ["error", (l) => l &&
|
|
1111
|
+
n && Jt({ id: this.getId("description") }, n),
|
|
1112
|
+
o({ onState: ["error", (l) => l && Zt(l)] })
|
|
1099
1113
|
])
|
|
1100
1114
|
]);
|
|
1101
1115
|
}
|
|
1102
1116
|
}
|
|
1103
|
-
),
|
|
1117
|
+
), ts = (e, t, s = null) => {
|
|
1104
1118
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
1105
1119
|
}, Ge = r(
|
|
1106
1120
|
(e, t) => (
|
|
1107
1121
|
// @ts-ignore
|
|
1108
|
-
rt({ ...e, submit: (s, n) =>
|
|
1122
|
+
rt({ ...e, submit: (s, n) => ts(s, n, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
1109
1123
|
)
|
|
1110
|
-
),
|
|
1124
|
+
), Ua = r((e, t) => (
|
|
1111
1125
|
// @ts-ignore
|
|
1112
1126
|
o({ ...e, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)
|
|
1113
|
-
)),
|
|
1127
|
+
)), Ya = r((e, t = []) => o({ class: "flex flex-col gap-y-3 py-4" }, [
|
|
1114
1128
|
// @ts-ignore
|
|
1115
1129
|
e.title && J({ class: "font-semibold" }, e.title),
|
|
1116
1130
|
...t
|
|
1117
|
-
])),
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
]),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
]),
|
|
1131
|
+
])), Va = (e, t) => o({ class: "flex justify-between" }, [
|
|
1132
|
+
g({ class: "text-muted-foreground" }, e),
|
|
1133
|
+
g(t)
|
|
1134
|
+
]), Wa = (e, t) => o({ class: "flex" }, [
|
|
1135
|
+
g({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
|
|
1136
|
+
g(t)
|
|
1137
|
+
]), ss = r(({ title: e, description: t, back: s, icon: n, options: a = [] }) => Z({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
|
|
1124
1138
|
/**
|
|
1125
1139
|
* Back Button (Mobile Only)
|
|
1126
1140
|
*/
|
|
1127
|
-
s &&
|
|
1141
|
+
s && b({
|
|
1128
1142
|
variant: "icon",
|
|
1129
|
-
icon:
|
|
1143
|
+
icon: u.arrows.left,
|
|
1130
1144
|
class: "mr-2 p-0 flex sm:hidden",
|
|
1131
1145
|
click: (l, i) => i.close()
|
|
1132
1146
|
}),
|
|
@@ -1134,7 +1148,7 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1134
1148
|
* Icon Container
|
|
1135
1149
|
*/
|
|
1136
1150
|
n && o({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
1137
|
-
|
|
1151
|
+
x({ size: "md" }, n)
|
|
1138
1152
|
]),
|
|
1139
1153
|
o({ class: "flex flex-auto flex-row justify-between ml-2 gap-2 min-w-0" }, [
|
|
1140
1154
|
o({ class: "flex flex-auto flex-col min-w-0" }, [
|
|
@@ -1143,7 +1157,7 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1143
1157
|
]),
|
|
1144
1158
|
o({ class: "flex flex-none items-center gap-2" }, a)
|
|
1145
1159
|
])
|
|
1146
|
-
])),
|
|
1160
|
+
])), qa = r((e, t) => {
|
|
1147
1161
|
const s = e.class?.includes("drawer");
|
|
1148
1162
|
return o({
|
|
1149
1163
|
popover: "manual",
|
|
@@ -1161,13 +1175,13 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1161
1175
|
// @ts-ignore
|
|
1162
1176
|
...e.gestureHandlers
|
|
1163
1177
|
}, [
|
|
1164
|
-
|
|
1178
|
+
ss(e),
|
|
1165
1179
|
o({ class: "modal-body flex grow flex-col py-0 px-6 z-0", cache: "modalBody" }, t),
|
|
1166
1180
|
// @ts-ignore
|
|
1167
1181
|
!e.hideFooter && ue({ class: "modal-footer sticky bottom-0 bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
1168
1182
|
])
|
|
1169
1183
|
]);
|
|
1170
|
-
}),
|
|
1184
|
+
}), ze = {
|
|
1171
1185
|
info: {
|
|
1172
1186
|
bgColor: "bg-muted/10",
|
|
1173
1187
|
borderColor: "border-blue-500",
|
|
@@ -1193,22 +1207,22 @@ const Gt = r((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1193
1207
|
borderColor: "border",
|
|
1194
1208
|
iconColor: "text-muted-foreground"
|
|
1195
1209
|
}
|
|
1196
|
-
},
|
|
1210
|
+
}, ns = (e) => Z({ class: "flex justify-center" }, [
|
|
1197
1211
|
he({ class: "text-lg font-bold mb-0" }, e)
|
|
1198
|
-
]),
|
|
1212
|
+
]), as = r(({ href: e, class: t }, s) => Ue({
|
|
1199
1213
|
class: `bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
1200
1214
|
href: e,
|
|
1201
1215
|
animateIn: "pullRightIn",
|
|
1202
1216
|
animateOut: "pullRight",
|
|
1203
1217
|
role: "alert"
|
|
1204
|
-
}, s)),
|
|
1218
|
+
}, s)), os = r(({ close: e, class: t }, s) => o({
|
|
1205
1219
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
1206
1220
|
click: () => e(),
|
|
1207
1221
|
animateIn: "pullRightIn",
|
|
1208
1222
|
animateOut: "pullRight",
|
|
1209
1223
|
role: "alert"
|
|
1210
1224
|
}, s));
|
|
1211
|
-
class
|
|
1225
|
+
class Ga extends C {
|
|
1212
1226
|
/**
|
|
1213
1227
|
* This will declare the props for the compiler.
|
|
1214
1228
|
*
|
|
@@ -1232,10 +1246,10 @@ class Wa extends C {
|
|
|
1232
1246
|
*/
|
|
1233
1247
|
render() {
|
|
1234
1248
|
const { bgColor: t, borderColor: s, iconColor: n } = this.getTypeStyles(), a = this.href || null, l = this.getChildren(n);
|
|
1235
|
-
return a ?
|
|
1249
|
+
return a ? as({
|
|
1236
1250
|
href: a,
|
|
1237
1251
|
class: `${t} ${s}`
|
|
1238
|
-
}, l) :
|
|
1252
|
+
}, l) : os({
|
|
1239
1253
|
close: this.close.bind(this),
|
|
1240
1254
|
class: `${t} ${s}`
|
|
1241
1255
|
}, l);
|
|
@@ -1256,7 +1270,7 @@ class Wa extends C {
|
|
|
1256
1270
|
*/
|
|
1257
1271
|
getTypeStyles() {
|
|
1258
1272
|
const t = this.type || "default";
|
|
1259
|
-
return
|
|
1273
|
+
return ze[t] || ze.default;
|
|
1260
1274
|
}
|
|
1261
1275
|
/**
|
|
1262
1276
|
* This will get the buttons for the notification.
|
|
@@ -1266,8 +1280,8 @@ class Wa extends C {
|
|
|
1266
1280
|
getButtons() {
|
|
1267
1281
|
return [
|
|
1268
1282
|
o({ class: "flex flex-row mt-6 gap-2" }, [
|
|
1269
|
-
this.secondary &&
|
|
1270
|
-
this.primary &&
|
|
1283
|
+
this.secondary && b({ variant: "outline", click: () => this.secondaryAction && this.secondaryAction() }, this.secondary),
|
|
1284
|
+
this.primary && b({ click: () => this.primaryAction && this.primaryAction() }, this.primary)
|
|
1271
1285
|
])
|
|
1272
1286
|
];
|
|
1273
1287
|
}
|
|
@@ -1281,20 +1295,20 @@ class Wa extends C {
|
|
|
1281
1295
|
return [
|
|
1282
1296
|
o({ class: "flex items-start" }, [
|
|
1283
1297
|
this.icon && o({ class: `mr-4 ${t}` }, [
|
|
1284
|
-
|
|
1298
|
+
x({ size: "md" }, this.icon)
|
|
1285
1299
|
]),
|
|
1286
1300
|
o({ class: "flex flex-auto flex-col" }, [
|
|
1287
1301
|
o({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
1288
|
-
this.title &&
|
|
1302
|
+
this.title && ns(this.title)
|
|
1289
1303
|
]),
|
|
1290
1304
|
k({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
1291
1305
|
(this.primary || this.secondary) && ue({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
1292
1306
|
])
|
|
1293
1307
|
]),
|
|
1294
|
-
|
|
1308
|
+
b({
|
|
1295
1309
|
class: "absolute top-[12px] right-[12px]",
|
|
1296
1310
|
variant: "icon",
|
|
1297
|
-
icon:
|
|
1311
|
+
icon: u.x,
|
|
1298
1312
|
click: this.close.bind(this)
|
|
1299
1313
|
})
|
|
1300
1314
|
];
|
|
@@ -1309,25 +1323,25 @@ class Wa extends C {
|
|
|
1309
1323
|
t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
|
|
1310
1324
|
}
|
|
1311
1325
|
}
|
|
1312
|
-
const
|
|
1326
|
+
const Oe = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w({
|
|
1313
1327
|
class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
|
|
1314
1328
|
onState: ["method", { active: e }],
|
|
1315
1329
|
dataSet: ["method", ["state", e, "active"]],
|
|
1316
1330
|
click: (n, { state: a }) => {
|
|
1317
|
-
a.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"),
|
|
1331
|
+
a.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), ls(e);
|
|
1318
1332
|
}
|
|
1319
1333
|
}, [
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
])),
|
|
1334
|
+
x({}, s),
|
|
1335
|
+
g(t)
|
|
1336
|
+
])), ls = (e) => {
|
|
1323
1337
|
const t = document.documentElement;
|
|
1324
|
-
if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"),
|
|
1338
|
+
if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), Oe && !Oe("(prefers-color-scheme: " + e + ")").matches) {
|
|
1325
1339
|
t.classList.add(e);
|
|
1326
1340
|
return;
|
|
1327
1341
|
}
|
|
1328
1342
|
const s = e === "light" ? "dark" : "light";
|
|
1329
1343
|
t.classList.remove(s);
|
|
1330
|
-
},
|
|
1344
|
+
}, _a = M(
|
|
1331
1345
|
{
|
|
1332
1346
|
/**
|
|
1333
1347
|
* This will render the component.
|
|
@@ -1337,9 +1351,9 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1337
1351
|
render() {
|
|
1338
1352
|
return o({ class: "flex flex-auto flex-col" }, [
|
|
1339
1353
|
o({ class: "grid grid-cols-3 gap-4" }, [
|
|
1340
|
-
ae({ label: "System", value: "system", icon:
|
|
1341
|
-
ae({ label: "Light", value: "light", icon:
|
|
1342
|
-
ae({ label: "Dark", value: "dark", icon:
|
|
1354
|
+
ae({ label: "System", value: "system", icon: u.adjustments.horizontal }),
|
|
1355
|
+
ae({ label: "Light", value: "light", icon: u.sun }),
|
|
1356
|
+
ae({ label: "Dark", value: "dark", icon: u.moon })
|
|
1343
1357
|
])
|
|
1344
1358
|
]);
|
|
1345
1359
|
},
|
|
@@ -1354,7 +1368,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1354
1368
|
};
|
|
1355
1369
|
}
|
|
1356
1370
|
}
|
|
1357
|
-
),
|
|
1371
|
+
), Ka = O(
|
|
1358
1372
|
{
|
|
1359
1373
|
/**
|
|
1360
1374
|
* The initial state of the Toggle.
|
|
@@ -1399,20 +1413,20 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1399
1413
|
bind: this.bind,
|
|
1400
1414
|
required: this.required
|
|
1401
1415
|
}),
|
|
1402
|
-
|
|
1416
|
+
g({
|
|
1403
1417
|
class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
|
|
1404
1418
|
onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
|
|
1405
1419
|
})
|
|
1406
1420
|
]);
|
|
1407
1421
|
}
|
|
1408
1422
|
}
|
|
1409
|
-
),
|
|
1423
|
+
), rs = r(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : Et({
|
|
1410
1424
|
src: e,
|
|
1411
1425
|
alt: t,
|
|
1412
1426
|
class: "rounded-full"
|
|
1413
|
-
})),
|
|
1427
|
+
})), is = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), _e = (e) => !e || e.length < 2 ? e : is(e), cs = (e) => g([e, (t, s) => {
|
|
1414
1428
|
s.textContent = _e(t);
|
|
1415
|
-
}]),
|
|
1429
|
+
}]), Ne = {
|
|
1416
1430
|
xs: "h-6 w-6",
|
|
1417
1431
|
sm: "h-8 w-8",
|
|
1418
1432
|
md: "h-12 w-12",
|
|
@@ -1422,7 +1436,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1422
1436
|
"3xl": "h-48 w-48",
|
|
1423
1437
|
"4xl": "h-64 w-64",
|
|
1424
1438
|
default: "h-12 w-12"
|
|
1425
|
-
},
|
|
1439
|
+
}, Re = {
|
|
1426
1440
|
xs: "text-[7px]",
|
|
1427
1441
|
sm: "text-xs",
|
|
1428
1442
|
md: "text-base",
|
|
@@ -1432,8 +1446,8 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1432
1446
|
"3xl": "text-4xl",
|
|
1433
1447
|
"4xl": "text-5xl",
|
|
1434
1448
|
default: "text-base"
|
|
1435
|
-
},
|
|
1436
|
-
const n = _e(String(e)), a =
|
|
1449
|
+
}, ds = (e) => Ne[e] || Ne.default, us = (e) => Re[e] || Re.default, hs = (e, t = null, s = "md") => {
|
|
1450
|
+
const n = _e(String(e)), a = us(s);
|
|
1437
1451
|
return o(
|
|
1438
1452
|
{
|
|
1439
1453
|
class: `
|
|
@@ -1443,21 +1457,21 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1443
1457
|
`
|
|
1444
1458
|
},
|
|
1445
1459
|
[
|
|
1446
|
-
t ?
|
|
1460
|
+
t ? cs(t) : g({ class: "uppercase" }, n)
|
|
1447
1461
|
]
|
|
1448
1462
|
);
|
|
1449
|
-
},
|
|
1450
|
-
const l =
|
|
1463
|
+
}, fs = r(({ src: e, alt: t, fallbackText: s, watcherFallback: n, size: a }) => {
|
|
1464
|
+
const l = ds(a);
|
|
1451
1465
|
return o(
|
|
1452
1466
|
{
|
|
1453
1467
|
class: `relative flex items-center justify-center ${l}`
|
|
1454
1468
|
},
|
|
1455
1469
|
[
|
|
1456
|
-
|
|
1457
|
-
|
|
1470
|
+
rs({ src: e, alt: t }),
|
|
1471
|
+
hs(s, n, a)
|
|
1458
1472
|
]
|
|
1459
1473
|
);
|
|
1460
|
-
}),
|
|
1474
|
+
}), gs = (e) => e.indexOf(".") === -1 && e.indexOf("[[") === -1 && e.indexOf("blob:") === -1, Qa = M(
|
|
1461
1475
|
{
|
|
1462
1476
|
/**
|
|
1463
1477
|
* Get the initial state for the component.
|
|
@@ -1477,7 +1491,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1477
1491
|
*/
|
|
1478
1492
|
openFileBrowse() {
|
|
1479
1493
|
const e = this.input;
|
|
1480
|
-
e && (e.value = "",
|
|
1494
|
+
e && (e.value = "", j.trigger("click", e));
|
|
1481
1495
|
},
|
|
1482
1496
|
/**
|
|
1483
1497
|
* Get the URL for the uploaded file.
|
|
@@ -1513,11 +1527,11 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1513
1527
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
1514
1528
|
}
|
|
1515
1529
|
}, [
|
|
1516
|
-
T("loaded", (s) => s === !1 ||
|
|
1530
|
+
T("loaded", (s) => s === !1 || gs(this.src) ? V({
|
|
1517
1531
|
htmlFor: e,
|
|
1518
1532
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1519
1533
|
}, [
|
|
1520
|
-
ie(
|
|
1534
|
+
ie(u.upload),
|
|
1521
1535
|
o("Upload Image")
|
|
1522
1536
|
]) : de({
|
|
1523
1537
|
// @ts-ignore
|
|
@@ -1528,7 +1542,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1528
1542
|
]);
|
|
1529
1543
|
}
|
|
1530
1544
|
}
|
|
1531
|
-
),
|
|
1545
|
+
), Ja = M(
|
|
1532
1546
|
{
|
|
1533
1547
|
/**
|
|
1534
1548
|
* Get the initial state for the component.
|
|
@@ -1548,7 +1562,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1548
1562
|
*/
|
|
1549
1563
|
openFileBrowse() {
|
|
1550
1564
|
const e = this.input;
|
|
1551
|
-
e && (e.value = "",
|
|
1565
|
+
e && (e.value = "", j.trigger("click", e));
|
|
1552
1566
|
},
|
|
1553
1567
|
/**
|
|
1554
1568
|
* Get the URL for the uploaded file.
|
|
@@ -1594,7 +1608,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1594
1608
|
htmlFor: e,
|
|
1595
1609
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1596
1610
|
}, [
|
|
1597
|
-
|
|
1611
|
+
x({}, u.upload),
|
|
1598
1612
|
o("Upload logo")
|
|
1599
1613
|
])
|
|
1600
1614
|
)
|
|
@@ -1610,22 +1624,22 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1610
1624
|
this.input = null;
|
|
1611
1625
|
}
|
|
1612
1626
|
}
|
|
1613
|
-
),
|
|
1627
|
+
), ms = (e, t) => Ue(
|
|
1614
1628
|
{
|
|
1615
1629
|
href: e,
|
|
1616
1630
|
"aria-current": t === "Breadcrumb" && "page",
|
|
1617
1631
|
// Only set aria-current on the last item
|
|
1618
1632
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
1619
1633
|
},
|
|
1620
|
-
[
|
|
1621
|
-
),
|
|
1634
|
+
[g(t)]
|
|
1635
|
+
), bs = () => x({
|
|
1622
1636
|
class: "mx-3 text-muted-foreground",
|
|
1623
1637
|
"aria-hidden": !0,
|
|
1624
1638
|
size: "xs"
|
|
1625
|
-
},
|
|
1626
|
-
e.href ?
|
|
1627
|
-
e.separator &&
|
|
1628
|
-
]),
|
|
1639
|
+
}, u.chevron.single.right), xs = (e) => o({ class: "flex items-center" }, [
|
|
1640
|
+
e.href ? ms(e.href, e.label) : g(e.label),
|
|
1641
|
+
e.separator && bs()
|
|
1642
|
+
]), Za = M(
|
|
1629
1643
|
{
|
|
1630
1644
|
/**
|
|
1631
1645
|
* Set initial data
|
|
@@ -1654,7 +1668,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1654
1668
|
o({
|
|
1655
1669
|
role: "list",
|
|
1656
1670
|
class: "flex items-center",
|
|
1657
|
-
for: ["items", (t, s) =>
|
|
1671
|
+
for: ["items", (t, s) => xs({
|
|
1658
1672
|
href: t.href,
|
|
1659
1673
|
label: t.label,
|
|
1660
1674
|
separator: s < e
|
|
@@ -1664,7 +1678,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1664
1678
|
);
|
|
1665
1679
|
}
|
|
1666
1680
|
}
|
|
1667
|
-
),
|
|
1681
|
+
), Fe = {
|
|
1668
1682
|
xs: "h-1 w-1",
|
|
1669
1683
|
sm: "h-2 w-2",
|
|
1670
1684
|
md: "h-4 w-4",
|
|
@@ -1673,8 +1687,8 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1673
1687
|
"2xl": "h-16 w-16",
|
|
1674
1688
|
"3xl": "h-24 w-24",
|
|
1675
1689
|
default: "h-4 w-4"
|
|
1676
|
-
},
|
|
1677
|
-
|
|
1690
|
+
}, ps = (e) => Fe[e] || Fe.default, ys = ({ index: e, size: t }) => o({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
|
|
1691
|
+
g({
|
|
1678
1692
|
class: "block w-full h-full rounded-full transition-colors",
|
|
1679
1693
|
onSet: ["activeIndex", {
|
|
1680
1694
|
"bg-primary": e,
|
|
@@ -1684,10 +1698,10 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1684
1698
|
n.activeIndex = e, a && a(e);
|
|
1685
1699
|
}
|
|
1686
1700
|
})
|
|
1687
|
-
]),
|
|
1701
|
+
]), ws = (e, t) => Array.from({ length: e }, (s, n) => ys({
|
|
1688
1702
|
index: n,
|
|
1689
1703
|
size: t
|
|
1690
|
-
})),
|
|
1704
|
+
})), Xa = M(
|
|
1691
1705
|
{
|
|
1692
1706
|
/**
|
|
1693
1707
|
* Defines component data (props).
|
|
@@ -1709,7 +1723,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1709
1723
|
* @returns {object}
|
|
1710
1724
|
*/
|
|
1711
1725
|
render() {
|
|
1712
|
-
const e = this.gap || "gap-2", t =
|
|
1726
|
+
const e = this.gap || "gap-2", t = ps(this.size || "sm"), s = ws(this.data.count, t);
|
|
1713
1727
|
return o(
|
|
1714
1728
|
{ class: "flex justify-center items-center py-2" },
|
|
1715
1729
|
[
|
|
@@ -1718,26 +1732,26 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1718
1732
|
);
|
|
1719
1733
|
}
|
|
1720
1734
|
}
|
|
1721
|
-
),
|
|
1735
|
+
), vs = ({ toggleDropdown: e }) => w(
|
|
1722
1736
|
{
|
|
1723
1737
|
cache: "button",
|
|
1724
1738
|
class: "relative z-2 inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border bg-input hover:bg-muted h-10 px-4 py-2 justify-between",
|
|
1725
1739
|
click: e
|
|
1726
1740
|
},
|
|
1727
1741
|
[
|
|
1728
|
-
|
|
1729
|
-
|
|
1742
|
+
g({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
1743
|
+
x({ size: "sm" }, u.chevron.upDown)
|
|
1730
1744
|
]
|
|
1731
|
-
),
|
|
1745
|
+
), ks = (e, t, s) => ge({
|
|
1732
1746
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
1733
1747
|
click: () => t(e),
|
|
1734
1748
|
onState: [s, "selectedValue", { "bg-secondary": e.value }]
|
|
1735
1749
|
}, [
|
|
1736
|
-
e.icon &&
|
|
1737
|
-
|
|
1738
|
-
]),
|
|
1739
|
-
X({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) =>
|
|
1740
|
-
]),
|
|
1750
|
+
e.icon && g({ class: "mr-2 flex items-baseline" }, [x({ size: "xs" }, e.icon)]),
|
|
1751
|
+
g({ class: "text-base font-normal" }, e.label)
|
|
1752
|
+
]), Cs = (e, t) => o({ class: "w-full border rounded-md" }, [
|
|
1753
|
+
X({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => ks(s, e, t)] })
|
|
1754
|
+
]), Ss = ({ onSelect: e, state: t }) => o({ class: "flex flex-auto flex-col" }, [
|
|
1741
1755
|
T(
|
|
1742
1756
|
"open",
|
|
1743
1757
|
(s, n, a) => s ? new te({
|
|
@@ -1745,10 +1759,10 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1745
1759
|
parent: a,
|
|
1746
1760
|
button: a.button
|
|
1747
1761
|
}, [
|
|
1748
|
-
|
|
1762
|
+
Cs(e, t)
|
|
1749
1763
|
]) : null
|
|
1750
1764
|
)
|
|
1751
|
-
]),
|
|
1765
|
+
]), eo = M(
|
|
1752
1766
|
{
|
|
1753
1767
|
/**
|
|
1754
1768
|
* This will set up the data.
|
|
@@ -1829,8 +1843,8 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1829
1843
|
const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
|
|
1830
1844
|
return o({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
|
|
1831
1845
|
// @ts-ignore
|
|
1832
|
-
|
|
1833
|
-
|
|
1846
|
+
vs({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
1847
|
+
Ss({
|
|
1834
1848
|
// @ts-ignore
|
|
1835
1849
|
state: this.state,
|
|
1836
1850
|
// @ts-ignore
|
|
@@ -1850,21 +1864,21 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1850
1864
|
]);
|
|
1851
1865
|
}
|
|
1852
1866
|
}
|
|
1853
|
-
), Ke = ({ icon: e, click: t, ariaLabel: s }) =>
|
|
1867
|
+
), Ke = ({ icon: e, click: t, ariaLabel: s }) => b({
|
|
1854
1868
|
variant: "icon",
|
|
1855
1869
|
class: "flex flex-none",
|
|
1856
1870
|
click: t,
|
|
1857
1871
|
icon: e,
|
|
1858
1872
|
"aria-label": s
|
|
1859
|
-
}),
|
|
1860
|
-
icon:
|
|
1873
|
+
}), $s = ({ click: e }) => Ke({
|
|
1874
|
+
icon: u.circleMinus,
|
|
1861
1875
|
click: e,
|
|
1862
1876
|
ariaLabel: "Decrement"
|
|
1863
|
-
}),
|
|
1864
|
-
icon:
|
|
1877
|
+
}), Ds = ({ click: e }) => Ke({
|
|
1878
|
+
icon: u.circlePlus,
|
|
1865
1879
|
click: e,
|
|
1866
1880
|
ariaLabel: "Increment"
|
|
1867
|
-
}),
|
|
1881
|
+
}), Is = ({ bind: e, min: t, max: s, readonly: n = !1 }) => W(({ state: a }) => p({
|
|
1868
1882
|
value: ["[[count]]", a],
|
|
1869
1883
|
bind: e,
|
|
1870
1884
|
blur: (l, { state: i }) => {
|
|
@@ -1877,7 +1891,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1877
1891
|
max: s,
|
|
1878
1892
|
type: "number",
|
|
1879
1893
|
"aria-label": "Counter"
|
|
1880
|
-
})),
|
|
1894
|
+
})), to = O(
|
|
1881
1895
|
{
|
|
1882
1896
|
/**
|
|
1883
1897
|
* Initial state for the counter component.
|
|
@@ -1900,21 +1914,21 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1900
1914
|
render() {
|
|
1901
1915
|
const e = this.class ?? "";
|
|
1902
1916
|
return o({ class: `flex flex-auto items-center justify-between gap-x-4 p-4 ${e}` }, [
|
|
1903
|
-
|
|
1904
|
-
|
|
1917
|
+
$s({ click: () => this.state.decrement("count") }),
|
|
1918
|
+
Is({
|
|
1905
1919
|
bind: this.bind,
|
|
1906
1920
|
readonly: this.readonly,
|
|
1907
1921
|
min: this.min,
|
|
1908
1922
|
max: this.max
|
|
1909
1923
|
}),
|
|
1910
|
-
|
|
1924
|
+
Ds({ click: () => this.state.increment("count") })
|
|
1911
1925
|
]);
|
|
1912
1926
|
}
|
|
1913
1927
|
}
|
|
1914
|
-
),
|
|
1928
|
+
), Ts = ({ currentMonth: e, currentYear: t, onSelect: s }) => o(
|
|
1915
1929
|
{ class: "grid grid-cols-3 gap-2" },
|
|
1916
1930
|
ee.monthNames.map(
|
|
1917
|
-
(n, a) =>
|
|
1931
|
+
(n, a) => b(
|
|
1918
1932
|
{
|
|
1919
1933
|
click: (l) => {
|
|
1920
1934
|
l.preventDefault(), l.stopPropagation(), s(a);
|
|
@@ -1925,9 +1939,9 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1925
1939
|
n.substring(0, 3)
|
|
1926
1940
|
)
|
|
1927
1941
|
)
|
|
1928
|
-
), P = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)),
|
|
1929
|
-
const a =
|
|
1930
|
-
return a || (e ?
|
|
1942
|
+
), P = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), Ms = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), L = (e, t, s) => `${e}-${P(t + 1)}-${P(s)}`, Bs = (e) => e ? "bg-accent text-primary" : "", Ps = (e) => e ? "text-muted-foreground opacity-50" : "", zs = (e, t) => e === t, Os = (e, t) => zs(e, t) ? "bg-primary text-primary-foreground" : "", Ns = (e, t, s, n) => {
|
|
1943
|
+
const a = Os(t, n);
|
|
1944
|
+
return a || (e ? Bs(e) : s ? Ps(s) : "text-foreground");
|
|
1931
1945
|
}, oe = (e) => {
|
|
1932
1946
|
const {
|
|
1933
1947
|
day: t,
|
|
@@ -1942,7 +1956,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1942
1956
|
{
|
|
1943
1957
|
class: `
|
|
1944
1958
|
flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md cursor-pointer
|
|
1945
|
-
${
|
|
1959
|
+
${Ns(a, s, l, n)}
|
|
1946
1960
|
hover:bg-muted/50 hover:text-muted-foreground focus:z-10
|
|
1947
1961
|
disabled:pointer-events-none disabled:opacity-50
|
|
1948
1962
|
`,
|
|
@@ -1953,15 +1967,15 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1953
1967
|
},
|
|
1954
1968
|
t.toString()
|
|
1955
1969
|
);
|
|
1956
|
-
}, le = (e, t, s, n) => e === n.date && t === n.month && s === n.year,
|
|
1957
|
-
const { year: a, month: l } = e, i =
|
|
1970
|
+
}, le = (e, t, s, n) => e === n.date && t === n.month && s === n.year, Rs = (e, t, s, n = !1) => {
|
|
1971
|
+
const { year: a, month: l } = e, i = L(a, l, e.date), c = new Date(a, l, 1).getDay(), h = new Date(a, l + 1, 0).getDate(), m = new Date(a, l, 0).getDate(), v = [], q = l === 0 ? 11 : l - 1, H = l === 0 ? a - 1 : a;
|
|
1958
1972
|
for (let d = c - 1; d >= 0; d--) {
|
|
1959
|
-
const y = m - d, S = le(y, q,
|
|
1973
|
+
const y = m - d, S = le(y, q, H, t), $ = new Date(H, q, y) < new Date(t.year, t.month, t.date), R = n && $;
|
|
1960
1974
|
v.push(
|
|
1961
1975
|
oe({
|
|
1962
1976
|
day: y,
|
|
1963
1977
|
currentDate: i,
|
|
1964
|
-
date:
|
|
1978
|
+
date: L(H, q, y),
|
|
1965
1979
|
isToday: S,
|
|
1966
1980
|
isOutsideMonth: !0,
|
|
1967
1981
|
select: s,
|
|
@@ -1969,13 +1983,13 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1969
1983
|
})
|
|
1970
1984
|
);
|
|
1971
1985
|
}
|
|
1972
|
-
for (let d = 1; d <=
|
|
1986
|
+
for (let d = 1; d <= h; d++) {
|
|
1973
1987
|
const y = le(d, l, a, t), S = new Date(a, l, d) < new Date(t.year, t.month, t.date), $ = n && S;
|
|
1974
1988
|
v.push(
|
|
1975
1989
|
oe({
|
|
1976
1990
|
day: d,
|
|
1977
1991
|
currentDate: i,
|
|
1978
|
-
date:
|
|
1992
|
+
date: L(a, l, d),
|
|
1979
1993
|
isToday: y,
|
|
1980
1994
|
isOutsideMonth: !1,
|
|
1981
1995
|
select: s,
|
|
@@ -1983,14 +1997,14 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1983
1997
|
})
|
|
1984
1998
|
);
|
|
1985
1999
|
}
|
|
1986
|
-
const E = l === 11 ? 0 : l + 1, se = l === 11 ? a + 1 : a,
|
|
1987
|
-
for (let d = 1; d <=
|
|
2000
|
+
const E = l === 11 ? 0 : l + 1, se = l === 11 ? a + 1 : a, f = (7 - v.length % 7) % 7;
|
|
2001
|
+
for (let d = 1; d <= f; d++) {
|
|
1988
2002
|
const y = le(d, E, se, t), S = new Date(se, E, d) < new Date(t.year, t.month, t.date), $ = n && S;
|
|
1989
2003
|
v.push(
|
|
1990
2004
|
oe({
|
|
1991
2005
|
day: d,
|
|
1992
2006
|
currentDate: i,
|
|
1993
|
-
date:
|
|
2007
|
+
date: L(se, E, d),
|
|
1994
2008
|
isToday: y,
|
|
1995
2009
|
isOutsideMonth: !0,
|
|
1996
2010
|
select: s,
|
|
@@ -1999,7 +2013,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
1999
2013
|
);
|
|
2000
2014
|
}
|
|
2001
2015
|
return v;
|
|
2002
|
-
},
|
|
2016
|
+
}, Le = ({ label: e, click: t }) => b(
|
|
2003
2017
|
{
|
|
2004
2018
|
class: `
|
|
2005
2019
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -2010,18 +2024,18 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
2010
2024
|
click: t,
|
|
2011
2025
|
"aria-label": `${e} month`,
|
|
2012
2026
|
variant: "icon",
|
|
2013
|
-
icon: e === "Previous" ?
|
|
2014
|
-
}
|
|
2015
|
-
),
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
]),
|
|
2027
|
+
icon: e === "Previous" ? u.chevron.single.left : u.chevron.single.right
|
|
2028
|
+
}
|
|
2029
|
+
), Fs = ({ onMonthClick: e, onYearClick: t, next: s, previous: n }) => o({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
2030
|
+
b({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
2031
|
+
b({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
2032
|
+
Le({ label: "Previous", click: n }),
|
|
2033
|
+
Le({ label: "Next", click: s })
|
|
2034
|
+
]), Ls = (e) => o(
|
|
2021
2035
|
{ class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
|
|
2022
2036
|
e
|
|
2023
|
-
),
|
|
2024
|
-
|
|
2037
|
+
), js = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(Ls), As = (e) => o({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
|
|
2038
|
+
Fs({
|
|
2025
2039
|
onMonthClick: e.onMonthClick,
|
|
2026
2040
|
onYearClick: e.onYearClick,
|
|
2027
2041
|
next: e.next,
|
|
@@ -2032,10 +2046,10 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
2032
2046
|
onSet: [
|
|
2033
2047
|
"currentDate",
|
|
2034
2048
|
() => [
|
|
2035
|
-
o({ class: "grid grid-cols-7" },
|
|
2049
|
+
o({ class: "grid grid-cols-7" }, js()),
|
|
2036
2050
|
o(
|
|
2037
2051
|
{ class: "grid grid-cols-7" },
|
|
2038
|
-
|
|
2052
|
+
Rs(
|
|
2039
2053
|
e.current,
|
|
2040
2054
|
e.today,
|
|
2041
2055
|
e.select,
|
|
@@ -2045,12 +2059,12 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
2045
2059
|
]
|
|
2046
2060
|
]
|
|
2047
2061
|
})
|
|
2048
|
-
]),
|
|
2062
|
+
]), Hs = ({ currentMonth: e, currentYear: t, onSelect: s }) => {
|
|
2049
2063
|
const n = t - 50, a = Array.from({ length: 101 }, (l, i) => n + i);
|
|
2050
2064
|
return o(
|
|
2051
2065
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
2052
2066
|
a.map(
|
|
2053
|
-
(l) =>
|
|
2067
|
+
(l) => b(
|
|
2054
2068
|
{
|
|
2055
2069
|
click: (i) => {
|
|
2056
2070
|
i.preventDefault(), i.stopPropagation(), s(l);
|
|
@@ -2063,7 +2077,7 @@ const ze = globalThis.matchMedia, ae = r(({ value: e, label: t, icon: s }) => w(
|
|
|
2063
2077
|
)
|
|
2064
2078
|
);
|
|
2065
2079
|
};
|
|
2066
|
-
class
|
|
2080
|
+
class Es extends C {
|
|
2067
2081
|
/**
|
|
2068
2082
|
* This will declare the props for the compiler.
|
|
2069
2083
|
*
|
|
@@ -2079,7 +2093,7 @@ class Hs extends C {
|
|
|
2079
2093
|
* @returns {Date}
|
|
2080
2094
|
*/
|
|
2081
2095
|
getSelectedDate(t) {
|
|
2082
|
-
const s = this.selectedDate ? new Date(
|
|
2096
|
+
const s = this.selectedDate ? new Date(Ms(this.selectedDate)) : t;
|
|
2083
2097
|
return new Date(s.getFullYear(), s.getMonth(), s.getDate());
|
|
2084
2098
|
}
|
|
2085
2099
|
/**
|
|
@@ -2176,7 +2190,7 @@ class Hs extends C {
|
|
|
2176
2190
|
T("view", (t) => {
|
|
2177
2191
|
switch (t) {
|
|
2178
2192
|
case "months":
|
|
2179
|
-
return
|
|
2193
|
+
return Ts(
|
|
2180
2194
|
{
|
|
2181
2195
|
// @ts-ignore
|
|
2182
2196
|
currentMonth: this.data.current.month,
|
|
@@ -2188,7 +2202,7 @@ class Hs extends C {
|
|
|
2188
2202
|
}
|
|
2189
2203
|
);
|
|
2190
2204
|
case "years":
|
|
2191
|
-
return
|
|
2205
|
+
return Hs(
|
|
2192
2206
|
{
|
|
2193
2207
|
// @ts-ignore
|
|
2194
2208
|
currentMonth: this.data.current.month,
|
|
@@ -2200,7 +2214,7 @@ class Hs extends C {
|
|
|
2200
2214
|
}
|
|
2201
2215
|
);
|
|
2202
2216
|
default:
|
|
2203
|
-
return
|
|
2217
|
+
return As({
|
|
2204
2218
|
// @ts-ignore
|
|
2205
2219
|
current: this.data.current,
|
|
2206
2220
|
// @ts-ignore
|
|
@@ -2221,57 +2235,57 @@ class Hs extends C {
|
|
|
2221
2235
|
]);
|
|
2222
2236
|
}
|
|
2223
2237
|
}
|
|
2224
|
-
const
|
|
2238
|
+
const Us = (e) => {
|
|
2225
2239
|
let t = "";
|
|
2226
2240
|
return e.length > 0 && (t = e.substring(0, 2), e.length > 2 && (t += "/" + e.substring(2, 4), e.length > 4 && (t += "/" + e.substring(4, 8)))), t;
|
|
2227
|
-
},
|
|
2241
|
+
}, Ys = (e) => {
|
|
2228
2242
|
if (e.length !== 8)
|
|
2229
2243
|
return null;
|
|
2230
2244
|
const t = parseInt(e.substring(0, 2), 10), s = parseInt(e.substring(2, 4), 10), n = parseInt(e.substring(4, 8), 10);
|
|
2231
2245
|
return t >= 1 && t <= 12 && s >= 1 && s <= 31 && n >= 1900 ? `${n}-${t.toString().padStart(2, "0")}-${s.toString().padStart(2, "0")}` : null;
|
|
2232
|
-
},
|
|
2246
|
+
}, Vs = ({ bind: e, required: t }) => p({
|
|
2233
2247
|
cache: "input",
|
|
2234
2248
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
2235
2249
|
bind: e,
|
|
2236
2250
|
required: t
|
|
2237
|
-
}),
|
|
2251
|
+
}), Ws = ({ placeholder: e, handleInputChange: t, handleInputFocus: s }) => p({
|
|
2238
2252
|
cache: "dateInput",
|
|
2239
2253
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
2240
2254
|
placeholder: e || "mm/dd/yyyy",
|
|
2241
2255
|
input: t,
|
|
2242
2256
|
focus: s,
|
|
2243
2257
|
onState: ["selectedDate", (n) => n ? ee.format("standard", n) : ""]
|
|
2244
|
-
}),
|
|
2258
|
+
}), qs = ({ bind: e, required: t, toggleOpen: s, handleInputChange: n, handleInputFocus: a, placeholder: l }) => o(
|
|
2245
2259
|
{
|
|
2246
2260
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
|
|
2247
2261
|
},
|
|
2248
2262
|
[
|
|
2249
|
-
|
|
2250
|
-
|
|
2263
|
+
Vs({ bind: e, required: t }),
|
|
2264
|
+
Ws({ placeholder: l, handleInputChange: n, handleInputFocus: a }),
|
|
2251
2265
|
w(
|
|
2252
2266
|
{
|
|
2253
2267
|
class: "shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
2254
2268
|
click: s
|
|
2255
2269
|
},
|
|
2256
2270
|
[
|
|
2257
|
-
Y({ html:
|
|
2271
|
+
Y({ html: u.calendar.days })
|
|
2258
2272
|
]
|
|
2259
2273
|
)
|
|
2260
2274
|
]
|
|
2261
|
-
),
|
|
2275
|
+
), Gs = ({ handleDateSelect: e, blockPriorDates: t }) => me(
|
|
2262
2276
|
(s, n, a) => new te({
|
|
2263
2277
|
cache: "dropdown",
|
|
2264
2278
|
parent: a,
|
|
2265
2279
|
button: a.panel,
|
|
2266
2280
|
size: "fit"
|
|
2267
2281
|
}, [
|
|
2268
|
-
new
|
|
2282
|
+
new Es({
|
|
2269
2283
|
selectedDate: a.state.selectedDate,
|
|
2270
2284
|
selectedCallBack: e,
|
|
2271
2285
|
blockPriorDates: t
|
|
2272
2286
|
})
|
|
2273
2287
|
])
|
|
2274
|
-
),
|
|
2288
|
+
), so = O(
|
|
2275
2289
|
{
|
|
2276
2290
|
/**
|
|
2277
2291
|
* The initial state of the DatePicker.
|
|
@@ -2300,9 +2314,9 @@ const As = (e) => {
|
|
|
2300
2314
|
*/
|
|
2301
2315
|
handleInputChange(e) {
|
|
2302
2316
|
const s = e.target.value.replace(/\D/g, "");
|
|
2303
|
-
e.target.value =
|
|
2304
|
-
const n =
|
|
2305
|
-
n && (this.state.selectedDate = n, this.input.value = n,
|
|
2317
|
+
e.target.value = Us(s);
|
|
2318
|
+
const n = Ys(s);
|
|
2319
|
+
n && (this.state.selectedDate = n, this.input.value = n, j.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(n));
|
|
2306
2320
|
},
|
|
2307
2321
|
/**
|
|
2308
2322
|
* Handles input focus - select all text for easy editing.
|
|
@@ -2318,7 +2332,7 @@ const As = (e) => {
|
|
|
2318
2332
|
* @param {string} date
|
|
2319
2333
|
*/
|
|
2320
2334
|
handleDateSelect(e) {
|
|
2321
|
-
this.state.selectedDate = e, this.state.open = !1, this.input.value = e,
|
|
2335
|
+
this.state.selectedDate = e, this.state.open = !1, this.input.value = e, j.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(e);
|
|
2322
2336
|
},
|
|
2323
2337
|
/**
|
|
2324
2338
|
* Toggles the calendar popover.
|
|
@@ -2338,7 +2352,7 @@ const As = (e) => {
|
|
|
2338
2352
|
return o(
|
|
2339
2353
|
{ class: "relative w-full max-w-[320px]" },
|
|
2340
2354
|
[
|
|
2341
|
-
|
|
2355
|
+
qs({
|
|
2342
2356
|
toggleOpen: this.toggleOpen.bind(this),
|
|
2343
2357
|
bind: this.bind,
|
|
2344
2358
|
required: this.required,
|
|
@@ -2346,7 +2360,7 @@ const As = (e) => {
|
|
|
2346
2360
|
handleInputFocus: this.handleInputFocus.bind(this),
|
|
2347
2361
|
placeholder: this.placeholder
|
|
2348
2362
|
}),
|
|
2349
|
-
|
|
2363
|
+
Gs({
|
|
2350
2364
|
handleDateSelect: this.handleDateSelect.bind(this),
|
|
2351
2365
|
blockPriorDates: this.blockPriorDates || !1
|
|
2352
2366
|
})
|
|
@@ -2354,7 +2368,7 @@ const As = (e) => {
|
|
|
2354
2368
|
);
|
|
2355
2369
|
}
|
|
2356
2370
|
}
|
|
2357
|
-
), je = ({ label: e, click: t }) =>
|
|
2371
|
+
), je = ({ label: e, click: t }) => b(
|
|
2358
2372
|
{
|
|
2359
2373
|
class: `
|
|
2360
2374
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -2365,22 +2379,22 @@ const As = (e) => {
|
|
|
2365
2379
|
click: t,
|
|
2366
2380
|
"aria-label": `${e} month`,
|
|
2367
2381
|
variant: "icon",
|
|
2368
|
-
icon: e === "Previous" ?
|
|
2382
|
+
icon: e === "Previous" ? u.chevron.single.left : u.chevron.single.right
|
|
2369
2383
|
}
|
|
2370
|
-
),
|
|
2371
|
-
|
|
2372
|
-
|
|
2384
|
+
), _s = ({ onMonthClick: e, onYearClick: t, next: s, previous: n }) => o({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
2385
|
+
b({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
2386
|
+
b({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
2373
2387
|
je({ label: "Previous", click: n }),
|
|
2374
2388
|
je({ label: "Next", click: s })
|
|
2375
|
-
]),
|
|
2389
|
+
]), Ks = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), Qs = () => o(
|
|
2376
2390
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
2377
|
-
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
2378
|
-
),
|
|
2379
|
-
let
|
|
2380
|
-
return n || a ? (
|
|
2391
|
+
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(Ks)
|
|
2392
|
+
), Js = ({ day: e, iso: t, disabled: s, isStart: n, isEnd: a, isBetween: l, isOtherMonth: i, click: c }) => {
|
|
2393
|
+
let h = "ghost", m = "";
|
|
2394
|
+
return n || a ? (h = "default", m = "bg-primary text-primary-foreground hover:bg-primary/90") : l && (m = "bg-accent text-accent-foreground hover:bg-accent/80"), s && (m += " opacity-50 cursor-not-allowed"), i && (m += " text-muted-foreground opacity-50"), b(
|
|
2381
2395
|
{
|
|
2382
2396
|
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${m}`,
|
|
2383
|
-
variant:
|
|
2397
|
+
variant: h,
|
|
2384
2398
|
disabled: s,
|
|
2385
2399
|
click: (v) => {
|
|
2386
2400
|
v.preventDefault(), v.stopPropagation(), s || c();
|
|
@@ -2388,11 +2402,11 @@ const As = (e) => {
|
|
|
2388
2402
|
},
|
|
2389
2403
|
e.toString()
|
|
2390
2404
|
);
|
|
2391
|
-
},
|
|
2392
|
-
const { start: a, end: l } = t, i = new Date(t.year, t.month, 1).getDay(), c = new Date(t.year, t.month + 1, 0).getDate(),
|
|
2393
|
-
for (let
|
|
2394
|
-
const d = q -
|
|
2395
|
-
|
|
2405
|
+
}, Zs = ({ today: e, current: t, blockPriorDates: s, onDateClick: n }) => {
|
|
2406
|
+
const { start: a, end: l } = t, i = new Date(t.year, t.month, 1).getDay(), c = new Date(t.year, t.month + 1, 0).getDate(), h = [], m = t.month === 0 ? 11 : t.month - 1, v = t.month === 0 ? t.year - 1 : t.year, q = new Date(v, m + 1, 0).getDate(), H = t.month === 11 ? 0 : t.month + 1, E = t.month === 11 ? t.year + 1 : t.year;
|
|
2407
|
+
for (let f = i - 1; f >= 0; f--) {
|
|
2408
|
+
const d = q - f, y = L(v, m, d), S = new Date(v, m, d), $ = new Date(e.year, e.month, e.date), R = S < $, G = s && R, _ = a === y, K = l === y, st = a && l && y > a && y < l;
|
|
2409
|
+
h.push({
|
|
2396
2410
|
day: d,
|
|
2397
2411
|
iso: y,
|
|
2398
2412
|
disabled: G,
|
|
@@ -2403,10 +2417,10 @@ const As = (e) => {
|
|
|
2403
2417
|
click: () => n(y)
|
|
2404
2418
|
});
|
|
2405
2419
|
}
|
|
2406
|
-
for (let
|
|
2407
|
-
const d =
|
|
2408
|
-
|
|
2409
|
-
day:
|
|
2420
|
+
for (let f = 1; f <= c; f++) {
|
|
2421
|
+
const d = L(t.year, t.month, f), y = new Date(t.year, t.month, f), S = new Date(e.year, e.month, e.date), $ = y < S, R = s && $, G = a === d, _ = l === d, K = a && l && d > a && d < l;
|
|
2422
|
+
h.push({
|
|
2423
|
+
day: f,
|
|
2410
2424
|
iso: d,
|
|
2411
2425
|
disabled: R,
|
|
2412
2426
|
isStart: G,
|
|
@@ -2418,11 +2432,11 @@ const As = (e) => {
|
|
|
2418
2432
|
}
|
|
2419
2433
|
});
|
|
2420
2434
|
}
|
|
2421
|
-
const
|
|
2422
|
-
for (let
|
|
2423
|
-
const d =
|
|
2424
|
-
|
|
2425
|
-
day:
|
|
2435
|
+
const we = (7 - h.length % 7) % 7;
|
|
2436
|
+
for (let f = 1; f <= we; f++) {
|
|
2437
|
+
const d = L(E, H, f), y = new Date(E, H, f), S = new Date(e.year, e.month, e.date), $ = y < S, R = s && $, G = a === d, _ = l === d, K = a && l && d > a && d < l;
|
|
2438
|
+
h.push({
|
|
2439
|
+
day: f,
|
|
2426
2440
|
iso: d,
|
|
2427
2441
|
disabled: R,
|
|
2428
2442
|
isStart: G,
|
|
@@ -2434,21 +2448,21 @@ const As = (e) => {
|
|
|
2434
2448
|
}
|
|
2435
2449
|
return o(
|
|
2436
2450
|
{ class: "grid grid-cols-7 gap-1" },
|
|
2437
|
-
|
|
2438
|
-
(
|
|
2439
|
-
day:
|
|
2440
|
-
iso:
|
|
2441
|
-
disabled:
|
|
2442
|
-
isStart:
|
|
2443
|
-
isEnd:
|
|
2444
|
-
isBetween:
|
|
2445
|
-
isOtherMonth:
|
|
2446
|
-
click:
|
|
2451
|
+
h.map(
|
|
2452
|
+
(f, d) => Js({
|
|
2453
|
+
day: f.day,
|
|
2454
|
+
iso: f.iso,
|
|
2455
|
+
disabled: f.disabled,
|
|
2456
|
+
isStart: f.isStart,
|
|
2457
|
+
isEnd: f.isEnd,
|
|
2458
|
+
isBetween: f.isBetween,
|
|
2459
|
+
isOtherMonth: f.isOtherMonth,
|
|
2460
|
+
click: f.click
|
|
2447
2461
|
})
|
|
2448
2462
|
)
|
|
2449
2463
|
);
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2464
|
+
}, Xs = r((e, t) => o({ class: "flex flex-auto flex-col" }, [
|
|
2465
|
+
_s({
|
|
2452
2466
|
// @ts-ignore
|
|
2453
2467
|
onMonthClick: e.onMonthClick,
|
|
2454
2468
|
// @ts-ignore
|
|
@@ -2463,8 +2477,8 @@ const As = (e) => {
|
|
|
2463
2477
|
onSet: [
|
|
2464
2478
|
"currentDate",
|
|
2465
2479
|
() => [
|
|
2466
|
-
|
|
2467
|
-
|
|
2480
|
+
Qs(),
|
|
2481
|
+
Zs({
|
|
2468
2482
|
// @ts-ignore
|
|
2469
2483
|
today: e.today,
|
|
2470
2484
|
// @ts-ignore
|
|
@@ -2477,10 +2491,10 @@ const As = (e) => {
|
|
|
2477
2491
|
]
|
|
2478
2492
|
]
|
|
2479
2493
|
})
|
|
2480
|
-
])),
|
|
2494
|
+
])), en = ({ currentMonth: e, currentYear: t, onSelect: s }) => o(
|
|
2481
2495
|
{ class: "grid grid-cols-3 gap-2" },
|
|
2482
2496
|
ee.monthNames.map(
|
|
2483
|
-
(n, a) =>
|
|
2497
|
+
(n, a) => b(
|
|
2484
2498
|
{
|
|
2485
2499
|
click: (l) => {
|
|
2486
2500
|
l.preventDefault(), l.stopPropagation(), s(a);
|
|
@@ -2491,30 +2505,30 @@ const As = (e) => {
|
|
|
2491
2505
|
n.substring(0, 3)
|
|
2492
2506
|
)
|
|
2493
2507
|
)
|
|
2494
|
-
),
|
|
2495
|
-
Q("selecting", (l) =>
|
|
2508
|
+
), tn = ({ start: e, end: t, selecting: s, onSelectStart: n, onSelectEnd: a }) => o({ class: "flex gap-x-2 mb-4" }, [
|
|
2509
|
+
Q("selecting", (l) => b({
|
|
2496
2510
|
click: n,
|
|
2497
2511
|
variant: l === "start" ? "primary" : "outline",
|
|
2498
2512
|
class: "flex-1"
|
|
2499
2513
|
}, [
|
|
2500
|
-
o({ class: "font-medium" },
|
|
2514
|
+
o({ class: "font-medium" }, Ae("current.start", "Start Date"))
|
|
2501
2515
|
])),
|
|
2502
|
-
Q("selecting", (l) =>
|
|
2516
|
+
Q("selecting", (l) => b({
|
|
2503
2517
|
click: a,
|
|
2504
2518
|
variant: l === "end" ? "primary" : "outline",
|
|
2505
2519
|
class: "flex-1"
|
|
2506
2520
|
}, [
|
|
2507
|
-
o({ class: "font-medium" },
|
|
2521
|
+
o({ class: "font-medium" }, Ae("current.end", "End Date"))
|
|
2508
2522
|
]))
|
|
2509
|
-
]),
|
|
2523
|
+
]), Ae = (e, t) => [`[[${e}]]`, (s) => s == null ? t : sn(s)], sn = (e) => {
|
|
2510
2524
|
const t = /* @__PURE__ */ new Date(e + "T00:00:00"), s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
2511
2525
|
return `${s[t.getDay()]}, ${t.getDate()} ${n[t.getMonth()]}`;
|
|
2512
|
-
},
|
|
2526
|
+
}, nn = ({ currentYear: e, onSelect: t }) => {
|
|
2513
2527
|
const s = e - 50, n = Array.from({ length: 101 }, (a, l) => s + l);
|
|
2514
2528
|
return o(
|
|
2515
2529
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
2516
2530
|
n.map(
|
|
2517
|
-
(a) =>
|
|
2531
|
+
(a) => b(
|
|
2518
2532
|
{
|
|
2519
2533
|
click: (l) => {
|
|
2520
2534
|
l.preventDefault(), l.stopPropagation(), t(a);
|
|
@@ -2527,7 +2541,7 @@ const As = (e) => {
|
|
|
2527
2541
|
)
|
|
2528
2542
|
);
|
|
2529
2543
|
};
|
|
2530
|
-
class
|
|
2544
|
+
class an extends C {
|
|
2531
2545
|
/**
|
|
2532
2546
|
* Declare compiler props.
|
|
2533
2547
|
*
|
|
@@ -2624,7 +2638,7 @@ class sn extends C {
|
|
|
2624
2638
|
render() {
|
|
2625
2639
|
const { today: t, current: s, selecting: n } = this.data, { start: a, end: l } = s;
|
|
2626
2640
|
return o({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
|
|
2627
|
-
|
|
2641
|
+
tn({
|
|
2628
2642
|
start: a,
|
|
2629
2643
|
end: l,
|
|
2630
2644
|
selecting: n,
|
|
@@ -2638,7 +2652,7 @@ class sn extends C {
|
|
|
2638
2652
|
T("view", (i) => {
|
|
2639
2653
|
switch (i) {
|
|
2640
2654
|
case "months":
|
|
2641
|
-
return
|
|
2655
|
+
return en(
|
|
2642
2656
|
{
|
|
2643
2657
|
currentMonth: s.month,
|
|
2644
2658
|
currentYear: s.year,
|
|
@@ -2648,7 +2662,7 @@ class sn extends C {
|
|
|
2648
2662
|
}
|
|
2649
2663
|
);
|
|
2650
2664
|
case "years":
|
|
2651
|
-
return
|
|
2665
|
+
return nn(
|
|
2652
2666
|
{
|
|
2653
2667
|
currentYear: s.year,
|
|
2654
2668
|
onSelect: (c) => {
|
|
@@ -2657,7 +2671,7 @@ class sn extends C {
|
|
|
2657
2671
|
}
|
|
2658
2672
|
);
|
|
2659
2673
|
default:
|
|
2660
|
-
return
|
|
2674
|
+
return Xs({
|
|
2661
2675
|
// @ts-ignore
|
|
2662
2676
|
monthName: this.data.monthName,
|
|
2663
2677
|
year: s.year,
|
|
@@ -2672,12 +2686,12 @@ class sn extends C {
|
|
|
2672
2686
|
c.preventDefault(), c.stopPropagation(), this.state.view = "years";
|
|
2673
2687
|
},
|
|
2674
2688
|
next: () => {
|
|
2675
|
-
const c = this.data.current,
|
|
2676
|
-
this.setCurrent(
|
|
2689
|
+
const c = this.data.current, h = c.month === 11 ? { month: 0, year: c.year + 1 } : { month: c.month + 1, year: c.year };
|
|
2690
|
+
this.setCurrent(h);
|
|
2677
2691
|
},
|
|
2678
2692
|
previous: () => {
|
|
2679
|
-
const c = this.data.current,
|
|
2680
|
-
this.setCurrent(
|
|
2693
|
+
const c = this.data.current, h = c.month === 0 ? { month: 11, year: c.year - 1 } : { month: c.month - 1, year: c.year };
|
|
2694
|
+
this.setCurrent(h);
|
|
2681
2695
|
}
|
|
2682
2696
|
});
|
|
2683
2697
|
}
|
|
@@ -2685,35 +2699,35 @@ class sn extends C {
|
|
|
2685
2699
|
]);
|
|
2686
2700
|
}
|
|
2687
2701
|
}
|
|
2688
|
-
const
|
|
2702
|
+
const on = ({ bind: e, required: t }) => p({
|
|
2689
2703
|
cache: "input",
|
|
2690
2704
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
2691
2705
|
bind: e,
|
|
2692
2706
|
required: t
|
|
2693
|
-
}),
|
|
2707
|
+
}), ln = ({ bind: e, required: t, toggleOpen: s }) => w({
|
|
2694
2708
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
2695
2709
|
click: s
|
|
2696
2710
|
}, [
|
|
2697
|
-
|
|
2711
|
+
on({ bind: e, required: t }),
|
|
2698
2712
|
W(({ state: n }) => [
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2713
|
+
g(U.date(["[[start]]", n], "Start Date")),
|
|
2714
|
+
g(" - "),
|
|
2715
|
+
g(U.date(["[[end]]", n], "End Date"))
|
|
2702
2716
|
]),
|
|
2703
|
-
Y({ html:
|
|
2704
|
-
]),
|
|
2717
|
+
Y({ html: u.calendar.days })
|
|
2718
|
+
]), rn = ({ handleDateSelect: e, blockPriorDates: t }) => me((s, n, a) => new te({
|
|
2705
2719
|
cache: "dropdown",
|
|
2706
2720
|
parent: a,
|
|
2707
2721
|
button: a.panel,
|
|
2708
2722
|
size: "xl"
|
|
2709
2723
|
}, [
|
|
2710
|
-
new
|
|
2724
|
+
new an({
|
|
2711
2725
|
startDate: a.state.start,
|
|
2712
2726
|
endDate: a.state.end,
|
|
2713
2727
|
onRangeSelect: e,
|
|
2714
2728
|
blockPriorDates: t
|
|
2715
2729
|
})
|
|
2716
|
-
])),
|
|
2730
|
+
])), no = O(
|
|
2717
2731
|
{
|
|
2718
2732
|
/**
|
|
2719
2733
|
* The initial state of the DateRangePicker.
|
|
@@ -2746,15 +2760,15 @@ const nn = ({ bind: e, required: t }) => p({
|
|
|
2746
2760
|
*/
|
|
2747
2761
|
render() {
|
|
2748
2762
|
const e = (s, { state: n }) => n.toggle("open"), t = (s, n) => {
|
|
2749
|
-
this.state.start = s, this.state.end = n, this.state.open = !1, this.input.value = `${s}-${n}`,
|
|
2763
|
+
this.state.start = s, this.state.end = n, this.state.open = !1, this.input.value = `${s}-${n}`, j.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: n }, this.parent);
|
|
2750
2764
|
};
|
|
2751
2765
|
return o({ class: "relative w-full max-w-[320px]" }, [
|
|
2752
|
-
|
|
2766
|
+
ln({
|
|
2753
2767
|
toggleOpen: e,
|
|
2754
2768
|
bind: this.bind,
|
|
2755
2769
|
required: this.required
|
|
2756
2770
|
}),
|
|
2757
|
-
|
|
2771
|
+
rn({
|
|
2758
2772
|
handleDateSelect: t,
|
|
2759
2773
|
blockPriorDates: this.blockPriorDates || !1
|
|
2760
2774
|
})
|
|
@@ -2762,11 +2776,11 @@ const nn = ({ bind: e, required: t }) => p({
|
|
|
2762
2776
|
}
|
|
2763
2777
|
}
|
|
2764
2778
|
);
|
|
2765
|
-
function
|
|
2779
|
+
function cn(e) {
|
|
2766
2780
|
let t = "";
|
|
2767
2781
|
return e.length > 0 && (t = e.substring(0, 2), e.length > 2 && (t += ":" + e.substring(2, 4))), t;
|
|
2768
2782
|
}
|
|
2769
|
-
function
|
|
2783
|
+
function dn(e) {
|
|
2770
2784
|
if (e.length < 4)
|
|
2771
2785
|
return { formattedTime: null, hour: null, minute: null, meridian: null };
|
|
2772
2786
|
const t = parseInt(e.substring(0, 2), 10), s = parseInt(e.substring(2, 4), 10);
|
|
@@ -2780,7 +2794,7 @@ function rn(e) {
|
|
|
2780
2794
|
meridian: a
|
|
2781
2795
|
};
|
|
2782
2796
|
}
|
|
2783
|
-
function
|
|
2797
|
+
function un({ bind: e, required: t }) {
|
|
2784
2798
|
return p({
|
|
2785
2799
|
cache: "input",
|
|
2786
2800
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
@@ -2788,7 +2802,7 @@ function cn({ bind: e, required: t }) {
|
|
|
2788
2802
|
required: t
|
|
2789
2803
|
});
|
|
2790
2804
|
}
|
|
2791
|
-
function
|
|
2805
|
+
function hn({ placeholder: e, handleInputChange: t, handleInputFocus: s }) {
|
|
2792
2806
|
return p({
|
|
2793
2807
|
cache: "timeInput",
|
|
2794
2808
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
@@ -2798,21 +2812,21 @@ function dn({ placeholder: e, handleInputChange: t, handleInputFocus: s }) {
|
|
|
2798
2812
|
onState: ["selectedTime", (n) => n || ""]
|
|
2799
2813
|
});
|
|
2800
2814
|
}
|
|
2801
|
-
function
|
|
2815
|
+
function fn({ bind: e, required: t, toggleOpen: s, handleInputChange: n, handleInputFocus: a, placeholder: l }) {
|
|
2802
2816
|
return o(
|
|
2803
2817
|
{
|
|
2804
2818
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
|
|
2805
2819
|
},
|
|
2806
2820
|
[
|
|
2807
|
-
|
|
2808
|
-
|
|
2821
|
+
un({ bind: e, required: t }),
|
|
2822
|
+
hn({ placeholder: l, handleInputChange: n, handleInputFocus: a }),
|
|
2809
2823
|
w(
|
|
2810
2824
|
{
|
|
2811
2825
|
class: "shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
2812
2826
|
click: s
|
|
2813
2827
|
},
|
|
2814
2828
|
[
|
|
2815
|
-
Y({ html:
|
|
2829
|
+
Y({ html: u.clock })
|
|
2816
2830
|
]
|
|
2817
2831
|
)
|
|
2818
2832
|
]
|
|
@@ -2832,7 +2846,7 @@ function re({ items: e, handleTimeSelect: t, state: s, stateValue: n, pad: a = !
|
|
|
2832
2846
|
})
|
|
2833
2847
|
);
|
|
2834
2848
|
}
|
|
2835
|
-
function
|
|
2849
|
+
function gn({ handleTimeSelect: e }) {
|
|
2836
2850
|
return me(
|
|
2837
2851
|
(t, s, n) => new te(
|
|
2838
2852
|
{
|
|
@@ -2892,7 +2906,7 @@ function He(e) {
|
|
|
2892
2906
|
meridian: l
|
|
2893
2907
|
});
|
|
2894
2908
|
}
|
|
2895
|
-
const
|
|
2909
|
+
const ao = O(
|
|
2896
2910
|
{
|
|
2897
2911
|
/**
|
|
2898
2912
|
* The initial shallow state of the TimePicker.
|
|
@@ -2940,14 +2954,14 @@ const so = O(
|
|
|
2940
2954
|
* @param {Event} e
|
|
2941
2955
|
*/
|
|
2942
2956
|
handleInputChange(e) {
|
|
2943
|
-
let t = e.target.value.replace(/[^\d]/g, ""), s =
|
|
2944
|
-
const n =
|
|
2957
|
+
let t = e.target.value.replace(/[^\d]/g, ""), s = cn(t);
|
|
2958
|
+
const n = dn(t);
|
|
2945
2959
|
n.formattedTime && (s = n.formattedTime, this.state.set({
|
|
2946
2960
|
hour: n.hour,
|
|
2947
2961
|
minute: n.minute,
|
|
2948
2962
|
meridian: n.meridian,
|
|
2949
2963
|
selectedTime: n.formattedTime
|
|
2950
|
-
}), this.input.value = n.formattedTime,
|
|
2964
|
+
}), this.input.value = n.formattedTime, j.trigger("change", this.input), typeof this.change == "function" && this.change(n.formattedTime)), e.target.value = s;
|
|
2951
2965
|
},
|
|
2952
2966
|
/**
|
|
2953
2967
|
* Handles input focus - select all text for easy editing.
|
|
@@ -2965,7 +2979,7 @@ const so = O(
|
|
|
2965
2979
|
handleTimeSelect({ hour: e, minute: t, meridian: s }) {
|
|
2966
2980
|
if (e && (this.state.hour = e), t && (this.state.minute = t), s && (this.state.meridian = s), this.state.hour && this.state.minute && this.state.meridian) {
|
|
2967
2981
|
const n = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
2968
|
-
this.state.selectedTime = n, this.state.open = !1, this.input.value = n,
|
|
2982
|
+
this.state.selectedTime = n, this.state.open = !1, this.input.value = n, j.trigger("change", this.input), typeof this.change == "function" && this.change(n);
|
|
2969
2983
|
}
|
|
2970
2984
|
},
|
|
2971
2985
|
/**
|
|
@@ -2977,7 +2991,7 @@ const so = O(
|
|
|
2977
2991
|
return o(
|
|
2978
2992
|
{ class: "relative w-full max-w-[320px]" },
|
|
2979
2993
|
[
|
|
2980
|
-
|
|
2994
|
+
fn({
|
|
2981
2995
|
toggleOpen: this.toggleOpen.bind(this),
|
|
2982
2996
|
bind: this.bind,
|
|
2983
2997
|
required: this.required,
|
|
@@ -2985,18 +2999,18 @@ const so = O(
|
|
|
2985
2999
|
handleInputFocus: this.handleInputFocus.bind(this),
|
|
2986
3000
|
placeholder: this.placeholder
|
|
2987
3001
|
}),
|
|
2988
|
-
|
|
3002
|
+
gn({
|
|
2989
3003
|
handleTimeSelect: this.handleTimeSelect.bind(this)
|
|
2990
3004
|
})
|
|
2991
3005
|
]
|
|
2992
3006
|
);
|
|
2993
3007
|
}
|
|
2994
3008
|
}
|
|
2995
|
-
),
|
|
2996
|
-
|
|
2997
|
-
]),
|
|
3009
|
+
), mn = (e, t) => o({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
3010
|
+
x({ size: "lg" }, e)
|
|
3011
|
+
]), bn = ({ title: e }) => Z({ class: "flex flex-auto items-center" }, [
|
|
2998
3012
|
J({ class: "text-lg font-semibold" }, e)
|
|
2999
|
-
]),
|
|
3013
|
+
]), oo = r((e, t) => it(
|
|
3000
3014
|
{
|
|
3001
3015
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
3002
3016
|
rounded-lg flex flex-auto flex-col
|
|
@@ -3009,10 +3023,10 @@ const so = O(
|
|
|
3009
3023
|
o({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
|
|
3010
3024
|
// Icon and content
|
|
3011
3025
|
// @ts-ignore
|
|
3012
|
-
e.icon &&
|
|
3026
|
+
e.icon && mn(e.icon, e.iconColor),
|
|
3013
3027
|
o({ class: "flex flex-auto flex-col gap-4" }, [
|
|
3014
3028
|
o({ class: "flex flex-auto flex-col gap-y-2" }, [
|
|
3015
|
-
|
|
3029
|
+
bn(e),
|
|
3016
3030
|
// @ts-ignore
|
|
3017
3031
|
e.description && k({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
3018
3032
|
o({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
@@ -3022,14 +3036,14 @@ const so = O(
|
|
|
3022
3036
|
])
|
|
3023
3037
|
])
|
|
3024
3038
|
]
|
|
3025
|
-
)),
|
|
3039
|
+
)), lo = r((e, t = []) => o({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
3026
3040
|
Ge({ class: "flex flex-auto flex-col" }, [
|
|
3027
3041
|
o({ class: "flex flex-auto flex-col gap-y-4" }, [
|
|
3028
3042
|
o({ class: "flex flex-auto items-center justify-center" }, [
|
|
3029
3043
|
// @ts-ignore
|
|
3030
3044
|
e.icon && o({ class: "w-16 h-16 mb-2 text-primary" }, [
|
|
3031
3045
|
// @ts-ignore
|
|
3032
|
-
|
|
3046
|
+
x({ size: "lg" }, e.icon)
|
|
3033
3047
|
])
|
|
3034
3048
|
]),
|
|
3035
3049
|
Z({ class: "py-4 text-center" }, [
|
|
@@ -3053,28 +3067,28 @@ r(({ value: e, label: t }) => w({
|
|
|
3053
3067
|
dataSet: ["performance", ["state", e, "active"]],
|
|
3054
3068
|
click: (s, { state: n }) => n.performance = e
|
|
3055
3069
|
}, t));
|
|
3056
|
-
const
|
|
3070
|
+
const xn = (e, t) => {
|
|
3057
3071
|
const s = e.toggleAllSelectedRows();
|
|
3058
3072
|
t.state.checked = !s;
|
|
3059
|
-
},
|
|
3060
|
-
W((t) => new
|
|
3061
|
-
]),
|
|
3073
|
+
}, pn = (e) => Ye({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
|
|
3074
|
+
W((t) => new Lt({ class: "mr-2", onChange: (s, n) => xn(t, n) }))
|
|
3075
|
+
]), yn = ({ align: e, sortable: t, key: s, label: n, sort: a, class: l }) => {
|
|
3062
3076
|
const i = e || "justify-start";
|
|
3063
|
-
return
|
|
3077
|
+
return Ye({
|
|
3064
3078
|
class: `cursor-pointer py-3 px-4 text-base ${l || ""}`,
|
|
3065
3079
|
click: t && (() => a(s))
|
|
3066
3080
|
}, [
|
|
3067
3081
|
o({ class: `flex flex-auto w-full items-center ${i}` }, [
|
|
3068
|
-
|
|
3069
|
-
t && Y({ class: "ml-2", html:
|
|
3082
|
+
g(n),
|
|
3083
|
+
t && Y({ class: "ml-2", html: u.arrows.upDown })
|
|
3070
3084
|
])
|
|
3071
3085
|
]);
|
|
3072
|
-
},
|
|
3086
|
+
}, ye = (e) => ct([
|
|
3073
3087
|
dt({
|
|
3074
3088
|
class: "text-muted-foreground border-b",
|
|
3075
3089
|
map: [
|
|
3076
3090
|
e.headers,
|
|
3077
|
-
(t) => t.label === "checkbox" ?
|
|
3091
|
+
(t) => t.label === "checkbox" ? pn({ toggle: e.toggle }) : yn({
|
|
3078
3092
|
align: t.align,
|
|
3079
3093
|
sortable: t.sortable,
|
|
3080
3094
|
key: t.key,
|
|
@@ -3083,7 +3097,7 @@ const mn = (e, t) => {
|
|
|
3083
3097
|
})
|
|
3084
3098
|
]
|
|
3085
3099
|
})
|
|
3086
|
-
]),
|
|
3100
|
+
]), wn = ({ key: e, rows: t, selectRow: s, rowItem: n, emptyState: a, skeleton: l, columnCount: i }) => new bt({
|
|
3087
3101
|
cache: "list",
|
|
3088
3102
|
key: e,
|
|
3089
3103
|
items: t,
|
|
@@ -3174,12 +3188,12 @@ class Qe extends C {
|
|
|
3174
3188
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
3175
3189
|
Q("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3176
3190
|
o({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3177
|
-
|
|
3191
|
+
be({ class: "w-full" }, [
|
|
3178
3192
|
// @ts-ignore
|
|
3179
|
-
this.headers &&
|
|
3193
|
+
this.headers && ye({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
3180
3194
|
// @ts-ignore
|
|
3181
3195
|
this.customHeader ?? null,
|
|
3182
|
-
|
|
3196
|
+
wn({
|
|
3183
3197
|
// @ts-ignore
|
|
3184
3198
|
key: this.key,
|
|
3185
3199
|
// @ts-ignore
|
|
@@ -3258,7 +3272,7 @@ class Qe extends C {
|
|
|
3258
3272
|
this.data.selectedRows = [];
|
|
3259
3273
|
}
|
|
3260
3274
|
}
|
|
3261
|
-
const
|
|
3275
|
+
const vn = (e) => new xt({
|
|
3262
3276
|
cache: "list",
|
|
3263
3277
|
loadMoreItems: e.loadMoreItems,
|
|
3264
3278
|
offset: e.offset,
|
|
@@ -3271,7 +3285,7 @@ const yn = (e) => new bt({
|
|
|
3271
3285
|
skeleton: e.skeleton,
|
|
3272
3286
|
columnCount: e.columnCount
|
|
3273
3287
|
});
|
|
3274
|
-
class
|
|
3288
|
+
class kn extends Qe {
|
|
3275
3289
|
/**
|
|
3276
3290
|
* Renders the DataTable component.
|
|
3277
3291
|
*
|
|
@@ -3282,12 +3296,12 @@ class wn extends Qe {
|
|
|
3282
3296
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
3283
3297
|
Q("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3284
3298
|
o({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3285
|
-
|
|
3299
|
+
be({ class: "w-full" }, [
|
|
3286
3300
|
// @ts-ignore
|
|
3287
|
-
this.headers &&
|
|
3301
|
+
this.headers && ye({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
3288
3302
|
// @ts-ignore
|
|
3289
3303
|
this.customHeader ?? null,
|
|
3290
|
-
|
|
3304
|
+
vn({
|
|
3291
3305
|
// @ts-ignore
|
|
3292
3306
|
loadMoreItems: this.loadMoreItems,
|
|
3293
3307
|
// @ts-ignore
|
|
@@ -3323,7 +3337,7 @@ class wn extends Qe {
|
|
|
3323
3337
|
this.list.refresh();
|
|
3324
3338
|
}
|
|
3325
3339
|
}
|
|
3326
|
-
const
|
|
3340
|
+
const ro = r((e) => new kn(
|
|
3327
3341
|
{
|
|
3328
3342
|
// @ts-ignore
|
|
3329
3343
|
cache: e.cache ?? "list",
|
|
@@ -3354,7 +3368,7 @@ const oo = r((e) => new wn(
|
|
|
3354
3368
|
// @ts-ignore
|
|
3355
3369
|
skeleton: e.skeleton
|
|
3356
3370
|
}
|
|
3357
|
-
)),
|
|
3371
|
+
)), Cn = (e) => new pt({
|
|
3358
3372
|
cache: "list",
|
|
3359
3373
|
scrollContainer: e.scrollContainer,
|
|
3360
3374
|
loadMoreItems: e.loadMoreItems,
|
|
@@ -3368,7 +3382,7 @@ const oo = r((e) => new wn(
|
|
|
3368
3382
|
skeleton: e.skeleton,
|
|
3369
3383
|
columnCount: e.columnCount
|
|
3370
3384
|
});
|
|
3371
|
-
class
|
|
3385
|
+
class Sn extends Qe {
|
|
3372
3386
|
/**
|
|
3373
3387
|
* Renders the DataTable component.
|
|
3374
3388
|
*
|
|
@@ -3379,12 +3393,12 @@ class kn extends Qe {
|
|
|
3379
3393
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
3380
3394
|
Q("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3381
3395
|
o({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3382
|
-
|
|
3396
|
+
be({ class: "w-full" }, [
|
|
3383
3397
|
// @ts-ignore
|
|
3384
|
-
this.headers &&
|
|
3398
|
+
this.headers && ye({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
3385
3399
|
// @ts-ignore
|
|
3386
3400
|
this.customHeader ?? null,
|
|
3387
|
-
|
|
3401
|
+
Cn({
|
|
3388
3402
|
// @ts-ignore
|
|
3389
3403
|
scrollContainer: this.scrollContainer,
|
|
3390
3404
|
// @ts-ignore
|
|
@@ -3422,7 +3436,7 @@ class kn extends Qe {
|
|
|
3422
3436
|
this.list.refresh();
|
|
3423
3437
|
}
|
|
3424
3438
|
}
|
|
3425
|
-
const
|
|
3439
|
+
const io = r((e) => new Sn(
|
|
3426
3440
|
{
|
|
3427
3441
|
// @ts-ignore
|
|
3428
3442
|
cache: e.cache ?? "list",
|
|
@@ -3455,28 +3469,28 @@ const lo = r((e) => new kn(
|
|
|
3455
3469
|
// @ts-ignore
|
|
3456
3470
|
skeleton: e.skeleton
|
|
3457
3471
|
}
|
|
3458
|
-
)),
|
|
3472
|
+
)), $n = r(({ name: e, email: t }) => o({ class: "min-w-0 flex-auto" }, [
|
|
3459
3473
|
k({ class: "text-base font-semibold leading-6 m-0" }, e),
|
|
3460
3474
|
k({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, t)
|
|
3461
|
-
])),
|
|
3475
|
+
])), Dn = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
3462
3476
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
3463
3477
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
3464
3478
|
]),
|
|
3465
3479
|
k({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
3466
|
-
]),
|
|
3467
|
-
|
|
3480
|
+
]), In = (e) => k({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
3481
|
+
g("Last seen "),
|
|
3468
3482
|
ut({ datetime: e }, "3h ago")
|
|
3469
|
-
]),
|
|
3483
|
+
]), Tn = (e, t) => e === "online" ? Dn() : In(t), Mn = r(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
3470
3484
|
k({ class: "text-sm leading-6 m-0" }, e),
|
|
3471
|
-
|
|
3472
|
-
])),
|
|
3485
|
+
Tn(s, t)
|
|
3486
|
+
])), Bn = (e) => e.split(" ").map((s) => s[0]).join(""), Pn = r((e) => ge({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
3473
3487
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
3474
3488
|
// @ts-ignore
|
|
3475
|
-
|
|
3489
|
+
fs({ src: e.image, alt: e.name, fallbackText: Bn(e.name) }),
|
|
3476
3490
|
// @ts-ignore
|
|
3477
|
-
|
|
3491
|
+
$n({ name: e.name, email: e.email })
|
|
3478
3492
|
]),
|
|
3479
|
-
|
|
3493
|
+
Mn({
|
|
3480
3494
|
// @ts-ignore
|
|
3481
3495
|
role: e.role,
|
|
3482
3496
|
// @ts-ignore
|
|
@@ -3484,16 +3498,16 @@ const lo = r((e) => new kn(
|
|
|
3484
3498
|
// @ts-ignore
|
|
3485
3499
|
status: e.status
|
|
3486
3500
|
})
|
|
3487
|
-
])),
|
|
3501
|
+
])), co = r((e) => new yt({
|
|
3488
3502
|
cache: "list",
|
|
3489
3503
|
key: "name",
|
|
3490
3504
|
// @ts-ignore
|
|
3491
3505
|
items: e.users,
|
|
3492
3506
|
role: "list",
|
|
3493
3507
|
class: "divide-y divide-border",
|
|
3494
|
-
rowItem:
|
|
3508
|
+
rowItem: Pn
|
|
3495
3509
|
}));
|
|
3496
|
-
class
|
|
3510
|
+
class zn extends C {
|
|
3497
3511
|
/**
|
|
3498
3512
|
* This will declare the props for the compiler.
|
|
3499
3513
|
*
|
|
@@ -3554,24 +3568,24 @@ class Bn extends C {
|
|
|
3554
3568
|
});
|
|
3555
3569
|
}
|
|
3556
3570
|
}
|
|
3557
|
-
const
|
|
3571
|
+
const On = r(({ options: e, click: t }, s) => ({
|
|
3558
3572
|
tag: "li",
|
|
3559
3573
|
...{
|
|
3560
3574
|
class: `relative flex flex-row w-auto text-left p-0 transition-all cursor-pointer min-w-[48px] option${e ? " sub" : ""}`,
|
|
3561
3575
|
click: t
|
|
3562
3576
|
},
|
|
3563
3577
|
children: s
|
|
3564
|
-
})),
|
|
3578
|
+
})), Nn = (e, t = null, s = !1) => [
|
|
3565
3579
|
t && o({
|
|
3566
3580
|
class: "icon w-12 rounded-md flex items-center justify-center min-w-12",
|
|
3567
3581
|
onState: ["selected", {
|
|
3568
3582
|
selected: !0
|
|
3569
3583
|
}]
|
|
3570
3584
|
}, [
|
|
3571
|
-
|
|
3585
|
+
x({ size: "sm" }, t)
|
|
3572
3586
|
]),
|
|
3573
3587
|
V({ class: "label flex flex-auto text-sm items-center cursor-pointer whitespace-nowrap" }, e),
|
|
3574
|
-
s &&
|
|
3588
|
+
s && g(
|
|
3575
3589
|
{
|
|
3576
3590
|
class: "flex justify-center items-center px-1 transition-all text-muted-foreground mr-2",
|
|
3577
3591
|
onState: [
|
|
@@ -3584,7 +3598,7 @@ const Pn = r(({ options: e, click: t }, s) => ({
|
|
|
3584
3598
|
]
|
|
3585
3599
|
},
|
|
3586
3600
|
[
|
|
3587
|
-
|
|
3601
|
+
x({ size: "xs" }, u.chevron.single.down)
|
|
3588
3602
|
]
|
|
3589
3603
|
)
|
|
3590
3604
|
];
|
|
@@ -3605,7 +3619,7 @@ class Je extends C {
|
|
|
3605
3619
|
*/
|
|
3606
3620
|
render() {
|
|
3607
3621
|
const t = !this.options && this.callBack;
|
|
3608
|
-
return
|
|
3622
|
+
return On(
|
|
3609
3623
|
{ options: this.options, click: t },
|
|
3610
3624
|
[
|
|
3611
3625
|
this.addLink()
|
|
@@ -3619,7 +3633,7 @@ class Je extends C {
|
|
|
3619
3633
|
* @protected
|
|
3620
3634
|
*/
|
|
3621
3635
|
addLink() {
|
|
3622
|
-
const t = this.options && this.options.length > 0, s = this.content ||
|
|
3636
|
+
const t = this.options && this.options.length > 0, s = this.content || Nn(String(this.label), this.icon, t);
|
|
3623
3637
|
return this.href ? new gt(
|
|
3624
3638
|
{
|
|
3625
3639
|
class: "flex flex-auto flex-row rounded-md transition-all overflow-x-hidden",
|
|
@@ -3629,7 +3643,7 @@ class Je extends C {
|
|
|
3629
3643
|
exact: this.exact || !1
|
|
3630
3644
|
},
|
|
3631
3645
|
s
|
|
3632
|
-
) : new
|
|
3646
|
+
) : new zn({
|
|
3633
3647
|
class: "flex flex-auto flex-row rounded-md transition-all overflow-x-hidden",
|
|
3634
3648
|
cache: "link",
|
|
3635
3649
|
checkCallBack: this.checkCallBack
|
|
@@ -3647,10 +3661,10 @@ class Je extends C {
|
|
|
3647
3661
|
this.link.update(t);
|
|
3648
3662
|
}
|
|
3649
3663
|
}
|
|
3650
|
-
const
|
|
3651
|
-
|
|
3664
|
+
const Rn = r(({ map: e }, t) => X({ class: "navigation-group flex flex-col gap-2 list-none m-0 py-2 px-0", map: e }, [
|
|
3665
|
+
Ee({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" }, t)
|
|
3652
3666
|
]));
|
|
3653
|
-
class
|
|
3667
|
+
class Fn extends C {
|
|
3654
3668
|
/**
|
|
3655
3669
|
* This will declare the props for the compiler.
|
|
3656
3670
|
*
|
|
@@ -3699,7 +3713,7 @@ class Nn extends C {
|
|
|
3699
3713
|
*/
|
|
3700
3714
|
addGroup(t) {
|
|
3701
3715
|
const s = this.mapOptions(t.options);
|
|
3702
|
-
return
|
|
3716
|
+
return Rn({ map: s }, t.group);
|
|
3703
3717
|
}
|
|
3704
3718
|
/**
|
|
3705
3719
|
* This will add a link.
|
|
@@ -3711,7 +3725,7 @@ class Nn extends C {
|
|
|
3711
3725
|
return new Je(t);
|
|
3712
3726
|
}
|
|
3713
3727
|
}
|
|
3714
|
-
class Ze extends
|
|
3728
|
+
class Ze extends Fn {
|
|
3715
3729
|
onCreated() {
|
|
3716
3730
|
this.links = [];
|
|
3717
3731
|
}
|
|
@@ -3722,7 +3736,7 @@ class Ze extends Nn {
|
|
|
3722
3736
|
* @returns {object}
|
|
3723
3737
|
*/
|
|
3724
3738
|
setupSubNav(t) {
|
|
3725
|
-
return new
|
|
3739
|
+
return new An(
|
|
3726
3740
|
{
|
|
3727
3741
|
parentLink: t,
|
|
3728
3742
|
options: t.options
|
|
@@ -3757,11 +3771,11 @@ class Ze extends Nn {
|
|
|
3757
3771
|
};
|
|
3758
3772
|
}
|
|
3759
3773
|
}
|
|
3760
|
-
const
|
|
3774
|
+
const Ln = (e, t) => new RegExp(`${e}($|/|\\.).*`).test(t), jn = (e, t) => {
|
|
3761
3775
|
const s = e.link.panel.pathname;
|
|
3762
|
-
return !s && e.isSelected() ? !0 : e.exact ? t === s :
|
|
3776
|
+
return !s && e.isSelected() ? !0 : e.exact ? t === s : Ln(s, t);
|
|
3763
3777
|
};
|
|
3764
|
-
class
|
|
3778
|
+
class An extends Ze {
|
|
3765
3779
|
/**
|
|
3766
3780
|
* This will declare the props for the compiler.
|
|
3767
3781
|
*
|
|
@@ -3790,7 +3804,7 @@ class jn extends Ze {
|
|
|
3790
3804
|
addWatcher() {
|
|
3791
3805
|
return {
|
|
3792
3806
|
watch: {
|
|
3793
|
-
value: ["[[path]]",
|
|
3807
|
+
value: ["[[path]]", ve.data],
|
|
3794
3808
|
callBack: this.updateLinks.bind(this)
|
|
3795
3809
|
}
|
|
3796
3810
|
};
|
|
@@ -3831,7 +3845,7 @@ class jn extends Ze {
|
|
|
3831
3845
|
* @returns {void}
|
|
3832
3846
|
*/
|
|
3833
3847
|
afterSetup() {
|
|
3834
|
-
const t =
|
|
3848
|
+
const t = ve.data.path;
|
|
3835
3849
|
this.updateLinks(t);
|
|
3836
3850
|
}
|
|
3837
3851
|
/**
|
|
@@ -3843,27 +3857,27 @@ class jn extends Ze {
|
|
|
3843
3857
|
updateLinks(t) {
|
|
3844
3858
|
let s = !1;
|
|
3845
3859
|
for (const n of this.links)
|
|
3846
|
-
if (n.rendered && (s =
|
|
3860
|
+
if (n.rendered && (s = jn(n, t), s === !0))
|
|
3847
3861
|
break;
|
|
3848
3862
|
this.parentLink.update(s);
|
|
3849
3863
|
}
|
|
3850
3864
|
}
|
|
3851
|
-
const
|
|
3852
|
-
|
|
3865
|
+
const Hn = (e) => he({ class: "text-lg ml-2" }, e), En = (e) => o({ class: "sticky flex flex-row items-center bg-popover lg:hidden top-0 z-10 border-0 border-b" }, [
|
|
3866
|
+
b({
|
|
3853
3867
|
variant: "icon",
|
|
3854
3868
|
class: "m-2",
|
|
3855
3869
|
click: (t, { state: s }) => s.toggle("open"),
|
|
3856
|
-
icon:
|
|
3870
|
+
icon: u.arrows.left
|
|
3857
3871
|
}),
|
|
3858
|
-
e.title &&
|
|
3859
|
-
]),
|
|
3872
|
+
e.title && Hn(e.title)
|
|
3873
|
+
]), Un = () => o({
|
|
3860
3874
|
class: `
|
|
3861
3875
|
absolute inset-0 bg-black/40 z-[-1] fadeIn
|
|
3862
3876
|
transition-opacity duration-200
|
|
3863
3877
|
`,
|
|
3864
3878
|
click: (e, { state: t }) => t.open = !1
|
|
3865
3879
|
});
|
|
3866
|
-
class
|
|
3880
|
+
class Yn extends C {
|
|
3867
3881
|
/**
|
|
3868
3882
|
* This will declare the props for the compiler.
|
|
3869
3883
|
*
|
|
@@ -3882,7 +3896,7 @@ class En extends C {
|
|
|
3882
3896
|
class: "fixed inset-0 z-50",
|
|
3883
3897
|
style: "[[typeClass]]"
|
|
3884
3898
|
}, [
|
|
3885
|
-
|
|
3899
|
+
Un(),
|
|
3886
3900
|
// Popover Content
|
|
3887
3901
|
o({
|
|
3888
3902
|
class: `
|
|
@@ -3891,7 +3905,7 @@ class En extends C {
|
|
|
3891
3905
|
dataSet: ["open", ["expanded", !0, "true"]]
|
|
3892
3906
|
}, [
|
|
3893
3907
|
o({ class: "flex flex-auto flex-col w-full h-full overflow-y-auto max-h-[85vh] rounded-md bg-popover border" }, [
|
|
3894
|
-
|
|
3908
|
+
En({ title: this.title }),
|
|
3895
3909
|
o({ class: "flex flex-auto flex-col" }, this.children)
|
|
3896
3910
|
])
|
|
3897
3911
|
])
|
|
@@ -3929,15 +3943,15 @@ class En extends C {
|
|
|
3929
3943
|
this.container = app.root;
|
|
3930
3944
|
}
|
|
3931
3945
|
}
|
|
3932
|
-
const Xe = () =>
|
|
3946
|
+
const Xe = () => b({ class: "m-2", variant: "ghost", addState() {
|
|
3933
3947
|
return {
|
|
3934
3948
|
open: !1
|
|
3935
3949
|
};
|
|
3936
3950
|
}, click: (e, { state: t }) => t.toggle("open") }, [
|
|
3937
|
-
|
|
3938
|
-
]),
|
|
3951
|
+
x({}, u.bar.three)
|
|
3952
|
+
]), Vn = (e) => he({ class: "text-lg ml-2" }, e), Wn = (e) => o({ class: "flex flex-auto flex-row items-center lg:hidden" }, [
|
|
3939
3953
|
Xe(),
|
|
3940
|
-
e.title &&
|
|
3954
|
+
e.title && Vn(e.title)
|
|
3941
3955
|
]), et = (e, t) => {
|
|
3942
3956
|
e.forEach((s) => {
|
|
3943
3957
|
if (s.options) {
|
|
@@ -3950,7 +3964,7 @@ const Xe = () => x({ class: "m-2", variant: "ghost", addState() {
|
|
|
3950
3964
|
T(
|
|
3951
3965
|
"open",
|
|
3952
3966
|
(t) => t ? [
|
|
3953
|
-
new
|
|
3967
|
+
new Yn({ title: e.title }, [
|
|
3954
3968
|
W(({ state: s }) => {
|
|
3955
3969
|
const n = (a) => s.open = !1;
|
|
3956
3970
|
return et(e.options, n), new Ze(
|
|
@@ -3962,23 +3976,23 @@ const Xe = () => x({ class: "m-2", variant: "ghost", addState() {
|
|
|
3962
3976
|
])
|
|
3963
3977
|
] : null
|
|
3964
3978
|
)
|
|
3965
|
-
]),
|
|
3979
|
+
]), uo = r((e) => o({ cache: "mobileNav", class: "inline-flex relative lg:hidden" }, [
|
|
3966
3980
|
o([
|
|
3967
3981
|
Xe(),
|
|
3968
3982
|
tt(e)
|
|
3969
3983
|
])
|
|
3970
|
-
])),
|
|
3984
|
+
])), ho = r((e) => o({ cache: "mobileNav", class: "flex flex-auto flex-col w-full relative lg:hidden" }, [
|
|
3971
3985
|
o({ class: "flex flex-auto flex-col w-full" }, [
|
|
3972
|
-
|
|
3986
|
+
Wn(e),
|
|
3973
3987
|
tt(e)
|
|
3974
3988
|
])
|
|
3975
|
-
])),
|
|
3989
|
+
])), fo = r((e) => {
|
|
3976
3990
|
const t = e.margin || "m-4 ml-0";
|
|
3977
3991
|
return e.allowHistory = e.allowHistory === !0, o({ class: `flex-none ${t}` }, [
|
|
3978
|
-
|
|
3992
|
+
b({ variant: "back", class: "ghost", ...e })
|
|
3979
3993
|
]);
|
|
3980
3994
|
});
|
|
3981
|
-
class
|
|
3995
|
+
class qn extends C {
|
|
3982
3996
|
/**
|
|
3983
3997
|
* This will declare the props for the compiler.
|
|
3984
3998
|
*
|
|
@@ -4073,13 +4087,13 @@ class Vn extends C {
|
|
|
4073
4087
|
return this.children;
|
|
4074
4088
|
}
|
|
4075
4089
|
}
|
|
4076
|
-
|
|
4090
|
+
Ve.addType("dockableOverlay", (e) => {
|
|
4077
4091
|
if (!e)
|
|
4078
4092
|
return;
|
|
4079
4093
|
const t = e.component;
|
|
4080
4094
|
t && t.rendered === !0 && t.state.docked === !1 && t.destroy();
|
|
4081
4095
|
});
|
|
4082
|
-
class
|
|
4096
|
+
class go extends qn {
|
|
4083
4097
|
/**
|
|
4084
4098
|
* This will stop presistence.
|
|
4085
4099
|
*
|
|
@@ -4149,7 +4163,7 @@ class ho extends Vn {
|
|
|
4149
4163
|
* @returns {void}
|
|
4150
4164
|
*/
|
|
4151
4165
|
afterSetup() {
|
|
4152
|
-
|
|
4166
|
+
Ve.add(
|
|
4153
4167
|
this.container,
|
|
4154
4168
|
"dockableOverlay",
|
|
4155
4169
|
{
|
|
@@ -4184,7 +4198,7 @@ class ho extends Vn {
|
|
|
4184
4198
|
this.state.docked = this.canDock();
|
|
4185
4199
|
}
|
|
4186
4200
|
}
|
|
4187
|
-
const
|
|
4201
|
+
const Gn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
4188
4202
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
4189
4203
|
onState: [
|
|
4190
4204
|
[s, "selectedIndex", {
|
|
@@ -4193,10 +4207,10 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4193
4207
|
}]
|
|
4194
4208
|
],
|
|
4195
4209
|
click: () => t(e)
|
|
4196
|
-
}, n)),
|
|
4210
|
+
}, n)), _n = r(({ selectOption: e, state: t }) => X({
|
|
4197
4211
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
4198
|
-
for: ["filteredOptions", (s, n) =>
|
|
4199
|
-
})),
|
|
4212
|
+
for: ["filteredOptions", (s, n) => Gn({ index: n, click: e, state: t }, s.label)]
|
|
4213
|
+
})), Kn = r((e) => o({ class: "relative flex flex-auto items-center" }, [
|
|
4200
4214
|
N({
|
|
4201
4215
|
cache: "input",
|
|
4202
4216
|
// @ts-ignore
|
|
@@ -4219,9 +4233,9 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4219
4233
|
// @ts-ignore
|
|
4220
4234
|
e.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
4221
4235
|
// @ts-ignore
|
|
4222
|
-
|
|
4236
|
+
x({ size: "sm" }, e.icon)
|
|
4223
4237
|
])
|
|
4224
|
-
])),
|
|
4238
|
+
])), Qn = (e) => o({
|
|
4225
4239
|
class: "relative flex fle-auto flex-col",
|
|
4226
4240
|
onState: ["open", (t, s, n) => {
|
|
4227
4241
|
if (t)
|
|
@@ -4231,10 +4245,10 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4231
4245
|
button: n.input,
|
|
4232
4246
|
size: "xl"
|
|
4233
4247
|
}, [
|
|
4234
|
-
|
|
4248
|
+
_n(e)
|
|
4235
4249
|
]);
|
|
4236
4250
|
}]
|
|
4237
|
-
}),
|
|
4251
|
+
}), mo = M(
|
|
4238
4252
|
{
|
|
4239
4253
|
/**
|
|
4240
4254
|
* This will set up the data object.
|
|
@@ -4331,7 +4345,7 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4331
4345
|
*/
|
|
4332
4346
|
render() {
|
|
4333
4347
|
return o({ class: "relative w-full max-w-md" }, [
|
|
4334
|
-
|
|
4348
|
+
Kn({
|
|
4335
4349
|
// @ts-ignore
|
|
4336
4350
|
state: this.state,
|
|
4337
4351
|
// @ts-ignore
|
|
@@ -4343,7 +4357,7 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4343
4357
|
// @ts-ignore
|
|
4344
4358
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
4345
4359
|
}),
|
|
4346
|
-
|
|
4360
|
+
Qn({
|
|
4347
4361
|
// @ts-ignore
|
|
4348
4362
|
state: this.state,
|
|
4349
4363
|
// @ts-ignore
|
|
@@ -4354,14 +4368,14 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4354
4368
|
]);
|
|
4355
4369
|
}
|
|
4356
4370
|
}
|
|
4357
|
-
),
|
|
4358
|
-
const t = e.icon ??
|
|
4371
|
+
), bo = r((e) => {
|
|
4372
|
+
const t = e.icon ?? u.magnifyingGlass.default;
|
|
4359
4373
|
return o({
|
|
4360
4374
|
// @ts-ignore
|
|
4361
4375
|
class: `relative flex items-center w-full rounded-xl bg-muted/30 focus-within:ring-2 focus-within:ring-ring transition-all ${e.containerClass || ""}`
|
|
4362
4376
|
}, [
|
|
4363
4377
|
o({ class: "absolute left-4 flex items-center pointer-events-none text-muted-foreground" }, [
|
|
4364
|
-
|
|
4378
|
+
x({ size: "sm" }, t)
|
|
4365
4379
|
]),
|
|
4366
4380
|
p({
|
|
4367
4381
|
type: "text",
|
|
@@ -4390,7 +4404,7 @@ const Wn = r(({ index: e, click: t, state: s }, n) => ge({
|
|
|
4390
4404
|
})
|
|
4391
4405
|
]);
|
|
4392
4406
|
});
|
|
4393
|
-
class
|
|
4407
|
+
class Jn extends C {
|
|
4394
4408
|
/**
|
|
4395
4409
|
* This will declare the props for the compiler.
|
|
4396
4410
|
*
|
|
@@ -4408,7 +4422,7 @@ class Kn extends C {
|
|
|
4408
4422
|
return o({ class: `${this.class || ""}` }, this.children);
|
|
4409
4423
|
}
|
|
4410
4424
|
}
|
|
4411
|
-
class
|
|
4425
|
+
class Zn extends Jn {
|
|
4412
4426
|
/**
|
|
4413
4427
|
* This will be called every time the route
|
|
4414
4428
|
* is activated.
|
|
@@ -4418,15 +4432,15 @@ class Qn extends Kn {
|
|
|
4418
4432
|
update(t) {
|
|
4419
4433
|
}
|
|
4420
4434
|
}
|
|
4421
|
-
const
|
|
4435
|
+
const Xn = r((e, t) => (e.class = "basic-page pt-[80px] sm:pt-0 flex flex-auto flex-col " + (e.class || ""), {
|
|
4422
4436
|
tag: "section",
|
|
4423
4437
|
...e,
|
|
4424
4438
|
children: t
|
|
4425
|
-
})),
|
|
4439
|
+
})), ea = r(({ title: e, description: t }) => Z({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
|
|
4426
4440
|
ht({ class: "scroll-m-20 text-3xl font-bold tracking-tight" }, e),
|
|
4427
4441
|
t && k({ class: "text-base text-muted-foreground py-2 max-w-[700px]" }, t)
|
|
4428
4442
|
]));
|
|
4429
|
-
class
|
|
4443
|
+
class xo extends Zn {
|
|
4430
4444
|
/**
|
|
4431
4445
|
* This will declare the props for the compiler.
|
|
4432
4446
|
*
|
|
@@ -4441,8 +4455,8 @@ class mo extends Qn {
|
|
|
4441
4455
|
* @returns {object}
|
|
4442
4456
|
*/
|
|
4443
4457
|
render() {
|
|
4444
|
-
return
|
|
4445
|
-
|
|
4458
|
+
return Xn([
|
|
4459
|
+
ea({
|
|
4446
4460
|
title: this.title,
|
|
4447
4461
|
description: this.description
|
|
4448
4462
|
}),
|
|
@@ -4451,123 +4465,123 @@ class mo extends Qn {
|
|
|
4451
4465
|
}
|
|
4452
4466
|
}
|
|
4453
4467
|
export {
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4468
|
+
Ia as $,
|
|
4469
|
+
La as A,
|
|
4470
|
+
fo as B,
|
|
4471
|
+
Es as C,
|
|
4458
4472
|
Qe as D,
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4473
|
+
Ya as E,
|
|
4474
|
+
oo as F,
|
|
4475
|
+
go as G,
|
|
4476
|
+
Xa as H,
|
|
4477
|
+
ro as I,
|
|
4478
|
+
ba as J,
|
|
4479
|
+
lo as K,
|
|
4480
|
+
ga as L,
|
|
4481
|
+
Ma as M,
|
|
4468
4482
|
Ge as N,
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
+
ja as O,
|
|
4484
|
+
Ha as P,
|
|
4485
|
+
Aa as Q,
|
|
4486
|
+
es as R,
|
|
4487
|
+
Jt as S,
|
|
4488
|
+
Ea as T,
|
|
4489
|
+
Pt as U,
|
|
4490
|
+
Kt as V,
|
|
4491
|
+
Qt as W,
|
|
4492
|
+
Zt as X,
|
|
4493
|
+
L as Y,
|
|
4494
|
+
xo as Z,
|
|
4495
|
+
yn as _,
|
|
4496
|
+
fs as a,
|
|
4483
4497
|
P as a$,
|
|
4484
4498
|
ie as a0,
|
|
4485
|
-
|
|
4486
|
-
|
|
4499
|
+
Et as a1,
|
|
4500
|
+
Qa as a2,
|
|
4487
4501
|
Ze as a3,
|
|
4488
4502
|
N as a4,
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4503
|
+
Bt as a5,
|
|
4504
|
+
fa as a6,
|
|
4505
|
+
Ja as a7,
|
|
4492
4506
|
Je as a8,
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4507
|
+
Xn as a9,
|
|
4508
|
+
mo as aA,
|
|
4509
|
+
Kn as aB,
|
|
4510
|
+
Pa as aC,
|
|
4511
|
+
bo as aD,
|
|
4512
|
+
Va as aE,
|
|
4513
|
+
An as aF,
|
|
4514
|
+
ye as aG,
|
|
4515
|
+
ma as aH,
|
|
4516
|
+
xa as aI,
|
|
4517
|
+
_a as aJ,
|
|
4518
|
+
wa as aK,
|
|
4519
|
+
ao as aL,
|
|
4520
|
+
Wn as aM,
|
|
4521
|
+
Ka as aN,
|
|
4522
|
+
da as aO,
|
|
4523
|
+
Fa as aP,
|
|
4524
|
+
x as aQ,
|
|
4525
|
+
Da as aR,
|
|
4526
|
+
co as aS,
|
|
4527
|
+
Pn as aT,
|
|
4528
|
+
We as aU,
|
|
4515
4529
|
O as aV,
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4530
|
+
Ca as aW,
|
|
4531
|
+
Ms as aX,
|
|
4532
|
+
_t as aY,
|
|
4533
|
+
ia as aZ,
|
|
4534
|
+
ra as a_,
|
|
4535
|
+
$e as aa,
|
|
4536
|
+
$s as ab,
|
|
4537
|
+
uo as ac,
|
|
4538
|
+
ho as ad,
|
|
4539
|
+
As as ae,
|
|
4540
|
+
ka as af,
|
|
4527
4541
|
Xe as ag,
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4542
|
+
zn as ah,
|
|
4543
|
+
Fn as ai,
|
|
4544
|
+
Rn as aj,
|
|
4545
|
+
Yn as ak,
|
|
4546
|
+
Ga as al,
|
|
4547
|
+
Sa as am,
|
|
4548
|
+
qn as an,
|
|
4549
|
+
Jn as ao,
|
|
4550
|
+
$a as ap,
|
|
4551
|
+
Ds as aq,
|
|
4538
4552
|
te as ar,
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4553
|
+
En as as,
|
|
4554
|
+
Oa as at,
|
|
4555
|
+
pa as au,
|
|
4556
|
+
an as av,
|
|
4557
|
+
Ba as aw,
|
|
4558
|
+
Na as ax,
|
|
4559
|
+
Ra as ay,
|
|
4560
|
+
io as az,
|
|
4561
|
+
Un as b,
|
|
4562
|
+
qa as b0,
|
|
4563
|
+
ca as c,
|
|
4564
|
+
Zn as d,
|
|
4565
|
+
Za as e,
|
|
4566
|
+
b as f,
|
|
4567
|
+
Rs as g,
|
|
4568
|
+
Mt as h,
|
|
4569
|
+
Lt as i,
|
|
4570
|
+
pn as j,
|
|
4571
|
+
ha as k,
|
|
4572
|
+
za as l,
|
|
4573
|
+
ua as m,
|
|
4574
|
+
Ta as n,
|
|
4575
|
+
Wa as o,
|
|
4576
|
+
eo as p,
|
|
4577
|
+
Is as q,
|
|
4578
|
+
to as r,
|
|
4579
|
+
wn as s,
|
|
4580
|
+
ya as t,
|
|
4581
|
+
so as u,
|
|
4582
|
+
no as v,
|
|
4583
|
+
va as w,
|
|
4570
4584
|
oe as x,
|
|
4571
|
-
|
|
4572
|
-
|
|
4585
|
+
Ls as y,
|
|
4586
|
+
Ua as z
|
|
4573
4587
|
};
|