import "./board.css"; import { type ReactNode } from "react"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; /** * THE COLUMN WIDTH, owned by the kit — the measuring form of `board.css`'s own * `--lotics-board-column-width`. 280 is `MIN_CONTROL_WIDTH` (160) plus room for a * title that wraps twice and a footer row — the narrowest a card stays READABLE — * and it leaves the next column visibly peeking at 375. */ export declare const BOARD_COLUMN_WIDTH = 280; /** One place a card may be sent — a value of the field the board's columns are. */ export interface BoardMove { /** The destination column's `columnKey`. */ key: string; /** What the destination is CALLED, in the reader's language — a move names * where the card lands. */ label: string; disabled?: boolean; } export interface BoardProps extends StyleProps { /** `BoardColumn`s, in the order the field's values are read. */ children: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * THE COLUMN BOARD — records as cards, columns as the values of ONE field, and the * act the shape exists for: MOVING a card from one column to another. * * **The move is keyboard-first.** Every card carries a menu naming its destinations * (`moves`); pointer drag is layered on that same list, and a drop is refused * unless the destination is one the card already declared. * * **The board owns its horizontal scroll**, and **columns grow while the page * scrolls**: a board with independently scrolling columns needs a bounded height, * and a height nobody can derive gets hand-picked. */ export declare function Board({ children, testID, render, ref, ...props }: BoardProps): React.JSX.Element; export interface BoardColumnProps extends StyleProps { /** The value this column IS, drawn by the component its data role owns. The board * never renders the identity itself, so a column heading and the same value in a * cell cannot look like two different things. */ heading: ReactNode; /** The column's key — what a `BoardMove` names and what a drop resolves to. */ columnKey: string; /** * How many cards are in this pile — and what decides whether the column shows its * cards or its empty state, so the number beside the heading and the pile under it * are one statement. A PROP, never formatted into `heading`: folded in, the name * of the column and its size are one string a screen reader reads as a name. */ count: number; /** This column's own act, on the heading row's right edge — an Add that pre-sets * the column's value. Renders whether or not the column has cards. */ action?: ReactNode; /** What to say when the column is empty. Falls back to the locale's own line. */ emptyMessage?: string; /** The `BoardCard`s. */ children?: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** One pile — a heading that states its value and its size, and the cards under it. */ export declare function BoardColumn({ heading, columnKey, count, action, emptyMessage, children, testID, render, ref, ...props }: BoardColumnProps): React.ReactElement>; export interface BoardCardProps extends StyleProps { /** The record's id — what `onMove` is about, and what a drag carries. */ id: string; /** The record's identity. Rendered as the card's own first line. */ title: string; /** The facts under the title — a member, a date, a badge. Keep it to what the * reader sorts the pile by; everything else is what opening the card is for. */ children?: ReactNode; /** Opens the record. */ onPress: () => void; /** The keyboard door's accessible name — name the record ("Open ORD-1042"). * Falls back to the locale's "Open ". */ openLabel?: string; /** This record is the one currently open. */ selected?: boolean; /** Where this card may go — every column but its own. Empty or omitted and the * card carries no move control at all, which is the honest rendering of a card * that cannot be moved. */ moves?: BoardMove[]; /** Called with the destination `columnKey`, by the menu AND by a pointer drop. */ onMove?: (columnKey: string) => void; /** The move control's accessible name — name the record ("Move ORD-1042"). * Falls back to the locale's "Move <title>". */ moveLabel?: string; testID?: string; ref?: React.Ref<HTMLElement>; render?: useRender.RenderProp; } /** * One record on the board: a press that opens it, and the control that moves it. * * The card is a surface with a `RowFocusEntry` inside, not a button wrapping its * content — it carries its own controls, and a button must not contain a button. */ export declare function BoardCard({ id, title, children, onPress, openLabel, selected, moves, onMove, moveLabel, testID, render, ref, ...props }: BoardCardProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;