@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.cjs.js
CHANGED
|
@@ -43337,13 +43337,13 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43337
43337
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
43338
43338
|
isMobile = _useContext.isMobile;
|
|
43339
43339
|
|
|
43340
|
-
var
|
|
43340
|
+
var bodyTextContainerRef = React.useRef(null);
|
|
43341
43341
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal, {
|
|
43342
|
-
initialFocus:
|
|
43342
|
+
initialFocus: bodyTextContainerRef,
|
|
43343
43343
|
focusTrapOptions: {
|
|
43344
|
-
delayInitialFocus:
|
|
43345
|
-
fallbackFocus:
|
|
43346
|
-
} // fallback to resolve unit test errors
|
|
43344
|
+
delayInitialFocus: true,
|
|
43345
|
+
fallbackFocus: bodyTextContainerRef
|
|
43346
|
+
} // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43347
43347
|
,
|
|
43348
43348
|
onExit: onExit,
|
|
43349
43349
|
getApplicationNode: getApplicationNode,
|
|
@@ -43377,6 +43377,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43377
43377
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
43378
43378
|
childGap: "1.5rem"
|
|
43379
43379
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43380
|
+
ref: bodyTextContainerRef,
|
|
43380
43381
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43381
43382
|
borderColor: !noBorder && SILVER_GREY,
|
|
43382
43383
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43440,7 +43441,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43440
43441
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
43441
43442
|
padding: "0.5rem"
|
|
43442
43443
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
43443
|
-
ref: closeBtnRef,
|
|
43444
43444
|
action: hideModal,
|
|
43445
43445
|
variant: "primary",
|
|
43446
43446
|
text: closeButtonText,
|