kcg-ai-monitoring/frontend/src/design-system/sections/IntroSection.tsx
htlee e0b51efc54 feat(frontend): 디자인 시스템 쇼케이스 페이지 + 신규 공통 컴포넌트
쇼케이스 (/design-system.html):
- 별도 Vite entry (System Flow 패턴 재사용, 메인 SPA 분리)
- 10개 섹션: Intro / Token / Typography / Badge / Button / Form /
  Card / Layout / Catalog (19+) / Guide
- 추적 ID 체계 (TRK-CATEGORY-SLUG):
  - hover 시 툴팁 + "ID 복사 모드"에서 클릭 시 클립보드 복사
  - URL hash 딥링크 (#trk=TRK-BADGE-critical-sm) 스크롤+하이라이트
  - 산출문서/논의에서 특정 변형 정확히 참조 가능
- Dark/Light 테마 토글로 양쪽 시각 검증

신규 공통 컴포넌트:
- Button (@shared/components/ui/button.tsx)
  - 5 variant × 3 size = 15 변형
  - primary/secondary/ghost/outline/destructive × sm/md/lg
- Input / Select / Textarea / Checkbox / Radio
  - Input · Select 공통 inputVariants 공유 (sm/md/lg × default/error/success)
- PageContainer / PageHeader / Section (shared/components/layout/)
  - PageContainer: size sm/md/lg + fullBleed (지도/풀화면 예외)
  - PageHeader: title + description + icon + demo 배지 + actions 슬롯
  - Section: Card + CardHeader + CardTitle + CardContent 단축

variants.ts 확장:
- buttonVariants / inputVariants / pageContainerVariants CVA 정의
- Button/Input/Select는 variants.ts에서 import하여 fast-refresh 경고 회피

빌드 검증 완료:
- TypeScript 타입 체크 통과
- ESLint 통과 (경고 0)
- vite build: designSystem-*.js 54KB (메인 SPA와 분리)

이 쇼케이스가 확정된 후 실제 40+ 페이지 마이그레이션 진행 예정.
2026-04-08 11:09:36 +09:00

69 lines
3.1 KiB
TypeScript

import { TrkSectionHeader, Trk } from '../lib/Trk';
export function IntroSection() {
return (
<>
<TrkSectionHeader
id="TRK-SEC-intro"
title="KCG Design System"
description="kcg-ai-monitoring 프론트엔드의 시각 언어 · 컴포넌트 · 레이아웃 규칙 단일 참조 페이지"
/>
<Trk id="TRK-INTRO-overview" className="ds-sample">
<h3 className="text-sm font-semibold text-heading mb-2"> </h3>
<ul className="text-xs text-label space-y-1.5 list-disc list-inside leading-relaxed">
<li>
<strong className="text-heading"> </strong>
. `className="bg-red-600"` .
</li>
<li>
<strong className="text-heading"> </strong> · ·
.
</li>
<li>
<strong className="text-heading">ID </strong> <code>TRK-*</code> ID가 ,
· .
</li>
</ul>
</Trk>
<Trk id="TRK-INTRO-howto" className="ds-sample mt-3">
<h3 className="text-sm font-semibold text-heading mb-2"> </h3>
<ol className="text-xs text-label space-y-1.5 list-decimal list-inside leading-relaxed">
<li>
<strong className="text-heading">"ID 복사 모드"</strong> ID가
.
</li>
<li>
URL <code className="font-mono text-blue-400">#trk=TRK-BADGE-critical-sm</code>
+ .
</li>
<li>
<strong className="text-heading">Dark / Light</strong> .
</li>
<li>
. <code>TRK-SEC-*</code> ID가 .
</li>
</ol>
</Trk>
<Trk id="TRK-INTRO-naming" className="ds-sample mt-3">
<h3 className="text-sm font-semibold text-heading mb-2"> ID </h3>
<code className="ds-code">
{`TRK-<카테고리>-<슬러그>[-<변형>]
예시:
TRK-TOKEN-text-heading → 시맨틱 토큰 --text-heading
TRK-BADGE-critical-sm → Badge intent=critical size=sm
TRK-BUTTON-primary-md → Button variant=primary size=md
TRK-LAYOUT-page-container → PageContainer 루트
TRK-CAT-alert-level-HIGH → alertLevels 카탈로그의 HIGH 배지
TRK-SEC-badge → Badge 섹션 자체
카테고리: SEC, INTRO, TOKEN, TYPO, BADGE, BUTTON, FORM, CARD, LAYOUT, CAT, GUIDE`}
</code>
</Trk>
</>
);
}