@edu-tosel/design 1.0.177 → 1.0.180

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
@@ -52,5 +52,9 @@ declare const SVG: {
52
52
  User: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
53
53
  ChekMark: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
54
54
  };
55
+ Collab: {
56
+ Naver: ({ color, size }: import("./svg/Collab").IconProps) => import("react/jsx-runtime").JSX.Element;
57
+ Kakao: ({ color, size }: import("./svg/Collab").IconProps) => import("react/jsx-runtime").JSX.Element;
58
+ };
55
59
  };
56
60
  export default SVG;
package/asset/SVG.js CHANGED
@@ -11,6 +11,7 @@ import Profile from "./svg/Profile";
11
11
  import Symbol from "./svg/Symbol";
12
12
  import TOSEL from "./svg/TOSEL";
13
13
  import Login from "./svg/Login";
14
+ import Collab from "./svg/Collab";
14
15
  const SVG = {
15
16
  TOSEL,
16
17
  Close,
@@ -25,5 +26,6 @@ const SVG = {
25
26
  Profile,
26
27
  Symbol,
27
28
  Login,
29
+ Collab,
28
30
  };
29
31
  export default SVG;
package/asset/SVG.tsx CHANGED
@@ -11,6 +11,7 @@ import Profile from "./svg/Profile";
11
11
  import Symbol from "./svg/Symbol";
12
12
  import TOSEL from "./svg/TOSEL";
13
13
  import Login from "./svg/Login";
14
+ import Collab from "./svg/Collab";
14
15
 
15
16
  const SVG = {
16
17
  TOSEL,
@@ -26,6 +27,7 @@ const SVG = {
26
27
  Profile,
27
28
  Symbol,
28
29
  Login,
30
+ Collab,
29
31
  };
30
32
 
31
33
  export default SVG;
@@ -0,0 +1,11 @@
1
+ export interface IconProps {
2
+ color?: string;
3
+ size?: string;
4
+ }
5
+ declare const Collab: {
6
+ Naver: typeof Naver;
7
+ Kakao: typeof Kakao;
8
+ };
9
+ export default Collab;
10
+ declare function Naver({ color, size }: IconProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function Kakao({ color, size }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../util";
3
+ const Collab = {
4
+ Naver,
5
+ Kakao,
6
+ };
7
+ export default Collab;
8
+ function Naver({ color, size }) {
9
+ const iconStyling = {
10
+ backgrounds: color ?? "fill-white",
11
+ sizes: size ?? "size-6",
12
+ };
13
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "23", height: "23", viewBox: "0 0 23 23", fill: "none", className: cn(iconStyling), children: _jsx("path", { d: "M15.585 12.21L7.065 0H0V22.8H7.395V10.59L15.915 22.8H22.98V0H15.585V12.21Z" }) }));
14
+ }
15
+ function Kakao({ color, size }) {
16
+ const iconStyling = {
17
+ backgrounds: color ?? "fill-black",
18
+ sizes: size ?? "size-6",
19
+ };
20
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "37", height: "35", viewBox: "0 0 37 35", fill: "none", className: cn(iconStyling), children: _jsx("path", { d: "M17.9787 2C9.1517 2 2 7.77675 2 14.9085C2 19.5475 5.03175 23.6176 9.58191 25.8931C9.24786 27.1653 8.37225 30.5114 8.1951 31.2251C7.97746 32.1146 8.51397 32.0991 8.8632 31.8612C9.13651 31.675 13.2413 28.8203 15.0127 27.5894C15.9744 27.7342 16.9664 27.8118 17.9787 27.8118C26.8057 27.8118 33.9574 22.035 33.9574 14.9033C33.9574 7.77158 26.8057 2 17.9787 2Z" }) }));
21
+ }
@@ -0,0 +1,51 @@
1
+ import { cn } from "../../util";
2
+
3
+ export interface IconProps {
4
+ color?: string;
5
+ size?: string;
6
+ }
7
+
8
+ const Collab = {
9
+ Naver,
10
+ Kakao,
11
+ };
12
+
13
+ export default Collab;
14
+
15
+ function Naver({ color, size }: IconProps) {
16
+ const iconStyling = {
17
+ backgrounds: color ?? "fill-white",
18
+ sizes: size ?? "size-6",
19
+ };
20
+ return (
21
+ <svg
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ width="23"
24
+ height="23"
25
+ viewBox="0 0 23 23"
26
+ fill="none"
27
+ className={cn(iconStyling)}
28
+ >
29
+ <path d="M15.585 12.21L7.065 0H0V22.8H7.395V10.59L15.915 22.8H22.98V0H15.585V12.21Z" />
30
+ </svg>
31
+ );
32
+ }
33
+
34
+ function Kakao({ color, size }: IconProps) {
35
+ const iconStyling = {
36
+ backgrounds: color ?? "fill-black",
37
+ sizes: size ?? "size-6",
38
+ };
39
+ return (
40
+ <svg
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ width="37"
43
+ height="35"
44
+ viewBox="0 0 37 35"
45
+ fill="none"
46
+ className={cn(iconStyling)}
47
+ >
48
+ <path d="M17.9787 2C9.1517 2 2 7.77675 2 14.9085C2 19.5475 5.03175 23.6176 9.58191 25.8931C9.24786 27.1653 8.37225 30.5114 8.1951 31.2251C7.97746 32.1146 8.51397 32.0991 8.8632 31.8612C9.13651 31.675 13.2413 28.8203 15.0127 27.5894C15.9744 27.7342 16.9664 27.8118 17.9787 27.8118C26.8057 27.8118 33.9574 22.035 33.9574 14.9033C33.9574 7.77158 26.8057 2 17.9787 2Z" />
49
+ </svg>
50
+ );
51
+ }
@@ -1,9 +1,6 @@
1
- import { InfoCardProps } from "../../../interface";
1
+ import { Button as _Button, InfoCardProps } from "../../../interface";
2
2
  interface Data {
3
- button: {
4
- title: string;
5
- hoverTitle?: string;
6
- };
3
+ button: _Button;
7
4
  examDate: string;
8
5
  endDate: string;
9
6
  manager: string;
@@ -5,7 +5,7 @@ import { InfoCardDesign } from "../../design/InfoCard.design";
5
5
  import { label } from "./static/label";
6
6
  export default function Exam({ titles, data, option }) {
7
7
  const { button, isPublic, manager, examDate, endDate } = data;
8
- const { onClick, titleBorder } = option ?? {};
8
+ const { titleBorder } = option ?? {};
9
9
  const container = {
10
10
  positions: "relative",
11
11
  displays: "flex flex-col justify-between mt-2.5",
@@ -15,7 +15,7 @@ export default function Exam({ titles, data, option }) {
15
15
  titleBorder: titleBorder ?? "border-red-crimson",
16
16
  width: "sm",
17
17
  height: "xs",
18
- }, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-pretendard-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title: button.title, hoverTitle: button.hoverTitle, onClick: onClick, option: {
18
+ }, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-pretendard-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title: button.title, hoverTitle: button.hoverTitle, onClick: button.onClick, option: {
19
19
  width: "sm",
20
20
  height: "xs",
21
21
  className: cn(label),
@@ -1,5 +1,5 @@
1
1
  declare const useVisibilityObserver: (threshold?: number, observeOnce?: boolean) => {
2
2
  isVisible: boolean;
3
- elementRef: import("react").MutableRefObject<HTMLImageElement | null>;
3
+ elementRef: import("react").RefObject<HTMLDivElement>;
4
4
  };
5
5
  export default useVisibilityObserver;
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState, useRef } from "react";
2
2
  const useVisibilityObserver = (threshold = 0.1, observeOnce = true) => {
3
3
  const [isVisible, setIsVisible] = useState(false);
4
- const elementRef = useRef(null); // HTMLImageElement로 타입 변경
4
+ const elementRef = useRef(null); // HTMLDivElement로 타입 변경
5
5
  useEffect(() => {
6
6
  const observer = new IntersectionObserver((entries) => {
7
7
  entries.forEach((entry) => {
@@ -29,10 +29,3 @@ const useVisibilityObserver = (threshold = 0.1, observeOnce = true) => {
29
29
  return { isVisible, elementRef };
30
30
  };
31
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
- // )}
@@ -28,6 +28,7 @@ export interface Widget {
28
28
  }
29
29
  export interface LabelWidget extends Widget {
30
30
  title: string;
31
+ hoverTitle?: string;
31
32
  hoverState?: State<boolean>;
32
33
  disabled?: Disabled;
33
34
  onClick?: OnClick;
@@ -47,5 +47,5 @@ export default function SectionA() {
47
47
  animation: "transform transition-all duration-1000 delay-0 ease-in-out",
48
48
  };
49
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" })] })] }));
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", strokeWidth: "1.5", stroke: "currentColor", className: "size-6 text-white", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "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" })] })] }));
51
51
  }
@@ -6,7 +6,7 @@ export default function Card({ imgSource, name, position, description, handleCli
6
6
  const isXM = useResponsive("xm");
7
7
  const cardContainer = {
8
8
  displays: "max-w-[270px] flex flex-col gap-3",
9
- animations: `transform transition-all duration-1000 ease-in-out`,
9
+ animations: "transform transition-all duration-1000 ease-in-out",
10
10
  delay: isXM ? `delay-${delay}` : "delay-0",
11
11
  };
12
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 })] }));
@@ -1,76 +1,131 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- export default function SectionD() {
4
- const years = [
5
- "2024",
6
- "2023",
7
- "2022",
8
- "2021",
9
- "2020",
10
- "2019",
11
- "2018",
12
- "2017",
13
- "~2014",
14
- ];
15
- const histories = {
16
- "2024": {
17
- 4: { "2024.03": "고려대학교 미래교육원 TOSEL 전문과과정 개설" },
18
- 3: { "2024.02": "24년도 후기 고려대학교 대학원 입학전형 반영" },
19
- 2: { "2024.02": "경찰대학교 편입학전형 / 졸업인증 반영" },
20
- 1: { "2024.02": "정부 인사혁신처, 어학성적 등록 기관에 TOSEL 추가" },
21
- 0: { "2024.01": " 1회 TOSEL VOCA 올림피아드 실시" },
22
- },
23
- "2023": {
24
- 0: {
25
- "2023.11": "고려대학교 경영대학 전국 고등학생 대상 정기캠퍼스 투어 프로그램 후원기관 참여",
26
- },
27
- },
28
- "2022": {
29
- 0: { "2022.05": "AI 영어학습 플랫폼 TOSEL Lab 공개" },
30
- },
31
- "2021": {
32
- 1: {
33
- "2021.07": "고려대학교 공과대학 기계학습-빅 데이터 연구원 AI 연구협약 체결",
34
- },
35
- 0: { "2021.07": "소방청 간부후보생 선발시험 반영" },
2
+ import { useState, useRef } from "react";
3
+ import { cn } from "../../../util";
4
+ import { useResponsive } from "../../../hook";
5
+ // History data
6
+ const years = [
7
+ "2024",
8
+ "2023",
9
+ "2022",
10
+ "2021",
11
+ "2020",
12
+ "2019",
13
+ "2018",
14
+ "2017",
15
+ "~2014",
16
+ ];
17
+ const histories = {
18
+ "2024": {
19
+ 4: { "2024.03": "고려대학교 미래교육원 TOSEL 전문과과정 개설" },
20
+ 3: { "2024.02": "24년도 후기 고려대학교 대학원 입학전형 반영" },
21
+ 2: { "2024.02": "경찰대학교 편입학전형 / 졸업인증 반영" },
22
+ 1: { "2024.02": "정부 인사혁신처, 어학성적 등록 기관에 TOSEL 추가" },
23
+ 0: { "2024.01": "제 1회 TOSEL VOCA 올림피아드 실시" },
24
+ },
25
+ "2023": {
26
+ 0: {
27
+ "2023.11": "고려대학교 경영대학 전국 고등학생 대상 정기캠퍼스 투어 프로그램 후원기관 참여",
36
28
  },
37
- "2020": {
38
- 0: { "2020.06": "국토교통부 국가자격시험 반영" },
29
+ },
30
+ "2022": {
31
+ 0: { "2022.05": "AI 영어학습 플랫폼 TOSEL Lab 공개" },
32
+ },
33
+ "2021": {
34
+ 1: {
35
+ "2021.07": "고려대학교 공과대학 기계학습-빅 데이터 연구원 AI 연구협약 체결",
39
36
  },
40
- "2019": {
41
- 1: { "2019.11": "고려대학교 편입학 전형 반영" },
42
- 0: { "2019.06": "미얀마 / 베트남 TOSEL 시험 시행 계약" },
37
+ 0: { "2021.07": "소방청 간부후보생 선발시험 반영" },
38
+ },
39
+ "2020": {
40
+ 0: { "2020.06": "국토교통부 국가자격시험 반영" },
41
+ },
42
+ "2019": {
43
+ 1: { "2019.11": "고려대학교 편입학 전형 반영" },
44
+ 0: { "2019.06": "미얀마 / 베트남 TOSEL 시험 시행 계약" },
45
+ },
46
+ "2018": {
47
+ 0: { "2018.11": "관공서, 대기업 등 100개 기관에 토셀 반영" },
48
+ },
49
+ "2017": {
50
+ 0: { "2017.03": "중앙일보 주관기관 참여" },
51
+ },
52
+ "~2014": {
53
+ 10: { "2014.04": "전국 200여개 초등학교 단체 응시 실시" },
54
+ 9: { "2010.07": "경찰청 공무원 임용시 성적 가산점 부여" },
55
+ 8: { "2010.03": "고려대학교, TOSEL 출제 및 인증기관으로 참여" },
56
+ 7: {
57
+ "2009.12": "한국외국어응용학회, 팬코리아영어교육학회, 한국음성학회, 한국응용언어학회 인증 획득",
43
58
  },
44
- "2018": {
45
- 0: { "2018.11": "관공서, 대기업 등 100기관에 토셀 반영" },
46
- },
47
- "2017": {
48
- 0: { "2017.03": "중앙일보 주관기관 참여" },
49
- },
50
- "~2014": {
51
- 10: { "2014.04": "전국 200여개 초등학교 단체 응시 실시" },
52
- 9: { "2010.07": "경찰청 공무원 임용시 성적 가산점 부여" },
53
- 8: { "2010.03": "고려대학교, TOSEL 출제 및 인증기관으로 참여" },
54
- 7: {
55
- "2009.12": "한국외국어응용학회, 팬코리아영어교육학회, 한국음성학회, 한국응용언어학회 인증 획득",
56
- },
57
- 6: { "2009.12": "청심국제중/고 입학전형 반영" },
58
- 5: { "2009.01": "전국 15개 외고/자사고 입학전형 반영" },
59
- 4: { "2009.01": "서울시 공무원 근무평정에 TOSEL 점수 가산점 부여" },
60
- 3: { "2006.05": "민족사관고등학교 입학전형 반영" },
61
- 2: { "2006.04": "주관기관으로 EBS 참여" },
62
- 1: { "2004.09": "TOSEL-고려대학교 국제어학원 공동인증시험 실시" },
63
- 0: { "2002.02": "국제토셀위원회(ITC) 창설" },
64
- },
65
- };
66
- const [selectedYear, setSelectedYear] = useState("~2014");
59
+ 6: { "2009.12": "청심국제중/고 입학전형 반영" },
60
+ 5: { "2009.01": "전국 15외고/자사고 입학전형 반영" },
61
+ 4: { "2009.01": "서울시 공무원 근무평정에 TOSEL 점수 가산점 부여" },
62
+ 3: { "2006.05": "민족사관고등학교 입학전형 반영" },
63
+ 2: { "2006.04": "주관기관으로 EBS 참여" },
64
+ 1: { "2004.09": "TOSEL-고려대학교 국제어학원 공동인증시험 실시" },
65
+ 0: { "2002.02": "국제토셀위원회(ITC) 창설" },
66
+ },
67
+ };
68
+ // SectionD Component
69
+ export default function SectionD() {
70
+ const [selectedYear, setSelectedYear] = useState("2024");
71
+ const isMD = useResponsive("md");
67
72
  const handleYearClick = (year) => {
68
73
  setSelectedYear(year);
69
74
  };
70
- return (_jsx("div", { className: "w-full min-h-[1080px] bg-gray-light flex py-30 justify-center", children: _jsxs("div", { className: "w-[1200px] h-full flex flex-col items-center text-center gap-20 text-black", children: [_jsxs("div", { className: "font-semibold text-2xl", children: ["20\uB144 \uC804\uBD80\uD130 \uC9C0\uAE08\uAE4C\uC9C0", _jsx("br", {}), "\uD1A0\uC140\uC740 \uCD5C\uACE0\uC218\uC900\uC744 \uC704\uD55C \uAE38\uC744 \uAC78\uC5B4\uC654\uC2B5\uB2C8\uB2E4."] }), _jsxs("div", { className: "relative flex gap-12", children: [_jsx("div", { className: "flex flex-col gap-12 z-10", children: years.map((year, index) => (_jsxs("div", { className: "w-22 h-6 flex items-center justify-end text-center gap-3 cursor-pointer", onClick: () => handleYearClick(year), children: [_jsx("div", { className: `font-bold text-sm duration-700 transition-all ${selectedYear === year ? "text-black" : "text-[#B9B9B9]"}`, children: year }), _jsx("div", { className: `relative w-3 h-3 rounded-full transition-transform duration-500 ${selectedYear === year
71
- ? "transform scale-[1.3]"
72
- : "transform scale-100 bg-[#B9B9B9]"}`, children: selectedYear === year && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 rounded-full", style: {
73
- background: "linear-gradient(269deg, rgba(118, 0, 35) 0%, rgba(16, 86, 82) 100%)",
74
- padding: "2px",
75
- } }), _jsx("div", { className: "absolute inset-[2px] bg-white rounded-full" })] })) })] }, index))) }), _jsx("div", { className: "relative w-120 h-full", children: _jsx("div", { className: "absolute top-0 left-1/2 transform -translate-x-1/2 w-[480px] z-0", children: years.map((year) => (_jsx("div", { className: `transition-opacity duration-500 ease-in-out ${selectedYear === year ? "opacity-100" : "opacity-0"}`, children: selectedYear === year && (_jsx("div", { className: "flex flex-col gap-6 text-left", children: Object.entries(histories[year]).map(([_, event], idx) => (_jsx("div", { children: Object.entries(event).map(([date, detail]) => (_jsxs("div", { children: [_jsx("div", { className: "text-gray-medium text-sm font-semibold", children: date }), _jsx("div", { className: "text-black text-sm", children: detail })] }, date))) }, idx))) })) }, year))) }) })] })] }) }));
75
+ return (_jsx("div", { className: "w-full h-fit md:min-h-[1080px] bg-gray-light flex py-30 justify-center break-keep", children: _jsxs("div", { className: " h-full flex flex-col md:items-center text-left md:text-center gap-20 text-gray-dark", children: [_jsxs("div", { className: "font-semibold text-2xl p-5", children: ["20\uB144 \uC804\uBD80\uD130 \uC9C0\uAE08\uAE4C\uC9C0,", _jsx("br", {}), "\uD1A0\uC140\uC740 \uCD5C\uACE0\uC218\uC900\uC744 \uC704\uD55C \uAE38\uC744 \uAC78\uC5B4\uC654\uC2B5\uB2C8\uB2E4."] }), isMD ? (_jsx(PCYearBook, { years: years, selectedYear: selectedYear, handleYearClick: handleYearClick, histories: histories })) : (_jsx(MobileYearBook, { years: years, selectedYear: selectedYear, handleYearClick: handleYearClick, histories: histories }))] }) }));
76
+ }
77
+ // MobileYearBook Component
78
+ function MobileYearBook({ years, selectedYear, handleYearClick, histories, }) {
79
+ const yearListWrapper = {
80
+ displays: "flex flex-row relative",
81
+ position: "z-10",
82
+ scrollOption: "overflow-x-scroll w-screen scrollbar-hidden overflow-y-visible",
83
+ };
84
+ const yearBox = {
85
+ displays: "flex justify-center items-center flex-shrink-0",
86
+ sizes: "w-22 h-10",
87
+ textSytles: "text-center",
88
+ cursor: "cursor-pointer",
89
+ };
90
+ const divider = {
91
+ displays: "flex absolute -top-[1px]",
92
+ sizes: "w-full h-0.5",
93
+ backgrounds: "bg-green-dark",
94
+ };
95
+ const menuRef = useRef(null);
96
+ const barRef = useRef(null);
97
+ // 클릭된 연도 버튼을 가운데에 정렬
98
+ const handleYearClickWithScroll = (year, index) => {
99
+ handleYearClick(year); // 기존 클릭 핸들러 호출
100
+ const menuElement = menuRef.current;
101
+ const underBar = barRef.current;
102
+ if (menuElement && underBar) {
103
+ const button = menuElement.children[index]; // 클릭된 버튼
104
+ const offsetLeft = button.offsetLeft +
105
+ button.offsetWidth / 2 -
106
+ menuElement.clientWidth / 2;
107
+ menuElement.scrollTo({
108
+ left: offsetLeft,
109
+ behavior: "smooth",
110
+ });
111
+ if (button) {
112
+ const { offsetLeft, offsetWidth } = button;
113
+ const indicatorWidth = barRef.current.offsetWidth;
114
+ // 가로선 위치 조정
115
+ barRef.current.style.transform = `translateX(${offsetLeft + offsetWidth / 2 - indicatorWidth / 2}px)`;
116
+ barRef.current.style.transition = "transform 0.4s ease-in-out";
117
+ }
118
+ }
119
+ };
120
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: cn(yearListWrapper), ref: menuRef, children: [years.map((year, index) => (_jsx("div", { className: cn(yearBox), onClick: () => handleYearClickWithScroll(year, index), children: _jsx("div", { className: `font-bold text-lg duration-700 transition-all ${selectedYear === year ? "text-gray-dark" : "text-[#B9B9B9]"}`, children: year }) }, index))), _jsx("div", { ref: barRef, className: "absolute h-1 bg-green-dark bottom-0 w-22 z-20" // 가로선의 너비 조정
121
+ })] }), _jsx("div", { className: "w-full relative overflow-visible", children: _jsx("div", { className: cn(divider) }) }), _jsx("div", { className: "w-full h-fit p-5 mt-10", children: selectedYear && histories[selectedYear] && (_jsx("div", { className: "flex flex-col gap-10 text-left", children: Object.entries(histories[selectedYear]).map(([_, event], idx) => (_jsx("div", { children: Object.entries(event).map(([date, detail]) => (_jsxs("div", { children: [_jsx("div", { className: "text-gray-medium text-base font-bold", children: date }), _jsx("div", { className: "text-gray-dark text-base font-medium", children: detail })] }, date))) }, idx))) })) })] }));
122
+ }
123
+ // PCYearBook Component
124
+ function PCYearBook({ years, selectedYear, handleYearClick, histories, }) {
125
+ return (_jsxs("div", { className: "relative flex gap-12", children: [_jsx("div", { className: "flex flex-col z-10", children: years.map((year, index) => (_jsxs("div", { className: "w-22 h-18 flex items-start justify-end text-center gap-3 cursor-pointer relative", onClick: () => handleYearClick(year), children: [_jsx("div", { className: "absolute right-[5px] top-[3px] w-0.5 bg-[#B9B9B9] h-full" }), _jsx("div", { className: `font-bold leading-none text-sm duration-500 transition-all ${selectedYear === year ? "text-gray-dark" : "text-[#B9B9B9]"}`, children: year }), _jsx("div", { className: `relative w-3 h-3 rounded-full transition-transform duration-300 ${selectedYear === year
126
+ ? "transform scale-[1.3]"
127
+ : "transform scale-100 bg-[#B9B9B9]"}`, children: selectedYear === year && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 rounded-full", style: {
128
+ background: "linear-gradient(269deg, rgba(118, 0, 35) 0%, rgba(16, 86, 82) 100%)",
129
+ padding: "2px",
130
+ } }), _jsx("div", { className: "absolute inset-[2px] bg-white rounded-full" })] })) })] }, index))) }), _jsx("div", { className: "relative w-120 h-full", children: _jsx("div", { className: "absolute top-0 left-1/2 transform -translate-x-1/2 w-[480px] z-0", children: selectedYear && histories[selectedYear] && (_jsx("div", { className: "flex flex-col gap-6 text-left", children: Object.entries(histories[selectedYear]).map(([_, event], idx) => (_jsx("div", { children: Object.entries(event).map(([date, detail]) => (_jsxs("div", { children: [_jsx("div", { className: "text-gray-medium text-sm font-semibold", children: date }), _jsx("div", { className: "text-gray-dark text-sm", children: detail })] }, date))) }, idx))) })) }) })] }));
76
131
  }
