- Add fixed slab/slab-text/slab-muted tokens so utility strip and footer never invert to near-white in dark mode (root token split: ink is themed text, slab is fixed dark surface) - btn-ink uses fixed #111827 so confirm dialogs stay dark-on-dark readable - Toast error surface switched to slab; success uses text-white (not text-ink-on) - StatusBadge active and SimulationStatusBadge review_required/done use text-white instead of text-canvas/text-ink-on (prevents near-black text on colored pill in dark mode) - Modal backdrops (MitreMatrixModal, ConfirmDialog) switched to .modal-backdrop class (fixed rgba(0,0,0,0.6)) instead of bg-ink/60 which turned near-white - Card shadow lifted in dark mode via .dark .card-product override - MitreMatrixModal panel uses shadow-floating-dark in dark mode - UsersAdminPage form: items-start + explicit label-height spacer on button column for pixel-perfect baseline alignment (AC-17.3 structural fix) 92/92 tests passing, typecheck and lint clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
994 B
TypeScript
30 lines
994 B
TypeScript
import type { SimulationStatus } from '@/api/types';
|
|
|
|
const LABELS: Record<SimulationStatus, string> = {
|
|
pending: 'Pending',
|
|
in_progress: 'In progress',
|
|
review_required: 'Review required',
|
|
done: 'Done',
|
|
};
|
|
|
|
// Fixed colors — badge backgrounds are decorative/semantic, not themeable.
|
|
// text-white is hardcoded (not text-canvas) so dark mode doesn't invert it to near-black.
|
|
const STYLES: Record<SimulationStatus, string> = {
|
|
pending: 'bg-fog text-charcoal border border-hairline',
|
|
in_progress: 'bg-primary-soft text-primary-deep',
|
|
review_required: 'bg-bloom-coral text-white',
|
|
done: 'bg-storm-deep text-white',
|
|
};
|
|
|
|
export function SimulationStatusBadge({ status }: { status: SimulationStatus }): JSX.Element {
|
|
return (
|
|
<span
|
|
className={`inline-flex items-center rounded-lg px-3 py-[6px] text-[14px] leading-[1.3] font-medium ${STYLES[status]}`}
|
|
data-testid="simulation-status-badge"
|
|
data-status={status}
|
|
>
|
|
{LABELS[status]}
|
|
</span>
|
|
);
|
|
}
|