import { type DOMRef } from '@react-types/shared'; import { type ItemKey, type SectionElement, type ItemElement } from '../utils'; import type { PickerPropsT } from './PickerProps'; /** Props that are derived by `usePickerProps`. */ export type UsePickerDerivedProps = { children: (SectionElement | ItemElement)[]; defaultSelectedKey?: ItemKey | undefined; ref: DOMRef; selectedKey?: ItemKey | null | undefined; onOpenChange: (isOpen: boolean) => void; onSelectionChange: ((key: ItemKey | null) => void) | undefined; }; /** * Props that are passed through untouched. (should exclude all of the * destructured props passed into `usePickerProps` that are not in the spread * ...props) ) */ export type UsePickerPassthroughProps = Omit, 'children' | 'defaultSelectedKey' | 'selectedKey' | 'tooltip' | 'onChange' | 'onOpenChange' | 'onScroll' | 'onSelectionChange'>; /** Props returned from `usePickerProps` hook. */ export type UsePickerProps = UsePickerDerivedProps & UsePickerPassthroughProps; /** * Derive props for Picker components (e.g. Picker and ComboBox). Specifically * handles wrapping children items and initial scroll position when the picker * is opened. */ export declare function usePickerProps({ children, defaultSelectedKey, selectedKey, tooltip, onChange: onChangeHandler, onOpenChange: onOpenChangeHandler, onScroll, onSelectionChange: onSelectionChangeHandler, ...props }: PickerPropsT): UsePickerProps; export default usePickerProps; //# sourceMappingURL=usePickerProps.d.ts.map