@@ -1,5 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import SectionECards from "./SectionECards";
3
+ import { useResponsive } from "../../../hook";
3
4
  export default function SectionE() {
4
- return (_jsxs("div", { className: "w-full min-h-screen py-30 flex flex-col gap-30 items-center", children: [_jsxs("div", { className: "flex flex-col items-center justify-center gap-[34px]", children: [_jsx("div", { className: "text-crimson-burgundy text-4xl font-bold text-center", children: "\uD1A0\uC140\uACFC \uD568\uAED8\uD558\uB294 \uB2F9\uC2E0\uC758 \uC131\uC7A5" }), _jsx("div", { className: "text-black text-semibold text-sm", children: "\uC120\uC0DD\uB2D8\uACFC \uD559\uC0DD, \uBAA8\uB450\uB97C \uC704\uD55C \uC601\uC5B4\uAD50\uC721\uC758 \uC7A5\uC744 \uB9CC\uB4E4\uACE0\uC790 \uD569\uB2C8\uB2E4." })] }), _jsx("div", { className: "w-[1200px] px-5 grid grid-cols-2 gap-[50px]", children: _jsx(SectionECards, {}) })] }));
5
+ const isMD = useResponsive("md");
6
+ return (_jsxs("div", { className: "w-full min-h-screen py-30 flex flex-col gap-30 items-center break-keep", children: [_jsx("div", { className: "flex flex-col items-center justify-center gap-[34px]", children: isMD ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-crimson-burgundy text-4xl font-bold text-center", children: "\uD1A0\uC140\uACFC \uD568\uAED8\uD558\uB294 \uB2F9\uC2E0\uC758 \uC131\uC7A5" }), _jsx("div", { className: "text-black text-semibold text-2xl", children: "\uC120\uC0DD\uB2D8\uACFC \uD559\uC0DD, \uBAA8\uB450\uB97C \uC704\uD55C \uC601\uC5B4\uAD50\uC721\uC758 \uC7A5\uC744 \uB9CC\uB4E4\uACE0\uC790 \uD569\uB2C8\uB2E4." })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-crimson-burgundy text-2xl font-bold text-center", children: ["\uD1A0\uC140\uACFC \uD568\uAED8\uD558\uB294 ", _jsx("br", {}), " \uB2F9\uC2E0\uC758 \uC131\uC7A5"] }), _jsxs("div", { className: "text-black text-semibold text-base text-center", children: ["\uC120\uC0DD\uB2D8\uACFC \uD559\uC0DD, \uBAA8\uB450\uB97C \uC704\uD55C ", _jsx("br", {}), "\uC601\uC5B4\uAD50\uC721\uC758 \uC7A5\uC744 \uB9CC\uB4E4\uACE0\uC790 \uD569\uB2C8\uB2E4."] })] })) }), _jsx("div", { className: "w-full flex flex-col md:flex-row md:flex-wrap px-5 gap-5 md:gap-[50px] justify-center max-w-[1200px]", children: _jsx(SectionECards, {}) })] }));
5
7
  }
