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