diff --git a/apps/portal/src/app/globals.css b/apps/portal/src/app/globals.css index 470c6979..699e9a10 100644 --- a/apps/portal/src/app/globals.css +++ b/apps/portal/src/app/globals.css @@ -188,13 +188,6 @@ --color-danger-soft: var(--danger-bg); --color-neutral-soft: var(--neutral-bg); - /* Legacy aliases (existing components use these) */ - --color-destructive: var(--danger); - --color-destructive-foreground: var(--danger-foreground); - --color-destructive-soft: var(--danger-bg); - --color-error: var(--danger); - --color-error-foreground: var(--danger-foreground); - --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); diff --git a/apps/portal/src/components/atoms/badge.tsx b/apps/portal/src/components/atoms/badge.tsx index 7fdcabd6..047087ce 100644 --- a/apps/portal/src/components/atoms/badge.tsx +++ b/apps/portal/src/components/atoms/badge.tsx @@ -11,7 +11,7 @@ const badgeVariants = cva( secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", success: "bg-success-soft text-success hover:bg-success-soft/80", warning: "bg-warning-soft text-foreground hover:bg-warning-soft/80", - error: "bg-destructive-soft text-destructive hover:bg-destructive-soft/80", + error: "bg-danger-soft text-danger hover:bg-danger-soft/80", info: "bg-info-soft text-info hover:bg-info-soft/80", outline: "border border-border bg-background text-foreground hover:bg-muted", ghost: "text-foreground hover:bg-muted", @@ -47,7 +47,7 @@ const Badge = forwardRef( "mr-1.5 h-1.5 w-1.5 rounded-full", variant === "success" && "bg-success", variant === "warning" && "bg-warning", - variant === "error" && "bg-destructive", + variant === "error" && "bg-danger", variant === "info" && "bg-info", variant === "default" && "bg-primary-foreground", variant === "secondary" && "bg-secondary-foreground", diff --git a/apps/portal/src/components/atoms/button.tsx b/apps/portal/src/components/atoms/button.tsx index f6dc8b87..a94a04a0 100644 --- a/apps/portal/src/components/atoms/button.tsx +++ b/apps/portal/src/components/atoms/button.tsx @@ -12,7 +12,7 @@ const buttonVariants = cva( default: "bg-primary text-primary-foreground hover:bg-primary-hover shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", destructive: - "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", + "bg-danger text-danger-foreground hover:bg-danger/90 shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", outline: "border border-border bg-background text-foreground hover:bg-muted shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", secondary: diff --git a/apps/portal/src/components/atoms/checkbox.tsx b/apps/portal/src/components/atoms/checkbox.tsx index b5e1890c..bdf51aed 100644 --- a/apps/portal/src/components/atoms/checkbox.tsx +++ b/apps/portal/src/components/atoms/checkbox.tsx @@ -25,7 +25,7 @@ export const Checkbox = React.forwardRef( ref={ref} className={cn( "h-4 w-4 rounded border-input text-primary focus:ring-ring focus:ring-2", - error && "border-destructive", + error && "border-danger", className )} {...props} @@ -35,7 +35,7 @@ export const Checkbox = React.forwardRef( htmlFor={checkboxId} className={cn( "text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70", - error && "text-destructive" + error && "text-danger" )} > {label} @@ -43,7 +43,7 @@ export const Checkbox = React.forwardRef( )} {helperText && !error &&

{helperText}

} - {error &&

{error}

} + {error &&

{error}

} ); } diff --git a/apps/portal/src/components/atoms/input.tsx b/apps/portal/src/components/atoms/input.tsx index 1d88a4b5..cb92e036 100644 --- a/apps/portal/src/components/atoms/input.tsx +++ b/apps/portal/src/components/atoms/input.tsx @@ -21,7 +21,7 @@ const Input = forwardRef( "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-0 focus-visible:border-primary", "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-border", isInvalid && - "border-destructive hover:border-destructive focus-visible:ring-destructive/40 focus-visible:border-destructive", + "border-danger hover:border-danger focus-visible:ring-danger/40 focus-visible:border-danger", className )} aria-invalid={isInvalid || undefined} diff --git a/apps/portal/src/components/atoms/status-pill.tsx b/apps/portal/src/components/atoms/status-pill.tsx index 5d25ab6a..13b224e2 100644 --- a/apps/portal/src/components/atoms/status-pill.tsx +++ b/apps/portal/src/components/atoms/status-pill.tsx @@ -18,7 +18,7 @@ export const StatusPill = forwardRef( : variant === "info" ? "bg-info-soft text-info ring-info/25" : variant === "error" - ? "bg-destructive-soft text-destructive ring-destructive/25" + ? "bg-danger-soft text-danger ring-danger/25" : "bg-muted text-muted-foreground ring-border-muted/40"; const sizing = diff --git a/apps/portal/src/components/molecules/AlertBanner/AlertBanner.tsx b/apps/portal/src/components/molecules/AlertBanner/AlertBanner.tsx index e6e20724..0aa2125e 100644 --- a/apps/portal/src/components/molecules/AlertBanner/AlertBanner.tsx +++ b/apps/portal/src/components/molecules/AlertBanner/AlertBanner.tsx @@ -37,10 +37,10 @@ const variantClasses: Record< Icon: ExclamationTriangleIcon, }, error: { - bg: "bg-destructive-soft", - border: "border-destructive/30", - text: "text-destructive", - icon: "text-destructive", + bg: "bg-danger-soft", + border: "border-danger/30", + text: "text-danger", + icon: "text-danger", Icon: XCircleIcon, }, }; diff --git a/apps/portal/src/components/molecules/FormField/FormField.tsx b/apps/portal/src/components/molecules/FormField/FormField.tsx index 5fc164d8..97bb1695 100644 --- a/apps/portal/src/components/molecules/FormField/FormField.tsx +++ b/apps/portal/src/components/molecules/FormField/FormField.tsx @@ -49,14 +49,14 @@ const FormField = forwardRef( htmlFor={id} className={cn( "block text-sm font-medium text-muted-foreground", - error && "text-destructive", + error && "text-danger", labelProps?.className )} {...(labelProps ? { ...labelProps, className: undefined } : undefined)} > {label} {required ? ( -