import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/ui/navigation-menu'; import type { AvatarProps, BadgeProps, LinkProps, PopoverProps, TooltipProps } from '../types'; import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils'; type NavigationMenu = ComponentConfig; export interface NavigationMenuChildItem extends Omit { /** Description is only used when `orientation` is `horizontal`. */ description?: string; [key: string]: any; } export interface NavigationMenuItem extends Omit { label?: string; /** * @IconifyIcon */ icon?: string; avatar?: AvatarProps; /** * Display a badge on the item. * `{ size: 'sm', color: 'neutral', variant: 'outline' }`{lang="ts-type"} */ badge?: string | number | BadgeProps; /** * Display a tooltip on the item when the menu is collapsed with the label of the item. * This has priority over the global `tooltip` prop. */ tooltip?: boolean | TooltipProps; /** * Display a popover on the item when the menu is collapsed with the children list. * This has priority over the global `popover` prop. */ popover?: boolean | PopoverProps; /** * @IconifyIcon */ trailingIcon?: string; /** * The type of the item. * The `label` type is only displayed in `vertical` orientation. * The `trigger` type is used to force the item to be collapsible when its a link in `vertical` orientation. * @defaultValue 'link' */ type?: 'label' | 'trigger' | 'link'; slot?: string; /** * The value of the item. Avoid using `index` as the value to prevent conflicts in horizontal orientation with Reka UI. * @defaultValue `item-${index}` */ value?: string; children?: NavigationMenuChildItem[]; defaultOpen?: boolean; open?: boolean; onSelect?(e: Event): void; class?: any; ui?: Pick; [key: string]: any; } export interface NavigationMenuProps = ArrayOrNested> extends Pick, Pick { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; /** * The icon displayed to open the menu. * @defaultValue appConfig.ui.icons.chevronDown * @IconifyIcon */ trailingIcon?: 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; items?: T; /** * @defaultValue 'primary' */ color?: NavigationMenu['variants']['color']; /** * @defaultValue 'pill' */ variant?: NavigationMenu['variants']['variant']; /** * The orientation of the menu. * @defaultValue 'horizontal' */ orientation?: NavigationMenuRootProps['orientation']; /** * Collapse the navigation menu to only show icons. * Only works when `orientation` is `vertical`. * @defaultValue false */ collapsed?: boolean; /** * Display a tooltip on the items when the menu is collapsed with the label of the item. * `{ delayDuration: 0, content: { side: 'right' } }`{lang="ts-type"} * @defaultValue false */ tooltip?: boolean | TooltipProps; /** * Display a popover on the items when the menu is collapsed with the children list. * `{ mode: 'hover', content: { side: 'right', align: 'start', alignOffset: 2 } }`{lang="ts-type"} * @defaultValue false */ popover?: boolean | PopoverProps; /** Display a line next to the active item. */ highlight?: boolean; /** * @defaultValue 'primary' */ highlightColor?: NavigationMenu['variants']['highlightColor']; /** The content of the menu. */ content?: Omit & Partial>; /** * The orientation of the content. * Only works when `orientation` is `horizontal`. * @defaultValue 'horizontal' */ contentOrientation?: NavigationMenu['variants']['contentOrientation']; /** * Display an arrow alongside the menu. * @defaultValue false */ arrow?: boolean; /** * The key used to get the label from the item. * @defaultValue 'label' */ labelKey?: keyof NestedItem; class?: any; ui?: NavigationMenu['slots']; } export interface NavigationMenuEmits extends NavigationMenuRootEmits { } type SlotProps = (props: { item: T; index: number; active?: boolean; }) => any; export type NavigationMenuSlots = ArrayOrNested, T extends NestedItem = NestedItem> = { 'item': SlotProps; 'item-leading': SlotProps; 'item-label': SlotProps; 'item-trailing': SlotProps; 'item-content': SlotProps; 'list-leading': (props?: {}) => any; 'list-trailing': (props?: {}) => any; } & DynamicSlots, 'leading' | 'label' | 'trailing' | 'content', { index: number; active?: boolean; }>; 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:modelValue"?: ((value: string) => any) | undefined; } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps & Partial<{}>> & import("vue").PublicProps; expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; slots: NavigationMenuSlots>; emit: (evt: "update:modelValue", value: string) => void; }>) => import("vue").VNode & { __ctx?: Awaited; }; export default _default; type __VLS_PrettifyLocal = { [K in keyof T]: T[K]; } & {};