@base-framework/ui 1.0.300 → 1.0.302

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.
@@ -1,8 +1,8 @@
1
- import { Div as n, H5 as Q, P as m, I as p, Li as V, Span as a, Ul as q, Button as f, OnState as A, Label as H, H2 as v, Form as X, Header as D, Footer as L, A as Y, H3 as Z, Checkbox as ee, Input as x, Img as te, Nav as se, UseParent as _, OnStateOpen as P, Time as oe, Dialog as ne } from "@base-framework/atoms";
2
- import { Atom as c, Component as w, Html as M, Dom as le, base as re, Data as I, Builder as W, Jot as C, Events as $, DateTime as F } from "@base-framework/base";
3
- import { P as k, b as ie, R as ae } from "./range-calendar-CcFEHyEp.js";
4
- import { C as ce, F as ue, a as y } from "./veil-B1pwIy-D.js";
5
- import { B as h, I as g } from "./buttons-CHEs54Wl.js";
1
+ import { Div as l, H5 as Q, P as m, I as g, Li as V, Span as a, Ul as q, Button as f, OnState as A, Label as H, H2 as v, Form as X, Header as D, Footer as L, A as Y, H3 as Z, Checkbox as ee, Input as x, Img as te, Nav as se, UseParent as _, OnStateOpen as P, Time as oe, Dialog as le } from "@base-framework/atoms";
2
+ import { Atom as c, Component as w, Html as M, Dom as ne, base as re, Data as I, Builder as W, Jot as C, Events as $, DateTime as F } from "@base-framework/base";
3
+ import { P as k, b as ie, R as ae } from "./range-calendar-CnBylqhu.js";
4
+ import { C as ce, F as ue, a as y } from "./veil-fLMV40Wv.js";
5
+ import { B as h, I as p } from "./buttons-CHEs54Wl.js";
6
6
  import { Icons as d } from "./icons.es.js";
7
7
  import { Timer as de, List as he, DynamicTime as fe } from "@base-framework/organisms";
8
8
  import { F as E } from "./format-DnofNaaz.js";
@@ -32,16 +32,16 @@ const N = {
32
32
  bgColor: "bg-muted/10",
33
33
  iconColor: "text-muted-foreground"
34
34
  }
35
- }, me = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
36
- p({ html: e })
37
- ]), pe = (e) => Q({ class: "font-semibold" }, e), ge = (e) => m({ class: "text-sm text-muted-foreground" }, e), kt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
38
- const { borderColor: l, bgColor: r, iconColor: i } = N[o] || N.default;
39
- return n({ class: `flex items-start p-4 border rounded-lg ${r} ${l}` }, [
35
+ }, me = (e, t) => l({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
36
+ g({ html: e })
37
+ ]), ge = (e) => Q({ class: "font-semibold" }, e), pe = (e) => m({ class: "text-sm text-muted-foreground" }, e), kt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
38
+ const { borderColor: n, bgColor: r, iconColor: i } = N[o] || N.default;
39
+ return l({ class: `flex items-start p-4 border rounded-lg ${r} ${n}` }, [
40
40
  // Icon and content
41
41
  s && me(s, i),
42
- n({ class: "flex flex-col" }, [
43
- pe(e),
44
- ge(t)
42
+ l({ class: "flex flex-col" }, [
43
+ ge(e),
44
+ pe(t)
45
45
  ])
46
46
  ]);
47
47
  });
@@ -66,7 +66,7 @@ class St extends w {
66
66
  M.removeElement(t);
67
67
  return;
68
68
  }
69
- le.addClass(t, s), re.on("animationend", t, (o) => M.removeElement(t));
69
+ ne.addClass(t, s), re.on("animationend", t, (o) => M.removeElement(t));
70
70
  }
71
71
  }
