@edu-tosel/design 1.0.136 → 1.0.138

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,2 +1,2 @@
1
1
  import { MenuProps } from "../../../interface";
2
- export default function Menu({ showAction, profile, input, medium, bottom, }: MenuProps): JSX.Element;
2
+ export default function Menu({ showAction, profile, medium, bottom, }: MenuProps): JSX.Element;
@@ -3,7 +3,9 @@ import { useTransition, animated } from "react-spring";
3
3
  import { cn, gradient } from "../../../util";
4
4
  import { useActionStore } from "../../../store";
5
5
  import { Label } from "../../../widget";
6
- export default function Menu({ showAction, profile, input, medium, bottom, }) {
6
+ export default function Menu({ showAction, profile,
7
+ // input,
8
+ medium, bottom, }) {
7
9
  const { isVisible } = showAction ?? {};
8
10
  const { setIsOwn, removeModal } = useActionStore();
9
11
  const container = {
@@ -18,7 +20,7 @@ export default function Menu({ showAction, profile, input, medium, bottom, }) {
18
20
  leave: { opacity: 0 },
19
21
  config: { duration: 200 },
20
22
  });
21
- return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), onClick: () => setIsOwn(true), children: [_jsxs("div", { className: "h-17.75 flex gap-12 justify-center items-center text-black border-b-2 pb-2.5", children: [_jsxs("div", { children: [_jsx("div", { children: profile?.name }), _jsx("div", { className: "text-xs", children: profile?.belong })] }), _jsx("div", { className: "relative w-15 h-15 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: profile?.image, alt: "profile-image" }) })] }), _jsxs("div", { className: "flex flex-col gap-2.5 pt-2.5", children: [_jsx("input", { className: "w-47.5 h-6.25 border-2 text-black", value: input?.password[0], onChange: (e) => input?.password[1](e.target.value), type: "password" }), medium?.map((button) => (_jsx(Label.Button, { title: button.title, onClick: button.onClick, option: {
23
+ return transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(container), onClick: () => setIsOwn(true), children: [_jsxs("div", { className: "h-17.75 flex gap-12 justify-center items-center text-black border-b-2 pb-2.5", children: [_jsxs("div", { children: [_jsx("div", { children: profile?.name }), _jsx("div", { className: "text-xs", children: profile?.belong })] }), _jsx("div", { className: "relative w-15 h-15 rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md", src: profile?.image, alt: "profile-image" }) })] }), _jsxs("div", { className: "flex flex-col gap-2.5 pt-2.5", children: [medium?.map((button) => (_jsx(Label.Button, { title: button.title, onClick: button.onClick, option: {
22
24
  ...button.option,
23
25
  width: "full",
24
26
  height: "xs",
@@ -1,3 +1,4 @@
1
+ import { OnClick } from "../../../interface";
1
2
  interface PromotionOptions {
2
3
  className: string;
3
4
  }
@@ -6,6 +7,7 @@ export default function Promotion({ banners, option, }: {
6
7
  option?: Partial<PromotionOptions>;
7
8
  }): import("react/jsx-runtime").JSX.Element;
8
9
  interface BannerProps {
10
+ onClick?: OnClick;
9
11
  image: {
10
12
  src: string;
11
13
  location?: string;
@@ -14,7 +14,7 @@ export default function Promotion({ banners, option, }) {
14
14
  : currentScrollLeft + scrollAmount;
15
15
  scrollContainerRef.current.scrollTo({
16
16
  left: newScrollLeft,
17
- behavior: "smooth"
17
+ behavior: "smooth",
18
18
  });
19
19
  }
20
20
  };
@@ -58,11 +58,11 @@ export default function Promotion({ banners, option, }) {
58
58
  const hoverButton = {
59
59
  sizes: "rounded-full w-12 h-12 scale-50 group-hover:scale-100",
60
60
  animation: "duration-300 ",
61
- test: "bg-gray-medium/20 hover:bg-gray-medium/50 pointer-events-auto backdrop-blur-sm fill-red-500"
61
+ test: "bg-gray-medium/20 hover:bg-gray-medium/50 pointer-events-auto backdrop-blur-sm fill-red-500",
62
62
  };
63
63
  return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(deckTitlePositioning), children: _jsx("div", { className: cn(deckTitle), children: "\uC0C8\uB85C\uC6B4 \uC18C\uC2DD" }) }), _jsx("div", { className: cn(cardPositioning), children: _jsx("div", { className: cn(cardWrapper), ref: scrollContainerRef, children: _jsx("div", { className: cn(cardDeck), children: banners.map((banner) => (_jsx(Banner, { ...banner }, banner.image.src))) }) }) }), _jsxs("div", { className: cn(buttonPositioning), children: [_jsx("div", { className: cn(hoverButton), onClick: () => handleScroll("left"), children: _jsx("img", { src: "images/home/handle-left.svg", alt: "" }) }), _jsx("div", { className: cn(hoverButton), onClick: () => handleScroll("right"), children: _jsx("img", { src: "images/home/handle-right.svg", alt: "" }) })] })] }));
64
64
  }
65
- function Banner({ image, option }) {
65
+ function Banner({ onClick, image, option }) {
66
66
  const { background } = option ?? {};
67
67
  //ghost card snaps to the end of the viewport
68
68
  const ghostCard = {
@@ -80,13 +80,13 @@ function Banner({ image, option }) {
80
80
  position: "ml:translate-x-[calc(50vw-600px)]",
81
81
  transition: "duration-300",
82
82
  displays: "relative display-block overflow-hidden",
83
- fonts: "font-pretendard-var"
83
+ fonts: "font-pretendard-var",
84
84
  };
85
85
  const imageWrapper = {
86
86
  sizes: "w-full h-full",
87
87
  displays: "absolute",
88
88
  positions: "bottom-0 left-0",
89
- background: `bg-cover bg-center`
89
+ background: `bg-cover bg-center`,
90
90
  };
91
- return (_jsx("div", { className: cn(ghostCard), children: _jsx("div", { className: cn(card), children: _jsx("div", { className: cn(imageWrapper), style: { backgroundImage: `url(${image?.src})` } }) }) }));
91
+ return (_jsx("div", { className: cn(ghostCard), children: _jsx("div", { className: cn(card), onClick: onClick, children: _jsx("div", { className: cn(imageWrapper), style: { backgroundImage: `url(${image?.src})` } }) }) }));
92
92
  }
@@ -1,9 +1,10 @@
1
- import { Titles } from "../../../interface";
1
+ import { OnClick, Titles } from "../../../interface";
2
2
  export default function Service({ banners }: {
3
3
  banners: BannerProps[];
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
5
  interface BannerProps {
6
6
  titles: Titles;
7
+ onClick?: OnClick;
7
8
  image?: {
8
9
  src: string;
9
10
  isBlur?: boolean;
@@ -48,7 +48,7 @@ export default function Service({ banners }) {
48
48
  spacings: "gap-5 ml:mr-[calc(100vw-1200px)]",
49
49
  };
50
50
  const buttonPositioning = {
51
- displays: "hidden flex-row md:flex",
51
+ displays: "overflow-x-hidden flex-row md:flex",
52
52
  sizes: "w-full h-full",
53
53
  spacings: "px-2",
54
54
  positions: "absolute top-0 left-0 justify-between items-center opacity-0 group-hover:opacity-100 duration-300",
@@ -61,7 +61,7 @@ export default function Service({ banners }) {
61
61
  };
62
62
  return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(deckTitlePositioning), children: _jsx("div", { className: cn(deckTitle), children: "\uD1A0\uC140\uC758 \uCC28\uBCC4\uD654\uB41C \uC11C\uBE44\uC2A4" }) }), _jsx("div", { className: cn(cardPositioning), children: _jsx("div", { className: cn(cardWrapper), ref: scrollContainerRef, children: _jsx("div", { className: cn(cardDeck), children: banners.map((banner) => (_jsx(Banner, { ...banner }, banner.titles.title))) }) }) }), _jsxs("div", { className: cn(buttonPositioning), children: [_jsx("div", { className: cn(hoverButton), onClick: () => handleScroll("left"), children: _jsx("img", { src: "images/home/handle-left.svg", alt: "" }) }), _jsx("div", { className: cn(hoverButton), onClick: () => handleScroll("right"), children: _jsx("img", { src: "images/home/handle-right.svg", alt: "" }) })] })] }));
63
63
  }
64
- function Banner({ titles, image, option }) {
64
+ function Banner({ titles, onClick, image, option }) {
65
65
  const { background } = option ?? {};
66
66
  //ghost card snaps to the end of the viewport
67
67
  const ghostCard = {
@@ -102,5 +102,5 @@ function Banner({ titles, image, option }) {
102
102
  positions: "bottom-0 left-0",
103
103
  background: `bg-cover bg-center`,
104
104
  };
105
- return (_jsx("div", { className: cn(ghostCard), children: _jsxs("div", { className: cn(card), children: [_jsx("div", { className: cn(imageWrapper), style: { backgroundImage: `url(${image?.src})` } }), _jsxs("div", { className: cn(titleBox.container), children: [_jsx("div", { className: cn(titleBox.subtitle), children: titles.subtitle }), _jsx("div", { className: cn(titleBox.title), children: titles.title })] })] }) }));
105
+ return (_jsx("div", { className: cn(ghostCard), children: _jsxs("div", { className: cn(card), onClick: onClick, children: [_jsx("div", { className: cn(imageWrapper), style: { backgroundImage: `url(${image?.src})` } }), _jsxs("div", { className: cn(titleBox.container), children: [_jsx("div", { className: cn(titleBox.subtitle), children: titles.subtitle }), _jsx("div", { className: cn(titleBox.title), children: titles.title })] })] }) }));
106
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.136",
3
+ "version": "1.0.138",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.136
1
+ 1.0.138