{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Recent events as a timeline or a list.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/activity-feed.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ActivityFeedProps are the props of ActivityFeed; the values are the JSON shapes of the TypeScript props.\ntype ActivityFeedProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tText any `json:\"text\"`\n\tEvents any `json:\"events\"`\n\tEmpty any `json:\"empty\"`\n\tLayout any `json:\"layout\"`\n\tDensity any `json:\"density\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A panel with recent events: a timeline with dots on a line, or a list of rows with an icon. Axes: layout (timeline, list), density (default, compact), tone (default, muted).\ntempl ActivityFeed(p ActivityFeedProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vText := p.Text }}\n\t{{ vEvents := p.Events }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"timeline\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"section\", Attrs: uiutils.Attrs(\"aria-labelledby\", uiutils.Cond(uiutils.T(vLandmarkLabel), nil, uiutils.Cond(uiutils.T(uiutils.And(vTitle, vId)), uiutils.Tpl(\"{0}-t\", vId), nil)), \"aria-label\", vLandmarkLabel, \"data-slot\", \"panel-section\")}}) {\n\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: \"mx-auto w-full max-w-6xl px-4 py-8\", Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t@Panel(PanelProps{Title: vTitle, Description: vText, Id: vId, Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(vTone, \"muted\")), \"bg-muted\", \"\"))}) {\n\t\t\t\tif uiutils.Eq(uiutils.Len(vEvents), float64(0)) {\n\t\t\t\t\t@EmptyState(EmptyStateProps{Icon: \"activity\", Title: vEmpty})\n\t\t\t\t} else if uiutils.Eq(vLayout, \"timeline\") {\n\t\t\t\t\t@Timeline(TimelineProps{Items: vEvents})\n\t\t\t\t} else {\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col p-0\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\t\tfor _, vE := range uiutils.L(vEvents) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex items-start justify-between gap-4 border-b border-border last:border-0\", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"py-2\", \"py-4\"))), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vE, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif uiutils.Eq(vDensity, \"default\") {\n\t\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vE, \"text\")) }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"shrink-0 text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vE, \"time\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/activity-feed.templ",
      "target": "blocks/activity-feed.templ"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "widgets",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "activity-feed",
  "registryDependencies": [
    "block",
    "container",
    "empty-state",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "panel",
    "stack",
    "text",
    "timeline",
    "utils"
  ],
  "runtime": "templ",
  "title": "Activity Feed",
  "type": "registry:block"
}
