UNPKG

@papernote/ui

Version:

A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive

71 lines 1.95 kB
export interface DateRange { start: Date | null; end: Date | null; } export interface DateRangePickerHandle { focus: () => void; blur: () => void; open: () => void; close: () => void; } export interface DateRangePickerProps { /** Selected date range */ value?: DateRange; /** Change handler */ onChange?: (range: DateRange) => void; /** Input label */ label?: string; /** Placeholder text */ placeholder?: string; /** Minimum selectable date */ minDate?: Date; /** Maximum selectable date */ maxDate?: Date; /** Disabled dates function */ disabledDates?: (date: Date) => boolean; /** Locale for date formatting */ locale?: string; /** Date format */ format?: 'short' | 'medium' | 'long'; /** Validation state */ validationState?: 'error' | 'success' | 'warning' | null; /** Validation message */ validationMessage?: string; /** Helper text */ helperText?: string; /** Required field */ required?: boolean; /** Disabled state */ disabled?: boolean; /** Show quick preset buttons */ showPresets?: boolean; /** Custom className */ className?: string; /** Size variant */ size?: 'sm' | 'md' | 'lg'; } /** * DateRangePicker component - Select a date range with calendar UI. * * Features: * - Start and end date selection * - Visual range highlighting * - Quick preset ranges (Today, Last 7 days, etc.) * - Min/max date constraints * - Disabled dates * - Keyboard navigation * - Validation states * * @example * ```tsx * <DateRangePicker * label="Report Period" * value={dateRange} * onChange={setDateRange} * showPresets * /> * ``` */ declare const DateRangePicker: import("react").ForwardRefExoticComponent<DateRangePickerProps & import("react").RefAttributes<DateRangePickerHandle>>; export default DateRangePicker; //# sourceMappingURL=DateRangePicker.d.ts.map