@royaloperahouse/harmonic 0.1.8-n → 0.1.8-p
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/harmonic.cjs.development.js +10 -17
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +10 -17
- package/dist/harmonic.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/harmonic.esm.js
CHANGED
|
@@ -7638,8 +7638,6 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7638
7638
|
var handleMouseMove = function handleMouseMove(e) {
|
|
7639
7639
|
if (!isDragging.current || !isMouseDown.current || transitioning) return;
|
|
7640
7640
|
var deltaX = e.clientX - startX.current;
|
|
7641
|
-
// eslint-disable-next-line no-console
|
|
7642
|
-
console.log('handleMouseMove', isClickPrevented.current, CLICK_DRAG_THRESHOLD, deltaX);
|
|
7643
7641
|
if (Math.abs(deltaX) > CLICK_DRAG_THRESHOLD) {
|
|
7644
7642
|
isClickPrevented.current = true;
|
|
7645
7643
|
}
|
|
@@ -7651,8 +7649,6 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7651
7649
|
if (!isMouseDown.current) return;
|
|
7652
7650
|
isMouseDown.current = false;
|
|
7653
7651
|
isDragging.current = false;
|
|
7654
|
-
// eslint-disable-next-line no-console
|
|
7655
|
-
console.log('handleMouseUp', isClickPrevented.current, CLICK_DRAG_THRESHOLD);
|
|
7656
7652
|
if (isClickPrevented.current) {
|
|
7657
7653
|
navigateOnSwipeEnd();
|
|
7658
7654
|
} else {
|
|
@@ -7670,8 +7666,6 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7670
7666
|
isMouseDown.current = true;
|
|
7671
7667
|
isClickPrevented.current = false;
|
|
7672
7668
|
setTransitioning(false);
|
|
7673
|
-
// eslint-disable-next-line no-console
|
|
7674
|
-
console.log('handleMouseDown', isClickPrevented, CLICK_DRAG_THRESHOLD);
|
|
7675
7669
|
window.addEventListener('mousemove', handleMouseMove);
|
|
7676
7670
|
window.addEventListener('mouseup', _handleMouseUp);
|
|
7677
7671
|
};
|
|
@@ -7693,6 +7687,10 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7693
7687
|
onTouchMove: handleTouchMove,
|
|
7694
7688
|
onTouchEnd: handleTouchEnd,
|
|
7695
7689
|
onMouseDown: handleMouseDown,
|
|
7690
|
+
onDragStart: function onDragStart(e) {
|
|
7691
|
+
return e.preventDefault();
|
|
7692
|
+
},
|
|
7693
|
+
key: "swipe-container-" + uniqueIdRef.current,
|
|
7696
7694
|
className: "swipe"
|
|
7697
7695
|
}, props), /*#__PURE__*/React__default.createElement(SwipeTrack, {
|
|
7698
7696
|
className: "swipe-track-wrapper",
|
|
@@ -7701,9 +7699,9 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7701
7699
|
onTransitionEnd: handleTransitionEnd
|
|
7702
7700
|
}, slides.map(function (child, index) {
|
|
7703
7701
|
var isVisible = visibleIndexes.includes(index);
|
|
7704
|
-
return /*#__PURE__*/React__default.
|
|
7702
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7705
7703
|
key: "swipe-slide-" + uniqueIdRef.current + "-" + index,
|
|
7706
|
-
|
|
7704
|
+
"aria-hidden": !isVisible,
|
|
7707
7705
|
className: SWIPE_SLIDE_CLASS_NAME,
|
|
7708
7706
|
ref: function ref(el) {
|
|
7709
7707
|
childRefs.current[index] = el;
|
|
@@ -7711,9 +7709,9 @@ var Swipe = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7711
7709
|
onFocus: function onFocus() {
|
|
7712
7710
|
return onSlideFocus(isVisible, index);
|
|
7713
7711
|
},
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
});
|
|
7712
|
+
onClickCapture: onClickCapture,
|
|
7713
|
+
onClick: onClickCapture
|
|
7714
|
+
}, child);
|
|
7717
7715
|
})));
|
|
7718
7716
|
});
|
|
7719
7717
|
Swipe.displayName = 'Swipe';
|
|
@@ -7830,12 +7828,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
7830
7828
|
slidesOffsetBefore: slidesOffsetBefore,
|
|
7831
7829
|
role: "list",
|
|
7832
7830
|
"aria-roledescription": "carousel"
|
|
7833
|
-
}, React__default.Children.toArray(children)
|
|
7834
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7835
|
-
key: "carousel-slide-" + index,
|
|
7836
|
-
"aria-roledescription": "slide"
|
|
7837
|
-
}, child);
|
|
7838
|
-
})))));
|
|
7831
|
+
}, React__default.Children.toArray(children)))));
|
|
7839
7832
|
};
|
|
7840
7833
|
|
|
7841
7834
|
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;
|