dce-reactkit 3.7.10-beta.1 → 3.7.10-beta.3

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/cjs/index.js CHANGED
@@ -314,6 +314,9 @@ const initClient = (opts) => {
314
314
  /*------------------------------------------------------------------------*/
315
315
  /* ------------------------------ Constants ----------------------------- */
316
316
  /*------------------------------------------------------------------------*/
317
+ // Base level of z-index
318
+ const BASE_Z_INDEX = 1000000000;
319
+ const BASE_Z_INDEX_ON_TOP = 2000000000;
317
320
  // Constants
318
321
  const MS_TO_ANIMATE = 200; // Animation duration
319
322
  // Modal type to list of buttons
@@ -533,6 +536,10 @@ const Modal$1 = (props) => {
533
536
  /*------------------------------------------------------------------------*/
534
537
  /* ------------------------------- Render ------------------------------- */
535
538
  /*------------------------------------------------------------------------*/
539
+ // Calculate Z-index
540
+ const baseZIndex = (onTopOfOtherModals
541
+ ? BASE_Z_INDEX_ON_TOP
542
+ : BASE_Z_INDEX);
536
543
  // Get list of buttons for this modal type
537
544
  const ModalButtonTypes = (_a = modalTypeToModalButtonTypes[type]) !== null && _a !== void 0 ? _a : [];
538
545
  // Get map of button type to label and variant
@@ -573,9 +580,7 @@ const Modal$1 = (props) => {
573
580
  }
574
581
  // Render the modal
575
582
  return (React__default["default"].createElement("div", { className: "modal show", tabIndex: -1, style: {
576
- zIndex: (onTopOfOtherModals
577
- ? 5000000001
578
- : 5000000000),
583
+ zIndex: baseZIndex,
579
584
  display: 'block',
580
585
  margin: 'auto',
581
586
  left: 0,
@@ -583,7 +588,7 @@ const Modal$1 = (props) => {
583
588
  } },
584
589
  React__default["default"].createElement("style", null, style$a),
585
590
  React__default["default"].createElement("div", { className: `ModalForWrapper-backdrop ${backdropAnimationClass}`, style: {
586
- zIndex: 5000000003,
591
+ zIndex: baseZIndex + 1,
587
592
  }, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
588
593
  // Skip if exit via backdrop not allowed
589
594
  if (dontAllowBackdropExit || !onClose) {
@@ -600,7 +605,7 @@ const Modal$1 = (props) => {
600
605
  handleClose(ModalButtonType$1.Cancel);
601
606
  }) }),
602
607
  React__default["default"].createElement("div", { className: `modal-dialog modal-${size} ${animationClass} modal-dialog-scrollable modal-dialog-centered`, style: {
603
- zIndex: 5000000002,
608
+ zIndex: baseZIndex + 2,
604
609
  } },
605
610
  React__default["default"].createElement("div", { className: "modal-content", style: {
606
611
  borderColor: (isDarkModeOn()