lawgic-dev-kit 0.16.4 → 0.16.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.
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/atoms/CenterModal/CenterModal.js +38 -31
- package/dist/components/atoms/FloatingCard/FloatingCard.d.ts +4 -0
- package/dist/components/atoms/FloatingCard/FloatingCard.types.d.ts +9 -0
- package/dist/components/atoms/FloatingCard/index.d.ts +1 -0
- package/dist/components/atoms/ThresholdCircleProgress/ThresholdCircleProgress.d.ts +4 -0
- package/dist/components/atoms/ThresholdCircleProgress/ThresholdCircleProgress.js +115 -0
- package/dist/components/atoms/ThresholdCircleProgress/ThresholdCircleProgress.types.d.ts +26 -0
- package/dist/components/atoms/ThresholdCircleProgress/index.d.ts +1 -0
- package/dist/components/atoms/TresholdProgressBar/TresholdProgressBar.d.ts +4 -0
- package/dist/components/atoms/TresholdProgressBar/TresholdProgressBar.js +72 -0
- package/dist/components/atoms/TresholdProgressBar/TresholdProgressBar.types.d.ts +22 -0
- package/dist/components/atoms/TresholdProgressBar/index.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/molecules/AlertModal/AlertModal.d.ts +1 -1
- package/dist/components/molecules/AlertModal/AlertModal.js +21 -20
- package/dist/components/molecules/AlertModal/AlertModal.types.d.ts +1 -0
- package/dist/components/molecules/DialogModal/DialogModal.d.ts +1 -1
- package/dist/components/molecules/DialogModal/DialogModal.js +23 -29
- package/dist/components/molecules/DialogModal/DialogModal.types.d.ts +1 -0
- package/dist/index.js +81 -77
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +50 -50
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/src/components/atoms/index.d.ts +37 -0
- package/dist/types/modal.d.ts +4 -3
- package/package.json +1 -1
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { AnimatePresence as
|
|
2
|
+
import { faX as x } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
3
|
+
import { FontAwesomeIcon as d } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
|
+
import p from "../BoxContainer/BoxContainer.js";
|
|
5
|
+
import f from "../Divider/Divider.js";
|
|
6
|
+
import { AnimatePresence as j } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
7
7
|
import { motion as s } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
8
|
-
const
|
|
8
|
+
const k = ({
|
|
9
9
|
open: n,
|
|
10
10
|
onClose: a,
|
|
11
11
|
title: e,
|
|
12
12
|
children: t,
|
|
13
|
-
className: o = ""
|
|
13
|
+
className: o = "",
|
|
14
|
+
showCloseButton: r = !0
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
+
const l = {
|
|
16
17
|
hidden: { opacity: 0 },
|
|
17
18
|
visible: { opacity: 1 }
|
|
18
|
-
},
|
|
19
|
+
}, m = {
|
|
19
20
|
hidden: {
|
|
20
21
|
opacity: 0,
|
|
21
22
|
scale: 0.9
|
|
@@ -35,46 +36,52 @@ const N = ({
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
|
-
return /* @__PURE__ */ i.jsx(
|
|
39
|
+
return /* @__PURE__ */ i.jsx(j, { children: n && /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(
|
|
39
40
|
s.div,
|
|
40
41
|
{
|
|
41
42
|
className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
|
|
42
43
|
initial: "hidden",
|
|
43
44
|
animate: "visible",
|
|
44
45
|
exit: "hidden",
|
|
45
|
-
variants:
|
|
46
|
+
variants: l,
|
|
46
47
|
onClick: a,
|
|
47
48
|
children: /* @__PURE__ */ i.jsx(
|
|
48
49
|
s.div,
|
|
49
50
|
{
|
|
50
51
|
className: `w-full max-w-lg mx-16 z-50 ${o}`,
|
|
51
|
-
variants:
|
|
52
|
+
variants: m,
|
|
52
53
|
initial: "hidden",
|
|
53
54
|
animate: "visible",
|
|
54
55
|
exit: "exit",
|
|
55
|
-
onClick: (
|
|
56
|
-
children: /* @__PURE__ */ i.jsxs(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
onClick: (c) => c.stopPropagation(),
|
|
57
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
58
|
+
p,
|
|
59
|
+
{
|
|
60
|
+
className: `flex flex-col ${e && "gap-16 md:gap-24"} p-0!`,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ i.jsxs("div", { className: "flex flex-col gap-16 md:gap-24 md:p-32 pb-0!", children: [
|
|
63
|
+
/* @__PURE__ */ i.jsxs("div", { className: "flex justify-between items-center px-16 pt-16 md:px-0 md:pt-0", children: [
|
|
64
|
+
e && /* @__PURE__ */ i.jsx("h2", { className: "text-black font-700 text-2xl", children: e }),
|
|
65
|
+
r && /* @__PURE__ */ i.jsx(
|
|
66
|
+
d,
|
|
67
|
+
{
|
|
68
|
+
icon: x,
|
|
69
|
+
className: "cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700 ml-auto",
|
|
70
|
+
onClick: a
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
e && /* @__PURE__ */ i.jsx(f, { className: "bg-gray-100!" })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex flex-col gap-16 md:gap-24 p-16 pt-0 md:p-32 md:pt-4", children: typeof t == "function" ? t(a) : t })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
73
80
|
}
|
|
74
81
|
)
|
|
75
82
|
}
|
|
76
83
|
) }) });
|
|
77
84
|
};
|
|
78
85
|
export {
|
|
79
|
-
|
|
86
|
+
k as default
|
|
80
87
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FloatingCard } from './FloatingCard';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
const F = ({
|
|
3
|
+
progress: p,
|
|
4
|
+
showPercentage: f = !0,
|
|
5
|
+
showLabel: m = !1,
|
|
6
|
+
percentageLabel: u = "progreso",
|
|
7
|
+
className: y = "",
|
|
8
|
+
size: s = 120,
|
|
9
|
+
strokeWidth: l = 8,
|
|
10
|
+
backgroundColor: N = "#e5e7eb",
|
|
11
|
+
animated: g = !0,
|
|
12
|
+
animationDuration: v = "1.5s",
|
|
13
|
+
colorThresholds: n,
|
|
14
|
+
lowThreshold: b = 30,
|
|
15
|
+
mediumThreshold: $ = 70,
|
|
16
|
+
lowColor: k = "#ef4444",
|
|
17
|
+
mediumColor: D = "#eab308",
|
|
18
|
+
highColor: M = "#22c55e",
|
|
19
|
+
singleColor: j,
|
|
20
|
+
clockwise: P = !0,
|
|
21
|
+
startAngle: C = -90
|
|
22
|
+
}) => {
|
|
23
|
+
const w = (c) => {
|
|
24
|
+
if (j)
|
|
25
|
+
return j;
|
|
26
|
+
if (n && n.length > 0) {
|
|
27
|
+
const r = [...n].sort(
|
|
28
|
+
(t, h) => t.threshold - h.threshold
|
|
29
|
+
);
|
|
30
|
+
for (let t = r.length - 1; t >= 0; t--)
|
|
31
|
+
if (c >= r[t].threshold)
|
|
32
|
+
return r[t].color;
|
|
33
|
+
return r[0].color;
|
|
34
|
+
}
|
|
35
|
+
return c < b ? k : c < $ ? D : M;
|
|
36
|
+
}, B = (c) => {
|
|
37
|
+
if (!n || n.length === 0) return;
|
|
38
|
+
const r = [...n].sort(
|
|
39
|
+
(t, h) => t.threshold - h.threshold
|
|
40
|
+
);
|
|
41
|
+
for (let t = r.length - 1; t >= 0; t--)
|
|
42
|
+
if (c >= r[t].threshold)
|
|
43
|
+
return r[t].label;
|
|
44
|
+
return r[0].label;
|
|
45
|
+
}, o = Math.min(100, Math.max(0, p)), E = w(o), i = B(o), a = s / 2, x = (s - l) / 2, d = 2 * Math.PI * x, I = d, L = d - o / 100 * d, R = `rotate(${C} ${a} ${a}) scale(${P ? 1 : -1}, 1)`;
|
|
46
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center gap-2 ${y}`, children: [
|
|
47
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative", style: { width: s, height: s }, children: [
|
|
48
|
+
/* @__PURE__ */ e.jsxs(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
width: s,
|
|
52
|
+
height: s,
|
|
53
|
+
className: "transform -rotate-90",
|
|
54
|
+
viewBox: `0 0 ${s} ${s}`,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ e.jsx(
|
|
57
|
+
"circle",
|
|
58
|
+
{
|
|
59
|
+
cx: a,
|
|
60
|
+
cy: a,
|
|
61
|
+
r: x,
|
|
62
|
+
fill: "transparent",
|
|
63
|
+
stroke: N,
|
|
64
|
+
strokeWidth: l,
|
|
65
|
+
className: "opacity-20"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ e.jsx(
|
|
69
|
+
"circle",
|
|
70
|
+
{
|
|
71
|
+
cx: a,
|
|
72
|
+
cy: a,
|
|
73
|
+
r: x,
|
|
74
|
+
fill: "transparent",
|
|
75
|
+
stroke: E,
|
|
76
|
+
strokeWidth: l,
|
|
77
|
+
strokeDasharray: I,
|
|
78
|
+
strokeDashoffset: L,
|
|
79
|
+
strokeLinecap: "round",
|
|
80
|
+
transform: R,
|
|
81
|
+
className: g ? "transition-all ease-out" : "",
|
|
82
|
+
style: g ? {
|
|
83
|
+
transitionDuration: v,
|
|
84
|
+
transitionProperty: "stroke-dashoffset, stroke"
|
|
85
|
+
} : {}
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
|
|
92
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-2xl font-bold text-gray-800", children: [
|
|
93
|
+
Math.round(o),
|
|
94
|
+
"%"
|
|
95
|
+
] }),
|
|
96
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-500 mt-1", children: i || u })
|
|
97
|
+
] }) })
|
|
98
|
+
] }),
|
|
99
|
+
m && !f && /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-gray-600 text-center", children: [
|
|
100
|
+
/* @__PURE__ */ e.jsxs("span", { className: "font-medium", children: [
|
|
101
|
+
Math.round(o),
|
|
102
|
+
"%"
|
|
103
|
+
] }),
|
|
104
|
+
i && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-gray-500 block", children: [
|
|
105
|
+
"(",
|
|
106
|
+
i,
|
|
107
|
+
")"
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-gray-500", children: u })
|
|
110
|
+
] })
|
|
111
|
+
] });
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
F as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ColorThreshold {
|
|
2
|
+
threshold: number;
|
|
3
|
+
color: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ThresholdCircleProgressProps {
|
|
7
|
+
progress: number;
|
|
8
|
+
showPercentage?: boolean;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
percentageLabel?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
size?: number;
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
animationDuration?: string;
|
|
17
|
+
colorThresholds?: ColorThreshold[];
|
|
18
|
+
lowThreshold?: number;
|
|
19
|
+
mediumThreshold?: number;
|
|
20
|
+
lowColor?: string;
|
|
21
|
+
mediumColor?: string;
|
|
22
|
+
highColor?: string;
|
|
23
|
+
singleColor?: string;
|
|
24
|
+
clockwise?: boolean;
|
|
25
|
+
startAngle?: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ThresholdCircleProgress } from './ThresholdCircleProgress';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
const P = ({
|
|
3
|
+
progress: d,
|
|
4
|
+
showPercentage: h = !1,
|
|
5
|
+
percentageLabel: c = "",
|
|
6
|
+
className: u = "",
|
|
7
|
+
height: f = "h-5",
|
|
8
|
+
backgroundColor: x = "bg-gray-200",
|
|
9
|
+
animated: g = !0,
|
|
10
|
+
animationDuration: m = "duration-300",
|
|
11
|
+
colorThresholds: s,
|
|
12
|
+
lowThreshold: p = 30,
|
|
13
|
+
mediumThreshold: b = 70,
|
|
14
|
+
lowColor: j = "bg-red-500",
|
|
15
|
+
mediumColor: N = "bg-yellow-500",
|
|
16
|
+
highColor: $ = "bg-green-500",
|
|
17
|
+
singleColor: o
|
|
18
|
+
}) => {
|
|
19
|
+
const y = (n) => {
|
|
20
|
+
if (o)
|
|
21
|
+
return o;
|
|
22
|
+
if (s && s.length > 0) {
|
|
23
|
+
const t = [...s].sort(
|
|
24
|
+
(e, a) => e.threshold - a.threshold
|
|
25
|
+
);
|
|
26
|
+
for (let e = t.length - 1; e >= 0; e--)
|
|
27
|
+
if (n >= t[e].threshold)
|
|
28
|
+
return t[e].color;
|
|
29
|
+
return t[0].color;
|
|
30
|
+
}
|
|
31
|
+
return n < p ? j : n < b ? N : $;
|
|
32
|
+
}, w = (n) => {
|
|
33
|
+
if (!s || s.length === 0) return;
|
|
34
|
+
const t = [...s].sort(
|
|
35
|
+
(e, a) => e.threshold - a.threshold
|
|
36
|
+
);
|
|
37
|
+
for (let e = t.length - 1; e >= 0; e--)
|
|
38
|
+
if (n >= t[e].threshold)
|
|
39
|
+
return t[e].label;
|
|
40
|
+
return t[0].label;
|
|
41
|
+
}, l = Math.min(100, Math.max(0, d)), v = y(l), i = w(l), C = g ? `transition-all ${m} ease-in-out` : "";
|
|
42
|
+
return /* @__PURE__ */ r.jsxs("div", { className: `w-full flex gap-4 items-center ${u}`, children: [
|
|
43
|
+
/* @__PURE__ */ r.jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: `flex-1 ${x} rounded-full ${f} overflow-hidden`,
|
|
47
|
+
children: /* @__PURE__ */ r.jsx(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: `h-full ${v} ${C} rounded-full`,
|
|
51
|
+
style: { width: `${l}%` }
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
h && /* @__PURE__ */ r.jsxs("div", { className: "text-sm text-gray-700 font-medium text-nowrap flex items-center gap-1", children: [
|
|
57
|
+
/* @__PURE__ */ r.jsxs("span", { className: "font-bold", children: [
|
|
58
|
+
Math.round(l),
|
|
59
|
+
"%"
|
|
60
|
+
] }),
|
|
61
|
+
i && /* @__PURE__ */ r.jsxs("span", { className: "text-xs text-gray-500", children: [
|
|
62
|
+
"(",
|
|
63
|
+
i,
|
|
64
|
+
")"
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ r.jsx("span", { className: "text-gray-600", children: c })
|
|
67
|
+
] })
|
|
68
|
+
] });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
P as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ColorThreshold {
|
|
2
|
+
threshold: number;
|
|
3
|
+
color: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ThresholdProgressBarProps {
|
|
7
|
+
progress: number;
|
|
8
|
+
showPercentage?: boolean;
|
|
9
|
+
percentageLabel?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
height?: string;
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
animated?: boolean;
|
|
14
|
+
animationDuration?: string;
|
|
15
|
+
colorThresholds?: ColorThreshold[];
|
|
16
|
+
lowThreshold?: number;
|
|
17
|
+
mediumThreshold?: number;
|
|
18
|
+
lowColor?: string;
|
|
19
|
+
mediumColor?: string;
|
|
20
|
+
highColor?: string;
|
|
21
|
+
singleColor?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TresholdProgressBar } from './TresholdProgressBar';
|
|
@@ -33,3 +33,5 @@ export * from './UncontrolledTextInput/index';
|
|
|
33
33
|
export * from './UploadContainer/index';
|
|
34
34
|
export * from './Tooltip/index';
|
|
35
35
|
export * from './LoadingProgress/index';
|
|
36
|
+
export * from './ThresholdCircleProgress/index';
|
|
37
|
+
export * from './TresholdProgressBar/index';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AlertModalProps } from './AlertModal.types';
|
|
2
|
-
declare const AlertModal: ({ title, description, open, onClose, onConfirm, onCancel, }: AlertModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const AlertModal: ({ title, description, open, onClose, onConfirm, onCancel, showCloseButton, }: AlertModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default AlertModal;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { faX as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
2
|
+
import { faX as y } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
3
|
+
import { FontAwesomeIcon as j } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
|
+
import { useTheme as u } from "../../../hooks/useTheme.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "../../../_virtual/lodash.js";
|
|
6
|
-
import { useTheme as j } from "../../../hooks/useTheme.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import "../InformationContainer/InformationContainer.js";
|
|
9
9
|
import g from "../../atoms/BoxContainer/BoxContainer.js";
|
|
@@ -11,20 +11,21 @@ import r from "../../atoms/Button/Button.js";
|
|
|
11
11
|
import "../../../constants/countries.js";
|
|
12
12
|
import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
|
|
13
13
|
import "fuse.js";
|
|
14
|
-
import { AnimatePresence as
|
|
14
|
+
import { AnimatePresence as v } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
15
15
|
import { motion as l } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
16
|
-
const
|
|
16
|
+
const X = ({
|
|
17
17
|
title: n,
|
|
18
18
|
description: c,
|
|
19
19
|
open: o,
|
|
20
20
|
onClose: i,
|
|
21
21
|
onConfirm: e,
|
|
22
|
-
onCancel: a
|
|
22
|
+
onCancel: a,
|
|
23
|
+
showCloseButton: m = !0
|
|
23
24
|
}) => {
|
|
24
|
-
const { t: s } =
|
|
25
|
+
const { t: s } = u(), x = {
|
|
25
26
|
hidden: { opacity: 0 },
|
|
26
27
|
visible: { opacity: 1 }
|
|
27
|
-
},
|
|
28
|
+
}, p = {
|
|
28
29
|
hidden: {
|
|
29
30
|
opacity: 0,
|
|
30
31
|
scale: 0.8,
|
|
@@ -48,36 +49,36 @@ const T = ({
|
|
|
48
49
|
duration: 0.2
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
}, p = () => {
|
|
52
|
-
e == null || e(), i();
|
|
53
52
|
}, d = () => {
|
|
53
|
+
e == null || e(), i();
|
|
54
|
+
}, f = () => {
|
|
54
55
|
a == null || a(), i();
|
|
55
56
|
};
|
|
56
|
-
return /* @__PURE__ */ t.jsx(
|
|
57
|
+
return /* @__PURE__ */ t.jsx(v, { children: o && /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
|
|
57
58
|
l.div,
|
|
58
59
|
{
|
|
59
60
|
className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
|
|
60
61
|
initial: "hidden",
|
|
61
62
|
animate: "visible",
|
|
62
63
|
exit: "hidden",
|
|
63
|
-
variants:
|
|
64
|
+
variants: x,
|
|
64
65
|
onClick: i,
|
|
65
66
|
children: /* @__PURE__ */ t.jsx(
|
|
66
67
|
l.div,
|
|
67
68
|
{
|
|
68
69
|
className: "w-full max-w-4xl mx-16 z-50",
|
|
69
|
-
variants:
|
|
70
|
+
variants: p,
|
|
70
71
|
initial: "hidden",
|
|
71
72
|
animate: "visible",
|
|
72
73
|
exit: "exit",
|
|
73
|
-
onClick: (
|
|
74
|
+
onClick: (h) => h.stopPropagation(),
|
|
74
75
|
children: /* @__PURE__ */ t.jsxs(g, { className: "flex flex-col gap-16 p-32", children: [
|
|
75
76
|
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center gap-16", children: [
|
|
76
77
|
/* @__PURE__ */ t.jsx("h3", { className: "text-black font-700 text-3xl", children: n }),
|
|
77
|
-
/* @__PURE__ */ t.jsx(
|
|
78
|
-
|
|
78
|
+
m && /* @__PURE__ */ t.jsx(
|
|
79
|
+
j,
|
|
79
80
|
{
|
|
80
|
-
icon:
|
|
81
|
+
icon: y,
|
|
81
82
|
className: "cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",
|
|
82
83
|
onClick: i
|
|
83
84
|
}
|
|
@@ -88,7 +89,7 @@ const T = ({
|
|
|
88
89
|
a && /* @__PURE__ */ t.jsx(
|
|
89
90
|
r,
|
|
90
91
|
{
|
|
91
|
-
onClick:
|
|
92
|
+
onClick: f,
|
|
92
93
|
variant: "transparent",
|
|
93
94
|
className: "px-24 py-10! text-lg!",
|
|
94
95
|
children: s("cancel")
|
|
@@ -97,7 +98,7 @@ const T = ({
|
|
|
97
98
|
e && /* @__PURE__ */ t.jsx(
|
|
98
99
|
r,
|
|
99
100
|
{
|
|
100
|
-
onClick:
|
|
101
|
+
onClick: d,
|
|
101
102
|
className: "px-24 py-16 text-lg!",
|
|
102
103
|
children: s("confirm")
|
|
103
104
|
}
|
|
@@ -110,5 +111,5 @@ const T = ({
|
|
|
110
111
|
) }) });
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
X as default
|
|
114
115
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DialogModalProps } from './DialogModal.types';
|
|
2
|
-
declare const DialogModal: ({ title, description, open, onClose, onConfirm, onCancel, icon, }: DialogModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DialogModal: ({ title, description, open, onClose, onConfirm, onCancel, icon, showCloseButton, }: DialogModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DialogModal;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { faX as
|
|
2
|
+
import { faX as y } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
3
|
+
import { faCheck as v } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
|
|
3
4
|
import { FontAwesomeIcon as l } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
5
|
+
import { useTheme as g } from "../../../hooks/useTheme.js";
|
|
4
6
|
import "react";
|
|
5
7
|
import "../../../_virtual/lodash.js";
|
|
6
|
-
import { useTheme as y } from "../../../hooks/useTheme.js";
|
|
7
|
-
import { faCheck as v } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "../InformationContainer/InformationContainer.js";
|
|
10
|
-
import
|
|
10
|
+
import N from "../../atoms/BoxContainer/BoxContainer.js";
|
|
11
11
|
import r from "../../atoms/Button/Button.js";
|
|
12
12
|
import "../../../constants/countries.js";
|
|
13
13
|
import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
|
|
14
14
|
import "fuse.js";
|
|
15
|
-
import { AnimatePresence as
|
|
15
|
+
import { AnimatePresence as b } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
16
16
|
import { motion as c } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
17
|
-
const
|
|
17
|
+
const G = ({
|
|
18
18
|
title: n,
|
|
19
19
|
description: m,
|
|
20
20
|
open: o,
|
|
21
21
|
onClose: i,
|
|
22
22
|
onConfirm: t,
|
|
23
23
|
onCancel: s,
|
|
24
|
-
icon: x = v
|
|
24
|
+
icon: x = v,
|
|
25
|
+
showCloseButton: d = !0
|
|
25
26
|
}) => {
|
|
26
|
-
const
|
|
27
|
+
const f = {
|
|
27
28
|
hidden: { opacity: 0 },
|
|
28
29
|
visible: { opacity: 1 }
|
|
29
|
-
},
|
|
30
|
+
}, p = {
|
|
30
31
|
hidden: {
|
|
31
32
|
opacity: 0,
|
|
32
33
|
scale: 0.8,
|
|
@@ -50,35 +51,35 @@ const q = ({
|
|
|
50
51
|
duration: 0.2
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
}, p = () => {
|
|
54
|
-
t == null || t(), i();
|
|
55
54
|
}, h = () => {
|
|
55
|
+
t == null || t(), i();
|
|
56
|
+
}, j = () => {
|
|
56
57
|
s == null || s(), i();
|
|
57
|
-
}, { t: a } =
|
|
58
|
-
return /* @__PURE__ */ e.jsx(
|
|
58
|
+
}, { t: a } = g();
|
|
59
|
+
return /* @__PURE__ */ e.jsx(b, { children: o && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
59
60
|
c.div,
|
|
60
61
|
{
|
|
61
62
|
className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
|
|
62
63
|
initial: "hidden",
|
|
63
64
|
animate: "visible",
|
|
64
65
|
exit: "hidden",
|
|
65
|
-
variants:
|
|
66
|
+
variants: f,
|
|
66
67
|
onClick: i,
|
|
67
68
|
children: /* @__PURE__ */ e.jsx(
|
|
68
69
|
c.div,
|
|
69
70
|
{
|
|
70
71
|
className: "w-full max-w-sm mx-16 z-50",
|
|
71
|
-
variants:
|
|
72
|
+
variants: p,
|
|
72
73
|
initial: "hidden",
|
|
73
74
|
animate: "visible",
|
|
74
75
|
exit: "exit",
|
|
75
|
-
onClick: (
|
|
76
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
76
|
+
onClick: (u) => u.stopPropagation(),
|
|
77
|
+
children: /* @__PURE__ */ e.jsxs(N, { className: "flex flex-col gap-20 p-32", children: [
|
|
77
78
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
78
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(
|
|
79
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: d && /* @__PURE__ */ e.jsx(
|
|
79
80
|
l,
|
|
80
81
|
{
|
|
81
|
-
icon:
|
|
82
|
+
icon: y,
|
|
82
83
|
className: "cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",
|
|
83
84
|
onClick: i
|
|
84
85
|
}
|
|
@@ -102,19 +103,12 @@ const q = ({
|
|
|
102
103
|
r,
|
|
103
104
|
{
|
|
104
105
|
size: "lg",
|
|
105
|
-
onClick:
|
|
106
|
+
onClick: j,
|
|
106
107
|
variant: "transparent",
|
|
107
108
|
children: a("cancel")
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
|
-
!!t && /* @__PURE__ */ e.jsx(
|
|
111
|
-
r,
|
|
112
|
-
{
|
|
113
|
-
size: "lg",
|
|
114
|
-
onClick: p,
|
|
115
|
-
children: a("confirm")
|
|
116
|
-
}
|
|
117
|
-
)
|
|
111
|
+
!!t && /* @__PURE__ */ e.jsx(r, { size: "lg", onClick: h, children: a("confirm") })
|
|
118
112
|
] })
|
|
119
113
|
] })
|
|
120
114
|
] })
|
|
@@ -124,5 +118,5 @@ const q = ({
|
|
|
124
118
|
) }) });
|
|
125
119
|
};
|
|
126
120
|
export {
|
|
127
|
-
|
|
121
|
+
G as default
|
|
128
122
|
};
|