@indico-data/design-system 2.21.1 → 2.21.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/lib/index.js
CHANGED
|
@@ -40935,7 +40935,11 @@ function ModalBase(props) {
|
|
|
40935
40935
|
ariaProps['describedby'] = describedBy;
|
|
40936
40936
|
}
|
|
40937
40937
|
// Try to render modal within the theme-root, otherwise attach to the root
|
|
40938
|
-
const parentSelector = () =>
|
|
40938
|
+
const parentSelector = () => {
|
|
40939
|
+
const themeRoot = document.getElementById('theme-root');
|
|
40940
|
+
const root = document.getElementById('root');
|
|
40941
|
+
return themeRoot || root || document.body;
|
|
40942
|
+
};
|
|
40939
40943
|
return (jsxRuntime.jsx(StyledModalBase, { ariaHideApp: false, "data-cy": props['data-cy'], aria: ariaProps, className: className || 'baseModal', contentLabel: 'labelText' in props ? props.labelText : null, id: id, isOpen: open, node: node, onRequestClose: clickToDismiss, parentSelector: parentSelector, shouldCloseOnEsc: !preventEscDismiss, shouldReturnFocusAfterClose: !preventReturnFocus, maxWidth: maxWidth, children: children }));
|
|
40940
40944
|
}
|
|
40941
40945
|
|