nectiasw 0.0.61 → 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,9 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  export type CheckboxIconProps = {
3
3
  status?: boolean;
4
- };
4
+ } & Pick<CheckboxProps, "left" | "top" | "right">;
5
5
  export type CheckboxProps = {
6
6
  id?: string;
7
+ top?: string;
8
+ left?: string;
9
+ right?: string;
7
10
  name?: string;
8
11
  label?: string;
9
12
  value?: string;
@@ -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
@@ -14023,8 +14023,9 @@ const B6 = ye.input.attrs({ type: "checkbox" })`
14023
14023
  transition: background-color 0.2s linear, border-color 0.2s linear;
14024
14024
  `, Q$ = ye(q$)`
14025
14025
  position: absolute;
14026
- top: 50%;
14027
- right: 0.125rem;
14026
+ left: ${(e) => e.left};
14027
+ top: ${(e) => e.top ?? "50%"};
14028
+ right: ${(e) => e.right ?? "0.125rem"};
14028
14029
  transform: translateY(-50%);
14029
14030
  color: ${(e) => e.status ? "#FFFFFF" : "transparent"};
14030
14031
  margin: 0;
@@ -14038,30 +14039,33 @@ B6.defaultProps = {
14038
14039
  };
14039
14040
  const L6 = ({
14040
14041
  id: e,
14041
- name: n,
14042
- label: t,
14043
- checked: r,
14044
- disabled: i,
14045
- onChange: o,
14046
- className: a
14042
+ top: n,
14043
+ left: t,
14044
+ right: r,
14045
+ name: i,
14046
+ label: o,
14047
+ checked: a,
14048
+ disabled: s,
14049
+ onChange: l,
14050
+ className: c
14047
14051
  }) => {
14048
- const s = () => {
14049
- o == null || o(!r);
14052
+ const d = () => {
14053
+ l == null || l(!a);
14050
14054
  };
14051
- return /* @__PURE__ */ he("div", { className: Ce(yb.container.root, a && a), children: [
14055
+ return /* @__PURE__ */ he("div", { className: Ce(yb.container.root, c && c), children: [
14052
14056
  /* @__PURE__ */ B(
14053
14057
  B6,
14054
14058
  {
14055
14059
  id: e,
14056
- name: n,
14057
- checked: r,
14058
- disabled: i,
14059
- onClick: s,
14060
+ name: i,
14061
+ checked: a,
14062
+ disabled: s,
14063
+ onClick: d,
14060
14064
  className: yb.container.input
14061
14065
  }
14062
14066
  ),
14063
- /* @__PURE__ */ B(Q$, { status: r, onClick: s }),
14064
- t && /* @__PURE__ */ B("label", { htmlFor: e, className: yb.container.label, children: t })
14067
+ /* @__PURE__ */ B(Q$, { top: n, right: r, left: t, status: a, onClick: d }),
14068
+ o && /* @__PURE__ */ B("label", { htmlFor: e, className: yb.container.label, children: o })
14065
14069
  ] });
14066
14070
  };
14067
14071
  var J$ = Object.defineProperty, K$ = (e, n, t) => n in e ? J$(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, xb = (e, n, t) => (K$(e, typeof n != "symbol" ? n + "" : n, t), t);
@@ -56783,41 +56787,42 @@ const Vde = ye.div`
56783
56787
  renderContent: a,
56784
56788
  onStatusChange: s,
56785
56789
  acceptedFileType: l,
56786
- statusMessages: c,
56787
- statusColors: d,
56788
- statusBorder: h,
56789
- statusIcons: m = {
56790
+ renderBelowFilename: c,
56791
+ statusMessages: d,
56792
+ statusColors: h,
56793
+ statusBorder: m,
56794
+ statusIcons: g = {
56790
56795
  [Ei.DragActive]: ek,
56791
56796
  [Ei.InvalidType]: tk,
56792
56797
  [Ei.WithError]: tk,
56793
56798
  [Ei.Reload]: Qde
56794
56799
  },
56795
- ...g
56800
+ ...x
56796
56801
  }) => {
56797
- const x = {
56802
+ const v = {
56798
56803
  [Ei.DragActive]: [
56799
56804
  "Mensaje personalizado 1",
56800
56805
  "Mensaje personalizado 2"
56801
56806
  ]
56802
- }, v = {
56803
- [Ei.WithError]: "red"
56804
56807
  }, f = {
56808
+ [Ei.WithError]: "red"
56809
+ }, b = {
56805
56810
  [Ei.DragActive]: "green"
56806
- }, b = Ft(
56807
- (N) => {
56808
- const L = N[0];
56809
- o == null || o(L);
56811
+ }, w = Ft(
56812
+ (L) => {
56813
+ const j = L[0];
56814
+ o == null || o(j);
56810
56815
  },
56811
56816
  [o]
56812
- ), { getRootProps: w, getInputProps: y, isDragActive: A, fileRejections: _ } = y7({
56817
+ ), { getRootProps: y, getInputProps: A, isDragActive: _, fileRejections: I } = y7({
56813
56818
  accept: l,
56814
56819
  maxSize: r,
56815
56820
  maxFiles: 1,
56816
- onDrop: b,
56821
+ onDrop: w,
56817
56822
  onDropRejected: () => {
56818
- if (_.length > 0) {
56819
- const { code: N } = _[0].errors[0];
56820
- switch (N) {
56823
+ if (I.length > 0) {
56824
+ const { code: L } = I[0].errors[0];
56825
+ switch (L) {
56821
56826
  case "file-too-large":
56822
56827
  s == null || s(Ei.FileTooBig);
56823
56828
  break;
@@ -56827,21 +56832,21 @@ const Vde = ye.div`
56827
56832
  }
56828
56833
  }
56829
56834
  }
56830
- }), 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;
56831
56836
  e = e || Ei.DragActive;
56832
- 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] ?? [];
56833
56838
  return /* @__PURE__ */ he(
56834
56839
  Vde,
56835
56840
  {
56836
- ...w(),
56837
- isDragActive: A,
56838
- borderColor: F,
56841
+ ...y(),
56842
+ isDragActive: _,
56843
+ borderColor: M,
56839
56844
  wrongColor: t,
56840
56845
  successColor: i,
56841
- ...g,
56846
+ ...x,
56842
56847
  children: [
56843
- D && /* @__PURE__ */ B(D, {}),
56844
- 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: [
56845
56850
  /* @__PURE__ */ B(qde, {}),
56846
56851
  " ",
56847
56852
  /* @__PURE__ */ he("p", { children: [
@@ -56850,11 +56855,12 @@ const Vde = ye.div`
56850
56855
  " "
56851
56856
  ] })
56852
56857
  ] }),
56858
+ c && c,
56853
56859
  /* @__PURE__ */ he(Gde, { children: [
56854
- M.filter(Boolean).map((N) => /* @__PURE__ */ B("p", { children: N }, N)),
56860
+ N.filter(Boolean).map((L) => /* @__PURE__ */ B("p", { children: L }, L)),
56855
56861
  a && a
56856
56862
  ] }),
56857
- /* @__PURE__ */ B(Xde, { ...y() })
56863
+ /* @__PURE__ */ B(Xde, { ...A() })
56858
56864
  ]
56859
56865
  }
56860
56866
  );