@edu-tosel/design 1.0.126 → 1.0.127

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 (35) hide show
  1. package/card/design/RollCard.design.js +1 -1
  2. package/globals.css +3 -0
  3. package/hook/index.d.ts +1 -0
  4. package/hook/index.js +1 -0
  5. package/layout/index.d.ts +1 -0
  6. package/layout/index.js +1 -0
  7. package/layout/template/Announcement/Layout.d.ts +5 -3
  8. package/layout/template/Announcement/Layout.js +3 -13
  9. package/layout/template/Announcement/Many.js +1 -2
  10. package/layout/template/Announcement/One.js +1 -2
  11. package/layout/template/Archive/Container.d.ts +6 -0
  12. package/layout/template/Archive/Container.js +23 -0
  13. package/layout/template/Archive/Content.d.ts +10 -0
  14. package/layout/template/Archive/Content.js +72 -0
  15. package/layout/template/Archive/Header.d.ts +4 -0
  16. package/layout/template/Archive/Header.js +31 -0
  17. package/layout/template/Archive/Layout.d.ts +5 -0
  18. package/layout/template/Archive/Layout.js +5 -0
  19. package/layout/template/Archive/index.d.ts +11 -0
  20. package/layout/template/Archive/index.js +11 -0
  21. package/layout/template/BbsLayout.d.ts +6 -0
  22. package/layout/template/BbsLayout.js +18 -0
  23. package/layout/template/Olympiad/Features.js +1 -1
  24. package/layout/template/Olympiad/Prizes.d.ts +1 -0
  25. package/layout/template/Olympiad/Prizes.js +49 -0
  26. package/layout/template/Olympiad/Sponsors.d.ts +1 -0
  27. package/layout/template/Olympiad/Sponsors.js +31 -0
  28. package/layout/template/Olympiad/index.d.ts +4 -0
  29. package/layout/template/Olympiad/index.js +4 -0
  30. package/layout/template/home/layout/Carousel.js +1 -1
  31. package/package.json +1 -1
  32. package/version.txt +1 -1
  33. package/widget/template/Input/index.js +21 -7
  34. /package/hook/{useMobile.d.ts → useResponsive.d.ts} +0 -0
  35. /package/hook/{useMobile.js → useResponsive.js} +0 -0
@@ -5,7 +5,7 @@ import { Action, Shelf } from "../../layout";
5
5
  import Card from "./Card.design";
6
6
  import { useEffect, useState } from "react";
7
7
  import { cn } from "../../util";
8
- import useMobile from "../../hook/useMobile";
8
+ import useMobile from "../../hook/useResponsive";
9
9
  export default function RollCardDesign({ titles, state, disabled, isFixed, children, }) {
10
10
  const [isOpen, setIsOpen] = state;
11
11
  const [isDisabled, disabledFn] = disabled || [false, () => { }];
package/globals.css CHANGED
@@ -116,6 +116,9 @@ input[type="date"]::-webkit-calendar-picker-indicator {
116
116
  background: rgba(16, 86, 82, 0.1);
117
117
  color: #105652;
118
118
  }
119
+ .box-shadow-green-sm {
120
+ box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38);
121
+ }
119
122
  .box-green-focus:focus {
120
123
  background: white;
121
124
  color: black;
package/hook/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as useEase } from "./useEase";
2
2
  export { default as useEvents } from "./useEvents";
3
3
  export { default as useFlag } from "./useFlag";
4
+ export { default as useResponsive } from "./useResponsive";
package/hook/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as useEase } from "./useEase";
2
2
  export { default as useEvents } from "./useEvents";
3
3
  export { default as useFlag } from "./useFlag";
4
+ export { default as useResponsive } from "./useResponsive";
package/layout/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as Action } from "./template/Action";
2
2
  export { default as About } from "./template/About";
3
3
  export { default as Announcement } from "./template/Announcement";
4
+ export { default as Archive } from "./template/Archive";
4
5
  export { default as Home } from "./template/home";
5
6
  export * from "./template/dashboard";
6
7
  export { default as Promotion } from "./template/Promotion";
package/layout/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as Action } from "./template/Action";
2
2
  export { default as About } from "./template/About";
3
3
  export { default as Announcement } from "./template/Announcement";
4
+ export { default as Archive } from "./template/Archive";
4
5
  export { default as Home } from "./template/home";
5
6
  export * from "./template/dashboard";
6
7
  export { default as Promotion } from "./template/Promotion";
