@digital-b2c/coreui-kit 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,12 @@
1
- import clsx3 from 'clsx';
1
+ import clsx19 from 'clsx';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
- import React52, { forwardRef, Children, isValidElement, useRef, useState, useCallback, useEffect } from 'react';
3
+ import React52, { forwardRef, Children, isValidElement, useRef, useState, useCallback, useMemo, useEffect } from 'react';
4
4
  import gsap$1, { gsap } from 'gsap';
5
5
  import { useGSAP } from '@gsap/react';
6
6
  import { ScrollTrigger } from 'gsap/ScrollTrigger';
7
+ import { Swiper, SwiperSlide } from 'swiper/react';
8
+ import { FreeMode } from 'swiper/modules';
9
+ import 'swiper/css';
7
10
 
8
11
  var __defProp = Object.defineProperty;
9
12
  var __defProps = Object.defineProperties;
@@ -55,7 +58,7 @@ var Picture = (_a) => {
55
58
  __spreadValues({
56
59
  src: desktop.src,
57
60
  alt: desktop.alt,
58
- className: clsx3(className, Picture_module_default["image-desktop"])
61
+ className: clsx19(className, Picture_module_default["image-desktop"])
59
62
  }, rest)
60
63
  ),
61
64
  /* @__PURE__ */ jsx(
@@ -63,7 +66,7 @@ var Picture = (_a) => {
63
66
  __spreadValues({
64
67
  src: (_b2 = mobile == null ? void 0 : mobile.src) != null ? _b2 : desktop.src,
65
68
  alt: (_c = mobile == null ? void 0 : mobile.alt) != null ? _c : desktop.alt,
66
- className: clsx3(className, Picture_module_default["image-mobile"])
69
+ className: clsx19(className, Picture_module_default["image-mobile"])
67
70
  }, rest)
68
71
  )
69
72
  ] });
@@ -377,7 +380,7 @@ var Button = (_a) => {
377
380
  ]);
378
381
  const isLink = !!href;
