@edu-tosel/design 1.0.4 → 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 (241) 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/index.js +0 -2
  176. package/interface/Board.d.ts +0 -57
  177. package/interface/Board.js +0 -1
  178. package/interface/Card.d.ts +0 -73
  179. package/interface/Card.js +0 -1
  180. package/interface/HTMLElement.d.ts +0 -13
  181. package/interface/HTMLElement.js +0 -1
  182. package/interface/Interaction.d.ts +0 -5
  183. package/interface/Interaction.js +0 -1
  184. package/interface/Modal.d.ts +0 -18
  185. package/interface/Modal.js +0 -1
  186. package/interface/Property.js +0 -14
  187. package/interface/Widget.d.ts +0 -4
  188. package/interface/Widget.js +0 -1
  189. package/interface/index.js +0 -2
  190. package/layout/dashboard/Header.d.ts +0 -5
  191. package/layout/dashboard/Header.js +0 -19
  192. package/layout/dashboard/index.d.ts +0 -7
  193. package/layout/dashboard/index.js +0 -10
  194. package/layout/index.js +0 -1
  195. package/menu/SideMenu.d.ts +0 -1
  196. package/menu/SideMenu.js +0 -14
  197. package/menu/index.js +0 -1
  198. package/modal/AlertModal.d.ts +0 -2
  199. package/modal/AlertModal.js +0 -8
  200. package/modal/ControllerModal.d.ts +0 -6
  201. package/modal/ControllerModal.js +0 -6
  202. package/modal/Modal.d.ts +0 -2
  203. package/modal/Modal.js +0 -31
  204. package/modal/TestModal.d.ts +0 -8
  205. package/modal/TestModal.js +0 -6
  206. package/modal/index.js +0 -3
  207. package/navigation/Navigation.d.ts +0 -5
  208. package/navigation/Navigation.js +0 -24
  209. package/navigation/index.js +0 -1
  210. package/shelf/Shelf.d.ts +0 -4
  211. package/shelf/Shelf.js +0 -4
  212. package/shelf/index.js +0 -1
  213. package/store/index.d.ts +0 -16
  214. package/store/index.js +0 -39
  215. package/text/LineBreaks.d.ts +0 -4
  216. package/text/LineBreaks.js +0 -5
  217. package/text/index.js +0 -1
  218. package/util/classNames.d.ts +0 -1
  219. package/util/classNames.js +0 -4
  220. package/util/colors.d.ts +0 -10
  221. package/util/colors.js +0 -10
  222. package/util/display.d.ts +0 -25
  223. package/util/display.js +0 -25
  224. package/util/displayResponsive.d.ts +0 -3
  225. package/util/displayResponsive.js +0 -15
  226. package/util/index.js +0 -7
  227. package/util/pattern.d.ts +0 -7
  228. package/util/pattern.js +0 -15
  229. package/util/position.d.ts +0 -14
  230. package/util/position.js +0 -44
  231. package/util/shape.d.ts +0 -1
  232. package/util/shape.js +0 -3
  233. package/version.txt +0 -1
  234. /package/{asset → public}/fonts/Kostar.ttf +0 -0
  235. /package/{asset → public}/fonts/Megrim.ttf +0 -0
  236. /package/{asset → public}/fonts/NicoMoji.ttf +0 -0
  237. /package/{asset → public}/fonts/Pretendard-Medium.otf +0 -0
  238. /package/{asset → src/asset}/json/credit-lottie.json +0 -0
  239. /package/{asset → src/asset}/json/loading-lottie.json +0 -0
  240. /package/{asset → src/asset}/json/test.svg +0 -0
  241. /package/{globals.css → src/globals.css} +0 -0
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export interface ExceptionProps {
3
- exceptions?: [boolean, React.ReactNode][];
4
- children: React.ReactNode;
5
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import { Button, Scripts, Size } from "./Property";
3
- export interface ModalProps {
4
- children: React.ReactNode;
5
- options?: {
6
- width?: Size;
7
- height?: Size;
8
- padding?: boolean;
9
- buttons?: Button[];
10
- };
11
- }
12
- export interface AlertModalProps {
13
- title: string;
14
- scripts: Scripts;
15
- options?: {
16
- buttons?: Button[];
17
- };
18
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * Size type
3
- * @enum {string}
4
- * @readonly
5
- * @description - Size type for the component
6
- * @property {"xs"} xs - Extra small size
7
- * @property {"sm"} sm - Small size
8
- * @property {"md"} md - Medium size
9
- * @property {"lg"} lg - Large size
10
- * @property {"xl"} xl - Extra large size
11
- * @property {"2xl"} 2xl - Double extra large size
12
- * @property {"full"} full - Full size
13
- */
14
- export {};
@@ -1,4 +0,0 @@
1
- export interface WidgetEvent {
2
- event: string;
3
- type: "view" | "modal";
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./Property";
2
- export * from "./Widget";
@@ -1,5 +0,0 @@
1
- import "../../globals.css";
2
- export declare function Header({ title, image, }: {
3
- title: string;
4
- image?: [string, string];
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -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,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function DashboardLayout({ subject, colors, navigations, children, }: {
3
- subject: [string, string, string];
4
- colors?: [string, string];
5
- navigations: React.ReactNode[];
6
- children: React.ReactNode;
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -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
- }
package/layout/index.js DELETED
@@ -1 +0,0 @@
1
- export * from "./dashboard";
@@ -1 +0,0 @@
1
- export default function SideMenu(): import("react/jsx-runtime").JSX.Element;
package/menu/SideMenu.js DELETED
@@ -1,14 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { useWidgetStore } from "../store";
3
- import { cn } from "../util";
4
- export default function SideMenu() {
5
- const { tempData, clearTempData, events, removeView } = useWidgetStore();
6
- const isOpen = events.some(({ event }) => event === "sideMenu");
7
- const positions = "absolute top-20 right-0";
8
- const sizes = `${isOpen ? "w-160" : "w-0"} h-full bg-gray-200`;
9
- const styles = `${isOpen ? "opacity-100 z-30" : "opacity-0 z-0"} bg-gray-200 duration-500 `;
10
- return (_jsx("div", { className: cn(positions, sizes, styles), children: _jsxs("div", { className: "relative w-full h-full", children: [_jsx("div", { children: Object.entries(tempData).map(([key, value]) => (_jsxs("div", { className: "text-2xl font-bold", children: [key, ": ", value] }, key))) }), _jsx("button", { onClick: () => {
11
- clearTempData();
12
- return removeView("sideMenu");
13
- }, className: "absolute left-0 top-2/5 text-3xl font-bold", children: ">" })] }) }));
14
- }
package/menu/index.js DELETED
@@ -1 +0,0 @@
1
- export { default as SideMenu } from "./SideMenu";
@@ -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,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { Button } from "../interface";
3
- export default function TestModal({ children, options, }: {
4
- children: React.ReactNode;
5
- options?: {
6
- buttons?: Button[];
7
- };
8
- }): 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/modal/index.js DELETED
@@ -1,3 +0,0 @@
1
- export { default as TestModal } from "./TestModal";
2
- export { default as AlertModal } from "./AlertModal";
3
- export { default as ControllerModal } from "./ControllerModal";
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const buttonClassNames: (href: string, nowPath: string, color?: [string, string]) => string;
3
- export declare function NavigationContainer({ children, }: {
4
- children: React.ReactNode;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { center, cn } from "../util";
3
- export const buttonClassNames = (href, nowPath, color) => {
4
- const [bg, text] = color ?? ["white", "black"];
5
- const classNames = [
6
- center.row(6),
7
- `text-${text}`,
8
- "font-bold w-full xl:w-50 h-11 xl:rounded-2xl flex justify-center xl:justify-start xl:pl-5",
9
- ].join(" ");
10
- const checkPathMatch = (href, nowPath) => {
11
- return href.split("/").pop() === nowPath.split("/").pop();
12
- };
13
- const toggle = checkPathMatch(href, nowPath)
14
- ? `bg-${bg}`
15
- : "bg-gray-500 xl:bg-transparent";
16
- return [classNames, toggle].join(" ");
17
- };
18
- export function NavigationContainer({ children, }) {
19
- const displays = "flex flex-row xl:flex-col z-40";
20
- const positions = "fixed bottom-0 left-0 xl:static";
21
- const sizes = "w-full xl:w-auto";
22
- const styles = "";
23
- return (_jsx("div", { className: cn(displays, positions, sizes, styles), children: children }));
24
- }
@@ -1 +0,0 @@
1
- export * from "./Navigation";
package/shelf/Shelf.d.ts DELETED
@@ -1,4 +0,0 @@
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 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.js DELETED
@@ -1 +0,0 @@
1
- export { default as Shelf } from "./Shelf";
package/store/index.d.ts DELETED
@@ -1,16 +0,0 @@
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 DELETED
@@ -1,39 +0,0 @@
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
- }));
@@ -1,4 +0,0 @@
1
- export declare function LineBreaks({ texts, gap }: {
2
- texts: string[];
3
- gap?: number;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
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
- }
package/text/index.js DELETED
@@ -1 +0,0 @@
1
- export * from "./LineBreaks";
@@ -1 +0,0 @@
1
- export default function classNames(...props: string[]): string;
@@ -1,4 +0,0 @@
1
- export default function classNames(...props) {
2
- const array = props.map((prop) => prop.split(" "));
3
- return array.flat().join(" ");
4
- }
package/util/colors.d.ts DELETED
@@ -1,10 +0,0 @@
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 DELETED
@@ -1,10 +0,0 @@
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
- };
package/util/display.d.ts DELETED
@@ -1,25 +0,0 @@
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 DELETED
@@ -1,25 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
1
- export declare const responsiveColToRow: () => string;
2
- export declare const responsiveRowToCol: () => string;
3
- export declare const responsiveGridToCol: (gridCell: number) => string;
@@ -1,15 +0,0 @@
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
- };
package/util/index.js DELETED
@@ -1,7 +0,0 @@
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/pattern.d.ts DELETED
@@ -1,7 +0,0 @@
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 {};
package/util/pattern.js DELETED
@@ -1,15 +0,0 @@
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
- };
@@ -1,14 +0,0 @@
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 DELETED
@@ -1,44 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
1
- export declare const circle: (radius: number) => string;
package/util/shape.js DELETED
@@ -1,3 +0,0 @@
1
- export const circle = (radius) => {
2
- return `rounded-full w-${radius} h-${radius} overflow-hidden `;
3
- };
package/version.txt DELETED
@@ -1 +0,0 @@
1
- 1.0.4
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes