@ai-matrx/design-system 0.38.0 → 0.38.1

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.js CHANGED
@@ -1873,13 +1873,14 @@ import * as VisuallyHidden2 from "@radix-ui/react-visually-hidden";
1873
1873
  import { treeContainsComponent as treeContainsComponent3 } from "@ai-matrx/kit/react-tree";
1874
1874
  import * as React17 from "react";
1875
1875
  import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
1876
+ var DialogWindowedByDefaultContext = React17.createContext(false);
1876
1877
  var Dialog = ({
1877
1878
  children,
1878
1879
  ...props
1879
1880
  }) => {
1880
1881
  const isMobile = useIsMobile();
1881
1882
  const modal = props.modal ?? isMobile;
1882
- return /* @__PURE__ */ jsx21(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx21(DialogPrimitive2.Root, { ...props, modal, children }) });
1883
+ return /* @__PURE__ */ jsx21(DialogWindowedByDefaultContext.Provider, { value: props.modal === void 0, children: /* @__PURE__ */ jsx21(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx21(DialogPrimitive2.Root, { ...props, modal, children }) }) });
1883
1884
  };
1884
1885
  Dialog.displayName = "Dialog";
1885
1886
  var DialogTrigger = DialogPrimitive2.Trigger;
@@ -1951,6 +1952,7 @@ var DialogContent = React17.forwardRef(
1951
1952
  const injectedContainer = usePortalContainer(container);
1952
1953
  const asSheet = mobileSheet && isMobile;
1953
1954
  const windowed = !isModal && !asSheet;
1955
+ const windowedByDefault = React17.useContext(DialogWindowedByDefaultContext);
1954
1956
  const [containerEl, setContainerEl] = React17.useState(
1955
1957
  null
1956
1958
  );
@@ -2011,7 +2013,7 @@ var DialogContent = React17.forwardRef(
2011
2013
  // can sit beside a host's floating window manager (which starts at
2012
2014
  // z=1000); staying below that boundary makes a newly focused window
2013
2015
  // usable without coupling the two systems.
2014
- !isModal && "z-[900]",
2016
+ !isModal && !windowedByDefault && "z-[900]",
2015
2017
  // Without an overlay the card needs its own separation from the page.
2016
2018
  windowed && "shadow-2xl ring-1 ring-border/60"
2017
2019
  ),