@base-framework/ui 1.0.328 → 1.0.330

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,10 +1,10 @@
1
- import { Div as l, H5 as oe, P as w, I as C, Li as G, Span as c, Ul as J, Button as b, OnState as B, Label as O, H2 as $, Form as ne, Header as L, Footer as z, A as K, H3 as le, Checkbox as re, Input as f, Img as Q, Nav as ie, UseParent as X, OnStateOpen as E, Time as ae, Dialog as ce } from "@base-framework/atoms";
2
- import { Atom as u, Component as k, Html as N, Dom as ue, base as de, Data as A, Builder as Z, Jot as I, Events as v, DateTime as j } from "@base-framework/base";
3
- import { P as F, b as he, R as fe } from "./range-calendar-BMWSJTE0.js";
4
- import { C as me, F as ge } from "./form-group-CJzpq9Us.js";
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
+ import { P as F, b as de, R as he } from "./range-calendar-BMWSJTE0.js";
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
- import { Timer as pe, List as be, DynamicTime as xe } from "@base-framework/organisms";
7
+ import { Timer as ge, List as pe, DynamicTime as be } from "@base-framework/organisms";
8
8
  import { a as D } from "./veil-CqnAmj-D.js";
9
9
  import { F as U } from "./format-DnofNaaz.js";
10
10
  const V = {
@@ -33,16 +33,16 @@ const V = {
33
33
  bgColor: "bg-muted/10",
34
34
  iconColor: "text-muted-foreground"
35
35
  }
36
- }, ye = (e, t) => l({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
36
+ }, xe = (e, t) => l({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
37
37
  C({ html: e })
38
- ]), ve = (e) => oe({ class: "font-semibold" }, e), we = (e) => w({ class: "text-sm text-muted-foreground" }, e), Lt = u(({ title: e, description: t, icon: s, type: o = "default" }) => {
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" }) => {
39
39
  const { borderColor: n, bgColor: r, iconColor: i } = V[o] || V.default;
40
40
  return l({ class: `flex items-start p-4 border rounded-lg ${r} ${n}` }, [
41
41
  // Icon and content
42
- s && ye(s, i),
42
+ s && xe(s, i),
43
43
  l({ class: "flex flex-col" }, [
44
44
  ve(e),
45
- we(t)
45
+ ye(t)
46
46
  ])
47
47
  ]);
48
48
  });
@@ -67,24 +67,24 @@ class At extends k {
67
67
  N.removeElement(t);
68
68
  return;
69
69
  }
70
- ue.addClass(t, s), de.on("animationend", t, (o) => N.removeElement(t));
70
+ ce.addClass(t, s), ue.on("animationend", t, (o) => N.removeElement(t));
71
71
  }
72
72
  }
