refactor(design): no amber boxes, attention is one ochre sentence (#1562)
The founder wants the yellow boxes gone everywhere. The design system already agreed: status colors are data, not chrome (convention 12) and attention is a single ochre sentence, never a banner (convention 6). This enforces it: - ConfirmationDialog: the amber warning panel is now an AttnLine, and the hardcoded Swedish default warningText is gone: it injected an immutability warning into dialogs whose authors never asked for one (every current caller passes the prop explicitly, so no behavior change at any call site). - Badge warning variant: amber fill replaced with a hairline chip and ochre text. - DestructiveConfirmDialog warning variant: neutral icon disc, default primary confirm button (only --destructive survives as chrome). - BankSyncStatusChip stale state: same neutral shape as the healthy chip, ochre text carries the signal. - SandboxBanner: solid amber bar becomes secondary-on-border chrome. - BankIdAuth, BankIdCompanyPicker, SessionTimeoutModal: the last three raw-amber (bg-amber-*) holdouts moved onto tokens, the company-picker banner becoming a plain AttnLine. - Mechanical sweep of the ~58 hand-rolled bg-warning/border-warning boxes across 45 files: fills to bg-muted/30 (icon discs bg-muted), borders to border-border, text-warning-foreground to text-attn. The account-class dots in account-number.tsx keep bg-warning: they are data indicators, not chrome. Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Jakob Wennberg
Claude Fable 5
parent
abff8d90f6
commit
e51a2c8102
@@ -681,7 +681,7 @@ export default function JournalEntryDetailPage({ params }: { params: Promise<{ i
|
||||
<CardContent className="text-sm">
|
||||
{attachmentCount === 0 && references.length === 0 ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<AlertTriangle className="h-4 w-4 text-warning-foreground" />
|
||||
<AlertTriangle className="h-4 w-4 text-attn" />
|
||||
<span className="text-muted-foreground">{t('no_attachments')}</span>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -1390,7 +1390,7 @@ export default function InvoiceDetailPage({ params }: { params: Promise<{ id: st
|
||||
className={cn(
|
||||
'flex items-center gap-2',
|
||||
invoice.status === 'paid' && 'text-success',
|
||||
invoice.status === 'partially_paid' && 'text-warning-foreground',
|
||||
invoice.status === 'partially_paid' && 'text-attn',
|
||||
)}
|
||||
>
|
||||
{invoice.status === 'paid' ? (
|
||||
@@ -1423,7 +1423,7 @@ export default function InvoiceDetailPage({ params }: { params: Promise<{ id: st
|
||||
<p
|
||||
className={cn(
|
||||
'font-display text-xl tabular-nums mt-1',
|
||||
invoice.status === 'partially_paid' && 'text-warning-foreground',
|
||||
invoice.status === 'partially_paid' && 'text-attn',
|
||||
)}
|
||||
>
|
||||
{formatCurrency(
|
||||
@@ -1567,7 +1567,7 @@ export default function InvoiceDetailPage({ params }: { params: Promise<{ id: st
|
||||
|
||||
{/* Credit note reference (if this invoice was credited) */}
|
||||
{creditNote && (
|
||||
<Card className={creditNote.status === 'draft' ? undefined : 'border-warning/50'}>
|
||||
<Card className={creditNote.status === 'draft' ? undefined : 'border-border'}>
|
||||
<CardHeader>
|
||||
<CardTitle className={cn(
|
||||
'flex items-center gap-2',
|
||||
|
||||
@@ -247,7 +247,7 @@ export default function RecurringInvoicesPage() {
|
||||
)}
|
||||
{s.last_run_warning && (
|
||||
<AlertTriangle
|
||||
className="h-4 w-4 text-warning-foreground"
|
||||
className="h-4 w-4 text-attn"
|
||||
aria-label={s.last_run_warning}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -481,7 +481,7 @@ export default function EmployeeDetailPage({ params }: { params: Promise<{ id: s
|
||||
</div>
|
||||
</div>
|
||||
{showChecksumWarning && (
|
||||
<p className="mt-2 text-xs text-warning-foreground">{t('bank_warn_checksum')}</p>
|
||||
<p className="mt-2 text-xs text-attn">{t('bank_warn_checksum')}</p>
|
||||
)}
|
||||
<p className="text-xs text-muted-foreground mt-2">{t('form_bank_hint')}</p>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user