import * as React from 'react'; import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom'; import { IconProps } from 'react-magma-icons'; import { ThemeInterface } from '../../theme/magma'; import { LabelPosition } from '../Label'; export declare enum InputSize { large = "large", medium = "medium" } export declare enum InputType { email = "email", file = "file", number = "number", password = "password", search = "search", text = "text", url = "url", tel = "tel" } export declare enum InputIconPosition { top = "top", left = "left", right = "right" } export interface InputBaseProps extends React.InputHTMLAttributes { /** * @internal */ backgroundColor?: string; /** * @internal */ borderColor?: string; /** * @internal */ errorBorderColor?: string; /** * @internal */ disabledBackgroundColor?: string; /** * @internal */ disabledBorderColor?: string; /** * @internal */ disabledIconColor?: string; /** * @internal */ disabledPlaceholderColor?: string; /** * @internal */ disabledTextColor?: string; /** * @internal */ children?: any; /** * Style properties for the component container element. * This div is a direct child of the div with the inputWrapperStyle, so the second from the top. */ containerStyle?: React.CSSProperties; /** * 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; /** * @internal */ hasError?: boolean; /** * Icon to display within the component */ icon?: React.ReactElement; /** * @internal */ iconColor?: string; /** * Text for the aria-label attribute for an icon, if provided */ iconAriaLabel?: string; /** * Position within the component for the icon to appear * @default InputIconPosition.right */ iconPosition?: InputIconPosition; /** * Reference to the icon element */ iconRef?: React.Ref; /** * Relative size of the component * @default InputSize.medium */ inputSize?: InputSize; /** * Style properties for the input element */ inputStyle?: React.CSSProperties; /** * Style properties for input wrapper element. This is the outermost div. */ inputWrapperStyle?: React.CSSProperties; /** * Total number of characters in an input. */ inputLength?: number; /** * Clear contents of input by clicking a clear button * @default false */ isClearable?: boolean; /** * Function to be called when the contents of input are cleared by clicking a clear button */ onClear?: () => void; /** * If true, the component will have inverse styling to better appear on a dark background * @default false */ isInverse?: boolean; /** * Boolean for whether this is a Password Input or not */ isPasswordInput?: boolean; /** * For use in predictive search which moves the icon to the left */ isPredictive?: boolean; /** * A number value which gives Character Counter the maximum length of allowable characters in an Input. */ maxCount?: number; /** * A number value which gives Character Counter the maximum length of allowable characters in an Input. * @deprecated = true */ maxLength?: number; /** * Action that will fire when icon is clicked */ onIconClick?: () => void; /** * Action that will fire when icon receives keypress */ onIconKeyDown?: (event: any) => void; /** * Action that will synchronize chosenDate with input value */ onDateChange?: (event: any) => void; /** * @internal */ setReference?: (node: ReferenceType) => void; /** * @internal */ testId?: string; /** * @internal */ theme?: ThemeInterface; /** * The type attribute of the form field * @default InputType.text */ type?: InputType; /** * String to determine width of input, must be suffixed with "px", "rem", or "%"" * @default "auto" */ width?: string; /** * Position within the component for the label to appear * @default LabelPosition.top */ labelPosition?: LabelPosition; /** * @internal */ placeholderColor?: string; /** * @internal */ textColor?: string; /** * If true, label text will be hidden visually, but will still be read by assistive technology * @default false */ isLabelVisuallyHidden?: boolean; } export interface InputWrapperStylesProps { width?: string; iconPosition?: InputIconPosition; isInverse?: boolean; isClearable?: boolean; isPredictive?: boolean; theme?: ThemeInterface; hasError?: boolean; disabled?: boolean; inputSize?: InputSize; backgroundColor?: string; borderColor?: string; errorBorderColor?: string; disabledBackgroundColor?: string; disabledBorderColor?: string; } export declare const inputWrapperStyles: (props: InputWrapperStylesProps) => import("@emotion/react").SerializedStyles; export interface InputBaseStylesProps { hasCharacterCounter?: boolean; isInverse?: boolean; iconPosition?: InputIconPosition; inputSize?: InputSize; isPredictive?: boolean; theme?: ThemeInterface; disabled?: boolean; hasError?: boolean; isClearable?: boolean; placeholderColor?: string; textColor?: string; disabledPlaceholderColor?: string; disabledTextColor?: string; } export declare const inputBaseStyles: (props: InputBaseStylesProps) => import("@emotion/react").SerializedStyles; export declare const InputWrapper: import("@emotion/styled").StyledComponent<{ theme?: import("@emotion/react").Theme; as?: React.ElementType; } & InputWrapperStylesProps, React.DetailedHTMLProps, HTMLDivElement>, {}>; export declare function getHelpIconButtonSize(props: any): any; export declare const IconButtonContainer: import("@emotion/styled").StyledComponent<{ theme?: import("@emotion/react").Theme; as?: React.ElementType; } & { iconPosition?: InputIconPosition; inputSize?: InputSize; theme: ThemeInterface; isClickable?: boolean; hasChildren?: boolean; }, React.DetailedHTMLProps, HTMLSpanElement>, {}>; export declare const isLeftOrHidden: ({ labelPosition, isLabelVisuallyHidden, }: { labelPosition?: LabelPosition; isLabelVisuallyHidden?: boolean; }) => boolean; export declare const HelpLinkContainer: import("@emotion/styled").StyledComponent<{ theme?: import("@emotion/react").Theme; as?: React.ElementType; } & { labelPosition?: LabelPosition; inputSize?: InputSize; theme: ThemeInterface; isLabelVisuallyHidden?: boolean; }, React.DetailedHTMLProps, HTMLSpanElement>, {}>; export declare const InputBase: React.ForwardRefExoticComponent>;