@edu-tosel/design 1.0.41 → 1.0.43
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 +7 -0
- package/asset/SVG.js +7 -0
- package/asset/SVG.tsx +9 -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/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 +1 -2
- 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.d.ts +1 -1
- package/card/template/InfoCard/PersonalInformation.js +8 -8
- 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 +58 -0
- package/html/widget/Toggle.js +8 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/interface/Board.d.ts +2 -0
- package/interface/Card.d.ts +3 -1
- package/interface/HTMLElement.d.ts +6 -1
- package/interface/Layout.d.ts +9 -1
- package/interface/Modal.d.ts +18 -14
- package/interface/Overlay.d.ts +2 -2
- package/interface/Property.d.ts +3 -1
- 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/widget/dashboard/Header.js +1 -1
- package/layout/widget/dashboard/Layout.js +2 -2
- package/layout/widget/dashboard/Menu.d.ts +3 -2
- package/layout/widget/dashboard/Menu.js +2 -1
- 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 +28 -0
- package/layout/widget/dashboard/mypage/Profile.js +44 -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/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/Input.d.ts +10 -0
- package/modal/template/ConfirmModal/Input.js +7 -0
- package/modal/template/ConfirmModal/index.d.ts +5 -0
- package/modal/template/ConfirmModal/index.js +5 -0
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +3 -3
- package/overlay/template/Info.d.ts +1 -1
- package/overlay/template/Info.js +2 -2
- package/overlay/template/Manage.d.ts +1 -1
- package/overlay/template/Manage.js +2 -2
- package/overlay/widget/Overlay.design.d.ts +1 -1
- package/overlay/widget/Overlay.design.js +2 -1
- package/package.json +1 -1
- package/tailwind.config.ts +16 -0
- package/version.txt +1 -1
- package/html/widget/Input.d.ts +0 -2
- package/html/widget/Input.js +0 -31
- package/navigation/index.d.ts +0 -1
- package/navigation/index.js +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
|
+
import { cn } from "../../util";
|
|
4
|
+
import Obstacle from "../widget/Obstacle";
|
|
5
|
+
const widthSize = {
|
|
6
|
+
xs: "w-28",
|
|
7
|
+
sm: "w-48",
|
|
8
|
+
md: "w-64",
|
|
9
|
+
lg: "w-96",
|
|
10
|
+
xl: "w-128",
|
|
11
|
+
"2xl": "w-144",
|
|
12
|
+
full: "w-full",
|
|
13
|
+
};
|
|
14
|
+
function Input({ state, onKeyDown, placeholder, options }) {
|
|
15
|
+
const { width, disabled } = options ?? {};
|
|
16
|
+
const id = useId();
|
|
17
|
+
const [value, setValue] = state;
|
|
18
|
+
const container = {
|
|
19
|
+
positions: "relative",
|
|
20
|
+
width: `${widthSize[width ?? "xs"]} h-8`,
|
|
21
|
+
displays: "flex items-center",
|
|
22
|
+
};
|
|
23
|
+
const body = {
|
|
24
|
+
styles: "rounded-md bg-slate-200 text-xs",
|
|
25
|
+
sizes: "w-full h-full",
|
|
26
|
+
paddings: "pl-4",
|
|
27
|
+
pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
|
|
28
|
+
effect: `transition-all`,
|
|
29
|
+
};
|
|
30
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("input", { className: cn(body), id: id, type: "text", value: value, placeholder: placeholder ?? "입력해주세요", onKeyDown: onKeyDown, onChange: (e) => setValue(e.target.value) }), _jsx(Obstacle, { disabled: disabled })] }));
|
|
31
|
+
}
|
|
32
|
+
function LG({ state, placeholder, flag, type }) {
|
|
33
|
+
const [value, setValue] = state;
|
|
34
|
+
const [onFocus, setOnFocus] = useState(false);
|
|
35
|
+
const container = {
|
|
36
|
+
positions: "relative",
|
|
37
|
+
};
|
|
38
|
+
const placeholderBox = {
|
|
39
|
+
positions: "absolute left-5",
|
|
40
|
+
styles: "duration-300",
|
|
41
|
+
fonts: "leading-none text-gray-medium",
|
|
42
|
+
animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
|
|
43
|
+
};
|
|
44
|
+
const inputBox = {
|
|
45
|
+
sizes: "w-102.5 h-13.5 pl-5 pt-3",
|
|
46
|
+
fonts: "text-sm",
|
|
47
|
+
background: flag === true
|
|
48
|
+
? "bg-green-dark/10"
|
|
49
|
+
: flag === false
|
|
50
|
+
? "bg-crimson-burgundy/10 text-crimson-burgundy"
|
|
51
|
+
: "bg-gray-light",
|
|
52
|
+
styles: "bg-gray-light rounded-md outline-none",
|
|
53
|
+
animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(placeholderBox), children: placeholder }), _jsx("input", { className: cn(inputBox), value: value, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => setValue(e.target.value), type: type ?? "text" })] }));
|
|
56
|
+
}
|
|
57
|
+
Input.LG = LG;
|
|
58
|
+
export default Input;
|
package/html/widget/Toggle.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
2
3
|
const widthSize = {
|
|
3
4
|
xs: "w-32",
|
|
4
5
|
sm: "w-48",
|
|
@@ -9,6 +10,11 @@ const widthSize = {
|
|
|
9
10
|
full: "w-full",
|
|
10
11
|
};
|
|
11
12
|
export default function Toggle({ state: [chekced, setChecked], labels, options, }) {
|
|
12
|
-
const { disabled } = options ?? {};
|
|
13
|
-
|
|
13
|
+
const { disabled, className } = options ?? {};
|
|
14
|
+
const container = {
|
|
15
|
+
displays: "flex items-center",
|
|
16
|
+
sizes: "h-6",
|
|
17
|
+
className,
|
|
18
|
+
};
|
|
19
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("label", { htmlFor: "", className: "inline-flex items-center gap-2 ", children: _jsx("input", { disabled: typeof disabled === "boolean" && disabled, type: "checkbox", className: "toggle bg-red-crimson appearance-none relative rounded-full w-10 h-5 cursor-pointer", checked: chekced, onChange: (e) => setChecked(e.target.checked) }) }), labels && (_jsx("div", { className: "ml-2 transition-all text-xs", children: labels.map(([status, label]) => (status === chekced ? label : "")) }))] }));
|
|
14
20
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/interface/Board.d.ts
CHANGED
package/interface/Card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, DataField, DataSet, Disabled, ImageSize, OnClick, Size, Titles } from "./Property";
|
|
1
|
+
import { Button, DataField, DataSet, Disabled, ImageSize, OnClick, Size, State, Titles } from "./Property";
|
|
2
2
|
interface CardOptions {
|
|
3
3
|
className?: string;
|
|
4
4
|
boundary?: string;
|
|
@@ -9,6 +9,7 @@ interface CardOptions {
|
|
|
9
9
|
text?: string;
|
|
10
10
|
border?: string;
|
|
11
11
|
onClick?: OnClick;
|
|
12
|
+
onMouse?: State<boolean>;
|
|
12
13
|
overflow?: "hiden" | "y-scroll" | "auto";
|
|
13
14
|
noPadding?: boolean;
|
|
14
15
|
padding?: string | false;
|
|
@@ -72,6 +73,7 @@ export interface InfoCardProps extends CardProps {
|
|
|
72
73
|
titles: Titles;
|
|
73
74
|
topRight?: React.ReactNode;
|
|
74
75
|
button?: Button;
|
|
76
|
+
image?: string;
|
|
75
77
|
options?: {
|
|
76
78
|
titleBorder?: string;
|
|
77
79
|
} & CardOptions;
|
|
@@ -15,6 +15,7 @@ export interface HTMLElement {
|
|
|
15
15
|
background?: string;
|
|
16
16
|
text?: string;
|
|
17
17
|
disabled?: Disabled;
|
|
18
|
+
rounded?: string;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
export interface HTMLLabelElement extends HTMLElement {
|
|
@@ -28,14 +29,17 @@ export interface HTMLSelectElement<T> extends HTMLElement {
|
|
|
28
29
|
selectOptions?: SelectOption<T>[];
|
|
29
30
|
placeholder?: string;
|
|
30
31
|
}
|
|
32
|
+
type HTMLInputElementType = "text" | "password" | "date" | "email" | "phone" | "number";
|
|
31
33
|
export interface HTMLInputElement extends HTMLElement {
|
|
32
34
|
state: State<string> | State<string | undefined>;
|
|
33
35
|
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
34
36
|
placeholder?: string;
|
|
37
|
+
flag?: boolean;
|
|
38
|
+
type?: HTMLInputElementType;
|
|
35
39
|
}
|
|
36
40
|
export interface HTMLToggleElement extends HTMLElement {
|
|
37
41
|
state: State<boolean>;
|
|
38
|
-
labels
|
|
42
|
+
labels?: [[true, string], [false, string]];
|
|
39
43
|
}
|
|
40
44
|
export type ColorType = "red" | "blue" | "green";
|
|
41
45
|
export interface HTMLCheckBoxElement extends HTMLElement {
|
|
@@ -52,3 +56,4 @@ export interface HTMLElementFrame {
|
|
|
52
56
|
disabled?: Disabled;
|
|
53
57
|
onClick?: OnClick;
|
|
54
58
|
}
|
|
59
|
+
export {};
|
package/interface/Layout.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnClick } from "./Property";
|
|
2
|
+
import { ShowAction } from "./Widget";
|
|
2
3
|
interface Notification {
|
|
3
4
|
id: number;
|
|
4
5
|
userId: number;
|
|
@@ -31,8 +32,15 @@ export interface DashboardProps {
|
|
|
31
32
|
background?: string;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
35
|
+
export interface MyPageProps extends DashboardProps {
|
|
36
|
+
profile: {
|
|
37
|
+
image: string;
|
|
38
|
+
username: string;
|
|
39
|
+
email: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
34
42
|
export interface DashboardNotification {
|
|
35
|
-
|
|
43
|
+
action?: ShowAction;
|
|
36
44
|
notifications?: Partial<Notification>[];
|
|
37
45
|
}
|
|
38
46
|
export {};
|
package/interface/Modal.d.ts
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { Button, Scripts, Size } from "./Property";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Button, Scripts, Size, Titles } from "./Property";
|
|
2
|
+
import { ShowAction } from "./Widget";
|
|
3
|
+
interface Options {
|
|
4
|
+
width: Size;
|
|
5
|
+
height: Size;
|
|
6
|
+
padding: boolean;
|
|
7
|
+
buttons: Button[];
|
|
8
|
+
noClose: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface ModalProps {
|
|
11
|
+
titles: Titles;
|
|
5
12
|
children: React.ReactNode;
|
|
13
|
+
action?: ShowAction;
|
|
6
14
|
className?: string;
|
|
7
|
-
options?:
|
|
8
|
-
width?: Size;
|
|
9
|
-
height?: Size;
|
|
10
|
-
padding?: boolean;
|
|
11
|
-
buttons?: Button[];
|
|
12
|
-
isCloseButton?: boolean;
|
|
13
|
-
closeButtonColor?: string;
|
|
14
|
-
};
|
|
15
|
+
options?: Partial<Options>;
|
|
15
16
|
debug?: string;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
interface ConfirmModalProps extends ModalProps {
|
|
19
|
+
buttons: [Button, Button];
|
|
20
|
+
}
|
|
21
|
+
interface AlertModalProps extends Omit<ModalProps, "children"> {
|
|
19
22
|
scripts: Scripts;
|
|
20
23
|
options?: {
|
|
21
24
|
buttons?: Button[];
|
|
22
25
|
};
|
|
23
26
|
}
|
|
27
|
+
export type { ModalProps, ConfirmModalProps, AlertModalProps };
|
package/interface/Overlay.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLElementFrame, HTMLLabelElement } from "./HTMLElement";
|
|
2
2
|
import { Titles } from "./Property";
|
|
3
|
+
import { ShowAction } from "./Widget";
|
|
3
4
|
export interface OverlayProps {
|
|
4
5
|
titles: Titles;
|
|
5
|
-
|
|
6
|
-
event?: string;
|
|
6
|
+
action?: ShowAction;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export interface InfoOverlayProps extends OverlayProps {
|
package/interface/Property.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { Replace } from "./Widget";
|
|
3
|
+
import { HTMLLabelElement } from "./HTMLElement";
|
|
3
4
|
/**
|
|
4
5
|
* State type for the React component
|
|
5
6
|
* @template T
|
|
@@ -36,7 +37,8 @@ export type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "
|
|
|
36
37
|
* @property {"full"} full - Full size
|
|
37
38
|
*/
|
|
38
39
|
export type OnClick<T = unknown> = (prop?: T) => unknown | ((prop?: T) => Promise<unknown>);
|
|
39
|
-
export
|
|
40
|
+
export interface Button extends HTMLLabelElement {
|
|
41
|
+
}
|
|
40
42
|
export type Disabled = boolean | OnClick;
|
|
41
43
|
export type Scripts = {
|
|
42
44
|
script: string;
|
package/interface/Widget.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ type Event<T extends boolean | string | null | undefined> = [
|
|
|
10
10
|
];
|
|
11
11
|
export type Show = Event<boolean | string>;
|
|
12
12
|
export type Replace = Event<boolean | string | null | undefined>;
|
|
13
|
+
export interface ShowAction {
|
|
14
|
+
event: string;
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
}
|
|
13
17
|
export interface ShowProps {
|
|
14
18
|
widgets?: Show[];
|
|
15
19
|
children: React.ReactNode;
|
|
@@ -15,8 +15,8 @@ export default function Tab({ tabs, textColor, }) {
|
|
|
15
15
|
sizes: "h-9 w-32 ",
|
|
16
16
|
font: textColor ?? "text-green-dark",
|
|
17
17
|
};
|
|
18
|
-
return (_jsx("div", { className: cn(container), children: tabs.map((
|
|
18
|
+
return (_jsx("div", { className: cn(container), children: tabs.map(({ title, onClick }, index) => (_jsx("button", { onClick: () => {
|
|
19
19
|
setTabsSelection(tabsSelection.map((_, i) => i === index));
|
|
20
|
-
return onClick();
|
|
20
|
+
return onClick && onClick();
|
|
21
21
|
}, className: cn(button, `${tabsSelection[index] && "bg-white rounded-2xl"}`), children: title }, title))) }));
|
|
22
22
|
}
|
package/layout/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Events } from "./template/Events";
|
|
2
|
-
export
|
|
2
|
+
export * from "./template/Dashboard";
|
|
3
|
+
export { default as Promotion } from "./template/Promotion";
|
|
3
4
|
export { default as Sign } from "./template/Sign";
|
|
4
5
|
export { default as DataField } from "./template/DataField";
|
|
5
6
|
export { default as Gallery } from "./template/Gallery";
|
package/layout/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Events } from "./template/Events";
|
|
2
|
-
export
|
|
2
|
+
export * from "./template/Dashboard";
|
|
3
|
+
export { default as Promotion } from "./template/Promotion";
|
|
3
4
|
export { default as Sign } from "./template/Sign";
|
|
4
5
|
export { default as DataField } from "./template/DataField";
|
|
5
6
|
export { default as Gallery } from "./template/Gallery";
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import Layout from "../widget/dashboard/Layout";
|
|
2
|
+
import MyPageLayout from "../widget/dashboard/mypage/Layout";
|
|
3
|
+
import Profile from "../widget/dashboard/mypage/Profile";
|
|
2
4
|
declare const Dashboard: {
|
|
3
5
|
Layout: typeof Layout;
|
|
4
6
|
};
|
|
5
|
-
|
|
7
|
+
declare const MyPage: {
|
|
8
|
+
Layout: typeof MyPageLayout;
|
|
9
|
+
Card: {
|
|
10
|
+
Profile: typeof Profile;
|
|
11
|
+
Navigate: {
|
|
12
|
+
Academy: ({ onClick }: {
|
|
13
|
+
onClick: import("../../interface").OnClick;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
Payment: ({ onClick }: {
|
|
16
|
+
onClick: import("../../interface").OnClick;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export { default as buttonClassNames } from "./../widget/dashboard/buttonClassNames";
|
|
22
|
+
export { Dashboard, MyPage };
|
|
@@ -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",
|
|
@@ -14,7 +14,7 @@ export function Header({ title, logo, notification, options, }) {
|
|
|
14
14
|
sizes: "h-15 w-full",
|
|
15
15
|
background: `${background ?? "bg-white"} dark:bg-black`,
|
|
16
16
|
text: `${text ?? "text-black"} dark:text-white`,
|
|
17
|
-
styles: "px-5 xl:px-8 2xl:px-16 ",
|
|
17
|
+
styles: "px-5 xl:px-8 2xl:px-16 box-shadow",
|
|
18
18
|
className,
|
|
19
19
|
};
|
|
20
20
|
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: [
|
|
@@ -1,9 +1,9 @@
|
|
|
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
9
|
const { title, options: headerOptions, logo, notification } = header;
|
|
@@ -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
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] })] }));
|
|
29
29
|
}
|
|
@@ -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 { useWidgetStore } from "../../../store";
|
|
5
|
-
export default function Menu({
|
|
5
|
+
export default function Menu({ action, image, }) {
|
|
6
|
+
const { isVisible } = action ?? {};
|
|
6
7
|
const { setIsOwn } = useWidgetStore();
|
|
7
8
|
const container = {
|
|
8
9
|
displays: "flex flex-col",
|
|
@@ -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, { title: title, notification: notification, options: headerOptions, logo: logo }), _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,28 @@
|
|
|
1
|
+
import { Button as ButtonProp, OnClick, State, Titles } from "../../../../interface";
|
|
2
|
+
declare function Profile({ name, birthday, image, modify, }: {
|
|
3
|
+
name: string;
|
|
4
|
+
birthday: string;
|
|
5
|
+
image: string;
|
|
6
|
+
modify: {
|
|
7
|
+
name: OnClick;
|
|
8
|
+
birthday: OnClick;
|
|
9
|
+
};
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare namespace Profile {
|
|
12
|
+
var Detail: ({ titles, infos, toggle, }: {
|
|
13
|
+
titles: Titles;
|
|
14
|
+
infos?: Info[] | undefined;
|
|
15
|
+
toggle?: State<boolean> | undefined;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
var Preview: ({ image, username, email, }: {
|
|
18
|
+
username: string;
|
|
19
|
+
email: string;
|
|
20
|
+
image: string;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
interface Info {
|
|
24
|
+
title: string | "email" | "phone";
|
|
25
|
+
content: string;
|
|
26
|
+
button: ButtonProp;
|
|
27
|
+
}
|
|
28
|
+
export default Profile;
|