import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuContentEmits, DropdownMenuArrowProps } from 'reka-ui'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/ui/dropdown-menu'; import type { AvatarProps, KbdProps, LinkProps } from '../types'; import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils'; type DropdownMenu = ComponentConfig; export interface DropdownMenuItem extends Omit { label?: string; /** * @IconifyIcon */ icon?: string; color?: DropdownMenu['variants']['color']; avatar?: AvatarProps; content?: Omit & Partial>; kbds?: KbdProps['value'][] | KbdProps[]; /** * The item type. * @defaultValue 'link' */ type?: 'label' | 'separator' | 'link' | 'checkbox'; slot?: string; loading?: boolean; disabled?: boolean; checked?: boolean; open?: boolean; defaultOpen?: boolean; children?: ArrayOrNested; onSelect?(e: Event): void; onUpdateChecked?(checked: boolean): void; class?: any; ui?: Pick; [key: string]: any; } export interface DropdownMenuProps = ArrayOrNested> extends Omit { /** * @defaultValue 'md' */ size?: DropdownMenu['variants']['size']; items?: T; /** * The icon displayed when an item is checked. * @defaultValue appConfig.ui.icons.check * @IconifyIcon */ checkedIcon?: string; /** * The icon displayed when an item is loading. * @defaultValue appConfig.ui.icons.loading * @IconifyIcon */ loadingIcon?: string; /** * The icon displayed when the item is an external link. * Set to `false` to hide the external icon. * @defaultValue appConfig.ui.icons.external * @IconifyIcon */ externalIcon?: boolean | string; /** * The content of the menu. * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 } */ content?: Omit & Partial>; /** * Display an arrow alongside the menu. * @defaultValue false */ arrow?: boolean | Omit; /** * Render the menu in a portal. * @defaultValue true */ portal?: boolean | string | HTMLElement; /** * The key used to get the label from the item. * @defaultValue 'label' */ labelKey?: keyof NestedItem; disabled?: boolean; class?: any; ui?: DropdownMenu['slots']; } export interface DropdownMenuEmits extends DropdownMenuRootEmits { } type SlotProps = (props: { item: T; active?: boolean; index: number; }) => any; export type DropdownMenuSlots = ArrayOrNested, T extends NestedItem = NestedItem> = { 'default'(props: { open: boolean; }): any; 'item': SlotProps; 'item-leading': SlotProps; 'item-label': SlotProps; 'item-trailing': SlotProps; 'content-top': (props?: {}) => any; 'content-bottom': (props?: {}) => any; } & DynamicSlots, 'leading' | 'label' | 'trailing', { active?: boolean; index: number; }>; declare const _default: >(__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal & Omit<{ readonly "onUpdate:open"?: ((payload: boolean) => any) | undefined; } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open"> & DropdownMenuProps & Partial<{}>> & import("vue").PublicProps; expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; slots: DropdownMenuSlots>; emit: (evt: "update:open", payload: boolean) => void; }>) => import("vue").VNode & { __ctx?: Awaited; }; export default _default; type __VLS_PrettifyLocal = { [K in keyof T]: T[K]; } & {};