feat(shared): add UI components, hooks, form fields, and action utils

- Add UI components: confirm-delete-dialog, empty-table-row, list-pagination, pagination, status-badge

- Add form-fields directory for reusable form field components

- Add hooks: use-action-mutation, use-action-query for server action integration

- Add action-utils lib for action state helpers

- Update a11y components, charts, global-search, onboarding-gate, question components

- Update UI components: chip-nav, filter-bar, page-header, stat-card, stat-item, switch, table

- Update hooks: use-action-with-toast, use-aria-live, use-debounce, use-local-storage, use-media-query, use-permission

- Update lib: a11y, ai, audit-logger, auth-guard, bcrypt-utils, change-logger, download, excel, file-storage, http-utils, login-logger, password-policy, password-security-service, permissions, rate-limit, role-utils, search-params, session, storage-provider

- Update types: action-state, permissions

- Update i18n messages (en, zh-CN) for dashboard, diagnostic, grades, lesson-preparation, settings
This commit is contained in:
SpecialX
2026-06-23 17:38:14 +08:00
parent 9ceb2b7b67
commit c4d3433cc9
25 changed files with 1986 additions and 28 deletions

View File

@@ -0,0 +1,37 @@
import {
TableCell,
TableRow,
} from "@/shared/components/ui/table"
/**
* 表格空行:统一的"无数据"占位行。
*
* 覆盖以下重复模式3 个审计表格逐行复制):
* - audit-log-table.tsx: colSpan=7, "No audit logs found."
* - login-log-table.tsx: colSpan=6, "No login logs found."
* - data-change-log-table.tsx: colSpan=7, "No data change logs found."
*
* 结构TableRow > TableCell(colSpan, h-24, text-center, text-muted-foreground)。
*/
interface EmptyTableRowProps {
/** 跨列数 */
colSpan: number
/** 空状态文案(默认 "No data found." */
message?: string
}
export function EmptyTableRow({
colSpan,
message = "No data found.",
}: EmptyTableRowProps) {
return (
<TableRow>
<TableCell
colSpan={colSpan}
className="h-24 text-center text-muted-foreground"
>
{message}
</TableCell>
</TableRow>
)
}