@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.esm.js
CHANGED
|
@@ -43329,15 +43329,15 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43329
43329
|
var _useContext = useContext(ThemeContext),
|
|
43330
43330
|
isMobile = _useContext.isMobile;
|
|
43331
43331
|
|
|
43332
|
-
var
|
|
43333
|
-
|
|
43334
|
-
|
|
43335
|
-
|
|
43332
|
+
var modalContainerRef = useRef(null);
|
|
43333
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43334
|
+
ref: modalContainerRef
|
|
43335
|
+
}, modalOpen && /*#__PURE__*/React.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
|
|
43336
|
+
, {
|
|
43336
43337
|
focusTrapOptions: {
|
|
43337
|
-
delayInitialFocus:
|
|
43338
|
-
fallbackFocus:
|
|
43339
|
-
}
|
|
43340
|
-
,
|
|
43338
|
+
delayInitialFocus: true,
|
|
43339
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43340
|
+
},
|
|
43341
43341
|
onExit: onExit,
|
|
43342
43342
|
getApplicationNode: getApplicationNode,
|
|
43343
43343
|
titleText: modalHeaderText,
|
|
@@ -43370,7 +43370,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43370
43370
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
43371
43371
|
childGap: "1.5rem"
|
|
43372
43372
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
43373
|
-
ref: modalBodyTextRef,
|
|
43374
43373
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43375
43374
|
borderColor: !noBorder && SILVER_GREY,
|
|
43376
43375
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43434,7 +43433,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43434
43433
|
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
43435
43434
|
padding: "0.5rem"
|
|
43436
43435
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
43437
|
-
ref: closeBtnRef,
|
|
43438
43436
|
action: hideModal,
|
|
43439
43437
|
variant: "primary",
|
|
43440
43438
|
text: closeButtonText,
|