px-react-ui-components 1.1.13 → 1.1.15
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.
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
.react-confirm-alert-body {
|
|
32
32
|
font-family: "Nunito", sans-serif;
|
|
33
|
-
width:
|
|
34
|
-
max-width: 400px; /* Maksimum genişlik sınırı */
|
|
33
|
+
width: 500px; /* Daha geniş cihazlarda %90 genişlik */
|
|
35
34
|
padding: 20px;
|
|
36
35
|
text-align: left;
|
|
37
36
|
background: #fff;
|
|
@@ -44,8 +43,7 @@
|
|
|
44
43
|
|
|
45
44
|
@media (max-width: 600px) {
|
|
46
45
|
.react-confirm-alert-body {
|
|
47
|
-
width:
|
|
48
|
-
max-width: 320px; /* Maksimum genişlik daha küçük */
|
|
46
|
+
width: 370px; /* Küçük ekranlarda daha fazla boşluk */
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.MyAlertType = exports.MyAlert = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactDom = require("react-dom");
|
|
8
9
|
require("./MyAlert.css");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactDom = require("react-dom");
|
|
8
9
|
require("./MyModal.css");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -37,25 +38,25 @@ const MyModal = ({
|
|
|
37
38
|
(0, _react.useEffect)(() => {
|
|
38
39
|
if (!closeOnEsc) return;
|
|
39
40
|
const handleEsc = event => {
|
|
40
|
-
if (event.key ===
|
|
41
|
+
if (event.key === "Escape") {
|
|
41
42
|
onClose();
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
window.addEventListener(
|
|
45
|
+
window.addEventListener("keydown", handleEsc);
|
|
45
46
|
return () => {
|
|
46
|
-
window.removeEventListener(
|
|
47
|
+
window.removeEventListener("keydown", handleEsc);
|
|
47
48
|
};
|
|
48
49
|
}, [closeOnEsc, onClose]);
|
|
49
50
|
if (!show) {
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
const handleBackdropClick = e => {
|
|
53
|
-
if (closeOnBackdropClick && e.target.className.includes(
|
|
54
|
+
if (closeOnBackdropClick && e.target.className.includes("modal-overlay")) {
|
|
54
55
|
onClose();
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
|
-
|
|
58
|
-
className:
|
|
58
|
+
const modalContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
59
|
+
className: "modal-overlay " + (top ? "top" : ""),
|
|
59
60
|
onClick: handleBackdropClick,
|
|
60
61
|
style: {
|
|
61
62
|
paddingTop: top
|
|
@@ -83,5 +84,6 @@ const MyModal = ({
|
|
|
83
84
|
})]
|
|
84
85
|
})
|
|
85
86
|
});
|
|
87
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(modalContent, document.body);
|
|
86
88
|
};
|
|
87
89
|
var _default = exports.default = MyModal;
|