Button, IconButton, Tag, Chip, TextInput, Segmented, Toggle, Checkbox, Slider, Card and ListRow, styled with CSS Modules over the design tokens. Every interactive primitive keeps a hit area of at least 44 px; visually smaller controls draw their face inside a larger hit box. Vitest now injects CSS Modules into jsdom (css: true) so tests assert the sizes the stylesheets declare, alongside roles, aria states and keyboard behaviour (Segmented arrow keys, Toggle Space/Enter, Chip "Remove X"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
527 B
TypeScript
23 lines
527 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
const backend = 'http://localhost:8080'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/api': backend,
|
|
'/auth': backend,
|
|
'/media': backend,
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
// Inject CSS Modules into jsdom so tests can assert the sizes the
|
|
// stylesheets actually declare (for example 44 px hit areas).
|
|
css: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
},
|
|
})
|