@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.
- package/dist/App.css +22 -2
- package/dist/LoginScreen.css +22 -21
- package/dist/OtpScreen.css +20 -17
- package/dist/RecapStory.css +148 -0
- package/dist/RecapStory.d.ts.map +1 -1
- package/dist/RecapStory.js +61 -28
- package/dist/StoryProgress.css +3 -3
- package/dist/assets/huxxle-login-blue-logo.svg +14 -0
- package/dist/assets/noisy-background.png +0 -0
- package/dist/assets/noisy-background.svg +23 -0
- package/dist/assets/search-icon.svg +4 -0
- package/dist/assets/share-button.svg +5 -0
- package/dist/assets/web-icon.png +0 -0
- package/dist/assets/web-icon.svg +14 -0
- package/dist/components/Header.css +12 -1
- package/dist/components/Header.js +2 -2
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/mock.js +19 -7
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/slides/Slide10Final.css +73 -35
- package/dist/slides/Slide1Intro.css +204 -56
- package/dist/slides/Slide1Intro.d.ts +2 -1
- package/dist/slides/Slide1Intro.d.ts.map +1 -1
- package/dist/slides/Slide1Intro.js +41 -47
- package/dist/slides/Slide2Days.css +121 -34
- package/dist/slides/Slide2Days.d.ts +2 -1
- package/dist/slides/Slide2Days.d.ts.map +1 -1
- package/dist/slides/Slide2Days.js +45 -4
- package/dist/slides/Slide3Revenue.css +80 -38
- package/dist/slides/Slide3Revenue.d.ts.map +1 -1
- package/dist/slides/Slide3Revenue.js +31 -3
- package/dist/slides/Slide4Orders.css +93 -34
- package/dist/slides/Slide4Orders.d.ts +2 -1
- package/dist/slides/Slide4Orders.d.ts.map +1 -1
- package/dist/slides/Slide4Orders.js +45 -3
- package/dist/slides/Slide5Buyers.css +124 -67
- package/dist/slides/Slide5Buyers.d.ts +2 -1
- package/dist/slides/Slide5Buyers.d.ts.map +1 -1
- package/dist/slides/Slide5Buyers.js +43 -3
- package/dist/slides/Slide6Customer.css +294 -52
- package/dist/slides/Slide6Customer.d.ts +6 -3
- package/dist/slides/Slide6Customer.d.ts.map +1 -1
- package/dist/slides/Slide6Customer.js +25 -4
- package/dist/slides/Slide7Products.css +8 -7
- package/dist/slides/Slide7Products.js +3 -3
- package/dist/slides/Slide8Months.css +6 -6
- package/dist/slides/Slide9Year.css +4 -2
- package/dist/slides/Slide9Year.d.ts +2 -1
- package/dist/slides/Slide9Year.d.ts.map +1 -1
- package/dist/slides/Slide9Year.js +23 -2
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/slideScreenshot.d.ts +27 -0
- package/dist/utils/slideScreenshot.d.ts.map +1 -0
- package/dist/utils/slideScreenshot.js +274 -0
- package/package.json +2 -1
- package/src/App.css +22 -2
- package/src/LoginScreen.css +22 -21
- package/src/LoginScreen.tsx +1 -1
- package/src/OtpScreen.css +20 -17
- package/src/OtpScreen.tsx +1 -1
- package/src/RecapStory.css +148 -0
- package/src/RecapStory.tsx +131 -57
- package/src/StoryProgress.css +3 -3
- package/src/components/Header.css +12 -1
- package/src/components/Header.tsx +2 -2
- package/src/data/mock.ts +19 -7
- package/src/index.ts +0 -1
- package/src/slides/Slide10Final.css +73 -35
- package/src/slides/Slide1Intro.css +204 -56
- package/src/slides/Slide1Intro.tsx +89 -81
- package/src/slides/Slide2Days.css +121 -34
- package/src/slides/Slide2Days.tsx +67 -19
- package/src/slides/Slide3Revenue.css +80 -38
- package/src/slides/Slide3Revenue.tsx +43 -6
- package/src/slides/Slide4Orders.css +93 -34
- package/src/slides/Slide4Orders.tsx +71 -10
- package/src/slides/Slide5Buyers.css +124 -67
- package/src/slides/Slide5Buyers.tsx +97 -38
- package/src/slides/Slide6Customer.css +294 -52
- package/src/slides/Slide6Customer.tsx +68 -10
- package/src/slides/Slide7Products.css +8 -7
- package/src/slides/Slide7Products.tsx +3 -3
- package/src/slides/Slide8Months.css +6 -6
- package/src/slides/Slide9Year.css +4 -2
- package/src/slides/Slide9Year.tsx +35 -7
- package/src/types.ts +5 -0
- package/src/utils/slideScreenshot.ts +324 -0
- package/dist/FloatingFrames.css +0 -55
- package/dist/FloatingFrames.d.ts +0 -11
- package/dist/FloatingFrames.d.ts.map +0 -1
- package/dist/FloatingFrames.js +0 -12
- package/src/FloatingFrames.css +0 -55
- package/src/FloatingFrames.tsx +0 -27
|
@@ -1,20 +1,16 @@
|
|
|
1
|
+
/* Slide4Orders - Figma exact specifications with blue/purple scheme */
|
|
2
|
+
|
|
1
3
|
.slide4-orders {
|
|
2
4
|
position: relative;
|
|
3
5
|
width: 100%;
|
|
4
|
-
|
|
6
|
+
height: 100%;
|
|
5
7
|
display: flex;
|
|
6
8
|
align-items: flex-start;
|
|
7
9
|
justify-content: center;
|
|
8
|
-
padding: 0
|
|
10
|
+
padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
|
|
9
11
|
overflow: hidden;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
/* @media (max-height: 720px), (orientation: landscape) {
|
|
13
|
-
.slide4-orders {
|
|
14
|
-
padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
|
|
15
|
-
}
|
|
16
|
-
} */
|
|
17
|
-
|
|
18
14
|
.slide4-orders__grid {
|
|
19
15
|
position: absolute;
|
|
20
16
|
width: 1117px;
|
|
@@ -31,13 +27,13 @@
|
|
|
31
27
|
position: absolute;
|
|
32
28
|
inset: 0;
|
|
33
29
|
}
|
|
30
|
+
|
|
34
31
|
.slide4-orders__rect {
|
|
35
32
|
position: absolute;
|
|
36
33
|
width: 180px;
|
|
37
34
|
height: 240px;
|
|
38
35
|
box-sizing: border-box;
|
|
39
|
-
border: 1px solid
|
|
40
|
-
/* transform-origin: 0 0; */
|
|
36
|
+
border: 1px solid var(--rect-border);
|
|
41
37
|
transform: rotate(28.8631deg);
|
|
42
38
|
flex: none;
|
|
43
39
|
}
|
|
@@ -50,7 +46,6 @@
|
|
|
50
46
|
.slide4-orders__rect.r6 { left: 831.705px; top: 371.446px; }
|
|
51
47
|
.slide4-orders__rect.r7 { left: 710.06px; top: 592.142px; }
|
|
52
48
|
.slide4-orders__rect.r8 { left: 588.415px; top: 812.837px; }
|
|
53
|
-
/* .slide4-orders__rect.r9 { left: 480.984px; top: 208.701px; } */
|
|
54
49
|
.slide4-orders__rect.r10 { left: 359.339px; top: 429.397px; }
|
|
55
50
|
.slide4-orders__rect.r11 { left: 237.694px; top: 650.092px; }
|
|
56
51
|
.slide4-orders__rect.r12 { left: 116.049px; top: 870.788px; }
|
|
@@ -86,50 +81,114 @@
|
|
|
86
81
|
}
|
|
87
82
|
|
|
88
83
|
.slide4-orders__content {
|
|
89
|
-
position:
|
|
84
|
+
position: absolute;
|
|
90
85
|
z-index: 1;
|
|
91
|
-
width: 100
|
|
92
|
-
max-width:
|
|
86
|
+
width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
|
|
87
|
+
max-width: 358px;
|
|
93
88
|
display: flex;
|
|
94
89
|
flex-direction: column;
|
|
95
90
|
align-items: flex-start;
|
|
96
|
-
gap:
|
|
97
|
-
|
|
91
|
+
gap: 32px;
|
|
92
|
+
left: calc(16px + env(safe-area-inset-left));
|
|
93
|
+
top: calc(50% - 137px/2 - 189.5px);
|
|
98
94
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
|
|
96
|
+
/* Large/Tall screens - position content higher for better balance */
|
|
97
|
+
@media (min-height: 800px) {
|
|
98
|
+
.slide4-orders__content {
|
|
99
|
+
top: calc(50% - 137px/2 - 230px);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (min-height: 900px) {
|
|
104
|
+
.slide4-orders__content {
|
|
105
|
+
top: calc(50% - 137px/2 - 260px);
|
|
106
|
+
}
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
.slide4-orders__label {
|
|
111
|
-
|
|
110
|
+
width: 100%;
|
|
111
|
+
font-family: 'Lora', serif;
|
|
112
|
+
font-style: normal;
|
|
112
113
|
font-weight: 500;
|
|
113
|
-
|
|
114
|
+
font-size: clamp(14px, 4.1vw, 16px);
|
|
115
|
+
line-height: 1.5;
|
|
116
|
+
color: var(--text-primary);
|
|
117
|
+
/* background: var(--bg-gradient);
|
|
118
|
+
-webkit-background-clip: text;
|
|
119
|
+
-webkit-text-fill-color: transparent;
|
|
120
|
+
background-clip: text; */
|
|
121
|
+
margin: 0;
|
|
114
122
|
}
|
|
115
123
|
|
|
116
124
|
.slide4-orders__number {
|
|
117
|
-
|
|
125
|
+
width: 100%;
|
|
126
|
+
font-family: 'Lora', serif;
|
|
127
|
+
font-style: normal;
|
|
118
128
|
font-weight: 700;
|
|
129
|
+
font-size: 10vh;
|
|
119
130
|
line-height: 1;
|
|
131
|
+
/* color: #4F4CD8; */
|
|
132
|
+
background: var(--bg-gradient);
|
|
133
|
+
-webkit-background-clip: text;
|
|
134
|
+
-webkit-text-fill-color: transparent;
|
|
135
|
+
background-clip: text;
|
|
136
|
+
margin: 0;
|
|
120
137
|
}
|
|
121
138
|
|
|
122
139
|
.slide4-orders__caption {
|
|
123
|
-
|
|
140
|
+
width: 100%;
|
|
141
|
+
font-family: 'Lora', serif;
|
|
142
|
+
font-style: normal;
|
|
124
143
|
font-weight: 400;
|
|
144
|
+
font-size: clamp(14px, 4.1vw, 16px);
|
|
145
|
+
line-height: 1.5;
|
|
146
|
+
color: #3734D3;
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Media queries for landscape and short screens */
|
|
151
|
+
@media (max-height: 720px), (orientation: landscape) {
|
|
152
|
+
.slide4-orders__content {
|
|
153
|
+
/* top: calc(50% - 120px/2 - 150px); */
|
|
154
|
+
gap: 24px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.slide4-orders__number {
|
|
158
|
+
font-size: 9dvh;
|
|
159
|
+
}
|
|
125
160
|
}
|
|
126
161
|
|
|
127
|
-
/*
|
|
128
|
-
|
|
129
|
-
|
|
162
|
+
/* Small/Short screens - handles browser chrome taking space */
|
|
163
|
+
@media (max-height: 700px) {
|
|
164
|
+
.slide4-orders__content {
|
|
165
|
+
top: calc(50% - 100px/2 - 130px);
|
|
166
|
+
gap: 20px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.slide4-orders__number {
|
|
170
|
+
font-size: 8dvh;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.slide4-orders__label,
|
|
174
|
+
.slide4-orders__caption {
|
|
175
|
+
font-size: clamp(12px, 3.5vw, 14px);
|
|
130
176
|
}
|
|
177
|
+
}
|
|
131
178
|
|
|
179
|
+
/* Extra short screens (under 600px) - more aggressive adjustments */
|
|
180
|
+
@media (max-height: 600px) {
|
|
181
|
+
.slide4-orders__content {
|
|
182
|
+
top: calc(50% - 80px/2 - 100px);
|
|
183
|
+
gap: 16px;
|
|
184
|
+
}
|
|
185
|
+
|
|
132
186
|
.slide4-orders__number {
|
|
133
|
-
font-size:
|
|
187
|
+
font-size: 7dvh;
|
|
134
188
|
}
|
|
135
|
-
|
|
189
|
+
|
|
190
|
+
.slide4-orders__label,
|
|
191
|
+
.slide4-orders__caption {
|
|
192
|
+
font-size: clamp(11px, 3vw, 13px);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import './Slide4Orders.css';
|
|
2
2
|
interface Slide4OrdersProps {
|
|
3
3
|
orders: number;
|
|
4
|
+
frameImages?: string[];
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Slide4Orders - Emphasizes the order volume with rotated card outlines in the background
|
|
7
8
|
*/
|
|
8
|
-
declare function Slide4Orders({ orders }: Slide4OrdersProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function Slide4Orders({ orders, frameImages }: Slide4OrdersProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default Slide4Orders;
|
|
10
11
|
//# sourceMappingURL=Slide4Orders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide4Orders.d.ts","sourceRoot":"","sources":["../../src/slides/Slide4Orders.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Slide4Orders.d.ts","sourceRoot":"","sources":["../../src/slides/Slide4Orders.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAyF/D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,16 +1,58 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { motion } from 'framer-motion';
|
|
3
|
+
import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
|
|
4
4
|
import './Slide4Orders.css';
|
|
5
|
+
/**
|
|
6
|
+
* Custom hook for number counter animation
|
|
7
|
+
*/
|
|
8
|
+
function useCountAnimation(target, duration = 2, delay = 0) {
|
|
9
|
+
const count = useMotionValue(0);
|
|
10
|
+
const rounded = useTransform(count, (latest) => Math.round(latest));
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
const controls = animate(count, target, {
|
|
13
|
+
duration,
|
|
14
|
+
delay,
|
|
15
|
+
ease: 'easeOut',
|
|
16
|
+
});
|
|
17
|
+
return controls.stop;
|
|
18
|
+
}, [count, target, duration, delay]);
|
|
19
|
+
return rounded;
|
|
20
|
+
}
|
|
5
21
|
/**
|
|
6
22
|
* Slide4Orders - Emphasizes the order volume with rotated card outlines in the background
|
|
7
23
|
*/
|
|
8
|
-
function Slide4Orders({ orders }) {
|
|
24
|
+
function Slide4Orders({ orders, frameImages }) {
|
|
25
|
+
const ordersCount = useCountAnimation(orders, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
|
|
9
26
|
const rectGroups = [
|
|
10
27
|
{ id: 'group-1', rects: ['r5', 'r6', 'r7', 'r8'], groupClass: 'group-1' },
|
|
11
28
|
{ id: 'group-2', rects: ['r1', 'r2', 'r3', 'r4'], groupClass: 'group-2' },
|
|
12
29
|
{ id: 'group-3', rects: ['r10', 'r11', 'r12'], groupClass: 'group-3' }
|
|
13
30
|
];
|
|
14
|
-
|
|
31
|
+
const frameImagePool = React.useMemo(() => {
|
|
32
|
+
return frameImages && frameImages.length > 0 ? frameImages : [];
|
|
33
|
+
}, [frameImages]);
|
|
34
|
+
const totalRects = rectGroups.reduce((sum, group) => sum + group.rects.length, 0);
|
|
35
|
+
const rectImageAssignments = React.useMemo(() => {
|
|
36
|
+
if (!frameImagePool.length) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
return Array.from({ length: totalRects }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
|
|
40
|
+
}, [frameImagePool, totalRects]);
|
|
41
|
+
return (_jsxs("div", { className: "slide4-orders", children: [_jsx("div", { className: "slide4-orders__grid", "aria-hidden": "true", children: rectGroups.map((group, groupIndex) => {
|
|
42
|
+
const groupStartIndex = rectGroups
|
|
43
|
+
.slice(0, groupIndex)
|
|
44
|
+
.reduce((sum, current) => sum + current.rects.length, 0);
|
|
45
|
+
return (_jsx(React.Fragment, { children: group.rects.map((rect, rectIndex) => {
|
|
46
|
+
const rectIndexOverall = groupStartIndex + rectIndex;
|
|
47
|
+
const image = rectImageAssignments[rectIndexOverall];
|
|
48
|
+
return (_jsx("span", { className: `slide4-orders__rect ${rect} ${group.groupClass}`, style: image
|
|
49
|
+
? {
|
|
50
|
+
backgroundImage: `url('${image}')`,
|
|
51
|
+
backgroundSize: 'cover',
|
|
52
|
+
backgroundPosition: 'center',
|
|
53
|
+
}
|
|
54
|
+
: undefined }, rect));
|
|
55
|
+
}) }, group.id));
|
|
56
|
+
}) }), _jsxs("div", { className: "slide4-orders__content", children: [_jsx(motion.p, { className: "slide4-orders__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: "orders choke" }), _jsx(motion.div, { className: "slide4-orders__number", initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.8, delay: 0.3 }, children: _jsx(motion.span, { children: ordersCount }) }), _jsxs(motion.p, { className: "slide4-orders__caption", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.6 }, children: ["Na serious hustle be this ", _jsx("span", { "aria-hidden": "true", children: "\uD83D\uDCAA" })] })] })] }));
|
|
15
57
|
}
|
|
16
58
|
export default Slide4Orders;
|
|
@@ -1,52 +1,48 @@
|
|
|
1
|
+
/* Slide5Buyers - Figma exact specifications with blue/purple scheme */
|
|
2
|
+
|
|
1
3
|
.slide5-buyers {
|
|
2
4
|
position: relative;
|
|
3
5
|
width: 100%;
|
|
4
|
-
|
|
6
|
+
height: 100%;
|
|
5
7
|
display: flex;
|
|
6
8
|
align-items: center;
|
|
7
9
|
justify-content: center;
|
|
8
|
-
padding: 9.48% 6.15% 7.11%;
|
|
9
10
|
overflow: hidden;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
@media (max-height: 720px), (orientation: landscape) {
|
|
13
|
-
.slide5-buyers {
|
|
14
|
-
padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
.slide5-buyers__grid {
|
|
19
14
|
position: absolute;
|
|
20
15
|
inset: 0;
|
|
21
|
-
/* width: 650px; */
|
|
22
|
-
height: 100%;
|
|
23
|
-
margin: 0 auto;
|
|
24
16
|
pointer-events: none;
|
|
25
17
|
z-index: 0;
|
|
26
18
|
}
|
|
27
19
|
|
|
28
20
|
.column {
|
|
29
21
|
position: absolute;
|
|
30
|
-
width:
|
|
31
|
-
height: 100%;
|
|
22
|
+
width: 180px;
|
|
32
23
|
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
33
25
|
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
height: 996px;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
.column-left {
|
|
37
|
-
left: -
|
|
32
|
+
left: -130px;
|
|
33
|
+
top: -80.98px;
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
.column-right {
|
|
41
|
-
right: -
|
|
37
|
+
right: -130px;
|
|
38
|
+
top: calc(50% - 996px/2 - 0.5px);
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
.column-inner {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width:
|
|
49
|
-
height: 1300px;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
width: 180px;
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
.column-left .column-inner {
|
|
@@ -58,27 +54,13 @@
|
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
.rect {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
height: 239px;
|
|
57
|
+
width: 180px;
|
|
58
|
+
height: 240px;
|
|
64
59
|
box-sizing: border-box;
|
|
65
|
-
border: 1px solid #
|
|
60
|
+
border: 1px solid #817FE3;
|
|
61
|
+
flex: none;
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
.rect.l1 { top: -251.5px; }
|
|
69
|
-
.rect.l2 { top: 0.5px; }
|
|
70
|
-
.rect.l3 { top: 252.5px; }
|
|
71
|
-
.rect.l4 { top: 504.5px; }
|
|
72
|
-
.rect.l5 { top: 756.5px; }
|
|
73
|
-
.rect.l6 { top: 1008.5px; }
|
|
74
|
-
|
|
75
|
-
.rect.r1 { top: -247.022px; }
|
|
76
|
-
.rect.r2 { top: 4.978px; }
|
|
77
|
-
.rect.r3 { top: 256.978px; }
|
|
78
|
-
.rect.r4 { top: 508.978px; }
|
|
79
|
-
.rect.r5 { top: 760.978px; }
|
|
80
|
-
.rect.r6 { top: 1012.978px; }
|
|
81
|
-
|
|
82
64
|
@keyframes moveUp {
|
|
83
65
|
from { transform: translateY(0); }
|
|
84
66
|
to { transform: translateY(-29.86%); }
|
|
@@ -90,51 +72,126 @@
|
|
|
90
72
|
}
|
|
91
73
|
|
|
92
74
|
.slide5-buyers__content {
|
|
93
|
-
position:
|
|
75
|
+
position: absolute;
|
|
94
76
|
z-index: 1;
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
|
|
78
|
+
max-width: 358px;
|
|
97
79
|
display: flex;
|
|
98
80
|
flex-direction: column;
|
|
99
81
|
align-items: center;
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
gap: 64px;
|
|
83
|
+
left: 50%;
|
|
84
|
+
top: 50%;
|
|
85
|
+
transform: translate(-50%, -50%);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.slide5-buyers__section {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: center;
|
|
92
|
+
width: 100%;
|
|
93
|
+
gap: 16px;
|
|
102
94
|
}
|
|
103
95
|
|
|
104
96
|
.slide5-buyers__number {
|
|
105
|
-
|
|
106
|
-
font-
|
|
97
|
+
width: 100%;
|
|
98
|
+
font-family: 'Lora', serif;
|
|
99
|
+
font-style: normal;
|
|
107
100
|
font-weight: 700;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
color: transparent;
|
|
114
|
-
padding-top: 4.74%;
|
|
101
|
+
font-size: 10vh;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
text-align: center;
|
|
104
|
+
color: var(--primary-blue);
|
|
105
|
+
margin: 0;
|
|
115
106
|
}
|
|
116
107
|
|
|
117
|
-
.slide5-buyers__number
|
|
118
|
-
font-size:
|
|
108
|
+
.slide5-buyers__number--secondary {
|
|
109
|
+
font-size: 8vh;
|
|
110
|
+
color: #FFFFFF;
|
|
111
|
+
-webkit-text-stroke: 1.5px var(--primary-blue);
|
|
112
|
+
paint-order: stroke fill;
|
|
119
113
|
}
|
|
120
114
|
|
|
121
115
|
.slide5-buyers__label {
|
|
122
|
-
|
|
123
|
-
font-
|
|
116
|
+
width: 100%;
|
|
117
|
+
font-family: 'Lora', serif;
|
|
118
|
+
font-style: normal;
|
|
124
119
|
font-weight: 400;
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
font-size: clamp(14px, 4.1vw, 16px);
|
|
121
|
+
line-height: 1.5;
|
|
122
|
+
text-align: center;
|
|
123
|
+
color: #3734D3;
|
|
124
|
+
margin: 0;
|
|
130
125
|
}
|
|
131
126
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
/* Media queries for landscape and short screens */
|
|
128
|
+
@media (max-height: 720px), (orientation: landscape) {
|
|
129
|
+
.slide5-buyers__content {
|
|
130
|
+
gap: 48px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.slide5-buyers__number {
|
|
134
|
+
font-size: 9dvh;
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
.slide5-buyers__number--secondary {
|
|
138
|
+
font-size: 7dvh;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
/* Small/Short screens - handles browser chrome taking space */
|
|
143
|
+
@media (max-height: 700px) {
|
|
144
|
+
.slide5-buyers__content {
|
|
145
|
+
gap: 40px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.slide5-buyers__section {
|
|
149
|
+
gap: 12px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.slide5-buyers__number {
|
|
153
|
+
font-size: 8dvh;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.slide5-buyers__number--secondary {
|
|
157
|
+
font-size: 6dvh;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.slide5-buyers__label {
|
|
161
|
+
font-size: clamp(12px, 3.5vw, 14px);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Extra short screens (under 600px) - more aggressive adjustments */
|
|
166
|
+
@media (max-height: 600px) {
|
|
167
|
+
.slide5-buyers__content {
|
|
168
|
+
gap: 32px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.slide5-buyers__section {
|
|
172
|
+
gap: 8px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.slide5-buyers__number {
|
|
176
|
+
font-size: 7dvh;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.slide5-buyers__number--secondary {
|
|
180
|
+
font-size: 5dvh;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.slide5-buyers__label {
|
|
184
|
+
font-size: clamp(11px, 3vw, 13px);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Large screens - ensure columns are visible */
|
|
189
|
+
@media (min-width: 768px) {
|
|
190
|
+
.column-left {
|
|
191
|
+
left: -80px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.column-right {
|
|
195
|
+
right: -80px;
|
|
196
|
+
}
|
|
140
197
|
}
|
|
@@ -2,10 +2,11 @@ import './Slide5Buyers.css';
|
|
|
2
2
|
interface Slide5BuyersProps {
|
|
3
3
|
firstTimeBuyers: number;
|
|
4
4
|
repeatBuyers: number;
|
|
5
|
+
frameImages?: string[];
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
|
|
8
9
|
*/
|
|
9
|
-
declare function Slide5Buyers({ firstTimeBuyers, repeatBuyers }: Slide5BuyersProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }: Slide5BuyersProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default Slide5Buyers;
|
|
11
12
|
//# sourceMappingURL=Slide5Buyers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide5Buyers.d.ts","sourceRoot":"","sources":["../../src/slides/Slide5Buyers.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Slide5Buyers.d.ts","sourceRoot":"","sources":["../../src/slides/Slide5Buyers.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAiGtF;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
|
|
3
4
|
import './Slide5Buyers.css';
|
|
5
|
+
/**
|
|
6
|
+
* Custom hook for number counter animation
|
|
7
|
+
*/
|
|
8
|
+
function useCountAnimation(target, duration = 2, delay = 0) {
|
|
9
|
+
const count = useMotionValue(0);
|
|
10
|
+
const rounded = useTransform(count, (latest) => Math.round(latest));
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
const controls = animate(count, target, {
|
|
13
|
+
duration,
|
|
14
|
+
delay,
|
|
15
|
+
ease: 'easeOut',
|
|
16
|
+
});
|
|
17
|
+
return controls.stop;
|
|
18
|
+
}, [count, target, duration, delay]);
|
|
19
|
+
return rounded;
|
|
20
|
+
}
|
|
4
21
|
/**
|
|
5
22
|
* Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
|
|
6
23
|
*/
|
|
7
|
-
function Slide5Buyers({ firstTimeBuyers, repeatBuyers }) {
|
|
24
|
+
function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }) {
|
|
25
|
+
const firstTimeBuyersCount = useCountAnimation(firstTimeBuyers, 1.7, 0.3); // 1.7s + 0.3s delay = 2s total
|
|
26
|
+
const repeatBuyersCount = useCountAnimation(repeatBuyers, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
|
|
8
27
|
const leftRects = ['l1', 'l2', 'l3', 'l4', 'l5', 'l6'];
|
|
9
28
|
const rightRects = ['r1', 'r2', 'r3', 'r4', 'r5', 'r6'];
|
|
10
|
-
|
|
29
|
+
const frameImagePool = React.useMemo(() => {
|
|
30
|
+
return frameImages && frameImages.length > 0 ? frameImages : [];
|
|
31
|
+
}, [frameImages]);
|
|
32
|
+
const totalRects = leftRects.length + rightRects.length;
|
|
33
|
+
const rectSources = React.useMemo(() => {
|
|
34
|
+
if (!frameImagePool.length) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
return Array.from({ length: totalRects }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
|
|
38
|
+
}, [frameImagePool, totalRects]);
|
|
39
|
+
const getRectStyle = (index) => {
|
|
40
|
+
const image = rectSources[index];
|
|
41
|
+
if (!image) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
backgroundImage: `url('${image}')`,
|
|
46
|
+
backgroundSize: 'cover',
|
|
47
|
+
backgroundPosition: 'center',
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
return (_jsxs("div", { className: "slide5-buyers", children: [_jsxs("div", { className: "slide5-buyers__grid", "aria-hidden": "true", children: [_jsx("div", { className: "column column-left", children: _jsx("div", { className: "column-inner", children: leftRects.map((rect, index) => (_jsx("span", { className: `rect ${rect}`, style: getRectStyle(index) }, rect))) }) }), _jsx("div", { className: "column column-right", children: _jsx("div", { className: "column-inner", children: rightRects.map((rect, index) => (_jsx("span", { className: `rect ${rect}`, style: getRectStyle(leftRects.length + index) }, rect))) }) })] }), _jsxs("div", { className: "slide5-buyers__content", children: [_jsxs("div", { className: "slide5-buyers__section", children: [_jsx(motion.div, { className: "slide5-buyers__number", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6 }, children: _jsx(motion.span, { children: firstTimeBuyersCount }) }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.2 }, children: "people don buy from you" })] }), _jsxs("div", { className: "slide5-buyers__section", children: [_jsx(motion.div, { className: "slide5-buyers__number slide5-buyers__number--secondary", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.4 }, children: _jsx(motion.span, { children: repeatBuyersCount }) }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.6 }, children: "people come buy again" })] })] })] }));
|
|
11
51
|
}
|
|
12
52
|
export default Slide5Buyers;
|