@linzjs/lui 24.10.0 → 24.10.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 +7 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +14 -1
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
* **LuiComboSelect:** restore interface to support styling of the input element. ([#1270](https://github.com/linz/lui/issues/1270)) ([7ce6a13](https://github.com/linz/lui/commit/7ce6a137c7f16ffa3acbe4357569a6eb59ef47db))
|
|
7
7
|
|
|
8
|
+
## [24.10.1](https://github.com/linz/Lui/compare/lui-v24.10.0...lui-v24.10.1) (2026-03-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove stale aria-hidden from #root when LuiModalV2 unmounts ([#1325](https://github.com/linz/Lui/issues/1325)) ([008ee91](https://github.com/linz/Lui/commit/008ee91d3e9494feda5ac408598852f7cc3b4301))
|
|
14
|
+
|
|
8
15
|
## [24.10.0](https://github.com/linz/Lui/compare/lui-v24.9.1...lui-v24.10.0) (2026-02-25)
|
|
9
16
|
|
|
10
17
|
|
package/dist/index.js
CHANGED
|
@@ -18421,6 +18421,19 @@ var LuiModalV2 = function (props) {
|
|
|
18421
18421
|
var modalRef = React.useRef(null);
|
|
18422
18422
|
var rootId = useId();
|
|
18423
18423
|
var headingTextId = "".concat(rootId, "_headingText");
|
|
18424
|
+
var appElement = document.getElementById('root');
|
|
18425
|
+
// Workaround for a react-modal bug: when this component unmounts while open,
|
|
18426
|
+
// react-modal leaves aria-hidden="true" on #root, hiding the app from the a11y tree.
|
|
18427
|
+
React.useEffect(function () {
|
|
18428
|
+
return function () {
|
|
18429
|
+
// By the time this cleanup runs, the current modal's DOM is already removed, so any
|
|
18430
|
+
// remaining matches belong to other open instances — skip cleanup if they exist.
|
|
18431
|
+
var otherModalsOpen = document.querySelector('.lui-modal-v2');
|
|
18432
|
+
if (!otherModalsOpen && appElement) {
|
|
18433
|
+
appElement.removeAttribute('aria-hidden');
|
|
18434
|
+
}
|
|
18435
|
+
};
|
|
18436
|
+
}, [appElement]);
|
|
18424
18437
|
var handleClickOutside = React.useCallback(function () { var _a; return props.shouldCloseOnOverlayClick && ((_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props)); }, [props.shouldCloseOnEsc, props.onClose]);
|
|
18425
18438
|
useClickedOutsideElement(modalRef, handleClickOutside);
|
|
18426
18439
|
var handleEsc = React.useCallback(function (e) {
|
|
@@ -18445,7 +18458,7 @@ var LuiModalV2 = function (props) {
|
|
|
18445
18458
|
var showHeadingIcon = props.headingIcon && !props.isLoading;
|
|
18446
18459
|
return (React__default["default"].createElement(Modal, { key: props.key, isOpen: true,
|
|
18447
18460
|
// disble the `shouldClose` props as we handle them ourselves
|
|
18448
|
-
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim', appElement:
|
|
18461
|
+
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim', appElement: appElement,
|
|
18449
18462
|
// required to prevent warnings that are not applicable in real usage
|
|
18450
18463
|
ariaHideApp: !isTest, parentSelector: props.appendToElement, aria: { labelledby: props.headingText ? headingTextId : undefined } },
|
|
18451
18464
|
React__default["default"].createElement("div", { ref: function (el) {
|