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