@base-framework/ui 1.0.233 → 1.0.234

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 n, H5 as W, P as g, I as f, Li as V, Span as i, Ul as q, Button as m, OnState as w, Label as J, Form as G, H2 as S, Header as D, Footer as P, A as H, H3 as K, Checkbox as Q, Nav as X, Input as y, UseParent as Z, Time as ee, Dialog as te } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as v, Html as M, Dom as se, base as oe, Data as I, Builder as Y, Jot as $, DateTime as A } from "@base-framework/base";
3
- import { P as C, b as ne, R as le } from "./range-calendar-ZAHrVCgV.js";
3
+ import { P as C, b as ne, R as le } from "./range-calendar-ppUinoRx.js";
4
4
  import { B as h, I as b } from "./buttons-Cm9etaEG.js";
5
5
  import { Icons as u } from "./icons.es.js";
6
6
  import { Timer as re, List as ae, DynamicTime as ie } from "@base-framework/organisms";
package/dist/index.es.js CHANGED
@@ -3,9 +3,9 @@ import { B as g, I as C, L as T } from "./buttons-Cm9etaEG.js";
3
3
  import { C as b, d as I, D as S, c as P, E as B, F, H as k, I as M, M as f, N as x, P as N, R as v, T as y, a as h, b as W, U as H, W as L } from "./inputs-CMjx5-IX.js";
4
4
  import { V as R, a as w } from "./veil-D4dRxILB.js";
5
5
  import { Icons as E } from "./icons.es.js";
6
- import { A as O, B as V, C as j, t as q, G as J, v as z, w as _, x as K, y as Q, D as X, j as Y, k as Z, I as $, H as aa, s as ea, c as sa, a as oa, b as ta, J as ra, i as na, g as la, e as ia, h as pa, F as ma, d as ua, f as da, u as ca, M as ga, l as Ca, N as Ta, P as Da, p as ba, q as Ia, S as Sa, n as Pa, o as Ba, T as Fa, z as ka, E as Ma, m as fa, r as xa } from "./empty-state-C4Pnrs-y.js";
7
- import { A as va, b as ya, C as ha, D as Wa, a as Ha, F as La, M as Aa, P as Ra, R as wa, c as Ua, g as Ea, p as Ga } from "./range-calendar-ZAHrVCgV.js";
8
- import { B as Va, p as ja, C as qa, j as Ja, D as za, m as _a, k as Ka, H as Qa, I as Xa, N as Ya, O as Za, P as $a, S as ae, n as ee, o as se, t as oe, s as te, q as re, r as ne, T as le, l as ie, U as pe, W as me, f as ue, h as de, i as ce, c as ge, d as Ce, b as Te, e as De, a as be, g as Ie } from "./signature-panel-DhtJwt4P.js";
6
+ import { A as O, B as V, C as j, t as q, G as J, v as z, w as _, x as K, y as Q, D as X, j as Y, k as Z, I as $, H as aa, s as ea, c as sa, a as oa, b as ta, J as ra, i as na, g as la, e as ia, h as pa, F as ma, d as ua, f as da, u as ca, M as ga, l as Ca, N as Ta, P as Da, p as ba, q as Ia, S as Sa, n as Pa, o as Ba, T as Fa, z as ka, E as Ma, m as fa, r as xa } from "./empty-state-25yJkl5U.js";
7
+ import { A as va, b as ya, C as ha, D as Wa, a as Ha, F as La, M as Aa, P as Ra, R as wa, c as Ua, g as Ea, p as Ga } from "./range-calendar-ppUinoRx.js";
8
+ import { B as Va, p as ja, C as qa, j as Ja, D as za, m as _a, k as Ka, H as Qa, I as Xa, N as Ya, O as Za, P as $a, S as ae, n as ee, o as se, t as oe, s as te, q as re, r as ne, T as le, l as ie, U as pe, W as me, f as ue, h as de, i as ce, c as ge, d as Ce, b as Te, e as De, a as be, g as Ie } from "./signature-panel-CoExCJGP.js";
9
9
  import { B as Pe, I as Be, M as Fe, d as ke, e as Me, g as fe, N as xe, b as Ne, a as ve, f as ye, P as he, c as We, S as He, T as Le } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
