UNPKG

@spaced-out/ui-design-system

Version:
82 lines 3.31 kB
import * as React from 'react'; import type { Flow } from 'flow-to-typescript-codemod'; import type { IconType } from '../../components/Icon'; type ClassNames = Readonly<{ box?: string; iconLeft?: string; iconRight?: string; wrapper?: string; prefixText?: string; rightSlotContent?: string; }>; export declare const EXPONENT_CHARACTER_LIST: string[]; 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 interface InputOnChangeParamsType { evt: React.ChangeEvent<HTMLInputElement>; isEnter?: boolean; } export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'classNames' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onPaste' | 'onIconRightClick' | 'onContainerClick' | 'name' | 'disabled' | 'placeholder' | 'locked' | 'error' | 'errorText' | 'label' | 'helperText' | 'type' | 'size' | 'iconLeftName' | 'iconLeftType' | 'iconRightName' | 'iconRightType' | 'required' | 'readOnly' | 'boxRef' | 'minLength' | 'maxLength' | 'pattern' | 'min' | 'max' | 'autoComplete' | 'disallowExponents' | 'step' | 'hideNumberSpinner' | 'hidePasswordToggleIcon'> { value?: string; onChange?: (evt: React.ChangeEvent<HTMLInputElement>, isEnter?: boolean) => unknown; classNames?: ClassNames; onFocus?: React.FocusEventHandler<HTMLInputElement>; onBlur?: React.FocusEventHandler<HTMLInputElement>; onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>; onPaste?: React.ClipboardEventHandler<HTMLInputElement>; onIconRightClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined; onContainerClick?: React.MouseEventHandler<HTMLDivElement>; name?: string; disabled?: boolean; placeholder?: string; locked?: boolean; error?: boolean; errorText?: string; label?: string | React.ReactNode; helperText?: string | React.ReactNode; rightSlot?: React.ReactNode; type?: InputType; size?: 'medium' | 'small'; iconLeftName?: string; iconLeftType?: IconType; iconRightName?: string; iconRightType?: IconType; required?: boolean; readOnly?: boolean; boxRef?: React.Ref<HTMLDivElement>; minLength?: number; maxLength?: number; 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; testId?: string; disableWheelPropagation?: boolean; prefix?: string; } export declare const Input: Flow.AbstractComponent<InputProps, HTMLInputElement>; export {}; //# sourceMappingURL=Input.d.ts.map