@edu-tosel/design 1.0.45 → 1.0.47

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 (155) hide show
  1. package/README.md +42 -42
  2. package/asset/SVG.d.ts +5 -0
  3. package/asset/SVG.js +2 -0
  4. package/asset/SVG.tsx +23 -21
  5. package/asset/svg/Close.tsx +32 -32
  6. package/asset/svg/Direction.tsx +36 -36
  7. package/asset/svg/Email.tsx +20 -20
  8. package/asset/svg/Image.tsx +24 -24
  9. package/asset/svg/Notification.tsx +34 -34
  10. package/asset/svg/Operation.d.ts +11 -0
  11. package/asset/svg/Operation.js +16 -0
  12. package/asset/svg/Operation.tsx +66 -0
  13. package/asset/svg/Phone.tsx +20 -20
  14. package/asset/svg/Profile.tsx +27 -27
  15. package/asset/svg/TOSEL.tsx +63 -63
  16. package/board/design/Board.design.d.ts +1 -1
  17. package/board/design/Board.design.js +4 -4
  18. package/board/template/CanvasBoard.d.ts +1 -1
  19. package/board/template/CanvasBoard.js +3 -3
  20. package/board/template/ManageBoard.d.ts +1 -1
  21. package/board/template/ManageBoard.js +6 -6
  22. package/board/widget/Header.js +1 -1
  23. package/card/design/Card.design.js +4 -3
  24. package/card/design/NavCard.design.js +1 -1
  25. package/card/design/RollCard.design.d.ts +2 -0
  26. package/card/design/RollCard.design.js +13 -0
  27. package/card/design/TableCard.design.js +9 -8
  28. package/card/index.d.ts +1 -0
  29. package/card/index.js +1 -0
  30. package/card/template/InfoCard/Academy.js +1 -1
  31. package/card/template/InfoCard/Exam.js +1 -1
  32. package/card/template/InfoCard/ExamData.js +3 -3
  33. package/card/template/InfoCard/Finance.js +1 -1
  34. package/card/template/InfoCard/Grade.js +1 -1
  35. package/card/template/InfoCard/Student.js +1 -1
  36. package/card/template/RollCard.d.ts +2 -0
  37. package/card/template/RollCard.js +5 -0
  38. package/globals.css +226 -226
  39. package/hook/useFlag.js +2 -2
  40. package/index.d.ts +1 -1
  41. package/index.js +1 -1
  42. package/interaction/template/Loading.d.ts +3 -3
  43. package/interaction/template/Loading.js +3 -3
  44. package/interaction/template/NoData.js +2 -2
  45. package/interface/{Widget.d.ts → Action.d.ts} +3 -3
  46. package/interface/Board.d.ts +2 -2
  47. package/interface/Card.d.ts +9 -2
  48. package/interface/HTMLElement.d.ts +0 -4
  49. package/interface/Layout.d.ts +3 -3
  50. package/interface/Modal.d.ts +5 -2
  51. package/interface/Overlay.d.ts +2 -2
  52. package/interface/Property.d.ts +4 -4
  53. package/interface/Shelf.d.ts +2 -2
  54. package/interface/UtilityType.d.ts +2 -0
  55. package/interface/UtilityType.js +1 -0
  56. package/interface/index.d.ts +2 -1
  57. package/interface/index.js +2 -1
  58. package/interface/widget/Switch.d.ts +19 -0
  59. package/interface/widget/Switch.js +1 -0
  60. package/interface/widget/index.d.ts +1 -0
  61. package/interface/widget/index.js +1 -0
  62. package/layout/design/DataField.design.js +2 -2
  63. package/layout/design/Row.design.js +1 -1
  64. package/layout/index.d.ts +2 -1
  65. package/layout/index.js +2 -1
  66. package/layout/template/Action.d.ts +8 -0
  67. package/layout/template/{Events.js → Action.js} +12 -12
  68. package/layout/template/Gallery.d.ts +2 -2
  69. package/layout/template/Gallery.js +11 -4
  70. package/layout/template/Shelf.js +3 -1
  71. package/layout/template/Tab.d.ts +16 -0
  72. package/layout/template/Tab.js +37 -0
  73. package/layout/widget/dashboard/Header.js +5 -5
  74. package/layout/widget/dashboard/Layout.js +2 -2
  75. package/layout/widget/dashboard/Menu.d.ts +1 -1
  76. package/layout/widget/dashboard/Menu.js +5 -5
  77. package/layout/widget/dashboard/Notification.d.ts +1 -1
  78. package/layout/widget/dashboard/Notification.js +4 -4
  79. package/layout/widget/dashboard/buttonClassNames.js +2 -2
  80. package/layout/widget/dashboard/mypage/Layout.js +2 -2
  81. package/layout/widget/dashboard/mypage/Profile.js +1 -1
  82. package/layout/widget/sign/WithTitle.js +1 -1
  83. package/modal/design/ConfirmModal.design.d.ts +1 -1
  84. package/modal/design/ConfirmModal.design.js +3 -3
  85. package/modal/design/Modal.design.d.ts +1 -1
  86. package/modal/design/Modal.design.js +8 -7
  87. package/modal/template/Alert.d.ts +1 -1
  88. package/modal/template/Alert.js +2 -2
  89. package/modal/template/ConfirmModal/Input.js +1 -1
  90. package/modal/template/ConfirmModal/Switch.d.ts +11 -0
  91. package/modal/template/ConfirmModal/Switch.js +19 -0
  92. package/modal/template/ConfirmModal/Tag.d.ts +13 -0
  93. package/modal/template/ConfirmModal/Tag.js +19 -0
  94. package/modal/template/ConfirmModal/index.d.ts +2 -0
  95. package/modal/template/ConfirmModal/index.js +4 -0
  96. package/modal/template/Input.d.ts +1 -1
  97. package/modal/template/Input.js +2 -2
  98. package/overlay/design/Overlay.design.d.ts +1 -1
  99. package/overlay/design/Overlay.design.js +4 -4
  100. package/overlay/template/Info.d.ts +1 -1
  101. package/overlay/template/Info.js +2 -2
  102. package/overlay/template/Manage.d.ts +1 -1
  103. package/overlay/template/Manage.js +2 -2
  104. package/package.json +1 -1
  105. package/store/index.d.ts +4 -4
  106. package/store/index.js +1 -1
  107. package/tailwind.config.ts +605 -602
  108. package/util/select.d.ts +10 -0
  109. package/util/select.js +10 -0
  110. package/version.txt +1 -1
  111. package/{html/widget → widget}/CheckBox.d.ts +1 -1
  112. package/{html/widget → widget}/DatePicker.d.ts +1 -1
  113. package/{html/widget → widget}/EmailInput.d.ts +1 -1
  114. package/{html/widget → widget}/EmailInput.js +1 -1
  115. package/{html/widget → widget}/Obstacle.d.ts +1 -1
  116. package/{html/widget → widget}/Obstacle.js +1 -1
  117. package/widget/Toggle.d.ts +6 -0
  118. package/{html/widget → widget}/Toggle.js +1 -10
  119. package/{html → widget}/design/Label.design.js +1 -1
  120. package/{html → widget}/design/Select.design.js +2 -2
  121. package/widget/design/Tag.design.d.ts +0 -0
  122. package/widget/design/Tag.design.js +1 -0
  123. package/{html → widget}/index.d.ts +3 -2
  124. package/{html → widget}/index.js +3 -2
  125. package/{html → widget}/template/Input.js +1 -1
  126. package/widget/template/Switch/Handle.d.ts +2 -0
  127. package/widget/template/Switch/Handle.js +26 -0
  128. package/widget/template/Switch/Switch.d.ts +3 -0
  129. package/widget/template/Switch/Switch.js +44 -0
  130. package/widget/template/Switch/index.d.ts +6 -0
  131. package/widget/template/Switch/index.js +4 -0
  132. package/html/widget/Toggle.d.ts +0 -2
  133. package/layout/design/Tab.design.d.ts +0 -5
  134. package/layout/design/Tab.design.js +0 -22
  135. package/layout/template/Events.d.ts +0 -8
  136. /package/interaction/{widget → design}/Jumper.design.d.ts +0 -0
  137. /package/interaction/{widget → design}/Jumper.design.js +0 -0
  138. /package/interaction/{widget → design}/Script.design.d.ts +0 -0
  139. /package/interaction/{widget → design}/Script.design.js +0 -0
  140. /package/interaction/{widget → design}/Sign.design.d.ts +0 -0
  141. /package/interaction/{widget → design}/Sign.design.js +0 -0
  142. /package/interaction/{widget → design}/Spinner.design.d.ts +0 -0
  143. /package/interaction/{widget → design}/Spinner.design.js +0 -0
  144. /package/interaction/{widget → design}/Worm.design.d.ts +0 -0
  145. /package/interaction/{widget → design}/Worm.design.js +0 -0
  146. /package/interface/{Widget.js → Action.js} +0 -0
  147. /package/{html/widget → widget}/CheckBox.js +0 -0
  148. /package/{html/widget → widget}/DatePicker.js +0 -0
  149. /package/{html → widget}/design/Label.design.d.ts +0 -0
  150. /package/{html → widget}/design/Select.design.d.ts +0 -0
  151. /package/{html → widget}/template/Input.d.ts +0 -0
  152. /package/{html → widget}/template/Label.d.ts +0 -0
  153. /package/{html → widget}/template/Label.js +0 -0
  154. /package/{html → widget}/template/Select.d.ts +0 -0
  155. /package/{html → widget}/template/Select.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
