element-plus
Version:
A Component Library for Vue 3
1 lines • 2.92 kB
Source Map (JSON)
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nexport const tourStrategies = ['absolute', 'fixed'] as const\n\nexport const tourPlacements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport interface TourContentProps {\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: Placement\n /**\n * @description the reference dom\n */\n reference?: HTMLElement | VirtualElement | null\n /**\n * @description position strategy of the content\n */\n strategy?: Strategy\n /**\n * @description offset of the arrow\n */\n offset?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description content's zIndex\n */\n zIndex?: number\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourContentProps` instead.\n */\nexport const tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourContentProps` instead.\n */\nexport type TourContentPropsPublic = ExtractPublicPropTypes<\n typeof tourContentProps\n>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"mappings":";;;AAKA,MAAa,iBAAiB,CAAC,YAAY,QAAQ;AAEnD,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;AAgCD,MAAa,mBAAmB,WAAW;CAIzC,WAAW;EACT,MAAM,eAA0B,OAAO;EACvC,QAAQ;EACR,SAAS;EACV;CAID,WAAW;EACT,MAAM,eAAoD,OAAO;EACjE,SAAS;EACV;CAID,UAAU;EACR,MAAM,eAAyB,OAAO;EACtC,QAAQ;EACR,SAAS;EACV;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,WAAW;CAIX,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACF,CAAC;AASF,MAAa,mBAAmB,EAC9B,aAAa,MACd"}