import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from "react"; import { cn } from "../lib/cn"; /** * Width-, height-, and overflow-safe page frame for workspace content surfaces. * * Scroll ownership and column width are deliberately split: * - Outer (`data-slot="content-page"`) is the full-width flex child that owns * vertical scroll + overscroll containment inside the fixed app canvas. * - Inner (`data-slot="content-page-inner"`) is the centered max-width column. * * Putting `overflow-y-auto` on the max-width box itself left gutters outside * the scrollport; wheel there scrolled the document and shoved the whole app * up (empty band + floating DevTools). Never merge those two again. * * The `min-w-0` chain is intentional: pages live inside a flex shell and must * be allowed to shrink before a long untrusted name can widen the viewport. */ export const ContentPage = /* @__PURE__ */ forwardRef< HTMLDivElement, ComponentPropsWithoutRef<"div"> & { width?: "standard" | "wide" } >(function ContentPage({ className, width = "wide", children, ...props }, ref) { return (
{children}
); }); /** A bordered content region with consistent density and no implicit width. */ export const ContentSurface = /* @__PURE__ */ forwardRef< HTMLElement, ComponentPropsWithoutRef<"section"> >(function ContentSurface({ className, ...props }, ref) { return (
); }); /** Compact title/description/action row used inside content surfaces. */ export function ContentSurfaceHeader({ title, description, actions, className, }: { title: ReactNode; description?: ReactNode | undefined; actions?: ReactNode | undefined; className?: string | undefined; }) { return (

{title}

{description ? (

{description}

) : null}
{actions ? (
{actions}
) : null}
); } /** Responsive form layout: one column first, opt-in columns as space permits. */ export const FormGrid = /* @__PURE__ */ forwardRef< HTMLDivElement, ComponentPropsWithoutRef<"div"> & { columns?: "two" | "three" } >(function FormGrid({ className, columns = "two", ...props }, ref) { return (
); }); /** Accessible form-field stack shared by native and custom form controls. */ export const FormField = /* @__PURE__ */ forwardRef< HTMLLabelElement, Omit, "children"> & { label: ReactNode; hint?: ReactNode | undefined; children: ReactNode; } >(function FormField({ label, hint, className, children, ...props }, ref) { return ( ); }); /** * Contained horizontal overflow for genuinely tabular or wide data. * This is the only element that scrolls; it never widens the page itself. */ export const DataScroller = /* @__PURE__ */ forwardRef< HTMLDivElement, ComponentPropsWithoutRef<"div"> >(function DataScroller({ className, ...props }, ref) { return (
); });