zabi-components 2.2.3 → 3.0.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as C, p as s, o as k, z as R, A as W, i as O, f, b as T, a as B, q as de, e as ee, c as i, d as V, g as q, m as S, x as N, k as t, j as D, h as v, t as M, v as Z, n as I, w as A, u as ne, B as ve, r as ue, s as G, C as H, D as L, E as me } from "./props-B4BdFk2B.js";
|
|
2
|
-
import { a as ge, e as he } from "./
|
|
2
|
+
import { a as ge, e as he } from "./Textarea-DP1BihDh.js";
|
|
3
3
|
import "svelte";
|
|
4
4
|
var pe = f('<label class="block text-sm font-medium text-gray-700 mb-1"> </label>'), _e = f("<option disabled> </option>"), xe = f("<option> </option>"), ye = f("<div><!> <select><!><!></select></div>");
|
|
5
5
|
function Ue(z, e) {
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { y as W, l as C, p as s, z as f, A, i as T, f as B, a as q, s as X, c as V, d as E, g as R, x as y, k as t, m as o, h as k, o as i, b as F, e as G, j as H, t as J, v as K, u as L, B as O, n as Q } from "./props-B4BdFk2B.js";
|
|
2
|
+
function se(a, e) {
|
|
3
|
+
W(() => {
|
|
4
|
+
var r = a.getRootNode(), d = (
|
|
5
|
+
/** @type {ShadowRoot} */
|
|
6
|
+
r.host ? (
|
|
7
|
+
/** @type {ShadowRoot} */
|
|
8
|
+
r
|
|
9
|
+
) : (
|
|
10
|
+
/** @type {Document} */
|
|
11
|
+
r.head ?? /** @type {Document} */
|
|
12
|
+
r.ownerDocument.head
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
if (!d.querySelector("#" + e.hash)) {
|
|
16
|
+
const n = document.createElement("style");
|
|
17
|
+
n.id = e.hash, n.textContent = e.code, d.appendChild(n);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
var Y = B("<button><!></button>");
|
|
22
|
+
function re(a, e) {
|
|
23
|
+
const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, ["variant", "size", "disabled", "type", "className"]);
|
|
24
|
+
R(e, !1);
|
|
25
|
+
const n = o(), u = o(), b = o();
|
|
26
|
+
let v = s(e, "variant", 8, "primary"), p = s(e, "size", 8, "md"), h = s(e, "disabled", 8, !1), w = s(e, "type", 8, "button"), _ = s(e, "className", 8, "");
|
|
27
|
+
f(() => {
|
|
28
|
+
}, () => {
|
|
29
|
+
i(n, {
|
|
30
|
+
sm: "px-3 py-1.5 text-sm font-medium",
|
|
31
|
+
md: "px-4 py-2 text-sm font-medium",
|
|
32
|
+
lg: "px-6 py-3 text-base font-semibold"
|
|
33
|
+
});
|
|
34
|
+
}), f(() => {
|
|
35
|
+
}, () => {
|
|
36
|
+
i(u, {
|
|
37
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:bg-blue-400",
|
|
38
|
+
secondary: "bg-gray-600 text-white hover:bg-gray-700 active:bg-gray-800 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:bg-gray-400",
|
|
39
|
+
danger: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:ring-red-500 focus:ring-offset-2 disabled:bg-red-400",
|
|
40
|
+
success: "bg-green-600 text-white hover:bg-green-700 active:bg-green-800 focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:bg-green-400",
|
|
41
|
+
ghost: "bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:text-gray-400",
|
|
42
|
+
brand: "bg-purple-600 text-white hover:bg-purple-700 active:bg-purple-800 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 disabled:bg-purple-400"
|
|
43
|
+
});
|
|
44
|
+
}), f(
|
|
45
|
+
() => (t(n), y(p()), t(u), y(v()), y(_())),
|
|
46
|
+
() => {
|
|
47
|
+
i(b, [
|
|
48
|
+
"inline-flex items-center justify-center rounded-md transition-all duration-200",
|
|
49
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none",
|
|
50
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
51
|
+
"active:scale-95 transform-gpu",
|
|
52
|
+
"shadow-sm hover:shadow-md",
|
|
53
|
+
t(n)[p()],
|
|
54
|
+
t(u)[v()],
|
|
55
|
+
_()
|
|
56
|
+
].filter(Boolean).join(" "));
|
|
57
|
+
}
|
|
58
|
+
), A(), T();
|
|
59
|
+
var m = Y();
|
|
60
|
+
q(m, () => ({
|
|
61
|
+
type: w(),
|
|
62
|
+
class: t(b),
|
|
63
|
+
disabled: h(),
|
|
64
|
+
...d
|
|
65
|
+
}));
|
|
66
|
+
var x = k(m);
|
|
67
|
+
X(x, e, "default", {}), V(a, m), E();
|
|
68
|
+
}
|
|
69
|
+
function U(a) {
|
|
70
|
+
const e = {
|
|
71
|
+
default: "input-variant-default",
|
|
72
|
+
success: "input-variant-success",
|
|
73
|
+
warning: "input-variant-warning",
|
|
74
|
+
error: "input-variant-error",
|
|
75
|
+
info: "input-variant-info"
|
|
76
|
+
};
|
|
77
|
+
return e[a] || e.default;
|
|
78
|
+
}
|
|
79
|
+
function ne(a) {
|
|
80
|
+
const e = {
|
|
81
|
+
default: "card-variant-default",
|
|
82
|
+
success: "card-variant-success",
|
|
83
|
+
warning: "card-variant-warning",
|
|
84
|
+
error: "card-variant-error",
|
|
85
|
+
info: "card-variant-info"
|
|
86
|
+
};
|
|
87
|
+
return e[a] || e.default;
|
|
88
|
+
}
|
|
89
|
+
function S(a, e) {
|
|
90
|
+
const r = {
|
|
91
|
+
default: `variant-${e}-default`,
|
|
92
|
+
success: `variant-${e}-success`,
|
|
93
|
+
warning: `variant-${e}-warning`,
|
|
94
|
+
error: `variant-${e}-error`,
|
|
95
|
+
info: `variant-${e}-info`
|
|
96
|
+
};
|
|
97
|
+
return r[a] || r.default;
|
|
98
|
+
}
|
|
99
|
+
function ie(a) {
|
|
100
|
+
return {
|
|
101
|
+
border: S(a, "border"),
|
|
102
|
+
text: S(a, "text"),
|
|
103
|
+
bg: S(a, "bg")
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function le(a, e) {
|
|
107
|
+
return a.reduce((r, d) => (r[d] = `${e}-${d}`, r), {});
|
|
108
|
+
}
|
|
109
|
+
var Z = B("<label> </label>"), $ = B("<div><!> <input/></div>");
|
|
110
|
+
function oe(a, e) {
|
|
111
|
+
const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, [
|
|
112
|
+
"value",
|
|
113
|
+
"type",
|
|
114
|
+
"label",
|
|
115
|
+
"placeholder",
|
|
116
|
+
"disabled",
|
|
117
|
+
"size",
|
|
118
|
+
"variant"
|
|
119
|
+
]);
|
|
120
|
+
R(e, !1);
|
|
121
|
+
const n = o(), u = o(), b = o(), v = o();
|
|
122
|
+
let p = s(e, "value", 12, ""), h = s(e, "type", 8, "text"), w = s(e, "label", 8, ""), _ = s(e, "placeholder", 8, ""), m = s(e, "disabled", 8, !1), x = s(e, "size", 8, "md"), z = s(e, "variant", 8, "default"), g = o();
|
|
123
|
+
typeof window < "u" ? i(g, `input-${Math.random().toString(36).substr(2, 9)}`) : i(g, `input-ssr-${Date.now()}`);
|
|
124
|
+
function N(c) {
|
|
125
|
+
const l = c.target;
|
|
126
|
+
p(l.value);
|
|
127
|
+
}
|
|
128
|
+
f(() => {
|
|
129
|
+
}, () => {
|
|
130
|
+
i(n, {
|
|
131
|
+
sm: "px-3 py-1.5 text-sm",
|
|
132
|
+
md: "px-4 py-2 text-sm",
|
|
133
|
+
lg: "px-5 py-3 text-base"
|
|
134
|
+
});
|
|
135
|
+
}), f(() => y(z()), () => {
|
|
136
|
+
i(u, U(z()));
|
|
137
|
+
}), f(
|
|
138
|
+
() => (t(n), y(x()), t(u)),
|
|
139
|
+
() => {
|
|
140
|
+
i(b, [
|
|
141
|
+
"w-full rounded-md transition-colors duration-200",
|
|
142
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
|
|
143
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
|
|
144
|
+
t(n)[x()],
|
|
145
|
+
t(u)
|
|
146
|
+
].join(" "));
|
|
147
|
+
}
|
|
148
|
+
), f(() => {
|
|
149
|
+
}, () => {
|
|
150
|
+
i(v, "block text-sm font-medium text-primary mb-1");
|
|
151
|
+
}), A(), T();
|
|
152
|
+
var I = $(), M = k(I);
|
|
153
|
+
{
|
|
154
|
+
var D = (c) => {
|
|
155
|
+
var l = Z(), P = k(l);
|
|
156
|
+
J(() => {
|
|
157
|
+
K(l, "for", t(g)), L(l, 1, O(t(v))), Q(P, w());
|
|
158
|
+
}), V(c, l);
|
|
159
|
+
};
|
|
160
|
+
F(M, (c) => {
|
|
161
|
+
w() && c(D);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
var j = H(M, 2);
|
|
165
|
+
q(
|
|
166
|
+
j,
|
|
167
|
+
() => ({
|
|
168
|
+
id: t(g),
|
|
169
|
+
type: h(),
|
|
170
|
+
value: p(),
|
|
171
|
+
placeholder: _(),
|
|
172
|
+
disabled: m(),
|
|
173
|
+
class: t(b),
|
|
174
|
+
...d
|
|
175
|
+
}),
|
|
176
|
+
void 0,
|
|
177
|
+
void 0,
|
|
178
|
+
void 0,
|
|
179
|
+
!0
|
|
180
|
+
), G("input", j, N), V(a, I), E();
|
|
181
|
+
}
|
|
182
|
+
var ee = B("<label> </label>"), te = B("<div><!> <textarea></textarea></div>");
|
|
183
|
+
function de(a, e) {
|
|
184
|
+
const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, [
|
|
185
|
+
"value",
|
|
186
|
+
"label",
|
|
187
|
+
"placeholder",
|
|
188
|
+
"disabled",
|
|
189
|
+
"rows",
|
|
190
|
+
"size",
|
|
191
|
+
"variant"
|
|
192
|
+
]);
|
|
193
|
+
R(e, !1);
|
|
194
|
+
const n = o(), u = o(), b = o(), v = o();
|
|
195
|
+
let p = s(e, "value", 12, ""), h = s(e, "label", 8, ""), w = s(e, "placeholder", 8, ""), _ = s(e, "disabled", 8, !1), m = s(e, "rows", 8, 4), x = s(e, "size", 8, "md"), z = s(e, "variant", 8, "default"), g = o();
|
|
196
|
+
typeof window < "u" ? i(g, `textarea-${Math.random().toString(36).substr(2, 9)}`) : i(g, `textarea-ssr-${Date.now()}`);
|
|
197
|
+
function N(c) {
|
|
198
|
+
const l = c.target;
|
|
199
|
+
p(l.value);
|
|
200
|
+
}
|
|
201
|
+
f(() => {
|
|
202
|
+
}, () => {
|
|
203
|
+
i(n, {
|
|
204
|
+
sm: "px-3 py-1.5 text-sm",
|
|
205
|
+
md: "px-4 py-2 text-sm",
|
|
206
|
+
lg: "px-5 py-3 text-base"
|
|
207
|
+
});
|
|
208
|
+
}), f(() => y(z()), () => {
|
|
209
|
+
i(u, U(z()));
|
|
210
|
+
}), f(
|
|
211
|
+
() => (t(n), y(x()), t(u)),
|
|
212
|
+
() => {
|
|
213
|
+
i(b, [
|
|
214
|
+
"w-full rounded-md transition-colors duration-200",
|
|
215
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
|
|
216
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
|
|
217
|
+
"resize-y",
|
|
218
|
+
t(n)[x()],
|
|
219
|
+
t(u)
|
|
220
|
+
].join(" "));
|
|
221
|
+
}
|
|
222
|
+
), f(() => {
|
|
223
|
+
}, () => {
|
|
224
|
+
i(v, "block text-sm font-medium text-primary mb-1");
|
|
225
|
+
}), A(), T();
|
|
226
|
+
var I = te(), M = k(I);
|
|
227
|
+
{
|
|
228
|
+
var D = (c) => {
|
|
229
|
+
var l = ee(), P = k(l);
|
|
230
|
+
J(() => {
|
|
231
|
+
K(l, "for", t(g)), L(l, 1, O(t(v))), Q(P, h());
|
|
232
|
+
}), V(c, l);
|
|
233
|
+
};
|
|
234
|
+
F(M, (c) => {
|
|
235
|
+
h() && c(D);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
var j = H(M, 2);
|
|
239
|
+
q(j, () => ({
|
|
240
|
+
id: t(g),
|
|
241
|
+
value: p(),
|
|
242
|
+
placeholder: w(),
|
|
243
|
+
disabled: _(),
|
|
244
|
+
rows: m(),
|
|
245
|
+
class: t(b),
|
|
246
|
+
...d
|
|
247
|
+
})), G("input", j, N), V(a, I), E();
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
re as B,
|
|
251
|
+
oe as I,
|
|
252
|
+
de as T,
|
|
253
|
+
ne as a,
|
|
254
|
+
S as b,
|
|
255
|
+
ie as c,
|
|
256
|
+
le as d,
|
|
257
|
+
se as e,
|
|
258
|
+
U as g
|
|
259
|
+
};
|
package/dist/atoms/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { B as s, C as o, a as r, H as t, O as T, P as g, S as l, b as m, T as p, c as d, d as i } from "../OptimizedImage-
|
|
2
|
-
import { B as
|
|
3
|
-
import { T as
|
|
1
|
+
import { B as s, C as o, a as r, H as t, O as T, P as g, S as l, b as m, T as p, c as d, d as i } from "../OptimizedImage-Dio4ZB9h.js";
|
|
2
|
+
import { B as x, I as B, T as c } from "../Textarea-DP1BihDh.js";
|
|
3
|
+
import { T as C } from "../ThemeToggle-Cm25ThjX.js";
|
|
4
4
|
export {
|
|
5
5
|
s as Badge,
|
|
6
|
-
|
|
6
|
+
x as Button,
|
|
7
7
|
o as Card,
|
|
8
|
-
c as Checkbox,
|
|
9
8
|
r as ColorPicker,
|
|
10
9
|
t as Heading,
|
|
11
|
-
|
|
10
|
+
B as Input,
|
|
12
11
|
T as OptimizedImage,
|
|
13
12
|
g as Progress,
|
|
14
13
|
l as Select,
|
|
15
14
|
m as Skeleton,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
c as Textarea,
|
|
16
|
+
C as ThemeToggle,
|
|
18
17
|
p as Toast,
|
|
19
18
|
d as Toggle,
|
|
20
19
|
i as Tooltip
|
package/dist/index/index.js
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import { B as d,
|
|
2
|
-
import { B as
|
|
3
|
-
import { T as
|
|
4
|
-
import { Alert as
|
|
5
|
-
import { N as
|
|
6
|
-
const t = (a = "id") => typeof window < "u" ? `${a}-${Math.random().toString(36).substr(2, 9)}` : `${a}-ssr-${Date.now()}`, s = (...a) => a.filter(Boolean).join(" "),
|
|
1
|
+
import { B as d, I as g, T as m, d as c, c as p, a as u, g as f, b as C } from "../Textarea-DP1BihDh.js";
|
|
2
|
+
import { B as x, C as b, a as I, H as w, O as B, P as D, S, b as V, T as $, c as F, d as v } from "../OptimizedImage-Dio4ZB9h.js";
|
|
3
|
+
import { T as N } from "../ThemeToggle-Cm25ThjX.js";
|
|
4
|
+
import { Alert as P, ContactForm as R, Dropdown as h, Form as j, ImageUpload as k, Layout as y, Modal as A, SlideUp as E, Tabs as H } from "../molecules/index.js";
|
|
5
|
+
import { N as q, a as z } from "../Navigation-BxP-osMQ.js";
|
|
6
|
+
const t = (a = "id") => typeof window < "u" ? `${a}-${Math.random().toString(36).substr(2, 9)}` : `${a}-ssr-${Date.now()}`, s = (...a) => a.filter(Boolean).join(" "), r = (a) => {
|
|
7
7
|
const e = new FormData(a);
|
|
8
8
|
return Object.fromEntries(e.entries());
|
|
9
|
-
},
|
|
9
|
+
}, o = (a) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a), n = (a) => a != null && a !== "";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
P as Alert,
|
|
12
|
+
x as Badge,
|
|
13
13
|
d as Button,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
R as Dropdown,
|
|
14
|
+
b as Card,
|
|
15
|
+
I as ColorPicker,
|
|
16
|
+
R as ContactForm,
|
|
17
|
+
h as Dropdown,
|
|
19
18
|
j as Form,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
w as Heading,
|
|
20
|
+
k as ImageUpload,
|
|
21
|
+
g as Input,
|
|
22
|
+
y as Layout,
|
|
23
|
+
A as Modal,
|
|
24
|
+
q as Navbar,
|
|
25
|
+
z as Navigation,
|
|
26
|
+
B as OptimizedImage,
|
|
27
|
+
D as Progress,
|
|
28
|
+
S as Select,
|
|
29
|
+
V as Skeleton,
|
|
30
|
+
E as SlideUp,
|
|
31
|
+
H as Tabs,
|
|
32
|
+
m as Textarea,
|
|
33
|
+
N as ThemeToggle,
|
|
34
|
+
$ as Toast,
|
|
35
|
+
F as Toggle,
|
|
36
|
+
v as Tooltip,
|
|
38
37
|
s as cn,
|
|
39
38
|
t as createId,
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
c as createVariantClassMap,
|
|
40
|
+
p as getAllVariantClasses,
|
|
42
41
|
u as getCardVariantClasses,
|
|
43
|
-
|
|
42
|
+
r as getFormData,
|
|
44
43
|
f as getInputVariantClasses,
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
C as getVariantClasses,
|
|
45
|
+
o as validateEmail,
|
|
47
46
|
n as validateRequired
|
|
48
47
|
};
|