@edu-tosel/design 1.0.175 → 1.0.177

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 (52) hide show
  1. package/asset/SVG.d.ts +4 -0
  2. package/asset/SVG.js +2 -0
  3. package/asset/SVG.tsx +2 -0
  4. package/asset/svg/Login.d.ts +11 -0
  5. package/asset/svg/Login.js +12 -0
  6. package/asset/svg/Login.tsx +53 -0
  7. package/hook/index.d.ts +1 -0
  8. package/hook/index.js +1 -0
  9. package/hook/useVisibilityObserver.d.ts +5 -0
  10. package/hook/useVisibilityObserver.js +38 -0
  11. package/layout/index.d.ts +1 -0
  12. package/layout/index.js +1 -0
  13. package/layout/template/About/SectionA.js +48 -1
  14. package/layout/template/About/SectionB.d.ts +1 -0
  15. package/layout/template/About/SectionB.js +52 -19
  16. package/layout/template/About/SectionC.js +3 -1
  17. package/layout/template/About/SectionCCards.d.ts +2 -1
  18. package/layout/template/About/SectionCCards.js +11 -2
  19. package/layout/template/About/SectionCD.js +12 -1
  20. package/layout/template/About/SectionCLeaf.js +18 -6
  21. package/layout/template/About/SectionG.js +1 -1
  22. package/layout/template/Archive/Header.js +1 -1
  23. package/layout/template/Regexam/OfflineExam.js +2 -2
  24. package/layout/template/Regexam/Types.js +4 -23
  25. package/layout/template/Transcript/Layout.d.ts +6 -0
  26. package/layout/template/Transcript/Layout.js +15 -0
  27. package/layout/template/Transcript/design/Transcript.d.ts +49 -0
  28. package/layout/template/Transcript/design/Transcript.design.d.ts +5 -0
  29. package/layout/template/Transcript/design/Transcript.design.js +122 -0
  30. package/layout/template/Transcript/design/Transcript.js +1 -0
  31. package/layout/template/Transcript/design/TranscriptAdvanced.design.d.ts +1 -0
  32. package/layout/template/Transcript/design/TranscriptAdvanced.design.js +10 -0
  33. package/layout/template/Transcript/index.d.ts +8 -0
  34. package/layout/template/Transcript/index.js +7 -0
  35. package/layout/template/sign/Box.d.ts +1 -1
  36. package/layout/template/sign/Box.js +3 -3
  37. package/layout/template/sign/Button.d.ts +3 -1
  38. package/layout/template/sign/Button.js +12 -10
  39. package/layout/template/sign/Layout.d.ts +2 -1
  40. package/layout/template/sign/Layout.js +12 -2
  41. package/layout/template/sign/WithTitle.js +1 -1
  42. package/package.json +1 -1
  43. package/style/size.d.ts +3 -0
  44. package/style/size.js +3 -0
  45. package/util/handlePrint.d.ts +2 -0
  46. package/util/handlePrint.js +5 -0
  47. package/util/index.d.ts +1 -1
  48. package/util/index.js +1 -1
  49. package/version.txt +1 -1
  50. package/widget/template/Input/Form.js +1 -1
  51. /package/{util → style}/colors.d.ts +0 -0
  52. /package/{util → style}/colors.js +0 -0
package/asset/SVG.d.ts CHANGED
@@ -48,5 +48,9 @@ declare const SVG: {
48
48
  LessThan: ({ className, onClick }: import("./svg/Symbol").SymbolProps) => import("react/jsx-runtime").JSX.Element;
49
49
  GreaterThan: ({ className, onClick }: import("./svg/Symbol").SymbolProps) => import("react/jsx-runtime").JSX.Element;
50
50
  };
51
+ Login: {
52
+ User: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
53
+ ChekMark: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
54
+ };
51
55
  };
52
56
  export default SVG;
package/asset/SVG.js CHANGED
@@ -10,6 +10,7 @@ import Phone from "./svg/Phone";
10
10
  import Profile from "./svg/Profile";
11
11
  import Symbol from "./svg/Symbol";
12
12
  import TOSEL from "./svg/TOSEL";
13
+ import Login from "./svg/Login";
13
14
  const SVG = {
14
15
  TOSEL,
15
16
  Close,
@@ -23,5 +24,6 @@ const SVG = {
23
24
  Phone,
24
25
  Profile,
25
26
  Symbol,
27
+ Login,
26
28
  };
27
29
  export default SVG;
package/asset/SVG.tsx CHANGED
@@ -10,6 +10,7 @@ import Phone from "./svg/Phone";
10
10
  import Profile from "./svg/Profile";
11
11
  import Symbol from "./svg/Symbol";
12
12
  import TOSEL from "./svg/TOSEL";
13
+ import Login from "./svg/Login";
13
14
 
14
15
  const SVG = {
15
16
  TOSEL,
@@ -24,6 +25,7 @@ const SVG = {
24
25
  Phone,
25
26
  Profile,
26
27
  Symbol,
28
+ Login,
27
29
  };
28
30
 
29
31
  export default SVG;
@@ -0,0 +1,11 @@
1
+ import { Size } from "../../interface";
2
+ export interface IconProps {
3
+ size?: Size;
4
+ }
5
+ declare const Login: {
6
+ User: typeof User;
7
+ ChekMark: typeof ChekMark;
8
+ };
9
+ export default Login;
10
+ declare function User({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function ChekMark({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const Login = {
3
+ User,
4
+ ChekMark,
5
+ };
6
+ export default Login;
7
+ function User({ size = "md" }) {
8
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) }));
9
+ }
10
+ function ChekMark({ size = "md" }) {
11
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }));
12
+ }
@@ -0,0 +1,53 @@
1
+ import { OnClick, Size } from "../../interface";
2
+ import { cn } from "../../util";
3
+
4
+ export interface IconProps {
5
+ size?: Size;
6
+ }
7
+
8
+ const Login = {
9
+ User,
10
+ ChekMark,
11
+ };
12
+
13
+ export default Login;
14
+
15
+ function User({ size = "md" }: IconProps) {
16
+ return (
17
+ <svg
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ fill="none"
20
+ viewBox="0 0 24 24"
21
+ stroke-width="1.5"
22
+ stroke="currentColor"
23
+ width={size === "lg" ? 36 : 24}
24
+ height={size === "lg" ? 36 : 24}
25
+ >
26
+ <path
27
+ stroke-linecap="round"
28
+ stroke-linejoin="round"
29
+ d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
30
+ />
31
+ </svg>
32
+ );
33
+ }
34
+
35
+ function ChekMark({ size = "md" }: IconProps) {
36
+ return (
37
+ <svg
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ fill="none"
40
+ viewBox="0 0 24 24"
41
+ stroke-width="1.5"
42
+ stroke="currentColor"
43
+ width={size === "lg" ? 36 : 24}
44
+ height={size === "lg" ? 36 : 24}
45
+ >
46
+ <path
47
+ stroke-linecap="round"
48
+ stroke-linejoin="round"
49
+ d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
50
+ />
51
+ </svg>
52
+ );
53
+ }
package/hook/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export { default as useFlag } from "./useFlag";
4
4
  export { default as useResponsive } from "./useResponsive";
5
5
  export { default as useScroll } from "./useScroll";
6
6
  export { default as useSmoothScroll } from "./useSmoothScroll";
7
+ export { default as useVisibilityObserver } from "./useVisibilityObserver";
package/hook/index.js CHANGED
@@ -4,3 +4,4 @@ export { default as useFlag } from "./useFlag";
4
4
  export { default as useResponsive } from "./useResponsive";
5
5
  export { default as useScroll } from "./useScroll";
6
6
  export { default as useSmoothScroll } from "./useSmoothScroll";
