2019-09-03 19:18:16 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2020-02-11 14:44:29 +08:00
|
|
|
|
2020-02-01 20:19:22 +08:00
|
|
|
@keyframes transfer-slide-in-from-left {
|
|
|
|
0% {
|
|
|
|
transform: translateX(-150%);
|
|
|
|
}
|
2020-01-18 13:28:20 +08:00
|
|
|
100% {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(0);
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-01 20:19:22 +08:00
|
|
|
@keyframes transfer-slide-out-to-right {
|
2020-01-18 13:28:20 +08:00
|
|
|
0% {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(0);
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
2020-02-01 20:19:22 +08:00
|
|
|
100% {
|
|
|
|
transform: translateX(150%);
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
2020-02-01 20:19:22 +08:00
|
|
|
}
|
2020-01-18 13:28:20 +08:00
|
|
|
|
2020-02-01 20:19:22 +08:00
|
|
|
@keyframes transfer-slide-in-from-right {
|
|
|
|
0% {
|
|
|
|
transform: translateX(150%);
|
|
|
|
}
|
2020-01-18 13:28:20 +08:00
|
|
|
100% {
|
|
|
|
transform: translateX(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-01 20:19:22 +08:00
|
|
|
@keyframes transfer-slide-out-to-left {
|
2020-01-18 13:28:20 +08:00
|
|
|
0% {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(0);
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
100% {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(-150%);
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-02 14:19:27 +08:00
|
|
|
@mixin transfer-animation-mixin($size) {
|
|
|
|
@keyframes transfer-height-collapse--#{$size} {
|
|
|
|
0% {
|
|
|
|
max-height: map-get($--n-height, $size);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
max-height: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes transfer-height-expand--#{$size} {
|
|
|
|
0% {
|
|
|
|
max-height: 0;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
max-height: map-get($--n-height, $size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin transfer-size-mixin($size) {
|
|
|
|
@include m($size + '-size') {
|
2020-03-03 17:41:05 +08:00
|
|
|
@include m(filterable) {
|
|
|
|
@include b(transfer-list) {
|
|
|
|
@include b(transfer-list-body) {
|
|
|
|
height: map-get($--n-height, $size) * 5.6 + 45px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 14:19:27 +08:00
|
|
|
@include b(transfer-list) {
|
|
|
|
@include b(transfer-list-header) {
|
|
|
|
font-size: map-get($--n-font-size, $size);
|
|
|
|
height: map-get($--n-height, $size) + 6px;
|
|
|
|
}
|
2020-03-06 23:41:21 +08:00
|
|
|
@include b(empty) {
|
|
|
|
font-size: map-get($--n-font-size, $size);
|
|
|
|
}
|
2020-03-02 14:19:27 +08:00
|
|
|
@include b(transfer-list-body) {
|
|
|
|
height: map-get($--n-height, $size) * 5.6;
|
|
|
|
@include b(transfer-list-item) {
|
|
|
|
font-size: map-get($--n-font-size, $size);
|
|
|
|
height: map-get($--n-height, $size);
|
|
|
|
max-height: map-get($--n-height, $size);
|
|
|
|
@include m(source) {
|
|
|
|
@include m(enter) {
|
|
|
|
animation-name: transfer-height-expand--#{$size}, transfer-slide-in-from-right;
|
|
|
|
}
|
|
|
|
@include m(leave) {
|
|
|
|
animation-name: transfer-height-collapse--#{$size}, transfer-slide-out-to-right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(target) {
|
|
|
|
@include m(enter) {
|
|
|
|
animation-name: transfer-height-expand--#{$size}, transfer-slide-in-from-left;
|
|
|
|
}
|
|
|
|
@include m(leave) {
|
|
|
|
animation-name: transfer-height-collapse--#{$size}, transfer-slide-out-to-left;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include transfer-animation-mixin('small');
|
|
|
|
@include transfer-animation-mixin('medium');
|
|
|
|
@include transfer-animation-mixin('large');
|
|
|
|
|
2019-11-08 16:07:20 +08:00
|
|
|
@include themes-mixin {
|
|
|
|
@include b(transfer) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
display: flex;
|
2020-02-02 02:06:54 +08:00
|
|
|
width: 444px;
|
2020-03-02 14:19:27 +08:00
|
|
|
@include transfer-size-mixin('small');
|
|
|
|
@include transfer-size-mixin('medium');
|
|
|
|
@include transfer-size-mixin('large');
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-list) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
background-clip: padding-box;
|
2020-03-05 13:46:03 +08:00
|
|
|
width: calc(50% - 36px);
|
2020-03-02 14:19:27 +08:00
|
|
|
position: relative;
|
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-radius: $--n-transfer-border-radius;
|
2020-02-02 02:06:54 +08:00
|
|
|
@include b(virtual-scroller) {
|
|
|
|
height: 100%;
|
|
|
|
scrollbar-width: none;
|
|
|
|
-moz-scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 14:19:27 +08:00
|
|
|
@include e(border-mask) {
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
border-radius: $--n-transfer-border-radius;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include e(border-mask) {
|
|
|
|
border: 1px solid $--transfer-border-color;
|
|
|
|
pointer-events: $--transfer-list-border-mask-pointer-events;
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
|
|
|
background-color: map-get($--transfer-list-background-color, 'default');
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-list-header) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
box-sizing: border-box;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier, border-color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
display: flex;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-radius: $--n-transfer-border-radius $--n-transfer-border-radius 0 0;
|
2019-12-15 22:21:47 +08:00
|
|
|
align-items: center;
|
|
|
|
background-clip: padding-box;
|
|
|
|
@include e(checkbox) {
|
|
|
|
position: relative;
|
2020-03-06 23:41:21 +08:00
|
|
|
padding: 0 9px 0 14px;
|
2019-12-15 22:21:47 +08:00
|
|
|
@include b(checkbox) {
|
|
|
|
display: block;
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
}
|
2019-09-03 19:18:16 +08:00
|
|
|
}
|
2019-12-15 22:21:47 +08:00
|
|
|
background-color: map-get($--transfer-list-header-background-color, 'default');
|
2019-11-08 16:07:20 +08:00
|
|
|
@include e(header) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
flex: 1;
|
|
|
|
line-height: 1;
|
2020-02-27 23:02:58 +08:00
|
|
|
font-weight: $--n-strong-weight;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
|
|
|
color: map-get($--transfer-list-header-text-color, 'default');
|
2019-11-08 16:07:20 +08:00
|
|
|
@include m(disabled) {
|
2019-12-15 22:21:47 +08:00
|
|
|
color: map-get($--transfer-list-header-text-color, 'disabled');
|
2019-11-08 16:07:20 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-15 22:21:47 +08:00
|
|
|
@include e(extra) {
|
|
|
|
@include once {
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
font-size: 12px;
|
|
|
|
justify-self: flex-end;
|
|
|
|
margin-right: 14px;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
color: map-get($--transfer-list-header-extra-text-color, 'default');
|
2019-09-03 19:18:16 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-list-body) {
|
2020-02-21 12:53:30 +08:00
|
|
|
@include b(transfer-filter) {
|
2020-03-02 14:19:27 +08:00
|
|
|
border-bottom: 1px solid $--transfer-filter-border-color;
|
2020-02-21 12:53:30 +08:00
|
|
|
}
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: hidden;
|
2019-09-04 11:26:24 +08:00
|
|
|
position: relative;
|
2019-12-15 22:21:47 +08:00
|
|
|
height: 272px;
|
2020-02-05 22:20:12 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-bottom-right-radius: $--n-transfer-border-radius;
|
|
|
|
border-bottom-left-radius: $--n-transfer-border-radius;
|
2020-02-05 22:20:12 +08:00
|
|
|
@include b(transfer-list-flex-container) {
|
|
|
|
flex: 1;
|
|
|
|
position: relative;
|
|
|
|
@include b(scrollbar) {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: unset;
|
|
|
|
@include b(scrollbar-content) {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(empty) {
|
2020-03-06 23:41:21 +08:00
|
|
|
@include fade-in-transition;
|
2020-02-05 22:20:12 +08:00
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%) translateX(-50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(transfer-filter) {
|
2020-03-02 14:19:27 +08:00
|
|
|
padding: 8px 8px;
|
2020-02-05 22:20:12 +08:00
|
|
|
box-sizing: border-box;
|
2020-03-02 14:19:27 +08:00
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(transfer-list-content) {
|
|
|
|
@include once {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
position: relative;
|
2020-01-18 13:28:20 +08:00
|
|
|
@include m(animation-disabled) {
|
|
|
|
@include b(transfer-list-item) {
|
|
|
|
animation: none !important;
|
|
|
|
}
|
|
|
|
}
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-list-item) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
@include e(extra) {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
padding-right: 4px;
|
|
|
|
}
|
2020-01-18 13:28:20 +08:00
|
|
|
@include m(source) {
|
|
|
|
animation-fill-mode: forwards;
|
|
|
|
@include m(enter) {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(150%);
|
|
|
|
animation-duration: .25s, .25s;
|
2020-02-11 14:44:29 +08:00
|
|
|
animation-timing-function: $--n-ease-in-out-cubic-bezier, $--n-ease-out-cubic-bezier;
|
2020-02-01 20:19:22 +08:00
|
|
|
animation-delay: 0s, .25s;
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
@include m(leave) {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(-150%);
|
|
|
|
animation-duration: .25s, .25s;
|
2020-02-11 14:44:29 +08:00
|
|
|
animation-timing-function: $--n-ease-in-out-cubic-bezier, $--n-ease-in-cubic-bezier;
|
2020-02-01 20:19:22 +08:00
|
|
|
animation-delay: .25s, 0s;
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(target) {
|
|
|
|
animation-fill-mode: forwards;
|
|
|
|
@include m(enter) {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(-150%);
|
|
|
|
animation-duration: .25s, .25s;
|
2020-02-11 14:44:29 +08:00
|
|
|
animation-timing-function: $--n-ease-in-out-cubic-bezier, $--n-ease-out-cubic-bezier;
|
2020-02-01 20:19:22 +08:00
|
|
|
animation-delay: 0s, .25s;
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
@include m(leave) {
|
2020-02-01 20:19:22 +08:00
|
|
|
transform: translateX(150%);
|
|
|
|
animation-duration: .25s, .25s;
|
2020-02-11 14:44:29 +08:00
|
|
|
animation-timing-function: $--n-ease-in-out-cubic-bezier, $--n-ease-in-cubic-bezier;
|
2020-02-01 20:19:22 +08:00
|
|
|
animation-delay: .25s, 0s;
|
2020-01-18 13:28:20 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
}
|
2019-12-15 22:21:47 +08:00
|
|
|
color: map-get($--transfer-item-text-color, 'default');
|
2019-11-08 16:07:20 +08:00
|
|
|
@include e(checkbox) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
2020-03-06 23:41:21 +08:00
|
|
|
padding: 0 9px 0 14px;
|
2019-12-15 22:21:47 +08:00
|
|
|
@include b(checkbox) {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 14:19:27 +08:00
|
|
|
padding-left: 14px;
|
2019-11-08 16:07:20 +08:00
|
|
|
}
|
|
|
|
@include m(disabled) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
color: map-get($--transfer-item-text-color, 'disabled');
|
2019-09-03 19:18:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-gap) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
2020-03-05 13:46:03 +08:00
|
|
|
width: 72px;
|
2019-12-15 22:21:47 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include b(transfer-button) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
width: 36px;
|
|
|
|
height: 36px;
|
|
|
|
border-radius: 18px;
|
|
|
|
cursor: pointer;
|
|
|
|
&:first-child {
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
@include m(to) {
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
2019-09-04 11:26:24 +08:00
|
|
|
}
|
|
|
|
@include e(icon) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
pointer-events: none;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: fill .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-15 22:21:47 +08:00
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
fill: map-get($--transfer-gap-button-background-color, 'default');
|
2019-09-04 11:26:24 +08:00
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
&:hover {
|
|
|
|
@include e(icon) {
|
|
|
|
fill: map-get($--transfer-gap-button-background-color, 'hover');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
@include e(icon) {
|
|
|
|
fill: map-get($--transfer-gap-button-background-color, 'active');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(disabled) {
|
2019-12-15 22:21:47 +08:00
|
|
|
@include once {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2019-11-08 16:07:20 +08:00
|
|
|
@include e(icon) {
|
|
|
|
fill: map-get($--transfer-gap-button-background-color, 'disabled') !important;
|
|
|
|
}
|
2019-09-04 11:26:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-03 19:18:16 +08:00
|
|
|
}
|
|
|
|
}
|