@edu-tosel/design 1.0.6 → 1.0.8

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.
Files changed (252) hide show
  1. package/README.md +0 -20
  2. package/{src/board/index.tsx → board/index.d.ts} +3 -4
  3. package/board/index.js +3 -0
  4. package/board/template/CanvasBoard.d.ts +2 -0
  5. package/board/template/CanvasBoard.js +10 -0
  6. package/board/template/ManageBoard.d.ts +4 -0
  7. package/board/template/ManageBoard.js +27 -0
  8. package/board/widget/Board.d.ts +2 -0
  9. package/board/widget/Board.js +16 -0
  10. package/board/widget/DataField.d.ts +6 -0
  11. package/board/widget/DataField.js +24 -0
  12. package/board/widget/Header.d.ts +2 -0
  13. package/board/widget/Header.js +22 -0
  14. package/board/widget/Tab.d.ts +4 -0
  15. package/board/widget/Tab.js +17 -0
  16. package/board/widget/Tags.d.ts +3 -0
  17. package/board/widget/Tags.js +30 -0
  18. package/{src/card/index.tsx → card/index.d.ts} +6 -6
  19. package/card/index.js +6 -0
  20. package/card/template/ChartCard.d.ts +2 -0
  21. package/card/template/ChartCard.js +6 -0
  22. package/card/template/InfoCard.d.ts +2 -0
  23. package/card/template/InfoCard.js +6 -0
  24. package/card/template/ProfileCard.d.ts +14 -0
  25. package/card/template/ProfileCard.js +8 -0
  26. package/card/template/RowCard.d.ts +5 -0
  27. package/card/template/RowCard.js +26 -0
  28. package/card/template/TableCard.d.ts +2 -0
  29. package/card/template/TableCard.js +12 -0
  30. package/card/template/TrumpCard.d.ts +2 -0
  31. package/card/template/TrumpCard.js +19 -0
  32. package/card/widget/Card.d.ts +2 -0
  33. package/card/widget/Card.js +45 -0
  34. package/deck/Deck.d.ts +16 -0
  35. package/deck/Deck.js +15 -0
  36. package/{src/deck/index.tsx → deck/index.d.ts} +1 -1
  37. package/deck/index.js +1 -0
  38. package/{src/index.tsx → index.d.ts} +11 -11
  39. package/index.js +11 -0
  40. package/interaction/index.d.ts +4 -0
  41. package/interaction/index.js +4 -0
  42. package/interaction/template/Exception.d.ts +2 -0
  43. package/interaction/template/Exception.js +9 -0
  44. package/interaction/widget/LoadingJumper.d.ts +1 -0
  45. package/interaction/widget/LoadingJumper.js +4 -0
  46. package/interaction/widget/LoadingSpinner.d.ts +1 -0
  47. package/interaction/widget/LoadingSpinner.js +5 -0
  48. package/interaction/widget/NoData.d.ts +1 -0
  49. package/interaction/widget/NoData.js +4 -0
  50. package/interface/Board.d.ts +57 -0
  51. package/interface/Board.js +1 -0
  52. package/interface/Card.d.ts +76 -0
  53. package/interface/Card.js +1 -0
  54. package/{src/interface/HTMLElement.ts → interface/HTMLElement.d.ts} +23 -27
  55. package/interface/HTMLElement.js +1 -0
  56. package/interface/Interaction.d.ts +5 -0
  57. package/interface/Interaction.js +1 -0
  58. package/interface/Menu.d.ts +6 -0
  59. package/interface/Menu.js +1 -0
  60. package/interface/Modal.d.ts +18 -0
  61. package/interface/Modal.js +1 -0
  62. package/{src/interface/Property.ts → interface/Property.d.ts} +40 -46
  63. package/interface/Property.js +14 -0
  64. package/interface/Widget.d.ts +4 -0
  65. package/interface/Widget.js +1 -0
  66. package/{src/interface/index.ts → interface/index.d.ts} +3 -3
  67. package/interface/index.js +3 -0
  68. package/layout/dashboard/Header.d.ts +5 -0
  69. package/layout/dashboard/Header.js +19 -0
  70. package/layout/dashboard/index.d.ts +7 -0
  71. package/layout/dashboard/index.js +10 -0
  72. package/{src/layout/index.tsx → layout/index.d.ts} +1 -1
  73. package/layout/index.js +1 -0
  74. package/menu/index.d.ts +1 -0
  75. package/menu/index.js +1 -0
  76. package/menu/template/SideMenu.d.ts +2 -0
  77. package/menu/template/SideMenu.js +20 -0
  78. package/menu/widget/HTMLElement.d.ts +8 -0
  79. package/menu/widget/HTMLElement.js +9 -0
  80. package/modal/AlertModal.d.ts +2 -0
  81. package/modal/AlertModal.js +8 -0
  82. package/modal/ControllerModal.d.ts +6 -0
  83. package/modal/ControllerModal.js +6 -0
  84. package/modal/Modal.d.ts +2 -0
  85. package/modal/Modal.js +31 -0
  86. package/modal/TestModal.d.ts +8 -0
  87. package/modal/TestModal.js +6 -0
  88. package/{src/modal/index.tsx → modal/index.d.ts} +3 -3
  89. package/modal/index.js +3 -0
  90. package/navigation/Navigation.d.ts +5 -0
  91. package/navigation/Navigation.js +24 -0
  92. package/{src/navigation/index.tsx → navigation/index.d.ts} +1 -1
  93. package/navigation/index.js +1 -0
  94. package/package.json +28 -49
  95. package/shelf/Shelf.d.ts +4 -0
  96. package/shelf/Shelf.js +4 -0
  97. package/{src/shelf/index.tsx → shelf/index.d.ts} +1 -1
  98. package/shelf/index.js +1 -0
  99. package/store/index.d.ts +16 -0
  100. package/store/index.js +39 -0
  101. package/text/LineBreaks.d.ts +4 -0
  102. package/text/LineBreaks.js +5 -0
  103. package/{src/text/index.tsx → text/index.d.ts} +1 -1
  104. package/text/index.js +1 -0
  105. package/util/classNames.d.ts +1 -0
  106. package/util/classNames.js +4 -0
  107. package/util/colors.d.ts +10 -0
  108. package/util/colors.js +10 -0
  109. package/util/display.d.ts +25 -0
  110. package/util/display.js +25 -0
  111. package/util/displayResponsive.d.ts +3 -0
  112. package/util/displayResponsive.js +15 -0
  113. package/{src/util/index.ts → util/index.d.ts} +7 -7
  114. package/util/index.js +7 -0
  115. package/util/pattern.d.ts +7 -0
  116. package/util/pattern.js +15 -0
  117. package/util/position.d.ts +14 -0
  118. package/util/position.js +44 -0
  119. package/util/shape.d.ts +1 -0
  120. package/util/shape.js +3 -0
  121. package/version.txt +1 -0
  122. package/.eslintrc.cjs +0 -17
  123. package/Dockerfile +0 -16
  124. package/LICENCE +0 -19
  125. package/docs/README.md +0 -47
  126. package/index.html +0 -13
  127. package/postcss.config.js +0 -6
  128. package/public/images/daeng.jpg +0 -0
  129. package/public/images/faker.jpg +0 -0
  130. package/public/images/haerin.png +0 -0
  131. package/public/images/haewon.png +0 -0
  132. package/public/images/hani.png +0 -0
  133. package/public/images/home/admin.png +0 -0
  134. package/public/images/home/dashboard.png +0 -0
  135. package/public/images/home/detection.png +0 -0
  136. package/public/images/home/homepage.png +0 -0
  137. package/public/images/home/olympiad.png +0 -0
  138. package/public/images/home/partner.png +0 -0
  139. package/public/images/home/report.png +0 -0
  140. package/public/images/home/space.png +0 -0
  141. package/public/images/home/sun.png +0 -0
  142. package/public/images/info.png +0 -0
  143. package/public/images/itc.png +0 -0
  144. package/public/images/jenkins.png +0 -0
  145. package/public/images/minji.png +0 -0
  146. package/public/images/seulgi.png +0 -0
  147. package/public/images/test-full.png +0 -0
  148. package/public/images/test-image.png +0 -0
  149. package/public/images/test-paper.png +0 -0
  150. package/public/images/tosel-blue-lab-spiral.png +0 -0
  151. package/public/images/tosel.png +0 -0
  152. package/public/images/yujin.png +0 -0
  153. package/public/videos/loading.gif +0 -0
  154. package/public/vite.svg +0 -1
  155. package/setupPackage.js +0 -78
  156. package/src/App.tsx +0 -32
  157. package/src/_components/asset/interface.ts +0 -2
  158. package/src/_components/asset/links.ts +0 -17
  159. package/src/_components/asset/mock/academies.ts +0 -52
  160. package/src/_components/asset/mock/chartData.ts +0 -104
  161. package/src/_components/asset/mock/exams.ts +0 -42
  162. package/src/_components/asset/mock/index.ts +0 -2
  163. package/src/_components/asset/mock/people.ts +0 -291
  164. package/src/_components/asset/mock/test.ts +0 -67
  165. package/src/_components/asset/navigation.ts +0 -17
  166. package/src/_components/asset/people.ts +0 -226
  167. package/src/_components/asset/planets.ts +0 -49
  168. package/src/_components/controller/store.ts +0 -11
  169. package/src/_components/hook/useRoute.ts +0 -47
  170. package/src/_components/hook/useTyping.ts +0 -46
  171. package/src/_components/types/Level.ts +0 -1
  172. package/src/_components/view/Explore.tsx +0 -16
  173. package/src/_components/view/Home.tsx +0 -180
  174. package/src/_components/view/LottiePlayer.tsx +0 -17
  175. package/src/app/admin/exam/page.tsx +0 -36
  176. package/src/app/admin/grade/page.tsx +0 -5
  177. package/src/app/admin/layout.tsx +0 -56
  178. package/src/app/admin/news/page.tsx +0 -15
  179. package/src/app/admin/page.tsx +0 -42
  180. package/src/app/admin/rnd/monthly-test/page.tsx +0 -5
  181. package/src/app/admin/rnd/page.tsx +0 -17
  182. package/src/app/admin/statistics/page.tsx +0 -5
  183. package/src/app/admin/user/page.tsx +0 -147
  184. package/src/app/agency/exam/page.tsx +0 -5
  185. package/src/app/agency/group/page.tsx +0 -5
  186. package/src/app/agency/layout.tsx +0 -55
  187. package/src/app/agency/page.tsx +0 -68
  188. package/src/app/agency/sales/page.tsx +0 -5
  189. package/src/app/convention/page.tsx +0 -58
  190. package/src/app/page.tsx +0 -4
  191. package/src/asset/fonts/Kostar.ttf +0 -0
  192. package/src/asset/fonts/Megrim.ttf +0 -0
  193. package/src/asset/fonts/NicoMoji.ttf +0 -0
  194. package/src/asset/fonts/Pretendard-Medium.otf +0 -0
  195. package/src/board/template/CanvasBoard.tsx +0 -17
  196. package/src/board/template/ManageBoard.tsx +0 -56
  197. package/src/board/widget/Board.tsx +0 -28
  198. package/src/board/widget/DataField.tsx +0 -70
  199. package/src/board/widget/Header.tsx +0 -63
  200. package/src/board/widget/Tab.tsx +0 -36
  201. package/src/board/widget/Tags.tsx +0 -81
  202. package/src/card/template/ChartCard.tsx +0 -42
  203. package/src/card/template/InfoCard.tsx +0 -22
  204. package/src/card/template/ProfileCard.tsx +0 -36
  205. package/src/card/template/RowCard.tsx +0 -91
  206. package/src/card/template/TableCard.tsx +0 -41
  207. package/src/card/template/TrumpCard.tsx +0 -46
  208. package/src/card/widget/Card.tsx +0 -53
  209. package/src/deck/Deck.tsx +0 -46
  210. package/src/interaction/Exception.tsx +0 -10
  211. package/src/interaction/LoadingSpinner.tsx +0 -10
  212. package/src/interaction/NoData.tsx +0 -5
  213. package/src/interaction/index.tsx +0 -2
  214. package/src/interface/Board.ts +0 -55
  215. package/src/interface/Card.ts +0 -66
  216. package/src/interface/Interaction.ts +0 -4
  217. package/src/interface/Menu.ts +0 -5
  218. package/src/interface/Modal.ts +0 -19
  219. package/src/interface/Widget.ts +0 -4
  220. package/src/layout/dashboard/Header.tsx +0 -56
  221. package/src/layout/dashboard/index.tsx +0 -38
  222. package/src/main.tsx +0 -10
  223. package/src/menu/SideMenu.tsx +0 -104
  224. package/src/menu/index.tsx +0 -1
  225. package/src/modal/AlertModal.tsx +0 -24
  226. package/src/modal/ControllerModal.tsx +0 -17
  227. package/src/modal/Modal.tsx +0 -66
  228. package/src/modal/TestModal.tsx +0 -19
  229. package/src/navigation/Navigation.tsx +0 -37
  230. package/src/shelf/Shelf.tsx +0 -3
  231. package/src/store/index.ts +0 -66
  232. package/src/text/LineBreaks.tsx +0 -13
  233. package/src/util/classNames.ts +0 -4
  234. package/src/util/colors.ts +0 -11
  235. package/src/util/display.ts +0 -31
  236. package/src/util/displayResponsive.ts +0 -17
  237. package/src/util/pattern.ts +0 -18
  238. package/src/util/position.ts +0 -43
  239. package/src/util/shape.ts +0 -3
  240. package/src/vite-env.d.ts +0 -1
  241. package/tsconfig.build.json +0 -42
  242. package/tsconfig.json +0 -28
  243. package/tsconfig.node.json +0 -10
  244. package/vite.config.ts +0 -10
  245. /package/{public → asset}/fonts/Kostar.ttf +0 -0
  246. /package/{public → asset}/fonts/Megrim.ttf +0 -0
  247. /package/{public → asset}/fonts/NicoMoji.ttf +0 -0
  248. /package/{public → asset}/fonts/Pretendard-Medium.otf +0 -0
  249. /package/{src/asset → asset}/json/credit-lottie.json +0 -0
  250. /package/{src/asset → asset}/json/loading-lottie.json +0 -0
  251. /package/{src/asset → asset}/json/test.svg +0 -0
  252. /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
