progress.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genStepsProgressStyle = token => {
  7. const {
  8. antCls,
  9. componentCls
  10. } = token;
  11. return {
  12. [`&${componentCls}-with-progress`]: {
  13. [`${componentCls}-item`]: {
  14. paddingTop: token.paddingXXS,
  15. [`&-process ${componentCls}-item-container ${componentCls}-item-icon ${componentCls}-icon`]: {
  16. color: token.processIconColor
  17. }
  18. },
  19. [`&${componentCls}-vertical > ${componentCls}-item `]: {
  20. paddingInlineStart: token.paddingXXS,
  21. [`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  22. top: token.marginXXS,
  23. insetInlineStart: token.stepsIconSize / 2 - token.lineWidth + token.paddingXXS
  24. }
  25. },
  26. [`&, &${componentCls}-small`]: {
  27. [`&${componentCls}-horizontal ${componentCls}-item:first-child`]: {
  28. paddingBottom: token.paddingXXS,
  29. paddingInlineStart: token.paddingXXS
  30. }
  31. },
  32. [`&${componentCls}-small${componentCls}-vertical > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  33. insetInlineStart: token.stepsSmallIconSize / 2 - token.lineWidth + token.paddingXXS
  34. },
  35. [`&${componentCls}-label-vertical`]: {
  36. [`${componentCls}-item ${componentCls}-item-tail`]: {
  37. top: token.margin - 2 * token.lineWidth
  38. }
  39. },
  40. [`${componentCls}-item-icon`]: {
  41. position: 'relative',
  42. [`${antCls}-progress`]: {
  43. position: 'absolute',
  44. insetBlockStart: (token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2,
  45. insetInlineStart: (token.stepsIconSize - token.stepsProgressSize - token.lineWidth * 2) / 2
  46. }
  47. }
  48. }
  49. };
  50. };
  51. var _default = exports.default = genStepsProgressStyle;