@edu-tosel/design 1.0.42 → 1.0.44

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 (135) hide show
  1. package/asset/SVG.d.ts +21 -0
  2. package/asset/SVG.js +19 -0
  3. package/asset/SVG.tsx +21 -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/Direction.d.ts +8 -0
  8. package/asset/svg/Direction.js +8 -0
  9. package/asset/svg/Direction.tsx +36 -0
  10. package/asset/svg/Email.d.ts +1 -0
  11. package/asset/svg/Email.js +4 -0
  12. package/asset/svg/Email.tsx +20 -0
  13. package/asset/svg/Image.d.ts +6 -0
  14. package/asset/svg/Image.js +4 -0
  15. package/asset/svg/Image.tsx +24 -0
  16. package/asset/svg/Notification.d.ts +8 -0
  17. package/asset/svg/Notification.js +4 -0
  18. package/asset/svg/Notification.tsx +34 -0
  19. package/asset/svg/Phone.d.ts +1 -0
  20. package/asset/svg/Phone.js +4 -0
  21. package/asset/svg/Phone.tsx +20 -0
  22. package/asset/svg/Profile.d.ts +7 -0
  23. package/asset/svg/Profile.js +4 -0
  24. package/asset/svg/Profile.tsx +27 -0
  25. package/asset/svg/TOSEL.d.ts +3 -0
  26. package/asset/svg/TOSEL.js +4 -0
  27. package/asset/svg/TOSEL.tsx +63 -0
  28. package/board/design/Board.design.js +5 -3
  29. package/board/template/CanvasBoard.d.ts +1 -1
  30. package/board/template/CanvasBoard.js +5 -4
  31. package/board/template/ManageBoard.js +2 -3
  32. package/board/template/PaperBoard.js +1 -1
  33. package/board/widget/Header.js +2 -5
  34. package/card/design/Card.design.js +6 -16
  35. package/card/design/InfoCard.design.d.ts +1 -1
  36. package/card/design/InfoCard.design.js +2 -2
  37. package/card/template/InfoCard/Academy.d.ts +20 -0
  38. package/card/template/InfoCard/Academy.js +31 -0
  39. package/card/template/InfoCard/Grade.d.ts +1 -2
  40. package/card/template/InfoCard/Grade.js +3 -3
  41. package/card/template/InfoCard/PersonalInformation.js +1 -1
  42. package/card/template/InfoCard/Student.d.ts +1 -2
  43. package/card/template/InfoCard/Student.js +3 -3
  44. package/card/template/InfoCard/index.d.ts +2 -0
  45. package/card/template/InfoCard/index.js +2 -0
  46. package/html/design/Label.design.js +1 -1
  47. package/html/index.d.ts +1 -1
  48. package/html/index.js +1 -1
  49. package/html/template/Input.d.ts +6 -0
  50. package/html/template/Input.js +68 -0
  51. package/html/widget/DatePicker.d.ts +2 -2
  52. package/html/widget/EmailInput.d.ts +2 -2
  53. package/html/widget/EmailInput.js +1 -1
  54. package/html/widget/Toggle.js +8 -2
  55. package/index.d.ts +0 -1
  56. package/index.js +0 -1
  57. package/interface/Board.d.ts +4 -2
  58. package/interface/Card.d.ts +3 -1
  59. package/interface/HTMLElement.d.ts +8 -2
  60. package/interface/Layout.d.ts +30 -8
  61. package/interface/Modal.d.ts +18 -14
  62. package/interface/Overlay.d.ts +2 -2
  63. package/interface/Property.d.ts +5 -2
  64. package/interface/Widget.d.ts +4 -0
  65. package/layout/design/Tab.design.js +2 -2
  66. package/layout/index.d.ts +2 -1
  67. package/layout/index.js +2 -1
  68. package/layout/template/Dashboard.d.ts +18 -1
  69. package/layout/template/Dashboard.js +9 -1
  70. package/layout/template/Events.js +4 -2
  71. package/layout/template/Promotion.d.ts +5 -0
  72. package/layout/template/Promotion.js +5 -0
  73. package/layout/template/Shelf.d.ts +1 -1
  74. package/layout/template/Shelf.js +3 -2
  75. package/layout/template/Sign.d.ts +4 -2
  76. package/layout/template/Sign.js +4 -2
  77. package/layout/widget/dashboard/Header.d.ts +1 -1
  78. package/layout/widget/dashboard/Header.js +14 -7
  79. package/layout/widget/dashboard/Layout.js +4 -4
  80. package/layout/widget/dashboard/Menu.d.ts +2 -4
  81. package/layout/widget/dashboard/Menu.js +18 -8
  82. package/{navigation → layout/widget/dashboard}/Navigation.d.ts +0 -1
  83. package/layout/widget/dashboard/Navigation.js +20 -0
  84. package/layout/widget/dashboard/Notification.d.ts +1 -1
  85. package/layout/widget/dashboard/Notification.js +2 -1
  86. package/layout/widget/dashboard/buttonClassNames.d.ts +2 -0
  87. package/{navigation/Navigation.js → layout/widget/dashboard/buttonClassNames.js} +5 -13
  88. package/layout/widget/dashboard/mypage/Layout.d.ts +2 -0
  89. package/layout/widget/dashboard/mypage/Layout.js +30 -0
  90. package/layout/widget/dashboard/mypage/Navigate.d.ts +12 -0
  91. package/layout/widget/dashboard/mypage/Navigate.js +29 -0
  92. package/layout/widget/dashboard/mypage/Profile.d.ts +30 -0
  93. package/layout/widget/dashboard/mypage/Profile.js +59 -0
  94. package/layout/widget/promotion/Layout.d.ts +3 -0
  95. package/layout/widget/promotion/Layout.js +5 -0
  96. package/layout/widget/promotion/Thumbnail.d.ts +1 -0
  97. package/layout/widget/promotion/Thumbnail.js +10 -0
  98. package/layout/widget/sign/WithTitle.d.ts +6 -0
  99. package/layout/widget/sign/WithTitle.js +6 -0
  100. package/modal/design/ConfirmModal.design.d.ts +2 -0
  101. package/modal/design/ConfirmModal.design.js +18 -0
  102. package/modal/design/Modal.design.d.ts +1 -1
  103. package/modal/design/Modal.design.js +17 -24
  104. package/modal/index.d.ts +1 -0
  105. package/modal/index.js +1 -0
  106. package/modal/template/Alert.d.ts +1 -1
  107. package/modal/template/Alert.js +3 -3
  108. package/modal/template/ConfirmModal/Confirm.d.ts +9 -0
  109. package/modal/template/ConfirmModal/Confirm.js +15 -0
  110. package/modal/template/ConfirmModal/Input.d.ts +9 -0
  111. package/modal/template/ConfirmModal/Input.js +7 -0
  112. package/modal/template/ConfirmModal/Reimage.d.ts +10 -0
  113. package/modal/template/ConfirmModal/Reimage.js +34 -0
  114. package/modal/template/ConfirmModal/index.d.ts +7 -0
  115. package/modal/template/ConfirmModal/index.js +10 -0
  116. package/modal/template/Input.d.ts +1 -1
  117. package/modal/template/Input.js +3 -3
  118. package/overlay/design/Overlay.design.d.ts +2 -0
  119. package/overlay/{widget → design}/Overlay.design.js +2 -1
  120. package/overlay/template/Info.d.ts +1 -1
  121. package/overlay/template/Info.js +3 -3
  122. package/overlay/template/Manage.d.ts +1 -1
  123. package/overlay/template/Manage.js +4 -4
  124. package/package.json +1 -1
  125. package/tailwind.config.ts +19 -0
  126. package/version.txt +1 -1
  127. package/html/widget/Input.d.ts +0 -2
  128. package/html/widget/Input.js +0 -31
  129. package/layout/widget/sign/Input.d.ts +0 -15
  130. package/layout/widget/sign/Input.js +0 -33
  131. package/navigation/index.d.ts +0 -1
  132. package/navigation/index.js +0 -1
  133. package/overlay/widget/Overlay.design.d.ts +0 -2
  134. /package/overlay/{widget → design}/Frame.design.d.ts +0 -0
  135. /package/overlay/{widget → design}/Frame.design.js +0 -0
@@ -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: "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,9 @@
1
+ import { Scripts } from "../../../interface";
2
+ import { ConfirmModalProps } from "../../../interface/Modal";
3
+ interface ConfirmProps extends Omit<ConfirmModalProps, "children"> {
4
+ scripts: Scripts & {
5
+ alert?: string;
6
+ };
7
+ }
8
+ export type { ConfirmProps };
9
+ export default function Confirm(props: ConfirmProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { LineBreaks } from "../../../text";
3
+ import { cn } from "../../../util";
4
+ import ConfirmModalDesign from "../../design/ConfirmModal.design";
5
+ export default function Confirm(props) {
6
+ const container = {
7
+ displays: "flex flex-col gap-3 justify-center items-center",
8
+ margins: "mt-2.5",
9
+ sizes: "w-full h-60",
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 })] }), options: {
12
+ width: "md",
13
+ height: "lg",
14
+ } }));
15
+ }
@@ -0,0 +1,9 @@
1
+ import { ConfirmModalProps } from "../../../interface/Modal";
2
+ import { HTMLInput } from "../../../interface";
3
+ interface InputProps extends Omit<ConfirmModalProps, "children"> {
4
+ inputs: (HTMLInput & {
5
+ title: string;
6
+ })[];
7
+ }
8
+ export default function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
9
+ 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 { 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.LG, { ...input })] }, index))) }) }));
7
+ }
@@ -0,0 +1,10 @@
1
+ import { ConfirmModalProps } from "../../../interface/Modal";
2
+ import { State } from "../../../interface";
3
+ interface ReimageProps extends Omit<ConfirmModalProps, "children"> {
4
+ data: {
5
+ image: State<string | ArrayBuffer | null>;
6
+ nowImage: string;
7
+ };
8
+ }
9
+ export default function Reimage(props: ReimageProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import ConfirmModal from "../../design/ConfirmModal.design";
4
+ import { cn } from "../../../util";
5
+ import SVG from "../../../asset/SVG";
6
+ export default function Reimage(props) {
7
+ const { data } = props;
8
+ const [selectedImage, setSelectedImage] = data.image;
9
+ const ref = useRef(null);
10
+ const labelBox = {
11
+ displays: "flex items-center pl-5",
12
+ sizes: "w-full h-13.5",
13
+ styles: "bg-gray-light text-gray-dark rounded-lgx",
14
+ };
15
+ const handleImageChange = (e) => {
16
+ const file = e.target.files?.[0];
17
+ if (file) {
18
+ const reader = new FileReader();
19
+ reader.onloadend = () => {
20
+ setSelectedImage(reader.result);
21
+ };
22
+ reader.readAsDataURL(file);
23
+ }
24
+ };
25
+ return (_jsx(ConfirmModal, { ...props, children: _jsxs("div", { className: "flex flex-col gap-y-5.5 mt-4.5", children: [_jsx("div", { className: cn(labelBox), children: "\uC774\uBBF8\uC9C0\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694." }), _jsxs("div", { className: "flex w-full justify-center gap-x-12", children: [_jsx(ImageFrame, { image: data.nowImage, script: "\uD604\uC7AC \uC0AC\uC9C4" }), _jsx(SVG.Direction.Right, { className: "mt-7.5" }), _jsx(ImageFrame, { onClick: () => ref.current?.click(), image: selectedImage, script: "\uC0C8\uB85C\uC6B4 \uC0AC\uC9C4" })] }), _jsxs("div", { className: "w-full flex flex-col items-center text-xs text-gray-medium", children: [_jsx("div", { children: "\uB4F1\uB85D\uB41C \uC0AC\uC9C4\uC740 \uC218\uD5D8\uD45C \uBC1C\uAE09\uC2DC \uC790\uB3D9\uC73C\uB85C \uC0AC\uC6A9\uB429\uB2C8\uB2E4." }), _jsx("div", { children: "\uAC00\uAE09\uC801 1:1 \uBE44\uC728, 100*100px \uC774\uC0C1\uC758 \uC0AC\uC9C4\uC744 \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694." })] }), _jsx("input", { ref: ref, type: "file", accept: "image/*", onChange: handleImageChange, className: "hidden" })] }) }));
26
+ }
27
+ function ImageFrame({ image, script, onClick }) {
28
+ const imageBox = {
29
+ sizes: "w-21 h-21 ",
30
+ styles: "overflow-hidden rounded-md",
31
+ cursor: onClick && "cursor-pointer",
32
+ };
33
+ return (_jsxs("div", { className: "flex flex-col gap-2 items-center", children: [_jsx("div", { onClick: onClick, className: cn(imageBox), children: _jsx("img", { src: image, alt: "now-profile-image", className: "bg-cover" }) }), _jsx("div", { className: "leading-none text-xs", children: script })] }));
34
+ }
@@ -0,0 +1,7 @@
1
+ import { ConfirmProps } from "./Confirm";
2
+ declare function ConfirmModal(props: ConfirmProps): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace ConfirmModal {
4
+ var Input: typeof import("./Input").default;
5
+ var Reimage: typeof import("./Reimage").default;
6
+ }
7
+ export default ConfirmModal;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Confirm from "./Confirm";
3
+ import Input from "./Input";
4
+ import Reimage from "./Reimage";
5
+ function ConfirmModal(props) {
6
+ return _jsx(Confirm, { ...props });
7
+ }
8
+ ConfirmModal.Input = Input;
9
+ ConfirmModal.Reimage = Reimage;
10
+ 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
  }
