@edu-tosel/design 1.0.41 → 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.
Files changed (101) hide show
  1. package/asset/SVG.d.ts +7 -0
  2. package/asset/SVG.js +7 -0
  3. package/asset/SVG.tsx +9 -0
  4. package/asset/svg/Close.d.ts +5 -0
  5. package/asset/svg/Close.js +9 -0
  6. package/asset/svg/Close.tsx +32 -0
  7. package/asset/svg/TOSEL.d.ts +3 -0
  8. package/asset/svg/TOSEL.js +4 -0
  9. package/asset/svg/TOSEL.tsx +63 -0
  10. package/board/design/Board.design.js +5 -3
  11. package/board/template/CanvasBoard.d.ts +1 -1
  12. package/board/template/CanvasBoard.js +5 -4
  13. package/board/template/ManageBoard.js +1 -2
  14. package/board/template/PaperBoard.js +1 -1
  15. package/board/widget/Header.js +2 -5
  16. package/card/design/Card.design.js +6 -16
  17. package/card/design/InfoCard.design.d.ts +1 -1
  18. package/card/design/InfoCard.design.js +2 -2
  19. package/card/template/InfoCard/Academy.d.ts +20 -0
  20. package/card/template/InfoCard/Academy.js +31 -0
  21. package/card/template/InfoCard/Grade.d.ts +1 -2
  22. package/card/template/InfoCard/Grade.js +3 -3
  23. package/card/template/InfoCard/PersonalInformation.d.ts +1 -1
  24. package/card/template/InfoCard/PersonalInformation.js +8 -8
  25. package/card/template/InfoCard/Student.d.ts +1 -2
  26. package/card/template/InfoCard/Student.js +3 -3
  27. package/card/template/InfoCard/index.d.ts +2 -0
  28. package/card/template/InfoCard/index.js +2 -0
  29. package/html/design/Label.design.js +1 -1
  30. package/html/index.d.ts +1 -1
  31. package/html/index.js +1 -1
  32. package/html/template/Input.d.ts +6 -0
  33. package/html/template/Input.js +58 -0
  34. package/html/widget/Toggle.js +8 -2
  35. package/index.d.ts +0 -1
  36. package/index.js +0 -1
  37. package/interface/Board.d.ts +2 -0
  38. package/interface/Card.d.ts +3 -1
  39. package/interface/HTMLElement.d.ts +6 -1
  40. package/interface/Layout.d.ts +9 -1
  41. package/interface/Modal.d.ts +18 -14
  42. package/interface/Overlay.d.ts +2 -2
  43. package/interface/Property.d.ts +3 -1
  44. package/interface/Widget.d.ts +4 -0
  45. package/layout/design/Tab.design.js +2 -2
  46. package/layout/index.d.ts +2 -1
  47. package/layout/index.js +2 -1
  48. package/layout/template/Dashboard.d.ts +18 -1
  49. package/layout/template/Dashboard.js +9 -1
  50. package/layout/template/Events.js +4 -2
  51. package/layout/template/Promotion.d.ts +5 -0
  52. package/layout/template/Promotion.js +5 -0
  53. package/layout/template/Shelf.d.ts +1 -1
  54. package/layout/template/Shelf.js +3 -2
  55. package/layout/widget/dashboard/Header.js +1 -1
  56. package/layout/widget/dashboard/Layout.js +2 -2
  57. package/layout/widget/dashboard/Menu.d.ts +3 -2
  58. package/layout/widget/dashboard/Menu.js +2 -1
  59. package/{navigation → layout/widget/dashboard}/Navigation.d.ts +0 -1
  60. package/layout/widget/dashboard/Navigation.js +20 -0
  61. package/layout/widget/dashboard/Notification.d.ts +1 -1
  62. package/layout/widget/dashboard/Notification.js +2 -1
  63. package/layout/widget/dashboard/buttonClassNames.d.ts +2 -0
  64. package/{navigation/Navigation.js → layout/widget/dashboard/buttonClassNames.js} +5 -13
  65. package/layout/widget/dashboard/mypage/Layout.d.ts +2 -0
  66. package/layout/widget/dashboard/mypage/Layout.js +30 -0
  67. package/layout/widget/dashboard/mypage/Navigate.d.ts +12 -0
  68. package/layout/widget/dashboard/mypage/Navigate.js +29 -0
  69. package/layout/widget/dashboard/mypage/Profile.d.ts +28 -0
  70. package/layout/widget/dashboard/mypage/Profile.js +44 -0
  71. package/layout/widget/promotion/Layout.d.ts +3 -0
  72. package/layout/widget/promotion/Layout.js +5 -0
  73. package/layout/widget/promotion/Thumbnail.d.ts +1 -0
  74. package/layout/widget/promotion/Thumbnail.js +10 -0
  75. package/modal/design/ConfirmModal.design.d.ts +2 -0
  76. package/modal/design/ConfirmModal.design.js +18 -0
  77. package/modal/design/Modal.design.d.ts +1 -1
  78. package/modal/design/Modal.design.js +17 -24
  79. package/modal/index.d.ts +1 -0
  80. package/modal/index.js +1 -0
  81. package/modal/template/Alert.d.ts +1 -1
  82. package/modal/template/Alert.js +3 -3
  83. package/modal/template/ConfirmModal/Input.d.ts +10 -0
  84. package/modal/template/ConfirmModal/Input.js +7 -0
  85. package/modal/template/ConfirmModal/index.d.ts +5 -0
  86. package/modal/template/ConfirmModal/index.js +5 -0
  87. package/modal/template/Input.d.ts +1 -1
  88. package/modal/template/Input.js +3 -3
  89. package/overlay/template/Info.d.ts +1 -1
  90. package/overlay/template/Info.js +2 -2
  91. package/overlay/template/Manage.d.ts +1 -1
  92. package/overlay/template/Manage.js +2 -2
  93. package/overlay/widget/Overlay.design.d.ts +1 -1
  94. package/overlay/widget/Overlay.design.js +2 -1
  95. package/package.json +1 -1
  96. package/tailwind.config.ts +16 -0
  97. package/version.txt +1 -1
  98. package/html/widget/Input.d.ts +0 -2
  99. package/html/widget/Input.js +0 -31
  100. package/navigation/index.d.ts +0 -1
  101. package/navigation/index.js +0 -1
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, gradient } from "../../../../util";
3
+ import Card from "../../../../card/design/Card.design";
4
+ import { Label, Toggle } from "../../../../html";
5
+ import { useId } from "react";
6
+ function Profile({ name, birthday, image, modify, }) {
7
+ return (_jsxs(Card, { options: {
8
+ className: "flex gap-x-7.5 items-center pl-5",
9
+ width: "md",
10
+ height: "2xs",
11
+ boundary: "border-1 border-black",
12
+ }, children: [_jsx("div", { className: "w-20 h-20 overflow-hidden rounded-md", children: _jsx("img", { src: image, alt: "profile-image", className: "bg-cover" }) }), _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", options: { width: "sm", height: "xs" }, onClick: modify.name }), _jsx(Label.Button, { title: "\uC0DD\uC77C \uC218\uC815", options: { width: "sm", height: "xs" }, onClick: modify.birthday })] })] })] }));
13
+ }
14
+ function Detail({ titles, infos, toggle, }) {
15
+ const infoBox = {
16
+ displays: "flex ",
17
+ sizes: "w-full",
18
+ styles: "text-green-dark",
19
+ };
20
+ const id = useId();
21
+ return (_jsxs(Card, { options: {
22
+ className: "pt-5 px-5",
23
+ width: "md",
24
+ height: "xs",
25
+ background: gradient.bg.greenToRedSoft,
26
+ boundary: "",
27
+ }, 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", { className: "mr-3", xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M10.9375 1.5625H8.59375C7.97215 1.5625 7.37601 1.80943 6.93647 2.24897C6.49693 2.68851 6.25 3.28465 6.25 3.90625V21.0937C6.25 21.7154 6.49693 22.3115 6.93647 22.751C7.37601 23.1906 7.97215 23.4375 8.59375 23.4375H16.4062C17.0279 23.4375 17.624 23.1906 18.0635 22.751C18.5031 22.3115 18.75 21.7154 18.75 21.0937V3.90625C18.75 3.28465 18.5031 2.68851 18.0635 2.24897C17.624 1.80943 17.0279 1.5625 16.4062 1.5625H14.0625M10.9375 1.5625V3.125H14.0625V1.5625M10.9375 1.5625H14.0625M10.9375 21.0937H14.0625", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) : title === "email" ? (_jsx("svg", { className: "mr-3", xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M22.6562 9.37501V10.3188C22.6563 10.7419 22.5417 11.1572 22.3248 11.5205C22.1078 11.8838 21.7965 12.1816 21.424 12.3823L14.676 16.0156M2.34375 9.37501V10.3188C2.34373 10.7419 2.45828 11.1572 2.67525 11.5205C2.89221 11.8838 3.20348 12.1816 3.57604 12.3823L10.324 16.0156M10.324 16.0156L11.3885 15.4427C11.7301 15.2587 12.112 15.1624 12.5 15.1624C12.888 15.1624 13.2699 15.2587 13.6115 15.4427L14.6771 16.0156L19.5312 18.6302M10.324 16.0156L5.46875 18.6302M22.6562 20.3125C22.6562 20.9341 22.4093 21.5303 21.9698 21.9698C21.5302 22.4093 20.9341 22.6563 20.3125 22.6563H4.6875C4.0659 22.6563 3.46976 22.4093 3.03022 21.9698C2.59068 21.5303 2.34375 20.9341 2.34375 20.3125V9.21251C2.34373 8.78934 2.45828 8.37407 2.67525 8.01075C2.89221 7.64744 3.20348 7.34964 3.57604 7.14897L11.3885 2.94168C11.7301 2.75769 12.112 2.66138 12.5 2.66138C12.888 2.66138 13.2699 2.75769 13.6115 2.94168L21.424 7.14897C21.7964 7.34956 22.1075 7.64719 22.3245 8.01031C22.5414 8.37342 22.6561 8.78848 22.6562 9.21147V20.3125Z", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) : (_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, options: {
28
+ className: "ml-auto",
29
+ background: gradient.bg.greenToRed,
30
+ text: "text-white",
31
+ width: "sm",
32
+ height: "xs",
33
+ } })] }, id + index))) }), toggle && (_jsxs("div", { className: "flex gap-2.5 items-center absolute bottom-5 right-5", children: [_jsx("div", { className: "text-xs leading-none text-green-dark", children: "\uD559\uC6D0\uC73C\uB85C \uBC1B\uAE30" }), _jsx(Toggle, { state: toggle })] }))] }));
34
+ }
35
+ function Preview({ image, username, email, }) {
36
+ const container = {
37
+ displays: "hidden xl:flex flex-col justify-center items-center gap-5",
38
+ sizes: "w-51 h-46.5",
39
+ };
40
+ return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: "relative w-21 h-21 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: image, alt: "profile-image" }) }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "text-xl h-5.25 leading-none font-pretendard-bold", children: username }), _jsx("div", { className: "text-xs h-5.25 leading-none flex justify-center items-center", children: email })] })] }));
41
+ }
42
+ Profile.Detail = Detail;
43
+ Profile.Preview = Preview;
44
+ export default Profile;
@@ -0,0 +1,3 @@
1
+ export default function Layout({ children }: {
2
+ children: React.ReactNode;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Thumbnail from "./Thumbnail";
3
+ export default function Layout({ children }) {
4
+ return (_jsxs("div", { className: "w-[1168px] h-full flex", children: [_jsx(Thumbnail, {}), children] }));
5
+ }
@@ -0,0 +1 @@
1
+ export default function Thumbnail(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { HiOutlineBellSlash } from "react-icons/hi2";
3
+ import { MdComputer } from "react-icons/md";
4
+ import { CiCreditCard1 } from "react-icons/ci";
5
+ import { IoShareSocialOutline } from "react-icons/io5";
6
+ import { MdAccessTime } from "react-icons/md";
7
+ import { IoIosSchool } from "react-icons/io";
8
+ export default function Thumbnail() {
9
+ return (_jsxs("div", { className: "w-[288px] flex flex-col mr-20", children: [_jsx("img", { src: "https://grepp-programmers.s3.amazonaws.com/production/file_resource/6246/Dev_Thumnail_Full_stack_Deceloper_3.png", alt: "", className: "w-full object-cover " }), _jsxs("div", { className: "font-bold text-left text-2xl p-1 mb-2 mt-2", children: ["[3\uAE30] K-Digital Training: ", _jsx("br", {}), "\uD0C0\uC785\uC2A4\uD06C\uB9BD\uD2B8\uB85C \uD568\uAED8\uD558\uB294 \uC6F9 \uD480 \uC0AC\uC774\uD074 \uAC1C\uBC1C(React, Node.js)"] }), _jsx("div", { className: "h-10", children: _jsx("button", { className: "w-full h-10 rounded-md bg-gradient-to-r from-violet-500 to-fuchsia-500 font-bold text-white", children: "\uD558\uB7EC\uAC00\uAE30" }) }), _jsxs("div", { className: "h-14 pt-4 pb-4 text-xs text-slate-300 flex justify-center items-center", children: [_jsx(HiOutlineBellSlash, { className: "mr-2" }), "\uC2E0\uCCAD \uC885\uB8CC\uC77C : ~2024-03-21"] }), _jsxs("div", { className: "h-auto pt-2 w-90/100", children: [_jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx("div", { className: "w-6", children: _jsx(IoIosSchool, { className: "mr-2" }) }), "\uC2E0\uCCAD \uAE30\uAC04 : 2024-04-19 ~ 2024-09-05 \uC885\uB8CC\uC77C \uC774\uD6C4 \uBB34\uC81C\uD55C \uC218\uAC15"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx("div", { className: "w-6", children: _jsx(MdComputer, { className: "mr-2" }) }), "\uC628/\uC624\uD504\uB77C\uC778 \uCF54\uC2A4"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(CiCreditCard1, { className: "mr-2" }), "\u20A939,000"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(IoShareSocialOutline, { className: "mr-2" }), "\uACF5\uC720\uD558\uAE30"] }), _jsxs("div", { className: "text-slate-400 font-bold text-left flex items-center text-sm border-b-2 pt-2 pb-2", children: [_jsx(MdAccessTime, { className: "mr-2" }), "2024-05-02 \uB9C8\uC9C0\uB9C9 \uC5C5\uB370\uC774\uD2B8"] })] })] }));
10
+ }
@@ -0,0 +1,2 @@
1
+ import { ConfirmModalProps } from "../../interface/Modal";
2
+ export default function ConfirmModalDesign({ titles, action, buttons, children, options, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from "../../html";
3
+ import { cn } from "../../util";
4
+ import ModalDesign from "../design/Modal.design";
5
+ export default function ConfirmModalDesign({ titles, action, buttons, children, options, }) {
6
+ const container = {
7
+ displays: "flex flex-col",
8
+ };
9
+ const buttonBox = {
10
+ positions: "absolute bottom-5 left-5",
11
+ displays: "flex gap-2.5",
12
+ };
13
+ return (_jsx(ModalDesign, { titles: titles, action: action, options: options, children: _jsxs("div", { className: cn(container), children: [children, _jsx("div", { className: cn(buttonBox), children: buttons.map(({ title, onClick, options }) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
14
+ ...options,
15
+ width: "lg",
16
+ height: "sm",
17
+ } }, title))) })] }) }));
18
+ }
@@ -1,2 +1,2 @@
1
1
  import { ModalProps } from "../../interface/Modal";