72
72
  const be = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), xe = (e) => a({ class: "flex w-4 h-4", html: e }), we = (e) => a({ class: "flex-auto" }, e), ye = (e, t) => V({
@@ -78,8 +78,8 @@ const be = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
78
78
  e.shortcut && be(e.shortcut)
79
79
  ]), ve = (e, t) => q({ class: "grid gap-2" }, [
80
80
  e.map((s) => ye(s, t))
81
- ]), Ce = (e) => n({ class: "w-full z-10" }, [
82
- n({
81
+ ]), Ce = (e) => l({ class: "w-full z-10" }, [
82
+ l({
83
83
  class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
84
84
  for: ["groups", (t) => ve(t, e)]
85
85
  })
@@ -91,8 +91,8 @@ const be = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
91
91
  click: s
92
92
  }, [
93
93
  e && a(e),
94
- t && p({ html: t })
95
- ]), Se = ({ onSelect: e }) => n([
94
+ t && g({ html: t })
95
+ ]), Se = ({ onSelect: e }) => l([
96
96
  A(
97
97
  "open",
98
98
  (t, s, o) => t ? new k({
@@ -157,7 +157,7 @@ class Dt extends w {
157
157
  * @returns {object}
158
158
  */
159
159
  render() {
160
- return n({ class: "relative" }, [
160
+ return l({ class: "relative" }, [
161
161
  ke({
162
162
  label: this.label,
163
163
  icon: this.icon,
@@ -167,15 +167,15 @@ class Dt extends w {
167
167
  ]);
168
168
  }
169
169
  }
170
- const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), Ie = c((e, t) => H({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), $e = c((e, t) => m({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Te = c((e, t) => m({ ...e, class: "text-sm text-destructive" }, t)), It = c((e, t = []) => ce({ class: "space-y-0", margin: "m-0", padding: "p-0" }, [
170
+ const De = c((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), Ie = c((e, t) => H({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), $e = c((e, t) => m({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Te = c((e, t) => m({ ...e, class: "text-sm text-destructive" }, t)), It = c((e, t = []) => ce({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
171
171
  e.title && v({ class: "text-lg font-semibold py-4 px-6" }, e.title),
172
172
  e.description && m({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
173
173
  ...t
174
174
  ])), $t = c((e, t = []) => ue({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
175
- n({ class: "flex flex-col space-y-6" }, t)
175
+ l({ class: "flex flex-col gap-y-6" }, t)
176
176
  ])), Tt = c((e, t = []) => {
177
177
  const s = e.border ? "border-t" : "";
178
- return n({ ...e, class: `flex flex-col pb-4 px-6 space-y-4 ${s} ${e.class || ""}` }, t);
178
+ return l({ ...e, class: `flex flex-col pb-4 px-6 gap-y-4 ${s} ${e.class || ""}` }, t);
179
179
  }), Be = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", G = (e, t, s) => e.map((o) => !o || (o.children && o.children.length > 0 && (o.children = G(o.children, t, s)), !o.required) ? o : Be(o) ? {
180
180
  ...o,
181
181
  aria: {
@@ -184,15 +184,15 @@ const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
184
184
  invalid: s,
185
185
  input: t
186
186
  } : o), Fe = c((e, t) => {
187
- const l = G(t, (r) => {
187
+ const n = G(t, (r) => {
188
188
  r.target.checkValidity() && e.setError(null);
189
189
  }, (r) => {
190
190
  e.setError(r.target.validationMessage);
191
191
  });
192
- return n({
192
+ return l({
193
193
  ...e,
194
194
  class: "w-full"
195
- }, l);
195
+ }, n);
196
196
  }), Bt = y(
197
197
  {
198
198
  /**
@@ -214,20 +214,20 @@ const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
214
214
  * @returns {object}
215
215
  */
216
216
  render() {
217
- const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, l = (r) => {
217
+ const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, n = (r) => {
218
218
  this.state.error = r, this.state.hasError = !!r;
219
219
  };
220
- return n({ class: "flex flex-auto space-y-4" }, [
220
+ return l({ class: "flex flex-auto gap-y-4" }, [
221
221
  De([
222
222
  Ie({ htmlFor: t }, s),
223
223
  Fe({
224
224
  id: t,
225
225
  name: e,
226
226
  value: this.state.value,
227
- setError: l
227
+ setError: n
228
228
  }, this.children),
229
229
  o && $e({ id: this.getId("description") }, o),
230
- n({ onState: ["error", (r) => r && Te(r)] })
230
+ l({ onState: ["error", (r) => r && Te(r)] })
231
231
  ])
232
232
  ]);
233
233
  }
@@ -236,16 +236,16 @@ const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
236
236
  e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
237
237
  }, J = c(
238
238
  (e, t) => X({ ...e, submit: (s, o) => Ae(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
239
- ), Ft = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), At = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
239
+ ), Ft = c((e, t) => l({ ...e, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), At = c((e, t = []) => l({ class: "flex flex-auto flex-col gap-y-3 py-4" }, [
240
240
  e.title && v({ class: "font-semibold" }, e.title),
241
241
  ...t
242
- ])), Lt = (e, t) => n({ class: "flex justify-between" }, [
242
+ ])), Lt = (e, t) => l({ class: "flex justify-between" }, [
243
243
  a({ class: "text-muted-foreground" }, e),
244
244
  a(t)
245
- ]), Pt = (e, t) => n({ class: "flex" }, [
245
+ ]), Pt = (e, t) => l({ class: "flex" }, [
246
246
  a({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
247
247
  a(t)
248
- ]), Le = ({ title: e, description: t, back: s, icon: o, options: l = [] }) => D({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
248
+ ]), Le = ({ title: e, description: t, back: s, icon: o, options: n = [] }) => D({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
249
249
  /**
250
250
  * Back Button
251
251
  */
@@ -253,27 +253,27 @@ const De = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
253
253
  /**
254
254
  * Icon
255
255
  */
256
- o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [g(o)]),
256
+ o && l({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [p(o)]),
257
257
  /**
258
258
  * Title and Description
259
259
  */
260
- n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
261
- n({ class: "flex flex-auto flex-col" }, [
260
+ l({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
261
+ l({ class: "flex flex-auto flex-col" }, [
262
262
  v({ class: "text-lg font-semibold m-0 truncate" }, e),
263
- t && n({ class: "text-sm text-muted-foreground truncate" }, t)
263
+ t && l({ class: "text-sm text-muted-foreground truncate" }, t)
264
264
  ]),
265
- ...l
265
+ ...n
266
266
  ])
267
- ]), Pe = c((e, t) => n({
267
+ ]), Pe = c((e, t) => l({
268
268
  popover: "manual",
269
269
  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
270
  click: (s, o) => {
271
271
  s.target === o.panel && (s.preventDefault(), s.stopPropagation(), o.state.open = !1);
272
272
  }
273
273
  }, [
274
- J({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col space-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
274
+ J({ 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
275
  Le(e),
276
- n({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
276
+ l({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
277
277
  L({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
278
278
  ])
279
279
  ])), Me = (e) => W.render(e, app.root);
@@ -300,9 +300,9 @@ class Mt extends w {
300
300
  description: o,
301
301
  options: this.headerOptions(),
302
302
  buttons: this.getButtons(),
303
- onSubmit: (l) => {
303
+ onSubmit: (n) => {
304
304
  let r = !0;
305
- this.onSubmit && (r = this.onSubmit(l)), r !== !1 && this.destroy();
305
+ this.onSubmit && (r = this.onSubmit(n)), r !== !1 && this.destroy();
306
306
  },
307
307
  icon: this.icon,
308
308
  back: this.back ?? !1,
@@ -471,7 +471,7 @@ const z = {
471
471
  animateIn: "pullRightIn",
472
472
  animateOut: "pullRight",
473
473
  role: "alert"
474
- }, s)), ze = c(({ close: e, class: t }, s) => n({
474
+ }, s)), ze = c(({ close: e, class: t }, s) => l({
475
475
  class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
476
476
  click: () => e(),
477
477
  animateIn: "pullRightIn",
@@ -501,9 +501,9 @@ class je extends w {
501
501
  * @returns {object}
502
502
  */
503
503
  render() {
504
- const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), l = this.href || null, r = this.getChildren(o);
505
- return l ? Ne({
506
- href: l,
504
+ const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), n = this.href || null, r = this.getChildren(o);
505
+ return n ? Ne({
506
+ href: n,
507
507
  class: `${t} ${s}`
508
508
  }, r) : ze({
509
509
  close: this.close.bind(this),
@@ -535,7 +535,7 @@ class je extends w {
535
535
  */
536
536
  getButtons() {
537
537
  return [
538
- n({ class: "flex flex-row mt-6 gap-2" }, [
538
+ l({ class: "flex flex-row mt-6 gap-2" }, [
539
539
  this.secondary && h({ variant: "outline", click: () => this.secondaryAction && this.secondaryAction() }, this.secondary),
540
540
  this.primary && h({ click: () => this.primaryAction && this.primaryAction() }, this.primary)
541
541
  ])
@@ -549,10 +549,10 @@ class je extends w {
549
549
  */
550
550
  getChildren(t) {
551
551
  return [
552
- n({ class: "flex items-start" }, [
553
- this.icon && p({ class: `mr-4 ${t}`, html: this.icon }),
554
- n({ class: "flex flex-auto flex-col" }, [
555
- n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
552
+ l({ class: "flex items-start" }, [
553
+ this.icon && g({ class: `mr-4 ${t}`, html: this.icon }),
554
+ l({ class: "flex flex-auto flex-col" }, [
555
+ l({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
556
556
  this.title && Ee(this.title)
557
557
  ]),
558
558
  m({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
@@ -585,7 +585,7 @@ class Et extends w {
585
585
  * @returns {object}
586
586
  */
587
587
  render() {
588
- return n({ class: "notification-container pointer-events-none inset-auto bg-transparent backdrop:bg-transparent overflow-visible fixed bottom-[80px] right-0 z-50 p-5", popover: "manual" }, [
588
+ return l({ class: "notification-container pointer-events-none inset-auto bg-transparent backdrop:bg-transparent overflow-visible fixed bottom-[80px] right-0 z-50 p-5", popover: "manual" }, [
589
589
  new he({
590
590
  cache: "list",
591
591
  key: "id",
@@ -617,11 +617,11 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
617
617
  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',
618
618
  onState: ["method", { active: e }],
619
619
  dataSet: ["method", ["state", e, "active"]],
620
- click: (o, { state: l }) => {
621
- l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ue(e);
620
+ click: (o, { state: n }) => {
621
+ n.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ue(e);
622
622
  }
623
623
  }, [
624
- g(s),
624
+ p(s),
625
625
  a(t)
626
626
  ])), Ue = (e) => {
627
627
  const t = document.documentElement;
@@ -639,8 +639,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
639
639
  * @returns {object}
640
640
  */
641
641
  render() {
642
- return n({ class: "flex flex-auto flex-col" }, [
643
- n({ class: "grid grid-cols-3 gap-4" }, [
642
+ return l({ class: "flex flex-auto flex-col" }, [
643
+ l({ class: "grid grid-cols-3 gap-4" }, [
644
644
  T({ label: "System", value: "system", icon: d.adjustments.horizontal }),
645
645
  T({ label: "Light", value: "light", icon: d.sun }),
646
646
  T({ label: "Dark", value: "dark", icon: d.moon })
@@ -720,9 +720,9 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
720
720
  OFFLINE: "bg-gray-500",
721
721
  BUSY: "bg-red-500",
722
722
  AWAY: "bg-yellow-500"
723
- }, Re = (e = "") => (e = e.toUpperCase(), b[e] || b.OFFLINE), jt = (e) => n({
723
+ }, Re = (e = "") => (e = e.toUpperCase(), b[e] || b.OFFLINE), jt = (e) => l({
724
724
  class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Re(e)}`
725
- }), Ot = ({ propName: e = "status" } = {}) => n({
725
+ }), Ot = ({ propName: e = "status" } = {}) => l({
726
726
  class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
727
727
  onSet: [e, {
728
728
  [b.ONLINE]: S.ONLINE,
@@ -768,7 +768,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
768
768
  */
769
769
  render() {
770
770
  const e = "logo-upload", t = this.onChange || null;
771
- return n({ class: "flex-none items-center" }, [
771
+ return l({ class: "flex-none items-center" }, [
772
772
  x({
773
773
  id: e,
774
774
  cache: "input",
@@ -780,7 +780,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
780
780
  o && t && (this.state.loaded = !1, t(o, this.parent), this.src = this.getFileUrl(o), this.state.loaded = !0);
781
781
  }
782
782
  }),
783
- n({
783
+ l({
784
784
  class: "relative w-32 h-32 rounded-full border flex items-center justify-center cursor-pointer hover:bg-muted transition-colors duration-150 overflow-hidden group",
785
785
  click: (s) => {
786
786
  s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
@@ -796,8 +796,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
796
796
  htmlFor: e,
797
797
  class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
798
798
  }, [
799
- g(d.upload),
800
- n("Upload logo")
799
+ p(d.upload),
800
+ l("Upload logo")
801
801
  ])
802
802
  )
803
803
  ])
@@ -812,11 +812,11 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
812
812
  class: "text-muted-foreground font-medium hover:text-foreground"
813
813
  },
814
814
  [a(t)]
815
- ), qe = () => g({
815
+ ), qe = () => p({
816
816
  class: "mx-3 text-muted-foreground",
817
817
  "aria-hidden": !0,
818
818
  size: "xs"
819
- }, d.chevron.single.right), He = (e) => n({ class: "flex items-center" }, [
819
+ }, d.chevron.single.right), He = (e) => l({ class: "flex items-center" }, [
820
820
  e.href ? Ve(e.href, e.label) : a(e.label),
821
821
  e.separator && qe()
822
822
  ]), Rt = C(
@@ -842,10 +842,10 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
842
842
  return se(
843
843
  {
844
844
  "aria-label": "Breadcrumb",
845
- class: "flex items-center space-x-1 text-sm"
845
+ class: "flex items-center gap-x-1 text-sm"
846
846
  },
847
847
  [
848
- n({
848
+ l({
849
849
  role: "list",
850
850
  class: "flex items-center",
851
851
  for: ["items", (t, s) => He({
@@ -867,15 +867,15 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
867
867
  "2xl": "h-16 w-16",
868
868
  "3xl": "h-24 w-24",
869
869
  default: "h-4 w-4"
870
- }, Ye = (e) => O[e] || O.default, _e = ({ index: e, size: t }) => n({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
870
+ }, Ye = (e) => O[e] || O.default, _e = ({ index: e, size: t }) => l({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
871
871
  a({
872
872
  class: "block w-full h-full rounded-full transition-colors",
873
873
  onSet: ["activeIndex", {
874
874
  "bg-primary": e,
875
875
  "shadow-md": e
876
876
  }],
877
- click: (s, { data: o, onClick: l }) => {
878
- o.activeIndex = e, l && l(e);
877
+ click: (s, { data: o, onClick: n }) => {
878
+ o.activeIndex = e, n && n(e);
879
879
  }
880
880
  })
881
881
  ]), We = (e, t) => Array.from({ length: e }, (s, o) => _e({
@@ -904,10 +904,10 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
904
904
  */
905
905
  render() {
906
906
  const e = this.gap || "gap-2", t = Ye(this.size || "sm"), s = We(this.data.count, t);
907
- return n(
907
+ return l(
908
908
  { class: "flex justify-center items-center py-2" },
909
909
  [
910
- n({ class: `flex ${e}` }, s)
910
+ l({ class: `flex ${e}` }, s)
911
911
  ]
912
912
  );
913
913
  }
@@ -920,24 +920,24 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
920
920
  },
921
921
  [
922
922
  a({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
923
- p({ html: d.chevron.upDown })
923
+ g({ html: d.chevron.upDown })
924
924
  ]
925
925
  ), Je = (e, t, s) => V({
926
926
  class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
927
927
  click: () => t(e),
928
928
  onState: [s, "selectedValue", { "bg-secondary": e.value }]
929
929
  }, [
930
- e.icon && a({ class: "mr-2 flex items-baseline" }, [g({ size: "xs" }, e.icon)]),
930
+ e.icon && a({ class: "mr-2 flex items-baseline" }, [p({ size: "xs" }, e.icon)]),
931
931
  a({ class: "text-base font-normal" }, e.label)
932
- ]), Ke = (e, t) => n({ class: "w-full border rounded-md" }, [
932
+ ]), Ke = (e, t) => l({ class: "w-full border rounded-md" }, [
933
933
  q({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Je(s, e, t)] })
934
- ]), Qe = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
934
+ ]), Qe = ({ onSelect: e, state: t }) => l({ class: "flex flex-auto flex-col" }, [
935
935
  A(
936
936
  "open",
937
- (s, o, l) => s ? new k({
937
+ (s, o, n) => s ? new k({
938
938
  cache: "dropdown",
939
- parent: l,
940
- button: l.button
939
+ parent: n,
940
+ button: n.button
941
941
  }, [
942
942
  Ke(e, t)
943
943
  ]) : null
@@ -1021,7 +1021,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1021
1021
  */
1022
1022
  render() {
1023
1023
  const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
1024
- return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
1024
+ return l({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
1025
1025
  // @ts-ignore
1026
1026
  Ge({ toggleDropdown: this.toggleDropdown.bind(this) }),
1027
1027
  Qe({
@@ -1058,8 +1058,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1058
1058
  icon: d.circlePlus,
1059
1059
  click: e,
1060
1060
  ariaLabel: "Increment"
1061
- }), et = ({ bind: e, min: t, max: s, readonly: o = !1 }) => _(({ state: l }) => x({
1062
- value: ["[[count]]", l],
1061
+ }), et = ({ bind: e, min: t, max: s, readonly: o = !1 }) => _(({ state: n }) => x({
1062
+ value: ["[[count]]", n],
1063
1063
  bind: e,
1064
1064
  blur: (r, { state: i }) => {
1065
1065
  let u = parseInt(r.target.value, 10);
@@ -1093,7 +1093,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1093
1093
  */
1094
1094
  render() {
1095
1095
  const e = this.class ?? "";
1096
- return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
1096
+ return l({ class: `flex flex-auto items-center justify-between gap-x-4 p-4 ${e}` }, [
1097
1097
  Xe({ click: () => this.state.decrement("count") }),
1098
1098
  et({
1099
1099
  bind: this.bind,
@@ -1118,16 +1118,16 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1118
1118
  a({
1119
1119
  onState: ["selectedDate", (o) => o ? F.format("standard", o) : "Pick a date"]
1120
1120
  }),
1121
- p({ html: d.calendar.days })
1121
+ g({ html: d.calendar.days })
1122
1122
  ]), ot = ({ handleDateSelect: e, blockPriorDates: t }) => P(
1123
- (s, o, l) => new k({
1123
+ (s, o, n) => new k({
1124
1124
  cache: "dropdown",
1125
- parent: l,
1126
- button: l.panel,
1125
+ parent: n,
1126
+ button: n.panel,
1127
1127
  size: "fit"
1128
1128
  }, [
1129
1129
  new ie({
1130
- selectedDate: l.state.selectedDate,
1130
+ selectedDate: n.state.selectedDate,
1131
1131
  selectedCallBack: e,
1132
1132
  blockPriorDates: t
1133
1133
  })
@@ -1163,7 +1163,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1163
1163
  const e = (s, { state: o }) => o.toggle("open"), t = (s) => {
1164
1164
  this.state.selectedDate = s, this.state.open = !1, this.input.value = s, $.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(s);
1165
1165
  };
1166
- return n({ class: "relative w-full max-w-[320px]" }, [
1166
+ return l({ class: "relative w-full max-w-[320px]" }, [
1167
1167
  st({
1168
1168
  toggleOpen: e,
1169
1169
  bind: this.bind,
@@ -1176,31 +1176,31 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1176
1176
  ]);
1177
1177
  }
1178
1178
  }
1179
- ), nt = ({ bind: e, required: t }) => x({
1179
+ ), lt = ({ bind: e, required: t }) => x({
1180
1180
  cache: "input",
1181
1181
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1182
1182
  bind: e,
1183
1183
  required: t
1184
- }), lt = ({ bind: e, required: t, toggleOpen: s }) => f({
1184
+ }), nt = ({ bind: e, required: t, toggleOpen: s }) => f({
1185
1185
  class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 px-4 py-2",
1186
1186
  click: s
1187
1187
  }, [
1188
- nt({ bind: e, required: t }),
1188
+ lt({ bind: e, required: t }),
1189
1189
  _(({ state: o }) => [
1190
1190
  a(E.date(["[[start]]", o], "Start Date")),
1191
1191
  a(" - "),
1192
1192
  a(E.date(["[[end]]", o], "End Date"))
1193
1193
  ]),
1194
- p({ html: d.calendar.days })
1195
- ]), rt = ({ handleDateSelect: e, blockPriorDates: t }) => P((s, o, l) => new k({
1194
+ g({ html: d.calendar.days })
1195
+ ]), rt = ({ handleDateSelect: e, blockPriorDates: t }) => P((s, o, n) => new k({
1196
1196
  cache: "dropdown",
1197
- parent: l,
1198
- button: l.panel,
1197
+ parent: n,
1198
+ button: n.panel,
1199
1199
  size: "xl"
1200
1200
  }, [
1201
1201
  new ae({
1202
- startDate: l.state.start,
1203
- endDate: l.state.end,
1202
+ startDate: n.state.start,
1203
+ endDate: n.state.end,
1204
1204
  onRangeSelect: e,
1205
1205
  blockPriorDates: t
1206
1206
  })
@@ -1239,8 +1239,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1239
1239
  const e = (s, { state: o }) => o.toggle("open"), t = (s, o) => {
1240
1240
  this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, $.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: o }, this.parent);
1241
1241
  };
1242
- return n({ class: "relative w-full max-w-[320px]" }, [
1243
- lt({
1242
+ return l({ class: "relative w-full max-w-[320px]" }, [
1243
+ nt({
1244
1244
  toggleOpen: e,
1245
1245
  bind: this.bind,
1246
1246
  required: this.required
@@ -1256,8 +1256,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
1256
1256
  new fe({
1257
1257
  dateTime: e,
1258
1258
  filter: s || ((o) => {
1259
- const l = F.getLocalTime(o, !0, !1, t);
1260
- return F.getTimeFrame(l);
1259
+ const n = F.getLocalTime(o, !0, !1, t);
1260
+ return F.getTimeFrame(n);
1261
1261
  })
1262
1262
  })
1263
1263
  ]);
@@ -1280,15 +1280,15 @@ function at({ bind: e, required: t, toggleOpen: s }) {
1280
1280
  a({
1281
1281
  onState: ["selectedTime", (o) => o || "Pick a time"]
1282
1282
  }),
1283
- p({ html: d.clock })
1283
+ g({ html: d.clock })
1284
1284
  ]
1285
1285
  );
1286
1286
  }
1287
- function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1 }) {
1288
- return n(
1287
+ function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: n = !1 }) {
1288
+ return l(
1289
1289
  { class: "flex flex-col max-h-[200px] overflow-y-auto" },
1290
1290
  e.map((r) => {
1291
- let i = l ? r.toString().padStart(2, "0") : r.toString();
1291
+ let i = n ? r.toString().padStart(2, "0") : r.toString();
1292
1292
  return f({
1293
1293
  text: i,
1294
1294
  class: "hover:bg-muted/50 rounded-md px-2 py-1",
@@ -1308,15 +1308,15 @@ function ct({ handleTimeSelect: e }) {
1308
1308
  size: "fit"
1309
1309
  },
1310
1310
  [
1311
- n(
1311
+ l(
1312
1312
  { class: "flex flex-auto flex-col border rounded-md shadow-md" },
1313
1313
  [
1314
- n(
1314
+ l(
1315
1315
  { class: "grid grid-cols-3 gap-2 p-4 text-center max-h-[220px] min-w-[240px]" },
1316
1316
  [
1317
1317
  // Hours column
1318
1318
  B({
1319
- items: Array.from({ length: 12 }, (l, r) => r + 1),
1319
+ items: Array.from({ length: 12 }, (n, r) => r + 1),
1320
1320
  handleTimeSelect: e,
1321
1321
  state: o.state,
1322
1322
  stateValue: "hour",
@@ -1324,7 +1324,7 @@ function ct({ handleTimeSelect: e }) {
1324
1324
  }),
1325
1325
  // Minutes column
1326
1326
  B({
1327
- items: Array.from({ length: 60 }, (l, r) => r),
1327
+ items: Array.from({ length: 60 }, (n, r) => r),
1328
1328
  handleTimeSelect: e,
1329
1329
  state: o.state,
1330
1330
  stateValue: "minute",
@@ -1351,7 +1351,7 @@ function U(e) {
1351
1351
  const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
1352
1352
  if (!s)
1353
1353
  return { hour: null, minute: null, meridian: null };
1354
- let [, o, l, , r] = s, i = parseInt(o, 10), u = parseInt(l, 10);
1354
+ let [, o, n, , r] = s, i = parseInt(o, 10), u = parseInt(n, 10);
1355
1355
  return i < 0 || i > 23 || u < 0 || u > 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), {
1356
1356
  hour: i.toString().padStart(2, "0"),
1357
1357
  minute: u.toString().padStart(2, "0"),
@@ -1397,13 +1397,13 @@ const Gt = y(
1397
1397
  * @returns {object}
1398
1398
  */
1399
1399
  render() {
1400
- const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: l }) => {
1401
- 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) {
1400
+ const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: n }) => {
1401
+ if (s && (this.state.hour = s), o && (this.state.minute = o), n && (this.state.meridian = n), this.state.hour && this.state.minute && this.state.meridian) {
1402
1402
  const r = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
1403
1403
  this.state.selectedTime = r, this.state.open = !1, this.input.value = r, $.trigger("change", this.input), typeof this.change == "function" && this.change(r);
1404
1404
  }
1405
1405
  };
1406
- return n(
1406
+ return l(
1407
1407
  { class: "relative w-full max-w-[320px]" },
1408
1408
  [
1409
1409
  at({
@@ -1418,11 +1418,11 @@ const Gt = y(
1418
1418
  );
1419
1419
  }
1420
1420
  }
1421
- ), ut = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
1422
- g({ size: "lg" }, e)
1421
+ ), ut = (e, t) => l({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
1422
+ p({ size: "lg" }, e)
1423
1423
  ]), dt = ({ title: e }) => D({ class: "flex flex-auto items-center" }, [
1424
1424
  v({ class: "text-lg font-semibold" }, e)
1425
- ]), ht = c((e, t) => ne(
1425
+ ]), ht = c((e, t) => le(
1426
1426
  {
1427
1427
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
1428
1428
  rounded-lg flex flex-auto flex-col
@@ -1431,16 +1431,16 @@ const Gt = y(
1431
1431
  aria: { expanded: ["open"] }
1432
1432
  },
1433
1433
  [
1434
- n({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
1434
+ l({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
1435
1435
  // Icon and content
1436
1436
  e.icon && ut(e.icon, e.iconColor),
1437
- n({ class: "flex flex-auto flex-col gap-4" }, [
1438
- n({ class: "flex flex-auto flex-col space-y-2" }, [
1437
+ l({ class: "flex flex-auto flex-col gap-4" }, [
1438
+ l({ class: "flex flex-auto flex-col gap-y-2" }, [
1439
1439
  dt(e),
1440
1440
  e.description && m({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
1441
- n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
1441
+ l({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
1442
1442
  ]),
1443
- e.buttons && L({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
1443
+ e.buttons && L({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:gap-x-2" }, e.buttons)
1444
1444
  ])
1445
1445
  ])
1446
1446
  ]
@@ -1488,13 +1488,13 @@ class mt extends w {
1488
1488
  render() {
1489
1489
  const t = (u) => {
1490
1490
  u.target === this.panel && this.close();
1491
- }, { borderColor: s, bgColor: o, iconColor: l } = R[this.type] || R.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
1491
+ }, { borderColor: s, bgColor: o, iconColor: n } = R[this.type] || R.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
1492
1492
  return ht({
1493
1493
  class: r,
1494
1494
  title: i,
1495
1495
  click: t,
1496
1496
  icon: this.icon,
1497
- iconColor: l,
1497
+ iconColor: n,
1498
1498
  description: this.description,
1499
1499
  buttons: this.getButtons()
1500
1500
  }, this.children);
@@ -1574,12 +1574,12 @@ class Jt extends mt {
1574
1574
  this.confirmed && this.confirmed(), this.close();
1575
1575
  }
1576
1576
  }
1577
- const Kt = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
1577
+ const Kt = c((e, t = []) => l({ class: "w-full max-w-md p-6 m-auto" }, [
1578
1578
  J({ class: "flex flex-auto flex-col" }, [
1579
- n({ class: "flex flex-auto flex-col space-y-4" }, [
1580
- n({ class: "flex flex-auto items-center justify-center" }, [
1581
- e.icon && n({ class: "w-16 h-16 mb-2 text-primary" }, [
1582
- g(e.icon)
1579
+ l({ class: "flex flex-auto flex-col gap-y-4" }, [
1580
+ l({ class: "flex flex-auto items-center justify-center" }, [
1581
+ e.icon && l({ class: "w-16 h-16 mb-2 text-primary" }, [
1582
+ p(e.icon)
1583
1583
  ])
1584
1584
  ]),
1585
1585
  D({ class: "py-4 text-center" }, [