@base-framework/ui 1.0.311 → 1.0.312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { Div as l, H5 as X, P as g, I as p, Li as q, Span as a, Ul as H, Button as f, OnState as I, Label as A, H2 as C, Form as Z, Header as $, Footer as P, A as Y, H3 as ee, Checkbox as te, Input as b, Img as _, Nav as se, UseParent as W, OnStateOpen as M, Time as oe, Dialog as le } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as w, Html as j, Dom as ne, base as re, Data as F, Builder as G, Jot as v, Events as k, DateTime as L } from "@base-framework/base";
3
- import { P as S, b as ie, R as ae } from "./range-calendar-CnBylqhu.js";
3
+ import { P as S, b as ie, R as ae } from "./range-calendar-BMWSJTE0.js";
4
4
  import { C as ce, F as ue, a as y } from "./veil-CVCuKSvj.js";
5
5
  import { B as h, I as m } from "./buttons-CHEs54Wl.js";
6
6
  import { Icons as u } from "./icons.es.js";
package/dist/index.es.js CHANGED
@@ -3,9 +3,9 @@ import { B as u, I as g, L as C } from "./buttons-CHEs54Wl.js";
3
3
  import { C as T, F as b, V as D, a as I } from "./veil-CVCuKSvj.js";
4
4
  import { C as F, d as B, D as P, c as k, E as M, F as v, H as x, I as N, M as f, N as y, P as h, R as U, T as L, a as W, b as H, U as R, W as w } from "./inputs-9udyzkHR.js";
5
5
  import { Icons as G } from "./icons.es.js";
6
- import { A as E, B as V, C as j, w as q, K as J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, Q as $, O as aa, v as ea, c as sa, a as oa, b as ta, R as ra, l as na, g as la, i as ia, h as pa, j as da, e as ma, k as ua, F as ga, d as Ca, f as ca, I as Ta, L as ba, x as Da, M as Ia, o as Sa, N as Fa, P as Ba, s as Pa, t as ka, S as Ma, q as va, r as xa, T as Na, H as fa, J as ya, p as ha, u as Ua } from "./empty-state-KpaoE_8g.js";
7
- import { A as Wa, b as Ha, C as Ra, D as wa, a as Aa, F as Ga, M as Oa, P as Ea, R as Va, c as ja, g as qa, p as Ja } from "./range-calendar-CnBylqhu.js";
8
- import { B as Ka, p as Qa, C as _a, j as Xa, D as Ya, m as Za, k as $a, H as ae, I as ee, N as se, O as oe, P as te, S as re, n as ne, o as le, x as ie, s as pe, q as de, r as me, T as ue, t as ge, w as Ce, u as ce, v as Te, l as be, U as De, W as Ie, f as Se, h as Fe, i as Be, c as Pe, d as ke, b as Me, e as ve, a as xe, g as Ne } from "./signature-panel-CIjDPXqA.js";
6
+ import { A as E, B as V, C as j, w as q, K as J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, Q as $, O as aa, v as ea, c as sa, a as oa, b as ta, R as ra, l as na, g as la, i as ia, h as pa, j as da, e as ma, k as ua, F as ga, d as Ca, f as ca, I as Ta, L as ba, x as Da, M as Ia, o as Sa, N as Fa, P as Ba, s as Pa, t as ka, S as Ma, q as va, r as xa, T as Na, H as fa, J as ya, p as ha, u as Ua } from "./empty-state-D1QN4wKI.js";
7
+ import { A as Wa, b as Ha, C as Ra, D as wa, a as Aa, F as Ga, M as Oa, P as Ea, R as Va, c as ja, g as qa, p as Ja } from "./range-calendar-BMWSJTE0.js";
8
+ import { B as Ka, p as Qa, C as _a, j as Xa, D as Ya, m as Za, k as $a, H as ae, I as ee, N as se, O as oe, P as te, S as re, n as ne, o as le, x as ie, s as pe, q as de, r as me, T as ue, t as ge, w as Ce, u as ce, v as Te, l as be, U as De, W as Ie, f as Se, h as Fe, i as Be, c as Pe, d as ke, b as Me, e as ve, a as xe, g as Ne } from "./signature-panel-1P_xBZA9.js";
9
9
  import { B as ye, I as he, M as Ue, d as Le, e as We, g as He, N as Re, b as we, a as Ae, f as Ge, P as Oe, c as Ee, S as Ve, T as je } from "./mobile-nav-wrapper-CWqhZ0qz.js";
10
10
  import { B as Je, a as ze, C as Ke, F as Qe, b as _e, c as Xe, M as Ye, P as Ze, S as $e } from "./sidebar-menu-page-UmKsAvjb.js";
