This commit is contained in:
2026-05-25 17:08:18 +08:00
parent df501f6151
commit f1259b71b5
9178 changed files with 1626125 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { unit } from '@ant-design/cssinjs';
import { genCssVar } from '../../theme/util/genStyleUtils';
const genRTLStyle = token => {
const {
componentCls,
lineWidthBold,
antCls
} = token;
const itemCls = `${componentCls}-item`;
const [, varRef] = genCssVar(antCls, 'cmp-steps');
return {
[`${componentCls}${componentCls}-rtl`]: {
direction: 'rtl',
// nav
[`&${componentCls}-navigation${componentCls}-horizontal`]: {
[`${itemCls}:after`]: {
transform: 'translateY(-50%) rotate(-45deg)'
}
},
// panel
[`&${componentCls}-panel`]: {
[`${componentCls}-panel-arrow`]: {
transform: `scaleX(-1)`
},
[`&${componentCls}-filled`]: {
[itemCls]: {
'&:not(:first-child)': {
clipPath: `polygon(${[`calc(0px - ${varRef('item-base-width')}) 0px`, `calc(100% - ${unit(lineWidthBold)}) 0px`, `calc(100% - ${varRef('item-base-width')} - ${unit(lineWidthBold)}) 50%`, `calc(100% - ${unit(lineWidthBold)}) 100%`, `calc(0px - ${varRef('item-base-width')}) 100%`].join(',')})`
}
}
}
}
}
};
};
export default genRTLStyle;