@digital-b2c/coreui-kit 0.7.2 → 0.7.3

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
@@ -1776,6 +1776,7 @@ var UpcomingEventCard_module_default = {
1776
1776
  description: "UpcomingEventCard_module_description",
1777
1777
  "event-card-footer": "UpcomingEventCard_module_event-card-footer",
1778
1778
  horizontal: "UpcomingEventCard_module_horizontal",
1779
+ "event-card-show-image": "UpcomingEventCard_module_event-card-show-image",
1779
1780
  "event-card-cta": "UpcomingEventCard_module_event-card-cta",
1780
1781
  hidden: "UpcomingEventCard_module_hidden",
1781
1782
  "cta-without-image": "UpcomingEventCard_module_cta-without-image",
@@ -1810,27 +1811,37 @@ var UpcomingEventCard = ({
1810
1811
  children: [
1811
1812
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
1812
1813
  showImage && image && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx20__default.default("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
1813
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("card-text-content", UpcomingEventCard_module_default["event-card-text-content"]), children: [
1814
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
1815
- title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: clsx20__default.default("card-text-title"), children: title }),
1816
- location && /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
1817
- description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx20__default.default("card-text-description", UpcomingEventCard_module_default.description), children: description }),
1818
- cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx(
1819
- Button,
1820
- {
1821
- variant: "secondary",
1822
- className: clsx20__default.default(
1823
- "card-cta",
1824
- UpcomingEventCard_module_default["event-card-cta"],
1825
- !hasCTAandImage && UpcomingEventCard_module_default.hidden
1826
- ),
1827
- fullWidth: isBelowMobile,
1828
- href: cta.url,
1829
- icon: cta.icon,
1830
- children: cta.label
1831
- }
1832
- )
1833
- ] })
1814
+ /* @__PURE__ */ jsxRuntime.jsxs(
1815
+ "div",
1816
+ {
1817
+ className: clsx20__default.default(
1818
+ "card-text-content",
1819
+ UpcomingEventCard_module_default["event-card-text-content"],
1820
+ (!showImage || !hasImage) && UpcomingEventCard_module_default["event-card-show-image"]
1821
+ ),
1822
+ children: [
1823
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
1824
+ title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: clsx20__default.default("card-text-title"), children: title }),
1825
+ location && /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
1826
+ description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx20__default.default("card-text-description", UpcomingEventCard_module_default.description), children: description }),
1827
+ cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx(
1828
+ Button,
1829
+ {
1830
+ variant: "secondary",
1831
+ className: clsx20__default.default(
1832
+ "card-cta",
1833
+ UpcomingEventCard_module_default["event-card-cta"],
1834
+ !hasCTAandImage && UpcomingEventCard_module_default.hidden
1835
+ ),
1836
+ fullWidth: isBelowMobile,
1837
+ href: cta.url,
1838
+ icon: cta.icon,
1839
+ children: cta.label
1840
+ }
1841
+ )
1842
+ ]
1843
+ }
1844
+ )
1834
1845
  ] }),
