@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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../util";
|
|
3
3
|
import Card from "./Card.design";
|
|
4
|
-
export function InfoCardDesign({ titles: { title, subtitle }, topRight, debug, options, children, }) {
|
|
4
|
+
export function InfoCardDesign({ titles: { title, subtitle }, topRight, debug, image, options, children, }) {
|
|
5
5
|
const { titleBorder, text } = options ?? {};
|
|
6
6
|
const container = {
|
|
7
7
|
displays: "flex flex-col",
|
|
@@ -20,5 +20,5 @@ export function InfoCardDesign({ titles: { title, subtitle }, topRight, debug, o
|
|
|
20
20
|
displays: "flex flex-col-reverse",
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
|
-
return (_jsxs(Card, { options: { ...options, className: cn(container) }, debug: debug, children: [_jsxs("div", { className: cn(topBox.container), children: [_jsxs("div", { className: "text-gray-dim ", children: [_jsx("div", { className: cn(topBox.titleText), children: title }), _jsx("div", { className: cn(topBox.subtitleText), children: subtitle ?? "" })] }), topRight] }), children] }));
|
|
23
|
+
return (_jsxs(Card, { options: { ...options, className: cn(container) }, debug: debug, children: [_jsxs("div", { className: cn(topBox.container), children: [_jsxs("div", { className: "text-gray-dim ", children: [_jsx("div", { className: cn(topBox.titleText), children: title }), _jsx("div", { className: cn(topBox.subtitleText), children: subtitle ?? "" })] }), topRight] }), image && (_jsx("div", { className: "absolute right-5 top-5 w-22.5 h-22.5", children: _jsx("div", { className: "relative h-full w-full rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md ", src: image }) }) })), children] }));
|
|
24
24
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Button as ButtonProp, InfoCardProps } from "../../../interface";
|
|
2
|
+
interface AcademyCardProps extends Omit<InfoCardProps, "children"> {
|
|
3
|
+
buttons: ButtonProp[];
|
|
4
|
+
data: {
|
|
5
|
+
address: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
interface StudentCardProps extends Omit<InfoCardProps, "titles" | "children"> {
|
|
9
|
+
data: {
|
|
10
|
+
academy: string;
|
|
11
|
+
name: string;
|
|
12
|
+
birthday: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare function Academy({ titles, data, buttons }: AcademyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare namespace Academy {
|
|
18
|
+
var Digital: ({ image, data }: StudentCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export default Academy;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
3
|
+
import SVG from "../../../asset/SVG";
|
|
4
|
+
import { Label } from "../../../html";
|
|
5
|
+
function Academy({ titles, data, buttons }) {
|
|
6
|
+
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
7
|
+
titleBorder: "border-green-dark",
|
|
8
|
+
background: "",
|
|
9
|
+
boundary: "",
|
|
10
|
+
width: "xs",
|
|
11
|
+
height: "md",
|
|
12
|
+
}, children: _jsxs("div", { className: "mt-2.5 flex flex-col gap-2.5", children: [_jsx("div", { className: "w-full", children: data.address }), _jsx("div", { className: "flex gap-2.5", children: buttons.map(({ title, onClick }, index) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
|
|
13
|
+
background: !index ? "bg-gray-medium" : "bg-green-dark",
|
|
14
|
+
text: "text-white",
|
|
15
|
+
width: "sm",
|
|
16
|
+
height: "xs",
|
|
17
|
+
} }, index))) })] }) }));
|
|
18
|
+
}
|
|
19
|
+
function Digital({ image, data }) {
|
|
20
|
+
return (_jsx(InfoCardDesign, { options: {
|
|
21
|
+
width: "md",
|
|
22
|
+
height: "lg",
|
|
23
|
+
titleBorder: "border-crimson-burgundy",
|
|
24
|
+
boundary: "border-2 border-crimson-burgundy",
|
|
25
|
+
}, titles: {
|
|
26
|
+
title: "Digital Student Card",
|
|
27
|
+
subtitle: "디지털 학생증",
|
|
28
|
+
}, image: image, children: _jsxs("div", { className: "mt-5.5", children: [_jsxs("div", { className: "flex flex-col gap-y-3 text-gray-dark", children: [_jsx("div", { className: "text-xl h-6 font-pretendard-bold leading-none", children: data.academy }), _jsxs("div", { className: "h-10.5", children: [_jsxs("div", { className: "leading-none", children: ["\uC774\uB984: ", data.name, " / \uC0DD\uB144\uC6D4\uC77C: ", data.birthday] }), _jsx("div", { children: data.createdAt })] }), _jsx("div", { className: "text-xs leading-none", children: "*\uCE74\uB4DC\uB97C \uB20C\uB7EC \uD559\uC6D0\uC815\uBCF4\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4." })] }), _jsx(SVG.TOSEL, { className: "absolute bottom-5 right-5" })] }) }));
|
|
29
|
+
}
|
|
30
|
+
Academy.Digital = Digital;
|
|
31
|
+
export default Academy;
|
|
@@ -5,12 +5,11 @@ interface Data {
|
|
|
5
5
|
level: string;
|
|
6
6
|
levelString: string;
|
|
7
7
|
levelColor: string;
|
|
8
|
-
profileImage: string;
|
|
9
8
|
score: number;
|
|
10
9
|
grade: number;
|
|
11
10
|
}
|
|
12
11
|
export interface GradeProps extends Omit<InfoCardProps, "children"> {
|
|
13
12
|
data: Partial<Data>;
|
|
14
13
|
}
|
|
15
|
-
export default function Grade({ titles, data }: GradeProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function Grade({ titles, image, data }: GradeProps): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export {};
|
|
@@ -3,7 +3,7 @@ import { Label } from "../../../html";
|
|
|
3
3
|
import { cn } from "../../../util";
|
|
4
4
|
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
5
5
|
import { label } from "./static/label";
|
|
6
|
-
export default function Grade({ titles, data }) {
|
|
6
|
+
export default function Grade({ titles, image, data }) {
|
|
7
7
|
const container = {
|
|
8
8
|
positions: "relative",
|
|
9
9
|
displays: "flex flex-col justify-between mt-2.5",
|
|
@@ -15,7 +15,7 @@ export default function Grade({ titles, data }) {
|
|
|
15
15
|
styles: "bg-white-off text-sm rounded-md",
|
|
16
16
|
text: data.levelColor,
|
|
17
17
|
};
|
|
18
|
-
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
18
|
+
return (_jsx(InfoCardDesign, { titles: titles, image: image, options: {
|
|
19
19
|
titleBorder: "border-blue-navy",
|
|
20
20
|
width: "sm",
|
|
21
21
|
height: "xs",
|
|
@@ -25,5 +25,5 @@ export default function Grade({ titles, data }) {
|
|
|
25
25
|
text: "text-white hover:text-blue-navy",
|
|
26
26
|
background: "bg-blue-navy hover:bg-gray-light",
|
|
27
27
|
className: cn(label),
|
|
28
|
-
} })
|
|
28
|
+
} })] }) }));
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ export default function PersonalInformation({ titles, theme = "red", button, dat
|
|
|
40
40
|
height: "md",
|
|
41
41
|
background: color.background[theme],
|
|
42
42
|
boundary: `border-3 ${color.border[theme]}`,
|
|
43
|
-
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(body.container), children: [_jsx("div", { className: cn(body.belong), children: data.info }), _jsx("div", { className: cn(body.username), children: data.username }), _jsx("div", { className: cn(body.name), children: data.name }), _jsxs("div", { className: cn(body.subInfo), children: [_jsx("div", { children: data.email }), _jsx("div", { children: data.phone })] })] }), button && (_jsx(Label.Button, { title: button
|
|
43
|
+
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(body.container), children: [_jsx("div", { className: cn(body.belong), children: data.info }), _jsx("div", { className: cn(body.username), children: data.username }), _jsx("div", { className: cn(body.name), children: data.name }), _jsxs("div", { className: cn(body.subInfo), children: [_jsx("div", { children: data.email }), _jsx("div", { children: data.phone })] })] }), button && (_jsx(Label.Button, { title: button.title, onClick: button.onClick, options: {
|
|
44
44
|
width: "md",
|
|
45
45
|
background: color.background.button[theme],
|
|
46
46
|
text: "text-white",
|
|
@@ -2,11 +2,10 @@ import { InfoCardProps, OnClick } from "./../../../interface";
|
|
|
2
2
|
interface Data {
|
|
3
3
|
belong: string;
|
|
4
4
|
birthday: string;
|
|
5
|
-
profileImage: string;
|
|
6
5
|
}
|
|
7
6
|
interface StudentInfo extends Omit<InfoCardProps, "children"> {
|
|
8
7
|
data: Partial<Data>;
|
|
9
8
|
onClick?: OnClick;
|
|
10
9
|
}
|
|
11
|
-
export default function Student({ titles, data, onClick }: StudentInfo): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function Student({ titles, image, data, onClick }: StudentInfo): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { Label } from "../../../html";
|
|
|
3
3
|
import { cn } from "../../../util";
|
|
4
4
|
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
5
5
|
import { label } from "./static/label";
|
|
6
|
-
export default function Student({ titles, data, onClick }) {
|
|
6
|
+
export default function Student({ titles, image, data, onClick }) {
|
|
7
7
|
const container = {
|
|
8
8
|
positions: "relative",
|
|
9
9
|
displays: "flex flex-col justify-between mt-2.5",
|
|
@@ -14,7 +14,7 @@ export default function Student({ titles, data, onClick }) {
|
|
|
14
14
|
sizes: "w-22.5 h-6.4",
|
|
15
15
|
styles: "bg-white-off text-sm rounded-md",
|
|
16
16
|
};
|
|
17
|
-
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
17
|
+
return (_jsx(InfoCardDesign, { titles: titles, image: image, options: {
|
|
18
18
|
titleBorder: "border-blue-navy",
|
|
19
19
|
width: "sm",
|
|
20
20
|
height: "xs",
|
|
@@ -24,5 +24,5 @@ export default function Student({ titles, data, onClick }) {
|
|
|
24
24
|
text: "text-white hover:text-blue-navy",
|
|
25
25
|
background: "bg-blue-navy hover:bg-gray-light",
|
|
26
26
|
className: cn(label),
|
|
27
|
-
} })
|
|
27
|
+
} })] }) }));
|
|
28
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Academy from "./Academy";
|
|
1
2
|
import Exam from "./Exam";
|
|
2
3
|
import Finance from "./Finance";
|
|
3
4
|
import Grade from "./Grade";
|
|
@@ -6,6 +7,7 @@ import PersonalInformation from "./PersonalInformation";
|
|
|
6
7
|
import Product from "./Product";
|
|
7
8
|
import Student from "./Student";
|
|
8
9
|
declare const InfoCard: {
|
|
10
|
+
Academy: typeof Academy;
|
|
9
11
|
PersonalInformation: typeof PersonalInformation;
|
|
10
12
|
Exam: typeof Exam;
|
|
11
13
|
ExamData: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Academy from "./Academy";
|
|
1
2
|
import Exam from "./Exam";
|
|
2
3
|
import ExamData from "./ExamData";
|
|
3
4
|
import Finance from "./Finance";
|
|
@@ -7,6 +8,7 @@ import PersonalInformation from "./PersonalInformation";
|
|
|
7
8
|
import Product from "./Product";
|
|
8
9
|
import Student from "./Student";
|
|
9
10
|
const InfoCard = {
|
|
11
|
+
Academy,
|
|
10
12
|
PersonalInformation,
|
|
11
13
|
Exam,
|
|
12
14
|
ExamData,
|
|
@@ -27,7 +27,7 @@ export default function LabelDesign({ title, onClick, options, hoverState, }) {
|
|
|
27
27
|
texts: text ?? "text-gray-dim",
|
|
28
28
|
animation: "duration-500",
|
|
29
29
|
fonts: "font-pretendard-light",
|
|
30
|
-
styles: height !== "xs" ? "rounded-
|
|
30
|
+
styles: height !== "xs" ? "rounded-lgx" : "rounded-md text-xs",
|
|
31
31
|
};
|
|
32
32
|
return (_jsx("div", { className: className, children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(body), onClick: onClick, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), children: title }), _jsx(Obstacle, { disabled: disabled })] }) }));
|
|
33
33
|
}
|
package/html/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Input } from "./
|
|
1
|
+
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
3
|
export { default as DatePicker } from "./widget/DatePicker";
|
|
4
4
|
export { default as Label } from "./template/Label";
|
package/html/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Input } from "./
|
|
1
|
+
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
3
|
export { default as DatePicker } from "./widget/DatePicker";
|
|
4
4
|
export { default as Label } from "./template/Label";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLInput } from "../../interface";
|
|
2
|
+
declare function Input({ state, onKeyDown, placeholder, options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace Input {
|
|
4
|
+
var LG: ({ state, placeholder, flag, type, label }: HTMLInput) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
export default Input;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState, useRef } from "react";
|
|
3
|
+
import { cn, gradient } from "../../util";
|
|
4
|
+
import Obstacle from "../widget/Obstacle";
|
|
5
|
+
import Label from "./Label";
|
|
6
|
+
const widthSize = {
|
|
7
|
+
xs: "w-28",
|
|
8
|
+
sm: "w-48",
|
|
9
|
+
md: "w-64",
|
|
10
|
+
lg: "w-96",
|
|
11
|
+
xl: "w-128",
|
|
12
|
+
"2xl": "w-144",
|
|
13
|
+
full: "w-full",
|
|
14
|
+
};
|
|
15
|
+
function Input({ state, onKeyDown, placeholder, options }) {
|
|
16
|
+
const { width, disabled } = options ?? {};
|
|
17
|
+
const [value, setValue] = state;
|
|
18
|
+
const id = useId();
|
|
19
|
+
const container = {
|
|
20
|
+
positions: "relative",
|
|
21
|
+
width: `${widthSize[width ?? "xs"]} h-8`,
|
|
22
|
+
displays: "flex items-center",
|
|
23
|
+
};
|
|
24
|
+
const body = {
|
|
25
|
+
styles: "rounded-md bg-slate-200 text-xs",
|
|
26
|
+
sizes: "w-full h-full",
|
|
27
|
+
paddings: "pl-4",
|
|
28
|
+
pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
|
|
29
|
+
effect: `transition-all`,
|
|
30
|
+
};
|
|
31
|
+
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 })] }));
|
|
32
|
+
}
|
|
33
|
+
function LG({ state, placeholder, flag, type, label }) {
|
|
34
|
+
const [value, setValue] = state;
|
|
35
|
+
const [onFocus, setOnFocus] = useState(false);
|
|
36
|
+
const ref = useRef(null);
|
|
37
|
+
const container = {
|
|
38
|
+
positions: "relative",
|
|
39
|
+
};
|
|
40
|
+
const placeholderBox = {
|
|
41
|
+
positions: "absolute left-5",
|
|
42
|
+
styles: "duration-300",
|
|
43
|
+
fonts: "leading-none text-gray-medium",
|
|
44
|
+
animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
|
|
45
|
+
};
|
|
46
|
+
const inputBox = {
|
|
47
|
+
sizes: "w-102.5 h-13.5",
|
|
48
|
+
paddings: `${placeholder && "pt-3"} pl-5`,
|
|
49
|
+
fonts: "text-sm",
|
|
50
|
+
background: flag === true
|
|
51
|
+
? "bg-green-dark/10"
|
|
52
|
+
: flag === false
|
|
53
|
+
? "bg-crimson-burgundy/10 text-crimson-burgundy"
|
|
54
|
+
: "bg-gray-light",
|
|
55
|
+
styles: "bg-gray-light rounded-md outline-none",
|
|
56
|
+
animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
|
|
57
|
+
};
|
|
58
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children: placeholder }), _jsx("input", { ref: ref, className: cn(inputBox), value: value, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => setValue(e.target.value), type: type ?? "text" }), label && (_jsx(Label.Button, { title: label.title, onClick: label.onClick, options: {
|
|
59
|
+
width: "sm",
|
|
60
|
+
height: "xs",
|
|
61
|
+
className: "absolute top-3.5 right-3.75",
|
|
62
|
+
background: label.options?.background ?? gradient.bg.greenToRed,
|
|
63
|
+
text: label.options?.text ?? "text-white",
|
|
64
|
+
...label.options,
|
|
65
|
+
} }))] }));
|
|
66
|
+
}
|
|
67
|
+
Input.LG = LG;
|
|
68
|
+
export default Input;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLInput } from "../../interface";
|
|
2
2
|
import "react-datepicker/dist/react-datepicker.css";
|
|
3
|
-
export default function DatePicker({ options }:
|
|
3
|
+
export default function DatePicker({ options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function EmailInput({ state, placeholder, options
|
|
1
|
+
import { HTMLInput } from "../../interface";
|
|
2
|
+
export default function EmailInput({ state, placeholder, options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ const widthSize = {
|
|
|
10
10
|
"2xl": "w-144",
|
|
11
11
|
full: "w-full",
|
|
12
12
|
};
|
|
13
|
-
export default function EmailInput({ state, placeholder, options
|
|
13
|
+
export default function EmailInput({ state, placeholder, options }) {
|
|
14
14
|
const { width } = options ?? {};
|
|
15
15
|
const id = useId();
|
|
16
16
|
const [value, setValue] = state;
|
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
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { DataField, DataSet, Size, Titles } from "./Property";
|
|
2
2
|
import { EventsProps } from "./Widget";
|
|
3
|
-
import {
|
|
3
|
+
import { HTMLInput, HTMLLabelElement, HTMLSelectElement } from "./HTMLElement";
|
|
4
4
|
interface OptionsProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
width?: Size;
|
|
7
7
|
height?: Size;
|
|
8
8
|
color?: string;
|
|
9
|
+
background?: string;
|
|
10
|
+
border?: string;
|
|
9
11
|
isRounded?: boolean;
|
|
10
12
|
noPadding?: boolean;
|
|
11
13
|
noMobile?: boolean;
|
|
@@ -24,7 +26,7 @@ export interface BoardHeaderProps<B> {
|
|
|
24
26
|
};
|
|
25
27
|
tag?: {
|
|
26
28
|
selects?: HTMLSelectElement<B>[];
|
|
27
|
-
inputs?:
|
|
29
|
+
inputs?: HTMLInput[];
|
|
28
30
|
};
|
|
29
31
|
options?: {
|
|
30
32
|
titleBorder?: string;
|
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,18 @@ export interface HTMLSelectElement<T> extends HTMLElement {
|
|
|
28
29
|
selectOptions?: SelectOption<T>[];
|
|
29
30
|
placeholder?: string;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
type HTMLInputType = "text" | "password" | "date" | "email" | "phone" | "number";
|
|
33
|
+
export interface HTMLInput 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?: HTMLInputType;
|
|
39
|
+
label?: HTMLLabelElement;
|
|
35
40
|
}
|
|
36
41
|
export interface HTMLToggleElement extends HTMLElement {
|
|
37
42
|
state: State<boolean>;
|
|
38
|
-
labels
|
|
43
|
+
labels?: [[true, string], [false, string]];
|
|
39
44
|
}
|
|
40
45
|
export type ColorType = "red" | "blue" | "green";
|
|
41
46
|
export interface HTMLCheckBoxElement extends HTMLElement {
|
|
@@ -52,3 +57,4 @@ export interface HTMLElementFrame {
|
|
|
52
57
|
disabled?: Disabled;
|
|
53
58
|
onClick?: OnClick;
|
|
54
59
|
}
|
|
60
|
+
export {};
|
package/interface/Layout.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { OnClick } from "./Property";
|
|
1
|
+
import { OnClick, State } from "./Property";
|
|
2
|
+
import { ShowAction } from "./Widget";
|
|
2
3
|
interface Notification {
|
|
3
4
|
id: number;
|
|
4
5
|
userId: number;
|
|
@@ -8,15 +9,29 @@ interface Notification {
|
|
|
8
9
|
createdAt: Date;
|
|
9
10
|
updatedAt: Date;
|
|
10
11
|
}
|
|
12
|
+
interface NotificationProps {
|
|
13
|
+
notifications?: Partial<Notification>[];
|
|
14
|
+
flag: boolean;
|
|
15
|
+
onClick: OnClick;
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MenuProps {
|
|
19
|
+
action?: ShowAction;
|
|
20
|
+
profile?: {
|
|
21
|
+
name: string;
|
|
22
|
+
belong: string;
|
|
23
|
+
image: string;
|
|
24
|
+
};
|
|
25
|
+
input?: {
|
|
26
|
+
password: State<string | undefined>;
|
|
27
|
+
};
|
|
28
|
+
onClick: OnClick;
|
|
29
|
+
}
|
|
11
30
|
export interface DashboardHeaderProps {
|
|
12
31
|
title: string;
|
|
13
32
|
logo?: React.ReactNode;
|
|
14
|
-
notification:
|
|
15
|
-
|
|
16
|
-
flag: boolean;
|
|
17
|
-
onClick: OnClick;
|
|
18
|
-
color?: string;
|
|
19
|
-
};
|
|
33
|
+
notification: NotificationProps;
|
|
34
|
+
menu?: MenuProps;
|
|
20
35
|
options?: {
|
|
21
36
|
background?: string;
|
|
22
37
|
text?: string;
|
|
@@ -31,8 +46,15 @@ export interface DashboardProps {
|
|
|
31
46
|
background?: string;
|
|
32
47
|
};
|
|
33
48
|
}
|
|
49
|
+
export interface MyPageProps extends DashboardProps {
|
|
50
|
+
profile: {
|
|
51
|
+
image: string;
|
|
52
|
+
username: string;
|
|
53
|
+
email: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
34
56
|
export interface DashboardNotification {
|
|
35
|
-
|
|
57
|
+
action?: ShowAction;
|
|
36
58
|
notifications?: Partial<Notification>[];
|
|
37
59
|
}
|
|
38
60
|
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,11 +37,13 @@ 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
|
+
}
|
|
42
|
+
export type FileRead = string | ArrayBuffer | null;
|
|
40
43
|
export type Disabled = boolean | OnClick;
|
|
41
44
|
export type Scripts = {
|
|
42
45
|
script: string;
|
|
43
|
-
|
|
46
|
+
subscript?: string | string[];
|
|
44
47
|
};
|
|
45
48
|
export type Titles = {
|
|
46
49
|
title: 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 };
|