2022-04-19 11:28:06 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import type { StepsToken } from '.';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-04-19 11:28:06 +08:00
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genStepsProgressStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
|
2022-04-19 11:28:06 +08:00
|
|
|
const { antCls, componentCls } = token;
|
|
|
|
|
|
|
|
return {
|
|
|
|
[`&${componentCls}-with-progress`]: {
|
|
|
|
[`${componentCls}-item`]: {
|
2022-06-01 11:19:05 +08:00
|
|
|
paddingTop: token.paddingXXS,
|
2022-11-07 15:18:48 +08:00
|
|
|
|
|
|
|
[`&-process ${componentCls}-item-container ${componentCls}-item-icon ${componentCls}-icon`]:
|
|
|
|
{
|
|
|
|
color: token.processIconColor,
|
|
|
|
},
|
2022-11-01 15:06:38 +08:00
|
|
|
},
|
2022-04-19 11:28:06 +08:00
|
|
|
|
2022-12-01 10:57:48 +08:00
|
|
|
[`&${componentCls}-vertical > ${componentCls}-item `]: {
|
|
|
|
paddingInlineStart: token.paddingXXS,
|
|
|
|
[`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
|
2022-11-01 15:06:38 +08:00
|
|
|
top: token.marginXXS,
|
2022-12-01 10:57:48 +08:00
|
|
|
insetInlineStart: token.stepsIconSize / 2 - token.lineWidth + token.paddingXXS,
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
2022-12-01 10:57:48 +08:00
|
|
|
},
|
2022-04-19 11:28:06 +08:00
|
|
|
|
2022-12-01 10:57:48 +08:00
|
|
|
[`&, &${componentCls}-small`]: {
|
|
|
|
[`&${componentCls}-horizontal ${componentCls}-item:first-child`]: {
|
2022-08-15 15:20:39 +08:00
|
|
|
paddingBottom: token.paddingXXS,
|
|
|
|
paddingInlineStart: token.paddingXXS,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2022-12-01 10:57:48 +08:00
|
|
|
[`&${componentCls}-small${componentCls}-vertical > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]:
|
|
|
|
{
|
|
|
|
insetInlineStart: token.stepsSmallIconSize / 2 - token.lineWidth + token.paddingXXS,
|
|
|
|
},
|
|
|
|
|
2022-08-15 15:20:39 +08:00
|
|
|
[`&${componentCls}-label-vertical`]: {
|
|
|
|
[`${componentCls}-item ${componentCls}-item-tail`]: {
|
|
|
|
top: token.margin - 2 * token.lineWidth,
|
|
|
|
},
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
[`${componentCls}-item-icon`]: {
|
|
|
|
position: 'relative',
|
|
|
|
|
|
|
|
[`${antCls}-progress`]: {
|
|
|
|
position: 'absolute',
|
2022-09-13 11:52:56 +08:00
|
|
|
insetBlockStart:
|
|
|
|
(token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2,
|
|
|
|
insetInlineStart:
|
|
|
|
(token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2,
|
2022-04-19 11:28:06 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genStepsProgressStyle;
|