@@ -1,3 +1,5 @@
1
- export default function Layout({ children }: {
2
- children: React.ReactNode;
3
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { BbsLayoutProps } from "../BbsLayout";
2
+ interface LayoutProps extends Omit<BbsLayoutProps, "title"> {
3
+ }
4
+ export default function Layout({ children }: LayoutProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -1,15 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../../util";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import BbsLayout from "../BbsLayout";
3
3
  export default function Layout({ children }) {
4
- const container = {
5
- displays: "flex flex-col items-center",
6
- sizes: "w-full min-h-screen",
7
- };
8
- const header = {
9
- displays: "flex justify-start items-end",
10
- sizes: "w-full max-w-[1200px] h-[188px]",
11
- boundaries: "pl-12 pb-10",
12
- };
13
- return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(header), children: _jsxs("div", { className: "flex gap-x-5 items-center", children: [_jsx(SVG, {}), _jsx("div", { className: "text-[40px] leading-none font-pretendard-bold text-green-dark", children: "\uACF5\uC9C0\uC0AC\uD56D" })] }) }), children] }));
4
+ return (_jsx(BbsLayout, { title: "\uACF5\uC9C0\uC0AC\uD56D", icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", children: _jsx("path", { d: "M31.332 7.776C31.0653 6.8326 30.4979 6.0021 29.716 5.41077C28.934 4.81944 27.9804 4.49964 27 4.5H21C18.94 4.5 17.2 5.886 16.668 7.776M31.332 7.776C31.442 8.164 31.5 8.576 31.5 9C31.5 9.39783 31.342 9.77936 31.0607 10.0607C30.7794 10.342 30.3978 10.5 30 10.5H18C17.6022 10.5 17.2206 10.342 16.9393 10.0607C16.658 9.77936 16.5 9.39783 16.5 9C16.5 8.576 16.56 8.164 16.668 7.776M31.332 7.776C32.624 7.874 33.908 7.996 35.186 8.144C37.386 8.4 39 10.298 39 12.514V39C39 40.1935 38.5259 41.3381 37.682 42.182C36.8381 43.0259 35.6935 43.5 34.5 43.5H13.5C12.3065 43.5 11.1619 43.0259 10.318 42.182C9.47411 41.3381 9 40.1935 9 39V12.514C9 10.298 10.612 8.4 12.814 8.144C14.0961 7.99555 15.381 7.87286 16.668 7.776", stroke: "#105652", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }), children: children }));
14
5
  }
15
- const SVG = () => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", children: _jsx("path", { d: "M31.332 7.776C31.0653 6.8326 30.4979 6.0021 29.716 5.41077C28.934 4.81944 27.9804 4.49964 27 4.5H21C18.94 4.5 17.2 5.886 16.668 7.776M31.332 7.776C31.442 8.164 31.5 8.576 31.5 9C31.5 9.39783 31.342 9.77936 31.0607 10.0607C30.7794 10.342 30.3978 10.5 30 10.5H18C17.6022 10.5 17.2206 10.342 16.9393 10.0607C16.658 9.77936 16.5 9.39783 16.5 9C16.5 8.576 16.56 8.164 16.668 7.776M31.332 7.776C32.624 7.874 33.908 7.996 35.186 8.144C37.386 8.4 39 10.298 39 12.514V39C39 40.1935 38.5259 41.3381 37.682 42.182C36.8381 43.0259 35.6935 43.5 34.5 43.5H13.5C12.3065 43.5 11.1619 43.0259 10.318 42.182C9.47411 41.3381 9 40.1935 9 39V12.514C9 10.298 10.612 8.4 12.814 8.144C14.0961 7.99555 15.381 7.87286 16.668 7.776", stroke: "#105652", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Announcement from ".";
3
2
  import { cn } from "../../../util";
4
3
  export default function Many({ contents }) {
5
4
  const body = {
@@ -13,5 +12,5 @@ export default function Many({ contents }) {
13
12
  fonts: "leading-tight",
14
13
  pointers: flag ? "cursor-pointer" : "cursor-default",
15
14
  });
16
- return (_jsx(Announcement.Layout, { children: _jsx("div", { className: cn(body), children: contents.map((content) => (_jsxs("button", { onClick: content.onClick, className: cn(box(!!content.onClick)), children: [_jsx("div", { className: "text-[16px] text-gray-dark font-pretendard-bold", children: content.title }), _jsx("div", { className: "text-[12px] text-gray-medium", children: content.date })] }))) }) }));
15
+ return (_jsx("div", { className: cn(body), children: contents.map((content) => (_jsxs("button", { onClick: content.onClick, className: cn(box(!!content.onClick)), children: [_jsx("div", { className: "text-[16px] text-gray-dark font-pretendard-bold", children: content.title }), _jsx("div", { className: "text-[12px] text-gray-medium", children: content.date })] }))) }));
17
16
  }
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Announcement from ".";
3
2
  import { cn, isHTMLString } from "../../../util";
4
3
  export default function One({ title, date, content }) {
5
4
  const body = {
@@ -14,5 +13,5 @@ export default function One({ title, date, content }) {
14
13
  const contentBox = {
15
14
  boundaries: "pt-12",
16
15
  };
17
- return (_jsx(Announcement.Layout, { children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: "text-[24px] font-pretendard-bold", children: title }), _jsx("div", { className: "text-gray-medium", children: date })] }), isHTMLString(content) ? (_jsx("div", { dangerouslySetInnerHTML: { __html: content }, className: cn(contentBox) })) : (_jsx("div", { className: cn(contentBox), children: content }))] }) }));
16
+ return (_jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: "text-[24px] font-pretendard-bold", children: title }), _jsx("div", { className: "text-gray-medium", children: date })] }), isHTMLString(content) ? (_jsx("div", { dangerouslySetInnerHTML: { __html: content }, className: cn(contentBox) })) : (_jsx("div", { className: cn(contentBox), children: content }))] }));
18
17
  }
