label-placement.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _cssinjs = require("@ant-design/cssinjs");
  7. const genStepsLabelPlacementStyle = token => {
  8. const {
  9. componentCls,
  10. iconSize,
  11. lineHeight,
  12. iconSizeSM
  13. } = token;
  14. return {
  15. [`&${componentCls}-label-vertical`]: {
  16. [`${componentCls}-item`]: {
  17. overflow: 'visible',
  18. '&-tail': {
  19. marginInlineStart: token.calc(iconSize).div(2).add(token.controlHeightLG).equal(),
  20. padding: `0 ${(0, _cssinjs.unit)(token.paddingLG)}`
  21. },
  22. '&-content': {
  23. display: 'block',
  24. width: token.calc(iconSize).div(2).add(token.controlHeightLG).mul(2).equal(),
  25. marginTop: token.marginSM,
  26. textAlign: 'center'
  27. },
  28. '&-icon': {
  29. display: 'inline-block',
  30. marginInlineStart: token.controlHeightLG
  31. },
  32. '&-title': {
  33. paddingInlineEnd: 0,
  34. paddingInlineStart: 0,
  35. '&::after': {
  36. display: 'none'
  37. }
  38. },
  39. '&-subtitle': {
  40. display: 'block',
  41. marginBottom: token.marginXXS,
  42. marginInlineStart: 0,
  43. lineHeight
  44. }
  45. },
  46. [`&${componentCls}-small:not(${componentCls}-dot)`]: {
  47. [`${componentCls}-item`]: {
  48. '&-icon': {
  49. marginInlineStart: token.calc(iconSize).sub(iconSizeSM).div(2).add(token.controlHeightLG).equal()
  50. }
  51. }
  52. }
  53. }
  54. };
  55. };
  56. var _default = exports.default = genStepsLabelPlacementStyle;