{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Orders per day as bars or meters.",
  "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 * A panel with a chart of one series: vertical bars with captions, or meter rows with a percent. Axes: chart\n * (bars, meters), size (default, compact), tone (default, muted).\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Block, Container, Stack } from \"../compose\";\nimport { BarChart } from \"../components/bar-chart\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MeterRow } from \"../components/meter-row\";\nimport { Panel } from \"../components/panel\";\nimport { tpl } from \"../utils\";\nimport type { Point } from \"./chart-panel.types\";\n\nexport type ChartPanelProps = {\n  id: string;\n  title: string;\n  text: string;\n  series: Point[];\n  empty?: string;\n  summary: string;\n  percent: string;\n  chart?: \"bars\" | \"meters\";\n  size?: \"default\" | \"compact\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n\nexport function ChartPanel({\n  id,\n  title,\n  text,\n  series,\n  empty = \"\",\n  summary,\n  percent,\n  chart = \"bars\",\n  size = \"default\",\n  tone = \"default\",\n  landmarkLabel,\n}: ChartPanelProps) {\n  return (\n    <Block\n      tag=\"section\"\n      aria-labelledby={(landmarkLabel ? undefined : ((title && id) ? tpl(\"{0}-t\", id) : undefined))}\n      aria-label={landmarkLabel}\n      data-slot=\"panel-section\"\n    >\n      <Container class=\"mx-auto w-full max-w-6xl px-4 py-8\" data-slot=\"container\">\n        <Panel title={title} description={text} id={id} class={(((tone as string) === \"muted\") ? \"bg-muted\" : \"\")}>\n          {((series?.length ?? 0) === 0) ? (\n            <EmptyState icon=\"chart-column\" title={empty} />\n          ) : ((chart as string) === \"bars\") ? (\n            <BarChart bars={series} label={summary} height={(((size as string) === \"compact\") ? 96 : 176)} />\n          ) : (\n            <Stack gap={(((size as string) === \"compact\") ? \"0\" : \"2\")} align=\"stretch\" data-slot=\"items\">\n              <For each={series ?? []}>{(s) => (\n                <MeterRow label={s.label} value={s.value} caption={tpl(percent, s.value)} />\n              )}</For>\n            </Stack>\n          )}\n        </Panel>\n      </Container>\n    </Block>\n  );\n}\n",
      "path": "blocks/chart-panel.tsx",
      "target": "blocks/chart-panel.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 Point = {\n  id: string;\n  label: string;\n  value: number;\n};\n",
      "path": "blocks/chart-panel.types.ts",
      "target": "blocks/chart-panel.types.ts"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "widgets",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "chart-panel",
  "registryDependencies": [
    "bar-chart",
    "compose",
    "empty-state",
    "meter-row",
    "panel",
    "utils"
  ],
  "runtime": "solid",
  "title": "Chart Panel",
  "type": "registry:block"
}
