@edu-tosel/design 1.0.60 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/asset/svg/Operation.js +1 -1
  2. package/asset/svg/Operation.tsx +3 -3
  3. package/board/design/Board.design.d.ts +1 -1
  4. package/board/design/Board.design.js +5 -5
  5. package/board/design/Header.design.d.ts +1 -1
  6. package/board/design/Header.design.js +6 -6
  7. package/board/template/CanvasBoard.d.ts +1 -1
  8. package/board/template/CanvasBoard.js +3 -3
  9. package/board/template/ManageBoard.d.ts +1 -1
  10. package/board/template/ManageBoard.js +5 -5
  11. package/board/template/PaperBoard.d.ts +1 -1
  12. package/board/template/PaperBoard.js +3 -3
  13. package/card/design/Card.design.d.ts +1 -1
  14. package/card/design/Card.design.js +8 -6
  15. package/card/design/InfoCard.design.d.ts +1 -1
  16. package/card/design/InfoCard.design.js +3 -3
  17. package/card/design/NavCard.design.d.ts +1 -1
  18. package/card/design/NavCard.design.js +3 -3
  19. package/card/design/RollCard.design.js +2 -2
  20. package/card/design/TableCard.design.d.ts +1 -1
  21. package/card/design/TableCard.design.js +7 -7
  22. package/card/index.d.ts +1 -0
  23. package/card/index.js +1 -0
  24. package/card/template/AddCard.d.ts +1 -1
  25. package/card/template/AddCard.js +3 -3
  26. package/card/template/ChartCard.d.ts +1 -1
  27. package/card/template/ChartCard.js +3 -3
  28. package/card/template/ConfirmCard/index.d.ts +9 -0
  29. package/card/template/ConfirmCard/index.js +19 -0
  30. package/card/template/InfoCard/Academy.js +4 -4
  31. package/card/template/InfoCard/Exam.d.ts +1 -1
  32. package/card/template/InfoCard/Exam.js +4 -4
  33. package/card/template/InfoCard/ExamData.js +2 -2
  34. package/card/template/InfoCard/Finance.js +1 -1
  35. package/card/template/InfoCard/Grade.js +2 -2
  36. package/card/template/InfoCard/Item.js +1 -1
  37. package/card/template/InfoCard/PersonalInformation.js +2 -2
  38. package/card/template/InfoCard/Product.js +2 -2
  39. package/card/template/InfoCard/Student.js +2 -2
  40. package/card/template/NavCard.d.ts +3 -3
  41. package/card/template/NavCard.js +14 -14
  42. package/card/template/ProgressCard/Large.d.ts +2 -0
  43. package/card/template/{ProgressCard.js → ProgressCard/Large.js} +6 -6
  44. package/card/template/ProgressCard/Small.d.ts +2 -0
  45. package/card/template/ProgressCard/Small.js +34 -0
  46. package/card/template/ProgressCard/index.d.ts +7 -0
  47. package/card/template/ProgressCard/index.js +7 -0
  48. package/card/template/TableCard.js +4 -3
  49. package/globals.css +4 -3
  50. package/interface/Action.d.ts +11 -17
  51. package/interface/Board.d.ts +13 -14
  52. package/interface/Card.d.ts +13 -7
  53. package/interface/Color.d.ts +3 -0
  54. package/interface/Color.js +7 -0
  55. package/interface/Layout.d.ts +6 -5
  56. package/interface/Modal.d.ts +5 -4
  57. package/interface/Overlay.d.ts +3 -3
  58. package/interface/Property.d.ts +5 -4
  59. package/interface/Shelf.d.ts +4 -4
  60. package/interface/index.d.ts +2 -2
  61. package/interface/index.js +2 -2
  62. package/interface/widget/Carousel.d.ts +2 -2
  63. package/interface/widget/Switch.d.ts +2 -2
  64. package/interface/widget/index.d.ts +55 -0
  65. package/interface/widget/index.js +7 -0
  66. package/layout/design/DataField.design.d.ts +1 -1
  67. package/layout/design/DataField.design.js +7 -3
  68. package/layout/design/Row.design.d.ts +1 -1
  69. package/layout/design/Row.design.js +10 -9
  70. package/layout/design/Shelf.design.d.ts +1 -1
  71. package/layout/design/Shelf.design.js +2 -2
  72. package/layout/index.d.ts +1 -1
  73. package/layout/index.js +1 -1
  74. package/layout/template/Action.d.ts +10 -1
  75. package/layout/template/DataField.js +5 -2
  76. package/layout/template/Gallery.d.ts +4 -4
  77. package/layout/template/Gallery.js +3 -3
  78. package/layout/template/Promotion.d.ts +1 -1
  79. package/layout/template/Promotion.js +1 -1
  80. package/layout/template/Row.d.ts +3 -3
  81. package/layout/template/Row.js +8 -8
  82. package/layout/template/Shelf.d.ts +1 -1
  83. package/layout/template/Shelf.js +6 -6
  84. package/layout/template/Sign.d.ts +5 -5
  85. package/layout/template/Sign.js +5 -5
  86. package/layout/template/Tab.d.ts +2 -2
  87. package/layout/template/Tab.js +4 -4
  88. package/layout/{widget → template}/dashboard/Header.d.ts +1 -1
  89. package/layout/{widget → template}/dashboard/Header.js +3 -3
  90. package/layout/{widget → template}/dashboard/Layout.d.ts +1 -1
  91. package/layout/{widget → template}/dashboard/Layout.js +5 -5
  92. package/layout/{widget → template}/dashboard/Menu.js +2 -2
  93. package/layout/template/dashboard/Navigation.d.ts +7 -0
  94. package/layout/{widget → template}/dashboard/Navigation.js +5 -1
  95. package/layout/{widget → template}/dashboard/Notification.js +1 -1
  96. package/layout/template/dashboard/index.d.ts +28 -0
  97. package/layout/template/dashboard/index.js +18 -0
  98. package/layout/{widget → template}/dashboard/mypage/Layout.d.ts +1 -1
  99. package/layout/{widget → template}/dashboard/mypage/Layout.js +5 -5
  100. package/layout/{widget → template}/dashboard/mypage/Navigate.js +2 -2
  101. package/layout/{widget → template}/dashboard/mypage/Profile.js +4 -4
  102. package/layout/template/dashboard/style.d.ts +10 -0
  103. package/layout/template/dashboard/style.js +16 -0
  104. package/layout/template/home/Notice.d.ts +2 -2
  105. package/layout/template/home/Notice.js +2 -2
  106. package/layout/template/home/Promotion.d.ts +3 -3
  107. package/layout/template/home/Promotion.js +4 -4
  108. package/layout/template/home/Service.d.ts +1 -1
  109. package/layout/template/home/Service.js +2 -2
  110. package/layout/template/home/layout/Carousel.js +2 -2
  111. package/layout/{widget → template}/sign/WithTitle.d.ts +2 -2
  112. package/layout/{widget → template}/sign/WithTitle.js +1 -1
  113. package/modal/design/ConfirmModal.design.d.ts +1 -1
  114. package/modal/design/ConfirmModal.design.js +3 -3
  115. package/modal/design/Modal.design.d.ts +1 -1
  116. package/modal/design/Modal.design.js +3 -6
  117. package/modal/template/Alert.d.ts +1 -1
  118. package/modal/template/Alert.js +3 -3
  119. package/modal/template/Confirm/Alert.js +1 -1
  120. package/modal/template/Confirm/Confirm.js +1 -1
  121. package/modal/template/Confirm/Input.d.ts +2 -2
  122. package/modal/template/Confirm/Input.js +1 -1
  123. package/modal/template/Confirm/Tag.d.ts +1 -1
  124. package/modal/template/Confirm/Tag.js +2 -2
  125. package/modal/template/Input.d.ts +1 -1
  126. package/modal/template/Input.js +3 -3
  127. package/modal/template/Postcode.js +1 -1
  128. package/overlay/design/Overlay.design.js +1 -1
  129. package/overlay/template/Manage.js +5 -5
  130. package/package.json +1 -1
  131. package/tailwind.config.ts +1 -0
  132. package/version.txt +1 -1
  133. package/widget/design/Label.design.d.ts +2 -2
  134. package/widget/design/Label.design.js +3 -3
  135. package/widget/index.d.ts +3 -2
  136. package/widget/index.js +3 -2
  137. package/widget/template/CheckBox.d.ts +2 -0
  138. package/widget/{CheckBox.js → template/CheckBox.js} +2 -2
  139. package/widget/template/DatePicker.d.ts +3 -0
  140. package/widget/{DatePicker.js → template/DatePicker.js} +2 -2
  141. package/widget/template/EmailInput.d.ts +2 -0
  142. package/widget/{EmailInput.js → template/EmailInput.js} +4 -4
  143. package/widget/template/Input/Form.d.ts +2 -0
  144. package/widget/template/Input/Form.js +44 -0
  145. package/widget/template/Input/index.d.ts +6 -0
  146. package/widget/template/Input/index.js +34 -0
  147. package/widget/template/Label.d.ts +3 -3
  148. package/widget/template/Label.js +7 -7
  149. package/widget/{Obstacle.d.ts → template/Obstacle.d.ts} +1 -1
  150. package/widget/{Obstacle.js → template/Obstacle.js} +1 -1
  151. package/widget/template/Select/Select.LG.d.ts +2 -2
  152. package/widget/template/Select/Select.LG.js +3 -3
  153. package/widget/template/Select/Select.d.ts +2 -2
  154. package/widget/template/Select/Select.js +3 -3
  155. package/widget/template/Switch/Handle.d.ts +1 -1
  156. package/widget/template/Switch/Handle.js +2 -2
  157. package/widget/template/Switch/Switch.d.ts +2 -2
  158. package/widget/template/Switch/Switch.js +2 -2
  159. package/widget/template/Toggle.d.ts +6 -0
  160. package/widget/{Toggle.js → template/Toggle.js} +3 -3
  161. package/card/template/ProgressCard.d.ts +0 -10
  162. package/interface/HTMLElement.d.ts +0 -56
  163. package/interface/HTMLElement.js +0 -7
  164. package/layout/template/Dashboard.d.ts +0 -22
  165. package/layout/template/Dashboard.js +0 -13
  166. package/layout/widget/dashboard/Navigation.d.ts +0 -3
  167. package/widget/CheckBox.d.ts +0 -2
  168. package/widget/DatePicker.d.ts +0 -3
  169. package/widget/EmailInput.d.ts +0 -2
  170. package/widget/Toggle.d.ts +0 -6
  171. package/widget/design/Tag.design.d.ts +0 -0
  172. package/widget/design/Tag.design.js +0 -1
  173. package/widget/template/Input.d.ts +0 -6
  174. package/widget/template/Input.js +0 -68
  175. /package/layout/{widget → template}/dashboard/Menu.d.ts +0 -0
  176. /package/layout/{widget → template}/dashboard/Notification.d.ts +0 -0
  177. /package/layout/{widget → template}/dashboard/buttonClassNames.d.ts +0 -0
  178. /package/layout/{widget → template}/dashboard/buttonClassNames.js +0 -0
  179. /package/layout/{widget → template}/dashboard/mypage/Navigate.d.ts +0 -0
  180. /package/layout/{widget → template}/dashboard/mypage/Profile.d.ts +0 -0
  181. /package/layout/{widget → template}/promotion/Layout.d.ts +0 -0
  182. /package/layout/{widget → template}/promotion/Layout.js +0 -0
  183. /package/layout/{widget → template}/promotion/Thumbnail.d.ts +0 -0
  184. /package/layout/{widget → template}/promotion/Thumbnail.js +0 -0
  185. /package/layout/{widget → template}/sign/Box.d.ts +0 -0
  186. /package/layout/{widget → template}/sign/Box.js +0 -0
  187. /package/layout/{widget → template}/sign/Button.d.ts +0 -0
  188. /package/layout/{widget → template}/sign/Button.js +0 -0
  189. /package/layout/{widget → template}/sign/Check.d.ts +0 -0
  190. /package/layout/{widget → template}/sign/Check.js +0 -0
  191. /package/layout/{widget → template}/sign/Layout.d.ts +0 -0
  192. /package/layout/{widget → template}/sign/Layout.js +0 -0
