@base-framework/ui 1.1.0 → 1.1.2

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,5 +1,5 @@
1
- import { Div as n, H5 as Z, P as b, I as x, Li as H, Span as a, Ul as q, Button as f, OnState as T, Label as P, H2 as S, Form as tt, Header as I, Footer as L, A as V, H3 as et, Checkbox as st, Input as m, Img as G, Nav as ot, UseParent as W, OnStateOpen as O, Time as nt, Dialog as rt } from "@base-framework/atoms";
2
- import { Atom as c, Component as w, Html as A, Dom as it, base as lt, Data as B, Builder as _, Jot as C, Events as p, DateTime as M } from "@base-framework/base";
1
+ import { Div as n, H5 as Z, P as b, I as x, Li as H, Span as a, Ul as q, Button as f, OnState as T, Label as P, H2 as S, Form as tt, Header as I, Footer as L, A as V, H3 as et, Checkbox as st, Input as m, Img as G, Nav as ot, UseParent as W, OnStateOpen as O, Time as nt, Dialog as it } from "@base-framework/atoms";
2
+ import { Atom as c, Component as w, Html as A, Dom as rt, base as lt, Data as B, Builder as _, Jot as C, Events as p, DateTime as M } from "@base-framework/base";
3
3
  import { P as D, b as at, R as ct } from "./range-calendar-CAwPjNM3.js";
4
4
  import { C as dt, F as ut } from "./form-group-BB7dLJir.js";
5
5
  import { B as h, I as g } from "./buttons-CfwtbIR-.js";
