@deriv-web-design/ui 0.1.5 → 0.1.6
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/block-registry.json +810 -14
- package/components.manifest.json +477 -7
- package/dist/index.css +1150 -86
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +297 -13
- package/dist/index.d.ts +297 -13
- package/dist/index.js +912 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +910 -79
- package/dist/index.mjs.map +1 -1
- package/dist/share-facebook-3B3NOC5Q.png +0 -0
- package/dist/share-link-QGD6KIDA.png +0 -0
- package/dist/share-linkedin-UCIII3JU.png +0 -0
- package/dist/share-telegram-QRXGSHQT.png +0 -0
- package/dist/share-x-UTEBBL73.png +0 -0
- package/dist/trustpilot-rating-badge-D7JOW3KJ.png +0 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,14 +37,20 @@ __export(index_exports, {
|
|
|
37
37
|
ChipDropdown: () => ChipDropdown,
|
|
38
38
|
CoralBanner: () => CoralBanner,
|
|
39
39
|
DEFAULT_AWARDS: () => DEFAULT_AWARDS,
|
|
40
|
+
DEFAULT_CULTURE_CARDS: () => DEFAULT_CULTURE_CARDS,
|
|
40
41
|
DayNightTransition: () => DayNightTransition,
|
|
41
42
|
DotLottieInView: () => DotLottieInView,
|
|
42
43
|
DownloadBadge: () => DownloadBadge,
|
|
43
44
|
DownloadBanner: () => DownloadBanner,
|
|
44
45
|
FEATURE_AWARDS_TEXT_CONTENT: () => FEATURE_AWARDS_TEXT_CONTENT,
|
|
46
|
+
FEATURE_BLOG_CATEGORIES_TEXT_CONTENT: () => FEATURE_BLOG_CATEGORIES_TEXT_CONTENT,
|
|
47
|
+
FEATURE_BLOG_TEXT_CONTENT: () => FEATURE_BLOG_TEXT_CONTENT,
|
|
45
48
|
FEATURE_SCROLL_DATA: () => FEATURE_SCROLL_DATA,
|
|
46
49
|
FaqAccordion: () => FaqAccordion,
|
|
47
50
|
FeatureAwards: () => FeatureAwards,
|
|
51
|
+
FeatureBlog: () => FeatureBlog,
|
|
52
|
+
FeatureBlogCategories: () => FeatureBlogCategories,
|
|
53
|
+
FeatureBlogPage: () => FeatureBlogPage,
|
|
48
54
|
FeatureBullets: () => FeatureBullets,
|
|
49
55
|
FeatureCards: () => FeatureCards,
|
|
50
56
|
FeatureCardsIcon: () => FeatureCardsIcon,
|
|
@@ -61,7 +67,9 @@ __export(index_exports, {
|
|
|
61
67
|
Link: () => Link,
|
|
62
68
|
LogoMarquee: () => LogoMarquee,
|
|
63
69
|
Navbar: () => Navbar,
|
|
70
|
+
PARALLAX_BANNER_TEXT_CONTENT: () => PARALLAX_BANNER_TEXT_CONTENT,
|
|
64
71
|
Pagination: () => Pagination,
|
|
72
|
+
ParallaxBanner: () => ParallaxBanner,
|
|
65
73
|
PeopleGrid: () => PeopleGrid,
|
|
66
74
|
STEPS_DATA: () => STEPS_DATA,
|
|
67
75
|
SearchField: () => SearchField,
|
|
@@ -350,6 +358,7 @@ var SearchField = (0, import_react3.forwardRef)(
|
|
|
350
358
|
({
|
|
351
359
|
variant = "outline",
|
|
352
360
|
status = "neutral",
|
|
361
|
+
showSearchIcon = true,
|
|
353
362
|
value,
|
|
354
363
|
defaultValue,
|
|
355
364
|
onChange,
|
|
@@ -404,7 +413,7 @@ var SearchField = (0, import_react3.forwardRef)(
|
|
|
404
413
|
className: wrapperClass,
|
|
405
414
|
"data-disabled": disabled || void 0,
|
|
406
415
|
children: [
|
|
407
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "iconSlot", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIcon, {}) }),
|
|
416
|
+
showSearchIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "iconSlot", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIcon, {}) }),
|
|
408
417
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
409
418
|
"input",
|
|
410
419
|
{
|
|
@@ -948,6 +957,21 @@ var CardThumbnailVariant = ({
|
|
|
948
957
|
const isVideo = type === "video";
|
|
949
958
|
const isHorizontal = layout === "horizontal" || layout === "horizontal-reverse";
|
|
950
959
|
const isReversed = layout === "horizontal-reverse";
|
|
960
|
+
const hasTags = !hideTags && tags.length > 0;
|
|
961
|
+
const tagsNode = hasTags && (isHorizontal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-tagsList", children: tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "ct-tagItem", children: [
|
|
962
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", className: "ct-tagDot", children: "\xB7" }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "custom" })
|
|
964
|
+
] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-tagsRow", children: tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "fill" }, i)) }));
|
|
965
|
+
const copyLinkNode = showCopyLink && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
966
|
+
"button",
|
|
967
|
+
{
|
|
968
|
+
"aria-label": "Copy link",
|
|
969
|
+
className: "ct-copyLink",
|
|
970
|
+
onClick: onCopyLink,
|
|
971
|
+
type: "button",
|
|
972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LinkIcon, {})
|
|
973
|
+
}
|
|
974
|
+
);
|
|
951
975
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
952
976
|
"div",
|
|
953
977
|
{
|
|
@@ -960,24 +984,13 @@ var CardThumbnailVariant = ({
|
|
|
960
984
|
!isVideo && !hideAvatar && avatar && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { alt: avatarAlt, className: "ct-avatar", src: avatar })
|
|
961
985
|
] }),
|
|
962
986
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-content", children: [
|
|
987
|
+
!isHorizontal && tagsNode,
|
|
963
988
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "ct-title", children: title }),
|
|
964
989
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "ct-summary", children: summary }),
|
|
965
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-metaRow", children: [
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
] }, i)) }),
|
|
970
|
-
showCopyLink && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
971
|
-
"button",
|
|
972
|
-
{
|
|
973
|
-
"aria-label": "Copy link",
|
|
974
|
-
className: "ct-copyLink",
|
|
975
|
-
onClick: onCopyLink,
|
|
976
|
-
type: "button",
|
|
977
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LinkIcon, {})
|
|
978
|
-
}
|
|
979
|
-
)
|
|
980
|
-
] })
|
|
990
|
+
isHorizontal ? (tagsNode || copyLinkNode) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-metaRow", children: [
|
|
991
|
+
tagsNode,
|
|
992
|
+
copyLinkNode
|
|
993
|
+
] }) : copyLinkNode && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-metaRow ct-metaRow--end", children: copyLinkNode })
|
|
981
994
|
] })
|
|
982
995
|
]
|
|
983
996
|
}
|
|
@@ -1980,6 +1993,24 @@ var ButtonBlock2 = ({
|
|
|
1980
1993
|
))
|
|
1981
1994
|
] });
|
|
1982
1995
|
};
|
|
1996
|
+
var SearchBlock = ({ search }) => {
|
|
1997
|
+
const handleKeyDown = (event) => {
|
|
1998
|
+
if (event.key === "Enter") {
|
|
1999
|
+
search?.onSubmit?.(event.currentTarget.value);
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__search", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2003
|
+
SearchField,
|
|
2004
|
+
{
|
|
2005
|
+
placeholder: search?.placeholder ?? "Search",
|
|
2006
|
+
value: search?.value,
|
|
2007
|
+
onChange: search?.onChange,
|
|
2008
|
+
onClear: search?.onClear,
|
|
2009
|
+
onKeyDown: handleKeyDown,
|
|
2010
|
+
showSearchIcon: false
|
|
2011
|
+
}
|
|
2012
|
+
) });
|
|
2013
|
+
};
|
|
1983
2014
|
var Header = ({
|
|
1984
2015
|
variant,
|
|
1985
2016
|
subtitle,
|
|
@@ -1989,6 +2020,7 @@ var Header = ({
|
|
|
1989
2020
|
secondaryButton,
|
|
1990
2021
|
leftVisual,
|
|
1991
2022
|
rightVisual,
|
|
2023
|
+
search,
|
|
1992
2024
|
className,
|
|
1993
2025
|
...props
|
|
1994
2026
|
}) => {
|
|
@@ -2044,6 +2076,7 @@ var Header = ({
|
|
|
2044
2076
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__overlay", "aria-hidden": "true" }),
|
|
2045
2077
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__inner", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__content", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "header__body", children: [
|
|
2046
2078
|
textBlock,
|
|
2079
|
+
variant === "dark-search" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchBlock, { search }),
|
|
2047
2080
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2048
2081
|
ButtonBlock2,
|
|
2049
2082
|
{
|
|
@@ -5253,9 +5286,181 @@ var quote_left_default = "./quote-left-63QMW5NQ.webp";
|
|
|
5253
5286
|
// assets/quote-right.webp
|
|
5254
5287
|
var quote_right_default = "./quote-right-W6AS4YHN.webp";
|
|
5255
5288
|
|
|
5289
|
+
// assets/trustpilot-rating-badge.png
|
|
5290
|
+
var trustpilot_rating_badge_default = "./trustpilot-rating-badge-D7JOW3KJ.png";
|
|
5291
|
+
|
|
5256
5292
|
// templates/Testimonial/Testimonial.tsx
|
|
5257
5293
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5258
|
-
var
|
|
5294
|
+
var StarCell = ({ fill }) => {
|
|
5295
|
+
const clipId = (0, import_react23.useId)();
|
|
5296
|
+
const clamped = Math.max(0, Math.min(1, fill));
|
|
5297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5298
|
+
"svg",
|
|
5299
|
+
{
|
|
5300
|
+
className: "testimonial__tp-star",
|
|
5301
|
+
viewBox: "0 0 96 96",
|
|
5302
|
+
width: "20",
|
|
5303
|
+
height: "20",
|
|
5304
|
+
"aria-hidden": "true",
|
|
5305
|
+
children: [
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("rect", { width: "96", height: "96", className: "testimonial__tp-star-bg" }),
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("rect", { width: 96 * clamped, height: "96" }) }),
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5309
|
+
"rect",
|
|
5310
|
+
{
|
|
5311
|
+
width: "96",
|
|
5312
|
+
height: "96",
|
|
5313
|
+
className: "testimonial__tp-star-fill",
|
|
5314
|
+
clipPath: `url(#${clipId})`
|
|
5315
|
+
}
|
|
5316
|
+
),
|
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5318
|
+
"path",
|
|
5319
|
+
{
|
|
5320
|
+
d: "M48,64.7L62.6,61l6.1,18.8L48,64.7z M81.6,40.4H55.9L48,16.2l-7.9,24.2H14.4l20.8,15l-7.9,24.2 l20.8-15l12.8-9.2L81.6,40.4L81.6,40.4L81.6,40.4L81.6,40.4z",
|
|
5321
|
+
className: "testimonial__tp-star-glyph"
|
|
5322
|
+
}
|
|
5323
|
+
)
|
|
5324
|
+
]
|
|
5325
|
+
}
|
|
5326
|
+
);
|
|
5327
|
+
};
|
|
5328
|
+
var StarRow = ({ rating, size = "sm" }) => {
|
|
5329
|
+
const stars = [0, 1, 2, 3, 4].map((i) => Math.max(0, Math.min(1, rating - i)));
|
|
5330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5331
|
+
"span",
|
|
5332
|
+
{
|
|
5333
|
+
className: ["testimonial__tp-stars", `testimonial__tp-stars--${size}`].join(" "),
|
|
5334
|
+
role: "img",
|
|
5335
|
+
"aria-label": `Rated ${rating} out of 5 stars`,
|
|
5336
|
+
children: stars.map((fill, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StarCell, { fill }, i))
|
|
5337
|
+
}
|
|
5338
|
+
);
|
|
5339
|
+
};
|
|
5340
|
+
var ArrowIcon = ({ direction }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: direction === "prev" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M10 3.5 5.5 8l4.5 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M6 3.5 10.5 8 6 12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
5341
|
+
var SCROLL_EPS = 4;
|
|
5342
|
+
function readScrollState(el) {
|
|
5343
|
+
if (!el) return { canPrev: false, canNext: false };
|
|
5344
|
+
const { scrollLeft, scrollWidth, clientWidth } = el;
|
|
5345
|
+
const maxScroll = scrollWidth - clientWidth;
|
|
5346
|
+
return {
|
|
5347
|
+
canPrev: scrollLeft > SCROLL_EPS,
|
|
5348
|
+
canNext: scrollLeft < maxScroll - SCROLL_EPS
|
|
5349
|
+
};
|
|
5350
|
+
}
|
|
5351
|
+
var TrustpilotTestimonial = ({
|
|
5352
|
+
title,
|
|
5353
|
+
items,
|
|
5354
|
+
className,
|
|
5355
|
+
trustpilotUrl = "https://www.trustpilot.com/review/deriv.com?utm_medium=trustbox&utm_source=Mini",
|
|
5356
|
+
trustpilotScore = 4.5,
|
|
5357
|
+
...props
|
|
5358
|
+
}) => {
|
|
5359
|
+
const trackRef = (0, import_react23.useRef)(null);
|
|
5360
|
+
const [canPrev, setCanPrev] = (0, import_react23.useState)(false);
|
|
5361
|
+
const [canNext, setCanNext] = (0, import_react23.useState)(true);
|
|
5362
|
+
const syncScrollState = (0, import_react23.useCallback)(() => {
|
|
5363
|
+
const next = readScrollState(trackRef.current);
|
|
5364
|
+
setCanPrev(next.canPrev);
|
|
5365
|
+
setCanNext(next.canNext);
|
|
5366
|
+
}, []);
|
|
5367
|
+
(0, import_react23.useEffect)(() => {
|
|
5368
|
+
const el = trackRef.current;
|
|
5369
|
+
if (!el) return;
|
|
5370
|
+
syncScrollState();
|
|
5371
|
+
const ro = new ResizeObserver(() => syncScrollState());
|
|
5372
|
+
ro.observe(el);
|
|
5373
|
+
return () => ro.disconnect();
|
|
5374
|
+
}, [syncScrollState]);
|
|
5375
|
+
const scrollByCard = (direction) => {
|
|
5376
|
+
const el = trackRef.current;
|
|
5377
|
+
if (!el) return;
|
|
5378
|
+
const card = el.querySelector(".testimonial__tp-card-wrap");
|
|
5379
|
+
const gap = Number.parseFloat(getComputedStyle(el).columnGap || "0") || 0;
|
|
5380
|
+
const delta = card?.offsetWidth ?? el.clientWidth * 0.85;
|
|
5381
|
+
el.scrollBy({ left: direction * (delta + gap), behavior: "smooth" });
|
|
5382
|
+
window.requestAnimationFrame(() => window.setTimeout(syncScrollState, 320));
|
|
5383
|
+
};
|
|
5384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5385
|
+
"section",
|
|
5386
|
+
{
|
|
5387
|
+
className: ["testimonial", "testimonial--trustpilot", className].filter(Boolean).join(" "),
|
|
5388
|
+
...props,
|
|
5389
|
+
children: [
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-head", children: title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "testimonial__title testimonial__title--trustpilot", children: title }) }),
|
|
5391
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-bleed", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5392
|
+
"div",
|
|
5393
|
+
{
|
|
5394
|
+
ref: trackRef,
|
|
5395
|
+
className: "testimonial__tp-carousel",
|
|
5396
|
+
tabIndex: 0,
|
|
5397
|
+
role: "region",
|
|
5398
|
+
"aria-roledescription": "carousel",
|
|
5399
|
+
"aria-label": "Customer reviews on Trustpilot",
|
|
5400
|
+
onScroll: syncScrollState,
|
|
5401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-track", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-card-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5402
|
+
"a",
|
|
5403
|
+
{
|
|
5404
|
+
href: item.reviewUrl ?? trustpilotUrl,
|
|
5405
|
+
className: "testimonial__tp-card",
|
|
5406
|
+
target: "_blank",
|
|
5407
|
+
rel: "noopener noreferrer",
|
|
5408
|
+
children: [
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StarRow, { rating: item.rating ?? 5, size: "sm" }),
|
|
5410
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "testimonial__tp-quote", children: item.quote }),
|
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "testimonial__tp-author", children: item.authorName })
|
|
5412
|
+
]
|
|
5413
|
+
}
|
|
5414
|
+
) }, i)) })
|
|
5415
|
+
}
|
|
5416
|
+
) }),
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-foot", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "testimonial__tp-footer", children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-trust", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5419
|
+
"a",
|
|
5420
|
+
{
|
|
5421
|
+
href: trustpilotUrl,
|
|
5422
|
+
className: "testimonial__tp-badge",
|
|
5423
|
+
target: "_blank",
|
|
5424
|
+
rel: "noopener noreferrer",
|
|
5425
|
+
"aria-label": `Deriv on Trustpilot \u2014 rated ${trustpilotScore} out of 5`,
|
|
5426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5427
|
+
"img",
|
|
5428
|
+
{
|
|
5429
|
+
src: trustpilot_rating_badge_default,
|
|
5430
|
+
alt: "",
|
|
5431
|
+
className: "testimonial__tp-badge-img"
|
|
5432
|
+
}
|
|
5433
|
+
)
|
|
5434
|
+
}
|
|
5435
|
+
) }),
|
|
5436
|
+
items.length > 1 && (canPrev || canNext) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "testimonial__tp-nav", children: [
|
|
5437
|
+
canPrev && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5438
|
+
"button",
|
|
5439
|
+
{
|
|
5440
|
+
type: "button",
|
|
5441
|
+
className: "testimonial__tp-nav-btn",
|
|
5442
|
+
"aria-label": "Show previous testimonials",
|
|
5443
|
+
onClick: () => scrollByCard(-1),
|
|
5444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ArrowIcon, { direction: "prev" })
|
|
5445
|
+
}
|
|
5446
|
+
),
|
|
5447
|
+
canNext && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5448
|
+
"button",
|
|
5449
|
+
{
|
|
5450
|
+
type: "button",
|
|
5451
|
+
className: "testimonial__tp-nav-btn",
|
|
5452
|
+
"aria-label": "Show next testimonials",
|
|
5453
|
+
onClick: () => scrollByCard(1),
|
|
5454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ArrowIcon, { direction: "next" })
|
|
5455
|
+
}
|
|
5456
|
+
)
|
|
5457
|
+
] })
|
|
5458
|
+
] }) })
|
|
5459
|
+
]
|
|
5460
|
+
}
|
|
5461
|
+
);
|
|
5462
|
+
};
|
|
5463
|
+
var DefaultTestimonial = ({
|
|
5259
5464
|
title,
|
|
5260
5465
|
items,
|
|
5261
5466
|
className,
|
|
@@ -5290,7 +5495,6 @@ var Testimonial = ({
|
|
|
5290
5495
|
if (autoRef.current) clearTimeout(autoRef.current);
|
|
5291
5496
|
};
|
|
5292
5497
|
}, [activeIndex, items.length]);
|
|
5293
|
-
if (!items || items.length === 0) return null;
|
|
5294
5498
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5295
5499
|
"section",
|
|
5296
5500
|
{
|
|
@@ -5366,6 +5570,13 @@ var Testimonial = ({
|
|
|
5366
5570
|
}
|
|
5367
5571
|
);
|
|
5368
5572
|
};
|
|
5573
|
+
var Testimonial = (props) => {
|
|
5574
|
+
if (!props.items || props.items.length === 0) return null;
|
|
5575
|
+
if (props.variant === "trustpilot") {
|
|
5576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TrustpilotTestimonial, { ...props });
|
|
5577
|
+
}
|
|
5578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DefaultTestimonial, { ...props });
|
|
5579
|
+
};
|
|
5369
5580
|
|
|
5370
5581
|
// templates/ArticleHero/ArticleHero.tsx
|
|
5371
5582
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
@@ -5975,11 +6186,212 @@ var FeatureAwards = ({
|
|
|
5975
6186
|
);
|
|
5976
6187
|
};
|
|
5977
6188
|
|
|
5978
|
-
// templates/
|
|
6189
|
+
// templates/FeatureBlog/FeatureBlog.tsx
|
|
5979
6190
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5980
6191
|
var externalLinkRel2 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
5981
|
-
var
|
|
5982
|
-
|
|
6192
|
+
var FEATURE_BLOG_TEXT_CONTENT = {
|
|
6193
|
+
title: "Deriv press releases",
|
|
6194
|
+
linkText: "See all press releases"
|
|
6195
|
+
};
|
|
6196
|
+
var PostCard = ({ post, index }) => {
|
|
6197
|
+
const tags = [post.date, post.category].filter((value) => Boolean(value)).map((label) => ({ label }));
|
|
6198
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6199
|
+
Card,
|
|
6200
|
+
{
|
|
6201
|
+
hideAvatar: true,
|
|
6202
|
+
layout: "vertical",
|
|
6203
|
+
showCopyLink: false,
|
|
6204
|
+
summary: post.summary,
|
|
6205
|
+
tags,
|
|
6206
|
+
thumbnail: post.thumbnail,
|
|
6207
|
+
thumbnailAlt: post.thumbnailAlt,
|
|
6208
|
+
title: post.title,
|
|
6209
|
+
type: "article",
|
|
6210
|
+
variant: "thumbnail"
|
|
6211
|
+
}
|
|
6212
|
+
);
|
|
6213
|
+
if (post.href) {
|
|
6214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6215
|
+
"a",
|
|
6216
|
+
{
|
|
6217
|
+
className: "fb-cardLink",
|
|
6218
|
+
href: post.href,
|
|
6219
|
+
rel: externalLinkRel2(post.href),
|
|
6220
|
+
children: card
|
|
6221
|
+
},
|
|
6222
|
+
`${post.title}-${index}`
|
|
6223
|
+
);
|
|
6224
|
+
}
|
|
6225
|
+
if (post.onClick) {
|
|
6226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6227
|
+
"button",
|
|
6228
|
+
{
|
|
6229
|
+
className: "fb-cardLink fb-cardButton",
|
|
6230
|
+
onClick: post.onClick,
|
|
6231
|
+
type: "button",
|
|
6232
|
+
children: card
|
|
6233
|
+
},
|
|
6234
|
+
`${post.title}-${index}`
|
|
6235
|
+
);
|
|
6236
|
+
}
|
|
6237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: card }, `${post.title}-${index}`);
|
|
6238
|
+
};
|
|
6239
|
+
var FeatureBlog = ({
|
|
6240
|
+
title = FEATURE_BLOG_TEXT_CONTENT.title,
|
|
6241
|
+
posts,
|
|
6242
|
+
showLink = true,
|
|
6243
|
+
linkText = FEATURE_BLOG_TEXT_CONTENT.linkText,
|
|
6244
|
+
linkHref,
|
|
6245
|
+
onLinkClick,
|
|
6246
|
+
className,
|
|
6247
|
+
...props
|
|
6248
|
+
}) => {
|
|
6249
|
+
if (!posts || posts.length === 0) return null;
|
|
6250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("section", { className: ["fb-section", className ?? ""].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "fb-container", children: [
|
|
6251
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "fb-title", children: title }),
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "fb-grid", children: posts.map((post, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PostCard, { index, post }, `${post.title}-${index}`)) }),
|
|
6253
|
+
showLink && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "fb-linkWrap", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6254
|
+
Link,
|
|
6255
|
+
{
|
|
6256
|
+
colorScheme: "coral",
|
|
6257
|
+
href: linkHref,
|
|
6258
|
+
label: linkText,
|
|
6259
|
+
rel: externalLinkRel2(linkHref),
|
|
6260
|
+
onClick: onLinkClick
|
|
6261
|
+
}
|
|
6262
|
+
) })
|
|
6263
|
+
] }) });
|
|
6264
|
+
};
|
|
6265
|
+
|
|
6266
|
+
// templates/FeatureBlogCategories/FeatureBlogCategories.tsx
|
|
6267
|
+
var import_react25 = require("react");
|
|
6268
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6269
|
+
var isExternalUrl = (href) => Boolean(href && /^https?:\/\//i.test(href));
|
|
6270
|
+
var FEATURE_BLOG_CATEGORIES_TEXT_CONTENT = {
|
|
6271
|
+
title: "Deriv press releases",
|
|
6272
|
+
allCategoryId: "all",
|
|
6273
|
+
allCategoryLabel: "View all",
|
|
6274
|
+
searchPlaceholder: "Search",
|
|
6275
|
+
emptyStateText: "Sorry, we couldn't find any results matching."
|
|
6276
|
+
};
|
|
6277
|
+
var PostCard2 = ({
|
|
6278
|
+
post,
|
|
6279
|
+
categoryLabel
|
|
6280
|
+
}) => {
|
|
6281
|
+
const tags = [post.date, categoryLabel].filter((value) => Boolean(value)).map((label) => ({ label }));
|
|
6282
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6283
|
+
Card,
|
|
6284
|
+
{
|
|
6285
|
+
hideAvatar: true,
|
|
6286
|
+
layout: "vertical",
|
|
6287
|
+
showCopyLink: false,
|
|
6288
|
+
summary: post.summary,
|
|
6289
|
+
tags,
|
|
6290
|
+
thumbnail: post.thumbnail,
|
|
6291
|
+
thumbnailAlt: post.thumbnailAlt,
|
|
6292
|
+
title: post.title,
|
|
6293
|
+
type: "article",
|
|
6294
|
+
variant: "thumbnail"
|
|
6295
|
+
}
|
|
6296
|
+
);
|
|
6297
|
+
if (post.href) {
|
|
6298
|
+
const external = isExternalUrl(post.href);
|
|
6299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6300
|
+
"a",
|
|
6301
|
+
{
|
|
6302
|
+
className: "fbc-cardLink",
|
|
6303
|
+
href: post.href,
|
|
6304
|
+
rel: external ? "noopener noreferrer" : void 0,
|
|
6305
|
+
target: external ? "_blank" : void 0,
|
|
6306
|
+
children: card
|
|
6307
|
+
}
|
|
6308
|
+
);
|
|
6309
|
+
}
|
|
6310
|
+
if (post.onClick) {
|
|
6311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { className: "fbc-cardLink fbc-cardButton", onClick: post.onClick, type: "button", children: card });
|
|
6312
|
+
}
|
|
6313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: card });
|
|
6314
|
+
};
|
|
6315
|
+
var FeatureBlogCategories = ({
|
|
6316
|
+
title = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.title,
|
|
6317
|
+
categories,
|
|
6318
|
+
allCategoryId = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.allCategoryId,
|
|
6319
|
+
allCategoryLabel = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.allCategoryLabel,
|
|
6320
|
+
activeCategoryId,
|
|
6321
|
+
defaultActiveCategoryId,
|
|
6322
|
+
onCategoryChange,
|
|
6323
|
+
posts,
|
|
6324
|
+
searchPlaceholder = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.searchPlaceholder,
|
|
6325
|
+
searchAriaLabel,
|
|
6326
|
+
onSearchChange,
|
|
6327
|
+
emptyStateText = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.emptyStateText,
|
|
6328
|
+
className,
|
|
6329
|
+
...props
|
|
6330
|
+
}) => {
|
|
6331
|
+
const [search, setSearch] = (0, import_react25.useState)("");
|
|
6332
|
+
const [internalActiveId, setInternalActiveId] = (0, import_react25.useState)(defaultActiveCategoryId ?? allCategoryId);
|
|
6333
|
+
const isControlled = activeCategoryId !== void 0;
|
|
6334
|
+
const activeId = isControlled ? activeCategoryId : internalActiveId;
|
|
6335
|
+
const tabs = (0, import_react25.useMemo)(
|
|
6336
|
+
() => [{ id: allCategoryId, label: allCategoryLabel }, ...categories],
|
|
6337
|
+
[allCategoryId, allCategoryLabel, categories]
|
|
6338
|
+
);
|
|
6339
|
+
const categoryLabelById = (0, import_react25.useMemo)(() => {
|
|
6340
|
+
const map = /* @__PURE__ */ new Map();
|
|
6341
|
+
categories.forEach((category) => map.set(category.id, category.label));
|
|
6342
|
+
return map;
|
|
6343
|
+
}, [categories]);
|
|
6344
|
+
const filteredPosts = (0, import_react25.useMemo)(() => {
|
|
6345
|
+
const query = search.trim().toLowerCase();
|
|
6346
|
+
return posts.filter((post) => {
|
|
6347
|
+
const matchesCategory = activeId === allCategoryId || post.category === activeId;
|
|
6348
|
+
if (!matchesCategory) return false;
|
|
6349
|
+
if (!query) return true;
|
|
6350
|
+
return post.title.toLowerCase().includes(query) || post.summary.toLowerCase().includes(query);
|
|
6351
|
+
});
|
|
6352
|
+
}, [posts, activeId, allCategoryId, search]);
|
|
6353
|
+
const handleTabChange = (id) => {
|
|
6354
|
+
if (!isControlled) setInternalActiveId(id);
|
|
6355
|
+
onCategoryChange?.(id);
|
|
6356
|
+
};
|
|
6357
|
+
const handleSearchChange = (e) => {
|
|
6358
|
+
setSearch(e.target.value);
|
|
6359
|
+
onSearchChange?.(e.target.value);
|
|
6360
|
+
};
|
|
6361
|
+
const handleSearchClear = () => {
|
|
6362
|
+
setSearch("");
|
|
6363
|
+
onSearchChange?.("");
|
|
6364
|
+
};
|
|
6365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("section", { className: ["fbc-section", className ?? ""].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fbc-container", children: [
|
|
6366
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { className: "fbc-title", children: title }),
|
|
6367
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6368
|
+
SearchField,
|
|
6369
|
+
{
|
|
6370
|
+
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
6371
|
+
onChange: handleSearchChange,
|
|
6372
|
+
onClear: handleSearchClear,
|
|
6373
|
+
placeholder: searchPlaceholder,
|
|
6374
|
+
value: search,
|
|
6375
|
+
variant: "outline"
|
|
6376
|
+
}
|
|
6377
|
+
) }),
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-tabsWrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Tabs, { activeId: activeId ?? allCategoryId, items: tabs, onChange: handleTabChange }) }),
|
|
6379
|
+
filteredPosts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-grid", children: filteredPosts.map((post, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6380
|
+
PostCard2,
|
|
6381
|
+
{
|
|
6382
|
+
categoryLabel: post.categoryLabel ?? categoryLabelById.get(post.category),
|
|
6383
|
+
post
|
|
6384
|
+
},
|
|
6385
|
+
`${post.title}-${index}`
|
|
6386
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "fbc-emptyState", children: emptyStateText })
|
|
6387
|
+
] }) });
|
|
6388
|
+
};
|
|
6389
|
+
|
|
6390
|
+
// templates/HelpCentreCategories/HelpCentreCategories.tsx
|
|
6391
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6392
|
+
var externalLinkRel3 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6393
|
+
var CategoryTileContent = ({ category }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
6394
|
+
category.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcc-tile-icon", children: typeof category.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5983
6395
|
"img",
|
|
5984
6396
|
{
|
|
5985
6397
|
alt: category.iconAlt ?? "",
|
|
@@ -5991,22 +6403,22 @@ var CategoryTileContent = ({ category }) => /* @__PURE__ */ (0, import_jsx_runti
|
|
|
5991
6403
|
width: 48
|
|
5992
6404
|
}
|
|
5993
6405
|
) : category.icon }),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
6406
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcc-tile-title", children: category.title })
|
|
5995
6407
|
] });
|
|
5996
6408
|
var CategoryTile = ({ category }) => {
|
|
5997
6409
|
if (category.href) {
|
|
5998
|
-
return /* @__PURE__ */ (0,
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5999
6411
|
"a",
|
|
6000
6412
|
{
|
|
6001
6413
|
className: "hcc-tile",
|
|
6002
6414
|
href: category.href,
|
|
6003
6415
|
onClick: category.onClick,
|
|
6004
|
-
rel:
|
|
6005
|
-
children: /* @__PURE__ */ (0,
|
|
6416
|
+
rel: externalLinkRel3(category.href),
|
|
6417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTileContent, { category })
|
|
6006
6418
|
}
|
|
6007
6419
|
);
|
|
6008
6420
|
}
|
|
6009
|
-
return /* @__PURE__ */ (0,
|
|
6421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { className: "hcc-tile", onClick: category.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTileContent, { category }) });
|
|
6010
6422
|
};
|
|
6011
6423
|
var getColumnCount = (categoryCount) => Math.max(1, Math.min(categoryCount, 3));
|
|
6012
6424
|
var HelpCentreCategories = ({
|
|
@@ -6015,24 +6427,24 @@ var HelpCentreCategories = ({
|
|
|
6015
6427
|
categories
|
|
6016
6428
|
}) => {
|
|
6017
6429
|
const columnCount = getColumnCount(categories.length);
|
|
6018
|
-
return /* @__PURE__ */ (0,
|
|
6019
|
-
(sectionTitle || sectionDescription) && /* @__PURE__ */ (0,
|
|
6020
|
-
sectionTitle && /* @__PURE__ */ (0,
|
|
6021
|
-
sectionDescription && /* @__PURE__ */ (0,
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("section", { className: "hcc-section", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcc-container", children: [
|
|
6431
|
+
(sectionTitle || sectionDescription) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcc-header", children: [
|
|
6432
|
+
sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h2", { className: "hcc-sectionTitle", children: sectionTitle }),
|
|
6433
|
+
sectionDescription && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "hcc-sectionDescription", children: sectionDescription })
|
|
6022
6434
|
] }),
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: `hcc-grid hcc-grid--${columnCount}`, role: "list", children: categories.map((category, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTile, { category }) }, category.id ?? `${category.title}-${index}`)) })
|
|
6024
6436
|
] }) });
|
|
6025
6437
|
};
|
|
6026
6438
|
|
|
6027
6439
|
// templates/HelpCentreSubCategories/HelpCentreSubCategories.tsx
|
|
6028
|
-
var
|
|
6029
|
-
var
|
|
6030
|
-
var
|
|
6440
|
+
var import_react26 = require("react");
|
|
6441
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6442
|
+
var externalLinkRel4 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6031
6443
|
var QuestionCard = ({ item }) => {
|
|
6032
6444
|
if (item.href) {
|
|
6033
|
-
return /* @__PURE__ */ (0,
|
|
6445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("a", { className: "hcsc-card", href: item.href, onClick: item.onClick, rel: externalLinkRel4(item.href), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
|
|
6034
6446
|
}
|
|
6035
|
-
return /* @__PURE__ */ (0,
|
|
6447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", { className: "hcsc-card", onClick: item.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
|
|
6036
6448
|
};
|
|
6037
6449
|
var HelpCentreSubCategories = ({
|
|
6038
6450
|
title,
|
|
@@ -6042,8 +6454,8 @@ var HelpCentreSubCategories = ({
|
|
|
6042
6454
|
noResultsText = 'No results found for "{query}"',
|
|
6043
6455
|
onSearchChange
|
|
6044
6456
|
}) => {
|
|
6045
|
-
const [search, setSearch] = (0,
|
|
6046
|
-
const filtered = (0,
|
|
6457
|
+
const [search, setSearch] = (0, import_react26.useState)("");
|
|
6458
|
+
const filtered = (0, import_react26.useMemo)(() => {
|
|
6047
6459
|
const q = search.trim().toLowerCase();
|
|
6048
6460
|
if (!q) return items;
|
|
6049
6461
|
return items.filter((item) => item.question.toLowerCase().includes(q));
|
|
@@ -6056,9 +6468,9 @@ var HelpCentreSubCategories = ({
|
|
|
6056
6468
|
setSearch("");
|
|
6057
6469
|
onSearchChange?.("");
|
|
6058
6470
|
};
|
|
6059
|
-
return /* @__PURE__ */ (0,
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
6061
|
-
/* @__PURE__ */ (0,
|
|
6471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("section", { className: "hcsc-section", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "hcsc-container", children: [
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h1", { className: "hcsc-title", children: title }),
|
|
6473
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6062
6474
|
SearchField,
|
|
6063
6475
|
{
|
|
6064
6476
|
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
@@ -6069,25 +6481,25 @@ var HelpCentreSubCategories = ({
|
|
|
6069
6481
|
variant: "outline"
|
|
6070
6482
|
}
|
|
6071
6483
|
) }),
|
|
6072
|
-
filtered.length > 0 ? /* @__PURE__ */ (0,
|
|
6484
|
+
filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-grid", role: "list", children: filtered.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuestionCard, { item }) }, item.id ?? `${item.question}-${index}`)) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "hcsc-noResults", children: noResultsText.replace("{query}", search) })
|
|
6073
6485
|
] }) });
|
|
6074
6486
|
};
|
|
6075
6487
|
|
|
6076
6488
|
// templates/HelpCenterPage/HelpCenterPage.tsx
|
|
6077
|
-
var
|
|
6078
|
-
var
|
|
6079
|
-
var
|
|
6080
|
-
var ChevronDownIcon5 = () => /* @__PURE__ */ (0,
|
|
6489
|
+
var import_react27 = require("react");
|
|
6490
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6491
|
+
var externalLinkRel5 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6492
|
+
var ChevronDownIcon5 = () => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "16", viewBox: "0 0 16 16", width: "16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
|
|
6081
6493
|
var renderBlock = (block, index) => {
|
|
6082
6494
|
if (block.type === "heading") {
|
|
6083
6495
|
const HeadingTag = block.level === 3 ? "h3" : "h2";
|
|
6084
|
-
return /* @__PURE__ */ (0,
|
|
6496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(HeadingTag, { className: "hcp-blockHeading", children: block.text }, index);
|
|
6085
6497
|
}
|
|
6086
6498
|
if (block.type === "list") {
|
|
6087
6499
|
const ListTag = block.ordered ? "ol" : "ul";
|
|
6088
|
-
return /* @__PURE__ */ (0,
|
|
6500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ListTag, { className: "hcp-blockList", children: (block.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { className: "hcp-blockListItem", children: item }, i)) }, index);
|
|
6089
6501
|
}
|
|
6090
|
-
return /* @__PURE__ */ (0,
|
|
6502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-blockParagraph", children: block.text }, index);
|
|
6091
6503
|
};
|
|
6092
6504
|
var QuestionRow = ({
|
|
6093
6505
|
item,
|
|
@@ -6096,7 +6508,7 @@ var QuestionRow = ({
|
|
|
6096
6508
|
}) => {
|
|
6097
6509
|
const rowClass = ["hcp-row", isActive ? "hcp-row--active" : ""].filter(Boolean).join(" ");
|
|
6098
6510
|
if (item.href) {
|
|
6099
|
-
return /* @__PURE__ */ (0,
|
|
6511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6100
6512
|
"a",
|
|
6101
6513
|
{
|
|
6102
6514
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -6106,12 +6518,12 @@ var QuestionRow = ({
|
|
|
6106
6518
|
item.onClick?.();
|
|
6107
6519
|
onSelect(item);
|
|
6108
6520
|
},
|
|
6109
|
-
rel:
|
|
6110
|
-
children: /* @__PURE__ */ (0,
|
|
6521
|
+
rel: externalLinkRel5(item.href),
|
|
6522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-rowText", children: item.question })
|
|
6111
6523
|
}
|
|
6112
6524
|
);
|
|
6113
6525
|
}
|
|
6114
|
-
return /* @__PURE__ */ (0,
|
|
6526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6115
6527
|
"button",
|
|
6116
6528
|
{
|
|
6117
6529
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -6121,7 +6533,7 @@ var QuestionRow = ({
|
|
|
6121
6533
|
onSelect(item);
|
|
6122
6534
|
},
|
|
6123
6535
|
type: "button",
|
|
6124
|
-
children: /* @__PURE__ */ (0,
|
|
6536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-rowText", children: item.question })
|
|
6125
6537
|
}
|
|
6126
6538
|
);
|
|
6127
6539
|
};
|
|
@@ -6140,13 +6552,13 @@ var HelpCenterPage = ({
|
|
|
6140
6552
|
articlesSheetTitle = "Articles in this section",
|
|
6141
6553
|
className
|
|
6142
6554
|
}) => {
|
|
6143
|
-
const [search, setSearch] = (0,
|
|
6144
|
-
const [internalActiveId, setInternalActiveId] = (0,
|
|
6145
|
-
const [sheetOpen, setSheetOpen] = (0,
|
|
6555
|
+
const [search, setSearch] = (0, import_react27.useState)("");
|
|
6556
|
+
const [internalActiveId, setInternalActiveId] = (0, import_react27.useState)(defaultActiveQuestionId ?? questions[0]?.id);
|
|
6557
|
+
const [sheetOpen, setSheetOpen] = (0, import_react27.useState)(false);
|
|
6146
6558
|
const isControlled = activeQuestionId !== void 0;
|
|
6147
6559
|
const activeId = isControlled ? activeQuestionId : internalActiveId;
|
|
6148
6560
|
const activeItem = questions.find((item) => item.id === activeId);
|
|
6149
|
-
const filtered = (0,
|
|
6561
|
+
const filtered = (0, import_react27.useMemo)(() => {
|
|
6150
6562
|
const q = search.trim().toLowerCase();
|
|
6151
6563
|
if (!q) return questions;
|
|
6152
6564
|
return questions.filter((item) => item.question.toLowerCase().includes(q));
|
|
@@ -6167,9 +6579,9 @@ var HelpCenterPage = ({
|
|
|
6167
6579
|
const resolvedTitle = activeItem?.content ? activeItem.contentTitle ?? contentTitle : contentTitle;
|
|
6168
6580
|
const resolvedContent = activeItem?.content ?? content;
|
|
6169
6581
|
const rootClass = ["hcp-section", className ?? ""].filter(Boolean).join(" ");
|
|
6170
|
-
return /* @__PURE__ */ (0,
|
|
6171
|
-
/* @__PURE__ */ (0,
|
|
6172
|
-
/* @__PURE__ */ (0,
|
|
6582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: rootClass, children: [
|
|
6583
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-container", children: [
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6173
6585
|
SearchField,
|
|
6174
6586
|
{
|
|
6175
6587
|
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
@@ -6180,12 +6592,12 @@ var HelpCenterPage = ({
|
|
|
6180
6592
|
variant: "outline"
|
|
6181
6593
|
}
|
|
6182
6594
|
) }),
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6186
|
-
filtered.length > 0 ? /* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-body", children: [
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("aside", { className: "hcp-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-sidebarCard", children: [
|
|
6597
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "hcp-sidebarTitle", children: categoryTitle }),
|
|
6598
|
+
filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-list", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-listItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) })
|
|
6187
6599
|
] }) }),
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6600
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6189
6601
|
"button",
|
|
6190
6602
|
{
|
|
6191
6603
|
"aria-expanded": sheetOpen,
|
|
@@ -6193,20 +6605,439 @@ var HelpCenterPage = ({
|
|
|
6193
6605
|
onClick: () => setSheetOpen(true),
|
|
6194
6606
|
type: "button",
|
|
6195
6607
|
children: [
|
|
6196
|
-
/* @__PURE__ */ (0,
|
|
6197
|
-
/* @__PURE__ */ (0,
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-mobileToggleLabel", children: categoryTitle }),
|
|
6609
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-mobileToggleChevron", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDownIcon5, {}) })
|
|
6198
6610
|
]
|
|
6199
6611
|
}
|
|
6200
6612
|
),
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6202
|
-
/* @__PURE__ */ (0,
|
|
6203
|
-
/* @__PURE__ */ (0,
|
|
6613
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-content", children: [
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { className: "hcp-contentTitle", children: resolvedTitle }),
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-contentBody", children: resolvedContent.map(renderBlock) })
|
|
6204
6616
|
] })
|
|
6205
6617
|
] })
|
|
6206
6618
|
] }),
|
|
6207
|
-
/* @__PURE__ */ (0,
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BottomSheet, { onClose: () => setSheetOpen(false), open: sheetOpen, title: articlesSheetTitle, children: filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-sheetList", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-sheetItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) }) })
|
|
6208
6620
|
] });
|
|
6209
6621
|
};
|
|
6622
|
+
|
|
6623
|
+
// templates/FeatureBlogPage/FeatureBlogPage.tsx
|
|
6624
|
+
var import_react28 = require("react");
|
|
6625
|
+
|
|
6626
|
+
// assets/share-link.png
|
|
6627
|
+
var share_link_default = "./share-link-QGD6KIDA.png";
|
|
6628
|
+
|
|
6629
|
+
// assets/share-facebook.png
|
|
6630
|
+
var share_facebook_default = "./share-facebook-3B3NOC5Q.png";
|
|
6631
|
+
|
|
6632
|
+
// assets/share-x.png
|
|
6633
|
+
var share_x_default = "./share-x-UTEBBL73.png";
|
|
6634
|
+
|
|
6635
|
+
// assets/share-telegram.png
|
|
6636
|
+
var share_telegram_default = "./share-telegram-QRXGSHQT.png";
|
|
6637
|
+
|
|
6638
|
+
// assets/share-linkedin.png
|
|
6639
|
+
var share_linkedin_default = "./share-linkedin-UCIII3JU.png";
|
|
6640
|
+
|
|
6641
|
+
// templates/FeatureBlogPage/FeatureBlogPage.tsx
|
|
6642
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6643
|
+
var ChevronDownIcon6 = () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "16", viewBox: "0 0 16 16", width: "16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
|
|
6644
|
+
var CheckIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "18", viewBox: "0 0 16 16", width: "18", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M3.5 8.5l3 3 6-7", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.6" }) });
|
|
6645
|
+
var SHARE_ICONS = {
|
|
6646
|
+
facebook: { src: share_facebook_default, alt: "Facebook" },
|
|
6647
|
+
twitter: { src: share_x_default, alt: "X" },
|
|
6648
|
+
linkedin: { src: share_linkedin_default, alt: "LinkedIn" },
|
|
6649
|
+
telegram: { src: share_telegram_default, alt: "Telegram" }
|
|
6650
|
+
};
|
|
6651
|
+
var LABELS = {
|
|
6652
|
+
facebook: "Share on Facebook",
|
|
6653
|
+
twitter: "Share on X",
|
|
6654
|
+
linkedin: "Share on LinkedIn",
|
|
6655
|
+
telegram: "Share on Telegram"
|
|
6656
|
+
};
|
|
6657
|
+
var slugify = (text) => text.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
6658
|
+
function shareHref(platform, url, text) {
|
|
6659
|
+
const encodedUrl = encodeURIComponent(url);
|
|
6660
|
+
const encodedText = encodeURIComponent(text);
|
|
6661
|
+
switch (platform) {
|
|
6662
|
+
case "facebook":
|
|
6663
|
+
return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`;
|
|
6664
|
+
case "twitter":
|
|
6665
|
+
return `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedText}`;
|
|
6666
|
+
case "linkedin":
|
|
6667
|
+
return `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`;
|
|
6668
|
+
case "telegram":
|
|
6669
|
+
return `https://t.me/share/url?url=${encodedUrl}&text=${encodedText}`;
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
var TocCard = ({
|
|
6673
|
+
tocTitle,
|
|
6674
|
+
headings,
|
|
6675
|
+
activeId,
|
|
6676
|
+
defaultOpen,
|
|
6677
|
+
onNavigate,
|
|
6678
|
+
idSuffix,
|
|
6679
|
+
collapsible
|
|
6680
|
+
}) => {
|
|
6681
|
+
const [open, setOpen] = (0, import_react28.useState)(defaultOpen);
|
|
6682
|
+
const panelId = `fbp-toc-panel-${idSuffix}`;
|
|
6683
|
+
const isOpen = collapsible ? open : true;
|
|
6684
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ol", { className: "fbp-tocList", id: panelId, children: headings.map((heading) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { className: "fbp-tocItem", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6685
|
+
"a",
|
|
6686
|
+
{
|
|
6687
|
+
"aria-current": activeId === heading.id ? "location" : void 0,
|
|
6688
|
+
className: ["fbp-tocLink", activeId === heading.id ? "fbp-tocLink--active" : ""].filter(Boolean).join(" "),
|
|
6689
|
+
href: `#${heading.id}`,
|
|
6690
|
+
onClick: (e) => {
|
|
6691
|
+
e.preventDefault();
|
|
6692
|
+
onNavigate(heading.id);
|
|
6693
|
+
},
|
|
6694
|
+
children: heading.text
|
|
6695
|
+
}
|
|
6696
|
+
) }, heading.id)) });
|
|
6697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-tocCard", children: [
|
|
6698
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6699
|
+
"button",
|
|
6700
|
+
{
|
|
6701
|
+
"aria-controls": panelId,
|
|
6702
|
+
"aria-expanded": isOpen,
|
|
6703
|
+
className: "fbp-tocHeader fbp-tocHeader--button",
|
|
6704
|
+
onClick: () => setOpen((prev) => !prev),
|
|
6705
|
+
type: "button",
|
|
6706
|
+
children: [
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-tocTitle", children: tocTitle }),
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: ["fbp-tocChevron", isOpen ? "fbp-tocChevron--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronDownIcon6, {}) })
|
|
6709
|
+
]
|
|
6710
|
+
}
|
|
6711
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-tocHeader", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-tocTitle", children: tocTitle }) }),
|
|
6712
|
+
isOpen && list
|
|
6713
|
+
] });
|
|
6714
|
+
};
|
|
6715
|
+
var ShareRow = ({
|
|
6716
|
+
shareTitle,
|
|
6717
|
+
shareUrl,
|
|
6718
|
+
shareText,
|
|
6719
|
+
platforms,
|
|
6720
|
+
onShare,
|
|
6721
|
+
copiedLabel
|
|
6722
|
+
}) => {
|
|
6723
|
+
const [copied, setCopied] = (0, import_react28.useState)(false);
|
|
6724
|
+
const handleCopy = async () => {
|
|
6725
|
+
onShare?.("copy");
|
|
6726
|
+
try {
|
|
6727
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
6728
|
+
await navigator.clipboard.writeText(shareUrl);
|
|
6729
|
+
setCopied(true);
|
|
6730
|
+
window.setTimeout(() => setCopied(false), 2e3);
|
|
6731
|
+
}
|
|
6732
|
+
} catch {
|
|
6733
|
+
}
|
|
6734
|
+
};
|
|
6735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-shareCard", children: [
|
|
6736
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-shareTitle", children: shareTitle }),
|
|
6737
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-shareIcons", children: [
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6739
|
+
"button",
|
|
6740
|
+
{
|
|
6741
|
+
"aria-label": copied ? copiedLabel : "Copy link",
|
|
6742
|
+
className: "fbp-shareIcon",
|
|
6743
|
+
onClick: handleCopy,
|
|
6744
|
+
type: "button",
|
|
6745
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CheckIcon3, {}) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: "", className: "fbp-shareIconImg", src: share_link_default })
|
|
6746
|
+
}
|
|
6747
|
+
),
|
|
6748
|
+
platforms.map((platform) => {
|
|
6749
|
+
const icon = SHARE_ICONS[platform];
|
|
6750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6751
|
+
"a",
|
|
6752
|
+
{
|
|
6753
|
+
"aria-label": LABELS[platform],
|
|
6754
|
+
className: "fbp-shareIcon",
|
|
6755
|
+
href: shareHref(platform, shareUrl, shareText),
|
|
6756
|
+
onClick: () => onShare?.(platform),
|
|
6757
|
+
rel: "noopener noreferrer",
|
|
6758
|
+
target: "_blank",
|
|
6759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: "", className: "fbp-shareIconImg", src: icon.src })
|
|
6760
|
+
},
|
|
6761
|
+
platform
|
|
6762
|
+
);
|
|
6763
|
+
})
|
|
6764
|
+
] })
|
|
6765
|
+
] });
|
|
6766
|
+
};
|
|
6767
|
+
var renderBlock2 = (block, index, headingIds) => {
|
|
6768
|
+
if (block.type === "heading") {
|
|
6769
|
+
const level = block.level ?? 2;
|
|
6770
|
+
const HeadingTag = level === 3 ? "h3" : "h2";
|
|
6771
|
+
const headingClass = level === 3 ? "fbp-blockHeading fbp-blockHeading--h3" : "fbp-blockHeading";
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(HeadingTag, { className: headingClass, id: headingIds.get(index), children: block.text }, index);
|
|
6773
|
+
}
|
|
6774
|
+
if (block.type === "list") {
|
|
6775
|
+
const ListTag = block.ordered ? "ol" : "ul";
|
|
6776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ListTag, { className: "fbp-blockList", children: (block.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { className: "fbp-blockListItem", children: item }, i)) }, index);
|
|
6777
|
+
}
|
|
6778
|
+
if (block.type === "quote") {
|
|
6779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("blockquote", { className: "fbp-blockQuote", children: [
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "fbp-blockQuoteText", children: block.text }),
|
|
6781
|
+
block.cite && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("cite", { className: "fbp-blockQuoteCite", children: block.cite })
|
|
6782
|
+
] }, index);
|
|
6783
|
+
}
|
|
6784
|
+
if (block.type === "image") {
|
|
6785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("figure", { className: "fbp-blockImageWrap", children: [
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: block.imageAlt ?? "", className: "fbp-blockImage", src: block.image }),
|
|
6787
|
+
block.caption && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("figcaption", { className: "fbp-blockCaption", children: block.caption })
|
|
6788
|
+
] }, index);
|
|
6789
|
+
}
|
|
6790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "fbp-blockParagraph", children: block.text }, index);
|
|
6791
|
+
};
|
|
6792
|
+
var FeatureBlogPage = ({
|
|
6793
|
+
category,
|
|
6794
|
+
title,
|
|
6795
|
+
publishDate,
|
|
6796
|
+
author,
|
|
6797
|
+
heroImage,
|
|
6798
|
+
heroImageAlt,
|
|
6799
|
+
content,
|
|
6800
|
+
tocTitle = "Contents",
|
|
6801
|
+
tocDefaultOpen = true,
|
|
6802
|
+
hideToc = false,
|
|
6803
|
+
shareTitle = "Share article",
|
|
6804
|
+
shareUrl,
|
|
6805
|
+
shareText,
|
|
6806
|
+
sharePlatforms = ["facebook", "twitter", "telegram", "linkedin"],
|
|
6807
|
+
hideShare = false,
|
|
6808
|
+
onShare,
|
|
6809
|
+
copiedLabel = "Copied!",
|
|
6810
|
+
className
|
|
6811
|
+
}) => {
|
|
6812
|
+
const headingIds = (0, import_react28.useMemo)(() => {
|
|
6813
|
+
const seen = /* @__PURE__ */ new Map();
|
|
6814
|
+
const ids = /* @__PURE__ */ new Map();
|
|
6815
|
+
content.forEach((block, i) => {
|
|
6816
|
+
if (block.type !== "heading") return;
|
|
6817
|
+
const base = block.id ?? (slugify(block.text ?? "") || `section-${i}`);
|
|
6818
|
+
const count = seen.get(base) ?? 0;
|
|
6819
|
+
seen.set(base, count + 1);
|
|
6820
|
+
ids.set(i, count === 0 ? base : `${base}-${count}`);
|
|
6821
|
+
});
|
|
6822
|
+
return ids;
|
|
6823
|
+
}, [content]);
|
|
6824
|
+
const headings = (0, import_react28.useMemo)(
|
|
6825
|
+
() => content.map((block, i) => ({ block, i })).filter(({ block }) => block.type === "heading" && (block.level ?? 2) === 2).map(({ block, i }) => ({ id: headingIds.get(i), text: block.text ?? "" })),
|
|
6826
|
+
[content, headingIds]
|
|
6827
|
+
);
|
|
6828
|
+
const [activeId, setActiveId] = (0, import_react28.useState)(null);
|
|
6829
|
+
(0, import_react28.useEffect)(() => {
|
|
6830
|
+
if (typeof IntersectionObserver === "undefined" || headings.length === 0) return;
|
|
6831
|
+
const elements = headings.map((heading) => document.getElementById(heading.id)).filter((el) => el !== null);
|
|
6832
|
+
if (elements.length === 0) return;
|
|
6833
|
+
const observer = new IntersectionObserver(
|
|
6834
|
+
(entries) => {
|
|
6835
|
+
const visible = entries.filter((entry) => entry.isIntersecting);
|
|
6836
|
+
if (visible.length === 0) return;
|
|
6837
|
+
const topMost = visible.reduce(
|
|
6838
|
+
(a, b) => a.boundingClientRect.top < b.boundingClientRect.top ? a : b
|
|
6839
|
+
);
|
|
6840
|
+
setActiveId(topMost.target.id);
|
|
6841
|
+
},
|
|
6842
|
+
{ rootMargin: "-112px 0px -70% 0px", threshold: 0 }
|
|
6843
|
+
);
|
|
6844
|
+
elements.forEach((el) => observer.observe(el));
|
|
6845
|
+
return () => observer.disconnect();
|
|
6846
|
+
}, [headings]);
|
|
6847
|
+
const handleNavigate = (id) => {
|
|
6848
|
+
setActiveId(id);
|
|
6849
|
+
const el = document.getElementById(id);
|
|
6850
|
+
if (!el) return;
|
|
6851
|
+
const prefersReducedMotion = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
6852
|
+
el.scrollIntoView({ behavior: prefersReducedMotion ? "auto" : "smooth", block: "start" });
|
|
6853
|
+
};
|
|
6854
|
+
const showToc = !hideToc && headings.length > 0;
|
|
6855
|
+
const showShare = !hideShare && Boolean(shareUrl);
|
|
6856
|
+
const resolvedShareText = shareText ?? title;
|
|
6857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("section", { className: ["fbp-section", className ?? ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-container", children: [
|
|
6858
|
+
showToc && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-tocMobileWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6859
|
+
TocCard,
|
|
6860
|
+
{
|
|
6861
|
+
activeId,
|
|
6862
|
+
collapsible: true,
|
|
6863
|
+
defaultOpen: tocDefaultOpen,
|
|
6864
|
+
headings,
|
|
6865
|
+
idSuffix: "mobile",
|
|
6866
|
+
onNavigate: handleNavigate,
|
|
6867
|
+
tocTitle
|
|
6868
|
+
}
|
|
6869
|
+
) }),
|
|
6870
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-body", children: [
|
|
6871
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-main", children: [
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("header", { className: "fbp-header", children: [
|
|
6873
|
+
category && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Tag, { label: category, size: "md", variant: "fill" }),
|
|
6874
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "fbp-title", children: title }),
|
|
6875
|
+
(publishDate || author) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-meta", children: [
|
|
6876
|
+
author && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "fbp-metaAuthor", children: [
|
|
6877
|
+
author.avatar && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6878
|
+
"img",
|
|
6879
|
+
{
|
|
6880
|
+
alt: author.avatarAlt ?? "",
|
|
6881
|
+
className: "fbp-avatar",
|
|
6882
|
+
src: author.avatar
|
|
6883
|
+
}
|
|
6884
|
+
),
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-authorName", children: author.name })
|
|
6886
|
+
] }),
|
|
6887
|
+
publishDate && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-dateChip", children: publishDate })
|
|
6888
|
+
] })
|
|
6889
|
+
] }),
|
|
6890
|
+
heroImage && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-heroImageWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: heroImageAlt ?? "", className: "fbp-heroImage", src: heroImage }) }),
|
|
6891
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-content", children: content.map((block, index) => renderBlock2(block, index, headingIds)) }),
|
|
6892
|
+
showShare && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-shareMobileWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6893
|
+
ShareRow,
|
|
6894
|
+
{
|
|
6895
|
+
copiedLabel,
|
|
6896
|
+
onShare,
|
|
6897
|
+
platforms: sharePlatforms,
|
|
6898
|
+
shareText: resolvedShareText,
|
|
6899
|
+
shareTitle,
|
|
6900
|
+
shareUrl
|
|
6901
|
+
}
|
|
6902
|
+
) })
|
|
6903
|
+
] }),
|
|
6904
|
+
(showToc || showShare) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("aside", { className: "fbp-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-sidebarSticky", children: [
|
|
6905
|
+
showToc && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6906
|
+
TocCard,
|
|
6907
|
+
{
|
|
6908
|
+
activeId,
|
|
6909
|
+
collapsible: false,
|
|
6910
|
+
defaultOpen: tocDefaultOpen,
|
|
6911
|
+
headings,
|
|
6912
|
+
idSuffix: "desktop",
|
|
6913
|
+
onNavigate: handleNavigate,
|
|
6914
|
+
tocTitle
|
|
6915
|
+
}
|
|
6916
|
+
),
|
|
6917
|
+
showShare && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6918
|
+
ShareRow,
|
|
6919
|
+
{
|
|
6920
|
+
copiedLabel,
|
|
6921
|
+
onShare,
|
|
6922
|
+
platforms: sharePlatforms,
|
|
6923
|
+
shareText: resolvedShareText,
|
|
6924
|
+
shareTitle,
|
|
6925
|
+
shareUrl
|
|
6926
|
+
}
|
|
6927
|
+
)
|
|
6928
|
+
] }) })
|
|
6929
|
+
] })
|
|
6930
|
+
] }) });
|
|
6931
|
+
};
|
|
6932
|
+
|
|
6933
|
+
// templates/ParallaxBanner/ParallaxBanner.tsx
|
|
6934
|
+
var import_react29 = require("react");
|
|
6935
|
+
var import_framer_motion5 = require("framer-motion");
|
|
6936
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6937
|
+
var PARALLAX_BANNER_TEXT_CONTENT = {
|
|
6938
|
+
title: "Our culture",
|
|
6939
|
+
description: "We combine human values with AI precision. Collaboration, integrity, and continuous learning guide every project.",
|
|
6940
|
+
ctaLabel: "Culture at Deriv"
|
|
6941
|
+
};
|
|
6942
|
+
var DEFAULT_CULTURE_CARDS = [
|
|
6943
|
+
{
|
|
6944
|
+
title: "Customer focus",
|
|
6945
|
+
description: "We obsess over customers, prioritising measurable user value and using AI to surface insights and tailor experiences, always keeping human judgment central."
|
|
6946
|
+
},
|
|
6947
|
+
{
|
|
6948
|
+
title: "Integrity",
|
|
6949
|
+
description: "We act with candour and accountability. We make clear trade-offs, give honest feedback, and design our AI and data use with ethics and transparency to build trust."
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
title: "Teamwork",
|
|
6953
|
+
description: "We move together in cross-functional teams. We share credit, solve problems collaboratively, and welcome diverse perspectives to deliver better outcomes."
|
|
6954
|
+
},
|
|
6955
|
+
{
|
|
6956
|
+
title: "Competence",
|
|
6957
|
+
description: "We hold high standards and keep learning. We pair deep expertise with pragmatic delivery from prototype to production, and we use AI thoughtfully to amplify judgment and scale impact."
|
|
6958
|
+
}
|
|
6959
|
+
];
|
|
6960
|
+
var PLACEHOLDER_IMAGE4 = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/69b9309379ac08e59ca8210a_1f3f555da9a5cbb13a6fe1bf0d5fe1b6_placeholder-image.webp";
|
|
6961
|
+
var PARALLAX_PX = 36;
|
|
6962
|
+
var PARALLAX_SPRING = { stiffness: 90, damping: 26, restDelta: 1e-3 };
|
|
6963
|
+
var ParallaxBanner = ({
|
|
6964
|
+
variant = "default",
|
|
6965
|
+
title = PARALLAX_BANNER_TEXT_CONTENT.title,
|
|
6966
|
+
description = PARALLAX_BANNER_TEXT_CONTENT.description,
|
|
6967
|
+
ctaLabel = PARALLAX_BANNER_TEXT_CONTENT.ctaLabel,
|
|
6968
|
+
ctaHref,
|
|
6969
|
+
onCtaClick,
|
|
6970
|
+
imageUrl = PLACEHOLDER_IMAGE4,
|
|
6971
|
+
imageAlt = "",
|
|
6972
|
+
cards = DEFAULT_CULTURE_CARDS,
|
|
6973
|
+
enableParallax = true,
|
|
6974
|
+
className,
|
|
6975
|
+
...props
|
|
6976
|
+
}) => {
|
|
6977
|
+
const sectionRef = (0, import_react29.useRef)(null);
|
|
6978
|
+
const prefersReducedMotion = (0, import_framer_motion5.useReducedMotion)();
|
|
6979
|
+
const parallaxActive = enableParallax && !prefersReducedMotion;
|
|
6980
|
+
const showCards = variant !== "banner-only" && cards.length > 0;
|
|
6981
|
+
const { scrollYProgress } = (0, import_framer_motion5.useScroll)({
|
|
6982
|
+
target: sectionRef,
|
|
6983
|
+
offset: ["start end", "end start"]
|
|
6984
|
+
});
|
|
6985
|
+
const smoothProgress = (0, import_framer_motion5.useSpring)(scrollYProgress, PARALLAX_SPRING);
|
|
6986
|
+
const parallaxY = (0, import_framer_motion5.useTransform)(smoothProgress, [0, 1], [-PARALLAX_PX, PARALLAX_PX]);
|
|
6987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6988
|
+
"section",
|
|
6989
|
+
{
|
|
6990
|
+
ref: sectionRef,
|
|
6991
|
+
className: [
|
|
6992
|
+
"parallax-banner",
|
|
6993
|
+
variant === "banner-only" ? "parallax-banner--banner-only" : "",
|
|
6994
|
+
className
|
|
6995
|
+
].filter(Boolean).join(" "),
|
|
6996
|
+
...props,
|
|
6997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__inner", children: [
|
|
6998
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__card", children: [
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__content", children: [
|
|
7000
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "parallax-banner__title", children: title }),
|
|
7001
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "parallax-banner__description", children: description }),
|
|
7002
|
+
ctaLabel && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__actions", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7003
|
+
Link,
|
|
7004
|
+
{
|
|
7005
|
+
colorScheme: "white",
|
|
7006
|
+
label: ctaLabel,
|
|
7007
|
+
href: ctaHref,
|
|
7008
|
+
onClick: onCtaClick,
|
|
7009
|
+
showChevron: true,
|
|
7010
|
+
className: "parallax-banner__cta-link"
|
|
7011
|
+
}
|
|
7012
|
+
) })
|
|
7013
|
+
] }),
|
|
7014
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__image-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7015
|
+
import_framer_motion5.motion.img,
|
|
7016
|
+
{
|
|
7017
|
+
src: imageUrl,
|
|
7018
|
+
alt: imageAlt,
|
|
7019
|
+
className: "parallax-banner__image",
|
|
7020
|
+
loading: "lazy",
|
|
7021
|
+
style: parallaxActive ? { y: parallaxY } : void 0
|
|
7022
|
+
}
|
|
7023
|
+
) })
|
|
7024
|
+
] }),
|
|
7025
|
+
showCards && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__cards", role: "list", children: cards.map((card, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
7026
|
+
"div",
|
|
7027
|
+
{
|
|
7028
|
+
className: "parallax-banner__card-item",
|
|
7029
|
+
role: "listitem",
|
|
7030
|
+
children: [
|
|
7031
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "parallax-banner__card-title", children: card.title }),
|
|
7032
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "parallax-banner__card-description", children: card.description })
|
|
7033
|
+
]
|
|
7034
|
+
},
|
|
7035
|
+
`${card.title}-${index}`
|
|
7036
|
+
)) })
|
|
7037
|
+
] })
|
|
7038
|
+
}
|
|
7039
|
+
);
|
|
7040
|
+
};
|
|
6210
7041
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6211
7042
|
0 && (module.exports = {
|
|
6212
7043
|
AVATAR_DATA,
|
|
@@ -6226,14 +7057,20 @@ var HelpCenterPage = ({
|
|
|
6226
7057
|
ChipDropdown,
|
|
6227
7058
|
CoralBanner,
|
|
6228
7059
|
DEFAULT_AWARDS,
|
|
7060
|
+
DEFAULT_CULTURE_CARDS,
|
|
6229
7061
|
DayNightTransition,
|
|
6230
7062
|
DotLottieInView,
|
|
6231
7063
|
DownloadBadge,
|
|
6232
7064
|
DownloadBanner,
|
|
6233
7065
|
FEATURE_AWARDS_TEXT_CONTENT,
|
|
7066
|
+
FEATURE_BLOG_CATEGORIES_TEXT_CONTENT,
|
|
7067
|
+
FEATURE_BLOG_TEXT_CONTENT,
|
|
6234
7068
|
FEATURE_SCROLL_DATA,
|
|
6235
7069
|
FaqAccordion,
|
|
6236
7070
|
FeatureAwards,
|
|
7071
|
+
FeatureBlog,
|
|
7072
|
+
FeatureBlogCategories,
|
|
7073
|
+
FeatureBlogPage,
|
|
6237
7074
|
FeatureBullets,
|
|
6238
7075
|
FeatureCards,
|
|
6239
7076
|
FeatureCardsIcon,
|
|
@@ -6250,7 +7087,9 @@ var HelpCenterPage = ({
|
|
|
6250
7087
|
Link,
|
|
6251
7088
|
LogoMarquee,
|
|
6252
7089
|
Navbar,
|
|
7090
|
+
PARALLAX_BANNER_TEXT_CONTENT,
|
|
6253
7091
|
Pagination,
|
|
7092
|
+
ParallaxBanner,
|
|
6254
7093
|
PeopleGrid,
|
|
6255
7094
|
STEPS_DATA,
|
|
6256
7095
|
SearchField,
|