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,422 +0,0 @@
1
- import { t as V, j as O, k as Q, l as W, m as X, n as T, o as Y, p as t, f as k, a as D, q as Z, b as x, c as S, d as q, r as P, g as m, v as y, w as $, h, x as F, i as I, y as N, z as H, A as G, B as L, C as R, D as ee, e as ae, s as U, E as J } from "./props-BKbHJRuR.js";
2
- function te(r, e, a = !1, o = !1, i = !1) {
3
- var u = r, d = "";
4
- V(() => {
5
- var s = (
6
- /** @type {Effect} */
7
- O
8
- );
9
- if (d !== (d = e() ?? "") && (s.nodes_start !== null && (Q(
10
- s.nodes_start,
11
- /** @type {TemplateNode} */
12
- s.nodes_end
13
- ), s.nodes_start = s.nodes_end = null), d !== "")) {
14
- var n = d + "";
15
- a ? n = `<svg>${n}</svg>` : o && (n = `<math>${n}</math>`);
16
- var l = W(n);
17
- if ((a || o) && (l = /** @type {Element} */
18
- T(l)), X(
19
- /** @type {TemplateNode} */
20
- T(l),
21
- /** @type {TemplateNode} */
22
- l.lastChild
23
- ), a || o)
24
- for (; T(l); )
25
- u.before(
26
- /** @type {Node} */
27
- T(l)
28
- );
29
- else
30
- u.before(l);
31
- }
32
- });
33
- }
34
- function re(r, e) {
35
- Y(() => {
36
- var a = r.getRootNode(), o = (
37
- /** @type {ShadowRoot} */
38
- a.host ? (
39
- /** @type {ShadowRoot} */
40
- a
41
- ) : (
42
- /** @type {Document} */
43
- a.head ?? /** @type {Document} */
44
- a.ownerDocument.head
45
- )
46
- );
47
- if (!o.querySelector("#" + e.hash)) {
48
- const i = document.createElement("style");
49
- i.id = e.hash, i.textContent = e.code, o.appendChild(i);
50
- }
51
- });
52
- }
53
- var oe = k("<button><!></button>");
54
- function ye(r, e) {
55
- q(e, !0);
56
- let a = t(e, "variant", 3, "primary"), o = t(e, "size", 3, "md"), i = t(e, "disabled", 3, !1), u = t(e, "type", 3, "button"), d = t(e, "className", 3, ""), s = P(e, [
57
- "$$slots",
58
- "$$events",
59
- "$$legacy",
60
- "variant",
61
- "size",
62
- "disabled",
63
- "type",
64
- "className",
65
- "children"
66
- ]), n = y(() => ({
67
- sm: "px-3 py-1.5 text-sm font-medium",
68
- md: "px-4 py-2 text-sm font-medium",
69
- lg: "px-6 py-3 text-base font-semibold"
70
- })), l = y(() => ({
71
- primary: "bg-gray-100 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:bg-blue-400",
72
- secondary: "bg-gray-600 text-white hover:bg-gray-700 active:bg-gray-800 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:bg-gray-400",
73
- danger: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:ring-red-500 focus:ring-offset-2 disabled:bg-red-400",
74
- success: "bg-green-600 text-white hover:bg-green-700 active:bg-green-800 focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:bg-green-400",
75
- ghost: "bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:text-gray-400",
76
- brand: "bg-purple-600 text-white hover:bg-purple-700 active:bg-purple-800 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 disabled:bg-purple-400"
77
- })), p = y(() => [
78
- "inline-flex items-center justify-center rounded-md transition-all duration-200",
79
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none",
80
- "focus:outline-none focus:ring-2 focus:ring-offset-2",
81
- "active:scale-95 transform-gpu",
82
- "shadow-sm hover:shadow-md",
83
- m(n)[o()],
84
- m(l)[a()],
85
- d()
86
- ].filter(Boolean).join(" "));
87
- var c = oe();
88
- D(c, () => ({
89
- type: u(),
90
- class: m(p),
91
- disabled: i(),
92
- ...s
93
- }));
94
- var w = h(c);
95
- Z(w, () => e.children ?? $), x(r, c), S();
96
- }
97
- function K(r) {
98
- const e = {
99
- default: "border-gray-300 focus:border-blue-500 focus:ring-blue-500",
100
- success: "border-green-300 focus:border-green-500 focus:ring-green-500",
101
- warning: "border-yellow-300 focus:border-yellow-500 focus:ring-yellow-500",
102
- error: "border-red-300 focus:border-red-500 focus:ring-red-500",
103
- info: "border-blue-300 focus:border-blue-500 focus:ring-blue-500"
104
- };
105
- return e[r] || e.default;
106
- }
107
- function xe(r) {
108
- const e = {
109
- default: "border-gray-200 bg-white",
110
- success: "border-green-200 bg-green-50",
111
- warning: "border-yellow-200 bg-yellow-50",
112
- error: "border-red-200 bg-red-50",
113
- info: "border-blue-200 bg-blue-50"
114
- };
115
- return e[r] || e.default;
116
- }
117
- function E(r, e) {
118
- var o;
119
- const a = {
120
- default: {
121
- border: "border-gray-300",
122
- text: "text-gray-900",
123
- bg: "bg-white"
124
- },
125
- success: {
126
- border: "border-green-300",
127
- text: "text-green-900",
128
- bg: "bg-green-50"
129
- },
130
- warning: {
131
- border: "border-yellow-300",
132
- text: "text-yellow-900",
133
- bg: "bg-yellow-50"
134
- },
135
- error: {
136
- border: "border-red-300",
137
- text: "text-red-900",
138
- bg: "bg-red-50"
139
- },
140
- info: {
141
- border: "border-blue-300",
142
- text: "text-blue-900",
143
- bg: "bg-blue-50"
144
- }
145
- };
146
- return ((o = a[r]) == null ? void 0 : o[e]) || a.default[e];
147
- }
148
- function pe(r) {
149
- return {
150
- border: E(r, "border"),
151
- text: E(r, "text"),
152
- bg: E(r, "bg")
153
- };
154
- }
155
- function we(r, e) {
156
- return r.reduce((a, o) => (a[o] = `${e}-${o}`, a), {});
157
- }
158
- var se = k("<label> </label>"), le = k("<div><!> <input/></div>");
159
- function _e(r, e) {
160
- q(e, !0);
161
- let a = t(e, "value", 7, ""), o = t(e, "type", 3, "text"), i = t(e, "name", 3, ""), u = t(e, "label", 3, ""), d = t(e, "placeholder", 3, ""), s = t(e, "disabled", 3, !1), n = t(e, "size", 3, "md"), l = t(e, "variant", 3, "default"), p = P(e, [
162
- "$$slots",
163
- "$$events",
164
- "$$legacy",
165
- "value",
166
- "type",
167
- "name",
168
- "label",
169
- "placeholder",
170
- "disabled",
171
- "size",
172
- "variant",
173
- "oninput"
174
- ]), c = F(typeof window < "u" ? `input-${Math.random().toString(36).substr(2, 9)}` : `input-ssr-${Date.now()}`), w = y(() => ({
175
- sm: "px-3 py-1.5 text-sm",
176
- md: "px-4 py-2 text-sm",
177
- lg: "px-5 py-3 text-base"
178
- })), C = y(() => K(l())), g = y(() => [
179
- "w-full rounded-md transition-colors duration-200",
180
- "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
181
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
182
- m(w)[n()],
183
- m(C)
184
- ].join(" ")), b = y(() => "block text-sm font-medium text-primary mb-1");
185
- function z(f) {
186
- const v = f.target;
187
- a(v.value), e.oninput && e.oninput(f);
188
- }
189
- var M = le(), j = h(M);
190
- {
191
- var _ = (f) => {
192
- var v = se();
193
- H(v, 1, G(m(b)));
194
- var A = h(v);
195
- V(() => {
196
- L(v, "for", c), R(A, u());
197
- }), x(f, v);
198
- };
199
- I(j, (f) => {
200
- u() && f(_);
201
- });
202
- }
203
- var B = N(j, 2);
204
- D(
205
- B,
206
- () => ({
207
- id: c,
208
- type: o(),
209
- name: i(),
210
- value: a(),
211
- placeholder: d(),
212
- disabled: s(),
213
- class: m(g),
214
- oninput: z,
215
- ...p
216
- }),
217
- void 0,
218
- void 0,
219
- void 0,
220
- !0
221
- ), x(r, M), S();
222
- }
223
- var ne = k("<label> </label>"), ie = k("<div><!> <textarea></textarea></div>");
224
- function ke(r, e) {
225
- q(e, !0);
226
- let a = t(e, "value", 7, ""), o = t(e, "name", 3, ""), i = t(e, "label", 3, ""), u = t(e, "placeholder", 3, ""), d = t(e, "disabled", 3, !1), s = t(e, "rows", 3, 4), n = t(e, "size", 3, "md"), l = t(e, "variant", 3, "default"), p = P(e, [
227
- "$$slots",
228
- "$$events",
229
- "$$legacy",
230
- "value",
231
- "name",
232
- "label",
233
- "placeholder",
234
- "disabled",
235
- "rows",
236
- "size",
237
- "variant",
238
- "oninput"
239
- ]), c = F(typeof window < "u" ? `textarea-${Math.random().toString(36).substr(2, 9)}` : `textarea-ssr-${Date.now()}`), w = y(() => ({
240
- sm: "px-3 py-1.5 text-sm",
241
- md: "px-4 py-2 text-sm",
242
- lg: "px-5 py-3 text-base"
243
- })), C = y(() => K(l())), g = y(() => [
244
- "w-full rounded-md transition-colors duration-200",
245
- "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
246
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
247
- "resize-y",
248
- m(w)[n()],
249
- m(C)
250
- ].join(" ")), b = y(() => "block text-sm font-medium text-primary mb-1");
251
- function z(f) {
252
- const v = f.target;
253
- a(v.value), e.oninput && e.oninput(f);
254
- }
255
- var M = ie(), j = h(M);
256
- {
257
- var _ = (f) => {
258
- var v = ne();
259
- H(v, 1, G(m(b)));
260
- var A = h(v);
261
- V(() => {
262
- L(v, "for", c), R(A, i());
263
- }), x(f, v);
264
- };
265
- I(j, (f) => {
266
- i() && f(_);
267
- });
268
- }
269
- var B = N(j, 2);
270
- D(B, () => ({
271
- id: c,
272
- name: o(),
273
- value: a(),
274
- placeholder: u(),
275
- disabled: d(),
276
- rows: s(),
277
- class: m(g),
278
- oninput: z,
279
- ...p
280
- })), x(r, M), S();
281
- }
282
- var de = k('<label class="text-sm font-medium cursor-pointer"> </label>'), ue = k('<div class="flex items-center gap-2"><input/> <!></div>');
283
- function Ce(r, e) {
284
- q(e, !0);
285
- let a = t(e, "checked", 7, !1), o = t(e, "name", 3, ""), i = t(e, "disabled", 3, !1), u = t(e, "label", 3, ""), d = P(e, [
286
- "$$slots",
287
- "$$events",
288
- "$$legacy",
289
- "checked",
290
- "name",
291
- "disabled",
292
- "label"
293
- ]), s = F(typeof window < "u" ? `checkbox-${Math.random().toString(36).substr(2, 9)}` : `checkbox-ssr-${Date.now()}`), n = y(() => [
294
- "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded",
295
- "focus:ring-blue-500 focus:ring-2",
296
- "disabled:opacity-50 disabled:cursor-not-allowed"
297
- ].join(" "));
298
- function l(g) {
299
- const b = g.target;
300
- a(b.checked);
301
- }
302
- var p = ue(), c = h(p);
303
- D(
304
- c,
305
- () => ({
306
- type: "checkbox",
307
- id: s,
308
- name: o(),
309
- checked: a(),
310
- disabled: i(),
311
- class: m(n),
312
- onchange: l,
313
- ...d
314
- }),
315
- void 0,
316
- void 0,
317
- void 0,
318
- !0
319
- );
320
- var w = N(c, 2);
321
- {
322
- var C = (g) => {
323
- var b = de(), z = h(b);
324
- V(() => {
325
- L(b, "for", s), R(z, u());
326
- }), x(g, b);
327
- };
328
- I(w, (g) => {
329
- u() && g(C);
330
- });
331
- }
332
- x(r, p), S();
333
- }
334
- async function ce(r, e, a) {
335
- try {
336
- await navigator.clipboard.writeText(e.code), U(a, !0), setTimeout(
337
- () => {
338
- U(a, !1);
339
- },
340
- 2e3
341
- );
342
- } catch (o) {
343
- console.error("Failed to copy code:", o);
344
- }
345
- }
346
- var ge = J('<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg> Copied!', 1), be = J('<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg> Copy', 1), fe = k('<button class="flex items-center gap-2 px-3 py-1 text-xs text-gray-300 hover:text-white hover:bg-gray-700 rounded transition-colors duration-200" aria-label="Copy code to clipboard"><!></button>'), ve = k('<div><div class="flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <div class="w-3 h-3 rounded-full bg-yellow-500"></div> <div class="w-3 h-3 rounded-full bg-green-500"></div></div> <!></div> <pre class="p-4 overflow-x-auto text-sm text-gray-100 leading-relaxed"><code><!></code></pre></div>');
347
- const me = {
348
- hash: "svelte-1dmazsz",
349
- code: `.code-block.svelte-1dmazsz {font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;}
350
-
351
- /* Basic syntax highlighting for common languages */.language-svelte .token.tag,
352
- .language-html .token.tag {color:#f92672;}.language-svelte .token.attr-name,
353
- .language-html .token.attr-name {color:#a6e22e;}.language-svelte .token.attr-value,
354
- .language-html .token.attr-value {color:#e6db74;}.language-javascript .token.keyword,
355
- .language-typescript .token.keyword {color:#66d9ef;}.language-javascript .token.string,
356
- .language-typescript .token.string {color:#e6db74;}.language-javascript .token.function,
357
- .language-typescript .token.function {color:#a6e22e;}`
358
- };
359
- function ze(r, e) {
360
- re(r, me);
361
- let a = t(e, "language", 3, "svelte"), o = t(e, "className", 3, ""), i = t(e, "showCopyButton", 3, !0), u = P(e, [
362
- "$$slots",
363
- "$$events",
364
- "$$legacy",
365
- "code",
366
- "language",
367
- "className",
368
- "showCopyButton"
369
- ]), d = ae(!1);
370
- var s = ve();
371
- D(
372
- s,
373
- () => ({
374
- class: `code-block relative bg-gray-900 rounded-lg overflow-hidden ${o() ?? ""}`,
375
- ...u
376
- }),
377
- void 0,
378
- void 0,
379
- "svelte-1dmazsz"
380
- );
381
- var n = h(s), l = N(h(n), 2);
382
- {
383
- var p = (g) => {
384
- var b = fe();
385
- b.__click = [ce, e, d];
386
- var z = h(b);
387
- {
388
- var M = (_) => {
389
- var B = ge();
390
- x(_, B);
391
- }, j = (_) => {
392
- var B = be();
393
- x(_, B);
394
- };
395
- I(z, (_) => {
396
- m(d) ? _(M) : _(j, !1);
397
- });
398
- }
399
- x(g, b);
400
- };
401
- I(l, (g) => {
402
- i() && g(p);
403
- });
404
- }
405
- var c = N(n, 2), w = h(c), C = h(w);
406
- te(C, () => e.code), V(() => H(w, 1, `language-${a() ?? ""}`, "svelte-1dmazsz")), x(r, s);
407
- }
408
- ee(["click"]);
409
- export {
410
- ye as B,
411
- Ce as C,
412
- _e as I,
413
- ke as T,
414
- xe as a,
415
- E as b,
416
- pe as c,
417
- we as d,
418
- ze as e,
419
- re as f,
420
- K as g,
421
- te as h
422
- };
@@ -1,42 +0,0 @@
1
- import { p as h, u as v, f as l, a as b, i as k, b as n, c as y, d as _, s as S, e as T, g as i, r as w, h as x } from "./props-BKbHJRuR.js";
2
- var D = l('<span class="text-lg">☀️</span>'), E = l('<span class="text-lg">🌙</span>'), I = l("<button><!></button>");
3
- function j(d, s) {
4
- _(s, !0);
5
- let t = h(s, "isDark", 7, !1), f = w(s, ["$$slots", "$$events", "$$legacy", "isDark"]), o = T(!1);
6
- v(() => {
7
- if (S(o, !0), typeof localStorage < "u") {
8
- const e = localStorage.getItem("theme"), a = window.matchMedia("(prefers-color-scheme: dark)").matches;
9
- t(e === "dark" || !e && a), c();
10
- }
11
- });
12
- function u(e) {
13
- t(!t()), c(), i(o) && typeof localStorage < "u" && localStorage.setItem("theme", t() ? "dark" : "light");
14
- }
15
- function c() {
16
- i(o) && typeof document < "u" && (t() ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"));
17
- }
18
- var r = I();
19
- b(r, () => ({
20
- onclick: u,
21
- class: "w-10 h-10 bg-gray-100 hover:bg-gray-200 border border-gray-300 rounded-lg flex items-center justify-center text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",
22
- "aria-label": t() ? "Switch to light mode" : "Switch to dark mode",
23
- ...f
24
- }));
25
- var m = x(r);
26
- {
27
- var g = (e) => {
28
- var a = D();
29
- n(e, a);
30
- }, p = (e) => {
31
- var a = E();
32
- n(e, a);
33
- };
34
- k(m, (e) => {
35
- t() ? e(g) : e(p, !1);
36
- });
37
- }
38
- n(d, r), y();
39
- }
40
- export {
41
- j as T
42
- };
@@ -1,51 +0,0 @@
1
- import { B as d, C as m, e as g, I as c, T as p, d as C, c as u, a as f, g as x, b as T } from "../CodeBlock-Bbv6JfD2.js";
2
- import { Badge as D, Card as I, ColorPicker as w, FeatureCard as B, Heading as F, OptimizedImage as V, Progress as $, Select as k, Skeleton as S, Toast as h, Toggle as v, Tooltip as M } from "../atoms/index.js";
3
- import { T as j } from "../ThemeToggle-Z2Ndc0if.js";
4
- import { Alert as A, ComponentDemo as E, ContactForm as N, Dropdown as O, Form as P, ImageUpload as U, Layout as q, Modal as z, SlideUp as H, Tabs as L } from "../molecules/index.js";
5
- import { Navbar as J, Navigation as K } from "../organisms/index.js";
6
- const t = (e = "id") => typeof window < "u" ? `${e}-${Math.random().toString(36).substr(2, 9)}` : `${e}-ssr-${Date.now()}`, o = (...e) => e.filter(Boolean).join(" "), r = (e) => {
7
- const a = new FormData(e);
8
- return Object.fromEntries(a.entries());
9
- }, s = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), n = (e) => e != null && e !== "";
10
- export {
11
- A as Alert,
12
- D as Badge,
13
- d as Button,
14
- I as Card,
15
- m as Checkbox,
16
- g as CodeBlock,
17
- w as ColorPicker,
18
- E as ComponentDemo,
19
- N as ContactForm,
20
- O as Dropdown,
21
- B as FeatureCard,
22
- P as Form,
23
- F as Heading,
24
- U as ImageUpload,
25
- c as Input,
26
- q as Layout,
27
- z as Modal,
28
- J as Navbar,
29
- K as Navigation,
30
- V as OptimizedImage,
31
- $ as Progress,
32
- k as Select,
33
- S as Skeleton,
34
- H as SlideUp,
35
- L as Tabs,
36
- p as Textarea,
37
- j as ThemeToggle,
38
- h as Toast,
39
- v as Toggle,
40
- M as Tooltip,
41
- o as cn,
42
- t as createId,
43
- C as createVariantClassMap,
44
- u as getAllVariantClasses,
45
- f as getCardVariantClasses,
46
- r as getFormData,
47
- x as getInputVariantClasses,
48
- T as getVariantClasses,
49
- s as validateEmail,
50
- n as validateRequired
51
- };
@@ -1,11 +0,0 @@
1
- // Field configuration for DynamicForm component
2
- export interface FieldConfig {
3
- key: string;
4
- type: "text" | "email" | "password" | "number" | "textarea" | "select" | "checkbox" | "toggle" | "colorpicker" | "textalignment";
5
- label: string;
6
- placeholder?: string;
7
- required?: boolean;
8
- options?: Array<{ value: string | number; label: string; disabled?: boolean }>;
9
- rows?: number;
10
- flex?: "1" | "full";
11
- }