@edu-tosel/design 1.0.185 → 1.0.187
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/layout/template/Regexam/Banner.js +2 -2
- package/layout/template/Ticket/academy/Academy.js +20 -5
- package/layout/template/Ticket/academy/AcademyTicket.d.ts +1 -0
- package/layout/template/Ticket/academy/AcademyTicket.js +7 -5
- package/layout/template/Transcript/design/Organism/BarCardCol.d.ts +4 -0
- package/layout/template/Transcript/design/Organism/BarCardCol.js +30 -0
- package/layout/template/Transcript/design/Organism/BarCardRow.d.ts +4 -0
- package/layout/template/Transcript/design/Organism/BarCardRow.js +30 -0
- package/layout/template/Transcript/design/Transcript.design.d.ts +7 -0
- package/layout/template/Transcript/design/Transcript.design.js +63 -191
- package/layout/template/Transcript/design/atom/CardTitle.d.ts +3 -0
- package/layout/template/Transcript/design/atom/CardTitle.js +11 -0
- package/layout/template/Transcript/design/atom/CardTitleDivided.d.ts +0 -0
- package/layout/template/Transcript/design/atom/CardTitleDivided.js +1 -0
- package/layout/template/Transcript/design/atom/IdCard.d.ts +12 -0
- package/layout/template/Transcript/design/atom/IdCard.js +74 -0
- package/layout/template/Transcript/design/atom/PrintBoxStyles.d.ts +4 -0
- package/layout/template/Transcript/design/atom/PrintBoxStyles.js +4 -0
- package/layout/template/Transcript/design/atom/ScriptStyle.d.ts +0 -0
- package/layout/template/Transcript/design/atom/ScriptStyle.js +1 -0
- package/layout/template/Transcript/design/molecule/BarGraph.d.ts +9 -0
- package/layout/template/Transcript/design/molecule/BarGraph.js +65 -0
- package/package.json +1 -1
- package/style/size.js +1 -1
- package/tailwind.config.ts +4 -1
- package/version.txt +1 -1
|
@@ -92,8 +92,8 @@ const InfiniteCarousel = () => {
|
|
|
92
92
|
title: "Cocoon",
|
|
93
93
|
subtitle: "영어를 시작하는 단계",
|
|
94
94
|
img: "https://resource.tosel.co.kr/images/img-character-co.png",
|
|
95
|
-
colorT: "text-
|
|
96
|
-
colorB: "bg-
|
|
95
|
+
colorT: "text-co-green",
|
|
96
|
+
colorB: "bg-co-green-light",
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
title: "Pre-Starter",
|
|
@@ -21,27 +21,41 @@ export default function Academy({ applicationsData, examDate, examName, }) {
|
|
|
21
21
|
sizes: "w-1/3 h-full px-2.5",
|
|
22
22
|
cursors: "cursor-pointer",
|
|
23
23
|
};
|
|
24
|
-
const [selectedStudent, setSelectedStudent] = useState(null);
|
|
25
24
|
const formattedData = Object.values(applicationsData ?? {})
|
|
26
25
|
.filter((app) => app.applicationId !== null)
|
|
27
26
|
.slice(0, -1);
|
|
27
|
+
const [selectedStudent, setSelectedStudent] = useState(formattedData[0]);
|
|
28
28
|
const handleSelectStudent = (student) => {
|
|
29
29
|
setSelectedStudent(toRender(student));
|
|
30
30
|
};
|
|
31
31
|
const ref = useRef(null);
|
|
32
|
-
const
|
|
32
|
+
const refALot = useRef(null);
|
|
33
33
|
const handlePrint = useReactToPrint({
|
|
34
34
|
content: () => ref.current,
|
|
35
35
|
});
|
|
36
36
|
const ticketRefs = useRef(formattedData.map(() => React.createRef()));
|
|
37
37
|
const printAllTickets = useReactToPrint({
|
|
38
|
-
content: () =>
|
|
38
|
+
content: () => refALot.current,
|
|
39
|
+
onBeforeGetContent: () => {
|
|
40
|
+
if (refALot.current) {
|
|
41
|
+
refALot.current.style.display = "block";
|
|
42
|
+
}
|
|
43
|
+
return new Promise((resolve) => {
|
|
44
|
+
setTimeout(resolve, 1);
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
onAfterPrint: () => {
|
|
48
|
+
if (refALot.current) {
|
|
49
|
+
refALot.current.style.display = "none";
|
|
50
|
+
}
|
|
51
|
+
},
|
|
39
52
|
});
|
|
40
|
-
console.log(allTicketsRef.current);
|
|
41
53
|
return (_jsx(_Fragment, { children: _jsx("div", { className: "w-full min-h-screen flex items-center justify-center bg-gray-light", children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "w-full h-15 bg-green-dark rounded-lg flex justify-between items-center p-5 text-white text-md shadow-main", children: [_jsx("div", { className: "font-semibold", children: examName }), _jsx("div", { children: "\uACE0\uC0AC\uC7A5 \uC2DC\uD5D8" })] }), _jsx(TableCard, { dataField: dataField, dataSet: {
|
|
42
54
|
items: formattedData ?? [],
|
|
43
55
|
renderItem: (application) => (_jsx(Row.Card, { item: toRender(application), dataField: dataField, onClick: () => handleSelectStudent(application) })),
|
|
44
|
-
} }), _jsxs("div", { className: "flex w-full h-12 gap-3", children: [_jsxs("div", { className: cn(btn), onClick: printAllTickets, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC804\uCCB4 \uC218\uD5D8\uD45C \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), onClick: handlePrint, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uD604\uC7AC \uD559\uC0DD \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), children: [_jsx(HiOutlineTableCells, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC5D1\uC140 \uB2E4\uC6B4\uB85C\uB4DC" })] })] })] }), _jsx("div", { ref:
|
|
56
|
+
} }), _jsxs("div", { className: "flex w-full h-12 gap-3", children: [_jsxs("div", { className: cn(btn), onClick: printAllTickets, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC804\uCCB4 \uC218\uD5D8\uD45C \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), onClick: handlePrint, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uD604\uC7AC \uD559\uC0DD \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), children: [_jsx(HiOutlineTableCells, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC5D1\uC140 \uB2E4\uC6B4\uB85C\uB4DC" })] })] })] }), _jsx("div", { ref: refALot, style: {
|
|
57
|
+
display: "none",
|
|
58
|
+
}, children: formattedData.map((student, index) => (_jsx(GroupTicket, { ref: ticketRefs.current[index], props: {
|
|
45
59
|
exam: {
|
|
46
60
|
title: examName,
|
|
47
61
|
hall: student.examHallName ?? "",
|
|
@@ -56,6 +70,7 @@ export default function Academy({ applicationsData, examDate, examName, }) {
|
|
|
56
70
|
profileImageUrl: "",
|
|
57
71
|
level: LevelString[student.level ?? "PS"],
|
|
58
72
|
code: student.code ?? "",
|
|
73
|
+
isAll: true,
|
|
59
74
|
} }, student.applicationId))) }), _jsx(GroupTicket, { ref: ref, props: {
|
|
60
75
|
exam: {
|
|
61
76
|
title: examName,
|
|
@@ -4,6 +4,8 @@ import { cn } from "../../../../util";
|
|
|
4
4
|
import moment from "moment-timezone";
|
|
5
5
|
function AcademyTicket({ props }, ref) {
|
|
6
6
|
const { title, date, hall, room, startedAt, endedAt } = props.exam;
|
|
7
|
+
const { isAll } = props;
|
|
8
|
+
const isAllSize = isAll ? "w-[210mm] h-[297mm] p-10" : "";
|
|
7
9
|
//수험번호 섹션 디자인을 위한 배열
|
|
8
10
|
const numberArray = props.code.split("").map(Number);
|
|
9
11
|
numberArray.splice(3, 0, null);
|
|
@@ -46,10 +48,10 @@ function AcademyTicket({ props }, ref) {
|
|
|
46
48
|
displays: "flex justify-center items-center",
|
|
47
49
|
textstyles: "text-2xs font-medium text-black",
|
|
48
50
|
};
|
|
49
|
-
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
return (_jsx("div", { ref: ref, className: isAllSize, children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(logoWrapper), children: [_jsx("img", { className: cn(svgController), src: "/images/logos/logo-itc-main.svg", alt: "" }), _jsx("img", { className: cn(svgController), src: "/images/logos/logo-tosel-main.svg", alt: "" })] }), _jsxs("div", { className: "flex flex-col w-full gap-2.5", children: [_jsx("div", { className: cn(titleDivider) }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "text-lg font-bold leading-none", children: "\uC218 \uD5D8 \uD45C" }), _jsx("div", { className: "text-sm font-medium leading-none", children: title })] }), _jsx("div", { className: cn(titleDivider) })] }), _jsxs("div", { className: "flex flex-col gap-5 mt-5", children: [_jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge), children: "\uC218\uD5D8\uBC88\uD638" }), _jsx("div", { className: "w-full flex flex-row divide-x-[1px] divide-dashed divide-gray-medium/50", children: numberArray.map((num, index) => (_jsx("div", { className: `flex justify-center items-center text-xs font-medium ${num === null
|
|
52
|
+
? "w-2.5 shrink-0 bg-gray-light"
|
|
53
|
+
: "w-full bg-white"}`, children: num !== null ? num : "" }, index))) })] }), _jsxs("div", { className: "font-medium text-2xs", children: ["*OMR (1)\uBC88 \uD56D\uBAA9\uC5D0 \uD574\uB2F9\uBC88\uD638\uB97C \uB530\uB77C\uC11C \uC368\uC8FC\uC138\uC694.", " "] })] }), _jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge), children: "\uB808\uBCA8" }), _jsx("div", { className: cn(cellText), children: props.level })] }), _jsxs("div", { className: "flex flex-row gap-2", children: [_jsxs("div", { className: "flex flex-col gap-0 h-full w-21 border-1 border-gray-medium shrink-0", children: [_jsx("div", { className: "h-full w-full bg-cover", style: {
|
|
54
|
+
backgroundImage: `url(${props.profileImageUrl ?? ""})`,
|
|
55
|
+
} }), _jsx("div", { className: cn(cellTitleLarge, "w-full"), children: "\uC0AC\uC9C4" })] }), _jsxs("div", { className: "flex flex-col gap-2 w-full", children: [_jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uC774\uB984" }), _jsx("div", { className: cn(cellText), children: props.name })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uC0DD\uB144\uC6D4\uC77C" }), _jsx("div", { className: cn(cellText), children: props.birthday })] })] }), _jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uACE0\uC0AC\uC7A5" }), _jsx("div", { className: cn(cellText), children: hall })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uACE0\uC0AC\uC2E4" }), _jsx("div", { className: cn(cellText), children: room })] })] })] })] }), _jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC2DC\uD5D8\uC77C\uC790" }), _jsx("div", { className: cn(cellText), children: props.exam.date })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC785\uC2E4 \uC644\uB8CC\uC2DC\uAC04" }), _jsx("div", { className: cn(cellText), children: moment.unix(startedAt).format("HH시 mm분") })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC885\uB8CC\uC2DC\uAC04" }), _jsx("div", { className: cn(cellText), children: moment.unix(endedAt).format("HH시 mm분") })] }), _jsxs("div", { className: "flex flex-col mt-1", children: [_jsx("div", { className: "font-medium text-2xs leading-tight", children: "*\uC785\uC2E4\uC2DC\uAC04 \uC774\uD6C4\uC5D0\uB294 \uC785\uC2E4\uC774 \uC81C\uD55C\uB429\uB2C8\uB2E4." }), _jsx("div", { className: "font-medium text-2xs leading-tight", children: "*\uACE0\uC0AC\uC7A5 \uC5EC\uAC74\uC5D0 \uB530\uB77C \uD1F4\uC2E4\uC2DC\uAC04\uC740 \uC870\uAE08\uC529 \uC0C1\uC774\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4." })] })] }), _jsx("div", { className: "w-full border-b-1 border-dashed border-gray-medium" }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "font-bold text-sm leading-tight", children: "\uC751\uC2DC\uC790 \uC720\uC758\uC0AC\uD56D" }), _jsxs("ul", { className: "list-outside list-decimal ml-4 font-medium text-2xs", children: [_jsxs("li", { className: "mb-1", children: ["\uB2E4\uC74C\uC758 \uBB3C\uD488\uC744 \uAF2D \uC900\uBE44\uD574\uC8FC\uC138\uC694:", _jsx("br", {}), " \uCEF4\uD4E8\uD130\uC6A9 \uC0AC\uC778\uD39C / \uC218\uC815 \uD14C\uC774\uD504 / \uC218\uD5D8\uD45C / \uAC80\uC815 \uBCFC\uD39C"] }), _jsxs("li", { className: "mb-1", children: ["\uACE0\uC0AC\uC7A5 \uC704\uCE58\uB97C \uBBF8\uB9AC \uD655\uC778\uD574\uC8FC\uC138\uC694:", _jsx("br", {}), " \uC218\uD5D8\uD45C\uC5D0 \uAE30\uC7AC\uB41C \uACE0\uC0AC\uC7A5, \uACE0\uC0AC\uC2E4 \uC815\uBCF4\uB97C \uD655\uC778\uD574\uC8FC\uC138\uC694."] }), _jsxs("li", { children: ["\uD559\uBD80\uBAA8 \uCD9C\uC785 \uD1B5\uC81C:", _jsx("br", {}), "\uACE0\uC0AC\uC2E4 \uB0B4\uBD80\uC5D0\uB294 \uD559\uBD80\uBAA8\uC758 \uCD9C\uC785\uC774 \uC5C4\uACA9\uD788 \uD1B5\uC81C\uB429\uB2C8\uB2E4."] })] })] })] })] }) }));
|
|
54
56
|
}
|
|
55
57
|
export default forwardRef(AcademyTicket);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardRow({ data }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const cardTitle = {
|
|
14
|
+
display: "flex flex-row justify-center items-center",
|
|
15
|
+
sizes: "h-7 shrink-0 w-full",
|
|
16
|
+
bg: "bg-green-light",
|
|
17
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
+
};
|
|
19
|
+
const SectionWrapper = {
|
|
20
|
+
display: "flex flex-row sm:flex-col items-center justify-center",
|
|
21
|
+
sizes: "h-full w-full",
|
|
22
|
+
};
|
|
23
|
+
const ScriptStyles = {
|
|
24
|
+
displays: "flex justify-center items-center align-center",
|
|
25
|
+
spacings: "p-5",
|
|
26
|
+
sizes: "w-full h-full",
|
|
27
|
+
textStyles: "text-sm break-keep",
|
|
28
|
+
};
|
|
29
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardRow({ data }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const cardTitle = {
|
|
14
|
+
display: "flex flex-row justify-center items-center",
|
|
15
|
+
sizes: "h-7 shrink-0 w-full",
|
|
16
|
+
bg: "bg-green-light",
|
|
17
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
+
};
|
|
19
|
+
const SectionWrapper = {
|
|
20
|
+
display: "flex sm:flex-row flex-col items-center justify-center",
|
|
21
|
+
sizes: "h-full w-full",
|
|
22
|
+
};
|
|
23
|
+
const ScriptStyles = {
|
|
24
|
+
displays: "flex justify-center items-center align-center",
|
|
25
|
+
spacings: "p-5",
|
|
26
|
+
sizes: "w-full h-full",
|
|
27
|
+
textStyles: "text-sm break-keep",
|
|
28
|
+
};
|
|
29
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { TranscriptProps } from "./Transcript";
|
|
2
|
+
import { Level as NarrowLevel } from "../../../../_test/interface";
|
|
3
|
+
type Level = Exclude<NarrowLevel, ""> | "CC";
|
|
2
4
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
3
5
|
props: TranscriptProps;
|
|
4
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
7
|
export default _default;
|
|
8
|
+
export declare const LevelToStyleMap: Record<Level, {
|
|
9
|
+
name: string;
|
|
10
|
+
bgcolor: string;
|
|
11
|
+
textcolor: string;
|
|
12
|
+
}>;
|
|
@@ -1,64 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import QRCode from "react-qr-code";
|
|
2
|
+
import { forwardRef } from "react";
|
|
4
3
|
import { paperSize } from "../../../../style/size";
|
|
5
4
|
import { LineBreaks } from "../../../../text";
|
|
6
|
-
import { cn
|
|
5
|
+
import { cn } from "../../../../util";
|
|
7
6
|
import SVG from "../../../../asset/SVG";
|
|
8
|
-
import { useResponsive
|
|
7
|
+
import { useResponsive } from "../../../../hook";
|
|
9
8
|
import { ResponsiveContainer, PieChart, Pie, Cell, } from "recharts";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
CMP: "경시대회",
|
|
14
|
-
};
|
|
15
|
-
function getStringfromType(ExamType) {
|
|
16
|
-
return examTypeMap[ExamType] || "Unknown";
|
|
17
|
-
}
|
|
18
|
-
const LevelToStyleMap = {
|
|
19
|
-
CC: {
|
|
20
|
-
name: "Cocoon",
|
|
21
|
-
bgcolor: "bg-cocoon-green/10",
|
|
22
|
-
textcolor: "text-cocoon-green",
|
|
23
|
-
},
|
|
24
|
-
PS: {
|
|
25
|
-
name: "Pre-Starter",
|
|
26
|
-
bgcolor: "bg-ps-pink-light",
|
|
27
|
-
textcolor: "text-ps-pink",
|
|
28
|
-
},
|
|
29
|
-
ST: {
|
|
30
|
-
name: "Starter",
|
|
31
|
-
bgcolor: "bg-st-orange-light",
|
|
32
|
-
textcolor: "text-st-orange",
|
|
33
|
-
},
|
|
34
|
-
BA: {
|
|
35
|
-
name: "Basic",
|
|
36
|
-
bgcolor: "bg-ba-yellow-light",
|
|
37
|
-
textcolor: "text-ba-yellow",
|
|
38
|
-
},
|
|
39
|
-
JR: {
|
|
40
|
-
name: "Junior",
|
|
41
|
-
bgcolor: "bg-jr-blue-light",
|
|
42
|
-
textcolor: "text-jr-blue",
|
|
43
|
-
},
|
|
44
|
-
HJ: {
|
|
45
|
-
name: "High Junior",
|
|
46
|
-
bgcolor: "bg-hj-blue-light",
|
|
47
|
-
textcolor: "text-hj-blue",
|
|
48
|
-
},
|
|
49
|
-
AD: {
|
|
50
|
-
name: "Advanced",
|
|
51
|
-
bgcolor: "bg-gray-light",
|
|
52
|
-
textcolor: "text-gray-dark",
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
const printBoxStyles = {
|
|
56
|
-
shadow: "print:shadow-none",
|
|
57
|
-
colors: "print:bg-white print:border print:border-gray-medium/70",
|
|
58
|
-
};
|
|
59
|
-
function getStylefromLevel(level, field) {
|
|
60
|
-
return LevelToStyleMap[level]?.[field] || "Unknown";
|
|
61
|
-
}
|
|
9
|
+
import IdCard, { getStringfromType } from "./atom/IdCard";
|
|
10
|
+
import { printBoxStyles } from "./atom/PrintBoxStyles";
|
|
11
|
+
import { BarCardRow } from "./Organism/BarCardRow";
|
|
62
12
|
function TranscriptDesign({ props }, ref) {
|
|
63
13
|
const { info, result, data } = props;
|
|
64
14
|
const container = {
|
|
@@ -73,60 +23,9 @@ function TranscriptDesign({ props }, ref) {
|
|
|
73
23
|
spacings: "px-5 py-2",
|
|
74
24
|
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
75
25
|
};
|
|
76
|
-
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-bold text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(IdCard, { info: info }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(ResultCard, { result: result }), _jsx(HonorCard, { result: result })] }), _jsx(PerformanceCard, { data: data }), _jsx(ScoreCard, { data: data }), _jsx(
|
|
26
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-bold text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(IdCard, { info: info }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(ResultCard, { result: result }), _jsx(HonorCard, { result: result })] }), _jsx(PerformanceCard, { data: data, info: info }), _jsx(ScoreCard, { data: data }), _jsx(BarCardRow, { data: data })] }));
|
|
77
27
|
}
|
|
78
28
|
export default forwardRef(TranscriptDesign);
|
|
79
|
-
function IdCard({ info }) {
|
|
80
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
81
|
-
const togglecard = () => setIsExpanded(!isExpanded);
|
|
82
|
-
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
83
|
-
const isXS = useResponsive("xs");
|
|
84
|
-
const cardWrapper = {
|
|
85
|
-
displays: "flex flex-col self-auto overflow-hidden",
|
|
86
|
-
sizes: "w-full rounded-lg h-fit",
|
|
87
|
-
backgrounds: "bg-white shadow-main",
|
|
88
|
-
spacings: "p-3",
|
|
89
|
-
printOptions: "print:bg-white print:shadow-none",
|
|
90
|
-
};
|
|
91
|
-
const imgBox = {
|
|
92
|
-
displays: "relative shrink-0 overflow-hidden",
|
|
93
|
-
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
94
|
-
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
95
|
-
outlines: "border-2 border-slate-200",
|
|
96
|
-
};
|
|
97
|
-
const qrBox = {
|
|
98
|
-
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
99
|
-
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
100
|
-
textStyles: "text-jr-blue",
|
|
101
|
-
backgrounds: "bg-white",
|
|
102
|
-
groupAction: "group duration-300 hover:scale-110",
|
|
103
|
-
};
|
|
104
|
-
const copyButtonWrapper = {
|
|
105
|
-
display: "absolute flex justify-center items-center",
|
|
106
|
-
positions: "top-0 left-0",
|
|
107
|
-
sizes: "h-full w-full backdrop-blur-sm",
|
|
108
|
-
graphics: "opacity-0 bg-white/80 ",
|
|
109
|
-
animations: "duration-300 group-hover:opacity-100",
|
|
110
|
-
};
|
|
111
|
-
const copyButton = {
|
|
112
|
-
displays: "flex justify-center items-center",
|
|
113
|
-
sizes: "w-20 h-8 rounded-lg",
|
|
114
|
-
colors: "bg-green-light border border-green-dark",
|
|
115
|
-
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
116
|
-
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
117
|
-
};
|
|
118
|
-
const levelTag = {
|
|
119
|
-
display: "flex justify-center items-center",
|
|
120
|
-
textStyles: "text-center",
|
|
121
|
-
variableStyle: `text-center text-xs font-bold ${getStylefromLevel(info.level, "textcolor")}`,
|
|
122
|
-
backgrounds: getStylefromLevel(info.level, "bgcolor"),
|
|
123
|
-
sizes: isXS
|
|
124
|
-
? "rounded-md w-fit h-fit px-2 py-1"
|
|
125
|
-
: "rounded-md w-full h-full",
|
|
126
|
-
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
127
|
-
};
|
|
128
|
-
return (_jsxs("div", { className: "flex flex-row w-full h-fit mt-5 gap-5", children: [_jsxs("div", { className: cn(cardWrapper), children: [_jsxs("div", { className: "flex flex-row justify-between items-center pb-1 w-full h-fit border-b-2 border-green-dark", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate font-bold text-green-dark", children: [info.name, " ", info.nickname && _jsxs("span", { children: [" \u00A0/ ", info.nickname] })] }), _jsx("div", { className: "flex flex-[1] text-sm", children: info.birthday })] }), _jsx("div", { className: "w-fit h-full xs:block hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) })] }), _jsx("div", {}), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit mt-2", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC218\uD5D8\uBC88\uD638:" }), _jsx("div", { className: "flex flex-[3]", children: info.code })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC2DC\uD5D8\uC77C:" }), _jsx("div", { className: "flex flex-[3]", children: info.examDate })] })] }), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC720\uD6A8\uAE30\uAC04:" }), _jsx("div", { className: "flex flex-[3]", children: info.examValidAt })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC218\uD5D8\uBC88\uD638:" }), _jsx("div", { className: "flex flex-[3]", children: info.examDate })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [info.qrSrc && _jsx(QRCode, { value: info.qrSrc, className: "w-full h-full" }), _jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center ", children: _jsx("img", { src: "/images/img-favicon-main.png", alt: "", className: "size-8" }) }), info.qrSrc && (_jsx("div", { className: cn(copyButtonWrapper), children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex justify-center items-center ", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-green-dark", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" }) }) }), _jsx("div", { className: cn(copyButton), onClick: () => copyToClipboard(info.qrSrc), children: "\uACF5\uC720\uD558\uAE30" })] }) }))] }), _jsxs("div", { className: "flex flex-col shrink-0", children: [_jsxs("div", { className: cn(imgBox), children: [_jsx("img", { src: info.imgSrc, alt: "", className: "object-cover w-full h-auto" }), _jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-jr-blue/50", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) }) })] }), !isXS && (_jsx("div", { className: "w-full h-full mt-3 flex", children: _jsx("div", { className: "w-full h-full block xs:hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) }) }))] })] }));
|
|
129
|
-
}
|
|
130
29
|
function ResultCard({ result }) {
|
|
131
30
|
const cardWrapper = {
|
|
132
31
|
displays: "flex flex-col self-auto flex-[2] md:flex-[1] overflow-hidden",
|
|
@@ -202,16 +101,7 @@ function HonorCard({ result }) {
|
|
|
202
101
|
? "축하합니다! 명예의 전당에 등재되었습니다"
|
|
203
102
|
: "아쉽게도 명예의 전당에 오르지 못했습니다." })] }));
|
|
204
103
|
}
|
|
205
|
-
function
|
|
206
|
-
const cellAnimation = {
|
|
207
|
-
animations: "hover:bg-green-light/50 hover:text-green-dark duration-300",
|
|
208
|
-
};
|
|
209
|
-
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg mt-5 print:border print:border-gray-medium/70 cursor-default shadow-main print:shadow-none", children: _jsxs("div", { className: "min-w-[172mm] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-medium text-sm", children: [_jsx("div", { className: "text-center print:static sticky left-0 bg-green-dark p-2 flex-[3] font-black", children: "\uC131\uC801\uD45C" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uCD1D\uC810" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uB0B4 \uC810\uC218" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC804\uAD6D\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC9C0\uC5ED\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uB3D9\uC77C\uD559\uB144" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "10% \uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "30% \uD3C9\uADE0" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section1" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section1.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section1.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section1.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section2" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section2.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section2.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section2.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1 font-bold", children: data.analysis["10percentageAverage"].toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center font-bold", children: data.analysis["30percentageAverage"].toFixed(2) })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "total" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: (data.analysis.total.section1 + data.analysis.total.section2).toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: (data.analysis.user.section1 + data.analysis.user.section2).toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.nationalAverage.section1 +
|
|
210
|
-
data.analysis.nationalAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.localAverage.section1 +
|
|
211
|
-
data.analysis.localAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.ageAverage.section1 +
|
|
212
|
-
data.analysis.ageAverage.section2).toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center " })] })] }) }));
|
|
213
|
-
}
|
|
214
|
-
function PerformanceCard({ data }) {
|
|
104
|
+
function PerformanceCard({ data, info, }) {
|
|
215
105
|
const cardWrapper = {
|
|
216
106
|
displays: "flex flex-col relative",
|
|
217
107
|
sizes: "w-full rounded-lg overflow-hidden",
|
|
@@ -227,82 +117,64 @@ function PerformanceCard({ data }) {
|
|
|
227
117
|
const scriptStyling = {
|
|
228
118
|
display: "justify-start items-start",
|
|
229
119
|
sizes: "w-full h-fit",
|
|
230
|
-
spacings: "p-5",
|
|
231
120
|
textStyles: "text-xs font-medium text-black break-keep",
|
|
232
121
|
};
|
|
233
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "Performance Evaluation" }) }), _jsxs("div", { className: "w-full h-full flex flex-col
|
|
122
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "Performance Evaluation" }) }), _jsxs("div", { className: "w-full h-full flex flex-col gap-5 p-5", children: [_jsxs("div", { className: "flex flex-col flex-[3]", children: [_jsx(LineBreaks, { texts: data.script.performanceEvaluation, className: cn(scriptStyling) }), _jsx("div", { className: cn(scriptStyling, "text-green-dark"), children: "\uB098\uC758 \uC804\uAD6D \uC9C0\uD45C\uAC00 \uAD81\uAE08\uD558\uB2E4\uBA74? QR\uB85C \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uC138\uC694!" })] }), _jsx("div", { className: "w-full flex flex-col flex-[2] justify-center items-center", children: _jsx(LevelRow, { transcriptLevel: info.level }) })] })] }));
|
|
234
123
|
}
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
bg: "bg-green-light",
|
|
246
|
-
textStyles: "text-green-dark font-medium text-sm",
|
|
247
|
-
};
|
|
248
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsx(SectionBarSet, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, script: data.script.section1, scale: 10 }), _jsx(SectionBarSet, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, script: data.script.section2, scale: 10 })] })] }));
|
|
124
|
+
function LevelRow({ transcriptLevel }) {
|
|
125
|
+
const levels = ["CC", "PS", "ST", "BA", "JR", "HJ", "AD"];
|
|
126
|
+
const isSM = useResponsive("sm");
|
|
127
|
+
return (_jsx("div", { className: "flex flex-row w-full h-fit justify-center items-center", children: levels.map((level) => {
|
|
128
|
+
const { name, bgcolor, textcolor } = LevelToStyleMap[level];
|
|
129
|
+
const isHighlighted = level === transcriptLevel;
|
|
130
|
+
return (_jsx("div", { className: `px-2 py-1 text-xs text-center font-medium $ ${isHighlighted
|
|
131
|
+
? "bg-green-dark text-white w-fit shrink-0 rounded-md"
|
|
132
|
+
: "w-full text-green-dark/70"}`, children: isSM ? name : isHighlighted ? name : level }, level));
|
|
133
|
+
}) }));
|
|
249
134
|
}
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
const widthPercentage = (score / total) * 100;
|
|
254
|
-
const subScorePercentage = subScore ? (subScore / total) * 100 : undefined;
|
|
255
|
-
useEffect(() => {
|
|
256
|
-
if (isLoaded) {
|
|
257
|
-
let width = 0;
|
|
258
|
-
const interval = setInterval(() => {
|
|
259
|
-
width += 1;
|
|
260
|
-
if (width >= widthPercentage) {
|
|
261
|
-
clearInterval(interval);
|
|
262
|
-
setCurrentWidth(widthPercentage);
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
setCurrentWidth(width);
|
|
266
|
-
}
|
|
267
|
-
}, 10); // 속도 조정 가능
|
|
268
|
-
}
|
|
269
|
-
}, [isLoaded, widthPercentage]);
|
|
270
|
-
const setWrapper = {
|
|
271
|
-
displays: "flex flex-col sm:flex-row justify-center items-center",
|
|
272
|
-
sizes: "w-full h-fit",
|
|
273
|
-
spacings: "p-5 gap-5",
|
|
274
|
-
};
|
|
275
|
-
const bar = {
|
|
276
|
-
displays: "relative flex flex-row justify-start",
|
|
277
|
-
sizes: "w-full h-4 rounded-full",
|
|
278
|
-
backgroudns: "bg-gray-light print:bg-gray-medium/80 ",
|
|
279
|
-
spacings: "my-auto",
|
|
280
|
-
};
|
|
281
|
-
const barFill = {
|
|
282
|
-
sizes: "h-full rounded-full",
|
|
283
|
-
animations: "transition-all duration-500 ease-out",
|
|
284
|
-
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark shadow-green",
|
|
285
|
-
printOptions: "print:shadow-none",
|
|
286
|
-
};
|
|
287
|
-
const scoreTag = {
|
|
288
|
-
sizes: "h-5 w-10 rounded-md",
|
|
289
|
-
position: "-translate-x-14 -translate-y-2",
|
|
290
|
-
backgrounds: "bg-white border-2 border-green-dark",
|
|
291
|
-
textStyles: "font-bold text-xs text-center text-green-dark",
|
|
292
|
-
};
|
|
293
|
-
const subScoreTag = {
|
|
294
|
-
sizes: "h-5 w-fit rounded-md flex flex-row gap-2",
|
|
295
|
-
position: "-translate-x-30 translate-y-6",
|
|
135
|
+
function ScoreCard({ data }) {
|
|
136
|
+
const cellAnimation = {
|
|
137
|
+
animations: "hover:bg-green-light/50 hover:text-green-dark duration-300",
|
|
296
138
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
} }) }), _jsx("div", { className: cn(barFill, "opacity-100 print:opacity-0"), style: {
|
|
302
|
-
width: `${currentWidth}%`,
|
|
303
|
-
} }), _jsx("div", { className: "absolute w-full text-green-dark -translate-y-12 font-bold text-sm h-fit text-center", children: title })] }), _jsx("div", { className: "absolute flex w-full h-full justify-between items-center p-5 text-sm text-gray-medium -translate-y-5", children: scaleTicks.map((tick) => (_jsx("div", { children: tick }, tick))) }), _jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
304
|
-
transform: `translateX(${widthPercentage}%)`,
|
|
305
|
-
}, children: _jsx("div", { className: cn(scoreTag), children: score.toFixed(1) }) }), subScore && (_jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
306
|
-
transform: `translateX(${subScorePercentage}%)`,
|
|
307
|
-
}, children: _jsxs("div", { className: cn(subScoreTag), children: [_jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: "\uC804\uCCB4\uD3C9\uADE0:" }), _jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: subScore.toFixed(2) }), _jsx("div", { className: "text-green-dark", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-4", children: _jsx("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm.53 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v5.69a.75.75 0 0 0 1.5 0v-5.69l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z", clipRule: "evenodd" }) }) })] }) }))] }), _jsx("div", { className: "w-full h-full flex-[1] text-sm sm:text-xs", children: script })] }));
|
|
139
|
+
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg mt-5 print:border print:border-gray-medium/70 cursor-default shadow-main print:shadow-none", children: _jsxs("div", { className: "min-w-[172mm] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-medium text-sm", children: [_jsx("div", { className: "text-center print:static sticky left-0 bg-green-dark p-2 flex-[3] font-black", children: "\uC131\uC801\uD45C" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uCD1D\uC810" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uB0B4 \uC810\uC218" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC804\uAD6D\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC9C0\uC5ED\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uB3D9\uC77C\uD559\uB144" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "10% \uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "30% \uD3C9\uADE0" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section1" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section1.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section1.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section1.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section2" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section2.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section2.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section2.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1 font-bold", children: data.analysis["10percentageAverage"].toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center font-bold", children: data.analysis["30percentageAverage"].toFixed(2) })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "total" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: (data.analysis.total.section1 + data.analysis.total.section2).toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: (data.analysis.user.section1 + data.analysis.user.section2).toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.nationalAverage.section1 +
|
|
140
|
+
data.analysis.nationalAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.localAverage.section1 +
|
|
141
|
+
data.analysis.localAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.ageAverage.section1 +
|
|
142
|
+
data.analysis.ageAverage.section2).toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center " })] })] }) }));
|
|
308
143
|
}
|
|
144
|
+
export const LevelToStyleMap = {
|
|
145
|
+
CC: {
|
|
146
|
+
name: "Cocoon",
|
|
147
|
+
bgcolor: "bg-co-green-light",
|
|
148
|
+
textcolor: "text-co-green",
|
|
149
|
+
},
|
|
150
|
+
PS: {
|
|
151
|
+
name: "Pre-Starter",
|
|
152
|
+
bgcolor: "bg-ps-pink-light",
|
|
153
|
+
textcolor: "text-ps-pink",
|
|
154
|
+
},
|
|
155
|
+
ST: {
|
|
156
|
+
name: "Starter",
|
|
157
|
+
bgcolor: "bg-st-orange-light",
|
|
158
|
+
textcolor: "text-st-orange",
|
|
159
|
+
},
|
|
160
|
+
BA: {
|
|
161
|
+
name: "Basic",
|
|
162
|
+
bgcolor: "bg-ba-yellow-light",
|
|
163
|
+
textcolor: "text-ba-yellow",
|
|
164
|
+
},
|
|
165
|
+
JR: {
|
|
166
|
+
name: "Junior",
|
|
167
|
+
bgcolor: "bg-jr-blue-light",
|
|
168
|
+
textcolor: "text-jr-blue",
|
|
169
|
+
},
|
|
170
|
+
HJ: {
|
|
171
|
+
name: "High Junior",
|
|
172
|
+
bgcolor: "bg-hj-blue-light",
|
|
173
|
+
textcolor: "text-hj-blue",
|
|
174
|
+
},
|
|
175
|
+
AD: {
|
|
176
|
+
name: "Advanced",
|
|
177
|
+
bgcolor: "bg-gray-light",
|
|
178
|
+
textcolor: "text-gray-dark",
|
|
179
|
+
},
|
|
180
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
export function CardTitle({ title }) {
|
|
4
|
+
const cardTitle = {
|
|
5
|
+
display: "flex flex-row justify-center items-center",
|
|
6
|
+
sizes: "h-7 shrink-0 w-full",
|
|
7
|
+
bg: "bg-green-light",
|
|
8
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
9
|
+
};
|
|
10
|
+
return _jsx("div", { className: cn(cardTitle), children: title });
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TranscriptProps } from "../Transcript";
|
|
2
|
+
export declare const EXAM_TYPE: {
|
|
3
|
+
readonly REG: "REG";
|
|
4
|
+
readonly CMP: "CMP";
|
|
5
|
+
readonly IST: "IST";
|
|
6
|
+
readonly OLY: "OLY";
|
|
7
|
+
};
|
|
8
|
+
export type EXAM_TYPE = (typeof EXAM_TYPE)[keyof typeof EXAM_TYPE];
|
|
9
|
+
export declare function getStringfromType(ExamType: EXAM_TYPE): string;
|
|
10
|
+
export default function IdCard({ info }: {
|
|
11
|
+
info: TranscriptProps["info"];
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useResponsive } from "../../../../../hook";
|
|
4
|
+
import { cn, copyToClipboard } from "../../../../../util";
|
|
5
|
+
import { LevelToStyleMap } from "../Transcript.design";
|
|
6
|
+
import QRCode from "react-qr-code";
|
|
7
|
+
export const EXAM_TYPE = {
|
|
8
|
+
REG: "REG",
|
|
9
|
+
CMP: "CMP",
|
|
10
|
+
IST: "IST",
|
|
11
|
+
OLY: "OLY",
|
|
12
|
+
};
|
|
13
|
+
function getStylefromLevel(level, field) {
|
|
14
|
+
return LevelToStyleMap[level]?.[field] || "Unknown";
|
|
15
|
+
}
|
|
16
|
+
const examTypeMap = {
|
|
17
|
+
REG: "정기시험",
|
|
18
|
+
IST: "기관시험",
|
|
19
|
+
CMP: "경시대회",
|
|
20
|
+
};
|
|
21
|
+
export function getStringfromType(ExamType) {
|
|
22
|
+
return examTypeMap[ExamType] || "Unknown";
|
|
23
|
+
}
|
|
24
|
+
export default function IdCard({ info }) {
|
|
25
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
26
|
+
const togglecard = () => setIsExpanded(!isExpanded);
|
|
27
|
+
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
28
|
+
const isXS = useResponsive("xs");
|
|
29
|
+
const cardWrapper = {
|
|
30
|
+
displays: "flex flex-col self-auto overflow-hidden",
|
|
31
|
+
sizes: "w-full rounded-lg h-fit",
|
|
32
|
+
backgrounds: "bg-white shadow-main",
|
|
33
|
+
spacings: "p-3",
|
|
34
|
+
printOptions: "print:bg-white print:shadow-none",
|
|
35
|
+
};
|
|
36
|
+
const imgBox = {
|
|
37
|
+
displays: "relative shrink-0 overflow-hidden",
|
|
38
|
+
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
39
|
+
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
40
|
+
outlines: "border-2 border-slate-200",
|
|
41
|
+
};
|
|
42
|
+
const qrBox = {
|
|
43
|
+
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
44
|
+
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
45
|
+
textStyles: "text-jr-blue",
|
|
46
|
+
backgrounds: "bg-white print:border-2 print:border-green-dark",
|
|
47
|
+
groupAction: "group duration-300 hover:scale-110",
|
|
48
|
+
};
|
|
49
|
+
const copyButtonWrapper = {
|
|
50
|
+
display: "absolute flex justify-center items-center",
|
|
51
|
+
positions: "top-0 left-0",
|
|
52
|
+
sizes: "h-full w-full backdrop-blur-sm",
|
|
53
|
+
graphics: "opacity-0 bg-white/80 ",
|
|
54
|
+
animations: "duration-300 group-hover:opacity-100",
|
|
55
|
+
};
|
|
56
|
+
const copyButton = {
|
|
57
|
+
displays: "flex justify-center items-center",
|
|
58
|
+
sizes: "w-20 h-8 rounded-lg",
|
|
59
|
+
colors: "bg-green-light border border-green-dark",
|
|
60
|
+
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
61
|
+
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
62
|
+
};
|
|
63
|
+
const levelTag = {
|
|
64
|
+
display: "flex justify-center items-center",
|
|
65
|
+
textStyles: "text-center",
|
|
66
|
+
variableStyle: `text-center text-xs font-bold ${getStylefromLevel(info.level, "textcolor")}`,
|
|
67
|
+
backgrounds: getStylefromLevel(info.level, "bgcolor"),
|
|
68
|
+
sizes: isXS
|
|
69
|
+
? "rounded-md w-fit h-fit px-2 py-1"
|
|
70
|
+
: "rounded-md w-full h-full",
|
|
71
|
+
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
72
|
+
};
|
|
73
|
+
return (_jsxs("div", { className: "flex flex-row w-full h-fit mt-5 gap-5", children: [_jsxs("div", { className: cn(cardWrapper), children: [_jsxs("div", { className: "flex flex-row justify-between items-center pb-1 w-full h-fit border-b-2 border-green-dark", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate font-bold text-green-dark", children: [info.name, " ", info.nickname && _jsxs("span", { children: [" \u00A0/ ", info.nickname] })] }), _jsx("div", { className: "flex flex-[1] text-sm", children: info.birthday })] }), _jsx("div", { className: "w-fit h-full xs:block hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) })] }), _jsx("div", {}), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit mt-2", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC218\uD5D8\uBC88\uD638:" }), _jsx("div", { className: "flex flex-[3]", children: info.code })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC2DC\uD5D8\uC77C:" }), _jsx("div", { className: "flex flex-[3]", children: info.examDate })] })] }), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC720\uD6A8\uAE30\uAC04:" }), _jsx("div", { className: "flex flex-[3]", children: info.examValidAt })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC2DC\uD5D8\uD68C\uCC28:" }), _jsx("div", { className: "flex flex-[3]", children: info.examName })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [info.qrSrc && _jsx(QRCode, { value: info.qrSrc, className: "w-full h-full" }), _jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center ", children: _jsx("img", { src: "/images/img-favicon-main.png", alt: "", className: "size-8" }) }), info.qrSrc && (_jsx("div", { className: cn(copyButtonWrapper), children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex justify-center items-center ", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-green-dark", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" }) }) }), _jsx("div", { className: cn(copyButton), onClick: () => copyToClipboard(info.qrSrc), children: "\uACF5\uC720\uD558\uAE30" })] }) }))] }), _jsxs("div", { className: "flex flex-col shrink-0", children: [_jsxs("div", { className: cn(imgBox), children: [_jsx("img", { src: info.imgSrc, alt: "", className: "object-cover w-full h-auto" }), _jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-jr-blue/50", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) }) })] }), !isXS && (_jsx("div", { className: "w-full h-full mt-3 flex", children: _jsx("div", { className: "w-full h-full block xs:hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) }) }))] })] }));
|
|
74
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface SectionBarProps {
|
|
2
|
+
title: string;
|
|
3
|
+
score: number;
|
|
4
|
+
subScore?: number;
|
|
5
|
+
total: number;
|
|
6
|
+
scale?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function BarGraph({ score, subScore, total, title, scale, }: SectionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { usePageLoaded } from "../../../../../hook";
|
|
4
|
+
import { cn } from "../../../../../util";
|
|
5
|
+
export function BarGraph({ score, subScore, total, title, scale, }) {
|
|
6
|
+
const isLoaded = usePageLoaded();
|
|
7
|
+
const [currentWidth, setCurrentWidth] = useState(0);
|
|
8
|
+
const widthPercentage = (score / total) * 100;
|
|
9
|
+
const subScorePercentage = subScore ? (subScore / total) * 100 : undefined;
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (isLoaded) {
|
|
12
|
+
let width = 0;
|
|
13
|
+
const interval = setInterval(() => {
|
|
14
|
+
width += 1;
|
|
15
|
+
if (width >= widthPercentage) {
|
|
16
|
+
clearInterval(interval);
|
|
17
|
+
setCurrentWidth(widthPercentage);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setCurrentWidth(width);
|
|
21
|
+
}
|
|
22
|
+
}, 10); // 속도 조정 가능
|
|
23
|
+
}
|
|
24
|
+
}, [isLoaded, widthPercentage]);
|
|
25
|
+
const setWrapper = {
|
|
26
|
+
displays: "flex flex-col sm:flex-row justify-center items-center",
|
|
27
|
+
sizes: "w-full h-fit",
|
|
28
|
+
spacings: "p-5 gap-5",
|
|
29
|
+
};
|
|
30
|
+
const bar = {
|
|
31
|
+
displays: "relative flex flex-row justify-start",
|
|
32
|
+
sizes: "w-full h-4 rounded-full",
|
|
33
|
+
backgroudns: "bg-gray-light print:bg-green-light",
|
|
34
|
+
spacings: "my-auto",
|
|
35
|
+
};
|
|
36
|
+
const barFill = {
|
|
37
|
+
sizes: "h-full rounded-full",
|
|
38
|
+
animations: "transition-all duration-500 ease-out",
|
|
39
|
+
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark shadow-green",
|
|
40
|
+
printOptions: "print:shadow-none",
|
|
41
|
+
};
|
|
42
|
+
const scoreTag = {
|
|
43
|
+
sizes: "h-5 w-10 rounded-md",
|
|
44
|
+
position: "-translate-x-14 -translate-y-2",
|
|
45
|
+
backgrounds: "bg-white border-2 border-green-dark",
|
|
46
|
+
textStyles: "font-bold text-xs text-center text-green-dark",
|
|
47
|
+
};
|
|
48
|
+
const subScoreTag = {
|
|
49
|
+
sizes: "h-5 w-fit rounded-md flex flex-row gap-2",
|
|
50
|
+
position: "-translate-x-30 translate-y-6",
|
|
51
|
+
};
|
|
52
|
+
// 눈금 배열 생성
|
|
53
|
+
const scaleTicks = scale
|
|
54
|
+
? Array.from({ length: total / scale + 1 }, (_, index) => index * scale)
|
|
55
|
+
: undefined;
|
|
56
|
+
return (_jsx("div", { className: cn(setWrapper), children: _jsxs("div", { className: "relative w-full h-20 flex flex-[1] justify-center items-center px-5 pt-8 pb-2 overflow-visible", children: [_jsxs("div", { className: cn(bar), children: [_jsx("div", { className: "absolute top-0 left-0 w-full h-full flex", children: _jsx("div", { className: cn(barFill, "duration-0 opacity-0 print:opacity-100"), style: {
|
|
57
|
+
width: `${widthPercentage}%`,
|
|
58
|
+
} }) }), _jsx("div", { className: cn(barFill, "opacity-100 print:opacity-0"), style: {
|
|
59
|
+
width: `${currentWidth}%`,
|
|
60
|
+
} }), _jsx("div", { className: "absolute w-full text-green-dark -translate-y-12 font-bold text-sm h-fit text-center", children: title })] }), _jsx("div", { className: "absolute flex w-full h-full justify-between items-center p-5 text-sm text-gray-medium -translate-y-5", children: scaleTicks && scaleTicks.map((tick) => _jsx("div", { children: tick }, tick)) }), _jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
61
|
+
transform: `translateX(${widthPercentage}%)`,
|
|
62
|
+
}, children: _jsx("div", { className: cn(scoreTag), children: score.toFixed(1) }) }), subScore && (_jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
63
|
+
transform: `translateX(${subScorePercentage}%)`,
|
|
64
|
+
}, children: _jsxs("div", { className: cn(subScoreTag), children: [_jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: "\uC804\uCCB4\uD3C9\uADE0:" }), _jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: subScore.toFixed(2) }), _jsx("div", { className: "text-green-dark", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-4", children: _jsx("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm.53 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v5.69a.75.75 0 0 0 1.5 0v-5.69l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z", clipRule: "evenodd" }) }) })] }) }))] }) }));
|
|
65
|
+
}
|
package/package.json
CHANGED
package/style/size.js
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -98,7 +98,8 @@ export default {
|
|
|
98
98
|
"silver-pale": "#DFD8CA",
|
|
99
99
|
|
|
100
100
|
// Brand Colors
|
|
101
|
-
"
|
|
101
|
+
"co-green": "#4FCA3E",
|
|
102
|
+
"co-green-light": "#DCF4D8",
|
|
102
103
|
"ps-pink": "#E3006E",
|
|
103
104
|
"ps-pink-light": "#FFBADB",
|
|
104
105
|
"st-orange": "#ED6A00",
|
|
@@ -109,6 +110,8 @@ export default {
|
|
|
109
110
|
"jr-blue-light": "#D6EEFF",
|
|
110
111
|
"hj-blue": "#385EAB",
|
|
111
112
|
"hj-blue-light": "#A8BFE5",
|
|
113
|
+
"ad-gray": "#4C4C4C",
|
|
114
|
+
"ad-gray-light": "#F0F0F0",
|
|
112
115
|
// Gradation Colors
|
|
113
116
|
},
|
|
114
117
|
maxHeight: {
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.187
|