hongluan-ui
Version:
Hongluan Component Library for Vue 3
1 lines • 3.26 kB
Source Map (JSON)
{"version":3,"file":"steps.mjs","sources":["../../../../../../packages/components/steps/src/steps.ts"],"sourcesContent":["import { CHANGE_EVENT } from '@hongluan-ui/constants'\nimport { isNumber } from '@hongluan-ui/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Steps from './steps.vue'\n\nexport const stepsProps = {\n /**\n * @description the spacing of each step, will be responsive if omitted. Supports percentage.\n */\n gap: {\n type: [Number, String],\n default: '',\n },\n itemPadding: {\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 dir: {\n type: String,\n default: 'horizontal',\n validator: (val: string): boolean => ['horizontal', 'vertical', 'inline'].includes(val),\n },\n block: {\n type: Boolean,\n default: false,\n },\n /**\n * @description center title and description\n */\n center: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to apply simple theme\n */\n simple: {\n type: Boolean,\n default: false,\n },\n /**\n * @description status of end step\n */\n finishStatus: {\n type: String,\n default: 'finish',\n validator: (val: string): boolean => ['wait', 'process', 'finish', 'error', 'success'].includes(val),\n },\n /**\n * @description status of current step\n */\n processStatus: {\n type: String,\n default: 'process',\n validator: (val: string): boolean => ['wait', 'process', 'finish', 'error', 'success'].includes(val),\n },\n}\nexport type StepsProps = ExtractPropTypes<typeof stepsProps>\n\nexport const stepsEmits = {\n [CHANGE_EVENT]: (newVal: number, oldVal: number) =>\n isNumber(newVal) && isNumber(oldVal),\n}\nexport type StepsEmits = typeof stepsEmits\nexport type StepsInstance = InstanceType<typeof Steps>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG;AAC1B,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,CAAC,M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