@deriv-web-design/ui 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -30,16 +30,21 @@ __export(index_exports, {
30
30
  Button: () => Button,
31
31
  COL_ONE_LOGOS: () => COL_ONE_LOGOS,
32
32
  COL_TWO_LOGOS: () => COL_TWO_LOGOS,
33
+ CORAL_BANNER_DERIV_SLIDES: () => CORAL_BANNER_DERIV_SLIDES,
33
34
  CTABanner: () => CTABanner,
34
35
  Card: () => Card,
35
36
  Chip: () => Chip,
36
37
  ChipDropdown: () => ChipDropdown,
38
+ CoralBanner: () => CoralBanner,
39
+ DEFAULT_AWARDS: () => DEFAULT_AWARDS,
37
40
  DayNightTransition: () => DayNightTransition,
38
41
  DotLottieInView: () => DotLottieInView,
39
42
  DownloadBadge: () => DownloadBadge,
40
43
  DownloadBanner: () => DownloadBanner,
44
+ FEATURE_AWARDS_TEXT_CONTENT: () => FEATURE_AWARDS_TEXT_CONTENT,
41
45
  FEATURE_SCROLL_DATA: () => FEATURE_SCROLL_DATA,
42
46
  FaqAccordion: () => FaqAccordion,
47
+ FeatureAwards: () => FeatureAwards,
43
48
  FeatureBullets: () => FeatureBullets,
44
49
  FeatureCards: () => FeatureCards,
45
50
  FeatureCardsIcon: () => FeatureCardsIcon,
@@ -47,6 +52,9 @@ __export(index_exports, {
47
52
  FeatureSplit: () => FeatureSplit,
48
53
  Footer: () => Footer,
49
54
  Header: () => Header,
55
+ HelpCenterPage: () => HelpCenterPage,
56
+ HelpCentreCategories: () => HelpCentreCategories,
57
+ HelpCentreSubCategories: () => HelpCentreSubCategories,
50
58
  Hero: () => Hero,
51
59
  ImageBanner: () => ImageBanner,
52
60
  Leaders: () => Leaders,
@@ -5638,6 +5646,567 @@ var ArticleSection = ({
5638
5646
  ] })
5639
5647
  ] });
5640
5648
  };
