更新 UI 一致性規範與公共事業費樣式
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 47s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-20 10:41:35 +08:00
parent 32c2612a5f
commit c1d302f03e
6 changed files with 233 additions and 84 deletions

View File

@@ -732,6 +732,51 @@ import { SearchableSelect } from "@/Components/ui/searchable-select";
---
## 11.5 輸入框尺寸 (Input Sizes)
為確保介面整齊與統一,所有表單輸入元件標準高度應為 **`h-9`** (36px),與標準按鈕尺寸對齊。
- **Input**: 預設即為 `h-9` (由 `py-1``text-sm` 組合而成)
- **Select / SearchableSelect**: 必須確保 Trigger 按鈕高度為 `h-9`
- **禁止使用**: 除非有特殊設計需求,否則避免使用 `h-10` (40px) 或其他非標準高度。
## 11.6 日期輸入框樣式 (Date Input Style)
日期輸入框應採用「**左側裝飾圖示 + 右側原生操作**」的配置,以保持視覺一致性並保留瀏覽器原生便利性。
**樣式規格**
1. **容器**: 使用 `relative` 定位。
2. **圖標**: 使用 `Calendar` 圖標,放置於絕對位置 `absolute left-2.5 top-2.5`,顏色 `text-gray-400`,並設定 `pointer-events-none` 避免干擾點擊。
3. **輸入框**: 設定 `pl-9` (左內距) 以避開圖示,並使用原生 `type="date"``type="datetime-local"`
```tsx
import { Calendar } from "lucide-react";
import { Input } from "@/Components/ui/input";
<div className="relative">
<Calendar className="absolute left-2.5 top-2.5 h-4 w-4 text-gray-400 pointer-events-none" />
<Input
type="date"
className="pl-9 block w-full"
value={date}
onChange={(e) => setDate(e.target.value)}
/>
</div>
```
## 11.7 搜尋選單樣式 (SearchableSelect Style)
`SearchableSelect` 元件在表單或篩選列中使用時,高度必須設定為 `h-9` 以與輸入框對齊。
```tsx
<SearchableSelect
className="h-9" // 確保高度一致
// ...other props
/>
```
---
## 12. 檢查清單
在開發或審查頁面時,請確認以下項目: