@base-framework/ui 1.0.123 → 1.0.125

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/atoms.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { B as e, C as t, a as n, F as o, L as p, P as r, R as u, S as I, b as i, T as l } from "./tooltip-DcnXGw52.js";
2
- import { B as m, I as T, L as c } from "./buttons-b7sffMwX.js";
2
+ import { B as m, I as T, L as c } from "./buttons-DBxnNW9z.js";
3
3
  import { C as B, d as C, D as S, c as g, E as b, F as f, H as h, I as F, M as L, N as P, P as R, R as k, S as D, T as V, a as E, b as H, U as M, W as N } from "./inputs-Dmu4Z-7-.js";
4
4
  import { V as W, a as w } from "./veil-D4dRxILB.js";
5
5
  export {
@@ -0,0 +1,62 @@
1
+ import { I as m, Button as r } from "@base-framework/atoms";
2
+ import { Atom as i } from "@base-framework/base";
3
+ import { Icons as h } from "./icons.es.js";
4
+ const w = {
5
+ xs: "w-4 h-4",
6
+ sm: "w-6 h-6",
7
+ md: "w-8 h-8",
8
+ lg: "w-10 h-10",
9
+ xl: "w-12 h-12",
10
+ "2xl": "w-14 h-14",
11
+ "3xl": "w-16 h-16"
12
+ }, l = i((n, t) => {
13
+ var c;
14
+ const a = w[n.size || "sm"];
15
+ return m({
16
+ ...n,
17
+ class: `stroke-current icon-size ${a} ${n.class || ""}`,
18
+ html: (c = t[0]) == null ? void 0 : c.textContent
19
+ });
20
+ }), s = (n) => i((t, a) => r({
21
+ ...n,
22
+ ...t,
23
+ class: `bttn ${n.class} ${t.class || ""}`
24
+ }, a)), u = i(
25
+ (n, t) => r({
26
+ ...n,
27
+ class: n.class
28
+ }, [
29
+ n.icon && n.position !== "right" ? l({ size: "sm", class: n.animation ?? null }, n.icon) : null,
30
+ ...t || [],
31
+ n.icon && n.position === "right" ? l({ size: "sm", class: n.animation ?? null }, n.icon) : null
32
+ ])
33
+ ), o = (n) => i((t, a) => u({
34
+ ...n,
35
+ ...t,
36
+ class: `bttn ${n.class} ${t.class || ""}`
37
+ }, a)), g = (n) => () => {
38
+ if (n.allowHistory !== !1 && globalThis.history.length > 2) {
39
+ globalThis.history.back();
40
+ return;
41
+ }
42
+ n.backUrl && app.navigate(n.backUrl);
43
+ }, k = (n) => i((t, a) => (t.icon = t.icon || h.arrows.left, t.click = t.click || g(t), u({
44
+ ...n,
45
+ ...t
46
+ }, a))), e = {
47
+ primary: s({ class: "primary" }),
48
+ secondary: s({ class: "secondary" }),
49
+ destructive: s({ class: "destructive" }),
50
+ warning: s({ class: "warning" }),
51
+ outline: s({ class: "outline" }),
52
+ ghost: s({ class: "ghost" }),
53
+ link: s({ class: "link" }),
54
+ icon: o({ class: "icon" }),
55
+ withIcon: o({ class: "with-icon" }),
56
+ back: k({ class: "with-icon back-button" })
57
+ }, b = i((n, t) => (e[n.variant] || e.primary)(n, t)), $ = i((n, t) => b({ ...n, variant: "withIcon", icon: h.loading, animation: "animate-spin" }, t));
58
+ export {
59
+ b as B,
60
+ l as I,
61
+ $ as L
62
+ };
@@ -1,6 +1,6 @@
1
1
  import { Div as i, Img as I, Span as M, Button as Y } from "@base-framework/atoms";
2
2
  import { Component as N, Data as z, Atom as k, DateTime as j } from "@base-framework/base";
3
- import { B as A } from "./buttons-b7sffMwX.js";
3
+ import { B as A } from "./buttons-DBxnNW9z.js";
4
4
  import { Icons as T } from "./icons.es.js";
5
5
  const W = (e, t) => {
6
6
  const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, s = t.getBoundingClientRect(), o = 10, a = globalThis.scrollX, l = globalThis.scrollY;
@@ -1,7 +1,7 @@
1
1
  import { Div as n, H5 as _, P as b, I as g, Li as O, Span as a, Ul as V, Button as m, OnState as v, Label as W, Form as R, H2 as A, Header as B, Footer as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, UseParent as Q, Time as X, Dialog as Z } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as p, Html as L, Dom as ee, base as te, Data as k, Builder as U, Jot as S, DateTime as $ } from "@base-framework/base";
3
- import { P as D, b as se } from "./calendar-CcG03Nuz.js";
4
- import { B as h, I as x } from "./buttons-b7sffMwX.js";
3
+ import { P as D, b as se } from "./calendar-C-Q8HfEd.js";
4
+ import { B as h, I as x } from "./buttons-DBxnNW9z.js";
5
5
  import { Icons as u } from "./icons.es.js";
6
6
  import { a as w } from "./veil-D4dRxILB.js";
7
7
  import { Timer as oe, List as ne, DynamicTime as re } from "@base-framework/organisms";
package/dist/index.es.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { B as e, C as o, a as t, F as r, L as n, P as i, R as l, S as p, b as u, T as m } from "./tooltip-DcnXGw52.js";
2
- import { B as g, I as T, L as c } from "./buttons-b7sffMwX.js";
2
+ import { B as g, I as T, L as c } from "./buttons-DBxnNW9z.js";
3
3
  import { C as b, d as D, D as S, c as I, E as B, F as P, H as F, I as M, M as k, N, P as v, R as f, S as x, T as h, a as y, b as W, U as L, W as A } from "./inputs-Dmu4Z-7-.js";
4
4
  import { V as w, a as U } from "./veil-D4dRxILB.js";
5
5
  import { Icons as R } from "./icons.es.js";
6
- import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-DIBbSGy_.js";
7
- import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-CcG03Nuz.js";
8
- import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-CuUlwQzE.js";
9
- import { B as cs, I as Cs, M as bs, d as Ds, e as Ss, g as Is, N as Bs, b as Ps, a as Fs, f as Ms, P as ks, c as Ns, S as vs, T as fs } from "./mobile-nav-wrapper-m9eu2YJR.js";
10
- import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-B1YSAs3o.js";
6
+ import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-CmraTk2b.js";
7
+ import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-C-Q8HfEd.js";
8
+ import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-D79X5PfB.js";
9
+ import { B as cs, I as Cs, M as bs, d as Ds, e as Ss, g as Is, N as Bs, b as Ps, a as Fs, f as Ms, P as ks, c as Ns, S as vs, T as fs } from "./mobile-nav-wrapper-D5dogVoU.js";
10
+ import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-BwwTkxUW.js";
11
11
  import { A as Es, F as Gs, M as Vs, a as js, T as qs } from "./aside-template-McEj_Gxc.js";
12
12
  import { B as Js } from "./bside-template-Du2m3rsE.js";
13
13
  export {
@@ -1,6 +1,6 @@
1
1
  import { Button as w, I as S, Label as B, Span as N, Ul as o, H4 as L, Nav as p, Div as l, Header as C, H1 as y, H3 as h, OnState as P, UseParent as I } from "@base-framework/atoms";
2
2
  import { Component as n, Atom as i, NavLink as $, router as u } from "@base-framework/base";
3
- import { I as f, B as x } from "./buttons-b7sffMwX.js";
3
+ import { I as f, B as x } from "./buttons-DBxnNW9z.js";
4
4
  import { Icons as r } from "./icons.es.js";
5
5
  class H extends n {
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-DIBbSGy_.js";
2
- import { A as O, P as R, g as _ } from "./calendar-CcG03Nuz.js";
1
+ import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-CmraTk2b.js";
2
+ import { A as O, P as R, g as _ } from "./calendar-C-Q8HfEd.js";
3
3
  export {
4
4
  o as Alert,
5
5
  O as Avatar,
@@ -1,6 +1,6 @@
1
- import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-CuUlwQzE.js";
2
- import { b as L, C as O, D as F, a as U, F as G, M as j, c as q, p as w } from "./calendar-CcG03Nuz.js";
3
- import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-m9eu2YJR.js";
1
+ import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-D79X5PfB.js";
2
+ import { b as L, C as O, D as F, a as U, F as G, M as j, c as q, p as w } from "./calendar-C-Q8HfEd.js";
3
+ import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-D5dogVoU.js";
4
4
  export {
5
5
  s as BackButton,
6
6
  A as Backdrop,
package/dist/pages.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-B1YSAs3o.js";
1
+ import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-BwwTkxUW.js";
2
2
  export {
3
3
  s as BasicPage,
4
4
  P as BlankPage,
@@ -1,7 +1,7 @@
1
1
  import { Div as t, Header as n, H1 as d, P as o } from "@base-framework/atoms";
2
2
  import { F as l, A as h } from "./aside-template-McEj_Gxc.js";
3
3
  import { Component as x, Atom as i } from "@base-framework/base";
4
- import { c as u, e as p } from "./mobile-nav-wrapper-m9eu2YJR.js";
4
+ import { c as u, e as p } from "./mobile-nav-wrapper-D5dogVoU.js";
5
5
  class c extends x {
6
6
  /**
7
7
  * This will declare the props for the compiler.
@@ -1,10 +1,10 @@
1
- import { Button as y, Div as o, On as F, Span as v, Th as R, UseParent as E, I as H, Thead as Q, Tr as X, Table as W, P as p, Li as D, Time as q, Nav as S, Ul as w, Section as P, Canvas as K } from "@base-framework/atoms";
2
- import { Atom as d, Component as h, Data as L, DateTime as G, router as x, NavLink as O, DataTracker as z, Jot as V, base as I, Dom as T } from "@base-framework/base";
3
- import { B as C, I as N } from "./buttons-b7sffMwX.js";
4
- import { Icons as b } from "./icons.es.js";
1
+ import { Button as y, Div as o, On as Y, Span as v, Th as R, UseParent as F, I as E, Thead as H, Tr as Q, Table as W, P as p, Li as D, Time as X, Nav as S, Ul as b, Section as P, Canvas as q } from "@base-framework/atoms";
2
+ import { Atom as d, Component as h, Data as L, DateTime as K, router as x, NavLink as O, DataTracker as z, Jot as G, base as I, Dom as T } from "@base-framework/base";
3
+ import { B as C, I as V } from "./buttons-DBxnNW9z.js";
4
+ import { Icons as k } from "./icons.es.js";
5
5
  import { TableBody as _, ScrollableTableBody as J, List as Z, IntervalTimer as ee } from "@base-framework/organisms";
6
6
  import { C as te, I as se, H as ae } from "./inputs-Dmu4Z-7-.js";
7
- import { A as ie, P as ne } from "./calendar-CcG03Nuz.js";
7
+ import { A as ie, P as ne } from "./calendar-C-Q8HfEd.js";
8
8
  d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
@@ -95,15 +95,15 @@ const oe = (t) => {
95
95
  }, ue = (t, e) => {
96
96
  const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = re(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = ce(t, e, u), f = [...i, ...n, ...c], g = [];
97
97
  for (let r = 0; r < f.length; r += 7) {
98
- const m = f.slice(r, r + 7), k = m.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: U } = le(k);
98
+ const m = f.slice(r, r + 7), w = m.find((U) => U) || new Date(t, e, 1), { weekNumber: j, year: A } = le(w);
99
99
  g.push({
100
- weekNumber: A,
101
- year: U,
100
+ weekNumber: j,
101
+ year: A,
102
102
  days: m
103
103
  });
104
104
  }
105
105
  return g;
106
- }, fe = ({ selectWeek: t }) => F("month", (e, s, { data: a }) => {
106
+ }, fe = ({ selectWeek: t }) => Y("month", (e, s, { data: a }) => {
107
107
  const { year: i, month: n, currentDate: l } = a, u = ue(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
@@ -165,7 +165,7 @@ const oe = (t) => {
165
165
  click: e,
166
166
  "aria-label": `${t} month`,
167
167
  variant: "icon",
168
- icon: t === "Previous" ? b.chevron.single.left : b.chevron.single.right
168
+ icon: t === "Previous" ? k.chevron.single.left : k.chevron.single.right
169
169
  }
170
170
  ), ge = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
171
  v("[[monthName]] [[year]]"),
@@ -231,7 +231,7 @@ class at extends h {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(e) {
234
- return G.monthNames[e];
234
+ return K.monthNames[e];
235
235
  }
236
236
  /**
237
237
  * Updates the calendar to show the previous month.
@@ -300,7 +300,7 @@ const me = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
302
  }, pe = (t) => R({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- E((e) => new te({ class: "mr-2", onChange: (s, a) => me(e, a) }))
303
+ F((e) => new te({ class: "mr-2", onChange: (s, a) => me(e, a) }))
304
304
  ]), be = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
306
  return R({
@@ -309,11 +309,11 @@ const me = (t, e) => {
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
311
  v(a),
312
- e && H({ class: "ml-2", html: b.arrows.upDown })
312
+ e && E({ class: "ml-2", html: k.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, $ = (t) => Q([
316
- X({
315
+ }, N = (t) => H([
316
+ Q({
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
@@ -333,7 +333,7 @@ const me = (t, e) => {
333
333
  rowItem: (i) => a(i, s),
334
334
  class: "divide-y divide-border"
335
335
  });
336
- class ke extends h {
336
+ class xe extends h {
337
337
  /**
338
338
  * Initializes component data.
339
339
  *
@@ -404,7 +404,7 @@ class ke extends h {
404
404
  o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
405
405
  W({ class: "w-full" }, [
406
406
  // @ts-ignore
407
- this.headers && $({ headers: this.headers, sort: (a) => this.sortRows(a) }),
407
+ this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
408
408
  // @ts-ignore
409
409
  this.customHeader ?? null,
410
410
  we({
@@ -480,7 +480,7 @@ class ke extends h {
480
480
  this.data.selectedRows = [];
481
481
  }
482
482
  }
483
- const xe = (t) => new J({
483
+ const ke = (t) => new J({
484
484
  cache: "list",
485
485
  scrollContainer: t.scrollContainer,
486
486
  loadMoreItems: t.loadMoreItems,
@@ -492,7 +492,7 @@ const xe = (t) => new J({
492
492
  rowItem: (e) => t.rowItem(e, t.selectRow),
493
493
  class: "divide-y divide-border"
494
494
  });
495
- class ye extends ke {
495
+ class ye extends xe {
496
496
  /**
497
497
  * Renders the DataTable component.
498
498
  *
@@ -504,10 +504,10 @@ class ye extends ke {
504
504
  o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
505
505
  W({ class: "w-full" }, [
506
506
  // @ts-ignore
507
- this.headers && $({ headers: this.headers, sort: (a) => this.sortRows(a) }),
507
+ this.headers && N({ headers: this.headers, sort: (a) => this.sortRows(a) }),
508
508
  // @ts-ignore
509
509
  this.customHeader ?? null,
510
- xe({
510
+ ke({
511
511
  // @ts-ignore
512
512
  scrollContainer: this.scrollContainer,
513
513
  // @ts-ignore
@@ -567,7 +567,7 @@ const it = d((t) => new ye(
567
567
  p({ class: "text-xs leading-5 text-gray-500" }, "Online")
568
568
  ]), Se = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
569
569
  v("Last seen "),
570
- q({ datetime: t }, "3h ago")
570
+ X({ datetime: t }, "3h ago")
571
571
  ]), Le = (t, e) => t === "online" ? De() : Se(e), Ce = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
572
572
  p({ class: "text-sm leading-6 m-0" }, t),
573
573
  Le(s, e)
@@ -619,7 +619,7 @@ class ot extends h {
619
619
  return S(
620
620
  { class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
621
621
  [
622
- w({
622
+ b({
623
623
  class: "flex space-x-4",
624
624
  map: [this.options, (e) => this.addLink(e)],
625
625
  watch: {
@@ -696,22 +696,10 @@ class ot extends h {
696
696
  const lt = d((t) => {
697
697
  const e = t.margin || "m-4 ml-0";
698
698
  return o({ class: `flex-none ${e}` }, [
699
- C({
700
- variant: "icon",
701
- class: "back-button",
702
- click: () => {
703
- if (globalThis.history.length > 2) {
704
- globalThis.history.back();
705
- return;
706
- }
707
- t.backUrl && app.navigate(t.backUrl);
708
- }
709
- }, [
710
- N(b.arrows.left)
711
- ])
699
+ C({ variant: "back", class: "ghost" })
712
700
  ]);
713
701
  });
714
- class j extends h {
702
+ class $ extends h {
715
703
  /**
716
704
  * This will declare the props for the compiler.
717
705
  *
@@ -804,7 +792,7 @@ z.addType("dockableOverlay", (t) => {
804
792
  const e = t.component;
805
793
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
806
794
  });
807
- class rt extends j {
795
+ class rt extends $ {
808
796
  /**
809
797
  * This will stop presistence.
810
798
  *
@@ -913,7 +901,7 @@ class rt extends j {
913
901
  document.documentElement.style.overflowY = "auto";
914
902
  }
915
903
  }
916
- class ct extends j {
904
+ class ct extends $ {
917
905
  /**
918
906
  * This will get the overlay type.
919
907
  *
@@ -941,7 +929,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
941
929
  }]
942
930
  ],
943
931
  click: () => e(t)
944
- }, a)), Pe = d(({ selectOption: t, state: e }) => w({
932
+ }, a)), Pe = d(({ selectOption: t, state: e }) => b({
945
933
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
946
934
  for: ["filteredOptions", (s, a) => We({ index: a, click: t, state: e }, s.label)]
947
935
  })), Oe = d((t) => o({ class: "relative flex items-center" }, [
@@ -956,7 +944,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
956
944
  keydown: (e) => typeof t.handleKeyDown == "function" && t.handleKeyDown(e)
957
945
  }),
958
946
  t.icon && o({ class: "absolute right-0 mr-2" }, [
959
- N(t.icon)
947
+ V(t.icon)
960
948
  ])
961
949
  ])), ze = (t) => o({
962
950
  class: "relative flex fle-auto flex-col",
@@ -971,7 +959,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
971
959
  Pe(t)
972
960
  ]);
973
961
  }]
974
- }), dt = V(
962
+ }), dt = G(
975
963
  {
976
964
  /**
977
965
  * This will set up the data object.
@@ -1104,7 +1092,7 @@ const We = d(({ index: t, click: e, state: s }, a) => D({
1104
1092
  }, t.label)
1105
1093
  ]
1106
1094
  ), $e = (t, e) => (t.callBack = e, Ne(t)), je = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1107
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => $e(e, t.callBack)] })
1095
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => $e(e, t.callBack)] })
1108
1096
  ]);
1109
1097
  class ht extends h {
1110
1098
  /**
@@ -1208,7 +1196,7 @@ const Ae = (t) => D(
1208
1196
  }, t.label)
1209
1197
  ]
1210
1198
  ), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1211
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1199
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1212
1200
  ]);
1213
1201
  class ut extends h {
1214
1202
  /**
@@ -1285,7 +1273,7 @@ class Qe extends h {
1285
1273
  */
1286
1274
  render() {
1287
1275
  return S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1288
- w({
1276
+ b({
1289
1277
  class: "flex flex-auto flex-row",
1290
1278
  map: [this.options, (e) => this.addLink(e)],
1291
1279
  watch: {
@@ -1422,7 +1410,7 @@ class Xe extends h {
1422
1410
  * @returns {object} Layout definition for the canvas.
1423
1411
  */
1424
1412
  render() {
1425
- return K({
1413
+ return q({
1426
1414
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1427
1415
  });
1428
1416
  }
@@ -1553,8 +1541,8 @@ class Xe extends h {
1553
1541
  const e = this.canvas, s = this.container, a = T.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1554
1542
  let u = n + "px", c = l + "px";
1555
1543
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1556
- const f = a.width, g = a.height, r = f / n, m = g / l, k = Math.min(r, m);
1557
- u = n * k + "px", c = l * k + "px";
1544
+ const f = a.width, g = a.height, r = f / n, m = g / l, w = Math.min(r, m);
1545
+ u = n * w + "px", c = l * w + "px";
1558
1546
  }
1559
1547
  e.style.width = u, e.style.height = c;
1560
1548
  }
@@ -1655,7 +1643,7 @@ class gt extends h {
1655
1643
  o({ class: "absolute top-2 right-2" }, [
1656
1644
  C({
1657
1645
  variant: "icon",
1658
- icon: b.circleX,
1646
+ icon: k.circleX,
1659
1647
  click: this.reset.bind(this)
1660
1648
  })
1661
1649
  ]),
@@ -1715,10 +1703,10 @@ export {
1715
1703
  be as H,
1716
1704
  ct as I,
1717
1705
  ot as N,
1718
- j as O,
1706
+ $ as O,
1719
1707
  et as P,
1720
1708
  it as S,
1721
- $ as T,
1709
+ N as T,
1722
1710
  Te as U,
1723
1711
  at as W,
1724
1712
  ce as a,
@@ -1730,7 +1718,7 @@ export {
1730
1718
  re as g,
1731
1719
  fe as h,
1732
1720
  ge as i,
1733
- ke as j,
1721
+ xe as j,
1734
1722
  nt as k,
1735
1723
  rt as l,
1736
1724
  dt as m,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.123",
3
+ "version": "1.0.125",
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": {
@@ -1,47 +0,0 @@
1
- import { I as m, Button as r } from "@base-framework/atoms";
2
- import { Atom as a } from "@base-framework/base";
3
- import { Icons as u } from "./icons.es.js";
4
- const h = {
5
- xs: "w-4 h-4",
6
- sm: "w-6 h-6",
7
- md: "w-8 h-8",
8
- lg: "w-10 h-10",
9
- xl: "w-12 h-12",
10
- "2xl": "w-14 h-14",
11
- "3xl": "w-16 h-16"
12
- }, o = a((t, n) => {
13
- var c;
14
- const i = h[t.size || "sm"];
15
- return m({
16
- ...t,
17
- class: `stroke-current icon-size ${i} ${t.class || ""}`,
18
- html: (c = n[0]) == null ? void 0 : c.textContent
19
- });
20
- }), s = (t) => a((n, i) => r({
21
- ...t,
22
- ...n,
23
- class: `bttn ${t.class} ${n.class || ""}`
24
- }, i)), l = (t) => a((n, i) => r({
25
- ...t,
26
- ...n,
27
- class: `bttn ${t.class} ${n.class || ""}`
28
- }, [
29
- n.icon && n.position !== "right" ? o({ size: "sm", class: n.animation ?? null }, n.icon) : null,
30
- ...i || [],
31
- n.icon && n.position === "right" ? o({ size: "sm", class: n.animation ?? null }, n.icon) : null
32
- ])), e = {
33
- primary: s({ class: "primary" }),
34
- secondary: s({ class: "secondary" }),
35
- destructive: s({ class: "destructive" }),
36
- warning: s({ class: "warning" }),
37
- outline: s({ class: "outline" }),
38
- ghost: s({ class: "ghost" }),
39
- link: s({ class: "link" }),
40
- icon: l({ class: "icon" }),
41
- withIcon: l({ class: "with-icon" })
42
- }, w = a((t, n) => (e[t.variant] || e.primary)(t, n)), $ = a((t, n) => w({ ...t, variant: "withIcon", icon: u.loading, animation: "animate-spin" }, n));
43
- export {
44
- w as B,
45
- o as I,
46
- $ as L
47
- };