lawgic-dev-kit 0.15.4 → 0.15.6

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,5 +1,4 @@
1
- import { __require as r } from "../node_modules/property-expr/index.js";
2
- var e = r();
1
+ var p = { exports: {} };
3
2
  export {
4
- e as p
3
+ p as __module
5
4
  };
@@ -1,5 +1,5 @@
1
- import { __require as r } from "../node_modules/tiny-case/index.js";
2
- var a = r();
1
+ import { __require as r } from "../node_modules/property-expr/index.js";
2
+ var e = r();
3
3
  export {
4
- a as t
4
+ e as p
5
5
  };
@@ -1,7 +1,5 @@
1
- import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/toposort/index.js";
3
- var t = r();
4
- const s = /* @__PURE__ */ o(t);
1
+ import { __require as r } from "../node_modules/tiny-case/index.js";
2
+ var a = r();
5
3
  export {
6
- s as default
4
+ a as t
7
5
  };
@@ -1,4 +1,7 @@
1
- var p = { exports: {} };
1
+ import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/toposort/index.js";
3
+ var t = r();
4
+ const s = /* @__PURE__ */ o(t);
2
5
  export {
3
- p as __module
6
+ s as default
4
7
  };
@@ -1,21 +1,21 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import { useState as D, useRef as L } from "react";
2
+ import { useState as y, useRef as L } from "react";
3
3
  import { translateBytes as P } from "../../../utils/files.js";
4
4
  import "../../../_virtual/lodash.js";
5
5
  import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
- import { useTheme as $ } from "../../../hooks/useTheme.js";
6
+ import { useTheme as F } from "../../../hooks/useTheme.js";
7
7
  import "react-hook-form";
8
8
  import "../../../constants/countries.js";
9
9
  import "../ImageProfileInput/ImageProfileInput.validators.js";
10
- import F from "../TextButton/TextButton.js";
10
+ import T from "../TextButton/TextButton.js";
11
11
  import "fuse.js";
12
- import T from "../LoadingProgress/LoadingProgress.js";
12
+ import I from "../LoadingProgress/LoadingProgress.js";
13
13
  import "../../molecules/InformationContainer/InformationContainer.js";