379
382
  const props = __spreadValues(__spreadValues({
380
- className: clsx3(
383
+ className: clsx19(
381
384
  Button_module_default.button,
382
385
  variant ? Button_module_default[variant] : null,
383
386
  { [Button_module_default.fullWidth]: !!fullWidth },
@@ -486,9 +489,7 @@ var BrandsStrip_module_default = {
486
489
  title: "BrandsStrip_module_title",
487
490
  blurred: "BrandsStrip_module_blurred",
488
491
  logos: "BrandsStrip_module_logos",
489
- marquee: "BrandsStrip_module_marquee",
490
- scrollIndividual: "BrandsStrip_module_scrollIndividual",
491
- paused: "BrandsStrip_module_paused",
492
+ marqueeGSAP: "BrandsStrip_module_marqueeGSAP",
492
493
  logo: "BrandsStrip_module_logo",
493
494
  cta: "BrandsStrip_module_cta"
494
495
  };
@@ -498,37 +499,136 @@ var BrandsStrip = ({
498
499
  title,
499
500
  logos = [],
500
501
  cta,
501
- size,
502
- animate = false
502
+ size
503
503
  }) => {
504
504
  const [show, setShow] = useState(false);
505
+ const [shouldAnimate, setShouldAnimate] = useState(false);
505
506
  const { is } = useViewPort_default();
506
507
  const isTabletBelow = is("tablet", "below");
507
- const shouldAnimate = title && animate;
508
+ const containerRef = useRef(null);
509
+ const marqueeRef = useRef(null);
510
+ const timeline = useRef(null);
511
+ const horizontalLoop = (items, config) => {
512
+ const itemsArray = gsap$1.utils.toArray(items);
513
+ const cfg = config || {};
514
+ const tl = gsap$1.timeline({
515
+ repeat: cfg.repeat,
516
+ paused: cfg.paused,
517
+ defaults: { ease: "none" },
518
+ onReverseComplete: () => tl.totalTime(tl.rawTime() + tl.duration() * 100)
519
+ });
520
+ const length = itemsArray.length;
521
+ const startX = itemsArray[0].offsetLeft;
522
+ const widths = [];
523
+ const xPercents = [];
524
+ const pixelsPerSecond = (cfg.speed || 1) * 100;
525
+ const snap = cfg.snap === false ? (v) => v : gsap$1.utils.snap(cfg.snap || 1);
526
+ gsap$1.set(itemsArray, {
527
+ xPercent: (i, target) => {
528
+ const w = widths[i] = parseFloat(gsap$1.getProperty(target, "width", "px"));
529
+ xPercents[i] = snap(
530
+ parseFloat(gsap$1.getProperty(target, "x", "px")) / w * 100 + gsap$1.getProperty(target, "xPercent")
531
+ );
532
+ return xPercents[i];
533
+ }
534
+ });
535
+ gsap$1.set(itemsArray, { x: 0 });
536
+ const totalWidth = itemsArray[length - 1].offsetLeft + xPercents[length - 1] / 100 * widths[length - 1] - startX + itemsArray[length - 1].offsetWidth * gsap$1.getProperty(itemsArray[length - 1], "scaleX") + (parseFloat(cfg.paddingRight) || 0);
537
+ for (let i = 0; i < length; i++) {
538
+ const item = itemsArray[i];
539
+ const curX = xPercents[i] / 100 * widths[i];
540
+ const distanceToStart = item.offsetLeft - startX;
541
+ const distanceToLoop = distanceToStart + widths[i] * gsap$1.getProperty(item, "scaleX");
542
+ tl.to(
543
+ item,
544
+ {
545
+ xPercent: snap((curX - distanceToLoop) / widths[i] * 100),
546
+ duration: distanceToLoop / pixelsPerSecond
547
+ },
548
+ 0
549
+ ).fromTo(
550
+ item,
551
+ { xPercent: snap((curX - distanceToLoop + totalWidth) / widths[i] * 100) },
552
+ {
553
+ xPercent: xPercents[i],
554
+ duration: (totalWidth - distanceToLoop) / pixelsPerSecond,
555
+ immediateRender: false
556
+ },
557
+ distanceToLoop / pixelsPerSecond
558
+ ).add("label" + i, distanceToStart / pixelsPerSecond);
559
+ }
560
+ return tl;
561
+ };
562
+ useGSAP(
563
+ () => {
564
+ const refreshCalculations = () => {
565
+ if (!marqueeRef.current || !containerRef.current || logos.length === 0) return;
566
+ const items = gsap$1.utils.toArray(marqueeRef.current.children);
567
+ if (items.length === 0) return;
568
+ const itemWidth = items[0].clientWidth;
569
+ const calculatedTotalWidth = shouldAnimate ? itemWidth * items.length + 120 * (items.length - 1) / 2 : itemWidth * items.length + 120 * (items.length - 1);
570
+ const containerWidth = containerRef.current.clientWidth;
571
+ if (containerWidth === 0) {
572
+ requestAnimationFrame(refreshCalculations);
573
+ return;
574
+ }
575
+ if (containerWidth < calculatedTotalWidth) {
576
+ setShouldAnimate(true);
577
+ const ctx = gsap$1.context(() => {
578
+ const loop = horizontalLoop(items, {
579
+ repeat: -1,
580
+ speed: 1,
581
+ paddingRight: 120
582
+ });
583
+ timeline.current = loop;
584
+ }, containerRef);
585
+ return () => ctx.revert();
586
+ }
587
+ };
588
+ refreshCalculations();
589
+ },
590
+ { scope: containerRef, dependencies: [logos] }
591
+ );
592
+ const handleMouseEnter = () => {
593
+ setShow(true);
594
+ if (timeline.current) {
595
+ timeline.current.pause();
596
+ }
597
+ };
598
+ const handleMouseLeave = () => {
599
+ setShow(false);
600
+ if (timeline.current) {
601
+ timeline.current.play();
602
+ }
603
+ };
604
+ const duplicatedLogos = useMemo(() => {
605
+ if (logos.length === 0) return [];
606
+ if (!shouldAnimate) return [...logos];
607
+ return [...logos, ...logos];
608
+ }, [logos]);
508
609
  return /* @__PURE__ */ jsxs(
509
610
  "div",
510
611
  {
511
- className: clsx3(
612
+ ref: containerRef,
613
+ className: clsx19(
512
614
  BrandsStrip_module_default.brandsStrip,
513
615
  BrandsStrip_module_default[variant],
514
616
  { [BrandsStrip_module_default.small]: size === "small" },
515
617
  className
516
618
  ),
517
- onMouseEnter: () => setShow(true),
518
- onMouseLeave: () => setShow(false),
519
- style: { "--total-items": logos.length },
619
+ onMouseEnter: handleMouseEnter,
620
+ onMouseLeave: handleMouseLeave,
520
621
  children: [
521
- /* @__PURE__ */ jsxs("div", { className: clsx3(BrandsStrip_module_default.container, { [BrandsStrip_module_default.blurred]: show && logos.length > 1 }), children: [
522
- title && logos.length == 1 && /* @__PURE__ */ jsx("h2", { className: clsx3("body", BrandsStrip_module_default.title), children: title }),
523
- logos.length > 0 && /* @__PURE__ */ jsx("div", { className: clsx3(BrandsStrip_module_default.logos, { [BrandsStrip_module_default.marquee]: shouldAnimate }), children: logos.map((logo, index) => /* @__PURE__ */ jsx(
622
+ /* @__PURE__ */ jsxs("div", { className: clsx19(BrandsStrip_module_default.container, { [BrandsStrip_module_default.blurred]: show && logos.length > 1 }), children: [
623
+ title && logos.length === 1 && /* @__PURE__ */ jsx("h2", { className: clsx19("body", BrandsStrip_module_default.title), children: title }),
624
+ logos.length > 0 && /* @__PURE__ */ jsx(
524
625
  "div",
525
626
  {
526
- className: clsx3(BrandsStrip_module_default.logoWrapper, { [BrandsStrip_module_default.paused]: show }),
527
- style: { "--item-index": index },
528
- children: /* @__PURE__ */ jsx(Picture, __spreadValues({ className: BrandsStrip_module_default.logo }, logo))
529
- },
530
- index
531
- )) })
627
+ ref: marqueeRef,
628
+ className: clsx19(BrandsStrip_module_default.logos, { [BrandsStrip_module_default.marqueeGSAP]: shouldAnimate }),
629
+ children: duplicatedLogos.map((logo, index) => /* @__PURE__ */ jsx("div", { className: BrandsStrip_module_default.logoWrapper, children: /* @__PURE__ */ jsx(Picture, __spreadValues({ className: BrandsStrip_module_default.logo }, logo)) }, `${logo.alt}-${index}`))
630
+ }
631
+ )
532
632
  ] }),
533
633
  cta && show && logos.length > 1 && /* @__PURE__ */ jsx(
534
634
  Button,
@@ -580,7 +680,7 @@ var Card = forwardRef(
580
680
  });
581
681
  const titleNode = (_a = slots.title) != null ? _a : title;
582
682
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
583
- return /* @__PURE__ */ jsxs("div", { ref, className: clsx3(Card_module_default.card, className), children: [
683
+ return /* @__PURE__ */ jsxs("div", { ref, className: clsx19(Card_module_default.card, className), children: [
584
684
  (logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Card_module_default.logo }, logo)) : icon && /* @__PURE__ */ jsx(Icon, { type: icon, className: Card_module_default.logo }),
585
685
  /* @__PURE__ */ jsxs("div", { className: Card_module_default.content, children: [
586
686
  titleNode && /* @__PURE__ */ jsx("h3", { className: "h4", children: titleNode }),
@@ -622,10 +722,10 @@ var CountingCard = ({ className, title, count, image, children }) => {
622
722
  title: CountingCardTitle
623
723
  });
624
724
  const titleNode = (_a = slots.title) != null ? _a : title;
625
- return /* @__PURE__ */ jsxs("div", { className: clsx3(CountingCard_module_default["counting-card"], className), children: [
725
+ return /* @__PURE__ */ jsxs("div", { className: clsx19(CountingCard_module_default["counting-card"], className), children: [
626
726
  /* @__PURE__ */ jsxs("div", { className: CountingCard_module_default.content, children: [
627
727
  titleNode && /* @__PURE__ */ jsx("div", { className: "body", children: titleNode }),
628
- count && /* @__PURE__ */ jsx("div", { className: clsx3(CountingCard_module_default.count, "h1"), children: count })
728
+ count && /* @__PURE__ */ jsx("div", { className: clsx19(CountingCard_module_default.count, "h1"), children: count })
629
729
  ] }),
630
730
  image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: CountingCard_module_default.logo }, image))
631
731
  ] });
@@ -657,9 +757,9 @@ var InfoCard = ({ className, title, subtitle, icon, badge, children }) => {
657
757
  });
658
758
  const titleNode = (_a = slots.title) != null ? _a : title;
659
759
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
660
- return /* @__PURE__ */ jsxs("div", { className: clsx3(InfoCard_module_default["info-card"], { [InfoCard_module_default.hasIcon]: !!icon }, className), children: [
760
+ return /* @__PURE__ */ jsxs("div", { className: clsx19(InfoCard_module_default["info-card"], { [InfoCard_module_default.hasIcon]: !!icon }, className), children: [
661
761
  /* @__PURE__ */ jsxs("div", { className: InfoCard_module_default.header, children: [
662
- icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className: clsx3(InfoCard_module_default.badge, "h4"), children: badge }) : null,
762
+ icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className: clsx19(InfoCard_module_default.badge, "h4"), children: badge }) : null,
663
763
  titleNode && /* @__PURE__ */ jsx("div", { className: "h4", children: titleNode })
664
764
  ] }),
665
765
  subtitleNode && /* @__PURE__ */ jsx("div", { className: "body", children: subtitleNode })
@@ -721,7 +821,7 @@ var Pagination = ({
721
821
  setActivePage(page);
722
822
  onPageChange == null ? void 0 : onPageChange(page);
723
823
  };
724
- return /* @__PURE__ */ jsxs("div", { className: clsx3(Pagination_module_default.pagination, className), children: [
824
+ return /* @__PURE__ */ jsxs("div", { className: clsx19(Pagination_module_default.pagination, className), children: [
725
825
  !disableArrows && /* @__PURE__ */ jsx(
726
826
  "button",
727
827
  {
@@ -738,7 +838,7 @@ var Pagination = ({
738
838
  "button",
739
839
  {
740
840
  onClick: () => goToPage(page),
741
- className: clsx3(Pagination_module_default.page, {
841
+ className: clsx19(Pagination_module_default.page, {
742
842
  [Pagination_module_default.active]: activePage === page,
743
843
  [Pagination_module_default.number]: hasNumber
744
844
  }),
@@ -768,7 +868,7 @@ var Container_module_default = {
768
868
  var Container = forwardRef(
769
869
  (_a, ref) => {
770
870
  var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
771
- return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx3(Container_module_default.container, className) }, props), { children }));
871
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx19(Container_module_default.container, className) }, props), { children }));
772
872
  }
773
873
  );
774
874
  Container.displayName = "Container";
@@ -786,7 +886,7 @@ var PracticeCard_module_default = {
786
886
  };
787
887
  var PracticeCard = ({ className, title, cta, image }) => {
788
888
  const { url: href, isExternal } = cta != null ? cta : {};
789
- return /* @__PURE__ */ jsx("div", { className: clsx3(PracticeCard_module_default["practice-card"], className), children: /* @__PURE__ */ jsxs(
889
+ return /* @__PURE__ */ jsx("div", { className: clsx19(PracticeCard_module_default["practice-card"], className), children: /* @__PURE__ */ jsxs(
790
890
  ConditionalWrapper,
791
891
  __spreadProps(__spreadValues({
792
892
  className: PracticeCard_module_default.wrapper,
@@ -797,7 +897,7 @@ var PracticeCard = ({ className, title, cta, image }) => {
797
897
  children: [
798
898
  image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: PracticeCard_module_default.background }, image)),
799
899
  /* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.container, children: [
800
- title && /* @__PURE__ */ jsx("div", { className: clsx3(PracticeCard_module_default.title, "h3"), children: title }),
900
+ title && /* @__PURE__ */ jsx("div", { className: clsx19(PracticeCard_module_default.title, "h3"), children: title }),
801
901
  href && /* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.cta, children: [
802
902
  /* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaRest, type: "right" }),
803
903
  /* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaHover, type: "tiltedRight" })
@@ -884,13 +984,13 @@ var CardCollection = ({
884
984
  Container,
885
985
  {
886
986
  ref: container,
887
- className: clsx3(CardCollection_module_default["card-collection"], CardCollection_module_default[variant], className),
987
+ className: clsx19(CardCollection_module_default["card-collection"], CardCollection_module_default[variant], className),
888
988
  children: [
889
989
  /* @__PURE__ */ jsxs("div", { className: CardCollection_module_default.content, children: [
890
990
  titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
891
991
  subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
892
992
  ] }),
893
- /* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className: clsx3(CardCollection_module_default.cardWrapper, { [CardCollection_module_default["is-expanded"]]: isExpanded }), children: [
993
+ /* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className: clsx19(CardCollection_module_default.cardWrapper, { [CardCollection_module_default["is-expanded"]]: isExpanded }), children: [
894
994
  visibleCards.map((card, key) => /* @__PURE__ */ jsx(Card2, __spreadValues({ className: CardCollection_module_default.card }, card), key)),
895
995
  isExamCard && hiddenCards.length > 0 && /* @__PURE__ */ jsx("div", { ref: revealWrapper, className: CardCollection_module_default["reveal-wrapper"], children: /* @__PURE__ */ jsx("div", { className: CardCollection_module_default["reveal-inner"], children: hiddenCards.map((card, key) => /* @__PURE__ */ jsx(Card2, __spreadValues({ ref: extraCard, className: CardCollection_module_default.card }, card), key)) }) }),
896
996
  isExamCard && !isExpanded && ctaLabel && /* @__PURE__ */ jsx(
@@ -983,7 +1083,7 @@ var ContactModule = ({
983
1083
  },
984
1084
  { scope: containerRef, dependencies: [blurred, animateBlur] }
985
1085
  );
986
- return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: clsx3(ContactModule_module_default["contact-module"], className), children: [
1086
+ return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: clsx19(ContactModule_module_default["contact-module"], className), children: [
987
1087
  blurred && /* @__PURE__ */ jsx(
988
1088
  "div",
989
1089
  {
@@ -998,8 +1098,8 @@ var ContactModule = ({
998
1098
  /* @__PURE__ */ jsxs(Container, { className: ContactModule_module_default.container, children: [
999
1099
  /* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.wrapper, children: [
1000
1100
  /* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.content, children: [
1001
- titleNode && /* @__PURE__ */ jsx("div", { className: clsx3(ContactModule_module_default.title, "h1"), children: titleNode }),
1002
- subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx3(ContactModule_module_default.subtitle, "subheading"), children: subtitleNode })
1101
+ titleNode && /* @__PURE__ */ jsx("div", { className: clsx19(ContactModule_module_default.title, "h1"), children: titleNode }),
1102
+ subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx19(ContactModule_module_default.subtitle, "subheading"), children: subtitleNode })
1003
1103
  ] }),
1004
1104
  /* @__PURE__ */ jsx("div", { className: ContactModule_module_default["cta-wrapper"], children: ctas == null ? void 0 : ctas.map((cta, key) => /* @__PURE__ */ jsx(
1005
1105
  Button,
@@ -1060,7 +1160,7 @@ var Footer = ({
1060
1160
  disclaimer: FooterDisclaimer
1061
1161
  });
1062
1162
  const titleNode = (_a = slots.disclaimer) != null ? _a : disclaimer;
1063
- return /* @__PURE__ */ jsx("footer", { className: clsx3(Footer_module_default.footer, className), children: /* @__PURE__ */ jsxs(Container, { className: Footer_module_default.container, children: [
1163
+ return /* @__PURE__ */ jsx("footer", { className: clsx19(Footer_module_default.footer, className), children: /* @__PURE__ */ jsxs(Container, { className: Footer_module_default.container, children: [
1064
1164
  /* @__PURE__ */ jsxs("div", { className: Footer_module_default.bottom, children: [
1065
1165
  /* @__PURE__ */ jsxs("div", { className: Footer_module_default["bottom-left"], children: [
1066
1166
  supporters.length > 0 && /* @__PURE__ */ jsx("div", { className: Footer_module_default.supporters, children: /* @__PURE__ */ jsx("div", { className: Footer_module_default["supporters-logos"], children: supporters.map(
@@ -1076,7 +1176,7 @@ var Footer = ({
1076
1176
  index
1077
1177
  ) : /* @__PURE__ */ jsx("div", { className: Footer_module_default["supporter-link-primary"], children: /* @__PURE__ */ jsx(Picture, __spreadValues({}, supporter.image)) }, index)
1078
1178
  ) }) }),
1079
- titleNode && /* @__PURE__ */ jsx("div", { className: clsx3(Footer_module_default.disclaimer, "p"), children: titleNode }),
1179
+ titleNode && /* @__PURE__ */ jsx("div", { className: clsx19(Footer_module_default.disclaimer, "p"), children: titleNode }),
1080
1180
  copyright && /* @__PURE__ */ jsx("p", { className: Footer_module_default.copyright, children: copyright })
1081
1181
  ] }),
1082
1182
  columns.length > 0 && /* @__PURE__ */ jsx("nav", { className: Footer_module_default["bottom-right"], children: columns.map((column, colIndex) => /* @__PURE__ */ jsx("ul", { className: Footer_module_default["nav-list"], children: column.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
@@ -1137,22 +1237,20 @@ var HeroBanner = ({
1137
1237
  var _a, _b;
1138
1238
  const { is } = useViewPort_default();
1139
1239
  const isTabletBelow = is("tablet", "below");
1140
- const isDesktopBelow = is("desktop", "below");
1141
1240
  const vPageHeroBanner = variant === "pageHeroBanner";
1142
1241
  const vBannerPodcast = variant === "bannerPodcast";
1143
- const animated = brands && brands.logos && brands.logos.length >= 4 && isDesktopBelow;
1144
1242
  const slots = resolveCompoundSlots(children, {
1145
1243
  title: HeroBannerTitle,
1146
1244
  subtitle: HeroBannerSubtitle
1147
1245
  });
1148
1246
  const titleNode = (_a = slots.title) != null ? _a : title;
1149
1247
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1150
- return /* @__PURE__ */ jsxs("div", { className: clsx3(HeroBanner_module_default.heroBanner, HeroBanner_module_default[variant], className), children: [
1248
+ return /* @__PURE__ */ jsxs("div", { className: clsx19(HeroBanner_module_default.heroBanner, HeroBanner_module_default[variant], className), children: [
1151
1249
  /* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.container, children: [
1152
1250
  /* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.banner, children: [
1153
1251
  (titleNode || subtitleNode) && /* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.text, children: [
1154
- titleNode && /* @__PURE__ */ jsx("h1", { className: clsx3(HeroBanner_module_default.title, "h1"), children: titleNode }),
1155
- subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx3(HeroBanner_module_default.subtitle, "subtitle"), children: subtitleNode })
1252
+ titleNode && /* @__PURE__ */ jsx("h1", { className: clsx19(HeroBanner_module_default.title, "h1"), children: titleNode }),
1253
+ subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx19(HeroBanner_module_default.subtitle, "subtitle"), children: subtitleNode })
1156
1254
  ] }),
1157
1255
  cta && cta.length > 0 && !vBannerPodcast && /* @__PURE__ */ jsx("div", { className: HeroBanner_module_default.ctaContainer, children: cta.slice(0, 2).map((cta2, key) => {
1158
1256
  return /* @__PURE__ */ jsx(
@@ -1175,8 +1273,7 @@ var HeroBanner = ({
1175
1273
  __spreadValues({
1176
1274
  className: HeroBanner_module_default.brandsStrip,
1177
1275
  variant: "light",
1178
- size: isTabletBelow || vPageHeroBanner ? "small" : void 0,
1179
- animate: animated
1276
+ size: isTabletBelow || vPageHeroBanner ? "small" : void 0
1180
1277
  }, brands)
1181
1278
  ),
1182
1279
  backgroundImage && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: HeroBanner_module_default.backgroundImage }, backgroundImage))
@@ -1207,32 +1304,72 @@ var MiniBannerSubtitle = ({ children }) => {
1207
1304
  var MiniBanner_module_default = {
1208
1305
  minibanner: "MiniBanner_module_minibanner",
1209
1306
  background: "MiniBanner_module_background",
1210
- container: "MiniBanner_module_container",
1211
- miniBannerNoBG: "MiniBanner_module_miniBannerNoBG"
1307
+ textContainer: "MiniBanner_module_textContainer",
1308
+ logo: "MiniBanner_module_logo",
1309
+ headingWrapper: "MiniBanner_module_headingWrapper",
1310
+ title: "MiniBanner_module_title",
1311
+ ctaContainer: "MiniBanner_module_ctaContainer",
1312
+ miniBannerNoBG: "MiniBanner_module_miniBannerNoBG",
1313
+ miniBannerTextLeft: "MiniBanner_module_miniBannerTextLeft"
1314
+ };
1315
+ var MiniBannerPreTitle = ({ children }) => {
1316
+ return /* @__PURE__ */ jsx(Fragment, { children });
1212
1317
  };
1213
1318
  var MiniBanner = ({
1214
1319
  className,
1215
1320
  variant = "default",
1321
+ pretitle,
1216
1322
  title,
1217
1323
  subtitle,
1218
1324
  logo,
1219
1325
  background,
1326
+ cta,
1220
1327
  children
1221
1328
  }) => {
1222
- var _a, _b;
1329
+ var _a, _b, _c, _d, _e;
1223
1330
  const slots = resolveCompoundSlots(children, {
1331
+ pretitle: MiniBannerPreTitle,
1224
1332
  title: MiniBannerTitle,
1225
1333
  subtitle: MiniBannerSubtitle
1226
1334
  });
1227
- const titleNode = (_a = slots.title) != null ? _a : title;
1228
- const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1229
- return /* @__PURE__ */ jsxs("div", { className: clsx3(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
1230
- background && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
1231
- /* @__PURE__ */ jsxs(Container, { className: MiniBanner_module_default.container, children: [
1232
- logo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
1233
- titleNode && /* @__PURE__ */ jsx("div", { className: "h4", children: titleNode }),
1234
- subtitleNode && /* @__PURE__ */ jsx("div", { className: variant === "miniBannerNoBG" ? "subheading" : "h1", children: subtitleNode })
1235
- ] })
1335
+ const { is } = useViewPort_default();
1336
+ const isTabletBelow = is("tablet", "below");
1337
+ const isMiniBannerNoBG = variant === "miniBannerNoBG";
1338
+ const isMiniBannerTextLeft = variant === "miniBannerTextLeft";
1339
+ const pretitleNode = (_a = slots.pretitle) != null ? _a : pretitle;
1340
+ const titleNode = (_b = slots.title) != null ? _b : title;
1341
+ const subtitleNode = (_c = slots.subtitle) != null ? _c : subtitle;
1342
+ return /* @__PURE__ */ jsxs(Container, { className: clsx19(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
1343
+ ((background == null ? void 0 : background.src) || ((_d = background == null ? void 0 : background.desktop) == null ? void 0 : _d.src) || ((_e = background == null ? void 0 : background.mobile) == null ? void 0 : _e.src)) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
1344
+ /* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
1345
+ (logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
1346
+ pretitleNode && /* @__PURE__ */ jsx("div", { className: "small", children: pretitleNode }),
1347
+ /* @__PURE__ */ jsx("div", { className: MiniBanner_module_default.headingWrapper, children: titleNode && /* @__PURE__ */ jsx("div", { className: clsx19(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode }) }),
1348
+ subtitleNode && /* @__PURE__ */ jsx(
1349
+ "div",
1350
+ {
1351
+ className: clsx19(MiniBanner_module_default.title, {
1352
+ subheading: isMiniBannerNoBG || isMiniBannerTextLeft,
1353
+ h1: !isMiniBannerNoBG && !isMiniBannerTextLeft
1354
+ }),
1355
+ children: subtitleNode
1356
+ }
1357
+ )
1358
+ ] }),
1359
+ cta && cta.length > 0 && /* @__PURE__ */ jsx("div", { className: MiniBanner_module_default.ctaContainer, children: cta.slice(0, 2).map((cta2, key) => {
1360
+ return /* @__PURE__ */ jsx(
1361
+ Button,
1362
+ {
1363
+ href: cta2.url,
1364
+ isExternal: cta2.isExternal,
1365
+ variant: "secondary",
1366
+ fullWidth: isTabletBelow,
1367
+ logo: cta2.logo,
1368
+ children: cta2.label
1369
+ },
1370
+ key
1371
+ );
1372
+ }) })
1236
1373
  ] });
1237
1374
  };
1238
1375
 
@@ -1275,13 +1412,13 @@ var MiniSectionCta = ({
1275
1412
  });
1276
1413
  const titleNode = (_a = slots.title) != null ? _a : title;
1277
1414
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1278
- return /* @__PURE__ */ jsx("div", { className: clsx3(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], className), children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.wrapper, children: [
1415
+ return /* @__PURE__ */ jsx("div", { className: clsx19(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], className), children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.wrapper, children: [
1279
1416
  /* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.col, children: [
1280
1417
  titleNode && /* @__PURE__ */ jsx("h2", { className: variant === "BgColorBlack" || variant === "BgColorGrey" ? "h3" : "h2", children: titleNode }),
1281
1418
  subtitleNode && /* @__PURE__ */ jsx(
1282
1419
  "div",
1283
1420
  {
1284
- className: clsx3(MiniSectionCta_module_default.subtitle, variant === "infoCallout" ? "h4" : "subheading"),
1421
+ className: clsx19(MiniSectionCta_module_default.subtitle, variant === "infoCallout" ? "h4" : "subheading"),
1285
1422
  children: subtitleNode
1286
1423
  }
1287
1424
  )
@@ -1344,7 +1481,7 @@ var PracticePathCards = ({
1344
1481
  const titleNode = (_a = slots.title) != null ? _a : title;
1345
1482
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1346
1483
  const footerNode = (_c = slots.footer) != null ? _c : footer;
1347
- return /* @__PURE__ */ jsx("div", { className: clsx3(PracticePathCards_module_default["practice-path-cards"], className), children: /* @__PURE__ */ jsxs(Container, { className: PracticePathCards_module_default.container, children: [
1484
+ return /* @__PURE__ */ jsx("div", { className: clsx19(PracticePathCards_module_default["practice-path-cards"], className), children: /* @__PURE__ */ jsxs(Container, { className: PracticePathCards_module_default.container, children: [
1348
1485
  /* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.wrapper, children: [
1349
1486
  /* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.content, children: [
1350
1487
  titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
@@ -1398,8 +1535,8 @@ var Teaser5050With3Text = ({
1398
1535
  title: Teaser5050With3TextTitle
1399
1536
  });
1400
1537
  const titleNode = (_a = slots.title) != null ? _a : title;
1401
- return /* @__PURE__ */ jsx("div", { className: clsx3(Teaser5050With3Text_module_default["teaser5050-3text"], Teaser5050With3Text_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050With3Text_module_default.container, children: [
1402
- titleNode && /* @__PURE__ */ jsx("div", { className: clsx3(Teaser5050With3Text_module_default.title, "h3"), children: titleNode }),
1538
+ return /* @__PURE__ */ jsx("div", { className: clsx19(Teaser5050With3Text_module_default["teaser5050-3text"], Teaser5050With3Text_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050With3Text_module_default.container, children: [
1539
+ titleNode && /* @__PURE__ */ jsx("div", { className: clsx19(Teaser5050With3Text_module_default.title, "h3"), children: titleNode }),
1403
1540
  /* @__PURE__ */ jsxs("div", { className: Teaser5050With3Text_module_default.content, children: [
1404
1541
  /* @__PURE__ */ jsx("div", { className: Teaser5050With3Text_module_default.cards, children: cards == null ? void 0 : cards.map((card, key) => /* @__PURE__ */ jsx(InfoCard2, __spreadValues({}, card), key)) }),
1405
1542
  image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Teaser5050With3Text_module_default.image }, image))
@@ -1444,10 +1581,10 @@ var Teaser5050WithCta = ({
1444
1581
  });
1445
1582
  const titleNode = (_a = slots.title) != null ? _a : title;
1446
1583
  const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1447
- return /* @__PURE__ */ jsx("div", { className: clsx3(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
1584
+ return /* @__PURE__ */ jsx("div", { className: clsx19(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
1448
1585
  /* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.wrapper, children: [
1449
1586
  /* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.content, children: [
1450
- titleNode && /* @__PURE__ */ jsx("div", { className: clsx3(Teaser5050WithCta_module_default.title, "h3"), children: titleNode }),
1587
+ titleNode && /* @__PURE__ */ jsx("div", { className: clsx19(Teaser5050WithCta_module_default.title, "h3"), children: titleNode }),
1451
1588
  subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
1452
1589
  ] }),
1453
1590
  cta && /* @__PURE__ */ jsx(
@@ -1470,6 +1607,112 @@ var Teaser5050WithCta2 = Object.assign(Teaser5050WithCta, {
1470
1607
  Title: Teaser5050WithCtaTitle,
1471
1608
  Subtitle: Teaser5050WithCtaSubtitle
1472
1609
  });
1610
+
1611
+ // src/components/UpcomingEventCard/UpcomingEventCard.module.scss
1612
+ var UpcomingEventCard_module_default = {
1613
+ hidden: "UpcomingEventCard_module_hidden",
1614
+ image: "UpcomingEventCard_module_image",
1615
+ "text-content": "UpcomingEventCard_module_text-content",
1616
+ cta: "UpcomingEventCard_module_cta",
1617
+ date: "UpcomingEventCard_module_date",
1618
+ location: "UpcomingEventCard_module_location",
1619
+ description: "UpcomingEventCard_module_description"
1620
+ };
1621
+ var UpcomingEventCard = ({
1622
+ className,
1623
+ image,
1624
+ date,
1625
+ title,
1626
+ location,
1627
+ description,
1628
+ cta
1629
+ }) => {
1630
+ const { is } = useViewPort_default();
1631
+ const hasCtaWithoutImage = cta && cta.url && !image;
1632
+ const isBelowTablet = is("tablet", "below");
1633
+ const isBelowMobile = is("mobile-l", "below");
1634
+ return /* @__PURE__ */ jsxs("article", { className: clsx19(className), children: [
1635
+ image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx19(UpcomingEventCard_module_default.image, className) })),
1636
+ hasCtaWithoutImage && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: clsx19(isBelowTablet && UpcomingEventCard_module_default.hidden), href: cta.url, children: cta.label }),
1637
+ /* @__PURE__ */ jsxs("div", { className: clsx19(UpcomingEventCard_module_default["text-content"], className), children: [
1638
+ /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
1639
+ title && /* @__PURE__ */ jsx("h3", { children: title }),
1640
+ location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
1641
+ description && /* @__PURE__ */ jsx("div", { className: UpcomingEventCard_module_default.description, children: description }),
1642
+ cta && cta.url && /* @__PURE__ */ jsx(
1643
+ Button,
1644
+ {
1645
+ variant: "secondary",
1646
+ className: clsx19(!isBelowTablet && !image && UpcomingEventCard_module_default.hidden, UpcomingEventCard_module_default.cta),
1647
+ fullWidth: isBelowMobile,
1648
+ href: cta.url,
1649
+ children: cta.label
1650
+ }
1651
+ )
1652
+ ] })
1653
+ ] });
1654
+ };
1655
+
1656
+ // src/components/Carousel/Carousel.module.scss
1657
+ var Carousel_module_default = {
1658
+ "carousel-item": "Carousel_module_carousel-item"
1659
+ };
1660
+ var Carousel = (_a) => {
1661
+ var _b = _a, { slides, className } = _b, props = __objRest(_b, ["slides", "className"]);
1662
+ return /* @__PURE__ */ jsx(
1663
+ Swiper,
1664
+ __spreadProps(__spreadValues({
1665
+ className: clsx19(Carousel_module_default.carousel, className),
1666
+ spaceBetween: 0,
1667
+ slidesPerView: 1,
1668
+ modules: [FreeMode],
1669
+ freeMode: { enabled: true, sticky: false, momentum: true },
1670
+ wrapperTag: "ul",
1671
+ loop: false
1672
+ }, props), {
1673
+ children: slides.map((slide, index) => /* @__PURE__ */ jsx(SwiperSlide, { tag: "li", className: Carousel_module_default["carousel-item"], children: slide }, index))
1674
+ })
1675
+ );
1676
+ };
1677
+
1678
+ // src/widgets/EventList/EventList.module.scss
1679
+ var EventList_module_default = {
1680
+ section: "EventList_module_section",
1681
+ grey: "EventList_module_grey",
1682
+ "header-container": "EventList_module_header-container"
1683
+ };
1684
+ var EventListTitle = ({ children }) => {
1685
+ return /* @__PURE__ */ jsx(Fragment, { children });
1686
+ };
1687
+ var EventList = ({ className, title, items, cta, variant, children }) => {
1688
+ var _a;
1689
+ const { is } = useViewPort_default();
1690
+ const slots = resolveCompoundSlots(children, {
1691
+ title: EventListTitle
1692
+ });
1693
+ const titleNode = (_a = slots.title) != null ? _a : title;
1694
+ const isBelowTablet = is("tablet", "below");
1695
+ return /* @__PURE__ */ jsxs("section", { className: clsx19(EventList_module_default.section, variant && EventList_module_default[variant], className), children: [
1696
+ /* @__PURE__ */ jsxs("div", { className: EventList_module_default["header-container"], children: [
1697
+ titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
1698
+ cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: "rightBlack", children: cta.label })
1699
+ ] }),
1700
+ variant === "grey" && isBelowTablet && /* @__PURE__ */ jsx(
1701
+ Carousel,
1702
+ {
1703
+ className: EventList_module_default[variant],
1704
+ slides: items.map((item) => /* @__PURE__ */ jsx(UpcomingEventCard, __spreadValues({ className: variant }, item), item.title))
1705
+ }
1706
+ ),
1707
+ variant === "grey" && !isBelowTablet && /* @__PURE__ */ jsx("ul", { className: clsx19(EventList_module_default[variant]), children: items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx("li", { className: variant, children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { className: variant })) }, index)) }),
1708
+ !variant && /* @__PURE__ */ jsx("ul", { children: items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadValues({}, item)) }, index)) })
1709
+ ] });
1710
+ };
1711
+
1712
+ // src/widgets/EventList/index.ts
1713
+ var EventList2 = Object.assign(EventList, {
1714
+ Title: EventListTitle
1715
+ });
1473
1716
  function useIntersectionObserver({
1474
1717
  animateOnce = false,
1475
1718
  options = {}
@@ -1499,6 +1742,6 @@ function useIntersectionObserver({
1499
1742
  return { observeRef, isVisible };
1500
1743
  }
1501
1744
 
1502
- export { Anchor, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, Footer, HeroBanner2 as HeroBanner, Icon, InfoCard2 as InfoCard, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, resolveCompoundSlots, svgs, useIntersectionObserver };
1745
+ export { Anchor, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, Footer, HeroBanner2 as HeroBanner, Icon, InfoCard2 as InfoCard, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, resolveCompoundSlots, svgs, useIntersectionObserver };
1503
1746
  //# sourceMappingURL=index.mjs.map
1504
1747
  //# sourceMappingURL=index.mjs.map