@edu-tosel/design 1.0.5 → 1.0.6

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 (243) hide show
  1. package/.eslintrc.cjs +17 -0
  2. package/Dockerfile +16 -0
  3. package/LICENCE +19 -0
  4. package/README.md +20 -0
  5. package/docs/README.md +47 -0
  6. package/index.html +13 -0
  7. package/package.json +49 -28
  8. package/postcss.config.js +6 -0
  9. package/public/images/daeng.jpg +0 -0
  10. package/public/images/faker.jpg +0 -0
  11. package/public/images/haerin.png +0 -0
  12. package/public/images/haewon.png +0 -0
  13. package/public/images/hani.png +0 -0
  14. package/public/images/home/admin.png +0 -0
  15. package/public/images/home/dashboard.png +0 -0
  16. package/public/images/home/detection.png +0 -0
  17. package/public/images/home/homepage.png +0 -0
  18. package/public/images/home/olympiad.png +0 -0
  19. package/public/images/home/partner.png +0 -0
  20. package/public/images/home/report.png +0 -0
  21. package/public/images/home/space.png +0 -0
  22. package/public/images/home/sun.png +0 -0
  23. package/public/images/info.png +0 -0
  24. package/public/images/itc.png +0 -0
  25. package/public/images/jenkins.png +0 -0
  26. package/public/images/minji.png +0 -0
  27. package/public/images/seulgi.png +0 -0
  28. package/public/images/test-full.png +0 -0
  29. package/public/images/test-image.png +0 -0
  30. package/public/images/test-paper.png +0 -0
  31. package/public/images/tosel-blue-lab-spiral.png +0 -0
  32. package/public/images/tosel.png +0 -0
  33. package/public/images/yujin.png +0 -0
  34. package/public/videos/loading.gif +0 -0
  35. package/public/vite.svg +1 -0
  36. package/setupPackage.js +78 -0
  37. package/src/App.tsx +32 -0
  38. package/src/_components/asset/interface.ts +2 -0
  39. package/src/_components/asset/links.ts +17 -0
  40. package/src/_components/asset/mock/academies.ts +52 -0
  41. package/src/_components/asset/mock/chartData.ts +104 -0
  42. package/src/_components/asset/mock/exams.ts +42 -0
  43. package/src/_components/asset/mock/index.ts +2 -0
  44. package/src/_components/asset/mock/people.ts +291 -0
  45. package/src/_components/asset/mock/test.ts +67 -0
  46. package/src/_components/asset/navigation.ts +17 -0
  47. package/src/_components/asset/people.ts +226 -0
  48. package/src/_components/asset/planets.ts +49 -0
  49. package/src/_components/controller/store.ts +11 -0
  50. package/src/_components/hook/useRoute.ts +47 -0
  51. package/src/_components/hook/useTyping.ts +46 -0
  52. package/src/_components/types/Level.ts +1 -0
  53. package/src/_components/view/Explore.tsx +16 -0
  54. package/src/_components/view/Home.tsx +180 -0
  55. package/src/_components/view/LottiePlayer.tsx +17 -0
  56. package/src/app/admin/exam/page.tsx +36 -0
  57. package/src/app/admin/grade/page.tsx +5 -0
  58. package/src/app/admin/layout.tsx +56 -0
  59. package/src/app/admin/news/page.tsx +15 -0
  60. package/src/app/admin/page.tsx +42 -0
  61. package/src/app/admin/rnd/monthly-test/page.tsx +5 -0
  62. package/src/app/admin/rnd/page.tsx +17 -0
  63. package/src/app/admin/statistics/page.tsx +5 -0
  64. package/src/app/admin/user/page.tsx +147 -0
  65. package/src/app/agency/exam/page.tsx +5 -0
  66. package/src/app/agency/group/page.tsx +5 -0
  67. package/src/app/agency/layout.tsx +55 -0
  68. package/src/app/agency/page.tsx +68 -0
  69. package/src/app/agency/sales/page.tsx +5 -0
  70. package/src/app/convention/page.tsx +58 -0
  71. package/src/app/page.tsx +4 -0
  72. package/src/asset/fonts/Kostar.ttf +0 -0
  73. package/src/asset/fonts/Megrim.ttf +0 -0
  74. package/src/asset/fonts/NicoMoji.ttf +0 -0
  75. package/src/asset/fonts/Pretendard-Medium.otf +0 -0
  76. package/{board/index.d.ts → src/board/index.tsx} +4 -3
  77. package/src/board/template/CanvasBoard.tsx +17 -0
  78. package/src/board/template/ManageBoard.tsx +56 -0
  79. package/src/board/widget/Board.tsx +28 -0
  80. package/src/board/widget/DataField.tsx +70 -0
  81. package/src/board/widget/Header.tsx +63 -0
  82. package/src/board/widget/Tab.tsx +36 -0
  83. package/src/board/widget/Tags.tsx +81 -0
  84. package/{card/index.d.ts → src/card/index.tsx} +6 -5
  85. package/src/card/template/ChartCard.tsx +42 -0
  86. package/src/card/template/InfoCard.tsx +22 -0
  87. package/src/card/template/ProfileCard.tsx +36 -0
  88. package/src/card/template/RowCard.tsx +91 -0
  89. package/src/card/template/TableCard.tsx +41 -0
  90. package/src/card/template/TrumpCard.tsx +46 -0
  91. package/src/card/widget/Card.tsx +53 -0
  92. package/src/deck/Deck.tsx +46 -0
  93. package/{deck/index.d.ts → src/deck/index.tsx} +1 -1
  94. package/{index.d.ts → src/index.tsx} +11 -11
  95. package/src/interaction/Exception.tsx +10 -0
  96. package/src/interaction/LoadingSpinner.tsx +10 -0
  97. package/src/interaction/NoData.tsx +5 -0
  98. package/{interaction/index.d.ts → src/interaction/index.tsx} +2 -2
  99. package/src/interface/Board.ts +55 -0
  100. package/src/interface/Card.ts +66 -0
  101. package/src/interface/HTMLElement.ts +27 -0
  102. package/src/interface/Interaction.ts +4 -0
  103. package/src/interface/Menu.ts +5 -0
  104. package/src/interface/Modal.ts +19 -0
  105. package/{interface/Property.d.ts → src/interface/Property.ts} +46 -34
  106. package/src/interface/Widget.ts +4 -0
  107. package/{interface/index.d.ts → src/interface/index.ts} +3 -2
  108. package/src/layout/dashboard/Header.tsx +56 -0
  109. package/src/layout/dashboard/index.tsx +38 -0
  110. package/{layout/index.d.ts → src/layout/index.tsx} +1 -1
  111. package/src/main.tsx +10 -0
  112. package/src/menu/SideMenu.tsx +104 -0
  113. package/{menu/index.d.ts → src/menu/index.tsx} +1 -1
  114. package/src/modal/AlertModal.tsx +24 -0
  115. package/src/modal/ControllerModal.tsx +17 -0
  116. package/src/modal/Modal.tsx +66 -0
  117. package/src/modal/TestModal.tsx +19 -0
  118. package/{modal/index.d.ts → src/modal/index.tsx} +3 -3
  119. package/src/navigation/Navigation.tsx +37 -0
  120. package/{navigation/index.d.ts → src/navigation/index.tsx} +1 -1
  121. package/src/shelf/Shelf.tsx +3 -0
  122. package/{shelf/index.d.ts → src/shelf/index.tsx} +1 -1
  123. package/src/store/index.ts +66 -0
  124. package/src/text/LineBreaks.tsx +13 -0
  125. package/{text/index.d.ts → src/text/index.tsx} +1 -1
  126. package/src/util/classNames.ts +4 -0
  127. package/src/util/colors.ts +11 -0
  128. package/src/util/display.ts +31 -0
  129. package/src/util/displayResponsive.ts +17 -0
  130. package/{util/index.d.ts → src/util/index.ts} +7 -7
  131. package/src/util/pattern.ts +18 -0
  132. package/src/util/position.ts +43 -0
  133. package/src/util/shape.ts +3 -0
  134. package/src/vite-env.d.ts +1 -0
  135. package/tsconfig.build.json +42 -0
  136. package/tsconfig.json +28 -0
  137. package/tsconfig.node.json +10 -0
  138. package/vite.config.ts +10 -0
  139. package/board/index.js +0 -3
  140. package/board/template/CanvasBoard.d.ts +0 -2
  141. package/board/template/CanvasBoard.js +0 -10
  142. package/board/template/ManageBoard.d.ts +0 -4
  143. package/board/template/ManageBoard.js +0 -28
  144. package/board/widget/Board.d.ts +0 -2
  145. package/board/widget/Board.js +0 -16
  146. package/board/widget/DataField.d.ts +0 -6
  147. package/board/widget/DataField.js +0 -24
  148. package/board/widget/Header.d.ts +0 -2
  149. package/board/widget/Header.js +0 -22
  150. package/board/widget/Tab.d.ts +0 -4
  151. package/board/widget/Tab.js +0 -17
  152. package/board/widget/Tags.d.ts +0 -3
  153. package/board/widget/Tags.js +0 -30
  154. package/card/index.js +0 -5
  155. package/card/template/ChartCard.d.ts +0 -2
  156. package/card/template/ChartCard.js +0 -6
  157. package/card/template/ProfileCard.d.ts +0 -14
  158. package/card/template/ProfileCard.js +0 -8
  159. package/card/template/RowCard.d.ts +0 -5
  160. package/card/template/RowCard.js +0 -26
  161. package/card/template/TableCard.d.ts +0 -2
  162. package/card/template/TableCard.js +0 -12
  163. package/card/template/TrumpCard.d.ts +0 -2
  164. package/card/template/TrumpCard.js +0 -19
  165. package/card/widget/Card.d.ts +0 -2
  166. package/card/widget/Card.js +0 -45
  167. package/deck/Deck.d.ts +0 -16
  168. package/deck/Deck.js +0 -15
  169. package/deck/index.js +0 -1
  170. package/index.js +0 -11
  171. package/interaction/Exception.d.ts +0 -2
  172. package/interaction/Exception.js +0 -9
  173. package/interaction/LoadingSpinner.d.ts +0 -1
  174. package/interaction/LoadingSpinner.js +0 -5
  175. package/interaction/NoData.d.ts +0 -1
  176. package/interaction/NoData.js +0 -4
  177. package/interaction/index.js +0 -2
  178. package/interface/Board.d.ts +0 -57
  179. package/interface/Board.js +0 -1
  180. package/interface/Card.d.ts +0 -73
  181. package/interface/Card.js +0 -1
  182. package/interface/HTMLElement.d.ts +0 -13
  183. package/interface/HTMLElement.js +0 -1
  184. package/interface/Interaction.d.ts +0 -5
  185. package/interface/Interaction.js +0 -1
  186. package/interface/Modal.d.ts +0 -18
  187. package/interface/Modal.js +0 -1
  188. package/interface/Property.js +0 -14
  189. package/interface/Widget.d.ts +0 -4
  190. package/interface/Widget.js +0 -1
  191. package/interface/index.js +0 -2
  192. package/layout/dashboard/Header.d.ts +0 -5
  193. package/layout/dashboard/Header.js +0 -19
  194. package/layout/dashboard/index.d.ts +0 -7
  195. package/layout/dashboard/index.js +0 -10
  196. package/layout/index.js +0 -1
  197. package/menu/SideMenu.d.ts +0 -1
  198. package/menu/SideMenu.js +0 -14
  199. package/menu/index.js +0 -1
  200. package/modal/AlertModal.d.ts +0 -2
  201. package/modal/AlertModal.js +0 -8
  202. package/modal/ControllerModal.d.ts +0 -6
  203. package/modal/ControllerModal.js +0 -6
  204. package/modal/Modal.d.ts +0 -2
  205. package/modal/Modal.js +0 -31
  206. package/modal/TestModal.d.ts +0 -8
  207. package/modal/TestModal.js +0 -6
  208. package/modal/index.js +0 -3
  209. package/navigation/Navigation.d.ts +0 -5
  210. package/navigation/Navigation.js +0 -24
  211. package/navigation/index.js +0 -1
  212. package/shelf/Shelf.d.ts +0 -4
  213. package/shelf/Shelf.js +0 -4
  214. package/shelf/index.js +0 -1
  215. package/store/index.d.ts +0 -16
  216. package/store/index.js +0 -39
  217. package/text/LineBreaks.d.ts +0 -4
  218. package/text/LineBreaks.js +0 -5
  219. package/text/index.js +0 -1
  220. package/util/classNames.d.ts +0 -1
  221. package/util/classNames.js +0 -4
  222. package/util/colors.d.ts +0 -10
  223. package/util/colors.js +0 -10
  224. package/util/display.d.ts +0 -25
  225. package/util/display.js +0 -25
  226. package/util/displayResponsive.d.ts +0 -3
  227. package/util/displayResponsive.js +0 -15
  228. package/util/index.js +0 -7
  229. package/util/pattern.d.ts +0 -7
  230. package/util/pattern.js +0 -15
  231. package/util/position.d.ts +0 -14
  232. package/util/position.js +0 -44
  233. package/util/shape.d.ts +0 -1
  234. package/util/shape.js +0 -3
  235. package/version.txt +0 -1
  236. /package/{asset → public}/fonts/Kostar.ttf +0 -0
  237. /package/{asset → public}/fonts/Megrim.ttf +0 -0
  238. /package/{asset → public}/fonts/NicoMoji.ttf +0 -0
  239. /package/{asset → public}/fonts/Pretendard-Medium.otf +0 -0
  240. /package/{asset → src/asset}/json/credit-lottie.json +0 -0
  241. /package/{asset → src/asset}/json/loading-lottie.json +0 -0
  242. /package/{asset → src/asset}/json/test.svg +0 -0
  243. /package/{globals.css → src/globals.css} +0 -0
