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.
@@ -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 g, i as $, f as x, c as p, 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 xe, 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-DpVwziig.js";
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(f, e) {
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 u = Z(e, ["$$slots", "$$events", "$$legacy"]);
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(f, Q(
55
+ G(u, Q(
56
56
  { name: "info" },
57
- () => u,
57
+ () => m,
58
58
  {
59
59
  get iconNode() {
60
60
  return v;
61
61
  },
62
- children: (r, i) => {
63
- var o = B(), l = H(o);
64
- U(l, () => e.children ?? W), n(r, o);
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(f, e) {
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 u = Z(e, ["$$slots", "$$events", "$$legacy"]);
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(f, Q(
127
+ G(u, Q(
128
128
  { name: "triangle-alert" },
129
- () => u,
129
+ () => m,
130
130
  {
131
131
  get iconNode() {
132
132
  return v;
133
133
  },
134
- children: (r, i) => {
135
- var o = B(), l = H(o);
136
- U(l, () => e.children ?? W), n(r, o);
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 = x("<button><!></button>");
143
- function Je(f, e) {
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 u = c(e, "size", 8, "md"), v = c(e, "variant", 8, "default"), r = ee(!1);
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
- }, o = {
151
- default: "bg-surface-primary hover:bg-surface-secondary border border-primary shadow-adaptive-sm",
152
- minimal: "bg-transparent hover:bg-surface-secondary",
153
- outline: "bg-transparent border border-primary hover:bg-surface-secondary"
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"), y = window.matchMedia("(prefers-color-scheme: dark)").matches;
157
- D(r, a === "dark" || !a && y), j();
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(r, !g(r)), j(), localStorage.setItem("theme", g(r) ? "dark" : "light");
160
+ D(o, !y(o)), j(), localStorage.setItem("theme", y(o) ? "dark" : "light");
161
161
  }
162
162
  function j() {
163
- g(r) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
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 y = Ne();
170
- n(a, y);
169
+ var g = Ne();
170
+ n(a, g);
171
171
  }, z = (a) => {
172
- var y = Le();
173
- n(a, y);
172
+ var g = Le();
173
+ n(a, g);
174
174
  };
175
- p(L, (a) => {
176
- g(r) ? a(S) : a(z, !1);
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(u()), _(() => i[u()]) ?? ""}
182
- ${k(v()), _(() => o[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-primary
190
- hover:text-primary-600
189
+ text-text
190
+ hover:text-text
191
191
  focus:outline-none
192
192
  focus:ring-2
193
- focus:ring-primary-500
193
+ focus:ring-focus-ring
194
194
  focus:ring-offset-2
195
- focus:ring-offset-surface-primary
196
- `), V(h, "aria-label", g(r) ? "Switch to light mode" : "Switch to dark mode"), V(h, "title", g(r) ? "Switch to light mode" : "Switch to dark mode");
197
- }), E("click", h, l), n(f, h), 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 = x('<div class="flex-shrink-0 mr-3 svelte-ayjeya"><!></div>'), De = x('<h4 class="text-sm font-semibold mb-1 svelte-ayjeya"> </h4>'), Pe = x('<p class="text-sm opacity-90 svelte-ayjeya"> </p>'), Be = x('<button type="button" aria-label="Close notification"><!></button>'), He = x('<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 = x('<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>');
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(f, e) {
250
- I(e, !1), xe(f, Ke);
251
- let u = c(e, "id", 8, ""), v = c(e, "title", 8, ""), r = c(e, "message", 8, ""), i = c(e, "type", 8, "info"), o = c(
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 y = {
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: u() });
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(() => (o() > 0 && (a = setTimeout(
300
+ ae(() => (r() > 0 && (a = setTimeout(
301
301
  () => {
302
302
  C();
303
303
  },
304
- o()
304
+ r()
305
305
  )), document.addEventListener("keydown", A), () => {
306
306
  a && clearTimeout(a), document.removeEventListener("keydown", A);
307
307
  }));
308
- function re() {
308
+ function oe() {
309
309
  a && clearTimeout(a);
310
310
  }
311
- function oe() {
312
- o() > 0 && (a = setTimeout(
311
+ function re() {
312
+ r() > 0 && (a = setTimeout(
313
313
  () => {
314
314
  C();
315
315
  },
316
- o()
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(), m = d(s);
327
- ke(m, () => y[i()], (ge, pe) => {
328
- pe(ge, {
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
- p(F, (t) => {
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(), m = d(s);
344
- w(() => X(m, v())), n(t, s);
343
+ var s = De(), f = d(s);
344
+ w(() => X(f, v())), n(t, s);
345
345
  };
346
- p(O, (t) => {
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(), m = d(s);
354
- w(() => X(m, r())), n(t, s);
353
+ var s = Pe(), f = d(s);
354
+ w(() => X(f, o())), n(t, s);
355
355
  };
356
- p(R, (t) => {
357
- r() && t(ve);
356
+ x(R, (t) => {
357
+ o() && t(ve);
358
358
  });
359
359
  }
360
- var me = T(R, 2);
361
- be(me, e, "default", {}, null);
362
- var fe = T(J, 2);
360
+ var fe = T(R, 2);
361
+ be(fe, e, "default", {}, null);
362
+ var ue = T(J, 2);
363
363
  {
364
- var ue = (t) => {
365
- var s = Be(), m = d(s);
366
- Te(m, { size: 16 }), w(() => P(
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
- p(fe, (t) => {
378
- j() && t(ue);
377
+ x(ue, (t) => {
378
+ j() && t(me);
379
379
  });
380
380
  }
381
381
  var he = T(q, 2);
382
382
  {
383
- var ye = (t) => {
384
- var s = He(), m = d(s);
385
- w(() => ze(m, `animation-duration: ${o() ?? ""}ms;`)), n(t, s);
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
- p(he, (t) => {
388
- o() > 0 && t(ye);
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, re), E("mouseleave", b, oe), we(3, b, () => _e, () => ({
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
- p(ne, (M) => {
409
- g(z) && M(ie);
408
+ x(ne, (M) => {
409
+ y(z) && M(ie);
410
410
  });
411
411
  }
412
- n(f, K), N();
412
+ n(u, K), N();
413
413
  }
414
414
  export {
415
415
  Je as T,