@edu-tosel/design 1.0.76 → 1.0.78
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { widthSizes } from "../../../asset/sizes";
|
|
2
3
|
import SVG from "../../../asset/SVG";
|
|
3
4
|
import { cn } from "../../../util";
|
|
4
5
|
import CardDesign from "../../design/Card.design";
|
|
@@ -31,12 +32,9 @@ export default function ProgressCardLG({ titles, checks, displays, theme, }) {
|
|
|
31
32
|
positions: "absolute top-12 right-12",
|
|
32
33
|
displays: "flex flex-col items-end gap-y-3",
|
|
33
34
|
};
|
|
34
|
-
const occupied =
|
|
35
|
-
checks.map((value) => !!value).length,
|
|
36
|
-
displays.length,
|
|
37
|
-
].join("/");
|
|
35
|
+
const occupied = Math.round((checks.filter((value) => !!value).length / displays.length) * 100);
|
|
38
36
|
return (_jsxs(CardDesign, { option: {
|
|
39
37
|
width: "2xl",
|
|
40
38
|
height: "2xs",
|
|
41
|
-
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title }, index) => (_jsxs("div", { className: cn(stepBox(checks[index])), children: [_jsx("div", { children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: theme })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: `text-xl leading-none font-pretendard-bold ${text[theme ?? "green"]}`, children: titles.title }), _jsx("div", { className: "text-base leading-none", children: titles.subtitle })] }), _jsx("div", { className: "absolute bottom-0 left-0 bg-gray-light w-full h-2.5", children: _jsx("div", { className: `h-full
|
|
39
|
+
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title }, index) => (_jsxs("div", { className: cn(stepBox(checks[index])), children: [_jsx("div", { children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: theme })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: `text-xl leading-none font-pretendard-bold ${text[theme ?? "green"]}`, children: titles.title }), _jsx("div", { className: "text-base leading-none", children: titles.subtitle })] }), _jsx("div", { className: "absolute bottom-0 left-0 bg-gray-light w-full h-2.5", children: _jsx("div", { className: `h-full ${widthSizes[occupied]} ${bg[theme ?? "green"]}` }) })] }));
|
|
42
40
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProgressCardProps } from "../../../interface";
|
|
2
|
-
export default function ProgressCardSmall({ titles, displays, checks, theme, }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme, }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ const text = {
|
|
|
10
10
|
green: "text-green-dark",
|
|
11
11
|
blue: "text-blue-navy",
|
|
12
12
|
};
|
|
13
|
-
export default function ProgressCardSmall({ titles, displays, checks, theme = "green", }) {
|
|
13
|
+
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme = "green", }) {
|
|
14
14
|
const progressBox = {
|
|
15
15
|
positions: "absolute top-2.5 left-2.5",
|
|
16
16
|
displays: "flex",
|
|
@@ -24,11 +24,14 @@ export default function ProgressCardSmall({ titles, displays, checks, theme = "g
|
|
|
24
24
|
texts: flag ? "text-gray-dark" : "text-gray-medium",
|
|
25
25
|
});
|
|
26
26
|
const titleBox = {
|
|
27
|
-
positions: "absolute top-
|
|
27
|
+
positions: "absolute top-2.5 right-2.5",
|
|
28
|
+
sizes: "max-w-32.5 w-full h-16",
|
|
28
29
|
displays: "flex flex-col items-end gap-y-3",
|
|
30
|
+
backgrounds: nowFocus === true ? bgLight[theme ?? "green"] : "bg-transparent",
|
|
31
|
+
boundaries: "rounded-[10px] pt-2 pr-3.5",
|
|
29
32
|
};
|
|
30
33
|
return (_jsxs(CardDesign, { option: {
|
|
31
34
|
width: "md",
|
|
32
35
|
height: "5xs",
|
|
33
|
-
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title, subtitle }, index) => (_jsxs("div", { className: cn(stepBox(
|
|
36
|
+
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title, subtitle }, index) => (_jsxs("div", { className: cn(stepBox(index === nowFocus)), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "leading-none text-[12px] font-pretendard-bold", children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: "green" })] }), _jsx("div", { className: `text-[12px] ${text[theme]}`, children: subtitle })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: `text-[20px] leading-none font-pretendard-bold ${text[theme]}`, children: titles.title }), _jsx("div", { className: `text-[12px] leading-none ${text[theme]}`, children: titles.subtitle })] })] }));
|
|
34
37
|
}
|
package/interface/Card.d.ts
CHANGED
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -56,9 +56,10 @@ export default {
|
|
|
56
56
|
"red-crimson": "#760023",
|
|
57
57
|
"red-velvet": "#AC647A",
|
|
58
58
|
"green-dark": "#105652",
|
|
59
|
-
"green-light": "#
|
|
59
|
+
"green-light": "#DFE5E4",
|
|
60
60
|
"blue-sky": "#44C5F3",
|
|
61
61
|
"blue-navy": "#173A8B",
|
|
62
|
+
"blue-navy-light": "#E1E4EB",
|
|
62
63
|
"blue-pastel": "#CED6E6",
|
|
63
64
|
"violet-light": "#9979F6",
|
|
64
65
|
"gray-light": "#F0F0F0",
|
|
@@ -173,6 +174,7 @@ export default {
|
|
|
173
174
|
28.78: "7.195rem",
|
|
174
175
|
29: "7.25rem",
|
|
175
176
|
30: "7.5rem",
|
|
177
|
+
32.5: "8.125rem",
|
|
176
178
|
34: "8.5rem",
|
|
177
179
|
36: "9rem",
|
|
178
180
|
36.5: "9.125rem",
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.78
|