@thecb/components 7.0.0-beta.0 → 7.0.0-beta.11

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/dist/index.cjs.js CHANGED
@@ -43337,8 +43337,14 @@ var Modal$1 = function Modal(_ref) {
43337
43337
  var _useContext = React.useContext(styled.ThemeContext),
43338
43338
  isMobile = _useContext.isMobile;
43339
43339
 
43340
- return /*#__PURE__*/React__default.createElement(React.Fragment, null, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal, {
43341
- focusDialog: true,
43340
+ var modalContainerRef = React.useRef(null);
43341
+ return /*#__PURE__*/React__default.createElement("div", {
43342
+ ref: modalContainerRef
43343
+ }, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
43344
+ , {
43345
+ focusTrapOptions: {
43346
+ fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
43347
+ },
43342
43348
  onExit: onExit,
43343
43349
  getApplicationNode: getApplicationNode,
43344
43350
  titleText: modalHeaderText,