@digital-b2c/coreui-kit 0.7.3 → 0.7.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
@@ -5,7 +5,7 @@ import gsap$1, { gsap } from 'gsap';
5
5
  import { useGSAP } from '@gsap/react';
6
6
  import { ScrollTrigger } from 'gsap/ScrollTrigger';
7
7
  import { Swiper, SwiperSlide } from 'swiper/react';
8
- import { FreeMode, Navigation, Pagination as Pagination$1 } from 'swiper/modules';
8
+ import { FreeMode, A11y, Navigation, Pagination as Pagination$1 } from 'swiper/modules';
9
9
  import 'swiper/css';
10
10
 
11
11
  var __defProp = Object.defineProperty;
@@ -389,7 +389,8 @@ var Button = (_a) => {
389
389
  }, isLink ? { href, isExternal } : {}), rest);
390
390
  return /* @__PURE__ */ jsxs(ConditionalWrapper, __spreadProps(__spreadValues({ wrapper: Anchor, fallback: "button", condition: isLink }, props), { children: [
391
391
  children,
392
- logo ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Button_module_default.logo }, logo)) : icon && /* @__PURE__ */ jsx(Icon, { type: icon, className: Button_module_default.icon })
392
+ isExternal && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "(opens in a new tab)" }),
393
+ logo ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Button_module_default.logo }, logo)) : icon && /* @__PURE__ */ jsx(Icon, { type: icon, className: Button_module_default.icon, "aria-hidden": "true" })
393
394
  ] }));
394
395
  };
395
396
 
@@ -1828,6 +1829,7 @@ var UpcomingEventCard = ({
1828
1829
  fullWidth: isBelowMobile,
1829
1830
  href: cta.url,
1830
1831
  icon: cta.icon,
1832
+ isExternal: cta == null ? void 0 : cta.isExternal,
1831
1833
  children: cta.label
1832
1834
  }
1833
1835
  )
@@ -1847,6 +1849,7 @@ var UpcomingEventCard = ({
1847
1849
  fullWidth: isBelowMobile,
1848
1850
  href: cta.url,
1849
1851
  icon: cta.icon,
1852
+ isExternal: cta == null ? void 0 : cta.isExternal,
1850
1853
  children: cta.label
1851
1854
  }
1852
1855
  )
