@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.
@@ -159,13 +159,14 @@ function useIsMobile() {
159
159
 
160
160
  // src/dialog.tsx
161
161
  var import_jsx_runtime4 = require("react/jsx-runtime");
162
+ var DialogWindowedByDefaultContext = React4.createContext(false);
162
163
  var Dialog = ({
163
164
  children,
164
165
  ...props
165
166
  }) => {
166
167
  const isMobile = useIsMobile();
167
168
  const modal = props.modal ?? isMobile;
168
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogPrimitive.Root, { ...props, modal, children }) });
169
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogWindowedByDefaultContext.Provider, { value: props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogPrimitive.Root, { ...props, modal, children }) }) });
169
170
  };
170
171
  Dialog.displayName = "Dialog";
171
172
  var DialogPortal = ({
@@ -234,6 +235,7 @@ var DialogContent = React4.forwardRef(
234
235
  const injectedContainer = usePortalContainer(container);
235
236
  const asSheet = mobileSheet && isMobile;
236
237
  const windowed = !isModal && !asSheet;
238
+ const windowedByDefault = React4.useContext(DialogWindowedByDefaultContext);
237
239
  const [containerEl, setContainerEl] = React4.useState(
238
240
  null
239
241
  );
@@ -294,7 +296,7 @@ var DialogContent = React4.forwardRef(
294
296
  // can sit beside a host's floating window manager (which starts at
295
297
  // z=1000); staying below that boundary makes a newly focused window
296
298
  // usable without coupling the two systems.
297
- !isModal && "z-[900]",
299
+ !isModal && !windowedByDefault && "z-[900]",
298
300
  // Without an overlay the card needs its own separation from the page.
299
301
  windowed && "shadow-2xl ring-1 ring-border/60"
300
302
  ),