@base-framework/ui 1.0.166 → 1.0.168

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,22 +1,22 @@
1
- import { Button as y, Div as o, On as Y, Span as v, Th as R, UseParent as F, I as H, Thead as E, Tr as Q, Table as W, P as p, Li as D, Time as X, Nav as S, Ul as b, Section as P, Canvas as q } from "@base-framework/atoms";
2
- import { Atom as d, Component as h, Data as L, DateTime as K, router as x, NavLink as O, DataTracker as z, Jot as G, base as I, Dom as T } from "@base-framework/base";
3
- import { B as C, I as V } from "./buttons-Cm9etaEG.js";
1
+ import { Button as x, Div as o, On as H, Span as v, Th as P, UseParent as F, I as E, Thead as Q, Tr as X, Table as I, P as p, Li as D, Time as q, Nav as S, Ul as w, Section as O, Canvas as K } from "@base-framework/atoms";
2
+ import { Atom as d, Component as h, Data as L, DateTime as G, router as y, NavLink as z, DataTracker as $, Jot as V, base as B, Dom as M } from "@base-framework/base";
3
+ import { B as C, I as _ } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as k } from "./icons.es.js";
5
- import { TableBody as _, ScrollableTableBody as J, List as Z, IntervalTimer as ee } from "@base-framework/organisms";
6
- import { C as te, I as se, H as ae } from "./inputs-Dmu4Z-7-.js";
7
- import { A as ie, P as ne } from "./calendar-DQXME-2u.js";
5
+ import { TableBody as J, DataTableBody as Z, ScrollableTableBody as ee, List as te, IntervalTimer as se } from "@base-framework/organisms";
6
+ import { C as ae, I as ie, H as ne } from "./inputs-Dmu4Z-7-.js";
7
+ import { A as oe, P as le } from "./calendar-DQXME-2u.js";
8
8
  d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
11
11
  children: e
12
12
  }));
