zabi-components 1.0.7 → 1.0.9

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