UNPKG

@hekeh/el-popover

Version:

A popover component extracted from element-plus

1,490 lines (1,472 loc) 196 kB
import * as vue from 'vue'; import { Ref, ComputedRef, CSSProperties, InjectionKey, PropType, ExtractPropTypes, StyleValue } from 'vue'; type OnCleanup = (cleanupFn: () => void) => void; declare const _default$6: vue.DefineComponent<vue.ExtractPropTypes<{ readonly arrowOffset: { readonly type: NumberConstructor; readonly default: 5; }; }>, { /** * @description Arrow element */ arrowRef: vue.Ref<HTMLElement | undefined, HTMLElement | undefined>; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{ readonly arrowOffset: { readonly type: NumberConstructor; readonly default: 5; }; }>> & Readonly<{}>, { readonly arrowOffset: number; }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>; declare const top: "top"; declare const bottom: "bottom"; declare const right: "right"; declare const left: "left"; declare type BasePlacement = typeof top | typeof bottom | typeof right | typeof left; declare type VariationPlacement = "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end"; declare type AutoPlacement = "auto" | "auto-start" | "auto-end"; declare type Placement = AutoPlacement | BasePlacement | VariationPlacement; declare const beforeRead: "beforeRead"; declare const read: "read"; declare const afterRead: "afterRead"; declare const beforeMain: "beforeMain"; declare const main: "main"; declare const afterMain: "afterMain"; declare const beforeWrite: "beforeWrite"; declare const write: "write"; declare const afterWrite: "afterWrite"; declare type ModifierPhases = typeof beforeRead | typeof read | typeof afterRead | typeof beforeMain | typeof main | typeof afterMain | typeof beforeWrite | typeof write | typeof afterWrite; declare type Obj = { [key: string]: any; }; declare type VisualViewport = EventTarget & { width: number; height: number; offsetLeft: number; offsetTop: number; scale: number; }; declare type Window = { innerHeight: number; offsetHeight: number; innerWidth: number; offsetWidth: number; pageXOffset: number; pageYOffset: number; getComputedStyle: typeof getComputedStyle; addEventListener(type: any, listener: any, optionsOrUseCapture?: any): void; removeEventListener(type: any, listener: any, optionsOrUseCapture?: any): void; Element: Element; HTMLElement: HTMLElement; Node: Node; toString(): "[object Window]"; devicePixelRatio: number; visualViewport?: VisualViewport; ShadowRoot: ShadowRoot; }; declare type Rect = { width: number; height: number; x: number; y: number; }; declare type Offsets = { y: number; x: number; }; declare type PositioningStrategy = "absolute" | "fixed"; declare type StateRects = { reference: Rect; popper: Rect; }; declare type OffsetData = { [key in Placement]?: Offsets; }; declare type State = { elements: { reference: Element | VirtualElement; popper: HTMLElement; arrow?: HTMLElement; }; options: OptionsGeneric<any>; placement: Placement; strategy: PositioningStrategy; orderedModifiers: Array<Modifier<any, any>>; rects: StateRects; scrollParents: { reference: Array<Element | Window | VisualViewport>; popper: Array<Element | Window | VisualViewport>; }; styles: { [key: string]: Partial<CSSStyleDeclaration>; }; attributes: { [key: string]: { [key: string]: string | boolean; }; }; modifiersData: { arrow?: { x?: number; y?: number; centerOffset: number; }; hide?: { isReferenceHidden: boolean; hasPopperEscaped: boolean; referenceClippingOffsets: SideObject; popperEscapeOffsets: SideObject; }; offset?: OffsetData; preventOverflow?: Offsets; popperOffsets?: Offsets; [key: string]: any; }; reset: boolean; }; declare type SetAction<S> = S | ((prev: S) => S); declare type Instance = { state: State; destroy: () => void; forceUpdate: () => void; update: () => Promise<Partial<State>>; setOptions: (setOptionsAction: SetAction<Partial<OptionsGeneric<any>>>) => Promise<Partial<State>>; }; declare type ModifierArguments<Options extends Obj> = { state: State; instance: Instance; options: Partial<Options>; name: string; }; declare type Modifier<Name, Options extends Obj> = { name: Name; enabled: boolean; phase: ModifierPhases; requires?: Array<string>; requiresIfExists?: Array<string>; fn: (arg0: ModifierArguments<Options>) => State | void; effect?: (arg0: ModifierArguments<Options>) => (() => void) | void; options?: Partial<Options>; data?: Obj; }; declare type Options = { placement: Placement; modifiers: Array<Partial<Modifier<any, any>>>; strategy: PositioningStrategy; onFirstUpdate?: (arg0: Partial<State>) => void; }; declare type OptionsGeneric<TModifier> = { placement: Placement; modifiers: Array<TModifier>; strategy: PositioningStrategy; onFirstUpdate?: (arg0: Partial<State>) => void; }; declare type SideObject = { top: number; left: number; right: number; bottom: number; }; declare type VirtualElement = { getBoundingClientRect: () => ClientRect | DOMRect; contextElement?: Element; }; interface Measurable { getBoundingClientRect: () => DOMRect; } /** * triggerRef indicates the element that triggers popper * contentRef indicates the element of popper content * referenceRef indicates the element that popper content relative with */ interface ElPopperInjectionContext { triggerRef: Ref<Measurable | undefined>; contentRef: Ref<HTMLElement | undefined>; popperInstanceRef: Ref<Instance | undefined>; referenceRef: Ref<Measurable | undefined>; role: ComputedRef<string>; } interface ElPopperContentInjectionContext { arrowRef: Ref<HTMLElement | undefined>; arrowOffset: Ref<number | undefined>; arrowStyle: ComputedRef<CSSProperties>; } declare const POPPER_INJECTION_KEY: InjectionKey<ElPopperInjectionContext>; declare const POPPER_CONTENT_INJECTION_KEY: InjectionKey<ElPopperContentInjectionContext>; declare function __VLS_template$5(): { slots: { default?(_: {}): any; }; refs: {}; attrs: Partial<{}>; }; type __VLS_TemplateResult$5 = ReturnType<typeof __VLS_template$5>; declare const __VLS_component$5: vue.DefineComponent<vue.ExtractPropTypes<{ readonly role: { readonly type: vue.PropType<typeof roleTypes[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }>, { triggerRef: vue.Ref<Measurable | undefined>; contentRef: vue.Ref<HTMLElement | undefined>; popperInstanceRef: vue.Ref<Instance | undefined>; referenceRef: vue.Ref<Measurable | undefined>; role: vue.ComputedRef<string>; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{ readonly role: { readonly type: vue.PropType<typeof roleTypes[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }>> & Readonly<{}>, { readonly role: "grid" | "dialog" | "menu" | "group" | "listbox" | "navigation" | "tooltip" | "tree"; }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>; declare const _default$5: __VLS_WithTemplateSlots$5<typeof __VLS_component$5, __VLS_TemplateResult$5["slots"]>; type __VLS_WithTemplateSlots$5<T, S> = T & { new (): { $slots: S; }; }; declare const Effect: { readonly LIGHT: "light"; readonly DARK: "dark"; }; declare const roleTypes: readonly ["dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree"]; type PopperEffect = 'light' | 'dark'; type PopperTrigger = 'click' | 'contextmenu' | 'hover' | 'focus'; declare const popperProps: { readonly role: { readonly type: PropType<(typeof roleTypes)[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }; type PopperProps = ExtractPropTypes<typeof popperProps>; type PopperInstance = InstanceType<typeof _default$5>; /** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */ declare const usePopperProps: { readonly role: { readonly type: PropType<(typeof roleTypes)[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }; /** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */ type UsePopperProps = PopperProps; declare function updatePopper$1(shouldUpdateZIndex?: boolean): void; declare function __VLS_template$4(): { slots: { default?(_: {}): any; }; refs: { contentRef: HTMLDivElement; }; attrs: Partial<{}>; }; type __VLS_TemplateResult$4 = ReturnType<typeof __VLS_template$4>; declare const __VLS_component$4: vue.DefineComponent<vue.ExtractPropTypes<{ ariaLabel: { readonly type: StringConstructor; }; id: { type: StringConstructor; }; style: { type: vue.PropType<vue.StyleValue>; }; className: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; effect: { type: vue.PropType<PopperEffect | string>; default: string; }; visible: { type: BooleanConstructor; }; enterable: { type: BooleanConstructor; default: boolean; }; pure: { type: BooleanConstructor; }; focusOnShow: { type: BooleanConstructor; default: boolean; }; trapping: { type: BooleanConstructor; default: boolean; }; popperClass: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; popperStyle: { type: vue.PropType<vue.StyleValue>; }; referenceEl: { type: vue.PropType<HTMLElement>; }; triggerTargetEl: { type: vue.PropType<HTMLElement>; }; stopPopperMouseEvent: { type: BooleanConstructor; default: boolean; }; virtualTriggering: { type: BooleanConstructor; }; zIndex: { type: NumberConstructor; }; boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; fallbackPlacements: { readonly type: vue.PropType<Placement[]>; readonly default: undefined; }; gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; offset: { readonly type: NumberConstructor; readonly default: 12; }; placement: { readonly type: vue.PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; popperOptions: { readonly type: vue.PropType<Partial<Options>>; readonly default: () => {}; }; strategy: { readonly type: vue.PropType<"fixed" | "absolute">; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }>, { /** * @description popper content element */ popperContentRef: vue.Ref<HTMLElement | undefined, HTMLElement | undefined>; /** * @description popperjs instance */ popperInstanceRef: vue.ComputedRef<Instance | undefined>; /** * @description method for updating popper */ updatePopper: typeof updatePopper$1; /** * @description content style */ contentStyle: vue.ComputedRef<vue.StyleValue[]>; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, { close: () => void; blur: () => void; focus: () => void; mouseenter: (evt: MouseEvent) => void; mouseleave: (evt: MouseEvent) => void; }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{ ariaLabel: { readonly type: StringConstructor; }; id: { type: StringConstructor; }; style: { type: vue.PropType<vue.StyleValue>; }; className: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; effect: { type: vue.PropType<PopperEffect | string>; default: string; }; visible: { type: BooleanConstructor; }; enterable: { type: BooleanConstructor; default: boolean; }; pure: { type: BooleanConstructor; }; focusOnShow: { type: BooleanConstructor; default: boolean; }; trapping: { type: BooleanConstructor; default: boolean; }; popperClass: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; popperStyle: { type: vue.PropType<vue.StyleValue>; }; referenceEl: { type: vue.PropType<HTMLElement>; }; triggerTargetEl: { type: vue.PropType<HTMLElement>; }; stopPopperMouseEvent: { type: BooleanConstructor; default: boolean; }; virtualTriggering: { type: BooleanConstructor; }; zIndex: { type: NumberConstructor; }; boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; fallbackPlacements: { readonly type: vue.PropType<Placement[]>; readonly default: undefined; }; gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; offset: { readonly type: NumberConstructor; readonly default: 12; }; placement: { readonly type: vue.PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; popperOptions: { readonly type: vue.PropType<Partial<Options>>; readonly default: () => {}; }; strategy: { readonly type: vue.PropType<"fixed" | "absolute">; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }>> & Readonly<{ onClose?: (() => any) | undefined; onBlur?: (() => any) | undefined; onFocus?: (() => any) | undefined; onMouseenter?: ((evt: MouseEvent) => any) | undefined; onMouseleave?: ((evt: MouseEvent) => any) | undefined; }>, { placement: Placement; strategy: "fixed" | "absolute"; effect: string; offset: number; boundariesPadding: number; fallbackPlacements: Placement[]; gpuAcceleration: boolean; popperOptions: Partial<Options>; visible: boolean; enterable: boolean; pure: boolean; focusOnShow: boolean; trapping: boolean; stopPopperMouseEvent: boolean; virtualTriggering: boolean; }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>; declare const _default$4: __VLS_WithTemplateSlots$4<typeof __VLS_component$4, __VLS_TemplateResult$4["slots"]>; type __VLS_WithTemplateSlots$4<T, S> = T & { new (): { $slots: S; }; }; declare function __VLS_template$3(): { slots: { default?(_: {}): any; }; refs: {}; attrs: Partial<{}>; }; type __VLS_TemplateResult$3 = ReturnType<typeof __VLS_template$3>; declare const __VLS_component$3: vue.DefineComponent<vue.ExtractPropTypes<{ readonly virtualRef: { readonly type: vue.PropType<Measurable>; }; readonly virtualTriggering: { readonly type: BooleanConstructor; }; readonly onMouseenter: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onMouseleave: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onClick: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onKeydown: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onFocus: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onBlur: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onContextmenu: { readonly type: vue.PropType<(e: Event) => void>; }; readonly id: { readonly type: StringConstructor; }; readonly open: { readonly type: BooleanConstructor; }; }>, { /** * @description trigger element */ triggerRef: vue.Ref<Measurable | undefined, Measurable | undefined>; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{ readonly virtualRef: { readonly type: vue.PropType<Measurable>; }; readonly virtualTriggering: { readonly type: BooleanConstructor; }; readonly onMouseenter: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onMouseleave: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onClick: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onKeydown: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onFocus: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onBlur: { readonly type: vue.PropType<(e: Event) => void>; }; readonly onContextmenu: { readonly type: vue.PropType<(e: Event) => void>; }; readonly id: { readonly type: StringConstructor; }; readonly open: { readonly type: BooleanConstructor; }; }>> & Readonly<{}>, { readonly open: boolean; readonly virtualTriggering: boolean; }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>; declare const _default$3: __VLS_WithTemplateSlots$3<typeof __VLS_component$3, __VLS_TemplateResult$3["slots"]>; type __VLS_WithTemplateSlots$3<T, S> = T & { new (): { $slots: S; }; }; declare const popperArrowProps: { readonly arrowOffset: { readonly type: NumberConstructor; readonly default: 5; }; }; type PopperArrowProps = ExtractPropTypes<typeof popperArrowProps>; type PopperArrowInstance = InstanceType<typeof _default$6>; /** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */ declare const usePopperArrowProps: { readonly arrowOffset: { readonly type: NumberConstructor; readonly default: 5; }; }; /** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */ type UsePopperArrowProps = PopperArrowProps; /** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */ type ElPopperArrowInstance = PopperArrowInstance; type ClassObjectType = Record<string, boolean>; type ClassType = string | ClassObjectType | ClassType[]; declare const POSITIONING_STRATEGIES: readonly ["fixed", "absolute"]; interface CreatePopperInstanceParams { referenceEl: Measurable; popperContentEl: HTMLElement; arrowEl: HTMLElement | undefined; } declare const popperCoreConfigProps: { readonly boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; readonly fallbackPlacements: { readonly type: PropType<Placement[]>; readonly default: undefined; }; readonly gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; /** * @description offset of the Tooltip */ readonly offset: { readonly type: NumberConstructor; readonly default: 12; }; /** * @description position of Tooltip */ readonly placement: { readonly type: PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; /** * @description [popper.js](https://popper.js.org/docs/v2/) parameters */ readonly popperOptions: { readonly type: PropType<Partial<Options>>; readonly default: () => {}; }; readonly strategy: { readonly type: PropType<(typeof POSITIONING_STRATEGIES)[number]>; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }; type PopperCoreConfigProps = ExtractPropTypes<typeof popperCoreConfigProps>; declare const popperContentProps: { ariaLabel: { readonly type: StringConstructor; }; id: { type: StringConstructor; }; style: { type: PropType<StyleValue>; }; className: { type: PropType<ClassType>; }; effect: { type: PropType<PopperEffect | string>; default: string; }; visible: { type: BooleanConstructor; }; enterable: { type: BooleanConstructor; default: boolean; }; pure: { type: BooleanConstructor; }; focusOnShow: { type: BooleanConstructor; default: boolean; }; trapping: { type: BooleanConstructor; default: boolean; }; popperClass: { type: PropType<ClassType>; }; popperStyle: { type: PropType<StyleValue>; }; referenceEl: { type: PropType<HTMLElement>; }; triggerTargetEl: { type: PropType<HTMLElement>; }; stopPopperMouseEvent: { type: BooleanConstructor; default: boolean; }; virtualTriggering: { type: BooleanConstructor; }; zIndex: { type: NumberConstructor; }; boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; fallbackPlacements: { readonly type: PropType<Placement[]>; readonly default: undefined; }; gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; offset: { readonly type: NumberConstructor; readonly default: 12; }; placement: { readonly type: PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; popperOptions: { readonly type: PropType<Partial<Options>>; readonly default: () => {}; }; strategy: { readonly type: PropType<(typeof POSITIONING_STRATEGIES)[number]>; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }; type PopperContentProps = ExtractPropTypes<typeof popperContentProps>; declare const popperContentEmits: { mouseenter: (evt: MouseEvent) => boolean; mouseleave: (evt: MouseEvent) => boolean; focus: () => boolean; blur: () => boolean; close: () => boolean; }; type PopperContentEmits = typeof popperContentEmits; type PopperContentInstance = InstanceType<typeof _default$4>; /** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */ declare const usePopperCoreConfigProps: { readonly boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; readonly fallbackPlacements: { readonly type: PropType<Placement[]>; readonly default: undefined; }; readonly gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; /** * @description offset of the Tooltip */ readonly offset: { readonly type: NumberConstructor; readonly default: 12; }; /** * @description position of Tooltip */ readonly placement: { readonly type: PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; /** * @description [popper.js](https://popper.js.org/docs/v2/) parameters */ readonly popperOptions: { readonly type: PropType<Partial<Options>>; readonly default: () => {}; }; readonly strategy: { readonly type: PropType<(typeof POSITIONING_STRATEGIES)[number]>; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }; /** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */ declare const usePopperContentProps: { ariaLabel: { readonly type: StringConstructor; }; id: { type: StringConstructor; }; style: { type: PropType<StyleValue>; }; className: { type: PropType<ClassType>; }; effect: { type: PropType<PopperEffect | string>; default: string; }; visible: { type: BooleanConstructor; }; enterable: { type: BooleanConstructor; default: boolean; }; pure: { type: BooleanConstructor; }; focusOnShow: { type: BooleanConstructor; default: boolean; }; trapping: { type: BooleanConstructor; default: boolean; }; popperClass: { type: PropType<ClassType>; }; popperStyle: { type: PropType<StyleValue>; }; referenceEl: { type: PropType<HTMLElement>; }; triggerTargetEl: { type: PropType<HTMLElement>; }; stopPopperMouseEvent: { type: BooleanConstructor; default: boolean; }; virtualTriggering: { type: BooleanConstructor; }; zIndex: { type: NumberConstructor; }; boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; fallbackPlacements: { readonly type: PropType<Placement[]>; readonly default: undefined; }; gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; offset: { readonly type: NumberConstructor; readonly default: 12; }; placement: { readonly type: PropType<Placement>; readonly validator: (val: string) => boolean; readonly default: "bottom"; }; popperOptions: { readonly type: PropType<Partial<Options>>; readonly default: () => {}; }; strategy: { readonly type: PropType<(typeof POSITIONING_STRATEGIES)[number]>; readonly validator: (val: string) => boolean; readonly default: "absolute"; }; }; /** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */ declare const usePopperContentEmits: { mouseenter: (evt: MouseEvent) => boolean; mouseleave: (evt: MouseEvent) => boolean; focus: () => boolean; blur: () => boolean; close: () => boolean; }; /** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */ type UsePopperCoreConfigProps = PopperCoreConfigProps; /** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */ type UsePopperContentProps = PopperContentProps; /** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */ type ElPopperArrowContent = PopperContentInstance; declare const popperTriggerProps: { readonly virtualRef: { readonly type: PropType<Measurable>; }; readonly virtualTriggering: { readonly type: BooleanConstructor; }; readonly onMouseenter: { readonly type: PropType<(e: Event) => void>; }; readonly onMouseleave: { readonly type: PropType<(e: Event) => void>; }; readonly onClick: { readonly type: PropType<(e: Event) => void>; }; readonly onKeydown: { readonly type: PropType<(e: Event) => void>; }; readonly onFocus: { readonly type: PropType<(e: Event) => void>; }; readonly onBlur: { readonly type: PropType<(e: Event) => void>; }; readonly onContextmenu: { readonly type: PropType<(e: Event) => void>; }; readonly id: { readonly type: StringConstructor; }; readonly open: { readonly type: BooleanConstructor; }; }; type PopperTriggerProps = typeof popperTriggerProps; type PopperTriggerInstance = InstanceType<typeof _default$3>; /** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */ declare const usePopperTriggerProps: { readonly virtualRef: { readonly type: PropType<Measurable>; }; readonly virtualTriggering: { readonly type: BooleanConstructor; }; readonly onMouseenter: { readonly type: PropType<(e: Event) => void>; }; readonly onMouseleave: { readonly type: PropType<(e: Event) => void>; }; readonly onClick: { readonly type: PropType<(e: Event) => void>; }; readonly onKeydown: { readonly type: PropType<(e: Event) => void>; }; readonly onFocus: { readonly type: PropType<(e: Event) => void>; }; readonly onBlur: { readonly type: PropType<(e: Event) => void>; }; readonly onContextmenu: { readonly type: PropType<(e: Event) => void>; }; readonly id: { readonly type: StringConstructor; }; readonly open: { readonly type: BooleanConstructor; }; }; /** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */ type ElPopperArrowTrigger = PopperTriggerInstance; type Arrayable<T> = T | T[]; type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'; declare const useTooltipTriggerProps: { /** * @description whether Tooltip is disabled */ readonly disabled: BooleanConstructor; /** * @description How should the tooltip be triggered (to show) */ readonly trigger: { readonly type: PropType<Arrayable<TooltipTriggerType>>; readonly default: "hover"; }; /** * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard */ readonly triggerKeys: { readonly type: PropType<string[]>; readonly default: () => string[]; }; readonly virtualRef: { readonly type: PropType<Measurable>; }; readonly virtualTriggering: { readonly type: BooleanConstructor; }; readonly onMouseenter: { readonly type: PropType<(e: Event) => void>; }; readonly onMouseleave: { readonly type: PropType<(e: Event) => void>; }; readonly onClick: { readonly type: PropType<(e: Event) => void>; }; readonly onKeydown: { readonly type: PropType<(e: Event) => void>; }; readonly onFocus: { readonly type: PropType<(e: Event) => void>; }; readonly onBlur: { readonly type: PropType<(e: Event) => void>; }; readonly onContextmenu: { readonly type: PropType<(e: Event) => void>; }; readonly id: { readonly type: StringConstructor; }; readonly open: { readonly type: BooleanConstructor; }; }; type ElTooltipTriggerProps = ExtractPropTypes<typeof useTooltipTriggerProps>; declare function updatePopper(): void; declare function isFocusInsideContent(event?: FocusEvent): boolean | undefined; declare function __VLS_template$2(): { slots: { default?(_: {}): any; content?(_: {}): any; }; refs: { popperRef: ({ $: vue.ComponentInternalInstance; $data: {}; $props: Partial<{ readonly role: "grid" | "dialog" | "menu" | "group" | "listbox" | "navigation" | "tooltip" | "tree"; }> & Omit<{ readonly role: "grid" | "dialog" | "menu" | "group" | "listbox" | "navigation" | "tooltip" | "tree"; } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "role">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: vue.Slot<any> | undefined; }>; $root: vue.ComponentPublicInstance | null; $parent: vue.ComponentPublicInstance | null; $host: Element | null; $emit: (event: string, ...args: any[]) => void; $el: any; $options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{ readonly role: { readonly type: vue.PropType<typeof roleTypes[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }>> & Readonly<{}>, { triggerRef: vue.Ref<Measurable | undefined>; contentRef: vue.Ref<HTMLElement | undefined>; popperInstanceRef: vue.Ref<Instance | undefined>; referenceRef: vue.Ref<Measurable | undefined>; role: vue.ComputedRef<string>; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, { readonly role: "grid" | "dialog" | "menu" | "group" | "listbox" | "navigation" | "tooltip" | "tree"; }, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]; renderTriggered?: ((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: vue.ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: typeof vue.nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: vue.WatchOptions): vue.WatchStopHandle; } & Readonly<{ readonly role: "grid" | "dialog" | "menu" | "group" | "listbox" | "navigation" | "tooltip" | "tree"; }> & Omit<Readonly<vue.ExtractPropTypes<{ readonly role: { readonly type: vue.PropType<typeof roleTypes[number]>; readonly validator: (val: string) => boolean; readonly default: "tooltip"; }; }>> & Readonly<{}>, "role" | "triggerRef" | "contentRef" | "popperInstanceRef" | "referenceRef"> & vue.ShallowUnwrapRef<{ triggerRef: vue.Ref<Measurable | undefined>; contentRef: vue.Ref<HTMLElement | undefined>; popperInstanceRef: vue.Ref<Instance | undefined>; referenceRef: vue.Ref<Measurable | undefined>; role: vue.ComputedRef<string>; }> & {} & vue.ComponentCustomProperties & {} & { $slots: { default?(_: {}): any; }; }) | null; contentRef: ({ $: vue.ComponentInternalInstance; $data: {}; $props: Partial<{ readonly disabled: boolean; readonly showAfter: number; readonly hideAfter: number; readonly autoClose: number; readonly placement: Placement; readonly strategy: "fixed" | "absolute"; readonly effect: string; readonly content: string; readonly offset: number; readonly boundariesPadding: number; readonly fallbackPlacements: Placement[]; readonly gpuAcceleration: boolean; readonly popperOptions: Partial<Options>; readonly visible: boolean | null; readonly enterable: boolean; readonly pure: boolean; readonly focusOnShow: boolean; readonly trapping: boolean; readonly stopPopperMouseEvent: boolean; readonly virtualTriggering: boolean; readonly rawContent: boolean; readonly persistent: boolean; readonly teleported: boolean; }> & Omit<{ readonly disabled: boolean; readonly showAfter: number; readonly hideAfter: number; readonly autoClose: number; readonly placement: Placement; readonly strategy: "fixed" | "absolute"; readonly effect: string; readonly content: string; readonly offset: number; readonly boundariesPadding: number; readonly gpuAcceleration: boolean; readonly popperOptions: Partial<Options>; readonly visible: boolean | null; readonly enterable: boolean; readonly pure: boolean; readonly focusOnShow: boolean; readonly trapping: boolean; readonly stopPopperMouseEvent: boolean; readonly virtualTriggering: boolean; readonly rawContent: boolean; readonly persistent: boolean; readonly teleported: boolean; readonly ariaLabel?: string | undefined; readonly transition?: string | undefined; readonly zIndex?: number | undefined; readonly style?: vue.StyleValue; readonly id?: string | undefined; readonly fallbackPlacements?: Placement[] | undefined; readonly className?: (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]) | undefined; readonly popperClass?: (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]) | undefined; readonly popperStyle?: vue.StyleValue; readonly referenceEl?: HTMLElement | undefined; readonly triggerTargetEl?: HTMLElement | undefined; readonly appendTo?: string | HTMLElement | undefined; } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "disabled" | "showAfter" | "hideAfter" | "autoClose" | "placement" | "strategy" | "effect" | "content" | "offset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "popperOptions" | "visible" | "enterable" | "pure" | "focusOnShow" | "trapping" | "stopPopperMouseEvent" | "virtualTriggering" | "rawContent" | "persistent" | "teleported">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: vue.Slot<any> | undefined; }>; $root: vue.ComponentPublicInstance | null; $parent: vue.ComponentPublicInstance | null; $host: Element | null; $emit: (event: string, ...args: any[]) => void; $el: any; $options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{ readonly ariaLabel: { readonly type: StringConstructor; }; readonly appendTo: { readonly type: vue.PropType<string | HTMLElement>; }; readonly content: { readonly type: StringConstructor; readonly default: ""; }; readonly rawContent: BooleanConstructor; readonly persistent: BooleanConstructor; readonly visible: { readonly type: vue.PropType<boolean | null>; readonly default: null; }; readonly transition: StringConstructor; readonly teleported: { readonly type: BooleanConstructor; readonly default: true; }; readonly disabled: BooleanConstructor; readonly id: { type: StringConstructor; }; readonly style: { type: vue.PropType<vue.StyleValue>; }; readonly className: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; readonly effect: { type: vue.PropType<PopperEffect | string>; default: string; }; readonly enterable: { type: BooleanConstructor; default: boolean; }; readonly pure: { type: BooleanConstructor; }; readonly focusOnShow: { type: BooleanConstructor; default: boolean; }; readonly trapping: { type: BooleanConstructor; default: boolean; }; readonly popperClass: { type: vue.PropType<string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | (string | { [x: string]: boolean; } | any)[])[])[])[])[])[])[])[])[])[])[]>; }; readonly popperStyle: { type: vue.PropType<vue.StyleValue>; }; readonly referenceEl: { type: vue.PropType<HTMLElement>; }; readonly triggerTargetEl: { type: vue.PropType<HTMLElement>; }; readonly stopPopperMouseEvent: { type: BooleanConstructor; default: boolean; }; readonly virtualTriggering: { type: BooleanConstructor; }; readonly zIndex: { type: NumberConstructor; }; readonly boundariesPadding: { readonly type: NumberConstructor; readonly default: 0; }; readonly fallbackPlacements: { readonly type: vue.PropType<Placement[]>; readonly default: undefined; }; readonly gpuAcceleration: { readonly type: BooleanConstructor; readonly default: true; }; readonly offset: { readonly type: NumberConstructor; readonly default: 12; }; readonly placement: { readonly type: vue.PropType<Placement>; readonly validator: (val: string)