@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.
- 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/index.d.ts +4 -0
- package/interaction/index.js +4 -0
- package/interaction/template/Exception.d.ts +2 -0
- package/interaction/template/Exception.js +9 -0
- package/interaction/widget/LoadingJumper.d.ts +1 -0
- package/interaction/widget/LoadingJumper.js +4 -0
- package/interaction/widget/LoadingSpinner.d.ts +1 -0
- package/interaction/widget/LoadingSpinner.js +5 -0
- package/interaction/widget/NoData.d.ts +1 -0
- package/interaction/widget/NoData.js +4 -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/interface/Menu.d.ts +6 -0
- 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/index.d.ts +1 -0
- package/menu/index.js +1 -0
- package/menu/template/SideMenu.d.ts +2 -0
- package/menu/template/SideMenu.js +20 -0
- package/menu/widget/HTMLElement.d.ts +8 -0
- package/menu/widget/HTMLElement.js +9 -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/interaction/index.tsx +0 -2
- package/src/interface/Board.ts +0 -55
- package/src/interface/Card.ts +0 -66
- package/src/interface/Interaction.ts +0 -4
- package/src/interface/Menu.ts +0 -5
- 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/menu/index.tsx +0 -1
- 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
package/package.json
CHANGED
|
@@ -1,49 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@edu-tosel/design",
|
|
3
|
-
"version": "1.0.
|
|
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
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
}
|
package/shelf/Shelf.d.ts
ADDED
package/shelf/Shelf.js
ADDED
|
@@ -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";
|
package/store/index.d.ts
ADDED
|
@@ -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,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;
|
package/util/colors.d.ts
ADDED
package/util/colors.js
ADDED
|
@@ -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
|
+
};
|
package/util/display.js
ADDED
|
@@ -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,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
package/util/pattern.js
ADDED
|
@@ -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
|
+
};
|
package/util/position.js
ADDED
|
@@ -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
|
+
};
|
package/util/shape.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const circle: (radius: number) => string;
|
package/util/shape.js
ADDED
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
package/public/images/daeng.jpg
DELETED
|
Binary file
|
package/public/images/faker.jpg
DELETED
|
Binary file
|
package/public/images/haerin.png
DELETED
|
Binary file
|
package/public/images/haewon.png
DELETED
|
Binary file
|
package/public/images/hani.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/public/images/info.png
DELETED
|
Binary file
|
package/public/images/itc.png
DELETED
|
Binary file
|
|
Binary file
|
package/public/images/minji.png
DELETED
|
Binary file
|
package/public/images/seulgi.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/public/images/tosel.png
DELETED
|
Binary file
|
package/public/images/yujin.png
DELETED
|
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>
|