@thecb/components 7.0.0-beta.1 → 7.0.0-beta.10
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,15 +43337,15 @@ 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
|
-
|
|
43340
|
+
var modalContainerRef = React.useRef(null);
|
|
43341
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
43342
|
+
ref: modalContainerRef
|
|
43343
|
+
}, 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
|
|
43344
|
+
, {
|
|
43344
43345
|
focusTrapOptions: {
|
|
43345
|
-
delayInitialFocus:
|
|
43346
|
-
fallbackFocus:
|
|
43347
|
-
}
|
|
43348
|
-
,
|
|
43346
|
+
delayInitialFocus: true,
|
|
43347
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43348
|
+
},
|
|
43349
43349
|
onExit: onExit,
|
|
43350
43350
|
getApplicationNode: getApplicationNode,
|
|
43351
43351
|
titleText: modalHeaderText,
|
|
@@ -43378,7 +43378,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43378
43378
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
43379
43379
|
childGap: "1.5rem"
|
|
43380
43380
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43381
|
-
ref: modalBodyTextRef,
|
|
43382
43381
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43383
43382
|
borderColor: !noBorder && SILVER_GREY,
|
|
43384
43383
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43442,7 +43441,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43442
43441
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
43443
43442
|
padding: "0.5rem"
|
|
43444
43443
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
43445
|
-
ref: closeBtnRef,
|
|
43446
43444
|
action: hideModal,
|
|
43447
43445
|
variant: "primary",
|
|
43448
43446
|
text: closeButtonText,
|