zabi-components 2.1.1 → 2.2.0
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.
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { y as U, l as C, p as t, z as d, A as P, i as S, f as M, a as A, s as W, c as k, d as T, g as q, x as z, k as n, m as c, h as I, o as u, b as $, e as F, j as G, t as H, v as J, u as L, B as O, n as K } from "./props-B4BdFk2B.js";
|
|
2
|
+
function ne(a, e) {
|
|
3
|
+
U(() => {
|
|
4
|
+
var s = a.getRootNode(), i = (
|
|
5
|
+
/** @type {ShadowRoot} */
|
|
6
|
+
s.host ? (
|
|
7
|
+
/** @type {ShadowRoot} */
|
|
8
|
+
s
|
|
9
|
+
) : (
|
|
10
|
+
/** @type {Document} */
|
|
11
|
+
s.head ?? /** @type {Document} */
|
|
12
|
+
s.ownerDocument.head
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
if (!i.querySelector("#" + e.hash)) {
|
|
16
|
+
const r = document.createElement("style");
|
|
17
|
+
r.id = e.hash, r.textContent = e.code, i.appendChild(r);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
var X = M("<button><!></button>");
|
|
22
|
+
function le(a, e) {
|
|
23
|
+
const s = C(e, ["children", "$$slots", "$$events", "$$legacy"]), i = C(s, ["variant", "size", "disabled", "type", "className"]);
|
|
24
|
+
q(e, !1);
|
|
25
|
+
const r = c(), l = c(), x = c();
|
|
26
|
+
let f = t(e, "variant", 8, "primary"), b = t(e, "size", 8, "md"), w = t(e, "disabled", 8, !1), p = t(e, "type", 8, "button"), m = t(e, "className", 8, "");
|
|
27
|
+
d(() => {
|
|
28
|
+
}, () => {
|
|
29
|
+
u(r, {
|
|
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
|
+
}), d(() => {
|
|
35
|
+
}, () => {
|
|
36
|
+
u(l, {
|
|
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
|
+
}), d(
|
|
45
|
+
() => (n(r), z(b()), n(l), z(f()), z(m())),
|
|
46
|
+
() => {
|
|
47
|
+
u(x, [
|
|
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
|
+
n(r)[b()],
|
|
52
|
+
n(l)[f()],
|
|
53
|
+
m()
|
|
54
|
+
].filter(Boolean).join(" "));
|
|
55
|
+
}
|
|
56
|
+
), P(), S();
|
|
57
|
+
var y = X();
|
|
58
|
+
A(y, () => ({
|
|
59
|
+
type: p(),
|
|
60
|
+
class: n(x),
|
|
61
|
+
disabled: w(),
|
|
62
|
+
...i
|
|
63
|
+
}));
|
|
64
|
+
var _ = I(y);
|
|
65
|
+
W(_, e, "default", {}), k(a, y), T();
|
|
66
|
+
}
|
|
67
|
+
function Q(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 ie(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 R(a, e) {
|
|
88
|
+
const s = {
|
|
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 s[a] || s.default;
|
|
96
|
+
}
|
|
97
|
+
function oe(a) {
|
|
98
|
+
return {
|
|
99
|
+
border: R(a, "border"),
|
|
100
|
+
text: R(a, "text"),
|
|
101
|
+
bg: R(a, "bg")
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function de(a, e) {
|
|
105
|
+
return a.reduce((s, i) => (s[i] = `${e}-${i}`, s), {});
|
|
106
|
+
}
|
|
107
|
+
var Y = M("<label> </label>"), Z = M("<div><!> <input/></div>");
|
|
108
|
+
function ce(a, e) {
|
|
109
|
+
const s = C(e, ["children", "$$slots", "$$events", "$$legacy"]), i = C(s, [
|
|
110
|
+
"value",
|
|
111
|
+
"type",
|
|
112
|
+
"label",
|
|
113
|
+
"placeholder",
|
|
114
|
+
"disabled",
|
|
115
|
+
"size",
|
|
116
|
+
"variant"
|
|
117
|
+
]);
|
|
118
|
+
q(e, !1);
|
|
119
|
+
const r = c(), l = c(), x = c(), f = c();
|
|
120
|
+
let b = t(e, "value", 12, ""), w = t(e, "type", 8, "text"), p = t(e, "label", 8, ""), m = t(e, "placeholder", 8, ""), y = t(e, "disabled", 8, !1), _ = t(e, "size", 8, "md"), g = t(e, "variant", 8, "default");
|
|
121
|
+
const v = `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
122
|
+
function j(h) {
|
|
123
|
+
const o = h.target;
|
|
124
|
+
b(o.value);
|
|
125
|
+
}
|
|
126
|
+
d(() => {
|
|
127
|
+
}, () => {
|
|
128
|
+
u(r, {
|
|
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
|
+
}), d(() => z(g()), () => {
|
|
134
|
+
u(l, Q(g()));
|
|
135
|
+
}), d(
|
|
136
|
+
() => (n(r), z(_()), n(l)),
|
|
137
|
+
() => {
|
|
138
|
+
u(x, [
|
|
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
|
+
n(r)[_()],
|
|
143
|
+
n(l)
|
|
144
|
+
].join(" "));
|
|
145
|
+
}
|
|
146
|
+
), d(() => {
|
|
147
|
+
}, () => {
|
|
148
|
+
u(f, "block text-sm font-medium text-primary mb-1");
|
|
149
|
+
}), P(), S();
|
|
150
|
+
var V = Z(), B = I(V);
|
|
151
|
+
{
|
|
152
|
+
var D = (h) => {
|
|
153
|
+
var o = Y(), E = I(o);
|
|
154
|
+
H(() => {
|
|
155
|
+
J(o, "for", v), L(o, 1, O(n(f))), K(E, p());
|
|
156
|
+
}), k(h, o);
|
|
157
|
+
};
|
|
158
|
+
$(B, (h) => {
|
|
159
|
+
p() && h(D);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
var N = G(B, 2);
|
|
163
|
+
A(
|
|
164
|
+
N,
|
|
165
|
+
() => ({
|
|
166
|
+
id: v,
|
|
167
|
+
type: w(),
|
|
168
|
+
value: b(),
|
|
169
|
+
placeholder: m(),
|
|
170
|
+
disabled: y(),
|
|
171
|
+
class: n(x),
|
|
172
|
+
...i
|
|
173
|
+
}),
|
|
174
|
+
void 0,
|
|
175
|
+
void 0,
|
|
176
|
+
void 0,
|
|
177
|
+
!0
|
|
178
|
+
), F("input", N, j), k(a, V), T();
|
|
179
|
+
}
|
|
180
|
+
var ee = M("<label> </label>"), te = M("<div><!> <textarea></textarea></div>");
|
|
181
|
+
function ue(a, e) {
|
|
182
|
+
const s = C(e, ["children", "$$slots", "$$events", "$$legacy"]), i = C(s, [
|
|
183
|
+
"value",
|
|
184
|
+
"label",
|
|
185
|
+
"placeholder",
|
|
186
|
+
"disabled",
|
|
187
|
+
"rows",
|
|
188
|
+
"size",
|
|
189
|
+
"variant"
|
|
190
|
+
]);
|
|
191
|
+
q(e, !1);
|
|
192
|
+
const r = c(), l = c(), x = c(), f = c();
|
|
193
|
+
let b = t(e, "value", 12, ""), w = t(e, "label", 8, ""), p = t(e, "placeholder", 8, ""), m = t(e, "disabled", 8, !1), y = t(e, "rows", 8, 4), _ = t(e, "size", 8, "md"), g = t(e, "variant", 8, "default");
|
|
194
|
+
const v = `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
195
|
+
function j(h) {
|
|
196
|
+
const o = h.target;
|
|
197
|
+
b(o.value);
|
|
198
|
+
}
|
|
199
|
+
d(() => {
|
|
200
|
+
}, () => {
|
|
201
|
+
u(r, {
|
|
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
|
+
}), d(() => z(g()), () => {
|
|
207
|
+
u(l, Q(g()));
|
|
208
|
+
}), d(
|
|
209
|
+
() => (n(r), z(_()), n(l)),
|
|
210
|
+
() => {
|
|
211
|
+
u(x, [
|
|
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
|
+
n(r)[_()],
|
|
217
|
+
n(l)
|
|
218
|
+
].join(" "));
|
|
219
|
+
}
|
|
220
|
+
), d(() => {
|
|
221
|
+
}, () => {
|
|
222
|
+
u(f, "block text-sm font-medium text-primary mb-1");
|
|
223
|
+
}), P(), S();
|
|
224
|
+
var V = te(), B = I(V);
|
|
225
|
+
{
|
|
226
|
+
var D = (h) => {
|
|
227
|
+
var o = ee(), E = I(o);
|
|
228
|
+
H(() => {
|
|
229
|
+
J(o, "for", v), L(o, 1, O(n(f))), K(E, w());
|
|
230
|
+
}), k(h, o);
|
|
231
|
+
};
|
|
232
|
+
$(B, (h) => {
|
|
233
|
+
w() && h(D);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
var N = G(B, 2);
|
|
237
|
+
A(N, () => ({
|
|
238
|
+
id: v,
|
|
239
|
+
value: b(),
|
|
240
|
+
placeholder: p(),
|
|
241
|
+
disabled: m(),
|
|
242
|
+
rows: y(),
|
|
243
|
+
class: n(x),
|
|
244
|
+
...i
|
|
245
|
+
})), F("input", N, j), k(a, V), T();
|
|
246
|
+
}
|
|
247
|
+
var ae = M('<label class="text-sm font-medium cursor-pointer"> </label>'), se = M('<div class="flex items-center gap-2"><input/> <!></div>');
|
|
248
|
+
function fe(a, e) {
|
|
249
|
+
const s = C(e, ["children", "$$slots", "$$events", "$$legacy"]), i = C(s, ["checked", "disabled", "label"]);
|
|
250
|
+
q(e, !1);
|
|
251
|
+
const r = c();
|
|
252
|
+
let l = t(e, "checked", 12, !1), x = t(e, "disabled", 8, !1), f = t(e, "label", 8, "");
|
|
253
|
+
const b = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
254
|
+
function w(g) {
|
|
255
|
+
const v = g.target;
|
|
256
|
+
l(v.checked);
|
|
257
|
+
}
|
|
258
|
+
d(() => {
|
|
259
|
+
}, () => {
|
|
260
|
+
u(r, [
|
|
261
|
+
"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded",
|
|
262
|
+
"focus:ring-blue-500 focus:ring-2",
|
|
263
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
264
|
+
].join(" "));
|
|
265
|
+
}), P(), S();
|
|
266
|
+
var p = se(), m = I(p);
|
|
267
|
+
A(
|
|
268
|
+
m,
|
|
269
|
+
() => ({
|
|
270
|
+
type: "checkbox",
|
|
271
|
+
id: b,
|
|
272
|
+
checked: l(),
|
|
273
|
+
disabled: x(),
|
|
274
|
+
class: n(r),
|
|
275
|
+
...i
|
|
276
|
+
}),
|
|
277
|
+
void 0,
|
|
278
|
+
void 0,
|
|
279
|
+
void 0,
|
|
280
|
+
!0
|
|
281
|
+
);
|
|
282
|
+
var y = G(m, 2);
|
|
283
|
+
{
|
|
284
|
+
var _ = (g) => {
|
|
285
|
+
var v = ae(), j = I(v);
|
|
286
|
+
H(() => {
|
|
287
|
+
J(v, "for", b), K(j, f());
|
|
288
|
+
}), k(g, v);
|
|
289
|
+
};
|
|
290
|
+
$(y, (g) => {
|
|
291
|
+
f() && g(_);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
F("change", m, w), k(a, p), T();
|
|
295
|
+
}
|
|
296
|
+
export {
|
|
297
|
+
le as B,
|
|
298
|
+
fe as C,
|
|
299
|
+
ce as I,
|
|
300
|
+
ue as T,
|
|
301
|
+
ie as a,
|
|
302
|
+
R as b,
|
|
303
|
+
oe as c,
|
|
304
|
+
de as d,
|
|
305
|
+
ne as e,
|
|
306
|
+
Q as g
|
|
307
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as k, p as s, z as A, A as W, i as V, f as b, b as j, a as S, q as de, e as ee, c as i, d as q, g as D, x as B, k as t, j as X, m as I, h as v, o as R, t as T, v as Z, n as Y, w as G, u as ne, B as ve, r as fe, s as H, C as L, D as O, E as me } from "./props-B4BdFk2B.js";
|
|
2
|
-
import { a as ge, e as he } from "./Checkbox-
|
|
2
|
+
import { a as ge, e as he } from "./Checkbox-Dzsjjsfr.js";
|
|
3
3
|
import "svelte";
|
|
4
4
|
var pe = b('<label class="block text-sm font-medium text-gray-700 mb-1"> </label>'), _e = b("<option disabled> </option>"), xe = b("<option> </option>"), ye = b("<div><!> <select><!><!></select></div>");
|
|
5
5
|
function Ue(z, e) {
|
package/dist/atoms/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { B as C, C as c, I as n, T as B } from "../Checkbox-
|
|
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-eQavox.js";
|
|
2
|
+
import { B as C, C as c, I as n, T as B } from "../Checkbox-Dzsjjsfr.js";
|
|
3
3
|
import { T as k } from "../ThemeToggle-Cm25ThjX.js";
|
|
4
4
|
export {
|
|
5
5
|
s as Badge,
|
package/dist/index/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as g, C as m, I as d, T as c, d as p, c as C, a as x, g as T, b as f } from "../Checkbox-
|
|
2
|
-
import { B as b, C as I, a as B, H as S, O as V, P as D, S as F, b as h, T as k, c as v, d as M } from "../OptimizedImage-
|
|
1
|
+
import { B as g, C as m, I as d, T as c, d as p, c as C, a as x, g as T, b as f } from "../Checkbox-Dzsjjsfr.js";
|
|
2
|
+
import { B as b, C as I, a as B, H as S, O as V, P as D, S as F, b as h, T as k, c as v, d as M } from "../OptimizedImage-D-eQavox.js";
|
|
3
3
|
import { T as O } from "../ThemeToggle-Cm25ThjX.js";
|
|
4
4
|
import { Alert as R, ContactForm as $, Dropdown as j, Form as w, ImageUpload as A, Layout as E, Modal as H, SlideUp as U, Tabs as q } from "../molecules/index.js";
|
|
5
5
|
import { N as z, a as L } from "../Navigation-BxP-osMQ.js";
|
package/dist/molecules/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as T, F as ie, G as le, H as de, I as ce, J as Y, y as ve, K as ue, w as E, L as fe, S as me, l as F, p as w, i as oe, f as z, a as ee, s as N, e as S, c as m, d as V, g as W, h as a, z as H, A as se, b as O, x as P, k as f, m as A, o as U, D, j as y, C as G, M as be, n as R, v as J, q as ge, r as pe, u as te, N as X, O as K } from "../props-B4BdFk2B.js";
|
|
2
|
-
import { e as ne, B as Z, I as ae, T as xe, C as he } from "../Checkbox-
|
|
2
|
+
import { e as ne, B as Z, I as ae, T as xe, C as he } from "../Checkbox-Dzsjjsfr.js";
|
|
3
3
|
function we(n, e, s = !1, t = !1, v = !1) {
|
|
4
4
|
var r = n, g = "";
|
|
5
5
|
T(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zabi-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A modern SvelteKit component library with TypeScript and Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index/index.js",
|
|
@@ -95,5 +95,6 @@
|
|
|
95
95
|
"optional": true
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"svelte": "./dist/index/index.js"
|
|
98
|
+
"svelte": "./dist/index/index.js",
|
|
99
|
+
"ssr": true
|
|
99
100
|
}
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { y as U, l as _, p as a, z as d, A as B, i as $, f as I, a as A, s as W, c as z, d as T, g as q, x as M, k as r, m as c, h as k, o as u, b as R, e as F, j as G, t as H, v as J, u as L, B as O, n as K } from "./props-B4BdFk2B.js";
|
|
2
|
-
function re(t, e) {
|
|
3
|
-
U(() => {
|
|
4
|
-
var s = t.getRootNode(), i = (
|
|
5
|
-
/** @type {ShadowRoot} */
|
|
6
|
-
s.host ? (
|
|
7
|
-
/** @type {ShadowRoot} */
|
|
8
|
-
s
|
|
9
|
-
) : (
|
|
10
|
-
/** @type {Document} */
|
|
11
|
-
s.head ?? /** @type {Document} */
|
|
12
|
-
s.ownerDocument.head
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
if (!i.querySelector("#" + e.hash)) {
|
|
16
|
-
const l = document.createElement("style");
|
|
17
|
-
l.id = e.hash, l.textContent = e.code, i.appendChild(l);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
var X = I("<button><!></button>");
|
|
22
|
-
function ne(t, e) {
|
|
23
|
-
const s = _(e, ["children", "$$slots", "$$events", "$$legacy"]), i = _(s, ["variant", "size", "disabled", "type"]);
|
|
24
|
-
q(e, !1);
|
|
25
|
-
const l = c(), n = c(), h = c();
|
|
26
|
-
let b = a(e, "variant", 8, "primary"), f = a(e, "size", 8, "md"), y = a(e, "disabled", 8, !1), p = a(e, "type", 8, "button");
|
|
27
|
-
d(() => {
|
|
28
|
-
}, () => {
|
|
29
|
-
u(l, {
|
|
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
|
-
}), d(() => {
|
|
35
|
-
}, () => {
|
|
36
|
-
u(n, {
|
|
37
|
-
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
38
|
-
secondary: "bg-gray-600 text-white hover:bg-gray-700",
|
|
39
|
-
danger: "bg-red-600 text-white hover:bg-red-700"
|
|
40
|
-
});
|
|
41
|
-
}), d(
|
|
42
|
-
() => (r(l), M(f()), r(n), M(b())),
|
|
43
|
-
() => {
|
|
44
|
-
u(h, [
|
|
45
|
-
"inline-flex items-center justify-center font-medium rounded-md",
|
|
46
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
47
|
-
r(l)[f()],
|
|
48
|
-
r(n)[b()]
|
|
49
|
-
].join(" "));
|
|
50
|
-
}
|
|
51
|
-
), B(), $();
|
|
52
|
-
var v = X();
|
|
53
|
-
A(v, () => ({
|
|
54
|
-
type: p(),
|
|
55
|
-
class: r(h),
|
|
56
|
-
disabled: y(),
|
|
57
|
-
...i
|
|
58
|
-
}));
|
|
59
|
-
var C = k(v);
|
|
60
|
-
W(C, e, "default", {}), z(t, v), T();
|
|
61
|
-
}
|
|
62
|
-
function Q(t) {
|
|
63
|
-
const e = {
|
|
64
|
-
default: "input-variant-default",
|
|
65
|
-
success: "input-variant-success",
|
|
66
|
-
warning: "input-variant-warning",
|
|
67
|
-
error: "input-variant-error",
|
|
68
|
-
info: "input-variant-info"
|
|
69
|
-
};
|
|
70
|
-
return e[t] || e.default;
|
|
71
|
-
}
|
|
72
|
-
function ie(t) {
|
|
73
|
-
const e = {
|
|
74
|
-
default: "card-variant-default",
|
|
75
|
-
success: "card-variant-success",
|
|
76
|
-
warning: "card-variant-warning",
|
|
77
|
-
error: "card-variant-error",
|
|
78
|
-
info: "card-variant-info"
|
|
79
|
-
};
|
|
80
|
-
return e[t] || e.default;
|
|
81
|
-
}
|
|
82
|
-
function N(t, e) {
|
|
83
|
-
const s = {
|
|
84
|
-
default: `variant-${e}-default`,
|
|
85
|
-
success: `variant-${e}-success`,
|
|
86
|
-
warning: `variant-${e}-warning`,
|
|
87
|
-
error: `variant-${e}-error`,
|
|
88
|
-
info: `variant-${e}-info`
|
|
89
|
-
};
|
|
90
|
-
return s[t] || s.default;
|
|
91
|
-
}
|
|
92
|
-
function oe(t) {
|
|
93
|
-
return {
|
|
94
|
-
border: N(t, "border"),
|
|
95
|
-
text: N(t, "text"),
|
|
96
|
-
bg: N(t, "bg")
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function de(t, e) {
|
|
100
|
-
return t.reduce((s, i) => (s[i] = `${e}-${i}`, s), {});
|
|
101
|
-
}
|
|
102
|
-
var Y = I("<label> </label>"), Z = I("<div><!> <input/></div>");
|
|
103
|
-
function ce(t, e) {
|
|
104
|
-
const s = _(e, ["children", "$$slots", "$$events", "$$legacy"]), i = _(s, [
|
|
105
|
-
"value",
|
|
106
|
-
"type",
|
|
107
|
-
"label",
|
|
108
|
-
"placeholder",
|
|
109
|
-
"disabled",
|
|
110
|
-
"size",
|
|
111
|
-
"variant"
|
|
112
|
-
]);
|
|
113
|
-
q(e, !1);
|
|
114
|
-
const l = c(), n = c(), h = c(), b = c();
|
|
115
|
-
let f = a(e, "value", 12, ""), y = a(e, "type", 8, "text"), p = a(e, "label", 8, ""), v = a(e, "placeholder", 8, ""), C = a(e, "disabled", 8, !1), w = a(e, "size", 8, "md"), g = a(e, "variant", 8, "default");
|
|
116
|
-
const x = `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
117
|
-
function j(m) {
|
|
118
|
-
const o = m.target;
|
|
119
|
-
f(o.value);
|
|
120
|
-
}
|
|
121
|
-
d(() => {
|
|
122
|
-
}, () => {
|
|
123
|
-
u(l, {
|
|
124
|
-
sm: "px-3 py-1.5 text-sm",
|
|
125
|
-
md: "px-4 py-2 text-sm",
|
|
126
|
-
lg: "px-5 py-3 text-base"
|
|
127
|
-
});
|
|
128
|
-
}), d(() => M(g()), () => {
|
|
129
|
-
u(n, Q(g()));
|
|
130
|
-
}), d(
|
|
131
|
-
() => (r(l), M(w()), r(n)),
|
|
132
|
-
() => {
|
|
133
|
-
u(h, [
|
|
134
|
-
"w-full rounded-md transition-colors duration-200",
|
|
135
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
|
|
136
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
|
|
137
|
-
r(l)[w()],
|
|
138
|
-
r(n)
|
|
139
|
-
].join(" "));
|
|
140
|
-
}
|
|
141
|
-
), d(() => {
|
|
142
|
-
}, () => {
|
|
143
|
-
u(b, "block text-sm font-medium text-primary mb-1");
|
|
144
|
-
}), B(), $();
|
|
145
|
-
var V = Z(), P = k(V);
|
|
146
|
-
{
|
|
147
|
-
var D = (m) => {
|
|
148
|
-
var o = Y(), E = k(o);
|
|
149
|
-
H(() => {
|
|
150
|
-
J(o, "for", x), L(o, 1, O(r(b))), K(E, p());
|
|
151
|
-
}), z(m, o);
|
|
152
|
-
};
|
|
153
|
-
R(P, (m) => {
|
|
154
|
-
p() && m(D);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
var S = G(P, 2);
|
|
158
|
-
A(
|
|
159
|
-
S,
|
|
160
|
-
() => ({
|
|
161
|
-
id: x,
|
|
162
|
-
type: y(),
|
|
163
|
-
value: f(),
|
|
164
|
-
placeholder: v(),
|
|
165
|
-
disabled: C(),
|
|
166
|
-
class: r(h),
|
|
167
|
-
...i
|
|
168
|
-
}),
|
|
169
|
-
void 0,
|
|
170
|
-
void 0,
|
|
171
|
-
void 0,
|
|
172
|
-
!0
|
|
173
|
-
), F("input", S, j), z(t, V), T();
|
|
174
|
-
}
|
|
175
|
-
var ee = I("<label> </label>"), te = I("<div><!> <textarea></textarea></div>");
|
|
176
|
-
function ue(t, e) {
|
|
177
|
-
const s = _(e, ["children", "$$slots", "$$events", "$$legacy"]), i = _(s, [
|
|
178
|
-
"value",
|
|
179
|
-
"label",
|
|
180
|
-
"placeholder",
|
|
181
|
-
"disabled",
|
|
182
|
-
"rows",
|
|
183
|
-
"size",
|
|
184
|
-
"variant"
|
|
185
|
-
]);
|
|
186
|
-
q(e, !1);
|
|
187
|
-
const l = c(), n = c(), h = c(), b = c();
|
|
188
|
-
let f = a(e, "value", 12, ""), y = a(e, "label", 8, ""), p = a(e, "placeholder", 8, ""), v = a(e, "disabled", 8, !1), C = a(e, "rows", 8, 4), w = a(e, "size", 8, "md"), g = a(e, "variant", 8, "default");
|
|
189
|
-
const x = `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
190
|
-
function j(m) {
|
|
191
|
-
const o = m.target;
|
|
192
|
-
f(o.value);
|
|
193
|
-
}
|
|
194
|
-
d(() => {
|
|
195
|
-
}, () => {
|
|
196
|
-
u(l, {
|
|
197
|
-
sm: "px-3 py-1.5 text-sm",
|
|
198
|
-
md: "px-4 py-2 text-sm",
|
|
199
|
-
lg: "px-5 py-3 text-base"
|
|
200
|
-
});
|
|
201
|
-
}), d(() => M(g()), () => {
|
|
202
|
-
u(n, Q(g()));
|
|
203
|
-
}), d(
|
|
204
|
-
() => (r(l), M(w()), r(n)),
|
|
205
|
-
() => {
|
|
206
|
-
u(h, [
|
|
207
|
-
"w-full rounded-md transition-colors duration-200",
|
|
208
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",
|
|
209
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-surface-disabled",
|
|
210
|
-
"resize-y",
|
|
211
|
-
r(l)[w()],
|
|
212
|
-
r(n)
|
|
213
|
-
].join(" "));
|
|
214
|
-
}
|
|
215
|
-
), d(() => {
|
|
216
|
-
}, () => {
|
|
217
|
-
u(b, "block text-sm font-medium text-primary mb-1");
|
|
218
|
-
}), B(), $();
|
|
219
|
-
var V = te(), P = k(V);
|
|
220
|
-
{
|
|
221
|
-
var D = (m) => {
|
|
222
|
-
var o = ee(), E = k(o);
|
|
223
|
-
H(() => {
|
|
224
|
-
J(o, "for", x), L(o, 1, O(r(b))), K(E, y());
|
|
225
|
-
}), z(m, o);
|
|
226
|
-
};
|
|
227
|
-
R(P, (m) => {
|
|
228
|
-
y() && m(D);
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
var S = G(P, 2);
|
|
232
|
-
A(S, () => ({
|
|
233
|
-
id: x,
|
|
234
|
-
value: f(),
|
|
235
|
-
placeholder: p(),
|
|
236
|
-
disabled: v(),
|
|
237
|
-
rows: C(),
|
|
238
|
-
class: r(h),
|
|
239
|
-
...i
|
|
240
|
-
})), F("input", S, j), z(t, V), T();
|
|
241
|
-
}
|
|
242
|
-
var ae = I('<label class="text-sm font-medium cursor-pointer"> </label>'), se = I('<div class="flex items-center gap-2"><input/> <!></div>');
|
|
243
|
-
function be(t, e) {
|
|
244
|
-
const s = _(e, ["children", "$$slots", "$$events", "$$legacy"]), i = _(s, ["checked", "disabled", "label"]);
|
|
245
|
-
q(e, !1);
|
|
246
|
-
const l = c();
|
|
247
|
-
let n = a(e, "checked", 12, !1), h = a(e, "disabled", 8, !1), b = a(e, "label", 8, "");
|
|
248
|
-
const f = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
249
|
-
function y(g) {
|
|
250
|
-
const x = g.target;
|
|
251
|
-
n(x.checked);
|
|
252
|
-
}
|
|
253
|
-
d(() => {
|
|
254
|
-
}, () => {
|
|
255
|
-
u(l, [
|
|
256
|
-
"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded",
|
|
257
|
-
"focus:ring-blue-500 focus:ring-2",
|
|
258
|
-
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
259
|
-
].join(" "));
|
|
260
|
-
}), B(), $();
|
|
261
|
-
var p = se(), v = k(p);
|
|
262
|
-
A(
|
|
263
|
-
v,
|
|
264
|
-
() => ({
|
|
265
|
-
type: "checkbox",
|
|
266
|
-
id: f,
|
|
267
|
-
checked: n(),
|
|
268
|
-
disabled: h(),
|
|
269
|
-
class: r(l),
|
|
270
|
-
...i
|
|
271
|
-
}),
|
|
272
|
-
void 0,
|
|
273
|
-
void 0,
|
|
274
|
-
void 0,
|
|
275
|
-
!0
|
|
276
|
-
);
|
|
277
|
-
var C = G(v, 2);
|
|
278
|
-
{
|
|
279
|
-
var w = (g) => {
|
|
280
|
-
var x = ae(), j = k(x);
|
|
281
|
-
H(() => {
|
|
282
|
-
J(x, "for", f), K(j, b());
|
|
283
|
-
}), z(g, x);
|
|
284
|
-
};
|
|
285
|
-
R(C, (g) => {
|
|
286
|
-
b() && g(w);
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
F("change", v, y), z(t, p), T();
|
|
290
|
-
}
|
|
291
|
-
export {
|
|
292
|
-
ne as B,
|
|
293
|
-
be as C,
|
|
294
|
-
ce as I,
|
|
295
|
-
ue as T,
|
|
296
|
-
ie as a,
|
|
297
|
-
N as b,
|
|
298
|
-
oe as c,
|
|
299
|
-
de as d,
|
|
300
|
-
re as e,
|
|
301
|
-
Q as g
|
|
302
|
-
};
|