{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "title": "Badge",
  "description": "Small Astro labels for status, category, and counts.",
  "dependencies": [
    "class-variance-authority",
    "cn"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/badge/badge-variants.ts",
      "content": "import { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from 'cn'\n\nconst badgeStyles = cva(\"font-sans focus-visible:ring-ring focus-visible:ring-offset-background relative inline-flex shrink-0 items-center justify-center gap-1 rounded-sm border border-transparent font-medium whitespace-nowrap transition-shadow outline-none focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3 [button&,a&]:cursor-pointer [button&,a&]:pointer-coarse:after:absolute [button&,a&]:pointer-coarse:after:size-full [button&,a&]:pointer-coarse:after:min-h-11 [button&,a&]:pointer-coarse:after:min-w-11\", {\n    defaultVariants: {\n        size: 'default',\n        variant: 'default',\n    },\n    variants: {\n        size: {\n            default: \"h-5.5 min-w-5.5 px-[calc(--spacing(1)-1px)] text-sm sm:h-4.5 sm:min-w-4.5 sm:text-xs\",\n            lg: \"h-6.5 min-w-6.5 px-[calc(--spacing(1.5)-1px)] text-base sm:h-5.5 sm:min-w-5.5 sm:text-sm\",\n            sm: \"h-5 min-w-5 rounded-[.25rem] px-[calc(--spacing(1)-1px)] text-xs sm:h-4 sm:min-w-4 sm:text-[.625rem]\",\n        },\n        variant: {\n            error: 'bg-destructive/8 text-destructive-foreground dark:bg-destructive/16',\n            info: 'bg-info/8 text-info-foreground dark:bg-info/16',\n            success: 'bg-success/8 text-success-foreground dark:bg-success/16',\n            warning: 'bg-warning/8 text-warning-foreground dark:bg-warning/16',\n            ghost: \"text-foreground hover:bg-accent border-transparent\",\n            link: \"text-primary border-transparent underline-offset-4 hover:underline\",\n            default: \"bg-primary text-primary-foreground [button&,a&]:hover:bg-primary/90\",\n            destructive: \"bg-destructive [button&,a&]:hover:bg-destructive/90 text-white\",\n            outline: \"border-input bg-background text-foreground dark:bg-input/32 [button&,a&]:hover:bg-accent/50 dark:[button&,a&]:hover:bg-input/48\",\n            secondary: \"bg-secondary text-secondary-foreground [button&,a&]:hover:bg-secondary/90\",\n        },\n    },\n})\n\nexport const badgeVariants = (...args: Parameters<typeof badgeStyles>) =>\n    cn(badgeStyles(...args))\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/badge/badge-variants.ts"
    },
    {
      "path": "packages/ui/src/components/ui/badge/badge.astro",
      "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\nimport { badgeVariants, type BadgeVariantProps } from \"./badge-variants\"\n\ntype Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & BadgeVariantProps\n\nconst {\n  as: Tag = \"span\",\n  class: className,\n  variant = \"default\",\n  size = \"default\",\n  ...props\n} = Astro.props\n---\n\n<Tag\n  data-slot=\"badge\"\n  data-variant={variant}\n  data-size={size}\n  class={cn(badgeVariants({ variant, size }), className)}\n  {...props}\n>\n  <slot />\n</Tag>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/badge/badge.astro"
    },
    {
      "path": "packages/ui/src/components/ui/badge/index.ts",
      "content": "export { badgeVariants, type BadgeVariantProps } from \"./badge-variants\"\n\nexport { default as Badge } from \"./badge.astro\"\n",
      "type": "registry:file",
      "target": "~/src/components/ui/badge/index.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "class-variance-authority": "^0.7.1",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/badge",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