13
- d(({ value: t, label: e }) => y({
13
+ d(({ value: t, label: e }) => x({
14
14
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
15
15
  onState: ["performance", { active: t }],
16
16
  dataSet: ["performance", ["state", t, "active"]],
17
17
  click: (s, { state: a }) => a.performance = t
18
18
  }, e));
19
- class et extends h {
19
+ class at extends h {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -34,36 +34,36 @@ class et extends h {
34
34
  return o({ class: this.class || "" }, this.children);
35
35
  }
36
36
  }
37
- const oe = (t) => {
37
+ const re = (t) => {
38
38
  const e = new Date(t, 11, 31), s = new Date(t, 0, 1);
39
39
  return e.getDay() === 4 || // December 31 is a Thursday
40
40
  s.getDay() === 4;
41
- }, le = (t) => {
41
+ }, ce = (t) => {
42
42
  const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
43
43
  e.setDate(e.getDate() - s + 3);
44
44
  const a = e.getFullYear(), i = new Date(a, 0, 4);
45
45
  i.setDate(i.getDate() - (i.getDay() + 6) % 7);
46
46
  const n = Math.ceil((e - i) / 6048e5) + 1;
47
- return n > 52 && !oe(a) ? {
47
+ return n > 52 && !re(a) ? {
48
48
  weekNumber: 1,
49
49
  year: a + 1
50
50
  } : {
51
51
  weekNumber: n,
52
52
  year: a
53
53
  };
54
- }, re = (t, e, s) => {
54
+ }, de = (t, e, s) => {
55
55
  if (s === 0) return [];
56
56
  const a = new Date(t, e, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
59
  (i, n) => new Date(t, e - 1, a - s + n + 1)
60
60
  );
61
- }, ce = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), B = (t, e) => {
61
+ }, he = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), R = (t, e) => {
62
62
  const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
63
63
  i.setDate(s.getDate() - a);
64
64
  const n = new Date(i);
65
65
  return n.setDate(i.getDate() + (t - 1) * 7), n;
66
- }, tt = (t, e) => {
66
+ }, it = (t, e) => {
67
67
  const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
68
68
  let n = [];
69
69
  for (let l = 1 - s; l <= a; l++) {
@@ -71,18 +71,18 @@ const oe = (t) => {
71
71
  n.push(l > 0 ? u : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
72
72
  }
73
73
  return i;
74
- }, st = (t, e) => {
74
+ }, nt = (t, e) => {
75
75
  const s = new Date(t, e + 1, 0).getDate(), a = [];
76
76
  let i = [];
77
77
  for (let n = 1; n <= s; n++)
78
78
  i.push(new Date(t, e, n)), i.length === 7 && (a.push(i), i = []);
79
79
  return i.length > 0 && a.push(i), a;
80
- }, de = (t, e, s) => {
80
+ }, ue = (t, e, s) => {
81
81
  const a = /* @__PURE__ */ new Date();
82
82
  return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
83
- }, he = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
- const n = de(t, e, s);
85
- return y({
83
+ }, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
+ const n = ue(t, e, s);
85
+ return x({
86
86
  text: t || "",
87
87
  disabled: !t,
88
88
  class: `
@@ -92,19 +92,19 @@ const oe = (t) => {
92
92
  `,
93
93
  click: () => i(a, s)
94
94
  });
95
- }, ue = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = re(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = ce(t, e, u), f = [...i, ...n, ...c], g = [];
95
+ }, ge = (t, e) => {
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = he(t, e, u), f = [...i, ...n, ...c], g = [];
97
97
  for (let r = 0; r < f.length; r += 7) {
98
- const m = f.slice(r, r + 7), w = m.find((U) => U) || new Date(t, e, 1), { weekNumber: j, year: A } = le(w);
98
+ const m = f.slice(r, r + 7), b = m.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: U } = ce(b);
99
99
  g.push({
100
- weekNumber: j,
101
- year: A,
100
+ weekNumber: A,
101
+ year: U,
102
102
  days: m
103
103
  });
104
104
  }
105
105
  return g;
106
- }, fe = ({ selectWeek: t }) => Y("month", (e, s, { data: a }) => {
107
- const { year: i, month: n, currentDate: l } = a, u = ue(i, n);
106
+ }, me = ({ selectWeek: t }) => H("month", (e, s, { data: a }) => {
107
+ const { year: i, month: n, currentDate: l } = a, u = ge(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -141,7 +141,7 @@ const oe = (t) => {
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  f.map(
144
- (r) => he({
144
+ (r) => fe({
145
145
  year: (r == null ? void 0 : r.getFullYear()) || null,
146
146
  month: (r == null ? void 0 : r.getMonth()) || null,
147
147
  day: (r == null ? void 0 : r.getDate()) || null,
@@ -154,7 +154,7 @@ const oe = (t) => {
154
154
  )
155
155
  ]
156
156
  );
157
- }), M = ({ label: t, click: e }) => C(
157
+ }), W = ({ label: t, click: e }) => C(
158
158
  {
159
159
  class: `
160
160
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -167,18 +167,18 @@ const oe = (t) => {
167
167
  variant: "icon",
168
168
  icon: t === "Previous" ? k.chevron.single.left : k.chevron.single.right
169
169
  }
170
- ), ge = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
170
+ ), pe = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
171
  v("[[monthName]] [[year]]"),
172
- M({
172
+ W({
173
173
  label: "Previous",
174
174
  click: e
175
175
  }),
176
- M({
176
+ W({
177
177
  label: "Next",
178
178
  click: t
179
179
  })
180
180
  ]);
181
- class at extends h {
181
+ class ot extends h {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -193,7 +193,7 @@ class at extends h {
193
193
  * @returns {Data}
194
194
  */
195
195
  setData() {
196
- const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = B(s, e.getFullYear());
196
+ const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = R(s, e.getFullYear());
197
197
  return new L({
198
198
  monthName: this.getMonthName(a.getMonth()),
199
199
  year: a.getFullYear(),
@@ -231,7 +231,7 @@ class at extends h {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(e) {
234
- return K.monthNames[e];
234
+ return G.monthNames[e];
235
235
  }
236
236
  /**
237
237
  * Updates the calendar to show the previous month.
@@ -276,7 +276,7 @@ class at extends h {
276
276
  */
277
277
  selectWeek(e, s) {
278
278
  this.data.currentWeek = e;
279
- const a = B(e, s);
279
+ const a = R(e, s);
280
280
  this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
281
281
  }
282
282
  /**
@@ -286,38 +286,38 @@ class at extends h {
286
286
  */
287
287
  render() {
288
288
  return o({ class: "week-calendar-container border rounded-md bg-background p-3" }, [
289
- ge({
289
+ pe({
290
290
  next: () => this.goToNextMonth(),
291
291
  previous: () => this.goToPreviousMonth()
292
292
  }),
293
- fe({
293
+ me({
294
294
  selectWeek: (e, s) => this.selectWeek(e, s)
295
295
  })
296
296
  ]);
297
297
  }
298
298
  }
299
- const me = (t, e) => {
299
+ const we = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, pe = (t) => R({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- F((e) => new te({ class: "mr-2", onChange: (s, a) => me(e, a) }))
304
- ]), be = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
302
+ }, be = (t) => P({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
+ F((e) => new ae({ class: "mr-2", onChange: (s, a) => we(e, a) }))
304
+ ]), ye = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
- return R({
306
+ return P({
307
307
  class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
308
308
  click: e && (() => i(s))
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
311
  v(a),
312
- e && H({ class: "ml-2", html: k.arrows.upDown })
312
+ e && E({ class: "ml-2", html: k.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, N = (t) => E([
316
- Q({
315
+ }, T = (t) => Q([
316
+ X({
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
320
- (e) => e.label === "checkbox" ? pe({ toggle: t.toggle }) : be({
320
+ (e) => e.label === "checkbox" ? be({ toggle: t.toggle }) : ye({
321
321
  align: e.align,
322
322
  sortable: e.sortable,
323
323
  key: e.key,
@@ -326,14 +326,14 @@ const me = (t, e) => {
326
326
  })
327
327
  ]
328
328
  })
329
- ]), we = ({ key: t, rows: e, selectRow: s, rowItem: a }) => new _({
329
+ ]), ke = ({ key: t, rows: e, selectRow: s, rowItem: a }) => new J({
330
330
  cache: "list",
331
331
  key: t,
332
332
  items: e,
333
333
  rowItem: (i) => a(i, s),
334
334
  class: "divide-y divide-border"
335
335
  });
336
- class xe extends h {
336
+ class N extends h {
337
337
  /**
338
338
  * Initializes component data.
339
339
  *
@@ -402,12 +402,12 @@ class xe extends h {
402
402
  const e = this.rows, s = this.border !== !1 ? "border" : "";
403
403
  return o({ class: "w-full" }, [
404
404
  o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
405
- W({ class: "w-full" }, [
405
+ I({ class: "w-full" }, [
406
406
  // @ts-ignore
407
- this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
407
+ this.headers && T({ headers: this.headers, sort: (a) => this.sortRows(a) }),
408
408
  // @ts-ignore
409
409
  this.customHeader ?? null,
410
- we({
410
+ ke({
411
411
  // @ts-ignore
412
412
  key: this.key,
413
413
  rows: e,
@@ -480,7 +480,80 @@ class xe extends h {
480
480
  this.data.selectedRows = [];
481
481
  }
482
482
  }
483
- const ke = (t) => new J({
483
+ const xe = (t) => new Z({
484
+ cache: "list",
485
+ loadMoreItems: t.loadMoreItems,
486
+ offset: t.offset,
487
+ limit: t.limit,
488
+ key: t.key,
489
+ tableData: t.tableData,
490
+ items: t.items,
491
+ rowItem: (e) => t.rowItem(e, t.selectRow),
492
+ class: "divide-y divide-border"
493
+ });
494
+ class ve extends N {
495
+ /**
496
+ * Renders the DataTable component.
497
+ *
498
+ * @returns {object}
499
+ */
500
+ render() {
501
+ const e = this.rows, s = this.border !== !1 ? "border" : "";
502
+ return o({ class: "w-full" }, [
503
+ o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
504
+ I({ class: "w-full" }, [
505
+ // @ts-ignore
506
+ this.headers && T({ headers: this.headers, sort: (a) => this.sortRows(a) }),
507
+ // @ts-ignore
508
+ this.customHeader ?? null,
509
+ xe({
510
+ // @ts-ignore
511
+ loadMoreItems: this.loadMoreItems,
512
+ // @ts-ignore
513
+ offset: this.offset,
514
+ // @ts-ignore
515
+ limit: this.limit,
516
+ // @ts-ignore
517
+ class: this.class,
518
+ // @ts-ignore
519
+ tableData: this.tableData,
520
+ // @ts-ignore
521
+ key: this.key,
522
+ items: e,
523
+ // @ts-ignore
524
+ selectRow: this.selectRow.bind(this),
525
+ // @ts-ignore
526
+ rowItem: this.rowItem
527
+ })
528
+ ])
529
+ ])
530
+ ]);
531
+ }
532
+ /**
533
+ * Refreshes the list.
534
+ *
535
+ * @returns {void}
536
+ */
537
+ refresh() {
538
+ this.list.refresh();
539
+ }
540
+ }
541
+ const lt = d((t) => new ve(
542
+ {
543
+ cache: t.cache ?? "list",
544
+ tableData: t.data,
545
+ loadMoreItems: t.loadMoreItems,
546
+ offset: t.offset,
547
+ limit: t.limit,
548
+ class: t.class,
549
+ key: t.key,
550
+ rows: t.rows,
551
+ rowItem: t.rowItem,
552
+ headers: t.headers,
553
+ customHeader: t.customHeader,
554
+ border: t.border
555
+ }
556
+ )), De = (t) => new ee({
484
557
  cache: "list",
485
558
  scrollContainer: t.scrollContainer,
486
559
  loadMoreItems: t.loadMoreItems,
@@ -492,7 +565,7 @@ const ke = (t) => new J({
492
565
  rowItem: (e) => t.rowItem(e, t.selectRow),
493
566
  class: "divide-y divide-border"
494
567
  });
495
- class ye extends xe {
568
+ class Se extends N {
496
569
  /**
497
570
  * Renders the DataTable component.
498
571
  *
@@ -502,12 +575,12 @@ class ye extends xe {
502
575
  const e = this.rows, s = this.border !== !1 ? "border" : "";
503
576
  return o({ class: "w-full" }, [
504
577
  o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
505
- W({ class: "w-full" }, [
578
+ I({ class: "w-full" }, [
506
579
  // @ts-ignore
507
- this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
580
+ this.headers && T({ headers: this.headers, sort: (a) => this.sortRows(a) }),
508
581
  // @ts-ignore
509
582
  this.customHeader ?? null,
510
- ke({
583
+ De({
511
584
  // @ts-ignore
512
585
  scrollContainer: this.scrollContainer,
513
586
  // @ts-ignore
@@ -541,7 +614,7 @@ class ye extends xe {
541
614
  this.list.refresh();
542
615
  }
543
616
  }
544
- const it = d((t) => new ye(
617
+ const rt = d((t) => new Se(
545
618
  {
546
619
  cache: t.cache ?? "list",
547
620
  tableData: t.data,
@@ -557,45 +630,45 @@ const it = d((t) => new ye(
557
630
  customHeader: t.customHeader,
558
631
  border: t.border
559
632
  }
560
- )), ve = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
633
+ )), Ie = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
561
634
  p({ class: "text-base font-semibold leading-6 m-0" }, t),
562
635
  p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
563
- ])), De = () => o({ class: "flex items-center gap-x-1.5" }, [
636
+ ])), Le = () => o({ class: "flex items-center gap-x-1.5" }, [
564
637
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
565
638
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
566
639
  ]),
567
640
  p({ class: "text-xs leading-5 text-gray-500" }, "Online")
568
- ]), Se = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
641
+ ]), Ce = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
569
642
  v("Last seen "),
570
- X({ datetime: t }, "3h ago")
571
- ]), Le = (t, e) => t === "online" ? De() : Se(e), Ce = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
643
+ q({ datetime: t }, "3h ago")
644
+ ]), Te = (t, e) => t === "online" ? Le() : Ce(e), Be = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
572
645
  p({ class: "text-sm leading-6 m-0" }, t),
573
- Le(s, e)
574
- ])), Ie = (t) => t.split(" ").map((s) => s[0]).join(""), Te = d((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
646
+ Te(s, e)
647
+ ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
575
648
  o({ class: "flex min-w-0 gap-x-4" }, [
576
- ie({ src: t.image, alt: t.name, fallbackText: Ie(t.name) }),
577
- ve({ name: t.name, email: t.email })
649
+ oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
650
+ Ie({ name: t.name, email: t.email })
578
651
  ]),
579
- Ce({
652
+ Be({
580
653
  role: t.role,
581
654
  lastSeen: t.lastSeen,
582
655
  status: t.status
583
656
  })
584
- ])), nt = d((t) => new Z({
657
+ ])), ct = d((t) => new te({
585
658
  cache: "list",
586
659
  key: "name",
587
660
  items: t.users,
588
661
  role: "list",
589
662
  class: "divide-y divide-border",
590
- rowItem: Te
591
- })), Be = (t, e) => e.includes(t), Me = (t, e, s) => t.exact ? s === e : Be(e, s), Re = ({ text: t, href: e, exact: s, hidden: a }) => new O({
663
+ rowItem: Re
664
+ })), We = (t, e) => e.includes(t), Pe = (t, e, s) => t.exact ? s === e : We(e, s), Oe = ({ text: t, href: e, exact: s, hidden: a }) => new z({
592
665
  text: t,
593
666
  href: e,
594
667
  exact: s,
595
668
  dataSet: ["selected", ["state", !0, "active"]],
596
669
  class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
597
670
  });
598
- class ot extends h {
671
+ class dt extends h {
599
672
  /**
600
673
  * This will declare the props for the compiler.
601
674
  *
@@ -619,11 +692,11 @@ class ot extends h {
619
692
  return S(
620
693
  { class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
621
694
  [
622
- b({
695
+ w({
623
696
  class: "flex space-x-4",
624
697
  map: [this.options, (e) => this.addLink(e)],
625
698
  watch: {
626
- value: ["[[path]]", x.data],
699
+ value: ["[[path]]", y.data],
627
700
  callBack: this.updateLinks.bind(this)
628
701
  }
629
702
  })
@@ -636,7 +709,7 @@ class ot extends h {
636
709
  * @returns {void}
637
710
  */
638
711
  afterSetup() {
639
- const e = x.data.path;
712
+ const e = y.data.path;
640
713
  this.updateLinks(e);
641
714
  }
642
715
  /**
@@ -651,7 +724,7 @@ class ot extends h {
651
724
  for (const a of this.links) {
652
725
  if (!a.rendered)
653
726
  continue;
654
- Me(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
727
+ Pe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
655
728
  }
656
729
  !s && this.links[0] && this.updateLink(this.links[0], !0);
657
730
  }
@@ -681,7 +754,7 @@ class ot extends h {
681
754
  * @returns {object}
682
755
  */
683
756
  addLink({ label: e, href: s, exact: a, hidden: i }) {
684
- const n = Re({ text: e, href: s, exact: a, hidden: i });
757
+ const n = Oe({ text: e, href: s, exact: a, hidden: i });
685
758
  return this.links.push(n), n;
686
759
  }
687
760
  /**
@@ -693,13 +766,13 @@ class ot extends h {
693
766
  this.links = [];
694
767
  }
695
768
  }
696
- const lt = d((t) => {
769
+ const ht = d((t) => {
697
770
  const e = t.margin || "m-4 ml-0";
698
771
  return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
699
772
  C({ variant: "back", class: "ghost", ...t })
700
773
  ]);
701
774
  });
702
- class $ extends h {
775
+ class j extends h {
703
776
  /**
704
777
  * This will declare the props for the compiler.
705
778
  *
@@ -786,13 +859,13 @@ class $ extends h {
786
859
  return this.children;
787
860
  }
788
861
  }
789
- z.addType("dockableOverlay", (t) => {
862
+ $.addType("dockableOverlay", (t) => {
790
863
  if (!t)
791
864
  return;
792
865
  const e = t.component;
793
866
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
794
867
  });
795
- class rt extends $ {
868
+ class ut extends j {
796
869
  /**
797
870
  * This will stop presistence.
798
871
  *
@@ -858,7 +931,7 @@ class rt extends $ {
858
931
  * @returns {void}
859
932
  */
860
933
  afterSetup() {
861
- z.add(
934
+ $.add(
862
935
  this.container,
863
936
  "dockableOverlay",
864
937
  {
@@ -901,7 +974,7 @@ class rt extends $ {
901
974
  document.documentElement.style.overflowY = "auto";
902
975
  }
903
976
  }
904
- class ct extends $ {
977
+ class ft extends j {
905
978
  /**
906
979
  * This will get the overlay type.
907
980
  *
@@ -920,7 +993,7 @@ class ct extends $ {
920
993
  this.container = e, this.initialize();
921
994
  }
922
995
  }
923
- const We = d(({ index: t, click: e, state: s }, a) => D({
996
+ const ze = d(({ index: t, click: e, state: s }, a) => D({
924
997
  class: "p-2 cursor-pointer hover:bg-muted/50",
925
998
  onState: [
926
999
  [s, "selectedIndex", {
@@ -929,11 +1002,11 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
929
1002
  }]
930
1003
  ],
931
1004
  click: () => e(t)
932
- }, a)), Pe = d(({ selectOption: t, state: e }) => b({
1005
+ }, a)), $e = d(({ selectOption: t, state: e }) => w({
933
1006
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
934
- for: ["filteredOptions", (s, a) => We({ index: a, click: t, state: e }, s.label)]
935
- })), Oe = d((t) => o({ class: "relative flex items-center" }, [
936
- se({
1007
+ for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
1008
+ })), Ne = d((t) => o({ class: "relative flex items-center" }, [
1009
+ ie({
937
1010
  cache: "input",
938
1011
  placeholder: t.placeholder ?? "Search...",
939
1012
  bind: [t.state, "searchQuery"],
@@ -944,22 +1017,22 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
944
1017
  keydown: (e) => typeof t.handleKeyDown == "function" && t.handleKeyDown(e)
945
1018
  }),
946
1019
  t.icon && o({ class: "absolute right-0 mr-2" }, [
947
- V(t.icon)
1020
+ _(t.icon)
948
1021
  ])
949
- ])), ze = (t) => o({
1022
+ ])), je = (t) => o({
950
1023
  class: "relative flex fle-auto flex-col",
951
1024
  onState: ["open", (e, s, a) => {
952
1025
  if (e)
953
- return new ne({
1026
+ return new le({
954
1027
  cache: "dropdown",
955
1028
  parent: a,
956
1029
  button: a.input,
957
1030
  size: "xl"
958
1031
  }, [
959
- Pe(t)
1032
+ $e(t)
960
1033
  ]);
961
1034
  }]
962
- }), dt = G(
1035
+ }), gt = V(
963
1036
  {
964
1037
  /**
965
1038
  * This will set up the data object.
@@ -1056,7 +1129,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
1056
1129
  */
1057
1130
  render() {
1058
1131
  return o({ class: "relative w-full max-w-md" }, [
1059
- Oe({
1132
+ Ne({
1060
1133
  // @ts-ignore
1061
1134
  state: this.state,
1062
1135
  // @ts-ignore
@@ -1068,7 +1141,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
1068
1141
  // @ts-ignore
1069
1142
  handleKeyDown: this.handleKeyDown.bind(this)
1070
1143
  }),
1071
- ze({
1144
+ je({
1072
1145
  // @ts-ignore
1073
1146
  state: this.state,
1074
1147
  // @ts-ignore
@@ -1079,22 +1152,22 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
1079
1152
  ]);
1080
1153
  }
1081
1154
  }
1082
- ), Ne = (t) => D(
1155
+ ), Ae = (t) => D(
1083
1156
  {
1084
1157
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1085
1158
  dataSet: ["selected", ["state", t.value, "active"]]
1086
1159
  },
1087
1160
  [
1088
- y({
1161
+ x({
1089
1162
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
1090
1163
  onSet: ["selected", { selected: t.value }],
1091
1164
  click: (e) => t.callBack(t.value)
1092
1165
  }, t.label)
1093
1166
  ]
1094
- ), $e = (t, e) => (t.callBack = e, Ne(t)), je = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1095
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => $e(e, t.callBack)] })
1167
+ ), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1168
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1096
1169
  ]);
1097
- class ht extends h {
1170
+ class mt extends h {
1098
1171
  /**
1099
1172
  * This will declare the props for the compiler.
1100
1173
  *
@@ -1111,12 +1184,12 @@ class ht extends h {
1111
1184
  render() {
1112
1185
  const e = this.select.bind(this);
1113
1186
  return o({ class: "" }, [
1114
- je({
1187
+ Ye({
1115
1188
  class: this.class,
1116
1189
  options: this.options,
1117
1190
  callBack: e
1118
1191
  }),
1119
- P({
1192
+ O({
1120
1193
  class: "tab-content",
1121
1194
  onState: ["selected", this.updateContent.bind(this)]
1122
1195
  })
@@ -1182,23 +1255,23 @@ class ht extends h {
1182
1255
  };
1183
1256
  }
1184
1257
  }
1185
- const Ae = (t) => D(
1258
+ const He = (t) => D(
1186
1259
  {
1187
1260
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1188
1261
  dataSet: ["selected", ["state", t.value, "active"]]
1189
1262
  },
1190
1263
  [
1191
- y({
1264
+ x({
1192
1265
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
1193
1266
  onSet: ["selected", { selected: t.value }],
1194
1267
  click: (e) => t.callBack(t.value),
1195
1268
  disabled: t.disabled
1196
1269
  }, t.label)
1197
1270
  ]
1198
- ), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1199
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1271
+ ), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1272
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1200
1273
  ]);
1201
- class ut extends h {
1274
+ class pt extends h {
1202
1275
  /**
1203
1276
  * This will declare the props for the compiler.
1204
1277
  *
@@ -1214,7 +1287,7 @@ class ut extends h {
1214
1287
  */
1215
1288
  render() {
1216
1289
  const e = this.select.bind(this);
1217
- return Ye({
1290
+ return Ee({
1218
1291
  class: this.class,
1219
1292
  options: this.options,
1220
1293
  callBack: e
@@ -1241,17 +1314,17 @@ class ut extends h {
1241
1314
  };
1242
1315
  }
1243
1316
  }
1244
- const Fe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), He = (t, e) => {
1317
+ const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
1245
1318
  const s = t.getLinkPath();
1246
- return t.exact ? e === s : Fe(s, e);
1247
- }, Ee = ({ text: t, href: e, exact: s }) => new O({
1319
+ return t.exact ? e === s : Qe(s, e);
1320
+ }, qe = ({ text: t, href: e, exact: s }) => new z({
1248
1321
  text: t,
1249
1322
  href: e,
1250
1323
  exact: s,
1251
1324
  dataSet: ["selected", ["state", !0, "active"]],
1252
1325
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"
1253
1326
  });
1254
- class Qe extends h {
1327
+ class Ke extends h {
1255
1328
  /**
1256
1329
  * This will declare the props for the compiler.
1257
1330
  *
@@ -1273,11 +1346,11 @@ class Qe extends h {
1273
1346
  */
1274
1347
  render() {
1275
1348
  return S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1276
- b({
1349
+ w({
1277
1350
  class: "flex flex-auto flex-row",
1278
1351
  map: [this.options, (e) => this.addLink(e)],
1279
1352
  watch: {
1280
- value: ["[[path]]", x.data],
1353
+ value: ["[[path]]", y.data],
1281
1354
  callBack: this.updateLinks.bind(this)
1282
1355
  }
1283
1356
  })
@@ -1289,7 +1362,7 @@ class Qe extends h {
1289
1362
  * @returns {void}
1290
1363
  */
1291
1364
  afterSetup() {
1292
- const e = x.data.path;
1365
+ const e = y.data.path;
1293
1366
  this.updateLinks(e);
1294
1367
  }
1295
1368
  /**
@@ -1302,7 +1375,7 @@ class Qe extends h {
1302
1375
  let s = !1, a = this.links[0];
1303
1376
  this.deactivateAllLinks();
1304
1377
  for (const i of this.links)
1305
- if (i.rendered !== !1 && (s = He(i, e), s === !0)) {
1378
+ if (i.rendered !== !1 && (s = Xe(i, e), s === !0)) {
1306
1379
  this.updateLink(i, !0);
1307
1380
  break;
1308
1381
  }
@@ -1334,7 +1407,7 @@ class Qe extends h {
1334
1407
  * @returns {object}
1335
1408
  */
1336
1409
  addLink({ label: e, href: s, exact: a }) {
1337
- const i = Ee({ text: e, href: s, exact: a });
1410
+ const i = qe({ text: e, href: s, exact: a });
1338
1411
  return this.links.push(i), i;
1339
1412
  }
1340
1413
  /**
@@ -1346,7 +1419,7 @@ class Qe extends h {
1346
1419
  this.links = [];
1347
1420
  }
1348
1421
  }
1349
- class ft extends h {
1422
+ class wt extends h {
1350
1423
  /**
1351
1424
  * This will declare the props for the compiler.
1352
1425
  *
@@ -1362,11 +1435,11 @@ class ft extends h {
1362
1435
  */
1363
1436
  render() {
1364
1437
  return o({ class: "tab-panel" }, [
1365
- new Qe({
1438
+ new Ke({
1366
1439
  class: this.class,
1367
1440
  options: this.options
1368
1441
  }),
1369
- P({
1442
+ O({
1370
1443
  class: "tab-content",
1371
1444
  switch: this.addGroup()
1372
1445
  })
@@ -1392,7 +1465,7 @@ class ft extends h {
1392
1465
  return s;
1393
1466
  }
1394
1467
  }
1395
- class Xe extends h {
1468
+ class Ge extends h {
1396
1469
  /**
1397
1470
  * Runs before rendering, sets up defaults, a timer for drawing,
1398
1471
  * and basic canvas properties.
@@ -1402,7 +1475,7 @@ class Xe extends h {
1402
1475
  onCreated() {
1403
1476
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1404
1477
  const e = 1e3 / 60;
1405
- this.timer = new ee(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
1478
+ this.timer = new se(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
1406
1479
  }
1407
1480
  /**
1408
1481
  * Renders a <canvas> element.
@@ -1410,7 +1483,7 @@ class Xe extends h {
1410
1483
  * @returns {object} Layout definition for the canvas.
1411
1484
  */
1412
1485
  render() {
1413
- return q({
1486
+ return K({
1414
1487
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1415
1488
  });
1416
1489
  }
@@ -1507,8 +1580,8 @@ class Xe extends h {
1507
1580
  const { canvas: e, ctx: s } = this, a = e.toDataURL();
1508
1581
  if (this.scale(), this.setupBackground(s), a !== "data:,") {
1509
1582
  const i = new globalThis.Image();
1510
- I.on("load", i, function n() {
1511
- s.drawImage(i, 0, 0), I.off("load", i, n);
1583
+ B.on("load", i, function n() {
1584
+ s.drawImage(i, 0, 0), B.off("load", i, n);
1512
1585
  }), i.src = a;
1513
1586
  }
1514
1587
  this.draw();
@@ -1528,7 +1601,7 @@ class Xe extends h {
1528
1601
  * @returns {void}
1529
1602
  */
1530
1603
  noScaleResize() {
1531
- const e = T.getSize(container);
1604
+ const e = M.getSize(container);
1532
1605
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1533
1606
  }
1534
1607
  /**
@@ -1538,11 +1611,11 @@ class Xe extends h {
1538
1611
  * @returns {void}
1539
1612
  */
1540
1613
  scale() {
1541
- const e = this.canvas, s = this.container, a = T.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1614
+ const e = this.canvas, s = this.container, a = M.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1542
1615
  let u = n + "px", c = l + "px";
1543
1616
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1544
- const f = a.width, g = a.height, r = f / n, m = g / l, w = Math.min(r, m);
1545
- u = n * w + "px", c = l * w + "px";
1617
+ const f = a.width, g = a.height, r = f / n, m = g / l, b = Math.min(r, m);
1618
+ u = n * b + "px", c = l * b + "px";
1546
1619
  }
1547
1620
  e.style.width = u, e.style.height = c;
1548
1621
  }
@@ -1618,7 +1691,7 @@ class Xe extends h {
1618
1691
  this.timer.stop(), this.status = "stopped";
1619
1692
  }
1620
1693
  }
1621
- class gt extends h {
1694
+ class bt extends h {
1622
1695
  /**
1623
1696
  * Sets up default properties for the signature panel.
1624
1697
  *
@@ -1635,7 +1708,7 @@ class gt extends h {
1635
1708
  */
1636
1709
  render() {
1637
1710
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1638
- ae({
1711
+ ne({
1639
1712
  cache: "hiddenInput",
1640
1713
  required: !0,
1641
1714
  bind: this.path + ".data"
@@ -1647,7 +1720,7 @@ class gt extends h {
1647
1720
  click: this.reset.bind(this)
1648
1721
  })
1649
1722
  ]),
1650
- new Xe({
1723
+ new Ge({
1651
1724
  cache: "canvasLayer",
1652
1725
  margin: this.margin,
1653
1726
  targetSize: this.targetSize,
@@ -1697,34 +1770,35 @@ class gt extends h {
1697
1770
  }
1698
1771
  }
1699
1772
  export {
1700
- lt as B,
1701
- pe as C,
1702
- we as D,
1703
- be as H,
1704
- ct as I,
1705
- ot as N,
1706
- $ as O,
1707
- et as P,
1708
- it as S,
1709
- N as T,
1710
- Te as U,
1711
- at as W,
1712
- ce as a,
1713
- B as b,
1714
- le as c,
1715
- tt as d,
1716
- st as e,
1717
- he as f,
1718
- re as g,
1719
- fe as h,
1720
- ge as i,
1721
- xe as j,
1722
- nt as k,
1723
- rt as l,
1724
- dt as m,
1725
- ht as n,
1726
- ut as o,
1727
- Qe as p,
1728
- ft as q,
1729
- gt as r
1773
+ ht as B,
1774
+ be as C,
1775
+ ke as D,
1776
+ ye as H,
1777
+ ft as I,
1778
+ dt as N,
1779
+ j as O,
1780
+ at as P,
1781
+ rt as S,
1782
+ T,
1783
+ Re as U,
1784
+ ot as W,
1785
+ he as a,
1786
+ R as b,
1787
+ ce as c,
1788
+ it as d,
1789
+ nt as e,
1790
+ fe as f,
1791
+ de as g,
1792
+ me as h,
1793
+ pe as i,
1794
+ N as j,
1795
+ lt as k,
1796
+ ct as l,
1797
+ ut as m,
1798
+ gt as n,
1799
+ mt as o,
1800
+ pt as p,
1801
+ Ke as q,
1802
+ wt as r,
1803
+ bt as s
1730
1804
  };