@rpg-engine/long-bow 0.8.56 → 0.8.58
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 +14 -6
- 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 +14 -6
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ConfirmModal.tsx +17 -6
|
@@ -34045,10 +34045,15 @@ 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
|
-
|
|
34048
|
+
// Add a small delay to prevent accidental closes
|
|
34049
|
+
var handleConfirm = function handleConfirm(e) {
|
|
34050
|
+
e.preventDefault();
|
|
34051
|
+
e.stopPropagation();
|
|
34049
34052
|
onConfirm();
|
|
34050
34053
|
};
|
|
34051
|
-
var handleClose = function handleClose() {
|
|
34054
|
+
var handleClose = function handleClose(e) {
|
|
34055
|
+
e.preventDefault();
|
|
34056
|
+
e.stopPropagation();
|
|
34052
34057
|
onClose();
|
|
34053
34058
|
};
|
|
34054
34059
|
var stopPropagation = function stopPropagation(e) {
|
|
@@ -34057,19 +34062,22 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
34057
34062
|
return React__default.createElement(ModalPortal, null, React__default.createElement(GlobalStyle, null), React__default.createElement(Overlay$2, {
|
|
34058
34063
|
onClick: handleClose
|
|
34059
34064
|
}), React__default.createElement(ModalContainer, null, React__default.createElement(ModalContent, {
|
|
34060
|
-
|
|
34065
|
+
onClick: stopPropagation,
|
|
34066
|
+
onTouchStart: stopPropagation,
|
|
34067
|
+
onTouchEnd: stopPropagation,
|
|
34068
|
+
onTouchMove: stopPropagation
|
|
34061
34069
|
}, 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, {
|
|
34062
34070
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
34063
|
-
|
|
34071
|
+
onClick: handleClose
|
|
34064
34072
|
}, "No")), React__default.createElement(Button, {
|
|
34065
34073
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
34066
|
-
|
|
34074
|
+
onClick: handleConfirm
|
|
34067
34075
|
}, "Yes")))));
|
|
34068
34076
|
};
|
|
34069
34077
|
var Overlay$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
34070
34078
|
displayName: "ConfirmModal__Overlay",
|
|
34071
34079
|
componentId: "sc-11qkyu1-0"
|
|
34072
|
-
})(["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;}}"]);
|
|
34080
|
+
})(["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;}}"]);
|
|
34073
34081
|
var ModalContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
34074
34082
|
displayName: "ConfirmModal__ModalContainer",
|
|
34075
34083
|
componentId: "sc-11qkyu1-1"
|