@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.
@@ -34045,32 +34045,46 @@ var ConfirmModal = function ConfirmModal(_ref) {
34045
34045
  onClose = _ref.onClose,
34046
34046
  _ref$message = _ref.message,
34047
34047
  message = _ref$message === void 0 ? 'Are you sure?' : _ref$message;
34048
- var handleConfirm = function handleConfirm() {
34048
+ var handleConfirm = React.useCallback(function (e) {
34049
+ e.preventDefault();
34050
+ e.stopPropagation();
34049
34051
  onConfirm();
34050
- };
34051
- var handleClose = function handleClose() {
34052
+ }, [onConfirm]);
34053
+ var handleClose = React.useCallback(function (e) {
34054
+ e.preventDefault();
34055
+ e.stopPropagation();
34052
34056
  onClose();
34053
- };
34054
- var stopPropagation = function stopPropagation(e) {
34057
+ }, [onClose]);
34058
+ // Fix type issues by separating event handlers for different event types
34059
+ var stopPropagationClick = React.useCallback(function (e) {
34055
34060
  e.stopPropagation();
34056
- };
34061
+ }, []);
34062
+ var stopPropagationTouch = React.useCallback(function (e) {
34063
+ e.stopPropagation();
34064
+ }, []);
34065
+ var stopPropagationPointer = React.useCallback(function (e) {
34066
+ e.stopPropagation();
34067
+ }, []);
34057
34068
  return React__default.createElement(ModalPortal, null, React__default.createElement(GlobalStyle, null), React__default.createElement(Overlay$2, {
34058
34069
  onPointerDown: handleClose
34059
34070
  }), React__default.createElement(ModalContainer, null, React__default.createElement(ModalContent, {
34060
- onClick: stopPropagation,
34061
- onTouchStart: stopPropagation
34071
+ onClick: stopPropagationClick,
34072
+ onTouchStart: stopPropagationTouch,
34073
+ onTouchEnd: stopPropagationTouch,
34074
+ onTouchMove: stopPropagationTouch,
34075
+ onPointerDown: stopPropagationPointer
34062
34076
  }, React__default.createElement(MessageContainer, null, typeof message === 'string' ? React__default.createElement(Message$1, null, message) : message), React__default.createElement(ButtonsContainer$2, null, React__default.createElement(CancelButtonWrapper, null, React__default.createElement(Button, {
34063
34077
  buttonType: exports.ButtonTypes.RPGUIButton,
34064
- onClick: handleClose
34078
+ onPointerDown: handleClose
34065
34079
  }, "No")), React__default.createElement(Button, {
34066
34080
  buttonType: exports.ButtonTypes.RPGUIButton,
34067
- onClick: handleConfirm
34081
+ onPointerDown: handleConfirm
34068
34082
  }, "Yes")))));
34069
34083
  };
34070
34084
  var Overlay$2 = /*#__PURE__*/styled__default.div.withConfig({
34071
34085
  displayName: "ConfirmModal__Overlay",
34072
34086
  componentId: "sc-11qkyu1-0"
34073
- })(["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;}}"]);
34087
+ })(["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;}}"]);
34074
34088
  var ModalContainer = /*#__PURE__*/styled__default.div.withConfig({
34075
34089
  displayName: "ConfirmModal__ModalContainer",
34076
34090
  componentId: "sc-11qkyu1-1"