2020-05-14 20:47:05 +08:00
|
|
|
.#{$ns}ResultBox {
|
|
|
|
@include input-input();
|
2021-11-19 00:16:00 +08:00
|
|
|
@include input-border();
|
2020-05-14 20:47:05 +08:00
|
|
|
flex-wrap: wrap;
|
2022-04-20 18:12:26 +08:00
|
|
|
padding: 0 px2rem(5px);
|
2020-12-21 10:08:40 +08:00
|
|
|
min-height: var(--Form-input-height);
|
2020-05-14 20:47:05 +08:00
|
|
|
align-items: center;
|
2022-02-18 14:04:48 +08:00
|
|
|
border-radius: 3px;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&.is-clearable {
|
|
|
|
padding-right: px2rem(55px);
|
|
|
|
}
|
2020-05-14 20:47:05 +08:00
|
|
|
|
|
|
|
&.is-error {
|
2020-12-21 10:08:40 +08:00
|
|
|
border-color: var(--Form-input-onError-borderColor);
|
|
|
|
background: var(--Form-input-onError-bg);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
2020-07-03 17:11:32 +08:00
|
|
|
&.is-focused,
|
2020-08-14 17:45:59 +08:00
|
|
|
&.is-active,
|
2020-07-03 17:11:32 +08:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
|
|
box-shadow: var(--Form-input-boxShadow);
|
|
|
|
background: var(--Form-input-onFocused-bg);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
2020-07-15 20:15:38 +08:00
|
|
|
&.is-clickable:not(.is-disabled) {
|
2020-06-12 14:39:21 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
|
|
box-shadow: var(--Form-input-boxShadow);
|
|
|
|
background: var(--Form-input-onFocused-bg);
|
2020-06-12 14:39:21 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-14 20:47:05 +08:00
|
|
|
&.is-error.is-focused {
|
2020-12-21 10:08:40 +08:00
|
|
|
border-color: var(--Form-input-onError-borderColor);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-disabled {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--muted-color);
|
|
|
|
background: var(--Form-input-onDisabled-bg);
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
2021-02-05 17:51:13 +08:00
|
|
|
pointer-events: none;
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
2020-06-11 18:31:02 +08:00
|
|
|
&-singleValue {
|
2022-05-13 22:48:52 +08:00
|
|
|
padding: 0 calc(var(--Form-input-paddingX) - #{px2rem(3px)});
|
2021-09-29 19:32:31 +08:00
|
|
|
display: inline-block;
|
|
|
|
max-width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2020-06-11 18:31:02 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 14:04:48 +08:00
|
|
|
&-pc-arrow {
|
|
|
|
height: 100%;
|
|
|
|
margin: auto 0;
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
transition: transform var(--animation-duration) ease;
|
|
|
|
> svg {
|
|
|
|
width: px2rem(10px);
|
|
|
|
height: px2rem(10px);
|
|
|
|
top: 0.125em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-opened &-pc-arrow {
|
2022-05-13 22:48:52 +08:00
|
|
|
transform: rotate(180deg);
|
2022-02-18 14:04:48 +08:00
|
|
|
}
|
|
|
|
|
2020-05-14 20:47:05 +08:00
|
|
|
&-clear {
|
|
|
|
@include input-clear();
|
2022-02-18 14:04:48 +08:00
|
|
|
height: 100%;
|
|
|
|
padding: px2rem(4px);
|
|
|
|
margin: auto 0;
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
background-color: unset;
|
|
|
|
|
|
|
|
&-wrap {
|
|
|
|
width: px2rem(16px);
|
|
|
|
height: px2rem(16px);
|
|
|
|
border-radius: 50%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-with-arrow {
|
|
|
|
right: 33px;
|
|
|
|
}
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
> svg {
|
|
|
|
display: inline-block;
|
2020-05-15 16:47:08 +08:00
|
|
|
width: px2rem(14px);
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--icon-color);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
> a {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-value {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--ResultBox-value-bg);
|
|
|
|
color: var(--ResultBox-value-color);
|
|
|
|
font-size: var(--Form-input-fontSize);
|
2021-04-08 23:19:23 +08:00
|
|
|
padding: 0 var(--gap-xs);
|
2020-05-15 16:47:08 +08:00
|
|
|
min-height: px2rem(24px);
|
2020-05-14 20:47:05 +08:00
|
|
|
flex-wrap: nowrap;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2022-05-13 22:48:52 +08:00
|
|
|
margin: 2px 3px;
|
2020-05-14 20:47:05 +08:00
|
|
|
user-select: none;
|
|
|
|
|
|
|
|
> a {
|
|
|
|
cursor: pointer;
|
2022-05-13 22:48:52 +08:00
|
|
|
margin-left: var(--gap-xs);
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--ResultBox-icon-color);
|
2020-05-14 20:47:05 +08:00
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--ResultBox-icon--onHover-color);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
2020-05-15 16:47:08 +08:00
|
|
|
|
|
|
|
> svg {
|
|
|
|
width: px2rem(10px);
|
|
|
|
height: px2rem(10px);
|
2022-02-18 14:04:48 +08:00
|
|
|
&.icon {
|
|
|
|
top: 0;
|
|
|
|
}
|
2020-05-15 16:47:08 +08:00
|
|
|
}
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--ResultBox-value--onHover-bg);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-disabled {
|
|
|
|
pointer-events: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--ResultBox-value--onDisabled-color);
|
2020-05-14 20:47:05 +08:00
|
|
|
|
|
|
|
> a {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--ResultBox-icon--onDisabled-color);
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Form-input-placeholderColor);
|
2020-05-14 20:47:05 +08:00
|
|
|
user-select: none;
|
2022-05-13 22:48:52 +08:00
|
|
|
margin-left: 8px;
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
> input {
|
|
|
|
padding-left: 8px;
|
|
|
|
min-height: 24px;
|
|
|
|
}
|
2021-12-30 13:12:56 +08:00
|
|
|
|
2022-02-17 10:19:19 +08:00
|
|
|
&.#{$ns}TransferDropDown {
|
2022-05-13 22:48:52 +08:00
|
|
|
padding: 0;
|
2022-02-17 10:19:19 +08:00
|
|
|
|
|
|
|
> .#{$ns}ResultBox-value {
|
|
|
|
background: var(--Form-select-value-bgColor);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: var(--Form-selectValue-onHover-bgColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-20 18:12:26 +08:00
|
|
|
|
2021-12-30 13:12:56 +08:00
|
|
|
&.is-mobile {
|
|
|
|
min-height: calc(var(--Form-input-lineHeight) * var(--fontSizeLg));
|
|
|
|
border: none;
|
|
|
|
padding: 0;
|
|
|
|
font-size: var(--fontSizeLg);
|
|
|
|
border: none;
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
2022-02-18 14:04:48 +08:00
|
|
|
.#{$ns}ResultBox-clear {
|
|
|
|
@include input-clear();
|
|
|
|
width: px2rem(26px);
|
|
|
|
height: px2rem(26px);
|
|
|
|
margin: 0 px2rem(-2px);
|
|
|
|
margin-left: auto;
|
|
|
|
padding: px2rem(4px);
|
|
|
|
position: unset;
|
|
|
|
right: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
background-color: unset;
|
|
|
|
}
|
|
|
|
|
2021-12-30 13:12:56 +08:00
|
|
|
.#{$ns}ResultBox-arrow {
|
|
|
|
margin-right: var(--gap-xs);
|
|
|
|
// margin-left: var(--gap-xs);
|
|
|
|
width: var(--gap-md);
|
|
|
|
text-align: center;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
line-height: 1;
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
|
|
> svg {
|
|
|
|
transition: transform var(--animation-duration);
|
|
|
|
display: inline-block;
|
|
|
|
color: var(--Form-select-caret-iconColor);
|
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
top: 0;
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-05-14 20:47:05 +08:00
|
|
|
}
|