@edu-tosel/design 1.0.153 → 1.0.155

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.
package/asset/SVG.d.ts CHANGED
@@ -1,13 +1,11 @@
1
1
  import Close from "./svg/Close";
2
2
  import Direction from "./svg/Direction";
3
3
  import Email from "./svg/Email";
4
- import { IconProps } from "./svg/Icon";
5
4
  import Image from "./svg/Image";
6
5
  import Notification from "./svg/Notification";
7
6
  import Operation from "./svg/Operation";
8
7
  import Phone from "./svg/Phone";
9
8
  import Profile from "./svg/Profile";
10
- import { SymbolProps } from "./svg/Symbol";
11
9
  import TOSEL from "./svg/TOSEL";
12
10
  declare const SVG: {
13
11
  TOSEL: typeof TOSEL;
@@ -17,13 +15,17 @@ declare const SVG: {
17
15
  Asc: () => import("react/jsx-runtime").JSX.Element;
18
16
  Desc: () => import("react/jsx-runtime").JSX.Element;
19
17
  };
18
+ Eye: {
19
+ Open: ({ onClick, className }: import("./svg/Eye").EyeProps) => import("react/jsx-runtime").JSX.Element;
20
+ Close: ({ onClick, className }: import("./svg/Eye").EyeProps) => import("react/jsx-runtime").JSX.Element;
21
+ };
20
22
  Email: typeof Email;
21
23
  Icon: {
22
- Calendar: ({ onClick }: IconProps) => import("react/jsx-runtime").JSX.Element;
23
- Notification: ({ onClick }: IconProps) => import("react/jsx-runtime").JSX.Element;
24
- Search: ({ onClick }: IconProps) => import("react/jsx-runtime").JSX.Element;
25
- Browser: ({ onClick }: IconProps) => import("react/jsx-runtime").JSX.Element;
26
- Event: ({ onClick }: IconProps) => import("react/jsx-runtime").JSX.Element;
24
+ Calendar: ({ size, onClick }: import("./svg/Icon").IconProps) => import("react/jsx-runtime").JSX.Element;
25
+ Notification: ({ size, onClick }: import("./svg/Icon").IconProps) => import("react/jsx-runtime").JSX.Element;
26
+ Search: ({ size, onClick }: import("./svg/Icon").IconProps) => import("react/jsx-runtime").JSX.Element;
27
+ Browser: ({ size, onClick }: import("./svg/Icon").IconProps) => import("react/jsx-runtime").JSX.Element;
28
+ Event: ({ size, onClick }: import("./svg/Icon").IconProps) => import("react/jsx-runtime").JSX.Element;
27
29
  Document: ({ theme }: {
28
30
  theme: "red" | "blue";
29
31
  }) => import("react/jsx-runtime").JSX.Element;
@@ -43,8 +45,8 @@ declare const SVG: {
43
45
  Phone: typeof Phone;
44
46
  Profile: typeof Profile;
45
47
  Symbol: {
46
- LessThan: ({ className, onClick }: SymbolProps) => import("react/jsx-runtime").JSX.Element;
47
- GreaterThan: ({ className, onClick }: SymbolProps) => import("react/jsx-runtime").JSX.Element;
48
+ LessThan: ({ className, onClick }: import("./svg/Symbol").SymbolProps) => import("react/jsx-runtime").JSX.Element;
49
+ GreaterThan: ({ className, onClick }: import("./svg/Symbol").SymbolProps) => import("react/jsx-runtime").JSX.Element;
48
50
  };
49
51
  };
50
52
  export default SVG;
package/asset/SVG.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import Close from "./svg/Close";
2
2
  import Direction from "./svg/Direction";
3
3
  import Email from "./svg/Email";
4
+ import Eye from "./svg/Eye";
4
5
  import Icon from "./svg/Icon";
5
6
  import Image from "./svg/Image";
6
7
  import Notification from "./svg/Notification";
@@ -13,6 +14,7 @@ const SVG = {
13
14
  TOSEL,
14
15
  Close,
15
16
  Direction,
17
+ Eye,
16
18
  Email,
17
19
  Icon,
18
20
  Image,
package/asset/SVG.tsx CHANGED
@@ -1,19 +1,21 @@
1
1
  import Close from "./svg/Close";
2
2
  import Direction from "./svg/Direction";
3
3
  import Email from "./svg/Email";
4
- import Icon, { IconProps } from "./svg/Icon";
4
+ import Eye from "./svg/Eye";
5
+ import Icon from "./svg/Icon";
5
6
  import Image from "./svg/Image";
6
7
  import Notification from "./svg/Notification";
7
8
  import Operation from "./svg/Operation";
8
9
  import Phone from "./svg/Phone";
9
10
  import Profile from "./svg/Profile";
10
- import Symbol, { SymbolProps } from "./svg/Symbol";
11
+ import Symbol from "./svg/Symbol";
11
12
  import TOSEL from "./svg/TOSEL";
12
13
 
13
14
  const SVG = {
14
15
  TOSEL,
15
16
  Close,
16
17
  Direction,
18
+ Eye,
17
19
  Email,
18
20
  Icon,
19
21
  Image,
@@ -0,0 +1,12 @@
1
+ import { OnClick } from "../../interface";
2
+ export interface EyeProps {
3
+ onClick: OnClick;
4
+ className?: string;
5
+ }
6
+ declare function Open({ onClick, className }: EyeProps): import("react/jsx-runtime").JSX.Element;
7
+ declare function Close({ onClick, className }: EyeProps): import("react/jsx-runtime").JSX.Element;
8
+ declare const Eye: {
9
+ Open: typeof Open;
10
+ Close: typeof Close;
11
+ };
12
+ export default Eye;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../util";
3
+ function Open({ onClick, className = "" }) {
4
+ return (_jsxs("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#7F7F7F", className: cn(className, "size-6"), children: [_jsx("path", { d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" }), _jsx("path", { fillRule: "evenodd", d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z", clipRule: "evenodd" })] }));
5
+ }
6
+ function Close({ onClick, className = "" }) {
7
+ return (_jsxs("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#7F7F7F", className: cn(className, "size-6"), children: [_jsx("path", { d: "M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z" }), _jsx("path", { d: "M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z" }), _jsx("path", { d: "M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z" })] }));
8
+ }
9
+ const Eye = {
10
+ Open,
11
+ Close,
12
+ };
13
+ export default Eye;
@@ -0,0 +1,48 @@
1
+ import { OnClick } from "../../interface";
2
+ import { cn } from "../../util";
3
+
4
+ export interface EyeProps {
5
+ onClick: OnClick;
6
+ className?: string;
7
+ }
8
+ function Open({ onClick, className = "" }: EyeProps) {
9
+ return (
10
+ <svg
11
+ onClick={onClick}
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ viewBox="0 0 24 24"
14
+ fill="#7F7F7F"
15
+ className={cn(className, "size-6")}
16
+ >
17
+ <path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" />
18
+ <path
19
+ fillRule="evenodd"
20
+ d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z"
21
+ clipRule="evenodd"
22
+ />
23
+ </svg>
24
+ );
25
+ }
26
+
27
+ function Close({ onClick, className = "" }: EyeProps) {
28
+ return (
29
+ <svg
30
+ onClick={onClick}
31
+ xmlns="http://www.w3.org/2000/svg"
32
+ viewBox="0 0 24 24"
33
+ fill="#7F7F7F"
34
+ className={cn(className, "size-6")}
35
+ >
36
+ <path d="M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z" />
37
+ <path d="M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z" />
38
+ <path d="M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z" />
39
+ </svg>
40
+ );
41
+ }
42
+
43
+ const Eye = {
44
+ Open,
45
+ Close,
46
+ };
47
+
48
+ export default Eye;
@@ -1,5 +1,6 @@
1
- import { OnClick } from "../../interface";
1
+ import { OnClick, Size } from "../../interface";
2
2
  export interface IconProps {
3
+ size?: Size;
3
4
  onClick?: OnClick;
4
5
  }
5
6
  declare const Icon: {
@@ -11,11 +12,11 @@ declare const Icon: {
11
12
  Document: typeof Document;
12
13
  };
13
14
  export default Icon;
14
- declare function Calendar({ onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
15
- declare function Notification({ onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
16
- declare function Search({ onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
17
- declare function Browser({ onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
18
- declare function Event({ onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function Calendar({ size, onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function Notification({ size, onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function Search({ size, onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
18
+ declare function Browser({ size, onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
19
+ declare function Event({ size, onClick }: IconProps): import("react/jsx-runtime").JSX.Element;
19
20
  declare function Document({ theme }: {
20
21
  theme: "blue" | "red";
21
22
  }): import("react/jsx-runtime").JSX.Element;
package/asset/svg/Icon.js CHANGED
@@ -8,20 +8,20 @@ const Icon = {
8
8
  Document,
9
9
  };
10
10
  export default Icon;
11
- function Calendar({ onClick }) {
12
- return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M6.75 3V5.25M17.25 3V5.25M3 18.75V7.5C3 6.90326 3.23705 6.33097 3.65901 5.90901C4.08097 5.48705 4.65326 5.25 5.25 5.25H18.75C19.3467 5.25 19.919 5.48705 20.341 5.90901C20.7629 6.33097 21 6.90326 21 7.5V18.75M3 18.75C3 19.3467 3.23705 19.919 3.65901 20.341C4.08097 20.7629 4.65326 21 5.25 21H18.75C19.3467 21 19.919 20.7629 20.341 20.341C20.7629 19.919 21 19.3467 21 18.75M3 18.75V11.25C3 10.6533 3.23705 10.081 3.65901 9.65901C4.08097 9.23705 4.65326 9 5.25 9H18.75C19.3467 9 19.919 9.23705 20.341 9.65901C20.7629 10.081 21 10.6533 21 11.25V18.75", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
11
+ function Calendar({ size = "md", onClick }) {
12
+ return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M6.75 3V5.25M17.25 3V5.25M3 18.75V7.5C3 6.90326 3.23705 6.33097 3.65901 5.90901C4.08097 5.48705 4.65326 5.25 5.25 5.25H18.75C19.3467 5.25 19.919 5.48705 20.341 5.90901C20.7629 6.33097 21 6.90326 21 7.5V18.75M3 18.75C3 19.3467 3.23705 19.919 3.65901 20.341C4.08097 20.7629 4.65326 21 5.25 21H18.75C19.3467 21 19.919 20.7629 20.341 20.341C20.7629 19.919 21 19.3467 21 18.75M3 18.75V11.25C3 10.6533 3.23705 10.081 3.65901 9.65901C4.08097 9.23705 4.65326 9 5.25 9H18.75C19.3467 9 19.919 9.23705 20.341 9.65901C20.7629 10.081 21 10.6533 21 11.25V18.75", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
13
13
  }
14
- function Notification({ onClick }) {
15
- return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M14.8565 17.082C16.7197 16.8614 18.5504 16.4217 20.3105 15.772C18.8199 14.1208 17.9962 11.9745 17.9995 9.75V9C17.9995 7.4087 17.3674 5.88258 16.2421 4.75736C15.1169 3.63214 13.5908 3 11.9995 3C10.4082 3 8.88208 3.63214 7.75686 4.75736C6.63164 5.88258 5.9995 7.4087 5.9995 9V9.75C6.00252 11.9746 5.17849 14.121 3.6875 15.772C5.4205 16.412 7.2475 16.857 9.1425 17.082M14.8565 17.082C12.9585 17.3071 11.0405 17.3071 9.1425 17.082M14.8565 17.082C15.0006 17.5319 15.0364 18.0094 14.9611 18.4757C14.8857 18.942 14.7013 19.384 14.4229 19.7656C14.1444 20.1472 13.7798 20.4576 13.3587 20.6716C12.9376 20.8856 12.4719 20.9972 11.9995 20.9972C11.5271 20.9972 11.0614 20.8856 10.6403 20.6716C10.2192 20.4576 9.85457 20.1472 9.57612 19.7656C9.29767 19.384 9.11326 18.942 9.03791 18.4757C8.96256 18.0094 8.9984 17.5319 9.1425 17.082", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
14
+ function Notification({ size = "md", onClick }) {
15
+ return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M14.8565 17.082C16.7197 16.8614 18.5504 16.4217 20.3105 15.772C18.8199 14.1208 17.9962 11.9745 17.9995 9.75V9C17.9995 7.4087 17.3674 5.88258 16.2421 4.75736C15.1169 3.63214 13.5908 3 11.9995 3C10.4082 3 8.88208 3.63214 7.75686 4.75736C6.63164 5.88258 5.9995 7.4087 5.9995 9V9.75C6.00252 11.9746 5.17849 14.121 3.6875 15.772C5.4205 16.412 7.2475 16.857 9.1425 17.082M14.8565 17.082C12.9585 17.3071 11.0405 17.3071 9.1425 17.082M14.8565 17.082C15.0006 17.5319 15.0364 18.0094 14.9611 18.4757C14.8857 18.942 14.7013 19.384 14.4229 19.7656C14.1444 20.1472 13.7798 20.4576 13.3587 20.6716C12.9376 20.8856 12.4719 20.9972 11.9995 20.9972C11.5271 20.9972 11.0614 20.8856 10.6403 20.6716C10.2192 20.4576 9.85457 20.1472 9.57612 19.7656C9.29767 19.384 9.11326 18.942 9.03791 18.4757C8.96256 18.0094 8.9984 17.5319 9.1425 17.082", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
16
16
  }
17
- function Search({ onClick }) {
18
- return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M21.0008 21L15.8038 15.803M15.8038 15.803C17.2104 14.3965 18.0006 12.4887 18.0006 10.4995C18.0006 8.51035 17.2104 6.60262 15.8038 5.19605C14.3972 3.78947 12.4895 2.99927 10.5003 2.99927C8.51108 2.99927 6.60336 3.78947 5.19678 5.19605C3.79021 6.60262 3 8.51035 3 10.4995C3 12.4887 3.79021 14.3965 5.19678 15.803C6.60336 17.2096 8.51108 17.9998 10.5003 17.9998C12.4895 17.9998 14.3972 17.2096 15.8038 15.803Z", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17
+ function Search({ size = "md", onClick }) {
18
+ return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M21.0008 21L15.8038 15.803M15.8038 15.803C17.2104 14.3965 18.0006 12.4887 18.0006 10.4995C18.0006 8.51035 17.2104 6.60262 15.8038 5.19605C14.3972 3.78947 12.4895 2.99927 10.5003 2.99927C8.51108 2.99927 6.60336 3.78947 5.19678 5.19605C3.79021 6.60262 3 8.51035 3 10.4995C3 12.4887 3.79021 14.3965 5.19678 15.803C6.60336 17.2096 8.51108 17.9998 10.5003 17.9998C12.4895 17.9998 14.3972 17.2096 15.8038 15.803Z", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
19
19
  }
20
- function Browser({ onClick }) {
21
- return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M3 8.25V18C3 18.5967 3.23705 19.169 3.65901 19.591C4.08097 20.0129 4.65326 20.25 5.25 20.25H18.75C19.3467 20.25 19.919 20.0129 20.341 19.591C20.7629 19.169 21 18.5967 21 18V8.25M3 8.25V6C3 5.40326 3.23705 4.83097 3.65901 4.40901C4.08097 3.98705 4.65326 3.75 5.25 3.75H18.75C19.3467 3.75 19.919 3.98705 20.341 4.40901C20.7629 4.83097 21 5.40326 21 6V8.25M3 8.25H21M5.25 6H5.258V6.008H5.25V6ZM7.5 6H7.508V6.008H7.5V6ZM9.75 6H9.758V6.008H9.75V6Z", stroke: "white", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
20
+ function Browser({ size = "md", onClick }) {
21
+ return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M3 8.25V18C3 18.5967 3.23705 19.169 3.65901 19.591C4.08097 20.0129 4.65326 20.25 5.25 20.25H18.75C19.3467 20.25 19.919 20.0129 20.341 19.591C20.7629 19.169 21 18.5967 21 18V8.25M3 8.25V6C3 5.40326 3.23705 4.83097 3.65901 4.40901C4.08097 3.98705 4.65326 3.75 5.25 3.75H18.75C19.3467 3.75 19.919 3.98705 20.341 4.40901C20.7629 4.83097 21 5.40326 21 6V8.25M3 8.25H21M5.25 6H5.258V6.008H5.25V6ZM7.5 6H7.508V6.008H7.5V6ZM9.75 6H9.758V6.008H9.75V6Z", stroke: "white", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
22
22
  }
23
- function Event({ onClick }) {
24
- return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M21 11.25V19.5C21 19.8978 20.842 20.2794 20.5607 20.5607C20.2794 20.842 19.8978 21 19.5 21H5.25C4.85218 21 4.47064 20.842 4.18934 20.5607C3.90804 20.2794 3.75 19.8978 3.75 19.5V11.25M12 4.875C12 4.35583 11.846 3.84831 11.5576 3.41663C11.2692 2.98495 10.8592 2.6485 10.3795 2.44982C9.89989 2.25114 9.37209 2.19915 8.86289 2.30044C8.35369 2.40173 7.88596 2.65173 7.51884 3.01885C7.15173 3.38596 6.90172 3.85369 6.80044 4.36289C6.69915 4.87209 6.75114 5.39989 6.94982 5.87954C7.1485 6.3592 7.48495 6.76917 7.91663 7.05761C8.34831 7.34605 8.85582 7.5 9.375 7.5H12M12 4.875V7.5M12 4.875C12 4.35583 12.154 3.84831 12.4424 3.41663C12.7308 2.98495 13.1408 2.6485 13.6205 2.44982C14.1001 2.25114 14.6279 2.19915 15.1371 2.30044C15.6463 2.40173 16.114 2.65173 16.4812 3.01885C16.8483 3.38596 17.0983 3.85369 17.1996 4.36289C17.3008 4.87209 17.2489 5.39989 17.0502 5.87954C16.8515 6.3592 16.5151 6.76917 16.0834 7.05761C15.6517 7.34605 15.1442 7.5 14.625 7.5H12M12 7.5V21M3.375 11.25H21.375C21.996 11.25 22.5 10.746 22.5 10.125V8.625C22.5 8.004 21.996 7.5 21.375 7.5H3.375C2.754 7.5 2.25 8.004 2.25 8.625V10.125C2.25 10.746 2.754 11.25 3.375 11.25Z", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
23
+ function Event({ size = "md", onClick }) {
24
+ return (_jsx("svg", { onClick: onClick, xmlns: "http://www.w3.org/2000/svg", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M21 11.25V19.5C21 19.8978 20.842 20.2794 20.5607 20.5607C20.2794 20.842 19.8978 21 19.5 21H5.25C4.85218 21 4.47064 20.842 4.18934 20.5607C3.90804 20.2794 3.75 19.8978 3.75 19.5V11.25M12 4.875C12 4.35583 11.846 3.84831 11.5576 3.41663C11.2692 2.98495 10.8592 2.6485 10.3795 2.44982C9.89989 2.25114 9.37209 2.19915 8.86289 2.30044C8.35369 2.40173 7.88596 2.65173 7.51884 3.01885C7.15173 3.38596 6.90172 3.85369 6.80044 4.36289C6.69915 4.87209 6.75114 5.39989 6.94982 5.87954C7.1485 6.3592 7.48495 6.76917 7.91663 7.05761C8.34831 7.34605 8.85582 7.5 9.375 7.5H12M12 4.875V7.5M12 4.875C12 4.35583 12.154 3.84831 12.4424 3.41663C12.7308 2.98495 13.1408 2.6485 13.6205 2.44982C14.1001 2.25114 14.6279 2.19915 15.1371 2.30044C15.6463 2.40173 16.114 2.65173 16.4812 3.01885C16.8483 3.38596 17.0983 3.85369 17.1996 4.36289C17.3008 4.87209 17.2489 5.39989 17.0502 5.87954C16.8515 6.3592 16.5151 6.76917 16.0834 7.05761C15.6517 7.34605 15.1442 7.5 14.625 7.5H12M12 7.5V21M3.375 11.25H21.375C21.996 11.25 22.5 10.746 22.5 10.125V8.625C22.5 8.004 21.996 7.5 21.375 7.5H3.375C2.754 7.5 2.25 8.004 2.25 8.625V10.125C2.25 10.746 2.754 11.25 3.375 11.25Z", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
25
25
  }
26
26
  function Document({ theme }) {
27
27
  const color = {
@@ -1,7 +1,8 @@
1
- import { OnClick } from "../../interface";
1
+ import { OnClick, Size } from "../../interface";
2
2
  import { cn } from "../../util";
3
3
 
4
4
  export interface IconProps {
5
+ size?: Size;
5
6
  onClick?: OnClick;
6
7
  }
7
8
 
@@ -16,13 +17,13 @@ const Icon = {
16
17
 
17
18
  export default Icon;
18
19
 
19
- function Calendar({ onClick }: IconProps) {
20
+ function Calendar({ size = "md", onClick }: IconProps) {
20
21
  return (
21
22
  <svg
22
23
  onClick={onClick}
23
24
  xmlns="http://www.w3.org/2000/svg"
24
- width="24"
25
- height="24"
25
+ width={size === "lg" ? 36 : 24}
26
+ height={size === "lg" ? 36 : 24}
26
27
  viewBox="0 0 24 24"
27
28
  fill="none"
28
29
  >
@@ -37,13 +38,13 @@ function Calendar({ onClick }: IconProps) {
37
38
  );
38
39
  }
39
40
 
40
- function Notification({ onClick }: IconProps) {
41
+ function Notification({ size = "md", onClick }: IconProps) {
41
42
  return (
42
43
  <svg
43
44
  onClick={onClick}
44
45
  xmlns="http://www.w3.org/2000/svg"
45
- width="24"
46
- height="24"
46
+ width={size === "lg" ? 36 : 24}
47
+ height={size === "lg" ? 36 : 24}
47
48
  viewBox="0 0 24 24"
48
49
  fill="none"
49
50
  >
@@ -58,13 +59,13 @@ function Notification({ onClick }: IconProps) {
58
59
  );
59
60
  }
60
61
 
61
- function Search({ onClick }: IconProps) {
62
+ function Search({ size = "md", onClick }: IconProps) {
62
63
  return (
63
64
  <svg
64
65
  onClick={onClick}
65
66
  xmlns="http://www.w3.org/2000/svg"
66
- width="24"
67
- height="24"
67
+ width={size === "lg" ? 36 : 24}
68
+ height={size === "lg" ? 36 : 24}
68
69
  viewBox="0 0 24 24"
69
70
  fill="none"
70
71
  >
@@ -79,13 +80,13 @@ function Search({ onClick }: IconProps) {
79
80
  );
80
81
  }
81
82
 
82
- function Browser({ onClick }: IconProps) {
83
+ function Browser({ size = "md", onClick }: IconProps) {
83
84
  return (
84
85
  <svg
85
86
  onClick={onClick}
86
87
  xmlns="http://www.w3.org/2000/svg"
87
- width="24"
88
- height="24"
88
+ width={size === "lg" ? 36 : 24}
89
+ height={size === "lg" ? 36 : 24}
89
90
  viewBox="0 0 24 24"
90
91
  fill="none"
91
92
  >
@@ -100,13 +101,13 @@ function Browser({ onClick }: IconProps) {
100
101
  );
101
102
  }
102
103
 
103
- function Event({ onClick }: IconProps) {
104
+ function Event({ size = "md", onClick }: IconProps) {
104
105
  return (
105
106
  <svg
106
107
  onClick={onClick}
107
108
  xmlns="http://www.w3.org/2000/svg"
108
- width="24"
109
- height="24"
109
+ width={size === "lg" ? 36 : 24}
110
+ height={size === "lg" ? 36 : 24}
110
111
  viewBox="0 0 24 24"
111
112
  fill="none"
112
113
  >
@@ -4,62 +4,87 @@ import { Input, Select } from "../../../widget";
4
4
  import { useResponsive } from "../../../hook";
5
5
  export default function Header({ state, seriesState, levelState, }) {
6
6
  const container = {
7
- displays: "flex justify-between items-start",
8
- sizes: "w-full h-15",
7
+ displays: "flex justify-between items-start flex-wrap flex-none gap-y-5 gap-x-5",
8
+ sizes: "w-full h-fit",
9
9
  boundaries: "px-5 pb-5",
10
10
  };
11
+ const selectWrapper = {
12
+ display: "flex flex-row gap-3.5",
13
+ };
14
+ const ghostSelect = {
15
+ sizes: "w-[152px], h-[36px] relative",
16
+ };
11
17
  const res = useResponsive();
12
- return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-x-3.5", children: [_jsx(Input, { state: state, placeholder: res ? "키워드를 입력하세요" : "", option: {
13
- width: "sm",
14
- } }), _jsx(Select, { selectOptions: [
15
- ["TOSEL VOCA Series", "Voca Series"],
16
- ["Story Series", "Story Series"],
17
- ["Listening Series", "Listening Series"],
18
- ["Speaking Series", "Speaking Series"],
19
- ["실전문제집1", "실전문제집1"],
20
- ["TOSEL 실전문제집2", "실전문제집2"],
21
- ["유형분석집", "유형분석집1"],
22
- ["유형분석집2", "유형분석집2"],
23
- ["예상문제집", "예상문제집"],
24
- ["심화문제집", "심화문제집"],
25
- ["기출연습", "기출연습"],
26
- ["기출모의고사", "기출모의고사"],
27
- ], state: seriesState, placeholder: "\uC2DC\uB9AC\uC988" }), _jsx(Select, { selectOptions: [
28
- {
29
- title: "Pre-Starter",
30
- value: "PS",
31
- },
32
- {
33
- title: "Starter",
34
- value: "ST",
35
- },
36
- {
37
- title: "Basic",
38
- value: "BA",
39
- },
40
- {
41
- title: "Junior",
42
- value: "JR",
43
- },
44
- {
45
- title: "High Junior",
46
- value: "HJ",
47
- },
48
- ], state: levelState, placeholder: "\uB808\uBCA8" })] }), _jsx(ContentBox, { contents: [
18
+ return (_jsxs("div", { className: cn(container), children: [_jsx(Input, { state: state, placeholder: res ? "키워드를 입력하세요" : "", option: {
19
+ width: "md",
20
+ } }), _jsxs("div", { className: cn(selectWrapper), children: [_jsx("div", { className: cn(ghostSelect), children: _jsx(Select, { selectOptions: [
21
+ ["TOSEL VOCA Series", "Voca Series"],
22
+ ["Story Series", "Story Series"],
23
+ ["Listening Series", "Listening Series"],
24
+ ["Speaking Series", "Speaking Series"],
25
+ ["실전문제집1", "실전문제집1"],
26
+ ["TOSEL 실전문제집2", "실전문제집2"],
27
+ ["유형분석집", "유형분석집1"],
28
+ ["유형분석집2", "유형분석집2"],
29
+ ["예상문제집", "예상문제집"],
30
+ ["심화문제집", "심화문제집"],
31
+ ["기출연습", "기출연습"],
32
+ ["기출모의고사", "기출모의고사"],
33
+ ], state: seriesState, placeholder: "\uC2DC\uB9AC\uC988" }) }), _jsx("div", { className: cn(ghostSelect), children: _jsx(Select, { selectOptions: [
34
+ {
35
+ title: "Pre-Starter",
36
+ value: "PS",
37
+ },
38
+ {
39
+ title: "Starter",
40
+ value: "ST",
41
+ },
42
+ {
43
+ title: "Basic",
44
+ value: "BA",
45
+ },
46
+ {
47
+ title: "Junior",
48
+ value: "JR",
49
+ },
50
+ {
51
+ title: "High Junior",
52
+ value: "HJ",
53
+ },
54
+ ], state: levelState, placeholder: "\uB808\uBCA8" }) })] }), _jsx(ContentBox, { contents: [
49
55
  {
50
56
  title: "교재 음원",
51
57
  onClick: () => { },
58
+ disabled: false,
59
+ },
60
+ {
61
+ title: "정오표",
62
+ onClick: () => { },
63
+ disabled: true,
64
+ },
65
+ {
66
+ title: "홍보자료",
67
+ onClick: () => { },
68
+ disabled: true,
69
+ },
70
+ {
71
+ title: "기타 자료",
72
+ onClick: () => { },
73
+ disabled: true,
52
74
  },
53
75
  ] })] }));
54
76
  }
55
77
  function ContentBox({ contents }) {
56
78
  const container = {
57
- sizes: "h-[38px]",
79
+ sizes: "flex flex-1 flex-nowrap flex-row items-center justify-start w-fit flex-none",
58
80
  };
59
81
  const buttonBox = {
82
+ displays: "flex flex-none",
60
83
  boundaries: "p-3 rounded-[8px]",
61
84
  fonts: "leading-none text-[12px]",
62
- backgrounds: "bg-green-dark/10",
85
+ other: contents.map((content) => content.disabled)
86
+ ? "bg-green-dark/10 text-green-dark"
87
+ : "bg-none text-gray-medium",
63
88
  };
64
89
  return (_jsx("div", { className: cn(container), children: contents.map((content) => (_jsx("button", { className: cn(buttonBox), children: content.title }, content.title))) }));
65
90
  }
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useActionStore } from "../../store";
2
3
  import { cn } from "../../util";
3
4
  export default function BbsLayout({ title, icon, topRight, children, }) {
5
+ const { setFlag } = useActionStore();
4
6
  const container = {
5
7
  displays: "flex flex-col items-center",
6
8
  sizes: "w-full min-h-screen",
@@ -14,5 +16,5 @@ export default function BbsLayout({ title, icon, topRight, children, }) {
14
16
  sizes: "w-full h-[188px]",
15
17
  boundaries: "px-12 pb-10",
16
18
  };
17
- return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(header), children: [_jsxs("div", { className: "flex gap-x-5 items-center", children: [icon, _jsx("div", { className: "text-[40px] leading-none font-pretendard-bold text-green-dark", children: title })] }), topRight] }), children] }) }));
19
+ return (_jsx("div", { className: cn(container), onClick: setFlag, children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(header), children: [_jsxs("div", { className: "flex gap-x-5 items-center", children: [icon, _jsx("div", { className: "text-[40px] leading-none font-pretendard-bold text-green-dark", children: title })] }), topRight] }), children] }) }));
18
20
  }
@@ -1,31 +1,88 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
2
3
  import { cn, gradient } from "../../../../util";
3
4
  import { Label } from "../../../../widget";
5
+ import { useResponsive } from "../../../../hook";
4
6
  export default function Header({ logo, rightButton, contents, }) {
7
+ const [isExpanded, setIsExpanded] = useState(false);
8
+ const toggleHeight = () => {
9
+ setIsExpanded(!isExpanded);
10
+ };
11
+ const handleClickOutside = (event) => {
12
+ const menuElement = document.getElementById("buttonArea");
13
+ if (menuElement && !menuElement.contains(event.target)) {
14
+ setIsExpanded(false);
15
+ }
16
+ };
17
+ //버튼, 혹은 외부를 클릭시 메뉴 닫음
18
+ useEffect(() => {
19
+ if (isExpanded) {
20
+ document.addEventListener("click", handleClickOutside);
21
+ }
22
+ else {
23
+ document.removeEventListener("click", handleClickOutside);
24
+ }
25
+ return () => {
26
+ document.removeEventListener("click", handleClickOutside);
27
+ };
28
+ }, [isExpanded]);
29
+ const isMD = useResponsive("md");
30
+ //메뉴바 배경
5
31
  const container = {
6
- positions: "fixed top-0 left-0 z-40",
7
- displays: "flex justify-center items-center",
32
+ positions: "fixed top-0 left-0 z-40 md:h-15",
33
+ displays: "flex justify-center items-start overflow-hidden",
8
34
  sizes: "w-full",
9
35
  styles: "bg-white box-shadow",
10
36
  textstyles: "antialiased",
37
+ animation: !isMD && isExpanded ? "animate-grow" : "animate-shrink"
11
38
  };
12
39
  const body = {
13
- displays: "flex items-center justify-center md:justify-between",
14
- className: "w-full max-w-[1200px] h-15",
15
- boundaries: "md:px-12 py-2.5",
40
+ displays: "flex md:flex-row flex-col md:items-center items-start justify-between",
41
+ className: "w-full max-w-[1200px]",
42
+ boundaries: "p-0 sm:px-12",
43
+ };
44
+ const buttonBoxWrapper = {
45
+ displays: "inline-flex items-center flex-nowrap",
46
+ scrollStyles: "overflow-y-scroll scrollbar-hidden",
47
+ spacings: "pr-10 gap-2.5 h-15 md:pr-0",
16
48
  };
17
49
  const buttonBox = {
18
- fonts: "text-[9px] xs:text-[10px] sm:text-[11px] md:text-[16px] leading-tight",
50
+ fonts: "text-base leading-tight",
19
51
  texts: "text-gray-dark hover:text-black",
20
52
  backgrounds: "hover:bg-[#F0F0F0]/50",
21
53
  animations: "duration-300",
22
- sizes: "h-10 rounded-md",
23
- boundaries: "px-0.5 md:px-2.5",
24
- };
25
- return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsx("div", { className: "hidden md:block", onClick: logo.onClick, children: logo.node }), _jsxs("div", { className: "flex items-center gap-x-7.5 md:gap-x-12", children: [_jsx("div", { className: "flex items-center gap-2.5", children: contents.map((button, index) => (_jsx("button", { onClick: button.onClick, className: cn(buttonBox), children: button.title }, index))) }), rightButton && (_jsx(Label.Button, { title: rightButton.title, onClick: rightButton?.onClick, option: {
26
- width: "2xs",
27
- height: "4xs",
28
- background: gradient.bg.greenToRed,
29
- text: "text-white",
30
- } }))] })] }) }));
54
+ sizes: "h-10 rounded-md w-fit flex-none",
55
+ spacings: "px-2.5",
56
+ scrollMargin: "translate-x-5 md:translate-x-0 "
57
+ };
58
+ const leftWrapper = {
59
+ displays: "flex flex-row gap-6 items-center flex-none",
60
+ sizes: "w-full md:w-fit justify-between md:justify-start pl-5 pr-2 sm:px-0",
61
+ };
62
+ const rightWrapper = {
63
+ displays: "flex flex-row justify-center md:justify-start",
64
+ spacings: "items-center gap-x-6 ml:gap-x-12 ",
65
+ sizes: "w-full md:w-fit",
66
+ boundaries: "border-gray-light border-t-2",
67
+ };
68
+ const essenstialsWrapper = {
69
+ displays: "flex flex-row items-center h-15",
70
+ spacings: "gap-2 md:gap-6",
71
+ sizes: "h-15",
72
+ responsiveAction: "block md:hidden",
73
+ };
74
+ const menuButton = {
75
+ displays: "flex justify-center items-center p-2",
76
+ };
77
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(leftWrapper), children: [_jsx("div", { onClick: logo.onClick, children: logo.node }), _jsxs("div", { className: cn(essenstialsWrapper), id: "buttonArea", children: [rightButton && (_jsx(Label.Button, { title: rightButton.title, onClick: rightButton?.onClick, option: {
78
+ width: "2xs",
79
+ height: "xs",
80
+ background: gradient.bg.greenToRed,
81
+ text: "text-white",
82
+ } })), _jsx("button", { onClick: toggleHeight, className: cn(menuButton), children: _jsx("div", { className: "w-6 h-6", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [!isExpanded && _jsx("path", { id: "menu", fill: "#B0B8C1", d: "M4.118 6.2h16a1.2 1.2 0 100-2.4h-16a1.2 1.2 0 100 2.4m16 4.6h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4m0 7h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4", "fill-rule": "evenodd" }), isExpanded && _jsx("path", { id: "close", fill: "#B0B8C1", "fill-rule": "evenodd", d: "M13.815 12l5.651-5.651a1.2 1.2 0 00-1.697-1.698l-5.651 5.652-5.652-5.652a1.201 1.201 0 00-1.697 1.698L10.421 12l-5.652 5.651a1.202 1.202 0 00.849 2.049c.307 0 .614-.117.848-.351l5.652-5.652 5.651 5.652a1.198 1.198 0 001.697 0 1.2 1.2 0 000-1.698L13.815 12z" })] }) }) })] })] }), _jsxs("div", { className: cn(rightWrapper), children: [_jsx("div", { className: cn(buttonBoxWrapper), children: contents.map((button, index) => (_jsx("button", { onClick: button.onClick, className: cn(buttonBox), children: button.title }, index))) }), _jsx("div", { className: "hidden md:block", children: rightButton && (_jsx(Label.Button, { title: rightButton.title, onClick: rightButton?.onClick, option: {
83
+ width: "2xs",
84
+ height: "xs",
85
+ background: gradient.bg.greenToRed,
86
+ text: "text-white",
87
+ } })) })] })] }) }));
31
88
  }
@@ -5,9 +5,11 @@ interface Browser {
5
5
  interface Calendar {
6
6
  schedules: {
7
7
  onClick?: OnClick;
8
- category: string;
9
8
  title: string;
10
- description?: string | [string] | [string, string];
9
+ applyDay: Date;
10
+ testStart: Date;
11
+ testEnd?: Date;
12
+ gradeOpen: Date;
11
13
  }[];
12
14
  }
13
15
  interface Notice {
@@ -2,26 +2,23 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useEffect, useState } from "react";
3
3
  import { animated, useTransition } from "react-spring";
4
4
  import SVG from "../../../../asset/SVG";
5
- import { cn } from "../../../../util";
5
+ import { cn, compareDates, convertDateToString } from "../../../../util";
6
6
  import { useActionStore } from "../../../../store";
7
7
  import { LineBreaks } from "../../../../text";
8
+ import { useResponsive } from "../../../../hook";
8
9
  export default function Navigation({ browser, calendar, notice, event, }) {
9
10
  const { flag } = useActionStore();
10
11
  const [isOpen, setIsOpen] = useState(false);
11
12
  const [isHidden, setIsHidden] = useState(false);
12
13
  const [type, setType] = useState();
13
14
  const container = {
14
- displays: "flex flex-col justify-center gap-y-5 items-center",
15
- sizes: !isOpen ? "h-80 rounded-r-xl" : "h-screen",
16
- widths: !isHidden ? "w-[56px] duration-100" : "w-0 duration-500",
17
- backgrounds: "bg-gradient-to-b from-green-dark to-crimson-burgundy",
15
+ displays: "flex flex-row md:flex-col justify-center gap-x-8 sm:gap-x-12 gap-y-5 items-center",
16
+ sizes: !isOpen ? "h-16 md:h-80 md:rounded-r-xl" : "h-16 md:h-screen",
17
+ widths: !isHidden
18
+ ? "w-screen md:w-[56px] duration-100"
19
+ : "w-0 duration-100",
20
+ backgrounds: "bg-gradient-to-r md:bg-gradient-to-b from-green-dark to-crimson-burgundy",
18
21
  };
19
- const overlayPopTransition = useTransition(!isHidden && isOpen, {
20
- from: { width: "0%" },
21
- enter: { width: "30%" },
22
- leave: { width: "0%" },
23
- config: { duration: 100 },
24
- });
25
22
  const overlayCoverTransition = useTransition(isHidden, {
26
23
  from: { width: "0%" },
27
24
  enter: { width: "100%" },
@@ -47,27 +44,66 @@ export default function Navigation({ browser, calendar, notice, event, }) {
47
44
  };
48
45
  const itemContainer = {
49
46
  positions: "fixed top-0 left-0 z-40 ",
50
- sizes: "h-screen ",
51
- boundaries: "pl-[56px]",
52
- styles: "overflow-hidden bg-white ",
47
+ sizes: "h-screen w-[400px]",
48
+ boundaries: "md:pl-[56px]",
49
+ styles: "overflow-hidden bg-black/20 backdrop-blur-sm",
50
+ shadows: "shadow-main",
53
51
  };
54
52
  const itemBody = {
55
- boundaries: "px-7.5 pt-[34px]",
53
+ positions: "absolute bottom-16 md:static md:bottom-auto ",
54
+ sizes: "w-full md:w-[556px] h-80 md:h-screen",
55
+ boundaries: "p-5",
56
+ styles: "bg-white overflow-hidden",
57
+ };
58
+ const iconWrapper = {
59
+ displays: "flex justify-center items-center",
60
+ sizes: "w-8 h-8 rounded-md",
61
+ animations: "hover:bg-white/20",
56
62
  };
63
+ const isMobile = useResponsive("md");
64
+ const overlayPopTransition = useTransition(!isHidden && isOpen, {
65
+ from: { width: "0%" },
66
+ enter: { width: "100%" },
67
+ leave: { width: "0%" },
68
+ config: { duration: isMobile ? 100 : 0 },
69
+ });
57
70
  return (_jsxs(_Fragment, { children: [overlayCoverTransition((styles, item) => item && (_jsxs(animated.div, { style: styles, className: "bg-white h-screen fixed top-0 left-0 z-40 flex flex-col justify-center items-center overflow-hidden gap-y-14 ", children: [_jsx("img", { src: "/images/logos/tosel.png", alt: "tosel", width: 368.56, height: 80.07 }), _jsx("div", { children: "dashboard loading..." })] }))), overlayPopTransition((styles, item) => type &&
58
- item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), children: [_jsx("div", { className: "text-[26px] font-bold text-gradient-green-to-red ", children: navigationTypeString[type] }), _jsx(NavigationItem, { type: type, calendar: calendar, notice: notice, event: event })] }) }))), _jsx("div", { className: "fixed top-1/2 -translate-y-1/2 flex justify-center items-center z-45", children: _jsxs("div", { onClick: (e) => e.stopPropagation(), className: cn(container), children: [_jsx(SVG.Icon.Calendar, { onClick: () => handleOpen("calendar") }), _jsx(SVG.Icon.Notification, { onClick: () => handleOpen("notification") }), _jsx(SVG.Icon.Search, { onClick: () => handleOpen("search") }), _jsx(SVG.Icon.Browser, { onClick: () => handleOpen("browser") }), _jsx(SVG.Icon.Event, { onClick: () => handleOpen("event") })] }) })] }));
71
+ item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), children: [_jsx("div", { className: "text-[20px] font-bold text-green-dark ", children: navigationTypeString[type] }), _jsx(NavigationItem, { type: type, calendar: calendar, notice: notice, event: event })] }) }))), _jsx("div", { className: "fixed bottom-0 md:top-1/2 md:-translate-y-1/2 flex justify-center items-center z-45", children: _jsxs("div", { onClick: (e) => e.stopPropagation(), className: cn(container), children: [_jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("calendar"), children: _jsx(SVG.Icon.Calendar, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("notification"), children: _jsx(SVG.Icon.Notification, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("search"), children: _jsx(SVG.Icon.Search, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("browser"), children: _jsx(SVG.Icon.Browser, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("event"), children: _jsx(SVG.Icon.Event, { size: isMobile ? "md" : "lg" }) })] }) })] }));
59
72
  }
