{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "type": "registry:ui",
  "title": "Badge",
  "dependencies": [
    "@base-ui-next/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json"
  ],
  "files": [
    {
      "path": "react/badge.tsx",
      "content": "import { mergeProps } from '@base-ui-next/react/merge-props' // base-ui-next/ui badge@0.1.0\nimport { useRender } from '@base-ui-next/react/use-render'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva(\n  'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',\n        secondary: 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',\n        destructive:\n          'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20',\n        outline: 'border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',\n        ghost: 'hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n    },\n  },\n)\n\nfunction Badge({\n  className,\n  variant = 'default',\n  render,\n  ...props\n}: useRender.ComponentProps<'span'> & VariantProps<typeof badgeVariants>) {\n  return useRender({\n    defaultTagName: 'span',\n    props: mergeProps<'span'>(\n      {\n        className: cn(badgeVariants({ variant }), className),\n      },\n      props,\n    ),\n    render,\n    state: {\n      slot: 'badge',\n      variant,\n    },\n  })\n}\n\nexport { Badge, badgeVariants }\n",
      "type": "registry:ui",
      "target": "@ui/badge.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.0",
      "hash": "be145059da83916ad4d26a8dd1e32563e61d0818de8b1e387cc7373c43ff7e96",
      "files": {
        "@ui/badge.tsx": "d0f7def22427e8ef484b452ca339a35dbb80c3ec4c75ea0de44b7ef73d144e37"
      }
    }
  }
}
