{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "status-dot",
  "type": "registry:ui",
  "title": "Status Dot",
  "description": "The status-dot primitive.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/status-dot.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/status-dot.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { cn } from '../lib/utils';\n\n/** open: not started (a ring). active: under way. attention: waits on the reader (a halo). done: finished, quiet. warning and\n *  danger: late, failed. The app maps its own statuses to these; the label says the status in the app's words. */\nexport type StatusDotTone = 'open' | 'active' | 'attention' | 'done' | 'warning' | 'danger';\n\nconst DOT: Record<StatusDotTone, string> = {\n  open: 'border-[1.5px] border-kh-muted', // line-strong vanished on the dark canvas\n  active: 'bg-kh-accent',\n  attention: 'bg-kh-accent ring-2 ring-kh-accent/25',\n  done: 'bg-kh-ink-2/40',\n  warning: 'bg-kh-warning',\n  danger: 'bg-kh-danger',\n};\nconst TEXT: Record<StatusDotTone, string> = {\n  open: 'text-kh-muted', active: 'text-kh-accent-ink', attention: 'text-kh-accent-ink', done: 'text-kh-muted', warning: 'text-kh-warning', danger: 'text-kh-danger',\n};\n\n/** A status as a dot and a word, for rows, cards and lists where a Badge would be too loud. hideLabel keeps the word for screen\n *  readers only (a dense table beside a column heading). */\nexport function StatusDot({ tone = 'open', children, hideLabel, className }: { tone?: StatusDotTone; children: ReactNode; hideLabel?: boolean; className?: string }) {\n  return (\n    <span className={cn('inline-flex min-w-0 items-center gap-1.5 text-kh-small', TEXT[tone], className)}>\n      <span aria-hidden className={cn('size-2 shrink-0 rounded-full', DOT[tone])} />\n      <span className={hideLabel ? 'sr-only' : 'min-w-0 truncate'}>{children}</span>\n    </span>\n  );\n}\n"
    }
  ]
}
