refactor(design): drop rounded classes, swap bg-white and gray borders for tokens

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 19:02:28 +08:00
co-authored by Claude Haiku 4.5
parent 8701d24c6c
commit 3a941a357b
51 changed files with 394 additions and 285 deletions
+6 -6
View File
@@ -15,16 +15,16 @@ function TabsInner({ activeTab }: { activeTab: string }) {
const pathname = usePathname()
return (
<div className="flex border-b border-gray-200 mb-6 overflow-x-auto -mx-4 px-4">
<div className="flex border-b border-divider mb-6 overflow-x-auto -mx-4 px-4">
{TABS.map(tab => (
<button
key={tab.key}
onClick={() => router.replace(`${pathname}?tab=${tab.key}`)}
className={`px-4 py-2.5 text-sm font-medium whitespace-nowrap border-b-2 transition-colors ${
activeTab === tab.key
? 'border-blue-600 text-blue-600'
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'
}`}
activeTab === tab.key
? 'border-blue-600 text-blue-600'
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-divider'
}`}
>
{tab.label}
</button>
@@ -35,7 +35,7 @@ function TabsInner({ activeTab }: { activeTab: string }) {
export function DashboardTabs({ activeTab }: { activeTab: string }) {
return (
<Suspense fallback={<div className="h-11 mb-6 border-b border-gray-200" />}>
<Suspense fallback={<div className="h-11 mb-6 border-b border-divider" />}>
<TabsInner activeTab={activeTab} />
</Suspense>
)
+3 -3
View File
@@ -43,7 +43,7 @@ export function RiskFlagsPanel() {
}
return (
<div className="bg-white rounded-xl shadow-sm p-5 mb-4">
<div className="bg-surface shadow-sm p-5 mb-4">
<div className="flex items-center justify-between mb-1">
<h2 className="text-sm font-semibold text-gray-700 uppercase tracking-wide">
Rising-Risk Zones (AI)
@@ -51,7 +51,7 @@ export function RiskFlagsPanel() {
<button
onClick={analyze}
disabled={loading}
className="bg-purple-50 text-purple-700 border border-purple-300 rounded-lg px-3 py-1.5 text-xs font-semibold disabled:opacity-50 hover:bg-purple-100"
className="bg-purple-50 text-purple-700 border border-purple-300 px-3 py-1.5 text-xs font-semibold disabled:opacity-50 hover:bg-purple-100"
>
{loading ? 'Analyzing…' : flags ? 'Re-analyze' : 'Analyze 90-Day Risk'}
</button>
@@ -71,7 +71,7 @@ export function RiskFlagsPanel() {
<p className="text-sm text-gray-700 mb-3">{summary}</p>
<div className="space-y-2">
{flags.map(f => (
<div key={`${f.site}-${f.zone}`} className={`border rounded-lg p-3 ${LEVEL_COLORS[f.risk_level]}`}>
<div key={`${f.site}-${f.zone}`} className={`border p-3 ${LEVEL_COLORS[f.risk_level]}`}>
<div className="flex items-center justify-between mb-1">
<span className="text-sm font-semibold">{f.zone} · {f.site}</span>
<span className="text-xs font-bold uppercase">{f.risk_level}</span>
+1 -1
View File
@@ -14,7 +14,7 @@ const ACCENT = {
export function StatCard({ label, value, sub, accent = 'default' }: Props) {
return (
<div className={`bg-white rounded-xl shadow-sm p-5 border-t-4 ${ACCENT[accent]}`}>
<div className={`bg-surface shadow-sm p-5 border-t-4 ${ACCENT[accent]}`}>
<p className="text-xs text-gray-500 uppercase tracking-wide font-medium">{label}</p>
<p className="text-3xl font-bold text-gray-900 mt-1">{value}</p>
{sub && <p className="text-xs text-gray-400 mt-1">{sub}</p>}