{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dot-badge",
  "title": "Dot badge",
  "description": "A status chip led by a 6px tone dot, so colour is never the only cue.",
  "registryDependencies": [
    "@khaeli/badge",
    "@khaeli/utils"
  ],
  "files": [
    {
      "path": "registry/khaeli/ui/dot-badge.tsx",
      "content": "import type { ReactNode } from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nimport { Badge } from \"@/components/ui/badge\"\n\n/**\n * A status chip led by a 6px dot: the outline Badge pill with the state's hue\n * on the dot only, so the label stays full-contrast ink and the colour is an\n * extra cue, never the only one.\n */\n\ntype DotTone = \"positive\" | \"attention\" | \"negative\" | \"neutral\"\n\nconst DOT_TONES: Record<DotTone, string> = {\n  positive: \"bg-positive\",\n  attention: \"bg-tone-amber\",\n  negative: \"bg-destructive\",\n  neutral: \"bg-subtle-foreground\",\n}\n\nfunction DotBadge({\n  tone,\n  title,\n  className,\n  children,\n}: {\n  tone: DotTone\n  title?: string\n  className?: string\n  children: ReactNode\n}) {\n  return (\n    <Badge variant=\"outline\" title={title} className={cn(\"shrink-0 gap-1.5\", className)}>\n      <span aria-hidden=\"true\" className={cn(\"size-1.5 shrink-0 rounded-full\", DOT_TONES[tone])} />\n      {children}\n    </Badge>\n  )\n}\n\nexport { DotBadge, type DotTone }\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.",
  "type": "registry:ui"
}