/** * Component Definitions - Metadata for all design system components * * This file defines the complete metadata for each component including: * - State combinations and variants * - Token dependencies * - Accessibility requirements * - Test case counts * * Used by VariantGenerator to auto-generate CSS and validate 123 component states */ export const componentDefinitions = { components: { 'ds-button': { name: 'Button', group: 'interactive', cssClass: '.ds-btn', description: 'Primary interactive button component', states: ['default', 'hover', 'active', 'disabled', 'loading', 'focus'], variants: { variant: ['primary', 'secondary', 'outline', 'ghost', 'destructive', 'success', 'link'], size: ['sm', 'default', 'lg', 'icon', 'icon-sm', 'icon-lg'] }, variantCombinations: 42, // 7 variants × 6 sizes stateCount: 6, totalStates: 252, // 42 × 6 tokens: { color: ['--primary', '--secondary', '--destructive', '--success', '--foreground'], spacing: ['--space-3', '--space-4', '--space-6'], typography: ['--text-xs', '--text-sm', '--text-base'], radius: ['--radius'], transitions: ['--duration-fast', '--ease-default'], shadow: ['--shadow-sm'] }, a11y: { ariaAttributes: ['aria-label', 'aria-disabled', 'aria-pressed'], focusManagement: true, contrastRatio: 'WCAG AA (4.5:1)', keyboardInteraction: 'Enter, Space', semantics: '