14
- const Q = ({
15
- title: y = "drag_and_drop_your_files_here",
14
+ const V = ({
15
+ title: N = "drag_and_drop_your_files_here",
16
16
  subtitle: p = null,
17
- buttonTitle: N = "choose_files",
18
- onUpload: E = () => {
17
+ buttonTitle: E = "choose_files",
18
+ onUpload: C = () => {
19
19
  },
20
20
  acceptedExtensions: n = [
21
21
  "pdf",
@@ -30,57 +30,58 @@ const Q = ({
30
30
  ],
31
31
  maxSize: l = 1024,
32
32
  // en KB
33
- loading: C = !1,
34
- loadingDuration: k = 1e4
33
+ loading: $ = !1,
34
+ loadingDuration: k = 1e4,
35
+ className: u = ""
35
36
  }) => {
36
- const { t: a } = $(), [m, o] = D(!1), [u, i] = D(""), c = L(null), w = n.map((e) => `.${e}`).join(","), f = (e) => {
37
+ const { t: a } = F(), [m, o] = y(!1), [f, i] = y(""), d = L(null), w = n.map((e) => `.${e}`).join(","), x = (e) => {
37
38
  const r = [];
38
- let d = !1;
39
+ let c = !1;
39
40
  Array.from(e).forEach((s) => {
40
- var b;
41
- const B = ((b = s.name.split(".").pop()) == null ? void 0 : b.toLowerCase()) || "";
41
+ var D;
42
+ const B = ((D = s.name.split(".").pop()) == null ? void 0 : D.toLowerCase()) || "";
42
43
  if (!n.includes(B)) {
43
44
  i(
44
45
  `El archivo ${s.name} tiene una extensión no permitida.`
45
- ), d = !0;
46
+ ), c = !0;
46
47
  return;
47
48
  }
48
49
  if (s.size > l * 1024) {
49
50
  i(
50
51
  `El archivo ${s.name} excede el tamaño máximo de ${l}KB.`
51
- ), d = !0;
52
+ ), c = !0;
52
53
  return;
53
54
  }
54
55
  r.push(s);
55
- }), !d && r.length > 0 && (i(""), E(r));
56
- }, x = () => {
57
- c.current && c.current.click();
56
+ }), !c && r.length > 0 && (i(""), C(r));
57
+ }, g = () => {
58
+ d.current && d.current.click();
58
59
  }, _ = (e) => {
59
60
  const r = e.target.files;
60
- r && r.length > 0 && f(r), e.target.value = "";
61
- }, g = (e) => {
62
- e.preventDefault(), e.stopPropagation(), o(!0);
61
+ r && r.length > 0 && x(r), e.target.value = "";
63
62
  }, h = (e) => {
64
- e.preventDefault(), e.stopPropagation(), o(!1);
63
+ e.preventDefault(), e.stopPropagation(), o(!0);
65
64
  }, v = (e) => {
66
- e.preventDefault(), e.stopPropagation(), m || o(!0);
65
+ e.preventDefault(), e.stopPropagation(), o(!1);
67
66
  }, j = (e) => {
67
+ e.preventDefault(), e.stopPropagation(), m || o(!0);
68
+ }, b = (e) => {
68
69
  e.preventDefault(), e.stopPropagation(), o(!1);
69
70
  const r = e.dataTransfer.files;
70
- r.length > 0 && f(r);
71
+ r.length > 0 && x(r);
71
72
  };
72
- return C ? /* @__PURE__ */ t.jsx("div", { className: "w-full mx-auto font-sans", children: /* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl", children: /* @__PURE__ */ t.jsxs(
73
+ return $ ? /* @__PURE__ */ t.jsx("div", { className: `w-full mx-auto font-sans h-full ${u}`, children: /* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl h-full", children: /* @__PURE__ */ t.jsxs(
73
74
  "div",
74
75
  {
75
76
  className: "flex items-center justify-center gap-16 border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center transition-all duration-300 border-blue-100 select-none",
76
- onDragEnter: g,
77
- onDragLeave: h,
78
- onDragOver: v,
79
- onDrop: j,
80
- onClick: x,
77
+ onDragEnter: h,
78
+ onDragLeave: v,
79
+ onDragOver: j,
80
+ onDrop: b,
81
+ onClick: g,
81
82
  children: [
82
83
  /* @__PURE__ */ t.jsx(
83
- T,
84
+ I,
84
85
  {
85
86
  size: 75,
86
87
  duration: k,
@@ -94,16 +95,16 @@ const Q = ({
94
95
  ] })
95
96
  ]
96
97
  }
97
- ) }) }) : /* @__PURE__ */ t.jsxs("div", { className: "w-full mx-auto font-sans", children: [
98
+ ) }) }) : /* @__PURE__ */ t.jsxs("div", { className: `w-full mx-auto font-sans h-full ${u}`, children: [
98
99
  /* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl", children: /* @__PURE__ */ t.jsxs(
99
100
  "div",
100
101
  {
101
102
  className: `flex flex-col border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${m ? "border-blue-400 bg-blue-100/50" : "border-blue-100 hover:border-blue-400"}`,
102
- onDragEnter: g,
103
- onDragLeave: h,
104
- onDragOver: v,
105
- onDrop: j,
106
- onClick: x,
103
+ onDragEnter: h,
104
+ onDragLeave: v,
105
+ onDragOver: j,
106
+ onDrop: b,
107
+ onClick: g,
107
108
  children: [
108
109
  /* @__PURE__ */ t.jsx("div", { className: "flex justify-center translate-y-4", children: /* @__PURE__ */ t.jsx(
109
110
  "img",
@@ -114,14 +115,14 @@ const Q = ({
114
115
  }
115
116
  ) }),
116
117
  /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center", children: [
117
- /* @__PURE__ */ t.jsx("h3", { className: "font-600 text-xl text-dark", children: a(y) }),
118
+ /* @__PURE__ */ t.jsx("h3", { className: "font-600 text-xl text-dark", children: a(N) }),
118
119
  p && /* @__PURE__ */ t.jsx("p", { className: "font-400 text-lg text-gray-500", children: a(p) }),
119
- /* @__PURE__ */ t.jsx(F, { color: "blue", children: a(N) }),
120
+ /* @__PURE__ */ t.jsx(T, { color: "blue", children: a(E) }),
120
121
  /* @__PURE__ */ t.jsx(
121
122
  "input",
122
123
  {
123
124
  type: "file",
124
- ref: c,
125
+ ref: d,
125
126
  className: "hidden",
126
127
  multiple: !0,
127
128
  accept: w,
@@ -132,7 +133,7 @@ const Q = ({
132
133
  ]
133
134
  }
134
135
  ) }),
135
- u && /* @__PURE__ */ t.jsx("div", { className: "mt-3 text-sm text-red-500", children: u }),
136
+ f && /* @__PURE__ */ t.jsx("div", { className: "mt-3 text-sm text-red-500", children: f }),
136
137
  /* @__PURE__ */ t.jsx("div", { className: "mt-10 w-full flex justify-center", children: /* @__PURE__ */ t.jsxs("span", { className: "text-gray-500 font-400 text-base", children: [
137
138
  n.join(", ").toUpperCase(),
138
139
  " formats. Maximus size:",
@@ -142,5 +143,5 @@ const Q = ({
142
143
  ] });
143
144
  };
144
145
  export {
145
- Q as default
146
+ V as default
146
147
  };
@@ -31,4 +31,5 @@ export interface UploadContainerProps {
31
31
  maxSize?: number;
32
32
  loading?: boolean;
33
33
  loadingDuration?: number;
34
+ className?: string;
34
35
  }