{"path":"apps/dashboard/src/components/ui/button.tsx","size":2356,"locked":false,"binary":false,"truncated":false,"content":"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\" +\n\" hover-elevate active-elevate-2\",\n  {\n    variants: {\n      variant: {\n        default:\n           // @replit: no hover, and add primary border\n           \"bg-primary text-primary-foreground border border-primary-border\",\n        destructive:\n          \"bg-destructive text-destructive-foreground shadow-sm border-destructive-border\",\n        outline:\n          // @replit Shows the background color of whatever card / sidebar / accent background it is inside of.\n          // Inherits the current text color. Uses shadow-xs. no shadow on active\n          // No hover state\n          \" border [border-color:var(--button-outline)] shadow-xs active:shadow-none \",\n        secondary:\n          // @replit border, no hover, no shadow, secondary border.\n          \"border bg-secondary text-secondary-foreground border border-secondary-border \",\n        // @replit no hover, transparent border\n        ghost: \"border border-transparent\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        // @replit changed sizes\n        default: \"min-h-9 px-4 py-2\",\n        sm: \"min-h-8 rounded-md px-3 text-xs\",\n        lg: \"min-h-10 rounded-md px-8\",\n        icon: \"h-9 w-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : \"button\"\n    return (\n      <Comp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      />\n    )\n  }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"}