zabi-components 2.2.2 → 2.2.4

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,5 +1,5 @@
1
1
  import { l as C, p as s, o as k, z as R, A as W, i as O, f, b as T, a as B, q as de, e as ee, c as i, d as V, g as q, m as S, x as N, k as t, j as D, h as v, t as M, v as Z, n as I, w as A, u as ne, B as ve, r as ue, s as G, C as H, D as L, E as me } from "./props-B4BdFk2B.js";
2
- import { a as ge, e as he } from "./Checkbox-D2PLqgxA.js";
2
+ import { a as ge, e as he } from "./Textarea-B9H_FPOO.js";
3
3
  import "svelte";
4
4
  var pe = f('<label class="block text-sm font-medium text-gray-700 mb-1"> </label>'), _e = f("<option disabled> </option>"), xe = f("<option> </option>"), ye = f("<div><!> <select><!><!></select></div>");
5
5
  function Ue(z, e) {
@@ -0,0 +1,257 @@
1
+ import { y as W, l as C, p as s, z as f, A, i as T, f as B, a as q, s as X, c as V, d as E, g as R, x as y, k as t, m as o, h as k, o as i, b as F, e as G, j as H, t as J, v as K, u as L, B as O, n as Q } from "./props-B4BdFk2B.js";
2
+ function se(a, e) {
3
+ W(() => {
4
+ var r = a.getRootNode(), d = (
5
+ /** @type {ShadowRoot} */
6
+ r.host ? (
7
+ /** @type {ShadowRoot} */
8
+ r
9
+ ) : (
10
+ /** @type {Document} */
11
+ r.head ?? /** @type {Document} */
12
+ r.ownerDocument.head
13
+ )
14
+ );
15
+ if (!d.querySelector("#" + e.hash)) {
16
+ const n = document.createElement("style");
17
+ n.id = e.hash, n.textContent = e.code, d.appendChild(n);
18
+ }
19
+ });
20
+ }
21
+ var Y = B("<button><!></button>");
22
+ function re(a, e) {
23
+ const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, ["variant", "size", "disabled", "type", "className"]);
24
+ R(e, !1);
25
+ const n = o(), u = o(), b = o();
26
+ let v = s(e, "variant", 8, "primary"), p = s(e, "size", 8, "md"), h = s(e, "disabled", 8, !1), w = s(e, "type", 8, "button"), _ = s(e, "className", 8, "");
27
+ f(() => {
28
+ }, () => {
29
+ i(n, {
30
+ sm: "px-3 py-1.5 text-sm",
31
+ md: "px-4 py-2 text-sm",
32
+ lg: "px-5 py-3 text-base"
33
+ });
34
+ }), f(() => {
35
+ }, () => {
36
+ i(u, {
37
+ primary: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
38
+ secondary: "bg-gray-600 text-white hover:bg-gray-700 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2",
39
+ danger: "bg-red-600 text-white hover:bg-red-700 focus:ring-2 focus:ring-red-500 focus:ring-offset-2",
40
+ success: "bg-green-600 text-white hover:bg-green-700 focus:ring-2 focus:ring-green-500 focus:ring-offset-2",
41
+ ghost: "bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2",
42
+ brand: "bg-purple-600 text-white hover:bg-purple-700 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2"
43
+ });
44
+ }), f(
45
+ () => (t(n), y(p()), t(u), y(v()), y(_())),
46
+ () => {
47
+ i(b, [
48
+ "inline-flex items-center justify-center font-medium rounded-md transition-colors duration-200",
49
+ "disabled:opacity-50 disabled:cursor-not-allowed",
50
+ "focus:outline-none",
51
+ t(n)[p()],
52
+ t(u)[v()],
53
+ _()
54
+ ].filter(Boolean).join(" "));
55
+ }
56
+ ), A(), T();
57
+ var m = Y();
58
+ q(m, () => ({
59
+ type: w(),
60
+ class: t(b),
61
+ disabled: h(),
62
+ ...d
63
+ }));
64
+ var x = k(m);
65
+ X(x, e, "default", {}), V(a, m), E();
66
+ }
67
+ function U(a) {
68
+ const e = {
69
+ default: "input-variant-default",
70
+ success: "input-variant-success",
71
+ warning: "input-variant-warning",
72
+ error: "input-variant-error",
73
+ info: "input-variant-info"
74
+ };
75
+ return e[a] || e.default;
76
+ }
77
+ function ne(a) {
78
+ const e = {
79
+ default: "card-variant-default",
80
+ success: "card-variant-success",
81
+ warning: "card-variant-warning",
82
+ error: "card-variant-error",
83
+ info: "card-variant-info"
84
+ };
85
+ return e[a] || e.default;
86
+ }
87
+ function S(a, e) {
88
+ const r = {
89
+ default: `variant-${e}-default`,
90
+ success: `variant-${e}-success`,
91
+ warning: `variant-${e}-warning`,
92
+ error: `variant-${e}-error`,
93
+ info: `variant-${e}-info`
94
+ };
95
+ return r[a] || r.default;
96
+ }
97
+ function ie(a) {
98
+ return {
99
+ border: S(a, "border"),
100
+ text: S(a, "text"),
101
+ bg: S(a, "bg")
102
+ };
103
+ }
104
+ function le(a, e) {
105
+ return a.reduce((r, d) => (r[d] = `${e}-${d}`, r), {});
106
+ }
107
+ var Z = B("<label> </label>"), $ = B("<div><!> <input/></div>");
108
+ function oe(a, e) {
109
+ const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, [
110
+ "value",
111
+ "type",
112
+ "label",
113
+ "placeholder",
114
+ "disabled",
115
+ "size",
116
+ "variant"
117
+ ]);
118
+ R(e, !1);
119
+ const n = o(), u = o(), b = o(), v = o();
120
+ let p = s(e, "value", 12, ""), h = s(e, "type", 8, "text"), w = s(e, "label", 8, ""), _ = s(e, "placeholder", 8, ""), m = s(e, "disabled", 8, !1), x = s(e, "size", 8, "md"), z = s(e, "variant", 8, "default"), g = o();
121
+ typeof window < "u" ? i(g, `input-${Math.random().toString(36).substr(2, 9)}`) : i(g, `input-ssr-${Date.now()}`);
122
+ function N(c) {
123
+ const l = c.target;
124
+ p(l.value);
125
+ }
126
+ f(() => {
127
+ }, () => {
128
+ i(n, {
129
+ sm: "px-3 py-1.5 text-sm",
130
+ md: "px-4 py-2 text-sm",
131
+ lg: "px-5 py-3 text-base"
132
+ });
133
+ }), f(() => y(z()), () => {
134
+ i(u, U(z()));
135
+ }), f(
136
+ () => (t(n), y(x()), t(u)),
137
+ () => {
138
+ i(b, [
139
+ "w-full rounded-md transition-colors duration-200",
140
+ "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
141
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
142
+ t(n)[x()],
143
+ t(u)
144
+ ].join(" "));
145
+ }
146
+ ), f(() => {
147
+ }, () => {
148
+ i(v, "block text-sm font-medium text-primary mb-1");
149
+ }), A(), T();
150
+ var I = $(), M = k(I);
151
+ {
152
+ var D = (c) => {
153
+ var l = Z(), P = k(l);
154
+ J(() => {
155
+ K(l, "for", t(g)), L(l, 1, O(t(v))), Q(P, w());
156
+ }), V(c, l);
157
+ };
158
+ F(M, (c) => {
159
+ w() && c(D);
160
+ });
161
+ }
162
+ var j = H(M, 2);
163
+ q(
164
+ j,
165
+ () => ({
166
+ id: t(g),
167
+ type: h(),
168
+ value: p(),
169
+ placeholder: _(),
170
+ disabled: m(),
171
+ class: t(b),
172
+ ...d
173
+ }),
174
+ void 0,
175
+ void 0,
176
+ void 0,
177
+ !0
178
+ ), G("input", j, N), V(a, I), E();
179
+ }
180
+ var ee = B("<label> </label>"), te = B("<div><!> <textarea></textarea></div>");
181
+ function de(a, e) {
182
+ const r = C(e, ["children", "$$slots", "$$events", "$$legacy"]), d = C(r, [
183
+ "value",
184
+ "label",
185
+ "placeholder",
186
+ "disabled",
187
+ "rows",
188
+ "size",
189
+ "variant"
190
+ ]);
191
+ R(e, !1);
192
+ const n = o(), u = o(), b = o(), v = o();
193
+ let p = s(e, "value", 12, ""), h = s(e, "label", 8, ""), w = s(e, "placeholder", 8, ""), _ = s(e, "disabled", 8, !1), m = s(e, "rows", 8, 4), x = s(e, "size", 8, "md"), z = s(e, "variant", 8, "default"), g = o();
194
+ typeof window < "u" ? i(g, `textarea-${Math.random().toString(36).substr(2, 9)}`) : i(g, `textarea-ssr-${Date.now()}`);
195
+ function N(c) {
196
+ const l = c.target;
197
+ p(l.value);
198
+ }
199
+ f(() => {
200
+ }, () => {
201
+ i(n, {
202
+ sm: "px-3 py-1.5 text-sm",
203
+ md: "px-4 py-2 text-sm",
204
+ lg: "px-5 py-3 text-base"
205
+ });
206
+ }), f(() => y(z()), () => {
207
+ i(u, U(z()));
208
+ }), f(
209
+ () => (t(n), y(x()), t(u)),
210
+ () => {
211
+ i(b, [
212
+ "w-full rounded-md transition-colors duration-200",
213
+ "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
214
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
215
+ "resize-y",
216
+ t(n)[x()],
217
+ t(u)
218
+ ].join(" "));
219
+ }
220
+ ), f(() => {
221
+ }, () => {
222
+ i(v, "block text-sm font-medium text-primary mb-1");
223
+ }), A(), T();
224
+ var I = te(), M = k(I);
225
+ {
226
+ var D = (c) => {
227
+ var l = ee(), P = k(l);
228
+ J(() => {
229
+ K(l, "for", t(g)), L(l, 1, O(t(v))), Q(P, h());
230
+ }), V(c, l);
231
+ };
232
+ F(M, (c) => {
233
+ h() && c(D);
234
+ });
235
+ }
236
+ var j = H(M, 2);
237
+ q(j, () => ({
238
+ id: t(g),
239
+ value: p(),
240
+ placeholder: w(),
241
+ disabled: _(),
242
+ rows: m(),
243
+ class: t(b),
244
+ ...d
245
+ })), G("input", j, N), V(a, I), E();
246
+ }
247
+ export {
248
+ re as B,
249
+ oe as I,
250
+ de as T,
251
+ ne as a,
252
+ S as b,
253
+ ie as c,
254
+ le as d,
255
+ se as e,
256
+ U as g
257
+ };
@@ -1,20 +1,19 @@
1
- import { B as s, C as o, a as r, H as t, O as T, P as g, S as l, b as m, T as p, c as d, d as i } from "../OptimizedImage-B5NMIuac.js";
2
- import { B as C, C as c, I as n, T as B } from "../Checkbox-D2PLqgxA.js";
3
- import { T as k } from "../ThemeToggle-Cm25ThjX.js";
1
+ import { B as s, C as o, a as r, H as t, O as T, P as g, S as l, b as m, T as p, c as d, d as i } from "../OptimizedImage-D-WN8yZ_.js";
2
+ import { B as x, I as B, T as c } from "../Textarea-B9H_FPOO.js";
3
+ import { T as C } from "../ThemeToggle-Cm25ThjX.js";
4
4
  export {
5
5
  s as Badge,
6
- C as Button,
6
+ x as Button,
7
7
  o as Card,
8
- c as Checkbox,
9
8
  r as ColorPicker,
10
9
  t as Heading,
11
- n as Input,
10
+ B as Input,
12
11
  T as OptimizedImage,
13
12
  g as Progress,
14
13
  l as Select,
15
14
  m as Skeleton,
16
- B as Textarea,
17
- k as ThemeToggle,
15
+ c as Textarea,
16
+ C as ThemeToggle,
18
17
  p as Toast,
19
18
  d as Toggle,
20
19
  i as Tooltip
@@ -1,48 +1,47 @@
1
- import { B as d, C as g, I as m, T as c, d as p, c as C, a as u, g as f, b as T } from "../Checkbox-D2PLqgxA.js";
2
- import { B as b, C as I, a as w, H as B, O as D, P as S, S as V, b as $, T as F, c as h, d as k } from "../OptimizedImage-B5NMIuac.js";
3
- import { T as M } from "../ThemeToggle-Cm25ThjX.js";
4
- import { Alert as O, ContactForm as P, Dropdown as R, Form as j, ImageUpload as y, Layout as A, Modal as E, SlideUp as H, Tabs as U } from "../molecules/index.js";
5
- import { N as z, a as L } from "../Navigation-BxP-osMQ.js";
6
- const t = (a = "id") => typeof window < "u" ? `${a}-${Math.random().toString(36).substr(2, 9)}` : `${a}-ssr-${Date.now()}`, s = (...a) => a.filter(Boolean).join(" "), o = (a) => {
1
+ import { B as d, I as g, T as m, d as c, c as p, a as u, g as f, b as C } from "../Textarea-B9H_FPOO.js";
2
+ import { B as x, C as b, a as I, H as w, O as B, P as D, S, b as V, T as $, c as F, d as v } from "../OptimizedImage-D-WN8yZ_.js";
3
+ import { T as N } from "../ThemeToggle-Cm25ThjX.js";
4
+ import { Alert as P, ContactForm as R, Dropdown as h, Form as j, ImageUpload as k, Layout as y, Modal as A, SlideUp as E, Tabs as H } from "../molecules/index.js";
5
+ import { N as q, a as z } from "../Navigation-BxP-osMQ.js";
6
+ const t = (a = "id") => typeof window < "u" ? `${a}-${Math.random().toString(36).substr(2, 9)}` : `${a}-ssr-${Date.now()}`, s = (...a) => a.filter(Boolean).join(" "), r = (a) => {
7
7
  const e = new FormData(a);
8
8
  return Object.fromEntries(e.entries());
9
- }, r = (a) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a), n = (a) => a != null && a !== "";
9
+ }, o = (a) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a), n = (a) => a != null && a !== "";
10
10
  export {
11
- O as Alert,
12
- b as Badge,
11
+ P as Alert,
12
+ x as Badge,
13
13
  d as Button,
14
- I as Card,
15
- g as Checkbox,
16
- w as ColorPicker,
17
- P as ContactForm,
18
- R as Dropdown,
14
+ b as Card,
15
+ I as ColorPicker,
16
+ R as ContactForm,
17
+ h as Dropdown,
19
18
  j as Form,
20
- B as Heading,
21
- y as ImageUpload,
22
- m as Input,
23
- A as Layout,
24
- E as Modal,
25
- z as Navbar,
26
- L as Navigation,
27
- D as OptimizedImage,
28
- S as Progress,
29
- V as Select,
30
- $ as Skeleton,
31
- H as SlideUp,
32
- U as Tabs,
33
- c as Textarea,
34
- M as ThemeToggle,
35
- F as Toast,
36
- h as Toggle,
37
- k as Tooltip,
19
+ w as Heading,
20
+ k as ImageUpload,
21
+ g as Input,
22
+ y as Layout,
23
+ A as Modal,
24
+ q as Navbar,
25
+ z as Navigation,
26
+ B as OptimizedImage,
27
+ D as Progress,
28
+ S as Select,
29
+ V as Skeleton,
30
+ E as SlideUp,
31
+ H as Tabs,
32
+ m as Textarea,
33
+ N as ThemeToggle,
34
+ $ as Toast,
35
+ F as Toggle,
36
+ v as Tooltip,
38
37
  s as cn,
39
38
  t as createId,
40
- p as createVariantClassMap,
41
- C as getAllVariantClasses,
39
+ c as createVariantClassMap,
40
+ p as getAllVariantClasses,
42
41
  u as getCardVariantClasses,
43
- o as getFormData,
42
+ r as getFormData,
44
43
  f as getInputVariantClasses,
45
- T as getVariantClasses,
46
- r as validateEmail,
44
+ C as getVariantClasses,
45
+ o as validateEmail,
47
46
  n as validateRequired
48
47
  };