7
+ export { default as useVisibilityObserver } from "./useVisibilityObserver";
@@ -0,0 +1,5 @@
1
+ declare const useVisibilityObserver: (threshold?: number, observeOnce?: boolean) => {
2
+ isVisible: boolean;
3
+ elementRef: import("react").MutableRefObject<HTMLImageElement | null>;
4
+ };
5
+ export default useVisibilityObserver;
@@ -0,0 +1,38 @@
1
+ import { useEffect, useState, useRef } from "react";
2
+ const useVisibilityObserver = (threshold = 0.1, observeOnce = true) => {
3
+ const [isVisible, setIsVisible] = useState(false);
4
+ const elementRef = useRef(null); // HTMLImageElement로 타입 변경
5
+ useEffect(() => {
6
+ const observer = new IntersectionObserver((entries) => {
7
+ entries.forEach((entry) => {
8
+ if (entry.isIntersecting) {
9
+ setIsVisible(true);
10
+ if (observeOnce) {
11
+ observer.disconnect();
12
+ }
13
+ }
14
+ else if (!observeOnce) {
15
+ setIsVisible(false);
16
+ }
17
+ });
18
+ }, { threshold });
19
+ const currentElement = elementRef.current;
20
+ if (currentElement) {
21
+ observer.observe(currentElement);
22
+ }
23
+ return () => {
24
+ if (currentElement) {
25
+ observer.unobserve(currentElement);
26
+ }
27
+ };
28
+ }, [threshold, observeOnce]);
29
+ return { isVisible, elementRef };
30
+ };
31
+ export default useVisibilityObserver;
32
+ // 예시:
33
+ // className={cn(
34
+ // "transform transition-all duration-1000 delay-0 ease-in-out",
35
+ // isVisible
36
+ // ? "translate-y-0 opacity-100"
37
+ // : "translate-y-10 opacity-0"
38
+ // )}
package/layout/index.d.ts CHANGED
@@ -23,3 +23,4 @@ export { default as BooksLayout } from "./template/Books/Books.layout";
23
23
  export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
24
24
  export { default as MonthlyProgressReport } from "./template/MonthlyProgressReport";
25
25
  export { default as Ticket } from "./template/Ticket";
26
+ export { default as Transcript } from "./template/Transcript";
package/layout/index.js CHANGED
@@ -23,3 +23,4 @@ export { default as BooksLayout } from "./template/Books/Books.layout";
23
23
  export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
24
24
  export { default as MonthlyProgressReport } from "./template/MonthlyProgressReport";
25
25
  export { default as Ticket } from "./template/Ticket";
26
+ export { default as Transcript } from "./template/Transcript";
@@ -1,4 +1,51 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import { cn } from "../../../util";
4
+ import { useVisibilityObserver } from "../../../hook";
2
5
  export default function SectionA() {
3
- return (_jsx("div", { className: "w-full min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-cover-min.png')] flex py-55 justify-center bg-cover bg-center ", children: _jsxs("div", { className: "w-[1200px] h-full flex flex-col gap-8 text-white", children: [_jsx("div", { className: "text-xl", children: "15,000\uC5EC\uAC1C\uC758 \uD559\uAD50\uC640 \uD559\uC6D0\uC758 \uC120\uD0DD" }), _jsxs("div", { className: "text-6xl font-bold", children: ["\uB300\uD55C\uBBFC\uAD6D\uC744 \uB300\uD45C\uD558\uB294", _jsx("br", {}), "\uC601\uC5B4\uC778\uC99D\uC2DC\uD5D8"] }), _jsx("img", { src: "/images/aboutus/p1-min.png", alt: "", className: "object-fit w-70" })] }) }));
6
+ const [isHidden, setIsHidden] = useState(false);
7
+ useEffect(() => {
8
+ const handleScroll = () => {
9
+ if (window.scrollY > 50) {
10
+ setIsHidden(true);
11
+ }
12
+ else {
13
+ setIsHidden(false);
14
+ }
15
+ };
16
+ window.addEventListener("scroll", handleScroll);
17
+ return () => {
18
+ window.removeEventListener("scroll", handleScroll);
19
+ };
20
+ }, []);
21
+ const handleScroll = () => {
22
+ window.scrollBy({
23
+ top: window.innerHeight,
24
+ behavior: "smooth",
25
+ });
26
+ };
27
+ const scrollGuideWrapper = {
28
+ display: "absolute hidden md:flex flex-col justify-center items-center z-10",
29
+ sizes: "w-full",
30
+ spacings: "bottom-0 mb-10",
31
+ scrollAction: `transition-opacity duration-500 ${isHidden ? "opacity-0" : "opacity-100"}`,
32
+ };
33
+ const scrollGuideText = {
34
+ sizes: "w-full",
35
+ textstyles: "font-medium text-white text-base",
36
+ spacings: "text-center",
37
+ };
38
+ const scrollGuideButton = {
39
+ sizes: "w-10 h-10 mt-10",
40
+ other: "animate-bounce p-1 w-10 h-10 ring-1 ring-slate-900/5 shadow-lg rounded-full flex items-center justify-center",
41
+ };
42
+ const titleWrapper = {
43
+ displays: "flex flex-col justify-center items-center md:items-start",
44
+ sizes: "w-[1200px] h-full",
45
+ spacings: "gap-8",
46
+ textstyles: "text-white",
47
+ animation: "transform transition-all duration-1000 delay-0 ease-in-out",
48
+ };
49
+ const { isVisible, elementRef } = useVisibilityObserver(0.1, true);
50
+ return (_jsxs("div", { className: "relative w-full h-screen bg-[url('/images/aboutus/bg/img-aboutus-cover-min.png')] flex py-55 justify-center bg-cover bg-center px-5 z-0", children: [_jsxs("div", { className: cn(scrollGuideWrapper), children: [_jsx("div", { className: cn(scrollGuideText), children: "\uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uBCF4\uB824\uBA74 \uC544\uB798\uB85C \uC2A4\uD06C\uB864 \uD574\uBCF4\uC138\uC694" }), _jsx("div", { className: cn(scrollGuideButton), onClick: handleScroll, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "size-6 text-white", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" }) }) })] }), _jsx("div", { className: "absolute h-screen w-full bg-gradient-to-b from-black/0 to-black z-0 top-0" }), _jsxs("div", { className: cn(titleWrapper, isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"), children: [_jsx("div", { className: "text-lg md:text-xl z-10", ref: elementRef, children: "15,000\uC5EC\uAC1C\uC758 \uD559\uAD50\uC640 \uD559\uC6D0\uC758 \uC120\uD0DD" }), _jsxs("div", { className: "text-[32px] md:text-6xl font-bold text-center md:text-left z-10", children: ["\uB300\uD55C\uBBFC\uAD6D\uC744 \uB300\uD45C\uD558\uB294", _jsx("br", {}), "\uC601\uC5B4\uC778\uC99D\uC2DC\uD5D8"] }), _jsx("img", { src: "/images/aboutus/p1-min.png", alt: "", className: "object-fit w-70 z-10" })] })] }));
4
51
  }
@@ -1 +1,2 @@
1
1
  export default function SectionB(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function StatBoxComponent(): import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,55 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ import { useVisibilityObserver } from "../../../hook";
4
+ const stats = [
5
+ {
6
+ id: 1,
7
+ label: "누적 정기시험 응시자",
8
+ value: "83.1만 +",
9
+ },
10
+ {
11
+ id: 2,
12
+ label: "지필고사 개최",
13
+ value: "1.4천회",
14
+ },
15
+ {
16
+ id: 3,
17
+ label: "누적 이용기관 수",
18
+ value: "2.9만 +",
19
+ },
20
+ {
21
+ id: 4,
22
+ label: "선별된 성적 데이터",
23
+ value: "39.3만 개 +",
24
+ },
25
+ ];
2
26
  export default function SectionB() {
3
- const stats = [
4
- {
5
- label: "누적 정기시험 응시자",
6
- value: "83.1만 +",
7
- },
8
- {
9
- label: "지필고사 개최",
10
- value: "1.4천회",
11
- },
12
- {
13
- label: "누적 이용기관 ",
14
- value: "2.9만 +",
15
- },
16
- {
17
- label: "선별된 성적 데이터",
18
- value: "39.3만 개 +",
19
- },
20
- ];
21
- return (_jsx("div", { className: " w-full min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionb-bg-min.png')] flex items-center justify-center justify-center bg-cover bg-center flex-col", children: _jsxs("div", { className: "w-[1200px] h-full flex flex-col text-white", children: [_jsxs("div", { className: "flex flex-col gap-2 mb-16", children: [_jsx("div", { className: "text-2xl font-bold", children: "80\uB9CC \uB204\uC801 \uC751\uC2DC\uC790\uAC00 \uBCF4\uB0B4\uB294 \uC2E0\uB8B0" }), _jsxs("div", { className: "text-sm", children: ["\uD1A0\uC140\uC740 20\uB144\uC774 \uB118\uB294 \uC2DC\uAC04\uB3D9\uC548 \uD55C\uAD6D\uD615 \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB97C \uC5F0\uAD6C\uD574\uC654\uACE0,", _jsx("br", {}), "\uD604\uC7AC 80\uB9CC\uBA85\uC774 \uB118\uB294 \uC751\uC2DC\uC790\uB97C \uBC30\uCD9C\uD55C \uB300\uD55C\uBBFC\uAD6D \uB300\uD45C \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB85C \uAC70\uB4ED\uB0AC\uC2B5\uB2C8\uB2E4."] })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex gap-12 mb-8", children: [_jsxs("div", { className: "flex flex-col w-70", children: [_jsx("div", { className: "text-white/80", children: "\uB204\uC801 \uC815\uAE30\uC2DC\uD5D8 \uC751\uC2DC\uC790" }), _jsx("div", { className: "text-6xl font-bold", children: "83.1\uB9CC +" })] }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "text-white/80", children: "\uC9C0\uD544\uACE0\uC0AC \uAC1C\uCD5C" }), _jsx("div", { className: "text-6xl font-bold", children: "1.4\uCC9C\uD68C" })] })] }), _jsxs("div", { className: "flex gap-12 mb-4", children: [_jsxs("div", { className: "flex flex-col w-70", children: [_jsx("div", { className: "text-white/80", children: "\uB204\uC801 \uC774\uC6A9\uAE30\uAD00 \uC218" }), _jsx("div", { className: "text-6xl font-bold", children: "2.9\uB9CC +" })] }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "text-white/80", children: "\uC120\uBCC4\uB41C \uC131\uC801 \uB370\uC774\uD130" }), _jsx("div", { className: "text-6xl font-bold", children: "39.3\uB9CC \uAC1C +" })] })] }), _jsx("div", { className: "text-2xs text-white/80", children: "2024\uB144 8\uC6D4 \uAE30\uC900" })] })] }) }));
27
+ return (_jsx("div", { className: "break-keep w-full h-screen py-[200px] md:py-0 md:min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionb-bg-min.png')] flex items-center justify-center bg-cover bg-center flex-col", children: _jsxs("div", { className: "w-full max-w-[1200px] h-full flex flex-col text-white px-5 justify-center", children: [_jsxs("div", { className: "flex flex-col gap-2 mb-16", children: [_jsx("div", { className: "text-2xl font-bold", children: "80\uB9CC \uB204\uC801 \uC751\uC2DC\uC790\uAC00 \uBCF4\uB0B4\uB294 \uC2E0\uB8B0" }), _jsxs("div", { className: "text-sm", children: ["\uD1A0\uC140\uC740 20\uB144\uC774 \uB118\uB294 \uC2DC\uAC04\uB3D9\uC548 \uD55C\uAD6D\uD615 \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB97C \uC5F0\uAD6C\uD574\uC654\uACE0,", _jsx("br", {}), "\uD604\uC7AC 80\uB9CC\uBA85\uC774 \uB118\uB294 \uC751\uC2DC\uC790\uB97C \uBC30\uCD9C\uD55C \uB300\uD55C\uBBFC\uAD6D \uB300\uD45C \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB85C \uAC70\uB4ED\uB0AC\uC2B5\uB2C8\uB2E4."] })] }), _jsx(StatBoxComponent, {}), _jsx("div", { className: "text-xs", children: "2014\uB144 8\uC6D4 \uAE30\uC900" })] }) }));
28
+ }
29
+ export function StatBoxComponent() {
30
+ const statBoxWrapper = {
31
+ displays: "flex flex-wrap justify-start align-start max-w-[935px] w-full",
32
+ spacings: "gap-y-5 gap-x-5 md:gap-x-12 mb-5",
33
+ };
34
+ const statBox = {
35
+ displays: "flex flex-col items-start",
36
+ sizes: "w-60 md:w-80",
37
+ animations: "transform transition-all duration-1000 delay-0 ease-in-out",
38
+ };
39
+ const labelText = {
40
+ textStyles: "font-bold text-base md:text-lg",
41
+ colors: "text-white/80",
42
+ spacings: "leading-normal",
43
+ };
44
+ const valueText = {
45
+ textStyles: "font-bold text-[40px] md:text-[64px]",
46
+ colors: "text-white",
47
+ spacings: "leading-normal",
48
+ };
49
+ return (_jsx("div", { className: cn(statBoxWrapper), children: stats.map((item) => {
50
+ const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
51
+ return (_jsxs("div", { ref: elementRef, className: cn(statBox, isVisible
52
+ ? "opacity-100 translate-y-0"
53
+ : "opacity-0 translate-y-10"), children: [_jsx("div", { className: cn(labelText), children: item.label }), _jsx("div", { className: cn(valueText), children: item.value })] }, item.id));
54
+ }) }));
22
55
  }
@@ -29,5 +29,7 @@ export default function SectionC() {
29
29
  setSelectedCard(card);
30
30
  setIsOpen(true);
31
31
  };
32
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-full min-h-[900px] bg-white flex items-center justify-center", children: _jsxs("div", { className: "w-[1200px] h-full flex flex-col text-crimson-burgundy gap-8", children: [_jsx("div", { className: "text-center text-3xl font-bold", children: "Leadership" }), _jsx("div", { className: "text-center text-sm font-light w-full pb-2 border-b-[1px] border-crimson-burgundy", children: "Board Members" }), _jsx("div", { className: "w-full flex items-center justify-center gap-8", children: members.map((member) => (_jsx(SectionCCards, { imgSource: member.imgSource, name: member.name, position: member.position, description: member.description, handleClick: () => handleCardClick(member) }, member.name))) })] }) }), _jsx(SectionCLeaf, { isOpenState: [isOpen, setIsOpen], selectedData: [selectedCard, setSelectedCard] })] }));
32
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-full min-h-[900px] bg-white flex items-center justify-center px-5 py-8", children: _jsxs("div", { className: "max-w-[1200px] h-full flex flex-col text-crimson-burgundy gap-8 w-full", children: [_jsx("div", { className: "text-center text-3xl font-bold", children: "Leadership" }), _jsx("div", { className: "text-center text-sm font-light w-full pb-2 border-b-[1px] border-crimson-burgundy", children: "Board Members" }), _jsx("div", { className: "w-full flex items-center justify-center gap-8 flex-wrap", children: members.map((member, index) => {
33
+ return (_jsx(SectionCCards, { imgSource: member.imgSource, name: member.name, position: member.position, description: member.description, handleClick: () => handleCardClick(member), delay: index * 100 }, index));
34
+ }) })] }) }), _jsx(SectionCLeaf, { isOpenState: [isOpen, setIsOpen], selectedData: [selectedCard, setSelectedCard] })] }));
33
35
  }
@@ -1,6 +1,7 @@
1
1
  import { StateAction } from "../../../interface";
2
2
  type FunctionProps = {
3
3
  handleClick: StateAction<boolean>;
4
+ delay: number;
4
5
  };
