'use client' // z-index strategy (relies on root `isolation: isolate` in layout.tsx): // All base/ui/* overlay primitives — z-[1002] // Overlays share the same z-index; DOM order handles stacking when multiple are open. // This ensures overlays inside a Dialog (e.g. a Tooltip on a dialog button) render // above the dialog backdrop instead of being clipped by it. // During migration, z-[1002] is chosen to sit above all legacy overlays // (Modal z-[60], PortalToFollowElem callers up to z-[1001]). // Once all legacy overlays are migrated, this can be reduced back to z-50. // Toast uses z-[1101] during migration so it stays above legacy highPriority modals. import { Dialog as BaseDialog } from '@base-ui/react/dialog' import * as React from 'react' import { cn } from '@/utils/classnames' export const Dialog = BaseDialog.Root export const DialogTrigger = BaseDialog.Trigger export const DialogTitle = BaseDialog.Title export const DialogDescription = BaseDialog.Description export const DialogClose = BaseDialog.Close export const DialogPortal = BaseDialog.Portal type DialogCloseButtonProps = Omit, 'children'> export function DialogCloseButton({ className, 'aria-label': ariaLabel = 'Close', ...props }: DialogCloseButtonProps) { return ( ) } type DialogContentProps = { children: React.ReactNode className?: string overlayClassName?: string backdropProps?: React.ComponentPropsWithoutRef } export function DialogContent({ children, className, overlayClassName, backdropProps, }: DialogContentProps) { return ( {children} ) }