zabi-components 2.0.2 → 2.0.4
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 +157 -25
- package/dist/Checkbox-cOmcN4_d.js +276 -0
- package/dist/ContactForm-DKoAOLWp.js +523 -0
- package/dist/Navigation-BCY_oTq9.js +79 -0
- package/dist/OptimizedImage-AlFTGrwF.js +584 -0
- package/dist/{ThemeToggle-CRI92cOb.js → ThemeToggle-Dgb0rEn7.js} +1 -1
- package/dist/atoms/index.js +16 -21
- package/dist/index/index.js +46 -580
- package/dist/molecules/index.js +10 -13
- package/dist/organisms/index.js +1 -1
- package/dist/props-D1U_TNgY.js +2026 -0
- package/package.json +2 -2
- package/dist/Card-BIAsG5HX.js +0 -222
- package/dist/Navigation-BoOnkbXw.js +0 -81
- package/dist/Tabs-DXN_BqPw.js +0 -509
- package/dist/Tooltip-C9G35OZ6.js +0 -1230
- package/dist/store-ZmZCXeMy.js +0 -2413
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zabi-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "A modern SvelteKit component library with TypeScript and Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@storybook/addon-svelte-csf": "^5.0.8",
|
|
68
68
|
"@storybook/sveltekit": "^9.1.7",
|
|
69
69
|
"@sveltejs/adapter-auto": "^3.0.0",
|
|
70
|
-
"@sveltejs/kit": "^2.
|
|
70
|
+
"@sveltejs/kit": "^2.44.0",
|
|
71
71
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
72
72
|
"@tsconfig/svelte": "^5.0.2",
|
|
73
73
|
"@types/node": "^24.5.2",
|
package/dist/Card-BIAsG5HX.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { w as Q, x as D, y as Z, z as V, P as W, g as c, A as X, s as m, B as k, D as $, C as ee, E as te, F as re, v as ae, G as ne, H as se, I as ie, J as oe, K as le, S as z, L as N, M as g, N as x, O as M, i as Y, f as O, k as q, t as S, b as w, p as U, c as G, Q as E, m as P, d as R, h as A, o as K, R as F, a as L, n as T, q as fe } from "./store-ZmZCXeMy.js";
|
|
2
|
-
function pe(a, e) {
|
|
3
|
-
Q(() => {
|
|
4
|
-
var t = a.getRootNode(), r = (
|
|
5
|
-
/** @type {ShadowRoot} */
|
|
6
|
-
t.host ? (
|
|
7
|
-
/** @type {ShadowRoot} */
|
|
8
|
-
t
|
|
9
|
-
) : (
|
|
10
|
-
/** @type {Document} */
|
|
11
|
-
t.head ?? /** @type {Document} */
|
|
12
|
-
t.ownerDocument.head
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
if (!r.querySelector("#" + e.hash)) {
|
|
16
|
-
const n = document.createElement("style");
|
|
17
|
-
n.id = e.hash, n.textContent = e.code, r.appendChild(n);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function he(a) {
|
|
22
|
-
return function(...e) {
|
|
23
|
-
var t = (
|
|
24
|
-
/** @type {Event} */
|
|
25
|
-
e[0]
|
|
26
|
-
);
|
|
27
|
-
return t.preventDefault(), a == null ? void 0 : a.apply(this, e);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const ue = {
|
|
31
|
-
get(a, e) {
|
|
32
|
-
let t = a.props.length;
|
|
33
|
-
for (; t--; ) {
|
|
34
|
-
let r = a.props[t];
|
|
35
|
-
if (g(r) && (r = r()), typeof r == "object" && r !== null && e in r) return r[e];
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
set(a, e, t) {
|
|
39
|
-
let r = a.props.length;
|
|
40
|
-
for (; r--; ) {
|
|
41
|
-
let n = a.props[r];
|
|
42
|
-
g(n) && (n = n());
|
|
43
|
-
const i = D(n, e);
|
|
44
|
-
if (i && i.set)
|
|
45
|
-
return i.set(t), !0;
|
|
46
|
-
}
|
|
47
|
-
return !1;
|
|
48
|
-
},
|
|
49
|
-
getOwnPropertyDescriptor(a, e) {
|
|
50
|
-
let t = a.props.length;
|
|
51
|
-
for (; t--; ) {
|
|
52
|
-
let r = a.props[t];
|
|
53
|
-
if (g(r) && (r = r()), typeof r == "object" && r !== null && e in r) {
|
|
54
|
-
const n = D(r, e);
|
|
55
|
-
return n && !n.configurable && (n.configurable = !0), n;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
has(a, e) {
|
|
60
|
-
if (e === z || e === N) return !1;
|
|
61
|
-
for (let t of a.props)
|
|
62
|
-
if (g(t) && (t = t()), t != null && e in t) return !0;
|
|
63
|
-
return !1;
|
|
64
|
-
},
|
|
65
|
-
ownKeys(a) {
|
|
66
|
-
const e = [];
|
|
67
|
-
for (let t of a.props)
|
|
68
|
-
if (g(t) && (t = t()), !!t) {
|
|
69
|
-
for (const r in t)
|
|
70
|
-
e.includes(r) || e.push(r);
|
|
71
|
-
for (const r of Object.getOwnPropertySymbols(t))
|
|
72
|
-
e.includes(r) || e.push(r);
|
|
73
|
-
}
|
|
74
|
-
return e;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
function ge(...a) {
|
|
78
|
-
return new Proxy({ props: a }, ue);
|
|
79
|
-
}
|
|
80
|
-
function p(a, e, t, r) {
|
|
81
|
-
var j;
|
|
82
|
-
var n = !ne || (t & se) !== 0, i = (t & re) !== 0, v = (t & oe) !== 0, l = (
|
|
83
|
-
/** @type {V} */
|
|
84
|
-
r
|
|
85
|
-
), b = !0, f = () => (b && (b = !1, l = v ? ae(
|
|
86
|
-
/** @type {() => V} */
|
|
87
|
-
r
|
|
88
|
-
) : (
|
|
89
|
-
/** @type {V} */
|
|
90
|
-
r
|
|
91
|
-
)), l), u;
|
|
92
|
-
if (i) {
|
|
93
|
-
var I = z in a || N in a;
|
|
94
|
-
u = ((j = D(a, e)) == null ? void 0 : j.set) ?? (I && e in a ? (s) => a[e] = s : void 0);
|
|
95
|
-
}
|
|
96
|
-
var o, d = !1;
|
|
97
|
-
i ? [o, d] = Z(() => (
|
|
98
|
-
/** @type {V} */
|
|
99
|
-
a[e]
|
|
100
|
-
)) : o = /** @type {V} */
|
|
101
|
-
a[e], o === void 0 && r !== void 0 && (o = f(), u && (n && V(), u(o)));
|
|
102
|
-
var _;
|
|
103
|
-
if (n ? _ = () => {
|
|
104
|
-
var s = (
|
|
105
|
-
/** @type {V} */
|
|
106
|
-
a[e]
|
|
107
|
-
);
|
|
108
|
-
return s === void 0 ? f() : (b = !0, s);
|
|
109
|
-
} : _ = () => {
|
|
110
|
-
var s = (
|
|
111
|
-
/** @type {V} */
|
|
112
|
-
a[e]
|
|
113
|
-
);
|
|
114
|
-
return s !== void 0 && (l = /** @type {V} */
|
|
115
|
-
void 0), s === void 0 ? l : s;
|
|
116
|
-
}, n && (t & W) === 0)
|
|
117
|
-
return _;
|
|
118
|
-
if (u) {
|
|
119
|
-
var H = a.$$legacy;
|
|
120
|
-
return (
|
|
121
|
-
/** @type {() => V} */
|
|
122
|
-
(function(s, y) {
|
|
123
|
-
return arguments.length > 0 ? ((!n || !y || H || d) && u(y ? _() : s), s) : _();
|
|
124
|
-
})
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
var C = !1, h = ((t & ie) !== 0 ? ee : te)(() => (C = !1, _()));
|
|
128
|
-
i && c(h);
|
|
129
|
-
var J = (
|
|
130
|
-
/** @type {Effect} */
|
|
131
|
-
k
|
|
132
|
-
);
|
|
133
|
-
return (
|
|
134
|
-
/** @type {() => V} */
|
|
135
|
-
(function(s, y) {
|
|
136
|
-
if (arguments.length > 0) {
|
|
137
|
-
const B = y ? c(h) : n && i ? X(s) : s;
|
|
138
|
-
return m(h, B), C = !0, l !== void 0 && (l = B), s;
|
|
139
|
-
}
|
|
140
|
-
return le && C || (J.f & $) !== 0 ? h.v : c(h);
|
|
141
|
-
})
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
var de = O("<button><!></button>");
|
|
145
|
-
function me(a, e) {
|
|
146
|
-
G(e, !1);
|
|
147
|
-
const t = P(), r = P(), n = P();
|
|
148
|
-
let i = p(e, "variant", 8, "primary"), v = p(e, "size", 8, "md"), l = p(e, "disabled", 8, !1), b = p(e, "type", 8, "button");
|
|
149
|
-
x(() => {
|
|
150
|
-
}, () => {
|
|
151
|
-
m(t, {
|
|
152
|
-
sm: "px-3 py-1.5 text-sm",
|
|
153
|
-
md: "px-4 py-2 text-sm",
|
|
154
|
-
lg: "px-5 py-3 text-base"
|
|
155
|
-
});
|
|
156
|
-
}), x(() => {
|
|
157
|
-
}, () => {
|
|
158
|
-
m(r, {
|
|
159
|
-
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
160
|
-
secondary: "bg-gray-600 text-white hover:bg-gray-700",
|
|
161
|
-
danger: "bg-red-600 text-white hover:bg-red-700"
|
|
162
|
-
});
|
|
163
|
-
}), x(
|
|
164
|
-
() => (c(t), E(v()), c(r), E(i())),
|
|
165
|
-
() => {
|
|
166
|
-
m(n, [
|
|
167
|
-
"inline-flex items-center justify-center font-medium rounded-md",
|
|
168
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
169
|
-
c(t)[v()],
|
|
170
|
-
c(r)[i()]
|
|
171
|
-
].join(" "));
|
|
172
|
-
}
|
|
173
|
-
), M(), Y();
|
|
174
|
-
var f = de(), u = R(f);
|
|
175
|
-
q(u, e, "default", {}), S(() => {
|
|
176
|
-
A(f, "type", b()), K(f, 1, F(c(n))), f.disabled = l();
|
|
177
|
-
}), w(a, f), U();
|
|
178
|
-
}
|
|
179
|
-
var ce = O('<img class="w-full h-48 object-cover rounded-md mb-4"/>'), ve = O('<h3 class="text-lg font-semibold mb-2"> </h3>'), _e = O("<div><!> <!> <!></div>");
|
|
180
|
-
function ye(a, e) {
|
|
181
|
-
G(e, !1);
|
|
182
|
-
const t = P();
|
|
183
|
-
let r = p(e, "title", 8, ""), n = p(e, "image", 8, ""), i = p(e, "interactive", 8, !1);
|
|
184
|
-
x(() => E(i()), () => {
|
|
185
|
-
m(t, [
|
|
186
|
-
"bg-white border border-gray-200 rounded-lg p-4",
|
|
187
|
-
i() ? "cursor-pointer hover:shadow-md" : ""
|
|
188
|
-
].join(" "));
|
|
189
|
-
}), M(), Y();
|
|
190
|
-
var v = _e(), l = R(v);
|
|
191
|
-
{
|
|
192
|
-
var b = (o) => {
|
|
193
|
-
var d = ce();
|
|
194
|
-
S(() => {
|
|
195
|
-
A(d, "src", n()), A(d, "alt", r());
|
|
196
|
-
}), w(o, d);
|
|
197
|
-
};
|
|
198
|
-
L(l, (o) => {
|
|
199
|
-
n() && o(b);
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
var f = T(l, 2);
|
|
203
|
-
{
|
|
204
|
-
var u = (o) => {
|
|
205
|
-
var d = ve(), _ = R(d);
|
|
206
|
-
S(() => fe(_, r())), w(o, d);
|
|
207
|
-
};
|
|
208
|
-
L(f, (o) => {
|
|
209
|
-
r() && o(u);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
var I = T(f, 2);
|
|
213
|
-
q(I, e, "default", {}), S(() => K(v, 1, F(c(t)))), w(a, v), U();
|
|
214
|
-
}
|
|
215
|
-
export {
|
|
216
|
-
me as B,
|
|
217
|
-
ye as C,
|
|
218
|
-
he as a,
|
|
219
|
-
pe as b,
|
|
220
|
-
p,
|
|
221
|
-
ge as s
|
|
222
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { j as G, i as H, f as p, k as _, a as C, t as D, e as M, b as c, p as I, l as J, c as K, d as a, n, g as t, m as ia, o as h, q as L, s as na, r as oa, u as da, h as la, v as j } from "./store-ZmZCXeMy.js";
|
|
2
|
-
import { createEventDispatcher as Q } from "svelte";
|
|
3
|
-
import { T as F } from "./ThemeToggle-CRI92cOb.js";
|
|
4
|
-
var ca = p('<div class="mt-2"><!></div>'), pa = p('<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>'), ua = p('<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>');
|
|
5
|
-
function ga(g, r) {
|
|
6
|
-
K(r, !1);
|
|
7
|
-
const m = () => G(props, "$props", y), [y, k] = J();
|
|
8
|
-
let { brand: u = "", showThemeToggle: b = !0, className: $ = "" } = m()();
|
|
9
|
-
const T = Q();
|
|
10
|
-
let o = ia(!1);
|
|
11
|
-
function d() {
|
|
12
|
-
na(o, !t(o));
|
|
13
|
-
}
|
|
14
|
-
function f() {
|
|
15
|
-
T("brandClick");
|
|
16
|
-
}
|
|
17
|
-
H();
|
|
18
|
-
var s = ua(), e = a(s), l = a(e), v = a(l), x = a(v), w = a(x), q = n(v, 2), R = a(q), S = a(R);
|
|
19
|
-
_(S, r, "nav", {});
|
|
20
|
-
var z = n(q, 2), U = a(z), B = a(U);
|
|
21
|
-
_(B, r, "actions", {});
|
|
22
|
-
var V = n(B, 2);
|
|
23
|
-
{
|
|
24
|
-
var W = (i) => {
|
|
25
|
-
F(i, {});
|
|
26
|
-
};
|
|
27
|
-
C(V, (i) => {
|
|
28
|
-
b && i(W);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
var X = n(z, 2), Y = a(X), Z = n(l, 2);
|
|
32
|
-
{
|
|
33
|
-
var aa = (i) => {
|
|
34
|
-
var E = pa(), ea = a(E), O = a(ea);
|
|
35
|
-
_(O, r, "nav", {});
|
|
36
|
-
var ta = n(O, 2), P = a(ta);
|
|
37
|
-
_(P, r, "actions", {});
|
|
38
|
-
var sa = n(P, 2);
|
|
39
|
-
{
|
|
40
|
-
var ra = (N) => {
|
|
41
|
-
var A = ca(), va = a(A);
|
|
42
|
-
F(va, {}), c(N, A);
|
|
43
|
-
};
|
|
44
|
-
C(sa, (N) => {
|
|
45
|
-
b && N(ra);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
c(i, E);
|
|
49
|
-
};
|
|
50
|
-
C(Z, (i) => {
|
|
51
|
-
t(o) && i(aa);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
D(() => {
|
|
55
|
-
h(s, 1, `bg-white border-b border-gray-200 sticky top-0 z-50 ${$ ?? ""}`), L(w, u);
|
|
56
|
-
}), M("click", x, f), M("click", Y, d), c(g, s), I(), k();
|
|
57
|
-
}
|
|
58
|
-
var ba = p("<li><a> </a></li>"), fa = p("<nav><ul></ul></nav>");
|
|
59
|
-
function ma(g, r) {
|
|
60
|
-
K(r, !1);
|
|
61
|
-
const m = () => G(props, "$props", y), [y, k] = J();
|
|
62
|
-
let { variant: u = "header", items: b = [], currentPath: $ = "" } = m()();
|
|
63
|
-
const T = Q();
|
|
64
|
-
function o(s, e) {
|
|
65
|
-
e.preventDefault(), T("navigate", { item: s, href: s.href });
|
|
66
|
-
}
|
|
67
|
-
H();
|
|
68
|
-
var d = fa(), f = a(d);
|
|
69
|
-
oa(f, 5, () => b, da, (s, e) => {
|
|
70
|
-
var l = ba(), v = a(l), x = a(v);
|
|
71
|
-
D(() => {
|
|
72
|
-
la(v, "href", (t(e), j(() => t(e).href))), h(v, 1, `px-3 py-2 text-sm font-medium rounded-md transition-colors ${t(e), j(() => $ === t(e).href ? "bg-blue-100 text-blue-700" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100") ?? ""}`), L(x, (t(e), j(() => t(e).label)));
|
|
73
|
-
}), M("click", v, (w) => o(t(e), w)), c(s, l);
|
|
74
|
-
}), D(() => {
|
|
75
|
-
h(d, 1, `navigation navigation-${u ?? ""}`), h(f, 1, `flex ${u === "sidebar" ? "flex-col space-y-2" : "space-x-6"}`);
|
|
76
|
-
}), c(g, d), I(), k();
|
|
77
|
-
}
|
|
78
|
-
export {
|
|
79
|
-
ga as N,
|
|
80
|
-
ma as a
|
|
81
|
-
};
|