1835
1846
  cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx(
1836
1847
  "div",
@@ -1886,11 +1897,13 @@ var Carousel = (_a) => {
1886
1897
  var EventList_module_default = {
1887
1898
  "event-list-module": "EventList_module_event-list-module",
1888
1899
  "event-list-header-container": "EventList_module_event-list-header-container",
1900
+ "event-list-title": "EventList_module_event-list-title",
1889
1901
  "event-list-wrapper": "EventList_module_event-list-wrapper",
1890
1902
  vertical: "EventList_module_vertical",
1891
- grey: "EventList_module_grey",
1892
1903
  "card-list-item": "EventList_module_card-list-item",
1893
1904
  "card-item": "EventList_module_card-item",
1905
+ internalEventList: "EventList_module_internalEventList",
1906
+ "events-page": "EventList_module_events-page",
1894
1907
  horizontal: "EventList_module_horizontal",
1895
1908
  "carousel-wrapper": "EventList_module_carousel-wrapper",
1896
1909
  "carousel-list-item": "EventList_module_carousel-list-item",
@@ -1899,35 +1912,41 @@ var EventList_module_default = {
1899
1912
  var EventListTitle = ({ children }) => {
1900
1913
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1901
1914
  };
1902
- var EventList = ({ className, title, items, cta, variant, children }) => {
1915
+ var EventList = ({
1916
+ className,
1917
+ title,
1918
+ items,
1919
+ cta,
1920
+ backgroundColor,
1921
+ variant,
1922
+ children
1923
+ }) => {
1903
1924
  var _a;
1904
1925
  const { is } = useViewPort_default();
1905
1926
  const slots = resolveCompoundSlots(children, {
1906
1927
  title: EventListTitle
1907
1928
  });
1908
1929
  const titleNode = (_a = slots.title) != null ? _a : title;
1909
- const isGrey = variant === "grey";
1910
1930
  const isBelowTablet = is("tablet", "below");
1911
1931
  const cardDirection = isBelowTablet ? "vertical" : "horizontal";
1912
- const listDirection = isGrey ? "horizontal" : "vertical";
1932
+ const isInternalEventList = variant === "internalEventList";
1933
+ const listDirection = isInternalEventList ? "horizontal" : "vertical";
1913
1934
  return /* @__PURE__ */ jsxRuntime.jsx(
1914
1935
  "div",
1915
1936
  {
1916
- className: clsx20__default.default(
1917
- "event-list-module",
1918
- EventList_module_default["event-list-module"],
1919
- isGrey && EventList_module_default[variant],
1920
- className
1921
- ),
1937
+ className: clsx20__default.default("event-list-module", EventList_module_default["event-list-module"], className),
1938
+ style: {
1939
+ backgroundColor
1940
+ },
1922
1941
  children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx20__default.default(EventList_module_default["event-list-container"]), children: [
1923
1942
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
1924
- titleNode && /* @__PURE__ */ jsxRuntime.jsx("h2", { children: titleNode }),
1943
+ titleNode && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: clsx20__default.default(EventList_module_default["event-list-title"]), children: titleNode }),
1925
1944
  cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: cta.icon, children: cta.label })
1926
1945
  ] }),
1927
- isGrey && isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
1946
+ isInternalEventList && isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
1928
1947
  Carousel,
1929
1948
  {
1930
- wrapperClass: clsx20__default.default(EventList_module_default["carousel-wrapper"]),
1949
+ wrapperClass: clsx20__default.default(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
1931
1950
  slideClass: EventList_module_default["carousel-list-item"],
1932
1951
  spaceBetween: 16,
1933
1952
  slides: items.map((item) => {
@@ -1935,7 +1954,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
1935
1954
  return /* @__PURE__ */ jsxRuntime.jsx(
1936
1955
  UpcomingEventCard,
1937
1956
  __spreadValues({
1938
- className: isGrey && EventList_module_default["event-card"],
1957
+ className: clsx20__default.default(EventList_module_default["event-card"]),
1939
1958
  direction: "vertical",
1940
1959
  showImage: false
1941
1960
  }, item),
@@ -1944,7 +1963,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
1944
1963
  })
1945
1964
  }
1946
1965
  ),
1947
- isGrey && !isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: clsx20__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) => {
1966
+ isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: clsx20__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) => {
1948
1967
  var _a2, _b, _c;
1949
1968
  return /* @__PURE__ */ jsxRuntime.jsx(
1950
1969
  "li",
@@ -1953,7 +1972,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
1953
1972
  children: /* @__PURE__ */ jsxRuntime.jsx(
1954
1973
  UpcomingEventCard,
1955
1974
  __spreadProps(__spreadValues({}, item), {
1956
- className: isGrey && EventList_module_default["card-item"],
1975
+ className: clsx20__default.default(EventList_module_default["card-item"]),
1957
1976
  showImage: false,
1958
1977
  direction: "vertical"
1959
1978
  })
@@ -1962,7 +1981,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
1962
1981
  (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
1963
1982
  );
1964
1983
  }) }),
1965
- !isGrey && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: clsx20__default.default(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
1984
+ !isInternalEventList && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: clsx20__default.default(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
1966
1985
  var _a2, _b, _c;
1967
1986
  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);
1968
1987
  }) })