nectiasw 0.0.62 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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
@@ -56787,41 +56787,42 @@ const Vde = ye.div`
56787
56787
  renderContent: a,
56788
56788
  onStatusChange: s,
56789
56789
  acceptedFileType: l,
56790
- statusMessages: c,
56791
- statusColors: d,
56792
- statusBorder: h,
56793
- statusIcons: m = {
56790
+ renderBelowFilename: c,
56791
+ statusMessages: d,
56792
+ statusColors: h,
56793
+ statusBorder: m,
56794
+ statusIcons: g = {
56794
56795
  [Ei.DragActive]: ek,
56795
56796
  [Ei.InvalidType]: tk,
56796
56797
  [Ei.WithError]: tk,
56797
56798
  [Ei.Reload]: Qde
56798
56799
  },
56799
- ...g
56800
+ ...x
56800
56801
  }) => {
56801
- const x = {
56802
+ const v = {
56802
56803
  [Ei.DragActive]: [
56803
56804
  "Mensaje personalizado 1",
56804
56805
  "Mensaje personalizado 2"
56805
56806
  ]
56806
- }, v = {
56807
- [Ei.WithError]: "red"
56808
56807
  }, f = {
56808
+ [Ei.WithError]: "red"
56809
+ }, b = {
56809
56810
  [Ei.DragActive]: "green"
56810
- }, b = Ft(
56811
- (N) => {
56812
- const L = N[0];
56813
- o == null || o(L);
56811
+ }, w = Ft(
56812
+ (L) => {
56813
+ const j = L[0];
56814
+ o == null || o(j);
56814
56815
  },
56815
56816
  [o]
56816
- ), { getRootProps: w, getInputProps: y, isDragActive: A, fileRejections: _ } = y7({
56817
+ ), { getRootProps: y, getInputProps: A, isDragActive: _, fileRejections: I } = y7({
56817
56818
  accept: l,
56818
56819
  maxSize: r,
56819
56820
  maxFiles: 1,
56820
- onDrop: b,
56821
+ onDrop: w,
56821
56822
  onDropRejected: () => {
56822
- if (_.length > 0) {
56823
- const { code: N } = _[0].errors[0];
56824
- switch (N) {
56823
+ if (I.length > 0) {
56824
+ const { code: L } = I[0].errors[0];
56825
+ switch (L) {
56825
56826
  case "file-too-large":
56826
56827
  s == null || s(Ei.FileTooBig);
56827
56828
  break;
@@ -56831,21 +56832,21 @@ const Vde = ye.div`
56831
56832
  }
56832
56833
  }
56833
56834
  }
56834
- }), I = e || Ei.DragActive, D = (m == null ? void 0 : m[I]) || ek;
56835
+ }), D = e || Ei.DragActive, O = (g == null ? void 0 : g[D]) || ek;
56835
56836
  e = e || Ei.DragActive;
56836
- const O = (d == null ? void 0 : d[e]) ?? v[e] ?? [], F = (h == null ? void 0 : h[e]) ?? f[e] ?? [], M = (c == null ? void 0 : c[e]) ?? x[e] ?? [];
56837
+ const F = (h == null ? void 0 : h[e]) ?? f[e] ?? [], M = (m == null ? void 0 : m[e]) ?? b[e] ?? [], N = (d == null ? void 0 : d[e]) ?? v[e] ?? [];
56837
56838
  return /* @__PURE__ */ he(
56838
56839
  Vde,
56839
56840
  {
56840
- ...w(),
56841
- isDragActive: A,
56842
- borderColor: F,
56841
+ ...y(),
56842
+ isDragActive: _,
56843
+ borderColor: M,
56843
56844
  wrongColor: t,
56844
56845
  successColor: i,
56845
- ...g,
56846
+ ...x,
56846
56847
  children: [
56847
- D && /* @__PURE__ */ B(D, {}),
56848
- e && [Ei.WithError, Ei.Reload].includes(e) && n && /* @__PURE__ */ he(Zde, { backgroundColor: O, children: [
56848
+ O && /* @__PURE__ */ B(O, {}),
56849
+ e && [Ei.WithError, Ei.Reload].includes(e) && n && /* @__PURE__ */ he(Zde, { backgroundColor: F, children: [
56849
56850
  /* @__PURE__ */ B(qde, {}),
56850
56851
  " ",
56851
56852
  /* @__PURE__ */ he("p", { children: [
@@ -56854,11 +56855,12 @@ const Vde = ye.div`
56854
56855
  " "
56855
56856
  ] })
56856
56857
  ] }),
56858
+ c && c,
56857
56859
  /* @__PURE__ */ he(Gde, { children: [
56858
- M.filter(Boolean).map((N) => /* @__PURE__ */ B("p", { children: N }, N)),
56860
+ N.filter(Boolean).map((L) => /* @__PURE__ */ B("p", { children: L }, L)),
56859
56861
  a && a
56860
56862
  ] }),
56861
- /* @__PURE__ */ B(Xde, { ...y() })
56863
+ /* @__PURE__ */ B(Xde, { ...A() })
56862
56864
  ]
56863
56865
  }
56864
56866
  );