@edu-tosel/design 1.0.143 → 1.0.145
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/_test/asset/sample.d.ts +2 -0
- package/_test/asset/sample.js +84 -0
- package/layout/index.d.ts +2 -0
- package/layout/index.js +2 -0
- package/layout/template/Legacy/Exam.d.ts +11 -0
- package/layout/template/Legacy/Exam.js +1 -0
- package/layout/template/Legacy/Legacy.layout.d.ts +4 -0
- package/layout/template/Legacy/Legacy.layout.js +13 -0
- package/layout/template/Legacy/Table.d.ts +4 -0
- package/layout/template/Legacy/Table.js +123 -0
- package/layout/template/Legacy/index.d.ts +7 -0
- package/layout/template/Legacy/index.js +7 -0
- package/package.json +1 -1
- package/version.txt +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// sampleData.tsx
|
|
2
|
+
// 샘플 데이터 정의
|
|
3
|
+
export const exams = [
|
|
4
|
+
{
|
|
5
|
+
examNo: "2025",
|
|
6
|
+
examName: "테스트 기관시험",
|
|
7
|
+
reports: [
|
|
8
|
+
{
|
|
9
|
+
name: "박민형",
|
|
10
|
+
level: "10",
|
|
11
|
+
url: "https://www.tosel.org/admin/grade/gradeSpecialTableAdmin_n?receipt_no=000000000001&gradeturn=2025&gradelevel=10&area=3&birthday=2020-03-16&rqtype=",
|
|
12
|
+
birthday: "2015-07-28",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "탄단지",
|
|
16
|
+
level: "6",
|
|
17
|
+
url: "https://www.tosel.org/admin/grade/gradeSpecialTableAdmin_n?receipt_no=000000000001&gradeturn=2025&gradelevel=10&area=3&birthday=2020-03-16&rqtype=",
|
|
18
|
+
birthday: "2015-05-11",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
groupReport: "https://ai.tosel.co.kr/grade/print?receipt_no=580040100001,580040100002,580040100003,580040100004,580040100005,580040100006,580040050001,580040050002,580040040001,580040050003,580040100007&gradeturn=1331",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
examNo: "216",
|
|
25
|
+
examName: "토셀 제 53회 정기시험",
|
|
26
|
+
reports: [
|
|
27
|
+
{
|
|
28
|
+
name: "김하늘",
|
|
29
|
+
level: "6",
|
|
30
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001069999&gradeturn=216",
|
|
31
|
+
birthday: "2015-07-15",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
groupReport: "https://ai.tosel.co.kr/grade/print?receipt_no=580040100001,580040100002,580040100003,580040100004,580040100005,580040100006,580040050001,580040050002,580040040001,580040050003,580040100007&gradeturn=1331",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
examNo: "217",
|
|
38
|
+
examName: "토셀 제 54회 정기시험",
|
|
39
|
+
reports: [
|
|
40
|
+
{
|
|
41
|
+
name: "이수민",
|
|
42
|
+
level: "4",
|
|
43
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070000&gradeturn=217",
|
|
44
|
+
birthday: "2015-07-28",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "최지원",
|
|
48
|
+
level: "3",
|
|
49
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070001&gradeturn=217",
|
|
50
|
+
birthday: "2015-07-28",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "최지원",
|
|
54
|
+
level: "3",
|
|
55
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070001&gradeturn=217",
|
|
56
|
+
birthday: "2015-07-28",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
examNo: "219",
|
|
62
|
+
examName: "토셀 제 52회 정기시험",
|
|
63
|
+
reports: [
|
|
64
|
+
{
|
|
65
|
+
name: "이수민",
|
|
66
|
+
level: "4",
|
|
67
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070000&gradeturn=217",
|
|
68
|
+
birthday: "2015-07-28",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "최지원",
|
|
72
|
+
level: "3",
|
|
73
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070001&gradeturn=217",
|
|
74
|
+
birthday: "2015-07-28",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "유남생",
|
|
78
|
+
level: "3",
|
|
79
|
+
url: "https://ai.tosel.co.kr/grade/?receipt_no=101001070001&gradeturn=217",
|
|
80
|
+
birthday: "2015-07-28",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
];
|
package/layout/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./template/dashboard";
|
|
|
7
7
|
export { default as Event } from "./template/Event";
|
|
8
8
|
export { default as Olympiad } from "./template/Olympiad";
|
|
9
9
|
export { default as Regexam } from "./template/Regexam";
|
|
10
|
+
export { default as Legacy } from "./template/Legacy";
|
|
10
11
|
export { default as Sign } from "./template/Sign";
|
|
11
12
|
export { default as DataField } from "./template/DataField";
|
|
12
13
|
export { default as Gallery } from "./template/Gallery";
|
|
@@ -17,3 +18,4 @@ export { default as TextBox } from "./template/TextBox";
|
|
|
17
18
|
export { default as OlympiadLayout } from "./template/Olympiad/Olympiad.layout";
|
|
18
19
|
export { default as Gomito } from "./template/Gomito";
|
|
19
20
|
export { default as RegexamLayout } from "./template/Regexam/Regexam.layout";
|
|
21
|
+
export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
|
package/layout/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./template/dashboard";
|
|
|
7
7
|
export { default as Event } from "./template/Event";
|
|
8
8
|
export { default as Olympiad } from "./template/Olympiad";
|
|
9
9
|
export { default as Regexam } from "./template/Regexam";
|
|
10
|
+
export { default as Legacy } from "./template/Legacy";
|
|
10
11
|
export { default as Sign } from "./template/Sign";
|
|
11
12
|
export { default as DataField } from "./template/DataField";
|
|
12
13
|
export { default as Gallery } from "./template/Gallery";
|
|
@@ -17,3 +18,4 @@ export { default as TextBox } from "./template/TextBox";
|
|
|
17
18
|
export { default as OlympiadLayout } from "./template/Olympiad/Olympiad.layout";
|
|
18
19
|
export { default as Gomito } from "./template/Gomito";
|
|
19
20
|
export { default as RegexamLayout } from "./template/Regexam/Regexam.layout";
|
|
21
|
+
export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import Legacy from ".";
|
|
4
|
+
import { cn } from "../../../util";
|
|
5
|
+
export default function LegacyLayout({ exams }) {
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const pageWrapper = {
|
|
8
|
+
backgrounds: "bg-[#f6f6f6]/50",
|
|
9
|
+
displays: "flex justify-center items-center",
|
|
10
|
+
sizes: "h-full",
|
|
11
|
+
};
|
|
12
|
+
return (_jsx("div", { className: cn(pageWrapper), children: _jsx(Legacy.Table, { exams: exams }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
import Action from "../Action";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
export default function Table({ exams }) {
|
|
6
|
+
const container = {
|
|
7
|
+
textstyling: "font-pretendard-var antialiased relative",
|
|
8
|
+
backgrounds: "text-gray-medium",
|
|
9
|
+
sizes: "w-screen h-screen scrollbar-hidden max-w-[480px] overflow-y-auto",
|
|
10
|
+
displays: "flex flex-col",
|
|
11
|
+
};
|
|
12
|
+
const inputBoxWrapper = {
|
|
13
|
+
displays: "flex",
|
|
14
|
+
spacings: "p-0",
|
|
15
|
+
scroll: "sticky top-10",
|
|
16
|
+
};
|
|
17
|
+
const inputBox = {
|
|
18
|
+
sizes: "w-full h-fit p-3 rounded-lg mx-10 focus:mx-5",
|
|
19
|
+
focus: "outline-none focus:shadow-main",
|
|
20
|
+
backgrounds: "bg-green-light/50 text-green-dark backdrop-blur-sm",
|
|
21
|
+
animations: "duration-300 appearance-none",
|
|
22
|
+
placeholder: "placeholder-green-dark/50",
|
|
23
|
+
};
|
|
24
|
+
const titleWrapper = {
|
|
25
|
+
displays: "flex flex-col justify-center items-center",
|
|
26
|
+
};
|
|
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",
|
|
34
|
+
};
|
|
35
|
+
const examsWrapper = {
|
|
36
|
+
displays: "flex flex-col gap-6 mt-15",
|
|
37
|
+
spacings: "px-5 mb-6",
|
|
38
|
+
};
|
|
39
|
+
const filter = (exams, str) => exams.filter((exam) => {
|
|
40
|
+
return exam.examName.includes(str);
|
|
41
|
+
});
|
|
42
|
+
const [filterKey, setFilterKey] = useState("");
|
|
43
|
+
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 }))) })] })] }));
|
|
55
|
+
}
|
|
56
|
+
const LevelConvert = {
|
|
57
|
+
10: "PS",
|
|
58
|
+
5: "ST",
|
|
59
|
+
4: "BA",
|
|
60
|
+
3: "JR",
|
|
61
|
+
6: "HJ",
|
|
62
|
+
};
|
|
63
|
+
const TextColorConvert = {
|
|
64
|
+
PS: "text-ps-pink",
|
|
65
|
+
ST: "text-st-orange",
|
|
66
|
+
BA: "text-ba-yellow",
|
|
67
|
+
JR: "text-jr-blue",
|
|
68
|
+
HJ: "text-hj-blue",
|
|
69
|
+
AD: "text-gray-dark",
|
|
70
|
+
CC: "text-gray-dark",
|
|
71
|
+
IN: "text-gray-dark",
|
|
72
|
+
};
|
|
73
|
+
function Row({ examName, reports, groupReport }) {
|
|
74
|
+
const examWrapper = {
|
|
75
|
+
displays: "flex flex-col",
|
|
76
|
+
backgrounds: "bg-white",
|
|
77
|
+
spacings: "p-5",
|
|
78
|
+
sizes: "rounded-2xl",
|
|
79
|
+
shadows: "hover:shadow-main",
|
|
80
|
+
animations: "duration-300",
|
|
81
|
+
};
|
|
82
|
+
const examTitle = {
|
|
83
|
+
textStyling: "font-medium",
|
|
84
|
+
};
|
|
85
|
+
const divider = {
|
|
86
|
+
sizes: "w-full h-0.5 mt-1 mb-5",
|
|
87
|
+
backgrounds: "bg-gray-light",
|
|
88
|
+
};
|
|
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
|
+
const tableWrapper = {
|
|
99
|
+
displays: "flex flex-col",
|
|
100
|
+
spacings: "gap-4",
|
|
101
|
+
};
|
|
102
|
+
const rowWrapper = {
|
|
103
|
+
displays: "flex flex-row justify-between w-full font-medium",
|
|
104
|
+
};
|
|
105
|
+
const textWrapper = {
|
|
106
|
+
displays: "flex flex-row gap-2",
|
|
107
|
+
sizes: "w-fit h-fit",
|
|
108
|
+
};
|
|
109
|
+
const levelTag = {
|
|
110
|
+
textStyling: "font-bold",
|
|
111
|
+
sizes: "w-fit h-fit",
|
|
112
|
+
spacings: "px-2 rounded-md",
|
|
113
|
+
backgrounds: "bg-[#f6f6f6]/50",
|
|
114
|
+
};
|
|
115
|
+
const button = {
|
|
116
|
+
sizes: "w-fit h-fit",
|
|
117
|
+
spacings: "px-2 py-1 rounded-md",
|
|
118
|
+
textstyles: "text-xs",
|
|
119
|
+
backgrounds: "bg-green-light/50",
|
|
120
|
+
shadows: "hover:shadow-main",
|
|
121
|
+
};
|
|
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" }) }) }))] }));
|
|
123
|
+
}
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.145
|