import "./timetable.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"; export interface TimetableLabels { /** Header of the time column. */ time: string; /** Header of the column naming what is scheduled — a vehicle, a person, a room. */ subject: string; /** Header of the optional state column. */ status: string; } /** One FIXED position on the repeating axis — a weekday, an hour band. */ export interface TimetableSlot { value: T; /** One or two characters, shown ONCE in the header. */ label: string; /** What a screen reader says for a cell in this column. */ name: string; } export interface TimetableRow { id: string; /** The row's identity on the time axis — "07:30". Text, never an editor: * the subject of a row is read, and edits in the row's `detail`. */ time: string; /** The positions this row is ON. */ active: T[]; /** What runs in this slot. A node, so an identity mark rides it. */ subject: ReactNode; /** A state worth a word — "withdrawn". The column exists only when some row has one. */ status?: ReactNode; disabled?: boolean; /** The row's verbs — an `ActionMenu`. Rendered in the trailing gutter. */ trailing?: ReactNode; /** Expands under the row: where the time and the subject are EDITED. */ detail?: ReactNode; expanded?: boolean; onPress?: () => void; accessibilityLabel?: string; } export interface TimetableProps extends StyleProps { slots: TimetableSlot[]; /** The position the reader is standing in — today's weekday. Its column is * tinted down the whole grid and its header carries `aria-current`. */ current?: T; rows: TimetableRow[]; onToggle: (rowId: string, next: T[]) => void; /** Refuse to turn a row's LAST position off — see `ToggleStrip`. */ minOne?: boolean; labels?: Partial; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A TIMETABLE: slots down the side, a fixed repeating axis across the top, and * a mark wherever a slot is on — a departure board, a shift roster, a lane's * opening hours. * * It is not `CalendarView`: nothing here has a DATE, so there is no week to page * to and no duration to draw. The axis is named ONCE in the header and the cells * are marks under it, rather than a `Table` of labelled `ToggleStrip`s. * * The row's time and subject are TEXT: a column of always-open editors makes a * list look like a form (composition.md § Master-detail), so a row's edits live * in its `detail`. The pattern is the one thing edited in place, because a mark * IS its own editor. */ export declare function Timetable(props: TimetableProps): React.ReactElement>;