import React from 'react'; import PropTypes from 'prop-types'; import { DateGridChangeHandler } from './DateGrid'; import { ComponentProps } from '../utils/types'; type CalendarChangeHandler = DateGridChangeHandler; declare const calendarActiveSelector = "[data-active-day=\"true\"]"; interface CalendarPropsBase { /** * The id of the description. When placed in a ControlGroup, this automatically set to the * ControlGroup's help component. */ describedBy?: string; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** Highlight today's day. */ highlightToday?: boolean; /** * The id of the label. When placed in a ControlGroup, this automatically set to the * ControlGroup's label. */ labelledBy?: string; /** Locale set by language and localization specifiers. */ locale?: string; /** * Overrides the current date, used in HighlightToday story. * @private */ mockDate?: string; /** * Called when a date is selected from the Calendar. */ onChange?: CalendarChangeHandler; /** @private. */ required?: boolean; /** * The current date value formatted 'YYYY-MM-DD'. */ value?: string; } type CalendarProps = ComponentProps; /** * Place focus on the active day. */ declare const focusActiveDay: (calendar: HTMLDivElement | null | undefined) => void; declare function Calendar({ describedBy, elementRef, highlightToday, labelledBy, locale, mockDate, onChange, required, value: valueProp, ...otherProps }: CalendarProps): React.JSX.Element; declare namespace Calendar { var propTypes: { describedBy: PropTypes.Requireable; highlightToday: PropTypes.Requireable; labelledBy: PropTypes.Requireable; locale: PropTypes.Requireable; mockDate: PropTypes.Requireable; onChange: PropTypes.Requireable<(...args: any[]) => any>; /** @private. */ required: PropTypes.Requireable; value: PropTypes.Requireable; elementRef: PropTypes.Requireable; }; } export default Calendar; export { CalendarChangeHandler, calendarActiveSelector, focusActiveDay };