element-plus
Version:
A Component Library for Vue 3
1 lines • 3.72 kB
Source Map (JSON)
{"version":3,"file":"steps.mjs","sources":["../../../../../../packages/components/steps/src/steps.ts"],"sourcesContent":["import { CHANGE_EVENT } from '@element-plus/constants'\nimport { buildProps, isNumber } from '@element-plus/utils'\n\nimport type Steps from './steps.vue'\nimport type { ExtractPublicPropTypes } from 'vue'\n\nexport type StepsStatus = 'wait' | 'process' | 'finish' | 'error' | 'success'\n\nexport interface StepsProps {\n /**\n * @description the spacing of each step, will be responsive if omitted. Supports percentage.\n * @default ''\n */\n space?: number | string\n /**\n * @description current activation step\n * @default 0\n */\n active?: number\n /**\n * @description display direction\n * @default 'horizontal'\n */\n direction?: 'horizontal' | 'vertical'\n /**\n * @description center title and description\n */\n alignCenter?: boolean\n /**\n * @description whether to apply simple theme\n */\n simple?: boolean\n /**\n * @description status of end step\n * @default 'finish'\n */\n finishStatus?: StepsStatus\n /**\n * @description status of current step\n * @default 'process'\n */\n processStatus?: StepsStatus\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `StepsProps` instead.\n */\nexport const stepsProps = buildProps({\n /**\n * @description the spacing of each step, will be responsive if omitted. Supports percentage.\n */\n space: {\n type: [Number, String],\n default: '',\n },\n /**\n * @description current activation step\n */\n active: {\n type: Number,\n default: 0,\n },\n /**\n * @description display direction\n */\n direction: {\n type: String,\n default: 'horizontal',\n values: ['horizontal', 'vertical'],\n },\n /**\n * @description center title and description\n */\n alignCenter: {\n type: Boolean,\n },\n /**\n * @description whether to apply simple theme\n */\n simple: {\n type: Boolean,\n },\n /**\n * @description status of end step\n */\n finishStatus: {\n type: String,\n values: ['wait', 'process', 'finish', 'error', 'success'],\n default: 'finish',\n },\n /**\n * @description status of current step\n */\n processStatus: {\n type: String,\n values: ['wait', 'process', 'finish', 'error', 'success'],\n default: 'process',\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `StepsProps` instead.\n */\nexport type StepsPropsPublic = ExtractPublicPropTypes<typeof stepsProps>\n\nexport const stepsEmits = {\n [CHANGE_EVENT]: (newVal: number, oldVal: number) =>\n [newVal, oldVal].every(isNumber),\n}\nexport type StepsEmits = typeof stepsEmits\n\nexport type StepsInstance = InstanceType<typeof Steps> & unknown\n"],"names":[],"mappings":";;;;AA+CO,MAAM,aAAa,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAInC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS,YAAA;AAAA,IACT,MAAA,EAAQ,CAAC,YAAA,EAAc,UAAU;AAAA,GACnC;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAU,SAAS,SAAS,CAAA;AAAA,IACxD,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAU,SAAS,SAAS,CAAA;AAAA,IACxD,OAAA,EAAS;AAAA;AAEb,CAAU;AAOH,MAAM,UAAA,GAAa;AAAA,EACxB,CAAC,YAAY,GAAG,CAAC,MAAA,EAAgB,MAAA,KAC/B,CAAC,MAAA,EAAQ,MAAM,CAAA,CAAE,KAAA,CAAM,QAAQ;AACnC;;;;"}