UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.31 kB
{"version":3,"file":"tag.mjs","sources":["../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type Tag from './tag.vue'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\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)\nexport type TagProps = ExtractPropTypes<typeof tagProps>\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"],"names":[],"mappings":";;;AAMO,MAAM,WAAW,UAAW,CAAA;AAAA,EAIjC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,SAAW,EAAA,MAAA,EAAQ,WAAW,QAAQ,CAAA;AAAA,IAC1D,OAAS,EAAA,SAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,kBAAoB,EAAA,OAAA;AAAA,EAIpB,GAAK,EAAA,OAAA;AAAA,EAIL,KAAO,EAAA,MAAA;AAAA,EAIP,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,cAAA;AAAA,GACV;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,CAAC,MAAQ,EAAA,OAAA,EAAS,OAAO,CAAA;AAAA,IACjC,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA,OAAA;AACT,CAAU,EAAA;AAIH,MAAM,QAAW,GAAA;AAAA,EACtB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAAA,EAC3C,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAC7C;;;;"}