{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.",
  "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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With\n * `href` the whole row is a link.\n */\nimport { type JSX } from \"solid-js\";\nimport { Box, Link, Progress, Text } from \"../compose\";\nimport { cn, urlOf } from \"../utils\";\n\nexport type MeterRowProps = {\n  label: string;\n  value: number;\n  caption: string;\n  hint?: string;\n  href?: string;\n  class?: string;\n};\n\nexport function MeterRow({ label, value, caption, hint, href, class: className }: MeterRowProps) {\n  return (\n    <Box class={cn(\"min-w-0\", className)} data-slot=\"meter-row\">\n      {href ? (\n        <Link\n          href={urlOf(href)}\n          variant=\"block\"\n          class=\"flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted\"\n        >\n          <Box class=\"flex items-baseline justify-between gap-4\">\n            <Text class=\"m-0 min-w-0 truncate text-sm font-bold text-foreground\">\n              {label}\n            </Text>\n            <Text class=\"m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground\">\n              {caption}\n            </Text>\n          </Box>\n          <Progress value={(value == null ? undefined : String(value))} max=\"100\" aria-label={label} />\n          {hint ? (\n            <Text class=\"m-0 text-xs font-medium text-muted-foreground\">\n              {hint}\n            </Text>\n          ) : null}\n        </Link>\n      ) : (\n        <Box class=\"flex min-w-0 flex-col gap-2 p-2\">\n          <Box class=\"flex items-baseline justify-between gap-4\">\n            <Text class=\"m-0 min-w-0 truncate text-sm font-bold text-foreground\">\n              {label}\n            </Text>\n            <Text class=\"m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground\">\n              {caption}\n            </Text>\n          </Box>\n          <Progress value={(value == null ? undefined : String(value))} max=\"100\" aria-label={label} />\n          {hint ? (\n            <Text class=\"m-0 text-xs font-medium text-muted-foreground\">\n              {hint}\n            </Text>\n          ) : null}\n        </Box>\n      )}\n    </Box>\n  );\n}\n",
      "path": "components/meter-row.tsx",
      "target": "components/meter-row.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "meter-row",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "solid",
  "title": "Meter Row",
  "type": "registry:component"
}
