openaire-library/sharedComponents/input/input.component.css

168 lines
3.4 KiB
CSS

:host {
--input-placeholder-color: var(--placeholder-color);
--input-background: transparent;
--input-shadow: none;
--input-border: none;
--input-color: var(--grey-color);
--input-color-disabled: var(--disable-color);
--input-background-disabled: var(--muted-color);
--input-options-background: transparent;
--input-options-divider: 1px solid var(--muted-color);
--input-options-background-active: var(--table-color);
--input-options-color-active: var(--dark-color);
}
/** Input Container*/
.input-container {
box-shadow: var(--input-shadow);
border: var(--input-border);
background: var(--input-background);
border-radius: 6px;
position: relative;
}
.input-container.disabled {
background-color: var(--input-background-disabled);
}
.input-container.opened {
z-index: 1;
}
/** Input wrapper*/
.input-wrapper {
padding: 20px 0 20px 20px;
cursor: text;
position: relative;
color: var(--input-color);
}
.input-wrapper.select {
cursor: pointer;
}
.input-container.disabled > .input-wrapper {
cursor: not-allowed !important;
user-select: none;
color: var(--input-color-disabled);
}
/** Placeholder */
.input-wrapper > .placeholder {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
overflow: hidden;
pointer-events: none;
color: var(--input-placeholder-color);
padding: 20px;
}
.input-container.disabled > .input-wrapper > .placeholder {
color: var(--input-color-disabled);
}
.input-wrapper > .placeholder > label {
position: absolute;
font-size: 16px;
line-height: 24px;
top: 32px;
transform: translateY(-50%);
transition: all 0.5s ease 0s;
}
.input-container.focused > .input-wrapper > .placeholder > label {
top: 15px;
font-size: 12px;
line-height: 18px;
}
/** Input */
.input-wrapper .input {
outline: 0 none !important;
box-shadow: none;
border-radius: 0;
border: 0 none;
padding: 0 20px 0 0;
background: transparent !important;
color: inherit;
width: 100%;
min-height: 24px;
font-size: inherit;
line-height: inherit;
resize: none;
cursor: inherit;
}
.input-wrapper .input:disabled {
background: transparent;
}
.input-wrapper .input::placeholder {
color: transparent;
}
/* Tools */
.input-wrapper > .tools {
max-height: 0;
transition: max-height 0.3s linear;
overflow: hidden;
padding-right: 20px;
}
.input-container.focused > .input-wrapper > .tools {
max-height: 100px;
}
/* Options */
.input-container > .options {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s linear;
background: var(--input-options-background);
}
.input-container.opened > .options {
max-height: 200px;
}
.input-container > .options > ul {
margin: 0;
padding: 1px;
list-style: none;
}
.input-container > .options > ul > li > a {
padding: 10px 15px;
background: transparent;
color: var(--input-placeholder-color);
display: block;
}
.input-container > .options > ul > li:nth-child(n+2) {
border-top: var(--input-options-divider);
}
.input-container > .options > ul > li:last-child {
border-radius: 0 0 6px 6px;
}
.input-container > .options > ul > li:hover > a, .input-container > .options > ul > li.uk-active > a{
background: var(--input-options-background-active);
color: var(--input-options-color-active);
font-weight: 600;
}
/** Modifiers */
.inner {
--input-shadow: var(--shadow-inset);
--input-background: var(--default-color);
}
.flat {
--input-background: var(--light-color);
--input-border: 1px solid var(--muted-color);
}