@team-monolith/cds 1.103.4 → 1.105.0

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.
Files changed (183) hide show
  1. package/@types/emotion.d.ts +158 -158
  2. package/README.md +35 -35
  3. package/dist/CdsProvider.js +4 -4
  4. package/dist/components/AlertDialog/AlertDialog.js +54 -54
  5. package/dist/components/AlertDialog/AlertDialogActions.js +7 -7
  6. package/dist/components/AlertDialog/AlertDialogContent.js +8 -8
  7. package/dist/components/AlertDialog/AlertDialogTitle.js +33 -34
  8. package/dist/components/AnimatedButton.js +32 -32
  9. package/dist/components/Banner.js +51 -51
  10. package/dist/components/Book/Book.d.ts +3 -3
  11. package/dist/components/Book/Book.js +173 -174
  12. package/dist/components/Button.js +179 -179
  13. package/dist/components/CheckboxInput.js +100 -100
  14. package/dist/components/FileTypeAlertDialog.js +4 -4
  15. package/dist/components/Input.js +53 -53
  16. package/dist/components/InputBase.js +72 -72
  17. package/dist/components/Modal.js +4 -4
  18. package/dist/components/OverflowTooltip.js +4 -4
  19. package/dist/components/Pagination.js +56 -56
  20. package/dist/components/PinInput.js +64 -64
  21. package/dist/components/Popover.js +27 -27
  22. package/dist/components/RadioInput.js +73 -73
  23. package/dist/components/SquareButton.js +109 -109
  24. package/dist/components/Switch.js +69 -69
  25. package/dist/components/SwitchButton.js +107 -107
  26. package/dist/components/Tag.d.ts +2 -2
  27. package/dist/components/Tag.js +68 -68
  28. package/dist/components/Tooltip.js +19 -19
  29. package/dist/foundation/breakpoints.js +16 -16
  30. package/dist/icons/custom/colored/ai-helper.svg +4 -4
  31. package/dist/icons/custom/colored/ai-quiz-color.svg +20 -20
  32. package/dist/icons/custom/colored/badge-color.svg +4 -4
  33. package/dist/icons/custom/colored/badge-gold.svg +11 -11
  34. package/dist/icons/custom/colored/badge-green.svg +11 -11
  35. package/dist/icons/custom/colored/badge-silver.svg +11 -11
  36. package/dist/icons/custom/colored/basic-plus.svg +31 -31
  37. package/dist/icons/custom/colored/basic.svg +3 -3
  38. package/dist/icons/custom/colored/board-color.svg +5 -5
  39. package/dist/icons/custom/colored/cast-cloudy-color.svg +6 -6
  40. package/dist/icons/custom/colored/cast-partly-color.svg +7 -7
  41. package/dist/icons/custom/colored/cast-rainbow-color.svg +13 -13
  42. package/dist/icons/custom/colored/cast-sunny-color.svg +4 -4
  43. package/dist/icons/custom/colored/clap-bronze.svg +8 -8
  44. package/dist/icons/custom/colored/clap-gold.svg +8 -8
  45. package/dist/icons/custom/colored/clap-silver.svg +8 -8
  46. package/dist/icons/custom/colored/class.svg +13 -13
  47. package/dist/icons/custom/colored/codap-color.svg +13 -13
  48. package/dist/icons/custom/colored/ebook-color.svg +5 -5
  49. package/dist/icons/custom/colored/embedded-color.svg +38 -38
  50. package/dist/icons/custom/colored/emo-clap-color.svg +252 -252
  51. package/dist/icons/custom/colored/emo-good-color.svg +68 -68
  52. package/dist/icons/custom/colored/emo-great-color.svg +67 -67
  53. package/dist/icons/custom/colored/emo-heart-color.svg +239 -239
  54. package/dist/icons/custom/colored/emo-hundred-color.svg +194 -194
  55. package/dist/icons/custom/colored/emo-neutral-color.svg +76 -76
  56. package/dist/icons/custom/colored/emo-stars-color.svg +121 -121
  57. package/dist/icons/custom/colored/emo-thumbup-color.svg +238 -238
  58. package/dist/icons/custom/colored/empty.svg +1 -1
  59. package/dist/icons/custom/colored/entry-color.svg +4 -4
  60. package/dist/icons/custom/colored/filename-all-color.svg +4 -4
  61. package/dist/icons/custom/colored/filename-doc-color.svg +5 -5
  62. package/dist/icons/custom/colored/filename-hwp-color.svg +6 -6
  63. package/dist/icons/custom/colored/filename-img-color.svg +6 -6
  64. package/dist/icons/custom/colored/filename-mp4-color.svg +5 -5
  65. package/dist/icons/custom/colored/filename-pdf-color.svg +12 -12
  66. package/dist/icons/custom/colored/filename-ppt-color.svg +6 -6
  67. package/dist/icons/custom/colored/filename-xls-color.svg +5 -5
  68. package/dist/icons/custom/colored/filename-zip-color.svg +5 -5
  69. package/dist/icons/custom/colored/google.svg +13 -13
  70. package/dist/icons/custom/colored/hand-fill.svg +4 -4
  71. package/dist/icons/custom/colored/judge-color.svg +6 -6
  72. package/dist/icons/custom/colored/makecode-color.svg +4 -4
  73. package/dist/icons/custom/colored/master.svg +12 -12
  74. package/dist/icons/custom/colored/material.svg +6 -6
  75. package/dist/icons/custom/colored/medal-bronze.svg +9 -9
  76. package/dist/icons/custom/colored/medal-gold.svg +9 -9
  77. package/dist/icons/custom/colored/medal-silver.svg +9 -9
  78. package/dist/icons/custom/colored/pro.svg +4 -4
  79. package/dist/icons/custom/colored/problem.svg +7 -7
  80. package/dist/icons/custom/colored/python-color.svg +4 -4
  81. package/dist/icons/custom/colored/quiz-color.svg +12 -12
  82. package/dist/icons/custom/colored/resource-color.svg +13 -13
  83. package/dist/icons/custom/colored/scratch-color.svg +6 -6
  84. package/dist/icons/custom/colored/type-helper.svg +9 -9
  85. package/dist/icons/custom/colored/whale.svg +7 -7
  86. package/dist/icons/custom/colored/worksheet-color.svg +5 -5
  87. package/dist/icons/custom/default/ai-quiz.svg +8 -8
  88. package/dist/icons/custom/default/badge.svg +4 -4
  89. package/dist/icons/custom/default/board.svg +5 -5
  90. package/dist/icons/custom/default/cast-cloudy.svg +3 -3
  91. package/dist/icons/custom/default/cast-partly.svg +4 -4
  92. package/dist/icons/custom/default/cast-rainbow.svg +12 -12
  93. package/dist/icons/custom/default/cast-sunny.svg +3 -3
  94. package/dist/icons/custom/default/codap.svg +11 -11
  95. package/dist/icons/custom/default/ebook.svg +3 -3
  96. package/dist/icons/custom/default/embedded.svg +4 -4
  97. package/dist/icons/custom/default/emo-clap.svg +6 -6
  98. package/dist/icons/custom/default/emo-good.svg +12 -12
  99. package/dist/icons/custom/default/emo-great.svg +12 -12
  100. package/dist/icons/custom/default/emo-heart.svg +5 -5
  101. package/dist/icons/custom/default/emo-hundred.svg +3 -3
  102. package/dist/icons/custom/default/emo-neutral.svg +14 -14
  103. package/dist/icons/custom/default/emo-stars.svg +14 -14
  104. package/dist/icons/custom/default/emo-thumbup.svg +3 -3
  105. package/dist/icons/custom/default/entry.svg +4 -4
  106. package/dist/icons/custom/default/fab.svg +10 -10
  107. package/dist/icons/custom/default/grant-alt.svg +5 -5
  108. package/dist/icons/custom/default/grant.svg +4 -4
  109. package/dist/icons/custom/default/hand-line.svg +3 -3
  110. package/dist/icons/custom/default/judge.svg +3 -3
  111. package/dist/icons/custom/default/makecode.svg +5 -5
  112. package/dist/icons/custom/default/pdf.svg +3 -3
  113. package/dist/icons/custom/default/python.svg +7 -7
  114. package/dist/icons/custom/default/quiz.svg +4 -4
  115. package/dist/icons/custom/default/resource.svg +11 -11
  116. package/dist/icons/custom/default/scratch.svg +3 -3
  117. package/dist/icons/custom/default/scroll-alt.svg +5 -5
  118. package/dist/icons/custom/default/scroll-fill.svg +4 -4
  119. package/dist/icons/custom/default/scroll-line.svg +5 -5
  120. package/dist/icons/custom/default/symbol.svg +4 -4
  121. package/dist/icons/custom/default/worksheet.svg +4 -4
  122. package/dist/icons/custom/svgrColoredTemplate.js +26 -26
  123. package/dist/icons/custom/svgrDefaultTemplate.js +26 -26
  124. package/dist/patterns/Accordion.js +20 -20
  125. package/dist/patterns/Dropdown/DropdownItem/DropdownItem.js +58 -58
  126. package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +27 -27
  127. package/dist/patterns/Dropdown/DropdownMenu/style.js +19 -19
  128. package/dist/patterns/LexicalEditor/Plugins.js +36 -36
  129. package/dist/patterns/LexicalEditor/components/FileSelectInput.js +23 -23
  130. package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +4 -4
  131. package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +15 -15
  132. package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +2 -2
  133. package/dist/patterns/LexicalEditor/hr.svg +3 -3
  134. package/dist/patterns/LexicalEditor/nodes/FileNode/FileComponent.js +44 -44
  135. package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +25 -25
  136. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +8 -8
  137. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageResizer.js +60 -60
  138. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +19 -19
  139. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +49 -49
  140. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +7 -7
  141. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +73 -73
  142. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +5 -5
  143. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.js +7 -7
  144. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxComponent.js +69 -69
  145. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxEdit.js +3 -3
  146. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +15 -15
  147. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +28 -28
  148. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +54 -54
  149. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +61 -61
  150. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/Evaluation.js +75 -75
  151. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +17 -17
  152. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +7 -7
  153. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +28 -28
  154. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +52 -52
  155. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +7 -7
  156. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +25 -25
  157. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +53 -53
  158. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.js +54 -54
  159. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +5 -5
  160. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +21 -21
  161. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +42 -42
  162. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +71 -71
  163. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdder.js +51 -51
  164. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +11 -11
  165. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/menu.svg +7 -7
  166. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/plus.svg +2 -2
  167. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +10 -10
  168. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuItem.js +32 -32
  169. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuList.js +32 -32
  170. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +12 -12
  171. package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +49 -49
  172. package/dist/patterns/LexicalEditor/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatPopup.js +36 -36
  173. package/dist/patterns/LexicalEditor/plugins/ParagraphPlaceholderPlugin/index.js +7 -7
  174. package/dist/patterns/LexicalEditor/theme.js +243 -243
  175. package/dist/patterns/SegmentedControl/SegmentedControlButton.js +10 -10
  176. package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +8 -8
  177. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +2 -2
  178. package/dist/patterns/ToggleButtonGroup/ToggleButton.js +40 -40
  179. package/dist/patterns/ToggleButtonGroup/ToggleButtonGroup.js +11 -11
  180. package/dist/utils/hover.js +12 -12
  181. package/dist/utils/reset.js +19 -19
  182. package/dist/utils/visuallyHidden.js +10 -10
  183. package/package.json +92 -92
