@base-framework/ui 1.0.2033 → 1.1.0

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, F as o, L as r, P as n, R as p, S as I, a as u, T as i } from "./tooltip-Czvqmxt3.js";
2
- import { B as d, I as m, L as x } from "./buttons-C5VyfDUa.js";
2
+ import { B as d, I as m, L as x } from "./buttons-CfwtbIR-.js";
3
3
  import { C as T, F as g } from "./form-group-BB7dLJir.js";
4
4
  import { C as F, d as c, D as f, c as L, E as P, F as R, H as S, I as b, M as h, N as k, P as D, R as V, T as E, a as G, b as H, U as M, W as N } from "./inputs-9udyzkHR.js";
5
5
  import { I as W, V as w, a as J } from "./image-BB__4s0g.js";
@@ -0,0 +1,61 @@
1
+ import { I as h, Button as e } from "@base-framework/atoms";
2
+ import { Atom as s } from "@base-framework/base";
3
+ import { Icons as r } from "./icons.es.js";
4
+ const m = {
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
+ }, c = s((n, t) => {
13
+ const a = m[n.size || "sm"];
14
+ return h({
15
+ ...n,
16
+ class: `stroke-current icon-size ${a} ${n.class || ""}`,
17
+ html: t[0]?.textContent
18
+ });
19
+ }), i = (n) => s((t, a) => e({
20
+ ...n,
21
+ ...t,
22
+ class: `bttn ${n.class} ${t.class || ""}`
23
+ }, a)), u = s(
24
+ (n, t) => e({
25
+ ...n,
26
+ class: n.class
27
+ }, [
28
+ n.icon && n.position !== "right" ? c({ size: "sm", class: n.animation ?? null }, n.icon) : null,
29
+ ...t || [],
30
+ n.icon && n.position === "right" ? c({ size: "sm", class: n.animation ?? null }, n.icon) : null
31
+ ])
32
+ ), l = (n) => s((t, a) => u({
33
+ ...n,
34
+ ...t,
35
+ class: `bttn ${n.class} ${t.class || ""}`
36
+ }, a)), w = (n) => () => {
37
+ if (n.allowHistory === !0 && globalThis.history.length > 2) {
38
+ globalThis.history.back();
39
+ return;
40
+ }
41
+ n.backUrl && app.navigate(n.backUrl);
42
+ }, g = (n) => s((t, a) => (t.icon = t.icon || r.arrows.left, t.click = t.click || w(t), u({
43
+ ...n,
44
+ ...t
45
+ }, a))), o = {
46
+ primary: i({ class: "primary" }),
47
+ secondary: i({ class: "secondary" }),
48
+ destructive: i({ class: "destructive" }),
49
+ warning: i({ class: "warning" }),
50
+ outline: i({ class: "outline" }),
51
+ ghost: i({ class: "ghost" }),
52
+ link: i({ class: "link" }),
53
+ icon: l({ class: "icon" }),
54
+ withIcon: l({ class: "with-icon" }),
55
+ back: g({ class: "with-icon back-button" })
56
+ }, k = s((n, t) => (o[n.variant] || o.primary)(n, t)), y = s((n, t) => k({ ...n, variant: "withIcon", icon: r.loading, animation: "animate-spin" }, t));
57
+ export {
58
+ k as B,
59
+ c as I,
60
+ y as L
61
+ };
@@ -1,8 +1,8 @@
1
1
  import { Div as n, H5 as Z, P as b, I as x, Li as H, Span as a, Ul as q, Button as f, OnState as T, Label as P, H2 as S, Form as tt, Header as I, Footer as L, A as V, H3 as et, Checkbox as st, Input as m, Img as G, Nav as ot, UseParent as W, OnStateOpen as O, Time as nt, Dialog as rt } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as w, Html as A, Dom as it, base as lt, Data as B, Builder as _, Jot as C, Events as p, DateTime as M } from "@base-framework/base";
