nectiasw 0.0.101 → 0.0.103
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/components/Dragarea/types.d.ts +3 -2
- package/dist/index.es.js +29 -28
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type DragareaProps = {
|
|
2
2
|
color?: string;
|
|
3
|
-
width?: number;
|
|
4
|
-
height?: number;
|
|
3
|
+
width?: number | string;
|
|
4
|
+
height?: number | string;
|
|
5
5
|
filename?: string;
|
|
6
6
|
message?: string;
|
|
7
7
|
status?: DropStatus;
|
|
@@ -22,6 +22,7 @@ export type DragareaProps = {
|
|
|
22
22
|
statusColors?: Partial<Record<DropStatus, string>>;
|
|
23
23
|
statusBorder?: Partial<Record<DropStatus, string>>;
|
|
24
24
|
renderContent?: JSX.Element;
|
|
25
|
+
renderBelowFilename?: JSX.Element;
|
|
25
26
|
statusIcons?: Partial<Record<DropStatus, React.ComponentType<any>>>;
|
|
26
27
|
};
|
|
27
28
|
export declare enum DropStatus {
|
package/dist/index.es.js
CHANGED
|
@@ -14421,7 +14421,6 @@ const wU = /* @__PURE__ */ U.forwardRef(xU), N6 = ye.input.attrs({ type: "checkb
|
|
|
14421
14421
|
top: ${(e) => e.top ?? "50%"};
|
|
14422
14422
|
left: ${(e) => e.left};
|
|
14423
14423
|
right: ${(e) => e.right ?? "0.125rem"};
|
|
14424
|
-
|
|
14425
14424
|
transform: translateY(-50%);
|
|
14426
14425
|
color: ${(e) => e.checked ? "#FFFFFF" : "transparent"};
|
|
14427
14426
|
margin: 0;
|
|
@@ -56830,41 +56829,42 @@ const Hde = ye.div`
|
|
|
56830
56829
|
renderContent: a,
|
|
56831
56830
|
onStatusChange: s,
|
|
56832
56831
|
acceptedFileType: l,
|
|
56833
|
-
|
|
56834
|
-
|
|
56835
|
-
|
|
56836
|
-
|
|
56832
|
+
renderBelowFilename: c,
|
|
56833
|
+
statusMessages: d,
|
|
56834
|
+
statusColors: h,
|
|
56835
|
+
statusBorder: m,
|
|
56836
|
+
statusIcons: g = {
|
|
56837
56837
|
[Ei.DragActive]: ek,
|
|
56838
56838
|
[Ei.InvalidType]: tk,
|
|
56839
56839
|
[Ei.WithError]: tk,
|
|
56840
56840
|
[Ei.Reload]: jde
|
|
56841
56841
|
},
|
|
56842
|
-
...
|
|
56842
|
+
...x
|
|
56843
56843
|
}) => {
|
|
56844
|
-
const
|
|
56844
|
+
const v = {
|
|
56845
56845
|
[Ei.DragActive]: [
|
|
56846
56846
|
"Mensaje personalizado 1",
|
|
56847
56847
|
"Mensaje personalizado 2"
|
|
56848
56848
|
]
|
|
56849
|
-
}, v = {
|
|
56850
|
-
[Ei.WithError]: "red"
|
|
56851
56849
|
}, f = {
|
|
56850
|
+
[Ei.WithError]: "red"
|
|
56851
|
+
}, b = {
|
|
56852
56852
|
[Ei.DragActive]: "green"
|
|
56853
|
-
},
|
|
56854
|
-
(
|
|
56855
|
-
const
|
|
56856
|
-
o == null || o(
|
|
56853
|
+
}, w = Ft(
|
|
56854
|
+
(L) => {
|
|
56855
|
+
const Y = L[0];
|
|
56856
|
+
o == null || o(Y);
|
|
56857
56857
|
},
|
|
56858
56858
|
[o]
|
|
56859
|
-
), { getRootProps:
|
|
56859
|
+
), { getRootProps: y, getInputProps: S, isDragActive: _, fileRejections: k } = b7({
|
|
56860
56860
|
accept: l,
|
|
56861
56861
|
maxSize: r,
|
|
56862
56862
|
maxFiles: 1,
|
|
56863
|
-
onDrop:
|
|
56863
|
+
onDrop: w,
|
|
56864
56864
|
onDropRejected: () => {
|
|
56865
|
-
if (
|
|
56866
|
-
const { code:
|
|
56867
|
-
switch (
|
|
56865
|
+
if (k.length > 0) {
|
|
56866
|
+
const { code: L } = k[0].errors[0];
|
|
56867
|
+
switch (L) {
|
|
56868
56868
|
case "file-too-large":
|
|
56869
56869
|
s == null || s(Ei.FileTooBig);
|
|
56870
56870
|
break;
|
|
@@ -56874,21 +56874,21 @@ const Hde = ye.div`
|
|
|
56874
56874
|
}
|
|
56875
56875
|
}
|
|
56876
56876
|
}
|
|
56877
|
-
}),
|
|
56877
|
+
}), D = e || Ei.DragActive, O = (g == null ? void 0 : g[D]) || ek;
|
|
56878
56878
|
e = e || Ei.DragActive;
|
|
56879
|
-
const
|
|
56879
|
+
const M = (h == null ? void 0 : h[e]) ?? f[e] ?? [], F = (m == null ? void 0 : m[e]) ?? b[e] ?? [], N = (d == null ? void 0 : d[e]) ?? v[e] ?? [];
|
|
56880
56880
|
return /* @__PURE__ */ he(
|
|
56881
56881
|
Hde,
|
|
56882
56882
|
{
|
|
56883
|
-
...
|
|
56884
|
-
isDragActive:
|
|
56885
|
-
borderColor:
|
|
56883
|
+
...y(),
|
|
56884
|
+
isDragActive: _,
|
|
56885
|
+
borderColor: F,
|
|
56886
56886
|
wrongColor: t,
|
|
56887
56887
|
successColor: i,
|
|
56888
|
-
...
|
|
56888
|
+
...x,
|
|
56889
56889
|
children: [
|
|
56890
|
-
|
|
56891
|
-
e && [Ei.WithError, Ei.Reload].includes(e) && n && /* @__PURE__ */ he(Ude, { backgroundColor:
|
|
56890
|
+
O && /* @__PURE__ */ B(O, {}),
|
|
56891
|
+
e && [Ei.WithError, Ei.Reload].includes(e) && n && /* @__PURE__ */ he(Ude, { backgroundColor: M, children: [
|
|
56892
56892
|
/* @__PURE__ */ B(Yde, {}),
|
|
56893
56893
|
" ",
|
|
56894
56894
|
/* @__PURE__ */ he("p", { children: [
|
|
@@ -56897,11 +56897,12 @@ const Hde = ye.div`
|
|
|
56897
56897
|
" "
|
|
56898
56898
|
] })
|
|
56899
56899
|
] }),
|
|
56900
|
+
c && c,
|
|
56900
56901
|
/* @__PURE__ */ he(Wde, { children: [
|
|
56901
|
-
|
|
56902
|
+
N.filter(Boolean).map((L) => /* @__PURE__ */ B("p", { children: L }, L)),
|
|
56902
56903
|
a && a
|
|
56903
56904
|
] }),
|
|
56904
|
-
/* @__PURE__ */ B($de, { ...
|
|
56905
|
+
/* @__PURE__ */ B($de, { ...S() })
|
|
56905
56906
|
]
|
|
56906
56907
|
}
|
|
56907
56908
|
);
|