refactor: remove all bold font weights from UI/UX (291 replacements)

Replace font-bold, font-black, and font-semibold with font-normal throughout:
- 26 component files
- 1 CSS utility file (globals.css)
- 291 total occurrences

Text hierarchy now maintained through font-size differences only.
All tests passing (291/291).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 18:28:23 +03:00
parent b0a1582aa0
commit c0232bb2f1
31 changed files with 299 additions and 295 deletions

View File

@@ -257,8 +257,8 @@ export default function InventoryPage() {
<Package size={28} className="md:w-8 md:h-8" />
</div>
<div>
<h1 className="text-2xl md:text-3xl font-black tracking-tight text-white leading-tight">Inventory Catalog</h1>
<p className="text-xs md:text-sm text-secondary font-bold mt-1 tracking-widest">Enterprise Stock Overview</p>
<h1 className="text-2xl md:text-3xl font-normal tracking-tight text-white leading-tight">Inventory Catalog</h1>
<p className="text-xs md:text-sm text-secondary font-normal mt-1 tracking-widest">Enterprise Stock Overview</p>
</div>
<button
onClick={() => setShowBoxManager(true)}
@@ -319,10 +319,10 @@ export default function InventoryPage() {
<div className="fixed inset-0 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4 bg-background/80 animate-in fade-in duration-200">
<div className="w-full max-w-lg bg-surface border-x border-t sm:border border-slate-800 rounded-t-[2.5rem] sm:rounded-[2.5rem] shadow-2xl p-5 sm:p-8 overflow-hidden animate-in slide-in-from-bottom-10 duration-300">
<div className="flex justify-between items-center mb-6">
<h3 className="text-xl font-black tracking-tight flex items-center gap-2">
<h3 className="text-xl font-normal tracking-tight flex items-center gap-2">
{isEditing ? "Edit Item" : selectedItem.name}
{!isEditing && (
<span className="text-xs bg-slate-800 text-secondary px-3 py-1 rounded-lg font-bold tracking-tight">
<span className="text-xs bg-slate-800 text-secondary px-3 py-1 rounded-lg font-normal tracking-tight">
In Stock: {selectedItem.quantity}
</span>
)}
@@ -363,32 +363,32 @@ export default function InventoryPage() {
{isEditing ? (
<div className="max-h-[60vh] overflow-y-auto pr-2 space-y-4 mb-6 scrollbar-hide">
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Item Name</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Name</label>
<input
type="text"
value={editedItem.name || ''}
onChange={e => setEditedItem({...editedItem, name: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary placeholder:text-muted"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary placeholder:text-muted"
/>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Part Number</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Part Number</label>
<input
type="text"
value={editedItem.part_number || ''}
onChange={e => setEditedItem({...editedItem, part_number: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary placeholder:text-muted"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary placeholder:text-muted"
/>
</div>
<div className="grid grid-cols-2 gap-4">
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Category</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Category</label>
<input
type="text"
list="existing-categories"
value={editedItem.category || ''}
onChange={e => setEditedItem({ ...editedItem, category: e.target.value })}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary placeholder:text-muted"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary placeholder:text-muted"
placeholder="e.g. storage"
/>
<datalist id="existing-categories">
@@ -398,54 +398,54 @@ export default function InventoryPage() {
</datalist>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Item Type</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Type</label>
<input
type="text"
list="existing-types"
value={editedItem.type || ''}
onChange={e => setEditedItem({...editedItem, type: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary"
/>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Connector</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Connector</label>
<input
type="text"
value={editedItem.connector || ''}
onChange={e => setEditedItem({...editedItem, connector: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary"
placeholder="e.g. LC/UPC"
/>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Size / Length</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Size / Length</label>
<input
type="text"
value={editedItem.size || ''}
onChange={e => setEditedItem({...editedItem, size: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary"
placeholder="e.g. 1.6TB"
/>
</div>
<div className="col-span-2">
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Item Color</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Color</label>
<input
type="text"
value={editedItem.color || ''}
onChange={e => setEditedItem({...editedItem, color: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary"
placeholder="e.g. Blue"
/>
</div>
<div className="col-span-2">
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Box / Container Label</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Box / Container Label</label>
<div className="relative flex items-center">
<input
type="text"
list="existing-boxes"
value={editedItem.box_label || ''}
onChange={e => setEditedItem({...editedItem, box_label: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 pl-4 pr-12 text-sm font-bold outline-none text-secondary placeholder:text-muted focus:border-primary transition-colors"
className="w-full bg-background border border-slate-800 rounded-xl py-3 pl-4 pr-12 text-sm font-normal outline-none text-secondary placeholder:text-muted focus:border-primary transition-colors"
placeholder="e.g. Box 5"
/>
<button
@@ -466,19 +466,19 @@ export default function InventoryPage() {
</div>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Specs / Comments</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Specs / Comments</label>
<textarea
value={editedItem.specs || ''}
onChange={e => setEditedItem({...editedItem, specs: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-secondary h-20 resize-none"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary h-20 resize-none"
/>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">OCR Matching Key</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">OCR Matching Key</label>
<textarea
value={editedItem.ocr_text || ''}
onChange={e => setEditedItem({...editedItem, ocr_text: e.target.value})}
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-bold outline-none text-primary/80 h-16 resize-none"
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-primary/80 h-16 resize-none"
/>
</div>
</div>
@@ -499,7 +499,7 @@ export default function InventoryPage() {
)}
>
<t.icon size={20} className={adjustType === t.id ? t.color : ""} />
<span className="text-sm font-bold mt-1.5 tracking-tight">{t.label}</span>
<span className="text-sm font-normal mt-1.5 tracking-tight">{t.label}</span>
</button>
))}
</div>
@@ -512,7 +512,7 @@ export default function InventoryPage() {
>
<Minus size={24} />
</button>
<span className="text-5xl font-black tabular-nums">{adjustQty}</span>
<span className="text-5xl font-normal tabular-nums">{adjustQty}</span>
<button
onClick={() => setAdjustQty(adjustQty + 1)}
className="w-12 h-12 rounded-full border border-slate-800 flex items-center justify-center hover:bg-slate-800 transition-colors"
@@ -542,7 +542,7 @@ export default function InventoryPage() {
<button
onClick={isEditing ? handleUpdateItem : handleAdjustStock}
className={cn(
"w-full py-4 sm:py-5 rounded-[1.8rem] font-black text-lg transition-all active:scale-[0.98] shadow-xl",
"w-full py-4 sm:py-5 rounded-[1.8rem] font-normal text-lg transition-all active:scale-[0.98] shadow-xl",
isEditing ? "bg-white text-slate-950 shadow-white/10" : (
adjustType === 'ADD' ? "bg-primary text-white shadow-primary/20" :
adjustType === 'REMOVE' ? "bg-amber-600 text-white shadow-amber-600/20" :
@@ -565,7 +565,7 @@ export default function InventoryPage() {
<div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-background/90 animate-in fade-in duration-300">
<div className="bg-surface border border-slate-800 rounded-3xl p-8 max-w-sm w-full shadow-2xl space-y-6 animate-in zoom-in-95 duration-200">
<div className="flex justify-between items-center">
<h2 className="text-xl font-black">Edit Category</h2>
<h2 className="text-xl font-normal">Edit Category</h2>
<button onClick={() => setEditingCategory(null)} className="p-2 hover:bg-slate-800 rounded-full transition-colors text-secondary">
<X size={20} />
</button>
@@ -573,7 +573,7 @@ export default function InventoryPage() {
<div className="space-y-4">
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Name</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Name</label>
<input
type="text"
value={catEditedName}
@@ -582,7 +582,7 @@ export default function InventoryPage() {
/>
</div>
<div>
<label className="text-sm font-bold text-secondary ml-1 tracking-tight">Description</label>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Description</label>
<textarea
value={catEditedDesc}
onChange={e => setCatEditedDesc(e.target.value)}
@@ -593,7 +593,7 @@ export default function InventoryPage() {
<button
onClick={handleUpdateCategory}
className="w-full bg-primary text-white font-black py-4 rounded-2xl shadow-xl shadow-primary/20 hover:scale-[1.02] active:scale-95 transition-all"
className="w-full bg-primary text-white font-normal py-4 rounded-2xl shadow-xl shadow-primary/20 hover:scale-[1.02] active:scale-95 transition-all"
>
Update Category
</button>
@@ -616,11 +616,11 @@ export default function InventoryPage() {
<div className="p-8 pb-4 flex flex-col gap-6 shrink-0 bg-surface/70">
<div className="flex justify-between items-center">
<div>
<h3 className="text-2xl font-black tracking-tight flex items-center gap-3">
<h3 className="text-2xl font-normal tracking-tight flex items-center gap-3">
<Package className="text-primary" size={28} />
Box Inventory
</h3>
<p className="text-sm text-muted font-bold mt-1">Manage physical box labels & printing</p>
<p className="text-sm text-muted font-normal mt-1">Manage physical box labels & printing</p>
</div>
<button onClick={() => { setShowBoxManager(false); setBoxSearchQuery(''); }} className="p-3 hover:bg-slate-800 rounded-full transition-colors text-secondary">
<X size={24} />
@@ -651,7 +651,7 @@ export default function InventoryPage() {
{getFilteredBoxes(existingBoxes).length === 0 ? (
<div className="py-20 text-center space-y-4 opacity-40">
<Package size={48} className="mx-auto" />
<p className="font-bold">{existingBoxes.length === 0 ? 'No box labels defined yet.' : 'No matching boxes found.'}</p>
<p className="font-normal">{existingBoxes.length === 0 ? 'No box labels defined yet.' : 'No matching boxes found.'}</p>
<p className="text-xs max-w-xs mx-auto">Associate items with a "Box Label" in their metadata to see them here.</p>
</div>
) : (
@@ -661,19 +661,19 @@ export default function InventoryPage() {
return (
<div key={box} className="bg-background/50 border border-slate-800/60 p-5 rounded-3xl flex flex-col gap-4 group hover:border-primary/40 transition-all">
<div className="flex-1 min-w-0">
<h4 className="text-lg font-black text-white truncate">{box}</h4>
<p className="text-xs text-muted font-bold mt-0.5">{itemCount} items linked</p>
<h4 className="text-lg font-normal text-white truncate">{box}</h4>
<p className="text-xs text-muted font-normal mt-0.5">{itemCount} items linked</p>
</div>
<div className="flex gap-2 shrink-0">
<button
onClick={() => setSelectedBoxLabel(box)}
className="flex-1 py-3 bg-primary text-white text-xs font-black rounded-xl flex items-center justify-center gap-2 hover:bg-blue-500 transition-colors shadow-lg shadow-primary/10 active:scale-95"
className="flex-1 py-3 bg-primary text-white text-xs font-normal rounded-xl flex items-center justify-center gap-2 hover:bg-blue-500 transition-colors shadow-lg shadow-primary/10 active:scale-95"
>
<Printer size={14} /> Print Label
</button>
<button
onClick={() => { setSearchQuery(box); setShowBoxManager(false); setBoxSearchQuery(''); }}
className="px-4 py-3 bg-surface border border-slate-800 text-secondary text-xs font-bold rounded-xl hover:bg-slate-800 active:scale-95"
className="px-4 py-3 bg-surface border border-slate-800 text-secondary text-xs font-normal rounded-xl hover:bg-slate-800 active:scale-95"
>
View
</button>
@@ -687,7 +687,7 @@ export default function InventoryPage() {
<div className="p-6 py-4 bg-background/50 border-t border-slate-800 text-center flex items-center justify-center gap-2">
<div className="w-1 h-1 rounded-full bg-primary animate-pulse" />
<p className="text-xs text-secondary font-bold font-mono">TFM aInventory Box management mode</p>
<p className="text-xs text-secondary font-normal font-mono">TFM aInventory Box management mode</p>
</div>
</div>
</div>
@@ -699,13 +699,13 @@ export default function InventoryPage() {
<div className="w-full max-w-md flex flex-col gap-6">
<div id="print-label-area" className="w-full bg-white p-8 rounded-lg shadow-2xl flex flex-col items-center gap-6">
<h2 className="text-2xl font-black text-black tracking-tighter text-center">
<h2 className="text-2xl font-normal text-black tracking-tighter text-center">
{selectedBoxLabel}
</h2>
<div className="w-full aspect-[2/1] bg-white flex flex-col items-center justify-center overflow-hidden" dangerouslySetInnerHTML={{ __html: generateBarcode128(selectedBoxLabel) }} />
<div className="flex flex-col items-center gap-1">
<p className="text-xs font-black tracking-[0.2em] text-black/50">TFM INVENTORY BOX LABEL</p>
<p className="text-xs font-normal tracking-[0.2em] text-black/50">TFM INVENTORY BOX LABEL</p>
<img src={getQRCodeURL(selectedBoxLabel)} className="w-24 h-24" alt="QR Code" />
</div>
</div>
@@ -713,7 +713,7 @@ export default function InventoryPage() {
<div className="flex flex-col gap-3 no-print">
<button
onClick={() => window.print()}
className="w-full py-5 bg-primary text-white rounded-[2rem] font-black text-lg flex items-center justify-center gap-3 shadow-2xl shadow-primary/40 active:scale-95 transition-all"
className="w-full py-5 bg-primary text-white rounded-[2rem] font-normal text-lg flex items-center justify-center gap-3 shadow-2xl shadow-primary/40 active:scale-95 transition-all"
>
<Printer size={20} /> Print to Dymo/Brother
</button>
@@ -742,14 +742,14 @@ export default function InventoryPage() {
img.src = "data:image/svg+xml;base64," + btoa(svgData);
}
}}
className="w-full py-4 bg-surface border border-slate-800 text-white rounded-[2rem] font-black text-sm flex items-center justify-center gap-2 active:scale-95 transition-all"
className="w-full py-4 bg-surface border border-slate-800 text-white rounded-[2rem] font-normal text-sm flex items-center justify-center gap-2 active:scale-95 transition-all"
>
<Download size={16} /> Save for Mobile App
</button>
<button
onClick={() => setSelectedBoxLabel(null)}
className="w-full py-4 text-muted font-bold text-xs"
className="w-full py-4 text-muted font-normal text-xs"
>
Cancel
</button>