UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.18 kB
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\n\nexport interface TextProps {\n /**\n * @description text type\n */\n type?: 'primary' | 'success' | 'info' | 'warning' | 'danger' | ''\n /**\n * @description text size\n */\n size?: ComponentSize\n /**\n * @description render ellipsis\n */\n truncated?: boolean\n /**\n * @description maximum lines\n */\n lineClamp?: number | string\n /**\n * @description custom element tag\n */\n tag?: string\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TextProps` instead.\n */\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TextProps` instead.\n */\nexport type TextPropsPublic = ExtractPublicPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;AAgCO,MAAM,YAAY,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlC,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,WAAW,MAAA,EAAQ,SAAA,EAAW,UAAU,EAAE,CAAA;AAAA,IAC9D,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,cAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW,OAAA;AAAA;AAAA;AAAA;AAAA,EAIX,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM;AAAA,GACvB;AAAA;AAAA;AAAA;AAAA,EAIA,GAAA,EAAK;AAAA,IACH,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAU;;;;"}