@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.
@@ -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) {
@@ -7692,7 +7705,6 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7692
7705
  onDragStart: function onDragStart(e) {
7693
7706
  return e.preventDefault();
7694
7707
  },
7695
- key: "swipe-container-" + uniqueIdRef.current,
7696
7708
  className: "swipe"
7697
7709
  }, props), /*#__PURE__*/React__default.createElement(SwipeTrack, {
7698
7710
  className: "swipe-track-wrapper",
@@ -7701,9 +7713,9 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7701
7713
  onTransitionEnd: handleTransitionEnd
7702
7714
  }, slides.map(function (child, index) {
7703
7715
  var isVisible = visibleIndexes.includes(index);
7704
- return /*#__PURE__*/React__default.createElement("div", {
7716
+ return /*#__PURE__*/React__default.cloneElement(child, {
7705
7717
  key: "swipe-slide-" + uniqueIdRef.current + "-" + index,
7706
- "aria-hidden": !isVisible,
7718
+ ariaHidden: !isVisible,
7707
7719
  className: SWIPE_SLIDE_CLASS_NAME,
7708
7720
  ref: function ref(el) {
7709
7721
  childRefs.current[index] = el;
@@ -7711,9 +7723,9 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7711
7723
  onFocus: function onFocus() {
7712
7724
  return onSlideFocus(isVisible, index);
7713
7725
  },
7714
- onClickCapture: onClickCapture,
7715
- onClick: onClickCapture
7716
- }, child);
7726
+ onClick: onClickCapture,
7727
+ onClickCapture: onClickCapture
7728
+ });
7717
7729
  })));
7718
7730
  });
7719
7731
  Swipe.displayName = 'Swipe';
@@ -7830,7 +7842,12 @@ var Carousel = function Carousel(_ref) {
7830
7842
  slidesOffsetBefore: slidesOffsetBefore,
7831
7843
  role: "list",
7832
7844
  "aria-roledescription": "carousel"
7833
- }, React__default.Children.toArray(children)))));
7845
+ }, React__default.Children.toArray(children).map(function (child, index) {
7846
+ return /*#__PURE__*/React__default.createElement("div", {
7847
+ key: "carousel-slide-" + index,
7848
+ "aria-roledescription": "slide"
7849
+ }, child);
7850
+ })))));
7834
7851
  };
7835
7852
 
7836
7853
  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;