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