import * as React from "react"; import type { DensityProp } from "../../props/vocabulary/index.js"; export type RangeTimelineRow = { id: string; label: React.ReactNode; start: number; end: number; startLabel: string; endLabel: string; /** * Nesting level, 0 for a top-level row. Rows arrive flat and depth-first (a parent, then its * descendants); a row is a parent when the row after it is deeper. The component draws the * indent (`--range-timeline-indent-width` per level) and the disclosure. */ depth?: number; }; export type RangeTimelineProps = React.HTMLAttributes & { label: string; /** `muted` tints that column down the whole body — a non-working day, a closed period. */ columns: { label: string; units: number; muted?: boolean; }[]; bands?: { label: string; units: number; }[]; rows: RangeTimelineRow[]; today?: number | null; onRangeChange?: (id: string, edge: "start" | "end", delta: number) => void; /** * Rule the body as a grid: a line between rows, a line under the header, and a vertical line for * every column down the whole body. Default `true`, like `Calendar bordered`; `false` restores * the header-only ruling. Colour `--range-timeline-grid-color`, weight `--range-timeline-grid-width`. */ bordered?: boolean; /** * How wide ONE axis unit is — the canonical density vocabulary, the same three steps * `DataTable density` uses. `default` (56px/day) is the shipped width, so an existing Gantt * does not move; `compact` (42px/day) fits a third more days on the same screen; `comfortable` * (70px/day) spreads them out. It moves the column width ONLY — row height, bar height and the * label column are identical at every step. Retune a step with * `--range-timeline-unit-width-{compact,default,comfortable}`. */ density?: DensityProp; /** * Controlled ids of the EXPANDED parent rows (same spelling as `Tree expandedValues`). A folded * parent hides every descendant row — label and bar. */ expandedValues?: readonly string[]; /** Uncontrolled initial expanded parents. Omitted: every parent starts expanded. */ defaultExpandedValues?: readonly string[]; /** Fires with the next expanded parent ids, for controlled and uncontrolled timelines alike. */ onExpandedValuesChange?: (values: string[]) => void; }; /** A horizontal range axis. Units and labels are data; the design system owns all geometry. */ export declare const RangeTimeline: React.ForwardRefExoticComponent & { label: string; /** `muted` tints that column down the whole body — a non-working day, a closed period. */ columns: { label: string; units: number; muted?: boolean; }[]; bands?: { label: string; units: number; }[]; rows: RangeTimelineRow[]; today?: number | null; onRangeChange?: (id: string, edge: "start" | "end", delta: number) => void; /** * Rule the body as a grid: a line between rows, a line under the header, and a vertical line for * every column down the whole body. Default `true`, like `Calendar bordered`; `false` restores * the header-only ruling. Colour `--range-timeline-grid-color`, weight `--range-timeline-grid-width`. */ bordered?: boolean; /** * How wide ONE axis unit is — the canonical density vocabulary, the same three steps * `DataTable density` uses. `default` (56px/day) is the shipped width, so an existing Gantt * does not move; `compact` (42px/day) fits a third more days on the same screen; `comfortable` * (70px/day) spreads them out. It moves the column width ONLY — row height, bar height and the * label column are identical at every step. Retune a step with * `--range-timeline-unit-width-{compact,default,comfortable}`. */ density?: DensityProp; /** * Controlled ids of the EXPANDED parent rows (same spelling as `Tree expandedValues`). A folded * parent hides every descendant row — label and bar. */ expandedValues?: readonly string[]; /** Uncontrolled initial expanded parents. Omitted: every parent starts expanded. */ defaultExpandedValues?: readonly string[]; /** Fires with the next expanded parent ids, for controlled and uncontrolled timelines alike. */ onExpandedValuesChange?: (values: string[]) => void; } & React.RefAttributes>;