@@ -14,28 +14,28 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
14
14
  import { css, keyframes, useTheme } from "@emotion/react";
15
15
  import { Button } from "..";
16
16
  const DARK_BLACK_COLOR = "#202020";
17
- const getGradient = (baseColor, activeColor) => css `
18
- background-image: repeating-linear-gradient(
19
- -45deg,
20
- ${baseColor} 0%,
21
- ${baseColor} 20%,
22
- ${activeColor} 20%,
23
- ${activeColor} 25%,
24
- ${baseColor} 25%,
25
- ${baseColor} 30%,
26
- ${activeColor} 30%,
27
- ${activeColor} 40%,
28
- ${baseColor} 40%,
29
- ${baseColor} 60%,
30
- ${activeColor} 60%,
31
- ${activeColor} 70%,
32
- ${baseColor} 70%,
33
- ${baseColor} 75%,
34
- ${activeColor} 75%,
35
- ${activeColor} 80%,
36
- ${baseColor} 80%,
37
- ${baseColor} 100%
38
- );
17
+ const getGradient = (baseColor, activeColor) => css `
18
+ background-image: repeating-linear-gradient(
19
+ -45deg,
20
+ ${baseColor} 0%,
21
+ ${baseColor} 20%,
22
+ ${activeColor} 20%,
23
+ ${activeColor} 25%,
24
+ ${baseColor} 25%,
25
+ ${baseColor} 30%,
26
+ ${activeColor} 30%,
27
+ ${activeColor} 40%,
28
+ ${baseColor} 40%,
29
+ ${baseColor} 60%,
30
+ ${activeColor} 60%,
31
+ ${activeColor} 70%,
32
+ ${baseColor} 70%,
33
+ ${baseColor} 75%,
34
+ ${activeColor} 75%,
35
+ ${activeColor} 80%,
36
+ ${baseColor} 80%,
37
+ ${baseColor} 100%
38
+ );
39
39
  `;
40
40
  const COLOR_TO_BACKGROUND_IMAGE = (theme, color) => ({
41
41
  primary: getGradient(theme.color.background.primary, theme.color.background.primaryActive),
@@ -44,13 +44,13 @@ const COLOR_TO_BACKGROUND_IMAGE = (theme, color) => ({
44
44
  black: getGradient(theme.color.background.inverse, DARK_BLACK_COLOR),
45
45
  white: getGradient(theme.color.background.neutralBase, theme.color.background.neutralAltActive),
46
46
  })[color];
47
- const backgroundSlideAnimation = keyframes `
48
- 0% {
49
- background-position: 400% 50%;
50
- }
51
- 100% {
52
- background-position: 0% 50%;
53
- }
47
+ const backgroundSlideAnimation = keyframes `
48
+ 0% {
49
+ background-position: 400% 50%;
50
+ }
51
+ 100% {
52
+ background-position: 0% 50%;
53
+ }
54
54
  `;
