thread-master/docs/product/haixun-console/tasks/T003-ui-primitives.md

918 B
Raw Blame History

T003 — UI primitives

Status: done
Milestone: M1
Est. change: ~180 lines
Completed: 2026-07-09

Goal

可重用基礎元件Button、Input、Textarea、Select、Card、Badge、EmptyState。

Depends on

  • T002

Inputs

  • Spec §9.3
  • tokens from T002

Outputs

程式變更

路徑 動作 說明
apps/web/src/components/ui/*.tsx add 各元件
apps/web/src/components/ui/index.ts add barrel export
可選 *.module.css 或共用 class add --hb-*

行為變更

  • Button variants: primary / ghost / danger
  • Badge 可表達 success/danger/muted

Out of scope

  • Stepper、BellMenu、Toast可後續 task 用 primitive 組)
  • 業務頁

Acceptance

  • 各元件有 children/label 可渲染
  • npm run build 通過
  • 無重型 UI 庫依賴
cd apps/web && npm run build