@digital-b2c/coreui-kit 0.5.4 → 0.5.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.mjs CHANGED
@@ -1628,13 +1628,19 @@ var Teaser5050WithCta2 = Object.assign(Teaser5050WithCta, {
1628
1628
 
1629
1629
  // src/components/UpcomingEventCard/UpcomingEventCard.module.scss
1630
1630
  var UpcomingEventCard_module_default = {
1631
- hidden: "UpcomingEventCard_module_hidden",
1632
- image: "UpcomingEventCard_module_image",
1633
- "text-content": "UpcomingEventCard_module_text-content",
1634
- cta: "UpcomingEventCard_module_cta",
1631
+ "event-card": "UpcomingEventCard_module_event-card",
1632
+ "event-card-content": "UpcomingEventCard_module_event-card-content",
1633
+ "event-card-image": "UpcomingEventCard_module_event-card-image",
1634
+ "event-card-text-content": "UpcomingEventCard_module_event-card-text-content",
1635
1635
  date: "UpcomingEventCard_module_date",
1636
1636
  location: "UpcomingEventCard_module_location",
1637
- description: "UpcomingEventCard_module_description"
1637
+ description: "UpcomingEventCard_module_description",
1638
+ "event-card-footer": "UpcomingEventCard_module_event-card-footer",
1639
+ horizontal: "UpcomingEventCard_module_horizontal",
1640
+ "event-card-cta": "UpcomingEventCard_module_event-card-cta",
1641
+ hidden: "UpcomingEventCard_module_hidden",
1642
+ "cta-without-image": "UpcomingEventCard_module_cta-without-image",
1643
+ vertical: "UpcomingEventCard_module_vertical"
1638
1644
  };
1639
1645
  var UpcomingEventCard = ({
1640
1646
  className,
@@ -1643,38 +1649,74 @@ var UpcomingEventCard = ({
1643
1649
  title,
1644
1650
  location,
1645
1651
  description,
1646
- cta
1652
+ cta,
1653
+ direction = "horizontal",
1654
+ showImage = true
1647
1655
  }) => {
1648
1656
  const { is } = useViewPort_default();
1649
1657
  const hasCtaWithoutImage = cta && cta.url && !image;
1650
- const isBelowTablet = is("tablet", "below");
1658
+ const hasCTAandImage = Boolean(cta && cta.url && image);
1659
+ const hasImage = Boolean(image);
1651
1660
  const isBelowMobile = is("mobile-l", "below");
1652
- return /* @__PURE__ */ jsxs("article", { className: clsx19(className), children: [
1653
- image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx19(UpcomingEventCard_module_default.image, className) })),
1654
- hasCtaWithoutImage && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: clsx19(isBelowTablet && UpcomingEventCard_module_default.hidden), href: cta.url, children: cta.label }),
1655
- /* @__PURE__ */ jsxs("div", { className: clsx19(UpcomingEventCard_module_default["text-content"], className), children: [
1656
- /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
1657
- title && /* @__PURE__ */ jsx("h3", { children: title }),
1658
- location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
1659
- description && /* @__PURE__ */ jsx("div", { className: UpcomingEventCard_module_default.description, children: description }),
1660
- cta && cta.url && /* @__PURE__ */ jsx(
1661
- Button,
1662
- {
1663
- variant: "secondary",
1664
- className: clsx19(!isBelowTablet && !image && UpcomingEventCard_module_default.hidden, UpcomingEventCard_module_default.cta),
1665
- fullWidth: isBelowMobile,
1666
- href: cta.url,
1667
- children: cta.label
1668
- }
1669
- )
1670
- ] })
1671
- ] });
1661
+ return /* @__PURE__ */ jsxs(
1662
+ "article",
1663
+ {
1664
+ className: clsx19(
1665
+ "card",
1666
+ UpcomingEventCard_module_default["event-card"],
1667
+ UpcomingEventCard_module_default[direction],
1668
+ hasCtaWithoutImage && UpcomingEventCard_module_default["cta-without-image"],
1669
+ className
1670
+ ),
1671
+ children: [
1672
+ /* @__PURE__ */ jsxs("div", { className: clsx19("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
1673
+ showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx19("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
1674
+ /* @__PURE__ */ jsxs("div", { className: clsx19("card-text-content", UpcomingEventCard_module_default["event-card-text-content"]), children: [
1675
+ /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
1676
+ title && /* @__PURE__ */ jsx("h3", { className: clsx19("card-text-title"), children: title }),
1677
+ location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
1678
+ description && /* @__PURE__ */ jsx("div", { className: clsx19("card-text-description", UpcomingEventCard_module_default.description), children: description }),
1679
+ cta && cta.url && /* @__PURE__ */ jsx(
1680
+ Button,
1681
+ {
1682
+ variant: "secondary",
1683
+ className: clsx19(
1684
+ "card-cta",
1685
+ UpcomingEventCard_module_default["event-card-cta"],
1686
+ !hasCTAandImage && UpcomingEventCard_module_default.hidden
1687
+ ),
1688
+ fullWidth: isBelowMobile,
1689
+ href: cta.url,
1690
+ icon: cta.icon,
1691
+ children: cta.label
1692
+ }
1693
+ )
1694
+ ] })
1695
+ ] }),
1696
+ cta && cta.url && /* @__PURE__ */ jsx(
1697
+ "div",
1698
+ {
1699
+ className: clsx19("card-footer", UpcomingEventCard_module_default["event-card-footer"], hasImage && UpcomingEventCard_module_default.hidden),
1700
+ children: /* @__PURE__ */ jsx(
1701
+ Button,
1702
+ {
1703
+ variant: "secondary",
1704
+ className: clsx19("card-cta", UpcomingEventCard_module_default["event-card-cta"]),
1705
+ fullWidth: isBelowMobile,
1706
+ href: cta.url,
1707
+ icon: cta.icon,
1708
+ children: cta.label
1709
+ }
1710
+ )
1711
+ }
1712
+ )
1713
+ ]
1714
+ }
1715
+ );
1672
1716
  };