2
- export default function ModalDesign({ isVisible, event, children, options, debug, }: ModalProps): import("react").ReactPortal | null;
2
+ export default function ModalDesign({ titles, action, children, options, debug, }: ModalProps): import("react").ReactPortal | null;
@@ -5,10 +5,12 @@ import { useWidgetStore } from "../../store";
5
5
  import { cn } from "../../util";
6
6
  import isDebug from "../../util/isDebug";
7
7
  import { useEffect, useState } from "react";
8
+ import SVG from "../../asset/SVG";
9
+ import { LineBreaks } from "./../../text/LineBreaks";
8
10
  const widthSize = {
9
11
  xs: "w-2/3 min-w-76 max-w-176",
10
12
  sm: "w-2/3 min-w-76 max-w-176",
11
- md: "w-2/3 min-w-76 max-w-176",
13
+ md: "max-w-112.5",
12
14
  lg: "w-full min-w-76 max-w-360",
13
15
  xl: "w-2/3 min-w-76 max-w-360",
14
16
  "2xl": "w-2/3 min-w-76 max-w-360",
@@ -18,13 +20,14 @@ const heightSize = {
18
20
  xs: "",
19
21
  sm: "h-100",
20
22
  md: "h-72 sm:h-48",
21
- lg: "h-120",
23
+ lg: "h-112.5",
22
24
  xl: "h-180",
23
- "2xl": "w-2/3 min-w-76 max-w-176",
25
+ "2xl": "max-w-176",
24
26
  full: "h-full",
25
27
  };
26
- export default function ModalDesign({ isVisible, event, children, options, debug, }) {
27
- const { buttons, width, height, closeButtonColor, isCloseButton } = options ?? {};
28
+ export default function ModalDesign({ titles, action, children, options, debug, }) {
29
+ const { isVisible, event } = action ?? {};
30
+ const { width, height, noClose } = options ?? {};
28
31
  const [detection, setDetection] = useState(null);
29
32
  const { setIsOwn, removeModal } = useWidgetStore();
30
33
  useEffect(() => {
@@ -37,27 +40,14 @@ export default function ModalDesign({ isVisible, event, children, options, debug
37
40
  styles: "bg-black/10 backdrop-blur-sm ",
38
41
  };
39
42
  const container = {
40
- paddings: "pl-25 pt-18 pb-12",
41
- sizes: `${heightSize[height ?? "sm"]} ${widthSize[width ?? "md"]}`,
43
+ paddings: "p-5",
44
+ sizes: `${heightSize[height ?? "lg"]} ${widthSize[width ?? "md"]}`,
42
45
  styles: "rounded-xl bg-white relative overflow-hidden",
43
46
  debug: debug && isDebug(`border-2 border-${debug}`),
44
47
  };
45
- const button = {
46
- container: {
47
- positions: "absolute bottom-8 right-10",
48
- displays: "flex justify-end gap-4",
49
- },
50
- body: {
51
- paddings: "px-8 py-2 ",
52
- styles: "rounded-2xl bg-black text-2xl font-pretendard-bold text-white",
53
- },
54
- };
55
- const closeButton = {
56
- positions: "absolute top-5 left-7",
57
- displays: "flex justify-center items-center",
58
- sizes: "h-9 w-9",
59
- background: closeButtonColor ?? "bg-black",
60
- styles: "rounded-full",
48
+ const titleBox = {
49
+ displays: "flex flex-col items-end",
50
+ sizes: "w-full",
61
51
  };
62
52
  const transitions = useTransition(isVisible, {
63
53
  from: { opacity: 0 },
@@ -66,5 +56,8 @@ export default function ModalDesign({ isVisible, event, children, options, debug
66
56
  config: { duration: 200 },
67
57
  });
68
58
  return (detection &&
69
- ReactDOM.createPortal(transitions((styles, item) => item && (_jsx(animated.div, { style: styles, className: cn(background), onClick: () => setIsOwn(true), children: _jsxs("div", { className: cn(container), children: [children, buttons ? (_jsx("div", { className: cn(button.container), children: buttons.map(([text, onClick]) => (_jsx("button", { className: cn(button.body), onClick: onClick, children: text }, text))) })) : null, isCloseButton && event && (_jsx("button", { className: cn(closeButton), onClick: () => removeModal(event), children: _jsx("div", { className: "x-shape" }) }))] }) }))), document.body));
59
+ 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("div", { className: "mt-5", children: LineBreaks({
60
+ texts: titles.subtitle,
61
+ className: "text-base leading-none text-end font-pretendard-bold",
62
+ }) })] }), children, !noClose && event && (_jsx(SVG.Close, { onClick: () => removeModal(event), className: "absolute top-5 left-5" }))] }) }))), document.body));
70
63
  }
