@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.esm.js
CHANGED
|
@@ -43329,14 +43329,16 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43329
43329
|
var _useContext = useContext(ThemeContext),
|
|
43330
43330
|
isMobile = _useContext.isMobile;
|
|
43331
43331
|
|
|
43332
|
-
var
|
|
43333
|
-
|
|
43334
|
-
|
|
43335
|
-
|
|
43336
|
-
|
|
43332
|
+
var modalContainerRef = useRef(null); // debugger;
|
|
43333
|
+
|
|
43334
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43335
|
+
ref: modalContainerRef
|
|
43336
|
+
}, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal // focusTrapPaused={true}
|
|
43337
|
+
, {
|
|
43338
|
+
initialFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current,
|
|
43337
43339
|
focusTrapOptions: {
|
|
43338
|
-
delayInitialFocus:
|
|
43339
|
-
fallbackFocus:
|
|
43340
|
+
delayInitialFocus: false,
|
|
43341
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43340
43342
|
} // fallback to resolve unit test errors https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43341
43343
|
,
|
|
43342
43344
|
onExit: onExit,
|
|
@@ -43371,7 +43373,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43371
43373
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
43372
43374
|
childGap: "1.5rem"
|
|
43373
43375
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
43374
|
-
ref: bodyTextContainerRef,
|
|
43375
43376
|
borderWidthOverride: noBorder && "0 0 2px 0",
|
|
43376
43377
|
borderColor: !noBorder && SILVER_GREY,
|
|
43377
43378
|
padding: !noBorder && "0 0 1.5rem 0",
|
|
@@ -43435,7 +43436,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43435
43436
|
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
43436
43437
|
padding: "0.5rem"
|
|
43437
43438
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
43438
|
-
ref: closeBtnRef,
|
|
43439
43439
|
action: hideModal,
|
|
43440
43440
|
variant: "primary",
|
|
43441
43441
|
text: closeButtonText,
|