@edu-tosel/design 1.0.189 → 1.0.190
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/_test/interface/Property.d.ts +1 -1
- package/_test/interface/Property.js +1 -1
- package/layout/template/Books/SectionA.js +97 -86
- package/layout/template/Legacy/Table.js +2 -2
- package/layout/template/Transcript/design/Transcript.d.ts +1 -1
- package/layout/template/Transcript/design/atom/LevelToStyleMap.js +1 -1
- package/layout/template/Transcript/design/molecule/LevelIndex.js +1 -1
- package/package.json +1 -1
- package/version.txt +1 -1
|
@@ -5,7 +5,70 @@ import ScrollTrigger from "gsap/ScrollTrigger";
|
|
|
5
5
|
import { cn } from "../../../util";
|
|
6
6
|
import { useResponsive } from "../../../hook";
|
|
7
7
|
gsap.registerPlugin(ScrollTrigger);
|
|
8
|
+
const bookData = [
|
|
9
|
+
{
|
|
10
|
+
id: 1,
|
|
11
|
+
type: "학습 시리즈",
|
|
12
|
+
title: "Reading Series",
|
|
13
|
+
imgSrc: "https://resource.tosel.co.kr/images/book_mockup_RD_HJ1.png",
|
|
14
|
+
description: "Reading 학습을 위한 토셀의 학습 시리즈입니다. 독해 & 실용문 연습을 위한 지문과 Comprehension 문항이 수록되어, 이해도 확인 및 정확한 진단이 가능합니다. 숙지한 독해 지문을 원어민 음성으로 들으며 리딩을 위한 완벽한 학습 커리큘럼을 마련해보세요.",
|
|
15
|
+
levelLow: "PS",
|
|
16
|
+
levelHigh: "HJ",
|
|
17
|
+
link: "",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 2,
|
|
21
|
+
type: "학습 시리즈",
|
|
22
|
+
title: "Story Series",
|
|
23
|
+
imgSrc: "https://resource.tosel.co.kr/images/book_mockup_RD_BA2.png",
|
|
24
|
+
description: "이야기 지문과 단어를 함께 연결지어 학생들의 독해 능력을 평가dfsdfsdf",
|
|
25
|
+
levelLow: "PS",
|
|
26
|
+
levelHigh: "JR",
|
|
27
|
+
link: "",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 3,
|
|
31
|
+
type: "학습 시리즈",
|
|
32
|
+
title: "Listening Series",
|
|
33
|
+
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
34
|
+
description: "어쩌",
|
|
35
|
+
levelLow: "PS",
|
|
36
|
+
levelHigh: "HJ",
|
|
37
|
+
link: "",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 4,
|
|
41
|
+
type: "학습 시리즈",
|
|
42
|
+
title: "Reading Series",
|
|
43
|
+
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
44
|
+
description: "어쩌",
|
|
45
|
+
levelLow: "PS",
|
|
46
|
+
levelHigh: "HJ",
|
|
47
|
+
link: "",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 5,
|
|
51
|
+
type: "학습 시리즈",
|
|
52
|
+
title: "Grammar Series",
|
|
53
|
+
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
54
|
+
description: "어쩌",
|
|
55
|
+
levelLow: "PS",
|
|
56
|
+
levelHigh: "HJ",
|
|
57
|
+
link: "",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 6,
|
|
61
|
+
type: "학습 시리즈",
|
|
62
|
+
title: "VOCA Series",
|
|
63
|
+
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
64
|
+
description: "어쩌",
|
|
65
|
+
levelLow: "PS",
|
|
66
|
+
levelHigh: "HJ",
|
|
67
|
+
link: "",
|
|
68
|
+
},
|
|
69
|
+
];
|
|
8
70
|
let divIndex = 0;
|
|
71
|
+
const bookNumber = bookData.length;
|
|
9
72
|
export default function SectionA() {
|
|
10
73
|
const stickyRef = useRef(null);
|
|
11
74
|
const bookRef = useRef(null);
|
|
@@ -16,17 +79,15 @@ export default function SectionA() {
|
|
|
16
79
|
const bookScrollRef = useRef(null);
|
|
17
80
|
const refs = useRef([]);
|
|
18
81
|
const isMD = useResponsive("md");
|
|
19
|
-
const
|
|
82
|
+
const isXM = useResponsive("xm");
|
|
83
|
+
const cardHeight = isXM ? 560 : 400;
|
|
20
84
|
console.log(isMD);
|
|
21
85
|
console.log(cardHeight);
|
|
22
|
-
const
|
|
86
|
+
const bookScroller = () => {
|
|
23
87
|
if (bookScrollRef.current) {
|
|
24
88
|
const scrollAmount = cardHeight;
|
|
25
89
|
const currentScrollTop = bookScrollRef.current.scrollTop;
|
|
26
|
-
|
|
27
|
-
const newScrollTop = direction === "up"
|
|
28
|
-
? Math.max(currentScrollTop - scrollAmount, 0)
|
|
29
|
-
: currentScrollTop + scrollAmount;
|
|
90
|
+
const newScrollTop = scrollAmount * divIndex;
|
|
30
91
|
bookScrollRef.current.scrollTo({
|
|
31
92
|
top: newScrollTop,
|
|
32
93
|
behavior: "smooth",
|
|
@@ -39,7 +100,7 @@ export default function SectionA() {
|
|
|
39
100
|
const scrollWrapper = stickyRef.current;
|
|
40
101
|
const bookWrapper = bookRef.current;
|
|
41
102
|
const sectionEndPoint = `${50 * vh}px`;
|
|
42
|
-
const bookScrollEndPoint = `${
|
|
103
|
+
const bookScrollEndPoint = `${((bookNumber + 1) * 100 + 40) * vh}px`;
|
|
43
104
|
if (scrollWrapper && bookWrapper) {
|
|
44
105
|
// 첫 번째 ScrollTrigger: stickyRef를 고정하고 mainTitle의 투명도와 크기 조정
|
|
45
106
|
const scrollTrigger = ScrollTrigger.create({
|
|
@@ -95,21 +156,24 @@ export default function SectionA() {
|
|
|
95
156
|
gsap.to(ref, {
|
|
96
157
|
scrollTrigger: {
|
|
97
158
|
trigger: ref,
|
|
98
|
-
start: "
|
|
99
|
-
end: "bottom
|
|
159
|
+
start: "start bottom",
|
|
160
|
+
end: "bottom bottom",
|
|
100
161
|
snap: {
|
|
101
162
|
snapTo: 1,
|
|
102
163
|
duration: 0.5,
|
|
103
164
|
ease: "power3.inOut",
|
|
104
165
|
},
|
|
166
|
+
markers: false,
|
|
105
167
|
onEnter: () => {
|
|
106
168
|
divIndex++;
|
|
107
|
-
handleScroll("down");
|
|
169
|
+
//handleScroll("down");
|
|
170
|
+
bookScroller();
|
|
108
171
|
console.log(`onEnter: ${divIndex}`);
|
|
109
172
|
},
|
|
110
173
|
onLeaveBack: () => {
|
|
111
174
|
divIndex--;
|
|
112
|
-
handleScroll("up");
|
|
175
|
+
//handleScroll("up");
|
|
176
|
+
bookScroller();
|
|
113
177
|
console.log(`onLeaveBack: ${divIndex}`);
|
|
114
178
|
},
|
|
115
179
|
},
|
|
@@ -121,7 +185,7 @@ export default function SectionA() {
|
|
|
121
185
|
const bookTrigger = ScrollTrigger.create({
|
|
122
186
|
trigger: bookWrapper,
|
|
123
187
|
start: "top top",
|
|
124
|
-
end: `${bookScrollEndPoint}
|
|
188
|
+
end: `${bookScrollEndPoint} bottom`,
|
|
125
189
|
pin: true,
|
|
126
190
|
pinSpacing: false,
|
|
127
191
|
markers: true,
|
|
@@ -133,7 +197,7 @@ export default function SectionA() {
|
|
|
133
197
|
}
|
|
134
198
|
});
|
|
135
199
|
return () => ctx.kill();
|
|
136
|
-
}, [
|
|
200
|
+
}, [bookScroller, useResponsive]);
|
|
137
201
|
const container = {
|
|
138
202
|
sizes: "w-full h-fit relative",
|
|
139
203
|
displays: "flex flex-col justify-start items-center",
|
|
@@ -176,16 +240,20 @@ export default function SectionA() {
|
|
|
176
240
|
};
|
|
177
241
|
const bookExplainWrapper = {
|
|
178
242
|
displays: "flex flex-col md:flex-row justify-center items-center",
|
|
179
|
-
sizes: "h-screen w-full",
|
|
243
|
+
sizes: "h-screen w-full max-w-[1200px]",
|
|
244
|
+
};
|
|
245
|
+
const bookTextWrapper = {
|
|
246
|
+
displays: "flex items-end md:items-start",
|
|
247
|
+
sizes: "h-full xm:max-h-140 max-h-100 w-full shrink",
|
|
248
|
+
textStyling: "font-bold text-2xl pl-0 md:pl-[76px]",
|
|
180
249
|
};
|
|
181
|
-
const
|
|
182
|
-
displays: "flex flex-col justify-end items-center",
|
|
183
|
-
sizes: "
|
|
184
|
-
textStyling: "font-bold text-2xl",
|
|
250
|
+
const bookTextBox = {
|
|
251
|
+
displays: "flex flex-col justify-end items-center md:justify-start md:items-start",
|
|
252
|
+
sizes: "w-full h-fit rounded-lg p-5",
|
|
185
253
|
};
|
|
186
254
|
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(absoluteWrapperBottom, "bg-gradient-to-tr from-crimson-burgundy to-green-dark"), ref: bgRef }), _jsx("div", { className: cn(absoluteWrapperTop), children: _jsxs("div", { className: cn(buttonStyling), ref: buttonRef, onClick: () => {
|
|
187
255
|
window.location.href = "https://smartstore.naver.com/tosel";
|
|
188
|
-
}, children: [_jsx("div", { children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-6", children: _jsx("path", { d: "M2.25 2.25a.75.75 0 0 0 0 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 0 0-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 0 0 0-1.5H5.378A2.25 2.25 0 0 1 7.5 15h11.218a.75.75 0 0 0 .674-.421 60.358 60.358 0 0 0 2.96-7.228.75.75 0 0 0-.525-.965A60.864 60.864 0 0 0 5.68 4.509l-.232-.867A1.875 1.875 0 0 0 3.636 2.25H2.25ZM3.75 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM16.5 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z" }) }) }), "\uAD50\uC7AC\uBAB0 \uBC14\uB85C\uAC00\uAE30"] }) }), _jsxs("div", { className: cn(TitleWrapper), ref: stickyRef, children: [_jsx("div", { className: cn(miniTitle), ref: subTitleRef, children: "\uB2F9\uC2E0\uC774 \uBBFF\uC744 \uC218 \uC788\uB294 \uC601\uC5B4\uAD50\uC7AC" }), _jsxs("div", { className: cn(mainTitle), ref: mainTitleRef, children: [_jsx("div", { className: "flex justify-center items-center w-40 md:w-80 ml:w-120", children: _jsx("img", { src: "https://resource.tosel.co.kr/images/img-logo-tosel-darkmode.svg", alt: "", className: "max-w-full h-auto" }) }), _jsx("div", { className: "h-full w-0.5 bg-white" }), _jsx("div", { children: " books " })] })] }), _jsx("div", { className: cn(bookWrapper), ref: bookRef, children: _jsx("div", { className: cn("w-72 h-100
|
|
256
|
+
}, children: [_jsx("div", { children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-6", children: _jsx("path", { d: "M2.25 2.25a.75.75 0 0 0 0 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 0 0-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 0 0 0-1.5H5.378A2.25 2.25 0 0 1 7.5 15h11.218a.75.75 0 0 0 .674-.421 60.358 60.358 0 0 0 2.96-7.228.75.75 0 0 0-.525-.965A60.864 60.864 0 0 0 5.68 4.509l-.232-.867A1.875 1.875 0 0 0 3.636 2.25H2.25ZM3.75 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM16.5 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z" }) }) }), "\uAD50\uC7AC\uBAB0 \uBC14\uB85C\uAC00\uAE30"] }) }), _jsxs("div", { className: cn(TitleWrapper), ref: stickyRef, children: [_jsx("div", { className: cn(miniTitle), ref: subTitleRef, children: "\uB2F9\uC2E0\uC774 \uBBFF\uC744 \uC218 \uC788\uB294 \uC601\uC5B4\uAD50\uC7AC" }), _jsxs("div", { className: cn(mainTitle), ref: mainTitleRef, children: [_jsx("div", { className: "flex justify-center items-center w-40 md:w-80 ml:w-120", children: _jsx("img", { src: "https://resource.tosel.co.kr/images/img-logo-tosel-darkmode.svg", alt: "", className: "max-w-full h-auto" }) }), _jsx("div", { className: "h-full w-0.5 bg-white" }), _jsx("div", { children: " books " })] })] }), _jsx("div", { className: cn(bookWrapper), ref: bookRef, children: _jsx("div", { className: cn("w-72 h-100 xm:w-100 xm:h-140 bg-white backdrop-blur-md z-10 rounded-xl shadow-main overflow-y-scroll scrollbar-hidden snap-y snap-mandatory"), ref: bookScrollRef, children: _jsx(ScrollBookComponent, {}) }) }), bookData.map((item, index) => {
|
|
189
257
|
// item.levelLow 값을 LevelKey로 변환하기 전에 유효성 검사
|
|
190
258
|
const lowLevelStyle = getLevelStyle(item.levelLow); // 안전하게 캐스팅
|
|
191
259
|
const highLevelStyle = getLevelStyle(item.levelHigh); // 이 부분도 마찬가지로
|
|
@@ -193,71 +261,11 @@ export default function SectionA() {
|
|
|
193
261
|
if (el) {
|
|
194
262
|
refs.current[index] = el;
|
|
195
263
|
}
|
|
196
|
-
}, children: [
|
|
264
|
+
}, children: [_jsx("div", { className: cn(bookTextWrapper), children: _jsxs("div", { className: cn(bookTextBox, item.type == "학습 시리즈"
|
|
265
|
+
? "md:bg-blue-pastel/30"
|
|
266
|
+
: "md:bg-green-light"), children: [_jsx("div", { children: item.title }), _jsx("div", { className: "text-base text-gray-medium", children: item.type }), isMD && (_jsxs("div", { className: "w-fit h-fit flex flex-col lg:flex-row gap-2 mt-5 lg:items-center items-start", children: [_jsx("div", { className: `w-fit h-fit px-2 py-1 text-xs xm:text-sm rounded-md font-bold ${lowLevelStyle.textColor} ${lowLevelStyle.bgColor}`, children: lowLevelStyle.name }), _jsxs("div", { className: "flex flex-row gap-2 items-center lg:m-0 ml-5", children: ["~", _jsx("div", { className: `w-fit h-fit px-2 py-1 text-xs xm:text-sm rounded-md font-bold ${highLevelStyle.textColor} ${highLevelStyle.bgColor}`, children: highLevelStyle.name })] })] }))] }) }), isMD ? (_jsx("div", { className: "h-full w-72 xm:w-120 shrink-0" })) : (_jsx("div", { className: "h-100 w-full shrink-0" })), _jsx("div", { className: "h-full w-full pt-5 flex flex-col justify-start md:justify-center items-center md:items-end md:pr-5 pr-0", children: isMD ? (_jsx("div", { className: "text-base text-gray-dark font-medium mt-5 w-full", children: item.description })) : (_jsxs("div", { className: "w-fit h-fit flex flex-row gap-2", children: [_jsx("div", { className: `w-fit h-fit px-2 py-1 text-sm rounded-md font-bold ${lowLevelStyle.textColor} ${lowLevelStyle.bgColor}`, children: lowLevelStyle.name }), "~", _jsx("div", { className: `w-fit h-fit px-2 py-1 text-sm rounded-md font-bold ${highLevelStyle.textColor} ${highLevelStyle.bgColor}`, children: highLevelStyle.name })] })) })] }, item.id));
|
|
197
267
|
})] }));
|
|
198
268
|
}
|
|
199
|
-
const bookData = [
|
|
200
|
-
{
|
|
201
|
-
id: 1,
|
|
202
|
-
type: "학습 시리즈",
|
|
203
|
-
title: "Speaking Series",
|
|
204
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
205
|
-
description: "어쩌",
|
|
206
|
-
levelLow: "PS",
|
|
207
|
-
levelHigh: "HJ",
|
|
208
|
-
link: "",
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: 2,
|
|
212
|
-
type: "학습 시리즈",
|
|
213
|
-
title: "Story Series",
|
|
214
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
215
|
-
description: "어쩌",
|
|
216
|
-
levelLow: "PS",
|
|
217
|
-
levelHigh: "JR",
|
|
218
|
-
link: "",
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
id: 3,
|
|
222
|
-
type: "학습 시리즈",
|
|
223
|
-
title: "Listening Series",
|
|
224
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
225
|
-
description: "어쩌",
|
|
226
|
-
levelLow: "PS",
|
|
227
|
-
levelHigh: "HJ",
|
|
228
|
-
link: "",
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
id: 4,
|
|
232
|
-
type: "학습 시리즈",
|
|
233
|
-
title: "Reading Series",
|
|
234
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
235
|
-
description: "어쩌",
|
|
236
|
-
levelLow: "PS",
|
|
237
|
-
levelHigh: "HJ",
|
|
238
|
-
link: "",
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
id: 5,
|
|
242
|
-
type: "학습 시리즈",
|
|
243
|
-
title: "Grammar Series",
|
|
244
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
245
|
-
description: "어쩌",
|
|
246
|
-
levelLow: "PS",
|
|
247
|
-
levelHigh: "HJ",
|
|
248
|
-
link: "",
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
id: 6,
|
|
252
|
-
type: "학습 시리즈",
|
|
253
|
-
title: "VOCA Series",
|
|
254
|
-
imgSrc: "https://resource.tosel.co.kr/images/SP-COVER-PS.png",
|
|
255
|
-
description: "어쩌",
|
|
256
|
-
levelLow: "PS",
|
|
257
|
-
levelHigh: "HJ",
|
|
258
|
-
link: "",
|
|
259
|
-
},
|
|
260
|
-
];
|
|
261
269
|
const levelStyles = {
|
|
262
270
|
CO: {
|
|
263
271
|
name: "cocoon",
|
|
@@ -302,12 +310,15 @@ export function ScrollBookComponent() {
|
|
|
302
310
|
const container = {
|
|
303
311
|
sizes: "w-full h-fit relative",
|
|
304
312
|
displyas: "flex flex-col",
|
|
305
|
-
backgrounds: "
|
|
313
|
+
backgrounds: "",
|
|
306
314
|
};
|
|
307
315
|
const imageWrapper = {
|
|
308
|
-
|
|
309
|
-
|
|
316
|
+
display: "relative",
|
|
317
|
+
sizes: "w-72 h-100 xm:w-100 xm:h-140",
|
|
318
|
+
imgStyling: " z-10 p-20",
|
|
310
319
|
scrollActions: "snap-start",
|
|
311
320
|
};
|
|
312
|
-
return (
|
|
321
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(imageWrapper), children: _jsx("div", { className: "absolute top-0 left-0 w-full h-full bg-contain bg-no-repeat bg-center", style: {
|
|
322
|
+
backgroundImage: `url(https://resource.tosel.co.kr/images/SP-COVER-PS.png)`,
|
|
323
|
+
} }) }), bookData.map((item) => (_jsx("div", { className: cn(imageWrapper), children: _jsx("div", { className: "absolute top-12 left-12 w-[calc(100%-96px)] h-[calc(100%-96px)] bg-contain bg-no-repeat bg-center", style: { backgroundImage: `url(${item.imgSrc})` } }) }, item.id)))] }));
|
|
313
324
|
}
|
|
@@ -119,7 +119,7 @@ const LevelConvert = {
|
|
|
119
119
|
4: "BA",
|
|
120
120
|
3: "JR",
|
|
121
121
|
6: "HJ",
|
|
122
|
-
11: "
|
|
122
|
+
11: "CO",
|
|
123
123
|
};
|
|
124
124
|
const TextColorConvert = {
|
|
125
125
|
PS: "text-ps-pink",
|
|
@@ -128,7 +128,7 @@ const TextColorConvert = {
|
|
|
128
128
|
JR: "text-jr-blue",
|
|
129
129
|
HJ: "text-hj-blue",
|
|
130
130
|
AD: "text-gray-dark",
|
|
131
|
-
|
|
131
|
+
CO: "text-gray-dark",
|
|
132
132
|
IN: "text-gray-dark",
|
|
133
133
|
};
|
|
134
134
|
function Row({ examName, examDate, reports, groupReport }) {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useResponsive } from "../../../../../hook";
|
|
3
3
|
import { LevelToStyleMap } from "../atom/LevelToStyleMap";
|
|
4
4
|
export default function LevelIndex({ transcriptLevel, }) {
|
|
5
|
-
const levels = ["
|
|
5
|
+
const levels = ["CO", "PS", "ST", "BA", "JR", "HJ", "AD"];
|
|
6
6
|
const isSM = useResponsive("sm");
|
|
7
7
|
return (_jsx("div", { className: "flex flex-row w-full h-fit justify-center items-center", children: levels.map((level) => {
|
|
8
8
|
const { name, bgcolor, textcolor } = LevelToStyleMap[level];
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.190
|