V13-FE-006: consolidate approved UI and contract hardening
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s

This commit is contained in:
2026-08-13 02:41:00 +09:00
parent d79edae546
commit 3f293d8aa8
1278 changed files with 14384 additions and 1664 deletions
@@ -0,0 +1,14 @@
import { themeQuartz } from 'ag-grid-community'
// AG Grid v33+ Theming API adapter. Business modules never import a grid theme directly.
export const kbxGridTheme = themeQuartz.withParams({
spacing: 4,
foregroundColor: 'var(--kbx-color-text)',
backgroundColor: 'var(--kbx-color-surface)',
accentColor: 'var(--kbx-color-primary)',
borderColor: 'var(--kbx-color-border)',
headerBackgroundColor: 'var(--kbx-color-surface-subtle)',
headerTextColor: 'var(--kbx-color-text)',
rowHoverColor: 'var(--kbx-color-surface-hover)',
selectedRowBackgroundColor: 'var(--kbx-color-info-surface)',
})
@@ -0,0 +1,18 @@
export type KbxThemeMode = 'light' | 'dark'
export const KBX_THEME_MODES: readonly KbxThemeMode[] = ['light', 'dark'] as const
export function normalizeKbxThemeMode(value: unknown): KbxThemeMode {
return value === 'dark' ? 'dark' : 'light'
}
export function applyKbxTheme(mode: KbxThemeMode, root: HTMLElement = document.documentElement) {
const normalized = normalizeKbxThemeMode(mode)
root.dataset.kbxTheme = normalized
root.style.colorScheme = normalized
return normalized
}
export function nextKbxThemeMode(mode: KbxThemeMode): KbxThemeMode {
return mode === 'dark' ? 'light' : 'dark'
}