react-super-forms-library
Version:
React Super Forms allow you to create forms elements like text input, phone number input, text-area box , radio input , checkbox input box etcetera elements with basic styling, just with minimal configurations so you can focus on the task that is more imp
461 lines (395 loc) • 6.86 kB
CSS
.select-field-label {
font-size: 16px;
opacity: 0.8;
}
.select-option {
box-sizing: border-box;
border: none;
outline: none;
width: 100%;
height: 30px;
padding: 0px;
border-bottom: 1px solid blueviolet;
}
.select-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.select-field-label {
color: blueviolet;
}
.select-container {
width: 100%;
}.text-label {
font-size: 16px;
opacity: 0.8;
}
.input-box {
box-sizing: border-box;
border: none;
outline: none;
width: 100%;
height: 30px;
padding: 0px;
border-bottom: 1px solid blueviolet;
}
.text-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.text-label {
color: blueviolet;
}
.text-field-box {
width: 100%;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}.checkbox-label {
font-size: 16px;
opacity: 0.8;
}
.checkbox-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.checkbox-label {
color: blueviolet;
}
.isColumn {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.checkbox-container {
display: flex;
}
.checkbox-name {
margin: 3px 3px 0px 0px;
}.radio-label {
font-size: 16px;
opacity: 0.8;
}
.radio-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.radio-label {
color: blueviolet;
}
.isColumn {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.radio-name {
margin: 3px 3px 0px 0px;
}.field-array-container-label, .field-array-label {
font-size: 16px;
opacity: 0.8;
}
.array-remove-icon, .array-add-icon {
font-size: 16px;
background-color: blueviolet;
border-radius: 4px;
color: white;
padding: 14px 30px;
text-align: center;
cursor: pointer;
margin-top: 5px;
border: none;
}
.array-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
width: 100%;
}
.field-array-container-label {
color: blueviolet;
}
.field-array-label {
color: blueviolet;
}
.field-array-box {
display: flex;
}
.array-remove-icon {
background-color: rgb(222, 218, 218);
height: 30px;
margin: 16px 0px 0px 10px;
padding: 0px 14px 0px 14px;
}
.array-add-icon {
display: flex;
}.error-text, .helper-text {
font-size: 14px;
opacity: 0.8;
}
.error-text {
color: red;
}
.helper-text {
color: black;
}.file-input-label {
font-size: 16px;
opacity: 0.8;
}
.btn {
font-size: 16px;
background-color: blueviolet;
border-radius: 4px;
color: white;
padding: 14px 30px;
text-align: center;
cursor: pointer;
margin-top: 5px;
border: none;
}
.file-input-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.file-input-label {
color: blueviolet;
}
.upload-btn-wrapper {
position: relative;
overflow: hidden;
display: inline-block;
width: 100%;
}
.upload-btn-wrapper input[type=file] {
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
.btn {
padding: 5px 8px 5px 8px;
font-size: 14px;
cursor: auto;
}.helper-text {
font-size: 14px;
opacity: 0.8;
}
.switch-label {
font-size: 16px;
opacity: 0.8;
}
.switch-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.switch-label {
color: blueviolet;
}
.switch-container {
position: relative;
width: 56px;
height: 30px;
}
.switch-container input {
opacity: 0;
width: 0;
height: 0;
}
.helper-text {
color: black;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgb(220, 220, 220);
transition: 0.3s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 2px;
bottom: 2px;
background-color: white;
transition: 0.3s;
}
input:checked + .slider {
background-color: blueviolet;
}
input:checked + .slider:before {
transform: translateX(26px);
}
.slider.round {
border-radius: 30px;
}
.slider.round:before {
border-radius: 50%;
}.phone-field-label {
font-size: 16px;
opacity: 0.8;
}
.phone-field-select, .phone-field-input {
box-sizing: border-box;
border: none;
outline: none;
width: 100%;
height: 30px;
padding: 0px;
border-bottom: 1px solid blueviolet;
}
.phone-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.phone-field-label {
color: blueviolet;
}
.phone-field-container {
display: flex;
}
.phone-field-box {
width: auto;
}
.phone-field-select {
height: 30px;
}
.phone-field-input {
margin-left: 5px;
height: 30px;
}.range-label {
font-size: 16px;
opacity: 0.8;
}
.input-box {
box-sizing: border-box;
border: none;
outline: none;
width: 100%;
height: 30px;
padding: 0px;
border-bottom: 1px solid blueviolet;
}
.range-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.range-label {
color: blueviolet;
}
.range-field-box {
width: 100%;
}.textarea-label {
font-size: 16px;
opacity: 0.8;
}
.textarea-box {
box-sizing: border-box;
border: 1px solid blueviolet;
outline: none;
width: 100%;
resize: vertical;
min-height: 50px;
max-height: 100px;
resize: vertical;
min-height: 50px;
max-height: 100px;
}
.textarea-field {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
}
.textarea-label {
color: blueviolet;
}
.textarea-field-box {
width: 100%;
}.submit-btn {
margin-top: 30px;
font-size: 16px;
background-color: blueviolet;
border-radius: 4px;
color: white;
padding: 14px 30px;
text-align: center;
cursor: pointer;
margin-top: 5px;
border: none;
}
.loader {
height: 0;
width: 0;
border: 6px solid blueviolet;
border-bottom-color: #ccc;
padding: 10px;
border-radius: 50%;
animation: rotate 1s infinite linear;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.row {
display: flex;
margin-top: 25px;
}
.action-center {
display: flex;
align-items: center;
justify-content: center;
}
.action-right {
display: flex;
align-items: flex-end;
justify-content: flex-end;
}
.action-fullWidth {
width: 100%;
}
.action-right > .loader {
position: static;
}