package/.eslintrc.cjs ADDED
@@ -0,0 +1,17 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: { browser: true, es2020: true },
4
+ extends: [
5
+ "eslint:recommended",
6
+ "plugin:@typescript-eslint/recommended",
7
+ "plugin:react-hooks/recommended",
8
+ ],
9
+ ignorePatterns: ["dist", ".eslintrc.cjs", "tailwind.config.ts"],
10
+ parser: "@typescript-eslint/parser",
11
+ plugins: ["react-refresh"],
12
+ rules: {
13
+ "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
14
+ "@typescript-eslint/no-explicit-any": "off",
15
+ "react-refresh/only-export-components": "off",
16
+ },
17
+ };
package/Dockerfile ADDED
@@ -0,0 +1,16 @@
1
+ FROM node:18-alpine
2
+
3
+ RUN mkdir -p /usr/app
4
+ WORKDIR /usr/app
5
+
6
+ # Install dependencies based on the preferred package manager
7
+ COPY ./ ./
8
+
9
+ RUN npm ci
10
+
11
+ RUN npm run build
12
+ RUN rm -rf src
13
+
14
+ EXPOSE 12345
15
+
16
+ CMD ["npx", "serve", "-s", "build", "-l", "12345"]
package/LICENCE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024 International TOSEL Committee
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  TOSEL 통합 디자인 시스템에 맞춘 UI 라이브러리
4
4
 