60
73
  const navigationTypeString = {
61
- calendar: "시험 일정",
74
+ calendar: "시험 접수 일정",
62
75
  notification: "공지사항",
63
76
  event: "이벤트",
64
77
  };
65
78
  function NavigationItem({ type, calendar, notice, event, }) {
79
+ const cardWrapper = {
80
+ displays: "flex flex-col gap-y-5",
81
+ };
82
+ const cardBox = {
83
+ displays: "",
84
+ sizes: "",
85
+ };
86
+ const dateWrapper = {
87
+ displays: "flex flex-row gap-3",
88
+ };
89
+ const dateText = {
90
+ textStyles: "font-bold font-pretendar-var font-sm font-gray-dark",
91
+ spacings: "leading-normal",
92
+ };
93
+ const container = {
94
+ styles: "relative mt-[34px] scrollbar-hidden flex flex-row md:flex-col gap-y-[15px] md:h-screen overflow-x-scroll md:overflow-y-scroll",
95
+ };
96
+ const item = {
97
+ displays: "flex-shrink-0 flex flex-col md:justify-between ",
98
+ };
66
99
  if (type === "calendar")
67
- return (_jsx("div", { className: "mt-[34px] flex flex-col gap-y-[15px]", children: calendar.schedules.map(({ category, title, description, onClick }) => (_jsxs("div", { onClick: onClick, className: "flex flex-col justify-between w-full h-[184px] box-shadow rounded-[10px] p-7.5", children: [_jsxs("div", { children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: category }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx(LineBreaks, { texts: description, className: "text-gray-dark text-[18px]" })] }))) }));
100
+ return (_jsx("div", { className: cn(container), children: calendar.schedules.map(({ applyDay, onClick }) => {
101
+ const { isBefore, dDay } = compareDates(applyDay);
102
+ return (_jsx("div", { onClick: onClick, className: cn(item, "w-[400px] md:w-full h-[184px] shadow-main rounded-[10px] p-7.5"), children: _jsxs("div", { children: [_jsx("div", { className: "text-[16px] font-bold text-gray-dark", children: convertDateToString(applyDay) }), _jsx("div", { children: isBefore && _jsx("p", { children: "\uC811\uC218\uC911" }) })] }) }));
103
+ }) }));
68
104
  if (type === "notification")
69
- return (_jsx("div", { className: "mt-[34px] flex flex-col gap-y-[15px]", children: notice.announcements.map(({ title, date, description, onClick }) => (_jsxs("div", { onClick: onClick, className: "flex flex-col justify-between w-full h-[140px] box-shadow rounded-[10px] p-7.5", children: [_jsxs("div", { children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: date }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx(LineBreaks, { texts: description, className: "text-gray-dark text-[18px]" })] }))) }));
105
+ return (_jsx("div", { className: cn(container), children: notice.announcements.map(({ title, date, description, onClick }) => (_jsxs("div", { onClick: onClick, className: cn(item, "h-[140px] box-shadow rounded-[10px] p-7.5"), children: [_jsxs("div", { children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: date }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx(LineBreaks, { texts: description, className: "text-gray-dark text-[18px]" })] }))) }));
70
106
  if (type === "event")
71
- return (_jsx("div", { className: "mt-[34px] flex flex-col gap-y-[15px]", children: event.events.map(({ title, category, thumbnail, onClick }) => (_jsxs("div", { onClick: onClick, className: "flex flex-col justify-between w-full box-shadow rounded-[10px] p-7.5", children: [_jsxs("div", { className: "h-[92px] border-b-2", children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: category }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx("div", { className: "image-container pt-[15px]", children: _jsx("img", { src: thumbnail, alt: title, className: "w-full" }) })] }))) }));
107
+ return (_jsx("div", { className: cn(container), children: event.events.map(({ title, thumbnail, onClick }) => (_jsx("div", { onClick: onClick, className: cn(item, "w-full box-shadow rounded-[10px] p-7.5"), children: _jsx("div", { className: "image-container pt-[15px]", children: _jsx("img", { src: thumbnail, alt: title, className: "w-full" }) }) }))) }));
72
108
  return null;
73
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.153",
3
+ "version": "1.0.155",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -14,6 +14,7 @@
14
14
  "type": "module",
15
15
  "scripts": {},
16
16
  "dependencies": {
17
+ "@edu-tosel/design": "^1.0.153",
17
18
  "@gsap/react": "^2.1.1",
18
19
  "date-fns": "^2.30.0",
19
20
  "date-fns-tz": "^2.0.1",
@@ -32,10 +32,21 @@ export default {
32
32
  },
33
33
  boxShadow: {
34
34
  main: "0 2px 10px 0px rgba(0, 0, 0, 0.14)",
35
+ 'main-small': "0 0px 5px 0px rgba(0, 0, 0, 0.1)",
35
36
  "main-hover": "0 10px 12px 0px rgba(0, 0, 0, 0.3)",
36
37
  green: "0 0px 10px 0px rgba(16, 86, 82, 0.38)",
37
38
  },
38
39
  keyframes: {
40
+
41
+ grow: {
42
+ '0%': { height: '60px' },
43
+ '100%': { height: '120px' },
44
+ },
45
+ shrink: {
46
+ '0%': { height: '120px' },
47
+ '100%': { height: '60px' },
48
+ },
49
+
39
50
  slideBackground: {
40
51
  "0%, 100%": { backgroundPosition: "left center" },
41
52
  "50%": { backgroundPosition: "right center" },
@@ -57,6 +68,12 @@ export default {
57
68
  to: { width: "0%" },
58
69
  },
59
70
  },
71
+
72
+ animation: {
73
+ grow: 'grow 0.2s ease-in-out forwards',
74
+ shrink: 'shrink 0.2s ease-in-out forwards',
75
+ },
76
+
60
77
  colors: {
61
78
  "white-off": "#F5F5F5",
62
79
  "red-burgundy": "#933652",
@@ -0,0 +1,4 @@
1
+ export default function compareDates(targetDate: Date): {
2
+ isBefore: boolean;
3
+ dDay: string | null;
4
+ };
@@ -0,0 +1,32 @@
1
+ export default function compareDates(targetDate) {
2
+ const currentDate = new Date();
3
+ const KSTOffset = 9 * 60 * 60 * 1000;
4
+ const KSTDate = new Date(currentDate.getTime() + KSTOffset);
5
+ const targetDateKST = new Date(targetDate.getTime() + KSTOffset);
6
+ const isBefore = KSTDate < targetDateKST;
7
+ const timeDiff = targetDateKST.getTime() - KSTDate.getTime();
8
+ if (isBefore) {
9
+ if (timeDiff < 24 * 60 * 60 * 1000) {
10
+ const hours = Math.floor(timeDiff / (1000 * 60 * 60));
11
+ const minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60));
12
+ const seconds = Math.floor((timeDiff % (1000 * 60)) / 1000);
13
+ return {
14
+ isBefore,
15
+ dDay: `${hours}시 ${minutes}분 ${seconds}초`,
16
+ };
17
+ }
18
+ else {
19
+ const days = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
20
+ return {
21
+ isBefore,
22
+ dDay: `D-${days}`,
23
+ };
24
+ }
25
+ }
26
+ else {
27
+ return {
28
+ isBefore,
29
+ dDay: null,
30
+ };
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ export default function formatDateToString(date: Date): string;
@@ -0,0 +1,6 @@
1
+ export default function formatDateToString(date) {
2
+ const year = date.getFullYear();
3
+ const month = (date.getMonth() + 1).toString().padStart(2, "0"); // 월은 0부터 시작하므로 +1
4
+ const day = date.getDate().toString().padStart(2, "0"); // 날짜를 두 자리로 맞춤
5
+ return `${year}-${month}-${day}`;
6
+ }
package/util/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export { default as isDebug } from "./isDebug";
5
5
  export { default as sortByOrder } from "./sortByOrder";
6
6
  export { default as checkPathMatch } from "./checkPathMatch";
7
7
  export { default as createSetter } from "./createSetter";
8
+ export { default as compareDates } from "./compareDates";
9
+ export { default as convertDateToString } from "./convertDateToString";
8
10
  export * from "./colors";
9
11
  export * from "./pattern";
10
12
  export * from "./shape";
package/util/index.js CHANGED
@@ -5,6 +5,8 @@ export { default as isDebug } from "./isDebug";
5
5
  export { default as sortByOrder } from "./sortByOrder";
6
6
  export { default as checkPathMatch } from "./checkPathMatch";
7
7
  export { default as createSetter } from "./createSetter";
8
+ export { default as compareDates } from "./compareDates";
9
+ export { default as convertDateToString } from "./convertDateToString";
8
10
  export * from "./colors";
9
11
  export * from "./pattern";
10
12
  export * from "./shape";
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.153
1
+ 1.0.155
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef, useState } from "react";
2
+ import { useEffect, useRef, useState } from "react";
3
3
  import { cn, gradient } from "../../../util";
4
4
  import Label from "../Label";
5
5
  import Obstacle from "../Obstacle";
6
+ import SVG from "../../../asset/SVG";
6
7
  export default function InputForm({ title, state, placeholder, isValid, type, onKeyDown, button, maxLength, disabled, }) {
7
8
  const [value, setValue] = state;
8
9
  const [onFocus, setOnFocus] = useState(false);
10
+ const [isEyeOpen, setIsEyeOpen] = useState(false);
9
11
  const ref = useRef(null);
10
12
  const container = {
11
13
  positions: "relative",
@@ -32,10 +34,11 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
32
34
  return green;
33
35
  return red;
34
36
  };
37
+ const placeholderString = typeof placeholder === "function" ? placeholder() : placeholder;
35
38
  const inputBox = {
36
39
  styles: styleByFlag(),
37
40
  sizes: "w-full sm:w-102.5 h-13.5",
38
- paddings: `${placeholder && "pt-3"} pl-5`,
41
+ paddings: `${placeholderString && "pt-3"} pl-5`,
39
42
  fonts: "text-sm",
40
43
  boundaries: "rounded-md outline-none",
41
44
  focuses: onFocus ? "border " : "border-0",
@@ -43,7 +46,12 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
43
46
  !(isValid === false) &&
44
47
  "shadow-[0px_0px_10px_0px_rgba(16,86,82,0.38)]",
45
48
  };
46
- return (_jsxs("div", { children: [title && _jsx("div", { className: "text-gray-dark", children: title }), _jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children: typeof placeholder === "function" ? placeholder() : placeholder }), _jsx("input", { ref: ref, className: cn(inputBox), value: value, onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => {
49
+ useEffect(() => {
50
+ if (type === "password") {
51
+ ref.current?.setAttribute("type", isEyeOpen ? "text" : "password");
52
+ }
53
+ }, [isEyeOpen]);
54
+ return (_jsxs("div", { children: [title && _jsx("div", { className: "text-gray-dark", children: title }), _jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children: placeholderString }), _jsx("input", { ref: ref, className: cn(inputBox), value: value, onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => {
47
55
  if (maxLength && e.target.value.length > maxLength)
48
56
  return;
49
57
  setValue(e.target.value);
@@ -54,5 +62,6 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
54
62
  background: button.option?.background ?? gradient.bg.greenToRed,
55
63
  text: button.option?.text ?? "text-white",
56
64
  ...button.option,
57
- } })), _jsx(Obstacle, { disabled: disabled })] })] }));
65
+ } })), type === "password" &&
66
+ (isEyeOpen ? (_jsx(SVG.Eye.Open, { onClick: () => setIsEyeOpen(false), className: "absolute top-3.5 right-3.75" })) : (_jsx(SVG.Eye.Close, { onClick: () => setIsEyeOpen(true), className: "absolute top-3.5 right-3.75" }))), _jsx(Obstacle, { disabled: disabled })] })] }));
58
67
  }
