@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
16 lines (15 loc) • 771 B
TypeScript
import { PropTypes } from '@zag-js/vue';
import { ComputedRef, MaybeRef } from 'vue';
import { EmitFn, Optional } from '../../types';
import { CollectionItem } from '../collection';
import { RootEmits } from './combobox';
import * as combobox from '@zag-js/combobox';
export interface UseComboboxProps<T extends CollectionItem> extends Optional<Omit<combobox.Props<T>, 'dir' | 'getRootNode'>, 'id'> {
/**
* The v-model value of the combobox
*/
modelValue?: combobox.Props<T>['value'];
}
export interface UseComboboxReturn<T extends CollectionItem> extends ComputedRef<combobox.Api<PropTypes, T>> {
}
export declare const useCombobox: <T extends CollectionItem>(props: MaybeRef<UseComboboxProps<T>>, emit?: EmitFn<RootEmits<T>>) => UseComboboxReturn<T>;