@@ -0,0 +1,6 @@
1
+ import { Content as _Content } from "./Content";
2
+ import { State } from "../../../interface";
3
+ export default function Container({ contents, state: [search, _], }: {
4
+ contents: _Content[];
5
+ state: State<string>;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import { cn } from "../../../util";
4
+ import Archive from "./index";
5
+ export default function Container({ contents, state: [search, _], }) {
6
+ const ref = useRef(null);
7
+ const container = {
8
+ sizes: "w-full",
9
+ boundaries: "p-5",
10
+ };
11
+ const body = {
12
+ displays: "grid grid-cols-[repeat(auto-fill,minmax(8rem,1fr))] gap-5 ",
13
+ sizes: "w-full",
14
+ };
15
+ return (_jsx("div", { className: cn(container), children: _jsx("div", { className: cn(body), ref: ref, children: contents
16
+ .filter(({ titles, description }) => titles.title.includes(search) ||
17
+ titles.subtitle?.includes(search) ||
18
+ description.includes(search))
19
+ .map(({ titles, description, extension, onClick }) => (_jsx(Archive.Content, { titles: {
20
+ title: titles.title,
21
+ subtitle: titles.subtitle,
22
+ }, onClick: onClick, description: description, extension: extension }, titles.title + titles.subtitle + description))) }) }));
23
+ }
@@ -0,0 +1,10 @@
1
+ import { OnClick, Titles } from "../../../interface";
2
+ type Extension = "mp3" | "pdf" | "xls" | "hwp";
3
+ export interface Content {
4
+ titles: Titles;
5
+ description: string;
6
+ extension: Extension;
7
+ onClick: OnClick;
8
+ }
9
+ export default function Content({ titles, description, extension, onClick, }: Content): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useState } from "react";
3
+ import { cn } from "../../../util";
4
+ import Action from "../Action";
5
+ import { useActionStore } from "../../../store";
6
+ import { animated, useTransition } from "react-spring";
7
+ export default function Content({ titles, description, extension, onClick, }) {
8
+ const [isHover, setIsHover] = useState(false);
9
+ const { setView, clearView } = useActionStore();
10
+ const { title, subtitle, subtitleColor } = titles;
11
+ const container = {
12
+ displays: "flex-1",
13
+ sizes: "w-full min-w-[136px] sm:max-w-[148px] h-[138px]",
14
+ };
15
+ const topBox = {
16
+ positions: "relative",
17
+ displays: "flex flex-col justify-between",
18
+ sizes: "w-full h-25",
19
+ backgrounds: "bg-gray-light/20",
20
+ boundaries: "p-3 border-1 border-gray-light rounded-[4px]",
21
+ styles: "overflow-hidden",
22
+ };
23
+ const bottomBox = {
24
+ displays: "flex flex-col justify-center items-center",
25
+ sizes: "h-[38px] w-full",
26
+ fonts: "text-gray-medium text-[12px]",
27
+ };
28
+ const subTitleBox = {
29
+ fonts: "text-[12px] leading-none",
30
+ texts: subtitleColor ?? "text-gray-medium",
31
+ boundaries: "px-1 py-[2px]",
32
+ };
33
+ const id = useId();
34
+ useEffect(() => {
35
+ if (isHover)
36
+ return setView(id);
37
+ return clearView();
38
+ }, [isHover]);
39
+ return (_jsxs("div", { onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), className: cn(container), children: [_jsx("div", { className: cn(topBox), children: _jsxs(Action.Show, { actions: [
40
+ [id, _jsx(HoverView, { extension: extension, onClick: onClick })],
41
+ ], children: [_jsx("div", { className: "flex", children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "leading-tight font-pretendard-bold overflow-hidden text-ellipsis w-full h-[19px]", children: title }), _jsx("div", { className: cn(subTitleBox), children: subtitle })] }) }), _jsxs("div", { className: "flex justify-between items-end", children: [_jsx(Icon, { extension: extension }), _jsx("div", { className: "w-[33px] h-[18px] text-[12px] justify-center items-center flex leading-none bg-gray-light rounded-[4px] text-gray-dark", children: extension })] })] }) }), _jsx("div", { className: cn(bottomBox), children: _jsx("div", { children: description }) })] }));
42
+ }
43
+ function HoverView({ extension, onClick, showAction, }) {
44
+ const { isVisible } = showAction ?? {};
45
+ const container = {
46
+ displays: "flex flex-col gap-y-2 justify-center items-center",
47
+ positions: "absolute top-0 left-0",
48
+ sizes: "w-full h-full",
49
+ backgrounds: "bg-white/50",
50
+ pointers: "cursor-pointer",
51
+ styles: "backdrop-blur-sm",
52
+ };
53
+ const transitions = useTransition(isVisible, {
54
+ from: { opacity: 0 },
55
+ enter: { opacity: 1 },
56
+ leave: { opacity: 0 },
57
+ config: { duration: 300 },
58
+ });
59
+ return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), onClick: onClick, children: [_jsx(HoverElement, { extension: extension }), _jsx("div", { className: cn("text-[12px]", extension === "mp3" ? "text-green-dark" : "text-gray-medium"), children: extension === "mp3" ? "재생하기" : "다운로드" })] })));
60
+ }
61
+ function HoverElement({ extension }) {
62
+ if (extension === "mp3")
63
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [_jsx("path", { d: "M21 12C21 13.1819 20.7672 14.3522 20.3149 15.4442C19.8626 16.5361 19.1997 17.5282 18.364 18.364C17.5282 19.1997 16.5361 19.8626 15.4442 20.3149C14.3522 20.7672 13.1819 21 12 21C10.8181 21 9.64778 20.7672 8.55585 20.3149C7.46392 19.8626 6.47177 19.1997 5.63604 18.364C4.80031 17.5282 4.13738 16.5361 3.68508 15.4442C3.23279 14.3522 3 13.1819 3 12C3 9.61305 3.94821 7.32387 5.63604 5.63604C7.32387 3.94821 9.61305 3 12 3C14.3869 3 16.6761 3.94821 18.364 5.63604C20.0518 7.32387 21 9.61305 21 12Z", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M15.91 11.6721C15.9686 11.7046 16.0174 11.7521 16.0513 11.8098C16.0853 11.8675 16.1032 11.9332 16.1032 12.0001C16.1032 12.0671 16.0853 12.1328 16.0513 12.1905C16.0174 12.2481 15.9686 12.2957 15.91 12.3281L10.307 15.4411C10.2499 15.4728 10.1855 15.489 10.1202 15.4882C10.0549 15.4874 9.99099 15.4695 9.93472 15.4364C9.87845 15.4032 9.8318 15.356 9.79941 15.2993C9.76701 15.2426 9.74998 15.1784 9.75 15.1131V8.88712C9.75 8.60112 10.057 8.42112 10.307 8.56012L15.91 11.6721Z", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
64
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-6 h-6", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" }) }));
65
+ }
66
+ function Icon({ extension }) {
67
+ if (extension === "mp3")
68
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.9522 1.65103C20.0448 1.72099 20.12 1.81151 20.1717 1.91546C20.2234 2.0194 20.2503 2.13393 20.2502 2.25003V16.303C20.2501 16.9549 20.0376 17.589 19.645 18.1093C19.2524 18.6297 18.701 19.008 18.0742 19.187L16.7542 19.564C16.4304 19.6612 16.0905 19.6931 15.7542 19.6579C15.4179 19.6226 15.092 19.521 14.7954 19.3588C14.4987 19.1965 14.2373 18.977 14.0262 18.7129C13.815 18.4488 13.6585 18.1454 13.5656 17.8204C13.4727 17.4953 13.4453 17.155 13.4849 16.8192C13.5246 16.4834 13.6306 16.1589 13.7967 15.8644C13.9628 15.5699 14.1858 15.3114 14.4526 15.1038C14.7195 14.8962 15.0249 14.7436 15.3512 14.655L17.6622 13.995C17.9756 13.9055 18.2513 13.7163 18.4476 13.4562C18.6439 13.196 18.7501 12.879 18.7502 12.553V6.99403L9.75021 9.56603V19.303C9.75007 19.9549 9.53763 20.589 9.14501 21.1093C8.7524 21.6297 8.20099 22.008 7.57421 22.187L6.25421 22.564C5.92997 22.6625 5.58937 22.6955 5.25225 22.6611C4.91514 22.6266 4.58826 22.5253 4.29068 22.3632C3.9931 22.2011 3.73077 21.9814 3.51898 21.7168C3.3072 21.4523 3.1502 21.1482 3.05714 20.8224C2.96408 20.4966 2.93682 20.1554 2.97695 19.819C3.01708 19.4825 3.1238 19.1573 3.29089 18.8625C3.45797 18.5677 3.68207 18.3091 3.95013 18.1018C4.21819 17.8945 4.52484 17.7426 4.85221 17.655L7.16221 16.995C7.4756 16.9055 7.7513 16.7163 7.94761 16.4562C8.14392 16.196 8.25014 15.879 8.25021 15.553V5.25003C8.25024 5.08706 8.30335 4.92855 8.4015 4.79846C8.49966 4.66837 8.63751 4.57379 8.79421 4.52903L19.2942 1.52903C19.4058 1.49703 19.5234 1.4914 19.6376 1.51257C19.7518 1.53374 19.8595 1.58114 19.9522 1.65103Z", fill: "#4C4C4C" }) }));
69
+ if (extension === "xls")
70
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-6 h-6", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" }) }));
71
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-6 h-6", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" }) }));
72
+ }
@@ -0,0 +1,4 @@
1
+ import { State } from "../../../interface";
2
+ export default function Header({ state }: {
3
+ state: State<string>;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ import { Input } from "../../../widget";
4
+ import { useResponsive } from "../../../hook";
5
+ export default function Header({ state }) {
6
+ const container = {
7
+ displays: "flex justify-between items-start",
8
+ sizes: "w-full h-15",
9
+ boundaries: "px-5 pb-5",
10
+ };
11
+ const res = useResponsive();
12
+ return (_jsxs("div", { className: cn(container), children: [_jsx(Input, { state: state, placeholder: res ? "키워드를 입력하세요" : "", option: {
13
+ width: res ? "md" : "sm",
14
+ } }), _jsx(ContentBox, { contents: [
15
+ {
16
+ title: "교재 음원",
17
+ onClick: () => { },
18
+ },
19
+ ] })] }));
20
+ }
21
+ function ContentBox({ contents }) {
22
+ const container = {
23
+ sizes: "h-[38px]",
24
+ };
25
+ const buttonBox = {
26
+ boundaries: "p-3 rounded-[8px]",
27
+ fonts: "leading-none text-[12px]",
28
+ backgrounds: "bg-green-dark/10",
29
+ };
30
+ return (_jsx("div", { className: cn(container), children: contents.map((content) => (_jsx("button", { className: cn(buttonBox), children: content.title }, content.title))) }));
31
+ }
@@ -0,0 +1,5 @@
1
+ import { BbsLayoutProps } from "../BbsLayout";
2
+ interface LayoutProps extends Omit<BbsLayoutProps, "title"> {
3
+ }
4
+ export default function Layout({ children }: LayoutProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import BbsLayout from "../BbsLayout";
3
+ export default function Layout({ children }) {
4
+ return (_jsx(BbsLayout, { title: "\uC790\uB8CC\uC2E4", icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", children: _jsx("path", { d: "M36.7501 25.478L21.3641 40.864C19.6762 42.5519 17.387 43.5001 15.0001 43.5001C12.6131 43.5001 10.3239 42.5519 8.63605 40.864C6.94822 39.1762 6 36.887 6 34.5C6 32.1131 6.94822 29.8239 8.63605 28.136L30.5161 6.25602C31.0734 5.69895 31.735 5.25711 32.4631 4.95573C33.1912 4.65435 33.9715 4.49933 34.7595 4.49951C35.5475 4.4997 36.3277 4.65509 37.0557 4.95681C37.7836 5.25854 38.445 5.70069 39.0021 6.25802C39.5591 6.81535 40.001 7.47695 40.3023 8.20503C40.6037 8.93312 40.7587 9.71344 40.7586 10.5014C40.7584 11.2894 40.603 12.0697 40.3013 12.7976C39.9995 13.5256 39.5574 14.187 39.0001 14.744L17.1041 36.64C16.536 37.1846 15.7768 37.4821 14.9899 37.4722C14.2031 37.4622 13.4517 37.1435 12.8977 36.5847C12.3436 36.0259 12.0313 35.2719 12.028 34.485C12.0247 33.6981 12.3307 32.9414 12.8801 32.378L28.5001 16.758M17.1221 36.62L17.1021 36.64", stroke: "#105652", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" }) }), children: children }));
5
+ }
@@ -0,0 +1,11 @@
1
+ import Container from "./Container";
2
+ import Content from "./Content";
3
+ import Header from "./Header";
4
+ import Layout from "./Layout";
5
+ declare const Archive: {
6
+ Layout: typeof Layout;
7
+ Header: typeof Header;
8
+ Container: typeof Container;
9
+ Content: typeof Content;
10
+ };
11
+ export default Archive;
@@ -0,0 +1,11 @@
1
+ import Container from "./Container";
2
+ import Content from "./Content";
3
+ import Header from "./Header";
4
+ import Layout from "./Layout";
5
+ const Archive = {
6
+ Layout,
7
+ Header,
8
+ Container,
9
+ Content,
10
+ };
11
+ export default Archive;
@@ -0,0 +1,6 @@
1
+ export interface BbsLayoutProps {
2
+ title: string;
3
+ icon?: React.ReactNode;
4
+ children: React.ReactNode;
5
+ }
6
+ export default function BbsLayout({ title, icon, children }: BbsLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../util";
3
+ export default function BbsLayout({ title, icon, children }) {
4
+ const container = {
5
+ displays: "flex flex-col items-center",
6
+ sizes: "w-full min-h-screen",
7
+ fonts: "antialiased",
8
+ };
9
+ const body = {
10
+ sizes: "w-full max-w-[1200px]",
11
+ };
12
+ const header = {
13
+ displays: "flex justify-start items-end",
14
+ sizes: "w-full h-[188px]",
15
+ boundaries: "pl-12 pb-10",
16
+ };
17
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsx("div", { className: cn(header), children: _jsxs("div", { className: "flex gap-x-5 items-center", children: [icon, _jsx("div", { className: "text-[40px] leading-none font-pretendard-bold text-green-dark", children: title })] }) }), children] }) }));
18
+ }
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
3
  export default function Features() {
4
4
  const container = {
5
- sizes: "w-full h-fit p-5",
5
+ sizes: "w-full h-fit",
6
6
  spacings: "p-5 my-12",
7
7
  displays: "flex flex-col justify-center items-center",
8
8
  graphics: "antialiased",
@@ -0,0 +1 @@
1
+ export default function Prizes(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ export default function Prizes() {
4
+ const container = {
5
+ sizes: "relative w-full h-fit",
6
+ spacings: "my-12 py-20",
7
+ displays: "flex flex-col justify-start items-center",
8
+ backgrounds: "bg-green-light",
9
+ graphics: "antialiased",
10
+ text: "break-keep",
11
+ };
12
+ //section title breaking control in reactive viewport
13
+ const sectionTitleBreaker = {
14
+ displays: "flex flex-col xs:flex-row xs:justify-center xs:gap-1",
15
+ sizes: "h-fit w-full",
16
+ };
17
+ const sectionTitle = {
18
+ textstyles: "text-xl text-center text-green-dark font-pretendard-bold md:text-2xl",
19
+ sizes: "h-fit",
20
+ };
21
+ //controls prizeSet reactive position
22
+ const prizeWrapper = {
23
+ sizes: "max-w-6xl w-full",
24
+ displays: "flex flex-row items-center justify-center md:justify-start",
25
+ };
26
+ const prizeSet = {
27
+ displays: "left-0 bottom-0 flex flex-col",
28
+ };
29
+ //controls medalholdingimga reactive position
30
+ const medalHandler = {
31
+ displays: "hidden md:absolute md:block md:max-w-160 right-0 z-0",
32
+ };
33
+ //text styling of prize detail
34
+ const prizeExplainWrapper = {
35
+ displays: "flex flex-col gap-2 items-center justify-center",
36
+ spacings: "mt-8",
37
+ };
38
+ const prizeExplainSet = {
39
+ displays: "flex flex-row gap-4 items-center justify-center",
40
+ textstyles: "text-green-dark text-sm md:text-lg",
41
+ };
42
+ const prizeTitle = {
43
+ textstyles: "font-pretendard-bold",
44
+ };
45
+ const prizeDetail = {
46
+ textstyles: "font-pretendard-medium",
47
+ };
48
+ return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(medalHandler), children: _jsx("img", { src: "images/olympiad/img-oly-prize-medal.png", alt: "" }) }), _jsxs("div", { className: cn(sectionTitleBreaker), children: [_jsx("div", { className: cn(sectionTitle), children: "\uACE0\uB824\uB300\uD559\uAD50 \uAE30\uAD00\uC7A5\uC0C1\uC744" }), _jsx("div", { className: cn(sectionTitle), children: "\uC218\uC0C1\uD560 \uC218 \uC788\uB294 \uAE30\uD68C" })] }), _jsx("div", { className: "h-0.5 w-1/4 my-10 bg-green-dark rounded-lg" }), _jsx("div", { className: cn(prizeWrapper), children: _jsxs("div", { className: cn(prizeSet), children: [_jsx("div", { className: "px-8 max-w-lg flex flex-col md:max-w-2xl", children: _jsx("img", { src: "images/olympiad/img-oly-prize-certificate.png", alt: "\uCEF4\uD4E8\uD130\uB85C \uBB38\uC81C\uB97C \uD478\uB294 \uC5EC\uC131", className: "rounded-xl overflow-hidden shadow-xl" }) }), _jsxs("div", { className: cn(prizeExplainWrapper), children: [_jsxs("div", { className: cn(prizeExplainSet), children: [_jsx("div", { className: cn(prizeTitle), children: "\uB300\uC0C1" }), _jsx("div", { className: cn(prizeDetail), children: "\uACE0\uB824\uB300\uD559\uAD50 \uACBD\uC601\uB300\uD559 \uD559\uC7A5\uC0C1" })] }), _jsxs("div", { className: cn(prizeExplainSet), children: [_jsx("div", { className: cn(prizeTitle), children: "\uAE08\uC0C1/\uC740\uC0C1/\uB3D9\uC0C1" }), _jsx("div", { className: cn(prizeDetail), children: "\uACE0\uB824\uB300\uD559\uAD50 \uC5B8\uC5B4\uC815\uBCF4\uC5F0\uAD6C\uC18C \uC18C\uC7A5\uC0C1" })] }), _jsxs("div", { className: cn(prizeExplainSet), children: [_jsx("div", { className: cn(prizeTitle), children: "\uC7A5\uB824\uC0C1" }), _jsx("div", { className: cn(prizeDetail), children: "\uACE0\uB824\uB300\uD559\uAD50 \uAD6D\uC81C\uD1A0\uC140\uC704\uC6D0\uD68C \uC704\uC6D0\uC7A5\uC0C1" })] })] })] }) })] }));
49
+ }
@@ -0,0 +1 @@
1
+ export default function Sponsors(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ export default function Sponsors() {
4
+ const container = {
5
+ sizes: "w-full h-fit",
6
+ spacings: "px-5 pt-10 pb-6",
7
+ displays: "flex flex-col justify-center items-center",
8
+ backgrounds: "bg-gradient-to-r from-green-dark to-crimson-dark",
9
+ graphics: "antialiased",
10
+ text: "break-keep",
11
+ };
12
+ const logoWrapper = {
13
+ disaplys: "flex flex-col justify-center items-center xs:flex-row",
14
+ spacings: "gap-8",
15
+ };
16
+ // styling of single logo set
17
+ const logoSet = {
18
+ displays: "flex flex-col justify-center items-center lg:flex-row",
19
+ };
20
+ const tag = {
21
+ sizes: "w-fit h-fit rounded-md",
22
+ spacings: "py-0.25 px-2",
23
+ backgrounds: "bg-white",
24
+ textstyles: "font-pretendard-bold text-sm text-crimson-dark",
25
+ };
26
+ const imgStyle = {
27
+ sizes: "max-h-20",
28
+ backgrounds: "bg-cover",
29
+ };
30
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(logoWrapper), children: [_jsxs("div", { className: cn(logoSet), children: [_jsx("div", { className: cn(tag), children: "\uC8FC\uCD5C" }), _jsx("img", { src: "images/olympiad/img-oly-logo-1.png", alt: "\uD1A0\uC140\uB85C\uACE0", className: cn(imgStyle) })] }), _jsxs("div", { className: cn(logoSet), children: [_jsx("div", { className: cn(tag), children: "\uC8FC\uAD00" }), _jsx("img", { src: "images/olympiad/img-oly-logo-2.png", alt: "\uACE0\uB824\uB300\uD559\uAD50 \uC5B8\uC5B4\uC815\uBCF4\uC5F0\uAD6C\uC18C \uB85C\uACE0", className: cn(imgStyle) })] }), _jsxs("div", { className: cn(logoSet), children: [_jsx("div", { className: cn(tag), children: "\uD6C4\uC6D0" }), _jsx("img", { src: "images/olympiad/img-oly-logo-3.png", alt: "\uACE0\uB824\uB300\uD559\uAD50 \uC5B8\uC5B4\uC815\uBCF4\uC5F0\uAD6C\uC18C \uB85C\uACE0", className: cn(imgStyle) })] })] }) }));
31
+ }
@@ -1,7 +1,11 @@
1
1
  import Banner from "./Banner";
