@talentsoft-opensource/hylia
Version:
The Hylia design systems. Contains all the building blocks style rules for Talentsoft.
391 lines (286 loc) • 8.16 kB
text/less
.Hylia-m-dropdown {
font-family: @regular_regular;
font-size: 1.4rem;
cursor: pointer;
position: relative;
width: 100%;
display: inline-flex;
align-items: center;
flex-wrap: wrap;
min-height: 3.5rem;
padding: 0 3.5rem 0 0.5rem;
transition: background-color 0.3s, border 0.3s;
color: @vader;
border: 0.1rem solid @minion;
border-radius: @radius;
background-color: @stormtrooper;
&--open {
border-color: lighten(@terran, 20%);
border-bottom-color: @minion ;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
&.Hylia-m-dropdown--ghost {
border-top: 0.1rem solid lighten(@terran, 20%);
border-right: 0.1rem solid lighten(@terran, 20%);
border-left: 0.1rem solid lighten(@terran, 20%);
}
}
&--disabled {
background-color: @apprentice;
.Hylia-m-dropdown__icon {
color: @knight;
}
}
&--error {
border: 0.1rem solid @ruban;
}
&--warning {
border: 0.1rem solid @saien;
}
&--ghost {
border-top: 0.1rem solid transparent;
border-right: 0.1rem solid transparent;
border-left: 0.1rem solid transparent;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
background-color: transparent;
}
&:focus:not(.Hylia-m-dropdown--disabled),
&:hover:not(.Hylia-m-dropdown--disabled) {
border-color: lighten(@terran, 20%);
}
// Override Tag witdh
.Hylia-a-tag {
min-width: auto;
margin: 0.4rem 0.5rem;
padding-right: 3rem;
padding-left: 1rem;
}
&__step {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.3rem;
height: 2.3rem;
margin-left: auto;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
color: @smart;
border-radius: 50%;
&:hover {
color: @stormtrooper;
background-color: @smart ;
}
}
&__count-tag {
display: flex;
align-items: center;
.Hylia-a-tag {
padding-right: 1rem;
}
}
&__icon {
position: absolute;
top: 50%;
right: 1rem;
padding: 0.2rem;
transform: translateY(-50%);
color: @smart;
}
&__remove-tag {
font-family: @regular_regular;
font-size: 1.2rem;
font-style: italic;
margin: 0.5rem 0 0.5rem 1rem;
cursor: pointer;
color: @smart;
&:hover {
text-decoration: underline;
}
}
&__search {
display: flex;
align-items: center;
padding: 1rem;
color: @knight;
border-bottom: 0.1rem solid @minion;
i {
cursor: pointer;
}
input {
font-family: @regular_regular;
font-size: 1.4rem;
width: 100%;
padding: 0 0.5rem;
color: @vader;
border: none;
}
}
&__placeholder {
font-family: @regular_regular;
font-size: 1.4rem;
overflow: hidden;
margin-left: 0.5rem;
white-space: nowrap;
text-overflow: ellipsis;
color: @knight;
}
&__label {
font-family: @regular_regular;
font-size: 1.4rem;
overflow: hidden;
margin-left: 0.5rem;
white-space: nowrap;
text-overflow: ellipsis;
color: @vader;
}
&__selection {
position: relative;
display: flex;
overflow: hidden;
flex-direction: column;
min-height: 15rem;
max-height: 15rem;
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
&__menu {
position: absolute;
z-index: 100;
top: ~"calc(100% + .1rem)";
left: 0;
width: ~"calc(100% + .2rem)";
margin: 0 -0.1rem;
border-right: 0.1rem solid lighten(@terran, 20%);
border-bottom: 0.1rem solid lighten(@terran, 20%);
border-left: 0.1rem solid lighten(@terran, 20%);
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
outline: 0;
background-color: @stormtrooper;
}
}
.Hylia-m-dropdown-choices {
flex: 0 0 100%;
&__title {
padding: 1rem;
cursor: pointer;
transition: background-color 0.3s;
background-color: @adept;
.Hylia-m-dropdown__step {
margin-right: 1rem;
background-color: @stormtrooper;
}
&:hover {
background-color: @apprentice;
.Hylia-m-dropdown__step {
color: @stormtrooper;
background-color: @smart;
}
}
}
&__noresult {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
padding: 1rem;
text-align: center;
color: @knight;
}
&__value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&__icon {
margin-right: 0.5rem;
transition: 0.3s color;
color: @apprentice;
}
&__wrapper {
position: absolute;
overflow-x: hidden;
overflow-y: auto;
width: 100%;
height: 100%;
&::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
&::-webkit-scrollbar-track {
border-radius: 100rem;
background-color: rgba(51, 51, 51, 0.1);
}
&::-webkit-scrollbar-thumb {
border-radius: 100rem;
background-color: rgba(51, 51, 51, 0.4);
}
}
&__category {
font-family: @regular_bold;
font-style: italic;
padding: 1rem;
color: @apprentice;
&:not(:first-child):before {
position: relative;
top: -1rem;
display: block;
width: 100%;
height: 0.1rem;
content: "";
background-color: @apprentice;
}
&:first-letter {
text-transform: uppercase;
}
}
&__item {
display: flex;
align-items: center;
padding: 1rem;
cursor: pointer;
transition: background-color 0.2s;
background-color: @stormtrooper;
&--active {
background-color: @terran;
.Hylia-m-dropdown-choices__icon {
color: @vader;
}
}
&:hover:not(.Hylia-m-dropdown-choices__item--active) {
background-color: @adept;
.Hylia-m-dropdown-choices__icon {
color: @vader;
}
.Hylia-m-dropdown-choices__panel {
color: @stormtrooper;
background-color: @smart;
}
.Hylia-m-dropdown__step {
background-color: @stormtrooper;
}
}
}
}
// Animation slider
.Hylia-m-dropdown__anim-enter {
transform: translateX(100%);
opacity: 0;
}
.Hylia-m-dropdown__anim-enter.Hylia-m-dropdown__anim-enter-active {
transition: all 0.3s ease-in-out;
transform: translateX(0%);
opacity: 1;
}
.Hylia-m-dropdown__anim-exit {
transform: translateX(0%);
opacity: 1;
}
.Hylia-m-dropdown__anim-exit.Hylia-m-dropdown__anim-exit-active {
transition: all 0.3s ease-in-out;
transform: translateX(-100%);
opacity: 0;
}