@ainias42/react-bootstrap-mobile 0.1.22 → 0.1.24

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @ainias42/react-bootstrap-mobile v0.1.21
3
+ * @ainias42/react-bootstrap-mobile v0.1.23
4
4
  * git+https://github.com/Ainias/Bootstrap-React-Mobile.git
5
5
  * Copyright (c) Silas Günther and project contributors.
6
6
  * This source code is licensed under the MIT license found in the
@@ -9918,42 +9918,42 @@ function Clickable(_a, ref) {
9918
9918
  onClickInner(e);
9919
9919
  }
9920
9920
  }, [clickData.onClick, onClickInner, preventDefault, stopPropagation]);
9921
- const onMouseDownInner = useListener('onMouseDown', clickData);
9922
- const realOnMouseDown = (0,external_react_.useCallback)(e => {
9923
- if (clickData.onMouseDown) {
9921
+ const onPointerDownInner = useListener('onPointerDown', clickData);
9922
+ const realOnPointerDown = (0,external_react_.useCallback)(e => {
9923
+ if (clickData.onPointerDown) {
9924
9924
  if (stopPropagation) {
9925
9925
  e.stopPropagation();
9926
9926
  }
9927
9927
  if (preventDefault) {
9928
9928
  e.preventDefault();
9929
9929
  }
9930
- onMouseDownInner(e);
9930
+ onPointerDownInner(e);
9931
9931
  }
9932
- }, [clickData.onMouseDown, onMouseDownInner, preventDefault, stopPropagation]);
9933
- const onMouseMoveInner = useListener('onMouseMove', clickData);
9934
- const realOnMouseMove = (0,external_react_.useCallback)(e => {
9935
- if (clickData.onMouseMove) {
9932
+ }, [clickData.onPointerDown, onPointerDownInner, preventDefault, stopPropagation]);
9933
+ const onPointerMoveInner = useListener('onPointerMove', clickData);
9934
+ const realOnPointerMove = (0,external_react_.useCallback)(e => {
9935
+ if (clickData.onPointerMove) {
9936
9936
  if (stopPropagation) {
9937
9937
  e.stopPropagation();
9938
9938
  }
9939
9939
  if (preventDefault) {
9940
9940
  e.preventDefault();
9941
9941
  }
9942
- onMouseMoveInner(e);
9942
+ onPointerMoveInner(e);
9943
9943
  }
9944
- }, [clickData.onMouseMove, onMouseMoveInner, preventDefault, stopPropagation]);
9945
- const onMouseUpInner = useListener('onMouseUp', clickData);
9946
- const realOnMouseUp = (0,external_react_.useCallback)(e => {
9947
- if (clickData.onMouseUp) {
9944
+ }, [clickData.onPointerMove, onPointerMoveInner, preventDefault, stopPropagation]);
9945
+ const onPointerUpInner = useListener('onPointerUp', clickData);
9946
+ const realOnPointerUp = (0,external_react_.useCallback)(e => {
9947
+ if (clickData.onPointerUp) {
9948
9948
  if (stopPropagation) {
9949
9949
  e.stopPropagation();
9950
9950
  }
9951
9951
  if (preventDefault) {
9952
9952
  e.preventDefault();
9953
9953
  }
9954
- onMouseUpInner(e);
9954
+ onPointerUpInner(e);
9955
9955
  }
9956
- }, [clickData.onMouseUp, onMouseUpInner, preventDefault, stopPropagation]);
9956
+ }, [clickData.onPointerUp, onPointerUpInner, preventDefault, stopPropagation]);
9957
9957
  const onClickCaptureInner = useListener('onClickCapture', clickData);
9958
9958
  const realOnClickCapture = (0,external_react_.useCallback)(e => {
9959
9959
  if (clickData.onClickCapture) {
@@ -10046,9 +10046,9 @@ function Clickable(_a, ref) {
10046
10046
  'aria-hidden': interactable ? undefined : true,
10047
10047
  className: classnames_default()((clickable_default()).clickable, className),
10048
10048
  onClick: realOnClick,
10049
- onMouseDown: realOnMouseDown,
10050
- onMouseMove: realOnMouseMove,
10051
- onMouseUp: realOnMouseUp,
10049
+ onPointerDown: realOnPointerDown,
10050
+ onPointerMove: realOnPointerMove,
10051
+ onPointerUp: realOnPointerUp,
10052
10052
  onClickCapture: realOnClickCapture,
10053
10053
  onDrop: realOnDrop,
10054
10054
  onDragOver: realOnDragOver,
@@ -22465,9 +22465,17 @@ const Menu = withMemo(withRenderBrowserOnly(function Menu({
22465
22465
  window === null || window === void 0 ? void 0 : window.addEventListener('mousedown', listener, {
22466
22466
  capture: true
22467
22467
  });
22468
- return () => window === null || window === void 0 ? void 0 : window.removeEventListener('mousedown', listener, {
22468
+ window === null || window === void 0 ? void 0 : window.addEventListener('touchstart', listener, {
22469
22469
  capture: true
22470
22470
  });
22471
+ return () => {
22472
+ window === null || window === void 0 ? void 0 : window.removeEventListener('mousedown', listener, {
22473
+ capture: true
22474
+ });
22475
+ window === null || window === void 0 ? void 0 : window.removeEventListener('touchstart', listener, {
22476
+ capture: true
22477
+ });
22478
+ };
22471
22479
  }
22472
22480
  return undefined;
22473
22481
  }, [isOpen, onClose, window]);