@base-framework/ui 1.1.14 → 1.1.15
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/README.md +44 -0
- package/dist/atoms.es.js +37 -34
- package/dist/buttons-snATS4J5.js +118 -0
- package/dist/{empty-state-CuciIYY7.js → empty-state-BR5Aa8lA.js} +324 -321
- package/dist/full-page-DccgwWsM.js +69 -0
- package/dist/icons.es.js +127 -1
- package/dist/image-BhZbKYDj.js +237 -0
- package/dist/index.es.js +179 -173
- package/dist/{mobile-nav-wrapper-C3Lvz7CH.js → mobile-nav-wrapper-1erstN34.js} +77 -84
- package/dist/molecules.es.js +5 -5
- package/dist/organisms.es.js +52 -51
- package/dist/pages.es.js +10 -9
- package/dist/sidebar-menu-CVyJBcHE.js +13 -0
- package/dist/sidebar-menu-page-Db-6HPoS.js +153 -0
- package/dist/signature-panel-CVq5N5M1.js +1364 -0
- package/dist/simple-search-input-CuC8q0fJ.js +1654 -0
- package/dist/skeleton-BlY3opxG.js +7 -0
- package/dist/{tooltip-BlFbB8yL.js → tooltip-BmvjA9XQ.js} +104 -84
- package/dist/types/components/atoms/atoms.d.ts +2 -0
- package/dist/types/components/atoms/material-icon.d.ts +17 -0
- package/dist/types/components/atoms/universal-icon.d.ts +3 -0
- package/dist/types/components/icons/icons.d.ts +1 -0
- package/dist/types/components/icons/material-symbols.d.ts +19 -0
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/types/components/molecules/image/image-uploader.d.ts +2 -2
- package/dist/types/components/molecules/image/logo-uploader.d.ts +2 -2
- package/dist/types/components/organisms/navigation/mobile/nav-wrapper/title-header.d.ts +1 -1
- package/package.json +1 -1
- package/dist/buttons-Dr-bViom.js +0 -77
- package/dist/form-group-BB7dLJir.js +0 -29
- package/dist/image-BB__4s0g.js +0 -31
- package/dist/inputs-CcimrM1k.js +0 -210
- package/dist/range-calendar-CzKIBhgb.js +0 -831
- package/dist/sidebar-menu-page-BtuUB_XB.js +0 -217
- package/dist/signature-panel-DmyPbuRi.js +0 -2186
package/README.md
CHANGED
|
@@ -104,3 +104,47 @@ SecondaryButton({
|
|
|
104
104
|
}
|
|
105
105
|
})
|
|
106
106
|
```
|
|
107
|
+
|
|
108
|
+
## Icon Systems
|
|
109
|
+
|
|
110
|
+
This library supports two icon systems with **universal automatic detection**. All components automatically support both systems - just pass your icon!
|
|
111
|
+
|
|
112
|
+
### Heroicons (SVG-based)
|
|
113
|
+
Default icon system using SVG strings:
|
|
114
|
+
```javascript
|
|
115
|
+
import { Icon } from '@base-framework/ui/atoms';
|
|
116
|
+
import { Icons } from '@base-framework/ui/icons';
|
|
117
|
+
|
|
118
|
+
Icon({ size: 'md' }, Icons.home)
|
|
119
|
+
Button({ variant: 'withIcon', icon: Icons.plus }, 'Add')
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Material Symbols (Font-based)
|
|
123
|
+
Google's Material Symbols with 11,000+ icons in 4 style variants:
|
|
124
|
+
```javascript
|
|
125
|
+
import { MaterialIcon } from '@base-framework/ui/atoms';
|
|
126
|
+
import { MaterialSymbols } from '@base-framework/ui/icons';
|
|
127
|
+
|
|
128
|
+
MaterialIcon({ name: MaterialSymbols.home, size: 'md', variant: 'filled' })
|
|
129
|
+
Button({ variant: 'withIcon', icon: MaterialSymbols.add }, 'Add')
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Universal Support
|
|
133
|
+
|
|
134
|
+
**All components** (Button, Alert, Modal, Dialog, Navigation, etc.) automatically detect and render both icon types:
|
|
135
|
+
|
|
136
|
+
```javascript
|
|
137
|
+
// Both work - no configuration needed!
|
|
138
|
+
Button({ variant: 'withIcon', icon: Icons.plus }, 'Add')
|
|
139
|
+
Button({ variant: 'withIcon', icon: MaterialSymbols.add }, 'Add')
|
|
140
|
+
Button({ variant: 'withIcon', icon: 'add' }, 'Add') // Material Symbol name
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Style Variants**: `outlined` (default), `filled`, `rounded`, `sharp`
|
|
144
|
+
|
|
145
|
+
See **[UNIVERSAL-ICON-GUIDE.md](./UNIVERSAL-ICON-GUIDE.md)** for complete documentation.
|
|
146
|
+
See **[ui.wiki/09-Material-Symbols.md](./ui.wiki/09-Material-Symbols.md)** for Material Symbols guide.
|
|
147
|
+
|
|
148
|
+
## Documentation
|
|
149
|
+
|
|
150
|
+
For comprehensive documentation, see the **[ui.wiki](./ui.wiki/)** folder.
|
package/dist/atoms.es.js
CHANGED
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import { B as e, C as t,
|
|
2
|
-
import { B as
|
|
3
|
-
import { C as
|
|
4
|
-
import {
|
|
5
|
-
import { I as W, V as w, a as J } from "./image-BB__4s0g.js";
|
|
1
|
+
import { B as e, C as t, a as o, F as n, b as r, L as p, P as I, R as i, S as u, T as l } from "./tooltip-BmvjA9XQ.js";
|
|
2
|
+
import { B as m, I as c, L as T, M as g, U as x, i as B, a as C } from "./buttons-snATS4J5.js";
|
|
3
|
+
import { C as F, a as M, D as S, b, E as L, F as P, H as R, I as U, c as h, M as k, N as D, P as H, R as V, T as E, d as G, e as N, U as W, V as v, f as w, W as J } from "./image-BhZbKYDj.js";
|
|
4
|
+
import { S as q } from "./skeleton-BlY3opxG.js";
|
|
6
5
|
export {
|
|
7
6
|
e as Badge,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
m as Button,
|
|
8
|
+
t as Card,
|
|
10
9
|
F as Checkbox,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
k as
|
|
27
|
-
D as
|
|
28
|
-
|
|
10
|
+
o as CircleGraph,
|
|
11
|
+
M as ColorInput,
|
|
12
|
+
S as DateInput,
|
|
13
|
+
b as DateTimeInput,
|
|
14
|
+
L as EmailInput,
|
|
15
|
+
n as Fieldset,
|
|
16
|
+
P as FileInput,
|
|
17
|
+
r as FormGroup,
|
|
18
|
+
R as HiddenInput,
|
|
19
|
+
c as Icon,
|
|
20
|
+
U as Image,
|
|
21
|
+
h as Input,
|
|
22
|
+
p as Legend,
|
|
23
|
+
T as LoadingButton,
|
|
24
|
+
g as MaterialIcon,
|
|
25
|
+
k as MonthInput,
|
|
26
|
+
D as NumberInput,
|
|
27
|
+
H as PasswordInput,
|
|
28
|
+
I as ProgressBar,
|
|
29
29
|
V as Radio,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
i as RangeSlider,
|
|
31
|
+
u as Select,
|
|
32
|
+
q as Skeleton,
|
|
33
33
|
E as TelInput,
|
|
34
34
|
G as Textarea,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
N as TimeInput,
|
|
36
|
+
l as Tooltip,
|
|
37
|
+
x as UniversalIcon,
|
|
38
|
+
W as UrlInput,
|
|
39
|
+
v as Veil,
|
|
40
|
+
w as VeilJot,
|
|
41
|
+
J as WeekInput,
|
|
42
|
+
B as isHeroicon,
|
|
43
|
+
C as isMaterialIcon
|
|
41
44
|
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { I as b, Span as w, Button as r } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as e } from "@base-framework/base";
|
|
3
|
+
import { Icons as f } from "./icons.es.js";
|
|
4
|
+
const x = {
|
|
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 = e((n, t) => {
|
|
13
|
+
const s = x[n.size || "sm"];
|
|
14
|
+
return b({
|
|
15
|
+
...n,
|
|
16
|
+
class: `stroke-current icon-size ${s} ${n.class || ""}`,
|
|
17
|
+
html: t[0]?.textContent
|
|
18
|
+
});
|
|
19
|
+
}), o = {
|
|
20
|
+
xs: "w-4 h-4 text-base",
|
|
21
|
+
// 16px - matches Icon
|
|
22
|
+
sm: "w-6 h-6 text-2xl",
|
|
23
|
+
// 24px - matches Icon
|
|
24
|
+
md: "w-8 h-8 text-[2rem]",
|
|
25
|
+
// 32px - matches Icon
|
|
26
|
+
lg: "w-10 h-10 text-[2.5rem]",
|
|
27
|
+
// 40px - matches Icon
|
|
28
|
+
xl: "w-12 h-12 text-5xl",
|
|
29
|
+
// 48px - matches Icon
|
|
30
|
+
"2xl": "w-14 h-14 text-[3.5rem]",
|
|
31
|
+
// 56px - matches Icon
|
|
32
|
+
"3xl": "w-16 h-16 text-[4rem]"
|
|
33
|
+
// 64px - matches Icon
|
|
34
|
+
}, u = {
|
|
35
|
+
outlined: "material-symbols-outlined",
|
|
36
|
+
filled: "material-symbols-filled",
|
|
37
|
+
rounded: "material-symbols-rounded",
|
|
38
|
+
sharp: "material-symbols-sharp"
|
|
39
|
+
}, m = e((n) => {
|
|
40
|
+
const t = n.size || "sm", s = n.variant || "outlined", l = o[t] || o.sm, c = u[s] || u.outlined;
|
|
41
|
+
return w({
|
|
42
|
+
...n,
|
|
43
|
+
class: `inline-flex items-center justify-center ${c} ${l} ${n.class || ""}`,
|
|
44
|
+
// Remove props that shouldn't be passed to the DOM element
|
|
45
|
+
size: void 0,
|
|
46
|
+
variant: void 0,
|
|
47
|
+
name: void 0
|
|
48
|
+
}, n.name);
|
|
49
|
+
}), y = (n = {}, t) => t ? typeof t == "string" && t.includes("<svg") ? a(n, t) : typeof t == "object" && t.name ? m({
|
|
50
|
+
...n,
|
|
51
|
+
name: t.name,
|
|
52
|
+
variant: t.variant || n.variant || "outlined"
|
|
53
|
+
}) : typeof t == "string" ? m({
|
|
54
|
+
...n,
|
|
55
|
+
name: t
|
|
56
|
+
}) : a(n, t) : null, V = (n) => n ? !!(typeof n == "object" && n.name || typeof n == "string" && !n.includes("<svg")) : !1, T = (n) => typeof n == "string" && n.includes("<svg"), i = (n) => e((t, s) => r({
|
|
57
|
+
...n,
|
|
58
|
+
...t,
|
|
59
|
+
class: `bttn ${n.class} ${t.class || ""}`
|
|
60
|
+
}, s)), g = e(
|
|
61
|
+
(n, t) => r({
|
|
62
|
+
...n,
|
|
63
|
+
class: n.class
|
|
64
|
+
}, [
|
|
65
|
+
n.icon && n.position !== "right" ? a({ size: "sm", class: n.animation ?? null }, n.icon) : null,
|
|
66
|
+
...t || [],
|
|
67
|
+
n.icon && n.position === "right" ? a({ size: "sm", class: n.animation ?? null }, n.icon) : null
|
|
68
|
+
])
|
|
69
|
+
), d = (n) => e((t, s) => g({
|
|
70
|
+
...n,
|
|
71
|
+
...t,
|
|
72
|
+
class: `bttn ${n.class} ${t.class || ""}`
|
|
73
|
+
}, s)), v = (n) => () => {
|
|
74
|
+
if (n.allowHistory === !0 && globalThis.history.length > 2) {
|
|
75
|
+
globalThis.history.back();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
n.backUrl && app.navigate(n.backUrl);
|
|
79
|
+
}, k = (n) => e((t, s) => (t.icon = t.icon || f.arrows.left, t.click = t.click || v(t), g({
|
|
80
|
+
...n,
|
|
81
|
+
...t
|
|
82
|
+
}, s))), z = e((n, t) => {
|
|
83
|
+
const s = n.size || "md", l = {
|
|
84
|
+
xs: "w-6 h-6",
|
|
85
|
+
sm: "w-8 h-8",
|
|
86
|
+
md: "w-10 h-10",
|
|
87
|
+
lg: "w-12 h-12",
|
|
88
|
+
xl: "w-14 h-14"
|
|
89
|
+
}, c = n.backgroundClass || "bg-background/30 hover:bg-background/50";
|
|
90
|
+
return r({
|
|
91
|
+
...n,
|
|
92
|
+
class: `circle-icon-btn inline-flex items-center justify-center rounded-full ${c} text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ring-offset-background transition-colors disabled:pointer-events-none disabled:opacity-50 cursor-pointer ${l[s] || l.md} ${n.class || ""}`
|
|
93
|
+
}, [
|
|
94
|
+
n.icon ? y({ size: s === "xs" ? "xs" : "sm" }, n.icon) : null,
|
|
95
|
+
...t || []
|
|
96
|
+
]);
|
|
97
|
+
}), h = {
|
|
98
|
+
primary: i({ class: "primary" }),
|
|
99
|
+
secondary: i({ class: "secondary" }),
|
|
100
|
+
destructive: i({ class: "destructive" }),
|
|
101
|
+
warning: i({ class: "warning" }),
|
|
102
|
+
outline: i({ class: "outline" }),
|
|
103
|
+
ghost: i({ class: "ghost" }),
|
|
104
|
+
link: i({ class: "link" }),
|
|
105
|
+
icon: d({ class: "icon" }),
|
|
106
|
+
withIcon: d({ class: "with-icon" }),
|
|
107
|
+
back: k({ class: "with-icon back-button" }),
|
|
108
|
+
circleIcon: z
|
|
109
|
+
}, I = e((n, t) => (h[n.variant] || h.primary)(n, t)), U = e((n, t) => I({ ...n, variant: "withIcon", icon: f.loading, animation: "animate-spin" }, t));
|
|
110
|
+
export {
|
|
111
|
+
I as B,
|
|
112
|
+
a as I,
|
|
113
|
+
U as L,
|
|
114
|
+
m as M,
|
|
115
|
+
y as U,
|
|
116
|
+
V as a,
|
|
117
|
+
T as i
|
|
118
|
+
};
|