@royaloperahouse/harmonic 0.1.8-p → 0.1.8-q

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.
@@ -7520,6 +7520,19 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
7520
7520
  var _useState5 = useState(infinite ? clonesCount : 0),
7521
7521
  currentIndex = _useState5[0],
7522
7522
  setCurrentIndex = _useState5[1];
7523
+ useEffect(function () {
7524
+ var handler = function handler(e) {
7525
+ if (isClickPrevented.current) {
7526
+ e.preventDefault();
7527
+ e.stopPropagation();
7528
+ }
7529
+ };
7530
+ var el = containerRef.current;
7531
+ el == null || el.addEventListener('click', handler, true);
7532
+ return function () {
7533
+ return el == null ? void 0 : el.removeEventListener('click', handler, true);
7534
+ };
7535
+ }, []);
7523
7536
  useEffect(function () {
7524
7537
  if (!onIndexChange) return;
7525
7538
  if (!infinite) {
@@ -7690,7 +7703,6 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
7690
7703
  onDragStart: function onDragStart(e) {
7691
7704
  return e.preventDefault();
7692
7705
  },
7693
- key: "swipe-container-" + uniqueIdRef.current,
7694
7706
  className: "swipe"
7695
7707
  }, props), /*#__PURE__*/React__default.createElement(SwipeTrack, {
7696
7708
  className: "swipe-track-wrapper",
@@ -7699,9 +7711,9 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
7699
7711
  onTransitionEnd: handleTransitionEnd
7700
7712
  }, slides.map(function (child, index) {
7701
7713
  var isVisible = visibleIndexes.includes(index);
7702
- return /*#__PURE__*/React__default.createElement("div", {
7714
+ return /*#__PURE__*/React__default.cloneElement(child, {
7703
7715
  key: "swipe-slide-" + uniqueIdRef.current + "-" + index,
7704
- "aria-hidden": !isVisible,
7716
+ ariaHidden: !isVisible,
7705
7717
  className: SWIPE_SLIDE_CLASS_NAME,
7706
7718
  ref: function ref(el) {
7707
7719
  childRefs.current[index] = el;
@@ -7709,9 +7721,9 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
7709
7721
  onFocus: function onFocus() {
7710
7722
  return onSlideFocus(isVisible, index);
7711
7723
  },
7712
- onClickCapture: onClickCapture,
7713
- onClick: onClickCapture
7714
- }, child);
7724
+ onClick: onClickCapture,
7725
+ onClickCapture: onClickCapture
7726
+ });
7715
7727
  })));
7716
7728
  });
7717
7729
  Swipe.displayName = 'Swipe';
@@ -7828,7 +7840,12 @@ var Carousel = function Carousel(_ref) {
7828
7840
  slidesOffsetBefore: slidesOffsetBefore,
7829
7841
  role: "list",
7830
7842
  "aria-roledescription": "carousel"
7831
- }, React__default.Children.toArray(children)))));
7843
+ }, React__default.Children.toArray(children).map(function (child, index) {
7844
+ return /*#__PURE__*/React__default.createElement("div", {
7845
+ key: "carousel-slide-" + index,
7846
+ "aria-roledescription": "slide"
7847
+ }, child);
7848
+ })))));
7832
7849
  };
7833
7850
 
7834
7851
  var _templateObject$P, _templateObject2$C, _templateObject3$p, _templateObject4$k, _templateObject5$f, _templateObject6$d, _templateObject7$8, _templateObject8$6, _templateObject9$3, _templateObject10$3, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16, _templateObject17;