fix(design-system): keep Alert variant text foreground explicit (#46050)

## What kind of change does this PR introduce?

Bug fix. Follow-up to DEPR-551, #45302, #45535, #45618, and stacked on
#46049.

## What is the current behaviour?

Warning and destructive Alert variants do not explicitly own their
foreground text colour. In muted parent contexts, nested Admonition
content can inherit lighter text styling.

## What is the new behaviour?

Warning and destructive Alert variants now include `text-foreground`,
just like the default counterpart.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Style**
* Updated styling for alert components with destructive and warning
variants.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46050?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Danny White authored and GitHub committed 2026-05-19 11:30:36 +10:00
1 parent 4c148ea060
commit 09bbb7c323
1 file changed
+2 -2
@@ -16,9 +16,9 @@ export const alertVariants = cva(
default:
'bg-surface-200/25 border-default text-foreground [&>svg]:text-background [&>svg]:bg-foreground',
destructive:
'bg-destructive-200 border-destructive-400 [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',
'bg-destructive-200 border-destructive-400 text-foreground [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',
warning:
'bg-warning-200 border-warning-400 [&>svg]:text-warning-200 [&>svg]:bg-warning-600',
'bg-warning-200 border-warning-400 text-foreground [&>svg]:text-warning-200 [&>svg]:bg-warning-600',
},
},
defaultVariants: {