/** * DatePicker: a button that opens a {@link Popover} holding a {@link Calendar}; * picking a day sets the value and closes the surface. Composition-only: all * overlay behaviour (portal into the token scope, positioning, outside-click / * `Escape` dismiss) is reused from Popover, and the month grid is the shared * Calendar: nothing is re-implemented here. Both the selected `value` and the * `open` state support controlled and uncontrolled use; the parts share * value/open/format through context. Skinned with the veryfront theme tokens. * * @example * ```tsx * import { DatePicker, DatePickerContent, DatePickerTrigger } from "veryfront/ui"; * * function Example() { * const [date, setDate] = React.useState(); * return ( * * * * * ); * } * ``` * * @module react/components/ui/date-picker */ import * as React from "react"; /** Props accepted by ``. */ export interface DatePickerProps { /** The trigger and content parts to compose. */ children: React.ReactNode; /** Controlled selected day (pair with `onChange`). @default undefined */ value?: Date; /** Initial selected day when uncontrolled. @default undefined */ defaultValue?: Date; /** Fires with the picked day. @default undefined */ onChange?: (date: Date) => void; /** Controlled open state (pair with `onOpenChange`). @default undefined */ open?: boolean; /** Initial open state when uncontrolled. @default false */ defaultOpen?: boolean; /** Fires when the popover open state changes. @default undefined */ onOpenChange?: (open: boolean) => void; /** Trigger label shown when no value is selected. @default "Pick a date" */ placeholder?: string; /** Formats the selected day into the trigger's label. @default (d) => d.toLocaleDateString() */ format?: (date: Date) => string; /** Month the calendar shows initially; moved internally by its prev/next buttons. @default value ?? today */ defaultMonth?: Date; } /** Root: owns `{ value, open }`, provides context, and renders the Popover. */ export declare function DatePicker({ children, value, defaultValue, onChange, open, defaultOpen, onOpenChange, placeholder, format, defaultMonth, }: DatePickerProps): React.ReactElement; /** Props accepted by ``. */ export interface DatePickerTriggerProps extends Omit, "children"> { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The field-styled button that shows the formatted value (or placeholder) and opens the popover. */ export declare function DatePickerTrigger({ className, ref, ...props }: DatePickerTriggerProps): React.ReactElement; /** Props accepted by ``. */ export interface DatePickerContentProps extends React.HTMLAttributes { /** Horizontal alignment of the surface relative to the trigger. @default "start" */ align?: "start" | "end"; /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The Popover surface wrapping the {@link Calendar}; picking a day commits it and closes. */ export declare function DatePickerContent({ className, align, ref, ...props }: DatePickerContentProps): React.ReactElement; //# sourceMappingURL=date-picker.d.ts.map