UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.98 kB
{"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/popper/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from './constants'\nimport type Trigger from './trigger.vue'\n\nexport interface PopperTriggerProps {\n /** @description Indicates the reference element to which the popper is attached */\n virtualRef?: Measurable\n /** @description Indicates whether virtual triggering is enabled */\n virtualTriggering?: boolean\n onMouseenter?: (e: MouseEvent) => void\n onMouseleave?: (e: MouseEvent) => void\n onClick?: (e: PointerEvent) => void\n onKeydown?: (e: KeyboardEvent) => void\n onFocus?: (e: FocusEvent) => void\n onBlur?: (e: FocusEvent) => void\n onContextmenu?: (e: PointerEvent) => void\n id?: string\n open?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `PopperTriggerProps` instead.\n */\nexport const popperTriggerProps = buildProps({\n /** @description Indicates the reference element to which the popper is attached */\n virtualRef: {\n type: definePropType<Measurable>(Object),\n },\n /** @description Indicates whether virtual triggering is enabled */\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: MouseEvent) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: MouseEvent) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: PointerEvent) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: KeyboardEvent) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: FocusEvent) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: FocusEvent) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: PointerEvent) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerInstance = InstanceType<typeof Trigger> & unknown\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n"],"names":[],"mappings":";;AAwBO,MAAM,qBAAqB,UAAA,CAAW;AAAA;AAAA,EAE3C,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAA2B,MAAM;AAAA,GACzC;AAAA;AAAA,EAEA,iBAAA,EAAmB,OAAA;AAAA,EACnB,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,eAAwC,QAAQ;AAAA,GACxD;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,eAAwC,QAAQ;AAAA,GACxD;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,eAA0C,QAAQ;AAAA,GAC1D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,eAA2C,QAAQ;AAAA,GAC3D;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,eAAwC,QAAQ;AAAA,GACxD;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,eAAwC,QAAQ;AAAA,GACxD;AAAA,EACA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,eAA0C,QAAQ;AAAA,GAC1D;AAAA,EACA,EAAA,EAAI,MAAA;AAAA,EACJ,IAAA,EAAM;AACR,CAAU;AAKH,MAAM,qBAAA,GAAwB;;;;"}