55
55
  /**
56
56
  * 반짝이는 애니메이션 효과가 적용된 Button 컴포넌트
@@ -61,9 +61,9 @@ export function AnimatedButton(props) {
61
61
  return (_jsx(Button, Object.assign({}, props, { css: disabled || loading
62
62
  ? []
63
63
  : [
64
- css `
65
- background-size: 400% 100%;
66
- animation: ${backgroundSlideAnimation} 8s linear infinite;
64
+ css `
65
+ background-size: 400% 100%;
66
+ animation: ${backgroundSlideAnimation} 8s linear infinite;
67
67
  `,
68
68
  COLOR_TO_BACKGROUND_IMAGE(theme, color),
69
69
  ] })));
@@ -59,65 +59,65 @@ export const Banner = React.forwardRef(function Banner(props, ref) {
59
59
  const { className, component: Component = "div", headline, content, icon, color, buttonLabel, onButtonClick, buttonProps, close, onClose, fullWidth } = props, other = __rest(props, ["className", "component", "headline", "content", "icon", "color", "buttonLabel", "onButtonClick", "buttonProps", "close", "onClose", "fullWidth"]);
60
60
  const theme = useTheme();
61
61
  return (_jsxs(Component, Object.assign({}, other, { ref: ref, className: className, css: [
62
- css `
63
- display: flex;
64
- align-items: center;
65
- padding: 0px 12px;
66
- line-height: 125%;
67
- background: ${COLOR_PALETTE(theme, color).background};
62
+ css `
63
+ display: flex;
64
+ align-items: center;
65
+ padding: 0px 12px;
66
+ line-height: 125%;
67
+ background: ${COLOR_PALETTE(theme, color).background};
68
68
  `,
69
69
  fullWidth
70
- ? css `
71
- width: 100%;
70
+ ? css `
71
+ width: 100%;
72
72
  `
73
- : css `
74
- border-radius: 12px;
75
- width: fit-content;
73
+ : css `
74
+ border-radius: 12px;
75
+ width: fit-content;
76
76
  `,
77
- ], children: [icon && (_jsx(Icon, { className: bannerClasses.icon, css: css `
78
- align-self: ${headline && content ? "flex-start" : "center"};
79
- color: ${COLOR_PALETTE(theme, color).headline};
80
- `, children: icon })), _jsxs(TextContainer, { className: bannerClasses.textContainer, children: [headline && (_jsx(Headline, { className: bannerClasses.headline, css: css `
81
- color: ${COLOR_PALETTE(theme, color).headline};
82
- `, children: headline })), content && (_jsx(Content, { className: bannerClasses.content, css: css `
83
- color: ${COLOR_PALETTE(theme, color).content};
77
+ ], children: [icon && (_jsx(Icon, { className: bannerClasses.icon, css: css `
78
+ align-self: ${headline && content ? "flex-start" : "center"};
79
+ color: ${COLOR_PALETTE(theme, color).headline};
80
+ `, children: icon })), _jsxs(TextContainer, { className: bannerClasses.textContainer, children: [headline && (_jsx(Headline, { className: bannerClasses.headline, css: css `
81
+ color: ${COLOR_PALETTE(theme, color).headline};
82
+ `, children: headline })), content && (_jsx(Content, { className: bannerClasses.content, css: css `
83
+ color: ${COLOR_PALETTE(theme, color).content};
84
84
  `, children: content }))] }), buttonLabel && (_jsx(Button, Object.assign({ className: bannerClasses.button, css: !buttonProps &&
85
- css `
86
- color: ${COLOR_PALETTE(theme, color).content};
87
- `, color: "textNeutral", size: "small", label: buttonLabel, onClick: onButtonClick }, buttonProps))), close && (_jsx(SquareButton, { className: bannerClasses.closeSquareButton, css: css `
88
- color: ${COLOR_PALETTE(theme, color).content};
85
+ css `
86
+ color: ${COLOR_PALETTE(theme, color).content};
87
+ `, color: "textNeutral", size: "small", label: buttonLabel, onClick: onButtonClick }, buttonProps))), close && (_jsx(SquareButton, { className: bannerClasses.closeSquareButton, css: css `
88
+ color: ${COLOR_PALETTE(theme, color).content};
89
89
  `, color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose, "aria-label": "\uB2EB\uAE30" }))] })));
90
90
  });
91
- const Icon = styled.div `
92
- display: flex;
93
- align-items: flex-start;
94
- padding: 12px 0px;
95
-
96
- svg {
97
- width: 20px;
98
- height: 20px;
99
- }
91
+ const Icon = styled.div `
92
+ display: flex;
93
+ align-items: flex-start;
94
+ padding: 12px 0px;
95
+
96
+ svg {
97
+ width: 20px;
98
+ height: 20px;
99
+ }
100
100
  `;
101
- const Headline = styled.div(({ theme }) => css `
102
- font-family: ${theme.fontFamily.ui};
103
- font-size: 16px;
104
- font-style: normal;
105
- font-weight: 700;
106
- line-height: 20px; /* 125% */
101
+ const Headline = styled.div(({ theme }) => css `
102
+ font-family: ${theme.fontFamily.ui};
103
+ font-size: 16px;
104
+ font-style: normal;
105
+ font-weight: 700;
106
+ line-height: 20px; /* 125% */
107
107
  `);
