import React, { ElementType } from 'react'; import { ComboboxInputProps } from '@headlessui/react'; import { ByComparator } from '@headlessui/react/dist/types'; export type TOptionItem = { label: string; value: any; disabled?: boolean; } & Record; type TMultiple = { value?: TOptionItem[]; onChange?: (e: TOptionItem[]) => void; }; type TSingle = { value?: TOptionItem | null; onChange?: (e: TOptionItem) => void; }; interface IComboboxKitProps { options?: TOptionItem[]; className?: string; label?: React.ReactNode; placeholder?: string; disabled?: boolean; renderOption?: (arg: { selected: boolean; active: boolean; }, option: TOptionItem) => React.ReactNode; query?: string; setQuery?: React.Dispatch>; inlineLabel?: boolean; id?: string; classes?: Partial>; loading?: boolean; error?: boolean; helperText?: React.ReactNode; onBlur?: ComboboxInputProps['onBlur']; helperTextNextLine?: boolean; by?: ByComparator; name: string; defaultValue?: string; renderSelectedOnEmpty?: boolean; } type TProps = IComboboxKitProps & ((TSingle & { multiple?: false; }) | (TMultiple & { multiple?: true; })); declare const ComboboxKit: React.FC; export default ComboboxKit; export type { TOptionItem as TComboboxOption, TProps as ComboboxKitProps }; //# sourceMappingURL=index.d.ts.map