@thecb/components 7.0.0-beta.5 → 7.0.0-beta.8
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,16 +43337,17 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43337
43337
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
43338
43338
|
isMobile = _useContext.isMobile;
|
|
43339
43339
|
|
|
43340
|
-
var
|
|
43341
|
-
|
|
43342
|
-
|
|
43343
|
-
|
|
43344
|
-
|
|
43340
|
+
var modalContainerRef = React.useRef(null);
|
|
43341
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
43342
|
+
padding: "0",
|
|
43343
|
+
ref: modalContainerRef
|
|
43344
|
+
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43345
|
+
, {
|
|
43346
|
+
initialFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current,
|
|
43345
43347
|
focusTrapOptions: {
|
|
43346
43348
|
delayInitialFocus: false,
|
|
43347
|
-
fallbackFocus:
|
|
43348
|
-
}
|
|
43349
|
-
,
|
|
43349
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43350
|
+
},
|
|
43350
43351
|
onExit: onExit,
|
|
43351
43352
|
getApplicationNode: getApplicationNode,
|
|
43352
43353
|
titleText: modalHeaderText,
|
|
@@ -43379,7 +43380,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43379
43380
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
43380
43381
|
childGap: "1.5rem"
|
|
43381
43382
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43382
|
-
ref: bodyTextContainerRef,
|
|
43383
43383
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43384
43384
|
borderColor: !noBorder && SILVER_GREY,
|
|
43385
43385
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43443,7 +43443,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43443
43443
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
43444
43444
|
padding: "0.5rem"
|
|
43445
43445
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
43446
|
-
ref: closeBtnRef,
|
|
43447
43446
|
action: hideModal,
|
|
43448
43447
|
variant: "primary",
|
|
43449
43448
|
text: closeButtonText,
|