{"version":3,"sources":["../components/ui/alert.tsx"],"sourcesContent":["\"use client\";\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/ui';\n\nconst alertVariants = cva(\n  'relative w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm ' +\n    '[&>svg+div]:translate-y-[-3px] ' +\n    '[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-2 [&>svg]:text-current ' +\n    '[&>svg~*]:pl-7',\n  {\n    variants: {\n      variant: {\n        primary: 'bg-primary text-primary-foreground [&_[data-alert-description]]:text-primary-foreground/90',\n        secondary: 'bg-secondary text-secondary-foreground [&_[data-alert-description]]:text-secondary-foreground/90',\n        success: 'bg-success text-success-foreground [&_[data-alert-description]]:text-success-foreground/90',\n        warning: 'bg-warning text-warning-foreground [&_[data-alert-description]]:text-warning-foreground/90',\n        danger: 'bg-danger text-danger-foreground [&_[data-alert-description]]:text-danger-foreground/90',\n        info: 'bg-info text-info-foreground [&_[data-alert-description]]:text-info-foreground/90',\n        light: 'bg-light text-light-foreground [&_[data-alert-description]]:text-light-foreground/90',\n        dark: 'bg-dark text-dark-foreground [&_[data-alert-description]]:text-dark-foreground/90',\n        accent: 'bg-accent text-accent-foreground [&_[data-alert-description]]:text-accent-foreground/90',\n        destructive:\n          'bg-destructive text-destructive-foreground [&_[data-alert-description]]:text-destructive-foreground/90',\n        muted: 'bg-muted text-muted-foreground [&_[data-alert-description]]:text-muted-foreground/90',\n        link: 'text-primary underline-offset-4 [&_[data-alert-description]]:text-primary/90',\n        ghost: '[&_[data-alert-description]]:text-muted-foreground',\n      },\n      appearance: {\n        solid: '',\n        light: 'font-semibold',\n      },\n    },\n    compoundVariants: [\n      {\n        variant: 'primary',\n        appearance: 'light',\n        class: 'bg-primary/20 text-primary [&_[data-alert-description]]:text-primary',\n      },\n      {\n        variant: 'secondary',\n        appearance: 'light',\n        class: 'bg-secondary/20 text-secondary [&_[data-alert-description]]:text-secondary',\n      },\n      {\n        variant: 'success',\n        appearance: 'light',\n        class: 'bg-success/20 text-success [&_[data-alert-description]]:text-success',\n      },\n      {\n        variant: 'warning',\n        appearance: 'light',\n        class: 'bg-warning/20 text-warning [&_[data-alert-description]]:text-warning',\n      },\n      {\n        variant: 'danger',\n        appearance: 'light',\n        class: 'bg-danger/20 text-danger [&_[data-alert-description]]:text-danger',\n      },\n      { variant: 'info', appearance: 'light', class: 'bg-info/20 text-info [&_[data-alert-description]]:text-info' },\n      {\n        variant: 'light',\n        appearance: 'light',\n        class: 'bg-light/20 text-light [&_[data-alert-description]]:text-light',\n      },\n      { variant: 'dark', appearance: 'light', class: 'bg-dark/20 text-dark [&_[data-alert-description]]:text-dark' },\n      {\n        variant: 'accent',\n        appearance: 'light',\n        class: 'bg-accent/20 text-accent [&_[data-alert-description]]:text-accent',\n      },\n      {\n        variant: 'destructive',\n        appearance: 'light',\n        class: 'bg-destructive/20 text-destructive [&_[data-alert-description]]:text-destructive',\n      },\n      {\n        variant: 'muted',\n        appearance: 'light',\n        class: 'bg-muted/20 text-muted [&_[data-alert-description]]:text-muted',\n      },\n      {\n        variant: 'link',\n        appearance: 'light',\n        class: 'bg-primary/10 text-primary [&_[data-alert-description]]:text-primary',\n      },\n      {\n        variant: 'ghost',\n        appearance: 'light',\n        class: 'bg-muted/10 text-muted-foreground [&_[data-alert-description]]:text-muted-foreground',\n      },\n    ],\n    defaultVariants: {\n      variant: 'primary',\n      appearance: 'solid',\n    },\n  },\n);\n\nexport interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}\nexport type VariantType = NonNullable<VariantProps<typeof alertVariants>['variant']>;\n\nfunction Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n  return <div data-slot=\"alert\" role=\"alert\" className={cn(alertVariants({ variant }), className)} {...props} />;\n}\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div\n      data-slot=\"alert-title\"\n      className={cn(\n        'font-medium group-has-[>svg]/alert:col-start-2 cn-font-heading [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',\n        className,\n      )}\n      {...props}\n    />\n  );\n}\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div\n      data-slot=\"alert-description\"\n      className={cn(\n        'text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',\n        className,\n      )}\n      {...props}\n    />\n  );\n}\nfunction AlertAction({ className, ...props }: React.ComponentProps<'div'>) {\n  return <div data-slot=\"alert-action\" className={cn('absolute top-2 right-2', className)} {...props} />;\n}\nexport { Alert, AlertTitle, AlertDescription, AlertAction };\n"],"mappings":";;;;;;;;;AACA,YAAY,WAAW;AACvB,SAAS,WAA8B;AAGvC,IAAM,gBAAgB;AAAA,EACpB;AAAA,EAIA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,aACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,YAAY;AAAA,QACV,OAAO;AAAA,QACP,OAAO;AAAA,MACT;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA;AAAA,QACE,S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