@edu-tosel/design 1.0.42 → 1.0.44
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/asset/SVG.d.ts +21 -0
- package/asset/SVG.js +19 -0
- package/asset/SVG.tsx +21 -0
- package/asset/svg/Close.d.ts +5 -0
- package/asset/svg/Close.js +9 -0
- package/asset/svg/Close.tsx +32 -0
- package/asset/svg/Direction.d.ts +8 -0
- package/asset/svg/Direction.js +8 -0
- package/asset/svg/Direction.tsx +36 -0
- package/asset/svg/Email.d.ts +1 -0
- package/asset/svg/Email.js +4 -0
- package/asset/svg/Email.tsx +20 -0
- package/asset/svg/Image.d.ts +6 -0
- package/asset/svg/Image.js +4 -0
- package/asset/svg/Image.tsx +24 -0
- package/asset/svg/Notification.d.ts +8 -0
- package/asset/svg/Notification.js +4 -0
- package/asset/svg/Notification.tsx +34 -0
- package/asset/svg/Phone.d.ts +1 -0
- package/asset/svg/Phone.js +4 -0
- package/asset/svg/Phone.tsx +20 -0
- package/asset/svg/Profile.d.ts +7 -0
- package/asset/svg/Profile.js +4 -0
- package/asset/svg/Profile.tsx +27 -0
- package/asset/svg/TOSEL.d.ts +3 -0
- package/asset/svg/TOSEL.js +4 -0
- package/asset/svg/TOSEL.tsx +63 -0
- package/board/design/Board.design.js +5 -3
- package/board/template/CanvasBoard.d.ts +1 -1
- package/board/template/CanvasBoard.js +5 -4
- package/board/template/ManageBoard.js +2 -3
- package/board/template/PaperBoard.js +1 -1
- package/board/widget/Header.js +2 -5
- package/card/design/Card.design.js +6 -16
- package/card/design/InfoCard.design.d.ts +1 -1
- package/card/design/InfoCard.design.js +2 -2
- package/card/template/InfoCard/Academy.d.ts +20 -0
- package/card/template/InfoCard/Academy.js +31 -0
- package/card/template/InfoCard/Grade.d.ts +1 -2
- package/card/template/InfoCard/Grade.js +3 -3
- package/card/template/InfoCard/PersonalInformation.js +1 -1
- package/card/template/InfoCard/Student.d.ts +1 -2
- package/card/template/InfoCard/Student.js +3 -3
- package/card/template/InfoCard/index.d.ts +2 -0
- package/card/template/InfoCard/index.js +2 -0
- package/html/design/Label.design.js +1 -1
- package/html/index.d.ts +1 -1
- package/html/index.js +1 -1
- package/html/template/Input.d.ts +6 -0
- package/html/template/Input.js +68 -0
- package/html/widget/DatePicker.d.ts +2 -2
- package/html/widget/EmailInput.d.ts +2 -2
- package/html/widget/EmailInput.js +1 -1
- package/html/widget/Toggle.js +8 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/interface/Board.d.ts +4 -2
- package/interface/Card.d.ts +3 -1
- package/interface/HTMLElement.d.ts +8 -2
- package/interface/Layout.d.ts +30 -8
- package/interface/Modal.d.ts +18 -14
- package/interface/Overlay.d.ts +2 -2
- package/interface/Property.d.ts +5 -2
- package/interface/Widget.d.ts +4 -0
- package/layout/design/Tab.design.js +2 -2
- package/layout/index.d.ts +2 -1
- package/layout/index.js +2 -1
- package/layout/template/Dashboard.d.ts +18 -1
- package/layout/template/Dashboard.js +9 -1
- package/layout/template/Events.js +4 -2
- package/layout/template/Promotion.d.ts +5 -0
- package/layout/template/Promotion.js +5 -0
- package/layout/template/Shelf.d.ts +1 -1
- package/layout/template/Shelf.js +3 -2
- package/layout/template/Sign.d.ts +4 -2
- package/layout/template/Sign.js +4 -2
- package/layout/widget/dashboard/Header.d.ts +1 -1
- package/layout/widget/dashboard/Header.js +14 -7
- package/layout/widget/dashboard/Layout.js +4 -4
- package/layout/widget/dashboard/Menu.d.ts +2 -4
- package/layout/widget/dashboard/Menu.js +18 -8
- package/{navigation → layout/widget/dashboard}/Navigation.d.ts +0 -1
- package/layout/widget/dashboard/Navigation.js +20 -0
- package/layout/widget/dashboard/Notification.d.ts +1 -1
- package/layout/widget/dashboard/Notification.js +2 -1
- package/layout/widget/dashboard/buttonClassNames.d.ts +2 -0
- package/{navigation/Navigation.js → layout/widget/dashboard/buttonClassNames.js} +5 -13
- package/layout/widget/dashboard/mypage/Layout.d.ts +2 -0
- package/layout/widget/dashboard/mypage/Layout.js +30 -0
- package/layout/widget/dashboard/mypage/Navigate.d.ts +12 -0
- package/layout/widget/dashboard/mypage/Navigate.js +29 -0
- package/layout/widget/dashboard/mypage/Profile.d.ts +30 -0
- package/layout/widget/dashboard/mypage/Profile.js +59 -0
- package/layout/widget/promotion/Layout.d.ts +3 -0
- package/layout/widget/promotion/Layout.js +5 -0
- package/layout/widget/promotion/Thumbnail.d.ts +1 -0
- package/layout/widget/promotion/Thumbnail.js +10 -0
- package/layout/widget/sign/WithTitle.d.ts +6 -0
- package/layout/widget/sign/WithTitle.js +6 -0
- package/modal/design/ConfirmModal.design.d.ts +2 -0
- package/modal/design/ConfirmModal.design.js +18 -0
- package/modal/design/Modal.design.d.ts +1 -1
- package/modal/design/Modal.design.js +17 -24
- package/modal/index.d.ts +1 -0
- package/modal/index.js +1 -0
- package/modal/template/Alert.d.ts +1 -1
- package/modal/template/Alert.js +3 -3
- package/modal/template/ConfirmModal/Confirm.d.ts +9 -0
- package/modal/template/ConfirmModal/Confirm.js +15 -0
- package/modal/template/ConfirmModal/Input.d.ts +9 -0
- package/modal/template/ConfirmModal/Input.js +7 -0
- package/modal/template/ConfirmModal/Reimage.d.ts +10 -0
- package/modal/template/ConfirmModal/Reimage.js +34 -0
- package/modal/template/ConfirmModal/index.d.ts +7 -0
- package/modal/template/ConfirmModal/index.js +10 -0
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +3 -3
- package/overlay/design/Overlay.design.d.ts +2 -0
- package/overlay/{widget → design}/Overlay.design.js +2 -1
- package/overlay/template/Info.d.ts +1 -1
- package/overlay/template/Info.js +3 -3
- package/overlay/template/Manage.d.ts +1 -1
- package/overlay/template/Manage.js +4 -4
- package/package.json +1 -1
- package/tailwind.config.ts +19 -0
- package/version.txt +1 -1
- package/html/widget/Input.d.ts +0 -2
- package/html/widget/Input.js +0 -31
- package/layout/widget/sign/Input.d.ts +0 -15
- package/layout/widget/sign/Input.js +0 -33
- package/navigation/index.d.ts +0 -1
- package/navigation/index.js +0 -1
- package/overlay/widget/Overlay.design.d.ts +0 -2
- /package/overlay/{widget → design}/Frame.design.d.ts +0 -0
- /package/overlay/{widget → design}/Frame.design.js +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import Layout from "../widget/dashboard/Layout";
|
|
2
|
+
import MyPageLayout from "../widget/dashboard/mypage/Layout";
|
|
3
|
+
import Navigate from "../widget/dashboard/mypage/Navigate";
|
|
4
|
+
import Profile from "../widget/dashboard/mypage/Profile";
|
|
2
5
|
const Dashboard = {
|
|
3
6
|
Layout,
|
|
4
7
|
};
|
|
5
|
-
|
|
8
|
+
const MyPage = {
|
|
9
|
+
Layout: MyPageLayout,
|
|
10
|
+
Card: { Profile, Navigate },
|
|
11
|
+
};
|
|
12
|
+
export { default as buttonClassNames } from "./../widget/dashboard/buttonClassNames";
|
|
13
|
+
export { Dashboard, MyPage };
|
|
@@ -14,8 +14,10 @@ function Show({ widgets, children }) {
|
|
|
14
14
|
};
|
|
15
15
|
if (React.isValidElement(Component)) {
|
|
16
16
|
const ComponentWithVisibility = React.cloneElement(Component, {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
action: {
|
|
18
|
+
event: event(),
|
|
19
|
+
isVisible,
|
|
20
|
+
},
|
|
19
21
|
});
|
|
20
22
|
return _jsx(Fragment, { children: ComponentWithVisibility }, index);
|
|
21
23
|
}
|
|
@@ -2,7 +2,7 @@ import { ShelfProps } from "../../interface/Shelf";
|
|
|
2
2
|
declare function Shelf({ titles, debug, children }: ShelfProps<string | number>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Shelf {
|
|
4
4
|
var Wrap: ({ className, titles, children, debug, options, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
var Row: ({ titles, children, debug }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
var Row: ({ titles, children, className, debug, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
var Col: ({ titles, children, debug, className, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export default Shelf;
|
package/layout/template/Shelf.js
CHANGED
|
@@ -24,9 +24,10 @@ function Wrap({ className, titles, children, debug, options, }) {
|
|
|
24
24
|
subtitleSize: "text-sm",
|
|
25
25
|
}, debug: debug, children: children }));
|
|
26
26
|
}
|
|
27
|
-
function Row({ titles, children, debug }) {
|
|
27
|
+
function Row({ titles, children, className, debug, }) {
|
|
28
28
|
const container = {
|
|
29
|
-
displays: "flex flex-row
|
|
29
|
+
displays: "flex flex-row",
|
|
30
|
+
className: className ?? "gap-x-7.5",
|
|
30
31
|
};
|
|
31
32
|
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), options: {
|
|
32
33
|
titleSize: "text-lg xl:text-2xl",
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import Box from "../widget/sign/Box";
|
|
2
2
|
import Button from "../widget/sign/Button";
|
|
3
3
|
import Check from "../widget/sign/Check";
|
|
4
|
-
import Input from "../widget/sign/Input";
|
|
5
4
|
import Layout from "../widget/sign/Layout";
|
|
5
|
+
import WithTitle from "../widget/sign/WithTitle";
|
|
6
6
|
declare const Sign: {
|
|
7
7
|
Box: typeof Box;
|
|
8
8
|
Button: typeof Button;
|
|
9
9
|
Check: typeof Check;
|
|
10
|
-
Input:
|
|
10
|
+
Input: {
|
|
11
|
+
WithTitle: typeof WithTitle;
|
|
12
|
+
};
|
|
11
13
|
Layout: typeof Layout;
|
|
12
14
|
};
|
|
13
15
|
export default Sign;
|
package/layout/template/Sign.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import Box from "../widget/sign/Box";
|
|
2
2
|
import Button from "../widget/sign/Button";
|
|
3
3
|
import Check from "../widget/sign/Check";
|
|
4
|
-
import Input from "../widget/sign/Input";
|
|
5
4
|
import Layout from "../widget/sign/Layout";
|
|
5
|
+
import WithTitle from "../widget/sign/WithTitle";
|
|
6
6
|
const Sign = {
|
|
7
7
|
Box,
|
|
8
8
|
Button,
|
|
9
9
|
Check,
|
|
10
|
-
Input
|
|
10
|
+
Input: {
|
|
11
|
+
WithTitle,
|
|
12
|
+
},
|
|
11
13
|
Layout,
|
|
12
14
|
};
|
|
13
15
|
export default Sign;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardHeaderProps } from "../../../interface";
|
|
2
|
-
export declare function Header({ title, logo, notification, options, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Header({ title, logo, notification, menu, options, }: DashboardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../../util";
|
|
2
|
+
import { cn, gradient } from "../../../util";
|
|
3
3
|
import { useWidgetStore } from "../../../store";
|
|
4
4
|
import Menu from "./Menu";
|
|
5
5
|
import { Events } from "../..";
|
|
6
6
|
import Notification from "./Notification";
|
|
7
|
-
|
|
7
|
+
import SVG from "../../../asset/SVG";
|
|
8
|
+
import { Label } from "../../../html";
|
|
9
|
+
export function Header({ title, logo, notification, menu, options, }) {
|
|
8
10
|
const { setView, setIsOwn } = useWidgetStore();
|
|
9
11
|
const { notifications, flag, onClick, color } = notification;
|
|
10
12
|
const { text, background, className } = options ?? {};
|
|
@@ -14,18 +16,23 @@ export function Header({ title, logo, notification, options, }) {
|
|
|
14
16
|
sizes: "h-15 w-full",
|
|
15
17
|
background: `${background ?? "bg-white"} dark:bg-black`,
|
|
16
18
|
text: `${text ?? "text-black"} dark:text-white`,
|
|
17
|
-
styles: "px-5 xl:px-8 2xl:px-16 ",
|
|
19
|
+
styles: "px-5 xl:px-8 2xl:px-16 box-shadow",
|
|
18
20
|
className,
|
|
19
21
|
};
|
|
20
22
|
return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex h-12 items-center gap-8 xl:gap-24 2xl:gap-26", children: [logo ? _jsx(_Fragment, { children: logo }) : _jsx("div", { className: "text-2xl", children: "TOSEL" }), _jsx("div", { className: "text-3xl font-pretendard-bold", children: title })] }), _jsx("div", { className: "relative flex gap-5.25", children: _jsxs(Events.Show, { widgets: [
|
|
21
23
|
["notification", _jsx(Notification, { notifications: notifications })],
|
|
22
|
-
["menu", _jsx(Menu, {
|
|
23
|
-
], children: [
|
|
24
|
+
[menu ? "menu" : false, menu && _jsx(Menu, { ...menu })],
|
|
25
|
+
], children: [_jsx(SVG.Notification, { flag: flag, onClick: () => {
|
|
24
26
|
setIsOwn(true);
|
|
25
27
|
onClick && onClick();
|
|
26
28
|
return setView("notification");
|
|
27
|
-
},
|
|
29
|
+
}, color: color }), menu?.profile ? (_jsx(SVG.Profile, { onClick: () => {
|
|
28
30
|
setIsOwn(true);
|
|
29
31
|
return setView("menu");
|
|
30
|
-
},
|
|
32
|
+
}, color: color })) : (_jsx(Label.Button, { title: "\uB300\uC2DC\uBCF4\uB4DC\uB85C", onClick: menu?.onClick, options: {
|
|
33
|
+
width: "sm",
|
|
34
|
+
height: "xs",
|
|
35
|
+
text: "text-white",
|
|
36
|
+
background: gradient.bg.greenToRed,
|
|
37
|
+
} }))] }) })] }));
|
|
31
38
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment, useEffect } from "react";
|
|
3
|
-
import { NavigationContainer } from "../../../navigation";
|
|
4
3
|
import { Header } from "./Header";
|
|
5
4
|
import { cn } from "../../../util";
|
|
6
5
|
import { useWidgetStore } from "../../../store";
|
|
6
|
+
import { NavigationContainer } from "./Navigation";
|
|
7
7
|
export default function Layout({ header, navigations, children, options, }) {
|
|
8
8
|
const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
|
|
9
|
-
const { title, options: headerOptions, logo, notification } = header;
|
|
9
|
+
const { title, options: headerOptions, logo, notification, menu } = header;
|
|
10
10
|
const { background } = options ?? {};
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (isOwn) {
|
|
@@ -23,7 +23,7 @@ export default function Layout({ header, navigations, children, options, }) {
|
|
|
23
23
|
const body = {
|
|
24
24
|
sizes: "h-full ",
|
|
25
25
|
displays: "flex gap-12 xl:gap-7.5 ",
|
|
26
|
-
paddings: "pt-15 xl:pl-2 2xl:
|
|
26
|
+
paddings: "pt-15 xl:pl-2 2xl:pl-12 2xl:pr-11.25 xl:pt-7.5",
|
|
27
27
|
};
|
|
28
|
-
return (_jsxs("div", { className: cn(container), onClick: setFlag, children: [_jsx(Header, { title: title, notification: notification, options: headerOptions, logo: logo }), _jsxs("div", { className: cn(body), children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
|
|
28
|
+
return (_jsxs("div", { className: cn(container), onClick: setFlag, children: [_jsx(Header, { title: title, notification: notification, menu: menu, options: headerOptions, logo: logo }), _jsxs("div", { className: cn(body), children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
|
|
29
29
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTransition, animated } from "react-spring";
|
|
3
|
-
import { cn } from "../../../util";
|
|
3
|
+
import { cn, gradient } from "../../../util";
|
|
4
4
|
import { useWidgetStore } from "../../../store";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { Label } from "../../../html";
|
|
6
|
+
export default function Menu({ action, profile, input, onClick }) {
|
|
7
|
+
const { isVisible } = action ?? {};
|
|
8
|
+
const { setIsOwn, removeModal } = useWidgetStore();
|
|
7
9
|
const container = {
|
|
8
|
-
displays: "flex flex-col",
|
|
9
|
-
positions: "absolute top-
|
|
10
|
-
sizes: "w-
|
|
11
|
-
styles: " bg-white box-shadow",
|
|
10
|
+
displays: "flex flex-col p-2.5",
|
|
11
|
+
positions: "absolute top-0 right-0 z-45 ",
|
|
12
|
+
sizes: "w-52.5 ",
|
|
13
|
+
styles: " bg-white box-shadow rounded-lgx",
|
|
12
14
|
};
|
|
13
15
|
const transitions = useTransition(isVisible, {
|
|
14
16
|
from: { opacity: 0 },
|
|
@@ -16,5 +18,13 @@ export default function Menu({ isVisible, image, }) {
|
|
|
16
18
|
leave: { opacity: 0 },
|
|
17
19
|
config: { duration: 200 },
|
|
18
20
|
});
|
|
19
|
-
return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), onClick: () => setIsOwn(true), children: [_jsxs("div", { className: "h-
|
|
21
|
+
return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), onClick: () => setIsOwn(true), children: [_jsxs("div", { className: "h-17.75 flex gap-12 justify-center items-center text-black border-b-2 pb-2.5", children: [_jsxs("div", { children: [_jsx("div", { children: profile?.name }), _jsx("div", { className: "text-xs", children: profile?.belong })] }), _jsx("div", { className: "relative w-15 h-15 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: profile?.image, alt: "profile-image" }) })] }), _jsxs("div", { className: "flex flex-col gap-2.5 pt-2.5", children: [_jsx("input", { className: "w-47.5 h-6.25 border-2 text-black", value: input?.password[0], onChange: (e) => input?.password[1](e.target.value), type: "password" }), _jsxs("div", { className: "flex gap-2.5", children: [_jsx(Label.Button, { title: "\uCDE8\uC18C", onClick: () => removeModal("menu"), options: {
|
|
22
|
+
width: "sm",
|
|
23
|
+
height: "xs",
|
|
24
|
+
} }), _jsx(Label.Button, { title: "\uD655\uC778", onClick: onClick, options: {
|
|
25
|
+
background: gradient.bg.greenToRed,
|
|
26
|
+
text: "text-white",
|
|
27
|
+
width: "sm",
|
|
28
|
+
height: "xs",
|
|
29
|
+
} })] })] })] })));
|
|
20
30
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
export function NavigationContainer({ children, }) {
|
|
4
|
+
const container = {
|
|
5
|
+
positions: "fixed xl:static bottom-0 left-0 z-40",
|
|
6
|
+
displays: "flex flex-row xl:flex-col",
|
|
7
|
+
sizes: "w-full xl:w-auto",
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("div", { className: cn(container), children: [children, _jsx(Copyright, {})] }));
|
|
10
|
+
}
|
|
11
|
+
function Copyright() {
|
|
12
|
+
const copyrightBox = {
|
|
13
|
+
displays: "hidden xl:flex flex-col",
|
|
14
|
+
sizes: "h-11.5 pt-2.5 mt-2.5",
|
|
15
|
+
styles: "border-t border-black",
|
|
16
|
+
fonts: "text-2xs text-gray-dark",
|
|
17
|
+
};
|
|
18
|
+
const nowYear = new Date().getFullYear();
|
|
19
|
+
return (_jsxs("div", { className: cn(copyrightBox), children: [_jsxs("div", { className: "leading-tight", children: ["Copyright \u00A9 2002-", nowYear] }), _jsx("div", { className: "leading-tight", children: "International TOSEL Committee." }), _jsx("div", { className: "leading-tight", children: "All Rights Reserved." })] }));
|
|
20
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardNotification } from "../../../interface";
|
|
2
|
-
export default function Notification({
|
|
2
|
+
export default function Notification({ action, notifications, }: DashboardNotification): JSX.Element;
|
|
@@ -2,7 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTransition, animated } from "react-spring";
|
|
3
3
|
import { cn } from "../../../util";
|
|
4
4
|
import Events from "../../template/Events";
|
|
5
|
-
export default function Notification({
|
|
5
|
+
export default function Notification({ action, notifications, }) {
|
|
6
|
+
const { isVisible } = action ?? {};
|
|
6
7
|
const container = {
|
|
7
8
|
positions: "absolute right-12 z-45",
|
|
8
9
|
displays: "flex flex-col ",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn } from "
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export const buttonClassNames = (href, nowPath, color) => {
|
|
1
|
+
import { useWidgetStore } from "../../../store";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
import checkPathMatch from "../../../util/checkPathMatch";
|
|
4
|
+
const buttonClassNames = (href, nowPath, color) => {
|
|
6
5
|
const { isDark } = useWidgetStore();
|
|
7
6
|
const [bg, [text, selectedText]] = color ?? ["white", ["white", "black"]];
|
|
8
7
|
const container = {
|
|
@@ -18,11 +17,4 @@ export const buttonClassNames = (href, nowPath, color) => {
|
|
|
18
17
|
`xl:bg-transparent xl:hover:bg-white/50 ${text} dark:text-white`;
|
|
19
18
|
return [cn(container), toggle].join(" ");
|
|
20
19
|
};
|
|
21
|
-
export
|
|
22
|
-
const container = {
|
|
23
|
-
positions: "fixed xl:static bottom-0 left-0 z-40",
|
|
24
|
-
displays: "flex flex-row xl:flex-col",
|
|
25
|
-
sizes: "w-full xl:w-auto",
|
|
26
|
-
};
|
|
27
|
-
return _jsx("div", { className: cn(container), children: children });
|
|
28
|
-
}
|
|
20
|
+
export default buttonClassNames;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useEffect } from "react";
|
|
3
|
+
import { Header } from "../Header";
|
|
4
|
+
import { cn } from "../../../../util";
|
|
5
|
+
import { useWidgetStore } from "../../../../store";
|
|
6
|
+
import Profile from "./Profile";
|
|
7
|
+
import { NavigationContainer } from "../Navigation";
|
|
8
|
+
export default function MyPageLayout({ header, profile, navigations, children, options, }) {
|
|
9
|
+
const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
|
|
10
|
+
const { title, options: headerOptions, logo, notification } = header;
|
|
11
|
+
const { background } = options ?? {};
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (isOwn) {
|
|
14
|
+
return setIsOwn(false);
|
|
15
|
+
}
|
|
16
|
+
return clearView();
|
|
17
|
+
}, [flag]);
|
|
18
|
+
const container = {
|
|
19
|
+
sizes: "min-h-screen h-screen xl:h-auto",
|
|
20
|
+
background: `${background ?? "bg-white"} dark:bg-black/80`,
|
|
21
|
+
styles: "font-pretendard-medium",
|
|
22
|
+
dark: isDark && "dark",
|
|
23
|
+
};
|
|
24
|
+
const body = {
|
|
25
|
+
displays: "flex gap-12 xl:gap-7.5 ",
|
|
26
|
+
sizes: "h-full ",
|
|
27
|
+
paddings: "pt-15 xl:pl-2 2xl:px-12 xl:pt-7.5",
|
|
28
|
+
};
|
|
29
|
+
return (_jsxs("div", { className: cn(container), onClick: setFlag, children: [_jsx(Header, { ...header }), _jsxs("div", { className: cn(body), children: [_jsxs(NavigationContainer, { children: [_jsx(Profile.Preview, { username: profile.username, email: profile.email, image: profile.image }), navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index)))] }), children] })] }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnClick } from "../../../../interface";
|
|
2
|
+
declare function Academy({ onClick }: {
|
|
3
|
+
onClick: OnClick;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function Payment({ onClick }: {
|
|
6
|
+
onClick: OnClick;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const Navigate: {
|
|
9
|
+
Academy: typeof Academy;
|
|
10
|
+
Payment: typeof Payment;
|
|
11
|
+
};
|
|
12
|
+
export default Navigate;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Card from "../../../../card/design/Card.design";
|
|
4
|
+
function Academy({ onClick }) {
|
|
5
|
+
const [onMouse, _] = useState(false);
|
|
6
|
+
return (_jsxs(Card, { options: {
|
|
7
|
+
onClick,
|
|
8
|
+
className: "pt-5 pl-5 group",
|
|
9
|
+
boundary: "box-shadow shadow-green-dark",
|
|
10
|
+
onMouse: [onMouse, _],
|
|
11
|
+
width: "2xs",
|
|
12
|
+
height: "2xs",
|
|
13
|
+
}, children: [_jsx("div", { className: "text-gray-medium group-hover:text-green-dark duration-300", children: "\uB098\uC758 \uD559\uC6D0" }), _jsx("svg", { className: "absolute bottom-5 right-5 ", xmlns: "http://www.w3.org/2000/svg", width: "60", height: "60", viewBox: "0 0 60 60", fill: "none", children: _jsx("path", { className: "duration-300", d: "M9 53H52M10.9545 6H50.0455M12.9091 6V53M48.0909 6V53M22.6818 15.7917H26.5909M22.6818 23.625H26.5909M22.6818 31.4583H26.5909M34.4091 15.7917H38.3182M34.4091 23.625H38.3182M34.4091 31.4583H38.3182M22.6818 53V44.1875C22.6818 42.566 23.9953 41.25 25.6136 41.25H35.3864C37.0047 41.25 38.3182 42.566 38.3182 44.1875V53", stroke: !onMouse ? "#7F7F7F" : "#105652", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round" }) })] }));
|
|
14
|
+
}
|
|
15
|
+
function Payment({ onClick }) {
|
|
16
|
+
return (_jsxs(Card, { options: {
|
|
17
|
+
onClick,
|
|
18
|
+
className: "pt-5 pl-5",
|
|
19
|
+
background: "group bg-green-dark/10 hover:bg-green-dark/30 ",
|
|
20
|
+
width: "2xs",
|
|
21
|
+
height: "2xs",
|
|
22
|
+
boundary: "",
|
|
23
|
+
}, children: [_jsx("div", { className: "opacity-0 group-hover:opacity-100 duration-300", children: "\uACB0\uC81C \uC815\uBCF4" }), _jsxs("div", { className: "absolute top-5 group-hover:top-11.25 left-5 flex flex-col gap-1.5 duration-300", children: [_jsx("div", { className: "w-24 h-1.5 bg-green-dark/30 group-hover:bg-green-dark/40 duration-300" }), _jsx("div", { className: "w-14.25 h-1.5 bg-green-dark/30 group-hover:bg-green-dark/40 duration-300" })] }), _jsx("div", { className: "absolute top-5 right-5 w-12.25 h-7 rounded-full bg-[#CFDDDC]" }), _jsx("div", { className: "absolute left-0 bottom-5 w-full h-5 bg-green-dark" })] }));
|
|
24
|
+
}
|
|
25
|
+
const Navigate = {
|
|
26
|
+
Academy,
|
|
27
|
+
Payment,
|
|
28
|
+
};
|
|
29
|
+
export default Navigate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Button as ButtonProp, OnClick, State, Titles } from "../../../../interface";
|
|
2
|
+
interface ProfileProps {
|
|
3
|
+
name: string;
|
|
4
|
+
birthday: string;
|
|
5
|
+
image: string;
|
|
6
|
+
modify: {
|
|
7
|
+
image: OnClick;
|
|
8
|
+
name: OnClick;
|
|
9
|
+
birthday: OnClick;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare function Profile({ name, birthday, image, modify }: ProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare namespace Profile {
|
|
14
|
+
var Detail: ({ titles, infos, toggle, }: {
|
|
15
|
+
titles: Titles;
|
|
16
|
+
infos?: Info[] | undefined;
|
|
17
|
+
toggle?: State<boolean> | undefined;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
var Preview: ({ image, username, email, }: {
|
|
20
|
+
username: string;
|
|
21
|
+
email: string;
|
|
22
|
+
image: string;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
interface Info {
|
|
26
|
+
title: string | "email" | "phone";
|
|
27
|
+
content: string;
|
|
28
|
+
button: ButtonProp;
|
|
29
|
+
}
|
|
30
|
+
export default Profile;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
|
+
import { animated, useTransition } from "react-spring";
|
|
4
|
+
import { cn, gradient } from "../../../../util";
|
|
5
|
+
import Card from "../../../../card/design/Card.design";
|
|
6
|
+
import { Label, Toggle } from "../../../../html";
|
|
7
|
+
import SVG from "../../../../asset/SVG";
|
|
8
|
+
function Profile({ name, birthday, image, modify }) {
|
|
9
|
+
const [hover, setHover] = useState(false);
|
|
10
|
+
const hoverBox = {
|
|
11
|
+
positions: "absolute top-0 left-0",
|
|
12
|
+
displays: "flex flex-col gap-y-2.75 justify-center items-center",
|
|
13
|
+
sizes: "w-full h-full",
|
|
14
|
+
styles: "bg-black/50",
|
|
15
|
+
};
|
|
16
|
+
const transitions = useTransition(hover, {
|
|
17
|
+
from: { opacity: 0 },
|
|
18
|
+
enter: { opacity: 1 },
|
|
19
|
+
leave: { opacity: 0 },
|
|
20
|
+
config: { duration: 250 },
|
|
21
|
+
});
|
|
22
|
+
return (_jsxs(Card, { options: {
|
|
23
|
+
className: "flex gap-x-7.5 items-center pl-5",
|
|
24
|
+
width: "md",
|
|
25
|
+
height: "2xs",
|
|
26
|
+
boundary: "border-1 border-black",
|
|
27
|
+
}, children: [_jsxs("button", { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), onClick: modify.image, className: "w-20 h-20 overflow-hidden rounded-md relative", children: [_jsx("img", { src: image, alt: "profile-image", className: "bg-cover" }), transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(hoverBox), children: [_jsx(SVG.Image, {}), _jsx("div", { className: "text-white text-xs leading-none", children: "\uC0AC\uC9C4 \uBC14\uAFB8\uAE30" })] })))] }), _jsxs("div", { className: "flex flex-col h-20", children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold text-gray-dark", children: name }), _jsx("div", { className: "leading-none text-gray-medium mt-1.25", children: birthday }), _jsxs("div", { className: "flex gap-3 mt-auto", children: [_jsx(Label.Button, { title: "\uC2E4\uBA85 \uC218\uC815", options: { width: "sm", height: "xs" }, onClick: modify.name }), _jsx(Label.Button, { title: "\uC0DD\uC77C \uC218\uC815", options: { width: "sm", height: "xs" }, onClick: modify.birthday })] })] })] }));
|
|
28
|
+
}
|
|
29
|
+
function Detail({ titles, infos, toggle, }) {
|
|
30
|
+
const infoBox = {
|
|
31
|
+
displays: "flex ",
|
|
32
|
+
sizes: "w-full",
|
|
33
|
+
styles: "text-green-dark",
|
|
34
|
+
};
|
|
35
|
+
const id = useId();
|
|
36
|
+
return (_jsxs(Card, { options: {
|
|
37
|
+
className: "pt-5 px-5",
|
|
38
|
+
width: "md",
|
|
39
|
+
height: "xs",
|
|
40
|
+
background: gradient.bg.greenToRedSoft,
|
|
41
|
+
boundary: "",
|
|
42
|
+
}, children: [_jsxs("div", { className: "h-13.25 flex flex-col text-gray-dark border-b-1 border-crimson-burgundy", children: [_jsx("div", { className: "text-xl font-pretendard-bold h-6 leading-none", children: titles.title }), _jsx("div", { className: "h-4.75 leading-none", children: titles.subtitle })] }), _jsx("div", { className: "mt-4.25 flex flex-col gap-2.5 ", children: infos?.map(({ title, content, button }, index) => (_jsxs("div", { className: cn(infoBox), children: [title === "phone" ? (_jsx(SVG.Phone, {})) : title === "email" ? (_jsx(SVG.Email, {})) : (_jsx("div", { className: "font-pretendard-bold mr-5 w-7", children: title })), _jsx("div", { className: "leading-none flex items-center w-60", children: content }), _jsx(Label.Button, { title: button.title, onClick: button.onClick, options: {
|
|
43
|
+
className: "ml-auto",
|
|
44
|
+
background: gradient.bg.greenToRed,
|
|
45
|
+
text: "text-white",
|
|
46
|
+
width: "sm",
|
|
47
|
+
height: "xs",
|
|
48
|
+
} })] }, id + index))) }), toggle && (_jsxs("div", { className: "flex gap-2.5 items-center absolute bottom-5 right-5", children: [_jsx("div", { className: "text-xs leading-none text-green-dark", children: "\uD559\uC6D0\uC73C\uB85C \uBC1B\uAE30" }), _jsx(Toggle, { state: toggle })] }))] }));
|
|
49
|
+
}
|
|
50
|
+
function Preview({ image, username, email, }) {
|
|
51
|
+
const container = {
|
|
52
|
+
displays: "hidden xl:flex flex-col justify-center items-center gap-5",
|
|
53
|
+
sizes: "w-51 h-46.5",
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: "relative w-21 h-21 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: image, alt: "profile-image" }) }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "text-xl h-5.25 leading-none font-pretendard-bold", children: username }), _jsx("div", { className: "text-xs h-5.25 leading-none flex justify-center items-center", children: email })] })] }));
|
|
56
|
+
}
|
|
57
|
+
Profile.Detail = Detail;
|
|
58
|
+
Profile.Preview = Preview;
|
|
59
|
+
export default Profile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Thumbnail(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { HiOutlineBellSlash } from "react-icons/hi2";
|
|
3
|
+
import { MdComputer } from "react-icons/md";
|
|
4
|
+
import { CiCreditCard1 } from "react-icons/ci";
|
|
5
|
+
import { IoShareSocialOutline } from "react-icons/io5";
|
|
6
|
+
import { MdAccessTime } from "react-icons/md";
|
|
7
|
+
import { IoIosSchool } from "react-icons/io";
|
|
8
|
+
export default function Thumbnail() {
|
|
9
|
+
return (_jsxs("div", { className: "w-[288px] flex flex-col mr-20", children: [_jsx("img", { src: "https://grepp-programmers.s3.amazonaws.com/production/file_resource/6246/Dev_Thumnail_Full_stack_Deceloper_3.png", alt: "", className: "w-full object-cover " }), _jsxs("div", { className: "font-bold text-left text-2xl p-1 mb-2 mt-2", children: ["[3\uAE30] K-Digital Training: ", _jsx("br", {}), "\uD0C0\uC785\uC2A4\uD06C\uB9BD\uD2B8\uB85C \uD568\uAED8\uD558\uB294 \uC6F9 \uD480 \uC0AC\uC774\uD074 \uAC1C\uBC1C(React, Node.js)"] }), _jsx("div", { className: "h-10", children: _jsx("button", { className: "w-full h-10 rounded-md bg-gradient-to-r from-violet-500 to-fuchsia-500 font-bold text-white", children: "\uD558\uB7EC\uAC00\uAE30" }) }), _jsxs("div", { className: "h-14 pt-4 pb-4 text-xs text-slate-300 flex justify-center items-center", children: [_jsx(HiOutlineBellSlash, { className: "mr-2" }), "\uC2E0\uCCAD \uC885\uB8CC\uC77C : ~2024-03-21"] }), _jsxs("div", { className: "h-auto pt-2 w-90/100", children: [_jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx("div", { className: "w-6", children: _jsx(IoIosSchool, { className: "mr-2" }) }), "\uC2E0\uCCAD \uAE30\uAC04 : 2024-04-19 ~ 2024-09-05 \uC885\uB8CC\uC77C \uC774\uD6C4 \uBB34\uC81C\uD55C \uC218\uAC15"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx("div", { className: "w-6", children: _jsx(MdComputer, { className: "mr-2" }) }), "\uC628/\uC624\uD504\uB77C\uC778 \uCF54\uC2A4"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(CiCreditCard1, { className: "mr-2" }), "\u20A939,000"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(IoShareSocialOutline, { className: "mr-2" }), "\uACF5\uC720\uD558\uAE30"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(MdAccessTime, { className: "mr-2" }), "2024-05-02 \uB9C8\uC9C0\uB9C9 \uC5C5\uB370\uC774\uD2B8"] })] })] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLInput } from "../../../interface";
|
|
2
|
+
interface InputWithTitleProps extends HTMLInput {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
declare function WithTitle({ title, placeholder, state, flag, type, }: InputWithTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default WithTitle;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from "../../../html";
|
|
3
|
+
function WithTitle({ title, placeholder, state, flag, type, }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input.LG, { placeholder: placeholder, state: state, flag: flag, type: type })] }));
|
|
5
|
+
}
|
|
6
|
+
export default WithTitle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Label } from "../../html";
|
|
3
|
+
import { cn } from "../../util";
|
|
4
|
+
import ModalDesign from "../design/Modal.design";
|
|
5
|
+
export default function ConfirmModalDesign({ titles, action, buttons, children, options, }) {
|
|
6
|
+
const container = {
|
|
7
|
+
displays: "flex flex-col",
|
|
8
|
+
};
|
|
9
|
+
const buttonBox = {
|
|
10
|
+
positions: "absolute bottom-5 left-5",
|
|
11
|
+
displays: "flex gap-2.5",
|
|
12
|
+
};
|
|
13
|
+
return (_jsx(ModalDesign, { titles: titles, action: action, options: options, children: _jsxs("div", { className: cn(container), children: [children, _jsx("div", { className: cn(buttonBox), children: buttons.map(({ title, onClick, options }) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
|
|
14
|
+
...options,
|
|
15
|
+
width: "lg",
|
|
16
|
+
height: "sm",
|
|
17
|
+
} }, title))) })] }) }));
|
|
18
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ModalProps } from "../../interface/Modal";
|
|
2
|
-
export default function ModalDesign({
|
|
2
|
+
export default function ModalDesign({ titles, action, children, options, debug, }: ModalProps): import("react").ReactPortal | null;
|