import React from 'react'; import { Locale } from 'date-fns'; import { InputProps } from '../Input'; import { MonthpickerLocalizationProps } from './localization'; import { OnChangeHandler, Pretty } from '../Utils'; import { CalendarTestId } from '../Calendar/Calendar'; export declare const defaultMonthpickerTestId: MonthPickerTestId; export interface MonthPickerTestId { postfixIcon?: string; calendarBox?: string; calendar?: CalendarTestId; } export interface MonthpickerProps extends Omit, MonthpickerLocalizationProps { value?: Date; /** * Отображение календаря */ isCalendarOpen?: boolean; /** * Календарь всегда открыт */ isCalendarAlwaysOpen?: boolean; /** * Ref для calendar */ calendarBoxRef?: React.MutableRefObject; onChange?: OnChangeHandler | React.KeyboardEvent | null, { month: string; name?: string; }>; onBlur?: (event: React.FocusEvent, data: { value?: string; date?: Date; name?: string; }) => void; /** * Локаль календаря */ locale?: Locale; dropdownPortal?: HTMLElement | React.MutableRefObject | null; /** Ref, принимающий функции для внешнего обновления стейта */ controlsRef?: React.MutableRefObject; testId?: MonthPickerTestId; } export type MonthpickerControlRef = { updateValue: (date: Date) => void; } | undefined; export declare namespace Monthpicker { type OnChange = Pretty.Func | React.KeyboardEvent | null, { month: string; name?: string; }>>; type TestId = Pretty.fy; } export declare function Monthpicker({ isCalendarOpen, isCalendarAlwaysOpen, name, size, value, onChange, onFocus, onBlur, onKeyPress, localization, locale, dropdownPortal, controlsRef, calendarBoxRef, testId, ...attrs }: MonthpickerProps): React.JSX.Element; export declare namespace Monthpicker { var displayName: string; }