import { type VariantProps } from 'class-variance-authority'; import { type FieldProps, useField } from 'informed'; import { type ReactNode } from 'react'; import type { ZodType } from 'zod'; declare const formItemStyles: (props?: ({ layout?: "inline" | "horizontal" | "vertical" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export type FieldType = 'text' | 'number' | 'textArea' | 'select' | 'checkbox'; /** * Global field props used by all form controls. These * are passed down through render function's field prop. * Every form control should consume these properly. */ export interface UserFieldProps { id: string; name: string; readOnly?: boolean; disabled?: boolean; type?: FieldType; } /** * Render prop for FormControl component. It receives * field props and user props and should return the actual * form control component. */ export type FormControlRender = (params: { label?: string; userProps: Omit; } & ReturnType>) => ReactNode; /** * Props for FormControl component. It extends Informed's * FieldProps and VariantProps for styling. It also contains * a render prop to render the actual form control component. */ export interface FormControlProps extends FieldProps>, VariantProps { children?: ReactNode; className?: string; label?: string; name: string; type?: FieldType; disabled?: boolean; readOnly?: boolean; tooltip?: ReactNode; showOptional?: boolean; render: FormControlRender; zodItemSchema?: ZodType; size?: 'xs' | 'sm' | 'md' | 'lg'; position?: 'start' | 'end'; } /** * Helper subset of FormControl props used for consumer * control components. It contains all props except `render` * and `type`. */ export interface FormControlConsumerProps extends Omit { } export type FormControlConsumerPropsKeys = keyof FormControlConsumerProps; export type ConsumeFormControlProps = FormControlConsumerProps & Omit; /** * Base form control component, used to wrap form inputs. * It provides styling for error messages, states, labels * and tooltips. */ export declare function FormControl({ className, layout, children, label, name, type, position, required, size, tooltip, showOptional, render, zodItemSchema, ...restProps }: FormControlProps): JSX.Element; export {}; //# sourceMappingURL=FormControl.d.ts.map