2
+ import Sponsors from "./Sponsors";
2
3
  import Features from "./Features";
4
+ import Prizes from "./Prizes";
3
5
  declare const Olympiad: {
4
6
  Banner: typeof Banner;
7
+ Sponsors: typeof Sponsors;
5
8
  Features: typeof Features;
9
+ Prizes: typeof Prizes;
6
10
  };
7
11
  export default Olympiad;
@@ -1,7 +1,11 @@
1
1
  import Banner from "./Banner";
2
+ import Sponsors from "./Sponsors";
2
3
  import Features from "./Features";
4
+ import Prizes from "./Prizes";
3
5
  const Olympiad = {
4
6
  Banner,
7
+ Sponsors,
5
8
  Features,
9
+ Prizes,
6
10
  };
7
11
  export default Olympiad;
@@ -6,7 +6,7 @@ import { useEase } from "../../../../hook";
6
6
  import { LineBreaks } from "../../../../text";
7
7
  import SVG from "../../../../asset/SVG";
8
8
  import { tagString } from "../../../../interface/domain";
9
- import useResponsive from "../../../../hook/useMobile";
9
+ import useResponsive from "../../../../hook/useResponsive";
10
10
  export default function Carousel({ contents, }) {
11
11
  const [index, setIndex] = useState(0);
12
12
  const [flag, inTime] = useEase(10000, 1000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.126",
3
+ "version": "1.0.127",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.126
1
+ 1.0.127
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from "react";
2
+ import { useId, useRef, useState } from "react";
3
3
  import { cn } from "../../../util";
4
4
  import Obstacle from "../Obstacle";
5
5
  import Form from "./Form";
6
6
  const widthSize = {
7
7
  xs: "w-28",
8
8
  sm: "w-48",
9
- md: "w-64",
9
+ md: "w-80",
10
10
  lg: "w-96",
11
11
  xl: "w-128",
12
12
  "2xl": "w-144",
@@ -15,20 +15,34 @@ const widthSize = {
15
15
  function Input({ state, onKeyDown, placeholder, option }) {
16
16
  const { width, disabled } = option ?? {};
17
17
  const [value, setValue] = state;
18
+ const ref = useRef(null);
19
+ const [isFocus, setIsFocus] = useState(false);
18
20
  const id = useId();
19
21
  const container = {
20
22
  positions: "relative",
21
- width: `${widthSize[width ?? "xs"]} h-8`,
23
+ width: `${widthSize[width ?? "xs"]} h-[36px]`,
22
24
  displays: "flex items-center",
23
25
  };
24
26
  const body = {
25
- styles: "rounded-md bg-slate-200 text-xs",
27
+ positions: "relative",
28
+ displays: "flex items-center gap-x-3",
29
+ styles: "rounded-md text-xs",
26
30
  sizes: "w-full h-full",
27
- paddings: "pl-4",
28
- pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
29
31
  effect: `transition-all`,
32
+ boundaries: "pl-3",
33
+ fonts: "leading-none",
34
+ pointers: "cursor-pointer",
35
+ focuses: !isFocus
36
+ ? "bg-[#F0F0F0]/30 "
37
+ : "bg-white text-green-dark box-shadow-green-sm",
38
+ animations: "duration-300",
39
+ };
40
+ const inputBox = {
41
+ sizes: "w-full",
42
+ styles: "focus:outline-none bg-transparent",
43
+ pointers: "cursor-default",
30
44
  };
31
- return (_jsxs("div", { className: cn(container), children: [_jsx("input", { className: cn(body), id: id, type: "text", value: value, placeholder: placeholder ?? "입력해주세요", onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onChange: (e) => setValue(e.target.value) }), _jsx(Obstacle, { disabled: disabled })] }));
45
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), onClick: () => ref.current?.focus(), children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M21.8758 21.8748L16.4623 16.4613M16.4623 16.4613C17.9275 14.9961 18.7506 13.0089 18.7506 10.9368C18.7506 8.86474 17.9275 6.87752 16.4623 5.41234C14.9971 3.94715 13.0099 3.12402 10.9378 3.12402C8.86571 3.12402 6.8785 3.94715 5.41331 5.41234C3.94813 6.87752 3.125 8.86474 3.125 10.9368C3.125 13.0089 3.94813 14.9961 5.41331 16.4613C6.8785 17.9265 8.86571 18.7496 10.9378 18.7496C13.0099 18.7496 14.9971 17.9265 16.4623 16.4613Z", stroke: "#105652", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }), _jsx("input", { id: id, ref: ref, className: cn(inputBox), type: "text", value: value, onFocus: () => setIsFocus(true), onBlur: () => setIsFocus(false), placeholder: placeholder ?? "입력해주세요", onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onChange: (e) => setValue(e.target.value) }), _jsx(Obstacle, { disabled: disabled })] }) }));
32
46
  }
33
47
  Input.Form = Form;
34
48
  export default Input;
File without changes
File without changes