108
- const Content = styled.div(({ theme }) => css `
109
- font-family: ${theme.fontFamily.ui};
110
- font-size: 16px;
111
- font-style: normal;
112
- font-weight: 400;
113
- line-height: 24px; /* 150% */
108
+ const Content = styled.div(({ theme }) => css `
109
+ font-family: ${theme.fontFamily.ui};
110
+ font-size: 16px;
111
+ font-style: normal;
112
+ font-weight: 400;
113
+ line-height: 24px; /* 150% */
114
114
  `);
115
- const TextContainer = styled.div `
116
- flex: 1;
117
-
118
- display: flex;
119
- flex-direction: column;
120
- align-items: flex-start;
121
- padding: 12px;
122
- gap: 4px;
115
+ const TextContainer = styled.div `
116
+ flex: 1;
117
+
118
+ display: flex;
119
+ flex-direction: column;
120
+ align-items: flex-start;
121
+ padding: 12px;
122
+ gap: 4px;
123
123
  `;
@@ -15,10 +15,10 @@ export interface ProgressInfo {
15
15
  export interface BookProps {
16
16
  className?: string;
17
17
  /** 제목 영역 (하단에 노출되는) 텍스트 */
18
- title?: string;
18
+ title?: React.ReactNode;
19
19
  /** subtitle 영역 (상단) 텍스트 */
20
- subtitle?: string;
21
- /** subtitleBold 영역 (상단, subtitle 영역보다 1줄 낮음) */
20
+ subtitle?: React.ReactNode;
21
+ /** subtitleBold 영역 (상단, subtitle 영역보다 1줄 낮음) 텍스트 */
22
22
  subtitleBold?: React.ReactNode;
23
23
  /** 숨김 상태인지 여부 */
24
24
  isHidden?: boolean;
@@ -90,198 +90,197 @@ export const Book = forwardRef(function Book(props, ref) {
90
90
  setOpen(false);
91
91
  onHoverEnd === null || onHoverEnd === void 0 ? void 0 : onHoverEnd();
92
92
  }, children: [_jsxs(Cover, { className: bookClasses.cover, css: onCoverClick &&
93
- css `
94
- cursor: pointer;
93
+ css `
94
+ cursor: pointer;
95
95
  `, variants: coverMotion, onClick: () => {
96
96
  setOpen(!open);
97
97
  onCoverClick === null || onCoverClick === void 0 ? void 0 : onCoverClick();
98
- }, children: [icon && _jsx(CoverIcon, { children: icon }), isHidden && (_jsxs(_Fragment, { children: [_jsx(Hide, {}), _jsx(EyeOffFillIcon, { color: theme.color.foreground.neutralAlt, css: css `
99
- position: absolute;
100
- z-index: ${ZINDEX_HIDE};
101
- left: 50%;
102
- top: 50%;
103
- transform: translate(-50%, -50%);
104
- opacity: 0.8;
105
- ` })] })), _jsxs(CoverTexts, { variants: buttons ? textMotion : undefined, children: [tagsProps && tagsProps.length > 0 && (_jsx("div", { css: css `
106
- display: flex;
107
- gap: 4px;
108
- flex-wrap: wrap;
109
- `, children: tagsProps.map((tagProps) => (_jsx(Tag, Object.assign({}, tagProps), tagProps.label))) })), _jsx(Subtitle, { children: subtitle }), _jsx(Subtitle, { css: css `
110
- font-weight: 800;
111
- `, children: subtitleBold }), _jsx(CoverTitle, { showProgress: Boolean(progressInfo), children: title }), progressInfo && (_jsxs(Progress, { children: [_jsx("div", { className: bookClasses.progressText, children: progressInfo.title }), _jsxs("div", { css: css `
112
- display: flex;
113
- justify-content: space-between;
114
- align-items: center;
115
- `, children: [_jsx("div", { className: bookClasses.progressBase, css: css `
116
- overflow: hidden;
117
- width: 128px;
118
- height: 6px;
119
- border-radius: 3px;
120
- `, children: _jsx("div", { className: bookClasses.progressBar, css: css `
121
- width: ${progressInfo.value * 100}%;
122
- height: 6px;
123
- ` }) }), _jsxs("div", { className: bookClasses.progressText, css: css `
124
- width: 32px;
125
- display: flex;
126
- justify-content: center;
127
- align-items: center;
98
+ }, children: [icon && _jsx(CoverIcon, { children: icon }), isHidden && (_jsxs(_Fragment, { children: [_jsx(Hide, {}), _jsx(EyeOffFillIcon, { color: theme.color.foreground.neutralAlt, css: css `
99
+ position: absolute;
100
+ z-index: ${ZINDEX_HIDE};
101
+ left: 50%;
102
+ top: 50%;
103
+ transform: translate(-50%, -50%);
104
+ opacity: 0.8;
105
+ ` })] })), _jsxs(CoverTexts, { variants: buttons ? textMotion : undefined, children: [tagsProps && tagsProps.length > 0 && (_jsx("div", { css: css `
106
+ display: flex;
107
+ gap: 4px;
108
+ flex-wrap: wrap;
109
+ `, children: tagsProps.map((tagProps, index) => (_jsx(Tag, Object.assign({}, tagProps), index))) })), _jsx(Subtitle, { children: subtitle }), _jsx(Subtitle, { css: css `
110
+ font-weight: 800;
111
+ `, children: subtitleBold }), _jsx(CoverTitle, { showProgress: Boolean(progressInfo), children: title }), progressInfo && (_jsxs(Progress, { children: [_jsx("div", { className: bookClasses.progressText, children: progressInfo.title }), _jsxs("div", { css: css `
112
+ display: flex;
113
+ justify-content: space-between;
114
+ align-items: center;
115
+ `, children: [_jsx("div", { className: bookClasses.progressBase, css: css `
116
+ overflow: hidden;
117
+ width: 128px;
118
+ height: 6px;
119
+ border-radius: 3px;
120
+ `, children: _jsx("div", { className: bookClasses.progressBar, css: css `
121
+ width: ${progressInfo.value * 100}%;
122
+ height: 6px;
123
+ ` }) }), _jsxs("div", { className: bookClasses.progressText, css: css `
124
+ width: 32px;
125
+ display: flex;
126
+ justify-content: center;
127
+ align-items: center;
128
128
  `, children: [Math.round(progressInfo.value * 100), "%"] })] })] }))] }), _jsx(BookGradient, {}), _jsx(Buttons, { variants: buttonsMotion, onClick: (e) => {
129
129
  // Button 클릭 시에도 CoverClick 이벤트가 발생하지 않도록 막습니다.
130
130
  e.stopPropagation();
131
131
  }, children: buttons })] }), _jsx(Shelf, {})] }));
