zabi-components 4.0.0 → 5.0.1

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.
Files changed (89) hide show
  1. package/README.md +70 -2
  2. package/dist/SSRSafe.svelte +47 -0
  3. package/dist/SSRSafe.svelte.d.ts +11 -0
  4. package/dist/atoms/Badge.svelte +76 -0
  5. package/dist/atoms/Badge.svelte.d.ts +9 -0
  6. package/dist/atoms/Button.svelte +72 -0
  7. package/dist/atoms/Button.svelte.d.ts +13 -0
  8. package/dist/atoms/Card.svelte +59 -0
  9. package/dist/atoms/Card.svelte.d.ts +12 -0
  10. package/dist/atoms/Checkbox.svelte +60 -0
  11. package/dist/atoms/Checkbox.svelte.d.ts +10 -0
  12. package/dist/atoms/CodeBlock.svelte +125 -0
  13. package/dist/atoms/CodeBlock.svelte.d.ts +8 -0
  14. package/dist/atoms/ColorPicker.svelte +171 -0
  15. package/dist/atoms/ColorPicker.svelte.d.ts +9 -0
  16. package/dist/atoms/FeatureCard.svelte +74 -0
  17. package/dist/atoms/FeatureCard.svelte.d.ts +17 -0
  18. package/dist/atoms/Heading.svelte +5 -0
  19. package/dist/atoms/Heading.svelte.d.ts +7 -0
  20. package/dist/atoms/Input.svelte +98 -0
  21. package/dist/atoms/Input.svelte.d.ts +14 -0
  22. package/dist/atoms/OptimizedImage.svelte +32 -0
  23. package/dist/atoms/OptimizedImage.svelte.d.ts +13 -0
  24. package/dist/atoms/Progress.svelte +61 -0
  25. package/dist/atoms/Progress.svelte.d.ts +9 -0
  26. package/dist/atoms/Select.svelte +85 -0
  27. package/dist/atoms/Select.svelte.d.ts +16 -0
  28. package/dist/atoms/Skeleton.svelte +20 -0
  29. package/dist/atoms/Skeleton.svelte.d.ts +8 -0
  30. package/dist/atoms/Textarea.svelte +116 -0
  31. package/dist/atoms/Textarea.svelte.d.ts +14 -0
  32. package/dist/atoms/ThemeToggle.svelte +89 -0
  33. package/dist/atoms/ThemeToggle.svelte.d.ts +7 -0
  34. package/dist/atoms/Toast.svelte +58 -0
  35. package/dist/atoms/Toast.svelte.d.ts +9 -0
  36. package/dist/atoms/Toggle.svelte +94 -0
  37. package/dist/atoms/Toggle.svelte.d.ts +12 -0
  38. package/dist/atoms/Tooltip.svelte +188 -0
  39. package/dist/atoms/Tooltip.svelte.d.ts +12 -0
  40. package/dist/atoms/index.d.ts +4 -15
  41. package/dist/atoms/index.js +10 -664
  42. package/dist/components/atoms/index.d.ts +10 -0
  43. package/dist/components/atoms/index.d.ts.map +1 -0
  44. package/dist/components/index.d.ts +31 -0
  45. package/dist/components/index.d.ts.map +1 -0
  46. package/dist/components/molecules/index.d.ts +1 -0
  47. package/dist/components/molecules/index.d.ts.map +1 -0
  48. package/dist/components/organisms/index.d.ts +1 -0
  49. package/dist/components/organisms/index.d.ts.map +1 -0
  50. package/dist/index.d.ts +30 -15
  51. package/dist/index.js +74 -0
  52. package/dist/molecules/Alert.svelte +114 -0
  53. package/dist/molecules/Alert.svelte.d.ts +14 -0
  54. package/dist/molecules/ComponentDemo.svelte +96 -0
  55. package/dist/molecules/ComponentDemo.svelte.d.ts +13 -0
  56. package/dist/molecules/ContactForm.svelte +98 -0
  57. package/dist/molecules/ContactForm.svelte.d.ts +10 -0
  58. package/dist/molecules/Dropdown.svelte +128 -0
  59. package/dist/molecules/Dropdown.svelte.d.ts +11 -0
  60. package/dist/molecules/Form.svelte +37 -0
  61. package/dist/molecules/Form.svelte.d.ts +12 -0
  62. package/dist/molecules/ImageUpload.svelte +112 -0
  63. package/dist/molecules/ImageUpload.svelte.d.ts +14 -0
  64. package/dist/molecules/Modal.svelte +85 -0
  65. package/dist/molecules/Modal.svelte.d.ts +13 -0
  66. package/dist/molecules/SlideUp.svelte +73 -0
  67. package/dist/molecules/SlideUp.svelte.d.ts +12 -0
  68. package/dist/molecules/Tabs.svelte +68 -0
  69. package/dist/molecules/Tabs.svelte.d.ts +17 -0
  70. package/dist/molecules/index.d.ts +0 -11
  71. package/dist/molecules/index.js +2 -580
  72. package/dist/organisms/Navbar.svelte +99 -0
  73. package/dist/organisms/Navbar.svelte.d.ts +14 -0
  74. package/dist/organisms/Navigation.svelte +48 -0
  75. package/dist/organisms/Navigation.svelte.d.ts +15 -0
  76. package/dist/organisms/index.d.ts +0 -4
  77. package/dist/organisms/index.js +2 -104
  78. package/dist/routes/lib/ssr-safe.ts +57 -0
  79. package/dist/routes/lib/variant-utils.ts +98 -0
  80. package/dist/zabi-components.css +399 -1
  81. package/package.json +43 -18
  82. package/dist/CodeBlock-Bbv6JfD2.js +0 -422
  83. package/dist/ThemeToggle-Z2Ndc0if.js +0 -42
  84. package/dist/index/index.js +0 -51
  85. package/dist/molecules/KeyValueForm.types.d.ts +0 -11
  86. package/dist/props-BKbHJRuR.js +0 -2213
  87. package/dist/types/index.d.ts +0 -4
  88. package/dist/types/index.js +0 -1
  89. package/dist/vite.svg +0 -1
