merchi_product_form
Version:
A React component for Merchi product forms
606 lines (585 loc) • 13.1 kB
CSS
/* **********
Embed form
********** */
.merchi-embed-form {
/* buttons */
/* variant container */
/* information */
/* images */
/* react zoom package */
/* cost summary */
/* variation dropzone */
/* variation image select */
/* variation color select */
/* variation checkbox and radio */
/* titles */
/* other */
/* product groups */
/* quantity input */
}
.merchi-embed-form_button-submit {
margin: 4px ;
}
.merchi-embed-form_variantion-container {
gap: 2rem;
display: flex;
flex-direction: column;
padding: 1rem 0;
}
@media (min-width: 992px) {
.merchi-embed-form_variantion-container {
padding: 0;
}
}
.merchi-embed-form_information-container {
margin-top: 1rem;
}
@media (min-width: 992px) {
.merchi-embed-form_information-container {
padding: 0;
}
}
.merchi-embed-form_information-container ul {
gap: 1rem;
}
.merchi-embed-form_information-container .nav-item {
padding: 0 ;
}
.merchi-embed-form_information-container-list-group-item {
padding: 0.5rem ;
list-style-type: none;
}
.merchi-embed-form_img-product-pic img {
max-width: 100%;
border-radius: 0.5rem;
}
.merchi-embed-form_img-preview-container {
flex-direction: column;
}
.merchi-embed-form_img-preview-container-main-image {
align-items: center;
display: flex;
justify-content: center;
width: 100%;
}
.merchi-embed-form_img-thumbnails {
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
padding: 0.5rem;
}
.merchi-embed-form_zoom-img button {
font-size: 1.5rem;
display: flex;
}
.merchi-embed-form_summary-product-cost {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
margin: 1rem 0;
flex-direction: wrap;
}
.merchi-embed-form_summary-product-cost-container {
display: flex;
flex-direction: column;
font-size: 1.2rem;
margin-top: 1.5rem;
}
.merchi-embed-form_summary-button-submit-container {
display: flex;
}
.merchi-embed-form_dropzone {
padding: 0;
border: none;
color: inherit;
padding: 2rem 1rem;
background-color: #fff;
border: 1px dashed #dee2e6;
border-radius: 0.375rem;
text-align: center;
color: #8898aa;
order: -1;
cursor: pointer;
z-index: 999;
transition: all 0.2s ease-in-out;
}
.merchi-embed-form_dropzone:hover {
box-shadow: 0 0.5em 0.75em rgba(0, 0, 0, 0.0784313725);
scale: 1.002;
}
.merchi-embed-form_dropzone-text-container {
display: flex;
}
.merchi-embed-form_dropzone-icon-container {
display: inline-block;
width: 50px;
height: 50px;
background: #dfdfdf;
border-radius: 100%;
position: relative;
margin-right: 1rem;
}
.merchi-embed-form_dropzone-icon {
position: absolute;
display: block;
top: 50%;
height: 24px;
left: 50%;
transform: translate(-50%, -50%);
}
.merchi-embed-form_dropzone-icon-plus {
transition: all 0.15s ease-in-out;
position: absolute;
background: white;
height: 30px;
width: 30px ;
border-radius: 100%;
border: 1px solid #dfdfdf;
padding: 5px;
display: block;
right: -8px;
bottom: -14px;
top: initial;
left: initial;
}
.merchi-embed-form_dropzone-icon-plus:hover {
scale: 1.2;
}
.merchi-embed-form_image-select-option-container {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.merchi-embed-form_image-select-option-item-container {
flex-grow: 1;
flex: 0 0 calc(50% - 0.5rem);
}
@media (min-width: 782px) {
.merchi-embed-form_image-select-option-item-container {
flex: 0 0 calc(33.33% - 0.67rem);
}
}
.merchi-embed-form_image-select-option-item {
background: #fff;
border-radius: 0.5em;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition-duration: 0.15s;
position: relative;
text-align: center;
padding: 1rem 0.5rem;
}
.merchi-embed-form_image-select-option-item:hover {
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition-duration: 0.25s;
}
.merchi-embed-form_image-select-option-item-img {
display: block;
height: 150px;
margin: auto;
max-width: 150px;
width: 100%;
background-repeat: no-repeat;
background-size: contain;
}
.merchi-embed-form_image-select-option-item svg {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: #fff;
padding: 2px;
padding-bottom: 1px;
border-radius: 0.4rem;
font-size: 28px ;
-webkit-animation-name: fadeInOpacity;
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 0.2s;
animation-name: fadeInOpacity;
animation-iteration-count: 1;
animation-duration: 0.2s;
}
.merchi-embed-form_color-select-container {
display: flex;
flex-wrap: wrap;
gap: 2rem;
}
@media (max-width: 768px) {
.merchi-embed-form_color-select-container {
justify-content: center;
}
}
.merchi-embed-form_color-select-indicator {
border-radius: 100%;
height: 65px;
width: 65px;
}
.merchi-embed-form_color-select-item {
align-items: center;
display: flex;
flex-direction: column;
position: relative;
}
.merchi-embed-form_color-select-description {
white-space: nowrap;
text-overflow: ellipsis;
overflow: clip;
max-width: 125px;
text-transform: capitalize;
background-color: white;
padding: 0 0.4rem;
margin: 6px 0 0 0;
cursor: pointer;
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
font-size: 0.8rem;
font-weight: 600;
}
.merchi-embed-form_color-select-option {
border: 4px solid #fff;
border-radius: 100%;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease-in-out;
z-index: 1;
height: 50px;
width: 50px;
}
.merchi-embed-form_color-select-option:hover {
box-shadow: 0 5px 4px rgba(0, 0, 0, 0.1);
}
.merchi-embed-form_color-select-option i,
.merchi-embed-form_color-select-option svg {
position: absolute;
top: 0;
right: 0;
background: #fff;
border-radius: 100%;
font-size: 21px;
}
.merchi-embed-form_checkbox_radio-container {
display: flex;
flex-direction: column;
}
.merchi-embed-form_checkbox_radio-item-container {
display: flex;
flex-direction: row;
gap: 1rem;
flex-wrap: wrap;
}
.merchi-embed-form_checkbox_radio-input {
position: absolute;
opacity: 0;
cursor: pointer;
z-index: 999;
height: 33px;
width: 33px;
}
.merchi-embed-form_checkbox_radio-input + label {
position: relative;
cursor: pointer;
display: flex;
align-items: center;
margin-bottom: 0;
}
.merchi-embed-form_checkbox_radio-input + label::before {
content: " ";
display: inline-block;
margin-right: 0.5rem;
width: 33px;
height: 33px;
background-color: white;
border-radius: 6px;
box-shadow: rgba(42, 42, 42, 0.15) 0px 2px 2px 0px;
transition: all 0.1s ease-in-out;
cursor: pointer;
}
.merchi-embed-form_checkbox_radio-input + label::after {
content: "";
width: 11px;
height: 11px;
border-radius: 100%;
position: absolute;
top: 50%;
left: 11px;
transform: translateY(-50%);
opacity: 0;
transition: all 0.3s ease;
cursor: pointer;
}
.merchi-embed-form_checkbox_radio-input:disabled + label::before {
opacity: 0.8;
box-shadow: none;
cursor: not-allowed;
border: inset 1px rgba(0, 0, 0, 0.168627451);
background-color: transparent;
}
.merchi-embed-form_checkbox_radio-input:disabled + label::after {
cursor: not-allowed;
}
.merchi-embed-form_checkbox_radio-input:disabled + label .merchi-embed-form_checkbox_radio-input-label {
opacity: 0.8;
box-shadow: none;
cursor: not-allowed;
border: inset 1px rgba(0, 0, 0, 0.168627451);
background-color: transparent;
}
.merchi-embed-form_checkbox_radio-input:disabled + label:hover::before {
box-shadow: none;
border: inset 1px rgba(0, 0, 0, 0.168627451);
}
.merchi-embed-form_checkbox_radio-input:checked + label::before {
box-shadow: rgba(42, 42, 42, 0.15) 0px 1px 1px 0px;
}
.merchi-embed-form_checkbox_radio-input:checked + label::after {
opacity: 1;
}
.merchi-embed-form_checkbox_radio-label {
position: relative;
cursor: auto ;
display: inline-flex;
align-items: center;
height: 33px;
}
.merchi-embed-form_checkbox_radio-super {
display: block;
color: rgb(129, 136, 155);
padding: 3px 10px;
font-weight: bold;
border-radius: 8px;
font-size: 11px;
margin-top: 10px;
width: -moz-fit-content;
width: fit-content;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1490196078);
background: #f2f4fb;
border-top: 1px solid white;
border-left: 1px solid white;
}
.merchi-embed-form_input-radio {
font-size: 18px;
font-weight: 800;
padding-bottom: 0.25rem;
}
.merchi-embed-form_input-checkbox {
font-size: 18px;
font-weight: 800;
padding-bottom: 0.25rem;
}
.merchi-embed-form_input-select {
font-size: 18px;
font-weight: 800;
padding-bottom: 0.25rem;
}
.merchi-embed-form_input-image-select {
font-size: 18px;
font-weight: 800;
padding-bottom: 0.25rem;
}
.merchi-embed-form_input-file {
font-size: 18px;
font-weight: 800;
padding-bottom: 0.25rem;
}
.merchi-embed-form_variation-cost-detail {
display: block;
color: rgb(129, 136, 155);
padding: 3px 10px;
font-weight: bold;
border-radius: 8px;
font-size: 14px;
width: -moz-fit-content;
width: fit-content;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1490196078);
background: #f2f4fb;
border-top: 1px solid white;
border-left: 1px solid white;
margin: 0.25rem 0rem 0.5rem;
}
.merchi-embed-form_product-group-container {
background: rgba(255, 255, 255, 0.75);
border-radius: 0.75rem;
padding: 0.75rem 1rem 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.merchi-embed-form_product-group-actions-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
@media (min-width: 500px) {
.merchi-embed-form_product-group-actions-container {
width: auto;
}
}
.merchi-embed-form_product-group-actions-cost-container {
align-items: center;
display: flex;
justify-content: space-between;
margin-top: 2rem;
flex-wrap: wrap;
gap: 1rem;
}
.merchi-embed-form_product-group-total-cost {
font-weight: 800;
}
.merchi-embed-form_product-group-button-remove {
width: 100%;
}
@media (min-width: 500px) {
.merchi-embed-form_product-group-button-remove {
width: fit-content;
}
}
.merchi-embed-form_product-group-button-add-group {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
margin: 1rem 0;
}
.merchi-embed-form_product-group-inventory-status {
width: fit-content;
border-radius: 50px;
color: white;
font-weight: bold;
font-size: 0.75rem;
padding: 3px;
display: flex;
gap: 0.25rem;
align-items: center;
}
.merchi-embed-form_product-group-variation-container {
display: flex;
flex-direction: column;
gap: 2rem;
}
.merchi-embed-form_product-group-input-qty-container {
font-size: 18px;
font-weight: 800;
}
.merchi-embed-form_quantity-label-container {
font-size: 18px;
font-weight: 800;
margin-bottom: 0.5rem;
}
/* **********
END Embed from
********** */
/* Draft js RTE styles */
.rte-editor-iframeContainer {
width: 100%;
height: 0;
position: relative;
min-height: 300px;
padding-bottom: 56.25%;
}
.rte-editor-iframe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.rte-editor-invalidVideoSrc {
text-align: center;
background-color: #eaeaea;
padding: 1em;
}
.rte-editor-video {
width: 100%;
height: 100%;
}
[data-rmiz-wrap=visible],
[data-rmiz-wrap=hidden] {
position: relative;
display: inline-flex;
align-items: flex-start;
}
[data-rmiz-wrap=hidden] {
visibility: hidden;
}
[data-rmiz-overlay] {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
transition-property: background-color;
}
[data-rmiz-btn-open],
[data-rmiz-btn-close] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
/* reset styles */
margin: 0;
padding: 0;
border: none;
border-radius: 0;
font: inherit;
color: inherit;
background: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
[data-rmiz-btn-open] {
cursor: zoom-in;
}
[data-rmiz-btn-close] {
cursor: zoom-out;
}
[data-rmiz-modal-content] {
position: absolute;
transition-property: transform;
transform-origin: center center;
}
/* Product Images */
.preview-container {
display: flex;
height: 490px;
padding-bottom: 1rem ;
padding-top: 1rem ;
}
.preview-container-stacked {
display: flex;
padding-bottom: 1rem ;
padding-top: 1rem ;
}
.preview-container-main-image {
align-items: center;
display: flex;
justify-content: center;
width: 100%;
}
.product-pic img {
width: 100%;
border-radius: 0.375rem;
height: auto;
max-width: 470px;
max-height: 446px;
}
.fit-image {
width: 100%;
object-fit: cover;
border-radius: 0.375rem;
}
.variation-field-instructions .DraftEditor-root .DraftEditor-editorContainer {
min-height: 1px;
}
.variation-field-instructions .DraftEditor-root .DraftEditor-editorContainer .public-DraftEditor-content {
min-height: 1px;
}
.variation-field-instructions img {
max-width: 100%;
}
/*# sourceMappingURL=globals.css.map */