@@ -0,0 +1,34 @@
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
+ import Form from "./Form";
6
+ const widthSize = {
7
+ xs: "w-28",
8
+ sm: "w-48",
9
+ md: "w-64",
10
+ lg: "w-96",
11
+ xl: "w-128",
12
+ "2xl": "w-144",
13
+ full: "w-full",
14
+ };
15
+ function Input({ state, onKeyDown, placeholder, option }) {
16
+ const { width, disabled } = option ?? {};
17
+ const [value, setValue] = state;
18
+ const id = useId();
19
+ const container = {
20
+ positions: "relative",
21
+ width: `${widthSize[width ?? "xs"]} h-8`,
22
+ displays: "flex items-center",
23
+ };
24
+ const body = {
25
+ styles: "rounded-md bg-slate-200 text-xs",
26
+ sizes: "w-full h-full",
27
+ paddings: "pl-4",
28
+ pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
29
+ effect: `transition-all`,
30
+ };
31
+ 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 })] }));
32
+ }
33
+ Input.Form = Form;
34
+ export default Input;
@@ -1,7 +1,7 @@
1
- import { HTMLLabelElement } from "../../interface";
2
- declare function Label({ title, options }: Omit<HTMLLabelElement, "onClick">): import("react/jsx-runtime").JSX.Element;
1
+ import { LabelWidget } from "../../interface";
2
+ declare function Label({ title, option }: Omit<LabelWidget, "onClick">): import("react/jsx-runtime").JSX.Element;
3
3
  declare namespace Label {
4
- var Button: ({ title, hoverTitle, onClick, options, }: Omit<HTMLLabelElement, "hoverState"> & {
4
+ var Button: ({ title, hoverTitle, onClick, option, }: Omit<LabelWidget, "hoverState"> & {
5
5
  hoverTitle?: string | undefined;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
7
7
  }
@@ -1,16 +1,16 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import LabelDesign from "../design/Label.design";
4
- function Label({ title, options }) {
4
+ function Label({ title, option }) {
5
5
  const [hover, setHover] = useState(false);
6
- return (_jsx(LabelDesign, { title: title, hoverState: [hover, setHover], options: { ...options, width: "sm", height: "xs" } }));
6
+ return (_jsx(LabelDesign, { title: title, hoverState: [hover, setHover], option: { ...option, width: "sm", height: "xs" } }));
7
7
  }
8
- function Button({ title, hoverTitle, onClick, options, }) {
8
+ function Button({ title, hoverTitle, onClick, option, }) {
9
9
  const [hover, setHover] = useState(false);
10
- return (_jsx(LabelDesign, { title: hoverTitle ? (!hover ? title : hoverTitle) : title, onClick: onClick, hoverState: [hover, setHover], options: {
11
- ...options,
12
- width: options?.width ?? "md",
13
- height: options?.height ?? "sm",
10
+ return (_jsx(LabelDesign, { title: hoverTitle ? (!hover ? title : hoverTitle) : title, onClick: onClick, hoverState: [hover, setHover], option: {
11
+ ...option,
12
+ width: option?.width ?? "md",
13
+ height: option?.height ?? "sm",
14
14
  } }));
15
15
  }
16
16
  Label.Button = Button;
@@ -1,4 +1,4 @@
1
- import { Disabled } from "../interface";
1
+ import { Disabled } from "../../interface";
2
2
  export default function Obstacle({ disabled }: {
3
3
  disabled?: Disabled;
4
4
  }): false | import("react/jsx-runtime").JSX.Element | undefined;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../util";
2
+ import { cn } from "../../util";
3
3
  export default function Obstacle({ disabled }) {
4
4
  const obstacle = {
5
5
  positions: "absolute",
@@ -1,2 +1,2 @@
1
- import { HTMLSelectElement } from "../../../interface";
2
- export default function SelectLG<T>({ state, selectOptions, placeholder, options, }: HTMLSelectElement<T>): import("react/jsx-runtime").JSX.Element;
1
+ import { SelectWidget } from "../../../interface";
2
+ export default function SelectLG<T>({ state, selectOptions, placeholder, option, }: SelectWidget<T>): import("react/jsx-runtime").JSX.Element;
@@ -14,7 +14,7 @@ const heightSize = {
14
14
  xs: "h-6.5",
15
15
  sm: "h-9",
16
16
  };
17
- export default function SelectLG({ state, selectOptions, placeholder, options, }) {
17
+ export default function SelectLG({ state, selectOptions, placeholder, option, }) {
18
18
  const id = useId();
19
19
  const { setIsOwn, setIsOwnId } = useActionStore();
20
20
  const [value, setValue] = state;
@@ -58,7 +58,7 @@ export default function SelectLG({ state, selectOptions, placeholder, options, }
58
58
  };
59
59
  const button = {
60
60
  displays: "flex items-center",
61
- sizes: `${widthSize[options?.width ?? "md"]} ${heightSize[options?.height ?? "sm"]}`,
61
+ sizes: `${widthSize[option?.width ?? "md"]} ${heightSize[option?.height ?? "sm"]}`,
62
62
  styles: "pl-1 rounded-md focus:outline-none duration-100 text-gray-400",
63
63
  shadow: isOpen || isHover ? "box-shadow" : "shadow-none",
64
64
  };
@@ -70,7 +70,7 @@ export default function SelectLG({ state, selectOptions, placeholder, options, }
70
70
  const body = {
71
71
  positions: "absolute z-30",
72
72
  displays: "flex flex-col gap-1",
73
- sizes: `${widthSize[options?.width ?? "md"]} min-h-6.5 max-h-40`,
73
+ sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-40`,
74
74
  paddings: "p-2",
75
75
  styles: "bg-white box-shadow rounded-md box-shadow overflow-y-scroll",
76
76
  };
@@ -1,2 +1,2 @@
1
- import { HTMLSelectElement } from "../../../interface";
2
- export default function Select<T>({ state, selectOptions, placeholder, options, }: HTMLSelectElement<T>): import("react/jsx-runtime").JSX.Element;
1
+ import { SelectWidget } from "../../../interface";
2
+ export default function Select<T>({ state, selectOptions, placeholder, option, }: SelectWidget<T>): import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,7 @@ const widthSize = {
13
13
  const heightSize = {
14
14
  xs: "h-6.5",
15
15
  };
16
- export default function Select({ state, selectOptions, placeholder, options, }) {
16
+ export default function Select({ state, selectOptions, placeholder, option, }) {
17
17
  const id = useId();
18
18
  const { setIsOwn, setIsOwnId } = useActionStore();
19
19
  const [value, setValue] = state;
@@ -56,7 +56,7 @@ export default function Select({ state, selectOptions, placeholder, options, })
56
56
  };
57
57
  const button = {
58
58
  displays: "flex items-center",
59
- sizes: `${widthSize[options?.width ?? "md"]} ${heightSize[options?.height ?? "xs"]}`,
59
+ sizes: `${widthSize[option?.width ?? "md"]} ${heightSize[option?.height ?? "xs"]}`,
60
60
  styles: "pl-1 rounded-md focus:outline-none duration-100 text-gray-400",
61
61
  shadow: isOpen || isHover ? "box-shadow" : "shadow-none",
62
62
  };
@@ -68,7 +68,7 @@ export default function Select({ state, selectOptions, placeholder, options, })
68
68
  const body = {
69
69
  positions: "absolute z-30",
70
70
  displays: "flex flex-col gap-1",
71
- sizes: `${widthSize[options?.width ?? "md"]} min-h-6.5 max-h-23.75`,
71
+ sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-23.75`,
72
72
  paddings: "pl-1 py-1",
73
73
  styles: "bg-white box-shadow rounded-md box-shadow overflow-y-scroll",
74
74
  };
@@ -1,2 +1,2 @@
1
1
  import { SwitchProps } from "../../../interface";
2
- export default function Handle<T>({ state, values, options, }: Omit<SwitchProps<T>, "display">): import("react/jsx-runtime").JSX.Element;
2
+ export default function Handle<T>({ state, values, option, }: Omit<SwitchProps<T>, "display">): 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, gradient } from "../../../util";
3
- export default function Handle({ state, values, options, }) {
4
- const { className } = options ?? {};
3
+ export default function Handle({ state, values, option, }) {
4
+ const { className } = option ?? {};
5
5
  const valueIndex = values?.indexOf(state?.[0]);
6
6
  const container = {
7
7
  positions: "relative",
@@ -1,3 +1,3 @@
1
- import { SwitchProps } from "../../../interface/widget";
2
- declare function Switch<T>({ state, values, display, options }: SwitchProps<T>): import("react/jsx-runtime").JSX.Element;
1
+ import { SwitchProps } from "../../../interface";
2
+ declare function Switch<T>({ state, values, display, option }: SwitchProps<T>): import("react/jsx-runtime").JSX.Element;
3
3
  export default Switch;
@@ -20,8 +20,8 @@ const textSize = {
20
20
  md: "text-sm",
21
21
  lg: "text-base",
22
22
  };
23
- function Switch({ state, values, display, options }) {
24
- const { text, size, className } = options ?? {};
23
+ function Switch({ state, values, display, option }) {
24
+ const { text, size, className } = option ?? {};
25
25
  const container = {
26
26
  displays: `flex ${gapSize[size ?? "md"]}`,
27
27
  paddings: paddingSize[size ?? "md"],
@@ -0,0 +1,6 @@
1
+ import { Widget, State } from "../../interface";
2
+ export interface HTMLToggleElement extends Widget {
3
+ state: State<boolean>;
4
+ labels?: [[true, string], [false, string]];
5
+ }
6
+ export default function Toggle({ state: [chekced, setChecked], labels, option, }: HTMLToggleElement): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../util";
3
- export default function Toggle({ state: [chekced, setChecked], labels, options, }) {
4
- const { disabled, className } = options ?? {};
2
+ import { cn } from "../../util";
3
+ export default function Toggle({ state: [chekced, setChecked], labels, option, }) {
4
+ const { disabled, className } = option ?? {};
5
5
  const container = {
6
6
  displays: "flex items-center",
7
7
  sizes: "h-6",
@@ -1,10 +0,0 @@
1
- import { Titles } from "../../interface";
2
- import { Theme } from "../../interface";
3
- type Step = [string, boolean];
4
- interface ProgressCardProps {
5
- titles: Titles;
6
- steps: Step[];
7
- theme?: Theme;
8
- }
9
- export default function ProgressCard({ titles, steps, theme, }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,56 +0,0 @@
1
- import { Disabled, OnClick, Size, State } from "./Property";
2
- export declare const HTMLElementType: {
3
- readonly TEXT: "text";
4
- readonly BUTTON: "button";
5
- readonly INPUT: "input";
6
- readonly SELECT: "select";
7
- readonly TOGGLE: "toggle";
8
- };
9
- export type HTMLElementType = (typeof HTMLElementType)[keyof typeof HTMLElementType];
10
- export interface HTMLElement {
11
- options?: {
12
- className?: string;
13
- width?: Size;
14
- height?: Size;
15
- background?: string;
16
- text?: string;
17
- disabled?: Disabled;
18
- rounded?: string;
19
- };
20
- }
21
- export interface HTMLLabelElement extends HTMLElement {
22
- title: string;
23
- hoverState?: State<boolean>;
24
- onClick?: OnClick;
25
- }
26
- export type SelectOption<T> = [T, string];
27
- export interface HTMLSelectElement<T> extends HTMLElement {
28
- state: State<T>;
29
- selectOptions?: SelectOption<T>[];
30
- placeholder?: string;
31
- }
32
- type HTMLInputType = "text" | "password" | "date" | "email" | "phone" | "number";
33
- export interface HTMLInput extends HTMLElement {
34
- state: State<string> | State<string | undefined>;
35
- onKeyDown?: (e: React.KeyboardEvent) => void;
36
- placeholder?: string;
37
- flag?: boolean;
38
- type?: HTMLInputType;
39
- label?: HTMLLabelElement;
40
- }
41
- export type ColorType = "red" | "blue" | "green";
42
- export interface HTMLCheckBoxElement extends HTMLElement {
43
- state: State<boolean>;
44
- labels: string;
45
- color: ColorType;
46
- }
47
- export interface HTMLElementFrame {
48
- title: string;
49
- type: HTMLElementType;
50
- state: State<any>;
51
- selectOptions?: SelectOption<string | number>[];
52
- labels?: [string | boolean, string][];
53
- disabled?: Disabled;
54
- onClick?: OnClick;
55
- }
56
- export {};
@@ -1,7 +0,0 @@
1
- export const HTMLElementType = {
2
- TEXT: "text",
3
- BUTTON: "button",
4
- INPUT: "input",
5
- SELECT: "select",
6
- TOGGLE: "toggle",
7
- };
@@ -1,22 +0,0 @@
1
- import Layout from "../widget/dashboard/Layout";
2
- import MyPageLayout from "../widget/dashboard/mypage/Layout";
3
- import Profile from "../widget/dashboard/mypage/Profile";
4
- declare const Dashboard: {
5
- Layout: typeof Layout;
6
- };
7
- declare const MyPage: {
8
- Layout: typeof MyPageLayout;
9
- Card: {
10
- Profile: typeof Profile;
11
- Navigate: {
12
- Academy: ({ onClick }: {
13
- onClick: import("../../interface").OnClick;
14
- }) => import("react/jsx-runtime").JSX.Element;
15
- Payment: ({ onClick }: {
16
- onClick: import("../../interface").OnClick;
17
- }) => import("react/jsx-runtime").JSX.Element;
18
- };
19
- };
20
- };
21
- export { default as buttonClassNames } from "./../widget/dashboard/buttonClassNames";
22
- export { Dashboard, MyPage };
@@ -1,13 +0,0 @@
1
- import Layout from "../widget/dashboard/Layout";
2
- import MyPageLayout from "../widget/dashboard/mypage/Layout";
3
- import Navigate from "../widget/dashboard/mypage/Navigate";
4
- import Profile from "../widget/dashboard/mypage/Profile";
5
- const Dashboard = {
6
- Layout,
7
- };
8
- const MyPage = {
9
- Layout: MyPageLayout,
10
- Card: { Profile, Navigate },
11
- };
12
- export { default as buttonClassNames } from "./../widget/dashboard/buttonClassNames";
13
- export { Dashboard, MyPage };
@@ -1,3 +0,0 @@
1
- export declare function NavigationContainer({ children, }: {
2
- children: React.ReactNode;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { HTMLCheckBoxElement } from "../interface";
2
- export default function Checkbox({ state: [checked, setChecked], labels, options, color, }: HTMLCheckBoxElement): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { HTMLInput } from "../interface";
2
- import "react-datepicker/dist/react-datepicker.css";
3
- export default function DatePicker({ options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { HTMLInput } from "../interface";
2
- export default function EmailInput({ state, placeholder, options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { HTMLElement, State } from "../interface";
2
- export interface HTMLToggleElement extends HTMLElement {
3
- state: State<boolean>;
4
- labels?: [[true, string], [false, string]];
5
- }
6
- export default function Toggle({ state: [chekced, setChecked], labels, options, }: HTMLToggleElement): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,6 +0,0 @@
1
- import { HTMLInput } from "../../interface";
2
- declare function Input({ state, onKeyDown, placeholder, options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
3
- declare namespace Input {
4
- var LG: ({ state, placeholder, flag, type, label }: HTMLInput) => import("react/jsx-runtime").JSX.Element;
5
- }
6
- export default Input;
@@ -1,68 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId, useState, useRef } from "react";
3
- import { cn, gradient } from "../../util";
4
- import Obstacle from "../Obstacle";
5
- import Label from "./Label";
6
- const widthSize = {
7
- xs: "w-28",
8
- sm: "w-48",
9
- md: "w-64",
10
- lg: "w-96",
11
- xl: "w-128",
12
- "2xl": "w-144",
13
- full: "w-full",
14
- };
15
- function Input({ state, onKeyDown, placeholder, options }) {
16
- const { width, disabled } = options ?? {};
17
- const [value, setValue] = state;
18
- const id = useId();
19
- const container = {
20
- positions: "relative",
21
- width: `${widthSize[width ?? "xs"]} h-8`,
22
- displays: "flex items-center",
23
- };
24
- const body = {
25
- styles: "rounded-md bg-slate-200 text-xs",
26
- sizes: "w-full h-full",
27
- paddings: "pl-4",
28
- pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
29
- effect: `transition-all`,
30
- };
31
- 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 })] }));
32
- }
33
- function LG({ state, placeholder, flag, type, label }) {
34
- const [value, setValue] = state;
35
- const [onFocus, setOnFocus] = useState(false);
36
- const ref = useRef(null);
37
- const container = {
38
- positions: "relative",
39
- };
40
- const placeholderBox = {
41
- positions: "absolute left-5",
42
- styles: "duration-300",
43
- fonts: "leading-none text-gray-medium",
44
- animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
45
- };
46
- const inputBox = {
47
- sizes: "w-102.5 h-13.5",
48
- paddings: `${placeholder && "pt-3"} pl-5`,
49
- fonts: "text-sm",
50
- background: flag === true
51
- ? "bg-green-dark/10"
52
- : flag === false
53
- ? "bg-crimson-burgundy/10 text-crimson-burgundy"
54
- : "bg-gray-light",
55
- styles: "bg-gray-light rounded-md outline-none",
56
- animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
57
- };
58
- return (_jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children: placeholder }), _jsx("input", { ref: ref, className: cn(inputBox), value: value, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => setValue(e.target.value), type: type ?? "text" }), label && (_jsx(Label.Button, { title: label.title, onClick: label.onClick, options: {
59
- width: "sm",
60
- height: "xs",
61
- className: "absolute top-3.5 right-3.75",
62
- background: label.options?.background ?? gradient.bg.greenToRed,
63
- text: label.options?.text ?? "text-white",
64
- ...label.options,
65
- } }))] }));
66
- }
67
- Input.LG = LG;
68
- export default Input;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes