dce-reactkit 3.7.10-beta.2 → 3.7.10-beta.4
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/esm/index.js
CHANGED
|
@@ -288,6 +288,9 @@ const initClient = (opts) => {
|
|
|
288
288
|
/*------------------------------------------------------------------------*/
|
|
289
289
|
/* ------------------------------ Constants ----------------------------- */
|
|
290
290
|
/*------------------------------------------------------------------------*/
|
|
291
|
+
// Base level of z-index
|
|
292
|
+
const BASE_Z_INDEX = 1000000000;
|
|
293
|
+
const BASE_Z_INDEX_ON_TOP = 2000000000;
|
|
291
294
|
// Constants
|
|
292
295
|
const MS_TO_ANIMATE = 200; // Animation duration
|
|
293
296
|
// Modal type to list of buttons
|
|
@@ -507,6 +510,10 @@ const Modal$1 = (props) => {
|
|
|
507
510
|
/*------------------------------------------------------------------------*/
|
|
508
511
|
/* ------------------------------- Render ------------------------------- */
|
|
509
512
|
/*------------------------------------------------------------------------*/
|
|
513
|
+
// Calculate Z-index
|
|
514
|
+
const baseZIndex = (onTopOfOtherModals
|
|
515
|
+
? BASE_Z_INDEX_ON_TOP
|
|
516
|
+
: BASE_Z_INDEX);
|
|
510
517
|
// Get list of buttons for this modal type
|
|
511
518
|
const ModalButtonTypes = (_a = modalTypeToModalButtonTypes[type]) !== null && _a !== void 0 ? _a : [];
|
|
512
519
|
// Get map of button type to label and variant
|
|
@@ -547,9 +554,7 @@ const Modal$1 = (props) => {
|
|
|
547
554
|
}
|
|
548
555
|
// Render the modal
|
|
549
556
|
return (React__default.createElement("div", { className: "modal show", tabIndex: -1, style: {
|
|
550
|
-
zIndex:
|
|
551
|
-
? 2000000001
|
|
552
|
-
: 2000000000),
|
|
557
|
+
zIndex: baseZIndex,
|
|
553
558
|
display: 'block',
|
|
554
559
|
margin: 'auto',
|
|
555
560
|
left: 0,
|
|
@@ -557,7 +562,7 @@ const Modal$1 = (props) => {
|
|
|
557
562
|
} },
|
|
558
563
|
React__default.createElement("style", null, style$a),
|
|
559
564
|
React__default.createElement("div", { className: `ModalForWrapper-backdrop ${backdropAnimationClass}`, style: {
|
|
560
|
-
zIndex:
|
|
565
|
+
zIndex: baseZIndex + 1,
|
|
561
566
|
}, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
562
567
|
// Skip if exit via backdrop not allowed
|
|
563
568
|
if (dontAllowBackdropExit || !onClose) {
|
|
@@ -574,7 +579,7 @@ const Modal$1 = (props) => {
|
|
|
574
579
|
handleClose(ModalButtonType$1.Cancel);
|
|
575
580
|
}) }),
|
|
576
581
|
React__default.createElement("div", { className: `modal-dialog modal-${size} ${animationClass} modal-dialog-scrollable modal-dialog-centered`, style: {
|
|
577
|
-
zIndex:
|
|
582
|
+
zIndex: baseZIndex + 2,
|
|
578
583
|
} },
|
|
579
584
|
React__default.createElement("div", { className: "modal-content", style: {
|
|
580
585
|
borderColor: (isDarkModeOn()
|
|
@@ -1197,7 +1202,7 @@ const AppWrapper = (props) => {
|
|
|
1197
1202
|
if (onConfirmClosed) {
|
|
1198
1203
|
onConfirmClosed(buttonType === ModalButtonType$1.Okay);
|
|
1199
1204
|
}
|
|
1200
|
-
}, dontAllowBackdropExit: true }, confirmInfo.text));
|
|
1205
|
+
}, onTopOfOtherModals: true, dontAllowBackdropExit: true }, confirmInfo.text));
|
|
1201
1206
|
}
|
|
1202
1207
|
/* ---------- Custom Modals --------- */
|
|
1203
1208
|
// List of modals added outside reactkit via the Modal component
|