@@ -18,13 +18,14 @@ const heightSize = {
18
18
  export default function Select({ state, selectOptions: selectOptionsInput, placeholder, option, }) {
19
19
  const selectOptions = selectOptionsInput?.map(toSelectOption);
20
20
  const id = useId();
21
- const { setIsOwn, setIsOwnId } = useActionStore();
21
+ const { flag } = useActionStore();
22
22
  const [value, setValue] = state;
23
23
  const [text, setText] = useState("");
24
24
  const [search, setSearch] = useState("");
25
25
  const [isOpen, setIsOpen] = useState(false);
26
26
  const [isHover, setIsHover] = useState(false);
27
27
  const [index, setIndex] = useState();
28
+ const [uniqueKey] = useState(Math.floor(Math.random() * 1000000));
28
29
  useFlag({ state: [false, setIsOpen], safe: "overlay" });
29
30
  // scrollIntoViews
30
31
  const listRef = useRef(null);
@@ -36,33 +37,40 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
36
37
  }, [index]);
37
38
  const isLong = selectOptions && selectOptions.length >= 4;
38
39
  const container = {
39
- positions: "relative ",
40
- displays: "flex flex-col",
40
+ positions: "",
41
+ displays: "flex flex-col gap-2",
41
42
  };
42
43
  const button = {
43
44
  displays: "flex items-center",
44
45
  sizes: `${widthSize[option?.width ?? "md"]} ${heightSize[option?.height ?? "sm"]}`,
45
46
  styles: "px-1 rounded-md outline-none duration-100 text-gray-400",
46
- shadow: isOpen || isHover ? "box-shadow" : "shadow-main",
47
+ shadow: "hover:shadow-green",
48
+ totalaction: isOpen ? "shadow-main" : "shadow-main-small",
49
+ animations: "duration-300",
47
50
  };
