import * as React from 'react'; import { ChangeEvent, CSSProperties, HTMLProps, KeyboardEvent } from 'react'; import '../TS_Input/TS_Input.scss'; import { UIProps_EditableItem } from '../../utils/EditableItem.js'; import { ComponentProps_Error } from '../types.js'; import { TS_Object } from '@nu-art/ts-common'; type MetaKeys = 'shiftKey' | 'altKey' | 'ctrlKey' | 'metaKey'; type InputState = { id?: string; name?: string; initialValue?: string; value?: string; focused?: boolean; }; export type InputType = 'text' | 'number' | 'password' | 'time'; type TypeProps_TS_Input = { type: InputType; }; type BaseInfraProps_TS_InputV2 = { saveEvent?: ('blur' | 'accept' | 'change')[]; forceAcceptKeys?: MetaKeys[]; className?: string; style?: CSSProperties; trim?: boolean; autoComplete?: string; spellCheck?: boolean; }; type BaseAppLevelProps_TS_InputV2 = ComponentProps_Error & Omit, 'onChange' | 'onBlur' | 'ref'> & BaseInfraProps_TS_InputV2 & { id?: string; placeholder?: string; name?: string; focus?: boolean; innerRef?: React.RefObject; onCancel?: () => void; }; export type TemplatingProps_TS_InputV2 = TypeProps_TS_Input & BaseInfraProps_TS_InputV2; export type Props_TS_InputV2 = BaseAppLevelProps_TS_InputV2 & TypeProps_TS_Input & { value?: string; onChange?: (value: string, id: string) => void; onAccept?: (value: string, event: KeyboardEvent) => Promise | any; onBlur?: (value: string, event: React.FocusEvent) => void; allowAccept?: boolean; }; export type NativeProps_TS_InputV2 = Props_TS_InputV2; export type EditableItemProps_TS_InputV2 = Omit & { value?: ValueType; } & UIProps_EditableItem & { onChange?: (value: ValueType) => Promise | any; }; /** * A better way to capture user input * * * * * */ export declare class TS_InputV2 extends React.Component { static readonly editableString: (templateProps: TemplatingProps_TS_InputV2) => (props: NativeProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableTimeOptional: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableTime: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly _editableTime: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableNumberOptional: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableNumber: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly _editableNumber: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableOptional: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editableArray: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly editable: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static readonly _editable: (templateProps: TemplatingProps_TS_InputV2) => (props: EditableItemProps_TS_InputV2) => import("react/jsx-runtime").JSX.Element; static defaultProps: { forceAcceptKeys: MetaKeys[]; saveEvent: string[]; }; inputRef: React.RefObject; constructor(props: Props_TS_InputV2); static getDerivedStateFromProps(props: Props_TS_InputV2, state: InputState): { id: string | undefined; name: string | undefined; initialValue: string | (readonly string[] & string) | undefined; value: string; } | { value: string | undefined; focused: boolean | undefined; }; private static getInitialState; changeValue: (event: ChangeEvent) => void; onKeyDown: (ev: KeyboardEvent) => Promise; componentDidMount(): void; render(): import("react/jsx-runtime").JSX.Element; } export {};