feat: merge multiselect.scss with component styles

This commit is contained in:
Dominik Pschenitschni 2021-10-18 14:19:24 +02:00
parent b9eba00603
commit b304712b1e
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
4 changed files with 159 additions and 155 deletions

View file

@ -365,3 +365,131 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.multiselect {
width: 100%;
position: relative;
.control.is-loading::after {
top: .75rem;
}
&.has-search-results .input-wrapper {
border-radius: $radius $radius 0 0;
border-color: $primary !important;
background: $white !important;
&, &:focus-within {
border-bottom-color: $grey-200 !important;
}
}
.input-wrapper {
padding: 0;
background: $white !important;
border-color: $grey-200 !important;
flex-wrap: wrap;
height: auto;
&:hover {
border-color: $grey-300 !important;
}
.input {
display: flex;
max-width: 100%;
width: 100%;
align-items: center;
border: none !important;
background: transparent;
height: auto;
&::placeholder {
font-style: normal !important;
}
}
&.has-multiple .input {
max-width: 250px;
input {
padding-left: 0;
}
}
&:focus-within {
border-color: $primary !important;
background: $white !important;
}
.loader {
margin: 0 .5rem;
}
}
.search-results {
background: $white;
border-radius: 0 0 $radius $radius;
border: 1px solid $primary;
border-top: none;
max-height: 50vh;
overflow-x: auto;
position: absolute;
z-index: 100;
max-width: 100%;
min-width: 100%;
&-inline {
position: static;
}
button {
background: transparent;
display: block;
text-align: left;
box-shadow: none;
border-radius: 0;
text-transform: none;
font-family: $family-sans-serif;
font-weight: normal;
padding: .5rem 0;
border: none;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
.search-result {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding: .5rem .75rem;
}
.hint-text {
font-size: .75rem;
color: transparent;
transition: color $transition;
padding: 0 .5rem;
}
&:focus, &:hover {
background: $grey-100;
box-shadow: none !important;
.hint-text {
color: $text;
}
}
&:active {
background: $grey-200;
}
}
}
}
</style>

View file

@ -117,3 +117,33 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.assignee {
position: relative;
&:not(:first-child) {
margin-left: -1.5rem;
}
::v-deep.user img {
border: 2px solid $white;
margin-right: 0;
}
.remove-assignee {
position: absolute;
top: 4px;
left: 2px;
color: $red;
background: $white;
padding: 0 4px;
display: block;
border-radius: 100%;
font-size: .75rem;
width: 18px;
height: 18px;
z-index: 100;
}
}
</style>

View file

@ -1,2 +1 @@
@import 'multiselect';
@import 'scrollbars';

View file

@ -1,153 +0,0 @@
.multiselect {
width: 100%;
position: relative;
.control.is-loading::after {
top: .75rem;
}
&.has-search-results .input-wrapper {
border-radius: $radius $radius 0 0;
border-color: $primary !important;
background: $white !important;
&, &:focus-within {
border-bottom-color: $grey-200 !important;
}
}
.input-wrapper {
padding: 0;
background: $white !important;
border-color: $grey-200 !important;
flex-wrap: wrap;
height: auto;
&:hover {
border-color: $grey-300 !important;
}
.input {
display: flex;
max-width: 100%;
width: 100%;
align-items: center;
border: none !important;
background: transparent;
height: auto;
&::placeholder {
font-style: normal !important;
}
}
&.has-multiple .input {
max-width: 250px;
input {
padding-left: 0;
}
}
&:focus-within {
border-color: $primary !important;
background: $white !important;
}
.loader {
margin: 0 .5rem;
}
}
.search-results {
background: $white;
border-radius: 0 0 $radius $radius;
border: 1px solid $primary;
border-top: none;
max-height: 50vh;
overflow-x: auto;
position: absolute;
z-index: 100;
max-width: 100%;
min-width: 100%;
&-inline {
position: static;
}
button {
background: transparent;
display: block;
text-align: left;
box-shadow: none;
border-radius: 0;
text-transform: none;
font-family: $family-sans-serif;
font-weight: normal;
padding: .5rem 0;
border: none;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
.search-result {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding: .5rem .75rem;
}
.hint-text {
font-size: .75rem;
color: transparent;
transition: color $transition;
padding: 0 .5rem;
}
&:focus, &:hover {
background: $grey-100;
box-shadow: none !important;
.hint-text {
color: $text;
}
}
&:active {
background: $grey-200;
}
}
}
.assignee {
position: relative;
&:not(:first-child) {
margin-left: -1.5rem;
}
.user img {
border: 2px solid $white;
margin-right: 0;
}
.remove-assignee {
position: absolute;
top: 4px;
left: 2px;
color: $red;
background: $white;
padding: 0 4px;
display: block;
border-radius: 100%;
font-size: .75rem;
width: 18px;
height: 18px;
z-index: 100;
}
}
}