48
51
  const input = {
49
- positions: "absolute z-30",
52
+ positions: "z-30",
50
53
  layouts: cn(button),
51
- styles: "outline-none text-xs pl-1.5",
54
+ styles: "focus:outline-1 outline-0 outline-green-dark text-xs pl-1.5 text-gray-medium",
52
55
  };
53
56
  const body = {
54
- positions: "absolute z-30",
55
- displays: "flex flex-col gap-1",
56
- sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-23.75`,
57
+ positions: "z-30",
58
+ displays: "flex flex-col gap-1 shadow-main hover:shadow-green",
59
+ sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-[170px]`,
57
60
  paddings: "px-1 py-1",
58
- styles: "bg-white box-shadow rounded-md box-shadow overflow-y-scroll",
61
+ styles: "bg-white rounded-md overflow-y-scroll",
62
+ };
63
+ const labelCoating = {
64
+ displays: "flex overflow-hidden",
65
+ siezes: "h-fit w-full rounded-md hover:bg-gray-light/50",
66
+ animations: "duration-300",
59
67
  };
60
68
  const label = {
61
69
  displays: "flex",
62
- sizes: "h-fit w-fit hover:w-full",
63
- paddings: "px-1",
70
+ sizes: "h-fit w-fit",
71
+ paddings: "px-2 py-1",
64
72
  styles: "rounded-md duration-500",
65
- fonts: "text-sm text-gray-dim bg-gray-light",
73
+ fonts: "text-xs text-gray-dim bg-gray-light",
66
74
  };
