UNPKG

@navinc/base-react-components

Version:
57 lines (56 loc) 4.82 kB
import { InferComponentProps } from '../types.js'; import { Input } from '../input.js'; type InputWithSensitivityButtonProps = { isVisible?: boolean; onToggle?: () => void; } & InferComponentProps<typeof Input>; /** This is a controlled `<Input>` component with styling to accommodate the "visible" and "invisible" icon button that toggles the visibility of the input value. * * After changing the `name` prop using the controls, please press the storybook "remount" button (the refresh icon, 2 arrow chasing each other), * * ## Additional props not listed * * - **isVisible** (boolean): visibility state of the input value * - **value** (string): input value * - **onChange** (func): handler for input typing * - **onToggle** (func): handler for visibility icon click and keyboard (see code comments) * * @deprecated This component is deprecated and will be removed in a future release. Avoid using it in new code. */ export declare const InputWithSensitivityButton: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<{ isVisible?: boolean; onToggle?: () => void; } & InferComponentProps<import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<{ label?: string; hasSpaceForErrors?: boolean; helperIcon?: import("../index.js").IconName; helperLinkAction?: import("react").MouseEventHandler<HTMLDivElement>; helperText?: string; isStatic?: boolean; errors?: string[]; lede?: import("react").ReactNode; touched?: boolean; childrenBeforeErrors?: import("react").ReactNode; innerRef?: import("react").MutableRefObject<HTMLInputElement | null>; tooltipText?: string; isPrivate?: boolean; } & InferComponentProps<import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<(import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>) | (Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<import("react").Component<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, any, any>>), { isInvalid?: boolean; }>> & (string & (Omit<import("react").ComponentClass<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, any>, keyof import("react").Component<any, {}, any>> | Omit<import("react").FunctionComponent<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, keyof import("react").Component<any, {}, any>>))>, never>> & string & Omit<({ autoFocus, children, className, label, hasSpaceForErrors, helperIcon, helperLinkAction, helperText, isInvalid, isStatic, value, required, type, errors, lede, touched, placeholder, childrenBeforeErrors, innerRef, tooltipText, isPrivate, ...props }: { label?: string; hasSpaceForErrors?: boolean; helperIcon?: import("../index.js").IconName; helperLinkAction?: import("react").MouseEventHandler<HTMLDivElement>; helperText?: string; isStatic?: boolean; errors?: string[]; lede?: import("react").ReactNode; touched?: boolean; childrenBeforeErrors?: import("react").ReactNode; innerRef?: import("react").MutableRefObject<HTMLInputElement | null>; tooltipText?: string; isPrivate?: boolean; } & InferComponentProps<import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<(import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>) | (Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<import("react").Component<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, any, any>>), { isInvalid?: boolean; }>> & (string & (Omit<import("react").ComponentClass<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, any>, keyof import("react").Component<any, {}, any>> | Omit<import("react").FunctionComponent<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, keyof import("react").Component<any, {}, any>>))>) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>>, never>> & string & Omit<({ isVisible, onToggle, ...props }: InputWithSensitivityButtonProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>; export {};