UNPKG

@spaced-out/ui-design-system

Version:
74 lines 2.63 kB
import * as React from 'react'; import type { Flow } from 'flow-to-typescript-codemod'; import type { IconType } from '../Icon'; type ClassNames = Readonly<{ box?: string; iconLeft?: string; iconRight?: string; wrapper?: string; }>; export declare const EXPONENT_CHARACTER_LIST: readonly ["E", "e"]; export declare const INPUT_TYPES: Readonly<{ text: "text"; number: "number"; password: "password"; email: "email"; tel: "tel"; url: "url"; date: "date"; 'datetime-local': "datetime-local"; time: "time"; week: "week"; month: "month"; color: "color"; search: "search"; }>; export type InputType = (typeof INPUT_TYPES)[keyof typeof INPUT_TYPES]; export type InputOnChangeParamsType = { evt: React.ChangeEvent<HTMLInputElement>; isEnter?: boolean; }; export type InputProps = { value?: string; onChange?: (evt: React.ChangeEvent<HTMLInputElement>, isEnter?: boolean) => unknown; classNames?: ClassNames; onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown; onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown; onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => unknown; onPaste?: (e: ClipboardEvent) => unknown; onIconRightClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined; onContainerClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined; name?: string; disabled?: boolean; placeholder?: string; locked?: boolean; error?: boolean; errorText?: string; label?: string | React.ReactNode; helperText?: string | React.ReactNode; type?: InputType; size?: 'medium' | 'small'; iconLeftName?: string; iconLeftType?: IconType; iconRightName?: string; iconRightType?: IconType; required?: boolean; readOnly?: boolean; boxRef?: (arg1?: HTMLElement | null | undefined) => unknown; minLength?: string; maxLength?: string; pattern?: string; min?: string; max?: string; autoComplete?: string; disallowExponents?: boolean; /** The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any. * Only values which are equal to the basis for stepping (min if specified, value otherwise, and an * appropriate default value if neither of those is provided) are valid. */ step?: string; hideNumberSpinner?: boolean; hidePasswordToggleIcon?: boolean; }; export declare const Input: Flow.AbstractComponent<InputProps, HTMLInputElement>; export {}; //# sourceMappingURL=Input.d.ts.map