2015-10-02 20:10:42 +03:00
|
|
|
@import "../variables";
|
|
|
|
@import "../mixins";
|
|
|
|
|
2015-10-10 06:26:21 +03:00
|
|
|
$autocomplete-color-primary: unquote("rgb(#{$color-primary})");
|
|
|
|
$autocomplete-color-primary-contrast: unquote("rgb(#{$color-primary-contrast})");
|
|
|
|
$autocomplete-color-white: unquote("rgb(#{$color-white})");
|
|
|
|
$autocomplete-suggestion-color-active: unquote("rgb(#{$palette-grey-200})");
|
|
|
|
|
|
|
|
.root {
|
2015-10-02 20:10:42 +03:00
|
|
|
position: relative;
|
2015-10-10 06:26:21 +03:00
|
|
|
&.focus {
|
|
|
|
.label {
|
|
|
|
color: $autocomplete-color-primary;
|
|
|
|
}
|
|
|
|
.suggestions {
|
|
|
|
max-height: $items-overflow-max-height;
|
|
|
|
visibility: visible;
|
|
|
|
box-shadow: $zdepth-shadow-1;
|
|
|
|
}
|
|
|
|
}
|
2015-10-02 20:10:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.label {
|
2015-10-08 17:21:42 +03:00
|
|
|
font-size: $font-size-tiny;
|
2015-10-10 06:26:21 +03:00
|
|
|
color: $color-text-secondary;
|
|
|
|
transition: color $animation-duration $animation-curve-default;
|
2015-10-02 20:10:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
display: inline-block;
|
2015-10-10 06:26:21 +03:00
|
|
|
padding: $unit * .5 $unit * .75;
|
|
|
|
margin: $unit * .25 $unit * .5 $unit * .25 0;
|
|
|
|
font-size: $font-size-tiny;
|
|
|
|
color: $autocomplete-color-primary-contrast;
|
2015-10-02 20:10:42 +03:00
|
|
|
cursor: pointer;
|
2015-10-10 06:26:21 +03:00
|
|
|
background-color: $autocomplete-color-primary;
|
2015-10-02 20:10:42 +03:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggestions {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: scroll;
|
2015-10-10 06:26:21 +03:00
|
|
|
background-color: $autocomplete-color-white;
|
|
|
|
max-height: 0;
|
|
|
|
visibility: hidden;
|
2015-10-02 20:10:42 +03:00
|
|
|
transition-timing-function: $animation-curve-default;
|
2015-10-08 17:21:42 +03:00
|
|
|
transition-duration: $animation-duration;
|
2015-10-10 06:26:21 +03:00
|
|
|
transition-property: max-height, box-shadow;
|
2015-10-08 17:21:42 +03:00
|
|
|
&:not(.up) {
|
2015-10-10 06:26:21 +03:00
|
|
|
bottom: auto;
|
|
|
|
margin-top: -$input-height / 3;
|
2015-10-08 17:21:42 +03:00
|
|
|
}
|
|
|
|
&.up {
|
2015-10-10 06:26:21 +03:00
|
|
|
top: auto;
|
|
|
|
bottom: 0;
|
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 {
|
2015-10-10 06:26:21 +03:00
|
|
|
background-color: $autocomplete-suggestion-color-active;
|
2015-10-08 11:14:47 +03:00
|
|
|
}
|
2015-10-02 20:10:42 +03:00
|
|
|
}
|
2015-10-09 20:48:30 +03:00
|
|
|
|
|
|
|
.input {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|