@edu-tosel/design 1.0.12 → 1.0.14

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 (140) hide show
  1. package/asset/fonts/TimesNewerRoman-Bold.otf +0 -0
  2. package/asset/fonts/TimesNewerRoman-BoldItalic.otf +0 -0
  3. package/board/template/CanvasBoard.d.ts +1 -1
  4. package/board/template/CanvasBoard.js +2 -2
  5. package/board/template/ManageBoard.d.ts +3 -3
  6. package/board/template/ManageBoard.js +17 -21
  7. package/board/template/PaperBoard.d.ts +1 -1
  8. package/board/template/PaperBoard.js +4 -4
  9. package/board/widget/Board.js +8 -14
  10. package/board/widget/DataField.d.ts +7 -4
  11. package/board/widget/DataField.js +15 -5
  12. package/board/widget/Header.js +3 -3
  13. package/board/widget/Tags.d.ts +14 -3
  14. package/card/index.d.ts +1 -0
  15. package/card/index.js +1 -0
  16. package/card/template/AddCard.d.ts +2 -0
  17. package/card/template/AddCard.js +11 -0
  18. package/card/template/ChartCard.js +1 -1
  19. package/card/template/InfoCard.d.ts +32 -2
  20. package/card/template/InfoCard.design.d.ts +2 -0
  21. package/card/template/InfoCard.design.js +23 -0
  22. package/card/template/InfoCard.js +72 -8
  23. package/card/template/ReportCard.d.ts +1 -1
  24. package/card/template/ReportCard.js +3 -11
  25. package/card/template/RowCard.js +3 -7
  26. package/card/template/TableCard.d.ts +4 -2
  27. package/card/template/TableCard.js +22 -9
  28. package/card/template/TrumpCard.js +2 -2
  29. package/card/widget/Card.d.ts +1 -1
  30. package/card/widget/Card.js +31 -10
  31. package/deck/index.d.ts +1 -1
  32. package/deck/index.js +1 -1
  33. package/deck/template/Deck.d.ts +6 -0
  34. package/deck/template/Deck.design.d.ts +2 -0
  35. package/deck/template/Deck.design.js +21 -0
  36. package/deck/template/Deck.js +11 -0
  37. package/deck/widget/Deck.d.ts +2 -0
  38. package/deck/widget/Deck.js +14 -0
  39. package/globals.css +27 -1
  40. package/html/index.d.ts +3 -0
  41. package/html/index.js +3 -0
  42. package/html/widget/Button.d.ts +2 -0
  43. package/html/widget/Button.js +15 -0
  44. package/html/widget/Input.d.ts +2 -0
  45. package/html/widget/Input.js +21 -0
  46. package/html/widget/Select.d.ts +2 -0
  47. package/html/widget/Select.js +161 -0
  48. package/index.d.ts +2 -1
  49. package/index.js +2 -1
  50. package/interface/Board.d.ts +12 -16
  51. package/interface/Card.d.ts +41 -38
  52. package/{deck → interface}/Deck.d.ts +4 -7
  53. package/interface/Deck.js +1 -0
  54. package/interface/HTMLElement.d.ts +11 -5
  55. package/interface/Modal.d.ts +6 -1
  56. package/interface/Overlay.d.ts +3 -0
  57. package/interface/Overlay.js +1 -0
  58. package/interface/Property.d.ts +9 -0
  59. package/interface/Shelf.d.ts +22 -0
  60. package/interface/Shelf.js +1 -0
  61. package/interface/Widget.d.ts +19 -0
  62. package/interface/index.d.ts +2 -0
  63. package/interface/index.js +2 -0
  64. package/layout/index.d.ts +4 -1
  65. package/layout/index.js +4 -1
  66. package/layout/template/Gallery.d.ts +7 -0
  67. package/layout/template/Gallery.js +6 -0
  68. package/layout/template/Shelf.d.ts +8 -0
  69. package/layout/template/Shelf.js +41 -0
  70. package/layout/{dashboard → template/dashboard}/Header.d.ts +0 -1
  71. package/layout/template/dashboard/Header.js +17 -0
  72. package/layout/{dashboard → template/dashboard}/index.d.ts +5 -1
  73. package/layout/template/dashboard/index.js +27 -0
  74. package/layout/template/report/Header.js +11 -0
  75. package/layout/widget/Events.d.ts +8 -0
  76. package/layout/widget/Events.js +38 -0
  77. package/layout/widget/Shelf.d.ts +2 -0
  78. package/layout/widget/Shelf.js +24 -0
  79. package/{board → layout}/widget/Tab.js +6 -8
  80. package/modal/index.d.ts +1 -3
  81. package/modal/index.js +1 -3
  82. package/modal/template/Alert.d.ts +2 -0
  83. package/modal/template/Alert.js +8 -0
  84. package/modal/template/Input.d.ts +6 -0
  85. package/modal/template/Input.js +6 -0
  86. package/modal/template/index.d.ts +7 -0
  87. package/modal/template/index.js +7 -0
  88. package/modal/widget/Modal.design.d.ts +2 -0
  89. package/modal/widget/Modal.design.js +64 -0
  90. package/navigation/Navigation.d.ts +1 -1
  91. package/navigation/Navigation.js +19 -10
  92. package/overlay/index.d.ts +1 -0
  93. package/overlay/index.js +1 -0
  94. package/overlay/template/Overlay.design.d.ts +2 -0
  95. package/overlay/template/Overlay.design.js +5 -0
  96. package/overlay/template/index.d.ts +3 -0
  97. package/overlay/template/index.js +6 -0
  98. package/overlay/widget/Overlay.d.ts +2 -0
  99. package/overlay/widget/Overlay.js +17 -0
  100. package/package.json +3 -2
  101. package/store/index.d.ts +7 -3
  102. package/store/index.js +26 -8
  103. package/tailwind.config.ts +37 -0
  104. package/text/Formatter.d.ts +3 -0
  105. package/text/Formatter.js +18 -0
  106. package/text/index.d.ts +1 -0
  107. package/text/index.js +1 -0
  108. package/util/colors.d.ts +2 -1
  109. package/util/colors.js +2 -1
  110. package/util/convertUnixTimestampToDate.d.ts +1 -0
  111. package/util/convertUnixTimestampToDate.js +5 -0
  112. package/util/index.d.ts +3 -0
  113. package/util/index.js +3 -0
  114. package/util/isDebug.d.ts +1 -0
  115. package/util/isDebug.js +5 -0
  116. package/util/sortByOrder.d.ts +4 -0
  117. package/util/sortByOrder.js +20 -0
  118. package/version.txt +1 -1
  119. package/card/template/InfoCardCssCase.d.ts +0 -25
  120. package/card/template/InfoCardCssCase.js +0 -32
  121. package/card/template/PropfileCard.d.ts +0 -2
  122. package/card/template/PropfileCard.js +0 -6
  123. package/deck/Deck.js +0 -22
  124. package/layout/dashboard/Header.js +0 -19
  125. package/layout/dashboard/index.js +0 -10
  126. package/layout/report/Header.js +0 -11
  127. package/modal/AlertModal.d.ts +0 -2
  128. package/modal/AlertModal.js +0 -8
  129. package/modal/ControllerModal.d.ts +0 -6
  130. package/modal/ControllerModal.js +0 -6
  131. package/modal/Modal.d.ts +0 -2
  132. package/modal/Modal.js +0 -31
  133. package/modal/TestModal.d.ts +0 -7
  134. package/modal/TestModal.js +0 -6
  135. package/shelf/Shelf.d.ts +0 -3
  136. package/shelf/Shelf.js +0 -4
  137. package/shelf/index.d.ts +0 -1
  138. package/shelf/index.js +0 -1
  139. /package/layout/{report → template/report}/Header.d.ts +0 -0
  140. /package/{board → layout}/widget/Tab.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -14,11 +14,12 @@
