@team-monolith/cds 1.61.2 → 1.61.4

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.
@@ -2,8 +2,8 @@ import React from "react";
2
2
  export interface BookProps {
3
3
  className?: string;
4
4
  title?: string;
5
- chapter?: string;
6
- courseType?: string;
5
+ subtitle?: string;
6
+ subtitleBold?: string;
7
7
  isHidden?: boolean;
8
8
  buttons?: React.ReactNode;
9
9
  /** 전달하면 controlled component로 애니메이션을 제어할 수 있다 */
@@ -73,7 +73,7 @@ const CARD_COLOR_PALETTE = (theme) => ({
73
73
  * @returns
74
74
  */
75
75
  function Book(props, ref) {
76
- const { className, title, chapter, courseType, coverColor, isHidden = false, buttons, open: controlledOpen, onHoverStart, onHoverEnd, onCoverClick, icon, } = props;
76
+ const { className, title, subtitle, subtitleBold, coverColor, isHidden = false, buttons, open: controlledOpen, onHoverStart, onHoverEnd, onCoverClick, icon, } = props;
77
77
  const theme = useTheme();
78
78
  const [open, setOpen] = useState(false);
79
79
  return (_jsxs(Container, Object.assign({ initial: "closed", animate: (controlledOpen !== undefined ? controlledOpen : open)
@@ -84,7 +84,10 @@ function Book(props, ref) {
84
84
  }, onHoverEnd: () => {
85
85
  setOpen(false);
86
86
  onHoverEnd === null || onHoverEnd === void 0 ? void 0 : onHoverEnd();
87
- } }, { children: [_jsxs(Cover, Object.assign({ className: className, backgroundColor: coverColor, variants: coverMotion, onClick: () => {
87
+ } }, { children: [_jsxs(Cover, Object.assign({ className: className, css: onCoverClick &&
88
+ css `
89
+ cursor: pointer;
90
+ `, backgroundColor: coverColor, variants: coverMotion, onClick: () => {
88
91
  setOpen(!open);
89
92
  onCoverClick === null || onCoverClick === void 0 ? void 0 : onCoverClick();
90
93
  } }, { children: [icon && _jsx(CoverIcon, { children: icon }), isHidden && (_jsxs(_Fragment, { children: [_jsx(Hide, {}), _jsx(EyeOffFillIcon, { color: theme.color.foreground.neutralAlt, css: css `
@@ -97,7 +100,9 @@ function Book(props, ref) {
97
100
 
98
101
  width: 24px;
99
102
  height: 24px;
100
- ` })] })), _jsxs(CoverTexts, Object.assign({ variants: buttons ? textMotion : undefined }, { children: [_jsx(Chapter, { children: chapter }), _jsx(CourseType, { children: courseType }), _jsx(CoverTitle, { children: title })] })), _jsx(BookGradient, {}), _jsx(Buttons, Object.assign({ variants: buttonsMotion, onClick: (e) => {
103
+ ` })] })), _jsxs(CoverTexts, Object.assign({ variants: buttons ? textMotion : undefined }, { children: [_jsx(Subtitle, { children: subtitle }), _jsx(Subtitle, Object.assign({ css: css `
104
+ font-weight: 800;
105
+ ` }, { children: subtitleBold })), _jsx(CoverTitle, { children: title })] })), _jsx(BookGradient, {}), _jsx(Buttons, Object.assign({ variants: buttonsMotion, onClick: (e) => {
101
106
  // Button 클릭 시에도 CoverClick 이벤트가 발생하지 않도록 막습니다.
102
107
  e.stopPropagation();
103
108
  } }, { children: buttons }))] })), _jsx(Shelf, {})] })));
@@ -224,7 +229,7 @@ const Hide = styled.div(({ theme }) => css `
224
229
 
225
230
  z-index: ${ZINDEX_HIDE};
226
231
  `);
227
- const Chapter = styled.div(({ theme }) => css `
232
+ const Subtitle = styled.div(({ theme }) => css `
228
233
  color: ${CARD_COLOR_PALETTE(theme).text};
229
234
 
230
235
  /* Default/Label/12px-Md */
@@ -233,20 +238,6 @@ const Chapter = styled.div(({ theme }) => css `
233
238
  font-style: normal;
234
239
  font-weight: 500;
235
240
  line-height: 16px; /* 133.333% */
236
-
237
- opacity: 0.8;
238
- `);
239
- const CourseType = styled.div(({ theme }) => css `
240
- color: ${CARD_COLOR_PALETTE(theme).text};
241
-
242
- /* Default/Label/12px-Eb */
243
- font-family: ${theme.fontFamily.ui};
244
- font-size: 12px;
245
- font-style: normal;
246
- font-weight: 800;
247
- line-height: 16px; /* 133.333% */
248
-
249
- opacity: 0.8;
250
241
  `);
251
242
  const CoverIcon = styled.div(({ theme }) => css `
252
243
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.61.2",
3
+ "version": "1.61.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,