@edu-tosel/design 1.0.137 → 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,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;
|
|
@@ -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
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.138
|