{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "announcement",
  "title": "Announcement",
  "description": "A compact inline announcement link with an optional label, icon and directional CTA cue.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "src/registry/ui/announcement.tsx",
      "content": "import * as React from \"react\"\nimport { ArrowRight, Sparkles } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface AnnouncementProps\n  extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n  /** Required destination: an announcement is always a real navigation CTA. */\n  href: string\n  /** Optional compact category label rendered before the message. */\n  label?: React.ReactNode\n  /** Replaces the leading icon; pass null to remove the icon. */\n  icon?: React.ReactNode\n  /** Controls the token treatment without changing the link semantics. */\n  variant?: \"default\" | \"accent\"\n  /** Removes the trailing direction cue when the destination is self-evident. */\n  showArrow?: boolean\n}\n\nexport const Announcement = React.forwardRef<\n  HTMLAnchorElement,\n  AnnouncementProps\n>(\n  (\n    {\n      children,\n      className,\n      icon,\n      label,\n      showArrow = true,\n      variant = \"default\",\n      ...props\n    },\n    ref,\n  ) => (\n    <a\n      className={cn(\n        \"group inline-flex max-w-full items-center gap-2 rounded-full border px-2.5 py-1.5 text-sm font-medium\",\n        \"transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n        variant === \"default\" && \"bg-background text-foreground\",\n        variant === \"accent\" &&\n          \"border-primary/30 bg-primary/10 text-foreground hover:bg-primary/15\",\n        className,\n      )}\n      ref={ref}\n      {...props}\n    >\n      {icon !== null && (\n        <span\n          aria-hidden=\"true\"\n          className={cn(\n            \"flex size-5 shrink-0 items-center justify-center rounded-full\",\n            variant === \"default\" && \"bg-muted text-muted-foreground\",\n            variant === \"accent\" && \"bg-primary text-primary-foreground\",\n          )}\n        >\n          {icon === undefined ? <Sparkles className=\"size-3\" /> : icon}\n        </span>\n      )}\n\n      {label && (\n        <span\n          className={cn(\n            \"shrink-0 rounded-full px-2 py-0.5 text-xs font-semibold\",\n            variant === \"default\" && \"bg-muted text-muted-foreground\",\n            variant === \"accent\" && \"bg-primary text-primary-foreground\",\n          )}\n        >\n          {label}\n        </span>\n      )}\n\n      <span className=\"min-w-0 truncate\">{children}</span>\n\n      {showArrow && (\n        <ArrowRight\n          aria-hidden=\"true\"\n          className=\"size-3.5 shrink-0 transition-transform group-hover:translate-x-0.5 motion-reduce:transform-none motion-reduce:transition-none\"\n        />\n      )}\n    </a>\n  ),\n)\n\nAnnouncement.displayName = \"Announcement\"\n\nexport default Announcement\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}