mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
201 lines
6.2 KiB
SCSS
201 lines
6.2 KiB
SCSS
@import './mixins/mixins.scss';
|
|
@import './themes/vars.scss';
|
|
|
|
/**
|
|
* There are some theme related hard codes in transfer.
|
|
* Emmm, when I am writing these code I can't figure out a better solution.
|
|
* So just let it be.
|
|
* ...
|
|
* When I find myself in times of trouble
|
|
* blablabla
|
|
* ...
|
|
*/
|
|
@include themes-mixin {
|
|
@include b(transfer) {
|
|
@include once {
|
|
display: flex;
|
|
}
|
|
@include b(transfer-list) {
|
|
@include once {
|
|
background-clip: padding-box;
|
|
width: 182px;
|
|
height: 311px;
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier, border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
border-radius: 6px;
|
|
}
|
|
background-color: map-get($--transfer-list-background-color, 'default');
|
|
border: 1px solid $--transfer-list-border-color;
|
|
@include b(transfer-list-header) {
|
|
@include once {
|
|
box-sizing: border-box;
|
|
margin: -1px -1px 0 -1px;
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier, border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
display: flex;
|
|
border-radius: 6px 6px 0 0;
|
|
align-items: center;
|
|
height: 40px;
|
|
background-clip: padding-box;
|
|
@include e(checkbox) {
|
|
position: relative;
|
|
padding: 0 8px 0 14px;
|
|
@include b(checkbox) {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
background-color: map-get($--transfer-list-header-background-color, 'default');
|
|
border-top: 1px solid $--transfer-header-border-color;
|
|
border-left: 1px solid $--transfer-header-border-color;
|
|
border-right: 1px solid $--transfer-header-border-color;
|
|
@include e(header) {
|
|
@include once {
|
|
flex: 1;
|
|
line-height: 1;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
}
|
|
color: map-get($--transfer-list-header-text-color, 'default');
|
|
@include m(disabled) {
|
|
color: map-get($--transfer-list-header-text-color, 'disabled');
|
|
}
|
|
}
|
|
@include e(extra) {
|
|
@include once {
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
font-size: 12px;
|
|
justify-self: flex-end;
|
|
margin-right: 14px;
|
|
white-space: nowrap;
|
|
}
|
|
color: map-get($--transfer-list-header-extra-text-color, 'default');
|
|
}
|
|
}
|
|
@include b(transfer-list-body) {
|
|
/** hard-code **/
|
|
@if $theme == 'dark' {
|
|
margin-left: -1px;
|
|
margin-right: -1px;
|
|
} @else {
|
|
padding: 0 1px;
|
|
}
|
|
@include once {
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
position: relative;
|
|
height: 272px;
|
|
border-bottom-right-radius: 6px;
|
|
border-bottom-left-radius: 6px;
|
|
@include b(scrollbar-content) {
|
|
width: 100%;
|
|
}
|
|
}
|
|
@include b(transfer-list-content) {
|
|
@include once {
|
|
padding: 0;
|
|
margin: 0;
|
|
position: relative;
|
|
}
|
|
@include b(transfer-list-light-bar) {
|
|
@include once {
|
|
@include fade-in-transition(transfer-list-light-bar);
|
|
height: 34px;
|
|
transition: top .15s $--n-ease-in-out-cubic-bezier;
|
|
width: 100%;
|
|
position: absolute;
|
|
}
|
|
background-color: map-get($--tranfer-item-lightbar-background-color, 'default');
|
|
}
|
|
@include b(transfer-list-item) {
|
|
@include once {
|
|
@include slide-right-transition(transfer-list-item-source);
|
|
@include slide-left-transition(transfer-list-item-target);
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
position: relative;
|
|
cursor: pointer;
|
|
max-height: 34px;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
height: 34px;
|
|
@include e(extra) {
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
padding-right: 4px;
|
|
}
|
|
}
|
|
color: map-get($--transfer-item-text-color, 'default');
|
|
@include e(checkbox) {
|
|
@include once {
|
|
position: relative;
|
|
padding: 0 8px 0 14px;
|
|
@include b(checkbox) {
|
|
display: block;
|
|
}
|
|
}
|
|
@if $theme == 'dark' {
|
|
padding-left: 15px;
|
|
}
|
|
}
|
|
@include m(disabled) {
|
|
@include once {
|
|
cursor: not-allowed;
|
|
}
|
|
color: map-get($--transfer-item-text-color, 'disabled');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@include b(transfer-gap) {
|
|
@include once {
|
|
width: 96px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
}
|
|
@include b(transfer-button) {
|
|
@include once {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 18px;
|
|
cursor: pointer;
|
|
&:first-child {
|
|
margin-bottom: 12px;
|
|
}
|
|
@include m(to) {
|
|
transform: rotate(180deg);
|
|
}
|
|
}
|
|
@include e(icon) {
|
|
@include once {
|
|
pointer-events: none;
|
|
transition: fill .3s $--n-ease-in-out-cubic-bezier;
|
|
}
|
|
fill: map-get($--transfer-gap-button-background-color, 'default');
|
|
}
|
|
&: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) {
|
|
@include once {
|
|
cursor: not-allowed;
|
|
}
|
|
@include e(icon) {
|
|
fill: map-get($--transfer-gap-button-background-color, 'disabled') !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|