@base-framework/ui 1.0.12 → 1.0.13

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-DSQdR6CM.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 Ca, p as Ta, q as ca, S as Da, n as Ia, o as Sa, T as ba, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-34GijCiu.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-BjUju8_5.js";
8
- import { B as Oa, m 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, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-CuDOB5K1.js";
8
+ import { B as Oa, m 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, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-D_C96Oak.js";
9
9
  import { B as Cs, I as Ts, M as cs, d as Ds, e as Is, g as Ss, N as bs, b as Bs, a as Ps, f as Fs, P as Ms, c as ks, S as Ns, T as vs } from "./mobile-nav-wrapper-DyNFnla-.js";
10
10
  import { B as xs, a as hs, C as ys, F as Ws, b as Ls, c as As, M as Hs, P as ws, S as Us } from "./sidebar-menu-page-lAu74WTl.js";
11
11
  import { A as Rs, F as Es, M as Gs, a as Vs, T as js } from "./aside-template-McEj_Gxc.js";
@@ -1,4 +1,4 @@
1
- import { B as s, m as o, C as t, j as r, D as n, l, H as i, I as d, N as b, O as v, P as g, S as p, q as u, p as N, n as k, o as C, T as D, k as M, U as T, W as c, f as B, h as m, i as y, c as W, d as h, b as H, e as P, a as S, g as f } from "./signature-panel-CuDOB5K1.js";
1
+ import { B as s, m as o, C as t, j as r, D as n, l, H as i, I as d, N as b, O as v, P as g, S as p, q as u, p as N, n as k, o as C, T as D, k as M, U as T, W as c, f as B, h as m, i as y, c as W, d as h, b as H, e as P, a as S, g as f } from "./signature-panel-D_C96Oak.js";
2
2
  import { b as I, C as L, D as O, a as F, F as U, M as G, c as j, p as q } from "./calendar-BjUju8_5.js";
3
3
  import { B as z, I as A, M as E, d as J, e as K, g as Q, N as R, b as V, a as X, f as Y, P as Z, c as _, S as $, T as aa } from "./mobile-nav-wrapper-DyNFnla-.js";
4
4
  export {
@@ -1,10 +1,10 @@
1
- import { Button as v, Div as l, On as U, Span as y, Th as W, UseParent as Y, I as E, Thead as F, Tr as H, Table as Q, P as m, Li as D, Time as X, Nav as S, Ul as b, Section as P, Canvas as q } from "@base-framework/atoms";
2
- import { Atom as u, Component as g, Data as L, DateTime as K, Jot as O, router as k, NavLink as M, base as B, Dom as I } from "@base-framework/base";
1
+ import { Button as v, Div as o, On as U, Span as y, Th as P, I as Y, Thead as E, Tr as F, Table as H, P as m, Li as D, Time as Q, Nav as S, Ul as b, Section as O, Canvas as X } from "@base-framework/atoms";
2
+ import { Atom as u, Component as g, Data as L, DateTime as q, Jot as R, router as k, NavLink as M, base as B, Dom as I } from "@base-framework/base";
3
3
  import { B as C, I as z } from "./buttons-CVEwmPAi.js";
4
4
  import { Icons as w } from "./icons.es.js";
5
- import { TableBody as _, List as G, IntervalTimer as V } from "@base-framework/organisms";
6
- import { C as J, I as Z, H as ee } from "./inputs-O_WkdbI3.js";
7
- import { A as te, P as se } from "./calendar-BjUju8_5.js";
5
+ import { TableBody as K, List as _, IntervalTimer as G } from "@base-framework/organisms";
6
+ import { C as V, I as J, H as Z } from "./inputs-O_WkdbI3.js";
7
+ import { A as ee, P as te } from "./calendar-BjUju8_5.js";
8
8
  u((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
@@ -31,34 +31,34 @@ class _e extends g {
31
31
  * @returns {object}
32
32
  */
33
33
  render() {
34
- return l({ class: this.class || "" }, this.children);
34
+ return o({ class: this.class || "" }, this.children);
35
35
  }
36
36
  }
37
- const ne = (t) => {
37
+ const se = (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
- }, ae = (t) => {
41
+ }, ne = (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 n = e.getFullYear(), a = new Date(n, 0, 4);
45
45
  a.setDate(a.getDate() - (a.getDay() + 6) % 7);
46
46
  const i = Math.ceil((e - a) / 6048e5) + 1;
47
- return i > 52 && !ne(n) ? {
47
+ return i > 52 && !se(n) ? {
48
48
  weekNumber: 1,
49
49
  year: n + 1
50
50
  } : {
51
51
  weekNumber: i,
52
52
  year: n
53
53
  };
54
- }, ie = (t, e, s) => {
54
+ }, ae = (t, e, s) => {
55
55
  if (s === 0) return [];
56
56
  const n = new Date(t, e, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
59
  (a, i) => new Date(t, e - 1, n - s + i + 1)
60
60
  );
61
- }, oe = (t, e, s) => Array.from({ length: s }, (n, a) => new Date(t, e + 1, a + 1)), T = (t, e) => {
61
+ }, ie = (t, e, s) => Array.from({ length: s }, (n, a) => new Date(t, e + 1, a + 1)), T = (t, e) => {
62
62
  const s = new Date(e, 0, 4), n = (s.getDay() + 6) % 7, a = new Date(s);
63
63
  a.setDate(s.getDate() - n);
64
64
  const i = new Date(a);
@@ -66,9 +66,9 @@ const ne = (t) => {
66
66
  }, Ge = (t, e) => {
67
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 o = 1 - s; o <= n; o++) {
70
- const d = new Date(t, e, o);
71
- i.push(o > 0 ? d : null), (i.length === 7 || o === n) && (a.push([...i]), i = []);
69
+ for (let l = 1 - s; l <= n; l++) {
70
+ const d = new Date(t, e, l);
71
+ i.push(l > 0 ? d : null), (i.length === 7 || l === n) && (a.push([...i]), i = []);
72
72
  }
73
73
  return a;
74
74
  }, Ve = (t, e) => {
@@ -77,11 +77,11 @@ const ne = (t) => {
77
77
  for (let i = 1; i <= s; i++)
78
78
  a.push(new Date(t, e, i)), a.length === 7 && (n.push(a), a = []);
79
79
  return a.length > 0 && n.push(a), n;
80
- }, le = (t, e, s) => {
80
+ }, oe = (t, e, s) => {
81
81
  const n = /* @__PURE__ */ new Date();
82
82
  return n.getDate() === t && n.getMonth() === e && n.getFullYear() === s;
83
- }, re = ({ day: t, month: e, year: s, weekNumber: n, selectWeek: a }) => {
84
- const i = le(t, e, s);
83
+ }, le = ({ day: t, month: e, year: s, weekNumber: n, selectWeek: a }) => {
84
+ const i = oe(t, e, s);
85
85
  return v({
86
86
  text: t || "",
87
87
  disabled: !t,
@@ -92,10 +92,10 @@ const ne = (t) => {
92
92
  `,
93
93
  click: () => a(n, s)
94
94
  });
95
- }, ce = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = ie(t, e, s), i = Array.from({ length: n }, (r, p) => new Date(t, e, p + 1)), o = (a.length + i.length) % 7, d = o === 0 ? 0 : 7 - o, c = oe(t, e, d), h = [...a, ...i, ...c], f = [];
95
+ }, re = (t, e) => {
96
+ const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = ae(t, e, s), i = Array.from({ length: n }, (r, p) => new Date(t, e, p + 1)), l = (a.length + i.length) % 7, d = l === 0 ? 0 : 7 - l, c = ie(t, e, d), h = [...a, ...i, ...c], f = [];
97
97
  for (let r = 0; r < h.length; r += 7) {
98
- const p = h.slice(r, r + 7), x = p.find((j) => j) || new Date(t, e, 1), { weekNumber: $, year: A } = ae(x);
98
+ const p = h.slice(r, r + 7), x = p.find((j) => j) || new Date(t, e, 1), { weekNumber: $, year: A } = ne(x);
99
99
  f.push({
100
100
  weekNumber: $,
101
101
  year: A,
@@ -103,14 +103,14 @@ const ne = (t) => {
103
103
  });
104
104
  }
105
105
  return f;
106
- }, de = ({ selectWeek: t }) => U("month", (e, s, { data: n }) => {
107
- const { year: a, month: i, currentDate: o } = n, d = ce(a, i);
108
- return l(
106
+ }, ce = ({ selectWeek: t }) => U("month", (e, s, { data: n }) => {
107
+ const { year: a, month: i, currentDate: l } = n, d = re(a, i);
108
+ return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
111
111
  // Header row: "Week" label + day-of-week labels
112
- l({ class: "text-xs text-center col-span-1 text-muted-foreground flex items-center" }, "Week"),
113
- l(
112
+ o({ class: "text-xs text-center col-span-1 text-muted-foreground flex items-center" }, "Week"),
113
+ o(
114
114
  {
115
115
  class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
116
116
  },
@@ -120,14 +120,14 @@ const ne = (t) => {
120
120
  ),
121
121
  // Render each "week" row
122
122
  ...d.map(
123
- ({ weekNumber: c, days: h, year: f }) => l({
123
+ ({ weekNumber: c, days: h, year: f }) => 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
127
127
  }]
128
128
  }, [
129
129
  // Left column: ISO week number
130
- l({
130
+ o({
131
131
  class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
132
132
  click: () => t(c, f),
133
133
  // If you have a 'currentWeek' state, you can highlight it with 'onSet'
@@ -138,16 +138,16 @@ const ne = (t) => {
138
138
  text: c ? `W${c}` : ""
139
139
  }),
140
140
  // The 7 cells for each day in the row
141
- l(
141
+ o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  h.map(
144
- (r) => re({
144
+ (r) => le({
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,
148
148
  week: h,
149
149
  weekNumber: c,
150
- currentDate: o,
150
+ currentDate: l,
151
151
  selectWeek: t
152
152
  })
153
153
  )
@@ -156,7 +156,7 @@ const ne = (t) => {
156
156
  )
157
157
  ]
158
158
  );
159
- }), R = ({ label: t, click: e }) => C(
159
+ }), W = ({ label: t, click: e }) => C(
160
160
  {
161
161
  class: `
162
162
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -169,13 +169,13 @@ const ne = (t) => {
169
169
  variant: "icon",
170
170
  icon: t === "Previous" ? w.chevron.single.left : w.chevron.single.right
171
171
  }
172
- ), he = ({ next: t, previous: e }) => l({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
172
+ ), de = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
173
173
  y("[[monthName]] [[year]]"),
174
- R({
174
+ W({
175
175
  label: "Previous",
176
176
  click: e
177
177
  }),
178
- R({
178
+ W({
179
179
  label: "Next",
180
180
  click: t
181
181
  })
@@ -233,7 +233,7 @@ class Je extends g {
233
233
  * @returns {string}
234
234
  */
235
235
  getMonthName(e) {
236
- return K.monthNames[e];
236
+ return q.monthNames[e];
237
237
  }
238
238
  /**
239
239
  * Updates the calendar to show the previous month.
@@ -287,32 +287,35 @@ class Je extends g {
287
287
  * @returns {object}
288
288
  */
289
289
  render() {
290
- return l({ class: "week-calendar-container border rounded-md bg-background p-3" }, [
291
- he({
290
+ return o({ class: "week-calendar-container border rounded-md bg-background p-3" }, [
291
+ de({
292
292
  next: () => this.goToNextMonth(),
293
293
  previous: () => this.goToPreviousMonth()
294
294
  }),
295
- de({
295
+ ce({
296
296
  selectWeek: (e, s) => this.selectWeek(e, s)
297
297
  })
298
298
  ]);
299
299
  }
300
300
  }
301
- const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
302
- Y((e) => new J({ class: "mr-2", onChange: () => e.toggleAllSelectedRows() }))
301
+ const he = (t, e) => {
302
+ const s = e.toggleAllSelectedRows();
303
+ t.target.checked = !s;
304
+ }, ue = (t) => P({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
305
+ new V({ class: "mr-2", onChange: he })
303
306
  ]), ge = ({ align: t, sortable: e, key: s, label: n, sort: a, class: i }) => {
304
- const o = t || "justify-start";
305
- return W({
307
+ const l = t || "justify-start";
308
+ return P({
306
309
  class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
307
310
  click: e && (() => a(s))
308
311
  }, [
309
- l({ class: `flex flex-auto w-full items-center ${o}` }, [
312
+ o({ class: `flex flex-auto w-full items-center ${l}` }, [
310
313
  y(n),
311
- e && E({ class: "ml-2", html: w.arrows.upDown })
314
+ e && Y({ class: "ml-2", html: w.arrows.upDown })
312
315
  ])
313
316
  ]);
314
- }, fe = (t) => F([
315
- H({
317
+ }, fe = (t) => E([
318
+ F({
316
319
  class: "text-muted-foreground border-b",
317
320
  map: [t.headers, (e) => e.label === "checkbox" ? ue({ toggle: t.toggle }) : ge({
318
321
  align: e.align,
@@ -322,13 +325,13 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
322
325
  sort: t.sort
323
326
  })]
324
327
  })
325
- ]), pe = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new _({
328
+ ]), pe = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new K({
326
329
  cache: "table",
327
330
  key: t,
328
331
  items: e,
329
332
  rowItem: (a) => n(a, s),
330
333
  class: "divide-y divide-border"
331
- }), Ze = O(
334
+ }), Ze = R(
332
335
  {
333
336
  /**
334
337
  * Initializes component data.
@@ -344,11 +347,11 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
344
347
  /**
345
348
  * This will toggle all selected rows.
346
349
  *
347
- * @returns {void}
350
+ * @returns {boolean}
348
351
  */
349
352
  toggleAllSelectedRows() {
350
353
  const t = this.table.getRows(), e = this.data.selectedRows.length === t.length, s = e ? [] : t;
351
- this.data.selectedRows = s, this.updateSelected(), this.updateTable(!e);
354
+ return this.data.selectedRows = s, this.updateSelected(), this.updateTable(!select), e;
352
355
  },
353
356
  /**
354
357
  * This will update the selected state.
@@ -386,8 +389,8 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
386
389
  selectRow(t) {
387
390
  const e = t.selected ?? !1;
388
391
  t.selected = !e;
389
- const s = this.data.get("selectedRows"), n = t.selected ? [...s, t] : s.filter((o) => o !== t), i = this.table.getRows().map((o) => o === t ? { ...o, selected: t.selected } : o);
390
- this.table.setRows(i), this.data.selectedRows = n, this.updateSelected();
392
+ const s = this.data.get("selectedRows"), n = t.selected ? [...s, t] : s.filter((a) => a !== t);
393
+ this.data.selectedRows = n, this.updateSelected();
391
394
  },
392
395
  /**
393
396
  * Renders the DataTable component.
@@ -396,9 +399,9 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
396
399
  */
397
400
  render() {
398
401
  const t = this.rows, e = this.border !== !1 ? "border" : "";
399
- return l({ class: "w-full" }, [
400
- l({ class: `w-full rounded-md ${e} overflow-x-auto` }, [
401
- Q({ class: "w-full" }, [
402
+ return o({ class: "w-full" }, [
403
+ o({ class: `w-full rounded-md ${e} overflow-x-auto` }, [
404
+ H({ class: "w-full" }, [
402
405
  // @ts-ignore
403
406
  this.headers && fe({ headers: this.headers, sort: (s) => this.sortRows(s) }),
404
407
  // @ts-ignore
@@ -476,23 +479,23 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
476
479
  this.data.selectedRows = [];
477
480
  }
478
481
  }
479
- ), me = u(({ name: t, email: e }) => l({ class: "min-w-0 flex-auto" }, [
482
+ ), me = u(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
480
483
  m({ class: "text-base font-semibold leading-6 m-0" }, t),
481
484
  m({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
482
- ])), we = () => l({ class: "flex items-center gap-x-1.5" }, [
483
- l({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
484
- l({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
485
+ ])), we = () => o({ class: "flex items-center gap-x-1.5" }, [
486
+ o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
487
+ o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
485
488
  ]),
486
489
  m({ class: "text-xs leading-5 text-gray-500" }, "Online")
487
490
  ]), be = (t) => m({ class: "text-xs leading-5 text-muted-foreground" }, [
488
491
  y("Last seen "),
489
- X({ datetime: t }, "3h ago")
490
- ]), xe = (t, e) => t === "online" ? we() : be(e), ke = u(({ role: t, lastSeen: e, status: s }) => l({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
492
+ Q({ datetime: t }, "3h ago")
493
+ ]), xe = (t, e) => t === "online" ? we() : be(e), ke = u(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
491
494
  m({ class: "text-sm leading-6 m-0" }, t),
492
495
  xe(s, e)
493
496
  ])), ve = (t) => t.split(" ").map((s) => s[0]).join(""), ye = u((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
494
- l({ class: "flex min-w-0 gap-x-4" }, [
495
- te({ src: t.image, alt: t.name, fallbackText: ve(t.name) }),
497
+ o({ class: "flex min-w-0 gap-x-4" }, [
498
+ ee({ src: t.image, alt: t.name, fallbackText: ve(t.name) }),
496
499
  me({ name: t.name, email: t.email })
497
500
  ]),
498
501
  ke({
@@ -500,7 +503,7 @@ const ue = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class
500
503
  lastSeen: t.lastSeen,
501
504
  status: t.status
502
505
  })
503
- ])), et = u((t) => new G({
506
+ ])), et = u((t) => new _({
504
507
  cache: "list",
505
508
  key: "name",
506
509
  items: t.users,
@@ -614,7 +617,7 @@ class tt extends g {
614
617
  }
615
618
  const st = u((t) => {
616
619
  const e = t.margin || "m-4 ml-0";
617
- return l({ class: `flex-none ${e}` }, [
620
+ return o({ class: `flex-none ${e}` }, [
618
621
  C({
619
622
  variant: "icon",
620
623
  class: "back-button",
@@ -645,7 +648,7 @@ class N extends g {
645
648
  * @returns {object}
646
649
  */
647
650
  render() {
648
- return l(
651
+ return o(
649
652
  {
650
653
  class: this.getClassName(),
651
654
  onSet: ["loading", {
@@ -706,7 +709,7 @@ class N extends g {
706
709
  * @returns {object}
707
710
  */
708
711
  addBody() {
709
- return l({ class: "body fadeIn flex flex-auto flex-col" }, this.getContents());
712
+ return o({ class: "body fadeIn flex flex-auto flex-col" }, this.getContents());
710
713
  }
711
714
  /**
712
715
  * This will get the body contents.
@@ -733,7 +736,7 @@ class nt extends N {
733
736
  */
734
737
  render() {
735
738
  const e = this.container;
736
- return l(
739
+ return o(
737
740
  {
738
741
  onState: [
739
742
  ["loading", {
@@ -851,8 +854,8 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
851
854
  }, n)), Be = u(({ selectOption: t, state: e }) => b({
852
855
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
853
856
  for: ["filteredOptions", (s, n) => Ce({ index: n, click: t, state: e }, s.label)]
854
- })), Ie = 100, Te = u((t) => l({ class: "relative flex items-center" }, [
855
- Z({
857
+ })), Ie = 100, Te = u((t) => o({ class: "relative flex items-center" }, [
858
+ J({
856
859
  cache: "input",
857
860
  placeholder: t.placeholder ?? "Search...",
858
861
  bind: [t.state, "searchQuery"],
@@ -863,14 +866,14 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
863
866
  blur: (e, { state: s }) => setTimeout(() => s.open = !1, Ie),
864
867
  keydown: (e) => typeof t.handleKeyDown == "function" && t.handleKeyDown(e)
865
868
  }),
866
- t.icon && l({ class: "absolute right-0 mr-2" }, [
869
+ t.icon && o({ class: "absolute right-0 mr-2" }, [
867
870
  z(t.icon)
868
871
  ])
869
- ])), Re = (t) => l({
872
+ ])), We = (t) => o({
870
873
  class: "relative flex fle-auto flex-col",
871
874
  onState: ["open", (e, s, n) => {
872
875
  if (e)
873
- return new se({
876
+ return new te({
874
877
  cache: "dropdown",
875
878
  parent: n,
876
879
  button: n.input,
@@ -879,7 +882,7 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
879
882
  Be(t)
880
883
  ]);
881
884
  }]
882
- }), it = O(
885
+ }), it = R(
883
886
  {
884
887
  /**
885
888
  * This will set up the data object.
@@ -975,7 +978,7 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
975
978
  * @returns {object} - The rendered component.
976
979
  */
977
980
  render() {
978
- return l({ class: "relative w-full max-w-md" }, [
981
+ return o({ class: "relative w-full max-w-md" }, [
979
982
  Te({
980
983
  // @ts-ignore
981
984
  state: this.state,
@@ -988,7 +991,7 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
988
991
  // @ts-ignore
989
992
  handleKeyDown: this.handleKeyDown.bind(this)
990
993
  }),
991
- Re({
994
+ We({
992
995
  // @ts-ignore
993
996
  state: this.state,
994
997
  // @ts-ignore
@@ -999,7 +1002,7 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
999
1002
  ]);
1000
1003
  }
1001
1004
  }
1002
- ), We = (t) => D(
1005
+ ), Pe = (t) => D(
1003
1006
  {
1004
1007
  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",
1005
1008
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1011,8 +1014,8 @@ const Ce = u(({ index: t, click: e, state: s }, n) => D({
1011
1014
  click: (e) => t.callBack(t.value)
1012
1015
  }, t.label)
1013
1016
  ]
1014
- ), Pe = (t, e) => (t.callBack = e, We(t)), Oe = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1015
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Pe(e, t.callBack)] })
1017
+ ), Oe = (t, e) => (t.callBack = e, Pe(t)), Re = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1018
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Oe(e, t.callBack)] })
1016
1019
  ]);
1017
1020
  class ot extends g {
1018
1021
  /**
@@ -1030,13 +1033,13 @@ class ot extends g {
1030
1033
  */
1031
1034
  render() {
1032
1035
  const e = this.select.bind(this);
1033
- return l({ class: "" }, [
1034
- Oe({
1036
+ return o({ class: "" }, [
1037
+ Re({
1035
1038
  class: this.class,
1036
1039
  options: this.options,
1037
1040
  callBack: e
1038
1041
  }),
1039
- P({
1042
+ O({
1040
1043
  class: "tab-content",
1041
1044
  onState: ["selected", this.updateContent.bind(this)]
1042
1045
  })
@@ -1281,12 +1284,12 @@ class rt extends g {
1281
1284
  * @returns {object}
1282
1285
  */
1283
1286
  render() {
1284
- return l({ class: "tab-panel" }, [
1287
+ return o({ class: "tab-panel" }, [
1285
1288
  new Ue({
1286
1289
  class: this.class,
1287
1290
  options: this.options
1288
1291
  }),
1289
- P({
1292
+ O({
1290
1293
  class: "tab-content",
1291
1294
  switch: this.addGroup()
1292
1295
  })
@@ -1322,7 +1325,7 @@ class Ye extends g {
1322
1325
  onCreated() {
1323
1326
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1324
1327
  const e = 1e3 / 60;
1325
- this.timer = new V(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";
1328
+ this.timer = new G(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";
1326
1329
  }
1327
1330
  /**
1328
1331
  * Renders a <canvas> element.
@@ -1330,7 +1333,7 @@ class Ye extends g {
1330
1333
  * @returns {object} Layout definition for the canvas.
1331
1334
  */
1332
1335
  render() {
1333
- return q({
1336
+ return X({
1334
1337
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1335
1338
  });
1336
1339
  }
@@ -1360,11 +1363,11 @@ class Ye extends g {
1360
1363
  * @returns {Array} An array of [eventName, element, callback] definitions.
1361
1364
  */
1362
1365
  setupEvents() {
1363
- const e = this.panel, s = this.pointerPosition.bind(this), n = this.pointerUp.bind(this), a = this.pointerDown.bind(this), i = this.resize.bind(this), o = { passive: !1 };
1366
+ 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 };
1364
1367
  return [
1365
- ["pointermove", e, s, o],
1368
+ ["pointermove", e, s, l],
1366
1369
  ["pointerup", e, n],
1367
- ["pointerdown", e, a, o],
1370
+ ["pointerdown", e, a, l],
1368
1371
  ["pointerout", e, n],
1369
1372
  ["resize", window, i]
1370
1373
  ];
@@ -1377,13 +1380,13 @@ class Ye extends g {
1377
1380
  */
1378
1381
  getEventPosition(e) {
1379
1382
  let s, n;
1380
- const a = this.canvas, i = a.width / parseInt(a.style.width), o = a.getBoundingClientRect();
1383
+ const a = this.canvas, i = a.width / parseInt(a.style.width), l = a.getBoundingClientRect();
1381
1384
  if (e.touches && e.touches.length) {
1382
1385
  const h = e.touches[0];
1383
1386
  s = h.clientX, n = h.clientY;
1384
1387
  } else
1385
1388
  s = e.x || e.clientX, n = e.y || e.clientY;
1386
- const d = parseInt((s - o.left) * i), c = parseInt((n - o.top) * i);
1389
+ const d = parseInt((s - l.left) * i), c = parseInt((n - l.top) * i);
1387
1390
  this.mouse.x = d, this.mouse.y = c;
1388
1391
  }
1389
1392
  /**
@@ -1458,11 +1461,11 @@ class Ye extends g {
1458
1461
  * @returns {void}
1459
1462
  */
1460
1463
  scale() {
1461
- const e = this.canvas, s = this.container, n = I.getSize(s), a = this.targetSize, i = a.width, o = a.height;
1462
- let d = i + "px", c = o + "px";
1463
- if (this.width = e.width = i, this.height = e.height = o, n.width !== 0 && n.height !== 0) {
1464
- const h = n.width, f = n.height, r = h / i, p = f / o, x = Math.min(r, p);
1465
- d = i * x + "px", c = o * x + "px";
1464
+ const e = this.canvas, s = this.container, n = I.getSize(s), a = this.targetSize, i = a.width, l = a.height;
1465
+ let d = i + "px", c = l + "px";
1466
+ if (this.width = e.width = i, this.height = e.height = l, n.width !== 0 && n.height !== 0) {
1467
+ const h = n.width, f = n.height, r = h / i, p = f / l, x = Math.min(r, p);
1468
+ d = i * x + "px", c = l * x + "px";
1466
1469
  }
1467
1470
  e.style.width = d, e.style.height = c;
1468
1471
  }
@@ -1498,8 +1501,8 @@ class Ye extends g {
1498
1501
  */
1499
1502
  addLine(e, s, n, a) {
1500
1503
  this.signed || (this.signed = !0);
1501
- const i = Math.round(s), o = Math.round(n);
1502
- e.lineWidth = this.lineWidth, e.strokeStyle = a, e.lineTo(i, o), e.stroke();
1504
+ const i = Math.round(s), l = Math.round(n);
1505
+ e.lineWidth = this.lineWidth, e.strokeStyle = a, e.lineTo(i, l), e.stroke();
1503
1506
  }
1504
1507
  /**
1505
1508
  * Clears the canvas, sets signed to false, and re-initializes
@@ -1554,13 +1557,13 @@ class ct extends g {
1554
1557
  * @returns {object} The layout object for the component.
1555
1558
  */
1556
1559
  render() {
1557
- return l({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1558
- ee({
1560
+ return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1561
+ Z({
1559
1562
  cache: "hiddenInput",
1560
1563
  required: !0,
1561
1564
  bind: this.path + ".data"
1562
1565
  }),
1563
- l({ class: "absolute top-2 right-2" }, [
1566
+ o({ class: "absolute top-2 right-2" }, [
1564
1567
  C({
1565
1568
  variant: "icon",
1566
1569
  icon: w.circleX,
@@ -1629,15 +1632,15 @@ export {
1629
1632
  fe as T,
1630
1633
  ye as U,
1631
1634
  Je as W,
1632
- oe as a,
1635
+ ie as a,
1633
1636
  T as b,
1634
- ae as c,
1637
+ ne as c,
1635
1638
  Ge as d,
1636
1639
  Ve as e,
1637
- re as f,
1638
- ie as g,
1639
- de as h,
1640
- he as i,
1640
+ le as f,
1641
+ ae as g,
1642
+ ce as h,
1643
+ de as i,
1641
1644
  Ze as j,
1642
1645
  et as k,
1643
1646
  nt as l,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
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": {