@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
package/package.json CHANGED
@@ -1,49 +1,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
- }
1
+ {
2
+ "name": "@edu-tosel/design",
3
+ "version": "1.0.8",
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
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export default function Shelf({ children }: {
3
+ children: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
package/shelf/Shelf.js ADDED
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export default function Shelf({ children }) {
3
+ return _jsx("div", { className: "inline-flex flex-col gap-8 xl:w-auto", children: children });
4
+ }
@@ -1 +1 @@
1
- export { default as Shelf } from "./Shelf";
1
+ export { default as Shelf } from "./Shelf";
package/shelf/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as Shelf } from "./Shelf";
@@ -0,0 +1,16 @@
1
+ import { WidgetEvent } from "../interface/Widget";
2
+ interface WidgetProps {
3
+ events: WidgetEvent[];
4
+ setView: (prop: string) => void;
5
+ removeView: (prop: string) => void;
6
+ setModal: (prop: string) => void;
7
+ removeModal: (prop: string) => void;
8
+ clearModal: () => void;
9
+ order: [string, "asc" | "desc"];
10
+ setOrder: (prop: string) => void;
11
+ tempData: Record<string, string | number>;
12
+ setTempData: (prop: Record<string, string | number>) => void;
13
+ clearTempData: () => void;
14
+ }
15
+ export declare const useWidgetStore: import("zustand").UseBoundStore<import("zustand").StoreApi<WidgetProps>>;
16
+ export {};
package/store/index.js ADDED
@@ -0,0 +1,39 @@
1
+ import { create } from "zustand";
2
+ export const useWidgetStore = create((set) => ({
3
+ events: [],
4
+ setView: (prop) => set((state) => ({
5
+ events: [...state.events, { event: prop, type: "view" }],
6
+ })),
7
+ removeView: (prop) => {
8
+ set((state) => ({
9
+ events: state.events.filter(({ event }) => event !== prop),
10
+ }));
11
+ },
12
+ order: ["", "asc"],
13
+ setOrder: (prop) => {
14
+ set((state) => {
15
+ if (state.order[0] !== prop) {
16
+ return {
17
+ order: [prop, "asc"],
18
+ };
19
+ }
20
+ return {
21
+ order: [prop, state.order[1] === "asc" ? "desc" : "asc"],
22
+ };
23
+ });
24
+ },
25
+ setModal: (prop) => set((state) => ({
26
+ events: [...state.events, { event: prop, type: "modal" }],
27
+ })),
28
+ removeModal: (prop) => {
29
+ set((state) => ({
30
+ events: state.events.filter(({ event }) => event !== prop),
31
+ }));
32
+ },
33
+ clearModal: () => set((state) => ({
34
+ events: state.events.filter(({ type }) => type !== "modal"),
35
+ })),
36
+ tempData: {},
37
+ setTempData: (prop) => set((state) => ({ tempData: { ...state.tempData, ...prop } })),
38
+ clearTempData: () => set({ tempData: {} }),
39
+ }));
@@ -0,0 +1,4 @@
1
+ export declare function LineBreaks({ texts, gap }: {
2
+ texts: string[];
3
+ gap?: number;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { col } from "../util";
3
+ export function LineBreaks({ texts, gap }) {
4
+ return (_jsx("div", { className: col(gap), children: texts.map((text, index) => (_jsx("div", { className: "leading-tight", children: text }, index))) }));
5
+ }
@@ -1 +1 @@
1
- export * from "./LineBreaks";
1
+ export * from "./LineBreaks";
package/text/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./LineBreaks";
@@ -0,0 +1 @@
1
+ export default function classNames(...props: string[]): string;
@@ -0,0 +1,4 @@
1
+ export default function classNames(...props) {
2
+ const array = props.map((prop) => prop.split(" "));
3
+ return array.flat().join(" ");
4
+ }
@@ -0,0 +1,10 @@
1
+ export declare const colorsByLevel: {
2
+ PS: string;
3
+ ST: string;
4
+ BA: string;
5
+ JR: string;
6
+ HJ: string;
7
+ };
8
+ export declare const gradient: {
9
+ lab: string;
10
+ };
package/util/colors.js ADDED
@@ -0,0 +1,10 @@
1
+ export const colorsByLevel = {
2
+ PS: "ps-pink",
3
+ ST: "st-orange",
4
+ BA: "ba-yellow",
5
+ JR: "jr-blue",
6
+ HJ: "hj-blue",
7
+ };
8
+ export const gradient = {
9
+ lab: "gradient-to-br from-violet-light/20 to-blue-sky/40 ",
10
+ };
@@ -0,0 +1,25 @@
1
+ export declare const row: (gap?: number) => string;
2
+ export declare const col: (gap?: number, width?: number | string) => string;
3
+ export declare const between: {
4
+ row: string;
5
+ col: string;
6
+ };
7
+ export declare const center: {
8
+ col: (gap?: number) => string;
9
+ row: (gap?: number) => string;
10
+ colO: (gap?: number) => string;
11
+ rowO: (gap?: number) => string;
12
+ screen: {
13
+ default: string;
14
+ col: (gap?: number) => string;
15
+ row: (gap?: number) => string;
16
+ };
17
+ };
18
+ export declare const grid: {
19
+ col: (col: number, gap?: number) => string;
20
+ row: (row: number, gap?: number) => string;
21
+ };
22
+ export declare const box: {
23
+ row: (height: number, gap?: number) => string;
24
+ col: (width: number, gap?: number) => string;
25
+ };
@@ -0,0 +1,25 @@
1
+ export const row = (gap = 8) => `flex flex-row gap-${gap} `;
2
+ export const col = (gap = 8, width) => `flex flex-col gap-${gap} ${width ? `w-${width}` : "w-full"} `;
3
+ export const between = {
4
+ row: "flex flex-row justify-between items-center ",
5
+ col: "flex flex-col justify-between items-center ",
6
+ };
7
+ export const center = {
8
+ col: (gap = 0) => `gap-${gap} flex flex-col items-center `,
9
+ row: (gap = 0) => `gap-${gap} flex flex-row items-center `,
10
+ colO: (gap = 0) => `gap-${gap} flex flex-col justify-center items-center `,
11
+ rowO: (gap = 0) => `gap-${gap} flex flex-row justify-center items-center `,
12
+ screen: {
13
+ default: "flex justify-center items-center min-h-screen w-full overflow-hidden min-h-screen relative ",
14
+ col: (gap = 0) => `gap-${gap} flex flex-col justify-center items-center min-h-screen w-full `,
15
+ row: (gap = 0) => `gap-${gap} flex flex-row justify-center items-center min-h-screen w-full `,
16
+ },
17
+ };
18
+ export const grid = {
19
+ col: (col, gap = 12) => `grid grid-cols-${col} gap-${gap} `,
20
+ row: (row, gap = 12) => `grid grid-rows-${row} gap-${gap}`,
21
+ };
22
+ export const box = {
23
+ row: (height, gap) => `h-${height} gap-${gap} flex flex-row `,
24
+ col: (width, gap) => `w-${width} gap-${gap} flex flex-col `,
25
+ };
@@ -0,0 +1,3 @@
1
+ export declare const responsiveColToRow: () => string;
2
+ export declare const responsiveRowToCol: () => string;
3
+ export declare const responsiveGridToCol: (gridCell: number) => string;
@@ -0,0 +1,15 @@
1
+ export const responsiveColToRow = () => {
2
+ const df = "flex flex-col";
3
+ const mark = "md:flex-row";
4
+ return [df, mark].join(" ");
5
+ };
6
+ export const responsiveRowToCol = () => {
7
+ const df = "flex flex-row";
8
+ const md = "md:flex-col";
9
+ return [df, md].join(" ");
10
+ };
11
+ export const responsiveGridToCol = (gridCell) => {
12
+ const df = `grid grid-cols-${gridCell}`;
13
+ const md = "md:flex md:flex-col";
14
+ return [df, md].join(" ");
15
+ };
@@ -1,7 +1,7 @@
1
- export { default as cn } from "./classNames";
2
- export * from "./colors";
3
- export * from "./display";
4
- export * from "./displayResponsive";
5
- export * from "./pattern";
6
- export * from "./position";
7
- export * from "./shape";
1
+ export { default as cn } from "./classNames";
2
+ export * from "./colors";
3
+ export * from "./display";
4
+ export * from "./displayResponsive";
5
+ export * from "./pattern";
6
+ export * from "./position";
7
+ export * from "./shape";
package/util/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export { default as cn } from "./classNames";
2
+ export * from "./colors";
3
+ export * from "./display";
4
+ export * from "./displayResponsive";
5
+ export * from "./pattern";
6
+ export * from "./position";
7
+ export * from "./shape";
@@ -0,0 +1,7 @@
1
+ type Color = [string, string];
2
+ export declare const buttonStyle: {
3
+ default: (colorSet: [Color, Color] | [Color], size?: {
4
+ width: number;
5
+ }) => string;
6
+ };
7
+ export {};
@@ -0,0 +1,15 @@
1
+ export const buttonStyle = {
2
+ default: (colorSet, size) => {
3
+ const [colors, hoverColors] = colorSet;
4
+ const [bgColor, textColor] = colors;
5
+ const [bgHoverColor, textHoverColor] = hoverColors || ["", ""];
6
+ const { width } = size || { width: 32 };
7
+ const classNames = [
8
+ `w-${width}`,
9
+ `bg-${bgColor} ${bgHoverColor ? `hover:bg-${bgHoverColor}` : ""}`,
10
+ `text-${textColor} ${textHoverColor ? `hover:text-${textHoverColor}` : ""}`,
11
+ "font-bold py-2 px-4 rounded",
12
+ ];
13
+ return classNames.join(" ");
14
+ },
15
+ };
@@ -0,0 +1,14 @@
1
+ export declare const fixed: {
2
+ tl: (top: number | string, left: number | string) => string;
3
+ br: (bottom: number | string, right: number | string) => string;
4
+ };
5
+ export declare const absolute: {
6
+ tl: (top?: number | string, left?: number | string) => string;
7
+ tr: (top?: number | string, right?: number | string) => string;
8
+ br: (bottom?: number, right?: number) => string;
9
+ bl: (bottom?: number, left?: number) => string;
10
+ full: {
11
+ tl: (top?: number | string, left?: number | string) => string;
12
+ bl: (bottom?: number | string, left?: number | string) => string;
13
+ };
14
+ };
@@ -0,0 +1,44 @@
1
+ export const fixed = {
2
+ tl: (top, left) => `fixed top-${top} left-${left} z-50 `,
3
+ br: (bottom, right) => `fixed bottom-${bottom} right-${right} z-50 `,
4
+ };
5
+ export const absolute = {
6
+ tl: (top, left) => {
7
+ const topClass = () => {
8
+ if (typeof top === "number" && top < 0)
9
+ return `-top-${Math.abs(top)}`;
10
+ return `top-${top}`;
11
+ };
12
+ const leftClass = () => {
13
+ if (typeof left === "number" && left < 0)
14
+ return `-left-${Math.abs(left)}`;
15
+ return `left-${left}`;
16
+ };
17
+ return `absolute ${topClass()} ${leftClass()} `;
18
+ },
19
+ tr: (top, right) => {
20
+ const topClass = () => {
21
+ if (typeof top === "number" && top < 0)
22
+ return `-top-${Math.abs(top)} `;
23
+ return `top-${top}`;
24
+ };
25
+ const rightClass = () => {
26
+ if (typeof right === "number" && right < 0)
27
+ return `-right-${Math.abs(right)} `;
28
+ return `right-${right}`;
29
+ };
30
+ return `absolute ${topClass()} ${rightClass()} `;
31
+ },
32
+ br: (bottom = 0, right = 0) => `absolute bottom-${bottom} right-${right} `,
33
+ bl: (bottom = 0, left = 0) => `absolute bottom-${bottom} left-${left} `,
34
+ full: {
35
+ tl: (top, left) => {
36
+ if (!(typeof top === "number") || !(typeof left === "number"))
37
+ return `absolute top-${top} left-${left} w-full `;
38
+ const topClass = top >= 0 ? `top-${top}` : `-top-${Math.abs(top)}`;
39
+ const leftClass = left >= 0 ? `left-${left}` : `-left-${Math.abs(left)}`;
40
+ return `absolute w-full ${topClass} ${leftClass} `;
41
+ },
42
+ bl: (bottom, left) => `absolute bottom-${bottom ?? 0} left-${left ?? 0} w-full `,
43
+ },
44
+ };
@@ -0,0 +1 @@
1
+ export declare const circle: (radius: number) => string;
package/util/shape.js ADDED
@@ -0,0 +1,3 @@
1
+ export const circle = (radius) => {
2
+ return `rounded-full w-${radius} h-${radius} overflow-hidden `;
3
+ };
package/version.txt ADDED
@@ -0,0 +1 @@
1
+ 1.0.8
package/.eslintrc.cjs DELETED
@@ -1,17 +0,0 @@
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 DELETED
@@ -1,16 +0,0 @@
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 DELETED
@@ -1,19 +0,0 @@
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/docs/README.md DELETED
@@ -1,47 +0,0 @@
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 DELETED
@@ -1,13 +0,0 @@
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/postcss.config.js DELETED
@@ -1,6 +0,0 @@
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
package/public/vite.svg DELETED
@@ -1 +0,0 @@
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>