@edu-tosel/design 1.0.295 → 1.0.297

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.
@@ -1,10 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
3
  export default function Many({ contents }) {
4
- const body = {
5
- sizes: "w-full max-w-[1200px]",
6
- boundaries: "pl-12 ",
7
- };
8
4
  const box = (flag) => ({
9
5
  displays: "flex flex-col items-start gap-y-2",
10
6
  sizes: "h-25 w-full",
@@ -12,5 +8,5 @@ export default function Many({ contents }) {
12
8
  fonts: "leading-tight",
13
9
  pointers: flag ? "cursor-pointer" : "cursor-default",
14
10
  });
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 })] }))) }));
11
+ return (_jsx("div", { 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 })] }))) }));
16
12
  }
@@ -2,10 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn, isHTMLString } from "../../../util";
3
3
  import { Label } from "../../../widget";
4
4
  export default function One({ title, date, content, button }) {
5
- const body = {
6
- sizes: "w-full max-w-[1200px]",
7
- boundaries: "pb-8 px-3.5 md:pl-12 md:pr-0",
8
- };
9
5
  const titleBox = {
10
6
  sizes: "w-full h-30",
11
7
  displays: "flex flex-col gap-y-3 justify-center",
@@ -14,7 +10,7 @@ export default function One({ title, date, content, button }) {
14
10
  const contentBox = {
15
11
  boundaries: "pt-12",
16
12
  };
17
- 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 })), _jsx("div", { className: "pt-6", children: button && (_jsx(Label.Button, { ...button, option: {
13
+ return (_jsxs("div", { 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 })), _jsx("div", { className: "pt-6", children: button && (_jsx(Label.Button, { ...button, option: {
18
14
  width: "full",
19
15
  height: "lg",
20
16
  background: "bg-green-dark",
@@ -6,7 +6,6 @@ export default function Container({ contents, state: [search, _], }) {
6
6
  const ref = useRef(null);
7
7
  const container = {
8
8
  sizes: "w-full",
9
- boundaries: "p-5",
10
9
  };
11
10
  const body = {
12
11
  displays: "grid grid-cols-[repeat(auto-fill,minmax(8rem,1fr))] gap-5 ",
@@ -33,7 +33,7 @@ export default function Header({ state, seriesState, levelState, contents, }) {
33
33
  ], state: seriesState, placeholder: "\uC2DC\uB9AC\uC988" }) }), _jsx("div", { className: cn(ghostSelect), children: _jsx(Select, { selectOptions: [
34
34
  {
35
35
  title: "Cocoon",
36
- value: "CO"
36
+ value: "CO",
37
37
  },
38
38
  {
39
39
  title: "Pre-Starter",
@@ -16,7 +16,11 @@ export default function BbsLayout({ title, children, icon, links, }) {
16
16
  sizes: "w-full md:h-[188px]",
17
17
  boundaries: "pt-8 md:pt-0 px-5 md:px-12 md:pb-10 ",
18
18
  };
19
- return (_jsx("div", { className: cn(container), onClick: setFlag, children: _jsxs("div", { className: cn(wrapper), children: [_jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "flex gap-x-[10px] md:gap-x-5 items-center", children: [icon, _jsx("div", { className: "text-[24px] md:text-[40px] leading-none font-pretendard-bold text-green-dark", children: title })] }), _jsx(BbsSelect, { links: links })] }), children] }) }));
19
+ const childrenBody = {
20
+ sizes: "w-full max-w-[1200px]",
21
+ boundaries: "pb-8 px-5 md:pl-12 md:pr-3",
22
+ };
23
+ return (_jsx("div", { className: cn(container), onClick: setFlag, children: _jsxs("div", { className: cn(wrapper), children: [_jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "flex gap-x-[10px] md:gap-x-5 items-center", children: [icon, _jsx("div", { className: "text-[24px] md:text-[40px] leading-none font-pretendard-bold text-green-dark", children: title })] }), _jsx(BbsSelect, { links: links })] }), _jsx("div", { className: cn(childrenBody), children: children })] }) }));
20
24
  }
21
25
  export function BbsSelect({ links }) {
22
26
  const container = {
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { IoIosSearch } from "react-icons/io";
4
4
  import dayjs from "dayjs";
@@ -25,5 +25,5 @@ export default function Many({ events }) {
25
25
  return false;
26
26
  })
27
27
  .filter((event) => event.title.includes(searchQuery));
28
- return (_jsx("div", { className: "min-h-screen w-full mx-auto", children: _jsx("div", { className: "mmd:max-w-300 h-full flex flex-col mx-auto px-10", children: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between min-h-14.5 border-b-1", children: [_jsxs("div", { className: "w-full mb-5 h-9 sm:w-80 sm:h-9.5 flex items-center bg-[#f0f0f0]/10 rounded-xl", children: [_jsx(IoIosSearch, { className: "text-xl text-green-dark mr-3" }), _jsx("input", { type: "text", placeholder: "\uD0A4\uC6CC\uB4DC\uB97C \uC785\uB825\uD558\uC138\uC694.", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full h-full text-sm bg-[#f0f0f0]/10 placeholder:text-[#7f7f7f] placeholder:font-light outline-none" })] }), _jsx("div", { className: "flex h-9 pb-5 sm:pb-0 sm:h-9.5 items-center sm:justify-center ", children: ["모두보기", "진행 중", "예정된", "토셀소식"].map((item) => (_jsx("div", { className: `text-xs sm:text-2xs md:text-xs p-2 sm:p-3 flex items-center justify-center cursor-pointer rounded-lg ${filter === item ? "bg-green-dark/10 text-green-dark" : ""}`, onClick: () => setFilter(item), children: item }, item))) })] }), _jsx("div", { className: "pt-5 grid sm:grid-cols-2 mmd:grid-cols-3 gap-5 rounded-xl", children: filteredEvents.map((event) => (_jsxs("div", { onClick: event.onClick, className: "w-full max-h-84 shadow-md rounded-xl cursor-pointer box-shadow-green transition-all duration-500", children: [_jsx("div", { className: "w-full max-h-50 rounded-t-xl overflow-hidden relative", children: _jsx("img", { src: event.thumbnail, alt: "", className: "w-full" }) }), _jsxs("div", { className: "w-full min-h-34 p-8 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(Tag, { event: event }) }), _jsx(LineBreaks, { className: "text-sm font-bold text-gray-dark flex items-center", texts: event.title })] })] }, event.id))) })] }) }) }));
28
+ return (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between min-h-14.5 border-b-1", children: [_jsxs("div", { className: "w-full mb-5 h-9 sm:w-80 sm:h-9.5 flex items-center bg-[#f0f0f0]/10 rounded-xl", children: [_jsx(IoIosSearch, { className: "text-xl text-green-dark mr-3" }), _jsx("input", { type: "text", placeholder: "\uD0A4\uC6CC\uB4DC\uB97C \uC785\uB825\uD558\uC138\uC694.", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full h-full text-sm bg-[#f0f0f0]/10 placeholder:text-[#7f7f7f] placeholder:font-light outline-none" })] }), _jsx("div", { className: "flex h-9 pb-5 sm:pb-0 sm:h-9.5 items-center sm:justify-center ", children: ["모두보기", "진행 중", "예정된", "토셀소식"].map((item) => (_jsx("div", { className: `text-xs sm:text-2xs md:text-xs p-2 sm:p-3 flex items-center justify-center cursor-pointer rounded-lg ${filter === item ? "bg-green-dark/10 text-green-dark" : ""}`, onClick: () => setFilter(item), children: item }, item))) })] }), _jsx("div", { className: "pt-5 grid sm:grid-cols-2 mmd:grid-cols-3 gap-5 rounded-xl", children: filteredEvents.map((event) => (_jsxs("div", { onClick: event.onClick, className: "w-full max-h-84 shadow-md rounded-xl cursor-pointer box-shadow-green transition-all duration-500", children: [_jsx("div", { className: "w-full max-h-50 rounded-t-xl overflow-hidden relative", children: _jsx("img", { src: event.thumbnail, alt: "", className: "w-full" }) }), _jsxs("div", { className: "w-full min-h-34 p-8 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(Tag, { event: event }) }), _jsx(LineBreaks, { className: "text-sm font-bold text-gray-dark flex items-center", texts: event.title })] })] }, event.id))) })] }));
29
29
  }
@@ -1,8 +1,10 @@
1
+ import React from "react";
1
2
  import { OnClick } from "../../../interface";
2
3
  interface Content {
3
4
  image: string;
4
5
  onClick: OnClick;
5
6
  background?: string;
7
+ hoverContent?: React.ReactNode;
6
8
  }
7
9
  export default function Float({ contents }: {
8
10
  contents: Content[];
@@ -1,18 +1,7 @@
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
3
  export default function Float({ contents }) {
4
- const container = {
5
- displays: "fixed flex flex-col bottom-20 md:bottom-16 right-5 md:right-16 z-40 overflow-visible",
6
- spacings: "gap-5",
7
- };
8
- const buttonBox = (background) => ({
9
- displays: "flex flex-col justify-center items-center",
10
- spacings: "p-1.5 md:p-3",
11
- sizes: "w-12 h-12 md:w-16 md:h-16",
12
- styles: "rounded-full bg-black overflow-hidden",
13
- backgrounds: background ?? "bg-white",
14
- shadows: "shadow-main",
15
- animation: "hover:scale-110 duration-300 hover:shadow-icon-hover",
16
- });
17
- return (_jsx("div", { className: cn(container), children: contents.map(({ image, onClick, background }) => (_jsx("button", { onClick: onClick, className: cn(buttonBox(background)), children: _jsx("img", { src: image, alt: "image", className: "object-contain" }) }, image))) }));
4
+ const container = cn("fixed flex flex-col bottom-20 md:bottom-16 right-5 md:right-16 z-40 overflow-visible", "gap-5");
5
+ const buttonBox = (background) => cn("flex justify-center items-center", "p-1.5 md:p-3", "w-12 h-12 md:w-16 md:h-16", "rounded-full overflow-hidden shadow-main hover:scale-110 duration-300 hover:shadow-icon-hover", background ?? "bg-white");
6
+ return (_jsx("div", { className: container, children: contents.map(({ image, onClick, background, hoverContent }) => (_jsxs("div", { className: "relative group flex items-center", children: [hoverContent && (_jsx("div", { className: cn("absolute right-full mr-3", "bg-gray-dark text-white text-sm px-5 py-2 rounded shadow-md whitespace-nowrap", "opacity-0 group-hover:opacity-100 transition-opacity duration-200"), children: hoverContent })), _jsx("button", { onClick: onClick, className: buttonBox(background), children: _jsx("img", { src: image, alt: "image", className: "object-contain" }) })] }, image))) }));
18
7
  }
@@ -63,8 +63,8 @@ export default function Navigation({ browser, calendar, notice, event, }) {
63
63
  const handleMouseMove = (event) => {
64
64
  const viewportScale = window.visualViewport?.scale || 1; // 뷰포트 확대 비율
65
65
  // 마우스 좌표를 확대 비율을 고려하여 보정
66
- const correctedX = event.clientX / viewportScale + 20; // 커서 기준 10px 우측
67
- const correctedY = (event.clientY - 230) / viewportScale + 10; // 커서 기준 10px 아래
66
+ const correctedX = event.clientX / viewportScale + 30; // 커서 기준 10px 우측
67
+ const correctedY = (event.clientY - 260) / viewportScale + 5; // 커서 기준 10px 아래
68
68
  // 툴팁이 화면을 벗어나지 않도록 조정
69
69
  const tooltipWidth = 120; // 예상 툴팁 너비
70
70
  const tooltipHeight = 40; // 예상 툴팁 높이
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.295",
3
+ "version": "1.0.297",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.295
1
+ 1.0.297