{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "title": "Badge",
  "description": "A short status or label in a soft tinted pill.",
  "registryDependencies": [
    "https://sproutboat.com/ikada/r/theme.json",
    "https://sproutboat.com/ikada/r/cn.json",
    "https://sproutboat.com/ikada/r/status.json",
    "https://sproutboat.com/ikada/r/status-glyph.json"
  ],
  "files": [
    {
      "path": "registry/ikada/ui/badge.tsx",
      "content": "\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/components/ikada/lib/cn\";\nimport { softSurface } from \"@/components/ikada/status\";\nimport type { Status } from \"@/components/ikada/status\";\nimport { StatusGlyph } from \"@/components/ikada/status-glyph\";\n\nexport interface BadgeProps extends ComponentProps<\"span\"> {\n  /** Status that sets the colour and the glyph. Default neutral. */\n  tone?: Status;\n  /** Adds a leading status shape. The text is always the primary signal. */\n  dot?: boolean;\n  /** With tone=\"success\" and a dot: the bullseye shape for \"Live\" (serving traffic) instead of the \"Ready\" circle. */\n  live?: boolean;\n  /** With tone=\"success\" and a dot: the dot sprouts on mount, for something just created or just succeeded. */\n  sprout?: boolean;\n}\n\n/** A short status or label in a soft tinted pill. With `dot`, a status shape leads the text. */\nexport function Badge({\n  tone = \"neutral\",\n  dot = false,\n  live = false,\n  sprout = false,\n  className,\n  children,\n  ref,\n  ...props\n}: BadgeProps) {\n  return (\n    <span\n      data-slot=\"badge\"\n      ref={ref}\n      data-tone={tone}\n      className={cn(\n        \"inline-flex h-6 max-w-full min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full px-2.5 text-sb-xs font-semibold\",\n        dot && \"ps-2\",\n        softSurface[tone],\n        className,\n      )}\n      {...props}\n    >\n      {dot ? <StatusGlyph tone={tone} live={live} sprout={sprout} /> : null}\n      {typeof children === \"string\" ? (\n        <span className=\"min-w-0 truncate\" title={children}>\n          {children}\n        </span>\n      ) : (\n        children\n      )}\n    </span>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ikada/badge.tsx"
    }
  ],
  "categories": [
    "data-display"
  ],
  "type": "registry:ui"
}