@team-monolith/cds 1.103.1 → 1.103.3

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 -33
  8. package/dist/components/AnimatedButton.js +32 -32
  9. package/dist/components/Banner.js +51 -51
  10. package/dist/components/Book/Book.js +175 -179
  11. package/dist/components/Button.js +179 -179
  12. package/dist/components/CheckboxInput.js +100 -100
  13. package/dist/components/FileTypeAlertDialog.js +4 -4
  14. package/dist/components/Input.js +53 -53
  15. package/dist/components/InputBase.js +72 -72
  16. package/dist/components/Modal.js +4 -4
  17. package/dist/components/OverflowTooltip.js +4 -4
  18. package/dist/components/Pagination.js +56 -56
  19. package/dist/components/PinInput.js +64 -64
  20. package/dist/components/Popover.js +27 -27
  21. package/dist/components/RadioInput.js +73 -73
  22. package/dist/components/SquareButton.js +109 -109
  23. package/dist/components/Switch.js +69 -69
  24. package/dist/components/SwitchButton.js +107 -107
  25. package/dist/components/Tag.js +68 -68
  26. package/dist/components/Tooltip.js +19 -19
  27. package/dist/foundation/breakpoints.js +16 -16
  28. package/dist/icons/custom/colored/ai-helper.svg +4 -4
  29. package/dist/icons/custom/colored/ai-quiz-color.svg +20 -20
  30. package/dist/icons/custom/colored/badge-color.svg +4 -4
  31. package/dist/icons/custom/colored/badge-gold.svg +11 -11
  32. package/dist/icons/custom/colored/badge-green.svg +11 -11
  33. package/dist/icons/custom/colored/badge-silver.svg +11 -11
  34. package/dist/icons/custom/colored/basic-plus.svg +31 -31
  35. package/dist/icons/custom/colored/basic.svg +3 -3
  36. package/dist/icons/custom/colored/board-color.svg +5 -5
  37. package/dist/icons/custom/colored/cast-cloudy-color.svg +6 -6
  38. package/dist/icons/custom/colored/cast-partly-color.svg +7 -7
  39. package/dist/icons/custom/colored/cast-rainbow-color.svg +13 -13
  40. package/dist/icons/custom/colored/cast-sunny-color.svg +4 -4
  41. package/dist/icons/custom/colored/clap-bronze.svg +8 -8
  42. package/dist/icons/custom/colored/clap-gold.svg +8 -8
  43. package/dist/icons/custom/colored/clap-silver.svg +8 -8
  44. package/dist/icons/custom/colored/class.svg +13 -13
  45. package/dist/icons/custom/colored/codap-color.svg +13 -13
  46. package/dist/icons/custom/colored/ebook-color.svg +5 -5
  47. package/dist/icons/custom/colored/embedded-color.svg +38 -38
  48. package/dist/icons/custom/colored/emo-clap-color.svg +252 -252
  49. package/dist/icons/custom/colored/emo-good-color.svg +68 -68
  50. package/dist/icons/custom/colored/emo-great-color.svg +67 -67
  51. package/dist/icons/custom/colored/emo-heart-color.svg +239 -239
  52. package/dist/icons/custom/colored/emo-hundred-color.svg +194 -194
  53. package/dist/icons/custom/colored/emo-neutral-color.svg +76 -76
  54. package/dist/icons/custom/colored/emo-stars-color.svg +121 -121
  55. package/dist/icons/custom/colored/emo-thumbup-color.svg +238 -238
  56. package/dist/icons/custom/colored/empty.svg +1 -1
  57. package/dist/icons/custom/colored/entry-color.svg +4 -4
  58. package/dist/icons/custom/colored/filename-all-color.svg +4 -4
  59. package/dist/icons/custom/colored/filename-doc-color.svg +5 -5
  60. package/dist/icons/custom/colored/filename-hwp-color.svg +6 -6
  61. package/dist/icons/custom/colored/filename-img-color.svg +6 -6
  62. package/dist/icons/custom/colored/filename-mp4-color.svg +5 -5
  63. package/dist/icons/custom/colored/filename-pdf-color.svg +12 -12
  64. package/dist/icons/custom/colored/filename-ppt-color.svg +6 -6
  65. package/dist/icons/custom/colored/filename-xls-color.svg +5 -5
  66. package/dist/icons/custom/colored/filename-zip-color.svg +5 -5
  67. package/dist/icons/custom/colored/google.svg +13 -13
  68. package/dist/icons/custom/colored/hand-fill.svg +4 -4
  69. package/dist/icons/custom/colored/judge-color.svg +6 -6
  70. package/dist/icons/custom/colored/makecode-color.svg +4 -4
  71. package/dist/icons/custom/colored/master.svg +12 -12
  72. package/dist/icons/custom/colored/material.svg +6 -6
  73. package/dist/icons/custom/colored/medal-bronze.svg +9 -9
  74. package/dist/icons/custom/colored/medal-gold.svg +9 -9
  75. package/dist/icons/custom/colored/medal-silver.svg +9 -9
  76. package/dist/icons/custom/colored/pro.svg +4 -4
  77. package/dist/icons/custom/colored/problem.svg +7 -7
  78. package/dist/icons/custom/colored/python-color.svg +4 -4
  79. package/dist/icons/custom/colored/quiz-color.svg +12 -12
  80. package/dist/icons/custom/colored/resource-color.svg +13 -13
  81. package/dist/icons/custom/colored/scratch-color.svg +6 -6
  82. package/dist/icons/custom/colored/type-helper.svg +9 -9
  83. package/dist/icons/custom/colored/whale.svg +7 -7
  84. package/dist/icons/custom/colored/worksheet-color.svg +5 -5
  85. package/dist/icons/custom/default/ai-quiz.svg +8 -8
  86. package/dist/icons/custom/default/badge.svg +4 -4
  87. package/dist/icons/custom/default/board.svg +5 -5
  88. package/dist/icons/custom/default/cast-cloudy.svg +3 -3
  89. package/dist/icons/custom/default/cast-partly.svg +4 -4
  90. package/dist/icons/custom/default/cast-rainbow.svg +12 -12
  91. package/dist/icons/custom/default/cast-sunny.svg +3 -3
  92. package/dist/icons/custom/default/codap.svg +11 -11
  93. package/dist/icons/custom/default/ebook.svg +3 -3
  94. package/dist/icons/custom/default/embedded.svg +4 -4
  95. package/dist/icons/custom/default/emo-clap.svg +6 -6
  96. package/dist/icons/custom/default/emo-good.svg +12 -12
  97. package/dist/icons/custom/default/emo-great.svg +12 -12
  98. package/dist/icons/custom/default/emo-heart.svg +5 -5
  99. package/dist/icons/custom/default/emo-hundred.svg +3 -3
  100. package/dist/icons/custom/default/emo-neutral.svg +14 -14
  101. package/dist/icons/custom/default/emo-stars.svg +14 -14
  102. package/dist/icons/custom/default/emo-thumbup.svg +3 -3
  103. package/dist/icons/custom/default/entry.svg +4 -4
  104. package/dist/icons/custom/default/fab.svg +10 -10
  105. package/dist/icons/custom/default/grant-alt.svg +5 -5
  106. package/dist/icons/custom/default/grant.svg +4 -4
  107. package/dist/icons/custom/default/hand-line.svg +3 -3
  108. package/dist/icons/custom/default/judge.svg +3 -3
  109. package/dist/icons/custom/default/makecode.svg +5 -5
  110. package/dist/icons/custom/default/pdf.svg +3 -3
  111. package/dist/icons/custom/default/python.svg +7 -7
  112. package/dist/icons/custom/default/quiz.svg +4 -4
  113. package/dist/icons/custom/default/resource.svg +11 -11
  114. package/dist/icons/custom/default/scratch.svg +3 -3
  115. package/dist/icons/custom/default/scroll-alt.svg +5 -5
  116. package/dist/icons/custom/default/scroll-fill.svg +4 -4
  117. package/dist/icons/custom/default/scroll-line.svg +5 -5
  118. package/dist/icons/custom/default/symbol.svg +4 -4
  119. package/dist/icons/custom/default/worksheet.svg +4 -4
  120. package/dist/icons/custom/svgrColoredTemplate.js +26 -26
  121. package/dist/icons/custom/svgrDefaultTemplate.js +26 -26
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.js +1 -1
  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
  `;
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/reac
2
2
  /** @jsxImportSource @emotion/react */
3
3
  import { css, useTheme } from "@emotion/react";
4
4
  import styled from "@emotion/styled";
5
- import React, { forwardRef, useState } from "react";
5
+ import { forwardRef, useState } from "react";
6
6
  import { shadows } from "../../foundation/shadows";
7
7
  import { EyeOffFillIcon } from "../../icons";
8
8
  import { motion } from "framer-motion";
@@ -90,202 +90,198 @@ 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 === null || subtitleBold === void 0 ? void 0 : subtitleBold.split(" | ").map((text, index) => {
112
- if (index === 0)
113
- return _jsx("span", { children: text }, text);
114
- return (_jsxs(React.Fragment, { children: [" ", "| ", _jsx("span", { children: text })] }, text));
115
- }) }), _jsx(CoverTitle, { showProgress: Boolean(progressInfo), children: title }), progressInfo && (_jsxs(Progress, { children: [_jsx("div", { className: bookClasses.progressText, children: progressInfo.title }), _jsxs("div", { css: css `
116
- display: flex;
117
- justify-content: space-between;
118
- align-items: center;
119
- `, children: [_jsx("div", { className: bookClasses.progressBase, css: css `
120
- overflow: hidden;
121
- width: 128px;
122
- height: 6px;
123
- border-radius: 3px;
124
- `, children: _jsx("div", { className: bookClasses.progressBar, css: css `
125
- width: ${progressInfo.value * 100}%;
126
- height: 6px;
127
- ` }) }), _jsxs("div", { className: bookClasses.progressText, css: css `
128
- width: 32px;
129
- display: flex;
130
- justify-content: center;
131
- 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) => (_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;
132
128
  `, children: [Math.round(progressInfo.value * 100), "%"] })] })] }))] }), _jsx(BookGradient, {}), _jsx(Buttons, { variants: buttonsMotion, onClick: (e) => {
133
129
  // Button 클릭 시에도 CoverClick 이벤트가 발생하지 않도록 막습니다.
134
130
  e.stopPropagation();
135
131
  }, children: buttons })] }), _jsx(Shelf, {})] }));
136
132
  });
137
- const Container = styled(motion.div) `
138
- position: relative;
139
-
140
- width: 200px;
141
- height: ${BOOK_HEIGHT + HOVER_Y_OFFSET + SHELF_HEIGHT + BOOK_SHELF_GAP}px;
142
-
143
- 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;
144
140
  `;
145
- const Cover = styled(motion.div) `
146
- height: ${BOOK_HEIGHT}px;
147
-
148
- border-radius: 8px;
149
- box-shadow: ${shadows.shadow04};
150
-
151
- display: flex;
152
- flex-direction: row;
153
- gap: 12px;
154
- overflow: hidden;
155
-
156
- position: relative;
157
- bottom: 0px;
158
- 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};
159
155
  `;
160
- const CoverTexts = styled(motion.div) `
161
- width: 100%;
162
- height: 100%;
163
- padding: 12px 12px 12px 24px;
164
-
165
- position: absolute;
166
- top: 0;
167
- left: 0;
168
- z-index: ${ZINDEX_TEXT};
169
-
170
- display: flex;
171
- flex-direction: column;
172
- 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;
173
169
  `;
174
170
  const CoverTitle = styled("h1", {
175
171
  shouldForwardProp: (prop) => prop !== "showProgress",
176
- })(({ theme, showProgress }) => css `
177
- word-wrap: break-word;
178
- word-break: keep-all;
179
-
180
- margin: auto 0 ${showProgress ? "4px" : "8px"} 0;
181
- color: ${CARD_COLOR_PALETTE(theme).text};
182
-
183
- /* Alt/Paragraph/16px-Eb */
184
- font-family: ${theme.fontFamily.title};
185
- font-size: 16px;
186
- font-style: normal;
187
- font-weight: 800;
188
- line-height: 24px;
189
-
190
- /* multiline 말줄임말 적용 css */
191
- overflow: hidden;
192
- text-overflow: ellipsis;
193
- display: -webkit-box;
194
- -webkit-line-clamp: 7;
195
- -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;
196
192
  `);
197
- const BookGradient = styled.div `
198
- width: 200px;
199
- height: ${BOOK_HEIGHT}px;
200
- background:
201
- linear-gradient(
202
- 180deg,
203
- rgba(255, 255, 255, 0) 0%,
204
- rgba(0, 0, 0, 0.75) 100%
205
- ),
206
- linear-gradient(
207
- 90deg,
208
- #999 0%,
209
- #fbfbfb 2%,
210
- #fbfbfb 4%,
211
- #cdcdcd 6%,
212
- #fbfbfb 10%,
213
- #fbfbfb 100%
214
- );
215
- mix-blend-mode: multiply;
216
-
217
- position: absolute;
218
- top: 0;
219
- left: 0;
220
- border-radius: 8px;
221
- z-index: ${ZINDEX_COVER};
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};
222
218
  `;
223
- const Progress = styled.div(({ theme }) => css `
224
- display: flex;
225
- flex-direction: column;
226
- height: 32px;
227
-
228
- /* Default/Label/12px-Md */
229
- font-family: ${theme.fontFamily.ui};
230
- font-size: 12px;
231
- font-style: normal;
232
- font-weight: 500;
233
- line-height: 16px; /* 133.333% */
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% */
234
230
  `);
235
- const Buttons = styled(motion.div) `
236
- display: flex;
237
- gap: 8px;
238
- width: 100%;
239
- padding: 0 12px 0 24px;
240
-
241
- position: absolute;
242
- bottom: 12px;
243
- z-index: ${ZINDEX_BUTTONS};
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};
244
240
  `;
245
- const Shelf = styled.div(({ theme }) => css `
246
- height: ${SHELF_HEIGHT}px;
247
- width: calc(100% + 32px);
248
- border-radius: 4px;
249
- background: ${theme.color.background.neutralAltActive};
250
-
251
- position: absolute;
252
- bottom: 0px;
253
- left: -16px;
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;
254
250
  `);
255
- const Hide = styled.div(({ theme }) => css `
256
- position: absolute;
257
- left: 0;
258
- top: 0;
259
-
260
- width: 100%;
261
- height: 100%;
262
-
263
- background: ${theme.color.blanket.neutral};
264
- border-radius: 8px;
265
-
266
- z-index: ${ZINDEX_HIDE};
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};
267
263
  `);
268
- const Subtitle = styled.div(({ theme }) => css `
269
- color: ${CARD_COLOR_PALETTE(theme).text};
270
-
271
- /* Default/Label/12px-Md */
272
- font-family: ${theme.fontFamily.ui};
273
- font-size: 12px;
274
- font-style: normal;
275
- font-weight: 500;
276
- line-height: 16px; /* 133.333% */
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% */
277
273
  `);
278
- const CoverIcon = styled.div(({ theme }) => css `
279
- position: absolute;
280
- top: 50%;
281
- left: 100px;
282
- transform: translateY(-50%);
283
-
284
- svg {
285
- width: 120px;
286
- height: 120px;
287
- color: ${theme.color.blanket.neutral};
288
- }
289
-
290
- z-index: ${ZINDEX_ICON};
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};
291
287
  `);