1673
1717
 
1674
1718
  // src/components/Carousel/Carousel.module.scss
1675
- var Carousel_module_default = {
1676
- "carousel-item": "Carousel_module_carousel-item"
1677
- };
1719
+ var Carousel_module_default = {};
1678
1720
  var Carousel = (_a) => {
1679
1721
  var _b = _a, { slides, className } = _b, props = __objRest(_b, ["slides", "className"]);
1680
1722
  return /* @__PURE__ */ jsx(
@@ -1682,22 +1724,38 @@ var Carousel = (_a) => {
1682
1724
  __spreadProps(__spreadValues({
1683
1725
  className: clsx19(Carousel_module_default.carousel, className),
1684
1726
  spaceBetween: 0,
1685
- slidesPerView: 1,
1727
+ slidesPerView: "auto",
1686
1728
  modules: [FreeMode],
1687
1729
  freeMode: { enabled: true, sticky: false, momentum: true },
1688
1730
  wrapperTag: "ul",
1689
1731
  loop: false
1690
1732
  }, props), {
1691
- children: slides.map((slide, index) => /* @__PURE__ */ jsx(SwiperSlide, { tag: "li", className: Carousel_module_default["carousel-item"], children: slide }, index))
1733
+ children: slides.map((slide, index) => /* @__PURE__ */ jsx(
1734
+ SwiperSlide,
1735
+ {
1736
+ tag: "li",
1737
+ className: clsx19(Carousel_module_default["carousel-item"], props.slideClass),
1738
+ children: slide
1739
+ },
1740
+ index
1741
+ ))
1692
1742
  })
1693
1743
  );
1694
1744
  };
1695
1745
 
1696
1746
  // src/widgets/EventList/EventList.module.scss
1697
1747
  var EventList_module_default = {
1698
- section: "EventList_module_section",
1748
+ "event-list-module": "EventList_module_event-list-module",
1749
+ "event-list-header-container": "EventList_module_event-list-header-container",
1750
+ "event-list-wrapper": "EventList_module_event-list-wrapper",
1751
+ vertical: "EventList_module_vertical",
1699
1752
  grey: "EventList_module_grey",
1700
- "header-container": "EventList_module_header-container"
1753
+ "card-list-item": "EventList_module_card-list-item",
1754
+ "card-item": "EventList_module_card-item",
1755
+ horizontal: "EventList_module_horizontal",
1756
+ "carousel-wrapper": "EventList_module_carousel-wrapper",
1757
+ "carousel-list-item": "EventList_module_carousel-list-item",
1758
+ "event-card": "EventList_module_event-card"
1701
1759
  };
1702
1760
  var EventListTitle = ({ children }) => {
1703
1761
  return /* @__PURE__ */ jsx(Fragment, { children });
@@ -1709,22 +1767,69 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
1709
1767
  title: EventListTitle
1710
1768
  });
