zabi-components 1.0.6 → 1.0.8
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/README.md +460 -79
- package/dist/Tabs-DOvhDdUK.js +1106 -0
- package/dist/{Toast-DXZ9gllw.js → Toast-1EMgTOM4.js} +80 -80
- package/dist/{ToastManager-Q990X_Ag.js → ToastManager-ZcovxilX.js} +119 -117
- package/dist/Toggle-CTlSe4Ym.js +2488 -0
- package/dist/Tooltip-gkAHhbjD.js +1152 -0
- package/dist/atoms/index.js +15 -15
- package/dist/index/index.js +314 -34
- package/dist/molecules/index.js +12 -8
- package/dist/organisms/index.js +1 -1
- package/dist/{x-DpVwziig.js → x-Dsi-CPO3.js} +11 -11
- package/package.json +1 -1
- package/dist/Tabs-Tv_48hdh.js +0 -859
- package/dist/Toggle-BidBFl7X.js +0 -2276
- package/dist/Tooltip-BA4NYwx_.js +0 -1214
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as I, I as G, H as Q, w as B, b as H, J as U, K as W, g as n, L as Z, h as N, p as c, k as D, l as
|
|
1
|
+
import { j as I, I as G, H as Q, w as B, b as H, J as U, K as W, g as n, L as Z, h as N, p as c, k as D, l as y, i as $, f as p, c as x, t as w, e as E, m as ee, n as d, q as P, u as _, r as k, v as V, x as te, a as pe, o as T, s as be, y as we, z as _e, M as ke, N as je, O as Me, B as X, X as Te, P as ze } from "./x-Dsi-CPO3.js";
|
|
2
2
|
import { onMount as ae, createEventDispatcher as Ce } from "svelte";
|
|
3
|
-
function Ee(
|
|
3
|
+
function Ee(u, e) {
|
|
4
4
|
I(e, !0);
|
|
5
5
|
/**
|
|
6
6
|
* @license @lucide/svelte v0.544.0 - ISC
|
|
@@ -46,28 +46,28 @@ function Ee(f, e) {
|
|
|
46
46
|
* SOFTWARE.
|
|
47
47
|
*
|
|
48
48
|
*/
|
|
49
|
-
let
|
|
49
|
+
let m = Z(e, ["$$slots", "$$events", "$$legacy"]);
|
|
50
50
|
const v = [
|
|
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
|
-
G(
|
|
55
|
+
G(u, Q(
|
|
56
56
|
{ name: "info" },
|
|
57
|
-
() =>
|
|
57
|
+
() => m,
|
|
58
58
|
{
|
|
59
59
|
get iconNode() {
|
|
60
60
|
return v;
|
|
61
61
|
},
|
|
62
|
-
children: (
|
|
63
|
-
var
|
|
64
|
-
U(l, () => e.children ?? W), n(
|
|
62
|
+
children: (o, i) => {
|
|
63
|
+
var r = B(), l = H(r);
|
|
64
|
+
U(l, () => e.children ?? W), n(o, r);
|
|
65
65
|
},
|
|
66
66
|
$$slots: { default: !0 }
|
|
67
67
|
}
|
|
68
68
|
)), N();
|
|
69
69
|
}
|
|
70
|
-
function Ie(
|
|
70
|
+
function Ie(u, e) {
|
|
71
71
|
I(e, !0);
|
|
72
72
|
/**
|
|
73
73
|
* @license @lucide/svelte v0.544.0 - ISC
|
|
@@ -113,7 +113,7 @@ function Ie(f, e) {
|
|
|
113
113
|
* SOFTWARE.
|
|
114
114
|
*
|
|
115
115
|
*/
|
|
116
|
-
let
|
|
116
|
+
let m = Z(e, ["$$slots", "$$events", "$$legacy"]);
|
|
117
117
|
const v = [
|
|
118
118
|
[
|
|
119
119
|
"path",
|
|
@@ -124,79 +124,79 @@ function Ie(f, e) {
|
|
|
124
124
|
["path", { d: "M12 9v4" }],
|
|
125
125
|
["path", { d: "M12 17h.01" }]
|
|
126
126
|
];
|
|
127
|
-
G(
|
|
127
|
+
G(u, Q(
|
|
128
128
|
{ name: "triangle-alert" },
|
|
129
|
-
() =>
|
|
129
|
+
() => m,
|
|
130
130
|
{
|
|
131
131
|
get iconNode() {
|
|
132
132
|
return v;
|
|
133
133
|
},
|
|
134
|
-
children: (
|
|
135
|
-
var
|
|
136
|
-
U(l, () => e.children ?? W), n(
|
|
134
|
+
children: (o, i) => {
|
|
135
|
+
var r = B(), l = H(r);
|
|
136
|
+
U(l, () => e.children ?? W), n(o, r);
|
|
137
137
|
},
|
|
138
138
|
$$slots: { default: !0 }
|
|
139
139
|
}
|
|
140
140
|
)), N();
|
|
141
141
|
}
|
|
142
|
-
var Ne = te('<svg class="w-5 h-5" 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>'), Le = te('<svg class="w-5 h-5" 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>'), Se =
|
|
143
|
-
function Je(
|
|
142
|
+
var Ne = te('<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>'), Le = te('<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>'), Se = p("<button><!></button>");
|
|
143
|
+
function Je(u, e) {
|
|
144
144
|
I(e, !1);
|
|
145
|
-
let
|
|
145
|
+
let m = c(e, "size", 8, "md"), v = c(e, "variant", 8, "default"), o = ee(!1);
|
|
146
146
|
const i = {
|
|
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
|
-
},
|
|
151
|
-
default: "bg-surface
|
|
152
|
-
minimal: "bg-transparent hover:bg-surface-
|
|
153
|
-
outline: "bg-transparent border border-
|
|
150
|
+
}, r = {
|
|
151
|
+
default: "bg-surface hover:bg-surface-hover border border-border shadow-adaptive-sm",
|
|
152
|
+
minimal: "bg-transparent hover:bg-surface-hover",
|
|
153
|
+
outline: "bg-transparent border border-border hover:bg-surface-hover"
|
|
154
154
|
};
|
|
155
155
|
ae(() => {
|
|
156
|
-
const a = localStorage.getItem("theme"),
|
|
157
|
-
D(
|
|
156
|
+
const a = localStorage.getItem("theme"), g = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
157
|
+
D(o, a === "dark" || !a && g), j();
|
|
158
158
|
});
|
|
159
159
|
function l() {
|
|
160
|
-
D(
|
|
160
|
+
D(o, !y(o)), j(), localStorage.setItem("theme", y(o) ? "dark" : "light");
|
|
161
161
|
}
|
|
162
162
|
function j() {
|
|
163
|
-
|
|
163
|
+
y(o) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
164
164
|
}
|
|
165
165
|
$();
|
|
166
166
|
var h = Se(), L = d(h);
|
|
167
167
|
{
|
|
168
168
|
var S = (a) => {
|
|
169
|
-
var
|
|
170
|
-
n(a,
|
|
169
|
+
var g = Ne();
|
|
170
|
+
n(a, g);
|
|
171
171
|
}, z = (a) => {
|
|
172
|
-
var
|
|
173
|
-
n(a,
|
|
172
|
+
var g = Le();
|
|
173
|
+
n(a, g);
|
|
174
174
|
};
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
x(L, (a) => {
|
|
176
|
+
y(o) ? a(S) : a(z, !1);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
w(() => {
|
|
180
180
|
P(h, 1, `
|
|
181
|
-
${k(
|
|
182
|
-
${k(v()), _(() =>
|
|
181
|
+
${k(m()), _(() => i[m()]) ?? ""}
|
|
182
|
+
${k(v()), _(() => r[v()]) ?? ""}
|
|
183
183
|
rounded-lg
|
|
184
184
|
transition-all
|
|
185
185
|
duration-200
|
|
186
186
|
flex
|
|
187
187
|
items-center
|
|
188
188
|
justify-center
|
|
189
|
-
text-
|
|
190
|
-
hover:text-
|
|
189
|
+
text-text
|
|
190
|
+
hover:text-text
|
|
191
191
|
focus:outline-none
|
|
192
192
|
focus:ring-2
|
|
193
|
-
focus:ring-
|
|
193
|
+
focus:ring-focus-ring
|
|
194
194
|
focus:ring-offset-2
|
|
195
|
-
focus:ring-offset-
|
|
196
|
-
`), V(h, "aria-label",
|
|
197
|
-
}), E("click", h, l), n(
|
|
195
|
+
focus:ring-offset-focus-ring-offset
|
|
196
|
+
`), V(h, "aria-label", y(o) ? "Switch to light mode" : "Switch to dark mode"), V(h, "title", y(o) ? "Switch to light mode" : "Switch to dark mode");
|
|
197
|
+
}), E("click", h, l), n(u, h), N();
|
|
198
198
|
}
|
|
199
|
-
var Ye =
|
|
199
|
+
var Ye = p('<div class="flex-shrink-0 mr-3 svelte-ayjeya"><!></div>'), De = p('<h4 class="text-sm font-semibold mb-1 svelte-ayjeya"> </h4>'), Pe = p('<p class="text-sm opacity-90 svelte-ayjeya"> </p>'), Be = p('<button type="button" aria-label="Close notification"><!></button>'), He = p('<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>'), Ae = p('<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>');
|
|
200
200
|
const Ke = {
|
|
201
201
|
hash: "svelte-ayjeya",
|
|
202
202
|
code: `
|
|
@@ -246,9 +246,9 @@ const Ke = {
|
|
|
246
246
|
@media (max-width: 640px) {.toast-container.svelte-ayjeya {max-width:calc(100vw - 2rem);margin:0 1rem;}
|
|
247
247
|
}`
|
|
248
248
|
};
|
|
249
|
-
function Oe(
|
|
250
|
-
I(e, !1),
|
|
251
|
-
let
|
|
249
|
+
function Oe(u, e) {
|
|
250
|
+
I(e, !1), pe(u, Ke);
|
|
251
|
+
let m = c(e, "id", 8, ""), v = c(e, "title", 8, ""), o = c(e, "message", 8, ""), i = c(e, "type", 8, "info"), r = c(
|
|
252
252
|
e,
|
|
253
253
|
"duration",
|
|
254
254
|
8,
|
|
@@ -257,7 +257,7 @@ function Oe(f, e) {
|
|
|
257
257
|
), l = c(e, "position", 8, "top-right"), j = c(e, "closable", 8, !0), h = c(e, "showIcon", 8, !0), L = c(e, "className", 8, "");
|
|
258
258
|
const S = Ce();
|
|
259
259
|
let z = ee(!0), a;
|
|
260
|
-
const
|
|
260
|
+
const g = {
|
|
261
261
|
success: Me,
|
|
262
262
|
error: je,
|
|
263
263
|
warning: Ie,
|
|
@@ -292,28 +292,28 @@ function Oe(f, e) {
|
|
|
292
292
|
"bottom-center": "bottom-4 left-1/2 transform -translate-x-1/2"
|
|
293
293
|
};
|
|
294
294
|
function C() {
|
|
295
|
-
D(z, !1), S("close", { id:
|
|
295
|
+
D(z, !1), S("close", { id: m() });
|
|
296
296
|
}
|
|
297
297
|
function A(M) {
|
|
298
298
|
M.key === "Escape" && j() && C();
|
|
299
299
|
}
|
|
300
|
-
ae(() => (
|
|
300
|
+
ae(() => (r() > 0 && (a = setTimeout(
|
|
301
301
|
() => {
|
|
302
302
|
C();
|
|
303
303
|
},
|
|
304
|
-
|
|
304
|
+
r()
|
|
305
305
|
)), document.addEventListener("keydown", A), () => {
|
|
306
306
|
a && clearTimeout(a), document.removeEventListener("keydown", A);
|
|
307
307
|
}));
|
|
308
|
-
function
|
|
308
|
+
function oe() {
|
|
309
309
|
a && clearTimeout(a);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
|
|
311
|
+
function re() {
|
|
312
|
+
r() > 0 && (a = setTimeout(
|
|
313
313
|
() => {
|
|
314
314
|
C();
|
|
315
315
|
},
|
|
316
|
-
|
|
316
|
+
r()
|
|
317
317
|
));
|
|
318
318
|
}
|
|
319
319
|
$();
|
|
@@ -323,9 +323,9 @@ function Oe(f, e) {
|
|
|
323
323
|
var b = Ae(), q = d(b), le = d(q), F = d(le);
|
|
324
324
|
{
|
|
325
325
|
var ce = (t) => {
|
|
326
|
-
var s = Ye(),
|
|
327
|
-
ke(
|
|
328
|
-
|
|
326
|
+
var s = Ye(), f = d(s);
|
|
327
|
+
ke(f, () => g[i()], (ye, xe) => {
|
|
328
|
+
xe(ye, {
|
|
329
329
|
size: 20,
|
|
330
330
|
get class() {
|
|
331
331
|
return k(i()), _(() => Y[i()].icon);
|
|
@@ -333,37 +333,37 @@ function Oe(f, e) {
|
|
|
333
333
|
});
|
|
334
334
|
}), n(t, s);
|
|
335
335
|
};
|
|
336
|
-
|
|
336
|
+
x(F, (t) => {
|
|
337
337
|
h() && t(ce);
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
var J = T(F, 2), O = d(J);
|
|
341
341
|
{
|
|
342
342
|
var de = (t) => {
|
|
343
|
-
var s = De(),
|
|
344
|
-
w(() => X(
|
|
343
|
+
var s = De(), f = d(s);
|
|
344
|
+
w(() => X(f, v())), n(t, s);
|
|
345
345
|
};
|
|
346
|
-
|
|
346
|
+
x(O, (t) => {
|
|
347
347
|
v() && t(de);
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
var R = T(O, 2);
|
|
351
351
|
{
|
|
352
352
|
var ve = (t) => {
|
|
353
|
-
var s = Pe(),
|
|
354
|
-
w(() => X(
|
|
353
|
+
var s = Pe(), f = d(s);
|
|
354
|
+
w(() => X(f, o())), n(t, s);
|
|
355
355
|
};
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
x(R, (t) => {
|
|
357
|
+
o() && t(ve);
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
var
|
|
361
|
-
be(
|
|
362
|
-
var
|
|
360
|
+
var fe = T(R, 2);
|
|
361
|
+
be(fe, e, "default", {}, null);
|
|
362
|
+
var ue = T(J, 2);
|
|
363
363
|
{
|
|
364
|
-
var
|
|
365
|
-
var s = Be(),
|
|
366
|
-
Te(
|
|
364
|
+
var me = (t) => {
|
|
365
|
+
var s = Be(), f = d(s);
|
|
366
|
+
Te(f, { size: 16 }), w(() => P(
|
|
367
367
|
s,
|
|
368
368
|
1,
|
|
369
369
|
`
|
|
@@ -374,18 +374,18 @@ function Oe(f, e) {
|
|
|
374
374
|
"svelte-ayjeya"
|
|
375
375
|
)), E("click", s, C), n(t, s);
|
|
376
376
|
};
|
|
377
|
-
|
|
378
|
-
j() && t(
|
|
377
|
+
x(ue, (t) => {
|
|
378
|
+
j() && t(me);
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
var he = T(q, 2);
|
|
382
382
|
{
|
|
383
|
-
var
|
|
384
|
-
var s = He(),
|
|
385
|
-
w(() => ze(
|
|
383
|
+
var ge = (t) => {
|
|
384
|
+
var s = He(), f = d(s);
|
|
385
|
+
w(() => ze(f, `animation-duration: ${r() ?? ""}ms;`)), n(t, s);
|
|
386
386
|
};
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
x(he, (t) => {
|
|
388
|
+
r() > 0 && t(ge);
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
w(() => P(
|
|
@@ -399,17 +399,17 @@ function Oe(f, e) {
|
|
|
399
399
|
${L() ?? ""}
|
|
400
400
|
`,
|
|
401
401
|
"svelte-ayjeya"
|
|
402
|
-
)), E("mouseenter", b,
|
|
402
|
+
)), E("mouseenter", b, oe), E("mouseleave", b, re), we(3, b, () => _e, () => ({
|
|
403
403
|
x: l().includes("right") ? 300 : l().includes("left") ? -300 : 0,
|
|
404
404
|
y: l().includes("top") ? -50 : 50,
|
|
405
405
|
duration: 300
|
|
406
406
|
})), n(M, b);
|
|
407
407
|
};
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
x(ne, (M) => {
|
|
409
|
+
y(z) && M(ie);
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
n(
|
|
412
|
+
n(u, K), N();
|
|
413
413
|
}
|
|
414
414
|
export {
|
|
415
415
|
Je as T,
|