11
11
  import { A as es, F as ss, M as os, a as ts, T as rs } from "./aside-template-sUm-F2f0.js";
@@ -1,5 +1,5 @@
1
- import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-KpaoE_8g.js";
2
- import { A as W, P as X, g as Y } from "./range-calendar-CnBylqhu.js";
1
+ import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-D1QN4wKI.js";
2
+ import { A as W, P as X, g as Y } from "./range-calendar-BMWSJTE0.js";
3
3
  export {
4
4
  s as Alert,
5
5
  W as Avatar,
@@ -1,5 +1,5 @@
1
- import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-CIjDPXqA.js";
2
- import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-CnBylqhu.js";
1
+ import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-1P_xBZA9.js";
2
+ import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-BMWSJTE0.js";
3
3
  import { B as X, I as Y, M as Z, d as _, e as $, g as aa, N as ea, b as sa, a as na, f as ta, P as oa, c as ra, S as la, T as ia } from "./mobile-nav-wrapper-CWqhZ0qz.js";
4
4
  export {
5
5
  s as BackButton,
@@ -1,14 +1,14 @@
1
1
  import { Div as h, Img as _, Span as H, Button as L, OnState as J, On as z } from "@base-framework/atoms";
2
- import { Component as O, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
3
- import { B as f } from "./buttons-CHEs54Wl.js";
2
+ import { Component as Y, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
3
+ import { B as m } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as P } from "./icons.es.js";
5
- const U = (n, t) => {
6
- const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
7
- let i = e.left + r, d = e.bottom + l;
8
- const g = globalThis.innerHeight - e.bottom, m = e.top;
9
- return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && m > g ? d = e.top + l - a.height - s : g < a.height && (d = e.bottom + l - (a.height - g) - s), { x: i, y: d };
5
+ const U = (e, t) => {
6
+ const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
7
+ let i = n.left + r, d = n.bottom + l;
8
+ const g = globalThis.innerHeight - n.bottom, f = n.top;
9
+ return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && f > g ? d = n.top + l - a.height - s : g < a.height && (d = n.bottom + l - (a.height - g) - s), { x: i, y: d };
10
10
  };
11
- class Pt extends O {
11
+ class Pt extends Y {
12
12
  /**
13
13
  * This will set up the data.
14
14
  *
@@ -59,7 +59,7 @@ class Pt extends O {
59
59
  return h({
60
60
  class: `absolute inset-auto fadeIn mt-2 rounded-md p-0 shadow-lg bg-popover min-h-12 backdrop:bg-transparent text-inherit r z-30 ${t}`,
61
61
  popover: "manual",
62
- toggle: (e, { state: a }) => e.newState === "closed" ? a.open = !1 : null,
62
+ toggle: (n, { state: a }) => n.newState === "closed" ? a.open = !1 : null,
63
63
  style: "top: [[position.y]]px; left: [[position.x]]px"
64
64
  }, this.children);
65
65
  }
@@ -84,7 +84,7 @@ class Pt extends O {
84
84
  * @returns {void}
85
85
  */
86
86
  updatePosition() {
87
- const t = this.button ?? null, e = this.panel, a = U(t, e);
87
+ const t = this.button ?? null, n = this.panel, a = U(t, n);
88
88
  this.data.position = a;
89
89
  }
90
90
  /**
@@ -136,16 +136,16 @@ class Pt extends O {
136
136
  this.panel.hidePopover();
137
137
  }
138
138
  }
139
- const q = j(({ src: n, alt: t }) => n ? _({
139
+ const q = j(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : _({
140
140
  class: "absolute w-full h-full rounded-full object-cover fadeIn",
141
- src: n,
141
+ src: e,
142
142
  alt: t,
143
143
  /**
144
144
  * If there's an error loading the image, hide it.
145
145
  */
146
- error: (e) => e.target.style.display = "none"
147
- }) : null), K = (n) => n && (Array.isArray(n) && (n = n.join(" ")), typeof n != "string" && (n = String(n)), n.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (n) => !n || n.length < 2 ? n : K(n), Q = (n) => H([n, (t, e) => {
148
- e.textContent = G(t);
146
+ error: (n) => n.target.style.display = "none"
147
+ })), K = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (e) => !e || e.length < 2 ? e : K(e), Q = (e) => H([e, (t, n) => {
148
+ n.textContent = G(t);
149
149
  }]), A = {
150
150
  xs: "h-6 w-6",
151
151
  sm: "h-8 w-8",
@@ -166,8 +166,8 @@ const q = j(({ src: n, alt: t }) => n ? _({
166
166
  "3xl": "text-4xl",
167
167
  "4xl": "text-5xl",
168
168
  default: "text-base"
169
- }, V = (n) => A[n] || A.default, Z = (n) => I[n] || I.default, tt = (n, t = null, e = "md") => {
170
- const a = G(n), s = Z(e);
169
+ }, V = (e) => A[e] || A.default, Z = (e) => I[e] || I.default, tt = (e, t = null, n = "md") => {
170
+ const a = G(e), s = Z(n);
171
171
  return h(
172
172
  {
173
173
  class: `
@@ -180,49 +180,49 @@ const q = j(({ src: n, alt: t }) => n ? _({
180
180
  t ? Q(t) : H({ class: "uppercase" }, a)
181
181
  ]
182
182
  );
183
- }, Tt = j(({ src: n, alt: t, fallbackText: e, watcherFallback: a, size: s }) => {
183
+ }, Tt = j(({ src: e, alt: t, fallbackText: n, watcherFallback: a, size: s }) => {
184
184
  const r = V(s);
185
185
  return h(
186
186
  {
187
187
  class: `relative flex items-center justify-center ${r}`
188
188
  },
189
189
  [
190
- q({ src: n, alt: t }),
191
- tt(e, a, s)
190
+ q({ src: e, alt: t }),
191
+ tt(n, a, s)
192
192
  ]
193
193
  );
194
- }), et = ({ currentMonth: n, currentYear: t, onSelect: e }) => h(
194
+ }), et = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
195
195
  { class: "grid grid-cols-3 gap-2" },
196
196
  T.monthNames.map(
197
- (a, s) => f(
197
+ (a, s) => m(
198
198
  {
199
199
  click: (r) => {
200
- r.preventDefault(), r.stopPropagation(), e(s);
200
+ r.preventDefault(), r.stopPropagation(), n(s);
201
201
  },
202
- variant: n === s ? "primary" : "ghost",
202
+ variant: e === s ? "primary" : "ghost",
203
203
  "aria-label": `Select ${a} ${t}`
204
204
  },
205
205
  a.substring(0, 3)
206
206
  )
207
207
  )
208
- ), D = (n) => (n *= 1, n < 10 ? `0${n}` : String(n)), nt = (n) => (n.indexOf("T") === -1 && n.indexOf(" ") === -1 && (n += "T00:00:01"), n.replace(" ", "T"), n), w = (n, t, e) => `${n}-${D(t + 1)}-${D(e)}`, at = (n) => n ? "bg-accent text-primary" : "", st = (n) => n ? "text-muted-foreground opacity-50" : "", rt = (n, t) => n === t, ot = (n, t) => rt(n, t) ? "bg-primary text-primary-foreground" : "", it = (n, t, e, a) => {
208
+ ), D = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), nt = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), w = (e, t, n) => `${e}-${D(t + 1)}-${D(n)}`, at = (e) => e ? "bg-accent text-primary" : "", st = (e) => e ? "text-muted-foreground opacity-50" : "", rt = (e, t) => e === t, ot = (e, t) => rt(e, t) ? "bg-primary text-primary-foreground" : "", it = (e, t, n, a) => {
209
209
  const s = ot(t, a);
210
- return s || (n ? at(n) : e ? st(e) : "text-foreground");
211
- }, N = (n) => {
210
+ return s || (e ? at(e) : n ? st(n) : "text-foreground");
211
+ }, N = (e) => {
212
212
  const {
213
213
  day: t,
214
- currentDate: e,
214
+ currentDate: n,
215
215
  date: a,
216
216
  isToday: s,
217
217
  isOutsideMonth: r,
218
218
  select: l,
219
219
  disabled: i
220
- } = n;
220
+ } = e;
221
221
  return L(
222
222
  {
223
223
  class: `
224
224
  flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md
225
- ${it(s, e, r, a)}
225
+ ${it(s, n, r, a)}
226
226
  hover:bg-muted/50 hover:text-muted-foreground focus:z-10
227
227
  disabled:pointer-events-none disabled:opacity-50
228
228
  `,
@@ -233,79 +233,79 @@ const q = j(({ src: n, alt: t }) => n ? _({
233
233
  },
234
234
  t.toString()
235
235
  );
236
- }, Y = (n, t, e, a) => n === a.date && t === a.month && e === a.year, lt = (n, t, e, a = !1) => {
237
- const { year: s, month: r } = n, l = w(s, r, n.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), m = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
236
+ }, O = (e, t, n, a) => e === a.date && t === a.month && n === a.year, lt = (e, t, n, a = !1) => {
237
+ const { year: s, month: r } = e, l = w(s, r, e.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), f = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
238
238
  for (let o = i - 1; o >= 0; o--) {
239
- const u = g - o, p = Y(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
240
- m.push(
239
+ const u = g - o, p = O(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
240
+ f.push(
241
241
  N({
242
242
  day: u,
243
243
  currentDate: l,
244
244
  date: w(v, C, u),
245
245
  isToday: p,
246
246
  isOutsideMonth: !0,
247
- select: e,
247
+ select: n,
248
248
  disabled: x
249
249
  })
250
250
  );
251
251
  }
252
252
  for (let o = 1; o <= d; o++) {
253
- const u = Y(o, r, s, t), p = new Date(s, r, o) < new Date(t.year, t.month, t.date), y = a && p;
254
- m.push(
253
+ const u = O(o, r, s, t), p = new Date(s, r, o) < new Date(t.year, t.month, t.date), y = a && p;
254
+ f.push(
255
255
  N({
256
256
  day: o,
257
257
  currentDate: l,
258
258
  date: w(s, r, o),
259
259
  isToday: u,
260
260
  isOutsideMonth: !1,
261
- select: e,
261
+ select: n,
262
262
  disabled: y
263
263
  })
264
264
  );
265
265
  }
266
- const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - m.length % 7) % 7;
266
+ const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - f.length % 7) % 7;
267
267
  for (let o = 1; o <= c; o++) {
268
- const u = Y(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
269
- m.push(
268
+ const u = O(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
269
+ f.push(
270
270
  N({
271
271
  day: o,
272
272
  currentDate: l,
273
273
  date: w($, b, o),
274
274
  isToday: u,
275
275
  isOutsideMonth: !0,
276
- select: e,
276
+ select: n,
277
277
  disabled: y
278
278
  })
279
279
  );
280
280
  }
281
- return m;
282
- }, R = ({ label: n, click: t }) => f(
281
+ return f;
282
+ }, R = ({ label: e, click: t }) => m(
283
283
  {
284
284
  class: `
285
285
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
286
286
  opacity-50 hover:opacity-100 text-muted-foreground absolute
287
- ${n === "Previous" ? "left-1" : "right-1"}
287
+ ${e === "Previous" ? "left-1" : "right-1"}
288
288
  focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
289
289
  `,
290
290
  click: t,
291
- "aria-label": `${n} month`,
291
+ "aria-label": `${e} month`,
292
292
  variant: "icon",
293
- icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
293
+ icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
294
294
  }
295
- ), ct = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
296
- f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
297
- f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
295
+ ), ct = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
296
+ m({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
297
+ m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
298
298
  R({ label: "Previous", click: a }),
299
- R({ label: "Next", click: e })
300
- ]), ht = (n) => h(
299
+ R({ label: "Next", click: n })
300
+ ]), ht = (e) => h(
301
301
  { class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
302
- n
303
- ), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (n) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
302
+ e
303
+ ), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (e) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
304
304
  ct({
305
- onMonthClick: n.onMonthClick,
306
- onYearClick: n.onYearClick,
307
- next: n.next,
308
- previous: n.previous
305
+ onMonthClick: e.onMonthClick,
306
+ onYearClick: e.onYearClick,
307
+ next: e.next,
308
+ previous: e.previous
309
309
  }),
310
310
  h({
311
311
  class: "flex flex-auto flex-col w-full",
@@ -316,24 +316,24 @@ const q = j(({ src: n, alt: t }) => n ? _({
316
316
  h(
317
317
  { class: "grid grid-cols-7" },
318
318
  lt(
319
- n.current,
320
- n.today,
321
- n.select,
322
- n.blockPriorDates
319
+ e.current,
320
+ e.today,
321
+ e.select,
322
+ e.blockPriorDates
323
323
  )
324
324
  )
325
325
  ]
326
326
  ]
327
327
  })
328
- ]), gt = ({ currentMonth: n, currentYear: t, onSelect: e }) => {
328
+ ]), gt = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
329
329
  const a = t - 50, s = Array.from({ length: 101 }, (r, l) => a + l);
330
330
  return h(
331
331
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
332
332
  s.map(
333
- (r) => f(
333
+ (r) => m(
334
334
  {
335
335
  click: (l) => {
336
- l.preventDefault(), l.stopPropagation(), e(r);
336
+ l.preventDefault(), l.stopPropagation(), n(r);
337
337
  },
338
338
  variant: r === t ? "primary" : "ghost",
339
339
  "aria-label": `Select ${r}`
@@ -343,7 +343,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
343
343
  )
344
344
  );
345
345
  };
346
- class Nt extends O {
346
+ class Nt extends Y {
347
347
  /**
348
348
  * This will declare the props for the compiler.
349
349
  *
@@ -359,8 +359,8 @@ class Nt extends O {
359
359
  * @returns {Date}
360
360
  */
361
361
  getSelectedDate(t) {
362
- const e = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
363
- return new Date(e.getFullYear(), e.getMonth(), e.getDate());
362
+ const n = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
363
+ return new Date(n.getFullYear(), n.getMonth(), n.getDate());
364
364
  }
365
365
  /**
366
366
  * This will set up the data for the calendar.
@@ -368,13 +368,13 @@ class Nt extends O {
368
368
  * @returns {Data}
369
369
  */
370
370
  setData() {
371
- const t = /* @__PURE__ */ new Date(), e = this.getSelectedDate(t), a = e.getMonth();
371
+ const t = /* @__PURE__ */ new Date(), n = this.getSelectedDate(t), a = n.getMonth();
372
372
  return new B({
373
373
  monthName: this.getMonthName(a),
374
- currentDate: `${e.getFullYear()}-${a + 1}-${e.getDate()}`,
374
+ currentDate: `${n.getFullYear()}-${a + 1}-${n.getDate()}`,
375
375
  current: {
376
- date: e.getDate(),
377
- year: e.getFullYear(),
376
+ date: n.getDate(),
377
+ year: n.getFullYear(),
378
378
  month: a
379
379
  },
380
380
  today: {
@@ -411,8 +411,8 @@ class Nt extends O {
411
411
  */
412
412
  goToPreviousMonth() {
413
413
  const t = this.data;
414
- let e = t.current.month, a = t.current.year;
415
- e === 0 ? (e = 11, a--) : e--, this.setCurrentDate(e, a);
414
+ let n = t.current.month, a = t.current.year;
415
+ n === 0 ? (n = 11, a--) : n--, this.setCurrentDate(n, a);
416
416
  }
417
417
  /**
418
418
  * This will go to the next month.
@@ -421,8 +421,8 @@ class Nt extends O {
421
421
  */
422
422
  goToNextMonth() {
423
423
  const t = this.data;
424
- let e = t.current.month, a = t.current.year;
425
- e === 11 ? (e = 0, a++) : e++, this.setCurrentDate(e, a);
424
+ let n = t.current.month, a = t.current.year;
425
+ n === 11 ? (n = 0, a++) : n++, this.setCurrentDate(n, a);
426
426
  }
427
427
  /**
428
428
  * This will set the current month and year.
@@ -432,9 +432,9 @@ class Nt extends O {
432
432
  * @param {number} [date=null]
433
433
  * @returns {void}
434
434
  */
435
- setCurrentDate(t, e, a = null) {
435
+ setCurrentDate(t, n, a = null) {
436
436
  const s = this.data;
437
- s.current.month = t, s.current.year = e, typeof a == "number" && (s.current.date = D(a)), s.currentDate = `${e}-${D(t + 1)}-${s.current.date}`, s.monthName = this.getMonthName(t);
437
+ s.current.month = t, s.current.year = n, typeof a == "number" && (s.current.date = D(a)), s.currentDate = `${n}-${D(t + 1)}-${s.current.date}`, s.monthName = this.getMonthName(t);
438
438
  }
439
439
  /**
440
440
  * This will select a date.
@@ -443,8 +443,8 @@ class Nt extends O {
443
443
  * @returns {void}
444
444
  */
445
445
  selectDate(t) {
446
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
447
- this.setCurrentDate(e.getMonth(), e.getFullYear(), e.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(this.data.currentDate);
446
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
447
+ this.setCurrentDate(n.getMonth(), n.getFullYear(), n.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(this.data.currentDate);
448
448
  }
449
449
  /**
450
450
  * This will render the calendar.
@@ -460,8 +460,8 @@ class Nt extends O {
460
460
  {
461
461
  currentMonth: this.data.current.month,
462
462
  currentYear: this.data.current.year,
463
- onSelect: (e) => {
464
- this.setCurrentDate(e, this.data.current.year), this.state.view = "calendar";
463
+ onSelect: (n) => {
464
+ this.setCurrentDate(n, this.data.current.year), this.state.view = "calendar";
465
465
  }
466
466
  }
467
467
  );
@@ -470,8 +470,8 @@ class Nt extends O {
470
470
  {
471
471
  currentMonth: this.data.current.month,
472
472
  currentYear: this.data.current.year,
473
- onSelect: (e) => {
474
- this.setCurrentDate(this.data.current.month, e), this.state.view = "calendar";
473
+ onSelect: (n) => {
474
+ this.setCurrentDate(this.data.current.month, n), this.state.view = "calendar";
475
475
  }
476
476
  }
477
477
  );
@@ -479,15 +479,15 @@ class Nt extends O {
479
479
  return dt({
480
480
  current: this.data.current,
481
481
  today: this.data.today,
482
- select: (e) => this.selectDate(e),
482
+ select: (n) => this.selectDate(n),
483
483
  next: () => this.goToNextMonth(),
484
484
  previous: () => this.goToPreviousMonth(),
485
485
  blockPriorDates: this.blockPriorDates || !1,
486
- onMonthClick: (e) => {
487
- e.preventDefault(), e.stopPropagation(), this.state.view = "months";
486
+ onMonthClick: (n) => {
487
+ n.preventDefault(), n.stopPropagation(), this.state.view = "months";
488
488
  },
489
- onYearClick: (e) => {
490
- e.preventDefault(), e.stopPropagation(), this.state.view = "years";
489
+ onYearClick: (n) => {
490
+ n.preventDefault(), n.stopPropagation(), this.state.view = "years";
491
491
  }
492
492
  });
493
493
  }
@@ -495,44 +495,44 @@ class Nt extends O {
495
495
  ]);
496
496
  }
497
497
  }
498
- const W = ({ label: n, click: t }) => f(
498
+ const W = ({ label: e, click: t }) => m(
499
499
  {
500
500
  class: `
501
501
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
502
502
  opacity-50 hover:opacity-100 text-muted-foreground absolute
503
- ${n === "Previous" ? "left-1" : "right-1"}
503
+ ${e === "Previous" ? "left-1" : "right-1"}
504
504
  focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
505
505
  `,
506
506
  click: t,
507
- "aria-label": `${n} month`,
507
+ "aria-label": `${e} month`,
508
508
  variant: "icon",
509
- icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
509
+ icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
510
510
  }
511
- ), mt = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
512
- f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
513
- f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
511
+ ), ft = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
512
+ m({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
513
+ m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
514
514
  W({ label: "Previous", click: a }),
515
- W({ label: "Next", click: e })
516
- ]), ft = (n) => h({ class: "h-9 flex items-center justify-center font-medium" }, n), pt = () => h(
515
+ W({ label: "Next", click: n })
516
+ ]), mt = (e) => h({ class: "h-9 flex items-center justify-center font-medium" }, e), pt = () => h(
517
517
  { class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
518
- ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ft)
519
- ), yt = ({ day: n, iso: t, disabled: e, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
518
+ ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(mt)
519
+ ), yt = ({ day: e, iso: t, disabled: n, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
520
520
  let d = "ghost", g = "";
521
- return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), e && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), f(
521
+ return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), n && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), m(
522
522
  {
523
523
  class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${g}`,
524
524
  variant: d,
525
- disabled: e,
526
- click: (m) => {
527
- m.preventDefault(), m.stopPropagation(), e || i();
525
+ disabled: n,
526
+ click: (f) => {
527
+ f.preventDefault(), f.stopPropagation(), n || i();
528
528
  }
529
529
  },
530
- n.toString()
530
+ e.toString()
531
531
  );
532
- }, Dt = ({ today: n, current: t, blockPriorDates: e, onDateClick: a }) => {
533
- const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, m = t.month === 0 ? t.year - 1 : t.year, C = new Date(m, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
532
+ }, Dt = ({ today: e, current: t, blockPriorDates: n, onDateClick: a }) => {
533
+ const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, f = t.month === 0 ? t.year - 1 : t.year, C = new Date(f, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
534
534
  for (let c = l - 1; c >= 0; c--) {
535
- const o = C - c, u = w(m, g, o), p = new Date(m, g, o), y = new Date(n.year, n.month, n.date), x = p < y, M = e && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
535
+ const o = C - c, u = w(f, g, o), p = new Date(f, g, o), y = new Date(e.year, e.month, e.date), x = p < y, M = n && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
536
536
  d.push({
537
537
  day: o,
538
538
  iso: u,
@@ -545,7 +545,7 @@ const W = ({ label: n, click: t }) => f(
545
545
  });
546
546
  }
547
547
  for (let c = 1; c <= i; c++) {
548
- const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
548
+ const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
549
549
  d.push({
550
550
  day: c,
551
551
  iso: o,
@@ -561,7 +561,7 @@ const W = ({ label: n, click: t }) => f(
561
561
  }
562
562
  const F = (7 - d.length % 7) % 7;
563
563
  for (let c = 1; c <= F; c++) {
564
- const o = w(b, v, c), u = new Date(b, v, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
564
+ const o = w(b, v, c), u = new Date(b, v, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
565
565
  d.push({
566
566
  day: c,
567
567
  iso: o,
@@ -588,12 +588,12 @@ const W = ({ label: n, click: t }) => f(
588
588
  })
589
589
  )
590
590
  );
591
- }, xt = j((n, t) => h({ class: "flex flex-auto flex-col" }, [
592
- mt({
593
- onMonthClick: n.onMonthClick,
594
- onYearClick: n.onYearClick,
595
- next: n.next,
596
- previous: n.previous
591
+ }, xt = j((e, t) => h({ class: "flex flex-auto flex-col" }, [
592
+ ft({
593
+ onMonthClick: e.onMonthClick,
594
+ onYearClick: e.onYearClick,
595
+ next: e.next,
596
+ previous: e.previous
597
597
  }),
598
598
  h({
599
599
  class: "flex flex-auto flex-col w-full",
@@ -602,57 +602,57 @@ const W = ({ label: n, click: t }) => f(
602
602
  () => [
603
603
  pt(),
604
604
  Dt({
605
- today: n.today,
606
- current: n.current,
607
- blockPriorDates: n.blockPriorDates,
608
- onDateClick: n.onDateClick
605
+ today: e.today,
606
+ current: e.current,
607
+ blockPriorDates: e.blockPriorDates,
608
+ onDateClick: e.onDateClick
609
609
  })
610
610
  ]
611
611
  ]
612
612
  })
613
- ])), wt = ({ currentMonth: n, currentYear: t, onSelect: e }) => h(
613
+ ])), wt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
614
614
  { class: "grid grid-cols-3 gap-2" },
615
615
  T.monthNames.map(
616
- (a, s) => f(
616
+ (a, s) => m(
617
617
  {
618
618
  click: (r) => {
619
- r.preventDefault(), r.stopPropagation(), e(s);
619
+ r.preventDefault(), r.stopPropagation(), n(s);
620
620
  },
621
- variant: n === s ? "primary" : "ghost",
621
+ variant: e === s ? "primary" : "ghost",
622
622
  "aria-label": `Select ${a} ${t}`
623
623
  },
624
624
  a.substring(0, 3)
625
625
  )
626
626
  )
627
- ), vt = ({ start: n, end: t, selecting: e, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
628
- z("selecting", (r) => f({
627
+ ), vt = ({ start: e, end: t, selecting: n, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
628
+ z("selecting", (r) => m({
629
629
  click: a,
630
630
  variant: r === "start" ? "primary" : "outline",
631
631
  class: "flex-1"
632
632
  }, [
633
633
  h({ class: "font-medium" }, E("current.start", "Start Date"))
634
634
  ])),
635
- z("selecting", (r) => f({
635
+ z("selecting", (r) => m({
636
636
  click: s,
637
637
  variant: r === "end" ? "primary" : "outline",
638
638
  class: "flex-1"
639
639
  }, [
640
640
  h({ class: "font-medium" }, E("current.end", "End Date"))
641
641
  ]))
642
- ]), E = (n, t) => [`[[${n}]]`, (e) => e == null ? t : bt(e)], bt = (n) => {
643
- const t = /* @__PURE__ */ new Date(n + "T00:00:00"), e = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
644
- return `${e[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
645
- }, Ct = ({ currentYear: n, onSelect: t }) => {
646
- const e = n - 50, a = Array.from({ length: 101 }, (s, r) => e + r);
642
+ ]), E = (e, t) => [`[[${e}]]`, (n) => n == null ? t : bt(n)], bt = (e) => {
643
+ const t = /* @__PURE__ */ new Date(e + "T00:00:00"), n = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
644
+ return `${n[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
645
+ }, Ct = ({ currentYear: e, onSelect: t }) => {
646
+ const n = e - 50, a = Array.from({ length: 101 }, (s, r) => n + r);
647
647
  return h(
648
648
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
649
649
  a.map(
650
- (s) => f(
650
+ (s) => m(
651
651
  {
652
652
  click: (r) => {
653
653
  r.preventDefault(), r.stopPropagation(), t(s);
654
654
  },
655
- variant: s === n ? "primary" : "ghost",
655
+ variant: s === e ? "primary" : "ghost",
656
656
  "aria-label": `Select ${s}`
657
657
  },
658
658
  s.toString()
@@ -660,7 +660,7 @@ const W = ({ label: n, click: t }) => f(
660
660
  )
661
661
  );
662
662
  };
663
- class Yt extends O {
663
+ class Ot extends Y {
664
664
  /**
665
665
  * Declare compiler props.
666
666
  *
@@ -675,7 +675,7 @@ class Yt extends O {
675
675
  * @returns {Data}
676
676
  */
677
677
  setData() {
678
- const t = /* @__PURE__ */ new Date(), e = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = e.getMonth(), s = e.getFullYear();
678
+ const t = /* @__PURE__ */ new Date(), n = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = n.getMonth(), s = n.getFullYear();
679
679
  return new B({
680
680
  today: {
681
681
  date: t.getDate(),
@@ -683,7 +683,7 @@ class Yt extends O {
683
683
  year: t.getFullYear()
684
684
  },
685
685
  monthName: this.getMonthName(a),
686
- currentData: `${e.getFullYear()}-${D(e.getMonth() + 1)}-${D(e.getDate())}`,
686
+ currentData: `${n.getFullYear()}-${D(n.getMonth() + 1)}-${D(n.getDate())}`,
687
687
  current: {
688
688
  date: t.getDate(),
689
689
  month: a,
@@ -723,19 +723,19 @@ class Yt extends O {
723
723
  handleClick(t) {
724
724
  if (this.data.selecting === "start") {
725
725
  this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end";
726
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
726
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
727
727
  this.setCurrent({
728
- month: e.getMonth(),
729
- year: e.getFullYear(),
730
- date: e.getDate()
728
+ month: n.getMonth(),
729
+ year: n.getFullYear(),
730
+ date: n.getDate()
731
731
  });
732
732
  } else {
733
733
  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";
734
- const e = /* @__PURE__ */ new Date(t + "T00:00:00");
734
+ const n = /* @__PURE__ */ new Date(t + "T00:00:00");
735
735
  this.setCurrent({
736
- month: e.getMonth(),
737
- year: e.getFullYear(),
738
- date: e.getDate()
736
+ month: n.getMonth(),
737
+ year: n.getFullYear(),
738
+ date: n.getDate()
739
739
  }), typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end);
740
740
  }
741
741
  }
@@ -745,9 +745,9 @@ class Yt extends O {
745
745
  * @param {object} obj
746
746
  * @returns {void}
747
747
  */
748
- setCurrent({ month: t, year: e, date: a = null }) {
748
+ setCurrent({ month: t, year: n, date: a = null }) {
749
749
  const s = this.data.current;
750
- s.month = (t + 12) % 12, s.year = e + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (s.date = a), this.data.monthName = this.getMonthName(s.month), this.data.currentDate = `${e}-${D(t + 1)}-${D(s.date)}`;
750
+ s.month = (t + 12) % 12, s.year = n + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (s.date = a), this.data.monthName = this.getMonthName(s.month), this.data.currentDate = `${n}-${D(t + 1)}-${D(s.date)}`;
751
751
  }
752
752
  /**
753
753
  * Render the range calendar.
@@ -755,7 +755,7 @@ class Yt extends O {
755
755
  * @returns {object}
756
756
  */
757
757
  render() {
758
- const { today: t, current: e, selecting: a } = this.data, { start: s, end: r } = e;
758
+ const { today: t, current: n, selecting: a } = this.data, { start: s, end: r } = n;
759
759
  return h({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
760
760
  vt({
761
761
  start: s,
@@ -773,28 +773,28 @@ class Yt extends O {
773
773
  case "months":
774
774
  return wt(
775
775
  {
776
- currentMonth: e.month,
777
- currentYear: e.year,
776
+ currentMonth: n.month,
777
+ currentYear: n.year,
778
778
  onSelect: (i) => {
779
- this.setCurrent({ month: i, year: e.year }), this.state.view = "calendar";
779
+ this.setCurrent({ month: i, year: n.year }), this.state.view = "calendar";
780
780
  }
781
781
  }
782
782
  );
783
783
  case "years":
784
784
  return Ct(
785
785
  {
786
- currentYear: e.year,
786
+ currentYear: n.year,
787
787
  onSelect: (i) => {
788
- this.setCurrent({ month: e.month, year: i }), this.state.view = "calendar";
788
+ this.setCurrent({ month: n.month, year: i }), this.state.view = "calendar";
789
789
  }
790
790
  }
791
791
  );
792
792
  default:
793
793
  return xt({
794
794
  monthName: this.data.monthName,
795
- year: e.year,
795
+ year: n.year,
796
796
  today: t,
797
- current: e,
797
+ current: n,
798
798
  blockPriorDates: this.blockPriorDates,
799
799
  onDateClick: (i) => this.handleClick(i),
800
800
  onMonthClick: (i) => {
@@ -824,7 +824,7 @@ export {
824
824
  w as F,
825
825
  dt as M,
826
826
  Pt as P,
827
- Yt as R,
827
+ Ot as R,
828
828
  ht as a,
829
829
  Nt as b,
830
830
  nt as c,
@@ -4,7 +4,7 @@ import { B as M, I as _ } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as D } from "./icons.es.js";
5
5
  import { TableBody as J, DataTableBody as Z, ScrollableTableBody as ee, List as te, IntervalTimer as se } from "@base-framework/organisms";
6
6
  import { C as ae, I as ie, H as ne } from "./inputs-9udyzkHR.js";
7
- import { A as oe, P as le } from "./range-calendar-CnBylqhu.js";
7
+ import { A as oe, P as le } from "./range-calendar-BMWSJTE0.js";
8
8
  h((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.311",
3
+ "version": "1.0.312",
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": {