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