2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Combo {
|
|
|
|
|
&-toolbarBtn {
|
|
|
|
|
line-height: $Combo-toolbarBtn-lineHeight;
|
|
|
|
|
height: $Combo-toolbarBtn-height;
|
|
|
|
|
color: $Combo-toolbarBtn-color;
|
|
|
|
|
padding: $Combo-toolbarBtn-paddingY $Combo-toolbarBtn-paddingX;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: darken($Combo-toolbarBtn-color, 10%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-addBtn {
|
|
|
|
|
font-size: $Combo-addBtn-fontSize;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
|
|
|
|
@include button-size(
|
|
|
|
|
$Combo-addBtn-paddingY,
|
|
|
|
|
$Combo-addBtn-paddingX,
|
|
|
|
|
$Combo-addBtn-fontSize,
|
|
|
|
|
$Combo-addBtn-lineHeight,
|
|
|
|
|
$Combo-addBtn-borderRadius,
|
|
|
|
|
$Combo-addBtn-height
|
|
|
|
|
);
|
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
@include button-variant(
|
|
|
|
|
$Combo-addBtn-bg,
|
|
|
|
|
$Combo-addBtn-border,
|
|
|
|
|
$Combo-addBtn-color,
|
|
|
|
|
$Combo-addBtn-onHover-bg,
|
|
|
|
|
$Combo-addBtn-onHover-border,
|
|
|
|
|
$Combo-addBtn-onHover-color,
|
|
|
|
|
$Combo-addBtn-onActive-bg,
|
|
|
|
|
$Combo-addBtn-onActive-border,
|
|
|
|
|
$Combo-addBtn-onActive-color
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
&.is-disabled {
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
opacity: $Button-onDisabled-opacity;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-items {
|
|
|
|
|
&:empty {
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
|
|
+ .#{$ns}Combo-toolbar {
|
|
|
|
|
padding-top: ($Form-input-height - $Combo-addBtn-height) / 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
margin-bottom: $Combo-items-marginBottom;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--hor {
|
|
|
|
|
.#{$ns}Combo-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-item + .#{$ns}Combo-item {
|
|
|
|
|
margin-top: $Combo--horizontal-item-gap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-itemInner {
|
|
|
|
|
flex-basis: 0;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-26 17:57:23 +08:00
|
|
|
|
.#{$ns}Combo-itemTag {
|
|
|
|
|
margin-right: $gap-sm;
|
|
|
|
|
|
|
|
|
|
label {
|
|
|
|
|
color: $info;
|
|
|
|
|
margin-right: $gap-sm;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Combo-itemToolbar {
|
|
|
|
|
margin-left: $gap-xs;
|
|
|
|
|
display: flex;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
padding-top: $Form-label-paddingTop;
|
2019-05-08 17:23:18 +08:00
|
|
|
|
|
|
|
|
|
> .is-disabled {
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
opacity: $Button-onDisabled-opacity;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--ver:not(&--noBorder) {
|
2019-07-10 10:51:50 +08:00
|
|
|
|
@include clearfix();
|
2019-04-30 11:11:25 +08:00
|
|
|
|
> .#{$ns}Combo-items {
|
2019-05-15 16:10:20 +08:00
|
|
|
|
margin: (-$Combo--vertical-item-gap * 2)
|
|
|
|
|
(-$Combo--vertical-item-gap * 2) 0
|
|
|
|
|
(-$Combo--vertical-item-gap * 2);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-06-26 17:57:23 +08:00
|
|
|
|
.#{$ns}Combo-itemTag {
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
|
|
label {
|
|
|
|
|
color: $info;
|
|
|
|
|
margin-right: $gap-sm;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
// 不严格点会命中 combo 里面嵌套 combo 的情况,so sad.
|
|
|
|
|
> .#{$ns}Combo-item,
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item {
|
2019-05-15 16:10:20 +08:00
|
|
|
|
border: $Combo--vertical-item-borderWidth dashed
|
|
|
|
|
$Combo--vertical-item-borderColor;
|
|
|
|
|
padding: $Combo--vertical-item-paddingY
|
|
|
|
|
$Combo--vertical-item-paddingX;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item {
|
|
|
|
|
margin: $Combo--vertical-item-gap * 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-item > .#{$ns}Combo-itemToolbar,
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item > .#{$ns}Combo-itemToolbar {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: $Combo--vertical-itemToolbar-positionRight;
|
|
|
|
|
top: $Combo--vertical-itemToolbar-positionTop / 2;
|
|
|
|
|
transition: $Combo--vertical-itemToolbar-transion;
|
|
|
|
|
height: $Combo--vertical-itemToolbar-height;
|
|
|
|
|
line-height: $Combo--vertical-itemToolbar-height;
|
|
|
|
|
background-color: $Combo--vertical-itemToolbar-bg;
|
|
|
|
|
color: $Combo--vertical-itemToolbar-color;
|
|
|
|
|
border-top-left-radius: $Combo--vertical-itemToolbar-borderRadius;
|
|
|
|
|
border-top-right-radius: $Combo--vertical-itemToolbar-borderRadius;
|
|
|
|
|
padding: 0 px2rem(3px);
|
|
|
|
|
border-style: solid;
|
|
|
|
|
border-color: $Combo--vertical-itemToolbar-borderColor;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
border-width: $Combo--vertical-itemToolbar-borderWidth
|
|
|
|
|
$Combo--vertical-itemToolbar-borderWidth 0
|
|
|
|
|
$Combo--vertical-itemToolbar-borderWidth;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
// margin-top: px2rem(-1px);
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-toolbarBtn {
|
|
|
|
|
color: inherit;
|
|
|
|
|
line-height: $Combo--vertical-itemToolbar-height;
|
|
|
|
|
// font-size: px2rem(14px);
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: $Combo--vertical-itemToolbar-onHover-color;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// top: $Combo--vertical-itemToolbar-positionTop;
|
|
|
|
|
// opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-item:hover,
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item:hover {
|
|
|
|
|
border-color: $Combo--vertical-item-onHover-borderColor;
|
|
|
|
|
// border-style: solid;
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-itemToolbar {
|
|
|
|
|
top: $Combo--vertical-itemToolbar-positionTop;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-item--dragging {
|
|
|
|
|
position: relative;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
&:after {
|
2019-05-15 16:10:20 +08:00
|
|
|
|
content: "";
|
2019-04-30 11:11:25 +08:00
|
|
|
|
display: block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 5;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-dragableTip {
|
|
|
|
|
color: $text--muted-color;
|
|
|
|
|
font-size: $fontSizeSm;
|
|
|
|
|
margin-left: $gap-xs;
|
2019-07-04 14:21:32 +08:00
|
|
|
|
|
|
|
|
|
&:empty {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ComboControl.is-inline {
|
|
|
|
|
.#{$ns}Combo--hor .#{$ns}Combo-itemInner {
|
|
|
|
|
flex-grow: unset;
|
|
|
|
|
flex-basis: unset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo--ver .#{$ns}Combo-item {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
|
.#{$ns}Combo-form .#{$ns}Form-item:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
}
|