@edu-tosel/design 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/asset/SVG.d.ts +7 -0
  2. package/asset/SVG.js +7 -0
  3. package/asset/SVG.tsx +9 -0
  4. package/asset/svg/Close.d.ts +5 -0
  5. package/asset/svg/Close.js +9 -0
  6. package/asset/svg/Close.tsx +32 -0
  7. package/asset/svg/TOSEL.d.ts +3 -0
  8. package/asset/svg/TOSEL.js +4 -0
  9. package/asset/svg/TOSEL.tsx +63 -0
  10. package/board/design/Board.design.js +5 -3
  11. package/board/template/CanvasBoard.d.ts +1 -1
  12. package/board/template/CanvasBoard.js +5 -4
  13. package/board/template/ManageBoard.js +1 -2
  14. package/board/template/PaperBoard.js +1 -1
  15. package/board/widget/Header.js +2 -5
  16. package/card/design/Card.design.js +6 -16
  17. package/card/design/InfoCard.design.d.ts +1 -1
  18. package/card/design/InfoCard.design.js +2 -2
  19. package/card/template/InfoCard/Academy.d.ts +20 -0
  20. package/card/template/InfoCard/Academy.js +31 -0
  21. package/card/template/InfoCard/Grade.d.ts +1 -2
  22. package/card/template/InfoCard/Grade.js +3 -3
  23. package/card/template/InfoCard/PersonalInformation.js +1 -1
  24. package/card/template/InfoCard/Student.d.ts +1 -2
  25. package/card/template/InfoCard/Student.js +3 -3
  26. package/card/template/InfoCard/index.d.ts +2 -0
  27. package/card/template/InfoCard/index.js +2 -0
  28. package/html/design/Label.design.js +1 -1
  29. package/html/index.d.ts +1 -1
  30. package/html/index.js +1 -1
  31. package/html/template/Input.d.ts +6 -0
  32. package/html/template/Input.js +58 -0
  33. package/html/widget/Toggle.js +8 -2
  34. package/index.d.ts +0 -1
  35. package/index.js +0 -1
  36. package/interface/Board.d.ts +2 -0
  37. package/interface/Card.d.ts +3 -1
  38. package/interface/HTMLElement.d.ts +6 -1
  39. package/interface/Layout.d.ts +9 -1
  40. package/interface/Modal.d.ts +18 -14
  41. package/interface/Overlay.d.ts +2 -2
  42. package/interface/Property.d.ts +3 -1
  43. package/interface/Widget.d.ts +4 -0
  44. package/layout/design/Tab.design.js +2 -2
  45. package/layout/index.d.ts +2 -1
  46. package/layout/index.js +2 -1
  47. package/layout/template/Dashboard.d.ts +18 -1
  48. package/layout/template/Dashboard.js +9 -1
  49. package/layout/template/Events.js +4 -2
  50. package/layout/template/Promotion.d.ts +5 -0
  51. package/layout/template/Promotion.js +5 -0
  52. package/layout/template/Shelf.d.ts +1 -1
  53. package/layout/template/Shelf.js +3 -2
  54. package/layout/widget/dashboard/Header.js +1 -1
  55. package/layout/widget/dashboard/Layout.js +2 -2
  56. package/layout/widget/dashboard/Menu.d.ts +3 -2
  57. package/layout/widget/dashboard/Menu.js +2 -1
  58. package/{navigation → layout/widget/dashboard}/Navigation.d.ts +0 -1
  59. package/layout/widget/dashboard/Navigation.js +20 -0
  60. package/layout/widget/dashboard/Notification.d.ts +1 -1
  61. package/layout/widget/dashboard/Notification.js +2 -1
  62. package/layout/widget/dashboard/buttonClassNames.d.ts +2 -0
  63. package/{navigation/Navigation.js → layout/widget/dashboard/buttonClassNames.js} +5 -13
  64. package/layout/widget/dashboard/mypage/Layout.d.ts +2 -0
  65. package/layout/widget/dashboard/mypage/Layout.js +30 -0
  66. package/layout/widget/dashboard/mypage/Navigate.d.ts +12 -0
  67. package/layout/widget/dashboard/mypage/Navigate.js +29 -0
  68. package/layout/widget/dashboard/mypage/Profile.d.ts +28 -0
  69. package/layout/widget/dashboard/mypage/Profile.js +44 -0
  70. package/layout/widget/promotion/Layout.d.ts +3 -0
  71. package/layout/widget/promotion/Layout.js +5 -0
  72. package/layout/widget/promotion/Thumbnail.d.ts +1 -0
  73. package/layout/widget/promotion/Thumbnail.js +10 -0
  74. package/modal/design/ConfirmModal.design.d.ts +2 -0
  75. package/modal/design/ConfirmModal.design.js +18 -0
  76. package/modal/design/Modal.design.d.ts +1 -1
  77. package/modal/design/Modal.design.js +17 -24
  78. package/modal/index.d.ts +1 -0
  79. package/modal/index.js +1 -0
  80. package/modal/template/Alert.d.ts +1 -1
  81. package/modal/template/Alert.js +3 -3
  82. package/modal/template/ConfirmModal/Input.d.ts +10 -0
  83. package/modal/template/ConfirmModal/Input.js +7 -0
  84. package/modal/template/ConfirmModal/index.d.ts +5 -0
  85. package/modal/template/ConfirmModal/index.js +5 -0
  86. package/modal/template/Input.d.ts +1 -1
  87. package/modal/template/Input.js +3 -3
  88. package/overlay/template/Info.d.ts +1 -1
  89. package/overlay/template/Info.js +2 -2
  90. package/overlay/template/Manage.d.ts +1 -1
  91. package/overlay/template/Manage.js +2 -2
  92. package/overlay/widget/Overlay.design.d.ts +1 -1
  93. package/overlay/widget/Overlay.design.js +2 -1
  94. package/package.json +1 -1
  95. package/tailwind.config.ts +16 -0
  96. package/version.txt +1 -1
  97. package/html/widget/Input.d.ts +0 -2
  98. package/html/widget/Input.js +0 -31
  99. package/navigation/index.d.ts +0 -1
  100. package/navigation/index.js +0 -1
