zabi-components 1.0.8 → 1.0.11
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/dist/{Tabs-DOvhDdUK.js → Tabs-RCuPHjEL.js} +264 -265
- package/dist/{Toast-1EMgTOM4.js → Toast-BTynzMV8.js} +166 -137
- package/dist/{ToastManager-ZcovxilX.js → ToastManager-Bd5Slcp4.js} +96 -91
- package/dist/{Toggle-CTlSe4Ym.js → Toggle-LURK-bI8.js} +331 -312
- package/dist/Tooltip-BoApUzYg.js +1163 -0
- package/dist/atoms/index.js +3 -3
- package/dist/index/index.js +120 -114
- package/dist/molecules/index.js +2 -2
- package/dist/organisms/index.js +1 -1
- package/package.json +16 -9
- package/dist/Tooltip-gkAHhbjD.js +0 -1152
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { t as q, T as
|
|
2
|
-
import { r as
|
|
3
|
-
import { createEventDispatcher as ie, onMount as
|
|
4
|
-
function
|
|
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-LURK-bI8.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
5
|
var r = o, b = "";
|
|
6
6
|
q(() => {
|
|
7
|
-
var
|
|
7
|
+
var n = (
|
|
8
8
|
/** @type {Effect} */
|
|
9
|
-
|
|
9
|
+
Pe
|
|
10
10
|
);
|
|
11
|
-
if (b !== (b = a() ?? "") && (
|
|
12
|
-
|
|
11
|
+
if (b !== (b = a() ?? "") && (n.nodes_start !== null && (Ue(
|
|
12
|
+
n.nodes_start,
|
|
13
13
|
/** @type {TemplateNode} */
|
|
14
|
-
|
|
15
|
-
),
|
|
14
|
+
n.nodes_end
|
|
15
|
+
), n.nodes_start = n.nodes_end = null), b !== "")) {
|
|
16
16
|
var t = b + "";
|
|
17
|
-
s ? t = `<svg>${t}</svg>` :
|
|
18
|
-
var c =
|
|
19
|
-
if ((s ||
|
|
20
|
-
be(c)),
|
|
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
21
|
/** @type {TemplateNode} */
|
|
22
22
|
be(c),
|
|
23
23
|
/** @type {TemplateNode} */
|
|
24
24
|
c.lastChild
|
|
25
|
-
), s ||
|
|
25
|
+
), s || m)
|
|
26
26
|
for (; be(c); )
|
|
27
27
|
r.before(
|
|
28
28
|
/** @type {Node} */
|
|
@@ -33,11 +33,11 @@ function at(o, a, s = !1, f = !1, m = !1) {
|
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
var
|
|
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
37
|
function Jt(o, a) {
|
|
38
38
|
oe(a, !1);
|
|
39
|
-
const s = K(),
|
|
40
|
-
let r = g(a, "variant", 8, "info"), b = g(a, "title", 8, ""),
|
|
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
41
|
const k = ie();
|
|
42
42
|
function j(u) {
|
|
43
43
|
k("close", { event: u });
|
|
@@ -50,11 +50,11 @@ function Jt(o, a) {
|
|
|
50
50
|
warning: "bg-warning-surface text-warning-text border border-warning",
|
|
51
51
|
error: "bg-error-surface text-error-text border border-error"
|
|
52
52
|
});
|
|
53
|
-
}), ue(() =>
|
|
54
|
-
T(
|
|
53
|
+
}), ue(() => F(r()), () => {
|
|
54
|
+
T(m, r() === "success" || r() === "info" ? "status" : "alert");
|
|
55
55
|
}), ue(() => {
|
|
56
56
|
}, () => {
|
|
57
|
-
T(
|
|
57
|
+
T(f, {
|
|
58
58
|
info: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
59
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
60
|
</svg>`,
|
|
@@ -69,22 +69,22 @@ function Jt(o, a) {
|
|
|
69
69
|
</svg>`
|
|
70
70
|
});
|
|
71
71
|
}), Ce(), re();
|
|
72
|
-
var p =
|
|
72
|
+
var p = ot(), N = i(p);
|
|
73
73
|
{
|
|
74
74
|
var A = (u) => {
|
|
75
|
-
var _ =
|
|
76
|
-
te("click", _,
|
|
75
|
+
var _ = at();
|
|
76
|
+
te("click", _, Me(j)), v(u, _);
|
|
77
77
|
};
|
|
78
|
-
M(
|
|
78
|
+
M(N, (u) => {
|
|
79
79
|
t() && u(A);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
var O = y(
|
|
83
|
-
|
|
82
|
+
var O = y(N, 2), E = i(O), z = i(E);
|
|
83
|
+
tt(z, () => (e(f), F(r()), d(() => e(f)[r()])));
|
|
84
84
|
var $ = y(E, 2), D = i($);
|
|
85
85
|
{
|
|
86
86
|
var S = (u) => {
|
|
87
|
-
var _ =
|
|
87
|
+
var _ = rt(), C = i(_);
|
|
88
88
|
q(() => G(C, b())), v(u, _);
|
|
89
89
|
};
|
|
90
90
|
M(D, (u) => {
|
|
@@ -94,34 +94,34 @@ function Jt(o, a) {
|
|
|
94
94
|
var V = y(D, 2);
|
|
95
95
|
{
|
|
96
96
|
var B = (u) => {
|
|
97
|
-
var _ =
|
|
98
|
-
q(() => G(C,
|
|
97
|
+
var _ = st(), C = i(_);
|
|
98
|
+
q(() => G(C, n())), v(u, _);
|
|
99
99
|
};
|
|
100
100
|
M(V, (u) => {
|
|
101
|
-
|
|
101
|
+
n() && u(B);
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
var
|
|
105
|
-
me(
|
|
106
|
-
X(p, 1, `relative rounded-md p-4 border ${e(s),
|
|
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
107
|
}), v(o, p), se();
|
|
108
108
|
}
|
|
109
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
|
|
110
|
+
const nt = {
|
|
111
111
|
hash: "svelte-1ko6p3l",
|
|
112
112
|
code: ".cards-grid.svelte-1ko6p3l {padding-top:1.5rem;padding-bottom:1.5rem}"
|
|
113
113
|
};
|
|
114
114
|
function Xt(o, a) {
|
|
115
|
-
oe(a, !1), fe(o,
|
|
116
|
-
let s = g(a, "title", 8),
|
|
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
117
|
const r = ie();
|
|
118
118
|
function b(j) {
|
|
119
119
|
r("cardClick", j.detail);
|
|
120
120
|
}
|
|
121
121
|
re();
|
|
122
|
-
var
|
|
123
|
-
pe(k, 5,
|
|
124
|
-
|
|
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
125
|
get title() {
|
|
126
126
|
return e(p), d(() => e(p).title);
|
|
127
127
|
},
|
|
@@ -136,48 +136,48 @@ function Xt(o, a) {
|
|
|
136
136
|
$$events: { click: b }
|
|
137
137
|
});
|
|
138
138
|
}), q(() => {
|
|
139
|
-
X(
|
|
140
|
-
}), v(o,
|
|
139
|
+
X(n, 1, `cards-grid space-y-6 ${f() ?? ""}`, "svelte-1ko6p3l"), G(c, s());
|
|
140
|
+
}), v(o, n), se();
|
|
141
141
|
}
|
|
142
|
-
var
|
|
143
|
-
const
|
|
142
|
+
var it = w("<form><!></form>");
|
|
143
|
+
const ct = {
|
|
144
144
|
hash: "svelte-8wahy8",
|
|
145
|
-
code: ".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;}"
|
|
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
146
|
};
|
|
147
|
-
function
|
|
148
|
-
oe(a, !1), fe(o,
|
|
149
|
-
let s = g(a, "method", 8, "post"),
|
|
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
150
|
const r = ie();
|
|
151
151
|
function b(c) {
|
|
152
152
|
const k = new FormData(c.target), j = Object.fromEntries(k.entries());
|
|
153
153
|
r("submit", { data: j, formData: k, event: c });
|
|
154
154
|
}
|
|
155
155
|
re();
|
|
156
|
-
var
|
|
156
|
+
var n = it(), t = i(n);
|
|
157
157
|
me(t, a, "default", {}, null), q(() => {
|
|
158
|
-
ae(
|
|
159
|
-
}), te("submit",
|
|
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
160
|
}
|
|
161
|
-
var
|
|
162
|
-
const
|
|
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
163
|
hash: "svelte-1pnsu7s",
|
|
164
164
|
code: ".contact-form.svelte-1pnsu7s {padding-top:1.5rem;padding-bottom:1.5rem}"
|
|
165
165
|
};
|
|
166
166
|
function ea(o, a) {
|
|
167
|
-
oe(a, !1), fe(o,
|
|
168
|
-
let s = g(a, "initialData", 24, () => ({ name: "", email: "" })),
|
|
169
|
-
const
|
|
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
170
|
let r = K({ ...s() });
|
|
171
171
|
function b(c) {
|
|
172
|
-
|
|
172
|
+
f("submit", { data: e(r) });
|
|
173
173
|
}
|
|
174
174
|
re();
|
|
175
|
-
var
|
|
176
|
-
|
|
175
|
+
var n = ut(), t = y(i(n), 2);
|
|
176
|
+
dt(t, {
|
|
177
177
|
$$events: { submit: b },
|
|
178
178
|
children: (c, k) => {
|
|
179
|
-
var j =
|
|
180
|
-
ke(
|
|
179
|
+
var j = vt(), p = Z(j), N = y(i(p), 2);
|
|
180
|
+
ke(N, {
|
|
181
181
|
id: "name",
|
|
182
182
|
name: "name",
|
|
183
183
|
placeholder: "Enter your name",
|
|
@@ -218,17 +218,17 @@ function ea(o, a) {
|
|
|
218
218
|
}), v(c, j);
|
|
219
219
|
},
|
|
220
220
|
$$slots: { default: !0 }
|
|
221
|
-
}), q(() => X(
|
|
221
|
+
}), q(() => X(n, 1, `contact-form max-w-md mx-auto space-y-6 ${m() ?? ""}`, "svelte-1pnsu7s")), v(o, n), se();
|
|
222
222
|
}
|
|
223
|
-
var
|
|
224
|
-
function
|
|
225
|
-
const s =
|
|
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
226
|
oe(a, !1);
|
|
227
|
-
let
|
|
227
|
+
let m = g(a, "isOpen", 12, !1), f = g(a, "title", 8, ""), r = g(a, "showCloseButton", 8, !0);
|
|
228
228
|
const b = ie();
|
|
229
|
-
let
|
|
229
|
+
let n = K(), t = K(null);
|
|
230
230
|
function c() {
|
|
231
|
-
|
|
231
|
+
m(!1), b("close", { event: new Event("close") });
|
|
232
232
|
}
|
|
233
233
|
function k(E) {
|
|
234
234
|
const z = E;
|
|
@@ -239,32 +239,32 @@ function ht(o, a) {
|
|
|
239
239
|
}
|
|
240
240
|
function p(E) {
|
|
241
241
|
var V;
|
|
242
|
-
if (!
|
|
243
|
-
const z = E, $ = (V = e(
|
|
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
244
|
if (!$.length) return;
|
|
245
245
|
const D = $[0], S = $[$.length - 1];
|
|
246
246
|
z.key === "Tab" && (z.shiftKey ? document.activeElement === D && (z.preventDefault(), S.focus()) : document.activeElement === S && (z.preventDefault(), D.focus()));
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
Xe(() => () => {
|
|
249
249
|
e(t) && e(t).focus();
|
|
250
|
-
}), ue(() => (
|
|
251
|
-
|
|
250
|
+
}), ue(() => (F(m()), e(n)), () => {
|
|
251
|
+
m() && (T(t, document.activeElement), requestAnimationFrame(() => {
|
|
252
252
|
var z;
|
|
253
|
-
const E = (z = e(
|
|
253
|
+
const E = (z = e(n)) == null ? void 0 : z.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
254
254
|
E == null || E.focus();
|
|
255
255
|
}));
|
|
256
256
|
}), Ce(), re();
|
|
257
|
-
var
|
|
257
|
+
var N = ne(), A = Z(N);
|
|
258
258
|
{
|
|
259
259
|
var O = (E) => {
|
|
260
|
-
var z =
|
|
260
|
+
var z = bt(), $ = i(z), D = i($), S = i(D), V = i(S), B = y(S, 2);
|
|
261
261
|
{
|
|
262
|
-
var
|
|
263
|
-
var x =
|
|
262
|
+
var l = (h) => {
|
|
263
|
+
var x = mt();
|
|
264
264
|
te("click", x, c), v(h, x);
|
|
265
265
|
};
|
|
266
266
|
M(B, (h) => {
|
|
267
|
-
r() && h(
|
|
267
|
+
r() && h(l);
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
var u = y(D, 2), _ = i(u);
|
|
@@ -272,69 +272,69 @@ function ht(o, a) {
|
|
|
272
272
|
var C = y(u, 2);
|
|
273
273
|
{
|
|
274
274
|
var P = (h) => {
|
|
275
|
-
var x =
|
|
275
|
+
var x = gt(), U = i(x);
|
|
276
276
|
me(U, a, "footer", {}, null), v(h, x);
|
|
277
277
|
};
|
|
278
278
|
M(C, (h) => {
|
|
279
279
|
d(() => s.footer) && h(P);
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
-
we($, (h) => T(
|
|
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
283
|
};
|
|
284
284
|
M(A, (E) => {
|
|
285
|
-
|
|
285
|
+
m() && E(O);
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
|
-
v(o,
|
|
288
|
+
v(o, N), se();
|
|
289
289
|
}
|
|
290
|
-
var
|
|
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
291
|
function ta(o, a) {
|
|
292
292
|
oe(a, !1);
|
|
293
|
-
let s = g(a, "value", 12, null),
|
|
293
|
+
let s = g(a, "value", 12, null), m = g(a, "disabled", 8, !1), f = g(a, "accept", 8, "image/*"), r = g(
|
|
294
294
|
a,
|
|
295
295
|
"maxSize",
|
|
296
296
|
8,
|
|
297
297
|
5 * 1024 * 1024
|
|
298
298
|
// 5MB default
|
|
299
299
|
), b = g(a, "placeholder", 8, "No image selected");
|
|
300
|
-
const
|
|
300
|
+
const n = ie();
|
|
301
301
|
let t = K(!1), c = K(null), k = K(null), j = K(!1), p = K(0);
|
|
302
|
-
function
|
|
303
|
-
const u =
|
|
302
|
+
function N(l) {
|
|
303
|
+
const u = l.target;
|
|
304
304
|
if (!u.files || u.files.length === 0) return;
|
|
305
305
|
const _ = u.files, C = _[0];
|
|
306
306
|
if (C.size > r()) {
|
|
307
|
-
|
|
307
|
+
n("error", {
|
|
308
308
|
message: `File size must be less than ${Math.round(r() / 1024 / 1024)}MB`
|
|
309
309
|
});
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
|
-
if (
|
|
313
|
-
|
|
312
|
+
if (f() !== "*" && !C.type.match(f().replace("*", ".*"))) {
|
|
313
|
+
n("error", { message: "Please select a valid file type" });
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
-
T(c, C), T(k, URL.createObjectURL(C)),
|
|
316
|
+
T(c, C), T(k, URL.createObjectURL(C)), n("upload", { files: _ });
|
|
317
317
|
}
|
|
318
318
|
async function A() {
|
|
319
319
|
if (!(!e(c) || !e(k))) {
|
|
320
320
|
T(j, !0), T(p, 0);
|
|
321
321
|
try {
|
|
322
|
-
const
|
|
322
|
+
const l = setInterval(
|
|
323
323
|
() => {
|
|
324
324
|
e(p) < 90 && T(p, e(p) + Math.random() * 10);
|
|
325
325
|
},
|
|
326
326
|
200
|
|
327
327
|
);
|
|
328
|
-
await new Promise((u) => setTimeout(u, 1e3)), clearInterval(
|
|
329
|
-
} catch (
|
|
330
|
-
|
|
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
331
|
} finally {
|
|
332
332
|
T(j, !1), T(p, 0);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
function O() {
|
|
337
|
-
s(null),
|
|
337
|
+
s(null), n("change", { value: null });
|
|
338
338
|
}
|
|
339
339
|
function E() {
|
|
340
340
|
T(c, null), e(k) && (URL.revokeObjectURL(e(k)), T(k, null)), T(p, 0);
|
|
@@ -342,18 +342,18 @@ function ta(o, a) {
|
|
|
342
342
|
function z() {
|
|
343
343
|
e(k) && (URL.revokeObjectURL(e(k)), T(k, null));
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
et(() => {
|
|
346
346
|
z();
|
|
347
347
|
}), re();
|
|
348
|
-
var $ =
|
|
348
|
+
var $ = jt(), D = i($);
|
|
349
349
|
{
|
|
350
|
-
var S = (
|
|
351
|
-
var u =
|
|
350
|
+
var S = (l) => {
|
|
351
|
+
var u = ht(), _ = i(u), C = y(_, 2), P = i(C), h = i(P);
|
|
352
352
|
ve(h, {
|
|
353
353
|
variant: "secondary",
|
|
354
354
|
size: "sm",
|
|
355
355
|
get disabled() {
|
|
356
|
-
return
|
|
356
|
+
return m();
|
|
357
357
|
},
|
|
358
358
|
$$events: { click: () => T(t, !0) },
|
|
359
359
|
children: (U, R) => {
|
|
@@ -367,7 +367,7 @@ function ta(o, a) {
|
|
|
367
367
|
variant: "danger",
|
|
368
368
|
size: "sm",
|
|
369
369
|
get disabled() {
|
|
370
|
-
return
|
|
370
|
+
return m();
|
|
371
371
|
},
|
|
372
372
|
$$events: { click: O },
|
|
373
373
|
children: (U, R) => {
|
|
@@ -375,14 +375,14 @@ function ta(o, a) {
|
|
|
375
375
|
v(U, H);
|
|
376
376
|
},
|
|
377
377
|
$$slots: { default: !0 }
|
|
378
|
-
}), q(() => ae(_, "src", s())), v(
|
|
379
|
-
}, V = (
|
|
380
|
-
var u =
|
|
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
381
|
ve(U, {
|
|
382
382
|
variant: "primary",
|
|
383
383
|
size: "sm",
|
|
384
384
|
get disabled() {
|
|
385
|
-
return
|
|
385
|
+
return m();
|
|
386
386
|
},
|
|
387
387
|
$$events: { click: () => T(t, !0) },
|
|
388
388
|
children: (R, H) => {
|
|
@@ -390,70 +390,70 @@ function ta(o, a) {
|
|
|
390
390
|
v(R, W);
|
|
391
391
|
},
|
|
392
392
|
$$slots: { default: !0 }
|
|
393
|
-
}), q(() => G(h, b())), v(
|
|
393
|
+
}), q(() => G(h, b())), v(l, u);
|
|
394
394
|
};
|
|
395
|
-
M(D, (
|
|
396
|
-
s() ?
|
|
395
|
+
M(D, (l) => {
|
|
396
|
+
s() ? l(S) : l(V, !1);
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
var B = y(D, 2);
|
|
400
|
-
|
|
400
|
+
pt(B, {
|
|
401
401
|
title: "Upload File",
|
|
402
402
|
get isOpen() {
|
|
403
403
|
return e(t);
|
|
404
404
|
},
|
|
405
|
-
set isOpen(
|
|
406
|
-
T(t,
|
|
405
|
+
set isOpen(l) {
|
|
406
|
+
T(t, l);
|
|
407
407
|
},
|
|
408
408
|
$$events: {
|
|
409
409
|
close: () => {
|
|
410
410
|
T(t, !1), E();
|
|
411
411
|
}
|
|
412
412
|
},
|
|
413
|
-
children: (
|
|
414
|
-
var _ =
|
|
413
|
+
children: (l, u) => {
|
|
414
|
+
var _ = zt(), C = i(_);
|
|
415
415
|
{
|
|
416
416
|
var P = (x) => {
|
|
417
|
-
var U =
|
|
417
|
+
var U = yt(), R = y(i(U), 2), H = y(R, 2), W = i(H);
|
|
418
418
|
q(
|
|
419
419
|
(J) => {
|
|
420
|
-
ae(R, "accept",
|
|
420
|
+
ae(R, "accept", f()), G(W, `Max size: ${J ?? ""}MB`);
|
|
421
421
|
},
|
|
422
422
|
[
|
|
423
|
-
() => (
|
|
423
|
+
() => (F(r()), d(() => Math.round(r() / 1024 / 1024)))
|
|
424
424
|
]
|
|
425
|
-
), te("change", R,
|
|
425
|
+
), te("change", R, N), v(x, U);
|
|
426
426
|
}, h = (x) => {
|
|
427
|
-
var U =
|
|
427
|
+
var U = $t(), R = i(U), H = i(R);
|
|
428
428
|
{
|
|
429
429
|
var W = (I) => {
|
|
430
|
-
var Q =
|
|
430
|
+
var Q = _t();
|
|
431
431
|
q(() => ae(Q, "src", e(k))), v(I, Q);
|
|
432
432
|
}, J = (I) => {
|
|
433
|
-
var Q =
|
|
433
|
+
var Q = wt(), ge = i(Q), he = y(i(ge), 2), xe = i(he);
|
|
434
434
|
q(() => G(xe, (e(c), d(() => e(c).name)))), v(I, Q);
|
|
435
435
|
};
|
|
436
436
|
M(H, (I) => {
|
|
437
437
|
e(c), d(() => e(c).type.startsWith("image/")) ? I(W) : I(J, !1);
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
var
|
|
440
|
+
var L = y(H, 2);
|
|
441
441
|
{
|
|
442
442
|
var Y = (I) => {
|
|
443
|
-
var Q =
|
|
443
|
+
var Q = kt();
|
|
444
444
|
v(I, Q);
|
|
445
445
|
};
|
|
446
|
-
M(
|
|
446
|
+
M(L, (I) => {
|
|
447
447
|
e(j) && I(Y);
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
var ce = y(R, 2);
|
|
451
451
|
{
|
|
452
|
-
var
|
|
453
|
-
var Q =
|
|
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
454
|
q(
|
|
455
|
-
(
|
|
456
|
-
G(xe, `${
|
|
455
|
+
(Be) => {
|
|
456
|
+
G(xe, `${Be ?? ""}%`), Ie(De, `width: ${e(p) ?? ""}%`);
|
|
457
457
|
},
|
|
458
458
|
[
|
|
459
459
|
() => (e(p), d(() => Math.round(e(p))))
|
|
@@ -461,7 +461,7 @@ function ta(o, a) {
|
|
|
461
461
|
), v(I, Q);
|
|
462
462
|
};
|
|
463
463
|
M(ce, (I) => {
|
|
464
|
-
e(j) && I(
|
|
464
|
+
e(j) && I(le);
|
|
465
465
|
});
|
|
466
466
|
}
|
|
467
467
|
v(x, U);
|
|
@@ -470,12 +470,12 @@ function ta(o, a) {
|
|
|
470
470
|
e(c) ? x(h, !1) : x(P);
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
v(
|
|
473
|
+
v(l, _);
|
|
474
474
|
},
|
|
475
475
|
$$slots: {
|
|
476
476
|
default: !0,
|
|
477
|
-
footer: (
|
|
478
|
-
var _ =
|
|
477
|
+
footer: (l, u) => {
|
|
478
|
+
var _ = Tt(), C = Z(_);
|
|
479
479
|
ve(C, {
|
|
480
480
|
variant: "secondary",
|
|
481
481
|
$$events: {
|
|
@@ -512,38 +512,38 @@ function ta(o, a) {
|
|
|
512
512
|
e(c) && x(h);
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
|
-
v(
|
|
515
|
+
v(l, _);
|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
518
|
$$legacy: !0
|
|
519
519
|
}), v(o, $), se();
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var Et = w("<div><!></div>"), Mt = w('<div class="flex flex-wrap gap-4"></div>');
|
|
522
522
|
function aa(o, a) {
|
|
523
523
|
oe(a, !1);
|
|
524
|
-
let s = g(a, "values", 28, () => ({})),
|
|
525
|
-
const
|
|
526
|
-
function r(
|
|
524
|
+
let s = g(a, "values", 28, () => ({})), m = g(a, "fields", 24, () => []);
|
|
525
|
+
const f = ie();
|
|
526
|
+
function r(n) {
|
|
527
527
|
var c;
|
|
528
|
-
const t =
|
|
528
|
+
const t = n.detail;
|
|
529
529
|
if (t && typeof t == "object") {
|
|
530
|
-
const k = ((c =
|
|
531
|
-
|
|
530
|
+
const k = ((c = n.target) == null ? void 0 : c.name) || "unknown";
|
|
531
|
+
f("change", {
|
|
532
532
|
field: k,
|
|
533
533
|
value: t,
|
|
534
|
-
event:
|
|
534
|
+
event: n.detail.event || new Event("change")
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
re();
|
|
539
|
-
var b =
|
|
540
|
-
pe(b, 5,
|
|
541
|
-
var c =
|
|
539
|
+
var b = Mt();
|
|
540
|
+
pe(b, 5, m, (n) => n.key, (n, t) => {
|
|
541
|
+
var c = Et(), k = i(c);
|
|
542
542
|
{
|
|
543
|
-
var j = (
|
|
543
|
+
var j = (N) => {
|
|
544
544
|
{
|
|
545
545
|
let A = ye(() => (e(t), d(() => e(t).rows || 3)));
|
|
546
|
-
|
|
546
|
+
We(N, {
|
|
547
547
|
get label() {
|
|
548
548
|
return e(t), d(() => e(t).label);
|
|
549
549
|
},
|
|
@@ -568,13 +568,13 @@ function aa(o, a) {
|
|
|
568
568
|
$$legacy: !0
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
|
-
}, p = (
|
|
572
|
-
var A =
|
|
571
|
+
}, p = (N) => {
|
|
572
|
+
var A = ne(), O = Z(A);
|
|
573
573
|
{
|
|
574
574
|
var E = ($) => {
|
|
575
575
|
{
|
|
576
576
|
let D = ye(() => (e(t), d(() => e(t).options || [])));
|
|
577
|
-
|
|
577
|
+
Ge($, {
|
|
578
578
|
get options() {
|
|
579
579
|
return e(D);
|
|
580
580
|
},
|
|
@@ -600,10 +600,10 @@ function aa(o, a) {
|
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
}, z = ($) => {
|
|
603
|
-
var D =
|
|
603
|
+
var D = ne(), S = Z(D);
|
|
604
604
|
{
|
|
605
|
-
var V = (
|
|
606
|
-
|
|
605
|
+
var V = (l) => {
|
|
606
|
+
Ye(l, {
|
|
607
607
|
get label() {
|
|
608
608
|
return e(t), d(() => e(t).label);
|
|
609
609
|
},
|
|
@@ -621,11 +621,11 @@ function aa(o, a) {
|
|
|
621
621
|
$$events: { input: r, change: r },
|
|
622
622
|
$$legacy: !0
|
|
623
623
|
});
|
|
624
|
-
}, B = (
|
|
625
|
-
var u =
|
|
624
|
+
}, B = (l) => {
|
|
625
|
+
var u = ne(), _ = Z(u);
|
|
626
626
|
{
|
|
627
627
|
var C = (h) => {
|
|
628
|
-
|
|
628
|
+
Qe(h, {
|
|
629
629
|
get label() {
|
|
630
630
|
return e(t), d(() => e(t).label);
|
|
631
631
|
},
|
|
@@ -639,10 +639,10 @@ function aa(o, a) {
|
|
|
639
639
|
$$legacy: !0
|
|
640
640
|
});
|
|
641
641
|
}, P = (h) => {
|
|
642
|
-
var x =
|
|
642
|
+
var x = ne(), U = Z(x);
|
|
643
643
|
{
|
|
644
644
|
var R = (W) => {
|
|
645
|
-
|
|
645
|
+
Ze(W, {
|
|
646
646
|
get label() {
|
|
647
647
|
return e(t), d(() => e(t).label);
|
|
648
648
|
},
|
|
@@ -661,10 +661,10 @@ function aa(o, a) {
|
|
|
661
661
|
$$legacy: !0
|
|
662
662
|
});
|
|
663
663
|
}, H = (W) => {
|
|
664
|
-
var J =
|
|
664
|
+
var J = ne(), L = Z(J);
|
|
665
665
|
{
|
|
666
|
-
var Y = (
|
|
667
|
-
|
|
666
|
+
var Y = (le) => {
|
|
667
|
+
Je(le, {
|
|
668
668
|
get label() {
|
|
669
669
|
return e(t), d(() => e(t).label);
|
|
670
670
|
},
|
|
@@ -681,10 +681,10 @@ function aa(o, a) {
|
|
|
681
681
|
$$events: { input: r, change: r },
|
|
682
682
|
$$legacy: !0
|
|
683
683
|
});
|
|
684
|
-
}, ce = (
|
|
684
|
+
}, ce = (le) => {
|
|
685
685
|
{
|
|
686
686
|
let I = ye(() => (e(t), d(() => e(t).type || "text")));
|
|
687
|
-
ke(
|
|
687
|
+
ke(le, {
|
|
688
688
|
get type() {
|
|
689
689
|
return e(I);
|
|
690
690
|
},
|
|
@@ -711,9 +711,9 @@ function aa(o, a) {
|
|
|
711
711
|
}
|
|
712
712
|
};
|
|
713
713
|
M(
|
|
714
|
-
|
|
715
|
-
(
|
|
716
|
-
e(t), d(() => e(t).type === "textalignment") ?
|
|
714
|
+
L,
|
|
715
|
+
(le) => {
|
|
716
|
+
e(t), d(() => e(t).type === "textalignment") ? le(Y) : le(ce, !1);
|
|
717
717
|
},
|
|
718
718
|
!0
|
|
719
719
|
);
|
|
@@ -738,12 +738,12 @@ function aa(o, a) {
|
|
|
738
738
|
!0
|
|
739
739
|
);
|
|
740
740
|
}
|
|
741
|
-
v(
|
|
741
|
+
v(l, u);
|
|
742
742
|
};
|
|
743
743
|
M(
|
|
744
744
|
S,
|
|
745
|
-
(
|
|
746
|
-
e(t), d(() => e(t).type === "checkbox") ?
|
|
745
|
+
(l) => {
|
|
746
|
+
e(t), d(() => e(t).type === "checkbox") ? l(V) : l(B, !1);
|
|
747
747
|
},
|
|
748
748
|
!0
|
|
749
749
|
);
|
|
@@ -758,65 +758,65 @@ function aa(o, a) {
|
|
|
758
758
|
!0
|
|
759
759
|
);
|
|
760
760
|
}
|
|
761
|
-
v(
|
|
761
|
+
v(N, A);
|
|
762
762
|
};
|
|
763
|
-
M(k, (
|
|
764
|
-
e(t), d(() => e(t).type === "textarea") ?
|
|
763
|
+
M(k, (N) => {
|
|
764
|
+
e(t), d(() => e(t).type === "textarea") ? N(j) : N(p, !1);
|
|
765
765
|
});
|
|
766
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(
|
|
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
768
|
}), v(o, b), se();
|
|
769
769
|
}
|
|
770
|
-
var
|
|
771
|
-
const
|
|
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
772
|
hash: "svelte-1k5lr7e",
|
|
773
773
|
code: ".hero.svelte-1k5lr7e {padding-top:2rem;padding-bottom:2rem}"
|
|
774
774
|
};
|
|
775
775
|
function ra(o, a) {
|
|
776
|
-
fe(o,
|
|
777
|
-
let s = g(a, "title", 8),
|
|
778
|
-
var r =
|
|
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
779
|
q(() => {
|
|
780
|
-
X(r, 1, `hero text-center space-y-4 ${
|
|
780
|
+
X(r, 1, `hero text-center space-y-4 ${f() ?? ""}`, "svelte-1k5lr7e"), G(n, s()), G(c, m());
|
|
781
781
|
}), v(o, r);
|
|
782
782
|
}
|
|
783
|
-
var
|
|
784
|
-
const
|
|
783
|
+
var Dt = w('<section><p class="text-info-text">You clicked: <strong> </strong></p></section>');
|
|
784
|
+
const Bt = {
|
|
785
785
|
hash: "svelte-17n10vn",
|
|
786
786
|
code: ".selected-card-info.svelte-17n10vn {padding-top:1rem;padding-bottom:1rem}"
|
|
787
787
|
};
|
|
788
788
|
function sa(o, a) {
|
|
789
|
-
oe(a, !1), fe(o,
|
|
790
|
-
let s = g(a, "selectedCard", 8),
|
|
789
|
+
oe(a, !1), fe(o, Bt);
|
|
790
|
+
let s = g(a, "selectedCard", 8), m = g(a, "className", 8, "");
|
|
791
791
|
re();
|
|
792
|
-
var
|
|
792
|
+
var f = ne(), r = Z(f);
|
|
793
793
|
{
|
|
794
|
-
var b = (
|
|
795
|
-
var t =
|
|
794
|
+
var b = (n) => {
|
|
795
|
+
var t = Dt(), c = i(t), k = y(i(c)), j = i(k);
|
|
796
796
|
q(() => {
|
|
797
|
-
X(t, 1, `selected-card-info text-center p-4 bg-info-surface rounded-lg ${
|
|
798
|
-
}), v(
|
|
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
799
|
};
|
|
800
|
-
M(r, (
|
|
801
|
-
s() &&
|
|
800
|
+
M(r, (n) => {
|
|
801
|
+
s() && n(b);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
v(o,
|
|
804
|
+
v(o, f), se();
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Pt(o, a) {
|
|
807
807
|
const s = a || (o.length > 0 ? o[0].id : "");
|
|
808
808
|
return {
|
|
809
809
|
activeTab: s,
|
|
810
|
-
activeTabIndex: o.findIndex((
|
|
810
|
+
activeTabIndex: o.findIndex((m) => m.id === s)
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Ut(o, a, s) {
|
|
814
814
|
return {
|
|
815
815
|
activeTab: s,
|
|
816
|
-
activeTabIndex: a.findIndex((
|
|
816
|
+
activeTabIndex: a.findIndex((m) => m.id === s)
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
const
|
|
819
|
+
const Se = {
|
|
820
820
|
sm: {
|
|
821
821
|
tab: "px-3 py-1.5 text-sm",
|
|
822
822
|
panel: "p-3",
|
|
@@ -859,48 +859,47 @@ const qe = {
|
|
|
859
859
|
}
|
|
860
860
|
};
|
|
861
861
|
function je(o, a, s) {
|
|
862
|
-
const
|
|
862
|
+
const m = Se[o.size], f = $e[o.variant];
|
|
863
863
|
return [
|
|
864
|
-
f.tab,
|
|
865
864
|
m.tab,
|
|
866
|
-
|
|
865
|
+
f.tab,
|
|
866
|
+
s ? f.activeTab : "",
|
|
867
867
|
a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
868
868
|
o.fullWidth ? "flex-1" : "",
|
|
869
869
|
"flex items-center justify-center gap-2"
|
|
870
870
|
].filter(Boolean).join(" ");
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
var s;
|
|
872
|
+
function Ft(o, a = []) {
|
|
874
873
|
return [
|
|
875
874
|
$e[o.variant].container,
|
|
876
875
|
o.orientation === "vertical" ? "flex-col space-y-1 mr-4" : "",
|
|
877
|
-
o.fullWidth ? `grid grid-cols-${
|
|
876
|
+
o.fullWidth ? `grid grid-cols-${a.length || 1}` : "flex"
|
|
878
877
|
].filter(Boolean).join(" ");
|
|
879
878
|
}
|
|
880
|
-
function
|
|
881
|
-
const s =
|
|
879
|
+
function Ee(o, a) {
|
|
880
|
+
const s = Se[o.size], m = $e[o.variant];
|
|
882
881
|
return [
|
|
883
882
|
s.panel,
|
|
884
|
-
|
|
883
|
+
m.panel,
|
|
885
884
|
a ? "block" : "hidden"
|
|
886
885
|
].filter(Boolean).join(" ");
|
|
887
886
|
}
|
|
888
|
-
function Nt(o, a, s,
|
|
887
|
+
function Nt(o, a, s, m) {
|
|
889
888
|
return function(r) {
|
|
890
889
|
const b = Array.from(
|
|
891
890
|
document.querySelectorAll('[role="tab"]')
|
|
892
|
-
),
|
|
891
|
+
), n = b.findIndex(
|
|
893
892
|
(c) => c === document.activeElement
|
|
894
893
|
);
|
|
895
|
-
let t =
|
|
894
|
+
let t = n;
|
|
896
895
|
switch (r.key) {
|
|
897
896
|
case "ArrowRight":
|
|
898
897
|
case "ArrowDown":
|
|
899
|
-
r.preventDefault(), t = (
|
|
898
|
+
r.preventDefault(), t = (n + 1) % o.length;
|
|
900
899
|
break;
|
|
901
900
|
case "ArrowLeft":
|
|
902
901
|
case "ArrowUp":
|
|
903
|
-
r.preventDefault(), t =
|
|
902
|
+
r.preventDefault(), t = n === 0 ? o.length - 1 : n - 1;
|
|
904
903
|
break;
|
|
905
904
|
case "Home":
|
|
906
905
|
r.preventDefault(), t = 0;
|
|
@@ -911,16 +910,16 @@ function Nt(o, a, s, f) {
|
|
|
911
910
|
case "Enter":
|
|
912
911
|
case " ":
|
|
913
912
|
r.preventDefault();
|
|
914
|
-
const c = b[
|
|
913
|
+
const c = b[n];
|
|
915
914
|
c && c.click();
|
|
916
915
|
return;
|
|
917
916
|
}
|
|
918
|
-
t !==
|
|
917
|
+
t !== n && b[t] && b[t].focus();
|
|
919
918
|
};
|
|
920
919
|
}
|
|
921
920
|
function Lt(o, a, s) {
|
|
922
|
-
return function(
|
|
923
|
-
|
|
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 }));
|
|
924
923
|
};
|
|
925
924
|
}
|
|
926
925
|
function oa(o, a) {
|
|
@@ -929,7 +928,7 @@ function oa(o, a) {
|
|
|
929
928
|
);
|
|
930
929
|
s == null || s.focus();
|
|
931
930
|
}
|
|
932
|
-
function
|
|
931
|
+
function la(o, a) {
|
|
933
932
|
return o.find((s) => s.id === a);
|
|
934
933
|
}
|
|
935
934
|
function ee(o, a) {
|
|
@@ -950,7 +949,7 @@ function At(o) {
|
|
|
950
949
|
"aria-labelledby": `tab-${o.id}`
|
|
951
950
|
};
|
|
952
951
|
}
|
|
953
|
-
var Rt =
|
|
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="
|
|
954
953
|
ml-1 px-1.5 py-0.5 text-xs font-medium
|
|
955
954
|
bg-primary-100 text-primary-800 rounded-full
|
|
956
955
|
dark:bg-primary-900 dark:text-primary-200
|
|
@@ -964,102 +963,102 @@ const Gt = {
|
|
|
964
963
|
|
|
965
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;}`
|
|
966
965
|
};
|
|
967
|
-
function
|
|
966
|
+
function na(o, a) {
|
|
968
967
|
oe(a, !1), fe(o, Gt);
|
|
969
|
-
const s = K(),
|
|
970
|
-
let
|
|
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, "");
|
|
971
970
|
const j = ie();
|
|
972
|
-
let p = K(),
|
|
971
|
+
let p = K(), N = K();
|
|
973
972
|
const A = {
|
|
974
973
|
variant: b(),
|
|
975
|
-
size:
|
|
974
|
+
size: n(),
|
|
976
975
|
orientation: t(),
|
|
977
976
|
fullWidth: c()
|
|
978
977
|
}, O = Lt(
|
|
979
|
-
|
|
978
|
+
f(),
|
|
980
979
|
(B) => {
|
|
981
980
|
r(B.activeTab || r());
|
|
982
981
|
},
|
|
983
982
|
j
|
|
984
983
|
), E = Nt(
|
|
985
|
-
|
|
984
|
+
f(),
|
|
986
985
|
e(s)
|
|
987
986
|
);
|
|
988
987
|
function z(B) {
|
|
989
988
|
var u;
|
|
990
|
-
const
|
|
991
|
-
|
|
989
|
+
const l = (u = e(p)) == null ? void 0 : u.querySelector(`[data-tab-id="${B}"]`);
|
|
990
|
+
l == null || l.focus();
|
|
992
991
|
}
|
|
993
992
|
ue(
|
|
994
|
-
() => (
|
|
993
|
+
() => (F(f()), F(r())),
|
|
995
994
|
() => {
|
|
996
|
-
T(s,
|
|
995
|
+
T(s, Ut(Pt(f(), r()), f(), r()));
|
|
997
996
|
}
|
|
998
|
-
), ue(() =>
|
|
999
|
-
T(
|
|
997
|
+
), ue(() => F(f()), () => {
|
|
998
|
+
T(m, Ft(A, f()));
|
|
1000
999
|
}), Ce();
|
|
1001
1000
|
var $ = { focusTab: z };
|
|
1002
1001
|
re();
|
|
1003
1002
|
var D = Wt(), S = i(D);
|
|
1004
|
-
pe(S, 5,
|
|
1003
|
+
pe(S, 5, f, _e, (B, l, u) => {
|
|
1005
1004
|
var _ = Ot(), C = Z(_);
|
|
1006
1005
|
Te(
|
|
1007
1006
|
C,
|
|
1008
|
-
(
|
|
1007
|
+
(L, Y) => ({
|
|
1009
1008
|
type: "button",
|
|
1010
1009
|
role: "tab",
|
|
1011
|
-
"data-tab-id": (e(
|
|
1012
|
-
class:
|
|
1010
|
+
"data-tab-id": (e(l), d(() => e(l).id)),
|
|
1011
|
+
class: L,
|
|
1013
1012
|
...Y
|
|
1014
1013
|
}),
|
|
1015
1014
|
[
|
|
1016
|
-
() => (
|
|
1017
|
-
() => It(e(
|
|
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()))
|
|
1018
1017
|
],
|
|
1019
1018
|
void 0,
|
|
1020
1019
|
"svelte-fn6h9a"
|
|
1021
1020
|
);
|
|
1022
1021
|
var P = i(C);
|
|
1023
1022
|
{
|
|
1024
|
-
var h = (
|
|
1023
|
+
var h = (L) => {
|
|
1025
1024
|
var Y = Rt(), ce = i(Y);
|
|
1026
|
-
q(() => ae(ce, "d", (e(
|
|
1025
|
+
q(() => ae(ce, "d", (e(l), d(() => e(l).icon)))), v(L, Y);
|
|
1027
1026
|
};
|
|
1028
|
-
M(P, (
|
|
1029
|
-
e(
|
|
1027
|
+
M(P, (L) => {
|
|
1028
|
+
e(l), d(() => e(l).icon) && L(h);
|
|
1030
1029
|
});
|
|
1031
1030
|
}
|
|
1032
1031
|
var x = y(P, 2), U = i(x), R = y(x, 2);
|
|
1033
1032
|
{
|
|
1034
|
-
var H = (
|
|
1033
|
+
var H = (L) => {
|
|
1035
1034
|
var Y = Ht(), ce = i(Y);
|
|
1036
|
-
q(() => G(ce, (e(
|
|
1035
|
+
q(() => G(ce, (e(l), d(() => e(l).badge)))), v(L, Y);
|
|
1037
1036
|
};
|
|
1038
|
-
M(R, (
|
|
1039
|
-
e(
|
|
1037
|
+
M(R, (L) => {
|
|
1038
|
+
e(l), d(() => e(l).badge) && L(H);
|
|
1040
1039
|
});
|
|
1041
1040
|
}
|
|
1042
1041
|
var W = y(C, 2);
|
|
1043
1042
|
{
|
|
1044
|
-
var J = (
|
|
1043
|
+
var J = (L) => {
|
|
1045
1044
|
var Y = Kt();
|
|
1046
|
-
v(
|
|
1045
|
+
v(L, Y);
|
|
1047
1046
|
};
|
|
1048
|
-
M(W, (
|
|
1049
|
-
|
|
1047
|
+
M(W, (L) => {
|
|
1048
|
+
F(b()), F(ee), e(l), F(r()), d(() => b() === "underline" && ee(e(l), r())) && L(J);
|
|
1050
1049
|
});
|
|
1051
1050
|
}
|
|
1052
|
-
q(() => G(U, (e(
|
|
1051
|
+
q(() => G(U, (e(l), d(() => e(l).label)))), te("click", C, (L) => O(e(l), L)), v(B, _);
|
|
1053
1052
|
}), we(S, (B) => T(p, B), () => e(p));
|
|
1054
1053
|
var V = y(S, 2);
|
|
1055
|
-
return pe(V, 5,
|
|
1054
|
+
return pe(V, 5, f, _e, (B, l) => {
|
|
1056
1055
|
var u = Vt();
|
|
1057
1056
|
Te(
|
|
1058
1057
|
u,
|
|
1059
1058
|
(P, h) => ({ class: P, ...h }),
|
|
1060
1059
|
[
|
|
1061
|
-
() => (
|
|
1062
|
-
() => At(e(
|
|
1060
|
+
() => (F(Ee), F(ee), e(l), F(r()), d(() => Ee(A, ee(e(l), r())))),
|
|
1061
|
+
() => At(e(l))
|
|
1063
1062
|
],
|
|
1064
1063
|
void 0,
|
|
1065
1064
|
"svelte-fn6h9a"
|
|
@@ -1067,17 +1066,17 @@ function la(o, a) {
|
|
|
1067
1066
|
var _ = i(u);
|
|
1068
1067
|
{
|
|
1069
1068
|
var C = (P) => {
|
|
1070
|
-
var h =
|
|
1069
|
+
var h = ne(), x = Z(h);
|
|
1071
1070
|
me(x, a, "content", {}, null), v(P, h);
|
|
1072
1071
|
};
|
|
1073
1072
|
M(_, (P) => {
|
|
1074
|
-
|
|
1073
|
+
F(ee), e(l), F(r()), d(() => ee(e(l), r())) && P(C);
|
|
1075
1074
|
});
|
|
1076
1075
|
}
|
|
1077
|
-
|
|
1078
|
-
}), we(V, (B) => T(
|
|
1079
|
-
X(D, 1, `tabs-container ${t() === "vertical" ? "flex" : ""} ${k() ?? ""}`, "svelte-fn6h9a"), X(S, 1,
|
|
1080
|
-
}), te("keydown", S, (B) => E(B)), v(o, D),
|
|
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($);
|
|
1081
1080
|
}
|
|
1082
1081
|
export {
|
|
1083
1082
|
Jt as A,
|
|
@@ -1085,22 +1084,22 @@ export {
|
|
|
1085
1084
|
ra as H,
|
|
1086
1085
|
ta as I,
|
|
1087
1086
|
aa as K,
|
|
1088
|
-
|
|
1087
|
+
pt as M,
|
|
1089
1088
|
sa as S,
|
|
1090
|
-
|
|
1089
|
+
na as T,
|
|
1091
1090
|
ea as a,
|
|
1092
1091
|
$e as b,
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1092
|
+
Pt as c,
|
|
1093
|
+
Ft as d,
|
|
1094
|
+
Ee as e,
|
|
1096
1095
|
Nt as f,
|
|
1097
1096
|
je as g,
|
|
1098
1097
|
Lt as h,
|
|
1099
1098
|
oa as i,
|
|
1100
|
-
|
|
1099
|
+
la as j,
|
|
1101
1100
|
ee as k,
|
|
1102
1101
|
It as l,
|
|
1103
1102
|
At as m,
|
|
1104
|
-
|
|
1105
|
-
|
|
1103
|
+
Se as t,
|
|
1104
|
+
Ut as u
|
|
1106
1105
|
};
|