/** * Testing Utilities * Helper functions for consistent testing attribute generation * * NOTE: For data-cy selectors, use sel() from '@nextsparkjs/core/selectors' * This file contains runtime utilities for accessibility and keyboard handling. */ /** * Create state-based data attributes for conditional testing * * @param state - Current state value * @returns State attribute value */ export declare function createStateAttr(state: 'active' | 'completed' | 'pending' | 'loading' | 'error'): string; /** * Create priority-based data attributes * * @param priority - Priority level * @returns Priority attribute value */ export declare function createPriorityAttr(priority: 'low' | 'medium' | 'high'): string; /** * Generate testing props object for components * * @param config - Testing configuration * @returns Testing props object */ export declare function createTestingProps(config: { testId?: string; cyId?: string; state?: 'active' | 'completed' | 'pending' | 'loading' | 'error'; priority?: 'low' | 'medium' | 'high'; taskId?: string; userId?: string; }): { [k: string]: string; }; /** * Accessibility helper for dynamic aria-label generation * * @param template - Label template with placeholders * @param values - Values to replace placeholders * @returns Formatted aria-label */ export declare function createAriaLabel(template: string, values: Record): string; /** * Keyboard navigation helpers */ export declare const keyboardHelpers: { /** * Handle Enter and Space key activation */ createActivationHandler: (onActivate: () => void) => (e: React.KeyboardEvent) => void; /** * Handle Escape key for closing */ createEscapeHandler: (onClose: () => void) => (e: React.KeyboardEvent) => void; /** * Handle arrow navigation in lists */ createArrowNavigationHandler: (currentIndex: number, maxIndex: number, onIndexChange: (index: number) => void) => (e: React.KeyboardEvent) => void; }; //# sourceMappingURL=utils.d.ts.map