132
132
  });
133
- const Container = styled(motion.div) `
134
- position: relative;
135
-
136
- width: 200px;
137
- height: ${BOOK_HEIGHT + HOVER_Y_OFFSET + SHELF_HEIGHT + BOOK_SHELF_GAP}px;
138
-
139
- padding-top: ${HOVER_Y_OFFSET}px;
133
+ const Container = styled(motion.div) `
134
+ position: relative;
135
+
136
+ width: 200px;
137
+ height: ${BOOK_HEIGHT + HOVER_Y_OFFSET + SHELF_HEIGHT + BOOK_SHELF_GAP}px;
138
+
139
+ padding-top: ${HOVER_Y_OFFSET}px;
140
140
  `;
141
- const Cover = styled(motion.div) `
142
- height: ${BOOK_HEIGHT}px;
143
-
144
- border-radius: 8px;
145
- box-shadow: ${shadows.shadow04};
146
-
147
- display: flex;
148
- flex-direction: row;
149
- gap: 12px;
150
- overflow: hidden;
151
-
152
- position: relative;
153
- bottom: 0px;
154
- z-index: ${ZINDEX_COVER};
141
+ const Cover = styled(motion.div) `
142
+ height: ${BOOK_HEIGHT}px;
143
+
144
+ border-radius: 8px;
145
+ box-shadow: ${shadows.shadow04};
146
+
147
+ display: flex;
148
+ flex-direction: row;
149
+ gap: 12px;
150
+ overflow: hidden;
151
+
152
+ position: relative;
153
+ bottom: 0px;
154
+ z-index: ${ZINDEX_COVER};
155
155
  `;
