@thecb/components 7.0.0-beta.1 → 7.0.0-beta.4

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
@@ -43338,12 +43338,13 @@ var Modal$1 = function Modal(_ref) {
43338
43338
  isMobile = _useContext.isMobile;
43339
43339
 
43340
43340
  var closeBtnRef = React.useRef(null);
43341
- var modalBodyTextRef = React.useRef(null);
43341
+ var bodyTextContainerRef = React.useRef(null);
43342
+ debugger;
43342
43343
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal, {
43343
- initialFocus: closeBtnRef || modalBodyTextRef,
43344
+ initialFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef,
43344
43345
  focusTrapOptions: {
43345
- delayInitialFocus: false,
43346
- fallbackFocus: closeBtnRef || modalBodyTextRef
43346
+ delayInitialFocus: true,
43347
+ fallbackFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef
43347
43348
  } // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
43348
43349
  ,
43349
43350
  onExit: onExit,
@@ -43378,7 +43379,7 @@ var Modal$1 = function Modal(_ref) {
43378
43379
  }, /*#__PURE__*/React__default.createElement(Stack, {
43379
43380
  childGap: "1.5rem"
43380
43381
  }, /*#__PURE__*/React__default.createElement(Box, {
43381
- ref: modalBodyTextRef,
43382
+ ref: bodyTextContainerRef,
43382
43383
  borderWidthOverride: noBorder && "0 0 2px 0",
43383
43384
  borderColor: !noBorder && SILVER_GREY,
43384
43385
  padding: !noBorder && "0 0 1.5rem 0",