{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge-group",
  "title": "Badge Group",
  "description": "Announcement chip: a pill with a leading badge, trailing copy and an optional addon mark.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@pestoui/badge",
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/badge-group.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Badge } from \"@/components/ui/badge\"\n\n/* Announcement chip — a pill carrying a leading Badge, a short line of trailing\n * copy and an optional addon mark: \"New · Introducing agents ->\".\n *\n * The leading chip is the real <Badge>, so the semantic tint scale stays a\n * single source of truth and this component never invents a fill. Note that the\n * semantic variants read as tints rather than solid blocks on purpose: a solid\n * --info pill here would compete with the selected/active state, which is the\n * one thing blue is allowed to mean. */\n/* Motion lives entirely in the addon below — the chip itself only resolves its\n   border colour, and does it fast enough to read as instant. No press feedback:\n   this is a span, and a span takes `:active` on mousedown whether or not the\n   consumer wrapped it in something clickable, so a press scale here would fire\n   on an announcement that does not go anywhere. */\nconst badgeGroupVariants = cva(\n  \"group/badge-group inline-flex h-8 w-fit shrink-0 items-center gap-2 rounded-full border bg-card py-1 pr-3 pl-1 text-caption font-medium whitespace-nowrap text-foreground shadow-soft transition-colors duration-fast ease-out-expo outline-none has-data-[slot=badge-group-addon]:pr-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50\",\n  {\n    variants: {\n      variant: {\n        default: \"border-border/70 dark:border-input\",\n        info: \"border-info/25 dark:border-info/35\",\n        success: \"border-success/25 dark:border-success/35\",\n        warning: \"border-warning/35 dark:border-warning/45\",\n        destructive: \"border-destructive/25 dark:border-destructive/40\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction BadgeGroup({\n  className,\n  variant = \"default\",\n  badgeLabel,\n  addon,\n  children,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeGroupVariants> & {\n    /* Text for the leading Badge — \"New\", \"Beta\", \"v2.4\". */\n    badgeLabel: React.ReactNode\n    /* Decorative trailing mark, usually a chevron or arrow. */\n    addon?: React.ReactNode\n  }) {\n  return (\n    <span\n      data-slot=\"badge-group\"\n      data-variant={variant}\n      className={cn(badgeGroupVariants({ variant }), className)}\n      {...props}\n    >\n      <Badge variant={variant}>{badgeLabel}</Badge>\n      <span data-slot=\"badge-group-label\">{children}</span>\n      {addon ? (\n        <span\n          data-slot=\"badge-group-addon\"\n          aria-hidden=\"true\"\n          /* The nudge is the whole affordance — it is what tells you the chip\n             leads somewhere. Travel between two known positions, so it rides the\n             glide spring, but the timing is swapped in only while the chip is\n             hovered: leaving runs back on the short tween instead of springing,\n             which on a reversal would read as the arrow bobbing loose. */\n          className=\"flex items-center text-muted-foreground transition-transform duration-exit ease-out-expo group-hover/badge-group:translate-x-0.5 group-hover/badge-group:duration-spring-glide group-hover/badge-group:ease-spring-glide [&>svg]:size-3.5 [&>svg]:shrink-0\"\n        >\n          {addon}\n        </span>\n      ) : null}\n    </span>\n  )\n}\n\nexport { BadgeGroup, badgeGroupVariants }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}