Refactor color tokens across components for improved consistency and clarity

- Removed legacy color aliases from globals.css to streamline design tokens.
- Updated various components, including Badge, Button, Checkbox, and Input, to utilize new color tokens for error states.
- Enhanced error messaging styles in components like ErrorBoundary and AlertBanner for better visual coherence.
- Standardized color usage in billing and subscription components to align with updated design tokens.
- Improved overall styling consistency across the application by adopting the new color system.
This commit is contained in:
barsa 2025-12-16 18:12:12 +09:00
parent 666129191a
commit a2e81798ef
35 changed files with 67 additions and 89 deletions

View File

@ -188,13 +188,6 @@
--color-danger-soft: var(--danger-bg); --color-danger-soft: var(--danger-bg);
--color-neutral-soft: var(--neutral-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-border: var(--border);
--color-input: var(--input); --color-input: var(--input);
--color-ring: var(--ring); --color-ring: var(--ring);

View File

@ -11,7 +11,7 @@ const badgeVariants = cva(
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
success: "bg-success-soft text-success hover:bg-success-soft/80", success: "bg-success-soft text-success hover:bg-success-soft/80",
warning: "bg-warning-soft text-foreground hover:bg-warning-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", info: "bg-info-soft text-info hover:bg-info-soft/80",
outline: "border border-border bg-background text-foreground hover:bg-muted", outline: "border border-border bg-background text-foreground hover:bg-muted",
ghost: "text-foreground hover:bg-muted", ghost: "text-foreground hover:bg-muted",
@ -47,7 +47,7 @@ const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
"mr-1.5 h-1.5 w-1.5 rounded-full", "mr-1.5 h-1.5 w-1.5 rounded-full",
variant === "success" && "bg-success", variant === "success" && "bg-success",
variant === "warning" && "bg-warning", variant === "warning" && "bg-warning",
variant === "error" && "bg-destructive", variant === "error" && "bg-danger",
variant === "info" && "bg-info", variant === "info" && "bg-info",
variant === "default" && "bg-primary-foreground", variant === "default" && "bg-primary-foreground",
variant === "secondary" && "bg-secondary-foreground", variant === "secondary" && "bg-secondary-foreground",

View File

@ -12,7 +12,7 @@ const buttonVariants = cva(
default: default:
"bg-primary text-primary-foreground hover:bg-primary-hover shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", "bg-primary text-primary-foreground hover:bg-primary-hover shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]",
destructive: 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: outline:
"border border-border bg-background text-foreground hover:bg-muted shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]", "border border-border bg-background text-foreground hover:bg-muted shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]",
secondary: secondary:

View File

@ -25,7 +25,7 @@ export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
ref={ref} ref={ref}
className={cn( className={cn(
"h-4 w-4 rounded border-input text-primary focus:ring-ring focus:ring-2", "h-4 w-4 rounded border-input text-primary focus:ring-ring focus:ring-2",
error && "border-destructive", error && "border-danger",
className className
)} )}
{...props} {...props}
@ -35,7 +35,7 @@ export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
htmlFor={checkboxId} htmlFor={checkboxId}
className={cn( className={cn(
"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70", "text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
error && "text-destructive" error && "text-danger"
)} )}
> >
{label} {label}
@ -43,7 +43,7 @@ export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
)} )}
</div> </div>
{helperText && !error && <p className="text-xs text-muted-foreground">{helperText}</p>} {helperText && !error && <p className="text-xs text-muted-foreground">{helperText}</p>}
{error && <p className="text-xs text-destructive">{error}</p>} {error && <p className="text-xs text-danger">{error}</p>}
</div> </div>
); );
} }

View File

@ -21,7 +21,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-0 focus-visible:border-primary", "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", "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-border",
isInvalid && 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 className
)} )}
aria-invalid={isInvalid || undefined} aria-invalid={isInvalid || undefined}

View File

