diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index 65e9e7d..ed2a948 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -3,17 +3,22 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const badgeVariants = cva( - "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors", + "inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold", { variants: { variant: { - default: "border-slate-200 bg-slate-100 text-slate-700", - accent: "border-emerald-200 bg-emerald-100 text-emerald-800", - danger: "border-red-200 bg-red-100 text-red-700" + default: "border-transparent bg-muted text-muted-foreground", + accent: "border-transparent bg-accent text-accent-foreground", + danger: "border-transparent bg-destructive/10 text-destructive" + }, + shape: { + pill: "rounded-full", + square: "rounded-md" } }, defaultVariants: { - variant: "default" + variant: "default", + shape: "pill" } } ); @@ -21,8 +26,8 @@ const badgeVariants = cva( export interface BadgeProps extends React.HTMLAttributes, VariantProps {} -function Badge({ className, variant, ...props }: BadgeProps): JSX.Element { - return
; +function Badge({ className, variant, shape, ...props }: BadgeProps): JSX.Element { + return
; } export { Badge, badgeVariants }; diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 7270d2e..eed42fb 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -3,19 +3,22 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const buttonVariants = cva( - "inline-flex items-center justify-center rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-600/50 disabled:pointer-events-none disabled:opacity-50", + "inline-flex items-center justify-center gap-2 rounded-md text-sm font-semibold transition-[transform,background-color,box-shadow] duration-200 ease-swift focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background active:scale-[0.98] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { - default: "bg-emerald-700 text-emerald-50 hover:bg-emerald-800", - secondary: "bg-slate-100 text-slate-900 hover:bg-slate-200 border border-slate-200", - ghost: "text-slate-700 hover:bg-slate-100", - destructive: "bg-red-600 text-white hover:bg-red-700" + default: + "bg-primary text-primary-foreground shadow-[inset_0_1px_0_0_hsl(0_0%_100%/0.12)] hover:bg-primary-hover", + secondary: + "border border-border bg-secondary text-secondary-foreground hover:bg-secondary-hover", + ghost: "text-secondary-foreground hover:bg-secondary", + destructive: + "bg-destructive text-destructive-foreground shadow-[inset_0_1px_0_0_hsl(0_0%_100%/0.15)] hover:bg-destructive-hover" }, size: { default: "h-10 px-4 py-2", - sm: "h-9 px-3", - lg: "h-11 px-6" + sm: "h-9 px-3 text-[13px]", + lg: "h-11 px-6 text-base" } }, defaultVariants: { diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx index 0a588e3..cfb3932 100644 --- a/src/components/ui/card.tsx +++ b/src/components/ui/card.tsx @@ -5,7 +5,7 @@ function Card({ className, ...props }: React.HTMLAttributes): JS return (
; } -function CardTitle({ className, ...props }: React.HTMLAttributes): JSX.Element { - return

; +type CardTitleProps = React.HTMLAttributes & { + as?: "h1" | "h2" | "h3" | "h4"; +}; + +function CardTitle({ className, as: Tag = "h3", ...props }: CardTitleProps): JSX.Element { + return ; } function CardDescription({ className, ...props }: React.HTMLAttributes): JSX.Element { - return

; + return

; } function CardContent({ className, ...props }: React.HTMLAttributes): JSX.Element { diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx index 476af94..a0cc470 100644 --- a/src/components/ui/input.tsx +++ b/src/components/ui/input.tsx @@ -9,7 +9,7 @@ const Input = React.forwardRef( ; const Select = React.forwardRef(({ className, ...props }, ref) => { return ( - + +

); }); Select.displayName = "Select"; diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx index 4b7191f..1659718 100644 --- a/src/components/ui/separator.tsx +++ b/src/components/ui/separator.tsx @@ -3,18 +3,24 @@ import { cn } from "@/lib/utils"; interface SeparatorProps extends React.HTMLAttributes { orientation?: "horizontal" | "vertical"; + decorative?: boolean; } function Separator({ className, orientation = "horizontal", + decorative = true, ...props }: SeparatorProps): JSX.Element { return (
( return (