import { DateInputProps } from '../date-input/date-input.types'; import { DatePickerStateOptions } from 'react-stately'; import { DateValue } from 'react-aria'; import { HTMLChakraProps, SlotRecipeProps, UnstyledProp } from '@chakra-ui/react/styled-system'; import { OmitInternalProps } from '../../type-utils/omit-props'; type DatePickerRecipeProps = { /** * Size variant of the date picker * @default "md" */ size?: SlotRecipeProps<"nimbusDatePicker">["size"]; /** Visual style variant of the date picker */ variant?: SlotRecipeProps<"nimbusDatePicker">["variant"]; } & UnstyledProp; export type DatePickerRootSlotProps = Omit, "onChange" | "value" | "defaultValue">; type ConflictingPickerStateProps = keyof DatePickerStateOptions; type ExcludedProps = "validationState" | "label" | "description" | "errorMessage" | "css" | "colorScheme" | "unstyled" | "recipe" | "as" | "asChild" | "variant"; export type DatePickerProps = OmitInternalProps & Omit & Omit, ExcludedProps> & { /** * Whether the calendar popover should be open by default (uncontrolled). */ defaultOpen?: boolean; /** * Whether the calendar popover is open (controlled). */ isOpen?: boolean; /** * Handler that is called when the calendar popover's open state changes. */ onOpenChange?: (isOpen: boolean) => void; /** * Whether to hide the time zone information when using ZonedDateTime values. * This prop is forwarded to both the main date input and footer time input. */ hideTimeZone?: boolean; }; /** * Props for the DatePickerTimeInput component. */ export type DatePickerTimeInputProps = { hideTimeZone?: boolean; hourCycle?: 12 | 24; }; export {};