@base-framework/ui 1.0.225 → 1.0.227

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 R } from "./veil-D4dRxILB.js";
5
5
  import { Icons as E } from "./icons.es.js";
6
6
  import { A as O, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as ea, a as sa, b as oa, I as ta, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-2O1fITpG.js";
7
7
  import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ra, p as Ua } from "./calendar-Bn55oWBo.js";
8
- import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-BHRFLEaa.js";
8
+ import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-BImd7j5m.js";
9
9
  import { B as Se, I as Be, M as Pe, d as Fe, e as Me, g as ke, N as Ne, b as fe, a as ve, f as xe, P as ye, c as he, S as We, T as He } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
10
  import { B as Ae, a as we, C as Re, F as Ue, b as Ee, c as Ge, M as Oe, P as Ve, S as je } from "./sidebar-menu-page-BVryQj2Z.js";
11
11
  import { A as ze, F as Je, M as _e, a as Ke, T as Qe } from "./aside-template-McEj_Gxc.js";
@@ -1,4 +1,4 @@
1
- import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-BHRFLEaa.js";
1
+ import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-BImd7j5m.js";
2
2
  import { b as U, C as G, D as R, a as j, F as q, M as w, c as z, p as A } from "./calendar-Bn55oWBo.js";
3
3
  import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-Dj67Pb8l.js";
4
4
  export {
@@ -1,22 +1,22 @@
1
- import { Button as D, Div as o, On as w, Span as S, OnState as q, Th as A, UseParent as K, I as G, Thead as J, Tr as _, Table as R, P as x, Li as C, Time as V, Nav as I, Ul as k, Section as F, Canvas as Z } from "@base-framework/atoms";
2
- import { Atom as f, Component as m, Data as M, DateTime as P, router as v, NavLink as H, DataTracker as U, Jot as tt, base as W, Dom as O } from "@base-framework/base";
3
- import { B as g, I as et } from "./buttons-Cm9etaEG.js";
1
+ import { Button as M, Div as o, On as w, Span as L, OnState as K, Th as H, UseParent as G, I as J, Thead as _, Tr as V, Table as P, P as x, Li as T, Time as Z, Nav as B, Ul as k, Section as U, Canvas as tt } from "@base-framework/atoms";
2
+ import { Atom as f, Component as g, Data as R, DateTime as $, router as I, NavLink as E, DataTracker as Q, Jot as et, base as O, Dom as z } from "@base-framework/base";
3
+ import { B as m, I as st } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as b } from "./icons.es.js";
5
- import { F as st, A as at, P as nt } from "./calendar-Bn55oWBo.js";
6
- import { TableBody as it, DataTableBody as ot, ScrollableTableBody as lt, List as rt, IntervalTimer as ct } from "@base-framework/organisms";
7
- import { C as dt, I as ht, H as ut } from "./inputs-CMjx5-IX.js";
5
+ import { F as at, p as C, A as nt, P as it } from "./calendar-Bn55oWBo.js";
6
+ import { TableBody as ot, DataTableBody as lt, ScrollableTableBody as rt, List as ct, IntervalTimer as dt } from "@base-framework/organisms";
7
+ import { C as ht, I as ut, H as ft } from "./inputs-CMjx5-IX.js";
8
8
  f((e, t) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...e,
11
11
  children: t
12
12
  }));
