@edu-tosel/design 1.0.214 → 1.0.216

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/asset/SVG.d.ts CHANGED
@@ -8,6 +8,7 @@ import Phone from "./svg/Phone";
8
8
  import Profile from "./svg/Profile";
9
9
  import TOSEL from "./svg/TOSEL";
10
10
  import HallofFame from "./svg/HallofFame";
11
+ import Print from "./svg/Print";
11
12
  declare const SVG: {
12
13
  TOSEL: typeof TOSEL;
13
14
  Close: typeof Close;
@@ -44,6 +45,7 @@ declare const SVG: {
44
45
  RightArrow: ({ onClick }: Operation) => import("react/jsx-runtime").JSX.Element;
45
46
  };
46
47
  Phone: typeof Phone;
48
+ Print: typeof Print;
47
49
  Profile: typeof Profile;
48
50
  Symbol: {
49
51
  LessThan: ({ className, onClick }: import("./svg/Symbol").SymbolProps) => import("react/jsx-runtime").JSX.Element;
package/asset/SVG.js CHANGED
@@ -13,6 +13,7 @@ import TOSEL from "./svg/TOSEL";
13
13
  import Login from "./svg/Login";
14
14
  import Collab from "./svg/Collab";
15
15
  import HallofFame from "./svg/HallofFame";
16
+ import Print from "./svg/Print";
16
17
  const SVG = {
17
18
  TOSEL,
18
19
  Close,
@@ -24,6 +25,7 @@ const SVG = {
24
25
  Notification,
25
26
  Operation,
26
27
  Phone,
28
+ Print,
27
29
  Profile,
28
30
  Symbol,
29
31
  Login,
package/asset/SVG.tsx CHANGED
@@ -13,6 +13,7 @@ import TOSEL from "./svg/TOSEL";
13
13
  import Login from "./svg/Login";
14
14
  import Collab from "./svg/Collab";
15
15
  import HallofFame from "./svg/HallofFame";
16
+ import Print from "./svg/Print";
16
17
 
17
18
  const SVG = {
18
19
  TOSEL,
@@ -25,6 +26,7 @@ const SVG = {
25
26
  Notification,
26
27
  Operation,
27
28
  Phone,
29
+ Print,
28
30
  Profile,
29
31
  Symbol,
30
32
  Login,
@@ -0,0 +1 @@
1
+ export default function Print(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export default function Print() {
3
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "size-6", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Zm-3 0h.008v.008H15V10.5Z" }) }));
4
+ }
@@ -0,0 +1,18 @@
1
+ export default function Print() {
2
+ return (
3
+ <svg
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ fill="none"
6
+ viewBox="0 0 24 24"
7
+ stroke-width="1.5"
8
+ stroke="currentColor"
9
+ className="size-6"
10
+ >
11
+ <path
12
+ stroke-linecap="round"
13
+ stroke-linejoin="round"
14
+ d="M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Zm-3 0h.008v.008H15V10.5Z"
15
+ />
16
+ </svg>
17
+ );
18
+ }
@@ -32,7 +32,7 @@ function Replace({ actions, children }) {
32
32
  .filter(([action]) => action)
33
33
  .map(([flag, Component], index) => {
34
34
  if (typeof flag === "string") {
35
- return events?.some(({ event }) => event === flag) ? (_jsx(_Fragment, { children: Component })) : null;
35
+ return events?.some(({ event }) => event === flag) ? (_jsx(Fragment, { children: Component }, flag)) : null;
36
36
  }
37
37
  return _jsx(Fragment, { children: Component }, index);
38
38
  })
@@ -1,15 +1,52 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
2
3
  import { cn } from "../../../util";
4
+ import SVG from "../../../asset/SVG";
5
+ import gsap from "gsap";
6
+ import { ScrollTrigger } from "gsap/ScrollTrigger";
7
+ gsap.registerPlugin(ScrollTrigger);
3
8
  export default function Layout({ children, buttons, }) {
4
9
  const container = {
5
10
  sizes: "w-full min-h-screen",
6
- displays: "flex flex-col justify-start items-center",
11
+ displays: "flex flex-col justify-start items-center relative",
7
12
  backgrounds: "bg-gray-light",
8
13
  pressures: "p-3.5",
9
14
  };
10
15
  const header = {
11
- displays: "flex",
12
- sizes: "w-full ",
16
+ displays: "absolute top-0 flex flex-col justify-start",
17
+ sizes: "w-full h-auto",
13
18
  };
14
- return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(header), children: buttons?.map(({ title, onClick }) => (_jsx("button", { onClick: onClick, children: title }))) }), children] }));
19
+ const buttonStyles = {
20
+ spacings: "px-4 py-2 rounded-full",
21
+ textStyles: "text-base font-bold text-green-dark",
22
+ backgrounds: "bg-white/30 backdrop-blur-sm",
23
+ graphics: "shadow-main",
24
+ animations: "duration-300 hover:bg-white/100 hover:shadow-green hover:scale-105",
25
+ };
26
+ const containerRef = useRef(null);
27
+ const buttonRef = useRef(null);
28
+ const [containerHeight, setContainerHeight] = useState(null);
29
+ useEffect(() => {
30
+ // 컨테이너 높이 읽기
31
+ if (containerRef.current) {
32
+ const height = containerRef.current.offsetHeight;
33
+ setContainerHeight(height); // 상태에 저장
34
+ console.log("Container height:", height); // 확인용 로그
35
+ }
36
+ // ScrollTrigger 설정
37
+ if (buttonRef.current) {
38
+ ScrollTrigger.create({
39
+ trigger: buttonRef.current,
40
+ start: "top top",
41
+ end: () => `+=${containerHeight || window.innerHeight}`, // 컨테이너 높이 기반
42
+ pin: true,
43
+ pinSpacing: false,
44
+ scrub: false,
45
+ });
46
+ }
47
+ return () => {
48
+ ScrollTrigger.getAll().forEach((trigger) => trigger.kill());
49
+ };
50
+ }, [containerHeight]); // containerHeight가 업데이트되면 재실행
51
+ return (_jsxs("div", { className: cn(container), ref: containerRef, children: [_jsx("div", { className: "mt-20 w-full h-full flex justify-center itmes-center", children: children }), _jsx("div", { className: cn(header), ref: buttonRef, children: _jsx("div", { className: "flex w-full justify-center items-center p-6", children: buttons?.map(({ title, onClick }) => (_jsx("button", { className: cn(buttonStyles), onClick: onClick, children: _jsxs("div", { className: "flex flex-row gap-2", children: [_jsx(SVG.Print, {}), _jsx("div", { children: title })] }) }))) }) })] }));
15
52
  }
@@ -19,6 +19,7 @@ export interface TranscriptProps {
19
19
  score: number;
20
20
  grade: number;
21
21
  isHonor: boolean;
22
+ percentRank: number;
22
23
  };
23
24
  data: {
24
25
  graph: {
@@ -11,6 +11,7 @@ import PerformanceCard from "./organism/PerformanceCard";
11
11
  import { MIChart } from "./molecule/MIChart";
12
12
  import { IntelligenceCard } from "./organism/IntelligenceCard";
13
13
  import { SectionRadarCard } from "./organism/SectionRadarCard";
14
+ import { NationalPositionCard } from "./organism/NationalPositionCard";
14
15
  export const EXAM_TYPE = {
15
16
  REG: "REG",
16
17
  CMP: "CMP",
@@ -31,7 +32,7 @@ function TranscriptDesign({ props }, ref) {
31
32
  const section2Data = SectionBarGraphProps("section2", data.analysis.user.section2, 50, data.script.section2, undefined, 10, data.analysis.nationalAverage.section2);
32
33
  const container = {
33
34
  printSize: paperSize.a4,
34
- backgrounds: "print:bg-white",
35
+ backgrounds: "print:bg-white z-1",
35
36
  sizes: "w-full max-w-[210mm]",
36
37
  textStyles: "break-keep",
37
38
  };
@@ -41,7 +42,7 @@ function TranscriptDesign({ props }, ref) {
41
42
  spacings: "px-5 py-2",
42
43
  backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
43
44
  };
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(IdCard, { info: info }), _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", title: "Section1" }), _jsx(IntelligenceCard, { data: data.multipleIntelligence, theme: "green" }), _jsx(MIChart, {})] }));
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(IdCard, { info: info }), _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, {})] }));
45
46
  }
