zabi-components 4.0.2 → 5.0.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/README.md +2 -2
- package/dist/SSRSafe.svelte +47 -0
- package/dist/SSRSafe.svelte.d.ts +11 -0
- package/dist/atoms/Badge.svelte +76 -0
- package/dist/atoms/Badge.svelte.d.ts +9 -0
- package/dist/atoms/Button.svelte +72 -0
- package/dist/atoms/Button.svelte.d.ts +13 -0
- package/dist/atoms/Card.svelte +59 -0
- package/dist/atoms/Card.svelte.d.ts +12 -0
- package/dist/atoms/Checkbox.svelte +60 -0
- package/dist/atoms/Checkbox.svelte.d.ts +10 -0
- package/dist/atoms/CodeBlock.svelte +125 -0
- package/dist/atoms/CodeBlock.svelte.d.ts +8 -0
- package/dist/atoms/ColorPicker.svelte +171 -0
- package/dist/atoms/ColorPicker.svelte.d.ts +9 -0
- package/dist/atoms/FeatureCard.svelte +74 -0
- package/dist/atoms/FeatureCard.svelte.d.ts +17 -0
- package/dist/atoms/Heading.svelte +5 -0
- package/dist/atoms/Heading.svelte.d.ts +7 -0
- package/dist/atoms/Input.svelte +98 -0
- package/dist/atoms/Input.svelte.d.ts +14 -0
- package/dist/atoms/OptimizedImage.svelte +32 -0
- package/dist/atoms/OptimizedImage.svelte.d.ts +13 -0
- package/dist/atoms/Progress.svelte +61 -0
- package/dist/atoms/Progress.svelte.d.ts +9 -0
- package/dist/atoms/Select.svelte +85 -0
- package/dist/atoms/Select.svelte.d.ts +16 -0
- package/dist/atoms/Skeleton.svelte +20 -0
- package/dist/atoms/Skeleton.svelte.d.ts +8 -0
- package/dist/atoms/Textarea.svelte +116 -0
- package/dist/atoms/Textarea.svelte.d.ts +14 -0
- package/dist/atoms/ThemeToggle.svelte +89 -0
- package/dist/atoms/ThemeToggle.svelte.d.ts +7 -0
- package/dist/atoms/Toast.svelte +58 -0
- package/dist/atoms/Toast.svelte.d.ts +9 -0
- package/dist/atoms/Toggle.svelte +94 -0
- package/dist/atoms/Toggle.svelte.d.ts +12 -0
- package/dist/atoms/Tooltip.svelte +188 -0
- package/dist/atoms/Tooltip.svelte.d.ts +12 -0
- package/dist/atoms/index.d.ts +4 -15
- package/dist/atoms/index.js +10 -23
- package/dist/components/atoms/index.d.ts +10 -0
- package/dist/components/atoms/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/components/molecules/index.d.ts.map +1 -0
- package/dist/components/organisms/index.d.ts +1 -0
- package/dist/components/organisms/index.d.ts.map +1 -0
- package/dist/index.d.ts +30 -15
- package/dist/index.js +74 -0
- package/dist/molecules/Alert.svelte +114 -0
- package/dist/molecules/Alert.svelte.d.ts +14 -0
- package/dist/molecules/ComponentDemo.svelte +96 -0
- package/dist/molecules/ComponentDemo.svelte.d.ts +13 -0
- package/dist/molecules/ContactForm.svelte +98 -0
- package/dist/molecules/ContactForm.svelte.d.ts +10 -0
- package/dist/molecules/Dropdown.svelte +128 -0
- package/dist/molecules/Dropdown.svelte.d.ts +11 -0
- package/dist/molecules/Form.svelte +37 -0
- package/dist/molecules/Form.svelte.d.ts +12 -0
- package/dist/molecules/ImageUpload.svelte +112 -0
- package/dist/molecules/ImageUpload.svelte.d.ts +14 -0
- package/dist/molecules/Modal.svelte +85 -0
- package/dist/molecules/Modal.svelte.d.ts +13 -0
- package/dist/molecules/SlideUp.svelte +73 -0
- package/dist/molecules/SlideUp.svelte.d.ts +12 -0
- package/dist/molecules/Tabs.svelte +68 -0
- package/dist/molecules/Tabs.svelte.d.ts +17 -0
- package/dist/molecules/index.d.ts +0 -11
- package/dist/molecules/index.js +2 -13
- package/dist/organisms/Navbar.svelte +99 -0
- package/dist/organisms/Navbar.svelte.d.ts +14 -0
- package/dist/organisms/Navigation.svelte +48 -0
- package/dist/organisms/Navigation.svelte.d.ts +15 -0
- package/dist/organisms/index.d.ts +0 -4
- package/dist/organisms/index.js +2 -5
- package/dist/routes/lib/ssr-safe.ts +57 -0
- package/dist/routes/lib/variant-utils.ts +98 -0
- package/dist/zabi-components.css +399 -1
- package/package.json +41 -17
- package/dist/CodeBlock-pT5-FgZd.js +0 -431
- package/dist/ContactForm-CHI_jeFY.js +0 -580
- package/dist/FeatureCard-iBFGbgVE.js +0 -656
- package/dist/Navigation-BOT-UHg0.js +0 -104
- package/dist/ThemeToggle-BlNPkAQy.js +0 -48
- package/dist/index/index.js +0 -63
- package/dist/molecules/KeyValueForm.types.d.ts +0 -11
- package/dist/ssr-safe-bsWGK4V4.js +0 -2232
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.js +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { x as F, p as d, f as x, c as G, k as e, y as u, i as w, j as Z, z as N, d as b, A as r, s as $, g as o, r as M, B as y, C as q, D as aa, E as ea, F as A, G as ta } from "./ssr-safe-bsWGK4V4.js";
|
|
2
|
-
import { T as E } from "./ThemeToggle-BlNPkAQy.js";
|
|
3
|
-
function sa(v, a) {
|
|
4
|
-
$(a, !o(a));
|
|
5
|
-
}
|
|
6
|
-
function ia() {
|
|
7
|
-
}
|
|
8
|
-
var ra = x('<div class="mt-2"><!></div>'), va = x('<div class="md:hidden"><div class="px-2 pt-2 pb-3 space-y-1 sm:px-3 border-t border-gray-200"><!> <div class="pt-4"><!> <!></div></div></div>'), la = x('<nav><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><div class="flex justify-between items-center h-16"><div class="flex-shrink-0"><button type="button" class="text-xl font-bold text-gray-900"> </button></div> <div class="hidden md:block"><div class="ml-10 flex items-baseline space-x-4"><!></div></div> <div class="hidden md:block"><div class="ml-4 flex items-center space-x-4"><!> <!></div></div> <div class="md:hidden"><button type="button" class="text-gray-500 hover:text-gray-600" aria-label="Toggle menu"><span class="text-2xl">☰</span></button></div></div> <!></div></nav>');
|
|
9
|
-
function ba(v, a) {
|
|
10
|
-
let l = d(a, "brand", 3, ""), m = d(a, "showThemeToggle", 3, !0), p = d(a, "className", 3, ""), k = M(a, [
|
|
11
|
-
"$$slots",
|
|
12
|
-
"$$events",
|
|
13
|
-
"$$legacy",
|
|
14
|
-
"brand",
|
|
15
|
-
"showThemeToggle",
|
|
16
|
-
"className",
|
|
17
|
-
"children",
|
|
18
|
-
"nav",
|
|
19
|
-
"actions"
|
|
20
|
-
]), g = Z(!1);
|
|
21
|
-
var s = la();
|
|
22
|
-
G(s, () => ({
|
|
23
|
-
class: `bg-white border-b border-gray-200 sticky top-0 z-50 ${// Brand click is now handled by the parent component
|
|
24
|
-
// through event forwarding
|
|
25
|
-
p() ?? ""}`,
|
|
26
|
-
...k
|
|
27
|
-
}));
|
|
28
|
-
var f = e(s), c = e(f), t = e(c), _ = e(t);
|
|
29
|
-
_.__click = [ia];
|
|
30
|
-
var n = e(_), h = r(t, 2), H = e(h), I = e(H);
|
|
31
|
-
u(I, () => a.nav ?? y);
|
|
32
|
-
var P = r(h, 2), J = e(P), C = e(J);
|
|
33
|
-
u(C, () => a.actions ?? y);
|
|
34
|
-
var K = r(C, 2);
|
|
35
|
-
{
|
|
36
|
-
var L = (i) => {
|
|
37
|
-
E(i, {});
|
|
38
|
-
};
|
|
39
|
-
w(K, (i) => {
|
|
40
|
-
m() && i(L);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
var O = r(P, 2), Q = e(O);
|
|
44
|
-
Q.__click = [sa, g];
|
|
45
|
-
var R = r(c, 2);
|
|
46
|
-
{
|
|
47
|
-
var S = (i) => {
|
|
48
|
-
var j = va(), U = e(j), z = e(U);
|
|
49
|
-
u(z, () => a.nav ?? y);
|
|
50
|
-
var V = r(z, 2), B = e(V);
|
|
51
|
-
u(B, () => a.actions ?? y);
|
|
52
|
-
var W = r(B, 2);
|
|
53
|
-
{
|
|
54
|
-
var X = (T) => {
|
|
55
|
-
var D = ra(), Y = e(D);
|
|
56
|
-
E(Y, {}), b(T, D);
|
|
57
|
-
};
|
|
58
|
-
w(W, (T) => {
|
|
59
|
-
m() && T(X);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
b(i, j);
|
|
63
|
-
};
|
|
64
|
-
w(R, (i) => {
|
|
65
|
-
o(g) && i(S);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
N(() => q(n, l())), b(v, s);
|
|
69
|
-
}
|
|
70
|
-
F(["click"]);
|
|
71
|
-
var na = (v, a, l) => a(o(l), v), da = x("<li><a> </a></li>"), oa = x("<nav><ul></ul></nav>");
|
|
72
|
-
function xa(v, a) {
|
|
73
|
-
let l = d(a, "variant", 3, "header"), m = d(a, "items", 19, () => []), p = d(a, "currentPath", 3, ""), k = M(a, [
|
|
74
|
-
"$$slots",
|
|
75
|
-
"$$events",
|
|
76
|
-
"$$legacy",
|
|
77
|
-
"variant",
|
|
78
|
-
"items",
|
|
79
|
-
"currentPath",
|
|
80
|
-
"children"
|
|
81
|
-
]);
|
|
82
|
-
function g(c, t) {
|
|
83
|
-
t.preventDefault();
|
|
84
|
-
}
|
|
85
|
-
var s = oa();
|
|
86
|
-
G(s, () => ({
|
|
87
|
-
class: `navigation navigation-${l() ?? ""}`,
|
|
88
|
-
...k
|
|
89
|
-
}));
|
|
90
|
-
var f = e(s);
|
|
91
|
-
aa(f, 21, m, ea, (c, t) => {
|
|
92
|
-
var _ = da(), n = e(_);
|
|
93
|
-
n.__click = [na, g, t];
|
|
94
|
-
var h = e(n);
|
|
95
|
-
N(() => {
|
|
96
|
-
ta(n, "href", o(t).href), A(n, 1, `px-3 py-2 text-sm font-medium rounded-md transition-colors ${p() === o(t).href ? "bg-blue-100 text-blue-700" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`), q(h, o(t).label);
|
|
97
|
-
}), b(c, _);
|
|
98
|
-
}), N(() => A(f, 1, `flex ${l() === "sidebar" ? "flex-col space-y-2" : "space-x-6"}`)), b(v, s);
|
|
99
|
-
}
|
|
100
|
-
F(["click"]);
|
|
101
|
-
export {
|
|
102
|
-
ba as N,
|
|
103
|
-
xa as a
|
|
104
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { p as k, s as b, a as i, g as f, b as _, f as c, c as y, i as T, d as n, e as w, h as x, j as D, r as L, k as S } from "./ssr-safe-bsWGK4V4.js";
|
|
2
|
-
import { onMount as j } from "svelte";
|
|
3
|
-
var E = c('<span class="text-lg">☀️</span>'), I = c('<span class="text-lg">🌙</span>'), M = c("<button><!></button>");
|
|
4
|
-
function z(m, s) {
|
|
5
|
-
x(s, !0);
|
|
6
|
-
let a = k(s, "isDark", 7, !1), d = L(s, ["$$slots", "$$events", "$$legacy", "isDark"]), o = D(!1);
|
|
7
|
-
j(() => {
|
|
8
|
-
b(o, !0);
|
|
9
|
-
const e = i();
|
|
10
|
-
if (e) {
|
|
11
|
-
const t = e.getItem("theme"), v = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
12
|
-
a(t === "dark" || !t && v), l();
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
function g(e) {
|
|
16
|
-
a(!a()), l();
|
|
17
|
-
const t = i();
|
|
18
|
-
f(o) && t && t.setItem("theme", a() ? "dark" : "light");
|
|
19
|
-
}
|
|
20
|
-
function l() {
|
|
21
|
-
const e = _();
|
|
22
|
-
f(o) && e && (a() ? e.documentElement.classList.add("dark") : e.documentElement.classList.remove("dark"));
|
|
23
|
-
}
|
|
24
|
-
var r = M();
|
|
25
|
-
y(r, () => ({
|
|
26
|
-
onclick: g,
|
|
27
|
-
class: "w-10 h-10 bg-gray-100 hover:bg-gray-200 border border-gray-300 rounded-lg flex items-center justify-center text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
28
|
-
"aria-label": a() ? "Switch to light mode" : "Switch to dark mode",
|
|
29
|
-
...d
|
|
30
|
-
}));
|
|
31
|
-
var u = S(r);
|
|
32
|
-
{
|
|
33
|
-
var h = (e) => {
|
|
34
|
-
var t = E();
|
|
35
|
-
n(e, t);
|
|
36
|
-
}, p = (e) => {
|
|
37
|
-
var t = I();
|
|
38
|
-
n(e, t);
|
|
39
|
-
};
|
|
40
|
-
T(u, (e) => {
|
|
41
|
-
a() ? e(h) : e(p, !1);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
n(m, r), w();
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
z as T
|
|
48
|
-
};
|
package/dist/index/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { B as m, C as d, a as g, I as c, T as f, e as C, d as u, b as p, g as T, c as S } from "../CodeBlock-pT5-FgZd.js";
|
|
2
|
-
import { B as I, C as b, a as w, F as D, H as F, O as B, P as v, S as V, b as $, T as k, c as A, d as M } from "../FeatureCard-iBFGbgVE.js";
|
|
3
|
-
import { T as h } from "../ThemeToggle-BlNPkAQy.js";
|
|
4
|
-
import { A as L, C as N, a as O, D as P, F as j, I as y, L as E, M as H, S as U, T as z } from "../ContactForm-CHI_jeFY.js";
|
|
5
|
-
import { N as G, a as J } from "../Navigation-BOT-UHg0.js";
|
|
6
|
-
import { l as Q, m as X, w as Y, u as Z, b as _, a as aa, q as ea, o as sa, v as ta, t as oa, n as ra } from "../ssr-safe-bsWGK4V4.js";
|
|
7
|
-
const s = (a = "id") => typeof window < "u" ? `${a}-${Math.random().toString(36).substr(2, 9)}` : `${a}-ssr-${Date.now()}`, t = (...a) => a.filter(Boolean).join(" "), o = (a) => {
|
|
8
|
-
const e = new FormData(a);
|
|
9
|
-
return Object.fromEntries(e.entries());
|
|
10
|
-
}, r = (a) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a), n = (a) => a != null && a !== "";
|
|
11
|
-
export {
|
|
12
|
-
L as Alert,
|
|
13
|
-
I as Badge,
|
|
14
|
-
m as Button,
|
|
15
|
-
b as Card,
|
|
16
|
-
d as Checkbox,
|
|
17
|
-
g as CodeBlock,
|
|
18
|
-
w as ColorPicker,
|
|
19
|
-
N as ComponentDemo,
|
|
20
|
-
O as ContactForm,
|
|
21
|
-
P as Dropdown,
|
|
22
|
-
D as FeatureCard,
|
|
23
|
-
j as Form,
|
|
24
|
-
F as Heading,
|
|
25
|
-
y as ImageUpload,
|
|
26
|
-
c as Input,
|
|
27
|
-
E as Layout,
|
|
28
|
-
H as Modal,
|
|
29
|
-
G as Navbar,
|
|
30
|
-
J as Navigation,
|
|
31
|
-
B as OptimizedImage,
|
|
32
|
-
v as Progress,
|
|
33
|
-
V as Select,
|
|
34
|
-
$ as Skeleton,
|
|
35
|
-
U as SlideUp,
|
|
36
|
-
z as Tabs,
|
|
37
|
-
f as Textarea,
|
|
38
|
-
h as ThemeToggle,
|
|
39
|
-
k as Toast,
|
|
40
|
-
A as Toggle,
|
|
41
|
-
M as Tooltip,
|
|
42
|
-
t as cn,
|
|
43
|
-
s as createId,
|
|
44
|
-
C as createVariantClassMap,
|
|
45
|
-
Q as generateId,
|
|
46
|
-
u as getAllVariantClasses,
|
|
47
|
-
p as getCardVariantClasses,
|
|
48
|
-
o as getFormData,
|
|
49
|
-
T as getInputVariantClasses,
|
|
50
|
-
S as getVariantClasses,
|
|
51
|
-
X as isBrowser,
|
|
52
|
-
Y as safeClearInterval,
|
|
53
|
-
Z as safeClearTimeout,
|
|
54
|
-
_ as safeDocument,
|
|
55
|
-
aa as safeLocalStorage,
|
|
56
|
-
ea as safeRequestAnimationFrame,
|
|
57
|
-
sa as safeSessionStorage,
|
|
58
|
-
ta as safeSetInterval,
|
|
59
|
-
oa as safeSetTimeout,
|
|
60
|
-
ra as safeWindow,
|
|
61
|
-
r as validateEmail,
|
|
62
|
-
n as validateRequired
|
|
63
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Field configuration for DynamicForm component
|
|
2
|
-
export interface FieldConfig {
|
|
3
|
-
key: string;
|
|
4
|
-
type: "text" | "email" | "password" | "number" | "textarea" | "select" | "checkbox" | "toggle" | "colorpicker" | "textalignment";
|
|
5
|
-
label: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
options?: Array<{ value: string | number; label: string; disabled?: boolean }>;
|
|
9
|
-
rows?: number;
|
|
10
|
-
flex?: "1" | "full";
|
|
11
|
-
}
|