zabi-components 1.0.9 → 2.0.2
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 +38 -22
- package/dist/Card-BIAsG5HX.js +222 -0
- package/dist/Navigation-BoOnkbXw.js +81 -0
- package/dist/Tabs-DXN_BqPw.js +509 -0
- package/dist/ThemeToggle-CRI92cOb.js +35 -0
- package/dist/Tooltip-C9G35OZ6.js +1230 -0
- package/dist/atoms/index.js +23 -21
- package/dist/index/index.js +451 -185
- package/dist/molecules/index.js +12 -12
- package/dist/organisms/index.js +2 -3
- package/dist/store-ZmZCXeMy.js +2413 -0
- package/package.json +17 -12
- package/dist/Tabs-DTuXgJQh.js +0 -1105
- package/dist/Toast-1EMgTOM4.js +0 -417
- package/dist/ToastManager-ZcovxilX.js +0 -354
- package/dist/Toggle-kQ6Z43Ep.js +0 -2509
- package/dist/Tooltip-gkAHhbjD.js +0 -1152
- package/dist/x-Dsi-CPO3.js +0 -3073
package/dist/Tabs-DTuXgJQh.js
DELETED
|
@@ -1,1105 +0,0 @@
|
|
|
1
|
-
import { t as q, T as Pe, U as Ue, V as Fe, W as Ne, Y as be, p as g, C as ue, D as Ce, i as re, f as w, c as M, s as me, g as v, h as se, j as oe, r as F, o as y, n as i, u as d, l as e, m as K, q as X, v as ae, k as T, e as te, B as G, a as fe, E as pe, S as _e, b as Z, R as ze, Q as de, Z as Le, w as ne, d as we, P as Ie, _ as ye, G as Ae, F as Re, $ as Te, x as He, y as Ke, A as Oe } from "./x-Dsi-CPO3.js";
|
|
2
|
-
import { r as Me, C as Ve, I as ke, B as ve, T as We, S as Ge, a as Ye, d as Qe, b as Ze, c as Je } from "./Toggle-kQ6Z43Ep.js";
|
|
3
|
-
import { createEventDispatcher as ie, onMount as Xe, onDestroy as et } from "svelte";
|
|
4
|
-
function tt(o, a, s = !1, m = !1, f = !1) {
|
|
5
|
-
var r = o, b = "";
|
|
6
|
-
q(() => {
|
|
7
|
-
var n = (
|
|
8
|
-
/** @type {Effect} */
|
|
9
|
-
Pe
|
|
10
|
-
);
|
|
11
|
-
if (b !== (b = a() ?? "") && (n.nodes_start !== null && (Ue(
|
|
12
|
-
n.nodes_start,
|
|
13
|
-
/** @type {TemplateNode} */
|
|
14
|
-
n.nodes_end
|
|
15
|
-
), n.nodes_start = n.nodes_end = null), b !== "")) {
|
|
16
|
-
var t = b + "";
|
|
17
|
-
s ? t = `<svg>${t}</svg>` : m && (t = `<math>${t}</math>`);
|
|
18
|
-
var c = Fe(t);
|
|
19
|
-
if ((s || m) && (c = /** @type {Element} */
|
|
20
|
-
be(c)), Ne(
|
|
21
|
-
/** @type {TemplateNode} */
|
|
22
|
-
be(c),
|
|
23
|
-
/** @type {TemplateNode} */
|
|
24
|
-
c.lastChild
|
|
25
|
-
), s || m)
|
|
26
|
-
for (; be(c); )
|
|
27
|
-
r.before(
|
|
28
|
-
/** @type {Node} */
|
|
29
|
-
be(c)
|
|
30
|
-
);
|
|
31
|
-
else
|
|
32
|
-
r.before(c);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
var at = w('<button class="absolute top-2 right-2 z-10 w-6 h-6 flex items-center justify-center rounded-full text-text-secondary hover:text-primary transition-colors duration-200 motion-reduce:transition-none group focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2" aria-label="Dismiss alert" type="button"><svg class="w-4 h-4 text-current group-hover:scale-110 transition-transform duration-200 motion-reduce:transition-none" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>'), rt = w('<h4 class="font-semibold text-sm mb-1" style="color: inherit;"> </h4>'), st = w('<p class="text-sm leading-relaxed" style="color: inherit;"> </p>'), ot = w('<div aria-atomic="true"><!> <div><div class="flex-shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><!> <!> <!></div></div></div>');
|
|
37
|
-
function Jt(o, a) {
|
|
38
|
-
oe(a, !1);
|
|
39
|
-
const s = K(), m = K(), f = K();
|
|
40
|
-
let r = g(a, "variant", 8, "info"), b = g(a, "title", 8, ""), n = g(a, "message", 8, ""), t = g(a, "closable", 8, !1), c = g(a, "className", 8, "");
|
|
41
|
-
const k = ie();
|
|
42
|
-
function j(u) {
|
|
43
|
-
k("close", { event: u });
|
|
44
|
-
}
|
|
45
|
-
ue(() => {
|
|
46
|
-
}, () => {
|
|
47
|
-
T(s, {
|
|
48
|
-
info: "bg-info-surface text-info-text border border-info",
|
|
49
|
-
success: "bg-success-surface text-success-text border border-success",
|
|
50
|
-
warning: "bg-warning-surface text-warning-text border border-warning",
|
|
51
|
-
error: "bg-error-surface text-error-text border border-error"
|
|
52
|
-
});
|
|
53
|
-
}), ue(() => F(r()), () => {
|
|
54
|
-
T(m, r() === "success" || r() === "info" ? "status" : "alert");
|
|
55
|
-
}), ue(() => {
|
|
56
|
-
}, () => {
|
|
57
|
-
T(f, {
|
|
58
|
-
info: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
59
|
-
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />
|
|
60
|
-
</svg>`,
|
|
61
|
-
success: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
62
|
-
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
|
|
63
|
-
</svg>`,
|
|
64
|
-
warning: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
65
|
-
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />
|
|
66
|
-
</svg>`,
|
|
67
|
-
error: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
68
|
-
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
|
|
69
|
-
</svg>`
|
|
70
|
-
});
|
|
71
|
-
}), Ce(), re();
|
|
72
|
-
var p = ot(), N = i(p);
|
|
73
|
-
{
|
|
74
|
-
var A = (u) => {
|
|
75
|
-
var _ = at();
|
|
76
|
-
te("click", _, Me(j)), v(u, _);
|
|
77
|
-
};
|
|
78
|
-
M(N, (u) => {
|
|
79
|
-
t() && u(A);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
var O = y(N, 2), E = i(O), z = i(E);
|
|
83
|
-
tt(z, () => (e(f), F(r()), d(() => e(f)[r()])));
|
|
84
|
-
var $ = y(E, 2), D = i($);
|
|
85
|
-
{
|
|
86
|
-
var S = (u) => {
|
|
87
|
-
var _ = rt(), C = i(_);
|
|
88
|
-
q(() => G(C, b())), v(u, _);
|
|
89
|
-
};
|
|
90
|
-
M(D, (u) => {
|
|
91
|
-
b() && u(S);
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
var V = y(D, 2);
|
|
95
|
-
{
|
|
96
|
-
var B = (u) => {
|
|
97
|
-
var _ = st(), C = i(_);
|
|
98
|
-
q(() => G(C, n())), v(u, _);
|
|
99
|
-
};
|
|
100
|
-
M(V, (u) => {
|
|
101
|
-
n() && u(B);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
var l = y(V, 2);
|
|
105
|
-
me(l, a, "default", {}, null), q(() => {
|
|
106
|
-
X(p, 1, `relative rounded-md p-4 border ${e(s), F(r()), d(() => e(s)[r()]) ?? ""} transition-all duration-200 motion-reduce:transition-none ${c() ?? ""}`), ae(p, "role", e(m)), ae(p, "aria-live", r() === "success" || r() === "info" ? "polite" : "assertive"), X(O, 1, `flex items-start gap-3 ${t() ? "pr-8" : ""}`);
|
|
107
|
-
}), v(o, p), se();
|
|
108
|
-
}
|
|
109
|
-
var lt = w('<section><h3 class="text-xl font-semibold text-text"> </h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div></section>');
|
|
110
|
-
const nt = {
|
|
111
|
-
hash: "svelte-1ko6p3l",
|
|
112
|
-
code: ".cards-grid.svelte-1ko6p3l {padding-top:1.5rem;padding-bottom:1.5rem}"
|
|
113
|
-
};
|
|
114
|
-
function Xt(o, a) {
|
|
115
|
-
oe(a, !1), fe(o, nt);
|
|
116
|
-
let s = g(a, "title", 8), m = g(a, "cards", 8), f = g(a, "className", 8, "");
|
|
117
|
-
const r = ie();
|
|
118
|
-
function b(j) {
|
|
119
|
-
r("cardClick", j.detail);
|
|
120
|
-
}
|
|
121
|
-
re();
|
|
122
|
-
var n = lt(), t = i(n), c = i(t), k = y(t, 2);
|
|
123
|
-
pe(k, 5, m, _e, (j, p) => {
|
|
124
|
-
Ve(j, {
|
|
125
|
-
get title() {
|
|
126
|
-
return e(p), d(() => e(p).title);
|
|
127
|
-
},
|
|
128
|
-
get description() {
|
|
129
|
-
return e(p), d(() => e(p).description);
|
|
130
|
-
},
|
|
131
|
-
get image() {
|
|
132
|
-
return e(p), d(() => e(p).image);
|
|
133
|
-
},
|
|
134
|
-
variant: "elevated",
|
|
135
|
-
interactive: !0,
|
|
136
|
-
$$events: { click: b }
|
|
137
|
-
});
|
|
138
|
-
}), q(() => {
|
|
139
|
-
X(n, 1, `cards-grid space-y-6 ${f() ?? ""}`, "svelte-1ko6p3l"), G(c, s());
|
|
140
|
-
}), v(o, n), se();
|
|
141
|
-
}
|
|
142
|
-
var it = w("<form><!></form>");
|
|
143
|
-
const ct = {
|
|
144
|
-
hash: "svelte-8wahy8",
|
|
145
|
-
code: ".form.svelte-8wahy8 {display:flex;flex-direction:column;gap:1rem;}.form .form-field {display:flex;flex-direction:column;gap:0.5rem;}.form .form-label {display:block;font-size:0.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--color-text));}.form .form-input {width:100%;border-radius:var(--radius-md);padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem;}.form .form-input:focus {outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);}.form .form-input {border-color:rgb(var(--color-border));color:rgb(var(--color-text));background-color:rgb(var(--color-surface));}.form .form-input:focus {border-color:rgb(var(--color-border-focus));ring-color:rgb(var(--color-focus-ring));}.form .form-actions {display:flex;gap:0.75rem;padding-top:1rem;}"
|
|
146
|
-
};
|
|
147
|
-
function dt(o, a) {
|
|
148
|
-
oe(a, !1), fe(o, ct);
|
|
149
|
-
let s = g(a, "method", 8, "post"), m = g(a, "action", 8, ""), f = g(a, "className", 8, "");
|
|
150
|
-
const r = ie();
|
|
151
|
-
function b(c) {
|
|
152
|
-
const k = new FormData(c.target), j = Object.fromEntries(k.entries());
|
|
153
|
-
r("submit", { data: j, formData: k, event: c });
|
|
154
|
-
}
|
|
155
|
-
re();
|
|
156
|
-
var n = it(), t = i(n);
|
|
157
|
-
me(t, a, "default", {}, null), q(() => {
|
|
158
|
-
ae(n, "method", s()), ae(n, "action", m()), X(n, 1, `form ${f() ?? ""}`, "svelte-8wahy8");
|
|
159
|
-
}), te("submit", n, Me(b)), v(o, n), se();
|
|
160
|
-
}
|
|
161
|
-
var vt = w('<div class="form-field"><label for="name" class="form-label">Name</label> <!></div> <div class="form-field"><label for="email" class="form-label">Email</label> <!></div> <div class="form-actions"><!></div>', 1), ut = w('<section><h3 class="text-xl font-semibold text-text text-center">Contact Form</h3> <!></section>');
|
|
162
|
-
const ft = {
|
|
163
|
-
hash: "svelte-1pnsu7s",
|
|
164
|
-
code: ".contact-form.svelte-1pnsu7s {padding-top:1.5rem;padding-bottom:1.5rem}"
|
|
165
|
-
};
|
|
166
|
-
function ea(o, a) {
|
|
167
|
-
oe(a, !1), fe(o, ft);
|
|
168
|
-
let s = g(a, "initialData", 24, () => ({ name: "", email: "" })), m = g(a, "className", 8, "");
|
|
169
|
-
const f = ie();
|
|
170
|
-
let r = K({ ...s() });
|
|
171
|
-
function b(c) {
|
|
172
|
-
f("submit", { data: e(r) });
|
|
173
|
-
}
|
|
174
|
-
re();
|
|
175
|
-
var n = ut(), t = y(i(n), 2);
|
|
176
|
-
dt(t, {
|
|
177
|
-
$$events: { submit: b },
|
|
178
|
-
children: (c, k) => {
|
|
179
|
-
var j = vt(), p = Z(j), N = y(i(p), 2);
|
|
180
|
-
ke(N, {
|
|
181
|
-
id: "name",
|
|
182
|
-
name: "name",
|
|
183
|
-
placeholder: "Enter your name",
|
|
184
|
-
required: !0,
|
|
185
|
-
get value() {
|
|
186
|
-
return e(r).name;
|
|
187
|
-
},
|
|
188
|
-
set value($) {
|
|
189
|
-
ze(r, e(r).name = $);
|
|
190
|
-
},
|
|
191
|
-
$$legacy: !0
|
|
192
|
-
});
|
|
193
|
-
var A = y(p, 2), O = y(i(A), 2);
|
|
194
|
-
ke(O, {
|
|
195
|
-
id: "email",
|
|
196
|
-
name: "email",
|
|
197
|
-
type: "email",
|
|
198
|
-
placeholder: "Enter your email",
|
|
199
|
-
required: !0,
|
|
200
|
-
get value() {
|
|
201
|
-
return e(r).email;
|
|
202
|
-
},
|
|
203
|
-
set value($) {
|
|
204
|
-
ze(r, e(r).email = $);
|
|
205
|
-
},
|
|
206
|
-
$$legacy: !0
|
|
207
|
-
});
|
|
208
|
-
var E = y(A, 2), z = i(E);
|
|
209
|
-
ve(z, {
|
|
210
|
-
type: "submit",
|
|
211
|
-
variant: "primary",
|
|
212
|
-
className: "flex-1",
|
|
213
|
-
children: ($, D) => {
|
|
214
|
-
var S = de("Submit");
|
|
215
|
-
v($, S);
|
|
216
|
-
},
|
|
217
|
-
$$slots: { default: !0 }
|
|
218
|
-
}), v(c, j);
|
|
219
|
-
},
|
|
220
|
-
$$slots: { default: !0 }
|
|
221
|
-
}), q(() => X(n, 1, `contact-form max-w-md mx-auto space-y-6 ${m() ?? ""}`, "svelte-1pnsu7s")), v(o, n), se();
|
|
222
|
-
}
|
|
223
|
-
var mt = w('<button type="button" class="text-tertiary hover:text-primary focus:outline-none focus:ring-2 focus:ring-primary rounded-lg p-1 transition-colors" aria-label="Close dialog"><svg class="w-6 h-6 text-current" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>'), gt = w('<div class="flex items-center justify-end gap-3 p-6 border-t border-primary bg-surface-secondary"><!></div>'), bt = w('<div class="fixed inset-0 bg-black/60 backdrop-blur-sm z-modal-backdrop flex items-center justify-center p-4" role="presentation" tabindex="-1"><div class="bg-surface-elevated rounded-xl shadow-adaptive-xl max-w-md w-full max-h-[90vh] overflow-y-auto border border-primary focus:outline-none" role="dialog" aria-modal="true" aria-labelledby="dialog-title" tabindex="-1"><div class="flex items-center justify-between p-6 border-b border-primary"><h2 id="dialog-title" class="text-xl font-semibold text-primary"> </h2> <!></div> <div class="p-6 text-primary"><!></div> <!></div></div>');
|
|
224
|
-
function pt(o, a) {
|
|
225
|
-
const s = Le(a);
|
|
226
|
-
oe(a, !1);
|
|
227
|
-
let m = g(a, "isOpen", 12, !1), f = g(a, "title", 8, ""), r = g(a, "showCloseButton", 8, !0);
|
|
228
|
-
const b = ie();
|
|
229
|
-
let n = K(), t = K(null);
|
|
230
|
-
function c() {
|
|
231
|
-
m(!1), b("close", { event: new Event("close") });
|
|
232
|
-
}
|
|
233
|
-
function k(E) {
|
|
234
|
-
const z = E;
|
|
235
|
-
z.target === z.currentTarget && c();
|
|
236
|
-
}
|
|
237
|
-
function j(E) {
|
|
238
|
-
E.key === "Escape" && c();
|
|
239
|
-
}
|
|
240
|
-
function p(E) {
|
|
241
|
-
var V;
|
|
242
|
-
if (!m()) return;
|
|
243
|
-
const z = E, $ = (V = e(n)) == null ? void 0 : V.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
244
|
-
if (!$.length) return;
|
|
245
|
-
const D = $[0], S = $[$.length - 1];
|
|
246
|
-
z.key === "Tab" && (z.shiftKey ? document.activeElement === D && (z.preventDefault(), S.focus()) : document.activeElement === S && (z.preventDefault(), D.focus()));
|
|
247
|
-
}
|
|
248
|
-
Xe(() => () => {
|
|
249
|
-
e(t) && e(t).focus();
|
|
250
|
-
}), ue(() => (F(m()), e(n)), () => {
|
|
251
|
-
m() && (T(t, document.activeElement), requestAnimationFrame(() => {
|
|
252
|
-
var z;
|
|
253
|
-
const E = (z = e(n)) == null ? void 0 : z.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
254
|
-
E == null || E.focus();
|
|
255
|
-
}));
|
|
256
|
-
}), Ce(), re();
|
|
257
|
-
var N = ne(), A = Z(N);
|
|
258
|
-
{
|
|
259
|
-
var O = (E) => {
|
|
260
|
-
var z = bt(), $ = i(z), D = i($), S = i(D), V = i(S), B = y(S, 2);
|
|
261
|
-
{
|
|
262
|
-
var l = (h) => {
|
|
263
|
-
var x = mt();
|
|
264
|
-
te("click", x, c), v(h, x);
|
|
265
|
-
};
|
|
266
|
-
M(B, (h) => {
|
|
267
|
-
r() && h(l);
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
var u = y(D, 2), _ = i(u);
|
|
271
|
-
me(_, a, "default", {}, null);
|
|
272
|
-
var C = y(u, 2);
|
|
273
|
-
{
|
|
274
|
-
var P = (h) => {
|
|
275
|
-
var x = gt(), U = i(x);
|
|
276
|
-
me(U, a, "footer", {}, null), v(h, x);
|
|
277
|
-
};
|
|
278
|
-
M(C, (h) => {
|
|
279
|
-
d(() => s.footer) && h(P);
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
we($, (h) => T(n, h), () => e(n)), q(() => G(V, f())), te("keydown", $, p), te("click", z, k), te("keydown", z, j), v(E, z);
|
|
283
|
-
};
|
|
284
|
-
M(A, (E) => {
|
|
285
|
-
m() && E(O);
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
v(o, N), se();
|
|
289
|
-
}
|
|
290
|
-
var ht = w('<div class="relative group"><img alt="" class="w-full h-32 object-cover rounded-lg border border-stone-600"/> <div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg flex items-center justify-center"><div class="flex gap-2"><!> <!></div></div></div>'), xt = w('<div class="border-2 border-dashed rounded-lg p-6 text-center transition-colors" style="border-color: rgb(var(--color-border));"><div class="space-y-3"><div class="w-12 h-12 mx-auto rounded-lg flex items-center justify-center" style="background-color: rgb(var(--color-surface-secondary));"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="color: rgb(var(--color-text-secondary));"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg></div> <div><p class="font-medium" style="color: rgb(var(--color-text));"> </p> <p class="text-sm" style="color: rgb(var(--color-text-secondary));">Choose a file to upload</p></div> <div class="flex gap-2 justify-center"><!></div></div></div>'), yt = w('<div class="space-y-3"><div class="text-sm font-medium text-stone-300">Choose File</div> <input type="file" class="block w-full text-sm text-stone-300 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-blue-900/30 file:text-blue-300 hover:file:bg-blue-900/50"/> <p class="text-xs text-stone-500"> </p></div>'), _t = w('<img alt="Preview" class="w-full h-48 object-cover rounded-lg border" style="border-color: rgb(var(--color-border));"/>'), wt = w('<div class="w-full h-48 rounded-lg flex items-center justify-center" style="background-color: rgb(var(--color-surface-secondary)); border-color: rgb(var(--color-border));"><div class="text-center"><svg class="w-12 h-12 mx-auto mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="color: rgb(var(--color-text-secondary));"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <p class="text-sm" style="color: rgb(var(--color-text));"> </p></div></div>'), kt = w('<div class="absolute inset-0 bg-black/50 flex items-center justify-center rounded-lg"><div class="text-center"><div class="w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-2"></div> <p class="text-white text-sm">Uploading...</p></div></div>'), Ct = w('<div class="space-y-2"><div class="flex justify-between text-sm text-stone-400"><span>Uploading...</span> <span> </span></div> <div class="w-full bg-stone-700 rounded-full h-2"><div class="bg-blue-500 h-2 rounded-full transition-all duration-300"></div></div></div>'), $t = w('<div class="space-y-4"><div class="relative"><!> <!></div> <!></div>'), zt = w('<div class="space-y-4"><!></div>'), Tt = w("<!> <!>", 1), jt = w('<div class="space-y-3"><!> <!></div>');
|
|
291
|
-
function ta(o, a) {
|
|
292
|
-
oe(a, !1);
|
|
293
|
-
let s = g(a, "value", 12, null), m = g(a, "disabled", 8, !1), f = g(a, "accept", 8, "image/*"), r = g(
|
|
294
|
-
a,
|
|
295
|
-
"maxSize",
|
|
296
|
-
8,
|
|
297
|
-
5 * 1024 * 1024
|
|
298
|
-
// 5MB default
|
|
299
|
-
), b = g(a, "placeholder", 8, "No image selected");
|
|
300
|
-
const n = ie();
|
|
301
|
-
let t = K(!1), c = K(null), k = K(null), j = K(!1), p = K(0);
|
|
302
|
-
function N(l) {
|
|
303
|
-
const u = l.target;
|
|
304
|
-
if (!u.files || u.files.length === 0) return;
|
|
305
|
-
const _ = u.files, C = _[0];
|
|
306
|
-
if (C.size > r()) {
|
|
307
|
-
n("error", {
|
|
308
|
-
message: `File size must be less than ${Math.round(r() / 1024 / 1024)}MB`
|
|
309
|
-
});
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
if (f() !== "*" && !C.type.match(f().replace("*", ".*"))) {
|
|
313
|
-
n("error", { message: "Please select a valid file type" });
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
T(c, C), T(k, URL.createObjectURL(C)), n("upload", { files: _ });
|
|
317
|
-
}
|
|
318
|
-
async function A() {
|
|
319
|
-
if (!(!e(c) || !e(k))) {
|
|
320
|
-
T(j, !0), T(p, 0);
|
|
321
|
-
try {
|
|
322
|
-
const l = setInterval(
|
|
323
|
-
() => {
|
|
324
|
-
e(p) < 90 && T(p, e(p) + Math.random() * 10);
|
|
325
|
-
},
|
|
326
|
-
200
|
|
327
|
-
);
|
|
328
|
-
await new Promise((u) => setTimeout(u, 1e3)), clearInterval(l), T(p, 100), s(e(k)), n("change", { value: e(k) }), T(t, !1), E();
|
|
329
|
-
} catch (l) {
|
|
330
|
-
n("error", { message: `Upload failed: ${l}` });
|
|
331
|
-
} finally {
|
|
332
|
-
T(j, !1), T(p, 0);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
function O() {
|
|
337
|
-
s(null), n("change", { value: null });
|
|
338
|
-
}
|
|
339
|
-
function E() {
|
|
340
|
-
T(c, null), e(k) && (URL.revokeObjectURL(e(k)), T(k, null)), T(p, 0);
|
|
341
|
-
}
|
|
342
|
-
function z() {
|
|
343
|
-
e(k) && (URL.revokeObjectURL(e(k)), T(k, null));
|
|
344
|
-
}
|
|
345
|
-
et(() => {
|
|
346
|
-
z();
|
|
347
|
-
}), re();
|
|
348
|
-
var $ = jt(), D = i($);
|
|
349
|
-
{
|
|
350
|
-
var S = (l) => {
|
|
351
|
-
var u = ht(), _ = i(u), C = y(_, 2), P = i(C), h = i(P);
|
|
352
|
-
ve(h, {
|
|
353
|
-
variant: "secondary",
|
|
354
|
-
size: "sm",
|
|
355
|
-
get disabled() {
|
|
356
|
-
return m();
|
|
357
|
-
},
|
|
358
|
-
$$events: { click: () => T(t, !0) },
|
|
359
|
-
children: (U, R) => {
|
|
360
|
-
var H = de("Change");
|
|
361
|
-
v(U, H);
|
|
362
|
-
},
|
|
363
|
-
$$slots: { default: !0 }
|
|
364
|
-
});
|
|
365
|
-
var x = y(h, 2);
|
|
366
|
-
ve(x, {
|
|
367
|
-
variant: "danger",
|
|
368
|
-
size: "sm",
|
|
369
|
-
get disabled() {
|
|
370
|
-
return m();
|
|
371
|
-
},
|
|
372
|
-
$$events: { click: O },
|
|
373
|
-
children: (U, R) => {
|
|
374
|
-
var H = de("Remove");
|
|
375
|
-
v(U, H);
|
|
376
|
-
},
|
|
377
|
-
$$slots: { default: !0 }
|
|
378
|
-
}), q(() => ae(_, "src", s())), v(l, u);
|
|
379
|
-
}, V = (l) => {
|
|
380
|
-
var u = xt(), _ = i(u), C = y(i(_), 2), P = i(C), h = i(P), x = y(C, 2), U = i(x);
|
|
381
|
-
ve(U, {
|
|
382
|
-
variant: "primary",
|
|
383
|
-
size: "sm",
|
|
384
|
-
get disabled() {
|
|
385
|
-
return m();
|
|
386
|
-
},
|
|
387
|
-
$$events: { click: () => T(t, !0) },
|
|
388
|
-
children: (R, H) => {
|
|
389
|
-
var W = de("Upload File");
|
|
390
|
-
v(R, W);
|
|
391
|
-
},
|
|
392
|
-
$$slots: { default: !0 }
|
|
393
|
-
}), q(() => G(h, b())), v(l, u);
|
|
394
|
-
};
|
|
395
|
-
M(D, (l) => {
|
|
396
|
-
s() ? l(S) : l(V, !1);
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
var B = y(D, 2);
|
|
400
|
-
pt(B, {
|
|
401
|
-
title: "Upload File",
|
|
402
|
-
get isOpen() {
|
|
403
|
-
return e(t);
|
|
404
|
-
},
|
|
405
|
-
set isOpen(l) {
|
|
406
|
-
T(t, l);
|
|
407
|
-
},
|
|
408
|
-
$$events: {
|
|
409
|
-
close: () => {
|
|
410
|
-
T(t, !1), E();
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
children: (l, u) => {
|
|
414
|
-
var _ = zt(), C = i(_);
|
|
415
|
-
{
|
|
416
|
-
var P = (x) => {
|
|
417
|
-
var U = yt(), R = y(i(U), 2), H = y(R, 2), W = i(H);
|
|
418
|
-
q(
|
|
419
|
-
(J) => {
|
|
420
|
-
ae(R, "accept", f()), G(W, `Max size: ${J ?? ""}MB`);
|
|
421
|
-
},
|
|
422
|
-
[
|
|
423
|
-
() => (F(r()), d(() => Math.round(r() / 1024 / 1024)))
|
|
424
|
-
]
|
|
425
|
-
), te("change", R, N), v(x, U);
|
|
426
|
-
}, h = (x) => {
|
|
427
|
-
var U = $t(), R = i(U), H = i(R);
|
|
428
|
-
{
|
|
429
|
-
var W = (I) => {
|
|
430
|
-
var Q = _t();
|
|
431
|
-
q(() => ae(Q, "src", e(k))), v(I, Q);
|
|
432
|
-
}, J = (I) => {
|
|
433
|
-
var Q = wt(), ge = i(Q), he = y(i(ge), 2), xe = i(he);
|
|
434
|
-
q(() => G(xe, (e(c), d(() => e(c).name)))), v(I, Q);
|
|
435
|
-
};
|
|
436
|
-
M(H, (I) => {
|
|
437
|
-
e(c), d(() => e(c).type.startsWith("image/")) ? I(W) : I(J, !1);
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
var L = y(H, 2);
|
|
441
|
-
{
|
|
442
|
-
var Y = (I) => {
|
|
443
|
-
var Q = kt();
|
|
444
|
-
v(I, Q);
|
|
445
|
-
};
|
|
446
|
-
M(L, (I) => {
|
|
447
|
-
e(j) && I(Y);
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
var ce = y(R, 2);
|
|
451
|
-
{
|
|
452
|
-
var le = (I) => {
|
|
453
|
-
var Q = Ct(), ge = i(Q), he = y(i(ge), 2), xe = i(he), qe = y(ge, 2), De = i(qe);
|
|
454
|
-
q(
|
|
455
|
-
(Be) => {
|
|
456
|
-
G(xe, `${Be ?? ""}%`), Ie(De, `width: ${e(p) ?? ""}%`);
|
|
457
|
-
},
|
|
458
|
-
[
|
|
459
|
-
() => (e(p), d(() => Math.round(e(p))))
|
|
460
|
-
]
|
|
461
|
-
), v(I, Q);
|
|
462
|
-
};
|
|
463
|
-
M(ce, (I) => {
|
|
464
|
-
e(j) && I(le);
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
v(x, U);
|
|
468
|
-
};
|
|
469
|
-
M(C, (x) => {
|
|
470
|
-
e(c) ? x(h, !1) : x(P);
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
v(l, _);
|
|
474
|
-
},
|
|
475
|
-
$$slots: {
|
|
476
|
-
default: !0,
|
|
477
|
-
footer: (l, u) => {
|
|
478
|
-
var _ = Tt(), C = Z(_);
|
|
479
|
-
ve(C, {
|
|
480
|
-
variant: "secondary",
|
|
481
|
-
$$events: {
|
|
482
|
-
click: () => {
|
|
483
|
-
T(t, !1), E();
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
children: (x, U) => {
|
|
487
|
-
var R = de("Cancel");
|
|
488
|
-
v(x, R);
|
|
489
|
-
},
|
|
490
|
-
$$slots: { default: !0 }
|
|
491
|
-
});
|
|
492
|
-
var P = y(C, 2);
|
|
493
|
-
{
|
|
494
|
-
var h = (x) => {
|
|
495
|
-
ve(x, {
|
|
496
|
-
variant: "primary",
|
|
497
|
-
get disabled() {
|
|
498
|
-
return e(j);
|
|
499
|
-
},
|
|
500
|
-
get loading() {
|
|
501
|
-
return e(j);
|
|
502
|
-
},
|
|
503
|
-
$$events: { click: A },
|
|
504
|
-
children: (U, R) => {
|
|
505
|
-
var H = de();
|
|
506
|
-
q(() => G(H, e(j) ? "Uploading..." : "Upload File")), v(U, H);
|
|
507
|
-
},
|
|
508
|
-
$$slots: { default: !0 }
|
|
509
|
-
});
|
|
510
|
-
};
|
|
511
|
-
M(P, (x) => {
|
|
512
|
-
e(c) && x(h);
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
v(l, _);
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
$$legacy: !0
|
|
519
|
-
}), v(o, $), se();
|
|
520
|
-
}
|
|
521
|
-
var Et = w("<div><!></div>"), Mt = w('<div class="flex flex-wrap gap-4"></div>');
|
|
522
|
-
function aa(o, a) {
|
|
523
|
-
oe(a, !1);
|
|
524
|
-
let s = g(a, "values", 28, () => ({})), m = g(a, "fields", 24, () => []);
|
|
525
|
-
const f = ie();
|
|
526
|
-
function r(n) {
|
|
527
|
-
var c;
|
|
528
|
-
const t = n.detail;
|
|
529
|
-
if (t && typeof t == "object") {
|
|
530
|
-
const k = ((c = n.target) == null ? void 0 : c.name) || "unknown";
|
|
531
|
-
f("change", {
|
|
532
|
-
field: k,
|
|
533
|
-
value: t,
|
|
534
|
-
event: n.detail.event || new Event("change")
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
re();
|
|
539
|
-
var b = Mt();
|
|
540
|
-
pe(b, 5, m, (n) => n.key, (n, t) => {
|
|
541
|
-
var c = Et(), k = i(c);
|
|
542
|
-
{
|
|
543
|
-
var j = (N) => {
|
|
544
|
-
{
|
|
545
|
-
let A = ye(() => (e(t), d(() => e(t).rows || 3)));
|
|
546
|
-
We(N, {
|
|
547
|
-
get label() {
|
|
548
|
-
return e(t), d(() => e(t).label);
|
|
549
|
-
},
|
|
550
|
-
get placeholder() {
|
|
551
|
-
return e(t), d(() => e(t).placeholder);
|
|
552
|
-
},
|
|
553
|
-
get rows() {
|
|
554
|
-
return e(A);
|
|
555
|
-
},
|
|
556
|
-
get required() {
|
|
557
|
-
return e(t), d(() => e(t).required);
|
|
558
|
-
},
|
|
559
|
-
size: "sm",
|
|
560
|
-
variant: "outlined",
|
|
561
|
-
get value() {
|
|
562
|
-
return s()[e(t).key];
|
|
563
|
-
},
|
|
564
|
-
set value(O) {
|
|
565
|
-
s(s()[e(t).key] = O, !0);
|
|
566
|
-
},
|
|
567
|
-
$$events: { input: r, change: r },
|
|
568
|
-
$$legacy: !0
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
}, p = (N) => {
|
|
572
|
-
var A = ne(), O = Z(A);
|
|
573
|
-
{
|
|
574
|
-
var E = ($) => {
|
|
575
|
-
{
|
|
576
|
-
let D = ye(() => (e(t), d(() => e(t).options || [])));
|
|
577
|
-
Ge($, {
|
|
578
|
-
get options() {
|
|
579
|
-
return e(D);
|
|
580
|
-
},
|
|
581
|
-
get label() {
|
|
582
|
-
return e(t), d(() => e(t).label);
|
|
583
|
-
},
|
|
584
|
-
get placeholder() {
|
|
585
|
-
return e(t), d(() => e(t).placeholder);
|
|
586
|
-
},
|
|
587
|
-
get required() {
|
|
588
|
-
return e(t), d(() => e(t).required);
|
|
589
|
-
},
|
|
590
|
-
size: "sm",
|
|
591
|
-
variant: "outlined",
|
|
592
|
-
get value() {
|
|
593
|
-
return s()[e(t).key];
|
|
594
|
-
},
|
|
595
|
-
set value(S) {
|
|
596
|
-
s(s()[e(t).key] = S, !0);
|
|
597
|
-
},
|
|
598
|
-
$$events: { input: r, change: r },
|
|
599
|
-
$$legacy: !0
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
}, z = ($) => {
|
|
603
|
-
var D = ne(), S = Z(D);
|
|
604
|
-
{
|
|
605
|
-
var V = (l) => {
|
|
606
|
-
Ye(l, {
|
|
607
|
-
get label() {
|
|
608
|
-
return e(t), d(() => e(t).label);
|
|
609
|
-
},
|
|
610
|
-
get required() {
|
|
611
|
-
return e(t), d(() => e(t).required);
|
|
612
|
-
},
|
|
613
|
-
size: "sm",
|
|
614
|
-
variant: "outlined",
|
|
615
|
-
get checked() {
|
|
616
|
-
return s()[e(t).key];
|
|
617
|
-
},
|
|
618
|
-
set checked(u) {
|
|
619
|
-
s(s()[e(t).key] = u, !0);
|
|
620
|
-
},
|
|
621
|
-
$$events: { input: r, change: r },
|
|
622
|
-
$$legacy: !0
|
|
623
|
-
});
|
|
624
|
-
}, B = (l) => {
|
|
625
|
-
var u = ne(), _ = Z(u);
|
|
626
|
-
{
|
|
627
|
-
var C = (h) => {
|
|
628
|
-
Qe(h, {
|
|
629
|
-
get label() {
|
|
630
|
-
return e(t), d(() => e(t).label);
|
|
631
|
-
},
|
|
632
|
-
get checked() {
|
|
633
|
-
return s()[e(t).key];
|
|
634
|
-
},
|
|
635
|
-
set checked(x) {
|
|
636
|
-
s(s()[e(t).key] = x, !0);
|
|
637
|
-
},
|
|
638
|
-
$$events: { input: r, change: r },
|
|
639
|
-
$$legacy: !0
|
|
640
|
-
});
|
|
641
|
-
}, P = (h) => {
|
|
642
|
-
var x = ne(), U = Z(x);
|
|
643
|
-
{
|
|
644
|
-
var R = (W) => {
|
|
645
|
-
Ze(W, {
|
|
646
|
-
get label() {
|
|
647
|
-
return e(t), d(() => e(t).label);
|
|
648
|
-
},
|
|
649
|
-
get required() {
|
|
650
|
-
return e(t), d(() => e(t).required);
|
|
651
|
-
},
|
|
652
|
-
size: "sm",
|
|
653
|
-
variant: "outlined",
|
|
654
|
-
get value() {
|
|
655
|
-
return s()[e(t).key];
|
|
656
|
-
},
|
|
657
|
-
set value(J) {
|
|
658
|
-
s(s()[e(t).key] = J, !0);
|
|
659
|
-
},
|
|
660
|
-
$$events: { input: r, change: r },
|
|
661
|
-
$$legacy: !0
|
|
662
|
-
});
|
|
663
|
-
}, H = (W) => {
|
|
664
|
-
var J = ne(), L = Z(J);
|
|
665
|
-
{
|
|
666
|
-
var Y = (le) => {
|
|
667
|
-
Je(le, {
|
|
668
|
-
get label() {
|
|
669
|
-
return e(t), d(() => e(t).label);
|
|
670
|
-
},
|
|
671
|
-
get required() {
|
|
672
|
-
return e(t), d(() => e(t).required);
|
|
673
|
-
},
|
|
674
|
-
size: "sm",
|
|
675
|
-
get value() {
|
|
676
|
-
return s()[e(t).key];
|
|
677
|
-
},
|
|
678
|
-
set value(I) {
|
|
679
|
-
s(s()[e(t).key] = I, !0);
|
|
680
|
-
},
|
|
681
|
-
$$events: { input: r, change: r },
|
|
682
|
-
$$legacy: !0
|
|
683
|
-
});
|
|
684
|
-
}, ce = (le) => {
|
|
685
|
-
{
|
|
686
|
-
let I = ye(() => (e(t), d(() => e(t).type || "text")));
|
|
687
|
-
ke(le, {
|
|
688
|
-
get type() {
|
|
689
|
-
return e(I);
|
|
690
|
-
},
|
|
691
|
-
get label() {
|
|
692
|
-
return e(t), d(() => e(t).label);
|
|
693
|
-
},
|
|
694
|
-
get placeholder() {
|
|
695
|
-
return e(t), d(() => e(t).placeholder);
|
|
696
|
-
},
|
|
697
|
-
get required() {
|
|
698
|
-
return e(t), d(() => e(t).required);
|
|
699
|
-
},
|
|
700
|
-
size: "sm",
|
|
701
|
-
variant: "default",
|
|
702
|
-
get value() {
|
|
703
|
-
return s()[e(t).key];
|
|
704
|
-
},
|
|
705
|
-
set value(Q) {
|
|
706
|
-
s(s()[e(t).key] = Q, !0);
|
|
707
|
-
},
|
|
708
|
-
$$events: { input: r, change: r },
|
|
709
|
-
$$legacy: !0
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
M(
|
|
714
|
-
L,
|
|
715
|
-
(le) => {
|
|
716
|
-
e(t), d(() => e(t).type === "textalignment") ? le(Y) : le(ce, !1);
|
|
717
|
-
},
|
|
718
|
-
!0
|
|
719
|
-
);
|
|
720
|
-
}
|
|
721
|
-
v(W, J);
|
|
722
|
-
};
|
|
723
|
-
M(
|
|
724
|
-
U,
|
|
725
|
-
(W) => {
|
|
726
|
-
e(t), d(() => e(t).type === "colorpicker") ? W(R) : W(H, !1);
|
|
727
|
-
},
|
|
728
|
-
!0
|
|
729
|
-
);
|
|
730
|
-
}
|
|
731
|
-
v(h, x);
|
|
732
|
-
};
|
|
733
|
-
M(
|
|
734
|
-
_,
|
|
735
|
-
(h) => {
|
|
736
|
-
e(t), d(() => e(t).type === "toggle") ? h(C) : h(P, !1);
|
|
737
|
-
},
|
|
738
|
-
!0
|
|
739
|
-
);
|
|
740
|
-
}
|
|
741
|
-
v(l, u);
|
|
742
|
-
};
|
|
743
|
-
M(
|
|
744
|
-
S,
|
|
745
|
-
(l) => {
|
|
746
|
-
e(t), d(() => e(t).type === "checkbox") ? l(V) : l(B, !1);
|
|
747
|
-
},
|
|
748
|
-
!0
|
|
749
|
-
);
|
|
750
|
-
}
|
|
751
|
-
v($, D);
|
|
752
|
-
};
|
|
753
|
-
M(
|
|
754
|
-
O,
|
|
755
|
-
($) => {
|
|
756
|
-
e(t), d(() => e(t).type === "select") ? $(E) : $(z, !1);
|
|
757
|
-
},
|
|
758
|
-
!0
|
|
759
|
-
);
|
|
760
|
-
}
|
|
761
|
-
v(N, A);
|
|
762
|
-
};
|
|
763
|
-
M(k, (N) => {
|
|
764
|
-
e(t), d(() => e(t).type === "textarea") ? N(j) : N(p, !1);
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
q(() => X(c, 1, `flex-${e(t), d(() => e(t).flex === "full" ? "none" : e(t).flex || "1") ?? ""} ${e(t), d(() => e(t).type === "textarea" || e(t).key === "title" || e(t).key === "subtitle" || e(t).flex === "full" ? "w-full" : "w-full sm:w-auto sm:flex-1") ?? ""} min-w-0 ${e(t), d(() => e(t).type === "toggle" ? "flex items-center justify-center" : "") ?? ""}`)), v(n, c);
|
|
768
|
-
}), v(o, b), se();
|
|
769
|
-
}
|
|
770
|
-
var St = w('<section><h2 class="text-3xl font-bold text-text"> </h2> <p class="text-lg text-text-secondary max-w-2xl mx-auto"> </p></section>');
|
|
771
|
-
const qt = {
|
|
772
|
-
hash: "svelte-1k5lr7e",
|
|
773
|
-
code: ".hero.svelte-1k5lr7e {padding-top:2rem;padding-bottom:2rem}"
|
|
774
|
-
};
|
|
775
|
-
function ra(o, a) {
|
|
776
|
-
fe(o, qt);
|
|
777
|
-
let s = g(a, "title", 8), m = g(a, "subtitle", 8), f = g(a, "className", 8, "");
|
|
778
|
-
var r = St(), b = i(r), n = i(b), t = y(b, 2), c = i(t);
|
|
779
|
-
q(() => {
|
|
780
|
-
X(r, 1, `hero text-center space-y-4 ${f() ?? ""}`, "svelte-1k5lr7e"), G(n, s()), G(c, m());
|
|
781
|
-
}), v(o, r);
|
|
782
|
-
}
|
|
783
|
-
var Dt = w('<section><p class="text-info-text">You clicked: <strong> </strong></p></section>');
|
|
784
|
-
const Bt = {
|
|
785
|
-
hash: "svelte-17n10vn",
|
|
786
|
-
code: ".selected-card-info.svelte-17n10vn {padding-top:1rem;padding-bottom:1rem}"
|
|
787
|
-
};
|
|
788
|
-
function sa(o, a) {
|
|
789
|
-
oe(a, !1), fe(o, Bt);
|
|
790
|
-
let s = g(a, "selectedCard", 8), m = g(a, "className", 8, "");
|
|
791
|
-
re();
|
|
792
|
-
var f = ne(), r = Z(f);
|
|
793
|
-
{
|
|
794
|
-
var b = (n) => {
|
|
795
|
-
var t = Dt(), c = i(t), k = y(i(c)), j = i(k);
|
|
796
|
-
q(() => {
|
|
797
|
-
X(t, 1, `selected-card-info text-center p-4 bg-info-surface rounded-lg ${m() ?? ""}`, "svelte-17n10vn"), G(j, (F(s()), d(() => s().title)));
|
|
798
|
-
}), v(n, t);
|
|
799
|
-
};
|
|
800
|
-
M(r, (n) => {
|
|
801
|
-
s() && n(b);
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
v(o, f), se();
|
|
805
|
-
}
|
|
806
|
-
function Pt(o, a) {
|
|
807
|
-
const s = a || (o.length > 0 ? o[0].id : "");
|
|
808
|
-
return {
|
|
809
|
-
activeTab: s,
|
|
810
|
-
activeTabIndex: o.findIndex((m) => m.id === s)
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
function Ut(o, a, s) {
|
|
814
|
-
return {
|
|
815
|
-
activeTab: s,
|
|
816
|
-
activeTabIndex: a.findIndex((m) => m.id === s)
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
const Se = {
|
|
820
|
-
sm: {
|
|
821
|
-
tab: "px-3 py-1.5 text-sm",
|
|
822
|
-
panel: "p-3",
|
|
823
|
-
icon: "w-4 h-4"
|
|
824
|
-
},
|
|
825
|
-
md: {
|
|
826
|
-
tab: "px-4 py-2 text-base",
|
|
827
|
-
panel: "p-4",
|
|
828
|
-
icon: "w-5 h-5"
|
|
829
|
-
},
|
|
830
|
-
lg: {
|
|
831
|
-
tab: "px-6 py-3 text-lg",
|
|
832
|
-
panel: "p-6",
|
|
833
|
-
icon: "w-6 h-6"
|
|
834
|
-
}
|
|
835
|
-
}, $e = {
|
|
836
|
-
default: {
|
|
837
|
-
container: "border-b border-primary",
|
|
838
|
-
tab: "border-b-2 border-transparent text-secondary hover:text-primary hover:border-primary-hover transition-colors",
|
|
839
|
-
activeTab: "border-primary text-primary",
|
|
840
|
-
panel: "mt-4"
|
|
841
|
-
},
|
|
842
|
-
pills: {
|
|
843
|
-
container: "bg-surface-secondary p-1 rounded-lg",
|
|
844
|
-
tab: "rounded-md text-secondary hover:text-primary hover:bg-surface-tertiary transition-colors",
|
|
845
|
-
activeTab: "bg-surface text-primary shadow-adaptive-sm",
|
|
846
|
-
panel: "mt-4"
|
|
847
|
-
},
|
|
848
|
-
underline: {
|
|
849
|
-
container: "border-b border-primary",
|
|
850
|
-
tab: "relative text-secondary hover:text-primary transition-colors",
|
|
851
|
-
activeTab: "text-primary",
|
|
852
|
-
panel: "mt-4"
|
|
853
|
-
},
|
|
854
|
-
cards: {
|
|
855
|
-
container: "space-y-2",
|
|
856
|
-
tab: "border border-primary rounded-lg text-secondary hover:text-primary hover:bg-surface-secondary transition-colors",
|
|
857
|
-
activeTab: "bg-surface text-primary shadow-adaptive-sm border-primary",
|
|
858
|
-
panel: "mt-4"
|
|
859
|
-
}
|
|
860
|
-
};
|
|
861
|
-
function je(o, a, s) {
|
|
862
|
-
const m = Se[o.size], f = $e[o.variant];
|
|
863
|
-
return [
|
|
864
|
-
m.tab,
|
|
865
|
-
f.tab,
|
|
866
|
-
s ? f.activeTab : "",
|
|
867
|
-
a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
868
|
-
o.fullWidth ? "flex-1" : "",
|
|
869
|
-
"flex items-center justify-center gap-2"
|
|
870
|
-
].filter(Boolean).join(" ");
|
|
871
|
-
}
|
|
872
|
-
function Ft(o, a = []) {
|
|
873
|
-
return [
|
|
874
|
-
$e[o.variant].container,
|
|
875
|
-
o.orientation === "vertical" ? "flex-col space-y-1 mr-4" : "",
|
|
876
|
-
o.fullWidth ? `grid grid-cols-${a.length || 1}` : "flex"
|
|
877
|
-
].filter(Boolean).join(" ");
|
|
878
|
-
}
|
|
879
|
-
function Ee(o, a) {
|
|
880
|
-
const s = Se[o.size], m = $e[o.variant];
|
|
881
|
-
return [
|
|
882
|
-
s.panel,
|
|
883
|
-
m.panel,
|
|
884
|
-
a ? "block" : "hidden"
|
|
885
|
-
].filter(Boolean).join(" ");
|
|
886
|
-
}
|
|
887
|
-
function Nt(o, a, s, m) {
|
|
888
|
-
return function(r) {
|
|
889
|
-
const b = Array.from(
|
|
890
|
-
document.querySelectorAll('[role="tab"]')
|
|
891
|
-
), n = b.findIndex(
|
|
892
|
-
(c) => c === document.activeElement
|
|
893
|
-
);
|
|
894
|
-
let t = n;
|
|
895
|
-
switch (r.key) {
|
|
896
|
-
case "ArrowRight":
|
|
897
|
-
case "ArrowDown":
|
|
898
|
-
r.preventDefault(), t = (n + 1) % o.length;
|
|
899
|
-
break;
|
|
900
|
-
case "ArrowLeft":
|
|
901
|
-
case "ArrowUp":
|
|
902
|
-
r.preventDefault(), t = n === 0 ? o.length - 1 : n - 1;
|
|
903
|
-
break;
|
|
904
|
-
case "Home":
|
|
905
|
-
r.preventDefault(), t = 0;
|
|
906
|
-
break;
|
|
907
|
-
case "End":
|
|
908
|
-
r.preventDefault(), t = o.length - 1;
|
|
909
|
-
break;
|
|
910
|
-
case "Enter":
|
|
911
|
-
case " ":
|
|
912
|
-
r.preventDefault();
|
|
913
|
-
const c = b[n];
|
|
914
|
-
c && c.click();
|
|
915
|
-
return;
|
|
916
|
-
}
|
|
917
|
-
t !== n && b[t] && b[t].focus();
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
function Lt(o, a, s) {
|
|
921
|
-
return function(f, r) {
|
|
922
|
-
f.disabled || (a({ activeTab: f.id }), s("change", { activeTab: f.id, tab: f, event: r }), s("tabClick", { tab: f, event: r }));
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
function oa(o, a) {
|
|
926
|
-
const s = a.querySelector(
|
|
927
|
-
`[data-tab-id="${o}"]`
|
|
928
|
-
);
|
|
929
|
-
s == null || s.focus();
|
|
930
|
-
}
|
|
931
|
-
function la(o, a) {
|
|
932
|
-
return o.find((s) => s.id === a);
|
|
933
|
-
}
|
|
934
|
-
function ee(o, a) {
|
|
935
|
-
return o.id === a;
|
|
936
|
-
}
|
|
937
|
-
function It(o, a, s) {
|
|
938
|
-
return {
|
|
939
|
-
"aria-selected": a,
|
|
940
|
-
"aria-controls": `tabpanel-${o.id}`,
|
|
941
|
-
"aria-disabled": o.disabled,
|
|
942
|
-
tabindex: a ? 0 : -1
|
|
943
|
-
};
|
|
944
|
-
}
|
|
945
|
-
function At(o) {
|
|
946
|
-
return {
|
|
947
|
-
id: `tabpanel-${o.id}`,
|
|
948
|
-
role: "tabpanel",
|
|
949
|
-
"aria-labelledby": `tab-${o.id}`
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
var Rt = He('<svg class="w-4 h-4 text-current" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd"></path></svg>'), Ht = w(`<span class="
|
|
953
|
-
ml-1 px-1.5 py-0.5 text-xs font-medium
|
|
954
|
-
bg-primary-100 text-primary-800 rounded-full
|
|
955
|
-
dark:bg-primary-900 dark:text-primary-200
|
|
956
|
-
"> </span>`), Kt = w('<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-primary-500 rounded-full"></div>'), Ot = w("<button><!> <span> </span> <!></button> <!>", 1), Vt = w("<div><!></div>"), Wt = w('<div><div role="tablist" tabindex="0"></div> <div class="tab-panels"></div></div>');
|
|
957
|
-
const Gt = {
|
|
958
|
-
hash: "svelte-fn6h9a",
|
|
959
|
-
code: `
|
|
960
|
-
/* Focus styles for better accessibility */[role="tab"].svelte-fn6h9a:focus {outline:2px solid var(--color-primary-500);outline-offset:2px;}
|
|
961
|
-
|
|
962
|
-
/* Smooth transitions */[role="tab"].svelte-fn6h9a {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
|
|
963
|
-
|
|
964
|
-
/* Vertical tabs specific styles */.tabs-container.vertical.svelte-fn6h9a {align-items:flex-start;}.tabs-container.vertical.svelte-fn6h9a [role="tablist"]:where(.svelte-fn6h9a) {min-width:200px;}.tabs-container.vertical.svelte-fn6h9a [role="tab"]:where(.svelte-fn6h9a) {justify-content:flex-start;text-align:left;}`
|
|
965
|
-
};
|
|
966
|
-
function na(o, a) {
|
|
967
|
-
oe(a, !1), fe(o, Gt);
|
|
968
|
-
const s = K(), m = K();
|
|
969
|
-
let f = g(a, "tabs", 24, () => []), r = g(a, "activeTab", 12, ""), b = g(a, "variant", 8, "default"), n = g(a, "size", 8, "md"), t = g(a, "orientation", 8, "horizontal"), c = g(a, "fullWidth", 8, !1), k = g(a, "className", 8, "");
|
|
970
|
-
const j = ie();
|
|
971
|
-
let p = K(), N = K();
|
|
972
|
-
const A = {
|
|
973
|
-
variant: b(),
|
|
974
|
-
size: n(),
|
|
975
|
-
orientation: t(),
|
|
976
|
-
fullWidth: c()
|
|
977
|
-
}, O = Lt(
|
|
978
|
-
f(),
|
|
979
|
-
(B) => {
|
|
980
|
-
r(B.activeTab || r());
|
|
981
|
-
},
|
|
982
|
-
j
|
|
983
|
-
), E = Nt(
|
|
984
|
-
f(),
|
|
985
|
-
e(s)
|
|
986
|
-
);
|
|
987
|
-
function z(B) {
|
|
988
|
-
var u;
|
|
989
|
-
const l = (u = e(p)) == null ? void 0 : u.querySelector(`[data-tab-id="${B}"]`);
|
|
990
|
-
l == null || l.focus();
|
|
991
|
-
}
|
|
992
|
-
ue(
|
|
993
|
-
() => (F(f()), F(r())),
|
|
994
|
-
() => {
|
|
995
|
-
T(s, Ut(Pt(f(), r()), f(), r()));
|
|
996
|
-
}
|
|
997
|
-
), ue(() => F(f()), () => {
|
|
998
|
-
T(m, Ft(A, f()));
|
|
999
|
-
}), Ce();
|
|
1000
|
-
var $ = { focusTab: z };
|
|
1001
|
-
re();
|
|
1002
|
-
var D = Wt(), S = i(D);
|
|
1003
|
-
pe(S, 5, f, _e, (B, l, u) => {
|
|
1004
|
-
var _ = Ot(), C = Z(_);
|
|
1005
|
-
Te(
|
|
1006
|
-
C,
|
|
1007
|
-
(L, Y) => ({
|
|
1008
|
-
type: "button",
|
|
1009
|
-
role: "tab",
|
|
1010
|
-
"data-tab-id": (e(l), d(() => e(l).id)),
|
|
1011
|
-
class: L,
|
|
1012
|
-
...Y
|
|
1013
|
-
}),
|
|
1014
|
-
[
|
|
1015
|
-
() => (F(je), e(l), F(ee), F(r()), d(() => je(A, e(l), ee(e(l), r())))),
|
|
1016
|
-
() => It(e(l), ee(e(l), r()))
|
|
1017
|
-
],
|
|
1018
|
-
void 0,
|
|
1019
|
-
"svelte-fn6h9a"
|
|
1020
|
-
);
|
|
1021
|
-
var P = i(C);
|
|
1022
|
-
{
|
|
1023
|
-
var h = (L) => {
|
|
1024
|
-
var Y = Rt(), ce = i(Y);
|
|
1025
|
-
q(() => ae(ce, "d", (e(l), d(() => e(l).icon)))), v(L, Y);
|
|
1026
|
-
};
|
|
1027
|
-
M(P, (L) => {
|
|
1028
|
-
e(l), d(() => e(l).icon) && L(h);
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
var x = y(P, 2), U = i(x), R = y(x, 2);
|
|
1032
|
-
{
|
|
1033
|
-
var H = (L) => {
|
|
1034
|
-
var Y = Ht(), ce = i(Y);
|
|
1035
|
-
q(() => G(ce, (e(l), d(() => e(l).badge)))), v(L, Y);
|
|
1036
|
-
};
|
|
1037
|
-
M(R, (L) => {
|
|
1038
|
-
e(l), d(() => e(l).badge) && L(H);
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
var W = y(C, 2);
|
|
1042
|
-
{
|
|
1043
|
-
var J = (L) => {
|
|
1044
|
-
var Y = Kt();
|
|
1045
|
-
v(L, Y);
|
|
1046
|
-
};
|
|
1047
|
-
M(W, (L) => {
|
|
1048
|
-
F(b()), F(ee), e(l), F(r()), d(() => b() === "underline" && ee(e(l), r())) && L(J);
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
q(() => G(U, (e(l), d(() => e(l).label)))), te("click", C, (L) => O(e(l), L)), v(B, _);
|
|
1052
|
-
}), we(S, (B) => T(p, B), () => e(p));
|
|
1053
|
-
var V = y(S, 2);
|
|
1054
|
-
return pe(V, 5, f, _e, (B, l) => {
|
|
1055
|
-
var u = Vt();
|
|
1056
|
-
Te(
|
|
1057
|
-
u,
|
|
1058
|
-
(P, h) => ({ class: P, ...h }),
|
|
1059
|
-
[
|
|
1060
|
-
() => (F(Ee), F(ee), e(l), F(r()), d(() => Ee(A, ee(e(l), r())))),
|
|
1061
|
-
() => At(e(l))
|
|
1062
|
-
],
|
|
1063
|
-
void 0,
|
|
1064
|
-
"svelte-fn6h9a"
|
|
1065
|
-
);
|
|
1066
|
-
var _ = i(u);
|
|
1067
|
-
{
|
|
1068
|
-
var C = (P) => {
|
|
1069
|
-
var h = ne(), x = Z(h);
|
|
1070
|
-
me(x, a, "content", {}, null), v(P, h);
|
|
1071
|
-
};
|
|
1072
|
-
M(_, (P) => {
|
|
1073
|
-
F(ee), e(l), F(r()), d(() => ee(e(l), r())) && P(C);
|
|
1074
|
-
});
|
|
1075
|
-
}
|
|
1076
|
-
Ke(3, u, () => Oe, () => ({ duration: 200 })), v(B, u);
|
|
1077
|
-
}), we(V, (B) => T(N, B), () => e(N)), q(() => {
|
|
1078
|
-
X(D, 1, `tabs-container ${t() === "vertical" ? "flex" : ""} ${k() ?? ""}`, "svelte-fn6h9a"), X(S, 1, Re(e(m)), "svelte-fn6h9a"), ae(S, "aria-orientation", t());
|
|
1079
|
-
}), te("keydown", S, (B) => E(B)), v(o, D), Ae(a, "focusTab", z), se($);
|
|
1080
|
-
}
|
|
1081
|
-
export {
|
|
1082
|
-
Jt as A,
|
|
1083
|
-
Xt as C,
|
|
1084
|
-
ra as H,
|
|
1085
|
-
ta as I,
|
|
1086
|
-
aa as K,
|
|
1087
|
-
pt as M,
|
|
1088
|
-
sa as S,
|
|
1089
|
-
na as T,
|
|
1090
|
-
ea as a,
|
|
1091
|
-
$e as b,
|
|
1092
|
-
Pt as c,
|
|
1093
|
-
Ft as d,
|
|
1094
|
-
Ee as e,
|
|
1095
|
-
Nt as f,
|
|
1096
|
-
je as g,
|
|
1097
|
-
Lt as h,
|
|
1098
|
-
oa as i,
|
|
1099
|
-
la as j,
|
|
1100
|
-
ee as k,
|
|
1101
|
-
It as l,
|
|
1102
|
-
At as m,
|
|
1103
|
-
Se as t,
|
|
1104
|
-
Ut as u
|
|
1105
|
-
};
|