componenteszw-package 1.1.0 → 1.1.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.
- package/dist/index.js +106 -106
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -242,7 +242,7 @@ const Y = (t) => {
|
|
|
242
242
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
243
243
|
H_.test(t) && !A_.test(t)
|
|
244
244
|
), vx = () => !1, Z_ = (t) => V_.test(t), W_ = (t) => P_.test(t), G_ = () => {
|
|
245
|
-
const t = Y("colors"), c = Y("spacing"), o = Y("blur"), a = Y("brightness"), i = Y("borderColor"), n = Y("borderRadius"), h = Y("borderSpacing"), d = Y("borderWidth"), l = Y("contrast"), s = Y("grayscale"), y = Y("hueRotate"), x = Y("invert"), I = Y("gap"), C = Y("gradientColorStops"), A = Y("gradientColorStopPositions"), f = Y("inset"), _ = Y("margin"), q = Y("opacity"), B = Y("padding"), L = Y("saturate"), j = Y("scale"), v = Y("sepia"), Z = Y("skew"), Q = Y("space"), z = Y("translate"), W = () => ["auto", "contain", "none"], t1 = () => ["auto", "hidden", "clip", "visible", "scroll"], n1 = () => ["auto", S, c], R = () => [S, c], i1 = () => ["", l1, s1], g = () => ["auto", Gt, S], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"],
|
|
245
|
+
const t = Y("colors"), c = Y("spacing"), o = Y("blur"), a = Y("brightness"), i = Y("borderColor"), n = Y("borderRadius"), h = Y("borderSpacing"), d = Y("borderWidth"), l = Y("contrast"), s = Y("grayscale"), y = Y("hueRotate"), x = Y("invert"), I = Y("gap"), C = Y("gradientColorStops"), A = Y("gradientColorStopPositions"), f = Y("inset"), _ = Y("margin"), q = Y("opacity"), B = Y("padding"), L = Y("saturate"), j = Y("scale"), v = Y("sepia"), Z = Y("skew"), Q = Y("space"), z = Y("translate"), W = () => ["auto", "contain", "none"], t1 = () => ["auto", "hidden", "clip", "visible", "scroll"], n1 = () => ["auto", S, c], R = () => [S, c], i1 = () => ["", l1, s1], g = () => ["auto", Gt, S], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], w = () => ["solid", "dashed", "dotted", "double", "none"], e1 = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], a1 = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], J = () => ["", "0", S], u = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [Gt, S];
|
|
246
246
|
return {
|
|
247
247
|
cacheSize: 500,
|
|
248
248
|
separator: ":",
|
|
@@ -1057,7 +1057,7 @@ const Y = (t) => {
|
|
|
1057
1057
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1058
1058
|
*/
|
|
1059
1059
|
"text-decoration-style": [{
|
|
1060
|
-
decoration: [...
|
|
1060
|
+
decoration: [...w(), "wavy"]
|
|
1061
1061
|
}],
|
|
1062
1062
|
/**
|
|
1063
1063
|
* Text Decoration Thickness
|
|
@@ -1431,7 +1431,7 @@ const Y = (t) => {
|
|
|
1431
1431
|
* @see https://tailwindcss.com/docs/border-style
|
|
1432
1432
|
*/
|
|
1433
1433
|
"border-style": [{
|
|
1434
|
-
border: [...
|
|
1434
|
+
border: [...w(), "hidden"]
|
|
1435
1435
|
}],
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Divide Width X
|
|
@@ -1469,7 +1469,7 @@ const Y = (t) => {
|
|
|
1469
1469
|
* @see https://tailwindcss.com/docs/divide-style
|
|
1470
1470
|
*/
|
|
1471
1471
|
"divide-style": [{
|
|
1472
|
-
divide:
|
|
1472
|
+
divide: w()
|
|
1473
1473
|
}],
|
|
1474
1474
|
/**
|
|
1475
1475
|
* Border Color
|
|
@@ -1546,7 +1546,7 @@ const Y = (t) => {
|
|
|
1546
1546
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1547
1547
|
*/
|
|
1548
1548
|
"outline-style": [{
|
|
1549
|
-
outline: ["", ...
|
|
1549
|
+
outline: ["", ...w()]
|
|
1550
1550
|
}],
|
|
1551
1551
|
/**
|
|
1552
1552
|
* Outline Offset
|
|
@@ -2271,7 +2271,7 @@ const Y = (t) => {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
};
|
|
2273
2273
|
}, X_ = /* @__PURE__ */ C_(G_);
|
|
2274
|
-
function
|
|
2274
|
+
function b(...t) {
|
|
2275
2275
|
return X_(M_(t));
|
|
2276
2276
|
}
|
|
2277
2277
|
const Jf = ({
|
|
@@ -2305,7 +2305,7 @@ const Jf = ({
|
|
|
2305
2305
|
type: l,
|
|
2306
2306
|
onClick: d,
|
|
2307
2307
|
disabled: f,
|
|
2308
|
-
className:
|
|
2308
|
+
className: b(
|
|
2309
2309
|
I,
|
|
2310
2310
|
C[i],
|
|
2311
2311
|
A[a],
|
|
@@ -2313,9 +2313,9 @@ const Jf = ({
|
|
|
2313
2313
|
s
|
|
2314
2314
|
),
|
|
2315
2315
|
children: [
|
|
2316
|
-
h ? /* @__PURE__ */ k("span", { className: "animate-spin", children: "⏳" }) : c && /* @__PURE__ */ k("span", { className:
|
|
2317
|
-
t && /* @__PURE__ */ k("span", { className:
|
|
2318
|
-
!h && o && /* @__PURE__ */ k("span", { className:
|
|
2316
|
+
h ? /* @__PURE__ */ k("span", { className: "animate-spin", children: "⏳" }) : c && /* @__PURE__ */ k("span", { className: b("flex items-center", x), children: c }),
|
|
2317
|
+
t && /* @__PURE__ */ k("span", { className: b(y), children: h ? "Cargando..." : t }),
|
|
2318
|
+
!h && o && /* @__PURE__ */ k("span", { className: b("flex items-center", x), children: o })
|
|
2319
2319
|
]
|
|
2320
2320
|
}
|
|
2321
2321
|
);
|
|
@@ -2346,8 +2346,8 @@ const Jf = ({
|
|
|
2346
2346
|
error: "border-red-500 focus:border-red-500",
|
|
2347
2347
|
disabled: "bg-gray-100 cursor-not-allowed"
|
|
2348
2348
|
};
|
|
2349
|
-
return /* @__PURE__ */ $("div", { className:
|
|
2350
|
-
t && /* @__PURE__ */ $("label", { className:
|
|
2349
|
+
return /* @__PURE__ */ $("div", { className: b("flex flex-col gap-1 w-full", x), children: [
|
|
2350
|
+
t && /* @__PURE__ */ $("label", { className: b("text-sm font-medium", C), children: [
|
|
2351
2351
|
t,
|
|
2352
2352
|
" ",
|
|
2353
2353
|
i && /* @__PURE__ */ k("span", { className: "text-red-500", children: "*" })
|
|
@@ -2361,7 +2361,7 @@ const Jf = ({
|
|
|
2361
2361
|
placeholder: c,
|
|
2362
2362
|
disabled: s || n === "disabled",
|
|
2363
2363
|
onChange: (B) => y?.(B.target.value),
|
|
2364
|
-
className:
|
|
2364
|
+
className: b(
|
|
2365
2365
|
"w-full rounded-md border outline-none",
|
|
2366
2366
|
_[h],
|
|
2367
2367
|
q[n],
|
|
@@ -2373,7 +2373,7 @@ const Jf = ({
|
|
|
2373
2373
|
l && /* @__PURE__ */ k(
|
|
2374
2374
|
"div",
|
|
2375
2375
|
{
|
|
2376
|
-
className:
|
|
2376
|
+
className: b(
|
|
2377
2377
|
"absolute right-3 top-1/2 -translate-y-1/2",
|
|
2378
2378
|
f
|
|
2379
2379
|
),
|
|
@@ -2384,7 +2384,7 @@ const Jf = ({
|
|
|
2384
2384
|
a && /* @__PURE__ */ k(
|
|
2385
2385
|
"span",
|
|
2386
2386
|
{
|
|
2387
|
-
className:
|
|
2387
|
+
className: b(
|
|
2388
2388
|
"text-xs",
|
|
2389
2389
|
n === "error" ? "text-red-500" : "text-gray-500",
|
|
2390
2390
|
A
|
|
@@ -2414,8 +2414,8 @@ function fe1({
|
|
|
2414
2414
|
const L = B.target.value;
|
|
2415
2415
|
h && L.length > h || (f(L), s?.(L));
|
|
2416
2416
|
};
|
|
2417
|
-
return /* @__PURE__ */ $("div", { className:
|
|
2418
|
-
t && /* @__PURE__ */ $("label", { className:
|
|
2417
|
+
return /* @__PURE__ */ $("div", { className: b("flex flex-col gap-1", y), children: [
|
|
2418
|
+
t && /* @__PURE__ */ $("label", { className: b("text-sm font-medium", I), children: [
|
|
2419
2419
|
t,
|
|
2420
2420
|
" ",
|
|
2421
2421
|
i && /* @__PURE__ */ k("span", { className: "text-red-500", children: "*" })
|
|
@@ -2427,7 +2427,7 @@ function fe1({
|
|
|
2427
2427
|
placeholder: c,
|
|
2428
2428
|
onChange: q,
|
|
2429
2429
|
disabled: l || n === "disabled",
|
|
2430
|
-
className:
|
|
2430
|
+
className: b(
|
|
2431
2431
|
"w-full min-h-[100px] rounded-md border px-3 py-2 text-sm outline-none resize-none transition",
|
|
2432
2432
|
"focus:ring-2 focus:ring-primary",
|
|
2433
2433
|
n === "error" && "border-red-500 focus:ring-red-500",
|
|
@@ -2441,14 +2441,14 @@ function fe1({
|
|
|
2441
2441
|
a && /* @__PURE__ */ k(
|
|
2442
2442
|
"span",
|
|
2443
2443
|
{
|
|
2444
|
-
className:
|
|
2444
|
+
className: b(
|
|
2445
2445
|
n === "error" ? "text-red-500" : "text-gray-500",
|
|
2446
2446
|
C
|
|
2447
2447
|
),
|
|
2448
2448
|
children: a
|
|
2449
2449
|
}
|
|
2450
2450
|
),
|
|
2451
|
-
d && h && /* @__PURE__ */ $("span", { className:
|
|
2451
|
+
d && h && /* @__PURE__ */ $("span", { className: b("text-gray-400", C), children: [
|
|
2452
2452
|
_.length,
|
|
2453
2453
|
"/",
|
|
2454
2454
|
h
|
|
@@ -22656,12 +22656,12 @@ function xe1({
|
|
|
22656
22656
|
iconClassName: y
|
|
22657
22657
|
}) {
|
|
22658
22658
|
const x = Vg.useId();
|
|
22659
|
-
return /* @__PURE__ */ $("div", { className:
|
|
22659
|
+
return /* @__PURE__ */ $("div", { className: b("flex flex-col gap-1", h), children: [
|
|
22660
22660
|
/* @__PURE__ */ $(
|
|
22661
22661
|
"label",
|
|
22662
22662
|
{
|
|
22663
22663
|
htmlFor: x,
|
|
22664
|
-
className:
|
|
22664
|
+
className: b(
|
|
22665
22665
|
"flex items-center gap-2 cursor-pointer",
|
|
22666
22666
|
a && "opacity-50 cursor-not-allowed",
|
|
22667
22667
|
l
|
|
@@ -22681,7 +22681,7 @@ function xe1({
|
|
|
22681
22681
|
/* @__PURE__ */ k(
|
|
22682
22682
|
"div",
|
|
22683
22683
|
{
|
|
22684
|
-
className:
|
|
22684
|
+
className: b(
|
|
22685
22685
|
"w-4 h-4 flex items-center justify-center rounded border transition",
|
|
22686
22686
|
c || o ? "bg-primary text-white border-primary" : "bg-white border-gray-300",
|
|
22687
22687
|
d
|
|
@@ -22693,7 +22693,7 @@ function xe1({
|
|
|
22693
22693
|
]
|
|
22694
22694
|
}
|
|
22695
22695
|
),
|
|
22696
|
-
i && /* @__PURE__ */ k("span", { className:
|
|
22696
|
+
i && /* @__PURE__ */ k("span", { className: b("text-xs text-gray-500", s), children: i })
|
|
22697
22697
|
] });
|
|
22698
22698
|
}
|
|
22699
22699
|
const Qf = ({
|
|
@@ -22724,18 +22724,18 @@ const Qf = ({
|
|
|
22724
22724
|
}, []), /* @__PURE__ */ $(
|
|
22725
22725
|
"div",
|
|
22726
22726
|
{
|
|
22727
|
-
className:
|
|
22727
|
+
className: b(
|
|
22728
22728
|
"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",
|
|
22729
22729
|
d
|
|
22730
22730
|
),
|
|
22731
22731
|
children: [
|
|
22732
|
-
/* @__PURE__ */ $("div", { className:
|
|
22733
|
-
/* @__PURE__ */ k("div", { className:
|
|
22732
|
+
/* @__PURE__ */ $("div", { className: b("flex items-start gap-3", l), children: [
|
|
22733
|
+
/* @__PURE__ */ k("div", { className: b("shrink-0", x), children: o }),
|
|
22734
22734
|
/* @__PURE__ */ $("div", { className: "flex flex-col", children: [
|
|
22735
22735
|
/* @__PURE__ */ k(
|
|
22736
22736
|
"span",
|
|
22737
22737
|
{
|
|
22738
|
-
className:
|
|
22738
|
+
className: b(
|
|
22739
22739
|
"text-sm font-semibold text-gray-900",
|
|
22740
22740
|
s
|
|
22741
22741
|
),
|
|
@@ -22745,7 +22745,7 @@ const Qf = ({
|
|
|
22745
22745
|
/* @__PURE__ */ $(
|
|
22746
22746
|
"div",
|
|
22747
22747
|
{
|
|
22748
|
-
className:
|
|
22748
|
+
className: b(
|
|
22749
22749
|
"flex items-center gap-2 text-sm text-gray-500 mt-1",
|
|
22750
22750
|
y
|
|
22751
22751
|
),
|
|
@@ -22767,7 +22767,7 @@ const Qf = ({
|
|
|
22767
22767
|
onClick: () => {
|
|
22768
22768
|
_(!f), h?.();
|
|
22769
22769
|
},
|
|
22770
|
-
className:
|
|
22770
|
+
className: b(
|
|
22771
22771
|
"flex items-center justify-center w-9 h-9 rounded-lg hover:bg-orange-50 text-orange-500 transition-colors duration-200",
|
|
22772
22772
|
I
|
|
22773
22773
|
),
|
|
@@ -22777,7 +22777,7 @@ const Qf = ({
|
|
|
22777
22777
|
f && n.length > 0 && /* @__PURE__ */ k(
|
|
22778
22778
|
"div",
|
|
22779
22779
|
{
|
|
22780
|
-
className:
|
|
22780
|
+
className: b(
|
|
22781
22781
|
"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",
|
|
22782
22782
|
C
|
|
22783
22783
|
),
|
|
@@ -22787,7 +22787,7 @@ const Qf = ({
|
|
|
22787
22787
|
onClick: () => {
|
|
22788
22788
|
L.onClick?.(), _(!1);
|
|
22789
22789
|
},
|
|
22790
|
-
className:
|
|
22790
|
+
className: b(
|
|
22791
22791
|
"w-full flex items-center gap-3 px-4 py-3 text-sm transition-colors duration-150",
|
|
22792
22792
|
L.danger ? "text-red-500 hover:bg-red-50" : "text-gray-700 hover:bg-orange-50 hover:text-orange-600",
|
|
22793
22793
|
A
|
|
@@ -22917,7 +22917,7 @@ function fY() {
|
|
|
22917
22917
|
}
|
|
22918
22918
|
}
|
|
22919
22919
|
}
|
|
22920
|
-
var v = l, Z = s, Q = d, z = h, W = c, t1 = y, n1 = a, R = A, i1 = C, g = o, F = n,
|
|
22920
|
+
var v = l, Z = s, Q = d, z = h, W = c, t1 = y, n1 = a, R = A, i1 = C, g = o, F = n, w = i, e1 = x, a1 = !1;
|
|
22921
22921
|
function J(m) {
|
|
22922
22922
|
return a1 || (a1 = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), u(m) || j(m) === l;
|
|
22923
22923
|
}
|
|
@@ -22957,7 +22957,7 @@ function fY() {
|
|
|
22957
22957
|
function o1(m) {
|
|
22958
22958
|
return j(m) === x;
|
|
22959
22959
|
}
|
|
22960
|
-
X.AsyncMode = v, X.ConcurrentMode = Z, X.ContextConsumer = Q, X.ContextProvider = z, X.Element = W, X.ForwardRef = t1, X.Fragment = n1, X.Lazy = R, X.Memo = i1, X.Portal = g, X.Profiler = F, X.StrictMode =
|
|
22960
|
+
X.AsyncMode = v, X.ConcurrentMode = Z, X.ContextConsumer = Q, X.ContextProvider = z, X.Element = W, X.ForwardRef = t1, X.Fragment = n1, X.Lazy = R, X.Memo = i1, X.Portal = g, X.Profiler = F, X.StrictMode = w, X.Suspense = e1, X.isAsyncMode = J, X.isConcurrentMode = u, X.isContextConsumer = M, X.isContextProvider = T, X.isElement = P, X.isForwardRef = H, X.isFragment = D, X.isLazy = V, X.isMemo = O, X.isPortal = E, X.isProfiler = K, X.isStrictMode = U, X.isSuspense = o1, X.isValidElementType = L, X.typeOf = j;
|
|
22961
22961
|
})()), X;
|
|
22962
22962
|
}
|
|
22963
22963
|
var ax;
|
|
@@ -23147,7 +23147,7 @@ function wY() {
|
|
|
23147
23147
|
}
|
|
23148
23148
|
function q(u) {
|
|
23149
23149
|
function M(T, P, H, D, V, O) {
|
|
23150
|
-
var E = T[P], K =
|
|
23150
|
+
var E = T[P], K = w(E);
|
|
23151
23151
|
if (K !== u) {
|
|
23152
23152
|
var U = e1(E);
|
|
23153
23153
|
return new f(
|
|
@@ -23168,7 +23168,7 @@ function wY() {
|
|
|
23168
23168
|
return new f("Property `" + V + "` of component `" + H + "` has invalid PropType notation inside arrayOf.");
|
|
23169
23169
|
var O = T[P];
|
|
23170
23170
|
if (!Array.isArray(O)) {
|
|
23171
|
-
var E =
|
|
23171
|
+
var E = w(O);
|
|
23172
23172
|
return new f("Invalid " + D + " `" + V + "` of type " + ("`" + E + "` supplied to `" + H + "`, expected an array."));
|
|
23173
23173
|
}
|
|
23174
23174
|
for (var K = 0; K < O.length; K++) {
|
|
@@ -23184,7 +23184,7 @@ function wY() {
|
|
|
23184
23184
|
function u(M, T, P, H, D) {
|
|
23185
23185
|
var V = M[T];
|
|
23186
23186
|
if (!d(V)) {
|
|
23187
|
-
var O =
|
|
23187
|
+
var O = w(V);
|
|
23188
23188
|
return new f("Invalid " + H + " `" + D + "` of type " + ("`" + O + "` supplied to `" + P + "`, expected a single ReactElement."));
|
|
23189
23189
|
}
|
|
23190
23190
|
return null;
|
|
@@ -23195,7 +23195,7 @@ function wY() {
|
|
|
23195
23195
|
function u(M, T, P, H, D) {
|
|
23196
23196
|
var V = M[T];
|
|
23197
23197
|
if (!t.isValidElementType(V)) {
|
|
23198
|
-
var O =
|
|
23198
|
+
var O = w(V);
|
|
23199
23199
|
return new f("Invalid " + H + " `" + D + "` of type " + ("`" + O + "` supplied to `" + P + "`, expected a single ReactElement type."));
|
|
23200
23200
|
}
|
|
23201
23201
|
return null;
|
|
@@ -23233,7 +23233,7 @@ function wY() {
|
|
|
23233
23233
|
function M(T, P, H, D, V) {
|
|
23234
23234
|
if (typeof u != "function")
|
|
23235
23235
|
return new f("Property `" + V + "` of component `" + H + "` has invalid PropType notation inside objectOf.");
|
|
23236
|
-
var O = T[P], E =
|
|
23236
|
+
var O = T[P], E = w(O);
|
|
23237
23237
|
if (E !== "object")
|
|
23238
23238
|
return new f("Invalid " + D + " `" + V + "` of type " + ("`" + E + "` supplied to `" + H + "`, expected an object."));
|
|
23239
23239
|
for (var K in O)
|
|
@@ -23281,7 +23281,7 @@ function wY() {
|
|
|
23281
23281
|
}
|
|
23282
23282
|
function R(u) {
|
|
23283
23283
|
function M(T, P, H, D, V) {
|
|
23284
|
-
var O = T[P], E =
|
|
23284
|
+
var O = T[P], E = w(O);
|
|
23285
23285
|
if (E !== "object")
|
|
23286
23286
|
return new f("Invalid " + D + " `" + V + "` of type `" + E + "` " + ("supplied to `" + H + "`, expected `object`."));
|
|
23287
23287
|
for (var K in u) {
|
|
@@ -23298,7 +23298,7 @@ function wY() {
|
|
|
23298
23298
|
}
|
|
23299
23299
|
function i1(u) {
|
|
23300
23300
|
function M(T, P, H, D, V) {
|
|
23301
|
-
var O = T[P], E =
|
|
23301
|
+
var O = T[P], E = w(O);
|
|
23302
23302
|
if (E !== "object")
|
|
23303
23303
|
return new f("Invalid " + D + " `" + V + "` of type `" + E + "` " + ("supplied to `" + H + "`, expected `object`."));
|
|
23304
23304
|
var K = c({}, T[P], u);
|
|
@@ -23355,14 +23355,14 @@ Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
|
23355
23355
|
function F(u, M) {
|
|
23356
23356
|
return u === "symbol" ? !0 : M ? M["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && M instanceof Symbol : !1;
|
|
23357
23357
|
}
|
|
23358
|
-
function
|
|
23358
|
+
function w(u) {
|
|
23359
23359
|
var M = typeof u;
|
|
23360
23360
|
return Array.isArray(u) ? "array" : u instanceof RegExp ? "object" : F(M, u) ? "symbol" : M;
|
|
23361
23361
|
}
|
|
23362
23362
|
function e1(u) {
|
|
23363
23363
|
if (typeof u > "u" || u === null)
|
|
23364
23364
|
return "" + u;
|
|
23365
|
-
var M =
|
|
23365
|
+
var M = w(u);
|
|
23366
23366
|
if (M === "object") {
|
|
23367
23367
|
if (u instanceof Date)
|
|
23368
23368
|
return "date";
|
|
@@ -25976,32 +25976,32 @@ function _e1({
|
|
|
25976
25976
|
existingFileDropdownIcons: j,
|
|
25977
25977
|
newFileDropdownIcons: v
|
|
25978
25978
|
}) {
|
|
25979
|
-
const [Z, Q] = Vg.useState([]), [z, W] = Vg.useState(!1), t1 = (
|
|
25980
|
-
if (!
|
|
25981
|
-
const e1 = Array.from(
|
|
25979
|
+
const [Z, Q] = Vg.useState([]), [z, W] = Vg.useState(!1), t1 = (w) => {
|
|
25980
|
+
if (!w) return;
|
|
25981
|
+
const e1 = Array.from(w).filter((J) => {
|
|
25982
25982
|
const u = J.size / 1024 / 1024 <= c, M = o ? o.includes(J.type) : !0;
|
|
25983
25983
|
return u && M;
|
|
25984
25984
|
}), a1 = t ? [...Z, ...e1] : e1;
|
|
25985
25985
|
Q(a1), a?.(a1);
|
|
25986
|
-
}, n1 = (
|
|
25987
|
-
const e1 = Z.filter((a1, J) => J !==
|
|
25986
|
+
}, n1 = (w) => {
|
|
25987
|
+
const e1 = Z.filter((a1, J) => J !== w);
|
|
25988
25988
|
Q(e1), a?.(e1);
|
|
25989
|
-
}, R = (
|
|
25990
|
-
const e1 =
|
|
25991
|
-
return /* @__PURE__ */ k("div", { className:
|
|
25989
|
+
}, R = (w) => w >= 1024 ? `<${w / 1024}GB` : `<${w}MB`, i1 = o && o.length > 0 ? o.join(", ") : "Cualquier formato", g = (w) => {
|
|
25990
|
+
const e1 = w.split(".").pop()?.toLowerCase() ?? "", a1 = ue1[e1] ?? xx;
|
|
25991
|
+
return /* @__PURE__ */ k("div", { className: b("flex items-center justify-center", f), children: /* @__PURE__ */ k(a1, { size: 48, color: _ }) });
|
|
25992
25992
|
}, F = i.length > 0 || Z.length > 0;
|
|
25993
|
-
return /* @__PURE__ */ $("div", { className:
|
|
25993
|
+
return /* @__PURE__ */ $("div", { className: b("flex gap-3 items-start", d), children: [
|
|
25994
25994
|
/* @__PURE__ */ $(
|
|
25995
25995
|
"div",
|
|
25996
25996
|
{
|
|
25997
|
-
onDragOver: (
|
|
25998
|
-
|
|
25997
|
+
onDragOver: (w) => {
|
|
25998
|
+
w.preventDefault(), W(!0);
|
|
25999
25999
|
},
|
|
26000
26000
|
onDragLeave: () => W(!1),
|
|
26001
|
-
onDrop: (
|
|
26002
|
-
|
|
26001
|
+
onDrop: (w) => {
|
|
26002
|
+
w.preventDefault(), W(!1), t1(w.dataTransfer.files);
|
|
26003
26003
|
},
|
|
26004
|
-
className:
|
|
26004
|
+
className: b(
|
|
26005
26005
|
"border-2 border-dashed rounded-lg p-6 text-center transition bg-[#FEF7F6]",
|
|
26006
26006
|
z ? "border-[#EE512E] bg-[#FEF7F6]" : "border-[#EE512E]/40",
|
|
26007
26007
|
z && s,
|
|
@@ -26028,7 +26028,7 @@ function _e1({
|
|
|
26028
26028
|
]
|
|
26029
26029
|
}
|
|
26030
26030
|
),
|
|
26031
|
-
/* @__PURE__ */ k("p", { className:
|
|
26031
|
+
/* @__PURE__ */ k("p", { className: b("text-sm font-semibold text-gray-800", y), children: "Arrastra/Selecciona un archivo" }),
|
|
26032
26032
|
/* @__PURE__ */ $("p", { className: "text-xs text-gray-400 mt-0.5", children: [
|
|
26033
26033
|
i1,
|
|
26034
26034
|
" | ",
|
|
@@ -26039,7 +26039,7 @@ function _e1({
|
|
|
26039
26039
|
{
|
|
26040
26040
|
type: "file",
|
|
26041
26041
|
multiple: t,
|
|
26042
|
-
onChange: (
|
|
26042
|
+
onChange: (w) => t1(w.target.files),
|
|
26043
26043
|
className: "hidden",
|
|
26044
26044
|
id: "file-upload"
|
|
26045
26045
|
}
|
|
@@ -26048,7 +26048,7 @@ function _e1({
|
|
|
26048
26048
|
"label",
|
|
26049
26049
|
{
|
|
26050
26050
|
htmlFor: "file-upload",
|
|
26051
|
-
className:
|
|
26051
|
+
className: b(
|
|
26052
26052
|
"inline-flex items-center gap-1.5 mt-3 px-4 py-1.5 border border-[#EE512E] rounded-full text-sm text-[#EE512E] cursor-pointer hover:bg-[#FEF7F6] transition",
|
|
26053
26053
|
x
|
|
26054
26054
|
),
|
|
@@ -26076,12 +26076,12 @@ function _e1({
|
|
|
26076
26076
|
}
|
|
26077
26077
|
),
|
|
26078
26078
|
F && /* @__PURE__ */ $("div", { className: "flex flex-col gap-3 flex-1 min-w-0", children: [
|
|
26079
|
-
i.map((
|
|
26079
|
+
i.map((w) => /* @__PURE__ */ k(
|
|
26080
26080
|
Qf,
|
|
26081
26081
|
{
|
|
26082
|
-
title:
|
|
26083
|
-
subtitle:
|
|
26084
|
-
iconFile: g(
|
|
26082
|
+
title: w.nombre,
|
|
26083
|
+
subtitle: w.size !== void 0 ? `${w.size}MB` : "",
|
|
26084
|
+
iconFile: g(w.nombre),
|
|
26085
26085
|
className: I,
|
|
26086
26086
|
titleClassName: q,
|
|
26087
26087
|
subtitleClassName: B,
|
|
@@ -26090,26 +26090,26 @@ function _e1({
|
|
|
26090
26090
|
{
|
|
26091
26091
|
label: "Descargar",
|
|
26092
26092
|
icon: j?.download,
|
|
26093
|
-
onClick: () => h?.(
|
|
26093
|
+
onClick: () => h?.(w)
|
|
26094
26094
|
},
|
|
26095
26095
|
{
|
|
26096
26096
|
label: "Borrar",
|
|
26097
26097
|
icon: j?.remove,
|
|
26098
26098
|
danger: !0,
|
|
26099
|
-
onClick: () => n?.(
|
|
26099
|
+
onClick: () => n?.(w.id)
|
|
26100
26100
|
}
|
|
26101
26101
|
]
|
|
26102
26102
|
},
|
|
26103
|
-
`existing-${
|
|
26103
|
+
`existing-${w.id}`
|
|
26104
26104
|
)),
|
|
26105
|
-
Z.map((
|
|
26106
|
-
const a1 = (
|
|
26105
|
+
Z.map((w, e1) => {
|
|
26106
|
+
const a1 = (w.size / 1024 / 1024).toFixed(0);
|
|
26107
26107
|
return /* @__PURE__ */ k(
|
|
26108
26108
|
Qf,
|
|
26109
26109
|
{
|
|
26110
|
-
title:
|
|
26110
|
+
title: w.name,
|
|
26111
26111
|
subtitle: `${a1}MB`,
|
|
26112
|
-
iconFile: g(
|
|
26112
|
+
iconFile: g(w.name),
|
|
26113
26113
|
className: I,
|
|
26114
26114
|
titleClassName: q,
|
|
26115
26115
|
subtitleClassName: B,
|
|
@@ -26143,7 +26143,7 @@ const we1 = ({
|
|
|
26143
26143
|
"div",
|
|
26144
26144
|
{
|
|
26145
26145
|
onClick: c,
|
|
26146
|
-
className:
|
|
26146
|
+
className: b(
|
|
26147
26147
|
"w-full bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden transition-all duration-200",
|
|
26148
26148
|
h && "cursor-pointer",
|
|
26149
26149
|
h && "hover:shadow-md",
|
|
@@ -26158,16 +26158,16 @@ const we1 = ({
|
|
|
26158
26158
|
/* @__PURE__ */ k(
|
|
26159
26159
|
"div",
|
|
26160
26160
|
{
|
|
26161
|
-
className:
|
|
26161
|
+
className: b(
|
|
26162
26162
|
"min-h-[72px] px-6 py-4 flex items-center justify-between",
|
|
26163
26163
|
a
|
|
26164
26164
|
),
|
|
26165
26165
|
children: t || /* @__PURE__ */ $(Uf, { children: [
|
|
26166
|
-
/* @__PURE__ */ k("div", { className:
|
|
26167
|
-
/* @__PURE__ */ k("div", { className:
|
|
26168
|
-
/* @__PURE__ */ k("div", { className:
|
|
26169
|
-
/* @__PURE__ */ k("div", { className:
|
|
26170
|
-
/* @__PURE__ */ k("div", { className:
|
|
26166
|
+
/* @__PURE__ */ k("div", { className: b("flex-1 h-5 rounded-md bg-gray-100", n) }),
|
|
26167
|
+
/* @__PURE__ */ k("div", { className: b("w-24 h-5 rounded-md bg-gray-100 ml-6", n) }),
|
|
26168
|
+
/* @__PURE__ */ k("div", { className: b("w-24 h-5 rounded-md bg-gray-100 ml-6", n) }),
|
|
26169
|
+
/* @__PURE__ */ k("div", { className: b("w-32 h-5 rounded-md bg-gray-100 ml-6", n) }),
|
|
26170
|
+
/* @__PURE__ */ k("div", { className: b("w-6 h-6 rounded-md bg-gray-100 ml-6", n) })
|
|
26171
26171
|
] })
|
|
26172
26172
|
}
|
|
26173
26173
|
)
|
|
@@ -26216,11 +26216,11 @@ const we1 = ({
|
|
|
26216
26216
|
question: { icon: "?", bg: "bg-orange-100", text: "text-orange-500" },
|
|
26217
26217
|
content: { icon: "•", bg: "bg-gray-100", text: "text-gray-500" }
|
|
26218
26218
|
}[o];
|
|
26219
|
-
return /* @__PURE__ */ $("div", { className:
|
|
26219
|
+
return /* @__PURE__ */ $("div", { className: b("fixed inset-0 z-50 flex items-center justify-center", I), children: [
|
|
26220
26220
|
/* @__PURE__ */ k(
|
|
26221
26221
|
"div",
|
|
26222
26222
|
{
|
|
26223
|
-
className:
|
|
26223
|
+
className: b("absolute inset-0 backdrop-blur-sm bg-black/20", C),
|
|
26224
26224
|
onClick: () => {
|
|
26225
26225
|
s && c();
|
|
26226
26226
|
}
|
|
@@ -26229,17 +26229,17 @@ const we1 = ({
|
|
|
26229
26229
|
/* @__PURE__ */ $(
|
|
26230
26230
|
"div",
|
|
26231
26231
|
{
|
|
26232
|
-
className:
|
|
26232
|
+
className: b(
|
|
26233
26233
|
"relative z-10 bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden animate-in fade-in zoom-in-95 duration-200",
|
|
26234
26234
|
v[l],
|
|
26235
26235
|
A
|
|
26236
26236
|
),
|
|
26237
26237
|
children: [
|
|
26238
|
-
/* @__PURE__ */ $("div", { className:
|
|
26238
|
+
/* @__PURE__ */ $("div", { className: b("px-6 pt-6 pb-4 text-center", f), children: [
|
|
26239
26239
|
!x && /* @__PURE__ */ k(
|
|
26240
26240
|
"div",
|
|
26241
26241
|
{
|
|
26242
|
-
className:
|
|
26242
|
+
className: b(
|
|
26243
26243
|
"w-14 h-14 mx-auto mb-4 rounded-full flex items-center justify-center text-2xl font-bold",
|
|
26244
26244
|
Q.bg,
|
|
26245
26245
|
Q.text,
|
|
@@ -26248,14 +26248,14 @@ const we1 = ({
|
|
|
26248
26248
|
children: Q.icon
|
|
26249
26249
|
}
|
|
26250
26250
|
),
|
|
26251
|
-
/* @__PURE__ */ k("h2", { className:
|
|
26252
|
-
i && /* @__PURE__ */ k("p", { className:
|
|
26251
|
+
/* @__PURE__ */ k("h2", { className: b("text-lg font-semibold text-gray-900", L), children: a }),
|
|
26252
|
+
i && /* @__PURE__ */ k("p", { className: b("mt-2 text-sm text-gray-500", j), children: i })
|
|
26253
26253
|
] }),
|
|
26254
|
-
n && /* @__PURE__ */ k("div", { className:
|
|
26254
|
+
n && /* @__PURE__ */ k("div", { className: b("px-6 pb-6", _), children: n }),
|
|
26255
26255
|
(h || d) && /* @__PURE__ */ $(
|
|
26256
26256
|
"div",
|
|
26257
26257
|
{
|
|
26258
|
-
className:
|
|
26258
|
+
className: b(
|
|
26259
26259
|
"flex justify-end gap-3 px-6 py-4 bg-gray-50 border-t border-gray-100",
|
|
26260
26260
|
q
|
|
26261
26261
|
),
|
|
@@ -26297,7 +26297,7 @@ const we1 = ({
|
|
|
26297
26297
|
}) => t ? /* @__PURE__ */ $(
|
|
26298
26298
|
"div",
|
|
26299
26299
|
{
|
|
26300
|
-
className:
|
|
26300
|
+
className: b(
|
|
26301
26301
|
"fixed inset-0 z-40",
|
|
26302
26302
|
h && "pointer-events-none",
|
|
26303
26303
|
d
|
|
@@ -26306,7 +26306,7 @@ const we1 = ({
|
|
|
26306
26306
|
/* @__PURE__ */ k(
|
|
26307
26307
|
"div",
|
|
26308
26308
|
{
|
|
26309
|
-
className:
|
|
26309
|
+
className: b("absolute inset-0 backdrop-blur-sm", l),
|
|
26310
26310
|
style: {
|
|
26311
26311
|
backdropFilter: `blur(${c}px)`,
|
|
26312
26312
|
backgroundColor: `rgba(255,255,255,${o})`
|
|
@@ -26319,7 +26319,7 @@ const we1 = ({
|
|
|
26319
26319
|
/* @__PURE__ */ k(
|
|
26320
26320
|
"div",
|
|
26321
26321
|
{
|
|
26322
|
-
className:
|
|
26322
|
+
className: b(
|
|
26323
26323
|
"relative z-50 flex items-center justify-center w-full h-full",
|
|
26324
26324
|
!h && "pointer-events-auto",
|
|
26325
26325
|
s
|
|
@@ -26348,9 +26348,9 @@ function Ne1({
|
|
|
26348
26348
|
onExternalSearch: y
|
|
26349
26349
|
}) {
|
|
26350
26350
|
const [x, I] = Wt(1), [C, A] = Wt({}), [f, _] = Wt(null), q = Ug(null), B = Ug(null), L = !!s, j = (g, F) => {
|
|
26351
|
-
const
|
|
26352
|
-
A(
|
|
26353
|
-
y(
|
|
26351
|
+
const w = L ? { [g]: F } : { ...C, [g]: F };
|
|
26352
|
+
A(w), I(1), L && y && (B.current && clearTimeout(B.current), B.current = setTimeout(() => {
|
|
26353
|
+
y(JSON.stringify(w));
|
|
26354
26354
|
}, 350));
|
|
26355
26355
|
};
|
|
26356
26356
|
lx(() => {
|
|
@@ -26361,15 +26361,15 @@ function Ne1({
|
|
|
26361
26361
|
}, []);
|
|
26362
26362
|
const v = v_(() => L ? c : c.filter(
|
|
26363
26363
|
(g) => t.every((F) => {
|
|
26364
|
-
const
|
|
26365
|
-
return
|
|
26364
|
+
const w = C[F.key]?.toLowerCase() || "";
|
|
26365
|
+
return w ? String(g[F.key]).toLowerCase().includes(w) : !0;
|
|
26366
26366
|
})
|
|
26367
26367
|
), [c, C, t, L]), Z = L ? s.currentPage : x, Q = L ? s.lastPage : Math.max(1, Math.ceil(v.length / o)), z = (x - 1) * o, W = L ? c : v.slice(z, z + o), t1 = (g) => {
|
|
26368
26368
|
g < 1 || g > Q || (L ? s.onPageChange(g) : I(g));
|
|
26369
26369
|
}, n1 = (g, F) => {
|
|
26370
26370
|
_(null), g.onClick ? g.onClick(F) : h && h(g, F);
|
|
26371
26371
|
}, R = () => {
|
|
26372
|
-
if (Q <= 7) return Array.from({ length: Q }, (F,
|
|
26372
|
+
if (Q <= 7) return Array.from({ length: Q }, (F, w) => w + 1);
|
|
26373
26373
|
const g = [];
|
|
26374
26374
|
g.push(1), Z > 3 && g.push("...");
|
|
26375
26375
|
for (let F = Math.max(2, Z - 1); F <= Math.min(Q - 1, Z + 1); F++)
|
|
@@ -26408,7 +26408,7 @@ function Ne1({
|
|
|
26408
26408
|
] })
|
|
26409
26409
|
] }),
|
|
26410
26410
|
/* @__PURE__ */ k("tbody", { children: W.length === 0 ? /* @__PURE__ */ k("tr", { children: /* @__PURE__ */ k("td", { colSpan: t.length + 1, className: "p-4 text-center text-sm text-gray-500", children: "No hay resultados" }) }) : W.map((g, F) => {
|
|
26411
|
-
const
|
|
26411
|
+
const w = L ? F : z + F, e1 = Array.isArray(g.actions) && g.actions.length > 0, a1 = F >= W.length - 2;
|
|
26412
26412
|
return /* @__PURE__ */ $(
|
|
26413
26413
|
"tr",
|
|
26414
26414
|
{
|
|
@@ -26423,14 +26423,14 @@ function Ne1({
|
|
|
26423
26423
|
{
|
|
26424
26424
|
type: "button",
|
|
26425
26425
|
onClick: (J) => {
|
|
26426
|
-
J.stopPropagation(), _(f ===
|
|
26426
|
+
J.stopPropagation(), _(f === w ? null : w);
|
|
26427
26427
|
},
|
|
26428
26428
|
className: "px-2 py-1 rounded hover:bg-gray-200 transition cursor-pointer text-gray-400 hover:text-gray-600",
|
|
26429
26429
|
"aria-label": "Acciones",
|
|
26430
26430
|
children: "•••"
|
|
26431
26431
|
}
|
|
26432
26432
|
),
|
|
26433
|
-
f ===
|
|
26433
|
+
f === w && /* @__PURE__ */ k(
|
|
26434
26434
|
"div",
|
|
26435
26435
|
{
|
|
26436
26436
|
ref: q,
|
|
@@ -26541,8 +26541,8 @@ const Ie1 = ({
|
|
|
26541
26541
|
L.current?.contains(W.target) || _(!1);
|
|
26542
26542
|
};
|
|
26543
26543
|
return document.addEventListener("mousedown", z), () => document.removeEventListener("mousedown", z);
|
|
26544
|
-
}, []), /* @__PURE__ */ $("div", { className:
|
|
26545
|
-
a && /* @__PURE__ */ $("label", { className:
|
|
26544
|
+
}, []), /* @__PURE__ */ $("div", { className: b("w-[300px] text-sm relative", l), ref: L, children: [
|
|
26545
|
+
a && /* @__PURE__ */ $("label", { className: b("block mb-1 font-medium", I), children: [
|
|
26546
26546
|
a,
|
|
26547
26547
|
" ",
|
|
26548
26548
|
i && /* @__PURE__ */ k("span", { className: "text-red-500", children: "*" })
|
|
@@ -26550,7 +26550,7 @@ const Ie1 = ({
|
|
|
26550
26550
|
/* @__PURE__ */ $(
|
|
26551
26551
|
"div",
|
|
26552
26552
|
{
|
|
26553
|
-
className:
|
|
26553
|
+
className: b(
|
|
26554
26554
|
"border rounded-lg px-3 py-2 flex items-center cursor-pointer justify-between",
|
|
26555
26555
|
s
|
|
26556
26556
|
),
|
|
@@ -26590,7 +26590,7 @@ const Ie1 = ({
|
|
|
26590
26590
|
f && /* @__PURE__ */ $(
|
|
26591
26591
|
"div",
|
|
26592
26592
|
{
|
|
26593
|
-
className:
|
|
26593
|
+
className: b(
|
|
26594
26594
|
"border rounded-lg mt-2 p-2 bg-white shadow absolute w-full z-50",
|
|
26595
26595
|
y
|
|
26596
26596
|
),
|
|
@@ -26600,7 +26600,7 @@ const Ie1 = ({
|
|
|
26600
26600
|
{
|
|
26601
26601
|
type: "text",
|
|
26602
26602
|
placeholder: "Buscar...",
|
|
26603
|
-
className:
|
|
26603
|
+
className: b(
|
|
26604
26604
|
"w-full border px-2 py-1 mb-2 rounded",
|
|
26605
26605
|
A
|
|
26606
26606
|
),
|
|
@@ -26611,7 +26611,7 @@ const Ie1 = ({
|
|
|
26611
26611
|
/* @__PURE__ */ k("div", { className: "max-h-40 overflow-auto", children: Q.map((z) => /* @__PURE__ */ $(
|
|
26612
26612
|
"div",
|
|
26613
26613
|
{
|
|
26614
|
-
className:
|
|
26614
|
+
className: b(
|
|
26615
26615
|
"flex items-center gap-2 px-2 py-1 hover:bg-gray-100 cursor-pointer",
|
|
26616
26616
|
x
|
|
26617
26617
|
),
|
|
@@ -26634,7 +26634,7 @@ const Ie1 = ({
|
|
|
26634
26634
|
]
|
|
26635
26635
|
}
|
|
26636
26636
|
),
|
|
26637
|
-
n && /* @__PURE__ */ k("p", { className:
|
|
26637
|
+
n && /* @__PURE__ */ k("p", { className: b("text-gray-400 mt-1 text-xs", C), children: n })
|
|
26638
26638
|
] });
|
|
26639
26639
|
};
|
|
26640
26640
|
function $e1({
|