lawgic-dev-kit 0.15.6 → 0.15.8

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