import { Breakpoint } from '@westpac/style-config/constants'; import { HTMLAttributes, FocusEvent } from 'react'; import { DateValue } from 'react-aria'; import { DatePickerStateOptions } from 'react-stately'; import { VariantProps } from 'tailwind-variants'; import { ResponsiveVariants } from 'src/types/responsive-variants.types.js'; import { styles } from './date-picker.styles.js'; type Variants = VariantProps; export type DatePickerProps = Omit, 'onBlur'> & Omit & Omit, 'invalid' | 'block' | 'onBlur'> & { /** * Determines whether to display the component as a bottom sheet view. * Can also accept an object to conditionally enable the bottom sheet based on breakpoints. */ bottomSheetView?: boolean | Partial>; /** * An array of numbers representing the days of the week to disable. * For example, to disable Monday, Wednesday, and Saturday: [0, 2, 5]. */ disableDaysOfWeek?: number[]; /** * If true, disables selection of weekend days (Saturday and Sunday). */ disableWeekends?: boolean; /** * Separator character used in the date field. Defaults to "/". */ separator?: string; /** * Custom onBlur that provides the regular event as the first parameter and the date value in the same format as onChange as the second. */ onBlur?: (event: FocusEvent, date?: T) => void; /** * Placement for the datepicker popover. * @default "bottom left" */ placement?: 'top left' | 'top right' | 'bottom left' | 'bottom right'; /** * portal container for date picker */ portalContainer?: Element; /** * size */ size?: ResponsiveVariants; /** * size */ block?: ResponsiveVariants; }; export {};