componenteszw-package 1.0.17 → 1.0.21
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.
- package/dist/Blur.d.ts +6 -0
- package/dist/Card.d.ts +3 -0
- package/dist/Modal.d.ts +12 -0
- package/dist/Select.d.ts +7 -0
- package/dist/button.d.ts +4 -3
- package/dist/checkbox.d.ts +6 -1
- package/dist/file.d.ts +9 -1
- package/dist/fileItem.d.ts +8 -0
- package/dist/index.css +1 -1
- package/dist/index.js +328 -342
- package/dist/input.d.ts +5 -1
- package/dist/table.d.ts +3 -1
- package/dist/textarea.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,151 +1,64 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import t, { createElement as n, forwardRef as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
3
3
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
|
-
//#region src/button.tsx
|
|
5
|
-
var d = ({ text: e, iconLeft: t, iconRight: n, variant: r = "primary", size: i = "medium", state: a = "default", disabled: o = !1, onClick: s, type: c = "button", className: d = "" }) => /* @__PURE__ */ u("button", {
|
|
6
|
-
type: c,
|
|
7
|
-
onClick: s,
|
|
8
|
-
disabled: o,
|
|
9
|
-
className: `
|
|
10
|
-
|
|
11
|
-
flex items-center justify-center gap-2 rounded-md font-medium
|
|
12
|
-
transition-all duration-200
|
|
13
|
-
focus:outline-none focus:ring-2 focus:ring-offset-2
|
|
14
|
-
active:scale-95
|
|
15
|
-
|
|
16
|
-
${{
|
|
17
|
-
small: "px-3 py-1.5 text-sm",
|
|
18
|
-
medium: "px-4 py-2 text-sm"
|
|
19
|
-
}[i]}
|
|
20
|
-
${{
|
|
21
|
-
primary: "bg-green-600 text-white hover:bg-green-700 focus:ring-green-500",
|
|
22
|
-
secondary: "bg-gray-200 text-black hover:bg-gray-300 focus:ring-gray-400",
|
|
23
|
-
tertiary: "bg-orange-400 text-white hover:bg-orange-500 focus:ring-orange-400",
|
|
24
|
-
success: "bg-green-500 text-white hover:bg-green-600 focus:ring-green-400",
|
|
25
|
-
warning: "bg-yellow-400 text-black hover:bg-yellow-500 focus:ring-yellow-300",
|
|
26
|
-
destructive: "bg-red-500 text-white hover:bg-red-600 focus:ring-red-400"
|
|
27
|
-
}[r]}
|
|
28
|
-
${{
|
|
29
|
-
default: "",
|
|
30
|
-
hover: "brightness-90",
|
|
31
|
-
focus: "ring-2 ring-offset-2",
|
|
32
|
-
disabled: "opacity-50 cursor-not-allowed"
|
|
33
|
-
}[a]}
|
|
34
|
-
${o ? "opacity-50 cursor-not-allowed" : ""}
|
|
35
|
-
${d}
|
|
36
|
-
`,
|
|
37
|
-
children: [
|
|
38
|
-
t && /* @__PURE__ */ l("span", {
|
|
39
|
-
className: "flex items-center",
|
|
40
|
-
children: t
|
|
41
|
-
}),
|
|
42
|
-
e && /* @__PURE__ */ l("span", { children: e }),
|
|
43
|
-
n && /* @__PURE__ */ l("span", {
|
|
44
|
-
className: "flex items-center",
|
|
45
|
-
children: n
|
|
46
|
-
})
|
|
47
|
-
]
|
|
48
|
-
}), f = ({ label: e, placeholder: t, value: n, hintText: r, required: i, state: a = "default", size: o = "medium", type: s = "text", iconRight: c, disabled: d, onChange: f, className: p = "" }) => /* @__PURE__ */ u("div", {
|
|
49
|
-
className: "flex flex-col gap-1 w-full",
|
|
50
|
-
children: [
|
|
51
|
-
e && /* @__PURE__ */ u("label", {
|
|
52
|
-
className: "text-sm font-medium",
|
|
53
|
-
children: [
|
|
54
|
-
e,
|
|
55
|
-
" ",
|
|
56
|
-
i && /* @__PURE__ */ l("span", {
|
|
57
|
-
className: "text-red-500",
|
|
58
|
-
children: "*"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
}),
|
|
62
|
-
/* @__PURE__ */ u("div", {
|
|
63
|
-
className: "relative",
|
|
64
|
-
children: [/* @__PURE__ */ l("input", {
|
|
65
|
-
type: s,
|
|
66
|
-
value: n,
|
|
67
|
-
placeholder: t,
|
|
68
|
-
disabled: d,
|
|
69
|
-
onChange: (e) => f?.(e.target.value),
|
|
70
|
-
className: `w-full rounded-md border ${{
|
|
71
|
-
small: "px-2 py-1 text-sm",
|
|
72
|
-
medium: "px-3 py-2 text-sm",
|
|
73
|
-
large: "px-4 py-3 text-base"
|
|
74
|
-
}[o]} ${{
|
|
75
|
-
default: "border-gray-300 focus:border-green-500",
|
|
76
|
-
error: "border-red-500",
|
|
77
|
-
disabled: "bg-gray-100 cursor-not-allowed"
|
|
78
|
-
}[a]} outline-none ${p}`
|
|
79
|
-
}), c && /* @__PURE__ */ l("div", {
|
|
80
|
-
className: "absolute right-3 top-1/2 -translate-y-1/2",
|
|
81
|
-
children: c
|
|
82
|
-
})]
|
|
83
|
-
}),
|
|
84
|
-
r && /* @__PURE__ */ l("span", {
|
|
85
|
-
className: `text-xs ${a === "error" ? "text-red-500" : "text-gray-500"}`,
|
|
86
|
-
children: r
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
//#endregion
|
|
91
4
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
92
|
-
function
|
|
5
|
+
function d(e) {
|
|
93
6
|
var t, n, r = "";
|
|
94
7
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
95
8
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
96
9
|
var i = e.length;
|
|
97
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
10
|
+
for (t = 0; t < i; t++) e[t] && (n = d(e[t])) && (r && (r += " "), r += n);
|
|
98
11
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
99
12
|
return r;
|
|
100
13
|
}
|
|
101
|
-
function
|
|
102
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
14
|
+
function f() {
|
|
15
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = d(e)) && (r && (r += " "), r += t);
|
|
103
16
|
return r;
|
|
104
17
|
}
|
|
105
18
|
//#endregion
|
|
106
19
|
//#region node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
107
|
-
var
|
|
108
|
-
let t =
|
|
20
|
+
var p = "-", m = (e) => {
|
|
21
|
+
let t = v(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
109
22
|
return {
|
|
110
23
|
getClassGroupId: (e) => {
|
|
111
|
-
let n = e.split(
|
|
112
|
-
return n[0] === "" && n.length !== 1 && n.shift(),
|
|
24
|
+
let n = e.split(p);
|
|
25
|
+
return n[0] === "" && n.length !== 1 && n.shift(), h(n, t) || _(e);
|
|
113
26
|
},
|
|
114
27
|
getConflictingClassGroupIds: (e, t) => {
|
|
115
28
|
let i = n[e] || [];
|
|
116
29
|
return t && r[e] ? [...i, ...r[e]] : i;
|
|
117
30
|
}
|
|
118
31
|
};
|
|
119
|
-
},
|
|
32
|
+
}, h = (e, t) => {
|
|
120
33
|
if (e.length === 0) return t.classGroupId;
|
|
121
|
-
let n = e[0], r = t.nextPart.get(n), i = r ?
|
|
34
|
+
let n = e[0], r = t.nextPart.get(n), i = r ? h(e.slice(1), r) : void 0;
|
|
122
35
|
if (i) return i;
|
|
123
36
|
if (t.validators.length === 0) return;
|
|
124
|
-
let a = e.join(
|
|
37
|
+
let a = e.join(p);
|
|
125
38
|
return t.validators.find(({ validator: e }) => e(a))?.classGroupId;
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
128
|
-
let t =
|
|
39
|
+
}, g = /^\[(.+)\]$/, _ = (e) => {
|
|
40
|
+
if (g.test(e)) {
|
|
41
|
+
let t = g.exec(e)[1], n = t?.substring(0, t.indexOf(":"));
|
|
129
42
|
if (n) return "arbitrary.." + n;
|
|
130
43
|
}
|
|
131
|
-
},
|
|
44
|
+
}, v = (e) => {
|
|
132
45
|
let { theme: t, prefix: n } = e, r = {
|
|
133
46
|
nextPart: /* @__PURE__ */ new Map(),
|
|
134
47
|
validators: []
|
|
135
48
|
};
|
|
136
|
-
return
|
|
137
|
-
|
|
49
|
+
return S(Object.entries(e.classGroups), n).forEach(([e, n]) => {
|
|
50
|
+
y(n, r, e, t);
|
|
138
51
|
}), r;
|
|
139
|
-
},
|
|
52
|
+
}, y = (e, t, n, r) => {
|
|
140
53
|
e.forEach((e) => {
|
|
141
54
|
if (typeof e == "string") {
|
|
142
|
-
let r = e === "" ? t :
|
|
55
|
+
let r = e === "" ? t : b(t, e);
|
|
143
56
|
r.classGroupId = n;
|
|
144
57
|
return;
|
|
145
58
|
}
|
|
146
59
|
if (typeof e == "function") {
|
|
147
|
-
if (
|
|
148
|
-
|
|
60
|
+
if (x(e)) {
|
|
61
|
+
y(e(r), t, n, r);
|
|
149
62
|
return;
|
|
150
63
|
}
|
|
151
64
|
t.validators.push({
|
|
@@ -155,18 +68,18 @@ var h = "-", g = (e) => {
|
|
|
155
68
|
return;
|
|
156
69
|
}
|
|
157
70
|
Object.entries(e).forEach(([e, i]) => {
|
|
158
|
-
|
|
71
|
+
y(i, b(t, e), n, r);
|
|
159
72
|
});
|
|
160
73
|
});
|
|
161
|
-
},
|
|
74
|
+
}, b = (e, t) => {
|
|
162
75
|
let n = e;
|
|
163
|
-
return t.split(
|
|
76
|
+
return t.split(p).forEach((e) => {
|
|
164
77
|
n.nextPart.has(e) || n.nextPart.set(e, {
|
|
165
78
|
nextPart: /* @__PURE__ */ new Map(),
|
|
166
79
|
validators: []
|
|
167
80
|
}), n = n.nextPart.get(e);
|
|
168
81
|
}), n;
|
|
169
|
-
},
|
|
82
|
+
}, x = (e) => e.isThemeGetter, S = (e, t) => t ? e.map(([e, n]) => [e, n.map((e) => typeof e == "string" ? t + e : typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, n]) => [t + e, n])) : e)]) : e, C = (e) => {
|
|
170
83
|
if (e < 1) return {
|
|
171
84
|
get: () => void 0,
|
|
172
85
|
set: () => {}
|
|
@@ -184,7 +97,7 @@ var h = "-", g = (e) => {
|
|
|
184
97
|
n.has(e) ? n.set(e, t) : i(e, t);
|
|
185
98
|
}
|
|
186
99
|
};
|
|
187
|
-
},
|
|
100
|
+
}, w = "!", T = (e) => {
|
|
188
101
|
let { separator: t, experimentalParseClassName: n } = e, r = t.length === 1, i = t[0], a = t.length, o = (e) => {
|
|
189
102
|
let n = [], o = 0, s = 0, c;
|
|
190
103
|
for (let l = 0; l < e.length; l++) {
|
|
@@ -201,7 +114,7 @@ var h = "-", g = (e) => {
|
|
|
201
114
|
}
|
|
202
115
|
u === "[" ? o++ : u === "]" && o--;
|
|
203
116
|
}
|
|
204
|
-
let l = n.length === 0 ? e : e.substring(s), u = l.startsWith(
|
|
117
|
+
let l = n.length === 0 ? e : e.substring(s), u = l.startsWith(w);
|
|
205
118
|
return {
|
|
206
119
|
modifiers: n,
|
|
207
120
|
hasImportantModifier: u,
|
|
@@ -213,18 +126,18 @@ var h = "-", g = (e) => {
|
|
|
213
126
|
className: e,
|
|
214
127
|
parseClassName: o
|
|
215
128
|
}) : o;
|
|
216
|
-
},
|
|
129
|
+
}, E = (e) => {
|
|
217
130
|
if (e.length <= 1) return e;
|
|
218
131
|
let t = [], n = [];
|
|
219
132
|
return e.forEach((e) => {
|
|
220
133
|
e[0] === "[" ? (t.push(...n.sort(), e), n = []) : n.push(e);
|
|
221
134
|
}), t.push(...n.sort()), t;
|
|
222
|
-
},
|
|
223
|
-
cache:
|
|
224
|
-
parseClassName:
|
|
225
|
-
...
|
|
226
|
-
}),
|
|
227
|
-
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i } = t, a = [], o = e.trim().split(
|
|
135
|
+
}, D = (e) => ({
|
|
136
|
+
cache: C(e.cacheSize),
|
|
137
|
+
parseClassName: T(e),
|
|
138
|
+
...m(e)
|
|
139
|
+
}), O = /\s+/, k = (e, t) => {
|
|
140
|
+
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i } = t, a = [], o = e.trim().split(O), s = "";
|
|
228
141
|
for (let e = o.length - 1; e >= 0; --e) {
|
|
229
142
|
let t = o[e], { modifiers: c, hasImportantModifier: l, baseClassName: u, maybePostfixModifierPosition: d } = n(t), f = !!d, p = r(f ? u.substring(0, d) : u);
|
|
230
143
|
if (!p) {
|
|
@@ -238,7 +151,7 @@ var h = "-", g = (e) => {
|
|
|
238
151
|
}
|
|
239
152
|
f = !1;
|
|
240
153
|
}
|
|
241
|
-
let m =
|
|
154
|
+
let m = E(c).join(":"), h = l ? m + w : m, g = h + p;
|
|
242
155
|
if (a.includes(g)) continue;
|
|
243
156
|
a.push(g);
|
|
244
157
|
let _ = i(p, f);
|
|
@@ -250,48 +163,48 @@ var h = "-", g = (e) => {
|
|
|
250
163
|
}
|
|
251
164
|
return s;
|
|
252
165
|
};
|
|
253
|
-
function
|
|
166
|
+
function A() {
|
|
254
167
|
let e = 0, t, n, r = "";
|
|
255
|
-
for (; e < arguments.length;) (t = arguments[e++]) && (n =
|
|
168
|
+
for (; e < arguments.length;) (t = arguments[e++]) && (n = j(t)) && (r && (r += " "), r += n);
|
|
256
169
|
return r;
|
|
257
170
|
}
|
|
258
|
-
var
|
|
171
|
+
var j = (e) => {
|
|
259
172
|
if (typeof e == "string") return e;
|
|
260
173
|
let t, n = "";
|
|
261
|
-
for (let r = 0; r < e.length; r++) e[r] && (t =
|
|
174
|
+
for (let r = 0; r < e.length; r++) e[r] && (t = j(e[r])) && (n && (n += " "), n += t);
|
|
262
175
|
return n;
|
|
263
176
|
};
|
|
264
|
-
function
|
|
177
|
+
function M(e, ...t) {
|
|
265
178
|
let n, r, i, a = o;
|
|
266
179
|
function o(o) {
|
|
267
|
-
return n =
|
|
180
|
+
return n = D(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o);
|
|
268
181
|
}
|
|
269
182
|
function s(e) {
|
|
270
183
|
let t = r(e);
|
|
271
184
|
if (t) return t;
|
|
272
|
-
let a =
|
|
185
|
+
let a = k(e, n);
|
|
273
186
|
return i(e, a), a;
|
|
274
187
|
}
|
|
275
188
|
return function() {
|
|
276
|
-
return a(
|
|
189
|
+
return a(A.apply(null, arguments));
|
|
277
190
|
};
|
|
278
191
|
}
|
|
279
|
-
var
|
|
192
|
+
var N = (e) => {
|
|
280
193
|
let t = (t) => t[e] || [];
|
|
281
194
|
return t.isThemeGetter = !0, t;
|
|
282
|
-
},
|
|
195
|
+
}, P = /^\[(?:([a-z-]+):)?(.+)\]$/i, F = /^\d+\/\d+$/, I = /* @__PURE__ */ new Set([
|
|
283
196
|
"px",
|
|
284
197
|
"full",
|
|
285
198
|
"screen"
|
|
286
|
-
]),
|
|
199
|
+
]), L = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, R = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ee = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, te = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ne = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, z = (e) => V(e) || I.has(e) || F.test(e), B = (e) => q(e, "length", ue), V = (e) => !!e && !Number.isNaN(Number(e)), H = (e) => q(e, "number", V), U = (e) => !!e && Number.isInteger(Number(e)), re = (e) => e.endsWith("%") && V(e.slice(0, -1)), W = (e) => P.test(e), G = (e) => L.test(e), ie = /* @__PURE__ */ new Set([
|
|
287
200
|
"length",
|
|
288
201
|
"size",
|
|
289
202
|
"percentage"
|
|
290
|
-
]),
|
|
291
|
-
let r =
|
|
203
|
+
]), ae = (e) => q(e, ie, J), oe = (e) => q(e, "position", J), se = /* @__PURE__ */ new Set(["image", "url"]), ce = (e) => q(e, se, fe), le = (e) => q(e, "", de), K = () => !0, q = (e, t, n) => {
|
|
204
|
+
let r = P.exec(e);
|
|
292
205
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
293
|
-
},
|
|
294
|
-
let e =
|
|
206
|
+
}, ue = (e) => R.test(e) && !ee.test(e), J = () => !1, de = (e) => te.test(e), fe = (e) => ne.test(e), pe = /* @__PURE__ */ M(() => {
|
|
207
|
+
let e = N("colors"), t = N("spacing"), n = N("blur"), r = N("brightness"), i = N("borderColor"), a = N("borderRadius"), o = N("borderSpacing"), s = N("borderWidth"), c = N("contrast"), l = N("grayscale"), u = N("hueRotate"), d = N("invert"), f = N("gap"), p = N("gradientColorStops"), m = N("gradientColorStopPositions"), h = N("inset"), g = N("margin"), _ = N("opacity"), v = N("padding"), y = N("saturate"), b = N("scale"), x = N("sepia"), S = N("skew"), C = N("space"), w = N("translate"), T = () => [
|
|
295
208
|
"auto",
|
|
296
209
|
"contain",
|
|
297
210
|
"none"
|
|
@@ -329,7 +242,7 @@ var F = (e) => {
|
|
|
329
242
|
"dotted",
|
|
330
243
|
"double",
|
|
331
244
|
"none"
|
|
332
|
-
],
|
|
245
|
+
], P = () => [
|
|
333
246
|
"normal",
|
|
334
247
|
"multiply",
|
|
335
248
|
"screen",
|
|
@@ -346,7 +259,7 @@ var F = (e) => {
|
|
|
346
259
|
"saturation",
|
|
347
260
|
"color",
|
|
348
261
|
"luminosity"
|
|
349
|
-
],
|
|
262
|
+
], F = () => [
|
|
350
263
|
"start",
|
|
351
264
|
"end",
|
|
352
265
|
"center",
|
|
@@ -397,7 +310,7 @@ var F = (e) => {
|
|
|
397
310
|
invert: I(),
|
|
398
311
|
gap: O(),
|
|
399
312
|
gradientColorStops: [e],
|
|
400
|
-
gradientColorStopPositions: [
|
|
313
|
+
gradientColorStopPositions: [re, B],
|
|
401
314
|
inset: D(),
|
|
402
315
|
margin: D(),
|
|
403
316
|
opacity: R(),
|
|
@@ -579,7 +492,7 @@ var F = (e) => {
|
|
|
579
492
|
gap: [{ gap: [f] }],
|
|
580
493
|
"gap-x": [{ "gap-x": [f] }],
|
|
581
494
|
"gap-y": [{ "gap-y": [f] }],
|
|
582
|
-
"justify-content": [{ justify: ["normal", ...
|
|
495
|
+
"justify-content": [{ justify: ["normal", ...F()] }],
|
|
583
496
|
"justify-items": [{ "justify-items": [
|
|
584
497
|
"start",
|
|
585
498
|
"end",
|
|
@@ -595,7 +508,7 @@ var F = (e) => {
|
|
|
595
508
|
] }],
|
|
596
509
|
"align-content": [{ content: [
|
|
597
510
|
"normal",
|
|
598
|
-
...
|
|
511
|
+
...F(),
|
|
599
512
|
"baseline"
|
|
600
513
|
] }],
|
|
601
514
|
"align-items": [{ items: [
|
|
@@ -613,7 +526,7 @@ var F = (e) => {
|
|
|
613
526
|
"stretch",
|
|
614
527
|
"baseline"
|
|
615
528
|
] }],
|
|
616
|
-
"place-content": [{ "place-content": [...
|
|
529
|
+
"place-content": [{ "place-content": [...F(), "baseline"] }],
|
|
617
530
|
"place-items": [{ "place-items": [
|
|
618
531
|
"start",
|
|
619
532
|
"end",
|
|
@@ -874,7 +787,7 @@ var F = (e) => {
|
|
|
874
787
|
"padding",
|
|
875
788
|
"content"
|
|
876
789
|
] }],
|
|
877
|
-
"bg-position": [{ bg: [...j(),
|
|
790
|
+
"bg-position": [{ bg: [...j(), oe] }],
|
|
878
791
|
"bg-repeat": [{ bg: ["no-repeat", { repeat: [
|
|
879
792
|
"",
|
|
880
793
|
"x",
|
|
@@ -886,7 +799,7 @@ var F = (e) => {
|
|
|
886
799
|
"auto",
|
|
887
800
|
"cover",
|
|
888
801
|
"contain",
|
|
889
|
-
|
|
802
|
+
ae
|
|
890
803
|
] }],
|
|
891
804
|
"bg-image": [{ bg: [
|
|
892
805
|
"none",
|
|
@@ -900,7 +813,7 @@ var F = (e) => {
|
|
|
900
813
|
"l",
|
|
901
814
|
"tl"
|
|
902
815
|
] },
|
|
903
|
-
|
|
816
|
+
ce
|
|
904
817
|
] }],
|
|
905
818
|
"bg-color": [{ bg: [e] }],
|
|
906
819
|
"gradient-from-pos": [{ from: [m] }],
|
|
@@ -966,16 +879,16 @@ var F = (e) => {
|
|
|
966
879
|
"inner",
|
|
967
880
|
"none",
|
|
968
881
|
G,
|
|
969
|
-
|
|
882
|
+
le
|
|
970
883
|
] }],
|
|
971
884
|
"shadow-color": [{ shadow: [K] }],
|
|
972
885
|
opacity: [{ opacity: [_] }],
|
|
973
886
|
"mix-blend": [{ "mix-blend": [
|
|
974
|
-
...
|
|
887
|
+
...P(),
|
|
975
888
|
"plus-lighter",
|
|
976
889
|
"plus-darker"
|
|
977
890
|
] }],
|
|
978
|
-
"bg-blend": [{ "bg-blend":
|
|
891
|
+
"bg-blend": [{ "bg-blend": P() }],
|
|
979
892
|
filter: [{ filter: ["", "none"] }],
|
|
980
893
|
blur: [{ blur: [n] }],
|
|
981
894
|
brightness: [{ brightness: [r] }],
|
|
@@ -1321,18 +1234,97 @@ var F = (e) => {
|
|
|
1321
1234
|
});
|
|
1322
1235
|
//#endregion
|
|
1323
1236
|
//#region src/lib/utils.ts
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1237
|
+
function Y(...e) {
|
|
1238
|
+
return pe(f(e));
|
|
1326
1239
|
}
|
|
1327
1240
|
//#endregion
|
|
1241
|
+
//#region src/button.tsx
|
|
1242
|
+
var X = ({ text: e, iconLeft: t, iconRight: n, variant: r = "primary", size: i = "medium", disabled: a = !1, loading: o = !1, onClick: s, type: c = "button", className: d, textClassName: f, iconClassName: p }) => {
|
|
1243
|
+
let m = {
|
|
1244
|
+
small: "px-3 py-1.5 text-sm",
|
|
1245
|
+
medium: "px-4 py-2 text-sm"
|
|
1246
|
+
}, h = {
|
|
1247
|
+
primary: "bg-green-600 text-white hover:bg-green-700 focus:ring-green-500",
|
|
1248
|
+
secondary: "bg-gray-200 text-black hover:bg-gray-300 focus:ring-gray-400",
|
|
1249
|
+
tertiary: "bg-orange-400 text-white hover:bg-orange-500 focus:ring-orange-400",
|
|
1250
|
+
success: "bg-green-500 text-white hover:bg-green-600 focus:ring-green-400",
|
|
1251
|
+
warning: "bg-yellow-400 text-black hover:bg-yellow-500 focus:ring-yellow-300",
|
|
1252
|
+
destructive: "bg-red-500 text-white hover:bg-red-600 focus:ring-red-400"
|
|
1253
|
+
}, g = a || o;
|
|
1254
|
+
return /* @__PURE__ */ u("button", {
|
|
1255
|
+
type: c,
|
|
1256
|
+
onClick: s,
|
|
1257
|
+
disabled: g,
|
|
1258
|
+
className: Y("flex items-center justify-center gap-2 rounded-md font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 active:scale-95", m[i], h[r], g && "opacity-50 cursor-not-allowed", d),
|
|
1259
|
+
children: [
|
|
1260
|
+
o ? /* @__PURE__ */ l("span", {
|
|
1261
|
+
className: "animate-spin",
|
|
1262
|
+
children: "⏳"
|
|
1263
|
+
}) : t && /* @__PURE__ */ l("span", {
|
|
1264
|
+
className: Y("flex items-center", p),
|
|
1265
|
+
children: t
|
|
1266
|
+
}),
|
|
1267
|
+
e && /* @__PURE__ */ l("span", {
|
|
1268
|
+
className: Y(f),
|
|
1269
|
+
children: o ? "Cargando..." : e
|
|
1270
|
+
}),
|
|
1271
|
+
!o && n && /* @__PURE__ */ l("span", {
|
|
1272
|
+
className: Y("flex items-center", p),
|
|
1273
|
+
children: n
|
|
1274
|
+
})
|
|
1275
|
+
]
|
|
1276
|
+
});
|
|
1277
|
+
}, me = ({ label: e, placeholder: t, value: n, hintText: r, required: i, state: a = "default", size: o = "medium", type: s = "text", iconRight: c, disabled: d, onChange: f, className: p, inputClassName: m, labelClassName: h, hintClassName: g, iconClassName: _ }) => /* @__PURE__ */ u("div", {
|
|
1278
|
+
className: Y("flex flex-col gap-1 w-full", p),
|
|
1279
|
+
children: [
|
|
1280
|
+
e && /* @__PURE__ */ u("label", {
|
|
1281
|
+
className: Y("text-sm font-medium", h),
|
|
1282
|
+
children: [
|
|
1283
|
+
e,
|
|
1284
|
+
" ",
|
|
1285
|
+
i && /* @__PURE__ */ l("span", {
|
|
1286
|
+
className: "text-red-500",
|
|
1287
|
+
children: "*"
|
|
1288
|
+
})
|
|
1289
|
+
]
|
|
1290
|
+
}),
|
|
1291
|
+
/* @__PURE__ */ u("div", {
|
|
1292
|
+
className: "relative",
|
|
1293
|
+
children: [/* @__PURE__ */ l("input", {
|
|
1294
|
+
type: s,
|
|
1295
|
+
value: n,
|
|
1296
|
+
placeholder: t,
|
|
1297
|
+
disabled: d || a === "disabled",
|
|
1298
|
+
onChange: (e) => f?.(e.target.value),
|
|
1299
|
+
className: Y("w-full rounded-md border outline-none", {
|
|
1300
|
+
small: "px-2 py-1 text-sm",
|
|
1301
|
+
medium: "px-3 py-2 text-sm",
|
|
1302
|
+
large: "px-4 py-3 text-base"
|
|
1303
|
+
}[o], {
|
|
1304
|
+
default: "border-gray-300 focus:border-green-500",
|
|
1305
|
+
error: "border-red-500 focus:border-red-500",
|
|
1306
|
+
disabled: "bg-gray-100 cursor-not-allowed"
|
|
1307
|
+
}[a], c && "pr-10", m)
|
|
1308
|
+
}), c && /* @__PURE__ */ l("div", {
|
|
1309
|
+
className: Y("absolute right-3 top-1/2 -translate-y-1/2", _),
|
|
1310
|
+
children: c
|
|
1311
|
+
})]
|
|
1312
|
+
}),
|
|
1313
|
+
r && /* @__PURE__ */ l("span", {
|
|
1314
|
+
className: Y("text-xs", a === "error" ? "text-red-500" : "text-gray-500", g),
|
|
1315
|
+
children: r
|
|
1316
|
+
})
|
|
1317
|
+
]
|
|
1318
|
+
});
|
|
1319
|
+
//#endregion
|
|
1328
1320
|
//#region src/textarea.tsx
|
|
1329
|
-
function he({ label: t, placeholder: n, value: r = "", hintText: i, required: a, state: o = "default", maxLength: s, showCounter: c, disabled: d, onChange: f, className: p }) {
|
|
1330
|
-
let [
|
|
1321
|
+
function he({ label: t, placeholder: n, value: r = "", hintText: i, required: a, state: o = "default", maxLength: s, showCounter: c, disabled: d, onChange: f, className: p, textareaClassName: m, labelClassName: h, hintClassName: g }) {
|
|
1322
|
+
let [_, v] = e.useState(r), y = r ?? _;
|
|
1331
1323
|
return /* @__PURE__ */ u("div", {
|
|
1332
|
-
className:
|
|
1324
|
+
className: Y("flex flex-col gap-1", p),
|
|
1333
1325
|
children: [
|
|
1334
1326
|
t && /* @__PURE__ */ u("label", {
|
|
1335
|
-
className: "text-sm font-medium",
|
|
1327
|
+
className: Y("text-sm font-medium", h),
|
|
1336
1328
|
children: [
|
|
1337
1329
|
t,
|
|
1338
1330
|
" ",
|
|
@@ -1343,24 +1335,24 @@ function he({ label: t, placeholder: n, value: r = "", hintText: i, required: a,
|
|
|
1343
1335
|
]
|
|
1344
1336
|
}),
|
|
1345
1337
|
/* @__PURE__ */ l("textarea", {
|
|
1346
|
-
value:
|
|
1338
|
+
value: y,
|
|
1347
1339
|
placeholder: n,
|
|
1348
1340
|
onChange: (e) => {
|
|
1349
1341
|
let t = e.target.value;
|
|
1350
|
-
s && t.length > s || (
|
|
1342
|
+
s && t.length > s || (v(t), f?.(t));
|
|
1351
1343
|
},
|
|
1352
1344
|
disabled: d || o === "disabled",
|
|
1353
|
-
className:
|
|
1345
|
+
className: Y("w-full min-h-[100px] rounded-md border px-3 py-2 text-sm outline-none resize-none transition", "focus:ring-2 focus:ring-primary", o === "error" && "border-red-500 focus:ring-red-500", o === "default" && "border-gray-300", (d || o === "disabled") && "bg-gray-100 cursor-not-allowed opacity-70", m)
|
|
1354
1346
|
}),
|
|
1355
1347
|
/* @__PURE__ */ u("div", {
|
|
1356
1348
|
className: "flex justify-between items-center text-xs",
|
|
1357
1349
|
children: [i && /* @__PURE__ */ l("span", {
|
|
1358
|
-
className:
|
|
1350
|
+
className: Y(o === "error" ? "text-red-500" : "text-gray-500", g),
|
|
1359
1351
|
children: i
|
|
1360
1352
|
}), c && s && /* @__PURE__ */ u("span", {
|
|
1361
|
-
className: "text-gray-400",
|
|
1353
|
+
className: Y("text-gray-400", g),
|
|
1362
1354
|
children: [
|
|
1363
|
-
|
|
1355
|
+
y.length,
|
|
1364
1356
|
"/",
|
|
1365
1357
|
s
|
|
1366
1358
|
]
|
|
@@ -1456,16 +1448,16 @@ var ge = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), _e = (e)
|
|
|
1456
1448
|
}]]);
|
|
1457
1449
|
//#endregion
|
|
1458
1450
|
//#region src/checkbox.tsx
|
|
1459
|
-
function Ee({ label: t, checked: n = !1, indeterminate: r = !1, disabled: i, hintText: a, onChange: o }) {
|
|
1460
|
-
let
|
|
1451
|
+
function Ee({ label: t, checked: n = !1, indeterminate: r = !1, disabled: i, hintText: a, onChange: o, className: s, checkboxClassName: c, labelClassName: d, hintClassName: f, iconClassName: p }) {
|
|
1452
|
+
let m = e.useId();
|
|
1461
1453
|
return /* @__PURE__ */ u("div", {
|
|
1462
|
-
className: "flex flex-col gap-1",
|
|
1454
|
+
className: Y("flex flex-col gap-1", s),
|
|
1463
1455
|
children: [/* @__PURE__ */ u("label", {
|
|
1464
|
-
htmlFor:
|
|
1465
|
-
className:
|
|
1456
|
+
htmlFor: m,
|
|
1457
|
+
className: Y("flex items-center gap-2 cursor-pointer", i && "opacity-50 cursor-not-allowed", d),
|
|
1466
1458
|
children: [
|
|
1467
1459
|
/* @__PURE__ */ l("input", {
|
|
1468
|
-
id:
|
|
1460
|
+
id: m,
|
|
1469
1461
|
type: "checkbox",
|
|
1470
1462
|
checked: n,
|
|
1471
1463
|
disabled: i,
|
|
@@ -1473,8 +1465,14 @@ function Ee({ label: t, checked: n = !1, indeterminate: r = !1, disabled: i, hin
|
|
|
1473
1465
|
className: "hidden"
|
|
1474
1466
|
}),
|
|
1475
1467
|
/* @__PURE__ */ l("div", {
|
|
1476
|
-
className:
|
|
1477
|
-
children: r ? /* @__PURE__ */ l(Ce, {
|
|
1468
|
+
className: Y("w-4 h-4 flex items-center justify-center rounded border transition", n || r ? "bg-primary text-white border-primary" : "bg-white border-gray-300", c),
|
|
1469
|
+
children: r ? /* @__PURE__ */ l(Ce, {
|
|
1470
|
+
size: 12,
|
|
1471
|
+
className: p
|
|
1472
|
+
}) : n ? /* @__PURE__ */ l(xe, {
|
|
1473
|
+
size: 12,
|
|
1474
|
+
className: p
|
|
1475
|
+
}) : null
|
|
1478
1476
|
}),
|
|
1479
1477
|
t && /* @__PURE__ */ l("span", {
|
|
1480
1478
|
className: "text-sm",
|
|
@@ -1482,37 +1480,37 @@ function Ee({ label: t, checked: n = !1, indeterminate: r = !1, disabled: i, hin
|
|
|
1482
1480
|
})
|
|
1483
1481
|
]
|
|
1484
1482
|
}), a && /* @__PURE__ */ l("span", {
|
|
1485
|
-
className: "text-xs text-gray-500",
|
|
1483
|
+
className: Y("text-xs text-gray-500", f),
|
|
1486
1484
|
children: a
|
|
1487
1485
|
})]
|
|
1488
1486
|
});
|
|
1489
1487
|
}
|
|
1490
1488
|
//#endregion
|
|
1491
1489
|
//#region src/file.tsx
|
|
1492
|
-
function De({ multiple: t, maxSize: n = 5, acceptedFormats: r, onChange: i }) {
|
|
1493
|
-
let [
|
|
1490
|
+
function De({ multiple: t, maxSize: n = 5, acceptedFormats: r, onChange: i, className: a, dropzoneClassName: o, draggingClassName: s, labelClassName: c, buttonClassName: d, fileItemClassName: f, fileNameClassName: p, removeIconClassName: m }) {
|
|
1491
|
+
let [h, g] = e.useState([]), [_, v] = e.useState(!1), y = (e) => {
|
|
1494
1492
|
if (!e) return;
|
|
1495
|
-
let
|
|
1493
|
+
let a = Array.from(e).filter((e) => {
|
|
1496
1494
|
let t = e.size / 1024 / 1024 <= n, i = r ? r.includes(e.type) : !0;
|
|
1497
1495
|
return t && i;
|
|
1498
|
-
}),
|
|
1499
|
-
o
|
|
1496
|
+
}), o = t ? [...h, ...a] : a;
|
|
1497
|
+
g(o), i?.(o);
|
|
1500
1498
|
};
|
|
1501
1499
|
return /* @__PURE__ */ u("div", {
|
|
1502
|
-
className: "space-y-3",
|
|
1500
|
+
className: Y("space-y-3", a),
|
|
1503
1501
|
children: [/* @__PURE__ */ u("div", {
|
|
1504
1502
|
onDragOver: (e) => {
|
|
1505
|
-
e.preventDefault(),
|
|
1503
|
+
e.preventDefault(), v(!0);
|
|
1506
1504
|
},
|
|
1507
|
-
onDragLeave: () =>
|
|
1505
|
+
onDragLeave: () => v(!1),
|
|
1508
1506
|
onDrop: (e) => {
|
|
1509
|
-
e.preventDefault(),
|
|
1507
|
+
e.preventDefault(), v(!1), y(e.dataTransfer.files);
|
|
1510
1508
|
},
|
|
1511
|
-
className:
|
|
1509
|
+
className: Y("border-2 border-dashed rounded-lg p-6 text-center transition", _ ? "border-primary bg-primary/5" : "border-gray-300", _ && s, o),
|
|
1512
1510
|
children: [
|
|
1513
1511
|
/* @__PURE__ */ l(we, { className: "mx-auto mb-2" }),
|
|
1514
1512
|
/* @__PURE__ */ l("p", {
|
|
1515
|
-
className: "text-sm font-medium",
|
|
1513
|
+
className: Y("text-sm font-medium", c),
|
|
1516
1514
|
children: "Arrastra o selecciona un archivo"
|
|
1517
1515
|
}),
|
|
1518
1516
|
/* @__PURE__ */ u("p", {
|
|
@@ -1526,32 +1524,32 @@ function De({ multiple: t, maxSize: n = 5, acceptedFormats: r, onChange: i }) {
|
|
|
1526
1524
|
/* @__PURE__ */ l("input", {
|
|
1527
1525
|
type: "file",
|
|
1528
1526
|
multiple: t,
|
|
1529
|
-
onChange: (e) =>
|
|
1527
|
+
onChange: (e) => y(e.target.files),
|
|
1530
1528
|
className: "hidden",
|
|
1531
1529
|
id: "file-upload"
|
|
1532
1530
|
}),
|
|
1533
1531
|
/* @__PURE__ */ l("label", {
|
|
1534
1532
|
htmlFor: "file-upload",
|
|
1535
|
-
className: "inline-block mt-3 px-4 py-2 border rounded cursor-pointer",
|
|
1533
|
+
className: Y("inline-block mt-3 px-4 py-2 border rounded cursor-pointer", d),
|
|
1536
1534
|
children: "Seleccionar"
|
|
1537
1535
|
})
|
|
1538
1536
|
]
|
|
1539
1537
|
}), /* @__PURE__ */ l("div", {
|
|
1540
1538
|
className: "space-y-2",
|
|
1541
|
-
children:
|
|
1542
|
-
className: "flex items-center justify-between border p-2 rounded",
|
|
1539
|
+
children: h.map((e, t) => /* @__PURE__ */ u("div", {
|
|
1540
|
+
className: Y("flex items-center justify-between border p-2 rounded", f),
|
|
1543
1541
|
children: [/* @__PURE__ */ u("div", {
|
|
1544
1542
|
className: "flex items-center gap-2",
|
|
1545
1543
|
children: [/* @__PURE__ */ l(Se, { size: 16 }), /* @__PURE__ */ l("span", {
|
|
1546
|
-
className: "text-sm",
|
|
1544
|
+
className: Y("text-sm", p),
|
|
1547
1545
|
children: e.name
|
|
1548
1546
|
})]
|
|
1549
1547
|
}), /* @__PURE__ */ l(Te, {
|
|
1550
1548
|
size: 16,
|
|
1551
|
-
className: "cursor-pointer",
|
|
1549
|
+
className: Y("cursor-pointer", m),
|
|
1552
1550
|
onClick: () => {
|
|
1553
|
-
let e =
|
|
1554
|
-
|
|
1551
|
+
let e = h.filter((e, n) => n !== t);
|
|
1552
|
+
g(e), i?.(e);
|
|
1555
1553
|
}
|
|
1556
1554
|
})]
|
|
1557
1555
|
}, t))
|
|
@@ -1560,30 +1558,30 @@ function De({ multiple: t, maxSize: n = 5, acceptedFormats: r, onChange: i }) {
|
|
|
1560
1558
|
}
|
|
1561
1559
|
//#endregion
|
|
1562
1560
|
//#region src/fileItem.tsx
|
|
1563
|
-
var Oe = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "default", dropdownOptions: o = [], onMenuClick: s }) => {
|
|
1564
|
-
let [
|
|
1561
|
+
var Oe = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "default", dropdownOptions: o = [], onMenuClick: s, className: d, leftSectionClassName: f, titleClassName: p, subtitleClassName: m, iconClassName: h, menuButtonClassName: g, dropdownClassName: _, optionClassName: v }) => {
|
|
1562
|
+
let [y, b] = t.useState(!1), x = t.useRef(null), S = i || a === "loading";
|
|
1565
1563
|
return t.useEffect(() => {
|
|
1566
1564
|
function e(e) {
|
|
1567
|
-
|
|
1565
|
+
x.current && !x.current.contains(e.target) && b(!1);
|
|
1568
1566
|
}
|
|
1569
1567
|
return document.addEventListener("mousedown", e), () => {
|
|
1570
1568
|
document.removeEventListener("mousedown", e);
|
|
1571
1569
|
};
|
|
1572
1570
|
}, []), /* @__PURE__ */ u("div", {
|
|
1573
|
-
className: "relative w-[380px] rounded-xl border border-orange-500 bg-white px-4 py-4 flex items-start justify-between shadow-sm hover:shadow-md transition-all duration-200",
|
|
1571
|
+
className: Y("relative w-[380px] rounded-xl border border-orange-500 bg-white px-4 py-4 flex items-start justify-between shadow-sm hover:shadow-md transition-all duration-200", d),
|
|
1574
1572
|
children: [/* @__PURE__ */ u("div", {
|
|
1575
|
-
className: "flex items-start gap-3",
|
|
1573
|
+
className: Y("flex items-start gap-3", f),
|
|
1576
1574
|
children: [/* @__PURE__ */ l("div", {
|
|
1577
|
-
className: "shrink-0",
|
|
1575
|
+
className: Y("shrink-0", h),
|
|
1578
1576
|
children: r
|
|
1579
1577
|
}), /* @__PURE__ */ u("div", {
|
|
1580
1578
|
className: "flex flex-col",
|
|
1581
1579
|
children: [/* @__PURE__ */ l("span", {
|
|
1582
|
-
className: "text-sm font-semibold text-gray-900",
|
|
1580
|
+
className: Y("text-sm font-semibold text-gray-900", p),
|
|
1583
1581
|
children: e
|
|
1584
1582
|
}), /* @__PURE__ */ u("div", {
|
|
1585
|
-
className: "flex items-center gap-2 text-sm text-gray-500 mt-1",
|
|
1586
|
-
children: [/* @__PURE__ */ l("span", { children: n }),
|
|
1583
|
+
className: Y("flex items-center gap-2 text-sm text-gray-500 mt-1", m),
|
|
1584
|
+
children: [/* @__PURE__ */ l("span", { children: n }), S && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
|
|
1587
1585
|
className: "animate-spin text-orange-500",
|
|
1588
1586
|
children: "✴"
|
|
1589
1587
|
}), /* @__PURE__ */ l("span", {
|
|
@@ -1594,26 +1592,25 @@ var Oe = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
1594
1592
|
})]
|
|
1595
1593
|
}), /* @__PURE__ */ u("div", {
|
|
1596
1594
|
className: "relative",
|
|
1597
|
-
ref:
|
|
1595
|
+
ref: x,
|
|
1598
1596
|
children: [/* @__PURE__ */ l("button", {
|
|
1599
1597
|
onClick: () => {
|
|
1600
|
-
|
|
1598
|
+
b(!y), s?.();
|
|
1601
1599
|
},
|
|
1602
|
-
className: "flex items-center justify-center w-9 h-9 rounded-lg hover:bg-orange-50 text-orange-500 transition-colors duration-200",
|
|
1600
|
+
className: Y("flex items-center justify-center w-9 h-9 rounded-lg hover:bg-orange-50 text-orange-500 transition-colors duration-200", g),
|
|
1603
1601
|
children: /* @__PURE__ */ l("span", {
|
|
1604
1602
|
className: "text-xl leading-none",
|
|
1605
1603
|
children: "⋯"
|
|
1606
1604
|
})
|
|
1607
|
-
}),
|
|
1608
|
-
className: "absolute right-0 mt-2 w-44 rounded-2xl border border-gray-200 bg-white shadow-xl z-20 overflow-hidden animate-in fade-in zoom-in-95 duration-150",
|
|
1605
|
+
}), y && o.length > 0 && /* @__PURE__ */ l("div", {
|
|
1606
|
+
className: Y("absolute right-0 mt-2 w-44 rounded-2xl border border-gray-200 bg-white shadow-xl z-20 overflow-hidden animate-in fade-in zoom-in-95 duration-150", _),
|
|
1609
1607
|
children: /* @__PURE__ */ l("div", {
|
|
1610
1608
|
className: "py-2",
|
|
1611
1609
|
children: o.map((e, t) => /* @__PURE__ */ u("button", {
|
|
1612
1610
|
onClick: () => {
|
|
1613
|
-
e.onClick?.(),
|
|
1611
|
+
e.onClick?.(), b(!1);
|
|
1614
1612
|
},
|
|
1615
|
-
className:
|
|
1616
|
-
${e.danger ? "text-red-500 hover:bg-red-50" : "text-gray-700 hover:bg-orange-50 hover:text-orange-600"}`,
|
|
1613
|
+
className: Y("w-full flex items-center gap-3 px-4 py-3 text-sm transition-colors duration-150", e.danger ? "text-red-500 hover:bg-red-50" : "text-gray-700 hover:bg-orange-50 hover:text-orange-600", v),
|
|
1617
1614
|
children: [/* @__PURE__ */ l("span", {
|
|
1618
1615
|
className: "shrink-0",
|
|
1619
1616
|
children: e.icon
|
|
@@ -1626,44 +1623,39 @@ var Oe = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
1626
1623
|
})]
|
|
1627
1624
|
})]
|
|
1628
1625
|
});
|
|
1629
|
-
}, ke = ({ children: e, onClick: t, className: n
|
|
1626
|
+
}, ke = ({ children: e, onClick: t, className: n, contentClassName: r, hoverClassName: i, skeletonClassName: a, clickable: o = !0 }) => /* @__PURE__ */ l("div", {
|
|
1630
1627
|
onClick: t,
|
|
1631
|
-
className:
|
|
1632
|
-
w-full
|
|
1633
|
-
bg-white
|
|
1634
|
-
rounded-2xl
|
|
1635
|
-
border border-gray-200
|
|
1636
|
-
shadow-sm
|
|
1637
|
-
hover:shadow-md
|
|
1638
|
-
transition-all duration-200
|
|
1639
|
-
overflow-hidden
|
|
1640
|
-
${n}
|
|
1641
|
-
`,
|
|
1628
|
+
className: Y("w-full bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden transition-all duration-200", o && "cursor-pointer", o && "hover:shadow-md", i, n),
|
|
1642
1629
|
children: /* @__PURE__ */ l("div", {
|
|
1643
|
-
className:
|
|
1644
|
-
min-h-[72px]
|
|
1645
|
-
px-6
|
|
1646
|
-
py-4
|
|
1647
|
-
flex
|
|
1648
|
-
items-center
|
|
1649
|
-
justify-between
|
|
1650
|
-
${r}
|
|
1651
|
-
`,
|
|
1630
|
+
className: Y("min-h-[72px] px-6 py-4 flex items-center justify-between", r),
|
|
1652
1631
|
children: e || /* @__PURE__ */ u(c, { children: [
|
|
1653
|
-
/* @__PURE__ */ l("div", { className: "flex-1 h-5 rounded-md bg-gray-100" }),
|
|
1654
|
-
/* @__PURE__ */ l("div", { className: "w-24 h-5 rounded-md bg-gray-100 ml-6" }),
|
|
1655
|
-
/* @__PURE__ */ l("div", { className: "w-24 h-5 rounded-md bg-gray-100 ml-6" }),
|
|
1656
|
-
/* @__PURE__ */ l("div", { className: "w-32 h-5 rounded-md bg-gray-100 ml-6" }),
|
|
1657
|
-
/* @__PURE__ */ l("div", { className: "w-6 h-6 rounded-md bg-gray-100 ml-6" })
|
|
1632
|
+
/* @__PURE__ */ l("div", { className: Y("flex-1 h-5 rounded-md bg-gray-100", a) }),
|
|
1633
|
+
/* @__PURE__ */ l("div", { className: Y("w-24 h-5 rounded-md bg-gray-100 ml-6", a) }),
|
|
1634
|
+
/* @__PURE__ */ l("div", { className: Y("w-24 h-5 rounded-md bg-gray-100 ml-6", a) }),
|
|
1635
|
+
/* @__PURE__ */ l("div", { className: Y("w-32 h-5 rounded-md bg-gray-100 ml-6", a) }),
|
|
1636
|
+
/* @__PURE__ */ l("div", { className: Y("w-6 h-6 rounded-md bg-gray-100 ml-6", a) })
|
|
1658
1637
|
] })
|
|
1659
1638
|
})
|
|
1660
|
-
}), Ae = ({ open: e, onClose:
|
|
1661
|
-
if (
|
|
1662
|
-
|
|
1639
|
+
}), Ae = ({ open: e, onClose: n, variant: r = "content", title: i, description: a, children: o, primaryAction: s, secondaryAction: c, size: d = "medium", closeOnOverlayClick: f = !0, closeOnEsc: p = !0, hideIcon: m = !1, className: h, overlayClassName: g, contentClassName: _, headerClassName: v, bodyClassName: y, footerClassName: b, iconClassName: x, titleClassName: S, descriptionClassName: C }) => {
|
|
1640
|
+
if (t.useEffect(() => {
|
|
1641
|
+
if (!e) return;
|
|
1642
|
+
document.body.style.overflow = "hidden";
|
|
1643
|
+
let t = (e) => {
|
|
1644
|
+
e.key === "Escape" && p && n();
|
|
1645
|
+
};
|
|
1646
|
+
return document.addEventListener("keydown", t), () => {
|
|
1647
|
+
document.body.style.overflow = "", document.removeEventListener("keydown", t);
|
|
1648
|
+
};
|
|
1649
|
+
}, [
|
|
1650
|
+
e,
|
|
1651
|
+
p,
|
|
1652
|
+
n
|
|
1653
|
+
]), !e) return null;
|
|
1654
|
+
let w = {
|
|
1663
1655
|
small: "w-[360px]",
|
|
1664
1656
|
medium: "w-[480px]",
|
|
1665
1657
|
large: "w-[640px]"
|
|
1666
|
-
},
|
|
1658
|
+
}, T = {
|
|
1667
1659
|
success: {
|
|
1668
1660
|
icon: "✓",
|
|
1669
1661
|
bg: "bg-green-100",
|
|
@@ -1684,127 +1676,121 @@ var Oe = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
1684
1676
|
bg: "bg-gray-100",
|
|
1685
1677
|
text: "text-gray-500"
|
|
1686
1678
|
}
|
|
1687
|
-
}[
|
|
1679
|
+
}[r];
|
|
1688
1680
|
return /* @__PURE__ */ u("div", {
|
|
1689
|
-
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1681
|
+
className: Y("fixed inset-0 z-50 flex items-center justify-center", h),
|
|
1690
1682
|
children: [/* @__PURE__ */ l("div", {
|
|
1691
|
-
className: "absolute inset-0 backdrop-blur-sm bg-black/20",
|
|
1692
|
-
onClick:
|
|
1683
|
+
className: Y("absolute inset-0 backdrop-blur-sm bg-black/20", g),
|
|
1684
|
+
onClick: () => {
|
|
1685
|
+
f && n();
|
|
1686
|
+
}
|
|
1693
1687
|
}), /* @__PURE__ */ u("div", {
|
|
1694
|
-
className:
|
|
1695
|
-
relative z-10
|
|
1696
|
-
${f[c]}
|
|
1697
|
-
bg-white
|
|
1698
|
-
rounded-2xl
|
|
1699
|
-
shadow-2xl
|
|
1700
|
-
border border-gray-200
|
|
1701
|
-
overflow-hidden
|
|
1702
|
-
animate-in fade-in zoom-in-95 duration-200
|
|
1703
|
-
`,
|
|
1688
|
+
className: Y("relative z-10 bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden animate-in fade-in zoom-in-95 duration-200", w[d], _),
|
|
1704
1689
|
children: [
|
|
1705
1690
|
/* @__PURE__ */ u("div", {
|
|
1706
|
-
className: "px-6 pt-6 pb-4 text-center",
|
|
1691
|
+
className: Y("px-6 pt-6 pb-4 text-center", v),
|
|
1707
1692
|
children: [
|
|
1708
|
-
/* @__PURE__ */ l("div", {
|
|
1709
|
-
className:
|
|
1710
|
-
|
|
1711
|
-
flex items-center justify-center
|
|
1712
|
-
text-2xl font-bold
|
|
1713
|
-
${p.bg}
|
|
1714
|
-
${p.text}
|
|
1715
|
-
`,
|
|
1716
|
-
children: p.icon
|
|
1693
|
+
!m && /* @__PURE__ */ l("div", {
|
|
1694
|
+
className: Y("w-14 h-14 mx-auto mb-4 rounded-full flex items-center justify-center text-2xl font-bold", T.bg, T.text, x),
|
|
1695
|
+
children: T.icon
|
|
1717
1696
|
}),
|
|
1718
1697
|
/* @__PURE__ */ l("h2", {
|
|
1719
|
-
className: "text-lg font-semibold text-gray-900",
|
|
1720
|
-
children: r
|
|
1721
|
-
}),
|
|
1722
|
-
i && /* @__PURE__ */ l("p", {
|
|
1723
|
-
className: "mt-2 text-sm text-gray-500",
|
|
1698
|
+
className: Y("text-lg font-semibold text-gray-900", S),
|
|
1724
1699
|
children: i
|
|
1700
|
+
}),
|
|
1701
|
+
a && /* @__PURE__ */ l("p", {
|
|
1702
|
+
className: Y("mt-2 text-sm text-gray-500", C),
|
|
1703
|
+
children: a
|
|
1725
1704
|
})
|
|
1726
1705
|
]
|
|
1727
1706
|
}),
|
|
1728
|
-
|
|
1729
|
-
className: "px-6 pb-6",
|
|
1730
|
-
children:
|
|
1707
|
+
o && /* @__PURE__ */ l("div", {
|
|
1708
|
+
className: Y("px-6 pb-6", y),
|
|
1709
|
+
children: o
|
|
1731
1710
|
}),
|
|
1732
|
-
(
|
|
1733
|
-
className: "flex justify-end gap-3 px-6 py-4 bg-gray-50 border-t border-gray-100",
|
|
1734
|
-
children: [
|
|
1735
|
-
text:
|
|
1711
|
+
(s || c) && /* @__PURE__ */ u("div", {
|
|
1712
|
+
className: Y("flex justify-end gap-3 px-6 py-4 bg-gray-50 border-t border-gray-100", b),
|
|
1713
|
+
children: [c && /* @__PURE__ */ l(X, {
|
|
1714
|
+
text: c.text,
|
|
1736
1715
|
variant: "secondary",
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
}), o && /* @__PURE__ */ l(d, {
|
|
1741
|
-
text: o.text,
|
|
1716
|
+
onClick: c.onClick
|
|
1717
|
+
}), s && /* @__PURE__ */ l(X, {
|
|
1718
|
+
text: s.text,
|
|
1742
1719
|
variant: "primary",
|
|
1743
|
-
|
|
1744
|
-
state: "default",
|
|
1745
|
-
onClick: o.onClick
|
|
1720
|
+
onClick: s.onClick
|
|
1746
1721
|
})]
|
|
1747
1722
|
})
|
|
1748
1723
|
]
|
|
1749
1724
|
})]
|
|
1750
1725
|
});
|
|
1751
|
-
}, je = ({ active: e, blur: t = 8, overlayOpacity: n = .35, children: r }) => e ? /* @__PURE__ */ u("div", {
|
|
1752
|
-
className: "fixed inset-0 z-40",
|
|
1726
|
+
}, je = ({ active: e, blur: t = 8, overlayOpacity: n = .35, children: r, onClick: i, closeOnClick: a = !1, disablePointerEvents: o = !1, className: s, overlayClassName: c, contentClassName: d }) => e ? /* @__PURE__ */ u("div", {
|
|
1727
|
+
className: Y("fixed inset-0 z-40", o && "pointer-events-none", s),
|
|
1753
1728
|
children: [/* @__PURE__ */ l("div", {
|
|
1754
|
-
className: "absolute inset-0 backdrop-blur-sm",
|
|
1729
|
+
className: Y("absolute inset-0 backdrop-blur-sm", c),
|
|
1755
1730
|
style: {
|
|
1756
1731
|
backdropFilter: `blur(${t}px)`,
|
|
1757
1732
|
backgroundColor: `rgba(255,255,255,${n})`
|
|
1733
|
+
},
|
|
1734
|
+
onClick: () => {
|
|
1735
|
+
a && i?.();
|
|
1758
1736
|
}
|
|
1759
1737
|
}), /* @__PURE__ */ l("div", {
|
|
1760
|
-
className: "relative z-50 flex items-center justify-center w-full h-full",
|
|
1738
|
+
className: Y("relative z-50 flex items-center justify-center w-full h-full", !o && "pointer-events-auto", d),
|
|
1761
1739
|
children: r
|
|
1762
1740
|
})]
|
|
1763
1741
|
}) : null;
|
|
1764
1742
|
//#endregion
|
|
1765
1743
|
//#region src/table.tsx
|
|
1766
|
-
function Me({ columns: e, data: t, itemsPerPage: n = 5 }) {
|
|
1767
|
-
let [
|
|
1768
|
-
|
|
1744
|
+
function Me({ columns: e, data: t, itemsPerPage: n = 5, title: r, className: i = "" }) {
|
|
1745
|
+
let [o, c] = s(1), [d, f] = s({}), p = (e, t) => {
|
|
1746
|
+
f((n) => ({
|
|
1769
1747
|
...n,
|
|
1770
1748
|
[e]: t
|
|
1771
|
-
})),
|
|
1772
|
-
},
|
|
1773
|
-
let n =
|
|
1749
|
+
})), c(1);
|
|
1750
|
+
}, m = a(() => t.filter((t) => e.every((e) => {
|
|
1751
|
+
let n = d[e.key]?.toLowerCase() || "";
|
|
1774
1752
|
return n ? String(t[e.key]).toLowerCase().includes(n) : !0;
|
|
1775
1753
|
})), [
|
|
1776
1754
|
t,
|
|
1777
|
-
|
|
1755
|
+
d,
|
|
1778
1756
|
e
|
|
1779
|
-
]),
|
|
1780
|
-
e >= 1 && e <=
|
|
1757
|
+
]), h = Math.max(1, Math.ceil(m.length / n)), g = (o - 1) * n, _ = m.slice(g, g + n), v = (e) => {
|
|
1758
|
+
e >= 1 && e <= h && c(e);
|
|
1781
1759
|
};
|
|
1782
1760
|
return /* @__PURE__ */ l("div", {
|
|
1783
|
-
className:
|
|
1761
|
+
className: `w-full p-4 ${i}`,
|
|
1784
1762
|
children: /* @__PURE__ */ u("div", {
|
|
1785
1763
|
className: "border rounded-2xl overflow-hidden shadow",
|
|
1786
1764
|
children: [/* @__PURE__ */ u("table", {
|
|
1787
1765
|
className: "w-full border-collapse",
|
|
1788
1766
|
children: [/* @__PURE__ */ u("thead", {
|
|
1789
1767
|
className: "bg-gray-100",
|
|
1790
|
-
children: [
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1768
|
+
children: [
|
|
1769
|
+
r && /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("th", {
|
|
1770
|
+
colSpan: e.length + 1,
|
|
1771
|
+
className: "text-left p-4 text-lg font-semibold bg-white border-b",
|
|
1772
|
+
children: r
|
|
1773
|
+
}) }),
|
|
1774
|
+
/* @__PURE__ */ u("tr", { children: [e.map((e) => /* @__PURE__ */ l("th", {
|
|
1775
|
+
className: "text-left p-3 text-sm font-semibold text-gray-600",
|
|
1776
|
+
children: e.label
|
|
1777
|
+
}, e.key)), /* @__PURE__ */ l("th", { className: "p-3" })] }),
|
|
1778
|
+
/* @__PURE__ */ u("tr", { children: [e.map((e) => /* @__PURE__ */ l("th", {
|
|
1779
|
+
className: "p-2",
|
|
1780
|
+
children: /* @__PURE__ */ l("input", {
|
|
1781
|
+
type: "text",
|
|
1782
|
+
placeholder: "Buscar...",
|
|
1783
|
+
value: d[e.key] || "",
|
|
1784
|
+
onChange: (t) => p(e.key, t.target.value),
|
|
1785
|
+
className: "w-full px-2 py-1 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-red-400"
|
|
1786
|
+
})
|
|
1787
|
+
}, e.key)), /* @__PURE__ */ l("th", {})] })
|
|
1788
|
+
]
|
|
1789
|
+
}), /* @__PURE__ */ l("tbody", { children: _.length === 0 ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", {
|
|
1804
1790
|
colSpan: e.length + 1,
|
|
1805
1791
|
className: "p-4 text-center text-sm text-gray-500",
|
|
1806
1792
|
children: "No hay resultados"
|
|
1807
|
-
}) }) :
|
|
1793
|
+
}) }) : _.map((t, n) => /* @__PURE__ */ u("tr", {
|
|
1808
1794
|
className: "border-t hover:bg-gray-50 transition",
|
|
1809
1795
|
children: [e.map((e) => /* @__PURE__ */ l("td", {
|
|
1810
1796
|
className: "p-3 text-sm",
|
|
@@ -1818,28 +1804,28 @@ function Me({ columns: e, data: t, itemsPerPage: n = 5 }) {
|
|
|
1818
1804
|
className: "flex items-center justify-between p-3 text-sm",
|
|
1819
1805
|
children: [/* @__PURE__ */ u("span", { children: [
|
|
1820
1806
|
"Mostrando ",
|
|
1821
|
-
|
|
1807
|
+
_.length,
|
|
1822
1808
|
" de ",
|
|
1823
|
-
|
|
1809
|
+
m.length,
|
|
1824
1810
|
" resultados"
|
|
1825
1811
|
] }), /* @__PURE__ */ u("div", {
|
|
1826
1812
|
className: "flex gap-2 items-center",
|
|
1827
1813
|
children: [
|
|
1828
1814
|
/* @__PURE__ */ l("button", {
|
|
1829
|
-
onClick: () =>
|
|
1815
|
+
onClick: () => v(o - 1),
|
|
1830
1816
|
className: "px-2 py-1 border rounded disabled:opacity-50",
|
|
1831
|
-
disabled:
|
|
1817
|
+
disabled: o === 1,
|
|
1832
1818
|
children: "<"
|
|
1833
1819
|
}),
|
|
1834
|
-
Array.from({ length:
|
|
1835
|
-
onClick: () =>
|
|
1836
|
-
className: `px-3 py-1 rounded ${
|
|
1820
|
+
Array.from({ length: h }).map((e, t) => /* @__PURE__ */ l("button", {
|
|
1821
|
+
onClick: () => v(t + 1),
|
|
1822
|
+
className: `px-3 py-1 rounded ${o === t + 1 ? "bg-red-500 text-white" : "border"}`,
|
|
1837
1823
|
children: t + 1
|
|
1838
1824
|
}, t)),
|
|
1839
1825
|
/* @__PURE__ */ l("button", {
|
|
1840
|
-
onClick: () =>
|
|
1826
|
+
onClick: () => v(o + 1),
|
|
1841
1827
|
className: "px-2 py-1 border rounded disabled:opacity-50",
|
|
1842
|
-
disabled:
|
|
1828
|
+
disabled: o === h,
|
|
1843
1829
|
children: ">"
|
|
1844
1830
|
})
|
|
1845
1831
|
]
|
|
@@ -1850,26 +1836,26 @@ function Me({ columns: e, data: t, itemsPerPage: n = 5 }) {
|
|
|
1850
1836
|
}
|
|
1851
1837
|
//#endregion
|
|
1852
1838
|
//#region src/Select.tsx
|
|
1853
|
-
var Ne = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r, required: a, hint: c, value: d, onChange: f }) => {
|
|
1854
|
-
let [
|
|
1839
|
+
var Ne = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r, required: a, hint: c, value: d, onChange: f, className: p, triggerClassName: m, dropdownClassName: h, optionClassName: g, labelClassName: _, hintClassName: v, searchClassName: y }) => {
|
|
1840
|
+
let [b, x] = s(!1), [S, C] = s(""), w = o(null), T = (e) => t && Array.isArray(d) ? d.includes(e) : d === e, E = (e) => {
|
|
1855
1841
|
if (t) {
|
|
1856
1842
|
let t = Array.isArray(d) ? [...d] : [];
|
|
1857
1843
|
t.includes(e) ? t = t.filter((t) => t !== e) : t.push(e), f?.(t);
|
|
1858
|
-
} else f?.(e),
|
|
1859
|
-
},
|
|
1844
|
+
} else f?.(e), x(!1);
|
|
1845
|
+
}, D = (e) => {
|
|
1860
1846
|
!t || !Array.isArray(d) || f?.(d.filter((t) => t !== e));
|
|
1861
|
-
},
|
|
1847
|
+
}, O = e.filter((e) => e.label.toLowerCase().includes(S.toLowerCase()));
|
|
1862
1848
|
return i(() => {
|
|
1863
1849
|
let e = (e) => {
|
|
1864
|
-
|
|
1850
|
+
w.current?.contains(e.target) || x(!1);
|
|
1865
1851
|
};
|
|
1866
1852
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1867
1853
|
}, []), /* @__PURE__ */ u("div", {
|
|
1868
|
-
className: "w-[300px] text-sm",
|
|
1869
|
-
ref:
|
|
1854
|
+
className: Y("w-[300px] text-sm", p),
|
|
1855
|
+
ref: w,
|
|
1870
1856
|
children: [
|
|
1871
1857
|
r && /* @__PURE__ */ u("label", {
|
|
1872
|
-
className: "block mb-1 font-medium",
|
|
1858
|
+
className: Y("block mb-1 font-medium", _),
|
|
1873
1859
|
children: [
|
|
1874
1860
|
r,
|
|
1875
1861
|
" ",
|
|
@@ -1880,13 +1866,13 @@ var Ne = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
1880
1866
|
]
|
|
1881
1867
|
}),
|
|
1882
1868
|
/* @__PURE__ */ l("div", {
|
|
1883
|
-
className: "border rounded-lg px-3 py-2 flex flex-wrap gap-2 items-center cursor-pointer",
|
|
1884
|
-
onClick: () =>
|
|
1869
|
+
className: Y("border rounded-lg px-3 py-2 flex flex-wrap gap-2 items-center cursor-pointer", m),
|
|
1870
|
+
onClick: () => x(!b),
|
|
1885
1871
|
children: t && Array.isArray(d) ? d.length > 0 ? d.map((t) => /* @__PURE__ */ u("span", {
|
|
1886
1872
|
className: "bg-gray-200 px-2 py-1 rounded flex items-center gap-1",
|
|
1887
1873
|
children: [e.find((e) => e.value === t)?.label, /* @__PURE__ */ l("button", {
|
|
1888
1874
|
onClick: (e) => {
|
|
1889
|
-
e.stopPropagation(),
|
|
1875
|
+
e.stopPropagation(), D(t);
|
|
1890
1876
|
},
|
|
1891
1877
|
children: "×"
|
|
1892
1878
|
})]
|
|
@@ -1898,27 +1884,27 @@ var Ne = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
1898
1884
|
children: n
|
|
1899
1885
|
}) })
|
|
1900
1886
|
}),
|
|
1901
|
-
|
|
1902
|
-
className: "border rounded-lg mt-2 p-2 bg-white shadow",
|
|
1887
|
+
b && /* @__PURE__ */ u("div", {
|
|
1888
|
+
className: Y("border rounded-lg mt-2 p-2 bg-white shadow", h),
|
|
1903
1889
|
children: [/* @__PURE__ */ l("input", {
|
|
1904
1890
|
type: "text",
|
|
1905
1891
|
placeholder: "Buscar...",
|
|
1906
|
-
className: "w-full border px-2 py-1 mb-2 rounded",
|
|
1907
|
-
value:
|
|
1908
|
-
onChange: (e) =>
|
|
1892
|
+
className: Y("w-full border px-2 py-1 mb-2 rounded", y),
|
|
1893
|
+
value: S,
|
|
1894
|
+
onChange: (e) => C(e.target.value)
|
|
1909
1895
|
}), /* @__PURE__ */ l("div", {
|
|
1910
1896
|
className: "max-h-40 overflow-auto",
|
|
1911
|
-
children:
|
|
1912
|
-
className: "flex items-center gap-2 px-2 py-1 hover:bg-gray-100 cursor-pointer",
|
|
1913
|
-
onClick: () =>
|
|
1897
|
+
children: O.map((e) => /* @__PURE__ */ u("div", {
|
|
1898
|
+
className: Y("flex items-center gap-2 px-2 py-1 hover:bg-gray-100 cursor-pointer", g),
|
|
1899
|
+
onClick: () => E(e.value),
|
|
1914
1900
|
children: [
|
|
1915
1901
|
t && /* @__PURE__ */ l("input", {
|
|
1916
1902
|
type: "checkbox",
|
|
1917
|
-
checked:
|
|
1903
|
+
checked: T(e.value),
|
|
1918
1904
|
readOnly: !0
|
|
1919
1905
|
}),
|
|
1920
1906
|
/* @__PURE__ */ l("span", { children: e.label }),
|
|
1921
|
-
!t &&
|
|
1907
|
+
!t && T(e.value) && /* @__PURE__ */ l("span", {
|
|
1922
1908
|
className: "ml-auto",
|
|
1923
1909
|
children: "✔"
|
|
1924
1910
|
})
|
|
@@ -1927,11 +1913,11 @@ var Ne = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
1927
1913
|
})]
|
|
1928
1914
|
}),
|
|
1929
1915
|
c && /* @__PURE__ */ l("p", {
|
|
1930
|
-
className: "text-gray-400 mt-1 text-xs",
|
|
1916
|
+
className: Y("text-gray-400 mt-1 text-xs", v),
|
|
1931
1917
|
children: c
|
|
1932
1918
|
})
|
|
1933
1919
|
]
|
|
1934
1920
|
});
|
|
1935
1921
|
};
|
|
1936
1922
|
//#endregion
|
|
1937
|
-
export { je as BackgroundBlur,
|
|
1923
|
+
export { je as BackgroundBlur, X as Button, ke as CardRow, Ee as Checkbox, Oe as FileItem, De as FileUpload, me as Input, Ae as Modal, Ne as Select, Me as Table, he as TextArea };
|