package/modal/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default as Modal } from "./template";
2
+ export { default as ConfirmModal } from "./template/ConfirmModal";
package/modal/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export { default as Modal } from "./template";
2
+ export { default as ConfirmModal } from "./template/ConfirmModal";
@@ -1,2 +1,2 @@
1
1
  import { AlertModalProps } from "../../interface/Modal";
2
- export default function Alert({ isVisible, title, scripts, options, }: AlertModalProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Alert({ titles, action, scripts, options, }: AlertModalProps): 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 ModalDesign from "../design/Modal.design";
3
- export default function Alert({ isVisible, title, scripts, options, }) {
4
- const { script, subScript } = scripts ?? {};
3
+ export default function Alert({ titles, action, scripts, options, }) {
4
+ const { script } = scripts ?? {};
5
5
  const { buttons } = options ?? {};
6
- return (_jsx(ModalDesign, { isVisible: isVisible, className: "pt-18 px-25", options: { buttons, isCloseButton: true }, children: _jsx("div", { className: "flex flex-col gap-3", children: _jsxs("div", { className: "flex flex-col gap-6", children: [_jsx("div", { className: "text-3xl font-pretendard-bold", children: title }), _jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", { className: "text-xl font-pretendard-bold", children: script })] }) }) }));
6
+ return (_jsx(ModalDesign, { titles: titles, action: action, className: "pt-18 px-25", options: { 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
  }
@@ -0,0 +1,10 @@
1
+ import { ConfirmModalProps } from "../../../interface/Modal";
2
+ import { HTMLInputElement } from "../../../interface";
3
+ interface InputProps extends Omit<ConfirmModalProps, "children"> {
4
+ inputs: (HTMLInputElement & {
5
+ title: string;
6
+ })[];
7
+ data?: string;
8
+ }
9
+ export default function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import ConfirmModal from "../../design/ConfirmModal.design";
3
+ import { Input as _Input } from "../../../html";
4
+ export default function Input(props) {
5
+ const { buttons, inputs } = props;
6
+ return (_jsx(ConfirmModal, { ...props, buttons: buttons, 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.LG, { ...input })] }, index))) }) }));
7
+ }
@@ -0,0 +1,5 @@
1
+ import Input from "./Input";
2
+ declare const ConfirmModal: {
3
+ Input: typeof Input;
4
+ };
5
+ export default ConfirmModal;
@@ -0,0 +1,5 @@
1
+ import Input from "./Input";
2
+ const ConfirmModal = {
3
+ Input,
4
+ };
5
+ export default ConfirmModal;
@@ -1,6 +1,6 @@
1
1
  import { State } from "../../interface";
2
2
  import { ModalProps } from "../../interface/Modal";
3
- export default function Input<T>({ isVisible, event, title, options, state, }: Omit<ModalProps, "children"> & {
3
+ export default function Input<T>({ titles, action, options, state, }: Omit<ModalProps, "children"> & {
4
4
  title?: string;
5
5
  state: State<T>;
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ModalDesign from "../design/Modal.design";
3
- export default function Input({ isVisible, event, title, options, state, }) {
3
+ export default function Input({ titles, action, options, state, }) {
4
4
  const { buttons } = options ?? {};
5
- return (_jsxs(ModalDesign, { isVisible: isVisible, event: event, className: "pt-18 px-25", options: { buttons, isCloseButton: true }, children: [_jsx("div", { className: "text-xl font-pretendard-bold", children: title }), _jsx("input", { className: "border-2 border-black w-80 h-8", value: state[0], onChange: (e) => state[1](e.target.value) })] }));
5
+ return (_jsx(ModalDesign, { titles: titles, action: action, className: "pt-18 px-25", options: { 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
  }
@@ -1,2 +1,2 @@
1
1
  import { InfoOverlayProps } from "../../interface/Overlay";
2
- export default function Info({ event, isVisible, }: Omit<InfoOverlayProps, "titles">): import("react/jsx-runtime").JSX.Element;
2
+ export default function Info({ action }: Omit<InfoOverlayProps, "titles">): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import OverlayDesign from "../widget/Overlay.design";
3
- export default function Info({ event, isVisible, }) {
4
- return (_jsx(OverlayDesign, { titles: { title: "유저 관리" }, event: event, isVisible: isVisible, children: _jsx("div", { children: "TEST" }) }));
3
+ export default function Info({ action }) {
4
+ return (_jsx(OverlayDesign, { titles: { title: "유저 관리" }, action: action, children: _jsx("div", { children: "TEST" }) }));
5
5
  }
@@ -1,2 +1,2 @@
1
1
  import { ManageOverlayProps } from "../../interface";
2
- export default function Manage({ titles, isVisible, event, elements, buttons, }: ManageOverlayProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Manage({ titles, action, elements, buttons, }: ManageOverlayProps): import("react/jsx-runtime").JSX.Element;
@@ -4,13 +4,13 @@ import OverlayDesign from "../widget/Overlay.design";
4
4
  import Frame from "../widget/Frame.design";
5
5
  import { useId } from "react";
6
6
  import { cn } from "../../util";
7
- export default function Manage({ titles, isVisible, event, elements, buttons, }) {
7
+ export default function Manage({ titles, action, elements, buttons, }) {
8
8
  const id = useId();
9
9
  const body = {
10
10
  sizes: "w-full min-h-160 xl:h-120 ",
11
11
  styles: "overflow-y-scroll",
12
12
  };
13
- return (_jsxs(OverlayDesign, { titles: titles, event: event, isVisible: isVisible, children: [_jsx("div", { className: cn(body), children: elements?.map(({ title, type, labels, state, selectOptions, disabled }) => {
13
+ return (_jsxs(OverlayDesign, { titles: titles, action: action, children: [_jsx("div", { className: cn(body), children: elements?.map(({ title, type, labels, state, selectOptions, disabled }) => {
14
14
  if (type === "text")
15
15
  return (_jsx(Frame, { title: title, children: _jsx("div", { className: "text-base pl-4", children: state[0] }) }, id + title));
16
16
  if (type === "select")
@@ -1,2 +1,2 @@
1
1
  import { OverlayProps } from "../../interface";
2
- export default function OverlayDesign({ titles, children, event, isVisible, }: OverlayProps): JSX.Element;
2
+ export default function OverlayDesign({ titles, children, action, }: OverlayProps): JSX.Element;
@@ -2,9 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useTransition, animated } from "react-spring";
3
3
  import { cn } from "../../util";
4
4
  import { useWidgetStore } from "../../store";
5
- export default function OverlayDesign({ titles, children, event, isVisible, }) {
5
+ export default function OverlayDesign({ titles, children, action, }) {
6
6
  const { removeView, setIsOwn } = useWidgetStore();
7
7
  const { title } = titles;
8
+ const { isVisible, event } = action ?? {};
8
9
  const container = {
9
10
  positions: "absolute top-0 right-0 z-30",
10
11
  sizes: "h-full",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -65,6 +65,7 @@ export default {
65
65
  "gray-light-super": "#D9D9D9",
66
66
  "gray-medium": "#7F7F7F",
67
67
  "gray-dim": "#4C4C4C",
68
+ "gray-dark": "#4C4C4C",
68
69
  "silver-lavender": "#E7E9F2",
69
70
  "silver-latte": "#FBF3E4",
70
71
  "silver-pale": "#DFD8CA",
@@ -92,7 +93,9 @@ export default {
92
93
  0.5: "0.125rem",
93
94
  1: "0.25rem",
94
95
  1.25: "0.3125rem",
96
+ 1.5: "0.375rem",
95
97
  2.125: "0.53125rem",
98
+ 2.25: "0.5625rem",
96
99
  2.5: "0.625rem",
97
100
  2.625: "0.65625rem",
98
101
  3.5: "0.875rem",
@@ -102,10 +105,12 @@ export default {
102
105
  4.5: "1.125rem",
103
106
  4.75: "1.1875rem",
104
107
  5.25: "1.3125rem",
108
+ 5.5: "1.375rem",
105
109
  5.75: "1.4375rem",
106
110
  6.25: "1.5625rem",
107
111
  6.4: "1.6rem",
108
112
  6.5: "1.625rem",
113
+ 6.75: "1.6875rem",
109
114
  7: "1.75rem",
110
115
  7.5: "1.875rem",
111
116
  8: "2rem",
@@ -114,15 +119,20 @@ export default {
114
119
  9.25: "2.3125rem",
115
120
  9.5: "2.375rem",
116
121
  10.25: "2.5625rem",
122
+ 10.5: "2.625rem",
117
123
  11: "2.75rem",
118
124
  11.25: "2.8125rem",
119
125
  11.375: "2.84375rem",
126
+ 11.5: "2.875rem",
120
127
  12: "3rem",
128
+ 12.25: "3.0625rem",
129
+ 13: "3.25rem",
121
130
  13.25: "3.3125rem",
122
131
  13.5: "3.375rem",
123
132
  13.75: "3.4375rem",
124
133
  14: "3.5rem",
125
134
  14.125: "3.53125rem",
135
+ 14.25: "3.5625rem",
126
136
  14.5: "3.625rem",
127
137
  15: "3.75rem",
128
138
  15.5: "3.875rem",
@@ -135,6 +145,7 @@ export default {
135
145
  19.5: "4.875rem",
136
146
  20: "5rem",
137
147
  20.5: "5.125rem",
148
+ 20.75: "5.1875rem",
138
149
  21: "5.25rem",
139
150
  21.5: "5.375rem",
140
151
  21.75: "5.4375rem",
@@ -162,12 +173,14 @@ export default {
162
173
  43: "10.75rem",
163
174
  44: "11rem",
164
175
  45: "11.25rem",
176
+ 46.5: "11.625rem",
165
177
  48: "12rem",
166
178
  49: "12.25rem",
167
179
  50: "12.5rem",
168
180
  51: "12.75rem",
169
181
  52: "13rem",
170
182
  52.5: "13.125rem",
183
+ 53.75: "13.4375rem",
171
184
  54: "13.5rem",
172
185
  55: "13.75rem",
173
186
  56: "14rem",
@@ -185,6 +198,7 @@ export default {
185
198
  84: "21rem",
186
199
  85: "21.25rem",
187
200
  88: "22rem",
201
+ 88.5: "22.125rem",
188
202
  90: "22.5rem",
189
203
  92: "23rem",
190
204
  96: "24rem",
@@ -299,6 +313,7 @@ export default {
299
313
  1500: "1500ms",
300
314
  1600: "1600ms",
301
315
  1650: "1650ms",
316
+ 1700: "1700ms",
302
317
  1750: "1750ms",
303
318
  1800: "1800ms",
304
319
  1950: "1950ms",
@@ -359,6 +374,7 @@ export default {
359
374
  40: ".4",
360
375
  },
361
376
  fontSize: {
377
+ "2xs": "0.625rem",
362
378
  xs: "0.75rem",
363
379
  sm: "0.875rem",
364
380
  base: "1rem",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.41
1
+ 1.0.43
@@ -1,2 +0,0 @@
1
- import { HTMLInputElement } from "../../interface";
2
- export default function Input({ state, onKeyDown, placeholder, options, }: HTMLInputElement): import("react/jsx-runtime").JSX.Element;
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from "react";
3
- import { cn } from "../../util";
4
- import Obstacle from "./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
- export default 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
- }
@@ -1 +0,0 @@
1
- export * from "./Navigation";
@@ -1 +0,0 @@
1
- export * from "./Navigation";