5
+ ## Tech Stack
6
+
7
+ - tailwindcss 3.4.1
8
+ - React 18
9
+ - Vite 5
10
+
11
+ ## Getting Start
12
+
13
+ ```bash
14
+ # 설치
15
+ npm install @edu-tosel/design@latest
16
+
17
+ # 개발환경
18
+ npm install # 의존성 설치
19
+ npm run dev # 개발자 환경에서 실행
20
+ npm run test # jest 실행
21
+ npm run build # 빌드
22
+ npm run publish # npm 배포
23
+ ```
24
+
5
25
  ## Component
6
26
 
7
27
  컴포넌트들은 기본적으로 기능 단위로만 구성한다.
package/docs/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # TOSEL Design Library
2
+
3
+ TOSEL 통합 디자인 시스템에 맞춘 UI 라이브러리
4
+
5
+ ## Component
6
+
7
+ 컴포넌트들은 기본적으로 기능 단위로만 구성한다.
8
+
9
+ 도메인은 구분하지 않는다. 단, Layout 컴포넌트에 대해서만 예외적으로 허용한다.
10
+
11
+ ### Board
12
+
13
+ Board 컴포넌트는 가장 큰 단위의 컨테이너이다.
14
+
15
+ 일반적으로
16
+
17
+ ### Card
18
+
19
+ Card 컴포넌트는 여러가지 요소를 담고 있는 컨테이너이다.
20
+
21
+ 일반적으로 가장 최소 단위의 컴포넌트로 사용되며, 다양한 요소를 담을 수 있다.
22
+
23
+ ### Deck
24
+
25
+ Deck 컴포넌트는 여러가지 Card 컴포넌트를 담고 있는 컨테이너이다.
26
+
27
+ Deck 컴포넌트는 담고있는 Card 컴포넌트들을 수평 정렬한다.
28
+
29
+ ### Layout
30
+
31
+ Layout 컴포넌트는 여러가지 컴포넌트를 담고 있는 컨테이너이다.
32
+
33
+ Layout 컴포넌트는 특정 프로젝트에서 반복적으로 사용되는 컴포넌트의 구조를 형성한다.
34
+
35
+ ### Navigation
36
+
37
+ Navigation 컴포넌트는 여러가지 링크를 담고 있는 컨테이너이다.
38
+
39
+ 각각의 링크 컴포넌트의 스타일링은 buttonClassNames로 전달받는다.
40
+
41
+ (Next.js의 Link Component와 React의 Link Component는 호환이 되지 않기 때문.)
42
+
43
+ ### Shelf
44
+
45
+ Shelf 컴포넌트는 Board 컴포넌트 내부에 위치하며 여러가지 Deck 컴포넌트를 담고 있는 컨테이너이다.
46
+
47
+ Shelf 컴포넌트는 담고있는 Deck 컴포넌트들을 수직 정렬한다.
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>DESIGN SPACE</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
package/package.json CHANGED
@@ -1,28 +1,49 @@
1
- {
2
- "name": "@edu-tosel/design",
3
- "version": "1.0.5",
4
- "description": "UI components for International TOSEL Committee",
5
- "keywords": [
6
- "jsx",
7
- "tsx",
8
- "tailwindcss",
9
- "ui",
10
- "design system"
11
- ],
12
- "author": "International TOSEL Committee",
13
- "license": "MIT",
14
- "type": "module",
15
- "scripts": {},
16
- "dependencies": {
17
- "react": "^18.2.0",
18
- "react-dom": "^18.2.0",
19
- "react-lottie-player": "^1.5.6",
20
- "react-router-dom": "^6.21.3",
21
- "recharts": "^2.11.0",
22
- "tailwind-scrollbar-hide": "^1.1.7",
23
- "tailwindcss-animate": "^1.0.7",
24
- "typescript": "^5.2.2",
25
- "zustand": "^4.5.0"
26
- },
27
- "devDependencies": {}
28
- }
1
+ {
2
+ "name": "@edu-tosel/design",
3
+ "version": "1.0.6",
4
+ "description": "UI components for International TOSEL Committee",
5
+ "keywords": [
6
+ "jsx",
7
+ "tsx",
8
+ "tailwindcss",
9
+ "ui",
10
+ "design system"
11
+ ],
12
+ "author": "International TOSEL Committee",
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build": "tsc && vite build",
18
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
19
+ "preview": "vite preview",
20
+ "build-publish": "rimraf ./dist && tsc -p tsconfig.build.json --noEmit false",
21
+ "publish": "npm run build-publish && node setupPackage.js && cd dist && npm publish"
22
+ },
23
+ "dependencies": {
24
+ "react": "^18.2.0",
25
+ "react-dom": "^18.2.0",
26
+ "react-lottie-player": "^1.5.6",
27
+ "react-router-dom": "^6.21.3",
28
+ "recharts": "^2.11.0",
29
+ "tailwind-scrollbar-hide": "^1.1.7",
30
+ "tailwindcss-animate": "^1.0.7",
31
+ "typescript": "^5.2.2",
32
+ "zustand": "^4.5.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/react": "^18.2.43",
36
+ "@types/react-dom": "^18.2.17",
37
+ "@typescript-eslint/eslint-plugin": "^6.14.0",
38
+ "@typescript-eslint/parser": "^6.14.0",
39
+ "@vitejs/plugin-react-swc": "^3.5.0",
40
+ "autoprefixer": "^10.4.17",
41
+ "eslint": "^8.55.0",
42
+ "eslint-plugin-react-hooks": "^4.6.0",
43
+ "eslint-plugin-react-refresh": "^0.4.5",
44
+ "postcss": "^8.4.33",
45
+ "rimraf": "^5.0.5",
46
+ "tailwindcss": "^3.4.1",
47
+ "vite": "^5.0.8"
48
+ }
49
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,78 @@
1
+ import fs from "fs";
2
+ import path, { dirname } from "path";
3
+ import { fileURLToPath } from "url";
4
+ import { Buffer } from "buffer";
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+
9
+ function copyDirectory(src, dest) {
10
+ if (!fs.existsSync(dest)) {
11
+ fs.mkdirSync(dest, { recursive: true });
12
+ }
13
+
14
+ const entries = fs.readdirSync(src, { withFileTypes: true });
15
+
16
+ for (let entry of entries) {
17
+ const srcPath = path.join(src, entry.name);
18
+ const destPath = path.join(dest, entry.name);
19
+
20
+ if (entry.isDirectory()) {
21
+ copyDirectory(srcPath, destPath);
22
+ } else {
23
+ fs.copyFileSync(srcPath, destPath);
24
+ }
25
+ }
26
+ }
27
+
28
+ function main() {
29
+ const distPath = path.join(__dirname, "dist");
30
+ const styleCssPath = path.join(__dirname, "src/globals.css");
31
+ const assetPath = path.join(__dirname, "src", "asset");
32
+ const packageJsonPath = path.join(__dirname, "package.json");
33
+ const tailwindConfigPath = path.join(__dirname, "tailwind.config.ts");
34
+ const readmePath = path.join(__dirname, "docs", "README.md");
35
+
36
+ if (!fs.existsSync(distPath)) {
37
+ fs.mkdirSync(distPath);
38
+ }
39
+
40
+ const source = fs.readFileSync(packageJsonPath).toString("utf-8");
41
+ const sourceObj = JSON.parse(source);
42
+ sourceObj.scripts = {};
43
+ sourceObj.devDependencies = {};
44
+
45
+ if (sourceObj.main && sourceObj.main.startsWith("/dist/")) {
46
+ sourceObj.main = sourceObj.main.slice(5);
47
+ }
48
+
49
+ const distAssetPath = path.join(distPath, "asset");
50
+ const distStyleCssPath = path.join(distPath, "globals.css");
51
+ const distPackageJsonPath = path.join(distPath, "package.json");
52
+ const versionFilePath = path.join(distPath, "version.txt");
53
+ const npmignorePath = path.join(distPath, ".npmignore");
54
+ const distTailwindConfigPath = path.join(distPath, "tailwind.config.ts");
55
+ const distReadmePath = path.join(distPath, "README.md");
56
+
57
+ fs.writeFileSync(
58
+ distPackageJsonPath,
59
+ Buffer.from(JSON.stringify(sourceObj, null, 2), "utf-8")
60
+ );
61
+ fs.writeFileSync(versionFilePath, Buffer.from(sourceObj.version, "utf-8"));
62
+
63
+ if (fs.existsSync(styleCssPath)) {
64
+ fs.copyFileSync(styleCssPath, distStyleCssPath);
65
+ }
66
+ if (fs.existsSync(npmignorePath)) {
67
+ fs.copyFileSync(npmignorePath, path.join(distPath, ".npmignore"));
68
+ }
69
+ if (fs.existsSync(tailwindConfigPath)) {
70
+ fs.copyFileSync(tailwindConfigPath, distTailwindConfigPath);
71
+ }
72
+ if (fs.existsSync(readmePath)) {
73
+ fs.copyFileSync(readmePath, distReadmePath);
74
+ }
75
+ copyDirectory(assetPath, distAssetPath);
76
+ }
77
+
78
+ main();
package/src/App.tsx ADDED
@@ -0,0 +1,32 @@
1
+ import { BrowserRouter, Route, Routes } from "react-router-dom";
2
+ import { ComponentType, Fragment } from "react";
3
+ import useRoute from "./_components/hook/useRoute";
4
+
5
+ export default function App() {
6
+ const routes = useRoute();
7
+
8
+ return (
9
+ <BrowserRouter>
10
+ <Routes>
11
+ {routes.map(({ path, component, layout }) => {
12
+ return (
13
+ <Route
14
+ key={path}
15
+ path={path}
16
+ element={RenderComponent(component, layout)}
17
+ />
18
+ );
19
+ })}
20
+ <Route path="*" element={<div>404 Not Found</div>} />
21
+ </Routes>
22
+ </BrowserRouter>
23
+ );
24
+ }
25
+
26
+ function RenderComponent(
27
+ Component: ComponentType<any>,
28
+ Layout: ComponentType<any> | null
29
+ ) {
30
+ if (Layout) return <Layout children={<Component />} />;
31
+ return <Fragment children={<Component />} />;
32
+ }
@@ -0,0 +1,2 @@
1
+ export type Planet = "partner" | "admin" | "olympiad" | "report" | "homepage";
2
+ export type Status = "waiting" | "doing" | "done";
@@ -0,0 +1,17 @@
1
+ export const links = [
2
+ {
3
+ title: "olympiad",
4
+ },
5
+ {
6
+ title: "admin",
7
+ },
8
+ {
9
+ title: "partner",
10
+ },
11
+ {
12
+ title: "report",
13
+ },
14
+ {
15
+ title: "homepage",
16
+ },
17
+ ];
@@ -0,0 +1,52 @@
1
+ export const academies = [
2
+ {
3
+ a: "코기토어학원",
4
+ b: "그레이스윌리엄로버트",
5
+ c: "010-1234-5678",
6
+ },
7
+ {
8
+ a: "토셀랩어학원",
9
+ b: "토셀랩",
10
+ c: "010-1234-5678",
11
+ },
12
+ {
13
+ a: "토셀랩어학원",
14
+ b: "토셀랩",
15
+ c: "010-1234-5678",
16
+ },
17
+ {
18
+ a: "토셀랩어학원",
19
+ b: "토셀랩",
20
+ c: "010-1234-5678",
21
+ },
22
+ {
23
+ a: "토셀랩어학원",
24
+ b: "토셀랩",
25
+ c: "010-1234-5678",
26
+ },
27
+ {
28
+ a: "토셀랩어학원",
29
+ b: "토셀랩",
30
+ c: "010-1234-5678",
31
+ },
32
+ {
33
+ a: "토셀랩어학원",
34
+ b: "토셀랩",
35
+ c: "010-1234-5678",
36
+ },
37
+ {
38
+ a: "토셀랩어학원",
39
+ b: "토셀랩",
40
+ c: "010-1234-5678",
41
+ },
42
+ {
43
+ a: "토셀랩어학원",
44
+ b: "토셀랩",
45
+ c: "010-1234-5678",
46
+ },
47
+ {
48
+ a: "토셀랩어학원",
49
+ b: "토셀랩",
50
+ c: "010-1234-5678",
51
+ },
52
+ ];
@@ -0,0 +1,104 @@
1
+ export const chartData = [
2
+ {
3
+ date: "1/10",
4
+ uv: 4000,
5
+ pv: 2400,
6
+ amt: 2400,
7
+ },
8
+ {
9
+ date: "1/11",
10
+ uv: 3000,
11
+ pv: 1398,
12
+ amt: 2210,
13
+ },
14
+ {
15
+ date: "1/12",
16
+ uv: 2000,
17
+ pv: 9800,
18
+ amt: 2290,
19
+ },
20
+ {
21
+ date: "1/13",
22
+ uv: 2780,
23
+ pv: 3908,
24
+ amt: 2000,
25
+ },
26
+ {
27
+ date: "1/14",
28
+ uv: 1890,
29
+ pv: 4800,
30
+ amt: 2181,
31
+ },
32
+ {
33
+ date: "1/15",
34
+ uv: 2390,
35
+ pv: 3800,
36
+ amt: 2500,
37
+ },
38
+ {
39
+ date: "1/15",
40
+ uv: 2390,
41
+ pv: 3800,
42
+ amt: 2500,
43
+ },
44
+ {
45
+ date: "1/15",
46
+ uv: 2390,
47
+ pv: 3800,
48
+ amt: 2500,
49
+ },
50
+ {
51
+ date: "1/15",
52
+ uv: 2390,
53
+ pv: 3800,
54
+ amt: 2500,
55
+ },
56
+ {
57
+ date: "1/15",
58
+ uv: 2390,
59
+ pv: 3800,
60
+ amt: 2500,
61
+ },
62
+ {
63
+ date: "1/15",
64
+ uv: 2390,
65
+ pv: 3800,
66
+ amt: 2500,
67
+ },
68
+ {
69
+ date: "1/15",
70
+ uv: 2390,
71
+ pv: 3800,
72
+ amt: 2500,
73
+ },
74
+ {
75
+ date: "1/15",
76
+ uv: 2390,
77
+ pv: 3800,
78
+ amt: 2500,
79
+ },
80
+ {
81
+ date: "1/15",
82
+ uv: 2390,
83
+ pv: 3800,
84
+ amt: 2500,
85
+ },
86
+ {
87
+ date: "1/15",
88
+ uv: 2390,
89
+ pv: 3800,
90
+ amt: 2500,
91
+ },
92
+ {
93
+ date: "1/15",
94
+ uv: 2390,
95
+ pv: 3800,
96
+ amt: 2500,
97
+ },
98
+ {
99
+ date: "1/15",
100
+ uv: 2390,
101
+ pv: 3800,
102
+ amt: 2500,
103
+ },
104
+ ];
@@ -0,0 +1,42 @@
1
+ export interface Exam {
2
+ id: number;
3
+ status: "active" | "inactive";
4
+ title: string;
5
+ type: string;
6
+ managerUserId: number;
7
+ createdAt: string;
8
+ }
9
+ export const exams: Exam[] = [
10
+ {
11
+ id: 1,
12
+ status: "active",
13
+ title: "exam1",
14
+ type: "exam",
15
+ managerUserId: 1,
16
+ createdAt: "2021-08-01",
17
+ },
18
+ {
19
+ id: 2,
20
+ status: "inactive",
21
+ title: "exam2",
22
+ type: "exam",
23
+ managerUserId: 1,
24
+ createdAt: "2021-08-06",
25
+ },
26
+ {
27
+ id: 3,
28
+ status: "inactive",
29
+ title: "exam3",
30
+ type: "exam",
31
+ managerUserId: 1,
32
+ createdAt: "2021-08-11",
33
+ },
34
+ {
35
+ id: 4,
36
+ status: "inactive",
37
+ title: "exam4",
38
+ type: "exam",
39
+ managerUserId: 1,
40
+ createdAt: "2021-08-16",
41
+ },
42
+ ];
@@ -0,0 +1,2 @@
1
+ export * from "./chartData";
2
+ export * from "./academies";