@base-framework/ui 1.0.6 → 1.0.8
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/{confirmation-BqQwYCFz.js → confirmation-ATWztC69.js} +131 -128
- package/dist/index.es.js +2 -2
- package/dist/molecules.es.js +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-SUQkOThQ.js → signature-panel-DCDay7u0.js} +339 -339
- package/dist/types/components/molecules/combobox/combobox.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Div as n, I as
|
|
2
|
-
import { Atom as c, Component as b, Html as L, Dom as Z, base as ee, Data as
|
|
3
|
-
import { P as
|
|
4
|
-
import { B as u, I as
|
|
1
|
+
import { Div as n, I as f, H5 as _, P as p, Li as O, Span as a, Ul as V, Button as h, OnState as v, Label as R, Form as W, H2 as B, Footer as $, Header as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, Time as Q, Dialog as X } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as b, Html as L, Dom as Z, base as ee, Data as k, Builder as q, Jot as S, DateTime as A } from "@base-framework/base";
|
|
3
|
+
import { P as D, b as te } from "./calendar-B5TK6tLi.js";
|
|
4
|
+
import { B as u, I as x } from "./icon-B9QUT2NY.js";
|
|
5
5
|
import { Icons as d } from "./icons.es.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as w } from "./veil-DSQdR6CM.js";
|
|
7
7
|
import { Timer as se, List as oe, DynamicTime as ne } from "@base-framework/organisms";
|
|
8
8
|
const P = {
|
|
9
9
|
info: {
|
|
@@ -31,15 +31,15 @@ const P = {
|
|
|
31
31
|
bgColor: "bg-muted/10",
|
|
32
32
|
iconColor: "text-muted-foreground"
|
|
33
33
|
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
]),
|
|
37
|
-
const { borderColor:
|
|
38
|
-
return n({ class: `flex items-start p-4 border rounded-lg ${
|
|
34
|
+
}, re = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
35
|
+
f({ html: e })
|
|
36
|
+
]), le = (e) => _({ class: "font-semibold" }, e), ie = (e) => p({ class: "text-sm text-muted-foreground" }, e), ht = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
|
|
37
|
+
const { borderColor: l, bgColor: r, iconColor: i } = P[o] || P.default;
|
|
38
|
+
return n({ class: `flex items-start p-4 border rounded-lg ${r} ${l}` }, [
|
|
39
39
|
// Icon and content
|
|
40
|
-
s &&
|
|
40
|
+
s && re(s, i),
|
|
41
41
|
n({ class: "flex flex-col" }, [
|
|
42
|
-
|
|
42
|
+
le(e),
|
|
43
43
|
ie(t)
|
|
44
44
|
])
|
|
45
45
|
]);
|
|
@@ -82,7 +82,7 @@ const ce = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
|
|
|
82
82
|
class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
|
|
83
83
|
for: ["groups", (t) => me(t, e)]
|
|
84
84
|
})
|
|
85
|
-
]), ge = ({ label: e, icon: t, toggleDropdown: s }) =>
|
|
85
|
+
]), ge = ({ label: e, icon: t, toggleDropdown: s }) => h({
|
|
86
86
|
cache: "button",
|
|
87
87
|
class: `inline-flex items-center justify-between rounded-md border border-input
|
|
88
88
|
bg-background px-2 py-2 text-sm font-medium hover:bg-muted
|
|
@@ -90,11 +90,11 @@ const ce = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
|
|
|
90
90
|
click: s
|
|
91
91
|
}, [
|
|
92
92
|
e && a(e),
|
|
93
|
-
t &&
|
|
93
|
+
t && f({ html: t })
|
|
94
94
|
]), pe = ({ onSelect: e }) => n([
|
|
95
|
-
|
|
95
|
+
v(
|
|
96
96
|
"open",
|
|
97
|
-
(t, s, o) => t ? new
|
|
97
|
+
(t, s, o) => t ? new D({
|
|
98
98
|
cache: "dropdown",
|
|
99
99
|
parent: o,
|
|
100
100
|
button: o.button
|
|
@@ -118,7 +118,7 @@ class mt extends b {
|
|
|
118
118
|
* @returns {Data}
|
|
119
119
|
*/
|
|
120
120
|
setData() {
|
|
121
|
-
return new
|
|
121
|
+
return new k({
|
|
122
122
|
groups: this.groups || []
|
|
123
123
|
});
|
|
124
124
|
}
|
|
@@ -174,16 +174,16 @@ const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
174
174
|
invalid: s,
|
|
175
175
|
input: t
|
|
176
176
|
} : o)), Ce = c((e, t) => {
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
}, (
|
|
180
|
-
e.setError(
|
|
177
|
+
const l = H(t, (r) => {
|
|
178
|
+
r.target.checkValidity() && e.setError(null);
|
|
179
|
+
}, (r) => {
|
|
180
|
+
e.setError(r.target.validationMessage);
|
|
181
181
|
});
|
|
182
182
|
return n({
|
|
183
183
|
...e,
|
|
184
184
|
class: "w-full"
|
|
185
|
-
},
|
|
186
|
-
}), ft =
|
|
185
|
+
}, l);
|
|
186
|
+
}), ft = w(
|
|
187
187
|
{
|
|
188
188
|
/**
|
|
189
189
|
* The initial state of the FormField.
|
|
@@ -204,8 +204,8 @@ const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
204
204
|
* @returns {object}
|
|
205
205
|
*/
|
|
206
206
|
render() {
|
|
207
|
-
const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this,
|
|
208
|
-
this.state.error =
|
|
207
|
+
const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, l = (r) => {
|
|
208
|
+
this.state.error = r, this.state.hasError = !!r;
|
|
209
209
|
};
|
|
210
210
|
return n({ class: "flex flex-auto space-y-4" }, [
|
|
211
211
|
be([
|
|
@@ -214,10 +214,10 @@ const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
214
214
|
id: t,
|
|
215
215
|
name: e,
|
|
216
216
|
value: this.state.value,
|
|
217
|
-
setError:
|
|
217
|
+
setError: l
|
|
218
218
|
}, this.children),
|
|
219
219
|
o && we({ id: this.getId("description") }, o),
|
|
220
|
-
n({ onState: ["error", (
|
|
220
|
+
n({ onState: ["error", (r) => r && ye(r)] })
|
|
221
221
|
])
|
|
222
222
|
]);
|
|
223
223
|
}
|
|
@@ -232,15 +232,15 @@ const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
232
232
|
])), bt = (e, t) => n({ class: "flex justify-between" }, [
|
|
233
233
|
a({ class: "text-muted-foreground" }, e),
|
|
234
234
|
a(t)
|
|
235
|
-
]), De = ({ title: e, description: t, back: s, icon: o, options:
|
|
235
|
+
]), De = ({ title: e, description: t, back: s, icon: o, options: l = [] }) => M({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
|
|
236
236
|
/**
|
|
237
237
|
* Back Button
|
|
238
238
|
*/
|
|
239
|
-
s && u({ variant: "icon", icon: d.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (
|
|
239
|
+
s && u({ variant: "icon", icon: d.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (r, i) => i.close() }),
|
|
240
240
|
/**
|
|
241
241
|
* Icon
|
|
242
242
|
*/
|
|
243
|
-
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
243
|
+
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [x(o)]),
|
|
244
244
|
/**
|
|
245
245
|
* Title and Description
|
|
246
246
|
*/
|
|
@@ -249,7 +249,7 @@ const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
249
249
|
B({ class: "text-lg font-semibold m-0" }, e),
|
|
250
250
|
t && n({ class: "text-sm text-muted-foreground" }, t)
|
|
251
251
|
]),
|
|
252
|
-
...
|
|
252
|
+
...l
|
|
253
253
|
])
|
|
254
254
|
]), Ie = c((e, t) => n({
|
|
255
255
|
popover: "manual",
|
|
@@ -413,7 +413,7 @@ class xt extends b {
|
|
|
413
413
|
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(), document.documentElement.style.overflowY = "auto";
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
const
|
|
416
|
+
const z = {
|
|
417
417
|
info: {
|
|
418
418
|
bgColor: "bg-muted/10",
|
|
419
419
|
borderColor: "border-blue-500",
|
|
@@ -473,14 +473,14 @@ class Me extends ae {
|
|
|
473
473
|
* @returns {object}
|
|
474
474
|
*/
|
|
475
475
|
render() {
|
|
476
|
-
const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(),
|
|
477
|
-
return
|
|
478
|
-
href:
|
|
476
|
+
const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), l = this.href || null, r = this.getChildren(o);
|
|
477
|
+
return l ? Be({
|
|
478
|
+
href: l,
|
|
479
479
|
class: `${t} ${s}`
|
|
480
|
-
},
|
|
480
|
+
}, r) : $e({
|
|
481
481
|
close: this.close.bind(this),
|
|
482
482
|
class: `${t} ${s}`
|
|
483
|
-
},
|
|
483
|
+
}, r);
|
|
484
484
|
}
|
|
485
485
|
/**
|
|
486
486
|
* This will be called after the component is set up.
|
|
@@ -498,7 +498,7 @@ class Me extends ae {
|
|
|
498
498
|
*/
|
|
499
499
|
getTypeStyles() {
|
|
500
500
|
const t = this.type || "default";
|
|
501
|
-
return
|
|
501
|
+
return z[t] || z.default;
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
504
|
* This will get the buttons for the notification.
|
|
@@ -522,7 +522,7 @@ class Me extends ae {
|
|
|
522
522
|
getChildren(t) {
|
|
523
523
|
return [
|
|
524
524
|
n({ class: "flex items-start" }, [
|
|
525
|
-
this.icon &&
|
|
525
|
+
this.icon && f({ class: `mr-4 ${t}`, html: this.icon }),
|
|
526
526
|
n({ class: "flex flex-auto flex-col" }, [
|
|
527
527
|
n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
528
528
|
this.title && Ae(this.title)
|
|
@@ -585,26 +585,26 @@ class wt extends b {
|
|
|
585
585
|
this.list.delete(t.id);
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
const
|
|
588
|
+
const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
589
589
|
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',
|
|
590
590
|
onState: ["method", { active: e }],
|
|
591
591
|
dataSet: ["method", ["state", e, "active"]],
|
|
592
|
-
click: (o, { state:
|
|
593
|
-
|
|
592
|
+
click: (o, { state: l }) => {
|
|
593
|
+
l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Pe(e);
|
|
594
594
|
}
|
|
595
595
|
}, [
|
|
596
|
-
|
|
596
|
+
x(s),
|
|
597
597
|
a(t)
|
|
598
598
|
])), Pe = (e) => {
|
|
599
599
|
var o;
|
|
600
600
|
const t = document.documentElement;
|
|
601
|
-
if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"),
|
|
601
|
+
if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), N && !N("(prefers-color-scheme: " + e + ")").matches) {
|
|
602
602
|
t.classList.add(e);
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
const s = e === "light" ? "dark" : "light";
|
|
606
606
|
t.classList.remove(s);
|
|
607
|
-
}, yt =
|
|
607
|
+
}, yt = S(
|
|
608
608
|
{
|
|
609
609
|
/**
|
|
610
610
|
* This will render the component.
|
|
@@ -631,7 +631,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
), vt =
|
|
634
|
+
), vt = w(
|
|
635
635
|
{
|
|
636
636
|
/**
|
|
637
637
|
* The initial state of the Toggle.
|
|
@@ -658,7 +658,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
658
658
|
* @returns {object}
|
|
659
659
|
*/
|
|
660
660
|
render() {
|
|
661
|
-
return
|
|
661
|
+
return h({
|
|
662
662
|
class: "relative inline-flex h-6 w-11 min-w-11 items-center rounded-full bg-muted transition-colors focus:outline-none",
|
|
663
663
|
onState: ["active", { "bg-primary": !0, "bg-muted": !1 }],
|
|
664
664
|
click: (t, { state: s }) => {
|
|
@@ -683,27 +683,27 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
683
683
|
]);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
),
|
|
686
|
+
), y = {
|
|
687
687
|
ONLINE: "online",
|
|
688
688
|
OFFLINE: "offline",
|
|
689
689
|
BUSY: "busy",
|
|
690
690
|
AWAY: "away"
|
|
691
|
-
},
|
|
691
|
+
}, m = {
|
|
692
692
|
ONLINE: "bg-green-500",
|
|
693
693
|
OFFLINE: "bg-gray-500",
|
|
694
694
|
BUSY: "bg-red-500",
|
|
695
695
|
AWAY: "bg-yellow-500"
|
|
696
|
-
},
|
|
697
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
696
|
+
}, ze = (e = "") => (e = e.toUpperCase(), m[e] || m.OFFLINE), Ct = (e) => n({
|
|
697
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${ze(e)}`
|
|
698
698
|
}), kt = ({ propName: e = "status" } = {}) => n({
|
|
699
699
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
700
700
|
onSet: [e, {
|
|
701
|
-
[
|
|
702
|
-
[
|
|
703
|
-
[
|
|
704
|
-
[
|
|
701
|
+
[m.ONLINE]: y.ONLINE,
|
|
702
|
+
[m.OFFLINE]: y.OFFLINE,
|
|
703
|
+
[m.BUSY]: y.BUSY,
|
|
704
|
+
[m.AWAY]: y.AWAY
|
|
705
705
|
}]
|
|
706
|
-
}),
|
|
706
|
+
}), Ne = (e, t) => Y(
|
|
707
707
|
{
|
|
708
708
|
href: e,
|
|
709
709
|
"aria-current": t === "Breadcrumb" && "page",
|
|
@@ -711,14 +711,14 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
711
711
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
712
712
|
},
|
|
713
713
|
[a(t)]
|
|
714
|
-
), Fe = () =>
|
|
714
|
+
), Fe = () => x({
|
|
715
715
|
class: "mx-3 text-muted-foreground",
|
|
716
716
|
"aria-hidden": !0,
|
|
717
717
|
size: "xs"
|
|
718
718
|
}, d.chevron.single.right), Ee = (e) => n({ class: "flex items-center" }, [
|
|
719
|
-
e.href ?
|
|
719
|
+
e.href ? Ne(e.href, e.label) : a(e.label),
|
|
720
720
|
e.separator && Fe()
|
|
721
|
-
]), St =
|
|
721
|
+
]), St = S(
|
|
722
722
|
{
|
|
723
723
|
/**
|
|
724
724
|
* Set initial data
|
|
@@ -726,7 +726,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
726
726
|
* @returns {Data}
|
|
727
727
|
*/
|
|
728
728
|
setData() {
|
|
729
|
-
return new
|
|
729
|
+
return new k({
|
|
730
730
|
// @ts-ignore
|
|
731
731
|
items: this.items || []
|
|
732
732
|
});
|
|
@@ -773,14 +773,14 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
773
773
|
"bg-primary": e,
|
|
774
774
|
"shadow-md": e
|
|
775
775
|
}],
|
|
776
|
-
click: (s, { data: o, onClick:
|
|
777
|
-
o.activeIndex = e,
|
|
776
|
+
click: (s, { data: o, onClick: l }) => {
|
|
777
|
+
o.activeIndex = e, l && l(e);
|
|
778
778
|
}
|
|
779
779
|
})
|
|
780
780
|
]), Ve = (e, t) => Array.from({ length: e }, (s, o) => Oe({
|
|
781
781
|
index: o,
|
|
782
782
|
size: t
|
|
783
|
-
})), Dt =
|
|
783
|
+
})), Dt = S(
|
|
784
784
|
{
|
|
785
785
|
/**
|
|
786
786
|
* Defines component data (props).
|
|
@@ -788,7 +788,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
788
788
|
* @returns {Data}
|
|
789
789
|
*/
|
|
790
790
|
setData() {
|
|
791
|
-
return new
|
|
791
|
+
return new k({
|
|
792
792
|
// @ts-ignore
|
|
793
793
|
count: this.count || 4,
|
|
794
794
|
// total dots
|
|
@@ -811,7 +811,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
), Ye = ({ toggleDropdown: e }) =>
|
|
814
|
+
), Ye = ({ toggleDropdown: e }) => h(
|
|
815
815
|
{
|
|
816
816
|
cache: "button",
|
|
817
817
|
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",
|
|
@@ -819,29 +819,29 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
819
819
|
},
|
|
820
820
|
[
|
|
821
821
|
a({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
822
|
-
|
|
822
|
+
f({ html: d.chevron.upDown })
|
|
823
823
|
]
|
|
824
|
-
), qe = (e, t) => O({
|
|
824
|
+
), qe = (e, t, s) => O({
|
|
825
825
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
826
826
|
click: () => t(e),
|
|
827
|
-
onState: ["selectedValue", { "bg-secondary": e.value }]
|
|
827
|
+
onState: [s, "selectedValue", { "bg-secondary": e.value }]
|
|
828
828
|
}, [
|
|
829
|
-
e.icon && a({ class: "mr-2 flex items-baseline" }, [
|
|
829
|
+
e.icon && a({ class: "mr-2 flex items-baseline" }, [x({ size: "xs" }, e.icon)]),
|
|
830
830
|
a(e.label)
|
|
831
|
-
]), He = (e) => n({ class: "w-full border rounded-md" }, [
|
|
832
|
-
V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (
|
|
833
|
-
]), Ue = ({ onSelect: e }) => n({ class: "flex flex-auto flex-col" }, [
|
|
834
|
-
|
|
831
|
+
]), He = (e, t) => n({ class: "w-full border rounded-md" }, [
|
|
832
|
+
V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => qe(s, e, t)] })
|
|
833
|
+
]), Ue = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
|
|
834
|
+
v(
|
|
835
835
|
"open",
|
|
836
|
-
(
|
|
836
|
+
(s, o, l) => s ? new D({
|
|
837
837
|
cache: "dropdown",
|
|
838
|
-
parent:
|
|
839
|
-
button:
|
|
838
|
+
parent: l,
|
|
839
|
+
button: l.button
|
|
840
840
|
}, [
|
|
841
|
-
He(e)
|
|
841
|
+
He(e, t)
|
|
842
842
|
]) : null
|
|
843
843
|
)
|
|
844
|
-
]), It =
|
|
844
|
+
]), It = S(
|
|
845
845
|
{
|
|
846
846
|
/**
|
|
847
847
|
* This will set up the data.
|
|
@@ -849,7 +849,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
849
849
|
* @returns {Data}
|
|
850
850
|
*/
|
|
851
851
|
setData() {
|
|
852
|
-
return new
|
|
852
|
+
return new k({
|
|
853
853
|
// @ts-ignore
|
|
854
854
|
items: this.items || []
|
|
855
855
|
});
|
|
@@ -859,10 +859,12 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
859
859
|
*
|
|
860
860
|
* @returns {object}
|
|
861
861
|
*/
|
|
862
|
-
state
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
862
|
+
state() {
|
|
863
|
+
return {
|
|
864
|
+
open: !1,
|
|
865
|
+
selectedLabel: "",
|
|
866
|
+
selectedValue: ""
|
|
867
|
+
};
|
|
866
868
|
},
|
|
867
869
|
/**
|
|
868
870
|
* Handles the selection of an item.
|
|
@@ -888,17 +890,18 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
888
890
|
* @returns {object}
|
|
889
891
|
*/
|
|
890
892
|
render() {
|
|
891
|
-
const e = (t) => {
|
|
892
|
-
const s = this.state;
|
|
893
|
-
s.selectedValue = t.value, s.selectedLabel = t.label, s.open = !1;
|
|
894
|
-
};
|
|
895
893
|
return n({ class: "relative w-full flex flex-auto flex-col max-w-[250px]" }, [
|
|
896
894
|
// @ts-ignore
|
|
897
895
|
Ye({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
898
|
-
Ue({
|
|
896
|
+
Ue({
|
|
897
|
+
// @ts-ignore
|
|
898
|
+
state: this.state,
|
|
899
|
+
// @ts-ignore
|
|
900
|
+
onSelect: this.handleSelect.bind(this)
|
|
901
|
+
}),
|
|
899
902
|
// Hidden required input for form validation
|
|
900
903
|
// @ts-ignore
|
|
901
|
-
this.required &&
|
|
904
|
+
this.required && C({
|
|
902
905
|
class: "opacity-0 absolute top-0 left-0 z-[1]",
|
|
903
906
|
type: "text",
|
|
904
907
|
// @ts-ignore
|
|
@@ -924,12 +927,12 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
924
927
|
icon: d.circlePlus,
|
|
925
928
|
click: e,
|
|
926
929
|
ariaLabel: "Increment"
|
|
927
|
-
}), We = ({ bind: e, min: t, max: s, readonly: o = !1 }) =>
|
|
930
|
+
}), We = ({ bind: e, min: t, max: s, readonly: o = !1 }) => C({
|
|
928
931
|
value: "[[count]]",
|
|
929
932
|
bind: e,
|
|
930
|
-
blur: (
|
|
931
|
-
let i = parseInt(
|
|
932
|
-
isNaN(i) && (i = t ?? 0), t !== void 0 && (i = Math.max(i, t)), s !== void 0 && (i = Math.min(i, s)),
|
|
933
|
+
blur: (l, { state: r }) => {
|
|
934
|
+
let i = parseInt(l.target.value, 10);
|
|
935
|
+
isNaN(i) && (i = t ?? 0), t !== void 0 && (i = Math.max(i, t)), s !== void 0 && (i = Math.min(i, s)), r.count = i;
|
|
933
936
|
},
|
|
934
937
|
class: "flex flex-auto text-lg font-medium bg-transparent text-center border min-w-0",
|
|
935
938
|
readonly: o,
|
|
@@ -937,7 +940,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
937
940
|
max: s,
|
|
938
941
|
type: "number",
|
|
939
942
|
"aria-label": "Counter"
|
|
940
|
-
}), Tt =
|
|
943
|
+
}), Tt = w(
|
|
941
944
|
{
|
|
942
945
|
/**
|
|
943
946
|
* Initial state for the counter component.
|
|
@@ -971,12 +974,12 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
971
974
|
]);
|
|
972
975
|
}
|
|
973
976
|
}
|
|
974
|
-
), Ge = ({ bind: e, required: t }) =>
|
|
977
|
+
), Ge = ({ bind: e, required: t }) => C({
|
|
975
978
|
cache: "input",
|
|
976
979
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
977
980
|
bind: e,
|
|
978
981
|
required: t
|
|
979
|
-
}), Je = ({ bind: e, required: t, toggleOpen: s }) =>
|
|
982
|
+
}), Je = ({ bind: e, required: t, toggleOpen: s }) => h({
|
|
980
983
|
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",
|
|
981
984
|
click: s
|
|
982
985
|
}, [
|
|
@@ -984,11 +987,11 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
984
987
|
a({
|
|
985
988
|
onState: ["selectedDate", (o) => o ? A.format("standard", o) : "Pick a date"]
|
|
986
989
|
}),
|
|
987
|
-
|
|
990
|
+
f({ html: d.calendar.days })
|
|
988
991
|
]), Ke = ({ handleDateSelect: e }) => n({ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" }, [
|
|
989
|
-
|
|
992
|
+
v(
|
|
990
993
|
"open",
|
|
991
|
-
(t, s, o) => t ? new
|
|
994
|
+
(t, s, o) => t ? new D({
|
|
992
995
|
cache: "dropdown",
|
|
993
996
|
parent: o,
|
|
994
997
|
button: o.panel,
|
|
@@ -1000,7 +1003,7 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1000
1003
|
})
|
|
1001
1004
|
]) : null
|
|
1002
1005
|
)
|
|
1003
|
-
]), At =
|
|
1006
|
+
]), At = w(
|
|
1004
1007
|
{
|
|
1005
1008
|
/**
|
|
1006
1009
|
* The initial state of the DatePicker.
|
|
@@ -1047,13 +1050,13 @@ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1047
1050
|
new ne({
|
|
1048
1051
|
dateTime: e,
|
|
1049
1052
|
filter: s || ((o) => {
|
|
1050
|
-
const
|
|
1051
|
-
return A.getTimeFrame(
|
|
1053
|
+
const l = A.getLocalTime(o, !0, !1, t);
|
|
1054
|
+
return A.getTimeFrame(l);
|
|
1052
1055
|
})
|
|
1053
1056
|
})
|
|
1054
1057
|
]);
|
|
1055
1058
|
function Qe({ bind: e, required: t }) {
|
|
1056
|
-
return
|
|
1059
|
+
return C({
|
|
1057
1060
|
cache: "input",
|
|
1058
1061
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1059
1062
|
bind: e,
|
|
@@ -1061,7 +1064,7 @@ function Qe({ bind: e, required: t }) {
|
|
|
1061
1064
|
});
|
|
1062
1065
|
}
|
|
1063
1066
|
function Xe({ bind: e, required: t, toggleOpen: s }) {
|
|
1064
|
-
return
|
|
1067
|
+
return h(
|
|
1065
1068
|
{
|
|
1066
1069
|
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",
|
|
1067
1070
|
click: s
|
|
@@ -1071,16 +1074,16 @@ function Xe({ bind: e, required: t, toggleOpen: s }) {
|
|
|
1071
1074
|
a({
|
|
1072
1075
|
onState: ["selectedTime", (o) => o || "Pick a time"]
|
|
1073
1076
|
}),
|
|
1074
|
-
|
|
1077
|
+
f({ html: d.clock })
|
|
1075
1078
|
]
|
|
1076
1079
|
);
|
|
1077
1080
|
}
|
|
1078
|
-
function T({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad:
|
|
1081
|
+
function T({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1 }) {
|
|
1079
1082
|
return n(
|
|
1080
1083
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
1081
|
-
e.map((
|
|
1082
|
-
let i =
|
|
1083
|
-
return
|
|
1084
|
+
e.map((r) => {
|
|
1085
|
+
let i = l ? r.toString().padStart(2, "0") : r.toString();
|
|
1086
|
+
return h({
|
|
1084
1087
|
text: i,
|
|
1085
1088
|
class: "hover:bg-muted/50 rounded-md px-2 py-1",
|
|
1086
1089
|
click: () => t({ [o]: i }),
|
|
@@ -1093,9 +1096,9 @@ function Ze({ handleTimeSelect: e }) {
|
|
|
1093
1096
|
return n(
|
|
1094
1097
|
{ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" },
|
|
1095
1098
|
[
|
|
1096
|
-
|
|
1099
|
+
v(
|
|
1097
1100
|
"open",
|
|
1098
|
-
(t, s, o) => t ? new
|
|
1101
|
+
(t, s, o) => t ? new D(
|
|
1099
1102
|
{
|
|
1100
1103
|
cache: "dropdown",
|
|
1101
1104
|
parent: o,
|
|
@@ -1111,7 +1114,7 @@ function Ze({ handleTimeSelect: e }) {
|
|
|
1111
1114
|
[
|
|
1112
1115
|
// Hours column
|
|
1113
1116
|
T({
|
|
1114
|
-
items: Array.from({ length: 12 }, (
|
|
1117
|
+
items: Array.from({ length: 12 }, (l, r) => r + 1),
|
|
1115
1118
|
handleTimeSelect: e,
|
|
1116
1119
|
state: o.state,
|
|
1117
1120
|
stateValue: "hour",
|
|
@@ -1119,7 +1122,7 @@ function Ze({ handleTimeSelect: e }) {
|
|
|
1119
1122
|
}),
|
|
1120
1123
|
// Minutes column
|
|
1121
1124
|
T({
|
|
1122
|
-
items: Array.from({ length: 60 }, (
|
|
1125
|
+
items: Array.from({ length: 60 }, (l, r) => r),
|
|
1123
1126
|
handleTimeSelect: e,
|
|
1124
1127
|
state: o.state,
|
|
1125
1128
|
stateValue: "minute",
|
|
@@ -1148,14 +1151,14 @@ function E(e) {
|
|
|
1148
1151
|
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
1149
1152
|
if (!s)
|
|
1150
1153
|
return { hour: null, minute: null, meridian: null };
|
|
1151
|
-
let [, o,
|
|
1152
|
-
return i < 0 || i > 23 || g < 0 || g > 59 ? { hour: null, minute: null, meridian: null } : (
|
|
1154
|
+
let [, o, l, , r] = s, i = parseInt(o, 10), g = parseInt(l, 10);
|
|
1155
|
+
return i < 0 || i > 23 || g < 0 || g > 59 ? { hour: null, minute: null, meridian: null } : (r ? (r = r.toUpperCase(), r === "PM" && i < 12 ? i += 12 : r === "AM" && i === 12 && (i = 12)) : i === 0 ? (r = "AM", i = 12) : i < 12 ? r = "AM" : i === 12 ? r = "PM" : (r = "PM", i -= 12), {
|
|
1153
1156
|
hour: i.toString().padStart(2, "0"),
|
|
1154
1157
|
minute: g.toString().padStart(2, "0"),
|
|
1155
|
-
meridian:
|
|
1158
|
+
meridian: r
|
|
1156
1159
|
});
|
|
1157
1160
|
}
|
|
1158
|
-
const $t =
|
|
1161
|
+
const $t = w(
|
|
1159
1162
|
{
|
|
1160
1163
|
/**
|
|
1161
1164
|
* The initial shallow state of the TimePicker.
|
|
@@ -1194,10 +1197,10 @@ const $t = x(
|
|
|
1194
1197
|
* @returns {object}
|
|
1195
1198
|
*/
|
|
1196
1199
|
render() {
|
|
1197
|
-
const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian:
|
|
1198
|
-
if (s && (this.state.hour = s), o && (this.state.minute = o),
|
|
1199
|
-
const
|
|
1200
|
-
this.state.selectedTime =
|
|
1200
|
+
const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: l }) => {
|
|
1201
|
+
if (s && (this.state.hour = s), o && (this.state.minute = o), l && (this.state.meridian = l), this.state.hour && this.state.minute && this.state.meridian) {
|
|
1202
|
+
const r = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
1203
|
+
this.state.selectedTime = r, this.state.open = !1, this.input.value = r, typeof this.change == "function" && this.change(r);
|
|
1201
1204
|
}
|
|
1202
1205
|
};
|
|
1203
1206
|
return n(
|
|
@@ -1216,7 +1219,7 @@ const $t = x(
|
|
|
1216
1219
|
}
|
|
1217
1220
|
}
|
|
1218
1221
|
), et = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
1219
|
-
|
|
1222
|
+
x({ size: "lg" }, e)
|
|
1220
1223
|
]), tt = ({ title: e }) => M({ class: "flex flex-auto items-center" }, [
|
|
1221
1224
|
B({ class: "text-lg font-semibold" }, e)
|
|
1222
1225
|
]), st = c((e, t) => X(
|
|
@@ -1285,13 +1288,13 @@ class nt extends b {
|
|
|
1285
1288
|
render() {
|
|
1286
1289
|
const t = (g) => {
|
|
1287
1290
|
g.target === this.panel && this.close();
|
|
1288
|
-
}, { borderColor: s, bgColor: o, iconColor:
|
|
1291
|
+
}, { borderColor: s, bgColor: o, iconColor: l } = j[this.type] || j.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
|
|
1289
1292
|
return st({
|
|
1290
|
-
class:
|
|
1293
|
+
class: r,
|
|
1291
1294
|
title: i,
|
|
1292
1295
|
click: t,
|
|
1293
1296
|
icon: this.icon,
|
|
1294
|
-
iconColor:
|
|
1297
|
+
iconColor: l,
|
|
1295
1298
|
description: this.description,
|
|
1296
1299
|
buttons: this.getButtons()
|
|
1297
1300
|
}, this.children);
|
|
@@ -1399,9 +1402,9 @@ export {
|
|
|
1399
1402
|
vt as m,
|
|
1400
1403
|
Ct as n,
|
|
1401
1404
|
kt as o,
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
+
y as p,
|
|
1406
|
+
m as q,
|
|
1407
|
+
ze as r,
|
|
1405
1408
|
Dt as s,
|
|
1406
1409
|
_e as t,
|
|
1407
1410
|
We as u,
|
package/dist/index.es.js
CHANGED
|
@@ -3,9 +3,9 @@ import { B as g, I as C, L as T } from "./icon-B9QUT2NY.js";
|
|
|
3
3
|
import { C as D, d as I, D as S, c as b, E as B, F as P, H as F, I as M, M as k, N, P as v, R as f, S as x, T as h, a as y, b as W, U as L, W as A } from "./inputs-O_WkdbI3.js";
|
|
4
4
|
import { V as w, a as U } from "./veil-DSQdR6CM.js";
|
|
5
5
|
import { Icons as R } from "./icons.es.js";
|
|
6
|
-
import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ca, p as Ta, q as ca, S as Da, n as Ia, o as Sa, T as ba, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-
|
|
6
|
+
import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ca, p as Ta, q as ca, S as Da, n as Ia, o as Sa, T as ba, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-ATWztC69.js";
|
|
7
7
|
import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-B5TK6tLi.js";
|
|
8
|
-
import { B as Oa, m as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-
|
|
8
|
+
import { B as Oa, m as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-DCDay7u0.js";
|
|
9
9
|
import { B as Cs, I as Ts, M as cs, d as Ds, e as Is, g as Ss, N as bs, b as Bs, a as Ps, f as Fs, P as Ms, c as ks, S as Ns, T as vs } from "./mobile-nav-wrapper-CguousG5.js";
|
|
10
10
|
import { B as xs, a as hs, C as ys, F as Ws, b as Ls, c as As, M as Hs, P as ws, S as Us } from "./sidebar-menu-page-kezIms-t.js";
|
|
11
11
|
import { A as Rs, F as Es, M as Gs, a as Vs, T as js } from "./aside-template-D0KANPjh.js";
|
package/dist/molecules.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-
|
|
1
|
+
import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-ATWztC69.js";
|
|
2
2
|
import { A as O, P as R, g as _ } from "./calendar-B5TK6tLi.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Alert,
|