156
- const CoverTexts = styled(motion.div) `
157
- width: 100%;
158
- height: 100%;
159
- padding: 12px 12px 12px 24px;
160
-
161
- position: absolute;
162
- top: 0;
163
- left: 0;
164
- z-index: ${ZINDEX_TEXT};
165
-
166
- display: flex;
167
- flex-direction: column;
168
- gap: 4px;
156
+ const CoverTexts = styled(motion.div) `
157
+ width: 100%;
158
+ height: 100%;
159
+ padding: 12px 12px 12px 24px;
160
+
161
+ position: absolute;
162
+ top: 0;
163
+ left: 0;
164
+ z-index: ${ZINDEX_TEXT};
165
+
166
+ display: flex;
167
+ flex-direction: column;
168
+ gap: 4px;
169
169
  `;
170
170
  const CoverTitle = styled("h1", {
171
171
  shouldForwardProp: (prop) => prop !== "showProgress",
172
- })(({ theme, showProgress }) => css `
173
- word-wrap: break-word;
174
- word-break: keep-all;
175
-
176
- margin: auto 0 ${showProgress ? "4px" : "8px"} 0;
177
- color: ${CARD_COLOR_PALETTE(theme).text};
178
-
179
- /* Alt/Paragraph/16px-Eb */
180
- font-family: ${theme.fontFamily.title};
181
- font-size: 16px;
182
- font-style: normal;
183
- font-weight: 800;
184
- line-height: 24px;
185
-
186
- /* multiline 말줄임말 적용 css */
187
- overflow: hidden;
188
- text-overflow: ellipsis;
189
- display: -webkit-box;
190
- -webkit-line-clamp: 7;
191
- -webkit-box-orient: vertical;
172
+ })(({ theme, showProgress }) => css `
173
+ word-wrap: break-word;
174
+ word-break: keep-all;
175
+
176
+ margin: auto 0 ${showProgress ? "4px" : "8px"} 0;
177
+ color: ${CARD_COLOR_PALETTE(theme).text};
178
+
179
+ /* Alt/Paragraph/16px-Eb */
180
+ font-family: ${theme.fontFamily.title};
181
+ font-size: 16px;
182
+ font-style: normal;
183
+ font-weight: 800;
184
+ line-height: 24px;
185
+
186
+ /* multiline 말줄임말 적용 css */
187
+ overflow: hidden;
188
+ text-overflow: ellipsis;
189
+ display: -webkit-box;
190
+ -webkit-line-clamp: 7;
191
+ -webkit-box-orient: vertical;
192
192
  `);
