@base-framework/ui 1.0.321 → 1.0.323
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 +28 -27
- package/dist/{empty-state-CmJE_BQv.js → empty-state-ByQ_GcoM.js} +110 -118
- package/dist/form-group-CJzpq9Us.js +29 -0
- package/dist/index.es.js +157 -156
- package/dist/molecules.es.js +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-Dshz3HOW.js → signature-panel-DVIv9LO1.js} +239 -238
- package/dist/{tooltip-B5hKQNZQ.js → tooltip-PupzYM1r.js} +1 -1
- package/dist/types/components/organisms/tabs/button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/underlined-tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab.d.ts +2 -2
- package/dist/veil-CqnAmj-D.js +20 -0
- package/package.json +1 -1
- package/dist/types/components/organisms/tabs/underlined-tab-examples.d.ts +0 -2
- package/dist/veil-CVCuKSvj.js +0 -46
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Div as l, H5 as se, P as w, I as C, Li as W, Span as c, Ul as G, Button as b, OnState as B, Label as
|
|
2
|
-
import { Atom as u, Component as k, Html as
|
|
1
|
+
import { Div as l, H5 as se, P as w, I as C, Li as W, Span as c, Ul as G, Button as b, OnState as B, Label as O, H2 as $, Form as oe, Header as L, Footer as z, A as J, H3 as ne, Checkbox as le, Input as f, Img as K, Nav as re, UseParent as Q, OnStateOpen as E, Time as ie, Dialog as ae } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as u, Component as k, Html as N, Dom as ce, base as ue, Data as A, Builder as X, Jot as I, Events as y, DateTime as j } from "@base-framework/base";
|
|
3
3
|
import { P as F, b as de, R as he } from "./range-calendar-BMWSJTE0.js";
|
|
4
|
-
import { C as fe, F as me
|
|
4
|
+
import { C as fe, F as me } from "./form-group-CJzpq9Us.js";
|
|
5
5
|
import { B as h, I as x } from "./buttons-CHEs54Wl.js";
|
|
6
6
|
import { Icons as d } from "./icons.es.js";
|
|
7
7
|
import { Timer as ge, List as pe, DynamicTime as be } from "@base-framework/organisms";
|
|
8
|
+
import { a as D } from "./veil-CqnAmj-D.js";
|
|
8
9
|
import { F as U } from "./format-DnofNaaz.js";
|
|
9
10
|
const V = {
|
|
10
11
|
info: {
|
|
@@ -34,18 +35,18 @@ const V = {
|
|
|
34
35
|
}
|
|
35
36
|
}, xe = (e, t) => l({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
36
37
|
C({ html: e })
|
|
37
|
-
]),
|
|
38
|
+
]), ve = (e) => se({ class: "font-semibold" }, e), ye = (e) => w({ class: "text-sm text-muted-foreground" }, e), Lt = u(({ title: e, description: t, icon: s, type: o = "default" }) => {
|
|
38
39
|
const { borderColor: n, bgColor: r, iconColor: i } = V[o] || V.default;
|
|
39
40
|
return l({ class: `flex items-start p-4 border rounded-lg ${r} ${n}` }, [
|
|
40
41
|
// Icon and content
|
|
41
42
|
s && xe(s, i),
|
|
42
43
|
l({ class: "flex flex-col" }, [
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
ve(e),
|
|
45
|
+
ye(t)
|
|
45
46
|
])
|
|
46
47
|
]);
|
|
47
48
|
});
|
|
48
|
-
class
|
|
49
|
+
class At extends k {
|
|
49
50
|
/**
|
|
50
51
|
* This will declare the props for the compiler.
|
|
51
52
|
*
|
|
@@ -63,10 +64,10 @@ class Lt extends k {
|
|
|
63
64
|
this.prepareDestroy(), this.removeContext();
|
|
64
65
|
const t = this.panel, s = this.removingClass;
|
|
65
66
|
if (!s) {
|
|
66
|
-
|
|
67
|
+
N.removeElement(t);
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
|
-
ce.addClass(t, s), ue.on("animationend", t, (o) =>
|
|
70
|
+
ce.addClass(t, s), ue.on("animationend", t, (o) => N.removeElement(t));
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
const we = (e) => c({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), Ce = (e) => c({ class: "flex w-4 h-4", html: e }), Se = (e) => c({ class: "flex-auto" }, e), ke = (e, t) => W({
|
|
@@ -104,7 +105,7 @@ const we = (e) => c({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
|
|
|
104
105
|
]) : null
|
|
105
106
|
)
|
|
106
107
|
]);
|
|
107
|
-
class
|
|
108
|
+
class Mt extends k {
|
|
108
109
|
/**
|
|
109
110
|
* This will declare the props for the compiler.
|
|
110
111
|
*
|
|
@@ -167,13 +168,13 @@ class At extends k {
|
|
|
167
168
|
]);
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
|
-
const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), Be = u((e, t) =>
|
|
171
|
+
const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), Be = u((e, t) => O({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), Le = u((e, t) => w({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Ae = u((e, t) => w({ ...e, class: "text-sm text-destructive" }, t)), Pt = u((e, t = []) => fe({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
|
|
171
172
|
e.title && $({ class: "text-lg font-semibold py-4 px-6" }, e.title),
|
|
172
173
|
e.description && w({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
|
|
173
174
|
...t
|
|
174
|
-
])),
|
|
175
|
+
])), jt = u((e, t = []) => me({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
|
|
175
176
|
l({ class: "flex flex-col gap-y-6" }, t)
|
|
176
|
-
])),
|
|
177
|
+
])), Ot = u((e, t = []) => {
|
|
177
178
|
const s = e.border ? "border-t" : "";
|
|
178
179
|
return l({ ...e, class: `flex flex-col pb-4 px-6 gap-y-4 ${s} ${e.class || ""}` }, t);
|
|
179
180
|
}), Me = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", Z = (e, t, s) => e.map((o) => !o || (o.children && o.children.length > 0 && (o.children = Z(o.children, t, s)), !o.required) ? o : Me(o) ? {
|
|
@@ -193,7 +194,7 @@ const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
193
194
|
...e,
|
|
194
195
|
class: "w-full"
|
|
195
196
|
}, n);
|
|
196
|
-
}),
|
|
197
|
+
}), zt = D(
|
|
197
198
|
{
|
|
198
199
|
/**
|
|
199
200
|
* The initial state of the FormField.
|
|
@@ -236,16 +237,16 @@ const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
236
237
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
237
238
|
}, ee = u(
|
|
238
239
|
(e, t) => oe({ ...e, submit: (s, o) => je(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
239
|
-
),
|
|
240
|
+
), Et = u((e, t) => l({ ...e, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), Nt = u((e, t = []) => l({ class: "flex flex-col gap-y-3 py-4" }, [
|
|
240
241
|
e.title && $({ class: "font-semibold" }, e.title),
|
|
241
242
|
...t
|
|
242
|
-
])),
|
|
243
|
+
])), Ut = (e, t) => l({ class: "flex justify-between" }, [
|
|
243
244
|
c({ class: "text-muted-foreground" }, e),
|
|
244
245
|
c(t)
|
|
245
|
-
]),
|
|
246
|
+
]), Vt = (e, t) => l({ class: "flex" }, [
|
|
246
247
|
c({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
|
|
247
248
|
c(t)
|
|
248
|
-
]),
|
|
249
|
+
]), Oe = ({ title: e, description: t, back: s, icon: o, options: n = [] }) => L({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
|
|
249
250
|
/**
|
|
250
251
|
* Back Button
|
|
251
252
|
*/
|
|
@@ -264,7 +265,7 @@ const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
264
265
|
]),
|
|
265
266
|
...n
|
|
266
267
|
])
|
|
267
|
-
]),
|
|
268
|
+
]), ze = u((e, t) => l({
|
|
268
269
|
popover: "manual",
|
|
269
270
|
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}`,
|
|
270
271
|
click: (s, o) => {
|
|
@@ -272,12 +273,12 @@ const Te = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
272
273
|
}
|
|
273
274
|
}, [
|
|
274
275
|
ee({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col gap-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
|
|
275
|
-
|
|
276
|
+
Oe(e),
|
|
276
277
|
l({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
|
|
277
|
-
|
|
278
|
+
z({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
278
279
|
])
|
|
279
|
-
])),
|
|
280
|
-
class
|
|
280
|
+
])), Ee = (e) => X.render(e, app.root);
|
|
281
|
+
class Rt extends k {
|
|
281
282
|
/**
|
|
282
283
|
* This will declare the props for the compiler.
|
|
283
284
|
*
|
|
@@ -293,7 +294,7 @@ class Vt extends k {
|
|
|
293
294
|
*/
|
|
294
295
|
render() {
|
|
295
296
|
const t = this.getMainClass(), s = this.title || "", o = this.description || null;
|
|
296
|
-
return
|
|
297
|
+
return ze(
|
|
297
298
|
{
|
|
298
299
|
class: t,
|
|
299
300
|
title: s,
|
|
@@ -408,7 +409,7 @@ class Vt extends k {
|
|
|
408
409
|
* @returns {void}
|
|
409
410
|
*/
|
|
410
411
|
open() {
|
|
411
|
-
|
|
412
|
+
Ee(this), this.showModal();
|
|
412
413
|
}
|
|
413
414
|
/**
|
|
414
415
|
* This will destroy the modal.
|
|
@@ -463,7 +464,7 @@ const R = {
|
|
|
463
464
|
borderColor: "border",
|
|
464
465
|
iconColor: "text-muted-foreground"
|
|
465
466
|
}
|
|
466
|
-
},
|
|
467
|
+
}, Ne = (e) => L({ class: "flex justify-center" }, [
|
|
467
468
|
ne({ class: "text-lg font-bold mb-0" }, e)
|
|
468
469
|
]), Ue = u(({ href: e, class: t }, s) => J({
|
|
469
470
|
class: `bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
@@ -553,10 +554,10 @@ class Re extends k {
|
|
|
553
554
|
this.icon && C({ class: `mr-4 ${t}`, html: this.icon }),
|
|
554
555
|
l({ class: "flex flex-auto flex-col" }, [
|
|
555
556
|
l({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
556
|
-
this.title &&
|
|
557
|
+
this.title && Ne(this.title)
|
|
557
558
|
]),
|
|
558
559
|
w({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
559
|
-
(this.primary || this.secondary) &&
|
|
560
|
+
(this.primary || this.secondary) && z({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
560
561
|
])
|
|
561
562
|
]),
|
|
562
563
|
h({
|
|
@@ -578,7 +579,7 @@ class Re extends k {
|
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
581
|
let He = 0;
|
|
581
|
-
class
|
|
582
|
+
class Ht extends k {
|
|
582
583
|
/**
|
|
583
584
|
* This will render the component.
|
|
584
585
|
*
|
|
@@ -618,12 +619,12 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
618
619
|
onState: ["method", { active: e }],
|
|
619
620
|
dataSet: ["method", ["state", e, "active"]],
|
|
620
621
|
click: (o, { state: n }) => {
|
|
621
|
-
n.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"),
|
|
622
|
+
n.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), qe(e);
|
|
622
623
|
}
|
|
623
624
|
}, [
|
|
624
625
|
x(s),
|
|
625
626
|
c(t)
|
|
626
|
-
])),
|
|
627
|
+
])), qe = (e) => {
|
|
627
628
|
const t = document.documentElement;
|
|
628
629
|
if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), H && !H("(prefers-color-scheme: " + e + ")").matches) {
|
|
629
630
|
t.classList.add(e);
|
|
@@ -631,7 +632,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
631
632
|
}
|
|
632
633
|
const s = e === "light" ? "dark" : "light";
|
|
633
634
|
t.classList.remove(s);
|
|
634
|
-
},
|
|
635
|
+
}, qt = I(
|
|
635
636
|
{
|
|
636
637
|
/**
|
|
637
638
|
* This will render the component.
|
|
@@ -720,9 +721,9 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
720
721
|
OFFLINE: "bg-gray-500",
|
|
721
722
|
BUSY: "bg-red-500",
|
|
722
723
|
AWAY: "bg-yellow-500"
|
|
723
|
-
},
|
|
724
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
725
|
-
}),
|
|
724
|
+
}, Ye = (e = "") => (e = e.toUpperCase(), S[e] || S.OFFLINE), _t = (e) => l({
|
|
725
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ye(e)}`
|
|
726
|
+
}), Wt = ({ propName: e = "status" } = {}) => l({
|
|
726
727
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
727
728
|
onSet: [e, {
|
|
728
729
|
[S.ONLINE]: T.ONLINE,
|
|
@@ -730,7 +731,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
730
731
|
[S.BUSY]: T.BUSY,
|
|
731
732
|
[S.AWAY]: T.AWAY
|
|
732
733
|
}]
|
|
733
|
-
}), _e = (e) => e.indexOf(".") === -1 && e.indexOf("[[") === -1,
|
|
734
|
+
}), _e = (e) => e.indexOf(".") === -1 && e.indexOf("[[") === -1, Gt = I(
|
|
734
735
|
{
|
|
735
736
|
/**
|
|
736
737
|
* Get the initial state for the component.
|
|
@@ -750,7 +751,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
750
751
|
*/
|
|
751
752
|
openFileBrowse() {
|
|
752
753
|
const e = this.input;
|
|
753
|
-
e && (e.value = "",
|
|
754
|
+
e && (e.value = "", y.trigger("click", e));
|
|
754
755
|
},
|
|
755
756
|
/**
|
|
756
757
|
* Get the URL for the uploaded file.
|
|
@@ -786,7 +787,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
786
787
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
787
788
|
}
|
|
788
789
|
}, [
|
|
789
|
-
B("loaded", (s) => s === !1 || _e(this.src) ?
|
|
790
|
+
B("loaded", (s) => s === !1 || _e(this.src) ? O({
|
|
790
791
|
htmlFor: e,
|
|
791
792
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
792
793
|
}, [
|
|
@@ -801,7 +802,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
801
802
|
]);
|
|
802
803
|
}
|
|
803
804
|
}
|
|
804
|
-
),
|
|
805
|
+
), Jt = I(
|
|
805
806
|
{
|
|
806
807
|
/**
|
|
807
808
|
* Get the initial state for the component.
|
|
@@ -821,7 +822,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
821
822
|
*/
|
|
822
823
|
openFileBrowse() {
|
|
823
824
|
const e = this.input;
|
|
824
|
-
e && (e.value = "",
|
|
825
|
+
e && (e.value = "", y.trigger("click", e));
|
|
825
826
|
},
|
|
826
827
|
/**
|
|
827
828
|
* Get the URL for the uploaded file.
|
|
@@ -863,7 +864,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
863
864
|
// @ts-ignore
|
|
864
865
|
src: this.src,
|
|
865
866
|
class: "absolute inset-0 w-full h-full object-cover rounded-full"
|
|
866
|
-
}) :
|
|
867
|
+
}) : O({
|
|
867
868
|
htmlFor: e,
|
|
868
869
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
869
870
|
}, [
|
|
@@ -890,7 +891,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
890
891
|
}, d.chevron.single.right), Je = (e) => l({ class: "flex items-center" }, [
|
|
891
892
|
e.href ? We(e.href, e.label) : c(e.label),
|
|
892
893
|
e.separator && Ge()
|
|
893
|
-
]),
|
|
894
|
+
]), Kt = I(
|
|
894
895
|
{
|
|
895
896
|
/**
|
|
896
897
|
* Set initial data
|
|
@@ -929,7 +930,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
929
930
|
);
|
|
930
931
|
}
|
|
931
932
|
}
|
|
932
|
-
),
|
|
933
|
+
), q = {
|
|
933
934
|
xs: "h-1 w-1",
|
|
934
935
|
sm: "h-2 w-2",
|
|
935
936
|
md: "h-4 w-4",
|
|
@@ -938,7 +939,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
938
939
|
"2xl": "h-16 w-16",
|
|
939
940
|
"3xl": "h-24 w-24",
|
|
940
941
|
default: "h-4 w-4"
|
|
941
|
-
}, Ke = (e) =>
|
|
942
|
+
}, Ke = (e) => q[e] || q.default, Qe = ({ index: e, size: t }) => l({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
|
|
942
943
|
c({
|
|
943
944
|
class: "block w-full h-full rounded-full transition-colors",
|
|
944
945
|
onSet: ["activeIndex", {
|
|
@@ -952,7 +953,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
952
953
|
]), Xe = (e, t) => Array.from({ length: e }, (s, o) => Qe({
|
|
953
954
|
index: o,
|
|
954
955
|
size: t
|
|
955
|
-
})),
|
|
956
|
+
})), Qt = I(
|
|
956
957
|
{
|
|
957
958
|
/**
|
|
958
959
|
* Defines component data (props).
|
|
@@ -1013,7 +1014,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1013
1014
|
tt(e, t)
|
|
1014
1015
|
]) : null
|
|
1015
1016
|
)
|
|
1016
|
-
]),
|
|
1017
|
+
]), Xt = I(
|
|
1017
1018
|
{
|
|
1018
1019
|
/**
|
|
1019
1020
|
* This will set up the data.
|
|
@@ -1142,7 +1143,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1142
1143
|
max: s,
|
|
1143
1144
|
type: "number",
|
|
1144
1145
|
"aria-label": "Counter"
|
|
1145
|
-
})),
|
|
1146
|
+
})), Zt = D(
|
|
1146
1147
|
{
|
|
1147
1148
|
/**
|
|
1148
1149
|
* Initial state for the counter component.
|
|
@@ -1187,16 +1188,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1187
1188
|
placeholder: e || "mm/dd/yyyy",
|
|
1188
1189
|
input: t,
|
|
1189
1190
|
focus: s,
|
|
1190
|
-
onState: ["selectedDate", (o) =>
|
|
1191
|
-
if (o) {
|
|
1192
|
-
const n = new Date(o);
|
|
1193
|
-
if (!isNaN(n.getTime())) {
|
|
1194
|
-
const r = (n.getMonth() + 1).toString().padStart(2, "0"), i = n.getDate().toString().padStart(2, "0"), a = n.getFullYear();
|
|
1195
|
-
return `${r}/${i}/${a}`;
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
return "";
|
|
1199
|
-
}]
|
|
1191
|
+
onState: ["selectedDate", (o) => o ? j.format("standard", o) : ""]
|
|
1200
1192
|
}), at = ({ bind: e, required: t, toggleOpen: s, handleInputChange: o, handleInputFocus: n, placeholder: r }) => l(
|
|
1201
1193
|
{
|
|
1202
1194
|
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"
|
|
@@ -1214,7 +1206,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1214
1206
|
]
|
|
1215
1207
|
)
|
|
1216
1208
|
]
|
|
1217
|
-
), ct = ({ handleDateSelect: e, blockPriorDates: t }) =>
|
|
1209
|
+
), ct = ({ handleDateSelect: e, blockPriorDates: t }) => E(
|
|
1218
1210
|
(s, o, n) => new F({
|
|
1219
1211
|
cache: "dropdown",
|
|
1220
1212
|
parent: n,
|
|
@@ -1227,7 +1219,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1227
1219
|
blockPriorDates: t
|
|
1228
1220
|
})
|
|
1229
1221
|
])
|
|
1230
|
-
),
|
|
1222
|
+
), es = D(
|
|
1231
1223
|
{
|
|
1232
1224
|
/**
|
|
1233
1225
|
* The initial state of the DatePicker.
|
|
@@ -1259,16 +1251,16 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1259
1251
|
const i = n.target.value.replace(/\D/g, "");
|
|
1260
1252
|
let a = "";
|
|
1261
1253
|
if (i.length > 0 && (a = i.substring(0, 2), i.length > 2 && (a += "/" + i.substring(2, 4), i.length > 4 && (a += "/" + i.substring(4, 8)))), n.target.value = a, i.length === 8) {
|
|
1262
|
-
const m = parseInt(i.substring(0, 2), 10), g = parseInt(i.substring(2, 4), 10),
|
|
1263
|
-
if (m >= 1 && m <= 12 && g >= 1 && g <= 31 &&
|
|
1264
|
-
const p = `${
|
|
1265
|
-
this.state.selectedDate = p, this.input.value = p,
|
|
1254
|
+
const m = parseInt(i.substring(0, 2), 10), g = parseInt(i.substring(2, 4), 10), v = parseInt(i.substring(4, 8), 10);
|
|
1255
|
+
if (m >= 1 && m <= 12 && g >= 1 && g <= 31 && v >= 1900) {
|
|
1256
|
+
const p = `${v}-${m.toString().padStart(2, "0")}-${g.toString().padStart(2, "0")}`;
|
|
1257
|
+
this.state.selectedDate = p, this.input.value = p, y.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(p);
|
|
1266
1258
|
}
|
|
1267
1259
|
}
|
|
1268
1260
|
}, s = (n) => {
|
|
1269
1261
|
n.target.select();
|
|
1270
1262
|
}, o = (n) => {
|
|
1271
|
-
this.state.selectedDate = n, this.state.open = !1, this.input.value = n,
|
|
1263
|
+
this.state.selectedDate = n, this.state.open = !1, this.input.value = n, y.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(n);
|
|
1272
1264
|
};
|
|
1273
1265
|
return l(
|
|
1274
1266
|
{ class: "relative w-full max-w-[320px]" },
|
|
@@ -1305,7 +1297,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1305
1297
|
c(U.date(["[[end]]", o], "End Date"))
|
|
1306
1298
|
]),
|
|
1307
1299
|
C({ html: d.calendar.days })
|
|
1308
|
-
]), ht = ({ handleDateSelect: e, blockPriorDates: t }) =>
|
|
1300
|
+
]), ht = ({ handleDateSelect: e, blockPriorDates: t }) => E((s, o, n) => new F({
|
|
1309
1301
|
cache: "dropdown",
|
|
1310
1302
|
parent: n,
|
|
1311
1303
|
button: n.panel,
|
|
@@ -1317,7 +1309,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1317
1309
|
onRangeSelect: e,
|
|
1318
1310
|
blockPriorDates: t
|
|
1319
1311
|
})
|
|
1320
|
-
])),
|
|
1312
|
+
])), ts = D(
|
|
1321
1313
|
{
|
|
1322
1314
|
/**
|
|
1323
1315
|
* The initial state of the DateRangePicker.
|
|
@@ -1350,7 +1342,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1350
1342
|
*/
|
|
1351
1343
|
render() {
|
|
1352
1344
|
const e = (s, { state: o }) => o.toggle("open"), t = (s, o) => {
|
|
1353
|
-
this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`,
|
|
1345
|
+
this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, y.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: o }, this.parent);
|
|
1354
1346
|
};
|
|
1355
1347
|
return l({ class: "relative w-full max-w-[320px]" }, [
|
|
1356
1348
|
dt({
|
|
@@ -1365,12 +1357,12 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
|
|
|
1365
1357
|
]);
|
|
1366
1358
|
}
|
|
1367
1359
|
}
|
|
1368
|
-
),
|
|
1360
|
+
), ss = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => ie([
|
|
1369
1361
|
new be({
|
|
1370
1362
|
dateTime: e,
|
|
1371
1363
|
filter: s || ((o) => {
|
|
1372
|
-
const n =
|
|
1373
|
-
return
|
|
1364
|
+
const n = j.getLocalTime(o, !0, !1, t);
|
|
1365
|
+
return j.getTimeFrame(n);
|
|
1374
1366
|
})
|
|
1375
1367
|
})
|
|
1376
1368
|
]);
|
|
@@ -1427,7 +1419,7 @@ function P({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: n = !1
|
|
|
1427
1419
|
);
|
|
1428
1420
|
}
|
|
1429
1421
|
function pt({ handleTimeSelect: e }) {
|
|
1430
|
-
return
|
|
1422
|
+
return E(
|
|
1431
1423
|
(t, s, o) => new F(
|
|
1432
1424
|
{
|
|
1433
1425
|
cache: "dropdown",
|
|
@@ -1473,7 +1465,7 @@ function pt({ handleTimeSelect: e }) {
|
|
|
1473
1465
|
)
|
|
1474
1466
|
);
|
|
1475
1467
|
}
|
|
1476
|
-
function
|
|
1468
|
+
function Y(e) {
|
|
1477
1469
|
if (!e)
|
|
1478
1470
|
return { hour: null, minute: null, meridian: null };
|
|
1479
1471
|
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
@@ -1486,7 +1478,7 @@ function q(e) {
|
|
|
1486
1478
|
meridian: r
|
|
1487
1479
|
});
|
|
1488
1480
|
}
|
|
1489
|
-
const
|
|
1481
|
+
const os = D(
|
|
1490
1482
|
{
|
|
1491
1483
|
/**
|
|
1492
1484
|
* The initial shallow state of the TimePicker.
|
|
@@ -1494,7 +1486,7 @@ const ss = D(
|
|
|
1494
1486
|
* @member {object} state
|
|
1495
1487
|
*/
|
|
1496
1488
|
state() {
|
|
1497
|
-
const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } =
|
|
1489
|
+
const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = Y(e);
|
|
1498
1490
|
return {
|
|
1499
1491
|
selectedTime: e,
|
|
1500
1492
|
open: !1,
|
|
@@ -1510,7 +1502,7 @@ const ss = D(
|
|
|
1510
1502
|
*/
|
|
1511
1503
|
after() {
|
|
1512
1504
|
if (this.input.value) {
|
|
1513
|
-
const { hour: e, minute: t, meridian: s } =
|
|
1505
|
+
const { hour: e, minute: t, meridian: s } = Y(this.input.value);
|
|
1514
1506
|
this.state.set({
|
|
1515
1507
|
hour: e,
|
|
1516
1508
|
minute: t,
|
|
@@ -1530,15 +1522,15 @@ const ss = D(
|
|
|
1530
1522
|
if (r.length > 0 && (i = r.substring(0, 2), r.length > 2 && (i += ":" + r.substring(2, 4))), r.length >= 4) {
|
|
1531
1523
|
const a = parseInt(r.substring(0, 2), 10), m = parseInt(r.substring(2, 4), 10);
|
|
1532
1524
|
if (a >= 0 && a <= 23 && m >= 0 && m <= 59) {
|
|
1533
|
-
let g = a,
|
|
1534
|
-
a === 0 ? g = 12 : a > 12 ? (g = a - 12,
|
|
1535
|
-
const p = `${g.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")} ${
|
|
1525
|
+
let g = a, v = "AM";
|
|
1526
|
+
a === 0 ? g = 12 : a > 12 ? (g = a - 12, v = "PM") : a === 12 && (v = "PM");
|
|
1527
|
+
const p = `${g.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")} ${v}`;
|
|
1536
1528
|
i = p, this.state.set({
|
|
1537
1529
|
hour: g.toString().padStart(2, "0"),
|
|
1538
1530
|
minute: m.toString().padStart(2, "0"),
|
|
1539
|
-
meridian:
|
|
1531
|
+
meridian: v,
|
|
1540
1532
|
selectedTime: p
|
|
1541
|
-
}), this.input.value = p,
|
|
1533
|
+
}), this.input.value = p, y.trigger("change", this.input), typeof this.change == "function" && this.change(p);
|
|
1542
1534
|
}
|
|
1543
1535
|
}
|
|
1544
1536
|
n.target.value = i;
|
|
@@ -1547,7 +1539,7 @@ const ss = D(
|
|
|
1547
1539
|
}, o = ({ hour: n, minute: r, meridian: i }) => {
|
|
1548
1540
|
if (n && (this.state.hour = n), r && (this.state.minute = r), i && (this.state.meridian = i), this.state.hour && this.state.minute && this.state.meridian) {
|
|
1549
1541
|
const a = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
1550
|
-
this.state.selectedTime = a, this.state.open = !1, this.input.value = a,
|
|
1542
|
+
this.state.selectedTime = a, this.state.open = !1, this.input.value = a, y.trigger("change", this.input), typeof this.change == "function" && this.change(a);
|
|
1551
1543
|
}
|
|
1552
1544
|
};
|
|
1553
1545
|
return l(
|
|
@@ -1572,7 +1564,7 @@ const ss = D(
|
|
|
1572
1564
|
x({ size: "lg" }, e)
|
|
1573
1565
|
]), xt = ({ title: e }) => L({ class: "flex flex-auto items-center" }, [
|
|
1574
1566
|
$({ class: "text-lg font-semibold" }, e)
|
|
1575
|
-
]),
|
|
1567
|
+
]), vt = u((e, t) => ae(
|
|
1576
1568
|
{
|
|
1577
1569
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
1578
1570
|
rounded-lg flex flex-auto flex-col
|
|
@@ -1590,11 +1582,11 @@ const ss = D(
|
|
|
1590
1582
|
e.description && w({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
1591
1583
|
l({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
1592
1584
|
]),
|
|
1593
|
-
e.buttons &&
|
|
1585
|
+
e.buttons && z({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:gap-x-2" }, e.buttons)
|
|
1594
1586
|
])
|
|
1595
1587
|
])
|
|
1596
1588
|
]
|
|
1597
|
-
)),
|
|
1589
|
+
)), yt = (e) => X.render(e, app.root), _ = {
|
|
1598
1590
|
info: {
|
|
1599
1591
|
borderColor: "border-blue-500",
|
|
1600
1592
|
bgColor: "bg-muted/10",
|
|
@@ -1639,7 +1631,7 @@ class wt extends k {
|
|
|
1639
1631
|
const t = (a) => {
|
|
1640
1632
|
a.target === this.panel && this.close();
|
|
1641
1633
|
}, { borderColor: s, bgColor: o, iconColor: n } = _[this.type] || _.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
|
|
1642
|
-
return
|
|
1634
|
+
return vt({
|
|
1643
1635
|
class: r,
|
|
1644
1636
|
title: i,
|
|
1645
1637
|
click: t,
|
|
@@ -1683,7 +1675,7 @@ class wt extends k {
|
|
|
1683
1675
|
* @returns {void}
|
|
1684
1676
|
*/
|
|
1685
1677
|
open() {
|
|
1686
|
-
|
|
1678
|
+
yt(this), this.panel.showModal(), this.state.open = !0;
|
|
1687
1679
|
}
|
|
1688
1680
|
/**
|
|
1689
1681
|
* This will close the modal.
|
|
@@ -1694,7 +1686,7 @@ class wt extends k {
|
|
|
1694
1686
|
this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
|
|
1695
1687
|
}
|
|
1696
1688
|
}
|
|
1697
|
-
class
|
|
1689
|
+
class ns extends wt {
|
|
1698
1690
|
/**
|
|
1699
1691
|
* This will declare the props for the compiler.
|
|
1700
1692
|
*
|
|
@@ -1724,7 +1716,7 @@ class os extends wt {
|
|
|
1724
1716
|
this.confirmed && this.confirmed(), this.close();
|
|
1725
1717
|
}
|
|
1726
1718
|
}
|
|
1727
|
-
const
|
|
1719
|
+
const ls = u((e, t = []) => l({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
1728
1720
|
ee({ class: "flex flex-auto flex-col" }, [
|
|
1729
1721
|
l({ class: "flex flex-auto flex-col gap-y-4" }, [
|
|
1730
1722
|
l({ class: "flex flex-auto items-center justify-center" }, [
|
|
@@ -1741,50 +1733,50 @@ const ns = u((e, t = []) => l({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
|
1741
1733
|
])
|
|
1742
1734
|
]));
|
|
1743
1735
|
export {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1736
|
+
Lt as A,
|
|
1737
|
+
Kt as B,
|
|
1738
|
+
Vt as C,
|
|
1739
|
+
At as D,
|
|
1740
|
+
es as E,
|
|
1749
1741
|
Te as F,
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1742
|
+
ts as G,
|
|
1743
|
+
ss as H,
|
|
1744
|
+
Gt as I,
|
|
1745
|
+
os as J,
|
|
1746
|
+
ns as K,
|
|
1747
|
+
Jt as L,
|
|
1748
|
+
Rt as M,
|
|
1749
|
+
Ht as N,
|
|
1750
|
+
vt as O,
|
|
1759
1751
|
nt as P,
|
|
1760
1752
|
wt as Q,
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1753
|
+
ls as R,
|
|
1754
|
+
Ut as S,
|
|
1755
|
+
qt as T,
|
|
1764
1756
|
ke as a,
|
|
1765
|
-
|
|
1757
|
+
Mt as b,
|
|
1766
1758
|
De as c,
|
|
1767
1759
|
Be as d,
|
|
1768
1760
|
Le as e,
|
|
1769
1761
|
Ae as f,
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1762
|
+
Pt as g,
|
|
1763
|
+
jt as h,
|
|
1764
|
+
Ot as i,
|
|
1773
1765
|
Pe as j,
|
|
1774
|
-
|
|
1766
|
+
zt as k,
|
|
1775
1767
|
ee as l,
|
|
1776
|
-
|
|
1777
|
-
|
|
1768
|
+
Et as m,
|
|
1769
|
+
Nt as n,
|
|
1778
1770
|
Re as o,
|
|
1779
1771
|
Yt as p,
|
|
1780
|
-
|
|
1781
|
-
|
|
1772
|
+
_t as q,
|
|
1773
|
+
Wt as r,
|
|
1782
1774
|
T as s,
|
|
1783
1775
|
S as t,
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1776
|
+
Ye as u,
|
|
1777
|
+
Qt as v,
|
|
1778
|
+
Xt as w,
|
|
1787
1779
|
ot as x,
|
|
1788
1780
|
lt as y,
|
|
1789
|
-
|
|
1781
|
+
Zt as z
|
|
1790
1782
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Div as a, H4 as d, P as c } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as t } from "@base-framework/base";
|
|
3
|
+
const n = t((e, l) => {
|
|
4
|
+
const r = e.margin ?? "my-5 mx-5", s = e.padding ?? "p-4";
|
|
5
|
+
return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), a({
|
|
6
|
+
...e,
|
|
7
|
+
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${r} ${s} ${e.class || ""}`
|
|
8
|
+
}, l);
|
|
9
|
+
}), g = t((e, l) => {
|
|
10
|
+
const r = e.border === !0 ? "border-t" : "";
|
|
11
|
+
return a({
|
|
12
|
+
...e,
|
|
13
|
+
class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr_2fr] sm:gap-x-6 pt-8 ${r} ${e.class || ""}`
|
|
14
|
+
}, [
|
|
15
|
+
e.label && a({
|
|
16
|
+
...e.labelProps,
|
|
17
|
+
class: `flex flex-auto flex-col gap-y-1 ${e.labelProps?.class || ""}`
|
|
18
|
+
}, [
|
|
19
|
+
d({ class: "text-base" }, e.label),
|
|
20
|
+
e.description && c({ class: "text-sm text-muted-foreground" }, e.description)
|
|
21
|
+
]),
|
|
22
|
+
// Controls container: grows to fill remaining space, spacing between items
|
|
23
|
+
a({ class: "flex flex-col gap-y-4" }, l)
|
|
24
|
+
]);
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
n as C,
|
|
28
|
+
g as F
|
|
29
|
+
};
|