@zextras/carbonio-design-system 12.0.1 → 12.0.2
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/zapp-ui.bundle.cjs
CHANGED
|
@@ -26152,6 +26152,7 @@ const CustomModal = /*#__PURE__*/React__namespace.default.forwardRef(function Mo
|
|
|
26152
26152
|
const modalContentRef = React.useRef(null);
|
|
26153
26153
|
const startSentinelRef = React.useRef(null);
|
|
26154
26154
|
const endSentinelRef = React.useRef(null);
|
|
26155
|
+
const focusModalContentRef = React.useRef(focusModalContent);
|
|
26155
26156
|
const onBackdropClick = React.useCallback(e => {
|
|
26156
26157
|
if (e) {
|
|
26157
26158
|
e.stopPropagation();
|
|
@@ -26199,7 +26200,7 @@ const CustomModal = /*#__PURE__*/React__namespace.default.forwardRef(function Mo
|
|
|
26199
26200
|
const startSentinelRefSave = startSentinelRef.current;
|
|
26200
26201
|
const endSentinelRefSave = endSentinelRef.current;
|
|
26201
26202
|
if (open) {
|
|
26202
|
-
if (
|
|
26203
|
+
if (focusModalContentRef.current) {
|
|
26203
26204
|
modalContentRef.current && modalContentRef.current.focus();
|
|
26204
26205
|
}
|
|
26205
26206
|
startSentinelRefSave && startSentinelRefSave.addEventListener('focus', onStartSentinelFocus);
|
|
@@ -26210,7 +26211,7 @@ const CustomModal = /*#__PURE__*/React__namespace.default.forwardRef(function Mo
|
|
|
26210
26211
|
endSentinelRefSave && endSentinelRefSave.removeEventListener('focus', onEndSentinelFocus);
|
|
26211
26212
|
open && focusedElement && focusedElement.focus();
|
|
26212
26213
|
};
|
|
26213
|
-
}, [open, onStartSentinelFocus, onEndSentinelFocus, windowObj
|
|
26214
|
+
}, [open, onStartSentinelFocus, onEndSentinelFocus, windowObj]);
|
|
26214
26215
|
React.useEffect(() => {
|
|
26215
26216
|
// delay the open of the modal after the show of the portal
|
|
26216
26217
|
// in order to make the transition visible
|
package/dist/zapp-ui.bundle.mjs
CHANGED
|
@@ -26132,6 +26132,7 @@ const CustomModal = /*#__PURE__*/React__default.forwardRef(function ModalFn({
|
|
|
26132
26132
|
const modalContentRef = useRef(null);
|
|
26133
26133
|
const startSentinelRef = useRef(null);
|
|
26134
26134
|
const endSentinelRef = useRef(null);
|
|
26135
|
+
const focusModalContentRef = useRef(focusModalContent);
|
|
26135
26136
|
const onBackdropClick = useCallback(e => {
|
|
26136
26137
|
if (e) {
|
|
26137
26138
|
e.stopPropagation();
|
|
@@ -26179,7 +26180,7 @@ const CustomModal = /*#__PURE__*/React__default.forwardRef(function ModalFn({
|
|
|
26179
26180
|
const startSentinelRefSave = startSentinelRef.current;
|
|
26180
26181
|
const endSentinelRefSave = endSentinelRef.current;
|
|
26181
26182
|
if (open) {
|
|
26182
|
-
if (
|
|
26183
|
+
if (focusModalContentRef.current) {
|
|
26183
26184
|
modalContentRef.current && modalContentRef.current.focus();
|
|
26184
26185
|
}
|
|
26185
26186
|
startSentinelRefSave && startSentinelRefSave.addEventListener('focus', onStartSentinelFocus);
|
|
@@ -26190,7 +26191,7 @@ const CustomModal = /*#__PURE__*/React__default.forwardRef(function ModalFn({
|
|
|
26190
26191
|
endSentinelRefSave && endSentinelRefSave.removeEventListener('focus', onEndSentinelFocus);
|
|
26191
26192
|
open && focusedElement && focusedElement.focus();
|
|
26192
26193
|
};
|
|
26193
|
-
}, [open, onStartSentinelFocus, onEndSentinelFocus, windowObj
|
|
26194
|
+
}, [open, onStartSentinelFocus, onEndSentinelFocus, windowObj]);
|
|
26194
26195
|
useEffect(() => {
|
|
26195
26196
|
// delay the open of the modal after the show of the portal
|
|
26196
26197
|
// in order to make the transition visible
|