@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.esm.js CHANGED
@@ -43330,12 +43330,13 @@ var Modal$1 = function Modal(_ref) {
43330
43330
  isMobile = _useContext.isMobile;
43331
43331
 
43332
43332
  var closeBtnRef = useRef(null);
43333
- var modalBodyTextRef = useRef(null);
43333
+ var bodyTextContainerRef = useRef(null);
43334
+ debugger;
43334
43335
  return /*#__PURE__*/React.createElement(Fragment$1, null, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal, {
43335
- initialFocus: closeBtnRef || modalBodyTextRef,
43336
+ initialFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef,
43336
43337
  focusTrapOptions: {
43337
- delayInitialFocus: false,
43338
- fallbackFocus: closeBtnRef || modalBodyTextRef
43338
+ delayInitialFocus: true,
43339
+ fallbackFocus: closeBtnRef !== null && closeBtnRef !== void 0 ? closeBtnRef : bodyTextContainerRef
43339
43340
  } // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
43340
43341
  ,
43341
43342
  onExit: onExit,
@@ -43370,7 +43371,7 @@ var Modal$1 = function Modal(_ref) {
43370
43371
  }, /*#__PURE__*/React.createElement(Stack, {
43371
43372
  childGap: "1.5rem"
43372
43373
  }, /*#__PURE__*/React.createElement(Box, {
43373
- ref: modalBodyTextRef,
43374
+ ref: bodyTextContainerRef,
43374
43375
  borderWidthOverride: noBorder && "0 0 2px 0",
43375
43376
  borderColor: !noBorder && SILVER_GREY,
43376
43377
  padding: !noBorder && "0 0 1.5rem 0",