UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

28 lines 1.23 kB
import { FormValidator, type FieldValidator, type ValidationContext, type FormState } from '../../utils/validation.js'; interface Props { name: string; legend?: string; description?: string; required?: boolean; disabled?: boolean; validator?: FormValidator; validateOnMount?: boolean; announceResults?: boolean; children?: import('svelte').Snippet; } declare const FormGroup: import("svelte").Component<Props, { addField: <T>(field: FieldValidator<T>) => void; removeField: (fieldName: string) => boolean; createField: <T>(fieldName: string, initialValue?: T, rules?: any[]) => FieldValidator<T> | undefined; getField: <T = any>(fieldName: string) => FieldValidator<T> | undefined; validate: () => Promise<boolean>; submit: <T = any>(submitFn: (data: Record<string, any>) => Promise<T> | T) => Promise<T | null>; reset: () => void; getFormData: () => Promise<Record<string, any>>; getFormState: () => Promise<FormState>; getValidationContext: () => ValidationContext; getValidator: () => FormValidator | undefined; }, "validator">; type FormGroup = ReturnType<typeof FormGroup>; export default FormGroup; //# sourceMappingURL=FormGroup.svelte.d.ts.map