@@ -1,664 +1,10 @@
1
- import { p as t, x as ee, f as g, i as j, a as S, F as le, b as l, c as R, d as F, h as r, y as B, r as D, g as v, v as M, t as N, B as E, C as T, z as te, A as re, G as de, q as X, w as Y, H as G, I as H, J as ve, D as ce, e as be, s as ue } from "../props-BKbHJRuR.js";
2
- import { a as ge, f as oe } from "../CodeBlock-Bbv6JfD2.js";
3
- import { B as vt, C as ct, e as bt, I as ut, T as gt } from "../CodeBlock-Bbv6JfD2.js";
4
- import { T as mt } from "../ThemeToggle-Z2Ndc0if.js";
5
- var fe = g('<label class="block text-sm font-medium text-gray-700 mb-1"> </label>'), me = g("<option disabled> </option>"), he = g("<option> </option>"), pe = g("<div><!> <select><!><!></select></div>");
6
- function Qe(m, e) {
7
- F(e, !0);
8
- let a = t(e, "value", 7, void 0), o = t(e, "options", 19, () => []), i = t(e, "placeholder", 3, "Select an option"), c = t(e, "label", 3, ""), b = t(e, "disabled", 3, !1), f = t(e, "size", 3, "md"), _ = D(e, [
9
- "$$slots",
10
- "$$events",
11
- "$$legacy",
12
- "value",
13
- "options",
14
- "placeholder",
15
- "label",
16
- "disabled",
17
- "size"
18
- ]), y = ee(typeof window < "u" ? `select-${Math.random().toString(36).substr(2, 9)}` : `select-ssr-${Date.now()}`), p = M(() => ({
19
- sm: "px-3 py-1.5 text-sm",
20
- md: "px-4 py-2 text-sm",
21
- lg: "px-5 py-3 text-base"
22
- })), u = M(() => [
23
- "w-full border border-gray-300 rounded-md bg-white",
24
- "focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
25
- "disabled:opacity-50 disabled:cursor-not-allowed",
26
- v(p)[f()]
27
- ].join(" "));
28
- function n(k) {
29
- const w = k.target;
30
- a(w.value);
31
- }
32
- var s = pe(), d = r(s);
33
- {
34
- var h = (k) => {
35
- var w = fe(), I = r(w);
36
- N(() => {
37
- E(w, "for", y), T(I, c());
38
- }), l(k, w);
39
- };
40
- j(d, (k) => {
41
- c() && k(h);
42
- });
43
- }
44
- var x = B(d, 2);
45
- S(x, () => ({
46
- id: y,
47
- value: a(),
48
- disabled: b(),
49
- class: v(u),
50
- onchange: n,
51
- ..._
52
- }));
53
- var P = r(x);
54
- {
55
- var z = (k) => {
56
- var w = me(), I = r(w);
57
- w.value = w.__value = "", N(() => T(I, i())), l(k, w);
58
- };
59
- j(P, (k) => {
60
- i() && !a() && k(z);
61
- });
62
- }
63
- var C = B(P);
64
- le(C, 17, o, (k) => k.value, (k, w) => {
65
- var I = he(), V = r(I), q = {};
66
- N(() => {
67
- I.disabled = v(w).disabled, T(V, v(w).label), q !== (q = v(w).value) && (I.value = (I.__value = v(w).value) ?? "");
68
- }), l(k, I);
69
- }), l(m, s), R();
70
- }
71
- var xe = g('<span class="text-sm font-medium text-gray-700"> </span>'), we = g('<div class="flex items-center gap-3"><button><span></span></button> <!></div>');
72
- function We(m, e) {
73
- F(e, !0);
74
- let a = t(e, "checked", 7, !1), o = t(e, "disabled", 3, !1), i = t(e, "label", 3, ""), c = D(e, [
75
- "$$slots",
76
- "$$events",
77
- "$$legacy",
78
- "checked",
79
- "disabled",
80
- "label"
81
- ]), b = M(() => [
82
- "relative inline-flex w-11 h-6 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent",
83
- "transition-colors duration-200 ease-in-out",
84
- "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
85
- a() ? "bg-blue-600" : "bg-gray-200",
86
- o() ? "opacity-50 cursor-not-allowed" : ""
87
- ].join(" ")), f = M(() => [
88
- "pointer-events-none inline-block w-5 h-5 transform rounded-full bg-white shadow-lg",
89
- "transition duration-200 ease-in-out",
90
- a() ? "translate-x-5" : "translate-x-0"
91
- ].join(" "));
92
- function _(d) {
93
- o() || a(!a());
94
- }
95
- var y = we(), p = r(y);
96
- S(p, () => ({
97
- type: "button",
98
- role: "switch",
99
- "aria-checked": a(),
100
- "aria-label": i() || "Toggle",
101
- disabled: o(),
102
- onclick: _,
103
- class: v(b),
104
- ...c
105
- }));
106
- var u = r(p), n = B(p, 2);
107
- {
108
- var s = (d) => {
109
- var h = xe(), x = r(h);
110
- N(() => T(x, i())), l(d, h);
111
- };
112
- j(n, (d) => {
113
- i() && d(s);
114
- });
115
- }
116
- N(() => te(u, 1, re(v(f)))), l(m, y), R();
117
- }
118
- var _e = g('<label class="block text-sm font-medium text-gray-700"> </label>'), ye = g('<span class="text-white text-lg">✓</span>'), ze = g("<button><!></button>"), ke = g('<div class="space-y-2"><!> <div></div></div>');
119
- function Ze(m, e) {
120
- F(e, !0);
121
- let a = t(e, "value", 7, ""), o = t(e, "label", 3, ""), i = t(e, "disabled", 3, !1), c = D(e, [
122
- "$$slots",
123
- "$$events",
124
- "$$legacy",
125
- "value",
126
- "label",
127
- "disabled"
128
- ]);
129
- const b = [
130
- { label: "Red", value: "#ef4444" },
131
- { label: "Blue", value: "#3b82f6" },
132
- { label: "Green", value: "#10b981" },
133
- { label: "Yellow", value: "#f59e0b" },
134
- { label: "Purple", value: "#8b5cf6" },
135
- { label: "Pink", value: "#ec4899" },
136
- { label: "Gray", value: "#6b7280" },
137
- { label: "Black", value: "#000000" }
138
- ];
139
- let f = ee(typeof window < "u" ? `color-picker-${Math.random().toString(36).substr(2, 9)}` : `color-picker-ssr-${Date.now()}`);
140
- var _ = ke(), y = r(_);
141
- {
142
- var p = (n) => {
143
- var s = _e(), d = r(s);
144
- N(() => {
145
- E(s, "for", f), T(d, o());
146
- }), l(n, s);
147
- };
148
- j(y, (n) => {
149
- o() && n(p);
150
- });
151
- }
152
- var u = B(y, 2);
153
- S(u, () => ({
154
- id: f,
155
- class: "grid grid-cols-4 gap-2",
156
- role: "radiogroup",
157
- ...c
158
- })), le(u, 21, () => b, de, (n, s) => {
159
- var d = ze(), h = () => a(v(s).value);
160
- S(d, () => ({
161
- type: "button",
162
- class: `w-12 h-12 rounded-lg border-2 transition-all ${a() === v(s).value ? "border-blue-500 ring-2 ring-blue-200" : "border-gray-300 hover:border-gray-400"}`,
163
- style: `background-color: ${v(s).value ?? ""};`,
164
- onclick: h,
165
- disabled: i(),
166
- role: "radio",
167
- "aria-checked": a() === v(s).value,
168
- "aria-label": v(s).label,
169
- ...c
170
- }));
171
- var x = r(d);
172
- {
173
- var P = (z) => {
174
- var C = ye();
175
- l(z, C);
176
- };
177
- j(x, (z) => {
178
- a() === v(s).value && z(P);
179
- });
180
- }
181
- l(n, d);
182
- }), l(m, _), R();
183
- }
184
- var Ce = g('<img class="w-full h-48 object-cover rounded-md mb-4"/>'), Pe = g("<h3> </h3>"), Se = g("<div><!> <!> <!></div>");
185
- function $e(m, e) {
186
- F(e, !0);
187
- let a = t(e, "title", 3, ""), o = t(e, "image", 3, ""), i = t(e, "interactive", 3, !1), c = t(e, "variant", 3, "default"), b = t(e, "size", 3, "md"), f = D(e, [
188
- "$$slots",
189
- "$$events",
190
- "$$legacy",
191
- "title",
192
- "image",
193
- "interactive",
194
- "variant",
195
- "size",
196
- "children"
197
- ]), _ = M(() => ({ sm: "p-3", md: "p-4", lg: "p-6" })), y = M(() => ge(c())), p = M(() => [
198
- "rounded-lg transition-all duration-200",
199
- "hover:shadow-adaptive-md",
200
- i() ? "cursor-pointer hover:scale-[1.02]" : "",
201
- v(_)[b()],
202
- v(y)
203
- ].join(" ")), u = M(() => "text-lg font-semibold mb-2 text-primary");
204
- var n = Se();
205
- S(n, () => ({ class: v(p), ...f }));
206
- var s = r(n);
207
- {
208
- var d = (z) => {
209
- var C = Ce();
210
- N(() => {
211
- E(C, "src", o()), E(C, "alt", a());
212
- }), l(z, C);
213
- };
214
- j(s, (z) => {
215
- o() && z(d);
216
- });
217
- }
218
- var h = B(s, 2);
219
- {
220
- var x = (z) => {
221
- var C = Pe();
222
- te(C, 1, re(v(u)));
223
- var k = r(C);
224
- N(() => T(k, a())), l(z, C);
225
- };
226
- j(h, (z) => {
227
- a() && z(x);
228
- });
229
- }
230
- var P = B(h, 2);
231
- X(P, () => e.children ?? Y), l(m, n), R();
232
- }
233
- var Ne = g('<button><!> <span class="ml-1 text-xs">×</span></button>'), Te = g("<span><!></span>");
234
- function et(m, e) {
235
- F(e, !0);
236
- let a = t(e, "variant", 3, "default"), o = t(e, "size", 3, "md"), i = t(e, "closable", 3, !1);
237
- t(e, "className", 3, "");
238
- let c = D(e, [
239
- "$$slots",
240
- "$$events",
241
- "$$legacy",
242
- "variant",
243
- "size",
244
- "closable",
245
- "className",
246
- "children"
247
- ]);
248
- function b(d) {
249
- d.stopPropagation();
250
- }
251
- let f = M(() => ({
252
- sm: "px-2 py-0.5 text-xs",
253
- md: "px-3 py-1 text-sm",
254
- lg: "px-4 py-1.5 text-base"
255
- })), _ = M(() => ({
256
- default: "bg-gray-100 text-gray-800 border-gray-300",
257
- success: "bg-green-100 text-green-800 border-green-300",
258
- warning: "bg-yellow-100 text-yellow-800 border-yellow-300",
259
- error: "bg-red-100 text-red-800 border-red-300",
260
- info: "bg-blue-100 text-blue-800 border-blue-300"
261
- })), y = M(() => [
262
- "inline-flex items-center gap-1 font-medium border rounded-md",
263
- v(f)[o()],
264
- v(_)[a()],
265
- i() ? "cursor-pointer hover:opacity-80" : ""
266
- ].join(" "));
267
- var p = G(), u = H(p);
268
- {
269
- var n = (d) => {
270
- var h = Ne();
271
- S(h, () => ({
272
- type: "button",
273
- class: v(y),
274
- onclick: b,
275
- ...c
276
- }));
277
- var x = r(h);
278
- X(x, () => e.children ?? Y), l(d, h);
279
- }, s = (d) => {
280
- var h = Te();
281
- S(h, () => ({ class: v(y), ...c }));
282
- var x = r(h);
283
- X(x, () => e.children ?? Y), l(d, h);
284
- };
285
- j(u, (d) => {
286
- i() ? d(n) : d(s, !1);
287
- });
288
- }
289
- l(m, p), R();
290
- }
291
- var je = g("<h1> <!></h1>"), Be = g("<h2> <!></h2>"), Ie = g("<h3> <!></h3>"), Me = g("<h4> <!></h4>"), De = g("<h5> <!></h5>"), Xe = g("<h6> <!></h6>");
292
- function tt(m, e) {
293
- F(e, !0);
294
- let a = t(e, "level", 3, 1), o = t(e, "text", 3, ""), i = D(e, [
295
- "$$slots",
296
- "$$events",
297
- "$$legacy",
298
- "level",
299
- "text",
300
- "children"
301
- ]), c = M(() => ({
302
- 1: "text-4xl font-bold",
303
- 2: "text-3xl font-bold",
304
- 3: "text-2xl font-semibold",
305
- 4: "text-xl font-semibold",
306
- 5: "text-lg font-medium",
307
- 6: "text-base font-medium"
308
- })), b = M(() => ["text-gray-900", v(c)[a()]].join(" "));
309
- var f = G(), _ = H(f);
310
- {
311
- var y = (u) => {
312
- var n = je();
313
- S(n, () => ({ class: v(b), ...i }));
314
- var s = r(n), d = B(s);
315
- X(d, () => e.children ?? Y), N(() => T(s, o())), l(u, n);
316
- }, p = (u) => {
317
- var n = G(), s = H(n);
318
- {
319
- var d = (x) => {
320
- var P = Be();
321
- S(P, () => ({ class: v(b), ...i }));
322
- var z = r(P), C = B(z);
323
- X(C, () => e.children ?? Y), N(() => T(z, o())), l(x, P);
324
- }, h = (x) => {
325
- var P = G(), z = H(P);
326
- {
327
- var C = (w) => {
328
- var I = Ie();
329
- S(I, () => ({ class: v(b), ...i }));
330
- var V = r(I), q = B(V);
331
- X(q, () => e.children ?? Y), N(() => T(V, o())), l(w, I);
332
- }, k = (w) => {
333
- var I = G(), V = H(I);
334
- {
335
- var q = (A) => {
336
- var J = Me();
337
- S(J, () => ({ class: v(b), ...i }));
338
- var K = r(J), Q = B(K);
339
- X(Q, () => e.children ?? Y), N(() => T(K, o())), l(A, J);
340
- }, ie = (A) => {
341
- var J = G(), K = H(J);
342
- {
343
- var Q = (O) => {
344
- var U = De();
345
- S(U, () => ({ class: v(b), ...i }));
346
- var L = r(U), W = B(L);
347
- X(W, () => e.children ?? Y), N(() => T(L, o())), l(O, U);
348
- }, se = (O) => {
349
- var U = G(), L = H(U);
350
- {
351
- var W = (Z) => {
352
- var $ = Xe();
353
- S($, () => ({ class: v(b), ...i }));
354
- var ae = r($), ne = B(ae);
355
- X(ne, () => e.children ?? Y), N(() => T(ae, o())), l(Z, $);
356
- };
357
- j(
358
- L,
359
- (Z) => {
360
- a() === 6 && Z(W);
361
- },
362
- !0
363
- );
364
- }
365
- l(O, U);
366
- };
367
- j(
368
- K,
369
- (O) => {
370
- a() === 5 ? O(Q) : O(se, !1);
371
- },
372
- !0
373
- );
374
- }
375
- l(A, J);
376
- };
377
- j(
378
- V,
379
- (A) => {
380
- a() === 4 ? A(q) : A(ie, !1);
381
- },
382
- !0
383
- );
384
- }
385
- l(w, I);
386
- };
387
- j(
388
- z,
389
- (w) => {
390
- a() === 3 ? w(C) : w(k, !1);
391
- },
392
- !0
393
- );
394
- }
395
- l(x, P);
396
- };
397
- j(
398
- s,
399
- (x) => {
400
- a() === 2 ? x(d) : x(h, !1);
401
- },
402
- !0
403
- );
404
- }
405
- l(u, n);
406
- };
407
- j(_, (u) => {
408
- a() === 1 ? u(y) : u(p, !1);
409
- });
410
- }
411
- l(m, f), R();
412
- }
413
- var Ye = g('<div class="flex justify-between items-center mb-2"><label class="text-sm font-medium text-gray-700"> </label> <span class="text-sm text-gray-500"> </span></div>'), Ge = g('<div><!> <div><div class="h-full bg-blue-600 rounded-full"></div></div></div>');
414
- function at(m, e) {
415
- F(e, !0);
416
- let a = t(e, "value", 3, 0), o = t(e, "max", 3, 100), i = t(e, "size", 3, "md"), c = t(e, "label", 3, ""), b = D(e, [
417
- "$$slots",
418
- "$$events",
419
- "$$legacy",
420
- "value",
421
- "max",
422
- "size",
423
- "label"
424
- ]), f = ee(typeof window < "u" ? `progress-${Math.random().toString(36).substr(2, 9)}` : `progress-ssr-${Date.now()}`), _ = M(() => Math.min(Math.max(a() / o() * 100, 0), 100)), y = M(() => ({ sm: "h-1", md: "h-2", lg: "h-3" }));
425
- var p = Ge(), u = r(p);
426
- {
427
- var n = (h) => {
428
- var x = Ye(), P = r(x), z = r(P), C = B(P, 2), k = r(C);
429
- N(
430
- (w) => {
431
- E(P, "for", f), T(z, c()), T(k, `${w ?? ""}%`);
432
- },
433
- [() => Math.round(v(_))]
434
- ), l(h, x);
435
- };
436
- j(u, (h) => {
437
- c() && h(n);
438
- });
439
- }
440
- var s = B(u, 2);
441
- S(s, () => ({
442
- id: f,
443
- class: `w-full bg-gray-200 rounded-full overflow-hidden ${v(y)[i()] ?? ""}`,
444
- role: "progressbar",
445
- "aria-valuenow": a(),
446
- "aria-valuemin": "0",
447
- "aria-valuemax": o(),
448
- ...b
449
- }));
450
- var d = r(s);
451
- N(() => ve(d, `width: ${v(_) ?? ""}%`)), l(m, p), R();
452
- }
453
- var He = g("<div></div>");
454
- function lt(m, e) {
455
- let a = t(e, "width", 3, "100%"), o = t(e, "height", 3, "1rem"), i = t(e, "className", 3, ""), c = D(e, [
456
- "$$slots",
457
- "$$events",
458
- "$$legacy",
459
- "width",
460
- "height",
461
- "className",
462
- "children"
463
- ]);
464
- var b = He();
465
- S(b, () => ({
466
- class: `animate-pulse bg-gray-200 rounded ${i() ?? ""}`,
467
- style: `width: ${a() ?? ""}; height: ${o() ?? ""};`,
468
- ...c
469
- })), l(m, b);
470
- }
471
- function Re(m, e) {
472
- ue(e, !1);
473
- }
474
- var Fe = g('<button type="button" class="ml-3 text-gray-400 hover:text-gray-600" aria-label="Close notification">×</button>'), Ve = g('<div><div class="flex items-start"><div class="flex-1"><p> </p></div> <!></div></div>');
475
- function rt(m, e) {
476
- let a = t(e, "message", 3, ""), o = t(e, "type", 3, "info"), i = t(e, "closable", 3, !0), c = D(e, [
477
- "$$slots",
478
- "$$events",
479
- "$$legacy",
480
- "message",
481
- "type",
482
- "closable",
483
- "children"
484
- ]), b = be(!0);
485
- const f = {
486
- success: "bg-green-100 border-green-300 text-green-800",
487
- error: "bg-red-100 border-red-300 text-red-800",
488
- warning: "bg-yellow-100 border-yellow-300 text-yellow-800",
489
- info: "bg-blue-100 border-blue-300 text-blue-800"
490
- };
491
- var _ = G(), y = H(_);
492
- {
493
- var p = (u) => {
494
- var n = Ve();
495
- S(n, () => ({
496
- class: "fixed top-4 right-4 max-w-sm w-full bg-white border rounded-lg shadow-lg p-4 z-50",
497
- role: "alert",
498
- ...c
499
- }));
500
- var s = r(n), d = r(s), h = r(d), x = r(h), P = B(d, 2);
501
- {
502
- var z = (C) => {
503
- var k = Fe();
504
- k.__click = [Re, b], l(C, k);
505
- };
506
- j(P, (C) => {
507
- i() && C(z);
508
- });
509
- }
510
- N(() => {
511
- te(h, 1, `text-sm ${f[o()] ?? ""}`), T(x, a());
512
- }), l(u, n);
513
- };
514
- j(y, (u) => {
515
- v(b) && u(p);
516
- });
517
- }
518
- l(m, _);
519
- }
520
- ce(["click"]);
521
- var qe = g('<div class="tooltip group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible svelte-13nzt82" role="tooltip" aria-hidden="true"> </div>'), Ae = g("<div><!> <!></div>");
522
- const Je = {
523
- hash: "svelte-13nzt82",
524
- code: `:root {--tooltip-bg: #1f2937;--tooltip-color: white;--tooltip-padding: 0.5rem 0.75rem;--tooltip-radius: 0.375rem;--tooltip-font-size: 0.875rem;--tooltip-line-height: 1.25rem;--tooltip-max-width: 200px;--tooltip-gap: 0.5rem;--tooltip-arrow-size: 4px;--tooltip-transition: opacity 0.2s ease-in-out,
525
- visibility 0.2s ease-in-out;}.tooltip-container.svelte-13nzt82 {position:relative;display:inline-block;}.tooltip.svelte-13nzt82 {position:absolute;z-index:50;padding:var(--tooltip-padding);background-color:var(--tooltip-bg);color:var(--tooltip-color);border-radius:var(--tooltip-radius);font-size:var(--tooltip-font-size);line-height:var(--tooltip-line-height);max-width:var(--tooltip-max-width);white-space:normal;word-wrap:break-word;opacity:0;visibility:hidden;transition:var(--tooltip-transition);pointer-events:none;
526
- /* Use logical properties for better internationalization */inset-inline-start:50%;inset-block-start:50%;transform:translate(-50%, -50%);}
527
-
528
- /* Simplified positioning using CSS custom properties and logical properties */.tooltip-container[data-placement="top"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {inset-block-end:100%;inset-inline-start:50%;transform:translateX(-50%);margin-block-end:var(--tooltip-gap);}.tooltip-container[data-placement="bottom"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {inset-block-start:100%;inset-inline-start:50%;transform:translateX(-50%);margin-block-start:var(--tooltip-gap);}.tooltip-container[data-placement="left"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {inset-inline-end:100%;inset-block-start:50%;transform:translateY(-50%);margin-inline-end:var(--tooltip-gap);}.tooltip-container[data-placement="right"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {inset-inline-start:100%;inset-block-start:50%;transform:translateY(-50%);margin-inline-start:var(--tooltip-gap);}
529
-
530
- /* Modern arrow implementation using CSS clip-path for better performance */.tooltip.svelte-13nzt82::before {content:"";position:absolute;width:calc(var(--tooltip-arrow-size) * 2);height:calc(var(--tooltip-arrow-size) * 2);background-color:var(--tooltip-bg);}.tooltip-container[data-placement="top"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {inset-block-start:100%;inset-inline-start:50%;transform:translateX(-50%);clip-path:polygon(50% 100%, 0 0, 100% 0);}.tooltip-container[data-placement="bottom"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {inset-block-end:100%;inset-inline-start:50%;transform:translateX(-50%);clip-path:polygon(0 100%, 50% 0, 100% 100%);}.tooltip-container[data-placement="left"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {inset-inline-start:100%;inset-block-start:50%;transform:translateY(-50%);clip-path:polygon(0 50%, 100% 0, 100% 100%);}.tooltip-container[data-placement="right"].svelte-13nzt82 .tooltip:where(.svelte-13nzt82)::before {inset-inline-end:100%;inset-block-start:50%;transform:translateY(-50%);clip-path:polygon(0 0, 100% 50%, 0 100%);}
531
-
532
- /* Delay support using CSS custom properties */.tooltip-container[data-delay].svelte-13nzt82 .tooltip:where(.svelte-13nzt82) {transition-delay:calc(var(--tooltip-delay, 0) * 1ms);}
533
-
534
- /* Responsive design with modern CSS */
535
- @media (max-width: 640px) {.tooltip.svelte-13nzt82 {--tooltip-max-width: calc(100vw - 2rem);inset-inline-start:50% !important;inset-inline-end:auto !important;transform:translateX(-50%) !important;margin:var(--tooltip-gap) 0 !important;}.tooltip.svelte-13nzt82::before {display:none;}
536
- }
537
-
538
- /* Dark mode support */
539
- @media (prefers-color-scheme: dark) {:root {--tooltip-bg: #374151;}
540
- }
541
-
542
- /* High contrast mode support */
543
- @media (prefers-contrast: high) {:root {--tooltip-bg: #000000;--tooltip-color: #ffffff;}
544
- }
545
-
546
- /* Reduced motion support */
547
- @media (prefers-reduced-motion: reduce) {.tooltip.svelte-13nzt82 {transition:none;}
548
- }`
549
- };
550
- function ot(m, e) {
551
- oe(m, Je);
552
- let a = t(e, "content", 3, ""), o = t(e, "placement", 3, "top"), i = t(e, "delay", 3, 0), c = t(e, "disabled", 3, !1), b = D(e, [
553
- "$$slots",
554
- "$$events",
555
- "$$legacy",
556
- "content",
557
- "placement",
558
- "delay",
559
- "disabled",
560
- "children"
561
- ]);
562
- var f = Ae();
563
- S(
564
- f,
565
- () => ({
566
- class: "tooltip-container group relative inline-block",
567
- "data-placement": o(),
568
- "data-delay": i(),
569
- "data-disabled": c(),
570
- ...b
571
- }),
572
- void 0,
573
- void 0,
574
- "svelte-13nzt82"
575
- );
576
- var _ = r(f);
577
- X(_, () => e.children ?? Y);
578
- var y = B(_, 2);
579
- {
580
- var p = (u) => {
581
- var n = qe(), s = r(n);
582
- N(() => T(s, a())), l(u, n);
583
- };
584
- j(y, (u) => {
585
- a() && !c() && u(p);
586
- });
587
- }
588
- l(m, f);
589
- }
590
- var Oe = g("<img/>");
591
- function it(m, e) {
592
- let a = t(e, "alt", 3, ""), o = t(e, "width", 3, "100%"), i = t(e, "height", 3, "auto"), c = t(e, "className", 3, ""), b = D(e, [
593
- "$$slots",
594
- "$$events",
595
- "$$legacy",
596
- "src",
597
- "alt",
598
- "width",
599
- "height",
600
- "className",
601
- "children"
602
- ]);
603
- var f = Oe();
604
- S(f, () => ({
605
- src: e.src,
606
- alt: a(),
607
- class: `w-full h-auto object-cover ${c() ?? ""}`,
608
- style: `width: ${(typeof o() == "number" ? o() + "px" : o()) ?? ""}; height: ${(typeof i() == "number" ? i() + "px" : i()) ?? ""};`,
609
- loading: "lazy",
610
- ...b
611
- })), l(m, f);
612
- }
613
- var Ue = g('<div><div class="flex items-start gap-4"><div class="flex-shrink-0 text-2xl" aria-hidden="true"> </div> <div class="flex-1 min-w-0"><h3 class="text-lg font-semibold text-text mb-2"> </h3> <p class="text-text-secondary leading-relaxed"> </p></div></div></div>');
614
- const Ee = {
615
- hash: "svelte-ecbnw5",
616
- code: ".feature-card.svelte-ecbnw5:hover {--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}"
617
- };
618
- function st(m, e) {
619
- oe(m, Ee);
620
- let a = t(e, "icon", 3, "✨"), o = t(e, "className", 3, ""), i = D(e, [
621
- "$$slots",
622
- "$$events",
623
- "$$legacy",
624
- "icon",
625
- "title",
626
- "description",
627
- "className"
628
- ]);
629
- var c = Ue();
630
- S(
631
- c,
632
- () => ({
633
- class: `feature-card p-6 rounded-lg bg-surface border border-border hover:border-primary/20 transition-colors duration-200 ${o() ?? ""}`,
634
- ...i
635
- }),
636
- void 0,
637
- void 0,
638
- "svelte-ecbnw5"
639
- );
640
- var b = r(c), f = r(b), _ = r(f), y = B(f, 2), p = r(y), u = r(p), n = B(p, 2), s = r(n);
641
- N(() => {
642
- T(_, a()), T(u, e.title), T(s, e.description);
643
- }), l(m, c);
644
- }
645
- export {
646
- et as Badge,
647
- vt as Button,
648
- $e as Card,
649
- ct as Checkbox,
650
- bt as CodeBlock,
651
- Ze as ColorPicker,
652
- st as FeatureCard,
653
- tt as Heading,
654
- ut as Input,
655
- it as OptimizedImage,
656
- at as Progress,
657
- Qe as Select,
658
- lt as Skeleton,
659
- gt as Textarea,
660
- mt as ThemeToggle,
661
- rt as Toast,
662
- We as Toggle,
663
- ot as Tooltip
664
- };
1
+ // Export atom components - All SSR-safe components
2
+ export { default as Toggle } from './Toggle.svelte';
3
+ export { default as Badge } from './Badge.svelte';
4
+ export { default as Button } from './Button.svelte';
5
+ export { default as Card } from './Card.svelte';
6
+ export { default as Input } from './Input.svelte';
7
+ export { default as Textarea } from './Textarea.svelte';
8
+ export { default as Select } from './Select.svelte';
9
+ export { default as ColorPicker } from './ColorPicker.svelte';
10
+ export { default as Heading } from './Heading.svelte';
@@ -0,0 +1,10 @@
1
+ export { default as Toggle } from './Toggle.svelte';
2
+ export { default as Badge } from './Badge.svelte';
3
+ export { default as Button } from './Button.svelte';
4
+ export { default as Card } from './Card.svelte';
5
+ export { default as Input } from './Input.svelte';
6
+ export { default as Textarea } from './Textarea.svelte';
7
+ export { default as Select } from './Select.svelte';
8
+ export { default as ColorPicker } from './ColorPicker.svelte';
9
+ export { default as Heading } from './Heading.svelte';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC"}