@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
54 lines (53 loc) • 4.12 kB
text/typescript
import { HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
import { Assign } from '../../types';
import { RenderStrategyProps } from '../../utils/use-render-strategy';
import { CollectionItem } from '../collection';
import { PolymorphicProps } from '../factory';
import { RootProps } from './combobox.types';
import { ValueChangeDetails, OpenChangeDetails, HighlightChangeDetails, InputValueChangeDetails } from '@zag-js/combobox';
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
export interface ComboboxRootBaseProps<T extends CollectionItem> extends RootProps<T>, RenderStrategyProps, PolymorphicProps {
}
export interface ComboboxRootProps<T extends CollectionItem> extends ComboboxRootBaseProps<T>,
/**
* @vue-ignore
*/
Omit<HTMLAttributes, 'onSelect'> {
}
export type ComboboxRootComponentProps<T extends CollectionItem = CollectionItem, P = {}> = Assign<ComboboxRootProps<T>, P>;
export type ComboboxRootComponent<P = {}> = <T extends CollectionItem>(props: ComboboxRootComponentProps<T, P>) => any;
export type { RootEmits as ComboboxRootEmits } from './combobox.types';
declare const _default: <T extends CollectionItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
readonly onSelect?: ((details: {
value: string[];
itemValue: string;
}) => any) | undefined;
readonly onValueChange?: ((details: ValueChangeDetails<T>) => any) | undefined;
readonly "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
readonly onOpenChange?: ((details: OpenChangeDetails) => any) | undefined;
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
readonly onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
readonly onInteractOutside?: ((event: InteractOutsideEvent) => any) | undefined;
readonly onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
readonly onHighlightChange?: ((details: HighlightChangeDetails<T>) => any) | undefined;
readonly onInputValueChange?: ((details: InputValueChangeDetails) => any) | undefined;
readonly "onUpdate:highlightedValue"?: ((value: string | null) => any) | undefined;
readonly "onUpdate:inputValue"?: ((value: string) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onSelect" | "onValueChange" | "onOpenChange" | "onUpdate:open" | "onUpdate:modelValue" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onHighlightChange" | "onInputValueChange" | "onUpdate:highlightedValue" | "onUpdate:inputValue"> & ComboboxRootProps<T> & Partial<{}>> & PublicProps;
expose(exposed: ShallowUnwrapRef<{}>): void;
attrs: any;
slots: {
default?(_: {}): any;
};
emit: ((evt: "select", details: {
value: string[];
itemValue: string;
}) => void) & ((evt: "valueChange", details: ValueChangeDetails<T>) => void) & ((evt: "update:modelValue", value: string[]) => void) & ((evt: "openChange", details: OpenChangeDetails) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: InteractOutsideEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "highlightChange", details: HighlightChangeDetails<T>) => void) & ((evt: "inputValueChange", details: InputValueChangeDetails) => void) & ((evt: "update:highlightedValue", value: string | null) => void) & ((evt: "update:inputValue", value: string) => void);
}>) => VNode & {
__ctx?: Awaited<typeof __VLS_setup>;
};
export default _default;
type __VLS_PrettifyLocal<T> = {
[K in keyof T]: T[K];
} & {};