@edu-tosel/design 1.0.6 → 1.0.7
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/README.md +0 -20
- package/{src/board/index.tsx → board/index.d.ts} +3 -4
- package/board/index.js +3 -0
- package/board/template/CanvasBoard.d.ts +2 -0
- package/board/template/CanvasBoard.js +10 -0
- package/board/template/ManageBoard.d.ts +4 -0
- package/board/template/ManageBoard.js +27 -0
- package/board/widget/Board.d.ts +2 -0
- package/board/widget/Board.js +16 -0
- package/board/widget/DataField.d.ts +6 -0
- package/board/widget/DataField.js +24 -0
- package/board/widget/Header.d.ts +2 -0
- package/board/widget/Header.js +22 -0
- package/board/widget/Tab.d.ts +4 -0
- package/board/widget/Tab.js +17 -0
- package/board/widget/Tags.d.ts +3 -0
- package/board/widget/Tags.js +30 -0
- package/{src/card/index.tsx → card/index.d.ts} +6 -6
- package/card/index.js +6 -0
- package/card/template/ChartCard.d.ts +2 -0
- package/card/template/ChartCard.js +6 -0
- package/card/template/InfoCard.d.ts +2 -0
- package/card/template/InfoCard.js +6 -0
- package/card/template/ProfileCard.d.ts +14 -0
- package/card/template/ProfileCard.js +8 -0
- package/card/template/RowCard.d.ts +5 -0
- package/card/template/RowCard.js +26 -0
- package/card/template/TableCard.d.ts +2 -0
- package/card/template/TableCard.js +12 -0
- package/card/template/TrumpCard.d.ts +2 -0
- package/card/template/TrumpCard.js +19 -0
- package/card/widget/Card.d.ts +2 -0
- package/card/widget/Card.js +45 -0
- package/deck/Deck.d.ts +16 -0
- package/deck/Deck.js +15 -0
- package/{src/deck/index.tsx → deck/index.d.ts} +1 -1
- package/deck/index.js +1 -0
- package/{src/index.tsx → index.d.ts} +11 -11
- package/index.js +11 -0
- package/interaction/Exception.d.ts +2 -0
- package/interaction/Exception.js +9 -0
- package/interaction/LoadingSpinner.d.ts +1 -0
- package/interaction/LoadingSpinner.js +5 -0
- package/interaction/NoData.d.ts +1 -0
- package/interaction/NoData.js +4 -0
- package/{src/interaction/index.tsx → interaction/index.d.ts} +2 -2
- package/interaction/index.js +2 -0
- package/interface/Board.d.ts +57 -0
- package/interface/Board.js +1 -0
- package/interface/Card.d.ts +76 -0
- package/interface/Card.js +1 -0
- package/{src/interface/HTMLElement.ts → interface/HTMLElement.d.ts} +23 -27
- package/interface/HTMLElement.js +1 -0
- package/interface/Interaction.d.ts +5 -0
- package/interface/Interaction.js +1 -0
- package/{src/interface/Menu.ts → interface/Menu.d.ts} +5 -5
- package/interface/Menu.js +1 -0
- package/interface/Modal.d.ts +18 -0
- package/interface/Modal.js +1 -0
- package/{src/interface/Property.ts → interface/Property.d.ts} +40 -46
- package/interface/Property.js +14 -0
- package/interface/Widget.d.ts +4 -0
- package/interface/Widget.js +1 -0
- package/{src/interface/index.ts → interface/index.d.ts} +3 -3
- package/interface/index.js +3 -0
- package/layout/dashboard/Header.d.ts +5 -0
- package/layout/dashboard/Header.js +19 -0
- package/layout/dashboard/index.d.ts +7 -0
- package/layout/dashboard/index.js +10 -0
- package/{src/layout/index.tsx → layout/index.d.ts} +1 -1
- package/layout/index.js +1 -0
- package/menu/SideMenu.d.ts +2 -0
- package/menu/SideMenu.js +27 -0
- package/{src/menu/index.tsx → menu/index.d.ts} +1 -1
- package/menu/index.js +1 -0
- package/modal/AlertModal.d.ts +2 -0
- package/modal/AlertModal.js +8 -0
- package/modal/ControllerModal.d.ts +6 -0
- package/modal/ControllerModal.js +6 -0
- package/modal/Modal.d.ts +2 -0
- package/modal/Modal.js +31 -0
- package/modal/TestModal.d.ts +8 -0
- package/modal/TestModal.js +6 -0
- package/{src/modal/index.tsx → modal/index.d.ts} +3 -3
- package/modal/index.js +3 -0
- package/navigation/Navigation.d.ts +5 -0
- package/navigation/Navigation.js +24 -0
- package/{src/navigation/index.tsx → navigation/index.d.ts} +1 -1
- package/navigation/index.js +1 -0
- package/package.json +28 -49
- package/shelf/Shelf.d.ts +4 -0
- package/shelf/Shelf.js +4 -0
- package/{src/shelf/index.tsx → shelf/index.d.ts} +1 -1
- package/shelf/index.js +1 -0
- package/store/index.d.ts +16 -0
- package/store/index.js +39 -0
- package/text/LineBreaks.d.ts +4 -0
- package/text/LineBreaks.js +5 -0
- package/{src/text/index.tsx → text/index.d.ts} +1 -1
- package/text/index.js +1 -0
- package/util/classNames.d.ts +1 -0
- package/util/classNames.js +4 -0
- package/util/colors.d.ts +10 -0
- package/util/colors.js +10 -0
- package/util/display.d.ts +25 -0
- package/util/display.js +25 -0
- package/util/displayResponsive.d.ts +3 -0
- package/util/displayResponsive.js +15 -0
- package/{src/util/index.ts → util/index.d.ts} +7 -7
- package/util/index.js +7 -0
- package/util/pattern.d.ts +7 -0
- package/util/pattern.js +15 -0
- package/util/position.d.ts +14 -0
- package/util/position.js +44 -0
- package/util/shape.d.ts +1 -0
- package/util/shape.js +3 -0
- package/version.txt +1 -0
- package/.eslintrc.cjs +0 -17
- package/Dockerfile +0 -16
- package/LICENCE +0 -19
- package/docs/README.md +0 -47
- package/index.html +0 -13
- package/postcss.config.js +0 -6
- package/public/images/daeng.jpg +0 -0
- package/public/images/faker.jpg +0 -0
- package/public/images/haerin.png +0 -0
- package/public/images/haewon.png +0 -0
- package/public/images/hani.png +0 -0
- package/public/images/home/admin.png +0 -0
- package/public/images/home/dashboard.png +0 -0
- package/public/images/home/detection.png +0 -0
- package/public/images/home/homepage.png +0 -0
- package/public/images/home/olympiad.png +0 -0
- package/public/images/home/partner.png +0 -0
- package/public/images/home/report.png +0 -0
- package/public/images/home/space.png +0 -0
- package/public/images/home/sun.png +0 -0
- package/public/images/info.png +0 -0
- package/public/images/itc.png +0 -0
- package/public/images/jenkins.png +0 -0
- package/public/images/minji.png +0 -0
- package/public/images/seulgi.png +0 -0
- package/public/images/test-full.png +0 -0
- package/public/images/test-image.png +0 -0
- package/public/images/test-paper.png +0 -0
- package/public/images/tosel-blue-lab-spiral.png +0 -0
- package/public/images/tosel.png +0 -0
- package/public/images/yujin.png +0 -0
- package/public/videos/loading.gif +0 -0
- package/public/vite.svg +0 -1
- package/setupPackage.js +0 -78
- package/src/App.tsx +0 -32
- package/src/_components/asset/interface.ts +0 -2
- package/src/_components/asset/links.ts +0 -17
- package/src/_components/asset/mock/academies.ts +0 -52
- package/src/_components/asset/mock/chartData.ts +0 -104
- package/src/_components/asset/mock/exams.ts +0 -42
- package/src/_components/asset/mock/index.ts +0 -2
- package/src/_components/asset/mock/people.ts +0 -291
- package/src/_components/asset/mock/test.ts +0 -67
- package/src/_components/asset/navigation.ts +0 -17
- package/src/_components/asset/people.ts +0 -226
- package/src/_components/asset/planets.ts +0 -49
- package/src/_components/controller/store.ts +0 -11
- package/src/_components/hook/useRoute.ts +0 -47
- package/src/_components/hook/useTyping.ts +0 -46
- package/src/_components/types/Level.ts +0 -1
- package/src/_components/view/Explore.tsx +0 -16
- package/src/_components/view/Home.tsx +0 -180
- package/src/_components/view/LottiePlayer.tsx +0 -17
- package/src/app/admin/exam/page.tsx +0 -36
- package/src/app/admin/grade/page.tsx +0 -5
- package/src/app/admin/layout.tsx +0 -56
- package/src/app/admin/news/page.tsx +0 -15
- package/src/app/admin/page.tsx +0 -42
- package/src/app/admin/rnd/monthly-test/page.tsx +0 -5
- package/src/app/admin/rnd/page.tsx +0 -17
- package/src/app/admin/statistics/page.tsx +0 -5
- package/src/app/admin/user/page.tsx +0 -147
- package/src/app/agency/exam/page.tsx +0 -5
- package/src/app/agency/group/page.tsx +0 -5
- package/src/app/agency/layout.tsx +0 -55
- package/src/app/agency/page.tsx +0 -68
- package/src/app/agency/sales/page.tsx +0 -5
- package/src/app/convention/page.tsx +0 -58
- package/src/app/page.tsx +0 -4
- package/src/asset/fonts/Kostar.ttf +0 -0
- package/src/asset/fonts/Megrim.ttf +0 -0
- package/src/asset/fonts/NicoMoji.ttf +0 -0
- package/src/asset/fonts/Pretendard-Medium.otf +0 -0
- package/src/board/template/CanvasBoard.tsx +0 -17
- package/src/board/template/ManageBoard.tsx +0 -56
- package/src/board/widget/Board.tsx +0 -28
- package/src/board/widget/DataField.tsx +0 -70
- package/src/board/widget/Header.tsx +0 -63
- package/src/board/widget/Tab.tsx +0 -36
- package/src/board/widget/Tags.tsx +0 -81
- package/src/card/template/ChartCard.tsx +0 -42
- package/src/card/template/InfoCard.tsx +0 -22
- package/src/card/template/ProfileCard.tsx +0 -36
- package/src/card/template/RowCard.tsx +0 -91
- package/src/card/template/TableCard.tsx +0 -41
- package/src/card/template/TrumpCard.tsx +0 -46
- package/src/card/widget/Card.tsx +0 -53
- package/src/deck/Deck.tsx +0 -46
- package/src/interaction/Exception.tsx +0 -10
- package/src/interaction/LoadingSpinner.tsx +0 -10
- package/src/interaction/NoData.tsx +0 -5
- package/src/interface/Board.ts +0 -55
- package/src/interface/Card.ts +0 -66
- package/src/interface/Interaction.ts +0 -4
- package/src/interface/Modal.ts +0 -19
- package/src/interface/Widget.ts +0 -4
- package/src/layout/dashboard/Header.tsx +0 -56
- package/src/layout/dashboard/index.tsx +0 -38
- package/src/main.tsx +0 -10
- package/src/menu/SideMenu.tsx +0 -104
- package/src/modal/AlertModal.tsx +0 -24
- package/src/modal/ControllerModal.tsx +0 -17
- package/src/modal/Modal.tsx +0 -66
- package/src/modal/TestModal.tsx +0 -19
- package/src/navigation/Navigation.tsx +0 -37
- package/src/shelf/Shelf.tsx +0 -3
- package/src/store/index.ts +0 -66
- package/src/text/LineBreaks.tsx +0 -13
- package/src/util/classNames.ts +0 -4
- package/src/util/colors.ts +0 -11
- package/src/util/display.ts +0 -31
- package/src/util/displayResponsive.ts +0 -17
- package/src/util/pattern.ts +0 -18
- package/src/util/position.ts +0 -43
- package/src/util/shape.ts +0 -3
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.build.json +0 -42
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -10
- /package/{public → asset}/fonts/Kostar.ttf +0 -0
- /package/{public → asset}/fonts/Megrim.ttf +0 -0
- /package/{public → asset}/fonts/NicoMoji.ttf +0 -0
- /package/{public → asset}/fonts/Pretendard-Medium.otf +0 -0
- /package/{src/asset → asset}/json/credit-lottie.json +0 -0
- /package/{src/asset → asset}/json/loading-lottie.json +0 -0
- /package/{src/asset → asset}/json/test.svg +0 -0
- /package/{src/globals.css → globals.css} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Deck, Shelf } from "../../..";
|
|
2
|
-
import { CanvasBoard } from "../../../board";
|
|
3
|
-
import InfoCard from "../../../card/template/InfoCard";
|
|
4
|
-
|
|
5
|
-
export default function News() {
|
|
6
|
-
return (
|
|
7
|
-
<CanvasBoard>
|
|
8
|
-
<Shelf>
|
|
9
|
-
<Deck>
|
|
10
|
-
<InfoCard type="prpfileSmall" />
|
|
11
|
-
</Deck>
|
|
12
|
-
</Shelf>
|
|
13
|
-
</CanvasBoard>
|
|
14
|
-
);
|
|
15
|
-
}
|
package/src/app/admin/page.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CanvasBoard,
|
|
3
|
-
ChartCard,
|
|
4
|
-
Deck,
|
|
5
|
-
Shelf,
|
|
6
|
-
TableCard,
|
|
7
|
-
TrumpCard,
|
|
8
|
-
} from "../..";
|
|
9
|
-
import { chartData, academies } from "../../_components/asset/mock";
|
|
10
|
-
import { useWidgetStore } from "./../../store";
|
|
11
|
-
|
|
12
|
-
export default function Admin() {
|
|
13
|
-
return (
|
|
14
|
-
<CanvasBoard>
|
|
15
|
-
<Shelf>
|
|
16
|
-
<Deck titles={{ title: "정기시험 접수자 추이" }}>
|
|
17
|
-
<ChartCard
|
|
18
|
-
data={chartData}
|
|
19
|
-
xAxis="date"
|
|
20
|
-
yAxis="pv"
|
|
21
|
-
lines={[
|
|
22
|
-
{ dataKey: "uv", stroke: "blue" },
|
|
23
|
-
{ dataKey: "pv", stroke: "red" },
|
|
24
|
-
]}
|
|
25
|
-
/>
|
|
26
|
-
</Deck>
|
|
27
|
-
<Deck titles={{ title: "학원 목록" }}>
|
|
28
|
-
<TrumpCard titles={{ title: "학원 목록" }} />
|
|
29
|
-
</Deck>
|
|
30
|
-
</Shelf>
|
|
31
|
-
<Shelf>
|
|
32
|
-
<Deck titles={{ title: "토셀랩 심사 대기" }}>
|
|
33
|
-
<TableCard
|
|
34
|
-
data={academies}
|
|
35
|
-
fields={{ a: "학원명", b: "학원장", c: "전화번호" }}
|
|
36
|
-
sizes={{ a: "1/3", b: "3/10" }}
|
|
37
|
-
/>
|
|
38
|
-
</Deck>
|
|
39
|
-
</Shelf>
|
|
40
|
-
</CanvasBoard>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TrumpCard } from "../../..";
|
|
2
|
-
import { CanvasBoard } from "../../../board";
|
|
3
|
-
import { useWidgetStore } from "../../../store";
|
|
4
|
-
|
|
5
|
-
export default function Rnd() {
|
|
6
|
-
const { setModal } = useWidgetStore();
|
|
7
|
-
return (
|
|
8
|
-
<CanvasBoard>
|
|
9
|
-
<TrumpCard
|
|
10
|
-
titles={{ title: "Monthly Test" }}
|
|
11
|
-
options={{
|
|
12
|
-
onClick: () => setModal("test"),
|
|
13
|
-
}}
|
|
14
|
-
/>
|
|
15
|
-
</CanvasBoard>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { User, users } from "../../../_components/asset/mock/people";
|
|
2
|
-
import { Level } from "../../../_components/types/Level";
|
|
3
|
-
import { ManageBoard } from "../../../board";
|
|
4
|
-
import { useEffect, useState } from "react";
|
|
5
|
-
import SideMenu from "./../../../menu/SideMenu";
|
|
6
|
-
import RowCard from "../../../card/template/RowCard";
|
|
7
|
-
import { AlertModal } from "../../../modal";
|
|
8
|
-
import { LoadingSpinner } from "../../../interaction";
|
|
9
|
-
import NoData from "../../../interaction/NoData";
|
|
10
|
-
import { settings, userLogs } from "./../../../_components/asset/mock/test";
|
|
11
|
-
|
|
12
|
-
export default function Users() {
|
|
13
|
-
const [name, setName] = useState<string>("");
|
|
14
|
-
const [birthday, setBirthday] = useState<string>("");
|
|
15
|
-
const [level, setLevel] = useState<string>("");
|
|
16
|
-
|
|
17
|
-
const selectOptions: [Level, string][] = [
|
|
18
|
-
["", "선택해주세요."],
|
|
19
|
-
["PS", "Pre-Starter"],
|
|
20
|
-
["ST", "Starter"],
|
|
21
|
-
["BA", "Basic"],
|
|
22
|
-
["JR", "Junior"],
|
|
23
|
-
["HJ", "High Junior"],
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
const selectUserOptions: [Level, string][] = [
|
|
27
|
-
["PS", "Pre-Starter"],
|
|
28
|
-
["ST", "Starter"],
|
|
29
|
-
["BA", "Basic"],
|
|
30
|
-
["JR", "Junior"],
|
|
31
|
-
["HJ", "High Junior"],
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
const [isLoading, setIsActive] = useState<boolean>(true);
|
|
35
|
-
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
const timer = setTimeout(() => {
|
|
38
|
-
setIsActive(false);
|
|
39
|
-
}, 3000);
|
|
40
|
-
|
|
41
|
-
return () => clearTimeout(timer);
|
|
42
|
-
}, []);
|
|
43
|
-
|
|
44
|
-
const userTest = (prop?: "y" | "n") => {
|
|
45
|
-
return prop === "n" ? undefined : users;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const userTestValue = userTest("y");
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<ManageBoard
|
|
52
|
-
widgets={{
|
|
53
|
-
exceptions: [
|
|
54
|
-
[!userTestValue && !isLoading, <NoData />],
|
|
55
|
-
[isLoading, <LoadingSpinner />],
|
|
56
|
-
],
|
|
57
|
-
components: [
|
|
58
|
-
[
|
|
59
|
-
"isLoading",
|
|
60
|
-
<AlertModal title="TITLE" scripts={{ script: "Script" }} />,
|
|
61
|
-
],
|
|
62
|
-
],
|
|
63
|
-
tabs: [
|
|
64
|
-
["전체", () => {}],
|
|
65
|
-
["학생", () => {}],
|
|
66
|
-
["선생님", () => {}],
|
|
67
|
-
],
|
|
68
|
-
menu: (
|
|
69
|
-
<SideMenu
|
|
70
|
-
log={{
|
|
71
|
-
prints: ["title"],
|
|
72
|
-
logs: userLogs,
|
|
73
|
-
}}
|
|
74
|
-
setting={settings}
|
|
75
|
-
/>
|
|
76
|
-
),
|
|
77
|
-
}}
|
|
78
|
-
header={{
|
|
79
|
-
title: "유저 관리",
|
|
80
|
-
tags: {
|
|
81
|
-
selects: [
|
|
82
|
-
{
|
|
83
|
-
width: "xs",
|
|
84
|
-
title: "레벨",
|
|
85
|
-
options: selectOptions,
|
|
86
|
-
onChange: setLevel,
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
inputs: [
|
|
90
|
-
{
|
|
91
|
-
width: "xs",
|
|
92
|
-
title: "생년월일",
|
|
93
|
-
placeholder: "생일 입력",
|
|
94
|
-
onChange: setBirthday,
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
width: "sm",
|
|
98
|
-
title: "이름",
|
|
99
|
-
placeholder: "이름을 입력해주세요.",
|
|
100
|
-
onChange: setName,
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
},
|
|
104
|
-
}}
|
|
105
|
-
data={{
|
|
106
|
-
dataField: {
|
|
107
|
-
fields: {
|
|
108
|
-
id: "ID",
|
|
109
|
-
name: "이름",
|
|
110
|
-
level: "레벨",
|
|
111
|
-
},
|
|
112
|
-
sizes: {
|
|
113
|
-
id: "8",
|
|
114
|
-
name: "25",
|
|
115
|
-
level: "33",
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
dataSets: [
|
|
119
|
-
{
|
|
120
|
-
items: userTestValue?.filter(
|
|
121
|
-
(user) =>
|
|
122
|
-
user.level.includes(level) &&
|
|
123
|
-
user.birthday.includes(birthday) &&
|
|
124
|
-
user.name.includes(name)
|
|
125
|
-
),
|
|
126
|
-
renderItem: (user) => (
|
|
127
|
-
<RowCard
|
|
128
|
-
key={user.id}
|
|
129
|
-
row={user}
|
|
130
|
-
fields={{
|
|
131
|
-
id: "text",
|
|
132
|
-
name: "text",
|
|
133
|
-
level: ["select", selectUserOptions],
|
|
134
|
-
}}
|
|
135
|
-
sizes={{
|
|
136
|
-
id: "8",
|
|
137
|
-
name: "25",
|
|
138
|
-
level: "33",
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
),
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Link, useLocation } from "react-router-dom";
|
|
2
|
-
import { buttonClassNames } from "../../navigation";
|
|
3
|
-
import Explore from "../../_components/view/Explore";
|
|
4
|
-
import { DashboardLayout } from "../../layout";
|
|
5
|
-
|
|
6
|
-
const navigations = [
|
|
7
|
-
{
|
|
8
|
-
href: "",
|
|
9
|
-
title: "홈",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
href: "/user",
|
|
13
|
-
title: "단체관리",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
href: "/exam",
|
|
17
|
-
title: "시험관리",
|
|
18
|
-
// 학생 관리, 학생 정보 수정 정기시험-기관시험-경시대회
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
href: "/sales",
|
|
22
|
-
title: "매출 현황",
|
|
23
|
-
// 본인지역 얼마나 잘됐는지
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
href: "/headquarter",
|
|
27
|
-
title: "소통해요",
|
|
28
|
-
// 소통해요
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
33
|
-
const { pathname: nowPath } = useLocation();
|
|
34
|
-
const [title] = nowPath.split("/").slice(-1);
|
|
35
|
-
return (
|
|
36
|
-
<>
|
|
37
|
-
<DashboardLayout
|
|
38
|
-
subject={[title, "/images/tosel.png", "https://tosel.org"]}
|
|
39
|
-
colors={["green-dark/60", "green-dark"]}
|
|
40
|
-
navigations={navigations.map(({ href, title }) => (
|
|
41
|
-
<Link
|
|
42
|
-
key={href}
|
|
43
|
-
to={"/agency" + href}
|
|
44
|
-
className={buttonClassNames(href, nowPath, ["white", "green-dark"])}
|
|
45
|
-
>
|
|
46
|
-
{title}
|
|
47
|
-
</Link>
|
|
48
|
-
))}
|
|
49
|
-
>
|
|
50
|
-
{children}
|
|
51
|
-
</DashboardLayout>
|
|
52
|
-
<Explore />
|
|
53
|
-
</>
|
|
54
|
-
);
|
|
55
|
-
}
|
package/src/app/agency/page.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { CanvasBoard, Deck, Shelf, TableCard, TrumpCard } from "../..";
|
|
2
|
-
|
|
3
|
-
export default function PartnerPage() {
|
|
4
|
-
return (
|
|
5
|
-
<CanvasBoard>
|
|
6
|
-
<Shelf>
|
|
7
|
-
<Deck titles={{ title: "이번달 집중 실적" }}>
|
|
8
|
-
<TrumpCard
|
|
9
|
-
titles={{
|
|
10
|
-
title: "이번달 정기시험 성과는",
|
|
11
|
-
subTitle: ["0원입니다."],
|
|
12
|
-
}}
|
|
13
|
-
options={{ width: "xl" }}
|
|
14
|
-
/>
|
|
15
|
-
<TrumpCard
|
|
16
|
-
titles={{
|
|
17
|
-
title: "이번달 기관시험 성과는",
|
|
18
|
-
subTitle: ["1000원입니다."],
|
|
19
|
-
}}
|
|
20
|
-
options={{ width: "sm" }}
|
|
21
|
-
/>
|
|
22
|
-
</Deck>
|
|
23
|
-
</Shelf>
|
|
24
|
-
<Shelf>
|
|
25
|
-
<Deck titles={{ title: "정기시험" }}>
|
|
26
|
-
<TrumpCard
|
|
27
|
-
titles={{
|
|
28
|
-
title: "정기시험",
|
|
29
|
-
subTitle: [
|
|
30
|
-
"고사장 마감까지 D-1입니다.",
|
|
31
|
-
"접수 마감까지 D-7입니다.",
|
|
32
|
-
],
|
|
33
|
-
}}
|
|
34
|
-
options={{ width: "md" }}
|
|
35
|
-
/>
|
|
36
|
-
</Deck>
|
|
37
|
-
<Deck titles={{ title: "우리 TOSEL MVP" }}>
|
|
38
|
-
<TableCard
|
|
39
|
-
data={data}
|
|
40
|
-
fields={{ name: "이름", sales: "매출액" }}
|
|
41
|
-
sizes={{ name: "1/3" }}
|
|
42
|
-
/>
|
|
43
|
-
</Deck>
|
|
44
|
-
</Shelf>
|
|
45
|
-
</CanvasBoard>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
interface Data extends Record<string, string | number> {
|
|
50
|
-
name: string;
|
|
51
|
-
sales: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const data: Data[] = [
|
|
55
|
-
{
|
|
56
|
-
name: "최광주",
|
|
57
|
-
sales: "13,000,000",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: "장호성",
|
|
61
|
-
sales: "2,000,000",
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
name: "안혜진",
|
|
66
|
-
sales: "1,200,000",
|
|
67
|
-
},
|
|
68
|
-
];
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import tovention from "../../../tailwind.config";
|
|
2
|
-
|
|
3
|
-
export default function Convention() {
|
|
4
|
-
const {
|
|
5
|
-
extend: { fontFamily, screens, fontSize, colors, inset },
|
|
6
|
-
} = tovention.theme;
|
|
7
|
-
|
|
8
|
-
const scripts = [
|
|
9
|
-
{
|
|
10
|
-
name: "colors",
|
|
11
|
-
help: "기본적으로 color-description 형태로 설정되어 있다.",
|
|
12
|
-
value: colors,
|
|
13
|
-
display: "bg-",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "screens",
|
|
17
|
-
help: "화면 크기에 따른 breakpoint 설정",
|
|
18
|
-
value: screens,
|
|
19
|
-
display: "",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: "fontSize",
|
|
23
|
-
help: "rem은 px을 16으로 나눈 값이다. 16px = 1rem",
|
|
24
|
-
value: fontSize,
|
|
25
|
-
display: "text-",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: "fontFamily",
|
|
29
|
-
help: "",
|
|
30
|
-
value: fontFamily,
|
|
31
|
-
display: "font-",
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<div className="min-h-screen w-full flex flex-col items-center text-xl pt-16">
|
|
37
|
-
<div className="border-2 w-9/10 p-4 flex flex-col gap-4">
|
|
38
|
-
{scripts.map(({ name, help, value, display }) => (
|
|
39
|
-
<div key={name} className="flex flex-col gap-4">
|
|
40
|
-
<div className="text-3xl font-bold">{`${name}: ${help}`}</div>
|
|
41
|
-
<div className="text-xl">
|
|
42
|
-
{Object.entries(value).map(([innerKey, innerValue]) => {
|
|
43
|
-
return (
|
|
44
|
-
<div key={innerKey} className="flex gap-4">
|
|
45
|
-
<div>{innerKey}</div>
|
|
46
|
-
<div className={display ? `${display}${innerKey}` : ""}>
|
|
47
|
-
{innerValue}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
})}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
))}
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
}
|
package/src/app/page.tsx
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BoardProps } from "../../interface/Board";
|
|
2
|
-
import { cn } from "../../util";
|
|
3
|
-
import { Board } from "../widget/Board";
|
|
4
|
-
|
|
5
|
-
export default function CanvasBoard({ children, options }: BoardProps) {
|
|
6
|
-
const layouts = "flex flex-col lg:flex-row lg:flex-wrap gap-7.5 ";
|
|
7
|
-
const sizes = "h-full ";
|
|
8
|
-
const paddings =
|
|
9
|
-
"pb-36 xl:pb-0 px-2 xs:px-4 xl:pl-8 xl:pr-2 pt-2 xs:pt-4 xl:pt-8";
|
|
10
|
-
const styles = "overflow-y-scroll ";
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<Board options={options}>
|
|
14
|
-
<div className={cn(layouts, sizes, paddings, styles)}>{children}</div>
|
|
15
|
-
</Board>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Deck } from "../../deck";
|
|
2
|
-
import { cn } from "../../util";
|
|
3
|
-
import { Board } from "../widget/Board";
|
|
4
|
-
import BoardHeader from "../widget/Header";
|
|
5
|
-
import BoardDataField from "../widget/DataField";
|
|
6
|
-
import { ManageBoardProps } from "../../interface/Board";
|
|
7
|
-
import { useWidgetStore } from "../../store";
|
|
8
|
-
import { Exception } from "../../interaction";
|
|
9
|
-
|
|
10
|
-
type Item = Record<string, any>;
|
|
11
|
-
export default function ManageBoard<T extends Item>({
|
|
12
|
-
header,
|
|
13
|
-
data,
|
|
14
|
-
widgets,
|
|
15
|
-
}: ManageBoardProps<T>) {
|
|
16
|
-
const {
|
|
17
|
-
order: [orderBy, orderHow],
|
|
18
|
-
} = useWidgetStore();
|
|
19
|
-
const { dataSets, dataField, gap } = data;
|
|
20
|
-
const positions = `flex flex-col gap-${gap ?? 0}`;
|
|
21
|
-
const sizes = `h-full ${dataField ? "xl:h-135" : "xl:h-158"}`;
|
|
22
|
-
const paddings = "pb-60 xl:pb-0 px-2 xs:px-4 xl:px-8";
|
|
23
|
-
const styles = "overflow-y-scroll";
|
|
24
|
-
return (
|
|
25
|
-
<Board widgets={widgets}>
|
|
26
|
-
<BoardHeader {...header} />
|
|
27
|
-
{dataField && <BoardDataField dataField={dataField} />}
|
|
28
|
-
<div className={cn(positions, sizes, paddings, styles)}>
|
|
29
|
-
<Exception exceptions={widgets?.exceptions}>
|
|
30
|
-
{dataSets.map(({ title: deckTitle, items, renderItem }) =>
|
|
31
|
-
deckTitle ? (
|
|
32
|
-
<div key={deckTitle} className="pt-4">
|
|
33
|
-
<Deck titles={{ title: deckTitle ?? "" }}>
|
|
34
|
-
{items?.map((item) => renderItem(item))}
|
|
35
|
-
</Deck>
|
|
36
|
-
</div>
|
|
37
|
-
) : (
|
|
38
|
-
items
|
|
39
|
-
?.slice()
|
|
40
|
-
.sort((a, b) => {
|
|
41
|
-
if (orderBy) {
|
|
42
|
-
if (orderHow === "asc")
|
|
43
|
-
return a[orderBy] > b[orderBy] ? 1 : -1;
|
|
44
|
-
return a[orderBy] < b[orderBy] ? 1 : -1;
|
|
45
|
-
}
|
|
46
|
-
return 0;
|
|
47
|
-
})
|
|
48
|
-
.map((item) => renderItem(item))
|
|
49
|
-
)
|
|
50
|
-
)}
|
|
51
|
-
</Exception>
|
|
52
|
-
</div>
|
|
53
|
-
{widgets?.menu}
|
|
54
|
-
</Board>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useWidgetStore } from "../../store";
|
|
2
|
-
import { BoardProps } from "../../interface/Board";
|
|
3
|
-
import Tab from "./Tab";
|
|
4
|
-
|
|
5
|
-
export function Board({ children, widgets }: BoardProps) {
|
|
6
|
-
const { events } = useWidgetStore();
|
|
7
|
-
const { components, tabs } = widgets ?? {};
|
|
8
|
-
|
|
9
|
-
const classNames = [
|
|
10
|
-
`h-full xl:min-h-0 `,
|
|
11
|
-
"xl:rounded-xl bg-white relative w-full z-10 overflow-hidden",
|
|
12
|
-
].join(" ");
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className="h-full xl:min-h-0 xl:h-178 w-full relative ">
|
|
16
|
-
<div className={classNames}>
|
|
17
|
-
{children}
|
|
18
|
-
{components?.map(([flag, Component]) => {
|
|
19
|
-
if (typeof flag === "boolean") return flag ? <>{Component}</> : null;
|
|
20
|
-
return events?.some(({ event }) => event === flag) ? (
|
|
21
|
-
<>{Component}</>
|
|
22
|
-
) : null;
|
|
23
|
-
})}
|
|
24
|
-
</div>
|
|
25
|
-
{tabs && <Tab tabs={tabs} />}
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../util";
|
|
2
|
-
import { useWidgetStore } from "./../../store";
|
|
3
|
-
|
|
4
|
-
export default function BoardDataField({
|
|
5
|
-
dataField,
|
|
6
|
-
}: {
|
|
7
|
-
dataField: {
|
|
8
|
-
fields: Record<string, string>;
|
|
9
|
-
sizes: Record<string, string>;
|
|
10
|
-
};
|
|
11
|
-
}) {
|
|
12
|
-
const {
|
|
13
|
-
order: [orderBy, orderHow],
|
|
14
|
-
setOrder,
|
|
15
|
-
} = useWidgetStore();
|
|
16
|
-
const { fields, sizes } = dataField;
|
|
17
|
-
|
|
18
|
-
const container = {
|
|
19
|
-
positions: "fixed top-40 left-0 xl:static",
|
|
20
|
-
displays: "flex items-center",
|
|
21
|
-
styles: `bg-gray-200`,
|
|
22
|
-
sizes: "w-full h-23",
|
|
23
|
-
};
|
|
24
|
-
const dataFieldContainer = {
|
|
25
|
-
displays: "flex items-center",
|
|
26
|
-
sizes: "w-full h-12",
|
|
27
|
-
paddings: "px-2 xs:px-4 xl:px-8",
|
|
28
|
-
styles: "bg-white-off",
|
|
29
|
-
};
|
|
30
|
-
const block = {
|
|
31
|
-
displays: "xl:hidden block ",
|
|
32
|
-
sizes: container.sizes,
|
|
33
|
-
};
|
|
34
|
-
return (
|
|
35
|
-
<>
|
|
36
|
-
<div
|
|
37
|
-
className={cn(
|
|
38
|
-
container.positions,
|
|
39
|
-
container.displays,
|
|
40
|
-
container.sizes,
|
|
41
|
-
container.styles
|
|
42
|
-
)}
|
|
43
|
-
>
|
|
44
|
-
<div
|
|
45
|
-
className={cn(
|
|
46
|
-
dataFieldContainer.displays,
|
|
47
|
-
dataFieldContainer.sizes,
|
|
48
|
-
dataFieldContainer.paddings,
|
|
49
|
-
dataFieldContainer.styles
|
|
50
|
-
)}
|
|
51
|
-
>
|
|
52
|
-
{Object.entries(fields).map(([key, value]) => (
|
|
53
|
-
<div key={key} className={`w-${`${sizes[key]}/100` ?? "auto"}`}>
|
|
54
|
-
<button
|
|
55
|
-
onClick={() => setOrder(key)}
|
|
56
|
-
className="flex items-center gap-1"
|
|
57
|
-
>
|
|
58
|
-
<div>{value}</div>
|
|
59
|
-
<div className="text-xs">
|
|
60
|
-
{orderBy === key ? (orderHow === "asc" ? "▼" : "▲") : ""}
|
|
61
|
-
</div>
|
|
62
|
-
</button>
|
|
63
|
-
</div>
|
|
64
|
-
))}
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
<div className={cn(block.sizes, block.displays)} />
|
|
68
|
-
</>
|
|
69
|
-
);
|
|
70
|
-
}
|