refactor: 전체 프론트엔드 하드코딩 색상 → CSS 변수 일괄 치환

447+ 파일, 4500+ 줄 변경:
- gray-* → border/bg-muted/text-foreground/text-muted-foreground
- blue-* → primary/ring
- red-* → destructive
- green-* → emerald (일관성)
- indigo-* → primary
- yellow/orange → amber (통일)
- dark mode 변형도 시맨틱 토큰으로 변환

Made-with: Cursor
This commit is contained in:
DDD1542
2026-03-09 14:31:59 +09:00
parent d967cf0a0d
commit 4f10b5e42d
447 changed files with 4520 additions and 4520 deletions

View File

@@ -95,12 +95,12 @@ const ConditionCard: React.FC<ConditionCardProps> = ({
};
return (
<div className="relative rounded-lg border border-gray-200 bg-white shadow-sm">
<div className="relative rounded-lg border border-border bg-white shadow-sm">
{/* 헤더 */}
<div className="flex items-center justify-between rounded-t-lg bg-blue-600 px-4 py-2 text-white">
<div className="flex items-center justify-between rounded-t-lg bg-primary px-4 py-2 text-white">
<span className="font-medium"> {index + 1}</span>
{!readonly && (
<button onClick={() => onRemove(condition.id)} className="rounded p-1 transition-colors hover:bg-blue-700">
<button onClick={() => onRemove(condition.id)} className="rounded p-1 transition-colors hover:bg-primary/90">
<X className="h-4 w-4" />
</button>
)}
@@ -111,8 +111,8 @@ const ConditionCard: React.FC<ConditionCardProps> = ({
{/* 열 범위 */}
<div className="flex items-center gap-2">
<div className="flex-1">
<label className="mb-1 block text-xs font-medium text-gray-700">
<span className="text-red-500">*</span>
<label className="mb-1 block text-xs font-medium text-foreground">
<span className="text-destructive">*</span>
</label>
<div className="flex items-center gap-2">
<Input
@@ -125,7 +125,7 @@ const ConditionCard: React.FC<ConditionCardProps> = ({
disabled={readonly}
className="h-9 text-center"
/>
<span className="text-gray-500">~</span>
<span className="text-muted-foreground">~</span>
<Input
type="number"
min={1}
@@ -139,8 +139,8 @@ const ConditionCard: React.FC<ConditionCardProps> = ({
</div>
</div>
<div className="w-20">
<label className="mb-1 block text-xs font-medium text-gray-700">
<span className="text-red-500">*</span>
<label className="mb-1 block text-xs font-medium text-foreground">
<span className="text-destructive">*</span>
</label>
<Input
type="number"
@@ -156,14 +156,14 @@ const ConditionCard: React.FC<ConditionCardProps> = ({
</div>
{/* 계산 결과 */}
<div className="rounded-md bg-blue-50 px-3 py-2 text-center text-sm text-blue-700">
<div className="rounded-md bg-primary/10 px-3 py-2 text-center text-sm text-primary">
{locationCount > 0 ? (
<>
{localValues.startRow} ~ {localValues.endRow} x {localValues.levels} ={" "}
<strong>{locationCount}</strong>
</>
) : (
<span className="text-gray-500"> </span>
<span className="text-muted-foreground"> </span>
)}
</div>
</div>
@@ -664,7 +664,7 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
<Card>
<CardHeader className="flex flex-row items-center justify-between pb-2">
<CardTitle className="flex items-center gap-2 text-base">
<div className="h-4 w-1 rounded bg-gradient-to-b from-green-500 to-blue-500" />
<div className="h-4 w-1 rounded bg-gradient-to-b from-green-500 to-primary/50" />
</CardTitle>
{!readonly && (
<div className="flex items-center gap-2">
@@ -757,9 +757,9 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
{/* 기존 데이터 존재 알림 */}
{!isCheckingDuplicates && existingLocations.length > 0 && !hasDuplicateWithExisting && (
<Alert className="mb-4 border-blue-200 bg-blue-50">
<AlertCircle className="h-4 w-4 text-blue-600" />
<AlertDescription className="text-blue-800">
<Alert className="mb-4 border-primary/20 bg-primary/10">
<AlertCircle className="h-4 w-4 text-primary" />
<AlertDescription className="text-primary">
// <strong>{existingLocations.length}</strong> .
</AlertDescription>
</Alert>
@@ -767,47 +767,47 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
{/* 현재 매핑된 값 표시 */}
{(context.warehouseCode || context.warehouseName || context.floor || context.zone) && (
<div className="mb-4 flex flex-wrap gap-2 rounded-lg bg-gray-50 p-3">
<div className="mb-4 flex flex-wrap gap-2 rounded-lg bg-muted p-3">
{(context.warehouseCode || context.warehouseName) && (
<span className="rounded bg-blue-100 px-2 py-1 text-xs text-blue-800">
<span className="rounded bg-primary/10 px-2 py-1 text-xs text-primary">
: {context.warehouseName || context.warehouseCode}
{context.warehouseName && context.warehouseCode && ` (${context.warehouseCode})`}
</span>
)}
{context.floor && (
<span className="rounded bg-green-100 px-2 py-1 text-xs text-green-800">: {context.floor}</span>
<span className="rounded bg-emerald-100 px-2 py-1 text-xs text-emerald-800">: {context.floor}</span>
)}
{context.zone && (
<span className="rounded bg-purple-100 px-2 py-1 text-xs text-purple-800">: {context.zone}</span>
)}
{context.locationType && (
<span className="rounded bg-orange-100 px-2 py-1 text-xs text-orange-800">
<span className="rounded bg-amber-100 px-2 py-1 text-xs text-orange-800">
: {context.locationType}
</span>
)}
{context.status && (
<span className="rounded bg-gray-200 px-2 py-1 text-xs text-gray-800">: {context.status}</span>
<span className="rounded bg-muted/80 px-2 py-1 text-xs text-foreground">: {context.status}</span>
)}
</div>
)}
{/* 안내 메시지 */}
<div className="mb-4 rounded-lg bg-blue-50 p-4">
<ol className="space-y-1 text-sm text-blue-800">
<div className="mb-4 rounded-lg bg-primary/10 p-4">
<ol className="space-y-1 text-sm text-primary">
<li className="flex items-start gap-2">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-blue-600 text-xs font-bold text-white">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary text-xs font-bold text-white">
1
</span>
</li>
<li className="flex items-start gap-2">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-blue-600 text-xs font-bold text-white">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary text-xs font-bold text-white">
2
</span>
</li>
<li className="flex items-start gap-2">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-blue-600 text-xs font-bold text-white">
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary text-xs font-bold text-white">
3
</span>
예시: 조건1(1~3, 3), 2(4~6, 5)
@@ -817,9 +817,9 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
{/* 조건 목록 또는 빈 상태 */}
{conditions.length === 0 ? (
<div className="flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-gray-200 py-12">
<div className="mb-4 text-6xl text-gray-300">📦</div>
<p className="mb-4 text-gray-500"> </p>
<div className="flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border py-12">
<div className="mb-4 text-6xl text-muted-foreground/50">📦</div>
<p className="mb-4 text-muted-foreground"> </p>
{!readonly && (
<Button onClick={addCondition} className="gap-1">
<Plus className="h-4 w-4" />
@@ -870,15 +870,15 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
{config.showStatistics && (
<div className="mb-4 grid grid-cols-3 gap-4">
<div className="rounded-lg border bg-white p-4 text-center">
<div className="text-sm text-gray-500"> </div>
<div className="text-sm text-muted-foreground"> </div>
<div className="text-2xl font-bold">{statistics.totalLocations}</div>
</div>
<div className="rounded-lg border bg-white p-4 text-center">
<div className="text-sm text-gray-500"> </div>
<div className="text-sm text-muted-foreground"> </div>
<div className="text-2xl font-bold">{statistics.totalRows}</div>
</div>
<div className="rounded-lg border bg-white p-4 text-center">
<div className="text-sm text-gray-500"> </div>
<div className="text-sm text-muted-foreground"> </div>
<div className="text-2xl font-bold">{statistics.maxLevel}</div>
</div>
</div>
@@ -889,7 +889,7 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
<div className="rounded-lg border">
<ScrollArea className="h-[400px]">
<Table>
<TableHeader className="sticky top-0 bg-gray-50">
<TableHeader className="sticky top-0 bg-muted">
<TableRow>
<TableHead className="w-12 text-center">No</TableHead>
<TableHead></TableHead>
@@ -921,8 +921,8 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
</ScrollArea>
</div>
) : (
<div className="flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-gray-200 py-8 text-gray-500">
<Eye className="mb-2 h-8 w-8 text-gray-300" />
<div className="flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border py-8 text-muted-foreground">
<Eye className="mb-2 h-8 w-8 text-muted-foreground/50" />
<p> </p>
</div>
)}
@@ -969,16 +969,16 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
{/* 템플릿 목록 */}
{templates.length > 0 ? (
<div className="space-y-2">
<div className="text-sm font-medium text-gray-700"> 릿</div>
<div className="text-sm font-medium text-foreground"> 릿</div>
<ScrollArea className="h-[200px]">
{templates.map((template) => (
<div
key={template.id}
className="flex items-center justify-between rounded-lg border p-3 hover:bg-gray-50"
className="flex items-center justify-between rounded-lg border p-3 hover:bg-muted"
>
<div>
<div className="font-medium">{template.name}</div>
<div className="text-xs text-gray-500">{template.conditions.length} </div>
<div className="text-xs text-muted-foreground">{template.conditions.length} </div>
</div>
<div className="flex gap-2">
<Button variant="outline" size="sm" onClick={() => loadTemplate(template)}>
@@ -993,7 +993,7 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
</ScrollArea>
</div>
) : (
<div className="py-8 text-center text-gray-500"> 릿 </div>
<div className="py-8 text-center text-muted-foreground"> 릿 </div>
)}
</div>
)}