5
6
  interface CardProps {
6
7
  imgSource: string;
@@ -8,5 +9,5 @@ interface CardProps {
8
9
  position: string;
9
10
  description: string;
10
11
  }
11
- export default function Card({ imgSource, name, position, description, handleClick, }: CardProps & FunctionProps): import("react/jsx-runtime").JSX.Element;
12
+ export default function Card({ imgSource, name, position, description, handleClick, delay, }: CardProps & FunctionProps): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,4 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export default function Card({ imgSource, name, position, description, handleClick, }) {
3
- return (_jsxs("div", { className: "max-w-[270px] flex flex-col gap-3", onClick: () => handleClick(true), children: [_jsx("div", { className: "w-[270px] h-90 overflow-hidden rounded-3xl cursor-pointer", children: _jsx("img", { src: imgSource, alt: name, className: "w-full h-full object-cover hover:scale-105 transition-all duration-500" }) }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { className: "text-gray-dark font-bold text-2xl", children: name }), _jsx("div", { className: "text-gray-medium font-semibold text-2xl", children: position })] }), _jsx("div", { className: "text-sm text-gray-medium", children: description })] }));
2
+ import { useVisibilityObserver, useResponsive } from "../../../hook";
3
+ import { cn } from "../../../util";
4
+ export default function Card({ imgSource, name, position, description, handleClick, delay, }) {
5
+ const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
6
+ const isXM = useResponsive("xm");
7
+ const cardContainer = {
8
+ displays: "max-w-[270px] flex flex-col gap-3",
9
+ animations: `transform transition-all duration-1000 ease-in-out`,
10
+ delay: isXM ? `delay-${delay}` : "delay-0",
11
+ };
12
+ return (_jsxs("div", { ref: elementRef, className: cn(cardContainer, isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"), onClick: () => handleClick(true), children: [_jsx("div", { className: "w-[270px] h-90 overflow-hidden rounded-3xl cursor-pointer", children: _jsx("img", { src: imgSource, alt: name, className: "w-full h-full object-cover hover:scale-105 transition-all duration-500" }) }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { className: "text-gray-dark font-bold text-2xl", children: name }), _jsx("div", { className: "text-gray-medium font-semibold text-2xl", children: position })] }), _jsx("div", { className: "text-sm text-gray-medium", children: description })] }));
4
13
  }
@@ -1,4 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useVisibilityObserver } from "../../../hook";
3
+ import { cn } from "../../../util";
2
4
  export default function SectionCD() {
3
- return (_jsx("div", { className: "w-full min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionc2-bg-min.jpg')] flex justify-center items-end pb-24 bg-cover bg-center", children: _jsxs("div", { className: "w-[1200px] h-[304px] bg-black/50 z-10 flex flex-col gap-2.5 px-8 py-12 text-center rounded-xl", style: { backdropFilter: "blur(40px)" }, children: [_jsx("div", { className: "text-4xl text-white/50", children: "Our Mission" }), _jsxs("div", { className: "text-white text-2xl font-bold", children: ["\uD1A0\uC140\uC740 \uC5F0\uB839\uBCC4 \uC778\uC9C0\uB2E8\uACC4\uB97C \uACE0\uB824\uD558\uC5EC \uC5B8\uC5B4\uB2A5\uB825\uC744 \uAC00\uC7A5 \uCE5C\uBC00\uD558\uAC8C \uD3C9\uAC00\uD569\uB2C8\uB2E4.", " ", _jsx("br", {}), "\uBE44\uC601\uC5B4\uAD8C \uD559\uC0DD\uB4E4\uC5D0\uAC8C \uC54C\uB9DE\uC740 \uD3C9\uAC00\uC81C\uB3C4\uB97C \uD1B5\uD574,", _jsx("br", {}), "\uB204\uAD6C\uB098 \uC601\uC5B4\uB97C \uB3C4\uC804\uD560 \uC218 \uC788\uAC8C \uB9CC\uB4DC\uB294 \uAC83\uC774 \uD1A0\uC140\uC758 \uC874\uC7AC \uC774\uC720\uC785\uB2C8\uB2E4."] })] }) }));
5
+ const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
6
+ const blackBox = {
7
+ displays: "flex flex-col",
8
+ sizes: "w-full max-w-[1200px] h-fit rounded-xl",
9
+ spacings: "py-12 px-8 gap-2.5 z-10",
10
+ backgrounds: "bg-black/30 backdrop-blur-2xl",
11
+ textstyles: "text-center break-keep",
12
+ animations: "transform transition-all duration-1000 delay-0 ease-in-out",
13
+ };
14
+ return (_jsx("div", { className: "w-full min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionc2-bg-min.jpg')] flex justify-center items-end pb-24 bg-cover bg-center px-5", children: _jsxs("div", { ref: elementRef, className: cn(blackBox, isVisible ? "translate-y-0 opacity-100" : "translate-y-10 opacity-0"), children: [_jsx("div", { className: "text-3xl md:text-4xl text-white/50", children: "Our Mission" }), _jsxs("div", { className: "text-white text-base md:text-2xl font-bold", children: ["\uD1A0\uC140\uC740 \uC5F0\uB839\uBCC4 \uC778\uC9C0\uB2E8\uACC4\uB97C \uACE0\uB824\uD558\uC5EC \uC5B8\uC5B4\uB2A5\uB825\uC744 \uAC00\uC7A5 \uCE5C\uBC00\uD558\uAC8C \uD3C9\uAC00\uD569\uB2C8\uB2E4.", " ", _jsx("br", {}), "\uBE44\uC601\uC5B4\uAD8C \uD559\uC0DD\uB4E4\uC5D0\uAC8C \uC54C\uB9DE\uC740 \uD3C9\uAC00\uC81C\uB3C4\uB97C \uD1B5\uD574,", _jsx("br", {}), "\uB204\uAD6C\uB098 \uC601\uC5B4\uB97C \uB3C4\uC804\uD560 \uC218 \uC788\uAC8C \uB9CC\uB4DC\uB294 \uAC83\uC774 \uD1A0\uC140\uC758 \uC874\uC7AC \uC774\uC720\uC785\uB2C8\uB2E4."] })] }) }));
4
15
  }
@@ -1,7 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { animated, useTransition } from "react-spring";
3
+ import { useEffect } from "react";
3
4
  import { cn } from "../../../util";
4
5
  import { HiXMark } from "react-icons/hi2";
6
+ import { useResponsive } from "../../../hook";
5
7
  export default function SectionCLeaf({ selectedData, isOpenState: [isOpen, setIsOpen], }) {
6
8
  const transitions = useTransition(isOpen, {
7
9
  from: { opacity: 0, transform: "translateY(100%)" },
@@ -12,14 +14,15 @@ export default function SectionCLeaf({ selectedData, isOpenState: [isOpen, setIs
12
14
  const { name, imgSource, position, description } = selectedCard;
13
15
  const container = {
14
16
  positions: "fixed top-0 left-0 z-50",
15
- displays: "flex flex-col items-center justify-center",
16
- sizes: "min-h-screen w-full",
17
+ displays: "flex flex-col items-center justify-start px-5 md:px-12",
18
+ sizes: "h-screen w-full",
17
19
  background: "bg-white/90",
20
+ scroll: "overflow-y-scroll scrollbar-hidden sm:overflow-y-hidden",
18
21
  };
19
22
  const maingBg = {
20
23
  positions: "relative",
21
- displays: "flex gap-12",
22
- sizes: "w-[1200px]",
24
+ displays: "flex flex-col sm:flex-row gap-12 ",
25
+ sizes: "max-w-[1200px]",
23
26
  fonts: "text-black",
24
27
  };
25
28
  const specificData = {
@@ -85,8 +88,17 @@ export default function SectionCLeaf({ selectedData, isOpenState: [isOpen, setIs
85
88
  };
86
89
  const details = specificData[name]?.details;
87
90
  const introduces = specificData[name]?.introduce;
88
- return (_jsx(_Fragment, { children: transitions((style, item) => item && (_jsxs(animated.div, { style: style, className: cn(container), onClick: () => setIsOpen(false), children: [_jsx(Cancel, { onClick: () => setIsOpen(false) }), _jsxs("div", { className: cn(maingBg), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("div", { className: "w-[270px] h-90 overflow-hidden rounded-3xl cursor-pointer", children: _jsx("img", { src: imgSource, alt: name, className: "w-full h-full object-cover hover:scale-105 transition-all duration-500" }) }), _jsxs("div", { children: [_jsxs("div", { className: "flex gap-3", children: [_jsx("div", { className: "text-gray-dark font-bold text-2xl", children: name }), _jsx("div", { className: "text-gray-medium font-semibold text-2xl", children: position })] }), _jsx("div", { className: "text-sm", children: description })] }), _jsx("div", { className: "text-sm text-gray-medium", children: details?.map((detail, index) => (_jsxs("div", { className: "flex", children: [_jsx("div", { className: "pr-2", children: "\u2022" }), detail] }, index))) })] }), _jsxs("div", { className: "flex flex-col gap-12", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "font-bold text-xl", children: position }), _jsx("div", { className: "font-bold text-[80px]", children: name }), _jsx("div", { className: "font-semibold text-xl", children: description })] }), _jsx("div", { children: introduces?.map((introduce, index) => (_jsx("div", { className: "flex mb-4 font-normal text-base", children: introduce }, index))) })] })] })] }))) }));
91
+ useEffect(() => {
92
+ isOpen
93
+ ? document.body.classList.add("overflow-hidden")
94
+ : document.body.classList.remove("overflow-hidden");
95
+ return () => {
96
+ document.body.classList.remove("overflow-hidden");
97
+ };
98
+ }, [isOpen]);
99
+ const isSM = useResponsive("sm");
100
+ return (_jsx(_Fragment, { children: transitions((style, item) => item && (_jsx(animated.div, { style: style, className: cn(container), onClick: () => setIsOpen(false), children: _jsxs("div", { className: cn(maingBg), children: [_jsx("div", { className: "absolute top-5 left-0 w-full z-20", children: _jsx(Cancel, { onClick: () => setIsOpen(false) }) }), _jsxs("div", { className: "flex flex-col gap-3 translate-y-[60px]", children: [_jsx("div", { className: "w-[270px] h-90 overflow-hidden rounded-3xl cursor-pointer", children: _jsx("img", { src: imgSource, alt: name, className: "w-full h-full object-cover hover:scale-105 transition-all duration-500" }) }), _jsxs("div", { children: [_jsxs("div", { className: "flex gap-3", children: [_jsx("div", { className: "text-gray-dark font-bold text-2xl", children: name }), _jsx("div", { className: "text-gray-medium font-semibold text-2xl", children: position })] }), _jsx("div", { className: "text-sm", children: description })] }), _jsx("div", { className: "text-sm text-gray-medium", children: details?.map((detail, index) => (_jsxs("div", { className: "flex", children: [_jsx("div", { className: "pr-2", children: "\u2022" }), detail] }, index))) })] }), _jsx("div", { className: "w-full h-screen overflow-y-scroll scrollbar-hidden", children: _jsxs("div", { className: "flex flex-col gap-12 translate-y-[60px]", children: [isSM && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "font-bold text-xl", children: position }), _jsx("div", { className: "font-bold text-[80px]", children: name }), _jsx("div", { className: "font-semibold text-xl", children: description })] })), _jsx("div", { children: introduces?.map((introduce, index) => (_jsx("div", { className: "flex mb-4 font-normal text-base", children: introduce }, index))) })] }) })] }) }))) }));
89
101
  }
