import { Popover } from 'reka-ui/namespaced'; import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverContentEmits, PopoverArrowProps, HoverCardTriggerProps } from 'reka-ui'; import type { VNode } from 'vue'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/popover'; import type { EmitsToProps } from '../types/utils'; import type { ComponentConfig } from '../types/tv'; type Popover = ComponentConfig; type PopoverMode = 'click' | 'hover'; export interface PopoverProps extends PopoverRootProps, Pick { /** * The display mode of the popover. * @defaultValue 'click' */ mode?: M; /** * The content of the popover. * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 } */ content?: Omit & Partial>; /** * Display an arrow alongside the popover. * @defaultValue false */ arrow?: boolean | Omit; /** * Render the popover in a portal. * @defaultValue true */ portal?: boolean | string | HTMLElement; /** * The reference (or anchor) element that is being referred to for positioning. * * If not provided will use the current component as anchor. */ reference?: HoverCardTriggerProps['reference']; /** * When `false`, the popover will not close when clicking outside or pressing escape. * @defaultValue true */ dismissible?: boolean; class?: any; b24ui?: Popover['slots']; } export interface PopoverEmits extends PopoverRootEmits { 'close:prevent': []; } type SlotProps = [M] extends ['hover'] ? { close: undefined; } : { close: () => void; }; export interface PopoverSlots { default?(props: { open: boolean; }): VNode[]; content?(props: SlotProps): VNode[]; anchor?(props: SlotProps): VNode[]; } declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal & { "onUpdate:open"?: ((value: boolean) => any) | undefined; "onClose:prevent"?: (() => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: PopoverSlots; emit: ((evt: "update:open", value: boolean) => void) & ((evt: "close:prevent") => void); }>) => import("vue").VNode & { __ctx?: Awaited; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};