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

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
+ var bodyTextContainerRef = React.useRef(null);
43340
43341
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal, {
43341
- focusDialog: true,
43342
+ initialFocus: bodyTextContainerRef,
43343
+ focusTrapOptions: {
43344
+ delayInitialFocus: true,
43345
+ fallbackFocus: bodyTextContainerRef
43346
+ } // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
43347
+ ,
43342
43348
  onExit: onExit,
43343
43349
  getApplicationNode: getApplicationNode,
43344
43350
  titleText: modalHeaderText,
@@ -43371,6 +43377,7 @@ var Modal$1 = function Modal(_ref) {
43371
43377
  }, /*#__PURE__*/React__default.createElement(Stack, {
43372
43378
  childGap: "1.5rem"
43373
43379
  }, /*#__PURE__*/React__default.createElement(Box, {
43380
+ ref: bodyTextContainerRef,
43374
43381
  borderWidthOverride: noBorder && "0 0 2px 0",
43375
43382
  borderColor: !noBorder && SILVER_GREY,
43376
43383
  padding: !noBorder && "0 0 1.5rem 0",