vertical.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genStepsVerticalStyle = token => {
  7. const {
  8. componentCls,
  9. stepsSmallIconSize,
  10. stepsIconSize
  11. } = token;
  12. return {
  13. [`&${componentCls}-vertical`]: {
  14. display: 'flex',
  15. flexDirection: 'column',
  16. [`> ${componentCls}-item`]: {
  17. display: 'block',
  18. flex: '1 0 auto',
  19. paddingInlineStart: 0,
  20. overflow: 'visible',
  21. [`${componentCls}-item-icon`]: {
  22. float: 'left',
  23. marginInlineEnd: token.margin
  24. },
  25. [`${componentCls}-item-content`]: {
  26. display: 'block',
  27. minHeight: token.controlHeight * 1.5,
  28. overflow: 'hidden'
  29. },
  30. [`${componentCls}-item-title`]: {
  31. lineHeight: `${stepsIconSize}px`
  32. },
  33. [`${componentCls}-item-description`]: {
  34. paddingBottom: token.paddingSM
  35. }
  36. },
  37. [`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  38. position: 'absolute',
  39. top: 0,
  40. insetInlineStart: token.stepsIconSize / 2 - token.lineWidth,
  41. width: token.lineWidth,
  42. height: '100%',
  43. padding: `${stepsIconSize + token.marginXXS * 1.5}px 0 ${token.marginXXS * 1.5}px`,
  44. '&::after': {
  45. width: token.lineWidth,
  46. height: '100%'
  47. }
  48. },
  49. [`> ${componentCls}-item:not(:last-child) > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  50. display: 'block'
  51. },
  52. [` > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-content > ${componentCls}-item-title`]: {
  53. '&::after': {
  54. display: 'none'
  55. }
  56. },
  57. [`&${componentCls}-small ${componentCls}-item-container`]: {
  58. [`${componentCls}-item-tail`]: {
  59. position: 'absolute',
  60. top: 0,
  61. insetInlineStart: token.stepsSmallIconSize / 2 - token.lineWidth,
  62. padding: `${stepsSmallIconSize + token.marginXXS * 1.5}px 0 ${token.marginXXS * 1.5}px`
  63. },
  64. [`${componentCls}-item-title`]: {
  65. lineHeight: `${stepsSmallIconSize}px`
  66. }
  67. }
  68. }
  69. };
  70. };
  71. var _default = exports.default = genStepsVerticalStyle;