@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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [21.38.2](https://github.com/linz/lui/compare/v21.38.1...v21.38.2) (2024-07-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **LuiModalV2:** only call setAppElement when modal mounts ([#1131](https://github.com/linz/lui/issues/1131)) ([10bea9a](https://github.com/linz/lui/commit/10bea9ab56258dec28aba99634bb0240bf52d92c))
|
|
7
|
+
|
|
1
8
|
## [21.38.1](https://github.com/linz/lui/compare/v21.38.0...v21.38.1) (2024-07-01)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.js
CHANGED
|
@@ -42264,6 +42264,11 @@ var LuiModalV2 = function (props) {
|
|
|
42264
42264
|
var showHelpButton = Boolean(props.helpLink);
|
|
42265
42265
|
var showButtons = showCloseButton || showHelpButton;
|
|
42266
42266
|
var showHeadingIcon = props.headingIcon && !props.isLoading;
|
|
42267
|
+
// this is here for the tests
|
|
42268
|
+
React.useEffect(function () {
|
|
42269
|
+
if (isProcess && !isTest)
|
|
42270
|
+
Modal.setAppElement('#root');
|
|
42271
|
+
}, []);
|
|
42267
42272
|
return (React__default["default"].createElement(Modal, { key: props.key, isOpen: true,
|
|
42268
42273
|
// disble the `shouldClose` props as we handle them ourselves
|
|
42269
42274
|
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim',
|
|
@@ -42304,10 +42309,8 @@ var HeaderTitle = function (props) {
|
|
|
42304
42309
|
return ReactDOM.createPortal(React__default["default"].createElement("h2", { className: clsx('lui-modal-v2-header-title lui-modal-v2-header-title-portal', props.className) }, props.children), target);
|
|
42305
42310
|
};
|
|
42306
42311
|
LuiModalV2.HeaderTitle = HeaderTitle;
|
|
42307
|
-
|
|
42308
|
-
var isTest =
|
|
42309
|
-
if (!isTest)
|
|
42310
|
-
Modal.setAppElement('#root');
|
|
42312
|
+
var isProcess = typeof process !== 'undefined';
|
|
42313
|
+
var isTest = isProcess && ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test';
|
|
42311
42314
|
|
|
42312
42315
|
var LuiAlertModalV2 = function (props) {
|
|
42313
42316
|
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|