{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "activity-feed",
  "title": "Activity Feed",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "A compact actor and action feed with timestamps and an empty state.",
  "registryDependencies": [
    "utils",
    "https://ui.ballmac.com/r/i18n.json"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/activity-feed.tsx",
      "content": "// Ballmac UI: Activity Feed. https://ui.ballmac.com/components/activity-feed\n\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { useMessages } from \"@/lib/ballmac/i18n\"\n\ntype Activity = {\n  /** Stable item identifier. */ id: string\n  /** Person or system responsible. */ actor: string\n  /** Action description. */ action: string\n  /** Accessible timestamp. */ timestamp: string\n  /** ISO datetime for machine readers. */ dateTime?: string\n  /** Optional context such as a project or file. */ subject?: string\n  /** Optional initials or symbol. */ mark?: string\n}\ntype ActivityFeedProps = React.ComponentProps<\"ol\"> & {\n  /** Ordered activity entries. */ items: Activity[]\n  /** Message when the feed has no entries. */ emptyMessage?: string\n}\nfunction ActivityFeed({\n  className,\n  items,\n  emptyMessage,\n  ...props\n}: ActivityFeedProps) {\n  const msg = useMessages()\n  emptyMessage ??= msg(\"activity-feed.emptyMessage\", \"No activity yet\")\n  return (\n    <ol\n      data-slot=\"activity-feed\"\n      className={cn(\n        \"bg-card min-w-0 rounded-xl border border-border px-4\",\n        className,\n      )}\n      {...props}\n    >\n      {items.length ? (\n        items.map((item) => (\n          <li\n            key={item.id}\n            data-slot=\"activity-feed-item\"\n            className=\"flex min-w-0 gap-3 border-b border-border py-4 last:border-b-0\"\n          >\n            <span\n              data-slot=\"activity-feed-mark\"\n              aria-hidden=\"true\"\n              className=\"bg-primary/10 text-primary flex size-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold\"\n            >\n              {item.mark ?? item.actor.slice(0, 2).toUpperCase()}\n            </span>\n            <div className=\"min-w-0 flex-1\">\n              <p className=\"text-sm leading-relaxed\">\n                <strong className=\"font-medium\">{item.actor}</strong>{\" \"}\n                {item.action}\n                {item.subject && (\n                  <>\n                    {\" \"}\n                    <span className=\"font-medium\">{item.subject}</span>\n                  </>\n                )}\n              </p>\n              <time\n                dateTime={item.dateTime}\n                className=\"text-muted-foreground mt-1 block text-xs\"\n              >\n                {item.timestamp}\n              </time>\n            </div>\n          </li>\n        ))\n      ) : (\n        <li\n          data-slot=\"activity-feed-empty\"\n          className=\"text-muted-foreground py-8 text-center text-sm\"\n        >\n          {emptyMessage}\n        </li>\n      )}\n    </ol>\n  )\n}\nexport { ActivityFeed, type ActivityFeedProps, type Activity }\n",
      "type": "registry:ui",
      "target": "@components/ballmac/activity-feed.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "activity",
      "history",
      "events"
    ],
    "version": "1.0.0",
    "updated": "2026-09-30",
    "ai": {
      "summary": "A compact actor and action feed with timestamps and an empty state.",
      "whenToUse": [
        "Show recent changes made by people or the system"
      ],
      "whenNotToUse": [
        "Use Timeline for milestone progression"
      ],
      "composesWith": [
        "timeline"
      ],
      "a11y": [
        {
          "keys": "None",
          "action": "Static content is announced with semantic structure"
        }
      ],
      "customization": [
        "Content, layout, and token-based className styling"
      ]
    },
    "examples": [
      "activity-feed-demo",
      "activity-feed-states"
    ],
    "url": "https://ui.ballmac.com/components/activity-feed"
  },
  "categories": [
    "data-display"
  ],
  "type": "registry:ui"
}