import * as React from 'react'; export type FieldState = 'default' | 'success' | 'destructive'; interface FieldContextValue { id: string; descriptionId: string; errorId: string; state: FieldState; disabled?: boolean; required?: boolean; layout: 'stacked' | 'inline'; descriptionPresent: boolean; errorPresent: boolean; setDescriptionPresent: React.Dispatch>; setErrorPresent: React.Dispatch>; } /** Optional context hook for components that can work standalone. */ declare function useFieldContextOptional(): FieldContextValue | null; /** Hook to get field control props from context for custom form controls. */ declare function useFieldControlProps(): { id?: undefined; 'aria-invalid'?: undefined; 'aria-describedby'?: undefined; 'aria-required'?: undefined; disabled?: undefined; required?: undefined; state?: undefined; } | { id: string; 'aria-invalid': boolean | undefined; 'aria-describedby': string | undefined; 'aria-required': boolean | undefined; disabled: boolean | undefined; required: boolean | undefined; state: FieldState; }; export interface FieldProps extends React.HTMLAttributes { layout?: 'stacked' | 'inline'; state?: FieldState; disabled?: boolean; required?: boolean; children: React.ReactNode; } declare function FieldRoot({ layout, state, disabled, required, className, children, ...props }: FieldProps): React.JSX.Element; export interface FieldTopProps extends React.HTMLAttributes { } declare function FieldTop({ className, children, ...props }: FieldTopProps): React.JSX.Element; declare namespace FieldTop { var displayName: string; } export interface FieldTopRightProps extends React.HTMLAttributes { } declare function FieldTopRight({ className, children, ...props }: FieldTopRightProps): React.JSX.Element; declare namespace FieldTopRight { var displayName: string; } export interface FieldLabelProps extends React.LabelHTMLAttributes { required?: boolean; labelIcon?: React.ReactNode; } declare function FieldLabel({ className, required, labelIcon, children, ...props }: FieldLabelProps): React.JSX.Element; declare namespace FieldLabel { var displayName: string; } export interface FieldControlRenderProps { id: string; 'aria-invalid'?: true; 'aria-describedby'?: string; 'aria-required'?: true; disabled?: boolean; required?: boolean; state?: FieldState; } export interface FieldControlProps { children: (props: FieldControlRenderProps) => React.ReactNode; } declare function FieldControl({ children }: FieldControlProps): React.ReactNode; declare namespace FieldControl { var displayName: string; } export interface FieldBottomProps extends React.HTMLAttributes { } declare function FieldBottom({ className, children, ...props }: FieldBottomProps): React.JSX.Element; declare namespace FieldBottom { var displayName: string; } export interface FieldBottomRightProps extends React.HTMLAttributes { } declare function FieldBottomRight({ className, children, ...props }: FieldBottomRightProps): React.JSX.Element; declare namespace FieldBottomRight { var displayName: string; } export interface FieldDescriptionProps extends React.HTMLAttributes { } declare function FieldDescription({ className, children, ...props }: FieldDescriptionProps): React.JSX.Element; declare namespace FieldDescription { var displayName: string; } export interface FieldErrorProps extends React.HTMLAttributes { children?: React.ReactNode; } declare function FieldError({ className, children, ...props }: FieldErrorProps): React.JSX.Element | null; declare namespace FieldError { var displayName: string; } declare const Field: typeof FieldRoot & { Root: typeof FieldRoot; Top: typeof FieldTop; Label: typeof FieldLabel; TopRight: typeof FieldTopRight; Control: typeof FieldControl; Bottom: typeof FieldBottom; Description: typeof FieldDescription; BottomRight: typeof FieldBottomRight; Error: typeof FieldError; }; export { Field, FieldBottom, FieldBottomRight, FieldControl, FieldDescription, FieldError, FieldLabel, FieldTop, FieldTopRight, useFieldContextOptional, useFieldControlProps, };