@sproutsocial/seeds-react-menu 1.16.5 → 1.16.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +33 -0
- package/dist/esm/v3/index.js +5 -1
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/v3/index.js +5 -1
- package/dist/v3/index.js.map +1 -1
- package/package.json +13 -13
- package/src/v3/ModalStories.stories.tsx +112 -0
- package/src/v3/SeedsPortal.tsx +19 -1
package/dist/v3/index.js
CHANGED
|
@@ -91,7 +91,11 @@ function useSeedsPortalContainer() {
|
|
|
91
91
|
const containerRef = React.useRef(null);
|
|
92
92
|
const [portalContainer, setPortalContainer] = React.useState(void 0);
|
|
93
93
|
React.useEffect(() => {
|
|
94
|
-
if (
|
|
94
|
+
if (!containerRef.current) return;
|
|
95
|
+
const insideDialog = disablePortalToBody || // Fallback for cross-chunk MFE scenarios where context identity differs:
|
|
96
|
+
// detect the dialog boundary directly from the DOM.
|
|
97
|
+
!!containerRef.current.closest("[role='dialog']");
|
|
98
|
+
if (insideDialog) {
|
|
95
99
|
const dialogContent = containerRef.current.closest("[role='dialog']");
|
|
96
100
|
setPortalContainer(dialogContent ?? containerRef.current);
|
|
97
101
|
}
|