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