import { cva, type VariantProps } from 'class-variance-authority'; import * as React from 'react'; import { cn } from '@/lib/utils'; const badgeVariants = cva( "relative inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-sm border border-transparent font-medium outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [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", { defaultVariants: { size: 'md', variant: 'default', }, variants: { size: { 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', md: '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', 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]', }, variant: { default: 'bg-primary text-primary-foreground [button&,a&]:hover:bg-primary/90', destructive: 'bg-destructive text-white [button&,a&]:hover:bg-destructive/90', error: 'bg-destructive/8 text-destructive-foreground dark:bg-destructive/16', expired: 'bg-secondary text-secondary-foreground [button&,a&]:hover:bg-secondary/90', failed: 'bg-destructive/8 text-destructive-foreground dark:bg-destructive/16', info: 'bg-info/8 text-info-foreground dark:bg-info/16', inProgress: 'bg-info/8 text-info-foreground dark:bg-info/16', inReview: 'bg-warning/8 text-warning-foreground dark:bg-warning/16', outline: 'border-input bg-background text-foreground dark:bg-input/32 [button&,a&]:hover:bg-accent/50 dark:[button&,a&]:hover:bg-input/48', pending: 'bg-warning/8 text-warning-foreground dark:bg-warning/16', secondary: 'bg-secondary text-secondary-foreground [button&,a&]:hover:bg-secondary/90', submitted: 'bg-info/8 text-info-foreground dark:bg-info/16', success: 'bg-success/8 text-success-foreground dark:bg-success/16', warning: 'bg-warning/8 text-warning-foreground dark:bg-warning/16', }, }, }, ); interface BadgeProps extends React.ComponentProps<'span'>, VariantProps {} function Badge({ className, size, variant, ...props }: BadgeProps) { return ( ); } export { Badge, badgeVariants }; export type { BadgeProps };