193
- const BookGradient = styled.div `
194
- width: 200px;
195
- height: ${BOOK_HEIGHT}px;
196
- background:
197
- linear-gradient(
198
- 180deg,
199
- rgba(255, 255, 255, 0) 0%,
200
- rgba(0, 0, 0, 0.75) 100%
201
- ),
202
- linear-gradient(
203
- 90deg,
204
- #999 0%,
205
- #fbfbfb 2%,
206
- #fbfbfb 4%,
207
- #cdcdcd 6%,
208
- #fbfbfb 10%,
209
- #fbfbfb 100%
210
- );
211
- mix-blend-mode: multiply;
212
-
213
- position: absolute;
214
- top: 0;
215
- left: 0;
216
- border-radius: 8px;
217
- z-index: ${ZINDEX_COVER};
193
+ const BookGradient = styled.div `
194
+ width: 200px;
195
+ height: ${BOOK_HEIGHT}px;
196
+ background: linear-gradient(
197
+ 180deg,
198
+ rgba(255, 255, 255, 0) 0%,
199
+ rgba(0, 0, 0, 0.75) 100%
200
+ ),
201
+ linear-gradient(
202
+ 90deg,
203
+ #999 0%,
204
+ #fbfbfb 2%,
205
+ #fbfbfb 4%,
206
+ #cdcdcd 6%,
207
+ #fbfbfb 10%,
208
+ #fbfbfb 100%
209
+ );
210
+ mix-blend-mode: multiply;
211
+
212
+ position: absolute;
213
+ top: 0;
214
+ left: 0;
215
+ border-radius: 8px;
216
+ z-index: ${ZINDEX_COVER};
218
217
  `;
219
- const Progress = styled.div(({ theme }) => css `
220
- display: flex;
221
- flex-direction: column;
222
- height: 32px;
223
-
224
- /* Default/Label/12px-Md */
225
- font-family: ${theme.fontFamily.ui};
226
- font-size: 12px;
227
- font-style: normal;
228
- font-weight: 500;
229
- line-height: 16px; /* 133.333% */
218
+ const Progress = styled.div(({ theme }) => css `
219
+ display: flex;
220
+ flex-direction: column;
221
+ height: 32px;
222
+
223
+ /* Default/Label/12px-Md */
224
+ font-family: ${theme.fontFamily.ui};
225
+ font-size: 12px;
226
+ font-style: normal;
227
+ font-weight: 500;
228
+ line-height: 16px; /* 133.333% */
230
229
  `);
