@edu-tosel/design 1.0.42 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/SVG.d.ts +7 -0
- package/asset/SVG.js +7 -0
- package/asset/SVG.tsx +9 -0
- package/asset/svg/Close.d.ts +5 -0
- package/asset/svg/Close.js +9 -0
- package/asset/svg/Close.tsx +32 -0
- package/asset/svg/TOSEL.d.ts +3 -0
- package/asset/svg/TOSEL.js +4 -0
- package/asset/svg/TOSEL.tsx +63 -0
- package/board/design/Board.design.js +5 -3
- package/board/template/CanvasBoard.d.ts +1 -1
- package/board/template/CanvasBoard.js +5 -4
- package/board/template/ManageBoard.js +1 -2
- package/board/template/PaperBoard.js +1 -1
- package/board/widget/Header.js +2 -5
- package/card/design/Card.design.js +6 -16
- package/card/design/InfoCard.design.d.ts +1 -1
- package/card/design/InfoCard.design.js +2 -2
- package/card/template/InfoCard/Academy.d.ts +20 -0
- package/card/template/InfoCard/Academy.js +31 -0
- package/card/template/InfoCard/Grade.d.ts +1 -2
- package/card/template/InfoCard/Grade.js +3 -3
- package/card/template/InfoCard/PersonalInformation.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 +58 -0
- package/html/widget/Toggle.js +8 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/interface/Board.d.ts +2 -0
- package/interface/Card.d.ts +3 -1
- package/interface/HTMLElement.d.ts +6 -1
- package/interface/Layout.d.ts +9 -1
- package/interface/Modal.d.ts +18 -14
- package/interface/Overlay.d.ts +2 -2
- package/interface/Property.d.ts +3 -1
- package/interface/Widget.d.ts +4 -0
- package/layout/design/Tab.design.js +2 -2
- package/layout/index.d.ts +2 -1
- package/layout/index.js +2 -1
- package/layout/template/Dashboard.d.ts +18 -1
- package/layout/template/Dashboard.js +9 -1
- package/layout/template/Events.js +4 -2
- package/layout/template/Promotion.d.ts +5 -0
- package/layout/template/Promotion.js +5 -0
- package/layout/template/Shelf.d.ts +1 -1
- package/layout/template/Shelf.js +3 -2
- package/layout/widget/dashboard/Header.js +1 -1
- package/layout/widget/dashboard/Layout.js +2 -2
- package/layout/widget/dashboard/Menu.d.ts +3 -2
- package/layout/widget/dashboard/Menu.js +2 -1
- package/{navigation → layout/widget/dashboard}/Navigation.d.ts +0 -1
- package/layout/widget/dashboard/Navigation.js +20 -0
- package/layout/widget/dashboard/Notification.d.ts +1 -1
- package/layout/widget/dashboard/Notification.js +2 -1
- package/layout/widget/dashboard/buttonClassNames.d.ts +2 -0
- package/{navigation/Navigation.js → layout/widget/dashboard/buttonClassNames.js} +5 -13
- package/layout/widget/dashboard/mypage/Layout.d.ts +2 -0
- package/layout/widget/dashboard/mypage/Layout.js +30 -0
- package/layout/widget/dashboard/mypage/Navigate.d.ts +12 -0
- package/layout/widget/dashboard/mypage/Navigate.js +29 -0
- package/layout/widget/dashboard/mypage/Profile.d.ts +28 -0
- package/layout/widget/dashboard/mypage/Profile.js +44 -0
- package/layout/widget/promotion/Layout.d.ts +3 -0
- package/layout/widget/promotion/Layout.js +5 -0
- package/layout/widget/promotion/Thumbnail.d.ts +1 -0
- package/layout/widget/promotion/Thumbnail.js +10 -0
- package/modal/design/ConfirmModal.design.d.ts +2 -0
- package/modal/design/ConfirmModal.design.js +18 -0
- package/modal/design/Modal.design.d.ts +1 -1
- package/modal/design/Modal.design.js +17 -24
- package/modal/index.d.ts +1 -0
- package/modal/index.js +1 -0
- package/modal/template/Alert.d.ts +1 -1
- package/modal/template/Alert.js +3 -3
- package/modal/template/ConfirmModal/Input.d.ts +10 -0
- package/modal/template/ConfirmModal/Input.js +7 -0
- package/modal/template/ConfirmModal/index.d.ts +5 -0
- package/modal/template/ConfirmModal/index.js +5 -0
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +3 -3
- package/overlay/template/Info.d.ts +1 -1
- package/overlay/template/Info.js +2 -2
- package/overlay/template/Manage.d.ts +1 -1
- package/overlay/template/Manage.js +2 -2
- package/overlay/widget/Overlay.design.d.ts +1 -1
- package/overlay/widget/Overlay.design.js +2 -1
- package/package.json +1 -1
- package/tailwind.config.ts +16 -0
- package/version.txt +1 -1
- package/html/widget/Input.d.ts +0 -2
- package/html/widget/Input.js +0 -31
- package/navigation/index.d.ts +0 -1
- package/navigation/index.js +0 -1
package/asset/SVG.d.ts
ADDED
package/asset/SVG.js
ADDED
package/asset/SVG.tsx
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
export default function Close({ onClick, className, }) {
|
|
4
|
+
const container = {
|
|
5
|
+
styles: onClick ? "cursor-pointer" : "",
|
|
6
|
+
className,
|
|
7
|
+
};
|
|
8
|
+
return (_jsxs("svg", { onClick: onClick, className: cn(container), xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [_jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#F0F0F0" }), _jsx("path", { d: "M19.7797 17.6997L23.8497 13.6397C24.4797 13.0997 24.5597 12.1597 24.0197 11.5297C23.4797 10.8997 22.5397 10.8197 21.9097 11.3597C21.8497 11.4097 21.7997 11.4597 21.7497 11.5197L17.6697 15.5797L13.5997 11.5097C13.0297 10.9097 12.0797 10.8697 11.4797 11.4397C10.8697 11.9997 10.8397 12.9497 11.3997 13.5597C11.4197 13.5897 11.4497 13.6097 11.4697 13.6297L15.5297 17.6997L11.4697 21.7597C10.8897 22.3497 10.8897 23.2897 11.4697 23.8797C12.0597 24.4697 13.0097 24.4697 13.5997 23.8797L17.6597 19.8197L21.7197 23.8897C21.9997 24.1797 22.3797 24.3397 22.7797 24.3297C23.6097 24.3297 24.2797 23.6597 24.2797 22.8297C24.2797 22.4297 24.1197 22.0497 23.8397 21.7697L19.7797 17.6997Z", fill: "#7F7F7F" })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnClick } from "../../interface";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
|
|
4
|
+
export default function Close({
|
|
5
|
+
onClick,
|
|
6
|
+
className,
|
|
7
|
+
}: {
|
|
8
|
+
onClick?: OnClick;
|
|
9
|
+
className?: string;
|
|
10
|
+
}) {
|
|
11
|
+
const container = {
|
|
12
|
+
styles: onClick ? "cursor-pointer" : "",
|
|
13
|
+
className,
|
|
14
|
+
};
|
|
15
|
+
return (
|
|
16
|
+
<svg
|
|
17
|
+
onClick={onClick}
|
|
18
|
+
className={cn(container)}
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
width="36"
|
|
21
|
+
height="36"
|
|
22
|
+
viewBox="0 0 36 36"
|
|
23
|
+
fill="none"
|
|
24
|
+
>
|
|
25
|
+
<circle cx="18" cy="18" r="18" fill="#F0F0F0" />
|
|
26
|
+
<path
|
|
27
|
+
d="M19.7797 17.6997L23.8497 13.6397C24.4797 13.0997 24.5597 12.1597 24.0197 11.5297C23.4797 10.8997 22.5397 10.8197 21.9097 11.3597C21.8497 11.4097 21.7997 11.4597 21.7497 11.5197L17.6697 15.5797L13.5997 11.5097C13.0297 10.9097 12.0797 10.8697 11.4797 11.4397C10.8697 11.9997 10.8397 12.9497 11.3997 13.5597C11.4197 13.5897 11.4497 13.6097 11.4697 13.6297L15.5297 17.6997L11.4697 21.7597C10.8897 22.3497 10.8897 23.2897 11.4697 23.8797C12.0597 24.4697 13.0097 24.4697 13.5997 23.8797L17.6597 19.8197L21.7197 23.8897C21.9997 24.1797 22.3797 24.3397 22.7797 24.3297C23.6097 24.3297 24.2797 23.6597 24.2797 22.8297C24.2797 22.4297 24.1197 22.0497 23.8397 21.7697L19.7797 17.6997Z"
|
|
28
|
+
fill="#7F7F7F"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export default function TOSEL({ className }) {
|
|
3
|
+
return (_jsxs("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "127", height: "28", viewBox: "0 0 127 28", fill: "none", children: [_jsxs("g", { clipPath: "url(#clip0_4049_13297)", children: [_jsx("path", { d: "M125.742 2.82682L125.211 2.07824H124.945V2.85802H124.613V0.842285H125.414C125.582 0.842285 125.746 0.908566 125.879 1.00604C126.011 1.1347 126.078 1.26727 126.078 1.42712C126.078 1.55578 126.043 1.68835 125.945 1.81701C125.879 1.91448 125.777 2.01195 125.644 2.04315L126.175 2.85412L125.742 2.82293V2.82682ZM125.574 1.65716C125.64 1.62596 125.676 1.52849 125.676 1.46221C125.676 1.36474 125.64 1.29846 125.574 1.26727C125.508 1.23607 125.406 1.20098 125.34 1.20098H124.941V1.75463H125.34C125.441 1.72344 125.508 1.68835 125.574 1.65716Z", fill: "black" }), _jsx("path", { d: "M125.242 0C124.207 0 123.41 0.810971 123.41 1.78959C123.41 2.76822 124.242 3.57919 125.242 3.57919C126.273 3.57919 127.073 2.76822 127.073 1.78959C127.109 0.81487 126.273 0 125.242 0ZM125.242 3.28287C124.41 3.28287 123.711 2.60057 123.711 1.78959C123.711 0.978624 124.41 0.292417 125.242 0.292417C126.074 0.292417 126.773 0.974725 126.773 1.78959C126.773 2.60446 126.074 3.28287 125.242 3.28287Z", fill: "black" }), _jsx("path", { d: "M99.561 11.1392H37.9883V16.2077H99.561V11.1392Z", fill: "url(#paint0_linear_4049_13297)" }), _jsx("path", { d: "M22.9794 5.86376H14.4266V26.9373H8.55285V5.86376H0V0.678223H22.9794V5.86766V5.86376Z", fill: "black" }), _jsx("path", { d: "M23.7871 13.7904C23.7871 5.83275 29.821 0 37.9872 0C46.1534 0 52.1872 5.83275 52.1872 13.7904C52.1872 21.7481 46.1534 27.5808 37.9872 27.5808C29.821 27.5808 23.7871 21.7481 23.7871 13.7904ZM46.3135 13.7904C46.3135 8.82711 42.7635 5.28301 37.9872 5.28301C33.2109 5.28301 29.6608 8.82711 29.6608 13.7904C29.6608 18.7186 33.2109 22.2978 37.9872 22.2978C42.7635 22.2978 46.3135 18.7225 46.3135 13.7904Z", fill: "black" }), _jsx("path", { d: "M76.4601 8.60493H70.3911C70.0357 6.31627 68.3251 4.93217 65.5171 4.93217C62.7092 4.93217 61.2563 6.02776 61.2563 7.60681C61.2563 9.57186 63.2911 10.2503 68.4228 11.3108C74.4918 12.5662 76.5577 15.5645 76.5577 19.4946C76.5577 24.5202 71.8127 27.5809 65.9389 27.5809C59.452 27.5809 54.707 24.068 54.4492 18.4613H60.4831C60.8072 20.9761 63.0021 22.6488 66.3568 22.6488C68.7469 22.6488 70.52 21.4557 70.52 19.748C70.52 17.6543 68.7469 16.816 64.0643 15.9466C58.3507 14.8822 55.2537 12.5311 55.2537 7.60291C55.2537 2.6747 59.9637 0.03125 65.9038 0.03125C71.7775 0.03125 76.1672 3.60654 76.4601 8.60103V8.60493Z", fill: "black" }), _jsx("path", { d: "M80.0059 0.678223H99.5641V5.77018H85.8796V21.8492H99.8531V26.9412H80.0059V0.682122V0.678223Z", fill: "black" }), _jsx("path", { d: "M109.669 0.678223V21.7518H122.806V26.9373H103.795V0.678223H109.669Z", fill: "black" })] }), _jsxs("defs", { children: [_jsxs("linearGradient", { id: "paint0_linear_4049_13297", x1: "37.9844", y1: "13.6734", x2: "99.5571", y2: "13.6734", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#760023", stopOpacity: "0" }), _jsx("stop", { offset: "1", stopColor: "#760023" })] }), _jsx("clipPath", { id: "clip0_4049_13297", children: _jsx("rect", { width: "127", height: "27.5808", fill: "white" }) })] })] }));
|
|
4
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default function TOSEL({ className }: { className?: string }) {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
className={className}
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
width="127"
|
|
7
|
+
height="28"
|
|
8
|
+
viewBox="0 0 127 28"
|
|
9
|
+
fill="none"
|
|
10
|
+
>
|
|
11
|
+
<g clipPath="url(#clip0_4049_13297)">
|
|
12
|
+
<path
|
|
13
|
+
d="M125.742 2.82682L125.211 2.07824H124.945V2.85802H124.613V0.842285H125.414C125.582 0.842285 125.746 0.908566 125.879 1.00604C126.011 1.1347 126.078 1.26727 126.078 1.42712C126.078 1.55578 126.043 1.68835 125.945 1.81701C125.879 1.91448 125.777 2.01195 125.644 2.04315L126.175 2.85412L125.742 2.82293V2.82682ZM125.574 1.65716C125.64 1.62596 125.676 1.52849 125.676 1.46221C125.676 1.36474 125.64 1.29846 125.574 1.26727C125.508 1.23607 125.406 1.20098 125.34 1.20098H124.941V1.75463H125.34C125.441 1.72344 125.508 1.68835 125.574 1.65716Z"
|
|
14
|
+
fill="black"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M125.242 0C124.207 0 123.41 0.810971 123.41 1.78959C123.41 2.76822 124.242 3.57919 125.242 3.57919C126.273 3.57919 127.073 2.76822 127.073 1.78959C127.109 0.81487 126.273 0 125.242 0ZM125.242 3.28287C124.41 3.28287 123.711 2.60057 123.711 1.78959C123.711 0.978624 124.41 0.292417 125.242 0.292417C126.074 0.292417 126.773 0.974725 126.773 1.78959C126.773 2.60446 126.074 3.28287 125.242 3.28287Z"
|
|
18
|
+
fill="black"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M99.561 11.1392H37.9883V16.2077H99.561V11.1392Z"
|
|
22
|
+
fill="url(#paint0_linear_4049_13297)"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M22.9794 5.86376H14.4266V26.9373H8.55285V5.86376H0V0.678223H22.9794V5.86766V5.86376Z"
|
|
26
|
+
fill="black"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M23.7871 13.7904C23.7871 5.83275 29.821 0 37.9872 0C46.1534 0 52.1872 5.83275 52.1872 13.7904C52.1872 21.7481 46.1534 27.5808 37.9872 27.5808C29.821 27.5808 23.7871 21.7481 23.7871 13.7904ZM46.3135 13.7904C46.3135 8.82711 42.7635 5.28301 37.9872 5.28301C33.2109 5.28301 29.6608 8.82711 29.6608 13.7904C29.6608 18.7186 33.2109 22.2978 37.9872 22.2978C42.7635 22.2978 46.3135 18.7225 46.3135 13.7904Z"
|
|
30
|
+
fill="black"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M76.4601 8.60493H70.3911C70.0357 6.31627 68.3251 4.93217 65.5171 4.93217C62.7092 4.93217 61.2563 6.02776 61.2563 7.60681C61.2563 9.57186 63.2911 10.2503 68.4228 11.3108C74.4918 12.5662 76.5577 15.5645 76.5577 19.4946C76.5577 24.5202 71.8127 27.5809 65.9389 27.5809C59.452 27.5809 54.707 24.068 54.4492 18.4613H60.4831C60.8072 20.9761 63.0021 22.6488 66.3568 22.6488C68.7469 22.6488 70.52 21.4557 70.52 19.748C70.52 17.6543 68.7469 16.816 64.0643 15.9466C58.3507 14.8822 55.2537 12.5311 55.2537 7.60291C55.2537 2.6747 59.9637 0.03125 65.9038 0.03125C71.7775 0.03125 76.1672 3.60654 76.4601 8.60103V8.60493Z"
|
|
34
|
+
fill="black"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
d="M80.0059 0.678223H99.5641V5.77018H85.8796V21.8492H99.8531V26.9412H80.0059V0.682122V0.678223Z"
|
|
38
|
+
fill="black"
|
|
39
|
+
/>
|
|
40
|
+
<path
|
|
41
|
+
d="M109.669 0.678223V21.7518H122.806V26.9373H103.795V0.678223H109.669Z"
|
|
42
|
+
fill="black"
|
|
43
|
+
/>
|
|
44
|
+
</g>
|
|
45
|
+
<defs>
|
|
46
|
+
<linearGradient
|
|
47
|
+
id="paint0_linear_4049_13297"
|
|
48
|
+
x1="37.9844"
|
|
49
|
+
y1="13.6734"
|
|
50
|
+
x2="99.5571"
|
|
51
|
+
y2="13.6734"
|
|
52
|
+
gradientUnits="userSpaceOnUse"
|
|
53
|
+
>
|
|
54
|
+
<stop stopColor="#760023" stopOpacity="0" />
|
|
55
|
+
<stop offset="1" stopColor="#760023" />
|
|
56
|
+
</linearGradient>
|
|
57
|
+
<clipPath id="clip0_4049_13297">
|
|
58
|
+
<rect width="127" height="27.5808" fill="white" />
|
|
59
|
+
</clipPath>
|
|
60
|
+
</defs>
|
|
61
|
+
</svg>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -23,7 +23,7 @@ const heightSize = {
|
|
|
23
23
|
};
|
|
24
24
|
export function Board({ children, widgets, options, debug, buttons, }) {
|
|
25
25
|
const { shows } = widgets ?? {};
|
|
26
|
-
const { width, height, isRounded, className, noMobile } = options ?? {};
|
|
26
|
+
const { width, height, isRounded, className, noMobile, background, border } = options ?? {};
|
|
27
27
|
const container = {
|
|
28
28
|
positions: "relative",
|
|
29
29
|
width: widthSize[width ?? "full"],
|
|
@@ -33,13 +33,15 @@ export function Board({ children, widgets, options, debug, buttons, }) {
|
|
|
33
33
|
const body = {
|
|
34
34
|
positions: "relative",
|
|
35
35
|
sizes: `w-full ${heightSize[height ?? "xl"]} overflow-hidden `,
|
|
36
|
-
|
|
36
|
+
background: `${background ?? "bg-white"} dark:bg-black/80`,
|
|
37
|
+
border: border && border,
|
|
38
|
+
styles: "text-black",
|
|
37
39
|
rounded: `rounded-none ${isRounded ? "xl:rounded-xl" : ""}`,
|
|
38
40
|
};
|
|
39
41
|
const button = {
|
|
40
42
|
positions: "fixed bottom-20 right-4 xl:absolute xl:-bottom-18.5 xl:right-0",
|
|
41
43
|
};
|
|
42
|
-
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(body), children: _jsx(Events.Show, { widgets: shows, children: _jsx("div", { className:
|
|
44
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(body), children: _jsx(Events.Show, { widgets: shows, children: _jsx("div", { className: `h-full ${className}`, children: children }) }) }), _jsx("div", { className: cn(button), children: buttons?.map(({ title, onClick, options }) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
|
|
43
45
|
...options,
|
|
44
46
|
text: "text-white",
|
|
45
47
|
background: "bg-crimson-burgundy",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CanvasBoardProps } from "../../interface/Board";
|
|
2
|
-
export default function CanvasBoard<B>({ header, children,
|
|
2
|
+
export default function CanvasBoard<B>({ header, children, widgets, buttons, options, }: CanvasBoardProps<B>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,12 +3,13 @@ import { Events } from "../..";
|
|
|
3
3
|
import { cn } from "../../util";
|
|
4
4
|
import { Board } from "../design/Board.design";
|
|
5
5
|
import BoardHeader from "../widget/Header";
|
|
6
|
-
export default function CanvasBoard({ header, children,
|
|
6
|
+
export default function CanvasBoard({ header, children, widgets, buttons, options, }) {
|
|
7
7
|
const body = {
|
|
8
|
-
displays: "flex flex-col lg:flex-row lg:flex-wrap gap-7.5
|
|
8
|
+
displays: "flex flex-col lg:flex-row lg:flex-wrap gap-7.5",
|
|
9
9
|
sizes: "h-full",
|
|
10
|
-
paddings: `${header ? "pb-55 xl:pb-25" : "pb-36 xl:pb-6"} px-2 xs:px-4 xl:
|
|
10
|
+
paddings: `${header ? "pb-55 xl:pb-25" : "pb-36 xl:pb-6"} px-2 xs:px-4 xl:px-7.5 pt-2 xs:pt-4 xl:pt-7.5`,
|
|
11
11
|
styles: "overflow-y-scroll",
|
|
12
|
+
classNames: options?.className,
|
|
12
13
|
};
|
|
13
|
-
return (_jsxs(Board, { widgets: widgets, buttons: buttons, options: { ...options, isRounded: true }, children: [header && _jsx(BoardHeader, { ...header }), _jsx(Events.Replace, { widgets: widgets?.replaces, children: _jsx("div", { className: cn(body), children: children }) })] }));
|
|
14
|
+
return (_jsxs(Board, { widgets: widgets, buttons: buttons, options: { ...options, className: "", isRounded: true }, children: [header && _jsx(BoardHeader, { ...header }), _jsx(Events.Replace, { widgets: widgets?.replaces, children: _jsx("div", { className: cn(body), children: children }) })] }));
|
|
14
15
|
}
|
|
@@ -17,9 +17,8 @@ export default function ManageBoard({ header, dataSets, dataField, widgets, opti
|
|
|
17
17
|
styles: "overflow-y-scroll",
|
|
18
18
|
};
|
|
19
19
|
return (_jsxs(Board, { widgets: widgets, buttons: buttons, options: {
|
|
20
|
-
|
|
20
|
+
...options,
|
|
21
21
|
isRounded: true,
|
|
22
|
-
noMobile,
|
|
23
22
|
}, children: [header && _jsx(BoardHeader, { ...header }), dataField && _jsx(DataField.Board, { id: id, dataField: dataField }), _jsx("div", { className: cn(container), children: _jsx(Events.Replace, { widgets: widgets?.replaces, children: dataSets.map(({ titles, items, renderItem, interaction }, index) => (_jsxs(Shelf.Wrap, { titles: titles, options: { gap: "x" }, className: className, children: [items &&
|
|
24
23
|
sortByOrder({ items, orders })?.map((item) => renderItem(item)), interaction] }, id + index))) }) })] }));
|
|
25
24
|
}
|
|
@@ -6,5 +6,5 @@ export default function PaperBoard({ children, debug, options, }) {
|
|
|
6
6
|
const container = {
|
|
7
7
|
displays: "flex flex-col gap-7.5",
|
|
8
8
|
};
|
|
9
|
-
return (_jsx(Board, { options: { width: "
|
|
9
|
+
return (_jsx(Board, { options: { width: "full", height: "full", isRounded: false, className }, debug: debug, children: _jsx("div", { className: cn(container), children: children }) }));
|
|
10
10
|
}
|
package/board/widget/Header.js
CHANGED
|
@@ -5,14 +5,11 @@ export default function BoardHeader({ titles, tag, options, }) {
|
|
|
5
5
|
const { title, icon, titleColor } = titles ?? {};
|
|
6
6
|
const { selects, inputs } = tag ?? {};
|
|
7
7
|
const { colors, titleBorder } = options ?? {};
|
|
8
|
-
const { bgColor, textColor } = colors ?? {
|
|
9
|
-
bgColor: "white",
|
|
10
|
-
textColor: "black",
|
|
11
|
-
};
|
|
8
|
+
const { bgColor, textColor } = colors ?? {};
|
|
12
9
|
const container = {
|
|
13
10
|
positions: "fixed top-15 xl:top-0 left-0 z-30 xl:relative flex items-center",
|
|
14
11
|
paddings: "px-7.5",
|
|
15
|
-
styles: `${bgColor} ${textColor}`,
|
|
12
|
+
styles: `${bgColor ?? "bg-white"} ${textColor ?? "text-black"}`,
|
|
16
13
|
sizes: "w-full h-19",
|
|
17
14
|
border: `border-b-2 ${titleBorder ?? "border-green-dark"}`,
|
|
18
15
|
};
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { cn, isDebug } from "../../util";
|
|
3
3
|
import { useWidgetStore } from "../../store";
|
|
4
4
|
const widthSize = {
|
|
5
|
-
"2xs": "w-
|
|
5
|
+
"2xs": "w-53.75",
|
|
6
6
|
xs: "w-full md:w-60",
|
|
7
7
|
sm: "w-full md:w-90",
|
|
8
8
|
md: "w-full md:w-112.5",
|
|
@@ -13,6 +13,7 @@ const widthSize = {
|
|
|
13
13
|
auto: "w-auto",
|
|
14
14
|
};
|
|
15
15
|
const heightSize = {
|
|
16
|
+
"2xs": "h-30",
|
|
16
17
|
xs: "h-45",
|
|
17
18
|
sm: "h-52.5",
|
|
18
19
|
md: "h-67.5",
|
|
@@ -24,24 +25,13 @@ const heightSize = {
|
|
|
24
25
|
};
|
|
25
26
|
export default function CardDesign({ header, children, options, debug, }) {
|
|
26
27
|
const { setIsOwn } = useWidgetStore();
|
|
27
|
-
const { className, boundary, rounded, height, width, text, background, onClick,
|
|
28
|
-
const setBoundary = () => {
|
|
29
|
-
if (noShadow)
|
|
30
|
-
return "";
|
|
31
|
-
if (boundary === "shadow")
|
|
32
|
-
return "box-shadow";
|
|
33
|
-
if (boundary?.includes("border"))
|
|
34
|
-
return boundary;
|
|
35
|
-
if (boundary === "none")
|
|
36
|
-
return "";
|
|
37
|
-
return "box-shadow";
|
|
38
|
-
};
|
|
28
|
+
const { className, boundary, rounded, height, width, text, background, onClick, onMouse, overflow, } = options ?? {};
|
|
39
29
|
const container = {
|
|
40
30
|
positions: "relative",
|
|
41
31
|
sizes: `${widthSize[width ?? "sm"]} ${heightSize[height ?? "xs"]}`,
|
|
42
32
|
onClick: onClick ? "cursor-pointer" : "",
|
|
43
33
|
text: `${text ?? "text-base"} text-black dark:text-white`,
|
|
44
|
-
boundary:
|
|
34
|
+
boundary: boundary ?? "box-shadow",
|
|
45
35
|
rounded: `rounded-${rounded ?? "xl"}`,
|
|
46
36
|
bgColor: `${background ?? "bg-white/80"} dark:bg-black/80`,
|
|
47
37
|
styles: "duration-500 ",
|
|
@@ -49,9 +39,9 @@ export default function CardDesign({ header, children, options, debug, }) {
|
|
|
49
39
|
overflow: "overflow-hidden",
|
|
50
40
|
};
|
|
51
41
|
const body = {
|
|
52
|
-
sizes: "h-full",
|
|
42
|
+
sizes: "w-full h-full",
|
|
53
43
|
overflow: `overflow-${overflow ?? "hidden"}`,
|
|
54
44
|
className,
|
|
55
45
|
};
|
|
56
|
-
return (_jsxs("div", { className: cn(container), children: [header && _jsx(_Fragment, { children: header }), _jsx("div", { onClick: onClick && onClick, className: cn(body), children: children })] }));
|
|
46
|
+
return (_jsxs("div", { onMouseEnter: onMouse ? () => onMouse[1](true) : () => { }, onMouseLeave: onMouse ? () => onMouse[1](false) : () => { }, className: cn(container), children: [header && _jsx(_Fragment, { children: header }), _jsx("div", { onClick: onClick && onClick, className: cn(body), children: children })] }));
|
|
57
47
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InfoCardProps } from "../../interface/Card";
|
|
2
|
-
export declare function InfoCardDesign({ titles: { title, subtitle }, topRight, debug, options, children, }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function InfoCardDesign({ titles: { title, subtitle }, topRight, debug, image, options, children, }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 { HTMLInputElement } from "../../interface";
|
|
2
|
+
declare function Input({ state, onKeyDown, placeholder, options }: HTMLInputElement): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace Input {
|
|
4
|
+
var LG: ({ state, placeholder, flag, type }: HTMLInputElement) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
export default Input;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
|
+
import { cn } from "../../util";
|
|
4
|
+
import Obstacle from "../widget/Obstacle";
|
|
5
|
+
const widthSize = {
|
|
6
|
+
xs: "w-28",
|
|
7
|
+
sm: "w-48",
|
|
8
|
+
md: "w-64",
|
|
9
|
+
lg: "w-96",
|
|
10
|
+
xl: "w-128",
|
|
11
|
+
"2xl": "w-144",
|
|
12
|
+
full: "w-full",
|
|
13
|
+
};
|
|
14
|
+
function Input({ state, onKeyDown, placeholder, options }) {
|
|
15
|
+
const { width, disabled } = options ?? {};
|
|
16
|
+
const id = useId();
|
|
17
|
+
const [value, setValue] = state;
|
|
18
|
+
const container = {
|
|
19
|
+
positions: "relative",
|
|
20
|
+
width: `${widthSize[width ?? "xs"]} h-8`,
|
|
21
|
+
displays: "flex items-center",
|
|
22
|
+
};
|
|
23
|
+
const body = {
|
|
24
|
+
styles: "rounded-md bg-slate-200 text-xs",
|
|
25
|
+
sizes: "w-full h-full",
|
|
26
|
+
paddings: "pl-4",
|
|
27
|
+
pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
|
|
28
|
+
effect: `transition-all`,
|
|
29
|
+
};
|
|
30
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("input", { className: cn(body), id: id, type: "text", value: value, placeholder: placeholder ?? "입력해주세요", onKeyDown: onKeyDown, onChange: (e) => setValue(e.target.value) }), _jsx(Obstacle, { disabled: disabled })] }));
|
|
31
|
+
}
|
|
32
|
+
function LG({ state, placeholder, flag, type }) {
|
|
33
|
+
const [value, setValue] = state;
|
|
34
|
+
const [onFocus, setOnFocus] = useState(false);
|
|
35
|
+
const container = {
|
|
36
|
+
positions: "relative",
|
|
37
|
+
};
|
|
38
|
+
const placeholderBox = {
|
|
39
|
+
positions: "absolute left-5",
|
|
40
|
+
styles: "duration-300",
|
|
41
|
+
fonts: "leading-none text-gray-medium",
|
|
42
|
+
animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
|
|
43
|
+
};
|
|
44
|
+
const inputBox = {
|
|
45
|
+
sizes: "w-102.5 h-13.5 pl-5 pt-3",
|
|
46
|
+
fonts: "text-sm",
|
|
47
|
+
background: flag === true
|
|
48
|
+
? "bg-green-dark/10"
|
|
49
|
+
: flag === false
|
|
50
|
+
? "bg-crimson-burgundy/10 text-crimson-burgundy"
|
|
51
|
+
: "bg-gray-light",
|
|
52
|
+
styles: "bg-gray-light rounded-md outline-none",
|
|
53
|
+
animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(placeholderBox), children: placeholder }), _jsx("input", { className: cn(inputBox), value: value, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => setValue(e.target.value), type: type ?? "text" })] }));
|
|
56
|
+
}
|
|
57
|
+
Input.LG = LG;
|
|
58
|
+
export default Input;
|
package/html/widget/Toggle.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
2
3
|
const widthSize = {
|
|
3
4
|
xs: "w-32",
|
|
4
5
|
sm: "w-48",
|
|
@@ -9,6 +10,11 @@ const widthSize = {
|
|
|
9
10
|
full: "w-full",
|
|
10
11
|
};
|
|
11
12
|
export default function Toggle({ state: [chekced, setChecked], labels, options, }) {
|
|
12
|
-
const { disabled } = options ?? {};
|
|
13
|
-
|
|
13
|
+
const { disabled, className } = options ?? {};
|
|
14
|
+
const container = {
|
|
15
|
+
displays: "flex items-center",
|
|
16
|
+
sizes: "h-6",
|
|
17
|
+
className,
|
|
18
|
+
};
|
|
19
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("label", { htmlFor: "", className: "inline-flex items-center gap-2 ", children: _jsx("input", { disabled: typeof disabled === "boolean" && disabled, type: "checkbox", className: "toggle bg-red-crimson appearance-none relative rounded-full w-10 h-5 cursor-pointer", checked: chekced, onChange: (e) => setChecked(e.target.checked) }) }), labels && (_jsx("div", { className: "ml-2 transition-all text-xs", children: labels.map(([status, label]) => (status === chekced ? label : "")) }))] }));
|
|
14
20
|
}
|