@base-framework/ui 1.0.66 → 1.0.67

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-BCsAYjDW.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";
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-BCsAYjDW.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-BrNu9yiK.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,20 +1,20 @@
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 h, 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 B, Dom as I } 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 ae } from "./inputs-DmJuUwS9.js";
7
- import { A as ne, P as ie } from "./calendar-BDqm833e.js";
8
- h((t, e) => ({
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";
8
+ d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
11
11
  children: e
12
12
  }));
13
- h(({ value: t, label: e }) => y({
13
+ 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: a }) => a.performance = t
17
+ click: (s, { state: n }) => n.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 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) ? {
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) ? {
48
48
  weekNumber: 1,
49
- year: a + 1
49
+ year: n + 1
50
50
  } : {
51
51
  weekNumber: i,
52
- year: a
52
+ year: n
53
53
  };
54
54
  }, re = (t, e, s) => {
55
55
  if (s === 0) return [];
56
- const a = new Date(t, e, 0).getDate();
56
+ const n = new Date(t, e, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
- (n, i) => new Date(t, e - 1, a - s + i + 1)
59
+ (a, i) => new Date(t, e - 1, n - s + i + 1)
60
60
  );
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;
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;
66
66
  }, Ze = (t, e) => {
67
- const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), n = [];
67
+ const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = [];
68
68
  let i = [];
69
- for (let l = 1 - s; l <= a; l++) {
70
- const d = new Date(t, e, l);
71
- i.push(l > 0 ? d : null), (i.length === 7 || l === a) && (n.push([...i]), i = []);
69
+ for (let l = 1 - s; l <= n; l++) {
70
+ const h = new Date(t, e, l);
71
+ i.push(l > 0 ? h : null), (i.length === 7 || l === n) && (a.push([...i]), i = []);
72
72
  }
73
- return n;
73
+ return a;
74
74
  }, et = (t, e) => {
75
- const s = new Date(t, e + 1, 0).getDate(), a = [];
76
- let n = [];
75
+ const s = new Date(t, e + 1, 0).getDate(), n = [];
76
+ let a = [];
77
77
  for (let i = 1; i <= s; i++)
78
- n.push(new Date(t, e, i)), n.length === 7 && (a.push(n), n = []);
79
- return n.length > 0 && a.push(n), a;
78
+ a.push(new Date(t, e, i)), a.length === 7 && (n.push(a), a = []);
79
+ return a.length > 0 && n.push(a), n;
80
80
  }, de = (t, e, s) => {
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 }) => {
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 }) => {
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: () => n(a, s)
93
+ click: () => a(n, s)
94
94
  });
