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