{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Key counters of a dashboard.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * Dashboard counters in a row or a grid: tiles with an icon, a number and a caption, or compact figures. Axes:\n * columns (2, 4), item (tile, compact), tone (default, muted), density (default, compact).\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Grid, Group, Stack, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { StatTile } from \"../components/stat-tile\";\nimport type { Metric } from \"./metric-row.types\";\n\nexport type MetricRowProps = {\n  id: string;\n  title: string;\n  metrics: Metric[];\n  empty?: string;\n  cols?: \"2\" | \"4\";\n  item?: \"tile\" | \"compact\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function MetricRow({\n  id,\n  title,\n  metrics,\n  empty = \"\",\n  cols = \"4\",\n  item = \"tile\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: MetricRowProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n      {((metrics?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"gauge\" title={empty} />\n      ) : (\n        <Grid cols={(((cols as string) === \"2\") ? \"1-2\" : \"1-4\")} class=\"gap-4\" data-slot=\"items\">\n          <For each={metrics ?? []}>{(m) => (\n            <>\n              {((item as string) === \"tile\") ? (\n                <Box data-slot=\"item\">\n                  <StatTile label={m.label} value={m.value} icon={m.icon} hint={m.hint} />\n                </Box>\n              ) : (\n                <Stack gap=\"0\" class=\"rounded bg-card p-4 inset-ring inset-ring-border\" data-slot=\"item\">\n                  <Group gap=\"2\" align=\"center\" class=\"text-muted-foreground\">\n                    <LucideIcon name={m.icon} size={16} />\n                    <Text size=\"xs\">\n                      {m.label}\n                    </Text>\n                  </Group>\n                  <Text size=\"2xl\" weight=\"bold\">\n                    {m.value}\n                  </Text>\n                  <Text size=\"xs\" class=\"text-muted-foreground\">\n                    {m.hint}\n                  </Text>\n                </Stack>\n              )}\n            </>\n          )}</For>\n        </Grid>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/metric-row.tsx",
      "target": "blocks/metric-row.tsx"
    },
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type Metric = {\n  id: string;\n  label: string;\n  value: string;\n  icon: string;\n  hint: string;\n};\n",
      "path": "blocks/metric-row.types.ts",
      "target": "blocks/metric-row.types.ts"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "widgets",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "metric-row",
  "registryDependencies": [
    "compose",
    "empty-state",
    "lucide-icon",
    "section-frame",
    "stat-tile",
    "utils"
  ],
  "runtime": "solid",
  "title": "Metric Row",
  "type": "registry:block"
}
