lawgic-dev-kit 0.15.8 → 0.16.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/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/molecules/AlertModal/AlertModal.js +21 -21
- package/dist/components/molecules/AlertModal/AlertModal.types.d.ts +2 -2
- package/dist/components/molecules/DialogModal/DialogModal.js +37 -37
- package/dist/components/molecules/DialogModal/DialogModal.types.d.ts +3 -3
- package/dist/components/molecules/Stepper/Stepper.js +81 -73
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +28 -26
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -7,21 +7,21 @@ 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";
|
|
10
|
-
import
|
|
10
|
+
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
14
|
import { AnimatePresence as u } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
15
|
-
import { motion as
|
|
16
|
-
const
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
15
|
+
import { motion as l } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
16
|
+
const T = ({
|
|
17
|
+
title: n,
|
|
18
|
+
description: c,
|
|
19
19
|
open: o,
|
|
20
20
|
onClose: i,
|
|
21
|
-
onConfirm:
|
|
22
|
-
onCancel:
|
|
21
|
+
onConfirm: e,
|
|
22
|
+
onCancel: a
|
|
23
23
|
}) => {
|
|
24
|
-
const { t:
|
|
24
|
+
const { t: s } = j(), m = {
|
|
25
25
|
hidden: { opacity: 0 },
|
|
26
26
|
visible: { opacity: 1 }
|
|
27
27
|
}, x = {
|
|
@@ -49,12 +49,12 @@ const R = ({
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}, p = () => {
|
|
52
|
-
|
|
52
|
+
e == null || e(), i();
|
|
53
53
|
}, d = () => {
|
|
54
|
-
|
|
54
|
+
a == null || a(), i();
|
|
55
55
|
};
|
|
56
56
|
return /* @__PURE__ */ t.jsx(u, { children: o && /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
|
|
57
|
-
|
|
57
|
+
l.div,
|
|
58
58
|
{
|
|
59
59
|
className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
|
|
60
60
|
initial: "hidden",
|
|
@@ -63,7 +63,7 @@ const R = ({
|
|
|
63
63
|
variants: m,
|
|
64
64
|
onClick: i,
|
|
65
65
|
children: /* @__PURE__ */ t.jsx(
|
|
66
|
-
|
|
66
|
+
l.div,
|
|
67
67
|
{
|
|
68
68
|
className: "w-full max-w-4xl mx-16 z-50",
|
|
69
69
|
variants: x,
|
|
@@ -73,7 +73,7 @@ const R = ({
|
|
|
73
73
|
onClick: (f) => f.stopPropagation(),
|
|
74
74
|
children: /* @__PURE__ */ t.jsxs(g, { className: "flex flex-col gap-16 p-32", children: [
|
|
75
75
|
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center gap-16", children: [
|
|
76
|
-
/* @__PURE__ */ t.jsx("h3", { className: "text-black font-700 text-3xl", children:
|
|
76
|
+
/* @__PURE__ */ t.jsx("h3", { className: "text-black font-700 text-3xl", children: n }),
|
|
77
77
|
/* @__PURE__ */ t.jsx(
|
|
78
78
|
y,
|
|
79
79
|
{
|
|
@@ -83,23 +83,23 @@ const R = ({
|
|
|
83
83
|
}
|
|
84
84
|
)
|
|
85
85
|
] }),
|
|
86
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-gray-500 text-xl font-600", children:
|
|
86
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-gray-500 text-xl font-600", children: c }),
|
|
87
87
|
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-end w-full gap-16", children: [
|
|
88
|
-
/* @__PURE__ */ t.jsx(
|
|
89
|
-
|
|
88
|
+
a && /* @__PURE__ */ t.jsx(
|
|
89
|
+
r,
|
|
90
90
|
{
|
|
91
91
|
onClick: d,
|
|
92
92
|
variant: "transparent",
|
|
93
93
|
className: "px-24 py-10! text-lg!",
|
|
94
|
-
children:
|
|
94
|
+
children: s("cancel")
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
/* @__PURE__ */ t.jsx(
|
|
98
|
-
|
|
97
|
+
e && /* @__PURE__ */ t.jsx(
|
|
98
|
+
r,
|
|
99
99
|
{
|
|
100
100
|
onClick: p,
|
|
101
101
|
className: "px-24 py-16 text-lg!",
|
|
102
|
-
children:
|
|
102
|
+
children: s("confirm")
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
] })
|
|
@@ -110,5 +110,5 @@ const R = ({
|
|
|
110
110
|
) }) });
|
|
111
111
|
};
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
T as default
|
|
114
114
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { faX as u } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
3
|
-
import { FontAwesomeIcon as
|
|
3
|
+
import { FontAwesomeIcon as l } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../_virtual/lodash.js";
|
|
6
6
|
import { useTheme as y } from "../../../hooks/useTheme.js";
|
|
@@ -8,19 +8,19 @@ import { faCheck as v } from "../../../node_modules/@fortawesome/pro-solid-svg-i
|
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "../InformationContainer/InformationContainer.js";
|
|
10
10
|
import g from "../../atoms/BoxContainer/BoxContainer.js";
|
|
11
|
-
import
|
|
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
15
|
import { AnimatePresence as N } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
16
|
-
import { motion as
|
|
17
|
-
const
|
|
16
|
+
import { motion as c } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
17
|
+
const q = ({
|
|
18
18
|
title: n,
|
|
19
|
-
description:
|
|
19
|
+
description: m,
|
|
20
20
|
open: o,
|
|
21
|
-
onClose:
|
|
22
|
-
onConfirm:
|
|
23
|
-
onCancel:
|
|
21
|
+
onClose: i,
|
|
22
|
+
onConfirm: t,
|
|
23
|
+
onCancel: s,
|
|
24
24
|
icon: x = v
|
|
25
25
|
}) => {
|
|
26
26
|
const d = {
|
|
@@ -51,21 +51,21 @@ const X = ({
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}, p = () => {
|
|
54
|
-
|
|
54
|
+
t == null || t(), i();
|
|
55
55
|
}, h = () => {
|
|
56
|
-
|
|
57
|
-
}, { t:
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
56
|
+
s == null || s(), i();
|
|
57
|
+
}, { t: a } = y();
|
|
58
|
+
return /* @__PURE__ */ e.jsx(N, { children: o && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
59
|
+
c.div,
|
|
60
60
|
{
|
|
61
61
|
className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
|
|
62
62
|
initial: "hidden",
|
|
63
63
|
animate: "visible",
|
|
64
64
|
exit: "hidden",
|
|
65
65
|
variants: d,
|
|
66
|
-
onClick:
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
|
|
66
|
+
onClick: i,
|
|
67
|
+
children: /* @__PURE__ */ e.jsx(
|
|
68
|
+
c.div,
|
|
69
69
|
{
|
|
70
70
|
className: "w-full max-w-sm mx-16 z-50",
|
|
71
71
|
variants: f,
|
|
@@ -73,46 +73,46 @@ const X = ({
|
|
|
73
73
|
animate: "visible",
|
|
74
74
|
exit: "exit",
|
|
75
75
|
onClick: (j) => j.stopPropagation(),
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
76
|
+
children: /* @__PURE__ */ e.jsxs(g, { className: "flex flex-col gap-20 p-32", children: [
|
|
77
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
78
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(
|
|
79
|
+
l,
|
|
80
80
|
{
|
|
81
81
|
icon: u,
|
|
82
82
|
className: "cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",
|
|
83
|
-
onClick:
|
|
83
|
+
onClick: i
|
|
84
84
|
}
|
|
85
85
|
) }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "bg-blue-100 rounded-full w-76 h-76 flex justify-center items-center", children: /* @__PURE__ */ e.jsx(
|
|
87
|
+
l,
|
|
88
88
|
{
|
|
89
89
|
icon: x,
|
|
90
90
|
className: "w-32 h-36 min-h-36 min-w-36 text-blue-500",
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: i
|
|
92
92
|
}
|
|
93
93
|
) }) })
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-20 items-center justify-center", children: [
|
|
96
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-center w-full", children: [
|
|
97
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-black font-700 text-3xl w-full", children: n }),
|
|
98
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-gray-500 text-xl font-600 w-full", children: m })
|
|
99
99
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
!!
|
|
102
|
-
|
|
100
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-center w-full gap-16", children: [
|
|
101
|
+
!!s && /* @__PURE__ */ e.jsx(
|
|
102
|
+
r,
|
|
103
103
|
{
|
|
104
104
|
size: "lg",
|
|
105
105
|
onClick: h,
|
|
106
106
|
variant: "transparent",
|
|
107
|
-
children:
|
|
107
|
+
children: a("cancel")
|
|
108
108
|
}
|
|
109
109
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
110
|
+
!!t && /* @__PURE__ */ e.jsx(
|
|
111
|
+
r,
|
|
112
112
|
{
|
|
113
113
|
size: "lg",
|
|
114
114
|
onClick: p,
|
|
115
|
-
children:
|
|
115
|
+
children: a("confirm")
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
] })
|
|
@@ -124,5 +124,5 @@ const X = ({
|
|
|
124
124
|
) }) });
|
|
125
125
|
};
|
|
126
126
|
export {
|
|
127
|
-
|
|
127
|
+
q as default
|
|
128
128
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
2
|
export interface DialogModalProps {
|
|
3
3
|
title: string;
|
|
4
|
-
description
|
|
4
|
+
description?: string;
|
|
5
5
|
open: boolean;
|
|
6
6
|
icon?: IconProp;
|
|
7
7
|
onClose: () => void;
|
|
8
|
-
onConfirm
|
|
9
|
-
onCancel
|
|
8
|
+
onConfirm?: () => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
10
|
}
|
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { faCheck as S, faClockSix as k } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
3
3
|
import { FontAwesomeIcon as h } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
|
-
import { useState as y, useEffect as
|
|
4
|
+
import { useState as y, useEffect as $ } from "react";
|
|
5
5
|
import { useTheme as v } from "../../../hooks/useTheme.js";
|
|
6
|
-
import { resolveStepperColors as
|
|
7
|
-
import { motion as
|
|
6
|
+
import { resolveStepperColors as w } from "./Stepper.styles.js";
|
|
7
|
+
import { motion as m } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
8
8
|
import { AnimatePresence as I } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
9
9
|
const D = ({
|
|
10
|
-
status:
|
|
10
|
+
status: a,
|
|
11
11
|
label: u,
|
|
12
12
|
shouldAnimate: t,
|
|
13
|
-
color:
|
|
13
|
+
color: j,
|
|
14
|
+
index: p
|
|
14
15
|
}) => {
|
|
15
|
-
const { t:
|
|
16
|
-
completedBgColor
|
|
16
|
+
const { t: s } = v(), o = a === "done", i = a === "focus", {
|
|
17
|
+
// completedBgColor,
|
|
17
18
|
focusBorderColor: c,
|
|
18
|
-
pendingBorderColor:
|
|
19
|
+
pendingBorderColor: l,
|
|
19
20
|
iconActiveColor: f
|
|
20
|
-
} =
|
|
21
|
+
} = w(j);
|
|
21
22
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8 h-fit", children: [
|
|
22
23
|
/* @__PURE__ */ e.jsx(
|
|
23
|
-
|
|
24
|
+
m.div,
|
|
24
25
|
{
|
|
25
26
|
initial: t ? !1 : {
|
|
26
|
-
backgroundColor: o ?
|
|
27
|
-
borderWidth:
|
|
28
|
-
borderColor:
|
|
27
|
+
backgroundColor: o ? "#E0F1ED" : i ? c : "white",
|
|
28
|
+
borderWidth: i ? "1px" : "0px",
|
|
29
|
+
borderColor: i ? c : l
|
|
29
30
|
},
|
|
30
31
|
animate: {
|
|
31
|
-
backgroundColor: o ?
|
|
32
|
-
borderWidth:
|
|
33
|
-
borderColor:
|
|
32
|
+
backgroundColor: o ? "#E0F1ED" : i ? c : "white",
|
|
33
|
+
borderWidth: i || !o ? "1px" : "0px",
|
|
34
|
+
borderColor: i ? c : l
|
|
34
35
|
},
|
|
35
36
|
transition: { duration: t ? 0.3 : 0, ease: "easeOut" },
|
|
36
37
|
className: "min-w-28 min-h-28 rounded-full flex items-center justify-center text-xl font-bold border-[1px]",
|
|
37
38
|
children: /* @__PURE__ */ e.jsx(
|
|
38
|
-
|
|
39
|
+
m.div,
|
|
39
40
|
{
|
|
40
41
|
initial: t ? !1 : { color: o ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)" },
|
|
41
42
|
animate: {
|
|
42
|
-
color: o ||
|
|
43
|
+
color: o || i ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
|
|
43
44
|
},
|
|
44
45
|
transition: { duration: t ? 0.2 : 0 },
|
|
45
46
|
className: "flex items-center justify-center",
|
|
46
|
-
children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children: o ||
|
|
47
|
-
|
|
47
|
+
children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children: o || i ? /* @__PURE__ */ e.jsx(
|
|
48
|
+
m.div,
|
|
48
49
|
{
|
|
49
50
|
initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
|
|
50
51
|
animate: { opacity: 1, scale: 1, rotate: 0 },
|
|
51
52
|
exit: { opacity: 0, scale: 0.8, rotate: 180 },
|
|
52
53
|
transition: { duration: t ? 0.3 : 0 },
|
|
53
54
|
className: "flex items-center justify-center",
|
|
54
|
-
children: /* @__PURE__ */ e.jsx(
|
|
55
|
+
children: o ? /* @__PURE__ */ e.jsx(
|
|
55
56
|
h,
|
|
56
57
|
{
|
|
57
58
|
icon: S,
|
|
58
59
|
className: `w-14 h-14 min-w-14 min-h-14 ${f}`
|
|
59
60
|
}
|
|
60
|
-
)
|
|
61
|
+
) : /* @__PURE__ */ e.jsx("div", { className: "text-white leading-none font-500 text-body-s flex items-center justify-center mb-1", children: p + 1 })
|
|
61
62
|
},
|
|
62
63
|
"check"
|
|
63
64
|
) : /* @__PURE__ */ e.jsx(
|
|
64
|
-
|
|
65
|
+
m.div,
|
|
65
66
|
{
|
|
66
67
|
initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
|
|
67
68
|
animate: { opacity: 1, scale: 1, rotate: 0 },
|
|
@@ -85,52 +86,57 @@ const D = ({
|
|
|
85
86
|
/* @__PURE__ */ e.jsx(
|
|
86
87
|
"span",
|
|
87
88
|
{
|
|
88
|
-
className: `text-body-s
|
|
89
|
-
|
|
89
|
+
className: `text-body-s transition-all duration-300 text-center w-full font-500
|
|
90
|
+
|
|
91
|
+
`,
|
|
92
|
+
style: {
|
|
93
|
+
color: i ? c : o ? "#000" : "#8F9095"
|
|
94
|
+
},
|
|
95
|
+
children: s(u)
|
|
90
96
|
}
|
|
91
97
|
)
|
|
92
98
|
] });
|
|
93
|
-
},
|
|
94
|
-
status:
|
|
99
|
+
}, W = ({
|
|
100
|
+
status: a,
|
|
95
101
|
label: u,
|
|
96
102
|
shouldAnimate: t,
|
|
97
|
-
color:
|
|
103
|
+
color: j
|
|
98
104
|
}) => {
|
|
99
|
-
const { t:
|
|
100
|
-
completedBgColor:
|
|
105
|
+
const { t: p } = v(), s = a === "done", o = a === "focus", {
|
|
106
|
+
completedBgColor: i,
|
|
101
107
|
focusBorderColor: c,
|
|
102
|
-
pendingBorderColor:
|
|
108
|
+
pendingBorderColor: l,
|
|
103
109
|
iconActiveColor: f
|
|
104
|
-
} =
|
|
110
|
+
} = w(j);
|
|
105
111
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8 h-fit", children: [
|
|
106
112
|
/* @__PURE__ */ e.jsx(
|
|
107
|
-
|
|
113
|
+
m.div,
|
|
108
114
|
{
|
|
109
115
|
initial: t ? !1 : {
|
|
110
|
-
backgroundColor:
|
|
111
|
-
borderWidth:
|
|
112
|
-
borderColor:
|
|
116
|
+
backgroundColor: s ? i : "white",
|
|
117
|
+
borderWidth: o || !s ? "1px" : "0px",
|
|
118
|
+
borderColor: o ? c : l
|
|
113
119
|
},
|
|
114
120
|
animate: {
|
|
115
|
-
backgroundColor:
|
|
116
|
-
borderWidth:
|
|
117
|
-
borderColor:
|
|
121
|
+
backgroundColor: s ? i : "white",
|
|
122
|
+
borderWidth: o || !s ? "1px" : "0px",
|
|
123
|
+
borderColor: o ? c : l
|
|
118
124
|
},
|
|
119
125
|
transition: { duration: t ? 0.3 : 0, ease: "easeOut" },
|
|
120
126
|
className: "min-w-24 min-h-24 rounded-full flex items-center justify-center text-xs font-bold z-10",
|
|
121
127
|
children: /* @__PURE__ */ e.jsx(
|
|
122
|
-
|
|
128
|
+
m.div,
|
|
123
129
|
{
|
|
124
130
|
initial: t ? !1 : {
|
|
125
|
-
color:
|
|
131
|
+
color: o || s ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
|
|
126
132
|
},
|
|
127
133
|
animate: {
|
|
128
|
-
color:
|
|
134
|
+
color: o || s ? "rgb(34, 197, 94)" : "rgb(209, 213, 219)"
|
|
129
135
|
},
|
|
130
136
|
transition: { duration: t ? 0.2 : 0 },
|
|
131
137
|
className: "flex items-center justify-center",
|
|
132
|
-
children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children:
|
|
133
|
-
|
|
138
|
+
children: /* @__PURE__ */ e.jsx(I, { mode: "wait", children: s || o ? /* @__PURE__ */ e.jsx(
|
|
139
|
+
m.div,
|
|
134
140
|
{
|
|
135
141
|
initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
|
|
136
142
|
animate: { opacity: 1, scale: 1, rotate: 0 },
|
|
@@ -147,7 +153,7 @@ const D = ({
|
|
|
147
153
|
},
|
|
148
154
|
"check"
|
|
149
155
|
) : /* @__PURE__ */ e.jsx(
|
|
150
|
-
|
|
156
|
+
m.div,
|
|
151
157
|
{
|
|
152
158
|
initial: t ? { opacity: 0, scale: 0.8, rotate: -180 } : { opacity: 1, scale: 1, rotate: 0 },
|
|
153
159
|
animate: { opacity: 1, scale: 1, rotate: 0 },
|
|
@@ -171,70 +177,72 @@ const D = ({
|
|
|
171
177
|
/* @__PURE__ */ e.jsx(
|
|
172
178
|
"span",
|
|
173
179
|
{
|
|
174
|
-
className: `text-body-s font-medium transition-all duration-300 text-center w-full ${
|
|
175
|
-
children:
|
|
180
|
+
className: `text-body-s font-medium transition-all duration-300 text-center w-full ${s || o ? "text-black" : "text-gray-400"}`,
|
|
181
|
+
children: p(u)
|
|
176
182
|
}
|
|
177
183
|
)
|
|
178
184
|
] });
|
|
179
185
|
}, J = ({
|
|
180
|
-
steps:
|
|
186
|
+
steps: a,
|
|
181
187
|
direction: u = "horizontal",
|
|
182
188
|
color: t
|
|
183
189
|
}) => {
|
|
184
|
-
const { defaultColorScheme:
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
(
|
|
190
|
+
const { defaultColorScheme: j } = v(), p = t || j, { lineActiveColor: s, lineGradientFrom: o } = w(p), [i, c] = y([]), [l, f] = y(null), [g, z] = y(!1), C = a.findIndex((n) => !n.completed), b = (n) => C === n;
|
|
191
|
+
$(() => {
|
|
192
|
+
const n = a.map(
|
|
193
|
+
(r, d) => b(d) ? "focus" : r.completed ? "done" : "pending"
|
|
188
194
|
);
|
|
189
195
|
if (!g)
|
|
190
|
-
c(
|
|
196
|
+
c(n), z(!0), f(null);
|
|
191
197
|
else {
|
|
192
|
-
const
|
|
193
|
-
(
|
|
198
|
+
const r = n.findIndex(
|
|
199
|
+
(d, x) => d !== i[x]
|
|
194
200
|
);
|
|
195
|
-
f(
|
|
201
|
+
f(r !== -1 ? r : null), c(n);
|
|
196
202
|
}
|
|
197
|
-
}, [
|
|
198
|
-
const
|
|
203
|
+
}, [a, C]);
|
|
204
|
+
const F = () => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-16 relative", children: a.map((n, r) => {
|
|
199
205
|
var N;
|
|
200
|
-
const
|
|
206
|
+
const d = b(r - 1) ? "focus" : (N = a[r - 1]) != null && N.completed ? "done" : "pending", x = b(r) ? "focus" : n.completed ? "done" : "pending", E = g && l === r;
|
|
201
207
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-10 relative", children: [
|
|
202
|
-
|
|
208
|
+
r !== 0 && /* @__PURE__ */ e.jsx(
|
|
203
209
|
"div",
|
|
204
210
|
{
|
|
205
|
-
className: `absolute left-[13px] bottom-[28px] w-[1.5px] h-16 ${x === "done" || x === "focus" ?
|
|
211
|
+
className: `absolute left-[13px] bottom-[28px] w-[1.5px] h-16 ${x === "done" || x === "focus" ? s : d === "done" || d === "focus" ? `bg-gradient-to-b ${o} to-[rgb(243,244,246)]` : "bg-[rgb(243,244,246)]"}`
|
|
206
212
|
}
|
|
207
213
|
),
|
|
208
214
|
/* @__PURE__ */ e.jsx(
|
|
209
215
|
D,
|
|
210
216
|
{
|
|
217
|
+
index: r,
|
|
211
218
|
status: x,
|
|
212
|
-
shouldAnimate:
|
|
213
|
-
label:
|
|
214
|
-
color:
|
|
219
|
+
shouldAnimate: E,
|
|
220
|
+
label: n.label,
|
|
221
|
+
color: p
|
|
215
222
|
}
|
|
216
223
|
)
|
|
217
|
-
] },
|
|
218
|
-
}) }),
|
|
219
|
-
const
|
|
224
|
+
] }, r);
|
|
225
|
+
}) }), B = () => /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center gap-12", children: a.map((n, r) => {
|
|
226
|
+
const d = b(r) ? "focus" : n.completed ? "done" : "pending", x = g && l === r;
|
|
220
227
|
return /* @__PURE__ */ e.jsx(
|
|
221
228
|
"div",
|
|
222
229
|
{
|
|
223
230
|
className: "flex flex-col items-center justify-evenly w-full gap-2 relative col-span-1",
|
|
224
231
|
children: /* @__PURE__ */ e.jsx(
|
|
225
|
-
|
|
232
|
+
W,
|
|
226
233
|
{
|
|
227
|
-
|
|
234
|
+
index: r,
|
|
235
|
+
status: d,
|
|
228
236
|
shouldAnimate: x,
|
|
229
|
-
label:
|
|
230
|
-
color:
|
|
237
|
+
label: n.label,
|
|
238
|
+
color: p
|
|
231
239
|
}
|
|
232
240
|
)
|
|
233
241
|
},
|
|
234
|
-
|
|
242
|
+
r
|
|
235
243
|
);
|
|
236
244
|
}) });
|
|
237
|
-
return u === "horizontal" ? /* @__PURE__ */ e.jsx(
|
|
245
|
+
return u === "horizontal" ? /* @__PURE__ */ e.jsx(B, {}) : /* @__PURE__ */ e.jsx(F, {});
|
|
238
246
|
};
|
|
239
247
|
export {
|
|
240
248
|
J as default
|