@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.
- package/.eslintrc.cjs +17 -0
- package/Dockerfile +16 -0
- package/LICENCE +19 -0
- package/README.md +20 -0
- package/docs/README.md +47 -0
- package/index.html +13 -0
- package/package.json +49 -28
- package/postcss.config.js +6 -0
- 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 +1 -0
- package/setupPackage.js +78 -0
- package/src/App.tsx +32 -0
- package/src/_components/asset/interface.ts +2 -0
- package/src/_components/asset/links.ts +17 -0
- package/src/_components/asset/mock/academies.ts +52 -0
- package/src/_components/asset/mock/chartData.ts +104 -0
- package/src/_components/asset/mock/exams.ts +42 -0
- package/src/_components/asset/mock/index.ts +2 -0
- package/src/_components/asset/mock/people.ts +291 -0
- package/src/_components/asset/mock/test.ts +67 -0
- package/src/_components/asset/navigation.ts +17 -0
- package/src/_components/asset/people.ts +226 -0
- package/src/_components/asset/planets.ts +49 -0
- package/src/_components/controller/store.ts +11 -0
- package/src/_components/hook/useRoute.ts +47 -0
- package/src/_components/hook/useTyping.ts +46 -0
- package/src/_components/types/Level.ts +1 -0
- package/src/_components/view/Explore.tsx +16 -0
- package/src/_components/view/Home.tsx +180 -0
- package/src/_components/view/LottiePlayer.tsx +17 -0
- package/src/app/admin/exam/page.tsx +36 -0
- package/src/app/admin/grade/page.tsx +5 -0
- package/src/app/admin/layout.tsx +56 -0
- package/src/app/admin/news/page.tsx +15 -0
- package/src/app/admin/page.tsx +42 -0
- package/src/app/admin/rnd/monthly-test/page.tsx +5 -0
- package/src/app/admin/rnd/page.tsx +17 -0
- package/src/app/admin/statistics/page.tsx +5 -0
- package/src/app/admin/user/page.tsx +147 -0
- package/src/app/agency/exam/page.tsx +5 -0
- package/src/app/agency/group/page.tsx +5 -0
- package/src/app/agency/layout.tsx +55 -0
- package/src/app/agency/page.tsx +68 -0
- package/src/app/agency/sales/page.tsx +5 -0
- package/src/app/convention/page.tsx +58 -0
- package/src/app/page.tsx +4 -0
- 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/{board/index.d.ts → src/board/index.tsx} +4 -3
- package/src/board/template/CanvasBoard.tsx +17 -0
- package/src/board/template/ManageBoard.tsx +56 -0
- package/src/board/widget/Board.tsx +28 -0
- package/src/board/widget/DataField.tsx +70 -0
- package/src/board/widget/Header.tsx +63 -0
- package/src/board/widget/Tab.tsx +36 -0
- package/src/board/widget/Tags.tsx +81 -0
- package/{card/index.d.ts → src/card/index.tsx} +6 -5
- package/src/card/template/ChartCard.tsx +42 -0
- package/src/card/template/InfoCard.tsx +22 -0
- package/src/card/template/ProfileCard.tsx +36 -0
- package/src/card/template/RowCard.tsx +91 -0
- package/src/card/template/TableCard.tsx +41 -0
- package/src/card/template/TrumpCard.tsx +46 -0
- package/src/card/widget/Card.tsx +53 -0
- package/src/deck/Deck.tsx +46 -0
- package/{deck/index.d.ts → src/deck/index.tsx} +1 -1
- package/{index.d.ts → src/index.tsx} +11 -11
- package/src/interaction/Exception.tsx +10 -0
- package/src/interaction/LoadingSpinner.tsx +10 -0
- package/src/interaction/NoData.tsx +5 -0
- package/{interaction/index.d.ts → src/interaction/index.tsx} +2 -2
- package/src/interface/Board.ts +55 -0
- package/src/interface/Card.ts +66 -0
- package/src/interface/HTMLElement.ts +27 -0
- package/src/interface/Interaction.ts +4 -0
- package/src/interface/Menu.ts +5 -0
- package/src/interface/Modal.ts +19 -0
- package/{interface/Property.d.ts → src/interface/Property.ts} +46 -34
- package/src/interface/Widget.ts +4 -0
- package/{interface/index.d.ts → src/interface/index.ts} +3 -2
- package/src/layout/dashboard/Header.tsx +56 -0
- package/src/layout/dashboard/index.tsx +38 -0
- package/{layout/index.d.ts → src/layout/index.tsx} +1 -1
- package/src/main.tsx +10 -0
- package/src/menu/SideMenu.tsx +104 -0
- package/{menu/index.d.ts → src/menu/index.tsx} +1 -1
- package/src/modal/AlertModal.tsx +24 -0
- package/src/modal/ControllerModal.tsx +17 -0
- package/src/modal/Modal.tsx +66 -0
- package/src/modal/TestModal.tsx +19 -0
- package/{modal/index.d.ts → src/modal/index.tsx} +3 -3
- package/src/navigation/Navigation.tsx +37 -0
- package/{navigation/index.d.ts → src/navigation/index.tsx} +1 -1
- package/src/shelf/Shelf.tsx +3 -0
- package/{shelf/index.d.ts → src/shelf/index.tsx} +1 -1
- package/src/store/index.ts +66 -0
- package/src/text/LineBreaks.tsx +13 -0
- package/{text/index.d.ts → src/text/index.tsx} +1 -1
- package/src/util/classNames.ts +4 -0
- package/src/util/colors.ts +11 -0
- package/src/util/display.ts +31 -0
- package/src/util/displayResponsive.ts +17 -0
- package/{util/index.d.ts → src/util/index.ts} +7 -7
- package/src/util/pattern.ts +18 -0
- package/src/util/position.ts +43 -0
- package/src/util/shape.ts +3 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.build.json +42 -0
- package/tsconfig.json +28 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +10 -0
- package/board/index.js +0 -3
- package/board/template/CanvasBoard.d.ts +0 -2
- package/board/template/CanvasBoard.js +0 -10
- package/board/template/ManageBoard.d.ts +0 -4
- package/board/template/ManageBoard.js +0 -28
- package/board/widget/Board.d.ts +0 -2
- package/board/widget/Board.js +0 -16
- package/board/widget/DataField.d.ts +0 -6
- package/board/widget/DataField.js +0 -24
- package/board/widget/Header.d.ts +0 -2
- package/board/widget/Header.js +0 -22
- package/board/widget/Tab.d.ts +0 -4
- package/board/widget/Tab.js +0 -17
- package/board/widget/Tags.d.ts +0 -3
- package/board/widget/Tags.js +0 -30
- package/card/index.js +0 -5
- package/card/template/ChartCard.d.ts +0 -2
- package/card/template/ChartCard.js +0 -6
- package/card/template/ProfileCard.d.ts +0 -14
- package/card/template/ProfileCard.js +0 -8
- package/card/template/RowCard.d.ts +0 -5
- package/card/template/RowCard.js +0 -26
- package/card/template/TableCard.d.ts +0 -2
- package/card/template/TableCard.js +0 -12
- package/card/template/TrumpCard.d.ts +0 -2
- package/card/template/TrumpCard.js +0 -19
- package/card/widget/Card.d.ts +0 -2
- package/card/widget/Card.js +0 -45
- package/deck/Deck.d.ts +0 -16
- package/deck/Deck.js +0 -15
- package/deck/index.js +0 -1
- package/index.js +0 -11
- package/interaction/Exception.d.ts +0 -2
- package/interaction/Exception.js +0 -9
- package/interaction/LoadingSpinner.d.ts +0 -1
- package/interaction/LoadingSpinner.js +0 -5
- package/interaction/index.js +0 -2
- package/interface/Board.d.ts +0 -57
- package/interface/Board.js +0 -1
- package/interface/Card.d.ts +0 -73
- package/interface/Card.js +0 -1
- package/interface/HTMLElement.d.ts +0 -13
- package/interface/HTMLElement.js +0 -1
- package/interface/Interaction.d.ts +0 -5
- package/interface/Interaction.js +0 -1
- package/interface/Modal.d.ts +0 -18
- package/interface/Modal.js +0 -1
- package/interface/Property.js +0 -14
- package/interface/Widget.d.ts +0 -4
- package/interface/Widget.js +0 -1
- package/interface/index.js +0 -2
- package/layout/dashboard/Header.d.ts +0 -5
- package/layout/dashboard/Header.js +0 -19
- package/layout/dashboard/index.d.ts +0 -7
- package/layout/dashboard/index.js +0 -10
- package/layout/index.js +0 -1
- package/menu/SideMenu.d.ts +0 -1
- package/menu/SideMenu.js +0 -14
- package/menu/index.js +0 -1
- package/modal/AlertModal.d.ts +0 -2
- package/modal/AlertModal.js +0 -8
- package/modal/ControllerModal.d.ts +0 -6
- package/modal/ControllerModal.js +0 -6
- package/modal/Modal.d.ts +0 -2
- package/modal/Modal.js +0 -31
- package/modal/TestModal.d.ts +0 -8
- package/modal/TestModal.js +0 -6
- package/modal/index.js +0 -3
- package/navigation/Navigation.d.ts +0 -5
- package/navigation/Navigation.js +0 -24
- package/navigation/index.js +0 -1
- package/shelf/Shelf.d.ts +0 -4
- package/shelf/Shelf.js +0 -4
- package/shelf/index.js +0 -1
- package/store/index.d.ts +0 -16
- package/store/index.js +0 -39
- package/text/LineBreaks.d.ts +0 -4
- package/text/LineBreaks.js +0 -5
- package/text/index.js +0 -1
- package/util/classNames.d.ts +0 -1
- package/util/classNames.js +0 -4
- package/util/colors.d.ts +0 -10
- package/util/colors.js +0 -10
- package/util/display.d.ts +0 -25
- package/util/display.js +0 -25
- package/util/displayResponsive.d.ts +0 -3
- package/util/displayResponsive.js +0 -15
- package/util/index.js +0 -7
- package/util/pattern.d.ts +0 -7
- package/util/pattern.js +0 -15
- package/util/position.d.ts +0 -14
- package/util/position.js +0 -44
- package/util/shape.d.ts +0 -1
- package/util/shape.js +0 -3
- package/version.txt +0 -1
- /package/{asset → public}/fonts/Kostar.ttf +0 -0
- /package/{asset → public}/fonts/Megrim.ttf +0 -0
- /package/{asset → public}/fonts/NicoMoji.ttf +0 -0
- /package/{asset → public}/fonts/Pretendard-Medium.otf +0 -0
- /package/{asset → src/asset}/json/credit-lottie.json +0 -0
- /package/{asset → src/asset}/json/loading-lottie.json +0 -0
- /package/{asset → src/asset}/json/test.svg +0 -0
- /package/{globals.css → src/globals.css} +0 -0
package/interface/Interaction.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/interface/Modal.d.ts
DELETED
|
@@ -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
|
-
}
|
package/interface/Modal.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/interface/Property.js
DELETED
|
@@ -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 {};
|
package/interface/Widget.d.ts
DELETED
package/interface/Widget.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/interface/index.js
DELETED
|
@@ -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";
|
package/menu/SideMenu.d.ts
DELETED
|
@@ -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";
|
package/modal/AlertModal.d.ts
DELETED
package/modal/AlertModal.js
DELETED
|
@@ -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
|
-
}
|
package/modal/ControllerModal.js
DELETED
|
@@ -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
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
|
-
}
|
package/modal/TestModal.d.ts
DELETED
package/modal/TestModal.js
DELETED
|
@@ -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,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;
|
package/navigation/Navigation.js
DELETED
|
@@ -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
|
-
}
|
package/navigation/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Navigation";
|
package/shelf/Shelf.d.ts
DELETED
package/shelf/Shelf.js
DELETED
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
|
-
}));
|
package/text/LineBreaks.d.ts
DELETED
package/text/LineBreaks.js
DELETED
|
@@ -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";
|
package/util/classNames.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function classNames(...props: string[]): string;
|
package/util/classNames.js
DELETED
package/util/colors.d.ts
DELETED
package/util/colors.js
DELETED
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,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
package/util/pattern.d.ts
DELETED
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
|
-
};
|
package/util/position.d.ts
DELETED
|
@@ -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
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
|