@edu-tosel/design 1.0.94 → 1.0.96
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/card/design/SubmitCard.design.d.ts +7 -0
- package/card/design/SubmitCard.design.js +12 -0
- package/card/index.d.ts +1 -0
- package/card/index.js +1 -0
- package/card/template/ProgressCard/Small.d.ts +1 -1
- package/card/template/ProgressCard/Small.js +15 -6
- package/card/template/SubmitCard/index.d.ts +2 -0
- package/card/template/SubmitCard/index.js +5 -0
- package/interface/Card.d.ts +3 -0
- package/interface/Layout.d.ts +5 -3
- package/interface/Property.d.ts +1 -0
- package/interface/TextBox.d.ts +20 -0
- package/interface/TextBox.js +1 -0
- package/interface/index.d.ts +1 -0
- package/interface/index.js +1 -0
- package/layout/design/TextBox.design.d.ts +2 -0
- package/layout/design/TextBox.design.js +34 -0
- package/layout/index.d.ts +1 -0
- package/layout/index.js +1 -0
- package/layout/template/TextBox.d.ts +7 -0
- package/layout/template/TextBox.js +10 -0
- package/layout/template/dashboard/Header.js +5 -5
- package/layout/template/dashboard/Layout.js +1 -2
- package/layout/template/dashboard/Menu.d.ts +1 -1
- package/layout/template/dashboard/Menu.js +7 -3
- package/package.json +1 -1
- package/version.txt +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { LabelWidget } from "../../interface";
|
|
3
|
+
export interface SubmitCardProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
button?: LabelWidget;
|
|
6
|
+
}
|
|
7
|
+
export default function SubmitCardDesign({ children, button, }: SubmitCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import CardDesign from "./Card.design";
|
|
3
|
+
import { Label } from "../../widget";
|
|
4
|
+
export default function SubmitCardDesign({ children, button, }) {
|
|
5
|
+
return (_jsxs(CardDesign, { option: {
|
|
6
|
+
width: "lg",
|
|
7
|
+
height: "lg",
|
|
8
|
+
className: "p-5",
|
|
9
|
+
}, children: [children, button && (_jsx(Label.Button, { ...button, option: {
|
|
10
|
+
className: "absolute bottom-5 right-5",
|
|
11
|
+
} }))] }));
|
|
12
|
+
}
|
package/card/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { default as NavCard } from "./template/NavCard";
|
|
|
7
7
|
export { default as ProgressCard } from "./template/ProgressCard";
|
|
8
8
|
export { default as RollCard } from "./template/RollCard";
|
|
9
9
|
export { default as TableCard } from "./template/TableCard";
|
|
10
|
+
export { default as SubmitCard } from "./template/SubmitCard";
|
package/card/index.js
CHANGED
|
@@ -7,3 +7,4 @@ export { default as NavCard } from "./template/NavCard";
|
|
|
7
7
|
export { default as ProgressCard } from "./template/ProgressCard";
|
|
8
8
|
export { default as RollCard } from "./template/RollCard";
|
|
9
9
|
export { default as TableCard } from "./template/TableCard";
|
|
10
|
+
export { default as SubmitCard } from "./template/SubmitCard";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProgressCardProps } from "../../../interface";
|
|
2
|
-
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme, }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme, option, }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,8 @@ const text = {
|
|
|
10
10
|
green: "text-green-dark",
|
|
11
11
|
blue: "text-blue-navy",
|
|
12
12
|
};
|
|
13
|
-
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme = "green", }) {
|
|
13
|
+
export default function ProgressCardSmall({ titles, displays, checks, nowFocus, theme = "green", option, }) {
|
|
14
|
+
const { size = "md" } = option ?? {};
|
|
14
15
|
const progressBox = {
|
|
15
16
|
positions: "absolute top-2.5 left-2.5",
|
|
16
17
|
displays: "flex",
|
|
@@ -25,13 +26,21 @@ export default function ProgressCardSmall({ titles, displays, checks, nowFocus,
|
|
|
25
26
|
});
|
|
26
27
|
const titleBox = {
|
|
27
28
|
positions: "absolute top-2.5 right-2.5",
|
|
28
|
-
sizes: "max-w-
|
|
29
|
-
displays: "flex flex-col items-end
|
|
29
|
+
sizes: "max-w-40 w-full h-16",
|
|
30
|
+
displays: "flex flex-col items-end",
|
|
30
31
|
backgrounds: nowFocus === true ? bgLight[theme ?? "green"] : "bg-transparent",
|
|
31
|
-
boundaries: "rounded-[10px]
|
|
32
|
+
boundaries: "rounded-[10px]",
|
|
33
|
+
styles: titles.size === "md"
|
|
34
|
+
? "pt-2 pr-3.5 gap-y-3"
|
|
35
|
+
: "justify-center gap-y-1.5 pr-2",
|
|
36
|
+
};
|
|
37
|
+
const titleStyle = {
|
|
38
|
+
texts: "leading-none",
|
|
39
|
+
sizes: titles.size === "sm" ? "text-[12px]" : "text-[20px] font-pretendard-bold",
|
|
40
|
+
styles: text[theme],
|
|
32
41
|
};
|
|
33
42
|
return (_jsxs(CardDesign, { option: {
|
|
34
|
-
width: "md",
|
|
43
|
+
width: size ?? "md",
|
|
35
44
|
height: "5xs",
|
|
36
|
-
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title, subtitle }, index) => (_jsxs("div", { className: cn(stepBox(index === nowFocus)), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "leading-none text-[12px] font-pretendard-bold", children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: "green" })] }), _jsx("div", { className: `text-[12px] ${text[theme]}`, children: subtitle })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className:
|
|
45
|
+
}, children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title, subtitle }, index) => (_jsxs("div", { className: cn(stepBox(index === nowFocus)), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "leading-none text-[12px] font-pretendard-bold", children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: "green" })] }), _jsx("div", { className: `text-[12px] ${text[theme]}`, children: subtitle })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: cn(titleStyle), children: titles.title }), _jsx("div", { className: `text-[12px] leading-none ${text[theme]}`, children: titles.subtitle })] })] }));
|
|
37
46
|
}
|
package/interface/Card.d.ts
CHANGED
package/interface/Layout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { OnClick, State } from "./Property";
|
|
2
|
+
import { Button, OnClick, State } from "./Property";
|
|
3
3
|
import { ShowAction } from "./Action";
|
|
4
4
|
interface Notification {
|
|
5
5
|
id: number;
|
|
@@ -14,7 +14,6 @@ interface NotificationProps {
|
|
|
14
14
|
notifications?: Partial<Notification>[];
|
|
15
15
|
flag: boolean;
|
|
16
16
|
onClick: OnClick;
|
|
17
|
-
color?: string;
|
|
18
17
|
}
|
|
19
18
|
export interface MenuProps {
|
|
20
19
|
showAction?: ShowAction;
|
|
@@ -26,7 +25,8 @@ export interface MenuProps {
|
|
|
26
25
|
input?: {
|
|
27
26
|
password: State<string | undefined>;
|
|
28
27
|
};
|
|
29
|
-
|
|
28
|
+
medium?: Button[];
|
|
29
|
+
bottom: Button[];
|
|
30
30
|
}
|
|
31
31
|
export interface DashboardHeaderProps {
|
|
32
32
|
title: string;
|
|
@@ -34,9 +34,11 @@ export interface DashboardHeaderProps {
|
|
|
34
34
|
notification: NotificationProps;
|
|
35
35
|
menu?: MenuProps;
|
|
36
36
|
option?: {
|
|
37
|
+
onClick?: OnClick;
|
|
37
38
|
background?: string;
|
|
38
39
|
text?: string;
|
|
39
40
|
className?: string;
|
|
41
|
+
iconColor?: string;
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
export interface DashboardProps {
|
package/interface/Property.d.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Size, Titles } from "./Property";
|
|
2
|
+
export interface TextBoxDesignProps {
|
|
3
|
+
titles: Titles;
|
|
4
|
+
option?: {
|
|
5
|
+
isCenter?: boolean;
|
|
6
|
+
size?: Size;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface TextBoxProps extends Omit<TextBoxDesignProps, "children"> {
|
|
12
|
+
}
|
|
13
|
+
export interface TextBoxWithImageProps extends TextBoxProps {
|
|
14
|
+
image: {
|
|
15
|
+
src: string;
|
|
16
|
+
width?: string;
|
|
17
|
+
height?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/interface/index.d.ts
CHANGED
package/interface/index.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LineBreaks } from "../../text";
|
|
3
|
+
import { cn } from "../../util";
|
|
4
|
+
const titleSize = {
|
|
5
|
+
md: "text-[16px]",
|
|
6
|
+
lg: "text-[20px]",
|
|
7
|
+
};
|
|
8
|
+
const subtitleSize = {
|
|
9
|
+
md: "text-[12px]",
|
|
10
|
+
lg: "text-[16px]",
|
|
11
|
+
};
|
|
12
|
+
export default function TextBoxDesign({ titles, children, option, }) {
|
|
13
|
+
const { title, subtitle, titleColor, color, subtitleColor } = titles;
|
|
14
|
+
const { size, isCenter, className } = option ?? {};
|
|
15
|
+
console.log(isCenter);
|
|
16
|
+
const container = {
|
|
17
|
+
displays: "flex flex-col",
|
|
18
|
+
center: isCenter && "items-center",
|
|
19
|
+
styles: color,
|
|
20
|
+
className: className ?? "gap-y-2",
|
|
21
|
+
};
|
|
22
|
+
const titleBox = {
|
|
23
|
+
colors: titleColor ?? color ?? "text-gray-dark",
|
|
24
|
+
sizes: titleSize[size ?? "md"],
|
|
25
|
+
fonts: "font-pretendard-bold",
|
|
26
|
+
styles: "leading-tight",
|
|
27
|
+
};
|
|
28
|
+
const subtitleBox = {
|
|
29
|
+
colors: subtitleColor ?? color ?? "text-gray-medium",
|
|
30
|
+
sizes: subtitleSize[size ?? "md"],
|
|
31
|
+
center: isCenter && "text-center",
|
|
32
|
+
};
|
|
33
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(titleBox), children: title }), children, _jsx(LineBreaks, { texts: subtitle, className: cn(subtitleBox) })] }));
|
|
34
|
+
}
|
package/layout/index.d.ts
CHANGED
package/layout/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextBoxProps, TextBoxWithImageProps } from "../../interface";
|
|
2
|
+
declare function TitleBox(props: TextBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace TitleBox {
|
|
4
|
+
var Image: typeof TitleBoxWithImage;
|
|
5
|
+
}
|
|
6
|
+
declare function TitleBoxWithImage({ titles, image, option }: TextBoxWithImageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default TitleBox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import TextBoxDesign from "../design/TextBox.design";
|
|
3
|
+
function TitleBox(props) {
|
|
4
|
+
return _jsx(TextBoxDesign, { ...props });
|
|
5
|
+
}
|
|
6
|
+
function TitleBoxWithImage({ titles, image, option }) {
|
|
7
|
+
return (_jsx(TextBoxDesign, { titles: titles, option: { isCenter: true, size: "lg", className: "gap-y-8", ...option }, children: _jsx("img", { src: image.src, width: image.width, height: image.height, className: image.className }) }));
|
|
8
|
+
}
|
|
9
|
+
TitleBox.Image = TitleBoxWithImage;
|
|
10
|
+
export default TitleBox;
|
|
@@ -8,8 +8,8 @@ import SVG from "../../../asset/SVG";
|
|
|
8
8
|
import { Label } from "../../../widget";
|
|
9
9
|
export function Header({ title, logo, notification, menu, option, }) {
|
|
10
10
|
const { setView, setIsOwn } = useActionStore();
|
|
11
|
-
const { notifications, flag, onClick
|
|
12
|
-
const { text, background, className } = option ?? {};
|
|
11
|
+
const { notifications, flag, onClick } = notification;
|
|
12
|
+
const { text, background, className, iconColor } = option ?? {};
|
|
13
13
|
const container = {
|
|
14
14
|
positions: "fixed xl:static top-0 left-0 z-40",
|
|
15
15
|
displays: "flex items-center justify-between ",
|
|
@@ -26,13 +26,13 @@ export function Header({ title, logo, notification, menu, option, }) {
|
|
|
26
26
|
setIsOwn(true);
|
|
27
27
|
onClick && onClick();
|
|
28
28
|
return setView("notification");
|
|
29
|
-
}, color:
|
|
29
|
+
}, color: iconColor }), menu?.profile ? (_jsx(SVG.Profile, { onClick: () => {
|
|
30
30
|
setIsOwn(true);
|
|
31
31
|
return setView("menu");
|
|
32
|
-
}, color:
|
|
32
|
+
}, color: iconColor })) : (_jsx(Label.Button, { title: "\uB300\uC2DC\uBCF4\uB4DC", onClick: () => option?.onClick && option.onClick(), option: {
|
|
33
33
|
width: "sm",
|
|
34
34
|
height: "xs",
|
|
35
|
-
text: "text-white",
|
|
36
35
|
background: gradient.bg.greenToRed,
|
|
36
|
+
text: "text-white",
|
|
37
37
|
} }))] }) })] }));
|
|
38
38
|
}
|
|
@@ -9,9 +9,8 @@ export default function Layout({ header, navigations, children, option, }) {
|
|
|
9
9
|
const { title, option: headerOption, logo, notification, menu } = header;
|
|
10
10
|
const { background } = option ?? {};
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
if (isOwn)
|
|
12
|
+
if (isOwn)
|
|
13
13
|
return setIsOwn(false);
|
|
14
|
-
}
|
|
15
14
|
return clearView();
|
|
16
15
|
}, [flag]);
|
|
17
16
|
const container = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MenuProps } from "../../../interface";
|
|
2
|
-
export default function Menu({ showAction, profile, input,
|
|
2
|
+
export default function Menu({ showAction, profile, input, medium, bottom, }: MenuProps): JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { useTransition, animated } from "react-spring";
|
|
|
3
3
|
import { cn, gradient } from "../../../util";
|
|
4
4
|
import { useActionStore } from "../../../store";
|
|
5
5
|
import { Label } from "../../../widget";
|
|
6
|
-
export default function Menu({ showAction, profile, input,
|
|
6
|
+
export default function Menu({ showAction, profile, input, medium, bottom, }) {
|
|
7
7
|
const { isVisible } = showAction ?? {};
|
|
8
8
|
const { setIsOwn, removeModal } = useActionStore();
|
|
9
9
|
const container = {
|
|
@@ -18,10 +18,14 @@ export default function Menu({ showAction, profile, input, onClick, }) {
|
|
|
18
18
|
leave: { opacity: 0 },
|
|
19
19
|
config: { duration: 200 },
|
|
20
20
|
});
|
|
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" }),
|
|
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" }), medium?.map((button) => (_jsx(Label.Button, { title: button.title, onClick: button.onClick, option: {
|
|
22
|
+
...button.option,
|
|
23
|
+
width: "full",
|
|
24
|
+
height: "xs",
|
|
25
|
+
} }))), _jsxs("div", { className: "flex gap-2.5", children: [_jsx(Label.Button, { title: bottom[0].title, onClick: bottom[0].onClick, option: {
|
|
22
26
|
width: "sm",
|
|
23
27
|
height: "xs",
|
|
24
|
-
} }), _jsx(Label.Button, { title:
|
|
28
|
+
} }), _jsx(Label.Button, { title: bottom[1].title, onClick: bottom[1].onClick, option: {
|
|
25
29
|
background: gradient.bg.greenToRed,
|
|
26
30
|
text: "text-white",
|
|
27
31
|
width: "sm",
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.96
|