UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.93 kB
{"version":3,"file":"popper.mjs","names":[],"sources":["../../../../../../packages/components/popper/src/popper.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type Popper from './popper.vue'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const\n\nexport const roleTypes = [\n 'dialog',\n 'grid',\n 'group',\n 'listbox',\n 'menu',\n 'navigation',\n 'tooltip',\n 'tree',\n] as const\n\nexport type PopperEffect =\n | (typeof effects)[number]\n | (string & NonNullable<unknown>)\nexport type PopperTrigger = (typeof triggers)[number]\n\nexport interface PopperProps {\n /**\n * @description role determines how aria attributes are distributed\n */\n role?: (typeof roleTypes)[number]\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `PopperProps` instead.\n */\nexport const popperProps = buildProps({\n role: {\n type: String,\n values: roleTypes,\n default: 'tooltip',\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `PopperProps` instead.\n */\nexport type PopperPropsPublic = ExtractPublicPropTypes<typeof popperProps>\n\nexport type PopperInstance = InstanceType<typeof Popper> & unknown\n\n/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */\nexport const usePopperProps = popperProps\n\n/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperProps = PopperProps\n"],"mappings":";;;AAUA,MAAa,SAAS;CACpB,OAAO;CACP,MAAM;CACP;AAED,MAAa,YAAY;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;AAiBD,MAAa,cAAc,WAAW,EACpC,MAAM;CACJ,MAAM;CACN,QAAQ;CACR,SAAS;CACV,EACF,CAAU;;AAUX,MAAa,iBAAiB"}