@team-monolith/cds 1.76.1 → 1.76.2
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.
- package/@types/emotion.d.ts +14 -14
- package/dist/CdsProvider.js +28 -28
- package/dist/components/Book/Book.d.ts +11 -1
- package/dist/components/Book/Book.js +29 -6
- package/package.json +1 -1
package/@types/emotion.d.ts
CHANGED
|
@@ -120,20 +120,20 @@ interface CodleColors {
|
|
|
120
120
|
decorativeSilver: string;
|
|
121
121
|
decorativeGray: string;
|
|
122
122
|
decorativeBlack: string;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
123
|
+
decorativeRedContainer: string;
|
|
124
|
+
decorativeRedOnContainer: string;
|
|
125
|
+
decorativeIndigoContainer: string;
|
|
126
|
+
decorativeIndigoOnContainer: string;
|
|
127
|
+
decorativeGreenContainer: string;
|
|
128
|
+
decorativeGreenOnContainer: string;
|
|
129
|
+
decorativePurpleContainer: string;
|
|
130
|
+
decorativePurpleOnContainer: string;
|
|
131
|
+
decorativeGoldContainer: string;
|
|
132
|
+
decorativeGoldOnContainer: string;
|
|
133
|
+
decorativeGrayContainer: string;
|
|
134
|
+
decorativeGrayOnContainer: string;
|
|
135
|
+
decorativeBlackContainer: string;
|
|
136
|
+
decorativeBlackOnContainer: string;
|
|
137
137
|
};
|
|
138
138
|
blanket: {
|
|
139
139
|
neutral: string;
|
package/dist/CdsProvider.js
CHANGED
|
@@ -125,20 +125,20 @@ export const light = {
|
|
|
125
125
|
decorativeSilver: "#6A7781",
|
|
126
126
|
decorativeGray: "#747474",
|
|
127
127
|
decorativeBlack: "#474658",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
decorativeRedContainer: "#FFCDD7",
|
|
129
|
+
decorativeRedOnContainer: "#FE5375",
|
|
130
|
+
decorativeIndigoContainer: "#CED1FF",
|
|
131
|
+
decorativeIndigoOnContainer: "#8088FF",
|
|
132
|
+
decorativeGreenContainer: "#BCF1D1",
|
|
133
|
+
decorativeGreenOnContainer: "#4AC078",
|
|
134
|
+
decorativePurpleContainer: "#E5CAEF",
|
|
135
|
+
decorativePurpleOnContainer: "#C673E4",
|
|
136
|
+
decorativeGoldContainer: "#E3D7C2",
|
|
137
|
+
decorativeGoldOnContainer: "#B09666",
|
|
138
|
+
decorativeGrayContainer: "#D6D6D6",
|
|
139
|
+
decorativeGrayOnContainer: "#969696",
|
|
140
|
+
decorativeBlackContainer: "#CAC8D8",
|
|
141
|
+
decorativeBlackOnContainer: "#474658",
|
|
142
142
|
},
|
|
143
143
|
blanket: {
|
|
144
144
|
neutral: COLOR.alpha030,
|
|
@@ -270,20 +270,20 @@ export const dark = {
|
|
|
270
270
|
decorativeSilver: "#6A7781",
|
|
271
271
|
decorativeGray: "#747474",
|
|
272
272
|
decorativeBlack: "#474658",
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
273
|
+
decorativeRedContainer: "#FFCDD7",
|
|
274
|
+
decorativeRedOnContainer: "#FE5375",
|
|
275
|
+
decorativeIndigoContainer: "#CED1FF",
|
|
276
|
+
decorativeIndigoOnContainer: "#8088FF",
|
|
277
|
+
decorativeGreenContainer: "#BCF1D1",
|
|
278
|
+
decorativeGreenOnContainer: "#4AC078",
|
|
279
|
+
decorativePurpleContainer: "#E5CAEF",
|
|
280
|
+
decorativePurpleOnContainer: "#C673E4",
|
|
281
|
+
decorativeGoldContainer: "#E3D7C2",
|
|
282
|
+
decorativeGoldOnContainer: "#B09666",
|
|
283
|
+
decorativeGrayContainer: "#D6D6D6",
|
|
284
|
+
decorativeGrayOnContainer: "#969696",
|
|
285
|
+
decorativeBlackContainer: "#CAC8D8",
|
|
286
|
+
decorativeBlackOnContainer: "#474658",
|
|
287
287
|
},
|
|
288
288
|
blanket: {
|
|
289
289
|
neutral: COLOR.alphaf20,
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export interface progressInfo {
|
|
3
|
+
/** 프로그레스 바 상단에 표시되는 텍스트 */
|
|
4
|
+
progressTitle: string;
|
|
5
|
+
/** 프로그레스 바 진행도 (0 ~ 1 사이 숫자) */
|
|
6
|
+
progressValue: number;
|
|
7
|
+
/** 프로그레스 바 배경 및 텍스트 색상 */
|
|
8
|
+
progressBaseColor: string;
|
|
9
|
+
/** 프로그레스 바 진행도 색상 */
|
|
10
|
+
progressBarColor: string;
|
|
11
|
+
}
|
|
2
12
|
export interface BookProps {
|
|
3
13
|
className?: string;
|
|
4
14
|
/** 제목 영역 (하단에 노출되는) 텍스트 */
|
|
@@ -24,7 +34,7 @@ export interface BookProps {
|
|
|
24
34
|
/** 커버 색상 */
|
|
25
35
|
coverColor: string;
|
|
26
36
|
/** 진행도 프로그레스 바 영역 */
|
|
27
|
-
progress?:
|
|
37
|
+
progress?: progressInfo;
|
|
28
38
|
}
|
|
29
39
|
declare const _default: React.ForwardRefExoticComponent<BookProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
40
|
export default _default;
|
|
@@ -97,7 +97,30 @@ function Book(props, ref) {
|
|
|
97
97
|
opacity: 0.8;
|
|
98
98
|
` })] })), _jsxs(CoverTexts, Object.assign({ variants: buttons ? textMotion : undefined }, { children: [_jsx(Subtitle, { children: subtitle }), _jsx(Subtitle, Object.assign({ css: css `
|
|
99
99
|
font-weight: 800;
|
|
100
|
-
` }, { children: subtitleBold })), _jsx(CoverTitle, Object.assign({ showProgress:
|
|
100
|
+
` }, { children: subtitleBold })), _jsx(CoverTitle, Object.assign({ showProgress: Boolean(progress) }, { children: title })), progress &&
|
|
101
|
+
_jsxs(Progress, { children: [_jsx("div", Object.assign({ css: css `
|
|
102
|
+
color: ${progress.progressBaseColor};
|
|
103
|
+
` }, { children: progress.progressTitle })), _jsxs("div", Object.assign({ css: css `
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
align-items: center;
|
|
107
|
+
` }, { children: [_jsx("div", Object.assign({ css: css `
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
background-color: ${progress.progressBaseColor};
|
|
110
|
+
width: 128px;
|
|
111
|
+
height: 6px;
|
|
112
|
+
border-radius: 3px;
|
|
113
|
+
` }, { children: _jsx("div", { css: css `
|
|
114
|
+
background-color: ${progress.progressBarColor};
|
|
115
|
+
width: ${progress.progressValue * 100}%;
|
|
116
|
+
height: 6px;
|
|
117
|
+
` }) })), _jsxs("div", Object.assign({ css: css `
|
|
118
|
+
color: ${progress.progressBaseColor};
|
|
119
|
+
width: 32px;
|
|
120
|
+
display: flex;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
align-items: center;
|
|
123
|
+
` }, { children: [Math.round(progress.progressValue * 100), "%"] }))] }))] })] })), _jsx(BookGradient, {}), _jsx(Buttons, Object.assign({ variants: buttonsMotion, onClick: (e) => {
|
|
101
124
|
// Button 클릭 시에도 CoverClick 이벤트가 발생하지 않도록 막습니다.
|
|
102
125
|
e.stopPropagation();
|
|
103
126
|
} }, { children: buttons }))] })), _jsx(Shelf, {})] })));
|
|
@@ -143,12 +166,13 @@ const CoverTexts = styled(motion.div) `
|
|
|
143
166
|
flex-direction: column;
|
|
144
167
|
gap: 4px;
|
|
145
168
|
`;
|
|
146
|
-
const CoverTitle = styled
|
|
147
|
-
|
|
169
|
+
const CoverTitle = styled("h1", {
|
|
170
|
+
shouldForwardProp: (prop) => prop !== "showProgress",
|
|
171
|
+
})(({ theme, showProgress }) => css `
|
|
148
172
|
word-wrap: break-word;
|
|
149
173
|
word-break: keep-all;
|
|
150
174
|
|
|
151
|
-
margin: auto 0 ${showProgress ?
|
|
175
|
+
margin: auto 0 ${showProgress ? "4px" : "8px"} 0;
|
|
152
176
|
color: ${CARD_COLOR_PALETTE(theme).text};
|
|
153
177
|
|
|
154
178
|
/* Alt/Paragraph/16px-Eb */
|
|
@@ -164,8 +188,7 @@ const CoverTitle = styled.h1 `
|
|
|
164
188
|
display: -webkit-box;
|
|
165
189
|
-webkit-line-clamp: 7;
|
|
166
190
|
-webkit-box-orient: vertical;
|
|
167
|
-
`
|
|
168
|
-
`;
|
|
191
|
+
`);
|
|
169
192
|
const BookGradient = styled.div `
|
|
170
193
|
width: 200px;
|
|
171
194
|
height: ${BOOK_HEIGHT}px;
|