{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stat-card",
  "type": "registry:item",
  "title": "Stat Card",
  "description": "One number that matters, with what it is and how it changed: revenue this month, active users, open tickets. `change` is the change as a percentage (positive or negative), said in words for screen readers (\"up 12%\"); `good` says which direction is good (\"up\" or \"down\"), so a falling error rate shows as good news.",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "data"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/stat-card.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/stat-card.js",
      "content": "// Generated by zubra from stat-card.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\nimport { state as __zubraState, computed as __zubraComputed } from \"@zubra/runtime\";\n\nexport const tag = \"stat-card\";\n\nexport default $define(tag, {\n  props: {\n    \"label\": { attribute: \"label\", default: \"\", required: false },\n    \"value\": { attribute: \"value\", default: \"\", required: false },\n    \"change\": { attribute: \"change\", default: null, required: false },\n    \"good\": { attribute: \"good\", default: \"up\", required: false },\n    \"period\": { attribute: \"period\", default: \"\", required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [],\n  events: [],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (stat-card) to ([data-zb-slotted=\\\"stat-card\\\"]) {\\n  :scope { display: block; }\\n  .stat { display: grid; gap: 0.35rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border, #e4e4e7); border-radius: var(--radius, 0.625rem); background: var(--card, #fff); color: var(--card-foreground, #18181b); }\\n  .stat-label { font-size: 0.85rem; font-weight: 600; color: color-mix(in oklab, var(--muted-foreground, #71717a) 75%, var(--foreground, #18181b)); }\\n  .stat-value { font-size: 1.75rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }\\n  .stat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: color-mix(in oklab, var(--muted-foreground, #71717a) 75%, var(--foreground, #18181b)); }\\n  .stat-change { padding: 0.1rem 0.45rem; border-radius: 999px; font-weight: 700; }\\n  .stat-good { background: color-mix(in oklab, oklch(0.6 0.15 150) 16%, var(--background, #fff)); color: color-mix(in oklab, oklch(0.6 0.15 150) 50%, var(--foreground, #18181b)); }\\n  .stat-bad { background: color-mix(in oklab, var(--destructive, #dc2626) 14%, var(--background, #fff)); color: color-mix(in oklab, var(--destructive, #dc2626) 55%, var(--foreground, #18181b)); }\\n  .stat-neutral { background: var(--muted, #f4f4f5); }\\n  .stat-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\\n}\\n}\\n\",\n  template: \"\\n  <div class=\\\"stat\\\">\\n    <span class=\\\"stat-label\\\"></span>\\n    <span class=\\\"stat-value\\\"></span>\\n    <!--[--><!--]-->\\n  </div>\\n\",\n  setup($p, $emit) {\n                                    \n  const direction = __zubraComputed(() => ($p.change == null ? \"\" : $p.change > 0 ? \"up\" : $p.change < 0 ? \"down\" : \"flat\"))\n  const tone = __zubraComputed(() => (direction.get() === \"flat\" || !direction.get() ? \"neutral\" : direction.get() === $p.good ? \"good\" : \"bad\"))\n  const changeText = __zubraComputed(() => ($p.change == null ? \"\" : `${direction.get() === \"up\" ? \"▲\" : direction.get() === \"down\" ? \"▼\" : \"■\"} ${Math.abs($p.change)}%`))\n  const spoken = __zubraComputed(() => ($p.change == null ? \"\" : direction.get() === \"flat\" ? \"no change\" : `${direction.get()} ${Math.abs($p.change)}%`))\n    return [\n      { path: [0, 0], text: () => $t($p.label) },\n      { path: [0, 1], text: () => $t($p.value) },\n      { path: [0, 2], when: () => (($p.change !== null) || $p.period), blocks: [{ template: \"<span class=\\\"stat-foot\\\">\\n      <!--[--><!--]-->\\n      <span></span>\\n    </span>\", parts: () => [{ path: [0, 0], when: () => ($p.change !== null), blocks: [{ template: \"<span><span aria-hidden=\\\"true\\\"></span><span class=\\\"stat-hidden\\\"></span></span>\", parts: () => [{ path: [0], attribute: \"class\", value: () => \"stat-change stat-\" + $t($r(tone)) }, { path: [0, 0], text: () => $t($r(changeText)) }, { path: [0, 1], text: () => $t($r(spoken)) }] }, null] }, { path: [0, 1], text: () => $t($p.period) }] }, null] },\n    ];\n  },\n});\n"
    }
  ]
}
