zabi-components 2.0.4 → 2.1.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 +163 -176
- package/dist/Checkbox-Dwvh3lCd.js +302 -0
- package/dist/Navigation-BxP-osMQ.js +78 -0
- package/dist/OptimizedImage-8a380fXi.js +593 -0
- package/dist/ThemeToggle-Cm25ThjX.js +42 -0
- package/dist/atoms/index.js +3 -3
- package/dist/index/index.js +31 -31
- package/dist/molecules/index.js +517 -10
- package/dist/organisms/index.js +1 -1
- package/dist/props-B4BdFk2B.js +2339 -0
- package/package.json +1 -1
- package/dist/Checkbox-cOmcN4_d.js +0 -276
- package/dist/ContactForm-DKoAOLWp.js +0 -523
- package/dist/Navigation-BCY_oTq9.js +0 -79
- package/dist/OptimizedImage-AlFTGrwF.js +0 -584
- package/dist/ThemeToggle-Dgb0rEn7.js +0 -35
- package/dist/props-D1U_TNgY.js +0 -2026
|
@@ -1,584 +0,0 @@
|
|
|
1
|
-
import { Q as be, x as me, w as ge, R as he, T as _e, U as xe, j as i, C as X, D as K, i as D, f as m, a as j, t as _, q as ie, b as v, p as E, c as G, v as M, g as a, l as B, m as I, d as c, V as pe, h as q, n as T, E as Y, s as R, o as P, u as L, e as ee, r as ye, k as A, M as O, L as V } from "./props-D1U_TNgY.js";
|
|
2
|
-
import { a as we, e as ze } from "./Checkbox-cOmcN4_d.js";
|
|
3
|
-
import { createEventDispatcher as ve } from "svelte";
|
|
4
|
-
function ke() {
|
|
5
|
-
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
|
|
6
|
-
}
|
|
7
|
-
function te(r, e, n, l) {
|
|
8
|
-
var t = r.__style;
|
|
9
|
-
if (t !== e) {
|
|
10
|
-
var o = be(e);
|
|
11
|
-
o == null ? r.removeAttribute("style") : r.style.cssText = o, r.__style = e;
|
|
12
|
-
}
|
|
13
|
-
return l;
|
|
14
|
-
}
|
|
15
|
-
function de(r, e, n = !1) {
|
|
16
|
-
if (r.multiple) {
|
|
17
|
-
if (e == null)
|
|
18
|
-
return;
|
|
19
|
-
if (!_e(e))
|
|
20
|
-
return ke();
|
|
21
|
-
for (var l of r.options)
|
|
22
|
-
l.selected = e.includes(W(l));
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
for (l of r.options) {
|
|
26
|
-
var t = W(l);
|
|
27
|
-
if (xe(t, e)) {
|
|
28
|
-
l.selected = !0;
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
(!n || e !== void 0) && (r.selectedIndex = -1);
|
|
33
|
-
}
|
|
34
|
-
function Ce(r) {
|
|
35
|
-
var e = new MutationObserver(() => {
|
|
36
|
-
de(r, r.__value);
|
|
37
|
-
});
|
|
38
|
-
e.observe(r, {
|
|
39
|
-
// Listen to option element changes
|
|
40
|
-
childList: !0,
|
|
41
|
-
subtree: !0,
|
|
42
|
-
// because of <optgroup>
|
|
43
|
-
// Listen to option element value attribute changes
|
|
44
|
-
// (doesn't get notified of select value changes,
|
|
45
|
-
// because that property is not reflected as an attribute)
|
|
46
|
-
attributes: !0,
|
|
47
|
-
attributeFilter: ["value"]
|
|
48
|
-
}), he(() => {
|
|
49
|
-
e.disconnect();
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function Se(r, e, n = e) {
|
|
53
|
-
var l = !0;
|
|
54
|
-
me(r, "change", (t) => {
|
|
55
|
-
var o = t ? "[selected]" : ":checked", d;
|
|
56
|
-
if (r.multiple)
|
|
57
|
-
d = [].map.call(r.querySelectorAll(o), W);
|
|
58
|
-
else {
|
|
59
|
-
var u = r.querySelector(o) ?? // will fall back to first non-disabled option if no option is selected
|
|
60
|
-
r.querySelector("option:not([disabled])");
|
|
61
|
-
d = u && W(u);
|
|
62
|
-
}
|
|
63
|
-
n(d);
|
|
64
|
-
}), ge(() => {
|
|
65
|
-
var t = e();
|
|
66
|
-
if (de(r, t, l), l && t === void 0) {
|
|
67
|
-
var o = r.querySelector(":checked");
|
|
68
|
-
o !== null && (t = W(o), n(t));
|
|
69
|
-
}
|
|
70
|
-
r.__value = t, l = !1;
|
|
71
|
-
}), Ce(r);
|
|
72
|
-
}
|
|
73
|
-
function W(r) {
|
|
74
|
-
return "__value" in r ? r.__value : r.value;
|
|
75
|
-
}
|
|
76
|
-
var je = m('<label class="block text-sm font-medium text-gray-700 mb-1"> </label>'), Te = m("<option disabled> </option>"), Me = m("<option> </option>"), qe = m("<div><!> <select><!><!></select></div>");
|
|
77
|
-
function nt(r, e) {
|
|
78
|
-
G(e, !1);
|
|
79
|
-
const n = I(), l = I();
|
|
80
|
-
let t = i(e, "value", 12, void 0), o = i(e, "options", 24, () => []), d = i(e, "placeholder", 8, "Select an option"), u = i(e, "label", 8, ""), b = i(e, "disabled", 8, !1), k = i(e, "size", 8, "md");
|
|
81
|
-
const x = `select-${Math.random().toString(36).substr(2, 9)}`;
|
|
82
|
-
X(() => {
|
|
83
|
-
}, () => {
|
|
84
|
-
R(n, {
|
|
85
|
-
sm: "px-3 py-1.5 text-sm",
|
|
86
|
-
md: "px-4 py-2 text-sm",
|
|
87
|
-
lg: "px-5 py-3 text-base"
|
|
88
|
-
});
|
|
89
|
-
}), X(() => (a(n), M(k())), () => {
|
|
90
|
-
R(l, [
|
|
91
|
-
"w-full border border-gray-300 rounded-md bg-white",
|
|
92
|
-
"focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
|
|
93
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
94
|
-
a(n)[k()]
|
|
95
|
-
].join(" "));
|
|
96
|
-
}), K(), D();
|
|
97
|
-
var p = qe(), s = c(p);
|
|
98
|
-
{
|
|
99
|
-
var g = (y) => {
|
|
100
|
-
var z = je(), C = c(z);
|
|
101
|
-
_(() => {
|
|
102
|
-
q(z, "for", x), P(C, u());
|
|
103
|
-
}), v(y, z);
|
|
104
|
-
};
|
|
105
|
-
j(s, (y) => {
|
|
106
|
-
u() && y(g);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
var f = B(s, 2);
|
|
110
|
-
_(() => {
|
|
111
|
-
t(), pe(() => {
|
|
112
|
-
b(), a(l), d(), o();
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
var h = c(f);
|
|
116
|
-
{
|
|
117
|
-
var w = (y) => {
|
|
118
|
-
var z = Te(), C = c(z);
|
|
119
|
-
z.value = z.__value = "", _(() => P(C, d())), v(y, z);
|
|
120
|
-
};
|
|
121
|
-
j(h, (y) => {
|
|
122
|
-
d() && !t() && y(w);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
var S = B(h);
|
|
126
|
-
ie(S, 1, o, (y) => y.value, (y, z) => {
|
|
127
|
-
var C = Me(), N = c(C), H = {};
|
|
128
|
-
_(() => {
|
|
129
|
-
C.disabled = (a(z), L(() => a(z).disabled)), P(N, (a(z), L(() => a(z).label))), H !== (H = (a(z), L(() => a(z).value))) && (C.value = (C.__value = (a(z), L(() => a(z).value))) ?? "");
|
|
130
|
-
}), v(y, C);
|
|
131
|
-
}), _(() => {
|
|
132
|
-
q(f, "id", x), f.disabled = b(), T(f, 1, Y(a(l)));
|
|
133
|
-
}), Se(f, t), v(r, p), E();
|
|
134
|
-
}
|
|
135
|
-
var Be = m('<span class="text-sm font-medium text-gray-700"> </span>'), Pe = m('<div class="flex items-center gap-3"><button type="button" role="switch"><span></span></button> <!></div>');
|
|
136
|
-
function st(r, e) {
|
|
137
|
-
G(e, !1);
|
|
138
|
-
const n = I(), l = I();
|
|
139
|
-
let t = i(e, "checked", 12, !1), o = i(e, "disabled", 8, !1), d = i(e, "label", 8, "");
|
|
140
|
-
X(() => (M(t()), M(o())), () => {
|
|
141
|
-
R(n, [
|
|
142
|
-
"relative inline-flex w-11 h-6 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent",
|
|
143
|
-
"transition-colors duration-200 ease-in-out",
|
|
144
|
-
"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
145
|
-
t() ? "bg-blue-600" : "bg-gray-200",
|
|
146
|
-
o() ? "opacity-50 cursor-not-allowed" : ""
|
|
147
|
-
].join(" "));
|
|
148
|
-
}), X(() => M(t()), () => {
|
|
149
|
-
R(l, [
|
|
150
|
-
"pointer-events-none inline-block w-5 h-5 transform rounded-full bg-white shadow-lg",
|
|
151
|
-
"transition duration-200 ease-in-out",
|
|
152
|
-
t() ? "translate-x-5" : "translate-x-0"
|
|
153
|
-
].join(" "));
|
|
154
|
-
}), K(), D();
|
|
155
|
-
var u = Pe(), b = c(u), k = c(b), x = B(b, 2);
|
|
156
|
-
{
|
|
157
|
-
var p = (s) => {
|
|
158
|
-
var g = Be(), f = c(g);
|
|
159
|
-
_(() => P(f, d())), v(s, g);
|
|
160
|
-
};
|
|
161
|
-
j(x, (s) => {
|
|
162
|
-
d() && s(p);
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
_(() => {
|
|
166
|
-
q(b, "aria-checked", t()), q(b, "aria-label", d() || "Toggle"), b.disabled = o(), T(b, 1, Y(a(n))), T(k, 1, Y(a(l)));
|
|
167
|
-
}), ee("click", b, () => t(!t())), v(r, u), E();
|
|
168
|
-
}
|
|
169
|
-
var Ie = m('<label class="block text-sm font-medium text-gray-700"> </label>'), Re = m('<span class="text-white text-lg">✓</span>'), Xe = m('<button type="button" role="radio"><!></button>'), Ye = m('<div class="space-y-2"><!> <div class="grid grid-cols-4 gap-2" role="radiogroup"></div></div>');
|
|
170
|
-
function it(r, e) {
|
|
171
|
-
G(e, !1);
|
|
172
|
-
let n = i(e, "value", 12, ""), l = i(e, "label", 8, ""), t = i(e, "disabled", 8, !1);
|
|
173
|
-
const o = [
|
|
174
|
-
{ label: "Red", value: "#ef4444" },
|
|
175
|
-
{ label: "Blue", value: "#3b82f6" },
|
|
176
|
-
{ label: "Green", value: "#10b981" },
|
|
177
|
-
{ label: "Yellow", value: "#f59e0b" },
|
|
178
|
-
{ label: "Purple", value: "#8b5cf6" },
|
|
179
|
-
{ label: "Pink", value: "#ec4899" },
|
|
180
|
-
{ label: "Gray", value: "#6b7280" },
|
|
181
|
-
{ label: "Black", value: "#000000" }
|
|
182
|
-
], d = `color-picker-${Math.random().toString(36).substr(2, 9)}`;
|
|
183
|
-
D();
|
|
184
|
-
var u = Ye(), b = c(u);
|
|
185
|
-
{
|
|
186
|
-
var k = (p) => {
|
|
187
|
-
var s = Ie(), g = c(s);
|
|
188
|
-
_(() => {
|
|
189
|
-
q(s, "for", d), P(g, l());
|
|
190
|
-
}), v(p, s);
|
|
191
|
-
};
|
|
192
|
-
j(b, (p) => {
|
|
193
|
-
l() && p(k);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
var x = B(b, 2);
|
|
197
|
-
ie(x, 5, () => o, ye, (p, s) => {
|
|
198
|
-
var g = Xe(), f = c(g);
|
|
199
|
-
{
|
|
200
|
-
var h = (w) => {
|
|
201
|
-
var S = Re();
|
|
202
|
-
v(w, S);
|
|
203
|
-
};
|
|
204
|
-
j(f, (w) => {
|
|
205
|
-
M(n()), a(s), L(() => n() === a(s).value) && w(h);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
_(() => {
|
|
209
|
-
T(g, 1, `w-12 h-12 rounded-lg border-2 transition-all ${M(n()), a(s), L(() => n() === a(s).value ? "border-blue-500 ring-2 ring-blue-200" : "border-gray-300 hover:border-gray-400") ?? ""}`), te(g, `background-color: ${a(s), L(() => a(s).value) ?? ""};`), g.disabled = t(), q(g, "aria-checked", (M(n()), a(s), L(() => n() === a(s).value))), q(g, "aria-label", (a(s), L(() => a(s).label)));
|
|
210
|
-
}), ee("click", g, () => n(a(s).value)), v(p, g);
|
|
211
|
-
}), _(() => q(x, "id", d)), v(r, u), E();
|
|
212
|
-
}
|
|
213
|
-
var Le = m('<img class="w-full h-48 object-cover rounded-md mb-4"/>'), Ne = m("<h3> </h3>"), Ae = m("<div><!> <!> <!></div>");
|
|
214
|
-
function vt(r, e) {
|
|
215
|
-
G(e, !1);
|
|
216
|
-
const n = I(), l = I(), t = I(), o = I();
|
|
217
|
-
let d = i(e, "title", 8, ""), u = i(e, "image", 8, ""), b = i(e, "interactive", 8, !1), k = i(e, "variant", 8, "default"), x = i(e, "size", 8, "md");
|
|
218
|
-
X(() => {
|
|
219
|
-
}, () => {
|
|
220
|
-
R(n, { sm: "p-3", md: "p-4", lg: "p-6" });
|
|
221
|
-
}), X(() => M(k()), () => {
|
|
222
|
-
R(l, we(k()));
|
|
223
|
-
}), X(
|
|
224
|
-
() => (M(b()), a(n), M(x()), a(l)),
|
|
225
|
-
() => {
|
|
226
|
-
R(t, [
|
|
227
|
-
"rounded-lg transition-all duration-200",
|
|
228
|
-
"hover:shadow-adaptive-md",
|
|
229
|
-
b() ? "cursor-pointer hover:scale-[1.02]" : "",
|
|
230
|
-
a(n)[x()],
|
|
231
|
-
a(l)
|
|
232
|
-
].join(" "));
|
|
233
|
-
}
|
|
234
|
-
), X(() => {
|
|
235
|
-
}, () => {
|
|
236
|
-
R(o, "text-lg font-semibold mb-2 text-primary");
|
|
237
|
-
}), K(), D();
|
|
238
|
-
var p = Ae(), s = c(p);
|
|
239
|
-
{
|
|
240
|
-
var g = (S) => {
|
|
241
|
-
var y = Le();
|
|
242
|
-
_(() => {
|
|
243
|
-
q(y, "src", u()), q(y, "alt", d());
|
|
244
|
-
}), v(S, y);
|
|
245
|
-
};
|
|
246
|
-
j(s, (S) => {
|
|
247
|
-
u() && S(g);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
var f = B(s, 2);
|
|
251
|
-
{
|
|
252
|
-
var h = (S) => {
|
|
253
|
-
var y = Ne(), z = c(y);
|
|
254
|
-
_(() => {
|
|
255
|
-
T(y, 1, Y(a(o))), P(z, d());
|
|
256
|
-
}), v(S, y);
|
|
257
|
-
};
|
|
258
|
-
j(f, (S) => {
|
|
259
|
-
d() && S(h);
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
var w = B(f, 2);
|
|
263
|
-
A(w, e, "default", {}), _(() => T(p, 1, Y(a(t)))), v(r, p), E();
|
|
264
|
-
}
|
|
265
|
-
var Oe = m('<button type="button"><!> <span class="ml-1 text-xs">×</span></button>'), Ve = m("<span><!></span>");
|
|
266
|
-
function dt(r, e) {
|
|
267
|
-
G(e, !1);
|
|
268
|
-
const n = I(), l = I(), t = I();
|
|
269
|
-
let o = i(e, "variant", 8, "default"), d = i(e, "size", 8, "md"), u = i(e, "closable", 8, !1);
|
|
270
|
-
const b = ve();
|
|
271
|
-
function k(f) {
|
|
272
|
-
f.stopPropagation(), b("close", { event: f });
|
|
273
|
-
}
|
|
274
|
-
X(() => {
|
|
275
|
-
}, () => {
|
|
276
|
-
R(n, {
|
|
277
|
-
sm: "px-2 py-0.5 text-xs",
|
|
278
|
-
md: "px-3 py-1 text-sm",
|
|
279
|
-
lg: "px-4 py-1.5 text-base"
|
|
280
|
-
});
|
|
281
|
-
}), X(() => {
|
|
282
|
-
}, () => {
|
|
283
|
-
R(l, {
|
|
284
|
-
default: "bg-gray-100 text-gray-800 border-gray-300",
|
|
285
|
-
success: "bg-green-100 text-green-800 border-green-300",
|
|
286
|
-
warning: "bg-yellow-100 text-yellow-800 border-yellow-300",
|
|
287
|
-
error: "bg-red-100 text-red-800 border-red-300",
|
|
288
|
-
info: "bg-blue-100 text-blue-800 border-blue-300"
|
|
289
|
-
});
|
|
290
|
-
}), X(
|
|
291
|
-
() => (a(n), M(d()), a(l), M(o()), M(u())),
|
|
292
|
-
() => {
|
|
293
|
-
R(t, [
|
|
294
|
-
"inline-flex items-center gap-1 font-medium border rounded-md",
|
|
295
|
-
a(n)[d()],
|
|
296
|
-
a(l)[o()],
|
|
297
|
-
u() ? "cursor-pointer hover:opacity-80" : ""
|
|
298
|
-
].join(" "));
|
|
299
|
-
}
|
|
300
|
-
), K(), D();
|
|
301
|
-
var x = O(), p = V(x);
|
|
302
|
-
{
|
|
303
|
-
var s = (f) => {
|
|
304
|
-
var h = Oe(), w = c(h);
|
|
305
|
-
A(w, e, "default", {}), _(() => T(h, 1, Y(a(t)))), ee("click", h, k), v(f, h);
|
|
306
|
-
}, g = (f) => {
|
|
307
|
-
var h = Ve(), w = c(h);
|
|
308
|
-
A(w, e, "default", {}), _(() => T(h, 1, Y(a(t)))), v(f, h);
|
|
309
|
-
};
|
|
310
|
-
j(p, (f) => {
|
|
311
|
-
u() ? f(s) : f(g, !1);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
v(r, x), E();
|
|
315
|
-
}
|
|
316
|
-
var De = m("<h1> <!></h1>"), Ee = m("<h2> <!></h2>"), Ge = m("<h3> <!></h3>"), He = m("<h4> <!></h4>"), Fe = m("<h5> <!></h5>"), Qe = m("<h6> <!></h6>");
|
|
317
|
-
function ut(r, e) {
|
|
318
|
-
G(e, !1);
|
|
319
|
-
const n = I(), l = I();
|
|
320
|
-
let t = i(e, "level", 8, 1), o = i(e, "text", 8, "");
|
|
321
|
-
X(() => {
|
|
322
|
-
}, () => {
|
|
323
|
-
R(n, {
|
|
324
|
-
1: "text-4xl font-bold",
|
|
325
|
-
2: "text-3xl font-bold",
|
|
326
|
-
3: "text-2xl font-semibold",
|
|
327
|
-
4: "text-xl font-semibold",
|
|
328
|
-
5: "text-lg font-medium",
|
|
329
|
-
6: "text-base font-medium"
|
|
330
|
-
});
|
|
331
|
-
}), X(() => (a(n), M(t())), () => {
|
|
332
|
-
R(l, ["text-gray-900", a(n)[t()]].join(" "));
|
|
333
|
-
}), K(), D();
|
|
334
|
-
var d = O(), u = V(d);
|
|
335
|
-
{
|
|
336
|
-
var b = (x) => {
|
|
337
|
-
var p = De(), s = c(p), g = B(s);
|
|
338
|
-
A(g, e, "default", {}), _(() => {
|
|
339
|
-
T(p, 1, Y(a(l))), P(s, o());
|
|
340
|
-
}), v(x, p);
|
|
341
|
-
}, k = (x) => {
|
|
342
|
-
var p = O(), s = V(p);
|
|
343
|
-
{
|
|
344
|
-
var g = (h) => {
|
|
345
|
-
var w = Ee(), S = c(w), y = B(S);
|
|
346
|
-
A(y, e, "default", {}), _(() => {
|
|
347
|
-
T(w, 1, Y(a(l))), P(S, o());
|
|
348
|
-
}), v(h, w);
|
|
349
|
-
}, f = (h) => {
|
|
350
|
-
var w = O(), S = V(w);
|
|
351
|
-
{
|
|
352
|
-
var y = (C) => {
|
|
353
|
-
var N = Ge(), H = c(N), ae = B(H);
|
|
354
|
-
A(ae, e, "default", {}), _(() => {
|
|
355
|
-
T(N, 1, Y(a(l))), P(H, o());
|
|
356
|
-
}), v(C, N);
|
|
357
|
-
}, z = (C) => {
|
|
358
|
-
var N = O(), H = V(N);
|
|
359
|
-
{
|
|
360
|
-
var ae = (F) => {
|
|
361
|
-
var Q = He(), Z = c(Q), re = B(Z);
|
|
362
|
-
A(re, e, "default", {}), _(() => {
|
|
363
|
-
T(Q, 1, Y(a(l))), P(Z, o());
|
|
364
|
-
}), v(F, Q);
|
|
365
|
-
}, ue = (F) => {
|
|
366
|
-
var Q = O(), Z = V(Q);
|
|
367
|
-
{
|
|
368
|
-
var re = (U) => {
|
|
369
|
-
var J = Fe(), $ = c(J), le = B($);
|
|
370
|
-
A(le, e, "default", {}), _(() => {
|
|
371
|
-
T(J, 1, Y(a(l))), P($, o());
|
|
372
|
-
}), v(U, J);
|
|
373
|
-
}, ce = (U) => {
|
|
374
|
-
var J = O(), $ = V(J);
|
|
375
|
-
{
|
|
376
|
-
var le = (oe) => {
|
|
377
|
-
var ne = Qe(), se = c(ne), fe = B(se);
|
|
378
|
-
A(fe, e, "default", {}), _(() => {
|
|
379
|
-
T(ne, 1, Y(a(l))), P(se, o());
|
|
380
|
-
}), v(oe, ne);
|
|
381
|
-
};
|
|
382
|
-
j(
|
|
383
|
-
$,
|
|
384
|
-
(oe) => {
|
|
385
|
-
t() === 6 && oe(le);
|
|
386
|
-
},
|
|
387
|
-
!0
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
v(U, J);
|
|
391
|
-
};
|
|
392
|
-
j(
|
|
393
|
-
Z,
|
|
394
|
-
(U) => {
|
|
395
|
-
t() === 5 ? U(re) : U(ce, !1);
|
|
396
|
-
},
|
|
397
|
-
!0
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
v(F, Q);
|
|
401
|
-
};
|
|
402
|
-
j(
|
|
403
|
-
H,
|
|
404
|
-
(F) => {
|
|
405
|
-
t() === 4 ? F(ae) : F(ue, !1);
|
|
406
|
-
},
|
|
407
|
-
!0
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
v(C, N);
|
|
411
|
-
};
|
|
412
|
-
j(
|
|
413
|
-
S,
|
|
414
|
-
(C) => {
|
|
415
|
-
t() === 3 ? C(y) : C(z, !1);
|
|
416
|
-
},
|
|
417
|
-
!0
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
v(h, w);
|
|
421
|
-
};
|
|
422
|
-
j(
|
|
423
|
-
s,
|
|
424
|
-
(h) => {
|
|
425
|
-
t() === 2 ? h(g) : h(f, !1);
|
|
426
|
-
},
|
|
427
|
-
!0
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
v(x, p);
|
|
431
|
-
};
|
|
432
|
-
j(u, (x) => {
|
|
433
|
-
t() === 1 ? x(b) : x(k, !1);
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
v(r, d), E();
|
|
437
|
-
}
|
|
438
|
-
var Ue = m('<div class="flex justify-between items-center mb-2"><label class="text-sm font-medium text-gray-700"> </label> <span class="text-sm text-gray-500"> </span></div>'), Je = m('<div><!> <div role="progressbar" aria-valuemin="0"><div class="h-full bg-blue-600 rounded-full"></div></div></div>');
|
|
439
|
-
function ct(r, e) {
|
|
440
|
-
G(e, !1);
|
|
441
|
-
const n = I(), l = I();
|
|
442
|
-
let t = i(e, "value", 8, 0), o = i(e, "max", 8, 100), d = i(e, "size", 8, "md"), u = i(e, "label", 8, "");
|
|
443
|
-
const b = `progress-${Math.random().toString(36).substr(2, 9)}`;
|
|
444
|
-
X(() => (M(t()), M(o())), () => {
|
|
445
|
-
R(n, Math.min(Math.max(t() / o() * 100, 0), 100));
|
|
446
|
-
}), X(() => {
|
|
447
|
-
}, () => {
|
|
448
|
-
R(l, { sm: "h-1", md: "h-2", lg: "h-3" });
|
|
449
|
-
}), K(), D();
|
|
450
|
-
var k = Je(), x = c(k);
|
|
451
|
-
{
|
|
452
|
-
var p = (f) => {
|
|
453
|
-
var h = Ue(), w = c(h), S = c(w), y = B(w, 2), z = c(y);
|
|
454
|
-
_(
|
|
455
|
-
(C) => {
|
|
456
|
-
q(w, "for", b), P(S, u()), P(z, `${C ?? ""}%`);
|
|
457
|
-
},
|
|
458
|
-
[
|
|
459
|
-
() => (a(n), L(() => Math.round(a(n))))
|
|
460
|
-
]
|
|
461
|
-
), v(f, h);
|
|
462
|
-
};
|
|
463
|
-
j(x, (f) => {
|
|
464
|
-
u() && f(p);
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
var s = B(x, 2), g = c(s);
|
|
468
|
-
_(() => {
|
|
469
|
-
q(s, "id", b), T(s, 1, `w-full bg-gray-200 rounded-full overflow-hidden ${a(l), M(d()), L(() => a(l)[d()]) ?? ""}`), q(s, "aria-valuenow", t()), q(s, "aria-valuemax", o()), te(g, `width: ${a(n) ?? ""}%`);
|
|
470
|
-
}), v(r, k), E();
|
|
471
|
-
}
|
|
472
|
-
var Ke = m("<div></div>");
|
|
473
|
-
function ft(r, e) {
|
|
474
|
-
let n = i(e, "width", 8, "100%"), l = i(e, "height", 8, "1rem"), t = i(e, "className", 8, "");
|
|
475
|
-
var o = Ke();
|
|
476
|
-
_(() => {
|
|
477
|
-
T(o, 1, `animate-pulse bg-gray-200 rounded ${t() ?? ""}`), te(o, `width: ${n() ?? ""}; height: ${l() ?? ""};`);
|
|
478
|
-
}), v(r, o);
|
|
479
|
-
}
|
|
480
|
-
var We = m('<button type="button" class="ml-3 text-gray-400 hover:text-gray-600" aria-label="Close notification">×</button>'), Ze = m('<div class="fixed top-4 right-4 max-w-sm w-full bg-white border rounded-lg shadow-lg p-4 z-50" role="alert"><div class="flex items-start"><div class="flex-1"><p> </p></div> <!></div></div>');
|
|
481
|
-
function bt(r, e) {
|
|
482
|
-
G(e, !1);
|
|
483
|
-
let n = i(e, "message", 8, ""), l = i(e, "type", 8, "info"), t = i(e, "closable", 8, !0);
|
|
484
|
-
const o = ve();
|
|
485
|
-
let d = I(!0);
|
|
486
|
-
const u = {
|
|
487
|
-
success: "bg-green-100 border-green-300 text-green-800",
|
|
488
|
-
error: "bg-red-100 border-red-300 text-red-800",
|
|
489
|
-
warning: "bg-yellow-100 border-yellow-300 text-yellow-800",
|
|
490
|
-
info: "bg-blue-100 border-blue-300 text-blue-800"
|
|
491
|
-
};
|
|
492
|
-
function b() {
|
|
493
|
-
R(d, !1), o("close");
|
|
494
|
-
}
|
|
495
|
-
D();
|
|
496
|
-
var k = O(), x = V(k);
|
|
497
|
-
{
|
|
498
|
-
var p = (s) => {
|
|
499
|
-
var g = Ze(), f = c(g), h = c(f), w = c(h), S = c(w), y = B(h, 2);
|
|
500
|
-
{
|
|
501
|
-
var z = (C) => {
|
|
502
|
-
var N = We();
|
|
503
|
-
ee("click", N, b), v(C, N);
|
|
504
|
-
};
|
|
505
|
-
j(y, (C) => {
|
|
506
|
-
t() && C(z);
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
_(() => {
|
|
510
|
-
T(w, 1, `text-sm ${M(l()), L(() => u[l()]) ?? ""}`), P(S, n());
|
|
511
|
-
}), v(s, g);
|
|
512
|
-
};
|
|
513
|
-
j(x, (s) => {
|
|
514
|
-
a(d) && s(p);
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
v(r, k), E();
|
|
518
|
-
}
|
|
519
|
-
var $e = m('<div class="tooltip group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible svelte-13nzt82"> </div>'), et = m('<div class="tooltip-container group relative inline-block svelte-13nzt82"><!> <!></div>');
|
|
520
|
-
const tt = {
|
|
521
|
-
hash: "svelte-13nzt82",
|
|
522
|
-
code: `.tooltip-container.svelte-13nzt82 {position:relative;display:inline-block;}.tooltip.svelte-13nzt82 {position:absolute;z-index:50;padding:0.5rem 0.75rem;background-color:#1f2937;color:white;border-radius:0.375rem;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out,
|
|
523
|
-
visibility 0.2s ease-in-out;pointer-events:none;max-width:200px;word-wrap:break-word;white-space:normal;}
|
|
524
|
-
|
|
525
|
-
/* Top placement */.tooltip-container[data-placement="top"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:0.5rem;}
|
|
526
|
-
|
|
527
|
-
/* Bottom placement */.tooltip-container[data-placement="bottom"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {top:100%;left:50%;transform:translateX(-50%);margin-top:0.5rem;}
|
|
528
|
-
|
|
529
|
-
/* Left placement */.tooltip-container[data-placement="left"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {right:100%;top:50%;transform:translateY(-50%);margin-right:0.5rem;}
|
|
530
|
-
|
|
531
|
-
/* Right placement */.tooltip-container[data-placement="right"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {left:100%;top:50%;transform:translateY(-50%);margin-left:0.5rem;}
|
|
532
|
-
|
|
533
|
-
/* Arrow styles using CSS pseudo-elements */.tooltip.svelte-13nzt82::before {content:"";position:absolute;width:0;height:0;border:4px solid transparent;}
|
|
534
|
-
|
|
535
|
-
/* Top arrow */.tooltip-container[data-placement="top"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {top:100%;left:50%;transform:translateX(-50%);border-top-color:#1f2937;}
|
|
536
|
-
|
|
537
|
-
/* Bottom arrow */.tooltip-container[data-placement="bottom"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {bottom:100%;left:50%;transform:translateX(-50%);border-bottom-color:#1f2937;}
|
|
538
|
-
|
|
539
|
-
/* Left arrow */.tooltip-container[data-placement="left"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {left:100%;top:50%;transform:translateY(-50%);border-left-color:#1f2937;}
|
|
540
|
-
|
|
541
|
-
/* Right arrow */.tooltip-container[data-placement="right"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {right:100%;top:50%;transform:translateY(-50%);border-right-color:#1f2937;}
|
|
542
|
-
|
|
543
|
-
/* Responsive adjustments */
|
|
544
|
-
@media (max-width: 640px) {.tooltip.svelte-13nzt82 {max-width:calc(100vw - 2rem);left:50% !important;right:auto !important;transform:translateX(-50%) !important;margin:0.5rem 0 !important;}.tooltip.svelte-13nzt82::before {display:none;}
|
|
545
|
-
}`
|
|
546
|
-
};
|
|
547
|
-
function mt(r, e) {
|
|
548
|
-
ze(r, tt);
|
|
549
|
-
let n = i(e, "content", 8, ""), l = i(e, "placement", 8, "top");
|
|
550
|
-
var t = et(), o = c(t);
|
|
551
|
-
A(o, e, "default", {});
|
|
552
|
-
var d = B(o, 2);
|
|
553
|
-
{
|
|
554
|
-
var u = (b) => {
|
|
555
|
-
var k = $e(), x = c(k);
|
|
556
|
-
_(() => P(x, n())), v(b, k);
|
|
557
|
-
};
|
|
558
|
-
j(d, (b) => {
|
|
559
|
-
n() && b(u);
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
_(() => q(t, "data-placement", l())), v(r, t);
|
|
563
|
-
}
|
|
564
|
-
var at = m('<img loading="lazy"/>');
|
|
565
|
-
function gt(r, e) {
|
|
566
|
-
let n = i(e, "src", 8), l = i(e, "alt", 8, ""), t = i(e, "width", 8, "100%"), o = i(e, "height", 8, "auto"), d = i(e, "className", 8, "");
|
|
567
|
-
var u = at();
|
|
568
|
-
_(() => {
|
|
569
|
-
q(u, "src", n()), q(u, "alt", l()), T(u, 1, `w-full h-auto object-cover ${d() ?? ""}`), te(u, `width: ${(typeof t() == "number" ? t() + "px" : t()) ?? ""}; height: ${(typeof o() == "number" ? o() + "px" : o()) ?? ""};`);
|
|
570
|
-
}), v(r, u);
|
|
571
|
-
}
|
|
572
|
-
export {
|
|
573
|
-
dt as B,
|
|
574
|
-
vt as C,
|
|
575
|
-
ut as H,
|
|
576
|
-
gt as O,
|
|
577
|
-
ct as P,
|
|
578
|
-
nt as S,
|
|
579
|
-
bt as T,
|
|
580
|
-
it as a,
|
|
581
|
-
ft as b,
|
|
582
|
-
st as c,
|
|
583
|
-
mt as d
|
|
584
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { s as c, g as s, i as h, f as n, a as p, t as b, e as v, b as r, p as k, c as _, m as T, d as w, h as x } from "./props-D1U_TNgY.js";
|
|
2
|
-
import { onMount as y } from "svelte";
|
|
3
|
-
var S = n('<span class="text-lg">☀️</span>'), D = n('<span class="text-lg">🌙</span>'), E = n('<button 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"><!></button>');
|
|
4
|
-
function M(m, i) {
|
|
5
|
-
_(i, !1);
|
|
6
|
-
let t = T(!1);
|
|
7
|
-
y(() => {
|
|
8
|
-
const e = localStorage.getItem("theme"), a = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
9
|
-
c(t, e === "dark" || !e && a), l();
|
|
10
|
-
});
|
|
11
|
-
function d() {
|
|
12
|
-
c(t, !s(t)), l(), localStorage.setItem("theme", s(t) ? "dark" : "light");
|
|
13
|
-
}
|
|
14
|
-
function l() {
|
|
15
|
-
s(t) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
16
|
-
}
|
|
17
|
-
h();
|
|
18
|
-
var o = E(), u = w(o);
|
|
19
|
-
{
|
|
20
|
-
var f = (e) => {
|
|
21
|
-
var a = S();
|
|
22
|
-
r(e, a);
|
|
23
|
-
}, g = (e) => {
|
|
24
|
-
var a = D();
|
|
25
|
-
r(e, a);
|
|
26
|
-
};
|
|
27
|
-
p(u, (e) => {
|
|
28
|
-
s(t) ? e(f) : e(g, !1);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
b(() => x(o, "aria-label", s(t) ? "Switch to light mode" : "Switch to dark mode")), v("click", o, d), r(m, o), k();
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
M as T
|
|
35
|
-
};
|