@base-framework/ui 1.0.232 → 1.0.233

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,11 +1,12 @@
1
- import { Div as n, H5 as R, P as g, I as b, Li as O, Span as a, Ul as V, Button as m, OnState as v, Label as W, Form as G, H2 as C, Header as k, Footer as M, A as Y, H3 as J, Checkbox as K, Nav as Q, Input as S, UseParent as X, Time as Z, Dialog as ee } from "@base-framework/atoms";
2
- import { Atom as c, Component as x, Html as L, Dom as te, base as se, Data as D, Builder as H, Jot as I, DateTime as B } from "@base-framework/base";
3
- import { P as T, b as oe } from "./calendar-Bn55oWBo.js";
4
- import { B as h, I as p } from "./buttons-Cm9etaEG.js";
1
+ import { Div as n, H5 as W, P as g, I as f, Li as V, Span as i, Ul as q, Button as m, OnState as w, Label as J, Form as G, H2 as S, Header as D, Footer as P, A as H, H3 as K, Checkbox as Q, Nav as X, Input as y, UseParent as Z, Time as ee, Dialog as te } from "@base-framework/atoms";
2
+ import { Atom as c, Component as v, Html as M, Dom as se, base as oe, Data as I, Builder as Y, Jot as $, DateTime as A } from "@base-framework/base";
3
+ import { P as C, b as ne, R as le } from "./range-calendar-ZAHrVCgV.js";
4
+ import { B as h, I as b } from "./buttons-Cm9etaEG.js";
5
5
  import { Icons as u } from "./icons.es.js";
6
- import { Timer as ne, List as le, DynamicTime as re } from "@base-framework/organisms";
7
- import { a as w } from "./veil-D4dRxILB.js";
8
- const P = {
6
+ import { Timer as re, List as ae, DynamicTime as ie } from "@base-framework/organisms";
7
+ import { a as x } from "./veil-D4dRxILB.js";
8
+ import { F as L } from "./format-BueUWxwT.js";
9
+ const F = {
9
10
  info: {
10
11
  borderColor: "border-blue-500",
11
12
  bgColor: "bg-muted/10",
@@ -31,20 +32,20 @@ const P = {
31
32
  bgColor: "bg-muted/10",
32
33
  iconColor: "text-muted-foreground"
33
34
  }
34
- }, ie = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
35
- b({ html: e })
36
- ]), ae = (e) => R({ class: "font-semibold" }, e), ce = (e) => g({ class: "text-sm text-muted-foreground" }, e), mt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
37
- const { borderColor: r, bgColor: l, iconColor: i } = P[o] || P.default;
38
- return n({ class: `flex items-start p-4 border rounded-lg ${l} ${r}` }, [
35
+ }, ce = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
36
+ f({ html: e })
37
+ ]), de = (e) => W({ class: "font-semibold" }, e), ue = (e) => g({ class: "text-sm text-muted-foreground" }, e), wt = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
38
+ const { borderColor: l, bgColor: r, iconColor: a } = F[o] || F.default;
39
+ return n({ class: `flex items-start p-4 border rounded-lg ${r} ${l}` }, [
39
40
  // Icon and content
40
- s && ie(s, i),
41
+ s && ce(s, a),
41
42
  n({ class: "flex flex-col" }, [
42
- ae(e),
43
- ce(t)
43
+ de(e),
44
+ ue(t)
44
45
  ])
45
46
  ]);
46
47
  });
