@edu-tosel/design 1.0.114 → 1.0.116

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.
@@ -43,8 +43,8 @@ export function Board({ children, action, option, debug, buttons, }) {
43
43
  positions: "fixed bottom-20 right-4 xl:absolute xl:-bottom-18.5 xl:right-0",
44
44
  };
45
45
  return (_jsxs("div", { className: cn(container), children: [_jsx(Action.Show, { actions: shows, children: _jsx("div", { className: cn(body), children: children }) }), _jsx("div", { className: cn(button), children: buttons?.map(({ title, onClick, option }) => (_jsx(Label.Button, { title: title, onClick: onClick, option: {
46
- ...option,
47
46
  text: "text-white",
48
47
  background: "bg-crimson-burgundy",
48
+ ...option,
49
49
  } }))) })] }));
50
50
  }
@@ -1,8 +1,3 @@
1
- type Tag = "NEW" | "REG";
2
- interface Styles {
3
- title: string;
4
- background: string;
5
- }
6
- declare const TagStyles: Record<Tag, Styles>;
1
+ type Tag = "NEW" | "REG" | "RCU";
2
+ export declare const tagString: Record<Tag, string>;
7
3
  export type { Tag };
8
- export { TagStyles };
@@ -1,11 +1,5 @@
1
- const TagStyles = {
2
- NEW: {
3
- title: "신규론칭",
4
- background: "bg-blue-navy",
5
- },
6
- REG: {
7
- title: "정기시험",
8
- background: "bg-crimson-burgundy",
9
- },
1
+ export const tagString = {
2
+ NEW: "신규론칭",
3
+ REG: "정기시험",
4
+ RCU: "모집 중"
10
5
  };
11
- export { TagStyles };
@@ -1,11 +1,15 @@
1
1
  import { Titles } from "../Property";
2
2
  export type { CarouselContent };
3
+ type Tag = "NEW" | "REG" | "RCU";
3
4
  interface Option {
4
5
  background: string;
5
6
  text: string;
6
7
  }
7
- interface CarouselContent<T> {
8
- tag: T;
8
+ interface CarouselContent {
9
+ tag: {
10
+ type: Tag;
11
+ background: string;
12
+ };
9
13
  titles: Titles;
10
14
  image?: string;
11
15
  option?: Partial<Option>;
@@ -1,5 +1,4 @@
1
1
  import { CarouselContent } from "../../../../interface";
2
- import { Tag } from "../../../../interface/domain";
3
2
  export default function Carousel({ contents, }: {
4
- contents: CarouselContent<Tag>[];
3
+ contents: CarouselContent[];
5
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@ import { cn } from "../../../../util";
4
4
  import { useEase } from "../../../../hook";
5
5
  import { LineBreaks } from "../../../../text";
6
6
  import SVG from "../../../../asset/SVG";
7
- import { TagStyles } from "../../../../interface/domain";
7
+ import { tagString } from "../../../../interface/domain";
8
8
  export default function Carousel({ contents, }) {
9
9
  const [index, setIndex] = useState(0);
10
10
  const [flag, inTime] = useEase(10000, 1000);
@@ -17,27 +17,25 @@ export default function Carousel({ contents, }) {
17
17
  const { text, background } = option ?? {};
18
18
  const container = {
19
19
  displays: "flex justify-center items-center",
20
- sizes: "w-full h-100",
20
+ sizes: "w-full h-fit sm:h-80 ml:h-100",
21
21
  background,
22
22
  };
23
23
  const body = {
24
- positions: "relative",
25
- displays: "flex items-center",
24
+ displays: "flex flex-none items-center justify-center",
26
25
  sizes: "w-full max-w-256 h-full",
27
26
  text: text ?? "text-gray-dark",
28
27
  };
29
28
  const tagBox = {
30
29
  displays: "flex justify-center items-center",
31
- sizes: "w-20 h-8",
32
- background: TagStyles[tag].background,
33
- fonts: "text-white font-pretendard-bold text-lg leading-none",
30
+ sizes: "w-fit h-fit px-2 py-1 md:px-2.5 md:py-1.5",
31
+ background: tag.background,
32
+ fonts: "text-white font-pretendard-medium text-sm md:text-base leading-none",
34
33
  styles: "rounded-md",
35
34
  };
36
35
  const buttonBox = {
37
- positions: "absolute bottom-0 left-0",
38
- displays: "flex justify-between items-center",
36
+ displays: "flex justify-center items-center gap-1",
39
37
  sizes: "w-23.25 h-6.25 bg-gray-dark rounded-full",
40
- paddings: "px-1.5 ml-7.5",
38
+ paddings: "px-1.5 mt-12",
41
39
  };
42
- return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "relative w-64 h-50 flex flex-col pl-7.5", children: [_jsx("div", { className: cn(tagBox), children: TagStyles[tag].title }), _jsx("div", { className: "font-pretendard-bold text-2xl mt-2", children: titles.title }), _jsx(LineBreaks, { className: "mt-7.5", texts: titles.subtitle }), _jsxs("div", { className: cn(buttonBox), children: [_jsx("button", { onClick: () => setIndex((index - 1 + contents.length) % contents.length), className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.LessThan, {}) }), _jsxs("div", { className: "text-white", children: [index + 1, "/", contents.length] }), _jsx("button", { onClick: () => setIndex((index + 1) % contents.length), className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.GreaterThan, {}) })] })] }), image && (_jsx("img", { src: image, alt: "carousel-image", className: "absolute bottom-0 right-0 w-3/5 " }))] }) }));
40
+ return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: "w-72 h-50 flex flex-col flex-none pl-7.5", children: [_jsx("div", { className: cn(tagBox), children: tagString[tag.type] }), _jsx("div", { className: "font-pretendard-bold text-xl mt-2 md:text-2xl", children: titles.title }), _jsx(LineBreaks, { className: "mt-6 text-sm md:text-base", texts: titles.subtitle }), _jsxs("div", { className: cn(buttonBox), children: [_jsx("button", { onClick: () => setIndex((index - 1 + contents.length) % contents.length), className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.LessThan, {}) }), _jsxs("div", { className: "flex flex-row gap-2 justify-center items-center", children: [_jsx("div", { className: "text-white w-2 text-sm", children: index + 1 }), _jsx("div", { className: "w-0.5 h-3 bg-gray-medium" }), _jsx("div", { className: "text-white w-2 text-sm", children: contents.length })] }), _jsx("button", { onClick: () => setIndex((index + 1) % contents.length), className: "w-5 h-5 flex justify-center items-center", children: _jsx(SVG.Symbol.GreaterThan, {}) })] })] }), _jsx("div", { className: "h-full overflow-hidden w-fit", children: image && (_jsx("img", { src: image, alt: "carousel-image", className: "object-cover h-full" })) })] }) }));
43
41
  }
