2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}ButtonGroup {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Button {
|
2019-04-30 11:11:25 +08:00
|
|
|
|
position: relative;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
flex: 0 1 auto;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
> .#{$ns}Button {
|
|
|
|
|
@include hover {
|
|
|
|
|
z-index: 1;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&:focus,
|
|
|
|
|
&:active,
|
|
|
|
|
&.active,
|
|
|
|
|
&.is-active {
|
|
|
|
|
z-index: 1;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2020-10-19 10:44:09 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
.#{$ns}Button + .#{$ns}Button,
|
|
|
|
|
.#{$ns}Button + .#{$ns}ButtonGroup,
|
|
|
|
|
.#{$ns}ButtonGroup + .#{$ns}Button,
|
|
|
|
|
.#{$ns}ButtonGroup + .#{$ns}ButtonGroup {
|
|
|
|
|
margin-left: calc(var(--Button-borderWidth) * -1);
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-19 10:44:09 +08:00
|
|
|
|
&--block {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ButtonToolbar {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
display: inline-flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.#{$ns}ButtonGroup {
|
|
|
|
|
margin-left: px2rem(5px);
|
|
|
|
|
margin-top: px2rem(5px);
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ButtonGroup {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
> .#{$ns}Button:first-child {
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// cxd的ButtonGroup的is-active和:active样式不一样,这里做个兼容
|
|
|
|
|
.#{$ns}Button--primary:not(:disabled):not(.is-disabled).is-active {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--ButtonGroup--primary-isActive-color);
|
|
|
|
|
background: var(--ButtonGroup--primary-isActive-bg);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
> .#{$ns}Button:not(:last-child),
|
|
|
|
|
> .#{$ns}ButtonGroup:not(:last-child) > .#{$ns}Button {
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
> .#{$ns}Button:not(:first-child),
|
|
|
|
|
> .#{$ns}ButtonGroup:not(:first-child) > .#{$ns}Button {
|
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
|
border-bottom-left-radius: 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ButtonGroup--vertical {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
.#{$ns}Button,
|
|
|
|
|
.#{$ns}ButtonGroup {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Button + .#{$ns}Button,
|
|
|
|
|
> .#{$ns}Button + .#{$ns}ButtonGroup,
|
|
|
|
|
> .#{$ns}ButtonGroup + .#{$ns}Button,
|
|
|
|
|
> .#{$ns}ButtonGroup + .#{$ns}ButtonGroup {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-top: calc(var(--Button-borderWidth) * -1);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
margin-left: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Button:not(:last-child),
|
|
|
|
|
> .#{$ns}ButtonGroup:not(:last-child) > .#{$ns}Button {
|
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Button:not(:first-child),
|
|
|
|
|
> .#{$ns}ButtonGroup:not(:first-child) > .btn {
|
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ButtonGroupControl {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
display: inline-block;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
> .#{$ns}ButtonGroup--sm {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-top: calc((var(--Form-input-height) - var(--Button--sm-height)) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
> .#{$ns}ButtonGroup--xs {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-top: calc((var(--Form-input-height) - var(--Button--xs-height)) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
}
|