refactor: CSS 파일 모듈화 및 컴포넌트별 직접 Import 구조 전환 (방안 B)

- HTML 내 CSS link 태그들을 삭제하고, 각 TS 진입점 파일에서 CSS 파일을 직접 import하도록 연동

- 스타일 파일들을 각 컴포넌트/뷰 디렉토리 옆으로 이동 배치 (Co-location)

- guide.css, modal.css, dashboard.css, table.css, map-editor.css 이동 및 경로 갱신

- 디자인 시스템(common.css) 및 로그인 스타일(login.css)은 전역 배치 유지하고 main.ts에서 통합 임포트
This commit is contained in:
2026-06-19 15:04:36 +09:00
parent 587e92a7da
commit e8bc42e5de
13 changed files with 7 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
import { createIcons, BookOpen, X, ChevronDown, ChevronRight, RefreshCw } from 'lucide';
import { state } from '../core/state';
import './guide.css';
// ─── 자산별 가이드 콘텐츠 정의 (SW_Table 브랜치 전체 복구) ───
interface GuideTabConfig {

View File

@@ -1,5 +1,6 @@
import { createIcons, X } from 'lucide';
import { setEditLock } from './ModalUtils';
import './modal.css';
/**
* 모든 모달의 공통 기능을 관리하는 베이스 추상 클래스입니다.

View File

@@ -0,0 +1,594 @@
/* Modal - Vercel Inspired Minimalist Design */
.modal-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
backdrop-filter: blur(2px);
}
.modal-overlay:not(.hidden) { opacity: 1; visibility: visible; }
.modal-content {
background-color: var(--canvas);
width: 100%;
max-width: 600px;
max-height: 90vh;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
transform: translateY(10px);
transition: transform 0.2s ease;
display: flex;
flex-direction: column;
border: 1px solid var(--hairline);
}
.modal-overlay.sub-modal {
z-index: 1100;
}
.modal-header {
background-color: var(--canvas);
border-bottom: 1px solid var(--hairline);
padding: 1rem var(--spacing-base);
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.modal-header h2 {
font-size: var(--fs-md);
font-weight: 600;
color: var(--primary);
line-height: 1.2;
}
.modal-header .btn-icon {
color: var(--mute) !important;
cursor: pointer;
background: none !important;
border: none !important;
font-size: 1.5rem;
line-height: 1;
transition: color 0.2s;
}
.header-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.form-group.relative {
position: relative;
}
/* 동적 리스트 컨테이너 */
.dynamic-row-container {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.volume-row, .remote-info-row {
display: flex;
gap: 0.5rem;
}
.remote-info-row {
flex-direction: column;
}
/* 파일 업로드 디스플레이 */
.file-upload-display {
flex: 1;
border: 1px solid var(--hairline);
border-radius: 6px;
padding: 0 12px;
height: clamp(34px, 4.5vmin, 44px);
display: flex;
align-items: center;
font-size: var(--fs-sm);
color: var(--mute);
background-color: var(--canvas-soft);
}
.btn-circle-remove {
width: clamp(34px, 4.5vmin, 44px);
height: clamp(34px, 4.5vmin, 44px);
border-radius: 50% !important;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 !important;
color: var(--danger) !important;
border: 1px solid var(--danger) !important;
background: transparent;
font-size: 1.5rem !important; /* Larger X icon */
line-height: 1;
flex-shrink: 0;
transition: all 0.2s;
cursor: pointer;
}
.btn-circle-remove:hover {
background-color: var(--danger);
color: var(--white) !important;
}
.modal-body {
padding: var(--spacing-base);
overflow-y: auto;
flex: 1;
background: var(--canvas);
}
.grid-form {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--spacing-base);
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group.full-width {
grid-column: span 2;
}
/* Section Title for Grouping */
.form-section-title {
grid-column: span 2;
font-size: var(--fs-xs);
font-weight: 600;
color: var(--mute);
padding: 1rem 0 0.5rem 0;
border-bottom: 1px solid var(--hairline);
margin-bottom: 1rem;
display: flex;
align-items: center;
text-transform: uppercase;
letter-spacing: -0.02em;
}
.form-section-title:first-child {
padding-top: 0;
}
.form-group label {
font-size: var(--fs-xs);
font-weight: 600;
color: var(--mute);
}
.form-group input,
.form-group select,
.form-group textarea {
height: clamp(34px, 4.5vmin, 44px);
padding: 0 0.75rem;
border: 1px solid var(--hairline);
border-radius: 6px;
font-family: inherit;
font-size: var(--fs-sm);
outline: none;
transition: all 0.2s;
background-color: var(--canvas);
color: var(--primary);
box-sizing: border-box;
}
.form-group input.font-mono,
.form-group select.font-mono {
font-family: var(--font-mono);
font-size: var(--fs-xs);
}
.form-group textarea {
height: auto;
padding: 0.75rem;
resize: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
border-color: var(--primary);
box-shadow: 0 0 0 1px var(--primary);
}
.form-group input:disabled,
.form-group select:disabled {
background-color: var(--canvas-soft);
color: var(--mute);
cursor: not-allowed;
}
.modal-footer {
padding: 1rem 1.5rem;
border-top: 1px solid var(--hairline);
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--canvas-soft);
flex-shrink: 0;
}
.modal-footer .btn {
height: 36px;
padding: 0 1.25rem;
font-size: var(--fs-xs);
}
.footer-actions {
display: flex;
gap: 0.75rem;
}
/* Modal Size Variants */
.modal-content.wide {
max-width: 1000px;
}
.modal-content.narrow {
max-width: 500px;
}
.vertical-form {
grid-template-columns: 1fr !important;
}
.modal-body-split {
display: flex;
gap: 2rem;
min-height: 500px;
}
.modal-form-area {
flex: 1.2;
}
.modal-history-area {
flex: 0.8;
border-left: 1px solid var(--hairline);
padding-left: 2rem;
display: flex;
flex-direction: column;
}
.history-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.history-header h3 {
font-size: var(--fs-md);
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--primary);
}
/* 읽기 전용 필드 (자산번호 등) 통일 스타일 */
.is-readonly-field {
border-color: transparent !important;
background-color: transparent !important;
pointer-events: none !important;
color: var(--primary) !important;
font-weight: 600 !important;
cursor: default;
padding-left: 0 !important;
}
/* 조회 모드 (View Mode) 폼 필드 스타일 */
.is-view-mode input,
.is-view-mode select,
.is-view-mode textarea {
border-color: transparent !important;
background-color: transparent !important;
color: var(--primary) !important;
font-weight: 600 !important;
padding-left: 0 !important;
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important;
box-shadow: none !important;
}
/* 입력 필드 + 버튼 그룹 */
.input-with-btn {
display: flex;
gap: 0.5rem;
align-items: center;
width: 100%;
}
.input-with-btn input {
flex: 1;
}
/* Remote Info UI Extras */
.ri-creds-row {
display: flex;
gap: 0.5rem;
flex: 1;
}
.ri-field-group {
display: flex;
align-items: center;
gap: 0.4rem;
background: var(--canvas-soft);
padding: 0 0.75rem;
border-radius: 6px;
border: 1px solid var(--hairline);
flex: 1;
}
.is-view-mode .ri-field-group {
background: transparent;
border-color: transparent;
padding: 0;
}
.ri-mini-label {
font-size: 10px;
font-weight: 700;
color: var(--mute);
text-transform: uppercase;
user-select: none;
flex-shrink: 0;
}
.ri-field-group input {
border: none !important;
background: transparent !important;
padding: 0 !important;
height: 36px !important;
box-shadow: none !important;
width: 100%;
}
.ri-line {
display: flex;
gap: 0.5rem;
align-items: center;
margin-bottom: 0.5rem;
}
.ri-connector {
width: 24px;
height: 24px;
border-left: 2px solid var(--hairline);
border-bottom: 2px solid var(--hairline);
margin-left: 12px;
margin-top: -12px;
flex-shrink: 0;
}
.history-timeline {
flex: 1;
overflow-y: auto;
padding-right: 12px;
}
.history-item {
position: relative;
padding-left: 24px;
padding-bottom: 24px;
border-left: 1px solid var(--hairline);
}
.history-item:last-child {
border-left: 1px solid transparent;
}
.history-item::before {
content: '';
position: absolute;
left: -5px;
top: 0;
width: 9px;
height: 9px;
border-radius: 50%;
background-color: var(--canvas);
border: 2px solid var(--primary);
z-index: 1;
}
.history-date {
font-size: var(--fs-xs);
color: var(--mute);
font-weight: 500;
margin-bottom: 4px;
}
.history-details {
font-size: var(--fs-xs);
color: var(--primary);
line-height: 1.6;
background: var(--canvas-soft-2);
padding: 10px 12px;
border-radius: 6px;
border: 1px solid var(--hairline);
}
/* Upload UI Refinement */
.upload-sidebar {
width: 260px;
border-right: 1px solid var(--hairline);
background-color: var(--canvas-soft);
padding: 1.5rem 1rem;
}
.upload-tab-btn {
padding: 0.8rem 1rem;
border-radius: 8px;
cursor: pointer;
font-size: var(--fs-xs);
font-weight: 500;
color: var(--body);
transition: all 0.2s;
border: 1px solid transparent;
}
.upload-tab-btn.active {
background-color: var(--canvas);
color: var(--primary);
border-color: var(--hairline);
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
font-weight: 600;
}
/* --- Image Picker Overlay (View Location) --- */
.image-picker-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
padding: 2rem;
}
.image-picker-window {
width: 100%;
max-width: 900px;
height: 85vh;
display: flex;
flex-direction: column;
background: var(--canvas);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.image-picker-header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
background: var(--canvas);
color: var(--primary);
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--hairline);
}
.image-picker-header h3 {
margin: 0;
font-size: var(--fs-md);
font-weight: 600;
color: var(--primary);
}
.image-picker-header .btn-icon {
color: var(--mute) !important;
cursor: pointer;
background: none !important;
border: none !important;
font-size: 1.5rem;
line-height: 1;
}
.image-picker-content {
flex: 1;
width: 100%;
position: relative;
background: var(--canvas-soft);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.image-picker-footer {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
width: 100%;
padding: 1rem 1.5rem;
background: var(--canvas);
border-radius: 0 0 8px 8px;
border-top: 1px solid var(--hairline);
}
.layout-map-container {
position: relative;
display: inline-block;
cursor: crosshair;
background-color: var(--canvas-soft-2);
border-radius: 4px;
overflow: hidden;
}
.layout-map-container.readonly {
cursor: default;
}
.image-marker-wrapper {
position: relative;
display: inline-block;
}
.layout-map-img {
display: block;
max-width: 100%;
max-height: 75vh;
user-select: none;
-webkit-user-drag: none;
}
.layout-marker {
position: absolute;
width: 16px;
height: 16px;
background-color: var(--danger);
border: 2px solid white;
border-radius: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 100;
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.pulse-marker::after {
content: '';
position: absolute;
top: 50%; left: 50%;
width: 100%; height: 100%;
background-color: var(--danger);
border-radius: 50%;
transform: translate(-50%, -50%);
animation: pulse 1.5s infinite;
z-index: -1;
}
@keyframes pulse {
0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}
.digital-overlay-layer {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
pointer-events: none;
}

188
src/components/guide.css Normal file
View File

@@ -0,0 +1,188 @@
/* ITAM Guide Modal Styles - Updated to match common modal style */
/* Tab Container (below header) */
.guide-tabs-container {
background: #FAFAFA;
border-bottom: 1px solid var(--border-color);
padding: 0 1.5rem;
flex-shrink: 0;
}
.guide-tabs {
display: flex;
gap: 2px;
overflow-x: auto;
scrollbar-width: none;
}
.guide-tabs::-webkit-scrollbar { display: none; }
.guide-tab {
padding: 0.75rem 1.25rem;
font-size: 24px;
font-weight: 700;
color: var(--text-muted);
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.2s ease;
white-space: nowrap;
}
.guide-tab:hover {
color: var(--primary-color);
background: rgba(30, 81, 73, 0.04);
}
.guide-tab.active {
color: var(--primary-color);
border-bottom-color: var(--primary-color);
background: white;
}
/* Content Area */
.guide-body {
padding-bottom: 2rem;
}
.guide-tab-panel {
display: none;
padding: 1.5rem 0;
animation: guideFadeIn 0.3s ease;
}
.guide-tab-panel.active {
display: block;
}
@keyframes guideFadeIn {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
/* Section Styles */
.guide-section {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-bottom: 2rem;
}
.guide-section:last-child {
margin-bottom: 0;
}
.guide-section h3 {
font-size: 1.73rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--primary-color);
color: var(--primary-color);
margin: 0;
display: flex;
align-items: center;
gap: 8px;
}
.guide-text {
font-size: 24px;
color: var(--text-main);
line-height: 1.7;
margin: 0;
}
/* Flowchart Styles */
.flow-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
padding: 1.5rem;
background-color: #f9fafb;
border-radius: 8px;
border: 1px solid var(--border-color);
}
.flow-row {
display: flex;
width: 100%;
gap: 1rem;
align-items: center;
}
.flow-step {
flex: 1;
background: white;
padding: 1rem;
border-radius: 6px;
border: 1px solid var(--border-color);
display: flex;
align-items: flex-start;
gap: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.flow-step .step-number {
width: 24px;
height: 24px;
min-width: 24px;
border-radius: 50%;
background-color: var(--primary-color);
color: white;
font-size: 23px;
font-weight: 800;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.flow-step .step-label {
font-weight: 800;
color: var(--text-main);
font-size: 24px;
display: block;
}
.flow-step .step-desc {
font-size: 23px;
color: var(--text-muted);
line-height: 1.5;
margin-top: 4px;
}
.flow-arrow-right {
color: var(--text-muted);
display: flex;
align-items: center;
}
/* Info Table Style */
.guide-info-table {
width: 100%;
border-collapse: collapse;
font-size: 24px;
}
.guide-info-table th {
background: #f8faf9;
color: var(--primary-color);
font-weight: 800;
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.guide-info-table td {
padding: 0.75rem;
border-bottom: 1px solid #f3f4f6;
color: var(--text-main);
}
/* Tip Box Style */
.guide-tip {
background: var(--primary-light);
border-left: 4px solid var(--primary-color);
padding: 1rem;
font-size: 24px;
color: var(--primary-color);
line-height: 1.6;
}