{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "buttons-github-stars",
  "type": "registry:ui",
  "title": "GitHub Stars Button",
  "description": "A button showing a repository's GitHub stars, counted up with a filling star.",
  "dependencies": [
    "@animate-ui/react",
    "class-variance-authority",
    "cn",
    "motion"
  ],
  "files": [
    {
      "path": "registry/buttons/github-stars/index.tsx",
      "type": "registry:ui",
      "target": "@components/animate-ui/buttons/github-stars.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n  Button,\n  type ButtonProps,\n} from '@animate-ui/react/primitives/buttons/button';\nimport {\n  GithubStars,\n  GithubStarsIcon,\n  GithubStarsLogo,\n  GithubStarsNumber,\n  GithubStarsParticles,\n  type GithubStarsIconProps,\n  type GithubStarsLogoProps,\n  type GithubStarsNumberProps,\n  type GithubStarsParticlesProps,\n} from '@animate-ui/react/primitives/github-stars';\nimport type { UseIsInViewOptions } from '@animate-ui/react/utils/use-is-in-view';\nimport { cn } from 'cn';\n\nconst githubStarsButtonVariants = cva(\n  \"focus-visible:border-ring focus-visible:ring-ring/50 inline-flex shrink-0 items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow] outline-none focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n        accent: 'bg-accent text-accent-foreground hover:bg-accent/90',\n        outline:\n          'bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border',\n        ghost: 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50',\n      },\n      size: {\n        default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n        sm: 'h-8 gap-1.5 px-3 has-[>svg]:px-2.5',\n        lg: 'h-10 px-6 has-[>svg]:px-4',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  },\n);\n\ntype GitHubStarsButtonProps = ButtonProps &\n  UseIsInViewOptions &\n  VariantProps<typeof githubStarsButtonVariants> & {\n    username?: string;\n    repo?: string;\n    value?: number;\n    delay?: number;\n  };\n\nfunction GitHubStarsButton({\n  ref,\n  username,\n  repo,\n  value,\n  delay,\n  inView,\n  inViewMargin,\n  inViewOnce,\n  variant,\n  size,\n  className,\n  ...props\n}: GitHubStarsButtonProps) {\n  return (\n    <GithubStars\n      asChild\n      ref={ref as React.Ref<HTMLDivElement>}\n      username={username}\n      repo={repo}\n      value={value}\n      delay={delay}\n      inView={inView}\n      inViewMargin={inViewMargin}\n      inViewOnce={inViewOnce}\n    >\n      <Button\n        data-slot=\"github-stars-button\"\n        className={cn(githubStarsButtonVariants({ variant, size }), className)}\n        {...props}\n      />\n    </GithubStars>\n  );\n}\n\nconst GitHubStarsButtonLogo = GithubStarsLogo;\nconst GitHubStarsButtonNumber = GithubStarsNumber;\nconst GitHubStarsButtonIcon = GithubStarsIcon;\nconst GitHubStarsButtonParticles = GithubStarsParticles;\n\ntype GitHubStarsButtonLogoProps = GithubStarsLogoProps;\ntype GitHubStarsButtonNumberProps = GithubStarsNumberProps;\ntype GitHubStarsButtonIconProps<T extends React.ElementType> =\n  GithubStarsIconProps<T>;\ntype GitHubStarsButtonParticlesProps = GithubStarsParticlesProps;\n\nexport {\n  GitHubStarsButton,\n  GitHubStarsButtonLogo,\n  GitHubStarsButtonNumber,\n  GitHubStarsButtonIcon,\n  GitHubStarsButtonParticles,\n  githubStarsButtonVariants,\n  type GitHubStarsButtonProps,\n  type GitHubStarsButtonLogoProps,\n  type GitHubStarsButtonNumberProps,\n  type GitHubStarsButtonIconProps,\n  type GitHubStarsButtonParticlesProps,\n};\n"
    }
  ]
}