73
- const Ce = (e) => c({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), Se = (e) => c({ class: "flex w-4 h-4", html: e }), ke = (e) => c({ class: "flex-auto" }, e), Ie = (e, t) => G({
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({
74
74
  class: "relative flex cursor-pointer hover:bg-muted/50 select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
75
75
  click: () => t(e)
76
76
  }, [
77
- e.icon && Se(e.icon),
78
- ke(e.label),
79
- e.shortcut && Ce(e.shortcut)
80
- ]), De = (e, t) => J({ class: "grid gap-2" }, [
81
- e.map((s) => Ie(s, t))
82
- ]), $e = (e) => l({ class: "w-full z-10" }, [
77
+ e.icon && Ce(e.icon),
78
+ Se(e.label),
79
+ e.shortcut && we(e.shortcut)
80
+ ]), Ie = (e, t) => G({ class: "grid gap-2" }, [
81
+ e.map((s) => ke(s, t))
82
+ ]), De = (e) => l({ class: "w-full z-10" }, [
83
83
  l({
84
84
  class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
85
- for: ["groups", (t) => De(t, e)]
85
+ for: ["groups", (t) => Ie(t, e)]
86
86
  })
87
- ]), Fe = ({ label: e, icon: t, toggleDropdown: s }) => b({
87
+ ]), $e = ({ label: e, icon: t, toggleDropdown: s }) => b({
88
88
  cache: "button",
89
89
  class: `inline-flex items-center justify-between rounded-md border
90
90
  px-2 py-2 text-sm font-medium hover:bg-muted
@@ -93,7 +93,7 @@ const Ce = (e) => c({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
93
93
  }, [
94
94
  e && c(e),
95
95
  t && C({ html: t })
96
- ]), Te = ({ onSelect: e }) => l([
96
+ ]), Fe = ({ onSelect: e }) => l([
97
97
  B(
98
98
  "open",
99
99
  (t, s, o) => t ? new F({
@@ -101,7 +101,7 @@ const Ce = (e) => c({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
101
101
  parent: o,
102
102
  button: o.button
103
103
  }, [
104
- $e(e)
104
+ De(e)
105
105
  ]) : null
106
106
  )
107
107
  ]);
@@ -159,33 +159,33 @@ class Mt extends k {
159
159
  */
160
160
  render() {
161
161
  return l({ class: "relative" }, [
162
- Fe({
162
+ $e({
163
163
  label: this.label,
164
164
  icon: this.icon,
165
165
  toggleDropdown: this.toggleDropdown.bind(this)
166
166
  }),
167
- Te({ onSelect: this.handleSelect.bind(this) })
167
+ Fe({ onSelect: this.handleSelect.bind(this) })
168
168
  ]);
169
169
  }
170
170
  }
171
- const Be = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), Le = u((e, t) => O({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), Ae = u((e, t) => w({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Me = u((e, t) => w({ ...e, class: "text-sm text-destructive" }, t)), Pt = u((e, t = []) => me({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
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" }, [
172
172
  e.title && $({ class: "text-lg font-semibold py-4 px-6" }, e.title),
173
173
  e.description && w({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
174
174
  ...t
175
- ])), jt = u((e, t = []) => ge({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
175
+ ])), jt = u((e, t = []) => me({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
176
176
  l({ class: "flex flex-col gap-y-6" }, t)
177
177
  ])), Ot = u((e, t = []) => {
178
178
  const s = e.border ? "border-t" : "";
179
179
  return l({ ...e, class: `flex flex-col pb-4 px-6 gap-y-4 ${s} ${e.class || ""}` }, t);
180
- }), Pe = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", ee = (e, t, s) => e.map((o) => !o || (o.children && o.children.length > 0 && (o.children = ee(o.children, t, s)), !o.required) ? o : Pe(o) ? {
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) ? {
181
181
  ...o,
182
182
  aria: {
183
183
  invalid: ["hasError"]
184
184
  },
185
185
  invalid: s,
186
186
  input: t
187
- } : o), je = u((e, t) => {
188
- const n = ee(t, (r) => {
187
+ } : o), Pe = u((e, t) => {
188
+ const n = Z(t, (r) => {
189
189
  r.target.checkValidity() && e.setError(null);
190
190
  }, (r) => {
191
191
  e.setError(r.target.validationMessage);
@@ -219,24 +219,24 @@ const Be = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
219
219
  this.state.error = r, this.state.hasError = !!r;
220
220
  };
221
221
  return l({ class: "flex flex-auto gap-y-4" }, [
222
- Be([
223
- Le({ htmlFor: t }, s),
224
- je({
222
+ Te([
223
+ Be({ htmlFor: t }, s),
224
+ Pe({
225
225
  id: t,
226
226
  name: e,
227
227
  value: this.state.value,
228
228
  setError: n
229
229
  }, this.children),
230
- o && Ae({ id: this.getId("description") }, o),
231
- l({ onState: ["error", (r) => r && Me(r)] })
230
+ o && Le({ id: this.getId("description") }, o),
231
+ l({ onState: ["error", (r) => r && Ae(r)] })
232
232
  ])
233
233
  ]);
234
234
  }
235
235
  }
236
- ), Oe = (e, t, s = null) => {
236
+ ), je = (e, t, s = null) => {
237
237
  e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
238
- }, te = u(
239
- (e, t) => ne({ ...e, submit: (s, o) => Oe(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
238
+ }, ee = u(
239
+ (e, t) => oe({ ...e, submit: (s, o) => je(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
240
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" }, [
241
241
  e.title && $({ class: "font-semibold" }, e.title),
242
242
  ...t
@@ -246,7 +246,7 @@ const Be = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
246
246
  ]), Vt = (e, t) => l({ class: "flex" }, [
247
247
  c({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
248
248
  c(t)
249
- ]), ze = ({ 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
+ ]), 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" }, [
250
250
  /**
251
251
  * Back Button
252
252
  */
@@ -265,19 +265,19 @@ const Be = u((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
265
265
  ]),
266
266
  ...n
267
267
  ])
268
- ]), Ee = u((e, t) => l({
268
+ ]), ze = u((e, t) => l({
269
269
  popover: "manual",
270
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}`,
271
271
  click: (s, o) => {
272
272
  s.target === o.panel && (s.preventDefault(), s.stopPropagation(), o.state.open = !1);
273
273
  }
274
274
  }, [
275
- te({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col gap-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
276
- ze(e),
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) }, [
276
+ Oe(e),
277
277
  l({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
278
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)
279
279
  ])
280
- ])), Ne = (e) => Z.render(e, app.root);
280
+ ])), Ee = (e) => X.render(e, app.root);
281
281
  class Rt extends k {
282
282
  /**
283
283
  * This will declare the props for the compiler.
@@ -294,7 +294,7 @@ class Rt extends k {
294
294
  */
295
295
  render() {
296
296
  const t = this.getMainClass(), s = this.title || "", o = this.description || null;
297
- return Ee(
297
+ return ze(
298
298
  {
299
299
  class: t,
300
300
  title: s,
@@ -409,7 +409,7 @@ class Rt extends k {
409
409
  * @returns {void}
410
410
  */
411
411
  open() {
412
- Ne(this), this.showModal();
412
+ Ee(this), this.showModal();
413
413
  }
414
414
  /**
415
415
  * This will destroy the modal.
@@ -464,22 +464,22 @@ const R = {
464
464
  borderColor: "border",
465
465
  iconColor: "text-muted-foreground"
466
466
  }
467
- }, Ue = (e) => L({ class: "flex justify-center" }, [
468
- le({ class: "text-lg font-bold mb-0" }, e)
469
- ]), Ve = u(({ href: e, class: t }, s) => K({
467
+ }, Ne = (e) => L({ class: "flex justify-center" }, [
468
+ ne({ class: "text-lg font-bold mb-0" }, e)
469
+ ]), Ue = u(({ href: e, class: t }, s) => J({
470
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}`,
471
471
  href: e,
472
472
  animateIn: "pullRightIn",
473
473
  animateOut: "pullRight",
474
474
  role: "alert"
475
- }, s)), Re = u(({ close: e, class: t }, s) => l({
475
+ }, s)), Ve = u(({ close: e, class: t }, s) => l({
476
476
  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}`,
477
477
  click: () => e(),
478
478
  animateIn: "pullRightIn",
479
479
  animateOut: "pullRight",
480
480
  role: "alert"
481
481
  }, s));
482
- class He extends k {
482
+ class Re extends k {
483
483
  /**
484
484
  * This will declare the props for the compiler.
485
485
  *
@@ -503,10 +503,10 @@ class He extends k {
503
503
  */
504
504
  render() {
505
505
  const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), n = this.href || null, r = this.getChildren(o);
506
- return n ? Ve({
506
+ return n ? Ue({
507
507
  href: n,
508
508
  class: `${t} ${s}`
509
- }, r) : Re({
509
+ }, r) : Ve({
510
510
  close: this.close.bind(this),
511
511
  class: `${t} ${s}`
512
512
  }, r);
@@ -518,7 +518,7 @@ class He extends k {
518
518
  */
519
519
  afterSetup() {
520
520
  const t = this.duration;
521
- t !== "infinite" && (this.timer = new pe(t, this.close.bind(this)), this.timer.start());
521
+ t !== "infinite" && (this.timer = new ge(t, this.close.bind(this)), this.timer.start());
522
522
  }
523
523
  /**
524
524
  * This will get the style properties based on the notification type.
@@ -554,7 +554,7 @@ class He extends k {
554
554
  this.icon && C({ class: `mr-4 ${t}`, html: this.icon }),
555
555
  l({ class: "flex flex-auto flex-col" }, [
556
556
  l({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
557
- this.title && Ue(this.title)
557
+ this.title && Ne(this.title)
558
558
  ]),
559
559
  w({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
560
560
  (this.primary || this.secondary) && z({ class: "margin-top-24 flex align-center" }, this.getButtons())
@@ -578,7 +578,7 @@ class He extends k {
578
578
  t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
579
579
  }
580
580
  }
581
- let qe = 0;
581
+ let He = 0;
582
582
  class Ht extends k {
583
583
  /**
584
584
  * This will render the component.
@@ -587,11 +587,11 @@ class Ht extends k {
587
587
  */
588
588
  render() {
589
589
  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" }, [
590
- new be({
590
+ new pe({
591
591
  cache: "list",
592
592
  key: "id",
593
593
  role: "list",
594
- rowItem: (t) => new He(t)
594
+ rowItem: (t) => new Re(t)
595
595
  })
596
596
  ]);
597
597
  }
@@ -602,7 +602,7 @@ class Ht extends k {
602
602
  * @returns {void}
603
603
  */
604
604
  addNotice(t = {}) {
605
- t.id = qe++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
605
+ t.id = He++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
606
606
  }
607
607
  /**
608
608
  * This will remove a notification.
@@ -619,12 +619,12 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
619
619
  onState: ["method", { active: e }],
620
620
  dataSet: ["method", ["state", e, "active"]],
621
621
  click: (o, { state: n }) => {
622
- n.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ye(e);
622
+ n.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), qe(e);
623
623
  }
624
624
  }, [
625
625
  x(s),
626
626
  c(t)
627
- ])), Ye = (e) => {
627
+ ])), qe = (e) => {
628
628
  const t = document.documentElement;
629
629
  if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), H && !H("(prefers-color-scheme: " + e + ")").matches) {
630
630
  t.classList.add(e);
@@ -693,7 +693,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
693
693
  s.toggle("active"), this.checkbox.checked = s.active, this.change && this.change(s.active, t, this);
694
694
  }
695
695
  }, [
696
- re({
696
+ le({
697
697
  cache: "checkbox",
698
698
  class: "opacity-0 absolute top-0 left-0 bottom-0 right-0 w-full h-full",
699
699
  /**
@@ -721,8 +721,8 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
721
721
  OFFLINE: "bg-gray-500",
722
722
  BUSY: "bg-red-500",
723
723
  AWAY: "bg-yellow-500"
724
- }, _e = (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 ${_e(e)}`
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
726
  }), Wt = ({ propName: e = "status" } = {}) => l({
727
727
  class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
728
728
  onSet: [e, {
@@ -731,7 +731,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
731
731
  [S.BUSY]: T.BUSY,
732
732
  [S.AWAY]: T.AWAY
733
733
  }]
734
- }), q = (e) => e.indexOf(".") === -1 && e.indexOf("[[") === -1, Gt = I(
734
+ }), _e = (e) => e.indexOf(".") === -1 && e.indexOf("[[") === -1 && e.indexOf("blob:") === -1, Gt = I(
735
735
  {
736
736
  /**
737
737
  * Get the initial state for the component.
@@ -751,7 +751,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
751
751
  */
752
752
  openFileBrowse() {
753
753
  const e = this.input;
754
- e && (e.value = "", v.trigger("click", e));
754
+ e && (e.value = "", y.trigger("click", e));
755
755
  },
756
756
  /**
757
757
  * Get the URL for the uploaded file.
@@ -787,17 +787,17 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
787
787
  s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
788
788
  }
789
789
  }, [
790
- B("loaded", (s) => (console.log(s, this.src, q(this.src), this), s === !1 || q(this.src) ? O({
790
+ B("loaded", (s) => s === !1 || _e(this.src) ? O({
791
791
  htmlFor: e,
792
792
  class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
793
793
  }, [
794
794
  x(d.upload),
795
795
  l("Upload Image")
796
- ]) : Q({
796
+ ]) : K({
797
797
  // @ts-ignore
798
798
  src: this.src,
799
799
  class: "absolute inset-0 w-full h-full object-cover rounded-full"
800
- })))
800
+ }))
801
801
  ])
802
802
  ]);
803
803
  }
@@ -822,7 +822,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
822
822
  */
823
823
  openFileBrowse() {
824
824
  const e = this.input;
825
- e && (e.value = "", v.trigger("click", e));
825
+ e && (e.value = "", y.trigger("click", e));
826
826
  },
827
827
  /**
828
828
  * Get the URL for the uploaded file.
@@ -860,7 +860,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
860
860
  }, [
861
861
  B(
862
862
  "loaded",
863
- (s) => s ? Q({
863
+ (s) => s ? K({
864
864
  // @ts-ignore
865
865
  src: this.src,
866
866
  class: "absolute inset-0 w-full h-full object-cover rounded-full"
@@ -876,7 +876,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
876
876
  ]);
877
877
  }
878
878
  }
879
- ), We = (e, t) => K(
879
+ ), We = (e, t) => J(
880
880
  {
881
881
  href: e,
882
882
  "aria-current": t === "Breadcrumb" && "page",
@@ -911,7 +911,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
911
911
  */
912
912
  render() {
913
913
  const e = this.data.items.length - 1;
914
- return ie(
914
+ return re(
915
915
  {
916
916
  "aria-label": "Breadcrumb",
917
917
  class: "flex items-center gap-x-1 text-sm"
@@ -930,7 +930,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
930
930
  );
931
931
  }
932
932
  }
933
- ), Y = {
933
+ ), q = {
934
934
  xs: "h-1 w-1",
935
935
  sm: "h-2 w-2",
936
936
  md: "h-4 w-4",
@@ -939,7 +939,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
939
939
  "2xl": "h-16 w-16",
940
940
  "3xl": "h-24 w-24",
941
941
  default: "h-4 w-4"
942
- }, Ke = (e) => Y[e] || Y.default, Qe = ({ index: e, size: t }) => l({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
942
+ }, Ke = (e) => q[e] || q.default, Qe = ({ index: e, size: t }) => l({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
943
943
  c({
944
944
  class: "block w-full h-full rounded-full transition-colors",
945
945
  onSet: ["activeIndex", {
@@ -994,7 +994,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
994
994
  c({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
995
995
  C({ html: d.chevron.upDown })
996
996
  ]
997
- ), et = (e, t, s) => G({
997
+ ), et = (e, t, s) => W({
998
998
  class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
999
999
  click: () => t(e),
1000
1000
  onState: [s, "selectedValue", { "bg-secondary": e.value }]
@@ -1002,7 +1002,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1002
1002
  e.icon && c({ class: "mr-2 flex items-baseline" }, [x({ size: "xs" }, e.icon)]),
1003
1003
  c({ class: "text-base font-normal" }, e.label)
1004
1004
  ]), tt = (e, t) => l({ class: "w-full border rounded-md" }, [
1005
- J({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => et(s, e, t)] })
1005
+ G({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => et(s, e, t)] })
1006
1006
  ]), st = ({ onSelect: e, state: t }) => l({ class: "flex flex-auto flex-col" }, [
1007
1007
  B(
1008
1008
  "open",
@@ -1116,21 +1116,21 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1116
1116
  ]);
1117
1117
  }
1118
1118
  }
1119
- ), se = ({ icon: e, click: t, ariaLabel: s }) => h({
1119
+ ), te = ({ icon: e, click: t, ariaLabel: s }) => h({
1120
1120
  variant: "icon",
1121
1121
  class: "flex flex-none",
1122
1122
  click: t,
1123
1123
  icon: e,
1124
1124
  "aria-label": s
1125
- }), ot = ({ click: e }) => se({
1125
+ }), ot = ({ click: e }) => te({
1126
1126
  icon: d.circleMinus,
1127
1127
  click: e,
1128
1128
  ariaLabel: "Decrement"
1129
- }), nt = ({ click: e }) => se({
1129
+ }), nt = ({ click: e }) => te({
1130
1130
  icon: d.circlePlus,
1131
1131
  click: e,
1132
1132
  ariaLabel: "Increment"
1133
- }), lt = ({ bind: e, min: t, max: s, readonly: o = !1 }) => X(({ state: n }) => f({
1133
+ }), lt = ({ bind: e, min: t, max: s, readonly: o = !1 }) => Q(({ state: n }) => f({
1134
1134
  value: ["[[count]]", n],
1135
1135
  bind: e,
1136
1136
  blur: (r, { state: i }) => {
@@ -1213,7 +1213,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1213
1213
  button: n.panel,
1214
1214
  size: "fit"
1215
1215
  }, [
1216
- new he({
1216
+ new de({
1217
1217
  selectedDate: n.state.selectedDate,
1218
1218
  selectedCallBack: e,
1219
1219
  blockPriorDates: t
@@ -1251,16 +1251,16 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1251
1251
  const i = n.target.value.replace(/\D/g, "");
1252
1252
  let a = "";
1253
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) {
1254
- const m = parseInt(i.substring(0, 2), 10), g = parseInt(i.substring(2, 4), 10), y = parseInt(i.substring(4, 8), 10);
1255
- if (m >= 1 && m <= 12 && g >= 1 && g <= 31 && y >= 1900) {
1256
- const p = `${y}-${m.toString().padStart(2, "0")}-${g.toString().padStart(2, "0")}`;
1257
- this.state.selectedDate = p, this.input.value = p, v.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(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);
1258
1258
  }
1259
1259
  }
1260
1260
  }, s = (n) => {
1261
1261
  n.target.select();
1262
1262
  }, o = (n) => {
1263
- this.state.selectedDate = n, this.state.open = !1, this.input.value = n, v.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(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);
1264
1264
  };
1265
1265
  return l(
1266
1266
  { class: "relative w-full max-w-[320px]" },
@@ -1291,7 +1291,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1291
1291
  click: s
1292
1292
  }, [
1293
1293
  ut({ bind: e, required: t }),
1294
- X(({ state: o }) => [
1294
+ Q(({ state: o }) => [
1295
1295
  c(U.date(["[[start]]", o], "Start Date")),
1296
1296
  c(" - "),
1297
1297
  c(U.date(["[[end]]", o], "End Date"))
@@ -1303,7 +1303,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1303
1303
  button: n.panel,
1304
1304
  size: "xl"
1305
1305
  }, [
1306
- new fe({
1306
+ new he({
1307
1307
  startDate: n.state.start,
1308
1308
  endDate: n.state.end,
1309
1309
  onRangeSelect: e,
@@ -1342,7 +1342,7 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1342
1342
  */
1343
1343
  render() {
1344
1344
  const e = (s, { state: o }) => o.toggle("open"), t = (s, o) => {
1345
- this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, v.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: o }, this.parent);
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);
1346
1346
  };
1347
1347
  return l({ class: "relative w-full max-w-[320px]" }, [
1348
1348
  dt({
@@ -1357,8 +1357,8 @@ const H = globalThis.matchMedia, M = u(({ value: e, label: t, icon: s }) => b({
1357
1357
  ]);
1358
1358
  }
1359
1359
  }
1360
- ), ss = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => ae([
1361
- new xe({
1360
+ ), ss = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => ie([
1361
+ new be({
1362
1362
  dateTime: e,
1363
1363
  filter: s || ((o) => {
1364
1364
  const n = j.getLocalTime(o, !0, !1, t);
@@ -1465,7 +1465,7 @@ function pt({ handleTimeSelect: e }) {
1465
1465
  )
1466
1466
  );
1467
1467
  }
1468
- function _(e) {
1468
+ function Y(e) {
1469
1469
  if (!e)
1470
1470
  return { hour: null, minute: null, meridian: null };
1471
1471
  const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
@@ -1486,7 +1486,7 @@ const os = D(
1486
1486
  * @member {object} state
1487
1487
  */
1488
1488
  state() {
1489
- const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = _(e);
1489
+ const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = Y(e);
1490
1490
  return {
1491
1491
  selectedTime: e,
1492
1492
  open: !1,
@@ -1502,7 +1502,7 @@ const os = D(
1502
1502
  */
1503
1503
  after() {
1504
1504
  if (this.input.value) {
1505
- const { hour: e, minute: t, meridian: s } = _(this.input.value);
1505
+ const { hour: e, minute: t, meridian: s } = Y(this.input.value);
1506
1506
  this.state.set({
1507
1507
  hour: e,
1508
1508
  minute: t,
@@ -1522,15 +1522,15 @@ const os = D(
1522
1522
  if (r.length > 0 && (i = r.substring(0, 2), r.length > 2 && (i += ":" + r.substring(2, 4))), r.length >= 4) {
1523
1523
  const a = parseInt(r.substring(0, 2), 10), m = parseInt(r.substring(2, 4), 10);
1524
1524
  if (a >= 0 && a <= 23 && m >= 0 && m <= 59) {
1525
- let g = a, y = "AM";
1526
- a === 0 ? g = 12 : a > 12 ? (g = a - 12, y = "PM") : a === 12 && (y = "PM");
1527
- const p = `${g.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")} ${y}`;
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}`;
1528
1528
  i = p, this.state.set({
1529
1529
  hour: g.toString().padStart(2, "0"),
1530
1530
  minute: m.toString().padStart(2, "0"),
1531
- meridian: y,
1531
+ meridian: v,
1532
1532
  selectedTime: p
1533
- }), this.input.value = p, v.trigger("change", this.input), typeof this.change == "function" && this.change(p);
1533
+ }), this.input.value = p, y.trigger("change", this.input), typeof this.change == "function" && this.change(p);
1534
1534
  }
1535
1535
  }
1536
1536
  n.target.value = i;
@@ -1539,7 +1539,7 @@ const os = D(
1539
1539
  }, o = ({ hour: n, minute: r, meridian: i }) => {
1540
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) {
1541
1541
  const a = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
1542
- this.state.selectedTime = a, this.state.open = !1, this.input.value = a, v.trigger("change", this.input), typeof this.change == "function" && this.change(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);
1543
1543
  }
1544
1544
  };
1545
1545
  return l(
@@ -1564,7 +1564,7 @@ const os = D(
1564
1564
  x({ size: "lg" }, e)
1565
1565
  ]), xt = ({ title: e }) => L({ class: "flex flex-auto items-center" }, [
1566
1566
  $({ class: "text-lg font-semibold" }, e)
1567
- ]), yt = u((e, t) => ce(
1567
+ ]), vt = u((e, t) => ae(
1568
1568
  {
1569
1569
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
1570
1570
  rounded-lg flex flex-auto flex-col
@@ -1586,7 +1586,7 @@ const os = D(
1586
1586
  ])
1587
1587
  ])
1588
1588
  ]
1589
- )), vt = (e) => Z.render(e, app.root), W = {
1589
+ )), yt = (e) => X.render(e, app.root), _ = {
1590
1590
  info: {
1591
1591
  borderColor: "border-blue-500",
1592
1592
  bgColor: "bg-muted/10",
@@ -1630,8 +1630,8 @@ class wt extends k {
1630
1630
  render() {
1631
1631
  const t = (a) => {
1632
1632
  a.target === this.panel && this.close();
1633
- }, { borderColor: s, bgColor: o, iconColor: n } = W[this.type] || W.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
1634
- return yt({
1633
+ }, { borderColor: s, bgColor: o, iconColor: n } = _[this.type] || _.default, r = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
1634
+ return vt({
1635
1635
  class: r,
1636
1636
  title: i,
1637
1637
  click: t,
@@ -1675,7 +1675,7 @@ class wt extends k {
1675
1675
  * @returns {void}
1676
1676
  */
1677
1677
  open() {
1678
- vt(this), this.panel.showModal(), this.state.open = !0;
1678
+ yt(this), this.panel.showModal(), this.state.open = !0;
1679
1679
  }
1680
1680
  /**
1681
1681
  * This will close the modal.
@@ -1717,7 +1717,7 @@ class ns extends wt {
1717
1717
  }
1718
1718
  }
1719
1719
  const ls = u((e, t = []) => l({ class: "w-full max-w-md p-6 m-auto" }, [
1720
- te({ class: "flex flex-auto flex-col" }, [
1720
+ ee({ class: "flex flex-auto flex-col" }, [
1721
1721
  l({ class: "flex flex-auto flex-col gap-y-4" }, [
1722
1722
  l({ class: "flex flex-auto items-center justify-center" }, [
1723
1723
  e.icon && l({ class: "w-16 h-16 mb-2 text-primary" }, [
@@ -1738,7 +1738,7 @@ export {
1738
1738
  Vt as C,
1739
1739
  At as D,
1740
1740
  es as E,
1741
- Be as F,
1741
+ Te as F,
1742
1742
  ts as G,
1743
1743
  ss as H,
1744
1744
  Gt as I,
@@ -1747,33 +1747,33 @@ export {
1747
1747
  Jt as L,
1748
1748
  Rt as M,
1749
1749
  Ht as N,
1750
- yt as O,
1750
+ vt as O,
1751
1751
  nt as P,
1752
1752
  wt as Q,
1753
1753
  ls as R,
1754
1754
  Ut as S,
1755
1755
  qt as T,
1756
- Ie as a,
1756
+ ke as a,
1757
1757
  Mt as b,
1758
- $e as c,
1759
- Le as d,
1760
- Ae as e,
1761
- Me as f,
1758
+ De as c,
1759
+ Be as d,
1760
+ Le as e,
1761
+ Ae as f,
1762
1762
  Pt as g,
1763
1763
  jt as h,
1764
1764
  Ot as i,
1765
- je as j,
1765
+ Pe as j,
1766
1766
  zt as k,
1767
- te as l,
1767
+ ee as l,
1768
1768
  Et as m,
1769
1769
  Nt as n,
1770
- He as o,
1770
+ Re as o,
1771
1771
  Yt as p,
1772
1772
  _t as q,
1773
1773
  Wt as r,
1774
1774
  T as s,
1775
1775
  S as t,
1776
- _e as u,
1776
+ Ye as u,
1777
1777
  Qt as v,
1778
1778
  Xt as w,
1779
1779
  ot as x,
package/dist/index.es.js CHANGED
@@ -4,7 +4,7 @@ import { C as T, F as b } from "./form-group-CJzpq9Us.js";
4
4
  import { C as I, d as S, D as F, c as B, E as P, F as k, H as M, I as x, M as f, N as v, P as N, R as y, T as h, a as U, b as L, U as W, W as H } from "./inputs-9udyzkHR.js";
5
5
  import { V as w, a as A } from "./veil-CqnAmj-D.js";
6
6
  import { Icons as O } from "./icons.es.js";
7
- import { A as V, B as j, C as q, w as J, K as z, y as K, z as Q, E as _, G as X, D as Y, m as Z, n as $, Q as aa, O as ea, v as sa, c as oa, a as ta, b as ra, R as na, l as la, g as ia, i as pa, h as da, j as ma, e as ua, k as ga, F as Ca, d as ca, f as Ta, I as ba, L as Da, x as Ia, M as Sa, o as Fa, N as Ba, P as Pa, s as ka, t as Ma, S as xa, q as fa, r as va, T as Na, H as ya, J as ha, p as Ua, u as La } from "./empty-state-CprYMaCA.js";
7
+ import { A as V, B as j, C as q, w as J, K as z, y as K, z as Q, E as _, G as X, D as Y, m as Z, n as $, Q as aa, O as ea, v as sa, c as oa, a as ta, b as ra, R as na, l as la, g as ia, i as pa, h as da, j as ma, e as ua, k as ga, F as Ca, d as ca, f as Ta, I as ba, L as Da, x as Ia, M as Sa, o as Fa, N as Ba, P as Pa, s as ka, t as Ma, S as xa, q as fa, r as va, T as Na, H as ya, J as ha, p as Ua, u as La } from "./empty-state-CsFTfAzu.js";
8
8
  import { A as Ha, b as Ra, C as wa, D as Aa, a as Ga, F as Oa, M as Ea, P as Va, R as ja, c as qa, g as Ja, p as za } from "./range-calendar-BMWSJTE0.js";
9
9
  import { B as Qa, p as _a, C as Xa, j as Ya, D as Za, m as $a, k as ae, H as ee, I as se, N as oe, O as te, P as re, S as ne, n as le, o as ie, x as pe, s as de, q as me, r as ue, T as ge, t as Ce, w as ce, u as Te, v as be, l as De, U as Ie, W as Se, f as Fe, h as Be, i as Pe, c as ke, d as Me, b as xe, e as fe, a as ve, g as Ne } from "./signature-panel-CcRmukPe.js";
10
10
  import { B as he, I as Ue, M as Le, d as We, e as He, g as Re, N as we, b as Ae, a as Ge, f as Oe, P as Ee, c as Ve, S as je, T as qe } from "./mobile-nav-wrapper-Dm9DinRD.js";
@@ -1,4 +1,4 @@
1
- import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-CprYMaCA.js";
1
+ import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-CsFTfAzu.js";
2
2
  import { A as W, P as X, g as Y } from "./range-calendar-BMWSJTE0.js";
3
3
  export {
4
4
  s as Alert,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.328",
3
+ "version": "1.0.330",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {