popper.d.ts 975 B

1234567891011121314151617181920212223
  1. import type { ComputedRef, InjectionKey, Ref } from 'vue';
  2. import type { Instance } from '@popperjs/core';
  3. export declare type Measurable = {
  4. getBoundingClientRect: () => DOMRect;
  5. };
  6. /**
  7. * triggerRef indicates the element that triggers popper
  8. * contentRef indicates the element of popper content
  9. * referenceRef indicates the element that popper content relative with
  10. */
  11. export declare type ElPopperInjectionContext = {
  12. triggerRef: Ref<Measurable | undefined>;
  13. contentRef: Ref<HTMLElement | undefined>;
  14. popperInstanceRef: Ref<Instance | undefined>;
  15. referenceRef: Ref<Measurable | undefined>;
  16. role: ComputedRef<string>;
  17. };
  18. export declare type ElPopperContentInjectionContext = {
  19. arrowRef: Ref<HTMLElement | undefined>;
  20. arrowOffset: Ref<number | undefined>;
  21. };
  22. export declare const POPPER_INJECTION_KEY: InjectionKey<ElPopperInjectionContext>;
  23. export declare const POPPER_CONTENT_INJECTION_KEY: InjectionKey<ElPopperContentInjectionContext>;