90
102
  function Cancel({ onClick }) {
91
- return (_jsx(_Fragment, { children: _jsx("div", { className: "w-[1200px] flex justify-end", children: _jsxs("div", { className: "flex bg-gray-light px-[10px] py-1 gap-[10px] rounded-md text-md cursor-pointer flex items-center justify-center", onClick: onClick, children: [_jsx("div", { className: "text-black font-light", children: "close" }), _jsx(HiXMark, { className: "text-base" })] }) }) }));
103
+ return (_jsx(_Fragment, { children: _jsx("div", { className: "w-full flex justify-end", children: _jsxs("div", { className: "flex bg-gray-light px-[10px] py-1 gap-[10px] rounded-md text-md cursor-pointer items-center justify-center", onClick: onClick, children: [_jsx("div", { className: "text-black font-light", children: "close" }), _jsx(HiXMark, { className: "text-base" })] }) }) }));
92
104
  }
@@ -45,5 +45,5 @@ export default function SectionG() {
45
45
  [2016, "2016"],
46
46
  [2015, "2015"],
47
47
  [2014, "2014"],
48
- ] }) })] }), filteredDatas.map((data, index) => (_jsx("div", { className: "w-full flex text-center flex-col border-b-1 border-gray-light/50 hover:bg-white/10", children: _jsxs("div", { className: "w-full h-30 py-8 flex flex-col gap-3", children: [_jsxs("div", { className: "flex gap-3 items-center", children: [_jsx("div", { className: "font-semibold", children: data.company }), _jsx("div", { className: "text-sm text-gray-medium", children: data.date })] }), _jsx("div", { className: "text-xl font-semibold text-left text-black font-light", children: data.title })] }) }, index)))] }) }));
48
+ ] }) })] }), filteredDatas.map((data, index) => (_jsx("div", { className: "w-full flex text-center flex-col border-b-1 border-gray-light/50 hover:bg-white/10", children: _jsxs("div", { className: "w-full h-30 py-8 flex flex-col gap-3", children: [_jsxs("div", { className: "flex gap-3 items-center", children: [_jsx("div", { className: "font-semibold", children: data.company }), _jsx("div", { className: "text-sm text-gray-medium", children: data.date })] }), _jsx("div", { className: "text-xl text-left text-black font-light", children: data.title })] }) }, index)))] }) }));
49
49
  }
@@ -65,5 +65,5 @@ function ContentBox({ contents }) {
65
65
  ? "bg-green-dark/10 text-green-dark"
66
66
  : "bg-none text-gray-medium",
67
67
  };
68
- return (_jsx("div", { className: cn(container), children: contents.map((content) => (_jsx("button", { className: cn(buttonBox), children: content.title }, content.title))) }));
68
+ return (_jsx("div", { className: cn(container), children: contents.map((content) => (_jsx("button", { onClick: content.onClick, className: cn(buttonBox), children: content.title }, content.title))) }));
69
69
  }
@@ -95,7 +95,7 @@ export default function OfflineExam() {
95
95
  sizes: "w-full h-0.5 mt-1",
96
96
  colors: "bg-gradient-to-r from-crimson-burgundy to-green-dark flex-shrink-0",
97
97
  };
98
- return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(mainWrapper), children: [_jsxs("div", { className: cn(titleWrapper), ref: scrollWrapperRef, children: [_jsx("div", { className: cn(sectionTitle), children: "\uC815\uAE30\uC2DC\uD5D8 \uC548\uB0B4" }), _jsx("div", { className: cn(sectionSubTitle), children: "\uC5F0 4\uD68C, \uC624\uD504\uB77C\uC778\uC73C\uB85C \uAC1C\uCD5C\uB418\uB294 \uD1A0\uC140 \uC815\uAE30\uC2DC\uD5D8\uC785\uB2C8\uB2E4." }), isMD && (_jsxs("div", { onClick: () => (window.location.href = `https://olympiad.tosel.co.kr/dashboard`), className: cn(AdvertButton), children: [_jsx("div", { className: cn(buttonBackground1) }), _jsx("div", { className: cn(buttonBackground2) }), _jsx("div", { className: cn(buttonText), children: "\uC9C0\uAE08 \uC811\uC218\uD558\uAE30" })] }))] }), _jsxs("div", { className: cn(scrollWrapper), children: [_jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uC2DC\uD5D8\uAD6C\uC131" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(TableComponent, {}) })] }), _jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uC5F0\uAC04 \uC2DC\uD5D8 \uC77C\uC815" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(AnnualTableComponent, {}) })] }), _jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uB2F9\uC77C \uC138\uBD80\uC77C\uC815" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(TimeTableComponent, {}) }), _jsxs("div", { className: "flex flex-col mt-4", children: [_jsx("div", { className: "text-gray-medium font-medium text-sm", children: "*\uACE0\uC0AC\uC7A5 \uB0B4\uBD80\uC5D0\uB294 \uD559\uBD80\uBAA8\uC758 \uCD9C\uC785\uC774 \uC81C\uD55C\uB429\uB2C8\uB2E4." }), _jsx("div", { className: "text-gray-medium font-medium text-sm", children: "*\uC785\uC2E4\uB9C8\uAC10(13\uC2DC 10\uBD84)\uC2DC\uAC04\uC744 \uC900\uC218\uD574\uC8FC\uC2DC\uAE30 \uBC14\uB78D\uB2C8\uB2E4." })] })] })] }), !isMD && (_jsxs("div", { onClick: () => (window.location.href = `https://olympiad.tosel.co.kr/dashboard`), className: cn(AdvertButton), children: [_jsx("div", { className: cn(buttonBackground1) }), _jsx("div", { className: cn(buttonBackground2) }), _jsx("div", { className: cn(buttonText), children: "\uC9C0\uAE08 \uC811\uC218\uD558\uAE30" })] }))] }) }));
98
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(mainWrapper), children: [_jsxs("div", { className: cn(titleWrapper), ref: scrollWrapperRef, children: [_jsx("div", { className: cn(sectionTitle), children: "\uC815\uAE30\uC2DC\uD5D8 \uC548\uB0B4" }), _jsx("div", { className: cn(sectionSubTitle), children: "\uC5F0 4\uD68C, \uC624\uD504\uB77C\uC778\uC73C\uB85C \uAC1C\uCD5C\uB418\uB294 \uD1A0\uC140 \uC815\uAE30\uC2DC\uD5D8\uC785\uB2C8\uB2E4." }), isMD && (_jsxs("div", { onClick: () => (window.location.href = `https://olympiad.tosel.co.kr/dashboard`), className: cn(AdvertButton), children: [_jsx("div", { className: cn(buttonBackground1) }), _jsx("div", { className: cn(buttonBackground2) }), _jsx("div", { className: cn(buttonText), children: "\uC9C0\uAE08 \uC811\uC218\uD558\uAE30" })] }))] }), _jsxs("div", { className: cn(scrollWrapper), children: [_jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uC2DC\uD5D8\uAD6C\uC131" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(TableComponent, {}) })] }), _jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uC5F0\uAC04 \uC2DC\uD5D8 \uC77C\uC815" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(AnnualTableComponent, {}) })] }), _jsxs("div", { className: cn(miniBox), children: [_jsx("div", { className: cn(miniTitle), children: "\uB2F9\uC77C \uC138\uBD80\uC77C\uC815" }), _jsx("div", { className: cn(miniDivider) }), _jsx("div", { className: "h-full w-full mt-5", children: _jsx(TimeTableComponent, {}) }), _jsxs("div", { className: "flex flex-col mt-4", children: [_jsx("div", { className: "text-gray-medium font-medium text-sm", children: "*\uACE0\uC0AC\uC7A5 \uB0B4\uBD80\uC5D0\uB294 \uD559\uBD80\uBAA8\uC758 \uCD9C\uC785\uC774 \uC81C\uD55C\uB429\uB2C8\uB2E4." }), _jsx("div", { className: "text-gray-medium font-medium text-sm", children: "*\uC785\uC2E4\uB9C8\uAC10(13\uC2DC 10\uBD84)\uC2DC\uAC04\uC744 \uC900\uC218\uD574\uC8FC\uC2DC\uAE30 \uBC14\uB78D\uB2C8\uB2E4." })] })] })] }), !isMD && (_jsxs("div", { onClick: () => (window.location.href = `https://new.tosel.org/dashboard`), className: cn(AdvertButton), children: [_jsx("div", { className: cn(buttonBackground1) }), _jsx("div", { className: cn(buttonBackground2) }), _jsx("div", { className: cn(buttonText), children: "\uC9C0\uAE08 \uC811\uC218\uD558\uAE30" })] }))] }) }));
99
99
  }