@@ -36,8 +36,8 @@ const z = {
36
36
  }, gt = (t, e) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${e}` }, [
37
37
  x({ html: t })
38
38
  ]), pt = (t) => Z({ class: "font-semibold" }, t), bt = (t) => b({ class: "text-sm text-muted-foreground" }, t), Le = c(({ title: t, description: e, icon: s, type: o = "default" }) => {
39
- const { borderColor: r, bgColor: i, iconColor: l } = z[o] || z.default;
40
- return n({ class: `flex items-start p-4 border rounded-lg ${i} ${r}` }, [
39
+ const { borderColor: i, bgColor: r, iconColor: l } = z[o] || z.default;
40
+ return n({ class: `flex items-start p-4 border rounded-lg ${r} ${i}` }, [
41
41
  // Icon and content
42
42
  s && gt(s, l),
43
43
  n({ class: "flex flex-col" }, [
@@ -67,7 +67,7 @@ class Oe extends w {
67
67
  A.removeElement(e);
68
68
  return;
69
69
  }
70
- it.addClass(e, s), lt.on("animationend", e, (o) => A.removeElement(e));
70
+ rt.addClass(e, s), lt.on("animationend", e, (o) => A.removeElement(e));
71
71
  }
72
72
  }
73
73
  const xt = (t) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, t), yt = (t) => a({ class: "flex w-4 h-4", html: t }), wt = (t) => a({ class: "flex-auto" }, t), Ct = (t, e) => H({
@@ -185,15 +185,15 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
185
185
  invalid: s,
186
186
  input: e
187
187
  } : o), Mt = c((t, e) => {
188
- const r = J(e, (i) => {
189
- i.target.checkValidity() && t.setError(null);
190
- }, (i) => {
191
- t.setError(i.target.validationMessage);
188
+ const i = J(e, (r) => {
189
+ r.target.checkValidity() && t.setError(null);
190
+ }, (r) => {
191
+ t.setError(r.target.validationMessage);
192
192
  });
193
193
  return n({
194
194
  ...t,
195
195
  class: "w-full"
196
- }, r);
196
+ }, i);
197
197
  }), Ee = v(
198
198
  {
199
199
  /**
@@ -215,8 +215,8 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
215
215
  * @returns {object}
216
216
  */
217
217
  render() {
218
- const t = this.name, e = this.getId(`${t}`), { label: s, description: o } = this, r = (i) => {
219
- this.state.error = i, this.state.hasError = !!i;
218
+ const t = this.name, e = this.getId(`${t}`), { label: s, description: o } = this, i = (r) => {
219
+ this.state.error = r, this.state.hasError = !!r;
220
220
  };
221
221
  return n({ class: "flex flex-auto gap-y-4" }, [
222
222
  Tt([
@@ -225,10 +225,10 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
225
225
  id: e,
226
226
  name: t,
227
227
  value: this.state.value,
228
- setError: r
228
+ setError: i
229
229
  }, this.children),
230
230
  o && Bt({ id: this.getId("description") }, o),
231
- n({ onState: ["error", (i) => i && Ft(i)] })
231
+ n({ onState: ["error", (r) => r && Ft(r)] })
232
232
  ])
233
233
  ]);
234
234
  }
@@ -246,7 +246,7 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
246
246
  ]), He = (t, e) => n({ class: "flex" }, [
247
247
  a({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, t),
248
248
  a(e)
249
- ]), Lt = c(({ title: t, description: e, back: s, icon: o, options: r = [] }) => I({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
249
+ ]), Lt = c(({ title: t, description: e, back: s, icon: o, options: i = [] }) => I({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
250
250
  /**
251
251
  * Back Button (Mobile Only)
252
252
  */
@@ -254,7 +254,7 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
254
254
  variant: "icon",
255
255
  icon: u.arrows.left,
256
256
  class: "mr-2 p-0 flex sm:hidden",
257
- click: (i, l) => l.close()
257
+ click: (r, l) => l.close()
258
258
  }),
259
259
  /**
260
260
  * Icon Container
@@ -270,20 +270,20 @@ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
270
270
  S({ class: "text-lg font-semibold m-0 truncate" }, t),
271
271
  e && n({ class: "text-sm text-muted-foreground truncate" }, e)
272
272
  ]),
273
- n({ class: "flex flex-none items-center gap-2" }, r)
273
+ n({ class: "flex flex-none items-center gap-2" }, i)
274
274
  ])
275
275
  ])), Q = c((t, e) => {
276
276
  const s = t.class?.includes("drawer");
277
277
  return n({
278
278
  popover: "manual",
279
279
  class: `modal ${s ? "" : "m-auto top-0 right-0 bottom-0 left-0"} ${s ? "" : "h-full max-h-screen"} fixed z-20 grid w-full gap-2 lg:border bg-background text-foreground shadow-xl break-words p-0 overflow-y-auto ${t.class}`,
280
- click: (i, l) => {
281
- i.target === l.panel && (i.preventDefault(), i.stopPropagation(), l.state.open = !1);
280
+ click: (r, l) => {
281
+ r.target === l.panel && (r.preventDefault(), r.stopPropagation(), l.state.open = !1);
282
282
  }
283
283
  }, [
284
284
  K({
285
285
  class: "modal-content relative bg-background z-[1] flex flex-auto flex-col gap-y-4 min-w-0",
286
- submit: (i, l) => t.onSubmit && t.onSubmit(l),
286
+ submit: (r, l) => t.onSubmit && t.onSubmit(l),
287
287
  cache: "modalContent",
288
288
  ...t.gestureHandlers
289
289
  }, [
@@ -317,9 +317,9 @@ class At extends w {
317
317
  options: this.headerOptions(),
318
318
  buttons: this.getButtons(),
319
319
  hideFooter: this.hideFooter,
320
- onSubmit: (r) => {
321
- let i = !0;
322
- this.onSubmit && (i = this.onSubmit(r)), i !== !1 && this.destroy();
320
+ onSubmit: (i) => {
321
+ let r = !0;
322
+ this.onSubmit && (r = this.onSubmit(i)), r !== !1 && this.destroy();
323
323
  },
324
324
  icon: this.icon,
325
325
  back: this.back ?? !1,
@@ -453,7 +453,7 @@ class At extends w {
453
453
  * @returns {void}
454
454
  */
455
455
  beforeDestroy() {
456
- this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto";
456
+ this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto", this.modalContent = null, this.modalBody = null;
457
457
  }
458
458
  }
459
459
  class Yt {
@@ -472,12 +472,12 @@ class Yt {
472
472
  const {
473
473
  modal: s = null,
474
474
  modalContent: o = null,
475
- modalBody: r = null,
476
- closeThreshold: i = 150,
475
+ modalBody: i = null,
476
+ closeThreshold: r = 150,
477
477
  snapThreshold: l = 50,
478
478
  onClose: d = null
479
479
  } = e;
480
- this.modal = s, this.modalContent = o, this.modalBody = r, this.closeThreshold = i, this.snapThreshold = l, this.onClose = d, this.reset();
480
+ this.modal = s, this.modalContent = o, this.modalBody = i, this.closeThreshold = r, this.snapThreshold = l, this.onClose = d, this.reset();
481
481
  }
482
482
  /**
483
483
  * Resets the drag state to initial values
@@ -527,10 +527,10 @@ class Yt {
527
527
  const o = this.getDeltaY();
528
528
  if (!this.state.isDragging && this.state.canDrag && o > 0 && this.modalBody.scrollTop === 0 && (this.state.isDragging = !0), this.state.isDragging && o > 0) {
529
529
  e.preventDefault();
530
- const r = this.calculateTranslateY(o);
531
- this.modalContent.style.transform = `translateY(${r}px)`, this.modalContent.style.transition = "none";
532
- const i = this.calculateBackdropOpacity(o);
533
- this.updateBackdropOpacity(i);
530
+ const i = this.calculateTranslateY(o);
531
+ this.modalContent.style.transform = `translateY(${i}px)`, this.modalContent.style.transition = "none";
532
+ const r = this.calculateBackdropOpacity(o);
533
+ this.updateBackdropOpacity(r);
534
534
  } else this.modalBody.scrollTop > 0 && (this.state.canDrag = !1);
535
535
  }
536
536
  /**
@@ -642,7 +642,7 @@ class qe extends At {
642
642
  * @returns {object}
643
643
  */
644
644
  render() {
645
- const e = this.getMainClass(), s = this.title || "", o = this.description || null, r = this.getContainerProps();
645
+ const e = this.getMainClass(), s = this.title || "", o = this.description || null, i = this.getContainerProps();
646
646
  return Q(
647
647
  {
648
648
  class: e,
@@ -651,14 +651,14 @@ class qe extends At {
651
651
  options: this.headerOptions(),
652
652
  buttons: this.getButtons(),
653
653
  hideFooter: this.hideFooter,
654
- onSubmit: (i) => {
654
+ onSubmit: (r) => {
655
655
  let l = !0;
656
- this.onSubmit && (l = this.onSubmit(i)), l !== !1 && this.destroy();
656
+ this.onSubmit && (l = this.onSubmit(r)), l !== !1 && this.destroy();
657
657
  },
658
658
  icon: this.icon,
659
659
  back: this.back ?? !1,
660
660
  aria: { expanded: ["open"] },
661
- ...r
661
+ ...i
662
662
  },
663
663
  this.children
664
664
  );
@@ -767,14 +767,14 @@ class Nt extends w {
767
767
  * @returns {object}
768
768
  */
769
769
  render() {
770
- const { bgColor: e, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, i = this.getChildren(o);
771
- return r ? jt({
772
- href: r,
770
+ const { bgColor: e, borderColor: s, iconColor: o } = this.getTypeStyles(), i = this.href || null, r = this.getChildren(o);
771
+ return i ? jt({
772
+ href: i,
773
773
  class: `${e} ${s}`
774
- }, i) : Et({
774
+ }, r) : Et({
775
775
  close: this.close.bind(this),
776
776
  class: `${e} ${s}`
777
- }, i);
777
+ }, r);
778
778
  }
779
779
  /**
780
780
  * This will be called after the component is set up.
@@ -883,8 +883,8 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
883
883
  class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
884
884
  onState: ["method", { active: t }],
885
885
  dataSet: ["method", ["state", t, "active"]],
886
- click: (o, { state: r }) => {
887
- r.method = t, localStorage.setItem("theme", t), t === "system" && localStorage.removeItem("theme"), Rt(t);
886
+ click: (o, { state: i }) => {
887
+ i.method = t, localStorage.setItem("theme", t), t === "system" && localStorage.removeItem("theme"), Rt(t);
888
888
  }
889
889
  }, [
890
890
  g(s),
@@ -1211,8 +1211,8 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1211
1211
  "bg-primary": t,
1212
1212
  "shadow-md": t
1213
1213
  }],
1214
- click: (s, { data: o, onClick: r }) => {
1215
- o.activeIndex = t, r && r(t);
1214
+ click: (s, { data: o, onClick: i }) => {
1215
+ o.activeIndex = t, i && i(t);
1216
1216
  }
1217
1217
  })
1218
1218
  ]), Kt = (t, e) => Array.from({ length: t }, (s, o) => Jt({
@@ -1271,10 +1271,10 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1271
1271
  ]), te = ({ onSelect: t, state: e }) => n({ class: "flex flex-auto flex-col" }, [
1272
1272
  T(
1273
1273
  "open",
1274
- (s, o, r) => s ? new D({
1274
+ (s, o, i) => s ? new D({
1275
1275
  cache: "dropdown",
1276
- parent: r,
1277
- button: r.button
1276
+ parent: i,
1277
+ button: i.button
1278
1278
  }, [
1279
1279
  Zt(t, e)
1280
1280
  ]) : null
@@ -1395,11 +1395,11 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1395
1395
  icon: u.circlePlus,
1396
1396
  click: t,
1397
1397
  ariaLabel: "Increment"
1398
- }), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state: r }) => m({
1399
- value: ["[[count]]", r],
1398
+ }), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state: i }) => m({
1399
+ value: ["[[count]]", i],
1400
1400
  bind: t,
1401
- blur: (i, { state: l }) => {
1402
- let d = parseInt(i.target.value, 10);
1401
+ blur: (r, { state: l }) => {
1402
+ let d = parseInt(r.target.value, 10);
1403
1403
  isNaN(d) && (d = e ?? 0), e !== void 0 && (d = Math.max(d, e)), s !== void 0 && (d = Math.min(d, s)), l.count = d;
1404
1404
  },
1405
1405
  class: "flex flex-auto text-lg font-medium bg-input text-center border min-w-0",
@@ -1445,12 +1445,12 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1445
1445
  ), ne = (t) => {
1446
1446
  let e = "";
1447
1447
  return t.length > 0 && (e = t.substring(0, 2), t.length > 2 && (e += "/" + t.substring(2, 4), t.length > 4 && (e += "/" + t.substring(4, 8)))), e;
1448
- }, re = (t) => {
1448
+ }, ie = (t) => {
1449
1449
  if (t.length !== 8)
1450
1450
  return null;
1451
1451
  const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10), o = parseInt(t.substring(4, 8), 10);
1452
1452
  return e >= 1 && e <= 12 && s >= 1 && s <= 31 && o >= 1900 ? `${o}-${e.toString().padStart(2, "0")}-${s.toString().padStart(2, "0")}` : null;
1453
- }, ie = ({ bind: t, required: e }) => m({
1453
+ }, re = ({ bind: t, required: e }) => m({
1454
1454
  cache: "input",
1455
1455
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1456
1456
  bind: t,
@@ -1462,13 +1462,13 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1462
1462
  input: e,
1463
1463
  focus: s,
1464
1464
  onState: ["selectedDate", (o) => o ? M.format("standard", o) : ""]
1465
- }), ae = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) => n(
1465
+ }), ae = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: i, placeholder: r }) => n(
1466
1466
  {
1467
1467
  class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
1468
1468
  },
1469
1469
  [
1470
- ie({ bind: t, required: e }),
1471
- le({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
1470
+ re({ bind: t, required: e }),
1471
+ le({ placeholder: r, handleInputChange: o, handleInputFocus: i }),
1472
1472
  f(
1473
1473
  {
1474
1474
  class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
@@ -1480,14 +1480,14 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1480
1480
  )
1481
1481
  ]
1482
1482
  ), ce = ({ handleDateSelect: t, blockPriorDates: e }) => O(
1483
- (s, o, r) => new D({
1483
+ (s, o, i) => new D({
1484
1484
  cache: "dropdown",
1485
- parent: r,
1486
- button: r.panel,
1485
+ parent: i,
1486
+ button: i.panel,
1487
1487
  size: "fit"
1488
1488
  }, [
1489
1489
  new at({
1490
- selectedDate: r.state.selectedDate,
1490
+ selectedDate: i.state.selectedDate,
1491
1491
  selectedCallBack: t,
1492
1492
  blockPriorDates: e
1493
1493
  })
@@ -1522,7 +1522,7 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1522
1522
  handleInputChange(t) {
1523
1523
  const s = t.target.value.replace(/\D/g, "");
1524
1524
  t.target.value = ne(s);
1525
- const o = re(s);
1525
+ const o = ie(s);
1526
1526
  o && (this.state.selectedDate = o, this.input.value = o, p.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(o));
1527
1527
  },
1528
1528
  /**
@@ -1591,15 +1591,15 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1591
1591
  a(Y.date(["[[end]]", o], "End Date"))
1592
1592
  ]),
1593
1593
  x({ html: u.calendar.days })
1594
- ]), he = ({ handleDateSelect: t, blockPriorDates: e }) => O((s, o, r) => new D({
1594
+ ]), he = ({ handleDateSelect: t, blockPriorDates: e }) => O((s, o, i) => new D({
1595
1595
  cache: "dropdown",
1596
- parent: r,
1597
- button: r.panel,
1596
+ parent: i,
1597
+ button: i.panel,
1598
1598
  size: "xl"
1599
1599
  }, [
1600
1600
  new ct({
1601
- startDate: r.state.start,
1602
- endDate: r.state.end,
1601
+ startDate: i.state.start,
1602
+ endDate: i.state.end,
1603
1603
  onRangeSelect: t,
1604
1604
  blockPriorDates: e
1605
1605
  })
@@ -1655,8 +1655,8 @@ const E = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
1655
1655
  new ft({
1656
1656
  dateTime: t,
1657
1657
  filter: s || ((o) => {
1658
- const r = M.getLocalTime(o, !0, !1, e);
1659
- return M.getTimeFrame(r);
1658
+ const i = M.getLocalTime(o, !0, !1, e);
1659
+ return M.getTimeFrame(i);
1660
1660
  })
1661
1661
  })
1662
1662
  ]);
@@ -1670,12 +1670,12 @@ function fe(t) {
1670
1670
  const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10);
1671
1671
  if (e < 0 || e > 23 || s < 0 || s > 59)
1672
1672
  return { formattedTime: null, hour: null, minute: null, meridian: null };
1673
- let o = e, r = "AM";
1674
- return e === 0 ? o = 12 : e > 12 ? (o = e - 12, r = "PM") : e === 12 && (r = "PM"), {
1675
- formattedTime: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")} ${r}`,
1673
+ let o = e, i = "AM";
1674
+ return e === 0 ? o = 12 : e > 12 ? (o = e - 12, i = "PM") : e === 12 && (i = "PM"), {
1675
+ formattedTime: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")} ${i}`,
1676
1676
  hour: o.toString().padStart(2, "0"),
1677
1677
  minute: s.toString().padStart(2, "0"),
1678
- meridian: r
1678
+ meridian: i
1679
1679
  };
