@katajere/recap 1.0.14 → 2.0.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 (96) hide show
  1. package/dist/App.css +22 -2
  2. package/dist/LoginScreen.css +22 -21
  3. package/dist/OtpScreen.css +20 -17
  4. package/dist/RecapStory.css +148 -0
  5. package/dist/RecapStory.d.ts.map +1 -1
  6. package/dist/RecapStory.js +61 -28
  7. package/dist/StoryProgress.css +3 -3
  8. package/dist/assets/huxxle-login-blue-logo.svg +14 -0
  9. package/dist/assets/noisy-background.png +0 -0
  10. package/dist/assets/noisy-background.svg +23 -0
  11. package/dist/assets/search-icon.svg +4 -0
  12. package/dist/assets/share-button.svg +5 -0
  13. package/dist/assets/web-icon.png +0 -0
  14. package/dist/assets/web-icon.svg +14 -0
  15. package/dist/components/Header.css +12 -1
  16. package/dist/components/Header.js +2 -2
  17. package/dist/data/mock.d.ts.map +1 -1
  18. package/dist/data/mock.js +19 -7
  19. package/dist/index.d.ts +0 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +0 -1
  22. package/dist/slides/Slide10Final.css +73 -35
  23. package/dist/slides/Slide1Intro.css +204 -56
  24. package/dist/slides/Slide1Intro.d.ts +2 -1
  25. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  26. package/dist/slides/Slide1Intro.js +41 -47
  27. package/dist/slides/Slide2Days.css +121 -34
  28. package/dist/slides/Slide2Days.d.ts +2 -1
  29. package/dist/slides/Slide2Days.d.ts.map +1 -1
  30. package/dist/slides/Slide2Days.js +45 -4
  31. package/dist/slides/Slide3Revenue.css +80 -38
  32. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  33. package/dist/slides/Slide3Revenue.js +31 -3
  34. package/dist/slides/Slide4Orders.css +93 -34
  35. package/dist/slides/Slide4Orders.d.ts +2 -1
  36. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  37. package/dist/slides/Slide4Orders.js +45 -3
  38. package/dist/slides/Slide5Buyers.css +124 -67
  39. package/dist/slides/Slide5Buyers.d.ts +2 -1
  40. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  41. package/dist/slides/Slide5Buyers.js +43 -3
  42. package/dist/slides/Slide6Customer.css +294 -52
  43. package/dist/slides/Slide6Customer.d.ts +6 -3
  44. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  45. package/dist/slides/Slide6Customer.js +25 -4
  46. package/dist/slides/Slide7Products.css +8 -7
  47. package/dist/slides/Slide7Products.js +3 -3
  48. package/dist/slides/Slide8Months.css +6 -6
  49. package/dist/slides/Slide9Year.css +4 -2
  50. package/dist/slides/Slide9Year.d.ts +2 -1
  51. package/dist/slides/Slide9Year.d.ts.map +1 -1
  52. package/dist/slides/Slide9Year.js +23 -2
  53. package/dist/types.d.ts +5 -0
  54. package/dist/types.d.ts.map +1 -1
  55. package/dist/utils/slideScreenshot.d.ts +27 -0
  56. package/dist/utils/slideScreenshot.d.ts.map +1 -0
  57. package/dist/utils/slideScreenshot.js +274 -0
  58. package/package.json +2 -1
  59. package/src/App.css +22 -2
  60. package/src/LoginScreen.css +22 -21
  61. package/src/LoginScreen.tsx +1 -1
  62. package/src/OtpScreen.css +20 -17
  63. package/src/OtpScreen.tsx +1 -1
  64. package/src/RecapStory.css +148 -0
  65. package/src/RecapStory.tsx +131 -57
  66. package/src/StoryProgress.css +3 -3
  67. package/src/components/Header.css +12 -1
  68. package/src/components/Header.tsx +2 -2
  69. package/src/data/mock.ts +19 -7
  70. package/src/index.ts +0 -1
  71. package/src/slides/Slide10Final.css +73 -35
  72. package/src/slides/Slide1Intro.css +204 -56
  73. package/src/slides/Slide1Intro.tsx +89 -81
  74. package/src/slides/Slide2Days.css +121 -34
  75. package/src/slides/Slide2Days.tsx +67 -19
  76. package/src/slides/Slide3Revenue.css +80 -38
  77. package/src/slides/Slide3Revenue.tsx +43 -6
  78. package/src/slides/Slide4Orders.css +93 -34
  79. package/src/slides/Slide4Orders.tsx +71 -10
  80. package/src/slides/Slide5Buyers.css +124 -67
  81. package/src/slides/Slide5Buyers.tsx +97 -38
  82. package/src/slides/Slide6Customer.css +294 -52
  83. package/src/slides/Slide6Customer.tsx +68 -10
  84. package/src/slides/Slide7Products.css +8 -7
  85. package/src/slides/Slide7Products.tsx +3 -3
  86. package/src/slides/Slide8Months.css +6 -6
  87. package/src/slides/Slide9Year.css +4 -2
  88. package/src/slides/Slide9Year.tsx +35 -7
  89. package/src/types.ts +5 -0
  90. package/src/utils/slideScreenshot.ts +324 -0
  91. package/dist/FloatingFrames.css +0 -55
  92. package/dist/FloatingFrames.d.ts +0 -11
  93. package/dist/FloatingFrames.d.ts.map +0 -1
  94. package/dist/FloatingFrames.js +0 -12
  95. package/src/FloatingFrames.css +0 -55
  96. package/src/FloatingFrames.tsx +0 -27