@@ -1860,22 +1863,35 @@ var UpcomingEventCard = ({
1860
1863
  // src/components/Carousel/Carousel.module.scss
1861
1864
  var Carousel_module_default = {};
1862
1865
  var Carousel = (_a) => {
1863
- var _b = _a, { slides, className } = _b, props = __objRest(_b, ["slides", "className"]);
1866
+ var _b = _a, {
1867
+ slides,
1868
+ className,
1869
+ ariaLabel = "Carousel"
1870
+ } = _b, props = __objRest(_b, [
1871
+ "slides",
1872
+ "className",
1873
+ "ariaLabel"
1874
+ ]);
1864
1875
  return /* @__PURE__ */ jsx(
1865
1876
  Swiper,
1866
1877
  __spreadProps(__spreadValues({
1878
+ a11y: {
1879
+ enabled: true,
1880
+ containerMessage: ariaLabel,
1881
+ containerRoleDescriptionMessage: "carousel"
1882
+ },
1883
+ role: "region",
1884
+ "aria-label": ariaLabel,
1867
1885
  className: clsx20(Carousel_module_default.carousel, className),
1868
1886
  spaceBetween: 0,
1869
1887
  slidesPerView: "auto",
1870
- modules: [FreeMode],
1888
+ modules: [FreeMode, A11y],
1871
1889
  freeMode: { enabled: true, sticky: false, momentum: true },
1872
- wrapperTag: "ul",
1873
1890
  loop: false
1874
1891
  }, props), {
1875
1892
  children: slides.map((slide, index) => /* @__PURE__ */ jsx(
1876
1893
  SwiperSlide,
1877
1894
  {
1878
- tag: "li",
1879
1895
  className: clsx20(Carousel_module_default["carousel-item"], props.slideClass),
1880
1896
  children: slide
1881
1897
  },
@@ -1933,11 +1949,22 @@ var EventList = ({
1933
1949
  children: /* @__PURE__ */ jsxs(Container, { className: clsx20(EventList_module_default["event-list-container"]), children: [
1934
1950
  /* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
1935
1951
  titleNode && /* @__PURE__ */ jsx("h2", { className: clsx20(EventList_module_default["event-list-title"]), children: titleNode }),
1936
- cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: cta.icon, children: cta.label })
1952
+ cta && cta.url && /* @__PURE__ */ jsx(
1953
+ Button,
1954
+ {
1955
+ className: EventList_module_default.cta,
1956
+ variant: "nofillblack",
1957
+ href: cta.url,
1958
+ icon: cta.icon,
1959
+ isExternal: cta == null ? void 0 : cta.isExternal,
1960
+ children: cta.label
1961
+ }
1962
+ )
1937
1963
  ] }),
1938
1964
  isInternalEventList && isBelowTablet && /* @__PURE__ */ jsx(
1939
1965
  Carousel,
1940
1966
  {
1967
+ "aria-label": "Upcoming events",
1941
1968
  wrapperClass: clsx20(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
1942
1969
  slideClass: EventList_module_default["carousel-list-item"],
1943
1970
  spaceBetween: 16,
@@ -1955,28 +1982,42 @@ var EventList = ({
1955
1982
  })
1956
1983
  }
1957
1984
  ),
1958
- isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsx("ul", { className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default["horizontal"], EventList_module_default[variant]), children: items == null ? void 0 : items.map((item, index) => {
1959
- var _a2, _b, _c;
1960
- return /* @__PURE__ */ jsx(
1961
- "li",
1962
- {
1963
- className: clsx20(EventList_module_default["card-list-item"]),
1964
- children: /* @__PURE__ */ jsx(
1965
- UpcomingEventCard,
1966
- __spreadProps(__spreadValues({}, item), {
1967
- className: clsx20(EventList_module_default["card-item"]),
1968
- showImage: false,
1969
- direction: "vertical"
1970
- })
1971
- )
1972
- },
1973
- (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
1974
- );
1975
- }) }),
1976
- !isInternalEventList && /* @__PURE__ */ jsx("ul", { className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
1977
- var _a2, _b, _c;
1978
- 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);
1979
- }) })
1985
+ isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsx(
1986
+ "ul",
1987
+ {
1988
+ "aria-label": "Upcoming events",
1989
+ className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default["horizontal"], EventList_module_default[variant]),
1990
+ children: items == null ? void 0 : items.map((item, index) => {
1991
+ var _a2, _b, _c;
1992
+ return /* @__PURE__ */ jsx(
1993
+ "li",
1994
+ {
1995
+ className: clsx20(EventList_module_default["card-list-item"]),
1996
+ children: /* @__PURE__ */ jsx(
1997
+ UpcomingEventCard,
1998
+ __spreadProps(__spreadValues({}, item), {
1999
+ className: clsx20(EventList_module_default["card-item"]),
2000
+ showImage: false,
2001
+ direction: "vertical"
2002
+ })
2003
+ )
2004
+ },
2005
+ (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
2006
+ );
2007
+ })
2008
+ }
2009
+ ),
2010
+ !isInternalEventList && /* @__PURE__ */ jsx(
2011
+ "ul",
2012
+ {
2013
+ "aria-label": "Upcoming events",
2014
+ className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
2015
+ children: items == null ? void 0 : items.map((item, index) => {
2016
+ var _a2, _b, _c;
2017
+ 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);
2018
+ })
2019
+ }
2020
+ )
1980
2021
  ] })
1981
2022
  }
1982
2023
  );