@edu-tosel/design 1.0.224 → 1.0.227
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/Transcript/design/Transcript.design.js +1 -2
- package/layout/template/Transcript/design/TranscriptAdvanced.design.js +54 -3
- package/layout/template/Transcript/design/organism/PersonalCard.d.ts +1 -0
- package/layout/template/Transcript/design/organism/PersonalCard.js +4 -0
- package/package.json +1 -1
- package/tailwind.config.ts +2 -1
- package/version.txt +1 -1
- package/layout/template/Transcript/design/organism/IdCard.organism.d.ts +0 -4
- package/layout/template/Transcript/design/organism/IdCard.organism.js +0 -57
|
@@ -11,7 +11,6 @@ import { MIChart } from "./molecule/MIChart";
|
|
|
11
11
|
import { IntelligenceCard } from "./organism/IntelligenceCard";
|
|
12
12
|
import { SectionRadarCard } from "./organism/SectionRadarCard";
|
|
13
13
|
import { NationalPositionCard } from "./organism/NationalPositionCard";
|
|
14
|
-
import IdCard from "./organism/IdCard.organism";
|
|
15
14
|
export const EXAM_TYPE = {
|
|
16
15
|
REG: "REG",
|
|
17
16
|
CMP: "CMP",
|
|
@@ -42,7 +41,7 @@ function TranscriptDesign({ props }, ref) {
|
|
|
42
41
|
spacings: "px-5 py-2",
|
|
43
42
|
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
44
43
|
};
|
|
45
|
-
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(
|
|
44
|
+
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(NationalPositionCard, { result: result }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(ResultGaugeCard, { result: result, theme: "green" }), _jsx(HonorCard, { result: result })] }), _jsx(PerformanceCard, { data: data, info: info }), _jsx(ScoreCard, { data: data }), _jsx(BarCardRow, { section1: section1Data, section2: section2Data, theme: "green" }), _jsx(SectionRadarCard, { data: data, section: "section1", info: info, theme: "red" }), _jsx(SectionRadarCard, { data: data, section: "section2", info: info, theme: "red" }), _jsx(IntelligenceCard, { data: data.multipleIntelligence, theme: "green" }), _jsx(MIChart, {})] }));
|
|
46
45
|
}
|
|
47
46
|
export default forwardRef(TranscriptDesign);
|
|
48
47
|
function SectionBarGraphProps(title, score, total, script, subScripts, scale, subScore) {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { paperSize } from "../../../../style/size";
|
|
4
|
-
import { cn } from "../../../../util";
|
|
5
|
-
import IdCard from "./organism/IdCard.organism";
|
|
6
4
|
import { BarCardCol } from "./organism/BarCardCol";
|
|
7
5
|
import { RadarCard } from "./organism/RadarCard";
|
|
8
6
|
import { OCICard } from "./organism/OCICard";
|
|
9
7
|
import { OCIChart } from "./molecule/OCIChart";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { useResponsive } from "../../../../hook";
|
|
10
|
+
import { cn, copyToClipboard } from "../../../../util";
|
|
11
|
+
import QRCode from "react-qr-code";
|
|
12
|
+
import { GetStyleFromLevel } from "./atom/GetStyleFromLevel";
|
|
10
13
|
function TranscriptDesign({ props }, ref) {
|
|
11
14
|
const { info, score, lswr, oci } = props;
|
|
12
15
|
const section1Score = score.result.part1 +
|
|
@@ -39,7 +42,55 @@ function TranscriptDesign({ props }, ref) {
|
|
|
39
42
|
spacings: "px-5 py-2",
|
|
40
43
|
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
41
44
|
};
|
|
42
|
-
|
|
45
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
46
|
+
const togglecard = () => setIsExpanded(!isExpanded);
|
|
47
|
+
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
48
|
+
const isXS = useResponsive("xs");
|
|
49
|
+
const cardWrapper = {
|
|
50
|
+
displays: "flex flex-col self-auto overflow-hidden",
|
|
51
|
+
sizes: "w-full rounded-lg h-fit",
|
|
52
|
+
backgrounds: "bg-white shadow-main",
|
|
53
|
+
spacings: "p-3",
|
|
54
|
+
printOptions: "print:bg-white print:shadow-none",
|
|
55
|
+
};
|
|
56
|
+
const imgBox = {
|
|
57
|
+
displays: "relative shrink-0 overflow-hidden",
|
|
58
|
+
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
59
|
+
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
60
|
+
outlines: "border-2 border-slate-200",
|
|
61
|
+
};
|
|
62
|
+
const qrBox = {
|
|
63
|
+
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
64
|
+
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
65
|
+
textStyles: "text-jr-blue",
|
|
66
|
+
backgrounds: info.qrSrc && "print:border-2 print:border-green-dark",
|
|
67
|
+
groupAction: info.qrSrc && "group duration-300 hover:scale-110 bg-white",
|
|
68
|
+
};
|
|
69
|
+
const copyButtonWrapper = {
|
|
70
|
+
display: "absolute flex justify-center items-center",
|
|
71
|
+
positions: "top-0 left-0",
|
|
72
|
+
sizes: "h-full w-full backdrop-blur-sm",
|
|
73
|
+
graphics: "opacity-0 bg-white/80 ",
|
|
74
|
+
animations: "duration-300 group-hover:opacity-100",
|
|
75
|
+
};
|
|
76
|
+
const copyButton = {
|
|
77
|
+
displays: "flex justify-center items-center",
|
|
78
|
+
sizes: "w-20 h-8 rounded-lg",
|
|
79
|
+
colors: "bg-green-light border border-green-dark",
|
|
80
|
+
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
81
|
+
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
82
|
+
};
|
|
83
|
+
const levelTag = {
|
|
84
|
+
display: "flex justify-center items-center",
|
|
85
|
+
textStyles: "text-center",
|
|
86
|
+
variableStyle: `text-center text-xs font-bold ${GetStyleFromLevel(info.level, "textcolor")}`,
|
|
87
|
+
backgrounds: GetStyleFromLevel(info.level, "bgcolor"),
|
|
88
|
+
sizes: isXS
|
|
89
|
+
? "rounded-md w-fit h-fit px-2 py-1"
|
|
90
|
+
: "rounded-md w-full h-full",
|
|
91
|
+
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
92
|
+
};
|
|
93
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "https://resource.tosel.co.kr/images/header-logo2.png", alt: "\uD1A0\uC140 \uB85C\uACE0", className: "h-10 py-1" }), _jsx("div", { className: "text-white font-bold text-base", children: "Official Score Report" })] }), _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") }) })] }), _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 font-bold", 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 font-bold", 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 font-bold", 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 font-bold", children: "\uC2DC\uD5D8\uD68C\uCC28:" }), _jsx("div", { className: "flex flex-3", children: info.examName })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [!info.qrSrc && (_jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center", children: _jsx("img", { src: "https://resource.tosel.co.kr/images/logo-itc-classic.png", alt: "" }) })), info.qrSrc && (_jsxs(_Fragment, { children: [_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" }) }), _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-auto h-full" }), _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") }) }) }))] })] }), _jsx(BarCardCol, { section1: section1Data, section2: section2Data, theme: "red" }), _jsx(RadarCard, { data: lswr, theme: "red", title: "Section Scores" }), _jsxs("div", { className: cn("page-break"), children: [_jsx("div", { className: "w-full h-5 print:block" }), _jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "https://resource.tosel.co.kr/images/header-logo2.png", alt: "\uD1A0\uC140 \uB85C\uACE0", className: "h-10 py-1" }), _jsx("div", { className: "text-white font-bold text-base", children: "Occupational Competency Index Report" })] }), _jsx(OCICard, { data: oci }), _jsx(OCIChart, {})] })] }) }));
|
|
43
94
|
}
|
|
44
95
|
function SectionBarGraphProps(title, score, total, script, subScripts, scale, subScore) {
|
|
45
96
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PersonalCard(): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.227
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useResponsive } from "../../../../../hook";
|
|
4
|
-
import { cn, copyToClipboard } from "../../../../../util";
|
|
5
|
-
import QRCode from "react-qr-code";
|
|
6
|
-
import { GetStyleFromLevel } from "../atom/GetStyleFromLevel";
|
|
7
|
-
export default function IdCard({ info }) {
|
|
8
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
|
-
const togglecard = () => setIsExpanded(!isExpanded);
|
|
10
|
-
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
11
|
-
const isXS = useResponsive("xs");
|
|
12
|
-
const cardWrapper = {
|
|
13
|
-
displays: "flex flex-col self-auto overflow-hidden",
|
|
14
|
-
sizes: "w-full rounded-lg h-fit",
|
|
15
|
-
backgrounds: "bg-white shadow-main",
|
|
16
|
-
spacings: "p-3",
|
|
17
|
-
printOptions: "print:bg-white print:shadow-none",
|
|
18
|
-
};
|
|
19
|
-
const imgBox = {
|
|
20
|
-
displays: "relative shrink-0 overflow-hidden",
|
|
21
|
-
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
22
|
-
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
23
|
-
outlines: "border-2 border-slate-200",
|
|
24
|
-
};
|
|
25
|
-
const qrBox = {
|
|
26
|
-
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
27
|
-
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
28
|
-
textStyles: "text-jr-blue",
|
|
29
|
-
backgrounds: info.qrSrc && "print:border-2 print:border-green-dark",
|
|
30
|
-
groupAction: info.qrSrc && "group duration-300 hover:scale-110 bg-white",
|
|
31
|
-
};
|
|
32
|
-
const copyButtonWrapper = {
|
|
33
|
-
display: "absolute flex justify-center items-center",
|
|
34
|
-
positions: "top-0 left-0",
|
|
35
|
-
sizes: "h-full w-full backdrop-blur-sm",
|
|
36
|
-
graphics: "opacity-0 bg-white/80 ",
|
|
37
|
-
animations: "duration-300 group-hover:opacity-100",
|
|
38
|
-
};
|
|
39
|
-
const copyButton = {
|
|
40
|
-
displays: "flex justify-center items-center",
|
|
41
|
-
sizes: "w-20 h-8 rounded-lg",
|
|
42
|
-
colors: "bg-green-light border border-green-dark",
|
|
43
|
-
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
44
|
-
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
45
|
-
};
|
|
46
|
-
const levelTag = {
|
|
47
|
-
display: "flex justify-center items-center",
|
|
48
|
-
textStyles: "text-center",
|
|
49
|
-
variableStyle: `text-center text-xs font-bold ${GetStyleFromLevel(info.level, "textcolor")}`,
|
|
50
|
-
backgrounds: GetStyleFromLevel(info.level, "bgcolor"),
|
|
51
|
-
sizes: isXS
|
|
52
|
-
? "rounded-md w-fit h-fit px-2 py-1"
|
|
53
|
-
: "rounded-md w-full h-full",
|
|
54
|
-
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
55
|
-
};
|
|
56
|
-
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") }) })] }), _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 font-bold", 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 font-bold", 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 font-bold", 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 font-bold", children: "\uC2DC\uD5D8\uD68C\uCC28:" }), _jsx("div", { className: "flex flex-[3]", children: info.examName })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [!info.qrSrc && (_jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center", children: _jsx("img", { src: "https://resource.tosel.co.kr/images/logo-itc-classic.png", alt: "" }) })), info.qrSrc && (_jsxs(_Fragment, { children: [_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" }) }), _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-auto h-full" }), _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") }) }) }))] })] }));
|
|
57
|
-
}
|