lawgic-dev-kit 0.8.2 → 0.8.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.
Files changed (39) hide show
  1. package/dist/_virtual/index2.js +3 -2
  2. package/dist/_virtual/index3.js +3 -2
  3. package/dist/_virtual/index4.js +5 -3
  4. package/dist/_virtual/index5.js +2 -3
  5. package/dist/_virtual/index6.js +2 -5
  6. package/dist/components/atoms/Avatar/Avatar.js +3 -2
  7. package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -2
  8. package/dist/components/atoms/CountryLabel/CountryLabel.js +32 -0
  9. package/dist/components/atoms/PhoneInput/PhoneInput.js +282 -0
  10. package/dist/components/atoms/TextInput/TextInput.js +38 -38
  11. package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -0
  12. package/dist/components/atoms/UploadContainer/UploadContainer.js +14 -13
  13. package/dist/components/atoms/index.d.ts +3 -0
  14. package/dist/components/molecules/AlertModal/AlertModal.js +7 -6
  15. package/dist/components/molecules/CalendarSelector/CalendarSelector.d.ts +1 -0
  16. package/dist/components/molecules/CalendarSelector/CalendarSelector.js +166 -106
  17. package/dist/components/molecules/DateInput/DateInput.js +8 -7
  18. package/dist/components/molecules/DialogModal/DialogModal.js +3 -2
  19. package/dist/components/molecules/Dropdown/Dropdown.js +22 -21
  20. package/dist/components/molecules/Dropdown/Dropdown.types.d.ts +2 -0
  21. package/dist/components/molecules/FloatingMenu/FloatingMenu.js +6 -5
  22. package/dist/components/molecules/Tabs/Tabs.d.ts +2 -1
  23. package/dist/components/molecules/Tabs/Tabs.js +19 -17
  24. package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +5 -7
  25. package/dist/constants/countries.js +1749 -0
  26. package/dist/index.js +61 -57
  27. package/dist/lawgic-dev-kit.css +1 -1
  28. package/dist/lawgic-dev-kit.umd.js +161 -162
  29. package/dist/node_modules/prop-types/index.js +1 -1
  30. package/dist/node_modules/scheduler/index.js +1 -1
  31. package/dist/node_modules/yup/index.esm.js +3 -3
  32. package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +12 -0
  33. package/dist/utils/modal.js +18 -17
  34. package/dist/utils/toast.js +3 -2
  35. package/package.json +1 -1
  36. package/dist/components/atoms/Logo/Logo.d.ts +0 -3
  37. package/dist/components/atoms/Logo/Slogan.d.ts +0 -3
  38. package/dist/src/components/atoms/Tab/Tab.d.ts +0 -3
  39. package/dist/src/components/molecules/Tabs/Tabs.d.ts +0 -19
@@ -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,4 +1,5 @@
1
- var e = { exports: {} };
1
+ import { __require as r } from "../node_modules/tiny-case/index.js";
2
+ var a = r();
2
3
  export {
3
- e as __module
4
+ a as t
4
5
  };
@@ -1,5 +1,7 @@
1
- import { __require as r } from "../node_modules/property-expr/index.js";
2
- var e = 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
- e as p
6
+ s as default
5
7
  };
@@ -1,5 +1,4 @@
1
- import { __require as r } from "../node_modules/tiny-case/index.js";
2
- var a = r();
1
+ var e = { exports: {} };
3
2
  export {
4
- a as t
3
+ e as __module
5
4
  };
@@ -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
  };
@@ -7,8 +7,9 @@ import { getImageUrl as E } from "../../../utils/images.js";
7
7
  import "../../../_virtual/lodash.js";
8
8
  import "../../../providers/ThemeProvider.js";
9
9
  import "../ImageProfileInput/ImageProfileInput.validators.js";
10
+ import "../../../constants/countries.js";
10
11
  import "react-dom";
