@edu-tosel/design 1.0.334 → 1.0.341

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,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
3
  import { useRef, useState, useEffect } from "react";
4
- export default function Announcement({ banners }) {
4
+ import { Label } from "../../../widget";
5
+ export default function Announcement({ banners, browse }) {
5
6
  const scrollContainerRef = useRef(null);
6
7
  const cardWidth = 320; //card width
7
8
  // 스크롤 위치 상태 관리
@@ -62,7 +63,7 @@ export default function Announcement({ banners }) {
62
63
  sizes: "w-full",
63
64
  };
64
65
  const deckTitle = {
65
- displays: "xl:pl-5 md:pl-[76px] pl-5",
66
+ displays: "flex items-center gap-x-4 xl:pl-5 md:pl-[76px] pl-5",
66
67
  sizes: "max-w-300 w-full",
67
68
  textstyles: "font-pretendard-var font-bold text-2xl text-gray-dark",
68
69
  };
@@ -98,7 +99,10 @@ export default function Announcement({ banners }) {
98
99
  animation: "duration-300",
99
100
  test: "bg-gray-medium/20 pointer-events-none backdrop-blur-sm opacity-30",
100
101
  };
101
- return (_jsx("div", { className: cn(bgWrapper), children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(deckTitlePositioning), children: _jsx("div", { className: cn(deckTitle), children: "\uACF5\uC9C0\uC0AC\uD56D" }) }), _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(canScrollLeft ? hoverButton : disabledButton), onClick: canScrollLeft ? () => handleScroll("left") : undefined, children: _jsx("img", { src: "images/home/handle-left.svg", alt: "" }) }), _jsx("div", { className: cn(canScrollRight ? hoverButton : disabledButton), onClick: canScrollRight ? () => handleScroll("right") : undefined, children: _jsx("img", { src: "images/home/handle-right.svg", alt: "" }) })] })] }) }));
102
+ return (_jsx("div", { className: cn(bgWrapper), children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(deckTitlePositioning), children: _jsxs("div", { className: cn(deckTitle), children: [_jsx("div", { children: "\uACF5\uC9C0\uC0AC\uD56D" }), browse && (_jsx(Label.Button, { title: "\uB354 \uBCF4\uAE30", onClick: browse, option: {
103
+ width: "xs",
104
+ height: "xs",
105
+ } }))] }) }), _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(canScrollLeft ? hoverButton : disabledButton), onClick: canScrollLeft ? () => handleScroll("left") : undefined, children: _jsx("img", { src: "images/home/handle-left.svg", alt: "" }) }), _jsx("div", { className: cn(canScrollRight ? hoverButton : disabledButton), onClick: canScrollRight ? () => handleScroll("right") : undefined, children: _jsx("img", { src: "images/home/handle-right.svg", alt: "" }) })] })] }) }));
102
106
  }
103
107
  function Banner({ onClick, titles }) {
104
108
  //ghost card snaps to the end of the viewport
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.334",
3
+ "version": "1.0.341",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",