import "./stack.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; import { type SpaceName } from "./box"; interface StackBase extends StyleProps { children?: ReactNode; /** A rung, never a number; on a grid or wrapping row it spans both axes, `gapX`/`gapY` overriding one. */ gap?: SpaceName; /** Overrides `gap` between columns, as `Box` pairs `padding`/`paddingX`. */ gapX?: SpaceName; /** Overrides `gap` between rows: a form grid wants wide columns and no row gap, since `FormField` * carries its own rhythm. */ gapY?: SpaceName; align?: "start" | "center" | "end" | "stretch" | "baseline"; justify?: "start" | "center" | "end" | "between"; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** One axis or equal columns, never both: a grid has no direction, no wrap, and no gap for a `Divider`. */ type StackFlow = { /** A column is what screens are made of; a row is the exception. */ direction?: "row" | "column"; wrap?: boolean; /** The gap sits both sides of the hairline, so `gap` alone sets the air. */ divided?: boolean; columns?: never; } | { /** Equal columns (a card deck, a stat row, tiles). A number fixes the count; `{ minWidth }` fits * what the container affords and reflows — usually better, since a fixed count squeezes narrow * screens. */ columns: number | { minWidth: number; }; direction?: never; wrap?: never; divided?: never; }; export type StackProps = StackBase & StackFlow; /** Children on one axis with one gutter, optionally hairline-divided, or equal columns with `columns`. * Null/false children drop, leaving no stray hairline. */ export declare function Stack({ children, direction, gap, gapX, gapY, align, justify, wrap, divided, columns, testID, render, ref, ...props }: StackProps): React.ReactElement>; export {};