3
- import { P as D, b as at, R as ct } from "./range-calendar-3gAH1uQy.js";
3
+ import { P as D, b as at, R as ct } from "./range-calendar-CAwPjNM3.js";
4
4
  import { C as dt, F as ut } from "./form-group-BB7dLJir.js";
5
- import { B as h, I as g } from "./buttons-C5VyfDUa.js";
5
+ import { B as h, I as g } from "./buttons-CfwtbIR-.js";
6
6
  import { Icons as u } from "./icons.es.js";
7
7
  import { Timer as ht, List as mt, DynamicTime as ft } from "@base-framework/organisms";
8
8
  import { a as v } from "./image-BB__4s0g.js";
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-Czvqmxt3.js";
2
- import { B as u, I as g, L as C } from "./buttons-C5VyfDUa.js";
2
+ import { B as u, I as g, L as C } from "./buttons-CfwtbIR-.js";
3
3
  import { C as T, F as b } from "./form-group-BB7dLJir.js";
4
4
  import { C as D, d as S, D as F, c as B, E as P, F as k, H as M, I as x, M as f, N as v, P as N, R as y, T as h, a as U, b as L, U as W, W as w } from "./inputs-9udyzkHR.js";
5
5
  import { I as R, V as A, a as G } from "./image-BB__4s0g.js";
6
6
  import { Icons as E } from "./icons.es.js";
7
- import { A as j, B as q, C as J, x as z, O as K, z as Q, E as _, G as X, H as Y, D as Z, m as $, n as aa, R as ea, Q as sa, w as oa, o as ta, c as ra, a as na, b as la, U as ia, l as pa, g as ma, i as da, h as ua, j as ga, e as Ca, k as ca, F as Ta, d as ba, f as Ia, I as Da, L as Sa, y as Fa, M as Ba, p as Pa, N as ka, P as Ma, t as xa, u as fa, S as va, r as Na, s as ya, T as ha, J as Ua, K as La, q as Wa, v as wa } from "./empty-state-B39KBcM4.js";
8
- import { A as Ra, b as Aa, C as Ga, D as Oa, a as Ea, F as Va, M as ja, P as qa, R as Ja, c as za, g as Ka, p as Qa } from "./range-calendar-3gAH1uQy.js";
9
- import { B as Xa, p as Ya, C as Za, j as $a, D as ae, m as ee, k as se, H as oe, I as te, N as re, O as ne, P as le, S as ie, n as pe, o as me, x as de, s as ue, q as ge, r as Ce, T as ce, t as Te, w as be, u as Ie, v as De, l as Se, U as Fe, W as Be, f as Pe, h as ke, i as Me, c as xe, d as fe, b as ve, e as Ne, a as ye, g as he } from "./signature-panel-C0P0sYS7.js";
10
- import { B as Le, I as We, M as we, d as He, e as Re, g as Ae, N as Ge, b as Oe, a as Ee, f as Ve, P as je, c as qe, S as Je, T as ze } from "./mobile-nav-wrapper-C9M9gHda.js";
11
- import { B as Qe, a as _e, C as Xe, F as Ye, b as Ze, c as $e, M as as, P as es, S as ss } from "./sidebar-menu-page-D63AOy_k.js";
7
+ import { A as j, B as q, C as J, x as z, O as K, z as Q, E as _, G as X, H as Y, D as Z, m as $, n as aa, R as ea, Q as sa, w as oa, o as ta, c as ra, a as na, b as la, U as ia, l as pa, g as ma, i as da, h as ua, j as ga, e as Ca, k as ca, F as Ta, d as ba, f as Ia, I as Da, L as Sa, y as Fa, M as Ba, p as Pa, N as ka, P as Ma, t as xa, u as fa, S as va, r as Na, s as ya, T as ha, J as Ua, K as La, q as Wa, v as wa } from "./empty-state-DdZZgWGr.js";
8
+ import { A as Ra, b as Aa, C as Ga, D as Oa, a as Ea, F as Va, M as ja, P as qa, R as Ja, c as za, g as Ka, p as Qa } from "./range-calendar-CAwPjNM3.js";
9
+ import { B as Xa, p as Ya, C as Za, j as $a, D as ae, m as ee, k as se, H as oe, I as te, N as re, O as ne, P as le, S as ie, n as pe, o as me, x as de, s as ue, q as ge, r as Ce, T as ce, t as Te, w as be, u as Ie, v as De, l as Se, U as Fe, W as Be, f as Pe, h as ke, i as Me, c as xe, d as fe, b as ve, e as Ne, a as ye, g as he } from "./signature-panel-C5pdGkvG.js";
10
+ import { B as Le, I as We, M as we, d as He, e as Re, g as Ae, N as Ge, b as Oe, a as Ee, f as Ve, P as je, c as qe, S as Je, T as ze } from "./mobile-nav-wrapper-jUpomqyU.js";
11
+ import { B as Qe, a as _e, C as Xe, F as Ye, b as Ze, c as $e, M as as, P as es, S as ss } from "./sidebar-menu-page-Dldug2Ff.js";
12
12
  import { A as ts, F as rs, M as ns, a as ls, T as is } from "./aside-template-sUm-F2f0.js";
