zabi-components 1.0.0 → 1.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/dist/Tabs-DRnimczL.js +889 -0
- package/dist/Toast-DwMSanZj.js +417 -0
- package/dist/ToastManager-BpADCnfN.js +354 -0
- package/dist/Toggle-L79m_T4s.js +2270 -0
- package/dist/Tooltip-CYzYtAt2.js +1227 -0
- package/dist/atoms/index.js +18 -12
- package/dist/index/index.js +28 -19
- package/dist/molecules/index.js +7 -6
- package/dist/organisms/index.js +4 -2
- package/dist/x-DaAXsWcz.js +3073 -0
- package/package.json +5 -5
- package/dist/KeyValueForm-CC2AhAxK.js +0 -634
- package/dist/NotificationManager-BGzRVJn7.js +0 -74
- package/dist/Skeleton-CaVpFsgI.js +0 -620
- package/dist/Toggle-q1tBzXDR.js +0 -2508
- package/dist/index-DInFKA3g.js +0 -2645
|
@@ -0,0 +1,1227 @@
|
|
|
1
|
+
import { a as Te, p as u, C as ie, D as ze, i as we, f as k, c as W, g as r, h as pe, j as he, r as C, l as e, m as Z, n as a, k as H, b as ue, o as i, s as ne, t as h, q as P, F as oe, e as R, u as X, x as Se, v as J, _ as Fe, w as ge, Y as ye, B as V, d as je, P as ke, $ as me, E as ce, V as ve, G as Ee, y as qe, z as Re } from "./x-DaAXsWcz.js";
|
|
2
|
+
import { createEventDispatcher as Pe, onMount as Le } from "svelte";
|
|
3
|
+
import { T as Ve } from "./Toast-DwMSanZj.js";
|
|
4
|
+
var We = k("<div></div>"), He = Se('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" class="svelte-14njway"></path></svg>'), Oe = Se('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" class="svelte-14njway"></path></svg>'), Xe = k('<button type="button"><!> <!> <!> <!></button> <button type="button" aria-label="Close badge"><svg class="w-full h-full svelte-14njway" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" class="svelte-14njway"></path></svg></button>', 1), Ye = k("<div></div>"), Ge = Se('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" class="svelte-14njway"></path></svg>'), Ze = Se('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" class="svelte-14njway"></path></svg>'), Ue = k("<span><!> <!> <!> <!></span>"), Je = k('<div class="inline-flex items-center gap-1 svelte-14njway"><!></div>');
|
|
5
|
+
const Ke = {
|
|
6
|
+
hash: "svelte-14njway",
|
|
7
|
+
code: `
|
|
8
|
+
/* Hover effects for closable badges */.badge-closable.svelte-14njway:hover {transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.2);}.badge-closable.svelte-14njway:active {transform:translateY(0);}
|
|
9
|
+
|
|
10
|
+
/* Focus styles for accessibility */.badge-closable.svelte-14njway:focus {outline:2px solid var(--color-plasma-red-500);outline-offset:2px;}
|
|
11
|
+
|
|
12
|
+
/* Animation for badge appearance */
|
|
13
|
+
@keyframes svelte-14njway-badge-enter {
|
|
14
|
+
0% {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
transform: scale(0.8);
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
transform: scale(1);
|
|
21
|
+
}
|
|
22
|
+
}.badge-enter.svelte-14njway {
|
|
23
|
+
animation: svelte-14njway-badge-enter 0.2s ease-out;}
|
|
24
|
+
|
|
25
|
+
/* Animation for badge removal */
|
|
26
|
+
@keyframes svelte-14njway-badge-exit {
|
|
27
|
+
0% {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
transform: scale(1);
|
|
30
|
+
}
|
|
31
|
+
100% {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: scale(0.8);
|
|
34
|
+
}
|
|
35
|
+
}.badge-exit.svelte-14njway {
|
|
36
|
+
animation: svelte-14njway-badge-exit 0.2s ease-in;}
|
|
37
|
+
|
|
38
|
+
/* Dot animation */.badge-dot.svelte-14njway {
|
|
39
|
+
animation: svelte-14njway-badge-dot-pulse 2s infinite;}
|
|
40
|
+
|
|
41
|
+
@keyframes svelte-14njway-badge-dot-pulse {
|
|
42
|
+
0%,
|
|
43
|
+
100% {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
50% {
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Icon rotation for loading states */.badge-icon-loading.svelte-14njway {
|
|
52
|
+
animation: svelte-14njway-badge-icon-spin 1s linear infinite;}
|
|
53
|
+
|
|
54
|
+
@keyframes svelte-14njway-badge-icon-spin {
|
|
55
|
+
from {
|
|
56
|
+
transform: rotate(0deg);
|
|
57
|
+
}
|
|
58
|
+
to {
|
|
59
|
+
transform: rotate(360deg);
|
|
60
|
+
}
|
|
61
|
+
}`
|
|
62
|
+
};
|
|
63
|
+
function Wt(K, t) {
|
|
64
|
+
he(t, !1), Te(K, Ke);
|
|
65
|
+
const y = Z(), w = Z(), _ = Z(), m = Z(), T = Z(), L = Z(), F = Z();
|
|
66
|
+
let q = u(t, "variant", 8, "default"), S = u(t, "size", 8, "md"), z = u(t, "shape", 8, "rounded"), E = u(t, "dot", 8, !1), I = u(t, "closable", 8, !1), d = u(t, "icon", 8, void 0), B = u(t, "iconPosition", 8, "left");
|
|
67
|
+
const M = Pe();
|
|
68
|
+
function Q(b) {
|
|
69
|
+
b.stopPropagation(), M("close", { event: b });
|
|
70
|
+
}
|
|
71
|
+
function A(b) {
|
|
72
|
+
M("click", { event: b });
|
|
73
|
+
}
|
|
74
|
+
ie(() => {
|
|
75
|
+
}, () => {
|
|
76
|
+
H(y, {
|
|
77
|
+
sm: "px-2 py-0.5 text-xs",
|
|
78
|
+
md: "px-3 py-1 text-sm",
|
|
79
|
+
lg: "px-4 py-1.5 text-base"
|
|
80
|
+
});
|
|
81
|
+
}), ie(() => {
|
|
82
|
+
}, () => {
|
|
83
|
+
H(w, {
|
|
84
|
+
default: "bg-surface-secondary text-primary border border-primary",
|
|
85
|
+
success: "bg-success-surface text-success-text border border-success/30",
|
|
86
|
+
warning: "bg-warning-surface text-warning-text border border-warning/30",
|
|
87
|
+
error: "bg-error-surface text-error-text border border-error/30",
|
|
88
|
+
info: "bg-info-surface text-info-text border border-info/30",
|
|
89
|
+
neutral: "bg-surface-tertiary text-secondary border border-secondary"
|
|
90
|
+
});
|
|
91
|
+
}), ie(() => {
|
|
92
|
+
}, () => {
|
|
93
|
+
H(_, {
|
|
94
|
+
rounded: "rounded-md",
|
|
95
|
+
pill: "rounded-full",
|
|
96
|
+
square: "rounded-none"
|
|
97
|
+
});
|
|
98
|
+
}), ie(() => {
|
|
99
|
+
}, () => {
|
|
100
|
+
H(m, { sm: "w-1.5 h-1.5", md: "w-2 h-2", lg: "w-2.5 h-2.5" });
|
|
101
|
+
}), ie(
|
|
102
|
+
() => (e(y), C(S()), e(w), C(q()), e(_), C(z()), C(I())),
|
|
103
|
+
() => {
|
|
104
|
+
H(T, [
|
|
105
|
+
"inline-flex",
|
|
106
|
+
"items-center",
|
|
107
|
+
"gap-1.5",
|
|
108
|
+
"font-medium",
|
|
109
|
+
"border",
|
|
110
|
+
"transition-all",
|
|
111
|
+
"duration-200",
|
|
112
|
+
"ease-in-out",
|
|
113
|
+
"select-none",
|
|
114
|
+
"cursor-default",
|
|
115
|
+
e(y)[S()],
|
|
116
|
+
e(w)[q()],
|
|
117
|
+
e(_)[z()],
|
|
118
|
+
I() ? "cursor-pointer hover:opacity-80" : ""
|
|
119
|
+
].join(" "));
|
|
120
|
+
}
|
|
121
|
+
), ie(() => C(S()), () => {
|
|
122
|
+
H(L, [
|
|
123
|
+
"flex-shrink-0",
|
|
124
|
+
S() === "sm" ? "w-3 h-3" : S() === "md" ? "w-4 h-4" : "w-5 h-5"
|
|
125
|
+
].join(" "));
|
|
126
|
+
}), ie(() => C(S()), () => {
|
|
127
|
+
H(F, [
|
|
128
|
+
"flex-shrink-0",
|
|
129
|
+
"ml-1",
|
|
130
|
+
"hover:bg-white/10",
|
|
131
|
+
"rounded-full",
|
|
132
|
+
"p-0.5",
|
|
133
|
+
"transition-colors",
|
|
134
|
+
"duration-150",
|
|
135
|
+
"ease-in-out",
|
|
136
|
+
S() === "sm" ? "w-3 h-3" : S() === "md" ? "w-4 h-4" : "w-5 h-5"
|
|
137
|
+
].join(" "));
|
|
138
|
+
}), ze(), we();
|
|
139
|
+
var f = Je(), N = a(f);
|
|
140
|
+
{
|
|
141
|
+
var te = (b) => {
|
|
142
|
+
var D = Xe(), O = ue(D), $ = a(O);
|
|
143
|
+
{
|
|
144
|
+
var ee = (o) => {
|
|
145
|
+
var v = We();
|
|
146
|
+
h(() => P(
|
|
147
|
+
v,
|
|
148
|
+
1,
|
|
149
|
+
`w-2 h-2 rounded-full bg-current ${e(m), C(S()), X(() => e(m)[S()]) ?? ""}`,
|
|
150
|
+
"svelte-14njway"
|
|
151
|
+
)), r(o, v);
|
|
152
|
+
};
|
|
153
|
+
W($, (o) => {
|
|
154
|
+
E() && o(ee);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
var U = i($, 2);
|
|
158
|
+
{
|
|
159
|
+
var x = (o) => {
|
|
160
|
+
var v = He(), Y = a(v);
|
|
161
|
+
h(() => {
|
|
162
|
+
P(v, 0, oe(e(L)), "svelte-14njway"), J(Y, "d", d());
|
|
163
|
+
}), r(o, v);
|
|
164
|
+
};
|
|
165
|
+
W(U, (o) => {
|
|
166
|
+
d() && B() === "left" && o(x);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
var p = i(U, 2);
|
|
170
|
+
ne(p, t, "default", {}, null);
|
|
171
|
+
var c = i(p, 2);
|
|
172
|
+
{
|
|
173
|
+
var s = (o) => {
|
|
174
|
+
var v = Oe(), Y = a(v);
|
|
175
|
+
h(() => {
|
|
176
|
+
P(v, 0, oe(e(L)), "svelte-14njway"), J(Y, "d", d());
|
|
177
|
+
}), r(o, v);
|
|
178
|
+
};
|
|
179
|
+
W(c, (o) => {
|
|
180
|
+
d() && B() === "right" && o(s);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
var n = i(O, 2);
|
|
184
|
+
h(() => {
|
|
185
|
+
P(O, 1, oe(e(T)), "svelte-14njway"), P(n, 1, oe(e(F)), "svelte-14njway");
|
|
186
|
+
}), R("click", O, A), R("keydown", O, (o) => o.key === "Enter" && A(o)), R("click", n, Q), R("keydown", n, (o) => o.key === "Enter" && Q(o)), r(b, D);
|
|
187
|
+
}, j = (b) => {
|
|
188
|
+
var D = Ue(), O = a(D);
|
|
189
|
+
{
|
|
190
|
+
var $ = (s) => {
|
|
191
|
+
var n = Ye();
|
|
192
|
+
h(() => P(
|
|
193
|
+
n,
|
|
194
|
+
1,
|
|
195
|
+
`w-2 h-2 rounded-full bg-current ${e(m), C(S()), X(() => e(m)[S()]) ?? ""}`,
|
|
196
|
+
"svelte-14njway"
|
|
197
|
+
)), r(s, n);
|
|
198
|
+
};
|
|
199
|
+
W(O, (s) => {
|
|
200
|
+
E() && s($);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
var ee = i(O, 2);
|
|
204
|
+
{
|
|
205
|
+
var U = (s) => {
|
|
206
|
+
var n = Ge(), o = a(n);
|
|
207
|
+
h(() => {
|
|
208
|
+
P(n, 0, oe(e(L)), "svelte-14njway"), J(o, "d", d());
|
|
209
|
+
}), r(s, n);
|
|
210
|
+
};
|
|
211
|
+
W(ee, (s) => {
|
|
212
|
+
d() && B() === "left" && s(U);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
var x = i(ee, 2);
|
|
216
|
+
ne(x, t, "default", {}, null);
|
|
217
|
+
var p = i(x, 2);
|
|
218
|
+
{
|
|
219
|
+
var c = (s) => {
|
|
220
|
+
var n = Ze(), o = a(n);
|
|
221
|
+
h(() => {
|
|
222
|
+
P(n, 0, oe(e(L)), "svelte-14njway"), J(o, "d", d());
|
|
223
|
+
}), r(s, n);
|
|
224
|
+
};
|
|
225
|
+
W(p, (s) => {
|
|
226
|
+
d() && B() === "right" && s(c);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
h(() => P(D, 1, oe(e(T)), "svelte-14njway")), r(b, D);
|
|
230
|
+
};
|
|
231
|
+
W(N, (b) => {
|
|
232
|
+
I() ? b(te) : b(j, !1);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
r(K, f), pe();
|
|
236
|
+
}
|
|
237
|
+
var Qe = k('<div class="absolute inset-0 bg-surface/50 rounded-lg flex items-center justify-center" aria-hidden="true"><div class="animate-spin rounded-full h-6 w-6 border-2 border-tertiary border-t-transparent"></div></div>'), $e = k('<div><div class="card-header svelte-1qx5g6b"><!></div> <div class="card-content svelte-1qx5g6b"><!></div> <div class="card-footer svelte-1qx5g6b"><!></div> <!></div>');
|
|
238
|
+
const et = {
|
|
239
|
+
hash: "svelte-1qx5g6b",
|
|
240
|
+
code: ".card-header.svelte-1qx5g6b:empty {display:none;}.card-content.svelte-1qx5g6b:empty {display:none;}.card-footer.svelte-1qx5g6b:empty {display:none;}"
|
|
241
|
+
};
|
|
242
|
+
function Ht(K, t) {
|
|
243
|
+
he(t, !1), Te(K, et);
|
|
244
|
+
const y = Z(), w = Z();
|
|
245
|
+
let _ = u(t, "variant", 8, "default"), m = u(t, "density", 8, "comfortable"), T = u(t, "disabled", 8, !1), L = u(t, "loading", 8, !1), F = u(t, "className", 8, ""), q = u(t, "ariaLabel", 8, ""), S = u(t, "ariaDescribedBy", 8, "");
|
|
246
|
+
const z = Pe(), E = {
|
|
247
|
+
compact: "p-3 sm:p-4 rounded-md shadow-sm",
|
|
248
|
+
comfortable: "p-4 sm:p-6 rounded-lg shadow-sm sm:shadow-md",
|
|
249
|
+
spacious: "p-6 sm:p-8 rounded-xl shadow-md sm:shadow-lg"
|
|
250
|
+
}, I = {
|
|
251
|
+
default: "bg-card border border-primary",
|
|
252
|
+
interactive: "bg-card border border-primary hover:bg-card-hover hover:border-primary-hover focus:bg-card-active focus:border-primary-hover focus:outline-none focus:ring-2 focus:ring-focus focus:ring-offset-2 cursor-pointer"
|
|
253
|
+
};
|
|
254
|
+
function d(x) {
|
|
255
|
+
if (T() || L()) {
|
|
256
|
+
x.preventDefault();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
z("click", x);
|
|
260
|
+
}
|
|
261
|
+
function B(x) {
|
|
262
|
+
if (!(T() || L())) {
|
|
263
|
+
if (_() === "interactive" && (x.key === "Enter" || x.key === " ")) {
|
|
264
|
+
x.preventDefault();
|
|
265
|
+
const p = new MouseEvent("click", { bubbles: !0, cancelable: !0, clientX: 0, clientY: 0 });
|
|
266
|
+
d(p);
|
|
267
|
+
}
|
|
268
|
+
x.key === "Escape" && x.target.blur();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function M(x) {
|
|
272
|
+
!T() && !L() && z("focus", x);
|
|
273
|
+
}
|
|
274
|
+
function Q(x) {
|
|
275
|
+
!T() && !L() && z("blur", x);
|
|
276
|
+
}
|
|
277
|
+
function A(x) {
|
|
278
|
+
!T() && !L() && z("hover", x);
|
|
279
|
+
}
|
|
280
|
+
function f(x) {
|
|
281
|
+
!T() && !L() && z("leave", x);
|
|
282
|
+
}
|
|
283
|
+
ie(
|
|
284
|
+
() => (C(_()), C(m()), C(T()), C(L()), C(F())),
|
|
285
|
+
() => {
|
|
286
|
+
H(y, [
|
|
287
|
+
"transition-all duration-200",
|
|
288
|
+
I[_()],
|
|
289
|
+
E[m()],
|
|
290
|
+
T() ? "opacity-50 cursor-not-allowed" : "",
|
|
291
|
+
L() ? "animate-pulse" : "",
|
|
292
|
+
F()
|
|
293
|
+
].filter(Boolean).join(" "));
|
|
294
|
+
}
|
|
295
|
+
), ie(
|
|
296
|
+
() => (C(_()), C(T()), C(L()), C(q()), C(S())),
|
|
297
|
+
() => {
|
|
298
|
+
H(w, {
|
|
299
|
+
role: _() === "interactive" ? "button" : "presentation",
|
|
300
|
+
tabindex: _() === "interactive" ? T() ? -1 : 0 : void 0,
|
|
301
|
+
"aria-disabled": _() === "interactive" ? T() : void 0,
|
|
302
|
+
"aria-busy": L(),
|
|
303
|
+
"aria-label": q() || void 0,
|
|
304
|
+
"aria-describedby": S() || void 0
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
), ze(), we();
|
|
308
|
+
var N = $e();
|
|
309
|
+
Fe(N, () => ({ class: e(y), ...e(w) }), void 0, void 0, "svelte-1qx5g6b");
|
|
310
|
+
var te = a(N), j = a(te);
|
|
311
|
+
ne(j, t, "header", {}, null);
|
|
312
|
+
var b = i(te, 2), D = a(b);
|
|
313
|
+
ne(D, t, "default", {}, null);
|
|
314
|
+
var O = i(b, 2), $ = a(O);
|
|
315
|
+
ne($, t, "footer", {}, null);
|
|
316
|
+
var ee = i(O, 2);
|
|
317
|
+
{
|
|
318
|
+
var U = (x) => {
|
|
319
|
+
var p = Qe();
|
|
320
|
+
r(x, p);
|
|
321
|
+
};
|
|
322
|
+
W(ee, (x) => {
|
|
323
|
+
L() && x(U);
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
R("click", N, d), R("mouseenter", N, A), R("mouseleave", N, f), R("keydown", N, B), R("focus", N, M), R("blur", N, Q), r(K, N), pe();
|
|
327
|
+
}
|
|
328
|
+
var tt = k("<h1><!></h1>"), at = k("<h2><!></h2>"), st = k("<h3><!></h3>"), rt = k("<h4><!></h4>"), it = k("<h5><!></h5>"), nt = k("<h6><!></h6>");
|
|
329
|
+
function Ot(K, t) {
|
|
330
|
+
he(t, !1);
|
|
331
|
+
const y = Z();
|
|
332
|
+
let w = u(t, "level", 8, 1), _ = u(t, "text", 8, ""), m = u(t, "color", 8, "text-white"), T = u(t, "spacing", 8, "normal");
|
|
333
|
+
const L = {
|
|
334
|
+
1: "!text-6xl md:!text-7xl font-bold leading-tight block",
|
|
335
|
+
2: "!text-4xl md:!text-5xl font-bold leading-tight block",
|
|
336
|
+
3: "!text-3xl md:!text-4xl font-semibold leading-snug block",
|
|
337
|
+
4: "!text-2xl md:!text-3xl font-semibold leading-snug block",
|
|
338
|
+
5: "!text-xl md:!text-2xl font-medium leading-normal block",
|
|
339
|
+
6: "!text-lg md:!text-xl font-medium leading-normal block"
|
|
340
|
+
}, F = {
|
|
341
|
+
tight: {
|
|
342
|
+
1: "mb-2",
|
|
343
|
+
2: "mb-3",
|
|
344
|
+
3: "mb-2",
|
|
345
|
+
4: "mb-2",
|
|
346
|
+
5: "mb-1",
|
|
347
|
+
6: "mb-1"
|
|
348
|
+
},
|
|
349
|
+
normal: {
|
|
350
|
+
1: "mb-4",
|
|
351
|
+
2: "mb-4",
|
|
352
|
+
3: "mb-3",
|
|
353
|
+
4: "mb-3",
|
|
354
|
+
5: "mb-2",
|
|
355
|
+
6: "mb-2"
|
|
356
|
+
},
|
|
357
|
+
loose: {
|
|
358
|
+
1: "mb-6",
|
|
359
|
+
2: "mb-6",
|
|
360
|
+
3: "mb-4",
|
|
361
|
+
4: "mb-4",
|
|
362
|
+
5: "mb-3",
|
|
363
|
+
6: "mb-3"
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
ie(
|
|
367
|
+
() => (C(w()), C(m()), C(T())),
|
|
368
|
+
() => {
|
|
369
|
+
H(y, `${L[w()]} font-title ${m()} ${F[T()][w()]}`);
|
|
370
|
+
}
|
|
371
|
+
), ze();
|
|
372
|
+
var q = ge(), S = ue(q);
|
|
373
|
+
{
|
|
374
|
+
var z = (I) => {
|
|
375
|
+
var d = tt(), B = a(d);
|
|
376
|
+
ne(B, t, "default", {}, (M) => {
|
|
377
|
+
var Q = ye();
|
|
378
|
+
h(() => V(Q, _())), r(M, Q);
|
|
379
|
+
}), h(() => P(d, 1, oe(e(y)))), r(I, d);
|
|
380
|
+
}, E = (I) => {
|
|
381
|
+
var d = ge(), B = ue(d);
|
|
382
|
+
{
|
|
383
|
+
var M = (A) => {
|
|
384
|
+
var f = at(), N = a(f);
|
|
385
|
+
ne(N, t, "default", {}, (te) => {
|
|
386
|
+
var j = ye();
|
|
387
|
+
h(() => V(j, _())), r(te, j);
|
|
388
|
+
}), h(() => P(f, 1, oe(e(y)))), r(A, f);
|
|
389
|
+
}, Q = (A) => {
|
|
390
|
+
var f = ge(), N = ue(f);
|
|
391
|
+
{
|
|
392
|
+
var te = (b) => {
|
|
393
|
+
var D = st(), O = a(D);
|
|
394
|
+
ne(O, t, "default", {}, ($) => {
|
|
395
|
+
var ee = ye();
|
|
396
|
+
h(() => V(ee, _())), r($, ee);
|
|
397
|
+
}), h(() => P(D, 1, oe(e(y)))), r(b, D);
|
|
398
|
+
}, j = (b) => {
|
|
399
|
+
var D = ge(), O = ue(D);
|
|
400
|
+
{
|
|
401
|
+
var $ = (U) => {
|
|
402
|
+
var x = rt(), p = a(x);
|
|
403
|
+
ne(p, t, "default", {}, (c) => {
|
|
404
|
+
var s = ye();
|
|
405
|
+
h(() => V(s, _())), r(c, s);
|
|
406
|
+
}), h(() => P(x, 1, oe(e(y)))), r(U, x);
|
|
407
|
+
}, ee = (U) => {
|
|
408
|
+
var x = ge(), p = ue(x);
|
|
409
|
+
{
|
|
410
|
+
var c = (n) => {
|
|
411
|
+
var o = it(), v = a(o);
|
|
412
|
+
ne(v, t, "default", {}, (Y) => {
|
|
413
|
+
var re = ye();
|
|
414
|
+
h(() => V(re, _())), r(Y, re);
|
|
415
|
+
}), h(() => P(o, 1, oe(e(y)))), r(n, o);
|
|
416
|
+
}, s = (n) => {
|
|
417
|
+
var o = ge(), v = ue(o);
|
|
418
|
+
{
|
|
419
|
+
var Y = (re) => {
|
|
420
|
+
var de = nt(), be = a(de);
|
|
421
|
+
ne(be, t, "default", {}, (_e) => {
|
|
422
|
+
var le = ye();
|
|
423
|
+
h(() => V(le, _())), r(_e, le);
|
|
424
|
+
}), h(() => P(de, 1, oe(e(y)))), r(re, de);
|
|
425
|
+
};
|
|
426
|
+
W(
|
|
427
|
+
v,
|
|
428
|
+
(re) => {
|
|
429
|
+
w() === 6 && re(Y);
|
|
430
|
+
},
|
|
431
|
+
!0
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
r(n, o);
|
|
435
|
+
};
|
|
436
|
+
W(
|
|
437
|
+
p,
|
|
438
|
+
(n) => {
|
|
439
|
+
w() === 5 ? n(c) : n(s, !1);
|
|
440
|
+
},
|
|
441
|
+
!0
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
r(U, x);
|
|
445
|
+
};
|
|
446
|
+
W(
|
|
447
|
+
O,
|
|
448
|
+
(U) => {
|
|
449
|
+
w() === 4 ? U($) : U(ee, !1);
|
|
450
|
+
},
|
|
451
|
+
!0
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
r(b, D);
|
|
455
|
+
};
|
|
456
|
+
W(
|
|
457
|
+
N,
|
|
458
|
+
(b) => {
|
|
459
|
+
w() === 3 ? b(te) : b(j, !1);
|
|
460
|
+
},
|
|
461
|
+
!0
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
r(A, f);
|
|
465
|
+
};
|
|
466
|
+
W(
|
|
467
|
+
B,
|
|
468
|
+
(A) => {
|
|
469
|
+
w() === 2 ? A(M) : A(Q, !1);
|
|
470
|
+
},
|
|
471
|
+
!0
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
r(I, d);
|
|
475
|
+
};
|
|
476
|
+
W(S, (I) => {
|
|
477
|
+
w() === 1 ? I(z) : I(E, !1);
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
r(K, q), pe();
|
|
481
|
+
}
|
|
482
|
+
var lt = k('<img alt="" class="absolute inset-0 w-full h-full object-cover animate-pulse"/>'), ot = k('<img class="w-full h-full object-cover transition-opacity duration-300"/>'), dt = k('<div class="absolute inset-0 bg-gray-200 flex items-center justify-center text-gray-500"><svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l2.586-2.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>'), ct = k("<div><!> <!> <!></div>");
|
|
483
|
+
function Xt(K, t) {
|
|
484
|
+
he(t, !1);
|
|
485
|
+
let y = u(t, "src", 8), w = u(t, "alt", 8, ""), _ = u(t, "width", 8, "100%"), m = u(t, "height", 8, "auto"), T = u(t, "loading", 8, "lazy"), L = u(t, "className", 8, ""), F = u(t, "placeholder", 8, "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PC9zdmc+"), q = Z(!1), S = Z(!1), z = Z(!1), E = Z();
|
|
486
|
+
Le(() => {
|
|
487
|
+
if (T() === "lazy") {
|
|
488
|
+
const j = new IntersectionObserver(
|
|
489
|
+
(b) => {
|
|
490
|
+
b.forEach((D) => {
|
|
491
|
+
D.isIntersecting && (H(z, !0), j.unobserve(D.target));
|
|
492
|
+
});
|
|
493
|
+
},
|
|
494
|
+
{ rootMargin: "50px" }
|
|
495
|
+
);
|
|
496
|
+
return e(E) && j.observe(e(E)), () => j.disconnect();
|
|
497
|
+
} else
|
|
498
|
+
H(z, !0);
|
|
499
|
+
});
|
|
500
|
+
function I() {
|
|
501
|
+
H(q, !0);
|
|
502
|
+
}
|
|
503
|
+
function d() {
|
|
504
|
+
H(S, !0), console.warn("Failed to load image:", y());
|
|
505
|
+
}
|
|
506
|
+
we();
|
|
507
|
+
var B = ct(), M = a(B);
|
|
508
|
+
{
|
|
509
|
+
var Q = (j) => {
|
|
510
|
+
var b = lt();
|
|
511
|
+
h(() => J(b, "src", F())), r(j, b);
|
|
512
|
+
};
|
|
513
|
+
W(M, (j) => {
|
|
514
|
+
!e(q) && !e(S) && j(Q);
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
var A = i(M, 2);
|
|
518
|
+
{
|
|
519
|
+
var f = (j) => {
|
|
520
|
+
var b = ot();
|
|
521
|
+
h(() => {
|
|
522
|
+
J(b, "src", y()), J(b, "alt", w()), J(b, "loading", T()), ke(b, `opacity: ${e(q) ? 1 : 0};`);
|
|
523
|
+
}), R("load", b, I), R("error", b, d), r(j, b);
|
|
524
|
+
};
|
|
525
|
+
W(A, (j) => {
|
|
526
|
+
e(z) && !e(S) && j(f);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
var N = i(A, 2);
|
|
530
|
+
{
|
|
531
|
+
var te = (j) => {
|
|
532
|
+
var b = dt();
|
|
533
|
+
r(j, b);
|
|
534
|
+
};
|
|
535
|
+
W(N, (j) => {
|
|
536
|
+
e(S) && j(te);
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
je(B, (j) => H(E, j), () => e(E)), h(() => {
|
|
540
|
+
P(B, 1, `relative overflow-hidden ${L() ?? ""}`), ke(B, `width: ${(typeof _() == "number" ? _() + "px" : _()) ?? ""}; height: ${(typeof m() == "number" ? m() + "px" : m()) ?? ""};`);
|
|
541
|
+
}), r(K, B), pe();
|
|
542
|
+
}
|
|
543
|
+
var vt = k('<div class="fixed bottom-4 left-4 bg-black/80 text-white p-4 rounded-lg text-xs font-mono z-50 max-w-xs"><div class="flex items-center justify-between mb-2"><h3 class="font-bold"> </h3> <button class="text-gray-400 hover:text-white">×</button></div> <div class="space-y-1"><div> </div> <div> </div> <div> </div> <div> </div> <div class="pt-1 border-t border-gray-600"><div class="font-semibold"> </div></div></div></div>');
|
|
544
|
+
function Yt(K, t) {
|
|
545
|
+
he(t, !1);
|
|
546
|
+
let y = u(t, "isVisible", 12, !1), w = u(t, "showInDev", 8, !0), _ = u(t, "title", 8, "Debug Panel"), m = Z({
|
|
547
|
+
domContentLoaded: 0,
|
|
548
|
+
loadComplete: 0,
|
|
549
|
+
firstPaint: 0,
|
|
550
|
+
firstContentfulPaint: 0,
|
|
551
|
+
largestContentfulPaint: 0,
|
|
552
|
+
cumulativeLayoutShift: 0
|
|
553
|
+
});
|
|
554
|
+
Le(() => {
|
|
555
|
+
typeof window < "u" && "PerformanceObserver" in window && (new PerformanceObserver((z) => {
|
|
556
|
+
for (const E of z.getEntries())
|
|
557
|
+
E.name === "first-paint" && me(m, e(m).firstPaint = E.startTime);
|
|
558
|
+
}).observe({ entryTypes: ["paint"] }), new PerformanceObserver((z) => {
|
|
559
|
+
for (const E of z.getEntries())
|
|
560
|
+
E.name === "first-contentful-paint" && me(m, e(m).firstContentfulPaint = E.startTime);
|
|
561
|
+
}).observe({ entryTypes: ["paint"] }), new PerformanceObserver((z) => {
|
|
562
|
+
const E = z.getEntries(), I = E[E.length - 1];
|
|
563
|
+
me(m, e(m).largestContentfulPaint = I.startTime);
|
|
564
|
+
}).observe({ entryTypes: ["largest-contentful-paint"] }), new PerformanceObserver((z) => {
|
|
565
|
+
for (const E of z.getEntries())
|
|
566
|
+
E.hadRecentInput || me(m, e(m).cumulativeLayoutShift += E.value);
|
|
567
|
+
}).observe({ entryTypes: ["layout-shift"] })), window.addEventListener("DOMContentLoaded", () => {
|
|
568
|
+
me(m, e(m).domContentLoaded = performance.now());
|
|
569
|
+
}), window.addEventListener("load", () => {
|
|
570
|
+
me(m, e(m).loadComplete = performance.now());
|
|
571
|
+
}), w();
|
|
572
|
+
});
|
|
573
|
+
function T(z) {
|
|
574
|
+
return `${Math.round(z)}ms`;
|
|
575
|
+
}
|
|
576
|
+
function L() {
|
|
577
|
+
const z = e(m).firstContentfulPaint, E = e(m).largestContentfulPaint, I = e(m).cumulativeLayoutShift;
|
|
578
|
+
let d = 100;
|
|
579
|
+
return z > 1800 && (d -= 20), E > 2500 && (d -= 30), I > 0.1 && (d -= 25), e(m).loadComplete > 3e3 && (d -= 25), d >= 90 ? "🟢 Excellent" : d >= 70 ? "🟡 Good" : d >= 50 ? "🟠 Needs Improvement" : "🔴 Poor";
|
|
580
|
+
}
|
|
581
|
+
we();
|
|
582
|
+
var F = ge(), q = ue(F);
|
|
583
|
+
{
|
|
584
|
+
var S = (z) => {
|
|
585
|
+
var E = vt(), I = a(E), d = a(I), B = a(d), M = i(d, 2), Q = i(I, 2), A = a(Q), f = a(A), N = i(A, 2), te = a(N), j = i(N, 2), b = a(j), D = i(j, 2), O = a(D), $ = i(D, 2), ee = a($), U = a(ee);
|
|
586
|
+
h(
|
|
587
|
+
(x, p, c, s, n) => {
|
|
588
|
+
V(B, _()), V(f, `FCP: ${x ?? ""}`), V(te, `LCP: ${p ?? ""}`), V(b, `CLS: ${c ?? ""}`), V(O, `Load: ${s ?? ""}`), V(U, n);
|
|
589
|
+
},
|
|
590
|
+
[
|
|
591
|
+
() => (e(m), X(() => T(e(m).firstContentfulPaint))),
|
|
592
|
+
() => (e(m), X(() => T(e(m).largestContentfulPaint))),
|
|
593
|
+
() => (e(m), X(() => e(m).cumulativeLayoutShift.toFixed(3))),
|
|
594
|
+
() => (e(m), X(() => T(e(m).loadComplete))),
|
|
595
|
+
() => X(L)
|
|
596
|
+
]
|
|
597
|
+
), R("click", M, () => y(!1)), r(z, E);
|
|
598
|
+
};
|
|
599
|
+
W(q, (z) => {
|
|
600
|
+
y() && z(S);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
r(K, F), pe();
|
|
604
|
+
}
|
|
605
|
+
var ut = k('<span class="text-sm text-secondary svelte-1nnpss"> </span>'), mt = k('<div class="flex justify-between items-center mb-2 svelte-1nnpss"><label class="text-sm font-medium text-primary svelte-1nnpss"> </label> <!></div>'), ft = k('<div class="absolute inset-0 flex items-center justify-center svelte-1nnpss"><span class="text-xs font-medium text-white svelte-1nnpss"> </span></div>'), gt = k('<div class="relative svelte-1nnpss"><div><div role="progressbar" aria-valuemin="0"></div></div> <!></div>'), xt = k("<span> </span>"), bt = k('<div class="relative inline-block svelte-1nnpss"><svg viewBox="0 0 44 44" role="progressbar" aria-valuemin="0"><circle cx="22" cy="22" r="20" stroke="currentColor" stroke-width="4" fill="none" class="text-neutral-200 dark:text-neutral-700 svelte-1nnpss"></circle><circle cx="22" cy="22" r="20" stroke="currentColor" stroke-width="4" fill="none" stroke-linecap="round"></circle></svg> <div class="absolute inset-0 flex items-center justify-center svelte-1nnpss"><!></div></div>'), pt = k("<div><!> <!> <!></div>");
|
|
606
|
+
const ht = {
|
|
607
|
+
hash: "svelte-1nnpss",
|
|
608
|
+
code: `
|
|
609
|
+
/* Striped animation */
|
|
610
|
+
@keyframes svelte-1nnpss-stripes {
|
|
611
|
+
0% {
|
|
612
|
+
background-position: 0 0;
|
|
613
|
+
}
|
|
614
|
+
100% {
|
|
615
|
+
background-position: 40px 0;
|
|
616
|
+
}
|
|
617
|
+
}.bg-stripes.svelte-1nnpss {background-image:linear-gradient(
|
|
618
|
+
45deg,
|
|
619
|
+
rgba(255, 255, 255, 0.15) 25%,
|
|
620
|
+
transparent 25%,
|
|
621
|
+
transparent 50%,
|
|
622
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
623
|
+
rgba(255, 255, 255, 0.15) 75%,
|
|
624
|
+
transparent 75%,
|
|
625
|
+
transparent
|
|
626
|
+
);background-size:40px 40px;
|
|
627
|
+
animation: svelte-1nnpss-stripes 1s linear infinite;}
|
|
628
|
+
|
|
629
|
+
/* Smooth transitions */.progress-bar.svelte-1nnpss {transition:width 0.3s ease-out;}.progress-circle.svelte-1nnpss {transition:stroke-dashoffset 0.3s ease-out;}
|
|
630
|
+
|
|
631
|
+
/* Focus styles for accessibility */[role="progressbar"].svelte-1nnpss:focus {outline:2px solid var(--color-primary-500);outline-offset:2px;}
|
|
632
|
+
|
|
633
|
+
/* Animation for completion */.progress-complete.svelte-1nnpss {
|
|
634
|
+
animation: svelte-1nnpss-progress-complete 0.5s ease-out;}
|
|
635
|
+
|
|
636
|
+
@keyframes svelte-1nnpss-progress-complete {
|
|
637
|
+
0% {
|
|
638
|
+
transform: scale(1);
|
|
639
|
+
}
|
|
640
|
+
50% {
|
|
641
|
+
transform: scale(1.05);
|
|
642
|
+
}
|
|
643
|
+
100% {
|
|
644
|
+
transform: scale(1);
|
|
645
|
+
}
|
|
646
|
+
}`
|
|
647
|
+
};
|
|
648
|
+
function Gt(K, t) {
|
|
649
|
+
he(t, !1), Te(K, ht);
|
|
650
|
+
const y = Z(), w = Z(), _ = Z(), m = Z(), T = Z();
|
|
651
|
+
let L = u(t, "value", 8, 0), F = u(t, "max", 8, 100), q = u(t, "size", 8, "md"), S = u(t, "variant", 8, "default"), z = u(t, "shape", 8, "linear"), E = u(t, "animated", 8, !0), I = u(t, "striped", 8, !1), d = u(t, "showValue", 8, !1), B = u(t, "label", 8, ""), M = u(t, "className", 8, "");
|
|
652
|
+
const Q = Pe();
|
|
653
|
+
let A = `progress-${Math.random().toString(36).substr(2, 9)}`;
|
|
654
|
+
const f = {
|
|
655
|
+
sm: { linear: "h-1", circular: "w-8 h-8", text: "text-xs" },
|
|
656
|
+
md: { linear: "h-2", circular: "w-12 h-12", text: "text-sm" },
|
|
657
|
+
lg: { linear: "h-3", circular: "w-16 h-16", text: "text-base" }
|
|
658
|
+
}, N = {
|
|
659
|
+
default: "bg-primary",
|
|
660
|
+
success: "bg-success",
|
|
661
|
+
warning: "bg-warning",
|
|
662
|
+
error: "bg-error",
|
|
663
|
+
info: "bg-info"
|
|
664
|
+
}, te = {
|
|
665
|
+
default: "bg-surface-tertiary",
|
|
666
|
+
success: "bg-success-surface",
|
|
667
|
+
warning: "bg-warning-surface",
|
|
668
|
+
error: "bg-error-surface",
|
|
669
|
+
info: "bg-info-surface"
|
|
670
|
+
};
|
|
671
|
+
ie(() => (C(L()), C(F())), () => {
|
|
672
|
+
H(y, Math.min(Math.max(L() / F() * 100, 0), 100));
|
|
673
|
+
}), ie(() => e(y), () => {
|
|
674
|
+
H(w, e(y) >= 100);
|
|
675
|
+
}), ie(
|
|
676
|
+
() => (e(w), C(L()), C(F())),
|
|
677
|
+
() => {
|
|
678
|
+
e(w) && Q("complete", { value: L(), max: F() });
|
|
679
|
+
}
|
|
680
|
+
), ie(() => C(z()), () => {
|
|
681
|
+
H(_, z() === "circular" ? 2 * Math.PI * 20 : 0);
|
|
682
|
+
}), ie(() => e(_), () => {
|
|
683
|
+
H(m, e(_));
|
|
684
|
+
}), ie(() => (e(_), e(y)), () => {
|
|
685
|
+
H(T, e(_) - e(y) / 100 * e(_));
|
|
686
|
+
}), ze(), we();
|
|
687
|
+
var j = pt(), b = a(j);
|
|
688
|
+
{
|
|
689
|
+
var D = (x) => {
|
|
690
|
+
var p = mt(), c = a(p), s = a(c), n = i(c, 2);
|
|
691
|
+
{
|
|
692
|
+
var o = (v) => {
|
|
693
|
+
var Y = ut(), re = a(Y);
|
|
694
|
+
h((de) => V(re, `${de ?? ""}%`), [
|
|
695
|
+
() => (e(y), X(() => Math.round(e(y))))
|
|
696
|
+
]), r(v, Y);
|
|
697
|
+
};
|
|
698
|
+
W(n, (v) => {
|
|
699
|
+
d() && v(o);
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
h(() => {
|
|
703
|
+
J(c, "for", A), V(s, B());
|
|
704
|
+
}), r(x, p);
|
|
705
|
+
};
|
|
706
|
+
W(b, (x) => {
|
|
707
|
+
B() && x(D);
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
var O = i(b, 2);
|
|
711
|
+
{
|
|
712
|
+
var $ = (x) => {
|
|
713
|
+
var p = gt(), c = a(p), s = a(c), n = i(c, 2);
|
|
714
|
+
{
|
|
715
|
+
var o = (v) => {
|
|
716
|
+
var Y = ft(), re = a(Y), de = a(re);
|
|
717
|
+
h((be) => V(de, `${be ?? ""}%`), [
|
|
718
|
+
() => (e(y), X(() => Math.round(e(y))))
|
|
719
|
+
]), r(v, Y);
|
|
720
|
+
};
|
|
721
|
+
W(n, (v) => {
|
|
722
|
+
d() && q() === "lg" && v(o);
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
h(
|
|
726
|
+
(v) => {
|
|
727
|
+
P(
|
|
728
|
+
c,
|
|
729
|
+
1,
|
|
730
|
+
`
|
|
731
|
+
w-full rounded-full overflow-hidden
|
|
732
|
+
${C(q()), X(() => f[q()].linear) ?? ""}
|
|
733
|
+
${C(S()), X(() => te[S()]) ?? ""}
|
|
734
|
+
`,
|
|
735
|
+
"svelte-1nnpss"
|
|
736
|
+
), J(s, "id", A), P(
|
|
737
|
+
s,
|
|
738
|
+
1,
|
|
739
|
+
`
|
|
740
|
+
h-full rounded-full transition-all duration-300 ease-out
|
|
741
|
+
${C(S()), X(() => N[S()]) ?? ""}
|
|
742
|
+
${E() ? "animate-pulse" : ""}
|
|
743
|
+
${I() ? "bg-stripes" : ""}
|
|
744
|
+
`,
|
|
745
|
+
"svelte-1nnpss"
|
|
746
|
+
), ke(s, `width: ${e(y) ?? ""}%`), J(s, "aria-valuenow", L()), J(s, "aria-valuemax", F()), J(s, "aria-label", v);
|
|
747
|
+
},
|
|
748
|
+
[
|
|
749
|
+
() => (C(B()), e(y), X(() => B() || `Progress: ${Math.round(e(y))}%`))
|
|
750
|
+
]
|
|
751
|
+
), r(x, p);
|
|
752
|
+
}, ee = (x) => {
|
|
753
|
+
var p = ge(), c = ue(p);
|
|
754
|
+
{
|
|
755
|
+
var s = (n) => {
|
|
756
|
+
var o = bt(), v = a(o), Y = i(a(v)), re = i(v, 2), de = a(re);
|
|
757
|
+
{
|
|
758
|
+
var be = (le) => {
|
|
759
|
+
var xe = xt(), l = a(xe);
|
|
760
|
+
h(
|
|
761
|
+
(g) => {
|
|
762
|
+
P(
|
|
763
|
+
xe,
|
|
764
|
+
1,
|
|
765
|
+
`
|
|
766
|
+
font-medium text-primary
|
|
767
|
+
${C(q()), X(() => f[q()].text) ?? ""}
|
|
768
|
+
`,
|
|
769
|
+
"svelte-1nnpss"
|
|
770
|
+
), V(l, `${g ?? ""}%`);
|
|
771
|
+
},
|
|
772
|
+
[
|
|
773
|
+
() => (e(y), X(() => Math.round(e(y))))
|
|
774
|
+
]
|
|
775
|
+
), r(le, xe);
|
|
776
|
+
}, _e = (le) => {
|
|
777
|
+
var xe = ge(), l = ue(xe);
|
|
778
|
+
ne(l, t, "center", {}, null), r(le, xe);
|
|
779
|
+
};
|
|
780
|
+
W(de, (le) => {
|
|
781
|
+
d() ? le(be) : le(_e, !1);
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
h(
|
|
785
|
+
(le) => {
|
|
786
|
+
J(v, "id", A), P(
|
|
787
|
+
v,
|
|
788
|
+
0,
|
|
789
|
+
`transform -rotate-90 ${C(q()), X(() => f[q()].circular) ?? ""}`,
|
|
790
|
+
"svelte-1nnpss"
|
|
791
|
+
), J(v, "aria-valuenow", L()), J(v, "aria-valuemax", F()), J(v, "aria-label", le), J(Y, "stroke-dasharray", e(m)), J(Y, "stroke-dashoffset", e(T)), P(
|
|
792
|
+
Y,
|
|
793
|
+
0,
|
|
794
|
+
`
|
|
795
|
+
transition-all duration-300 ease-out
|
|
796
|
+
${C(S()), X(() => N[S()]) ?? ""}
|
|
797
|
+
${E() ? "animate-pulse" : ""}
|
|
798
|
+
`,
|
|
799
|
+
"svelte-1nnpss"
|
|
800
|
+
);
|
|
801
|
+
},
|
|
802
|
+
[
|
|
803
|
+
() => (C(B()), e(y), X(() => B() || `Progress: ${Math.round(e(y))}%`))
|
|
804
|
+
]
|
|
805
|
+
), r(n, o);
|
|
806
|
+
};
|
|
807
|
+
W(
|
|
808
|
+
c,
|
|
809
|
+
(n) => {
|
|
810
|
+
z() === "circular" && n(s);
|
|
811
|
+
},
|
|
812
|
+
!0
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
r(x, p);
|
|
816
|
+
};
|
|
817
|
+
W(O, (x) => {
|
|
818
|
+
z() === "linear" ? x($) : x(ee, !1);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
var U = i(O, 2);
|
|
822
|
+
ne(U, t, "default", {}, null), h(() => P(j, 1, `progress-container ${M() ?? ""}`, "svelte-1nnpss")), r(K, j), pe();
|
|
823
|
+
}
|
|
824
|
+
var yt = k('<div class="text-center"><div></div> <p class="text-xs text-tertiary"> </p></div>'), wt = k('<div class="text-center"><div></div> <p class="text-xs text-tertiary"> </p></div>'), _t = k('<div class="text-center"><div></div> <p class="text-xs text-tertiary"> </p></div>'), kt = k("<div></div>"), zt = k("<div></div>"), Ct = k("<div></div>"), jt = k('<div class="flex items-center space-x-4"><span class="text-tertiary text-sm w-12"> </span> <span> </span></div>'), Tt = k('<div class="flex items-center space-x-4"><span class="text-tertiary text-sm w-12"> </span> <span class="text-secondary text-sm w-20"> </span> <div></div></div>'), St = k('<div class="text-center space-y-2"><div></div> <p class="text-xs text-tertiary"> </p></div>'), Pt = k('<div class="text-center space-y-2"><div></div> <p class="text-xs text-tertiary"> </p></div>'), Et = k('<div class="text-center space-y-2"><div></div> <p class="text-xs text-tertiary"> </p></div>'), Lt = k('<div class="min-h-screen bg-primary p-8"><div class="max-w-6xl mx-auto space-y-8"><div class="flex justify-between items-center mb-8"><div><h1 class="text-4xl font-bold text-primary mb-2">Tailwind Scale Demo</h1> <p class="text-lg text-secondary">Comprehensive scales supporting light and dark modes</p></div> <!></div> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Color Scales</h2> <div class="space-y-3"><h3 class="text-xl font-medium text-primary">Primary Scale</h3> <div class="grid grid-cols-11 gap-2"></div></div> <div class="space-y-3"><h3 class="text-xl font-medium text-primary">Secondary Scale</h3> <div class="grid grid-cols-11 gap-2"></div></div> <div class="space-y-3"><h3 class="text-xl font-medium text-primary">Neutral Scale</h3> <div class="grid grid-cols-11 gap-2"></div></div> <div class="space-y-3"><h3 class="text-xl font-medium text-primary">Semantic Colors</h3> <div class="grid grid-cols-3 gap-4"><div class="space-y-2"><h4 class="text-sm font-medium text-primary">Success</h4> <div class="grid grid-cols-5 gap-1"></div></div> <div class="space-y-2"><h4 class="text-sm font-medium text-primary">Warning</h4> <div class="grid grid-cols-5 gap-1"></div></div> <div class="space-y-2"><h4 class="text-sm font-medium text-primary">Error</h4> <div class="grid grid-cols-5 gap-1"></div></div></div></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Background & Surface Colors</h2> <div class="grid grid-cols-2 gap-6"><div class="space-y-4"><h3 class="text-xl font-medium text-primary">Background Colors</h3> <div class="space-y-3"><div class="bg-primary p-4 rounded-lg border border-primary"><p class="text-inverse font-medium">Primary Background</p> <p class="text-inverse text-sm opacity-80">bg-primary</p></div> <div class="bg-secondary p-4 rounded-lg border border-primary"><p class="text-primary font-medium">Secondary Background</p> <p class="text-secondary text-sm">bg-secondary</p></div> <div class="bg-tertiary p-4 rounded-lg border border-primary"><p class="text-primary font-medium">Tertiary Background</p> <p class="text-secondary text-sm">bg-tertiary</p></div></div></div> <div class="space-y-4"><h3 class="text-xl font-medium text-primary">Surface Colors</h3> <div class="space-y-3"><div class="bg-surface-primary p-4 rounded-lg border border-primary shadow-adaptive-sm"><p class="text-primary font-medium">Primary Surface</p> <p class="text-secondary text-sm">bg-surface-primary</p></div> <div class="bg-surface-secondary p-4 rounded-lg border border-primary shadow-adaptive-sm"><p class="text-primary font-medium">Secondary Surface</p> <p class="text-secondary text-sm">bg-surface-secondary</p></div> <div class="bg-surface-elevated p-4 rounded-lg border border-primary shadow-adaptive-md"><p class="text-primary font-medium">Elevated Surface</p> <p class="text-secondary text-sm">bg-surface-elevated</p></div></div></div></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Typography Scale</h2> <div class="space-y-4"></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Spacing Scale</h2> <div class="space-y-4"></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Border Radius Scale</h2> <div class="grid grid-cols-2 md:grid-cols-4 gap-4"></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Shadow Scale</h2> <div class="grid grid-cols-2 md:grid-cols-4 gap-6"></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Animation Scale</h2> <div class="grid grid-cols-2 md:grid-cols-3 gap-4"></div></section> <section class="space-y-6"><h2 class="text-3xl font-semibold text-primary mb-4">Component Examples</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div class="space-y-4"><h3 class="text-xl font-medium text-primary">Cards</h3> <div class="space-y-3"><div class="card p-4"><h4 class="text-lg font-medium text-primary mb-2">Standard Card</h4> <p class="text-secondary">This is a standard card with adaptive styling.</p></div> <div class="card-elevated p-4"><h4 class="text-lg font-medium text-primary mb-2">Elevated Card</h4> <p class="text-secondary">This is an elevated card with more shadow.</p></div></div></div> <div class="space-y-4"><h3 class="text-xl font-medium text-primary">Buttons</h3> <div class="space-y-3"><button class="button-primary">Primary Button</button> <button class="button-secondary">Secondary Button</button> <div class="flex space-x-2"><button class="px-3 py-1 text-sm bg-success-500 hover:bg-success-600 text-white rounded-md transition-colors">Success</button> <button class="px-3 py-1 text-sm bg-warning-500 hover:bg-warning-600 text-white rounded-md transition-colors">Warning</button> <button class="px-3 py-1 text-sm bg-error-500 hover:bg-error-600 text-white rounded-md transition-colors">Error</button></div></div></div></div></section></div></div>');
|
|
825
|
+
function Zt(K) {
|
|
826
|
+
var t = Lt(), y = a(t), w = a(y), _ = i(a(w), 2);
|
|
827
|
+
Ve(_, { size: "lg", variant: "outline" });
|
|
828
|
+
var m = i(w, 2), T = i(a(m), 2), L = i(a(T), 2);
|
|
829
|
+
ce(L, 4, () => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], ve, (p, c) => {
|
|
830
|
+
var s = yt(), n = a(s), o = i(n, 2), v = a(o);
|
|
831
|
+
h(() => {
|
|
832
|
+
P(n, 1, `w-16 h-16 rounded-lg bg-primary-${c ?? ""} border border-primary mb-2`), V(v, c);
|
|
833
|
+
}), r(p, s);
|
|
834
|
+
});
|
|
835
|
+
var F = i(T, 2), q = i(a(F), 2);
|
|
836
|
+
ce(q, 4, () => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], ve, (p, c) => {
|
|
837
|
+
var s = wt(), n = a(s), o = i(n, 2), v = a(o);
|
|
838
|
+
h(() => {
|
|
839
|
+
P(n, 1, `w-16 h-16 rounded-lg bg-secondary-${c ?? ""} border border-primary mb-2`), V(v, c);
|
|
840
|
+
}), r(p, s);
|
|
841
|
+
});
|
|
842
|
+
var S = i(F, 2), z = i(a(S), 2);
|
|
843
|
+
ce(z, 4, () => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], ve, (p, c) => {
|
|
844
|
+
var s = _t(), n = a(s), o = i(n, 2), v = a(o);
|
|
845
|
+
h(() => {
|
|
846
|
+
P(n, 1, `w-16 h-16 rounded-lg bg-neutral-${c ?? ""} border border-primary mb-2`), V(v, c);
|
|
847
|
+
}), r(p, s);
|
|
848
|
+
});
|
|
849
|
+
var E = i(S, 2), I = i(a(E), 2), d = a(I), B = i(a(d), 2);
|
|
850
|
+
ce(B, 4, () => [400, 500, 600, 700, 800], ve, (p, c) => {
|
|
851
|
+
var s = kt();
|
|
852
|
+
h(() => P(s, 1, `w-8 h-8 rounded bg-success-${c ?? ""} border border-primary`)), r(p, s);
|
|
853
|
+
});
|
|
854
|
+
var M = i(d, 2), Q = i(a(M), 2);
|
|
855
|
+
ce(Q, 4, () => [400, 500, 600, 700, 800], ve, (p, c) => {
|
|
856
|
+
var s = zt();
|
|
857
|
+
h(() => P(s, 1, `w-8 h-8 rounded bg-warning-${c ?? ""} border border-primary`)), r(p, s);
|
|
858
|
+
});
|
|
859
|
+
var A = i(M, 2), f = i(a(A), 2);
|
|
860
|
+
ce(f, 4, () => [400, 500, 600, 700, 800], ve, (p, c) => {
|
|
861
|
+
var s = Ct();
|
|
862
|
+
h(() => P(s, 1, `w-8 h-8 rounded bg-error-${c ?? ""} border border-primary`)), r(p, s);
|
|
863
|
+
});
|
|
864
|
+
var N = i(m, 4), te = i(a(N), 2);
|
|
865
|
+
ce(
|
|
866
|
+
te,
|
|
867
|
+
4,
|
|
868
|
+
() => [
|
|
869
|
+
{ size: "2xs", text: "Extra Small Text", class: "text-2xs" },
|
|
870
|
+
{ size: "xs", text: "Small Text", class: "text-xs" },
|
|
871
|
+
{ size: "sm", text: "Small Medium Text", class: "text-sm" },
|
|
872
|
+
{ size: "base", text: "Base Text", class: "text-base" },
|
|
873
|
+
{ size: "lg", text: "Large Text", class: "text-lg" },
|
|
874
|
+
{ size: "xl", text: "Extra Large Text", class: "text-xl" },
|
|
875
|
+
{ size: "2xl", text: "2X Large Text", class: "text-2xl" },
|
|
876
|
+
{ size: "3xl", text: "3X Large Text", class: "text-3xl" },
|
|
877
|
+
{ size: "4xl", text: "4X Large Text", class: "text-4xl" },
|
|
878
|
+
{ size: "5xl", text: "5X Large Text", class: "text-5xl" },
|
|
879
|
+
{ size: "6xl", text: "6X Large Text", class: "text-6xl" }
|
|
880
|
+
],
|
|
881
|
+
ve,
|
|
882
|
+
(p, c) => {
|
|
883
|
+
var s = jt(), n = a(s), o = a(n), v = i(n, 2), Y = a(v);
|
|
884
|
+
h(() => {
|
|
885
|
+
V(o, c.size), P(v, 1, `${c.class ?? ""} text-primary`), V(Y, c.text);
|
|
886
|
+
}), r(p, s);
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
var j = i(N, 2), b = i(a(j), 2);
|
|
890
|
+
ce(
|
|
891
|
+
b,
|
|
892
|
+
4,
|
|
893
|
+
() => [
|
|
894
|
+
{ size: "1", value: "0.25rem", class: "w-1" },
|
|
895
|
+
{ size: "2", value: "0.5rem", class: "w-2" },
|
|
896
|
+
{ size: "4", value: "1rem", class: "w-4" },
|
|
897
|
+
{ size: "8", value: "2rem", class: "w-8" },
|
|
898
|
+
{ size: "16", value: "4rem", class: "w-16" },
|
|
899
|
+
{ size: "32", value: "8rem", class: "w-32" },
|
|
900
|
+
{ size: "64", value: "16rem", class: "w-64" },
|
|
901
|
+
{ size: "128", value: "32rem", class: "w-128" },
|
|
902
|
+
{ size: "256", value: "64rem", class: "w-256" }
|
|
903
|
+
],
|
|
904
|
+
ve,
|
|
905
|
+
(p, c) => {
|
|
906
|
+
var s = Tt(), n = a(s), o = a(n), v = i(n, 2), Y = a(v), re = i(v, 2);
|
|
907
|
+
h(() => {
|
|
908
|
+
V(o, c.size), V(Y, c.value), P(re, 1, `${c.class ?? ""} h-4 bg-primary-500 rounded`);
|
|
909
|
+
}), r(p, s);
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
var D = i(j, 2), O = i(a(D), 2);
|
|
913
|
+
ce(
|
|
914
|
+
O,
|
|
915
|
+
4,
|
|
916
|
+
() => [
|
|
917
|
+
{ size: "none", class: "rounded-none" },
|
|
918
|
+
{ size: "sm", class: "rounded-sm" },
|
|
919
|
+
{ size: "DEFAULT", class: "rounded" },
|
|
920
|
+
{ size: "md", class: "rounded-md" },
|
|
921
|
+
{ size: "lg", class: "rounded-lg" },
|
|
922
|
+
{ size: "xl", class: "rounded-xl" },
|
|
923
|
+
{ size: "2xl", class: "rounded-2xl" },
|
|
924
|
+
{ size: "3xl", class: "rounded-3xl" },
|
|
925
|
+
{ size: "full", class: "rounded-full" }
|
|
926
|
+
],
|
|
927
|
+
ve,
|
|
928
|
+
(p, c) => {
|
|
929
|
+
var s = St(), n = a(s), o = i(n, 2), v = a(o);
|
|
930
|
+
h(() => {
|
|
931
|
+
P(n, 1, `w-16 h-16 bg-primary-500 ${c.class ?? ""} mx-auto`), V(v, c.size);
|
|
932
|
+
}), r(p, s);
|
|
933
|
+
}
|
|
934
|
+
);
|
|
935
|
+
var $ = i(D, 2), ee = i(a($), 2);
|
|
936
|
+
ce(
|
|
937
|
+
ee,
|
|
938
|
+
4,
|
|
939
|
+
() => [
|
|
940
|
+
{ name: "xs", class: "shadow-xs" },
|
|
941
|
+
{ name: "sm", class: "shadow-sm" },
|
|
942
|
+
{ name: "DEFAULT", class: "shadow" },
|
|
943
|
+
{ name: "md", class: "shadow-md" },
|
|
944
|
+
{ name: "lg", class: "shadow-lg" },
|
|
945
|
+
{ name: "xl", class: "shadow-xl" },
|
|
946
|
+
{ name: "2xl", class: "shadow-2xl" },
|
|
947
|
+
{ name: "Adaptive", class: "shadow-adaptive-lg" }
|
|
948
|
+
],
|
|
949
|
+
ve,
|
|
950
|
+
(p, c) => {
|
|
951
|
+
var s = Pt(), n = a(s), o = i(n, 2), v = a(o);
|
|
952
|
+
h(() => {
|
|
953
|
+
P(n, 1, `w-20 h-20 bg-surface-primary border border-primary ${c.class ?? ""} mx-auto`), V(v, c.name);
|
|
954
|
+
}), r(p, s);
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
var U = i($, 2), x = i(a(U), 2);
|
|
958
|
+
ce(
|
|
959
|
+
x,
|
|
960
|
+
4,
|
|
961
|
+
() => [
|
|
962
|
+
{ name: "Fade In", class: "animate-fade-in" },
|
|
963
|
+
{ name: "Slide Up", class: "animate-slide-in-up" },
|
|
964
|
+
{ name: "Slide Down", class: "animate-slide-in-down" },
|
|
965
|
+
{ name: "Scale In", class: "animate-scale-in" },
|
|
966
|
+
{ name: "Bounce", class: "animate-bounce-gentle" },
|
|
967
|
+
{ name: "Pulse", class: "animate-pulse-slow" }
|
|
968
|
+
],
|
|
969
|
+
ve,
|
|
970
|
+
(p, c) => {
|
|
971
|
+
var s = Et(), n = a(s), o = i(n, 2), v = a(o);
|
|
972
|
+
h(() => {
|
|
973
|
+
P(n, 1, `w-16 h-16 bg-primary-500 rounded-lg ${c.class ?? ""} mx-auto`), V(v, c.name);
|
|
974
|
+
}), r(p, s);
|
|
975
|
+
}
|
|
976
|
+
), r(K, t);
|
|
977
|
+
}
|
|
978
|
+
var Bt = k("<div></div>");
|
|
979
|
+
function Ut(K, t) {
|
|
980
|
+
let y = u(t, "width", 8, "100%"), w = u(t, "height", 8, "1rem"), _ = u(t, "borderRadius", 8, "0.5rem"), m = u(t, "className", 8, "");
|
|
981
|
+
var T = Bt();
|
|
982
|
+
h(() => {
|
|
983
|
+
P(T, 1, `animate-pulse bg-stone-800 ${m() ?? ""}`), ke(T, `width: ${y() ?? ""}; height: ${w() ?? ""}; border-radius: ${_() ?? ""};`);
|
|
984
|
+
}), r(K, T);
|
|
985
|
+
}
|
|
986
|
+
var Mt = k('<button type="button" class="inline-block svelte-13nzt82"><!></button>'), Dt = k('<div role="button" tabindex="0" class="inline-block svelte-13nzt82"><!></div>'), It = k("<div></div>"), At = k('<div role="tooltip"><div class="relative svelte-13nzt82"> <!></div></div>'), Nt = k("<!> <!>", 1);
|
|
987
|
+
const Ft = {
|
|
988
|
+
hash: "svelte-13nzt82",
|
|
989
|
+
code: `
|
|
990
|
+
/* Ensure tooltip is above other elements */.tooltip-container {z-index:1000;}
|
|
991
|
+
|
|
992
|
+
/* Smooth transitions */.tooltip-enter.svelte-13nzt82 {
|
|
993
|
+
animation: svelte-13nzt82-tooltip-enter 0.2s ease-out;}.tooltip-exit.svelte-13nzt82 {
|
|
994
|
+
animation: svelte-13nzt82-tooltip-exit 0.15s ease-in;}
|
|
995
|
+
|
|
996
|
+
@keyframes svelte-13nzt82-tooltip-enter {
|
|
997
|
+
0% {
|
|
998
|
+
opacity: 0;
|
|
999
|
+
transform: scale(0.95);
|
|
1000
|
+
}
|
|
1001
|
+
100% {
|
|
1002
|
+
opacity: 1;
|
|
1003
|
+
transform: scale(1);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
@keyframes svelte-13nzt82-tooltip-exit {
|
|
1008
|
+
0% {
|
|
1009
|
+
opacity: 1;
|
|
1010
|
+
transform: scale(1);
|
|
1011
|
+
}
|
|
1012
|
+
100% {
|
|
1013
|
+
opacity: 0;
|
|
1014
|
+
transform: scale(0.95);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/* Arrow positioning */.tooltip-arrow.svelte-13nzt82 {position:absolute;width:0;height:0;}`
|
|
1019
|
+
};
|
|
1020
|
+
function Jt(K, t) {
|
|
1021
|
+
he(t, !1), Te(K, Ft);
|
|
1022
|
+
let y = u(t, "content", 8, ""), w = u(t, "placement", 8, "top"), _ = u(t, "trigger", 8, "hover"), m = u(t, "disabled", 8, !1), T = u(t, "delay", 8, 200), L = u(t, "maxWidth", 8, "200px"), F = u(t, "variant", 8, "default"), q = u(t, "size", 8, "md"), S = u(t, "arrow", 8, !0), z = u(t, "interactive", 8, !1), E = u(t, "className", 8, "");
|
|
1023
|
+
const I = Pe();
|
|
1024
|
+
let d = Z(), B = Z(), M = Z(!1), Q, A, f;
|
|
1025
|
+
const N = {
|
|
1026
|
+
sm: "px-2 py-1 text-xs",
|
|
1027
|
+
md: "px-3 py-1.5 text-sm",
|
|
1028
|
+
lg: "px-4 py-2 text-base"
|
|
1029
|
+
}, te = {
|
|
1030
|
+
default: "bg-surface-elevated text-primary border-primary shadow-adaptive-lg",
|
|
1031
|
+
dark: "bg-surface text-inverse border-primary shadow-adaptive-lg",
|
|
1032
|
+
light: "bg-surface text-primary border-primary shadow-adaptive-lg",
|
|
1033
|
+
info: "bg-info text-inverse border-info shadow-adaptive-lg",
|
|
1034
|
+
success: "bg-success text-inverse border-success shadow-adaptive-lg",
|
|
1035
|
+
warning: "bg-warning text-inverse border-warning shadow-adaptive-lg",
|
|
1036
|
+
error: "bg-error text-inverse border-error shadow-adaptive-lg"
|
|
1037
|
+
};
|
|
1038
|
+
function j() {
|
|
1039
|
+
if (!e(B) || !e(d)) return { top: 0, left: 0 };
|
|
1040
|
+
f = e(B).getBoundingClientRect();
|
|
1041
|
+
const l = e(d).getBoundingClientRect(), g = window.scrollY, se = window.scrollX, fe = window.innerWidth, Ce = window.innerHeight;
|
|
1042
|
+
let ae = 0, G = 0;
|
|
1043
|
+
switch (w()) {
|
|
1044
|
+
case "top":
|
|
1045
|
+
ae = f.top + g - l.height - 8, G = f.left + se + (f.width - l.width) / 2;
|
|
1046
|
+
break;
|
|
1047
|
+
case "top-start":
|
|
1048
|
+
ae = f.top + g - l.height - 8, G = f.left + se;
|
|
1049
|
+
break;
|
|
1050
|
+
case "top-end":
|
|
1051
|
+
ae = f.top + g - l.height - 8, G = f.right + se - l.width;
|
|
1052
|
+
break;
|
|
1053
|
+
case "bottom":
|
|
1054
|
+
ae = f.bottom + g + 8, G = f.left + se + (f.width - l.width) / 2;
|
|
1055
|
+
break;
|
|
1056
|
+
case "bottom-start":
|
|
1057
|
+
ae = f.bottom + g + 8, G = f.left + se;
|
|
1058
|
+
break;
|
|
1059
|
+
case "bottom-end":
|
|
1060
|
+
ae = f.bottom + g + 8, G = f.right + se - l.width;
|
|
1061
|
+
break;
|
|
1062
|
+
case "left":
|
|
1063
|
+
ae = f.top + g + (f.height - l.height) / 2, G = f.left + se - l.width - 8;
|
|
1064
|
+
break;
|
|
1065
|
+
case "left-start":
|
|
1066
|
+
ae = f.top + g, G = f.left + se - l.width - 8;
|
|
1067
|
+
break;
|
|
1068
|
+
case "left-end":
|
|
1069
|
+
ae = f.bottom + g - l.height, G = f.left + se - l.width - 8;
|
|
1070
|
+
break;
|
|
1071
|
+
case "right":
|
|
1072
|
+
ae = f.top + g + (f.height - l.height) / 2, G = f.right + se + 8;
|
|
1073
|
+
break;
|
|
1074
|
+
case "right-start":
|
|
1075
|
+
ae = f.top + g, G = f.right + se + 8;
|
|
1076
|
+
break;
|
|
1077
|
+
case "right-end":
|
|
1078
|
+
ae = f.bottom + g - l.height, G = f.right + se + 8;
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
return G < 8 && (G = 8), G + l.width > fe - 8 && (G = fe - l.width - 8), ae < 8 && (ae = 8), ae + l.height > Ce + g - 8 && (ae = Ce + g - l.height - 8), { top: ae, left: G };
|
|
1082
|
+
}
|
|
1083
|
+
function b(l) {
|
|
1084
|
+
m() || e(M) || (clearTimeout(A), Q = setTimeout(
|
|
1085
|
+
() => {
|
|
1086
|
+
H(M, !0), I("show", l), requestAnimationFrame(() => {
|
|
1087
|
+
const g = j();
|
|
1088
|
+
e(d) && (me(d, e(d).style.top = `${g.top}px`), me(d, e(d).style.left = `${g.left}px`));
|
|
1089
|
+
});
|
|
1090
|
+
},
|
|
1091
|
+
T()
|
|
1092
|
+
));
|
|
1093
|
+
}
|
|
1094
|
+
function D(l) {
|
|
1095
|
+
e(M) && (clearTimeout(Q), A = setTimeout(
|
|
1096
|
+
() => {
|
|
1097
|
+
H(M, !1), I("hide", l);
|
|
1098
|
+
},
|
|
1099
|
+
z() ? 300 : 0
|
|
1100
|
+
));
|
|
1101
|
+
}
|
|
1102
|
+
function O(l) {
|
|
1103
|
+
_() === "click" && (e(M) ? D(l) : b(l));
|
|
1104
|
+
}
|
|
1105
|
+
function $(l) {
|
|
1106
|
+
_() === "click" && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), e(M) ? D(l) : b(l));
|
|
1107
|
+
}
|
|
1108
|
+
function ee(l) {
|
|
1109
|
+
_() === "focus" && b(l);
|
|
1110
|
+
}
|
|
1111
|
+
function U(l) {
|
|
1112
|
+
_() === "focus" && D(l);
|
|
1113
|
+
}
|
|
1114
|
+
function x(l) {
|
|
1115
|
+
_() === "hover" && b(l);
|
|
1116
|
+
}
|
|
1117
|
+
function p(l) {
|
|
1118
|
+
_() === "hover" && D(l);
|
|
1119
|
+
}
|
|
1120
|
+
function c() {
|
|
1121
|
+
z() && clearTimeout(A);
|
|
1122
|
+
}
|
|
1123
|
+
function s(l) {
|
|
1124
|
+
z() && D(l);
|
|
1125
|
+
}
|
|
1126
|
+
function n() {
|
|
1127
|
+
m() || H(M, !0);
|
|
1128
|
+
}
|
|
1129
|
+
function o() {
|
|
1130
|
+
H(M, !1);
|
|
1131
|
+
}
|
|
1132
|
+
function v() {
|
|
1133
|
+
e(M) ? o() : n();
|
|
1134
|
+
}
|
|
1135
|
+
Le(() => () => {
|
|
1136
|
+
clearTimeout(Q), clearTimeout(A);
|
|
1137
|
+
}), ie(() => (e(M), e(d)), () => {
|
|
1138
|
+
e(M) && e(d) && requestAnimationFrame(() => {
|
|
1139
|
+
const l = j();
|
|
1140
|
+
me(d, e(d).style.top = `${l.top}px`), me(d, e(d).style.left = `${l.left}px`);
|
|
1141
|
+
});
|
|
1142
|
+
}), ze();
|
|
1143
|
+
var Y = { show: n, hide: o, toggle: v };
|
|
1144
|
+
we();
|
|
1145
|
+
var re = Nt(), de = ue(re);
|
|
1146
|
+
{
|
|
1147
|
+
var be = (l) => {
|
|
1148
|
+
var g = Mt(), se = a(g);
|
|
1149
|
+
ne(se, t, "default", {}, null), je(g, (fe) => H(B, fe), () => e(B)), h(() => J(g, "aria-describedby", e(M) ? "tooltip-{content}" : void 0)), R("click", g, O), R("keydown", g, $), R("focus", g, ee), R("blur", g, U), R("mouseenter", g, x), R("mouseleave", g, p), r(l, g);
|
|
1150
|
+
}, _e = (l) => {
|
|
1151
|
+
var g = Dt(), se = a(g);
|
|
1152
|
+
ne(se, t, "default", {}, null), je(g, (fe) => H(B, fe), () => e(B)), h(() => J(g, "aria-describedby", e(M) ? "tooltip-{content}" : void 0)), R("click", g, O), R("keydown", g, $), R("focus", g, ee), R("blur", g, U), R("mouseenter", g, x), R("mouseleave", g, p), r(l, g);
|
|
1153
|
+
};
|
|
1154
|
+
W(de, (l) => {
|
|
1155
|
+
_() === "click" ? l(be) : l(_e, !1);
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
var le = i(de, 2);
|
|
1159
|
+
{
|
|
1160
|
+
var xe = (l) => {
|
|
1161
|
+
var g = At(), se = a(g), fe = a(se), Ce = i(fe);
|
|
1162
|
+
{
|
|
1163
|
+
var ae = (G) => {
|
|
1164
|
+
var Be = It();
|
|
1165
|
+
h(
|
|
1166
|
+
(Me, De, Ie, Ae, Ne) => P(
|
|
1167
|
+
Be,
|
|
1168
|
+
1,
|
|
1169
|
+
`
|
|
1170
|
+
absolute w-2 h-2 transform rotate-45
|
|
1171
|
+
${Me ?? ""}
|
|
1172
|
+
${De ?? ""}
|
|
1173
|
+
${Ie ?? ""}
|
|
1174
|
+
${Ae ?? ""}
|
|
1175
|
+
${Ne ?? ""}
|
|
1176
|
+
`,
|
|
1177
|
+
"svelte-13nzt82"
|
|
1178
|
+
),
|
|
1179
|
+
[
|
|
1180
|
+
() => (C(F()), X(() => te[F()].split(" ")[0])),
|
|
1181
|
+
() => (C(w()), X(() => w().includes("top") ? "bottom-[-4px] left-1/2 -translate-x-1/2" : "")),
|
|
1182
|
+
() => (C(w()), X(() => w().includes("bottom") ? "top-[-4px] left-1/2 -translate-x-1/2" : "")),
|
|
1183
|
+
() => (C(w()), X(() => w().includes("left") ? "right-[-4px] top-1/2 -translate-y-1/2" : "")),
|
|
1184
|
+
() => (C(w()), X(() => w().includes("right") ? "left-[-4px] top-1/2 -translate-y-1/2" : ""))
|
|
1185
|
+
]
|
|
1186
|
+
), r(G, Be);
|
|
1187
|
+
};
|
|
1188
|
+
W(Ce, (G) => {
|
|
1189
|
+
S() && G(ae);
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
je(g, (G) => H(d, G), () => e(d)), h(() => {
|
|
1193
|
+
J(g, "id", `tooltip-${y() ?? ""}`), P(
|
|
1194
|
+
g,
|
|
1195
|
+
1,
|
|
1196
|
+
`
|
|
1197
|
+
fixed z-tooltip
|
|
1198
|
+
${C(q()), X(() => N[q()]) ?? ""}
|
|
1199
|
+
${C(F()), X(() => te[F()]) ?? ""}
|
|
1200
|
+
border rounded-lg shadow-adaptive-lg
|
|
1201
|
+
${E() ?? ""}
|
|
1202
|
+
`,
|
|
1203
|
+
"svelte-13nzt82"
|
|
1204
|
+
), ke(g, `max-width: ${L() ?? ""};`), V(fe, `${y() ?? ""} `);
|
|
1205
|
+
}), R("mouseenter", g, c), R("mouseleave", g, s), qe(3, g, () => Re, () => ({
|
|
1206
|
+
x: w().includes("left") ? -10 : w().includes("right") ? 10 : 0,
|
|
1207
|
+
y: w().includes("top") ? -10 : w().includes("bottom") ? 10 : 0,
|
|
1208
|
+
duration: 200
|
|
1209
|
+
})), r(l, g);
|
|
1210
|
+
};
|
|
1211
|
+
W(le, (l) => {
|
|
1212
|
+
e(M) && y() && l(xe);
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
return r(K, re), Ee(t, "show", n), Ee(t, "hide", o), Ee(t, "toggle", v), pe(Y);
|
|
1216
|
+
}
|
|
1217
|
+
export {
|
|
1218
|
+
Wt as B,
|
|
1219
|
+
Ht as C,
|
|
1220
|
+
Ot as H,
|
|
1221
|
+
Xt as O,
|
|
1222
|
+
Yt as P,
|
|
1223
|
+
Zt as S,
|
|
1224
|
+
Jt as T,
|
|
1225
|
+
Gt as a,
|
|
1226
|
+
Ut as b
|
|
1227
|
+
};
|