@rpg-engine/long-bow 0.8.59 → 0.8.60

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.
@@ -34041,32 +34041,46 @@ var ConfirmModal = function ConfirmModal(_ref) {
34041
34041
  onClose = _ref.onClose,
34042
34042
  _ref$message = _ref.message,
34043
34043
  message = _ref$message === void 0 ? 'Are you sure?' : _ref$message;
34044
- var handleConfirm = function handleConfirm() {
34044
+ var handleConfirm = useCallback(function (e) {
34045
+ e.preventDefault();
34046
+ e.stopPropagation();
34045
34047
  onConfirm();
34046
- };
34047
- var handleClose = function handleClose() {
34048
+ }, [onConfirm]);
34049
+ var handleClose = useCallback(function (e) {
34050
+ e.preventDefault();
34051
+ e.stopPropagation();
34048
34052
  onClose();
34049
- };
34050
- var stopPropagation = function stopPropagation(e) {
34053
+ }, [onClose]);
34054
+ // Fix type issues by separating event handlers for different event types
34055
+ var stopPropagationClick = useCallback(function (e) {
34051
34056
  e.stopPropagation();
34052
- };
34057
+ }, []);
34058
+ var stopPropagationTouch = useCallback(function (e) {
34059
+ e.stopPropagation();
34060
+ }, []);
34061
+ var stopPropagationPointer = useCallback(function (e) {
34062
+ e.stopPropagation();
34063
+ }, []);
34053
34064
  return React.createElement(ModalPortal, null, React.createElement(GlobalStyle, null), React.createElement(Overlay$2, {
34054
34065
  onPointerDown: handleClose
34055
34066
  }), React.createElement(ModalContainer, null, React.createElement(ModalContent, {
34056
- onClick: stopPropagation,
34057
- onTouchStart: stopPropagation
34067
+ onClick: stopPropagationClick,
34068
+ onTouchStart: stopPropagationTouch,
34069
+ onTouchEnd: stopPropagationTouch,
34070
+ onTouchMove: stopPropagationTouch,
34071
+ onPointerDown: stopPropagationPointer
34058
34072
  }, React.createElement(MessageContainer, null, typeof message === 'string' ? React.createElement(Message$1, null, message) : message), React.createElement(ButtonsContainer$2, null, React.createElement(CancelButtonWrapper, null, React.createElement(Button, {
34059
34073
  buttonType: ButtonTypes.RPGUIButton,
34060
- onClick: handleClose
34074
+ onPointerDown: handleClose
34061
34075
  }, "No")), React.createElement(Button, {
34062
34076
  buttonType: ButtonTypes.RPGUIButton,
34063
- onClick: handleConfirm
34077
+ onPointerDown: handleConfirm
34064
34078
  }, "Yes")))));
34065
34079
  };
34066
34080
  var Overlay$2 = /*#__PURE__*/styled.div.withConfig({
34067
34081
  displayName: "ConfirmModal__Overlay",
34068
34082
  componentId: "sc-11qkyu1-0"
34069
- })(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:1000;animation:fadeIn 0.2s ease-out;cursor:pointer;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]);
34083
+ })(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:1000;animation:fadeIn 0.2s ease-out;cursor:pointer;touch-action:none;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]);
34070
34084
  var ModalContainer = /*#__PURE__*/styled.div.withConfig({
34071
34085
  displayName: "ConfirmModal__ModalContainer",
34072
34086
  componentId: "sc-11qkyu1-1"