{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "type": "registry:ui",
  "title": "Badge",
  "description": "Small status or count label in semantic colours.",
  "dependencies": [
    "radix-ui",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@wibo/utils"
  ],
  "files": [
    {
      "path": "src/components/badge.tsx",
      "type": "registry:ui",
      "content": "import type { ComponentProps } from \"react\";\nimport { Slot } from \"radix-ui\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\n/*\n * Mastra Studio badge recipe (playground-ui/src/ds/components/Badge): 20 px\n * tall, 12 px medium label, a tinted fill with a hairline inset rim instead\n * of a border, 6 px radius.\n */\nconst badgeVariants = cva(\n  \"inline-flex h-5 w-fit max-w-full shrink-0 items-center gap-1 overflow-hidden rounded-md px-2 text-xs font-medium whitespace-nowrap inset-ring [&>svg]:pointer-events-none [&>svg]:size-3\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-muted text-muted-foreground inset-ring-border\",\n        outline: \"text-muted-foreground inset-ring-input\",\n        solid: \"bg-primary text-primary-foreground inset-ring-transparent\",\n        accent: \"bg-accent/10 text-accent inset-ring-accent/20\",\n        success: \"bg-success/10 text-success inset-ring-success/20\",\n        warning: \"bg-warning/10 text-warning inset-ring-warning/25\",\n        danger: \"bg-danger/10 text-danger inset-ring-danger/20\",\n        info: \"bg-info/10 text-info inset-ring-info/20\",\n      },\n      mono: {\n        true: \"font-mono font-normal\",\n        false: \"\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      mono: false,\n    },\n  },\n);\n\ntype BadgeProps = ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & {\n    asChild?: boolean;\n  };\n\n/** Small status or count label. Use `mono` for ids, counts and costs. */\nfunction Badge({ className, variant, mono, asChild = false, ...props }: BadgeProps) {\n  const Comp = asChild ? Slot.Root : \"span\";\n  return (\n    <Comp\n      data-slot=\"badge\"\n      data-variant={variant ?? \"default\"}\n      className={cn(badgeVariants({ variant, mono }), className)}\n      {...props}\n    />\n  );\n}\n\nexport { Badge, badgeVariants };\nexport type { BadgeProps };\n"
    }
  ]
}
