@rpg-engine/long-bow 0.8.58 → 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.
- package/dist/long-bow.cjs.development.js +21 -14
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +21 -14
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ConfirmModal.tsx +34 -19
package/dist/long-bow.esm.js
CHANGED
|
@@ -34041,33 +34041,40 @@ 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
|
-
|
|
34045
|
-
var handleConfirm = function handleConfirm(e) {
|
|
34044
|
+
var handleConfirm = useCallback(function (e) {
|
|
34046
34045
|
e.preventDefault();
|
|
34047
34046
|
e.stopPropagation();
|
|
34048
34047
|
onConfirm();
|
|
34049
|
-
};
|
|
34050
|
-
var handleClose = function
|
|
34048
|
+
}, [onConfirm]);
|
|
34049
|
+
var handleClose = useCallback(function (e) {
|
|
34051
34050
|
e.preventDefault();
|
|
34052
34051
|
e.stopPropagation();
|
|
34053
34052
|
onClose();
|
|
34054
|
-
};
|
|
34055
|
-
|
|
34053
|
+
}, [onClose]);
|
|
34054
|
+
// Fix type issues by separating event handlers for different event types
|
|
34055
|
+
var stopPropagationClick = useCallback(function (e) {
|
|
34056
34056
|
e.stopPropagation();
|
|
34057
|
-
};
|
|
34057
|
+
}, []);
|
|
34058
|
+
var stopPropagationTouch = useCallback(function (e) {
|
|
34059
|
+
e.stopPropagation();
|
|
34060
|
+
}, []);
|
|
34061
|
+
var stopPropagationPointer = useCallback(function (e) {
|
|
34062
|
+
e.stopPropagation();
|
|
34063
|
+
}, []);
|
|
34058
34064
|
return React.createElement(ModalPortal, null, React.createElement(GlobalStyle, null), React.createElement(Overlay$2, {
|
|
34059
|
-
|
|
34065
|
+
onPointerDown: handleClose
|
|
34060
34066
|
}), React.createElement(ModalContainer, null, React.createElement(ModalContent, {
|
|
34061
|
-
onClick:
|
|
34062
|
-
onTouchStart:
|
|
34063
|
-
onTouchEnd:
|
|
34064
|
-
onTouchMove:
|
|
34067
|
+
onClick: stopPropagationClick,
|
|
34068
|
+
onTouchStart: stopPropagationTouch,
|
|
34069
|
+
onTouchEnd: stopPropagationTouch,
|
|
34070
|
+
onTouchMove: stopPropagationTouch,
|
|
34071
|
+
onPointerDown: stopPropagationPointer
|
|
34065
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, {
|
|
34066
34073
|
buttonType: ButtonTypes.RPGUIButton,
|
|
34067
|
-
|
|
34074
|
+
onPointerDown: handleClose
|
|
34068
34075
|
}, "No")), React.createElement(Button, {
|
|
34069
34076
|
buttonType: ButtonTypes.RPGUIButton,
|
|
34070
|
-
|
|
34077
|
+
onPointerDown: handleConfirm
|
|
34071
34078
|
}, "Yes")))));
|
|
34072
34079
|
};
|
|
34073
34080
|
var Overlay$2 = /*#__PURE__*/styled.div.withConfig({
|