choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
195 lines (171 loc) • 4.62 kB
text/less
@import '../../style/themes/default';
@import '../../style/mixins/index';
@import '../../checkbox/style/mixin';
@transfer-prefix-cls: ~'@{c7n-prefix}-transfer';
.@{transfer-prefix-cls} {
.reset-component;
position: relative;
&-list {
position: relative;
display: inline-block;
width: @transfer-width;
height: @transfer-height;
padding-top: @transfer-basic-list-padding-top;
vertical-align: middle;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
&-with-footer {
padding-bottom: @transfer-basic-list-padding-bottom;
}
&-search {
padding: 0 @control-padding-horizontal-sm;
&-action {
position: absolute;
top: @transfer-search-action-top;
right: @transfer-search-action-right;
bottom: 0.04rem;
width: 0.28rem;
color: @disabled-color;
line-height: @input-height-base;
text-align: center;
.@{iconfont-css-prefix} {
color: @disabled-color;
transition: all @animation-duration-slow;
&:hover {
color: @text-color-secondary;
}
}
span& {
pointer-events: none;
}
}
}
&-header {
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: @transfer-basic-header-padding;
overflow: hidden;
color: @text-color;
font-size: @transfer-basic-header-font-size;
line-height: @transfer-basic-header-line-height;
background: @component-background;
border-bottom: @transfer-basic-header-border-bottom;
border-radius: @border-radius-base @border-radius-base 0 0;
&-title {
position: absolute;
right: 0.12rem;
font-weight: @transfer-basic-header-title-font-weight;
}
}
&-body {
position: relative;
height: 100%;
font-size: @font-size-base;
&-search-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: @transfer-basic-body-search-wrapper-padding;
}
}
&-body-with-search {
padding-top: @transfer-body-with-search-padding-top;
}
&-content {
height: 100%;
margin: 0;
padding: @transfer-content-padding;
overflow: auto;
list-style: none;
> .LazyLoad {
animation: transferHighlightIn 1s;
}
&-item {
min-height: 0.32rem;
margin: @transfer-basic-list-item-margin;
padding: @transfer-basic-list-item-padding;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
transition: all @animation-duration-slow;
> span {
padding-right: 0;
}
}
&-item:not(&-item-disabled):hover {
background-color: @item-hover-bg;
cursor: pointer;
}
&-item-disabled {
color: @btn-disable-color;
cursor: not-allowed;
}
&-item-highlight {
background-color: @transfer-selected-bg;
}
}
&-body-not-found {
position: absolute;
top: 50%;
display: none;
width: 100%;
margin-top: -0.1rem;
padding-top: 0;
color: @disabled-color;
text-align: center;
}
&-content:empty + &-body-not-found {
display: block;
}
&-footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
border-top: @border-width-base @border-style-base @border-color-split;
border-radius: 0 0 @border-radius-base @border-radius-base;
}
}
&-operation,
&-sort {
display: inline-block;
margin: 0 0.08rem;
overflow: hidden;
vertical-align: middle;
.@{c7n-prefix}-btn {
display: block;
&:first-child {
margin-bottom: 0.04rem;
}
.@{iconfont-css-prefix} {
font-size: 0.12rem;
}
+ .@{c7n-prefix}-btn {
margin-left: 0;
}
}
}
&-operation-custom-left-active,
&-operation-custom-right-active,
&-sort-custom-up-active,
&-sort-custom-down-active {
cursor: pointer;
}
&-operation-custom-left-disable,
&-operation-custom-right-disable,
&-sort-custom-up-disable,
&-sort-custom-down-disable {
cursor: no-drop;
}
}
@keyframes transferHighlightIn {
0% {
background: @primary-2;
}
100% {
background: transparent;
}
}