@base-framework/ui 1.0.245 → 1.0.247
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/{empty-state-p6_Aiztw.js → empty-state-CtYoGkqL.js} +273 -223
- package/dist/{format-Cl7IxNS8.js → format-DnofNaaz.js} +1 -1
- package/dist/icons.es.js +3 -0
- package/dist/index.es.js +101 -100
- package/dist/molecules.es.js +24 -23
- package/dist/types/components/molecules/image/logo-uploader.d.ts +9 -0
- package/dist/types/components/molecules/molecules.d.ts +1 -0
- package/dist/utils.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Div as n, H5 as
|
|
2
|
-
import { Atom as c, Component as v, Html as
|
|
3
|
-
import { P as
|
|
4
|
-
import { B as h, I as
|
|
1
|
+
import { Div as n, H5 as G, P as b, I as m, Li as V, Span as i, Ul as U, Button as f, OnState as x, Label as q, Form as K, H2 as D, Header as I, Footer as L, A as H, H3 as Q, Checkbox as X, Input as w, Img as Z, Nav as ee, UseParent as R, Time as te, Dialog as se } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as v, Html as P, Dom as oe, base as ne, Data as $, Builder as Y, Jot as C, DateTime as A } from "@base-framework/base";
|
|
3
|
+
import { P as k, b as le, R as re } from "./range-calendar-k0B4ZWJq.js";
|
|
4
|
+
import { B as h, I as p } from "./buttons-Cm9etaEG.js";
|
|
5
5
|
import { Icons as u } from "./icons.es.js";
|
|
6
|
-
import { Timer as
|
|
7
|
-
import { a as
|
|
8
|
-
import { F as
|
|
6
|
+
import { Timer as ae, List as ie, DynamicTime as ce } from "@base-framework/organisms";
|
|
7
|
+
import { a as y } from "./veil-D4dRxILB.js";
|
|
8
|
+
import { F as M } from "./format-DnofNaaz.js";
|
|
9
9
|
const F = {
|
|
10
10
|
info: {
|
|
11
11
|
borderColor: "border-blue-500",
|
|
@@ -32,20 +32,20 @@ const F = {
|
|
|
32
32
|
bgColor: "bg-muted/10",
|
|
33
33
|
iconColor: "text-muted-foreground"
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
]),
|
|
35
|
+
}, de = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
36
|
+
m({ html: e })
|
|
37
|
+
]), ue = (e) => G({ class: "font-semibold" }, e), he = (e) => b({ class: "text-sm text-muted-foreground" }, e), yt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
|
|
38
38
|
const { borderColor: l, bgColor: r, iconColor: a } = F[o] || F.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 && de(s, a),
|
|
42
42
|
n({ class: "flex flex-col" }, [
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
ue(e),
|
|
44
|
+
he(t)
|
|
45
45
|
])
|
|
46
46
|
]);
|
|
47
47
|
});
|
|
48
|
-
class
|
|
48
|
+
class fe extends v {
|
|
49
49
|
/**
|
|
50
50
|
* This will declare the props for the compiler.
|
|
51
51
|
*
|
|
@@ -63,27 +63,27 @@ class he extends v {
|
|
|
63
63
|
this.prepareDestroy(), this.removeContext();
|
|
64
64
|
const t = this.panel, s = this.removingClass;
|
|
65
65
|
if (!s) {
|
|
66
|
-
|
|
66
|
+
P.removeElement(t);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
oe.addClass(t, s), ne.on("animationend", t, (o) => P.removeElement(t));
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
const me = (e) => i({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
|
|
72
|
+
const me = (e) => i({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), pe = (e) => i({ class: "flex w-4 h-4", html: e }), ge = (e) => i({ class: "flex-auto" }, e), be = (e, t) => V({
|
|
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
|
-
|
|
76
|
+
e.icon && pe(e.icon),
|
|
77
|
+
ge(e.label),
|
|
78
78
|
e.shortcut && me(e.shortcut)
|
|
79
|
-
]),
|
|
80
|
-
e.map((s) =>
|
|
81
|
-
]),
|
|
79
|
+
]), xe = (e, t) => U({ class: "grid gap-2" }, [
|
|
80
|
+
e.map((s) => be(s, t))
|
|
81
|
+
]), we = (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) => xe(t, e)]
|
|
85
85
|
})
|
|
86
|
-
]),
|
|
86
|
+
]), ye = ({ label: e, icon: t, toggleDropdown: s }) => f({
|
|
87
87
|
cache: "button",
|
|
88
88
|
class: `inline-flex items-center justify-between rounded-md border border-input
|
|
89
89
|
bg-background px-2 py-2 text-sm font-medium hover:bg-muted
|
|
@@ -91,20 +91,20 @@ const me = (e) => i({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
|
|
|
91
91
|
click: s
|
|
92
92
|
}, [
|
|
93
93
|
e && i(e),
|
|
94
|
-
t &&
|
|
95
|
-
]),
|
|
96
|
-
|
|
94
|
+
t && m({ html: t })
|
|
95
|
+
]), ve = ({ onSelect: e }) => n([
|
|
96
|
+
x(
|
|
97
97
|
"open",
|
|
98
|
-
(t, s, o) => t ? new
|
|
98
|
+
(t, s, o) => t ? new k({
|
|
99
99
|
cache: "dropdown",
|
|
100
100
|
parent: o,
|
|
101
101
|
button: o.button
|
|
102
102
|
}, [
|
|
103
|
-
|
|
103
|
+
we(e)
|
|
104
104
|
]) : null
|
|
105
105
|
)
|
|
106
106
|
]);
|
|
107
|
-
class
|
|
107
|
+
class vt extends v {
|
|
108
108
|
/**
|
|
109
109
|
* This will declare the props for the compiler.
|
|
110
110
|
*
|
|
@@ -119,7 +119,7 @@ class yt extends v {
|
|
|
119
119
|
* @returns {Data}
|
|
120
120
|
*/
|
|
121
121
|
setData() {
|
|
122
|
-
return new
|
|
122
|
+
return new $({
|
|
123
123
|
groups: this.groups || []
|
|
124
124
|
});
|
|
125
125
|
}
|
|
@@ -158,24 +158,24 @@ class yt extends v {
|
|
|
158
158
|
*/
|
|
159
159
|
render() {
|
|
160
160
|
return n({ class: "relative" }, [
|
|
161
|
-
|
|
161
|
+
ye({
|
|
162
162
|
label: this.label,
|
|
163
163
|
icon: this.icon,
|
|
164
164
|
toggleDropdown: this.toggleDropdown.bind(this)
|
|
165
165
|
}),
|
|
166
|
-
|
|
166
|
+
ve({ onSelect: this.handleSelect.bind(this) })
|
|
167
167
|
]);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const Ce = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), ke = c((e, t) => q({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), Se = c((e, t) => b({ ...e, class: "text-sm text-muted-foreground italic" }, t)), De = c((e, t) => b({ ...e, class: "text-sm text-destructive" }, t)), Ie = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", _ = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = _(o.children, t, s)), o.required && Ie(o) ? {
|
|
171
171
|
...o,
|
|
172
172
|
aria: {
|
|
173
173
|
invalid: ["hasError"]
|
|
174
174
|
},
|
|
175
175
|
invalid: s,
|
|
176
176
|
input: t
|
|
177
|
-
} : o)),
|
|
178
|
-
const l =
|
|
177
|
+
} : o)), $e = c((e, t) => {
|
|
178
|
+
const l = _(t, (r) => {
|
|
179
179
|
r.target.checkValidity() && e.setError(null);
|
|
180
180
|
}, (r) => {
|
|
181
181
|
e.setError(r.target.validationMessage);
|
|
@@ -184,7 +184,7 @@ const ve = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
184
184
|
...e,
|
|
185
185
|
class: "w-full"
|
|
186
186
|
}, l);
|
|
187
|
-
}),
|
|
187
|
+
}), Ct = y(
|
|
188
188
|
{
|
|
189
189
|
/**
|
|
190
190
|
* The initial state of the FormField.
|
|
@@ -209,34 +209,34 @@ const ve = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
209
209
|
this.state.error = r, this.state.hasError = !!r;
|
|
210
210
|
};
|
|
211
211
|
return n({ class: "flex flex-auto space-y-4" }, [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
Ce([
|
|
213
|
+
ke({ htmlFor: t }, s),
|
|
214
|
+
$e({
|
|
215
215
|
id: t,
|
|
216
216
|
name: e,
|
|
217
217
|
value: this.state.value,
|
|
218
218
|
setError: l
|
|
219
219
|
}, this.children),
|
|
220
|
-
o &&
|
|
221
|
-
n({ onState: ["error", (r) => r &&
|
|
220
|
+
o && Se({ id: this.getId("description") }, o),
|
|
221
|
+
n({ onState: ["error", (r) => r && De(r)] })
|
|
222
222
|
])
|
|
223
223
|
]);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
),
|
|
226
|
+
), Te = (e, t, s = null) => {
|
|
227
227
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
228
|
-
},
|
|
229
|
-
(e, t) => K({ ...e, submit: (s, o) =>
|
|
230
|
-
),
|
|
231
|
-
e.title &&
|
|
228
|
+
}, W = c(
|
|
229
|
+
(e, t) => K({ ...e, submit: (s, o) => Te(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
230
|
+
), kt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), St = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
|
|
231
|
+
e.title && D({ class: "font-semibold" }, e.title),
|
|
232
232
|
...t
|
|
233
|
-
])),
|
|
233
|
+
])), Dt = (e, t) => n({ class: "flex justify-between" }, [
|
|
234
234
|
i({ class: "text-muted-foreground" }, e),
|
|
235
235
|
i(t)
|
|
236
|
-
]),
|
|
236
|
+
]), It = (e, t) => n({ class: "flex" }, [
|
|
237
237
|
i({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
|
|
238
238
|
i(t)
|
|
239
|
-
]),
|
|
239
|
+
]), Be = ({ 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
240
|
/**
|
|
241
241
|
* Back Button
|
|
242
242
|
*/
|
|
@@ -244,31 +244,31 @@ const ve = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
244
244
|
/**
|
|
245
245
|
* Icon
|
|
246
246
|
*/
|
|
247
|
-
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
247
|
+
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [p(o)]),
|
|
248
248
|
/**
|
|
249
249
|
* Title and Description
|
|
250
250
|
*/
|
|
251
251
|
n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
|
|
252
252
|
n({ class: "flex flex-auto flex-col" }, [
|
|
253
|
-
|
|
253
|
+
D({ class: "text-lg font-semibold m-0 truncate" }, e),
|
|
254
254
|
t && n({ class: "text-sm text-muted-foreground truncate" }, t)
|
|
255
255
|
]),
|
|
256
256
|
...l
|
|
257
257
|
])
|
|
258
|
-
]),
|
|
258
|
+
]), Ae = c((e, t) => n({
|
|
259
259
|
popover: "manual",
|
|
260
260
|
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
261
|
click: (s, o) => {
|
|
262
262
|
s.target === o.panel && (s.preventDefault(), s.stopPropagation(), o.state.open = !1);
|
|
263
263
|
}
|
|
264
264
|
}, [
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
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
|
+
Be(e),
|
|
267
267
|
n({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
|
|
268
|
-
|
|
268
|
+
L({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
269
269
|
])
|
|
270
|
-
])),
|
|
271
|
-
class
|
|
270
|
+
])), Le = (e) => Y.render(e, app.root);
|
|
271
|
+
class $t extends v {
|
|
272
272
|
/**
|
|
273
273
|
* This will declare the props for the compiler.
|
|
274
274
|
*
|
|
@@ -284,7 +284,7 @@ class It extends v {
|
|
|
284
284
|
*/
|
|
285
285
|
render() {
|
|
286
286
|
const t = this.getMainClass(), s = this.title || "", o = this.description || null;
|
|
287
|
-
return
|
|
287
|
+
return Ae(
|
|
288
288
|
{
|
|
289
289
|
class: t,
|
|
290
290
|
title: s,
|
|
@@ -399,7 +399,7 @@ class It extends v {
|
|
|
399
399
|
* @returns {void}
|
|
400
400
|
*/
|
|
401
401
|
open() {
|
|
402
|
-
|
|
402
|
+
Le(this), this.showModal();
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
405
405
|
* This will destroy the modal.
|
|
@@ -428,7 +428,7 @@ class It extends v {
|
|
|
428
428
|
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto";
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
const
|
|
431
|
+
const z = {
|
|
432
432
|
info: {
|
|
433
433
|
bgColor: "bg-muted/10",
|
|
434
434
|
borderColor: "border-blue-500",
|
|
@@ -454,18 +454,18 @@ const N = {
|
|
|
454
454
|
borderColor: "border",
|
|
455
455
|
iconColor: "text-muted-foreground"
|
|
456
456
|
}
|
|
457
|
-
}, Pe = (e) =>
|
|
457
|
+
}, Pe = (e) => I({ class: "flex justify-center" }, [
|
|
458
458
|
Q({ class: "text-lg font-bold mb-0" }, e)
|
|
459
459
|
]), Me = c(({ href: e, class: t }, s) => H({
|
|
460
460
|
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
461
|
href: e,
|
|
462
462
|
role: "alert"
|
|
463
|
-
}, s)),
|
|
463
|
+
}, s)), Fe = c(({ close: e, class: t }, s) => n({
|
|
464
464
|
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
465
|
click: () => e(),
|
|
466
466
|
role: "alert"
|
|
467
467
|
}, s));
|
|
468
|
-
class
|
|
468
|
+
class ze extends fe {
|
|
469
469
|
/**
|
|
470
470
|
* This will declare the props for the compiler.
|
|
471
471
|
*
|
|
@@ -492,7 +492,7 @@ class Fe extends he {
|
|
|
492
492
|
return l ? Me({
|
|
493
493
|
href: l,
|
|
494
494
|
class: `${t} ${s}`
|
|
495
|
-
}, r) :
|
|
495
|
+
}, r) : Fe({
|
|
496
496
|
close: this.close.bind(this),
|
|
497
497
|
class: `${t} ${s}`
|
|
498
498
|
}, r);
|
|
@@ -504,7 +504,7 @@ class Fe extends he {
|
|
|
504
504
|
*/
|
|
505
505
|
afterSetup() {
|
|
506
506
|
const t = this.duration;
|
|
507
|
-
t !== "infinite" && (this.timer = new
|
|
507
|
+
t !== "infinite" && (this.timer = new ae(t, this.close.bind(this)), this.timer.start());
|
|
508
508
|
}
|
|
509
509
|
/**
|
|
510
510
|
* This will get the style properties based on the notification type.
|
|
@@ -513,7 +513,7 @@ class Fe extends he {
|
|
|
513
513
|
*/
|
|
514
514
|
getTypeStyles() {
|
|
515
515
|
const t = this.type || "default";
|
|
516
|
-
return
|
|
516
|
+
return z[t] || z.default;
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
* This will get the buttons for the notification.
|
|
@@ -537,13 +537,13 @@ class Fe extends he {
|
|
|
537
537
|
getChildren(t) {
|
|
538
538
|
return [
|
|
539
539
|
n({ class: "flex items-start" }, [
|
|
540
|
-
this.icon &&
|
|
540
|
+
this.icon && m({ class: `mr-4 ${t}`, html: this.icon }),
|
|
541
541
|
n({ class: "flex flex-auto flex-col" }, [
|
|
542
542
|
n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
543
543
|
this.title && Pe(this.title)
|
|
544
544
|
]),
|
|
545
|
-
|
|
546
|
-
(this.primary || this.secondary) &&
|
|
545
|
+
b({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
546
|
+
(this.primary || this.secondary) && L({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
547
547
|
])
|
|
548
548
|
]),
|
|
549
549
|
h({
|
|
@@ -565,7 +565,7 @@ class Fe extends he {
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
let Ne = 0;
|
|
568
|
-
class
|
|
568
|
+
class Tt extends v {
|
|
569
569
|
/**
|
|
570
570
|
* This will render the component.
|
|
571
571
|
*
|
|
@@ -573,11 +573,11 @@ class $t extends v {
|
|
|
573
573
|
*/
|
|
574
574
|
render() {
|
|
575
575
|
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
|
|
576
|
+
new ie({
|
|
577
577
|
cache: "list",
|
|
578
578
|
key: "id",
|
|
579
579
|
role: "list",
|
|
580
|
-
rowItem: (t) => new
|
|
580
|
+
rowItem: (t) => new ze(t)
|
|
581
581
|
})
|
|
582
582
|
]);
|
|
583
583
|
}
|
|
@@ -600,26 +600,26 @@ class $t extends v {
|
|
|
600
600
|
this.list.delete(t.id);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
const
|
|
603
|
+
const N = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
|
|
604
604
|
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',
|
|
605
605
|
onState: ["method", { active: e }],
|
|
606
606
|
dataSet: ["method", ["state", e, "active"]],
|
|
607
607
|
click: (o, { state: l }) => {
|
|
608
|
-
l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"),
|
|
608
|
+
l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ee(e);
|
|
609
609
|
}
|
|
610
610
|
}, [
|
|
611
|
-
|
|
611
|
+
p(s),
|
|
612
612
|
i(t)
|
|
613
|
-
])),
|
|
613
|
+
])), Ee = (e) => {
|
|
614
614
|
var o;
|
|
615
615
|
const t = document.documentElement;
|
|
616
|
-
if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"),
|
|
616
|
+
if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), N && !N("(prefers-color-scheme: " + e + ")").matches) {
|
|
617
617
|
t.classList.add(e);
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
620
|
const s = e === "light" ? "dark" : "light";
|
|
621
621
|
t.classList.remove(s);
|
|
622
|
-
},
|
|
622
|
+
}, Bt = C(
|
|
623
623
|
{
|
|
624
624
|
/**
|
|
625
625
|
* This will render the component.
|
|
@@ -646,7 +646,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
),
|
|
649
|
+
), At = y(
|
|
650
650
|
{
|
|
651
651
|
/**
|
|
652
652
|
* The initial state of the Toggle.
|
|
@@ -673,7 +673,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
673
673
|
* @returns {object}
|
|
674
674
|
*/
|
|
675
675
|
render() {
|
|
676
|
-
return
|
|
676
|
+
return f({
|
|
677
677
|
class: "relative inline-flex h-6 w-11 min-w-11 items-center rounded-full bg-muted transition-colors focus:outline-none",
|
|
678
678
|
onState: ["active", { "bg-primary": !0, "bg-muted": !1 }],
|
|
679
679
|
click: (t, { state: s }) => {
|
|
@@ -698,27 +698,76 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
698
698
|
]);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
),
|
|
701
|
+
), S = {
|
|
702
702
|
ONLINE: "online",
|
|
703
703
|
OFFLINE: "offline",
|
|
704
704
|
BUSY: "busy",
|
|
705
705
|
AWAY: "away"
|
|
706
|
-
},
|
|
706
|
+
}, g = {
|
|
707
707
|
ONLINE: "bg-green-500",
|
|
708
708
|
OFFLINE: "bg-gray-500",
|
|
709
709
|
BUSY: "bg-red-500",
|
|
710
710
|
AWAY: "bg-yellow-500"
|
|
711
|
-
},
|
|
712
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
711
|
+
}, je = (e = "") => (e = e.toUpperCase(), g[e] || g.OFFLINE), Lt = (e) => n({
|
|
712
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${je(e)}`
|
|
713
713
|
}), Pt = ({ propName: e = "status" } = {}) => n({
|
|
714
714
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
715
715
|
onSet: [e, {
|
|
716
|
-
[
|
|
717
|
-
[
|
|
718
|
-
[
|
|
719
|
-
[
|
|
716
|
+
[g.ONLINE]: S.ONLINE,
|
|
717
|
+
[g.OFFLINE]: S.OFFLINE,
|
|
718
|
+
[g.BUSY]: S.BUSY,
|
|
719
|
+
[g.AWAY]: S.AWAY
|
|
720
720
|
}]
|
|
721
|
-
}),
|
|
721
|
+
}), Mt = C(
|
|
722
|
+
{
|
|
723
|
+
/**
|
|
724
|
+
* Get the initial state for the component.
|
|
725
|
+
*
|
|
726
|
+
* @returns {object} Initial state for the component
|
|
727
|
+
*/
|
|
728
|
+
state() {
|
|
729
|
+
return {
|
|
730
|
+
// @ts-ignore
|
|
731
|
+
loaded: !!this.src
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
/**
|
|
735
|
+
* Render the component.
|
|
736
|
+
*
|
|
737
|
+
* @returns {object} Rendered component
|
|
738
|
+
*/
|
|
739
|
+
render() {
|
|
740
|
+
const e = "logo-upload", t = this.onChange || null;
|
|
741
|
+
return n({ class: "relative w-32 h-32 rounded-full border border-dashed border-muted-foreground flex items-center justify-center cursor-pointer hover:bg-muted transition-colors duration-150 overflow-hidden group" }, [
|
|
742
|
+
w({
|
|
743
|
+
id: e,
|
|
744
|
+
type: "file",
|
|
745
|
+
accept: "image/*",
|
|
746
|
+
class: "hidden",
|
|
747
|
+
change: (s) => {
|
|
748
|
+
var l;
|
|
749
|
+
const o = (l = s.target.files) == null ? void 0 : l[0];
|
|
750
|
+
o && t && (t(o, this.parent), this.src = URL.createObjectURL(o), this.state.loaded = !0);
|
|
751
|
+
}
|
|
752
|
+
}),
|
|
753
|
+
x(
|
|
754
|
+
"loaded",
|
|
755
|
+
(s) => s ? Z({
|
|
756
|
+
// @ts-ignore
|
|
757
|
+
src: this.src,
|
|
758
|
+
class: "absolute inset-0 w-full h-full object-cover rounded-full pointer-events-none"
|
|
759
|
+
}) : q({
|
|
760
|
+
htmlFor: e,
|
|
761
|
+
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground pointer-events-none group-hover:text-primary"
|
|
762
|
+
}, [
|
|
763
|
+
p(u.upload),
|
|
764
|
+
n("Upload logo")
|
|
765
|
+
])
|
|
766
|
+
)
|
|
767
|
+
]);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
), Oe = (e, t) => H(
|
|
722
771
|
{
|
|
723
772
|
href: e,
|
|
724
773
|
"aria-current": t === "Breadcrumb" && "page",
|
|
@@ -726,14 +775,14 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
726
775
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
727
776
|
},
|
|
728
777
|
[i(t)]
|
|
729
|
-
),
|
|
778
|
+
), Ve = () => p({
|
|
730
779
|
class: "mx-3 text-muted-foreground",
|
|
731
780
|
"aria-hidden": !0,
|
|
732
781
|
size: "xs"
|
|
733
|
-
}, u.chevron.single.right),
|
|
734
|
-
e.href ?
|
|
735
|
-
e.separator &&
|
|
736
|
-
]),
|
|
782
|
+
}, u.chevron.single.right), Ue = (e) => n({ class: "flex items-center" }, [
|
|
783
|
+
e.href ? Oe(e.href, e.label) : i(e.label),
|
|
784
|
+
e.separator && Ve()
|
|
785
|
+
]), Ft = C(
|
|
737
786
|
{
|
|
738
787
|
/**
|
|
739
788
|
* Set initial data
|
|
@@ -741,7 +790,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
741
790
|
* @returns {Data}
|
|
742
791
|
*/
|
|
743
792
|
setData() {
|
|
744
|
-
return new
|
|
793
|
+
return new $({
|
|
745
794
|
// @ts-ignore
|
|
746
795
|
items: this.items || []
|
|
747
796
|
});
|
|
@@ -753,7 +802,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
753
802
|
*/
|
|
754
803
|
render() {
|
|
755
804
|
const e = this.data.items.length - 1;
|
|
756
|
-
return
|
|
805
|
+
return ee(
|
|
757
806
|
{
|
|
758
807
|
"aria-label": "Breadcrumb",
|
|
759
808
|
class: "flex items-center space-x-1 text-sm"
|
|
@@ -762,7 +811,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
762
811
|
n({
|
|
763
812
|
role: "list",
|
|
764
813
|
class: "flex items-center",
|
|
765
|
-
for: ["items", (t, s) =>
|
|
814
|
+
for: ["items", (t, s) => Ue({
|
|
766
815
|
href: t.href,
|
|
767
816
|
label: t.label,
|
|
768
817
|
separator: s < e
|
|
@@ -792,10 +841,10 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
792
841
|
o.activeIndex = e, l && l(e);
|
|
793
842
|
}
|
|
794
843
|
})
|
|
795
|
-
]),
|
|
844
|
+
]), Re = (e, t) => Array.from({ length: e }, (s, o) => He({
|
|
796
845
|
index: o,
|
|
797
846
|
size: t
|
|
798
|
-
})),
|
|
847
|
+
})), zt = C(
|
|
799
848
|
{
|
|
800
849
|
/**
|
|
801
850
|
* Defines component data (props).
|
|
@@ -803,7 +852,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
803
852
|
* @returns {Data}
|
|
804
853
|
*/
|
|
805
854
|
setData() {
|
|
806
|
-
return new
|
|
855
|
+
return new $({
|
|
807
856
|
// @ts-ignore
|
|
808
857
|
count: this.count || 4,
|
|
809
858
|
// total dots
|
|
@@ -817,7 +866,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
817
866
|
* @returns {object}
|
|
818
867
|
*/
|
|
819
868
|
render() {
|
|
820
|
-
const e = this.gap || "gap-2", t = qe(this.size || "sm"), s =
|
|
869
|
+
const e = this.gap || "gap-2", t = qe(this.size || "sm"), s = Re(this.data.count, t);
|
|
821
870
|
return n(
|
|
822
871
|
{ class: "flex justify-center items-center py-2" },
|
|
823
872
|
[
|
|
@@ -826,7 +875,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
826
875
|
);
|
|
827
876
|
}
|
|
828
877
|
}
|
|
829
|
-
),
|
|
878
|
+
), Ye = ({ toggleDropdown: e }) => f(
|
|
830
879
|
{
|
|
831
880
|
cache: "button",
|
|
832
881
|
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 border-input bg-background hover:bg-muted h-10 px-4 py-2 justify-between",
|
|
@@ -834,29 +883,29 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
834
883
|
},
|
|
835
884
|
[
|
|
836
885
|
i({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
837
|
-
|
|
886
|
+
m({ html: u.chevron.upDown })
|
|
838
887
|
]
|
|
839
|
-
),
|
|
888
|
+
), _e = (e, t, s) => V({
|
|
840
889
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
841
890
|
click: () => t(e),
|
|
842
891
|
onState: [s, "selectedValue", { "bg-secondary": e.value }]
|
|
843
892
|
}, [
|
|
844
|
-
e.icon && i({ class: "mr-2 flex items-baseline" }, [
|
|
893
|
+
e.icon && i({ class: "mr-2 flex items-baseline" }, [p({ size: "xs" }, e.icon)]),
|
|
845
894
|
i({ class: "text-base font-normal" }, e.label)
|
|
846
|
-
]),
|
|
847
|
-
|
|
848
|
-
]),
|
|
849
|
-
|
|
895
|
+
]), We = (e, t) => n({ class: "w-full border rounded-md" }, [
|
|
896
|
+
U({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => _e(s, e, t)] })
|
|
897
|
+
]), Je = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
|
|
898
|
+
x(
|
|
850
899
|
"open",
|
|
851
|
-
(s, o, l) => s ? new
|
|
900
|
+
(s, o, l) => s ? new k({
|
|
852
901
|
cache: "dropdown",
|
|
853
902
|
parent: l,
|
|
854
903
|
button: l.button
|
|
855
904
|
}, [
|
|
856
|
-
|
|
905
|
+
We(e, t)
|
|
857
906
|
]) : null
|
|
858
907
|
)
|
|
859
|
-
]),
|
|
908
|
+
]), Nt = C(
|
|
860
909
|
{
|
|
861
910
|
/**
|
|
862
911
|
* This will set up the data.
|
|
@@ -864,7 +913,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
864
913
|
* @returns {Data}
|
|
865
914
|
*/
|
|
866
915
|
setData() {
|
|
867
|
-
return new
|
|
916
|
+
return new $({
|
|
868
917
|
// @ts-ignore
|
|
869
918
|
items: this.items || []
|
|
870
919
|
});
|
|
@@ -937,8 +986,8 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
937
986
|
const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
|
|
938
987
|
return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
|
|
939
988
|
// @ts-ignore
|
|
940
|
-
|
|
941
|
-
|
|
989
|
+
Ye({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
990
|
+
Je({
|
|
942
991
|
// @ts-ignore
|
|
943
992
|
state: this.state,
|
|
944
993
|
// @ts-ignore
|
|
@@ -946,7 +995,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
946
995
|
}),
|
|
947
996
|
// Hidden required input for form validation
|
|
948
997
|
// @ts-ignore
|
|
949
|
-
this.required &&
|
|
998
|
+
this.required && w({
|
|
950
999
|
class: "opacity-0 absolute top-0 left-0 z-[1]",
|
|
951
1000
|
type: "text",
|
|
952
1001
|
// @ts-ignore
|
|
@@ -958,21 +1007,21 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
958
1007
|
]);
|
|
959
1008
|
}
|
|
960
1009
|
}
|
|
961
|
-
),
|
|
1010
|
+
), J = ({ icon: e, click: t, ariaLabel: s }) => h({
|
|
962
1011
|
variant: "icon",
|
|
963
1012
|
class: "flex flex-none",
|
|
964
1013
|
click: t,
|
|
965
1014
|
icon: e,
|
|
966
1015
|
"aria-label": s
|
|
967
|
-
}),
|
|
1016
|
+
}), Ge = ({ click: e }) => J({
|
|
968
1017
|
icon: u.circleMinus,
|
|
969
1018
|
click: e,
|
|
970
1019
|
ariaLabel: "Decrement"
|
|
971
|
-
}),
|
|
1020
|
+
}), Ke = ({ click: e }) => J({
|
|
972
1021
|
icon: u.circlePlus,
|
|
973
1022
|
click: e,
|
|
974
1023
|
ariaLabel: "Increment"
|
|
975
|
-
}),
|
|
1024
|
+
}), Qe = ({ bind: e, min: t, max: s, readonly: o = !1 }) => R(({ state: l }) => w({
|
|
976
1025
|
value: ["[[count]]", l],
|
|
977
1026
|
bind: e,
|
|
978
1027
|
blur: (r, { state: a }) => {
|
|
@@ -985,7 +1034,7 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
985
1034
|
max: s,
|
|
986
1035
|
type: "number",
|
|
987
1036
|
"aria-label": "Counter"
|
|
988
|
-
})),
|
|
1037
|
+
})), Et = y(
|
|
989
1038
|
{
|
|
990
1039
|
/**
|
|
991
1040
|
* Initial state for the counter component.
|
|
@@ -1008,46 +1057,46 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1008
1057
|
render() {
|
|
1009
1058
|
const e = this.class ?? "";
|
|
1010
1059
|
return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
|
|
1011
|
-
|
|
1012
|
-
|
|
1060
|
+
Ge({ click: () => this.state.decrement("count") }),
|
|
1061
|
+
Qe({
|
|
1013
1062
|
bind: this.bind,
|
|
1014
1063
|
readonly: this.readonly,
|
|
1015
1064
|
min: this.min,
|
|
1016
1065
|
max: this.max
|
|
1017
1066
|
}),
|
|
1018
|
-
|
|
1067
|
+
Ke({ click: () => this.state.increment("count") })
|
|
1019
1068
|
]);
|
|
1020
1069
|
}
|
|
1021
1070
|
}
|
|
1022
|
-
),
|
|
1071
|
+
), Xe = ({ bind: e, required: t }) => w({
|
|
1023
1072
|
cache: "input",
|
|
1024
1073
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1025
1074
|
bind: e,
|
|
1026
1075
|
required: t
|
|
1027
|
-
}),
|
|
1076
|
+
}), Ze = ({ bind: e, required: t, toggleOpen: s }) => f({
|
|
1028
1077
|
class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1029
1078
|
click: s
|
|
1030
1079
|
}, [
|
|
1031
|
-
|
|
1080
|
+
Xe({ bind: e, required: t }),
|
|
1032
1081
|
i({
|
|
1033
1082
|
onState: ["selectedDate", (o) => o ? A.format("standard", o) : "Pick a date"]
|
|
1034
1083
|
}),
|
|
1035
|
-
|
|
1036
|
-
]),
|
|
1084
|
+
m({ html: u.calendar.days })
|
|
1085
|
+
]), et = ({ handleDateSelect: e, blockPriorDates: t }) => x(
|
|
1037
1086
|
"open",
|
|
1038
|
-
(s, o, l) => s ? new
|
|
1087
|
+
(s, o, l) => s ? new k({
|
|
1039
1088
|
cache: "dropdown",
|
|
1040
1089
|
parent: l,
|
|
1041
1090
|
button: l.panel,
|
|
1042
1091
|
size: "fit"
|
|
1043
1092
|
}, [
|
|
1044
|
-
new
|
|
1093
|
+
new le({
|
|
1045
1094
|
selectedDate: l.state.selectedDate,
|
|
1046
1095
|
selectedCallBack: e,
|
|
1047
1096
|
blockPriorDates: t
|
|
1048
1097
|
})
|
|
1049
1098
|
]) : null
|
|
1050
|
-
),
|
|
1099
|
+
), jt = y(
|
|
1051
1100
|
{
|
|
1052
1101
|
/**
|
|
1053
1102
|
* The initial state of the DatePicker.
|
|
@@ -1079,50 +1128,50 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1079
1128
|
this.state.selectedDate = s, this.state.open = !1, this.input.value = s, typeof this.onChange == "function" && this.onChange(s);
|
|
1080
1129
|
};
|
|
1081
1130
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1082
|
-
|
|
1131
|
+
Ze({
|
|
1083
1132
|
toggleOpen: e,
|
|
1084
1133
|
bind: this.bind,
|
|
1085
1134
|
required: this.required
|
|
1086
1135
|
}),
|
|
1087
|
-
|
|
1136
|
+
et({
|
|
1088
1137
|
handleDateSelect: t,
|
|
1089
1138
|
blockPriorDates: this.blockPriorDates || !1
|
|
1090
1139
|
})
|
|
1091
1140
|
]);
|
|
1092
1141
|
}
|
|
1093
1142
|
}
|
|
1094
|
-
),
|
|
1143
|
+
), tt = ({ bind: e, required: t }) => w({
|
|
1095
1144
|
cache: "input",
|
|
1096
1145
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1097
1146
|
bind: e,
|
|
1098
1147
|
required: t
|
|
1099
|
-
}),
|
|
1148
|
+
}), st = ({ bind: e, required: t, toggleOpen: s }) => f({
|
|
1100
1149
|
class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1101
1150
|
click: s
|
|
1102
1151
|
}, [
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
i(
|
|
1152
|
+
tt({ bind: e, required: t }),
|
|
1153
|
+
R(({ state: o }) => [
|
|
1154
|
+
i(M.date(["[[start]]", o], "Start Date")),
|
|
1106
1155
|
i(" - "),
|
|
1107
|
-
i(
|
|
1156
|
+
i(M.date(["[[end]]", o], "End Date"))
|
|
1108
1157
|
]),
|
|
1109
|
-
|
|
1110
|
-
]),
|
|
1158
|
+
m({ html: u.calendar.days })
|
|
1159
|
+
]), ot = ({ handleDateSelect: e, blockPriorDates: t }) => x(
|
|
1111
1160
|
"open",
|
|
1112
|
-
(s, o, l) => s ? new
|
|
1161
|
+
(s, o, l) => s ? new k({
|
|
1113
1162
|
cache: "dropdown",
|
|
1114
1163
|
parent: l,
|
|
1115
1164
|
button: l.panel,
|
|
1116
1165
|
size: "xl"
|
|
1117
1166
|
}, [
|
|
1118
|
-
new
|
|
1167
|
+
new re({
|
|
1119
1168
|
startDate: l.state.start,
|
|
1120
1169
|
endDate: l.state.end,
|
|
1121
1170
|
onRangeSelect: e,
|
|
1122
1171
|
blockPriorDates: t
|
|
1123
1172
|
})
|
|
1124
1173
|
]) : null
|
|
1125
|
-
),
|
|
1174
|
+
), Ot = y(
|
|
1126
1175
|
{
|
|
1127
1176
|
/**
|
|
1128
1177
|
* The initial state of the DateRangePicker.
|
|
@@ -1158,20 +1207,20 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1158
1207
|
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);
|
|
1159
1208
|
};
|
|
1160
1209
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1161
|
-
|
|
1210
|
+
st({
|
|
1162
1211
|
toggleOpen: e,
|
|
1163
1212
|
bind: this.bind,
|
|
1164
1213
|
required: this.required
|
|
1165
1214
|
}),
|
|
1166
|
-
|
|
1215
|
+
ot({
|
|
1167
1216
|
handleDateSelect: t,
|
|
1168
1217
|
blockPriorDates: this.blockPriorDates || !1
|
|
1169
1218
|
})
|
|
1170
1219
|
]);
|
|
1171
1220
|
}
|
|
1172
1221
|
}
|
|
1173
|
-
),
|
|
1174
|
-
new
|
|
1222
|
+
), Vt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => te([
|
|
1223
|
+
new ce({
|
|
1175
1224
|
dateTime: e,
|
|
1176
1225
|
filter: s || ((o) => {
|
|
1177
1226
|
const l = A.getLocalTime(o, !0, !1, t);
|
|
@@ -1179,26 +1228,26 @@ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1179
1228
|
})
|
|
1180
1229
|
})
|
|
1181
1230
|
]);
|
|
1182
|
-
function
|
|
1183
|
-
return
|
|
1231
|
+
function nt({ bind: e, required: t }) {
|
|
1232
|
+
return w({
|
|
1184
1233
|
cache: "input",
|
|
1185
1234
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1186
1235
|
bind: e,
|
|
1187
1236
|
required: t
|
|
1188
1237
|
});
|
|
1189
1238
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return
|
|
1239
|
+
function lt({ bind: e, required: t, toggleOpen: s }) {
|
|
1240
|
+
return f(
|
|
1192
1241
|
{
|
|
1193
1242
|
class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1194
1243
|
click: s
|
|
1195
1244
|
},
|
|
1196
1245
|
[
|
|
1197
|
-
|
|
1246
|
+
nt({ bind: e, required: t }),
|
|
1198
1247
|
i({
|
|
1199
1248
|
onState: ["selectedTime", (o) => o || "Pick a time"]
|
|
1200
1249
|
}),
|
|
1201
|
-
|
|
1250
|
+
m({ html: u.clock })
|
|
1202
1251
|
]
|
|
1203
1252
|
);
|
|
1204
1253
|
}
|
|
@@ -1207,7 +1256,7 @@ function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1
|
|
|
1207
1256
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
1208
1257
|
e.map((r) => {
|
|
1209
1258
|
let a = l ? r.toString().padStart(2, "0") : r.toString();
|
|
1210
|
-
return
|
|
1259
|
+
return f({
|
|
1211
1260
|
text: a,
|
|
1212
1261
|
class: "hover:bg-muted/50 rounded-md px-2 py-1",
|
|
1213
1262
|
click: () => t({ [o]: a }),
|
|
@@ -1216,13 +1265,13 @@ function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1
|
|
|
1216
1265
|
})
|
|
1217
1266
|
);
|
|
1218
1267
|
}
|
|
1219
|
-
function
|
|
1268
|
+
function rt({ handleTimeSelect: e }) {
|
|
1220
1269
|
return n(
|
|
1221
1270
|
{ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" },
|
|
1222
1271
|
[
|
|
1223
|
-
|
|
1272
|
+
x(
|
|
1224
1273
|
"open",
|
|
1225
|
-
(t, s, o) => t ? new
|
|
1274
|
+
(t, s, o) => t ? new k(
|
|
1226
1275
|
{
|
|
1227
1276
|
cache: "dropdown",
|
|
1228
1277
|
parent: o,
|
|
@@ -1282,7 +1331,7 @@ function j(e) {
|
|
|
1282
1331
|
meridian: r
|
|
1283
1332
|
});
|
|
1284
1333
|
}
|
|
1285
|
-
const
|
|
1334
|
+
const Ut = y(
|
|
1286
1335
|
{
|
|
1287
1336
|
/**
|
|
1288
1337
|
* The initial shallow state of the TimePicker.
|
|
@@ -1330,23 +1379,23 @@ const Ot = x(
|
|
|
1330
1379
|
return n(
|
|
1331
1380
|
{ class: "relative w-full max-w-[320px]" },
|
|
1332
1381
|
[
|
|
1333
|
-
|
|
1382
|
+
lt({
|
|
1334
1383
|
toggleOpen: e,
|
|
1335
1384
|
bind: this.bind,
|
|
1336
1385
|
required: this.required
|
|
1337
1386
|
}),
|
|
1338
|
-
|
|
1387
|
+
rt({
|
|
1339
1388
|
handleTimeSelect: t
|
|
1340
1389
|
})
|
|
1341
1390
|
]
|
|
1342
1391
|
);
|
|
1343
1392
|
}
|
|
1344
1393
|
}
|
|
1345
|
-
),
|
|
1346
|
-
|
|
1347
|
-
]),
|
|
1348
|
-
|
|
1349
|
-
]),
|
|
1394
|
+
), at = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
1395
|
+
p({ size: "lg" }, e)
|
|
1396
|
+
]), it = ({ title: e }) => I({ class: "flex flex-auto items-center" }, [
|
|
1397
|
+
D({ class: "text-lg font-semibold" }, e)
|
|
1398
|
+
]), ct = c((e, t) => se(
|
|
1350
1399
|
{
|
|
1351
1400
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
1352
1401
|
rounded-lg flex flex-auto flex-col
|
|
@@ -1357,18 +1406,18 @@ const Ot = x(
|
|
|
1357
1406
|
[
|
|
1358
1407
|
n({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
|
|
1359
1408
|
// Icon and content
|
|
1360
|
-
e.icon &&
|
|
1409
|
+
e.icon && at(e.icon, e.iconColor),
|
|
1361
1410
|
n({ class: "flex flex-auto flex-col gap-4" }, [
|
|
1362
1411
|
n({ class: "flex flex-auto flex-col space-y-2" }, [
|
|
1363
|
-
|
|
1364
|
-
e.description &&
|
|
1412
|
+
it(e),
|
|
1413
|
+
e.description && b({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
1365
1414
|
n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
1366
1415
|
]),
|
|
1367
|
-
e.buttons &&
|
|
1416
|
+
e.buttons && L({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
|
|
1368
1417
|
])
|
|
1369
1418
|
])
|
|
1370
1419
|
]
|
|
1371
|
-
)),
|
|
1420
|
+
)), dt = (e) => Y.render(e, app.root), O = {
|
|
1372
1421
|
info: {
|
|
1373
1422
|
borderColor: "border-blue-500",
|
|
1374
1423
|
bgColor: "bg-muted/10",
|
|
@@ -1395,7 +1444,7 @@ const Ot = x(
|
|
|
1395
1444
|
iconColor: "text-muted-foreground"
|
|
1396
1445
|
}
|
|
1397
1446
|
};
|
|
1398
|
-
class
|
|
1447
|
+
class ut extends v {
|
|
1399
1448
|
/**
|
|
1400
1449
|
* This will declare the props for the compiler.
|
|
1401
1450
|
*
|
|
@@ -1413,7 +1462,7 @@ class dt extends v {
|
|
|
1413
1462
|
const t = (d) => {
|
|
1414
1463
|
d.target === this.panel && this.close();
|
|
1415
1464
|
}, { borderColor: s, bgColor: o, iconColor: l } = O[this.type] || O.default, r = `${this.getMainClass()} ${o} ${s}`, a = this.title || "Dialog Title";
|
|
1416
|
-
return
|
|
1465
|
+
return ct({
|
|
1417
1466
|
class: r,
|
|
1418
1467
|
title: a,
|
|
1419
1468
|
click: t,
|
|
@@ -1457,7 +1506,7 @@ class dt extends v {
|
|
|
1457
1506
|
* @returns {void}
|
|
1458
1507
|
*/
|
|
1459
1508
|
open() {
|
|
1460
|
-
|
|
1509
|
+
dt(this), this.panel.showModal(), this.state.open = !0;
|
|
1461
1510
|
}
|
|
1462
1511
|
/**
|
|
1463
1512
|
* This will close the modal.
|
|
@@ -1468,7 +1517,7 @@ class dt extends v {
|
|
|
1468
1517
|
this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
|
|
1469
1518
|
}
|
|
1470
1519
|
}
|
|
1471
|
-
class
|
|
1520
|
+
class qt extends ut {
|
|
1472
1521
|
/**
|
|
1473
1522
|
* This will declare the props for the compiler.
|
|
1474
1523
|
*
|
|
@@ -1498,62 +1547,63 @@ class Vt extends dt {
|
|
|
1498
1547
|
this.confirmed && this.confirmed(), this.close();
|
|
1499
1548
|
}
|
|
1500
1549
|
}
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1550
|
+
const Ht = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
1551
|
+
W({ class: "flex flex-auto flex-col" }, [
|
|
1503
1552
|
n({ class: "flex flex-auto flex-col space-y-4" }, [
|
|
1504
1553
|
n({ class: "flex flex-auto items-center justify-center" }, [
|
|
1505
1554
|
e.icon && n({ class: "w-16 h-16 mb-2 text-primary" }, [
|
|
1506
|
-
|
|
1555
|
+
p(e.icon)
|
|
1507
1556
|
])
|
|
1508
1557
|
]),
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1558
|
+
I({ class: "py-4 text-center" }, [
|
|
1559
|
+
D({ class: "text-xl font-bold" }, e.title),
|
|
1560
|
+
b({ class: "pb-8 text-muted-foreground" }, e.description || ""),
|
|
1512
1561
|
...t
|
|
1513
1562
|
])
|
|
1514
1563
|
])
|
|
1515
1564
|
])
|
|
1516
1565
|
]));
|
|
1517
1566
|
export {
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
$t as
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
ke as
|
|
1538
|
-
Se as
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
kt as
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
At as
|
|
1567
|
+
yt as A,
|
|
1568
|
+
Ft as B,
|
|
1569
|
+
It as C,
|
|
1570
|
+
fe as D,
|
|
1571
|
+
Ut as E,
|
|
1572
|
+
Ce as F,
|
|
1573
|
+
qt as G,
|
|
1574
|
+
ct as H,
|
|
1575
|
+
ut as I,
|
|
1576
|
+
Ht as J,
|
|
1577
|
+
Mt as L,
|
|
1578
|
+
$t as M,
|
|
1579
|
+
Tt as N,
|
|
1580
|
+
Ke as P,
|
|
1581
|
+
Dt as S,
|
|
1582
|
+
Bt as T,
|
|
1583
|
+
be as a,
|
|
1584
|
+
vt as b,
|
|
1585
|
+
we as c,
|
|
1586
|
+
ke as d,
|
|
1587
|
+
Se as e,
|
|
1588
|
+
De as f,
|
|
1589
|
+
$e as g,
|
|
1590
|
+
Ct as h,
|
|
1591
|
+
W as i,
|
|
1592
|
+
kt as j,
|
|
1593
|
+
St as k,
|
|
1594
|
+
ze as l,
|
|
1595
|
+
At as m,
|
|
1596
|
+
Lt as n,
|
|
1547
1597
|
Pt as o,
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1598
|
+
S as p,
|
|
1599
|
+
g as q,
|
|
1600
|
+
je as r,
|
|
1601
|
+
zt as s,
|
|
1602
|
+
Nt as t,
|
|
1603
|
+
Ge as u,
|
|
1604
|
+
Qe as v,
|
|
1605
|
+
Et as w,
|
|
1606
|
+
jt as x,
|
|
1607
|
+
Ot as y,
|
|
1608
|
+
Vt as z
|
|
1559
1609
|
};
|