@edu-tosel/design 1.0.60 → 1.0.62
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/Operation.js +1 -1
- package/asset/svg/Operation.tsx +3 -3
- package/board/design/Board.design.d.ts +1 -1
- package/board/design/Board.design.js +5 -5
- package/board/design/Header.design.d.ts +1 -1
- package/board/design/Header.design.js +6 -6
- package/board/template/CanvasBoard.d.ts +1 -1
- package/board/template/CanvasBoard.js +3 -3
- package/board/template/ManageBoard.d.ts +1 -1
- package/board/template/ManageBoard.js +5 -5
- package/board/template/PaperBoard.d.ts +1 -1
- package/board/template/PaperBoard.js +3 -3
- package/card/design/Card.design.d.ts +1 -1
- package/card/design/Card.design.js +8 -6
- package/card/design/InfoCard.design.d.ts +1 -1
- package/card/design/InfoCard.design.js +3 -3
- package/card/design/NavCard.design.d.ts +1 -1
- package/card/design/NavCard.design.js +3 -3
- package/card/design/RollCard.design.js +2 -2
- package/card/design/TableCard.design.d.ts +1 -1
- package/card/design/TableCard.design.js +7 -7
- package/card/index.d.ts +1 -0
- package/card/index.js +1 -0
- package/card/template/AddCard.d.ts +1 -1
- package/card/template/AddCard.js +3 -3
- package/card/template/ChartCard.d.ts +1 -1
- package/card/template/ChartCard.js +3 -3
- package/card/template/ConfirmCard/index.d.ts +9 -0
- package/card/template/ConfirmCard/index.js +19 -0
- package/card/template/InfoCard/Academy.js +4 -4
- package/card/template/InfoCard/Exam.d.ts +1 -1
- package/card/template/InfoCard/Exam.js +4 -4
- package/card/template/InfoCard/ExamData.js +2 -2
- package/card/template/InfoCard/Finance.js +1 -1
- package/card/template/InfoCard/Grade.js +2 -2
- package/card/template/InfoCard/Item.js +1 -1
- package/card/template/InfoCard/PersonalInformation.js +2 -2
- package/card/template/InfoCard/Product.js +2 -2
- package/card/template/InfoCard/Student.js +2 -2
- package/card/template/NavCard.d.ts +3 -3
- package/card/template/NavCard.js +14 -14
- package/card/template/ProgressCard/Large.d.ts +2 -0
- package/card/template/{ProgressCard.js → ProgressCard/Large.js} +6 -6
- package/card/template/ProgressCard/Small.d.ts +2 -0
- package/card/template/ProgressCard/Small.js +34 -0
- package/card/template/ProgressCard/index.d.ts +7 -0
- package/card/template/ProgressCard/index.js +7 -0
- package/card/template/TableCard.js +4 -3
- package/globals.css +4 -3
- package/interface/Action.d.ts +11 -17
- package/interface/Board.d.ts +13 -14
- package/interface/Card.d.ts +13 -7
- package/interface/Color.d.ts +3 -0
- package/interface/Color.js +7 -0
- package/interface/Layout.d.ts +6 -5
- package/interface/Modal.d.ts +5 -4
- package/interface/Overlay.d.ts +3 -3
- package/interface/Property.d.ts +5 -4
- package/interface/Shelf.d.ts +4 -4
- package/interface/index.d.ts +2 -2
- package/interface/index.js +2 -2
- package/interface/widget/Carousel.d.ts +2 -2
- package/interface/widget/Switch.d.ts +2 -2
- package/interface/widget/index.d.ts +55 -0
- package/interface/widget/index.js +7 -0
- package/layout/design/DataField.design.d.ts +1 -1
- package/layout/design/DataField.design.js +7 -3
- package/layout/design/Row.design.d.ts +1 -1
- package/layout/design/Row.design.js +10 -9
- package/layout/design/Shelf.design.d.ts +1 -1
- package/layout/design/Shelf.design.js +2 -2
- package/layout/index.d.ts +1 -1
- package/layout/index.js +1 -1
- package/layout/template/Action.d.ts +10 -1
- package/layout/template/DataField.js +5 -2
- package/layout/template/Gallery.d.ts +4 -4
- package/layout/template/Gallery.js +3 -3
- package/layout/template/Promotion.d.ts +1 -1
- package/layout/template/Promotion.js +1 -1
- package/layout/template/Row.d.ts +3 -3
- package/layout/template/Row.js +8 -8
- package/layout/template/Shelf.d.ts +1 -1
- package/layout/template/Shelf.js +6 -6
- package/layout/template/Sign.d.ts +5 -5
- package/layout/template/Sign.js +5 -5
- package/layout/template/Tab.d.ts +2 -2
- package/layout/template/Tab.js +4 -4
- package/layout/{widget → template}/dashboard/Header.d.ts +1 -1
- package/layout/{widget → template}/dashboard/Header.js +3 -3
- package/layout/{widget → template}/dashboard/Layout.d.ts +1 -1
- package/layout/{widget → template}/dashboard/Layout.js +5 -5
- package/layout/{widget → template}/dashboard/Menu.js +2 -2
- package/layout/template/dashboard/Navigation.d.ts +7 -0
- package/layout/{widget → template}/dashboard/Navigation.js +5 -1
- package/layout/{widget → template}/dashboard/Notification.js +1 -1
- package/layout/template/dashboard/index.d.ts +28 -0
- package/layout/template/dashboard/index.js +18 -0
- package/layout/{widget → template}/dashboard/mypage/Layout.d.ts +1 -1
- package/layout/{widget → template}/dashboard/mypage/Layout.js +5 -5
- package/layout/{widget → template}/dashboard/mypage/Navigate.js +2 -2
- package/layout/{widget → template}/dashboard/mypage/Profile.js +4 -4
- package/layout/template/dashboard/style.d.ts +10 -0
- package/layout/template/dashboard/style.js +16 -0
- package/layout/template/home/Notice.d.ts +2 -2
- package/layout/template/home/Notice.js +2 -2
- package/layout/template/home/Promotion.d.ts +3 -3
- package/layout/template/home/Promotion.js +4 -4
- package/layout/template/home/Service.d.ts +1 -1
- package/layout/template/home/Service.js +2 -2
- package/layout/template/home/layout/Carousel.js +2 -2
- package/layout/{widget → template}/sign/WithTitle.d.ts +2 -2
- package/layout/{widget → template}/sign/WithTitle.js +1 -1
- package/modal/design/ConfirmModal.design.d.ts +1 -1
- package/modal/design/ConfirmModal.design.js +3 -3
- package/modal/design/Modal.design.d.ts +1 -1
- package/modal/design/Modal.design.js +3 -6
- package/modal/template/Alert.d.ts +1 -1
- package/modal/template/Alert.js +3 -3
- package/modal/template/Confirm/Alert.js +1 -1
- package/modal/template/Confirm/Confirm.js +1 -1
- package/modal/template/Confirm/Input.d.ts +2 -2
- package/modal/template/Confirm/Input.js +1 -1
- package/modal/template/Confirm/Tag.d.ts +1 -1
- package/modal/template/Confirm/Tag.js +2 -2
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +3 -3
- package/modal/template/Postcode.js +1 -1
- package/overlay/design/Overlay.design.js +1 -1
- package/overlay/template/Manage.js +5 -5
- package/package.json +1 -1
- package/tailwind.config.ts +1 -0
- package/version.txt +1 -1
- package/widget/design/Label.design.d.ts +2 -2
- package/widget/design/Label.design.js +3 -3
- package/widget/index.d.ts +3 -2
- package/widget/index.js +3 -2
- package/widget/template/CheckBox.d.ts +2 -0
- package/widget/{CheckBox.js → template/CheckBox.js} +2 -2
- package/widget/template/DatePicker.d.ts +3 -0
- package/widget/{DatePicker.js → template/DatePicker.js} +2 -2
- package/widget/template/EmailInput.d.ts +2 -0
- package/widget/{EmailInput.js → template/EmailInput.js} +4 -4
- package/widget/template/Input/Form.d.ts +2 -0
- package/widget/template/Input/Form.js +44 -0
- package/widget/template/Input/index.d.ts +6 -0
- package/widget/template/Input/index.js +34 -0
- package/widget/template/Label.d.ts +3 -3
- package/widget/template/Label.js +7 -7
- package/widget/{Obstacle.d.ts → template/Obstacle.d.ts} +1 -1
- package/widget/{Obstacle.js → template/Obstacle.js} +1 -1
- package/widget/template/Select/Select.LG.d.ts +2 -2
- package/widget/template/Select/Select.LG.js +3 -3
- package/widget/template/Select/Select.d.ts +2 -2
- package/widget/template/Select/Select.js +3 -3
- package/widget/template/Switch/Handle.d.ts +1 -1
- package/widget/template/Switch/Handle.js +2 -2
- package/widget/template/Switch/Switch.d.ts +2 -2
- package/widget/template/Switch/Switch.js +2 -2
- package/widget/template/Toggle.d.ts +6 -0
- package/widget/{Toggle.js → template/Toggle.js} +3 -3
- package/card/template/ProgressCard.d.ts +0 -10
- package/interface/HTMLElement.d.ts +0 -56
- package/interface/HTMLElement.js +0 -7
- package/layout/template/Dashboard.d.ts +0 -22
- package/layout/template/Dashboard.js +0 -13
- package/layout/widget/dashboard/Navigation.d.ts +0 -3
- package/widget/CheckBox.d.ts +0 -2
- package/widget/DatePicker.d.ts +0 -3
- package/widget/EmailInput.d.ts +0 -2
- package/widget/Toggle.d.ts +0 -6
- package/widget/design/Tag.design.d.ts +0 -0
- package/widget/design/Tag.design.js +0 -1
- package/widget/template/Input.d.ts +0 -6
- package/widget/template/Input.js +0 -68
- /package/layout/{widget → template}/dashboard/Menu.d.ts +0 -0
- /package/layout/{widget → template}/dashboard/Notification.d.ts +0 -0
- /package/layout/{widget → template}/dashboard/buttonClassNames.d.ts +0 -0
- /package/layout/{widget → template}/dashboard/buttonClassNames.js +0 -0
- /package/layout/{widget → template}/dashboard/mypage/Navigate.d.ts +0 -0
- /package/layout/{widget → template}/dashboard/mypage/Profile.d.ts +0 -0
- /package/layout/{widget → template}/promotion/Layout.d.ts +0 -0
- /package/layout/{widget → template}/promotion/Layout.js +0 -0
- /package/layout/{widget → template}/promotion/Thumbnail.d.ts +0 -0
- /package/layout/{widget → template}/promotion/Thumbnail.js +0 -0
- /package/layout/{widget → template}/sign/Box.d.ts +0 -0
- /package/layout/{widget → template}/sign/Box.js +0 -0
- /package/layout/{widget → template}/sign/Button.d.ts +0 -0
- /package/layout/{widget → template}/sign/Button.js +0 -0
- /package/layout/{widget → template}/sign/Check.d.ts +0 -0
- /package/layout/{widget → template}/sign/Check.js +0 -0
- /package/layout/{widget → template}/sign/Layout.d.ts +0 -0
- /package/layout/{widget → template}/sign/Layout.js +0 -0
|
@@ -19,12 +19,12 @@ function Profile({ name, birthday, image, modify }) {
|
|
|
19
19
|
leave: { opacity: 0 },
|
|
20
20
|
config: { duration: 250 },
|
|
21
21
|
});
|
|
22
|
-
return (_jsxs(Card, {
|
|
22
|
+
return (_jsxs(Card, { option: {
|
|
23
23
|
className: "flex gap-x-7.5 items-center pl-5",
|
|
24
24
|
width: "md",
|
|
25
25
|
height: "3xs",
|
|
26
26
|
boundary: "border-1 border-black",
|
|
27
|
-
}, children: [_jsxs("button", { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), onClick: modify.image, className: "w-20 h-20 overflow-hidden rounded-md relative", children: [_jsx("img", { src: image, alt: "profile-image", className: "bg-cover" }), transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(hoverBox), children: [_jsx(SVG.Image, {}), _jsx("div", { className: "text-white text-xs leading-none", children: "\uC0AC\uC9C4 \uBC14\uAFB8\uAE30" })] })))] }), _jsxs("div", { className: "flex flex-col h-20", children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold text-gray-dark", children: name }), _jsx("div", { className: "leading-none text-gray-medium mt-1.25", children: birthday }), _jsxs("div", { className: "flex gap-3 mt-auto", children: [_jsx(Label.Button, { title: "\uC2E4\uBA85 \uC218\uC815",
|
|
27
|
+
}, children: [_jsxs("button", { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), onClick: modify.image, className: "w-20 h-20 overflow-hidden rounded-md relative", children: [_jsx("img", { src: image, alt: "profile-image", className: "bg-cover" }), transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(hoverBox), children: [_jsx(SVG.Image, {}), _jsx("div", { className: "text-white text-xs leading-none", children: "\uC0AC\uC9C4 \uBC14\uAFB8\uAE30" })] })))] }), _jsxs("div", { className: "flex flex-col h-20", children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold text-gray-dark", children: name }), _jsx("div", { className: "leading-none text-gray-medium mt-1.25", children: birthday }), _jsxs("div", { className: "flex gap-3 mt-auto", children: [_jsx(Label.Button, { title: "\uC2E4\uBA85 \uC218\uC815", option: { width: "sm", height: "xs" }, onClick: modify.name }), _jsx(Label.Button, { title: "\uC0DD\uC77C \uC218\uC815", option: { width: "sm", height: "xs" }, onClick: modify.birthday })] })] })] }));
|
|
28
28
|
}
|
|
29
29
|
function Detail({ titles, infos, toggle, }) {
|
|
30
30
|
const infoBox = {
|
|
@@ -33,13 +33,13 @@ function Detail({ titles, infos, toggle, }) {
|
|
|
33
33
|
styles: "text-green-dark",
|
|
34
34
|
};
|
|
35
35
|
const id = useId();
|
|
36
|
-
return (_jsxs(Card, {
|
|
36
|
+
return (_jsxs(Card, { option: {
|
|
37
37
|
className: "pt-5 px-5",
|
|
38
38
|
width: "md",
|
|
39
39
|
height: "xs",
|
|
40
40
|
background: gradient.bg.greenToRedSoft,
|
|
41
41
|
boundary: "",
|
|
42
|
-
}, children: [_jsxs("div", { className: "h-13.25 flex flex-col text-gray-dark border-b-1 border-crimson-burgundy", children: [_jsx("div", { className: "text-xl font-pretendard-bold h-6 leading-none", children: titles.title }), _jsx("div", { className: "h-4.75 leading-none", children: titles.subtitle })] }), _jsx("div", { className: "mt-4.25 flex flex-col gap-2.5 ", children: infos?.map(({ title, content, button }, index) => (_jsxs("div", { className: cn(infoBox), children: [title === "phone" ? (_jsx(SVG.Phone, {})) : title === "email" ? (_jsx(SVG.Email, {})) : (_jsx("div", { className: "font-pretendard-bold mr-5 w-7", children: title })), _jsx("div", { className: "leading-none flex items-center w-60", children: content }), _jsx(Label.Button, { title: button.title, onClick: button.onClick,
|
|
42
|
+
}, children: [_jsxs("div", { className: "h-13.25 flex flex-col text-gray-dark border-b-1 border-crimson-burgundy", children: [_jsx("div", { className: "text-xl font-pretendard-bold h-6 leading-none", children: titles.title }), _jsx("div", { className: "h-4.75 leading-none", children: titles.subtitle })] }), _jsx("div", { className: "mt-4.25 flex flex-col gap-2.5 ", children: infos?.map(({ title, content, button }, index) => (_jsxs("div", { className: cn(infoBox), children: [title === "phone" ? (_jsx(SVG.Phone, {})) : title === "email" ? (_jsx(SVG.Email, {})) : (_jsx("div", { className: "font-pretendard-bold mr-5 w-7", children: title })), _jsx("div", { className: "leading-none flex items-center w-60", children: content }), _jsx(Label.Button, { title: button.title, onClick: button.onClick, option: {
|
|
43
43
|
className: "ml-auto",
|
|
44
44
|
background: gradient.bg.greenToRed,
|
|
45
45
|
text: "text-white",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { checkPathMatch, cn } from "../../../util";
|
|
2
|
+
const navigatorStyle = ({ href, nowPath, background = "bg-white", text = "text-white", }) => {
|
|
3
|
+
const style = {
|
|
4
|
+
displays: "flex flex-row items-center justify-center xl:justify-start gap-2.5",
|
|
5
|
+
sizes: " w-full xl:w-51 h-11 ",
|
|
6
|
+
styles: "xl:rounded-lg xl:pl-5 font-pretendard-bold",
|
|
7
|
+
texts: checkPathMatch(href, nowPath)
|
|
8
|
+
? [background, text].join(" ")
|
|
9
|
+
: [text, "opacity-50 hover:opacity-100"].join(" "),
|
|
10
|
+
};
|
|
11
|
+
return cn(style);
|
|
12
|
+
};
|
|
13
|
+
const style = {
|
|
14
|
+
nav: navigatorStyle,
|
|
15
|
+
};
|
|
16
|
+
export default style;
|
|
@@ -2,9 +2,9 @@ import { Titles } from "../../../interface";
|
|
|
2
2
|
interface NoticeOptions {
|
|
3
3
|
className: string;
|
|
4
4
|
}
|
|
5
|
-
export default function Notice({ banners,
|
|
5
|
+
export default function Notice({ banners, option, }: {
|
|
6
6
|
banners: BannerProps[];
|
|
7
|
-
|
|
7
|
+
option?: Partial<NoticeOptions>;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
type Tag = "REG" | "OLY";
|
|
10
10
|
interface BannerProps {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import SVG from "../../../asset/SVG";
|
|
3
3
|
import { cn } from "../../../util";
|
|
4
|
-
export default function Notice({ banners,
|
|
5
|
-
const { className } =
|
|
4
|
+
export default function Notice({ banners, option, }) {
|
|
5
|
+
const { className } = option ?? {};
|
|
6
6
|
const container = {
|
|
7
7
|
positions: "relative",
|
|
8
8
|
backgrounds: "bg-[#F7F7F7]",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
interface PromotionOptions {
|
|
2
2
|
className: string;
|
|
3
3
|
}
|
|
4
|
-
export default function Promotion({ banners,
|
|
4
|
+
export default function Promotion({ banners, option, }: {
|
|
5
5
|
banners: BannerProps[];
|
|
6
|
-
|
|
6
|
+
option?: Partial<PromotionOptions>;
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
interface BannerProps {
|
|
9
9
|
image: {
|
|
10
10
|
src: string;
|
|
11
11
|
location?: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
option?: {
|
|
14
14
|
background?: string;
|
|
15
15
|
boundary?: string;
|
|
16
16
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import SVG from "../../../asset/SVG";
|
|
3
3
|
import { cn, gradient } from "../../../util";
|
|
4
|
-
export default function Promotion({ banners,
|
|
5
|
-
const { className } =
|
|
4
|
+
export default function Promotion({ banners, option, }) {
|
|
5
|
+
const { className } = option ?? {};
|
|
6
6
|
const container = {
|
|
7
7
|
positions: "relative",
|
|
8
8
|
displays: "flex flex-col",
|
|
@@ -24,8 +24,8 @@ export default function Promotion({ banners, options, }) {
|
|
|
24
24
|
};
|
|
25
25
|
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: "font-pretendard-bold text-green-dark text-3xl", children: "\uD504\uB85C\uBAA8\uC158" }), _jsx("div", { className: cn(body), children: banners.map((banner) => (_jsx(Banner, { ...banner }, banner.image.src))) }), _jsxs("div", { className: cn(buttonBox), children: [_jsx(SVG.Symbol.LessThan, { onClick: () => { } }), _jsx(SVG.Symbol.GreaterThan, { onClick: () => { } })] })] }));
|
|
26
26
|
}
|
|
27
|
-
function Banner({ image,
|
|
28
|
-
const { background, boundary } =
|
|
27
|
+
function Banner({ image, option }) {
|
|
28
|
+
const { background, boundary } = option ?? {};
|
|
29
29
|
const container = {
|
|
30
30
|
positions: "relative",
|
|
31
31
|
sizes: "w-260 h-125",
|
|
@@ -22,8 +22,8 @@ export default function Service({ banners }) {
|
|
|
22
22
|
};
|
|
23
23
|
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: "font-pretendard-bold text-green-dark text-3xl", children: "\uD1A0\uC140\uC758 \uCC28\uBCC4\uD654\uB41C \uC11C\uBE44\uC2A4" }), _jsx("div", { className: cn(body), children: banners.map((banner) => (_jsx(Banner, { ...banner }, banner.titles.title))) }), _jsxs("div", { className: cn(buttonBox), children: [_jsx(SVG.Symbol.LessThan, { onClick: () => { } }), _jsx(SVG.Symbol.GreaterThan, { onClick: () => { } })] })] }));
|
|
24
24
|
}
|
|
25
|
-
function Banner({ titles, image,
|
|
26
|
-
const { background } =
|
|
25
|
+
function Banner({ titles, image, option }) {
|
|
26
|
+
const { background } = option ?? {};
|
|
27
27
|
const container = {
|
|
28
28
|
positions: "relative",
|
|
29
29
|
displays: "flex flex-col",
|
|
@@ -13,8 +13,8 @@ export default function Carousel({ contents, }) {
|
|
|
13
13
|
// setIndex((index + 1) % contents.length);
|
|
14
14
|
// }
|
|
15
15
|
// }, [flag]);
|
|
16
|
-
const { tag, titles, image,
|
|
17
|
-
const { text, background } =
|
|
16
|
+
const { tag, titles, image, option } = contents[index];
|
|
17
|
+
const { text, background } = option ?? {};
|
|
18
18
|
const container = {
|
|
19
19
|
displays: "flex justify-center items-center",
|
|
20
20
|
sizes: "w-full h-100",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface InputWithTitleProps extends
|
|
1
|
+
import { InputWidget } from "../../../interface";
|
|
2
|
+
interface InputWithTitleProps extends InputWidget {
|
|
3
3
|
title: string;
|
|
4
4
|
}
|
|
5
5
|
declare function WithTitle({ title, placeholder, state, flag, type, }: InputWithTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Input } from "../../../widget";
|
|
3
3
|
function WithTitle({ title, placeholder, state, flag, type, }) {
|
|
4
|
-
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input.
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input.Form, { placeholder: placeholder, state: state, flag: flag, type: type })] }));
|
|
5
5
|
}
|
|
6
6
|
export default WithTitle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ConfirmModalProps } from "../../interface/Modal";
|
|
2
|
-
export default function ConfirmModalDesign({ titles, showAction, buttons, children,
|
|
2
|
+
export default function ConfirmModalDesign({ titles, showAction, buttons, children, option, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Label } from "../../widget";
|
|
3
3
|
import { cn } from "../../util";
|
|
4
4
|
import ModalDesign from "../design/Modal.design";
|
|
5
|
-
export default function ConfirmModalDesign({ titles, showAction, buttons, children,
|
|
5
|
+
export default function ConfirmModalDesign({ titles, showAction, buttons, children, option, }) {
|
|
6
6
|
const container = {
|
|
7
7
|
displays: "flex flex-col",
|
|
8
8
|
};
|
|
@@ -10,8 +10,8 @@ export default function ConfirmModalDesign({ titles, showAction, buttons, childr
|
|
|
10
10
|
positions: "absolute bottom-5 left-5",
|
|
11
11
|
displays: "flex gap-2.5",
|
|
12
12
|
};
|
|
13
|
-
return (_jsx(ModalDesign, { titles: titles, showAction: showAction,
|
|
14
|
-
...
|
|
13
|
+
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, option: option, children: _jsxs("div", { className: cn(container), children: [children, _jsx("div", { className: cn(buttonBox), children: buttons.map(({ title, onClick, option }) => (_jsx(Label.Button, { title: title, onClick: onClick, option: {
|
|
14
|
+
...option,
|
|
15
15
|
width: "lg",
|
|
16
16
|
height: "sm",
|
|
17
17
|
} }, title))) })] }) }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ModalProps } from "../../interface/Modal";
|
|
2
|
-
export default function ModalDesign({ titles, showAction, children,
|
|
2
|
+
export default function ModalDesign({ titles, showAction, children, option, debug, }: ModalProps): import("react").ReactPortal | null;
|
|
@@ -25,9 +25,9 @@ const heightSize = {
|
|
|
25
25
|
"2xl": "max-w-176",
|
|
26
26
|
full: "h-full",
|
|
27
27
|
};
|
|
28
|
-
export default function ModalDesign({ titles, showAction, children,
|
|
28
|
+
export default function ModalDesign({ titles, showAction, children, option, debug, }) {
|
|
29
29
|
const { isVisible, event } = showAction ?? {};
|
|
30
|
-
const { position, width, height, noClose, noBackground, isShadow } =
|
|
30
|
+
const { position, width, height, noClose, noBackground, isShadow } = option ?? {};
|
|
31
31
|
const [detection, setDetection] = useState(null);
|
|
32
32
|
const { setIsOwn, removeModal } = useActionStore();
|
|
33
33
|
useEffect(() => {
|
|
@@ -57,8 +57,5 @@ export default function ModalDesign({ titles, showAction, children, options, deb
|
|
|
57
57
|
config: { duration: 200 },
|
|
58
58
|
});
|
|
59
59
|
return (detection &&
|
|
60
|
-
ReactDOM.createPortal(transitions((styles, item) => item && (_jsx(animated.div, { style: styles, className: cn(background), onClick: () => setIsOwn(true), children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold", children: titles.title }), _jsx("div", { className: "bg-gray-light w-13.75 h-2 mt-3" }), _jsx(
|
|
61
|
-
texts: titles.subtitle,
|
|
62
|
-
className: "text-base leading-none text-end font-pretendard-bold",
|
|
63
|
-
}) })] }), children, !noClose && event && (_jsx(SVG.Close, { onClick: () => removeModal(event), className: "absolute top-5 left-5" }))] }) }))), document.body));
|
|
60
|
+
ReactDOM.createPortal(transitions((styles, item) => item && (_jsx(animated.div, { style: styles, className: cn(background), onClick: () => setIsOwn(true), children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold", children: titles.title }), _jsx("div", { className: "bg-gray-light w-13.75 h-2 mt-3" }), _jsx(LineBreaks, { texts: titles.subtitle, className: "mt-5 text-base leading-none text-end font-pretendard-bold" })] }), children, !noClose && event && (_jsx(SVG.Close, { onClick: () => removeModal(event), className: "absolute top-5 left-5" }))] }) }))), document.body));
|
|
64
61
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AlertModalProps } from "../../interface/Modal";
|
|
2
|
-
export default function Alert({ titles, showAction, scripts,
|
|
2
|
+
export default function Alert({ titles, showAction, scripts, option, }: AlertModalProps): import("react/jsx-runtime").JSX.Element;
|
package/modal/template/Alert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ModalDesign from "../design/Modal.design";
|
|
3
|
-
export default function Alert({ titles, showAction, scripts,
|
|
3
|
+
export default function Alert({ titles, showAction, scripts, option, }) {
|
|
4
4
|
const { script } = scripts ?? {};
|
|
5
|
-
const { buttons } =
|
|
6
|
-
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, className: "pt-18 px-25",
|
|
5
|
+
const { buttons } = option ?? {};
|
|
6
|
+
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, className: "pt-18 px-25", option: { buttons }, children: _jsx("div", { className: "flex flex-col gap-3", children: _jsxs("div", { className: "flex flex-col gap-6", children: [_jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", { className: "text-xl font-pretendard-bold", children: script })] }) }) }));
|
|
7
7
|
}
|
|
@@ -8,7 +8,7 @@ export default function Alert(props) {
|
|
|
8
8
|
margins: "mt-2.5",
|
|
9
9
|
sizes: "w-full h-60",
|
|
10
10
|
};
|
|
11
|
-
return (_jsx(ConfirmModalDesign, { ...props, children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: "leading-none text-xl font-pretendard-bold", children: props.scripts.script }), _jsx(LineBreaks, { className: "text-center", texts: props.scripts.subscript }), _jsx("div", { className: "leading-none font-pretendard-bold text-crimson-burgundy", children: props.scripts.alert })] }),
|
|
11
|
+
return (_jsx(ConfirmModalDesign, { ...props, children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: "leading-none text-xl font-pretendard-bold", children: props.scripts.script }), _jsx(LineBreaks, { className: "text-center", texts: props.scripts.subscript }), _jsx("div", { className: "leading-none font-pretendard-bold text-crimson-burgundy", children: props.scripts.alert })] }), option: {
|
|
12
12
|
width: "md",
|
|
13
13
|
height: "lg",
|
|
14
14
|
} }));
|
|
@@ -7,7 +7,7 @@ export default function Confirm(props) {
|
|
|
7
7
|
margins: "mt-2.5",
|
|
8
8
|
sizes: "w-full h-60",
|
|
9
9
|
};
|
|
10
|
-
return (_jsx(ConfirmModalDesign, { ...props, children: _jsx("div", { className: cn(container), children: props.children }),
|
|
10
|
+
return (_jsx(ConfirmModalDesign, { ...props, children: _jsx("div", { className: cn(container), children: props.children }), option: {
|
|
11
11
|
width: "md",
|
|
12
12
|
height: "lg",
|
|
13
13
|
} }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfirmModalProps } from "../../../interface/Modal";
|
|
2
|
-
import {
|
|
2
|
+
import { InputWidget } from "../../../interface";
|
|
3
3
|
interface InputProps extends Omit<ConfirmModalProps, "children"> {
|
|
4
|
-
inputs: (
|
|
4
|
+
inputs: (InputWidget & {
|
|
5
5
|
title: string;
|
|
6
6
|
})[];
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@ import ConfirmModal from "../../design/ConfirmModal.design";
|
|
|
3
3
|
import { Input as _Input } from "../../../widget";
|
|
4
4
|
export default function Input(props) {
|
|
5
5
|
const { inputs } = props;
|
|
6
|
-
return (_jsx(ConfirmModal, { ...props, children: _jsx("div", { className: "flex flex-col gap-3", children: inputs.map((input, index) => (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "font-pretendard-bold", children: input.title }), _jsx(_Input.
|
|
6
|
+
return (_jsx(ConfirmModal, { ...props, children: _jsx("div", { className: "flex flex-col gap-3", children: inputs.map((input, index) => (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "font-pretendard-bold", children: input.title }), _jsx(_Input.Form, { ...input })] }, index))) }) }));
|
|
7
7
|
}
|
|
@@ -4,8 +4,8 @@ import { cn } from "../../../util";
|
|
|
4
4
|
import { selectOne, selectPlural } from "../../../util/select";
|
|
5
5
|
import { animated, useTransition } from "react-spring";
|
|
6
6
|
export default function Tag(props) {
|
|
7
|
-
const { state, tags,
|
|
8
|
-
const { selectHow } =
|
|
7
|
+
const { state, tags, option, process } = props.tag;
|
|
8
|
+
const { selectHow } = option || { selectHow: "plural" };
|
|
9
9
|
const button = (key) => ({
|
|
10
10
|
sizes: "h-10",
|
|
11
11
|
styles: "rounded-full",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { State } from "../../interface";
|
|
2
2
|
import { ModalProps } from "../../interface/Modal";
|
|
3
|
-
export default function Input<T>({ titles, showAction,
|
|
3
|
+
export default function Input<T>({ titles, showAction, option, state, }: Omit<ModalProps, "children"> & {
|
|
4
4
|
title?: string;
|
|
5
5
|
state: State<T>;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
package/modal/template/Input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ModalDesign from "../design/Modal.design";
|
|
3
|
-
export default function Input({ titles, showAction,
|
|
4
|
-
const { buttons } =
|
|
5
|
-
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, className: "pt-18 px-25",
|
|
3
|
+
export default function Input({ titles, showAction, option, state, }) {
|
|
4
|
+
const { buttons } = option ?? {};
|
|
5
|
+
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, className: "pt-18 px-25", option: { buttons }, children: _jsx("input", { className: "border-2 border-black w-80 h-8", value: state[0], onChange: (e) => state[1](e.target.value) }) }));
|
|
6
6
|
}
|
|
@@ -22,7 +22,7 @@ export default function PostcodeModal({ state, showAction, }) {
|
|
|
22
22
|
return (_jsx(ModalDesign, { titles: {
|
|
23
23
|
title: "주소를 검색하고 선택해주세요",
|
|
24
24
|
subtitle: "주소를 검색하고 선택해주세요",
|
|
25
|
-
}, showAction: showAction,
|
|
25
|
+
}, showAction: showAction, option: {
|
|
26
26
|
width: "lg",
|
|
27
27
|
height: "xl",
|
|
28
28
|
}, children: _jsx(Suspense, { fallback: _jsx(Loading.Spinner, {}), children: isClient && (_jsx(DaumPostcodeEmbed, { onComplete: handler, className: "mt-16" })) }) }));
|
|
@@ -9,7 +9,7 @@ export default function OverlayDesign({ titles, children, showAction, }) {
|
|
|
9
9
|
const container = {
|
|
10
10
|
positions: "absolute top-0 right-0 z-30",
|
|
11
11
|
sizes: "h-full",
|
|
12
|
-
styles: "box-shadow-
|
|
12
|
+
styles: "box-shadow-md bg-white",
|
|
13
13
|
};
|
|
14
14
|
const body = {
|
|
15
15
|
positions: "relative",
|
|
@@ -16,18 +16,18 @@ export default function Manage({ titles, showAction, elements, buttons, }) {
|
|
|
16
16
|
if (type === "select")
|
|
17
17
|
return (_jsx(Frame, { title: title, children: _jsx(Select, { state: state, selectOptions: selectOptions }) }, id + title));
|
|
18
18
|
if (type === "toggle")
|
|
19
|
-
return (_jsx(Frame, { title: title, children: _jsx(Toggle, { state: state, labels: labels,
|
|
19
|
+
return (_jsx(Frame, { title: title, children: _jsx(Toggle, { state: state, labels: labels, option: { disabled } }) }, id + title));
|
|
20
20
|
if (type === "input")
|
|
21
|
-
return (_jsx(Frame, { title: title, children: _jsx(Input, { state: state,
|
|
21
|
+
return (_jsx(Frame, { title: title, children: _jsx(Input, { state: state, option: {
|
|
22
22
|
width: "md",
|
|
23
23
|
disabled,
|
|
24
24
|
} }) }, id + title));
|
|
25
25
|
return null;
|
|
26
|
-
}) }), _jsx("div", { className: "absolute bottom-12 right-12 flex gap-4", children: buttons?.map(({ title, onClick,
|
|
26
|
+
}) }), _jsx("div", { className: "absolute bottom-12 right-12 flex gap-4", children: buttons?.map(({ title, onClick, option }) => (_jsx(Label.Button, { title: title, onClick: onClick, option: {
|
|
27
27
|
width: "sm",
|
|
28
28
|
height: "xs",
|
|
29
|
-
background:
|
|
30
|
-
text:
|
|
29
|
+
background: option?.background ?? "bg-crimson-dark",
|
|
30
|
+
text: option?.text ?? "text-white",
|
|
31
31
|
disabled: !onClick ? true : false,
|
|
32
32
|
} }, id + title))) })] }));
|
|
33
33
|
}
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.62
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function LabelDesign({ title, onClick,
|
|
1
|
+
import { LabelWidget } from "../../interface";
|
|
2
|
+
export default function LabelDesign({ title, onClick, option, hoverState, }: LabelWidget): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../util";
|
|
3
|
-
import Obstacle from "../Obstacle";
|
|
3
|
+
import Obstacle from "../template/Obstacle";
|
|
4
4
|
const widthSize = {
|
|
5
5
|
xs: "w-10",
|
|
6
6
|
sm: "w-22.5",
|
|
@@ -11,9 +11,9 @@ const heightSize = {
|
|
|
11
11
|
xs: "h-6.25",
|
|
12
12
|
sm: "h-11.25",
|
|
13
13
|
};
|
|
14
|
-
export default function LabelDesign({ title, onClick,
|
|
14
|
+
export default function LabelDesign({ title, onClick, option, hoverState, }) {
|
|
15
15
|
const [hover, setHover] = hoverState ?? [false, () => { }];
|
|
16
|
-
const { width, height, text, background, className, disabled } =
|
|
16
|
+
const { width, height, text, background, className, disabled } = option ?? {};
|
|
17
17
|
const container = {
|
|
18
18
|
positions: "relative z-10",
|
|
19
19
|
sizes: `${widthSize[width ?? "sm"]} ${heightSize[height ?? "xs"]}`,
|
package/widget/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
|
-
export { default as DatePicker } from "./DatePicker";
|
|
3
|
+
export { default as DatePicker } from "./template/DatePicker";
|
|
4
|
+
export { default as CheckBox } from "./template/CheckBox";
|
|
4
5
|
export { default as Label } from "./template/Label";
|
|
5
6
|
export { default as Switch } from "./template/Switch";
|
|
6
|
-
export { default as Toggle } from "./Toggle";
|
|
7
|
+
export { default as Toggle } from "./template/Toggle";
|
package/widget/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
|
-
export { default as DatePicker } from "./DatePicker";
|
|
3
|
+
export { default as DatePicker } from "./template/DatePicker";
|
|
4
|
+
export { default as CheckBox } from "./template/CheckBox";
|
|
4
5
|
export { default as Label } from "./template/Label";
|
|
5
6
|
export { default as Switch } from "./template/Switch";
|
|
6
|
-
export { default as Toggle } from "./Toggle";
|
|
7
|
+
export { default as Toggle } from "./template/Toggle";
|
|
@@ -8,12 +8,12 @@ const widthSize = {
|
|
|
8
8
|
"2xl": "w-144",
|
|
9
9
|
full: "w-full",
|
|
10
10
|
};
|
|
11
|
-
export default function Checkbox({ state: [checked, setChecked], labels,
|
|
11
|
+
export default function Checkbox({ state: [checked, setChecked], labels, option, color, }) {
|
|
12
12
|
const checkBoxColor = {
|
|
13
13
|
red: "checked:bg-[#910023]",
|
|
14
14
|
blue: "checked:bg-[#173A8B]",
|
|
15
15
|
green: "checked:bg-[#DFE6E5]",
|
|
16
16
|
};
|
|
17
|
-
const { disabled } =
|
|
17
|
+
const { disabled } = option ?? {};
|
|
18
18
|
return (_jsxs("div", { className: "w-auto h-6 flex items-center ", children: [_jsx("input", { type: "checkbox", className: `check-box mr-2 appearance-none w-6 h-6 border-2 border-[#E8EBF3] rounded-md ${checkBoxColor[color]} hover:box-shadow`, disabled: typeof disabled === "boolean" && disabled, checked: checked, onChange: (e) => setChecked(e.target.checked) }), _jsx("label", { htmlFor: "checkbox1", children: labels })] }));
|
|
19
19
|
}
|
|
@@ -13,8 +13,8 @@ const widthSize = {
|
|
|
13
13
|
"2xl": "w-144",
|
|
14
14
|
full: "w-full",
|
|
15
15
|
};
|
|
16
|
-
export default function DatePicker({
|
|
17
|
-
const { width } =
|
|
16
|
+
export default function DatePicker({ option }) {
|
|
17
|
+
const { width } = option ?? {};
|
|
18
18
|
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
19
19
|
const calRef = useRef(null);
|
|
20
20
|
return (_jsx("div", { children: _jsx(ReactDatePicker, { dateFormat: "yyyy\uB144 MM\uC6D4 dd\uC77C", icon: "fa fa-calendar", minDate: new Date("1900-01-01"), maxDate: new Date("2100-01-01"), selected: selectedDate, shouldCloseOnSelect: false, ref: calRef, onChange: (date) => setSelectedDate(date), locale: ko, className: "bg-slate-200 p-1 pl-2 pr-4 text-sm text-left rounded-md hover:bg-white focus:bg-white transition-all box-inner-shadow focus:outline-none w-68 h-8", children: _jsx("div", { className: "w-full h-auto flex justify-end items-end pr-4 pb-4", children: _jsx("button", { className: "p-2 bg-green-dark text-white rounded-md pr-4 pl-4 hover:opacity-85 hover:shadow-md transition-all", onClick: () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../util";
|
|
4
4
|
const widthSize = {
|
|
5
5
|
xs: "w-28",
|
|
6
6
|
sm: "w-48",
|
|
@@ -10,12 +10,12 @@ const widthSize = {
|
|
|
10
10
|
"2xl": "w-144",
|
|
11
11
|
full: "w-full",
|
|
12
12
|
};
|
|
13
|
-
export default function EmailInput({ state, placeholder,
|
|
14
|
-
const { width } =
|
|
13
|
+
export default function EmailInput({ state, placeholder, option, }) {
|
|
14
|
+
const { width } = option ?? {};
|
|
15
15
|
const id = useId();
|
|
16
16
|
const [value, setValue] = state;
|
|
17
17
|
const [focused, setFocused] = useState(false);
|
|
18
|
-
const { text } =
|
|
18
|
+
const { text } = option ?? {};
|
|
19
19
|
const isValidEmail = (email) => {
|
|
20
20
|
return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(email);
|
|
21
21
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { cn, gradient } from "../../../util";
|
|
4
|
+
import Label from "../Label";
|
|
5
|
+
export default function LG({ state, placeholder, flag, type, label, }) {
|
|
6
|
+
const [value, setValue] = state;
|
|
7
|
+
const [onFocus, setOnFocus] = useState(false);
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
const container = {
|
|
10
|
+
positions: "relative",
|
|
11
|
+
};
|
|
12
|
+
const placeholderBox = {
|
|
13
|
+
positions: "absolute left-5",
|
|
14
|
+
styles: "duration-300",
|
|
15
|
+
fonts: "leading-none text-gray-medium font-pretendard-medium",
|
|
16
|
+
animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
|
|
17
|
+
};
|
|
18
|
+
const styleByFlag = (flag) => {
|
|
19
|
+
if (typeof flag === "undefined")
|
|
20
|
+
return "bg-gray-light border-green-dark";
|
|
21
|
+
if (flag)
|
|
22
|
+
return "bg-green-dark/10 text-green-dark border-green-dark ";
|
|
23
|
+
return "bg-crimson-burgundy/10 text-crimson-burgundy border-crimson-burgundy";
|
|
24
|
+
};
|
|
25
|
+
const inputBox = {
|
|
26
|
+
styles: styleByFlag(flag),
|
|
27
|
+
sizes: "w-102.5 h-13.5",
|
|
28
|
+
paddings: `${placeholder && "pt-3"} pl-5`,
|
|
29
|
+
fonts: "text-sm",
|
|
30
|
+
boundaries: "rounded-md outline-none",
|
|
31
|
+
focuses: onFocus ? "border " : "border-0",
|
|
32
|
+
shadows: onFocus &&
|
|
33
|
+
!(flag === false) &&
|
|
34
|
+
"shadow-[0px_0px_10px_0px_rgba(16,86,82,0.38)]",
|
|
35
|
+
};
|
|
36
|
+
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, option: {
|
|
37
|
+
width: "sm",
|
|
38
|
+
height: "xs",
|
|
39
|
+
className: "absolute top-3.5 right-3.75",
|
|
40
|
+
background: label.option?.background ?? gradient.bg.greenToRed,
|
|
41
|
+
text: label.option?.text ?? "text-white",
|
|
42
|
+
...label.option,
|
|
43
|
+
} }))] }));
|
|
44
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputWidget } from "../../../interface";
|
|
2
|
+
declare function Input({ state, onKeyDown, placeholder, option }: InputWidget): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace Input {
|
|
4
|
+
var Form: typeof import("./Form").default;
|
|
5
|
+
}
|
|
6
|
+
export default Input;
|