@base-framework/ui 1.0.278 → 1.0.280

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 x, Div as o, On as v, Span as D, Th as z, UseParent as X, I as q, Thead as K, Tr as $, Td as _, Table as C, P as w, Li as S, Time as G, Nav as I, Ul as p, Section as N, Canvas as V } from "@base-framework/atoms";
2
- import { Atom as d, Component as h, Data as L, DateTime as J, router as k, NavLink as A, DataTracker as j, Jot as Z, base as M, Dom as W } from "@base-framework/base";
3
- import { B as T, I as ee } from "./buttons-BKLL4I6r.js";
4
- import { Icons as y } from "./icons.es.js";
5
- import { TableBody as B, DataTableBody as te, ScrollableTableBody as U, 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
- d((t, e) => ({
1
+ import { Button as x, 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 C, 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 h, Component as u, Data as L, 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 k } 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";
8
+ h((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 }) => x({
13
+ h(({ 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 ot extends h {
19
+ class at extends u {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -34,54 +34,54 @@ class ot extends h {
34
34
  return o({ class: this.class || "" }, this.children);
35
35
  }
36
36
  }
37
- const de = (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
- }, he = (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 && !de(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
- }, ue = (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
- }, fe = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), P = (t, e) => {
61
+ }, he = (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
- }, lt = (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++) {
70
- const u = new Date(t, e, l);
71
- n.push(l > 0 ? u : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
70
+ const d = new Date(t, e, l);
71
+ n.push(l > 0 ? d : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
72
72
  }
73
73
  return i;
74
- }, rt = (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
- }, ge = (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
- }, me = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
- const n = ge(t, e, s);
83
+ }, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
+ const n = ue(t, e, s);
85
85
  return x({
86
86
  text: t || "",
87
87
  disabled: !t,
@@ -92,19 +92,19 @@ const de = (t) => {
92
92
  `,
93
93
  click: () => i(a, s)
94
94
  });
95
- }, we = (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 = [];
95
+ }, me = (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, g) => new Date(t, e, g + 1)), l = (i.length + n.length) % 7, d = l === 0 ? 0 : 7 - l, c = he(t, e, d), f = [...i, ...n, ...c], m = [];
97
97
  for (let r = 0; r < f.length; r += 7) {
98
- const m = f.slice(r, r + 7), b = m.find((Q) => Q) || new Date(t, e, 1), { weekNumber: F, year: E } = he(b);
99
- g.push({
100
- weekNumber: F,
101
- year: E,
102
- days: m
98
+ const g = f.slice(r, r + 7), b = g.find((H) => H) || new Date(t, e, 1), { weekNumber: U, year: Y } = ce(b);
99
+ m.push({
100
+ weekNumber: U,
101
+ year: Y,
102
+ days: g
103
103
  });
104
104
  }
105
- return g;
106
- }, pe = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
- const { year: i, month: n, currentDate: l } = a, u = we(i, n);
105
+ return m;
106
+ }, ge = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
+ const { year: i, month: n, currentDate: l } = a, d = me(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -119,8 +119,8 @@ const de = (t) => {
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
122
- ...u.map(
123
- ({ weekNumber: c, days: f, year: g }) => o({
122
+ ...d.map(
123
+ ({ weekNumber: c, days: f, year: m }) => o({
124
124
  class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
125
125
  onSet: ["currentWeek", {
126
126
  ring: c
@@ -129,7 +129,7 @@ const de = (t) => {
129
129
  // Left column: ISO week number
130
130
  o({
131
131
  class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
132
- click: () => t(c, g),
132
+ click: () => t(c, m),
133
133
  // If you have a 'currentWeek' state, you can highlight it with 'onSet'
134
134
  onSet: ["currentWeek", {
135
135
  "text-primary-foreground": c,
@@ -141,7 +141,7 @@ const de = (t) => {
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  f.map(
144
- (r) => me({
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 de = (t) => {
154
154
  )
155
155
  ]
156
156
  );
157
- }), O = ({ label: t, click: e }) => T(
157
+ }), P = ({ label: t, click: e }) => T(
158
158
  {
159
159
  class: `
160
160
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -165,20 +165,20 @@ const de = (t) => {
165
165
  click: e,
166
166
  "aria-label": `${t} month`,
167
167
  variant: "icon",
168
- icon: t === "Previous" ? y.chevron.single.left : y.chevron.single.right
168
+ icon: t === "Previous" ? k.chevron.single.left : k.chevron.single.right
169
169
  }
170
- ), be = ({ 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
  D("[[monthName]] [[year]]"),
172
- O({
172
+ P({
173
173
  label: "Previous",
174
174
  click: e
175
175
  }),
176
- O({
176
+ P({
177
177
  label: "Next",
178
178
  click: t
179
179
  })
180
180
  ]);
181
- class ct extends h {
181
+ class ot extends u {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -193,7 +193,7 @@ class ct extends h {
193
193
  * @returns {Data}
194
194
  */
195
195
  setData() {
196
- const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = P(s, e.getFullYear());
196
+ const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(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 ct extends h {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(e) {
234
- return J.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 ct extends h {
276
276
  */
277
277
  selectWeek(e, s) {
278
278
  this.data.currentWeek = e;
279
- const a = P(e, s);
279
+ const a = W(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 ct extends h {
286
286
  */
287
287
  render() {
288
288
  return o({ class: "week-calendar-container border rounded-md p-3" }, [
289
- be({
289
+ pe({
290
290
  next: () => this.goToNextMonth(),
291
291
  previous: () => this.goToPreviousMonth()
292
292
  }),
293
- pe({
293
+ ge({
294
294
  selectWeek: (e, s) => this.selectWeek(e, s)
295
295
  })
296
296
  ]);
297
297
  }
298
298
  }
299
- const ke = (t, e) => {
299
+ const we = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, ye = (t) => z({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- X((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 }) => {
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 }) => {
305
305
  const l = t || "justify-start";
306
- return z({
306
+ return O({
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
  D(a),
312
- e && q({ class: "ml-2", html: y.arrows.upDown })
312
+ e && E({ class: "ml-2", html: k.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, R = (t) => K([
316
- $({
315
+ }, B = (t) => Q([
316
+ X({
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
320
- (e) => e.label === "checkbox" ? ye({ toggle: t.toggle }) : xe({
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,28 +326,17 @@ const ke = (t, e) => {
326
326
  })
327
327
  ]
328
328
  })
329
- ]), ve = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i }) => new B({
329
+ ]), ke = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new J({
330
330
  cache: "list",
331
331
  key: t,
332
332
  items: e,
333
- rowItem: (n) => a(n, s),
333
+ rowItem: (d) => a(d, s),
334
334
  class: "divide-y divide-border",
335
- emptyState: i
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 _({ class: "px-6 py-4" }, [
342
- ne({ width: l, height: "h-4" })
343
- ]);
344
- };
345
- return $({
346
- class: "border-b",
347
- key: s
348
- }, Array.from({ length: t }, (i, n) => a(n)));
349
- };
350
- class Y extends h {
335
+ emptyState: i,
336
+ skeleton: n,
337
+ columnCount: l
338
+ });
339
+ class j extends u {
351
340
  /**
352
341
  * Initializes component data.
353
342
  *
@@ -355,15 +344,11 @@ class Y extends h {
355
344
  */
356
345
  setData() {
357
346
  let e = this.rows && this.rows.length > 0;
358
- (this.loadMoreItems || this.tableData) && !e && (e = null);
359
- const s = this.skeleton && !e;
360
- return new L({
347
+ return (this.loadMoreItems || this.tableData) && !e && (e = null), new L({
361
348
  selectedRows: [],
362
349
  // @ts-ignore
363
- hasItems: s ? !0 : e,
364
- selected: !1,
365
- // @ts-ignore
366
- showSkeleton: s
350
+ hasItems: e,
351
+ selected: !1
367
352
  });
368
353
  }
369
354
  /**
@@ -384,33 +369,6 @@ class Y extends h {
384
369
  const e = this.data.get("selectedRows");
385
370
  this.data.selected = e.length > 0;
386
371
  }
387
- /**
388
- * Generates skeleton rows for the table.
389
- *
390
- * @returns {Array}
391
- */
392
- generateSkeletonRows() {
393
- const e = this.skeleton;
394
- let s = 5, a = null;
395
- typeof e == "object" && (s = e.number || 5, a = e.row || null);
396
- const i = this.headers ? this.headers.length : 3;
397
- return Array.from({ length: s }, (n, l) => a && typeof a == "function" ? a(l, i) : De({
398
- columnCount: i,
399
- key: `skeleton-${l}`
400
- }));
401
- }
402
- /**
403
- * Removes skeleton rows and shows real content.
404
- *
405
- * @returns {void}
406
- */
407
- removeSkeleton() {
408
- if (this.data.showSkeleton) {
409
- this.data.showSkeleton = !1;
410
- const e = this.rows && this.rows.length > 0;
411
- this.data.hasItems = e;
412
- }
413
- }
414
372
  /**
415
373
  * This will get the selected rows.
416
374
  *
@@ -447,33 +405,29 @@ class Y extends h {
447
405
  * @returns {object}
448
406
  */
449
407
  render() {
450
- const e = this.data.get("showSkeleton"), s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
408
+ const e = this.border !== !1 ? "border" : "", s = this.headers ? this.headers.length : 3;
451
409
  return o({ class: "w-full flex flex-auto flex-col" }, [
452
- v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
453
- o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
410
+ v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
411
+ o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
454
412
  C({ class: "w-full" }, [
455
413
  // @ts-ignore
456
- this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
414
+ this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
457
415
  // @ts-ignore
458
416
  this.customHeader ?? null,
459
- e ? new B({
460
- cache: "list",
417
+ ke({
461
418
  // @ts-ignore
462
419
  key: this.key,
463
- items: s,
464
- rowItem: (i) => i,
465
- // Skeleton rows are already complete components
466
- class: "divide-y divide-border"
467
- }) : ve({
468
420
  // @ts-ignore
469
- key: this.key,
470
- rows: s,
421
+ rows: this.rows,
471
422
  // @ts-ignore
472
423
  selectRow: this.selectRow.bind(this),
473
424
  // @ts-ignore
474
425
  rowItem: this.rowItem,
475
426
  // @ts-ignore
476
- emptyState: this.emptyState
427
+ emptyState: this.emptyState,
428
+ // @ts-ignore
429
+ skeleton: this.skeleton,
430
+ columnCount: s
477
431
  })
478
432
  ])
479
433
  ])
@@ -497,7 +451,7 @@ class Y extends h {
497
451
  * @returns {void}
498
452
  */
499
453
  setRows(e) {
500
- this.removeSkeleton(), this.list.setRows(e);
454
+ this.list.setRows(e);
501
455
  }
502
456
  /**
503
457
  * This will append items to the list.
@@ -507,7 +461,7 @@ class Y extends h {
507
461
  * @returns {void}
508
462
  */
509
463
  append(e) {
510
- this.removeSkeleton(), this.list.append(e);
464
+ this.list.append(e);
511
465
  }
512
466
  /**
513
467
  * This will mingle the new items with the old items.
@@ -528,7 +482,7 @@ class Y extends h {
528
482
  * @returns {void}
529
483
  */
530
484
  prepend(e) {
531
- this.removeSkeleton(), this.list.prepend(e);
485
+ this.list.prepend(e);
532
486
  }
533
487
  /**
534
488
  * This will remove the selected rows.
@@ -539,7 +493,7 @@ class Y extends h {
539
493
  this.data.selectedRows = [];
540
494
  }
541
495
  }
542
- const Se = (t) => new te({
496
+ const xe = (t) => new Z({
543
497
  cache: "list",
544
498
  loadMoreItems: t.loadMoreItems,
545
499
  offset: t.offset,
@@ -548,33 +502,27 @@ const Se = (t) => new te({
548
502
  tableData: t.tableData,
549
503
  items: t.items,
550
504
  rowItem: (e) => t.rowItem(e, t.selectRow),
551
- class: "divide-y divide-border"
505
+ class: "divide-y divide-border",
506
+ skeleton: t.skeleton,
507
+ columnCount: t.columnCount
552
508
  });
553
- class Ie extends Y {
509
+ class ve extends j {
554
510
  /**
555
511
  * Renders the DataTable component.
556
512
  *
557
513
  * @returns {object}
558
514
  */
559
515
  render() {
560
- const e = this.data.showSkeleton, s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
516
+ const e = this.border !== !1 ? "border" : "", s = this.headers ? this.headers.length : 3;
561
517
  return o({ class: "w-full flex flex-auto flex-col" }, [
562
- v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
563
- o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
518
+ v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
519
+ o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
564
520
  C({ class: "w-full" }, [
565
521
  // @ts-ignore
566
- this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
522
+ this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
567
523
  // @ts-ignore
568
524
  this.customHeader ?? null,
569
- e ? new B({
570
- cache: "list",
571
- // @ts-ignore
572
- key: this.key,
573
- items: s,
574
- rowItem: (i) => i,
575
- // Skeleton rows are already complete components
576
- class: "divide-y divide-border"
577
- }) : Se({
525
+ xe({
578
526
  // @ts-ignore
579
527
  loadMoreItems: this.loadMoreItems,
580
528
  // @ts-ignore
@@ -587,11 +535,15 @@ class Ie extends Y {
587
535
  tableData: this.tableData,
588
536
  // @ts-ignore
589
537
  key: this.key,
590
- items: s,
538
+ // @ts-ignore
539
+ items: this.rows,
591
540
  // @ts-ignore
592
541
  selectRow: this.selectRow.bind(this),
593
542
  // @ts-ignore
594
- rowItem: this.rowItem
543
+ rowItem: this.rowItem,
544
+ // @ts-ignore
545
+ skeleton: this.skeleton,
546
+ columnCount: s
595
547
  })
596
548
  ])
597
549
  ])
@@ -606,7 +558,7 @@ class Ie extends Y {
606
558
  this.list.refresh();
607
559
  }
608
560
  }
609
- const dt = d((t) => new Ie(
561
+ const lt = h((t) => new ve(
610
562
  {
611
563
  cache: t.cache ?? "list",
612
564
  tableData: t.data,
@@ -623,7 +575,7 @@ const dt = d((t) => new Ie(
623
575
  emptyState: t.emptyState,
624
576
  skeleton: t.skeleton
625
577
  }
626
- )), Ce = (t) => new U({
578
+ )), De = (t) => new ee({
627
579
  cache: "list",
628
580
  scrollContainer: t.scrollContainer,
629
581
  loadMoreItems: t.loadMoreItems,
@@ -633,33 +585,27 @@ const dt = d((t) => new Ie(
633
585
  tableData: t.tableData,
634
586
  items: t.items,
635
587
  rowItem: (e) => t.rowItem(e, t.selectRow),
636
- class: "divide-y divide-border"
588
+ class: "divide-y divide-border",
589
+ skeleton: t.skeleton,
590
+ columnCount: t.columnCount
637
591
  });
638
- class Le extends Y {
592
+ class Se extends j {
639
593
  /**
640
594
  * Renders the DataTable component.
641
595
  *
642
596
  * @returns {object}
643
597
  */
644
598
  render() {
645
- const e = this.data.get("showSkeleton"), s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
599
+ const e = this.border !== !1 ? "border" : "", s = this.headers ? this.headers.length : 3;
646
600
  return o({ class: "w-full flex flex-auto flex-col" }, [
647
- v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
648
- o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
601
+ v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
602
+ o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
649
603
  C({ class: "w-full" }, [
650
604
  // @ts-ignore
651
- this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
605
+ this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
652
606
  // @ts-ignore
653
607
  this.customHeader ?? null,
654
- e ? new U({
655
- cache: "list",
656
- // @ts-ignore
657
- key: this.key,
658
- items: s,
659
- rowItem: (i) => i,
660
- // Skeleton rows are already complete components
661
- class: "divide-y divide-border"
662
- }) : Ce({
608
+ De({
663
609
  // @ts-ignore
664
610
  scrollContainer: this.scrollContainer,
665
611
  // @ts-ignore
@@ -674,11 +620,15 @@ class Le extends Y {
674
620
  tableData: this.tableData,
675
621
  // @ts-ignore
676
622
  key: this.key,
677
- items: s,
623
+ // @ts-ignore
624
+ items: this.rows,
678
625
  // @ts-ignore
679
626
  selectRow: this.selectRow.bind(this),
680
627
  // @ts-ignore
681
- rowItem: this.rowItem
628
+ rowItem: this.rowItem,
629
+ // @ts-ignore
630
+ skeleton: this.skeleton,
631
+ columnCount: s
682
632
  })
683
633
  ])
684
634
  ])
@@ -693,7 +643,7 @@ class Le extends Y {
693
643
  this.list.refresh();
694
644
  }
695
645
  }
696
- const ht = d((t) => new Le(
646
+ const rt = h((t) => new Se(
697
647
  {
698
648
  cache: t.cache ?? "list",
699
649
  tableData: t.data,
@@ -711,45 +661,45 @@ const ht = d((t) => new Le(
711
661
  emptyState: t.emptyState,
712
662
  skeleton: t.skeleton
713
663
  }
714
- )), Te = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
715
- w({ class: "text-base font-semibold leading-6 m-0" }, t),
716
- w({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
717
- ])), Be = () => o({ class: "flex items-center gap-x-1.5" }, [
664
+ )), Ie = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
665
+ p({ class: "text-base font-semibold leading-6 m-0" }, t),
666
+ p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
667
+ ])), Ce = () => o({ class: "flex items-center gap-x-1.5" }, [
718
668
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
719
669
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
720
670
  ]),
721
- w({ class: "text-xs leading-5 text-gray-500" }, "Online")
722
- ]), Re = (t) => w({ class: "text-xs leading-5 text-muted-foreground" }, [
671
+ p({ class: "text-xs leading-5 text-gray-500" }, "Online")
672
+ ]), Le = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
723
673
  D("Last seen "),
724
- G({ datetime: t }, "3h ago")
725
- ]), 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" }, [
726
- w({ class: "text-sm leading-6 m-0" }, t),
727
- Me(s, e)
728
- ])), 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" }, [
674
+ q({ datetime: t }, "3h ago")
675
+ ]), Te = (t, e) => t === "online" ? Ce() : Le(e), Be = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
676
+ p({ class: "text-sm leading-6 m-0" }, t),
677
+ Te(s, e)
678
+ ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = h((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
729
679
  o({ class: "flex min-w-0 gap-x-4" }, [
730
- re({ src: t.image, alt: t.name, fallbackText: Pe(t.name) }),
731
- Te({ name: t.name, email: t.email })
680
+ oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
681
+ Ie({ name: t.name, email: t.email })
732
682
  ]),
733
- We({
683
+ Be({
734
684
  role: t.role,
735
685
  lastSeen: t.lastSeen,
736
686
  status: t.status
737
687
  })
738
- ])), ut = d((t) => new se({
688
+ ])), ct = h((t) => new te({
739
689
  cache: "list",
740
690
  key: "name",
741
691
  items: t.users,
742
692
  role: "list",
743
693
  class: "divide-y divide-border",
744
- rowItem: Oe
745
- })), 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 A({
694
+ rowItem: Re
695
+ })), 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 $({
746
696
  text: t,
747
697
  href: e,
748
698
  exact: s,
749
699
  dataSet: ["selected", ["state", !0, "active"]],
750
700
  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`
751
701
  });
752
- class ft extends h {
702
+ class dt extends u {
753
703
  /**
754
704
  * This will declare the props for the compiler.
755
705
  *
@@ -773,11 +723,11 @@ class ft extends h {
773
723
  return I(
774
724
  { class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
775
725
  [
776
- p({
726
+ w({
777
727
  class: "flex space-x-4",
778
728
  map: [this.options, (e) => this.addLink(e)],
779
729
  watch: {
780
- value: ["[[path]]", k.data],
730
+ value: ["[[path]]", y.data],
781
731
  callBack: this.updateLinks.bind(this)
782
732
  }
783
733
  })
@@ -790,7 +740,7 @@ class ft extends h {
790
740
  * @returns {void}
791
741
  */
792
742
  afterSetup() {
793
- const e = k.data.path;
743
+ const e = y.data.path;
794
744
  this.updateLinks(e);
795
745
  }
796
746
  /**
@@ -805,7 +755,7 @@ class ft extends h {
805
755
  for (const a of this.links) {
806
756
  if (!a.rendered)
807
757
  continue;
808
- $e(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
758
+ Pe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
809
759
  }
810
760
  !s && this.links[0] && this.updateLink(this.links[0], !0);
811
761
  }
@@ -835,7 +785,7 @@ class ft extends h {
835
785
  * @returns {object}
836
786
  */
837
787
  addLink({ label: e, href: s, exact: a, hidden: i }) {
838
- const n = Ne({ text: e, href: s, exact: a, hidden: i });
788
+ const n = Oe({ text: e, href: s, exact: a, hidden: i });
839
789
  return this.links.push(n), n;
840
790
  }
841
791
  /**
@@ -847,13 +797,13 @@ class ft extends h {
847
797
  this.links = [];
848
798
  }
849
799
  }
850
- const gt = d((t) => {
800
+ const ht = h((t) => {
851
801
  const e = t.margin || "m-4 ml-0";
852
802
  return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
853
803
  T({ variant: "back", class: "ghost", ...t })
854
804
  ]);
855
805
  });
856
- class H extends h {
806
+ class A extends u {
857
807
  /**
858
808
  * This will declare the props for the compiler.
859
809
  *
@@ -940,13 +890,13 @@ class H extends h {
940
890
  return this.children;
941
891
  }
942
892
  }
943
- j.addType("dockableOverlay", (t) => {
893
+ N.addType("dockableOverlay", (t) => {
944
894
  if (!t)
945
895
  return;
946
896
  const e = t.component;
947
897
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
948
898
  });
949
- class mt extends H {
899
+ class ut extends A {
950
900
  /**
951
901
  * This will stop presistence.
952
902
  *
@@ -1012,7 +962,7 @@ class mt extends H {
1012
962
  * @returns {void}
1013
963
  */
1014
964
  afterSetup() {
1015
- j.add(
965
+ N.add(
1016
966
  this.container,
1017
967
  "dockableOverlay",
1018
968
  {
@@ -1055,7 +1005,7 @@ class mt extends H {
1055
1005
  document.documentElement.style.overflowY = "auto";
1056
1006
  }
1057
1007
  }
1058
- class wt extends H {
1008
+ class ft extends A {
1059
1009
  /**
1060
1010
  * This will get the overlay type.
1061
1011
  *
@@ -1074,7 +1024,7 @@ class wt extends H {
1074
1024
  this.container = e, this.initialize();
1075
1025
  }
1076
1026
  }
1077
- const Ae = d(({ index: t, click: e, state: s }, a) => S({
1027
+ const ze = h(({ index: t, click: e, state: s }, a) => S({
1078
1028
  class: "p-2 cursor-pointer hover:bg-muted/50",
1079
1029
  onState: [
1080
1030
  [s, "selectedIndex", {
@@ -1083,11 +1033,11 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1083
1033
  }]
1084
1034
  ],
1085
1035
  click: () => e(t)
1086
- }, a)), je = d(({ selectOption: t, state: e }) => p({
1036
+ }, a)), $e = h(({ selectOption: t, state: e }) => w({
1087
1037
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
1088
- for: ["filteredOptions", (s, a) => Ae({ index: a, click: t, state: e }, s.label)]
1089
- })), Ue = d((t) => o({ class: "relative flex items-center" }, [
1090
- oe({
1038
+ for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
1039
+ })), Ne = h((t) => o({ class: "relative flex items-center" }, [
1040
+ ie({
1091
1041
  cache: "input",
1092
1042
  class: t.class ?? "",
1093
1043
  placeholder: t.placeholder ?? "Search...",
@@ -1103,22 +1053,22 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1103
1053
  ]
1104
1054
  }),
1105
1055
  t.icon && o({ class: "absolute flex right-0 mr-2" }, [
1106
- ee(t.icon)
1056
+ _(t.icon)
1107
1057
  ])
1108
- ])), Ye = (t) => o({
1058
+ ])), je = (t) => o({
1109
1059
  class: "relative flex fle-auto flex-col",
1110
1060
  onState: ["open", (e, s, a) => {
1111
1061
  if (e)
1112
- return new ce({
1062
+ return new le({
1113
1063
  cache: "dropdown",
1114
1064
  parent: a,
1115
1065
  button: a.input,
1116
1066
  size: "xl"
1117
1067
  }, [
1118
- je(t)
1068
+ $e(t)
1119
1069
  ]);
1120
1070
  }]
1121
- }), pt = Z(
1071
+ }), mt = V(
1122
1072
  {
1123
1073
  /**
1124
1074
  * This will set up the data object.
@@ -1215,7 +1165,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1215
1165
  */
1216
1166
  render() {
1217
1167
  return o({ class: "relative w-full max-w-md" }, [
1218
- Ue({
1168
+ Ne({
1219
1169
  // @ts-ignore
1220
1170
  state: this.state,
1221
1171
  // @ts-ignore
@@ -1227,7 +1177,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1227
1177
  // @ts-ignore
1228
1178
  handleKeyDown: this.handleKeyDown.bind(this)
1229
1179
  }),
1230
- Ye({
1180
+ je({
1231
1181
  // @ts-ignore
1232
1182
  state: this.state,
1233
1183
  // @ts-ignore
@@ -1238,7 +1188,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1238
1188
  ]);
1239
1189
  }
1240
1190
  }
1241
- ), He = (t) => S(
1191
+ ), Ae = (t) => S(
1242
1192
  {
1243
1193
  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",
1244
1194
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1250,10 +1200,10 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
1250
1200
  click: (e) => t.callBack(t.value)
1251
1201
  }, t.label)
1252
1202
  ]
1253
- ), 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}` }, [
1254
- p({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1203
+ ), 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}` }, [
1204
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1255
1205
  ]);
1256
- class bt extends h {
1206
+ class gt extends u {
1257
1207
  /**
1258
1208
  * This will declare the props for the compiler.
1259
1209
  *
@@ -1270,12 +1220,12 @@ class bt extends h {
1270
1220
  render() {
1271
1221
  const e = this.select.bind(this);
1272
1222
  return o({ class: "" }, [
1273
- Ee({
1223
+ Ye({
1274
1224
  class: this.class,
1275
1225
  options: this.options,
1276
1226
  callBack: e
1277
1227
  }),
1278
- N({
1228
+ z({
1279
1229
  class: "tab-content",
1280
1230
  onState: ["selected", this.updateContent.bind(this)]
1281
1231
  })
@@ -1341,7 +1291,7 @@ class bt extends h {
1341
1291
  };
1342
1292
  }
1343
1293
  }
1344
- const Qe = (t) => S(
1294
+ const He = (t) => S(
1345
1295
  {
1346
1296
  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",
1347
1297
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1354,10 +1304,10 @@ const Qe = (t) => S(
1354
1304
  disabled: t.disabled
1355
1305
  }, t.label)
1356
1306
  ]
1357
- ), 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}` }, [
1358
- p({ class: "flex flex-auto flex-row", map: [t.options, (e) => Xe(e, t.callBack)] })
1307
+ ), 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}` }, [
1308
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1359
1309
  ]);
1360
- class kt extends h {
1310
+ class pt extends u {
1361
1311
  /**
1362
1312
  * This will declare the props for the compiler.
1363
1313
  *
@@ -1373,7 +1323,7 @@ class kt extends h {
1373
1323
  */
1374
1324
  render() {
1375
1325
  const e = this.select.bind(this);
1376
- return qe({
1326
+ return Ee({
1377
1327
  class: this.class,
1378
1328
  options: this.options,
1379
1329
  callBack: e
@@ -1400,17 +1350,17 @@ class kt extends h {
1400
1350
  };
1401
1351
  }
1402
1352
  }
1403
- const Ke = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), _e = (t, e) => {
1353
+ const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
1404
1354
  const s = t.getLinkPath();
1405
- return t.exact ? e === s : Ke(s, e);
1406
- }, Ge = ({ text: t, href: e, exact: s }) => new A({
1355
+ return t.exact ? e === s : Qe(s, e);
1356
+ }, qe = ({ text: t, href: e, exact: s }) => new $({
1407
1357
  text: t,
1408
1358
  href: e,
1409
1359
  exact: s,
1410
1360
  dataSet: ["selected", ["state", !0, "active"]],
1411
1361
  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"
1412
1362
  });
1413
- class Ve extends h {
1363
+ class Ke extends u {
1414
1364
  /**
1415
1365
  * This will declare the props for the compiler.
1416
1366
  *
@@ -1432,11 +1382,11 @@ class Ve extends h {
1432
1382
  */
1433
1383
  render() {
1434
1384
  return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1435
- p({
1385
+ w({
1436
1386
  class: "flex flex-auto flex-row",
1437
1387
  map: [this.options, (e) => this.addLink(e)],
1438
1388
  watch: {
1439
- value: ["[[path]]", k.data],
1389
+ value: ["[[path]]", y.data],
1440
1390
  callBack: this.updateLinks.bind(this)
1441
1391
  }
1442
1392
  })
@@ -1448,7 +1398,7 @@ class Ve extends h {
1448
1398
  * @returns {void}
1449
1399
  */
1450
1400
  afterSetup() {
1451
- const e = k.data.path;
1401
+ const e = y.data.path;
1452
1402
  this.updateLinks(e);
1453
1403
  }
1454
1404
  /**
@@ -1461,7 +1411,7 @@ class Ve extends h {
1461
1411
  let s = !1, a = this.links[0];
1462
1412
  this.deactivateAllLinks();
1463
1413
  for (const i of this.links)
1464
- if (i.rendered !== !1 && (s = _e(i, e), s === !0)) {
1414
+ if (i.rendered !== !1 && (s = Xe(i, e), s === !0)) {
1465
1415
  this.updateLink(i, !0);
1466
1416
  break;
1467
1417
  }
@@ -1493,7 +1443,7 @@ class Ve extends h {
1493
1443
  * @returns {object}
1494
1444
  */
1495
1445
  addLink({ label: e, href: s, exact: a }) {
1496
- const i = Ge({ text: e, href: s, exact: a });
1446
+ const i = qe({ text: e, href: s, exact: a });
1497
1447
  return this.links.push(i), i;
1498
1448
  }
1499
1449
  /**
@@ -1505,7 +1455,7 @@ class Ve extends h {
1505
1455
  this.links = [];
1506
1456
  }
1507
1457
  }
1508
- class yt extends h {
1458
+ class wt extends u {
1509
1459
  /**
1510
1460
  * This will declare the props for the compiler.
1511
1461
  *
@@ -1521,11 +1471,11 @@ class yt extends h {
1521
1471
  */
1522
1472
  render() {
1523
1473
  return o({ class: "tab-panel" }, [
1524
- new Ve({
1474
+ new Ke({
1525
1475
  class: this.class,
1526
1476
  options: this.options
1527
1477
  }),
1528
- N({
1478
+ z({
1529
1479
  class: "tab-content",
1530
1480
  switch: this.addGroup()
1531
1481
  })
@@ -1551,7 +1501,7 @@ class yt extends h {
1551
1501
  return s;
1552
1502
  }
1553
1503
  }
1554
- class Je extends h {
1504
+ class Ge extends u {
1555
1505
  /**
1556
1506
  * Runs before rendering, sets up defaults, a timer for drawing,
1557
1507
  * and basic canvas properties.
@@ -1561,7 +1511,7 @@ class Je extends h {
1561
1511
  onCreated() {
1562
1512
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1563
1513
  const e = 1e3 / 60;
1564
- 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";
1514
+ 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";
1565
1515
  }
1566
1516
  /**
1567
1517
  * Renders a <canvas> element.
@@ -1569,7 +1519,7 @@ class Je extends h {
1569
1519
  * @returns {object} Layout definition for the canvas.
1570
1520
  */
1571
1521
  render() {
1572
- return V({
1522
+ return K({
1573
1523
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1574
1524
  });
1575
1525
  }
@@ -1622,8 +1572,8 @@ class Je extends h {
1622
1572
  s = f.clientX, a = f.clientY;
1623
1573
  } else
1624
1574
  s = e.x || e.clientX, a = e.y || e.clientY;
1625
- const u = parseInt((s - l.left) * n), c = parseInt((a - l.top) * n);
1626
- this.mouse.x = u, this.mouse.y = c;
1575
+ const d = parseInt((s - l.left) * n), c = parseInt((a - l.top) * n);
1576
+ this.mouse.x = d, this.mouse.y = c;
1627
1577
  }
1628
1578
  /**
1629
1579
  * Called when the pointer goes down on the canvas.
@@ -1687,7 +1637,7 @@ class Je extends h {
1687
1637
  * @returns {void}
1688
1638
  */
1689
1639
  noScaleResize() {
1690
- const e = W.getSize(container);
1640
+ const e = R.getSize(container);
1691
1641
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1692
1642
  }
1693
1643
  /**
@@ -1697,13 +1647,13 @@ class Je extends h {
1697
1647
  * @returns {void}
1698
1648
  */
1699
1649
  scale() {
1700
- const e = this.canvas, s = this.container, a = W.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1701
- let u = n + "px", c = l + "px";
1650
+ const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1651
+ let d = n + "px", c = l + "px";
1702
1652
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1703
- const f = a.width, g = a.height, r = f / n, m = g / l, b = Math.min(r, m);
1704
- u = n * b + "px", c = l * b + "px";
1653
+ const f = a.width, m = a.height, r = f / n, g = m / l, b = Math.min(r, g);
1654
+ d = n * b + "px", c = l * b + "px";
1705
1655
  }
1706
- e.style.width = u, e.style.height = c;
1656
+ e.style.width = d, e.style.height = c;
1707
1657
  }
1708
1658
  /**
1709
1659
  * Main drawing loop. If the mouse is down, adds a line
@@ -1777,7 +1727,7 @@ class Je extends h {
1777
1727
  this.timer.stop(), this.status = "stopped";
1778
1728
  }
1779
1729
  }
1780
- class xt extends h {
1730
+ class bt extends u {
1781
1731
  /**
1782
1732
  * Sets up default properties for the signature panel.
1783
1733
  *
@@ -1794,7 +1744,7 @@ class xt extends h {
1794
1744
  */
1795
1745
  render() {
1796
1746
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1797
- le({
1747
+ ne({
1798
1748
  cache: "hiddenInput",
1799
1749
  required: !0,
1800
1750
  bind: this.path + ".data"
@@ -1802,11 +1752,11 @@ class xt extends h {
1802
1752
  o({ class: "absolute top-2 right-2" }, [
1803
1753
  T({
1804
1754
  variant: "icon",
1805
- icon: y.circleX,
1755
+ icon: k.circleX,
1806
1756
  click: this.reset.bind(this)
1807
1757
  })
1808
1758
  ]),
1809
- new Je({
1759
+ new Ge({
1810
1760
  cache: "canvasLayer",
1811
1761
  margin: this.margin,
1812
1762
  targetSize: this.targetSize,
@@ -1856,36 +1806,36 @@ class xt extends h {
1856
1806
  }
1857
1807
  }
1858
1808
  export {
1859
- gt as B,
1860
- ye as C,
1861
- ve as D,
1862
- xe as H,
1863
- wt as I,
1864
- ft as N,
1865
- H as O,
1866
- ot as P,
1867
- ht as S,
1868
- R as T,
1869
- Oe as U,
1870
- ct as W,
1871
- fe as a,
1872
- P as b,
1873
- he as c,
1874
- lt as d,
1875
- rt as e,
1876
- me as f,
1877
- ue as g,
1878
- pe as h,
1879
- be as i,
1880
- Y as j,
1881
- dt as k,
1882
- ut as l,
1883
- mt as m,
1884
- pt as n,
1885
- Ue as o,
1886
- bt as p,
1887
- kt as q,
1888
- Ve as r,
1889
- yt as s,
1890
- xt as t
1809
+ ht as B,
1810
+ be as C,
1811
+ ke as D,
1812
+ ye as H,
1813
+ ft as I,
1814
+ dt as N,
1815
+ A as O,
1816
+ at as P,
1817
+ rt as S,
1818
+ B as T,
1819
+ Re as U,
1820
+ ot as W,
1821
+ he as a,
1822
+ W as b,
1823
+ ce as c,
1824
+ it as d,
1825
+ nt as e,
1826
+ fe as f,
1827
+ de as g,
1828
+ ge as h,
1829
+ pe as i,
1830
+ j,
1831
+ lt as k,
1832
+ ct as l,
1833
+ ut as m,
1834
+ mt as n,
1835
+ Ne as o,
1836
+ gt as p,
1837
+ pt as q,
1838
+ Ke as r,
1839
+ wt as s,
1840
+ bt as t
1891
1841
  };