@linzjs/lui 24.3.0 → 24.3.1
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 +9 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -2
- package/dist/components/LuiModal/LuiModalV2.d.ts +2 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +17 -1
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -18362,7 +18362,23 @@ var LuiModalV2 = function (props) {
|
|
|
18362
18362
|
showButtons && (React__default.createElement("div", { className: "lui-modal-v2-header-buttons" },
|
|
18363
18363
|
showHelpButton && React__default.createElement(HelpButton, { helpLink: props.helpLink }),
|
|
18364
18364
|
showCloseButton && React__default.createElement(CloseButton, { onClose: props.onClose })))),
|
|
18365
|
-
React__default.createElement(
|
|
18365
|
+
React__default.createElement(ModalContents, { children: props.children, tabIndex: props.tabIndex }))));
|
|
18366
|
+
};
|
|
18367
|
+
var ModalContents = function (props) {
|
|
18368
|
+
useEffect(function () {
|
|
18369
|
+
var modalContent = document.querySelector('.ReactModal__Content');
|
|
18370
|
+
if (props.tabIndex === undefined || !modalContent)
|
|
18371
|
+
return;
|
|
18372
|
+
switch (props.tabIndex) {
|
|
18373
|
+
case null:
|
|
18374
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeAttribute('tabindex');
|
|
18375
|
+
break;
|
|
18376
|
+
default:
|
|
18377
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.setAttribute('tabindex', props.tabIndex.toString());
|
|
18378
|
+
break;
|
|
18379
|
+
}
|
|
18380
|
+
}, []);
|
|
18381
|
+
return React__default.createElement("div", { className: "lui-modal-v2-contents" }, props.children);
|
|
18366
18382
|
};
|
|
18367
18383
|
var ButtonRow = function (props) { return (React__default.createElement("div", { className: clsx$1('lui-modal-v2-btn-row', props.className) }, props.children)); };
|
|
18368
18384
|
LuiModalV2.Buttons = ButtonRow;
|