docs(design): add design.md for the IMS Admin refresh and track its mockup references
Derived from IMS Admin Spec.dc.html and IMS Admin.dc.html. Defines tokens, components (StatusTag, TableCard, shells, drawer), screen index, build order and the changes from the live Modernist build. CLAUDE.md already cites it as the source of truth. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,143 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<script src="./support.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<x-dc>
|
||||||
|
<helmet>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
body{margin:0;background:#f7f7f7;color:#1f1f1f;font-family:Geist,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
|
||||||
|
a{color:#0f766e;text-decoration:none}a:hover{text-decoration:underline}
|
||||||
|
</style>
|
||||||
|
</helmet>
|
||||||
|
<div style="max-width:1080px;margin:0 auto;padding:56px 40px 96px;display:flex;flex-direction:column;gap:56px">
|
||||||
|
<div style="display:flex;flex-direction:column;gap:12px">
|
||||||
|
<div style="font:600 12px 'Geist Mono',monospace;color:#616161;letter-spacing:.04em">IMS · UI REFRESH · HANDOFF SPEC</div>
|
||||||
|
<div style="font-size:30px;font-weight:600;letter-spacing:-.02em">Patterns, tokens and states</div>
|
||||||
|
<div style="font-size:15px;line-height:1.55;color:#4a4a4a;max-width:720px;text-wrap:pretty">Everything in <a href="IMS Admin.dc.html">IMS Admin.dc.html</a> is built from the pieces below. Values are the ones used in the mockups; map them to Tailwind theme tokens once and the screens follow. Type is Geist (UI) and Geist Mono (references, keyboard hints).</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:20px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">1 · Color</div>
|
||||||
|
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px">
|
||||||
|
<sc-for list="{{ colors }}" as="c" hint-placeholder-count="12"><div style="display:flex;flex-direction:column;gap:8px"><div style="height:56px;border-radius:10px;background:{{ c.hex }};box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)"></div><div style="font-size:13px;font-weight:550">{{ c.name }}</div><div style="font:500 12px 'Geist Mono',monospace;color:#616161">{{ c.hex }}</div><div style="font-size:12px;color:#616161;line-height:1.4">{{ c.use }}</div></div></sc-for>
|
||||||
|
</div>
|
||||||
|
<div style="font-size:14px;font-weight:600;margin-top:8px">Status pills</div>
|
||||||
|
<div style="display:flex;flex-wrap:wrap;gap:8px">
|
||||||
|
<sc-for list="{{ pills }}" as="p" hint-placeholder-count="12"><span style="display:inline-flex;align-items:center;gap:8px;padding:2px 8px 2px 8px;border-radius:8px;font-size:12px;font-weight:550;white-space:nowrap;background:{{ p.bg }};color:{{ p.fg }}">{{ p.label }}<span style="font:500 11px 'Geist Mono',monospace;opacity:.75">{{ p.bg }} / {{ p.fg }}</span></span></sc-for>
|
||||||
|
</div>
|
||||||
|
<div style="font-size:13px;color:#4a4a4a;line-height:1.5;max-width:720px">Pill text is always a dark ramp step on a light tint — never white on a saturated fill. Priority uses the same scale: Critical = red, High = orange, Medium = yellow, Low = neutral. Incident status and CAPA status share one palette so the dashboard reads consistently.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:20px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">2 · Type, radius, shadow</div>
|
||||||
|
<div style="display:grid;grid-template-columns:1fr 1fr;gap:24px">
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px">
|
||||||
|
<sc-for list="{{ type }}" as="t" hint-placeholder-count="7"><div style="display:grid;grid-template-columns:150px 1fr;gap:16px;align-items:baseline;padding:8px 0;border-bottom:1px solid #ebebeb"><span style="font:500 12px 'Geist Mono',monospace;color:#616161">{{ t.spec }}</span><span style="font-size:{{ t.size }};font-weight:{{ t.w }};font-family:{{ t.fam }};letter-spacing:{{ t.ls }}">{{ t.sample }}</span></div></sc-for>
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px">
|
||||||
|
<sc-for list="{{ shape }}" as="s" hint-placeholder-count="6"><div style="display:grid;grid-template-columns:150px 1fr;gap:16px;align-items:center;padding:8px 0;border-bottom:1px solid #ebebeb"><span style="font:500 12px 'Geist Mono',monospace;color:#616161">{{ s.k }}</span><span style="font-size:13px;color:#303030">{{ s.v }}</span></div></sc-for>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:20px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">3 · Buttons and controls</div>
|
||||||
|
<div style="display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start">
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Primary · 32px · #303030, inset highlight</span><span style="display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:8px;background:#303030;color:#fff;font-size:13px;font-weight:600;box-shadow:inset 0 -1px 0 #000,inset 0 1px 0 rgba(255,255,255,.18),0 1px 2px rgba(0,0,0,.2);cursor:pointer;white-space:nowrap;align-self:flex-start">{{ ic.plus }}Report incident</span><span style="font-size:12px;color:#616161">hover #1f1f1f · active #000 · focus 2px ring #0f766e offset 2px</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Secondary · white, 1px #d4d4d4 ring</span><span style="display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:8px;background:#fff;color:#1f1f1f;font-size:13px;font-weight:550;box-shadow:inset 0 0 0 1px #d4d4d4,0 1px 0 rgba(0,0,0,.05);cursor:pointer;white-space:nowrap;align-self:flex-start">{{ ic.download }}Export</span><span style="font-size:12px;color:#616161">hover bg #f7f7f7 · active bg #ebebeb</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Icon button · 28px, ghost</span><span style="width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#4a4a4a;cursor:pointer;background:#ebebeb">{{ ic.more }}</span><span style="font-size:12px;color:#616161">rest transparent · hover #ebebeb</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Filter chip · 28px</span><div style="display:flex;gap:6px"><span style="display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border-radius:8px;font-size:12.5px;color:#303030;box-shadow:inset 0 0 0 1px #d4d4d4;background:#fff;cursor:pointer;white-space:nowrap">Owner{{ ic.chev12 }}</span><span style="display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border-radius:8px;font-size:12.5px;background:#e6f4f1;box-shadow:inset 0 0 0 1px #9fd3c7;color:#0b4f47;cursor:pointer;white-space:nowrap">Priority: Critical{{ ic.x12 }}</span></div><span style="font-size:12px;color:#616161">unset: chevron · set: teal tint + value + clear ×</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Segmented · 2px padding on #e3e3e3</span><div style="display:flex;padding:2px;border-radius:10px;background:#e3e3e3;align-self:flex-start"><span style="display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;background:#fff;font-size:13px;font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.1);white-space:nowrap">{{ ic.rows }}List</span><span style="display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:13px;color:#4a4a4a;white-space:nowrap">{{ ic.kanban }}Board</span></div></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Checkbox · 16px, radius 5</span><div style="display:flex;gap:8px;align-items:center"><span style="width:16px;height:16px;border-radius:5px;box-shadow:inset 0 0 0 1.5px #8a8a8a;background:#fff;display:block"></span><span style="width:16px;height:16px;border-radius:5px;background:#0f766e;color:#fff;display:grid;place-items:center">{{ ic.tick12 }}</span><span style="width:16px;height:16px;border-radius:5px;background:#0f766e;color:#fff;display:grid;place-items:center">{{ ic.minus12 }}</span></div><span style="font-size:12px;color:#616161">off · on · indeterminate (header)</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:10px"><span style="font-size:12px;color:#616161">Text input · 36px desktop, 48px mobile</span><div style="height:36px;padding:0 12px;border-radius:8px;box-shadow:inset 0 0 0 1px #8a8a8a;background:#fff;font-size:13px;display:flex;align-items:center;color:#8a8a8a;width:220px">Placeholder</div><span style="font-size:12px;color:#616161">rest ring #8a8a8a · focus ring 2px #0f766e · error #b3261e</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:20px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">4 · Table card</div>
|
||||||
|
<div style="font-size:13px;color:#4a4a4a;line-height:1.5;max-width:720px;text-wrap:pretty">One component wraps every list in the app. Anatomy top to bottom; every part is optional except the table and the card.</div>
|
||||||
|
<div style="background:#fff;border-radius:12px;box-shadow:0 0 0 1px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);overflow:hidden;position:relative">
|
||||||
|
<div style="display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid #ebebeb"><div style="display:flex;gap:2px;align-items:center"><div style="display:flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:8px;font-size:13px;font-weight:600;background:#e3e3e3;color:#1f1f1f">All <span style="font-size:12px;color:#8a8a8a;font-weight:500">248</span></div><div style="display:flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:8px;font-size:13px;font-weight:500;color:#4a4a4a">Open <span style="font-size:12px;color:#8a8a8a">37</span></div><div style="width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#4a4a4a">{{ ic.plus }}</div></div><span style="font:500 11px 'Geist Mono',monospace;color:#8a8a8a;padding-right:4px">A · saved views · padding 8 · active #e3e3e3</span></div>
|
||||||
|
<div style="display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #ebebeb"><div style="display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border-radius:8px;box-shadow:inset 0 0 0 1px #8a8a8a;background:#fff;color:#616161;font-size:13px;min-width:260px">{{ ic.search }}<span>Search</span></div><span style="display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border-radius:8px;font-size:12.5px;color:#303030;box-shadow:inset 0 0 0 1px #d4d4d4;background:#fff;white-space:nowrap">Site{{ ic.chev12 }}</span><span style="flex:1"></span><span style="font:500 11px 'Geist Mono',monospace;color:#8a8a8a">B · search + filter chips · padding 10/12</span></div>
|
||||||
|
<table><thead><tr><th style="padding:9px 12px;font-size:12px;font-weight:550;color:#616161;text-align:left;background:#f7f7f7;border-bottom:1px solid #e3e3e3;white-space:nowrap;width:28px;padding-left:16px"><span style="width:16px;height:16px;border-radius:5px;box-shadow:inset 0 0 0 1.5px #8a8a8a;background:#fff;display:block"></span></th><th style="padding:9px 12px;font-size:12px;font-weight:550;color:#616161;text-align:left;background:#f7f7f7;border-bottom:1px solid #e3e3e3;white-space:nowrap"><span style="display:inline-flex;align-items:center;gap:4px">Reference<span style="color:#1f1f1f">{{ ic.down12 }}</span></span></th><th style="padding:9px 12px;font-size:12px;font-weight:550;color:#616161;text-align:left;background:#f7f7f7;border-bottom:1px solid #e3e3e3;white-space:nowrap"><span style="display:inline-flex;align-items:center;gap:4px">Status<span style="color:#c4c4c4">{{ ic.sort12 }}</span></span></th><th style="padding:9px 12px;font-size:12px;font-weight:550;color:#616161;text-align:left;background:#f7f7f7;border-bottom:1px solid #e3e3e3;white-space:nowrap;width:100%"><span style="font:500 11px 'Geist Mono',monospace;color:#8a8a8a;font-weight:500">C · header #f7f7f7 · 12px/550 · sorted column ink, others #c4c4c4</span></th><th style="padding:9px 12px;background:#f7f7f7;border-bottom:1px solid #e3e3e3;width:100px"></th></tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr style="background:#fff"><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;padding-left:16px"><span style="width:16px;height:16px;border-radius:5px;box-shadow:inset 0 0 0 1.5px #8a8a8a;background:#fff;display:block"></span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><a href="#" style="font-family:'Geist Mono',monospace;font-size:12.5px">IMS-2026-0248</a></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><span style="display:inline-flex;align-items:center;padding:2px 8px;border-radius:8px;font-size:12px;font-weight:550;background:#ede7ff;color:#4b2e99">Investigating</span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;color:#8a8a8a;font:500 11px 'Geist Mono',monospace">D · row rest · #fff · 13px · 12px cell padding · 1px #ebebeb rule</td><td style="padding:12px;border-bottom:1px solid #ebebeb"></td></tr>
|
||||||
|
<tr style="background:#f7f7f7"><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;padding-left:16px"><span style="width:16px;height:16px;border-radius:5px;box-shadow:inset 0 0 0 1.5px #8a8a8a;background:#fff;display:block"></span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><a href="#" style="font-family:'Geist Mono',monospace;font-size:12.5px">IMS-2026-0247</a></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><span style="display:inline-flex;align-items:center;padding:2px 8px;border-radius:8px;font-size:12px;font-weight:550;background:#e0efff;color:#00527c">Triaged</span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;color:#8a8a8a;font:500 11px 'Geist Mono',monospace">E · row hover · #f7f7f7 · quick actions appear right</td><td style="padding:12px;border-bottom:1px solid #ebebeb"><div style="display:flex;gap:4px;justify-content:flex-end"><span style="width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#4a4a4a">{{ ic.eye }}</span><span style="width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#4a4a4a">{{ ic.more }}</span></div></td></tr>
|
||||||
|
<tr style="background:#f2f7f6"><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;padding-left:16px"><span style="width:16px;height:16px;border-radius:5px;background:#0f766e;color:#fff;display:grid;place-items:center">{{ ic.tick12 }}</span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><a href="#" style="font-family:'Geist Mono',monospace;font-size:12.5px">IMS-2026-0246</a></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb"><span style="display:inline-flex;align-items:center;padding:2px 8px;border-radius:8px;font-size:12px;font-weight:550;background:#fff1c2;color:#6b4a00">Reported</span></td><td style="padding:12px;font-size:13px;border-bottom:1px solid #ebebeb;color:#8a8a8a;font:500 11px 'Geist Mono',monospace">F · row selected · #f2f7f6</td><td style="padding:12px;border-bottom:1px solid #ebebeb"></td></tr>
|
||||||
|
</tbody></table>
|
||||||
|
<div style="display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#f7f7f7;font-size:13px;color:#616161"><span>Showing 1–3 of 248</span><span style="font:500 11px 'Geist Mono',monospace;color:#8a8a8a">G · footer #f7f7f7 · count left, pager right</span><div style="display:flex"><span style="display:inline-flex;align-items:center;height:32px;padding:0 7px;border-radius:8px 0 0 8px;background:#fff;box-shadow:inset 0 0 0 1px #d4d4d4;color:#b5b5b5">{{ ic.chevLeft }}</span><span style="display:inline-flex;align-items:center;height:32px;padding:0 7px;border-radius:0 8px 8px 0;background:#fff;box-shadow:inset 0 0 0 1px #d4d4d4;margin-left:-1px;color:#1f1f1f">{{ ic.chevRight }}</span></div></div>
|
||||||
|
<div style="display:flex;justify-content:center;padding:20px 16px 24px;background:#fcfcfc;border-top:1px solid #ebebeb"><div style="display:flex;align-items:center;gap:6px;padding:6px 6px 6px 12px;border-radius:12px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 12px 32px rgba(0,0,0,.18)"><span style="width:16px;height:16px;border-radius:5px;background:#0f766e;color:#fff;display:grid;place-items:center">{{ ic.tick12 }}</span><span style="font-size:13px;font-weight:600;padding:0 8px 0 4px;white-space:nowrap">1 selected</span><span style="width:1px;height:20px;background:#e3e3e3"></span><span style="display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:8px;font-size:13px;font-weight:550">Assign</span><span style="display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:8px;font-size:13px;font-weight:550">Export</span><span style="font:500 11px 'Geist Mono',monospace;color:#8a8a8a;padding:0 8px">H · bulk bar · floats centred above footer, appears on first selection</span></div></div>
|
||||||
|
</div>
|
||||||
|
<div style="display:grid;grid-template-columns:1fr 1fr;gap:24px;font-size:13px;color:#4a4a4a;line-height:1.55">
|
||||||
|
<div style="display:flex;flex-direction:column;gap:8px"><span style="font-weight:600;color:#1f1f1f">Behaviour</span><span>Whole row is clickable and opens the record; the checkbox cell, links and quick actions stop propagation.</span><span>Sorting is single-column; the sorted header shows a filled arrow, others a faint double chevron.</span><span>Saved views are server-side filters; the + opens "Save current filters as view". Counts update live.</span><span>Empty state replaces thead + tbody with a 64px icon tile, one line of copy and the primary action (see artboard 08).</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:8px"><span style="font-weight:600;color:#1f1f1f">Mobile</span><span>Below 768px the table becomes a stacked list in the same card: reference + status on line one, type · zone on line two, date on line three, chevron right (artboard 10).</span><span>Saved views become horizontally scrolling 999px chips; filters collapse to one "Filter" button opening a sheet.</span><span>Bulk bar is replaced by a bottom sheet.</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:20px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">5 · Layout shell</div>
|
||||||
|
<div style="display:grid;grid-template-columns:1fr 1fr;gap:24px;font-size:13px;color:#4a4a4a;line-height:1.55">
|
||||||
|
<div style="display:flex;flex-direction:column;gap:8px"><span style="font-weight:600;color:#1f1f1f">Desktop</span><span>Top bar 56px #1a1a1a: brand 224px · ⌘K search max 520px #303030 · bell + user chip 224px.</span><span>Sidebar 240px #ebebeb, padding 12, items 32px radius 8; active item white with 1px ring and teal icon; badges 999px #dcdcdc.</span><span>Main padding 24/32, column gap 16. Page title 20px/650 with actions right. Detail pages use 1fr + 320–340px side rail.</span><span>Page background #f1f1f1; cards white, radius 12, ring rgba(0,0,0,.08) + 1px shadow.</span></div>
|
||||||
|
<div style="display:flex;flex-direction:column;gap:8px"><span style="font-weight:600;color:#1f1f1f">Mobile (reporter)</span><span>390px reference. Page title 22px/650, horizontal padding 16, card gap 12.</span><span>Tab bar: white, 1px top rule, 3 items, 22px icons, 10.5px labels; active #0f766e.</span><span>Form controls 48px tall, radius 12; primary button full width 48px. Footers sit on #f1f1f1 with a 1px top rule and 30px bottom safe area.</span><span>Minimum hit target 44px everywhere.</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;flex-direction:column;gap:12px">
|
||||||
|
<div style="font-size:18px;font-weight:600;letter-spacing:-.01em;padding-bottom:10px;border-bottom:1px solid #dcdcdc">6 · Screen index</div>
|
||||||
|
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:6px 24px">
|
||||||
|
<sc-for list="{{ screens }}" as="s" hint-placeholder-count="24"><div style="display:flex;gap:10px;padding:6px 0;border-bottom:1px solid #ebebeb;font-size:13px"><span style="font:600 11px 'Geist Mono',monospace;color:#616161;width:32px;flex:none;padding-top:2px">{{ s.id }}</span><span style="flex:1">{{ s.name }}</span><span style="font-size:12px;color:#8a8a8a;white-space:nowrap">{{ s.route }}</span></div></sc-for>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-dc>
|
||||||
|
<script type="text/x-dc" data-dc-script>
|
||||||
|
class Component extends DCLogic {
|
||||||
|
renderVals() {
|
||||||
|
const I = (paths, s = 16, w = 2) => React.createElement('svg', { width: s, height: s, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: w, strokeLinecap: 'round', strokeLinejoin: 'round', style: { flex: 'none' } }, paths.map((d, i) => React.createElement('path', { key: i, d })));
|
||||||
|
const P = {
|
||||||
|
plus: ['M12 5v14', 'M5 12h14'], download: ['M12 3v12', 'm7 10 5 5 5-5', 'M4 19h16'], more: ['M12 12h.01', 'M19 12h.01', 'M5 12h.01'],
|
||||||
|
chevDown: ['m6 9 6 6 6-6'], x: ['M18 6 6 18', 'm6 6 12 12'], rows: ['M3 5h18v14H3z', 'M3 12h18'], kanban: ['M6 5v11', 'M12 5v6', 'M18 5v14'],
|
||||||
|
tick: ['M20 6 9 17l-5-5'], minus: ['M5 12h14'], search: ['M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z', 'm21 21-4.3-4.3'],
|
||||||
|
sort: ['m7 15 5 5 5-5', 'm7 9 5-5 5 5'], down: ['M12 5v14', 'm19 12-7 7-7-7'], eye: ['M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z', 'M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'],
|
||||||
|
chevLeft: ['m15 18-6-6 6-6'], chevRight: ['m9 18 6-6-6-6']
|
||||||
|
};
|
||||||
|
const ic = {}; Object.keys(P).forEach(k => { ic[k] = I(P[k]); });
|
||||||
|
ic.tick12 = I(P.tick, 12, 3); ic.minus12 = I(P.minus, 12, 3); ic.more = I(P.more, 16, 3); ic.sort12 = I(P.sort, 12); ic.down12 = I(P.down, 12, 2.5); ic.x12 = I(P.x, 12, 2.5); ic.chev12 = I(P.chevDown, 12, 2.5);
|
||||||
|
const colors = [
|
||||||
|
['Ink', '#1f1f1f', 'Primary text, active sidebar text'], ['Ink 2', '#303030', 'Primary button, chip text'], ['Ink 3', '#4a4a4a', 'Secondary text, icons'], ['Muted', '#616161', 'Labels, helper text'], ['Faint', '#8a8a8a', 'Placeholders, input ring'],
|
||||||
|
['Rule', '#ebebeb', 'Row rules, sidebar bg'], ['Rule 2', '#e3e3e3', 'Header rule, segmented bg'], ['Ring', '#d4d4d4', 'Secondary button and chip ring'], ['Surface 2', '#f7f7f7', 'Table header, footer, row hover'], ['Ground', '#f1f1f1', 'Page background'],
|
||||||
|
['Teal', '#0f766e', 'Accent: checks, links, active tab icon'], ['Teal tint', '#f2f7f6', 'Selected row, selected card'], ['Teal tint 2', '#e6f4f1', 'Set filter chip (ring #9fd3c7, text #0b4f47)'], ['Danger', '#b3261e', 'Overdue text, required marks'], ['Top bar', '#1a1a1a', 'App header (#303030 for its controls)']
|
||||||
|
].map(c => ({ name: c[0], hex: c[1], use: c[2] }));
|
||||||
|
const pills = [
|
||||||
|
['Reported', '#fff1c2', '#6b4a00'], ['Triaged', '#e0efff', '#00527c'], ['Investigating', '#ede7ff', '#4b2e99'], ['CAPA pending', '#ffe6cf', '#7a3a00'], ['Verification', '#e3e8ff', '#2c3e8f'], ['Closed', '#d7f4e3', '#0c5132'],
|
||||||
|
['Open', '#ebebeb', '#4a4a4a'], ['In progress', '#e0efff', '#00527c'], ['Overdue · Critical', '#fee3e0', '#8e1f0b'], ['High', '#ffe6cf', '#7a3a00'], ['Medium', '#fff1c2', '#6b4a00'], ['Active', '#d7f4e3', '#0c5132']
|
||||||
|
].map(p => ({ label: p[0], bg: p[1], fg: p[2] }));
|
||||||
|
const type = [
|
||||||
|
['32 / 600 / -0.02em', '32px', 600, 'Geist', '-.02em', 'Cover title'], ['22 / 650 / -0.02em', '22px', 650, 'Geist', '-.02em', 'Mobile page title'], ['20 / 650 / -0.01em', '20px', 650, 'Geist', '-.01em', 'Page title'], ['16 / 650', '16px', 650, 'Geist', '-.01em', 'Card title (detail)'], ['14 / 600', '14px', 600, 'Geist', '0', 'Section heading'], ['13 / 400–550', '13px', 450, 'Geist', '0', 'Body, table cells, buttons'], ['12 / 550', '12px', 550, 'Geist', '0', 'Table header, pill, helper'], ['12.5 mono', '12.5px', 500, "'Geist Mono'", '0', 'IMS-2026-0247']
|
||||||
|
].map(t => ({ spec: t[0], size: t[1], w: t[2], fam: t[3], ls: t[4], sample: t[5] }));
|
||||||
|
const shape = [
|
||||||
|
['radius', '12 cards, phones' + ' · 10 drawer/inputs mobile · 8 buttons, chips, inputs, pills, sidebar items · 6 avatars 24px · 5 checkbox · 999 badges'],
|
||||||
|
['card', 'bg #fff · box-shadow 0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06)'],
|
||||||
|
['floating', 'box-shadow 0 0 0 1px rgba(0,0,0,.1), 0 12px 32px rgba(0,0,0,.18) (bulk bar, drawer uses 24/60 .24)'],
|
||||||
|
['focus', 'outline 2px #0f766e, offset 2px, on every interactive element'],
|
||||||
|
['spacing', '4 · 6 · 8 · 10 · 12 · 16 · 20 · 24 · 32. Card padding 16–20 · table cell 12 · toolbar 10/12'],
|
||||||
|
['icons', 'Lucide, 16px stroke 2 in UI · 12px stroke 2.5 inside chips/checks · 22px stroke 1.8 in mobile tab bar']
|
||||||
|
].map(s => ({ k: s[0], v: s[1] }));
|
||||||
|
const screens = [
|
||||||
|
['01', 'Incidents list', '/hse/incidents'], ['01b', 'Notifications drawer', 'global'], ['02', 'Incident detail', '/hse/incidents/[id]'], ['02b', 'Triage form', '/hse/incidents/[id] · triage'], ['02c', 'Investigation form', '/hse/incidents/[id] · investigation'], ['02d', 'DOSH reporting · JKKP 6', '/hse/incidents/[id] · new'],
|
||||||
|
['03', 'Dashboard', '/hse/dashboard'], ['04', 'CAPA list', '/hse/capa'], ['04b', 'CAPA board', '/hse/capa · board'], ['04c', 'CAPA detail · verification', '/hse/capa · new'],
|
||||||
|
['05', 'Admin · users', '/admin'], ['05b', 'Admin · sites & zones', '/admin · tab'], ['05c', 'Admin · trucks', '/admin · tab'], ['05d', 'Admin · audit log', '/admin · new tab'], ['06', 'Settings', '/hse/settings'], ['07', 'Reporter · my reports', '/reporter'], ['08', 'Empty state', 'pattern'],
|
||||||
|
['09', 'Mobile · reporter home', '/reporter'], ['10', 'Mobile · incidents', '/hse/incidents'], ['11', 'Mobile · incident detail', '/hse/incidents/[id]'], ['12–15', 'Mobile · new incident 1/3 → saved offline', '/report'], ['16', 'Mobile · CAPA owner action', '/capa-owner']
|
||||||
|
].map(s => ({ id: s[0], name: s[1], route: s[2] }));
|
||||||
|
return { ic, colors, pills, type, shape, screens };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,210 @@
|
|||||||
|
# IMS Design System: Admin refresh
|
||||||
|
|
||||||
|
Source of truth for IMS UI. Derived from `IMS Admin Spec.dc.html` (patterns, tokens, states) and `IMS Admin.dc.html` (25 artboards: 7 desktop screens plus variants, 9 mobile screens). When this file and the mockups disagree, fix this file and say so in the PR. The earlier Modernist system (`design-system/_ds/`) is retired.
|
||||||
|
|
||||||
|
Rules in `CLAUDE.md` ("Design system") summarise this file. Tokens in `app/globals.css` mirror §2.
|
||||||
|
|
||||||
|
## 1. Principles
|
||||||
|
|
||||||
|
- Neutral commerce-admin look: grey ground, white cards, dark primary action, one teal accent used sparingly.
|
||||||
|
- Every list is a `TableCard` (§4.9). Do not hand-build tables.
|
||||||
|
- Status is always a dark text step on a light tint, with a text label (§4.2). Never white text on a saturated fill, never colour alone.
|
||||||
|
- Rules are 1px. Corners come from the radius scale in §2.3. Text and headings are flush left.
|
||||||
|
- Minimum hit target 44px on mobile.
|
||||||
|
|
||||||
|
## 2. Tokens
|
||||||
|
|
||||||
|
### 2.1 Colour
|
||||||
|
|
||||||
|
| Token | Hex | Use |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `ink` | `#1f1f1f` | Primary text, active sidebar text |
|
||||||
|
| `ink-2` | `#303030` | Primary button, chip text |
|
||||||
|
| `ink-3` | `#4a4a4a` | Secondary text, icons |
|
||||||
|
| `muted` | `#616161` | Labels, helper text |
|
||||||
|
| `faint` | `#8a8a8a` | Placeholders, input ring |
|
||||||
|
| `rule` | `#ebebeb` | Row rules, sidebar background |
|
||||||
|
| `rule-2` | `#e3e3e3` | Header rule, segmented background |
|
||||||
|
| `ring` | `#d4d4d4` | Secondary button and chip ring |
|
||||||
|
| `surface` | `#ffffff` | Cards, rows, inputs |
|
||||||
|
| `surface-2` | `#f7f7f7` | Table header, footer, row hover |
|
||||||
|
| `ground` | `#f1f1f1` | Page background |
|
||||||
|
| `accent` | `#0f766e` | Checks, links, focus ring, active tab icon |
|
||||||
|
| `accent-tint` | `#f2f7f6` | Selected row, selected card |
|
||||||
|
| `accent-tint-2` | `#e6f4f1` | Set filter chip (ring `#9fd3c7`, text `#0b4f47`) |
|
||||||
|
| `danger` | `#b3261e` | Overdue text, required marks, input error |
|
||||||
|
| `topbar` | `#1a1a1a` | App header (its controls use `#303030`, ring `#3d3d3d`, text `#a3a3a3`) |
|
||||||
|
|
||||||
|
Tailwind names: `bg-ground`, `bg-surface`, `bg-surface-2`, `text-ink`, `text-ink-2`, `text-ink-3`, `text-muted`, `text-faint`, `border-rule`, `border-rule-2`, `border-ring`, `bg-accent`, `text-accent`, `bg-accent-tint`, `bg-accent-tint-2`, `text-danger`, `bg-topbar`.
|
||||||
|
|
||||||
|
### 2.2 Type
|
||||||
|
|
||||||
|
Geist for UI, Geist Mono for references and keyboard hints. Exposed as `--font-geist` and `--font-geist-mono`.
|
||||||
|
|
||||||
|
| Spec | Use |
|
||||||
|
| --- | --- |
|
||||||
|
| 32 / 600 / -0.02em | Cover title |
|
||||||
|
| 22 / 650 / -0.02em | Mobile page title |
|
||||||
|
| 20 / 650 / -0.01em | Page title |
|
||||||
|
| 16 / 650 / -0.01em | Card title (detail) |
|
||||||
|
| 14 / 600 | Section heading |
|
||||||
|
| 13 / 400-550 | Body, table cells, buttons |
|
||||||
|
| 12 / 550 | Table header, pill, helper |
|
||||||
|
| 12.5 mono / 500 | References such as `IMS-2026-0247` |
|
||||||
|
|
||||||
|
### 2.3 Radius, shadow, spacing, icons
|
||||||
|
|
||||||
|
- **Radius:** 12 cards and phones; 10 mobile drawer and mobile inputs; 8 buttons, chips, inputs, pills, sidebar items; 6 avatars (24px); 5 checkbox; 999 badges. Tailwind: `rounded-md` = 8, `rounded-xl` = 12, `rounded-[5px]` checkbox.
|
||||||
|
- **Card shadow** (`shadow-card`): `0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06)`.
|
||||||
|
- **Floating shadow** (`shadow-float`, bulk bar): `0 0 0 1px rgba(0,0,0,.1), 0 12px 32px rgba(0,0,0,.18)`. Drawer: `0 0 0 1px rgba(0,0,0,.1), 0 24px 60px rgba(0,0,0,.24)`.
|
||||||
|
- **Focus:** `outline: 2px solid accent; outline-offset: 2px` on every interactive element.
|
||||||
|
- **Spacing:** 4, 6, 8, 10, 12, 16, 20, 24, 32. Card padding 16-20, table cell 12, toolbar 10/12.
|
||||||
|
- **Icons:** Lucide. 16px stroke 2 in UI; 12px stroke 2.5 inside chips and checks; 22px stroke 1.8 in the mobile tab bar.
|
||||||
|
- **Motion:** transitions 120ms on background and shadow only.
|
||||||
|
|
||||||
|
## 3. Layout shell
|
||||||
|
|
||||||
|
**Desktop (`AppShell`)**
|
||||||
|
- Top bar 56px `topbar`: brand 224px (28px teal tile radius 8, "IMS", muted "Setia HSE"), search max 520px (34px, radius 10, shows a Cmd-K hint), bell and user chip on the right.
|
||||||
|
- Sidebar 240px `rule` background, 1px right border `#e0e0e0`, padding 12, items 32px radius 8, 13px. Active item: white, 1px ring, teal icon. Badges 999 `#dcdcdc`, 11px/600. Footer block has a 1px `#dcdcdc` top rule.
|
||||||
|
- Main: padding 24/32, column gap 16. Page title 20px/650 with actions on the right. Detail pages use `1fr` plus a 320-340px side rail.
|
||||||
|
- Page background `ground`; cards `surface`, radius 12, `shadow-card`.
|
||||||
|
|
||||||
|
**Mobile (`MobileShell`, reporter and CAPA owner)**
|
||||||
|
- 390px reference. Page title 22px/650, horizontal padding 16, card gap 12.
|
||||||
|
- Tab bar: white, 1px top rule, 3 items, 22px icons, 10.5px labels, active `accent`.
|
||||||
|
- Controls 48px tall, radius 12; primary button full width 48px. Footers sit on `ground` with a 1px top rule and 30px bottom safe area.
|
||||||
|
|
||||||
|
## 4. Components
|
||||||
|
|
||||||
|
Hover and active values below are per component. Every interactive element also gets the global focus ring (§2.3). Disabled controls drop to 45% opacity.
|
||||||
|
|
||||||
|
### 4.1 Button
|
||||||
|
- **Primary** 32px, radius 8, `#303030`, white 13px/600, inset highlight `inset 0 -1px 0 #000, inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.2)`. Hover `#1f1f1f`, active `#000`.
|
||||||
|
- **Secondary** white, 13px/550, ring `inset 0 0 0 1px #d4d4d4, 0 1px 0 rgba(0,0,0,.05)`. Hover `#f7f7f7`, active `#ebebeb`.
|
||||||
|
- **Icon** 28px ghost, radius 8, `ink-3`. Hover `#ebebeb`.
|
||||||
|
- Mobile primary: full width, 48px, radius 12.
|
||||||
|
|
||||||
|
### 4.2 StatusTag and PriorityTag
|
||||||
|
Pill: `inline-flex`, padding 2px 8px, radius 8, 12px/550, no wrap. Dark text on a light tint. Incident status and CAPA status share one palette.
|
||||||
|
|
||||||
|
| Label | Background | Text |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Reported | `#fff1c2` | `#6b4a00` |
|
||||||
|
| Triaged | `#e0efff` | `#00527c` |
|
||||||
|
| Investigating | `#ede7ff` | `#4b2e99` |
|
||||||
|
| CAPA pending | `#ffe6cf` | `#7a3a00` |
|
||||||
|
| Verification | `#e3e8ff` | `#2c3e8f` |
|
||||||
|
| Closed | `#d7f4e3` | `#0c5132` |
|
||||||
|
| Open | `#ebebeb` | `#4a4a4a` |
|
||||||
|
| In progress | `#e0efff` | `#00527c` |
|
||||||
|
| Overdue / Critical | `#fee3e0` | `#8e1f0b` |
|
||||||
|
| High | `#ffe6cf` | `#7a3a00` |
|
||||||
|
| Medium | `#fff1c2` | `#6b4a00` |
|
||||||
|
| Low | `#ebebeb` | `#4a4a4a` |
|
||||||
|
| Active | `#d7f4e3` | `#0c5132` |
|
||||||
|
| Verified | `#d7f4e3` | `#0c5132` |
|
||||||
|
| Reopened | `#fee3e0` | `#8e1f0b` |
|
||||||
|
|
||||||
|
Mapping from the data model: incident `reported/triaged/investigating/capa_pending/verification/closed` use the matching rows; CAPA `open/in_progress/overdue/pending_verification/verified/reopened/closed` map to Open, In progress, Overdue, Verification, Verified, Reopened, Closed; priority `high/med/low` map to High, Medium, Low. Severity 5 and Critical use the Overdue / Critical row. Tailwind: `st-<name>-bg` / `st-<name>-fg` pairs. No icon required; the text label is always present.
|
||||||
|
|
||||||
|
### 4.3 FilterChip
|
||||||
|
28px, radius 8, 12.5px, padding 0 10px. Unset: white, ring `#d4d4d4`, text `#303030`, trailing 12px chevron. Set: `accent-tint-2`, ring `#9fd3c7`, text `#0b4f47`, shows "Label: value" and a clear x.
|
||||||
|
|
||||||
|
### 4.4 Segmented
|
||||||
|
Container padding 2px, background `#e3e3e3`, radius 10. Option 13px, padding 5px 10px, radius 8. Active: white, 13px/600, `0 1px 2px rgba(0,0,0,.1)`. Used for List / Board.
|
||||||
|
|
||||||
|
### 4.5 Checkbox
|
||||||
|
16px, radius 5. Off: white with `inset 0 0 0 1.5px #8a8a8a`. On and indeterminate (header): `accent` fill, white 12px tick or minus at stroke 3.
|
||||||
|
|
||||||
|
### 4.6 Field and Input
|
||||||
|
Input 36px desktop, 48px mobile, padding 0 12px, radius 8 (12 on mobile), 13px, white. Rest ring `inset 0 0 0 1px #8a8a8a`; focus ring 2px `accent`; error ring `danger`. Placeholder `faint`. Label 12px `muted`, 5px above. Textarea and Select share the ring.
|
||||||
|
|
||||||
|
### 4.7 Avatar
|
||||||
|
24px, radius 6, background `#c5e8e0`, text `#0b4f47`, 11px/650, initials. Top bar variant sits in a `#303030` chip.
|
||||||
|
|
||||||
|
### 4.8 Card
|
||||||
|
White, radius 12, `shadow-card`, padding 16-20. Selected card uses `accent-tint`. Detail card title 16px/650.
|
||||||
|
|
||||||
|
### 4.9 TableCard
|
||||||
|
One component wraps every list. Parts top to bottom, all optional except the table and the card:
|
||||||
|
- **A. Saved views:** padding 8, bottom rule `#ebebeb`. View chip 28px radius 8, 13px; active `#e3e3e3` 13px/600 with a faint count (12px `#8a8a8a`); trailing + button opens "Save current filters as view". Saved views are server-side filters; counts update live.
|
||||||
|
- **B. Toolbar:** padding 10/12, bottom rule. Search 32px, radius 8, ring `#8a8a8a`, min-width 260. Filter chips (§4.3). Right-aligned actions.
|
||||||
|
- **C. Header:** `surface-2`, 12px/550 `muted`, padding 9/12, bottom rule `#e3e3e3`. Single-column sort: sorted column shows a filled arrow in `ink`, others a faint `#c4c4c4` double chevron.
|
||||||
|
- **D. Row rest:** white, 13px, cell padding 12, 1px `#ebebeb` rule. References in Geist Mono 12.5px in `accent`.
|
||||||
|
- **E. Row hover:** `surface-2`; quick actions (eye, more) appear on the right as 28px icon buttons.
|
||||||
|
- **F. Row selected:** `accent-tint` and a filled checkbox.
|
||||||
|
- **G. Footer:** `surface-2`, padding 10/16, "Showing 1-3 of 248" left, pager right (32px segmented chevrons, radius 8 on outer ends, ring `#d4d4d4`).
|
||||||
|
- **H. Bulk bar:** floats centred above the footer on first selection. White, radius 12, `shadow-float`, padding 6 6 6 12; checkbox, "N selected", divider, ghost actions (Assign, Export).
|
||||||
|
- **Empty state:** replaces thead and tbody: 64px icon tile, one line of copy, the primary action.
|
||||||
|
|
||||||
|
Behaviour: the whole row opens the record; the checkbox cell, links and quick actions stop propagation.
|
||||||
|
|
||||||
|
**Mobile:** below 768px the table becomes a stacked list in the same card: reference + status on line one, type and zone on line two, date on line three, chevron right. Saved views become horizontally scrolling 999px chips; filters collapse to one "Filter" button opening a sheet; the bulk bar becomes a bottom sheet.
|
||||||
|
|
||||||
|
### 4.10 Drawer
|
||||||
|
Notifications drawer: absolute, top/right/bottom 8px, width 420px, white, radius 14, shadow `0 0 0 1px rgba(0,0,0,.1), 0 24px 60px rgba(0,0,0,.24)`; scrim `rgba(0,0,0,.28)`. Header 16px/650 title with "Mark all read" (12.5px/550 `accent`), settings and close icon buttons. Tab row of 28px view chips with counts. Group labels 11.5px/600 uppercase `faint`. Items: 32px radius-9 icon tile, padding 12/16, rule `#f0f0f0`, unread items tinted.
|
||||||
|
|
||||||
|
## 5. Screen index
|
||||||
|
|
||||||
|
| Id | Screen | Route |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 01 | Incidents list | `/hse/incidents` |
|
||||||
|
| 01b | Notifications drawer | global |
|
||||||
|
| 02 | Incident detail | `/hse/incidents/[id]` |
|
||||||
|
| 02b | Triage form | `/hse/incidents/[id]` triage |
|
||||||
|
| 02c | Investigation form | `/hse/incidents/[id]` investigation |
|
||||||
|
| 02d | DOSH reporting (JKKP 6) | `/hse/incidents/[id]` new |
|
||||||
|
| 03 | Dashboard | `/hse/dashboard` |
|
||||||
|
| 04 | CAPA list | `/hse/capa` |
|
||||||
|
| 04b | CAPA board | `/hse/capa` board |
|
||||||
|
| 04c | CAPA detail, verification | `/hse/capa` new |
|
||||||
|
| 05 | Admin, users | `/admin` |
|
||||||
|
| 05b | Admin, sites and zones | `/admin` tab |
|
||||||
|
| 05c | Admin, trucks | `/admin` tab |
|
||||||
|
| 05d | Admin, audit log | `/admin` new tab |
|
||||||
|
| 06 | Settings, API keys | `/hse/settings` |
|
||||||
|
| 07 | Reporter, my reports | `/reporter` |
|
||||||
|
| 08 | Empty state | pattern |
|
||||||
|
| 09 | Mobile, reporter home | `/reporter` |
|
||||||
|
| 10 | Mobile, incidents | `/hse/incidents` |
|
||||||
|
| 11 | Mobile, incident detail | `/hse/incidents/[id]` |
|
||||||
|
| 12-15 | Mobile, new incident 1/3 to saved offline | `/report` |
|
||||||
|
| 16 | Mobile, CAPA owner action | `/capa-owner` |
|
||||||
|
|
||||||
|
New routes in the mockup that do not exist yet: audit log (05d), DOSH reporting entry (02d), and any "new tab" marked above. Treat them as separate features; do not build them as part of the restyle.
|
||||||
|
|
||||||
|
## 6. Accessibility
|
||||||
|
|
||||||
|
- Text on tints passes contrast because pills use dark steps. Body text is `ink` or `ink-3` on white or `ground`; `faint` is for placeholders only.
|
||||||
|
- Focus ring on every interactive element; nothing relies on colour alone.
|
||||||
|
- Hit targets 44px minimum on mobile.
|
||||||
|
|
||||||
|
## 7. Scope
|
||||||
|
|
||||||
|
This file covers look and component structure. Routes, queries, permissions and audit logging do not change as part of a restyle.
|
||||||
|
|
||||||
|
## 8. Build order
|
||||||
|
|
||||||
|
1. **Tokens:** replace the Modernist tokens in `app/globals.css` with §2 (`@theme static`), Geist via `next/font`, `shadow-card`, `shadow-float`, `st-*` pairs. Keep the `gray-*`/`blue-*`/`red-*` remaps pointing at the new neutral and teal values so unmigrated pages stay readable.
|
||||||
|
2. **UI primitives:** `Button`, `StatusTag`, `PriorityTag`, `Checkbox`, `Field`/`Input`/`Select`/`Textarea`, `FilterChip`, `Segmented`, `Avatar`, `Card`, `Drawer` in `components/ui/`.
|
||||||
|
3. **TableCard** (§4.9) with the desktop and mobile variants.
|
||||||
|
4. **Shells:** `AppShell` (top bar, sidebar, notifications drawer) and `MobileShell`.
|
||||||
|
5. **Migrate the Incidents list** (screen 01 and 10) as the first full screen.
|
||||||
|
6. **Remaining screens**, in §5 order, one plan per group.
|
||||||
|
|
||||||
|
Gate first: before step 1, update `scripts/check-design-gates.mjs` to allow `rounded-*`, flag `border-b-2` and `border-2`, and flag Archivo and `#ec3013`. `npm run check:design` must pass at the end of each step.
|
||||||
|
|
||||||
|
## 9. What changes from the live Modernist build
|
||||||
|
|
||||||
|
| Area | Now (Modernist) | After |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Font | Archivo | Geist and Geist Mono |
|
||||||
|
| Accent | `#ec3013` red | `#0f766e` teal (used sparingly) |
|
||||||
|
| Primary button | red, flush left | `#303030`, 32px, radius 8 |
|
||||||
|
| Radius | 0 everywhere | 8 / 10 / 12 scale |
|
||||||
|
| Rules | 2px section rules | 1px |
|
||||||
|
| Status | mono tags (accent, outline, neutral) | coloured pills (§4.2) |
|
||||||
|
| Sidebar | flat, 2px rule | dark top bar plus `#ebebeb` sidebar |
|
||||||
|
| Lists | per-page tables | `TableCard` |
|
||||||
|
| Gate | no rounded, 2px rules | rounded allowed, 2px flagged |
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user