46
47
  export default forwardRef(TranscriptDesign);
47
48
  function SectionBarGraphProps(title, score, total, script, subScripts, scale, subScore) {
@@ -1,3 +1,3 @@
1
1
  import { Level } from "../../../../../_test/interface";
2
2
  import { PartPercent, SectionType } from "../../interface";
3
- export declare function GetPartTitleFromLevel(level: Level, section: SectionType, part: keyof PartPercent): string;
3
+ export declare function GetPartDescriptionFromLevel(level: Level, section: SectionType, part: keyof PartPercent): string;
@@ -1,4 +1,4 @@
1
1
  import { LevelToPartDescriptionMap } from "./LevelToPartDescriptionMap";
2
- export function GetPartTitleFromLevel(level, section, part) {
2
+ export function GetPartDescriptionFromLevel(level, section, part) {
3
3
  return LevelToPartDescriptionMap[level]?.[section]?.[part] || "Unknown";
4
4
  }
@@ -1,3 +1,3 @@
1
1
  import { Level } from "../../../../../_test/interface";
2
2
  import { PartPercent, SectionType } from "../../interface";
3
- export declare function GetPartDescriptionFromLevel(level: Level, section: SectionType, part: keyof PartPercent): string;
3
+ export declare function GetPartTitleFromLevel(level: Level, section: SectionType, part: keyof PartPercent): string;
@@ -1,4 +1,4 @@
1
1
  import { LevelToPartTitleMap } from "./LevelToPartTitleMap";
2
- export function GetPartDescriptionFromLevel(level, section, part) {
2
+ export function GetPartTitleFromLevel(level, section, part) {
3
3
  return LevelToPartTitleMap[level]?.[section]?.[part] || "Unknown";
4
4
  }
@@ -14,68 +14,68 @@ export const LevelToPartDescriptionMap = {
14
14
  },
15
15
  PS: {
16
16
  section1: {
17
- partA: "Listen and Recognize",
18
- partB: "Listen and Respond",
19
- partC: "Listen and Retell",
17
+ partA: "단어 또는 짧은 문장을 듣고, 의미를 파악하여 가장 관련 있는 그림을 고르는 파트입니다.",
18
+ partB: "짧은 문장을 듣고, 화자가 하는 말의 핵심을 파악하여 다음에 이어질 알맞은 대답을 고르는 파트입니다.",
19
+ partC: " 사람의 대화 또는 짧은 이야기를 듣고, 내용을 바르게 이해하여 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
20
20
  },
21
21
  section2: {
22
- partA: "Spell the Words",
23
- partB: "Look and Recognize",
24
- partC: "Look and Respond",
25
- partD: "Read and Retell",
22
+ partA: "그림을 보고, 해당 단어의 올바른 철자를 골라 단어를 완성하는 파트입니다.",
23
+ partB: "그림을 보고, 그림이 묘사하고 있는 상황에 알맞은 영어 문장을 고르는 파트입니다.",
24
+ partC: "그림을 보고, 그림을 올바르게 묘사하고 주어진 질문에 알맞은 영어 문장을 고르는 파트입니다.",
25
+ partD: "읽기 자료를 읽고, 내용을 바탕으로 올바른 답을 유추하여 문제에 알맞은 응답을 고르는 파트입니다.",
26
26
  },
27
27
  },
28
28
  ST: {
29
29
  section1: {
30
- partA: "Listen and Recognize",
31
- partB: "Listen and Respond",
32
- partC: "Listen and Retell",
30
+ partA: "문장을 듣고, 정확한 의미를 파악하여 가장 관련 있는 그림을 고르는 파트입니다.",
31
+ partB: "문장을 듣고, 화자가 하는 말의 핵심을 파악하여 다음에 이어질 알맞은 대답을 고르는 파트입니다.",
32
+ partC: " 사람의 대화 또는 짧은 이야기를 듣고, 내용을 바르게 이해하여 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
33
33
  },
34
34
  section2: {
35
- partA: "Sentence Completion",
36
- partB: "Situational Writing",
37
- partC: "Reading and Retelling",
35
+ partA: "불안정한 문장이 포함된 짧은 대화를 읽고, 상황에 알맞은 어휘, 문법을 사용하여 빈칸을 채워 넣는 파트입니다.",
36
+ partB: "그림을 보고, 주어진 문장 속에서 그림을 올바르게 묘사하는 영어 표현을 선택하는 파트입니다.",
37
+ partC: "다양한 읽기 자료를 읽고, 주어진 내용을 바탕으로 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
38
38
  },
39
39
  },
40
40
  BA: {
41
41
  section1: {
42
- partA: "Listen and Recognize",
43
- partB: "Listen and Respond",
44
- partC: "Listen and Retell",
45
- partD: "Listen and Speak",
42
+ partA: "문장을 듣고, 의미를 정확히 파악하여 가장 관련 있는 그림을 고르는 파트입니다.",
43
+ partB: "문장을 듣고, 화자가 하는 말의 핵심을 파악하여 다음에 이어질 알맞은 대답을 고르는 파트입니다.",
44
+ partC: " 사람의 대화 또는 짧은 이야기를 듣고, 내용을 이해하여 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
45
+ partD: " 사람의 대화를 듣고, 내용에 대한 종합적인 이해를 바탕으로 대화에 참여하여 마지막 말에 이어질 알맞은 대답을 고르는 파트입니다.",
46
46
  },
47
47
  section2: {
48
- partA: "Sentence Completion",
49
- partB: "Situational Writing",
50
- partC: "Practical Reading and Retelling",
51
- partD: "General Reading and Retelling",
48
+ partA: "불안정한 문장이 포함된 짧은 대화를 읽고, 상황에 알맞은 어휘, 문법을 사용하여 빈칸을 채워 넣는 파트입니다.",
49
+ partB: "그림을 보고, 주어진 문장 속에서 그림을 올바르게 묘사하는 영어 표현을 선택하는 파트입니다.",
50
+ partC: "실용적 읽기 자료를 주의 깊게 읽고, 주어진 사실을 바탕으로 유추하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
51
+ partD: "다양한 주제의 읽기 자료를 읽고, 주어진 내용을 바탕으로 추론하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
52
52
  },
53
53
  },
54
54
  JR: {
55
55
  section1: {
56
- partA: "Listen and Respond",
57
- partB: "Listen and Retell",
58
- partC: "Listen and Speak",
56
+ partA: "문장을 듣고, 화자가 하는 말의 핵심을 파악하여 다음에 이어질 알맞은 대답을 고르는 파트입니다.",
57
+ partB: " 사람의 대화 또는 짧은 이야기를 듣고, 내용을 바르게 이해하여 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
58
+ partC: " 사람의 대화를 듣고, 내용에 대한 종합적인 이해를 바탕으로 대화에 참여하여 마지막 말에 이어질 알맞은 대답을 고르는 파트입니다.",
59
59
  },
60
60
  section2: {
61
- partA: "Sentence Completion",
62
- partB: "Situational Writing",
63
- partC: "Practical Reading and Retelling",
64
- partD: "General Reading and Retelling",
61
+ partA: "불안정한 문장이 포함된 짧은 대화를 읽고, 상황에 알맞은 어휘, 문법을 사용하여 빈칸을 채워 넣는 파트입니다.",
62
+ partB: "그림을 보고, 주어진 문장 속에서 그림을 올바르게 묘사하는 영어 표현을 선택하는 파트입니다.",
63
+ partC: "실용적 읽기 자료를 주의 깊게 읽고, 주어진 사실을 바탕으로 유추하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
64
+ partD: "다양한 주제의 읽기 자료를 읽고, 주어진 내용을 바탕으로 추론하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
65
65
  },
66
66
  },
67
67
  HJ: {
68
68
  section1: {
69
- partA: "Listen and Recognize",
70
- partB: "Listen and Respond",
71
- partC: "Short Conversations",
72
- partD: "Talks",
69
+ partA: "인물 간의 대화를 듣고, 세 사진 중 내용과 가장 관련이 있는 것을 선택하는 파트입니다.",
70
+ partB: "문장을 듣고, 화자가 하는 말의 핵심을 파악하여 다음에 이어질 알맞은 대답을 고르는 파트입니다.",
71
+ partC: " 사람의 짧은 대화를 듣고, 내용을 바르게 이해하여 관련 질문에 대한 답을 고르는 파트입니다.",
72
+ partD: "인물 간의 긴 대화를 듣고, 내용을 바르게 이해하여 주어진 문제에 알맞은 응답을 고르는 파트입니다.",
73
73
  },
74
74
  section2: {
75
- partA: "Picture Description",
76
- partB: "Sentence Completion",
77
- partC: "Practical Reading and Comprehension",
78
- partD: "General Reading and Comprehension",
75
+ partA: "사진을 보고, 이를 묘사하는데 가장 알맞은 단어나 어구를 선택하는 파트입니다.",
76
+ partB: "불안정한 문장이 포함된 짧은 대화를 읽고, 상황에 알맞은 어휘, 문법을 사용하여 빈칸을 채워 넣는 파트입니다.",
77
+ partC: "실용적 읽기 자료를 주의 깊게 읽고, 주어진 사실을 바탕으로 유추하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
78
+ partD: "다양한 주제의 읽기 자료를 읽고, 주어진 내용을 바탕으로 추론하여 해당 문제에 알맞은 응답을 고르는 파트입니다.",
79
79
  },
80
80
  },
81
81
  AD: {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Radar, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, ResponsiveContainer, } from "recharts";
3
3
  export function RadarGraph({ data }) {
4
- return (_jsx("div", { className: "w-full aspect-square flex items-center justify-center relative", children: _jsx("div", { className: "absolute top-0 left-0 w-full", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsxs(RadarChart, { cx: "50%", cy: "50%", outerRadius: "80%", data: data, width: 500, height: 500, children: [_jsx(PolarGrid, {}), _jsx(PolarAngleAxis, { dataKey: "subject" }), _jsx(PolarRadiusAxis, { angle: 30, domain: [0, 100] }), _jsx(Radar, { name: "My Score", dataKey: "A", stroke: "#105652", fill: "#105652", fillOpacity: 0.2 }), _jsx(Radar, { name: "Average", dataKey: "B", stroke: "#910023", fill: "#910023", fillOpacity: 0.1 })] }) }) }) }));
4
+ return (_jsxs("div", { className: "w-full aspect-square flex items-center justify-center relative", children: [_jsx("div", { className: "absolute top-0 left-0 w-full print:hidden", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsxs(RadarChart, { cx: "50%", cy: "50%", outerRadius: "80%", data: data, width: 500, height: 500, children: [_jsx(PolarGrid, {}), _jsx(PolarAngleAxis, { dataKey: "subject" }), _jsx(PolarRadiusAxis, { angle: 30, domain: [0, 100] }), _jsx(Radar, { name: "My Score", dataKey: "A", stroke: "#105652", fill: "#105652", fillOpacity: 0.2 }), _jsx(Radar, { name: "Average", dataKey: "B", stroke: "#910023", fill: "#910023", fillOpacity: 0.1 })] }) }) }), _jsx("div", { className: "absolute top-0 left-0 w-full opacity-0 print:opacity-100", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsxs(RadarChart, { cx: "50%", cy: "50%", outerRadius: "80%", data: data, width: 500, height: 500, children: [_jsx(PolarGrid, {}), _jsx(PolarAngleAxis, { dataKey: "subject" }), _jsx(PolarRadiusAxis, { angle: 30, domain: [0, 100] }), _jsx(Radar, { name: "My Score", dataKey: "A", stroke: "#105652", fill: "#105652", fillOpacity: 0.2, isAnimationActive: false }), _jsx(Radar, { name: "Average", dataKey: "B", stroke: "#910023", fill: "#910023", fillOpacity: 0.1, isAnimationActive: false })] }) }) })] }));
5
5
  }