1711
1769
  const titleNode = (_a = slots.title) != null ? _a : title;
1770
+ const isGrey = variant === "grey";
1712
1771
  const isBelowTablet = is("tablet", "below");
1713
- return /* @__PURE__ */ jsxs("section", { className: clsx19(EventList_module_default.section, variant && EventList_module_default[variant], className), children: [
1714
- /* @__PURE__ */ jsxs("div", { className: EventList_module_default["header-container"], children: [
1715
- titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
1716
- cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: "rightBlack", children: cta.label })
1717
- ] }),
1718
- variant === "grey" && isBelowTablet && /* @__PURE__ */ jsx(
1719
- Carousel,
1720
- {
1721
- className: EventList_module_default[variant],
1722
- slides: items.map((item) => /* @__PURE__ */ jsx(UpcomingEventCard, __spreadValues({ className: variant }, item), item.title))
1723
- }
1724
- ),
1725
- 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)) }),
1726
- !variant && /* @__PURE__ */ jsx("ul", { children: items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadValues({}, item)) }, index)) })
1727
- ] });
1772
+ const cardDirection = isBelowTablet ? "vertical" : "horizontal";
1773
+ const listDirection = isGrey ? "horizontal" : "vertical";
1774
+ return /* @__PURE__ */ jsx(
1775
+ "div",
1776
+ {
1777
+ className: clsx19(
1778
+ "event-list-module",
1779
+ EventList_module_default["event-list-module"],
1780
+ isGrey && EventList_module_default[variant],
1781
+ className
1782
+ ),
1783
+ children: /* @__PURE__ */ jsxs(Container, { className: clsx19(EventList_module_default["event-list-container"]), children: [
1784
+ /* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
1785
+ titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
1786
+ cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: cta.icon, children: cta.label })
1787
+ ] }),
1788
+ isGrey && isBelowTablet && /* @__PURE__ */ jsx(
1789
+ Carousel,
1790
+ {
1791
+ wrapperClass: clsx19(EventList_module_default["carousel-wrapper"]),
1792
+ slideClass: EventList_module_default["carousel-list-item"],
1793
+ spaceBetween: 16,
1794
+ slides: items.map((item) => {
1795
+ var _a2, _b;
1796
+ return /* @__PURE__ */ jsx(
1797
+ UpcomingEventCard,
1798
+ __spreadValues({
1799
+ className: isGrey && EventList_module_default["event-card"],
1800
+ direction: "vertical",
1801
+ showImage: false
1802
+ }, item),
1803
+ (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location
1804
+ );
1805
+ })
1806
+ }
1807
+ ),
1808
+ isGrey && !isBelowTablet && /* @__PURE__ */ jsx("ul", { className: clsx19(EventList_module_default["event-list-wrapper"], EventList_module_default["horizontal"], EventList_module_default[variant]), children: items == null ? void 0 : items.map((item, index) => {
1809
+ var _a2, _b, _c;
1810
+ return /* @__PURE__ */ jsx(
1811
+ "li",
1812
+ {
1813
+ className: clsx19(EventList_module_default["card-list-item"]),
1814
+ children: /* @__PURE__ */ jsx(
1815
+ UpcomingEventCard,
1816
+ __spreadProps(__spreadValues({}, item), {
1817
+ className: isGrey && EventList_module_default["card-item"],
1818
+ showImage: false,
1819
+ direction: "vertical"
1820
+ })
1821
+ )
1822
+ },
1823
+ (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
1824
+ );
1825
+ }) }),
1826
+ !isGrey && /* @__PURE__ */ jsx("ul", { className: clsx19(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
1827
+ var _a2, _b, _c;
1828
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { direction: cardDirection })) }, (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index);
1829
+ }) })
1830
+ ] })
1831
+ }
1832
+ );
1728
1833
  };
1729
1834
 
1730
1835
  // src/widgets/EventList/index.ts
@@ -1849,7 +1954,7 @@ var TextCenterCtaInBottom = ({
1849
1954
  titleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.title, children: titleNode }),
1850
1955
  subtitleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.subtitle, children: subtitleNode })
1851
1956
  ] }),
1852
- (ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsx(
1957
+ !!(ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsx(
1853
1958
  "div",
1854
1959
  {
1855
1960
  className: clsx19(