2015-10-02 20:10:42 +03:00
|
|
|
@import "../variables";
|
|
|
|
@import "../mixins";
|
|
|
|
$autocomplete-value-background: unquote("rgb(#{$color-primary})");
|
|
|
|
$autocomplete-value-color: unquote("rgb(#{$color-primary-contrast})");
|
|
|
|
$autocomplete-label-color: unquote("rgb(#{$color-primary})");
|
|
|
|
$autocomplete-suggestions-background: unquote("rgb(#{$color-white})");
|
|
|
|
$autocomplete-suggestion-active-background: unquote("rgb(#{$palette-grey-200})");
|
2015-10-08 17:21:42 +03:00
|
|
|
$autocomplete-max-height-suggestions: 40vh;
|
2015-10-02 20:10:42 +03:00
|
|
|
|
|
|
|
.container {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.label {
|
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: $unit * .5;
|
2015-10-08 17:21:42 +03:00
|
|
|
font-size: $font-size-tiny;
|
2015-10-02 20:10:42 +03:00
|
|
|
color: $autocomplete-label-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
display: inline-block;
|
|
|
|
padding: $unit * .5 $unit;
|
|
|
|
margin: 0 $unit $unit 0;
|
2015-10-08 17:21:42 +03:00
|
|
|
font-size: $font-size-small;
|
2015-10-02 20:10:42 +03:00
|
|
|
color: $autocomplete-value-color;
|
|
|
|
cursor: pointer;
|
|
|
|
background-color: $autocomplete-value-background;
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggestions {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100%;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: scroll;
|
|
|
|
background-color: $autocomplete-suggestions-background;
|
|
|
|
transition-timing-function: $animation-curve-default;
|
2015-10-08 17:21:42 +03:00
|
|
|
transition-duration: $animation-duration;
|
|
|
|
transition-property: max-height;
|
|
|
|
box-shadow: $zdepth-shadow-1;
|
2015-10-08 11:14:47 +03:00
|
|
|
&:not(.focus) {
|
2015-10-08 17:21:42 +03:00
|
|
|
max-height: 0;
|
|
|
|
visibility: hidden;
|
2015-10-08 11:14:47 +03:00
|
|
|
}
|
|
|
|
&.focus {
|
2015-10-08 17:21:42 +03:00
|
|
|
max-height: $autocomplete-max-height-suggestions;
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
&:not(.up) {
|
|
|
|
margin-top: - $input-margin-bottom;
|
|
|
|
}
|
|
|
|
&.up {
|
|
|
|
bottom: $input-margin-bottom;
|
2015-10-08 11:14:47 +03:00
|
|
|
}
|
2015-10-02 20:10:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.suggestion {
|
|
|
|
padding: $unit;
|
|
|
|
cursor: pointer;
|
2015-10-08 11:14:47 +03:00
|
|
|
&.active {
|
|
|
|
background-color: $autocomplete-suggestion-active-background;
|
|
|
|
}
|
2015-10-02 20:10:42 +03:00
|
|
|
}
|