95
95
  }, ue = (t, e) => {
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, d = l === 0 ? 0 : 7 - l, c = ce(t, e, d), f = [...n, ...i, ...c], g = [];
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 = [];
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: a }) => {
107
- const { year: n, month: i, currentDate: l } = a, d = ue(n, i);
106
+ }, fe = ({ selectWeek: t }) => E("month", (e, s, { data: n }) => {
107
+ const { year: a, month: i, currentDate: l } = n, h = ue(a, i);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -119,7 +119,7 @@ const oe = (t) => {
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
122
- ...d.map(
122
+ ...h.map(
123
123
  ({ weekNumber: c, days: f, year: g }) => o({
124
124
  class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
125
125
  onSet: ["currentWeek", {
@@ -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), a = T(s, e.getFullYear());
196
+ const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), n = T(s, e.getFullYear());
197
197
  return new L({
198
- monthName: this.getMonthName(a.getMonth()),
199
- year: a.getFullYear(),
200
- month: a.getMonth(),
201
- currentDate: a.getDate(),
198
+ monthName: this.getMonthName(n.getMonth()),
199
+ year: n.getFullYear(),
200
+ month: n.getMonth(),
201
+ currentDate: n.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()), 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);
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);
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: a } = e;
244
- a === 0 ? (a = 11, s--) : a--, this.setDate(a, s);
243
+ let { year: s, month: n } = e;
244
+ n === 0 ? (n = 11, s--) : n--, this.setDate(n, 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: a } = e;
254
- a === 11 ? (a = 0, s++) : a++, this.setDate(a, s);
253
+ let { year: s, month: n } = e;
254
+ n === 11 ? (n = 0, s++) : n++, this.setDate(n, 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, a) {
264
+ setDate(e, s, n) {
265
265
  this.data.set({
266
266
  year: s,
267
267
  month: e,
268
268
  monthName: this.getMonthName(e)
269
- }), a && (this.data.currentDate = a);
269
+ }), n && (this.data.currentDate = n);
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 a = T(e, s);
280
- this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
279
+ const n = T(e, s);
280
+ this.setDate(n.getMonth(), n.getFullYear(), n.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, a) => pe(e, a) }))
304
- ]), we = ({ align: t, sortable: e, key: s, label: a, sort: n, class: i }) => {
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 }) => {
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 && (() => n(s))
308
+ click: e && (() => a(s))
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
- v(a),
311
+ v(n),
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: a }) => new _({
327
- cache: "table",
326
+ ]), be = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new _({
327
+ cache: "list",
328
328
  key: t,
329
329
  items: e,
330
- rowItem: (n) => a(n, s),
330
+ rowItem: (a) => n(a, s),
331
331
  class: "divide-y divide-border"
332
332
  }), ke = M(
333
333
  {
@@ -348,7 +348,7 @@ const pe = (t, e) => {
348
348
  * @returns {boolean}
349
349
  */
350
350
  toggleAllSelectedRows() {
351
- const t = this.table.getRows(), e = this.data.selectedRows.length === t.length, s = e ? [] : t;
351
+ const t = this.list.getRows(), e = this.data.selectedRows.length === t.length, s = e ? [] : t;
352
352
  return this.data.selectedRows = s, this.updateSelected(), this.updateTable(!e), e;
353
353
  },
354
354
  /**
@@ -376,8 +376,8 @@ const pe = (t, e) => {
376
376
  * @returns {void}
377
377
  */
378
378
  updateTable(t) {
379
- const e = this.table.getRows();
380
- e.forEach((s) => s.selected = t), this.table.setRows(e);
379
+ const e = this.list.getRows();
380
+ e.forEach((s) => s.selected = t), this.list.setRows(e);
381
381
  },
382
382
  /**
383
383
  * Handles row selection.
@@ -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"), a = t.selected ? [...s, t] : s.filter((n) => n !== t);
391
- this.data.selectedRows = a, this.updateSelected();
390
+ const s = this.data.get("selectedRows"), n = t.selected ? [...s, t] : s.filter((a) => a !== t);
391
+ this.data.selectedRows = n, this.updateSelected();
392
392
  },
393
393
  /**
394
394
  * Renders the DataTable component.
@@ -425,7 +425,7 @@ const pe = (t, e) => {
425
425
  * @returns {void}
426
426
  */
427
427
  remove(t) {
428
- this.table.remove(t);
428
+ this.list.remove(t);
429
429
  },
430
430
  /**
431
431
  * This will set the items in the list.
@@ -435,7 +435,7 @@ const pe = (t, e) => {
435
435
  * @returns {void}
436
436
  */
437
437
  setRows(t) {
438
- this.table.setRows(t);
438
+ this.list.setRows(t);
439
439
  },
440
440
  /**
441
441
  * This will append items to the list.
@@ -445,7 +445,7 @@ const pe = (t, e) => {
445
445
  * @returns {void}
446
446
  */
447
447
  append(t) {
448
- this.table.append(t);
448
+ this.list.append(t);
449
449
  },
450
450
  /**
451
451
  * This will mingle the new items with the old items.
@@ -456,7 +456,7 @@ const pe = (t, e) => {
456
456
  * @returns {void}
457
457
  */
458
458
  mingle(t, e = !1) {
459
- this.table.mingle(t, e);
459
+ this.list.mingle(t, e);
460
460
  },
461
461
  /**
462
462
  * This will prepend items to the list.
@@ -466,7 +466,7 @@ const pe = (t, e) => {
466
466
  * @returns {void}
467
467
  */
468
468
  prepend(t) {
469
- this.table.prepend(t);
469
+ this.list.prepend(t);
470
470
  },
471
471
  /**
472
472
  * This will remove the selected rows.
@@ -477,37 +477,45 @@ const pe = (t, e) => {
477
477
  this.data.selectedRows = [];
478
478
  }
479
479
  }
480
- );
481
- class st extends ke {
482
- /**
483
- * Renders the DataTable component.
484
- *
485
- * @returns {object}
486
- */
487
- render() {
488
- const e = this.rows, s = this.border !== !1 ? "border" : "";
489
- return o({ class: "w-full" }, [
490
- o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
491
- R({ class: "w-full" }, [
492
- // @ts-ignore
493
- this.headers && j({ headers: this.headers, sort: (a) => this.sortRows(a) }),
494
- // @ts-ignore
495
- this.customHeader ?? null,
496
- J({
497
- // @ts-ignore
498
- key: this.key,
499
- rows: e,
500
- // @ts-ignore
501
- selectRow: this.selectRow.bind(this),
502
- // @ts-ignore
503
- rowItem: this.rowItem
504
- })
505
- ])
506
- ])
507
- ]);
508
- }
509
- }
510
- const xe = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
480
+ ), st = d((t) => {
481
+ new ke(
482
+ {
483
+ /**
484
+ * Renders the DataTable component.
485
+ *
486
+ * @returns {object}
487
+ */
488
+ render() {
489
+ const e = this.rows, s = this.border !== !1 ? "border" : "";
490
+ return o({ class: "w-full" }, [
491
+ o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
492
+ R({ class: "w-full" }, [
493
+ // @ts-ignore
494
+ this.headers && j({ headers: this.headers, sort: (n) => this.sortRows(n) }),
495
+ // @ts-ignore
496
+ this.customHeader ?? null,
497
+ J({
498
+ scrollContainer: t.scrollContainer,
499
+ loadMoreItems: t.loadMoreItems,
500
+ offset: t.offset,
501
+ limit: t.limit,
502
+ containerClass: t.containerClass ?? "",
503
+ data: t.data,
504
+ // @ts-ignore
505
+ key: this.key,
506
+ rows: e,
507
+ // @ts-ignore
508
+ selectRow: this.selectRow.bind(this),
509
+ // @ts-ignore
510
+ rowItem: this.rowItem
511
+ })
512
+ ])
513
+ ])
514
+ ]);
515
+ }
516
+ }
517
+ );
518
+ }), xe = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
511
519
  m({ class: "text-base font-semibold leading-6 m-0" }, t),
