2022-04-05 14:25:58 +02:00
|
|
|
.form-input {
|
2022-02-03 15:32:02 +01:00
|
|
|
width: 100%;
|
|
|
|
margin-bottom: 1.6rem;
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: flex-start;
|
|
|
|
margin-bottom: 0.8rem;
|
2022-02-04 15:09:38 +01:00
|
|
|
p {
|
|
|
|
@include text-sm;
|
|
|
|
margin: 0;
|
|
|
|
}
|
2022-02-03 15:32:02 +01:00
|
|
|
}
|
|
|
|
&.is-required &-header p::after {
|
|
|
|
content: "*";
|
|
|
|
margin-left: 0.5ch;
|
|
|
|
color: var(--error);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-field {
|
|
|
|
height: 4rem;
|
|
|
|
display: grid;
|
|
|
|
grid-template-areas: "icon input addon";
|
|
|
|
grid-template-columns: min-content 1fr min-content;
|
|
|
|
border: 1px solid var(--gray-soft-dark);
|
2022-02-04 15:09:38 +01:00
|
|
|
border-radius: var(--border-radius);
|
2022-02-03 15:32:02 +01:00
|
|
|
overflow: hidden;
|
|
|
|
transition: border-color ease-in-out 0.15s;
|
|
|
|
|
|
|
|
.icon,
|
|
|
|
.addon {
|
|
|
|
width: 4rem;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
color: var(--gray-hard-light);
|
|
|
|
background-color: var(--gray-soft);
|
|
|
|
}
|
|
|
|
.icon {
|
|
|
|
grid-area: icon;
|
|
|
|
border-right: 1px solid var(--gray-soft-dark);
|
|
|
|
}
|
|
|
|
input {
|
|
|
|
grid-area: input;
|
|
|
|
border: none;
|
2022-02-04 15:09:38 +01:00
|
|
|
border-radius: var(--border-radius);
|
2022-02-03 15:32:02 +01:00
|
|
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .08);
|
|
|
|
padding: 0 0.8rem;
|
|
|
|
color: var(--gray-hard-darkest);
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
.addon {
|
|
|
|
grid-area: addon;
|
|
|
|
border-left: 1px solid var(--gray-soft-dark);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&.is-incorrect &-field {
|
|
|
|
border-color: var(--error);
|
|
|
|
.icon {
|
|
|
|
color: var(--error);
|
|
|
|
border-color: var(--error);
|
|
|
|
background-color: var(--error-lightest);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&.is-disabled &-field input,
|
|
|
|
&.is-readOnly &-field input {
|
|
|
|
background-color: var(--gray-soft-light);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-error {
|
|
|
|
margin-top: 0.4rem;
|
|
|
|
color: var(--error);
|
|
|
|
}
|
|
|
|
}
|