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