package/index.d.ts CHANGED
@@ -5,6 +5,5 @@ export * from "./layout";
5
5
  export * from "./html";
6
6
  export * from "./interaction";
7
7
  export * from "./modal";
8
- export * from "./navigation";
9
8
  export * from "./overlay";
10
9
  export * from "./text";
package/index.js CHANGED
@@ -5,6 +5,5 @@ export * from "./layout";
5
5
  export * from "./html";
6
6
  export * from "./interaction";
7
7
  export * from "./modal";
8
- export * from "./navigation";
9
8
  export * from "./overlay";
10
9
  export * from "./text";
@@ -6,6 +6,8 @@ interface OptionsProps {
6
6
  width?: Size;
7
7
  height?: Size;
8
8
  color?: string;
9
+ background?: string;
10
+ border?: string;
9
11
  isRounded?: boolean;
10
12
  noPadding?: boolean;
11
13
  noMobile?: boolean;
@@ -1,4 +1,4 @@
1
- import { Button, DataField, DataSet, Disabled, ImageSize, OnClick, Size, Titles } from "./Property";
1
+ import { Button, DataField, DataSet, Disabled, ImageSize, OnClick, Size, State, Titles } from "./Property";
2
2
  interface CardOptions {
3
3
  className?: string;
4
4
  boundary?: string;
@@ -9,6 +9,7 @@ interface CardOptions {
9
9
  text?: string;
10
10
  border?: string;
11
11
  onClick?: OnClick;
12
+ onMouse?: State<boolean>;
12
13
  overflow?: "hiden" | "y-scroll" | "auto";
13
14
  noPadding?: boolean;
14
15
  padding?: string | false;
@@ -72,6 +73,7 @@ export interface InfoCardProps extends CardProps {
72
73
  titles: Titles;
73
74
  topRight?: React.ReactNode;
74
75
  button?: Button;
76
+ image?: string;
75
77
  options?: {
76
78
  titleBorder?: string;
77
79
  } & CardOptions;
@@ -15,6 +15,7 @@ export interface HTMLElement {
15
15
  background?: string;
16
16
  text?: string;
17
17
  disabled?: Disabled;
18
+ rounded?: string;
18
19
  };
19
20
  }
20
21
  export interface HTMLLabelElement extends HTMLElement {
@@ -28,14 +29,17 @@ export interface HTMLSelectElement<T> extends HTMLElement {
28
29
  selectOptions?: SelectOption<T>[];
29
30
  placeholder?: string;
30
31
  }
32
+ type HTMLInputElementType = "text" | "password" | "date" | "email" | "phone" | "number";
31
33
  export interface HTMLInputElement extends HTMLElement {
32
34
  state: State<string> | State<string | undefined>;
33
35
  onKeyDown?: (e: React.KeyboardEvent) => void;
34
36
  placeholder?: string;
37
+ flag?: boolean;
38
+ type?: HTMLInputElementType;
35
39
  }
36
40
  export interface HTMLToggleElement extends HTMLElement {
37
41
  state: State<boolean>;
38
- labels: [[true, string], [false, string]];
42
+ labels?: [[true, string], [false, string]];
39
43
  }
40
44
  export type ColorType = "red" | "blue" | "green";
41
45
  export interface HTMLCheckBoxElement extends HTMLElement {
@@ -52,3 +56,4 @@ export interface HTMLElementFrame {
52
56
  disabled?: Disabled;
53
57
  onClick?: OnClick;
54
58
  }
59
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { OnClick } from "./Property";
2
+ import { ShowAction } from "./Widget";
2
3
  interface Notification {
3
4
  id: number;
4
5
  userId: number;
@@ -31,8 +32,15 @@ export interface DashboardProps {
31
32
  background?: string;
32
33
  };
33
34
  }
35
+ export interface MyPageProps extends DashboardProps {
36
+ profile: {
37
+ image: string;
38
+ username: string;
39
+ email: string;
40
+ };
41
+ }
34
42
  export interface DashboardNotification {
35
- isVisible?: boolean;
43
+ action?: ShowAction;
36
44
  notifications?: Partial<Notification>[];
37
45
  }
38
46
  export {};
@@ -1,23 +1,27 @@
1
- import { Button, Scripts, Size } from "./Property";
2
- export interface ModalProps {
3
- isVisible?: boolean;
4
- event?: string;
1
+ import { Button, Scripts, Size, Titles } from "./Property";
2
+ import { ShowAction } from "./Widget";
3
+ interface Options {
4
+ width: Size;
5
+ height: Size;
6
+ padding: boolean;
7
+ buttons: Button[];
8
+ noClose: boolean;
9
+ }
10
+ interface ModalProps {
11
+ titles: Titles;
5
12
  children: React.ReactNode;
13
+ action?: ShowAction;
6
14
  className?: string;
7
- options?: {
8
- width?: Size;
9
- height?: Size;
10
- padding?: boolean;
11
- buttons?: Button[];
12
- isCloseButton?: boolean;
13
- closeButtonColor?: string;
14
- };
15
+ options?: Partial<Options>;
15
16
  debug?: string;
16
17
  }
17
- export interface AlertModalProps extends Omit<ModalProps, "children"> {
18
- title: string;
18
+ interface ConfirmModalProps extends ModalProps {
19
+ buttons: [Button, Button];
20
+ }
21
+ interface AlertModalProps extends Omit<ModalProps, "children"> {
19
22
  scripts: Scripts;
20
23
  options?: {
21
24
  buttons?: Button[];
22
25
  };
23
26
  }
27
+ export type { ModalProps, ConfirmModalProps, AlertModalProps };
@@ -1,9 +1,9 @@
1
1
  import { HTMLElementFrame, HTMLLabelElement } from "./HTMLElement";
2
2
  import { Titles } from "./Property";
3
+ import { ShowAction } from "./Widget";
3
4
  export interface OverlayProps {
4
5
  titles: Titles;
5
- isVisible?: boolean;
6
- event?: string;
6
+ action?: ShowAction;
7
7
  children?: React.ReactNode;
8
8
  }
9
9
  export interface InfoOverlayProps extends OverlayProps {
@@ -1,5 +1,6 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
2
  import { Replace } from "./Widget";
3
+ import { HTMLLabelElement } from "./HTMLElement";
3
4
  /**
4
5
  * State type for the React component
5
6
  * @template T
@@ -36,7 +37,8 @@ export type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "
36
37
  * @property {"full"} full - Full size
37
38
  */
38
39
  export type OnClick<T = unknown> = (prop?: T) => unknown | ((prop?: T) => Promise<unknown>);
39
- export type Button = [string, OnClick];
40
+ export interface Button extends HTMLLabelElement {
41
+ }
40
42
  export type Disabled = boolean | OnClick;
41
43
  export type Scripts = {
42
44
  script: string;
@@ -10,6 +10,10 @@ type Event<T extends boolean | string | null | undefined> = [
10
10
  ];
11
11
  export type Show = Event<boolean | string>;
12
12
  export type Replace = Event<boolean | string | null | undefined>;
13
+ export interface ShowAction {
14
+ event: string;
15
+ isVisible: boolean;
16
+ }
13
17
  export interface ShowProps {
14
18
  widgets?: Show[];
15
19
  children: React.ReactNode;
@@ -15,8 +15,8 @@ export default function Tab({ tabs, textColor, }) {
15
15
  sizes: "h-9 w-32 ",
16
16
  font: textColor ?? "text-green-dark",
17
17
  };
18
- return (_jsx("div", { className: cn(container), children: tabs.map(([title, onClick], index) => (_jsx("button", { onClick: () => {
18
+ return (_jsx("div", { className: cn(container), children: tabs.map(({ title, onClick }, index) => (_jsx("button", { onClick: () => {
19
19
  setTabsSelection(tabsSelection.map((_, i) => i === index));
20
- return onClick();
20
+ return onClick && onClick();
21
21
  }, className: cn(button, `${tabsSelection[index] && "bg-white rounded-2xl"}`), children: title }, title))) }));
22
22
  }
package/layout/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as Events } from "./template/Events";
2
- export { default as Dashboard } from "./template/Dashboard";
2
+ export * from "./template/Dashboard";
3
+ export { default as Promotion } from "./template/Promotion";
3
4
  export { default as Sign } from "./template/Sign";
4
5
  export { default as DataField } from "./template/DataField";
5
6
  export { default as Gallery } from "./template/Gallery";
package/layout/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as Events } from "./template/Events";
2
- export { default as Dashboard } from "./template/Dashboard";
2
+ export * from "./template/Dashboard";
3
+ export { default as Promotion } from "./template/Promotion";
3
4
  export { default as Sign } from "./template/Sign";
4
5
  export { default as DataField } from "./template/DataField";
5
6
  export { default as Gallery } from "./template/Gallery";
@@ -1,5 +1,22 @@
1
1
  import Layout from "../widget/dashboard/Layout";
2
+ import MyPageLayout from "../widget/dashboard/mypage/Layout";
3
+ import Profile from "../widget/dashboard/mypage/Profile";
2
4
  declare const Dashboard: {
3
5
  Layout: typeof Layout;
4
6
  };
5
- export default Dashboard;
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,5 +1,13 @@
1
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";
2
5
  const Dashboard = {
3
6
  Layout,
4
7
  };
5
- export default Dashboard;
8
+ const MyPage = {
9
+ Layout: MyPageLayout,
10
+ Card: { Profile, Navigate },
11
+ };
12
+ export { default as buttonClassNames } from "./../widget/dashboard/buttonClassNames";
13
+ export { Dashboard, MyPage };
@@ -14,8 +14,10 @@ function Show({ widgets, children }) {
14
14
  };
15
15
  if (React.isValidElement(Component)) {
16
16
  const ComponentWithVisibility = React.cloneElement(Component, {
17
- event: event(),
18
- isVisible,
17
+ action: {
18
+ event: event(),
19
+ isVisible,
20
+ },
19
21
  });
20
22
  return _jsx(Fragment, { children: ComponentWithVisibility }, index);
21
23
  }
@@ -0,0 +1,5 @@
1
+ import Layout from "../widget/promotion/Layout";
2
+ declare const Promotion: {
3
+ Layout: typeof Layout;
4
+ };
5
+ export default Promotion;
@@ -0,0 +1,5 @@
1
+ import Layout from "../widget/promotion/Layout";
2
+ const Promotion = {
3
+ Layout,
4
+ };
5
+ export default Promotion;
@@ -2,7 +2,7 @@ import { ShelfProps } from "../../interface/Shelf";
2
2
  declare function Shelf({ titles, debug, children }: ShelfProps<string | number>): import("react/jsx-runtime").JSX.Element;
3
3
  declare namespace Shelf {
4
4
  var Wrap: ({ className, titles, children, debug, options, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
5
- var Row: ({ titles, children, debug }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
5
+ var Row: ({ titles, children, className, debug, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
6
6
  var Col: ({ titles, children, debug, className, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
7
7
  }
8
8
  export default Shelf;
@@ -24,9 +24,10 @@ function Wrap({ className, titles, children, debug, options, }) {
24
24
  subtitleSize: "text-sm",
25
25
  }, debug: debug, children: children }));
26
26
  }
27
- function Row({ titles, children, debug }) {
27
+ function Row({ titles, children, className, debug, }) {
28
28
  const container = {
29
- displays: "flex flex-row gap-7.5",
29
+ displays: "flex flex-row",
30
+ className: className ?? "gap-x-7.5",
30
31
  };
31
32
  return (_jsx(ShelfDesign, { titles: titles, className: cn(container), options: {
32
33
  titleSize: "text-lg xl:text-2xl",
@@ -14,7 +14,7 @@ export function Header({ title, logo, notification, options, }) {
14
14
  sizes: "h-15 w-full",
15
15
  background: `${background ?? "bg-white"} dark:bg-black`,
16
16
  text: `${text ?? "text-black"} dark:text-white`,
17
- styles: "px-5 xl:px-8 2xl:px-16 ",
17
+ styles: "px-5 xl:px-8 2xl:px-16 box-shadow",
18
18
  className,
19
19
  };
20
20
  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: "text-3xl font-pretendard-bold", children: title })] }), _jsx("div", { className: "relative flex gap-5.25", children: _jsxs(Events.Show, { widgets: [
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, useEffect } from "react";
3
- import { NavigationContainer } from "../../../navigation";
4
3
  import { Header } from "./Header";
5
4
  import { cn } from "../../../util";
6
5
  import { useWidgetStore } from "../../../store";
6
+ import { NavigationContainer } from "./Navigation";
7
7
  export default function Layout({ header, navigations, children, options, }) {
8
8
  const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
9
9
  const { title, options: headerOptions, logo, notification } = header;
@@ -23,7 +23,7 @@ export default function Layout({ header, navigations, children, options, }) {
23
23
  const body = {
24
24
  sizes: "h-full ",
25
25
  displays: "flex gap-12 xl:gap-7.5 ",
26
- paddings: "pt-15 xl:pl-2 2xl:px-12 xl:pt-7.5",
26
+ paddings: "pt-15 xl:pl-2 2xl:pl-12 2xl:pr-11.25 xl:pt-7.5",
27
27
  };
28
28
  return (_jsxs("div", { className: cn(container), onClick: setFlag, children: [_jsx(Header, { title: title, notification: notification, options: headerOptions, logo: logo }), _jsxs("div", { className: cn(body), children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
29
29
  }
@@ -1,4 +1,5 @@
1
- export default function Menu({ isVisible, image, }: {
2
- isVisible?: boolean;
1
+ import { ShowAction } from "../../../interface";
2
+ export default function Menu({ action, image, }: {
3
+ action?: ShowAction;
3
4
  image: string;
4
5
  }): JSX.Element;
@@ -2,7 +2,8 @@ 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 Menu({ isVisible, image, }) {
5
+ export default function Menu({ action, image, }) {
6
+ const { isVisible } = action ?? {};
6
7
  const { setIsOwn } = useWidgetStore();
7
8
  const container = {
8
9
  displays: "flex flex-col",
@@ -1,4 +1,3 @@
1
- export declare const buttonClassNames: (href: string, nowPath: string, color?: [string, [string, string]]) => string;
2
1
  export declare function NavigationContainer({ children, }: {
3
2
  children: React.ReactNode;
4
3
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ export function NavigationContainer({ children, }) {
4
+ const container = {
5
+ positions: "fixed xl:static bottom-0 left-0 z-40",
6
+ displays: "flex flex-row xl:flex-col",
7
+ sizes: "w-full xl:w-auto",
8
+ };
9
+ return (_jsxs("div", { className: cn(container), children: [children, _jsx(Copyright, {})] }));
10
+ }
11
+ function Copyright() {
12
+ const copyrightBox = {
13
+ displays: "hidden xl:flex flex-col",
14
+ sizes: "h-11.5 pt-2.5 mt-2.5",
15
+ styles: "border-t border-black",
16
+ fonts: "text-2xs text-gray-dark",
17
+ };
18
+ const nowYear = new Date().getFullYear();
19
+ return (_jsxs("div", { className: cn(copyrightBox), children: [_jsxs("div", { className: "leading-tight", children: ["Copyright \u00A9 2002-", nowYear] }), _jsx("div", { className: "leading-tight", children: "International TOSEL Committee." }), _jsx("div", { className: "leading-tight", children: "All Rights Reserved." })] }));
20
+ }
@@ -1,2 +1,2 @@
1
1
  import { DashboardNotification } from "../../../interface";
2
- export default function Notification({ isVisible, notifications, }: DashboardNotification): JSX.Element;
2
+ export default function Notification({ action, notifications, }: DashboardNotification): JSX.Element;
@@ -2,7 +2,8 @@ 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 Events from "../../template/Events";
5
- export default function Notification({ isVisible, notifications, }) {
5
+ export default function Notification({ action, notifications, }) {
6
+ const { isVisible } = action ?? {};
6
7
  const container = {
7
8
  positions: "absolute right-12 z-45",
8
9
  displays: "flex flex-col ",
@@ -0,0 +1,2 @@
1
+ declare const buttonClassNames: (href: string, nowPath: string, color?: [string, [string, string]]) => string;
2
+ export default buttonClassNames;
@@ -1,8 +1,7 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../util";
3
- import { useWidgetStore } from "../store";
4
- import checkPathMatch from "../util/checkPathMatch";
5
- export const buttonClassNames = (href, nowPath, color) => {
1
+ import { useWidgetStore } from "../../../store";
2
+ import { cn } from "../../../util";
3
+ import checkPathMatch from "../../../util/checkPathMatch";
4
+ const buttonClassNames = (href, nowPath, color) => {
6
5
  const { isDark } = useWidgetStore();
7
6
  const [bg, [text, selectedText]] = color ?? ["white", ["white", "black"]];
8
7
  const container = {
@@ -18,11 +17,4 @@ export const buttonClassNames = (href, nowPath, color) => {
18
17
  `xl:bg-transparent xl:hover:bg-white/50 ${text} dark:text-white`;
19
18
  return [cn(container), toggle].join(" ");
20
19
  };
21
- export function NavigationContainer({ children, }) {
22
- const container = {
23
- positions: "fixed xl:static bottom-0 left-0 z-40",
24
- displays: "flex flex-row xl:flex-col",
25
- sizes: "w-full xl:w-auto",
26
- };
27
- return _jsx("div", { className: cn(container), children: children });
28
- }
20
+ export default buttonClassNames;
@@ -0,0 +1,2 @@
1
+ import { MyPageProps } from "../../../../interface";
2
+ export default function MyPageLayout({ header, profile, navigations, children, options, }: MyPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment, useEffect } from "react";
3
+ import { Header } from "../Header";
4
+ import { cn } from "../../../../util";
5
+ import { useWidgetStore } from "../../../../store";
6
+ import Profile from "./Profile";
7
+ import { NavigationContainer } from "../Navigation";
8
+ export default function MyPageLayout({ header, profile, navigations, children, options, }) {
9
+ const { isDark, flag, setFlag, isOwn, setIsOwn, clearView } = useWidgetStore();
10
+ const { title, options: headerOptions, logo, notification } = header;
11
+ const { background } = options ?? {};
12
+ useEffect(() => {
13
+ if (isOwn) {
14
+ return setIsOwn(false);
15
+ }
16
+ return clearView();
17
+ }, [flag]);
18
+ const container = {
19
+ sizes: "min-h-screen h-screen xl:h-auto",
20
+ background: `${background ?? "bg-white"} dark:bg-black/80`,
21
+ styles: "font-pretendard-medium",
22
+ dark: isDark && "dark",
23
+ };
24
+ const body = {
25
+ displays: "flex gap-12 xl:gap-7.5 ",
26
+ sizes: "h-full ",
27
+ paddings: "pt-15 xl:pl-2 2xl:px-12 xl:pt-7.5",
28
+ };
29
+ return (_jsxs("div", { className: cn(container), onClick: setFlag, children: [_jsx(Header, { title: title, notification: notification, options: headerOptions, logo: logo }), _jsxs("div", { className: cn(body), children: [_jsxs(NavigationContainer, { children: [_jsx(Profile.Preview, { username: profile.username, email: profile.email, image: profile.image }), navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index)))] }), children] })] }));
30
+ }
@@ -0,0 +1,12 @@
1
+ import { OnClick } from "../../../../interface";
2
+ declare function Academy({ onClick }: {
3
+ onClick: OnClick;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ declare function Payment({ onClick }: {
6
+ onClick: OnClick;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare const Navigate: {
9
+ Academy: typeof Academy;
10
+ Payment: typeof Payment;
11
+ };
12
+ export default Navigate;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import Card from "../../../../card/design/Card.design";
4
+ function Academy({ onClick }) {
5
+ const [onMouse, _] = useState(false);
6
+ return (_jsxs(Card, { options: {
7
+ onClick,
8
+ className: "pt-5 pl-5 group",
9
+ boundary: "box-shadow shadow-green-dark",
10
+ onMouse: [onMouse, _],
11
+ width: "2xs",
12
+ height: "2xs",
13
+ }, children: [_jsx("div", { className: "text-gray-medium group-hover:text-green-dark duration-300", children: "\uB098\uC758 \uD559\uC6D0" }), _jsx("svg", { className: "absolute bottom-5 right-5 ", xmlns: "http://www.w3.org/2000/svg", width: "60", height: "60", viewBox: "0 0 60 60", fill: "none", children: _jsx("path", { className: "duration-300", d: "M9 53H52M10.9545 6H50.0455M12.9091 6V53M48.0909 6V53M22.6818 15.7917H26.5909M22.6818 23.625H26.5909M22.6818 31.4583H26.5909M34.4091 15.7917H38.3182M34.4091 23.625H38.3182M34.4091 31.4583H38.3182M22.6818 53V44.1875C22.6818 42.566 23.9953 41.25 25.6136 41.25H35.3864C37.0047 41.25 38.3182 42.566 38.3182 44.1875V53", stroke: !onMouse ? "#7F7F7F" : "#105652", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round" }) })] }));
14
+ }
15
+ function Payment({ onClick }) {
16
+ return (_jsxs(Card, { options: {
17
+ onClick,
18
+ className: "pt-5 pl-5",
19
+ background: "group bg-green-dark/10 hover:bg-green-dark/30 ",
20
+ width: "2xs",
21
+ height: "2xs",
22
+ boundary: "",
23
+ }, children: [_jsx("div", { className: "opacity-0 group-hover:opacity-100 duration-300", children: "\uACB0\uC81C \uC815\uBCF4" }), _jsxs("div", { className: "absolute top-5 group-hover:top-11.25 left-5 flex flex-col gap-1.5 duration-300", children: [_jsx("div", { className: "w-24 h-1.5 bg-green-dark/30 group-hover:bg-green-dark/40 duration-300" }), _jsx("div", { className: "w-14.25 h-1.5 bg-green-dark/30 group-hover:bg-green-dark/40 duration-300" })] }), _jsx("div", { className: "absolute top-5 right-5 w-12.25 h-7 rounded-full bg-[#CFDDDC]" }), _jsx("div", { className: "absolute left-0 bottom-5 w-full h-5 bg-green-dark" })] }));
24
+ }
25
+ const Navigate = {
26
+ Academy,
27
+ Payment,
28
+ };
29
+ export default Navigate;
@@ -0,0 +1,28 @@
1
+ import { Button as ButtonProp, OnClick, State, Titles } from "../../../../interface";
2
+ declare function Profile({ name, birthday, image, modify, }: {
3
+ name: string;
4
+ birthday: string;
5
+ image: string;
6
+ modify: {
7
+ name: OnClick;
8
+ birthday: OnClick;
9
+ };
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare namespace Profile {
12
+ var Detail: ({ titles, infos, toggle, }: {
13
+ titles: Titles;
14
+ infos?: Info[] | undefined;
15
+ toggle?: State<boolean> | undefined;
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ var Preview: ({ image, username, email, }: {
18
+ username: string;
19
+ email: string;
20
+ image: string;
21
+ }) => import("react/jsx-runtime").JSX.Element;
22
+ }
23
+ interface Info {
24
+ title: string | "email" | "phone";
25
+ content: string;
26
+ button: ButtonProp;
27
+ }
28
+ export default Profile;
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, gradient } from "../../../../util";
3
+ import Card from "../../../../card/design/Card.design";
4
+ import { Label, Toggle } from "../../../../html";
5
+ import { useId } from "react";
6
+ function Profile({ name, birthday, image, modify, }) {
7
+ return (_jsxs(Card, { options: {
8
+ className: "flex gap-x-7.5 items-center pl-5",
9
+ width: "md",
10
+ height: "2xs",
11
+ boundary: "border-1 border-black",
12
+ }, children: [_jsx("div", { className: "w-20 h-20 overflow-hidden rounded-md", children: _jsx("img", { src: image, alt: "profile-image", className: "bg-cover" }) }), _jsxs("div", { className: "flex flex-col h-20", children: [_jsx("div", { className: "text-xl leading-none font-pretendard-bold text-gray-dark", children: name }), _jsx("div", { className: "leading-none text-gray-medium mt-1.25", children: birthday }), _jsxs("div", { className: "flex gap-3 mt-auto", children: [_jsx(Label.Button, { title: "\uC2E4\uBA85 \uC218\uC815", options: { width: "sm", height: "xs" }, onClick: modify.name }), _jsx(Label.Button, { title: "\uC0DD\uC77C \uC218\uC815", options: { width: "sm", height: "xs" }, onClick: modify.birthday })] })] })] }));
13
+ }
14
+ function Detail({ titles, infos, toggle, }) {
15
+ const infoBox = {
16
+ displays: "flex ",
17
+ sizes: "w-full",
18
+ styles: "text-green-dark",
19
+ };
20
+ const id = useId();
21
+ return (_jsxs(Card, { options: {
22
+ className: "pt-5 px-5",
23
+ width: "md",
24
+ height: "xs",
25
+ background: gradient.bg.greenToRedSoft,
26
+ boundary: "",
27
+ }, children: [_jsxs("div", { className: "h-13.25 flex flex-col text-gray-dark border-b-1 border-crimson-burgundy", children: [_jsx("div", { className: "text-xl font-pretendard-bold h-6 leading-none", children: titles.title }), _jsx("div", { className: "h-4.75 leading-none", children: titles.subtitle })] }), _jsx("div", { className: "mt-4.25 flex flex-col gap-2.5 ", children: infos?.map(({ title, content, button }, index) => (_jsxs("div", { className: cn(infoBox), children: [title === "phone" ? (_jsx("svg", { className: "mr-3", xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M10.9375 1.5625H8.59375C7.97215 1.5625 7.37601 1.80943 6.93647 2.24897C6.49693 2.68851 6.25 3.28465 6.25 3.90625V21.0937C6.25 21.7154 6.49693 22.3115 6.93647 22.751C7.37601 23.1906 7.97215 23.4375 8.59375 23.4375H16.4062C17.0279 23.4375 17.624 23.1906 18.0635 22.751C18.5031 22.3115 18.75 21.7154 18.75 21.0937V3.90625C18.75 3.28465 18.5031 2.68851 18.0635 2.24897C17.624 1.80943 17.0279 1.5625 16.4062 1.5625H14.0625M10.9375 1.5625V3.125H14.0625V1.5625M10.9375 1.5625H14.0625M10.9375 21.0937H14.0625", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) : title === "email" ? (_jsx("svg", { className: "mr-3", xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M22.6562 9.37501V10.3188C22.6563 10.7419 22.5417 11.1572 22.3248 11.5205C22.1078 11.8838 21.7965 12.1816 21.424 12.3823L14.676 16.0156M2.34375 9.37501V10.3188C2.34373 10.7419 2.45828 11.1572 2.67525 11.5205C2.89221 11.8838 3.20348 12.1816 3.57604 12.3823L10.324 16.0156M10.324 16.0156L11.3885 15.4427C11.7301 15.2587 12.112 15.1624 12.5 15.1624C12.888 15.1624 13.2699 15.2587 13.6115 15.4427L14.6771 16.0156L19.5312 18.6302M10.324 16.0156L5.46875 18.6302M22.6562 20.3125C22.6562 20.9341 22.4093 21.5303 21.9698 21.9698C21.5302 22.4093 20.9341 22.6563 20.3125 22.6563H4.6875C4.0659 22.6563 3.46976 22.4093 3.03022 21.9698C2.59068 21.5303 2.34375 20.9341 2.34375 20.3125V9.21251C2.34373 8.78934 2.45828 8.37407 2.67525 8.01075C2.89221 7.64744 3.20348 7.34964 3.57604 7.14897L11.3885 2.94168C11.7301 2.75769 12.112 2.66138 12.5 2.66138C12.888 2.66138 13.2699 2.75769 13.6115 2.94168L21.424 7.14897C21.7964 7.34956 22.1075 7.64719 22.3245 8.01031C22.5414 8.37342 22.6561 8.78848 22.6562 9.21147V20.3125Z", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })) : (_jsx("div", { className: "font-pretendard-bold mr-5 w-7", children: title })), _jsx("div", { className: "leading-none flex items-center w-60", children: content }), _jsx(Label.Button, { title: button.title, onClick: button.onClick, options: {
28
+ className: "ml-auto",
29
+ background: gradient.bg.greenToRed,
30
+ text: "text-white",
31
+ width: "sm",
32
+ height: "xs",
33
+ } })] }, id + index))) }), toggle && (_jsxs("div", { className: "flex gap-2.5 items-center absolute bottom-5 right-5", children: [_jsx("div", { className: "text-xs leading-none text-green-dark", children: "\uD559\uC6D0\uC73C\uB85C \uBC1B\uAE30" }), _jsx(Toggle, { state: toggle })] }))] }));
34
+ }
35
+ function Preview({ image, username, email, }) {
36
+ const container = {
37
+ displays: "hidden xl:flex flex-col justify-center items-center gap-5",
38
+ sizes: "w-51 h-46.5",
39
+ };
40
+ return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: "relative w-21 h-21 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: image, alt: "profile-image" }) }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "text-xl h-5.25 leading-none font-pretendard-bold", children: username }), _jsx("div", { className: "text-xs h-5.25 leading-none flex justify-center items-center", children: email })] })] }));
41
+ }
42
+ Profile.Detail = Detail;
43
+ Profile.Preview = Preview;
44
+ export default Profile;
@@ -0,0 +1,3 @@
1
+ export default function Layout({ children }: {
2
+ children: React.ReactNode;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Thumbnail from "./Thumbnail";
3
+ export default function Layout({ children }) {
4
+ return (_jsxs("div", { className: "w-[1168px] h-full flex", children: [_jsx(Thumbnail, {}), children] }));
5
+ }
@@ -0,0 +1 @@
1
+ export default function Thumbnail(): import("react/jsx-runtime").JSX.Element;