sixseconds-modules 2.0.3 → 2.0.4

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.cjs.js CHANGED
@@ -12924,21 +12924,25 @@ function ShadowIsland({ children }) {
12924
12924
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: hostRef, className: "sixseconds-header-shadow-host", suppressHydrationWarning: true });
12925
12925
  }
12926
12926
  function IsolatedProviders({ cache, children }) {
12927
- const overlayRef = React.useRef(null);
12928
12927
  const theme = React.useMemo(
12929
12928
  () => styles.createTheme({
12930
12929
  typography: { fontFamily: "'Inter', sans-serif" },
12931
12930
  components: {
12932
- MuiModal: { defaultProps: { container: () => overlayRef.current } },
12933
- MuiPopper: { defaultProps: { container: () => overlayRef.current } }
12931
+ // Keep every MUI overlay INSIDE the shadow root. By default Dialog/Menu/
12932
+ // Popover (via Modal) and Tooltip/Autocomplete (via Popper) portal to
12933
+ // document.body — which is OUTSIDE the shadow boundary. There the HOST
12934
+ // app's MUI theme styles them (identical `.MuiPaper`/`.MuiDialog` class
12935
+ // names) while our shadow-scoped styles do NOT reach them, so spacing
12936
+ // collapses. `disablePortal` renders them in-tree instead, so they stay
12937
+ // isolated and correctly styled. (Backdrops/poppers are position:fixed,
12938
+ // so they still overlay the viewport correctly from inside the tree.)
12939
+ MuiModal: { defaultProps: { disablePortal: true } },
12940
+ MuiPopper: { defaultProps: { disablePortal: true } }
12934
12941
  }
12935
12942
  }),
12936
12943
  []
12937
12944
  );
12938
- return /* @__PURE__ */ jsxRuntime.jsx(react.CacheProvider, { value: cache, children: /* @__PURE__ */ jsxRuntime.jsxs(styles.ThemeProvider, { theme, children: [
12939
- children,
12940
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: overlayRef, className: "sixseconds-header-overlays" })
12941
- ] }) });
12945
+ return /* @__PURE__ */ jsxRuntime.jsx(react.CacheProvider, { value: cache, children: /* @__PURE__ */ jsxRuntime.jsx(styles.ThemeProvider, { theme, children }) });
12942
12946
  }
12943
12947
  const DangerDialog = ({
12944
12948
  open,