67
75
  const inputTransition = useTransition(isOpen, {
68
76
  from: {
@@ -92,12 +100,17 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
92
100
  duration: 0,
93
101
  },
94
102
  });
95
- return (_jsxs("div", { className: cn(container), onClick: () => setIsOwn(true), children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: cn(button), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
96
- item && (_jsx(animated.input, { style: styles, placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694", className: cn(input), onChange: (e) => setSearch(e.target.value) }))), bodyTransitions((styles, item) => {
97
- return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: selectOptions?.map(({ value, title }, order) => (_jsx("section", { children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), onClick: () => {
103
+ useEffect(() => {
104
+ setIsOpen(false);
105
+ }, [flag]);
106
+ return (_jsxs("div", { className: cn(container), id: `select-box-${uniqueKey}`, onClick: (e) => e.stopPropagation(), children: [_jsx("button", { onClick: () => {
107
+ setIsOpen(!isOpen), console.log(uniqueKey);
108
+ }, className: cn(button, "border-1 border-gray-light hover:border-none"), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label, "bg-white/0"), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
109
+ item && (_jsx(animated.input, { style: styles, placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694", className: cn(input, "shadow-main bg-[#f6f6f6]/50"), onChange: (e) => setSearch(e.target.value) }))), bodyTransitions((styles, item) => {
110
+ return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: selectOptions?.map(({ value, title }, order) => (_jsx("section", { children: _jsx("div", { className: cn(labelCoating), onClick: () => {
98
111
  setValue(value);
99
112
  setText(String(title));
100
113
  return setIsOpen(false);
101
- }, className: cn(label, order === index ? "w-full" : "w-auto"), children: title }) }, id + value))) })));
114
+ }, children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), className: cn(label, order === index ? "w-full" : "w-auto"), children: title }) }) }, id + value))) })));
102
115
  })] }));
103
116
  }