@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.cjs CHANGED
@@ -2132,13 +2132,14 @@ var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
2132
2132
  var import_react_tree3 = require("@ai-matrx/kit/react-tree");
2133
2133
  var React17 = __toESM(require("react"), 1);
2134
2134
  var import_jsx_runtime21 = require("react/jsx-runtime");
2135
+ var DialogWindowedByDefaultContext = React17.createContext(false);
2135
2136
  var Dialog = ({
2136
2137
  children,
2137
2138
  ...props
2138
2139
  }) => {
2139
2140
  const isMobile = useIsMobile();
2140
2141
  const modal = props.modal ?? isMobile;
2141
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) });
2142
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogWindowedByDefaultContext.Provider, { value: props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) }) });
2142
2143
  };
2143
2144
  Dialog.displayName = "Dialog";
2144
2145
  var DialogTrigger = DialogPrimitive2.Trigger;
@@ -2210,6 +2211,7 @@ var DialogContent = React17.forwardRef(
2210
2211
  const injectedContainer = usePortalContainer(container);
2211
2212
  const asSheet = mobileSheet && isMobile;
2212
2213
  const windowed = !isModal && !asSheet;
2214
+ const windowedByDefault = React17.useContext(DialogWindowedByDefaultContext);
2213
2215
  const [containerEl, setContainerEl] = React17.useState(
2214
2216
  null
2215
2217
  );
@@ -2270,7 +2272,7 @@ var DialogContent = React17.forwardRef(
2270
2272
  // can sit beside a host's floating window manager (which starts at
2271
2273
  // z=1000); staying below that boundary makes a newly focused window
2272
2274
  // usable without coupling the two systems.
2273
- !isModal && "z-[900]",
2275
+ !isModal && !windowedByDefault && "z-[900]",
2274
2276
  // Without an overlay the card needs its own separation from the page.
2275
2277
  windowed && "shadow-2xl ring-1 ring-border/60"
2276
2278
  ),