@base-framework/ui 1.0.261 → 1.0.263
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 +36 -36
- package/dist/{empty-state-eCUhZQ1_.js → empty-state-BPMXo_Tx.js} +259 -250
- package/dist/index.es.js +152 -149
- package/dist/molecules.es.js +41 -38
- package/dist/{tooltip-iKwNah4y.js → tooltip-Pwsjx1Gp.js} +40 -65
- package/dist/types/components/molecules/form/form-card.d.ts +31 -0
- package/dist/types/components/molecules/molecules.d.ts +1 -0
- package/dist/veil-tVDPinrr.js +48 -0
- package/package.json +1 -1
- package/dist/veil-D4dRxILB.js +0 -21
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Div as n, H5 as
|
|
2
|
-
import { Atom as c, Component as
|
|
3
|
-
import { P as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Div as n, H5 as J, P as m, I as p, Li as U, Span as i, Ul as V, Button as f, OnState as x, Label as R, H2 as v, Form as K, Header as I, Footer as A, A as q, H3 as Q, Checkbox as X, Input as w, Img as Z, Nav as ee, UseParent as H, Time as te, Dialog as se } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as C, Html as L, Dom as oe, base as ne, Data as $, Builder as Y, Jot as k, Events as le, DateTime as F } from "@base-framework/base";
|
|
3
|
+
import { P as S, b as re, R as ae } from "./range-calendar-BxLjYfrT.js";
|
|
4
|
+
import { C as ie, F as ce, a as y } from "./veil-tVDPinrr.js";
|
|
5
|
+
import { B as h, I as g } from "./buttons-Cm9etaEG.js";
|
|
6
|
+
import { Icons as u } from "./icons.es.js";
|
|
7
|
+
import { Timer as de, List as ue, DynamicTime as he } from "@base-framework/organisms";
|
|
8
8
|
import { F as P } from "./format-DnofNaaz.js";
|
|
9
9
|
const M = {
|
|
10
10
|
info: {
|
|
@@ -32,20 +32,20 @@ const M = {
|
|
|
32
32
|
bgColor: "bg-muted/10",
|
|
33
33
|
iconColor: "text-muted-foreground"
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
]),
|
|
38
|
-
const { borderColor: l, bgColor: r, iconColor:
|
|
35
|
+
}, fe = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
36
|
+
p({ html: e })
|
|
37
|
+
]), me = (e) => J({ class: "font-semibold" }, e), pe = (e) => m({ class: "text-sm text-muted-foreground" }, e), kt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
|
|
38
|
+
const { borderColor: l, bgColor: r, iconColor: a } = M[o] || M.default;
|
|
39
39
|
return n({ class: `flex items-start p-4 border rounded-lg ${r} ${l}` }, [
|
|
40
40
|
// Icon and content
|
|
41
|
-
s &&
|
|
41
|
+
s && fe(s, a),
|
|
42
42
|
n({ class: "flex flex-col" }, [
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
me(e),
|
|
44
|
+
pe(t)
|
|
45
45
|
])
|
|
46
46
|
]);
|
|
47
47
|
});
|
|
48
|
-
class
|
|
48
|
+
class ge extends C {
|
|
49
49
|
/**
|
|
50
50
|
* This will declare the props for the compiler.
|
|
51
51
|
*
|
|
@@ -63,48 +63,48 @@ class me extends v {
|
|
|
63
63
|
this.prepareDestroy(), this.removeContext();
|
|
64
64
|
const t = this.panel, s = this.removingClass;
|
|
65
65
|
if (!s) {
|
|
66
|
-
|
|
66
|
+
L.removeElement(t);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
oe.addClass(t, s), ne.on("animationend", t, (o) =>
|
|
69
|
+
oe.addClass(t, s), ne.on("animationend", t, (o) => L.removeElement(t));
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const be = (e) => i({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), xe = (e) => i({ class: "flex w-4 h-4", html: e }), we = (e) => i({ class: "flex-auto" }, e), ye = (e, t) => U({
|
|
73
73
|
class: "relative flex cursor-pointer hover:bg-muted/50 select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
74
74
|
click: () => t(e)
|
|
75
75
|
}, [
|
|
76
|
-
e.icon &&
|
|
77
|
-
|
|
78
|
-
e.shortcut &&
|
|
79
|
-
]),
|
|
80
|
-
e.map((s) =>
|
|
81
|
-
]),
|
|
76
|
+
e.icon && xe(e.icon),
|
|
77
|
+
we(e.label),
|
|
78
|
+
e.shortcut && be(e.shortcut)
|
|
79
|
+
]), ve = (e, t) => V({ class: "grid gap-2" }, [
|
|
80
|
+
e.map((s) => ye(s, t))
|
|
81
|
+
]), Ce = (e) => n({ class: "w-full z-10" }, [
|
|
82
82
|
n({
|
|
83
83
|
class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
|
|
84
|
-
for: ["groups", (t) =>
|
|
84
|
+
for: ["groups", (t) => ve(t, e)]
|
|
85
85
|
})
|
|
86
|
-
]),
|
|
86
|
+
]), ke = ({ label: e, icon: t, toggleDropdown: s }) => f({
|
|
87
87
|
cache: "button",
|
|
88
88
|
class: `inline-flex items-center justify-between rounded-md border
|
|
89
89
|
px-2 py-2 text-sm font-medium hover:bg-muted
|
|
90
90
|
focus:outline-none transition duration-150 ease-in-out`,
|
|
91
91
|
click: s
|
|
92
92
|
}, [
|
|
93
|
-
e &&
|
|
94
|
-
t &&
|
|
95
|
-
]),
|
|
93
|
+
e && i(e),
|
|
94
|
+
t && p({ html: t })
|
|
95
|
+
]), Se = ({ onSelect: e }) => n([
|
|
96
96
|
x(
|
|
97
97
|
"open",
|
|
98
|
-
(t, s, o) => t ? new
|
|
98
|
+
(t, s, o) => t ? new S({
|
|
99
99
|
cache: "dropdown",
|
|
100
100
|
parent: o,
|
|
101
101
|
button: o.button
|
|
102
102
|
}, [
|
|
103
|
-
|
|
103
|
+
Ce(e)
|
|
104
104
|
]) : null
|
|
105
105
|
)
|
|
106
106
|
]);
|
|
107
|
-
class
|
|
107
|
+
class St extends C {
|
|
108
108
|
/**
|
|
109
109
|
* This will declare the props for the compiler.
|
|
110
110
|
*
|
|
@@ -158,23 +158,29 @@ class Ct extends v {
|
|
|
158
158
|
*/
|
|
159
159
|
render() {
|
|
160
160
|
return n({ class: "relative" }, [
|
|
161
|
-
|
|
161
|
+
ke({
|
|
162
162
|
label: this.label,
|
|
163
163
|
icon: this.icon,
|
|
164
164
|
toggleDropdown: this.toggleDropdown.bind(this)
|
|
165
165
|
}),
|
|
166
|
-
|
|
166
|
+
Se({ onSelect: this.handleSelect.bind(this) })
|
|
167
167
|
]);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), Ie = c((e, t) => R({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), $e = c((e, t) => m({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Te = c((e, t) => m({ ...e, class: "text-sm text-destructive" }, t)), Dt = c((e, t = []) => ie({ class: "space-y-0", margin: "m-0", padding: "p-0" }, [
|
|
171
|
+
e.title && v({ class: "text-lg font-semibold py-4 px-6" }, e.title),
|
|
172
|
+
e.description && m({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
|
|
173
|
+
...t
|
|
174
|
+
])), It = c((e, t = []) => ce({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
|
|
175
|
+
n({ class: "space-y-6" }, t)
|
|
176
|
+
])), $t = c((e, t = []) => n({ ...e, class: `pb-4 px-6 space-y-4 ${e.class || ""}` }, t)), Be = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", _ = (e, t, s) => e.map((o) => !o || (o.children && o.children.length > 0 && (o.children = _(o.children, t, s)), !o.required) ? o : Be(o) ? {
|
|
171
177
|
...o,
|
|
172
178
|
aria: {
|
|
173
179
|
invalid: ["hasError"]
|
|
174
180
|
},
|
|
175
181
|
invalid: s,
|
|
176
182
|
input: t
|
|
177
|
-
} : o)
|
|
183
|
+
} : o), Fe = c((e, t) => {
|
|
178
184
|
const l = _(t, (r) => {
|
|
179
185
|
r.target.checkValidity() && e.setError(null);
|
|
180
186
|
}, (r) => {
|
|
@@ -184,7 +190,7 @@ const ke = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
184
190
|
...e,
|
|
185
191
|
class: "w-full"
|
|
186
192
|
}, l);
|
|
187
|
-
}),
|
|
193
|
+
}), Tt = y(
|
|
188
194
|
{
|
|
189
195
|
/**
|
|
190
196
|
* The initial state of the FormField.
|
|
@@ -209,53 +215,53 @@ const ke = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
209
215
|
this.state.error = r, this.state.hasError = !!r;
|
|
210
216
|
};
|
|
211
217
|
return n({ class: "flex flex-auto space-y-4" }, [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
De([
|
|
219
|
+
Ie({ htmlFor: t }, s),
|
|
220
|
+
Fe({
|
|
215
221
|
id: t,
|
|
216
222
|
name: e,
|
|
217
223
|
value: this.state.value,
|
|
218
224
|
setError: l
|
|
219
225
|
}, this.children),
|
|
220
|
-
o &&
|
|
221
|
-
n({ onState: ["error", (r) => r &&
|
|
226
|
+
o && $e({ id: this.getId("description") }, o),
|
|
227
|
+
n({ onState: ["error", (r) => r && Te(r)] })
|
|
222
228
|
])
|
|
223
229
|
]);
|
|
224
230
|
}
|
|
225
231
|
}
|
|
226
|
-
),
|
|
232
|
+
), Ae = (e, t, s = null) => {
|
|
227
233
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
228
234
|
}, W = c(
|
|
229
|
-
(e, t) => K({ ...e, submit: (s, o) =>
|
|
230
|
-
),
|
|
231
|
-
e.title &&
|
|
235
|
+
(e, t) => K({ ...e, submit: (s, o) => Ae(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
236
|
+
), Bt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), Ft = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
|
|
237
|
+
e.title && v({ class: "font-semibold" }, e.title),
|
|
232
238
|
...t
|
|
233
|
-
])),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
]),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
]),
|
|
239
|
+
])), At = (e, t) => n({ class: "flex justify-between" }, [
|
|
240
|
+
i({ class: "text-muted-foreground" }, e),
|
|
241
|
+
i(t)
|
|
242
|
+
]), Lt = (e, t) => n({ class: "flex" }, [
|
|
243
|
+
i({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
|
|
244
|
+
i(t)
|
|
245
|
+
]), Le = ({ title: e, description: t, back: s, icon: o, options: l = [] }) => I({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
|
|
240
246
|
/**
|
|
241
247
|
* Back Button
|
|
242
248
|
*/
|
|
243
|
-
s && h({ variant: "icon", icon:
|
|
249
|
+
s && h({ variant: "icon", icon: u.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (r, a) => a.close() }),
|
|
244
250
|
/**
|
|
245
251
|
* Icon
|
|
246
252
|
*/
|
|
247
|
-
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
253
|
+
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [g(o)]),
|
|
248
254
|
/**
|
|
249
255
|
* Title and Description
|
|
250
256
|
*/
|
|
251
257
|
n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
|
|
252
258
|
n({ class: "flex flex-auto flex-col" }, [
|
|
253
|
-
|
|
259
|
+
v({ class: "text-lg font-semibold m-0 truncate" }, e),
|
|
254
260
|
t && n({ class: "text-sm text-muted-foreground truncate" }, t)
|
|
255
261
|
]),
|
|
256
262
|
...l
|
|
257
263
|
])
|
|
258
|
-
]),
|
|
264
|
+
]), Pe = c((e, t) => n({
|
|
259
265
|
popover: "manual",
|
|
260
266
|
class: `modal m-auto top-0 right-0 bottom-0 left-0 fixed z-20 grid w-full h-full max-h-screen gap-2 lg:border bg-background text-foreground shadow-xl break-words p-0 ${e.class}`,
|
|
261
267
|
click: (s, o) => {
|
|
@@ -263,12 +269,12 @@ const ke = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
263
269
|
}
|
|
264
270
|
}, [
|
|
265
271
|
W({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col space-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
|
|
266
|
-
|
|
272
|
+
Le(e),
|
|
267
273
|
n({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
|
|
268
|
-
|
|
274
|
+
A({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
269
275
|
])
|
|
270
|
-
])),
|
|
271
|
-
class
|
|
276
|
+
])), Me = (e) => Y.render(e, app.root);
|
|
277
|
+
class Pt extends C {
|
|
272
278
|
/**
|
|
273
279
|
* This will declare the props for the compiler.
|
|
274
280
|
*
|
|
@@ -284,7 +290,7 @@ class Tt extends v {
|
|
|
284
290
|
*/
|
|
285
291
|
render() {
|
|
286
292
|
const t = this.getMainClass(), s = this.title || "", o = this.description || null;
|
|
287
|
-
return
|
|
293
|
+
return Pe(
|
|
288
294
|
{
|
|
289
295
|
class: t,
|
|
290
296
|
title: s,
|
|
@@ -399,7 +405,7 @@ class Tt extends v {
|
|
|
399
405
|
* @returns {void}
|
|
400
406
|
*/
|
|
401
407
|
open() {
|
|
402
|
-
|
|
408
|
+
Me(this), this.showModal();
|
|
403
409
|
}
|
|
404
410
|
/**
|
|
405
411
|
* This will destroy the modal.
|
|
@@ -454,18 +460,18 @@ const N = {
|
|
|
454
460
|
borderColor: "border",
|
|
455
461
|
iconColor: "text-muted-foreground"
|
|
456
462
|
}
|
|
457
|
-
},
|
|
463
|
+
}, Ne = (e) => I({ class: "flex justify-center" }, [
|
|
458
464
|
Q({ class: "text-lg font-bold mb-0" }, e)
|
|
459
|
-
]),
|
|
465
|
+
]), ze = c(({ href: e, class: t }, s) => q({
|
|
460
466
|
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}`,
|
|
461
467
|
href: e,
|
|
462
468
|
role: "alert"
|
|
463
|
-
}, s)),
|
|
469
|
+
}, s)), Ee = c(({ close: e, class: t }, s) => n({
|
|
464
470
|
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}`,
|
|
465
471
|
click: () => e(),
|
|
466
472
|
role: "alert"
|
|
467
473
|
}, s));
|
|
468
|
-
class
|
|
474
|
+
class je extends ge {
|
|
469
475
|
/**
|
|
470
476
|
* This will declare the props for the compiler.
|
|
471
477
|
*
|
|
@@ -489,10 +495,10 @@ class ze extends me {
|
|
|
489
495
|
*/
|
|
490
496
|
render() {
|
|
491
497
|
const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), l = this.href || null, r = this.getChildren(o);
|
|
492
|
-
return l ?
|
|
498
|
+
return l ? ze({
|
|
493
499
|
href: l,
|
|
494
500
|
class: `${t} ${s}`
|
|
495
|
-
}, r) :
|
|
501
|
+
}, r) : Ee({
|
|
496
502
|
close: this.close.bind(this),
|
|
497
503
|
class: `${t} ${s}`
|
|
498
504
|
}, r);
|
|
@@ -504,7 +510,7 @@ class ze extends me {
|
|
|
504
510
|
*/
|
|
505
511
|
afterSetup() {
|
|
506
512
|
const t = this.duration;
|
|
507
|
-
t !== "infinite" && (this.timer = new
|
|
513
|
+
t !== "infinite" && (this.timer = new de(t, this.close.bind(this)), this.timer.start());
|
|
508
514
|
}
|
|
509
515
|
/**
|
|
510
516
|
* This will get the style properties based on the notification type.
|
|
@@ -537,19 +543,19 @@ class ze extends me {
|
|
|
537
543
|
getChildren(t) {
|
|
538
544
|
return [
|
|
539
545
|
n({ class: "flex items-start" }, [
|
|
540
|
-
this.icon &&
|
|
546
|
+
this.icon && p({ class: `mr-4 ${t}`, html: this.icon }),
|
|
541
547
|
n({ class: "flex flex-auto flex-col" }, [
|
|
542
548
|
n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
543
|
-
this.title &&
|
|
549
|
+
this.title && Ne(this.title)
|
|
544
550
|
]),
|
|
545
|
-
|
|
546
|
-
(this.primary || this.secondary) &&
|
|
551
|
+
m({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
552
|
+
(this.primary || this.secondary) && A({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
547
553
|
])
|
|
548
554
|
]),
|
|
549
555
|
h({
|
|
550
556
|
class: "absolute top-[12px] right-[12px]",
|
|
551
557
|
variant: "icon",
|
|
552
|
-
icon:
|
|
558
|
+
icon: u.x,
|
|
553
559
|
click: this.close.bind(this)
|
|
554
560
|
})
|
|
555
561
|
];
|
|
@@ -564,8 +570,8 @@ class ze extends me {
|
|
|
564
570
|
t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
|
|
565
571
|
}
|
|
566
572
|
}
|
|
567
|
-
let
|
|
568
|
-
class
|
|
573
|
+
let Oe = 0;
|
|
574
|
+
class Mt extends C {
|
|
569
575
|
/**
|
|
570
576
|
* This will render the component.
|
|
571
577
|
*
|
|
@@ -573,11 +579,11 @@ class Bt extends v {
|
|
|
573
579
|
*/
|
|
574
580
|
render() {
|
|
575
581
|
return n({ class: "notification-container pointer-events-none inset-auto bg-transparent backdrop:bg-transparent overflow-visible fixed bottom-[80px] right-0 z-50 p-5", popover: "manual" }, [
|
|
576
|
-
new
|
|
582
|
+
new ue({
|
|
577
583
|
cache: "list",
|
|
578
584
|
key: "id",
|
|
579
585
|
role: "list",
|
|
580
|
-
rowItem: (t) => new
|
|
586
|
+
rowItem: (t) => new je(t)
|
|
581
587
|
})
|
|
582
588
|
]);
|
|
583
589
|
}
|
|
@@ -588,7 +594,7 @@ class Bt extends v {
|
|
|
588
594
|
* @returns {void}
|
|
589
595
|
*/
|
|
590
596
|
addNotice(t = {}) {
|
|
591
|
-
t.id =
|
|
597
|
+
t.id = Oe++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
|
|
592
598
|
}
|
|
593
599
|
/**
|
|
594
600
|
* This will remove a notification.
|
|
@@ -605,12 +611,12 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
605
611
|
onState: ["method", { active: e }],
|
|
606
612
|
dataSet: ["method", ["state", e, "active"]],
|
|
607
613
|
click: (o, { state: l }) => {
|
|
608
|
-
l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"),
|
|
614
|
+
l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ue(e);
|
|
609
615
|
}
|
|
610
616
|
}, [
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
])),
|
|
617
|
+
g(s),
|
|
618
|
+
i(t)
|
|
619
|
+
])), Ue = (e) => {
|
|
614
620
|
var o;
|
|
615
621
|
const t = document.documentElement;
|
|
616
622
|
if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + e + ")").matches) {
|
|
@@ -619,7 +625,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
619
625
|
}
|
|
620
626
|
const s = e === "light" ? "dark" : "light";
|
|
621
627
|
t.classList.remove(s);
|
|
622
|
-
},
|
|
628
|
+
}, Nt = k(
|
|
623
629
|
{
|
|
624
630
|
/**
|
|
625
631
|
* This will render the component.
|
|
@@ -629,9 +635,9 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
629
635
|
render() {
|
|
630
636
|
return n({ class: "flex flex-auto flex-col" }, [
|
|
631
637
|
n({ class: "grid grid-cols-3 gap-4" }, [
|
|
632
|
-
T({ label: "System", value: "system", icon:
|
|
633
|
-
T({ label: "Light", value: "light", icon:
|
|
634
|
-
T({ label: "Dark", value: "dark", icon:
|
|
638
|
+
T({ label: "System", value: "system", icon: u.adjustments.horizontal }),
|
|
639
|
+
T({ label: "Light", value: "light", icon: u.sun }),
|
|
640
|
+
T({ label: "Dark", value: "dark", icon: u.moon })
|
|
635
641
|
])
|
|
636
642
|
]);
|
|
637
643
|
},
|
|
@@ -646,7 +652,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
646
652
|
};
|
|
647
653
|
}
|
|
648
654
|
}
|
|
649
|
-
),
|
|
655
|
+
), zt = y(
|
|
650
656
|
{
|
|
651
657
|
/**
|
|
652
658
|
* The initial state of the Toggle.
|
|
@@ -691,34 +697,34 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
691
697
|
bind: this.bind,
|
|
692
698
|
required: this.required
|
|
693
699
|
}),
|
|
694
|
-
|
|
700
|
+
i({
|
|
695
701
|
class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
|
|
696
702
|
onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
|
|
697
703
|
})
|
|
698
704
|
]);
|
|
699
705
|
}
|
|
700
706
|
}
|
|
701
|
-
),
|
|
707
|
+
), D = {
|
|
702
708
|
ONLINE: "online",
|
|
703
709
|
OFFLINE: "offline",
|
|
704
710
|
BUSY: "busy",
|
|
705
711
|
AWAY: "away"
|
|
706
|
-
},
|
|
712
|
+
}, b = {
|
|
707
713
|
ONLINE: "bg-green-500",
|
|
708
714
|
OFFLINE: "bg-gray-500",
|
|
709
715
|
BUSY: "bg-red-500",
|
|
710
716
|
AWAY: "bg-yellow-500"
|
|
711
|
-
},
|
|
712
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
713
|
-
}),
|
|
717
|
+
}, Ve = (e = "") => (e = e.toUpperCase(), b[e] || b.OFFLINE), Et = (e) => n({
|
|
718
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ve(e)}`
|
|
719
|
+
}), jt = ({ propName: e = "status" } = {}) => n({
|
|
714
720
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
715
721
|
onSet: [e, {
|
|
716
|
-
[
|
|
717
|
-
[
|
|
718
|
-
[
|
|
719
|
-
[
|
|
722
|
+
[b.ONLINE]: D.ONLINE,
|
|
723
|
+
[b.OFFLINE]: D.OFFLINE,
|
|
724
|
+
[b.BUSY]: D.BUSY,
|
|
725
|
+
[b.AWAY]: D.AWAY
|
|
720
726
|
}]
|
|
721
|
-
}),
|
|
727
|
+
}), Ot = k(
|
|
722
728
|
{
|
|
723
729
|
/**
|
|
724
730
|
* Get the initial state for the component.
|
|
@@ -785,7 +791,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
785
791
|
htmlFor: e,
|
|
786
792
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
787
793
|
}, [
|
|
788
|
-
|
|
794
|
+
g(u.upload),
|
|
789
795
|
n("Upload logo")
|
|
790
796
|
])
|
|
791
797
|
)
|
|
@@ -793,22 +799,22 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
793
799
|
]);
|
|
794
800
|
}
|
|
795
801
|
}
|
|
796
|
-
),
|
|
802
|
+
), Re = (e, t) => q(
|
|
797
803
|
{
|
|
798
804
|
href: e,
|
|
799
805
|
"aria-current": t === "Breadcrumb" && "page",
|
|
800
806
|
// Only set aria-current on the last item
|
|
801
807
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
802
808
|
},
|
|
803
|
-
[
|
|
804
|
-
),
|
|
809
|
+
[i(t)]
|
|
810
|
+
), qe = () => g({
|
|
805
811
|
class: "mx-3 text-muted-foreground",
|
|
806
812
|
"aria-hidden": !0,
|
|
807
813
|
size: "xs"
|
|
808
|
-
},
|
|
809
|
-
e.href ?
|
|
810
|
-
e.separator &&
|
|
811
|
-
]),
|
|
814
|
+
}, u.chevron.single.right), He = (e) => n({ class: "flex items-center" }, [
|
|
815
|
+
e.href ? Re(e.href, e.label) : i(e.label),
|
|
816
|
+
e.separator && qe()
|
|
817
|
+
]), Ut = k(
|
|
812
818
|
{
|
|
813
819
|
/**
|
|
814
820
|
* Set initial data
|
|
@@ -837,7 +843,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
837
843
|
n({
|
|
838
844
|
role: "list",
|
|
839
845
|
class: "flex items-center",
|
|
840
|
-
for: ["items", (t, s) =>
|
|
846
|
+
for: ["items", (t, s) => He({
|
|
841
847
|
href: t.href,
|
|
842
848
|
label: t.label,
|
|
843
849
|
separator: s < e
|
|
@@ -856,8 +862,8 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
856
862
|
"2xl": "h-16 w-16",
|
|
857
863
|
"3xl": "h-24 w-24",
|
|
858
864
|
default: "h-4 w-4"
|
|
859
|
-
},
|
|
860
|
-
|
|
865
|
+
}, Ye = (e) => E[e] || E.default, _e = ({ index: e, size: t }) => n({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
|
|
866
|
+
i({
|
|
861
867
|
class: "block w-full h-full rounded-full transition-colors",
|
|
862
868
|
onSet: ["activeIndex", {
|
|
863
869
|
"bg-primary": e,
|
|
@@ -867,10 +873,10 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
867
873
|
o.activeIndex = e, l && l(e);
|
|
868
874
|
}
|
|
869
875
|
})
|
|
870
|
-
]),
|
|
876
|
+
]), We = (e, t) => Array.from({ length: e }, (s, o) => _e({
|
|
871
877
|
index: o,
|
|
872
878
|
size: t
|
|
873
|
-
})),
|
|
879
|
+
})), Vt = k(
|
|
874
880
|
{
|
|
875
881
|
/**
|
|
876
882
|
* Defines component data (props).
|
|
@@ -892,7 +898,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
892
898
|
* @returns {object}
|
|
893
899
|
*/
|
|
894
900
|
render() {
|
|
895
|
-
const e = this.gap || "gap-2", t =
|
|
901
|
+
const e = this.gap || "gap-2", t = Ye(this.size || "sm"), s = We(this.data.count, t);
|
|
896
902
|
return n(
|
|
897
903
|
{ class: "flex justify-center items-center py-2" },
|
|
898
904
|
[
|
|
@@ -901,37 +907,37 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
901
907
|
);
|
|
902
908
|
}
|
|
903
909
|
}
|
|
904
|
-
),
|
|
910
|
+
), Ge = ({ toggleDropdown: e }) => f(
|
|
905
911
|
{
|
|
906
912
|
cache: "button",
|
|
907
913
|
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",
|
|
908
914
|
click: e
|
|
909
915
|
},
|
|
910
916
|
[
|
|
911
|
-
|
|
912
|
-
|
|
917
|
+
i({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
918
|
+
p({ html: u.chevron.upDown })
|
|
913
919
|
]
|
|
914
|
-
),
|
|
920
|
+
), Je = (e, t, s) => U({
|
|
915
921
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
916
922
|
click: () => t(e),
|
|
917
923
|
onState: [s, "selectedValue", { "bg-secondary": e.value }]
|
|
918
924
|
}, [
|
|
919
|
-
e.icon &&
|
|
920
|
-
|
|
921
|
-
]),
|
|
922
|
-
V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) =>
|
|
923
|
-
]),
|
|
925
|
+
e.icon && i({ class: "mr-2 flex items-baseline" }, [g({ size: "xs" }, e.icon)]),
|
|
926
|
+
i({ class: "text-base font-normal" }, e.label)
|
|
927
|
+
]), Ke = (e, t) => n({ class: "w-full border rounded-md" }, [
|
|
928
|
+
V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Je(s, e, t)] })
|
|
929
|
+
]), Qe = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
|
|
924
930
|
x(
|
|
925
931
|
"open",
|
|
926
|
-
(s, o, l) => s ? new
|
|
932
|
+
(s, o, l) => s ? new S({
|
|
927
933
|
cache: "dropdown",
|
|
928
934
|
parent: l,
|
|
929
935
|
button: l.button
|
|
930
936
|
}, [
|
|
931
|
-
|
|
937
|
+
Ke(e, t)
|
|
932
938
|
]) : null
|
|
933
939
|
)
|
|
934
|
-
]),
|
|
940
|
+
]), Rt = k(
|
|
935
941
|
{
|
|
936
942
|
/**
|
|
937
943
|
* This will set up the data.
|
|
@@ -1012,8 +1018,8 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1012
1018
|
const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
|
|
1013
1019
|
return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
|
|
1014
1020
|
// @ts-ignore
|
|
1015
|
-
|
|
1016
|
-
|
|
1021
|
+
Ge({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
1022
|
+
Qe({
|
|
1017
1023
|
// @ts-ignore
|
|
1018
1024
|
state: this.state,
|
|
1019
1025
|
// @ts-ignore
|
|
@@ -1033,26 +1039,26 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1033
1039
|
]);
|
|
1034
1040
|
}
|
|
1035
1041
|
}
|
|
1036
|
-
),
|
|
1042
|
+
), G = ({ icon: e, click: t, ariaLabel: s }) => h({
|
|
1037
1043
|
variant: "icon",
|
|
1038
1044
|
class: "flex flex-none",
|
|
1039
1045
|
click: t,
|
|
1040
1046
|
icon: e,
|
|
1041
1047
|
"aria-label": s
|
|
1042
|
-
}),
|
|
1043
|
-
icon:
|
|
1048
|
+
}), Xe = ({ click: e }) => G({
|
|
1049
|
+
icon: u.circleMinus,
|
|
1044
1050
|
click: e,
|
|
1045
1051
|
ariaLabel: "Decrement"
|
|
1046
|
-
}),
|
|
1047
|
-
icon:
|
|
1052
|
+
}), Ze = ({ click: e }) => G({
|
|
1053
|
+
icon: u.circlePlus,
|
|
1048
1054
|
click: e,
|
|
1049
1055
|
ariaLabel: "Increment"
|
|
1050
|
-
}),
|
|
1056
|
+
}), et = ({ bind: e, min: t, max: s, readonly: o = !1 }) => H(({ state: l }) => w({
|
|
1051
1057
|
value: ["[[count]]", l],
|
|
1052
1058
|
bind: e,
|
|
1053
|
-
blur: (r, { state:
|
|
1054
|
-
let
|
|
1055
|
-
isNaN(
|
|
1059
|
+
blur: (r, { state: a }) => {
|
|
1060
|
+
let d = parseInt(r.target.value, 10);
|
|
1061
|
+
isNaN(d) && (d = t ?? 0), t !== void 0 && (d = Math.max(d, t)), s !== void 0 && (d = Math.min(d, s)), a.count = d;
|
|
1056
1062
|
},
|
|
1057
1063
|
class: "flex flex-auto text-lg font-medium bg-input text-center border min-w-0",
|
|
1058
1064
|
readonly: o,
|
|
@@ -1060,7 +1066,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1060
1066
|
max: s,
|
|
1061
1067
|
type: "number",
|
|
1062
1068
|
"aria-label": "Counter"
|
|
1063
|
-
})),
|
|
1069
|
+
})), qt = y(
|
|
1064
1070
|
{
|
|
1065
1071
|
/**
|
|
1066
1072
|
* Initial state for the counter component.
|
|
@@ -1083,34 +1089,34 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1083
1089
|
render() {
|
|
1084
1090
|
const e = this.class ?? "";
|
|
1085
1091
|
return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
|
|
1086
|
-
|
|
1087
|
-
|
|
1092
|
+
Xe({ click: () => this.state.decrement("count") }),
|
|
1093
|
+
et({
|
|
1088
1094
|
bind: this.bind,
|
|
1089
1095
|
readonly: this.readonly,
|
|
1090
1096
|
min: this.min,
|
|
1091
1097
|
max: this.max
|
|
1092
1098
|
}),
|
|
1093
|
-
|
|
1099
|
+
Ze({ click: () => this.state.increment("count") })
|
|
1094
1100
|
]);
|
|
1095
1101
|
}
|
|
1096
1102
|
}
|
|
1097
|
-
),
|
|
1103
|
+
), tt = ({ bind: e, required: t }) => w({
|
|
1098
1104
|
cache: "input",
|
|
1099
1105
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1100
1106
|
bind: e,
|
|
1101
1107
|
required: t
|
|
1102
|
-
}),
|
|
1108
|
+
}), st = ({ bind: e, required: t, toggleOpen: s }) => f({
|
|
1103
1109
|
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",
|
|
1104
1110
|
click: s
|
|
1105
1111
|
}, [
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
onState: ["selectedDate", (o) => o ?
|
|
1112
|
+
tt({ bind: e, required: t }),
|
|
1113
|
+
i({
|
|
1114
|
+
onState: ["selectedDate", (o) => o ? F.format("standard", o) : "Pick a date"]
|
|
1109
1115
|
}),
|
|
1110
|
-
|
|
1111
|
-
]),
|
|
1116
|
+
p({ html: u.calendar.days })
|
|
1117
|
+
]), ot = ({ handleDateSelect: e, blockPriorDates: t }) => x(
|
|
1112
1118
|
"open",
|
|
1113
|
-
(s, o, l) => s ? new
|
|
1119
|
+
(s, o, l) => s ? new S({
|
|
1114
1120
|
cache: "dropdown",
|
|
1115
1121
|
parent: l,
|
|
1116
1122
|
button: l.panel,
|
|
@@ -1122,7 +1128,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1122
1128
|
blockPriorDates: t
|
|
1123
1129
|
})
|
|
1124
1130
|
]) : null
|
|
1125
|
-
),
|
|
1131
|
+
), Ht = y(
|
|
1126
1132
|
{
|
|
1127
1133
|
/**
|
|
1128
1134
|
* The initial state of the DatePicker.
|
|
@@ -1154,50 +1160,50 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1154
1160
|
this.state.selectedDate = s, this.state.open = !1, this.input.value = s, typeof this.onChange == "function" && this.onChange(s);
|
|
1155
1161
|
};
|
|
1156
1162
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1157
|
-
|
|
1163
|
+
st({
|
|
1158
1164
|
toggleOpen: e,
|
|
1159
1165
|
bind: this.bind,
|
|
1160
1166
|
required: this.required
|
|
1161
1167
|
}),
|
|
1162
|
-
|
|
1168
|
+
ot({
|
|
1163
1169
|
handleDateSelect: t,
|
|
1164
1170
|
blockPriorDates: this.blockPriorDates || !1
|
|
1165
1171
|
})
|
|
1166
1172
|
]);
|
|
1167
1173
|
}
|
|
1168
1174
|
}
|
|
1169
|
-
),
|
|
1175
|
+
), nt = ({ bind: e, required: t }) => w({
|
|
1170
1176
|
cache: "input",
|
|
1171
1177
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1172
1178
|
bind: e,
|
|
1173
1179
|
required: t
|
|
1174
|
-
}),
|
|
1180
|
+
}), lt = ({ bind: e, required: t, toggleOpen: s }) => f({
|
|
1175
1181
|
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",
|
|
1176
1182
|
click: s
|
|
1177
1183
|
}, [
|
|
1178
|
-
|
|
1184
|
+
nt({ bind: e, required: t }),
|
|
1179
1185
|
H(({ state: o }) => [
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1186
|
+
i(P.date(["[[start]]", o], "Start Date")),
|
|
1187
|
+
i(" - "),
|
|
1188
|
+
i(P.date(["[[end]]", o], "End Date"))
|
|
1183
1189
|
]),
|
|
1184
|
-
|
|
1185
|
-
]),
|
|
1190
|
+
p({ html: u.calendar.days })
|
|
1191
|
+
]), rt = ({ handleDateSelect: e, blockPriorDates: t }) => x(
|
|
1186
1192
|
"open",
|
|
1187
|
-
(s, o, l) => s ? new
|
|
1193
|
+
(s, o, l) => s ? new S({
|
|
1188
1194
|
cache: "dropdown",
|
|
1189
1195
|
parent: l,
|
|
1190
1196
|
button: l.panel,
|
|
1191
1197
|
size: "xl"
|
|
1192
1198
|
}, [
|
|
1193
|
-
new
|
|
1199
|
+
new ae({
|
|
1194
1200
|
startDate: l.state.start,
|
|
1195
1201
|
endDate: l.state.end,
|
|
1196
1202
|
onRangeSelect: e,
|
|
1197
1203
|
blockPriorDates: t
|
|
1198
1204
|
})
|
|
1199
1205
|
]) : null
|
|
1200
|
-
),
|
|
1206
|
+
), Yt = y(
|
|
1201
1207
|
{
|
|
1202
1208
|
/**
|
|
1203
1209
|
* The initial state of the DateRangePicker.
|
|
@@ -1233,28 +1239,28 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
|
1233
1239
|
this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, typeof this.onChange == "function" && this.onChange({ start: s, end: o }, this.parent);
|
|
1234
1240
|
};
|
|
1235
1241
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1236
|
-
|
|
1242
|
+
lt({
|
|
1237
1243
|
toggleOpen: e,
|
|
1238
1244
|
bind: this.bind,
|
|
1239
1245
|
required: this.required
|
|
1240
1246
|
}),
|
|
1241
|
-
|
|
1247
|
+
rt({
|
|
1242
1248
|
handleDateSelect: t,
|
|
1243
1249
|
blockPriorDates: this.blockPriorDates || !1
|
|
1244
1250
|
})
|
|
1245
1251
|
]);
|
|
1246
1252
|
}
|
|
1247
1253
|
}
|
|
1248
|
-
),
|
|
1249
|
-
new
|
|
1254
|
+
), _t = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => te([
|
|
1255
|
+
new he({
|
|
1250
1256
|
dateTime: e,
|
|
1251
1257
|
filter: s || ((o) => {
|
|
1252
|
-
const l =
|
|
1253
|
-
return
|
|
1258
|
+
const l = F.getLocalTime(o, !0, !1, t);
|
|
1259
|
+
return F.getTimeFrame(l);
|
|
1254
1260
|
})
|
|
1255
1261
|
})
|
|
1256
1262
|
]);
|
|
1257
|
-
function
|
|
1263
|
+
function at({ bind: e, required: t }) {
|
|
1258
1264
|
return w({
|
|
1259
1265
|
cache: "input",
|
|
1260
1266
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
@@ -1262,18 +1268,18 @@ function lt({ bind: e, required: t }) {
|
|
|
1262
1268
|
required: t
|
|
1263
1269
|
});
|
|
1264
1270
|
}
|
|
1265
|
-
function
|
|
1271
|
+
function it({ bind: e, required: t, toggleOpen: s }) {
|
|
1266
1272
|
return f(
|
|
1267
1273
|
{
|
|
1268
1274
|
class: "relative flex items-center gap-2 w-full justify-between border bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1269
1275
|
click: s
|
|
1270
1276
|
},
|
|
1271
1277
|
[
|
|
1272
|
-
|
|
1273
|
-
|
|
1278
|
+
at({ bind: e, required: t }),
|
|
1279
|
+
i({
|
|
1274
1280
|
onState: ["selectedTime", (o) => o || "Pick a time"]
|
|
1275
1281
|
}),
|
|
1276
|
-
|
|
1282
|
+
p({ html: u.clock })
|
|
1277
1283
|
]
|
|
1278
1284
|
);
|
|
1279
1285
|
}
|
|
@@ -1281,20 +1287,20 @@ function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1
|
|
|
1281
1287
|
return n(
|
|
1282
1288
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
1283
1289
|
e.map((r) => {
|
|
1284
|
-
let
|
|
1290
|
+
let a = l ? r.toString().padStart(2, "0") : r.toString();
|
|
1285
1291
|
return f({
|
|
1286
|
-
text:
|
|
1292
|
+
text: a,
|
|
1287
1293
|
class: "hover:bg-muted/50 rounded-md px-2 py-1",
|
|
1288
|
-
click: () => t({ [o]:
|
|
1289
|
-
onState: [s, o, { "bg-muted":
|
|
1294
|
+
click: () => t({ [o]: a }),
|
|
1295
|
+
onState: [s, o, { "bg-muted": a }]
|
|
1290
1296
|
});
|
|
1291
1297
|
})
|
|
1292
1298
|
);
|
|
1293
1299
|
}
|
|
1294
|
-
function
|
|
1300
|
+
function ct({ handleTimeSelect: e }) {
|
|
1295
1301
|
return x(
|
|
1296
1302
|
"open",
|
|
1297
|
-
(t, s, o) => t ? new
|
|
1303
|
+
(t, s, o) => t ? new S(
|
|
1298
1304
|
{
|
|
1299
1305
|
cache: "dropdown",
|
|
1300
1306
|
parent: o,
|
|
@@ -1345,14 +1351,14 @@ function j(e) {
|
|
|
1345
1351
|
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
1346
1352
|
if (!s)
|
|
1347
1353
|
return { hour: null, minute: null, meridian: null };
|
|
1348
|
-
let [, o, l, , r] = s,
|
|
1349
|
-
return
|
|
1350
|
-
hour:
|
|
1351
|
-
minute:
|
|
1354
|
+
let [, o, l, , r] = s, a = parseInt(o, 10), d = parseInt(l, 10);
|
|
1355
|
+
return a < 0 || a > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (r ? (r = r.toUpperCase(), r === "PM" && a < 12 ? a += 12 : r === "AM" && a === 12 && (a = 12)) : a === 0 ? (r = "AM", a = 12) : a < 12 ? r = "AM" : a === 12 ? r = "PM" : (r = "PM", a -= 12), {
|
|
1356
|
+
hour: a.toString().padStart(2, "0"),
|
|
1357
|
+
minute: d.toString().padStart(2, "0"),
|
|
1352
1358
|
meridian: r
|
|
1353
1359
|
});
|
|
1354
1360
|
}
|
|
1355
|
-
const
|
|
1361
|
+
const Wt = y(
|
|
1356
1362
|
{
|
|
1357
1363
|
/**
|
|
1358
1364
|
* The initial shallow state of the TimePicker.
|
|
@@ -1400,23 +1406,23 @@ const Rt = y(
|
|
|
1400
1406
|
return n(
|
|
1401
1407
|
{ class: "relative w-full max-w-[320px]" },
|
|
1402
1408
|
[
|
|
1403
|
-
|
|
1409
|
+
it({
|
|
1404
1410
|
toggleOpen: e,
|
|
1405
1411
|
bind: this.bind,
|
|
1406
1412
|
required: this.required
|
|
1407
1413
|
}),
|
|
1408
|
-
|
|
1414
|
+
ct({
|
|
1409
1415
|
handleTimeSelect: t
|
|
1410
1416
|
})
|
|
1411
1417
|
]
|
|
1412
1418
|
);
|
|
1413
1419
|
}
|
|
1414
1420
|
}
|
|
1415
|
-
),
|
|
1416
|
-
|
|
1417
|
-
]),
|
|
1418
|
-
|
|
1419
|
-
]),
|
|
1421
|
+
), dt = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
1422
|
+
g({ size: "lg" }, e)
|
|
1423
|
+
]), ut = ({ title: e }) => I({ class: "flex flex-auto items-center" }, [
|
|
1424
|
+
v({ class: "text-lg font-semibold" }, e)
|
|
1425
|
+
]), ht = c((e, t) => se(
|
|
1420
1426
|
{
|
|
1421
1427
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
1422
1428
|
rounded-lg flex flex-auto flex-col
|
|
@@ -1427,18 +1433,18 @@ const Rt = y(
|
|
|
1427
1433
|
[
|
|
1428
1434
|
n({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
|
|
1429
1435
|
// Icon and content
|
|
1430
|
-
e.icon &&
|
|
1436
|
+
e.icon && dt(e.icon, e.iconColor),
|
|
1431
1437
|
n({ class: "flex flex-auto flex-col gap-4" }, [
|
|
1432
1438
|
n({ class: "flex flex-auto flex-col space-y-2" }, [
|
|
1433
|
-
|
|
1434
|
-
e.description &&
|
|
1439
|
+
ut(e),
|
|
1440
|
+
e.description && m({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
1435
1441
|
n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
1436
1442
|
]),
|
|
1437
|
-
e.buttons &&
|
|
1443
|
+
e.buttons && A({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
|
|
1438
1444
|
])
|
|
1439
1445
|
])
|
|
1440
1446
|
]
|
|
1441
|
-
)),
|
|
1447
|
+
)), ft = (e) => Y.render(e, app.root), O = {
|
|
1442
1448
|
info: {
|
|
1443
1449
|
borderColor: "border-blue-500",
|
|
1444
1450
|
bgColor: "bg-muted/10",
|
|
@@ -1465,7 +1471,7 @@ const Rt = y(
|
|
|
1465
1471
|
iconColor: "text-muted-foreground"
|
|
1466
1472
|
}
|
|
1467
1473
|
};
|
|
1468
|
-
class
|
|
1474
|
+
class mt extends C {
|
|
1469
1475
|
/**
|
|
1470
1476
|
* This will declare the props for the compiler.
|
|
1471
1477
|
*
|
|
@@ -1480,12 +1486,12 @@ class ht extends v {
|
|
|
1480
1486
|
* @returns {object}
|
|
1481
1487
|
*/
|
|
1482
1488
|
render() {
|
|
1483
|
-
const t = (
|
|
1484
|
-
|
|
1485
|
-
}, { borderColor: s, bgColor: o, iconColor: l } = O[this.type] || O.default, r = `${this.getMainClass()} ${o} ${s}`,
|
|
1486
|
-
return
|
|
1489
|
+
const t = (d) => {
|
|
1490
|
+
d.target === this.panel && this.close();
|
|
1491
|
+
}, { borderColor: s, bgColor: o, iconColor: l } = O[this.type] || O.default, r = `${this.getMainClass()} ${o} ${s}`, a = this.title || "Dialog Title";
|
|
1492
|
+
return ht({
|
|
1487
1493
|
class: r,
|
|
1488
|
-
title:
|
|
1494
|
+
title: a,
|
|
1489
1495
|
click: t,
|
|
1490
1496
|
icon: this.icon,
|
|
1491
1497
|
iconColor: l,
|
|
@@ -1527,7 +1533,7 @@ class ht extends v {
|
|
|
1527
1533
|
* @returns {void}
|
|
1528
1534
|
*/
|
|
1529
1535
|
open() {
|
|
1530
|
-
|
|
1536
|
+
ft(this), this.panel.showModal(), this.state.open = !0;
|
|
1531
1537
|
}
|
|
1532
1538
|
/**
|
|
1533
1539
|
* This will close the modal.
|
|
@@ -1538,7 +1544,7 @@ class ht extends v {
|
|
|
1538
1544
|
this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
|
|
1539
1545
|
}
|
|
1540
1546
|
}
|
|
1541
|
-
class
|
|
1547
|
+
class Gt extends mt {
|
|
1542
1548
|
/**
|
|
1543
1549
|
* This will declare the props for the compiler.
|
|
1544
1550
|
*
|
|
@@ -1568,63 +1574,66 @@ class qt extends ht {
|
|
|
1568
1574
|
this.confirmed && this.confirmed(), this.close();
|
|
1569
1575
|
}
|
|
1570
1576
|
}
|
|
1571
|
-
const
|
|
1577
|
+
const Jt = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
1572
1578
|
W({ class: "flex flex-auto flex-col" }, [
|
|
1573
1579
|
n({ class: "flex flex-auto flex-col space-y-4" }, [
|
|
1574
1580
|
n({ class: "flex flex-auto items-center justify-center" }, [
|
|
1575
1581
|
e.icon && n({ class: "w-16 h-16 mb-2 text-primary" }, [
|
|
1576
|
-
|
|
1582
|
+
g(e.icon)
|
|
1577
1583
|
])
|
|
1578
1584
|
]),
|
|
1579
1585
|
I({ class: "py-4 text-center" }, [
|
|
1580
|
-
|
|
1581
|
-
|
|
1586
|
+
v({ class: "text-xl font-bold" }, e.title),
|
|
1587
|
+
m({ class: "pb-8 text-muted-foreground" }, e.description || ""),
|
|
1582
1588
|
...t
|
|
1583
1589
|
])
|
|
1584
1590
|
])
|
|
1585
1591
|
])
|
|
1586
1592
|
]));
|
|
1587
1593
|
export {
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1594
|
+
kt as A,
|
|
1595
|
+
Ut as B,
|
|
1596
|
+
Lt as C,
|
|
1597
|
+
ge as D,
|
|
1598
|
+
Ht as E,
|
|
1599
|
+
De as F,
|
|
1600
|
+
Yt as G,
|
|
1601
|
+
_t as H,
|
|
1602
|
+
Wt as I,
|
|
1603
|
+
Gt as J,
|
|
1604
|
+
ht as K,
|
|
1605
|
+
Ot as L,
|
|
1606
|
+
Pt as M,
|
|
1607
|
+
Mt as N,
|
|
1608
|
+
mt as O,
|
|
1609
|
+
Ze as P,
|
|
1610
|
+
Jt as Q,
|
|
1611
|
+
At as S,
|
|
1612
|
+
Nt as T,
|
|
1613
|
+
ye as a,
|
|
1614
|
+
St as b,
|
|
1615
|
+
Ce as c,
|
|
1616
|
+
Ie as d,
|
|
1617
|
+
$e as e,
|
|
1618
|
+
Te as f,
|
|
1619
|
+
Dt as g,
|
|
1620
|
+
It as h,
|
|
1621
|
+
$t as i,
|
|
1622
|
+
Fe as j,
|
|
1623
|
+
Tt as k,
|
|
1624
|
+
W as l,
|
|
1625
|
+
Bt as m,
|
|
1617
1626
|
Ft as n,
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1627
|
+
je as o,
|
|
1628
|
+
zt as p,
|
|
1629
|
+
Et as q,
|
|
1630
|
+
jt as r,
|
|
1631
|
+
D as s,
|
|
1632
|
+
b as t,
|
|
1633
|
+
Ve as u,
|
|
1634
|
+
Vt as v,
|
|
1635
|
+
Rt as w,
|
|
1636
|
+
Xe as x,
|
|
1637
|
+
et as y,
|
|
1638
|
+
qt as z
|
|
1630
1639
|
};
|