47
- class de extends x {
48
+ class he extends v {
48
49
  /**
49
50
  * This will declare the props for the compiler.
50
51
  *
@@ -62,48 +63,48 @@ class de extends x {
62
63
  this.prepareDestroy(), this.removeContext();
63
64
  const t = this.panel, s = this.removingClass;
64
65
  if (!s) {
65
- L.removeElement(t);
66
+ M.removeElement(t);
66
67
  return;
67
68
  }
68
- te.addClass(t, s), se.on("animationend", t, (o) => L.removeElement(t));
69
+ se.addClass(t, s), oe.on("animationend", t, (o) => M.removeElement(t));
69
70
  }
70
71
  }
71
- const ue = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), he = (e) => a({ class: "flex w-4 h-4", html: e }), me = (e) => a({ class: "flex-auto" }, e), fe = (e, t) => O({
72
+ const me = (e) => i({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), fe = (e) => i({ class: "flex w-4 h-4", html: e }), pe = (e) => i({ class: "flex-auto" }, e), ge = (e, t) => V({
72
73
  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",
73
74
  click: () => t(e)
74
75
  }, [
75
- e.icon && he(e.icon),
76
- me(e.label),
77
- e.shortcut && ue(e.shortcut)
78
- ]), ge = (e, t) => V({ class: "grid gap-2" }, [
79
- e.map((s) => fe(s, t))
80
- ]), be = (e) => n({ class: "w-full z-10" }, [
76
+ e.icon && fe(e.icon),
77
+ pe(e.label),
78
+ e.shortcut && me(e.shortcut)
79
+ ]), be = (e, t) => q({ class: "grid gap-2" }, [
80
+ e.map((s) => ge(s, t))
81
+ ]), xe = (e) => n({ class: "w-full z-10" }, [
81
82
  n({
82
83
  class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
83
- for: ["groups", (t) => ge(t, e)]
84
+ for: ["groups", (t) => be(t, e)]
84
85
  })
85
- ]), pe = ({ label: e, icon: t, toggleDropdown: s }) => m({
86
+ ]), we = ({ label: e, icon: t, toggleDropdown: s }) => m({
86
87
  cache: "button",
87
88
  class: `inline-flex items-center justify-between rounded-md border border-input
88
89
  bg-background px-2 py-2 text-sm font-medium hover:bg-muted
89
90
  focus:outline-none transition duration-150 ease-in-out`,
90
91
  click: s
91
92
  }, [
92
- e && a(e),
93
- t && b({ html: t })
94
- ]), xe = ({ onSelect: e }) => n([
95
- v(
93
+ e && i(e),
94
+ t && f({ html: t })
95
+ ]), ye = ({ onSelect: e }) => n([
96
+ w(
96
97
  "open",
97
- (t, s, o) => t ? new T({
98
+ (t, s, o) => t ? new C({
98
99
  cache: "dropdown",
99
100
  parent: o,
100
101
  button: o.button
101
102
  }, [
102
- be(e)
103
+ xe(e)
103
104
  ]) : null
104
105
  )
105
106
  ]);
106
- class ft extends x {
107
+ class yt extends v {
107
108
  /**
108
109
  * This will declare the props for the compiler.
109
110
  *
@@ -118,7 +119,7 @@ class ft extends x {
118
119
  * @returns {Data}
119
120
  */
120
121
  setData() {
121
- return new D({
122
+ return new I({
122
123
  groups: this.groups || []
123
124
  });
124
125
  }
@@ -157,33 +158,33 @@ class ft extends x {
157
158
  */
158
159
  render() {
159
160
  return n({ class: "relative" }, [
160
- pe({
161
+ we({
161
162
  label: this.label,
162
163
  icon: this.icon,
163
164
  toggleDropdown: this.toggleDropdown.bind(this)
164
165
  }),
165
- xe({ onSelect: this.handleSelect.bind(this) })
166
+ ye({ onSelect: this.handleSelect.bind(this) })
166
167
  ]);
167
168
  }
168
169
  }
169
- const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), ye = c((e, t) => W({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), ve = c((e, t) => g({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Ce = c((e, t) => g({ ...e, class: "text-sm text-destructive" }, t)), ke = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", U = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = U(o.children, t, s)), o.required && ke(o) ? {
170
+ const ve = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), Ce = c((e, t) => J({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), ke = c((e, t) => g({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Se = c((e, t) => g({ ...e, class: "text-sm text-destructive" }, t)), De = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", U = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = U(o.children, t, s)), o.required && De(o) ? {
170
171
  ...o,
171
172
  aria: {
172
173
  invalid: ["hasError"]
173
174
  },
174
175
  invalid: s,
175
176
  input: t
176
- } : o)), Se = c((e, t) => {
177
- const r = U(t, (l) => {
178
- l.target.checkValidity() && e.setError(null);
179
- }, (l) => {
180
- e.setError(l.target.validationMessage);
177
+ } : o)), Ie = c((e, t) => {
178
+ const l = U(t, (r) => {
179
+ r.target.checkValidity() && e.setError(null);
180
+ }, (r) => {
181
+ e.setError(r.target.validationMessage);
181
182
  });
182
183
  return n({
183
184
  ...e,
184
185
  class: "w-full"
185
- }, r);
186
- }), gt = w(
186
+ }, l);
187
+ }), vt = x(
187
188
  {
188
189
  /**
189
190
  * The initial state of the FormField.
@@ -204,70 +205,70 @@ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
204
205
  * @returns {object}
205
206
  */
206
207
  render() {
207
- const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, r = (l) => {
208
- this.state.error = l, this.state.hasError = !!l;
208
+ const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, l = (r) => {
209
+ this.state.error = r, this.state.hasError = !!r;
209
210
  };
210
211
  return n({ class: "flex flex-auto space-y-4" }, [
211
- we([
212
- ye({ htmlFor: t }, s),
213
- Se({
212
+ ve([
213
+ Ce({ htmlFor: t }, s),
214
+ Ie({
214
215
  id: t,
215
216
  name: e,
216
217
  value: this.state.value,
217
- setError: r
218
+ setError: l
218
219
  }, this.children),
219
- o && ve({ id: this.getId("description") }, o),
220
- n({ onState: ["error", (l) => l && Ce(l)] })
220
+ o && ke({ id: this.getId("description") }, o),
221
+ n({ onState: ["error", (r) => r && Se(r)] })
221
222
  ])
222
223
  ]);
223
224
  }
224
225
  }
225
- ), De = (e, t, s = null) => {
226
+ ), $e = (e, t, s = null) => {
226
227
  e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
227
- }, q = c(
228
- (e, t) => G({ ...e, submit: (s, o) => De(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
229
- ), bt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), pt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
230
- e.title && C({ class: "font-semibold" }, e.title),
228
+ }, R = c(
229
+ (e, t) => G({ ...e, submit: (s, o) => $e(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
230
+ ), Ct = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), kt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
231
+ e.title && S({ class: "font-semibold" }, e.title),
231
232
  ...t
232
- ])), xt = (e, t) => n({ class: "flex justify-between" }, [
233
- a({ class: "text-muted-foreground" }, e),
234
- a(t)
235
- ]), wt = (e, t) => n({ class: "flex" }, [
236
- a({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
237
- a(t)
238
- ]), Ie = ({ title: e, description: t, back: s, icon: o, options: r = [] }) => k({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
233
+ ])), St = (e, t) => n({ class: "flex justify-between" }, [
234
+ i({ class: "text-muted-foreground" }, e),
235
+ i(t)
236
+ ]), Dt = (e, t) => n({ class: "flex" }, [
237
+ i({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
238
+ i(t)
239
+ ]), Te = ({ 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" }, [
239
240
  /**
240
241
  * Back Button
241
242
  */
242
- s && h({ variant: "icon", icon: u.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (l, i) => i.close() }),
243
+ s && h({ variant: "icon", icon: u.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (r, a) => a.close() }),
243
244
  /**
244
245
  * Icon
245
246
  */
246
- o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [p(o)]),
247
+ o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [b(o)]),
247
248
  /**
248
249
  * Title and Description
249
250
  */
250
251
  n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
251
252
  n({ class: "flex flex-auto flex-col" }, [
252
- C({ class: "text-lg font-semibold m-0 truncate" }, e),
253
+ S({ class: "text-lg font-semibold m-0 truncate" }, e),
253
254
  t && n({ class: "text-sm text-muted-foreground truncate" }, t)
254
255
  ]),
255
- ...r
256
+ ...l
256
257
  ])
257
- ]), Te = c((e, t) => n({
258
+ ]), Be = c((e, t) => n({
258
259
  popover: "manual",
259
260
  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}`,
260
261
  click: (s, o) => {
261
262
  s.target === o.panel && (s.preventDefault(), s.stopPropagation(), o.state.open = !1);
262
263
  }
263
264
  }, [
264
- q({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col space-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
265
- Ie(e),
265
+ R({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col space-y-4", submit: (s, o) => e.onSubmit && e.onSubmit(o) }, [
266
+ Te(e),
266
267
  n({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
267
- M({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
268
+ P({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
268
269
  ])
269
- ])), $e = (e) => H.render(e, app.root);
270
- class yt extends x {
270
+ ])), Ae = (e) => Y.render(e, app.root);
271
+ class It extends v {
271
272
  /**
272
273
  * This will declare the props for the compiler.
273
274
  *
@@ -283,16 +284,16 @@ class yt extends x {
283
284
  */
284
285
  render() {
285
286
  const t = this.getMainClass(), s = this.title || "", o = this.description || null;
286
- return Te(
287
+ return Be(
287
288
  {
288
289
  class: t,
289
290
  title: s,
290
291
  description: o,
291
292
  options: this.headerOptions(),
292
293
  buttons: this.getButtons(),
293
- onSubmit: (r) => {
294
- let l = !0;
295
- this.onSubmit && (l = this.onSubmit(r)), l !== !1 && this.destroy();
294
+ onSubmit: (l) => {
295
+ let r = !0;
296
+ this.onSubmit && (r = this.onSubmit(l)), r !== !1 && this.destroy();
296
297
  },
297
298
  icon: this.icon,
298
299
  back: this.back ?? !1,
@@ -398,7 +399,7 @@ class yt extends x {
398
399
  * @returns {void}
399
400
  */
400
401
  open() {
401
- $e(this), this.showModal();
402
+ Ae(this), this.showModal();
402
403
  }
403
404
  /**
404
405
  * This will destroy the modal.
@@ -427,7 +428,7 @@ class yt extends x {
427
428
  this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto";
428
429
  }
429
430
  }
430
- const F = {
431
+ const N = {
431
432
  info: {
432
433
  bgColor: "bg-muted/10",
433
434
  borderColor: "border-blue-500",
@@ -453,18 +454,18 @@ const F = {
453
454
  borderColor: "border",
454
455
  iconColor: "text-muted-foreground"
455
456
  }
456
- }, Ae = (e) => k({ class: "flex justify-center" }, [
457
- J({ class: "text-lg font-bold mb-0" }, e)
458
- ]), Be = c(({ href: e, class: t }, s) => Y({
457
+ }, Pe = (e) => D({ class: "flex justify-center" }, [
458
+ K({ class: "text-lg font-bold mb-0" }, e)
459
+ ]), Me = c(({ href: e, class: t }, s) => H({
459
460
  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}`,
460
461
  href: e,
461
462
  role: "alert"
462
- }, s)), Me = c(({ close: e, class: t }, s) => n({
463
+ }, s)), Le = c(({ close: e, class: t }, s) => n({
463
464
  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}`,
464
465
  click: () => e(),
465
466
  role: "alert"
466
467
  }, s));
467
- class Le extends de {
468
+ class Fe extends he {
468
469
  /**
469
470
  * This will declare the props for the compiler.
470
471
  *
@@ -487,14 +488,14 @@ class Le extends de {
487
488
  * @returns {object}
488
489
  */
489
490
  render() {
490
- const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, l = this.getChildren(o);
491
- return r ? Be({
492
- href: r,
491
+ const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), l = this.href || null, r = this.getChildren(o);
492
+ return l ? Me({
493
+ href: l,
493
494
  class: `${t} ${s}`
494
- }, l) : Me({
495
+ }, r) : Le({
495
496
  close: this.close.bind(this),
496
497
  class: `${t} ${s}`
497
- }, l);
498
+ }, r);
498
499
  }
499
500
  /**
500
501
  * This will be called after the component is set up.
@@ -503,7 +504,7 @@ class Le extends de {
503
504
  */
504
505
  afterSetup() {
505
506
  const t = this.duration;
506
- t !== "infinite" && (this.timer = new ne(t, this.close.bind(this)), this.timer.start());
507
+ t !== "infinite" && (this.timer = new re(t, this.close.bind(this)), this.timer.start());
507
508
  }
508
509
  /**
509
510
  * This will get the style properties based on the notification type.
@@ -512,7 +513,7 @@ class Le extends de {
512
513
  */
513
514
  getTypeStyles() {
514
515
  const t = this.type || "default";
515
- return F[t] || F.default;
516
+ return N[t] || N.default;
516
517
  }
517
518
  /**
518
519
  * This will get the buttons for the notification.
@@ -536,13 +537,13 @@ class Le extends de {
536
537
  getChildren(t) {
537
538
  return [
538
539
  n({ class: "flex items-start" }, [
539
- this.icon && b({ class: `mr-4 ${t}`, html: this.icon }),
540
+ this.icon && f({ class: `mr-4 ${t}`, html: this.icon }),
540
541
  n({ class: "flex flex-auto flex-col" }, [
541
542
  n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
542
- this.title && Ae(this.title)
543
+ this.title && Pe(this.title)
543
544
  ]),
544
545
  g({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
545
- (this.primary || this.secondary) && M({ class: "margin-top-24 flex align-center" }, this.getButtons())
546
+ (this.primary || this.secondary) && P({ class: "margin-top-24 flex align-center" }, this.getButtons())
546
547
  ])
547
548
  ]),
548
549
  h({
@@ -563,8 +564,8 @@ class Le extends de {
563
564
  t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
564
565
  }
565
566
  }
566
- let Pe = 0;
567
- class vt extends x {
567
+ let Ne = 0;
568
+ class $t extends v {
568
569
  /**
569
570
  * This will render the component.
570
571
  *
@@ -572,11 +573,11 @@ class vt extends x {
572
573
  */
573
574
  render() {
574
575
  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" }, [
575
- new le({
576
+ new ae({
576
577
  cache: "list",
577
578
  key: "id",
578
579
  role: "list",
579
- rowItem: (t) => new Le(t)
580
+ rowItem: (t) => new Fe(t)
580
581
  })
581
582
  ]);
582
583
  }
@@ -587,7 +588,7 @@ class vt extends x {
587
588
  * @returns {void}
588
589
  */
589
590
  addNotice(t = {}) {
590
- t.id = Pe++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
591
+ t.id = Ne++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
591
592
  }
592
593
  /**
593
594
  * This will remove a notification.
@@ -599,26 +600,26 @@ class vt extends x {
599
600
  this.list.delete(t.id);
600
601
  }
601
602
  }
602
- const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
603
+ const z = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => m({
603
604
  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',
604
605
  onState: ["method", { active: e }],
605
606
  dataSet: ["method", ["state", e, "active"]],
606
- click: (o, { state: r }) => {
607
- r.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Fe(e);
607
+ click: (o, { state: l }) => {
608
+ l.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), ze(e);
608
609
  }
609
610
  }, [
610
- p(s),
611
- a(t)
612
- ])), Fe = (e) => {
611
+ b(s),
612
+ i(t)
613
+ ])), ze = (e) => {
613
614
  var o;
614
615
  const t = document.documentElement;
615
- if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), N && !N("(prefers-color-scheme: " + e + ")").matches) {
616
+ if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + e + ")").matches) {
616
617
  t.classList.add(e);
617
618
  return;
618
619
  }
619
620
  const s = e === "light" ? "dark" : "light";
620
621
  t.classList.remove(s);
621
- }, Ct = I(
622
+ }, Tt = $(
622
623
  {
623
624
  /**
624
625
  * This will render the component.
@@ -628,9 +629,9 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
628
629
  render() {
629
630
  return n({ class: "flex flex-auto flex-col" }, [
630
631
  n({ class: "grid grid-cols-3 gap-4" }, [
631
- $({ label: "System", value: "system", icon: u.adjustments.horizontal }),
632
- $({ label: "Light", value: "light", icon: u.sun }),
633
- $({ label: "Dark", value: "dark", icon: u.moon })
632
+ T({ label: "System", value: "system", icon: u.adjustments.horizontal }),
633
+ T({ label: "Light", value: "light", icon: u.sun }),
634
+ T({ label: "Dark", value: "dark", icon: u.moon })
634
635
  ])
635
636
  ]);
636
637
  },
@@ -645,7 +646,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
645
646
  };
646
647
  }
647
648
  }
648
- ), kt = w(
649
+ ), Bt = x(
649
650
  {
650
651
  /**
651
652
  * The initial state of the Toggle.
@@ -679,7 +680,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
679
680
  s.toggle("active"), this.checkbox.checked = s.active, this.change && this.change(s.active, t, this);
680
681
  }
681
682
  }, [
682
- K({
683
+ Q({
683
684
  cache: "checkbox",
684
685
  class: "opacity-0 absolute top-0 left-0 bottom-0 right-0 w-full h-full",
685
686
  /**
@@ -690,49 +691,49 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
690
691
  bind: this.bind,
691
692
  required: this.required
692
693
  }),
693
- a({
694
+ i({
694
695
  class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
695
696
  onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
696
697
  })
697
698
  ]);
698
699
  }
699
700
  }
700
- ), y = {
701
+ ), k = {
701
702
  ONLINE: "online",
702
703
  OFFLINE: "offline",
703
704
  BUSY: "busy",
704
705
  AWAY: "away"
705
- }, f = {
706
+ }, p = {
706
707
  ONLINE: "bg-green-500",
707
708
  OFFLINE: "bg-gray-500",
708
709
  BUSY: "bg-red-500",
709
710
  AWAY: "bg-yellow-500"
710
- }, Ne = (e = "") => (e = e.toUpperCase(), f[e] || f.OFFLINE), St = (e) => n({
711
- class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ne(e)}`
712
- }), Dt = ({ propName: e = "status" } = {}) => n({
711
+ }, Ee = (e = "") => (e = e.toUpperCase(), p[e] || p.OFFLINE), At = (e) => n({
712
+ class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ee(e)}`
713
+ }), Pt = ({ propName: e = "status" } = {}) => n({
713
714
  class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
714
715
  onSet: [e, {
715
- [f.ONLINE]: y.ONLINE,
716
- [f.OFFLINE]: y.OFFLINE,
717
- [f.BUSY]: y.BUSY,
718
- [f.AWAY]: y.AWAY
716
+ [p.ONLINE]: k.ONLINE,
717
+ [p.OFFLINE]: k.OFFLINE,
718
+ [p.BUSY]: k.BUSY,
719
+ [p.AWAY]: k.AWAY
719
720
  }]
720
- }), ze = (e, t) => Y(
721
+ }), je = (e, t) => H(
721
722
  {
722
723
  href: e,
723
724
  "aria-current": t === "Breadcrumb" && "page",
724
725
  // Only set aria-current on the last item
725
726
  class: "text-muted-foreground font-medium hover:text-foreground"
726
727
  },
727
- [a(t)]
728
- ), Ee = () => p({
728
+ [i(t)]
729
+ ), Oe = () => b({
729
730
  class: "mx-3 text-muted-foreground",
730
731
  "aria-hidden": !0,
731
732
  size: "xs"
732
- }, u.chevron.single.right), je = (e) => n({ class: "flex items-center" }, [
733
- e.href ? ze(e.href, e.label) : a(e.label),
734
- e.separator && Ee()
735
- ]), It = I(
733
+ }, u.chevron.single.right), Ve = (e) => n({ class: "flex items-center" }, [
734
+ e.href ? je(e.href, e.label) : i(e.label),
735
+ e.separator && Oe()
736
+ ]), Mt = $(
736
737
  {
737
738
  /**
738
739
  * Set initial data
@@ -740,7 +741,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
740
741
  * @returns {Data}
741
742
  */
742
743
  setData() {
743
- return new D({
744
+ return new I({
744
745
  // @ts-ignore
745
746
  items: this.items || []
746
747
  });
@@ -752,7 +753,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
752
753
  */
753
754
  render() {
754
755
  const e = this.data.items.length - 1;
755
- return Q(
756
+ return X(
756
757
  {
757
758
  "aria-label": "Breadcrumb",
758
759
  class: "flex items-center space-x-1 text-sm"
@@ -761,7 +762,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
761
762
  n({
762
763
  role: "list",
763
764
  class: "flex items-center",
764
- for: ["items", (t, s) => je({
765
+ for: ["items", (t, s) => Ve({
765
766
  href: t.href,
766
767
  label: t.label,
767
768
  separator: s < e
@@ -771,7 +772,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
771
772
  );
772
773
  }
773
774
  }
774
- ), z = {
775
+ ), E = {
775
776
  xs: "h-1 w-1",
776
777
  sm: "h-2 w-2",
777
778
  md: "h-4 w-4",
@@ -780,21 +781,21 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
780
781
  "2xl": "h-16 w-16",
781
782
  "3xl": "h-24 w-24",
782
783
  default: "h-4 w-4"
783
- }, Oe = (e) => z[e] || z.default, Ve = ({ index: e, size: t }) => n({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
784
- a({
784
+ }, qe = (e) => E[e] || E.default, He = ({ index: e, size: t }) => n({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
785
+ i({
785
786
  class: "block w-full h-full rounded-full transition-colors",
786
787
  onSet: ["activeIndex", {
787
788
  "bg-primary": e,
788
789
  "shadow-md": e
789
790
  }],
790
- click: (s, { data: o, onClick: r }) => {
791
- o.activeIndex = e, r && r(e);
791
+ click: (s, { data: o, onClick: l }) => {
792
+ o.activeIndex = e, l && l(e);
792
793
  }
793
794
  })
794
- ]), Ye = (e, t) => Array.from({ length: e }, (s, o) => Ve({
795
+ ]), Ye = (e, t) => Array.from({ length: e }, (s, o) => He({
795
796
  index: o,
796
797
  size: t
797
- })), Tt = I(
798
+ })), Lt = $(
798
799
  {
799
800
  /**
800
801
  * Defines component data (props).
@@ -802,7 +803,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
802
803
  * @returns {Data}
803
804
  */
804
805
  setData() {
805
- return new D({
806
+ return new I({
806
807
  // @ts-ignore
807
808
  count: this.count || 4,
808
809
  // total dots
@@ -816,7 +817,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
816
817
  * @returns {object}
817
818
  */
818
819
  render() {
819
- const e = this.gap || "gap-2", t = Oe(this.size || "sm"), s = Ye(this.data.count, t);
820
+ const e = this.gap || "gap-2", t = qe(this.size || "sm"), s = Ye(this.data.count, t);
820
821
  return n(
821
822
  { class: "flex justify-center items-center py-2" },
822
823
  [
@@ -825,37 +826,37 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
825
826
  );
826
827
  }
827
828
  }
828
- ), He = ({ toggleDropdown: e }) => m(
829
+ ), Ue = ({ toggleDropdown: e }) => m(
829
830
  {
830
831
  cache: "button",
831
832
  class: "relative z-[2] inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-muted h-10 px-4 py-2 justify-between",
832
833
  click: e
833
834
  },
834
835
  [
835
- a({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
836
- b({ html: u.chevron.upDown })
836
+ i({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
837
+ f({ html: u.chevron.upDown })
837
838
  ]
838
- ), Ue = (e, t, s) => O({
839
+ ), Re = (e, t, s) => V({
839
840
  class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
840
841
  click: () => t(e),
841
842
  onState: [s, "selectedValue", { "bg-secondary": e.value }]
842
843
  }, [
843
- e.icon && a({ class: "mr-2 flex items-baseline" }, [p({ size: "xs" }, e.icon)]),
844
- a({ class: "text-base font-normal" }, e.label)
845
- ]), qe = (e, t) => n({ class: "w-full border rounded-md" }, [
846
- V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Ue(s, e, t)] })
847
- ]), _e = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
848
- v(
844
+ e.icon && i({ class: "mr-2 flex items-baseline" }, [b({ size: "xs" }, e.icon)]),
845
+ i({ class: "text-base font-normal" }, e.label)
846
+ ]), _e = (e, t) => n({ class: "w-full border rounded-md" }, [
847
+ q({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Re(s, e, t)] })
848
+ ]), We = ({ onSelect: e, state: t }) => n({ class: "flex flex-auto flex-col" }, [
849
+ w(
849
850
  "open",
850
- (s, o, r) => s ? new T({
851
+ (s, o, l) => s ? new C({
851
852
  cache: "dropdown",
852
- parent: r,
853
- button: r.button
853
+ parent: l,
854
+ button: l.button
854
855
  }, [
855
- qe(e, t)
856
+ _e(e, t)
856
857
  ]) : null
857
858
  )
858
- ]), $t = I(
859
+ ]), Ft = $(
859
860
  {
860
861
  /**
861
862
  * This will set up the data.
@@ -863,7 +864,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
863
864
  * @returns {Data}
864
865
  */
865
866
  setData() {
866
- return new D({
867
+ return new I({
867
868
  // @ts-ignore
868
869
  items: this.items || []
869
870
  });
@@ -936,8 +937,8 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
936
937
  const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
937
938
  return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
938
939
  // @ts-ignore
939
- He({ toggleDropdown: this.toggleDropdown.bind(this) }),
940
- _e({
940
+ Ue({ toggleDropdown: this.toggleDropdown.bind(this) }),
941
+ We({
941
942
  // @ts-ignore
942
943
  state: this.state,
943
944
  // @ts-ignore
@@ -945,7 +946,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
945
946
  }),
946
947
  // Hidden required input for form validation
947
948
  // @ts-ignore
948
- this.required && S({
949
+ this.required && y({
949
950
  class: "opacity-0 absolute top-0 left-0 z-[1]",
950
951
  type: "text",
951
952
  // @ts-ignore
@@ -963,20 +964,20 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
963
964
  click: t,
964
965
  icon: e,
965
966
  "aria-label": s
966
- }), Re = ({ click: e }) => _({
967
+ }), Je = ({ click: e }) => _({
967
968
  icon: u.circleMinus,
968
969
  click: e,
969
970
  ariaLabel: "Decrement"
970
- }), We = ({ click: e }) => _({
971
+ }), Ge = ({ click: e }) => _({
971
972
  icon: u.circlePlus,
972
973
  click: e,
973
974
  ariaLabel: "Increment"
974
- }), Ge = ({ bind: e, min: t, max: s, readonly: o = !1 }) => X(({ state: r }) => S({
975
- value: ["[[count]]", r],
975
+ }), Ke = ({ bind: e, min: t, max: s, readonly: o = !1 }) => Z(({ state: l }) => y({
976
+ value: ["[[count]]", l],
976
977
  bind: e,
977
- blur: (l, { state: i }) => {
978
- let d = parseInt(l.target.value, 10);
979
- isNaN(d) && (d = t ?? 0), t !== void 0 && (d = Math.max(d, t)), s !== void 0 && (d = Math.min(d, s)), i.count = d;
978
+ blur: (r, { state: a }) => {
979
+ let d = parseInt(r.target.value, 10);
980
+ isNaN(d) && (d = t ?? 0), t !== void 0 && (d = Math.max(d, t)), s !== void 0 && (d = Math.min(d, s)), a.count = d;
980
981
  },
981
982
  class: "flex flex-auto text-lg font-medium bg-transparent text-center border min-w-0",
982
983
  readonly: o,
@@ -984,7 +985,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
984
985
  max: s,
985
986
  type: "number",
986
987
  "aria-label": "Counter"
987
- })), At = w(
988
+ })), Nt = x(
988
989
  {
989
990
  /**
990
991
  * Initial state for the counter component.
@@ -1007,46 +1008,46 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
1007
1008
  render() {
1008
1009
  const e = this.class ?? "";
1009
1010
  return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
1010
- Re({ click: () => this.state.decrement("count") }),
1011
- Ge({
1011
+ Je({ click: () => this.state.decrement("count") }),
1012
+ Ke({
1012
1013
  bind: this.bind,
1013
1014
  readonly: this.readonly,
1014
1015
  min: this.min,
1015
1016
  max: this.max
1016
1017
  }),
1017
- We({ click: () => this.state.increment("count") })
1018
+ Ge({ click: () => this.state.increment("count") })
1018
1019
  ]);
1019
1020
  }
1020
1021
  }
1021
- ), Je = ({ bind: e, required: t }) => S({
1022
+ ), Qe = ({ bind: e, required: t }) => y({
1022
1023
  cache: "input",
1023
1024
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1024
1025
  bind: e,
1025
1026
  required: t
1026
- }), Ke = ({ bind: e, required: t, toggleOpen: s }) => m({
1027
+ }), Xe = ({ bind: e, required: t, toggleOpen: s }) => m({
1027
1028
  class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
1028
1029
  click: s
1029
1030
  }, [
1030
- Je({ bind: e, required: t }),
1031
- a({
1032
- onState: ["selectedDate", (o) => o ? B.format("standard", o) : "Pick a date"]
1031
+ Qe({ bind: e, required: t }),
1032
+ i({
1033
+ onState: ["selectedDate", (o) => o ? A.format("standard", o) : "Pick a date"]
1033
1034
  }),
1034
- b({ html: u.calendar.days })
1035
- ]), Qe = ({ handleDateSelect: e, blockPriorDates: t }) => v(
1035
+ f({ html: u.calendar.days })
1036
+ ]), Ze = ({ handleDateSelect: e, blockPriorDates: t }) => w(
1036
1037
  "open",
1037
- (s, o, r) => s ? new T({
1038
+ (s, o, l) => s ? new C({
1038
1039
  cache: "dropdown",
1039
- parent: r,
1040
- button: r.panel,
1040
+ parent: l,
1041
+ button: l.panel,
1041
1042
  size: "fit"
1042
1043
  }, [
1043
- new oe({
1044
- selectedDate: r.state.selectedDate,
1044
+ new ne({
1045
+ selectedDate: l.state.selectedDate,
1045
1046
  selectedCallBack: e,
1046
1047
  blockPriorDates: t
1047
1048
  })
1048
1049
  ]) : null
1049
- ), Bt = w(
1050
+ ), zt = x(
1050
1051
  {
1051
1052
  /**
1052
1053
  * The initial state of the DatePicker.
@@ -1078,71 +1079,148 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
1078
1079
  this.state.selectedDate = s, this.state.open = !1, this.input.value = s, typeof this.onChange == "function" && this.onChange(s);
1079
1080
  };
1080
1081
  return n({ class: "relative w-full max-w-[320px]" }, [
1081
- Ke({
1082
+ Xe({
1083
+ toggleOpen: e,
1084
+ bind: this.bind,
1085
+ required: this.required
1086
+ }),
1087
+ Ze({
1088
+ handleDateSelect: t,
1089
+ blockPriorDates: this.blockPriorDates || !1
1090
+ })
1091
+ ]);
1092
+ }
1093
+ }
1094
+ ), et = ({ bind: e, required: t }) => y({
1095
+ cache: "input",
1096
+ class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1097
+ bind: e,
1098
+ required: t
1099
+ }), tt = ({ bind: e, required: t, toggleOpen: s }) => m({
1100
+ class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
1101
+ click: s
1102
+ }, [
1103
+ et({ bind: e, required: t }),
1104
+ i(L.date("[[start]]", "Start Date")),
1105
+ i(" - "),
1106
+ i(L.date("[[end]]", "End Date")),
1107
+ f({ html: u.calendar.days })
1108
+ ]), st = ({ handleDateSelect: e, blockPriorDates: t }) => w(
1109
+ "open",
1110
+ (s, o, l) => s ? new C({
1111
+ cache: "dropdown",
1112
+ parent: l,
1113
+ button: l.panel,
1114
+ size: "fit"
1115
+ }, [
1116
+ new le({
1117
+ startDate: l.state.start,
1118
+ endDate: l.state.end,
1119
+ onRangeSelect: e,
1120
+ blockPriorDates: t
1121
+ })
1122
+ ]) : null
1123
+ ), Et = x(
1124
+ {
1125
+ /**
1126
+ * The initial state of the DateRangePicker.
1127
+ *
1128
+ * @member {object} state
1129
+ */
1130
+ state() {
1131
+ return {
1132
+ start: this.start ?? null,
1133
+ end: this.end ?? null,
1134
+ open: !1
1135
+ };
1136
+ },
1137
+ /**
1138
+ * This is added to check the input after the component is rendered.
1139
+ * to see if the bind updated the input value.
1140
+ *
1141
+ * @returns {void}
1142
+ */
1143
+ after() {
1144
+ if (this.input.value) {
1145
+ const e = this.input.value.split("-");
1146
+ this.state.start = e[0], this.state.end = e[1];
1147
+ }
1148
+ },
1149
+ /**
1150
+ * Renders the DatePicker component.
1151
+ *
1152
+ * @returns {object}
1153
+ */
1154
+ render() {
1155
+ const e = (s, { state: o }) => o.toggle("open"), t = (s, o) => {
1156
+ this.state.start = s, this.state.end = o, this.state.open = !1, this.input.value = `${s}-${o}`, typeof this.onChange == "function" && this.onChange({ start: s, end: o });
1157
+ };
1158
+ return n({ class: "relative w-full max-w-[320px]" }, [
1159
+ tt({
1082
1160
  toggleOpen: e,
1083
1161
  bind: this.bind,
1084
1162
  required: this.required
1085
1163
  }),
1086
- Qe({
1164
+ st({
1087
1165
  handleDateSelect: t,
1088
1166
  blockPriorDates: this.blockPriorDates || !1
1089
1167
  })
1090
1168
  ]);
1091
1169
  }
1092
1170
  }
1093
- ), Mt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => Z([
1094
- new re({
1171
+ ), jt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => ee([
1172
+ new ie({
1095
1173
  dateTime: e,
1096
1174
  filter: s || ((o) => {
1097
- const r = B.getLocalTime(o, !0, !1, t);
1098
- return B.getTimeFrame(r);
1175
+ const l = A.getLocalTime(o, !0, !1, t);
1176
+ return A.getTimeFrame(l);
1099
1177
  })
1100
1178
  })
1101
1179
  ]);
1102
- function Xe({ bind: e, required: t }) {
1103
- return S({
1180
+ function ot({ bind: e, required: t }) {
1181
+ return y({
1104
1182
  cache: "input",
1105
1183
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1106
1184
  bind: e,
1107
1185
  required: t
1108
1186
  });
1109
1187
  }
1110
- function Ze({ bind: e, required: t, toggleOpen: s }) {
1188
+ function nt({ bind: e, required: t, toggleOpen: s }) {
1111
1189
  return m(
1112
1190
  {
1113
1191
  class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
1114
1192
  click: s
1115
1193
  },
1116
1194
  [
1117
- Xe({ bind: e, required: t }),
1118
- a({
1195
+ ot({ bind: e, required: t }),
1196
+ i({
1119
1197
  onState: ["selectedTime", (o) => o || "Pick a time"]
1120
1198
  }),
1121
- b({ html: u.clock })
1199
+ f({ html: u.clock })
1122
1200
  ]
1123
1201
  );
1124
1202
  }
1125
- function A({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: r = !1 }) {
1203
+ function B({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: l = !1 }) {
1126
1204
  return n(
1127
1205
  { class: "flex flex-col max-h-[200px] overflow-y-auto" },
1128
- e.map((l) => {
1129
- let i = r ? l.toString().padStart(2, "0") : l.toString();
1206
+ e.map((r) => {
1207
+ let a = l ? r.toString().padStart(2, "0") : r.toString();
1130
1208
  return m({
1131
- text: i,
1209
+ text: a,
1132
1210
  class: "hover:bg-muted/50 rounded-md px-2 py-1",
1133
- click: () => t({ [o]: i }),
1134
- onState: [s, o, { "bg-muted": i }]
1211
+ click: () => t({ [o]: a }),
1212
+ onState: [s, o, { "bg-muted": a }]
1135
1213
  });
1136
1214
  })
1137
1215
  );
1138
1216
  }
1139
- function et({ handleTimeSelect: e }) {
1217
+ function lt({ handleTimeSelect: e }) {
1140
1218
  return n(
1141
1219
  { class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" },
1142
1220
  [
1143
- v(
1221
+ w(
1144
1222
  "open",
1145
- (t, s, o) => t ? new T(
1223
+ (t, s, o) => t ? new C(
1146
1224
  {
1147
1225
  cache: "dropdown",
1148
1226
  parent: o,
@@ -1157,23 +1235,23 @@ function et({ handleTimeSelect: e }) {
1157
1235
  { class: "grid grid-cols-3 gap-2 p-4 text-center max-h-[220px] min-w-[240px]" },
1158
1236
  [
1159
1237
  // Hours column
1160
- A({
1161
- items: Array.from({ length: 12 }, (r, l) => l + 1),
1238
+ B({
1239
+ items: Array.from({ length: 12 }, (l, r) => r + 1),
1162
1240
  handleTimeSelect: e,
1163
1241
  state: o.state,
1164
1242
  stateValue: "hour",
1165
1243
  pad: !0
1166
1244
  }),
1167
1245
  // Minutes column
1168
- A({
1169
- items: Array.from({ length: 60 }, (r, l) => l),
1246
+ B({
1247
+ items: Array.from({ length: 60 }, (l, r) => r),
1170
1248
  handleTimeSelect: e,
1171
1249
  state: o.state,
1172
1250
  stateValue: "minute",
1173
1251
  pad: !0
1174
1252
  }),
1175
1253
  // AM/PM column
1176
- A({
1254
+ B({
1177
1255
  items: ["AM", "PM"],
1178
1256
  handleTimeSelect: e,
1179
1257
  state: o.state,
@@ -1189,20 +1267,20 @@ function et({ handleTimeSelect: e }) {
1189
1267
  ]
1190
1268
  );
1191
1269
  }
1192
- function E(e) {
1270
+ function j(e) {
1193
1271
  if (!e)
1194
1272
  return { hour: null, minute: null, meridian: null };
1195
1273
  const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
1196
1274
  if (!s)
1197
1275
  return { hour: null, minute: null, meridian: null };
1198
- let [, o, r, , l] = s, i = parseInt(o, 10), d = parseInt(r, 10);
1199
- return i < 0 || i > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (l ? (l = l.toUpperCase(), l === "PM" && i < 12 ? i += 12 : l === "AM" && i === 12 && (i = 12)) : i === 0 ? (l = "AM", i = 12) : i < 12 ? l = "AM" : i === 12 ? l = "PM" : (l = "PM", i -= 12), {
1200
- hour: i.toString().padStart(2, "0"),
1276
+ let [, o, l, , r] = s, a = parseInt(o, 10), d = parseInt(l, 10);
1277
+ return a < 0 || a > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (r ? (r = r.toUpperCase(), r === "PM" && a < 12 ? a += 12 : r === "AM" && a === 12 && (a = 12)) : a === 0 ? (r = "AM", a = 12) : a < 12 ? r = "AM" : a === 12 ? r = "PM" : (r = "PM", a -= 12), {
1278
+ hour: a.toString().padStart(2, "0"),
1201
1279
  minute: d.toString().padStart(2, "0"),
1202
- meridian: l
1280
+ meridian: r
1203
1281
  });
1204
1282
  }
1205
- const Lt = w(
1283
+ const Ot = x(
1206
1284
  {
1207
1285
  /**
1208
1286
  * The initial shallow state of the TimePicker.
@@ -1210,7 +1288,7 @@ const Lt = w(
1210
1288
  * @member {object} state
1211
1289
  */
1212
1290
  state() {
1213
- const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = E(e);
1291
+ const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = j(e);
1214
1292
  return {
1215
1293
  selectedTime: e,
1216
1294
  open: !1,
@@ -1226,7 +1304,7 @@ const Lt = w(
1226
1304
  */
1227
1305
  after() {
1228
1306
  if (this.input.value) {
1229
- const { hour: e, minute: t, meridian: s } = E(this.input.value);
1307
+ const { hour: e, minute: t, meridian: s } = j(this.input.value);
1230
1308
  this.state.set({
1231
1309
  hour: e,
1232
1310
  minute: t,
@@ -1241,32 +1319,32 @@ const Lt = w(
1241
1319
  * @returns {object}
1242
1320
  */
1243
1321
  render() {
1244
- const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: r }) => {
1245
- if (s && (this.state.hour = s), o && (this.state.minute = o), r && (this.state.meridian = r), this.state.hour && this.state.minute && this.state.meridian) {
1246
- const l = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
1247
- this.state.selectedTime = l, this.state.open = !1, this.input.value = l, typeof this.change == "function" && this.change(l);
1322
+ const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: l }) => {
1323
+ 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) {
1324
+ const r = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
1325
+ this.state.selectedTime = r, this.state.open = !1, this.input.value = r, typeof this.change == "function" && this.change(r);
1248
1326
  }
1249
1327
  };
1250
1328
  return n(
1251
1329
  { class: "relative w-full max-w-[320px]" },
1252
1330
  [
1253
- Ze({
1331
+ nt({
1254
1332
  toggleOpen: e,
1255
1333
  bind: this.bind,
1256
1334
  required: this.required
1257
1335
  }),
1258
- et({
1336
+ lt({
1259
1337
  handleTimeSelect: t
1260
1338
  })
1261
1339
  ]
1262
1340
  );
1263
1341
  }
1264
1342
  }
1265
- ), tt = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
1266
- p({ size: "lg" }, e)
1267
- ]), st = ({ title: e }) => k({ class: "flex flex-auto items-center" }, [
1268
- C({ class: "text-lg font-semibold" }, e)
1269
- ]), ot = c((e, t) => ee(
1343
+ ), rt = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
1344
+ b({ size: "lg" }, e)
1345
+ ]), at = ({ title: e }) => D({ class: "flex flex-auto items-center" }, [
1346
+ S({ class: "text-lg font-semibold" }, e)
1347
+ ]), it = c((e, t) => te(
1270
1348
  {
1271
1349
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
1272
1350
  rounded-lg flex flex-auto flex-col
@@ -1277,18 +1355,18 @@ const Lt = w(
1277
1355
  [
1278
1356
  n({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
1279
1357
  // Icon and content
1280
- e.icon && tt(e.icon, e.iconColor),
1358
+ e.icon && rt(e.icon, e.iconColor),
1281
1359
  n({ class: "flex flex-auto flex-col gap-4" }, [
1282
1360
  n({ class: "flex flex-auto flex-col space-y-2" }, [
1283
- st(e),
1361
+ at(e),
1284
1362
  e.description && g({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
1285
1363
  n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
1286
1364
  ]),
1287
- e.buttons && M({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
1365
+ e.buttons && P({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
1288
1366
  ])
1289
1367
  ])
1290
1368
  ]
1291
- )), nt = (e) => H.render(e, app.root), j = {
1369
+ )), ct = (e) => Y.render(e, app.root), O = {
1292
1370
  info: {
1293
1371
  borderColor: "border-blue-500",
1294
1372
  bgColor: "bg-muted/10",
@@ -1315,7 +1393,7 @@ const Lt = w(
1315
1393
  iconColor: "text-muted-foreground"
1316
1394
  }
1317
1395
  };
1318
- class lt extends x {
1396
+ class dt extends v {
1319
1397
  /**
1320
1398
  * This will declare the props for the compiler.
1321
1399
  *
@@ -1332,13 +1410,13 @@ class lt extends x {
1332
1410
  render() {
1333
1411
  const t = (d) => {
1334
1412
  d.target === this.panel && this.close();
1335
- }, { borderColor: s, bgColor: o, iconColor: r } = j[this.type] || j.default, l = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
1336
- return ot({
1337
- class: l,
1338
- title: i,
1413
+ }, { borderColor: s, bgColor: o, iconColor: l } = O[this.type] || O.default, r = `${this.getMainClass()} ${o} ${s}`, a = this.title || "Dialog Title";
1414
+ return it({
1415
+ class: r,
1416
+ title: a,
1339
1417
  click: t,
1340
1418
  icon: this.icon,
1341
- iconColor: r,
1419
+ iconColor: l,
1342
1420
  description: this.description,
1343
1421
  buttons: this.getButtons()
1344
1422
  }, this.children);
@@ -1377,7 +1455,7 @@ class lt extends x {
1377
1455
  * @returns {void}
1378
1456
  */
1379
1457
  open() {
1380
- nt(this), this.panel.showModal(), this.state.open = !0;
1458
+ ct(this), this.panel.showModal(), this.state.open = !0;
1381
1459
  }
1382
1460
  /**
1383
1461
  * This will close the modal.
@@ -1388,7 +1466,7 @@ class lt extends x {
1388
1466
  this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
1389
1467
  }
1390
1468
  }
1391
- class Pt extends lt {
1469
+ class Vt extends dt {
1392
1470
  /**
1393
1471
  * This will declare the props for the compiler.
1394
1472
  *
@@ -1418,16 +1496,16 @@ class Pt extends lt {
1418
1496
  this.confirmed && this.confirmed(), this.close();
1419
1497
  }
1420
1498
  }
1421
- const Ft = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
1422
- q({ class: "flex flex-auto flex-col" }, [
1499
+ const qt = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
1500
+ R({ class: "flex flex-auto flex-col" }, [
1423
1501
  n({ class: "flex flex-auto flex-col space-y-4" }, [
1424
1502
  n({ class: "flex flex-auto items-center justify-center" }, [
1425
1503
  e.icon && n({ class: "w-16 h-16 mb-2 text-primary" }, [
1426
- p(e.icon)
1504
+ b(e.icon)
1427
1505
  ])
1428
1506
  ]),
1429
- k({ class: "py-4 text-center" }, [
1430
- C({ class: "text-xl font-bold" }, e.title),
1507
+ D({ class: "py-4 text-center" }, [
1508
+ S({ class: "text-xl font-bold" }, e.title),
1431
1509
  g({ class: "pb-8 text-muted-foreground" }, e.description || ""),
1432
1510
  ...t
1433
1511
  ])
@@ -1435,44 +1513,45 @@ const Ft = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
1435
1513
  ])
1436
1514
  ]));
1437
1515
  export {
1438
- mt as A,
1439
- It as B,
1440
- wt as C,
1441
- de as D,
1442
- Pt as E,
1443
- we as F,
1444
- ot as G,
1445
- lt as H,
1446
- Ft as I,
1447
- yt as M,
1448
- vt as N,
1449
- We as P,
1450
- xt as S,
1451
- Ct as T,
1452
- fe as a,
1453
- ft as b,
1454
- be as c,
1455
- ye as d,
1456
- ve as e,
1457
- Ce as f,
1458
- Se as g,
1459
- gt as h,
1460
- q as i,
1461
- bt as j,
1462
- pt as k,
1463
- Le as l,
1464
- kt as m,
1465
- St as n,
1466
- Dt as o,
1467
- y as p,
1468
- f as q,
1469
- Ne as r,
1470
- Tt as s,
1471
- $t as t,
1472
- Re as u,
1473
- Ge as v,
1474
- At as w,
1475
- Bt as x,
1476
- Mt as y,
1477
- Lt as z
1516
+ wt as A,
1517
+ Mt as B,
1518
+ Dt as C,
1519
+ he as D,
1520
+ Ot as E,
1521
+ ve as F,
1522
+ Vt as G,
1523
+ it as H,
1524
+ dt as I,
1525
+ qt as J,
1526
+ It as M,
1527
+ $t as N,
1528
+ Ge as P,
1529
+ St as S,
1530
+ Tt as T,
1531
+ ge as a,
1532
+ yt as b,
1533
+ xe as c,
1534
+ Ce as d,
1535
+ ke as e,
1536
+ Se as f,
1537
+ Ie as g,
1538
+ vt as h,
1539
+ R as i,
1540
+ Ct as j,
1541
+ kt as k,
1542
+ Fe as l,
1543
+ Bt as m,
1544
+ At as n,
1545
+ Pt as o,
1546
+ k as p,
1547
+ p as q,
1548
+ Ee as r,
1549
+ Lt as s,
1550
+ Ft as t,
1551
+ Je as u,
1552
+ Ke as v,
1553
+ Nt as w,
1554
+ zt as x,
1555
+ Et as y,
1556
+ jt as z
1478
1557
  };