@@ -1,92 +1,334 @@
1
+ /* Slide6Customer - Website visits design with blue/purple scheme */
2
+
1
3
  .slide6-customer {
2
4
  position: relative;
3
5
  width: 100%;
4
6
  height: 100%;
5
7
  overflow: hidden;
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: center;
6
11
  }
7
12
 
8
- @media (max-height: 720px), (orientation: landscape) {
9
- .slide6-customer__outer-rect {
10
- height: 60%;
11
- top: 5%;
12
- }
13
-
14
- .slide6-customer__inner-rect {
15
- height: 38%;
16
- top: 28%;
17
- }
13
+ /* Decorative rectangles with opposite animations */
14
+ .slide6-customer__rect {
15
+ position: absolute;
16
+ box-sizing: border-box;
17
+ border: 1px solid #817FE3;
18
18
  }
19
19
 
20
- @keyframes slide6-moveDown {
21
- 0% { transform: translateY(0); }
22
- 100% { transform: translateY(4.74%); }
20
+ .slide6-customer__rect--1 {
21
+ width: calc(100% - 32px);
22
+ max-width: 366px;
23
+ left: 50%;
24
+ top: 16px;
25
+ transform: translateX(-50%);
26
+ /* Height calculated: from 16px top to 16px below link bar (link bar is at ~312px, height 36px) */
27
+ height: clamp(280px, 41vh, 348px);
28
+ animation: rectBounce1 3s ease-in-out infinite;
23
29
  }
24
30
 
25
- .slide6-customer__outer-rect {
26
- position: absolute;
27
- width: 93.85%;
28
- height: 69.79%;
29
- top: 1.9%;
30
- left: 3.08%;
31
- border: 1px solid #fff;
32
- animation: slide6-moveDown 6s ease-in-out infinite alternate;
31
+ .slide6-customer__rect--2 {
32
+ width: calc(100% - 64px);
33
+ max-width: 334px;
34
+ left: 50%;
35
+ top: clamp(80px, 12vh, 108px);
36
+ transform: translateX(-50%);
37
+ /* Height calculated: from 108px top to 32px below link bar */
38
+ height: clamp(220px, 32vh, 272px);
39
+ animation: rectBounce2 3s ease-in-out infinite;
40
+ }
41
+
42
+ /* Opposite bounce animations */
43
+ @keyframes rectBounce1 {
44
+ 0%, 100% { transform: translateX(-50%) translateY(0); }
45
+ 50% { transform: translateX(-50%) translateY(12px); }
46
+ }
47
+
48
+ @keyframes rectBounce2 {
49
+ 0%, 100% { transform: translateX(-50%) translateY(0); }
50
+ 50% { transform: translateX(-50%) translateY(-12px); }
33
51
  }
34
52
 
35
- .slide6-customer__inner-rect {
53
+ /* Globe icon wrapper */
54
+ .slide6-customer__globe-wrapper {
36
55
  position: absolute;
37
- width: 85.38%;
38
- height: 45.97%;
39
- top: 25.59%;
40
- left: 6.79%;
41
- border: 1px solid #fff;
42
- animation: slide6-moveUp 6s ease-in-out infinite alternate;
56
+ width: 24vw;
57
+ max-width: 94px;
58
+ min-width: 60px;
59
+ aspect-ratio: 94 / 100;
60
+ left: 50%;
61
+ top: 18.5vh;
62
+ transform: translateX(-50%);
43
63
  display: flex;
44
64
  align-items: center;
45
65
  justify-content: center;
66
+ z-index: 1;
46
67
  }
47
68
 
48
- .slide6-customer__sketch {
49
- width: 65.64%;
50
- /* max-height: 30.09%; */
69
+ .slide6-customer__globe {
70
+ width: 100%;
71
+ height: 100%;
51
72
  object-fit: contain;
52
73
  }
53
74
 
54
- .slide6-customer__label {
75
+ /* Website link bar */
76
+ .slide6-customer__link-bar {
55
77
  position: absolute;
56
- bottom: 13.03%;
57
- left: 4.1%;
58
- right: 4.1%;
78
+ width: calc(100% - 64px);
79
+ max-width: 302px;
80
+ height: 36px;
81
+ left: 50%;
82
+ top: clamp(260px, 37vh, 312px);
83
+ transform: translateX(-50%);
59
84
  display: flex;
60
- flex-direction: column;
85
+ flex-direction: row;
61
86
  align-items: center;
62
- gap: 2.79vh;
87
+ justify-content: space-evenly;
88
+ padding: 8px;
89
+ gap: 8px;
90
+ background: #FCFCFC;
91
+ border: 1px solid #CDCCF4;
92
+ box-sizing: border-box;
93
+ }
94
+
95
+ .slide6-customer__search-icon {
96
+ width: 20px;
97
+ height: 20px;
98
+ flex-shrink: 0;
99
+ }
100
+
101
+ .slide6-customer__link-text {
102
+ font-family: 'Lora', serif;
103
+ font-style: normal;
104
+ font-weight: 600;
105
+ font-size: 12px;
106
+ line-height: 120%;
63
107
  text-align: center;
108
+ color: #4F4CD8;
109
+ white-space: nowrap;
110
+ overflow: hidden;
111
+ text-overflow: ellipsis;
112
+ }
113
+
114
+ /* Stats content */
115
+ .slide6-customer__content {
116
+ position: absolute;
117
+ z-index: 1;
118
+ width: calc(100% - 32px);
119
+ max-width: 358px;
120
+ display: flex;
121
+ flex-direction: column;
122
+ align-items: center;
123
+ gap: 48px;
124
+ left: 50%;
125
+ top: calc(50% + 130px);
126
+ transform: translate(-50%, -50%);
127
+ }
128
+
129
+ .slide6-customer__section {
130
+ display: flex;
131
+ flex-direction: column;
132
+ align-items: center;
133
+ width: 100%;
134
+ gap: 8px;
64
135
  }
65
136
 
66
- .slide6-customer__name,
67
- .slide6-customer__text {
137
+ .slide6-customer__number {
68
138
  width: 100%;
69
139
  font-family: 'Lora', serif;
140
+ font-style: normal;
141
+ font-weight: 700;
142
+ font-size: clamp(60px, 10vh, 80px);
143
+ line-height: 1;
70
144
  text-align: center;
71
- background: linear-gradient(90deg, #ffffff 0%, #ffcc80 100%);
72
- -webkit-background-clip: text;
73
- background-clip: text;
74
- color: transparent;
145
+ color: #4F4CD8;
146
+ margin: 0;
75
147
  }
76
148
 
77
- .slide6-customer__name {
78
- font-weight: 700;
79
- font-size: 4.74vh;
80
- line-height: 1.28;
149
+ /* Secondary number styling - like repeat buyers in Slide5 */
150
+ .slide6-customer__number--secondary {
151
+ font-size: clamp(50px, 8vh, 70px);
152
+ color: #FFFFFF;
153
+ -webkit-text-stroke: 1.5px #4F4CD8;
154
+ paint-order: stroke fill;
155
+ }
156
+
157
+ .slide6-customer__label {
158
+ width: 100%;
159
+ font-family: 'Lora', serif;
160
+ font-style: normal;
161
+ font-weight: 400;
162
+ font-size: clamp(14px, 4.1vw, 16px);
163
+ line-height: 1.5;
164
+ text-align: center;
165
+ color: #3734D3;
166
+ margin: 0;
81
167
  }
82
168
 
83
- .slide6-customer__text {
169
+ .slide6-customer__footer {
170
+ position: absolute;
171
+ width: calc(100% - 32px);
172
+ max-width: 358px;
173
+ left: 50%;
174
+ bottom: calc(100px + env(safe-area-inset-bottom));
175
+ transform: translateX(-50%);
176
+ font-family: 'Lora', serif;
177
+ font-style: normal;
84
178
  font-weight: 400;
85
- font-size: 1.89vh;
179
+ font-size: clamp(14px, 4.1vw, 16px);
86
180
  line-height: 1.5;
181
+ text-align: center;
182
+ color: #3734D3;
87
183
  }
88
184
 
89
- @keyframes slide6-moveUp {
90
- 0% { transform: translateY(0); }
91
- 100% { transform: translateY(-4.74%); }
185
+ /* Media queries for landscape and short screens */
186
+ @media (max-height: 720px), (orientation: landscape) {
187
+ .slide6-customer__rect--1 {
188
+ height: 290px;
189
+ top: 14px;
190
+ }
191
+
192
+ .slide6-customer__rect--2 {
193
+ height: 230px;
194
+ top: 90px;
195
+ }
196
+
197
+ .slide6-customer__globe-wrapper {
198
+ width: 70px;
199
+ min-width: 70px;
200
+ top: 16vh;
201
+ }
202
+
203
+ .slide6-customer__link-bar {
204
+ top: 260px;
205
+ }
206
+
207
+ .slide6-customer__content {
208
+ gap: 36px;
209
+ top: calc(50% + 100px);
210
+ }
211
+
212
+ .slide6-customer__number {
213
+ font-size: clamp(50px, 9dvh, 70px);
214
+ }
215
+
216
+ .slide6-customer__number--secondary {
217
+ font-size: clamp(42px, 7dvh, 60px);
218
+ }
219
+ }
220
+
221
+ /* Small/Short screens - handles browser chrome taking space */
222
+ @media (max-height: 700px) {
223
+ .slide6-customer__rect--1 {
224
+ height: 250px;
225
+ top: 12px;
226
+ }
227
+
228
+ .slide6-customer__rect--2 {
229
+ height: 200px;
230
+ top: 76px;
231
+ }
232
+
233
+ .slide6-customer__globe-wrapper {
234
+ width: 60px;
235
+ min-width: 60px;
236
+ top: 14vh;
237
+ }
238
+
239
+ .slide6-customer__link-bar {
240
+ height: 32px;
241
+ padding: 6px;
242
+ top: 220px;
243
+ }
244
+
245
+ .slide6-customer__link-text {
246
+ font-size: 11px;
247
+ }
248
+
249
+ .slide6-customer__content {
250
+ gap: 28px;
251
+ top: calc(50% + 80px);
252
+ }
253
+
254
+ .slide6-customer__section {
255
+ gap: 6px;
256
+ }
257
+
258
+ .slide6-customer__number {
259
+ font-size: clamp(44px, 8dvh, 60px);
260
+ }
261
+
262
+ .slide6-customer__number--secondary {
263
+ font-size: clamp(36px, 6dvh, 52px);
264
+ }
265
+
266
+ .slide6-customer__label {
267
+ font-size: clamp(12px, 3.5vw, 14px);
268
+ }
269
+
270
+ .slide6-customer__footer {
271
+ bottom: calc(90px + env(safe-area-inset-bottom));
272
+ font-size: clamp(12px, 3.5vw, 14px);
273
+ }
274
+ }
275
+
276
+ /* Extra short screens (under 600px) - more aggressive adjustments */
277
+ @media (max-height: 600px) {
278
+ .slide6-customer__rect--1 {
279
+ height: 210px;
280
+ top: 10px;
281
+ }
282
+
283
+ .slide6-customer__rect--2 {
284
+ height: 170px;
285
+ top: 60px;
286
+ }
287
+
288
+ .slide6-customer__globe-wrapper {
289
+ width: 50px;
290
+ min-width: 50px;
291
+ top: 12vh;
292
+ }
293
+
294
+ .slide6-customer__link-bar {
295
+ height: 28px;
296
+ padding: 4px 6px;
297
+ top: 180px;
298
+ }
299
+
300
+ .slide6-customer__link-text {
301
+ font-size: 10px;
302
+ }
303
+
304
+ .slide6-customer__search-icon {
305
+ width: 16px;
306
+ height: 16px;
307
+ }
308
+
309
+ .slide6-customer__content {
310
+ gap: 20px;
311
+ top: calc(50% + 60px);
312
+ }
313
+
314
+ .slide6-customer__section {
315
+ gap: 4px;
316
+ }
317
+
318
+ .slide6-customer__number {
319
+ font-size: clamp(38px, 7dvh, 52px);
320
+ }
321
+
322
+ .slide6-customer__number--secondary {
323
+ font-size: clamp(30px, 5dvh, 44px);
324
+ }
325
+
326
+ .slide6-customer__label {
327
+ font-size: clamp(11px, 3vw, 13px);
328
+ }
329
+
330
+ .slide6-customer__footer {
331
+ bottom: calc(80px + env(safe-area-inset-bottom));
332
+ font-size: clamp(11px, 3vw, 13px);
333
+ }
92
334
  }
@@ -1,25 +1,83 @@
1
1
  import React from 'react';
2
+ import { useMotionValue, useTransform, animate } from 'framer-motion';
3
+ import { motion } from 'framer-motion';
2
4
  import './Slide6Customer.css';
3
- import sketchDraw from '../assets/huxxle_star_final.gif';
5
+ import webIcon from '../assets/web-icon.png';
6
+ import searchIcon from '../assets/search-icon.svg';
7
+
8
+ // Counter animation hook with optional comma formatting
9
+ function useCountAnimation(target: number, duration: number = 2, delay: number = 0, formatWithCommas: boolean = false) {
10
+ const count = useMotionValue(0);
11
+ const formatted = useTransform(count, (v) => {
12
+ const rounded = Math.round(v);
13
+ return formatWithCommas ? rounded.toLocaleString() : rounded.toString();
14
+ });
15
+
16
+ React.useEffect(() => {
17
+ const timeout = setTimeout(() => {
18
+ animate(count, target, { duration, ease: 'easeOut' });
19
+ }, delay * 1000);
20
+ return () => clearTimeout(timeout);
21
+ }, [count, target, duration, delay]);
22
+
23
+ return formatted;
24
+ }
4
25
 
5
26
  interface Slide6CustomerProps {
6
- customerName: string;
27
+ websiteLink?: string;
28
+ websiteVisits?: number;
29
+ mostViewedProduct?: string;
30
+ mostViewedProductCount?: number;
7
31
  }
8
32
 
9
33
  /**
10
- * Slide6Customer - Centered customer illustration with floating frames and hero text
34
+ * Slide6Customer - Website visits and most viewed product slide
11
35
  */
12
- function Slide6Customer({ customerName }: Slide6CustomerProps) {
36
+ function Slide6Customer({
37
+ websiteLink = "",
38
+ websiteVisits = 0,
39
+ mostViewedProduct = "",
40
+ mostViewedProductCount = 0
41
+ }: Slide6CustomerProps) {
42
+ const visitsCount = useCountAnimation(websiteVisits, 1.7, 0.3, true); // 1.7s + 0.3s delay = 2s total
43
+ const productCount = useCountAnimation(mostViewedProductCount, 1.5, 0.5, true); // 1.5s + 0.5s delay = 2s total
44
+
13
45
  return (
14
46
  <div className="slide6-customer">
15
- <div className="slide6-customer__outer-rect" aria-hidden="true" />
16
- <div className="slide6-customer__inner-rect" aria-hidden="true">
17
- <img src={sketchDraw} alt="Customer storytelling sketch" className="slide6-customer__sketch" />
47
+ {/* Decorative rectangles with opposite animations */}
48
+ <div className="slide6-customer__rect slide6-customer__rect--1" aria-hidden="true" />
49
+ <div className="slide6-customer__rect slide6-customer__rect--2" aria-hidden="true" />
50
+
51
+ {/* Globe icon with gradient */}
52
+ <div className="slide6-customer__globe-wrapper">
53
+ <img src={webIcon} alt="Website" className="slide6-customer__globe" />
18
54
  </div>
19
- <div className="slide6-customer__label">
20
- <span className="slide6-customer__name">{customerName}</span>
21
- <p className="slide6-customer__text">na your top customer be that, hol am tight</p>
55
+
56
+ {/* Website link bar */}
57
+ <div className="slide6-customer__link-bar">
58
+ <img src={searchIcon} alt="" className="slide6-customer__search-icon" />
59
+ <span className="slide6-customer__link-text">{websiteLink}</span>
22
60
  </div>
61
+
62
+ {/* Content sections */}
63
+ <div className="slide6-customer__content">
64
+ {/* Website visits section */}
65
+ <div className="slide6-customer__section">
66
+ <motion.span className="slide6-customer__number">{visitsCount}</motion.span>
67
+ <span className="slide6-customer__label">times dem visit your website,</span>
68
+ </div>
69
+
70
+ {/* Most viewed product count section - styled like repeat buyers */}
71
+ <div className="slide6-customer__section">
72
+ <motion.span className="slide6-customer__number slide6-customer__number--secondary">{productCount}</motion.span>
73
+ <span className="slide6-customer__label">
74
+ times wey people check "{mostViewedProduct}"
75
+ </span>
76
+ </div>
77
+ </div>
78
+
79
+ {/* Footer text */}
80
+ <p className="slide6-customer__footer">even your enemy visit am 😎</p>
23
81
  </div>
24
82
  );
25
83
  }
@@ -14,10 +14,10 @@
14
14
 
15
15
  .slide7-products__lead {
16
16
  font-family: 'Lora', serif;
17
- font-size: 1.89vh;
17
+ font-size: clamp(14px, 4.1vw, 16px);
18
18
  font-weight: 400;
19
19
  text-align: center;
20
- background: linear-gradient(90deg, #ffffff 0%, #ffcc80 100%);
20
+ background: var(--bg-gradient);
21
21
  -webkit-background-clip: text;
22
22
  background-clip: text;
23
23
  -webkit-text-fill-color: transparent;
@@ -49,7 +49,7 @@
49
49
  font-size: clamp(18px, 6.15vw, 24px);
50
50
  font-weight: 700;
51
51
  line-height: 1.3;
52
- background: linear-gradient(90deg, #ffffff 0%, #ffcc80 100%);
52
+ background: var(--bg-gradient);
53
53
  -webkit-background-clip: text;
54
54
  -webkit-text-fill-color: transparent;
55
55
  background-clip: text;
@@ -72,7 +72,7 @@
72
72
  width: 22.31%;
73
73
  height: 100%;
74
74
  box-sizing: border-box;
75
- border: 1px solid #ffffff;
75
+ border: 1px solid var(--border-line);
76
76
  display: flex;
77
77
  align-items: center;
78
78
  justify-content: center;
@@ -81,7 +81,7 @@
81
81
  .slide7-products__image {
82
82
  width: 87%;
83
83
  height: 88.5%;
84
- border: 1px solid #ffffff;
84
+ border: 1px solid var(--border-line);
85
85
  object-fit: cover;
86
86
  display: block;
87
87
  }
@@ -95,7 +95,7 @@
95
95
  .slide7-products__title,
96
96
  .slide7-products__subtitle {
97
97
  font-family: 'Lora', serif;
98
- background: linear-gradient(90deg, #ffffff 0%, #ffcc80 100%);
98
+ background: var(--bg-gradient);
99
99
  -webkit-background-clip: text;
100
100
  -webkit-text-fill-color: transparent;
101
101
  background-clip: text;
@@ -117,6 +117,7 @@
117
117
  .slide7-products__subtitle {
118
118
  font-size: clamp(14px, 4.1vw, 16px);
119
119
  font-weight: 400;
120
+ color: var(--text-primary);
120
121
  /* line-height: 72px; */
121
122
  }
122
123
 
@@ -138,7 +139,7 @@
138
139
  box-sizing: border-box;
139
140
  width: 46.15%;
140
141
  aspect-ratio: 180 / 240;
141
- border: 1px solid #FFFFFF;
142
+ border: 1px solid var(--rect-border);
142
143
  flex: none;
143
144
  flex-grow: 0;
144
145
  }
@@ -12,8 +12,8 @@ const listVariant: Variants = {
12
12
  animate: {
13
13
  opacity: 1,
14
14
  transition: {
15
- staggerChildren: 0.3,
16
- delayChildren: 0.2,
15
+ staggerChildren: 0.18, // 5 items * 0.18s stagger = 0.72s total stagger
16
+ delayChildren: 0.1,
17
17
  when: 'beforeChildren'
18
18
  }
19
19
  }
@@ -24,7 +24,7 @@ const rowVariant: Variants = {
24
24
  animate: {
25
25
  opacity: 1,
26
26
  y: 0,
27
- transition: { duration: 1.1, ease: [0.33, 0.1, 0.33, 1] }
27
+ transition: { duration: 0.8, ease: [0.33, 0.1, 0.33, 1] } // 0.1 + 0.72 + 0.8 = 1.62s total
28
28
  }
29
29
  };
30
30
 
@@ -26,11 +26,11 @@
26
26
  font-size: clamp(14px, 4.1vw, 16px);
27
27
  font-weight: 400;
28
28
  text-align: center;
29
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
29
+ /* background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
30
30
  -webkit-background-clip: text;
31
31
  -webkit-text-fill-color: transparent;
32
- background-clip: text;
33
- color: transparent;
32
+ background-clip: text; */
33
+ color: var(--primary-purple);
34
34
  margin-bottom: 1.9%;
35
35
  z-index: 2;
36
36
  }
@@ -57,11 +57,11 @@
57
57
  font-size: clamp(16px, 5.13vw, 20px);
58
58
  line-height: 1.3;
59
59
  text-align: center;
60
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
60
+ background: var(--bg-gradient);
61
61
  -webkit-background-clip: text;
62
62
  -webkit-text-fill-color: transparent;
63
63
  background-clip: text;
64
- color: transparent;
64
+ /* color: var(--primary-blue); */
65
65
  opacity: 0.6;
66
66
  transition: opacity 0.1s ease, transform 0.1s ease;
67
67
  }
@@ -95,7 +95,7 @@
95
95
  position: absolute;
96
96
  width: 46.15%;
97
97
  aspect-ratio: 180 / 240;
98
- border: 1px solid #FFFFFF;
98
+ border: 1px solid var(--rect-border);
99
99
  box-sizing: border-box;
100
100
  transform-origin: 0 0;
101
101
  transform: rotate(28.86deg);
@@ -17,8 +17,9 @@
17
17
  font-size: clamp(14px, 4.1vw, 16px);
18
18
  font-weight: 400;
19
19
  margin-bottom: 2.84%;
20
+ /* color: var(--primary-blue); */
20
21
  /* width: 320px; */
21
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
22
+ background: var(--bg-gradient);
22
23
  -webkit-background-clip: text;
23
24
  -webkit-text-fill-color: transparent;
24
25
  background-clip: text;
@@ -32,7 +33,8 @@
32
33
  margin-bottom: 1.9%;
33
34
  width: 92.31%;
34
35
  text-transform: capitalize;
35
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
36
+ /* color: var(--primary-blue); */
37
+ background: var(--bg-gradient);
36
38
  -webkit-background-clip: text;
37
39
  -webkit-text-fill-color: transparent;
38
40
  background-clip: text;
@@ -7,13 +7,41 @@ import type { BusinessCategory } from '../types';
7
7
  interface Slide9YearProps {
8
8
  businessCategory: BusinessCategory;
9
9
  year?: number;
10
+ frameImages?: string[];
10
11
  }
11
12
 
12
- function Slide9Year({ businessCategory, year }: Slide9YearProps) {
13
+ function Slide9Year({ businessCategory, year, frameImages }: Slide9YearProps) {
13
14
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
14
15
  const baseYear = year ?? 2025;
15
16
  const nextYear = baseYear + 1;
16
17
 
18
+ const frameImagePool = React.useMemo(() => {
19
+ return frameImages && frameImages.length > 0 ? frameImages : [];
20
+ }, [frameImages]);
21
+
22
+ const rectSources = React.useMemo(() => {
23
+ if (!frameImagePool.length) {
24
+ return [];
25
+ }
26
+
27
+ return Array.from({ length: 6 }, () =>
28
+ frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
29
+ );
30
+ }, [frameImagePool]);
31
+
32
+ const getRectStyle = (index: number) => {
33
+ const image = rectSources[index];
34
+ if (!image) {
35
+ return undefined;
36
+ }
37
+
38
+ return {
39
+ backgroundImage: `url('${image}')`,
40
+ backgroundSize: 'cover',
41
+ backgroundPosition: 'center',
42
+ };
43
+ };
44
+
17
45
  return (
18
46
  <div className="slide9-year">
19
47
  <div className="slide9-year__message">{copy.yearHeadline}</div>
@@ -21,15 +49,15 @@ function Slide9Year({ businessCategory, year }: Slide9YearProps) {
21
49
  <div className="slide9-year__crown">👑</div>
22
50
 
23
51
  <div className="slide9-year__rect-layer slide9-year__rect-layer--top">
24
- <span className="slide9-year__rect slide9-year__rect--top-1 top-group" />
25
- <span className="slide9-year__rect slide9-year__rect--top-2 top-group" />
26
- <span className="slide9-year__rect slide9-year__rect--top-3 top-group" />
52
+ <span className="slide9-year__rect slide9-year__rect--top-1 top-group" style={getRectStyle(0)} />
53
+ <span className="slide9-year__rect slide9-year__rect--top-2 top-group" style={getRectStyle(1)} />
54
+ <span className="slide9-year__rect slide9-year__rect--top-3 top-group" style={getRectStyle(2)} />
27
55
  </div>
28
56
 
29
57
  <div className="slide9-year__rect-layer slide9-year__rect-layer--bottom">
30
- <span className="slide9-year__rect slide9-year__rect--bottom-1 bottom-group" />
31
- <span className="slide9-year__rect slide9-year__rect--bottom-2 bottom-group" />
32
- <span className="slide9-year__rect slide9-year__rect--bottom-3 bottom-group" />
58
+ <span className="slide9-year__rect slide9-year__rect--bottom-1 bottom-group" style={getRectStyle(3)} />
59
+ <span className="slide9-year__rect slide9-year__rect--bottom-2 bottom-group" style={getRectStyle(4)} />
60
+ <span className="slide9-year__rect slide9-year__rect--bottom-3 bottom-group" style={getRectStyle(5)} />
33
61
  </div>
34
62
  </div>
35
63
  );