@base-framework/ui 1.0.2034 → 1.1.1

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-ByzNooiu.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-D5Xazc80.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-ByzNooiu.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-ByzNooiu.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-C34oNK4P.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-D5Xazc80.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-5RUaIz2H.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-DOlXg2as.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-D7kBMpph.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-D6r7Pr21.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-ByzNooiu.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-C34oNK4P.js";
2
- import { A as X, P as Y, g as Z } from "./range-calendar-D5Xazc80.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-5RUaIz2H.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-D5Xazc80.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-DOlXg2as.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-D7kBMpph.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-D6r7Pr21.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-ByzNooiu.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-DOlXg2as.js";
4
+ import { c as u, e as p } from "./mobile-nav-wrapper-jUpomqyU.js";
5
5
  class c extends h {
6
6
  /**
7
7
  * This will declare the props for the compiler.
@@ -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-ByzNooiu.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-D5Xazc80.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.2034",
3
+ "version": "1.1.1",
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,74 +0,0 @@
1
- import { I as k, Button as e } 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
- }, o = i((t, n) => {
13
- const s = w[t.size || "sm"];
14
- return k({
15
- ...t,
16
- class: `stroke-current icon-size ${s} ${t.class || ""}`,
17
- html: n[0]?.textContent
18
- });
19
- }), a = (t) => i((n, s) => e({
20
- ...t,
21
- ...n,
22
- class: `bttn ${t.class} ${n.class || ""}`
23
- }, s)), u = i(
24
- (t, n) => e({
25
- ...t,
26
- class: t.class
27
- }, [
28
- t.icon && t.position !== "right" ? o({ size: "sm", class: t.animation ?? null }, t.icon) : null,
29
- ...n || [],
30
- t.icon && t.position === "right" ? o({ size: "sm", class: t.animation ?? null }, t.icon) : null
31
- ])
32
- ), l = (t) => i((n, s) => u({
33
- ...t,
34
- ...n,
35
- class: `bttn ${t.class} ${n.class || ""}`
36
- }, s)), y = i((t, n) => {
37
- const s = globalThis.history.length, g = () => {
38
- if (t.allowHistory === !0 && globalThis.history.length > 1) {
39
- const b = globalThis.history.length, c = s - b - 1;
40
- if (c < -1) {
41
- globalThis.history.go(c);
42
- return;
43
- }
44
- globalThis.history.back();
45
- return;
46
- }
47
- if (t.backUrl) {
48
- app.navigate(t.backUrl);
49
- return;
50
- }
51
- globalThis.history.back();
52
- }, m = {
53
- ...t,
54
- icon: t.icon || h.chevron.single.left,
55
- click: t.click || g
56
- };
57
- return u(m, n);
58
- }), B = (t) => i((n, s) => y({ ...t, ...n }, s)), r = {
59
- primary: a({ class: "primary" }),
60
- secondary: a({ class: "secondary" }),
61
- destructive: a({ class: "destructive" }),
62
- warning: a({ class: "warning" }),
63
- outline: a({ class: "outline" }),
64
- ghost: a({ class: "ghost" }),
65
- link: a({ class: "link" }),
66
- icon: l({ class: "icon" }),
67
- withIcon: l({ class: "with-icon" }),
68
- back: B({ class: "with-icon back-button" })
69
- }, I = i((t, n) => (r[t.variant] || r.primary)(t, n)), f = i((t, n) => I({ ...t, variant: "withIcon", icon: h.loading, animation: "animate-spin" }, n));
70
- export {
71
- I as B,
72
- o as I,
73
- f as L
74
- };