import { PureComponent, KeyboardEvent } from 'react'; import type { DateChangeMeta, DisabledRules, OnDateSelectParams } from '../Calendar/Calendar.types'; import { Size, MonthFormat, type SizeSmall, type SizeMedium, type SizeLarge } from '../common'; import { WithInputAttributesProps } from '../Inputs/contexts'; export interface DateLookupProps { /** The currently selected date, or `null` for no selection. */ value: Date | null; /** Called when an enabled date is confirmed. Receives `null` when the value is cleared. */ onChange: (date: Date | null) => void; /** HTML `id` applied to the trigger button, used for label association. */ id?: string; /** Earliest selectable date (inclusive). Dates before this are interactive but not selectable, and show a boundary prompt. */ min?: Date | null; /** Latest selectable date (inclusive). Dates after this are interactive but not selectable, and show a boundary prompt. */ max?: Date | null; /** Size of the trigger input. Defaults to `'md'`. */ size?: SizeSmall | SizeMedium | SizeLarge; /** Label text rendered above the trigger input. */ label?: string; /** ID of an external element that labels the trigger, for use inside custom label contexts. */ 'aria-labelledby'?: string; /** Placeholder text shown in the trigger when no date is selected. */ placeholder?: string; /** Month name format in the calendar header. Defaults to `'long'` (e.g. "January"). */ monthFormat?: `${MonthFormat}`; /** When `true`, the trigger and calendar are non-interactive. */ disabled?: boolean; /** When `true`, a clear button is shown in the trigger to reset the value to `null`. */ clearable?: boolean; /** Rules for disabling specific weekdays, individual dates, or date ranges. The required `reason` is shown in an inline prompt and linked to disabled cells via `aria-describedby` for screen reader accessibility. */ disabledRules?: DisabledRules; /** Called whenever any date is focused or clicked, including disabled and out-of-range dates. `isEnabled` is `false` when the date is not selectable. */ onDateSelect?: (params: OnDateSelectParams) => void; /** Called when the calendar panel opens. */ onFocus?: () => void; /** Called when the calendar panel closes. */ onBlur?: () => void; } type DateLookupPropsWithInputAttributes = DateLookupProps & Partial; interface DateLookupState { originalDate: Date | null; open: boolean; } declare class DateLookup extends PureComponent { props: DateLookupPropsWithInputAttributes & Required>; static defaultProps: { value: null; min: null; max: null; size: Size.MEDIUM; placeholder: string; label: string; monthFormat: MonthFormat.LONG; disabled: false; clearable: false; }; element: import("react").RefObject; constructor(props: DateLookup['props']); componentDidUpdate(previousProps: DateLookupPropsWithInputAttributes): void; open: () => void; discard: () => void; close: () => void; handleKeyDown: (event: KeyboardEvent) => void; focusOn: (preferredElement: string, fallbackElement?: string) => void; handleDateChange: (date: Date | null, meta: DateChangeMeta) => void; handleDateSelect: (date: Date | null) => void; getCalendar: () => import("react").JSX.Element; handleClear: () => void; render(): import("react").JSX.Element; } export declare const DateLookupWithoutInputAttributes: typeof DateLookup; declare const WrappedDateLookup: { (props: Omit): import("react").JSX.Element; displayName: string; }; export default WrappedDateLookup; //# sourceMappingURL=DateLookup.d.ts.map