element-call/src/Input.module.css

159 lines
2.9 KiB
CSS
Raw Normal View History

2021-08-19 17:49:45 -07:00
.fieldRow {
display: flex;
margin-bottom: 10px;
}
.field {
display: flex;
flex: 1;
min-width: 0;
position: relative;
margin: 1em 0;
}
.fieldRow.rightAlign {
justify-content: flex-end;
}
.fieldRow > .field {
margin: 0 5px;
}
.fieldRow > .field:first-child {
margin-left: 0;
}
.fieldRow > .field:last-child {
margin-right: 0;
}
2021-09-03 15:45:07 -07:00
.inputField {
border-radius: 4px;
2021-10-06 16:47:05 -07:00
transition: border-color 0.25s;
2021-11-17 18:05:41 -08:00
border: 1px solid var(--inputBorderColor);
2021-09-03 15:45:07 -07:00
}
.inputField input {
2021-08-19 17:49:45 -07:00
font-weight: 400;
2021-12-07 17:59:55 -08:00
font-size: 15px;
2021-08-19 17:49:45 -07:00
border: none;
border-radius: 4px;
2021-12-07 17:59:55 -08:00
padding: 11px 9px;
2021-11-17 17:52:31 -08:00
color: var(--textColor1);
2021-12-07 17:59:55 -08:00
background-color: var(--bgColor1);
2021-08-19 17:49:45 -07:00
flex: 1;
min-width: 0;
}
2021-09-03 15:45:07 -07:00
.inputField input::placeholder {
2021-08-19 17:49:45 -07:00
transition: color 0.25s ease-in 0s;
color: transparent;
}
2021-09-03 15:45:07 -07:00
.inputField input:placeholder-shown:focus::placeholder {
2021-10-06 16:47:05 -07:00
transition: color 0.25s ease-in 0.1s;
2021-11-17 18:05:41 -08:00
color: var(--textColor2);
2021-08-19 17:49:45 -07:00
}
2021-09-03 15:45:07 -07:00
.inputField label {
2021-10-06 16:47:05 -07:00
transition: font-size 0.25s ease-out 0.1s, color 0.25s ease-out 0.1s,
top 0.25s ease-out 0.1s, background-color 0.25s ease-out 0.1s;
2021-12-13 12:00:41 -08:00
color: var(--textColor3);
2021-08-19 17:49:45 -07:00
background-color: transparent;
2021-12-07 17:59:55 -08:00
font-size: 15px;
2021-08-19 17:49:45 -07:00
position: absolute;
left: 0;
top: 0;
2021-12-07 17:59:55 -08:00
margin: 9px 8px;
2021-08-19 17:49:45 -07:00
padding: 2px;
pointer-events: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: calc(100% - 20px);
}
2021-09-03 15:45:07 -07:00
.inputField:focus-within {
2021-11-17 18:05:41 -08:00
border-color: var(--inputBorderColorFocused);
2021-08-20 16:23:12 -07:00
}
2021-09-03 15:45:07 -07:00
.inputField input:focus {
2021-08-20 16:23:12 -07:00
outline: 0;
}
2021-10-06 16:47:05 -07:00
.inputField input:focus + label,
.inputField input:not(:placeholder-shown) + label {
2021-11-17 17:52:31 -08:00
background-color: var(--bgColor2);
2021-10-06 16:47:05 -07:00
transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s,
top 0.25s ease-out 0s, background-color 0.25s ease-out 0s;
2021-08-19 17:49:45 -07:00
font-size: 10px;
top: -13px;
padding: 0 2px;
pointer-events: auto;
}
2021-09-03 15:45:07 -07:00
.inputField input:focus + label {
2021-11-17 18:05:41 -08:00
color: var(--inputBorderColorFocused);
2021-08-20 16:23:12 -07:00
}
2021-09-03 15:45:07 -07:00
.checkboxField {
display: flex;
align-items: flex-start;
}
.checkboxField label {
display: flex;
align-items: center;
flex-grow: 1;
font-size: 13px;
}
.checkboxField input {
2021-12-02 17:21:37 -08:00
outline: 0;
2021-09-03 15:45:07 -07:00
appearance: none;
2021-10-06 16:47:05 -07:00
-webkit-appearance: none;
2021-09-03 15:45:07 -07:00
margin: 0;
padding: 0;
}
.checkbox {
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
height: 16px;
width: 16px;
2021-10-06 16:47:05 -07:00
border: 1.5px solid rgba(185, 190, 198, 0.5);
2021-09-03 15:45:07 -07:00
box-sizing: border-box;
border-radius: 4px;
margin-right: 10px;
}
.checkbox svg {
display: none;
}
.checkbox svg * {
2021-10-06 16:47:05 -07:00
stroke: #fff;
2021-09-03 15:45:07 -07:00
}
.checkboxField input[type="checkbox"]:checked + label > .checkbox {
2021-11-17 17:52:31 -08:00
background: var(--primaryColor);
border-color: var(--primaryColor);
2021-09-03 15:45:07 -07:00
}
.checkboxField input[type="checkbox"]:checked + label > .checkbox svg {
display: flex;
}
2021-12-02 17:21:37 -08:00
.checkboxField:focus-within .checkbox {
border: 1.5px solid var(--inputBorderColorFocused) !important;
}
2021-08-20 16:23:12 -07:00
.errorMessage {
margin: 0;
font-size: 13px;
2021-08-20 16:36:41 -07:00
color: #ff5b55;
2021-08-20 16:23:12 -07:00
font-weight: 600;
2021-10-06 16:47:05 -07:00
}