lawgic-dev-kit 0.23.8 → 0.25.0
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/components/atoms/TextArea/TextArea.d.ts +5 -0
- package/dist/components/atoms/TextArea/TextArea.js +92 -0
- package/dist/components/atoms/TextArea/TextArea.types.d.ts +12 -0
- package/dist/components/atoms/TextArea/index.d.ts +1 -0
- package/dist/components/atoms/TextInput/TextInput.d.ts +1 -1
- package/dist/components/atoms/TextInput/TextInput.js +26 -21
- package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -0
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +43 -38
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -0
- package/dist/components/atoms/UploadContainer/UploadContainer.js +104 -92
- package/dist/components/atoms/UploadContainer/UploadContainer.types.d.ts +5 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/molecules/DateInput/DateInput.d.ts +2 -1
- package/dist/components/molecules/DateInput/DateInput.js +32 -30
- package/dist/index.js +109 -107
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +61 -47
- package/dist/src/components/atoms/TextArea/TextArea.d.ts +5 -0
- package/dist/src/components/atoms/TextArea/TextArea.types.d.ts +12 -0
- package/dist/src/components/atoms/TextArea/index.d.ts +1 -0
- package/dist/src/components/atoms/TextInput/TextInput.d.ts +1 -1
- package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +1 -0
- package/dist/src/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -0
- package/dist/src/components/atoms/UploadContainer/UploadContainer.types.d.ts +5 -0
- package/dist/src/components/atoms/index.d.ts +1 -0
- package/dist/src/components/molecules/DateInput/DateInput.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { translateBytes as
|
|
2
|
+
import { useState as F, useRef as R } from "react";
|
|
3
|
+
import { translateBytes as T } from "../../../utils/files.js";
|
|
4
4
|
import "../../../_virtual/lodash.js";
|
|
5
|
-
import { FontAwesomeIcon as
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import { faCloudUpload as
|
|
8
|
-
import
|
|
5
|
+
import { FontAwesomeIcon as U } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
6
|
+
import { useTheme as A } from "../../../hooks/useTheme.js";
|
|
7
|
+
import { faCloudUpload as M } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
|
|
8
|
+
import W from "../Button/Button.js";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "../../../constants/countries.js";
|
|
11
11
|
import "../ImageProfileInput/ImageProfileInput.validators.js";
|
|
12
|
-
import
|
|
12
|
+
import K from "../TextButton/TextButton.js";
|
|
13
13
|
import "fuse.js";
|
|
14
|
-
import
|
|
14
|
+
import L from "../LoadingProgress/LoadingProgress.js";
|
|
15
15
|
import "../../molecules/InformationContainer/InformationContainer.js";
|
|
16
16
|
import "react-dom";
|
|
17
|
-
const
|
|
18
|
-
title:
|
|
19
|
-
subtitle:
|
|
20
|
-
buttonTitle:
|
|
21
|
-
onUpload:
|
|
17
|
+
const ne = ({
|
|
18
|
+
title: h = "drag_and_drop_your_files_here",
|
|
19
|
+
subtitle: o = null,
|
|
20
|
+
buttonTitle: g = "choose_files",
|
|
21
|
+
onUpload: I = () => {
|
|
22
22
|
},
|
|
23
|
-
acceptedExtensions:
|
|
23
|
+
acceptedExtensions: x = [
|
|
24
24
|
"pdf",
|
|
25
25
|
"png",
|
|
26
26
|
"jpg",
|
|
@@ -31,136 +31,148 @@ const le = ({
|
|
|
31
31
|
"xls",
|
|
32
32
|
"xlsx"
|
|
33
33
|
],
|
|
34
|
-
maxSize:
|
|
34
|
+
maxSize: f = 1024,
|
|
35
35
|
// en KB
|
|
36
|
-
loading:
|
|
37
|
-
loadingDuration:
|
|
38
|
-
className:
|
|
39
|
-
disabled:
|
|
40
|
-
direction:
|
|
36
|
+
loading: j = !1,
|
|
37
|
+
loadingDuration: v = 1e4,
|
|
38
|
+
className: a = "",
|
|
39
|
+
disabled: b = !1,
|
|
40
|
+
direction: y = "column",
|
|
41
|
+
size: S
|
|
41
42
|
}) => {
|
|
42
|
-
const { t:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
const { t: r } = A(), N = {
|
|
44
|
+
sm: "text-base",
|
|
45
|
+
md: "text-lg",
|
|
46
|
+
lg: "text-xl"
|
|
47
|
+
}, w = {
|
|
48
|
+
sm: "text-sm",
|
|
49
|
+
md: "text-base",
|
|
50
|
+
lg: "text-lg"
|
|
51
|
+
}, n = S ?? (y === "row" ? "md" : "lg"), [u, i] = F(!1), [c, m] = F(""), d = R(null), D = x.map((t) => `.${t}`).join(","), $ = (t) => {
|
|
52
|
+
const l = [];
|
|
53
|
+
let p = !1;
|
|
54
|
+
Array.from(t).forEach((s) => {
|
|
55
|
+
var z;
|
|
56
|
+
const O = ((z = s.name.split(".").pop()) == null ? void 0 : z.toLowerCase()) || "";
|
|
57
|
+
if (!x.includes(O)) {
|
|
58
|
+
m(
|
|
50
59
|
`El archivo ${s.name} tiene una extensión no permitida.`
|
|
51
|
-
),
|
|
60
|
+
), p = !0;
|
|
52
61
|
return;
|
|
53
62
|
}
|
|
54
|
-
if (s.size >
|
|
55
|
-
|
|
56
|
-
`El archivo ${s.name} excede el tamaño máximo de ${
|
|
57
|
-
),
|
|
63
|
+
if (s.size > f * 1024) {
|
|
64
|
+
m(
|
|
65
|
+
`El archivo ${s.name} excede el tamaño máximo de ${f}KB.`
|
|
66
|
+
), p = !0;
|
|
58
67
|
return;
|
|
59
68
|
}
|
|
60
|
-
|
|
61
|
-
}), !
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
69
|
+
l.push(s);
|
|
70
|
+
}), !p && l.length > 0 && (m(""), I(l));
|
|
71
|
+
}, k = () => {
|
|
72
|
+
d.current && d.current.click();
|
|
73
|
+
}, C = (t) => {
|
|
74
|
+
const l = t.target.files;
|
|
75
|
+
l && l.length > 0 && $(l), t.target.value = "";
|
|
76
|
+
}, E = (t) => {
|
|
77
|
+
t.preventDefault(), t.stopPropagation(), i(!0);
|
|
78
|
+
}, B = (t) => {
|
|
79
|
+
t.preventDefault(), t.stopPropagation(), i(!1);
|
|
80
|
+
}, _ = (t) => {
|
|
81
|
+
t.preventDefault(), t.stopPropagation(), u || i(!0);
|
|
82
|
+
}, P = (t) => {
|
|
83
|
+
t.preventDefault(), t.stopPropagation(), i(!1);
|
|
84
|
+
const l = t.dataTransfer.files;
|
|
85
|
+
l.length > 0 && $(l);
|
|
77
86
|
};
|
|
78
|
-
return
|
|
87
|
+
return y === "row" ? j ? /* @__PURE__ */ e.jsx("div", { className: `w-full mx-auto h-fit ${a} flex flex-col`, children: /* @__PURE__ */ e.jsx("div", { className: "bg-blue-50 p-8 rounded-2xl h-full flex flex-col", children: /* @__PURE__ */ e.jsxs(
|
|
79
88
|
"div",
|
|
80
89
|
{
|
|
81
90
|
className: "h-full flex items-center justify-center gap-8 border-[1.4px] border-dashed rounded-2xl px-12 py-10 text-center transition-all duration-300 border-blue-200 select-none",
|
|
82
91
|
children: [
|
|
83
92
|
/* @__PURE__ */ e.jsx(
|
|
84
|
-
|
|
93
|
+
L,
|
|
85
94
|
{
|
|
86
95
|
size: 28,
|
|
87
96
|
showProgress: !1,
|
|
88
|
-
duration:
|
|
97
|
+
duration: v,
|
|
89
98
|
strokeWidth: 3,
|
|
90
99
|
color: "#4570EB"
|
|
91
100
|
}
|
|
92
101
|
),
|
|
93
102
|
/* @__PURE__ */ e.jsxs("h4", { className: "text-body-s text-gray-400", children: [
|
|
94
|
-
|
|
103
|
+
r("loading"),
|
|
95
104
|
"..."
|
|
96
105
|
] })
|
|
97
106
|
]
|
|
98
107
|
}
|
|
99
|
-
) }) }) : /* @__PURE__ */ e.jsxs("div", { className: `w-full h-fit flex flex-col ${
|
|
108
|
+
) }) }) : /* @__PURE__ */ e.jsxs("div", { className: `w-full h-fit flex flex-col ${a}`, children: [
|
|
100
109
|
/* @__PURE__ */ e.jsx("div", { className: "bg-blue-50 p-8 rounded-2xl h-full", children: /* @__PURE__ */ e.jsxs(
|
|
101
110
|
"div",
|
|
102
111
|
{
|
|
103
|
-
className: `${
|
|
104
|
-
onDragEnter:
|
|
105
|
-
onDragLeave:
|
|
106
|
-
onDragOver:
|
|
107
|
-
onDrop:
|
|
108
|
-
onClick:
|
|
112
|
+
className: `${b && "hover:cursor-not-allowed! pointer-events-none! opacity-50!"} flex flex-row border-[1.4px] h-full border-dashed items-center justify-between rounded-2xl px-12 py-10 cursor-pointer transition-all duration-300 gap-8 ${u ? "border-blue-400 bg-blue-100/50" : "border-blue-200 hover:border-blue-400"}`,
|
|
113
|
+
onDragEnter: E,
|
|
114
|
+
onDragLeave: B,
|
|
115
|
+
onDragOver: _,
|
|
116
|
+
onDrop: P,
|
|
117
|
+
onClick: k,
|
|
109
118
|
children: [
|
|
110
119
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-center shrink-0", children: /* @__PURE__ */ e.jsx(
|
|
111
|
-
|
|
120
|
+
U,
|
|
112
121
|
{
|
|
113
|
-
icon:
|
|
122
|
+
icon: M,
|
|
114
123
|
className: "text-blue-500 text-2xl"
|
|
115
124
|
}
|
|
116
125
|
) }),
|
|
117
|
-
/* @__PURE__ */ e.
|
|
118
|
-
|
|
126
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-start text-left grow", children: [
|
|
127
|
+
/* @__PURE__ */ e.jsx("h3", { className: `font-600 text-dark ${N[n]}`, children: r(h) }),
|
|
128
|
+
o && /* @__PURE__ */ e.jsx("p", { className: `font-400 text-gray-500 ${w[n]}`, children: r(o) })
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(W, { color: "blue", variant: "transparent", children: r(g) }) }),
|
|
119
131
|
/* @__PURE__ */ e.jsx(
|
|
120
132
|
"input",
|
|
121
133
|
{
|
|
122
134
|
type: "file",
|
|
123
|
-
ref:
|
|
135
|
+
ref: d,
|
|
124
136
|
className: "hidden",
|
|
125
137
|
multiple: !0,
|
|
126
|
-
accept:
|
|
127
|
-
onChange:
|
|
138
|
+
accept: D,
|
|
139
|
+
onChange: C
|
|
128
140
|
}
|
|
129
141
|
)
|
|
130
142
|
]
|
|
131
143
|
}
|
|
132
144
|
) }),
|
|
133
|
-
|
|
134
|
-
] }) :
|
|
145
|
+
c && /* @__PURE__ */ e.jsx("div", { className: "mt-3 text-sm text-red-500", children: c })
|
|
146
|
+
] }) : j ? /* @__PURE__ */ e.jsx("div", { className: `w-full mx-auto h-full ${a} flex flex-col grow`, children: /* @__PURE__ */ e.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl h-full flex flex-col grow", children: /* @__PURE__ */ e.jsxs(
|
|
135
147
|
"div",
|
|
136
148
|
{
|
|
137
149
|
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-200 select-none",
|
|
138
150
|
children: [
|
|
139
151
|
/* @__PURE__ */ e.jsx(
|
|
140
|
-
|
|
152
|
+
L,
|
|
141
153
|
{
|
|
142
154
|
size: 75,
|
|
143
|
-
duration:
|
|
155
|
+
duration: v,
|
|
144
156
|
strokeWidth: 6,
|
|
145
157
|
color: "#4570EB"
|
|
146
158
|
}
|
|
147
159
|
),
|
|
148
160
|
/* @__PURE__ */ e.jsxs("h4", { className: "text-body-s text-gray-400", children: [
|
|
149
|
-
|
|
161
|
+
r("loading"),
|
|
150
162
|
"..."
|
|
151
163
|
] })
|
|
152
164
|
]
|
|
153
165
|
}
|
|
154
|
-
) }) }) : /* @__PURE__ */ e.jsxs("div", { className: `w-full mx-auto h-full flex flex-col ${
|
|
166
|
+
) }) }) : /* @__PURE__ */ e.jsxs("div", { className: `w-full mx-auto h-full flex flex-col ${a}`, children: [
|
|
155
167
|
/* @__PURE__ */ e.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl h-full grow", children: /* @__PURE__ */ e.jsxs(
|
|
156
168
|
"div",
|
|
157
169
|
{
|
|
158
|
-
className: `${
|
|
159
|
-
onDragEnter:
|
|
160
|
-
onDragLeave:
|
|
161
|
-
onDragOver:
|
|
162
|
-
onDrop:
|
|
163
|
-
onClick:
|
|
170
|
+
className: `${b && "hover:cursor-not-allowed! pointer-events-none! opacity-50!"} flex flex-col border-[1.4px] h-full grow border-dashed items-center justify-center rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${u ? "border-blue-400 bg-blue-100/50" : "border-blue-200 hover:border-blue-400"}`,
|
|
171
|
+
onDragEnter: E,
|
|
172
|
+
onDragLeave: B,
|
|
173
|
+
onDragOver: _,
|
|
174
|
+
onDrop: P,
|
|
175
|
+
onClick: k,
|
|
164
176
|
children: [
|
|
165
177
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-center translate-y-4", children: /* @__PURE__ */ e.jsx(
|
|
166
178
|
"img",
|
|
@@ -171,37 +183,37 @@ const le = ({
|
|
|
171
183
|
}
|
|
172
184
|
) }),
|
|
173
185
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
174
|
-
/* @__PURE__ */ e.jsx("h3", { className:
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */ e.jsx(
|
|
186
|
+
/* @__PURE__ */ e.jsx("h3", { className: `font-600 text-dark ${N[n]}`, children: r(h) }),
|
|
187
|
+
o && /* @__PURE__ */ e.jsx("p", { className: `font-400 text-gray-500 ${w[n]}`, children: r(o) }),
|
|
188
|
+
/* @__PURE__ */ e.jsx(K, { color: "blue", children: r(g) }),
|
|
177
189
|
/* @__PURE__ */ e.jsx(
|
|
178
190
|
"input",
|
|
179
191
|
{
|
|
180
192
|
type: "file",
|
|
181
|
-
ref:
|
|
193
|
+
ref: d,
|
|
182
194
|
className: "hidden",
|
|
183
195
|
multiple: !0,
|
|
184
|
-
accept:
|
|
185
|
-
onChange:
|
|
196
|
+
accept: D,
|
|
197
|
+
onChange: C
|
|
186
198
|
}
|
|
187
199
|
)
|
|
188
200
|
] })
|
|
189
201
|
]
|
|
190
202
|
}
|
|
191
203
|
) }),
|
|
192
|
-
|
|
204
|
+
c && /* @__PURE__ */ e.jsx("div", { className: "mt-3 text-sm text-red-500 shrink-0", children: c }),
|
|
193
205
|
/* @__PURE__ */ e.jsx("div", { className: "mt-10 w-full flex justify-center shrink-0", children: /* @__PURE__ */ e.jsxs("span", { className: "text-gray-500 font-400 text-base", children: [
|
|
194
|
-
|
|
206
|
+
x.join(", ").toUpperCase(),
|
|
195
207
|
" ",
|
|
196
|
-
|
|
208
|
+
r("formats"),
|
|
197
209
|
". ",
|
|
198
|
-
|
|
210
|
+
r("maximum_size"),
|
|
199
211
|
":",
|
|
200
212
|
" ",
|
|
201
|
-
|
|
213
|
+
T(f, "mb")
|
|
202
214
|
] }) })
|
|
203
215
|
] });
|
|
204
216
|
};
|
|
205
217
|
export {
|
|
206
|
-
|
|
218
|
+
ne as default
|
|
207
219
|
};
|
|
@@ -30,6 +30,11 @@ export interface UploadContainerProps {
|
|
|
30
30
|
*/
|
|
31
31
|
maxSize?: number;
|
|
32
32
|
direction?: 'row' | 'column';
|
|
33
|
+
/**
|
|
34
|
+
* Tamaño del título y la descripción
|
|
35
|
+
* @default 'md' en direction='row', 'lg' en direction='column'
|
|
36
|
+
*/
|
|
37
|
+
size?: 'sm' | 'md' | 'lg';
|
|
33
38
|
disabled?: boolean;
|
|
34
39
|
loading?: boolean;
|
|
35
40
|
loadingDuration?: number;
|
|
@@ -26,6 +26,7 @@ export * from './SelectInput/index';
|
|
|
26
26
|
export * from './SidebarButton/index';
|
|
27
27
|
export * from './Tab/index';
|
|
28
28
|
export * from './TextButton/index';
|
|
29
|
+
export * from './TextArea/index';
|
|
29
30
|
export * from './TextInput/index';
|
|
30
31
|
export * from './TextStaticInput/index';
|
|
31
32
|
export * from './Toast/index';
|
|
@@ -9,6 +9,7 @@ export type DateInputProps<T extends FieldValues = FieldValues> = {
|
|
|
9
9
|
futureDates?: boolean;
|
|
10
10
|
pastDates?: boolean;
|
|
11
11
|
size?: "sm" | "md";
|
|
12
|
+
required?: boolean;
|
|
12
13
|
};
|
|
13
|
-
declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates, size, }: DateInputProps<T>) => React.ReactElement;
|
|
14
|
+
declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates, size, required, }: DateInputProps<T>) => React.ReactElement;
|
|
14
15
|
export default DateInput;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as c } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as x, useEffect as
|
|
3
|
-
import { useController as
|
|
4
|
-
import { faX as
|
|
5
|
-
import { FontAwesomeIcon as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useTheme as
|
|
10
|
-
import { formatDate as
|
|
11
|
-
const N = (a) =>
|
|
2
|
+
import { useState as x, useEffect as k } from "react";
|
|
3
|
+
import { useController as A } from "react-hook-form";
|
|
4
|
+
import { faX as B } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
5
|
+
import { FontAwesomeIcon as K } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
6
|
+
import O from "../FloatingMenu/FloatingMenu.js";
|
|
7
|
+
import R from "../CalendarSelector/CalendarSelector.js";
|
|
8
|
+
import U from "../../atoms/UncontrolledTextInput/UncontrolledTextInput.js";
|
|
9
|
+
import { useTheme as X } from "../../../hooks/useTheme.js";
|
|
10
|
+
import { formatDate as q } from "../../../node_modules/date-fns/format.js";
|
|
11
|
+
const N = (a) => q(a, "dd/MM/yyyy"), D = (a) => {
|
|
12
12
|
const [t, n, o] = a.split("/");
|
|
13
13
|
if ((t == null ? void 0 : t.length) === 2 && (n == null ? void 0 : n.length) === 2 && (o == null ? void 0 : o.length) === 4) {
|
|
14
14
|
const l = new Date(Number(o), Number(n) - 1, Number(t));
|
|
15
15
|
return isNaN(l.getTime()) ? null : l;
|
|
16
16
|
}
|
|
17
17
|
return null;
|
|
18
|
-
},
|
|
18
|
+
}, _ = ({
|
|
19
19
|
control: a,
|
|
20
20
|
name: t,
|
|
21
21
|
showTimeSelector: n = !1,
|
|
@@ -24,37 +24,38 @@ const N = (a) => X(a, "dd/MM/yyyy"), D = (a) => {
|
|
|
24
24
|
placeholder: j,
|
|
25
25
|
futureDates: I = !1,
|
|
26
26
|
pastDates: b = !0,
|
|
27
|
-
size: S
|
|
27
|
+
size: S,
|
|
28
|
+
required: T = !1
|
|
28
29
|
}) => {
|
|
29
30
|
const {
|
|
30
|
-
field: { value: i, onChange: p, onBlur:
|
|
31
|
+
field: { value: i, onChange: p, onBlur: v },
|
|
31
32
|
fieldState: { error: m }
|
|
32
|
-
} =
|
|
33
|
-
|
|
33
|
+
} = A({ name: t, control: a }), { t: g } = X(), y = g(t), F = g(l), [M, f] = x(!1), [h, r] = x("");
|
|
34
|
+
k(() => {
|
|
34
35
|
i instanceof Date && !isNaN(i.getTime()) ? r(N(i)) : r("");
|
|
35
36
|
}, [i]);
|
|
36
|
-
const C = D(h),
|
|
37
|
+
const C = D(h), w = (e) => {
|
|
37
38
|
const s = e.replace(/\D/g, "").slice(0, 8), u = [];
|
|
38
39
|
s.length > 0 && u.push(s.slice(0, 2)), s.length > 2 && u.push(s.slice(2, 4)), s.length > 4 && u.push(s.slice(4, 8));
|
|
39
40
|
const d = u.join("/");
|
|
40
41
|
if (r(d), f(!1), d.length === 10) {
|
|
41
|
-
const
|
|
42
|
-
p(
|
|
42
|
+
const V = D(d);
|
|
43
|
+
p(V);
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, E = () => {
|
|
45
46
|
p(null), r("");
|
|
46
47
|
};
|
|
47
48
|
return /* @__PURE__ */ c.jsx(
|
|
48
|
-
|
|
49
|
+
O,
|
|
49
50
|
{
|
|
50
|
-
open:
|
|
51
|
+
open: M,
|
|
51
52
|
strategy: "fixed",
|
|
52
53
|
padding: 0,
|
|
53
54
|
offset: 0,
|
|
54
55
|
onClose: () => f(!1),
|
|
55
56
|
className: "p-0!",
|
|
56
57
|
component: /* @__PURE__ */ c.jsx(
|
|
57
|
-
|
|
58
|
+
R,
|
|
58
59
|
{
|
|
59
60
|
date: C || /* @__PURE__ */ new Date(),
|
|
60
61
|
onDateChange: (e) => {
|
|
@@ -66,26 +67,27 @@ const N = (a) => X(a, "dd/MM/yyyy"), D = (a) => {
|
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
children: /* @__PURE__ */ c.jsx(
|
|
69
|
-
|
|
70
|
+
U,
|
|
70
71
|
{
|
|
71
72
|
size: S,
|
|
72
|
-
onBlur:
|
|
73
|
-
name:
|
|
73
|
+
onBlur: v,
|
|
74
|
+
name: F || y,
|
|
74
75
|
label: o,
|
|
76
|
+
required: T,
|
|
75
77
|
value: h,
|
|
76
78
|
onFocus: (e) => {
|
|
77
79
|
e.preventDefault(), f(!0);
|
|
78
80
|
},
|
|
79
81
|
disabledInput: !0,
|
|
80
|
-
onChange: (e) =>
|
|
82
|
+
onChange: (e) => w(e),
|
|
81
83
|
placeholder: j,
|
|
82
84
|
error: m == null ? void 0 : m.message,
|
|
83
85
|
rightSide: !!C && /* @__PURE__ */ c.jsx(
|
|
84
|
-
|
|
86
|
+
K,
|
|
85
87
|
{
|
|
86
|
-
icon:
|
|
88
|
+
icon: B,
|
|
87
89
|
className: "text-gray-500 cursor-pointer",
|
|
88
|
-
onClick:
|
|
90
|
+
onClick: E
|
|
89
91
|
}
|
|
90
92
|
)
|
|
91
93
|
}
|
|
@@ -94,5 +96,5 @@ const N = (a) => X(a, "dd/MM/yyyy"), D = (a) => {
|
|
|
94
96
|
);
|
|
95
97
|
};
|
|
96
98
|
export {
|
|
97
|
-
|
|
99
|
+
_ as default
|
|
98
100
|
};
|