@edu-tosel/design 1.0.368 → 1.0.370

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.
@@ -3,7 +3,7 @@ import React, { Fragment } from "react";
3
3
  import { useActionStore } from "../../store";
4
4
  function Show({ actions, children }) {
5
5
  const { events } = useActionStore();
6
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "no-scrollbar", children: children }), actions?.map(([flag, Component], index) => {
6
+ return (_jsxs(_Fragment, { children: [children, actions?.map(([flag, Component], index) => {
7
7
  const isVisible = typeof flag === "boolean"
8
8
  ? flag
9
9
  : events?.some(({ event }) => event === flag);
@@ -1,4 +1,6 @@
1
1
  import { EducationalVideo } from "../../../interface/EducationalVideo";
2
2
  export default function Education({ educationalVideos }: {
3
- educationalVideos: EducationalVideo[];
3
+ educationalVideos: (EducationalVideo & {
4
+ onClick?: () => void;
5
+ })[];
4
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -89,9 +89,9 @@ export default function Education({ educationalVideos }) {
89
89
  animation: "duration-300",
90
90
  test: "bg-gray-medium/20 pointer-events-none backdrop-blur-sm opacity-30",
91
91
  };
92
- return (_jsx("div", { className: cn(container), children: _jsx("div", { className: cn(cardPositioning), children: _jsx("div", { className: cn(cardWrapper, "comp-customer-videos__cards o-content-container u-hide-on-tablet u-hide-on-mobile"), ref: scrollContainerRef, children: _jsx("div", { className: cn(cardDeck), children: recentVideos.map((video, index) => (_jsx(VideoCard, { video: video, isActive: index === activeVideoIndex, onHover: () => setActiveVideoIndex(index) }, video.id))) }) }) }) }));
92
+ return (_jsx("div", { className: cn(container), children: _jsx("div", { className: cn(cardPositioning), children: _jsx("div", { className: cn(cardWrapper, "comp-customer-videos__cards o-content-container u-hide-on-tablet u-hide-on-mobile"), ref: scrollContainerRef, children: _jsx("div", { className: cn(cardDeck), children: recentVideos.map((video, index) => (_jsx(VideoCard, { video: video, isActive: index === activeVideoIndex, onHover: () => setActiveVideoIndex(index), onClick: video.onClick }, video.id))) }) }) }) }));
93
93
  }
94
- function VideoCard({ video, isActive, onHover }) {
94
+ function VideoCard({ video, isActive, onHover, onClick }) {
95
95
  const ghostCard = {
96
96
  displays: "flex",
97
97
  spacings: "ms-0 ps-0",
@@ -134,7 +134,7 @@ function VideoCard({ video, isActive, onHover }) {
134
134
  };
135
135
  // 썸네일 URL: video.thumbnailUrl이 있으면 사용, 없으면 YouTube 썸네일 사용
136
136
  const thumbnailUrl = video.thumbnailUrl || `https://img.youtube.com/vi/${video.youtubeId}/maxresdefault.jpg`;
137
- return (_jsx("div", { className: cn(ghostCard), children: _jsx("div", { className: cn(card), onMouseEnter: onHover, children: _jsxs("div", { className: cn(videoContainer), children: [_jsx("div", { className: cn("w-full h-full transition-transform duration-500 ease-in-out relative", isActive ? "scale-110" : "scale-100"), children: _jsx("img", { src: thumbnailUrl, alt: video.title, className: "w-full h-full object-cover", onError: (e) => {
137
+ return (_jsx("div", { className: cn(ghostCard), children: _jsx("div", { className: cn(card, onClick ? "cursor-pointer" : ""), onMouseEnter: onHover, onClick: onClick, children: _jsxs("div", { className: cn(videoContainer), children: [_jsx("div", { className: cn("w-full h-full transition-transform duration-500 ease-in-out relative", isActive ? "scale-110" : "scale-100"), children: _jsx("img", { src: thumbnailUrl, alt: video.title, className: "w-full h-full object-cover", onError: (e) => {
138
138
  // thumbnailUrl이 제공되지 않은 경우에만 YouTube 썸네일로 대체
139
139
  if (!video.thumbnailUrl) {
140
140
  e.currentTarget.src = `https://img.youtube.com/vi/${video.youtubeId}/hqdefault.jpg`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.368",
3
+ "version": "1.0.370",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.368
1
+ 1.0.370