@royaloperahouse/harmonic 0.1.8-o → 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.
@@ -7522,6 +7522,19 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7522
7522
  var _useState5 = React.useState(infinite ? clonesCount : 0),
7523
7523
  currentIndex = _useState5[0],
7524
7524
  setCurrentIndex = _useState5[1];
7525
+ React.useEffect(function () {
7526
+ var handler = function handler(e) {
7527
+ if (isClickPrevented.current) {
7528
+ e.preventDefault();
7529
+ e.stopPropagation();
7530
+ }
7531
+ };
7532
+ var el = containerRef.current;
7533
+ el == null || el.addEventListener('click', handler, true);
7534
+ return function () {
7535
+ return el == null ? void 0 : el.removeEventListener('click', handler, true);
7536
+ };
7537
+ }, []);
7525
7538
  React.useEffect(function () {
7526
7539
  if (!onIndexChange) return;
7527
7540
  if (!infinite) {
@@ -7697,8 +7710,7 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7697
7710
  className: "swipe-track-wrapper",
7698
7711
  translateX: dragTranslateX !== null ? dragTranslateX : getTranslateX(),
7699
7712
  transitioning: transitioning && dragTranslateX === null,
7700
- onTransitionEnd: handleTransitionEnd,
7701
- onClickCapture: onClickCapture
7713
+ onTransitionEnd: handleTransitionEnd
7702
7714
  }, slides.map(function (child, index) {
7703
7715
  var isVisible = visibleIndexes.includes(index);
7704
7716
  return /*#__PURE__*/React__default.cloneElement(child, {
@@ -7710,7 +7722,9 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7710
7722
  },
7711
7723
  onFocus: function onFocus() {
7712
7724
  return onSlideFocus(isVisible, index);
7713
- }
7725
+ },
7726
+ onClick: onClickCapture,
7727
+ onClickCapture: onClickCapture
7714
7728
  });
7715
7729
  })));
7716
7730
  });