@base-framework/ui 1.0.273 → 1.0.274

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 k, Div as o, On as v, Span as D, Th as O, UseParent as F, I as E, Thead as Q, Tr as X, Table as L, P as p, Li as S, Time as q, Nav as I, Ul as w, Section as z, Canvas as K } from "@base-framework/atoms";
2
- import { Atom as d, Component as h, Data as C, DateTime as G, router as y, NavLink as $, DataTracker as N, Jot as V, base as M, Dom as R } from "@base-framework/base";
3
- import { B as T, I as _ } from "./buttons-BKLL4I6r.js";
4
- import { Icons as x } from "./icons.es.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-DYxmO1rQ.js";
7
- import { A as oe, P as le } from "./range-calendar-DW0cMOJy.js";
1
+ import { Button as x, Div as o, On as v, Span as D, Th as O, UseParent as E, I as Q, Thead as X, Tr as z, Td as q, Table as C, P as p, Li as S, Time as K, Nav as I, Ul as w, Section as $, Canvas as _ } from "@base-framework/atoms";
2
+ import { Atom as d, Component as h, Data as L, DateTime as G, router as k, NavLink as N, DataTracker as A, Jot as V, base as R, Dom as M } from "@base-framework/base";
3
+ import { B as T, I as J } from "./buttons-BKLL4I6r.js";
4
+ import { Icons as y } from "./icons.es.js";
5
+ import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
6
+ import { C as ie, S as ne, I as oe, H as le } from "./skeleton-CLm2c9Bc.js";
7
+ import { A as re, P as ce } from "./range-calendar-DW0cMOJy.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 }) => k({
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 at extends h {
19
+ class ot extends h {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -34,36 +34,36 @@ class at extends h {
34
34
  return o({ class: this.class || "" }, this.children);
35
35
  }
36
36
  }
37
- const re = (t) => {
37
+ const de = (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
- }, ce = (t) => {
41
+ }, he = (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 && !re(a) ? {
47
+ return n > 52 && !de(a) ? {
48
48
  weekNumber: 1,
49
49
  year: a + 1
50
50
  } : {
51
51
  weekNumber: n,
52
52
  year: a
53
53
  };
54
- }, de = (t, e, s) => {
54
+ }, ue = (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
- }, he = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), W = (t, e) => {
61
+ }, fe = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), W = (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
- }, it = (t, e) => {
66
+ }, lt = (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 re = (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
- }, nt = (t, e) => {
74
+ }, rt = (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
- }, ue = (t, e, s) => {
80
+ }, ge = (t, e, s) => {
81
81
  const a = /* @__PURE__ */ new Date();
82
82
  return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
83
- }, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
- const n = ue(t, e, s);
85
- return k({
83
+ }, me = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
+ const n = ge(t, e, s);
85
+ return x({
86
86
  text: t || "",
87
87
  disabled: !t,
88
88
  class: `
@@ -92,19 +92,19 @@ const re = (t) => {
92
92
  `,
93
93
  click: () => i(a, s)
94
94
  });
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 = [];
95
+ }, pe = (t, e) => {
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = ue(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 = fe(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), b = m.find((H) => H) || new Date(t, e, 1), { weekNumber: U, year: Y } = ce(b);
98
+ const m = f.slice(r, r + 7), b = m.find((F) => F) || new Date(t, e, 1), { weekNumber: Y, year: H } = he(b);
99
99
  g.push({
100
- weekNumber: U,
101
- year: Y,
100
+ weekNumber: Y,
101
+ year: H,
102
102
  days: m
103
103
  });
104
104
  }
105
105
  return g;
106
- }, me = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
- const { year: i, month: n, currentDate: l } = a, u = ge(i, n);
106
+ }, we = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
+ const { year: i, month: n, currentDate: l } = a, u = pe(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 re = (t) => {
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  f.map(
144
- (r) => fe({
144
+ (r) => me({
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,
@@ -165,9 +165,9 @@ const re = (t) => {
165
165
  click: e,
166
166
  "aria-label": `${t} month`,
167
167
  variant: "icon",
168
- icon: t === "Previous" ? x.chevron.single.left : x.chevron.single.right
168
+ icon: t === "Previous" ? y.chevron.single.left : y.chevron.single.right
169
169
  }
170
- ), pe = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
170
+ ), be = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
171
  D("[[monthName]] [[year]]"),
172
172
  P({
173
173
  label: "Previous",
@@ -178,7 +178,7 @@ const re = (t) => {
178
178
  click: t
179
179
  })
180
180
  ]);
181
- class ot extends h {
181
+ class ct extends h {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -194,7 +194,7 @@ class ot extends h {
194
194
  */
195
195
  setData() {
196
196
  const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(s, e.getFullYear());
197
- return new C({
197
+ return new L({
198
198
  monthName: this.getMonthName(a.getMonth()),
199
199
  year: a.getFullYear(),
200
200
  month: a.getMonth(),
@@ -286,22 +286,22 @@ class ot extends h {
286
286
  */
287
287
  render() {
288
288
  return o({ class: "week-calendar-container border rounded-md p-3" }, [
289
- pe({
289
+ be({
290
290
  next: () => this.goToNextMonth(),
291
291
  previous: () => this.goToPreviousMonth()
292
292
  }),
293
- me({
293
+ we({
294
294
  selectWeek: (e, s) => this.selectWeek(e, s)
295
295
  })
296
296
  ]);
297
297
  }
298
298
  }
299
- const we = (t, e) => {
299
+ const ke = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, be = (t) => O({ 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 }) => {
302
+ }, ye = (t) => O({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
+ E((e) => new ie({ class: "mr-2", onChange: (s, a) => ke(e, a) }))
304
+ ]), xe = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
306
  return O({
307
307
  class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
@@ -309,15 +309,15 @@ const we = (t, e) => {
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
311
  D(a),
312
- e && E({ class: "ml-2", html: x.arrows.upDown })
312
+ e && Q({ class: "ml-2", html: y.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, B = (t) => Q([
316
- X({
315
+ }, B = (t) => X([
316
+ z({
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
320
- (e) => e.label === "checkbox" ? be({ toggle: t.toggle }) : ye({
320
+ (e) => e.label === "checkbox" ? ye({ toggle: t.toggle }) : xe({
321
321
  align: e.align,
322
322
  sortable: e.sortable,
323
323
  key: e.key,
@@ -326,14 +326,28 @@ const we = (t, e) => {
326
326
  })
327
327
  ]
328
328
  })
329
- ]), xe = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i }) => new J({
329
+ ]), ve = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i }) => new Z({
330
330
  cache: "list",
331
331
  key: t,
332
332
  items: e,
333
333
  rowItem: (n) => a(n, s),
334
334
  class: "divide-y divide-border",
335
335
  emptyState: i
336
- });
336
+ }), De = ({ columnCount: t = 3, customCell: e, key: s }) => {
337
+ const a = (i) => {
338
+ if (e && typeof e == "function")
339
+ return e(i);
340
+ const n = ["w-3/4", "w-1/2", "w-full", "w-2/3", "w-5/6"], l = n[i % n.length];
341
+ return q({ class: "px-6 py-4" }, [
342
+ ne({ width: l, height: "h-4" })
343
+ ]);
344
+ };
345
+ return z({
346
+ class: "border-b",
347
+ key: s,
348
+ children: Array.from({ length: t }, (i, n) => a(n))
349
+ });
350
+ };
337
351
  class j extends h {
338
352
  /**
339
353
  * Initializes component data.
@@ -342,11 +356,15 @@ class j extends h {
342
356
  */
343
357
  setData() {
344
358
  let e = this.rows && this.rows.length > 0;
345
- return (this.loadMoreItems || this.tableData) && !e && (e = null), new C({
359
+ (this.loadMoreItems || this.tableData) && !e && (e = null);
360
+ const s = this.skeleton && !e;
361
+ return new L({
346
362
  selectedRows: [],
347
363
  // @ts-ignore
348
- hasItems: e,
349
- selected: !1
364
+ hasItems: s ? !0 : e,
365
+ selected: !1,
366
+ // @ts-ignore
367
+ showSkeleton: s
350
368
  });
351
369
  }
352
370
  /**
@@ -367,6 +385,33 @@ class j extends h {
367
385
  const e = this.data.get("selectedRows");
368
386
  this.data.selected = e.length > 0;
369
387
  }
388
+ /**
389
+ * Generates skeleton rows for the table.
390
+ *
391
+ * @returns {Array}
392
+ */
393
+ generateSkeletonRows() {
394
+ const e = this.skeleton;
395
+ let s = 5, a = null;
396
+ typeof e == "object" && (s = e.number || 5, a = e.row || null);
397
+ const i = this.headers ? this.headers.length : 3;
398
+ return Array.from({ length: s }, (n, l) => a && typeof a == "function" ? a(l, i) : De({
399
+ columnCount: i,
400
+ key: `skeleton-${l}`
401
+ }));
402
+ }
403
+ /**
404
+ * Removes skeleton rows and shows real content.
405
+ *
406
+ * @returns {void}
407
+ */
408
+ removeSkeleton() {
409
+ if (this.data.get("showSkeleton")) {
410
+ this.data.showSkeleton = !1;
411
+ const e = this.rows && this.rows.length > 0;
412
+ this.data.hasItems = e;
413
+ }
414
+ }
370
415
  /**
371
416
  * This will get the selected rows.
372
417
  *
@@ -403,16 +448,16 @@ class j extends h {
403
448
  * @returns {object}
404
449
  */
405
450
  render() {
406
- const e = this.rows, s = this.border !== !1 ? "border" : "";
451
+ const e = this.data.get("showSkeleton") ? this.generateSkeletonRows() : this.rows, s = this.border !== !1 ? "border" : "";
407
452
  return o({ class: "w-full flex flex-auto flex-col" }, [
408
453
  v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
409
454
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
410
- L({ class: "w-full" }, [
455
+ C({ class: "w-full" }, [
411
456
  // @ts-ignore
412
457
  this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
413
458
  // @ts-ignore
414
459
  this.customHeader ?? null,
415
- xe({
460
+ ve({
416
461
  // @ts-ignore
417
462
  key: this.key,
418
463
  rows: e,
@@ -445,7 +490,7 @@ class j extends h {
445
490
  * @returns {void}
446
491
  */
447
492
  setRows(e) {
448
- this.list.setRows(e);
493
+ this.removeSkeleton(), this.list.setRows(e);
449
494
  }
450
495
  /**
451
496
  * This will append items to the list.
@@ -455,7 +500,7 @@ class j extends h {
455
500
  * @returns {void}
456
501
  */
457
502
  append(e) {
458
- this.list.append(e);
503
+ this.removeSkeleton(), this.list.append(e);
459
504
  }
460
505
  /**
461
506
  * This will mingle the new items with the old items.
@@ -476,7 +521,7 @@ class j extends h {
476
521
  * @returns {void}
477
522
  */
478
523
  prepend(e) {
479
- this.list.prepend(e);
524
+ this.removeSkeleton(), this.list.prepend(e);
480
525
  }
481
526
  /**
482
527
  * This will remove the selected rows.
@@ -487,7 +532,7 @@ class j extends h {
487
532
  this.data.selectedRows = [];
488
533
  }
489
534
  }
490
- const ke = (t) => new Z({
535
+ const Se = (t) => new ee({
491
536
  cache: "list",
492
537
  loadMoreItems: t.loadMoreItems,
493
538
  offset: t.offset,
@@ -498,23 +543,23 @@ const ke = (t) => new Z({
498
543
  rowItem: (e) => t.rowItem(e, t.selectRow),
499
544
  class: "divide-y divide-border"
500
545
  });
501
- class ve extends j {
546
+ class Ie extends j {
502
547
  /**
503
548
  * Renders the DataTable component.
504
549
  *
505
550
  * @returns {object}
506
551
  */
507
552
  render() {
508
- const e = this.rows, s = this.border !== !1 ? "border" : "";
553
+ const e = this.data.showSkeleton ? this.generateSkeletonRows() : this.rows, s = this.border !== !1 ? "border" : "";
509
554
  return o({ class: "w-full flex flex-auto flex-col" }, [
510
555
  v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
511
556
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
512
- L({ class: "w-full" }, [
557
+ C({ class: "w-full" }, [
513
558
  // @ts-ignore
514
559
  this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
515
560
  // @ts-ignore
516
561
  this.customHeader ?? null,
517
- ke({
562
+ Se({
518
563
  // @ts-ignore
519
564
  loadMoreItems: this.loadMoreItems,
520
565
  // @ts-ignore
@@ -546,7 +591,7 @@ class ve extends j {
546
591
  this.list.refresh();
547
592
  }
548
593
  }
549
- const lt = d((t) => new ve(
594
+ const dt = d((t) => new Ie(
550
595
  {
551
596
  cache: t.cache ?? "list",
552
597
  tableData: t.data,
@@ -560,9 +605,10 @@ const lt = d((t) => new ve(
560
605
  headers: t.headers,
561
606
  customHeader: t.customHeader,
562
607
  border: t.border,
563
- emptyState: t.emptyState
608
+ emptyState: t.emptyState,
609
+ skeleton: t.skeleton
564
610
  }
565
- )), De = (t) => new ee({
611
+ )), Ce = (t) => new te({
566
612
  cache: "list",
567
613
  scrollContainer: t.scrollContainer,
568
614
  loadMoreItems: t.loadMoreItems,
@@ -574,23 +620,23 @@ const lt = d((t) => new ve(
574
620
  rowItem: (e) => t.rowItem(e, t.selectRow),
575
621
  class: "divide-y divide-border"
576
622
  });
577
- class Se extends j {
623
+ class Le extends j {
578
624
  /**
579
625
  * Renders the DataTable component.
580
626
  *
581
627
  * @returns {object}
582
628
  */
583
629
  render() {
584
- const e = this.rows, s = this.border !== !1 ? "border" : "";
630
+ const e = this.data.get("showSkeleton") ? this.generateSkeletonRows() : this.rows, s = this.border !== !1 ? "border" : "";
585
631
  return o({ class: "w-full flex flex-auto flex-col" }, [
586
632
  v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
587
633
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
588
- L({ class: "w-full" }, [
634
+ C({ class: "w-full" }, [
589
635
  // @ts-ignore
590
636
  this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
591
637
  // @ts-ignore
592
638
  this.customHeader ?? null,
593
- De({
639
+ Ce({
594
640
  // @ts-ignore
595
641
  scrollContainer: this.scrollContainer,
596
642
  // @ts-ignore
@@ -624,7 +670,7 @@ class Se extends j {
624
670
  this.list.refresh();
625
671
  }
626
672
  }
627
- const rt = d((t) => new Se(
673
+ const ht = d((t) => new Le(
628
674
  {
629
675
  cache: t.cache ?? "list",
630
676
  tableData: t.data,
@@ -639,47 +685,48 @@ const rt = d((t) => new Se(
639
685
  headers: t.headers,
640
686
  customHeader: t.customHeader,
641
687
  border: t.border,
642
- emptyState: t.emptyState
688
+ emptyState: t.emptyState,
689
+ skeleton: t.skeleton
643
690
  }
644
- )), Ie = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
691
+ )), Te = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
645
692
  p({ class: "text-base font-semibold leading-6 m-0" }, t),
646
693
  p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
647
- ])), Le = () => o({ class: "flex items-center gap-x-1.5" }, [
694
+ ])), Be = () => o({ class: "flex items-center gap-x-1.5" }, [
648
695
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
649
696
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
650
697
  ]),
651
698
  p({ class: "text-xs leading-5 text-gray-500" }, "Online")
652
- ]), Ce = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
699
+ ]), Re = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
653
700
  D("Last seen "),
654
- q({ datetime: t }, "3h ago")
655
- ]), 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" }, [
701
+ K({ datetime: t }, "3h ago")
702
+ ]), Me = (t, e) => t === "online" ? Be() : Re(e), We = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
656
703
  p({ class: "text-sm leading-6 m-0" }, t),
657
- Te(s, e)
658
- ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
704
+ Me(s, e)
705
+ ])), Pe = (t) => t.split(" ").map((s) => s[0]).join(""), Oe = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
659
706
  o({ class: "flex min-w-0 gap-x-4" }, [
660
- oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
661
- Ie({ name: t.name, email: t.email })
707
+ re({ src: t.image, alt: t.name, fallbackText: Pe(t.name) }),
708
+ Te({ name: t.name, email: t.email })
662
709
  ]),
663
- Be({
710
+ We({
664
711
  role: t.role,
665
712
  lastSeen: t.lastSeen,
666
713
  status: t.status
667
714
  })
668
- ])), ct = d((t) => new te({
715
+ ])), ut = d((t) => new se({
669
716
  cache: "list",
670
717
  key: "name",
671
718
  items: t.users,
672
719
  role: "list",
673
720
  class: "divide-y divide-border",
674
- rowItem: Re
675
- })), 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 $({
721
+ rowItem: Oe
722
+ })), ze = (t, e) => e.includes(t), $e = (t, e, s) => t.exact ? s === e : ze(e, s), Ne = ({ text: t, href: e, exact: s, hidden: a }) => new N({
676
723
  text: t,
677
724
  href: e,
678
725
  exact: s,
679
726
  dataSet: ["selected", ["state", !0, "active"]],
680
727
  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`
681
728
  });
682
- class dt extends h {
729
+ class ft extends h {
683
730
  /**
684
731
  * This will declare the props for the compiler.
685
732
  *
@@ -707,7 +754,7 @@ class dt extends h {
707
754
  class: "flex space-x-4",
708
755
  map: [this.options, (e) => this.addLink(e)],
709
756
  watch: {
710
- value: ["[[path]]", y.data],
757
+ value: ["[[path]]", k.data],
711
758
  callBack: this.updateLinks.bind(this)
712
759
  }
713
760
  })
@@ -720,7 +767,7 @@ class dt extends h {
720
767
  * @returns {void}
721
768
  */
722
769
  afterSetup() {
723
- const e = y.data.path;
770
+ const e = k.data.path;
724
771
  this.updateLinks(e);
725
772
  }
726
773
  /**
@@ -735,7 +782,7 @@ class dt extends h {
735
782
  for (const a of this.links) {
736
783
  if (!a.rendered)
737
784
  continue;
738
- Pe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
785
+ $e(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
739
786
  }
740
787
  !s && this.links[0] && this.updateLink(this.links[0], !0);
741
788
  }
@@ -765,7 +812,7 @@ class dt extends h {
765
812
  * @returns {object}
766
813
  */
767
814
  addLink({ label: e, href: s, exact: a, hidden: i }) {
768
- const n = Oe({ text: e, href: s, exact: a, hidden: i });
815
+ const n = Ne({ text: e, href: s, exact: a, hidden: i });
769
816
  return this.links.push(n), n;
770
817
  }
771
818
  /**
@@ -777,13 +824,13 @@ class dt extends h {
777
824
  this.links = [];
778
825
  }
779
826
  }
780
- const ht = d((t) => {
827
+ const gt = d((t) => {
781
828
  const e = t.margin || "m-4 ml-0";
782
829
  return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
783
830
  T({ variant: "back", class: "ghost", ...t })
784
831
  ]);
785
832
  });
786
- class A extends h {
833
+ class U extends h {
787
834
  /**
788
835
  * This will declare the props for the compiler.
789
836
  *
@@ -870,13 +917,13 @@ class A extends h {
870
917
  return this.children;
871
918
  }
872
919
  }
873
- N.addType("dockableOverlay", (t) => {
920
+ A.addType("dockableOverlay", (t) => {
874
921
  if (!t)
875
922
  return;
876
923
  const e = t.component;
877
924
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
878
925
  });
879
- class ut extends A {
926
+ class mt extends U {
880
927
  /**
881
928
  * This will stop presistence.
882
929
  *
@@ -942,7 +989,7 @@ class ut extends A {
942
989
  * @returns {void}
943
990
  */
944
991
  afterSetup() {
945
- N.add(
992
+ A.add(
946
993
  this.container,
947
994
  "dockableOverlay",
948
995
  {
@@ -985,7 +1032,7 @@ class ut extends A {
985
1032
  document.documentElement.style.overflowY = "auto";
986
1033
  }
987
1034
  }
988
- class ft extends A {
1035
+ class pt extends U {
989
1036
  /**
990
1037
  * This will get the overlay type.
991
1038
  *
@@ -1004,7 +1051,7 @@ class ft extends A {
1004
1051
  this.container = e, this.initialize();
1005
1052
  }
1006
1053
  }
1007
- const ze = d(({ index: t, click: e, state: s }, a) => S({
1054
+ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1008
1055
  class: "p-2 cursor-pointer hover:bg-muted/50",
1009
1056
  onState: [
1010
1057
  [s, "selectedIndex", {
@@ -1013,11 +1060,11 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1013
1060
  }]
1014
1061
  ],
1015
1062
  click: () => e(t)
1016
- }, a)), $e = d(({ selectOption: t, state: e }) => w({
1063
+ }, a)), je = d(({ selectOption: t, state: e }) => w({
1017
1064
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
1018
- for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
1019
- })), Ne = d((t) => o({ class: "relative flex items-center" }, [
1020
- ie({
1065
+ for: ["filteredOptions", (s, a) => Ae({ index: a, click: t, state: e }, s.label)]
1066
+ })), Ue = d((t) => o({ class: "relative flex items-center" }, [
1067
+ oe({
1021
1068
  cache: "input",
1022
1069
  class: t.class ?? "",
1023
1070
  placeholder: t.placeholder ?? "Search...",
@@ -1033,22 +1080,22 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1033
1080
  ]
1034
1081
  }),
1035
1082
  t.icon && o({ class: "absolute flex right-0 mr-2" }, [
1036
- _(t.icon)
1083
+ J(t.icon)
1037
1084
  ])
1038
- ])), je = (t) => o({
1085
+ ])), Ye = (t) => o({
1039
1086
  class: "relative flex fle-auto flex-col",
1040
1087
  onState: ["open", (e, s, a) => {
1041
1088
  if (e)
1042
- return new le({
1089
+ return new ce({
1043
1090
  cache: "dropdown",
1044
1091
  parent: a,
1045
1092
  button: a.input,
1046
1093
  size: "xl"
1047
1094
  }, [
1048
- $e(t)
1095
+ je(t)
1049
1096
  ]);
1050
1097
  }]
1051
- }), gt = V(
1098
+ }), wt = V(
1052
1099
  {
1053
1100
  /**
1054
1101
  * This will set up the data object.
@@ -1057,7 +1104,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1057
1104
  */
1058
1105
  setData() {
1059
1106
  const t = this.options || [];
1060
- return new C({
1107
+ return new L({
1061
1108
  options: t,
1062
1109
  filteredOptions: t
1063
1110
  });
@@ -1145,7 +1192,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1145
1192
  */
1146
1193
  render() {
1147
1194
  return o({ class: "relative w-full max-w-md" }, [
1148
- Ne({
1195
+ Ue({
1149
1196
  // @ts-ignore
1150
1197
  state: this.state,
1151
1198
  // @ts-ignore
@@ -1157,7 +1204,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1157
1204
  // @ts-ignore
1158
1205
  handleKeyDown: this.handleKeyDown.bind(this)
1159
1206
  }),
1160
- je({
1207
+ Ye({
1161
1208
  // @ts-ignore
1162
1209
  state: this.state,
1163
1210
  // @ts-ignore
@@ -1168,22 +1215,22 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1168
1215
  ]);
1169
1216
  }
1170
1217
  }
1171
- ), Ae = (t) => S(
1218
+ ), He = (t) => S(
1172
1219
  {
1173
1220
  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",
1174
1221
  dataSet: ["selected", ["state", t.value, "active"]]
1175
1222
  },
1176
1223
  [
1177
- k({
1224
+ x({
1178
1225
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
1179
1226
  onSet: ["selected", { selected: t.value }],
1180
1227
  click: (e) => t.callBack(t.value)
1181
1228
  }, t.label)
1182
1229
  ]
1183
- ), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1184
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1230
+ ), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1231
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1185
1232
  ]);
1186
- class mt extends h {
1233
+ class bt extends h {
1187
1234
  /**
1188
1235
  * This will declare the props for the compiler.
1189
1236
  *
@@ -1200,12 +1247,12 @@ class mt extends h {
1200
1247
  render() {
1201
1248
  const e = this.select.bind(this);
1202
1249
  return o({ class: "" }, [
1203
- Ye({
1250
+ Ee({
1204
1251
  class: this.class,
1205
1252
  options: this.options,
1206
1253
  callBack: e
1207
1254
  }),
1208
- z({
1255
+ $({
1209
1256
  class: "tab-content",
1210
1257
  onState: ["selected", this.updateContent.bind(this)]
1211
1258
  })
@@ -1271,23 +1318,23 @@ class mt extends h {
1271
1318
  };
1272
1319
  }
1273
1320
  }
1274
- const He = (t) => S(
1321
+ const Qe = (t) => S(
1275
1322
  {
1276
1323
  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",
1277
1324
  dataSet: ["selected", ["state", t.value, "active"]]
1278
1325
  },
1279
1326
  [
1280
- k({
1327
+ x({
1281
1328
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
1282
1329
  onSet: ["selected", { selected: t.value }],
1283
1330
  click: (e) => t.callBack(t.value),
1284
1331
  disabled: t.disabled
1285
1332
  }, t.label)
1286
1333
  ]
1287
- ), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1288
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1334
+ ), Xe = (t, e) => (t.callBack = e, Qe(t)), qe = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1335
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Xe(e, t.callBack)] })
1289
1336
  ]);
1290
- class pt extends h {
1337
+ class kt extends h {
1291
1338
  /**
1292
1339
  * This will declare the props for the compiler.
1293
1340
  *
@@ -1303,7 +1350,7 @@ class pt extends h {
1303
1350
  */
1304
1351
  render() {
1305
1352
  const e = this.select.bind(this);
1306
- return Ee({
1353
+ return qe({
1307
1354
  class: this.class,
1308
1355
  options: this.options,
1309
1356
  callBack: e
@@ -1330,17 +1377,17 @@ class pt extends h {
1330
1377
  };
1331
1378
  }
1332
1379
  }
1333
- const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
1380
+ const Ke = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), _e = (t, e) => {
1334
1381
  const s = t.getLinkPath();
1335
- return t.exact ? e === s : Qe(s, e);
1336
- }, qe = ({ text: t, href: e, exact: s }) => new $({
1382
+ return t.exact ? e === s : Ke(s, e);
1383
+ }, Ge = ({ text: t, href: e, exact: s }) => new N({
1337
1384
  text: t,
1338
1385
  href: e,
1339
1386
  exact: s,
1340
1387
  dataSet: ["selected", ["state", !0, "active"]],
1341
1388
  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"
1342
1389
  });
1343
- class Ke extends h {
1390
+ class Ve extends h {
1344
1391
  /**
1345
1392
  * This will declare the props for the compiler.
1346
1393
  *
@@ -1366,7 +1413,7 @@ class Ke extends h {
1366
1413
  class: "flex flex-auto flex-row",
1367
1414
  map: [this.options, (e) => this.addLink(e)],
1368
1415
  watch: {
1369
- value: ["[[path]]", y.data],
1416
+ value: ["[[path]]", k.data],
1370
1417
  callBack: this.updateLinks.bind(this)
1371
1418
  }
1372
1419
  })
@@ -1378,7 +1425,7 @@ class Ke extends h {
1378
1425
  * @returns {void}
1379
1426
  */
1380
1427
  afterSetup() {
1381
- const e = y.data.path;
1428
+ const e = k.data.path;
1382
1429
  this.updateLinks(e);
1383
1430
  }
1384
1431
  /**
@@ -1391,7 +1438,7 @@ class Ke extends h {
1391
1438
  let s = !1, a = this.links[0];
1392
1439
  this.deactivateAllLinks();
1393
1440
  for (const i of this.links)
1394
- if (i.rendered !== !1 && (s = Xe(i, e), s === !0)) {
1441
+ if (i.rendered !== !1 && (s = _e(i, e), s === !0)) {
1395
1442
  this.updateLink(i, !0);
1396
1443
  break;
1397
1444
  }
@@ -1423,7 +1470,7 @@ class Ke extends h {
1423
1470
  * @returns {object}
1424
1471
  */
1425
1472
  addLink({ label: e, href: s, exact: a }) {
1426
- const i = qe({ text: e, href: s, exact: a });
1473
+ const i = Ge({ text: e, href: s, exact: a });
1427
1474
  return this.links.push(i), i;
1428
1475
  }
1429
1476
  /**
@@ -1435,7 +1482,7 @@ class Ke extends h {
1435
1482
  this.links = [];
1436
1483
  }
1437
1484
  }
1438
- class wt extends h {
1485
+ class yt extends h {
1439
1486
  /**
1440
1487
  * This will declare the props for the compiler.
1441
1488
  *
@@ -1451,11 +1498,11 @@ class wt extends h {
1451
1498
  */
1452
1499
  render() {
1453
1500
  return o({ class: "tab-panel" }, [
1454
- new Ke({
1501
+ new Ve({
1455
1502
  class: this.class,
1456
1503
  options: this.options
1457
1504
  }),
1458
- z({
1505
+ $({
1459
1506
  class: "tab-content",
1460
1507
  switch: this.addGroup()
1461
1508
  })
@@ -1481,7 +1528,7 @@ class wt extends h {
1481
1528
  return s;
1482
1529
  }
1483
1530
  }
1484
- class Ge extends h {
1531
+ class Je extends h {
1485
1532
  /**
1486
1533
  * Runs before rendering, sets up defaults, a timer for drawing,
1487
1534
  * and basic canvas properties.
@@ -1491,7 +1538,7 @@ class Ge extends h {
1491
1538
  onCreated() {
1492
1539
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1493
1540
  const e = 1e3 / 60;
1494
- 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";
1541
+ this.timer = new ae(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";
1495
1542
  }
1496
1543
  /**
1497
1544
  * Renders a <canvas> element.
@@ -1499,7 +1546,7 @@ class Ge extends h {
1499
1546
  * @returns {object} Layout definition for the canvas.
1500
1547
  */
1501
1548
  render() {
1502
- return K({
1549
+ return _({
1503
1550
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1504
1551
  });
1505
1552
  }
@@ -1596,8 +1643,8 @@ class Ge extends h {
1596
1643
  const { canvas: e, ctx: s } = this, a = e.toDataURL();
1597
1644
  if (this.scale(), this.setupBackground(s), a !== "data:,") {
1598
1645
  const i = new globalThis.Image();
1599
- M.on("load", i, function n() {
1600
- s.drawImage(i, 0, 0), M.off("load", i, n);
1646
+ R.on("load", i, function n() {
1647
+ s.drawImage(i, 0, 0), R.off("load", i, n);
1601
1648
  }), i.src = a;
1602
1649
  }
1603
1650
  this.draw();
@@ -1617,7 +1664,7 @@ class Ge extends h {
1617
1664
  * @returns {void}
1618
1665
  */
1619
1666
  noScaleResize() {
1620
- const e = R.getSize(container);
1667
+ const e = M.getSize(container);
1621
1668
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1622
1669
  }
1623
1670
  /**
@@ -1627,7 +1674,7 @@ class Ge extends h {
1627
1674
  * @returns {void}
1628
1675
  */
1629
1676
  scale() {
1630
- const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1677
+ const e = this.canvas, s = this.container, a = M.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1631
1678
  let u = n + "px", c = l + "px";
1632
1679
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1633
1680
  const f = a.width, g = a.height, r = f / n, m = g / l, b = Math.min(r, m);
@@ -1707,7 +1754,7 @@ class Ge extends h {
1707
1754
  this.timer.stop(), this.status = "stopped";
1708
1755
  }
1709
1756
  }
1710
- class bt extends h {
1757
+ class xt extends h {
1711
1758
  /**
1712
1759
  * Sets up default properties for the signature panel.
1713
1760
  *
@@ -1724,7 +1771,7 @@ class bt extends h {
1724
1771
  */
1725
1772
  render() {
1726
1773
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1727
- ne({
1774
+ le({
1728
1775
  cache: "hiddenInput",
1729
1776
  required: !0,
1730
1777
  bind: this.path + ".data"
@@ -1732,11 +1779,11 @@ class bt extends h {
1732
1779
  o({ class: "absolute top-2 right-2" }, [
1733
1780
  T({
1734
1781
  variant: "icon",
1735
- icon: x.circleX,
1782
+ icon: y.circleX,
1736
1783
  click: this.reset.bind(this)
1737
1784
  })
1738
1785
  ]),
1739
- new Ge({
1786
+ new Je({
1740
1787
  cache: "canvasLayer",
1741
1788
  margin: this.margin,
1742
1789
  targetSize: this.targetSize,
@@ -1786,36 +1833,36 @@ class bt extends h {
1786
1833
  }
1787
1834
  }
1788
1835
  export {
1789
- ht as B,
1790
- be as C,
1791
- xe as D,
1792
- ye as H,
1793
- ft as I,
1794
- dt as N,
1795
- A as O,
1796
- at as P,
1797
- rt as S,
1836
+ gt as B,
1837
+ ye as C,
1838
+ ve as D,
1839
+ xe as H,
1840
+ pt as I,
1841
+ ft as N,
1842
+ U as O,
1843
+ ot as P,
1844
+ ht as S,
1798
1845
  B as T,
1799
- Re as U,
1800
- ot as W,
1801
- he as a,
1846
+ Oe as U,
1847
+ ct as W,
1848
+ fe as a,
1802
1849
  W as b,
1803
- ce as c,
1804
- it as d,
1805
- nt as e,
1806
- fe as f,
1807
- de as g,
1808
- me as h,
1809
- pe as i,
1850
+ he as c,
1851
+ lt as d,
1852
+ rt as e,
1853
+ me as f,
1854
+ ue as g,
1855
+ we as h,
1856
+ be as i,
1810
1857
  j,
1811
- lt as k,
1812
- ct as l,
1813
- ut as m,
1814
- gt as n,
1815
- Ne as o,
1816
- mt as p,
1817
- pt as q,
1818
- Ke as r,
1819
- wt as s,
1820
- bt as t
1858
+ dt as k,
1859
+ ut as l,
1860
+ mt as m,
1861
+ wt as n,
1862
+ Ue as o,
1863
+ bt as p,
1864
+ kt as q,
1865
+ Ve as r,
1866
+ yt as s,
1867
+ xt as t
1821
1868
  };