{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "display",
  "status": "alpha",
  "import": "@senvenli/react/display",
  "name": "timeline",
  "title": "Timeline",
  "exports": [
    "Timeline"
  ],
  "description": "A record's history grouped by day, with icons, tones and recent events in relative time.",
  "keywords": [
    "history",
    "activity",
    "audit log",
    "events"
  ],
  "usage": {
    "when": [
      "What happened to one record, and when."
    ],
    "instead": [
      {
        "use": "stepper",
        "when": "The steps lie ahead and are a flow to complete."
      },
      {
        "use": "grid-list",
        "when": "Events have no time order that matters."
      }
    ]
  },
  "a11y": {
    "builtIn": [
      "Day headings keep the outline; times show the exact value on hover and to screen readers."
    ],
    "youProvide": [
      "The time zone the events belong to."
    ]
  },
  "related": [
    "grid-list"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/display/timeline.tsx"
  ],
  "props": {
    "Timeline": [
      {
        "name": "items",
        "type": "TimelineItem[]",
        "required": true,
        "origin": "own",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "icon": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "tone": {
                "type": "string",
                "enum": [
                  "neutral",
                  "danger",
                  "success",
                  "brand"
                ]
              },
              "title": {
                "type": "string"
              },
              "meta": {
                "type": "string"
              },
              "children": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ]
          }
        }
      },
      {
        "name": "order",
        "type": "\"newest\" | \"oldest\"",
        "required": false,
        "origin": "own",
        "default": "\"newest\"",
        "description": "With timestamps: `newest` first (default) or `oldest` first. Without them the list keeps the order given.",
        "schema": {
          "type": "string",
          "enum": [
            "newest",
            "oldest"
          ]
        }
      },
      {
        "name": "timeZone",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "The time zone the events belong to (\"Europe/Berlin\"): times show in it, and server and browser then format the\nsame text. Left out, the browser's own zone (the server's on the server, settled on the client). An unknown zone\nfalls back to UTC with a warning.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "now",
        "type": "Date",
        "required": false,
        "origin": "own",
        "description": "\"Now\" for relative times. Without it, times render absolute on the server and on the first\nclient render, then read relative (\"3 min. ago\") after mount and stay current while any event\nis under an hour old."
      },
      {
        "name": "groupByDay",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "default": "false",
        "description": "Groups the events under a title per day, for a long activity feed. Off by default.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "dayHeadingLevel",
        "type": "4 | 2 | 3 | 5 | 6",
        "required": false,
        "origin": "own",
        "default": "3",
        "description": "Heading level of the day titles with `groupByDay`.",
        "schema": {
          "enum": [
            4,
            2,
            3,
            5,
            6
          ]
        }
      }
    ]
  },
  "tokens": [
    "ds-background-brand-bold",
    "ds-background-danger",
    "ds-background-neutral",
    "ds-background-success",
    "ds-border",
    "ds-icon",
    "ds-icon-brand",
    "ds-icon-danger",
    "ds-icon-information",
    "ds-icon-subtle",
    "ds-icon-success",
    "ds-icon-warning",
    "ds-radius-full",
    "ds-size-icon",
    "ds-size-icon-large",
    "ds-size-icon-small",
    "ds-space-025",
    "ds-space-050",
    "ds-space-150",
    "ds-space-200",
    "ds-text",
    "ds-text-on-brand",
    "ds-text-subtle",
    "ds-text-subtlest"
  ],
  "strings": [],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
