import type { StyleProp, ViewStyle } from 'react-native'; import type { SizeProp } from '../../tokens/size'; import type { ColorProp, SxProps } from '../../types/shared'; export interface PickerBaseProps { testID?: string; style?: StyleProp; accessibilityLabel?: string; size?: SizeProp; color?: ColorProp; sx?: SxProps; } /** * Minimal date-adapter interface. The built-in IntlDateAdapter is used * when no dateAdapter prop is provided via LocalizationProvider. */ export interface DateAdapter { format(date: TDate, formatStr: string): string; parse(value: string, formatStr: string): TDate | null; isValid(value: TDate | null): boolean; isBefore(a: TDate, b: TDate): boolean; isAfter(a: TDate, b: TDate): boolean; } export interface LocalizationContextValue { locale: string; adapter: DateAdapter; formats: { fullDate: string; fullTime: string; fullDateTime: string; }; } export interface LocalizationProviderProps { children: React.ReactNode; locale?: string; dateAdapter?: DateAdapter; dateFormats?: { fullDate?: string; fullTime?: string; fullDateTime?: string; }; } export interface TextFieldSlotProps { placeholder?: string; error?: boolean; helperText?: string; style?: StyleProp; testID?: string; } export interface DatePickerProps extends PickerBaseProps { value?: Date | null; defaultValue?: Date | null; onChange?: (date: Date | null) => void; /** Fires only when the user confirms selection — not on each picker tick. */ onAccept?: (date: Date | null) => void; label?: string; placeholder?: string; disabled?: boolean; readOnly?: boolean; minDate?: Date; maxDate?: Date; disableFuture?: boolean; disablePast?: boolean; /** * @RN-DEVIATION Native OS date picker supports 'day' | 'month' | 'year' only. * default: ['day', 'month', 'year'] */ views?: Array<'day' | 'month' | 'year'>; /** Display format passed to the active DateAdapter. Overrides LocalizationProvider. */ format?: string; open?: boolean; onOpen?: () => void; onClose?: () => void; /** * @RN-DEVIATION iOS only. Controls native picker presentation style. * Ignored on Android (always uses the system dialog). * default: 'default' */ display?: 'default' | 'spinner' | 'compact' | 'inline'; slotProps?: { textField?: Partial; }; } export interface PickerValidationProps { minDate?: Date; maxDate?: Date; disableFuture?: boolean; disablePast?: boolean; } export type PickerSlots = { textField?: Partial; }; export type MaybeDate = Date | null | undefined; //# sourceMappingURL=types.d.ts.map