UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.82 kB
{"version":3,"file":"tag.mjs","names":[],"sources":["../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Tag from './tag.vue'\nimport type { ExtractPublicPropTypes } from 'vue'\n\nexport interface TagProps {\n /**\n * @description type of Tag\n */\n type?: 'primary' | 'success' | 'info' | 'warning' | 'danger'\n /**\n * @description whether Tag can be removed\n */\n closable?: boolean\n /**\n * @description whether to disable animations\n */\n disableTransitions?: boolean\n /**\n * @description whether Tag has a highlighted border\n */\n hit?: boolean\n /**\n * @description background color of the Tag\n */\n color?: string\n /**\n * @description size of Tag\n */\n size?: ComponentSize\n /**\n * @description theme of Tag\n */\n effect?: 'dark' | 'light' | 'plain'\n /**\n * @description whether Tag is rounded\n */\n round?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TagProps` instead.\n */\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: String,\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TagProps` instead.\n */\nexport type TagPropsPublic = ExtractPublicPropTypes<typeof tagProps>\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType<typeof Tag> & unknown\n"],"mappings":";;;;;;;AA6CA,MAAa,WAAW,WAAW;CAIjC,MAAM;EACJ,MAAM;EACN,QAAQ;GAAC;GAAW;GAAW;GAAQ;GAAW;GAAS;EAC3D,SAAS;EACV;CAID,UAAU;CAIV,oBAAoB;CAIpB,KAAK;CAIL,OAAO;CAIP,MAAM;EACJ,MAAM;EACN,QAAQ;EACT;CAID,QAAQ;EACN,MAAM;EACN,QAAQ;GAAC;GAAQ;GAAS;GAAQ;EAClC,SAAS;EACV;CAID,OAAO;CACR,CAAU;AAOX,MAAa,WAAW;CACtB,QAAQ,QAAoB,eAAe;CAC3C,QAAQ,QAAoB,eAAe;CAC5C"}