UNPKG

extended-dynamic-forms

Version:

Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events

31 lines (29 loc) 1.3 kB
import { default as React } from 'react'; import { ChoiceWidgetProps } from './ChoiceWidget.types'; /** * Main Choice Widget component with error boundary * * Provides comprehensive error handling and graceful fallback mechanisms: * - Error boundary catches and handles all rendering errors * - Fallback to basic HTML select on critical failures * - Retry mechanism with configurable limits * - Error reporting to FormEventHub * - Development-friendly error details * - Accessibility-compliant error announcements * * Key features: * - Full RJSF WidgetProps compliance * - Automatic presenter strategy selection * - Comprehensive error boundary implementation * - Event system integration via FormEventHub * - Performance optimization (<200ms render target) * - WCAG 2.1 AA accessibility compliance * - Loading and error state management * - Backward compatibility preservation * * @param props - RJSF-compatible widget props with Choice Widget extensions * @returns Fully-featured choice widget with error boundaries */ export declare const ChoiceWidget: React.FC<ChoiceWidgetProps>; export type { ChoiceWidgetProps, ChoiceWidgetConfig, ChoiceWidgetState, ChoiceOption, PresentationMode, ErrorState, LoadingState, } from './ChoiceWidget.types'; export default ChoiceWidget;