@edu-tosel/design 1.0.147 → 1.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,15 @@
1
1
  export interface LegacyExam {
2
2
  examNo: string;
3
3
  examName: string;
4
+ examDate: string;
4
5
  reports: {
5
6
  name: string;
6
7
  level: string;
7
8
  url: string;
8
9
  birthday: string;
10
+ section1: number;
11
+ section2: number;
12
+ grade: number;
9
13
  }[];
10
14
  groupReport?: string;
11
15
  }
@@ -22,7 +22,7 @@ export default function Integrate({ isLoading, isUser, usernameState: [oldUserna
22
22
  "토셀 사이트가 리뉴얼되었습니다.",
23
23
  "2024.08.26까지 사용하던 계정(구 tosel.org) 연동으로",
24
24
  "이전 시험 데이터를 확인하세요!",
25
- ], className: "text-xs md:text-sm" }) })] }), _jsx(Input.Form, { title: "\uC544\uC774\uB514/\uB2E8\uCCB4\uCF54\uB4DC (\uAD6C \uC0AC\uC774\uD2B8)", state: [oldUsername, setUsername], option: {
25
+ ], className: "text-xs md:text-sm" }) })] }), _jsx(Input.Form, { title: "\uC544\uC774\uB514 \uB610\uB294 \uB2E8\uCCB4\uCF54\uB4DC (\uAD6C \uC0AC\uC774\uD2B8)", state: [oldUsername, setUsername], option: {
26
26
  text: "text-green-dark",
27
27
  } }), _jsx(Input.Form, { title: "\uBE44\uBC00\uBC88\uD638", type: "password", state: [oldPassword, setPassword], onKeyDown: (e) => {
28
28
  if (oldUsername && oldPassword && e.key === "Enter") {
@@ -7,7 +7,7 @@ export default function LegacyLayout({ exams }) {
7
7
  const pageWrapper = {
8
8
  backgrounds: "bg-[#f6f6f6]/50",
9
9
  displays: "flex justify-center items-center",
10
- sizes: "h-full",
10
+ sizes: "h-screen",
11
11
  };
12
12
  return (_jsx("div", { className: cn(pageWrapper), children: _jsx(Legacy.Table, { exams: exams }) }));
13
13
  }
@@ -4,54 +4,114 @@ import Action from "../Action";
4
4
  import { useState } from "react";
5
5
  export default function Table({ exams }) {
6
6
  const container = {
7
+ displays: "flex flex-col lg:flex-row gap-x-16",
8
+ };
9
+ const cardDeckWrapper = {
10
+ displays: "relative flex h-screen lg:h-fit",
11
+ };
12
+ //페이지 제목 스타일링
13
+ const titleWrapperMobile = {
14
+ displays: "flex flex-col justify-center items-center lg:hidden",
15
+ };
16
+ const titleWrapperWeb = {
17
+ displays: "flex flex-col justify-center items-center ",
18
+ sizes: "w-full",
19
+ };
20
+ const mainTitle = {
21
+ sizes: "w-full h-fit",
22
+ textstyles: "text-green-dark text-center font-bold text-md",
23
+ responsive: "lg:text-2xl lg:text-left",
24
+ };
25
+ const subTitle = {
26
+ sizes: "w-full h-fit",
27
+ textstyles: "text-gray-medium text-center font-medium text-sm",
28
+ responsive: "lg:text-base lg:text-left",
29
+ };
30
+ //퀵메뉴 버튼
31
+ const buttonSetWrapper = {
32
+ display: "flex flex-col mt-12 w-full gap-2",
33
+ };
34
+ const buttonSet = {
35
+ sizes: "w-full h-fit select-none",
36
+ display: "flex flex-row gap-4",
37
+ };
38
+ const linkButton = {
39
+ sizes: "w-fit h-fit rounded-md",
40
+ spaces: "px-4 py-2",
41
+ backgrounds: "bg-gray-light ",
42
+ textstyles: "",
43
+ hoveractions: "hover:bg-green-dark hover:text-white hover:shadow-green",
44
+ animations: "duration-300",
45
+ };
46
+ //스크롤 액션 조절
47
+ const scrollWrapper = {
7
48
  textstyling: "font-pretendard-var antialiased relative",
8
49
  backgrounds: "text-gray-medium",
9
- sizes: "w-screen h-screen scrollbar-hidden max-w-[480px] overflow-y-auto",
10
- displays: "flex flex-col",
50
+ sizes: "w-screen h-screen scrollbar-hidden max-w-[480px] lg:max-h-[700px] overflow-y-auto",
51
+ displays: "flex flex-col select-none ",
52
+ };
53
+ //인풋 박스 간격 스타일링
54
+ const inputBoxWrapperWeb = {
55
+ displays: "hidden lg:flex justify-center items-center flex flex-col gap-10",
56
+ spacings: "p-0 w-100",
11
57
  };
12
- const inputBoxWrapper = {
13
- displays: "flex",
58
+ const inputBoxWrapperMobile = {
59
+ displays: "flex lg:hidden",
14
60
  spacings: "p-0",
15
- scroll: "sticky top-10",
61
+ scroll: "sticky top-6",
16
62
  };
63
+ // 인풋 박스 요소 스타일링
17
64
  const inputBox = {
18
- sizes: "w-full h-fit p-3 rounded-lg mx-10 focus:mx-5",
65
+ sizes: "w-full h-fit p-3 rounded-lg mx-8 focus:mx-5",
19
66
  focus: "outline-none focus:shadow-main",
20
67
  backgrounds: "bg-green-light/50 text-green-dark backdrop-blur-sm",
21
68
  animations: "duration-300 appearance-none",
22
69
  placeholder: "placeholder-green-dark/50",
23
70
  };
24
- const titleWrapper = {
25
- displays: "flex flex-col justify-center items-center",
71
+ //스크롤 상단 하단 영역 페이드아웃
72
+ const scrollBlurTop = {
73
+ displays: "absolute top-0",
74
+ backgrounds: "bg-gradient-to-b from-[#fafafa] to-[#f6f6f6]/0",
75
+ sizes: "w-full h-20",
26
76
  };
27
- const mainTitle = {
28
- sizes: "w-full h-fit",
29
- textstyles: "text-green-dark text-center font-bold text-md",
30
- };
31
- const subTitle = {
32
- sizes: "w-full h-fit",
33
- textstyles: "text-gray-medium text-center font-medium text-sm",
77
+ const scrollBlurBottom = {
78
+ displays: "absolute bottom-0",
79
+ backgrounds: "bg-gradient-to-t from-[#fafafa] to-[#f6f6f6]/0",
80
+ sizes: "w-full h-20",
34
81
  };
82
+ //시험카드 간격조절
35
83
  const examsWrapper = {
36
- displays: "flex flex-col gap-6 mt-15",
37
- spacings: "px-5 mb-6",
84
+ displays: "flex flex-col gap-4 mt-24",
85
+ spacings: "px-5 mb-24",
38
86
  };
39
87
  const filter = (exams, str) => exams.filter((exam) => {
40
88
  return exam.examName.includes(str);
41
89
  });
42
90
  const [filterKey, setFilterKey] = useState("");
43
91
  const filteredExam = filter(exams, filterKey);
44
- return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(inputBoxWrapper), children: _jsx("input", { type: "text", className: cn(inputBox), onChange: (e) => {
45
- setFilterKey(e.target.value);
46
- }, placeholder: "\uC2DC\uD5D8 \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694" }) }), _jsxs("div", { className: cn(examsWrapper), children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(mainTitle), children: "\uC774\uC804 \uC131\uC801 \uC870\uD68C\uD558\uAE30" }), _jsx("div", { className: cn(subTitle), children: "85\uD68C \uC774\uC804\uC758 \uC131\uC801\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4" })] }), _jsx(Action.Replace, { actions: [
47
- [
48
- filteredExam.length === 0,
49
- _jsx("div", { className: "w-full text-center", children: "\uC870\uD68C \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }),
50
- ],
51
- ], children: filteredExam.map((exam) => (_jsx(Row, { examName: exam.examName, examNo: exam.examNo, reports: exam.reports.map((report) => ({
52
- ...report,
53
- level: LevelConvert[report.level],
54
- })), groupReport: exam.groupReport }))) })] })] }));
92
+ //결과없음 이미지
93
+ const noResultWrapper = {
94
+ displays: "flex flex-col justify-center items-center",
95
+ sizes: "w-full h-fit",
96
+ };
97
+ const noResultImg = {
98
+ spacings: "p-10",
99
+ sizes: "w-full max-w-80",
100
+ };
101
+ return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(inputBoxWrapperWeb), children: [_jsxs("div", { className: cn(titleWrapperWeb), children: [_jsx("div", { className: cn(mainTitle), children: "\uC774\uC804 \uC131\uC801 \uC870\uD68C\uD558\uAE30" }), _jsx("div", { className: cn(subTitle), children: "85\uD68C \uC774\uC804\uC758 \uC131\uC801\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4." })] }), _jsx("input", { type: "text", className: cn(inputBox), onChange: (e) => {
102
+ setFilterKey(e.target.value);
103
+ }, placeholder: "\uC2DC\uD5D8 \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694" }), _jsxs("div", { className: cn(buttonSetWrapper), children: [_jsx("div", { className: "text-xs text-green-dark", children: "\uB2E4\uB978 \uC11C\uBE44\uC2A4\uB97C \uC774\uC6A9\uD558\uACE0 \uC2F6\uB098\uC694?" }), _jsxs("div", { className: cn(buttonSet), children: [_jsx("div", { className: cn(linkButton), onClick: () => (window.location.href = "https://new.tosel.org/"), children: "\uD648\uC73C\uB85C" }), _jsx("div", { className: cn(linkButton), onClick: () => (window.location.href =
104
+ "https://new.tosel.org/legacy/integrate"), children: "\uC5F0\uB3D9 \uACC4\uC815 \uCD94\uAC00\uD558\uAE30" }), _jsx("div", { className: cn(linkButton), onClick: () => (window.location.href = "https://tosel.org/HallofFame/main"), children: "\uBA85\uC608\uC758 \uC804\uB2F9" })] })] })] }), _jsxs("div", { className: cn(cardDeckWrapper), children: [_jsx("div", { className: cn(scrollWrapper), children: _jsxs("div", { className: cn(examsWrapper), children: [_jsxs("div", { className: cn(titleWrapperMobile), children: [_jsx("div", { className: cn(mainTitle), children: "\uC774\uC804 \uC131\uC801 \uC870\uD68C\uD558\uAE30" }), _jsx("div", { className: cn(subTitle), children: "85\uD68C \uC774\uC804\uC758 \uC131\uC801\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4." })] }), _jsxs(Action.Replace, { actions: [
105
+ [
106
+ filteredExam.length === 0,
107
+ _jsxs("div", { className: cn(noResultWrapper), children: [_jsx("div", { className: cn(noResultImg), children: _jsx("img", { src: "/images/legacy/img-legacy-noresult.png", alt: "\uACB0\uACFC \uC5C6\uC74C" }) }), _jsx("div", { className: "text-sm text-center w-full font-medium", children: "\uC774\uB7F0, \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694" })] }),
108
+ ],
109
+ ], children: [_jsx("div", { className: "text-center font-medium text-sm mt-3 text-green-dark", children: "\uCE74\uB4DC\uB97C \uB20C\uB7EC \uD3BC\uCCD0\uBCFC \uC218 \uC788\uC5B4\uC694" }), filteredExam.map((exam) => (_jsx(Row, { examName: exam.examName, examNo: exam.examNo, examDate: exam.examDate, reports: exam.reports.map((report) => ({
110
+ ...report,
111
+ level: LevelConvert[report.level],
112
+ })), groupReport: exam.groupReport })))] })] }) }), _jsx("div", { className: cn(scrollBlurTop), children: _jsx("div", { className: cn(inputBoxWrapperMobile), children: _jsx("input", { type: "text", className: cn(inputBox), onChange: (e) => {
113
+ setFilterKey(e.target.value);
114
+ }, placeholder: "\uC2DC\uD5D8 \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694" }) }) }), _jsx("div", { className: cn(scrollBlurBottom) })] })] }));
55
115
  }
