{"version":3,"file":"timeline.types.mjs","names":[],"sources":["../../../../package/common/timeline/timeline.types.ts"],"sourcesContent":["import type React from 'react';\nimport type { IconContent } from '../types/icon.types';\nimport type { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';\nimport type { ColorValue } from '../themeProvider/color.types';\n\n/** Layout of entries relative to the connecting line. */\nexport enum TimelineAlignment {\n  /** Line and markers on the left, content to the right (the default). */\n  Left = 'left',\n  /** Line and markers on the right, content to the left. */\n  Right = 'right',\n  /** Line down the center, entries alternating left/right. */\n  Alternate = 'alternate',\n}\n\nexport type TimelineSlots =\n  | 'root'\n  | 'item'\n  | 'marker'\n  | 'dot'\n  | 'connector'\n  | 'content'\n  | 'title'\n  | 'description'\n  | 'timestamp';\n\nexport interface TimelineItem {\n  /** Stable identity for the entry, used as its React key. Falls back to its array index when omitted; pass one whenever `items` can be reordered or have entries prepended (e.g. a live \"newest first\" audit log), so React doesn't misattribute row state across the shift. */\n  id?: string | number;\n  /** Primary label for the entry. */\n  title: React.ReactNode;\n  /** Secondary line under the title. */\n  description?: React.ReactNode;\n  /** Rendered next to the title, e.g. a date or relative time (\"2 hours ago\"). */\n  timestamp?: React.ReactNode;\n  /** Icon shown in the marker instead of a plain dot — a FontAwesome icon or any node. */\n  icon?: IconContent;\n  /** The marker's colour: a `ThemeColor` or any CSS colour. Unset, it is `--timeline-dot-color`. */\n  color?: ColorValue;\n  /** Extra content rendered under the description, e.g. a diff, an attachment, an actor avatar. */\n  content?: React.ReactNode;\n  /** Makes the whole entry clickable (e.g. to open the full record), rendering it as an accessible button. */\n  onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;\n  /** Disables the entry: never clickable, dimmed. Only relevant alongside `onClick`. */\n  disabled?: boolean;\n}\n\nexport interface TimelineProps extends HtmlProps {\n  /** The entries to render, in display order (typically newest first for an audit log). */\n  items?: TimelineItem[];\n  /** Layout of entries relative to the connecting line (default `Left`). */\n  alignment?: TimelineAlignment;\n  className?: string;\n  style?: React.CSSProperties;\n  classNames?: SlotClassNames<TimelineSlots>;\n  styles?: SlotStyles<TimelineSlots>;\n}\n"],"mappings":"aAMA,IAAY,EAAL,SAAA,EAAA,OAEL,GAAA,KAAA,OAEA,EAAA,MAAA,QAEA,EAAA,UAAA,aACF,EAAA,CAAA,CAAA"}