@ -18,7 +18,7 @@ export const StatusPill = forwardRef<HTMLSpanElement, StatusPillProps>(
: variant === "info" : variant === "info"
? "bg-info-soft text-info ring-info/25" ? "bg-info-soft text-info ring-info/25"
: variant === "error" : 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"; : "bg-muted text-muted-foreground ring-border-muted/40";
const sizing = const sizing =

View File

@ -37,10 +37,10 @@ const variantClasses: Record<
Icon: ExclamationTriangleIcon, Icon: ExclamationTriangleIcon,
}, },
error: { error: {
bg: "bg-destructive-soft", bg: "bg-danger-soft",
border: "border-destructive/30", border: "border-danger/30",
text: "text-destructive", text: "text-danger",
icon: "text-destructive", icon: "text-danger",
Icon: XCircleIcon, Icon: XCircleIcon,
}, },
}; };

View File

@ -49,14 +49,14 @@ const FormField = forwardRef<HTMLInputElement, FormFieldProps>(
htmlFor={id} htmlFor={id}
className={cn( className={cn(
"block text-sm font-medium text-muted-foreground", "block text-sm font-medium text-muted-foreground",
error && "text-destructive", error && "text-danger",
labelProps?.className labelProps?.className
)} )}
{...(labelProps ? { ...labelProps, className: undefined } : undefined)} {...(labelProps ? { ...labelProps, className: undefined } : undefined)}
> >
<span>{label}</span> <span>{label}</span>
{required ? ( {required ? (
<span aria-hidden="true" className="ml-1 text-destructive"> <span aria-hidden="true" className="ml-1 text-danger">
* *
</span> </span>
) : null} ) : null}
@ -79,8 +79,7 @@ const FormField = forwardRef<HTMLInputElement, FormFieldProps>(
aria-invalid={error ? "true" : undefined} aria-invalid={error ? "true" : undefined}
aria-describedby={cn(errorId, helperTextId) || undefined} aria-describedby={cn(errorId, helperTextId) || undefined}
className={cn( className={cn(
error && error && "border-danger focus-visible:ring-danger focus-visible:ring-offset-2",
"border-destructive focus-visible:ring-destructive focus-visible:ring-offset-2",
inputClassName, inputClassName,
inputPropsClassName inputPropsClassName
)} )}

View File

@ -52,7 +52,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
return ( return (
<div className="flex items-center justify-center h-64"> <div className="flex items-center justify-center h-64">
<div className="text-center space-y-4"> <div className="text-center space-y-4">
<h2 className="text-lg font-semibold text-destructive">Something went wrong</h2> <h2 className="text-lg font-semibold text-danger">Something went wrong</h2>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{process.env.NODE_ENV === "development" {process.env.NODE_ENV === "development"
? this.state.error?.message || "An unexpected error occurred" ? this.state.error?.message || "An unexpected error occurred"

View File

@ -57,7 +57,7 @@ export function AddressCard({
{isEditing ? ( {isEditing ? (
<div className="space-y-6"> <div className="space-y-6">
<AddressForm initialAddress={address} onChange={addr => onAddressChange(addr, true)} /> <AddressForm initialAddress={address} onChange={addr => onAddressChange(addr, true)} />
{error && <div className="text-sm text-destructive">{error}</div>} {error && <div className="text-sm text-danger">{error}</div>}
<div className="flex items-center justify-end space-x-3 pt-4 border-t border-border/60"> <div className="flex items-center justify-end space-x-3 pt-4 border-t border-border/60">
<button <button
onClick={onCancel} onClick={onCancel}

View File

@ -152,7 +152,7 @@ export function SetPasswordForm({
</FormField> </FormField>
{form.values.confirmPassword && ( {form.values.confirmPassword && (
<p className={`text-sm ${passwordsMatch ? "text-success" : "text-destructive"}`}> <p className={`text-sm ${passwordsMatch ? "text-success" : "text-danger"}`}>
{passwordsMatch ? "✓ Passwords match" : "✗ Passwords do not match"} {passwordsMatch ? "✓ Passwords match" : "✗ Passwords do not match"}
</p> </p>
)} )}

View File

@ -276,7 +276,7 @@ export function SignupForm({ onSuccess, onError, className = "" }: SignupFormPro
/> />
{error && ( {error && (
<ErrorMessage className="mt-4 text-center p-3 bg-destructive-soft rounded-lg"> <ErrorMessage className="mt-4 text-center p-3 bg-danger-soft rounded-lg">
{error} {error}
</ErrorMessage> </ErrorMessage>
)} )}

View File

@ -153,7 +153,7 @@ export function AccountStep({ form }: AccountStepProps) {
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
"disabled:cursor-not-allowed disabled:opacity-50", "disabled:cursor-not-allowed disabled:opacity-50",
getError("gender") getError("gender")
? "border-destructive focus-visible:ring-destructive focus-visible:ring-offset-2" ? "border-danger focus-visible:ring-danger focus-visible:ring-offset-2"
: "", : "",
].join(" ")} ].join(" ")}
aria-invalid={Boolean(getError("gender")) || undefined} aria-invalid={Boolean(getError("gender")) || undefined}

View File

@ -95,7 +95,7 @@ export function PasswordStep({ form }: PasswordStepProps) {
</FormField> </FormField>
{values.confirmPassword && ( {values.confirmPassword && (
<p className={`text-sm ${passwordsMatch ? "text-success" : "text-destructive"}`}> <p className={`text-sm ${passwordsMatch ? "text-success" : "text-danger"}`}>
{passwordsMatch ? "✓ Passwords match" : "✗ Passwords do not match"} {passwordsMatch ? "✓ Passwords match" : "✗ Passwords do not match"}
</p> </p>
)} )}

View File

@ -203,7 +203,7 @@ export function ReviewStep({ form }: ReviewStepProps) {
</span> </span>
</label> </label>
{errors.acceptTerms && ( {errors.acceptTerms && (
<p className="text-sm text-destructive ml-11 -mt-2">{errors.acceptTerms}</p> <p className="text-sm text-danger ml-11 -mt-2">{errors.acceptTerms}</p>
)} )}
<label className="flex items-start gap-3 cursor-pointer p-3 rounded-lg hover:bg-muted transition-colors"> <label className="flex items-start gap-3 cursor-pointer p-3 rounded-lg hover:bg-muted transition-colors">

View File

@ -114,7 +114,7 @@ const BillingSummary = forwardRef<HTMLDivElement, BillingSummaryProps>(
<IconComponent <IconComponent
className={cn( className={cn(
"w-5 h-5 mr-3", "w-5 h-5 mr-3",
item.variant === "error" && "text-destructive", item.variant === "error" && "text-danger",
item.variant === "warning" && "text-warning", item.variant === "warning" && "text-warning",
item.variant === "success" && "text-success", item.variant === "success" && "text-success",
item.variant === "neutral" && "text-muted-foreground" item.variant === "neutral" && "text-muted-foreground"

View File

@ -148,7 +148,7 @@ export function InvoiceSummaryBar({
<span <span
className={cn( className={cn(
"font-medium", "font-medium",
invoice.status === "Overdue" ? "text-destructive" : "text-warning" invoice.status === "Overdue" ? "text-danger" : "text-warning"
)} )}
> >
{relativeDue} {relativeDue}

View File

@ -38,7 +38,7 @@ const getStatusIcon = (status: string) => {
case "unpaid": case "unpaid":
return <ClockIcon className="h-5 w-5 text-warning" />; return <ClockIcon className="h-5 w-5 text-warning" />;
case "overdue": case "overdue":
return <ExclamationTriangleIcon className="h-5 w-5 text-destructive" />; return <ExclamationTriangleIcon className="h-5 w-5 text-danger" />;
case "cancelled": case "cancelled":
case "canceled": case "canceled":
return <ExclamationTriangleIcon className="h-5 w-5 text-muted-foreground" />; return <ExclamationTriangleIcon className="h-5 w-5 text-muted-foreground" />;
@ -161,11 +161,11 @@ export function InvoiceTable({
case "Overdue": case "Overdue":
return ( return (
<div className="space-y-1.5"> <div className="space-y-1.5">
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-destructive-soft text-destructive border border-destructive/20"> <span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-danger-soft text-danger border border-danger/20">
Overdue Overdue
</span> </span>
{invoice.daysOverdue && ( {invoice.daysOverdue && (
<div className="text-xs text-destructive"> <div className="text-xs text-danger">
{invoice.daysOverdue} day{invoice.daysOverdue !== 1 ? "s" : ""} overdue {invoice.daysOverdue} day{invoice.daysOverdue !== 1 ? "s" : ""} overdue
</div> </div>
)} )}

View File

@ -38,7 +38,7 @@ const getCardBrandColor = (cardBrand?: string) => {
case "visa": case "visa":
return "text-info"; return "text-info";
case "mastercard": case "mastercard":
return "text-destructive"; return "text-danger";
case "amex": case "amex":
case "american express": case "american express":
return "text-success"; return "text-success";

View File

@ -117,9 +117,7 @@ export function ActivationForm({
className="w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-colors" className="w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-colors"
/> />
{errors.scheduledActivationDate && ( {errors.scheduledActivationDate && (
<p className="text-destructive text-sm mt-1"> <p className="text-danger text-sm mt-1">{errors.scheduledActivationDate}</p>
{errors.scheduledActivationDate}
</p>
)} )}
<p className="text-xs text-muted-foreground mt-1"> <p className="text-xs text-muted-foreground mt-1">
Weekend or holiday requests may be processed on the next business day. Weekend or holiday requests may be processed on the next business day.

View File

@ -158,7 +158,7 @@ export function SimConfigureView({
icon={<ExclamationTriangleIcon className="h-6 w-6" />} icon={<ExclamationTriangleIcon className="h-6 w-6" />}
> >
<div className="text-center py-12"> <div className="text-center py-12">
<ExclamationTriangleIcon className="h-12 w-12 mx-auto text-destructive mb-4" /> <ExclamationTriangleIcon className="h-12 w-12 mx-auto text-danger mb-4" />
<h2 className="text-xl font-semibold text-foreground mb-2">Plan Not Found</h2> <h2 className="text-xl font-semibold text-foreground mb-2">Plan Not Found</h2>
<p className="text-muted-foreground mb-4">The selected plan could not be found</p> <p className="text-muted-foreground mb-4">The selected plan could not be found</p>
<a href="/catalog/sim" className="text-primary hover:text-primary-hover font-medium"> <a href="/catalog/sim" className="text-primary hover:text-primary-hover font-medium">

View File

@ -43,10 +43,10 @@ const toneStyles: Record<
} }
> = { > = {
critical: { critical: {
card: "bg-error/5 hover:bg-error/10", card: "bg-danger/5 hover:bg-danger/10",
border: "border-l-error", border: "border-l-danger",
iconBg: "bg-error/15", iconBg: "bg-danger/15",
iconColor: "text-error", iconColor: "text-danger",
buttonVariant: "default", buttonVariant: "default",
}, },
warning: { warning: {

View File

@ -86,7 +86,7 @@ export function DashboardView() {
<span <span
className={cn( className={cn(
"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium", "inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium",
hasUrgentTask ? "bg-error/10 text-error" : "bg-warning/10 text-warning" hasUrgentTask ? "bg-danger/10 text-danger" : "bg-warning/10 text-warning"
)} )}
> >
{hasUrgentTask && <ExclamationTriangleIcon className="h-4 w-4" />} {hasUrgentTask && <ExclamationTriangleIcon className="h-4 w-4" />}

View File

@ -279,7 +279,7 @@ export function OrderDetailContainer() {
{ label: data ? `Order #${orderNumber}` : "Order Details" }, { label: data ? `Order #${orderNumber}` : "Order Details" },
]} ]}
> >
{error && <div className="mb-4 text-sm text-destructive">{error}</div>} {error && <div className="mb-4 text-sm text-danger">{error}</div>}
{isNewOrder && ( {isNewOrder && (
<div className="mb-6 rounded-2xl border border-success/25 bg-success-soft px-5 py-4 shadow-[var(--cp-shadow-1)]"> <div className="mb-6 rounded-2xl border border-success/25 bg-success-soft px-5 py-4 shadow-[var(--cp-shadow-1)]">

View File

@ -71,9 +71,9 @@ export function DataUsageChart({
return ( return (
<div className={`${embedded ? "" : "bg-card shadow rounded-lg "}p-6`}> <div className={`${embedded ? "" : "bg-card shadow rounded-lg "}p-6`}>
<div className="text-center"> <div className="text-center">
<ExclamationTriangleIcon className="h-12 w-12 text-destructive mx-auto mb-4" /> <ExclamationTriangleIcon className="h-12 w-12 text-danger mx-auto mb-4" />
<h3 className="text-lg font-medium text-foreground mb-2">Error Loading Usage Data</h3> <h3 className="text-lg font-medium text-foreground mb-2">Error Loading Usage Data</h3>
<p className="text-destructive">{error}</p> <p className="text-danger">{error}</p>
</div> </div>
</div> </div>
); );
@ -223,12 +223,12 @@ export function DataUsageChart({
{/* Warnings */} {/* Warnings */}
{usagePercentage >= 90 && ( {usagePercentage >= 90 && (
<div className="mt-6 bg-destructive-bg border border-destructive-border rounded-lg p-4"> <div className="mt-6 bg-danger-bg border border-danger-border rounded-lg p-4">
<div className="flex items-center"> <div className="flex items-center">
<ExclamationTriangleIcon className="h-5 w-5 text-destructive mr-2" /> <ExclamationTriangleIcon className="h-5 w-5 text-danger mr-2" />
<div> <div>
<h4 className="text-sm font-medium text-destructive">High Usage Warning</h4> <h4 className="text-sm font-medium text-danger">High Usage Warning</h4>
<p className="text-sm text-destructive/80 mt-1"> <p className="text-sm text-danger/80 mt-1">
You have used {usagePercentage.toFixed(1)}% of your data quota. Consider topping You have used {usagePercentage.toFixed(1)}% of your data quota. Consider topping
up to avoid service interruption. up to avoid service interruption.
</p> </p>

View File

@ -245,7 +245,7 @@ export function SimActions({
disabled={!canCancel || loading !== null} disabled={!canCancel || loading !== null}
className={`w-full flex items-center justify-start px-4 py-4 rounded-lg text-sm font-medium transition-colors duration-[var(--cp-duration-normal)] ${ className={`w-full flex items-center justify-start px-4 py-4 rounded-lg text-sm font-medium transition-colors duration-[var(--cp-duration-normal)] ${
canCancel && loading === null canCancel && loading === null
? "text-destructive bg-destructive-soft border border-destructive/30 hover:bg-destructive-soft/80 shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)] focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background" ? "text-danger bg-danger-soft border border-danger/30 hover:bg-danger-soft/80 shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)] focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background"
: "text-muted-foreground bg-muted border border-border cursor-not-allowed" : "text-muted-foreground bg-muted border border-border cursor-not-allowed"
}`} }`}
> >
@ -285,7 +285,7 @@ export function SimActions({
)} )}
{activeInfo === "cancel" && ( {activeInfo === "cancel" && (
<div className="flex items-start"> <div className="flex items-start">
<XMarkIcon className="h-4 w-4 text-destructive mr-2 mt-0.5 flex-shrink-0" /> <XMarkIcon className="h-4 w-4 text-danger mr-2 mt-0.5 flex-shrink-0" />
<div> <div>
<strong>Cancel SIM:</strong> Permanently cancel your SIM service. This action <strong>Cancel SIM:</strong> Permanently cancel your SIM service. This action
cannot be undone and will terminate your service immediately. cannot be undone and will terminate your service immediately.
@ -383,8 +383,8 @@ export function SimActions({
<div className="inline-block align-bottom bg-card rounded-lg text-left overflow-hidden shadow-[var(--cp-shadow-3)] border border-border transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"> <div className="inline-block align-bottom bg-card rounded-lg text-left overflow-hidden shadow-[var(--cp-shadow-3)] border border-border transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
<div className="bg-card px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> <div className="bg-card px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div className="sm:flex sm:items-start"> <div className="sm:flex sm:items-start">
<div className="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-destructive-soft sm:mx-0 sm:h-10 sm:w-10"> <div className="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-danger-soft sm:mx-0 sm:h-10 sm:w-10">
<ExclamationTriangleIcon className="h-6 w-6 text-destructive" /> <ExclamationTriangleIcon className="h-6 w-6 text-danger" />
</div> </div>
<div className="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"> <div className="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 className="text-lg leading-6 font-medium text-foreground"> <h3 className="text-lg leading-6 font-medium text-foreground">

View File

@ -57,7 +57,7 @@ export function SimDetailsCard({
case "suspended": case "suspended":
return <ExclamationTriangleIcon className="h-6 w-6 text-warning" />; return <ExclamationTriangleIcon className="h-6 w-6 text-warning" />;
case "cancelled": case "cancelled":
return <XCircleIcon className="h-6 w-6 text-destructive" />; return <XCircleIcon className="h-6 w-6 text-danger" />;
case "pending": case "pending":
return <ClockIcon className="h-6 w-6 text-info" />; return <ClockIcon className="h-6 w-6 text-info" />;
default: default:
@ -72,7 +72,7 @@ export function SimDetailsCard({
case "suspended": case "suspended":
return "bg-warning-soft text-warning"; return "bg-warning-soft text-warning";
case "cancelled": case "cancelled":
return "bg-destructive-soft text-destructive"; return "bg-danger-soft text-danger";
case "pending": case "pending":
return "bg-info-soft text-info"; return "bg-info-soft text-info";
default: default:
@ -127,14 +127,14 @@ export function SimDetailsCard({
if (error) { if (error) {
return ( return (
<div <div
className={`${embedded ? "" : "bg-card shadow-sm rounded-[var(--cp-card-radius)] border border-destructive-soft "}p-[var(--cp-card-padding)] lg:p-[var(--cp-card-padding-lg)]`} className={`${embedded ? "" : "bg-card shadow-sm rounded-[var(--cp-card-radius)] border border-danger-soft "}p-[var(--cp-card-padding)] lg:p-[var(--cp-card-padding-lg)]`}
> >
<div className="text-center"> <div className="text-center">
<div className="bg-destructive-soft rounded-full p-3 w-16 h-16 mx-auto mb-4"> <div className="bg-danger-soft rounded-full p-3 w-16 h-16 mx-auto mb-4">
<ExclamationTriangleIcon className="h-10 w-10 text-destructive mx-auto" /> <ExclamationTriangleIcon className="h-10 w-10 text-danger mx-auto" />
</div> </div>
<h3 className="text-lg font-semibold text-foreground mb-2">Error Loading SIM Details</h3> <h3 className="text-lg font-semibold text-foreground mb-2">Error Loading SIM Details</h3>
<p className="text-destructive text-sm">{error}</p> <p className="text-danger text-sm">{error}</p>
</div> </div>
</div> </div>
); );

View File

@ -181,7 +181,7 @@ export function SimFeatureToggles({
<div className="text-xs text-muted-foreground"> <div className="text-xs text-muted-foreground">
Choose your preferred connectivity Choose your preferred connectivity
</div> </div>
<div className="text-xs text-destructive mt-1"> <div className="text-xs text-danger mt-1">
Voice, network, and plan changes must be requested at least 30 minutes apart. If you Voice, network, and plan changes must be requested at least 30 minutes apart. If you
just changed another option, you may need to wait before submitting. just changed another option, you may need to wait before submitting.
</div> </div>

View File

@ -163,8 +163,8 @@ export function SimManagementSection({ subscriptionId }: SimManagementSectionPro
return ( return (
<div className="bg-card shadow-[var(--cp-shadow-1)] rounded-lg border border-border p-8"> <div className="bg-card shadow-[var(--cp-shadow-1)] rounded-lg border border-border p-8">
<div className="text-center py-10 max-w-xl mx-auto"> <div className="text-center py-10 max-w-xl mx-auto">
<div className="w-20 h-20 mx-auto mb-6 rounded-full bg-destructive-soft flex items-center justify-center border border-destructive/25"> <div className="w-20 h-20 mx-auto mb-6 rounded-full bg-danger-soft flex items-center justify-center border border-danger/25">
<ExclamationTriangleIcon className="h-10 w-10 text-destructive" /> <ExclamationTriangleIcon className="h-10 w-10 text-danger" />
</div> </div>
<h3 className="text-xl font-semibold text-foreground mb-3"> <h3 className="text-xl font-semibold text-foreground mb-3">
Unable to Load SIM Information Unable to Load SIM Information
@ -321,9 +321,9 @@ export function SimManagementSection({ subscriptionId }: SimManagementSectionPro
<button <button
onClick={navigateToCancel} onClick={navigateToCancel}
className="flex flex-col items-center justify-center p-6 bg-card border border-destructive/25 rounded-lg hover:bg-destructive-soft hover:shadow-[var(--cp-shadow-2)] transition-colors duration-[var(--cp-duration-normal)]" className="flex flex-col items-center justify-center p-6 bg-card border border-danger/25 rounded-lg hover:bg-danger-soft hover:shadow-[var(--cp-shadow-2)] transition-colors duration-[var(--cp-duration-normal)]"
> >
<XCircleIcon className="h-8 w-8 text-destructive mb-2" /> <XCircleIcon className="h-8 w-8 text-danger mb-2" />
<span className="text-sm font-medium text-foreground">Cancel SIM</span> <span className="text-sm font-medium text-foreground">Cancel SIM</span>
</button> </button>
</div> </div>

View File

@ -20,7 +20,7 @@ const STATUS_ICON_MAP: Record<SubscriptionStatus, ReactNode> = {
[SUBSCRIPTION_STATUS.INACTIVE]: <ServerIcon className="h-6 w-6 text-muted-foreground" />, [SUBSCRIPTION_STATUS.INACTIVE]: <ServerIcon className="h-6 w-6 text-muted-foreground" />,
[SUBSCRIPTION_STATUS.PENDING]: <ClockIcon className="h-6 w-6 text-info" />, [SUBSCRIPTION_STATUS.PENDING]: <ClockIcon className="h-6 w-6 text-info" />,
[SUBSCRIPTION_STATUS.SUSPENDED]: <ExclamationTriangleIcon className="h-6 w-6 text-warning" />, [SUBSCRIPTION_STATUS.SUSPENDED]: <ExclamationTriangleIcon className="h-6 w-6 text-warning" />,
[SUBSCRIPTION_STATUS.TERMINATED]: <XCircleIcon className="h-6 w-6 text-destructive" />, [SUBSCRIPTION_STATUS.TERMINATED]: <XCircleIcon className="h-6 w-6 text-danger" />,
[SUBSCRIPTION_STATUS.CANCELLED]: <XCircleIcon className="h-6 w-6 text-muted-foreground" />, [SUBSCRIPTION_STATUS.CANCELLED]: <XCircleIcon className="h-6 w-6 text-muted-foreground" />,
[SUBSCRIPTION_STATUS.COMPLETED]: <CheckCircleIcon className="h-6 w-6 text-success" />, [SUBSCRIPTION_STATUS.COMPLETED]: <CheckCircleIcon className="h-6 w-6 text-success" />,
}; };

View File

@ -172,7 +172,7 @@ export function SimCancelContainer() {
{/* Minimum Contract Warning */} {/* Minimum Contract Warning */}
{preview?.isWithinMinimumTerm && ( {preview?.isWithinMinimumTerm && (
<div className="bg-destructive-soft border border-destructive/25 rounded-lg p-4 mb-6"> <div className="bg-danger-soft border border-danger/25 rounded-lg p-4 mb-6">
<div className="text-sm font-semibold text-foreground mb-1"> <div className="text-sm font-semibold text-foreground mb-1">
Minimum Contract Term Warning Minimum Contract Term Warning
</div> </div>
@ -361,12 +361,12 @@ export function SimCancelContainer() {
</div> </div>
{emailProvided && !emailValid && ( {emailProvided && !emailValid && (
<div className="text-xs text-destructive"> <div className="text-xs text-danger">
Please enter a valid email address in both fields. Please enter a valid email address in both fields.
</div> </div>
)} )}
{emailProvided && emailValid && !emailsMatch && ( {emailProvided && emailValid && !emailsMatch && (
<div className="text-xs text-destructive">Email addresses do not match.</div> <div className="text-xs text-danger">Email addresses do not match.</div>
)} )}
{/* Comments */} {/* Comments */}
@ -385,7 +385,7 @@ export function SimCancelContainer() {
</div> </div>
{/* Final Warning */} {/* Final Warning */}
<div className="bg-destructive-soft border border-destructive/25 rounded-lg p-4"> <div className="bg-danger-soft border border-danger/25 rounded-lg p-4">
<div className="text-sm font-semibold text-foreground mb-1"> <div className="text-sm font-semibold text-foreground mb-1">
Your cancellation request is not confirmed yet. Your cancellation request is not confirmed yet.
</div> </div>

View File

@ -273,7 +273,7 @@ export function SimReissueContainer() {
device settings under "About" or "SIM status". device settings under "About" or "SIM status".
</p> </p>
{newEid && !isValidEid() && ( {newEid && !isValidEid() && (
<p className="text-xs text-destructive mt-1"> <p className="text-xs text-danger mt-1">
Please enter exactly 32 digits ({newEid.length}/32) Please enter exactly 32 digits ({newEid.length}/32)
</p> </p>
)} )}

View File

@ -138,8 +138,8 @@ export function SimTopUpContainer() {
</div> </div>
{!isValidAmount() && gbAmount && ( {!isValidAmount() && gbAmount && (
<div className="bg-destructive-soft border border-destructive/25 rounded-lg p-3"> <div className="bg-danger-soft border border-danger/25 rounded-lg p-3">
<p className="text-sm text-destructive"> <p className="text-sm text-danger">
Please enter a valid whole number between 1 and 50 GB. Please enter a valid whole number between 1 and 50 GB.
</p> </p>
</div> </div>

View File

@ -87,7 +87,7 @@ const STATUS_CLASSES_WITH_BORDER: Record<CaseStatusVariant, string> = {
* Tailwind class mappings for priority variants * Tailwind class mappings for priority variants
*/ */
const PRIORITY_CLASSES: Record<CasePriorityVariant, string> = { const PRIORITY_CLASSES: Record<CasePriorityVariant, string> = {
high: "text-destructive bg-destructive-soft", high: "text-danger bg-danger-soft",
medium: "text-warning bg-warning-soft", medium: "text-warning bg-warning-soft",
low: "text-success bg-success-soft", low: "text-success bg-success-soft",
neutral: "text-muted-foreground bg-muted", neutral: "text-muted-foreground bg-muted",
@ -97,7 +97,7 @@ const PRIORITY_CLASSES: Record<CasePriorityVariant, string> = {
* Tailwind class mappings for priority variants with border * Tailwind class mappings for priority variants with border
*/ */
const PRIORITY_CLASSES_WITH_BORDER: Record<CasePriorityVariant, string> = { const PRIORITY_CLASSES_WITH_BORDER: Record<CasePriorityVariant, string> = {
high: "text-destructive bg-destructive-soft border-destructive/20", high: "text-danger bg-danger-soft border-danger/20",
medium: "text-warning bg-warning-soft border-warning/20", medium: "text-warning bg-warning-soft border-warning/20",
low: "text-success bg-success-soft border-success/20", low: "text-success bg-success-soft border-success/20",
neutral: "text-muted-foreground bg-muted border-border", neutral: "text-muted-foreground bg-muted border-border",

View File

@ -94,12 +94,6 @@
color: var(--neutral-foreground); color: var(--neutral-foreground);
} }
/* Legacy aliases */
.cp-badge-error {
background: var(--danger);
color: var(--danger-foreground);
}
/* Soft badge variants (light bg, dark text) */ /* Soft badge variants (light bg, dark text) */
.cp-badge-soft-success { .cp-badge-soft-success {
background: var(--success-soft); background: var(--success-soft);
@ -126,12 +120,6 @@
color: var(--neutral); color: var(--neutral);
} }
/* Legacy aliases */
.cp-badge-soft-error {
background: var(--danger-soft);
color: var(--danger);
}
.cp-badge-outline { .cp-badge-outline {
background: transparent; background: transparent;
border: 1px solid currentColor; border: 1px solid currentColor;