@base-framework/ui 1.0.67 → 1.0.68

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.
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@ import { V as w, a as U } from "./veil-D4dRxILB.js";
5
5
  import { Icons as R } from "./icons.es.js";
6
6
  import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-DgARq0AK.js";
7
7
  import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-BDqm833e.js";
8
- import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-BrNu9yiK.js";
8
+ import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-BeiIudPS.js";
9
9
  import { B as cs, I as Cs, M as bs, d as Ds, e as Ss, g as Is, N as Bs, b as Ps, a as Fs, f as Ms, P as ks, c as Ns, S as vs, T as fs } from "./mobile-nav-wrapper-BE_hr65B.js";
10
10
  import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-nCAVFk3R.js";
11
11
  import { A as Es, F as Gs, M as Vs, a as js, T as qs } from "./aside-template-McEj_Gxc.js";
@@ -1,4 +1,4 @@
1
- import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-BrNu9yiK.js";
1
+ import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-BeiIudPS.js";
2
2
  import { b as L, C as O, D as F, a as U, F as G, M as j, c as q, p as w } from "./calendar-BDqm833e.js";
3
3
  import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-BE_hr65B.js";
4
4
  export {
@@ -1,10 +1,10 @@
1
1
  import { Button as y, Div as o, On as E, Span as v, Th as P, UseParent as H, I as Q, Thead as X, Tr as q, Table as R, P as m, Li as D, Time as K, Nav as S, Ul as b, Section as O, Canvas as G } from "@base-framework/atoms";
2
- import { Atom as d, Component as u, Data as L, DateTime as V, Jot as M, router as x, NavLink as z, DataTracker as N, base as B, Dom as I } from "@base-framework/base";
2
+ import { Atom as d, Component as u, Data as L, DateTime as V, Jot as M, router as x, NavLink as z, DataTracker as N, base as I, Dom as B } from "@base-framework/base";
3
3
  import { B as C, I as $ } from "./buttons-CVEwmPAi.js";
4
4
  import { Icons as w } from "./icons.es.js";
5
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 ne } from "./inputs-DmJuUwS9.js";
7
- import { A as ae, P as ie } from "./calendar-BDqm833e.js";
6
+ import { C as te, I as se, H as ae } from "./inputs-DmJuUwS9.js";
7
+ import { A as ne, P as ie } from "./calendar-BDqm833e.js";
8
8
  d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
@@ -14,7 +14,7 @@ d(({ value: t, label: e }) => y({
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
- click: (s, { state: n }) => n.performance = t
17
+ click: (s, { state: a }) => a.performance = t
18
18
  }, e));