5649
+
5650
+ // templates/CoralBanner/CoralBanner.tsx
5651
+ var import_react24 = require("react");
5652
+ var import_jsx_runtime46 = require("react/jsx-runtime");
5653
+ var DEFAULT_SLIDES = [
5654
+ {
5655
+ title: "Section title goes here",
5656
+ description: "Explain how this specific feature helps your user.",
5657
+ primaryButton: { label: "Get started", href: "#" }
5658
+ }
5659
+ ];
5660
+ var CORAL_BANNER_DERIV_SLIDES = [
5661
+ {
5662
+ id: "ai-insights",
5663
+ title: "Analyse markets with AI-powered insights",
5664
+ primaryButton: { label: "Explore TradersView", href: "#" }
5665
+ },
5666
+ {
5667
+ id: "join-traders",
5668
+ title: "Join 3M+\nglobal traders",
5669
+ description: "Open an account in minutes and start trading the world's markets \u2014 forex, stocks, indices, and more.",
5670
+ primaryButton: { label: "Trade now", href: "#" }
5671
+ }
5672
+ ];
5673
+ var LeftArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5674
+ "path",
5675
+ {
5676
+ d: "M3.31066 8.75001L9.03033 14.4697L7.96967 15.5303L0.439339 8.00001L7.96967 0.469676L9.03033 1.53034L3.31066 7.25001L15.5 7.25L15.5 8.75L3.31066 8.75001Z",
5677
+ fill: "currentColor"
5678
+ }
5679
+ ) });
5680
+ var RightArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5681
+ "path",
5682
+ {
5683
+ d: "M12.6893 7.25L6.96967 1.53033L8.03033 0.469666L15.5607 8L8.03033 15.5303L6.96967 14.4697L12.6893 8.75H0.5V7.25H12.6893Z",
5684
+ fill: "currentColor"
5685
+ }
5686
+ ) });
5687
+ var renderTitleLines = (title) => {
5688
+ const lines = title.split("\n");
5689
+ return lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
5690
+ line,
5691
+ i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
5692
+ ] }, i));
5693
+ };
5694
+ var ButtonBlock3 = ({
5695
+ primaryButton,
5696
+ secondaryButton
5697
+ }) => {
5698
+ if (!primaryButton && !secondaryButton) return null;
5699
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__buttons", children: [
5700
+ primaryButton && (primaryButton.href ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("a", { href: primaryButton.href, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5701
+ Button,
5702
+ {
5703
+ colorScheme: "black",
5704
+ variant: "primary",
5705
+ label: primaryButton.label,
5706
+ onClick: primaryButton.onClick
5707
+ }
5708
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5709
+ Button,
5710
+ {
5711
+ colorScheme: "black",
5712
+ variant: "primary",
5713
+ label: primaryButton.label,
5714
+ onClick: primaryButton.onClick
5715
+ }
5716
+ )),
5717
+ secondaryButton && (secondaryButton.href ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("a", { href: secondaryButton.href, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5718
+ Button,
5719
+ {
5720
+ colorScheme: "white",
5721
+ variant: "secondary",
5722
+ label: secondaryButton.label,
5723
+ onClick: secondaryButton.onClick
5724
+ }
5725
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5726
+ Button,
5727
+ {
5728
+ colorScheme: "white",
5729
+ variant: "secondary",
5730
+ label: secondaryButton.label,
5731
+ onClick: secondaryButton.onClick
5732
+ }
5733
+ ))
5734
+ ] });
5735
+ };
5736
+ var SlideContent = ({ slide }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__grid", children: [
5737
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__content", children: [
5738
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { className: "crb__title", children: renderTitleLines(slide.title) }),
5739
+ slide.description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "crb__description", children: slide.description }),
5740
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5741
+ ButtonBlock3,
5742
+ {
5743
+ primaryButton: slide.primaryButton,
5744
+ secondaryButton: slide.secondaryButton
5745
+ }
5746
+ )
5747
+ ] }),
5748
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__spacer", "aria-hidden": "true" })
5749
+ ] });
5750
+ var CoralBanner = ({
5751
+ variant = "static",
5752
+ slides,
5753
+ autoplay = true,
5754
+ autoplayDelay = 2e3,
5755
+ transitionDuration = 330,
5756
+ infinite = true,
5757
+ showArrows = true,
5758
+ showDots = true,
5759
+ className,
5760
+ ...props
5761
+ }) => {
5762
+ const resolvedSlides = slides && slides.length > 0 ? slides : DEFAULT_SLIDES;
5763
+ const count = resolvedSlides.length;
5764
+ const isCarousel = variant === "carousel" && count > 1;
5765
+ const [activeIndex, setActiveIndex] = (0, import_react24.useState)(0);
5766
+ const autoplayTimer = (0, import_react24.useRef)(null);
5767
+ const dragState = (0, import_react24.useRef)(null);
5768
+ const goTo = (0, import_react24.useCallback)(
5769
+ (index) => {
5770
+ if (count <= 1) return;
5771
+ const next = infinite ? (index % count + count) % count : Math.max(0, Math.min(index, count - 1));
5772
+ setActiveIndex(next);
5773
+ },
5774
+ [count, infinite]
5775
+ );
5776
+ const goNext = (0, import_react24.useCallback)(() => goTo(activeIndex + 1), [activeIndex, goTo]);
5777
+ const goPrev = (0, import_react24.useCallback)(() => goTo(activeIndex - 1), [activeIndex, goTo]);
5778
+ const resetAutoplay = () => {
5779
+ if (autoplayTimer.current) clearTimeout(autoplayTimer.current);
5780
+ };
5781
+ (0, import_react24.useEffect)(() => {
5782
+ if (!isCarousel || !autoplay) return;
5783
+ autoplayTimer.current = setTimeout(() => {
5784
+ goTo(activeIndex + 1);
5785
+ }, autoplayDelay);
5786
+ return () => resetAutoplay();
5787
+ }, [isCarousel, autoplay, autoplayDelay, activeIndex]);
5788
+ const handlePointerDown = (e) => {
5789
+ if (!isCarousel) return;
5790
+ dragState.current = { startX: e.clientX };
5791
+ };
5792
+ const handlePointerUp = (e) => {
5793
+ if (!isCarousel || !dragState.current) return;
5794
+ const delta = e.clientX - dragState.current.startX;
5795
+ dragState.current = null;
5796
+ const SWIPE_THRESHOLD = 40;
5797
+ if (delta > SWIPE_THRESHOLD) {
5798
+ resetAutoplay();
5799
+ goPrev();
5800
+ } else if (delta < -SWIPE_THRESHOLD) {
5801
+ resetAutoplay();
5802
+ goNext();
5803
+ }
5804
+ };
5805
+ const rootClass = [
5806
+ "crb",
5807
+ isCarousel ? "crb--carousel" : "crb--static",
5808
+ className
5809
+ ].filter(Boolean).join(" ");
5810
+ if (!isCarousel) {
5811
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("section", { className: rootClass, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__inner", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__stage", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SlideContent, { slide: resolvedSlides[0] }) }) }) });
5812
+ }
5813
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("section", { className: rootClass, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__inner", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__stage", children: [
5814
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5815
+ "div",
5816
+ {
5817
+ className: "crb__viewport",
5818
+ onPointerDown: handlePointerDown,
5819
+ onPointerUp: handlePointerUp,
5820
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5821
+ "div",
5822
+ {
5823
+ className: "crb__track",
5824
+ style: {
5825
+ transform: `translateX(-${activeIndex * 100}%)`,
5826
+ transitionDuration: `${transitionDuration}ms`
5827
+ },
5828
+ children: resolvedSlides.map((slide, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5829
+ "div",
5830
+ {
5831
+ className: "crb__slide",
5832
+ role: "group",
5833
+ "aria-roledescription": "slide",
5834
+ "aria-label": `${i + 1} of ${count}`,
5835
+ "aria-hidden": i !== activeIndex,
5836
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SlideContent, { slide })
5837
+ },
5838
+ slide.id ?? i
5839
+ ))
5840
+ }
5841
+ )
5842
+ }
5843
+ ),
5844
+ showDots && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__dots", role: "tablist", "aria-label": "Banner slide navigation", children: resolvedSlides.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5845
+ "button",
5846
+ {
5847
+ type: "button",
5848
+ role: "tab",
5849
+ "aria-selected": i === activeIndex,
5850
+ "aria-label": `Go to slide ${i + 1} of ${count}`,
5851
+ className: [
5852
+ "crb__dot",
5853
+ i === activeIndex ? "crb__dot--active" : ""
5854
+ ].filter(Boolean).join(" "),
5855
+ onClick: () => {
5856
+ resetAutoplay();
5857
+ goTo(i);
5858
+ }
5859
+ },
5860
+ i
5861
+ )) }),
5862
+ showArrows && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__arrows", children: [
5863
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5864
+ "button",
5865
+ {
5866
+ type: "button",
5867
+ className: "crb__arrow crb__arrow--prev",
5868
+ "aria-label": "Previous slide",
5869
+ onClick: () => {
5870
+ resetAutoplay();
5871
+ goPrev();
5872
+ },
5873
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LeftArrowIcon, {})
5874
+ }
5875
+ ),
5876
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5877
+ "button",
5878
+ {
5879
+ type: "button",
5880
+ className: "crb__arrow crb__arrow--next",
5881
+ "aria-label": "Next slide",
5882
+ onClick: () => {
5883
+ resetAutoplay();
5884
+ goNext();
5885
+ },
5886
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RightArrowIcon, {})
5887
+ }
5888
+ )
5889
+ ] })
5890
+ ] }) }) });
5891
+ };
5892
+
5893
+ // assets/award-leaf-left.png
5894
+ var award_leaf_left_default = "./award-leaf-left-HVAB5T5H.png";
5895
+
5896
+ // assets/award-leaf-right.png
5897
+ var award_leaf_right_default = "./award-leaf-right-WR5I37KI.png";
5898
+
5899
+ // templates/FeatureAwards/FeatureAwards.tsx
5900
+ var import_jsx_runtime47 = require("react/jsx-runtime");
5901
+ var FEATURE_AWARDS_TEXT_CONTENT = {
5902
+ title: "Our awards"
5903
+ };
5904
+ var DEFAULT_AWARDS = [
5905
+ { title: "Best Trade Execution Award (MEA)", subtitle: "Ultimate Fintech 2026" },
5906
+ { title: "Best Trading Experience - Global", subtitle: "UF Awards 2025" },
5907
+ { title: "Best CFD Broker - LATAM", subtitle: "UF Awards 2025" },
5908
+ { title: "Most Innovative Broker - MEA", subtitle: "UF Awards 2025" },
5909
+ { title: "Most Transparent Broker - Global", subtitle: "Global Forex Awards 2025" },
5910
+ { title: "Best Broker - Africa", subtitle: "Global Forex Awards 2025" },
5911
+ { title: "Best Trading Platform - MENA", subtitle: "Global Forex Awards 2025" },
5912
+ { title: "Most Innovative Online Trading Platform", subtitle: "Forex Expo Dubai 2025" },
5913
+ { title: "Chief Risk & Compliance Officer of the Year", subtitle: "Forex Expo Dubai 2025" },
5914
+ { title: "Best Broker - APAC", subtitle: "UF Awards 2025" },
5915
+ { title: "Best Trading Conditions - Global", subtitle: "Finance Magnates 2025" },
5916
+ { title: "Most Trusted Broker - Middle East", subtitle: "Finance Magnates 2025" },
5917
+ { title: "Affiliate Program of the Year", subtitle: "Forex Expo Dubai 2024" },
5918
+ { title: "Best Customer Service - Global", subtitle: "Global Forex Awards 2024" },
5919
+ { title: "Most Trusted Broker - Africa", subtitle: "Finance Magnates 2024" },
5920
+ { title: "Best LATAM Region Broker", subtitle: "ADVFN Awards 2024" },
5921
+ { title: "Broker of the Year - Global", subtitle: "Finance Magnates 2024" }
5922
+ ];
5923
+ var LaurelIcon = ({ side }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5924
+ "img",
5925
+ {
5926
+ className: `fa__leaf fa__leaf--${side}`,
5927
+ src: side === "left" ? award_leaf_left_default : award_leaf_right_default,
5928
+ alt: "",
5929
+ "aria-hidden": "true",
5930
+ loading: "lazy",
5931
+ draggable: false
5932
+ }
5933
+ );
5934
+ var AwardBadge2 = ({ award }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__item", role: "listitem", children: [
5935
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LaurelIcon, { side: "left" }),
5936
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__item-text", children: [
5937
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "fa__item-title", children: award.title }),
5938
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "fa__item-subtitle", children: award.subtitle })
5939
+ ] }),
5940
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LaurelIcon, { side: "right" })
5941
+ ] });
5942
+ var FeatureAwards = ({
5943
+ title = FEATURE_AWARDS_TEXT_CONTENT.title,
5944
+ awards = DEFAULT_AWARDS,
5945
+ autoScrollDuration = 32,
5946
+ className,
5947
+ ...props
5948
+ }) => {
5949
+ if (!awards || awards.length === 0) return null;
5950
+ const trackStyle = {
5951
+ "--fa-duration": `${autoScrollDuration}s`
5952
+ };
5953
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5954
+ "section",
5955
+ {
5956
+ className: ["fa", className].filter(Boolean).join(" "),
5957
+ ...props,
5958
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__inner", children: [
5959
+ title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "fa__title", children: title }),
5960
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__grid", role: "list", children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `g-${i}`)) }),
5961
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__scroller", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__track fa__track--auto", style: trackStyle, children: [
5962
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__track-group", role: "list", children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `m-${i}`)) }),
5963
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5964
+ "div",
5965
+ {
5966
+ className: "fa__track-group",
5967
+ role: "presentation",
5968
+ "aria-hidden": "true",
5969
+ children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `m-dup-${i}`))
5970
+ }
5971
+ )
5972
+ ] }) })
5973
+ ] })
5974
+ }
5975
+ );
5976
+ };
5977
+
5978
+ // templates/HelpCentreCategories/HelpCentreCategories.tsx
5979
+ var import_jsx_runtime48 = require("react/jsx-runtime");
5980
+ var externalLinkRel2 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
5981
+ var CategoryTileContent = ({ category }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
5982
+ category.icon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hcc-tile-icon", children: typeof category.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5983
+ "img",
5984
+ {
5985
+ alt: category.iconAlt ?? "",
5986
+ className: "hcc-tile-iconImage",
5987
+ decoding: "async",
5988
+ height: 48,
5989
+ loading: "lazy",
5990
+ src: category.icon,
5991
+ width: 48
5992
+ }
5993
+ ) : category.icon }),
5994
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hcc-tile-title", children: category.title })
5995
+ ] });
5996
+ var CategoryTile = ({ category }) => {
5997
+ if (category.href) {
5998
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5999
+ "a",
6000
+ {
6001
+ className: "hcc-tile",
6002
+ href: category.href,
6003
+ onClick: category.onClick,
6004
+ rel: externalLinkRel2(category.href),
6005
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CategoryTileContent, { category })
6006
+ }
6007
+ );
6008
+ }
6009
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { className: "hcc-tile", onClick: category.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CategoryTileContent, { category }) });
6010
+ };
6011
+ var getColumnCount = (categoryCount) => Math.max(1, Math.min(categoryCount, 3));
6012
+ var HelpCentreCategories = ({
6013
+ sectionTitle,
6014
+ sectionDescription,
6015
+ categories
6016
+ }) => {
6017
+ const columnCount = getColumnCount(categories.length);
6018
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("section", { className: "hcc-section", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "hcc-container", children: [
6019
+ (sectionTitle || sectionDescription) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "hcc-header", children: [
6020
+ sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "hcc-sectionTitle", children: sectionTitle }),
6021
+ sectionDescription && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "hcc-sectionDescription", children: sectionDescription })
6022
+ ] }),
6023
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `hcc-grid hcc-grid--${columnCount}`, role: "list", children: categories.map((category, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "hcc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CategoryTile, { category }) }, category.id ?? `${category.title}-${index}`)) })
6024
+ ] }) });
6025
+ };
6026
+
6027
+ // templates/HelpCentreSubCategories/HelpCentreSubCategories.tsx
6028
+ var import_react25 = require("react");
6029
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6030
+ var externalLinkRel3 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
6031
+ var QuestionCard = ({ item }) => {
6032
+ if (item.href) {
6033
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("a", { className: "hcsc-card", href: item.href, onClick: item.onClick, rel: externalLinkRel3(item.href), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
6034
+ }
6035
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { className: "hcsc-card", onClick: item.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
6036
+ };
6037
+ var HelpCentreSubCategories = ({
6038
+ title,
6039
+ searchPlaceholder = "Search",
6040
+ searchAriaLabel,
6041
+ items,
6042
+ noResultsText = 'No results found for "{query}"',
6043
+ onSearchChange
6044
+ }) => {
6045
+ const [search, setSearch] = (0, import_react25.useState)("");
6046
+ const filtered = (0, import_react25.useMemo)(() => {
6047
+ const q = search.trim().toLowerCase();
6048
+ if (!q) return items;
6049
+ return items.filter((item) => item.question.toLowerCase().includes(q));
6050
+ }, [items, search]);
6051
+ const handleSearchChange = (e) => {
6052
+ setSearch(e.target.value);
6053
+ onSearchChange?.(e.target.value);
6054
+ };
6055
+ const handleClear = () => {
6056
+ setSearch("");
6057
+ onSearchChange?.("");
6058
+ };
6059
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("section", { className: "hcsc-section", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "hcsc-container", children: [
6060
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h1", { className: "hcsc-title", children: title }),
6061
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hcsc-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6062
+ SearchField,
6063
+ {
6064
+ "aria-label": searchAriaLabel ?? searchPlaceholder,
6065
+ onChange: handleSearchChange,
6066
+ onClear: handleClear,
6067
+ placeholder: searchPlaceholder,
6068
+ value: search,
6069
+ variant: "outline"
6070
+ }
6071
+ ) }),
6072
+ filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hcsc-grid", role: "list", children: filtered.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hcsc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(QuestionCard, { item }) }, item.id ?? `${item.question}-${index}`)) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "hcsc-noResults", children: noResultsText.replace("{query}", search) })
6073
+ ] }) });
6074
+ };
6075
+
6076
+ // templates/HelpCenterPage/HelpCenterPage.tsx
6077
+ var import_react26 = require("react");
6078
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6079
+ var externalLinkRel4 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
6080
+ var ChevronDownIcon5 = () => /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsx)("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
6081
+ var renderBlock = (block, index) => {
6082
+ if (block.type === "heading") {
6083
+ const HeadingTag = block.level === 3 ? "h3" : "h2";
6084
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(HeadingTag, { className: "hcp-blockHeading", children: block.text }, index);
6085
+ }
6086
+ if (block.type === "list") {
6087
+ const ListTag = block.ordered ? "ol" : "ul";
6088
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ListTag, { className: "hcp-blockList", children: (block.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("li", { className: "hcp-blockListItem", children: item }, i)) }, index);
6089
+ }
6090
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "hcp-blockParagraph", children: block.text }, index);
6091
+ };
6092
+ var QuestionRow = ({
6093
+ item,
6094
+ isActive,
6095
+ onSelect
6096
+ }) => {
6097
+ const rowClass = ["hcp-row", isActive ? "hcp-row--active" : ""].filter(Boolean).join(" ");
6098
+ if (item.href) {
6099
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6100
+ "a",
6101
+ {
6102
+ "aria-current": isActive ? "page" : void 0,
6103
+ className: rowClass,
6104
+ href: item.href,
6105
+ onClick: () => {
6106
+ item.onClick?.();
6107
+ onSelect(item);
6108
+ },
6109
+ rel: externalLinkRel4(item.href),
6110
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcp-rowText", children: item.question })
6111
+ }
6112
+ );
6113
+ }
6114
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6115
+ "button",
6116
+ {
6117
+ "aria-current": isActive ? "page" : void 0,
6118
+ className: rowClass,
6119
+ onClick: () => {
6120
+ item.onClick?.();
6121
+ onSelect(item);
6122
+ },
6123
+ type: "button",
6124
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcp-rowText", children: item.question })
6125
+ }
6126
+ );
6127
+ };
6128
+ var HelpCenterPage = ({
6129
+ categoryTitle,
6130
+ questions,
6131
+ activeQuestionId,
6132
+ defaultActiveQuestionId,
6133
+ onQuestionSelect,
6134
+ contentTitle,
6135
+ content,
6136
+ searchPlaceholder = "Search",
6137
+ searchAriaLabel,
6138
+ onSearchChange,
6139
+ searchNoResultsText = 'No results found for "{query}"',
6140
+ articlesSheetTitle = "Articles in this section",
6141
+ className
6142
+ }) => {
6143
+ const [search, setSearch] = (0, import_react26.useState)("");
6144
+ const [internalActiveId, setInternalActiveId] = (0, import_react26.useState)(defaultActiveQuestionId ?? questions[0]?.id);
6145
+ const [sheetOpen, setSheetOpen] = (0, import_react26.useState)(false);
6146
+ const isControlled = activeQuestionId !== void 0;
6147
+ const activeId = isControlled ? activeQuestionId : internalActiveId;
6148
+ const activeItem = questions.find((item) => item.id === activeId);
6149
+ const filtered = (0, import_react26.useMemo)(() => {
6150
+ const q = search.trim().toLowerCase();
6151
+ if (!q) return questions;
6152
+ return questions.filter((item) => item.question.toLowerCase().includes(q));
6153
+ }, [questions, search]);
6154
+ const handleSearchChange = (e) => {
6155
+ setSearch(e.target.value);
6156
+ onSearchChange?.(e.target.value);
6157
+ };
6158
+ const handleClear = () => {
6159
+ setSearch("");
6160
+ onSearchChange?.("");
6161
+ };
6162
+ const handleSelect = (item) => {
6163
+ if (!isControlled) setInternalActiveId(item.id);
6164
+ onQuestionSelect?.(item.id);
6165
+ setSheetOpen(false);
6166
+ };
6167
+ const resolvedTitle = activeItem?.content ? activeItem.contentTitle ?? contentTitle : contentTitle;
6168
+ const resolvedContent = activeItem?.content ?? content;
6169
+ const rootClass = ["hcp-section", className ?? ""].filter(Boolean).join(" ");
6170
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("section", { className: rootClass, children: [
6171
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcp-container", children: [
6172
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6173
+ SearchField,
6174
+ {
6175
+ "aria-label": searchAriaLabel ?? searchPlaceholder,
6176
+ onChange: handleSearchChange,
6177
+ onClear: handleClear,
6178
+ placeholder: searchPlaceholder,
6179
+ value: search,
6180
+ variant: "outline"
6181
+ }
6182
+ ) }),
6183
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcp-body", children: [
6184
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("aside", { className: "hcp-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcp-sidebarCard", children: [
6185
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h2", { className: "hcp-sidebarTitle", children: categoryTitle }),
6186
+ filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-list", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-listItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) })
6187
+ ] }) }),
6188
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
6189
+ "button",
6190
+ {
6191
+ "aria-expanded": sheetOpen,
6192
+ className: "hcp-mobileToggle",
6193
+ onClick: () => setSheetOpen(true),
6194
+ type: "button",
6195
+ children: [
6196
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcp-mobileToggleLabel", children: categoryTitle }),
6197
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcp-mobileToggleChevron", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChevronDownIcon5, {}) })
6198
+ ]
6199
+ }
6200
+ ),
6201
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcp-content", children: [
6202
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h1", { className: "hcp-contentTitle", children: resolvedTitle }),
6203
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-contentBody", children: resolvedContent.map(renderBlock) })
6204
+ ] })
6205
+ ] })
6206
+ ] }),
6207
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BottomSheet, { onClose: () => setSheetOpen(false), open: sheetOpen, title: articlesSheetTitle, children: filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-sheetList", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcp-sheetItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) }) })
6208
+ ] });
6209
+ };
5641
6210
  // Annotate the CommonJS export names for ESM import in node:
