feat(design): sweep off-system styles and add the check:design gate

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 20:39:44 +08:00
co-authored by Claude Haiku 4.5
parent ba9eeefe47
commit c5a98eed06
56 changed files with 335 additions and 216 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ export function CapaBoard({ capas }: Props) {
return (
<div>
<div className="flex justify-end mb-3">
<button onClick={() => setView('board')} className="text-sm text-blue-600 hover:underline">Board view</button>
<button onClick={() => setView('board')} className="text-sm text-accent-700 hover:underline">Board view</button>
</div>
<div className="overflow-x-auto">
<table className="w-full text-sm">
@@ -75,7 +75,7 @@ export function CapaBoard({ capas }: Props) {
{(c.incidents as { reference_no: string | null } | null)?.reference_no ?? '—'}
</td>
<td className="py-2 pr-4">
<Link href={`/hse/capa/${c.id}`} className="text-blue-600 hover:underline line-clamp-2">
<Link href={`/hse/capa/${c.id}`} className="text-accent-700 hover:underline line-clamp-2">
{c.description}
</Link>
</td>
+1 -1
View File
@@ -121,7 +121,7 @@ export function CapaForm({ incidentId }: Props) {
{error && <p className="text-sm text-red-600">{error}</p>}
<button type="submit" disabled={saving}
className="w-full bg-amber-600 text-white py-2 text-sm font-semibold disabled:opacity-50">
className="w-full bg-accent text-white py-2 text-sm font-semibold disabled:opacity-50">
{saving ? 'Creating…' : 'Create CAPA Action'}
</button>
</form>
+1 -1
View File
@@ -48,7 +48,7 @@ export function CapaOwnerActions({ capaId, currentStatus }: Props) {
<button
onClick={() => updateStatus('pending_verification')}
disabled={loading}
className="text-sm px-3 py-1.5 bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50"
className="text-sm px-3 py-1.5 bg-accent text-white hover:bg-accent-600 disabled:opacity-50"
>
{loading ? '…' : 'Submit for Verification'}
</button>
+2 -2
View File
@@ -39,7 +39,7 @@ export function CapaOwnerNotesForm({ capaId, initialNotes }: Props) {
onChange={e => { setNotes(e.target.value); setSaved(false) }}
rows={2}
placeholder="Add any notes or updates for this action…"
className="w-full border border-divider px-3 py-2 text-sm text-gray-800 resize-none focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full border border-divider px-3 py-2 text-sm text-gray-800 resize-none focus:outline-none focus:ring-2 focus:ring-accent"
/>
{error && <p className="text-xs text-red-600">{error}</p>}
<div className="flex items-center gap-2">
@@ -50,7 +50,7 @@ export function CapaOwnerNotesForm({ capaId, initialNotes }: Props) {
>
{saving ? 'Saving…' : 'Save Notes'}
</button>
{saved && <span className="text-xs text-green-600">Saved</span>}
{saved && <span className="text-xs text-ink">Saved</span>}
</div>
</div>
)
+2 -2
View File
@@ -31,7 +31,7 @@ export function CloseCapaButton({ capaId }: Props) {
}
return (
<div className="border border-divider p-5 space-y-3 bg-green-50">
<div className="border border-divider p-5 space-y-3 bg-neutral-100">
<h3 className="text-sm font-semibold text-gray-800">Close CAPA</h3>
<p className="text-sm text-gray-600">
This CAPA has been verified as effective. Close it to mark it fully resolved.
@@ -40,7 +40,7 @@ export function CloseCapaButton({ capaId }: Props) {
<button
onClick={handleClose}
disabled={loading}
className="w-full bg-green-700 text-white py-2 text-sm font-semibold hover:bg-green-800 disabled:opacity-50"
className="w-full bg-accent text-white py-2 text-sm font-semibold hover:bg-accent-700 disabled:opacity-50"
>
{loading ? 'Closing…' : 'Close CAPA'}
</button>
+9 -9
View File
@@ -39,17 +39,17 @@ export function VerifyForm({ capaId }: Props) {
}
return (
<form onSubmit={handleSubmit} className="border border-divider p-5 space-y-4 bg-purple-50">
<form onSubmit={handleSubmit} className="border border-divider p-5 space-y-4 bg-accent-100">
<h3 className="text-sm font-semibold text-gray-800">HSE Verification</h3>
<div className="flex gap-3">
<button
type="button"
onClick={() => setVerdict('verified')}
className={`flex-1 py-2 text-sm font-medium border ${
verdict === 'verified'
? 'bg-green-600 text-white border-green-600'
: 'bg-surface text-gray-700 border-divider hover:border-green-500'
}`}
verdict === 'verified'
? 'bg-accent text-white border-accent'
: 'bg-surface text-gray-700 border-divider hover:border-accent'
}`}
>
Verified — Effective
</button>
@@ -57,10 +57,10 @@ export function VerifyForm({ capaId }: Props) {
type="button"
onClick={() => setVerdict('reopened')}
className={`flex-1 py-2 text-sm font-medium border ${
verdict === 'reopened'
? 'bg-orange-600 text-white border-orange-600'
: 'bg-surface text-gray-700 border-divider hover:border-orange-500'
}`}
verdict === 'reopened'
? 'bg-accent text-white border-accent'
: 'bg-surface text-gray-700 border-divider hover:border-accent'
}`}
>
Reopen — Ineffective
</button>