@@ -3,6 +3,14 @@ import { useState } from "react";
3
3
  import { HiOutlinePlusCircle, HiChevronRight, HiOutlineXCircle, } from "react-icons/hi2";
4
4
  export default function SectionECards() {
5
5
  const [activeCardIndex, setActiveCardIndex] = useState(null);
6
+ const onClicks = [
7
+ () => (window.location.pathname = "/regexam"),
8
+ () => (window.location.pathname = "/regexam"),
9
+ () => (window.location.href = "https://smartstore.naver.com/tosel"),
10
+ () => (window.location.pathname = "/olympiad"),
11
+ () => (window.location.href = "https://labentry.tosel.co.kr/"),
12
+ () => (window.location.pathname = "/events/20"),
13
+ ];
6
14
  const cardComponents = (onClicks) => [
7
15
  {
8
16
  imgSource: "img-aboutus-sectione-exam-min.jpg",
@@ -59,12 +67,13 @@ export default function SectionECards() {
59
67
  const handleCloseClick = () => {
60
68
  setActiveCardIndex(null);
61
69
  };
62
- return (_jsx(_Fragment, { children: cardComponents([]).map((card, index) => (_jsxs("div", { className: "w-full p-8 bg-cover bg-center h-[666px] rounded-2xl overflow-hidden text-white gap-5 flex flex-col relative", style: {
70
+ return (_jsx(_Fragment, { children: cardComponents(onClicks).map((card, index) => (_jsxs("div", { className: "w-full md:w-[555px] p-8 bg-cover bg-center md:h-[666px] h-[400px] rounded-2xl overflow-hidden text-white gap-5 flex flex-col relative break-keep", style: {
63
71
  backgroundImage: `url("/images/aboutus/section-f/${card.imgSource}")`,
64
- }, children: [_jsx("div", { className: "text-md font-normal " +
65
- `${activeCardIndex === index ? "opacity-0" : "opacity-100"}`, children: card.type }), _jsxs("div", { className: "text-3xl absolute left-[32px] transition-all duration-100 " +
72
+ }, children: [_jsx("div", { className: "md:text-lg font-normal " +
73
+ `${activeCardIndex === index ? "opacity-0" : "opacity-100"}`, children: card.type }), _jsxs("div", { className: "text-xl md:text-3xl absolute left-[32px] transition-all duration-100 " +
66
74
  `${activeCardIndex === index
67
75
  ? " top-[32px] z-10 text-[24px] font-bold"
68
- : "top-[76px] font-semibold"}`, children: [_jsx("div", { children: card.title1 }), _jsx("div", { children: card.title2 })] }), _jsx("div", { className: `text-xl cursor-pointer z-20 absolute left-[32px] top-[180px] ${activeCardIndex === index ? "opacity-0" : "opacity-100"}`, onClick: () => handleCardClick(index), children: _jsx(HiOutlinePlusCircle, {}) }), _jsxs("div", { className: "w-[490px] text-xl font-normal absolute left-[32px] top-[114px] z-10 transition-all duration-700 " +
69
- `${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, children: [card.description, _jsxs("div", { onClick: card.onClick, className: "mt-10 text-sm font-light flex items-center gap-1 cursor-pointer", children: ["\uB354 \uC54C\uC544\uBCF4\uAE30 ", _jsx(HiChevronRight, {})] })] }), _jsx("div", { className: `w-full h-full bg-black/50 absolute top-0 left-0 transition-opacity duration-500 ${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, style: { backdropFilter: "blur(5px)" } }), _jsx("div", { className: `text-xl cursor-pointer z-20 absolute left-[32px] bottom-[32px] ${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, onClick: handleCloseClick, children: _jsx(HiOutlineXCircle, {}) })] }, index))) }));
76
+ : "top-[76px] font-bold"}`, children: [_jsx("div", { children: card.title1 }), _jsx("div", { children: card.title2 })] }), _jsx("div", { className: `text-xl cursor-pointer z-20 absolute left-[32px] top-[180px] ${activeCardIndex === index ? "opacity-0" : "opacity-100"}`, onClick: () => handleCardClick(index), children: _jsx(HiOutlinePlusCircle, {}) }), _jsxs("div", { className: "w-[calc(100vw-104px)] md:w-[490px] text-sm md:text-xl font-normal absolute left-[32px] top-[114px] md:top-[130px] z-10 transition-all duration-700 " +
77
+ `${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, children: [card.description, _jsxs("div", { onClick: card.onClick, className: "mt-10 text-sm font-light flex items-center gap-1 cursor-pointer" +
78
+ `${activeCardIndex === index ? "opacity-100" : "opacity-0 hidden"}`, children: ["\uB354 \uC54C\uC544\uBCF4\uAE30 ", _jsx(HiChevronRight, {})] })] }), _jsx("div", { className: `w-full h-full bg-black/50 absolute top-0 left-0 transition-opacity duration-500 ${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, style: { backdropFilter: "blur(5px)" } }), _jsx("div", { className: `text-xl cursor-pointer z-20 absolute left-[32px] bottom-[32px] ${activeCardIndex === index ? "opacity-100" : "opacity-0"}`, onClick: handleCloseClick, children: _jsx(HiOutlineXCircle, {}) })] }, index))) }));
70
79
  }
@@ -1,4 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export default function SectionF() {
3
- return (_jsxs("div", { className: "w-full bg-gray-light h-auto min-w-[800px] py-16 flex flex-col gap-16 justify-center text-black", children: [_jsxs("div", { className: "text-2xl font-semibold flex justify-center items-center text-center", children: ["\uAD6D\uB0B4 \uC8FC\uC694 \uC5B8\uC5B4/\uAD50\uC721 \uAE30\uAD00\uB4E4\uC774", _jsx("br", {}), "\uD1A0\uC140\uACFC \uD568\uAED8\uD569\uB2C8\uB2E4."] }), _jsxs("div", { className: "flex justify-center items-center text-center flex-col gap-2 font-semibold", children: [_jsx("div", { className: "text-sm", children: "\uCD9C\uC81C \uBC0F \uC778\uC99D:" }), _jsx("img", { src: "/images/aboutus/section-f/logo-KU-min.png", className: "w-[230px]", alt: "" })] }), _jsxs("div", { className: "flex justify-center items-center text-center flex-col font-semibold gap-2", children: [_jsx("div", { className: "text-sm", children: "\uD559\uD68C \uC778\uC99D \uD68D\uB4DD:" }), _jsxs("div", { className: "flex", children: [_jsx("img", { src: "/images/aboutus/section-e/logo-\uD55C\uAD6D\uC74C\uC131\uD559\uD68C@4x.png", className: "w-60", alt: "" }), _jsx("img", { src: "/images/aboutus/section-e/logo-ALAK@4x-min.png", className: "w-60", alt: "" }), _jsx("img", { src: "/images/aboutus/section-e/logo-KAFLE@4x-min.png", className: "w-60", alt: "" }), _jsx("img", { src: "/images/aboutus/section-e/logo-PKETA@4x-min.png", className: "w-60", alt: "" })] })] })] }));
3
+ return (_jsxs("div", { className: "w-full bg-gray-light h-auto py-16 flex flex-col gap-16 justify-center text-gray-dark", children: [_jsxs("div", { className: "text-lg md:text-2xl font-bold flex justify-center items-center text-center", children: ["\uAD6D\uB0B4 \uC8FC\uC694 \uC5B8\uC5B4/\uAD50\uC721 \uAE30\uAD00\uB4E4\uC774", _jsx("br", {}), "\uD1A0\uC140\uACFC \uD568\uAED8\uD569\uB2C8\uB2E4."] }), _jsxs("div", { className: "flex justify-center items-center text-center flex-col gap-2 font-semibold", children: [_jsx("div", { className: "text-sm", children: "\uCD9C\uC81C \uBC0F \uC778\uC99D:" }), _jsx("img", { src: "/images/aboutus/section-f/logo-KU-min.png", className: "w-[230px]", alt: "" })] }), _jsxs("div", { className: "flex justify-center items-center text-center flex-col font-semibold gap-2", children: [_jsx("div", { className: "text-sm", children: "\uD559\uD68C \uC778\uC99D \uD68D\uB4DD:" }), _jsxs("div", { className: "flex flex-wrap max-w-[1200px] items-start justify-center", children: [_jsxs("div", { className: "flex max-w-[490px] justify-center align-center gap-2.5 flex-1 flex-wrap", children: [_jsx("img", { src: "/images/aboutus/section-e/logo-\uD55C\uAD6D\uC74C\uC131\uD559\uD68C@4x.png", className: "w-60", alt: "" }), _jsx("img", { src: "/images/aboutus/section-e/logo-ALAK@4x-min.png", className: "w-60", alt: "" })] }), _jsxs("div", { className: "flex max-w-[490px] justify-center align-center gap-2.5 flex-1 flex-wrap", children: [_jsx("img", { src: "/images/aboutus/section-e/logo-KAFLE@4x-min.png", className: "w-60", alt: "" }), _jsx("img", { src: "/images/aboutus/section-e/logo-PKETA@4x-min.png", className: "w-60", alt: "" })] })] })] })] }));
4
4
  }
@@ -1 +1,10 @@
1
- export default function SectionG(): import("react/jsx-runtime").JSX.Element;
1
+ interface newsProps {
2
+ media: string;
3
+ date: string;
4
+ title: string;
5
+ link?: string;
6
+ }
7
+ export default function SectionG({ news }: {
8
+ news: newsProps[];
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,39 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import SelectLG from "../../../widget/template/Select/Select.LG";
4
- export default function SectionG() {
5
- const datas = [
6
- {
7
- company: "서울신문",
8
- date: "2018.06",
9
- title: "경찰 임용시험 가산점 받는 자격증, TOSEL",
10
- },
11
- {
12
- company: "서울신문",
13
- date: "2018.06",
14
- title: "경찰 임용시험 가산점 받는 자격증, TOSEL",
15
- },
16
- {
17
- company: "서울신문",
18
- date: "2018.06",
19
- title: "경찰 임용시험 가산점 받는 자격증, TOSEL",
20
- },
21
- {
22
- company: "서울신문",
23
- date: "2018.06",
24
- title: "경찰 임용시험 가산점 받는 자격증, TOSEL",
25
- },
26
- {
27
- company: "서울신문",
28
- date: "2018.06",
29
- title: "경찰 임용시험 가산점 받는 자격증, TOSEL",
30
- },
31
- ];
32
- const [selectedYear, setSelectedYear] = useState(2018);
4
+ export default function SectionG({ news }) {
5
+ const [selectedYear, setSelectedYear] = useState(0);
6
+ const [visibleCount, setVisibleCount] = useState(4); // 초기 표시 개수
33
7
  const filteredDatas = selectedYear === 0
34
- ? datas
35
- : datas.filter((data) => parseInt(data.date.split(".")[0], 10) === selectedYear);
36
- return (_jsx("div", { className: "w-full h-auto min-h-[800px] min-w-[800px] py-30 flex flex-col gap-20 text-green-dark items-center", children: _jsxs("div", { className: "w-[1200px] ", children: [_jsxs("div", { className: "text-6xl font-bold flex justify-between items-center text-center", children: [_jsx("div", { children: "\uC5B8\uB860 \uC18D\uC758 \uD1A0\uC140" }), _jsx("div", { className: "text-sm border-1 border-green-dark rounded-xl", children: _jsx(SelectLG, { state: [selectedYear, setSelectedYear], placeholder: "\uBAA8\uB450\uBCF4\uAE30", selectOptions: [
8
+ ? news
9
+ : news.filter((data) => parseInt(data.date.split(".")[0], 10) === selectedYear);
10
+ // '더 보기' 버튼 클릭 4개씩 추가로 표시
11
+ const handleLoadMore = () => {
12
+ setVisibleCount((prevCount) => prevCount + 4);
13
+ };
14
+ return (_jsx("div", { className: "w-full h-auto min-h-[800px] py-10 md:py-30 flex flex-col gap-20 text-green-dark items-center break-keep", children: _jsxs("div", { className: "flex flex-col max-w-[1200px] w-full p-5", children: [_jsxs("div", { className: "text-6xl font-bold flex flex-col sm:flex-row justify-between items-start sm:items-center text-center mb-5", children: [_jsx("div", { className: "text-[36px] md:text-5xl", children: "\uC5B8\uB860 \uC18D\uC758 \uD1A0\uC140" }), _jsx("div", { className: "text-sm mt-2 rounded-lg", children: _jsx(SelectLG, { state: [selectedYear, setSelectedYear], placeholder: "\uBAA8\uB450\uBCF4\uAE30", selectOptions: [
37
15
  [0, "모두보기"],
38
16
  [2023, "2023"],
39
17
  [2022, "2022"],
@@ -45,5 +23,5 @@ export default function SectionG() {
45
23
  [2016, "2016"],
46
24
  [2015, "2015"],
47
25
  [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 text-left text-black font-light", children: data.title })] }) }, index)))] }) }));
26
+ ] }) })] }), filteredDatas.slice(0, visibleCount).map((data, index) => (_jsx("a", { href: data.link, className: "w-full flex text-center flex-col border-b-1 border-gray-light/50 hover:bg-gray-light/20", children: _jsxs("div", { className: "w-full h-fit py-4 md:py-8 flex flex-col gap-3 pl-2", children: [_jsxs("div", { className: "flex gap-3 items-center", children: [_jsx("div", { className: "text-green-dark font-bold md:text-base text-xs", children: data.media }), _jsx("div", { className: "md:text-base text-xs text-gray-medium", children: data.date })] }), _jsx("div", { className: "md:text-xl text-base text-left text-black font-light", children: data.title })] }) }, index))), visibleCount < filteredDatas.length && (_jsx("div", { className: "flex justify-center items-center", children: _jsx("button", { onClick: handleLoadMore, className: "mt-4 p-2 bg-green-light text-green-dark rounded w-full sm:w-20 hover:bg-green-dark hover:text-white duration-300", children: "\uB354 \uBCF4\uAE30" }) }))] }) }));
49
27
  }
@@ -280,7 +280,7 @@ const ExamCard = ({ id, type, name, place, isHallofFame, report, certificate, ma
280
280
  },
281
281
  ] }),
282
282
  ],
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
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", ref: elementRef, children: _jsx("img", { src: imgSrc, alt: "", className: cn("max-w-full h-auto transform transition-all duration-1000 delay-0 ease-in-out", isVisible
284
284
  ? "translate-y-0 opacity-100"
285
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
286
286
  ? "size-6 fill-yellow-500"
@@ -2,8 +2,9 @@ interface BoxProps {
2
2
  children: React.ReactNode;
3
3
  sizes?: string;
4
4
  className?: string;
5
+ texts?: string[];
5
6
  }
6
- declare function Box({ children, className }: BoxProps): import("react/jsx-runtime").JSX.Element;
7
+ declare function Box({ children, className, texts }: BoxProps): import("react/jsx-runtime").JSX.Element;
7
8
  declare namespace Box {
8
9
  var Fix: ({ children, className }: Omit<BoxProps, "sizes">) => import("react/jsx-runtime").JSX.Element;
9
10
  }
@@ -1,12 +1,15 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
- function Box({ children, className }) {
3
+ function Box({ children, className, texts }) {
4
4
  const container = {
5
5
  sizes: "w-full p-5",
6
6
  style: "shadow-main bg-white rounded-xl hover:shadow-green duration-300",
7
7
  className,
8
8
  };
9
- return _jsx("div", { className: cn(container), children: children });
9
+ const alarmText = {
10
+ textStyles: "text-crimson-burgundy font-medium text-xs leading-none",
11
+ };
12
+ return (_jsxs("div", { className: "w-full", children: [_jsx("div", { className: cn(container), children: children }), texts && (_jsx("div", { className: "mt-2", children: texts.map((text) => (_jsx("div", { className: cn(alarmText), children: text }))) }))] }));
10
13
  }
11
14
  function Fix({ children, className }) {
12
15
  return (_jsx(Box, { className: className, sizes: "w-full max-w-112.5 h-65 xs:h-67.5 pt-8 xs:pt-10.25 px-2.5 xs:px-5 pb-2.5 xs:pb-5", children: children }));
@@ -6,6 +6,7 @@ interface ButtonProps {
6
6
  disabled?: boolean;
7
7
  size?: string;
8
8
  icon?: ReactNode;
9
+ bg?: string;
9
10
  }
10
11
  interface SelectButtonProps {
11
12
  state: State<string>;
@@ -18,9 +19,9 @@ interface SelectButtonProps {
18
19
  interface SelectButtonWithTitleProps extends SelectButtonProps {
19
20
  title: string;
20
21
  }
21
- declare function Button({ title, onClick, disabled, size, icon }: ButtonProps): import("react/jsx-runtime").JSX.Element;
22
+ declare function Button({ title, onClick, disabled, size, icon, bg }: ButtonProps): import("react/jsx-runtime").JSX.Element;
22
23
  declare namespace Button {
23
- var Inner: ({ title, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
24
+ var Inner: ({ title, onClick, bg }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
24
25
  var Choose: typeof Selection;
25
26
  }
26
27
  declare function Selection({ buttons, state }: SelectButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
- function Button({ title, onClick, disabled, size, icon }) {
3
+ function Button({ title, onClick, disabled, size, icon, bg }) {
4
4
  const container = {
5
5
  sizes: size ?? "w-112.5 h-13.5",
6
6
  displays: "flex items-center justify-center gap-4",
7
- backgrounds: !disabled ? "bg-green-dark" : "bg-gray-medium",
7
+ backgrounds: !disabled ? bg ?? "bg-green-dark" : "bg-gray-medium",
8
8
  cursors: !disabled ? "cursor-pointer" : "cursor-default",
9
9
  styles: "rounded-lgx text-white font-medium text-lg",
10
10
  animations: "hover:shadow-green duration-300",
@@ -15,8 +15,8 @@ function Button({ title, onClick, disabled, size, icon }) {
15
15
  return onClick();
16
16
  }, className: cn(container), children: [title, icon && icon] }));
17
17
  }
18
- function Inner({ title, onClick }) {
19
- return (_jsx(Button, { title: title, onClick: onClick, size: "w-full sm:w-102.5 h-13.5" }));
18
+ function Inner({ title, onClick, bg }) {
19
+ return (_jsx(Button, { title: title, onClick: onClick, size: "w-full sm:w-102.5 h-13.5", bg: bg }));
20
20
  }
21
21
  function Selection({ buttons, state }) {
22
22
  const [value, setValue] = state;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.177",
3
+ "version": "1.0.180",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.177
1
+ 1.0.180
@@ -15,5 +15,5 @@ export default function Checkbox({ state: [checked, setChecked], labels, option,
15
15
  green: "checked:bg-[#DFE6E5]",
16
16
  };
17
17
  const { disabled } = option ?? {};
18
- return (_jsxs("div", { className: "w-auto h-6 flex items-center ", children: [_jsx("input", { type: "checkbox", className: `check-box mr-2 appearance-none w-6 h-6 border-2 border-[#E8EBF3] rounded-md ${checkBoxColor[color]} hover:box-shadow`, disabled: typeof disabled === "boolean" && disabled, checked: checked, onChange: (e) => setChecked(e.target.checked) }), _jsx("label", { htmlFor: "checkbox1", children: labels })] }));
18
+ return (_jsxs("div", { className: "w-auto h-6 flex items-center ", children: [_jsx("input", { type: "checkbox", className: `check-box mr-2 appearance-none w-6 h-6 border-2 border-[#E8EBF3] rounded-md ${checkBoxColor[color]} hover:box-shadow`, disabled: typeof disabled === "boolean" && disabled, checked: checked, onChange: (e) => setChecked(e.target.checked) }), _jsx("label", { htmlFor: "checkbox1", className: "text-xs", children: labels })] }));
19
19
  }
@@ -26,7 +26,7 @@ export default function SelectLG({ state, selectOptions: selectOptionsInput, pla
26
26
  const [search, setSearch] = useState("");
27
27
  const [isOpen, setIsOpen] = useState(false);
28
28
  const [isHover, setIsHover] = useState(false);
29
- const [index, setIndex] = useState();
29
+ const [index, setIndex] = useState(0);
30
30
  const listRef = useRef(null);
31
31
  const itemRefs = useRef([]);
32
32
  useFlag({ state: [false, setIsOpen], safe: "overlay" });
@@ -63,14 +63,14 @@ export default function SelectLG({ state, selectOptions: selectOptionsInput, pla
63
63
  const button = {
64
64
  displays: "flex items-center",
65
65
  sizes: `${widthSize[option?.width ?? "md"]} ${heightSize[option?.height ?? "sm"]}`,
66
- styles: "pl-1 rounded-md focus:outline-none duration-100 text-gray-400",
66
+ styles: "px-1 rounded-md focus:outline-none duration-100 text-gray-400",
67
67
  backgrounds: isDark && "bg-[#282828]",
68
- shadow: isOpen || isHover ? "box-shadow" : "shadow-none",
68
+ shadow: isHover ? "shadow-green" : "shadow-main",
69
69
  };
70
70
  const input = {
71
71
  positions: "absolute z-30",
72
72
  layouts: cn(button),
73
- styles: "focus:outline-none text-xs pl-1.5",
73
+ styles: "outline-none focus:shadow-green text-xs pl-1.5 duration-300",
74
74
  };
75
75
  const body = {
76
76
  positions: "absolute z-30",
@@ -84,15 +84,21 @@ export default function SelectLG({ state, selectOptions: selectOptionsInput, pla
84
84
  displays: "flex items-center",
85
85
  sizes: "h-7 w-full",
86
86
  paddings: "px-2",
87
- styles: "rounded-sm duration-500",
87
+ styles: "rounded-md duration-500",
88
88
  backgrounds: !flag
89
89
  ? !isDark
90
- ? "hover:bg-green-dark"
90
+ ? "hover:bg-green-light"
91
91
  : "bg-[#282828] hover:bg-[#8F7B39] "
92
92
  : !isDark
93
93
  ? "bg-green-dark"
94
94
  : "bg-[#8F7B39]",
95
- fonts: !isDark ? "text-xs text-gray-dim hover:text-white" : "text-white ",
95
+ fonts: !flag
96
+ ? !isDark
97
+ ? "text-xs text-gray-dim hover:text-green-dark"
98
+ : "text-white"
99
+ : !isDark
100
+ ? "text-xs text-white"
101
+ : "text-green-dark",
96
102
  });
97
103
  const inputTransition = useTransition(isOpen, {
98
104
  from: { top: 44 },
@@ -109,6 +115,7 @@ export default function SelectLG({ state, selectOptions: selectOptionsInput, pla
109
115
  return (_jsxs("div", { className: cn(container), onClick: () => setIsOwn(true), onKeyDown: onKeyDown, children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: cn(button), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label(false)), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
110
116
  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) => {
111
117
  return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: filteredOptions?.map(({ value, title }, order) => (_jsx("section", { children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), onClick: () => {
118
+ setIndex(order);
112
119
  setValue(value);
113
120
  setText(String(title));
114
121
  return setIsOpen(false);