19
19
  class Je extends u {
20
20
  /**
@@ -41,46 +41,46 @@ const oe = (t) => {
41
41
  }, le = (t) => {
42
42
  const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
43
43
  e.setDate(e.getDate() - s + 3);
44
- const n = e.getFullYear(), a = new Date(n, 0, 4);
45
- a.setDate(a.getDate() - (a.getDay() + 6) % 7);
46
- const i = Math.ceil((e - a) / 6048e5) + 1;
47
- return i > 52 && !oe(n) ? {
44
+ const a = e.getFullYear(), n = new Date(a, 0, 4);
45
+ n.setDate(n.getDate() - (n.getDay() + 6) % 7);
46
+ const i = Math.ceil((e - n) / 6048e5) + 1;
47
+ return i > 52 && !oe(a) ? {
48
48
  weekNumber: 1,
49
- year: n + 1
49
+ year: a + 1
50
50
  } : {
51
51
  weekNumber: i,
52
- year: n
52
+ year: a
53
53
  };
54
54
  }, re = (t, e, s) => {
55
55
  if (s === 0) return [];
56
- const n = new Date(t, e, 0).getDate();
56
+ const a = new Date(t, e, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
- (a, i) => new Date(t, e - 1, n - s + i + 1)
59
+ (n, i) => new Date(t, e - 1, a - s + i + 1)
60
60
  );
61
- }, ce = (t, e, s) => Array.from({ length: s }, (n, a) => new Date(t, e + 1, a + 1)), T = (t, e) => {
62
- const s = new Date(e, 0, 4), n = (s.getDay() + 6) % 7, a = new Date(s);
63
- a.setDate(s.getDate() - n);
64
- const i = new Date(a);
65
- return i.setDate(a.getDate() + (t - 1) * 7), i;
61
+ }, ce = (t, e, s) => Array.from({ length: s }, (a, n) => new Date(t, e + 1, n + 1)), T = (t, e) => {
62
+ const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, n = new Date(s);
63
+ n.setDate(s.getDate() - a);
64
+ const i = new Date(n);
65
+ return i.setDate(n.getDate() + (t - 1) * 7), i;
66
66
  }, Ze = (t, e) => {
67
- const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = [];
67
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), n = [];
68
68
  let i = [];
69
- for (let l = 1 - s; l <= n; l++) {
69
+ for (let l = 1 - s; l <= a; l++) {
70
70
  const h = new Date(t, e, l);
71
- i.push(l > 0 ? h : null), (i.length === 7 || l === n) && (a.push([...i]), i = []);
71
+ i.push(l > 0 ? h : null), (i.length === 7 || l === a) && (n.push([...i]), i = []);
72
72
  }
73
- return a;
73
+ return n;
74
74
  }, et = (t, e) => {
75
- const s = new Date(t, e + 1, 0).getDate(), n = [];
76
- let a = [];
75
+ const s = new Date(t, e + 1, 0).getDate(), a = [];
76
+ let n = [];
77
77
  for (let i = 1; i <= s; i++)
78
- a.push(new Date(t, e, i)), a.length === 7 && (n.push(a), a = []);
79
- return a.length > 0 && n.push(a), n;
78
+ n.push(new Date(t, e, i)), n.length === 7 && (a.push(n), n = []);
79
+ return n.length > 0 && a.push(n), a;
80
80
  }, de = (t, e, s) => {
81
- const n = /* @__PURE__ */ new Date();
82
- return n.getDate() === t && n.getMonth() === e && n.getFullYear() === s;
83
- }, he = ({ day: t, month: e, year: s, weekNumber: n, selectWeek: a }) => {
81
+ const a = /* @__PURE__ */ new Date();
82
+ return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
83
+ }, he = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: n }) => {
84
84
  const i = de(t, e, s);
85
85
  return y({
86
86
  text: t || "",
@@ -90,10 +90,10 @@ const oe = (t) => {
90
90
  ${i ? "bg-accent text-accent-foreground" : ""}
91
91
  hover:bg-primary hover:text-primary-foreground
92
92
  `,
93
- click: () => a(n, s)
93
+ click: () => n(a, s)
94
94
  });
95
95
  }, ue = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = re(t, e, s), i = Array.from({ length: n }, (r, p) => new Date(t, e, p + 1)), l = (a.length + i.length) % 7, h = l === 0 ? 0 : 7 - l, c = ce(t, e, h), f = [...a, ...i, ...c], g = [];
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), n = re(t, e, s), i = Array.from({ length: a }, (r, p) => new Date(t, e, p + 1)), l = (n.length + i.length) % 7, h = l === 0 ? 0 : 7 - l, c = ce(t, e, h), f = [...n, ...i, ...c], g = [];
97
97
  for (let r = 0; r < f.length; r += 7) {
98
98
  const p = f.slice(r, r + 7), k = p.find((F) => F) || new Date(t, e, 1), { weekNumber: U, year: Y } = le(k);
99
99
  g.push({
@@ -103,8 +103,8 @@ const oe = (t) => {
103
103
  });
104
104
  }
105
105
  return g;
106
- }, fe = ({ selectWeek: t }) => E("month", (e, s, { data: n }) => {
107
- const { year: a, month: i, currentDate: l } = n, h = ue(a, i);
106
+ }, fe = ({ selectWeek: t }) => E("month", (e, s, { data: a }) => {
107
+ const { year: n, month: i, currentDate: l } = a, h = ue(n, i);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -193,12 +193,12 @@ class tt extends u {
193
193
  * @returns {Data}
194
194
  */
195
195
  setData() {
196
- const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), n = T(s, e.getFullYear());
196
+ const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = T(s, e.getFullYear());
197
197
  return new L({
198
- monthName: this.getMonthName(n.getMonth()),
199
- year: n.getFullYear(),
200
- month: n.getMonth(),
201
- currentDate: n.getDate(),
198
+ monthName: this.getMonthName(a.getMonth()),
199
+ year: a.getFullYear(),
200
+ month: a.getMonth(),
201
+ currentDate: a.getDate(),
202
202
  currentWeek: s
203
203
  });
204
204
  }
@@ -219,10 +219,10 @@ class tt extends u {
219
219
  * @returns {number}
220
220
  */
221
221
  calculateCurrentWeek(e) {
222
- const s = new Date(e.valueOf()), n = (e.getDay() + 6) % 7;
223
- s.setDate(s.getDate() - n + 3);
224
- const a = s.valueOf();
225
- return s.setMonth(0, 1), s.getDay() !== 4 && s.setMonth(0, 1 + (4 - s.getDay() + 7) % 7), 1 + Math.ceil((a - s) / 6048e5);
222
+ const s = new Date(e.valueOf()), a = (e.getDay() + 6) % 7;
223
+ s.setDate(s.getDate() - a + 3);
224
+ const n = s.valueOf();
225
+ return s.setMonth(0, 1), s.getDay() !== 4 && s.setMonth(0, 1 + (4 - s.getDay() + 7) % 7), 1 + Math.ceil((n - s) / 6048e5);
226
226
  }
227
227
  /**
228
228
  * Gets the name of the month.
@@ -240,8 +240,8 @@ class tt extends u {
240
240
  */
241
241
  goToPreviousMonth() {
242
242
  const e = this.data;
243
- let { year: s, month: n } = e;
244
- n === 0 ? (n = 11, s--) : n--, this.setDate(n, s);
243
+ let { year: s, month: a } = e;
244
+ a === 0 ? (a = 11, s--) : a--, this.setDate(a, s);
245
245
  }
246
246
  /**
247
247
  * Updates the calendar to show the next month.
@@ -250,8 +250,8 @@ class tt extends u {
250
250
  */
251
251
  goToNextMonth() {
252
252
  const e = this.data;
253
- let { year: s, month: n } = e;
254
- n === 11 ? (n = 0, s++) : n++, this.setDate(n, s);
253
+ let { year: s, month: a } = e;
254
+ a === 11 ? (a = 0, s++) : a++, this.setDate(a, s);
255
255
  }
256
256
  /**
257
257
  * Sets the selected date.
@@ -261,12 +261,12 @@ class tt extends u {
261
261
  * @param {number|null} [date=null]
262
262
  * @returns {void}
263
263
  */
264
- setDate(e, s, n) {
264
+ setDate(e, s, a) {
265
265
  this.data.set({
266
266
  year: s,
267
267
  month: e,
268
268
  monthName: this.getMonthName(e)
269
- }), n && (this.data.currentDate = n);
269
+ }), a && (this.data.currentDate = a);
270
270
  }
271
271
  /**
272
272
  * Handles week selection.
@@ -276,8 +276,8 @@ class tt extends u {
276
276
  */
277
277
  selectWeek(e, s) {
278
278
  this.data.currentWeek = e;
279
- const n = T(e, s);
280
- this.setDate(n.getMonth(), n.getFullYear(), n.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
279
+ const a = T(e, s);
280
+ this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
281
281
  }
282
282
  /**
283
283
  * Renders the WeekCalendar component.
@@ -300,15 +300,15 @@ const pe = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
302
  }, me = (t) => P({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- H((e) => new te({ class: "mr-2", onChange: (s, n) => pe(e, n) }))
304
- ]), we = ({ align: t, sortable: e, key: s, label: n, sort: a, class: i }) => {
303
+ H((e) => new te({ class: "mr-2", onChange: (s, a) => pe(e, a) }))
304
+ ]), we = ({ align: t, sortable: e, key: s, label: a, sort: n, class: i }) => {
305
305
  const l = t || "justify-start";
306
306
  return P({
307
307
  class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
308
- click: e && (() => a(s))
308
+ click: e && (() => n(s))
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
- v(n),
311
+ v(a),
312
312
  e && Q({ class: "ml-2", html: w.arrows.upDown })
313
313
  ])
314
314
  ]);
@@ -323,11 +323,11 @@ const pe = (t, e) => {
323
323
  sort: t.sort
324
324
  })]
325
325
  })
326
- ]), be = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new _({
326
+ ]), be = ({ key: t, rows: e, selectRow: s, rowItem: a }) => new _({
327
327
  cache: "list",
328
328
  key: t,
329
329
  items: e,
330
- rowItem: (a) => n(a, s),
330
+ rowItem: (n) => a(n, s),
331
331
  class: "divide-y divide-border"
332
332
  }), ke = M(
333
333
  {
@@ -387,8 +387,8 @@ const pe = (t, e) => {
387
387
  selectRow(t) {
388
388
  const e = t.selected ?? !1;
389
389
  t.selected = !e;
390
- const s = this.data.get("selectedRows"), n = t.selected ? [...s, t] : s.filter((a) => a !== t);
391
- this.data.selectedRows = n, this.updateSelected();
390
+ const s = this.data.get("selectedRows"), a = t.selected ? [...s, t] : s.filter((n) => n !== t);
391
+ this.data.selectedRows = a, this.updateSelected();
392
392
  },
393
393
  /**
394
394
  * Renders the DataTable component.
@@ -480,6 +480,12 @@ const pe = (t, e) => {
480
480
  ), st = d((t) => {
481
481
  new ke(
482
482
  {
483
+ customHeaders: t.customHeaders,
484
+ headers: t.headers,
485
+ class: t.class,
486
+ key: t.key,
487
+ rows: t.rows,
488
+ rowItem: t.rowItem,
483
489
  /**
484
490
  * Renders the DataTable component.
485
491
  *
@@ -491,7 +497,7 @@ const pe = (t, e) => {
491
497
  o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
492
498
  R({ class: "w-full" }, [
493
499
  // @ts-ignore
494
- this.headers && j({ headers: this.headers, sort: (n) => this.sortRows(n) }),
500
+ this.headers && j({ headers: this.headers, sort: (a) => this.sortRows(a) }),
495
501
  // @ts-ignore
496
502
  this.customHeader ?? null,
497
503
  J({
@@ -531,7 +537,7 @@ const pe = (t, e) => {
531
537
  De(s, e)
532
538
  ])), Le = (t) => t.split(" ").map((s) => s[0]).join(""), Ce = d((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
533
539
  o({ class: "flex min-w-0 gap-x-4" }, [
534
- ae({ src: t.image, alt: t.name, fallbackText: Le(t.name) }),
540
+ ne({ src: t.image, alt: t.name, fallbackText: Le(t.name) }),
535
541
  xe({ name: t.name, email: t.email })
536
542
  ]),
537
543
  Se({
@@ -539,21 +545,21 @@ const pe = (t, e) => {
539
545
  lastSeen: t.lastSeen,
540
546
  status: t.status
541
547
  })
542
- ])), nt = d((t) => new Z({
548
+ ])), at = d((t) => new Z({
543
549
  cache: "list",
544
550
  key: "name",
545
551
  items: t.users,
546
552
  role: "list",
547
553
  class: "divide-y divide-border",
548
554
  rowItem: Ce
549
- })), Be = (t, e) => e.includes(t), Ie = (t, e, s) => t.exact ? s === e : Be(e, s), Te = ({ text: t, href: e, exact: s, hidden: n }) => new z({
555
+ })), Ie = (t, e) => e.includes(t), Be = (t, e, s) => t.exact ? s === e : Ie(e, s), Te = ({ text: t, href: e, exact: s, hidden: a }) => new z({
550
556
  text: t,
551
557
  href: e,
552
558
  exact: s,
553
559
  dataSet: ["selected", ["state", !0, "active"]],
554
- class: `${n ? "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`
560
+ 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`
555
561
  });
556
- class at extends u {
562
+ class nt extends u {
557
563
  /**
558
564
  * This will declare the props for the compiler.
559
565
  *
@@ -606,10 +612,10 @@ class at extends u {
606
612
  updateLinks(e) {
607
613
  let s = !1;
608
614
  this.deactivateAllLinks();
609
- for (const n of this.links) {
610
- if (!n.rendered)
615
+ for (const a of this.links) {
616
+ if (!a.rendered)
611
617
  continue;
612
- Ie(n, n.getLinkPath(), e) ? (this.updateLink(n, !0), s = !0) : this.updateLink(n, !1);
618
+ Be(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
613
619
  }
614
620
  !s && this.links[0] && this.updateLink(this.links[0], !0);
615
621
  }
@@ -638,8 +644,8 @@ class at extends u {
638
644
  * @param {object} option
639
645
  * @returns {object}
640
646
  */
641
- addLink({ label: e, href: s, exact: n, hidden: a }) {
642
- const i = Te({ text: e, href: s, exact: n, hidden: a });
647
+ addLink({ label: e, href: s, exact: a, hidden: n }) {
648
+ const i = Te({ text: e, href: s, exact: a, hidden: n });
643
649
  return this.links.push(i), i;
644
650
  }
645
651
  /**
@@ -784,8 +790,8 @@ class ot extends A {
784
790
  ["loading", {
785
791
  loading: !0
786
792
  }],
787
- ["docked", (s, n) => {
788
- s ? (n.className = this.getDockedClassName(), e.appendChild(n), document.documentElement.style.overflowY = "auto") : (n.className = this.getClassName(), app.root.appendChild(n), document.documentElement.style.overflowY = "hidden");
793
+ ["docked", (s, a) => {
794
+ s ? (a.className = this.getDockedClassName(), e.appendChild(a), document.documentElement.style.overflowY = "auto") : (a.className = this.getClassName(), app.root.appendChild(a), document.documentElement.style.overflowY = "hidden");
789
795
  }]
790
796
  ]
791
797
  },
@@ -890,7 +896,7 @@ class lt extends A {
890
896
  this.container = e, this.initialize();
891
897
  }
892
898
  }
893
- const We = d(({ index: t, click: e, state: s }, n) => D({
899
+ const We = d(({ index: t, click: e, state: s }, a) => D({
894
900
  class: "p-2 cursor-pointer hover:bg-muted/50",
895
901
  onState: [
896
902
  [s, "selectedIndex", {
@@ -899,9 +905,9 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
899
905
  }]
900
906
  ],
901
907
  click: () => e(t)
902
- }, n)), Pe = d(({ selectOption: t, state: e }) => b({
908
+ }, a)), Pe = d(({ selectOption: t, state: e }) => b({
903
909
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
904
- for: ["filteredOptions", (s, n) => We({ index: n, click: t, state: e }, s.label)]
910
+ for: ["filteredOptions", (s, a) => We({ index: a, click: t, state: e }, s.label)]
905
911
  })), Re = d((t) => o({ class: "relative flex items-center" }, [
906
912
  se({
907
913
  cache: "input",
@@ -918,12 +924,12 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
918
924
  ])
919
925
  ])), Oe = (t) => o({
920
926
  class: "relative flex fle-auto flex-col",
921
- onState: ["open", (e, s, n) => {
927
+ onState: ["open", (e, s, a) => {
922
928
  if (e)
923
929
  return new ie({
924
930
  cache: "dropdown",
925
- parent: n,
926
- button: n.input,
931
+ parent: a,
932
+ button: a.input,
927
933
  size: "xl"
928
934
  }, [
929
935
  Pe(t)
@@ -964,7 +970,7 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
964
970
  const t = this.data.filteredOptions;
965
971
  let { searchQuery: e } = this.state;
966
972
  e = e.toLowerCase();
967
- const s = t.findIndex((n) => n.label.toLowerCase() === e);
973
+ const s = t.findIndex((a) => a.label.toLowerCase() === e);
968
974
  s >= 0 && (this.state.selectedIndex = s);
969
975
  },
970
976
  /**
@@ -1129,11 +1135,11 @@ class ct extends u {
1129
1135
  const s = this.options;
1130
1136
  if (!s || s.length < 1)
1131
1137
  return;
1132
- const n = s[0];
1133
- for (const a of s)
1134
- if (a.value === e)
1135
- return a.layout;
1136
- return n.layout;
1138
+ const a = s[0];
1139
+ for (const n of s)
1140
+ if (n.value === e)
1141
+ return n.layout;
1142
+ return a.layout;
1137
1143
  }
1138
1144
  /**
1139
1145
  * This will setup the states.
@@ -1145,8 +1151,8 @@ class ct extends u {
1145
1151
  return {
1146
1152
  selected: {
1147
1153
  state: this.getFirstValue(),
1148
- callBack(n) {
1149
- s === "function" && e(n);
1154
+ callBack(a) {
1155
+ s === "function" && e(a);
1150
1156
  }
1151
1157
  }
1152
1158
  };
@@ -1269,14 +1275,14 @@ class Ee extends u {
1269
1275
  * @returns {void}
1270
1276
  */
1271
1277
  updateLinks(e) {
1272
- let s = !1, n = this.links[0];
1278
+ let s = !1, a = this.links[0];
1273
1279
  this.deactivateAllLinks();
1274
- for (const a of this.links)
1275
- if (a.rendered !== !1 && (s = Ye(a, e), s === !0)) {
1276
- this.updateLink(a, !0);
1280
+ for (const n of this.links)
1281
+ if (n.rendered !== !1 && (s = Ye(n, e), s === !0)) {
1282
+ this.updateLink(n, !0);
1277
1283
  break;
1278
1284
  }
1279
- s !== !0 && n && this.updateLink(n, !0);
1285
+ s !== !0 && a && this.updateLink(a, !0);
1280
1286
  }
1281
1287
  /**
1282
1288
  * This will deactivate all links.
@@ -1303,9 +1309,9 @@ class Ee extends u {
1303
1309
  * @param {object} option
1304
1310
  * @returns {object}
1305
1311
  */
1306
- addLink({ label: e, href: s, exact: n }) {
1307
- const a = Fe({ text: e, href: s, exact: n });
1308
- return this.links.push(a), a;
1312
+ addLink({ label: e, href: s, exact: a }) {
1313
+ const n = Fe({ text: e, href: s, exact: a });
1314
+ return this.links.push(n), n;
1309
1315
  }
1310
1316
  /**
1311
1317
  * This will remove all the links.
@@ -1349,9 +1355,9 @@ class ht extends u {
1349
1355
  */
1350
1356
  addGroup() {
1351
1357
  let e;
1352
- const s = [], n = this.options;
1353
- for (let a = 0, i = n.length; a < i; a++)
1354
- e = n[a], s.push(
1358
+ const s = [], a = this.options;
1359
+ for (let n = 0, i = a.length; n < i; n++)
1360
+ e = a[n], s.push(
1355
1361
  {
1356
1362
  uri: e.uri || e.href,
1357
1363
  component: e.component,
@@ -1410,12 +1416,12 @@ class He extends u {
1410
1416
  * @returns {Array} An array of [eventName, element, callback] definitions.
1411
1417
  */
1412
1418
  setupEvents() {
1413
- const e = this.panel, s = this.pointerPosition.bind(this), n = this.pointerUp.bind(this), a = this.pointerDown.bind(this), i = this.resize.bind(this), l = { passive: !1 };
1419
+ const e = this.panel, s = this.pointerPosition.bind(this), a = this.pointerUp.bind(this), n = this.pointerDown.bind(this), i = this.resize.bind(this), l = { passive: !1 };
1414
1420
  return [
1415
1421
  ["pointermove", e, s, l],
1416
- ["pointerup", e, n],
1417
- ["pointerdown", e, a, l],
1418
- ["pointerout", e, n],
1422
+ ["pointerup", e, a],
1423
+ ["pointerdown", e, n, l],
1424
+ ["pointerout", e, a],
1419
1425
  ["resize", window, i]
1420
1426
  ];
1421
1427
  }
@@ -1426,14 +1432,14 @@ class He extends u {
1426
1432
  * @returns {void}
1427
1433
  */
1428
1434
  getEventPosition(e) {
1429
- let s, n;
1430
- const a = this.canvas, i = a.width / parseInt(a.style.width), l = a.getBoundingClientRect();
1435
+ let s, a;
1436
+ const n = this.canvas, i = n.width / parseInt(n.style.width), l = n.getBoundingClientRect();
1431
1437
  if (e.touches && e.touches.length) {
1432
1438
  const f = e.touches[0];
1433
- s = f.clientX, n = f.clientY;
1439
+ s = f.clientX, a = f.clientY;
1434
1440
  } else
1435
- s = e.x || e.clientX, n = e.y || e.clientY;
1436
- const h = parseInt((s - l.left) * i), c = parseInt((n - l.top) * i);
1441
+ s = e.x || e.clientX, a = e.y || e.clientY;
1442
+ const h = parseInt((s - l.left) * i), c = parseInt((a - l.top) * i);
1437
1443
  this.mouse.x = h, this.mouse.y = c;
1438
1444
  }
1439
1445
  /**
@@ -1445,8 +1451,8 @@ class He extends u {
1445
1451
  */
1446
1452
  pointerDown(e) {
1447
1453
  e.preventDefault(), e.stopPropagation(), this.getEventPosition(e);
1448
- const { ctx: s, mouse: n } = this;
1449
- s.beginPath(), s.moveTo(n.x, n.y), n.status = "down", this.startTimer();
1454
+ const { ctx: s, mouse: a } = this;
1455
+ s.beginPath(), s.moveTo(a.x, a.y), a.status = "down", this.startTimer();
1450
1456
  }
1451
1457
  /**
1452
1458
  * Called when the pointer goes up or leaves the canvas area.
@@ -1474,12 +1480,12 @@ class He extends u {
1474
1480
  * @returns {void}
1475
1481
  */
1476
1482
  resize() {
1477
- const { canvas: e, ctx: s } = this, n = e.toDataURL();
1478
- if (this.scale(), this.setupBackground(s), n !== "data:,") {
1479
- const a = new window.Image();
1480
- B.on("load", a, function i() {
1481
- s.drawImage(a, 0, 0), B.off("load", a, i);
1482
- }), a.src = n;
1483
+ const { canvas: e, ctx: s } = this, a = e.toDataURL();
1484
+ if (this.scale(), this.setupBackground(s), a !== "data:,") {
1485
+ const n = new window.Image();
1486
+ I.on("load", n, function i() {
1487
+ s.drawImage(n, 0, 0), I.off("load", n, i);
1488
+ }), n.src = a;
1483
1489
  }
1484
1490
  this.draw();
1485
1491
  }
@@ -1498,7 +1504,7 @@ class He extends u {
1498
1504
  * @returns {void}
1499
1505
  */
1500
1506
  noScaleResize() {
1501
- const e = I.getSize(container);
1507
+ const e = B.getSize(container);
1502
1508
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1503
1509
  }
1504
1510
  /**
@@ -1508,10 +1514,10 @@ class He extends u {
1508
1514
  * @returns {void}
1509
1515
  */
1510
1516
  scale() {
1511
- const e = this.canvas, s = this.container, n = I.getSize(s), a = this.targetSize, i = a.width, l = a.height;
1517
+ const e = this.canvas, s = this.container, a = B.getSize(s), n = this.targetSize, i = n.width, l = n.height;
1512
1518
  let h = i + "px", c = l + "px";
1513
- if (this.width = e.width = i, this.height = e.height = l, n.width !== 0 && n.height !== 0) {
1514
- const f = n.width, g = n.height, r = f / i, p = g / l, k = Math.min(r, p);
1519
+ if (this.width = e.width = i, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1520
+ const f = a.width, g = a.height, r = f / i, p = g / l, k = Math.min(r, p);
1515
1521
  h = i * k + "px", c = l * k + "px";
1516
1522
  }
1517
1523
  e.style.width = h, e.style.height = c;
@@ -1534,8 +1540,8 @@ class He extends u {
1534
1540
  drawBottomLine(e) {
1535
1541
  const s = this.canvas;
1536
1542
  e.globalAlpha = 1, e.shadowBlur = 0;
1537
- const n = this.margin.x, a = this.height - this.margin.y;
1538
- e.beginPath(), e.moveTo(n, a), e.lineTo(s.width - this.margin.x, a), e.lineWidth = this.baseLineWidth, e.strokeStyle = this.baseStrokeColor, e.stroke(), e.closePath();
1543
+ const a = this.margin.x, n = this.height - this.margin.y;
1544
+ e.beginPath(), e.moveTo(a, n), e.lineTo(s.width - this.margin.x, n), e.lineWidth = this.baseLineWidth, e.strokeStyle = this.baseStrokeColor, e.stroke(), e.closePath();
1539
1545
  }
1540
1546
  /**
1541
1547
  * Adds a line to the current path, updating the 'signed' status.
@@ -1546,10 +1552,10 @@ class He extends u {
1546
1552
  * @param {string} color The stroke color.
1547
1553
  * @returns {void}
1548
1554
  */
1549
- addLine(e, s, n, a) {
1555
+ addLine(e, s, a, n) {
1550
1556
  this.signed || (this.signed = !0);
1551
- const i = Math.round(s), l = Math.round(n);
1552
- e.lineWidth = this.lineWidth, e.strokeStyle = a, e.lineTo(i, l), e.stroke();
1557
+ const i = Math.round(s), l = Math.round(a);
1558
+ e.lineWidth = this.lineWidth, e.strokeStyle = n, e.lineTo(i, l), e.stroke();
1553
1559
  }
1554
1560
  /**
1555
1561
  * Clears the canvas, sets signed to false, and re-initializes
@@ -1605,7 +1611,7 @@ class ut extends u {
1605
1611
  */
1606
1612
  render() {
1607
1613
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1608
- ne({
1614
+ ae({
1609
1615
  cache: "hiddenInput",
1610
1616
  required: !0,
1611
1617
  bind: this.path + ".data"
@@ -1672,7 +1678,7 @@ export {
1672
1678
  be as D,
1673
1679
  we as H,
1674
1680
  lt as I,
1675
- at as N,
1681
+ nt as N,
1676
1682
  A as O,
1677
1683
  Je as P,
1678
1684
  st as S,
@@ -1689,7 +1695,7 @@ export {
1689
1695
  fe as h,
1690
1696
  ge as i,
1691
1697
  ke as j,
1692
- nt as k,
1698
+ at as k,
1693
1699
  ot as l,
1694
1700
  rt as m,
1695
1701
  ct as n,
@@ -3,7 +3,15 @@
3
3
  *
4
4
  * This will create a scrollable data table.
5
5
  *
6
- * @param {object} props
6
+ * @property {HTMLElement} [props.scrollContainer] - The container element for scroll events. Defaults to window.
7
+ * @property {function} [props.loadMoreItems] - A function to fetch/generate additional items.
8
+ * @property {number} [props.offset] - The initial offset. Defaults to 0.
9
+ * @property {number} [props.limit] - Number of items to load per batch. Defaults to 20.
10
+ * @property {string} [props.class] - The class to add to the list.
11
+ * @property {string} [props.key] - The key to use to identify the items.
12
+ * @property {array} [props.rows] - The initial rows.
13
+ * @property {function} [props.rowItem] - The row item.
14
+ * @property {string} [props.containerClass] - The class to add to the scroll container.
7
15
  * @returns {object}
8
16
  */
9
17
  export const ScrollableDataTable: Function;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {