2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Combo {
|
2020-04-07 17:27:51 +08:00
|
|
|
|
&-placeholder {
|
|
|
|
|
color: $text--muted-color;
|
2020-04-08 10:34:16 +08:00
|
|
|
|
padding-top: px2rem(7px);
|
2020-04-07 17:27:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-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%);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-24 20:01:34 +08:00
|
|
|
|
&-setNullBtn {
|
|
|
|
|
margin-top: $gap-xs;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-addBtn {
|
|
|
|
|
font-size: $Combo-addBtn-fontSize;
|
|
|
|
|
|
|
|
|
|
@include button-size(
|
|
|
|
|
$Combo-addBtn-paddingY,
|
|
|
|
|
$Combo-addBtn-paddingX,
|
|
|
|
|
$Combo-addBtn-fontSize,
|
|
|
|
|
$Combo-addBtn-lineHeight,
|
|
|
|
|
$Combo-addBtn-borderRadius,
|
|
|
|
|
$Combo-addBtn-height
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@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;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-items {
|
|
|
|
|
&:empty {
|
|
|
|
|
display: none;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
+ .#{$ns}Combo-toolbar {
|
|
|
|
|
padding-top: ($Form-input-height - $Combo-addBtn-height) / 2;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
margin-bottom: $Combo-items-marginBottom;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-01-02 17:52:17 +08:00
|
|
|
|
&-item {
|
|
|
|
|
background: $white;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-10 15:53:40 +08:00
|
|
|
|
&-itemDrager {
|
|
|
|
|
cursor: move;
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
width: px2rem(20px);
|
|
|
|
|
height: px2rem(20px);
|
|
|
|
|
top: $Combo--horizontal-dragger-top;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&--hor {
|
|
|
|
|
.#{$ns}Combo-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-item + .#{$ns}Combo-item {
|
|
|
|
|
margin-top: $Combo--horizontal-item-gap;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-itemInner {
|
|
|
|
|
flex-basis: 0;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
2019-06-26 17:57:23 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-itemTag {
|
|
|
|
|
margin-right: $gap-sm;
|
2019-06-26 17:57:23 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
label {
|
|
|
|
|
color: $info;
|
|
|
|
|
margin-right: $gap-sm;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-itemToolbar {
|
|
|
|
|
margin-left: $gap-xs;
|
|
|
|
|
display: flex;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
padding-top: $Form-label-paddingTop;
|
|
|
|
|
|
|
|
|
|
> .is-disabled {
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
opacity: $Button-onDisabled-opacity;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-10 15:53:40 +08:00
|
|
|
|
|
|
|
|
|
&.is-draggable .#{$ns}Combo-toolbar {
|
|
|
|
|
padding-left: px2rem(24px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-itemDrager {
|
|
|
|
|
padding: 0 px2rem(6px) 0 0;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&--ver:not(&--noBorder) {
|
|
|
|
|
@include clearfix();
|
|
|
|
|
> .#{$ns}Combo-items {
|
|
|
|
|
margin: (-$Combo--vertical-item-gap * 2) (-$Combo--vertical-item-gap * 2)
|
|
|
|
|
0 (-$Combo--vertical-item-gap * 2);
|
2020-04-07 17:27:51 +08:00
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-placeholder {
|
2020-04-08 10:34:16 +08:00
|
|
|
|
margin: $Combo--vertical-item-gap * 2;
|
2020-04-07 17:27:51 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-06-26 17:57:23 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-itemTag {
|
|
|
|
|
text-align: right;
|
2019-06-26 17:57:23 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
label {
|
|
|
|
|
color: $info;
|
|
|
|
|
margin-right: $gap-sm;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
// 不严格点会命中 combo 里面嵌套 combo 的情况,so sad.
|
|
|
|
|
> .#{$ns}Combo-item,
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item {
|
|
|
|
|
border: $Combo--vertical-item-borderWidth dashed
|
|
|
|
|
$Combo--vertical-item-borderColor;
|
|
|
|
|
padding: $Combo--vertical-item-paddingY $Combo--vertical-item-paddingX;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item {
|
|
|
|
|
margin: $Combo--vertical-item-gap * 2;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
> .#{$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;
|
|
|
|
|
border-width: $Combo--vertical-itemToolbar-borderWidth
|
|
|
|
|
$Combo--vertical-itemToolbar-borderWidth 0
|
|
|
|
|
$Combo--vertical-itemToolbar-borderWidth;
|
|
|
|
|
// margin-top: px2rem(-1px);
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-toolbarBtn {
|
|
|
|
|
color: inherit;
|
|
|
|
|
line-height: $Combo--vertical-itemToolbar-height;
|
|
|
|
|
// font-size: px2rem(14px);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:hover {
|
|
|
|
|
color: $Combo--vertical-itemToolbar-onHover-color;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// top: $Combo--vertical-itemToolbar-positionTop;
|
|
|
|
|
// opacity: 1;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-01-09 16:25:41 +08:00
|
|
|
|
&:not(.is-disabled) > .#{$ns}Combo-item:hover,
|
|
|
|
|
&:not(.is-disabled) > .#{$ns}Combo-items > .#{$ns}Combo-item:hover {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
border-color: $Combo--vertical-item-onHover-borderColor;
|
|
|
|
|
// border-style: solid;
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Combo-itemToolbar {
|
|
|
|
|
top: $Combo--vertical-itemToolbar-positionTop;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-10 15:53:40 +08:00
|
|
|
|
|
2020-04-14 19:13:52 +08:00
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item > .#{$ns}Combo-itemDrager {
|
2020-04-10 15:53:40 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: px2rem(-30px);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-21 11:43:50 +08:00
|
|
|
|
&.is-draggable {
|
|
|
|
|
> .#{$ns}Combo-items > .#{$ns}Combo-item {
|
|
|
|
|
margin-left: px2rem(35px);
|
|
|
|
|
}
|
|
|
|
|
> .#{$ns}Combo-toolbar {
|
|
|
|
|
padding-left: px2rem(25px);
|
|
|
|
|
}
|
2020-04-10 15:53:40 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-item--dragging {
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
|
content: '';
|
|
|
|
|
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);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo-dragableTip {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
color: $text--muted-color;
|
|
|
|
|
font-size: $fontSizeSm;
|
|
|
|
|
margin-left: $gap-xs;
|
2019-07-04 14:21:32 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:empty {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ComboControl.is-inline {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo--hor .#{$ns}Combo-itemInner {
|
|
|
|
|
flex-grow: unset;
|
|
|
|
|
flex-basis: unset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Combo--ver .#{$ns}Combo-item {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Combo-form .#{$ns}Form-item:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
}
|