@base-framework/ui 1.0.2023 → 1.0.2024

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,11 @@
1
- import { Div as n, H5 as Z, P as b, I as x, Li as H, Span as l, Ul as q, Button as m, OnState as I, Label as P, H2 as S, Form as tt, Header as T, Footer as L, A as V, H3 as et, Checkbox as st, Input as f, 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 at, Data as B, Builder as _, Jot as v, Events as p, DateTime as M } from "@base-framework/base";
3
- import { P as D, b as lt, R as ct } from "./range-calendar-6CLMTieN.js";
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";
3
+ import { P as D, b as at, R as ct } from "./range-calendar-6CLMTieN.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-CHEs54Wl.js";
6
- import { Icons as d } from "./icons.es.js";
7
- import { Timer as ht, List as ft, DynamicTime as mt } from "@base-framework/organisms";
8
- import { a as C } from "./image-BB__4s0g.js";
6
+ import { Icons as u } from "./icons.es.js";
7
+ import { Timer as ht, List as mt, DynamicTime as ft } from "@base-framework/organisms";
8
+ import { a as v } from "./image-BB__4s0g.js";
9
9
  import { F as Y } from "./format-BmrNQptv.js";
10
10
  const j = {
11
11
  info: {
@@ -36,10 +36,10 @@ const j = {
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: a } = j[o] || j.default;
39
+ const { borderColor: r, bgColor: i, iconColor: l } = j[o] || j.default;
40
40
  return n({ class: `flex items-start p-4 border rounded-lg ${i} ${r}` }, [
41
41
  // Icon and content
42
- s && gt(s, a),
42
+ s && gt(s, l),
43
43
  n({ class: "flex flex-col" }, [
44
44
  pt(t),
45
45
  bt(e)
@@ -67,34 +67,34 @@ class Oe extends w {
67
67
  A.removeElement(e);
68
68
  return;
69
69
  }
70
- it.addClass(e, s), at.on("animationend", e, (o) => A.removeElement(e));
70
+ it.addClass(e, s), lt.on("animationend", e, (o) => A.removeElement(e));
71
71
  }
72
72
  }
73
- const xt = (t) => l({ class: "ml-auto text-xs tracking-widest opacity-60" }, t), yt = (t) => l({ class: "flex w-4 h-4", html: t }), wt = (t) => l({ class: "flex-auto" }, t), vt = (t, e) => H({
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({
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: () => e(t)
76
76
  }, [
77
77
  t.icon && yt(t.icon),
78
78
  wt(t.label),
79
79
  t.shortcut && xt(t.shortcut)
80
- ]), Ct = (t, e) => q({ class: "grid gap-2" }, [
81
- t.map((s) => vt(s, e))
80
+ ]), vt = (t, e) => q({ class: "grid gap-2" }, [
81
+ t.map((s) => Ct(s, e))
82
82
  ]), St = (t) => n({ class: "w-full z-10" }, [
83
83
  n({
84
84
  class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
85
- for: ["groups", (e) => Ct(e, t)]
85
+ for: ["groups", (e) => vt(e, t)]
86
86
  })
87
- ]), Dt = ({ label: t, icon: e, toggleDropdown: s }) => m({
87
+ ]), Dt = ({ label: t, icon: e, toggleDropdown: s }) => f({
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
91
91
  focus:outline-none transition duration-150 ease-in-out`,
92
92
  click: s
93
93
  }, [
94
- t && l(t),
94
+ t && a(t),
95
95
  e && x({ html: e })
96
96
  ]), kt = ({ onSelect: t }) => n([
97
- I(
97
+ T(
98
98
  "open",
99
99
  (e, s, o) => e ? new D({
100
100
  cache: "dropdown",
@@ -168,7 +168,7 @@ class Ae extends w {
168
168
  ]);
169
169
  }
170
170
  }
171
- const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e)), Tt = c((t, e) => P({ ...t, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, e)), Bt = c((t, e) => b({ ...t, class: "text-sm text-muted-foreground italic" }, e)), Ft = c((t, e) => b({ ...t, class: "text-sm text-destructive" }, e)), Ye = c((t, e = []) => dt({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
171
+ const Tt = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e)), It = c((t, e) => P({ ...t, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, e)), Bt = c((t, e) => b({ ...t, class: "text-sm text-muted-foreground italic" }, e)), Ft = c((t, e) => b({ ...t, class: "text-sm text-destructive" }, e)), Ye = c((t, e = []) => dt({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
172
172
  t.title && S({ class: "text-lg font-semibold py-4 px-6" }, t.title),
173
173
  t.description && b({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, t.description),
174
174
  ...e
@@ -194,7 +194,7 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
194
194
  ...t,
195
195
  class: "w-full"
196
196
  }, r);
197
- }), Ne = C(
197
+ }), ze = v(
198
198
  {
199
199
  /**
200
200
  * The initial state of the FormField.
@@ -219,8 +219,8 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
219
219
  this.state.error = i, this.state.hasError = !!i;
220
220
  };
221
221
  return n({ class: "flex flex-auto gap-y-4" }, [
222
- It([
223
- Tt({ htmlFor: e }, s),
222
+ Tt([
223
+ It({ htmlFor: e }, s),
224
224
  Mt({
225
225
  id: e,
226
226
  name: t,
@@ -237,175 +237,33 @@ const It = c((t, e) => n({ ...t, class: "flex flex-auto flex-col gap-y-2" }, e))
237
237
  t.target.checkValidity() && (t.preventDefault(), s && s(t, e));
238
238
  }, K = c(
239
239
  (t, e) => tt({ ...t, submit: (s, o) => Pt(s, o, t.submit), class: `w-full ${t.class ?? ""}` }, e)
240
- ), ze = c((t, e) => n({ ...t, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${t.class || ""}` }, e)), Ue = c((t, e = []) => n({ class: "flex flex-col gap-y-3 py-4" }, [
240
+ ), Ne = c((t, e) => n({ ...t, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${t.class || ""}` }, e)), Ue = c((t, e = []) => n({ class: "flex flex-col gap-y-3 py-4" }, [
241
241
  t.title && S({ class: "font-semibold" }, t.title),
242
242
  ...e
243
243
  ])), Re = (t, e) => n({ class: "flex justify-between" }, [
244
- l({ class: "text-muted-foreground" }, t),
245
- l(e)
244
+ a({ class: "text-muted-foreground" }, t),
245
+ a(e)
246
246
  ]), He = (t, e) => n({ class: "flex" }, [
247
- l({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, t),
248
- l(e)
249
- ]);
250
- class Lt {
247
+ a({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, t),
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" }, [
251
250
  /**
252
- * Creates an instance of DrawerGesture.
253
- *
254
- * @param {object} [options={}]
255
- * @param {HTMLElement|null} [options.modal=null] - The modal element (panel) reference
256
- * @param {number} [options.closeThreshold=150] - Pixels to drag before closing
257
- * @param {number} [options.snapThreshold=50] - Pixels to drag before snapping
258
- * @param {Function|null} [options.onClose=null] - Callback when drawer should close
251
+ * Back Button (Mobile Only)
259
252
  */
260
- constructor(e = {}) {
261
- const { modal: s = null, closeThreshold: o = 150, snapThreshold: r = 50, onClose: i = null } = e;
262
- this.modal = s, this.reset();
263
- }
253
+ s && h({
254
+ variant: "icon",
255
+ icon: u.arrows.left,
256
+ class: "mr-2 p-0 flex sm:hidden",
257
+ click: (i, l) => l.close()
258
+ }),
264
259
  /**
265
- * Reset drag state
266
- *
267
- * @returns {void}
268
- */
269
- reset() {
270
- this.state = {
271
- isDragging: !1,
272
- startY: 0,
273
- currentY: 0,
274
- startScrollTop: 0,
275
- canDrag: !1
276
- };
277
- }
278
- /**
279
- * Check if viewport is mobile
280
- *
281
- * @returns {boolean}
282
- */
283
- isMobile() {
284
- return window.innerWidth < 1024;
285
- }
286
- /**
287
- * Handle touch start
288
- *
289
- * @param {TouchEvent} e
290
- * @returns {void}
291
- */
292
- handleTouchStart(e) {
293
- if (!this.modalBody) return;
294
- const s = e.touches[0];
295
- this.state.startY = s.clientY, this.state.currentY = s.clientY, this.state.startScrollTop = this.modalBody.scrollTop, this.state.canDrag = this.modalBody.scrollTop === 0;
296
- }
297
- /**
298
- * Handle touch move
299
- *
300
- * @param {TouchEvent} e
301
- * @returns {void}
302
- */
303
- handleTouchMove(e) {
304
- if (!this.modalContent || !this.modalBody) return;
305
- const s = e.touches[0];
306
- this.state.currentY = s.clientY;
307
- const o = this.getDeltaY();
308
- if (!this.state.isDragging && this.state.canDrag && o > 0 && this.modalBody.scrollTop === 0 && (this.state.isDragging = !0), this.state.isDragging && o > 0) {
309
- e.preventDefault();
310
- const r = this.calculateTranslateY(o);
311
- this.modalContent.style.transform = `translateY(${r}px)`, this.modalContent.style.transition = "none";
312
- const i = this.calculateBackdropOpacity(o);
313
- this.updateBackdropOpacity(i);
314
- } else this.modalBody.scrollTop > 0 && (this.state.canDrag = !1);
315
- }
316
- /**
317
- * Handle touch end
318
- *
319
- * @param {TouchEvent} e
320
- * @returns {void}
321
- */
322
- handleTouchEnd(e) {
323
- if (!this.modalContent) return;
324
- const s = this.getDeltaY();
325
- this.state.isDragging && (this.modalContent.style.transition = "transform 0.3s ease-out, opacity 0.3s ease-out", s > this.closeThreshold ? this.animateClose() : this.snapBack()), this.state.isDragging = !1, this.state.canDrag = !1;
326
- }
327
- /**
328
- * Get current drag delta Y
329
- *
330
- * @returns {number}
260
+ * Icon Container
331
261
  */
332
- getDeltaY() {
333
- return this.state.currentY - this.state.startY;
334
- }
335
- /**
336
- * Calculate translateY with rubber band damping
337
- *
338
- * @param {number} deltaY
339
- * @returns {number}
340
- */
341
- calculateTranslateY(e) {
342
- const s = 1 - e / (window.innerHeight * 2);
343
- return e * Math.max(s, 0.5);
344
- }
345
- /**
346
- * Calculate backdrop opacity based on drag distance
347
- *
348
- * @param {number} deltaY
349
- * @returns {number}
350
- */
351
- calculateBackdropOpacity(e) {
352
- return Math.max(0, 1 - e / this.closeThreshold);
353
- }
354
- /**
355
- * Update backdrop opacity
356
- *
357
- * @param {number} opacity
358
- * @returns {void}
359
- */
360
- updateBackdropOpacity(e) {
361
- this.modal && this.modal.style.setProperty("--backdrop-opacity", e.toString());
362
- }
363
- /**
364
- * Animate drawer closing
365
- *
366
- * @returns {void}
367
- */
368
- animateClose() {
369
- this.modalContent && (this.modalContent.style.transform = "translateY(100%)", this.updateBackdropOpacity(0), setTimeout(() => {
370
- this.onClose && this.onClose();
371
- }, 300));
372
- }
373
- /**
374
- * Snap drawer back to original position
375
- *
376
- * @returns {void}
377
- */
378
- snapBack() {
379
- this.modalContent && (this.modalContent.style.transform = "translateY(0)", this.updateBackdropOpacity(1));
380
- }
381
- /**
382
- * Check if currently dragging
383
- *
384
- * @returns {boolean}
385
- */
386
- isDragging() {
387
- return this.state.isDragging;
388
- }
389
- /**
390
- * Cleanup
391
- *
392
- * @returns {void}
393
- */
394
- destroy() {
395
- this.reset(), this.onClose = null;
396
- }
397
- }
398
- const Ot = ({ title: t, description: e, back: s, icon: o, options: r = [] }) => T({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
399
- /**
400
- * Back Button
401
- */
402
- s && h({ variant: "icon", icon: d.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (i, a) => a.close() }),
403
- /**
404
- * Icon
405
- */
406
- o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [g(o)]),
262
+ o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
263
+ g({ size: "md" }, o)
264
+ ]),
407
265
  /**
408
- * Title and Description
266
+ * Title and Description Container
409
267
  */
410
268
  n({ class: "flex flex-auto flex-row justify-between ml-2 gap-2 min-w-0" }, [
411
269
  n({ class: "flex flex-auto flex-col min-w-0" }, [
@@ -414,7 +272,7 @@ const Ot = ({ title: t, description: e, back: s, icon: o, options: r = [] }) =>
414
272
  ]),
415
273
  n({ class: "flex flex-none items-center gap-2" }, r)
416
274
  ])
417
- ]), Q = c((t, e) => n({
275
+ ])), Q = c((t, e) => n({
418
276
  popover: "manual",
419
277
  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 overflow-y-auto ${t.class}`,
420
278
  click: (s, o) => {
@@ -427,12 +285,12 @@ const Ot = ({ title: t, description: e, back: s, icon: o, options: r = [] }) =>
427
285
  cache: "modalContent",
428
286
  ...t.gestureHandlers
429
287
  }, [
430
- Ot(t),
288
+ Lt(t),
431
289
  n({ class: "modal-body flex flex-grow flex-col py-0 px-6 z-0 overflow-y-auto", cache: "modalBody" }, e),
432
290
  !t.hideFooter && L({ class: "modal-footer sticky bottom-0 bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, t.buttons)
433
291
  ])
434
- ])), At = (t) => _.render(t, app.root);
435
- class Yt extends w {
292
+ ])), Ot = (t) => _.render(t, app.root);
293
+ class At extends w {
436
294
  /**
437
295
  * This will declare the props for the compiler.
438
296
  *
@@ -566,7 +424,7 @@ class Yt extends w {
566
424
  * @returns {void}
567
425
  */
568
426
  open() {
569
- At(this), this.showModal();
427
+ Ot(this), this.showModal();
570
428
  }
571
429
  /**
572
430
  * This will destroy the modal.
@@ -595,17 +453,179 @@ class Yt extends w {
595
453
  this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(this), document.documentElement.style.overflowY = "auto";
596
454
  }
597
455
  }
598
- class qe extends Yt {
456
+ class Yt {
599
457
  /**
600
- * This will declare the props for the compiler.
458
+ * Creates an instance of DrawerGesture.
459
+ *
460
+ * @param {object} [options={}]
461
+ * @param {HTMLElement} [options.modal=null] - The modal element (panel) reference
462
+ * @param {HTMLElement} [options.modalContent=null] - The modal content element reference
463
+ * @param {HTMLElement} [options.modalBody=null] - The scrollable body element reference
464
+ * @param {number} [options.closeThreshold=150] - Pixels to drag before closing
465
+ * @param {number} [options.snapThreshold=50] - Pixels to drag before snapping
466
+ * @param {Function} [options.onClose=null] - Callback when drawer should close
467
+ */
468
+ constructor(e = {}) {
469
+ const {
470
+ modal: s = null,
471
+ modalContent: o = null,
472
+ modalBody: r = null,
473
+ closeThreshold: i = 150,
474
+ snapThreshold: l = 50,
475
+ onClose: d = null
476
+ } = e;
477
+ this.modal = s, this.modalContent = o, this.modalBody = r, this.closeThreshold = i, this.snapThreshold = l, this.onClose = d, this.reset();
478
+ }
479
+ /**
480
+ * Resets the drag state to initial values
481
+ *
482
+ * @returns {void}
483
+ */
484
+ reset() {
485
+ this.state = {
486
+ isDragging: !1,
487
+ startY: 0,
488
+ currentY: 0,
489
+ startScrollTop: 0,
490
+ canDrag: !1
491
+ };
492
+ }
493
+ /**
494
+ * Checks if the viewport is mobile size
495
+ *
496
+ * @returns {boolean}
497
+ */
498
+ isMobile() {
499
+ return window.innerWidth < 1024;
500
+ }
501
+ /**
502
+ * Handles touch start event
503
+ *
504
+ * @param {TouchEvent} e - The touch event
505
+ * @returns {void}
506
+ */
507
+ handleTouchStart(e) {
508
+ if (!this.modalBody)
509
+ return;
510
+ const s = e.touches[0];
511
+ this.state.startY = s.clientY, this.state.currentY = s.clientY, this.state.startScrollTop = this.modalBody.scrollTop, this.state.canDrag = this.modalBody.scrollTop === 0;
512
+ }
513
+ /**
514
+ * Handles touch move event
515
+ *
516
+ * @param {TouchEvent} e - The touch event
517
+ * @returns {void}
518
+ */
519
+ handleTouchMove(e) {
520
+ if (!this.modalContent || !this.modalBody)
521
+ return;
522
+ const s = e.touches[0];
523
+ this.state.currentY = s.clientY;
524
+ const o = this.getDeltaY();
525
+ if (!this.state.isDragging && this.state.canDrag && o > 0 && this.modalBody.scrollTop === 0 && (this.state.isDragging = !0), this.state.isDragging && o > 0) {
526
+ e.preventDefault();
527
+ const r = this.calculateTranslateY(o);
528
+ this.modalContent.style.transform = `translateY(${r}px)`, this.modalContent.style.transition = "none";
529
+ const i = this.calculateBackdropOpacity(o);
530
+ this.updateBackdropOpacity(i);
531
+ } else this.modalBody.scrollTop > 0 && (this.state.canDrag = !1);
532
+ }
533
+ /**
534
+ * Handles touch end event
535
+ *
536
+ * @param {TouchEvent} e - The touch event
537
+ * @returns {void}
538
+ */
539
+ handleTouchEnd(e) {
540
+ if (!this.modalContent)
541
+ return;
542
+ const s = this.getDeltaY();
543
+ this.state.isDragging && (this.modalContent.style.transition = "transform 0.3s ease-out, opacity 0.3s ease-out", s > this.closeThreshold ? this.animateClose() : this.snapBack()), this.state.isDragging = !1, this.state.canDrag = !1;
544
+ }
545
+ /**
546
+ * Gets current drag delta Y
547
+ *
548
+ * @returns {number} The vertical drag distance in pixels
549
+ */
550
+ getDeltaY() {
551
+ return this.state.currentY - this.state.startY;
552
+ }
553
+ /**
554
+ * Calculates translateY with rubber band damping effect.
555
+ * The further you drag, the more resistance is applied.
556
+ *
557
+ * @param {number} deltaY - The raw drag distance
558
+ * @returns {number} The damped translation distance
559
+ */
560
+ calculateTranslateY(e) {
561
+ const s = 1 - e / (window.innerHeight * 2);
562
+ return e * Math.max(s, 0.5);
563
+ }
564
+ /**
565
+ * Calculates backdrop opacity based on drag distance.
566
+ * Opacity decreases as the drawer is dragged down.
567
+ *
568
+ * @param {number} deltaY - The drag distance
569
+ * @returns {number} Opacity value between 0 and 1
570
+ */
571
+ calculateBackdropOpacity(e) {
572
+ return Math.max(0, 1 - e / this.closeThreshold);
573
+ }
574
+ /**
575
+ * Updates the backdrop opacity via CSS custom property
576
+ *
577
+ * @param {number} opacity - The opacity value (0-1)
578
+ * @returns {void}
579
+ */
580
+ updateBackdropOpacity(e) {
581
+ this.modal && this.modal.style.setProperty("--backdrop-opacity", e.toString());
582
+ }
583
+ /**
584
+ * Animates the drawer closing by translating it off-screen
585
+ *
586
+ * @returns {void}
587
+ */
588
+ animateClose() {
589
+ this.modalContent && (this.modalContent.style.transform = "translateY(100%)", this.updateBackdropOpacity(0), setTimeout(() => {
590
+ this.onClose && this.onClose();
591
+ }, 300));
592
+ }
593
+ /**
594
+ * Snaps the drawer back to its original position
595
+ *
596
+ * @returns {void}
597
+ */
598
+ snapBack() {
599
+ this.modalContent && (this.modalContent.style.transform = "translateY(0)", this.updateBackdropOpacity(1));
600
+ }
601
+ /**
602
+ * Checks if currently dragging
603
+ *
604
+ * @returns {boolean}
605
+ */
606
+ isDragging() {
607
+ return this.state.isDragging;
608
+ }
609
+ /**
610
+ * Cleans up resources and resets state
611
+ *
612
+ * @returns {void}
613
+ */
614
+ destroy() {
615
+ this.reset(), this.modal = null, this.modalContent = null, this.modalBody = null, this.onClose = null;
616
+ }
617
+ }
618
+ class qe extends At {
619
+ /**
620
+ * Declares the component props
601
621
  *
602
622
  * @returns {void}
603
623
  */
604
624
  declareProps() {
605
- super.declareProps(), this.type = "drawer", this.swipeToClose = !0, this.closeThreshold = 150, this.snapThreshold = 50;
625
+ super.declareProps(), this.type = "drawer", this.swipeToClose = !0, this.closeThreshold = 150, this.snapThreshold = 50, this.gesture = null, this.modalContent = null, this.modalBody = null;
606
626
  }
607
627
  /**
608
- * Get extra props for ModalContainer
628
+ * Gets extra props to pass to ModalContainer
609
629
  *
610
630
  * @returns {object}
611
631
  */
@@ -614,7 +634,7 @@ class qe extends Yt {
614
634
  return this.swipeToClose && this.gesture && (e.gestureHandlers = this.getGestureHandlers()), e;
615
635
  }
616
636
  /**
617
- * Render the drawer with gesture handlers
637
+ * Renders the drawer with gesture handlers
618
638
  *
619
639
  * @returns {object}
620
640
  */
@@ -629,8 +649,8 @@ class qe extends Yt {
629
649
  buttons: this.getButtons(),
630
650
  hideFooter: this.hideFooter,
631
651
  onSubmit: (i) => {
632
- let a = !0;
633
- this.onSubmit && (a = this.onSubmit(i)), a !== !1 && this.destroy();
652
+ let l = !0;
653
+ this.onSubmit && (l = this.onSubmit(i)), l !== !1 && this.destroy();
634
654
  },
635
655
  icon: this.icon,
636
656
  back: this.back ?? !1,
@@ -641,17 +661,15 @@ class qe extends Yt {
641
661
  );
642
662
  }
643
663
  /**
644
- * Show the modal
664
+ * Shows the modal and initializes gesture handling
645
665
  *
646
666
  * @protected
647
667
  * @returns {void}
648
668
  */
649
669
  showModal() {
650
- super.showModal(), this.swipeToClose && !this.gesture && (this.gesture = new Lt({
670
+ super.showModal(), this.swipeToClose && !this.gesture && (this.gesture = new Yt({
651
671
  modal: this.panel,
652
- // @ts-ignore
653
672
  modalContent: this.modalContent,
654
- // @ts-ignore
655
673
  modalBody: this.modalBody,
656
674
  closeThreshold: this.closeThreshold,
657
675
  snapThreshold: this.snapThreshold,
@@ -659,8 +677,8 @@ class qe extends Yt {
659
677
  }));
660
678
  }
661
679
  /**
662
- * Get gesture event handlers for modal content
663
- * Returns event props to be spread onto the modal-content element
680
+ * Gets gesture event handlers for modal content.
681
+ * Returns event props to be spread onto the modal-content element.
664
682
  *
665
683
  * @returns {object}
666
684
  */
@@ -672,7 +690,7 @@ class qe extends Yt {
672
690
  };
673
691
  }
674
692
  /**
675
- * Clean up before destroy
693
+ * Cleans up before destroy
676
694
  *
677
695
  * @protected
678
696
  * @returns {void}
@@ -707,7 +725,7 @@ const E = {
707
725
  borderColor: "border",
708
726
  iconColor: "text-muted-foreground"
709
727
  }
710
- }, jt = (t) => T({ class: "flex justify-center" }, [
728
+ }, jt = (t) => I({ class: "flex justify-center" }, [
711
729
  et({ class: "text-lg font-bold mb-0" }, t)
712
730
  ]), Et = c(({ href: t, class: e }, s) => V({
713
731
  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 ${e}`,
@@ -715,14 +733,14 @@ const E = {
715
733
  animateIn: "pullRightIn",
716
734
  animateOut: "pullRight",
717
735
  role: "alert"
718
- }, s)), Nt = c(({ close: t, class: e }, s) => n({
736
+ }, s)), zt = c(({ close: t, class: e }, s) => n({
719
737
  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 ${e}`,
720
738
  click: () => t(),
721
739
  animateIn: "pullRightIn",
722
740
  animateOut: "pullRight",
723
741
  role: "alert"
724
742
  }, s));
725
- class zt extends w {
743
+ class Nt extends w {
726
744
  /**
727
745
  * This will declare the props for the compiler.
728
746
  *
@@ -749,7 +767,7 @@ class zt extends w {
749
767
  return r ? Et({
750
768
  href: r,
751
769
  class: `${e} ${s}`
752
- }, i) : Nt({
770
+ }, i) : zt({
753
771
  close: this.close.bind(this),
754
772
  class: `${e} ${s}`
755
773
  }, i);
@@ -806,7 +824,7 @@ class zt extends w {
806
824
  h({
807
825
  class: "absolute top-[12px] right-[12px]",
808
826
  variant: "icon",
809
- icon: d.x,
827
+ icon: u.x,
810
828
  click: this.close.bind(this)
811
829
  })
812
830
  ];
@@ -830,11 +848,11 @@ class Ve extends w {
830
848
  */
831
849
  render() {
832
850
  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" }, [
833
- new ft({
851
+ new mt({
834
852
  cache: "list",
835
853
  key: "id",
836
854
  role: "list",
837
- rowItem: (e) => new zt(e)
855
+ rowItem: (e) => new Nt(e)
838
856
  })
839
857
  ]);
840
858
  }
@@ -857,7 +875,7 @@ class Ve extends w {
857
875
  this.list.delete(e.id), this.list.isEmpty() && this.panel.hidePopover();
858
876
  }
859
877
  }
860
- const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
878
+ const z = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => f({
861
879
  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',
862
880
  onState: ["method", { active: t }],
863
881
  dataSet: ["method", ["state", t, "active"]],
@@ -866,16 +884,16 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
866
884
  }
867
885
  }, [
868
886
  g(s),
869
- l(e)
887
+ a(e)
870
888
  ])), Rt = (t) => {
871
889
  const e = document.documentElement;
872
- if (t === "system" && (t = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), N && !N("(prefers-color-scheme: " + t + ")").matches) {
890
+ if (t === "system" && (t = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + t + ")").matches) {
873
891
  e.classList.add(t);
874
892
  return;
875
893
  }
876
894
  const s = t === "light" ? "dark" : "light";
877
895
  e.classList.remove(s);
878
- }, Ge = v(
896
+ }, Ge = C(
879
897
  {
880
898
  /**
881
899
  * This will render the component.
@@ -885,9 +903,9 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
885
903
  render() {
886
904
  return n({ class: "flex flex-auto flex-col" }, [
887
905
  n({ class: "grid grid-cols-3 gap-4" }, [
888
- F({ label: "System", value: "system", icon: d.adjustments.horizontal }),
889
- F({ label: "Light", value: "light", icon: d.sun }),
890
- F({ label: "Dark", value: "dark", icon: d.moon })
906
+ F({ label: "System", value: "system", icon: u.adjustments.horizontal }),
907
+ F({ label: "Light", value: "light", icon: u.sun }),
908
+ F({ label: "Dark", value: "dark", icon: u.moon })
891
909
  ])
892
910
  ]);
893
911
  },
@@ -902,7 +920,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
902
920
  };
903
921
  }
904
922
  }
905
- ), We = C(
923
+ ), We = v(
906
924
  {
907
925
  /**
908
926
  * The initial state of the Toggle.
@@ -929,7 +947,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
929
947
  * @returns {object}
930
948
  */
931
949
  render() {
932
- return m({
950
+ return f({
933
951
  class: "relative inline-flex h-6 w-11 min-w-11 items-center rounded-full bg-muted transition-colors focus:outline-none",
934
952
  onState: ["active", { "bg-primary": !0, "bg-muted": !1 }],
935
953
  click: (e, { state: s }) => {
@@ -947,7 +965,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
947
965
  bind: this.bind,
948
966
  required: this.required
949
967
  }),
950
- l({
968
+ a({
951
969
  class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
952
970
  onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
953
971
  })
@@ -974,7 +992,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
974
992
  [y.BUSY]: k.BUSY,
975
993
  [y.AWAY]: k.AWAY
976
994
  }]
977
- }), qt = (t) => t.indexOf(".") === -1 && t.indexOf("[[") === -1 && t.indexOf("blob:") === -1, Ke = v(
995
+ }), qt = (t) => t.indexOf(".") === -1 && t.indexOf("[[") === -1 && t.indexOf("blob:") === -1, Ke = C(
978
996
  {
979
997
  /**
980
998
  * Get the initial state for the component.
@@ -1013,7 +1031,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1013
1031
  render() {
1014
1032
  const t = "image-upload", e = this.onChange || null;
1015
1033
  return n({ class: "flex-none items-center" }, [
1016
- f({
1034
+ m({
1017
1035
  id: t,
1018
1036
  cache: "input",
1019
1037
  type: "file",
@@ -1030,11 +1048,11 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1030
1048
  s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
1031
1049
  }
1032
1050
  }, [
1033
- I("loaded", (s) => s === !1 || qt(this.src) ? P({
1051
+ T("loaded", (s) => s === !1 || qt(this.src) ? P({
1034
1052
  htmlFor: t,
1035
1053
  class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
1036
1054
  }, [
1037
- g(d.upload),
1055
+ g(u.upload),
1038
1056
  n("Upload Image")
1039
1057
  ]) : G({
1040
1058
  // @ts-ignore
@@ -1045,7 +1063,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1045
1063
  ]);
1046
1064
  }
1047
1065
  }
1048
- ), Qe = v(
1066
+ ), Qe = C(
1049
1067
  {
1050
1068
  /**
1051
1069
  * Get the initial state for the component.
@@ -1084,7 +1102,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1084
1102
  render() {
1085
1103
  const t = "logo-upload", e = this.onChange || null;
1086
1104
  return n({ class: "flex-none items-center" }, [
1087
- f({
1105
+ m({
1088
1106
  id: t,
1089
1107
  cache: "input",
1090
1108
  type: "file",
@@ -1101,7 +1119,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1101
1119
  s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
1102
1120
  }
1103
1121
  }, [
1104
- I(
1122
+ T(
1105
1123
  "loaded",
1106
1124
  (s) => s ? G({
1107
1125
  // @ts-ignore
@@ -1111,7 +1129,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1111
1129
  htmlFor: t,
1112
1130
  class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
1113
1131
  }, [
1114
- g(d.upload),
1132
+ g(u.upload),
1115
1133
  n("Upload logo")
1116
1134
  ])
1117
1135
  )
@@ -1126,15 +1144,15 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1126
1144
  // Only set aria-current on the last item
1127
1145
  class: "text-muted-foreground font-medium hover:text-foreground"
1128
1146
  },
1129
- [l(e)]
1147
+ [a(e)]
1130
1148
  ), Gt = () => g({
1131
1149
  class: "mx-3 text-muted-foreground",
1132
1150
  "aria-hidden": !0,
1133
1151
  size: "xs"
1134
- }, d.chevron.single.right), Wt = (t) => n({ class: "flex items-center" }, [
1135
- t.href ? Vt(t.href, t.label) : l(t.label),
1152
+ }, u.chevron.single.right), Wt = (t) => n({ class: "flex items-center" }, [
1153
+ t.href ? Vt(t.href, t.label) : a(t.label),
1136
1154
  t.separator && Gt()
1137
- ]), Xe = v(
1155
+ ]), Xe = C(
1138
1156
  {
1139
1157
  /**
1140
1158
  * Set initial data
@@ -1173,7 +1191,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1173
1191
  );
1174
1192
  }
1175
1193
  }
1176
- ), z = {
1194
+ ), N = {
1177
1195
  xs: "h-1 w-1",
1178
1196
  sm: "h-2 w-2",
1179
1197
  md: "h-4 w-4",
@@ -1182,8 +1200,8 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1182
1200
  "2xl": "h-16 w-16",
1183
1201
  "3xl": "h-24 w-24",
1184
1202
  default: "h-4 w-4"
1185
- }, _t = (t) => z[t] || z.default, Jt = ({ index: t, size: e }) => n({ class: `${e} rounded-full bg-muted cursor-pointer` }, [
1186
- l({
1203
+ }, _t = (t) => N[t] || N.default, Jt = ({ index: t, size: e }) => n({ class: `${e} rounded-full bg-muted cursor-pointer` }, [
1204
+ a({
1187
1205
  class: "block w-full h-full rounded-full transition-colors",
1188
1206
  onSet: ["activeIndex", {
1189
1207
  "bg-primary": t,
@@ -1196,7 +1214,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1196
1214
  ]), Kt = (t, e) => Array.from({ length: t }, (s, o) => Jt({
1197
1215
  index: o,
1198
1216
  size: e
1199
- })), Ze = v(
1217
+ })), Ze = C(
1200
1218
  {
1201
1219
  /**
1202
1220
  * Defines component data (props).
@@ -1227,27 +1245,27 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1227
1245
  );
1228
1246
  }
1229
1247
  }
1230
- ), Qt = ({ toggleDropdown: t }) => m(
1248
+ ), Qt = ({ toggleDropdown: t }) => f(
1231
1249
  {
1232
1250
  cache: "button",
1233
1251
  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 bg-input hover:bg-muted h-10 px-4 py-2 justify-between",
1234
1252
  click: t
1235
1253
  },
1236
1254
  [
1237
- l({ onState: ["selectedLabel", (e) => e || "Select item..."] }),
1238
- x({ html: d.chevron.upDown })
1255
+ a({ onState: ["selectedLabel", (e) => e || "Select item..."] }),
1256
+ x({ html: u.chevron.upDown })
1239
1257
  ]
1240
1258
  ), Xt = (t, e, s) => H({
1241
1259
  class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
1242
1260
  click: () => e(t),
1243
1261
  onState: [s, "selectedValue", { "bg-secondary": t.value }]
1244
1262
  }, [
1245
- t.icon && l({ class: "mr-2 flex items-baseline" }, [g({ size: "xs" }, t.icon)]),
1246
- l({ class: "text-base font-normal" }, t.label)
1263
+ t.icon && a({ class: "mr-2 flex items-baseline" }, [g({ size: "xs" }, t.icon)]),
1264
+ a({ class: "text-base font-normal" }, t.label)
1247
1265
  ]), Zt = (t, e) => n({ class: "w-full border rounded-md" }, [
1248
1266
  q({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Xt(s, t, e)] })
1249
1267
  ]), te = ({ onSelect: t, state: e }) => n({ class: "flex flex-auto flex-col" }, [
1250
- I(
1268
+ T(
1251
1269
  "open",
1252
1270
  (s, o, r) => s ? new D({
1253
1271
  cache: "dropdown",
@@ -1257,7 +1275,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1257
1275
  Zt(t, e)
1258
1276
  ]) : null
1259
1277
  )
1260
- ]), ts = v(
1278
+ ]), ts = C(
1261
1279
  {
1262
1280
  /**
1263
1281
  * This will set up the data.
@@ -1347,7 +1365,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1347
1365
  }),
1348
1366
  // Hidden required input for form validation
1349
1367
  // @ts-ignore
1350
- this.required && f({
1368
+ this.required && m({
1351
1369
  class: "opacity-0 absolute top-0 left-0 z-[1]",
1352
1370
  type: "text",
1353
1371
  // @ts-ignore
@@ -1366,19 +1384,19 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1366
1384
  icon: t,
1367
1385
  "aria-label": s
1368
1386
  }), ee = ({ click: t }) => X({
1369
- icon: d.circleMinus,
1387
+ icon: u.circleMinus,
1370
1388
  click: t,
1371
1389
  ariaLabel: "Decrement"
1372
1390
  }), se = ({ click: t }) => X({
1373
- icon: d.circlePlus,
1391
+ icon: u.circlePlus,
1374
1392
  click: t,
1375
1393
  ariaLabel: "Increment"
1376
- }), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state: r }) => f({
1394
+ }), oe = ({ bind: t, min: e, max: s, readonly: o = !1 }) => W(({ state: r }) => m({
1377
1395
  value: ["[[count]]", r],
1378
1396
  bind: t,
1379
- blur: (i, { state: a }) => {
1380
- let u = parseInt(i.target.value, 10);
1381
- isNaN(u) && (u = e ?? 0), e !== void 0 && (u = Math.max(u, e)), s !== void 0 && (u = Math.min(u, s)), a.count = u;
1397
+ blur: (i, { state: l }) => {
1398
+ let d = parseInt(i.target.value, 10);
1399
+ isNaN(d) && (d = e ?? 0), e !== void 0 && (d = Math.max(d, e)), s !== void 0 && (d = Math.min(d, s)), l.count = d;
1382
1400
  },
1383
1401
  class: "flex flex-auto text-lg font-medium bg-input text-center border min-w-0",
1384
1402
  readonly: o,
@@ -1386,7 +1404,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1386
1404
  max: s,
1387
1405
  type: "number",
1388
1406
  "aria-label": "Counter"
1389
- })), es = C(
1407
+ })), es = v(
1390
1408
  {
1391
1409
  /**
1392
1410
  * Initial state for the counter component.
@@ -1428,32 +1446,32 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1428
1446
  return null;
1429
1447
  const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10), o = parseInt(t.substring(4, 8), 10);
1430
1448
  return e >= 1 && e <= 12 && s >= 1 && s <= 31 && o >= 1900 ? `${o}-${e.toString().padStart(2, "0")}-${s.toString().padStart(2, "0")}` : null;
1431
- }, ie = ({ bind: t, required: e }) => f({
1449
+ }, ie = ({ bind: t, required: e }) => m({
1432
1450
  cache: "input",
1433
1451
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1434
1452
  bind: t,
1435
1453
  required: e
1436
- }), ae = ({ placeholder: t, handleInputChange: e, handleInputFocus: s }) => f({
1454
+ }), le = ({ placeholder: t, handleInputChange: e, handleInputFocus: s }) => m({
1437
1455
  cache: "dateInput",
1438
1456
  class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
1439
1457
  placeholder: t || "mm/dd/yyyy",
1440
1458
  input: e,
1441
1459
  focus: s,
1442
1460
  onState: ["selectedDate", (o) => o ? M.format("standard", o) : ""]
1443
- }), le = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) => n(
1461
+ }), ae = ({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleInputFocus: r, placeholder: i }) => n(
1444
1462
  {
1445
1463
  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"
1446
1464
  },
1447
1465
  [
1448
1466
  ie({ bind: t, required: e }),
1449
- ae({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
1450
- m(
1467
+ le({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
1468
+ f(
1451
1469
  {
1452
1470
  class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
1453
1471
  click: s
1454
1472
  },
1455
1473
  [
1456
- x({ html: d.calendar.days })
1474
+ x({ html: u.calendar.days })
1457
1475
  ]
1458
1476
  )
1459
1477
  ]
@@ -1464,13 +1482,13 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1464
1482
  button: r.panel,
1465
1483
  size: "fit"
1466
1484
  }, [
1467
- new lt({
1485
+ new at({
1468
1486
  selectedDate: r.state.selectedDate,
1469
1487
  selectedCallBack: t,
1470
1488
  blockPriorDates: e
1471
1489
  })
1472
1490
  ])
1473
- ), ss = C(
1491
+ ), ss = v(
1474
1492
  {
1475
1493
  /**
1476
1494
  * The initial state of the DatePicker.
@@ -1537,7 +1555,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1537
1555
  return n(
1538
1556
  { class: "relative w-full max-w-[320px]" },
1539
1557
  [
1540
- le({
1558
+ ae({
1541
1559
  toggleOpen: this.toggleOpen.bind(this),
1542
1560
  bind: this.bind,
1543
1561
  required: this.required,
@@ -1553,22 +1571,22 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1553
1571
  );
1554
1572
  }
1555
1573
  }
1556
- ), de = ({ bind: t, required: e }) => f({
1574
+ ), de = ({ bind: t, required: e }) => m({
1557
1575
  cache: "input",
1558
1576
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1559
1577
  bind: t,
1560
1578
  required: e
1561
- }), ue = ({ bind: t, required: e, toggleOpen: s }) => m({
1579
+ }), ue = ({ bind: t, required: e, toggleOpen: s }) => f({
1562
1580
  class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 px-4 py-2",
1563
1581
  click: s
1564
1582
  }, [
1565
1583
  de({ bind: t, required: e }),
1566
1584
  W(({ state: o }) => [
1567
- l(Y.date(["[[start]]", o], "Start Date")),
1568
- l(" - "),
1569
- l(Y.date(["[[end]]", o], "End Date"))
1585
+ a(Y.date(["[[start]]", o], "Start Date")),
1586
+ a(" - "),
1587
+ a(Y.date(["[[end]]", o], "End Date"))
1570
1588
  ]),
1571
- x({ html: d.calendar.days })
1589
+ x({ html: u.calendar.days })
1572
1590
  ]), he = ({ handleDateSelect: t, blockPriorDates: e }) => O((s, o, r) => new D({
1573
1591
  cache: "dropdown",
1574
1592
  parent: r,
@@ -1581,7 +1599,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1581
1599
  onRangeSelect: t,
1582
1600
  blockPriorDates: e
1583
1601
  })
1584
- ])), os = C(
1602
+ ])), os = v(
1585
1603
  {
1586
1604
  /**
1587
1605
  * The initial state of the DateRangePicker.
@@ -1630,7 +1648,7 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1630
1648
  }
1631
1649
  }
1632
1650
  ), ns = ({ dateTime: t = "", remoteTimeZone: e = "America/Denver", filter: s = null }) => nt([
1633
- new mt({
1651
+ new ft({
1634
1652
  dateTime: t,
1635
1653
  filter: s || ((o) => {
1636
1654
  const r = M.getLocalTime(o, !0, !1, e);
@@ -1638,11 +1656,11 @@ const N = globalThis.matchMedia, F = c(({ value: t, label: e, icon: s }) => m({
1638
1656
  })
1639
1657
  })
1640
1658
  ]);
1641
- function fe(t) {
1659
+ function me(t) {
1642
1660
  let e = "";
1643
1661
  return t.length > 0 && (e = t.substring(0, 2), t.length > 2 && (e += ":" + t.substring(2, 4))), e;
1644
1662
  }
1645
- function me(t) {
1663
+ function fe(t) {
1646
1664
  if (t.length < 4)
1647
1665
  return { formattedTime: null, hour: null, minute: null, meridian: null };
1648
1666
  const e = parseInt(t.substring(0, 2), 10), s = parseInt(t.substring(2, 4), 10);
@@ -1657,7 +1675,7 @@ function me(t) {
1657
1675
  };
1658
1676
  }
1659
1677
  function ge({ bind: t, required: e }) {
1660
- return f({
1678
+ return m({
1661
1679
  cache: "input",
1662
1680
  class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
1663
1681
  bind: t,
@@ -1665,7 +1683,7 @@ function ge({ bind: t, required: e }) {
1665
1683
  });
1666
1684
  }
1667
1685
  function pe({ placeholder: t, handleInputChange: e, handleInputFocus: s }) {
1668
- return f({
1686
+ return m({
1669
1687
  cache: "timeInput",
1670
1688
  class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
1671
1689
  placeholder: t || "hh:mm AM/PM",
@@ -1682,13 +1700,13 @@ function be({ bind: t, required: e, toggleOpen: s, handleInputChange: o, handleI
1682
1700
  [
1683
1701
  ge({ bind: t, required: e }),
1684
1702
  pe({ placeholder: i, handleInputChange: o, handleInputFocus: r }),
1685
- m(
1703
+ f(
1686
1704
  {
1687
1705
  class: "flex-shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
1688
1706
  click: s
1689
1707
  },
1690
1708
  [
1691
- x({ html: d.clock })
1709
+ x({ html: u.clock })
1692
1710
  ]
1693
1711
  )
1694
1712
  ]
@@ -1698,12 +1716,12 @@ function $({ items: t, handleTimeSelect: e, state: s, stateValue: o, pad: r = !1
1698
1716
  return n(
1699
1717
  { class: "flex flex-col max-h-[200px] overflow-y-auto" },
1700
1718
  t.map((i) => {
1701
- let a = r ? i.toString().padStart(2, "0") : i.toString();
1702
- return m({
1703
- text: a,
1719
+ let l = r ? i.toString().padStart(2, "0") : i.toString();
1720
+ return f({
1721
+ text: l,
1704
1722
  class: "hover:bg-muted/50 rounded-md pr-2 py-1",
1705
- click: () => e({ [o]: a }),
1706
- onState: [s, o, { "bg-muted": a }]
1723
+ click: () => e({ [o]: l }),
1724
+ onState: [s, o, { "bg-muted": l }]
1707
1725
  });
1708
1726
  })
1709
1727
  );
@@ -1761,14 +1779,14 @@ function U(t) {
1761
1779
  const e = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = t.match(e);
1762
1780
  if (!s)
1763
1781
  return { hour: null, minute: null, meridian: null };
1764
- let [, o, r, , i] = s, a = parseInt(o, 10), u = parseInt(r, 10);
1765
- return a < 0 || a > 23 || u < 0 || u > 59 ? { hour: null, minute: null, meridian: null } : (i ? (i = i.toUpperCase(), i === "PM" && a < 12 ? a += 12 : i === "AM" && a === 12 && (a = 12)) : a === 0 ? (i = "AM", a = 12) : a < 12 ? i = "AM" : a === 12 ? i = "PM" : (i = "PM", a -= 12), {
1766
- hour: a.toString().padStart(2, "0"),
1767
- minute: u.toString().padStart(2, "0"),
1782
+ let [, o, r, , i] = s, l = parseInt(o, 10), d = parseInt(r, 10);
1783
+ 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), {
1784
+ hour: l.toString().padStart(2, "0"),
1785
+ minute: d.toString().padStart(2, "0"),
1768
1786
  meridian: i
1769
1787
  });
1770
1788
  }
1771
- const rs = C(
1789
+ const rs = v(
1772
1790
  {
1773
1791
  /**
1774
1792
  * The initial shallow state of the TimePicker.
@@ -1816,8 +1834,8 @@ const rs = C(
1816
1834
  * @param {Event} e
1817
1835
  */
1818
1836
  handleInputChange(t) {
1819
- let e = t.target.value.replace(/[^\d]/g, ""), s = fe(e);
1820
- const o = me(e);
1837
+ let e = t.target.value.replace(/[^\d]/g, ""), s = me(e);
1838
+ const o = fe(e);
1821
1839
  o.formattedTime && (s = o.formattedTime, this.state.set({
1822
1840
  hour: o.hour,
1823
1841
  minute: o.minute,
@@ -1870,9 +1888,9 @@ const rs = C(
1870
1888
  }
1871
1889
  ), ye = (t, e) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${e}` }, [
1872
1890
  g({ size: "lg" }, t)
1873
- ]), we = ({ title: t }) => T({ class: "flex flex-auto items-center" }, [
1891
+ ]), we = ({ title: t }) => I({ class: "flex flex-auto items-center" }, [
1874
1892
  S({ class: "text-lg font-semibold" }, t)
1875
- ]), ve = c((t, e) => rt(
1893
+ ]), Ce = c((t, e) => rt(
1876
1894
  {
1877
1895
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
1878
1896
  rounded-lg flex flex-auto flex-col
@@ -1894,7 +1912,7 @@ const rs = C(
1894
1912
  ])
1895
1913
  ])
1896
1914
  ]
1897
- )), Ce = (t) => _.render(t, app.root), R = {
1915
+ )), ve = (t) => _.render(t, app.root), R = {
1898
1916
  info: {
1899
1917
  borderColor: "border-blue-500",
1900
1918
  bgColor: "bg-muted/10",
@@ -1936,12 +1954,12 @@ class Se extends w {
1936
1954
  * @returns {object}
1937
1955
  */
1938
1956
  render() {
1939
- const e = (u) => {
1940
- u.target === this.panel && this.close();
1941
- }, { borderColor: s, bgColor: o, iconColor: r } = R[this.type] || R.default, i = `${this.getMainClass()} ${o} ${s}`, a = this.title || "Dialog Title";
1942
- return ve({
1957
+ const e = (d) => {
1958
+ d.target === this.panel && this.close();
1959
+ }, { borderColor: s, bgColor: o, iconColor: r } = R[this.type] || R.default, i = `${this.getMainClass()} ${o} ${s}`, l = this.title || "Dialog Title";
1960
+ return Ce({
1943
1961
  class: i,
1944
- title: a,
1962
+ title: l,
1945
1963
  click: e,
1946
1964
  icon: this.icon,
1947
1965
  iconColor: r,
@@ -1983,7 +2001,7 @@ class Se extends w {
1983
2001
  * @returns {void}
1984
2002
  */
1985
2003
  open() {
1986
- Ce(this), this.panel.showModal(), this.state.open = !0;
2004
+ ve(this), this.panel.showModal(), this.state.open = !0;
1987
2005
  }
1988
2006
  /**
1989
2007
  * This will close the modal.
@@ -2024,7 +2042,7 @@ class is extends Se {
2024
2042
  this.confirmed && this.confirmed(), this.close();
2025
2043
  }
2026
2044
  }
2027
- const as = c((t, e = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
2045
+ const ls = c((t, e = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
2028
2046
  K({ class: "flex flex-auto flex-col" }, [
2029
2047
  n({ class: "flex flex-auto flex-col gap-y-4" }, [
2030
2048
  n({ class: "flex flex-auto items-center justify-center" }, [
@@ -2032,7 +2050,7 @@ const as = c((t, e = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
2032
2050
  g(t.icon)
2033
2051
  ])
2034
2052
  ]),
2035
- T({ class: "py-4 text-center" }, [
2053
+ I({ class: "py-4 text-center" }, [
2036
2054
  S({ class: "text-xl font-bold" }, t.title),
2037
2055
  b({ class: "pb-8 text-muted-foreground" }, t.description || ""),
2038
2056
  ...e
@@ -2046,38 +2064,38 @@ export {
2046
2064
  He as C,
2047
2065
  Oe as D,
2048
2066
  es as E,
2049
- It as F,
2067
+ Tt as F,
2050
2068
  ss as G,
2051
2069
  os as H,
2052
2070
  Ke as I,
2053
2071
  ns as J,
2054
2072
  rs as K,
2055
2073
  Qe as L,
2056
- Yt as M,
2074
+ At as M,
2057
2075
  Ve as N,
2058
2076
  is as O,
2059
2077
  se as P,
2060
- ve as Q,
2078
+ Ce as Q,
2061
2079
  Se as R,
2062
2080
  Re as S,
2063
2081
  Ge as T,
2064
- as as U,
2065
- vt as a,
2082
+ ls as U,
2083
+ Ct as a,
2066
2084
  Ae as b,
2067
2085
  St as c,
2068
- Tt as d,
2086
+ It as d,
2069
2087
  Bt as e,
2070
2088
  Ft as f,
2071
2089
  Ye as g,
2072
2090
  je as h,
2073
2091
  Ee as i,
2074
2092
  Mt as j,
2075
- Ne as k,
2093
+ ze as k,
2076
2094
  K as l,
2077
- ze as m,
2095
+ Ne as m,
2078
2096
  Ue as n,
2079
2097
  qe as o,
2080
- zt as p,
2098
+ Nt as p,
2081
2099
  We as q,
2082
2100
  _e as r,
2083
2101
  Je as s,