{"version":3,"file":"props.mjs","sources":["../../../../../../packages/components/progress/src/props.ts"],"sourcesContent":["import type { VueNode } from '@antdv/types';\nimport type { ExtractPropTypes, PropType } from 'vue';\nimport type { Direction } from '../../config-provider';\nimport type {\n  GapPositionType,\n  ProgressGradient,\n  ProgressSize,\n  ProgressStatusesType,\n  ProgressType,\n  StrokeColorType,\n  StrokeLinecapType,\n  SuccessProps,\n} from './interface';\nimport {\n  anyType,\n  booleanType,\n  functionType,\n  objectType,\n  someType,\n  stringType,\n} from '@antdv/utils';\n\nexport function progressProps() {\n  return {\n    prefixCls: String,\n    type: stringType<ProgressType>(),\n    percent: Number,\n    format: functionType<(percent?: number, successPercent?: number) => VueNode>(),\n    status: stringType<ProgressStatusesType>(),\n    showInfo: booleanType(),\n    strokeWidth: Number,\n    strokeLinecap: stringType<'butt' | 'square' | 'round'>(),\n    strokeColor: anyType<string | string[] | ProgressGradient>(),\n    trailColor: String,\n    /** @deprecated Use `size` instead */\n    width: Number,\n    success: objectType<SuccessProps>(),\n    gapDegree: Number,\n    gapPosition: stringType<'top' | 'bottom' | 'left' | 'right'>(),\n    size: someType<ProgressSize | number | [number, number]>([String, Number, Array]),\n    steps: Number,\n    /** @deprecated Use `success` instead */\n    successPercent: Number,\n    title: String,\n    progressStatus: stringType<ProgressStatusesType>(),\n  };\n}\n\nexport interface CircleProps extends ProgressProps {\n  strokeColor?: string | ProgressGradient\n}\n\nexport function progressCircleProps() {\n  return {\n    ...progressProps(),\n    strokeColor: anyType<string | ProgressGradient>(),\n  };\n}\n\nexport function progressLineProps() {\n  return {\n    ...progressProps(),\n    strokeColor: anyType<string | ProgressGradient>(),\n    direction: stringType<Direction>(),\n  };\n}\n\nexport function progressStepsProps() {\n  return {\n    ...progressProps(),\n    steps: Number,\n    strokeColor: someType<string | string[]>(),\n    trailColor: String,\n  };\n}\n\nexport function internalCircleProps() {\n  return {\n    gapDegree: Number,\n    gapPosition: {\n      type: String as PropType<GapPositionType>,\n    },\n    percent: {\n      type: [Array, Number] as PropType<number | number[]>,\n    },\n    prefixCls: String,\n    strokeColor: {\n      type: [Object, String, Array] as PropType<StrokeColorType>,\n    },\n    strokeLinecap: {\n      type: String as PropType<StrokeLinecapType>,\n    },\n    strokeWidth: Number,\n    trailColor: String,\n    trailWidth: Number,\n    transition: String,\n  };\n}\n\nexport type InternalCircleProps = Partial<ExtractPropTypes<ReturnType<typeof internalCircleProps>>>;\n\nexport type ProgressStepsProps = Partial<ExtractPropTypes<ReturnType<typeof progressStepsProps>>>;\n\nexport type ProgressLineProps = Partial<ExtractPropTypes<ReturnType<typeof progressLineProps>>>;\n\nexport type ProgressCircleProps = Partial<ExtractPropTypes<ReturnType<typeof progressCircleProps>>>;\n\nexport type ProgressProps = Partial<ExtractPropTypes<ReturnType<typeof progressProps>>>;\n"],"names":[],"mappings":";;;AAsBO,SAAS,aAAgB,GAAA;AAC9B,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,MAAA;AAAA,IACX,MAAM,UAAyB,EAAA;AAAA,IAC/B,OAAS,EAAA,MAAA;AAAA,IACT,QAAQ,YAAqE,EAAA;AAAA,IAC7E,QAAQ,UAAiC,EAAA;AAAA,IACzC,UAAU,WAAY,EAAA;AAAA,IACtB,WAAa,EAAA,MAAA;AAAA,IACb,eAAe,UAAwC,EAAA;AAAA,IACvD,aAAa,OAA8C,EAAA;AAAA,IAC3D,UAAY,EAAA,MAAA;AAAA;AAAA,IAEZ,KAAO,EAAA,MAAA;AAAA,IACP,SAAS,UAAyB,EAAA;AAAA,IAClC,SAAW,EAAA,MAAA;AAAA,IACX,aAAa,UAAgD,EAAA;AAAA,IAC7D,MAAM,QAAmD,CAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,KAAK,CAAC,CAAA;AAAA,IAChF,KAAO,EAAA,MAAA;AAAA;AAAA,IAEP,cAAgB,EAAA,MAAA;AAAA,IAChB,KAAO,EAAA,MAAA;AAAA,IACP,gBAAgB,UAAiC,EAAA;AAAA,GACnD,CAAA;AACF,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