{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Meter Row component",
  "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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n\n  export type MeterRowProps = {\n    label: string;\n    value: number;\n    caption: string;\n    hint?: string;\n    href?: string;\n    class?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Link from \"../compose/Link.svelte\";\n  import Progress from \"../compose/Progress.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import { cn, urlOf } from \"../utils\";\n\n  let { label, value, caption, hint, href, class: className }: MeterRowProps = $props();\n</script>\n\n<Box class={cn(\"min-w-0\", className)} data-slot=\"meter-row\">\n  {#if 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      {#if hint}\n        <Text class=\"m-0 text-xs font-medium text-muted-foreground\">\n          {hint}\n        </Text>\n      {/if}\n    </Link>\n  {:else}\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      {#if hint}\n        <Text class=\"m-0 text-xs font-medium text-muted-foreground\">\n          {hint}\n        </Text>\n      {/if}\n    </Box>\n  {/if}\n</Box>\n",
      "path": "components/meter-row.svelte",
      "target": "components/meter-row.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "meter-row",
  "registryDependencies": [
    "box",
    "link",
    "progress",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Meter Row",
  "type": "registry:component"
}