11
- const T = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "", size: e = 30, user: t = null }) => {
12
+ const V = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "", size: e = 30, user: t = null }) => {
12
13
  const { className: p = " ", ...g } = x, { className: s = " ", ...v } = d, o = e + "px", n = e * 0.5 + "px", l = e * 0.4 + "px", [j, w] = W(!1), N = () => i ? h(i) : t ? h(t != null && t.first_name || t != null && t.last_name ? ((t == null ? void 0 : t.first_name) || "") + " " + ((t == null ? void 0 : t.last_name) || "") : t == null ? void 0 : t.email) : "#9CA1B6", c = (f) => {
13
14
  try {
14
15
  return f ? (new URL(f), !0) : !1;
@@ -95,5 +96,5 @@ const T = ({ containerProps: x = {}, imageProps: d = {}, src: m = "", alt: i = "
95
96
  );
96
97
  };
97
98
  export {
98
- T as default
99
+ V as default
99
100
  };
@@ -1,5 +1,10 @@
1
1
  import { default as React } from 'react';
2
- declare const Checkbox: React.FC<{
2
+ type ColorVariant = "blue" | "aqua" | "red" | "gray";
3
+ type Variant = "rounded" | "square";
4
+ interface CheckboxProps extends React.ComponentPropsWithoutRef<"div"> {
3
5
  active?: boolean | string | number;
4
- }>;
6
+ color?: ColorVariant;
7
+ variant?: Variant;
8
+ }
9
+ declare const Checkbox: React.FC<CheckboxProps>;
5
10
  export default Checkbox;
@@ -0,0 +1,32 @@
1
+ import { j as t } from "../../../_virtual/jsx-runtime.js";
2
+ const o = ({ country: s }) => {
3
+ const a = (e) => {
4
+ var r;
5
+ return e ? e.codeISO2 ? e.codeISO2.toLowerCase() : ((r = e.code) == null ? void 0 : r.toLowerCase()) || "" : "";
6
+ };
7
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-8", children: [
8
+ /* @__PURE__ */ t.jsx(
9
+ "img",
10
+ {
11
+ loading: "lazy",
12
+ width: "24",
13
+ height: "16",
14
+ className: "mr-2",
15
+ src: `https://flagcdn.com/w20/${a(
16
+ s
17
+ )}.png`,
18
+ srcSet: `https://flagcdn.com/w40/${a(
19
+ s
20
+ )}.png 2x`,
21
+ alt: s.label,
22
+ onError: (e) => {
23
+ e.currentTarget.style.display = "none";
24
+ }
25
+ }
26
+ ),
27
+ /* @__PURE__ */ t.jsx("p", { className: "text-body-s text-gray-600", children: s.label })
28
+ ] });
29
+ };
30
+ export {
31
+ o as default
32
+ };
@@ -0,0 +1,282 @@
1
+ import { j as t } from "../../../_virtual/jsx-runtime.js";
2
+ import { useState as f, useRef as h, useEffect as A } from "react";
3
+ import { useController as xe } from "../../../node_modules/react-hook-form/dist/index.esm.js";
4
+ import { useFloating as be, useClick as we, useDismiss as Ce, useInteractions as ve, useTransitionStyles as je } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
5
+ import { FontAwesomeIcon as Ne } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
+ import { faChevronDown as ye } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
7
+ import { useTheme as Se } from "../../../providers/ThemeProvider.js";
8
+ import Le from "../../../constants/countries.js";
9
+ import { autoUpdate as Te } from "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
10
+ import { offset as Ie, flip as $e, shift as Ee, size as Oe, arrow as Pe } from "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
11
+ const Ye = ({
12
+ name: v,
13
+ control: H,
14
+ label: Y = "phone_number",
15
+ placeholder: U = "enter_phone_number",
16
+ language: W = "en",
17
+ className: X = "",
18
+ translateKey: q,
19
+ countries: i = Le
20
+ }) => {
21
+ var z, F, D, V;
22
+ const { t: l } = Se(), { field: s, fieldState: j } = xe({
23
+ name: v,
24
+ control: H,
25
+ rules: { validate: {} }
26
+ }), N = ((z = s.value) == null ? void 0 : z.split(" ")) || [], G = N[0] || "", J = N[1] || "", K = i.find((e) => G === e.phone), [c, g] = f(!1), [d, y] = f(""), [r, S] = f(
27
+ K || null
28
+ ), [L, T] = f(J), [Q, I] = f(!1), x = h(null), $ = h(null), E = h(null), b = h(null), { x: Z, y: ee, strategy: te, refs: O, context: w, placement: oe, middlewareData: P } = be({
29
+ open: c,
30
+ onOpenChange: g,
31
+ middleware: [
32
+ Ie(8),
33
+ $e(),
34
+ Ee({ padding: 8 }),
35
+ Oe({
36
+ apply({ availableHeight: e, elements: o }) {
37
+ Object.assign(o.floating.style, {
38
+ maxHeight: `${Math.min(e - 10, 300)}px`
39
+ });
40
+ },
41
+ padding: 8
42
+ }),
43
+ Pe({ element: $ })
44
+ ],
45
+ placement: "bottom-start",
46
+ whileElementsMounted: Te
47
+ }), ne = we(w), re = Ce(w), { getReferenceProps: se, getFloatingProps: le } = ve([
48
+ ne,
49
+ re
50
+ ]), { isMounted: ae, styles: ie } = je(w, {
51
+ duration: {
52
+ open: 200,
53
+ close: 150
54
+ },
55
+ initial: {
56
+ opacity: 0,
57
+ transform: "translateY(-4px)"
58
+ }
59
+ }), R = (Array.isArray(i) ? i : []).filter((e) => {
60
+ if (!d.trim()) return !0;
61
+ const o = W === "es" && e.labelES ? e.labelES.toLowerCase() : e.label.toLowerCase(), n = e.code ? e.code.toLowerCase() : "", a = e.phone ? e.phone.toLowerCase() : "";
62
+ return o.includes(d.toLowerCase()) || n.includes(d.toLowerCase()) || a.includes(d.toLowerCase());
63
+ }), ce = (e) => {
64
+ S(e), g(!1), y("");
65
+ const o = `${e.phone} ${L}`;
66
+ s.onChange(o), setTimeout(() => {
67
+ var n;
68
+ (n = E.current) == null || n.focus();
69
+ }, 100);
70
+ }, de = (e) => {
71
+ const o = e.target.value;
72
+ if (T(o), r) {
73
+ const n = `${r.phone} ${o}`;
74
+ s.onChange(n);
75
+ }
76
+ }, ue = () => {
77
+ g(!c), !c && x.current && setTimeout(() => {
78
+ var e;
79
+ (e = x.current) == null || e.focus();
80
+ }, 100);
81
+ }, B = () => {
82
+ setTimeout(() => {
83
+ c || s.onBlur();
84
+ }, 200);
85
+ }, pe = () => {
86
+ I(!0);
87
+ }, me = () => {
88
+ I(!1);
89
+ };
90
+ A(() => {
91
+ if (s.value) {
92
+ const e = s.value.split(" "), o = e[0] || "", n = e[1] || "", a = i.find(
93
+ (m) => m.phone === o
94
+ );
95
+ a && S(a), T(n);
96
+ }
97
+ }, [s.value, i]), A(() => {
98
+ const e = (o) => {
99
+ b.current && !b.current.contains(o.target) && s.onBlur();
100
+ };
101
+ return document.addEventListener("mousedown", e), () => {
102
+ document.removeEventListener("mousedown", e);
103
+ };
104
+ }, [s]);
105
+ const C = (e) => {
106
+ var o;
107
+ return e ? e.codeISO2 ? e.codeISO2.toLowerCase() : ((o = e.code) == null ? void 0 : o.toLowerCase()) || "" : "";
108
+ }, M = (F = P.arrow) == null ? void 0 : F.x, k = (D = P.arrow) == null ? void 0 : D.y, u = {
109
+ top: "bottom",
110
+ right: "left",
111
+ bottom: "top",
112
+ left: "right"
113
+ }[oe.split("-")[0]], fe = se({
114
+ onClick: ue,
115
+ onBlur: B
116
+ }), _ = () => j.error ? "border-red-500" : Q || c ? "border-blue-400" : "border-blue-100", he = l(Y), ge = l(U), p = (V = j.error) == null ? void 0 : V.message;
117
+ return /* @__PURE__ */ t.jsxs("div", { className: `w-full relative flex flex-col gap-8 ${X}`, children: [
118
+ /* @__PURE__ */ t.jsx(
119
+ "label",
120
+ {
121
+ className: `text-gray-600 font-600 group ${p && "!text-red-500"} text-label`,
122
+ children: he
123
+ }
124
+ ),
125
+ /* @__PURE__ */ t.jsxs(
126
+ "div",
127
+ {
128
+ ref: b,
129
+ className: "flex items-center w-full",
130
+ onMouseEnter: pe,
131
+ onMouseLeave: me,
132
+ children: [
133
+ /* @__PURE__ */ t.jsxs(
134
+ "div",
135
+ {
136
+ ref: O.setReference,
137
+ className: `flex items-center justify-between text-lg max-w-120 font-600 bg-light rounded-l-full p-16 cursor-pointer border border-r-0 transition-all duration-200 ${p ? "border-red-500" : _()}`,
138
+ style: { minWidth: "140px" },
139
+ ...fe,
140
+ tabIndex: 0,
141
+ children: [
142
+ r != null && r.code ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center truncate", children: [
143
+ C(r) && /* @__PURE__ */ t.jsx(
144
+ "img",
145
+ {
146
+ loading: "lazy",
147
+ width: "24",
148
+ height: "16",
149
+ className: "mr-2",
150
+ src: `https://flagcdn.com/w20/${C(
151
+ r
152
+ )}.png`,
153
+ srcSet: `https://flagcdn.com/w40/${C(
154
+ r
155
+ )}.png 2x`,
156
+ alt: r.label,
157
+ onError: (e) => {
158
+ e.currentTarget.style.display = "none";
159
+ }
160
+ }
161
+ ),
162
+ /* @__PURE__ */ t.jsxs("span", { children: [
163
+ "+",
164
+ r.phone
165
+ ] })
166
+ ] }) : /* @__PURE__ */ t.jsx("span", { className: "text-gray-500 truncate", children: l("select_country") }),
167
+ /* @__PURE__ */ t.jsx(
168
+ Ne,
169
+ {
170
+ icon: ye,
171
+ className: "w-14 h-14 min-w-14 min-h-14"
172
+ }
173
+ )
174
+ ]
175
+ }
176
+ ),
177
+ /* @__PURE__ */ t.jsx(
178
+ "input",
179
+ {
180
+ ref: E,
181
+ type: "tel",
182
+ className: `flex-grow bg-light rounded-r-full font-600 text-lg p-16 border transition-all duration-200 ${p ? "border-red-500" : _()}`,
183
+ placeholder: ge,
184
+ value: L,
185
+ onChange: de,
186
+ onBlur: B
187
+ }
188
+ )
189
+ ]
190
+ }
191
+ ),
192
+ p && /* @__PURE__ */ t.jsx("p", { className: "mt-1 text-sm text-red-600", children: l(p, { x: l(q || "") || v }) }),
193
+ ae && /* @__PURE__ */ t.jsxs(
194
+ "div",
195
+ {
196
+ ref: O.setFloating,
197
+ style: {
198
+ position: te,
199
+ top: ee ?? 0,
200
+ left: Z ?? 0,
201
+ ...ie
202
+ },
203
+ className: "z-10 w-fit bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto max-w-120",
204
+ ...le(),
205
+ children: [
206
+ /* @__PURE__ */ t.jsx(
207
+ "div",
208
+ {
209
+ ref: $,
210
+ className: "absolute w-4 h-4 bg-white rotate-45 border-blue-400",
211
+ style: {
212
+ left: M != null ? `${M}px` : "",
213
+ top: k != null ? `${k}px` : "",
214
+ right: "",
215
+ bottom: "",
216
+ [u]: "-2px",
217
+ borderRight: u === "left" ? "1px solid" : "none",
218
+ borderBottom: u === "top" ? "1px solid" : "none",
219
+ borderLeft: u === "right" ? "1px solid" : "none",
220
+ borderTop: u === "bottom" ? "1px solid" : "none"
221
+ }
222
+ }
223
+ ),
224
+ /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 bg-white p-2 z-20 w-fit", children: /* @__PURE__ */ t.jsx(
225
+ "input",
226
+ {
227
+ ref: x,
228
+ type: "text",
229
+ className: "w-fit p-16",
230
+ placeholder: l("search") + "...",
231
+ value: d,
232
+ onChange: (e) => y(e.target.value),
233
+ onClick: (e) => e.stopPropagation(),
234
+ onBlur: (e) => {
235
+ e.stopPropagation();
236
+ },
237
+ autoFocus: !0
238
+ }
239
+ ) }),
240
+ /* @__PURE__ */ t.jsx("div", { children: R.length > 0 ? /* @__PURE__ */ t.jsx("ul", { className: "flex flex-col", children: R.map((e, o) => {
241
+ var a;
242
+ const n = e.codeISO2 ? e.codeISO2.toLowerCase() : ((a = e.code) == null ? void 0 : a.toLowerCase()) || "";
243
+ return /* @__PURE__ */ t.jsxs(
244
+ "li",
245
+ {
246
+ className: "flex items-center justify-between gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",
247
+ onClick: (m) => {
248
+ m.stopPropagation(), ce(e);
249
+ },
250
+ children: [
251
+ n && /* @__PURE__ */ t.jsx(
252
+ "img",
253
+ {
254
+ loading: "lazy",
255
+ width: "24",
256
+ height: "16",
257
+ className: "mr-2",
258
+ src: `https://flagcdn.com/w20/${n}.png`,
259
+ srcSet: `https://flagcdn.com/w40/${n}.png 2x`,
260
+ alt: e.label,
261
+ onError: (m) => {
262
+ m.currentTarget.style.display = "none";
263
+ }
264
+ }
265
+ ),
266
+ /* @__PURE__ */ t.jsxs("span", { className: "text-gray-500", children: [
267
+ "+",
268
+ e.phone
269
+ ] })
270
+ ]
271
+ },
272
+ `${e.code}-${o}`
273
+ );
274
+ }) }) : /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-gray-500", children: l("no_countries_found") }) })
275
+ ]
276
+ }
277
+ )
278
+ ] });
279
+ };
280
+ export {
281
+ Ye as default
282
+ };
@@ -1,81 +1,81 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
- import { useController as m } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
- import { useTheme as j } from "../../../providers/ThemeProvider.js";
4
- const v = ({
5
- label: u,
6
- control: d,
7
- name: e,
8
- placeholder: c,
9
- className: g = "",
10
- disabled: l = !1,
11
- leftSide: o,
12
- rightSide: a,
13
- ...x
2
+ import { useController as b } from "../../../node_modules/react-hook-form/dist/index.esm.js";
3
+ const j = ({
4
+ label: n,
5
+ control: s,
6
+ name: l,
7
+ placeholder: d,
8
+ className: x = "",
9
+ disabled: e = !1,
10
+ leftSide: t,
11
+ rightSide: o,
12
+ // translateKey = '',
13
+ ...c
14
14
  }) => {
15
15
  const {
16
- field: { value: s = "", onChange: f, ref: i, onBlur: p },
17
- fieldState: { error: t }
18
- } = m({ name: e, control: d }), { t: n } = j(), b = n(e);
16
+ field: { value: a = "", onChange: f, ref: g, onBlur: i },
17
+ fieldState: { error: u }
18
+ } = b({ name: l, control: s });
19
19
  return /* @__PURE__ */ r.jsxs(
20
20
  "label",
21
21
  {
22
- className: `flex flex-col group gap-8 select-none ${l && "cursor-not-allowed"} ${g}`,
23
- htmlFor: e,
22
+ className: `flex flex-col group gap-8 select-none ${e && "cursor-not-allowed"} ${x}`,
23
+ htmlFor: l,
24
24
  children: [
25
25
  /* @__PURE__ */ r.jsx(
26
26
  "h6",
27
27
  {
28
- className: `text-gray-600 font-600 group ${t && "!text-red-500"} text-label ${l && "text-gray-300"}`,
29
- children: u
28
+ className: `text-gray-600 font-600 group ${u && "text-red-500!"} text-label ${e && "text-gray-300"}`,
29
+ children: n
30
30
  }
31
31
  ),
32
32
  /* @__PURE__ */ r.jsxs(
33
33
  "label",
34
34
  {
35
- htmlFor: e,
35
+ htmlFor: l,
36
36
  className: `
37
37
  flex items-center justify-between gap-8 p-16
38
38
 
39
- ${t && "!border-red-500"}
39
+ ${u && "border-red-500!"}
40
40
 
41
41
  bg-light
42
42
 
43
43
  w-full h-full rounded-full border
44
44
 
45
- ${s && !l ? "border-blue-200" : "border-blue-100"}
46
- ${!l && "group-hover:border-blue-300"}
47
- ${l && "cursor-not-allowed"}
45
+ ${a && !e ? "border-blue-200" : "border-blue-100"}
46
+ ${!e && "group-hover:border-blue-300"}
47
+ ${e && "cursor-not-allowed"}
48
48
 
49
49
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
50
50
 
51
51
  group-disabled:bg-gray-500
52
52
  `,
53
53
  children: [
54
- o && o,
54
+ t && t,
55
55
  /* @__PURE__ */ r.jsx(
56
56
  "input",
57
57
  {
58
- id: e,
59
- name: e,
60
- disabled: l,
61
- placeholder: c,
62
- value: s,
63
- onChange: (h) => f(h.target.value),
64
- onBlur: p,
65
- ref: i,
66
- className: "group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none",
67
- ...x
58
+ id: l,
59
+ name: l,
60
+ disabled: e,
61
+ placeholder: d,
62
+ value: a,
63
+ onChange: (p) => f(p.target.value),
64
+ onBlur: i,
65
+ ref: g,
66
+ className: "group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden",
67
+ ...c
68
68
  }
69
69
  ),
70
- a && a
70
+ o && o
71
71
  ]
72
72
  }
73
73
  ),
74
- /* @__PURE__ */ r.jsx("h4", { className: "font-500 text-label text-red-500 leading-none", children: (t == null ? void 0 : t.message) && n(t.message, { x: b }) })
74
+ /* @__PURE__ */ r.jsx("h4", { className: "font-500 text-label text-red-500 leading-none" })
75
75
  ]
76
76
  }
77
77
  );
78
78
  };
79
79
  export {
80
- v as default
80
+ j as default
81
81
  };
@@ -4,6 +4,7 @@ export type TextInputProps<T extends FieldValues = FieldValues> = {
4
4
  placeholder?: string;
5
5
  className?: string;
6
6
  disabled?: boolean;
7
+ translateKey?: string;
7
8
  control: Control<T>;
8
9
  name: Path<T>;
9
10
  leftSide?: React.ReactNode;
@@ -6,14 +6,15 @@ import { translateBytes as F } from "../../../utils/files.js";
6
6
  import "../../../_virtual/lodash.js";
7
7
  import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
8
8
  import "../ImageProfileInput/ImageProfileInput.validators.js";
9
+ import "../../../constants/countries.js";
9
10
  import "react-dom";
10
- const K = ({
11
+ const q = ({
11
12
  title: h = "drag_and_drop_your_files_here",
12
13
  subtitle: d = null,
13
14
  buttonTitle: v = "choose_files",
14
15
  onUpload: j = () => {
15
16
  },
16
- acceptedExtensions: n = [
17
+ acceptedExtensions: o = [
17
18
  "pdf",
18
19
  "png",
19
20
  "jpg",
@@ -24,24 +25,24 @@ const K = ({
24
25
  "xls",
25
26
  "xlsx"
26
27
  ],
27
- maxSize: o = 1024
28
+ maxSize: n = 1024
28
29
  // en KB
29
30
  }) => {
30
- const { t: l } = B(), [f, a] = g(!1), [m, i] = g(""), c = $(null), y = n.map((e) => `.${e}`).join(","), u = (e) => {
31
+ const { t: l } = B(), [m, a] = g(!1), [f, i] = g(""), c = $(null), y = o.map((e) => `.${e}`).join(","), u = (e) => {
31
32
  const r = [];
32
33
  let p = !1;
33
34
  Array.from(e).forEach((s) => {
34
35
  var x;
35
36
  const _ = ((x = s.name.split(".").pop()) == null ? void 0 : x.toLowerCase()) || "";
36
- if (!n.includes(_)) {
37
+ if (!o.includes(_)) {
37
38
  i(
38
39
  `El archivo ${s.name} tiene una extensión no permitida.`
39
40
  ), p = !0;
40
41
  return;
41
42
  }
42
- if (s.size > o * 1024) {
43
+ if (s.size > n * 1024) {
43
44
  i(
44
- `El archivo ${s.name} excede el tamaño máximo de ${o}KB.`
45
+ `El archivo ${s.name} excede el tamaño máximo de ${n}KB.`
45
46
  ), p = !0;
46
47
  return;
47
48
  }
@@ -57,7 +58,7 @@ const K = ({
57
58
  }, C = (e) => {
58
59
  e.preventDefault(), e.stopPropagation(), a(!1);
59
60
  }, E = (e) => {
60
- e.preventDefault(), e.stopPropagation(), f || a(!0);
61
+ e.preventDefault(), e.stopPropagation(), m || a(!0);
61
62
  }, w = (e) => {
62
63
  e.preventDefault(), e.stopPropagation(), a(!1);
63
64
  const r = e.dataTransfer.files;
@@ -67,7 +68,7 @@ const K = ({
67
68
  /* @__PURE__ */ t.jsxs(
68
69
  "div",
69
70
  {
70
- className: `flex flex-col border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${f ? "border-blue-400 bg-blue-100/50" : "border-gray-200 bg-white hover:border-blue-400"}`,
71
+ 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-gray-200 bg-white hover:border-blue-400"}`,
71
72
  onDragEnter: N,
72
73
  onDragLeave: C,
73
74
  onDragOver: E,
@@ -101,15 +102,15 @@ const K = ({
101
102
  ]
102
103
  }
103
104
  ),
104
- m && /* @__PURE__ */ t.jsx("div", { className: "mt-3 text-sm text-red-500", children: m }),
105
+ f && /* @__PURE__ */ t.jsx("div", { className: "mt-3 text-sm text-red-500", children: f }),
105
106
  /* @__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: [
106
- n.join(", ").toUpperCase(),
107
+ o.join(", ").toUpperCase(),
107
108
  " formats. Maximus size:",
108
109
  " ",
109
- F(o, "mb")
110
+ F(n, "mb")
110
111
  ] }) })
111
112
  ] });
112
113
  };
113
114
  export {
114
- K as default
115
+ q as default
115
116
  };
@@ -25,3 +25,6 @@ export * from './UncontrolledSelector/index';
25
25
  export * from './UncontrolledTextInput/index';
26
26
  export * from './UploadContainer/index';
27
27
  export * from './InformationDisclaimer/index';
28
+ export * from './CountryLabel/index';
29
+ export * from './PhoneInput/index';
30
+ export * from './SidebarButton/index';
@@ -8,14 +8,15 @@ import g from "../../atoms/BoxContainer/BoxContainer.js";
8
8
  import "react-dom";
9
9
  import a from "../../atoms/Button/Button.js";
10
10
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
11
+ import "../../../constants/countries.js";
11
12
  import { AnimatePresence as u } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
12
13
  import { motion as n } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
13
- const E = ({
14
+ const I = ({
14
15
  title: s,
15
16
  description: r,
16
- open: l,
17
+ open: o,
17
18
  onClose: i,
18
- onConfirm: o,
19
+ onConfirm: l,
19
20
  onCancel: c
20
21
  }) => {
21
22
  const { t: e } = j(), m = {
@@ -46,11 +47,11 @@ const E = ({
46
47
  }
47
48
  }
48
49
  }, p = () => {
49
- o(), i();
50
+ l(), i();
50
51
  }, d = () => {
51
52
  c(), i();
52
53
  };
53
- return /* @__PURE__ */ t.jsx(u, { children: l && /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
54
+ return /* @__PURE__ */ t.jsx(u, { children: o && /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
54
55
  n.div,
55
56
  {
56
57
  className: "fixed inset-0 bg-black bg-opacity-50 z-9999 flex items-center justify-center",
@@ -107,5 +108,5 @@ const E = ({
107
108
  ) }) });
108
109
  };
109
110
  export {
110
- E as default
111
+ I as default
111
112
  };
@@ -3,6 +3,7 @@ export type CalendarSelectorProps = {
3
3
  date: Date;
4
4
  onDateChange: (date: Date) => void;
5
5
  showTimeSelector?: boolean;
6
+ maxDate?: Date;
6
7
  };
7
8
  declare const CalendarSelector: React.FC<CalendarSelectorProps>;
8
9
  export default CalendarSelector;