231
- const Buttons = styled(motion.div) `
232
- display: flex;
233
- gap: 8px;
234
- width: 100%;
235
- padding: 0 12px 0 24px;
236
-
237
- position: absolute;
238
- bottom: 12px;
239
- z-index: ${ZINDEX_BUTTONS};
230
+ const Buttons = styled(motion.div) `
231
+ display: flex;
232
+ gap: 8px;
233
+ width: 100%;
234
+ padding: 0 12px 0 24px;
235
+
236
+ position: absolute;
237
+ bottom: 12px;
238
+ z-index: ${ZINDEX_BUTTONS};
240
239
  `;
241
- const Shelf = styled.div(({ theme }) => css `
242
- height: ${SHELF_HEIGHT}px;
243
- width: calc(100% + 32px);
244
- border-radius: 4px;
245
- background: ${theme.color.background.neutralAltActive};
246
-
247
- position: absolute;
248
- bottom: 0px;
249
- left: -16px;
240
+ const Shelf = styled.div(({ theme }) => css `
241
+ height: ${SHELF_HEIGHT}px;
242
+ width: calc(100% + 32px);
243
+ border-radius: 4px;
244
+ background: ${theme.color.background.neutralAltActive};
245
+
246
+ position: absolute;
247
+ bottom: 0px;
248
+ left: -16px;
250
249
  `);
251
- const Hide = styled.div(({ theme }) => css `
252
- position: absolute;
253
- left: 0;
254
- top: 0;
255
-
256
- width: 100%;
257
- height: 100%;
258
-
259
- background: ${theme.color.blanket.neutral};
260
- border-radius: 8px;
261
-
262
- z-index: ${ZINDEX_HIDE};
250
+ const Hide = styled.div(({ theme }) => css `
251
+ position: absolute;
252
+ left: 0;
253
+ top: 0;
254
+
255
+ width: 100%;
256
+ height: 100%;
257
+
258
+ background: ${theme.color.blanket.neutral};
259
+ border-radius: 8px;
260
+
261
+ z-index: ${ZINDEX_HIDE};
263
262
  `);
264
- const Subtitle = styled.div(({ theme }) => css `
265
- color: ${CARD_COLOR_PALETTE(theme).text};
266
-
267
- /* Default/Label/12px-Md */
268
- font-family: ${theme.fontFamily.ui};
269
- font-size: 12px;
270
- font-style: normal;
271
- font-weight: 500;
272
- line-height: 16px; /* 133.333% */
263
+ const Subtitle = styled.div(({ theme }) => css `
264
+ color: ${CARD_COLOR_PALETTE(theme).text};
265
+
266
+ /* Default/Label/12px-Md */
267
+ font-family: ${theme.fontFamily.ui};
268
+ font-size: 12px;
269
+ font-style: normal;
270
+ font-weight: 500;
271
+ line-height: 16px; /* 133.333% */
273
272
  `);
274
- const CoverIcon = styled.div(({ theme }) => css `
275
- position: absolute;
276
- top: 50%;
277
- left: 100px;
278
- transform: translateY(-50%);
279
-
280
- svg {
281
- width: 120px;
282
- height: 120px;
283
- color: ${theme.color.blanket.neutral};
284
- }
285
-
286
- z-index: ${ZINDEX_ICON};
273
+ const CoverIcon = styled.div(({ theme }) => css `
274
+ position: absolute;
275
+ top: 50%;
276
+ left: 100px;
277
+ transform: translateY(-50%);
278
+
279
+ svg {
280
+ width: 120px;
281
+ height: 120px;
282
+ color: ${theme.color.blanket.neutral};
283
+ }
284
+
285
+ z-index: ${ZINDEX_ICON};
287
286
  `);