10
  import { B as Re, a as we, C as Ue, F as Ee, b as Ge, c as Oe, M as Ve, P as je, S as qe } from "./sidebar-menu-page-BVryQj2Z.js";
11
11
  import { A as ze, F as _e, M as Ke, a as Qe, T as Xe } from "./aside-template-McEj_Gxc.js";
@@ -1,5 +1,5 @@
1
- import { A as o, B as t, C as e, t as i, G as r, v as n, w as m, x as l, y as S, D, j as c, k as u, I as g, H as p, s as C, c as d, a as F, b as T, J as P, i as A, g as f, e as w, h as I, F as b, d as y, f as B, u as M, M as k, l as x, N as v, P as E, p as N, q as R, S as h, n as L, o as U, T as j, z as q, E as z, m as G, r as H } from "./empty-state-C4Pnrs-y.js";
2
- import { A as O, P as _, g as K } from "./range-calendar-ZAHrVCgV.js";
1
+ import { A as o, B as t, C as e, t as i, G as r, v as n, w as m, x as l, y as S, D, j as c, k as u, I as g, H as p, s as C, c as d, a as F, b as T, J as P, i as A, g as f, e as w, h as I, F as b, d as y, f as B, u as M, M as k, l as x, N as v, P as E, p as N, q as R, S as h, n as L, o as U, T as j, z as q, E as z, m as G, r as H } from "./empty-state-25yJkl5U.js";
2
+ import { A as O, P as _, g as K } from "./range-calendar-ppUinoRx.js";
3
3
  export {
4
4
  o as Alert,
5
5
  O as Avatar,
@@ -1,5 +1,5 @@
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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-DhtJwt4P.js";
2
- import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-ZAHrVCgV.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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-CoExCJGP.js";
2
+ import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-ppUinoRx.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 {
5
5
  s as BackButton,
@@ -1,14 +1,14 @@
1
1
  import { Div as l, 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 P } from "@base-framework/base";
3
- import { B as m } from "./buttons-Cm9etaEG.js";
4
- import { Icons as T } from "./icons.es.js";
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-Cm9etaEG.js";
4
+ import { Icons as P } from "./icons.es.js";
5
5
  const U = (n, t) => {
6
6
  const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, h = globalThis.scrollY;
7
7
  let i = e.left + r, d = e.bottom + h;
8
- const g = globalThis.innerHeight - e.bottom, f = e.top;
9
- return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && f > g ? d = e.top + h - a.height - s : g < a.height && (d = e.bottom + h - (a.height - g) - s), { x: i, y: d };
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 + h - a.height - s : g < a.height && (d = e.bottom + h - (a.height - g) - s), { x: i, y: d };
10
10
  };
11
- class Tt extends O {
11
+ class Pt extends O {
12
12
  /**
13
13
  * This will set up the data.
14
14
  *
@@ -180,7 +180,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
180
180
  t ? Q(t) : H({ class: "uppercase" }, a)
181
181
  ]
182
182
  );
183
- }, Pt = j(({ src: n, alt: t, fallbackText: e, watcherFallback: a, size: s }) => {
183
+ }, Tt = j(({ src: n, alt: t, fallbackText: e, watcherFallback: a, size: s }) => {
184
184
  const r = V(s);
185
185
  return l(
186
186
  {
@@ -193,8 +193,8 @@ const q = j(({ src: n, alt: t }) => n ? _({
193
193
  );
194
194
  }), et = ({ currentMonth: n, currentYear: t, onSelect: e }) => l(
195
195
  { class: "grid grid-cols-3 gap-2" },
196
- P.monthNames.map(
197
- (a, s) => m(
196
+ T.monthNames.map(
197
+ (a, s) => f(
198
198
  {
199
199
  click: (r) => {
200
200
  r.preventDefault(), r.stopPropagation(), e(s);
@@ -234,10 +234,10 @@ const q = j(({ src: n, alt: t }) => n ? _({
234
234
  t.toString()
235
235
  );
236
236
  }, Y = (n, t, e, a) => n === a.date && t === a.month && e === a.year, ct = (n, t, e, a = !1) => {
237
- const { year: s, month: r } = n, h = 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(), f = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
237
+ const { year: s, month: r } = n, h = 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;
238
238
  for (let o = i - 1; o >= 0; o--) {
239
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
- f.push(
240
+ m.push(
241
241
  N({
242
242
  day: u,
243
243
  currentDate: h,
@@ -251,7 +251,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
251
251
  }
252
252
  for (let o = 1; o <= d; o++) {
253
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
- f.push(
254
+ m.push(
255
255
  N({
256
256
  day: o,
257
257
  currentDate: h,
@@ -263,10 +263,10 @@ const q = j(({ src: n, alt: t }) => n ? _({
263
263
  })
264
264
  );
265
265
  }
266
- const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - f.length % 7) % 7;
266
+ const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - m.length % 7) % 7;
267
267
  for (let o = 1; o <= c; o++) {
268
268
  const u = Y(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
269
- f.push(
269
+ m.push(
270
270
  N({
271
271
  day: o,
272
272
  currentDate: h,
@@ -278,8 +278,8 @@ const q = j(({ src: n, alt: t }) => n ? _({
278
278
  })
279
279
  );
280
280
  }
281
- return f;
282
- }, R = ({ label: n, click: t }) => m(
281
+ return m;
282
+ }, R = ({ label: n, click: t }) => f(
283
283
  {
284
284
  class: `
285
285
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -290,11 +290,11 @@ const q = j(({ src: n, alt: t }) => n ? _({
290
290
  click: t,
291
291
  "aria-label": `${n} month`,
292
292
  variant: "icon",
293
- icon: n === "Previous" ? T.chevron.single.left : T.chevron.single.right
293
+ icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
294
294
  }
295
295
  ), lt = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => l({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
296
- m({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
297
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
296
+ f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
297
+ f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
298
298
  R({ label: "Previous", click: a }),
299
299
  R({ label: "Next", click: e })
300
300
  ]), ht = (n) => l(
@@ -330,7 +330,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
330
330
  return l(
331
331
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
332
332
  s.map(
333
- (r) => m(
333
+ (r) => f(
334
334
  {
335
335
  click: (h) => {
336
336
  h.preventDefault(), h.stopPropagation(), e(r);
@@ -402,7 +402,7 @@ class Nt extends O {
402
402
  * @returns {string}
403
403
  */
404
404
  getMonthName(t) {
405
- return P.monthNames[t];
405
+ return T.monthNames[t];
406
406
  }
407
407
  /**
408
408
  * This will go to the previous month.
@@ -495,7 +495,7 @@ class Nt extends O {
495
495
  ]);
496
496
  }
497
497
  }
498
- const W = ({ label: n, click: t }) => m(
498
+ const W = ({ label: n, click: t }) => f(
499
499
  {
500
500
  class: `
501
501
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -506,11 +506,11 @@ const W = ({ label: n, click: t }) => m(
506
506
  click: t,
507
507
  "aria-label": `${n} month`,
508
508
  variant: "icon",
509
- icon: n === "Previous" ? T.chevron.single.left : T.chevron.single.right
509
+ icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
510
510
  }
511
511
  ), mt = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => l({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
512
- m({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
513
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
512
+ f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
513
+ f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
514
514
  W({ label: "Previous", click: a }),
515
515
  W({ label: "Next", click: e })
516
516
  ]), ft = (n) => l({ class: "h-9 flex items-center justify-center font-medium" }, n), pt = () => l(
@@ -518,21 +518,21 @@ const W = ({ label: n, click: t }) => m(
518
518
  ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ft)
519
519
  ), yt = ({ day: n, iso: t, disabled: e, isStart: a, isEnd: s, isBetween: r, isOtherMonth: h, 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"), h && (g += " text-muted-foreground opacity-50"), m(
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"), h && (g += " text-muted-foreground opacity-50"), f(
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
525
  disabled: e,
526
- click: () => {
527
- e || i();
526
+ click: (m) => {
527
+ m.preventDefault(), m.stopPropagation(), e || i();
528
528
  }
529
529
  },
530
530
  n.toString()
531
531
  );
532
532
  }, Dt = ({ today: n, current: t, blockPriorDates: e, onDateClick: a }) => {
533
- const { start: s, end: r } = t, h = 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;
533
+ const { start: s, end: r } = t, h = 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;
534
534
  for (let c = h - 1; c >= 0; c--) {
535
- const o = C - c, u = w(f, g, o), p = new Date(f, 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(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;
536
536
  d.push({
537
537
  day: o,
538
538
  iso: u,
@@ -612,8 +612,8 @@ const W = ({ label: n, click: t }) => m(
612
612
  })
613
613
  ])), wt = ({ currentMonth: n, currentYear: t, onSelect: e }) => l(
614
614
  { class: "grid grid-cols-3 gap-2" },
615
- P.monthNames.map(
616
- (a, s) => m(
615
+ T.monthNames.map(
616
+ (a, s) => f(
617
617
  {
618
618
  click: (r) => {
619
619
  r.preventDefault(), r.stopPropagation(), e(s);
@@ -625,14 +625,14 @@ const W = ({ label: n, click: t }) => m(
625
625
  )
626
626
  )
627
627
  ), vt = ({ start: n, end: t, selecting: e, onSelectStart: a, onSelectEnd: s }) => l({ class: "flex space-x-2 mb-4" }, [
628
- z("selecting", (r) => m({
628
+ z("selecting", (r) => f({
629
629
  click: a,
630
630
  variant: r === "start" ? "primary" : "outline",
631
631
  class: "flex-1"
632
632
  }, [
633
633
  l({ class: "font-medium" }, E("current.start", "Start Date"))
634
634
  ])),
635
- z("selecting", (r) => m({
635
+ z("selecting", (r) => f({
636
636
  click: s,
637
637
  variant: r === "end" ? "primary" : "outline",
638
638
  class: "flex-1"
@@ -647,7 +647,7 @@ const W = ({ label: n, click: t }) => m(
647
647
  return l(
648
648
  { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
649
649
  a.map(
650
- (s) => m(
650
+ (s) => f(
651
651
  {
652
652
  click: (r) => {
653
653
  r.preventDefault(), r.stopPropagation(), t(s);
@@ -701,7 +701,7 @@ class Yt extends O {
701
701
  * @returns {string}
702
702
  */
703
703
  getMonthName(t) {
704
- return P.monthNames[t];
704
+ return T.monthNames[t];
705
705
  }
706
706
  /**
707
707
  * Initialize component state.
@@ -793,8 +793,12 @@ class Yt extends O {
793
793
  current: e,
794
794
  blockPriorDates: this.blockPriorDates,
795
795
  onDateClick: (i) => this.handleClick(i),
796
- onMonthClick: () => this.state.view = "months",
797
- onYearClick: () => this.state.view = "years",
796
+ onMonthClick: (i) => {
797
+ i.preventDefault(), i.stopPropagation(), this.state.view = "months";
798
+ },
799
+ onYearClick: (i) => {
800
+ i.preventDefault(), i.stopPropagation(), this.state.view = "years";
801
+ },
798
802
  next: () => {
799
803
  const i = this.data.current, d = i.month === 11 ? { month: 0, year: i.year + 1 } : { month: i.month + 1, year: i.year };
800
804
  this.setCurrent(d);
@@ -810,12 +814,12 @@ class Yt extends O {
810
814
  }
811
815
  }
812
816
  export {
813
- Pt as A,
817
+ Tt as A,
814
818
  ct as C,
815
819
  N as D,
816
820
  w as F,
817
821
  dt as M,
818
- Tt as P,
822
+ Pt as P,
819
823
  Yt as R,
820
824
  ht as a,
821
825
  Nt as b,
@@ -4,7 +4,7 @@ import { B as T, I as _ } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as x } 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-CMjx5-IX.js";
7
- import { A as oe, P as le } from "./range-calendar-ZAHrVCgV.js";
7
+ import { A as oe, P as le } from "./range-calendar-ppUinoRx.js";
8
8
  d((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.233",
3
+ "version": "1.0.234",
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": {