zabi-components 1.0.8 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Tabs-DOvhDdUK.js → Tabs-RCuPHjEL.js} +264 -265
- package/dist/{Toast-1EMgTOM4.js → Toast-BTynzMV8.js} +166 -137
- package/dist/{ToastManager-ZcovxilX.js → ToastManager-Bd5Slcp4.js} +96 -91
- package/dist/{Toggle-CTlSe4Ym.js → Toggle-LURK-bI8.js} +331 -312
- package/dist/Tooltip-BoApUzYg.js +1163 -0
- package/dist/atoms/index.js +3 -3
- package/dist/index/index.js +120 -114
- package/dist/molecules/index.js +2 -2
- package/dist/organisms/index.js +1 -1
- package/package.json +16 -9
- package/dist/Tooltip-gkAHhbjD.js +0 -1152
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { onMount as
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import { j as N, I as U, H as Z, w as P, b as q, J as $, K as ee, g as i, L as te, h as S, p as d, k as A, l as x, i as ae, f as b, c as p, t as _, e as I, m as se, n as v, q as B, u as k, r as j, v as W, x as oe, a as _e, o as C, s as ke, y as je, z as Me, M as Te, N as Ce, O as ze, B as X, X as Ee, P as Ie } from "./x-Dsi-CPO3.js";
|
|
2
|
+
import { onMount as re, createEventDispatcher as Ne } from "svelte";
|
|
3
|
+
function Se(o, e) {
|
|
4
|
+
N(e, !0);
|
|
5
5
|
/**
|
|
6
6
|
* @license @lucide/svelte v0.544.0 - ISC
|
|
7
7
|
*
|
|
@@ -46,29 +46,29 @@ function Ee(u, e) {
|
|
|
46
46
|
* SOFTWARE.
|
|
47
47
|
*
|
|
48
48
|
*/
|
|
49
|
-
let
|
|
50
|
-
const
|
|
49
|
+
let h = te(e, ["$$slots", "$$events", "$$legacy"]);
|
|
50
|
+
const f = [
|
|
51
51
|
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
52
52
|
["path", { d: "M12 16v-4" }],
|
|
53
53
|
["path", { d: "M12 8h.01" }]
|
|
54
54
|
];
|
|
55
|
-
|
|
55
|
+
U(o, Z(
|
|
56
56
|
{ name: "info" },
|
|
57
|
-
() =>
|
|
57
|
+
() => h,
|
|
58
58
|
{
|
|
59
59
|
get iconNode() {
|
|
60
|
-
return
|
|
60
|
+
return f;
|
|
61
61
|
},
|
|
62
|
-
children: (
|
|
63
|
-
var
|
|
64
|
-
|
|
62
|
+
children: (r, l) => {
|
|
63
|
+
var n = P(), c = q(n);
|
|
64
|
+
$(c, () => e.children ?? ee), i(r, n);
|
|
65
65
|
},
|
|
66
66
|
$$slots: { default: !0 }
|
|
67
67
|
}
|
|
68
|
-
)),
|
|
68
|
+
)), S();
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
70
|
+
function Le(o, e) {
|
|
71
|
+
N(e, !0);
|
|
72
72
|
/**
|
|
73
73
|
* @license @lucide/svelte v0.544.0 - ISC
|
|
74
74
|
*
|
|
@@ -113,8 +113,8 @@ function Ie(u, e) {
|
|
|
113
113
|
* SOFTWARE.
|
|
114
114
|
*
|
|
115
115
|
*/
|
|
116
|
-
let
|
|
117
|
-
const
|
|
116
|
+
let h = te(e, ["$$slots", "$$events", "$$legacy"]);
|
|
117
|
+
const f = [
|
|
118
118
|
[
|
|
119
119
|
"path",
|
|
120
120
|
{
|
|
@@ -124,62 +124,62 @@ function Ie(u, e) {
|
|
|
124
124
|
["path", { d: "M12 9v4" }],
|
|
125
125
|
["path", { d: "M12 17h.01" }]
|
|
126
126
|
];
|
|
127
|
-
|
|
127
|
+
U(o, Z(
|
|
128
128
|
{ name: "triangle-alert" },
|
|
129
|
-
() =>
|
|
129
|
+
() => h,
|
|
130
130
|
{
|
|
131
131
|
get iconNode() {
|
|
132
|
-
return
|
|
132
|
+
return f;
|
|
133
133
|
},
|
|
134
|
-
children: (
|
|
135
|
-
var
|
|
136
|
-
|
|
134
|
+
children: (r, l) => {
|
|
135
|
+
var n = P(), c = q(n);
|
|
136
|
+
$(c, () => e.children ?? ee), i(r, n);
|
|
137
137
|
},
|
|
138
138
|
$$slots: { default: !0 }
|
|
139
139
|
}
|
|
140
|
-
)),
|
|
140
|
+
)), S();
|
|
141
141
|
}
|
|
142
|
-
var
|
|
143
|
-
function
|
|
144
|
-
|
|
145
|
-
let
|
|
146
|
-
const
|
|
142
|
+
var De = oe('<svg class="w-5 h-5 text-text" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>'), Ye = oe('<svg class="w-5 h-5 text-text" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path></svg>'), Ae = b("<button><!></button>");
|
|
143
|
+
function We(o, e) {
|
|
144
|
+
N(e, !1);
|
|
145
|
+
let h = d(e, "size", 8, "md"), f = d(e, "variant", 8, "default"), r = se(!1);
|
|
146
|
+
const l = {
|
|
147
147
|
sm: "w-8 h-8 text-sm",
|
|
148
148
|
md: "w-10 h-10 text-base",
|
|
149
149
|
lg: "w-12 h-12 text-lg"
|
|
150
|
-
},
|
|
150
|
+
}, n = {
|
|
151
151
|
default: "bg-surface hover:bg-surface-hover border border-border shadow-adaptive-sm",
|
|
152
152
|
minimal: "bg-transparent hover:bg-surface-hover",
|
|
153
153
|
outline: "bg-transparent border border-border hover:bg-surface-hover"
|
|
154
154
|
};
|
|
155
|
-
|
|
156
|
-
const a = localStorage.getItem("theme"),
|
|
157
|
-
|
|
155
|
+
re(() => {
|
|
156
|
+
const a = localStorage.getItem("theme"), y = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
157
|
+
A(r, a === "dark" || !a && y), T();
|
|
158
158
|
});
|
|
159
|
-
function
|
|
160
|
-
|
|
159
|
+
function c() {
|
|
160
|
+
A(r, !x(r)), T(), localStorage.setItem("theme", x(r) ? "dark" : "light");
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
162
|
+
function T() {
|
|
163
|
+
x(r) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
164
164
|
}
|
|
165
|
-
|
|
166
|
-
var
|
|
165
|
+
ae();
|
|
166
|
+
var g = Ae(), L = v(g);
|
|
167
167
|
{
|
|
168
|
-
var
|
|
169
|
-
var
|
|
170
|
-
|
|
168
|
+
var D = (a) => {
|
|
169
|
+
var y = De();
|
|
170
|
+
i(a, y);
|
|
171
171
|
}, z = (a) => {
|
|
172
|
-
var
|
|
173
|
-
|
|
172
|
+
var y = Ye();
|
|
173
|
+
i(a, y);
|
|
174
174
|
};
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
p(L, (a) => {
|
|
176
|
+
x(r) ? a(D) : a(z, !1);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
${
|
|
182
|
-
${
|
|
179
|
+
_(() => {
|
|
180
|
+
B(g, 1, `
|
|
181
|
+
${j(h()), k(() => l[h()]) ?? ""}
|
|
182
|
+
${j(f()), k(() => n[f()]) ?? ""}
|
|
183
183
|
rounded-lg
|
|
184
184
|
transition-all
|
|
185
185
|
duration-200
|
|
@@ -193,11 +193,29 @@ function Je(u, e) {
|
|
|
193
193
|
focus:ring-focus-ring
|
|
194
194
|
focus:ring-offset-2
|
|
195
195
|
focus:ring-offset-focus-ring-offset
|
|
196
|
-
`),
|
|
197
|
-
}),
|
|
196
|
+
`), W(g, "aria-label", x(r) ? "Switch to light mode" : "Switch to dark mode"), W(g, "title", x(r) ? "Switch to light mode" : "Switch to dark mode");
|
|
197
|
+
}), I("click", g, c), i(o, g), S();
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
function M() {
|
|
200
|
+
return typeof window < "u" && typeof document < "u";
|
|
201
|
+
}
|
|
202
|
+
function Xe() {
|
|
203
|
+
return M() ? window : void 0;
|
|
204
|
+
}
|
|
205
|
+
function Be() {
|
|
206
|
+
return M() ? document : void 0;
|
|
207
|
+
}
|
|
208
|
+
function Ge(o) {
|
|
209
|
+
return M() ? requestAnimationFrame(o) : void 0;
|
|
210
|
+
}
|
|
211
|
+
function G(o, e) {
|
|
212
|
+
return M() ? setTimeout(o, e) : void 0;
|
|
213
|
+
}
|
|
214
|
+
function Q(o) {
|
|
215
|
+
M() && o && clearTimeout(o);
|
|
216
|
+
}
|
|
217
|
+
var Pe = b('<div class="flex-shrink-0 mr-3 svelte-ayjeya"><!></div>'), qe = b('<h4 class="text-sm font-semibold mb-1 svelte-ayjeya"> </h4>'), Fe = b('<p class="text-sm opacity-90 svelte-ayjeya"> </p>'), He = b('<button type="button" aria-label="Close notification"><!></button>'), Ke = b('<div class="absolute bottom-0 left-0 right-0 h-1 bg-current opacity-20 rounded-b-lg overflow-hidden svelte-ayjeya"><div class="h-full bg-current opacity-50 animate-progress-bar svelte-ayjeya"></div></div>'), Re = b('<div role="alert" aria-live="polite"><div class="p-4 svelte-ayjeya"><div class="flex items-start svelte-ayjeya"><!> <div class="flex-1 min-w-0 svelte-ayjeya"><!> <!> <!></div> <!></div></div> <!></div>');
|
|
218
|
+
const Je = {
|
|
201
219
|
hash: "svelte-ayjeya",
|
|
202
220
|
code: `
|
|
203
221
|
/* Progress bar animation */
|
|
@@ -246,22 +264,22 @@ const Ke = {
|
|
|
246
264
|
@media (max-width: 640px) {.toast-container.svelte-ayjeya {max-width:calc(100vw - 2rem);margin:0 1rem;}
|
|
247
265
|
}`
|
|
248
266
|
};
|
|
249
|
-
function
|
|
250
|
-
|
|
251
|
-
let
|
|
267
|
+
function Qe(o, e) {
|
|
268
|
+
N(e, !1), _e(o, Je);
|
|
269
|
+
let h = d(e, "id", 8, ""), f = d(e, "title", 8, ""), r = d(e, "message", 8, ""), l = d(e, "type", 8, "info"), n = d(
|
|
252
270
|
e,
|
|
253
271
|
"duration",
|
|
254
272
|
8,
|
|
255
273
|
5e3
|
|
256
274
|
// Auto-dismiss duration (0 = no auto-dismiss)
|
|
257
|
-
),
|
|
258
|
-
const
|
|
259
|
-
let z =
|
|
260
|
-
const
|
|
261
|
-
success:
|
|
262
|
-
error:
|
|
263
|
-
warning:
|
|
264
|
-
info:
|
|
275
|
+
), c = d(e, "position", 8, "top-right"), T = d(e, "closable", 8, !0), g = d(e, "showIcon", 8, !0), L = d(e, "className", 8, "");
|
|
276
|
+
const D = Ne();
|
|
277
|
+
let z = se(!0), a;
|
|
278
|
+
const y = {
|
|
279
|
+
success: ze,
|
|
280
|
+
error: Ce,
|
|
281
|
+
warning: Le,
|
|
282
|
+
info: Se
|
|
265
283
|
}, Y = {
|
|
266
284
|
success: {
|
|
267
285
|
container: "bg-success-surface border-success text-success-text",
|
|
@@ -283,7 +301,7 @@ function Oe(u, e) {
|
|
|
283
301
|
icon: "text-info",
|
|
284
302
|
close: "text-info hover:text-info-hover"
|
|
285
303
|
}
|
|
286
|
-
},
|
|
304
|
+
}, ne = {
|
|
287
305
|
"top-right": "top-4 right-4",
|
|
288
306
|
"top-left": "top-4 left-4",
|
|
289
307
|
"bottom-right": "bottom-4 right-4",
|
|
@@ -291,127 +309,138 @@ function Oe(u, e) {
|
|
|
291
309
|
"top-center": "top-4 left-1/2 transform -translate-x-1/2",
|
|
292
310
|
"bottom-center": "bottom-4 left-1/2 transform -translate-x-1/2"
|
|
293
311
|
};
|
|
294
|
-
function
|
|
295
|
-
|
|
312
|
+
function E() {
|
|
313
|
+
A(z, !1), D("close", { id: h() });
|
|
296
314
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
315
|
+
function F(u) {
|
|
316
|
+
u.key === "Escape" && T() && E();
|
|
299
317
|
}
|
|
300
|
-
|
|
301
|
-
()
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
318
|
+
re(() => {
|
|
319
|
+
if (!M()) return;
|
|
320
|
+
const u = Be();
|
|
321
|
+
if (u)
|
|
322
|
+
return n() > 0 && (a = G(
|
|
323
|
+
() => {
|
|
324
|
+
E();
|
|
325
|
+
},
|
|
326
|
+
n()
|
|
327
|
+
)), u.addEventListener("keydown", F), () => {
|
|
328
|
+
a && Q(a), u.removeEventListener("keydown", F);
|
|
329
|
+
};
|
|
330
|
+
});
|
|
331
|
+
function ie() {
|
|
332
|
+
a && Q(a);
|
|
310
333
|
}
|
|
311
|
-
function
|
|
312
|
-
|
|
334
|
+
function le() {
|
|
335
|
+
n() > 0 && (a = G(
|
|
313
336
|
() => {
|
|
314
|
-
|
|
337
|
+
E();
|
|
315
338
|
},
|
|
316
|
-
|
|
339
|
+
n()
|
|
317
340
|
));
|
|
318
341
|
}
|
|
319
|
-
|
|
320
|
-
var
|
|
342
|
+
ae();
|
|
343
|
+
var H = P(), ce = q(H);
|
|
321
344
|
{
|
|
322
|
-
var
|
|
323
|
-
var
|
|
345
|
+
var de = (u) => {
|
|
346
|
+
var w = Re(), K = v(w), ve = v(K), R = v(ve);
|
|
324
347
|
{
|
|
325
|
-
var
|
|
326
|
-
var s =
|
|
327
|
-
|
|
328
|
-
|
|
348
|
+
var fe = (t) => {
|
|
349
|
+
var s = Pe(), m = v(s);
|
|
350
|
+
Te(m, () => y[l()], (be, we) => {
|
|
351
|
+
we(be, {
|
|
329
352
|
size: 20,
|
|
330
353
|
get class() {
|
|
331
|
-
return
|
|
354
|
+
return j(l()), k(() => Y[l()].icon);
|
|
332
355
|
}
|
|
333
356
|
});
|
|
334
|
-
}),
|
|
357
|
+
}), i(t, s);
|
|
335
358
|
};
|
|
336
|
-
|
|
337
|
-
|
|
359
|
+
p(R, (t) => {
|
|
360
|
+
g() && t(fe);
|
|
338
361
|
});
|
|
339
362
|
}
|
|
340
|
-
var J =
|
|
363
|
+
var J = C(R, 2), O = v(J);
|
|
341
364
|
{
|
|
342
|
-
var
|
|
343
|
-
var s =
|
|
344
|
-
|
|
365
|
+
var ue = (t) => {
|
|
366
|
+
var s = qe(), m = v(s);
|
|
367
|
+
_(() => X(m, f())), i(t, s);
|
|
345
368
|
};
|
|
346
|
-
|
|
347
|
-
|
|
369
|
+
p(O, (t) => {
|
|
370
|
+
f() && t(ue);
|
|
348
371
|
});
|
|
349
372
|
}
|
|
350
|
-
var
|
|
373
|
+
var V = C(O, 2);
|
|
351
374
|
{
|
|
352
|
-
var
|
|
353
|
-
var s =
|
|
354
|
-
|
|
375
|
+
var me = (t) => {
|
|
376
|
+
var s = Fe(), m = v(s);
|
|
377
|
+
_(() => X(m, r())), i(t, s);
|
|
355
378
|
};
|
|
356
|
-
|
|
357
|
-
|
|
379
|
+
p(V, (t) => {
|
|
380
|
+
r() && t(me);
|
|
358
381
|
});
|
|
359
382
|
}
|
|
360
|
-
var
|
|
361
|
-
|
|
362
|
-
var
|
|
383
|
+
var he = C(V, 2);
|
|
384
|
+
ke(he, e, "default", {}, null);
|
|
385
|
+
var ge = C(J, 2);
|
|
363
386
|
{
|
|
364
|
-
var
|
|
365
|
-
var s =
|
|
366
|
-
|
|
387
|
+
var ye = (t) => {
|
|
388
|
+
var s = He(), m = v(s);
|
|
389
|
+
Ee(m, { size: 16 }), _(() => B(
|
|
367
390
|
s,
|
|
368
391
|
1,
|
|
369
392
|
`
|
|
370
393
|
flex-shrink-0 ml-3 p-1 rounded-full
|
|
371
|
-
${
|
|
394
|
+
${j(l()), k(() => Y[l()].close) ?? ""}
|
|
372
395
|
transition-colors duration-200
|
|
373
396
|
`,
|
|
374
397
|
"svelte-ayjeya"
|
|
375
|
-
)),
|
|
398
|
+
)), I("click", s, E), i(t, s);
|
|
376
399
|
};
|
|
377
|
-
|
|
378
|
-
|
|
400
|
+
p(ge, (t) => {
|
|
401
|
+
T() && t(ye);
|
|
379
402
|
});
|
|
380
403
|
}
|
|
381
|
-
var
|
|
404
|
+
var xe = C(K, 2);
|
|
382
405
|
{
|
|
383
|
-
var
|
|
384
|
-
var s =
|
|
385
|
-
|
|
406
|
+
var pe = (t) => {
|
|
407
|
+
var s = Ke(), m = v(s);
|
|
408
|
+
_(() => Ie(m, `animation-duration: ${n() ?? ""}ms;`)), i(t, s);
|
|
386
409
|
};
|
|
387
|
-
|
|
388
|
-
|
|
410
|
+
p(xe, (t) => {
|
|
411
|
+
n() > 0 && t(pe);
|
|
389
412
|
});
|
|
390
413
|
}
|
|
391
|
-
|
|
392
|
-
|
|
414
|
+
_(() => B(
|
|
415
|
+
w,
|
|
393
416
|
1,
|
|
394
417
|
`
|
|
395
418
|
fixed z-notification max-w-sm w-full
|
|
396
|
-
${
|
|
397
|
-
${
|
|
419
|
+
${j(c()), k(() => ne[c()]) ?? ""}
|
|
420
|
+
${j(l()), k(() => Y[l()].container) ?? ""}
|
|
398
421
|
border rounded-lg shadow-adaptive-lg
|
|
399
422
|
${L() ?? ""}
|
|
400
423
|
`,
|
|
401
424
|
"svelte-ayjeya"
|
|
402
|
-
)),
|
|
403
|
-
x:
|
|
404
|
-
y:
|
|
425
|
+
)), I("mouseenter", w, ie), I("mouseleave", w, le), je(3, w, () => Me, () => ({
|
|
426
|
+
x: c().includes("right") ? 300 : c().includes("left") ? -300 : 0,
|
|
427
|
+
y: c().includes("top") ? -50 : 50,
|
|
405
428
|
duration: 300
|
|
406
|
-
})),
|
|
429
|
+
})), i(u, w);
|
|
407
430
|
};
|
|
408
|
-
|
|
409
|
-
|
|
431
|
+
p(ce, (u) => {
|
|
432
|
+
x(z) && u(de);
|
|
410
433
|
});
|
|
411
434
|
}
|
|
412
|
-
|
|
435
|
+
i(o, H), S();
|
|
413
436
|
}
|
|
414
437
|
export {
|
|
415
|
-
|
|
416
|
-
|
|
438
|
+
We as T,
|
|
439
|
+
Qe as a,
|
|
440
|
+
Be as b,
|
|
441
|
+
Ge as c,
|
|
442
|
+
G as d,
|
|
443
|
+
Q as e,
|
|
444
|
+
M as i,
|
|
445
|
+
Xe as s
|
|
417
446
|
};
|