99ad9d99e3467f244695153395f3553ba7bfb30ddba41b66038f46272241afb0eb78a7f3859aa572d6d0d6dace2ce6afc884ed4ba69bccf9a9923839551811 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. @use 'mixins/mixins' as *;
  2. @use 'common/var' as *;
  3. @include b(step) {
  4. position: relative;
  5. flex-shrink: 1;
  6. @include pseudo(last-of-type) {
  7. @include e(line) {
  8. display: none;
  9. }
  10. // 只有未设置 space 的情况下才自适应宽度
  11. @include when(flex) {
  12. flex-basis: auto !important;
  13. flex-shrink: 0;
  14. flex-grow: 0;
  15. }
  16. @include e((main, description)) {
  17. padding-right: 0;
  18. }
  19. }
  20. @include e(head) {
  21. position: relative;
  22. width: 100%;
  23. @include when(process) {
  24. color: getCssVar('text-color', 'primary');
  25. border-color: getCssVar('text-color', 'primary');
  26. }
  27. @include when(wait) {
  28. color: getCssVar('text-color', 'placeholder');
  29. border-color: getCssVar('text-color', 'placeholder');
  30. }
  31. @include when(success) {
  32. color: getCssVar('color-success');
  33. border-color: getCssVar('color-success');
  34. }
  35. @include when(error) {
  36. color: getCssVar('color-danger');
  37. border-color: getCssVar('color-danger');
  38. }
  39. @include when(finish) {
  40. color: getCssVar('color-primary');
  41. border-color: getCssVar('color-primary');
  42. }
  43. }
  44. @include e(icon) {
  45. position: relative;
  46. z-index: 1;
  47. display: inline-flex;
  48. justify-content: center;
  49. align-items: center;
  50. width: 24px;
  51. height: 24px;
  52. font-size: 14px;
  53. box-sizing: border-box;
  54. background: getCssVar('bg-color');
  55. transition: 0.15s ease-out;
  56. @include when(text) {
  57. border-radius: 50%;
  58. border: 2px solid;
  59. border-color: currentColor;
  60. }
  61. @include when(icon) {
  62. width: 40px;
  63. }
  64. }
  65. @include e(icon-inner) {
  66. display: inline-block;
  67. user-select: none;
  68. text-align: center;
  69. font-weight: bold;
  70. line-height: 1;
  71. color: inherit;
  72. &[class*='#{$namespace}-icon']:not(.is-status) {
  73. font-size: 25px;
  74. font-weight: normal;
  75. }
  76. // 组件自身表示状态的图标
  77. @include when(status) {
  78. transform: translateY(1px);
  79. }
  80. }
  81. @include e(line) {
  82. position: absolute;
  83. border-color: currentColor;
  84. background-color: getCssVar('text-color', 'placeholder');
  85. }
  86. @include e(line-inner) {
  87. display: block;
  88. border-width: 1px;
  89. border-style: solid;
  90. border-color: currentColor;
  91. transition: 0.15s ease-out;
  92. box-sizing: border-box;
  93. width: 0;
  94. height: 0;
  95. }
  96. @include e(main) {
  97. white-space: normal;
  98. text-align: left;
  99. }
  100. @include e(title) {
  101. font-size: 16px;
  102. line-height: 38px;
  103. @include when(process) {
  104. font-weight: bold;
  105. color: getCssVar('text-color', 'primary');
  106. }
  107. @include when(wait) {
  108. color: getCssVar('text-color', 'placeholder');
  109. }
  110. @include when(success) {
  111. color: getCssVar('color-success');
  112. }
  113. @include when(error) {
  114. color: getCssVar('color-danger');
  115. }
  116. @include when(finish) {
  117. color: getCssVar('color-primary');
  118. }
  119. }
  120. @include e(description) {
  121. padding-right: 10%;
  122. margin-top: -5px;
  123. font-size: 12px;
  124. line-height: 20px;
  125. font-weight: normal;
  126. @include when(process) {
  127. color: getCssVar('text-color', 'primary');
  128. }
  129. @include when(wait) {
  130. color: getCssVar('text-color', 'placeholder');
  131. }
  132. @include when(success) {
  133. color: getCssVar('color-success');
  134. }
  135. @include when(error) {
  136. color: getCssVar('color-danger');
  137. }
  138. @include when(finish) {
  139. color: getCssVar('color-primary');
  140. }
  141. }
  142. @include when(horizontal) {
  143. display: inline-block;
  144. @include e(line) {
  145. height: 2px;
  146. top: 11px;
  147. left: 0;
  148. right: 0;
  149. }
  150. }
  151. @include when(vertical) {
  152. display: flex;
  153. @include e(head) {
  154. flex-grow: 0;
  155. width: 24px;
  156. }
  157. @include e(main) {
  158. padding-left: 10px;
  159. flex-grow: 1;
  160. }
  161. @include e(title) {
  162. line-height: 24px;
  163. padding-bottom: 8px;
  164. }
  165. @include e(line) {
  166. width: 2px;
  167. top: 0;
  168. bottom: 0;
  169. left: 11px;
  170. }
  171. @include e(icon) {
  172. @include when(icon) {
  173. width: 24px;
  174. }
  175. }
  176. @include e(description) {
  177. padding-right: 0;
  178. }
  179. }
  180. @include when(center) {
  181. @include e(head) {
  182. text-align: center;
  183. }
  184. @include e(main) {
  185. text-align: center;
  186. }
  187. @include e(description) {
  188. padding-left: 20%;
  189. padding-right: 20%;
  190. }
  191. @include e(line) {
  192. left: 50%;
  193. right: -50%;
  194. }
  195. }
  196. @include when(simple) {
  197. display: flex;
  198. align-items: center;
  199. @include e(head) {
  200. width: auto;
  201. font-size: 0;
  202. padding-right: 10px;
  203. }
  204. @include e(icon) {
  205. background: transparent;
  206. width: 16px;
  207. height: 16px;
  208. font-size: 12px;
  209. }
  210. @include e(icon-inner) {
  211. &[class*='#{$namespace}-icon']:not(.is-status) {
  212. font-size: 18px;
  213. }
  214. &.is-status {
  215. transform: scale(0.8) translateY(1px);
  216. }
  217. }
  218. @include e(main) {
  219. position: relative;
  220. display: flex;
  221. align-items: stretch;
  222. flex-grow: 1;
  223. }
  224. @include e(title) {
  225. font-size: 16px;
  226. line-height: 20px;
  227. }
  228. @include pseudo('not(:last-of-type)') {
  229. @include e(title) {
  230. max-width: 50%;
  231. overflow-wrap: break-word;
  232. }
  233. }
  234. @include e(arrow) {
  235. flex-grow: 1;
  236. display: flex;
  237. align-items: center;
  238. justify-content: center;
  239. &::before,
  240. &::after {
  241. content: '';
  242. display: inline-block;
  243. position: absolute;
  244. height: 15px;
  245. width: 1px;
  246. background: getCssVar('text-color', 'placeholder');
  247. }
  248. &::before {
  249. transform: rotate(-45deg) translateY(-4px);
  250. transform-origin: 0 0;
  251. }
  252. &::after {
  253. transform: rotate(45deg) translateY(4px);
  254. transform-origin: 100% 100%;
  255. }
  256. }
  257. @include pseudo(last-of-type) {
  258. @include e(arrow) {
  259. display: none;
  260. }
  261. }
  262. }
  263. }