webs-sdk 0.18.25 → 0.18.26
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/README.md +1 -1
- package/dist/components/ARFilters/ARFilters.d.ts +2 -1
- package/dist/components/ARFilters/ARFilters.d.ts.map +1 -1
- package/dist/components/ARFilters/ARFilters.js +67 -7
- package/dist/components/ARFilters/ARFilters.js.map +1 -1
- package/dist/components/ARFilters/FilterCarousel.d.ts +2 -1
- package/dist/components/ARFilters/FilterCarousel.d.ts.map +1 -1
- package/dist/components/ARFilters/FilterCarousel.js +58 -10
- package/dist/components/ARFilters/FilterCarousel.js.map +1 -1
- package/dist/components/ARFilters/Popups.d.ts +4 -3
- package/dist/components/ARFilters/Popups.d.ts.map +1 -1
- package/dist/components/ARFilters/Popups.js +23 -5
- package/dist/components/ARFilters/Popups.js.map +1 -1
- package/dist/components/AvatarAI.d.ts +4 -3
- package/dist/components/AvatarAI.d.ts.map +1 -1
- package/dist/components/AvatarAI.js +232 -117
- package/dist/components/AvatarAI.js.map +1 -1
- package/dist/components/CookieConsent/CookieConsent.d.ts +2 -1
- package/dist/components/CookieConsent/CookieConsent.d.ts.map +1 -1
- package/dist/components/CookieConsent/CookieConsent.js +66 -4
- package/dist/components/CookieConsent/CookieConsent.js.map +1 -1
- package/dist/components/CreativeFaceSwap.d.ts +4 -3
- package/dist/components/CreativeFaceSwap.d.ts.map +1 -1
- package/dist/components/CreativeFaceSwap.js +203 -56
- package/dist/components/CreativeFaceSwap.js.map +1 -1
- package/dist/components/MemeGenerator.d.ts +3 -2
- package/dist/components/MemeGenerator.d.ts.map +1 -1
- package/dist/components/MemeGenerator.js +162 -62
- package/dist/components/MemeGenerator.js.map +1 -1
- package/dist/components/Quiz.d.ts +3 -2
- package/dist/components/Quiz.d.ts.map +1 -1
- package/dist/components/Quiz.js +345 -260
- package/dist/components/Quiz.js.map +1 -1
- package/dist/components/Ringtone.d.ts +3 -2
- package/dist/components/Ringtone.d.ts.map +1 -1
- package/dist/components/Ringtone.js +78 -17
- package/dist/components/Ringtone.js.map +1 -1
- package/dist/components/SpinningWheel/SpinningWheel.d.ts +2 -1
- package/dist/components/SpinningWheel/SpinningWheel.d.ts.map +1 -1
- package/dist/components/SpinningWheel/SpinningWheel.js +427 -307
- package/dist/components/SpinningWheel/SpinningWheel.js.map +1 -1
- package/dist/components/Stickers.d.ts +3 -2
- package/dist/components/Stickers.d.ts.map +1 -1
- package/dist/components/Stickers.js +164 -108
- package/dist/components/Stickers.js.map +1 -1
- package/dist/components/Wallpapers.d.ts +4 -3
- package/dist/components/Wallpapers.d.ts.map +1 -1
- package/dist/components/Wallpapers.js +225 -162
- package/dist/components/Wallpapers.js.map +1 -1
- package/dist/components/WallpapersName.d.ts +5 -4
- package/dist/components/WallpapersName.d.ts.map +1 -1
- package/dist/components/WallpapersName.js +180 -98
- package/dist/components/WallpapersName.js.map +1 -1
- package/dist/components/esports/live/EsportsLive.d.ts +2 -1
- package/dist/components/esports/live/EsportsLive.d.ts.map +1 -1
- package/dist/components/esports/live/EsportsLive.js +93 -16
- package/dist/components/esports/live/EsportsLive.js.map +1 -1
- package/dist/components/esports/news/EsportsNews.d.ts +2 -1
- package/dist/components/esports/news/EsportsNews.d.ts.map +1 -1
- package/dist/components/esports/news/EsportsNews.js +55 -9
- package/dist/components/esports/news/EsportsNews.js.map +1 -1
- package/dist/components/esports/news/EsportsNewsDetail.d.ts +2 -1
- package/dist/components/esports/news/EsportsNewsDetail.d.ts.map +1 -1
- package/dist/components/esports/news/EsportsNewsDetail.js +36 -5
- package/dist/components/esports/news/EsportsNewsDetail.js.map +1 -1
- package/dist/components/esports/videos/EsportsVideos.d.ts +2 -1
- package/dist/components/esports/videos/EsportsVideos.d.ts.map +1 -1
- package/dist/components/esports/videos/EsportsVideos.js +67 -9
- package/dist/components/esports/videos/EsportsVideos.js.map +1 -1
- package/dist/components/ui/VideoPlayer.d.ts +2 -1
- package/dist/components/ui/VideoPlayer.d.ts.map +1 -1
- package/dist/components/ui/VideoPlayer.js +61 -5
- package/dist/components/ui/VideoPlayer.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -3
- package/dist/index.js.map +1 -1
- package/dist/libraries/networking.d.ts +1 -0
- package/dist/libraries/networking.d.ts.map +1 -1
- package/dist/libraries/networking.js +7 -0
- package/dist/libraries/networking.js.map +1 -1
- package/dist/libraries/session.d.ts +10 -1
- package/dist/libraries/session.d.ts.map +1 -1
- package/dist/libraries/session.js +54 -1
- package/dist/libraries/session.js.map +1 -1
- package/dist/libraries/utils.d.ts +0 -2
- package/dist/libraries/utils.d.ts.map +1 -1
- package/dist/libraries/utils.js +0 -6
- package/dist/libraries/utils.js.map +1 -1
- package/package.json +6 -40
- package/dist/components/ui/accordion.d.ts +0 -8
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -70
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -16
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -87
- package/dist/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -21
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -5
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.js +0 -43
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/avatar.d.ts +0 -12
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/avatar.js +0 -75
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -6
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -23
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/breadcrumb.d.ts +0 -14
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.js +0 -48
- package/dist/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/button-group.d.ts +0 -12
- package/dist/components/ui/button-group.d.ts.map +0 -1
- package/dist/components/ui/button-group.js +0 -32
- package/dist/components/ui/button-group.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -7
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -58
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/cards.d.ts +0 -12
- package/dist/components/ui/cards.d.ts.map +0 -1
- package/dist/components/ui/cards.js +0 -44
- package/dist/components/ui/cards.js.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -28
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -136
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -5
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -44
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -7
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -64
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/context-menu.d.ts +0 -30
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/context-menu.js +0 -115
- package/dist/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -14
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -79
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -19
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -125
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/dropdown.d.ts +0 -19
- package/dist/components/ui/dropdown.d.ts.map +0 -1
- package/dist/components/ui/dropdown.js +0 -99
- package/dist/components/ui/dropdown.js.map +0 -1
- package/dist/components/ui/field.d.ts +0 -24
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/field.js +0 -62
- package/dist/components/ui/field.js.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -7
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/hover-card.js +0 -51
- package/dist/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/index.d.ts +0 -32
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -48
- package/dist/components/ui/index.js.map +0 -1
- package/dist/components/ui/input-group.d.ts +0 -13
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input-group.js +0 -50
- package/dist/components/ui/input-group.js.map +0 -1
- package/dist/components/ui/input.d.ts +0 -4
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -8
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/item.d.ts +0 -24
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/item.js +0 -91
- package/dist/components/ui/item.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -43
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -15
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js +0 -88
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/select.d.ts +0 -14
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/select.js +0 -80
- package/dist/components/ui/select.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -43
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/skeleton.d.ts +0 -4
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/skeleton.js +0 -21
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -55
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -8
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/toast.d.ts +0 -5
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toast.js +0 -13
- package/dist/components/ui/toast.js.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -8
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -55
- package/dist/components/ui/tooltip.js.map +0 -1
package/dist/components/Quiz.js
CHANGED
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.Quiz = Quiz;
|
|
4
37
|
exports.QuizForYouCard = QuizForYouCard;
|
|
5
|
-
const
|
|
6
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
7
39
|
function parseMeta(raw) {
|
|
8
40
|
if (!raw)
|
|
9
41
|
return {};
|
|
@@ -154,7 +186,7 @@ function normalizeResponse(json) {
|
|
|
154
186
|
}
|
|
155
187
|
function QuizCard({ quiz, index, theme, texts, onClick }) {
|
|
156
188
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
157
|
-
return (
|
|
189
|
+
return (react_1.default.createElement("div", { onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), style: {
|
|
158
190
|
backgroundColor: theme.cardBackground,
|
|
159
191
|
border: `1.5px solid ${hovered ? theme.primaryColor : theme.cardBorderColor}`,
|
|
160
192
|
borderRadius: '16px',
|
|
@@ -165,57 +197,62 @@ function QuizCard({ quiz, index, theme, texts, onClick }) {
|
|
|
165
197
|
boxShadow: hovered ? '0 8px 24px rgba(0,0,0,0.12)' : '0 2px 8px rgba(0,0,0,0.06)',
|
|
166
198
|
display: 'flex',
|
|
167
199
|
flexDirection: 'column',
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
200
|
+
} },
|
|
201
|
+
react_1.default.createElement("div", { style: {
|
|
202
|
+
width: '100%',
|
|
203
|
+
aspectRatio: '16/9',
|
|
204
|
+
backgroundColor: theme.backgroundColor,
|
|
205
|
+
overflow: 'hidden',
|
|
206
|
+
position: 'relative',
|
|
207
|
+
display: 'flex',
|
|
208
|
+
alignItems: 'center',
|
|
209
|
+
justifyContent: 'center',
|
|
210
|
+
} }, quiz.thumbnail ? (react_1.default.createElement("img", { src: quiz.thumbnail, alt: quiz.title, style: { width: '100%', height: '100%', objectFit: 'cover' } })) : (react_1.default.createElement("div", { style: {
|
|
211
|
+
width: '56px',
|
|
212
|
+
height: '56px',
|
|
213
|
+
borderRadius: '50%',
|
|
214
|
+
backgroundColor: theme.primaryColor,
|
|
215
|
+
display: 'flex',
|
|
216
|
+
alignItems: 'center',
|
|
217
|
+
justifyContent: 'center',
|
|
218
|
+
color: theme.buttonTextColor,
|
|
219
|
+
fontSize: '24px',
|
|
220
|
+
fontWeight: 700,
|
|
221
|
+
} }, index + 1))),
|
|
222
|
+
react_1.default.createElement("div", { style: { padding: '16px', flex: 1, display: 'flex', flexDirection: 'column', gap: '8px' } },
|
|
223
|
+
react_1.default.createElement("p", { style: {
|
|
224
|
+
color: theme.textColor,
|
|
225
|
+
fontSize: '15px',
|
|
226
|
+
lineHeight: 1.4,
|
|
227
|
+
margin: 0,
|
|
228
|
+
fontWeight: 700,
|
|
229
|
+
display: '-webkit-box',
|
|
230
|
+
WebkitLineClamp: 2,
|
|
231
|
+
WebkitBoxOrient: 'vertical',
|
|
172
232
|
overflow: 'hidden',
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
WebkitBoxOrient: 'vertical',
|
|
197
|
-
overflow: 'hidden',
|
|
198
|
-
}, children: quiz.title }), quiz.description && ((0, jsx_runtime_1.jsx)("p", { style: {
|
|
199
|
-
color: theme.neutralMid,
|
|
200
|
-
fontSize: '13px',
|
|
201
|
-
lineHeight: 1.4,
|
|
202
|
-
margin: 0,
|
|
203
|
-
display: '-webkit-box',
|
|
204
|
-
WebkitLineClamp: 2,
|
|
205
|
-
WebkitBoxOrient: 'vertical',
|
|
206
|
-
overflow: 'hidden',
|
|
207
|
-
}, children: quiz.description })), (0, jsx_runtime_1.jsx)("button", { style: {
|
|
208
|
-
marginTop: 'auto',
|
|
209
|
-
padding: '8px 16px',
|
|
210
|
-
borderRadius: '20px',
|
|
211
|
-
border: 'none',
|
|
212
|
-
backgroundColor: theme.buttonColor,
|
|
213
|
-
color: theme.buttonTextColor,
|
|
214
|
-
fontSize: '13px',
|
|
215
|
-
fontWeight: 600,
|
|
216
|
-
cursor: 'pointer',
|
|
217
|
-
transition: 'opacity 0.2s',
|
|
218
|
-
}, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.85'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '1'; }, children: texts.startQuiz })] })] }));
|
|
233
|
+
} }, quiz.title),
|
|
234
|
+
quiz.description && (react_1.default.createElement("p", { style: {
|
|
235
|
+
color: theme.neutralMid,
|
|
236
|
+
fontSize: '13px',
|
|
237
|
+
lineHeight: 1.4,
|
|
238
|
+
margin: 0,
|
|
239
|
+
display: '-webkit-box',
|
|
240
|
+
WebkitLineClamp: 2,
|
|
241
|
+
WebkitBoxOrient: 'vertical',
|
|
242
|
+
overflow: 'hidden',
|
|
243
|
+
} }, quiz.description)),
|
|
244
|
+
react_1.default.createElement("button", { style: {
|
|
245
|
+
marginTop: 'auto',
|
|
246
|
+
padding: '8px 16px',
|
|
247
|
+
borderRadius: '20px',
|
|
248
|
+
border: 'none',
|
|
249
|
+
backgroundColor: theme.buttonColor,
|
|
250
|
+
color: theme.buttonTextColor,
|
|
251
|
+
fontSize: '13px',
|
|
252
|
+
fontWeight: 600,
|
|
253
|
+
cursor: 'pointer',
|
|
254
|
+
transition: 'opacity 0.2s',
|
|
255
|
+
}, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.85'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '1'; } }, texts.startQuiz))));
|
|
219
256
|
}
|
|
220
257
|
function QuizModal({ questions, results, startIndex, theme, texts, onClose }) {
|
|
221
258
|
var _a;
|
|
@@ -306,67 +343,9 @@ function QuizModal({ questions, results, startIndex, theme, texts, onClose }) {
|
|
|
306
343
|
const matchedResult = results.find(r => score >= r.minPoints && score <= r.maxPoints);
|
|
307
344
|
resultMessage = matchedResult === null || matchedResult === void 0 ? void 0 : matchedResult.description;
|
|
308
345
|
}
|
|
309
|
-
return (
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
right: '16px',
|
|
313
|
-
background: 'none',
|
|
314
|
-
border: 'none',
|
|
315
|
-
cursor: 'pointer',
|
|
316
|
-
color: theme.neutralMid,
|
|
317
|
-
fontSize: '20px',
|
|
318
|
-
lineHeight: 1,
|
|
319
|
-
}, children: "\u2715" }), (0, jsx_runtime_1.jsxs)("div", { style: { textAlign: 'center', paddingTop: '8px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
320
|
-
width: '80px',
|
|
321
|
-
height: '80px',
|
|
322
|
-
borderRadius: '50%',
|
|
323
|
-
backgroundColor: theme.primaryColor,
|
|
324
|
-
margin: '0 auto 20px',
|
|
325
|
-
display: 'flex',
|
|
326
|
-
alignItems: 'center',
|
|
327
|
-
justifyContent: 'center',
|
|
328
|
-
fontSize: '32px',
|
|
329
|
-
color: theme.buttonTextColor,
|
|
330
|
-
}, children: "\uD83C\uDFC6" }), isQuizPointsBased ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { style: {
|
|
331
|
-
fontSize: '18px',
|
|
332
|
-
fontWeight: 600,
|
|
333
|
-
color: theme.textColor,
|
|
334
|
-
margin: '0 0 16px',
|
|
335
|
-
}, children: formatLabel(texts.scoreLabel, { score, total: score }) }), resultMessage && ((0, jsx_runtime_1.jsx)("p", { style: {
|
|
336
|
-
fontSize: '15px',
|
|
337
|
-
lineHeight: 1.6,
|
|
338
|
-
color: theme.neutralMid,
|
|
339
|
-
margin: 0,
|
|
340
|
-
textAlign: 'left',
|
|
341
|
-
}, children: resultMessage }))] })) : ((0, jsx_runtime_1.jsx)("p", { style: {
|
|
342
|
-
fontSize: '22px',
|
|
343
|
-
fontWeight: 700,
|
|
344
|
-
color: theme.textColor,
|
|
345
|
-
margin: '0 0 8px',
|
|
346
|
-
}, children: formatLabel(texts.scoreLabel, { score, total }) }))] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', marginTop: '8px' }, children: [(0, jsx_runtime_1.jsx)("button", { onClick: handleRetry, style: {
|
|
347
|
-
flex: 1,
|
|
348
|
-
padding: '12px',
|
|
349
|
-
borderRadius: '12px',
|
|
350
|
-
border: `1.5px solid ${theme.primaryColor}`,
|
|
351
|
-
backgroundColor: 'transparent',
|
|
352
|
-
color: theme.primaryColor,
|
|
353
|
-
fontWeight: 600,
|
|
354
|
-
cursor: 'pointer',
|
|
355
|
-
fontSize: '14px',
|
|
356
|
-
}, children: texts.retryButton }), (0, jsx_runtime_1.jsx)("button", { onClick: onClose, style: {
|
|
357
|
-
flex: 1,
|
|
358
|
-
padding: '12px',
|
|
359
|
-
borderRadius: '12px',
|
|
360
|
-
border: 'none',
|
|
361
|
-
backgroundColor: theme.primaryColor,
|
|
362
|
-
color: theme.buttonTextColor,
|
|
363
|
-
fontWeight: 600,
|
|
364
|
-
cursor: 'pointer',
|
|
365
|
-
fontSize: '14px',
|
|
366
|
-
}, children: texts.closeButton })] })] }) }));
|
|
367
|
-
}
|
|
368
|
-
const isCorrect = !isPointsBased && selectedOption !== null && selectedOption === current.correctIndex;
|
|
369
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: overlayStyle, onClick: handleOverlayClick, children: (0, jsx_runtime_1.jsxs)("div", { style: modalStyle, children: [(0, jsx_runtime_1.jsx)("button", { onClick: onClose, "aria-label": texts.closeButton, style: {
|
|
346
|
+
return (react_1.default.createElement("div", { style: overlayStyle, onClick: handleOverlayClick },
|
|
347
|
+
react_1.default.createElement("div", { style: modalStyle },
|
|
348
|
+
react_1.default.createElement("button", { onClick: onClose, "aria-label": texts.closeButton, style: {
|
|
370
349
|
position: 'absolute',
|
|
371
350
|
top: '16px',
|
|
372
351
|
right: '16px',
|
|
@@ -376,98 +355,185 @@ function QuizModal({ questions, results, startIndex, theme, texts, onClose }) {
|
|
|
376
355
|
color: theme.neutralMid,
|
|
377
356
|
fontSize: '20px',
|
|
378
357
|
lineHeight: 1,
|
|
379
|
-
},
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
let bg = theme.cardBackground;
|
|
406
|
-
let border = theme.cardBorderColor;
|
|
407
|
-
let color = theme.textColor;
|
|
408
|
-
const hasAnswer = selectedOption !== null;
|
|
409
|
-
if (hasAnswer && !isPointsBased) {
|
|
410
|
-
if (idx === current.correctIndex) {
|
|
411
|
-
bg = '#E8F5E9';
|
|
412
|
-
border = '#4CAF50';
|
|
413
|
-
color = '#1B5E20';
|
|
414
|
-
}
|
|
415
|
-
else if (idx === selectedOption) {
|
|
416
|
-
bg = '#FFEBEE';
|
|
417
|
-
border = '#F44336';
|
|
418
|
-
color = '#B71C1C';
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
else if (idx === selectedOption) {
|
|
422
|
-
bg = theme.primaryColor;
|
|
423
|
-
color = theme.buttonTextColor;
|
|
424
|
-
border = theme.primaryColor;
|
|
425
|
-
}
|
|
426
|
-
return ((0, jsx_runtime_1.jsx)("button", { onClick: () => handleSelect(idx), style: {
|
|
427
|
-
padding: '12px 16px',
|
|
428
|
-
borderRadius: '12px',
|
|
429
|
-
border: `1.5px solid ${border}`,
|
|
430
|
-
backgroundColor: bg,
|
|
431
|
-
color,
|
|
432
|
-
fontSize: '14px',
|
|
433
|
-
fontWeight: 500,
|
|
358
|
+
} }, "\u2715"),
|
|
359
|
+
react_1.default.createElement("div", { style: { textAlign: 'center', paddingTop: '8px' } },
|
|
360
|
+
react_1.default.createElement("div", { style: {
|
|
361
|
+
width: '80px',
|
|
362
|
+
height: '80px',
|
|
363
|
+
borderRadius: '50%',
|
|
364
|
+
backgroundColor: theme.primaryColor,
|
|
365
|
+
margin: '0 auto 20px',
|
|
366
|
+
display: 'flex',
|
|
367
|
+
alignItems: 'center',
|
|
368
|
+
justifyContent: 'center',
|
|
369
|
+
fontSize: '32px',
|
|
370
|
+
color: theme.buttonTextColor,
|
|
371
|
+
} }, "\uD83C\uDFC6"),
|
|
372
|
+
isQuizPointsBased ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
373
|
+
react_1.default.createElement("p", { style: {
|
|
374
|
+
fontSize: '18px',
|
|
375
|
+
fontWeight: 600,
|
|
376
|
+
color: theme.textColor,
|
|
377
|
+
margin: '0 0 16px',
|
|
378
|
+
} }, formatLabel(texts.scoreLabel, { score, total: score })),
|
|
379
|
+
resultMessage && (react_1.default.createElement("p", { style: {
|
|
380
|
+
fontSize: '15px',
|
|
381
|
+
lineHeight: 1.6,
|
|
382
|
+
color: theme.neutralMid,
|
|
383
|
+
margin: 0,
|
|
434
384
|
textAlign: 'left',
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
385
|
+
} }, resultMessage)))) : (react_1.default.createElement("p", { style: {
|
|
386
|
+
fontSize: '22px',
|
|
387
|
+
fontWeight: 700,
|
|
388
|
+
color: theme.textColor,
|
|
389
|
+
margin: '0 0 8px',
|
|
390
|
+
} }, formatLabel(texts.scoreLabel, { score, total })))),
|
|
391
|
+
react_1.default.createElement("div", { style: { display: 'flex', gap: '12px', marginTop: '8px' } },
|
|
392
|
+
react_1.default.createElement("button", { onClick: handleRetry, style: {
|
|
393
|
+
flex: 1,
|
|
394
|
+
padding: '12px',
|
|
395
|
+
borderRadius: '12px',
|
|
396
|
+
border: `1.5px solid ${theme.primaryColor}`,
|
|
397
|
+
backgroundColor: 'transparent',
|
|
398
|
+
color: theme.primaryColor,
|
|
399
|
+
fontWeight: 600,
|
|
400
|
+
cursor: 'pointer',
|
|
401
|
+
fontSize: '14px',
|
|
402
|
+
} }, texts.retryButton),
|
|
403
|
+
react_1.default.createElement("button", { onClick: onClose, style: {
|
|
404
|
+
flex: 1,
|
|
405
|
+
padding: '12px',
|
|
406
|
+
borderRadius: '12px',
|
|
407
|
+
border: 'none',
|
|
408
|
+
backgroundColor: theme.primaryColor,
|
|
409
|
+
color: theme.buttonTextColor,
|
|
410
|
+
fontWeight: 600,
|
|
411
|
+
cursor: 'pointer',
|
|
412
|
+
fontSize: '14px',
|
|
413
|
+
} }, texts.closeButton)))));
|
|
414
|
+
}
|
|
415
|
+
const isCorrect = !isPointsBased && selectedOption !== null && selectedOption === current.correctIndex;
|
|
416
|
+
return (react_1.default.createElement("div", { style: overlayStyle, onClick: handleOverlayClick },
|
|
417
|
+
react_1.default.createElement("div", { style: modalStyle },
|
|
418
|
+
react_1.default.createElement("button", { onClick: onClose, "aria-label": texts.closeButton, style: {
|
|
419
|
+
position: 'absolute',
|
|
420
|
+
top: '16px',
|
|
421
|
+
right: '16px',
|
|
422
|
+
background: 'none',
|
|
423
|
+
border: 'none',
|
|
424
|
+
cursor: 'pointer',
|
|
425
|
+
color: theme.neutralMid,
|
|
426
|
+
fontSize: '20px',
|
|
427
|
+
lineHeight: 1,
|
|
428
|
+
} }, "\u2715"),
|
|
429
|
+
react_1.default.createElement("div", { style: { paddingTop: '4px' } },
|
|
430
|
+
react_1.default.createElement("div", { style: {
|
|
431
|
+
display: 'flex',
|
|
432
|
+
justifyContent: 'space-between',
|
|
433
|
+
alignItems: 'center',
|
|
434
|
+
marginBottom: '8px',
|
|
435
|
+
} },
|
|
436
|
+
react_1.default.createElement("span", { style: { fontSize: '12px', color: theme.neutralMid } }, formatLabel(texts.questionLabel, { current: currentIndex + 1, total }))),
|
|
437
|
+
react_1.default.createElement("div", { style: {
|
|
438
|
+
height: '4px',
|
|
439
|
+
borderRadius: '2px',
|
|
440
|
+
backgroundColor: theme.cardBorderColor,
|
|
441
|
+
overflow: 'hidden',
|
|
442
|
+
} },
|
|
443
|
+
react_1.default.createElement("div", { style: {
|
|
444
|
+
height: '100%',
|
|
445
|
+
width: `${((currentIndex + 1) / total) * 100}%`,
|
|
446
|
+
backgroundColor: theme.primaryColor,
|
|
447
|
+
transition: 'width 0.3s',
|
|
448
|
+
} }))),
|
|
449
|
+
current.thumbnail && (react_1.default.createElement("div", { style: {
|
|
450
|
+
borderRadius: '12px',
|
|
451
|
+
overflow: 'hidden',
|
|
452
|
+
aspectRatio: '16/9',
|
|
453
|
+
} },
|
|
454
|
+
react_1.default.createElement("img", { src: current.thumbnail, alt: current.question, style: { width: '100%', height: '100%', objectFit: 'cover' } }))),
|
|
455
|
+
react_1.default.createElement("p", { style: {
|
|
456
|
+
fontSize: '18px',
|
|
457
|
+
fontWeight: 700,
|
|
458
|
+
color: theme.textColor,
|
|
459
|
+
margin: 0,
|
|
460
|
+
lineHeight: 1.45,
|
|
461
|
+
} }, current.question),
|
|
462
|
+
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' } }, current.options.map((option, idx) => {
|
|
463
|
+
let bg = theme.cardBackground;
|
|
464
|
+
let border = theme.cardBorderColor;
|
|
465
|
+
let color = theme.textColor;
|
|
466
|
+
const hasAnswer = selectedOption !== null;
|
|
467
|
+
if (hasAnswer && !isPointsBased) {
|
|
468
|
+
if (idx === current.correctIndex) {
|
|
469
|
+
bg = '#E8F5E9';
|
|
470
|
+
border = '#4CAF50';
|
|
471
|
+
color = '#1B5E20';
|
|
472
|
+
}
|
|
473
|
+
else if (idx === selectedOption) {
|
|
474
|
+
bg = '#FFEBEE';
|
|
475
|
+
border = '#F44336';
|
|
476
|
+
color = '#B71C1C';
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
else if (idx === selectedOption) {
|
|
480
|
+
bg = theme.primaryColor;
|
|
481
|
+
color = theme.buttonTextColor;
|
|
482
|
+
border = theme.primaryColor;
|
|
483
|
+
}
|
|
484
|
+
return (react_1.default.createElement("button", { key: idx, onClick: () => handleSelect(idx), style: {
|
|
485
|
+
padding: '12px 16px',
|
|
486
|
+
borderRadius: '12px',
|
|
487
|
+
border: `1.5px solid ${border}`,
|
|
488
|
+
backgroundColor: bg,
|
|
489
|
+
color,
|
|
440
490
|
fontSize: '14px',
|
|
441
|
-
fontWeight:
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
491
|
+
fontWeight: 500,
|
|
492
|
+
textAlign: 'left',
|
|
493
|
+
cursor: 'pointer',
|
|
494
|
+
transition: 'all 0.2s',
|
|
495
|
+
lineHeight: 1.5,
|
|
496
|
+
} }, option.text));
|
|
497
|
+
})),
|
|
498
|
+
selectedOption !== null && !isPointsBased && (react_1.default.createElement("p", { style: {
|
|
499
|
+
fontSize: '14px',
|
|
500
|
+
fontWeight: 600,
|
|
501
|
+
color: isCorrect ? '#2E7D32' : '#C62828',
|
|
502
|
+
margin: 0,
|
|
503
|
+
} },
|
|
504
|
+
isCorrect ? texts.correctAnswer : texts.wrongAnswer,
|
|
505
|
+
current.explanation && (react_1.default.createElement("span", { style: { fontWeight: 400, display: 'block', marginTop: 4 } }, current.explanation)))),
|
|
506
|
+
react_1.default.createElement("div", { style: { display: 'flex', gap: '12px' } },
|
|
507
|
+
currentIndex > 0 && (react_1.default.createElement("button", { onClick: handlePrevious, style: {
|
|
508
|
+
flex: 1,
|
|
509
|
+
padding: '14px',
|
|
510
|
+
borderRadius: '12px',
|
|
511
|
+
border: `1.5px solid ${theme.primaryColor}`,
|
|
512
|
+
backgroundColor: 'transparent',
|
|
513
|
+
color: theme.primaryColor,
|
|
514
|
+
fontWeight: 700,
|
|
515
|
+
fontSize: '15px',
|
|
516
|
+
cursor: 'pointer',
|
|
517
|
+
transition: 'opacity 0.2s',
|
|
518
|
+
}, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.85'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '1'; } },
|
|
519
|
+
"\u2190 ",
|
|
520
|
+
texts.previousButton)),
|
|
521
|
+
react_1.default.createElement("button", { onClick: handleNext, disabled: selectedOption === null, style: {
|
|
522
|
+
flex: currentIndex > 0 ? 1 : 'auto',
|
|
523
|
+
width: currentIndex === 0 ? '100%' : 'auto',
|
|
524
|
+
padding: '14px',
|
|
525
|
+
borderRadius: '12px',
|
|
526
|
+
border: 'none',
|
|
527
|
+
backgroundColor: selectedOption === null ? theme.neutralMid : theme.primaryColor,
|
|
528
|
+
color: theme.buttonTextColor,
|
|
529
|
+
fontWeight: 700,
|
|
530
|
+
fontSize: '15px',
|
|
531
|
+
cursor: selectedOption === null ? 'not-allowed' : 'pointer',
|
|
532
|
+
transition: 'opacity 0.2s',
|
|
533
|
+
opacity: selectedOption === null ? 0.5 : 1,
|
|
534
|
+
}, onMouseEnter: (e) => { if (selectedOption !== null)
|
|
535
|
+
e.currentTarget.style.opacity = '0.85'; }, onMouseLeave: (e) => { if (selectedOption !== null)
|
|
536
|
+
e.currentTarget.style.opacity = '1'; } }, currentIndex + 1 >= total ? texts.submitButton : texts.nextButton)))));
|
|
471
537
|
}
|
|
472
538
|
const DEFAULT_THEME = {
|
|
473
539
|
primaryColor: '#FF2273',
|
|
@@ -593,68 +659,87 @@ function Quiz({ config, theme: themeP, texts: textsP, onQuizStart, onQuizComplet
|
|
|
593
659
|
}, []);
|
|
594
660
|
const visible = quizItems.slice(0, visibleCount);
|
|
595
661
|
const hasMore = visibleCount < quizItems.length;
|
|
596
|
-
return (
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
662
|
+
return (react_1.default.createElement("div", { style: { backgroundColor: theme.backgroundColor, minHeight: '100vh' } },
|
|
663
|
+
react_1.default.createElement("div", { style: { padding: '40px 16px', maxWidth: '1200px', margin: '0 auto' } },
|
|
664
|
+
react_1.default.createElement("div", { style: { textAlign: 'center', marginBottom: '32px' } },
|
|
665
|
+
react_1.default.createElement("h2", { style: {
|
|
666
|
+
fontSize: '28px',
|
|
667
|
+
fontWeight: 700,
|
|
668
|
+
color: theme.titleDarkColor,
|
|
669
|
+
margin: '0 0 8px',
|
|
670
|
+
} }, texts.title),
|
|
671
|
+
texts.subtitle && (react_1.default.createElement("p", { style: {
|
|
672
|
+
fontSize: '16px',
|
|
673
|
+
color: theme.neutralMid,
|
|
674
|
+
margin: 0,
|
|
675
|
+
} }, texts.subtitle))),
|
|
676
|
+
loading ? (react_1.default.createElement("div", { style: { textAlign: 'center', padding: '40px', color: theme.neutralMid } }, texts.loading)) : quizItems.length === 0 ? (react_1.default.createElement("div", { style: { textAlign: 'center', padding: '40px', color: theme.neutralMid } }, texts.noItems)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
677
|
+
react_1.default.createElement("div", { style: {
|
|
678
|
+
display: 'grid',
|
|
679
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))',
|
|
680
|
+
gap: '20px',
|
|
681
|
+
marginBottom: '32px',
|
|
682
|
+
} }, visible.map((quiz, idx) => (react_1.default.createElement(QuizCard, { key: quiz.id, quiz: quiz, index: idx, theme: theme, texts: texts, onClick: () => handleCardClick(quiz) })))),
|
|
683
|
+
hasMore && (react_1.default.createElement("div", { style: { textAlign: 'center' } },
|
|
684
|
+
react_1.default.createElement("button", { onClick: () => setVisibleCount(v => v + loadMoreCount), style: {
|
|
685
|
+
padding: '12px 32px',
|
|
686
|
+
borderRadius: '24px',
|
|
687
|
+
border: `1.5px solid ${theme.primaryColor}`,
|
|
688
|
+
backgroundColor: 'transparent',
|
|
689
|
+
color: theme.primaryColor,
|
|
690
|
+
fontWeight: 600,
|
|
691
|
+
fontSize: '15px',
|
|
692
|
+
cursor: 'pointer',
|
|
693
|
+
transition: 'all 0.2s',
|
|
694
|
+
}, onMouseEnter: (e) => {
|
|
695
|
+
e.currentTarget.style.backgroundColor = theme.primaryColor;
|
|
696
|
+
e.currentTarget.style.color = theme.buttonTextColor;
|
|
697
|
+
}, onMouseLeave: (e) => {
|
|
698
|
+
e.currentTarget.style.backgroundColor = 'transparent';
|
|
699
|
+
e.currentTarget.style.color = theme.primaryColor;
|
|
700
|
+
} }, texts.loadMore)))))),
|
|
701
|
+
activeQuiz && loadingQuestions && (react_1.default.createElement("div", { style: {
|
|
702
|
+
position: 'fixed',
|
|
703
|
+
inset: 0,
|
|
704
|
+
zIndex: 9999,
|
|
705
|
+
backgroundColor: 'rgba(0,0,0,0.6)',
|
|
706
|
+
display: 'flex',
|
|
707
|
+
alignItems: 'center',
|
|
708
|
+
justifyContent: 'center',
|
|
709
|
+
} },
|
|
710
|
+
react_1.default.createElement("div", { style: {
|
|
711
|
+
backgroundColor: theme.cardBackground,
|
|
712
|
+
borderRadius: '20px',
|
|
713
|
+
padding: '40px',
|
|
714
|
+
textAlign: 'center',
|
|
715
|
+
color: theme.textColor,
|
|
716
|
+
} }, texts.loadingQuestions))),
|
|
717
|
+
activeQuiz && !loadingQuestions && activeQuestions.length > 0 && (react_1.default.createElement(QuizModal, { questions: activeQuestions, results: activeResults, startIndex: 0, theme: theme, texts: texts, onClose: handleCloseModal }))));
|
|
641
718
|
}
|
|
642
719
|
function QuizForYouCard({ title, description, ctaText, ctaHref, desktopImage, mobileImage, imageAlt = '', imageOnRight = false, titleColor = '#210F5C', descriptionColor = '#0F1F35', ctaColor = '#FF2273', ctaHoverColor = '#E81F69', backgroundColor = '#FFFFFF', paddingClass = '', }) {
|
|
643
|
-
return (
|
|
720
|
+
return (react_1.default.createElement("div", { style: { backgroundColor, width: '100%' }, className: paddingClass },
|
|
721
|
+
react_1.default.createElement("div", { style: {
|
|
644
722
|
display: 'flex',
|
|
645
723
|
flexDirection: imageOnRight ? 'row-reverse' : 'row',
|
|
646
724
|
minHeight: '420px',
|
|
647
725
|
alignItems: 'stretch',
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
726
|
+
} },
|
|
727
|
+
react_1.default.createElement("div", { style: { flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '40px' } },
|
|
728
|
+
react_1.default.createElement("div", { style: { maxWidth: '400px', textAlign: 'center' } },
|
|
729
|
+
react_1.default.createElement("h2", { style: { color: titleColor, fontSize: '32px', fontWeight: 700, marginBottom: '16px' } }, title),
|
|
730
|
+
react_1.default.createElement("p", { style: { color: descriptionColor, fontSize: '16px', marginBottom: '24px' } }, description),
|
|
731
|
+
react_1.default.createElement("a", { href: ctaHref, style: {
|
|
732
|
+
display: 'inline-block',
|
|
733
|
+
padding: '12px 32px',
|
|
734
|
+
borderRadius: '24px',
|
|
735
|
+
backgroundColor: ctaColor,
|
|
736
|
+
color: '#fff',
|
|
737
|
+
textDecoration: 'none',
|
|
738
|
+
fontWeight: 600,
|
|
739
|
+
transition: 'background-color 0.2s',
|
|
740
|
+
}, onMouseEnter: (e) => { e.currentTarget.style.backgroundColor = ctaHoverColor; }, onMouseLeave: (e) => { e.currentTarget.style.backgroundColor = ctaColor; } }, ctaText))),
|
|
741
|
+
react_1.default.createElement("div", { style: { flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '20px' } },
|
|
742
|
+
react_1.default.createElement("img", { src: desktopImage, alt: imageAlt, style: { maxWidth: '100%', height: 'auto' } })))));
|
|
658
743
|
}
|
|
659
744
|
exports.default = Quiz;
|
|
660
745
|
//# sourceMappingURL=Quiz.js.map
|