@thecb/components 7.0.0-beta.6 → 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
|
@@ -43297,8 +43297,6 @@ var getApplicationNode = function getApplicationNode() {
|
|
|
43297
43297
|
};
|
|
43298
43298
|
|
|
43299
43299
|
var Modal$1 = function Modal(_ref) {
|
|
43300
|
-
var _ref2, _ref3;
|
|
43301
|
-
|
|
43302
43300
|
var hideModal = _ref.hideModal,
|
|
43303
43301
|
_ref$onExit = _ref.onExit,
|
|
43304
43302
|
onExit = _ref$onExit === void 0 ? hideModal : _ref$onExit,
|
|
@@ -43339,14 +43337,16 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43339
43337
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
43340
43338
|
isMobile = _useContext.isMobile;
|
|
43341
43339
|
|
|
43342
|
-
var
|
|
43343
|
-
|
|
43344
|
-
|
|
43345
|
-
|
|
43346
|
-
|
|
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,
|
|
43347
43347
|
focusTrapOptions: {
|
|
43348
43348
|
delayInitialFocus: false,
|
|
43349
|
-
fallbackFocus:
|
|
43349
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43350
43350
|
} // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43351
43351
|
,
|
|
43352
43352
|
onExit: onExit,
|
|
@@ -43381,7 +43381,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43381
43381
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
43382
43382
|
childGap: "1.5rem"
|
|
43383
43383
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43384
|
-
ref: bodyTextContainerRef,
|
|
43385
43384
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43386
43385
|
borderColor: !noBorder && SILVER_GREY,
|
|
43387
43386
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43445,7 +43444,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43445
43444
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
43446
43445
|
padding: "0.5rem"
|
|
43447
43446
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
43448
|
-
ref: closeBtnRef,
|
|
43449
43447
|
action: hideModal,
|
|
43450
43448
|
variant: "primary",
|
|
43451
43449
|
text: closeButtonText,
|