amis/scss/components/form/_transfer.scss

178 lines
3.0 KiB
SCSS
Raw Normal View History

2020-05-13 19:28:46 +08:00
.#{$ns}Transfer {
display: flex;
flex-direction: row;
flex-wrap: wrap;
min-height: px2rem(300px);
&--inline {
display: inline-flex;
flex-wrap: nowrap;
}
&-title {
display: flex;
2020-05-26 20:28:09 +08:00
align-items: center;
2020-05-27 13:52:25 +08:00
background: $Transfer-title-bg;
2020-05-13 19:28:46 +08:00
height: px2rem(30px);
line-height: $Form-input-lineHeight;
font-size: $Form-input-fontSize;
padding: (px2rem(30px) - $Form-input-lineHeight * $Form-input-fontSize)/2
$gap-sm;
flex-direction: row;
&--light {
background: transparent;
}
> span {
flex-grow: 1;
}
}
&-select,
&-result {
2020-05-26 20:28:09 +08:00
width: 0;
2020-05-13 19:28:46 +08:00
min-width: px2rem(200px);
flex-grow: 1;
border: $Form-input-borderWidth solid $Form-input-borderColor;
display: flex;
flex-direction: column;
}
2020-05-26 20:28:09 +08:00
&-select > &-checkboxes,
&-result > &-selections {
2020-05-13 19:28:46 +08:00
flex-grow: 1;
2020-05-29 16:43:53 +08:00
max-height: 100%;
2020-05-13 19:28:46 +08:00
overflow: auto;
}
2020-05-27 13:52:25 +08:00
&-search + &-checkboxes {
border-top: 1px solid $borderColor;
}
2020-05-13 20:36:08 +08:00
&-checkboxes .#{$ns}ListCheckboxes-placeholder {
height: 100%;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
2020-05-13 19:28:46 +08:00
&-search {
padding: $gap-sm;
}
2020-05-27 13:52:25 +08:00
&-mid {
min-width: px2rem(10px);
display: flex;
flex-direction: column;
justify-content: center;
}
2020-05-13 19:28:46 +08:00
&-arrow {
2020-05-27 13:52:25 +08:00
width: 40px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
border: 1px solid $borderColor;
margin: 0 10px;
color: $icon-color;
> svg {
top: 0;
width: 14px;
height: 14px;
}
2020-05-13 19:28:46 +08:00
}
&-checkAll,
&-clearAll {
user-select: none;
cursor: pointer;
2020-05-13 20:36:08 +08:00
&.is-disabled {
pointer-events: none;
color: $text--muted-color;
}
2020-05-13 19:28:46 +08:00
}
2020-05-26 20:28:09 +08:00
&-tabs {
display: flex;
flex-direction: column;
height: 100%;
> .#{$ns}Tabs-links {
2020-05-27 14:48:38 +08:00
border-top: 0 none;
2020-05-26 20:28:09 +08:00
padding: 5px 0 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
> .#{$ns}Tabs-link > a:first-child {
font-size: 12px;
padding: 7px 8px;
}
.#{$ns}TabsTransfer-tabsMid {
flex-grow: 1;
}
> .#{$ns}SearchBox {
2020-05-28 20:28:24 +08:00
margin: -5px 5px 0 10px;
2020-05-26 20:28:09 +08:00
&.is-active {
width: 150px;
margin-right: 10px;
padding-left: 10px;
}
}
}
> .#{$ns}Tabs-content {
flex-grow: 1;
position: relative;
2020-05-27 13:52:25 +08:00
padding: 5px 0 0;
> .#{$ns}Tabs-pane {
position: relative;
min-height: 100%;
&.is-active {
display: flex;
flex-direction: column;
> .#{$ns}Transfer-checkboxes {
flex-grow: 1;
2020-05-29 16:43:53 +08:00
max-height: 100%;
2020-05-27 13:52:25 +08:00
overflow: auto;
}
}
}
2020-05-26 20:28:09 +08:00
}
}
}
.#{$ns}TabsTransfer {
.#{$ns}Transfer-title {
height: 40px;
}
// .#{$ns}Transfer-result {
// flex-grow: unset;
// }
2020-05-27 20:09:39 +08:00
&-placeholder {
@include checkboxes-placeholder();
}
2020-05-13 19:28:46 +08:00
}
2020-05-14 10:40:44 +08:00
.#{$ns}TransferControl {
position: relative;
2020-05-14 11:33:18 +08:00
&.is-inline {
display: inline-block;
}
2020-05-14 10:40:44 +08:00
}