- import { Replace } from "./Widget";
2
+ import { Replace } from "./Action";
3
3
  import { HTMLLabelElement } from "./HTMLElement";
4
4
  /**
5
5
  * State type for the React component
@@ -27,7 +27,7 @@ export type State<T> = [T, StateAction<T>];
27
27
  * @property {"full"} full - Full size
28
28
  */
29
29
  export type ImageSize = "sub" | "full";
30
- export type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "auto";
30
+ export type Size = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "auto";
31
31
  /**
32
32
  * Image size type
33
33
  * @enum {string}
@@ -42,7 +42,7 @@ export interface Button extends HTMLLabelElement {
42
42
  export type FileRead = string | ArrayBuffer | null;
43
43
  export type Disabled = boolean | OnClick;
44
44
  export type Scripts = {
45
- script: string;
45
+ script?: string;
46
46
  subscript?: string | string[];
47
47
  };
48
48
  export type Titles = {
@@ -55,7 +55,7 @@ export type Titles = {
55
55
  };
56
56
  export type DataSet<T = any> = {
57
57
  items?: T[];
58
- renderItem: (item: T) => React.ReactNode;
58
+ renderItem: (item: T, index?: number) => React.ReactNode;
59
59
  titles?: Titles;
60
60
  interaction?: React.ReactNode;
61
61
  onClick?: OnClick<T>;
@@ -1,5 +1,5 @@
1
1
  import { Button, Titles } from "./Property";
2
- import { EventsProps } from "./Widget";
2
+ import { EventsProps } from "./Action";
3
3
  interface Options<T> {
4
4
  titleSize?: string;
5
5
  subtitleSize?: string;
@@ -11,7 +11,7 @@ interface Options<T> {
11
11
  }
12
12
  export interface ShelfProps<T> {
13
13
  children: React.ReactNode;
14
- widgets?: EventsProps & {
14
+ action?: EventsProps & {
15
15
  tabs?: Button[];
16
16
  };
17
17
  titles?: Titles;
@@ -0,0 +1,2 @@
1
+ type Flexify<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2
+ export type { Flexify };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,8 @@
1
+ export * from "./Action";
1
2
  export * from "./Card";
2
3
  export * from "./HTMLElement";
3
4
  export * from "./Layout";
4
5
  export * from "./Overlay";
5
6
  export * from "./Property";
6
7
  export * from "./Shelf";
7
- export * from "./Widget";
8
+ export * from "./widget";
@@ -1,7 +1,8 @@
1
+ export * from "./Action";
1
2
  export * from "./Card";
2
3
  export * from "./HTMLElement";
3
4
  export * from "./Layout";
4
5
  export * from "./Overlay";
5
6
  export * from "./Property";
6
7
  export * from "./Shelf";
7
- export * from "./Widget";
8
+ export * from "./widget";
@@ -0,0 +1,19 @@
1
+ import { Size, State } from "../Property";
2
+ interface Switch<T> {
3
+ state: State<T>;
4
+ values: T[];
5
+ }
6
+ export type Display = Record<string, {
7
+ title: string;
8
+ icon?: string;
9
+ }>;
10
+ interface Options {
11
+ size?: Size;
12
+ text?: string;
13
+ className?: string;
14
+ }
15
+ export interface SwitchProps<T> extends Switch<T> {
16
+ display?: Display;
17
+ options?: Options;
18
+ }
19
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Switch";
@@ -0,0 +1 @@
1
+ export * from "./Switch";
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { cn } from "../../util";
3
- import { useWidgetStore } from "../../store";
3
+ import { useActionStore } from "../../store";
4
4
  export default function DataFieldDesign({ id, dataField, options, }) {
5
- const { order, setOrder } = useWidgetStore();
5
+ const { order, setOrder } = useActionStore();
6
6
  const { padding, position } = options ?? {};
7
7
  const orders = order[id] ?? [];
8
8
  const container = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
3
  import { cn } from "../../util";
4
- import { Label } from "../../html";
4
+ import { Label } from "../../widget";
5
5
  export default function RowDesign({ item, dataField, options, onClick, buttons, }) {
6
6
  const { size, padding, text, noHover, className, isPointer } = options ?? {};
7
7
  const id = useId();
package/layout/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { default as Events } from "./template/Events";
1
+ export { default as Action } from "./template/Action";
2
2
  export * from "./template/Dashboard";
3
3
  export { default as Promotion } from "./template/Promotion";
4
4
  export { default as Sign } from "./template/Sign";
@@ -6,3 +6,4 @@ export { default as DataField } from "./template/DataField";
6
6
  export { default as Gallery } from "./template/Gallery";
7
7
  export { default as Row } from "./template/Row";
8
8
  export { default as Shelf } from "./template/Shelf";
9
+ export { default as Tab } from "./template/Tab";
package/layout/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { default as Events } from "./template/Events";
1
+ export { default as Action } from "./template/Action";
2
2
  export * from "./template/Dashboard";
3
3
  export { default as Promotion } from "./template/Promotion";
4
4
  export { default as Sign } from "./template/Sign";
@@ -6,3 +6,4 @@ export { default as DataField } from "./template/DataField";
6
6
  export { default as Gallery } from "./template/Gallery";
7
7
  export { default as Row } from "./template/Row";
8
8
  export { default as Shelf } from "./template/Shelf";
9
+ export { default as Tab } from "./template/Tab";
@@ -0,0 +1,8 @@
1
+ import { ReplaceProps, ShowProps } from "../../interface/Action";
2
+ declare function Show({ actions, children }: ShowProps): import("react/jsx-runtime").JSX.Element;
3
+ declare function Replace({ actions, children }: ReplaceProps): import("react/jsx-runtime").JSX.Element;
4
+ declare const Action: {
5
+ Show: typeof Show;
6
+ Replace: typeof Replace;
7
+ };
8
+ export default Action;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { Fragment } from "react";
3
- import { useWidgetStore } from "../../store";
4
- function Show({ widgets, children }) {
5
- const { events } = useWidgetStore();
6
- return (_jsxs(_Fragment, { children: [children, widgets?.map(([flag, Component], index) => {
3
+ import { useActionStore } from "../../store";
4
+ function Show({ actions, children }) {
5
+ const { events } = useActionStore();
6
+ return (_jsxs(_Fragment, { children: [children, actions?.map(([flag, Component], index) => {
7
7
  const isVisible = typeof flag === "boolean"
8
8
  ? flag
9
9
  : events?.some(({ event }) => event === flag);
@@ -14,7 +14,7 @@ function Show({ widgets, children }) {
14
14
  };
15
15
  if (React.isValidElement(Component)) {
16
16
  const ComponentWithVisibility = React.cloneElement(Component, {
17
- action: {
17
+ showAction: {
18
18
  event: event(),
19
19
  isVisible,
20
20
  },
@@ -24,12 +24,12 @@ function Show({ widgets, children }) {
24
24
  return null;
25
25
  })] }));
26
26
  }
27
- function Replace({ widgets, children }) {
28
- const { events } = useWidgetStore();
29
- if (!widgets)
27
+ function Replace({ actions, children }) {
28
+ const { events } = useActionStore();
29
+ if (!actions)
30
30
  return _jsx(_Fragment, { children: children });
31
- const trueComponents = widgets
32
- .filter(([widget]) => widget)
31
+ const trueComponents = actions
32
+ .filter(([action]) => action)
33
33
  .map(([flag, Component], index) => {
34
34
  if (typeof flag === "string") {
35
35
  return events?.some(({ event }) => event === flag) ? (_jsx(_Fragment, { children: Component })) : null;
@@ -39,8 +39,8 @@ function Replace({ widgets, children }) {
39
39
  .filter((component) => component !== null);
40
40
  return _jsx(_Fragment, { children: trueComponents.length > 0 ? trueComponents : children });
41
41
  }
42
- const Events = {
42
+ const Action = {
43
43
  Show,
44
44
  Replace,
45
45
  };
46
- export default Events;
46
+ export default Action;
@@ -1,6 +1,6 @@
1
1
  import { Button, EventsProps } from "../../interface";
2
- export default function Gallery({ widgets, children, options, }: {
3
- widgets?: EventsProps & {
2
+ export default function Gallery({ action, children, options, }: {
3
+ action: EventsProps & {
4
4
  tabs?: Button[];
5
5
  };
6
6
  children: React.ReactNode;
@@ -1,7 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Events from "./Events";
3
- import Tab from "../design/Tab.design";
4
- export default function Gallery({ widgets, children, options, }) {
2
+ import Action from "./Action";
3
+ import Tab from "./Tab";
4
+ import { cn } from "../../util";
5
+ export default function Gallery({ action, children, options, }) {
5
6
  const { tabTextColor } = options ?? {};
6
- return (_jsxs("div", { className: "relative w-full flex", children: [_jsx(Events.Replace, { widgets: widgets?.replaces, children: _jsx(Events.Show, { widgets: widgets?.shows, children: children }) }), widgets?.tabs && _jsx(Tab, { tabs: widgets?.tabs, textColor: tabTextColor })] }));
7
+ const tabBox = {
8
+ positions: "xl:absolute xl:-bottom-18 xl:left-0 z-5",
9
+ };
10
+ return (_jsxs("div", { className: "relative w-full flex", children: [_jsx(Action.Replace, { actions: action?.replaces, children: _jsx(Action.Show, { actions: action?.shows, children: children }) }), action?.tabs && (_jsx(Tab, { tabs: action?.tabs, options: {
11
+ className: cn(tabBox),
12
+ text: tabTextColor,
13
+ } }))] }));
7
14
  }
@@ -11,7 +11,9 @@ function Shelf({ titles, debug, children }) {
11
11
  const container = {
12
12
  displays: "inline-flex flex-col gap-12",
13
13
  };
14
- return (_jsx(ShelfDesign, { titles: titles, className: cn(container), debug: debug, children: children }));
14
+ return (_jsx(ShelfDesign, { titles: titles, className: cn(container), debug: debug, options: {
15
+ titleSize: "text-lg xl:text-2xl",
16
+ }, children: children }));
15
17
  }
16
18
  function Wrap({ className, titles, children, debug, options, }) {
17
19
  const container = {
@@ -0,0 +1,16 @@
1
+ import { Button, Size, State } from "../../interface";
2
+ interface Options {
3
+ background?: string;
4
+ text?: string;
5
+ className?: string;
6
+ width?: Size;
7
+ height?: Size;
8
+ }
9
+ export default function Tab({ tabs, options, state, }: {
10
+ tabs: (Button & {
11
+ isStatic?: boolean;
12
+ })[];
13
+ options?: Options;
14
+ state?: State<boolean[]>;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { cn } from "../../util";
4
+ const widthSize = {
5
+ md: "w-25",
6
+ lg: "w-32",
7
+ };
8
+ const heightSize = {
9
+ md: "h-7.5",
10
+ lg: "h-9",
11
+ };
12
+ export default function Tab({ tabs, options, state, }) {
13
+ const { className, background, text, width, height } = options ?? {};
14
+ const [tabsSelection, setTabsSelection] = state
15
+ ? state
16
+ : useState(tabs.map((_, i) => i === 0));
17
+ const container = {
18
+ className,
19
+ positions: "absolute",
20
+ displays: "hidden xl:flex xl:items-center xl:gap-2.5",
21
+ sizes: "w-auto",
22
+ paddings: "p-2.5",
23
+ backgrounds: background ?? "bg-white/30",
24
+ styles: "rounded-xl ",
25
+ };
26
+ const button = {
27
+ styles: "rounded-md duration-500 ",
28
+ sizes: `${heightSize[height ?? "lg"]} ${widthSize[width ?? "lg"]}`,
29
+ font: text ?? "text-green-dark",
30
+ };
31
+ return (_jsx("div", { className: cn(container), children: tabs.map(({ title, onClick, isStatic, options }, index) => (_jsx("button", { onClick: () => {
32
+ !isStatic &&
33
+ setTabsSelection(tabsSelection.map((_, i) => i === index));
34
+ return onClick && onClick();
35
+ }, className: cn(button, `${!isStatic && tabsSelection[index] && "bg-white rounded-2xl"}`, `${isStatic &&
36
+ `${options?.background ?? "bg-green-dark"} ${options?.text ?? "text-white"} `}`), children: title }, title))) }));
37
+ }
@@ -1,13 +1,13 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn, gradient } from "../../../util";
3
- import { useWidgetStore } from "../../../store";
3
+ import { useActionStore } from "../../../store";
4
4
  import Menu from "./Menu";
5
- import { Events } from "../..";
5
+ import { Action } from "../..";
6
6
  import Notification from "./Notification";
7
7
  import SVG from "../../../asset/SVG";
8
- import { Label } from "../../../html";
8
+ import { Label } from "../../../widget";
9
9
  export function Header({ title, logo, notification, menu, options, }) {
10
- const { setView, setIsOwn } = useWidgetStore();
10
+ const { setView, setIsOwn } = useActionStore();
11
11
  const { notifications, flag, onClick, color } = notification;
12
12
  const { text, background, className } = options ?? {};
13
13
  const container = {
@@ -19,7 +19,7 @@ export function Header({ title, logo, notification, menu, options, }) {
19
19
  styles: "px-5 xl:px-8 2xl:px-16 box-shadow",
20
20
  className,
21
21
  };
22
- return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex h-12 items-center gap-8 xl:gap-24 2xl:gap-26", children: [logo ? _jsx(_Fragment, { children: logo }) : _jsx("div", { className: "text-2xl", children: "TOSEL" }), _jsx("div", { className: "hidden lg:flex text-3xl font-pretendard-bold", children: title })] }), _jsx("div", { className: "relative flex gap-5.25", children: _jsxs(Events.Show, { widgets: [
22
+ return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex h-12 items-center gap-8 xl:gap-24 2xl:gap-26", children: [logo ? _jsx(_Fragment, { children: logo }) : _jsx("div", { className: "text-2xl", children: "TOSEL" }), _jsx("div", { className: "hidden lg:flex text-3xl font-pretendard-bold", children: title })] }), _jsx("div", { className: "relative flex gap-5.25", children: _jsxs(Action.Show, { actions: [
23
23
  ["notification", _jsx(Notification, { notifications: notifications })],
24
24
  [menu ? "menu" : false, menu && _jsx(Menu, { ...menu })],
25
25
  ], children: [_jsx(SVG.Notification, { flag: flag, onClick: () => {
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, useEffect } from "react";
3
3
  import { Header } from "./Header";
4
4
  import { cn } from "../../../util";
5
- import { useWidgetStore } from "../../../store";
5
+ import { useActionStore } from "../../../store";
6
6
  import { NavigationContainer } from "./Navigation";
7
7
  export default function Layout({ header, navigations, children, options, }) {
8
- const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
8
+ const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useActionStore();
9
9
  const { title, options: headerOptions, logo, notification, menu } = header;
10
10
  const { background } = options ?? {};
11
11
  useEffect(() => {
@@ -1,2 +1,2 @@
1
1
  import { MenuProps } from "../../../interface";
2
- export default function Menu({ action, profile, input, onClick }: MenuProps): JSX.Element;
2
+ export default function Menu({ showAction, profile, input, onClick, }: MenuProps): JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useTransition, animated } from "react-spring";
3
3
  import { cn, gradient } from "../../../util";
4
- import { useWidgetStore } from "../../../store";
5
- import { Label } from "../../../html";
6
- export default function Menu({ action, profile, input, onClick }) {
7
- const { isVisible } = action ?? {};
8
- const { setIsOwn, removeModal } = useWidgetStore();
4
+ import { useActionStore } from "../../../store";
5
+ import { Label } from "../../../widget";
6
+ export default function Menu({ showAction, profile, input, onClick, }) {
7
+ const { isVisible } = showAction ?? {};
8
+ const { setIsOwn, removeModal } = useActionStore();
9
9
  const container = {
10
10
  displays: "flex flex-col p-2.5",
11
11
  positions: "absolute top-0 right-0 z-45 ",
@@ -1,2 +1,2 @@
1
1
  import { DashboardNotification } from "../../../interface";
2
- export default function Notification({ action, notifications, }: DashboardNotification): JSX.Element;
2
+ export default function Notification({ showAction, notifications, }: DashboardNotification): JSX.Element;
@@ -1,9 +1,9 @@
1
1
  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
- import Events from "../../template/Events";
5
- export default function Notification({ action, notifications, }) {
6
- const { isVisible } = action ?? {};
4
+ import Action from "../../template/Action";
5
+ export default function Notification({ showAction, notifications, }) {
6
+ const { isVisible } = showAction ?? {};
7
7
  const container = {
8
8
  positions: "absolute right-12 z-45",
9
9
  displays: "flex flex-col ",
@@ -32,7 +32,7 @@ export default function Notification({ action, notifications, }) {
32
32
  leave: { opacity: 0 },
33
33
  config: { duration: 200 },
34
34
  });
35
- return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), children: [_jsx("div", { className: cn(headerBox), children: "\uC0C8 \uC54C\uB9BC" }), _jsx("div", { className: cn(body), children: _jsx(Events.Replace, { widgets: [
35
+ return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), children: [_jsx("div", { className: cn(headerBox), children: "\uC0C8 \uC54C\uB9BC" }), _jsx("div", { className: cn(body), children: _jsx(Action.Replace, { actions: [
36
36
  [notifications?.length === 0, _jsx("div", { children: "\uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4" })],
37
37
  ], children: notifications?.map(({ id, script, link }) => (_jsx("div", { onClick: () => {
38
38
  link && window.open(link, "_blank");
@@ -1,8 +1,8 @@
1
- import { useWidgetStore } from "../../../store";
1
+ import { useActionStore } from "../../../store";
2
2
  import { cn } from "../../../util";
3
3
  import checkPathMatch from "../../../util/checkPathMatch";
4
4
  const buttonClassNames = (href, nowPath, color) => {
5
- const { isDark } = useWidgetStore();
5
+ const { isDark } = useActionStore();
6
6
  const [bg, [text, selectedText]] = color ?? ["white", ["white", "black"]];
7
7
  const container = {
8
8
  displays: "flex flex-row items-center justify-center xl:justify-start gap-2.5",
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, useEffect } from "react";
3
3
  import { Header } from "../Header";
4
4
  import { cn } from "../../../../util";
5
- import { useWidgetStore } from "../../../../store";
5
+ import { useActionStore } from "../../../../store";
6
6
  import Profile from "./Profile";
7
7
  import { NavigationContainer } from "../Navigation";
8
8
  export default function MyPageLayout({ header, profile, navigations, children, options, }) {
9
- const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
9
+ const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useActionStore();
10
10
  const { title, options: headerOptions, logo, notification } = header;
11
11
  const { background } = options ?? {};
12
12
  useEffect(() => {
@@ -3,7 +3,7 @@ import { useId, useState } from "react";
3
3
  import { animated, useTransition } from "react-spring";
4
4
  import { cn, gradient } from "../../../../util";
5
5
  import Card from "../../../../card/design/Card.design";
6
- import { Label, Toggle } from "../../../../html";
6
+ import { Label, Toggle } from "../../../../widget";
7
7
  import SVG from "../../../../asset/SVG";
8
8
  function Profile({ name, birthday, image, modify }) {
9
9
  const [hover, setHover] = useState(false);
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Input } from "../../../html";
2
+ import { Input } from "../../../widget";
3
3
  function WithTitle({ title, placeholder, state, flag, type, }) {
4
4
  return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input.LG, { placeholder: placeholder, state: state, flag: flag, type: type })] }));
5
5
  }
@@ -1,2 +1,2 @@
1
1
  import { ConfirmModalProps } from "../../interface/Modal";
2
- export default function ConfirmModalDesign({ titles, action, buttons, children, options, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function ConfirmModalDesign({ titles, showAction, buttons, children, options, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Label } from "../../html";
2
+ import { Label } from "../../widget";
3
3
  import { cn } from "../../util";
4
4
  import ModalDesign from "../design/Modal.design";
5
- export default function ConfirmModalDesign({ titles, action, buttons, children, options, }) {
5
+ export default function ConfirmModalDesign({ titles, showAction, buttons, children, options, }) {
6
6
  const container = {
7
7
  displays: "flex flex-col",
8
8
  };
@@ -10,7 +10,7 @@ export default function ConfirmModalDesign({ titles, action, buttons, children,
10
10
  positions: "absolute bottom-5 left-5",
11
11
  displays: "flex gap-2.5",
12
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: {
13
+ return (_jsx(ModalDesign, { titles: titles, showAction: showAction, 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
14
  ...options,
15
15
  width: "lg",
16
16
  height: "sm",
@@ -1,2 +1,2 @@
1
1
  import { ModalProps } from "../../interface/Modal";
2
- export default function ModalDesign({ titles, action, children, options, debug, }: ModalProps): import("react").ReactPortal | null;
2
+ export default function ModalDesign({ titles, showAction, children, options, debug, }: ModalProps): import("react").ReactPortal | null;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ReactDOM from "react-dom";
3
3
  import { useTransition, animated } from "react-spring";
4
- import { useWidgetStore } from "../../store";
4
+ import { useActionStore } from "../../store";
5
5
  import { cn } from "../../util";
6
6
  import isDebug from "../../util/isDebug";
7
7
  import { useEffect, useState } from "react";
@@ -25,24 +25,25 @@ const heightSize = {
25
25
  "2xl": "max-w-176",
26
26
  full: "h-full",
27
27
  };
28
- export default function ModalDesign({ titles, action, children, options, debug, }) {
29
- const { isVisible, event } = action ?? {};
30
- const { width, height, noClose } = options ?? {};
28
+ export default function ModalDesign({ titles, showAction, children, options, debug, }) {
29
+ const { isVisible, event } = showAction ?? {};
30
+ const { position, width, height, noClose, noBackground, isShadow } = options ?? {};
31
31
  const [detection, setDetection] = useState(null);
32
- const { setIsOwn, removeModal } = useWidgetStore();
32
+ const { setIsOwn, removeModal } = useActionStore();
33
33
  useEffect(() => {
34
34
  setDetection(document.getElementById("portal"));
35
35
  }, []);
36
36
  const background = {
37
37
  positions: "z-50 fixed top-0 left-0",
38
- displays: "flex items-center justify-center ",
38
+ displays: position ?? "flex items-center justify-center ",
39
39
  sizes: "min-h-screen w-full ",
40
- styles: "bg-black/10 backdrop-blur-sm ",
40
+ styles: !noBackground && "bg-black/10 backdrop-blur-sm ",
41
41
  };
42
42
  const container = {
43
43
  paddings: "p-5",
44
44
  sizes: `${heightSize[height ?? "lg"]} ${widthSize[width ?? "md"]}`,
45
45
  styles: "rounded-xl bg-white relative overflow-hidden",
46
+ shadows: isShadow && "box-shadow",
46
47
  debug: debug && isDebug(`border-2 border-${debug}`),
47
48
  };
48
49
  const titleBox = {
@@ -1,2 +1,2 @@
1
1
  import { AlertModalProps } from "../../interface/Modal";
2
- export default function Alert({ titles, action, scripts, options, }: AlertModalProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Alert({ titles, showAction, 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({ titles, action, scripts, options, }) {
3
+ export default function Alert({ titles, showAction, scripts, options, }) {
4
4
  const { script } = scripts ?? {};
5
5
  const { buttons } = options ?? {};
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 })] }) }) }));
6
+ return (_jsx(ModalDesign, { titles: titles, showAction: showAction, 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
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ConfirmModal from "../../design/ConfirmModal.design";
3
- import { Input as _Input } from "../../../html";
3
+ import { Input as _Input } from "../../../widget";
4
4
  export default function Input(props) {
5
5
  const { inputs } = props;
6
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))) }) }));
@@ -0,0 +1,11 @@
1
+ import { SwitchProps } from "../../../interface";
2
+ import { ConfirmModalProps } from "../../../interface/Modal";
3
+ interface SwitchModalProps<T> extends ConfirmModalProps {
4
+ switch: SwitchProps<T>;
5
+ }
6
+ declare function SwitchModal<T>(props: SwitchModalProps<T>): import("react/jsx-runtime").JSX.Element;
7
+ declare namespace SwitchModal {
8
+ var Handle: typeof SwitchModalHandle;
9
+ }
10
+ declare function SwitchModalHandle<T>(props: Omit<SwitchModalProps<T>, "display">): import("react/jsx-runtime").JSX.Element;
11
+ export default SwitchModal;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Switch } from "../../../widget";
3
+ import ConfirmModalDesign from "../../design/ConfirmModal.design";
4
+ import { cn } from "../../../util";
5
+ function SwitchModalDesign(props) {
6
+ const container = {
7
+ displays: "flex flex-col justify-center items-center",
8
+ sizes: "w-full",
9
+ };
10
+ return (_jsx(ConfirmModalDesign, { ...props, children: _jsx("div", { className: cn(container), children: props.children }) }));
11
+ }
12
+ function SwitchModal(props) {
13
+ return (_jsx(SwitchModalDesign, { ...props, children: _jsxs(_Fragment, { children: [_jsx(Switch, { ...props.switch }), props.children] }) }));
14
+ }
15
+ function SwitchModalHandle(props) {
16
+ return (_jsx(SwitchModalDesign, { ...props, children: _jsxs(_Fragment, { children: [_jsx(Switch.Handle, { ...props.switch }), props.children] }) }));
17
+ }
18
+ SwitchModal.Handle = SwitchModalHandle;
19
+ export default SwitchModal;
@@ -0,0 +1,13 @@
1
+ import { ConfirmModalProps } from "../../../interface/Modal";
2
+ import { State } from "../../../interface";
3
+ interface TagModalProps<T> extends Omit<ConfirmModalProps, "children"> {
4
+ tag: {
5
+ state: State<T[]>;
6
+ tags: [T, string][];
7
+ options?: {
8
+ selectHow?: "one" | "plural";
9
+ };
10
+ };
11
+ }
12
+ export default function Tag<T>(props: TagModalProps<T>): import("react/jsx-runtime").JSX.Element;
13
+ export {};