56
116
  const LevelConvert = {
57
117
  10: "PS",
@@ -70,54 +130,80 @@ const TextColorConvert = {
70
130
  CC: "text-gray-dark",
71
131
  IN: "text-gray-dark",
72
132
  };
73
- function Row({ examName, reports, groupReport }) {
133
+ function Row({ examName, examDate, reports, groupReport }) {
134
+ const [isTableVisible, setIsTableVisible] = useState(false);
74
135
  const examWrapper = {
75
136
  displays: "flex flex-col",
76
137
  backgrounds: "bg-white",
77
138
  spacings: "p-5",
78
- sizes: "rounded-2xl",
79
- shadows: "hover:shadow-main",
80
- animations: "duration-300",
139
+ sizes: "rounded-xl",
140
+ shadows: "hover:shadow-green",
141
+ animations: "duration-300 hover:scale-105",
142
+ cursor: "cursor-pointer",
143
+ };
144
+ const titleWrapper = {
145
+ displays: "flex flex-col gap-1 mb-2",
146
+ cursor: "cursor-default",
81
147
  };
82
148
  const examTitle = {
83
- textStyling: "font-medium",
149
+ textStyling: "font-bold text-md leading-none",
150
+ };
151
+ const subTitle = {
152
+ textStyling: "font-medium text-xs",
84
153
  };
85
154
  const divider = {
86
- sizes: "w-full h-0.5 mt-1 mb-5",
155
+ sizes: "w-full h-0.5 mt-1 ",
87
156
  backgrounds: "bg-gray-light",
88
157
  };
89
- const groupButton = {
90
- sizes: "w-full h-10 rounded-lg",
91
- displays: "flex justify-center items-center",
92
- backgrounds: "bg-gray-light/50",
93
- spacings: "mt-4",
94
- };
95
- const groupText = {
96
- textStyles: "text-sm",
97
- };
98
158
  const tableWrapper = {
99
- displays: "flex flex-col",
159
+ displays: isTableVisible ? "flex flex-col" : "hidden",
100
160
  spacings: "gap-4",
101
161
  };
102
162
  const rowWrapper = {
103
163
  displays: "flex flex-row justify-between w-full font-medium",
104
164
  };
105
- const textWrapper = {
165
+ const leftWrapper = {
106
166
  displays: "flex flex-row gap-2",
107
167
  sizes: "w-fit h-fit",
108
168
  };
169
+ const textWrapper = {
170
+ displays: "flex flex-col w-fit h-fit",
171
+ };
109
172
  const levelTag = {
110
173
  textStyling: "font-bold",
111
174
  sizes: "w-fit h-fit",
112
175
  spacings: "px-2 rounded-md",
113
176
  backgrounds: "bg-[#f6f6f6]/50",
114
177
  };
178
+ const rightWrapper = {
179
+ displays: "flex flex-row",
180
+ };
181
+ //성적 태그
182
+ const scoreTag = {
183
+ sizes: "w-fit h-fit",
184
+ spacings: "px-2 py-1 rounded-md",
185
+ textstyles: "text-xs",
186
+ responsivity: "hidden lg:block",
187
+ };
188
+ //개인성적표 조회 버튼
115
189
  const button = {
116
190
  sizes: "w-fit h-fit",
117
191
  spacings: "px-2 py-1 rounded-md",
118
192
  textstyles: "text-xs",
119
193
  backgrounds: "bg-green-light/50",
120
- shadows: "hover:shadow-main",
121
194
  };
122
- return (_jsxs("div", { className: cn(examWrapper), children: [_jsx("div", { className: cn(examTitle), children: examName }), _jsx("div", { className: cn(divider) }), _jsx("div", { className: cn(tableWrapper), children: reports.map((report) => (_jsxs("div", { className: cn(rowWrapper), children: [_jsxs("div", { className: cn(textWrapper), children: [_jsx("p", { className: "font-bold", children: report.name }), _jsx("div", { className: cn(levelTag), children: _jsx("p", { className: cn(TextColorConvert[report.level]), children: report.level }) })] }), _jsx("a", { href: report.url, target: "_blank", rel: "noopener noreferrer", children: _jsx("div", { className: cn(button), children: "\uC131\uC801\uD45C" }) })] }, report.name + report.level))) }), groupReport && (_jsx("a", { href: groupReport, children: _jsx("div", { className: cn(groupButton), children: _jsx("div", { className: cn(groupText), children: "\uB2E8\uCCB4 \uC131\uC801\uD45C \uBCF4\uAE30" }) }) }))] }));
195
+ //단체성적표 조회 버튼
196
+ const groupButton = {
197
+ sizes: "w-full h-10 rounded-lg",
198
+ displays: "flex justify-center items-center",
199
+ backgrounds: "bg-gray-light/50",
200
+ hoveractions: "hover:bg-green-dark hover:text-white",
201
+ animations: "duration-300",
202
+ };
203
+ const groupText = {
204
+ textStyles: "text-sm",
205
+ };
206
+ return (_jsxs("div", { className: cn(examWrapper), onClick: () => {
207
+ setIsTableVisible(!isTableVisible);
208
+ }, children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(examTitle), children: examName }), _jsx("div", { className: cn(subTitle), children: examDate })] }), isTableVisible && (_jsxs("div", { className: cn(tableWrapper), children: [_jsx("div", { className: cn(divider) }), reports.map((report) => (_jsxs("div", { className: cn(rowWrapper), children: [_jsxs("div", { className: cn(leftWrapper), children: [_jsx("div", { className: cn(levelTag), children: _jsx("p", { className: cn(TextColorConvert[report.level]), children: report.level }) }), _jsxs("div", { className: cn(textWrapper), children: [_jsx("p", { className: "font-medium", children: report.name }), _jsx("p", { className: "font-medium text-xs", children: report.birthday })] })] }), _jsxs("div", { className: cn(rightWrapper), children: [_jsx("div", { className: cn(scoreTag), children: report.section1 }), _jsx("div", { className: cn(scoreTag), children: report.section2 }), _jsx("div", { className: "h-full text-lg font-bold text-green-dark/50 mx-4", children: report.section1 + report.section2 }), _jsx("a", { href: report.url, target: "_blank", rel: "noopener noreferrer", children: _jsx("div", { className: cn(button), children: "\uC131\uC801\uD45C" }) })] })] }, report.name + report.level)))] })), groupReport && (_jsx("a", { href: groupReport, className: "mt-4", children: _jsx("div", { className: cn(groupButton), children: _jsx("div", { className: cn(groupText), children: "\uB2E8\uCCB4 \uC131\uC801\uD45C \uBCF4\uAE30" }) }) }))] }));
123
209
  }
@@ -86,8 +86,8 @@ export default function Carousel({ contents, }) {
86
86
  paddings: "px-1.5 mt-0 mb-5 md:mt-12 ",
87
87
  };
88
88
  const buttonBoxPosition = {
89
- display: "absolute flex justify-center items-center md:static md:justify-start",
89
+ display: "absolute flex justify-center items-center md:static md:justify-start ",
90
90
  sizes: "w-full h-fit left-0 bottom-0 z-10",
91
91
  };
92
- return (_jsx("div", { onClick: contents[index].onClick, className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "duration-500 w-fit h-fit flex flex-col mt-4 xxs:mt-8 xxs:flex-row xxs:gap-8 md:flex-col md:flex-none md:w-72 md:pl-7.5 md:gap-6 md:mt-0", children: [_jsxs("div", { className: cn(titleSet), children: [_jsx("div", { className: cn(tagBox), children: tagString[tag.type] }), _jsx("div", { className: "font-pretendard-bold text-xl md:text-2xl", children: titles.title })] }), _jsx(LineBreaks, { className: "w-fit flex flex-col justify-center text-sm my-2 xxs:mt-0 md:text-base", texts: titles.subtitle }), _jsx("div", { className: cn(buttonBoxPosition), children: _jsxs("div", { className: cn(buttonBox), children: [_jsx("button", { onClick: handlePrev, className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.LessThan, {}) }), _jsxs("div", { className: "flex flex-row md:gap-2 gap-4 justify-center items-center", children: [_jsx("div", { className: "text-white w-2 text-sm", children: index + 1 }), _jsx("div", { className: "w-0.5 h-3 bg-gray-medium" }), _jsx("div", { className: "text-white w-2 text-sm", children: contents.length })] }), _jsx("button", { onClick: handleNext, className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.GreaterThan, {}) })] }) })] }), _jsx("div", { className: "h-full overflow-hidden w-fit", children: image && (_jsx(animated.img, { src: image, alt: "carousel-image", onLoad: () => setLoaded(true), className: "object-cover h-full z-0", style: transitionStyles })) })] }) }));
92
+ return (_jsx("div", { onClick: contents[index].onClick, className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "duration-500 w-fit h-fit flex flex-col mt-4 xxs:mt-8 xxs:flex-row xxs:gap-8 md:flex-col md:flex-none md:w-72 md:pl-7.5 md:gap-6 md:mt-0", children: [_jsxs("div", { className: cn(titleSet), children: [_jsx("div", { className: cn(tagBox), children: tagString[tag.type] }), _jsx("div", { className: "font-pretendard-bold text-xl md:text-2xl", children: titles.title })] }), _jsx(LineBreaks, { className: "w-fit flex flex-col justify-center text-sm my-2 xxs:mt-0 md:text-base", texts: titles.subtitle }), _jsx("div", { className: cn(buttonBoxPosition), onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: cn(buttonBox), children: [_jsx("button", { onClick: handlePrev, className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.LessThan, {}) }), _jsxs("div", { className: "flex flex-row md:gap-2 gap-4 justify-center items-center", children: [_jsx("div", { className: "text-white w-2 text-sm", children: index + 1 }), _jsx("div", { className: "w-0.5 h-3 bg-gray-medium" }), _jsx("div", { className: "text-white w-2 text-sm", children: contents.length })] }), _jsx("button", { onClick: handleNext, className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.GreaterThan, {}) })] }) })] }), _jsx("div", { className: "h-full overflow-hidden w-fit", children: image && (_jsx(animated.img, { src: image, alt: "carousel-image", onLoad: () => setLoaded(true), className: "object-cover h-full z-0", style: transitionStyles })) })] }) }));
93
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.147",
3
+ "version": "1.0.149",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -33,6 +33,7 @@ export default {
33
33
  boxShadow: {
34
34
  main: "0 2px 10px 0px rgba(0, 0, 0, 0.14)",
35
35
  "main-hover": "0 10px 12px 0px rgba(0, 0, 0, 0.3)",
36
+ green: "0 0px 10px 0px rgba(16, 86, 82, 0.38)",
36
37
  },
37
38
  keyframes: {
38
39
  slideBackground: {
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.147
1
+ 1.0.149