@@ -4,7 +4,7 @@ import { cn } from "../../../../../util";
4
4
  import { printBoxStyles } from "../atom/PrintBoxStyles";
5
5
  export default function HonorCard({ result, }) {
6
6
  const cardWrapper = {
7
- displays: "flex flex-col self-stretch flex-[1] relative",
7
+ displays: "flex flex-1 flex-col self-stretch relative",
8
8
  sizes: "w-full rounded-lg overflow-hidden",
9
9
  backgrounds: "bg-white shadow-main",
10
10
  animations: "duration-300 hover:scale-105 hover:shadow-green",
@@ -0,0 +1,4 @@
1
+ import { TranscriptProps } from "../Transcript";
2
+ export declare function NationalPositionCard({ result, }: {
3
+ result: TranscriptProps["result"];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../../../util";
3
+ import { printBoxStyles } from "../atom/PrintBoxStyles";
4
+ export function NationalPositionCard({ result, }) {
5
+ const percentRank = result.percentRank.toFixed(1);
6
+ const cardWrapper = {
7
+ displays: "flex flex-col relative",
8
+ sizes: "w-full rounded-lg overflow-hidden",
9
+ outline: "border-2 border-green-dark/50",
10
+ };
11
+ return (_jsx("div", { className: cn(cardWrapper, printBoxStyles, "flex-[1] h-fit p-2 mt-5 xxs:text-sm text-xs text-green-dark print:hidden text-center font-medium", percentRank == "0.0"
12
+ ? "bg-green-light shadow-green"
13
+ : "bg-white shadow-main"), children: percentRank == "0.0" ? (_jsxs("div", { children: [_jsx("span", { children: "\uCD95\uD558\uD569\uB2C8\uB2E4! \uC774\uBC88 \uC2DC\uD5D8\uC5D0\uC11C " }), _jsx("span", { className: "font-bold", children: "\uC804\uAD6D 1\uB4F1" }), "\uC744 \uAE30\uB85D\uD588\uC5B4\uC694!"] })) : (_jsxs("div", { children: ["\uC774\uBC88 \uC2DC\uD5D8\uC5D0\uC11C \uC804\uAD6D\uC0C1\uC704", " ", _jsxs("span", { className: "font-bold", children: [percentRank, "%"] }), "\uB97C \uAE30\uB85D\uD588\uC5B4\uC694."] })) }));
14
+ }
@@ -4,7 +4,7 @@ import { printBoxStyles } from "../atom/PrintBoxStyles";
4
4
  import { CircularGauge } from "../molecule/CircularGauge";
5
5
  export default function ResultGaugeCard({ result, theme, }) {
6
6
  const cardWrapper = {
7
- displays: "flex flex-col self-auto flex-[2] md:flex-[1] overflow-hidden",
7
+ displays: "flex flex-col self-auto flex-2 md:flex-1 overflow-hidden",
8
8
  sizes: "w-full h-fit rounded-lg",
9
9
  backgrounds: "bg-white shadow-main",
10
10
  // animations: "duration-300 hover:scale-105 hover:shadow-green",
@@ -1,9 +1,8 @@
1
1
  import { SectionType, Theme } from "../../interface";
2
2
  import { TranscriptProps } from "../Transcript";
3
- export declare function SectionRadarCard({ info, data, theme, title, section, }: {
3
+ export declare function SectionRadarCard({ info, data, theme, section, }: {
4
4
  info: TranscriptProps["info"];
5
5
  data: TranscriptProps["data"];
6
6
  theme: Theme;
7
- title?: string;
8
7
  section: SectionType;
9
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../../../util";
3
3
  import CardTitle from "../atom/CardTitle";
4
- import { GetPartTitleFromLevel } from "../atom/GetPartDescriptionFromLevel";
5
- import { GetPartDescriptionFromLevel } from "../atom/GetPartTitleFromLevel";
4
+ import { GetPartDescriptionFromLevel } from "../atom/GetPartDescriptionFromLevel";
5
+ import { GetPartTitleFromLevel } from "../atom/GetPartTitleFromLevel";
6
6
  import { printBoxStyles } from "../atom/PrintBoxStyles";
7
7
  import { RadarGraph } from "../molecule/RadarGraph";
8
8
  function prepareRadarChartData(resultPartPercent, averagePartPercent, section, level) {
@@ -14,6 +14,7 @@ function prepareRadarChartData(resultPartPercent, averagePartPercent, section, l
14
14
  if (partTitle !== "Unknown") {
15
15
  return {
16
16
  subject: part,
17
+ title: partTitle,
17
18
  A: resultPartPercent[part],
18
19
  B: averagePartPercent[part],
19
20
  fullMark: 1,
@@ -24,9 +25,10 @@ function prepareRadarChartData(resultPartPercent, averagePartPercent, section, l
24
25
  })
25
26
  .filter((item) => item !== null); // null 값 제거
26
27
  }
27
- export function SectionRadarCard({ info, data, theme, title, section, }) {
28
+ export function SectionRadarCard({ info, data, theme, section, }) {
28
29
  const resultPartPercent = data.graph.user[section];
29
30
  const averagePartPercent = data.graph.average.user[section];
31
+ const radarData = prepareRadarChartData(resultPartPercent, averagePartPercent, section, info.level);
30
32
  const cardWrapper = {
31
33
  displays: "flex flex-col relative",
32
34
  sizes: "w-full rounded-lg overflow-hidden",
@@ -36,5 +38,5 @@ export function SectionRadarCard({ info, data, theme, title, section, }) {
36
38
  display: "flex flex-row items-center justify-center",
37
39
  sizes: "w-full",
38
40
  };
39
- return (_jsxs("div", { className: "w-full h-fit flex flex-col-reverse md:flex-row gap-5 mt-5 print:hidden", children: [_jsxs("div", { className: cn(cardWrapper, printBoxStyles, "flex-[1]"), children: [title && _jsx(CardTitle, { title: title, theme: theme }), _jsxs("div", { className: "flex flex-col p-5 h-full justify-center items-center", children: [_jsx("div", { className: cn(SectionWrapper), children: _jsx(RadarGraph, { data: prepareRadarChartData(resultPartPercent, averagePartPercent, section, info.level) }) }), _jsxs("div", { className: "w-full h-fit flex items-center justify-center gap-5", children: [_jsxs("div", { className: "flex flex-row justify-center items-center gap-2", children: [_jsx("div", { className: "rounded-full h-3 w-3 bg-green-dark" }), _jsx("div", { className: "text-green-dark text-xs", children: "My Score" })] }), _jsxs("div", { className: "flex flex-row justify-center items-center gap-2", children: [_jsx("div", { className: "rounded-full h-3 w-3 bg-crimson-burgundy" }), _jsx("div", { className: "text-crimson-burgundy text-xs", children: "Average" })] })] })] })] }), _jsx("div", { className: cn(cardWrapper, printBoxStyles, "flex-[1]") })] }));
41
+ return (_jsxs("div", { className: "w-full h-fit flex flex-col md:flex-row gap-5 mt-5 print:hidden", children: [_jsxs("div", { className: cn(cardWrapper, printBoxStyles, "flex-[1]"), children: [_jsx(CardTitle, { title: section, theme: theme }), _jsxs("div", { className: "flex flex-col p-5 h-full justify-center items-center", children: [_jsx("div", { className: cn(SectionWrapper), children: _jsx(RadarGraph, { data: radarData }) }), _jsxs("div", { className: "w-full h-fit flex items-center justify-center gap-5", children: [_jsxs("div", { className: "flex flex-row justify-center items-center gap-2", children: [_jsx("div", { className: "rounded-full h-3 w-3 bg-green-dark" }), _jsx("div", { className: "text-green-dark text-xs", children: "My Score" })] }), _jsxs("div", { className: "flex flex-row justify-center items-center gap-2", children: [_jsx("div", { className: "rounded-full h-3 w-3 bg-crimson-burgundy" }), _jsx("div", { className: "text-crimson-burgundy text-xs", children: "Average" })] })] })] })] }), _jsxs("div", { className: cn(cardWrapper, printBoxStyles, "flex-[1]"), children: [_jsx(CardTitle, { title: "description", theme: "green" }), _jsx("div", { className: "flex flex-col gap-5 p-5", children: radarData.map((item) => (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-row gap-2 font-bold text-sm text-green-dark", children: [_jsx("div", { children: item.subject + "." }), _jsx("div", { children: item.title })] }), _jsx("div", { className: "text-xs", children: item.description })] }, item.subject))) })] })] }));
40
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.214",
3
+ "version": "1.0.216",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -36,6 +36,9 @@ export default {
36
36
  "main-hover": "0 10px 12px 0px rgba(0, 0, 0, 0.3)",
37
37
  green: "0 0px 10px 0px rgba(16, 86, 82, 0.38)",
38
38
  },
39
+ flex: {
40
+ "2": "2 2 0%",
41
+ },
39
42
  keyframes: {
40
43
  smallBounce: {
41
44
  "0%, 100%": { transform: "translateY(-5%)" },
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.214
1
+ 1.0.216