@deriv-web-design/ui 0.0.2 → 0.0.4
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 +39 -27
- package/dist/index.css +2485 -245
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +405 -1
- package/dist/index.d.ts +405 -1
- package/dist/index.js +1786 -294
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1785 -291
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -7
- package/tokens.css +17 -193
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// primitives/Button/Button.module.css
|
|
2
|
-
var Button_default = {};
|
|
3
|
-
|
|
4
1
|
// primitives/Button/Button.tsx
|
|
5
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
3
|
var Button = ({
|
|
@@ -18,13 +15,13 @@ var Button = ({
|
|
|
18
15
|
}) => {
|
|
19
16
|
const isIconOnly = iconPosition === "icon-only";
|
|
20
17
|
const classNames = [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
isIconOnly ?
|
|
24
|
-
fullWidth ?
|
|
18
|
+
"button",
|
|
19
|
+
`${colorScheme}_${variant}`,
|
|
20
|
+
isIconOnly ? "iconOnly" : "",
|
|
21
|
+
fullWidth ? "fullWidth" : "",
|
|
25
22
|
className ?? ""
|
|
26
23
|
].filter(Boolean).join(" ");
|
|
27
|
-
const iconNode = icon ? /* @__PURE__ */ jsx("span", { className:
|
|
24
|
+
const iconNode = icon ? /* @__PURE__ */ jsx("span", { className: "icon", children: icon }) : null;
|
|
28
25
|
return /* @__PURE__ */ jsxs(
|
|
29
26
|
"button",
|
|
30
27
|
{
|
|
@@ -34,18 +31,15 @@ var Button = ({
|
|
|
34
31
|
...props,
|
|
35
32
|
children: [
|
|
36
33
|
iconPosition === "icon-left" && iconNode,
|
|
37
|
-
!isIconOnly && /* @__PURE__ */ jsx("span", { className:
|
|
34
|
+
!isIconOnly && /* @__PURE__ */ jsx("span", { className: "label", children: label ?? children }),
|
|
38
35
|
iconPosition === "icon-only" && iconNode,
|
|
39
36
|
iconPosition === "icon-right" && iconNode,
|
|
40
|
-
showFocusRing && /* @__PURE__ */ jsx("span", { className:
|
|
37
|
+
showFocusRing && /* @__PURE__ */ jsx("span", { className: "focusRing", "aria-hidden": "true" })
|
|
41
38
|
]
|
|
42
39
|
}
|
|
43
40
|
);
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
// primitives/Link/Link.module.css
|
|
47
|
-
var Link_default = {};
|
|
48
|
-
|
|
49
43
|
// primitives/Link/Link.tsx
|
|
50
44
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
51
45
|
var ChevronIcon = () => /* @__PURE__ */ jsx2("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M3 8h10M9 4l4 4-4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
@@ -62,10 +56,10 @@ var Link = ({
|
|
|
62
56
|
}) => {
|
|
63
57
|
const hasIcon = !!icon;
|
|
64
58
|
const classNames = [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
hasIcon ?
|
|
68
|
-
disabled ?
|
|
59
|
+
"link",
|
|
60
|
+
colorScheme,
|
|
61
|
+
hasIcon ? "withIcon" : "withChevron",
|
|
62
|
+
disabled ? "disabled" : "",
|
|
69
63
|
className ?? ""
|
|
70
64
|
].filter(Boolean).join(" ");
|
|
71
65
|
const handleClick = (e) => {
|
|
@@ -84,17 +78,14 @@ var Link = ({
|
|
|
84
78
|
onClick: handleClick,
|
|
85
79
|
...props,
|
|
86
80
|
children: [
|
|
87
|
-
hasIcon && /* @__PURE__ */ jsx2("span", { className:
|
|
88
|
-
/* @__PURE__ */ jsx2("span", { className:
|
|
89
|
-
!hasIcon && showChevron && /* @__PURE__ */ jsx2("span", { className:
|
|
81
|
+
hasIcon && /* @__PURE__ */ jsx2("span", { className: "icon", children: icon }),
|
|
82
|
+
/* @__PURE__ */ jsx2("span", { className: "label", children: label ?? children }),
|
|
83
|
+
!hasIcon && showChevron && /* @__PURE__ */ jsx2("span", { className: "chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(ChevronIcon, {}) })
|
|
90
84
|
]
|
|
91
85
|
}
|
|
92
86
|
);
|
|
93
87
|
};
|
|
94
88
|
|
|
95
|
-
// primitives/Chip/Chip.module.css
|
|
96
|
-
var Chip_default = {};
|
|
97
|
-
|
|
98
89
|
// primitives/Chip/Chip.tsx
|
|
99
90
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
100
91
|
var Chip = ({
|
|
@@ -110,9 +101,9 @@ var Chip = ({
|
|
|
110
101
|
...props
|
|
111
102
|
}) => {
|
|
112
103
|
const classNames = [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
selected ?
|
|
104
|
+
"chip",
|
|
105
|
+
size,
|
|
106
|
+
selected ? "selected" : "",
|
|
116
107
|
className ?? ""
|
|
117
108
|
].filter(Boolean).join(" ");
|
|
118
109
|
return /* @__PURE__ */ jsxs3(
|
|
@@ -123,18 +114,15 @@ var Chip = ({
|
|
|
123
114
|
"aria-pressed": selected,
|
|
124
115
|
...props,
|
|
125
116
|
children: [
|
|
126
|
-
icon && /* @__PURE__ */ jsx3("span", { className:
|
|
127
|
-
/* @__PURE__ */ jsx3("span", { className:
|
|
128
|
-
tag && /* @__PURE__ */ jsx3("span", { className:
|
|
129
|
-
showFocusRing && /* @__PURE__ */ jsx3("span", { className:
|
|
117
|
+
icon && /* @__PURE__ */ jsx3("span", { className: "icon", children: icon }),
|
|
118
|
+
/* @__PURE__ */ jsx3("span", { className: "label", children: label ?? children }),
|
|
119
|
+
tag && /* @__PURE__ */ jsx3("span", { className: "tag", children: tag }),
|
|
120
|
+
showFocusRing && /* @__PURE__ */ jsx3("span", { className: "focusRing", "aria-hidden": "true" })
|
|
130
121
|
]
|
|
131
122
|
}
|
|
132
123
|
);
|
|
133
124
|
};
|
|
134
125
|
|
|
135
|
-
// primitives/Tag/Tag.module.css
|
|
136
|
-
var Tag_default = {};
|
|
137
|
-
|
|
138
126
|
// primitives/Tag/Tag.tsx
|
|
139
127
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
140
128
|
var Tag = ({
|
|
@@ -148,25 +136,20 @@ var Tag = ({
|
|
|
148
136
|
...props
|
|
149
137
|
}) => {
|
|
150
138
|
const classNames = [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
139
|
+
"tag",
|
|
140
|
+
size,
|
|
141
|
+
variant,
|
|
142
|
+
fontWeight,
|
|
155
143
|
className ?? ""
|
|
156
144
|
].filter(Boolean).join(" ");
|
|
157
145
|
return /* @__PURE__ */ jsxs4("span", { className: classNames, ...props, children: [
|
|
158
|
-
icon && /* @__PURE__ */ jsx4("span", { className:
|
|
159
|
-
/* @__PURE__ */ jsx4("span", { className:
|
|
146
|
+
icon && /* @__PURE__ */ jsx4("span", { className: "icon", children: icon }),
|
|
147
|
+
/* @__PURE__ */ jsx4("span", { className: "label", children: label ?? children })
|
|
160
148
|
] });
|
|
161
149
|
};
|
|
162
150
|
|
|
163
151
|
// primitives/Accordion/Accordion.tsx
|
|
164
152
|
import { useState } from "react";
|
|
165
|
-
|
|
166
|
-
// primitives/Accordion/Accordion.module.css
|
|
167
|
-
var Accordion_default = {};
|
|
168
|
-
|
|
169
|
-
// primitives/Accordion/Accordion.tsx
|
|
170
153
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
171
154
|
var ChevronIcon2 = () => /* @__PURE__ */ jsx5("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
172
155
|
var Accordion = ({
|
|
@@ -188,7 +171,7 @@ var Accordion = ({
|
|
|
188
171
|
if (!isControlled) setInternalOpen(next);
|
|
189
172
|
onToggle?.(next);
|
|
190
173
|
};
|
|
191
|
-
const classNames = [
|
|
174
|
+
const classNames = ["accordion", className ?? ""].filter(Boolean).join(" ");
|
|
192
175
|
return /* @__PURE__ */ jsxs5(
|
|
193
176
|
"div",
|
|
194
177
|
{
|
|
@@ -201,17 +184,17 @@ var Accordion = ({
|
|
|
201
184
|
/* @__PURE__ */ jsxs5(
|
|
202
185
|
"button",
|
|
203
186
|
{
|
|
204
|
-
className:
|
|
187
|
+
className: "header",
|
|
205
188
|
onClick: handleToggle,
|
|
206
189
|
"aria-expanded": isOpen,
|
|
207
190
|
children: [
|
|
208
|
-
/* @__PURE__ */ jsx5("span", { className:
|
|
209
|
-
/* @__PURE__ */ jsx5("span", { className: [
|
|
210
|
-
showFocusRing && /* @__PURE__ */ jsx5("span", { className:
|
|
191
|
+
/* @__PURE__ */ jsx5("span", { className: "titleWrapper", children: /* @__PURE__ */ jsx5("span", { className: "title", children: title }) }),
|
|
192
|
+
/* @__PURE__ */ jsx5("span", { className: ["chevron", isOpen ? "chevronRotated" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx5(ChevronIcon2, {}) }),
|
|
193
|
+
showFocusRing && /* @__PURE__ */ jsx5("span", { className: "focusRing", "aria-hidden": "true" })
|
|
211
194
|
]
|
|
212
195
|
}
|
|
213
196
|
),
|
|
214
|
-
/* @__PURE__ */ jsx5("div", { className: [
|
|
197
|
+
/* @__PURE__ */ jsx5("div", { className: ["bodyWrapper", isOpen ? "bodyWrapperOpen" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx5("div", { className: "bodyInner", children: /* @__PURE__ */ jsx5("div", { className: "body", children }) }) })
|
|
215
198
|
]
|
|
216
199
|
}
|
|
217
200
|
);
|
|
@@ -219,11 +202,6 @@ var Accordion = ({
|
|
|
219
202
|
|
|
220
203
|
// primitives/TextField/TextField.tsx
|
|
221
204
|
import { forwardRef } from "react";
|
|
222
|
-
|
|
223
|
-
// primitives/TextField/TextField.module.css
|
|
224
|
-
var TextField_default = {};
|
|
225
|
-
|
|
226
|
-
// primitives/TextField/TextField.tsx
|
|
227
205
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
228
206
|
var SuccessIcon = () => /* @__PURE__ */ jsxs6("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
229
207
|
/* @__PURE__ */ jsx6("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
@@ -243,9 +221,9 @@ var TextField = forwardRef(
|
|
|
243
221
|
...inputProps
|
|
244
222
|
}, ref) => {
|
|
245
223
|
const wrapperClass = [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
224
|
+
"tf-wrapper",
|
|
225
|
+
variant,
|
|
226
|
+
status,
|
|
249
227
|
className ?? ""
|
|
250
228
|
].filter(Boolean).join(" ");
|
|
251
229
|
return /* @__PURE__ */ jsxs6("div", { className: wrapperClass, "data-disabled": disabled || void 0, children: [
|
|
@@ -253,13 +231,13 @@ var TextField = forwardRef(
|
|
|
253
231
|
"input",
|
|
254
232
|
{
|
|
255
233
|
ref,
|
|
256
|
-
className:
|
|
234
|
+
className: "tf-input",
|
|
257
235
|
disabled,
|
|
258
236
|
...inputProps
|
|
259
237
|
}
|
|
260
238
|
),
|
|
261
|
-
status === "success" && /* @__PURE__ */ jsx6("span", { className:
|
|
262
|
-
status === "fail" && /* @__PURE__ */ jsx6("span", { className:
|
|
239
|
+
status === "success" && /* @__PURE__ */ jsx6("span", { className: "iconSlot iconSuccess", children: /* @__PURE__ */ jsx6(SuccessIcon, {}) }),
|
|
240
|
+
status === "fail" && /* @__PURE__ */ jsx6("span", { className: "iconSlot iconFail", children: /* @__PURE__ */ jsx6(FailIcon, {}) })
|
|
263
241
|
] });
|
|
264
242
|
}
|
|
265
243
|
);
|
|
@@ -267,11 +245,6 @@ TextField.displayName = "TextField";
|
|
|
267
245
|
|
|
268
246
|
// primitives/SearchField/SearchField.tsx
|
|
269
247
|
import { forwardRef as forwardRef2, useRef, useState as useState2, useCallback } from "react";
|
|
270
|
-
|
|
271
|
-
// primitives/SearchField/SearchField.module.css
|
|
272
|
-
var SearchField_default = {};
|
|
273
|
-
|
|
274
|
-
// primitives/SearchField/SearchField.tsx
|
|
275
248
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
276
249
|
var SearchIcon = () => /* @__PURE__ */ jsxs7("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
277
250
|
/* @__PURE__ */ jsx7("circle", { cx: "6.5", cy: "6.5", r: "4", stroke: "currentColor", strokeWidth: "1.25" }),
|
|
@@ -336,8 +309,8 @@ var SearchField = forwardRef2(
|
|
|
336
309
|
const showSuccessIcon = status === "success" && hasValue && !disabled;
|
|
337
310
|
const showClearButton = hasValue && !disabled;
|
|
338
311
|
const wrapperClass = [
|
|
339
|
-
|
|
340
|
-
|
|
312
|
+
"sf-wrapper",
|
|
313
|
+
status,
|
|
341
314
|
className ?? ""
|
|
342
315
|
].filter(Boolean).join(" ");
|
|
343
316
|
return /* @__PURE__ */ jsxs7(
|
|
@@ -346,12 +319,12 @@ var SearchField = forwardRef2(
|
|
|
346
319
|
className: wrapperClass,
|
|
347
320
|
"data-disabled": disabled || void 0,
|
|
348
321
|
children: [
|
|
349
|
-
/* @__PURE__ */ jsx7("span", { className:
|
|
322
|
+
/* @__PURE__ */ jsx7("span", { className: "iconSlot", children: /* @__PURE__ */ jsx7(SearchIcon, {}) }),
|
|
350
323
|
/* @__PURE__ */ jsx7(
|
|
351
324
|
"input",
|
|
352
325
|
{
|
|
353
326
|
ref: setRef,
|
|
354
|
-
className:
|
|
327
|
+
className: "sf-input",
|
|
355
328
|
disabled,
|
|
356
329
|
value,
|
|
357
330
|
defaultValue,
|
|
@@ -359,13 +332,13 @@ var SearchField = forwardRef2(
|
|
|
359
332
|
...inputProps
|
|
360
333
|
}
|
|
361
334
|
),
|
|
362
|
-
showSuccessIcon && /* @__PURE__ */ jsx7("span", { className:
|
|
363
|
-
showFailIcon && /* @__PURE__ */ jsx7("span", { className:
|
|
335
|
+
showSuccessIcon && /* @__PURE__ */ jsx7("span", { className: "iconSlot iconSuccess", children: /* @__PURE__ */ jsx7(SuccessIcon2, {}) }),
|
|
336
|
+
showFailIcon && /* @__PURE__ */ jsx7("span", { className: "iconSlot iconFail", children: /* @__PURE__ */ jsx7(FailIcon2, {}) }),
|
|
364
337
|
showClearButton && /* @__PURE__ */ jsx7(
|
|
365
338
|
"button",
|
|
366
339
|
{
|
|
367
340
|
type: "button",
|
|
368
|
-
className:
|
|
341
|
+
className: "clearButton",
|
|
369
342
|
onClick: handleClear,
|
|
370
343
|
"aria-label": "Clear search",
|
|
371
344
|
tabIndex: -1,
|
|
@@ -382,12 +355,114 @@ SearchField.displayName = "SearchField";
|
|
|
382
355
|
// primitives/Breadcrumb/Breadcrumb.tsx
|
|
383
356
|
import { useState as useState3 } from "react";
|
|
384
357
|
|
|
385
|
-
// primitives/
|
|
386
|
-
|
|
358
|
+
// primitives/BottomSheet/BottomSheet.tsx
|
|
359
|
+
import { useEffect, useId } from "react";
|
|
360
|
+
import { createPortal } from "react-dom";
|
|
361
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
362
|
+
var XMarkIcon = () => /* @__PURE__ */ jsx8(
|
|
363
|
+
"svg",
|
|
364
|
+
{
|
|
365
|
+
width: "16",
|
|
366
|
+
height: "16",
|
|
367
|
+
viewBox: "0 0 16 16",
|
|
368
|
+
fill: "none",
|
|
369
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
370
|
+
"aria-hidden": "true",
|
|
371
|
+
children: /* @__PURE__ */ jsx8(
|
|
372
|
+
"path",
|
|
373
|
+
{
|
|
374
|
+
d: "M3 3l10 10M13 3L3 13",
|
|
375
|
+
stroke: "currentColor",
|
|
376
|
+
strokeWidth: "1.5",
|
|
377
|
+
strokeLinecap: "round"
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
var BottomSheet = ({
|
|
383
|
+
open,
|
|
384
|
+
onClose,
|
|
385
|
+
title,
|
|
386
|
+
showHeader = true,
|
|
387
|
+
showHandleBar = true,
|
|
388
|
+
primaryAction,
|
|
389
|
+
secondaryAction,
|
|
390
|
+
children
|
|
391
|
+
}) => {
|
|
392
|
+
const titleId = useId();
|
|
393
|
+
useEffect(() => {
|
|
394
|
+
if (!open) return;
|
|
395
|
+
const handleKeyDown = (e) => {
|
|
396
|
+
if (e.key === "Escape") onClose();
|
|
397
|
+
};
|
|
398
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
399
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
400
|
+
}, [open, onClose]);
|
|
401
|
+
if (!open || typeof document === "undefined") return null;
|
|
402
|
+
return createPortal(
|
|
403
|
+
/* @__PURE__ */ jsx8(
|
|
404
|
+
"div",
|
|
405
|
+
{
|
|
406
|
+
className: "bs-overlay",
|
|
407
|
+
onClick: onClose,
|
|
408
|
+
"aria-hidden": "true",
|
|
409
|
+
children: /* @__PURE__ */ jsxs8(
|
|
410
|
+
"div",
|
|
411
|
+
{
|
|
412
|
+
className: "bs-sheet",
|
|
413
|
+
role: "dialog",
|
|
414
|
+
"aria-modal": "true",
|
|
415
|
+
"aria-labelledby": title ? titleId : void 0,
|
|
416
|
+
onClick: (e) => e.stopPropagation(),
|
|
417
|
+
children: [
|
|
418
|
+
showHandleBar && /* @__PURE__ */ jsx8("div", { className: "bs-handle-container", children: /* @__PURE__ */ jsx8("div", { className: "bs-handle-bar" }) }),
|
|
419
|
+
showHeader && /* @__PURE__ */ jsxs8("div", { className: "bs-header", children: [
|
|
420
|
+
/* @__PURE__ */ jsx8("div", { className: "bs-header-spacer" }),
|
|
421
|
+
title && /* @__PURE__ */ jsx8("p", { id: titleId, className: "bs-title", children: title }),
|
|
422
|
+
/* @__PURE__ */ jsx8("div", { className: "bs-close-container", children: /* @__PURE__ */ jsx8(
|
|
423
|
+
"button",
|
|
424
|
+
{
|
|
425
|
+
type: "button",
|
|
426
|
+
className: "bs-close-btn",
|
|
427
|
+
onClick: onClose,
|
|
428
|
+
"aria-label": "Close",
|
|
429
|
+
children: /* @__PURE__ */ jsx8(XMarkIcon, {})
|
|
430
|
+
}
|
|
431
|
+
) })
|
|
432
|
+
] }),
|
|
433
|
+
children && /* @__PURE__ */ jsx8("div", { className: "bs-body", children }),
|
|
434
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs8("div", { className: "bs-actions", children: [
|
|
435
|
+
primaryAction && /* @__PURE__ */ jsx8(
|
|
436
|
+
"button",
|
|
437
|
+
{
|
|
438
|
+
type: "button",
|
|
439
|
+
className: "bs-action-primary",
|
|
440
|
+
onClick: primaryAction.onClick,
|
|
441
|
+
children: primaryAction.label
|
|
442
|
+
}
|
|
443
|
+
),
|
|
444
|
+
secondaryAction && /* @__PURE__ */ jsx8(
|
|
445
|
+
"button",
|
|
446
|
+
{
|
|
447
|
+
type: "button",
|
|
448
|
+
className: "bs-action-secondary",
|
|
449
|
+
onClick: secondaryAction.onClick,
|
|
450
|
+
children: secondaryAction.label
|
|
451
|
+
}
|
|
452
|
+
)
|
|
453
|
+
] })
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
)
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
document.body
|
|
460
|
+
);
|
|
461
|
+
};
|
|
387
462
|
|
|
388
463
|
// primitives/Breadcrumb/Breadcrumb.tsx
|
|
389
|
-
import { Fragment, jsx as
|
|
390
|
-
var ChevronRightIcon = () => /* @__PURE__ */
|
|
464
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
465
|
+
var ChevronRightIcon = () => /* @__PURE__ */ jsx9(
|
|
391
466
|
"svg",
|
|
392
467
|
{
|
|
393
468
|
width: "1em",
|
|
@@ -396,7 +471,7 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx8(
|
|
|
396
471
|
fill: "none",
|
|
397
472
|
xmlns: "http://www.w3.org/2000/svg",
|
|
398
473
|
"aria-hidden": "true",
|
|
399
|
-
children: /* @__PURE__ */
|
|
474
|
+
children: /* @__PURE__ */ jsx9(
|
|
400
475
|
"path",
|
|
401
476
|
{
|
|
402
477
|
d: "M6 3.5L10.5 8L6 12.5",
|
|
@@ -409,9 +484,9 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx8(
|
|
|
409
484
|
}
|
|
410
485
|
);
|
|
411
486
|
function BreadcrumbLink({ item }) {
|
|
412
|
-
return /* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
487
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
488
|
+
/* @__PURE__ */ jsx9("a", { href: item.href, onClick: item.onClick, className: "bc-link", children: item.label }),
|
|
489
|
+
/* @__PURE__ */ jsx9("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx9(ChevronRightIcon, {}) })
|
|
415
490
|
] });
|
|
416
491
|
}
|
|
417
492
|
function Breadcrumb({
|
|
@@ -421,53 +496,67 @@ function Breadcrumb({
|
|
|
421
496
|
className,
|
|
422
497
|
...navProps
|
|
423
498
|
}) {
|
|
424
|
-
const [
|
|
499
|
+
const [sheetOpen, setSheetOpen] = useState3(false);
|
|
425
500
|
const truncatable = collapsible && items.length > 3;
|
|
426
|
-
const listClass = [
|
|
427
|
-
Breadcrumb_default.list,
|
|
428
|
-
Breadcrumb_default[size],
|
|
429
|
-
truncatable ? Breadcrumb_default.collapsible : "",
|
|
430
|
-
truncatable && expanded ? Breadcrumb_default.expanded : ""
|
|
431
|
-
].filter(Boolean).join(" ");
|
|
501
|
+
const listClass = ["bc-list", size, truncatable ? "collapsible" : ""].filter(Boolean).join(" ");
|
|
432
502
|
if (!truncatable) {
|
|
433
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ jsx9("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsx9("ol", { className: listClass, children: items.map((item, index) => {
|
|
434
504
|
const isLast = index === items.length - 1;
|
|
435
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ jsx9("li", { className: "bc-item", children: isLast ? /* @__PURE__ */ jsx9("span", { className: "bc-current", "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx9(BreadcrumbLink, { item }) }, index);
|
|
436
506
|
}) }) });
|
|
437
507
|
}
|
|
438
508
|
const firstItem = items[0];
|
|
439
509
|
const middleItems = items.slice(1, items.length - 2);
|
|
440
510
|
const parentItem = items[items.length - 2];
|
|
441
511
|
const currentItem = items[items.length - 1];
|
|
442
|
-
return /* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
512
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
513
|
+
/* @__PURE__ */ jsx9("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsxs9("ol", { className: listClass, children: [
|
|
514
|
+
/* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item: firstItem }) }),
|
|
515
|
+
/* @__PURE__ */ jsxs9("li", { className: "bc-ellipsisItem", children: [
|
|
516
|
+
/* @__PURE__ */ jsx9(
|
|
517
|
+
"button",
|
|
518
|
+
{
|
|
519
|
+
className: "bc-ellipsisButton",
|
|
520
|
+
onClick: () => setSheetOpen(true),
|
|
521
|
+
"aria-label": "Show all breadcrumb items",
|
|
522
|
+
"aria-haspopup": "dialog",
|
|
523
|
+
children: "\u2026"
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ jsx9("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx9(ChevronRightIcon, {}) })
|
|
527
|
+
] }),
|
|
528
|
+
middleItems.map((item, index) => /* @__PURE__ */ jsx9("li", { className: "bc-middleItem", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item }) }, `m-${index}`)),
|
|
529
|
+
/* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item: parentItem }) }),
|
|
530
|
+
/* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9("span", { className: "bc-current", "aria-current": "page", children: currentItem.label }) })
|
|
531
|
+
] }) }),
|
|
532
|
+
/* @__PURE__ */ jsx9(
|
|
533
|
+
BottomSheet,
|
|
534
|
+
{
|
|
535
|
+
open: sheetOpen,
|
|
536
|
+
onClose: () => setSheetOpen(false),
|
|
537
|
+
showHandleBar: true,
|
|
538
|
+
showHeader: false,
|
|
539
|
+
children: /* @__PURE__ */ jsx9("ul", { className: "bc-sheet-list", role: "list", children: middleItems.map((item, index) => /* @__PURE__ */ jsx9("li", { className: "bc-sheet-item", children: /* @__PURE__ */ jsx9(
|
|
540
|
+
"a",
|
|
541
|
+
{
|
|
542
|
+
href: item.href,
|
|
543
|
+
className: "bc-sheet-link",
|
|
544
|
+
onClick: (e) => {
|
|
545
|
+
item.onClick?.(e);
|
|
546
|
+
setSheetOpen(false);
|
|
547
|
+
},
|
|
548
|
+
children: item.label
|
|
549
|
+
}
|
|
550
|
+
) }, `sheet-${index}`)) })
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
] });
|
|
460
554
|
}
|
|
461
555
|
|
|
462
556
|
// primitives/ChipDropdown/ChipDropdown.tsx
|
|
463
|
-
import { useEffect, useRef as useRef2, useState as useState4 } from "react";
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
var ChipDropdown_default = {};
|
|
467
|
-
|
|
468
|
-
// primitives/ChipDropdown/ChipDropdown.tsx
|
|
469
|
-
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
470
|
-
var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
|
|
557
|
+
import { useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
|
|
558
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
559
|
+
var ChevronDownIcon = () => /* @__PURE__ */ jsx10(
|
|
471
560
|
"svg",
|
|
472
561
|
{
|
|
473
562
|
width: "16",
|
|
@@ -476,7 +565,7 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
|
|
|
476
565
|
fill: "none",
|
|
477
566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
478
567
|
"aria-hidden": "true",
|
|
479
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ jsx10(
|
|
480
569
|
"path",
|
|
481
570
|
{
|
|
482
571
|
d: "M3 6l5 5 5-5",
|
|
@@ -488,7 +577,7 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
|
|
|
488
577
|
)
|
|
489
578
|
}
|
|
490
579
|
);
|
|
491
|
-
var CheckIcon = () => /* @__PURE__ */
|
|
580
|
+
var CheckIcon = () => /* @__PURE__ */ jsx10(
|
|
492
581
|
"svg",
|
|
493
582
|
{
|
|
494
583
|
width: "12",
|
|
@@ -497,7 +586,7 @@ var CheckIcon = () => /* @__PURE__ */ jsx9(
|
|
|
497
586
|
fill: "none",
|
|
498
587
|
xmlns: "http://www.w3.org/2000/svg",
|
|
499
588
|
"aria-hidden": "true",
|
|
500
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ jsx10(
|
|
501
590
|
"path",
|
|
502
591
|
{
|
|
503
592
|
d: "M2 6l3 3 5-5",
|
|
@@ -522,12 +611,21 @@ var ChipDropdown = ({
|
|
|
522
611
|
...props
|
|
523
612
|
}) => {
|
|
524
613
|
const [open, setOpen] = useState4(false);
|
|
614
|
+
const [isMobile, setIsMobile] = useState4(
|
|
615
|
+
() => typeof window !== "undefined" && window.matchMedia("(max-width: 767px)").matches
|
|
616
|
+
);
|
|
525
617
|
const wrapperRef = useRef2(null);
|
|
526
618
|
const selectedOption = options.find((o) => o.value === value) ?? null;
|
|
527
619
|
const displayLabel = selectedOption ? selectedOption.label : label;
|
|
528
620
|
const isSelected = selectedOption !== null;
|
|
529
|
-
|
|
530
|
-
|
|
621
|
+
useEffect2(() => {
|
|
622
|
+
const mq = window.matchMedia("(max-width: 767px)");
|
|
623
|
+
const handler = (e) => setIsMobile(e.matches);
|
|
624
|
+
mq.addEventListener("change", handler);
|
|
625
|
+
return () => mq.removeEventListener("change", handler);
|
|
626
|
+
}, []);
|
|
627
|
+
useEffect2(() => {
|
|
628
|
+
if (!open || isMobile) return;
|
|
531
629
|
const handleClickOutside = (e) => {
|
|
532
630
|
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
533
631
|
setOpen(false);
|
|
@@ -535,19 +633,40 @@ var ChipDropdown = ({
|
|
|
535
633
|
};
|
|
536
634
|
document.addEventListener("mousedown", handleClickOutside);
|
|
537
635
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
538
|
-
}, [open]);
|
|
636
|
+
}, [open, isMobile]);
|
|
539
637
|
const triggerClassNames = [
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
isSelected ?
|
|
543
|
-
open ?
|
|
638
|
+
"cd-trigger",
|
|
639
|
+
size,
|
|
640
|
+
isSelected ? "selected" : "",
|
|
641
|
+
open ? "expand" : "",
|
|
544
642
|
className ?? ""
|
|
545
643
|
].filter(Boolean).join(" ");
|
|
546
644
|
const handleKeyDown = (e) => {
|
|
547
645
|
if (e.key === "Escape") setOpen(false);
|
|
548
646
|
};
|
|
549
|
-
|
|
550
|
-
|
|
647
|
+
const handleSelect = (optionValue) => {
|
|
648
|
+
onChange?.(optionValue);
|
|
649
|
+
setOpen(false);
|
|
650
|
+
};
|
|
651
|
+
const optionList = options.map((option) => {
|
|
652
|
+
const isActive = option.value === value;
|
|
653
|
+
return /* @__PURE__ */ jsxs10(
|
|
654
|
+
"li",
|
|
655
|
+
{
|
|
656
|
+
role: "option",
|
|
657
|
+
"aria-selected": isActive,
|
|
658
|
+
className: ["cd-item", isActive ? "itemSelected" : ""].filter(Boolean).join(" "),
|
|
659
|
+
onClick: () => handleSelect(option.value),
|
|
660
|
+
children: [
|
|
661
|
+
/* @__PURE__ */ jsx10("span", { className: "cd-itemLabel", children: option.label }),
|
|
662
|
+
isActive && /* @__PURE__ */ jsx10("span", { className: "cd-itemCheck", children: /* @__PURE__ */ jsx10(CheckIcon, {}) })
|
|
663
|
+
]
|
|
664
|
+
},
|
|
665
|
+
option.value
|
|
666
|
+
);
|
|
667
|
+
});
|
|
668
|
+
return /* @__PURE__ */ jsxs10("div", { ref: wrapperRef, className: "cd-wrapper", children: [
|
|
669
|
+
/* @__PURE__ */ jsxs10(
|
|
551
670
|
"button",
|
|
552
671
|
{
|
|
553
672
|
type: "button",
|
|
@@ -559,80 +678,37 @@ var ChipDropdown = ({
|
|
|
559
678
|
onKeyDown: handleKeyDown,
|
|
560
679
|
...props,
|
|
561
680
|
children: [
|
|
562
|
-
icon && /* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
tag && /* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
681
|
+
icon && /* @__PURE__ */ jsx10("span", { className: "cd-icon", children: icon }),
|
|
682
|
+
/* @__PURE__ */ jsx10("span", { className: "cd-label", children: displayLabel }),
|
|
683
|
+
tag && /* @__PURE__ */ jsx10("span", { className: "cd-tag", children: tag }),
|
|
684
|
+
/* @__PURE__ */ jsx10(
|
|
566
685
|
"span",
|
|
567
686
|
{
|
|
568
|
-
className: [
|
|
687
|
+
className: ["cd-chevron", open ? "chevronOpen" : ""].filter(Boolean).join(" "),
|
|
569
688
|
"aria-hidden": "true",
|
|
570
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ jsx10(ChevronDownIcon, {})
|
|
571
690
|
}
|
|
572
691
|
)
|
|
573
692
|
]
|
|
574
693
|
}
|
|
575
694
|
),
|
|
576
|
-
open && /* @__PURE__ */
|
|
577
|
-
|
|
695
|
+
!isMobile && open && /* @__PURE__ */ jsx10("ul", { role: "listbox", "aria-label": label, className: "cd-list", children: optionList }),
|
|
696
|
+
isMobile && /* @__PURE__ */ jsx10(
|
|
697
|
+
BottomSheet,
|
|
578
698
|
{
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
"li",
|
|
586
|
-
{
|
|
587
|
-
role: "option",
|
|
588
|
-
"aria-selected": isActive,
|
|
589
|
-
className: [
|
|
590
|
-
ChipDropdown_default.item,
|
|
591
|
-
isActive ? ChipDropdown_default.itemSelected : ""
|
|
592
|
-
].filter(Boolean).join(" "),
|
|
593
|
-
onClick: () => {
|
|
594
|
-
onChange?.(option.value);
|
|
595
|
-
setOpen(false);
|
|
596
|
-
},
|
|
597
|
-
children: [
|
|
598
|
-
/* @__PURE__ */ jsx9("span", { className: ChipDropdown_default.itemLabel, children: option.label }),
|
|
599
|
-
isActive && /* @__PURE__ */ jsx9("span", { className: ChipDropdown_default.itemCheck, children: /* @__PURE__ */ jsx9(CheckIcon, {}) })
|
|
600
|
-
]
|
|
601
|
-
},
|
|
602
|
-
option.value
|
|
603
|
-
);
|
|
604
|
-
})
|
|
699
|
+
open,
|
|
700
|
+
onClose: () => setOpen(false),
|
|
701
|
+
title: label,
|
|
702
|
+
showHandleBar: true,
|
|
703
|
+
showHeader: true,
|
|
704
|
+
children: /* @__PURE__ */ jsx10("ul", { role: "listbox", "aria-label": label, className: "cd-list cd-list--sheet", children: optionList })
|
|
605
705
|
}
|
|
606
706
|
)
|
|
607
707
|
] });
|
|
608
708
|
};
|
|
609
709
|
|
|
610
|
-
// components/Card/CardPrimaryVariant.module.css
|
|
611
|
-
var CardPrimaryVariant_default = {};
|
|
612
|
-
|
|
613
710
|
// components/Card/CardPrimaryVariant.tsx
|
|
614
|
-
import { jsx as
|
|
615
|
-
var ArrowRightIcon = () => /* @__PURE__ */ jsx10(
|
|
616
|
-
"svg",
|
|
617
|
-
{
|
|
618
|
-
"aria-hidden": "true",
|
|
619
|
-
fill: "none",
|
|
620
|
-
height: "16",
|
|
621
|
-
viewBox: "0 0 16 16",
|
|
622
|
-
width: "16",
|
|
623
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
624
|
-
children: /* @__PURE__ */ jsx10(
|
|
625
|
-
"path",
|
|
626
|
-
{
|
|
627
|
-
d: "M3 8h10M9 4l4 4-4 4",
|
|
628
|
-
stroke: "currentColor",
|
|
629
|
-
strokeLinecap: "round",
|
|
630
|
-
strokeLinejoin: "round",
|
|
631
|
-
strokeWidth: "1.5"
|
|
632
|
-
}
|
|
633
|
-
)
|
|
634
|
-
}
|
|
635
|
-
);
|
|
711
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
636
712
|
var CardPrimaryVariant = ({
|
|
637
713
|
colorScheme = "light",
|
|
638
714
|
title,
|
|
@@ -647,68 +723,40 @@ var CardPrimaryVariant = ({
|
|
|
647
723
|
...props
|
|
648
724
|
}) => {
|
|
649
725
|
const isInverse = colorScheme === "dark" || colorScheme === "brand" || colorScheme === "image";
|
|
650
|
-
return /* @__PURE__ */
|
|
726
|
+
return /* @__PURE__ */ jsxs11(
|
|
651
727
|
"div",
|
|
652
728
|
{
|
|
653
729
|
className: [
|
|
654
|
-
|
|
655
|
-
|
|
730
|
+
"card-primary",
|
|
731
|
+
`style--${colorScheme}`,
|
|
656
732
|
className ?? ""
|
|
657
733
|
].filter(Boolean).join(" "),
|
|
658
734
|
...props,
|
|
659
735
|
children: [
|
|
660
|
-
colorScheme === "image" && image && /* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
736
|
+
colorScheme === "image" && image && /* @__PURE__ */ jsxs11("div", { "aria-hidden": "true", className: "cp-imageOverlay", children: [
|
|
737
|
+
/* @__PURE__ */ jsx11("img", { alt: "", className: "cp-overlayImg", src: image }),
|
|
738
|
+
/* @__PURE__ */ jsx11("div", { className: "cp-gradient" })
|
|
663
739
|
] }),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
showLink && /* @__PURE__ */
|
|
668
|
-
|
|
740
|
+
/* @__PURE__ */ jsxs11("div", { className: "cp-content", children: [
|
|
741
|
+
/* @__PURE__ */ jsx11("p", { className: ["cp-title", isInverse ? "textInverse" : "textDefault"].join(" "), children: title }),
|
|
742
|
+
/* @__PURE__ */ jsx11("p", { className: ["cp-description", isInverse ? "textInverse" : "textDefault"].join(" "), children: description }),
|
|
743
|
+
showLink && /* @__PURE__ */ jsx11(
|
|
744
|
+
Link,
|
|
669
745
|
{
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
children: [
|
|
674
|
-
/* @__PURE__ */ jsx10("span", { children: linkText }),
|
|
675
|
-
/* @__PURE__ */ jsx10(ArrowRightIcon, {})
|
|
676
|
-
]
|
|
746
|
+
colorScheme: isInverse ? "white" : "coral",
|
|
747
|
+
label: linkText,
|
|
748
|
+
onClick: onLinkClick
|
|
677
749
|
}
|
|
678
750
|
)
|
|
679
751
|
] }),
|
|
680
|
-
colorScheme !== "image" && /* @__PURE__ */
|
|
752
|
+
colorScheme !== "image" && image && /* @__PURE__ */ jsx11("div", { className: "cp-imageSection", children: /* @__PURE__ */ jsx11("img", { alt: imageAlt, className: "cp-image", src: image }) })
|
|
681
753
|
]
|
|
682
754
|
}
|
|
683
755
|
);
|
|
684
756
|
};
|
|
685
757
|
|
|
686
|
-
// components/Card/CardSecondaryVariant.module.css
|
|
687
|
-
var CardSecondaryVariant_default = {};
|
|
688
|
-
|
|
689
758
|
// components/Card/CardSecondaryVariant.tsx
|
|
690
|
-
import { jsx as
|
|
691
|
-
var ArrowRightIcon2 = () => /* @__PURE__ */ jsx11(
|
|
692
|
-
"svg",
|
|
693
|
-
{
|
|
694
|
-
"aria-hidden": "true",
|
|
695
|
-
fill: "none",
|
|
696
|
-
height: "16",
|
|
697
|
-
viewBox: "0 0 16 16",
|
|
698
|
-
width: "16",
|
|
699
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
700
|
-
children: /* @__PURE__ */ jsx11(
|
|
701
|
-
"path",
|
|
702
|
-
{
|
|
703
|
-
d: "M3 8h10M9 4l4 4-4 4",
|
|
704
|
-
stroke: "currentColor",
|
|
705
|
-
strokeLinecap: "round",
|
|
706
|
-
strokeLinejoin: "round",
|
|
707
|
-
strokeWidth: "1.5"
|
|
708
|
-
}
|
|
709
|
-
)
|
|
710
|
-
}
|
|
711
|
-
);
|
|
759
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
712
760
|
var CardSecondaryVariant = ({
|
|
713
761
|
title,
|
|
714
762
|
description,
|
|
@@ -721,25 +769,21 @@ var CardSecondaryVariant = ({
|
|
|
721
769
|
variant: _variant,
|
|
722
770
|
...props
|
|
723
771
|
}) => {
|
|
724
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ jsxs12(
|
|
725
773
|
"div",
|
|
726
774
|
{
|
|
727
|
-
className: [
|
|
775
|
+
className: ["card-secondary", className ?? ""].filter(Boolean).join(" "),
|
|
728
776
|
...props,
|
|
729
777
|
children: [
|
|
730
|
-
showIcon && icon && /* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
showLink && /* @__PURE__ */
|
|
734
|
-
|
|
778
|
+
showIcon && icon && /* @__PURE__ */ jsx12("span", { className: "cs-icon", children: icon }),
|
|
779
|
+
/* @__PURE__ */ jsx12("p", { className: "cs-title", children: title }),
|
|
780
|
+
/* @__PURE__ */ jsx12("p", { className: "cs-description", children: description }),
|
|
781
|
+
showLink && /* @__PURE__ */ jsx12(
|
|
782
|
+
Link,
|
|
735
783
|
{
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
children: [
|
|
740
|
-
/* @__PURE__ */ jsx11("span", { children: linkText }),
|
|
741
|
-
/* @__PURE__ */ jsx11(ArrowRightIcon2, {})
|
|
742
|
-
]
|
|
784
|
+
colorScheme: "coral",
|
|
785
|
+
label: linkText,
|
|
786
|
+
onClick: onLinkClick
|
|
743
787
|
}
|
|
744
788
|
)
|
|
745
789
|
]
|
|
@@ -747,12 +791,9 @@ var CardSecondaryVariant = ({
|
|
|
747
791
|
);
|
|
748
792
|
};
|
|
749
793
|
|
|
750
|
-
// components/Card/CardThumbnailVariant.module.css
|
|
751
|
-
var CardThumbnailVariant_default = {};
|
|
752
|
-
|
|
753
794
|
// components/Card/CardThumbnailVariant.tsx
|
|
754
|
-
import { jsx as
|
|
755
|
-
var LinkIcon = () => /* @__PURE__ */
|
|
795
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
796
|
+
var LinkIcon = () => /* @__PURE__ */ jsxs13(
|
|
756
797
|
"svg",
|
|
757
798
|
{
|
|
758
799
|
"aria-hidden": "true",
|
|
@@ -762,7 +803,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
762
803
|
width: "14",
|
|
763
804
|
xmlns: "http://www.w3.org/2000/svg",
|
|
764
805
|
children: [
|
|
765
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ jsx13(
|
|
766
807
|
"path",
|
|
767
808
|
{
|
|
768
809
|
d: "M5.25 2.625H3.5A1.75 1.75 0 0 0 1.75 4.375v5.25A1.75 1.75 0 0 0 3.5 11.375h5.25a1.75 1.75 0 0 0 1.75-1.75V7.875",
|
|
@@ -772,7 +813,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
772
813
|
strokeWidth: "1.25"
|
|
773
814
|
}
|
|
774
815
|
),
|
|
775
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ jsx13(
|
|
776
817
|
"path",
|
|
777
818
|
{
|
|
778
819
|
d: "M7.875 1.75h4.375v4.375M12.25 1.75 6.125 7.875",
|
|
@@ -785,7 +826,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
785
826
|
]
|
|
786
827
|
}
|
|
787
828
|
);
|
|
788
|
-
var PlayIcon = () => /* @__PURE__ */
|
|
829
|
+
var PlayIcon = () => /* @__PURE__ */ jsxs13(
|
|
789
830
|
"svg",
|
|
790
831
|
{
|
|
791
832
|
"aria-hidden": "true",
|
|
@@ -795,8 +836,8 @@ var PlayIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
795
836
|
width: "80",
|
|
796
837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
797
838
|
children: [
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ jsx13("circle", { cx: "40", cy: "40", fill: "rgba(255,255,255,0.88)", r: "40" }),
|
|
840
|
+
/* @__PURE__ */ jsx13("path", { d: "M32 27l22 13-22 13V27z", fill: "rgba(24,28,37,0.72)" })
|
|
800
841
|
]
|
|
801
842
|
}
|
|
802
843
|
);
|
|
@@ -817,33 +858,33 @@ var CardThumbnailVariant = ({
|
|
|
817
858
|
...props
|
|
818
859
|
}) => {
|
|
819
860
|
const isVideo = type === "video";
|
|
820
|
-
return /* @__PURE__ */
|
|
861
|
+
return /* @__PURE__ */ jsxs13(
|
|
821
862
|
"div",
|
|
822
863
|
{
|
|
823
|
-
className: [
|
|
864
|
+
className: ["card-thumbnail", className ?? ""].filter(Boolean).join(" "),
|
|
824
865
|
...props,
|
|
825
866
|
children: [
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
isVideo && /* @__PURE__ */
|
|
829
|
-
!isVideo && avatar && /* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ jsxs13("div", { className: "ct-thumbnailWrapper", children: [
|
|
868
|
+
/* @__PURE__ */ jsx13("img", { alt: thumbnailAlt, className: "ct-thumbnailImage", src: thumbnail }),
|
|
869
|
+
isVideo && /* @__PURE__ */ jsx13("span", { "aria-label": "Play video", className: "ct-playButton", children: /* @__PURE__ */ jsx13(PlayIcon, {}) }),
|
|
870
|
+
!isVideo && avatar && /* @__PURE__ */ jsx13("img", { alt: avatarAlt, className: "ct-avatar", src: avatar })
|
|
830
871
|
] }),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
!hideTags && /* @__PURE__ */
|
|
834
|
-
showCopyLink && /* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ jsxs13("div", { className: "ct-content", children: [
|
|
873
|
+
/* @__PURE__ */ jsxs13("div", { className: "ct-metaRow", children: [
|
|
874
|
+
!hideTags && /* @__PURE__ */ jsx13("div", { className: "ct-tagsList", children: tags.map((tag, i) => /* @__PURE__ */ jsx13(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "fill" }, i)) }),
|
|
875
|
+
showCopyLink && /* @__PURE__ */ jsx13(
|
|
835
876
|
"button",
|
|
836
877
|
{
|
|
837
878
|
"aria-label": "Copy link",
|
|
838
|
-
className:
|
|
879
|
+
className: "ct-copyLink",
|
|
839
880
|
onClick: onCopyLink,
|
|
840
881
|
type: "button",
|
|
841
|
-
children: /* @__PURE__ */
|
|
882
|
+
children: /* @__PURE__ */ jsx13(LinkIcon, {})
|
|
842
883
|
}
|
|
843
884
|
)
|
|
844
885
|
] }),
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ jsx13("p", { className: "ct-title", children: title }),
|
|
887
|
+
/* @__PURE__ */ jsx13("p", { className: "ct-summary", children: summary })
|
|
847
888
|
] })
|
|
848
889
|
]
|
|
849
890
|
}
|
|
@@ -851,24 +892,21 @@ var CardThumbnailVariant = ({
|
|
|
851
892
|
};
|
|
852
893
|
|
|
853
894
|
// components/Card/Card.tsx
|
|
854
|
-
import { jsx as
|
|
895
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
855
896
|
var Card = (props) => {
|
|
856
897
|
if (props.variant === "primary") {
|
|
857
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ jsx14(CardPrimaryVariant, { ...props });
|
|
858
899
|
}
|
|
859
900
|
if (props.variant === "secondary") {
|
|
860
|
-
return /* @__PURE__ */
|
|
901
|
+
return /* @__PURE__ */ jsx14(CardSecondaryVariant, { ...props });
|
|
861
902
|
}
|
|
862
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ jsx14(CardThumbnailVariant, { ...props });
|
|
863
904
|
};
|
|
864
905
|
|
|
865
|
-
// primitives/Pagination/Pagination.module.css
|
|
866
|
-
var Pagination_default = {};
|
|
867
|
-
|
|
868
906
|
// primitives/Pagination/Pagination.tsx
|
|
869
|
-
import { jsx as
|
|
870
|
-
var ChevronLeft = () => /* @__PURE__ */
|
|
871
|
-
var ChevronRight = () => /* @__PURE__ */
|
|
907
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
908
|
+
var ChevronLeft = () => /* @__PURE__ */ jsx15("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
909
|
+
var ChevronRight = () => /* @__PURE__ */ jsx15("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
872
910
|
function getPageItems(currentPage, totalPages) {
|
|
873
911
|
if (totalPages <= 5) {
|
|
874
912
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
@@ -890,28 +928,28 @@ var Pagination = ({
|
|
|
890
928
|
const items = getPageItems(currentPage, totalPages);
|
|
891
929
|
const isPrevDisabled = currentPage <= 1;
|
|
892
930
|
const isNextDisabled = currentPage >= totalPages;
|
|
893
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsxs14(
|
|
894
932
|
"nav",
|
|
895
933
|
{
|
|
896
|
-
className: [
|
|
934
|
+
className: ["pagination", className ?? ""].filter(Boolean).join(" "),
|
|
897
935
|
"aria-label": "Pagination navigation",
|
|
898
936
|
children: [
|
|
899
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx15(
|
|
900
938
|
"button",
|
|
901
939
|
{
|
|
902
|
-
className: [
|
|
940
|
+
className: ["navButton", isPrevDisabled ? "navButtonDisabled" : ""].filter(Boolean).join(" "),
|
|
903
941
|
onClick: () => onPageChange(currentPage - 1),
|
|
904
942
|
disabled: isPrevDisabled,
|
|
905
943
|
"aria-label": "Previous page",
|
|
906
|
-
children: /* @__PURE__ */
|
|
944
|
+
children: /* @__PURE__ */ jsx15("span", { className: "navIcon", children: /* @__PURE__ */ jsx15(ChevronLeft, {}) })
|
|
907
945
|
}
|
|
908
946
|
),
|
|
909
947
|
items.map((item, index) => {
|
|
910
948
|
if (item === "ellipsis-left" || item === "ellipsis-right") {
|
|
911
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx15(
|
|
912
950
|
"span",
|
|
913
951
|
{
|
|
914
|
-
className:
|
|
952
|
+
className: "ellipsis",
|
|
915
953
|
"aria-hidden": "true",
|
|
916
954
|
children: "\u2026"
|
|
917
955
|
},
|
|
@@ -919,10 +957,10 @@ var Pagination = ({
|
|
|
919
957
|
);
|
|
920
958
|
}
|
|
921
959
|
const isSelected = item === currentPage;
|
|
922
|
-
return /* @__PURE__ */
|
|
960
|
+
return /* @__PURE__ */ jsx15(
|
|
923
961
|
"button",
|
|
924
962
|
{
|
|
925
|
-
className: [
|
|
963
|
+
className: ["pageButton", isSelected ? "pageButtonSelected" : ""].filter(Boolean).join(" "),
|
|
926
964
|
onClick: () => {
|
|
927
965
|
if (!isSelected) onPageChange(item);
|
|
928
966
|
},
|
|
@@ -933,30 +971,1486 @@ var Pagination = ({
|
|
|
933
971
|
item
|
|
934
972
|
);
|
|
935
973
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ jsx15(
|
|
937
975
|
"button",
|
|
938
976
|
{
|
|
939
|
-
className: [
|
|
977
|
+
className: ["navButton", isNextDisabled ? "navButtonDisabled" : ""].filter(Boolean).join(" "),
|
|
940
978
|
onClick: () => onPageChange(currentPage + 1),
|
|
941
979
|
disabled: isNextDisabled,
|
|
942
980
|
"aria-label": "Next page",
|
|
943
|
-
children: /* @__PURE__ */
|
|
981
|
+
children: /* @__PURE__ */ jsx15("span", { className: "navIcon", children: /* @__PURE__ */ jsx15(ChevronRight, {}) })
|
|
944
982
|
}
|
|
945
983
|
)
|
|
946
984
|
]
|
|
947
985
|
}
|
|
948
986
|
);
|
|
949
987
|
};
|
|
988
|
+
|
|
989
|
+
// templates/FeatureCards/FeatureCards.tsx
|
|
990
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
991
|
+
var FeatureCards = ({
|
|
992
|
+
sectionTitle,
|
|
993
|
+
sectionDescription,
|
|
994
|
+
showLink = false,
|
|
995
|
+
linkText = "Learn more",
|
|
996
|
+
onLinkClick,
|
|
997
|
+
cardColorScheme = "image",
|
|
998
|
+
cards
|
|
999
|
+
}) => {
|
|
1000
|
+
return /* @__PURE__ */ jsx16("section", { className: "fc-section", children: /* @__PURE__ */ jsxs15("div", { className: "fc-container", children: [
|
|
1001
|
+
/* @__PURE__ */ jsxs15("div", { className: "fc-header", children: [
|
|
1002
|
+
/* @__PURE__ */ jsx16("h2", { className: "fc-sectionTitle", children: sectionTitle }),
|
|
1003
|
+
sectionDescription && /* @__PURE__ */ jsx16("p", { className: "fc-sectionDescription", children: sectionDescription }),
|
|
1004
|
+
showLink && /* @__PURE__ */ jsx16(
|
|
1005
|
+
Link,
|
|
1006
|
+
{
|
|
1007
|
+
colorScheme: "coral",
|
|
1008
|
+
label: linkText,
|
|
1009
|
+
onClick: onLinkClick
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ jsx16("div", { className: "fc-grid", children: cards.map((card, index) => /* @__PURE__ */ jsx16(
|
|
1014
|
+
Card,
|
|
1015
|
+
{
|
|
1016
|
+
variant: "primary",
|
|
1017
|
+
colorScheme: card.colorScheme ?? cardColorScheme,
|
|
1018
|
+
title: card.title,
|
|
1019
|
+
description: card.description,
|
|
1020
|
+
image: card.image,
|
|
1021
|
+
imageAlt: card.imageAlt,
|
|
1022
|
+
showLink: card.showLink,
|
|
1023
|
+
linkText: card.linkText,
|
|
1024
|
+
onLinkClick: card.onLinkClick
|
|
1025
|
+
},
|
|
1026
|
+
index
|
|
1027
|
+
)) })
|
|
1028
|
+
] }) });
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
// templates/Footer/Footer.tsx
|
|
1032
|
+
import { useState as useState5 } from "react";
|
|
1033
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1034
|
+
var ExternalLinkIcon = () => /* @__PURE__ */ jsx17(
|
|
1035
|
+
"svg",
|
|
1036
|
+
{
|
|
1037
|
+
width: "12",
|
|
1038
|
+
height: "12",
|
|
1039
|
+
viewBox: "0 0 12 12",
|
|
1040
|
+
fill: "none",
|
|
1041
|
+
"aria-hidden": "true",
|
|
1042
|
+
focusable: "false",
|
|
1043
|
+
children: /* @__PURE__ */ jsx17(
|
|
1044
|
+
"path",
|
|
1045
|
+
{
|
|
1046
|
+
d: "M2 2H10M10 2V10M10 2L2 10",
|
|
1047
|
+
stroke: "currentColor",
|
|
1048
|
+
strokeWidth: "1.5",
|
|
1049
|
+
strokeLinecap: "round",
|
|
1050
|
+
strokeLinejoin: "round"
|
|
1051
|
+
}
|
|
1052
|
+
)
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
var ChevronDownIcon2 = () => /* @__PURE__ */ jsx17(
|
|
1056
|
+
"svg",
|
|
1057
|
+
{
|
|
1058
|
+
width: "12",
|
|
1059
|
+
height: "12",
|
|
1060
|
+
viewBox: "0 0 12 12",
|
|
1061
|
+
fill: "none",
|
|
1062
|
+
"aria-hidden": "true",
|
|
1063
|
+
focusable: "false",
|
|
1064
|
+
children: /* @__PURE__ */ jsx17(
|
|
1065
|
+
"path",
|
|
1066
|
+
{
|
|
1067
|
+
d: "M2 4L6 8L10 4",
|
|
1068
|
+
stroke: "currentColor",
|
|
1069
|
+
strokeWidth: "1.5",
|
|
1070
|
+
strokeLinecap: "round",
|
|
1071
|
+
strokeLinejoin: "round"
|
|
1072
|
+
}
|
|
1073
|
+
)
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
var DerivGoBadges = ({
|
|
1077
|
+
googlePlayBadge,
|
|
1078
|
+
appStoreBadge,
|
|
1079
|
+
huaweiBadge,
|
|
1080
|
+
availabilityNote
|
|
1081
|
+
}) => /* @__PURE__ */ jsxs16("div", { className: "footer__app-badges", children: [
|
|
1082
|
+
googlePlayBadge && /* @__PURE__ */ jsx17(
|
|
1083
|
+
"a",
|
|
1084
|
+
{
|
|
1085
|
+
href: googlePlayBadge.href,
|
|
1086
|
+
className: googlePlayBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
|
|
1087
|
+
"aria-label": googlePlayBadge.imageAlt,
|
|
1088
|
+
target: "_blank",
|
|
1089
|
+
rel: "noopener noreferrer",
|
|
1090
|
+
children: googlePlayBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: googlePlayBadge.imageSrc, alt: googlePlayBadge.imageAlt })
|
|
1091
|
+
}
|
|
1092
|
+
),
|
|
1093
|
+
appStoreBadge && /* @__PURE__ */ jsx17(
|
|
1094
|
+
"a",
|
|
1095
|
+
{
|
|
1096
|
+
href: appStoreBadge.href,
|
|
1097
|
+
className: appStoreBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
|
|
1098
|
+
"aria-label": appStoreBadge.imageAlt,
|
|
1099
|
+
target: "_blank",
|
|
1100
|
+
rel: "noopener noreferrer",
|
|
1101
|
+
children: appStoreBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: appStoreBadge.imageSrc, alt: appStoreBadge.imageAlt })
|
|
1102
|
+
}
|
|
1103
|
+
),
|
|
1104
|
+
huaweiBadge && /* @__PURE__ */ jsx17(
|
|
1105
|
+
"a",
|
|
1106
|
+
{
|
|
1107
|
+
href: huaweiBadge.href,
|
|
1108
|
+
className: huaweiBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
|
|
1109
|
+
"aria-label": huaweiBadge.imageAlt,
|
|
1110
|
+
target: "_blank",
|
|
1111
|
+
rel: "noopener noreferrer",
|
|
1112
|
+
children: huaweiBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: huaweiBadge.imageSrc, alt: huaweiBadge.imageAlt })
|
|
1113
|
+
}
|
|
1114
|
+
),
|
|
1115
|
+
availabilityNote && /* @__PURE__ */ jsx17("p", { className: "footer__app-note", children: availabilityNote })
|
|
1116
|
+
] });
|
|
1117
|
+
var NavLink = ({ label, href, isExternal, onClick }) => /* @__PURE__ */ jsxs16(
|
|
1118
|
+
"a",
|
|
1119
|
+
{
|
|
1120
|
+
href,
|
|
1121
|
+
className: "footer__nav-link",
|
|
1122
|
+
onClick,
|
|
1123
|
+
...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
1124
|
+
children: [
|
|
1125
|
+
label,
|
|
1126
|
+
isExternal && /* @__PURE__ */ jsx17(ExternalLinkIcon, {})
|
|
1127
|
+
]
|
|
1128
|
+
}
|
|
1129
|
+
);
|
|
1130
|
+
var Footer = ({
|
|
1131
|
+
logoSrc,
|
|
1132
|
+
logoAlt = "Deriv",
|
|
1133
|
+
navColumns,
|
|
1134
|
+
socialLinks = [],
|
|
1135
|
+
derivGo,
|
|
1136
|
+
investorsInPeopleSrc,
|
|
1137
|
+
investorsInPeopleAlt = "Investors in People - Platinum",
|
|
1138
|
+
licenseText,
|
|
1139
|
+
riskWarningText,
|
|
1140
|
+
aiSummary,
|
|
1141
|
+
className,
|
|
1142
|
+
...props
|
|
1143
|
+
}) => {
|
|
1144
|
+
const allSections = navColumns.flat();
|
|
1145
|
+
const [openSections, setOpenSections] = useState5(/* @__PURE__ */ new Set());
|
|
1146
|
+
const toggleSection = (index) => {
|
|
1147
|
+
setOpenSections((prev) => {
|
|
1148
|
+
const next = new Set(prev);
|
|
1149
|
+
if (next.has(index)) {
|
|
1150
|
+
next.delete(index);
|
|
1151
|
+
} else {
|
|
1152
|
+
next.add(index);
|
|
1153
|
+
}
|
|
1154
|
+
return next;
|
|
1155
|
+
});
|
|
1156
|
+
};
|
|
1157
|
+
const aiLabel = aiSummary?.label ?? "Ask AI for a summary of Deriv";
|
|
1158
|
+
return /* @__PURE__ */ jsx17(
|
|
1159
|
+
"footer",
|
|
1160
|
+
{
|
|
1161
|
+
className: ["footer", className].filter(Boolean).join(" "),
|
|
1162
|
+
...props,
|
|
1163
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "footer__inner", children: [
|
|
1164
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__header", children: [
|
|
1165
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__logo-wrapper", children: /* @__PURE__ */ jsx17(
|
|
1166
|
+
"img",
|
|
1167
|
+
{
|
|
1168
|
+
src: logoSrc,
|
|
1169
|
+
alt: logoAlt,
|
|
1170
|
+
className: "footer__logo"
|
|
1171
|
+
}
|
|
1172
|
+
) }),
|
|
1173
|
+
aiSummary && /* @__PURE__ */ jsxs16("div", { className: "footer__ai-bar footer__ai-bar--inline", children: [
|
|
1174
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__ai-bar-label", children: aiLabel }),
|
|
1175
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__ai-bar-icons", children: aiSummary.items.map((item, i) => /* @__PURE__ */ jsx17(
|
|
1176
|
+
"a",
|
|
1177
|
+
{
|
|
1178
|
+
href: item.href,
|
|
1179
|
+
className: "footer__ai-icon",
|
|
1180
|
+
"aria-label": item.imageAlt,
|
|
1181
|
+
target: "_blank",
|
|
1182
|
+
rel: "noopener noreferrer",
|
|
1183
|
+
children: /* @__PURE__ */ jsx17("img", { src: item.imageSrc, alt: item.imageAlt })
|
|
1184
|
+
},
|
|
1185
|
+
i
|
|
1186
|
+
)) })
|
|
1187
|
+
] }),
|
|
1188
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__social footer__social--in-header", children: socialLinks.map((link, i) => /* @__PURE__ */ jsx17(
|
|
1189
|
+
"a",
|
|
1190
|
+
{
|
|
1191
|
+
href: link.href,
|
|
1192
|
+
className: "footer__social-icon",
|
|
1193
|
+
"aria-label": link.ariaLabel,
|
|
1194
|
+
target: "_blank",
|
|
1195
|
+
rel: "noopener noreferrer",
|
|
1196
|
+
children: link.icon
|
|
1197
|
+
},
|
|
1198
|
+
i
|
|
1199
|
+
)) })
|
|
1200
|
+
] }),
|
|
1201
|
+
aiSummary && /* @__PURE__ */ jsx17("div", { className: "footer__ai-section", children: /* @__PURE__ */ jsxs16("div", { className: "footer__ai-bar footer__ai-bar--block", children: [
|
|
1202
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__ai-bar-label", children: aiLabel }),
|
|
1203
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__ai-bar-icons", children: aiSummary.items.map((item, i) => /* @__PURE__ */ jsx17(
|
|
1204
|
+
"a",
|
|
1205
|
+
{
|
|
1206
|
+
href: item.href,
|
|
1207
|
+
className: "footer__ai-icon",
|
|
1208
|
+
"aria-label": item.imageAlt,
|
|
1209
|
+
target: "_blank",
|
|
1210
|
+
rel: "noopener noreferrer",
|
|
1211
|
+
children: /* @__PURE__ */ jsx17("img", { src: item.imageSrc, alt: item.imageAlt })
|
|
1212
|
+
},
|
|
1213
|
+
i
|
|
1214
|
+
)) })
|
|
1215
|
+
] }) }),
|
|
1216
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__nav footer__nav--columns", children: [
|
|
1217
|
+
navColumns.map((column, colIdx) => /* @__PURE__ */ jsx17("div", { className: "footer__column", children: column.map((section, secIdx) => /* @__PURE__ */ jsxs16("div", { className: "footer__nav-section", children: [
|
|
1218
|
+
/* @__PURE__ */ jsx17("p", { className: "footer__nav-title", children: section.title }),
|
|
1219
|
+
/* @__PURE__ */ jsx17("ul", { className: "footer__nav-links", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(NavLink, { ...link }) }, linkIdx)) })
|
|
1220
|
+
] }, secIdx)) }, colIdx)),
|
|
1221
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__sidebar", children: [
|
|
1222
|
+
investorsInPeopleSrc && /* @__PURE__ */ jsx17("div", { className: "footer__investors-card", children: /* @__PURE__ */ jsx17(
|
|
1223
|
+
"img",
|
|
1224
|
+
{
|
|
1225
|
+
src: investorsInPeopleSrc,
|
|
1226
|
+
alt: investorsInPeopleAlt,
|
|
1227
|
+
className: "footer__investors-img"
|
|
1228
|
+
}
|
|
1229
|
+
) }),
|
|
1230
|
+
derivGo && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-card", children: [
|
|
1231
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-header", children: [
|
|
1232
|
+
/* @__PURE__ */ jsx17(
|
|
1233
|
+
"img",
|
|
1234
|
+
{
|
|
1235
|
+
src: derivGo.logoSrc,
|
|
1236
|
+
alt: derivGo.logoAlt ?? "Deriv GO",
|
|
1237
|
+
className: "footer__deriv-go-logo"
|
|
1238
|
+
}
|
|
1239
|
+
),
|
|
1240
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-title", children: derivGo.title ?? "Deriv GO" })
|
|
1241
|
+
] }),
|
|
1242
|
+
/* @__PURE__ */ jsx17("p", { className: "footer__deriv-go-desc", children: derivGo.description ?? "Trade multipliers on our mobile app." }),
|
|
1243
|
+
(derivGo.qrCodeSrc || derivGo.qrCodeIcon) && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-qr", children: [
|
|
1244
|
+
derivGo.qrCodeIcon ? /* @__PURE__ */ jsx17("div", { className: "footer__deriv-go-qr-icon", children: derivGo.qrCodeIcon }) : /* @__PURE__ */ jsx17(
|
|
1245
|
+
"img",
|
|
1246
|
+
{
|
|
1247
|
+
src: derivGo.qrCodeSrc,
|
|
1248
|
+
alt: derivGo.qrCodeAlt ?? "Scan to download",
|
|
1249
|
+
className: "footer__deriv-go-qr-img"
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-qr-label", children: "Scan to download" })
|
|
1253
|
+
] }),
|
|
1254
|
+
/* @__PURE__ */ jsx17(
|
|
1255
|
+
DerivGoBadges,
|
|
1256
|
+
{
|
|
1257
|
+
googlePlayBadge: derivGo.googlePlayBadge,
|
|
1258
|
+
appStoreBadge: derivGo.appStoreBadge,
|
|
1259
|
+
huaweiBadge: derivGo.huaweiBadge,
|
|
1260
|
+
availabilityNote: derivGo.availabilityNote
|
|
1261
|
+
}
|
|
1262
|
+
)
|
|
1263
|
+
] })
|
|
1264
|
+
] })
|
|
1265
|
+
] }),
|
|
1266
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__nav footer__nav--accordion", children: allSections.map((section, idx) => {
|
|
1267
|
+
const isOpen = openSections.has(idx);
|
|
1268
|
+
return /* @__PURE__ */ jsxs16(
|
|
1269
|
+
"div",
|
|
1270
|
+
{
|
|
1271
|
+
className: [
|
|
1272
|
+
"footer__accordion-item",
|
|
1273
|
+
isOpen && "footer__accordion-item--open"
|
|
1274
|
+
].filter(Boolean).join(" "),
|
|
1275
|
+
children: [
|
|
1276
|
+
/* @__PURE__ */ jsxs16(
|
|
1277
|
+
"button",
|
|
1278
|
+
{
|
|
1279
|
+
type: "button",
|
|
1280
|
+
className: "footer__accordion-toggle",
|
|
1281
|
+
onClick: () => toggleSection(idx),
|
|
1282
|
+
"aria-expanded": isOpen,
|
|
1283
|
+
children: [
|
|
1284
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__accordion-label", children: section.title }),
|
|
1285
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__accordion-chevron", children: /* @__PURE__ */ jsx17(ChevronDownIcon2, {}) })
|
|
1286
|
+
]
|
|
1287
|
+
}
|
|
1288
|
+
),
|
|
1289
|
+
isOpen && /* @__PURE__ */ jsx17("ul", { className: "footer__accordion-links", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(NavLink, { ...link }) }, linkIdx)) })
|
|
1290
|
+
]
|
|
1291
|
+
},
|
|
1292
|
+
idx
|
|
1293
|
+
);
|
|
1294
|
+
}) }),
|
|
1295
|
+
socialLinks.length > 0 && /* @__PURE__ */ jsx17("div", { className: "footer__social footer__social--standalone", children: socialLinks.map((link, i) => /* @__PURE__ */ jsx17(
|
|
1296
|
+
"a",
|
|
1297
|
+
{
|
|
1298
|
+
href: link.href,
|
|
1299
|
+
className: "footer__social-icon",
|
|
1300
|
+
"aria-label": link.ariaLabel,
|
|
1301
|
+
target: "_blank",
|
|
1302
|
+
rel: "noopener noreferrer",
|
|
1303
|
+
children: link.icon
|
|
1304
|
+
},
|
|
1305
|
+
i
|
|
1306
|
+
)) }),
|
|
1307
|
+
derivGo && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-banner", children: [
|
|
1308
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-banner-info", children: [
|
|
1309
|
+
/* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-header", children: [
|
|
1310
|
+
/* @__PURE__ */ jsx17(
|
|
1311
|
+
"img",
|
|
1312
|
+
{
|
|
1313
|
+
src: derivGo.logoSrc,
|
|
1314
|
+
alt: derivGo.logoAlt ?? "Deriv GO",
|
|
1315
|
+
className: "footer__deriv-go-logo"
|
|
1316
|
+
}
|
|
1317
|
+
),
|
|
1318
|
+
/* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-title", children: derivGo.title ?? "Deriv GO" })
|
|
1319
|
+
] }),
|
|
1320
|
+
/* @__PURE__ */ jsx17("p", { className: "footer__deriv-go-desc", children: derivGo.description ?? "Trade multipliers on our mobile app." })
|
|
1321
|
+
] }),
|
|
1322
|
+
/* @__PURE__ */ jsx17("div", { className: "footer__deriv-go-banner-badges", children: /* @__PURE__ */ jsx17(
|
|
1323
|
+
DerivGoBadges,
|
|
1324
|
+
{
|
|
1325
|
+
googlePlayBadge: derivGo.googlePlayBadge,
|
|
1326
|
+
appStoreBadge: derivGo.appStoreBadge,
|
|
1327
|
+
huaweiBadge: derivGo.huaweiBadge,
|
|
1328
|
+
availabilityNote: derivGo.availabilityNote
|
|
1329
|
+
}
|
|
1330
|
+
) })
|
|
1331
|
+
] }),
|
|
1332
|
+
(licenseText || riskWarningText) && /* @__PURE__ */ jsxs16("div", { className: "footer__legal-block", children: [
|
|
1333
|
+
licenseText && /* @__PURE__ */ jsx17("div", { className: "footer__license", children: licenseText }),
|
|
1334
|
+
riskWarningText && /* @__PURE__ */ jsx17("div", { className: "footer__risk-warning", children: /* @__PURE__ */ jsx17("p", { className: "footer__risk-warning-text", children: riskWarningText }) })
|
|
1335
|
+
] }),
|
|
1336
|
+
investorsInPeopleSrc && /* @__PURE__ */ jsx17("div", { className: "footer__investors-stacked", children: /* @__PURE__ */ jsx17(
|
|
1337
|
+
"img",
|
|
1338
|
+
{
|
|
1339
|
+
src: investorsInPeopleSrc,
|
|
1340
|
+
alt: investorsInPeopleAlt,
|
|
1341
|
+
className: "footer__investors-img"
|
|
1342
|
+
}
|
|
1343
|
+
) })
|
|
1344
|
+
] })
|
|
1345
|
+
}
|
|
1346
|
+
);
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
// templates/Hero/Hero.tsx
|
|
1350
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1351
|
+
var Visual = ({
|
|
1352
|
+
src,
|
|
1353
|
+
className,
|
|
1354
|
+
alt = ""
|
|
1355
|
+
}) => /* @__PURE__ */ jsx18("div", { className, children: typeof src === "string" ? /* @__PURE__ */ jsx18("img", { src, alt }) : src });
|
|
1356
|
+
var Hero = ({
|
|
1357
|
+
variant,
|
|
1358
|
+
subtitle,
|
|
1359
|
+
title,
|
|
1360
|
+
description,
|
|
1361
|
+
primaryButton,
|
|
1362
|
+
secondaryButton,
|
|
1363
|
+
backgroundImageSrc,
|
|
1364
|
+
heroImage,
|
|
1365
|
+
leftVisual,
|
|
1366
|
+
rightVisual,
|
|
1367
|
+
className,
|
|
1368
|
+
...props
|
|
1369
|
+
}) => {
|
|
1370
|
+
const variantClass = `hero--${variant}`;
|
|
1371
|
+
const textBlock = /* @__PURE__ */ jsxs17("div", { className: "hero__text", children: [
|
|
1372
|
+
subtitle && /* @__PURE__ */ jsx18("p", { className: "hero__subtitle", children: subtitle }),
|
|
1373
|
+
/* @__PURE__ */ jsx18("p", { className: "hero__title", children: title }),
|
|
1374
|
+
description && /* @__PURE__ */ jsx18("p", { className: "hero__description", children: description })
|
|
1375
|
+
] });
|
|
1376
|
+
const buttonBlock = (primaryButton || secondaryButton) && /* @__PURE__ */ jsxs17("div", { className: "hero__buttons", children: [
|
|
1377
|
+
primaryButton && (primaryButton.href ? /* @__PURE__ */ jsx18("a", { href: primaryButton.href, children: /* @__PURE__ */ jsx18(
|
|
1378
|
+
Button,
|
|
1379
|
+
{
|
|
1380
|
+
colorScheme: "coral",
|
|
1381
|
+
variant: "primary",
|
|
1382
|
+
label: primaryButton.label,
|
|
1383
|
+
onClick: primaryButton.onClick
|
|
1384
|
+
}
|
|
1385
|
+
) }) : /* @__PURE__ */ jsx18(
|
|
1386
|
+
Button,
|
|
1387
|
+
{
|
|
1388
|
+
colorScheme: "coral",
|
|
1389
|
+
variant: "primary",
|
|
1390
|
+
label: primaryButton.label,
|
|
1391
|
+
onClick: primaryButton.onClick
|
|
1392
|
+
}
|
|
1393
|
+
)),
|
|
1394
|
+
secondaryButton && (secondaryButton.href ? /* @__PURE__ */ jsx18("a", { href: secondaryButton.href, children: /* @__PURE__ */ jsx18(
|
|
1395
|
+
Button,
|
|
1396
|
+
{
|
|
1397
|
+
colorScheme: "white",
|
|
1398
|
+
variant: "secondary",
|
|
1399
|
+
label: secondaryButton.label,
|
|
1400
|
+
onClick: secondaryButton.onClick
|
|
1401
|
+
}
|
|
1402
|
+
) }) : /* @__PURE__ */ jsx18(
|
|
1403
|
+
Button,
|
|
1404
|
+
{
|
|
1405
|
+
colorScheme: "white",
|
|
1406
|
+
variant: "secondary",
|
|
1407
|
+
label: secondaryButton.label,
|
|
1408
|
+
onClick: secondaryButton.onClick
|
|
1409
|
+
}
|
|
1410
|
+
))
|
|
1411
|
+
] });
|
|
1412
|
+
if (variant === "homepage") {
|
|
1413
|
+
return /* @__PURE__ */ jsxs17(
|
|
1414
|
+
"section",
|
|
1415
|
+
{
|
|
1416
|
+
className: ["hero", variantClass, className].filter(Boolean).join(" "),
|
|
1417
|
+
...props,
|
|
1418
|
+
children: [
|
|
1419
|
+
backgroundImageSrc && /* @__PURE__ */ jsx18(
|
|
1420
|
+
"img",
|
|
1421
|
+
{
|
|
1422
|
+
src: backgroundImageSrc,
|
|
1423
|
+
alt: "",
|
|
1424
|
+
className: "hero__bg-image",
|
|
1425
|
+
"aria-hidden": "true"
|
|
1426
|
+
}
|
|
1427
|
+
),
|
|
1428
|
+
heroImage && /* @__PURE__ */ jsx18(
|
|
1429
|
+
Visual,
|
|
1430
|
+
{
|
|
1431
|
+
src: heroImage,
|
|
1432
|
+
className: "hero__image-slot",
|
|
1433
|
+
alt: ""
|
|
1434
|
+
}
|
|
1435
|
+
),
|
|
1436
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
|
|
1437
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsx18("div", { className: "hero__left", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
|
|
1438
|
+
textBlock,
|
|
1439
|
+
buttonBlock
|
|
1440
|
+
] }) }) }) })
|
|
1441
|
+
]
|
|
1442
|
+
}
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
if (variant === "full-image") {
|
|
1446
|
+
return /* @__PURE__ */ jsxs17(
|
|
1447
|
+
"section",
|
|
1448
|
+
{
|
|
1449
|
+
className: ["hero", variantClass, className].filter(Boolean).join(" "),
|
|
1450
|
+
...props,
|
|
1451
|
+
children: [
|
|
1452
|
+
backgroundImageSrc && /* @__PURE__ */ jsx18(
|
|
1453
|
+
"img",
|
|
1454
|
+
{
|
|
1455
|
+
src: backgroundImageSrc,
|
|
1456
|
+
alt: "",
|
|
1457
|
+
className: "hero__bg-image",
|
|
1458
|
+
"aria-hidden": "true"
|
|
1459
|
+
}
|
|
1460
|
+
),
|
|
1461
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
|
|
1462
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
|
|
1463
|
+
textBlock,
|
|
1464
|
+
buttonBlock
|
|
1465
|
+
] }) }) })
|
|
1466
|
+
]
|
|
1467
|
+
}
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
return /* @__PURE__ */ jsxs17(
|
|
1471
|
+
"section",
|
|
1472
|
+
{
|
|
1473
|
+
className: ["hero", variantClass, className].filter(Boolean).join(" "),
|
|
1474
|
+
...props,
|
|
1475
|
+
children: [
|
|
1476
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__grid", "aria-hidden": "true" }),
|
|
1477
|
+
variant === "visuals" && leftVisual && /* @__PURE__ */ jsx18(
|
|
1478
|
+
Visual,
|
|
1479
|
+
{
|
|
1480
|
+
src: leftVisual,
|
|
1481
|
+
className: "hero__visual hero__visual--left",
|
|
1482
|
+
alt: ""
|
|
1483
|
+
}
|
|
1484
|
+
),
|
|
1485
|
+
variant === "visuals" && rightVisual && /* @__PURE__ */ jsx18(
|
|
1486
|
+
Visual,
|
|
1487
|
+
{
|
|
1488
|
+
src: rightVisual,
|
|
1489
|
+
className: "hero__visual hero__visual--right",
|
|
1490
|
+
alt: ""
|
|
1491
|
+
}
|
|
1492
|
+
),
|
|
1493
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
|
|
1494
|
+
/* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
|
|
1495
|
+
textBlock,
|
|
1496
|
+
buttonBlock
|
|
1497
|
+
] }) }) })
|
|
1498
|
+
]
|
|
1499
|
+
}
|
|
1500
|
+
);
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
// templates/Stats/Stats.tsx
|
|
1504
|
+
import { useEffect as useEffect3, useRef as useRef3, useState as useState6 } from "react";
|
|
1505
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1506
|
+
var INTERVAL_MS = 2e3;
|
|
1507
|
+
var TRANSITION = "transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1)";
|
|
1508
|
+
function relativePos(index, active, total) {
|
|
1509
|
+
const raw = ((index - active) % total + total) % total;
|
|
1510
|
+
return raw > total / 2 ? raw - total : raw;
|
|
1511
|
+
}
|
|
1512
|
+
function getStatStyle(rel) {
|
|
1513
|
+
if (rel === 0) {
|
|
1514
|
+
return { transform: "translateY(-50%) scale(1)", opacity: 1, zIndex: 2, transition: TRANSITION };
|
|
1515
|
+
}
|
|
1516
|
+
if (rel === -1) {
|
|
1517
|
+
return { transform: "translateY(calc(-50% - 110%)) scale(0.7)", opacity: 1, zIndex: 1, transition: TRANSITION };
|
|
1518
|
+
}
|
|
1519
|
+
if (rel === 1) {
|
|
1520
|
+
return { transform: "translateY(calc(-50% + 110%)) scale(0.7)", opacity: 1, zIndex: 1, transition: TRANSITION };
|
|
1521
|
+
}
|
|
1522
|
+
return {
|
|
1523
|
+
transform: rel < 0 ? "translateY(calc(-50% - 110%)) scale(0.4)" : "translateY(calc(-50% + 110%)) scale(0.4)",
|
|
1524
|
+
opacity: 0,
|
|
1525
|
+
zIndex: 0,
|
|
1526
|
+
transition: TRANSITION
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
var AwardBadge = ({ imageSrc, imageAlt = "" }) => /* @__PURE__ */ jsx19("div", { className: "stats__award", children: /* @__PURE__ */ jsx19("img", { src: imageSrc, alt: imageAlt, className: "stats__award-image" }) });
|
|
1530
|
+
var Stats = ({
|
|
1531
|
+
title,
|
|
1532
|
+
description,
|
|
1533
|
+
stats,
|
|
1534
|
+
leftAwards = [],
|
|
1535
|
+
rightAwards = [],
|
|
1536
|
+
className,
|
|
1537
|
+
...props
|
|
1538
|
+
}) => {
|
|
1539
|
+
const [activeIndex, setActiveIndex] = useState6(0);
|
|
1540
|
+
const intervalRef = useRef3(null);
|
|
1541
|
+
const hasAwards = leftAwards.length > 0 || rightAwards.length > 0;
|
|
1542
|
+
const allAwards = [...leftAwards, ...rightAwards];
|
|
1543
|
+
const total = stats.length;
|
|
1544
|
+
useEffect3(() => {
|
|
1545
|
+
if (total <= 1) return;
|
|
1546
|
+
intervalRef.current = setInterval(() => {
|
|
1547
|
+
setActiveIndex((prev) => (prev + 1) % total);
|
|
1548
|
+
}, INTERVAL_MS);
|
|
1549
|
+
return () => {
|
|
1550
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
1551
|
+
};
|
|
1552
|
+
}, [total]);
|
|
1553
|
+
return /* @__PURE__ */ jsx19(
|
|
1554
|
+
"section",
|
|
1555
|
+
{
|
|
1556
|
+
className: ["stats", className].filter(Boolean).join(" "),
|
|
1557
|
+
...props,
|
|
1558
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "stats__inner", children: [
|
|
1559
|
+
/* @__PURE__ */ jsxs18("div", { className: "stats__header", children: [
|
|
1560
|
+
/* @__PURE__ */ jsx19("h2", { className: "stats__title", children: title }),
|
|
1561
|
+
description && /* @__PURE__ */ jsx19("p", { className: "stats__description", children: description })
|
|
1562
|
+
] }),
|
|
1563
|
+
/* @__PURE__ */ jsxs18("div", { className: "stats__content", children: [
|
|
1564
|
+
leftAwards.length > 0 && /* @__PURE__ */ jsx19("div", { className: "stats__awards-col stats__awards-col--left", children: leftAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) }),
|
|
1565
|
+
/* @__PURE__ */ jsx19("div", { className: "stats__card", children: /* @__PURE__ */ jsxs18("div", { className: "stats__card-track", children: [
|
|
1566
|
+
/* @__PURE__ */ jsx19("div", { className: "stats__fade stats__fade--top", "aria-hidden": "true" }),
|
|
1567
|
+
/* @__PURE__ */ jsx19("div", { className: "stats__fade stats__fade--bottom", "aria-hidden": "true" }),
|
|
1568
|
+
stats.map((stat, i) => {
|
|
1569
|
+
const rel = relativePos(i, activeIndex, total);
|
|
1570
|
+
const active = rel === 0;
|
|
1571
|
+
return /* @__PURE__ */ jsxs18(
|
|
1572
|
+
"div",
|
|
1573
|
+
{
|
|
1574
|
+
className: [
|
|
1575
|
+
"stats__stat",
|
|
1576
|
+
active ? "stats__stat--active" : "stats__stat--inactive"
|
|
1577
|
+
].join(" "),
|
|
1578
|
+
style: getStatStyle(rel),
|
|
1579
|
+
"aria-hidden": !active,
|
|
1580
|
+
children: [
|
|
1581
|
+
/* @__PURE__ */ jsx19("span", { className: "stats__stat-value", children: stat.value }),
|
|
1582
|
+
/* @__PURE__ */ jsx19("span", { className: "stats__stat-label", children: stat.label })
|
|
1583
|
+
]
|
|
1584
|
+
},
|
|
1585
|
+
i
|
|
1586
|
+
);
|
|
1587
|
+
})
|
|
1588
|
+
] }) }),
|
|
1589
|
+
rightAwards.length > 0 && /* @__PURE__ */ jsx19("div", { className: "stats__awards-col stats__awards-col--right", children: rightAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) }),
|
|
1590
|
+
hasAwards && /* @__PURE__ */ jsx19("div", { className: "stats__awards-mobile", children: allAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) })
|
|
1591
|
+
] })
|
|
1592
|
+
] })
|
|
1593
|
+
}
|
|
1594
|
+
);
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1597
|
+
// templates/Scrollytelling/Scrollytelling.tsx
|
|
1598
|
+
import { useEffect as useEffect4, useRef as useRef4, useState as useState7 } from "react";
|
|
1599
|
+
import { DotLottieReact } from "@lottiefiles/dotlottie-react";
|
|
1600
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1601
|
+
var SCROLLYTELLING_DATA = [
|
|
1602
|
+
{
|
|
1603
|
+
title: "Forex",
|
|
1604
|
+
description: "Trade the most popular currency pairs with high leverage, tight spreads, and fast execution.",
|
|
1605
|
+
linkLabel: "Learn more",
|
|
1606
|
+
link: "/markets/forex",
|
|
1607
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a906489e5aadf94e501c4_Forex.lottie"
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
title: "Derived Indices",
|
|
1611
|
+
description: "Trade 24/7 on exclusive Synthetic and Derived Indices. Choose volatility levels that match your strategy.",
|
|
1612
|
+
linkLabel: "Learn more",
|
|
1613
|
+
link: "/markets/derived-indices/synthetic-indices",
|
|
1614
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064588b0d2709e7ceac_Derived%20Indices.lottie"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
title: "Stocks",
|
|
1618
|
+
description: "Trade global market leaders like Apple, Tesla, and NVIDIA.",
|
|
1619
|
+
linkLabel: "Learn more",
|
|
1620
|
+
link: "/markets/stocks",
|
|
1621
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064892f97175b724a9c_Stocks.lottie"
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
title: "Commodities",
|
|
1625
|
+
description: "Trade gold, silver, oil, natural gas, sugar, and more.",
|
|
1626
|
+
linkLabel: "Learn more",
|
|
1627
|
+
link: "/markets/commodities",
|
|
1628
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064edd96a014a6092cf_Commodities.lottie"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
title: "Cryptos",
|
|
1632
|
+
description: "Trade round the clock on the volatility of cryptocurrencies like Bitcoin and Ethereum.",
|
|
1633
|
+
linkLabel: "Learn more",
|
|
1634
|
+
link: "/markets/cryptocurrencies",
|
|
1635
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a90647b8d9652a28b94e3_Crypto.lottie"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
title: "Stock Indices",
|
|
1639
|
+
description: "Trade offerings that track the top global stock indices.",
|
|
1640
|
+
linkLabel: "Learn more",
|
|
1641
|
+
link: "/markets/stock-indices",
|
|
1642
|
+
mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064f2c16e4e0732abfb_Stock%20Indices.lottie"
|
|
1643
|
+
}
|
|
1644
|
+
];
|
|
1645
|
+
var ChevronRight2 = () => /* @__PURE__ */ jsx20(
|
|
1646
|
+
"svg",
|
|
1647
|
+
{
|
|
1648
|
+
className: "scrolly__item-link-icon",
|
|
1649
|
+
width: "16",
|
|
1650
|
+
height: "16",
|
|
1651
|
+
viewBox: "0 0 16 16",
|
|
1652
|
+
fill: "none",
|
|
1653
|
+
"aria-hidden": "true",
|
|
1654
|
+
children: /* @__PURE__ */ jsx20(
|
|
1655
|
+
"path",
|
|
1656
|
+
{
|
|
1657
|
+
d: "M6 3l5 5-5 5",
|
|
1658
|
+
stroke: "currentColor",
|
|
1659
|
+
strokeWidth: "1.5",
|
|
1660
|
+
strokeLinecap: "round",
|
|
1661
|
+
strokeLinejoin: "round"
|
|
1662
|
+
}
|
|
1663
|
+
)
|
|
1664
|
+
}
|
|
1665
|
+
);
|
|
1666
|
+
function resolveMediaType(item) {
|
|
1667
|
+
if (item.mediaType) return item.mediaType;
|
|
1668
|
+
return item.mediaUrl.split("?")[0].endsWith(".lottie") ? "lottie" : "image";
|
|
1669
|
+
}
|
|
1670
|
+
var MediaRenderer = ({ item, active }) => {
|
|
1671
|
+
if (resolveMediaType(item) === "lottie") {
|
|
1672
|
+
return /* @__PURE__ */ jsx20(
|
|
1673
|
+
DotLottieReact,
|
|
1674
|
+
{
|
|
1675
|
+
src: item.mediaUrl,
|
|
1676
|
+
loop: true,
|
|
1677
|
+
autoplay: active
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1680
|
+
}
|
|
1681
|
+
return /* @__PURE__ */ jsx20(
|
|
1682
|
+
"img",
|
|
1683
|
+
{
|
|
1684
|
+
src: item.mediaUrl,
|
|
1685
|
+
alt: item.title,
|
|
1686
|
+
loading: "lazy"
|
|
1687
|
+
}
|
|
1688
|
+
);
|
|
1689
|
+
};
|
|
1690
|
+
var Scrollytelling = ({
|
|
1691
|
+
header,
|
|
1692
|
+
items,
|
|
1693
|
+
variant = "media-right",
|
|
1694
|
+
className,
|
|
1695
|
+
...props
|
|
1696
|
+
}) => {
|
|
1697
|
+
const [activeIndex, setActiveIndex] = useState7(0);
|
|
1698
|
+
const itemRefs = useRef4([]);
|
|
1699
|
+
useEffect4(() => {
|
|
1700
|
+
const elements = itemRefs.current.filter(Boolean);
|
|
1701
|
+
if (!elements.length) return;
|
|
1702
|
+
const observer = new IntersectionObserver(
|
|
1703
|
+
(entries) => {
|
|
1704
|
+
entries.forEach((entry) => {
|
|
1705
|
+
if (entry.isIntersecting) {
|
|
1706
|
+
const idx = itemRefs.current.indexOf(
|
|
1707
|
+
entry.target
|
|
1708
|
+
);
|
|
1709
|
+
if (idx !== -1) setActiveIndex(idx);
|
|
1710
|
+
}
|
|
1711
|
+
});
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
/* Fire when 50 % of the text block is visible.
|
|
1715
|
+
rootMargin trims the effective viewport to its
|
|
1716
|
+
middle third, preventing accidental fires when
|
|
1717
|
+
items are only just entering / leaving the screen. */
|
|
1718
|
+
threshold: 0.5,
|
|
1719
|
+
rootMargin: "-15% 0px -15% 0px"
|
|
1720
|
+
}
|
|
1721
|
+
);
|
|
1722
|
+
elements.forEach((el) => observer.observe(el));
|
|
1723
|
+
return () => observer.disconnect();
|
|
1724
|
+
}, [items.length]);
|
|
1725
|
+
const rootClass = [
|
|
1726
|
+
"scrolly",
|
|
1727
|
+
`scrolly--${variant}`,
|
|
1728
|
+
className
|
|
1729
|
+
].filter(Boolean).join(" ");
|
|
1730
|
+
return /* @__PURE__ */ jsx20("section", { className: rootClass, ...props, children: /* @__PURE__ */ jsxs19("div", { className: "scrolly__inner", children: [
|
|
1731
|
+
/* @__PURE__ */ jsx20("h2", { className: "scrolly__header", children: header }),
|
|
1732
|
+
/* @__PURE__ */ jsxs19("div", { className: "scrolly__layout", children: [
|
|
1733
|
+
/* @__PURE__ */ jsx20("div", { className: "scrolly__media-col", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("div", { className: "scrolly__media-wrap", children: items.map((item, i) => /* @__PURE__ */ jsx20(
|
|
1734
|
+
"div",
|
|
1735
|
+
{
|
|
1736
|
+
className: [
|
|
1737
|
+
"scrolly__media-item",
|
|
1738
|
+
i === activeIndex ? "scrolly__media-item--active" : ""
|
|
1739
|
+
].filter(Boolean).join(" "),
|
|
1740
|
+
children: /* @__PURE__ */ jsx20(
|
|
1741
|
+
MediaRenderer,
|
|
1742
|
+
{
|
|
1743
|
+
item,
|
|
1744
|
+
active: i === activeIndex
|
|
1745
|
+
}
|
|
1746
|
+
)
|
|
1747
|
+
},
|
|
1748
|
+
i
|
|
1749
|
+
)) }) }),
|
|
1750
|
+
/* @__PURE__ */ jsx20("div", { className: "scrolly__content-col", children: items.map((item, i) => /* @__PURE__ */ jsxs19(
|
|
1751
|
+
"div",
|
|
1752
|
+
{
|
|
1753
|
+
ref: (el) => {
|
|
1754
|
+
itemRefs.current[i] = el;
|
|
1755
|
+
},
|
|
1756
|
+
className: [
|
|
1757
|
+
"scrolly__item",
|
|
1758
|
+
i === activeIndex ? "scrolly__item--active" : "scrolly__item--inactive"
|
|
1759
|
+
].join(" "),
|
|
1760
|
+
children: [
|
|
1761
|
+
/* @__PURE__ */ jsx20("h3", { className: "scrolly__item-title", children: item.title }),
|
|
1762
|
+
/* @__PURE__ */ jsx20("p", { className: "scrolly__item-desc", children: item.description }),
|
|
1763
|
+
/* @__PURE__ */ jsxs19(
|
|
1764
|
+
"a",
|
|
1765
|
+
{
|
|
1766
|
+
href: item.link,
|
|
1767
|
+
className: "scrolly__item-link",
|
|
1768
|
+
children: [
|
|
1769
|
+
/* @__PURE__ */ jsx20("span", { children: item.linkLabel }),
|
|
1770
|
+
/* @__PURE__ */ jsx20(ChevronRight2, {})
|
|
1771
|
+
]
|
|
1772
|
+
}
|
|
1773
|
+
)
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
i
|
|
1777
|
+
)) })
|
|
1778
|
+
] }),
|
|
1779
|
+
/* @__PURE__ */ jsx20("div", { className: "scrolly__mobile-list", children: items.map((item, i) => /* @__PURE__ */ jsxs19("div", { className: "scrolly__mobile-item", children: [
|
|
1780
|
+
/* @__PURE__ */ jsx20("h3", { className: "scrolly__item-title", children: item.title }),
|
|
1781
|
+
/* @__PURE__ */ jsx20("p", { className: "scrolly__item-desc", children: item.description }),
|
|
1782
|
+
/* @__PURE__ */ jsxs19(
|
|
1783
|
+
"a",
|
|
1784
|
+
{
|
|
1785
|
+
href: item.link,
|
|
1786
|
+
className: "scrolly__item-link",
|
|
1787
|
+
children: [
|
|
1788
|
+
/* @__PURE__ */ jsx20("span", { children: "Learn more" }),
|
|
1789
|
+
/* @__PURE__ */ jsx20(ChevronRight2, {})
|
|
1790
|
+
]
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
/* @__PURE__ */ jsx20("div", { className: "scrolly__mobile-media", children: /* @__PURE__ */ jsx20(MediaRenderer, { item, active: true }) })
|
|
1794
|
+
] }, i)) })
|
|
1795
|
+
] }) });
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
// templates/StickyStackedCards/StickyStackedCards.tsx
|
|
1799
|
+
import { useEffect as useEffect5, useRef as useRef5 } from "react";
|
|
1800
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1801
|
+
var STEPS_DATA = [
|
|
1802
|
+
{
|
|
1803
|
+
title: "Sign up",
|
|
1804
|
+
description: "Sign up in minutes. Practise with a zero-risk demo account.",
|
|
1805
|
+
imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/677cfad9dd757e95ee7fb4d9_image%20phone.webp",
|
|
1806
|
+
theme: "light"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
title: "Deposit",
|
|
1810
|
+
description: "Use your favourite local payment method to fund your account.",
|
|
1811
|
+
imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/6757df583bf331c84b6c6a61_card-2.webp",
|
|
1812
|
+
theme: "coral"
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
title: "Trade",
|
|
1816
|
+
description: "Start your trading journey.",
|
|
1817
|
+
imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/6757df583bf331c84b6c6a59_card-3.webp",
|
|
1818
|
+
theme: "dark"
|
|
1819
|
+
}
|
|
1820
|
+
];
|
|
1821
|
+
var MIN_SCALE = { 0: 0.88, 1: 0.94 };
|
|
1822
|
+
var StickyStackedCards = ({
|
|
1823
|
+
header,
|
|
1824
|
+
items,
|
|
1825
|
+
className,
|
|
1826
|
+
...props
|
|
1827
|
+
}) => {
|
|
1828
|
+
const cardRefs = useRef5([]);
|
|
1829
|
+
useEffect5(() => {
|
|
1830
|
+
if (typeof window === "undefined") return;
|
|
1831
|
+
let rafId = 0;
|
|
1832
|
+
const update = () => {
|
|
1833
|
+
const cards = cardRefs.current.filter(Boolean);
|
|
1834
|
+
const n = cards.length;
|
|
1835
|
+
cards.forEach((card, i) => {
|
|
1836
|
+
const minScale = MIN_SCALE[i];
|
|
1837
|
+
if (minScale === void 0) {
|
|
1838
|
+
card.style.setProperty("--card-scale", "1");
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
const nextCard = cards[i + 1];
|
|
1842
|
+
if (!nextCard) return;
|
|
1843
|
+
const cardRect = card.getBoundingClientRect();
|
|
1844
|
+
const nextRect = nextCard.getBoundingClientRect();
|
|
1845
|
+
const cardHeight = cardRect.height;
|
|
1846
|
+
const gap = nextRect.top - cardRect.top;
|
|
1847
|
+
const progress = Math.max(0, Math.min(1, 1 - gap / cardHeight));
|
|
1848
|
+
const scale = 1 - (1 - minScale) * progress;
|
|
1849
|
+
card.style.setProperty("--card-scale", String(+scale.toFixed(4)));
|
|
1850
|
+
});
|
|
1851
|
+
};
|
|
1852
|
+
const onScroll = () => {
|
|
1853
|
+
cancelAnimationFrame(rafId);
|
|
1854
|
+
rafId = requestAnimationFrame(update);
|
|
1855
|
+
};
|
|
1856
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
1857
|
+
update();
|
|
1858
|
+
return () => {
|
|
1859
|
+
window.removeEventListener("scroll", onScroll);
|
|
1860
|
+
cancelAnimationFrame(rafId);
|
|
1861
|
+
};
|
|
1862
|
+
}, [items.length]);
|
|
1863
|
+
return /* @__PURE__ */ jsx21(
|
|
1864
|
+
"section",
|
|
1865
|
+
{
|
|
1866
|
+
className: ["ssc", className].filter(Boolean).join(" "),
|
|
1867
|
+
...props,
|
|
1868
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "ssc__inner", children: [
|
|
1869
|
+
/* @__PURE__ */ jsx21("h2", { className: "ssc__header", children: header }),
|
|
1870
|
+
/* @__PURE__ */ jsx21("div", { className: "ssc__track", children: items.map((item, i) => /* @__PURE__ */ jsxs20(
|
|
1871
|
+
"div",
|
|
1872
|
+
{
|
|
1873
|
+
ref: (el) => {
|
|
1874
|
+
cardRefs.current[i] = el;
|
|
1875
|
+
},
|
|
1876
|
+
className: [
|
|
1877
|
+
"ssc__card",
|
|
1878
|
+
`ssc__card--${item.theme ?? "light"}`
|
|
1879
|
+
].join(" "),
|
|
1880
|
+
style: {
|
|
1881
|
+
zIndex: i + 1,
|
|
1882
|
+
/*
|
|
1883
|
+
* PEEK OFFSET — every card gets i × peek-offset so each
|
|
1884
|
+
* prior card shows as a thin strip at the top of the next.
|
|
1885
|
+
*
|
|
1886
|
+
* Example with 3 cards, peek = 16px:
|
|
1887
|
+
* Card 0 (Sign up) → 80px
|
|
1888
|
+
* Card 1 (Deposit) → 96px (Sign up peeks 16px above)
|
|
1889
|
+
* Card 2 (Trade) → 112px (Deposit peeks 16px, Sign up 32px above)
|
|
1890
|
+
*
|
|
1891
|
+
* Final state: two 16px colour strips at top, Trade fills the rest.
|
|
1892
|
+
*/
|
|
1893
|
+
top: `calc(var(--ssc-sticky-top) + ${i} * var(--ssc-peek-offset))`
|
|
1894
|
+
},
|
|
1895
|
+
children: [
|
|
1896
|
+
/* @__PURE__ */ jsxs20("div", { className: "ssc__card-content", children: [
|
|
1897
|
+
/* @__PURE__ */ jsx21("h3", { className: "ssc__card-title", children: item.title }),
|
|
1898
|
+
/* @__PURE__ */ jsx21("p", { className: "ssc__card-desc", children: item.description })
|
|
1899
|
+
] }),
|
|
1900
|
+
/* @__PURE__ */ jsx21("div", { className: "ssc__card-image", children: /* @__PURE__ */ jsx21(
|
|
1901
|
+
"img",
|
|
1902
|
+
{
|
|
1903
|
+
src: item.imageUrl,
|
|
1904
|
+
alt: item.title,
|
|
1905
|
+
loading: i === 0 ? "eager" : "lazy"
|
|
1906
|
+
}
|
|
1907
|
+
) })
|
|
1908
|
+
]
|
|
1909
|
+
},
|
|
1910
|
+
i
|
|
1911
|
+
)) })
|
|
1912
|
+
] })
|
|
1913
|
+
}
|
|
1914
|
+
);
|
|
1915
|
+
};
|
|
1916
|
+
|
|
1917
|
+
// templates/CTABanner/CTABanner.tsx
|
|
1918
|
+
import { useRef as useRef6 } from "react";
|
|
1919
|
+
import {
|
|
1920
|
+
motion,
|
|
1921
|
+
useScroll,
|
|
1922
|
+
useSpring,
|
|
1923
|
+
useTransform,
|
|
1924
|
+
useMotionTemplate
|
|
1925
|
+
} from "framer-motion";
|
|
1926
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1927
|
+
var ENTRANCE = {
|
|
1928
|
+
near: 80,
|
|
1929
|
+
mid: 130,
|
|
1930
|
+
far: 180,
|
|
1931
|
+
edge: 240,
|
|
1932
|
+
blurStart: 28
|
|
1933
|
+
};
|
|
1934
|
+
var SPRING = { stiffness: 80, damping: 30, restDelta: 1e-3 };
|
|
1935
|
+
var LOCK_AT = 0.5;
|
|
1936
|
+
var PLACEHOLDER_URL = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/68da5c86c91c54f39c86ce1a_footer-member-5.webp";
|
|
1937
|
+
var AVATAR_DATA = [
|
|
1938
|
+
/* ── Rank 0 — bottom-centre-ish (dist ≈ 285) ─── */
|
|
1939
|
+
{
|
|
1940
|
+
id: 11,
|
|
1941
|
+
staggerRank: 0,
|
|
1942
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1943
|
+
desktopPos: { left: "45.7%", top: "84.9%" },
|
|
1944
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "81.8%" },
|
|
1945
|
+
mobileVisible: true
|
|
1946
|
+
},
|
|
1947
|
+
/* ── Rank 1 — top-centre (dist ≈ 293) ────────── */
|
|
1948
|
+
{
|
|
1949
|
+
id: 12,
|
|
1950
|
+
staggerRank: 1,
|
|
1951
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1952
|
+
desktopPos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "0%" },
|
|
1953
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "9.2%" },
|
|
1954
|
+
mobileVisible: true
|
|
1955
|
+
},
|
|
1956
|
+
/* ── Rank 2 — right mid-lower (dist ≈ 341) ───── */
|
|
1957
|
+
{
|
|
1958
|
+
id: 10,
|
|
1959
|
+
staggerRank: 2,
|
|
1960
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1961
|
+
desktopPos: { left: "68.5%", top: "70.7%" },
|
|
1962
|
+
mobilePos: null,
|
|
1963
|
+
mobileVisible: false
|
|
1964
|
+
},
|
|
1965
|
+
/* ── Rank 3 — left mid-lower (dist ≈ 342) ────── */
|
|
1966
|
+
{
|
|
1967
|
+
id: 1,
|
|
1968
|
+
staggerRank: 3,
|
|
1969
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1970
|
+
desktopPos: { left: "24.0%", top: "70.7%" },
|
|
1971
|
+
mobilePos: null,
|
|
1972
|
+
mobileVisible: false
|
|
1973
|
+
},
|
|
1974
|
+
/* ── Rank 4 — left upper (dist ≈ 345) ────────── */
|
|
1975
|
+
{
|
|
1976
|
+
id: 3,
|
|
1977
|
+
staggerRank: 4,
|
|
1978
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1979
|
+
desktopPos: { left: "24.0%", top: "14.4%" },
|
|
1980
|
+
mobilePos: { left: "8.3%", top: "18.2%" },
|
|
1981
|
+
mobileVisible: true
|
|
1982
|
+
},
|
|
1983
|
+
/* ── Rank 5 — right upper (dist ≈ 345) ───────── */
|
|
1984
|
+
{
|
|
1985
|
+
id: 6,
|
|
1986
|
+
staggerRank: 5,
|
|
1987
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1988
|
+
desktopPos: { left: "68.5%", top: "14.4%" },
|
|
1989
|
+
mobilePos: { right: "7.8%", top: "18.3%" },
|
|
1990
|
+
mobileVisible: true
|
|
1991
|
+
},
|
|
1992
|
+
/* ── Rank 6 — far-right middle (dist ≈ 572) ──── */
|
|
1993
|
+
{
|
|
1994
|
+
id: 8,
|
|
1995
|
+
staggerRank: 6,
|
|
1996
|
+
imageUrl: PLACEHOLDER_URL,
|
|
1997
|
+
desktopPos: { left: "91.0%", top: "43.0%" },
|
|
1998
|
+
mobilePos: { right: "7.8%", top: "77.2%" },
|
|
1999
|
+
mobileVisible: true
|
|
2000
|
+
},
|
|
2001
|
+
/* ── Rank 7 — far-left middle (dist ≈ 577) ───── */
|
|
2002
|
+
{
|
|
2003
|
+
id: 5,
|
|
2004
|
+
staggerRank: 7,
|
|
2005
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2006
|
+
desktopPos: { left: "1.25%", top: "43.0%" },
|
|
2007
|
+
mobilePos: { left: "8.6%", top: "72.8%" },
|
|
2008
|
+
mobileVisible: true
|
|
2009
|
+
},
|
|
2010
|
+
/* ── Rank 8 — far-right bottom (dist ≈ 639) ──── */
|
|
2011
|
+
{
|
|
2012
|
+
id: 9,
|
|
2013
|
+
staggerRank: 8,
|
|
2014
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2015
|
+
desktopPos: { left: "91.0%", top: "84.9%" },
|
|
2016
|
+
mobilePos: null,
|
|
2017
|
+
mobileVisible: false
|
|
2018
|
+
},
|
|
2019
|
+
/* ── Rank 9 — far-right top (dist ≈ 642) ─────── */
|
|
2020
|
+
{
|
|
2021
|
+
id: 7,
|
|
2022
|
+
staggerRank: 9,
|
|
2023
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2024
|
+
desktopPos: { left: "91.0%", top: "0%" },
|
|
2025
|
+
mobilePos: null,
|
|
2026
|
+
mobileVisible: false
|
|
2027
|
+
},
|
|
2028
|
+
/* ── Rank 10 — far-left bottom (dist ≈ 643) ──── */
|
|
2029
|
+
{
|
|
2030
|
+
id: 2,
|
|
2031
|
+
staggerRank: 10,
|
|
2032
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2033
|
+
desktopPos: { left: "1.25%", top: "84.9%" },
|
|
2034
|
+
mobilePos: null,
|
|
2035
|
+
mobileVisible: false
|
|
2036
|
+
},
|
|
2037
|
+
/* ── Rank 11 — far-left top (dist ≈ 647) ─────── */
|
|
2038
|
+
{
|
|
2039
|
+
id: 4,
|
|
2040
|
+
staggerRank: 11,
|
|
2041
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2042
|
+
desktopPos: { left: "1.25%", top: "0%" },
|
|
2043
|
+
mobilePos: null,
|
|
2044
|
+
mobileVisible: false
|
|
2045
|
+
}
|
|
2046
|
+
];
|
|
2047
|
+
function useAvatarYValues(smooth) {
|
|
2048
|
+
const y0 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.near, 0]);
|
|
2049
|
+
const y1 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.near, 0]);
|
|
2050
|
+
const y2 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2051
|
+
const y3 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2052
|
+
const y4 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2053
|
+
const y5 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2054
|
+
const y6 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
|
|
2055
|
+
const y7 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
|
|
2056
|
+
const y8 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2057
|
+
const y9 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2058
|
+
const y10 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2059
|
+
const y11 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2060
|
+
return [y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11];
|
|
2061
|
+
}
|
|
2062
|
+
function useAvatarXValues(smooth) {
|
|
2063
|
+
const x0 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
|
|
2064
|
+
const x1 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
|
|
2065
|
+
const x2 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2066
|
+
const x3 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2067
|
+
const x4 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2068
|
+
const x5 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2069
|
+
const x6 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2070
|
+
const x7 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.far, 0]);
|
|
2071
|
+
const x8 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2072
|
+
const x9 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2073
|
+
const x10 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2074
|
+
const x11 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2075
|
+
return [x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11];
|
|
2076
|
+
}
|
|
2077
|
+
var CTABanner = ({
|
|
2078
|
+
headline = "Join 3M+ global traders",
|
|
2079
|
+
ctaLabel = "Open account",
|
|
2080
|
+
ctaHref = "#",
|
|
2081
|
+
avatars = AVATAR_DATA,
|
|
2082
|
+
className,
|
|
2083
|
+
...props
|
|
2084
|
+
}) => {
|
|
2085
|
+
const sectionRef = useRef6(null);
|
|
2086
|
+
const { scrollYProgress } = useScroll({
|
|
2087
|
+
target: sectionRef,
|
|
2088
|
+
offset: ["start end", "end start"]
|
|
2089
|
+
});
|
|
2090
|
+
const smooth = useSpring(scrollYProgress, SPRING);
|
|
2091
|
+
const gridOpacity = useTransform(smooth, [0, 0.3], [0, 1]);
|
|
2092
|
+
const heroY = useTransform(smooth, [0, LOCK_AT], [32, 0]);
|
|
2093
|
+
const heroOpacity = useTransform(smooth, [0, 0.3], [0, 1]);
|
|
2094
|
+
const avatarOpacity = useTransform(smooth, [0, 0.25], [0, 1]);
|
|
2095
|
+
const blurPx = useTransform(smooth, [0, 0.3, 0.7, 1], [ENTRANCE.blurStart, 0, 0, ENTRANCE.blurStart]);
|
|
2096
|
+
const avatarFilter = useMotionTemplate`blur(${blurPx}px)`;
|
|
2097
|
+
const avatarYValues = useAvatarYValues(smooth);
|
|
2098
|
+
const avatarXValues = useAvatarXValues(smooth);
|
|
2099
|
+
return /* @__PURE__ */ jsxs21(
|
|
2100
|
+
"section",
|
|
2101
|
+
{
|
|
2102
|
+
ref: sectionRef,
|
|
2103
|
+
className: ["ctab", className].filter(Boolean).join(" "),
|
|
2104
|
+
...props,
|
|
2105
|
+
children: [
|
|
2106
|
+
/* @__PURE__ */ jsx22(
|
|
2107
|
+
motion.div,
|
|
2108
|
+
{
|
|
2109
|
+
className: "ctab__grid",
|
|
2110
|
+
style: { opacity: gridOpacity },
|
|
2111
|
+
"aria-hidden": "true"
|
|
2112
|
+
}
|
|
2113
|
+
),
|
|
2114
|
+
/* @__PURE__ */ jsx22("div", { className: "ctab__inner", children: /* @__PURE__ */ jsxs21("div", { className: "ctab__stage", children: [
|
|
2115
|
+
avatars.map((avatar, index) => {
|
|
2116
|
+
const posStyle = {};
|
|
2117
|
+
if (avatar.desktopPos.left) posStyle["--av-d-left"] = avatar.desktopPos.left;
|
|
2118
|
+
if (avatar.desktopPos.right) posStyle["--av-d-right"] = avatar.desktopPos.right;
|
|
2119
|
+
if (avatar.desktopPos.top) posStyle["--av-d-top"] = avatar.desktopPos.top;
|
|
2120
|
+
if (avatar.mobilePos?.left) posStyle["--av-m-left"] = avatar.mobilePos.left;
|
|
2121
|
+
if (avatar.mobilePos?.right) posStyle["--av-m-right"] = avatar.mobilePos.right;
|
|
2122
|
+
if (avatar.mobilePos?.top) posStyle["--av-m-top"] = avatar.mobilePos.top;
|
|
2123
|
+
return /* @__PURE__ */ jsx22(
|
|
2124
|
+
motion.div,
|
|
2125
|
+
{
|
|
2126
|
+
className: [
|
|
2127
|
+
"ctab__avatar",
|
|
2128
|
+
!avatar.mobileVisible ? "ctab__avatar--desktop-only" : ""
|
|
2129
|
+
].filter(Boolean).join(" "),
|
|
2130
|
+
style: {
|
|
2131
|
+
...posStyle,
|
|
2132
|
+
x: avatarXValues[index],
|
|
2133
|
+
y: avatarYValues[index],
|
|
2134
|
+
opacity: avatarOpacity,
|
|
2135
|
+
filter: avatarFilter
|
|
2136
|
+
},
|
|
2137
|
+
children: /* @__PURE__ */ jsx22(
|
|
2138
|
+
"img",
|
|
2139
|
+
{
|
|
2140
|
+
src: avatar.imageUrl,
|
|
2141
|
+
alt: "",
|
|
2142
|
+
loading: "lazy",
|
|
2143
|
+
draggable: false
|
|
2144
|
+
}
|
|
2145
|
+
)
|
|
2146
|
+
},
|
|
2147
|
+
avatar.id
|
|
2148
|
+
);
|
|
2149
|
+
}),
|
|
2150
|
+
/* @__PURE__ */ jsxs21(
|
|
2151
|
+
motion.div,
|
|
2152
|
+
{
|
|
2153
|
+
className: "ctab__hero",
|
|
2154
|
+
style: { y: heroY, opacity: heroOpacity },
|
|
2155
|
+
children: [
|
|
2156
|
+
/* @__PURE__ */ jsx22("h2", { className: "ctab__headline", children: headline }),
|
|
2157
|
+
/* @__PURE__ */ jsx22("a", { href: ctaHref, className: "ctab__btn", children: ctaLabel })
|
|
2158
|
+
]
|
|
2159
|
+
}
|
|
2160
|
+
)
|
|
2161
|
+
] }) })
|
|
2162
|
+
]
|
|
2163
|
+
}
|
|
2164
|
+
);
|
|
2165
|
+
};
|
|
2166
|
+
|
|
2167
|
+
// templates/DayNightTransition/DayNightTransition.tsx
|
|
2168
|
+
import { useRef as useRef7 } from "react";
|
|
2169
|
+
import {
|
|
2170
|
+
motion as motion2,
|
|
2171
|
+
useScroll as useScroll2,
|
|
2172
|
+
useSpring as useSpring2,
|
|
2173
|
+
useTransform as useTransform2,
|
|
2174
|
+
useMotionTemplate as useMotionTemplate2
|
|
2175
|
+
} from "framer-motion";
|
|
2176
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2177
|
+
var SPRING2 = { stiffness: 80, damping: 30, restDelta: 1e-3 };
|
|
2178
|
+
var FADE_START = 0.35;
|
|
2179
|
+
var FADE_END = 0.65;
|
|
2180
|
+
var WORD_START = 0.4;
|
|
2181
|
+
var WORD_END = 0.6;
|
|
2182
|
+
var TEXT_CHANNEL_DAY = 0;
|
|
2183
|
+
var TEXT_CHANNEL_NIGHT = 255;
|
|
2184
|
+
var DayNightTransition = ({
|
|
2185
|
+
dayImageUrl,
|
|
2186
|
+
nightImageUrl,
|
|
2187
|
+
dayHeadline = "Trade all day",
|
|
2188
|
+
nightHeadline = "Trade all night",
|
|
2189
|
+
dayDescription,
|
|
2190
|
+
nightDescription,
|
|
2191
|
+
ctaLabel = "Get started",
|
|
2192
|
+
ctaHref = "#",
|
|
2193
|
+
className,
|
|
2194
|
+
...props
|
|
2195
|
+
}) => {
|
|
2196
|
+
const wrapperRef = useRef7(null);
|
|
2197
|
+
const { scrollYProgress } = useScroll2({
|
|
2198
|
+
target: wrapperRef,
|
|
2199
|
+
offset: ["start end", "end start"]
|
|
2200
|
+
});
|
|
2201
|
+
const smooth = useSpring2(scrollYProgress, SPRING2);
|
|
2202
|
+
const nightOpacity = useTransform2(smooth, [FADE_START, FADE_END], [0, 1]);
|
|
2203
|
+
const channel = useTransform2(smooth, [FADE_START, FADE_END], [TEXT_CHANNEL_DAY, TEXT_CHANNEL_NIGHT]);
|
|
2204
|
+
const textColor = useMotionTemplate2`rgb(${channel}, ${channel}, ${channel})`;
|
|
2205
|
+
const dayOpacity = useTransform2(smooth, [WORD_START, WORD_END], [1, 0]);
|
|
2206
|
+
const nightOpacity2 = useTransform2(smooth, [WORD_START, WORD_END], [0, 1]);
|
|
2207
|
+
const hasDescription = Boolean(dayDescription || nightDescription);
|
|
2208
|
+
return /* @__PURE__ */ jsx23(
|
|
2209
|
+
"div",
|
|
2210
|
+
{
|
|
2211
|
+
ref: wrapperRef,
|
|
2212
|
+
className: ["dnt", className].filter(Boolean).join(" "),
|
|
2213
|
+
...props,
|
|
2214
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "dnt__sticky", children: [
|
|
2215
|
+
/* @__PURE__ */ jsx23(
|
|
2216
|
+
"img",
|
|
2217
|
+
{
|
|
2218
|
+
className: "dnt__bg dnt__bg--day",
|
|
2219
|
+
src: dayImageUrl,
|
|
2220
|
+
alt: "",
|
|
2221
|
+
loading: "eager",
|
|
2222
|
+
draggable: false
|
|
2223
|
+
}
|
|
2224
|
+
),
|
|
2225
|
+
/* @__PURE__ */ jsx23(
|
|
2226
|
+
motion2.img,
|
|
2227
|
+
{
|
|
2228
|
+
className: "dnt__bg dnt__bg--night",
|
|
2229
|
+
src: nightImageUrl,
|
|
2230
|
+
alt: "",
|
|
2231
|
+
loading: "eager",
|
|
2232
|
+
draggable: false,
|
|
2233
|
+
style: { opacity: nightOpacity }
|
|
2234
|
+
}
|
|
2235
|
+
),
|
|
2236
|
+
/* @__PURE__ */ jsx23("div", { className: "dnt__content", children: /* @__PURE__ */ jsxs22(
|
|
2237
|
+
motion2.div,
|
|
2238
|
+
{
|
|
2239
|
+
className: "dnt__text-wrap",
|
|
2240
|
+
style: { color: textColor },
|
|
2241
|
+
children: [
|
|
2242
|
+
/* @__PURE__ */ jsxs22("div", { className: "dnt__crossfade-wrap", children: [
|
|
2243
|
+
/* @__PURE__ */ jsx23(
|
|
2244
|
+
motion2.h2,
|
|
2245
|
+
{
|
|
2246
|
+
className: "dnt__headline",
|
|
2247
|
+
style: { opacity: dayOpacity },
|
|
2248
|
+
children: dayHeadline
|
|
2249
|
+
}
|
|
2250
|
+
),
|
|
2251
|
+
/* @__PURE__ */ jsx23(
|
|
2252
|
+
motion2.h2,
|
|
2253
|
+
{
|
|
2254
|
+
className: "dnt__headline",
|
|
2255
|
+
"aria-hidden": "true",
|
|
2256
|
+
style: { opacity: nightOpacity2 },
|
|
2257
|
+
children: nightHeadline
|
|
2258
|
+
}
|
|
2259
|
+
)
|
|
2260
|
+
] }),
|
|
2261
|
+
hasDescription && /* @__PURE__ */ jsxs22("div", { className: "dnt__crossfade-wrap", children: [
|
|
2262
|
+
/* @__PURE__ */ jsx23(
|
|
2263
|
+
motion2.p,
|
|
2264
|
+
{
|
|
2265
|
+
className: "dnt__description",
|
|
2266
|
+
style: { opacity: dayOpacity },
|
|
2267
|
+
children: dayDescription ?? ""
|
|
2268
|
+
}
|
|
2269
|
+
),
|
|
2270
|
+
/* @__PURE__ */ jsx23(
|
|
2271
|
+
motion2.p,
|
|
2272
|
+
{
|
|
2273
|
+
className: "dnt__description",
|
|
2274
|
+
"aria-hidden": "true",
|
|
2275
|
+
style: { opacity: nightOpacity2 },
|
|
2276
|
+
children: nightDescription ?? ""
|
|
2277
|
+
}
|
|
2278
|
+
)
|
|
2279
|
+
] }),
|
|
2280
|
+
/* @__PURE__ */ jsx23("a", { href: ctaHref, className: "dnt__btn", children: ctaLabel })
|
|
2281
|
+
]
|
|
2282
|
+
}
|
|
2283
|
+
) })
|
|
2284
|
+
] })
|
|
2285
|
+
}
|
|
2286
|
+
);
|
|
2287
|
+
};
|
|
2288
|
+
|
|
2289
|
+
// templates/PaymentMethods/PaymentMethods.tsx
|
|
2290
|
+
import { useRef as useRef8 } from "react";
|
|
2291
|
+
import {
|
|
2292
|
+
motion as motion3,
|
|
2293
|
+
useScroll as useScroll3,
|
|
2294
|
+
useVelocity,
|
|
2295
|
+
useAnimationFrame,
|
|
2296
|
+
useMotionValue
|
|
2297
|
+
} from "framer-motion";
|
|
2298
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2299
|
+
function modWrap(min, max, v) {
|
|
2300
|
+
const range = max - min;
|
|
2301
|
+
return ((v - min) % range + range) % range + min;
|
|
2302
|
+
}
|
|
2303
|
+
var VELOCITY_FACTOR = 0.4;
|
|
2304
|
+
var MAX_SCROLL_V = 2500;
|
|
2305
|
+
var DEADZONE = 2;
|
|
2306
|
+
var CDN = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/";
|
|
2307
|
+
var COL_ONE_LOGOS = [
|
|
2308
|
+
{ name: "Mastercard", url: `${CDN}68dcd915dc1a82f278b6c061_payment%20method-mastercard.svg` },
|
|
2309
|
+
{ name: "Visa", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-visa.svg` },
|
|
2310
|
+
{ name: "Visa Electron", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-visa-electron.svg` },
|
|
2311
|
+
{ name: "Maestro", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-maestro.svg` },
|
|
2312
|
+
{ name: "Pix", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-pix.svg` },
|
|
2313
|
+
{ name: "Help2Pay", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-help2pay.svg` },
|
|
2314
|
+
{ name: "UPI Neo", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-upineo.svg` },
|
|
2315
|
+
{ name: "M-Pesa", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-mpesa.svg` },
|
|
2316
|
+
{ name: "Ozow", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-ozow.svg` },
|
|
2317
|
+
{ name: "MTN", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-mtn.svg` },
|
|
2318
|
+
{ name: "Airtm", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-airtm.svg` }
|
|
2319
|
+
];
|
|
2320
|
+
var COL_TWO_LOGOS = [
|
|
2321
|
+
{ name: "Bitcoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-bitcoin.svg` },
|
|
2322
|
+
{ name: "Ethereum", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-ethereum.svg` },
|
|
2323
|
+
{ name: "Tron", url: `${CDN}68dcd9d109305b54383580e5_payment%20method-tron.svg` },
|
|
2324
|
+
{ name: "Skrill", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-skrill.svg` },
|
|
2325
|
+
{ name: "Skrill 1-tap", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-skrill-1tap.svg` },
|
|
2326
|
+
{ name: "SticPay", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-sticpay.svg` },
|
|
2327
|
+
{ name: "Litecoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-litecoin.svg` },
|
|
2328
|
+
{ name: "USD Coin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-usdc.svg` },
|
|
2329
|
+
{ name: "Dogecoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-dogecoin.svg` },
|
|
2330
|
+
{ name: "Cardano", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-cardano.svg` },
|
|
2331
|
+
{ name: "BNB", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-bnb.svg` }
|
|
2332
|
+
];
|
|
2333
|
+
var TEXT_CONTENT = {
|
|
2334
|
+
headline: "Your money, your way",
|
|
2335
|
+
body: "Quick deposits, easy withdrawals, and 60+ payment options mean your money is always accessible.",
|
|
2336
|
+
disclaimer: "*Availability of payment methods and processing speeds may vary based on location and selected payment option.",
|
|
2337
|
+
ctaLabel: "Learn more",
|
|
2338
|
+
ctaHref: "#"
|
|
2339
|
+
};
|
|
2340
|
+
var PaymentMethods = ({
|
|
2341
|
+
headline = TEXT_CONTENT.headline,
|
|
2342
|
+
body = TEXT_CONTENT.body,
|
|
2343
|
+
disclaimer = TEXT_CONTENT.disclaimer,
|
|
2344
|
+
ctaLabel = TEXT_CONTENT.ctaLabel,
|
|
2345
|
+
ctaHref = TEXT_CONTENT.ctaHref,
|
|
2346
|
+
col1Logos = COL_ONE_LOGOS,
|
|
2347
|
+
col2Logos = COL_TWO_LOGOS,
|
|
2348
|
+
className,
|
|
2349
|
+
...props
|
|
2350
|
+
}) => {
|
|
2351
|
+
const { scrollY } = useScroll3();
|
|
2352
|
+
const scrollVelocity = useVelocity(scrollY);
|
|
2353
|
+
const col1Y = useMotionValue(0);
|
|
2354
|
+
const col2Y = useMotionValue(0);
|
|
2355
|
+
const col1Ref = useRef8(null);
|
|
2356
|
+
const col2Ref = useRef8(null);
|
|
2357
|
+
useAnimationFrame((_, delta) => {
|
|
2358
|
+
const raw = scrollVelocity.get();
|
|
2359
|
+
if (Math.abs(raw) < DEADZONE) return;
|
|
2360
|
+
const clamped = Math.sign(raw) * Math.min(Math.abs(raw), MAX_SCROLL_V);
|
|
2361
|
+
const step = clamped * VELOCITY_FACTOR * (delta / 1e3);
|
|
2362
|
+
const cycleH1 = (col1Ref.current?.offsetHeight ?? 2e3) / 2;
|
|
2363
|
+
const cycleH2 = (col2Ref.current?.offsetHeight ?? 2e3) / 2;
|
|
2364
|
+
col1Y.set(modWrap(-cycleH1, 0, col1Y.get() - step));
|
|
2365
|
+
col2Y.set(modWrap(-cycleH2, 0, col2Y.get() + step));
|
|
2366
|
+
});
|
|
2367
|
+
const track1 = [...col1Logos, ...col1Logos];
|
|
2368
|
+
const track2 = [...col2Logos, ...col2Logos];
|
|
2369
|
+
return /* @__PURE__ */ jsx24(
|
|
2370
|
+
"section",
|
|
2371
|
+
{
|
|
2372
|
+
className: ["pm", className].filter(Boolean).join(" "),
|
|
2373
|
+
...props,
|
|
2374
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "pm__inner", children: [
|
|
2375
|
+
/* @__PURE__ */ jsx24("div", { className: "pm__media", children: /* @__PURE__ */ jsxs23("div", { className: "pm__carousel", children: [
|
|
2376
|
+
/* @__PURE__ */ jsx24("div", { className: "pm__fade pm__fade--top", "aria-hidden": "true" }),
|
|
2377
|
+
/* @__PURE__ */ jsx24(
|
|
2378
|
+
motion3.div,
|
|
2379
|
+
{
|
|
2380
|
+
ref: col1Ref,
|
|
2381
|
+
className: "pm__col",
|
|
2382
|
+
style: { y: col1Y },
|
|
2383
|
+
children: track1.map((logo, i) => /* @__PURE__ */ jsx24("div", { className: "pm__card", children: /* @__PURE__ */ jsx24("div", { className: "pm__card-img-wrap", children: /* @__PURE__ */ jsx24(
|
|
2384
|
+
"img",
|
|
2385
|
+
{
|
|
2386
|
+
src: logo.url,
|
|
2387
|
+
alt: logo.name,
|
|
2388
|
+
loading: "lazy",
|
|
2389
|
+
draggable: false
|
|
2390
|
+
}
|
|
2391
|
+
) }) }, `c1-${i}`))
|
|
2392
|
+
}
|
|
2393
|
+
),
|
|
2394
|
+
/* @__PURE__ */ jsx24(
|
|
2395
|
+
motion3.div,
|
|
2396
|
+
{
|
|
2397
|
+
ref: col2Ref,
|
|
2398
|
+
className: "pm__col",
|
|
2399
|
+
style: { y: col2Y },
|
|
2400
|
+
children: track2.map((logo, i) => /* @__PURE__ */ jsx24("div", { className: "pm__card", children: /* @__PURE__ */ jsx24("div", { className: "pm__card-img-wrap", children: /* @__PURE__ */ jsx24(
|
|
2401
|
+
"img",
|
|
2402
|
+
{
|
|
2403
|
+
src: logo.url,
|
|
2404
|
+
alt: logo.name,
|
|
2405
|
+
loading: "lazy",
|
|
2406
|
+
draggable: false
|
|
2407
|
+
}
|
|
2408
|
+
) }) }, `c2-${i}`))
|
|
2409
|
+
}
|
|
2410
|
+
),
|
|
2411
|
+
/* @__PURE__ */ jsx24("div", { className: "pm__fade pm__fade--bottom", "aria-hidden": "true" })
|
|
2412
|
+
] }) }),
|
|
2413
|
+
/* @__PURE__ */ jsxs23("div", { className: "pm__content", children: [
|
|
2414
|
+
/* @__PURE__ */ jsx24("h2", { className: "pm__headline", children: headline }),
|
|
2415
|
+
/* @__PURE__ */ jsxs23("div", { className: "pm__text-group", children: [
|
|
2416
|
+
/* @__PURE__ */ jsx24("p", { className: "pm__body", children: body }),
|
|
2417
|
+
/* @__PURE__ */ jsx24("p", { className: "pm__disclaimer", children: disclaimer })
|
|
2418
|
+
] }),
|
|
2419
|
+
/* @__PURE__ */ jsxs23("a", { href: ctaHref, className: "pm__link", children: [
|
|
2420
|
+
ctaLabel,
|
|
2421
|
+
/* @__PURE__ */ jsx24("span", { "aria-hidden": "true", children: "\u2192" })
|
|
2422
|
+
] })
|
|
2423
|
+
] })
|
|
2424
|
+
] })
|
|
2425
|
+
}
|
|
2426
|
+
);
|
|
2427
|
+
};
|
|
950
2428
|
export {
|
|
2429
|
+
AVATAR_DATA,
|
|
951
2430
|
Accordion,
|
|
2431
|
+
BottomSheet,
|
|
952
2432
|
Breadcrumb,
|
|
953
2433
|
Button,
|
|
2434
|
+
COL_ONE_LOGOS,
|
|
2435
|
+
COL_TWO_LOGOS,
|
|
2436
|
+
CTABanner,
|
|
954
2437
|
Card,
|
|
955
2438
|
Chip,
|
|
956
2439
|
ChipDropdown,
|
|
2440
|
+
DayNightTransition,
|
|
2441
|
+
FeatureCards,
|
|
2442
|
+
Footer,
|
|
2443
|
+
Hero,
|
|
957
2444
|
Link,
|
|
958
2445
|
Pagination,
|
|
2446
|
+
PaymentMethods,
|
|
2447
|
+
SCROLLYTELLING_DATA,
|
|
2448
|
+
STEPS_DATA,
|
|
2449
|
+
Scrollytelling,
|
|
959
2450
|
SearchField,
|
|
2451
|
+
Stats,
|
|
2452
|
+
StickyStackedCards,
|
|
2453
|
+
TEXT_CONTENT,
|
|
960
2454
|
Tag,
|
|
961
2455
|
TextField
|
|
962
2456
|
};
|