2023-05-03 18:37:14 +08:00
|
|
|
.sn-select {
|
2023-06-13 17:51:00 +08:00
|
|
|
align-items: center;
|
|
|
|
border: $border-default;
|
|
|
|
border-color: var(--sn-light-grey);
|
|
|
|
border-radius: $border-radius-default;
|
|
|
|
box-sizing: border-box;
|
2023-05-03 18:37:14 +08:00
|
|
|
cursor: pointer;
|
2023-06-13 17:51:00 +08:00
|
|
|
display: flex;
|
|
|
|
padding: .5rem .625rem .5rem 1rem;
|
2023-05-03 18:37:14 +08:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&.sn-select--blank {
|
|
|
|
.sn-select__value {
|
|
|
|
color: var(--sn-grey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.sn-select--search.sn-select--open {
|
|
|
|
.sn-select__value {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-26 17:41:47 +08:00
|
|
|
&.sn-select--search:not(.sn-select--open) {
|
|
|
|
line-height: normal;
|
|
|
|
}
|
|
|
|
|
2023-05-03 18:37:14 +08:00
|
|
|
.sn-select__value {
|
|
|
|
all: unset;
|
2023-05-26 17:41:47 +08:00
|
|
|
display: inline-block;
|
2023-06-13 17:51:00 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
line-height: 1.625rem;
|
2023-05-03 18:37:14 +08:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled {
|
|
|
|
background: var(--sn-sleepy-grey);
|
|
|
|
cursor: default;
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
.caret {
|
|
|
|
border-top-color: var(--sn-grey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sn-select__options {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sn-select__search-input {
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
display: none;
|
|
|
|
outline: 0;
|
2023-05-26 17:41:47 +08:00
|
|
|
width: calc(100% - 1.5em);
|
2023-05-03 18:37:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.sn-select--open {
|
|
|
|
background: $color-white;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
border-color: var(--sn-science-blue);
|
|
|
|
|
|
|
|
.sn-select__search-input {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sn-select__options {
|
|
|
|
background: var(--sn-white);
|
|
|
|
border-bottom-left-radius: 4px;
|
|
|
|
border-bottom-right-radius: 4px;
|
|
|
|
box-shadow: $flyout-shadow;
|
|
|
|
display: block;
|
|
|
|
left: 0;
|
|
|
|
max-height: 300px;
|
|
|
|
overflow: hidden;
|
2023-06-13 17:51:00 +08:00
|
|
|
top: 2.5rem;
|
2023-05-03 18:37:14 +08:00
|
|
|
width: 100%;
|
|
|
|
z-index: 9999;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sn-select__option {
|
2023-06-13 17:51:00 +08:00
|
|
|
line-height: 1.75rem;
|
2023-05-26 17:41:47 +08:00
|
|
|
overflow: hidden;
|
2023-06-13 17:51:00 +08:00
|
|
|
padding: .5rem 1rem;
|
2023-05-26 17:41:47 +08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
width: calc(100%);
|
2023-05-03 18:37:14 +08:00
|
|
|
}
|
|
|
|
|
2023-05-24 16:47:27 +08:00
|
|
|
.sn-select__no-options {
|
|
|
|
color: var(--sn-grey);
|
|
|
|
padding: .5em;
|
|
|
|
}
|
|
|
|
|
2023-05-03 18:37:14 +08:00
|
|
|
.sn-select__option:hover {
|
2023-06-13 17:51:00 +08:00
|
|
|
background: var(--sn-super-light-grey);
|
2023-05-03 18:37:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|