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.
- package/dist/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index5.js +5 -2
- package/dist/components/atoms/UploadContainer/UploadContainer.js +44 -43
- package/dist/components/atoms/UploadContainer/UploadContainer.types.d.ts +1 -0
- package/dist/lawgic-dev-kit.umd.js +36 -36
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/src/components/atoms/UploadContainer/UploadContainer.types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/src/components/atoms/UncontrolledSelector/UncontrolledSelector.d.ts +0 -18
package/dist/_virtual/index2.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
|
|
4
|
+
a as t
|
|
7
5
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
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
|
|
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
|
|
10
|
+
import T from "../TextButton/TextButton.js";
|
|
11
11
|
import "fuse.js";
|
|
12
|
-
import
|
|
12
|
+
import I from "../LoadingProgress/LoadingProgress.js";
|
|
13
13
|
import "../../molecules/InformationContainer/InformationContainer.js";
|
|
14
|
-
const
|
|
15
|
-
title:
|
|
14
|
+
const V = ({
|
|
15
|
+
title: N = "drag_and_drop_your_files_here",
|
|
16
16
|
subtitle: p = null,
|
|
17
|
-
buttonTitle:
|
|
18
|
-
onUpload:
|
|
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:
|
|
34
|
-
loadingDuration: k = 1e4
|
|
33
|
+
loading: $ = !1,
|
|
34
|
+
loadingDuration: k = 1e4,
|
|
35
|
+
className: u = ""
|
|
35
36
|
}) => {
|
|
36
|
-
const { t: a } =
|
|
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
|
|
39
|
+
let c = !1;
|
|
39
40
|
Array.from(e).forEach((s) => {
|
|
40
|
-
var
|
|
41
|
-
const B = ((
|
|
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
|
-
),
|
|
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
|
-
),
|
|
52
|
+
), c = !0;
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
55
|
r.push(s);
|
|
55
|
-
}), !
|
|
56
|
-
},
|
|
57
|
-
|
|
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 &&
|
|
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(!
|
|
63
|
+
e.preventDefault(), e.stopPropagation(), o(!0);
|
|
65
64
|
}, v = (e) => {
|
|
66
|
-
e.preventDefault(), e.stopPropagation(),
|
|
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 &&
|
|
71
|
+
r.length > 0 && x(r);
|
|
71
72
|
};
|
|
72
|
-
return
|
|
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:
|
|
77
|
-
onDragLeave:
|
|
78
|
-
onDragOver:
|
|
79
|
-
onDrop:
|
|
80
|
-
onClick:
|
|
77
|
+
onDragEnter: h,
|
|
78
|
+
onDragLeave: v,
|
|
79
|
+
onDragOver: j,
|
|
80
|
+
onDrop: b,
|
|
81
|
+
onClick: g,
|
|
81
82
|
children: [
|
|
82
83
|
/* @__PURE__ */ t.jsx(
|
|
83
|
-
|
|
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:
|
|
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:
|
|
103
|
-
onDragLeave:
|
|
104
|
-
onDragOver:
|
|
105
|
-
onDrop:
|
|
106
|
-
onClick:
|
|
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(
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
146
|
+
V as default
|
|
146
147
|
};
|