1680
1680
  }
1681
1681
  function ge({ bind: t, required: e }) {
@@ -1696,14 +1696,14 @@ function pe({ placeholder: t, handleInputChange: e, handleInputFocus: s }) {
1696
1696
  onState: ["selectedTime", (o) => o || ""]
1697
1697
  });
1698
1698
  }
1699
- function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) {
1699
+ function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: i, placeholder: r }) {
1700
1700
  return n(
1701
1701
  {
1702
1702
  class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
1703
1703
  },
1704
1704
  [
1705
1705
  ge({ bind: t, required: e }),
1706
- pe({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
1706
+ pe({ placeholder: r, handleInputChange: o, handleInputFocus: i }),
1707
1707
  f(
1708
1708
  {
1709
1709
  class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
@@ -1716,11 +1716,11 @@ function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleI
1716
1716
  ]
1717
1717
  );
1718
1718
  }
1719
- function $({ items: t, handleTimeSelect: e, state: s, stateValue: o, pad: r = !1 }) {
1719
+ function $({ items: t, handleTimeSelect: e, state: s, stateValue: o, pad: i = !1 }) {
1720
1720
  return n(
1721
1721
  { class: "flex flex-col max-h-[200px] overflow-y-auto" },
1722
- t.map((i) => {
1723
- let l = r ? i.toString().padStart(2, "0") : i.toString();
1722
+ t.map((r) => {
1723
+ let l = i ? r.toString().padStart(2, "0") : r.toString();
1724
1724
  return f({
1725
1725
  text: l,
1726
1726
  class: "hover:bg-muted/50 rounded-md pr-2 py-1",
@@ -1748,7 +1748,7 @@ function xe({ handleTimeSelect: t }) {
1748
1748
  [
1749
1749
  // Hours column
1750
1750
  $({
1751
- items: Array.from({ length: 12 }, (r, i) => i + 1),
1751
+ items: Array.from({ length: 12 }, (i, r) => r + 1),
1752
1752
  handleTimeSelect: t,
1753
1753
  state: o.state,
1754
1754
  stateValue: "hour",
@@ -1756,7 +1756,7 @@ function xe({ handleTimeSelect: t }) {
1756
1756
  }),
1757
1757
  // Minutes column
1758
1758
  $({
1759
- items: Array.from({ length: 60 }, (r, i) => i),
1759
+ items: Array.from({ length: 60 }, (i, r) => r),
1760
1760
  handleTimeSelect: t,
1761
1761
  state: o.state,
1762
1762
  stateValue: "minute",
@@ -1783,14 +1783,14 @@ function U(t) {
1783
1783
  const e = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = t.match(e);
1784
1784
  if (!s)
1785
1785
  return { hour: null, minute: null, meridian: null };
1786
- let [, o, r, , i] = s, l = parseInt(o, 10), d = parseInt(r, 10);
1787
- return l < 0 || l > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (i ? (i = i.toUpperCase(), i === "PM" && l < 12 ? l += 12 : i === "AM" && l === 12 && (l = 12)) : l === 0 ? (i = "AM", l = 12) : l < 12 ? i = "AM" : l === 12 ? i = "PM" : (i = "PM", l -= 12), {
1786
+ let [, o, i, , r] = s, l = parseInt(o, 10), d = parseInt(i, 10);
1787
+ return l < 0 || l > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (r ? (r = r.toUpperCase(), r === "PM" && l < 12 ? l += 12 : r === "AM" && l === 12 && (l = 12)) : l === 0 ? (r = "AM", l = 12) : l < 12 ? r = "AM" : l === 12 ? r = "PM" : (r = "PM", l -= 12), {
1788
1788
  hour: l.toString().padStart(2, "0"),
1789
1789
  minute: d.toString().padStart(2, "0"),
1790
- meridian: i
1790
+ meridian: r
1791
1791
  });
1792
1792
  }
1793
- const rs = v(
1793
+ const is = v(
1794
1794
  {
1795
1795
  /**
1796
1796
  * The initial shallow state of the TimePicker.
@@ -1894,7 +1894,7 @@ const rs = v(
1894
1894
  g({ size: "lg" }, t)
1895
1895
  ]), we = ({ title: t }) => I({ class: "flex flex-auto items-center" }, [
1896
1896
  S({ class: "text-lg font-semibold" }, t)
1897
- ]), Ce = c((t, e) => rt(
1897
+ ]), Ce = c((t, e) => it(
1898
1898
  {
1899
1899
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
1900
1900
  rounded-lg flex flex-auto flex-col
@@ -1960,13 +1960,13 @@ class Se extends w {
1960
1960
  render() {
1961
1961
  const e = (d) => {
1962
1962
  d.target === this.panel && this.close();
1963
- }, { borderColor: s, bgColor: o, iconColor: r } = R[this.type] || R.default, i = `${this.getMainClass()} ${o} ${s}`, l = this.title || "Dialog Title";
1963
+ }, { borderColor: s, bgColor: o, iconColor: i } = R[this.type] || R.default, r = `${this.getMainClass()} ${o} ${s}`, l = this.title || "Dialog Title";
1964
1964
  return Ce({
1965
- class: i,
1965
+ class: r,
1966
1966
  title: l,
1967
1967
  click: e,
1968
1968
  icon: this.icon,
1969
- iconColor: r,
1969
+ iconColor: i,
1970
1970
  description: this.description,
1971
1971
  buttons: this.getButtons()
1972
1972
  }, this.children);
@@ -2016,7 +2016,7 @@ class Se extends w {
2016
2016
  this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
2017
2017
  }
2018
2018
  }
2019
- class is extends Se {
2019
+ class rs extends Se {
2020
2020
  /**
2021
2021
  * This will declare the props for the compiler.
2022
2022
  *
@@ -2073,11 +2073,11 @@ export {
2073
2073
  os as H,
2074
2074
  Ke as I,
2075
2075
  ns as J,
2076
- rs as K,
2076
+ is as K,
2077
2077
  Qe as L,
2078
2078
  At as M,
2079
2079
  Ve as N,
2080
- is as O,
2080
+ rs as O,
2081
2081
  se as P,
2082
2082
  Ce as Q,
2083
2083
  Se as R,
package/dist/index.es.js CHANGED
@@ -4,11 +4,11 @@ import { C as T, F as b } from "./form-group-BB7dLJir.js";
4
4
  import { C as D, 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 w } from "./inputs-9udyzkHR.js";
5
5
  import { I as R, V as A, a as G } from "./image-BB__4s0g.js";
6
6
  import { Icons as E } from "./icons.es.js";
7
- import { A as j, B as q, C as J, x as z, O as K, z as Q, E as _, G as X, H as Y, D as Z, m as $, n as aa, R as ea, Q as sa, w as oa, o as ta, c as ra, a as na, b as la, U as ia, l as pa, g as ma, i as da, h as ua, j as ga, e as Ca, k as ca, F as Ta, d as ba, f as Ia, I as Da, L as Sa, y as Fa, M as Ba, p as Pa, N as ka, P as Ma, t as xa, u as fa, S as va, r as Na, s as ya, T as ha, J as Ua, K as La, q as Wa, v as wa } from "./empty-state-DdZZgWGr.js";
7
+ import { A as j, B as q, C as J, x as z, O as K, z as Q, E as _, G as X, H as Y, D as Z, m as $, n as aa, R as ea, Q as sa, w as oa, o as ta, c as ra, a as na, b as la, U as ia, l as pa, g as ma, i as da, h as ua, j as ga, e as Ca, k as ca, F as Ta, d as ba, f as Ia, I as Da, L as Sa, y as Fa, M as Ba, p as Pa, N as ka, P as Ma, t as xa, u as fa, S as va, r as Na, s as ya, T as ha, J as Ua, K as La, q as Wa, v as wa } from "./empty-state-CNuWXebM.js";
8
8
  import { A as Ra, b as Aa, C as Ga, D as Oa, a as Ea, F as Va, M as ja, P as qa, R as Ja, c as za, g as Ka, p as Qa } from "./range-calendar-CAwPjNM3.js";
9
9
  import { B as Xa, p as Ya, C as Za, j as $a, D as ae, m as ee, k as se, H as oe, I as te, N as re, O as ne, P as le, S as ie, n as pe, o as me, x as de, s as ue, q as ge, r as Ce, T as ce, t as Te, w as be, u as Ie, v as De, l as Se, U as Fe, W as Be, f as Pe, h as ke, i as Me, c as xe, d as fe, b as ve, e as Ne, a as ye, g as he } from "./signature-panel-C5pdGkvG.js";
10
10
  import { B as Le, I as We, M as we, d as He, e as Re, g as Ae, N as Ge, b as Oe, a as Ee, f as Ve, P as je, c as qe, S as Je, T as ze } from "./mobile-nav-wrapper-jUpomqyU.js";
11
- import { B as Qe, a as _e, C as Xe, F as Ye, b as Ze, c as $e, M as as, P as es, S as ss } from "./sidebar-menu-page-Dldug2Ff.js";
11
+ import { B as Qe, a as _e, C as Xe, F as Ye, b as Ze, c as $e, M as as, P as es, S as ss } from "./sidebar-menu-page-D6r7Pr21.js";
12
12
  import { A as ts, F as rs, M as ns, a as ls, T as is } from "./aside-template-sUm-F2f0.js";
13
13
  import { B as ms } from "./bside-template-do_hXebn.js";
14
14
  import { F as us, c as gs } from "./format-BmrNQptv.js";
@@ -1,4 +1,4 @@
1
- import { A as s, B as t, C as r, x as e, O as i, z as n, E as m, G as l, H as d, D as C, m as p, n as D, R as S, Q as g, w as u, o as c, c as F, a as T, b as P, U as w, l as A, g as I, i as f, h as b, j as y, e as B, k as M, F as U, d as k, f as x, I as L, L as R, y as v, M as E, p as N, N as h, P as G, t as O, u as j, S as q, r as z, s as H, T as J, J as K, K as Q, q as _, v as V } from "./empty-state-DdZZgWGr.js";
1
+ import { A as s, B as t, C as r, x as e, O as i, z as n, E as m, G as l, H as d, D as C, m as p, n as D, R as S, Q as g, w as u, o as c, c as F, a as T, b as P, U as w, l as A, g as I, i as f, h as b, j as y, e as B, k as M, F as U, d as k, f as x, I as L, L as R, y as v, M as E, p as N, N as h, P as G, t as O, u as j, S as q, r as z, s as H, T as J, J as K, K as Q, q as _, v as V } from "./empty-state-CNuWXebM.js";
2
2
  import { A as X, P as Y, g as Z } from "./range-calendar-CAwPjNM3.js";
3
3
  export {
4
4
  s as Alert,
package/dist/pages.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-Dldug2Ff.js";
1
+ import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-D6r7Pr21.js";
2
2
  export {
3
3
  s as BasicPage,
4
4
  P as BlankPage,
@@ -1,7 +1,7 @@
1
1
  import { Div as t, Header as n, H1 as d, P as o } from "@base-framework/atoms";
2
2
  import { F as l, A as x } from "./aside-template-sUm-F2f0.js";
3
3
  import { Component as h, Atom as i } from "@base-framework/base";
4
- import { c as u, e as f } from "./mobile-nav-wrapper-jUpomqyU.js";
4
+ import { c as u, e as p } from "./mobile-nav-wrapper-jUpomqyU.js";
5
5
  class c extends h {
6
6
  /**
7
7
  * This will declare the props for the compiler.
@@ -19,15 +19,6 @@ class c extends h {
19
19
  render() {
20
20
  return t({ class: `${this.class || ""}` }, this.children);
21
21
  }
22
- /**
23
- * This will be called before the component
24
- * is destroyed.
25
- *
26
- * @returns {void}
27
- */
28
- beforeDestroy() {
29
- super.beforeDestroy();
30
- }
31
22
  }
32
23
  class a extends c {
33
24
  /**
@@ -83,11 +74,11 @@ class w extends a {
83
74
  ]);
84
75
  }
85
76
  }
86
- const p = i(({ title: e, description: s }) => n({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
77
+ const f = i(({ title: e, description: s }) => n({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
87
78
  d({ class: "scroll-m-20 text-3xl font-bold tracking-tight" }, e),
88
79
  s && o({ class: "text-base text-muted-foreground py-2 max-w-[700px]" }, s)
89
80
  ]));
90
- class y extends a {
81
+ class F extends a {
91
82
  /**
92
83
  * This will declare the props for the compiler.
93
84
  *
@@ -103,7 +94,7 @@ class y extends a {
103
94
  */
104
95
  render() {
105
96
  return r([
106
- p({
97
+ f({
107
98
  title: this.title,
108
99
  description: this.description
109
100
  }),
@@ -111,7 +102,7 @@ class y extends a {
111
102
  ]);
112
103
  }
113
104
  }
114
- class F extends c {
105
+ class B extends c {
115
106
  /**
116
107
  * This will render the page.
117
108
  *
@@ -122,7 +113,7 @@ class F extends c {
122
113
  return t({ class: `flex flex-col flex-auto ${s}` }, this.children);
123
114
  }
124
115
  }
125
- class B extends a {
116
+ class M extends a {
126
117
  /**
127
118
  * This will declare the props for the compiler.
128
119
  *
@@ -201,7 +192,7 @@ class B extends a {
201
192
  class: "hidden lg:flex"
202
193
  }
203
194
  ),
204
- f({ title: this.title, options: s })
195
+ p({ title: this.title, options: s })
205
196
  ];
206
197
  }
207
198
  /**
@@ -219,8 +210,8 @@ export {
219
210
  w as F,
220
211
  r as M,
221
212
  c as P,
222
- B as S,
213
+ M as S,
223
214
  S as a,
224
- y as b,
225
- F as c
215
+ F as b,
216
+ B as c
226
217
  };
@@ -39,16 +39,6 @@ export class Drawer extends Modal {
39
39
  * @private
40
40
  */
41
41
  private gesture;
42
- /**
43
- * Cached reference to modal content element (set via cache property)
44
- * @type {HTMLElement|null}
45
- */
46
- modalContent: HTMLElement | null;
47
- /**
48
- * Cached reference to modal body element (set via cache property)
49
- * @type {HTMLElement|null}
50
- */
51
- modalBody: HTMLElement | null;
52
42
  /**
53
43
  * Gets extra props to pass to ModalContainer
54
44
  *
@@ -133,5 +133,7 @@ export class Modal extends Component {
133
133
  * @returns {void}
134
134
  */
135
135
  protected showModal(): void;
136
+ modalContent: any;
137
+ modalBody: any;
136
138
  }
137
139
  import { Component } from "@base-framework/base";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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": {