UNPKG

wetrade-design

Version:

一款多语言支持Vue3的UI框架

287 lines (251 loc) 6.49 kB
@import '../../style/themes/index'; @import '../../style/mixins/index'; @steps-prefix-cls: ~'@{wd-prefix}-steps'; @process-icon-color: @brand-primary; @process-title-color: @text-primary; @process-description-color: @text-tertiary; @process-icon-text-color: @text-white; @wait-icon-color: @line-border; @wait-title-color: @text-tertiary; @wait-description-color: @text-tertiary; @wait-tail-color: @process-tail-color; @finish-icon-color: @process-icon-color; @finish-title-color: @text-primary; @finish-description-color: @text-tertiary; @finish-tail-color: @brand-primary; @error-icon-color: @fluctuation-rise-rise; @error-title-color: @fluctuation-rise-text; @error-description-color: @fluctuation-rise-text; @error-tail-color: @wait-tail-color; @steps-nav-active-color: @brand-primary; .@{steps-prefix-cls} { .reset-component(); display: flex; width: 100%; font-size: 0; text-align: initial; } .@{steps-prefix-cls}-item { position: relative; display: inline-block; flex: 1; overflow: hidden; vertical-align: top; line-height: normal; &-container { outline: none; } &:last-child { flex: none; } &:last-child > &-container > &-tail, &:last-child > &-container > &-content > &-title::after { display: none; } &-icon, &-content { display: inline-block; vertical-align: top; } &-icon { width: @steps-icon-size; height: @steps-icon-size; margin: @steps-icon-margin; font-size: @steps-icon-font-size; font-family: @font-family; line-height: @steps-icon-size; text-align: center; border: @steps-line-height @border-style-base @wait-icon-color; border-radius: @steps-icon-size; transition: background-color 0.3s, border-color 0.3s; display: inline-flex; justify-content: center; align-items: center; } &-tail { position: absolute; top: 12px; left: 0; width: 100%; padding: 0 10px; &::after { display: inline-block; width: 100%; height: @steps-line-height; background: @border-color-split; transition: background 0.3s; content: ''; } } &-title { position: relative; display: inline-block; padding-right: 16px; color: @text-color; font-size: @steps-title-font-size; line-height: @steps-title-line-height; &::after { position: absolute; top: (@steps-title-line-height / 2); left: 100%; display: block; width: 9999px; height: @steps-line-height; background: @wait-tail-color; content: ''; } } &-subtitle { display: inline; margin-left: 8px; color: @text-color-secondary; font-weight: normal; font-size: @font-size-base; } &-description { color: @text-color-secondary; font-size: @font-size-base; } .step-item-status(wait); .step-item-status(process); &-process > &-container > &-icon { background: @process-icon-color; .@{steps-prefix-cls}-icon { color: @process-icon-text-color; } } &-wait > &-container > &-icon { .@{steps-prefix-cls}-icon { color: @text-disable; } } &-error > &-container > &-icon { background: @error-icon-color; .@{steps-prefix-cls}-icon { color: @icon-white; } } &-finish > &-container > &-icon { background: @process-icon-color; .@{steps-prefix-cls}-icon { color: @process-icon-text-color; } } &-process > &-container > &-title { font-weight: 500; } .step-item-status(finish); .step-item-status(error); &.@{steps-prefix-cls}-next-error .@{steps-prefix-cls}-item-title::after { background: @error-icon-color; } &-disabled { cursor: not-allowed; } } // ===================== Clickable ===================== .@{steps-prefix-cls}-click { .@{steps-prefix-cls}-item { &:not(.@{steps-prefix-cls}-item-disabled) { &:not(.@{steps-prefix-cls}-item-active) { & > .@{steps-prefix-cls}-item-container[role='button'] { cursor: pointer; } &:hover { .@{steps-prefix-cls}-item { &-title, &-subtitle, &-description { color: @brand-primary; } } } } } } .@{steps-prefix-cls}-item-wait { &:not(.@{steps-prefix-cls}-item-disabled) { & > .@{steps-prefix-cls}-item-container[role='button']:hover { color: @brand-primary; .@{steps-prefix-cls}-item-icon { border-color: @brand-primary; .@{steps-prefix-cls}-icon { color: @brand-primary; } } } } } } .@{steps-prefix-cls} .@{steps-prefix-cls}-item { &:not(.@{steps-prefix-cls}-item-active) { & > .@{steps-prefix-cls}-item-container[role='button'] { .@{steps-prefix-cls}-item { &-title, &-subtitle, &-description, &-icon .@{steps-prefix-cls}-icon { transition: color 0.3s; } } } } } .@{steps-prefix-cls}-horizontal:not(.@{steps-prefix-cls}-label-vertical) { .@{steps-prefix-cls}-item { padding-left: @steps-item-padding-left; white-space: nowrap; &:first-child { padding-left: 0; } &:last-child .@{steps-prefix-cls}-item-title { padding-right: 0; } &-tail { display: none; } &-description { max-width: @steps-description-max-width; white-space: normal; line-height: @steps-description-line-height; } } } .step-item-status(@status) { @icon-color: '@{status}-icon-color'; @title-color: '@{status}-title-color'; @description-color: '@{status}-description-color'; @tail-color: '@{status}-tail-color'; &-@{status} &-icon { background-color: @steps-background; border-color: @@icon-color; > .@{steps-prefix-cls}-icon { color: @@icon-color; font-weight: 500; .@{steps-prefix-cls}-icon-dot { background: @@icon-color; } } } &-@{status} > &-container > &-content > &-title { color: @@title-color; font-weight: 600; &::after { background-color: @@tail-color; } } &-@{status} > &-container > &-content > &-description { color: @@description-color; } &-@{status} > &-container > &-tail::after { background-color: @@tail-color; } } @import './custom-icon'; @import './small'; @import './vertical'; @import './label-placement'; @import './progress-dot'; @import './nav'; @import './rtl'; @import './progress.less';