512
520
  m({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
513
521
  ])), ye = () => o({ class: "flex items-center gap-x-1.5" }, [
@@ -518,12 +526,12 @@ const xe = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
518
526
  ]), ve = (t) => m({ class: "text-xs leading-5 text-muted-foreground" }, [
519
527
  v("Last seen "),
520
528
  K({ datetime: t }, "3h ago")
521
- ]), De = (t, e) => t === "online" ? ye() : ve(e), Se = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
529
+ ]), De = (t, e) => t === "online" ? ye() : ve(e), Se = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
522
530
  m({ class: "text-sm leading-6 m-0" }, t),
523
531
  De(s, e)
524
- ])), Le = (t) => t.split(" ").map((s) => s[0]).join(""), Ce = h((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
532
+ ])), 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" }, [
525
533
  o({ class: "flex min-w-0 gap-x-4" }, [
526
- ne({ src: t.image, alt: t.name, fallbackText: Le(t.name) }),
534
+ ae({ src: t.image, alt: t.name, fallbackText: Le(t.name) }),
527
535
  xe({ name: t.name, email: t.email })
528
536
  ]),
529
537
  Se({
@@ -531,21 +539,21 @@ const xe = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
531
539
  lastSeen: t.lastSeen,
532
540
  status: t.status
533
541
  })
