import type { DateFrameworkType, Timezone } from "@salt-ds/date-adapters"; import { type ReactNode } from "react"; import { type DatePickerOpenChangeReason } from "./DatePickerOverlayProvider"; import { type UseDatePickerRangeProps, type UseDatePickerSingleProps } from "./useDatePicker"; /** * Base props for DatePicker. */ export interface DatePickerBaseProps { className?: string; children?: ReactNode; /** the open/close state of the overlay. The open/close state will be controlled when this prop is provided. */ open?: boolean; /** When `open` is uncontrolled, set this to `true` to open on click */ openOnClick?: boolean; /** * Handler for when open state changes * @param newOpen - true when opened * @param reason - reason for the the state change */ onOpenChange?: (newOpen: boolean, reason?: DatePickerOpenChangeReason) => void; /** * the initial open/close state of the overlay, when the open/close state is un-controlled. */ defaultOpen?: DatePickerBaseProps["open"]; /** * Specifies the timezone behavior: * - If undefined, the timezone will be derived from the passed date, or from `defaultSelectedDate`/`selectedDate`. * - If set to "default", the default timezone of the date library will be used. * - If set to "system", the local system's timezone will be applied. * - If set to "UTC", the time will be returned in UTC. * - If set to a valid IANA timezone identifier, the time will be returned for that specific timezone. */ timezone?: Timezone; } /** * Props for the DatePicker component, when `selectionVariant` is `single`. * @template TDate - The type of the date object. */ export interface DatePickerSingleProps extends DatePickerBaseProps, UseDatePickerSingleProps { selectionVariant: "single"; } /** * Props for the DatePicker component, when `selectionVariant` is `range`. * @template TDate - The type of the date object. */ export interface DatePickerRangeProps extends DatePickerBaseProps, UseDatePickerRangeProps { selectionVariant: "range"; } /** * Props for the DatePicker component. * @template TDate - The type of the date object. */ export type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps; export declare const DatePickerMain: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DatePicker: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;