dce-reactkit 3.7.9 → 3.7.10-beta.0
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 +27 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/AppWrapper.d.ts +21 -0
- package/dist/cjs/types/components/Modal/ModalForWrapper.d.ts +9 -0
- package/dist/cjs/types/components/{Modal.d.ts → Modal/ModalProps.d.ts} +9 -9
- package/dist/cjs/types/components/Modal/index.d.ts +8 -0
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/esm/index.js +27 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AppWrapper.d.ts +21 -0
- package/dist/esm/types/components/Modal/ModalForWrapper.d.ts +9 -0
- package/dist/esm/types/components/{Modal.d.ts → Modal/ModalProps.d.ts} +9 -9
- package/dist/esm/types/components/Modal/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/index.d.ts +117 -110
- package/package.json +1 -1
- package/src/components/AppWrapper.tsx +125 -1
- package/src/components/IntelliTable.tsx +1 -1
- package/src/components/{Modal.tsx → Modal/ModalForWrapper.tsx} +22 -83
- package/src/components/Modal/ModalProps.ts +72 -0
- package/src/components/Modal/index.tsx +105 -0
- package/src/index.ts +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -413,7 +413,7 @@ const getModalButtonTypeToLabelAndVariant = () => {
|
|
|
413
413
|
/* -------------------------------- Style ------------------------------- */
|
|
414
414
|
/*------------------------------------------------------------------------*/
|
|
415
415
|
const style$a = `
|
|
416
|
-
.
|
|
416
|
+
.ModalForWrapper-backdrop {
|
|
417
417
|
position: fixed;
|
|
418
418
|
top: 0;
|
|
419
419
|
left: 0;
|
|
@@ -421,7 +421,7 @@ const style$a = `
|
|
|
421
421
|
height: 200vh;
|
|
422
422
|
background-color: rgba(0, 0, 0, 0.7);
|
|
423
423
|
}
|
|
424
|
-
.
|
|
424
|
+
.ModalForWrapper-fading-in {
|
|
425
425
|
animation-name: Modal-fading-in;
|
|
426
426
|
animation-duration: ${Math.floor(MS_TO_ANIMATE * 2)}ms;
|
|
427
427
|
animation-iteration-count: 1;
|
|
@@ -436,7 +436,7 @@ const style$a = `
|
|
|
436
436
|
opacity: 1;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
.
|
|
439
|
+
.ModalForWrapper-animating-in {
|
|
440
440
|
animation-name: Modal-animating-in;
|
|
441
441
|
animation-duration: ${MS_TO_ANIMATE}ms;
|
|
442
442
|
animation-iteration-count: 1;
|
|
@@ -453,14 +453,14 @@ const style$a = `
|
|
|
453
453
|
opacity: 1;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
.
|
|
457
|
-
animation-name:
|
|
456
|
+
.ModalForWrapper-animating-pop {
|
|
457
|
+
animation-name: ModalForWrapper-animating-pop;
|
|
458
458
|
animation-duration: ${MS_TO_ANIMATE}ms;
|
|
459
459
|
animation-iteration-count: 1;
|
|
460
460
|
animation-fill-mode: both;
|
|
461
461
|
animation-timing-function: ease-in-out;
|
|
462
462
|
}
|
|
463
|
-
@keyframes
|
|
463
|
+
@keyframes ModalForWrapper-animating-pop {
|
|
464
464
|
0% {
|
|
465
465
|
transform: scale(1);
|
|
466
466
|
opacity: 1;
|
|
@@ -553,7 +553,7 @@ const Modal = (props) => {
|
|
|
553
553
|
// Check if this button is last
|
|
554
554
|
const last = (i === ModalButtonTypes.length - 1);
|
|
555
555
|
// Create the button
|
|
556
|
-
return (React__default["default"].createElement("button", { key: modalButtonType, type: "button", className: `
|
|
556
|
+
return (React__default["default"].createElement("button", { key: modalButtonType, type: "button", className: `ModalForWrapper-${modalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`, onClick: () => {
|
|
557
557
|
handleClose(modalButtonType);
|
|
558
558
|
} }, label));
|
|
559
559
|
});
|
|
@@ -565,11 +565,11 @@ const Modal = (props) => {
|
|
|
565
565
|
let animationClass = '';
|
|
566
566
|
let backdropAnimationClass = '';
|
|
567
567
|
if (animatingIn) {
|
|
568
|
-
animationClass = '
|
|
569
|
-
backdropAnimationClass = '
|
|
568
|
+
animationClass = 'ModalForWrapper-animating-in';
|
|
569
|
+
backdropAnimationClass = 'ModalForWrapper-fading-in';
|
|
570
570
|
}
|
|
571
571
|
else if (animatingPop) {
|
|
572
|
-
animationClass = '
|
|
572
|
+
animationClass = 'ModalForWrapper-animating-pop';
|
|
573
573
|
}
|
|
574
574
|
// Render the modal
|
|
575
575
|
return (React__default["default"].createElement("div", { className: "modal show", tabIndex: -1, style: {
|
|
@@ -582,7 +582,7 @@ const Modal = (props) => {
|
|
|
582
582
|
right: 0,
|
|
583
583
|
} },
|
|
584
584
|
React__default["default"].createElement("style", null, style$a),
|
|
585
|
-
React__default["default"].createElement("div", { className: `
|
|
585
|
+
React__default["default"].createElement("div", { className: `ModalForWrapper-backdrop ${backdropAnimationClass}`, style: {
|
|
586
586
|
zIndex: 5000000003,
|
|
587
587
|
}, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
588
588
|
// Skip if exit via backdrop not allowed
|
|
@@ -621,7 +621,7 @@ const Modal = (props) => {
|
|
|
621
621
|
React__default["default"].createElement("h5", { className: "modal-title", style: {
|
|
622
622
|
fontWeight: 'bold',
|
|
623
623
|
} }, title),
|
|
624
|
-
(onClose && !dontShowXButton) && (React__default["default"].createElement("button", { type: "button", className: "
|
|
624
|
+
(onClose && !dontShowXButton) && (React__default["default"].createElement("button", { type: "button", className: "ModalForWrapper-x-button btn-close", "aria-label": "Close", style: {
|
|
625
625
|
backgroundColor: (isDarkModeOn()
|
|
626
626
|
? 'white'
|
|
627
627
|
: undefined),
|
|
@@ -1131,6 +1131,8 @@ const AppWrapper = (props) => {
|
|
|
1131
1131
|
// Session expired
|
|
1132
1132
|
const [sessionHasExpired, setSessionHasExpiredInner,] = React.useState(false);
|
|
1133
1133
|
setSessionHasExpired = setSessionHasExpiredInner;
|
|
1134
|
+
// Modals
|
|
1135
|
+
const [modalsFromState, setModalsInner,] = React.useState([]);
|
|
1134
1136
|
/*------------------------------------------------------------------------*/
|
|
1135
1137
|
/* ------------------------------- Render ------------------------------- */
|
|
1136
1138
|
/*------------------------------------------------------------------------*/
|
|
@@ -1158,6 +1160,14 @@ const AppWrapper = (props) => {
|
|
|
1158
1160
|
}
|
|
1159
1161
|
}, dontAllowBackdropExit: true }, confirmInfo.text));
|
|
1160
1162
|
}
|
|
1163
|
+
/* ---------- Custom Modals --------- */
|
|
1164
|
+
// List of modals added outside reactkit via the Modal component
|
|
1165
|
+
const customModals = [];
|
|
1166
|
+
// Add custom modals
|
|
1167
|
+
modalsFromState.forEach((modalTuple) => {
|
|
1168
|
+
var _a;
|
|
1169
|
+
customModals.push(React__default["default"].createElement(Modal, Object.assign({ key: String((_a = modalTuple.props.key) !== null && _a !== void 0 ? _a : modalTuple.id) }, modalTuple.props)));
|
|
1170
|
+
});
|
|
1161
1171
|
/*----------------------------------------*/
|
|
1162
1172
|
/* ---------------- Views --------------- */
|
|
1163
1173
|
/*----------------------------------------*/
|
|
@@ -1222,10 +1232,12 @@ const AppWrapper = (props) => {
|
|
|
1222
1232
|
background-color: white;
|
|
1223
1233
|
color: black;
|
|
1224
1234
|
border: 0.1rem solid black;
|
|
1235
|
+
pointer-events: none;
|
|
1225
1236
|
}
|
|
1226
1237
|
div[data-popper-placement="top"] .tooltip-arrow::before {
|
|
1227
1238
|
border-top-color: white !important;
|
|
1228
1239
|
transform: translate(0, -0.05rem);
|
|
1240
|
+
pointer-events: none;
|
|
1229
1241
|
}
|
|
1230
1242
|
`
|
|
1231
1243
|
: `
|
|
@@ -1233,10 +1245,12 @@ const AppWrapper = (props) => {
|
|
|
1233
1245
|
background-color: black;
|
|
1234
1246
|
color: black;
|
|
1235
1247
|
border: 0.1rem solid white;
|
|
1248
|
+
pointer-events: none;
|
|
1236
1249
|
}
|
|
1237
1250
|
div[data-popper-placement="top"] .tooltip-arrow::before {
|
|
1238
1251
|
border-top-color: black !important;
|
|
1239
1252
|
transform: translate(0, -0.05rem);
|
|
1253
|
+
pointer-events: none;
|
|
1240
1254
|
}
|
|
1241
1255
|
`);
|
|
1242
1256
|
/*----------------------------------------*/
|
|
@@ -1246,6 +1260,7 @@ const AppWrapper = (props) => {
|
|
|
1246
1260
|
React__default["default"].createElement("style", null, style$9),
|
|
1247
1261
|
React__default["default"].createElement("style", null, tooltipStyle),
|
|
1248
1262
|
modal,
|
|
1263
|
+
customModals,
|
|
1249
1264
|
body));
|
|
1250
1265
|
};
|
|
1251
1266
|
|