@base-framework/ui 1.1.5 → 1.1.7
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 +3 -3
- package/dist/buttons-B-FvkS9B.js +77 -0
- package/dist/{empty-state-DoTkyO7O.js → empty-state-DvkT6uAo.js} +138 -202
- package/dist/index.es.js +8 -8
- package/dist/{inputs-DEfa4qLY.js → inputs-CcimrM1k.js} +0 -8
- package/dist/{mobile-nav-wrapper-CZ5m6cqw.js → mobile-nav-wrapper-B7hEJ4r-.js} +20 -28
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +3 -3
- package/dist/pages.es.js +1 -1
- package/dist/{range-calendar-BH4jZwwg.js → range-calendar-CAa8ly0W.js} +2 -1
- package/dist/{sidebar-menu-page-BCqUom5C.js → sidebar-menu-page-KZXiQy6q.js} +1 -1
- package/dist/{signature-panel-Ba9YNxN4.js → signature-panel-D38xgifi.js} +4 -12
- package/dist/{tooltip-BNsImT7F.js → tooltip-BlFbB8yL.js} +1 -1
- package/dist/types/components/molecules/dropdowns/dropdown-menu.d.ts +0 -2
- package/dist/types/components/molecules/modals/drawer/drawer.d.ts +10 -0
- package/dist/types/components/molecules/modals/modal.d.ts +0 -2
- package/dist/types/components/molecules/notifications/notification-container.d.ts +0 -1
- package/dist/types/components/organisms/lists/data-table.d.ts +0 -1
- package/package.json +1 -1
- package/dist/buttons-CfwtbIR-.js +0 -61
package/dist/atoms.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
2
|
-
import { B as d, I as m, L as x } from "./buttons-
|
|
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-BlFbB8yL.js";
|
|
2
|
+
import { B as d, I as m, L as x } from "./buttons-B-FvkS9B.js";
|
|
3
3
|
import { C as T, F as g } from "./form-group-BB7dLJir.js";
|
|
4
|
-
import { C as F, a as c, D as f, b 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, c as G, d as H, U as M, W as N } from "./inputs-
|
|
4
|
+
import { C as F, a as c, D as f, b 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, c as G, d as H, U as M, W as N } from "./inputs-CcimrM1k.js";
|
|
5
5
|
import { I as W, V as w, a as J } from "./image-BB__4s0g.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Badge,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { I as m, Button as l } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as i } from "@base-framework/base";
|
|
3
|
+
import { Icons as u } from "./icons.es.js";
|
|
4
|
+
const g = {
|
|
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
|
+
}, a = i((n, t) => {
|
|
13
|
+
const s = g[n.size || "sm"];
|
|
14
|
+
return m({
|
|
15
|
+
...n,
|
|
16
|
+
class: `stroke-current icon-size ${s} ${n.class || ""}`,
|
|
17
|
+
html: t[0]?.textContent
|
|
18
|
+
});
|
|
19
|
+
}), c = (n) => i((t, s) => l({
|
|
20
|
+
...n,
|
|
21
|
+
...t,
|
|
22
|
+
class: `bttn ${n.class} ${t.class || ""}`
|
|
23
|
+
}, s)), h = i(
|
|
24
|
+
(n, t) => l({
|
|
25
|
+
...n,
|
|
26
|
+
class: n.class
|
|
27
|
+
}, [
|
|
28
|
+
n.icon && n.position !== "right" ? a({ size: "sm", class: n.animation ?? null }, n.icon) : null,
|
|
29
|
+
...t || [],
|
|
30
|
+
n.icon && n.position === "right" ? a({ size: "sm", class: n.animation ?? null }, n.icon) : null
|
|
31
|
+
])
|
|
32
|
+
), e = (n) => i((t, s) => h({
|
|
33
|
+
...n,
|
|
34
|
+
...t,
|
|
35
|
+
class: `bttn ${n.class} ${t.class || ""}`
|
|
36
|
+
}, s)), 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
|
+
}, b = (n) => i((t, s) => (t.icon = t.icon || u.arrows.left, t.click = t.click || w(t), h({
|
|
43
|
+
...n,
|
|
44
|
+
...t
|
|
45
|
+
}, s))), k = i((n, t) => {
|
|
46
|
+
const s = n.size || "md", o = {
|
|
47
|
+
xs: "w-6 h-6",
|
|
48
|
+
sm: "w-8 h-8",
|
|
49
|
+
md: "w-10 h-10",
|
|
50
|
+
lg: "w-12 h-12",
|
|
51
|
+
xl: "w-14 h-14"
|
|
52
|
+
};
|
|
53
|
+
return l({
|
|
54
|
+
...n,
|
|
55
|
+
class: `inline-flex items-center justify-center rounded-full bg-transparent text-foreground hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-colors ${o[s] || o.md} ${n.class || ""}`
|
|
56
|
+
}, [
|
|
57
|
+
n.icon ? a({ size: s === "xs" ? "xs" : "sm" }, n.icon) : null,
|
|
58
|
+
...t || []
|
|
59
|
+
]);
|
|
60
|
+
}), r = {
|
|
61
|
+
primary: c({ class: "primary" }),
|
|
62
|
+
secondary: c({ class: "secondary" }),
|
|
63
|
+
destructive: c({ class: "destructive" }),
|
|
64
|
+
warning: c({ class: "warning" }),
|
|
65
|
+
outline: c({ class: "outline" }),
|
|
66
|
+
ghost: c({ class: "ghost" }),
|
|
67
|
+
link: c({ class: "link" }),
|
|
68
|
+
icon: e({ class: "icon" }),
|
|
69
|
+
withIcon: e({ class: "with-icon" }),
|
|
70
|
+
back: b({ class: "with-icon back-button" }),
|
|
71
|
+
circleIcon: k
|
|
72
|
+
}, d = i((n, t) => (r[n.variant] || r.primary)(n, t)), I = i((n, t) => d({ ...n, variant: "withIcon", icon: u.loading, animation: "animate-spin" }, t));
|
|
73
|
+
export {
|
|
74
|
+
d as B,
|
|
75
|
+
a as I,
|
|
76
|
+
I as L
|
|
77
|
+
};
|