5642
6211
  0 && (module.exports = {
5643
6212
  AVATAR_DATA,
@@ -5650,16 +6219,21 @@ var ArticleSection = ({
5650
6219
  Button,
5651
6220
  COL_ONE_LOGOS,
5652
6221
  COL_TWO_LOGOS,
6222
+ CORAL_BANNER_DERIV_SLIDES,
5653
6223
  CTABanner,
5654
6224
  Card,
5655
6225
  Chip,
5656
6226
  ChipDropdown,
6227
+ CoralBanner,
6228
+ DEFAULT_AWARDS,
5657
6229
  DayNightTransition,
5658
6230
  DotLottieInView,
5659
6231
  DownloadBadge,
5660
6232
  DownloadBanner,
6233
+ FEATURE_AWARDS_TEXT_CONTENT,
5661
6234
  FEATURE_SCROLL_DATA,
5662
6235
  FaqAccordion,
6236
+ FeatureAwards,
5663
6237
  FeatureBullets,
5664
6238
  FeatureCards,
5665
6239
  FeatureCardsIcon,
@@ -5667,6 +6241,9 @@ var ArticleSection = ({
5667
6241
  FeatureSplit,
5668
6242
  Footer,
5669
6243
  Header,
6244
+ HelpCenterPage,
6245
+ HelpCentreCategories,
6246
+ HelpCentreSubCategories,
5670
6247
  Hero,
5671
6248
  ImageBanner,
5672
6249
  Leaders,