534
- ])), at = h((t) => new Z({
542
+ ])), nt = d((t) => new Z({
535
543
  cache: "list",
536
544
  key: "name",
537
545
  items: t.users,
538
546
  role: "list",
539
547
  class: "divide-y divide-border",
540
548
  rowItem: Ce
541
- })), 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: a }) => new z({
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({
542
550
  text: t,
543
551
  href: e,
544
552
  exact: s,
545
553
  dataSet: ["selected", ["state", !0, "active"]],
546
- 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`
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`
547
555
  });
548
- class nt extends u {
556
+ class at extends u {
549
557
  /**
550
558
  * This will declare the props for the compiler.
551
559
  *
@@ -598,10 +606,10 @@ class nt extends u {
598
606
  updateLinks(e) {
599
607
  let s = !1;
600
608
  this.deactivateAllLinks();
601
- for (const a of this.links) {
602
- if (!a.rendered)
609
+ for (const n of this.links) {
610
+ if (!n.rendered)
603
611
  continue;
604
- Ie(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
612
+ Ie(n, n.getLinkPath(), e) ? (this.updateLink(n, !0), s = !0) : this.updateLink(n, !1);
605
613
  }
606
614
  !s && this.links[0] && this.updateLink(this.links[0], !0);
607
615
  }
@@ -630,8 +638,8 @@ class nt extends u {
630
638
  * @param {object} option
631
639
  * @returns {object}
632
640
  */
633
- addLink({ label: e, href: s, exact: a, hidden: n }) {
634
- const i = Te({ text: e, href: s, exact: a, hidden: n });
641
+ addLink({ label: e, href: s, exact: n, hidden: a }) {
642
+ const i = Te({ text: e, href: s, exact: n, hidden: a });
635
643
  return this.links.push(i), i;
636
644
  }
637
645
  /**
@@ -643,7 +651,7 @@ class nt extends u {
643
651
  this.links = [];
644
652
  }
645
653
  }
646
- const it = h((t) => {
654
+ const it = d((t) => {
647
655
  const e = t.margin || "m-4 ml-0";
648
656
  return o({ class: `flex-none ${e}` }, [
649
657
  C({
@@ -776,8 +784,8 @@ class ot extends A {
776
784
  ["loading", {
777
785
  loading: !0
778
786
  }],
779
- ["docked", (s, a) => {
780
- 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");
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");
781
789
  }]
782
790
  ]
783
791
  },
@@ -882,7 +890,7 @@ class lt extends A {
882
890
  this.container = e, this.initialize();
883
891
  }
884
892
  }
885
- const We = h(({ index: t, click: e, state: s }, a) => D({
893
+ const We = d(({ index: t, click: e, state: s }, n) => D({
886
894
  class: "p-2 cursor-pointer hover:bg-muted/50",
887
895
  onState: [
888
896
  [s, "selectedIndex", {
@@ -891,10 +899,10 @@ const We = h(({ index: t, click: e, state: s }, a) => D({
891
899
  }]
892
900
  ],
893
901
  click: () => e(t)
894
- }, a)), Pe = h(({ selectOption: t, state: e }) => b({
902
+ }, n)), Pe = d(({ selectOption: t, state: e }) => b({
895
903
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
896
- for: ["filteredOptions", (s, a) => We({ index: a, click: t, state: e }, s.label)]
897
- })), Re = h((t) => o({ class: "relative flex items-center" }, [
904
+ for: ["filteredOptions", (s, n) => We({ index: n, click: t, state: e }, s.label)]
905
+ })), Re = d((t) => o({ class: "relative flex items-center" }, [
898
906
  se({
899
907
  cache: "input",
900
908
  placeholder: t.placeholder ?? "Search...",
@@ -910,12 +918,12 @@ const We = h(({ index: t, click: e, state: s }, a) => D({
910
918
  ])
911
919
  ])), Oe = (t) => o({
912
920
  class: "relative flex fle-auto flex-col",
913
- onState: ["open", (e, s, a) => {
921
+ onState: ["open", (e, s, n) => {
914
922
  if (e)
915
923
  return new ie({
916
924
  cache: "dropdown",
917
- parent: a,
918
- button: a.input,
925
+ parent: n,
926
+ button: n.input,
919
927
  size: "xl"
920
928
  }, [
921
929
  Pe(t)
@@ -956,7 +964,7 @@ const We = h(({ index: t, click: e, state: s }, a) => D({
956
964
  const t = this.data.filteredOptions;
957
965
  let { searchQuery: e } = this.state;
958
966
  e = e.toLowerCase();
959
- const s = t.findIndex((a) => a.label.toLowerCase() === e);
967
+ const s = t.findIndex((n) => n.label.toLowerCase() === e);
960
968
  s >= 0 && (this.state.selectedIndex = s);
961
969
  },
962
970
  /**
@@ -1121,11 +1129,11 @@ class ct extends u {
1121
1129
  const s = this.options;
1122
1130
  if (!s || s.length < 1)
1123
1131
  return;
1124
- const a = s[0];
1125
- for (const n of s)
1126
- if (n.value === e)
1127
- return n.layout;
1128
- return a.layout;
1132
+ const n = s[0];
1133
+ for (const a of s)
1134
+ if (a.value === e)
1135
+ return a.layout;
1136
+ return n.layout;
1129
1137
  }
1130
1138
  /**
1131
1139
  * This will setup the states.
@@ -1137,8 +1145,8 @@ class ct extends u {
1137
1145
  return {
1138
1146
  selected: {
1139
1147
  state: this.getFirstValue(),
1140
- callBack(a) {
1141
- s === "function" && e(a);
1148
+ callBack(n) {
1149
+ s === "function" && e(n);
1142
1150
  }
1143
1151
  }
1144
1152
  };
@@ -1261,14 +1269,14 @@ class Ee extends u {
1261
1269
  * @returns {void}
1262
1270
  */
1263
1271
  updateLinks(e) {
1264
- let s = !1, a = this.links[0];
1272
+ let s = !1, n = this.links[0];
1265
1273
  this.deactivateAllLinks();
1266
- for (const n of this.links)
1267
- if (n.rendered !== !1 && (s = Ye(n, e), s === !0)) {
1268
- this.updateLink(n, !0);
1274
+ for (const a of this.links)
1275
+ if (a.rendered !== !1 && (s = Ye(a, e), s === !0)) {
1276
+ this.updateLink(a, !0);
1269
1277
  break;
1270
1278
  }
1271
- s !== !0 && a && this.updateLink(a, !0);
1279
+ s !== !0 && n && this.updateLink(n, !0);
1272
1280
  }
1273
1281
  /**
1274
1282
  * This will deactivate all links.
@@ -1295,9 +1303,9 @@ class Ee extends u {
1295
1303
  * @param {object} option
1296
1304
  * @returns {object}
1297
1305
  */
1298
- addLink({ label: e, href: s, exact: a }) {
1299
- const n = Fe({ text: e, href: s, exact: a });
1300
- return this.links.push(n), n;
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;
1301
1309
  }
1302
1310
  /**
1303
1311
  * This will remove all the links.
@@ -1341,9 +1349,9 @@ class ht extends u {
1341
1349
  */
1342
1350
  addGroup() {
1343
1351
  let e;
1344
- const s = [], a = this.options;
1345
- for (let n = 0, i = a.length; n < i; n++)
1346
- e = a[n], s.push(
1352
+ const s = [], n = this.options;
1353
+ for (let a = 0, i = n.length; a < i; a++)
1354
+ e = n[a], s.push(
1347
1355
  {
1348
1356
  uri: e.uri || e.href,
1349
1357
  component: e.component,
@@ -1402,12 +1410,12 @@ class He extends u {
1402
1410
  * @returns {Array} An array of [eventName, element, callback] definitions.
1403
1411
  */
1404
1412
  setupEvents() {
1405
- 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 };
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 };
1406
1414
  return [
1407
1415
  ["pointermove", e, s, l],
1408
- ["pointerup", e, a],
1409
- ["pointerdown", e, n, l],
1410
- ["pointerout", e, a],
1416
+ ["pointerup", e, n],
1417
+ ["pointerdown", e, a, l],
1418
+ ["pointerout", e, n],
1411
1419
  ["resize", window, i]
1412
1420
  ];
1413
1421
  }
@@ -1418,15 +1426,15 @@ class He extends u {
1418
1426
  * @returns {void}
1419
1427
  */
1420
1428
  getEventPosition(e) {
1421
- let s, a;
1422
- const n = this.canvas, i = n.width / parseInt(n.style.width), l = n.getBoundingClientRect();
1429
+ let s, n;
1430
+ const a = this.canvas, i = a.width / parseInt(a.style.width), l = a.getBoundingClientRect();
1423
1431
  if (e.touches && e.touches.length) {
1424
1432
  const f = e.touches[0];
1425
- s = f.clientX, a = f.clientY;
1433
+ s = f.clientX, n = f.clientY;
1426
1434
  } else
1427
- s = e.x || e.clientX, a = e.y || e.clientY;
1428
- const d = parseInt((s - l.left) * i), c = parseInt((a - l.top) * i);
1429
- this.mouse.x = d, this.mouse.y = c;
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);
1437
+ this.mouse.x = h, this.mouse.y = c;
1430
1438
  }
1431
1439
  /**
1432
1440
  * Called when the pointer goes down on the canvas.
@@ -1437,8 +1445,8 @@ class He extends u {
1437
1445
  */
1438
1446
  pointerDown(e) {
1439
1447
  e.preventDefault(), e.stopPropagation(), this.getEventPosition(e);
1440
- const { ctx: s, mouse: a } = this;
1441
- s.beginPath(), s.moveTo(a.x, a.y), a.status = "down", this.startTimer();
1448
+ const { ctx: s, mouse: n } = this;
1449
+ s.beginPath(), s.moveTo(n.x, n.y), n.status = "down", this.startTimer();
1442
1450
  }
1443
1451
  /**
1444
1452
  * Called when the pointer goes up or leaves the canvas area.
@@ -1466,12 +1474,12 @@ class He extends u {
1466
1474
  * @returns {void}
1467
1475
  */
1468
1476
  resize() {
1469
- const { canvas: e, ctx: s } = this, a = e.toDataURL();
1470
- if (this.scale(), this.setupBackground(s), a !== "data:,") {
1471
- const n = new window.Image();
1472
- B.on("load", n, function i() {
1473
- s.drawImage(n, 0, 0), B.off("load", n, i);
1474
- }), n.src = a;
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;
1475
1483
  }
1476
1484
  this.draw();
1477
1485
  }
@@ -1500,13 +1508,13 @@ class He extends u {
1500
1508
  * @returns {void}
1501
1509
  */
1502
1510
  scale() {
1503
- const e = this.canvas, s = this.container, a = I.getSize(s), n = this.targetSize, i = n.width, l = n.height;
1504
- let d = i + "px", c = l + "px";
1505
- if (this.width = e.width = i, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1506
- const f = a.width, g = a.height, r = f / i, p = g / l, k = Math.min(r, p);
1507
- d = i * k + "px", c = l * k + "px";
1511
+ const e = this.canvas, s = this.container, n = I.getSize(s), a = this.targetSize, i = a.width, l = a.height;
1512
+ 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);
1515
+ h = i * k + "px", c = l * k + "px";
1508
1516
  }
1509
- e.style.width = d, e.style.height = c;
1517
+ e.style.width = h, e.style.height = c;
1510
1518
  }
1511
1519
  /**
1512
1520
  * Main drawing loop. If the mouse is down, adds a line
@@ -1526,8 +1534,8 @@ class He extends u {
1526
1534
  drawBottomLine(e) {
1527
1535
  const s = this.canvas;
1528
1536
  e.globalAlpha = 1, e.shadowBlur = 0;
1529
- const a = this.margin.x, n = this.height - this.margin.y;
1530
- 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();
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();
1531
1539
  }
1532
1540
  /**
1533
1541
  * Adds a line to the current path, updating the 'signed' status.
@@ -1538,10 +1546,10 @@ class He extends u {
1538
1546
  * @param {string} color The stroke color.
1539
1547
  * @returns {void}
1540
1548
  */
1541
- addLine(e, s, a, n) {
1549
+ addLine(e, s, n, a) {
1542
1550
  this.signed || (this.signed = !0);
1543
- const i = Math.round(s), l = Math.round(a);
1544
- e.lineWidth = this.lineWidth, e.strokeStyle = n, e.lineTo(i, l), e.stroke();
1551
+ const i = Math.round(s), l = Math.round(n);
1552
+ e.lineWidth = this.lineWidth, e.strokeStyle = a, e.lineTo(i, l), e.stroke();
1545
1553
  }
1546
1554
  /**
1547
1555
  * Clears the canvas, sets signed to false, and re-initializes
@@ -1597,7 +1605,7 @@ class ut extends u {
1597
1605
  */
1598
1606
  render() {
1599
1607
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1600
- ae({
1608
+ ne({
1601
1609
  cache: "hiddenInput",
1602
1610
  required: !0,
1603
1611
  bind: this.path + ".data"
@@ -1664,7 +1672,7 @@ export {
1664
1672
  be as D,
1665
1673
  we as H,
1666
1674
  lt as I,
1667
- nt as N,
1675
+ at as N,
1668
1676
  A as O,
1669
1677
  Je as P,
1670
1678
  st as S,
@@ -1681,7 +1689,7 @@ export {
1681
1689
  fe as h,
1682
1690
  ge as i,
1683
1691
  ke as j,
1684
- at as k,
1692
+ nt as k,
1685
1693
  ot as l,
1686
1694
  rt as m,
1687
1695
  ct as n,
@@ -1,20 +1,13 @@
1
- declare const ScrollableDataTable_base: typeof import("@base-framework/base").Component;
2
1
  /**
3
2
  * ScrollableDataTable Component
4
3
  *
5
- * Manages data, filtering, pagination, and selection within a table.
4
+ * This will create a scrollable data table.
6
5
  *
7
6
  * @param {object} props
8
7
  * @returns {object}
9
8
  */
10
- export class ScrollableDataTable extends ScrollableDataTable_base {
11
- /**
12
- * Renders the DataTable component.
13
- *
14
- * @returns {object}
15
- */
16
- render(): object;
17
- }
9
+ export const ScrollableDataTable: Function;
10
+ export default ScrollableDataTable;
18
11
  import { CheckboxCol } from './table-header.js';
19
12
  import { HeaderCol } from './table-header.js';
20
13
  import { TableHeader } from './table-header.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
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": {