@linzjs/lui 21.38.1 → 21.38.2
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/CHANGELOG.md +7 -0
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +7 -4
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -42235,6 +42235,11 @@ var LuiModalV2 = function (props) {
|
|
|
42235
42235
|
var showHelpButton = Boolean(props.helpLink);
|
|
42236
42236
|
var showButtons = showCloseButton || showHelpButton;
|
|
42237
42237
|
var showHeadingIcon = props.headingIcon && !props.isLoading;
|
|
42238
|
+
// this is here for the tests
|
|
42239
|
+
useEffect(function () {
|
|
42240
|
+
if (isProcess && !isTest)
|
|
42241
|
+
Modal.setAppElement('#root');
|
|
42242
|
+
}, []);
|
|
42238
42243
|
return (React__default.createElement(Modal, { key: props.key, isOpen: true,
|
|
42239
42244
|
// disble the `shouldClose` props as we handle them ourselves
|
|
42240
42245
|
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim',
|
|
@@ -42275,10 +42280,8 @@ var HeaderTitle = function (props) {
|
|
|
42275
42280
|
return createPortal(React__default.createElement("h2", { className: clsx('lui-modal-v2-header-title lui-modal-v2-header-title-portal', props.className) }, props.children), target);
|
|
42276
42281
|
};
|
|
42277
42282
|
LuiModalV2.HeaderTitle = HeaderTitle;
|
|
42278
|
-
|
|
42279
|
-
var isTest =
|
|
42280
|
-
if (!isTest)
|
|
42281
|
-
Modal.setAppElement('#root');
|
|
42283
|
+
var isProcess = typeof process !== 'undefined';
|
|
42284
|
+
var isTest = isProcess && ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test';
|
|
42282
42285
|
|
|
42283
42286
|
var LuiAlertModalV2 = function (props) {
|
|
42284
42287
|
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|