element-plus
Version:
A Component Library for Vue 3
1 lines • 3.24 kB
Source Map (JSON)
{"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 { 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"],"names":[],"mappings":";;;AA6CO,MAAM,WAAW,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIjC,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,SAAA,EAAW,MAAA,EAAQ,WAAW,QAAQ,CAAA;AAAA,IAC1D,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU,OAAA;AAAA;AAAA;AAAA;AAAA,EAIV,kBAAA,EAAoB,OAAA;AAAA;AAAA;AAAA;AAAA,EAIpB,GAAA,EAAK,OAAA;AAAA;AAAA;AAAA;AAAA,EAIL,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,MAAA,EAAQ,OAAA,EAAS,OAAO,CAAA;AAAA,IACjC,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO;AACT,CAAU;AAOH,MAAM,QAAA,GAAW;AAAA,EACtB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAA,YAAe,UAAA;AAAA,EAC3C,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAA,YAAe;AAC7C;;;;"}