feat(design): switch to IMS Admin tokens, Geist and the 1px-rule gate
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ export function AdminPanel({ users, sites, siteOptions, trucks }: Props) {
|
||||
<button
|
||||
key={t.id}
|
||||
onClick={() => setTab(t.id)}
|
||||
className={`px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors cursor-pointer ${
|
||||
className={`px-4 py-2.5 text-sm font-medium border-b -mb-px transition-colors cursor-pointer ${
|
||||
tab === t.id
|
||||
? 'border-accent text-ink'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700'
|
||||
|
||||
@@ -83,7 +83,7 @@ export function BulkImportForm() {
|
||||
if (stage === 'upload') {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<label className="block cursor-pointer border-2 border-dashed border-divider p-6 text-center hover:bg-gray-50">
|
||||
<label className="block cursor-pointer border border-dashed border-divider p-6 text-center hover:bg-gray-50">
|
||||
<input
|
||||
type="file"
|
||||
onChange={handleUpload}
|
||||
|
||||
@@ -134,7 +134,7 @@ export function SiteZoneManager({ sites }: Props) {
|
||||
</div>
|
||||
|
||||
{site.zones.length > 0 && (
|
||||
<ul className="mt-3 space-y-1.5 pl-3 border-l-2 border-divider">
|
||||
<ul className="mt-3 space-y-1.5 pl-3 border-l border-divider">
|
||||
{site.zones.map(z => (
|
||||
<li key={z.id} className={`flex items-center justify-between ${!z.active ? 'opacity-50' : ''}`}>
|
||||
<span className="text-xs text-gray-700 font-medium">{z.name}</span>
|
||||
|
||||
@@ -39,7 +39,7 @@ export function LoginForm() {
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit} className="flex flex-col gap-4 w-full max-w-sm">
|
||||
<div className="pb-3 border-b-2 border-divider">
|
||||
<div className="pb-3 border-b border-divider">
|
||||
<h1 className="text-3xl font-extrabold">IMS</h1>
|
||||
<p className="text-sm text-ink/60 mt-1">HSE Incident Management</p>
|
||||
</div>
|
||||
|
||||
@@ -101,8 +101,8 @@ export function CapaBoard({ capas }: Props) {
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{STATUS_ORDER.filter(s => s !== 'reopened').map(status => (
|
||||
<div key={status} className={`border-2 p-4 bg-ground ${COLUMN_BORDER[status]}`}>
|
||||
<h3 className="text-xs font-extrabold uppercase tracking-wide text-ink/70 mb-3 pb-2 border-b-2 border-divider">
|
||||
<div key={status} className={`border p-4 bg-ground ${COLUMN_BORDER[status]}`}>
|
||||
<h3 className="text-xs font-extrabold uppercase tracking-wide text-ink/70 mb-3 pb-2 border-b border-divider">
|
||||
{STATUS_LABELS[status]} ({byStatus[status].length})
|
||||
</h3>
|
||||
<div className="space-y-2 max-h-96 overflow-y-auto pr-2">
|
||||
|
||||
@@ -20,7 +20,7 @@ function TabsInner({ activeTab }: { activeTab: string }) {
|
||||
<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 ${
|
||||
className={`px-4 py-2.5 text-sm font-medium whitespace-nowrap border-b transition-colors ${
|
||||
activeTab === tab.key
|
||||
? 'border-accent text-accent-700'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-divider'
|
||||
|
||||
@@ -57,7 +57,7 @@ export function FileUpload({ onFilesChange, disabled = false }: Props) {
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<div
|
||||
className={`border-2 border-dashed p-6 text-center cursor-pointer transition-colors
|
||||
className={`border border-dashed p-6 text-center cursor-pointer transition-colors
|
||||
${dragging ? 'border-accent bg-accent-100' : 'border-divider hover:border-gray-400'}
|
||||
${disabled ? 'opacity-50 pointer-events-none' : ''}`}
|
||||
onClick={() => inputRef.current?.click()}
|
||||
|
||||
@@ -87,7 +87,7 @@ function useNavItems(role: string): NavItem[] {
|
||||
return NAV_ITEMS[role] ?? NAV_ITEMS.reporter
|
||||
}
|
||||
|
||||
const LINK_BASE = 'flex items-center gap-3 px-3 py-2 text-sm border-l-2 transition-colors'
|
||||
const LINK_BASE = 'flex items-center gap-3 px-3 py-2 text-sm border-l transition-colors'
|
||||
const LINK_ACTIVE = 'border-accent text-accent-700 font-extrabold bg-accent-100/50'
|
||||
const LINK_IDLE = 'border-transparent text-ink/70 font-medium hover:bg-ink/7 hover:text-ink'
|
||||
|
||||
@@ -124,8 +124,8 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
return (
|
||||
<>
|
||||
{/* Desktop sidebar */}
|
||||
<aside className="hidden sm:flex fixed left-0 top-0 h-full w-60 bg-ground border-r-2 border-divider flex-col z-40">
|
||||
<div className="flex items-center justify-between px-4 py-4 border-b-2 border-divider">
|
||||
<aside className="hidden sm:flex fixed left-0 top-0 h-full w-60 bg-ground border-r border-divider flex-col z-40">
|
||||
<div className="flex items-center justify-between px-4 py-4 border-b border-divider">
|
||||
<span className="text-lg font-extrabold tracking-tight text-ink">IMS</span>
|
||||
<NotificationBell />
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
))}
|
||||
</nav>
|
||||
|
||||
<div className="border-t-2 border-divider py-3">
|
||||
<div className="border-t border-divider py-3">
|
||||
<div className="flex items-center gap-2 px-4 py-2 mb-1">
|
||||
<div className="w-8 h-8 rounded-full bg-accent flex items-center justify-center text-ground text-xs font-extrabold flex-shrink-0">
|
||||
{initials(displayName)}
|
||||
@@ -170,7 +170,7 @@ export function Sidebar({ role, userName, userEmail }: SidebarProps) {
|
||||
</aside>
|
||||
|
||||
{/* Mobile bottom tab bar */}
|
||||
<nav className="sm:hidden fixed bottom-0 left-0 right-0 bg-ground border-t-2 border-divider flex z-40 safe-area-pb">
|
||||
<nav className="sm:hidden fixed bottom-0 left-0 right-0 bg-ground border-t border-divider flex z-40 safe-area-pb">
|
||||
{mobileItems.map(item => {
|
||||
const active = isActivePath(item.href, pathname)
|
||||
return (
|
||||
|
||||
@@ -75,7 +75,7 @@ export function NotificationBell() {
|
||||
|
||||
{open && (
|
||||
<div className="absolute right-0 mt-2 w-80 max-h-96 overflow-y-auto bg-surface shadow-lg border border-divider">
|
||||
<div className="flex items-center justify-between px-4 py-2 border-b-2 border-divider">
|
||||
<div className="flex items-center justify-between px-4 py-2 border-b border-divider">
|
||||
<span className="text-sm font-extrabold text-ink">Notifications</span>
|
||||
{unread > 0 && (
|
||||
<button onClick={markAllRead} className="text-xs text-accent-700 hover:underline">
|
||||
|
||||
@@ -28,7 +28,7 @@ export function Modal({ open, onClose, title, children, footer, width = 'md' }:
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true">
|
||||
<div className="absolute inset-0 bg-neutral-900/50" onClick={onClose} />
|
||||
<div className={`relative w-full ${maxW} bg-surface shadow-lg`}>
|
||||
<div className="flex items-center justify-between px-6 py-4 border-b-2 border-divider">
|
||||
<div className="flex items-center justify-between px-6 py-4 border-b border-divider">
|
||||
<h2 className="text-xl font-extrabold text-ink">{title}</h2>
|
||||
<button
|
||||
onClick={onClose}
|
||||
|
||||
Reference in New Issue
Block a user