@thecb/components 7.0.0-beta.2 → 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.esm.js
CHANGED
|
@@ -43329,13 +43329,13 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43329
43329
|
var _useContext = useContext(ThemeContext),
|
|
43330
43330
|
isMobile = _useContext.isMobile;
|
|
43331
43331
|
|
|
43332
|
-
var
|
|
43332
|
+
var bodyTextContainerRef = useRef(null);
|
|
43333
43333
|
return /*#__PURE__*/React.createElement(Fragment$1, null, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal, {
|
|
43334
|
-
initialFocus:
|
|
43334
|
+
initialFocus: bodyTextContainerRef,
|
|
43335
43335
|
focusTrapOptions: {
|
|
43336
|
-
delayInitialFocus:
|
|
43337
|
-
fallbackFocus:
|
|
43338
|
-
} // fallback to resolve unit test errors
|
|
43336
|
+
delayInitialFocus: true,
|
|
43337
|
+
fallbackFocus: bodyTextContainerRef
|
|
43338
|
+
} // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43339
43339
|
,
|
|
43340
43340
|
onExit: onExit,
|
|
43341
43341
|
getApplicationNode: getApplicationNode,
|
|
@@ -43369,6 +43369,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43369
43369
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
43370
43370
|
childGap: "1.5rem"
|
|
43371
43371
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
43372
|
+
ref: bodyTextContainerRef,
|
|
43372
43373
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43373
43374
|
borderColor: !noBorder && SILVER_GREY,
|
|
43374
43375
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43432,7 +43433,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43432
43433
|
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
43433
43434
|
padding: "0.5rem"
|
|
43434
43435
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
43435
|
-
ref: closeBtnRef,
|
|
43436
43436
|
action: hideModal,
|
|
43437
43437
|
variant: "primary",
|
|
43438
43438
|
text: closeButtonText,
|