@@ -5,16 +5,19 @@ export default function Header({ logo, rightButton, contents, }) {
5
5
  const container = {
6
6
  displays: "flex justify-center items-center",
7
7
  sizes: "w-full",
8
- styles: "bg-white box-shadow ",
8
+ styles: "bg-white box-shadow ",
9
9
  };
10
10
  const body = {
11
11
  displays: "flex items-center justify-center md:justify-between",
12
12
  className: "w-full max-w-[1200px] h-15",
13
- boundaries: "md:px-12",
13
+ boundaries: "md:px-12 py-2.5",
14
14
  };
15
15
  const buttonBox = {
16
16
  fonts: "text-[9px] xs:text-[10px] sm:text-[11px] md:text-[16px] leading-tight",
17
- texts: "text-gray-dark",
17
+ texts: "text-gray-dark hover:text-black",
18
+ backgrounds: "hover:bg-[#F0F0F0]/50",
19
+ animations: "duration-300",
20
+ sizes: "h-10 rounded-md",
18
21
  boundaries: "px-0.5 md:px-2.5",
19
22
  };
20
23
  return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsx("div", { className: "hidden md:block", onClick: logo.onClick, children: logo.node }), _jsxs("div", { className: "flex items-center gap-x-7.5 md:gap-x-12", children: [_jsx("div", { className: "flex items-center gap-2.5", children: contents.map((button, index) => (_jsx("button", { onClick: button.onClick, className: cn(buttonBox), children: button.title }, index))) }), rightButton && (_jsx(Label.Button, { title: rightButton.title, onClick: rightButton?.onClick, option: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.114",
3
+ "version": "1.0.116",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.114
1
+ 1.0.116