UNPKG

@wix/design-system

Version:

@wix/design-system

106 lines 8.06 kB
import React from 'react'; import PropTypes from 'prop-types'; import { SupportedWixLocales } from 'wix-design-systems-locale-utils'; import { WixStyleReactEnvironmentContext } from '../../WixStyleReactEnvironmentProvider/context'; import { DateInputProps } from './DateInput.types'; type ValidationType = 'valid' | 'formatError' | 'outOfBoundsError'; type DateInputState = { validationType: ValidationType; inputValue: string; statusMessage?: string; }; declare class DateInput extends React.PureComponent<DateInputProps, DateInputState> { static displayName: string; static contextType: React.Context<import("../..").WixStyleReactEnvironmentProviderProps>; context: React.ContextType<typeof WixStyleReactEnvironmentContext>; static propTypes: { value: PropTypes.Requireable<NonNullable<string | object | null | undefined>>; locale: PropTypes.Requireable<"th" | "tr" | "ms" | "id" | "no" | "en" | "en-US" | "en-GB" | "en-AU" | "en-CA" | "ar" | "bg" | "ca" | "zh" | "zh-TW" | "zh-HK" | "zh-MO" | "cs" | "da" | "nl" | "fi" | "fr" | "fr-CA" | "fr-CH" | "fr-BE" | "de" | "de-CH" | "de-AT" | "el" | "he" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "nb" | "nn" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "es" | "es-419" | "es-AR" | "es-MX" | "es-US" | "sv" | "tl" | "uk" | "vi">; dateStyle: PropTypes.Requireable<string>; validate: PropTypes.Requireable<boolean>; onValidate: PropTypes.Requireable<(...args: any[]) => any>; excludePastDates: PropTypes.Requireable<boolean>; clearButtonTooltipContent: PropTypes.Requireable<PropTypes.ReactNodeLike>; clearButtonTooltipProps: PropTypes.Requireable<PropTypes.ReactNodeLike>; focusOnClearClick: PropTypes.Requireable<boolean>; children?: React.Validator<React.ReactNode> | undefined; dataHook?: React.Validator<string | null | undefined> | undefined; className?: React.Validator<string | null | undefined> | undefined; id?: React.Validator<string | null | undefined> | undefined; role?: React.Validator<string | null | undefined> | undefined; ariaControls?: React.Validator<string | null | undefined> | undefined; ariaDescribedby?: React.Validator<string | null | undefined> | undefined; ariaLabel?: React.Validator<string | null | undefined> | undefined; autoFocus?: React.Validator<boolean | null | undefined> | undefined; autoSelect?: React.Validator<boolean | null | undefined> | undefined; autocomplete?: React.Validator<string | null | undefined> | undefined; defaultValue?: React.Validator<import("../../Input").InputValue | null> | undefined; disabled?: React.Validator<boolean | null | undefined> | undefined; status?: React.Validator<import("../../Input").InputStatus | null | undefined> | undefined; statusMessage?: React.Validator<React.ReactNode> | undefined; statusMessageTooltipProps?: React.Validator<import("../..").TooltipCommonProps | null | undefined> | undefined; hideStatusSuffix?: React.Validator<boolean | null | undefined> | undefined; forceFocus?: React.Validator<boolean | null | undefined> | undefined; forceHover?: React.Validator<boolean | null | undefined> | undefined; maxLength?: React.Validator<number | null | undefined> | undefined; menuArrow?: React.Validator<boolean | null | undefined> | undefined; clearButton?: React.Validator<boolean | null | undefined> | undefined; name?: React.Validator<string | null | undefined> | undefined; border?: React.Validator<"none" | "round" | "standard" | "bottomLine" | null | undefined> | undefined; noLeftBorderRadius?: React.Validator<boolean | null | undefined> | undefined; noRightBorderRadius?: React.Validator<boolean | null | undefined> | undefined; onBlur?: React.Validator<React.FocusEventHandler<HTMLInputElement> | null | undefined> | undefined; onChange?: React.Validator<React.ChangeEventHandler<HTMLInputElement> | null | undefined> | undefined; onClear?: React.Validator<((event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void) | null | undefined> | undefined; onCompositionChange?: React.Validator<((isComposing: boolean) => void) | null | undefined> | undefined; onEnterPressed?: React.Validator<React.KeyboardEventHandler<HTMLInputElement> | null | undefined> | undefined; onEscapePressed?: React.Validator<React.KeyboardEventHandler<HTMLInputElement> | null | undefined> | undefined; onFocus?: React.Validator<React.FocusEventHandler<HTMLInputElement> | null | undefined> | undefined; onInputClicked?: React.Validator<React.MouseEventHandler<HTMLDivElement | HTMLInputElement> | null | undefined> | undefined; onKeyDown?: React.Validator<React.KeyboardEventHandler<HTMLInputElement> | null | undefined> | undefined; onKeyUp?: React.Validator<React.KeyboardEventHandler<HTMLInputElement> | null | undefined> | undefined; onPaste?: React.Validator<React.ClipboardEventHandler<HTMLInputElement> | null | undefined> | undefined; onCopy?: React.Validator<React.ClipboardEventHandler<HTMLInputElement> | null | undefined> | undefined; placeholder?: React.Validator<string | null | undefined> | undefined; prefix?: React.Validator<React.ReactNode> | undefined; readOnly?: React.Validator<boolean | null | undefined> | undefined; disableEditing?: React.Validator<boolean | null | undefined> | undefined; rtl?: React.Validator<boolean | null | undefined> | undefined; size?: React.Validator<import("../../Input").InputSize | null | undefined> | undefined; suffix?: React.Validator<React.ReactNode> | undefined; tabIndex?: React.Validator<number | null | undefined> | undefined; textOverflow?: React.Validator<"clip" | "ellipsis" | null | undefined> | undefined; tooltipPlacement?: React.Validator<import("popper.js").default.Placement | null | undefined> | undefined; type?: React.Validator<string | null | undefined> | undefined; withSelection?: React.Validator<boolean | null | undefined> | undefined; required?: React.Validator<boolean | null | undefined> | undefined; min?: React.Validator<import("../../Input").MinValue | null> | undefined; max?: React.Validator<import("../../Input").MaxValue | null> | undefined; step?: React.Validator<number | null | undefined> | undefined; customInput?: React.Validator<Function | React.ReactNode> | undefined; pattern?: React.Validator<string | null | undefined> | undefined; inputRef?: React.Validator<((input: HTMLInputElement) => void) | null | undefined> | undefined; inputmode?: React.Validator<string | null | undefined> | undefined; ariaRoledescription?: React.Validator<string | null | undefined> | undefined; clearButtonAriaLabel?: React.Validator<string | null | undefined> | undefined; inputElementRef?: React.Validator<any> | undefined; ref?: React.Validator<React.LegacyRef<import("../../Input").InputImperativeActions> | undefined> | undefined; key?: React.Validator<React.Key | null | undefined> | undefined; }; constructor(props: DateInputProps); componentDidMount(): void; componentDidUpdate(prevProps: DateInputProps): void; _getFormattedDate: (value?: Date | string) => string; _handleBlur: () => void; _handleChange: (event: React.ChangeEvent<HTMLInputElement>) => void; _handleValidation: (date: { parsedDate?: Date | null; dateFormat: string; }) => void; _handleClear: (event: React.MouseEvent<HTMLButtonElement>) => void; _handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void; _getLocale(): SupportedWixLocales; render(): React.FunctionComponentElement<any>; } export default DateInput; //# sourceMappingURL=DateInput.d.ts.map