13
- f(({ value: e, label: t }) => D({
13
+ f(({ value: e, label: t }) => M({
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: e }],
16
16
  dataSet: ["performance", ["state", e, "active"]],
17
17
  click: (s, { state: a }) => a.performance = e
18
18
  }, t));
19
- class ye extends m {
19
+ class be extends g {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -34,7 +34,7 @@ class ye extends m {
34
34
  return o({ class: this.class || "" }, this.children);
35
35
  }
36
36
  }
37
- const ft = (e) => {
37
+ const gt = (e) => {
38
38
  const t = new Date(e, 11, 31), s = new Date(e, 0, 1);
39
39
  return t.getDay() === 4 || // December 31 is a Thursday
40
40
  s.getDay() === 4;
@@ -44,26 +44,26 @@ const ft = (e) => {
44
44
  const a = t.getFullYear(), n = new Date(a, 0, 4);
45
45
  n.setDate(n.getDate() - (n.getDay() + 6) % 7);
46
46
  const i = Math.ceil((t - n) / 6048e5) + 1;
47
- return i > 52 && !ft(a) ? {
47
+ return i > 52 && !gt(a) ? {
48
48
  weekNumber: 1,
49
49
  year: a + 1
50
50
  } : {
51
51
  weekNumber: i,
52
52
  year: a
53
53
  };
54
- }, gt = (e, t, s) => {
54
+ }, pt = (e, t, s) => {
55
55
  if (s === 0) return [];
56
56
  const a = new Date(e, t, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
59
  (n, i) => new Date(e, t - 1, a - s + i + 1)
60
60
  );
61
- }, pt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)), $ = (e, t) => {
61
+ }, yt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)), Y = (e, t) => {
62
62
  const s = new Date(t, 0, 4), a = (s.getDay() + 6) % 7, n = new Date(s);
63
63
  n.setDate(s.getDate() - a);
64
64
  const i = new Date(n);
65
65
  return i.setDate(n.getDate() + (e - 1) * 7), i;
66
- }, we = (e, t) => {
66
+ }, xe = (e, t) => {
67
67
  const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = [];
68
68
  let i = [];
69
69
  for (let l = 1 - s; l <= a; l++) {
@@ -71,18 +71,18 @@ const ft = (e) => {
71
71
  i.push(l > 0 ? r : null), (i.length === 7 || l === a) && (n.push([...i]), i = []);
72
72
  }
73
73
  return n;
74
- }, be = (e, t) => {
74
+ }, ke = (e, t) => {
75
75
  const s = new Date(e, t + 1, 0).getDate(), a = [];
76
76
  let n = [];
77
77
  for (let i = 1; i <= s; i++)
78
78
  n.push(new Date(e, t, i)), n.length === 7 && (a.push(n), n = []);
79
79
  return n.length > 0 && a.push(n), a;
80
- }, yt = (e, t, s) => {
80
+ }, wt = (e, t, s) => {
81
81
  const a = /* @__PURE__ */ new Date();
82
82
  return a.getDate() === e && a.getMonth() === t && a.getFullYear() === s;
83
- }, wt = ({ day: e, month: t, year: s, weekNumber: a, selectWeek: n }) => {
84
- const i = yt(e, t, s);
85
- return D({
83
+ }, bt = ({ day: e, month: t, year: s, weekNumber: a, selectWeek: n }) => {
84
+ const i = wt(e, t, s);
85
+ return M({
86
86
  text: e || "",
87
87
  disabled: !e,
88
88
  class: `
@@ -92,19 +92,19 @@ const ft = (e) => {
92
92
  `,
93
93
  click: () => n(a, s)
94
94
  });
95
- }, bt = (e, t) => {
96
- const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = gt(e, t, s), i = Array.from({ length: a }, (h, p) => new Date(e, t, p + 1)), l = (n.length + i.length) % 7, r = l === 0 ? 0 : 7 - l, c = pt(e, t, r), d = [...n, ...i, ...c], u = [];
95
+ }, xt = (e, t) => {
96
+ const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = pt(e, t, s), i = Array.from({ length: a }, (h, p) => new Date(e, t, p + 1)), l = (n.length + i.length) % 7, r = l === 0 ? 0 : 7 - l, c = yt(e, t, r), d = [...n, ...i, ...c], u = [];
97
97
  for (let h = 0; h < d.length; h += 7) {
98
- const p = d.slice(h, h + 7), y = p.find((B) => B) || new Date(e, t, 1), { weekNumber: L, year: T } = mt(y);
98
+ const p = d.slice(h, h + 7), y = p.find((S) => S) || new Date(e, t, 1), { weekNumber: v, year: D } = mt(y);
99
99
  u.push({
100
- weekNumber: L,
101
- year: T,
100
+ weekNumber: v,
101
+ year: D,
102
102
  days: p
103
103
  });
104
104
  }
105
105
  return u;
106
- }, xt = ({ selectWeek: e }) => w("month", (t, s, { data: a }) => {
107
- const { year: n, month: i, currentDate: l } = a, r = bt(n, i);
106
+ }, kt = ({ selectWeek: e }) => w("month", (t, s, { data: a }) => {
107
+ const { year: n, month: i, currentDate: l } = a, r = xt(n, i);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -115,7 +115,7 @@ const ft = (e) => {
115
115
  class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
116
116
  },
117
117
  ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
118
- (c) => S({ class: "px-1 py-1", text: c })
118
+ (c) => L({ class: "px-1 py-1", text: c })
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
@@ -141,7 +141,7 @@ const ft = (e) => {
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  d.map(
144
- (h) => wt({
144
+ (h) => bt({
145
145
  year: (h == null ? void 0 : h.getFullYear()) || null,
146
146
  month: (h == null ? void 0 : h.getMonth()) || null,
147
147
  day: (h == null ? void 0 : h.getDate()) || null,
@@ -154,7 +154,7 @@ const ft = (e) => {
154
154
  )
155
155
  ]
156
156
  );
157
- }), z = ({ label: e, click: t }) => g(
157
+ }), j = ({ label: e, click: t }) => m(
158
158
  {
159
159
  class: `
160
160
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -167,18 +167,18 @@ const ft = (e) => {
167
167
  variant: "icon",
168
168
  icon: e === "Previous" ? b.chevron.single.left : b.chevron.single.right
169
169
  }
170
- ), kt = ({ next: e, previous: t }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
- S("[[monthName]] [[year]]"),
172
- z({
170
+ ), vt = ({ next: e, previous: t }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
+ L("[[monthName]] [[year]]"),
172
+ j({
173
173
  label: "Previous",
174
174
  click: t
175
175
  }),
176
- z({
176
+ j({
177
177
  label: "Next",
178
178
  click: e
179
179
  })
180
180
  ]);
181
- class xe extends m {
181
+ class ve extends g {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -193,8 +193,8 @@ class xe extends m {
193
193
  * @returns {Data}
194
194
  */
195
195
  setData() {
196
- const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a = $(s, t.getFullYear());
197
- return new M({
196
+ const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a = Y(s, t.getFullYear());
197
+ return new R({
198
198
  monthName: this.getMonthName(a.getMonth()),
199
199
  year: a.getFullYear(),
200
200
  month: a.getMonth(),
@@ -231,7 +231,7 @@ class xe extends m {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(t) {
234
- return P.monthNames[t];
234
+ return $.monthNames[t];
235
235
  }
236
236
  /**
237
237
  * Updates the calendar to show the previous month.
@@ -276,7 +276,7 @@ class xe extends m {
276
276
  */
277
277
  selectWeek(t, s) {
278
278
  this.data.currentWeek = t;
279
- const a = $(t, s);
279
+ const a = Y(t, s);
280
280
  this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(t);
281
281
  }
282
282
  /**
@@ -286,17 +286,17 @@ class xe extends m {
286
286
  */
287
287
  render() {
288
288
  return o({ class: "week-calendar-container border rounded-md bg-background p-3" }, [
289
- kt({
289
+ vt({
290
290
  next: () => this.goToNextMonth(),
291
291
  previous: () => this.goToPreviousMonth()
292
292
  }),
293
- xt({
293
+ kt({
294
294
  selectWeek: (t, s) => this.selectWeek(t, s)
295
295
  })
296
296
  ]);
297
297
  }
298
298
  }
299
- const j = ({ label: e, click: t }) => g(
299
+ const A = ({ label: e, click: t }) => m(
300
300
  {
301
301
  class: `
302
302
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -309,17 +309,17 @@ const j = ({ label: e, click: t }) => g(
309
309
  variant: "icon",
310
310
  icon: e === "Previous" ? b.chevron.single.left : b.chevron.single.right
311
311
  }
312
- ), vt = ({ monthName: e, year: t, onMonthClick: s, onYearClick: a, next: n, previous: i }) => o({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
313
- g({ click: s, variant: "ghost", "aria-label": "Select month" }, e || "[[monthName]]"),
314
- g({ click: a, variant: "ghost", "aria-label": "Select year" }, (t == null ? void 0 : t.toString()) || "[[current.year]]"),
315
- j({ label: "Previous", click: i }),
316
- j({ label: "Next", click: n })
317
- ]), Dt = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), St = () => o(
312
+ ), Dt = ({ monthName: e, year: t, onMonthClick: s, onYearClick: a, next: n, previous: i }) => o({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
313
+ m({ click: s, variant: "ghost", "aria-label": "Select month" }, e || "[[monthName]]"),
314
+ m({ click: a, variant: "ghost", "aria-label": "Select year" }, (t == null ? void 0 : t.toString()) || "[[current.year]]"),
315
+ A({ label: "Previous", click: i }),
316
+ A({ label: "Next", click: n })
317
+ ]), St = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), Ct = () => o(
318
318
  { class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
319
- ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(Dt)
320
- ), Ct = ({ day: e, iso: t, disabled: s, isStart: a, isEnd: n, isBetween: i, click: l }) => {
319
+ ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(St)
320
+ ), It = ({ day: e, iso: t, disabled: s, isStart: a, isEnd: n, isBetween: i, click: l }) => {
321
321
  let r = "ghost", c = "";
322
- return a || n ? (r = "default", c = "bg-primary text-primary-foreground hover:bg-primary/90") : i && (c = "bg-accent text-accent-foreground hover:bg-accent/80"), s && (c += " opacity-50 cursor-not-allowed"), g(
322
+ return a || n ? (r = "default", c = "bg-primary text-primary-foreground hover:bg-primary/90") : i && (c = "bg-accent text-accent-foreground hover:bg-accent/80"), s && (c += " opacity-50 cursor-not-allowed"), m(
323
323
  {
324
324
  class: `flex items-center justify-center h-9 w-9 p-0 text-sm font-medium rounded-md transition-colors ${c}`,
325
325
  variant: r,
@@ -330,26 +330,34 @@ const j = ({ label: e, click: t }) => g(
330
330
  },
331
331
  e.toString()
332
332
  );
333
- }, It = ({ today: e, current: t, blockPriorDates: s, onDateClick: a }) => {
333
+ }, Mt = ({ today: e, current: t, blockPriorDates: s, onDateClick: a }) => {
334
334
  const { start: n, end: i } = t, l = new Date(t.year, t.month, 1).getDay(), r = new Date(t.year, t.month + 1, 0).getDate(), c = [];
335
335
  for (let d = 0; d < l; d++)
336
336
  c.push(null);
337
337
  for (let d = 1; d <= r; d++) {
338
- const u = st(t.year, t.month, d), h = new Date(t.year, t.month, d), p = new Date(e.year, e.month, e.date), y = h < p, L = s && y, T = n === u, B = i === u, X = n && i && u > n && u < i;
339
- c.push({
338
+ const u = at(t.year, t.month, d), h = new Date(t.year, t.month, d), p = new Date(e.year, e.month, e.date), y = h < p, v = s && y, D = n === u, S = i === u, N = n && i && u > n && u < i;
339
+ console.log({
340
+ day: d,
341
+ iso: u,
342
+ disabled: v,
343
+ isStart: D,
344
+ isEnd: S,
345
+ isBetween: N,
346
+ click: () => a(u)
347
+ }), c.push({
340
348
  day: d,
341
349
  iso: u,
342
- disabled: L,
343
- isStart: T,
344
- isEnd: B,
345
- isBetween: X,
350
+ disabled: v,
351
+ isStart: D,
352
+ isEnd: S,
353
+ isBetween: N,
346
354
  click: () => a(u)
347
355
  });
348
356
  }
349
357
  return o(
350
358
  { class: "grid grid-cols-7 gap-1" },
351
359
  c.map(
352
- (d, u) => d ? Ct({
360
+ (d, u) => d ? It({
353
361
  day: d.day,
354
362
  iso: d.iso,
355
363
  disabled: d.disabled,
@@ -360,8 +368,8 @@ const j = ({ label: e, click: t }) => g(
360
368
  }) : o({ class: "h-9" })
361
369
  )
362
370
  );
363
- }, Mt = f((e, t) => o({ class: "flex flex-auto flex-col" }, [
364
- vt({
371
+ }, Lt = f((e, t) => o({ class: "flex flex-auto flex-col" }, [
372
+ Dt({
365
373
  monthName: e.monthName,
366
374
  year: e.year,
367
375
  onMonthClick: e.onMonthClick,
@@ -374,8 +382,8 @@ const j = ({ label: e, click: t }) => g(
374
382
  onSet: [
375
383
  "currentDate",
376
384
  () => [
377
- St(),
378
- It({
385
+ Ct(),
386
+ Mt({
379
387
  today: e.today,
380
388
  current: e.current,
381
389
  blockPriorDates: e.blockPriorDates,
@@ -384,10 +392,10 @@ const j = ({ label: e, click: t }) => g(
384
392
  ]
385
393
  ]
386
394
  })
387
- ])), Lt = ({ currentMonth: e, currentYear: t, onSelect: s }) => o(
395
+ ])), Tt = ({ currentMonth: e, currentYear: t, onSelect: s }) => o(
388
396
  { class: "grid grid-cols-3 gap-2" },
389
- P.monthNames.map(
390
- (a, n) => g(
397
+ $.monthNames.map(
398
+ (a, n) => m(
391
399
  {
392
400
  click: (i) => {
393
401
  i.preventDefault(), i.stopPropagation(), s(n);
@@ -398,30 +406,30 @@ const j = ({ label: e, click: t }) => g(
398
406
  a.substring(0, 3)
399
407
  )
400
408
  )
401
- ), Tt = ({ start: e, end: t, selecting: s, onSelectStart: a, onSelectEnd: n }) => o({ class: "flex space-x-2 mb-4" }, [
402
- w("selecting", (i) => g({
409
+ ), Bt = ({ start: e, end: t, selecting: s, onSelectStart: a, onSelectEnd: n }) => o({ class: "flex space-x-2 mb-4" }, [
410
+ w("selecting", (i) => m({
403
411
  click: a,
404
412
  variant: i === "start" ? "primary" : "outline",
405
413
  class: "flex-1"
406
414
  }, [
407
- o({ class: "font-medium" }, e ? Y(e) : "Start Date")
415
+ o({ class: "font-medium" }, F("current.start", "Start Date"))
408
416
  ])),
409
- w("selecting", (i) => g({
417
+ w("selecting", (i) => m({
410
418
  click: n,
411
419
  variant: i === "end" ? "primary" : "outline",
412
420
  class: "flex-1"
413
421
  }, [
414
- o({ class: "font-medium" }, t ? Y(t) : "End Date")
422
+ o({ class: "font-medium" }, F("current.end", "End Date"))
415
423
  ]))
416
- ]), Y = (e) => {
424
+ ]), F = (e, t) => [`[[${e}]]`, (s) => s == null ? t : Rt(s)], Rt = (e) => {
417
425
  const t = /* @__PURE__ */ new Date(e + "T00:00:00"), s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
418
426
  return `${s[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
419
- }, Bt = ({ currentYear: e, onSelect: t }) => {
427
+ }, Pt = ({ currentYear: e, onSelect: t }) => {
420
428
  const s = e - 50, a = Array.from({ length: 101 }, (n, i) => s + i);
421
429
  return o(
422
430
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
423
431
  a.map(
424
- (n) => g(
432
+ (n) => m(
425
433
  {
426
434
  click: (i) => {
427
435
  i.preventDefault(), i.stopPropagation(), t(n);
@@ -434,7 +442,7 @@ const j = ({ label: e, click: t }) => g(
434
442
  )
435
443
  );
436
444
  };
437
- class ke extends m {
445
+ class De extends g {
438
446
  /**
439
447
  * Declare compiler props.
440
448
  *
@@ -450,13 +458,14 @@ class ke extends m {
450
458
  */
451
459
  setData() {
452
460
  const t = /* @__PURE__ */ new Date(), s = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = s.getMonth(), n = s.getFullYear();
453
- return new M({
461
+ return new R({
454
462
  today: {
455
463
  date: t.getDate(),
456
464
  month: t.getMonth(),
457
465
  year: t.getFullYear()
458
466
  },
459
467
  monthName: this.getMonthName(a),
468
+ currentData: `${s.getFullYear()}-${C(s.getMonth() + 1)}-${C(s.getDate())}`,
460
469
  current: {
461
470
  date: t.getDate(),
462
471
  month: a,
@@ -474,7 +483,7 @@ class ke extends m {
474
483
  * @returns {string}
475
484
  */
476
485
  getMonthName(t) {
477
- return P.monthNames[t];
486
+ return $.monthNames[t];
478
487
  }
479
488
  /**
480
489
  * Initialize component state.
@@ -494,17 +503,33 @@ class ke extends m {
494
503
  * @returns {void}
495
504
  */
496
505
  handleClick(t) {
497
- this.data.selecting === "start" ? (this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end") : (this.data.current.start && t < this.data.current.start ? (this.data.current.end = this.data.current.start, this.data.current.start = t) : this.data.current.end = t, this.data.selecting = "start", typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end));
506
+ if (this.data.selecting === "start") {
507
+ this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end";
508
+ const s = new Date(t);
509
+ this.setContext({
510
+ month: s.getMonth(),
511
+ year: s.getFullYear(),
512
+ date: s.getDate()
513
+ });
514
+ } else {
515
+ this.data.current.start && t < this.data.current.start ? (this.data.current.end = this.data.current.start, this.data.current.start = t) : this.data.current.end = t, this.data.selecting = "start";
516
+ const s = new Date(t);
517
+ this.setContext({
518
+ month: s.getMonth(),
519
+ year: s.getFullYear(),
520
+ date: s.getDate()
521
+ }), typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end);
522
+ }
498
523
  }
499
524
  /**
500
525
  * Update current month/year in data.
501
526
  *
502
- * @param {{month:number,year:number}} obj
527
+ * @param {object} obj
503
528
  * @returns {void}
504
529
  */
505
- setCurrent({ month: t, year: s }) {
506
- const a = this.data.current;
507
- a.month = (t + 12) % 12, a.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), this.data.monthName = this.getMonthName(a.month);
530
+ setCurrent({ month: t, year: s, date: a = null }) {
531
+ const n = this.data.current;
532
+ n.month = (t + 12) % 12, n.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (n.date = a), this.data.monthName = this.getMonthName(n.month), this.data.currentDate = `${s}-${C(t + 1)}-${C(n.date)}`;
508
533
  }
509
534
  /**
510
535
  * Render the range calendar.
@@ -514,17 +539,17 @@ class ke extends m {
514
539
  render() {
515
540
  const { today: t, current: s, selecting: a } = this.data, { start: n, end: i } = s;
516
541
  return o({ class: "range-calendar bg-background border border-border rounded-lg shadow-md p-4 w-full max-w-sm" }, [
517
- Tt({
542
+ Bt({
518
543
  start: n,
519
544
  end: i,
520
545
  selecting: a,
521
546
  onSelectStart: () => this.data.selecting = "start",
522
547
  onSelectEnd: () => this.data.selecting = "end"
523
548
  }),
524
- q("view", (l) => {
549
+ K("view", (l) => {
525
550
  switch (l) {
526
551
  case "months":
527
- return Lt(
552
+ return Tt(
528
553
  {
529
554
  currentMonth: s.month,
530
555
  currentYear: s.year,
@@ -534,7 +559,7 @@ class ke extends m {
534
559
  }
535
560
  );
536
561
  case "years":
537
- return Bt(
562
+ return Pt(
538
563
  {
539
564
  currentYear: s.year,
540
565
  onSelect: (r) => {
@@ -543,7 +568,7 @@ class ke extends m {
543
568
  }
544
569
  );
545
570
  default:
546
- return Mt({
571
+ return Lt({
547
572
  monthName: this.data.monthName,
548
573
  year: s.year,
549
574
  today: t,
@@ -566,28 +591,28 @@ class ke extends m {
566
591
  ]);
567
592
  }
568
593
  }
569
- const Rt = (e, t) => {
594
+ const $t = (e, t) => {
570
595
  const s = e.toggleAllSelectedRows();
571
596
  t.state.checked = !s;
572
- }, Pt = (e) => A({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
573
- K((t) => new dt({ class: "mr-2", onChange: (s, a) => Rt(t, a) }))
597
+ }, Wt = (e) => H({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
598
+ G((t) => new ht({ class: "mr-2", onChange: (s, a) => $t(t, a) }))
574
599
  ]), Nt = ({ align: e, sortable: t, key: s, label: a, sort: n, class: i }) => {
575
600
  const l = e || "justify-start";
576
- return A({
601
+ return H({
577
602
  class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
578
603
  click: t && (() => n(s))
579
604
  }, [
580
605
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
581
- S(a),
582
- t && G({ class: "ml-2", html: b.arrows.upDown })
606
+ L(a),
607
+ t && J({ class: "ml-2", html: b.arrows.upDown })
583
608
  ])
584
609
  ]);
585
- }, N = (e) => J([
586
- _({
610
+ }, W = (e) => _([
611
+ V({
587
612
  class: "text-muted-foreground border-b",
588
613
  map: [
589
614
  e.headers,
590
- (t) => t.label === "checkbox" ? Pt({ toggle: e.toggle }) : Nt({
615
+ (t) => t.label === "checkbox" ? Wt({ toggle: e.toggle }) : Nt({
591
616
  align: t.align,
592
617
  sortable: t.sortable,
593
618
  key: t.key,
@@ -596,7 +621,7 @@ const Rt = (e, t) => {
596
621
  })
597
622
  ]
598
623
  })
599
- ]), Wt = ({ key: e, rows: t, selectRow: s, rowItem: a, emptyState: n }) => new it({
624
+ ]), Ot = ({ key: e, rows: t, selectRow: s, rowItem: a, emptyState: n }) => new ot({
600
625
  cache: "list",
601
626
  key: e,
602
627
  items: t,
@@ -604,7 +629,7 @@ const Rt = (e, t) => {
604
629
  class: "divide-y divide-border",
605
630
  emptyState: n
606
631
  });
607
- class E extends m {
632
+ class X extends g {
608
633
  /**
609
634
  * Initializes component data.
610
635
  *
@@ -612,7 +637,7 @@ class E extends m {
612
637
  */
613
638
  setData() {
614
639
  let t = this.rows && this.rows.length > 0;
615
- return (this.loadMoreItems || this.tableData) && !t && (t = null), new M({
640
+ return (this.loadMoreItems || this.tableData) && !t && (t = null), new R({
616
641
  selectedRows: [],
617
642
  // @ts-ignore
618
643
  hasItems: t,
@@ -677,12 +702,12 @@ class E extends m {
677
702
  return o({ class: "w-full flex flex-auto flex-col" }, [
678
703
  w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
679
704
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
680
- R({ class: "w-full" }, [
705
+ P({ class: "w-full" }, [
681
706
  // @ts-ignore
682
- this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
707
+ this.headers && W({ headers: this.headers, sort: (a) => this.sortRows(a) }),
683
708
  // @ts-ignore
684
709
  this.customHeader ?? null,
685
- Wt({
710
+ Ot({
686
711
  // @ts-ignore
687
712
  key: this.key,
688
713
  rows: t,
@@ -757,7 +782,7 @@ class E extends m {
757
782
  this.data.selectedRows = [];
758
783
  }
759
784
  }
760
- const Ot = (e) => new ot({
785
+ const zt = (e) => new lt({
761
786
  cache: "list",
762
787
  loadMoreItems: e.loadMoreItems,
763
788
  offset: e.offset,
@@ -768,7 +793,7 @@ const Ot = (e) => new ot({
768
793
  rowItem: (t) => e.rowItem(t, e.selectRow),
769
794
  class: "divide-y divide-border"
770
795
  });
771
- class $t extends E {
796
+ class Yt extends X {
772
797
  /**
773
798
  * Renders the DataTable component.
774
799
  *
@@ -779,12 +804,12 @@ class $t extends E {
779
804
  return o({ class: "w-full flex flex-auto flex-col" }, [
780
805
  w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
781
806
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
782
- R({ class: "w-full" }, [
807
+ P({ class: "w-full" }, [
783
808
  // @ts-ignore
784
- this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
809
+ this.headers && W({ headers: this.headers, sort: (a) => this.sortRows(a) }),
785
810
  // @ts-ignore
786
811
  this.customHeader ?? null,
787
- Ot({
812
+ zt({
788
813
  // @ts-ignore
789
814
  loadMoreItems: this.loadMoreItems,
790
815
  // @ts-ignore
@@ -816,7 +841,7 @@ class $t extends E {
816
841
  this.list.refresh();
817
842
  }
818
843
  }
819
- const ve = f((e) => new $t(
844
+ const Se = f((e) => new Yt(
820
845
  {
821
846
  cache: e.cache ?? "list",
822
847
  tableData: e.data,
@@ -832,7 +857,7 @@ const ve = f((e) => new $t(
832
857
  border: e.border,
833
858
  emptyState: e.emptyState
834
859
  }
835
- )), zt = (e) => new lt({
860
+ )), jt = (e) => new rt({
836
861
  cache: "list",
837
862
  scrollContainer: e.scrollContainer,
838
863
  loadMoreItems: e.loadMoreItems,
@@ -844,7 +869,7 @@ const ve = f((e) => new $t(
844
869
  rowItem: (t) => e.rowItem(t, e.selectRow),
845
870
  class: "divide-y divide-border"
846
871
  });
847
- class jt extends E {
872
+ class At extends X {
848
873
  /**
849
874
  * Renders the DataTable component.
850
875
  *
@@ -855,12 +880,12 @@ class jt extends E {
855
880
  return o({ class: "w-full flex flex-auto flex-col" }, [
856
881
  w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
857
882
  o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
858
- R({ class: "w-full" }, [
883
+ P({ class: "w-full" }, [
859
884
  // @ts-ignore
860
- this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
885
+ this.headers && W({ headers: this.headers, sort: (a) => this.sortRows(a) }),
861
886
  // @ts-ignore
862
887
  this.customHeader ?? null,
863
- zt({
888
+ jt({
864
889
  // @ts-ignore
865
890
  scrollContainer: this.scrollContainer,
866
891
  // @ts-ignore
@@ -894,7 +919,7 @@ class jt extends E {
894
919
  this.list.refresh();
895
920
  }
896
921
  }
897
- const De = f((e) => new jt(
922
+ const Ce = f((e) => new At(
898
923
  {
899
924
  cache: e.cache ?? "list",
900
925
  tableData: e.data,
@@ -911,45 +936,45 @@ const De = f((e) => new jt(
911
936
  border: e.border,
912
937
  emptyState: e.emptyState
913
938
  }
914
- )), Yt = f(({ name: e, email: t }) => o({ class: "min-w-0 flex-auto" }, [
939
+ )), Ft = f(({ name: e, email: t }) => o({ class: "min-w-0 flex-auto" }, [
915
940
  x({ class: "text-base font-semibold leading-6 m-0" }, e),
916
941
  x({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, t)
917
- ])), At = () => o({ class: "flex items-center gap-x-1.5" }, [
942
+ ])), Ht = () => o({ class: "flex items-center gap-x-1.5" }, [
918
943
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
919
944
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
920
945
  ]),
921
946
  x({ class: "text-xs leading-5 text-gray-500" }, "Online")
922
- ]), Ft = (e) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
923
- S("Last seen "),
924
- V({ datetime: e }, "3h ago")
925
- ]), Ht = (e, t) => e === "online" ? At() : Ft(t), Ut = f(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
947
+ ]), Ut = (e) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
948
+ L("Last seen "),
949
+ Z({ datetime: e }, "3h ago")
950
+ ]), Et = (e, t) => e === "online" ? Ht() : Ut(t), Qt = f(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
926
951
  x({ class: "text-sm leading-6 m-0" }, e),
927
- Ht(s, t)
928
- ])), Et = (e) => e.split(" ").map((s) => s[0]).join(""), Qt = f((e) => C({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
952
+ Et(s, t)
953
+ ])), Xt = (e) => e.split(" ").map((s) => s[0]).join(""), qt = f((e) => T({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
929
954
  o({ class: "flex min-w-0 gap-x-4" }, [
930
- at({ src: e.image, alt: e.name, fallbackText: Et(e.name) }),
931
- Yt({ name: e.name, email: e.email })
955
+ nt({ src: e.image, alt: e.name, fallbackText: Xt(e.name) }),
956
+ Ft({ name: e.name, email: e.email })
932
957
  ]),
933
- Ut({
958
+ Qt({
934
959
  role: e.role,
935
960
  lastSeen: e.lastSeen,
936
961
  status: e.status
937
962
  })
938
- ])), Se = f((e) => new rt({
963
+ ])), Ie = f((e) => new ct({
939
964
  cache: "list",
940
965
  key: "name",
941
966
  items: e.users,
942
967
  role: "list",
943
968
  class: "divide-y divide-border",
944
- rowItem: Qt
945
- })), Xt = (e, t) => t.includes(e), qt = (e, t, s) => e.exact ? s === t : Xt(t, s), Kt = ({ text: e, href: t, exact: s, hidden: a }) => new H({
969
+ rowItem: qt
970
+ })), Kt = (e, t) => t.includes(e), Gt = (e, t, s) => e.exact ? s === t : Kt(t, s), Jt = ({ text: e, href: t, exact: s, hidden: a }) => new E({
946
971
  text: e,
947
972
  href: t,
948
973
  exact: s,
949
974
  dataSet: ["selected", ["state", !0, "active"]],
950
975
  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`
951
976
  });
952
- class Ce extends m {
977
+ class Me extends g {
953
978
  /**
954
979
  * This will declare the props for the compiler.
955
980
  *
@@ -970,14 +995,14 @@ class Ce extends m {
970
995
  * @returns {object}
971
996
  */
972
997
  render() {
973
- return I(
998
+ return B(
974
999
  { class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
975
1000
  [
976
1001
  k({
977
1002
  class: "flex space-x-4",
978
1003
  map: [this.options, (t) => this.addLink(t)],
979
1004
  watch: {
980
- value: ["[[path]]", v.data],
1005
+ value: ["[[path]]", I.data],
981
1006
  callBack: this.updateLinks.bind(this)
982
1007
  }
983
1008
  })
@@ -990,7 +1015,7 @@ class Ce extends m {
990
1015
  * @returns {void}
991
1016
  */
992
1017
  afterSetup() {
993
- const t = v.data.path;
1018
+ const t = I.data.path;
994
1019
  this.updateLinks(t);
995
1020
  }
996
1021
  /**
@@ -1005,7 +1030,7 @@ class Ce extends m {
1005
1030
  for (const a of this.links) {
1006
1031
  if (!a.rendered)
1007
1032
  continue;
1008
- qt(a, a.getLinkPath(), t) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
1033
+ Gt(a, a.getLinkPath(), t) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
1009
1034
  }
1010
1035
  !s && this.links[0] && this.updateLink(this.links[0], !0);
1011
1036
  }
@@ -1035,7 +1060,7 @@ class Ce extends m {
1035
1060
  * @returns {object}
1036
1061
  */
1037
1062
  addLink({ label: t, href: s, exact: a, hidden: n }) {
1038
- const i = Kt({ text: t, href: s, exact: a, hidden: n });
1063
+ const i = Jt({ text: t, href: s, exact: a, hidden: n });
1039
1064
  return this.links.push(i), i;
1040
1065
  }
1041
1066
  /**
@@ -1047,13 +1072,13 @@ class Ce extends m {
1047
1072
  this.links = [];
1048
1073
  }
1049
1074
  }
1050
- const Ie = f((e) => {
1075
+ const Le = f((e) => {
1051
1076
  const t = e.margin || "m-4 ml-0";
1052
1077
  return e.allowHistory = e.allowHistory === !0, o({ class: `flex-none ${t}` }, [
1053
- g({ variant: "back", class: "ghost", ...e })
1078
+ m({ variant: "back", class: "ghost", ...e })
1054
1079
  ]);
1055
1080
  });
1056
- class Q extends m {
1081
+ class q extends g {
1057
1082
  /**
1058
1083
  * This will declare the props for the compiler.
1059
1084
  *
@@ -1140,13 +1165,13 @@ class Q extends m {
1140
1165
  return this.children;
1141
1166
  }
1142
1167
  }
1143
- U.addType("dockableOverlay", (e) => {
1168
+ Q.addType("dockableOverlay", (e) => {
1144
1169
  if (!e)
1145
1170
  return;
1146
1171
  const t = e.component;
1147
1172
  t && t.rendered === !0 && t.state.docked === !1 && t.destroy();
1148
1173
  });
1149
- class Me extends Q {
1174
+ class Te extends q {
1150
1175
  /**
1151
1176
  * This will stop presistence.
1152
1177
  *
@@ -1212,7 +1237,7 @@ class Me extends Q {
1212
1237
  * @returns {void}
1213
1238
  */
1214
1239
  afterSetup() {
1215
- U.add(
1240
+ Q.add(
1216
1241
  this.container,
1217
1242
  "dockableOverlay",
1218
1243
  {
@@ -1255,7 +1280,7 @@ class Me extends Q {
1255
1280
  document.documentElement.style.overflowY = "auto";
1256
1281
  }
1257
1282
  }
1258
- class Le extends Q {
1283
+ class Be extends q {
1259
1284
  /**
1260
1285
  * This will get the overlay type.
1261
1286
  *
@@ -1274,7 +1299,7 @@ class Le extends Q {
1274
1299
  this.container = t, this.initialize();
1275
1300
  }
1276
1301
  }
1277
- const Gt = f(({ index: e, click: t, state: s }, a) => C({
1302
+ const _t = f(({ index: e, click: t, state: s }, a) => T({
1278
1303
  class: "p-2 cursor-pointer hover:bg-muted/50",
1279
1304
  onState: [
1280
1305
  [s, "selectedIndex", {
@@ -1283,11 +1308,11 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1283
1308
  }]
1284
1309
  ],
1285
1310
  click: () => t(e)
1286
- }, a)), Jt = f(({ selectOption: e, state: t }) => k({
1311
+ }, a)), Vt = f(({ selectOption: e, state: t }) => k({
1287
1312
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
1288
- for: ["filteredOptions", (s, a) => Gt({ index: a, click: e, state: t }, s.label)]
1289
- })), _t = f((e) => o({ class: "relative flex items-center" }, [
1290
- ht({
1313
+ for: ["filteredOptions", (s, a) => _t({ index: a, click: e, state: t }, s.label)]
1314
+ })), Zt = f((e) => o({ class: "relative flex items-center" }, [
1315
+ ut({
1291
1316
  cache: "input",
1292
1317
  class: e.class ?? "",
1293
1318
  placeholder: e.placeholder ?? "Search...",
@@ -1303,22 +1328,22 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1303
1328
  ]
1304
1329
  }),
1305
1330
  e.icon && o({ class: "absolute flex right-0 mr-2" }, [
1306
- et(e.icon)
1331
+ st(e.icon)
1307
1332
  ])
1308
- ])), Vt = (e) => o({
1333
+ ])), te = (e) => o({
1309
1334
  class: "relative flex fle-auto flex-col",
1310
1335
  onState: ["open", (t, s, a) => {
1311
1336
  if (t)
1312
- return new nt({
1337
+ return new it({
1313
1338
  cache: "dropdown",
1314
1339
  parent: a,
1315
1340
  button: a.input,
1316
1341
  size: "xl"
1317
1342
  }, [
1318
- Jt(e)
1343
+ Vt(e)
1319
1344
  ]);
1320
1345
  }]
1321
- }), Te = tt(
1346
+ }), Re = et(
1322
1347
  {
1323
1348
  /**
1324
1349
  * This will set up the data object.
@@ -1327,7 +1352,7 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1327
1352
  */
1328
1353
  setData() {
1329
1354
  const e = this.options || [];
1330
- return new M({
1355
+ return new R({
1331
1356
  options: e,
1332
1357
  filteredOptions: e
1333
1358
  });
@@ -1415,7 +1440,7 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1415
1440
  */
1416
1441
  render() {
1417
1442
  return o({ class: "relative w-full max-w-md" }, [
1418
- _t({
1443
+ Zt({
1419
1444
  // @ts-ignore
1420
1445
  state: this.state,
1421
1446
  // @ts-ignore
@@ -1427,7 +1452,7 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1427
1452
  // @ts-ignore
1428
1453
  handleKeyDown: this.handleKeyDown.bind(this)
1429
1454
  }),
1430
- Vt({
1455
+ te({
1431
1456
  // @ts-ignore
1432
1457
  state: this.state,
1433
1458
  // @ts-ignore
@@ -1438,22 +1463,22 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
1438
1463
  ]);
1439
1464
  }
1440
1465
  }
1441
- ), Zt = (e) => C(
1466
+ ), ee = (e) => T(
1442
1467
  {
1443
1468
  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",
1444
1469
  dataSet: ["selected", ["state", e.value, "active"]]
1445
1470
  },
1446
1471
  [
1447
- D({
1472
+ M({
1448
1473
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
1449
1474
  onSet: ["selected", { selected: e.value }],
1450
1475
  click: (t) => e.callBack(e.value)
1451
1476
  }, e.label)
1452
1477
  ]
1453
- ), te = (e, t) => (e.callBack = t, Zt(e)), ee = (e) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
1454
- k({ class: "flex flex-auto flex-row", map: [e.options, (t) => te(t, e.callBack)] })
1478
+ ), se = (e, t) => (e.callBack = t, ee(e)), ae = (e) => B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
1479
+ k({ class: "flex flex-auto flex-row", map: [e.options, (t) => se(t, e.callBack)] })
1455
1480
  ]);
1456
- class Be extends m {
1481
+ class Pe extends g {
1457
1482
  /**
1458
1483
  * This will declare the props for the compiler.
1459
1484
  *
@@ -1470,12 +1495,12 @@ class Be extends m {
1470
1495
  render() {
1471
1496
  const t = this.select.bind(this);
1472
1497
  return o({ class: "" }, [
1473
- ee({
1498
+ ae({
1474
1499
  class: this.class,
1475
1500
  options: this.options,
1476
1501
  callBack: t
1477
1502
  }),
1478
- F({
1503
+ U({
1479
1504
  class: "tab-content",
1480
1505
  onState: ["selected", this.updateContent.bind(this)]
1481
1506
  })
@@ -1541,23 +1566,23 @@ class Be extends m {
1541
1566
  };
1542
1567
  }
1543
1568
  }
1544
- const se = (e) => C(
1569
+ const ne = (e) => T(
1545
1570
  {
1546
1571
  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",
1547
1572
  dataSet: ["selected", ["state", e.value, "active"]]
1548
1573
  },
1549
1574
  [
1550
- D({
1575
+ M({
1551
1576
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
1552
1577
  onSet: ["selected", { selected: e.value }],
1553
1578
  click: (t) => e.callBack(e.value),
1554
1579
  disabled: e.disabled
1555
1580
  }, e.label)
1556
1581
  ]
1557
- ), ae = (e, t) => (e.callBack = t, se(e)), ne = (e) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
1558
- k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ae(t, e.callBack)] })
1582
+ ), ie = (e, t) => (e.callBack = t, ne(e)), oe = (e) => B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
1583
+ k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ie(t, e.callBack)] })
1559
1584
  ]);
1560
- class Re extends m {
1585
+ class $e extends g {
1561
1586
  /**
1562
1587
  * This will declare the props for the compiler.
1563
1588
  *
@@ -1573,7 +1598,7 @@ class Re extends m {
1573
1598
  */
1574
1599
  render() {
1575
1600
  const t = this.select.bind(this);
1576
- return ne({
1601
+ return oe({
1577
1602
  class: this.class,
1578
1603
  options: this.options,
1579
1604
  callBack: t
@@ -1600,17 +1625,17 @@ class Re extends m {
1600
1625
  };
1601
1626
  }
1602
1627
  }
1603
- const ie = (e, t) => new RegExp(`${e}($|/|\\.).*`).test(t), oe = (e, t) => {
1628
+ const le = (e, t) => new RegExp(`${e}($|/|\\.).*`).test(t), re = (e, t) => {
1604
1629
  const s = e.getLinkPath();
1605
- return e.exact ? t === s : ie(s, t);
1606
- }, le = ({ text: e, href: t, exact: s }) => new H({
1630
+ return e.exact ? t === s : le(s, t);
1631
+ }, ce = ({ text: e, href: t, exact: s }) => new E({
1607
1632
  text: e,
1608
1633
  href: t,
1609
1634
  exact: s,
1610
1635
  dataSet: ["selected", ["state", !0, "active"]],
1611
1636
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"
1612
1637
  });
1613
- class re extends m {
1638
+ class de extends g {
1614
1639
  /**
1615
1640
  * This will declare the props for the compiler.
1616
1641
  *
@@ -1631,12 +1656,12 @@ class re extends m {
1631
1656
  * @returns {object}
1632
1657
  */
1633
1658
  render() {
1634
- return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1659
+ return B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1635
1660
  k({
1636
1661
  class: "flex flex-auto flex-row",
1637
1662
  map: [this.options, (t) => this.addLink(t)],
1638
1663
  watch: {
1639
- value: ["[[path]]", v.data],
1664
+ value: ["[[path]]", I.data],
1640
1665
  callBack: this.updateLinks.bind(this)
1641
1666
  }
1642
1667
  })
@@ -1648,7 +1673,7 @@ class re extends m {
1648
1673
  * @returns {void}
1649
1674
  */
1650
1675
  afterSetup() {
1651
- const t = v.data.path;
1676
+ const t = I.data.path;
1652
1677
  this.updateLinks(t);
1653
1678
  }
1654
1679
  /**
@@ -1661,7 +1686,7 @@ class re extends m {
1661
1686
  let s = !1, a = this.links[0];
1662
1687
  this.deactivateAllLinks();
1663
1688
  for (const n of this.links)
1664
- if (n.rendered !== !1 && (s = oe(n, t), s === !0)) {
1689
+ if (n.rendered !== !1 && (s = re(n, t), s === !0)) {
1665
1690
  this.updateLink(n, !0);
1666
1691
  break;
1667
1692
  }
@@ -1693,7 +1718,7 @@ class re extends m {
1693
1718
  * @returns {object}
1694
1719
  */
1695
1720
  addLink({ label: t, href: s, exact: a }) {
1696
- const n = le({ text: t, href: s, exact: a });
1721
+ const n = ce({ text: t, href: s, exact: a });
1697
1722
  return this.links.push(n), n;
1698
1723
  }
1699
1724
  /**
@@ -1705,7 +1730,7 @@ class re extends m {
1705
1730
  this.links = [];
1706
1731
  }
1707
1732
  }
1708
- class Pe extends m {
1733
+ class We extends g {
1709
1734
  /**
1710
1735
  * This will declare the props for the compiler.
1711
1736
  *
@@ -1721,11 +1746,11 @@ class Pe extends m {
1721
1746
  */
1722
1747
  render() {
1723
1748
  return o({ class: "tab-panel" }, [
1724
- new re({
1749
+ new de({
1725
1750
  class: this.class,
1726
1751
  options: this.options
1727
1752
  }),
1728
- F({
1753
+ U({
1729
1754
  class: "tab-content",
1730
1755
  switch: this.addGroup()
1731
1756
  })
@@ -1751,7 +1776,7 @@ class Pe extends m {
1751
1776
  return s;
1752
1777
  }
1753
1778
  }
1754
- class ce extends m {
1779
+ class he extends g {
1755
1780
  /**
1756
1781
  * Runs before rendering, sets up defaults, a timer for drawing,
1757
1782
  * and basic canvas properties.
@@ -1761,7 +1786,7 @@ class ce extends m {
1761
1786
  onCreated() {
1762
1787
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1763
1788
  const t = 1e3 / 60;
1764
- this.timer = new ct(t, 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";
1789
+ this.timer = new dt(t, 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";
1765
1790
  }
1766
1791
  /**
1767
1792
  * Renders a <canvas> element.
@@ -1769,7 +1794,7 @@ class ce extends m {
1769
1794
  * @returns {object} Layout definition for the canvas.
1770
1795
  */
1771
1796
  render() {
1772
- return Z({
1797
+ return tt({
1773
1798
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1774
1799
  });
1775
1800
  }
@@ -1866,8 +1891,8 @@ class ce extends m {
1866
1891
  const { canvas: t, ctx: s } = this, a = t.toDataURL();
1867
1892
  if (this.scale(), this.setupBackground(s), a !== "data:,") {
1868
1893
  const n = new globalThis.Image();
1869
- W.on("load", n, function i() {
1870
- s.drawImage(n, 0, 0), W.off("load", n, i);
1894
+ O.on("load", n, function i() {
1895
+ s.drawImage(n, 0, 0), O.off("load", n, i);
1871
1896
  }), n.src = a;
1872
1897
  }
1873
1898
  this.draw();
@@ -1887,7 +1912,7 @@ class ce extends m {
1887
1912
  * @returns {void}
1888
1913
  */
1889
1914
  noScaleResize() {
1890
- const t = O.getSize(container);
1915
+ const t = z.getSize(container);
1891
1916
  this.width = canvas.width = t.width, this.height = canvas.height = t.height;
1892
1917
  }
1893
1918
  /**
@@ -1897,7 +1922,7 @@ class ce extends m {
1897
1922
  * @returns {void}
1898
1923
  */
1899
1924
  scale() {
1900
- const t = this.canvas, s = this.container, a = O.getSize(s), n = this.targetSize, i = n.width, l = n.height;
1925
+ const t = this.canvas, s = this.container, a = z.getSize(s), n = this.targetSize, i = n.width, l = n.height;
1901
1926
  let r = i + "px", c = l + "px";
1902
1927
  if (this.width = t.width = i, this.height = t.height = l, a.width !== 0 && a.height !== 0) {
1903
1928
  const d = a.width, u = a.height, h = d / i, p = u / l, y = Math.min(h, p);
@@ -1977,7 +2002,7 @@ class ce extends m {
1977
2002
  this.timer.stop(), this.status = "stopped";
1978
2003
  }
1979
2004
  }
1980
- class Ne extends m {
2005
+ class Ne extends g {
1981
2006
  /**
1982
2007
  * Sets up default properties for the signature panel.
1983
2008
  *
@@ -1994,19 +2019,19 @@ class Ne extends m {
1994
2019
  */
1995
2020
  render() {
1996
2021
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1997
- ut({
2022
+ ft({
1998
2023
  cache: "hiddenInput",
1999
2024
  required: !0,
2000
2025
  bind: this.path + ".data"
2001
2026
  }),
2002
2027
  o({ class: "absolute top-2 right-2" }, [
2003
- g({
2028
+ m({
2004
2029
  variant: "icon",
2005
2030
  icon: b.circleX,
2006
2031
  click: this.reset.bind(this)
2007
2032
  })
2008
2033
  ]),
2009
- new ce({
2034
+ new he({
2010
2035
  cache: "canvasLayer",
2011
2036
  margin: this.margin,
2012
2037
  targetSize: this.targetSize,
@@ -2056,37 +2081,37 @@ class Ne extends m {
2056
2081
  }
2057
2082
  }
2058
2083
  export {
2059
- Ie as B,
2060
- Pt as C,
2061
- Wt as D,
2084
+ Le as B,
2085
+ Wt as C,
2086
+ Ot as D,
2062
2087
  Nt as H,
2063
- Le as I,
2064
- Ce as N,
2065
- Q as O,
2066
- ye as P,
2067
- ke as R,
2068
- De as S,
2069
- N as T,
2070
- Qt as U,
2071
- xe as W,
2072
- pt as a,
2073
- $ as b,
2088
+ Be as I,
2089
+ Me as N,
2090
+ q as O,
2091
+ be as P,
2092
+ De as R,
2093
+ Ce as S,
2094
+ W as T,
2095
+ qt as U,
2096
+ ve as W,
2097
+ yt as a,
2098
+ Y as b,
2074
2099
  mt as c,
2075
- we as d,
2076
- be as e,
2077
- wt as f,
2078
- gt as g,
2079
- xt as h,
2080
- kt as i,
2081
- E as j,
2082
- ve as k,
2083
- Se as l,
2084
- Me as m,
2085
- Te as n,
2086
- _t as o,
2087
- Be as p,
2088
- Re as q,
2089
- re as r,
2090
- Pe as s,
2100
+ xe as d,
2101
+ ke as e,
2102
+ bt as f,
2103
+ pt as g,
2104
+ kt as h,
2105
+ vt as i,
2106
+ X as j,
2107
+ Se as k,
2108
+ Ie as l,
2109
+ Te as m,
2110
+ Re as n,
2111
+ Zt as o,
2112
+ Pe as p,
2113
+ $e as q,
2114
+ de as r,
2115
+ We as s,
2091
2116
  Ne as t
2092
2117
  };
@@ -57,13 +57,10 @@ export class RangeCalendar extends Component {
57
57
  /**
58
58
  * Update current month/year in data.
59
59
  *
60
- * @param {{month:number,year:number}} obj
60
+ * @param {object} obj
61
61
  * @returns {void}
62
62
  */
63
- setCurrent({ month, year }: {
64
- month: number;
65
- year: number;
66
- }): void;
63
+ setCurrent({ month, year, date }: object): void;
67
64
  /**
68
65
  * Render the range calendar.
69
66
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.225",
3
+ "version": "1.0.227",
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": {