UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 3.02 kB
{"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport interface AlertProps {\n /**\n * @description alert title.\n */\n title?: string\n /**\n * @description descriptive text.\n */\n description?: string\n /**\n * @description alert type.\n */\n type?: keyof typeof TypeComponentsMap\n /**\n * @description whether alert can be dismissed.\n */\n closable?: boolean\n /**\n * @description text for replacing x button\n */\n closeText?: string\n /**\n * @description whether show icon\n */\n showIcon?: boolean\n /**\n * @description should content be placed in center.\n */\n center?: boolean\n /**\n * @description theme style\n */\n effect?: 'light' | 'dark'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `AlertProps` instead.\n */\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\n/**\n * @deprecated Removed after 3.0.0, Use `AlertProps` instead.\n */\nexport type AlertPropsPublic = ExtractPublicPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;AAIO,MAAM,YAAA,GAAe,CAAC,OAAA,EAAS,MAAM;AAwCrC,MAAM,aAAa,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAInC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAAA,IAChC,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU,OAAA;AAAA;AAAA;AAAA;AAAA,EAIV,MAAA,EAAQ,OAAA;AAAA,EACR,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,YAAA;AAAA,IACR,OAAA,EAAS;AAAA;AAEb,CAAU;AAMH,MAAM,UAAA,GAAa;AAAA,EACxB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAA,YAAe;AAC7C;;;;"}