14
14
  "type": "module",
15
15
  "scripts": {},
16
16
  "dependencies": {
17
- "@edu-tosel/design": "^1.0.11",
18
17
  "react": "^18.2.0",
19
18
  "react-dom": "^18.2.0",
19
+ "react-icons": "^5.0.1",
20
20
  "react-lottie-player": "^1.5.6",
21
21
  "react-router-dom": "^6.21.3",
22
+ "react-spring": "^9.7.3",
22
23
  "recharts": "^2.11.0",
23
24
  "tailwind-scrollbar-hide": "^1.1.7",
24
25
  "tailwindcss-animate": "^1.0.7",
package/store/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { WidgetEvent } from "../interface/Widget";
1
+ import { Order, WidgetEvent } from "../interface";
2
2
  interface WidgetProps {
3
3
  events: WidgetEvent[];
4
4
  setView: (prop: string) => void;
@@ -6,11 +6,15 @@ interface WidgetProps {
6
6
  setModal: (prop: string) => void;
7
7
  removeModal: (prop: string) => void;
8
8
  clearModal: () => void;
9
- order: [string, "asc" | "desc"];
10
- setOrder: (prop: string) => void;
9
+ order: Record<string, Order[]>;
10
+ setOrder: (prop: string, id: string) => void;
11
11
  tempData: Record<string, string | number>;
12
12
  setTempData: (prop: Record<string, string | number>) => void;
13
13
  clearTempData: () => void;
14
+ flag: boolean;
15
+ setFlag: () => void;
16
+ isDark: boolean;
17
+ setDark: () => void;
14
18
  }
15
19
  export declare const useWidgetStore: import("zustand").UseBoundStore<import("zustand").StoreApi<WidgetProps>>;
16
20
  export {};
package/store/index.js CHANGED
@@ -9,16 +9,30 @@ export const useWidgetStore = create((set) => ({
9
9
  events: state.events.filter(({ event }) => event !== prop),
10
10
  }));
11
11
  },
12
- order: ["", "asc"],
13
- setOrder: (prop) => {
12
+ order: {},
13
+ setOrder: (id, prop) => {
14
14
  set((state) => {
15
- if (state.order[0] !== prop) {
16
- return {
17
- order: [prop, "asc"],
18
- };
19
- }
15
+ const currentOrder = state.order[id] ?? [];
16
+ const update = () => {
17
+ const temp = currentOrder.find(({ orderBy }) => orderBy === prop);
18
+ if (temp !== undefined) {
19
+ return {
20
+ ...temp,
21
+ orderHow: temp.orderHow === "asc"
22
+ ? "desc"
23
+ : temp.orderHow === "desc"
24
+ ? ""
25
+ : "asc",
26
+ };
27
+ }
28
+ return { orderBy: prop, orderHow: "asc" };
29
+ };
30
+ const updatedOrder = [
31
+ ...currentOrder.filter(({ orderBy }) => orderBy !== prop),
32
+ update(),
33
+ ];
20
34
  return {
21
- order: [prop, state.order[1] === "asc" ? "desc" : "asc"],
35
+ order: { ...state.order, [id]: updatedOrder },
22
36
  };
23
37
  });
24
38
  },
@@ -36,4 +50,8 @@ export const useWidgetStore = create((set) => ({
36
50
  tempData: {},
37
51
  setTempData: (prop) => set((state) => ({ tempData: { ...state.tempData, ...prop } })),
38
52
  clearTempData: () => set({ tempData: {} }),
53
+ flag: false,
54
+ setFlag: () => set((state) => ({ flag: !state.flag })),
55
+ isDark: false,
56
+ setDark: () => set((state) => ({ isDark: !state.isDark })),
39
57
  }));
@@ -17,6 +17,8 @@ export default {
17
17
  kostar: ["kostar"],
18
18
  nicomoji: ["nicomoji"],
19
19
  megrim: ["megrim"],
20
+ "times-newer-roman-bold": ["times-newer-roman-bold"],
21
+ "times-newer-roman-bolditalic": ["times-newer-roman-bolditalic"],
20
22
  },
21
23
  backgroundImage: {
22
24
  "image-space": "url('/images/home/space.png')",
@@ -26,6 +28,22 @@ export default {
26
28
  "0%, 100%": { backgroundPosition: "left center" },
27
29
  "50%": { backgroundPosition: "right center" },
28
30
  },
31
+ fadeIn: {
32
+ from: { opacity: "0" },
33
+ to: { opacity: "1" },
34
+ },
35
+ fadeOut: {
36
+ from: { opacity: "1" },
37
+ to: { opacity: "0" },
38
+ },
39
+ increaseWidth: {
40
+ from: { width: "0%" },
41
+ to: { width: "33.3%" },
42
+ },
43
+ decreaseWidth: {
44
+ from: { width: "33.3%" },
45
+ to: { width: "0%" },
46
+ },
29
47
  },
30
48
  colors: {
31
49
  "white-off": "#F5F5F5",
@@ -45,6 +63,7 @@ export default {
45
63
  "silver-pale": "#DFD8CA",
46
64
 
47
65
  // Brand Colors
66
+ "cocoon-green": "#00E35B",
48
67
  "ps-pink": "#E3006E",
49
68
  "ps-pink-light": "#FFBADB",
50
69
  "st-orange": "#ED6A00",
@@ -64,22 +83,31 @@ export default {
64
83
  spacing: {
65
84
  "sun-calc": "calc(50% - 6rem)",
66
85
  1: "0.25rem",
86
+ 2.5: "0.625rem",
87
+ 6.25: "1.5625rem",
88
+ 6.5: "1.625rem",
67
89
  7: "1.75rem",
68
90
  7.5: "1.875rem",
69
91
  8: "2rem",
70
92
  9: "2.25rem",
71
93
  11: "2.75rem",
72
94
  12: "3rem",
95
+ 13.25: "3.3125rem",
73
96
  14: "3.5rem",
97
+ 14.5: "3.625rem",
74
98
  15: "3.75rem",
75
99
  16: "4rem",
76
100
  18: "4.5rem",
101
+ 18.75: "4.6875rem",
77
102
  19: "4.75rem",
103
+ 21.75: "5.4375rem",
78
104
  22: "5.5rem",
79
105
  23: "5.75rem",
80
106
  25: "6.25rem",
81
107
  26: "6.5rem",
82
108
  27: "6.75rem",
109
+ 28.78: "7.195rem",
110
+ 29: "7.25rem",
83
111
  30: "7.5rem",
84
112
  34: "8.5rem",
85
113
  36: "9rem",
@@ -261,6 +289,8 @@ export default {
261
289
  "7xl": "4.5rem",
262
290
  "8xl": "6rem",
263
291
  "9xl": "8rem",
292
+ "10xl": "10rem",
293
+ "11xl": "12rem",
264
294
  },
265
295
  screens: {
266
296
  xxxs: "332px",
@@ -409,6 +439,7 @@ export default {
409
439
  "100/100": "100%",
410
440
  },
411
441
  height: {
442
+ "2/3": "66.6666667%",
412
443
  "4/7": "57.1428571%",
413
444
  "3/7": "42.8571429%",
414
445
  "5/12": "41.6666667%",
@@ -420,6 +451,8 @@ export default {
420
451
  "9/10": "90%",
421
452
  },
422
453
  zIndex: {
454
+ "100": "100",
455
+ "90": "90",
423
456
  "50": "50",
424
457
  "49": "49",
425
458
  "48": "48",
@@ -439,6 +472,9 @@ export default {
439
472
  },
440
473
  },
441
474
  safelist: [
475
+ {
476
+ pattern: /font-.*/,
477
+ },
442
478
  {
443
479
  pattern: /animate-.*/,
444
480
  },
@@ -551,4 +587,5 @@ export default {
551
587
  },
552
588
  ],
553
589
  plugins: [tailwindcssAnimate],
590
+ darkMode: "selector",
554
591
  } satisfies Config;
@@ -0,0 +1,3 @@
1
+ export declare function Formatter({ script }: {
2
+ script: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ export function Formatter({ script }) {
3
+ const lines = script.split("\n");
4
+ const htmlRegex = /<div.*?>.*?<\/div>/gs;
5
+ const result = lines.map((line, index) => {
6
+ const htmlMatch = line.match(htmlRegex);
7
+ if (htmlMatch)
8
+ return (_jsx("div", { dangerouslySetInnerHTML: { __html: htmlMatch[0] } }, index));
9
+ if (line.startsWith("# "))
10
+ return (_jsx("div", { className: "text-3xl", children: line.replace("# ", "") }, index));
11
+ if (line.startsWith("## "))
12
+ return (_jsx("div", { className: "text-2xl", children: line.replace("## ", "") }, index));
13
+ if (line.startsWith("```"))
14
+ return (_jsx("div", { className: "bg-gray-200 p-2", children: line.replace(/^```|```$/g, "") }, index));
15
+ return _jsx("div", { children: line }, index);
16
+ });
17
+ return _jsx(_Fragment, { children: result });
18
+ }
package/text/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./LineBreaks";
2
+ export * from "./Formatter";
package/text/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./LineBreaks";
2
+ export * from "./Formatter";
package/util/colors.d.ts CHANGED
@@ -7,5 +7,6 @@ export declare const colorsByLevel: {
7
7
  };
8
8
  export declare const gradient: {
9
9
  lab: string;
10
- green_to_red: string;
10
+ greenToRed: string;
11
+ greenToRedSoft: string;
11
12
  };
package/util/colors.js CHANGED
@@ -7,5 +7,6 @@ export const colorsByLevel = {
7
7
  };
8
8
  export const gradient = {
9
9
  lab: "gradient-to-br from-violet-light/20 to-blue-sky/40 ",
10
- green_to_red: "gradient-to-r from-green-dark/20 to-red-crimson/20",
10
+ greenToRed: "gradient-to-r from-green-dark to-red-crimson",
11
+ greenToRedSoft: "gradient-to-r from-green-dark/20 to-red-crimson/20",
11
12
  };
@@ -0,0 +1 @@
1
+ export default function convertUnixTimestampToDate(unixTimestamp: number): string;
@@ -0,0 +1,5 @@
1
+ export default function convertUnixTimestampToDate(unixTimestamp) {
2
+ const date = new Date(unixTimestamp * 1000);
3
+ const formattedDate = date.toISOString().split("T")[0];
4
+ return formattedDate;
5
+ }
package/util/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  export { default as cn } from "./classNames";
2
+ export { default as unixToDate } from "./convertUnixTimestampToDate";
3
+ export { default as isDebug } from "./isDebug";
4
+ export { default as sortByOrder } from "./sortByOrder";
2
5
  export * from "./colors";
3
6
  export * from "./display";
4
7
  export * from "./displayResponsive";
package/util/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  export { default as cn } from "./classNames";
2
+ export { default as unixToDate } from "./convertUnixTimestampToDate";
3
+ export { default as isDebug } from "./isDebug";
4
+ export { default as sortByOrder } from "./sortByOrder";
2
5
  export * from "./colors";
3
6
  export * from "./display";
4
7
  export * from "./displayResponsive";
@@ -0,0 +1 @@
1
+ export default function isDebug(prop: any): any;
@@ -0,0 +1,5 @@
1
+ export default function isDebug(prop) {
2
+ if (import.meta.env.MODE === "development")
3
+ return prop;
4
+ return null;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { Order } from "../interface";
2
+ export default function sortOrder<K extends string, T extends {
3
+ [p in K]: any;
4
+ }>(args: T[], order: Order[]): T[];
@@ -0,0 +1,20 @@
1
+ export default function sortOrder(args, order) {
2
+ const allEmpty = order.every(({ orderHow }) => orderHow === "");
3
+ const sortedData = allEmpty
4
+ ? [...args]
5
+ : [...args].sort((aValue, bValue) => {
6
+ for (let i = 0; i < order.length; i++) {
7
+ const { orderBy, orderHow } = order[i];
8
+ if (orderHow === "")
9
+ continue;
10
+ const a = aValue[orderBy];
11
+ const b = bValue[orderBy];
12
+ if (a > b)
13
+ return orderHow === "asc" ? 1 : -1;
14
+ if (a < b)
15
+ return orderHow === "asc" ? -1 : 1;
16
+ }
17
+ return 0;
18
+ });
19
+ return sortedData;
20
+ }
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.12
1
+ 1.0.14
@@ -1,25 +0,0 @@
1
- import { Size } from "../../interface/Property";
2
- export declare const sizeBySetting: {
3
- widthSize: Record<string, Size>;
4
- heightSize: Record<string, Size>;
5
- };
6
- export declare const bgColorBySetting: {
7
- information: string;
8
- profile: string;
9
- profileSmall: string;
10
- };
11
- export declare const lineColorBySetting: {
12
- information: string;
13
- profile: string;
14
- profileSmall: string;
15
- };
16
- export declare const fontColorBySetting: {
17
- information: string;
18
- profile: string;
19
- profileSmall: string;
20
- };
21
- export declare const btnSizeBySetting: {
22
- information: string;
23
- profile: string;
24
- profileSmall: string;
25
- };
@@ -1,32 +0,0 @@
1
- export const sizeBySetting = {
2
- widthSize: {
3
- information: "md",
4
- profile: "sm",
5
- profileSmall: "xs",
6
- },
7
- heightSize: {
8
- information: "lg",
9
- profile: "md",
10
- profileSmall: "lg",
11
- },
12
- };
13
- export const bgColorBySetting = {
14
- information: "gradient-to-r from-green-dark/20 to-red-crimson/20",
15
- profile: "white",
16
- profileSmall: "white",
17
- };
18
- export const lineColorBySetting = {
19
- information: "#760023",
20
- profile: "#173A8B",
21
- profileSmall: "#173A8B",
22
- };
23
- export const fontColorBySetting = {
24
- information: "red-crimson",
25
- profile: "blue-navy",
26
- profileSmall: "blue-navy",
27
- };
28
- export const btnSizeBySetting = {
29
- information: "w-45 h-11",
30
- profile: "w-22 h-7 text-xs",
31
- profileSmall: "w-45 h-11",
32
- };
@@ -1,2 +0,0 @@
1
- import { InfoCardProps } from "../../interface/Card";
2
- export default function ProfileCard({ titles, button }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card } from "../widget/Card";
3
- import { gradient } from "../../util";
4
- export default function ProfileCard({ titles, button }) {
5
- return (_jsx(Card, { options: { width: "lg", height: "lg" }, children: _jsxs("div", { className: "relative w-full h-full p-5 bg-" + `${gradient.green_to_red}`, children: [_jsxs("div", { className: "h-18 w-full border-b-2 border-[#760023] flex justify-between", children: [_jsxs("div", { className: "w-auto", children: [_jsx("div", { className: "h-9 font-bold text-xl text-" + `${titles.color}`, children: titles.title }), _jsx("div", { className: "h-8 text-md font-thin ", children: titles.subTitle })] }), _jsx("div", { className: "w-auto flex flex-col-reverse text-red-crimson p-2", children: _jsx("span", { className: "text-xs font-thin border-b-1 border-[#760023] font-semibold inline-block align-bottom ", children: "\uC218\uC815\uD558\uAE30" }) })] }), _jsx("div", {}), _jsx("div", { className: `absolute bottom-4 right-4 ${button.display}`, children: _jsx("button", { className: `text-white rounded-md bg-${button.color} w-45 h-11 flex justify-center items-center`, children: button.title }) })] }) }));
6
- }
package/deck/Deck.js DELETED
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../util";
3
- export function Deck({ children, titles, options, debug, }) {
4
- const { title, subtitle, gapTitle } = titles ?? {};
5
- const { flex, height, justify, gapX, gapY, overflowScroll } = options ?? {};
6
- const container = {
7
- displays: `flex flex-col gap-${gapTitle ?? 4}`,
8
- sizes: `w-full h-${height ?? "auto"} `,
9
- debug: debug &&
10
- import.meta.env.MODE === "development" &&
11
- `border-2 border-${debug}`,
12
- };
13
- const body = {
14
- displays: `flex flex-col flex-wrap gap-y-${gapY ?? 5}`,
15
- flex: flex === "col" ? "sm:flex-col" : "sm:flex-row",
16
- justify: `justify-${justify ?? "start"}`,
17
- gapX: `${`gap-x-${gapX ?? 7.5}`}`,
18
- sizes: "sm:w-full ",
19
- styles: `${overflowScroll ? "overflow-x-scroll" : ""} duration-500`,
20
- };
21
- return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { children: [_jsx("div", { className: "text-xl xl:text-2xl font-bold", children: title }), _jsx("div", { className: "", children: subtitle })] }), _jsx("div", { className: cn(body), children: children })] }));
22
- }
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import "../../globals.css";
3
- import { useState } from "react";
4
- import { cn } from "../../util";
5
- export function Header({ title, image, }) {
6
- const [isOpen, setIsOpen] = useState(false);
7
- const [src, href] = image ?? [];
8
- return (_jsx("div", { className: "fixed top-0 left-0 xl:relative flex h-20 w-full items-center justify-between bg-white px-9 shadow-black/10 shadow-b-md z-40", children: _jsxs("div", { className: "flex h-12 items-center gap-12", children: [src && href ? (_jsx("a", { href: href, children: _jsx("img", { src: src, alt: "logo", className: "h-12 w-50" }) })) : (_jsx("div", { className: "text-2xl", children: "TOSEL" })), _jsx("div", { className: "text-3xl font-bold ", children: title })] }) }));
9
- }
10
- function Menu({ flag }) {
11
- const positions = "absolute right-0 z-40 ";
12
- const layouts = "w-48 overflow-hidden";
13
- const styles = "shadow-md bg-white";
14
- const animations = () => {
15
- const height = flag ? "h-80" : "h-0";
16
- return [height, "duration-500"].join(" ");
17
- };
18
- return (_jsxs("div", { className: cn(positions, layouts, styles, animations()), children: [_jsx("div", { children: "\u314E\u3147" }), _jsx("div", { children: "\u314E\u3147" })] }));
19
- }
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Fragment } from "react";
3
- import { NavigationContainer } from "../../navigation";
4
- import { Header } from "./Header";
5
- import { cn } from "../../util";
6
- export function DashboardLayout({ subject, colors, navigations, children, }) {
7
- const [title, image, imageUrl] = subject ?? ["", "", ""];
8
- const [bgColor, textColor] = colors ?? ["white", "black"];
9
- return (_jsxs("div", { className: cn(`bg-${bgColor}`, `text-${textColor}`, `min-h-screen h-screen xl:h-auto font-pretendard-medium`), children: [_jsx(Header, { title: title, image: [image, imageUrl] }), _jsxs("div", { className: "h-full flex gap-12 pt-20 xl:gap-8 xl:pl-2 2xl:px-9 xl:pt-10 xl:m-0 ", children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
10
- }
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../util";
3
- export default function Header({ groupName, examName, }) {
4
- const container = {
5
- positions: "relative z-20",
6
- displays: "flex flex-col items-center ",
7
- sizes: "w-full max-w-280",
8
- styles: "py-8 bg-white shadow-md",
9
- };
10
- return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex justify-between w-full items-center pr-2", children: [_jsx("img", { src: "/images/logos/itc.png", alt: "itc", width: 100 }), _jsx("div", { className: "flex items-center", children: _jsx("div", { className: "text-5xl font-bold", children: examName }) }), _jsx("img", { src: "/images/logos/badge-tosel-lab.png", alt: "tosel-lab", width: 80 })] }), _jsxs("div", { className: "", children: ["\uC9C0\uC815\uAD50\uC721\uAE30\uAD00: ", groupName] })] }));
11
- }
@@ -1,2 +0,0 @@
1
- import { AlertModalProps } from "../interface/Modal";
2
- export default function AlertModal({ title, scripts, options, }: AlertModalProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { col } from "../util";
3
- import { Modal } from "./Modal";
4
- export default function AlertModal({ title, scripts, options, }) {
5
- const { script, subScript } = scripts ?? {};
6
- const { buttons } = options ?? {};
7
- return (_jsx(Modal, { options: { buttons }, children: _jsx("div", { className: col(3) + "pl-25 pt-18 h-full pb-12", children: _jsxs("div", { className: col(6), children: [_jsx("div", { className: "text-3xl font-bold", children: title }), _jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", { className: "text-xl font-bold", children: script })] }) }) }));
8
- }
@@ -1,6 +0,0 @@
1
- import { Button } from "../interface";
2
- export default function ControllerModal({ options, }: {
3
- options?: {
4
- buttons?: Button[];
5
- };
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Modal } from "./Modal";
3
- export default function ControllerModal({ options, }) {
4
- const { buttons } = options ?? {};
5
- return (_jsx(Modal, { options: { width: "lg", height: "xl", buttons }, children: _jsx("div", { className: "w-full h-120 border-2 " }) }));
6
- }
package/modal/Modal.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { ModalProps } from "../interface/Modal";
2
- export declare function Modal({ children, options }: ModalProps): import("react/jsx-runtime").JSX.Element;
package/modal/Modal.js DELETED
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useWidgetStore } from "../store";
3
- import { absolute, cn } from "../util";
4
- const background = "z-50 flex min-h-screen w-full items-center justify-center bg-black/10 backdrop-blur-sm fixed top-0 left-0";
5
- const widthSize = {
6
- xs: "w-2/3 min-w-76 max-w-176",
7
- sm: "w-2/3 min-w-76 max-w-176",
8
- md: "w-2/3 min-w-76 max-w-176",
9
- lg: "w-full min-w-76 max-w-360",
10
- xl: "w-2/3 min-w-76 max-w-176",
11
- "2xl": "w-2/3 min-w-76 max-w-176",
12
- full: "w-full",
13
- };
14
- const heightSize = {
15
- xs: "",
16
- sm: "h-100",
17
- md: "h-72 sm:h-48",
18
- lg: "h-120",
19
- xl: "h-180",
20
- "2xl": "w-2/3 min-w-76 max-w-176",
21
- full: "h-full",
22
- };
23
- export function Modal({ children, options }) {
24
- const { buttons, width, height } = options ?? {};
25
- const { clearModal } = useWidgetStore();
26
- const sizes = `${heightSize[height ?? "sm"]} ${widthSize[width ?? "md"]}`;
27
- const paddings = "pt-18 px-25";
28
- const styles = "rounded-xl bg-white relative overflow-hidden";
29
- return (_jsx("div", { className: background, children: _jsxs("div", { className: cn(sizes, styles, paddings), children: [children, _jsx(_Fragment, { children: buttons ? (_jsx("div", { className: `${absolute.br(8, 10)} flex justify-end gap-4`, children: buttons.map(([text, onClick]) => (_jsx("button", { className: "rounded-2xl bg-black px-8 py-2 text-2xl font-bold text-white", onClick: onClick, children: text }, text))) })) : null }), _jsx("button", { className: absolute.tl(5, 7) +
30
- "bg-black rounded-full h-9 w-9 flex justify-center items-center", onClick: clearModal, children: _jsx("div", { className: "x-shape" }) })] }) }));
31
- }
@@ -1,7 +0,0 @@
1
- import { Button } from "../interface";
2
- export default function TestModal({ children, options, }: {
3
- children: React.ReactNode;
4
- options?: {
5
- buttons?: Button[];
6
- };
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Modal } from "./Modal";
3
- export default function TestModal({ children, options, }) {
4
- const { buttons } = options ?? {};
5
- return (_jsx(Modal, { options: { width: "lg", height: "xl", buttons }, children: _jsx("div", { className: "pt-18 pl-25", children: children }) }));
6
- }
package/shelf/Shelf.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export default function Shelf({ children }: {
2
- children: React.ReactNode;
3
- }): import("react/jsx-runtime").JSX.Element;
package/shelf/Shelf.js DELETED
@@ -1,4 +0,0 @@
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
- }
package/shelf/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { default as Shelf } from "./Shelf";
package/shelf/index.js DELETED
@@ -1 +0,0 @@
1
- export { default as Shelf } from "./Shelf";
File without changes
File without changes