@thecb/components 7.0.0-beta.4 → 7.0.0-beta.7
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,14 +43337,16 @@ 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); // debugger;
|
|
43341
|
+
|
|
43342
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
43343
|
+
ref: modalContainerRef
|
|
43344
|
+
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal // focusTrapPaused={true}
|
|
43345
|
+
, {
|
|
43346
|
+
initialFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current,
|
|
43345
43347
|
focusTrapOptions: {
|
|
43346
|
-
delayInitialFocus:
|
|
43347
|
-
fallbackFocus:
|
|
43348
|
+
delayInitialFocus: false,
|
|
43349
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43348
43350
|
} // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43349
43351
|
,
|
|
43350
43352
|
onExit: onExit,
|
|
@@ -43379,7 +43381,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43379
43381
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
43380
43382
|
childGap: "1.5rem"
|
|
43381
43383
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43382
|
-
ref: bodyTextContainerRef,
|
|
43383
43384
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43384
43385
|
borderColor: !noBorder && SILVER_GREY,
|
|
43385
43386
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43443,7 +43444,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43443
43444
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
43444
43445
|
padding: "0.5rem"
|
|
43445
43446
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
43446
|
-
ref: closeBtnRef,
|
|
43447
43447
|
action: hideModal,
|
|
43448
43448
|
variant: "primary",
|
|
43449
43449
|
text: closeButtonText,
|