@thecb/components 7.0.0-beta.5 → 7.0.0-beta.6

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.esm.js CHANGED
@@ -43289,6 +43289,8 @@ var getApplicationNode = function getApplicationNode() {
43289
43289
  };
43290
43290
 
43291
43291
  var Modal$1 = function Modal(_ref) {
43292
+ var _ref2, _ref3;
43293
+
43292
43294
  var hideModal = _ref.hideModal,
43293
43295
  _ref$onExit = _ref.onExit,
43294
43296
  onExit = _ref$onExit === void 0 ? hideModal : _ref$onExit,
@@ -43333,10 +43335,10 @@ var Modal$1 = function Modal(_ref) {
43333
43335
  var bodyTextContainerRef = useRef(null);
43334
43336
  debugger;
43335
43337
  return /*#__PURE__*/React.createElement(Fragment$1, null, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal, {
43336
- initialFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef,
43338
+ initialFocus: (_ref2 = closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef) !== null && _ref2 !== void 0 ? _ref2 : '#root',
43337
43339
  focusTrapOptions: {
43338
43340
  delayInitialFocus: false,
43339
- fallbackFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef
43341
+ fallbackFocus: (_ref3 = closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef) !== null && _ref3 !== void 0 ? _ref3 : '#root'
43340
43342
  } // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
43341
43343
  ,
43342
43344
  onExit: onExit,