{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Counters, a chart and recent activity in one section.",
  "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/dashboard-overview.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\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// DashboardOverviewProps are the props of DashboardOverview; the values are the JSON shapes of the TypeScript props.\ntype DashboardOverviewProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tMetrics any `json:\"metrics\"`\n\tChart any `json:\"chart\"`\n\tActivity any `json:\"activity\"`\n\tLayout any `json:\"layout\"`\n\tCols any `json:\"cols\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The first screen of an app: counters, a chart and recent activity. Axes: layout (split: the chart and the activity side by side, stacked: one below the other), cols (2, 4), tone, density.\ntempl DashboardOverview(p DashboardOverviewProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vMetrics := p.Metrics }}\n\t{{ vChart := p.Chart }}\n\t{{ vActivity := p.Activity }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\n\t{{ vCols := uiutils.Def(p.Cols, \"4\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {\n\t\t@compose.Stack(compose.StackProps{Gap: \"6\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\tif uiutils.Gt(uiutils.Len(vMetrics), float64(0)) {\n\t\t\t\t@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vCols, \"2\")), \"1-2\", \"1-4\")), BoxProps: box.BoxProps{Class: \"gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor _, vM := range uiutils.L(vMetrics) {\n\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@StatTile(StatTileProps{Label: uiutils.Get(vM, \"label\"), Value: uiutils.Get(vM, \"value\"), Icon: uiutils.Get(vM, \"icon\"), Hint: uiutils.Get(vM, \"hint\")})\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\t@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"1-2\", \"1\")), BoxProps: box.BoxProps{Class: \"items-stretch gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"panels\")}}) {\n\t\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vChart, \"series\")), float64(0)) {\n\t\t\t\t\t@Panel(PanelProps{Title: uiutils.Get(vChart, \"title\"), Description: uiutils.Get(vChart, \"text\"), Id: uiutils.Tpl(\"{0}-chart\", vId), Class: uiutils.Cnv(\"h-full\")}) {\n\t\t\t\t\t\t@BarChart(BarChartProps{Bars: uiutils.Get(vChart, \"series\"), Label: uiutils.Get(vChart, \"summary\"), Height: float64(144)})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vActivity, \"events\")), float64(0)) {\n\t\t\t\t\t@Panel(PanelProps{Title: uiutils.Get(vActivity, \"title\"), Description: uiutils.Get(vActivity, \"text\"), Id: uiutils.Tpl(\"{0}-feed\", vId), Class: uiutils.Cnv(\"h-full\")}) {\n\t\t\t\t\t\t@Timeline(TimelineProps{Items: uiutils.Get(vActivity, \"events\")})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/dashboard-overview.templ",
      "target": "blocks/dashboard-overview.templ"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "widgets",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "dashboard-overview",
  "registryDependencies": [
    "bar-chart",
    "box",
    "grid",
    "kit-box",
    "panel",
    "section-frame",
    "stack",
    "stat-tile",
    "timeline",
    "utils"
  ],
  "runtime": "templ",
  "title": "Dashboard Overview",
  "type": "registry:block"
}