100
100
  export function TableComponent() {
101
101
  const data = [
@@ -186,7 +186,7 @@ export function AnnualTableComponent() {
186
186
  dDay: "25.08.23",
187
187
  regStartDay: "25.05.19",
188
188
  regEndDay: "25.07.22",
189
- resultDay: "25.09.04",
189
+ resultDay: "25.09.11",
190
190
  },
191
191
  {
192
192
  examNumber: "90",
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from "react";
2
+ import { useRef } from "react";
3
3
  import { cn } from "../../../util";
4
4
  import { useActionStore } from "../../../store";
5
5
  import Action from "../Action";
6
6
  import { ConfirmModal } from "../../../modal";
7
- import { useResponsive } from "../../../hook";
7
+ import { useResponsive, useVisibilityObserver } from "../../../hook";
8
8
  export default function Types() {
9
9
  const scrollContainerRef = useRef(null);
10
10
  const cardWidth = 400; // card width
@@ -158,28 +158,9 @@ const examStyles = {
158
158
  },
159
159
  };
160
160
  const ExamCard = ({ id, type, name, place, isHallofFame, report, certificate, majorColor, link, imgSrc, buttonText, mainPrice, subPrice, cocoonPrice, }) => {
161
- const [isVisible, setIsVisible] = useState(false);
162
- const imgRef = useRef(null);
163
161
  const { setModal } = useActionStore();
164
162
  const isMD = useResponsive("md");
165
- useEffect(() => {
166
- const observer = new IntersectionObserver((entries) => {
167
- entries.forEach((entry) => {
168
- if (entry.isIntersecting) {
169
- setIsVisible(true);
170
- observer.disconnect();
171
- }
172
- });
173
- }, { threshold: 0.1 });
174
- if (imgRef.current) {
175
- observer.observe(imgRef.current);
176
- }
177
- return () => {
178
- if (imgRef.current) {
179
- observer.unobserve(imgRef.current);
180
- }
181
- };
182
- }, []);
163
+ const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
183
164
  const ghostCard = {
184
165
  displays: "flex flex-col gap-5",
185
166
  spacings: "ms-0 ps-0 ",
@@ -299,7 +280,7 @@ const ExamCard = ({ id, type, name, place, isHallofFame, report, certificate, ma
299
280
  },
300
281
  ] }),
301
282
  ],
302
- ], children: _jsxs("div", { className: cn(ghostCard), children: [_jsxs("div", { className: cn(card), children: [_jsx("div", { className: cn(imageWrapper), children: _jsx("div", { className: "h-20 xxxs:h-30 md:h-40 flex mt-10 md:mt-16", children: _jsx("img", { ref: imgRef, src: imgSrc, alt: "", className: cn("max-w-full h-auto transform transition-all duration-1000 delay-0 ease-in-out", isVisible
283
+ ], children: _jsxs("div", { className: cn(ghostCard), children: [_jsxs("div", { className: cn(card), children: [_jsx("div", { className: cn(imageWrapper), children: _jsx("div", { className: "h-20 xxxs:h-30 md:h-40 flex mt-10 md:mt-16", children: _jsx("img", { ref: elementRef, src: imgSrc, alt: "", className: cn("max-w-full h-auto transform transition-all duration-1000 delay-0 ease-in-out", isVisible
303
284
  ? "translate-y-0 opacity-100"
304
285
  : "translate-y-10 opacity-0") }) }) }), _jsxs("div", { className: cn(contentsWrapper), children: [_jsxs("div", { className: cn(headline), children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(title), children: name }), _jsx("div", { className: cn(subtitle), children: place })] }), _jsx("div", { className: cn(typetag), children: type })] }), _jsxs("div", { className: cn(bottomWrapper), children: [_jsxs("div", { className: cn(bottomBox), children: [_jsx("div", { children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "size-6", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z" }) }) }), _jsxs("div", { className: cn(boxContentsWrapper, "ml-2"), children: [_jsx("div", { className: cn(miniTitle), children: "\uC751\uC2DC\uB8CC" }), _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { children: cocoonPrice && (_jsxs("div", { className: "text-xs font-medium text-gray-dark", children: ["cocoon: ", cocoonPrice] })) }), _jsxs("div", { className: "text-xs font-medium text-gray-dark", children: ["Pre-Starter ~ Junior: ", mainPrice] }), _jsxs("div", { className: "text-xs font-medium text-gray-dark", children: ["High Junior: ", subPrice] })] })] })] }), _jsxs("div", { className: cn(bottomBoxWrapper), children: [_jsxs("div", { className: cn(bottomBox, isHallofFame ? "bg-green-light" : "bg-crimson-burgundy/20"), children: [_jsx("div", { children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: cn(isHallofFame
305
286
  ? "size-6 fill-yellow-500"
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ import { Button as _Button } from "../../../interface";
3
+ export default function Layout({ children, buttons, }: {
4
+ children: ReactNode;
5
+ buttons?: _Button[];
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ export default function Layout({ children, buttons, }) {
4
+ const container = {
5
+ sizes: "w-full min-h-screen",
6
+ displays: "flex flex-col justify-start items-center",
7
+ backgrounds: "bg-gray-light",
8
+ pressures: "p-3.5",
9
+ };
10
+ const header = {
11
+ displays: "flex",
12
+ sizes: "w-full ",
13
+ };
14
+ return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(header), children: buttons?.map(({ title, onClick }) => (_jsx("button", { onClick: onClick, children: title }))) }), children] }));
15
+ }
@@ -0,0 +1,49 @@
1
+ type Level = "CC" | "PS" | "ST" | "BA" | "JR" | "HJ" | "AD";
2
+ type ExamType = "REG" | "IST" | "CMP";
3
+ export interface TranscriptProps {
4
+ info: {
5
+ name: string;
6
+ nickname?: string;
7
+ imgSrc?: string;
8
+ code: string;
9
+ birthday: string;
10
+ examName: string;
11
+ examDate: string;
12
+ examType: ExamType;
13
+ examValidAt: string;
14
+ level: Level;
15
+ };
16
+ result: {
17
+ score: number;
18
+ grade: number;
19
+ isHonor: boolean;
20
+ };
21
+ data: {
22
+ analysis: {
23
+ total: {
24
+ section1: number;
25
+ section2: number;
26
+ };
27
+ user: {
28
+ section1: number;
29
+ section2: number;
30
+ };
31
+ nationalAverage: {
32
+ section1: number;
33
+ section2: number;
34
+ };
35
+ localAverage: {
36
+ section1: number;
37
+ section2: number;
38
+ };
39
+ "10percentageAverage": number;
40
+ "30percentageAverage": number;
41
+ };
42
+ script: {
43
+ performanceEvaluation: string | string[];
44
+ section1: string | string[];
45
+ section2: string | string[];
46
+ };
47
+ };
48
+ }
49
+ export {};
@@ -0,0 +1,5 @@
1
+ import { TranscriptProps } from "./Transcript";
2
+ declare const _default: import("react").ForwardRefExoticComponent<{
3
+ props: TranscriptProps;
4
+ } & import("react").RefAttributes<HTMLDivElement>>;
5
+ export default _default;
@@ -0,0 +1,122 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { paperSize } from "../../../../style/size";
4
+ import { cn } from "../../../../util";
5
+ import { useResponsive } from "../../../../hook";
6
+ import { ResponsiveContainer, PieChart, Pie, Cell, } from "recharts";
7
+ const examTypeMap = {
8
+ REG: "정기시험",
9
+ IST: "기관시험",
10
+ CMP: "경시대회",
11
+ };
12
+ function getStringfromType(ExamType) {
13
+ return examTypeMap[ExamType] || "Unknown";
14
+ }
15
+ const LevelToStyleMap = {
16
+ CC: {
17
+ name: "Cocoon",
18
+ bgcolor: "bg-cocoon-green/10",
19
+ textcolor: "text-cocoon-green",
20
+ },
21
+ PS: {
22
+ name: "Pre-Starter",
23
+ bgcolor: "bg-ps-pink-light",
24
+ textcolor: "text-ps-pink",
25
+ },
26
+ ST: {
27
+ name: "Starter",
28
+ bgcolor: "bg-st-orange-light",
29
+ textcolor: "text-st-orange",
30
+ },
31
+ BA: {
32
+ name: "Basic",
33
+ bgcolor: "bg-ba-yellow-light",
34
+ textcolor: "text-ba-yellow",
35
+ },
36
+ JR: {
37
+ name: "Junior",
38
+ bgcolor: "bg-jr-blue-light",
39
+ textcolor: "text-jr-blue",
40
+ },
41
+ HJ: {
42
+ name: "High Junior",
43
+ bgcolor: "bg-hj-blue-light",
44
+ textcolor: "text-hj-blue",
45
+ },
46
+ AD: {
47
+ name: "Advanced",
48
+ bgcolor: "bg-gray-light",
49
+ textcolor: "text-gray-dark",
50
+ },
51
+ };
52
+ function getStylefromLevel(level, field) {
53
+ return LevelToStyleMap[level]?.[field] || "Unknown";
54
+ }
55
+ function TranscriptDesign({ props }, ref) {
56
+ const { info, result, data } = props;
57
+ const container = {
58
+ printSize: paperSize.a4,
59
+ backgrounds: "print:bg-white",
60
+ sizes: "w-full mt-2",
61
+ textStyles: "break-keep",
62
+ // test: "border-2 border-red-500",
63
+ };
64
+ const headerBox = {
65
+ display: "flex flex-row flex-wrap justify-between items-center",
66
+ sizes: "w-full h-fit rounded-md",
67
+ spacings: "px-5 py-2",
68
+ backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
69
+ };
70
+ const levelTag = {
71
+ display: "flex justify-center items-center",
72
+ textStyles: "text-center, ",
73
+ variableStyle: `text-center text-xs font-bold ${getStylefromLevel(info.level, "textcolor")}`,
74
+ backgrounds: getStylefromLevel(info.level, "bgcolor"),
75
+ sizes: "rounded-md w-fit h-fit",
76
+ spacings: "px-2 py-1",
77
+ };
78
+ const isMD = useResponsive("md");
79
+ return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-medium text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(ResultCard, { result: result })] }));
80
+ }
81
+ export default forwardRef(TranscriptDesign);
82
+ function ResultCard({ result }) {
83
+ return (_jsxs("div", { className: "flex flex-row w-full h-fit p-5 bg-white shadow-main rounded-lg mt-5 gap-5", children: [_jsx(CircularGauge, { score: result.score, maxScore: 100, isGrade: false }), _jsx(CircularGauge, { score: result.grade, maxScore: 9, isGrade: true })] }));
84
+ }
85
+ const CircularGauge = ({ score, maxScore, isGrade }) => {
86
+ const pieStyles = {
87
+ cx: "50%",
88
+ cy: "50%",
89
+ innerRadius: "70%",
90
+ outerRadius: "90%",
91
+ cornerRadius: 6,
92
+ dataKey: "value",
93
+ nameKey: "name",
94
+ };
95
+ const cellStyles = {
96
+ stroke: "rgba(255, 255, 255, 0)",
97
+ };
98
+ const scoreText = {
99
+ displays: "absolute flex justify-center items-center",
100
+ positions: "top-0 left-0",
101
+ sizes: "w-full h-full",
102
+ textStyles: "font-bold text-gray-medium text-2xl",
103
+ };
104
+ const preparePieChartData = () => {
105
+ const mainScore = score;
106
+ const remainingScore = maxScore - mainScore;
107
+ if (isGrade) {
108
+ return [
109
+ { name: "Score", value: remainingScore - 1 },
110
+ { name: "Grade", value: mainScore - 1 },
111
+ ];
112
+ }
113
+ else {
114
+ return [
115
+ { name: "Score", value: mainScore },
116
+ { name: "Remaining", value: remainingScore },
117
+ ];
118
+ }
119
+ };
120
+ return (_jsxs("div", { className: "w-full aspect-ratio-1/1 flex items-center justify-center relative", children: [_jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsx(Pie, { data: [{ name: "Background", value: 100 }], cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "90%", fill: "rgba(128, 128, 128, 0.2)" // 회색 배경 색상
121
+ , dataKey: "value", stroke: "rgb(255,255,255,0)", animationDuration: 0 }) }) }) }), _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, children: [_jsx(Cell, { fill: "#105652", ...cellStyles }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }), _jsx("div", { className: cn(scoreText), children: score })] }));
122
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export default function TranscriptDesign(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { paperSize } from "../../../../style/size";
3
+ import { cn } from "../../../../util";
4
+ export default function TranscriptDesign() {
5
+ const container = {
6
+ sizes: paperSize.a4,
7
+ backgrounds: "bg-white",
8
+ };
9
+ return _jsx("div", { className: cn(container), children: "asdf" });
10
+ }
@@ -0,0 +1,8 @@
1
+ import Layout from "./Layout";
2
+ declare const Transcript: {
3
+ Layout: typeof Layout;
4
+ Paper: import("react").ForwardRefExoticComponent<{
5
+ props: import("./design/Transcript").TranscriptProps;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
7
+ };
8
+ export default Transcript;
@@ -0,0 +1,7 @@
1
+ import Paper from "./design/Transcript.design";
2
+ import Layout from "./Layout";
3
+ const Transcript = {
4
+ Layout,
5
+ Paper,
6
+ };
7
+ export default Transcript;
@@ -3,7 +3,7 @@ interface BoxProps {
3
3
  sizes?: string;
4
4
  className?: string;
5
5
  }
6
- declare function Box({ sizes, children, className }: BoxProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function Box({ children, className }: BoxProps): import("react/jsx-runtime").JSX.Element;
7
7
  declare namespace Box {
8
8
  var Fix: ({ children, className }: Omit<BoxProps, "sizes">) => import("react/jsx-runtime").JSX.Element;
9
9
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
- function Box({ sizes, children, className }) {
3
+ function Box({ children, className }) {
4
4
  const container = {
5
- sizes: sizes ?? "w-112.5 p-5 ",
6
- style: "box-shadow bg-white rounded-xl",
5
+ sizes: "w-full p-5",
6
+ style: "shadow-main bg-white rounded-xl hover:shadow-green duration-300",
7
7
  className,
8
8
  };
9
9
  return _jsx("div", { className: cn(container), children: children });
@@ -1,9 +1,11 @@
1
1
  import { OnClick, State } from "../../../interface";
2
+ import { ReactNode } from "react";
2
3
  interface ButtonProps {
3
4
  title: string;
4
5
  onClick: OnClick;
5
6
  disabled?: boolean;
6
7
  size?: string;
8
+ icon?: ReactNode;
7
9
  }
8
10
  interface SelectButtonProps {
9
11
  state: State<string>;
@@ -16,7 +18,7 @@ interface SelectButtonProps {
16
18
  interface SelectButtonWithTitleProps extends SelectButtonProps {
17
19
  title: string;
18
20
  }
19
- declare function Button({ title, onClick, disabled, size }: ButtonProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function Button({ title, onClick, disabled, size, icon }: ButtonProps): import("react/jsx-runtime").JSX.Element;
20
22
  declare namespace Button {
21
23
  var Inner: ({ title, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
22
24
  var Choose: typeof Selection;
@@ -1,18 +1,19 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn, gradient } from "../../../util";
3
- function Button({ title, onClick, disabled, size }) {
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ function Button({ title, onClick, disabled, size, icon }) {
4
4
  const container = {
5
5
  sizes: size ?? "w-112.5 h-13.5",
6
- displays: "flex items-center justify-center",
7
- backgrounds: !disabled ? gradient.bg.greenToRed : "bg-gray-medium",
6
+ displays: "flex items-center justify-center gap-4",
7
+ backgrounds: !disabled ? "bg-green-dark" : "bg-gray-medium",
8
8
  cursors: !disabled ? "cursor-pointer" : "cursor-default",
9
- styles: "rounded-lgx text-white",
9
+ styles: "rounded-lgx text-white font-medium text-lg",
10
+ animations: "hover:shadow-green duration-300",
10
11
  };
11
- return (_jsx("div", { onClick: () => {
12
+ return (_jsxs("div", { onClick: () => {
12
13
  if (disabled)
13
14
  return;
14
15
  return onClick();
15
- }, className: cn(container), children: title }));
16
+ }, className: cn(container), children: [title, icon && icon] }));
16
17
  }
17
18
  function Inner({ title, onClick }) {
18
19
  return (_jsx(Button, { title: title, onClick: onClick, size: "w-full sm:w-102.5 h-13.5" }));
@@ -23,14 +24,15 @@ function Selection({ buttons, state }) {
23
24
  return {
24
25
  displays: "flex flex-1 justify-center items-center gap-3",
25
26
  sizes: "h-15",
26
- backgrounds: value === type ? "bg-green-dark/10" : "bg-gray-light",
27
+ backgrounds: value === type ? "bg-green-dark/10 shadow-green" : "bg-gray-light",
27
28
  styles: "rounded-lgx",
29
+ animations: "duration-300",
28
30
  };
29
31
  };
30
32
  return (_jsx("div", { className: "flex gap-2.5", children: buttons.map(({ icon, title, type }) => (_jsxs("button", { className: cn(container(type)), onClick: () => setValue(type), children: [_jsx("img", { src: icon }), _jsx("div", { children: title })] }, type))) }));
31
33
  }
32
34
  function WithTitle({ buttons, title, state }) {
33
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Selection, { buttons: buttons, state: state })] }));
35
+ return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Selection, { buttons: buttons, state: state })] }));
34
36
  }
35
37
  Button.Inner = Inner;
36
38
  Button.Choose = Selection;
@@ -2,6 +2,7 @@ interface LayoutProps {
2
2
  children: React.ReactNode;
3
3
  steps?: boolean[];
4
4
  script?: string;
5
+ title?: string;
5
6
  }
6
- export default function Layout({ children, steps, script }: LayoutProps): import("react/jsx-runtime").JSX.Element;
7
+ export default function Layout({ children, steps, script, title, }: LayoutProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -1,12 +1,22 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
- export default function Layout({ children, steps, script }) {
3
+ export default function Layout({ children, steps, script, title, }) {
4
4
  const container = {
5
5
  positions: "relative",
6
6
  sizes: "w-full min-h-screen overflow-hidden",
7
7
  displays: "flex flex-col items-center justify-center",
8
+ spacings: "px-5",
8
9
  };
9
- return (_jsxs("div", { className: cn(container), children: [_jsx("img", { src: "/images/logos/tosel.png", width: 180, height: 40 }), _jsx("div", { className: "mt-12", children: script }), _jsx("div", { className: "flex gap-5 my-5", children: steps?.map((step, index) => (_jsx(Light, { flag: step }, index))) }), children] }));
10
+ const headerBox = {
11
+ display: "flex flex-row justify-between items-center",
12
+ sizes: "h-15 w-full md:w-112.5",
13
+ spacings: "px-5",
14
+ backgorunds: "bg-gradient-to-r from-green-dark to-crimson-burgundy rounded-lg",
15
+ };
16
+ const titleText = {
17
+ textStyles: "font-bold text-base text-white",
18
+ };
19
+ return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "/images/logos/tosel-white-highdefinition.png", width: 93, height: 20, alt: "\uD1A0\uC140\uC758 \uBA54\uC778 \uB85C\uACE0" }), _jsx("div", { className: cn(titleText), children: title })] }), _jsx("div", { className: "mt-5 font-medium text-sm", children: script }), _jsx("div", { className: "flex gap-5 my-5", children: steps?.map((step, index) => (_jsx(Light, { flag: step }, index))) }), children] }));
10
20
  }
11
21
  function Light({ flag }) {
12
22
  const container = {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Input } from "../../../widget";
3
3
  function WithTitle(props) {
4
- return (_jsx("div", { className: "flex flex-col gap-1", children: _jsx(Input.Form, { ...props }) }));
4
+ return (_jsx("div", { className: "flex flex-col", children: _jsx(Input.Form, { ...props }) }));
5
5
  }
6
6
  export default WithTitle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.175",
3
+ "version": "1.0.177",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -0,0 +1,3 @@
1
+ export declare const paperSize: {
2
+ a4: string;
3
+ };
package/style/size.js ADDED
@@ -0,0 +1,3 @@
1
+ export const paperSize = {
2
+ a4: "print:w-[210mm] print:h-[297mm]",
3
+ };
@@ -0,0 +1,2 @@
1
+ declare const handlePrint: (ref: React.RefObject<HTMLDivElement>) => (event?: unknown, content?: (() => React.ReactInstance | null)) => void;
2
+ export default handlePrint;
@@ -0,0 +1,5 @@
1
+ import { useReactToPrint } from "react-to-print";
2
+ const handlePrint = (ref) => useReactToPrint({
3
+ content: () => ref.current,
4
+ });
5
+ export default handlePrint;
package/util/index.d.ts CHANGED
@@ -7,6 +7,6 @@ export { default as checkPathMatch } from "./checkPathMatch";
7
7
  export { default as createSetter } from "./createSetter";
8
8
  export { default as compareDates } from "./compareDates";
9
9
  export { default as convertDateToString } from "./convertDateToString";
10
- export * from "./colors";
10
+ export * from "../style/colors";
11
11
  export * from "./pattern";
12
12
  export * from "./shape";
package/util/index.js CHANGED
@@ -7,6 +7,6 @@ export { default as checkPathMatch } from "./checkPathMatch";
7
7
  export { default as createSetter } from "./createSetter";
8
8
  export { default as compareDates } from "./compareDates";
9
9
  export { default as convertDateToString } from "./convertDateToString";
10
- export * from "./colors";
10
+ export * from "../style/colors";
11
11
  export * from "./pattern";
12
12
  export * from "./shape";
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.175
1
+ 1.0.177
@@ -37,7 +37,7 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
37
37
  const placeholderString = typeof placeholder === "function" ? placeholder() : placeholder;
38
38
  const inputBox = {
39
39
  styles: styleByFlag(),
40
- sizes: "w-full sm:w-102.5 h-13.5",
40
+ sizes: "w-full md:w-102.5 h-13.5",
41
41
  paddings: `${placeholderString && "pt-3"} pl-5`,
42
42
  fonts: "text-sm",
43
43
  boundaries: "rounded-md outline-none",
File without changes
File without changes