import * as React from 'react'; import type { BoxProps } from '../box'; import type { WithEnhancedClassName } from '../utils/common-types'; type FieldTone = 'neutral' | 'success' | 'error' | 'loading'; type FieldMessageProps = { id: string; children: React.ReactNode; tone: FieldTone; }; declare function FieldMessage({ id, children, tone }: FieldMessageProps): React.JSX.Element; type ChildrenRenderProps = { id: string; value?: React.InputHTMLAttributes['value']; 'aria-describedby'?: string; 'aria-invalid'?: true; onChange?: React.ChangeEventHandler; characterCountElement?: React.ReactNode | null; }; type HtmlInputProps = React.DetailedHTMLProps, T>; type BaseFieldVariant = 'default' | 'bordered'; type BaseFieldVariantProps = { /** * Provides alternative visual layouts or modes that the field can be rendered in. * * Namely, there are two variants supported: * * - the default one * - a "bordered" variant, where the border of the field surrounds also the labels, instead * of just surrounding the actual field element * * In both cases, the message and description texts for the field lie outside the bordered * area. */ variant?: BaseFieldVariant; }; export type BaseFieldProps = WithEnhancedClassName & Pick, 'id' | 'hidden' | 'maxLength' | 'aria-describedby'> & { /** * The main label for this field element. * * This prop is not optional. Consumers of field components must be explicit about not * wanting a label by passing `label=""` or `label={null}`. In those situations, consumers * should make sure that fields are properly labelled semantically by other means (e.g using * `aria-labelledby`, or rendering a `