13
13
  import { B as ms } from "./bside-template-do_hXebn.js";
14
14
  import { F as us, c as gs } from "./format-BmrNQptv.js";
@@ -1,6 +1,6 @@
1
1
  import { Button as S, I as B, Label as N, Span as L, Ul as o, H4 as C, Nav as p, Div as l, Header as y, H1 as P, H3 as h, OnState as I, UseParent as $ } from "@base-framework/atoms";
2
2
  import { Component as n, Atom as i, NavLink as H, router as d } from "@base-framework/base";
3
- import { I as f, B as x } from "./buttons-C5VyfDUa.js";
3
+ import { I as f, B as x } from "./buttons-CfwtbIR-.js";
4
4
  import { Icons as r } from "./icons.es.js";
5
5
  class M extends n {
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { A as s, B as t, C as r, x as e, O as i, z as n, E as m, G as l, H as d, D as C, m as p, n as D, R as S, Q as g, w as u, o as c, c as F, a as T, b as P, U as w, l as A, g as I, i as f, h as b, j as y, e as B, k as M, F as U, d as k, f as x, I as L, L as R, y as v, M as E, p as N, N as h, P as G, t as O, u as j, S as q, r as z, s as H, T as J, J as K, K as Q, q as _, v as V } from "./empty-state-B39KBcM4.js";
2
- import { A as X, P as Y, g as Z } from "./range-calendar-3gAH1uQy.js";
1
+ import { A as s, B as t, C as r, x as e, O as i, z as n, E as m, G as l, H as d, D as C, m as p, n as D, R as S, Q as g, w as u, o as c, c as F, a as T, b as P, U as w, l as A, g as I, i as f, h as b, j as y, e as B, k as M, F as U, d as k, f as x, I as L, L as R, y as v, M as E, p as N, N as h, P as G, t as O, u as j, S as q, r as z, s as H, T as J, J as K, K as Q, q as _, v as V } from "./empty-state-DdZZgWGr.js";
2
+ import { A as X, P as Y, g as Z } from "./range-calendar-CAwPjNM3.js";
3
3
  export {
4
4
  s as Alert,
5
5
  X as Avatar,
@@ -1,6 +1,6 @@
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-C0P0sYS7.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-3gAH1uQy.js";
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-C9M9gHda.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-C5pdGkvG.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-CAwPjNM3.js";
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-jUpomqyU.js";
4
4
  export {
5
5
  s as BackButton,
6
6
  X 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-D63AOy_k.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-Dldug2Ff.js";
2
2
  export {
3
3
  s as BasicPage,
4
4
  P as BlankPage,
@@ -1,7 +1,7 @@
1
1
  import { Div as h, Span as H, Button as _, OnState as J, On as z } from "@base-framework/atoms";
2
2
  import { Component as Y, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
3
3
  import { I as L } from "./image-BB__4s0g.js";
4
- import { B as f } from "./buttons-C5VyfDUa.js";
4
+ import { B as f } from "./buttons-CfwtbIR-.js";
5
5
  import { Icons as P } from "./icons.es.js";
6
6
  const U = (e, t) => {
7
7
  const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
@@ -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 x } from "./aside-template-sUm-F2f0.js";
3
3
  import { Component as h, Atom as i } from "@base-framework/base";
4
- import { c as u, e as p } from "./mobile-nav-wrapper-C9M9gHda.js";
4
+ import { c as u, e as f } from "./mobile-nav-wrapper-jUpomqyU.js";
5
5
  class c extends h {
6
6
  /**
7
7
  * This will declare the props for the compiler.
@@ -19,6 +19,15 @@ class c extends h {
19
19
  render() {
20
20
  return t({ class: `${this.class || ""}` }, this.children);
21
21
  }
22
+ /**
23
+ * This will be called before the component
24
+ * is destroyed.
25
+ *
26
+ * @returns {void}
27
+ */
28
+ beforeDestroy() {
29
+ super.beforeDestroy();
30
+ }
22
31
  }
23
32
  class a extends c {
24
33
  /**
@@ -74,11 +83,11 @@ class w extends a {
74
83
  ]);
75
84
  }
76
85
  }
77
- const f = i(({ title: e, description: s }) => n({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
86
+ const p = i(({ title: e, description: s }) => n({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
78
87
  d({ class: "scroll-m-20 text-3xl font-bold tracking-tight" }, e),
79
88
  s && o({ class: "text-base text-muted-foreground py-2 max-w-[700px]" }, s)
80
89
  ]));
81
- class F extends a {
90
+ class y extends a {
82
91
  /**
83
92
  * This will declare the props for the compiler.
84
93
  *
@@ -94,7 +103,7 @@ class F extends a {
94
103
  */
95
104
  render() {
96
105
  return r([
97
- f({
106
+ p({
98
107
  title: this.title,
99
108
  description: this.description
100
109
  }),
@@ -102,7 +111,7 @@ class F extends a {
102
111
  ]);
103
112
  }
104
113
  }
105
- class B extends c {
114
+ class F extends c {
106
115
  /**
107
116
  * This will render the page.
108
117
  *
@@ -113,7 +122,7 @@ class B extends c {
113
122
  return t({ class: `flex flex-col flex-auto ${s}` }, this.children);
114
123
  }
115
124
  }
116
- class M extends a {
125
+ class B extends a {
117
126
  /**
118
127
  * This will declare the props for the compiler.
119
128
  *
@@ -192,7 +201,7 @@ class M extends a {
192
201
  class: "hidden lg:flex"
193
202
  }
194
203
  ),
195
- p({ title: this.title, options: s })
204
+ f({ title: this.title, options: s })
196
205
  ];
197
206
  }
198
207
  /**
@@ -210,8 +219,8 @@ export {
210
219
  w as F,
211
220
  r as M,
212
221
  c as P,
213
- M as S,
222
+ B as S,
214
223
  S as a,
215
- F as b,
216
- B as c
224
+ y as b,
225
+ F as c
217
226
  };
@@ -1,10 +1,10 @@
1
1
  import { Button as w, Div as o, On as C, Span as L, Th as N, UseParent as E, I as Q, Thead as V, Tr as G, Table as B, P as v, Li as y, Time as X, Nav as m, Ul as f, Section as I, Canvas as q } from "@base-framework/atoms";
2
2
  import { Atom as d, Component as p, Data as T, DateTime as K, router as k, NavLink as M, DataTracker as U, Jot as _, base as O, Dom as W } from "@base-framework/base";
3
- import { B as P, I as J } from "./buttons-C5VyfDUa.js";
3
+ import { B as P, I as J } from "./buttons-CfwtbIR-.js";
4
4
  import { Icons as S } from "./icons.es.js";
5
5
  import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
6
6
  import { C as ie, I as ne, H as oe } from "./inputs-9udyzkHR.js";
7
- import { A as le, P as re } from "./range-calendar-3gAH1uQy.js";
7
+ import { A as le, P as re } from "./range-calendar-CAwPjNM3.js";
8
8
  import { V as g } from "./image-BB__4s0g.js";
9
9
  d((t, e) => ({
10
10
  class: "flex items-center px-4 py-2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.2033",
3
+ "version": "1.1.0",
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,94 +0,0 @@
1
- import { I as u, Button as r } from "@base-framework/atoms";
2
- import { Atom as a, Component as g } from "@base-framework/base";
3
- import { Icons as e } from "./icons.es.js";
4
- const m = {
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
- }, c = a((t, s) => {
13
- const n = m[t.size || "sm"];
14
- return u({
15
- ...t,
16
- class: `stroke-current icon-size ${n} ${t.class || ""}`,
17
- html: s[0]?.textContent
18
- });
19
- }), i = (t) => a((s, n) => r({
20
- ...t,
21
- ...s,
22
- class: `bttn ${t.class} ${s.class || ""}`
23
- }, n)), h = a(
24
- (t, s) => r({
25
- ...t,
26
- class: t.class
27
- }, [
28
- t.icon && t.position !== "right" ? c({ size: "sm", class: t.animation ?? null }, t.icon) : null,
29
- ...s || [],
30
- t.icon && t.position === "right" ? c({ size: "sm", class: t.animation ?? null }, t.icon) : null
31
- ])
32
- ), o = (t) => a((s, n) => h({
33
- ...t,
34
- ...s,
35
- class: `bttn ${t.class} ${s.class || ""}`
36
- }, n));
37
- class b extends g {
38
- /**
39
- * This will set the start history length.
40
- *
41
- * @param {object} props
42
- * @param {array} children
43
- */
44
- constructor(s, n) {
45
- super(s, n), this.startHistoryLength = globalThis.history.length;
46
- }
47
- /**
48
- * This will handle the click event.
49
- *
50
- * @returns {void}
51
- */
52
- goBack() {
53
- if (this.props.allowHistory === !0 && globalThis.history.length > 1) {
54
- const s = globalThis.history.length, n = this.startHistoryLength - s - 1;
55
- if (n < -1) {
56
- globalThis.history.go(n);
57
- return;
58
- }
59
- globalThis.history.back();
60
- return;
61
- }
62
- if (this.props.backUrl) {
63
- app.navigate(this.props.backUrl);
64
- return;
65
- }
66
- globalThis.history.back();
67
- }
68
- /**
69
- * This will render the component.
70
- *
71
- * @returns {object}
72
- */
73
- render() {
74
- const s = { ...this };
75
- return s.icon = s.icon || e.chevron.single.left, s.click = s.click || (() => this.goBack()), h(s, this.children);
76
- }
77
- }
78
- const k = (t) => a((s, n) => new b({ ...t, ...s }, n)), l = {
79
- primary: i({ class: "primary" }),
80
- secondary: i({ class: "secondary" }),
81
- destructive: i({ class: "destructive" }),
82
- warning: i({ class: "warning" }),
83
- outline: i({ class: "outline" }),
84
- ghost: i({ class: "ghost" }),
85
- link: i({ class: "link" }),
86
- icon: o({ class: "icon" }),
87
- withIcon: o({ class: "with-icon" }),
88
- back: k({ class: "with-icon back-button" })
89
- }, w = a((t, s) => (l[t.variant] || l.primary)(t, s)), I = a((t, s) => w({ ...t, variant: "withIcon", icon: e.loading, animation: "animate-spin" }, s));
90
- export {
91
- w as B,
92
- c as I,
93
- I as L
94
- };