import { type ResponsiveProp } from "@salt-ds/core"; import type { DateFrameworkType } from "@salt-ds/date-adapters"; import { type ComponentPropsWithoutRef, type SyntheticEvent } from "react"; import { type CalendarGridProps, type CalendarNavigationProps, type CalendarSingleProps, type SingleDateSelection } from "../calendar"; /** * Base props for the DatePickerPanel grid components. * @template TDate - The type of the date object. */ export interface DatePickerPanelBaseProps extends ComponentPropsWithoutRef<"div"> { /** * Helper text to be displayed below the date picker. */ helperText?: string; /** * The visible month for the first visible calendar */ visibleMonth?: TDate; /** * Number of columns. */ columns?: ResponsiveProp; /** * Number of visible months, maximum 12, defaults to 1 */ numberOfVisibleMonths?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>; /** * The default visible month. */ defaultVisibleMonth?: TDate; /** * Callback fired when the visible month changes. * @param event - The synthetic event or null if triggered by code. * @param visibleMonth - The new visible month. */ onVisibleMonthChange?: (event: SyntheticEvent | null, visibleMonth: TDate) => void; /** * Callback fired when the focused date changes. * @param event - The synthetic event or null if triggered by code. * @param focusedDate - The new hovered date. */ onFocusedDateChange?: (event: SyntheticEvent | null, focusedDate?: TDate | null) => void; /** * Callback fired when the hovered date changes. * @param event - The synthetic event. * @param hoveredDate - The new hovered date. */ onHoveredDateChange?: (event: SyntheticEvent, hoveredDate?: TDate | null) => void; /** * Props to be passed to the CalendarNavigation component. */ CalendarNavigationProps?: Partial>; /** * Props to be passed to the CalendarGrid component. */ CalendarGridProps?: Partial>; } export type DatePickerSingleGridPanelProps = DatePickerPanelBaseProps & SingleDateSelection & { onSelectionChange?: (event: SyntheticEvent, selectedDate?: TDate | null) => void; CalendarProps?: Partial, "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onSelectionChange" | "onVisibleMonthChange">>; }; export declare const DatePickerSingleGridPanel: import("react").ForwardRefExoticComponent & { onSelectionChange?: ((event: SyntheticEvent, selectedDate?: unknown) => void) | undefined; CalendarProps?: Partial, "onSelectionChange" | "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onVisibleMonthChange">> | undefined; } & import("react").RefAttributes>;