@@ -0,0 +1,2 @@
1
+ import { OverlayProps } from "../../interface";
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",
@@ -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
- 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" }) }));
2
+ import OverlayDesign from "../design/Overlay.design";
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;
@@ -1,16 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Input, Label, Select, Toggle } from "../..";
3
- import OverlayDesign from "../widget/Overlay.design";
4
- import Frame from "../widget/Frame.design";
3
+ import OverlayDesign from "../design/Overlay.design";
4
+ import Frame from "../design/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")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
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,9 +93,12 @@ 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",
101
+ 2.75: "0.6875rem",
98
102
  3.5: "0.875rem",
99
103
  3.75: "0.9375rem",
100
104
  4.25: "1.0625rem",
@@ -102,10 +106,12 @@ export default {
102
106
  4.5: "1.125rem",
103
107
  4.75: "1.1875rem",
104
108
  5.25: "1.3125rem",
109
+ 5.5: "1.375rem",
105
110
  5.75: "1.4375rem",
106
111
  6.25: "1.5625rem",
107
112
  6.4: "1.6rem",
108
113
  6.5: "1.625rem",
114
+ 6.75: "1.6875rem",
109
115
  7: "1.75rem",
110
116
  7.5: "1.875rem",
111
117
  8: "2rem",
@@ -114,19 +120,26 @@ export default {
114
120
  9.25: "2.3125rem",
115
121
  9.5: "2.375rem",
116
122
  10.25: "2.5625rem",
123
+ 10.5: "2.625rem",
117
124
  11: "2.75rem",
118
125
  11.25: "2.8125rem",
119
126
  11.375: "2.84375rem",
127
+ 11.5: "2.875rem",
120
128
  12: "3rem",
129
+ 12.25: "3.0625rem",
130
+ 13: "3.25rem",
121
131
  13.25: "3.3125rem",
122
132
  13.5: "3.375rem",
123
133
  13.75: "3.4375rem",
124
134
  14: "3.5rem",
125
135
  14.125: "3.53125rem",
136
+ 14.25: "3.5625rem",
126
137
  14.5: "3.625rem",
127
138
  15: "3.75rem",
128
139
  15.5: "3.875rem",
129
140
  16: "4rem",
141
+ 17: "4.25rem",
142
+ 17.75: "4.4375rem",
130
143
  18: "4.5rem",
131
144
  18.5: "4.625rem",
132
145
  18.75: "4.6875rem",
@@ -135,6 +148,7 @@ export default {
135
148
  19.5: "4.875rem",
136
149
  20: "5rem",
137
150
  20.5: "5.125rem",
151
+ 20.75: "5.1875rem",
138
152
  21: "5.25rem",
139
153
  21.5: "5.375rem",
140
154
  21.75: "5.4375rem",
@@ -162,12 +176,14 @@ export default {
162
176
  43: "10.75rem",
163
177
  44: "11rem",
164
178
  45: "11.25rem",
179
+ 46.5: "11.625rem",
165
180
  48: "12rem",
166
181
  49: "12.25rem",
167
182
  50: "12.5rem",
168
183
  51: "12.75rem",
169
184
  52: "13rem",
170
185
  52.5: "13.125rem",
186
+ 53.75: "13.4375rem",
171
187
  54: "13.5rem",
172
188
  55: "13.75rem",
173
189
  56: "14rem",
@@ -185,6 +201,7 @@ export default {
185
201
  84: "21rem",
186
202
  85: "21.25rem",
187
203
  88: "22rem",
204
+ 88.5: "22.125rem",
188
205
  90: "22.5rem",
189
206
  92: "23rem",
190
207
  96: "24rem",
@@ -299,6 +316,7 @@ export default {
299
316
  1500: "1500ms",
300
317
  1600: "1600ms",
301
318
  1650: "1650ms",
319
+ 1700: "1700ms",
302
320
  1750: "1750ms",
303
321
  1800: "1800ms",
304
322
  1950: "1950ms",
@@ -359,6 +377,7 @@ export default {
359
377
  40: ".4",
360
378
  },
361
379
  fontSize: {
380
+ "2xs": "0.625rem",
362
381
  xs: "0.75rem",
363
382
  sm: "0.875rem",
364
383
  base: "1rem",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.42
1
+ 1.0.44
@@ -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,15 +0,0 @@
1
- import { State } from "../../../interface";
2
- interface InputProps {
3
- state: State<string | undefined>;
4
- placeholder: string;
5
- flag?: boolean;
6
- type?: "text" | "password" | "date" | "email" | "phone" | "number";
7
- }
8
- interface InputWithTitleProps extends InputProps {
9
- title: string;
10
- }
11
- declare function Input({ state, placeholder, flag, type }: InputProps): import("react/jsx-runtime").JSX.Element;
12
- declare namespace Input {
13
- var WithTitle: ({ title, placeholder, state, flag, type, }: InputWithTitleProps) => import("react/jsx-runtime").JSX.Element;
14
- }
15
- export default Input;
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { cn } from "../../../util";
4
- function Input({ state, placeholder, flag, type }) {
5
- const [value, setValue] = state;
6
- const [onFocus, setOnFocus] = useState(false);
7
- const container = {
8
- positions: "relative",
9
- };
10
- const placeholderBox = {
11
- positions: "absolute left-5",
12
- styles: "duration-300",
13
- fonts: "leading-none text-gray-medium",
14
- animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
15
- };
16
- const inputBox = {
17
- sizes: "w-102.5 h-13.5 pl-5 pt-3",
18
- fonts: "text-sm",
19
- background: flag === true
20
- ? "bg-green-dark/10"
21
- : flag === false
22
- ? "bg-crimson-burgundy/10 text-crimson-burgundy"
23
- : "bg-gray-light",
24
- styles: "bg-gray-light rounded-md outline-none",
25
- animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
26
- };
27
- 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" })] }));
28
- }
29
- function WithTitle({ title, placeholder, state, flag, type, }) {
30
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input, { placeholder: placeholder, state: state, flag: flag, type: type })] }));
31
- }
32
- Input.WithTitle = WithTitle;
33
- export default Input;
@@ -1 +0,0 @@
1
- export * from "./Navigation";
@@ -1 +0,0 @@
1
- export * from "./Navigation";
@@ -1,2 +0,0 @@
1
- import { OverlayProps } from "../../interface";
2
- export default function OverlayDesign({ titles, children, event, isVisible, }: OverlayProps): JSX.Element;
File without changes
File without changes