@base-framework/ui 1.1.5 → 1.1.7
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 +3 -3
- package/dist/buttons-B-FvkS9B.js +77 -0
- package/dist/{empty-state-DoTkyO7O.js → empty-state-DvkT6uAo.js} +138 -202
- package/dist/index.es.js +8 -8
- package/dist/{inputs-DEfa4qLY.js → inputs-CcimrM1k.js} +0 -8
- package/dist/{mobile-nav-wrapper-CZ5m6cqw.js → mobile-nav-wrapper-B7hEJ4r-.js} +20 -28
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +3 -3
- package/dist/pages.es.js +1 -1
- package/dist/{range-calendar-BH4jZwwg.js → range-calendar-CAa8ly0W.js} +2 -1
- package/dist/{sidebar-menu-page-BCqUom5C.js → sidebar-menu-page-KZXiQy6q.js} +1 -1
- package/dist/{signature-panel-Ba9YNxN4.js → signature-panel-D38xgifi.js} +4 -12
- package/dist/{tooltip-BNsImT7F.js → tooltip-BlFbB8yL.js} +1 -1
- package/dist/types/components/molecules/dropdowns/dropdown-menu.d.ts +0 -2
- package/dist/types/components/molecules/modals/drawer/drawer.d.ts +10 -0
- package/dist/types/components/molecules/modals/modal.d.ts +0 -2
- package/dist/types/components/molecules/notifications/notification-container.d.ts +0 -1
- package/dist/types/components/organisms/lists/data-table.d.ts +0 -1
- package/package.json +1 -1
- package/dist/buttons-CfwtbIR-.js +0 -61
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Div as n, I as b, H5 as Z, P as x, Li as H, Span as a, Ul as q, Button as f, OnState as
|
|
2
|
-
import { Atom as c, Component as w, Html as A, Dom as
|
|
3
|
-
import { P as D, C as at, R as ct } from "./range-calendar-
|
|
1
|
+
import { Div as n, I as b, H5 as Z, P as x, Li as H, Span as a, Ul as q, Button as f, OnState as T, Label as P, H2 as S, Form as tt, Header as I, Footer as L, A as V, H3 as et, Checkbox as st, Input as m, Img as G, Nav as ot, UseParent as W, OnStateOpen as O, Time as nt, Dialog as rt } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as w, Html as A, Dom as it, base as lt, Data as B, Builder as _, Jot as C, Events as p, DateTime as M } from "@base-framework/base";
|
|
3
|
+
import { P as D, C as at, R as ct } from "./range-calendar-CAa8ly0W.js";
|
|
4
4
|
import { C as dt, F as ut } from "./form-group-BB7dLJir.js";
|
|
5
|
-
import { B as h, I as
|
|
5
|
+
import { B as h, I as g } from "./buttons-B-FvkS9B.js";
|
|
6
6
|
import { Icons as u } from "./icons.es.js";
|
|
7
7
|
import { Timer as ht, List as mt, DynamicTime as ft } from "@base-framework/organisms";
|
|
8
8
|
import { a as v } from "./image-BB__4s0g.js";
|
|
@@ -33,15 +33,15 @@ const z = {
|
|
|
33
33
|
bgColor: "bg-muted/10",
|
|
34
34
|
iconColor: "text-muted-foreground"
|
|
35
35
|
}
|
|
36
|
-
},
|
|
36
|
+
}, gt = (t, e) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${e}` }, [
|
|
37
37
|
b({ html: t })
|
|
38
|
-
]),
|
|
39
|
-
const { borderColor:
|
|
40
|
-
return n({ class: `flex items-start p-4 border rounded-lg ${
|
|
38
|
+
]), pt = (t) => Z({ class: "font-semibold" }, t), bt = (t) => x({ class: "text-sm text-muted-foreground" }, t), Le = c(({ title: t, description: e, icon: s, type: o = "default" }) => {
|
|
39
|
+
const { borderColor: r, bgColor: i, iconColor: l } = z[o] || z.default;
|
|
40
|
+
return n({ class: `flex items-start p-4 border rounded-lg ${i} ${r}` }, [
|
|
41
41
|
// Icon and content
|
|
42
|
-
s &&
|
|
42
|
+
s && gt(s, l),
|
|
43
43
|
n({ class: "flex flex-col" }, [
|
|
44
|
-
|
|
44
|
+
pt(t),
|
|
45
45
|
bt(e)
|
|
46
46
|
])
|
|
47
47
|
]);
|
|
@@ -67,7 +67,7 @@ class Oe extends w {
|
|
|
67
67
|
A.removeElement(e);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
it.addClass(e, s), lt.on("animationend", e, (o) => A.removeElement(e));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
const xt = (t) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, t), yt = (t) => a({ class: "flex w-4 h-4", html: t }), wt = (t) => a({ class: "flex-auto" }, t), Ct = (t, e) => H({
|
|
@@ -94,7 +94,7 @@ const xt = (t) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, t),
|
|
|
94
94
|
t && a(t),
|
|
95
95
|
e && b({ html: e })
|
|
96
96
|
]), kt = ({ onSelect: t }) => n([
|
|
97
|
-
|
|
97
|
+
T(
|
|
98
98
|
"open",
|
|
99
99
|
(e, s, o) => e ? new D({
|
|
100
100
|
cache: "dropdown",
|
|
@@ -167,16 +167,8 @@ class Ae extends w {
|
|
|
167
167
|
kt({ onSelect: this.handleSelect.bind(this) })
|
|
168
168
|
]);
|
|
169
169
|
}
|
|
170
|
-
/**
|
|
171
|
-
* Cleanup before destroying the component.
|
|
172
|
-
*
|
|
173
|
-
* @returns {void}
|
|
174
|
-
*/
|
|
175
|
-
beforeDestroy() {
|
|
176
|
-
this.button = null, this.dropdown = null;
|
|
177
|
-
}
|
|
178
170
|
}
|
|
179
|
-
const
|
|
171
|
+
const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e)), It = c((t, e) => P({ ...t, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, e)), Bt = c((t, e) => x({ ...t, class: "text-sm text-muted-foreground italic" }, e)), Ft = c((t, e) => x({ ...t, class: "text-sm text-destructive" }, e)), Ye = c((t, e = []) => dt({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
|
|
180
172
|
t.title && S({ class: "text-lg font-semibold py-4 px-6" }, t.title),
|
|
181
173
|
t.description && x({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, t.description),
|
|
182
174
|
...e
|
|
@@ -193,15 +185,15 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
|
|
|
193
185
|
invalid: s,
|
|
194
186
|
input: e
|
|
195
187
|
} : o), Mt = c((t, e) => {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
}, (
|
|
199
|
-
t.setError(
|
|
188
|
+
const r = J(e, (i) => {
|
|
189
|
+
i.target.checkValidity() && t.setError(null);
|
|
190
|
+
}, (i) => {
|
|
191
|
+
t.setError(i.target.validationMessage);
|
|
200
192
|
});
|
|
201
193
|
return n({
|
|
202
194
|
...t,
|
|
203
195
|
class: "w-full"
|
|
204
|
-
},
|
|
196
|
+
}, r);
|
|
205
197
|
}), Ee = v(
|
|
206
198
|
{
|
|
207
199
|
/**
|
|
@@ -223,20 +215,20 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
|
|
|
223
215
|
* @returns {object}
|
|
224
216
|
*/
|
|
225
217
|
render() {
|
|
226
|
-
const t = this.name, e = this.getId(`${t}`), { label: s, description: o } = this,
|
|
227
|
-
this.state.error =
|
|
218
|
+
const t = this.name, e = this.getId(`${t}`), { label: s, description: o } = this, r = (i) => {
|
|
219
|
+
this.state.error = i, this.state.hasError = !!i;
|
|
228
220
|
};
|
|
229
221
|
return n({ class: "flex flex-auto gap-y-4" }, [
|
|
230
|
-
|
|
231
|
-
|
|
222
|
+
Tt([
|
|
223
|
+
It({ htmlFor: e }, s),
|
|
232
224
|
Mt({
|
|
233
225
|
id: e,
|
|
234
226
|
name: t,
|
|
235
227
|
value: this.state.value,
|
|
236
|
-
setError:
|
|
228
|
+
setError: r
|
|
237
229
|
}, this.children),
|
|
238
230
|
o && Bt({ id: this.getId("description") }, o),
|
|
239
|
-
n({ onState: ["error", (
|
|
231
|
+
n({ onState: ["error", (i) => i && Ft(i)] })
|
|
240
232
|
])
|
|
241
233
|
]);
|
|
242
234
|
}
|
|
@@ -254,7 +246,7 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
|
|
|
254
246
|
]), He = (t, e) => n({ class: "flex" }, [
|
|
255
247
|
a({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, t),
|
|
256
248
|
a(e)
|
|
257
|
-
]), Lt = c(({ title: t, description: e, back: s, icon: o, options:
|
|
249
|
+
]), Lt = c(({ title: t, description: e, back: s, icon: o, options: r = [] }) => I({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
|
|
258
250
|
/**
|
|
259
251
|
* Back Button (Mobile Only)
|
|
260
252
|
*/
|
|
@@ -262,13 +254,13 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
|
|
|
262
254
|
variant: "icon",
|
|
263
255
|
icon: u.arrows.left,
|
|
264
256
|
class: "mr-2 p-0 flex sm:hidden",
|
|
265
|
-
click: (
|
|
257
|
+
click: (i, l) => l.close()
|
|
266
258
|
}),
|
|
267
259
|
/**
|
|
268
260
|
* Icon Container
|
|
269
261
|
*/
|
|
270
262
|
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
271
|
-
|
|
263
|
+
g({ size: "md" }, o)
|
|
272
264
|
]),
|
|
273
265
|
/**
|
|
274
266
|
* Title and Description Container
|
|
@@ -278,20 +270,20 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
|
|
|
278
270
|
S({ class: "text-lg font-semibold m-0 truncate" }, t),
|
|
279
271
|
e && n({ class: "text-sm text-muted-foreground truncate" }, e)
|
|
280
272
|
]),
|
|
281
|
-
n({ class: "flex flex-none items-center gap-2" },
|
|
273
|
+
n({ class: "flex flex-none items-center gap-2" }, r)
|
|
282
274
|
])
|
|
283
275
|
])), Q = c((t, e) => {
|
|
284
276
|
const s = t.class?.includes("drawer");
|
|
285
277
|
return n({
|
|
286
278
|
popover: "manual",
|
|
287
279
|
class: `modal ${s ? "" : "m-auto top-0 right-0 bottom-0 left-0"} ${s ? "" : "h-full max-h-screen"} fixed z-20 grid w-full gap-2 lg:border bg-background text-foreground shadow-xl break-words p-0 overflow-y-auto ${t.class}`,
|
|
288
|
-
click: (
|
|
289
|
-
|
|
280
|
+
click: (i, l) => {
|
|
281
|
+
i.target === l.panel && (i.preventDefault(), i.stopPropagation(), l.state.open = !1);
|
|
290
282
|
}
|
|
291
283
|
}, [
|
|
292
284
|
K({
|
|
293
285
|
class: "modal-content relative bg-background z-[1] flex flex-auto flex-col gap-y-4 min-w-0",
|
|
294
|
-
submit: (
|
|
286
|
+
submit: (i, l) => t.onSubmit && t.onSubmit(l),
|
|
295
287
|
cache: "modalContent",
|
|
296
288
|
...t.gestureHandlers
|
|
297
289
|
}, [
|
|
@@ -325,9 +317,9 @@ class At extends w {
|
|
|
325
317
|
options: this.headerOptions(),
|
|
326
318
|
buttons: this.getButtons(),
|
|
327
319
|
hideFooter: this.hideFooter,
|
|
328
|
-
onSubmit: (
|
|
329
|
-
let
|
|
330
|
-
this.onSubmit && (
|
|
320
|
+
onSubmit: (r) => {
|
|
321
|
+
let i = !0;
|
|
322
|
+
this.onSubmit && (i = this.onSubmit(r)), i !== !1 && this.destroy();
|
|
331
323
|
},
|
|
332
324
|
icon: this.icon,
|
|
333
325
|
back: this.back ?? !1,
|
|
@@ -461,7 +453,7 @@ class At extends w {
|
|
|
461
453
|
* @returns {void}
|
|
462
454
|
*/
|
|
463
455
|
beforeDestroy() {
|
|
464
|
-
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto"
|
|
456
|
+
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto";
|
|
465
457
|
}
|
|
466
458
|
}
|
|
467
459
|
class Yt {
|
|
@@ -480,12 +472,12 @@ class Yt {
|
|
|
480
472
|
const {
|
|
481
473
|
modal: s = null,
|
|
482
474
|
modalContent: o = null,
|
|
483
|
-
modalBody:
|
|
484
|
-
closeThreshold:
|
|
485
|
-
snapThreshold:
|
|
475
|
+
modalBody: r = null,
|
|
476
|
+
closeThreshold: i = 150,
|
|
477
|
+
snapThreshold: l = 50,
|
|
486
478
|
onClose: d = null
|
|
487
479
|
} = e;
|
|
488
|
-
this.modal = s, this.modalContent = o, this.modalBody =
|
|
480
|
+
this.modal = s, this.modalContent = o, this.modalBody = r, this.closeThreshold = i, this.snapThreshold = l, this.onClose = d, this.reset();
|
|
489
481
|
}
|
|
490
482
|
/**
|
|
491
483
|
* Resets the drag state to initial values
|
|
@@ -535,10 +527,10 @@ class Yt {
|
|
|
535
527
|
const o = this.getDeltaY();
|
|
536
528
|
if (!this.state.isDragging && this.state.canDrag && o > 0 && this.modalBody.scrollTop === 0 && (this.state.isDragging = !0), this.state.isDragging && o > 0) {
|
|
537
529
|
e.preventDefault();
|
|
538
|
-
const
|
|
539
|
-
this.modalContent.style.transform = `translateY(${
|
|
540
|
-
const
|
|
541
|
-
this.updateBackdropOpacity(
|
|
530
|
+
const r = this.calculateTranslateY(o);
|
|
531
|
+
this.modalContent.style.transform = `translateY(${r}px)`, this.modalContent.style.transition = "none";
|
|
532
|
+
const i = this.calculateBackdropOpacity(o);
|
|
533
|
+
this.updateBackdropOpacity(i);
|
|
542
534
|
} else this.modalBody.scrollTop > 0 && (this.state.canDrag = !1);
|
|
543
535
|
}
|
|
544
536
|
/**
|
|
@@ -623,7 +615,7 @@ class Yt {
|
|
|
623
615
|
* @returns {void}
|
|
624
616
|
*/
|
|
625
617
|
destroy() {
|
|
626
|
-
this.reset(), this.modal = null, this.
|
|
618
|
+
this.reset(), this.modal = null, this.onClose = null;
|
|
627
619
|
}
|
|
628
620
|
}
|
|
629
621
|
class qe extends At {
|
|
@@ -650,7 +642,7 @@ class qe extends At {
|
|
|
650
642
|
* @returns {object}
|
|
651
643
|
*/
|
|
652
644
|
render() {
|
|
653
|
-
const e = this.getMainClass(), s = this.title || "", o = this.description || null,
|
|
645
|
+
const e = this.getMainClass(), s = this.title || "", o = this.description || null, r = this.getContainerProps();
|
|
654
646
|
return Q(
|
|
655
647
|
{
|
|
656
648
|
class: e,
|
|
@@ -659,14 +651,14 @@ class qe extends At {
|
|
|
659
651
|
options: this.headerOptions(),
|
|
660
652
|
buttons: this.getButtons(),
|
|
661
653
|
hideFooter: this.hideFooter,
|
|
662
|
-
onSubmit: (
|
|
663
|
-
let
|
|
664
|
-
this.onSubmit && (
|
|
654
|
+
onSubmit: (i) => {
|
|
655
|
+
let l = !0;
|
|
656
|
+
this.onSubmit && (l = this.onSubmit(i)), l !== !1 && this.destroy();
|
|
665
657
|
},
|
|
666
658
|
icon: this.icon,
|
|
667
659
|
back: this.back ?? !1,
|
|
668
660
|
aria: { expanded: ["open"] },
|
|
669
|
-
...
|
|
661
|
+
...r
|
|
670
662
|
},
|
|
671
663
|
this.children
|
|
672
664
|
);
|
|
@@ -737,7 +729,7 @@ const j = {
|
|
|
737
729
|
borderColor: "border",
|
|
738
730
|
iconColor: "text-muted-foreground"
|
|
739
731
|
}
|
|
740
|
-
}, zt = (t) =>
|
|
732
|
+
}, zt = (t) => I({ class: "flex justify-center" }, [
|
|
741
733
|
et({ class: "text-lg font-bold mb-0" }, t)
|
|
742
734
|
]), jt = c(({ href: t, class: e }, s) => V({
|
|
743
735
|
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 ${e}`,
|
|
@@ -775,14 +767,14 @@ class Nt extends w {
|
|
|
775
767
|
* @returns {object}
|
|
776
768
|
*/
|
|
777
769
|
render() {
|
|
778
|
-
const { bgColor: e, borderColor: s, iconColor: o } = this.getTypeStyles(),
|
|
779
|
-
return
|
|
780
|
-
href:
|
|
770
|
+
const { bgColor: e, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, i = this.getChildren(o);
|
|
771
|
+
return r ? jt({
|
|
772
|
+
href: r,
|
|
781
773
|
class: `${e} ${s}`
|
|
782
|
-
},
|
|
774
|
+
}, i) : Et({
|
|
783
775
|
close: this.close.bind(this),
|
|
784
776
|
class: `${e} ${s}`
|
|
785
|
-
},
|
|
777
|
+
}, i);
|
|
786
778
|
}
|
|
787
779
|
/**
|
|
788
780
|
* This will be called after the component is set up.
|
|
@@ -886,24 +878,16 @@ class Ve extends w {
|
|
|
886
878
|
removeNotice(e) {
|
|
887
879
|
this.list.delete(e.id), this.list.isEmpty() && this.panel.hidePopover();
|
|
888
880
|
}
|
|
889
|
-
/**
|
|
890
|
-
* Cleanup before destroying the component.
|
|
891
|
-
*
|
|
892
|
-
* @returns {void}
|
|
893
|
-
*/
|
|
894
|
-
beforeDestroy() {
|
|
895
|
-
this.list = null;
|
|
896
|
-
}
|
|
897
881
|
}
|
|
898
882
|
const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
899
883
|
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',
|
|
900
884
|
onState: ["method", { active: t }],
|
|
901
885
|
dataSet: ["method", ["state", t, "active"]],
|
|
902
|
-
click: (o, { state:
|
|
903
|
-
|
|
886
|
+
click: (o, { state: r }) => {
|
|
887
|
+
r.method = t, localStorage.setItem("theme", t), t === "system" && localStorage.removeItem("theme"), Rt(t);
|
|
904
888
|
}
|
|
905
889
|
}, [
|
|
906
|
-
|
|
890
|
+
g(s),
|
|
907
891
|
a(e)
|
|
908
892
|
])), Rt = (t) => {
|
|
909
893
|
const e = document.documentElement;
|
|
@@ -990,14 +974,6 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
990
974
|
onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
|
|
991
975
|
})
|
|
992
976
|
]);
|
|
993
|
-
},
|
|
994
|
-
/**
|
|
995
|
-
* Cleanup before destroying the component.
|
|
996
|
-
*
|
|
997
|
-
* @returns {void}
|
|
998
|
-
*/
|
|
999
|
-
destroy() {
|
|
1000
|
-
this.checkbox = null;
|
|
1001
977
|
}
|
|
1002
978
|
}
|
|
1003
979
|
), k = {
|
|
@@ -1040,7 +1016,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1040
1016
|
*/
|
|
1041
1017
|
openFileBrowse() {
|
|
1042
1018
|
const t = this.input;
|
|
1043
|
-
t && (t.value = "",
|
|
1019
|
+
t && (t.value = "", p.trigger("click", t));
|
|
1044
1020
|
},
|
|
1045
1021
|
/**
|
|
1046
1022
|
* Get the URL for the uploaded file.
|
|
@@ -1076,11 +1052,11 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1076
1052
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
1077
1053
|
}
|
|
1078
1054
|
}, [
|
|
1079
|
-
|
|
1055
|
+
T("loaded", (s) => s === !1 || qt(this.src) ? P({
|
|
1080
1056
|
htmlFor: t,
|
|
1081
1057
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1082
1058
|
}, [
|
|
1083
|
-
|
|
1059
|
+
g(u.upload),
|
|
1084
1060
|
n("Upload Image")
|
|
1085
1061
|
]) : G({
|
|
1086
1062
|
// @ts-ignore
|
|
@@ -1089,14 +1065,6 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1089
1065
|
}))
|
|
1090
1066
|
])
|
|
1091
1067
|
]);
|
|
1092
|
-
},
|
|
1093
|
-
/**
|
|
1094
|
-
* Cleanup before destroying the component.
|
|
1095
|
-
*
|
|
1096
|
-
* @returns {void}
|
|
1097
|
-
*/
|
|
1098
|
-
destroy() {
|
|
1099
|
-
this.input = null;
|
|
1100
1068
|
}
|
|
1101
1069
|
}
|
|
1102
1070
|
), Qe = C(
|
|
@@ -1119,7 +1087,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1119
1087
|
*/
|
|
1120
1088
|
openFileBrowse() {
|
|
1121
1089
|
const t = this.input;
|
|
1122
|
-
t && (t.value = "",
|
|
1090
|
+
t && (t.value = "", p.trigger("click", t));
|
|
1123
1091
|
},
|
|
1124
1092
|
/**
|
|
1125
1093
|
* Get the URL for the uploaded file.
|
|
@@ -1155,7 +1123,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1155
1123
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
1156
1124
|
}
|
|
1157
1125
|
}, [
|
|
1158
|
-
|
|
1126
|
+
T(
|
|
1159
1127
|
"loaded",
|
|
1160
1128
|
(s) => s ? G({
|
|
1161
1129
|
// @ts-ignore
|
|
@@ -1165,7 +1133,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1165
1133
|
htmlFor: t,
|
|
1166
1134
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1167
1135
|
}, [
|
|
1168
|
-
|
|
1136
|
+
g(u.upload),
|
|
1169
1137
|
n("Upload logo")
|
|
1170
1138
|
])
|
|
1171
1139
|
)
|
|
@@ -1189,7 +1157,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1189
1157
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
1190
1158
|
},
|
|
1191
1159
|
[a(e)]
|
|
1192
|
-
), Gt = () =>
|
|
1160
|
+
), Gt = () => g({
|
|
1193
1161
|
class: "mx-3 text-muted-foreground",
|
|
1194
1162
|
"aria-hidden": !0,
|
|
1195
1163
|
size: "xs"
|
|
@@ -1251,8 +1219,8 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1251
1219
|
"bg-primary": t,
|
|
1252
1220
|
"shadow-md": t
|
|
1253
1221
|
}],
|
|
1254
|
-
click: (s, { data: o, onClick:
|
|
1255
|
-
o.activeIndex = t,
|
|
1222
|
+
click: (s, { data: o, onClick: r }) => {
|
|
1223
|
+
o.activeIndex = t, r && r(t);
|
|
1256
1224
|
}
|
|
1257
1225
|
})
|
|
1258
1226
|
]), Kt = (t, e) => Array.from({ length: t }, (s, o) => Jt({
|
|
@@ -1304,17 +1272,17 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1304
1272
|
click: () => e(t),
|
|
1305
1273
|
onState: [s, "selectedValue", { "bg-secondary": t.value }]
|
|
1306
1274
|
}, [
|
|
1307
|
-
t.icon && a({ class: "mr-2 flex items-baseline" }, [
|
|
1275
|
+
t.icon && a({ class: "mr-2 flex items-baseline" }, [g({ size: "xs" }, t.icon)]),
|
|
1308
1276
|
a({ class: "text-base font-normal" }, t.label)
|
|
1309
1277
|
]), Zt = (t, e) => n({ class: "w-full border rounded-md" }, [
|
|
1310
1278
|
q({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Xt(s, t, e)] })
|
|
1311
1279
|
]), te = ({ onSelect: t, state: e }) => n({ class: "flex flex-auto flex-col" }, [
|
|
1312
|
-
|
|
1280
|
+
T(
|
|
1313
1281
|
"open",
|
|
1314
|
-
(s, o,
|
|
1282
|
+
(s, o, r) => s ? new D({
|
|
1315
1283
|
cache: "dropdown",
|
|
1316
|
-
parent:
|
|
1317
|
-
button:
|
|
1284
|
+
parent: r,
|
|
1285
|
+
button: r.button
|
|
1318
1286
|
}, [
|
|
1319
1287
|
Zt(t, e)
|
|
1320
1288
|
]) : null
|
|
@@ -1419,14 +1387,6 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1419
1387
|
value: ["[[selectedValue]]", this.state]
|
|
1420
1388
|
})
|
|
1421
1389
|
]);
|
|
1422
|
-
},
|
|
1423
|
-
/**
|
|
1424
|
-
* This will run before the component is destroyed.
|
|
1425
|
-
*
|
|
1426
|
-
* @returns {void}
|
|
1427
|
-
*/
|
|
1428
|
-
destroy() {
|
|
1429
|
-
this.dropdown = null, this.button = null;
|
|
1430
1390
|
}
|
|
1431
1391
|
}
|
|
1432
1392
|
), X = ({ icon: t, click: e, ariaLabel: s }) => h({
|
|
@@ -1443,12 +1403,12 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1443
1403
|
icon: u.circlePlus,
|
|
1444
1404
|
click: t,
|
|
1445
1405
|
ariaLabel: "Increment"
|
|
1446
|
-
}), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state:
|
|
1447
|
-
value: ["[[count]]",
|
|
1406
|
+
}), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state: r }) => m({
|
|
1407
|
+
value: ["[[count]]", r],
|
|
1448
1408
|
bind: t,
|
|
1449
|
-
blur: (
|
|
1450
|
-
let d = parseInt(
|
|
1451
|
-
isNaN(d) && (d = e ?? 0), e !== void 0 && (d = Math.max(d, e)), s !== void 0 && (d = Math.min(d, s)),
|
|
1409
|
+
blur: (i, { state: l }) => {
|
|
1410
|
+
let d = parseInt(i.target.value, 10);
|
|
1411
|
+
isNaN(d) && (d = e ?? 0), e !== void 0 && (d = Math.max(d, e)), s !== void 0 && (d = Math.min(d, s)), l.count = d;
|
|
1452
1412
|
},
|
|
1453
1413
|
class: "flex flex-auto text-lg font-medium bg-input text-center border min-w-0",
|
|
1454
1414
|
readonly: o,
|
|
@@ -1493,30 +1453,30 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1493
1453
|
), ne = (t) => {
|
|
1494
1454
|
let e = "";
|
|
1495
1455
|
return t.length > 0 && (e = t.substring(0, 2), t.length > 2 && (e += "/" + t.substring(2, 4), t.length > 4 && (e += "/" + t.substring(4, 8)))), e;
|
|
1496
|
-
},
|
|
1456
|
+
}, re = (t) => {
|
|
1497
1457
|
if (t.length !== 8)
|
|
1498
1458
|
return null;
|
|
1499
1459
|
const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10), o = parseInt(t.substring(4, 8), 10);
|
|
1500
1460
|
return e >= 1 && e <= 12 && s >= 1 && s <= 31 && o >= 1900 ? `${o}-${e.toString().padStart(2, "0")}-${s.toString().padStart(2, "0")}` : null;
|
|
1501
|
-
},
|
|
1461
|
+
}, ie = ({ bind: t, required: e }) => m({
|
|
1502
1462
|
cache: "input",
|
|
1503
1463
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1504
1464
|
bind: t,
|
|
1505
1465
|
required: e
|
|
1506
|
-
}),
|
|
1466
|
+
}), le = ({ placeholder: t, handleInputChange: e, handleInputFocus: s }) => m({
|
|
1507
1467
|
cache: "dateInput",
|
|
1508
1468
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
1509
1469
|
placeholder: t || "mm/dd/yyyy",
|
|
1510
1470
|
input: e,
|
|
1511
1471
|
focus: s,
|
|
1512
1472
|
onState: ["selectedDate", (o) => o ? M.format("standard", o) : ""]
|
|
1513
|
-
}), ae = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus:
|
|
1473
|
+
}), ae = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) => n(
|
|
1514
1474
|
{
|
|
1515
1475
|
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"
|
|
1516
1476
|
},
|
|
1517
1477
|
[
|
|
1518
|
-
|
|
1519
|
-
|
|
1478
|
+
ie({ bind: t, required: e }),
|
|
1479
|
+
le({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
|
|
1520
1480
|
f(
|
|
1521
1481
|
{
|
|
1522
1482
|
class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
@@ -1528,14 +1488,14 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1528
1488
|
)
|
|
1529
1489
|
]
|
|
1530
1490
|
), ce = ({ handleDateSelect: t, blockPriorDates: e }) => O(
|
|
1531
|
-
(s, o,
|
|
1491
|
+
(s, o, r) => new D({
|
|
1532
1492
|
cache: "dropdown",
|
|
1533
|
-
parent:
|
|
1534
|
-
button:
|
|
1493
|
+
parent: r,
|
|
1494
|
+
button: r.panel,
|
|
1535
1495
|
size: "fit"
|
|
1536
1496
|
}, [
|
|
1537
1497
|
new at({
|
|
1538
|
-
selectedDate:
|
|
1498
|
+
selectedDate: r.state.selectedDate,
|
|
1539
1499
|
selectedCallBack: t,
|
|
1540
1500
|
blockPriorDates: e
|
|
1541
1501
|
})
|
|
@@ -1570,8 +1530,8 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1570
1530
|
handleInputChange(t) {
|
|
1571
1531
|
const s = t.target.value.replace(/\D/g, "");
|
|
1572
1532
|
t.target.value = ne(s);
|
|
1573
|
-
const o =
|
|
1574
|
-
o && (this.state.selectedDate = o, this.input.value = o,
|
|
1533
|
+
const o = re(s);
|
|
1534
|
+
o && (this.state.selectedDate = o, this.input.value = o, p.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(o));
|
|
1575
1535
|
},
|
|
1576
1536
|
/**
|
|
1577
1537
|
* Handles input focus - select all text for easy editing.
|
|
@@ -1587,7 +1547,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1587
1547
|
* @param {string} date
|
|
1588
1548
|
*/
|
|
1589
1549
|
handleDateSelect(t) {
|
|
1590
|
-
this.state.selectedDate = t, this.state.open = !1, this.input.value = t,
|
|
1550
|
+
this.state.selectedDate = t, this.state.open = !1, this.input.value = t, p.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(t);
|
|
1591
1551
|
},
|
|
1592
1552
|
/**
|
|
1593
1553
|
* Toggles the calendar popover.
|
|
@@ -1621,14 +1581,6 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1621
1581
|
})
|
|
1622
1582
|
]
|
|
1623
1583
|
);
|
|
1624
|
-
},
|
|
1625
|
-
/**
|
|
1626
|
-
* This will run before the component is destroyed.
|
|
1627
|
-
*
|
|
1628
|
-
* @returns {void}
|
|
1629
|
-
*/
|
|
1630
|
-
destroy() {
|
|
1631
|
-
this.dropdown = null, this.dateInput = null, this.input = null;
|
|
1632
1584
|
}
|
|
1633
1585
|
}
|
|
1634
1586
|
), de = ({ bind: t, required: e }) => m({
|
|
@@ -1647,15 +1599,15 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1647
1599
|
a(Y.date(["[[end]]", o], "End Date"))
|
|
1648
1600
|
]),
|
|
1649
1601
|
b({ html: u.calendar.days })
|
|
1650
|
-
]), he = ({ handleDateSelect: t, blockPriorDates: e }) => O((s, o,
|
|
1602
|
+
]), he = ({ handleDateSelect: t, blockPriorDates: e }) => O((s, o, r) => new D({
|
|
1651
1603
|
cache: "dropdown",
|
|
1652
|
-
parent:
|
|
1653
|
-
button:
|
|
1604
|
+
parent: r,
|
|
1605
|
+
button: r.panel,
|
|
1654
1606
|
size: "xl"
|
|
1655
1607
|
}, [
|
|
1656
1608
|
new ct({
|
|
1657
|
-
startDate:
|
|
1658
|
-
endDate:
|
|
1609
|
+
startDate: r.state.start,
|
|
1610
|
+
endDate: r.state.end,
|
|
1659
1611
|
onRangeSelect: t,
|
|
1660
1612
|
blockPriorDates: e
|
|
1661
1613
|
})
|
|
@@ -1692,7 +1644,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1692
1644
|
*/
|
|
1693
1645
|
render() {
|
|
1694
1646
|
const t = (s, { state: o }) => o.toggle("open"), e = (s, o) => {
|
|
1695
|
-
this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`,
|
|
1647
|
+
this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, p.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: o }, this.parent);
|
|
1696
1648
|
};
|
|
1697
1649
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1698
1650
|
ue({
|
|
@@ -1705,22 +1657,14 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
|
|
|
1705
1657
|
blockPriorDates: this.blockPriorDates || !1
|
|
1706
1658
|
})
|
|
1707
1659
|
]);
|
|
1708
|
-
},
|
|
1709
|
-
/**
|
|
1710
|
-
* This will run before the component is destroyed.
|
|
1711
|
-
*
|
|
1712
|
-
* @returns {void}
|
|
1713
|
-
*/
|
|
1714
|
-
destroy() {
|
|
1715
|
-
this.dropdown = null, this.input = null;
|
|
1716
1660
|
}
|
|
1717
1661
|
}
|
|
1718
1662
|
), ns = ({ dateTime: t = "", remoteTimeZone: e = "America/Denver", filter: s = null }) => nt([
|
|
1719
1663
|
new ft({
|
|
1720
1664
|
dateTime: t,
|
|
1721
1665
|
filter: s || ((o) => {
|
|
1722
|
-
const
|
|
1723
|
-
return M.getTimeFrame(
|
|
1666
|
+
const r = M.getLocalTime(o, !0, !1, e);
|
|
1667
|
+
return M.getTimeFrame(r);
|
|
1724
1668
|
})
|
|
1725
1669
|
})
|
|
1726
1670
|
]);
|
|
@@ -1734,15 +1678,15 @@ function fe(t) {
|
|
|
1734
1678
|
const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10);
|
|
1735
1679
|
if (e < 0 || e > 23 || s < 0 || s > 59)
|
|
1736
1680
|
return { formattedTime: null, hour: null, minute: null, meridian: null };
|
|
1737
|
-
let o = e,
|
|
1738
|
-
return e === 0 ? o = 12 : e > 12 ? (o = e - 12,
|
|
1739
|
-
formattedTime: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")} ${
|
|
1681
|
+
let o = e, r = "AM";
|
|
1682
|
+
return e === 0 ? o = 12 : e > 12 ? (o = e - 12, r = "PM") : e === 12 && (r = "PM"), {
|
|
1683
|
+
formattedTime: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")} ${r}`,
|
|
1740
1684
|
hour: o.toString().padStart(2, "0"),
|
|
1741
1685
|
minute: s.toString().padStart(2, "0"),
|
|
1742
|
-
meridian:
|
|
1686
|
+
meridian: r
|
|
1743
1687
|
};
|
|
1744
1688
|
}
|
|
1745
|
-
function
|
|
1689
|
+
function ge({ bind: t, required: e }) {
|
|
1746
1690
|
return m({
|
|
1747
1691
|
cache: "input",
|
|
1748
1692
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
@@ -1750,7 +1694,7 @@ function pe({ bind: t, required: e }) {
|
|
|
1750
1694
|
required: e
|
|
1751
1695
|
});
|
|
1752
1696
|
}
|
|
1753
|
-
function
|
|
1697
|
+
function pe({ placeholder: t, handleInputChange: e, handleInputFocus: s }) {
|
|
1754
1698
|
return m({
|
|
1755
1699
|
cache: "timeInput",
|
|
1756
1700
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
@@ -1760,14 +1704,14 @@ function ge({ placeholder: t, handleInputChange: e, handleInputFocus: s }) {
|
|
|
1760
1704
|
onState: ["selectedTime", (o) => o || ""]
|
|
1761
1705
|
});
|
|
1762
1706
|
}
|
|
1763
|
-
function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus:
|
|
1707
|
+
function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) {
|
|
1764
1708
|
return n(
|
|
1765
1709
|
{
|
|
1766
1710
|
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"
|
|
1767
1711
|
},
|
|
1768
1712
|
[
|
|
1769
|
-
|
|
1770
|
-
|
|
1713
|
+
ge({ bind: t, required: e }),
|
|
1714
|
+
pe({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
|
|
1771
1715
|
f(
|
|
1772
1716
|
{
|
|
1773
1717
|
class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
@@ -1780,16 +1724,16 @@ function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleI
|
|
|
1780
1724
|
]
|
|
1781
1725
|
);
|
|
1782
1726
|
}
|
|
1783
|
-
function $({ items: t, handleTimeSelect: e, state: s, stateValue: o, pad:
|
|
1727
|
+
function $({ items: t, handleTimeSelect: e, state: s, stateValue: o, pad: r = !1 }) {
|
|
1784
1728
|
return n(
|
|
1785
1729
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
1786
|
-
t.map((
|
|
1787
|
-
let
|
|
1730
|
+
t.map((i) => {
|
|
1731
|
+
let l = r ? i.toString().padStart(2, "0") : i.toString();
|
|
1788
1732
|
return f({
|
|
1789
|
-
text:
|
|
1733
|
+
text: l,
|
|
1790
1734
|
class: "hover:bg-muted/50 rounded-md pr-2 py-1",
|
|
1791
|
-
click: () => e({ [o]:
|
|
1792
|
-
onState: [s, o, { "bg-muted":
|
|
1735
|
+
click: () => e({ [o]: l }),
|
|
1736
|
+
onState: [s, o, { "bg-muted": l }]
|
|
1793
1737
|
});
|
|
1794
1738
|
})
|
|
1795
1739
|
);
|
|
@@ -1812,7 +1756,7 @@ function xe({ handleTimeSelect: t }) {
|
|
|
1812
1756
|
[
|
|
1813
1757
|
// Hours column
|
|
1814
1758
|
$({
|
|
1815
|
-
items: Array.from({ length: 12 }, (
|
|
1759
|
+
items: Array.from({ length: 12 }, (r, i) => i + 1),
|
|
1816
1760
|
handleTimeSelect: t,
|
|
1817
1761
|
state: o.state,
|
|
1818
1762
|
stateValue: "hour",
|
|
@@ -1820,7 +1764,7 @@ function xe({ handleTimeSelect: t }) {
|
|
|
1820
1764
|
}),
|
|
1821
1765
|
// Minutes column
|
|
1822
1766
|
$({
|
|
1823
|
-
items: Array.from({ length: 60 }, (
|
|
1767
|
+
items: Array.from({ length: 60 }, (r, i) => i),
|
|
1824
1768
|
handleTimeSelect: t,
|
|
1825
1769
|
state: o.state,
|
|
1826
1770
|
stateValue: "minute",
|
|
@@ -1847,14 +1791,14 @@ function U(t) {
|
|
|
1847
1791
|
const e = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = t.match(e);
|
|
1848
1792
|
if (!s)
|
|
1849
1793
|
return { hour: null, minute: null, meridian: null };
|
|
1850
|
-
let [, o,
|
|
1851
|
-
return
|
|
1852
|
-
hour:
|
|
1794
|
+
let [, o, r, , i] = s, l = parseInt(o, 10), d = parseInt(r, 10);
|
|
1795
|
+
return l < 0 || l > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (i ? (i = i.toUpperCase(), i === "PM" && l < 12 ? l += 12 : i === "AM" && l === 12 && (l = 12)) : l === 0 ? (i = "AM", l = 12) : l < 12 ? i = "AM" : l === 12 ? i = "PM" : (i = "PM", l -= 12), {
|
|
1796
|
+
hour: l.toString().padStart(2, "0"),
|
|
1853
1797
|
minute: d.toString().padStart(2, "0"),
|
|
1854
|
-
meridian:
|
|
1798
|
+
meridian: i
|
|
1855
1799
|
});
|
|
1856
1800
|
}
|
|
1857
|
-
const
|
|
1801
|
+
const rs = v(
|
|
1858
1802
|
{
|
|
1859
1803
|
/**
|
|
1860
1804
|
* The initial shallow state of the TimePicker.
|
|
@@ -1909,7 +1853,7 @@ const is = v(
|
|
|
1909
1853
|
minute: o.minute,
|
|
1910
1854
|
meridian: o.meridian,
|
|
1911
1855
|
selectedTime: o.formattedTime
|
|
1912
|
-
}), this.input.value = o.formattedTime,
|
|
1856
|
+
}), this.input.value = o.formattedTime, p.trigger("change", this.input), typeof this.change == "function" && this.change(o.formattedTime)), t.target.value = s;
|
|
1913
1857
|
},
|
|
1914
1858
|
/**
|
|
1915
1859
|
* Handles input focus - select all text for easy editing.
|
|
@@ -1927,7 +1871,7 @@ const is = v(
|
|
|
1927
1871
|
handleTimeSelect({ hour: t, minute: e, meridian: s }) {
|
|
1928
1872
|
if (t && (this.state.hour = t), e && (this.state.minute = e), s && (this.state.meridian = s), this.state.hour && this.state.minute && this.state.meridian) {
|
|
1929
1873
|
const o = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
1930
|
-
this.state.selectedTime = o, this.state.open = !1, this.input.value = o,
|
|
1874
|
+
this.state.selectedTime = o, this.state.open = !1, this.input.value = o, p.trigger("change", this.input), typeof this.change == "function" && this.change(o);
|
|
1931
1875
|
}
|
|
1932
1876
|
},
|
|
1933
1877
|
/**
|
|
@@ -1952,21 +1896,13 @@ const is = v(
|
|
|
1952
1896
|
})
|
|
1953
1897
|
]
|
|
1954
1898
|
);
|
|
1955
|
-
},
|
|
1956
|
-
/**
|
|
1957
|
-
* Cleanup before destroying the component.
|
|
1958
|
-
*
|
|
1959
|
-
* @returns {void}
|
|
1960
|
-
*/
|
|
1961
|
-
destroy() {
|
|
1962
|
-
this.input = null, this.timeInput = null, this.dropdown = null;
|
|
1963
1899
|
}
|
|
1964
1900
|
}
|
|
1965
1901
|
), ye = (t, e) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${e}` }, [
|
|
1966
|
-
|
|
1967
|
-
]), we = ({ title: t }) =>
|
|
1902
|
+
g({ size: "lg" }, t)
|
|
1903
|
+
]), we = ({ title: t }) => I({ class: "flex flex-auto items-center" }, [
|
|
1968
1904
|
S({ class: "text-lg font-semibold" }, t)
|
|
1969
|
-
]), Ce = c((t, e) =>
|
|
1905
|
+
]), Ce = c((t, e) => rt(
|
|
1970
1906
|
{
|
|
1971
1907
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
1972
1908
|
rounded-lg flex flex-auto flex-col
|
|
@@ -2032,13 +1968,13 @@ class Se extends w {
|
|
|
2032
1968
|
render() {
|
|
2033
1969
|
const e = (d) => {
|
|
2034
1970
|
d.target === this.panel && this.close();
|
|
2035
|
-
}, { borderColor: s, bgColor: o, iconColor:
|
|
1971
|
+
}, { borderColor: s, bgColor: o, iconColor: r } = R[this.type] || R.default, i = `${this.getMainClass()} ${o} ${s}`, l = this.title || "Dialog Title";
|
|
2036
1972
|
return Ce({
|
|
2037
|
-
class:
|
|
2038
|
-
title:
|
|
1973
|
+
class: i,
|
|
1974
|
+
title: l,
|
|
2039
1975
|
click: e,
|
|
2040
1976
|
icon: this.icon,
|
|
2041
|
-
iconColor:
|
|
1977
|
+
iconColor: r,
|
|
2042
1978
|
description: this.description,
|
|
2043
1979
|
buttons: this.getButtons()
|
|
2044
1980
|
}, this.children);
|
|
@@ -2088,7 +2024,7 @@ class Se extends w {
|
|
|
2088
2024
|
this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
|
|
2089
2025
|
}
|
|
2090
2026
|
}
|
|
2091
|
-
class
|
|
2027
|
+
class is extends Se {
|
|
2092
2028
|
/**
|
|
2093
2029
|
* This will declare the props for the compiler.
|
|
2094
2030
|
*
|
|
@@ -2118,15 +2054,15 @@ class ls extends Se {
|
|
|
2118
2054
|
this.confirmed && this.confirmed(), this.close();
|
|
2119
2055
|
}
|
|
2120
2056
|
}
|
|
2121
|
-
const
|
|
2057
|
+
const ls = c((t, e = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
2122
2058
|
K({ class: "flex flex-auto flex-col" }, [
|
|
2123
2059
|
n({ class: "flex flex-auto flex-col gap-y-4" }, [
|
|
2124
2060
|
n({ class: "flex flex-auto items-center justify-center" }, [
|
|
2125
2061
|
t.icon && n({ class: "w-16 h-16 mb-2 text-primary" }, [
|
|
2126
|
-
|
|
2062
|
+
g(t.icon)
|
|
2127
2063
|
])
|
|
2128
2064
|
]),
|
|
2129
|
-
|
|
2065
|
+
I({ class: "py-4 text-center" }, [
|
|
2130
2066
|
S({ class: "text-xl font-bold" }, t.title),
|
|
2131
2067
|
x({ class: "pb-8 text-muted-foreground" }, t.description || ""),
|
|
2132
2068
|
...e
|
|
@@ -2139,7 +2075,7 @@ export {
|
|
|
2139
2075
|
Xe as B,
|
|
2140
2076
|
He as C,
|
|
2141
2077
|
ss as D,
|
|
2142
|
-
|
|
2078
|
+
ls as E,
|
|
2143
2079
|
K as F,
|
|
2144
2080
|
y as G,
|
|
2145
2081
|
Re as H,
|
|
@@ -2151,13 +2087,13 @@ export {
|
|
|
2151
2087
|
Nt as N,
|
|
2152
2088
|
ns as O,
|
|
2153
2089
|
se as P,
|
|
2154
|
-
|
|
2090
|
+
rs as Q,
|
|
2155
2091
|
We as R,
|
|
2156
2092
|
k as S,
|
|
2157
2093
|
Ge as T,
|
|
2158
2094
|
Ht as U,
|
|
2159
2095
|
ts as a,
|
|
2160
|
-
|
|
2096
|
+
is as b,
|
|
2161
2097
|
oe as c,
|
|
2162
2098
|
es as d,
|
|
2163
2099
|
os as e,
|
|
@@ -2177,8 +2113,8 @@ export {
|
|
|
2177
2113
|
Mt as s,
|
|
2178
2114
|
Bt as t,
|
|
2179
2115
|
Ee as u,
|
|
2180
|
-
|
|
2181
|
-
|
|
2116
|
+
Tt as v,
|
|
2117
|
+
It as w,
|
|
2182
2118
|
Ft as x,
|
|
2183
2119
|
At as y,
|
|
2184
2120
|
Ve as z
|