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.
@@ -1,7 +1,7 @@
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
- import { onMount as ae, createEventDispatcher as Ce } from "svelte";
3
- function Ee(u, e) {
4
- I(e, !0);
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 m = Z(e, ["$$slots", "$$events", "$$legacy"]);
50
- const v = [
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
- G(u, Q(
55
+ U(o, Z(
56
56
  { name: "info" },
57
- () => m,
57
+ () => h,
58
58
  {
59
59
  get iconNode() {
60
- return v;
60
+ return f;
61
61
  },
62
- children: (o, i) => {
63
- var r = B(), l = H(r);
64
- U(l, () => e.children ?? W), n(o, r);
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
- )), N();
68
+ )), S();
69
69
  }
70
- function Ie(u, e) {
71
- I(e, !0);
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 m = Z(e, ["$$slots", "$$events", "$$legacy"]);
117
- const v = [
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
- G(u, Q(
127
+ U(o, Z(
128
128
  { name: "triangle-alert" },
129
- () => m,
129
+ () => h,
130
130
  {
131
131
  get iconNode() {
132
- return v;
132
+ return f;
133
133
  },
134
- children: (o, i) => {
135
- var r = B(), l = H(r);
136
- U(l, () => e.children ?? W), n(o, r);
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
- )), N();
140
+ )), S();
141
141
  }
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
- I(e, !1);
145
- let m = c(e, "size", 8, "md"), v = c(e, "variant", 8, "default"), o = ee(!1);
146
- const i = {
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
- }, r = {
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
- ae(() => {
156
- const a = localStorage.getItem("theme"), g = window.matchMedia("(prefers-color-scheme: dark)").matches;
157
- D(o, a === "dark" || !a && g), j();
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 l() {
160
- D(o, !y(o)), j(), localStorage.setItem("theme", y(o) ? "dark" : "light");
159
+ function c() {
160
+ A(r, !x(r)), T(), localStorage.setItem("theme", x(r) ? "dark" : "light");
161
161
  }
162
- function j() {
163
- y(o) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
162
+ function T() {
163
+ x(r) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
164
164
  }
165
- $();
166
- var h = Se(), L = d(h);
165
+ ae();
166
+ var g = Ae(), L = v(g);
167
167
  {
168
- var S = (a) => {
169
- var g = Ne();
170
- n(a, g);
168
+ var D = (a) => {
169
+ var y = De();
170
+ i(a, y);
171
171
  }, z = (a) => {
172
- var g = Le();
173
- n(a, g);
172
+ var y = Ye();
173
+ i(a, y);
174
174
  };
175
- x(L, (a) => {
176
- y(o) ? a(S) : a(z, !1);
175
+ p(L, (a) => {
176
+ x(r) ? a(D) : a(z, !1);
177
177
  });
178
178
  }
179
- w(() => {
180
- P(h, 1, `
181
- ${k(m()), _(() => i[m()]) ?? ""}
182
- ${k(v()), _(() => r[v()]) ?? ""}
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
- `), 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();
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
- 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
- const Ke = {
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 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(
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
- ), 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
- const S = Ce();
259
- let z = ee(!0), a;
260
- const g = {
261
- success: Me,
262
- error: je,
263
- warning: Ie,
264
- info: Ee
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
- }, se = {
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 C() {
295
- D(z, !1), S("close", { id: m() });
312
+ function E() {
313
+ A(z, !1), D("close", { id: h() });
296
314
  }
297
- function A(M) {
298
- M.key === "Escape" && j() && C();
315
+ function F(u) {
316
+ u.key === "Escape" && T() && E();
299
317
  }
300
- ae(() => (r() > 0 && (a = setTimeout(
301
- () => {
302
- C();
303
- },
304
- r()
305
- )), document.addEventListener("keydown", A), () => {
306
- a && clearTimeout(a), document.removeEventListener("keydown", A);
307
- }));
308
- function oe() {
309
- a && clearTimeout(a);
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 re() {
312
- r() > 0 && (a = setTimeout(
334
+ function le() {
335
+ n() > 0 && (a = G(
313
336
  () => {
314
- C();
337
+ E();
315
338
  },
316
- r()
339
+ n()
317
340
  ));
318
341
  }
319
- $();
320
- var K = B(), ne = H(K);
342
+ ae();
343
+ var H = P(), ce = q(H);
321
344
  {
322
- var ie = (M) => {
323
- var b = Ae(), q = d(b), le = d(q), F = d(le);
345
+ var de = (u) => {
346
+ var w = Re(), K = v(w), ve = v(K), R = v(ve);
324
347
  {
325
- var ce = (t) => {
326
- var s = Ye(), f = d(s);
327
- ke(f, () => g[i()], (ye, xe) => {
328
- xe(ye, {
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 k(i()), _(() => Y[i()].icon);
354
+ return j(l()), k(() => Y[l()].icon);
332
355
  }
333
356
  });
334
- }), n(t, s);
357
+ }), i(t, s);
335
358
  };
336
- x(F, (t) => {
337
- h() && t(ce);
359
+ p(R, (t) => {
360
+ g() && t(fe);
338
361
  });
339
362
  }
340
- var J = T(F, 2), O = d(J);
363
+ var J = C(R, 2), O = v(J);
341
364
  {
342
- var de = (t) => {
343
- var s = De(), f = d(s);
344
- w(() => X(f, v())), n(t, s);
365
+ var ue = (t) => {
366
+ var s = qe(), m = v(s);
367
+ _(() => X(m, f())), i(t, s);
345
368
  };
346
- x(O, (t) => {
347
- v() && t(de);
369
+ p(O, (t) => {
370
+ f() && t(ue);
348
371
  });
349
372
  }
350
- var R = T(O, 2);
373
+ var V = C(O, 2);
351
374
  {
352
- var ve = (t) => {
353
- var s = Pe(), f = d(s);
354
- w(() => X(f, o())), n(t, s);
375
+ var me = (t) => {
376
+ var s = Fe(), m = v(s);
377
+ _(() => X(m, r())), i(t, s);
355
378
  };
356
- x(R, (t) => {
357
- o() && t(ve);
379
+ p(V, (t) => {
380
+ r() && t(me);
358
381
  });
359
382
  }
360
- var fe = T(R, 2);
361
- be(fe, e, "default", {}, null);
362
- var ue = T(J, 2);
383
+ var he = C(V, 2);
384
+ ke(he, e, "default", {}, null);
385
+ var ge = C(J, 2);
363
386
  {
364
- var me = (t) => {
365
- var s = Be(), f = d(s);
366
- Te(f, { size: 16 }), w(() => P(
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
- ${k(i()), _(() => Y[i()].close) ?? ""}
394
+ ${j(l()), k(() => Y[l()].close) ?? ""}
372
395
  transition-colors duration-200
373
396
  `,
374
397
  "svelte-ayjeya"
375
- )), E("click", s, C), n(t, s);
398
+ )), I("click", s, E), i(t, s);
376
399
  };
377
- x(ue, (t) => {
378
- j() && t(me);
400
+ p(ge, (t) => {
401
+ T() && t(ye);
379
402
  });
380
403
  }
381
- var he = T(q, 2);
404
+ var xe = C(K, 2);
382
405
  {
383
- var ge = (t) => {
384
- var s = He(), f = d(s);
385
- w(() => ze(f, `animation-duration: ${r() ?? ""}ms;`)), n(t, s);
406
+ var pe = (t) => {
407
+ var s = Ke(), m = v(s);
408
+ _(() => Ie(m, `animation-duration: ${n() ?? ""}ms;`)), i(t, s);
386
409
  };
387
- x(he, (t) => {
388
- r() > 0 && t(ge);
410
+ p(xe, (t) => {
411
+ n() > 0 && t(pe);
389
412
  });
390
413
  }
391
- w(() => P(
392
- b,
414
+ _(() => B(
415
+ w,
393
416
  1,
394
417
  `
395
418
  fixed z-notification max-w-sm w-full
396
- ${k(l()), _(() => se[l()]) ?? ""}
397
- ${k(i()), _(() => Y[i()].container) ?? ""}
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
- )), E("mouseenter", b, oe), E("mouseleave", b, re), we(3, b, () => _e, () => ({
403
- x: l().includes("right") ? 300 : l().includes("left") ? -300 : 0,
404
- y: l().includes("top") ? -50 : 50,
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
- })), n(M, b);
429
+ })), i(u, w);
407
430
  };
408
- x(ne, (M) => {
409
- y(z) && M(ie);
431
+ p(ce, (u) => {
432
+ x(z) && u(de);
410
433
  });
411
434
  }
412
- n(u, K), N();
435
+ i(o, H), S();
413
436
  }
414
437
  export {
415
- Je as T,
416
- Oe as a
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
  };