import * as React from 'react'; import { ThemeInterface } from '../../theme/magma'; import { InputIconPosition, InputSize } from '../InputBase'; import { LabelPosition } from '../Label'; /** * Internal use only: Wrapper for all field components * @children required */ export interface FormFieldContainerProps extends FormFieldContainerBaseProps, React.HTMLAttributes { } export interface FormFieldContainerBaseProps { /** * Is the wrapped input hidden with display:none? This would make the input look like an actionable item, so FormFieldContainer uses a span in lieu of a label. */ actionable?: boolean; /** * Style properties for the outer container */ containerStyle?: React.CSSProperties; /** * Content of the error message. If a value is provided, the field will be styled as an error state and the error message will display. */ errorMessage?: React.ReactNode; /** * @internal */ errorMessageColor?: string; /** * @internal */ errorIconColor?: string; /** * ID of the form field. Also used in the description ID. */ fieldId: string; /** * Enables Character Counter by default. * When set to false, the default HTML attribute of 'maxlength' will work. * Note: This is a temporary prop and will be removed in future releases. @default true */ hasCharacterCounter?: boolean; /** * Content of the helper message. */ helperMessage?: React.ReactNode; /** * Position within the component for the icon to appear * @default InputIconPosition.right */ iconPosition?: InputIconPosition; /** * Total number of characters in an input. */ inputLength?: number; /** * Relative size of the component * @default InputSize.medium */ inputSize?: InputSize; /** * If true, label text will be hidden visually, but will still be read by assistive technology * @default false */ isLabelVisuallyHidden?: boolean; isInverse?: boolean; /** * Position within the component for the label to appear * @default LabelPosition.top */ labelPosition?: LabelPosition; /** * Style properties for the label element */ labelStyle?: React.CSSProperties; /** * Content for label; can be a node or a string */ labelText?: React.ReactNode; /** * If the labelPosition value is 'left' then Input labels have a specified width in percentage, otherwise no width is set. */ labelWidth?: number; /** * @internal */ labelColor?: string; /** * @internal */ labelFontWeight?: React.CSSProperties['fontWeight']; /** * Enables the Character Counter and sets the maximum amount of characters allowed within the Input. */ maxCount?: number; /** * Enables the Character Counter and sets the maximum amount of characters allowed within the Input. * @deprecated = true */ maxLength?: number; /** * Style properties for the helper or error message */ messageStyle?: React.CSSProperties; /** * @internal */ messageColor?: string; /** * @internal */ testId?: string; /** * @internal */ additionalContent?: React.ReactNode; } export declare const getInputFormFieldColors: (theme: ThemeInterface, isInverse: boolean) => Pick; export declare const FormFieldContainer: React.ForwardRefExoticComponent>;