- }
@@ -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,5 +0,0 @@
1
- import { CanvasBoard } from "../../../..";
2
-
3
- export default function MonthlyTestPage() {
4
- return <CanvasBoard>Monthly fst-normal</CanvasBoard>;
5
- }
@@ -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,5 +0,0 @@
1
- import { CanvasBoard } from "../../../board";
2
-
3
- export default function StatisticsPage() {
4
- return <CanvasBoard>statistics</CanvasBoard>;
5
- }
@@ -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,5 +0,0 @@
1
- import { CanvasBoard } from "../../..";
2
-
3
- export default function Exam() {
4
- return <CanvasBoard>group</CanvasBoard>;
5
- }
@@ -1,5 +0,0 @@
1
- import { CanvasBoard } from "../../..";
2
-
3
- export default function User() {
4
- return <CanvasBoard>Test</CanvasBoard>;
5
- }
@@ -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
- }
@@ -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,5 +0,0 @@
1
- import { CanvasBoard } from "../../..";
2
-
3
- export default function Sales() {
4
- return <CanvasBoard>Test</CanvasBoard>;
5
- }
@@ -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
@@ -1,4 +0,0 @@
1
- import Home from "../_components/view/Home";
2
- export default function Page() {
3
- return <Home />;
4
- }
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
- }