@edu-tosel/design 1.0.95 → 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/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/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/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;
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.96
|