import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./timeline.module.css"; /** * Represents the configurable props for the {@link Timeline} component. * * @remarks * Extends native `
` attributes so timelines can expose test hooks, ARIA metadata, * and layout overrides while delegating item composition to child components. */ interface TimelineProps extends React.HTMLAttributes { /** * Timeline items composed as children. */ children: React.ReactNode; } /** * Represents the configurable props for the {@link TimelineItem} component. */ interface TimelineItemProps extends React.HTMLAttributes { /** * The composed timeline dot and content for an individual event. */ children: React.ReactNode; } /** * Represents the configurable props for the {@link TimelineDot} component. */ type TimelineDotProps = React.HTMLAttributes; /** * Represents the configurable props for the {@link TimelineContent} component. */ interface TimelineContentProps extends React.HTMLAttributes { /** * Content rendered alongside the timeline marker. */ children: React.ReactNode; } /** * A vertical timeline container for displaying chronological events. * * @remarks * **Rendering Context**: Server- and client-compatible presentational component. * * Compose it with {@link TimelineItem}, {@link TimelineDot}, and {@link TimelineContent} * to render milestones, release notes, audit trails, or journey steps in order. * * @example * ```tsx * * * * Account created * * * ``` * * @see {@link TimelineItem} * @see {@link TimelineContent} */ const Timeline = React.forwardRef(({className, ...props}, ref) => (
)); Timeline.displayName = "Timeline"; /** * A single event row within a {@link Timeline}. * * @remarks * Renders a flex row that aligns a marker with its corresponding content block. * * @example * ```tsx * * * Invoice submitted * * ``` * * @see {@link Timeline} */ const TimelineItem = React.forwardRef(({className, ...props}, ref) => (
)); TimelineItem.displayName = "TimelineItem"; /** * A visual marker used to indicate a timeline event point. * * @remarks * The dot is decorative by default and is removed from the accessibility tree with * `aria-hidden="true"`. * * @example * ```tsx * * ``` * * @see {@link TimelineItem} */ const TimelineDot = React.forwardRef(({className, ...props}, ref) => (