Plugin Directory

Changeset 3346454


Ignore:
Timestamp:
08/18/2025 01:50:36 PM (8 months ago)
Author:
digihold
Message:

Update plugin: version 1.0.1

Location:
digiblocks
Files:
340 added
2 deleted
67 edited

Legend:

Unmodified
Added
Removed
  • digiblocks/trunk/assets/css/blocks/editor.css

    r3317829 r3346454  
    1 .digiblocks-tab-panel{margin-top:10px}.digiblocks-tabs-wrapper{display:flex}.digiblocks-tab-button{align-items:center;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;display:flex;flex:1;flex-direction:column;gap:.5rem;justify-content:center;padding:10px 15px;transition:all .2s ease}.digiblocks-tab-button:hover{background-color:#f5f5f5}.digiblocks-tab-button.is-active{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-tab-button.is-active svg path{fill:#007cba}.digiblocks-tab-icon{height:1.2rem;width:1.2rem}.digiblocks-tab-icon svg{height:100%;width:100%}.digiblocks-tab-title{font-size:11px;font-weight:500;text-transform:uppercase}.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:16px}.digiblocks-tab-panel.four .digiblocks-tabs-wrapper{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.digiblocks-font-awesome-control{margin-bottom:24px;position:relative}.digiblocks-font-awesome-control .digiblocks-control-label{box-sizing:border-box;display:block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:.5rem;text-transform:uppercase}.digiblocks-ip-placeholder-wrap{align-items:center;background:#f0f0f1;border:1px solid #dcdcde;border-radius:4px;cursor:pointer;display:flex;padding:12px;position:relative;transition:all .2s ease}.digiblocks-ip-placeholder-wrap:hover{background:#f6f7f7;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-selected-icon{align-items:center;background:#fff;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);height:45px;justify-content:center;margin-right:10px;overflow:hidden;position:relative;width:45px}.digiblocks-ip-selected-icon,.digiblocks-ip-selected-icon-value,.digiblocks-ip-selected-icon-value span{display:flex}.digiblocks-ip-selected-icon svg{color:#3c434a;height:24px;width:24px}.digiblocks-ip-remove-icon{align-items:center;background:#cc1818;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;opacity:0;position:absolute;right:-8px;top:-8px;transform:scale(.8);transition:all .2s ease;width:20px;z-index:10}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-remove-icon{opacity:1;transform:scale(1)}.digiblocks-ip-remove-icon svg{height:12px;width:12px;fill:#fff}.digiblocks-ip-actions{color:#3c434a;flex:1;font-size:13px}.digiblocks-ip-actions span{display:inline-block;transition:color .2s ease}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-actions span{color:#007cba}.digiblocks-ip-modal-wrapper-overlay{animation:modal-appear .2s ease-out;background:rgba(0,0,0,.7)!important;z-index:160000!important}@keyframes modal-appear{0%{opacity:0}to{opacity:1}}.digiblocks-ip-modal-wrapper{animation:modal-slide-up .25s ease-out;border-radius:6px!important;box-shadow:0 5px 15px rgba(0,0,0,.3)!important;height:600px!important;max-height:80vh!important;max-width:900px!important;overflow:hidden!important;padding:0!important;width:90%!important}.digiblocks-ip-modal-wrapper .components-modal__header{display:none}.digiblocks-ip-modal-wrapper .components-modal__content{margin:0;padding:0}.digiblocks-ip-modal-wrapper .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header{border:0}@keyframes modal-slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.digiblocks-ip-header{align-items:center;background:#fff;border-bottom:1px solid #dcdcde;display:flex;gap:2rem;justify-content:space-between;padding:16px 24px}.digiblocks-ip-header h2{color:#1e1e1e;font-size:18px;font-weight:600;margin:0}.digiblocks-ip-search-container{flex:1}.digiblocks-ip-search-container .components-base-control{width:100%}.digiblocks-ip-search-bar{align-items:center;display:flex;position:relative}.digiblocks-ip-search-bar svg{height:16px;left:10px;position:absolute;width:16px;fill:#757575}.digiblocks-ip-search-bar input.components-text-control__input{border:1px solid #dcdcde;border-radius:4px;height:36px;padding-left:32px!important;width:100%}.digiblocks-ip-search-bar input.components-text-control__input:focus{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-search-bar span{color:#757575;cursor:pointer;font-size:18px;font-weight:700;position:absolute;right:10px;transition:color .2s ease}.digiblocks-ip-search-bar span:hover{color:#cc1818}.digiblocks-ip-lr-container{display:flex;height:calc(100% - 130px);overflow:hidden}.digiblocks-ip-left{background:#f6f7f7;border-right:1px solid #dcdcde;display:flex;flex-direction:column;overflow:hidden;width:220px}.digiblocks-ip-categories-list{flex:1;overflow-y:auto;padding:12px 0}.digiblocks-ip-categories-list div{border-left:3px solid transparent;color:#3c434a;cursor:pointer;font-size:13px;padding:8px 16px;transition:all .2s ease}.digiblocks-ip-categories-list div:hover{background:rgba(0,0,0,.04);color:#007cba}.digiblocks-ip-categories-list div.selected{background:#f0f6fc;border-left-color:#007cba;color:#007cba;font-weight:500}.digiblocks-ip-style-selector{background:#f0f0f1;border-top:1px solid #dcdcde;padding:16px}.digiblocks-ip-style-selector .components-base-control__label{font-weight:500;margin-bottom:8px}.digiblocks-ip-style-selector .components-select-control__input{height:36px}.digiblocks-ip-right{display:flex;flex:1;flex-direction:column;overflow:hidden}.digiblocks-ip-modal-container{background:#fff;flex:1;overflow-y:auto;padding:16px}.digiblocks-ip-loading{align-items:center;color:#3c434a;display:flex;flex-direction:column;height:100%;justify-content:center}.digiblocks-ip-loading .components-spinner{margin:0 0 12px}.digiblocks-ip-icons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));padding-bottom:16px}.digiblocks-ip-icons.icon-not-found{align-items:center;color:#757575;display:flex;font-size:14px;height:100%;justify-content:center}.digiblocks-icon-item{align-items:center;border:1px solid transparent;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;height:90px;justify-content:center;padding:8px;text-align:center;transition:all .2s ease}.digiblocks-icon-item:hover{background:#f6f7f7;border-color:#dcdcde;box-shadow:0 2px 5px rgba(0,0,0,.08);transform:translateY(-2px)}.digiblocks-icon-item.selected{background:#f0f6fc;border-color:#007cba}.digiblocks-icon-item svg{color:#3c434a;height:28px;margin-bottom:8px;width:28px}.digiblocks-icon-item span:nth-child(2){color:#757575;display:-webkit-box;font-size:11px;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;max-width:100%;overflow:hidden}.digiblocks-ip-load-more{display:block!important;grid-column:1/-1;margin:16px auto 0!important}.digiblocks-ip-footer{background:#f6f7f7;border-top:1px solid #dcdcde;display:flex;justify-content:flex-end;padding:16px 24px}.digiblocks-ip-footer button{justify-content:center;min-width:80px}@media (max-width:782px){.digiblocks-ip-modal-wrapper{height:90vh!important;max-height:none!important;width:95%!important}.digiblocks-ip-header{align-items:flex-start;flex-direction:column}.digiblocks-ip-search-container{margin:16px 0 0;max-width:none;width:100%}.digiblocks-ip-lr-container{flex-direction:column;height:calc(100% - 180px)}.digiblocks-ip-left{border-bottom:1px solid #dcdcde;border-right:none;height:auto;width:100%}.digiblocks-ip-categories-list{display:flex;overflow-x:auto;padding:8px}.digiblocks-ip-categories-list div{border-bottom:3px solid transparent;border-left:none;padding:8px 12px;white-space:nowrap}.digiblocks-ip-categories-list div.selected{border-bottom-color:#007cba;border-left-color:transparent}.digiblocks-ip-icons{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}.digiblocks-icon-item{height:80px}}.digiblocks-ip-modal-wrapper{animation:fadeIn .2s ease-out}.digiblocks-icon-item{animation:fadeIn .3s ease-out}.digiblocks-icon-box{position:relative;transition:all .3s ease}.digiblocks-icon-box[data-hover-effect=lift]:hover{transform:translateY(-10px)}.digiblocks-icon-box[data-hover-effect=scale]:hover{transform:scale(1.05)}.digiblocks-icon-box[data-hover-effect=glow]:hover{box-shadow:0 0 20px rgba(0,120,215,.2)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-20px)}60%{transform:translateY(-10px)}}.digiblocks-icon-box[data-animation=fade-in]{animation:fadeIn 1s ease}.digiblocks-icon-box[data-animation=slide-up]{animation:slideInUp 1s ease}.digiblocks-icon-box[data-animation=slide-left]{animation:slideInLeft 1s ease}.digiblocks-icon-box[data-animation=slide-right]{animation:slideInRight 1s ease}.digiblocks-icon-box[data-animation=zoom-in]{animation:zoomIn 1s ease}.digiblocks-icon-box[data-animation=bounce]{animation:bounce 1s ease}body .editor-styles-wrapper{transition:all .3s ease-in-out}.digiblocks-responsive-control{margin-bottom:24px}.digiblocks-responsive-control-content{padding:0}.digiblocks-responsive-label-wrap{gap:.5rem}.digiblocks-responsive-common-button{border:0;box-shadow:none!important;color:#50575e;cursor:pointer;display:flex;height:auto;line-height:0;margin:0;outline:0;padding:4px}.digiblocks-responsive-common-button:active,.digiblocks-responsive-common-button:focus,.digiblocks-responsive-common-button:hover{box-shadow:none;color:#007cba;outline:none}.digiblocks-responsive-common-button svg{height:.6rem;width:.6rem;fill:currentColor}.digiblocks-control-label{color:#50575e;font-size:13px;font-weight:400;line-height:1.4em;margin-bottom:0}.digiblocks-typography-options{margin-bottom:24px}.digiblocks-typography-options .digiblocks-select-control .components-select-control,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control{align-items:center;display:grid;gap:0;grid-template-columns:50% 50%}.digiblocks-typography-options .digiblocks-select-control .components-select-control label,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control label{margin-bottom:0}.digiblocks-control-popup__options--action-wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}body .components-button.digiblocks-typography-button{background:transparent!important;border:1px solid #e6e7e9;border-radius:14px;color:#50575e;cursor:pointer;height:28px;margin:0;padding:5px;width:28px}body .components-button.digiblocks-typography-button .dashicons-edit{font-size:15px;line-height:20px;outline:none}body .components-button.digiblocks-typography-button:hover{color:#007cba}body .components-button.digiblocks-typography-button.is-pressed{background-color:#fff;color:#007cba}.digiblocks-typography-advanced{background:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.2);margin-bottom:16px;padding:16px;position:relative;top:5px;width:100%}.digiblocks-font-family-searchable-select__wrapper{margin-bottom:15px}.digiblocks-font-family-searchable-select__wrapper .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:10px;text-transform:none!important}.digiblocks-size-type-field-tabs{margin-bottom:15px}.digiblocks-size-type-field-tabs:last-child{margin-bottom:0}.digiblocks-responsive-label-wrap{align-items:center;display:flex}.digiblocks-control__header .digiblocks-control__actions{gap:.25rem}.digiblocks-range-control__mobile-controls{align-items:center;display:flex}.digiblocks-range-control__mobile-controls>.components-base-control{width:100%}.digiblocks-select-control{margin-bottom:15px}.digiblocks-select-control--layout-inline .components-base-control__field{display:flex;flex-direction:column}.digiblocks-select-control--layout-inline .components-base-control__label,.digiblocks-select-control--layout-inline .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:8px;text-transform:none!important}.digiblocks-select-control--layout-inline .components-select-control__input{color:#50575e;line-height:30px;text-transform:capitalize}.digiblocks-typography-decoration{margin-bottom:15px}.components-popover.components-dropdown-menu__popover{z-index:1000}body .components-base-control__field{margin:0}.digiblocks-responsive-control-content{display:flex;flex-direction:column}.digiblocks-control__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:10px;width:100%}.digiblocks-control__actions{direction:ltr;display:flex;position:relative;top:0}.digiblocks-reset.components-button.is-small.has-icon:not(.has-text){min-width:auto;padding:0;width:auto}body .components-button.is-secondary.digiblocks-reset.is-small{background:transparent;box-shadow:unset;color:#ccc;padding:0 4px}body .components-button.is-secondary.digiblocks-reset.is-small:not(:disabled){color:#007cba}.digiblocks-reset .dashicons-image-rotate{font-size:10px;height:10px;width:10px}.digiblocks-reset.is-small.is-pressed,.digiblocks-reset.is-small:focus:not(:disabled){border:0}.digiblocks-control__units{align-items:center;direction:ltr;display:flex;gap:.25rem}.digiblocks-control__units .components-button{cursor:pointer;font-size:10px;justify-content:center;padding:0;text-align:center;text-shadow:none;text-transform:uppercase;width:100%}.digiblocks-control__units .components-button.is-pressed,.digiblocks-control__units .components-button:focus:not(:disabled){border:0}.digiblocks-control__units .components-button.is-primary.is-small,.digiblocks-control__units .components-button.is-secondary.is-small{box-shadow:unset}.digiblocks-control__units .components-button.is-primary{background:unset;background-color:unset;box-shadow:unset;color:#007cba}.digiblocks-control__units .components-button.is-secondary,.digiblocks-control__units .components-button.is-tertiary{background:unset;background-color:unset;color:#50575e}.digiblocks-control__units .components-button.is-secondary:hover:not(:disabled),.digiblocks-control__units .components-button.is-tertiary:hover:not(:disabled){color:#007cba}.digiblocks-control__units .components-button:last-child{padding:0}.digiblocks-spacing-inputs{display:flex}.digiblocks-spacing-input[type=number]{border-bottom-color:#e6e7e9;border-left:1px solid #e6e7e9;border-radius:0;border-right:1px solid #e6e7e9;border-top-color:#e6e7e9;box-shadow:none!important;color:#50575e;flex:1;font-size:14px;height:30px;line-height:20px;margin:0 -1px 0 0;max-width:50px;padding-left:4px;padding-right:1px;text-align:center}.digiblocks-spacing-input::-webkit-inner-spin-button,.digiblocks-spacing-input::-webkit-outer-spin-button{margin:0}.digiblocks-spacing-input:focus{outline:1px solid #ccc;outline-offset:-1px;z-index:1}.digiblocks-spacing-input::-moz-placeholder{color:#aaa}.digiblocks-spacing-input::placeholder{color:#aaa}.digiblocks-spacing-inputs>.digiblocks-spacing-input:first-child{border-radius:3px 0 0 3px}.digiblocks-spacing-link{align-items:center;background-color:#959595;border:1px solid #959595;border-radius:0 3px 3px 0;color:#fff;cursor:pointer;display:flex;flex:1;font-size:12px;height:auto;justify-content:center;transition:none}.digiblocks-spacing-link.digiblocks-spacing-control-disconnected{background-color:#fff;border-color:#e6e7e9;color:#959595}.digiblocks-spacing-labels{display:flex;margin-top:5px}.digiblocks-spacing-label{color:#ccc;display:block;flex:1;font-size:10px;text-align:center}.digiblocks-spacing-label.digiblocks-spacing-link-label{flex:1}.digiblocks-dimension-control{margin-bottom:25px}.digiblocks-dimension-control.is-responsive{margin-bottom:0}.digiblocks-gradient-control{margin-bottom:16px;width:100%}.digiblocks-gradient-preview{border:1px solid #ddd;border-radius:4px;margin:12px 0;overflow:hidden;position:relative}.digiblocks-gradient-preview-inner{height:60px;position:relative;width:100%}.digiblocks-gradient-colors{margin-top:16px}.digiblocks-gradient-colors-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.digiblocks-gradient-colors-header strong{color:#1e1e1e;font-weight:600}.digiblocks-gradient-color-stops{display:flex;flex-direction:column;gap:12px}.digiblocks-gradient-color-stop{align-items:center;background:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;display:grid;gap:12px;grid-template-columns:40px 1fr 36px;padding:12px;transition:all .2s ease}.digiblocks-gradient-color-stop:hover{background:#f1f3f4;border-color:#d0d7de}.digiblocks-color-indicator-button{align-items:center;background:transparent;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.1),inset 0 0 0 1px hsla(0,0%,100%,.1);cursor:pointer;display:flex;height:32px;justify-content:center;min-width:32px;overflow:hidden;padding:0;position:relative;width:32px}.digiblocks-color-indicator-button .component-color-indicator{box-shadow:none}.digiblocks-color-indicator-button:hover{box-shadow:0 0 0 1px rgba(0,0,0,.2),inset 0 0 0 1px hsla(0,0%,100%,.1);transform:scale(1.05)}.digiblocks-color-indicator-button:focus{box-shadow:0 0 0 2px #007cba;outline:none}.digiblocks-color-indicator-button .components-color-indicator{display:none}.digiblocks-color-dropdown{position:relative}.digiblocks-color-dropdown-content{margin-top:8px;z-index:999999!important}.digiblocks-gradient-color-stop-position{position:relative}.digiblocks-gradient-color-stop-position .components-base-control__field,.digiblocks-gradient-color-stop-position .components-range-control,.digiblocks-gradient-color-stop-position .components-range-control__wrapper{margin-bottom:0!important}.digiblocks-gradient-color-stop-position .components-input-control__container{min-height:36px}.digiblocks-gradient-color-stop-remove{align-items:center;display:flex;justify-content:center}.digiblocks-gradient-color-stop-remove .components-button{align-items:center;border-radius:4px;display:flex;height:32px;justify-content:center;min-width:32px;padding:0}.digiblocks-gradient-color-stop-remove .components-button:disabled{cursor:not-allowed;opacity:.3}.digiblocks-gradient-colors-header .components-button{border-radius:4px;font-size:12px;height:32px;padding:0 12px}.digiblocks-gradient-control .components-range-control,.digiblocks-gradient-control .components-select-control,.digiblocks-gradient-control .components-toggle-group-control{margin-bottom:16px}@media (max-width:600px){.digiblocks-gradient-color-stop{gap:8px;grid-template-columns:36px 1fr 32px;padding:10px}.digiblocks-color-indicator-button{height:28px;min-width:28px;width:28px}.digiblocks-gradient-color-stop-remove .components-button{height:28px;min-width:28px}}.digiblocks-custom-range-control{align-items:center;display:flex;min-height:40px;width:100%}.range-slider-wrapper{align-items:center;display:flex;flex:1;height:30px;position:relative}.range-slider{cursor:pointer;height:100%;margin:0 -6px;opacity:0;position:absolute;width:calc(100% + 12px);z-index:2}.range-track{background-color:#ddd;width:100%}.range-track,.range-track-fill{border-radius:9999px;height:4px;position:absolute}.range-thumb,.range-track-fill{background-color:var(--wp-admin-theme-color,#3858e9);pointer-events:none}.range-thumb{border-radius:50%;box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);height:12px;margin-left:-6px;position:absolute;width:12px}.input-wrapper{margin-left:16px;width:80px}.number-input[type=number]{background-color:#fff;border:1px solid #d5d5d5;border-radius:2px;box-shadow:none!important;color:#1e1e1e;font-size:13px;height:40px;line-height:1;min-height:40px;padding:0 12px;width:100%}.number-input[type=number]:focus{border-color:var(--wp-admin-theme-color,#3858e9);outline:none}.block-editor-block-list__block[data-type="digiblocks/container"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/container"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/container"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-container-inner{position:relative;width:100%}.block-editor-block-list__block[data-type="digiblocks/column"]{border:1px dashed #ddd;min-height:50px;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/column"].is-selected:before{border:1px dashed #1e1e1e;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-layout-selector{background-color:#f8f9fa;border-radius:4px;grid-column:span 12;padding:20px;text-align:center}.digiblocks-layout-selector h2{color:#666;font-size:18px;font-weight:500;margin-bottom:20px;margin-top:0;text-align:center;text-transform:uppercase}.digiblocks-layout-grid{display:flex;flex-wrap:wrap;justify-content:center;margin:auto;max-width:650px;padding:0}.digiblocks-layout-option{box-sizing:border-box;cursor:pointer;list-style:none;padding:5px 10px;position:relative;transition:transform .2s ease;width:20%}.digiblocks-layout-option:hover{transform:scale(1.05)}.digiblocks-layout-icon{align-items:center;display:flex;justify-content:center;margin-bottom:8px;width:100%}.digiblocks-layout-icon svg{width:100%;fill:#d4dce6;transition:all .3s ease}.digiblocks-layout-option:hover .digiblocks-layout-icon svg{fill:#007cba}.digiblocks-layout-label{color:#555;font-size:12px}.digiblocks-layout-option .screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.digiblocks-change-layout-button{margin-bottom:10px!important;width:100%}.digiblocks-media-control{margin-bottom:24px}.digiblocks-media-upload-wrapper{margin-top:8px}.digiblocks-media-preview{background-color:#f0f0f0;border-radius:4px;overflow:hidden;position:relative}.digiblocks-media-preview img{display:block;height:auto;max-height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.digiblocks-media-preview video{background-color:#000;display:block;height:auto;max-height:200px;-o-object-fit:contain;object-fit:contain;width:100%}.digiblocks-media-controls{display:flex;gap:8px;position:absolute;right:5px;top:5px}.digiblocks-media-controls.digiblocks-media-controls .components-button{border-radius:50%;height:28px;justify-content:center;margin:0;outline:none;padding:0;width:28px}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link),.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):active:not(:disabled,[aria-disabled=true]){background-color:#dc3545;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):hover:not(:disabled,[aria-disabled=true]){background-color:#a32531;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):focus,.digiblocks-media-controls .components-button.is-primary:focus:not(:disabled){box-shadow:none}.digiblocks-media-upload-button{justify-content:center;width:100%}.digiblocks-responsive-indicator{align-items:center;color:#757575;display:flex;font-size:12px;margin-bottom:8px}.digiblocks-responsive-indicator-icon{margin-right:5px}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-desktop{display:block}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-mobile,.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-tablet{display:none}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-tablet{display:block}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-mobile{display:none}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-mobile{display:block}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-tablet{display:none}.digiblocks-social-icons-list{margin-bottom:20px}.digiblocks-social-icon-item{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;margin-bottom:16px;overflow:hidden;transition:box-shadow .2s ease}.digiblocks-social-icon-item.dragging{border:1px solid #007cba;box-shadow:0 4px 12px rgba(0,0,0,.15);opacity:.9;position:relative;z-index:100}.digiblocks-social-icon-item.drag-over{background-color:rgba(0,124,186,.05);border:1px dashed #007cba}.digiblocks-social-icon-header{align-items:center;background-color:#f9f9f9;border-bottom:1px solid #e0e0e0;cursor:pointer;display:flex;justify-content:space-between;padding:10px 12px}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-header{border-bottom:none}.digiblocks-social-icon-title{cursor:pointer;flex-grow:1;font-size:14px;font-weight:600;margin-left:8px}.digiblocks-social-icon-drag-handle{align-items:center;color:#757575;cursor:grab;display:flex;justify-content:center}.digiblocks-social-icon-drag-handle:hover{color:#007cba}.digiblocks-social-icon-drag-handle .dashicons{font-size:18px;height:18px;width:18px}.digiblocks-social-icon-actions{display:flex;gap:5px}.digiblocks-social-icon-content{display:flex;flex-direction:column;padding:16px}.digiblocks-add-social-icon{justify-content:center;margin-top:12px!important;width:100%}.digiblocks-social-icon-fields .social-media-icon-picker{margin-bottom:16px}.block-editor-block-list__block .digiblocks-social-icon{display:inline-flex!important}[data-type="digiblocks/social-icons"]{padding:10px}.digiblocks-social-icon-fields .fa-selector-button-group{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.digiblocks-social-icon-fields .fa-selector-button{align-items:center;background:#f7f7f7;border:1px solid #ddd;border-radius:4px;cursor:pointer;display:flex;height:36px;justify-content:center;padding:0;width:36px}.digiblocks-social-icon-fields .fa-selector-button:hover{background:#f0f0f0;border-color:#007cba}.digiblocks-social-icon-fields .fa-selector-button.selected{background:#f0f7fc;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-social-icon-fields .fa-selector-button svg{height:18px;width:18px}.digiblocks-social-icon-actions .components-button.is-small{height:24px;min-width:24px;padding:0}.digiblocks-social-icon-item:focus-within{box-shadow:0 0 0 1.5px #007cba}.digiblocks-social-icon-content{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-content{border-top:none;max-height:0;padding-bottom:0;padding-top:0}.is-root-container *{box-sizing:border-box}.components-panel__body .digiblocks-control-tabs.first{margin-top:-16px}.width-full{justify-content:center;width:100%}.digiblocks-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;margin-bottom:15px}.digiblocks-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;flex:1;font-weight:500;justify-content:center;margin-bottom:-1px}.digiblocks-tabs .components-tab-panel__tabs-item.is-active{border-bottom-color:#1e73be}body .components-button.is-secondary{justify-content:center}.block-editor-block-icon.has-colors svg.digiblocks-editor-icons{fill:#526bfe}body .components-input-control__backdrop{border-color:#d5d5d5!important}body .block-editor-panel-color-gradient-settings{border:0;margin-bottom:24px;padding:0}body .block-editor-tools-panel-color-gradient-settings__item:nth-child(1 of .block-editor-tools-panel-color-gradient-settings__item){margin-top:15px}.digiblocks-control__header .components-base-control{align-items:center;display:flex}.digiblocks-control__header .components-toggle-group-control{border:0;gap:.25rem;min-height:auto;padding:0}.digiblocks-control__header .components-toggle-group-control>div{min-width:auto}.digiblocks-control__header .components-toggle-group-control:before{display:none}.digiblocks-control__header .components-toggle-group-control-option-base{background:none;padding:0}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=true]{color:#007cba}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]{color:#757575}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]:hover{color:#333}.components-range-control__root .components-range-control__reset.components-button.is-small{align-items:center;background:none;box-shadow:none!important;box-sizing:initial;color:#1e1e1e;display:inline-flex;font-size:0;height:10px;justify-content:center;line-height:0;outline:none;padding:2px;width:10px}.components-range-control__root .components-range-control__reset.components-button.is-small[aria-disabled=true]{color:#949494}.components-range-control__root .components-range-control__reset.components-button.is-small:before{content:"\f531";font-family:dashicons;font-size:10px;line-height:1}.digiblocks-tab-panel .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:0;margin-top:8px}.digiblocks-tab-panel .block-editor-link-control{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__field{margin:0 0 16px}.digiblocks-tab-panel .block-editor-link-control__search-item .components-menu-item__item{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__search-item.is-current{padding:0}@media (min-width:600px){.digiblocks-tab-panel .block-editor-url-input{min-width:auto}}.digiblocks-link-modal .block-editor-link-control__field{margin:0 0 16px}.digiblocks-link-modal .block-editor-link-control__search-item{max-width:350px}.digiblocks-link-modal .block-editor-link-control__search-item.is-current{padding:0}.digiblocks-link-modal .block-editor-link-control__search-actions{padding:8px 0 0}.digiblocks-link-modal .block-editor-link-control__search-results-wrapper{max-width:350px}.digiblocks-control-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;gap:.5rem}.digiblocks-control-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;color:#757575;cursor:pointer;flex:1;font-size:13px;height:32px!important;justify-content:center;padding:0 16px 8px;transition:all .2s ease}.digiblocks-control-tabs .components-tab-panel__tabs-item:hover{color:#007cba}.digiblocks-control-tabs .components-tab-panel__tabs-item.active-tab{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-control-tabs .components-tab-panel__tab-content,.digiblocks-control-tabs .components-tab-panel__tabs .components-tab-panel__tab-content{margin-top:1rem}.components-datetime__time-field,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{margin:0!important}
     1.digiblocks-tab-panel{margin-top:10px}.digiblocks-tabs-wrapper{display:flex}.digiblocks-tab-button{align-items:center;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;display:flex;flex:1;flex-direction:column;gap:.5rem;justify-content:center;padding:10px 15px;transition:all .2s ease}.digiblocks-tab-button:hover{background-color:#f5f5f5}.digiblocks-tab-button.is-active{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-tab-button.is-active svg path{fill:#007cba}.digiblocks-tab-icon{height:1.2rem;width:1.2rem}.digiblocks-tab-icon svg{height:100%;width:100%}.digiblocks-tab-title{font-size:11px;font-weight:500;text-transform:uppercase}.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:16px}.digiblocks-tab-panel.four .digiblocks-tabs-wrapper{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.digiblocks-font-awesome-control{margin-bottom:24px;position:relative}.digiblocks-font-awesome-control .digiblocks-control-label{box-sizing:border-box;display:block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:.5rem;text-transform:uppercase}.digiblocks-ip-placeholder-wrap{align-items:center;background:#f0f0f1;border:1px solid #dcdcde;border-radius:4px;cursor:pointer;display:flex;padding:12px;position:relative;transition:all .2s ease}.digiblocks-ip-placeholder-wrap:hover{background:#f6f7f7;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-selected-icon{align-items:center;background:#fff;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);height:45px;justify-content:center;margin-right:10px;overflow:hidden;position:relative;width:45px}.digiblocks-ip-selected-icon,.digiblocks-ip-selected-icon-value,.digiblocks-ip-selected-icon-value span{display:flex}.digiblocks-ip-selected-icon svg{color:#3c434a;height:24px;width:24px}.digiblocks-ip-remove-icon{align-items:center;background:#cc1818;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;opacity:0;position:absolute;right:-8px;top:-8px;transform:scale(.8);transition:all .2s ease;width:20px;z-index:10}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-remove-icon{opacity:1;transform:scale(1)}.digiblocks-ip-remove-icon svg{height:12px;width:12px;fill:#fff}.digiblocks-ip-actions{color:#3c434a;flex:1;font-size:13px}.digiblocks-ip-actions span{display:inline-block;transition:color .2s ease}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-actions span{color:#007cba}.digiblocks-ip-modal-wrapper-overlay{animation:modal-appear .2s ease-out;background:rgba(0,0,0,.7)!important;z-index:160000!important}@keyframes modal-appear{0%{opacity:0}to{opacity:1}}.digiblocks-ip-modal-wrapper{animation:modal-slide-up .25s ease-out;border-radius:6px!important;box-shadow:0 5px 15px rgba(0,0,0,.3)!important;height:600px!important;max-height:80vh!important;max-width:900px!important;overflow:hidden!important;padding:0!important;width:90%!important}.digiblocks-ip-modal-wrapper .components-modal__header{display:none}.digiblocks-ip-modal-wrapper .components-modal__content{margin:0;padding:0}.digiblocks-ip-modal-wrapper .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header{border:0}@keyframes modal-slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.digiblocks-ip-header{align-items:center;background:#fff;border-bottom:1px solid #dcdcde;display:flex;gap:2rem;justify-content:space-between;padding:16px 24px}.digiblocks-ip-header h2{color:#1e1e1e;font-size:18px;font-weight:600;margin:0}.digiblocks-ip-search-container{flex:1}.digiblocks-ip-search-container .components-base-control{width:100%}.digiblocks-ip-search-bar{align-items:center;display:flex;position:relative}.digiblocks-ip-search-bar svg{height:16px;left:10px;position:absolute;width:16px;fill:#757575}.digiblocks-ip-search-bar input.components-text-control__input{border:1px solid #dcdcde;border-radius:4px;height:36px;padding-left:32px!important;width:100%}.digiblocks-ip-search-bar input.components-text-control__input:focus{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-search-bar span{color:#757575;cursor:pointer;font-size:18px;font-weight:700;position:absolute;right:10px;transition:color .2s ease}.digiblocks-ip-search-bar span:hover{color:#cc1818}.digiblocks-ip-lr-container{display:flex;height:calc(100% - 130px);overflow:hidden}.digiblocks-ip-left{background:#f6f7f7;border-right:1px solid #dcdcde;display:flex;flex-direction:column;overflow:hidden;width:220px}.digiblocks-ip-categories-list{flex:1;overflow-y:auto;padding:12px 0}.digiblocks-ip-categories-list div{border-left:3px solid transparent;color:#3c434a;cursor:pointer;font-size:13px;padding:8px 16px;transition:all .2s ease}.digiblocks-ip-categories-list div:hover{background:rgba(0,0,0,.04);color:#007cba}.digiblocks-ip-categories-list div.selected{background:#f0f6fc;border-left-color:#007cba;color:#007cba;font-weight:500}.digiblocks-ip-style-selector{background:#f0f0f1;border-top:1px solid #dcdcde;padding:16px}.digiblocks-ip-style-selector .components-base-control__label{font-weight:500;margin-bottom:8px}.digiblocks-ip-style-selector .components-select-control__input{height:36px}.digiblocks-ip-right{display:flex;flex:1;flex-direction:column;overflow:hidden}.digiblocks-ip-modal-container{background:#fff;flex:1;overflow-y:auto;padding:16px}.digiblocks-ip-loading{align-items:center;color:#3c434a;display:flex;flex-direction:column;height:100%;justify-content:center}.digiblocks-ip-loading .components-spinner{margin:0 0 12px}.digiblocks-ip-icons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));padding-bottom:16px}.digiblocks-ip-icons.icon-not-found{align-items:center;color:#757575;display:flex;font-size:14px;height:100%;justify-content:center}.digiblocks-icon-item{align-items:center;border:1px solid transparent;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;height:90px;justify-content:center;padding:8px;text-align:center;transition:all .2s ease}.digiblocks-icon-item:hover{background:#f6f7f7;border-color:#dcdcde;box-shadow:0 2px 5px rgba(0,0,0,.08);transform:translateY(-2px)}.digiblocks-icon-item.selected{background:#f0f6fc;border-color:#007cba}.digiblocks-icon-item svg{color:#3c434a;height:28px;margin-bottom:8px;width:28px}.digiblocks-icon-item span:nth-child(2){color:#757575;display:-webkit-box;font-size:11px;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;max-width:100%;overflow:hidden}.digiblocks-ip-load-more{display:block!important;grid-column:1/-1;margin:16px auto 0!important}.digiblocks-ip-footer{background:#f6f7f7;border-top:1px solid #dcdcde;display:flex;justify-content:flex-end;padding:16px 24px}.digiblocks-ip-footer button{justify-content:center;min-width:80px}@media (max-width:782px){.digiblocks-ip-modal-wrapper{height:90vh!important;max-height:none!important;width:95%!important}.digiblocks-ip-header{align-items:flex-start;flex-direction:column}.digiblocks-ip-search-container{margin:16px 0 0;max-width:none;width:100%}.digiblocks-ip-lr-container{flex-direction:column;height:calc(100% - 180px)}.digiblocks-ip-left{border-bottom:1px solid #dcdcde;border-right:none;height:auto;width:100%}.digiblocks-ip-categories-list{display:flex;overflow-x:auto;padding:8px}.digiblocks-ip-categories-list div{border-bottom:3px solid transparent;border-left:none;padding:8px 12px;white-space:nowrap}.digiblocks-ip-categories-list div.selected{border-bottom-color:#007cba;border-left-color:transparent}.digiblocks-ip-icons{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}.digiblocks-icon-item{height:80px}}.digiblocks-ip-modal-wrapper{animation:fadeIn .2s ease-out}.digiblocks-icon-item{animation:fadeIn .3s ease-out}.digiblocks-icon-box{position:relative;transition:all .3s ease}.digiblocks-icon-box[data-hover-effect=lift]:hover{transform:translateY(-10px)}.digiblocks-icon-box[data-hover-effect=scale]:hover{transform:scale(1.05)}.digiblocks-icon-box[data-hover-effect=glow]:hover{box-shadow:0 0 20px rgba(0,120,215,.2)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-20px)}60%{transform:translateY(-10px)}}.digiblocks-icon-box[data-animation=fade-in]{animation:fadeIn 1s ease}.digiblocks-icon-box[data-animation=slide-up]{animation:slideInUp 1s ease}.digiblocks-icon-box[data-animation=slide-left]{animation:slideInLeft 1s ease}.digiblocks-icon-box[data-animation=slide-right]{animation:slideInRight 1s ease}.digiblocks-icon-box[data-animation=zoom-in]{animation:zoomIn 1s ease}.digiblocks-icon-box[data-animation=bounce]{animation:bounce 1s ease}body .editor-styles-wrapper{transition:all .3s ease-in-out}.digiblocks-responsive-control{margin-bottom:24px}.digiblocks-responsive-control-content{padding:0}.digiblocks-responsive-label-wrap{gap:.5rem}.digiblocks-responsive-common-button{border:0;box-shadow:none!important;color:#50575e;cursor:pointer;display:flex;height:auto;line-height:0;margin:0;outline:0;padding:4px}.digiblocks-responsive-common-button:active,.digiblocks-responsive-common-button:focus,.digiblocks-responsive-common-button:hover{box-shadow:none;color:#007cba;outline:none}.digiblocks-responsive-common-button svg{height:.6rem;width:.6rem;fill:currentColor}.digiblocks-control-label{color:#50575e;font-size:13px;font-weight:400;line-height:1.4em;margin-bottom:0}.digiblocks-typography-options{margin-bottom:24px}.digiblocks-typography-options .digiblocks-select-control .components-select-control,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control{align-items:center;display:grid;gap:0;grid-template-columns:50% 50%}.digiblocks-typography-options .digiblocks-select-control .components-select-control label,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control label{margin-bottom:0}.digiblocks-control-popup__options--action-wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}body .components-button.digiblocks-typography-button{background:transparent!important;border:1px solid #e6e7e9;border-radius:14px;color:#50575e;cursor:pointer;height:28px;margin:0;padding:5px;width:28px}body .components-button.digiblocks-typography-button .dashicons-edit{font-size:15px;line-height:20px;outline:none}body .components-button.digiblocks-typography-button:hover{color:#007cba}body .components-button.digiblocks-typography-button.is-pressed{background-color:#fff;color:#007cba}.digiblocks-typography-advanced{background:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.2);margin-bottom:16px;padding:16px;position:relative;top:5px;width:100%}.digiblocks-font-family-searchable-select__wrapper{margin-bottom:15px}.digiblocks-font-family-searchable-select__wrapper .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:10px;text-transform:none!important}.digiblocks-size-type-field-tabs{margin-bottom:15px}.digiblocks-size-type-field-tabs:last-child{margin-bottom:0}.digiblocks-responsive-label-wrap{align-items:center;display:flex}.digiblocks-control__header .digiblocks-control__actions{gap:.25rem}.digiblocks-range-control__mobile-controls{align-items:center;display:flex}.digiblocks-range-control__mobile-controls>.components-base-control{width:100%}.digiblocks-select-control{margin-bottom:15px}.digiblocks-select-control--layout-inline .components-base-control__field{display:flex;flex-direction:column}.digiblocks-select-control--layout-inline .components-base-control__label,.digiblocks-select-control--layout-inline .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:8px;text-transform:none!important}.digiblocks-select-control--layout-inline .components-select-control__input{color:#50575e;line-height:30px;text-transform:capitalize}.digiblocks-typography-decoration{margin-bottom:15px}.components-popover.components-dropdown-menu__popover{z-index:1000}body .components-base-control__field{margin:0}.digiblocks-responsive-control-content{display:flex;flex-direction:column}.digiblocks-control__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:10px;width:100%}.digiblocks-control__actions{direction:ltr;display:flex;position:relative;top:0}.digiblocks-reset.components-button.is-small.has-icon:not(.has-text){min-width:auto;padding:0;width:auto}body .components-button.is-secondary.digiblocks-reset.is-small{background:transparent;box-shadow:unset;color:#ccc;padding:0 4px}body .components-button.is-secondary.digiblocks-reset.is-small:not(:disabled){color:#007cba}.digiblocks-reset .dashicons-image-rotate{font-size:10px;height:10px;width:10px}.digiblocks-reset.is-small.is-pressed,.digiblocks-reset.is-small:focus:not(:disabled){border:0}.digiblocks-control__units{align-items:center;direction:ltr;display:flex;gap:.25rem}.digiblocks-control__units .components-button{cursor:pointer;font-size:10px;justify-content:center;padding:0;text-align:center;text-shadow:none;text-transform:uppercase;width:100%}.digiblocks-control__units .components-button.is-pressed,.digiblocks-control__units .components-button:focus:not(:disabled){border:0}.digiblocks-control__units .components-button.is-primary.is-small,.digiblocks-control__units .components-button.is-secondary.is-small{box-shadow:unset}.digiblocks-control__units .components-button.is-primary{background:unset;background-color:unset;box-shadow:unset;color:#007cba}.digiblocks-control__units .components-button.is-secondary,.digiblocks-control__units .components-button.is-tertiary{background:unset;background-color:unset;color:#50575e}.digiblocks-control__units .components-button.is-secondary:hover:not(:disabled),.digiblocks-control__units .components-button.is-tertiary:hover:not(:disabled){color:#007cba}.digiblocks-control__units .components-button:last-child{padding:0}.digiblocks-spacing-inputs{display:flex}.digiblocks-spacing-input[type=number]{border-bottom-color:#e6e7e9;border-left:1px solid #e6e7e9;border-radius:0;border-right:1px solid #e6e7e9;border-top-color:#e6e7e9;box-shadow:none!important;color:#50575e;flex:1;font-size:14px;height:30px;line-height:20px;margin:0 -1px 0 0;max-width:50px;padding-left:4px;padding-right:1px;text-align:center}.digiblocks-spacing-input::-webkit-inner-spin-button,.digiblocks-spacing-input::-webkit-outer-spin-button{margin:0}.digiblocks-spacing-input:focus{outline:1px solid #ccc;outline-offset:-1px;z-index:1}.digiblocks-spacing-input::-moz-placeholder{color:#aaa}.digiblocks-spacing-input::placeholder{color:#aaa}.digiblocks-spacing-inputs>.digiblocks-spacing-input:first-child{border-radius:3px 0 0 3px}.digiblocks-spacing-link{align-items:center;background-color:#959595;border:1px solid #959595;border-radius:0 3px 3px 0;color:#fff;cursor:pointer;display:flex;flex:1;font-size:12px;height:auto;justify-content:center;transition:none}.digiblocks-spacing-link.digiblocks-spacing-control-disconnected{background-color:#fff;border-color:#e6e7e9;color:#959595}.digiblocks-spacing-labels{display:flex;margin-top:5px}.digiblocks-spacing-label{color:#ccc;display:block;flex:1;font-size:10px;text-align:center}.digiblocks-spacing-label.digiblocks-spacing-link-label{flex:1}.digiblocks-dimension-control{margin-bottom:25px}.digiblocks-dimension-control.is-responsive{margin-bottom:0}.digiblocks-gradient-control{margin-bottom:16px;width:100%}.digiblocks-gradient-preview{border:1px solid #ddd;border-radius:4px;margin:12px 0;overflow:hidden;position:relative}.digiblocks-gradient-preview-inner{height:60px;position:relative;width:100%}.digiblocks-gradient-colors{margin-top:16px}.digiblocks-gradient-colors-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.digiblocks-gradient-colors-header strong{color:#1e1e1e;font-weight:600}.digiblocks-gradient-color-stops{display:flex;flex-direction:column;gap:12px}.digiblocks-gradient-color-stop{align-items:center;background:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;display:grid;gap:12px;grid-template-columns:40px 1fr 36px;padding:12px;transition:all .2s ease}.digiblocks-gradient-color-stop:hover{background:#f1f3f4;border-color:#d0d7de}.digiblocks-color-indicator-button{align-items:center;background:transparent;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.1),inset 0 0 0 1px hsla(0,0%,100%,.1);cursor:pointer;display:flex;height:32px;justify-content:center;min-width:32px;overflow:hidden;padding:0;position:relative;width:32px}.digiblocks-color-indicator-button .component-color-indicator{box-shadow:none}.digiblocks-color-indicator-button:hover{box-shadow:0 0 0 1px rgba(0,0,0,.2),inset 0 0 0 1px hsla(0,0%,100%,.1);transform:scale(1.05)}.digiblocks-color-indicator-button:focus{box-shadow:0 0 0 2px #007cba;outline:none}.digiblocks-color-indicator-button .components-color-indicator{display:none}.digiblocks-color-dropdown{position:relative}.digiblocks-color-dropdown-content{margin-top:8px;z-index:999999!important}.digiblocks-gradient-color-stop-position{position:relative}.digiblocks-gradient-color-stop-position .components-base-control__field,.digiblocks-gradient-color-stop-position .components-range-control,.digiblocks-gradient-color-stop-position .components-range-control__wrapper{margin-bottom:0!important}.digiblocks-gradient-color-stop-position .components-input-control__container{min-height:36px}.digiblocks-gradient-color-stop-remove{align-items:center;display:flex;justify-content:center}.digiblocks-gradient-color-stop-remove .components-button{align-items:center;border-radius:4px;display:flex;height:32px;justify-content:center;min-width:32px;padding:0}.digiblocks-gradient-color-stop-remove .components-button:disabled{cursor:not-allowed;opacity:.3}.digiblocks-gradient-colors-header .components-button{border-radius:4px;font-size:12px;height:32px;padding:0 12px}.digiblocks-gradient-control .components-range-control,.digiblocks-gradient-control .components-select-control,.digiblocks-gradient-control .components-toggle-group-control{margin-bottom:16px}@media (max-width:600px){.digiblocks-gradient-color-stop{gap:8px;grid-template-columns:36px 1fr 32px;padding:10px}.digiblocks-color-indicator-button{height:28px;min-width:28px;width:28px}.digiblocks-gradient-color-stop-remove .components-button{height:28px;min-width:28px}}.digiblocks-custom-range-control{align-items:center;display:flex;min-height:40px;width:100%}.range-slider-wrapper{align-items:center;display:flex;flex:1;height:30px;position:relative}.range-slider{cursor:pointer;height:100%;margin:0 -6px;opacity:0;position:absolute;width:calc(100% + 12px);z-index:2}.range-track{background-color:#ddd;width:100%}.range-track,.range-track-fill{border-radius:9999px;height:4px;position:absolute}.range-thumb,.range-track-fill{background-color:var(--wp-admin-theme-color,#3858e9);pointer-events:none}.range-thumb{border-radius:50%;box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);height:12px;margin-left:-6px;position:absolute;width:12px}.input-wrapper{margin-left:16px;width:80px}.number-input[type=number]{background-color:#fff;border:1px solid #d5d5d5;border-radius:2px;box-shadow:none!important;color:#1e1e1e;font-size:13px;height:40px;line-height:1;min-height:40px;padding:0 12px;width:100%}.number-input[type=number]:focus{border-color:var(--wp-admin-theme-color,#3858e9);outline:none}.block-editor-block-list__block[data-type="digiblocks/container"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/container"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/container"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-container-inner{position:relative;width:100%}.block-editor-block-list__block[data-type="digiblocks/column"]{border:1px dashed #ddd;min-height:50px;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/column"].is-selected:before{border:1px dashed #1e1e1e;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-layout-selector{background-color:#f8f9fa;border-radius:4px;grid-column:span 12;padding:20px;text-align:center}.digiblocks-layout-selector h2{color:#666;font-size:18px;font-weight:500;margin-bottom:20px;margin-top:0;text-align:center;text-transform:uppercase}.digiblocks-layout-grid{display:flex;flex-wrap:wrap;justify-content:center;margin:auto;max-width:650px;padding:0}.digiblocks-layout-option{box-sizing:border-box;cursor:pointer;list-style:none;padding:5px 10px;position:relative;transition:transform .2s ease;width:20%}.digiblocks-layout-option:hover{transform:scale(1.05)}.digiblocks-layout-icon{align-items:center;display:flex;justify-content:center;margin-bottom:8px;width:100%}.digiblocks-layout-icon svg{width:100%;fill:#d4dce6;transition:all .3s ease}.digiblocks-layout-option:hover .digiblocks-layout-icon svg{fill:#007cba}.digiblocks-layout-label{color:#555;font-size:12px}.digiblocks-layout-option .screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.digiblocks-change-layout-button{margin-bottom:10px!important;width:100%}.digiblocks-media-control{margin-bottom:24px}.digiblocks-media-upload-wrapper{margin-top:8px}.digiblocks-media-preview{background-color:#f0f0f0;border-radius:4px;overflow:hidden;position:relative}.digiblocks-media-preview img{display:block;height:auto;max-height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.digiblocks-media-preview video{background-color:#000;display:block;height:auto;max-height:200px;-o-object-fit:contain;object-fit:contain;width:100%}.digiblocks-media-controls{display:flex;gap:8px;position:absolute;right:5px;top:5px}.digiblocks-media-controls.digiblocks-media-controls .components-button{border-radius:50%;height:28px;justify-content:center;margin:0;outline:none;padding:0;width:28px}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link),.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):active:not(:disabled,[aria-disabled=true]){background-color:#dc3545;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):hover:not(:disabled,[aria-disabled=true]){background-color:#a32531;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):focus,.digiblocks-media-controls .components-button.is-primary:focus:not(:disabled){box-shadow:none}.digiblocks-media-upload-button{justify-content:center;width:100%}.digiblocks-responsive-indicator{align-items:center;color:#757575;display:flex;font-size:12px;margin-bottom:8px}.digiblocks-responsive-indicator-icon{margin-right:5px}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-desktop{display:block}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-mobile,.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-tablet{display:none}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-tablet{display:block}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-mobile{display:none}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-mobile{display:block}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-tablet{display:none}.block-editor-block-list__block[data-type="digiblocks/row"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/row"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/row"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.block-editor-block-list__block[data-type="digiblocks/row"] .is-nested{width:auto}.digiblocks-row .block-list-appender{width:100%}.digiblocks-row-inner{position:relative;width:100%}.digiblocks-social-icons-list{margin-bottom:20px}.digiblocks-social-icon-item{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;margin-bottom:16px;overflow:hidden;transition:box-shadow .2s ease}.digiblocks-social-icon-item.dragging{border:1px solid #007cba;box-shadow:0 4px 12px rgba(0,0,0,.15);opacity:.9;position:relative;z-index:100}.digiblocks-social-icon-item.drag-over{background-color:rgba(0,124,186,.05);border:1px dashed #007cba}.digiblocks-social-icon-header{align-items:center;background-color:#f9f9f9;border-bottom:1px solid #e0e0e0;cursor:pointer;display:flex;justify-content:space-between;padding:10px 12px}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-header{border-bottom:none}.digiblocks-social-icon-title{cursor:pointer;flex-grow:1;font-size:14px;font-weight:600;margin-left:8px}.digiblocks-social-icon-drag-handle{align-items:center;color:#757575;cursor:grab;display:flex;justify-content:center}.digiblocks-social-icon-drag-handle:hover{color:#007cba}.digiblocks-social-icon-drag-handle .dashicons{font-size:18px;height:18px;width:18px}.digiblocks-social-icon-actions{display:flex;gap:5px}.digiblocks-social-icon-content{display:flex;flex-direction:column;padding:16px}.digiblocks-add-social-icon{justify-content:center;margin-top:12px!important;width:100%}.digiblocks-social-icon-fields .social-media-icon-picker{margin-bottom:16px}.block-editor-block-list__block .digiblocks-social-icon{display:inline-flex!important}[data-type="digiblocks/social-icons"]{padding:10px}.digiblocks-social-icon-fields .fa-selector-button-group{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.digiblocks-social-icon-fields .fa-selector-button{align-items:center;background:#f7f7f7;border:1px solid #ddd;border-radius:4px;cursor:pointer;display:flex;height:36px;justify-content:center;padding:0;width:36px}.digiblocks-social-icon-fields .fa-selector-button:hover{background:#f0f0f0;border-color:#007cba}.digiblocks-social-icon-fields .fa-selector-button.selected{background:#f0f7fc;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-social-icon-fields .fa-selector-button svg{height:18px;width:18px}.digiblocks-social-icon-actions .components-button.is-small{height:24px;min-width:24px;padding:0}.digiblocks-social-icon-item:focus-within{box-shadow:0 0 0 1.5px #007cba}.digiblocks-social-icon-content{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-content{border-top:none;max-height:0;padding-bottom:0;padding-top:0}.is-root-container *{box-sizing:border-box}.components-panel__body .digiblocks-control-tabs.first{margin-top:-16px}.width-full{justify-content:center;width:100%}.digiblocks-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;margin-bottom:15px}.digiblocks-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;flex:1;font-weight:500;justify-content:center;margin-bottom:-1px}.digiblocks-tabs .components-tab-panel__tabs-item.is-active{border-bottom-color:#1e73be}body .components-button.is-secondary{justify-content:center}.block-editor-block-icon.has-colors svg.digiblocks-editor-icons{fill:#526bfe}body .components-input-control__backdrop{border-color:#d5d5d5!important}body .block-editor-panel-color-gradient-settings{border:0;margin-bottom:24px;padding:0}body .block-editor-tools-panel-color-gradient-settings__item:nth-child(1 of .block-editor-tools-panel-color-gradient-settings__item){margin-top:15px}.digiblocks-control__header .components-base-control{align-items:center;display:flex}.digiblocks-control__header .components-toggle-group-control{border:0;gap:.25rem;min-height:auto;padding:0}.digiblocks-control__header .components-toggle-group-control>div{min-width:auto}.digiblocks-control__header .components-toggle-group-control:before{display:none}.digiblocks-control__header .components-toggle-group-control-option-base{background:none;padding:0}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=true]{color:#007cba}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]{color:#757575}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]:hover{color:#333}.components-range-control__root .components-range-control__reset.components-button.is-small{align-items:center;background:none;box-shadow:none!important;box-sizing:initial;color:#1e1e1e;display:inline-flex;font-size:0;height:10px;justify-content:center;line-height:0;outline:none;padding:2px;width:10px}.components-range-control__root .components-range-control__reset.components-button.is-small[aria-disabled=true]{color:#949494}.components-range-control__root .components-range-control__reset.components-button.is-small:before{content:"\f531";font-family:dashicons;font-size:10px;line-height:1}.digiblocks-tab-panel .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:0;margin-top:8px}.digiblocks-tab-panel .block-editor-link-control{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__field{margin:0 0 16px}.digiblocks-tab-panel .block-editor-link-control__search-item .components-menu-item__item{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__search-item.is-current{padding:0}@media (min-width:600px){.digiblocks-tab-panel .block-editor-url-input{min-width:auto}}.digiblocks-link-modal .block-editor-link-control__field{margin:0 0 16px}.digiblocks-link-modal .block-editor-link-control__search-item{max-width:350px}.digiblocks-link-modal .block-editor-link-control__search-item.is-current{padding:0}.digiblocks-link-modal .block-editor-link-control__search-actions{padding:8px 0 0}.digiblocks-link-modal .block-editor-link-control__search-results-wrapper{max-width:350px}.digiblocks-control-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;gap:.5rem}.digiblocks-control-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;color:#757575;cursor:pointer;flex:1;font-size:13px;height:32px!important;justify-content:center;padding:0 16px 8px;transition:all .2s ease}.digiblocks-control-tabs .components-tab-panel__tabs-item:hover{color:#007cba}.digiblocks-control-tabs .components-tab-panel__tabs-item.active-tab{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-control-tabs .components-tab-panel__tab-content,.digiblocks-control-tabs .components-tab-panel__tabs .components-tab-panel__tab-content{margin-top:1rem}.components-datetime__time-field,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{margin:0!important}
  • digiblocks/trunk/blocks/accordion/edit.js

    r3317829 r3346454  
    421421            .${id} .digiblocks-accordion-title {
    422422                margin: 0;
    423                 color: ${titleColor || '#333333'};
     423                color: ${titleColor};
    424424                flex: 1;
    425425                ${titleTypographyCSS}
     
    446446            /* SVG icon fill color */
    447447            .${id} .digiblocks-accordion-icon svg {
    448                 fill: ${iconColor || '#333333'};
     448                fill: ${iconColor};
    449449                width: ${iconSize[activeDevice]}px;
    450450                height: ${iconSize[activeDevice]}px;
  • digiblocks/trunk/blocks/accordion/index.js

    r3317829 r3346454  
    77import AccordionEdit from './edit';
    88import AccordionSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('accordion') ? true : false,
    3332        html: false,
    3433        className: false,
     
    7675        titleColor: {
    7776            type: 'string',
    78             default: '#333333'
     77            default: ''
    7978        },
    8079        titleHoverColor: {
     
    212211        iconColor: {
    213212            type: 'string',
    214             default: '#333333'
     213            default: ''
    215214        },
    216215        iconHoverColor: {
  • digiblocks/trunk/blocks/accordion/styles.php

    r3317829 r3346454  
    1919];
    2020$items                  = isset( $attrs['items'] ) ? $attrs['items'] : array();
    21 $titleColor             = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     21$titleColor             = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    2222$titleHoverColor        = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : '';
    2323$titleActiveColor       = isset( $attrs['titleActiveColor'] ) ? $attrs['titleActiveColor'] : '#1e73be';
     
    3030$borderHoverColor       = isset( $attrs['borderHoverColor'] ) ? $attrs['borderHoverColor'] : '';
    3131$iconPosition           = isset( $attrs['iconPosition'] ) ? $attrs['iconPosition'] : 'right';
    32 $iconColor              = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#333333';
     32$iconColor              = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '';
    3333$iconHoverColor         = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : '';
    3434$iconActiveColor        = isset( $attrs['iconActiveColor'] ) ? $attrs['iconActiveColor'] : '#1e73be';
     
    287287.<?php echo esc_attr( $id ); ?> .digiblocks-accordion-title {
    288288    margin: 0;
    289     color: <?php echo esc_attr( $titleColor ); ?>;
     289    <?php if ( ! empty( $titleColor ) ) : ?>
     290        color: <?php echo esc_attr( $titleColor ); ?>;
     291    <?php endif; ?>
    290292    flex: 1;
    291293<?php if ( ! empty( $titleTypography['fontFamily'] ) ) : ?>
     
    371373    overflow: hidden;
    372374    <?php echo esc_attr( digiblocks_get_dimensions( $padding, 'padding', 'desktop' ) ); ?>
     375<?php if ( ! empty( $contentColor ) ) : ?>
    373376    color: <?php echo esc_attr( $contentColor ); ?>;
     377<?php endif; ?>
    374378<?php if ( ! empty( $contentTypography['fontFamily'] ) ) : ?>
    375379    font-family: <?php echo esc_attr( $contentTypography['fontFamily'] ); ?>;
  • digiblocks/trunk/blocks/button/edit.js

    r3317829 r3346454  
    207207            borderCSS = `
    208208                border-style: ${borderStyle};
    209                 border-color: ${borderColor || '#333333'};
     209                border-color: ${borderColor};
    210210                ${borderWidthStyle}
    211211            `;
     
    620620                                }
    621621                                defaults={{
    622                                     fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     622                                    fontSize: { desktop: '', tablet: '', mobile: '' },
    623623                                    fontSizeUnit: 'px',
    624                                     lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     624                                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    625625                                    lineHeightUnit: 'em',
    626626                                }}
  • digiblocks/trunk/blocks/button/index.js

    r3317829 r3346454  
    9696            default: {
    9797                fontFamily: '',
    98                 fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     98                fontSize: { desktop: '', tablet: '', mobile: '' },
    9999                fontSizeUnit: 'px',
    100100                fontWeight: '',
     
    102102                textTransform: '',
    103103                textDecoration: '',
    104                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     104                lineHeight: { desktop: '', tablet: '', mobile: '' },
    105105                lineHeightUnit: 'em',
    106                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     106                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    107107                letterSpacingUnit: 'px'
    108108            }
     
    180180            default: {
    181181                desktop: { top: 12, right: 24, bottom: 12, left: 24, unit: 'px' },
    182                 tablet: { top: 10, right: 20, bottom: 10, left: 20, unit: 'px' },
    183                 mobile: { top: 8, right: 16, bottom: 8, left: 16, unit: 'px' }
     182                tablet: { top: '', right: '', bottom: '', left: '', unit: 'px' },
     183                mobile: { top: '', right: '', bottom: '', left: '', unit: 'px' }
    184184            }
    185185        },
  • digiblocks/trunk/blocks/button/styles.php

    r3317829 r3346454  
    3333$padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array(
    3434    'desktop' => array( 'top' => 12, 'right' => 24, 'bottom' => 12, 'left' => 24, 'unit' => 'px' ),
    35     'tablet'  => array( 'top' => 10, 'right' => 20, 'bottom' => 10, 'left' => 20, 'unit' => 'px' ),
    36     'mobile'  => array( 'top' => 8, 'right' => 16, 'bottom' => 8, 'left' => 16, 'unit' => 'px' ),
     35    'tablet'  => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', 'unit' => 'px' ),
     36    'mobile'  => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', 'unit' => 'px' ),
    3737);
    3838
     
    6969$buttonTypography = isset( $attrs['buttonTypography'] ) ? $attrs['buttonTypography'] : array(
    7070    'fontFamily'        => '',
    71     'fontSize'          => array( 'desktop' => 16, 'tablet' => 15, 'mobile' => 14 ),
     71    'fontSize'          => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ),
    7272    'fontSizeUnit'      => 'px',
    7373    'fontWeight'        => '',
     
    7575    'textTransform'     => '',
    7676    'textDecoration'    => '',
    77     'lineHeight'        => array( 'desktop' => 1.5, 'tablet' => 1.4, 'mobile' => 1.3 ),
     77    'lineHeight'        => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ),
    7878    'lineHeightUnit'    => 'em',
    79     'letterSpacing'     => array( 'desktop' => 0, 'tablet' => 0, 'mobile' => 0 ),
     79    'letterSpacing'     => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ),
    8080    'letterSpacingUnit' => 'px',
    8181);
  • digiblocks/trunk/blocks/buttons/index.js

    r3317829 r3346454  
    77import ButtonsEdit from './edit';
    88import ButtonsSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('buttons', 'digiblocks'), __('button group', 'digiblocks'), __('link', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('buttons') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/call-to-action/edit.js

    r3317829 r3346454  
    10371037                   
    10381038                    .${id} .digiblocks-cta-title {
    1039                         color: ${titleColor || '#333'};
     1039                        color: ${titleColor};
    10401040                        margin-bottom: 15px;
    10411041                    }
     
    10691069                   
    10701070                    .${id} .digiblocks-cta-title {
    1071                         color: ${titleColor || '#333'};
     1071                        color: ${titleColor};
    10721072                        margin-bottom: 15px;
    10731073                    }
     
    12041204           
    12051205            .${id} .digiblocks-cta-title {
    1206                 color: ${titleColor || '#333333'};
     1206                color: ${titleColor};
    12071207                margin-top: 0;
    12081208                margin-bottom: 20px;
  • digiblocks/trunk/blocks/call-to-action/index.js

    r3317829 r3346454  
    77import CallToActionEdit from './edit';
    88import CallToActionSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('cta', 'digiblocks'), __('call to action', 'digiblocks'), __('button', 'digiblocks'), __('conversion', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('call-to-action') ? true : false,
    3231        html: false,
    3332        className: false,
     
    7877        titleColor: {
    7978            type: 'string',
    80             default: '#333333'
     79            default: ''
    8180        },
    8281        textColor: {
  • digiblocks/trunk/blocks/call-to-action/styles.php

    r3317829 r3346454  
    2929];
    3030$margin                  = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px');
    31 $titleColor              = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     31$titleColor              = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    3232$textColor               = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666';
    3333$buttonColor             = isset( $attrs['buttonColor'] ) ? $attrs['buttonColor'] : '#1e73be';
     
    295295
    296296.<?php echo esc_attr( $id ); ?> .digiblocks-cta-title {
    297     color: <?php echo esc_attr( $titleColor ); ?>;
     297    <?php if ( !empty( $titleColor ) ) : ?>
     298        color: <?php echo esc_attr( $titleColor ); ?>;
     299    <?php endif; ?>
    298300    margin-top: 0;
    299301    margin-bottom: 20px;
  • digiblocks/trunk/blocks/container/edit.js

    r3317829 r3346454  
    149149        horizontalAlign,
    150150        verticalAlign,
     151        columnVerticalAlign,
    151152        heightType,
    152153        minHeight,
     
    801802                    }` : ''}
    802803            }
    803            
     804
     805            ${Object.keys(verticalAlign).some(device => verticalAlign[device] === 'stretch') ? `
     806                /* Column vertical alignment when container uses stretch */
     807                @media (min-width: 992px) {
     808                    .${id} > .digiblocks-container-inner .digiblocks-column {
     809                        ${verticalAlign['desktop'] === 'stretch' ? `justify-content: ${columnVerticalAlign['desktop']};` : ''}
     810                    }
     811                }
     812               
     813                @media (max-width: 991px) {
     814                    .${id} > .digiblocks-container-inner .digiblocks-column {
     815                        ${verticalAlign['tablet'] === 'stretch' ? `justify-content: ${columnVerticalAlign['tablet'] || columnVerticalAlign['desktop']};` : ''}
     816                    }
     817                }
     818               
     819                @media (max-width: 767px) {
     820                    .${id} > .digiblocks-container-inner .digiblocks-column {
     821                        ${verticalAlign['mobile'] === 'stretch' ? `justify-content: ${columnVerticalAlign['mobile'] || columnVerticalAlign['tablet'] || columnVerticalAlign['desktop']};` : ''}
     822                    }
     823                }
     824            ` : ''}
     825                       
    804826            /* Animation keyframes */
    805827            ${animationCSS}
     
    10131035                                    { label: __("Top", "digiblocks"), value: "flex-start" },
    10141036                                    { label: __("Middle", "digiblocks"), value: "center" },
    1015                                     { label: __("Bottom", "digiblocks"), value: "flex-end" }
     1037                                    { label: __("Bottom", "digiblocks"), value: "flex-end" },
     1038                                    { label: __("Stretch", "digiblocks"), value: "stretch" }
    10161039                                ]}
    10171040                            />
     1041
     1042                            {verticalAlign[localActiveDevice] === 'stretch' && (
     1043                                <ResponsiveButtonGroup
     1044                                    label={__("Column Vertical Align", "digiblocks")}
     1045                                    value={columnVerticalAlign}
     1046                                    onChange={(value) => setAttributes({ columnVerticalAlign: value })}
     1047                                    options={[
     1048                                        { label: __("Top", "digiblocks"), value: "flex-start" },
     1049                                        { label: __("Middle", "digiblocks"), value: "center" },
     1050                                        { label: __("Bottom", "digiblocks"), value: "flex-end" }
     1051                                    ]}
     1052                                    help={__("Controls the vertical alignment of content within stretched columns.", "digiblocks")}
     1053                                />
     1054                            )}
    10181055                        </TabPanelBody>
    10191056                       
  • digiblocks/trunk/blocks/container/index.js

    r3317829 r3346454  
    77import ContainerEdit from './edit';
    88import ContainerSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
    109
    1110/**
     
    2928    keywords: [__('container', 'digiblocks'), __('section', 'digiblocks'), __('row', 'digiblocks'), __('layout', 'digiblocks'), __('columns', 'digiblocks')],
    3029    supports: {
    31         inserter: getBlockActiveStatus('container') ? true : false,
    3230        html: false,
    3331        className: false,
     
    116114            }
    117115        },
     116        columnVerticalAlign: {
     117            type: 'object',
     118            default: {
     119                desktop: 'flex-start',
     120                tablet: 'flex-start',
     121                mobile: 'flex-start'
     122            }
     123        },
    118124        minHeight: {
    119125            type: 'object',
  • digiblocks/trunk/blocks/container/styles.php

    r3317829 r3346454  
    5656    'mobile'  => 'center',
    5757];
     58$columnVerticalAlign = isset( $attrs['columnVerticalAlign'] ) ? $attrs['columnVerticalAlign'] : [
     59    'desktop' => 'flex-start',
     60    'tablet'  => 'flex-start',
     61    'mobile'  => 'flex-start',
     62];
     63
     64$hasStretchVerticalAlign =
     65    $verticalAlign['desktop'] === 'stretch' ||
     66    $verticalAlign['tablet'] === 'stretch' ||
     67    $verticalAlign['mobile'] === 'stretch';
    5868$minHeight                = isset( $attrs['minHeight'] ) ? $attrs['minHeight'] : [
    5969    'desktop' => 0,
     
    258268}
    259269
     270<?php if ( $hasStretchVerticalAlign ) : ?>
     271
     272    /* Column vertical alignment when container uses stretch */
     273    <?php if ( $verticalAlign['desktop'] === 'stretch' ) : ?>
     274    @media (min-width: 992px) {
     275        .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column {
     276            justify-content: <?php echo esc_attr( $columnVerticalAlign['desktop'] ); ?>;
     277        }
     278    }
     279    <?php endif; ?>
     280
     281    <?php if ( $verticalAlign['tablet'] === 'stretch' ) : ?>
     282    @media (max-width: 991px) {
     283        .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column {
     284            justify-content: <?php echo esc_attr( !empty($columnVerticalAlign['tablet']) ? $columnVerticalAlign['tablet'] : $columnVerticalAlign['desktop'] ); ?>;
     285        }
     286    }
     287    <?php endif; ?>
     288
     289    <?php if ( $verticalAlign['mobile'] === 'stretch' ) : ?>
     290    @media (max-width: 767px) {
     291        .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column {
     292            justify-content: <?php echo esc_attr( !empty($columnVerticalAlign['mobile']) ? $columnVerticalAlign['mobile'] : (!empty($columnVerticalAlign['tablet']) ? $columnVerticalAlign['tablet'] : $columnVerticalAlign['desktop']) ); ?>;
     293        }
     294    }
     295    <?php endif; ?>
     296
     297<?php endif; ?>
     298
    260299<?php if (!$isNested) : ?>
    261300.<?php echo esc_attr( $id ); ?>.alignfull > .digiblocks-container-inner {
     
    287326
    288327/* Background video */
    289 .<?php echo esc_attr( $id ); ?> > .digiblocks-bg-video-container {
     328.<?php echo esc_attr( $id ); ?> .digiblocks-bg-video-container {
    290329    position: absolute;
    291330    top: 0;
     
    299338}
    300339
    301 .<?php echo esc_attr( $id ); ?> > .digiblocks-bg-video {
     340.<?php echo esc_attr( $id ); ?> .digiblocks-bg-video {
    302341    position: absolute;
    303     top: 50%;
    304     left: 50%;
    305     min-width: 100%;
    306     min-height: 100%;
    307     width: auto;
    308     height: auto;
    309     transform: translateX(-50%) translateY(-50%);
     342    width: 100%;
     343    height: 100%;
     344    -o-object-fit: cover;
    310345    object-fit: cover;
    311346}
  • digiblocks/trunk/blocks/countdown/edit.js

    r3317829 r3346454  
    366366                        .${id} .digiblocks-countdown-item-inner {
    367367                            background-color: ${digitBackground || '#f0f0f0'};
    368                             color: ${digitColor || '#333333'};
     368                            color: ${digitColor};
    369369                            ${getDimensionCSS(boxPadding, 'padding', activeDevice)}
    370370                            ${getDimensionCSS(boxBorderRadius, 'border-radius', activeDevice)}
     
    373373                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    374374                            background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'};
    375                             color: ${digitHoverColor || digitColor || '#333333'};
     375                            color: ${digitHoverColor || digitColor};
    376376                            ${boxShadowHoverCSS}
    377377                        }
     
    382382                        .${id} .digiblocks-countdown-item-inner {
    383383                            background-color: transparent;
    384                             color: ${digitColor || '#333333'};
     384                            color: ${digitColor};
    385385                            ${getDimensionCSS(boxPadding, 'padding', activeDevice)}
    386386                            border-style: solid;
     
    393393                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    394394                            background-color: ${digitHoverBackground || 'transparent'};
    395                             color: ${digitHoverColor || digitColor || '#333333'};
     395                            color: ${digitHoverColor || digitColor};
    396396                            ${boxShadowHoverCSS}
    397397                        }
     
    402402                        .${id} .digiblocks-countdown-item-inner {
    403403                            background-color: ${digitBackground || '#f0f0f0'};
    404                             color: ${digitColor || '#333333'};
     404                            color: ${digitColor};
    405405                            border-radius: 50px;
    406406                            ${getDimensionCSS(boxPadding, 'padding', activeDevice)}
     
    409409                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    410410                            background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'};
    411                             color: ${digitHoverColor || digitColor || '#333333'};
     411                            color: ${digitHoverColor || digitColor};
    412412                            ${boxShadowHoverCSS}
    413413                        }
     
    418418                        .${id} .digiblocks-countdown-item-inner {
    419419                            background-color: ${digitBackground || '#f0f0f0'};
    420                             color: ${digitColor || '#333333'};
     420                            color: ${digitColor};
    421421                            border-radius: 8px;
    422422                            ${getDimensionCSS(boxPadding, 'padding', activeDevice)}
     
    425425                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    426426                            background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'};
    427                             color: ${digitHoverColor || digitColor || '#333333'};
     427                            color: ${digitHoverColor || digitColor};
    428428                            ${boxShadowHoverCSS}
    429429                        }
     
    434434                        .${id} .digiblocks-countdown-item-inner {
    435435                            background-color: ${digitBackground || '#f0f0f0'};
    436                             color: ${digitColor || '#333333'};
     436                            color: ${digitColor};
    437437                            border-radius: 50%;
    438438                            aspect-ratio: 1/1;
     
    445445                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    446446                            background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'};
    447                             color: ${digitHoverColor || digitColor || '#333333'};
     447                            color: ${digitHoverColor || digitColor};
    448448                            ${boxShadowHoverCSS}
    449449                        }
     
    454454                    specificStyles = `
    455455                        .${id} .digiblocks-countdown-item-inner {
    456                             color: ${digitColor || '#333333'};
     456                            color: ${digitColor};
    457457                            ${boxShadowCSS}
    458458                        }
    459459                        .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    460                             color: ${digitHoverColor || digitColor || '#333333'};
     460                            color: ${digitHoverColor || digitColor};
    461461                            ${boxShadowHoverCSS}
    462462                        }
     
    468468            specificStyles = `
    469469                .${id} .digiblocks-countdown-item-inner {
    470                     color: ${digitColor || '#333333'};
     470                    color: ${digitColor};
    471471                }
    472472                .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    473                     color: ${digitHoverColor || digitColor || '#333333'};
     473                    color: ${digitHoverColor || digitColor};
    474474                }
    475475            `;
     
    501501            separatorStyles = `
    502502                .${id} .digiblocks-countdown-separator {
    503                     color: ${separatorColor || '#333333'};
     503                    color: ${separatorColor};
    504504                    font-size: ${titleTypography && titleTypography.fontSize && titleTypography.fontSize[activeDevice] ? titleTypography.fontSize[activeDevice] + (titleTypography.fontSizeUnit || 'px') : '2rem'};
    505505                }
     
    508508                }
    509509                .${id}:hover .digiblocks-countdown-separator {
    510                     color: ${separatorHoverColor || separatorColor || '#333333'};
     510                    color: ${separatorHoverColor || separatorColor};
    511511                }
    512512            `;
     
    623623            .${id} .digiblocks-countdown-expired {
    624624                ${titleTypographyCSS}
    625                 color: ${digitColor || '#333333'};
     625                color: ${digitColor};
    626626                text-align: ${align};
    627627            }
  • digiblocks/trunk/blocks/countdown/index.js

    r3317829 r3346454  
    77import CountdownEdit from './edit';
    88import CountdownSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('countdown', 'digiblocks'), __('timer', 'digiblocks'), __('clock', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('countdown') ? true : false,
    3231        html: false,
    3332        className: false,
     
    9493        digitColor: {
    9594            type: 'string',
    96             default: '#333333'
     95            default: ''
    9796        },
    9897        digitBackground: {
     
    118117        separatorColor: {
    119118            type: 'string',
    120             default: '#333333'
     119            default: ''
    121120        },
    122121        separatorHoverColor: {
  • digiblocks/trunk/blocks/countdown/styles.php

    r3317829 r3346454  
    2727$minutesLabel             = isset( $attrs['minutesLabel'] ) ? $attrs['minutesLabel'] : __( 'Minutes', 'digiblocks' );
    2828$secondsLabel             = isset( $attrs['secondsLabel'] ) ? $attrs['secondsLabel'] : __( 'Seconds', 'digiblocks' );
    29 $digitColor               = isset( $attrs['digitColor'] ) ? $attrs['digitColor'] : '#333333';
     29$digitColor               = isset( $attrs['digitColor'] ) ? $attrs['digitColor'] : '';
    3030$digitBackground          = isset( $attrs['digitBackground'] ) ? $attrs['digitBackground'] : '#f0f0f0';
    3131$digitHoverColor          = isset( $attrs['digitHoverColor'] ) ? $attrs['digitHoverColor'] : '';
     
    3333$labelColor               = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : '#666666';
    3434$labelHoverColor          = isset( $attrs['labelHoverColor'] ) ? $attrs['labelHoverColor'] : '';
    35 $separatorColor           = isset( $attrs['separatorColor'] ) ? $attrs['separatorColor'] : '#333333';
     35$separatorColor           = isset( $attrs['separatorColor'] ) ? $attrs['separatorColor'] : '';
    3636$separatorHoverColor      = isset( $attrs['separatorHoverColor'] ) ? $attrs['separatorHoverColor'] : '';
    3737$boxStyle                 = isset( $attrs['boxStyle'] ) ? $attrs['boxStyle'] : 'default';
     
    361361    <?php endif; ?>
    362362   
    363     color: <?php echo esc_attr( $digitColor ); ?>;
     363    <?php if ( ! empty( $digitColor ) ) : ?>
     364        color: <?php echo esc_attr( $digitColor ); ?>;
     365    <?php endif; ?>
    364366    text-align: <?php echo esc_attr( $align ); ?>;
    365367}
     
    367369<?php if ( $displaySeparator ) : ?>
    368370    .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-separator {
     371        <?php if ( ! empty( $separatorColor ) ) : ?>
    369372        color: <?php echo esc_attr( $separatorColor ); ?>;
     373        <?php endif; ?>
    370374        font-size: <?php echo esc_attr( $titleTypography['fontSize']['desktop'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>;
    371375    }
     
    398402        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    399403            background-color: <?php echo esc_attr( $digitBackground ); ?>;
    400             color: <?php echo esc_attr( $digitColor ); ?>;
     404            <?php if ( ! empty( $digitColor ) ) : ?>
     405                color: <?php echo esc_attr( $digitColor ); ?>;
     406            <?php endif; ?>
    401407            <?php echo esc_attr( digiblocks_get_dimensions( $boxBorderRadius, 'border-radius', 'desktop' ) ); ?>
    402408            padding: <?php echo esc_attr( $boxPadding['desktop']['top'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['right'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['bottom'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['left'] . $boxPadding['desktop']['unit'] ); ?>;
     
    424430        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    425431            background-color: transparent;
     432            <?php if ( ! empty( $digitColor ) ) : ?>
    426433            color: <?php echo esc_attr( $digitColor ); ?>;
     434            <?php endif; ?>
    427435            border-style: solid;
    428436            <?php echo esc_attr( digiblocks_get_dimensions( $boxBorderWidth, 'border-width', 'desktop' ) ); ?>
     
    453461        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    454462            background-color: <?php echo esc_attr( $digitBackground ); ?>;
     463            <?php if ( ! empty( $digitColor ) ) : ?>
    455464            color: <?php echo esc_attr( $digitColor ); ?>;
     465            <?php endif; ?>
    456466            border-radius: 50px;
    457467            <?php echo esc_attr( digiblocks_get_dimensions( $boxPadding, 'padding', 'desktop' ) ); ?>
     
    479489        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    480490            background-color: <?php echo esc_attr( $digitBackground ); ?>;
     491            <?php if ( ! empty( $digitColor ) ) : ?>
    481492            color: <?php echo esc_attr( $digitColor ); ?>;
     493            <?php endif; ?>
    482494            border-radius: 8px;
    483495            <?php echo esc_attr( digiblocks_get_dimensions( $boxPadding, 'padding', 'desktop' ) ); ?>
     
    505517        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    506518            background-color: <?php echo esc_attr( $digitBackground ); ?>;
     519            <?php if ( ! empty( $digitColor ) ) : ?>
    507520            color: <?php echo esc_attr( $digitColor ); ?>;
     521            <?php endif; ?>
    508522            border-radius: 50%;
    509523            aspect-ratio: 1/1;
     
    535549        /* Default box style */
    536550        .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
     551            <?php if ( ! empty( $digitColor ) ) : ?>
    537552            color: <?php echo esc_attr( $digitColor ); ?>;
     553            <?php endif; ?>
    538554            <?php if ( $showBoxShadow && isset( $boxShadow['enable'] ) && $boxShadow['enable'] ) : ?>
    539555                <?php $inset = isset( $boxShadow['position'] ) && 'inset' === $boxShadow['position'] ? 'inset ' : ''; ?>
     
    555571<?php else : ?>
    556572    /* Simple style (no boxes) */
     573    <?php if ( ! empty( $digitColor ) ) : ?>
    557574    .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner {
    558575        color: <?php echo esc_attr( $digitColor ); ?>;
    559576    }
     577    <?php endif; ?>
    560578    .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner {
    561579        <?php if ( $digitHoverColor ) : ?>
  • digiblocks/trunk/blocks/counter/edit.js

    r3317829 r3346454  
    3838        visibility,
    3939        customClasses,
     40        displayIcon,
     41        iconSource,
     42        customSvg,
    4043        iconValue,
    4144        startNumber,
     
    8891        counterSuffix,
    8992        counterSuffixSpacing,
    90         numberWithCommas,
    91         displayIcon
     93        numberWithCommas
    9294    } = attributes;
    9395
     
    590592            .${id} .digiblocks-counter-prefix {
    591593                margin-right: ${counterPrefixSpacing || 5}px;
    592                 color: ${counterColor || '#333333'};
     594                color: ${counterColor};
    593595                ${typographyCSS}
    594596                transition: color 0.3s ease;
     
    597599            .${id} .digiblocks-counter-suffix {
    598600                margin-left: ${counterSuffixSpacing || 5}px;
    599                 color: ${counterColor || '#333333'};
     601                color: ${counterColor};
    600602                ${typographyCSS}
    601603                transition: color 0.3s ease;
     
    603605           
    604606            .${id} .digiblocks-counter-number {
    605                 color: ${counterColor || '#333333'};
     607                color: ${counterColor};
    606608                ${typographyCSS}
    607609                transition: color 0.3s ease;
     
    672674    // Render icon
    673675    const renderIcon = () => {
    674         // Make sure we only try to display an icon if the iconValue exists and has a non-empty svg property
    675         if (!displayIcon || !iconValue || !iconValue.svg || iconValue.svg.trim() === '') {
    676             return null;
     676        // For library icons
     677        if (iconSource === 'library' && iconValue && iconValue.svg && iconValue.svg.trim() !== '') {
     678            return (
     679                <div className="digiblocks-counter-icon">
     680                    <span
     681                        dangerouslySetInnerHTML={{
     682                            __html: iconValue.svg,
     683                        }}
     684                    />
     685                </div>
     686            );
    677687        }
    678688       
    679         return (
    680             <div className="digiblocks-counter-icon">
    681                 <span
    682                     dangerouslySetInnerHTML={{
    683                         __html: iconValue.svg,
    684                     }}
    685                 />
    686             </div>
    687         );
     689        // For custom SVG
     690        if (iconSource === 'custom' && customSvg && customSvg.trim() !== '') {
     691            return (
     692                <div className="digiblocks-counter-icon">
     693                    <span
     694                        dangerouslySetInnerHTML={{
     695                            __html: customSvg,
     696                        }}
     697                    />
     698                </div>
     699            );
     700        }
     701       
     702        return null;
    688703    };
    689704
     
    847862                            {displayIcon && (
    848863                                <div style={{ marginBottom: '2rem' }}>
    849                                     {!componentsLoaded ? (
    850                                         <div style={{ textAlign: 'center', padding: '20px 0' }}>
    851                                             <div className="components-spinner"></div>
    852                                             <p>{__('Loading icon selector...', 'digiblocks')}</p>
     864                                    <ToggleGroupControl
     865                                        label={__("Icon Source", "digiblocks")}
     866                                        value={iconSource || 'library'}
     867                                        onChange={(value) => setAttributes({ iconSource: value })}
     868                                        isBlock
     869                                        __next40pxDefaultSize={true}
     870                                        __nextHasNoMarginBottom={true}
     871                                    >
     872                                        <ToggleGroupControlOption
     873                                            value="library"
     874                                            label={__("Library", "digiblocks")}
     875                                        />
     876                                        <ToggleGroupControlOption
     877                                            value="custom"
     878                                            label={__("Custom", "digiblocks")}
     879                                        />
     880                                    </ToggleGroupControl>
     881
     882                                    {/* Show library picker if 'library' is selected */}
     883                                    {iconSource === 'library' && (
     884                                        <>
     885                                            {!componentsLoaded ? (
     886                                                <div style={{ textAlign: 'center', padding: '20px 0' }}>
     887                                                    <div className="components-spinner"></div>
     888                                                    <p>{__('Loading icon selector...', 'digiblocks')}</p>
     889                                                </div>
     890                                            ) : (
     891                                                <FontAwesomeControl
     892                                                    label={__('Select Icon', 'digiblocks')}
     893                                                    value={iconValue}
     894                                                    onChange={setIconValue}
     895                                                />
     896                                            )}
     897                                           
     898                                            {iconValue && componentsLoaded && (
     899                                                <>
     900                                                    {/* Show info about selected icon */}
     901                                                    <div style={{ marginTop: '15px', marginBottom: '15px', padding: '10px', background: '#f0f0f1', borderRadius: '3px' }}>
     902                                                        <p style={{ margin: '0 0 5px 0' }}>
     903                                                            <strong>{__('Selected Icon:', 'digiblocks')}</strong> {iconValue.name}
     904                                                        </p>
     905                                                        <p style={{ margin: '0 0 5px 0' }}>
     906                                                            <strong>{__('Style:', 'digiblocks')}</strong> {iconValue.style}
     907                                                        </p>
     908                                                        {iconValue.categories && iconValue.categories.length > 0 && (
     909                                                            <p style={{ margin: '0' }}>
     910                                                                <strong>{__('Categories:', 'digiblocks')}</strong> {iconValue.categories.join(', ')}
     911                                                            </p>
     912                                                        )}
     913                                                    </div>
     914                                                </>
     915                                            )}
     916                                        </>
     917                                    )}
     918
     919                                    {/* Show custom SVG textarea if 'custom' is selected */}
     920                                    {iconSource === 'custom' && (
     921                                        <div style={{ marginTop: '15px' }}>
     922                                            <div className="components-base-control">
     923                                                <label className="components-base-control__label" htmlFor="custom-svg-input">
     924                                                    {__('Custom SVG Code', 'digiblocks')}
     925                                                </label>
     926                                                <textarea
     927                                                    id="custom-svg-input"
     928                                                    className="components-textarea-control__input"
     929                                                    value={customSvg || ''}
     930                                                    onChange={(e) => {
     931                                                        const newSvg = e.target.value;
     932                                                       
     933                                                        // Create an iconValue object with the custom SVG
     934                                                        const newIconValue = {
     935                                                            id: 'custom-svg',
     936                                                            name: 'Custom SVG',
     937                                                            svg: newSvg,
     938                                                            style: 'custom',
     939                                                            categories: ['custom']
     940                                                        };
     941                                                       
     942                                                        // Update both the customSvg attribute and the iconValue
     943                                                        setAttributes({
     944                                                            customSvg: newSvg,
     945                                                            iconValue: newIconValue
     946                                                        });
     947                                                    }}
     948                                                    placeholder={__('Paste your SVG code here...', 'digiblocks')}
     949                                                    rows={10}
     950                                                    style={{ width: '100%', marginTop: '8px' }}
     951                                                />
     952                                                <p className="components-base-control__help">
     953                                                    {__('Paste your SVG code here. Make sure it only contains valid SVG markup. For security reasons, scripts and external references will be removed.', 'digiblocks')}
     954                                                </p>
     955                                            </div>
     956                                           
     957                                            {/* Preview of custom SVG */}
     958                                            {customSvg && (
     959                                                <div style={{ marginTop: '15px', marginBottom: '15px' }}>
     960                                                    <p><strong>{__('Preview:', 'digiblocks')}</strong></p>
     961                                                    <div style={{ padding: '20px', background: '#f0f0f1', borderRadius: '3px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
     962                                                        <div className="digiblocks-custom-svg-preview" style={{ width: '50px', height: '50px' }} dangerouslySetInnerHTML={{ __html: customSvg }}></div>
     963                                                    </div>
     964                                                </div>
     965                                            )}
    853966                                        </div>
    854                                     ) : (
    855                                         <FontAwesomeControl
    856                                             label={__('Select Icon', 'digiblocks')}
    857                                             value={iconValue}
    858                                             onChange={setIconValue}
    859                                         />
    860                                     )}
    861                                    
    862                                     {iconValue && componentsLoaded && (
    863                                         <>
    864                                             {/* Show info about selected icon */}
    865                                             <div style={{ marginTop: '15px', marginBottom: '15px', padding: '10px', background: '#f0f0f1', borderRadius: '3px' }}>
    866                                                 <p style={{ margin: '0 0 5px 0' }}>
    867                                                     <strong>{__('Selected Icon:', 'digiblocks')}</strong> {iconValue.name}
    868                                                 </p>
    869                                                 <p style={{ margin: '0 0 5px 0' }}>
    870                                                     <strong>{__('Style:', 'digiblocks')}</strong> {iconValue.style}
    871                                                 </p>
    872                                                 {iconValue.categories && iconValue.categories.length > 0 && (
    873                                                     <p style={{ margin: '0' }}>
    874                                                         <strong>{__('Categories:', 'digiblocks')}</strong> {iconValue.categories.join(', ')}
    875                                                     </p>
    876                                                 )}
    877                                             </div>
    878                                         </>
    879967                                    )}
    880968                                </div>
  • digiblocks/trunk/blocks/counter/index.js

    r3317829 r3346454  
    77import CounterEdit from './edit';
    88import CounterSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('counter', 'digiblocks'), __('number', 'digiblocks'), __('stats', 'digiblocks'), __('count up', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('counter') ? true : false,
    3231        html: false,
    3332        className: false,
     
    5655            default: ''
    5756        },
     57        displayIcon: {
     58            type: 'boolean',
     59            default: false
     60        },
     61        iconSource: {
     62            type: 'string',
     63            default: 'library'
     64        },
     65        customSvg: {
     66            type: 'string',
     67            default: ''
     68        },
    5869        iconValue: {
    5970            type: 'object',
     
    94105        counterColor: {
    95106            type: 'string',
    96             default: '#333333'
     107            default: ''
    97108        },
    98109        counterHoverColor: {
     
    102113        titleColor: {
    103114            type: 'string',
    104             default: '#333333'
     115            default: ''
    105116        },
    106117        titleHoverColor: {
     
    244255            default: {
    245256                desktop: {
    246                     top: 30,
    247                     right: 30,
    248                     bottom: 30,
    249                     left: 30,
     257                    top: "",
     258                    right: "",
     259                    bottom: "",
     260                    left: "",
    250261                    unit: 'px'
    251262                },
    252263                tablet: {
    253                     top: 25,
    254                     right: 25,
    255                     bottom: 25,
    256                     left: 25,
     264                    top: "",
     265                    right: "",
     266                    bottom: "",
     267                    left: "",
    257268                    unit: 'px'
    258269                },
    259270                mobile: {
    260                     top: 20,
    261                     right: 20,
    262                     bottom: 20,
    263                     left: 20,
     271                    top: "",
     272                    right: "",
     273                    bottom: "",
     274                    left: "",
    264275                    unit: 'px'
    265276                }
     
    270281            default: {
    271282                desktop: {
    272                     top: 0,
    273                     right: 0,
    274                     bottom: 30,
    275                     left: 0,
     283                    top: "",
     284                    right: "",
     285                    bottom: "",
     286                    left: "",
    276287                    unit: 'px'
    277288                },
    278289                tablet: {
    279                     top: 0,
    280                     right: 0,
    281                     bottom: 25,
    282                     left: 0,
     290                    top: "",
     291                    right: "",
     292                    bottom: "",
     293                    left: "",
    283294                    unit: 'px'
    284295                },
    285296                mobile: {
    286                     top: 0,
    287                     right: 0,
    288                     bottom: 20,
    289                     left: 0,
     297                    top: "",
     298                    right: "",
     299                    bottom: "",
     300                    left: "",
    290301                    unit: 'px'
    291302                }
     
    415426            type: 'number',
    416427            default: 15
    417         },
    418         displayIcon: {
    419             type: 'boolean',
    420             default: false
    421428        },
    422429        numberWithCommas: {
  • digiblocks/trunk/blocks/counter/save.js

    r3317829 r3346454  
    1212        anchor,
    1313        customClasses,
     14        iconSource,
     15        customSvg,
    1416        iconValue,
    1517        startNumber,
     
    3436    const blockClasses = [
    3537        "digiblocks-counter",
    36         id,
     38        id,
    3739        `align-${align || 'center'}`,
    3840        `layout-${layoutStyle || 'stacked'}`,
     
    5860    // Render icon if provided
    5961    const renderIcon = () => {
    60         // Make sure we only try to display an icon if the iconValue exists and has a non-empty svg property
    61         if (!displayIcon || !iconValue || !iconValue.svg || iconValue.svg.trim() === '') {
    62             return null;
     62        // For library icons
     63        if (iconSource === 'library' && iconValue && iconValue.svg && iconValue.svg.trim() !== '') {
     64            return (
     65                <div className="digiblocks-counter-icon">
     66                    <span dangerouslySetInnerHTML={{ __html: iconValue.svg }} />
     67                </div>
     68            );
    6369        }
    6470       
    65         return (
    66             <div className="digiblocks-counter-icon">
    67                 <span dangerouslySetInnerHTML={{ __html: iconValue.svg }} />
    68             </div>
    69         );
     71        // For custom SVG
     72        if (iconSource === 'custom' && customSvg && customSvg.trim() !== '') {
     73            return (
     74                <div className="digiblocks-counter-icon">
     75                    <span dangerouslySetInnerHTML={{ __html: customSvg }} />
     76                </div>
     77            );
     78        }
     79       
     80        return null;
    7081    };
    7182
  • digiblocks/trunk/blocks/counter/styles.php

    r3317829 r3346454  
    2727$title                    = isset( $attrs['title'] ) ? $attrs['title'] : '';
    2828$description              = isset( $attrs['description'] ) ? $attrs['description'] : '';
    29 $counterColor             = isset( $attrs['counterColor'] ) ? $attrs['counterColor'] : '#333333';
     29$counterColor             = isset( $attrs['counterColor'] ) ? $attrs['counterColor'] : '';
    3030$counterHoverColor        = isset( $attrs['counterHoverColor'] ) ? $attrs['counterHoverColor'] : '';
    31 $titleColor               = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     31$titleColor               = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    3232$titleHoverColor          = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : '';
    3333$textColor                = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666';
     
    5858
    5959// Get padding and margin (with fallback)
    60 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array(
    61     'desktop' => array(
    62         'top'    => 30,
    63         'right'  => 30,
    64         'bottom' => 30,
    65         'left'   => 30,
    66         'unit'   => 'px',
    67     ),
    68     'tablet'  => array(
    69         'top'    => 25,
    70         'right'  => 25,
    71         'bottom' => 25,
    72         'left'   => 25,
    73         'unit'   => 'px',
    74     ),
    75     'mobile'  => array(
    76         'top'    => 20,
    77         'right'  => 20,
    78         'bottom' => 20,
    79         'left'   => 20,
    80         'unit'   => 'px',
    81     ),
    82 );
    83 
    84 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : array(
    85     'desktop' => array(
    86         'top'    => 0,
    87         'right'  => 0,
    88         'bottom' => 30,
    89         'left'   => 0,
    90         'unit'   => 'px',
    91     ),
    92     'tablet'  => array(
    93         'top'    => 0,
    94         'right'  => 0,
    95         'bottom' => 25,
    96         'left'   => 0,
    97         'unit'   => 'px',
    98     ),
    99     'mobile'  => array(
    100         'top'    => 0,
    101         'right'  => 0,
    102         'bottom' => 20,
    103         'left'   => 0,
    104         'unit'   => 'px',
    105     ),
    106 );
     60$padding = isset( $attrs['padding'] ) ? $attrs['padding'] : digiblocks_get_default_dimensions('px');
     61
     62$margin = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px');
    10763
    10864// Get iconSize (with fallback)
     
    411367.<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix {
    412368    margin-right: <?php echo esc_attr( $counterPrefixSpacing ); ?>px;
     369    <?php if ( ! empty( $counterColor ) ) : ?>
    413370    color: <?php echo esc_attr( $counterColor ); ?>;
     371    <?php endif; ?>
    414372    <?php if ( ! empty( $typography['fontFamily'] ) ) : ?>
    415373        font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>;
     
    449407.<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix {
    450408    margin-left: <?php echo esc_attr( $counterSuffixSpacing ); ?>px;
     409    <?php if ( ! empty( $counterColor ) ) : ?>
    451410    color: <?php echo esc_attr( $counterColor ); ?>;
     411    <?php endif; ?>
    452412    <?php if ( ! empty( $typography['fontFamily'] ) ) : ?>
    453413        font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>;
     
    486446
    487447.<?php echo esc_attr( $id ); ?> .digiblocks-counter-number {
     448    <?php if ( ! empty( $counterColor ) ) : ?>
    488449    color: <?php echo esc_attr( $counterColor ); ?>;
     450    <?php endif; ?>
    489451    <?php if ( ! empty( $typography['fontFamily'] ) ) : ?>
    490452        font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>;
     
    533495/* Title styles */
    534496.<?php echo esc_attr( $id ); ?> .digiblocks-counter-title {
     497    <?php if ( ! empty( $titleColor ) ) : ?>
    535498    color: <?php echo esc_attr( $titleColor ); ?>;
     499    <?php endif; ?>
    536500    margin-bottom: 10px;
    537501   
     
    667631    <?php endif; ?>
    668632   
    669     <?php if ( isset( $typography['fontSize']['tablet'] ) || isset( $typography['lineHeight']['tablet'] ) || isset( $typography['letterSpacing']['tablet'] ) ) : ?>
     633    <?php if ( ! empty( $typography['fontSize']['tablet'] ) || ! empty( $typography['lineHeight']['tablet'] ) || ! empty( $typography['letterSpacing']['tablet'] ) ) : ?>
    670634        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-number,
    671635        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix,
    672636        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix {
    673             <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>
     637            <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?>
    674638                font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    675639            <?php endif; ?>
    676             <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>
     640            <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?>
    677641                line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    678642            <?php endif; ?>
    679             <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>
     643            <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?>
    680644                letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    681645            <?php endif; ?>
     
    683647    <?php endif; ?>
    684648   
    685     <?php if ( isset( $titleTypography['fontSize']['tablet'] ) || isset( $titleTypography['lineHeight']['tablet'] ) || isset( $titleTypography['letterSpacing']['tablet'] ) ) : ?>
     649    <?php if ( ! empty( $titleTypography['fontSize']['tablet'] ) || ! empty( $titleTypography['lineHeight']['tablet'] ) || ! empty( $titleTypography['letterSpacing']['tablet'] ) ) : ?>
    686650        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-title {
    687             <?php if ( isset( $titleTypography['fontSize']['tablet'] ) ) : ?>
     651            <?php if ( ! empty( $titleTypography['fontSize']['tablet'] ) ) : ?>
    688652                font-size: <?php echo esc_attr( $titleTypography['fontSize']['tablet'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>;
    689653            <?php endif; ?>
    690             <?php if ( isset( $titleTypography['lineHeight']['tablet'] ) ) : ?>
     654            <?php if ( ! empty( $titleTypography['lineHeight']['tablet'] ) ) : ?>
    691655                line-height: <?php echo esc_attr( $titleTypography['lineHeight']['tablet'] . ( $titleTypography['lineHeightUnit'] ?: 'em' ) ); ?>;
    692656            <?php endif; ?>
    693             <?php if ( isset( $titleTypography['letterSpacing']['tablet'] ) ) : ?>
     657            <?php if ( ! empty( $titleTypography['letterSpacing']['tablet'] ) ) : ?>
    694658                letter-spacing: <?php echo esc_attr( $titleTypography['letterSpacing']['tablet'] . ( $titleTypography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    695659            <?php endif; ?>
     
    697661    <?php endif; ?>
    698662   
    699     <?php if ( isset( $contentTypography['fontSize']['tablet'] ) || isset( $contentTypography['lineHeight']['tablet'] ) || isset( $contentTypography['letterSpacing']['tablet'] ) ) : ?>
     663    <?php if ( ! empty( $contentTypography['fontSize']['tablet'] ) || ! empty( $contentTypography['lineHeight']['tablet'] ) || ! empty( $contentTypography['letterSpacing']['tablet'] ) ) : ?>
    700664        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-description {
    701             <?php if ( isset( $contentTypography['fontSize']['tablet'] ) ) : ?>
     665            <?php if ( ! empty( $contentTypography['fontSize']['tablet'] ) ) : ?>
    702666                font-size: <?php echo esc_attr( $contentTypography['fontSize']['tablet'] . ( $contentTypography['fontSizeUnit'] ?: 'px' ) ); ?>;
    703667            <?php endif; ?>
    704             <?php if ( isset( $contentTypography['lineHeight']['tablet'] ) ) : ?>
     668            <?php if ( ! empty( $contentTypography['lineHeight']['tablet'] ) ) : ?>
    705669                line-height: <?php echo esc_attr( $contentTypography['lineHeight']['tablet'] . ( $contentTypography['lineHeightUnit'] ?: 'em' ) ); ?>;
    706670            <?php endif; ?>
    707             <?php if ( isset( $contentTypography['letterSpacing']['tablet'] ) ) : ?>
     671            <?php if ( ! empty( $contentTypography['letterSpacing']['tablet'] ) ) : ?>
    708672                letter-spacing: <?php echo esc_attr( $contentTypography['letterSpacing']['tablet'] . ( $contentTypography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    709673            <?php endif; ?>
     
    755719    <?php endif; ?>
    756720   
    757     <?php if ( isset( $typography['fontSize']['mobile'] ) || isset( $typography['lineHeight']['mobile'] ) || isset( $typography['letterSpacing']['mobile'] ) ) : ?>
     721    <?php if ( ! empty( $typography['fontSize']['mobile'] ) || ! empty( $typography['lineHeight']['mobile'] ) || ! empty( $typography['letterSpacing']['mobile'] ) ) : ?>
    758722        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-number,
    759723        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix,
    760724        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix {
    761             <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>
     725            <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?>
    762726                font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    763727            <?php endif; ?>
    764             <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>
     728            <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?>
    765729                line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    766730            <?php endif; ?>
    767             <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>
     731            <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?>
    768732                letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    769733            <?php endif; ?>
     
    771735    <?php endif; ?>
    772736   
    773     <?php if ( isset( $titleTypography['fontSize']['mobile'] ) || isset( $titleTypography['lineHeight']['mobile'] ) || isset( $titleTypography['letterSpacing']['mobile'] ) ) : ?>
     737    <?php if ( ! empty( $titleTypography['fontSize']['mobile'] ) || ! empty( $titleTypography['lineHeight']['mobile'] ) || ! empty( $titleTypography['letterSpacing']['mobile'] ) ) : ?>
    774738        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-title {
    775             <?php if ( isset( $titleTypography['fontSize']['mobile'] ) ) : ?>
     739            <?php if ( ! empty( $titleTypography['fontSize']['mobile'] ) ) : ?>
    776740                font-size: <?php echo esc_attr( $titleTypography['fontSize']['mobile'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>;
    777741            <?php endif; ?>
    778             <?php if ( isset( $titleTypography['lineHeight']['mobile'] ) ) : ?>
     742            <?php if ( ! empty( $titleTypography['lineHeight']['mobile'] ) ) : ?>
    779743                line-height: <?php echo esc_attr( $titleTypography['lineHeight']['mobile'] . ( $titleTypography['lineHeightUnit'] ?: 'em' ) ); ?>;
    780744            <?php endif; ?>
    781             <?php if ( isset( $titleTypography['letterSpacing']['mobile'] ) ) : ?>
     745            <?php if ( ! empty( $titleTypography['letterSpacing']['mobile'] ) ) : ?>
    782746                letter-spacing: <?php echo esc_attr( $titleTypography['letterSpacing']['mobile'] . ( $titleTypography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    783747            <?php endif; ?>
     
    785749    <?php endif; ?>
    786750   
    787     <?php if ( isset( $contentTypography['fontSize']['mobile'] ) || isset( $contentTypography['lineHeight']['mobile'] ) || isset( $contentTypography['letterSpacing']['mobile'] ) ) : ?>
     751    <?php if ( ! empty( $contentTypography['fontSize']['mobile'] ) || ! empty( $contentTypography['lineHeight']['mobile'] ) || ! empty( $contentTypography['letterSpacing']['mobile'] ) ) : ?>
    788752        .<?php echo esc_attr( $id ); ?> .digiblocks-counter-description {
    789             <?php if ( isset( $contentTypography['fontSize']['mobile'] ) ) : ?>
     753            <?php if ( ! empty( $contentTypography['fontSize']['mobile'] ) ) : ?>
    790754                font-size: <?php echo esc_attr( $contentTypography['fontSize']['mobile'] . ( $contentTypography['fontSizeUnit'] ?: 'px' ) ); ?>;
    791755            <?php endif; ?>
    792             <?php if ( isset( $contentTypography['lineHeight']['mobile'] ) ) : ?>
     756            <?php if ( ! empty( $contentTypography['lineHeight']['mobile'] ) ) : ?>
    793757                line-height: <?php echo esc_attr( $contentTypography['lineHeight']['mobile'] . ( $contentTypography['lineHeightUnit'] ?: 'em' ) ); ?>;
    794758            <?php endif; ?>
    795             <?php if ( isset( $contentTypography['letterSpacing']['mobile'] ) ) : ?>
     759            <?php if ( ! empty( $contentTypography['letterSpacing']['mobile'] ) ) : ?>
    796760                letter-spacing: <?php echo esc_attr( $contentTypography['letterSpacing']['mobile'] . ( $contentTypography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    797761            <?php endif; ?>
  • digiblocks/trunk/blocks/faq/index.js

    r3317829 r3346454  
    77import FAQEdit from './edit';
    88import FAQSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('faq') ? true : false,
    3332        html: false,
    3433        className: false,
     
    7675        titleColor: {
    7776            type: 'string',
    78             default: '#333333'
     77            default: ''
    7978        },
    8079        titleHoverColor: {
     
    212211        iconColor: {
    213212            type: 'string',
    214             default: '#333333'
     213            default: ''
    215214        },
    216215        iconHoverColor: {
     
    300299            ],
    301300            layout: 'boxed',
    302             titleColor: '#333333',
     301            titleColor: '',
    303302            titleActiveColor: '#1e73be',
    304303            backgroundColor: '#ffffff'
  • digiblocks/trunk/blocks/faq/styles.php

    r3317829 r3346454  
    1919];
    2020$items                 = isset( $attrs['items'] ) ? $attrs['items'] : array();
    21 $titleColor            = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     21$titleColor            = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    2222$titleHoverColor       = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : '';
    2323$titleActiveColor      = isset( $attrs['titleActiveColor'] ) ? $attrs['titleActiveColor'] : '#1e73be';
     
    2929$borderColor           = isset( $attrs['borderColor'] ) ? $attrs['borderColor'] : '#e0e0e0';
    3030$borderHoverColor      = isset( $attrs['borderHoverColor'] ) ? $attrs['borderHoverColor'] : '';
    31 $iconColor             = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#333333';
     31$iconColor             = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '';
    3232$iconHoverColor        = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : '';
    3333$iconActiveColor       = isset( $attrs['iconActiveColor'] ) ? $attrs['iconActiveColor'] : '#1e73be';
     
    163163.<?php echo esc_attr( $id ); ?> .digiblocks-faq-question-text,
    164164.<?php echo esc_attr( $id ); ?> .digiblocks-faq-question-text-content {
     165    <?php if ( ! empty( $titleColor ) ) : ?>
    165166    color: <?php echo esc_attr( $titleColor ); ?>;
     167    <?php endif; ?>
    166168    <?php if ( ! empty( $titleTypography['fontFamily'] ) ) : ?>
    167169    font-family: <?php echo esc_attr( $titleTypography['fontFamily'] ); ?>;
     
    268270    align-items: center;
    269271    justify-content: center;
     272    <?php if ( ! empty( $iconColor ) ) : ?>
    270273    color: <?php echo esc_attr( $iconColor ); ?>;
     274    <?php endif; ?>
    271275    transition: all 0.3s ease;
    272276    font-size: <?php echo esc_attr( $iconSize['desktop'] ); ?>px;
  • digiblocks/trunk/blocks/forms/index.js

    r3317829 r3346454  
    77import FormsEdit from './edit';
    88import FormsSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('form', 'digiblocks'), __('contact', 'digiblocks'), __('input', 'digiblocks'), __('email', 'digiblocks'), __('field', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('forms') ? true : false,
    3231        html: false,
    3332        className: false,
     
    116115        textColor: {
    117116            type: 'string',
    118             default: '#333333'
     117            default: ''
    119118        },
    120119        labelColor: {
    121120            type: 'string',
    122             default: '#333333'
     121            default: ''
    123122        },
    124123        buttonBackgroundColor: {
     
    252251        inputTextColor: {
    253252            type: 'string',
    254             default: '#333333'
     253            default: ''
    255254        },
    256255        inputFocusBorderColor: {
  • digiblocks/trunk/blocks/forms/styles.php

    r3317829 r3346454  
    1919];
    2020$backgroundColor           = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '#ffffff';
    21 $textColor                 = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#333333';
    22 $labelColor                = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : '#333333';
     21$textColor                 = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '';
     22$labelColor                = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : '';
    2323$buttonBackgroundColor     = isset( $attrs['buttonBackgroundColor'] ) ? $attrs['buttonBackgroundColor'] : '#4a6cf7';
    2424$buttonTextColor           = isset( $attrs['buttonTextColor'] ) ? $attrs['buttonTextColor'] : '#ffffff';
     
    3333$inputBorderWidth          = isset( $attrs['inputBorderWidth'] ) ? $attrs['inputBorderWidth'] : 1;
    3434$inputBackgroundColor      = isset( $attrs['inputBackgroundColor'] ) ? $attrs['inputBackgroundColor'] : '#ffffff';
    35 $inputTextColor            = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : '#333333';
     35$inputTextColor            = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : '';
    3636$inputFocusBorderColor     = isset( $attrs['inputFocusBorderColor'] ) ? $attrs['inputFocusBorderColor'] : '#4a6cf7';
    3737
     
    238238.<?php echo esc_attr( $id ); ?> {
    239239    background-color: <?php echo esc_attr( $backgroundColor ); ?>;
     240    <?php if ( !empty($textColor) ) : ?>
    240241    color: <?php echo esc_attr( $textColor ); ?>;
     242    <?php endif; ?>
    241243    <?php if ( 'none' !== $borderStyle ) : ?>
    242244    border-style: <?php echo esc_attr( $borderStyle ); ?>;
     
    310312    display: block;
    311313    margin-bottom: <?php echo esc_attr( $labelMargin['desktop'] ); ?>px;
     314    <?php if ( !empty($labelColor) ) : ?>
    312315    color: <?php echo esc_attr( $labelColor ); ?>;
     316    <?php endif; ?>
    313317    <?php if ( !empty($textTypography['fontFamily']) ) : ?>
    314318    font-family: <?php echo esc_attr( $textTypography['fontFamily'] ); ?>;
     
    356360    <?php endif; ?>
    357361    background-color: <?php echo esc_attr( $inputBackgroundColor ); ?>;
     362    <?php if ( !empty($inputTextColor) ) : ?>
    358363    color: <?php echo esc_attr( $inputTextColor ); ?>;
     364    <?php endif; ?>
    359365    transition: all 0.3s ease;
    360366    <?php if ( !empty($typography['fontFamily']) ) : ?>
  • digiblocks/trunk/blocks/google-map/index.js

    r3317829 r3346454  
    77import GoogleMapEdit from './edit';
    88import GoogleMapSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('map', 'digiblocks'), __('google', 'digiblocks'), __('location', 'digiblocks'), __('marker', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('google-map') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/google-map/script.php

    r3317829 r3346454  
    4242   
    4343    // Function to initialize Google Maps
    44     async function initDigiGoogleMaps() {
    45         console.log("DigiBlocks - Initializing Google Maps");
    46        
     44    async function initDigiGoogleMaps() {       
    4745        // Find all map blocks
    4846        const mapBlocks = document.querySelectorAll('.digiblocks-google-map');
    49        
    50         console.log("DigiBlocks Map Count:", mapBlocks.length);
    5147       
    5248        if (!mapBlocks.length) return;
     
    5753        // Initialize each map
    5854        mapBlocks.forEach(async function(mapBlock) {
    59             console.log("Processing map:", mapBlock.className);
    60            
    6155            const mapContainer = mapBlock.querySelector('.digiblocks-google-map-container');
    6256            const markersContainer = mapBlock.querySelector('.digiblocks-google-map-markers');
     
    7468            const enableStreetView = mapBlock.getAttribute('data-enable-streetview') !== 'false';
    7569            const enableMapType = mapBlock.getAttribute('data-enable-maptype') !== 'false';
    76            
    77             console.log("Map ID from data attribute:", mapId);
    78             console.log("Markers container exists:", !!markersContainer);
    7970           
    8071            // Get map style options from data attributes
     
    10495                markerElements = markersContainer.querySelectorAll('.digiblocks-google-map-marker');
    10596                hasMarkers = markerElements.length > 0;
    106                 console.log("Marker count:", markerElements.length);
    10797            }
    10898           
     
    110100            if (mapId) {
    111101                mapOptions.mapId = mapId;
    112                 console.log("Applied Map ID:", mapId);
    113102            }
    114103           
     
    261250            // Process markers if we have any
    262251            if (hasMarkers) {
    263                 console.log("Processing markers - Map ID:", mapId);
    264                
    265252                // Array to collect all markers
    266253                const markers = [];
     
    279266                            const title = markerElement.getAttribute('data-title') || '';
    280267                            const description = markerElement.getAttribute('data-description') || '';
    281                            
    282                             console.log("Processing marker with lat/lng:", lat, lng);
    283268                           
    284269                            if (!isNaN(lat) && !isNaN(lng)) {
     
    348333                } else {
    349334                    // No Map ID, use basic markers
    350                     console.log("No Map ID available, using basic markers");
    351335                    createBasicMarkers();
    352336                }
  • digiblocks/trunk/blocks/heading/edit.js

    r3317829 r3346454  
    11581158                                onChange={(value) => setAttributes({ typography: value })}
    11591159                                defaults={{
    1160                                     fontSize: { desktop: 32, tablet: 28, mobile: 24 },
     1160                                    fontSize: { desktop: '', tablet: '', mobile: '' },
    11611161                                    fontSizeUnit: 'px',
    1162                                     lineHeight: { desktop: 1.2, tablet: 1.2, mobile: 1.2 },
     1162                                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    11631163                                    lineHeightUnit: 'em',
    11641164                                }}
  • digiblocks/trunk/blocks/heading/index.js

    r3317829 r3346454  
    77import HeadingEdit from './edit';
    88import HeadingSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('heading') ? true : false,
    3332        html: false,
    3433        className: false,
    3534        customClassName: false,
    36         anchor: false,
     35        anchor: false
    3736    },
    3837    attributes: {
     
    6766        textColor: {
    6867            type: 'string',
    69             default: '#333333'
     68            default: ''
    7069        },
    7170        textHoverColor: {
     
    8584            default: {
    8685                fontFamily: '',
    87                 fontSize: { desktop: 32, tablet: 28, mobile: 24 },
     86                fontSize: { desktop: '', tablet: '', mobile: '' },
    8887                fontSizeUnit: 'px',
    8988                fontWeight: '600',
     
    9190                textTransform: 'none',
    9291                textDecoration: 'none',
    93                 lineHeight: { desktop: 1.2, tablet: 1.2, mobile: 1.2 },
     92                lineHeight: { desktop: '', tablet: '', mobile: '' },
    9493                lineHeightUnit: 'em',
    95                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     94                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    9695                letterSpacingUnit: 'px'
    9796            }
  • digiblocks/trunk/blocks/heading/styles.php

    r3317829 r3346454  
    2020$content                = isset( $attrs['content'] ) ? $attrs['content'] : '';
    2121$level                  = isset( $attrs['level'] ) ? $attrs['level'] : 2;
    22 $textColor              = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#333333';
     22$textColor              = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '';
    2323$textHoverColor         = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : '';
    2424$backgroundColor        = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '';
     
    8181    'fontFamily'        => '',
    8282    'fontSize'          => array(
    83         'desktop' => 32,
    84         'tablet'  => 28,
    85         'mobile'  => 24,
     83        'desktop' => '',
     84        'tablet'  => '',
     85        'mobile'  => '',
    8686    ),
    8787    'fontSizeUnit'      => 'px',
     
    9191    'textDecoration'    => 'none',
    9292    'lineHeight'        => array(
    93         'desktop' => 1.2,
    94         'tablet'  => 1.2,
    95         'mobile'  => 1.2,
     93        'desktop' => '',
     94        'tablet'  => '',
     95        'mobile'  => '',
    9696    ),
    9797    'lineHeightUnit'    => 'em',
    9898    'letterSpacing'     => array(
    99         'desktop' => 0,
    100         'tablet'  => 0,
    101         'mobile'  => 0,
     99        'desktop' => '',
     100        'tablet'  => '',
     101        'mobile'  => '',
    102102    ),
    103103    'letterSpacingUnit' => 'px',
     
    436436    }
    437437   
    438     <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>
     438    <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?>
    439439    .<?php echo esc_attr( $id ); ?> .digiblocks-heading-text {
    440440        font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    441441       
    442         <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>
     442        <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?>
    443443        line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    444444        <?php endif; ?>
    445445       
    446         <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>
     446        <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?>
    447447        letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    448448        <?php endif; ?>
     
    521521    }
    522522   
    523     <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>
     523    <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?>
    524524    .<?php echo esc_attr( $id ); ?> .digiblocks-heading-text {
    525525        font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    526526       
    527         <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>
     527        <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?>
    528528        line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    529529        <?php endif; ?>
    530530       
    531         <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>
     531        <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?>
    532532        letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    533533        <?php endif; ?>
  • digiblocks/trunk/blocks/icon-box/edit.js

    r3317829 r3346454  
    17151715                }
    17161716                defaults={{
    1717                     fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     1717                    fontSize: { desktop: '', tablet: '', mobile: '' },
    17181718                    fontSizeUnit: 'px',
    1719                     lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     1719                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    17201720                    lineHeightUnit: 'em',
    17211721                }}
     
    20652065                                }
    20662066                                defaults={{
    2067                                     fontSize: { desktop: 24, tablet: 22, mobile: 20 },
     2067                                    fontSize: { desktop: '', tablet: '', mobile: '' },
    20682068                                    fontSizeUnit: 'px',
    2069                                     lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     2069                                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    20702070                                    lineHeightUnit: 'em',
    20712071                                }}
     
    20842084                                }
    20852085                                defaults={{
    2086                                     fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     2086                                    fontSize: { desktop: '', tablet: '', mobile: '' },
    20872087                                    fontSizeUnit: 'px',
    2088                                     lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     2088                                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    20892089                                    lineHeightUnit: 'em',
    20902090                                }}
  • digiblocks/trunk/blocks/icon-box/index.js

    r3317829 r3346454  
    77import IconBoxEdit from './edit';
    88import IconBoxSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('icon', 'digiblocks'), __('box', 'digiblocks'), __('feature', 'digiblocks'), __('service', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('icon-box') ? true : false,
    3231        html: false,
    3332        className: false,
     
    122121        titleColor: {
    123122            type: 'string',
    124             default: '#333333'
     123            default: ''
    125124        },
    126125        titleHoverColor: {
     
    138137        backgroundColor: {
    139138            type: 'string',
    140             default: '#ffffff'
     139            default: ''
    141140        },
    142141        backgroundHoverColor: {
     
    312311            default: {
    313312                fontFamily: '',
    314                 fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     313                fontSize: { desktop: '', tablet: '', mobile: '' },
    315314                fontSizeUnit: 'px',
    316315                fontWeight: '500',
     
    318317                textTransform: '',
    319318                textDecoration: '',
    320                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     319                lineHeight: { desktop: '', tablet: '', mobile: '' },
    321320                lineHeightUnit: 'em',
    322                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     321                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    323322                letterSpacingUnit: 'px'
    324323            }
     
    436435            default: {
    437436                fontFamily: '',
    438                 fontSize: { desktop: 22, tablet: 20, mobile: 18 },
     437                fontSize: { desktop: '', tablet: '', mobile: '' },
    439438                fontSizeUnit: 'px',
    440439                fontWeight: '',
     
    442441                textTransform: '',
    443442                textDecoration: '',
    444                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     443                lineHeight: { desktop: '', tablet: '', mobile: '' },
    445444                lineHeightUnit: 'em',
    446                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     445                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    447446                letterSpacingUnit: 'px'
    448447            }
     
    452451            default: {
    453452                fontFamily: '',
    454                 fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     453                fontSize: { desktop: '', tablet: '', mobile: '' },
    455454                fontSizeUnit: 'px',
    456455                fontWeight: '',
     
    458457                textTransform: '',
    459458                textDecoration: '',
    460                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     459                lineHeight: { desktop: '', tablet: '', mobile: '' },
    461460                lineHeightUnit: 'em',
    462                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     461                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    463462                letterSpacingUnit: 'px'
    464463            }
     
    468467            default: {
    469468                desktop: {
    470                     top: 30,
    471                     right: 30,
    472                     bottom: 30,
    473                     left: 30,
     469                    top: '',
     470                    right: '',
     471                    bottom: '',
     472                    left: '',
    474473                    unit: 'px'
    475474                },
    476475                tablet: {
    477                     top: 25,
    478                     right: 25,
    479                     bottom: 25,
    480                     left: 25,
     476                    top: '',
     477                    right: '',
     478                    bottom: '',
     479                    left: '',
    481480                    unit: 'px'
    482481                },
    483482                mobile: {
    484                     top: 20,
    485                     right: 20,
    486                     bottom: 20,
    487                     left: 20,
     483                    top: '',
     484                    right: '',
     485                    bottom: '',
     486                    left: '',
    488487                    unit: 'px'
    489488                }
     
    494493            default: {
    495494                desktop: {
    496                     top: 0,
    497                     right: 0,
    498                     bottom: 30,
    499                     left: 0,
     495                    top: '',
     496                    right: '',
     497                    bottom: '',
     498                    left: '',
    500499                    unit: 'px'
    501500                },
    502501                tablet: {
    503                     top: 0,
    504                     right: 0,
    505                     bottom: 25,
    506                     left: 0,
     502                    top: '',
     503                    right: '',
     504                    bottom: '',
     505                    left: '',
    507506                    unit: 'px'
    508507                },
    509508                mobile: {
    510                     top: 0,
    511                     right: 0,
    512                     bottom: 20,
    513                     left: 0,
     509                    top: '',
     510                    right: '',
     511                    bottom: '',
     512                    left: '',
    514513                    unit: 'px'
    515514                }
     
    528527            default: {
    529528                desktop: {
    530                     top: 8,
    531                     right: 8,
    532                     bottom: 8,
    533                     left: 8,
     529                    top: '',
     530                    right: '',
     531                    bottom: '',
     532                    left: '',
    534533                    unit: 'px'
    535534                },
    536535                tablet: {
    537                     top: 8,
    538                     right: 8,
    539                     bottom: 8,
    540                     left: 8,
     536                    top: '',
     537                    right: '',
     538                    bottom: '',
     539                    left: '',
    541540                    unit: 'px'
    542541                },
    543542                mobile: {
    544                     top: 8,
    545                     right: 8,
    546                     bottom: 8,
    547                     left: 8,
     543                    top: '',
     544                    right: '',
     545                    bottom: '',
     546                    left: '',
    548547                    unit: 'px'
    549548                }
     
    624623            title: __('Feature Title', 'digiblocks'),
    625624            content: __('Add your feature description here. Explain what makes this feature special.', 'digiblocks'),
    626             iconColor: '#1e73be',
    627             backgroundColor: '#ffffff'
     625            iconColor: '#1e73be'
    628626        },
    629627        viewportWidth: 400
  • digiblocks/trunk/blocks/icon-box/styles.php

    r3317829 r3346454  
    6565$showBadge                    = isset( $attrs['showBadge'] ) ? $attrs['showBadge'] : false;
    6666$badgeText                    = isset( $attrs['badgeText'] ) ? $attrs['badgeText'] : __('Popular', 'digiblocks');
    67 $titleColor                   = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     67$titleColor                   = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    6868$titleHoverColor              = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : '';
    6969$textColor                    = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666';
    7070$textHoverColor               = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : '';
    71 $backgroundColor              = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '#ffffff';
     71$backgroundColor              = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '';
    7272$backgroundHoverColor         = isset( $attrs['backgroundHoverColor'] ) ? $attrs['backgroundHoverColor'] : '';
    7373$align                        = isset( $attrs['align'] ) ? $attrs['align'] : 'center';
     
    202202    'fontFamily'        => '',
    203203    'fontSize'          => array(
    204         'desktop' => 16,
    205         'tablet'  => 15,
    206         'mobile'  => 14,
     204        'desktop' => '',
     205        'tablet'  => '',
     206        'mobile'  => '',
    207207    ),
    208208    'fontSizeUnit'      => 'px',
     
    212212    'textDecoration'    => '',
    213213    'lineHeight'        => array(
    214         'desktop' => 1.5,
    215         'tablet'  => 1.4,
    216         'mobile'  => 1.3,
     214        'desktop' => '',
     215        'tablet'  => '',
     216        'mobile'  => '',
    217217    ),
    218218    'lineHeightUnit'    => 'em',
    219219    'letterSpacing'     => array(
    220         'desktop' => 0,
    221         'tablet'  => 0,
    222         'mobile'  => 0,
     220        'desktop' => '',
     221        'tablet'  => '',
     222        'mobile'  => '',
    223223    ),
    224224    'letterSpacingUnit' => 'px',
     
    379379
    380380// Get padding (with fallback)
    381 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array(
    382     'desktop' => array(
    383         'top'    => 30,
    384         'right'  => 30,
    385         'bottom' => 30,
    386         'left'   => 30,
    387         'unit'   => 'px',
    388     ),
    389     'tablet'  => array(
    390         'top'    => 25,
    391         'right'  => 25,
    392         'bottom' => 25,
    393         'left'   => 25,
    394         'unit'   => 'px',
    395     ),
    396     'mobile'  => array(
    397         'top'    => 20,
    398         'right'  => 20,
    399         'bottom' => 20,
    400         'left'   => 20,
    401         'unit'   => 'px',
    402     ),
    403 );
     381$padding = isset( $attrs['padding'] ) ? $attrs['padding'] : digiblocks_get_default_dimensions('px');
    404382
    405383// Get margin (with fallback)
    406 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : array(
    407     'desktop' => array(
    408         'top'    => 0,
    409         'right'  => 0,
    410         'bottom' => 30,
    411         'left'   => 0,
    412         'unit'   => 'px',
    413     ),
    414     'tablet'  => array(
    415         'top'    => 0,
    416         'right'  => 0,
    417         'bottom' => 25,
    418         'left'   => 0,
    419         'unit'   => 'px',
    420     ),
    421     'mobile'  => array(
    422         'top'    => 0,
    423         'right'  => 0,
    424         'bottom' => 20,
    425         'left'   => 0,
    426         'unit'   => 'px',
    427     ),
    428 );
     384$margin = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px');
    429385
    430386// Get borderWidth (with responsive fallback)
     
    454410
    455411// Get borderRadius (with responsive fallback)
    456 $borderRadius = isset( $attrs['borderRadius'] ) ? $attrs['borderRadius'] : array(
    457     'desktop' => array(
    458         'top'    => 8,
    459         'right'  => 8,
    460         'bottom' => 8,
    461         'left'   => 8,
    462         'unit'   => 'px',
    463     ),
    464     'tablet'  => array(
    465         'top'    => '',
    466         'right'  => '',
    467         'bottom' => '',
    468         'left'   => '',
    469         'unit'   => 'px',
    470     ),
    471     'mobile'  => array(
    472         'top'    => '',
    473         'right'  => '',
    474         'bottom' => '',
    475         'left'   => '',
    476         'unit'   => 'px',
    477     ),
    478 );
     412$borderRadius = isset( $attrs['borderRadius'] ) ? $attrs['borderRadius'] : digiblocks_get_default_dimensions('px');
    479413
    480414// Get typography settings with default values
     
    482416    'fontFamily'        => '',
    483417    'fontSize'          => array(
    484         'desktop' => 22,
    485         'tablet'  => 20,
    486         'mobile'  => 18,
     418        'desktop' => '',
     419        'tablet'  => '',
     420        'mobile'  => '',
    487421    ),
    488422    'fontSizeUnit'      => 'px',
     
    492426    'textDecoration'    => '',
    493427    'lineHeight'        => array(
    494         'desktop' => 1.5,
    495         'tablet'  => 1.4,
    496         'mobile'  => 1.3,
     428        'desktop' => '',
     429        'tablet'  => '',
     430        'mobile'  => '',
    497431    ),
    498432    'lineHeightUnit'    => 'em',
    499433    'letterSpacing'     => array(
    500         'desktop' => 0,
    501         'tablet'  => 0,
    502         'mobile'  => 0,
     434        'desktop' => '',
     435        'tablet'  => '',
     436        'mobile'  => '',
    503437    ),
    504438    'letterSpacingUnit' => 'px',
     
    508442    'fontFamily'        => '',
    509443    'fontSize'          => array(
    510         'desktop' => 16,
    511         'tablet'  => 15,
    512         'mobile'  => 14,
     444        'desktop' => '',
     445        'tablet'  => '',
     446        'mobile'  => '',
    513447    ),
    514448    'fontSizeUnit'      => 'px',
     
    518452    'textDecoration'    => '',
    519453    'lineHeight'        => array(
    520         'desktop' => 1.5,
    521         'tablet'  => 1.4,
    522         'mobile'  => 1.3,
     454        'desktop' => '',
     455        'tablet'  => '',
     456        'mobile'  => '',
    523457    ),
    524458    'lineHeightUnit'    => 'em',
    525459    'letterSpacing'     => array(
    526         'desktop' => 0,
    527         'tablet'  => 0,
    528         'mobile'  => 0,
     460        'desktop' => '',
     461        'tablet'  => '',
     462        'mobile'  => '',
    529463    ),
    530464    'letterSpacingUnit' => 'px',
     
    680614/* Title styles */
    681615.<?php echo esc_attr( $id ); ?> .digiblocks-icon-box-title {
     616    <?php if ( !empty($titleColor) ) : ?>
    682617    color: <?php echo esc_attr( $titleColor ); ?>;
     618    <?php endif; ?>
    683619    margin-top: 0;
    684620    margin-bottom: 10px;
  • digiblocks/trunk/blocks/icon-list/edit.js

    r3317829 r3346454  
    8080    useBlockId( id, clientId, setAttributes );
    8181
     82    // Initialize items with deep cloned objects when empty or ensure items are unique
     83    useEffect(() => {
     84        // If items array is empty, initialize with default items
     85        if (!items || items.length === 0) {
     86            const defaultItems = [
     87                {
     88                    id: 'item-1',
     89                    content: __('First list item with icon', 'digiblocks'),
     90                    iconSource: 'library',
     91                    icon: {
     92                        id: 'check',
     93                        name: 'Check',
     94                        svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>',
     95                        style: 'solid',
     96                        categories: ['design']
     97                    },
     98                    customSvg: '',
     99                    linkEnabled: false,
     100                    linkUrl: '',
     101                    linkOpenInNewTab: false,
     102                    linkRel: ''
     103                },
     104                {
     105                    id: 'item-2',
     106                    content: __('Second list item with star icon', 'digiblocks'),
     107                    iconSource: 'library',
     108                    icon: {
     109                        id: 'star',
     110                        name: 'Star',
     111                        svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="1em" height="1em"><path d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg>',
     112                        style: 'solid',
     113                        categories: ['design']
     114                    },
     115                    customSvg: '',
     116                    linkUrl: '',
     117                    linkOpenInNewTab: false,
     118                    linkRel: ''
     119                },
     120                {
     121                    id: 'item-3',
     122                    content: __('Third list item with heart icon', 'digiblocks'),
     123                    iconSource: 'library',
     124                    icon: {
     125                        id: 'heart',
     126                        name: 'Heart',
     127                        svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"/></svg>',
     128                        style: 'solid',
     129                        categories: ['design']
     130                    },
     131                    customSvg: '',
     132                    linkUrl: '',
     133                    linkOpenInNewTab: false,
     134                    linkRel: ''
     135                }
     136            ];
     137            setAttributes({ items: defaultItems });
     138        } else {
     139            // Ensure each item has a unique ID (in case of duplication)
     140            const hasNonUniqueIds = items.some((item, index) =>
     141                items.findIndex(i => i.id === item.id) !== index
     142            );
     143           
     144            if (hasNonUniqueIds) {
     145                const uniqueItems = items.map((item, index) => ({
     146                    ...JSON.parse(JSON.stringify(item)), // Deep clone to break references
     147                    id: `item-${Date.now()}-${index}`
     148                }));
     149                setAttributes({ items: uniqueItems });
     150            }
     151        }
     152    }, [clientId]);
     153
    82154    // Use global responsive state for local rendering instead of local state
    83155    const [localActiveDevice, setLocalActiveDevice] = useState(
     
    243315
    244316    // Update list item
    245     const updateListItem = (index, field, value) => {
    246         const newItems = [...items];
    247         newItems[index][field] = value;
    248         setAttributes({ items: newItems });
    249     };
     317    const updateListItem = (index, field, value) => {
     318        const newItems = items.map((item, i) => {
     319            if (i === index) {
     320                return {
     321                    ...item,
     322                    [field]: value
     323                };
     324            }
     325            return item;
     326        });
     327        setAttributes({ items: newItems });
     328    };
    250329
    251330    // Move item up
     
    414493                flex-direction: ${listLayout === 'horizontal' ? 'row' : 'column'};
    415494                flex-wrap: wrap;
     495                justify-content: ${listAlign === 'center' ? 'center' : (listAlign === 'right' ? 'flex-end' : 'flex-start')};
    416496                gap: ${itemSpace[activeDevice] !== undefined ? itemSpace[activeDevice] : 16}px;
    417497            }
     
    452532            /* Text content */
    453533            .${id} .digiblocks-icon-list-content {
    454                 color: ${textColor || "#333333"};
     534                color: ${textColor};
    455535                ${contentTypographyCSS}
    456536                transition: color 0.3s ease;
  • digiblocks/trunk/blocks/icon-list/index.js

    r3317829 r3346454  
    77import IconListEdit from './edit';
    88import IconListSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('icon-list') ? true : false,
    3332        html: false,
    3433        className: false,
     
    191190        textColor: {
    192191            type: 'string',
    193             default: '#333333'
     192            default: ''
    194193        },
    195194        textHoverColor: {
  • digiblocks/trunk/blocks/icon-list/styles.php

    r3317829 r3346454  
    3939$iconColor          = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#1e73be';
    4040$iconHoverColor     = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : '';
    41 $textColor          = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#333333';
     41$textColor          = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '';
    4242$textHoverColor     = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : '';
    4343$backgroundColor    = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '';
     
    229229    flex-direction: <?php echo esc_attr( 'horizontal' === $listLayout ? 'row' : 'column' ); ?>;
    230230    flex-wrap: wrap;
     231    justify-content: <?php echo esc_attr( 'center' === $listAlign ? 'center' : ( 'right' === $listAlign ? 'flex-end' : 'flex-start' ) ); ?>;
    231232    gap: <?php echo esc_attr( $itemSpace['desktop'] . 'px' ); ?>;
    232233}
     
    275276/* Text content */
    276277.<?php echo esc_attr( $id ); ?> .digiblocks-icon-list-content {
     278    <?php if ( !empty($textColor) ) : ?>
    277279    color: <?php echo esc_attr( $textColor ); ?>;
     280    <?php endif; ?>
    278281    <?php if ( ! empty( $contentTypography['fontFamily'] ) ) : ?>
    279282        font-family: <?php echo esc_attr( $contentTypography['fontFamily'] ); ?>;
  • digiblocks/trunk/blocks/icon/edit.js

    r3317829 r3346454  
    2626const { useBlockId, getDimensionCSS, animations, animationPreview } = digi.utils;
    2727const { tabIcons } = digi.icons;
    28 const { ResponsiveControl, ResponsiveButtonGroup, DimensionControl, BoxShadowControl, CustomTabPanel, TabPanelBody } = digi.components;
     28const { ResponsiveControl, ResponsiveButtonGroup, ResponsiveRangeControl, DimensionControl, BoxShadowControl, CustomTabPanel, TabPanelBody } = digi.components;
    2929
    3030/**
     
    4141        iconValue,
    4242        iconSize,
     43        iconHeight,
    4344        iconColor,
    4445        iconBackgroundColor,
     
    145146        setAttributes({ iconValue: newIcon });
    146147    };
     148
     149    const getMaxValue = (unit) => {
     150        switch (unit) {
     151            case '%':
     152                return 100;
     153            case 'em':
     154            case 'rem':
     155                return 10;
     156            case 'px':
     157            default:
     158                return 1000;
     159        }
     160    };
     161
     162    const getStepValue = (unit) => {
     163        switch (unit) {
     164            case '%':
     165            case 'em':
     166            case 'rem':
     167                return 0.1;
     168            case 'px':
     169            default:
     170                return 1;
     171        }
     172    };
    147173
    148174    // Use ref
     
    390416           
    391417            .${id} .digiblocks-icon svg {
    392                 width: ${iconSize[activeDevice]}px;
    393                 height: auto;
     418                width: ${iconSize[activeDevice]?.value ? `${iconSize[activeDevice].value}${iconSize[activeDevice].unit}` : '48px'};
     419                height: ${iconHeight[activeDevice]?.value ? `${iconHeight[activeDevice].value}${iconHeight[activeDevice].unit}` : 'auto'};
    394420                fill: ${iconColor || 'inherit'};
    395421                transition: all 0.3s ease;
     
    10091035                            initialOpen={true}
    10101036                        >
    1011                             {/* Icon Size */}
    1012                             <ResponsiveControl
    1013                                 label={__(
    1014                                     "Icon Size",
    1015                                     "digiblocks"
    1016                                 )}
    1017                             >
    1018                                 <RangeControl
    1019                                     value={iconSize[localActiveDevice]}
    1020                                     onChange={(value) =>
    1021                                         setAttributes({
    1022                                             iconSize: {
    1023                                                 ...iconSize,
    1024                                                 [localActiveDevice]: value,
    1025                                             },
    1026                                         })
    1027                                     }
    1028                                     min={8}
    1029                                     max={500}
    1030                                     step={1}
    1031                                     __next40pxDefaultSize={true}
    1032                                     __nextHasNoMarginBottom={true}
    1033                                 />
    1034                             </ResponsiveControl>
     1037                            <ResponsiveRangeControl
     1038                                label={__("Icon Width", "digiblocks")}
     1039                                value={iconSize}
     1040                                onChange={(value) => setAttributes({ iconSize: value })}
     1041                                units={[
     1042                                    { label: 'px', value: 'px' },
     1043                                    { label: '%', value: '%' },
     1044                                    { label: 'em', value: 'em' },
     1045                                    { label: 'rem', value: 'rem' },
     1046                                ]}
     1047                                defaultUnit="px"
     1048                                min={0}
     1049                                max={getMaxValue(iconSize?.[localActiveDevice]?.unit)}
     1050                                step={getStepValue(iconSize?.[localActiveDevice]?.unit)}
     1051                            />
     1052
     1053                            <ResponsiveRangeControl
     1054                                label={__("Icon Height", "digiblocks")}
     1055                                value={iconHeight}
     1056                                onChange={(value) => setAttributes({ iconHeight: value })}
     1057                                units={[
     1058                                    { label: 'px', value: 'px' },
     1059                                    { label: '%', value: '%' },
     1060                                    { label: 'em', value: 'em' },
     1061                                    { label: 'rem', value: 'rem' },
     1062                                ]}
     1063                                defaultUnit="px"
     1064                                min={0}
     1065                                max={getMaxValue(iconHeight?.[localActiveDevice]?.unit)}
     1066                                step={getStepValue(iconHeight?.[localActiveDevice]?.unit)}
     1067                            />
    10351068
    10361069                            <TabPanel
  • digiblocks/trunk/blocks/icon/index.js

    r3317829 r3346454  
    77import IconEdit from './edit';
    88import IconSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('icon') ? true : false,
    3332        html: false,
    3433        className: false,
     
    162161            type: 'object',
    163162            default: {
    164                 desktop: 48,
    165                 tablet: 40,
    166                 mobile: 32
     163                desktop: { value: 48, unit: 'px' },
     164                tablet: { value: '', unit: 'px' },
     165                mobile: { value: '', unit: 'px' }
     166            }
     167        },
     168        iconHeight: {
     169            type: 'object',
     170            default: {
     171                desktop: { value: '', unit: 'px' },
     172                tablet: { value: '', unit: 'px' },
     173                mobile: { value: '', unit: 'px' }
    167174            }
    168175        },
  • digiblocks/trunk/blocks/icon/styles.php

    r3317829 r3346454  
    8787);
    8888
    89 // Get icon size (with fallback)
     89// Get icon size
    9090$iconSize = isset( $attrs['iconSize'] ) ? $attrs['iconSize'] : array(
    91     'desktop' => 48,
    92     'tablet'  => 40,
    93     'mobile'  => 32,
     91    'desktop' => array( 'value' => 48, 'unit' => 'px' ),
     92    'tablet'  => array( 'value' => '', 'unit' => 'px' ),
     93    'mobile'  => array( 'value' => '', 'unit' => 'px' ),
     94);
     95
     96// Get icon height
     97$iconHeight = isset( $attrs['iconHeight'] ) ? $attrs['iconHeight'] : array(
     98    'desktop' => array( 'value' => '', 'unit' => 'px' ),
     99    'tablet'  => array( 'value' => '', 'unit' => 'px' ),
     100    'mobile'  => array( 'value' => '', 'unit' => 'px' ),
    94101);
    95102
     
    273280
    274281.<?php echo esc_attr( $id ); ?> .digiblocks-icon svg {
    275     width: <?php echo esc_attr( $iconSize['desktop'] ); ?>px;
    276     height: 100%;
     282    <?php if ( ! empty( $iconSize['desktop']['value'] ) ) : ?>
     283        width: <?php echo esc_attr( $iconSize['desktop']['value'] . $iconSize['desktop']['unit'] ); ?>;
     284    <?php else: ?>
     285        width: 48px;
     286    <?php endif; ?>
     287
     288    <?php if ( ! empty( $iconHeight['desktop']['value'] ) ) : ?>
     289        height: <?php echo esc_attr( $iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'] ); ?>;
     290    <?php else: ?>
     291        height: auto;
     292    <?php endif; ?>
    277293    fill: <?php echo esc_attr( $iconColor ); ?>;
    278294    transition: all 0.3s ease;
     
    311327    }
    312328
    313     <?php if ( isset( $iconSize['tablet'] ) ) : ?>
    314         .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg {
    315             width: <?php echo esc_attr( $iconSize['tablet'] ); ?>px;
    316         }
    317     <?php endif; ?>
     329    <?php if ( isset( $iconSize['tablet']['value'] ) || isset( $iconHeight['tablet']['value'] ) ) : ?>
     330        .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg {
     331            <?php if ( ! empty( $iconSize['tablet']['value'] ) ) : ?>
     332                width: <?php echo esc_attr( $iconSize['tablet']['value'] . $iconSize['tablet']['unit'] ); ?>;
     333            <?php endif; ?>
     334
     335            <?php if ( ! empty( $iconHeight['tablet']['value'] ) ) : ?>
     336                height: <?php echo esc_attr( $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] ); ?>;
     337            <?php endif; ?>
     338        }
     339    <?php endif; ?>
    318340       
    319341    <?php if ( $iconPadding && isset( $iconPadding['tablet'] ) ) : ?>
     
    345367    }
    346368   
    347     <?php if ( isset( $iconSize['mobile'] ) ) : ?>
    348         .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg {
    349             width: <?php echo esc_attr( $iconSize['mobile'] ); ?>px;
    350         }
    351     <?php endif; ?>
     369    <?php if ( isset( $iconSize['mobile']['value'] ) || isset( $iconHeight['mobile']['value'] ) ) : ?>
     370        .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg {
     371            <?php if ( ! empty( $iconSize['mobile']['value'] ) ) : ?>
     372                width: <?php echo esc_attr( $iconSize['mobile']['value'] . $iconSize['mobile']['unit'] ); ?>;
     373            <?php endif; ?>
     374
     375            <?php if ( ! empty( $iconHeight['mobile']['value'] ) ) : ?>
     376                height: <?php echo esc_attr( $iconHeight['mobile']['value'] . $iconHeight['mobile']['unit'] ); ?>;
     377            <?php endif; ?>
     378        }
     379    <?php endif; ?>
    352380       
    353381    <?php if ( $iconPadding && isset( $iconPadding['mobile'] ) ) : ?>
  • digiblocks/trunk/blocks/image/index.js

    r3317829 r3346454  
    77import ImageEdit from './edit';
    88import ImageSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('image', 'digiblocks'), __('picture', 'digiblocks'), __('photo', 'digiblocks'), __('media', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('image') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/lottie/index.js

    r3317829 r3346454  
    77import LottieEdit from './edit';
    88import LottieSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('lottie', 'digiblocks'), __('animation', 'digiblocks'), __('dotlottie', 'digiblocks'), __('motion', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('lottie') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/newsletter/index.js

    r3317829 r3346454  
    77import NewsletterEdit from './edit';
    88import NewsletterSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('newsletter', 'digiblocks'), __('subscribe', 'digiblocks'), __('email', 'digiblocks'), __('mailchimp', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('newsletter') ? true : false,
    3231        html: false,
    3332        className: false,
     
    110109        titleColor: {
    111110            type: 'string',
    112             default: '#333333'
     111            default: ''
    113112        },
    114113        titleHoverColor: {
     
    122121        inputTextColor: {
    123122            type: 'string',
    124             default: '#333333'
     123            default: ''
    125124        },
    126125        inputBackgroundColor: {
  • digiblocks/trunk/blocks/newsletter/styles.php

    r3317829 r3346454  
    2424    'mobile'  => 'left',
    2525];
    26 $titleColor                  = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '#333333';
     26$titleColor                  = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : '';
    2727$titleHoverColor             = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : '';
    2828$descriptionColor            = isset( $attrs['descriptionColor'] ) ? $attrs['descriptionColor'] : '#666666';
    29 $inputTextColor              = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : '#333333';
     29$inputTextColor              = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : '';
    3030$inputBackgroundColor        = isset( $attrs['inputBackgroundColor'] ) ? $attrs['inputBackgroundColor'] : '#ffffff';
    3131$inputBorderColor            = isset( $attrs['inputBorderColor'] ) ? $attrs['inputBorderColor'] : '#e0e0e0';
     
    251251/* Newsletter Title */
    252252.<?php echo esc_attr( $id ); ?> .digiblocks-newsletter-title {
     253    <?php if ( !empty($titleColor) ) : ?>
    253254    color: <?php echo esc_attr( $titleColor ); ?>;
     255    <?php endif; ?>
    254256    margin-top: 0;
    255257    margin-bottom: <?php echo esc_attr($spacing['desktop']['value'] . ($spacing['desktop']['unit'] ?: 'px')); ?>;
     
    362364    height: 1em;
    363365    <?php endif; ?>
     366    <?php if ( !empty($inputTextColor) ) : ?>
    364367    fill: <?php echo esc_attr( $inputTextColor ); ?>;
     368    <?php endif; ?>
    365369    pointer-events: none;
    366370    z-index: 2;
     
    373377    width: 100%;
    374378    padding: 12px 16px 12px 50px;
     379    <?php if ( !empty($inputTextColor) ) : ?>
    375380    color: <?php echo esc_attr( $inputTextColor ); ?>;
     381    <?php endif; ?>
    376382    background-color: <?php echo esc_attr( $inputBackgroundColor ); ?>;
    377383    <?php if ( $inputBorderStyle !== 'none' && ! empty( $inputBorderColor ) ) : ?>
  • digiblocks/trunk/blocks/pricing-table/edit.js

    r3317829 r3346454  
    14021402                position: absolute;
    14031403                top: 5px;
    1404                 right: 5px;
     1404                left: 5px;
    14051405                display: flex;
    14061406                gap: 5px;
     
    14141414                display: flex;
    14151415                gap: 5px;
    1416             }
    1417            
    1418             .${id} .digiblocks-table-active {
    1419                 outline: 2px solid #4a6cf7;
    1420                 outline-offset: -2px;
    14211416            }
    14221417           
     
    16681663               
    16691664                {/* Footer */}
    1670                 <div className="digiblocks-pricing-table-footer">
    1671                     <div
    1672                         className="digiblocks-pricing-table-button"
    1673                         style={table.buttonBackgroundColor ? {
    1674                             backgroundColor: table.buttonBackgroundColor,
    1675                             color: table.buttonTextColor || buttonTextColor || '#ffffff'
    1676                         } : null}
    1677                     >
    1678                         <RichText
    1679                             tagName="span"
    1680                             value={table.buttonText}
    1681                             onChange={(value) => updateTableAttribute(index, 'buttonText', value)}
    1682                             placeholder={__('Get Started', 'digiblocks')}
    1683                         />
    1684                     </div>
    1685                 </div>
     1665                {table.buttonUrl && table.buttonUrl.trim() !== '' && (
     1666                    <div className="digiblocks-pricing-table-footer">
     1667                        <div
     1668                            className="digiblocks-pricing-table-button"
     1669                            style={table.buttonBackgroundColor ? {
     1670                                backgroundColor: table.buttonBackgroundColor,
     1671                                color: table.buttonTextColor || buttonTextColor || '#ffffff'
     1672                            } : null}
     1673                        >
     1674                            <RichText
     1675                                tagName="span"
     1676                                value={table.buttonText}
     1677                                onChange={(value) => updateTableAttribute(index, 'buttonText', value)}
     1678                                placeholder={__('Get Started', 'digiblocks')}
     1679                            />
     1680                        </div>
     1681                    </div>
     1682                )}
    16861683            </div>
    16871684        );
  • digiblocks/trunk/blocks/pricing-table/index.js

    r3317829 r3346454  
    77import PricingTableEdit from './edit';
    88import PricingTableSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('pricing-table') ? true : false,
    3332        html: false,
    3433        className: false,
  • digiblocks/trunk/blocks/pricing-table/save.js

    r3317829 r3346454  
    134134                        </div>
    135135                       
    136                         {/* Footer */}
    137                         <div className="digiblocks-pricing-table-footer">
    138                             <a
    139                                 href={table.buttonUrl || '#'}
    140                                 className="digiblocks-pricing-table-button"
    141                                 style={table.buttonBackgroundColor ? {
    142                                     backgroundColor: table.buttonBackgroundColor,
    143                                     color: table.buttonTextColor || '#ffffff'
    144                                 } : null}
    145                                 target={table.buttonOpenInNewTab ? '_blank' : undefined}
    146                                 rel={table.buttonOpenInNewTab
    147                                     ? `noopener noreferrer ${table.buttonRel || ''}`.trim()
    148                                     : table.buttonRel || undefined}
    149                             >
    150                                 <RichText.Content
    151                                     tagName="span"
    152                                     value={table.buttonText}
    153                                 />
    154                             </a>
    155                         </div>
     136                        {/* Footer */}
     137                        {table.buttonUrl && table.buttonUrl.trim() !== '' && (
     138                            <div className="digiblocks-pricing-table-footer">
     139                                <a
     140                                    href={table.buttonUrl || '#'}
     141                                    className="digiblocks-pricing-table-button"
     142                                    style={table.buttonBackgroundColor ? {
     143                                        backgroundColor: table.buttonBackgroundColor,
     144                                        color: table.buttonTextColor || '#ffffff'
     145                                    } : null}
     146                                    target={table.buttonOpenInNewTab ? '_blank' : undefined}
     147                                    rel={table.buttonOpenInNewTab
     148                                        ? `noopener noreferrer ${table.buttonRel || ''}`.trim()
     149                                        : table.buttonRel || undefined}
     150                                >
     151                                    <RichText.Content
     152                                        tagName="span"
     153                                        value={table.buttonText}
     154                                    />
     155                                </a>
     156                            </div>
     157                        )}
    156158                    </div>
    157159                ))}
  • digiblocks/trunk/blocks/separator/index.js

    r3317829 r3346454  
    77import SeparatorEdit from './edit';
    88import SeparatorSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('separator') ? true : false,
    3332        html: false,
    3433        className: false,
  • digiblocks/trunk/blocks/social-icons/edit.js

    r3317829 r3346454  
    2626const { useBlockId, getDimensionCSS, animations, animationPreview } = digi.utils;
    2727const { tabIcons } = digi.icons;
    28 const { ResponsiveControl, ResponsiveButtonGroup, DimensionControl, TypographyControl, CustomTabPanel, TabPanelBody } = digi.components;
     28const { ResponsiveControl, ResponsiveButtonGroup, ResponsiveRangeControl, DimensionControl, TypographyControl, CustomTabPanel, TabPanelBody } = digi.components;
    2929
    3030/**
     
    6161        align,
    6262        icons,
    63         iconSize,
    64         iconSpacing,
     63        iconWidth,
     64        iconHeight,
     65        iconSpacing,
    6566        iconColor,
    6667        iconHoverColor,
     
    155156    };
    156157
     158    const getMaxValue = (unit) => {
     159        switch(unit) {
     160            case '%': return 100;
     161            case 'em':
     162            case 'rem': return 10;
     163            case 'px':
     164            default: return 100;
     165        }
     166    };
     167   
     168    const getStepValue = (unit) => {
     169        switch(unit) {
     170            case '%': return 1;
     171            case 'em':
     172            case 'rem': return 0.1;
     173            case 'px':
     174            default: return 1;
     175        }
     176    };
     177
    157178    // Border style options
    158179    const borderStyleOptions = [
     
    325346        const activeDevice = localActiveDevice;
    326347       
    327         // Icon size
    328         const currentIconSize = iconSize[activeDevice] || 24;
    329        
    330         // Icon spacing
    331         const currentIconSpacing = iconSpacing[activeDevice] || 10;
     348        // Icon dimensions
     349        const currentIconWidth = iconWidth[activeDevice]?.value ? `${iconWidth[activeDevice].value}${iconWidth[activeDevice].unit}` : '1rem';
     350        const currentIconHeight = iconHeight[activeDevice]?.value ? `${iconHeight[activeDevice].value}${iconHeight[activeDevice].unit}` : '1rem';
     351
     352        // Icon spacing
     353        const currentIconSpacing = iconSpacing[activeDevice]?.value ? `${iconSpacing[activeDevice].value}${iconSpacing[activeDevice].unit}` : '0.8rem';
    332354       
    333355        // Label spacing
    334         const currentLabelSpacing = labelSpacing[activeDevice] || 5;
     356        const currentLabelSpacing = labelSpacing[activeDevice]?.value ? `${labelSpacing[activeDevice].value}${labelSpacing[activeDevice].unit}` : '0.8rem';
    335357       
    336358        // Border styles
     
    433455                align-items: center;
    434456                flex-wrap: wrap;
    435                 gap: ${currentIconSpacing}px;
     457                gap: ${currentIconSpacing};
    436458                justify-content: ${align[activeDevice]};
    437459            }
     
    446468                align-items: center;
    447469                text-decoration: none;
    448                 gap: ${currentLabelSpacing}px;
     470                gap: ${currentLabelSpacing};
    449471            }
    450472           
     
    468490           
    469491            .${id} .digiblocks-social-icon-icon svg {
    470                 width: ${currentIconSize}px;
    471                 height: ${currentIconSize}px;
     492                width: ${currentIconWidth};
     493                height: ${currentIconHeight};
    472494                fill: currentColor;
    473495                transition: all 0.3s ease;
     
    493515            .${id} .digiblocks-social-icon-remove {
    494516                position: absolute;
    495                 top: -18px;
    496                 right: -10px;
    497                 background-color: #fff;
    498                 border-radius: 50%;
    499                 padding: 2px;
    500                 display: none;
    501                 box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    502                 z-index: 10;
     517                top: -18px;
     518                right: -10px;
     519                display: none;
     520                align-items: center;
     521                justify-content: center;
     522                width: 20px;
     523                height: 20px;
     524                line-height: 1;
     525                background-color: #fff;
     526                border-radius: 50%;
     527                padding: 2px;
     528                box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
     529                z-index: 10;
    503530            }
    504531           
    505532            .${id} .digiblocks-social-wrapper:hover .digiblocks-social-icon-remove {
    506                 display: block;
     533                display: flex;
    507534            }
    508535           
     
    531558            @media (max-width: 991px) {
    532559                .${id} {
    533                     gap: ${iconSpacing.tablet || currentIconSpacing}px;
    534                 }
    535                
    536                 .${id} .digiblocks-social-icon {
    537                     gap: ${labelSpacing.tablet || currentLabelSpacing}px;
    538                 }
    539                
    540                 .${id} .digiblocks-social-icon-icon svg {
    541                     width: ${iconSize.tablet || currentIconSize}px;
    542                     height: ${iconSize.tablet || currentIconSize}px;
    543                 }
     560                    gap: ${iconSpacing.tablet?.value ? `${iconSpacing.tablet.value}${iconSpacing.tablet.unit}` : currentIconSpacing};
     561                }
     562               
     563                .${id} .digiblocks-social-icon {
     564                    gap: ${labelSpacing.tablet?.value ? `${labelSpacing.tablet.value}${labelSpacing.tablet.unit}` : currentLabelSpacing};
     565                }
     566               
     567                .${id} .digiblocks-social-icon-icon svg {
     568                    width: ${iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth};
     569                    height: ${iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight};
     570                }
    544571               
    545572                ${textTypography && textTypography.fontSize && textTypography.fontSize.tablet ? `
     
    550577               
    551578                .${id} .digiblocks-social-icon.add-social {
    552                     width: ${iconSize.tablet || currentIconSize}px;
    553                     height: ${iconSize.tablet || currentIconSize}px;
     579                    width: ${iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth};
     580                    height: ${iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight};
    554581                }
    555582            }
     
    557584            @media (max-width: 767px) {
    558585                .${id} {
    559                     gap: ${iconSpacing.mobile || iconSpacing.tablet || currentIconSpacing}px;
    560                 }
    561                
    562                 .${id} .digiblocks-social-icon {
    563                     gap: ${labelSpacing.mobile || labelSpacing.tablet || currentLabelSpacing}px;
    564                 }
    565                
    566                 .${id} .digiblocks-social-icon-icon svg {
    567                     width: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;
    568                     height: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;
    569                 }
     586                    gap: ${iconSpacing.mobile?.value ? `${iconSpacing.mobile.value}${iconSpacing.mobile.unit}` : (iconSpacing.tablet?.value ? `${iconSpacing.tablet.value}${iconSpacing.tablet.unit}` : currentIconSpacing)};
     587                }
     588               
     589                .${id} .digiblocks-social-icon {
     590                    gap: ${labelSpacing.mobile?.value ? `${labelSpacing.mobile.value}${labelSpacing.mobile.unit}` : currentLabelSpacing};
     591                }
     592               
     593                .${id} .digiblocks-social-icon-icon svg {
     594                    width: ${iconWidth.mobile?.value ? `${iconWidth.mobile.value}${iconWidth.mobile.unit}` : (iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth)};
     595                    height: ${iconHeight.mobile?.value ? `${iconHeight.mobile.value}${iconHeight.mobile.unit}` : (iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight)};
     596                }
    570597               
    571598                ${textTypography && textTypography.fontSize && textTypography.fontSize.mobile ? `
     
    576603               
    577604                .${id} .digiblocks-social-icon.add-social {
    578                     width: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;
    579                     height: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;
     605                    width: ${iconWidth.mobile?.value ? `${iconWidth.mobile.value}${iconWidth.mobile.unit}` : (iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth)};
     606                    height: ${iconHeight.mobile?.value ? `${iconHeight.mobile.value}${iconHeight.mobile.unit}` : (iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight)};
    580607                }
    581608            }
     
    909936                            initialOpen={false}
    910937                        >
    911                             <ResponsiveControl
    912                                 label={__(
    913                                     "Icon Size",
    914                                     "digiblocks"
    915                                 )}
    916                             >
    917                                 <RangeControl
    918                                     value={iconSize[localActiveDevice]}
    919                                     onChange={(value) =>
    920                                         setAttributes({
    921                                             iconSize: {
    922                                                 ...iconSize,
    923                                                 [localActiveDevice]: value,
    924                                             },
    925                                         })
    926                                     }
    927                                     min={0}
    928                                     max={100}
    929                                     step={1}
    930                                     __next40pxDefaultSize={true}
    931                                     __nextHasNoMarginBottom={true}
    932                                 />
    933                             </ResponsiveControl>
    934                            
    935                             <ResponsiveControl
    936                                 label={__(
    937                                     "Icon Spacing",
    938                                     "digiblocks"
    939                                 )}
    940                             >
    941                                 <RangeControl
    942                                     value={iconSpacing[localActiveDevice]}
    943                                     onChange={(value) =>
    944                                         setAttributes({
    945                                             iconSpacing: {
    946                                                 ...iconSpacing,
    947                                                 [localActiveDevice]: value,
    948                                             },
    949                                         })
    950                                     }
    951                                     min={0}
    952                                     max={100}
    953                                     step={1}
    954                                     __next40pxDefaultSize={true}
    955                                     __nextHasNoMarginBottom={true}
    956                                 />
    957                             </ResponsiveControl>
     938                            <ResponsiveRangeControl
     939                                label={__("Icon Width", "digiblocks")}
     940                                value={iconWidth}
     941                                onChange={(value) => setAttributes({ iconWidth: value })}
     942                                units={[
     943                                    { label: 'px', value: 'px' },
     944                                    { label: 'rem', value: 'rem' },
     945                                    { label: 'em', value: 'em' },
     946                                    { label: '%', value: '%' }
     947                                ]}
     948                                defaultUnit="rem"
     949                                min={0}
     950                                max={getMaxValue(iconWidth?.[localActiveDevice]?.unit)}
     951                                step={getStepValue(iconWidth?.[localActiveDevice]?.unit)}
     952                                defaultValues={{
     953                                    desktop: 1,
     954                                    tablet: '',
     955                                    mobile: ''
     956                                }}
     957                            />
     958
     959                            <ResponsiveRangeControl
     960                                label={__("Icon Height", "digiblocks")}
     961                                value={iconHeight}
     962                                onChange={(value) => setAttributes({ iconHeight: value })}
     963                                units={[
     964                                    { label: 'px', value: 'px' },
     965                                    { label: 'rem', value: 'rem' },
     966                                    { label: 'em', value: 'em' },
     967                                    { label: '%', value: '%' }
     968                                ]}
     969                                defaultUnit="rem"
     970                                min={0}
     971                                max={getMaxValue(iconHeight?.[localActiveDevice]?.unit)}
     972                                step={getStepValue(iconHeight?.[localActiveDevice]?.unit)}
     973                                defaultValues={{
     974                                    desktop: '',
     975                                        tablet: '',
     976                                        mobile: ''
     977                                    }}
     978                                />
     979
     980                                <ResponsiveRangeControl
     981                                    label={__("Icon Spacing", "digiblocks")}
     982                                    value={iconSpacing}
     983                                    onChange={(value) => setAttributes({ iconSpacing: value })}
     984                                    units={[
     985                                        { label: 'px', value: 'px' },
     986                                        { label: 'rem', value: 'rem' },
     987                                        { label: 'em', value: 'em' },
     988                                        { label: '%', value: '%' }
     989                                    ]}
     990                                    defaultUnit="rem"
     991                                    min={0}
     992                                    max={getMaxValue(iconSpacing?.[localActiveDevice]?.unit)}
     993                                    step={getStepValue(iconSpacing?.[localActiveDevice]?.unit)}
     994                                    defaultValues={{
     995                                        desktop: 0.8,
     996                                        tablet: '',
     997                                        mobile: ''
     998                                    }}
     999                                />
    9581000                           
    9591001                            {showLabels && (
    960                                 <ResponsiveControl
    961                                     label={__(
    962                                         "Label Spacing",
    963                                         "digiblocks"
    964                                     )}
    965                                 >
    966                                     <RangeControl
    967                                         value={labelSpacing[localActiveDevice]}
    968                                         onChange={(value) =>
    969                                             setAttributes({
    970                                                 labelSpacing: {
    971                                                     ...labelSpacing,
    972                                                     [localActiveDevice]: value,
    973                                                 },
    974                                             })
    975                                         }
    976                                         min={0}
    977                                         max={100}
    978                                         step={1}
    979                                         __next40pxDefaultSize={true}
    980                                         __nextHasNoMarginBottom={true}
    981                                     />
    982                                 </ResponsiveControl>
     1002                                <ResponsiveRangeControl
     1003                                    label={__("Label Spacing", "digiblocks")}
     1004                                    value={labelSpacing}
     1005                                    onChange={(value) => setAttributes({ labelSpacing: value })}
     1006                                    units={[
     1007                                        { label: 'px', value: 'px' },
     1008                                        { label: 'rem', value: 'rem' },
     1009                                        { label: 'em', value: 'em' },
     1010                                        { label: '%', value: '%' }
     1011                                    ]}
     1012                                    defaultUnit="rem"
     1013                                    min={0}
     1014                                    max={getMaxValue(labelSpacing?.[localActiveDevice]?.unit)}
     1015                                    step={getStepValue(labelSpacing?.[localActiveDevice]?.unit)}
     1016                                    defaultValues={{
     1017                                        desktop: 0.8,
     1018                                        tablet: '',
     1019                                        mobile: ''
     1020                                    }}
     1021                                />
    9831022                            )}
    9841023                           
     
    13281367                            className="digiblocks-social-icon-remove"
    13291368                            onClick={() => removeSocialIcon(index)}
    1330                             icon="no-alt"
    13311369                            isSmall
    13321370                            label={__('Remove', 'digiblocks')}
    1333                         />
     1371                        >
     1372                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="13" height="13" fill="currentColor"><path d="M135.5 169C126.1 159.6 126.1 144.4 135.5 135.1C144.9 125.8 160.1 125.7 169.4 135.1L320.4 286.1L471.4 135.1C480.8 125.7 496 125.7 505.3 135.1C514.6 144.5 514.7 159.7 505.3 169L354.3 320L505.3 471C514.7 480.4 514.7 495.6 505.3 504.9C495.9 514.2 480.7 514.3 471.4 504.9L320.4 353.9L169.4 504.9C160 514.3 144.8 514.3 135.5 504.9C126.2 495.5 126.1 480.3 135.5 471L286.5 320L135.5 169z"/></svg>
     1373                        </Button>
    13341374                    )}
    13351375                </div>
  • digiblocks/trunk/blocks/social-icons/index.js

    r3317829 r3346454  
    77import SocialIconsEdit from './edit';
    88import SocialIconsSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('social-icons') ? true : false,
    3332        html: false,
    3433        className: false,
     
    106105            ]
    107106        },
    108         iconSize: {
    109             type: 'object',
    110             default: {
    111                 desktop: 24,
    112                 tablet: 22,
    113                 mobile: 20
    114             }
    115         },
    116         iconSpacing: {
    117             type: 'object',
    118             default: {
    119                 desktop: 10,
    120                 tablet: 8,
    121                 mobile: 6
    122             }
    123         },
    124         labelSpacing: {
    125             type: 'object',
    126             default: {
    127                 desktop: 5,
    128                 tablet: 5,
    129                 mobile: 5
    130             }
    131         },
     107        iconWidth: {
     108            type: 'object',
     109            default: {
     110                desktop: { value: 1, unit: 'rem' },
     111                tablet: { value: '', unit: 'rem' },
     112                mobile: { value: '', unit: 'rem' }
     113            }
     114        },
     115        iconHeight: {
     116            type: 'object',
     117            default: {
     118                desktop: { value: 1, unit: 'rem' },
     119                tablet: { value: '', unit: 'rem' },
     120                mobile: { value: '', unit: 'rem' }
     121            }
     122        },
     123        iconSpacing: {
     124            type: 'object',
     125            default: {
     126                desktop: { value: 0.8, unit: 'rem' },
     127                tablet: { value: '', unit: 'rem' },
     128                mobile: { value: '', unit: 'rem' }
     129            }
     130        },
     131        labelSpacing: {
     132            type: 'object',
     133            default: {
     134                desktop: { value: 0.8, unit: 'rem' },
     135                tablet: { value: '', unit: 'rem' },
     136                mobile: { value: '', unit: 'rem' }
     137            }
     138        },
    132139        iconColor: {
    133140            type: 'string',
     
    206213            default: {
    207214                fontFamily: '',
    208                 fontSize: { desktop: 14, tablet: 13, mobile: 12 },
    209                 fontSizeUnit: 'px',
     215                fontSize: { desktop: 1, tablet: '', mobile: '' },
     216                fontSizeUnit: 'rem',
    210217                fontWeight: '',
    211218                fontStyle: 'normal',
    212219                textTransform: '',
    213220                textDecoration: '',
    214                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     221                lineHeight: { desktop: '', tablet: '', mobile: '' },
    215222                lineHeightUnit: 'em',
    216                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     223                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    217224                letterSpacingUnit: 'px'
    218225            }
     
    259266                }
    260267            ],
    261             iconSpacing: { desktop: 20 },
     268            iconSpacing: { desktop: { value: 1.25, unit: 'rem' } },
    262269            align: 'center',
    263270            iconColor: '#1e73be',
  • digiblocks/trunk/blocks/social-icons/styles.php

    r3317829 r3346454  
    1919];
    2020$icons                = isset( $attrs['icons'] ) ? $attrs['icons'] : array();
    21 $iconSize             = isset( $attrs['iconSize'] ) ? $attrs['iconSize'] : array(
    22     'desktop' => 24,
    23     'tablet'  => 22,
    24     'mobile'  => 20
    25 );
    26 $iconSpacing          = isset( $attrs['iconSpacing'] ) ? $attrs['iconSpacing'] : array(
    27     'desktop' => 10,
    28     'tablet'  => 8,
    29     'mobile'  => 6
     21$iconWidth = isset( $attrs['iconWidth'] ) ? $attrs['iconWidth'] : array(
     22    'desktop' => array( 'value' => 1, 'unit' => 'rem' ),
     23    'tablet'  => array( 'value' => '', 'unit' => 'rem' ),
     24    'mobile'  => array( 'value' => '', 'unit' => 'rem' ),
     25);
     26$iconHeight = isset( $attrs['iconHeight'] ) ? $attrs['iconHeight'] : array(
     27    'desktop' => array( 'value' => 1, 'unit' => 'rem' ),
     28    'tablet'  => array( 'value' => '', 'unit' => 'rem' ),
     29    'mobile'  => array( 'value' => '', 'unit' => 'rem' ),
     30);
     31$iconSpacing = isset( $attrs['iconSpacing'] ) ? $attrs['iconSpacing'] : array(
     32    'desktop' => array( 'value' => 0.8, 'unit' => 'rem' ),
     33    'tablet'  => array( 'value' => '', 'unit' => 'rem' ),
     34    'mobile'  => array( 'value' => '', 'unit' => 'rem' ),
    3035);
    3136$iconColor            = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#333333';
     
    6267$labelColor           = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : '';
    6368$labelHoverColor      = isset( $attrs['labelHoverColor'] ) ? $attrs['labelHoverColor'] : '';
    64 $labelSpacing         = isset( $attrs['labelSpacing'] ) ? $attrs['labelSpacing'] : array(
    65     'desktop' => 5,
    66     'tablet'  => 5,
    67     'mobile'  => 5
     69$labelSpacing = isset( $attrs['labelSpacing'] ) ? $attrs['labelSpacing'] : array(
     70    'desktop' => array( 'value' => 0.8, 'unit' => 'rem' ),
     71    'tablet'  => array( 'value' => '', 'unit' => 'rem' ),
     72    'mobile'  => array( 'value' => '', 'unit' => 'rem' ),
    6873);
    6974$align                = isset( $attrs['align'] ) ? $attrs['align'] : [
     
    109114    display: flex;
    110115    flex-wrap: wrap;
    111     gap: <?php echo esc_attr( $iconSpacing['desktop'] ); ?>px;
     116    gap: <?php echo esc_attr( $iconSpacing['desktop']['value'] ? $iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit'] : '0.8rem' ); ?>;
    112117    justify-content: <?php echo esc_attr( $align['desktop'] ); ?>;
    113118}
     
    118123    text-decoration: none;
    119124    <?php if ( $labelSpacing && isset( $labelSpacing['desktop'] ) ) : ?>
    120         gap: <?php echo esc_attr( $labelSpacing['desktop'] ); ?>px;
     125        gap: <?php echo esc_attr( $labelSpacing['desktop']['value'] ? $labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit'] : '0.8rem' ); ?>;
    121126    <?php endif; ?>
    122127}
     
    147152
    148153.<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg {
    149     width: <?php echo esc_attr( $iconSize['desktop'] ); ?>px;
    150     height: <?php echo esc_attr( $iconSize['desktop'] ); ?>px;
     154    width: <?php echo esc_attr( $iconWidth['desktop']['value'] ? $iconWidth['desktop']['value'] . $iconWidth['desktop']['unit'] : '1rem' ); ?>;
     155    height: <?php echo esc_attr( $iconHeight['desktop']['value'] ? $iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'] : '1rem' ); ?>;
    151156    fill: <?php echo esc_attr( $iconColor ); ?>;
    152157    transition: all 0.3s ease;
     
    234239@media (max-width: 991px) {
    235240    .<?php echo esc_attr( $id ); ?> {
    236         gap: <?php echo esc_attr( isset( $iconSpacing['tablet'] ) ? $iconSpacing['tablet'] : $iconSpacing['desktop'] ); ?>px;
     241        gap: <?php echo esc_attr( $iconSpacing['tablet']['value'] ? $iconSpacing['tablet']['value'] . $iconSpacing['tablet']['unit'] : ($iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit']) ); ?>;
    237242        <?php if ( ! empty( $align['tablet'] ) ) : ?>
    238243        justify-content: <?php echo esc_attr( $align['tablet'] ); ?>;
     
    242247    <?php if ( $labelSpacing && isset( $labelSpacing['tablet'] ) ) : ?>
    243248        .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon {
    244             gap: <?php echo esc_attr( isset( $labelSpacing['tablet'] ) ? $labelSpacing['tablet'] : $labelSpacing['desktop'] ); ?>px;
     249            gap: <?php echo esc_attr( $labelSpacing['tablet']['value'] ? $labelSpacing['tablet']['value'] . $labelSpacing['tablet']['unit'] : ($labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit']) ); ?>;
    245250        }
    246251    <?php endif; ?>
     
    259264
    260265    .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg {
    261         width: <?php echo esc_attr( isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop'] ); ?>px;
    262         height: <?php echo esc_attr( isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop'] ); ?>px;
     266        width: <?php echo esc_attr( $iconWidth['tablet']['value'] ? $iconWidth['tablet']['value'] . $iconWidth['tablet']['unit'] : ($iconWidth['desktop']['value'] . $iconWidth['desktop']['unit']) ); ?>;
     267        height: <?php echo esc_attr( $iconHeight['tablet']['value'] ? $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] : ($iconHeight['desktop']['value'] . $iconHeight['desktop']['unit']) ); ?>;
    263268    }
    264269   
     
    281286@media (max-width: 767px) {
    282287    .<?php echo esc_attr( $id ); ?> {
    283         gap: <?php echo esc_attr( isset( $iconSpacing['mobile'] ) ? $iconSpacing['mobile'] : (isset( $iconSpacing['tablet'] ) ? $iconSpacing['tablet'] : $iconSpacing['desktop']) ); ?>px;
     288        gap: <?php echo esc_attr( $iconSpacing['mobile']['value'] ? $iconSpacing['mobile']['value'] . $iconSpacing['mobile']['unit'] : ($iconSpacing['tablet']['value'] ? $iconSpacing['tablet']['value'] . $iconSpacing['tablet']['unit'] : ($iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit'])) ); ?>;
    284289        <?php if ( ! empty( $align['mobile'] ) ) : ?>
    285290        justify-content: <?php echo esc_attr( $align['mobile'] ); ?>;
     
    289294    <?php if ( $labelSpacing && isset( $labelSpacing['mobile'] ) ) : ?>
    290295        .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon {
    291             gap: <?php echo esc_attr( isset( $labelSpacing['mobile'] ) ? $labelSpacing['mobile'] : (isset( $labelSpacing['tablet'] ) ? $labelSpacing['tablet'] : $labelSpacing['desktop']) ); ?>px;
     296            gap: <?php echo esc_attr( $labelSpacing['mobile']['value'] ? $labelSpacing['mobile']['value'] . $labelSpacing['mobile']['unit'] : ($labelSpacing['tablet']['value'] ? $labelSpacing['tablet']['value'] . $labelSpacing['tablet']['unit'] : ($labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit'])) ); ?>;
    292297        }
    293298    <?php endif; ?>
     
    306311
    307312    .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg {
    308         width: <?php echo esc_attr( isset( $iconSize['mobile'] ) ? $iconSize['mobile'] : (isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop']) ); ?>px;
    309         height: <?php echo esc_attr( isset( $iconSize['mobile'] ) ? $iconSize['mobile'] : (isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop']) ); ?>px;
     313        width: <?php echo esc_attr( $iconWidth['mobile']['value'] ? $iconWidth['mobile']['value'] . $iconWidth['mobile']['unit'] : ($iconWidth['tablet']['value'] ? $iconWidth['tablet']['value'] . $iconWidth['tablet']['unit'] : ($iconWidth['desktop']['value'] . $iconWidth['desktop']['unit'])) ); ?>;
     314        height: <?php echo esc_attr( $iconHeight['mobile']['value'] ? $iconHeight['mobile']['value'] . $iconHeight['mobile']['unit'] : ($iconHeight['tablet']['value'] ? $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] : ($iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'])) ); ?>;
    310315    }
    311316   
  • digiblocks/trunk/blocks/spacer/index.js

    r3317829 r3346454  
    77import SpacerEdit from './edit';
    88import SpacerSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('spacer', 'digiblocks'), __('gap', 'digiblocks'), __('spacing', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('spacer') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/table/edit.js

    r3317829 r3346454  
    808808            }
    809809           
     810            .${id} .digiblocks-table .digiblocks-cell-warning {
     811                color: #dca236;
     812            }
     813           
    810814            .${id} .digiblocks-table .digiblocks-cell-cross {
    811815                color: #dc3545;
     
    850854            .${id} .digiblocks-cell-controls-buttons .digiblocks-cell-control-check-button {
    851855                color: #28a745;
     856            }
     857
     858            .${id} .digiblocks-cell-controls-buttons .digiblocks-cell-control-warning-button {
     859                color: #dca236;
    852860            }
    853861
     
    990998                                clearCellControl(selectedCell.row, selectedCell.col, 'stars');
    991999                                setCellControl(selectedCell.row, selectedCell.col, 'icon', 'check');
     1000                            }}
     1001                        />
     1002                        <Button
     1003                            className="digiblocks-cell-control-warning-button"
     1004                            icon={() => (
     1005                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg>
     1006                            )}
     1007                            label={__("Add Warning", "digiblocks")}
     1008                            onClick={() => {
     1009                                // Clear existing stars control first
     1010                                clearCellControl(selectedCell.row, selectedCell.col, 'stars');
     1011                                setCellControl(selectedCell.row, selectedCell.col, 'icon', 'warning');
    9921012                            }}
    9931013                        />
     
    10851105                        </span>
    10861106                    );
     1107                case 'warning':
     1108                    return (
     1109                        <span className="digiblocks-cell-icon digiblocks-cell-warning">
     1110                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg>
     1111                        </span>
     1112                    );
    10871113                case 'cross':
    10881114                    return (
     
    19862012            <div {...blockProps}>
    19872013                <div className="digiblocks-table-instructions">
    1988                     <p>{__("Click on any cell to select it and add icons, checks, crosses, or star ratings.", "digiblocks")}</p>
     2014                    <p>{__("Click on any cell to select it and add icons, checks, warnings, crosses, or star ratings.", "digiblocks")}</p>
    19892015                </div>
    19902016               
  • digiblocks/trunk/blocks/table/index.js

    r3317829 r3346454  
    77import TableEdit from './edit';
    88import TableSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('table', 'digiblocks'), __('comparison', 'digiblocks'), __('grid', 'digiblocks'), __('cells', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('table') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/table/save.js

    r3317829 r3346454  
    5959                        </span>
    6060                    );
     61                case 'warning':
     62                    return (
     63                        <span className="digiblocks-cell-icon digiblocks-cell-warning">
     64                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg>
     65                        </span>
     66                    );
    6167                case 'cross':
    6268                    return (
  • digiblocks/trunk/blocks/table/styles.php

    r3317829 r3346454  
    470470}
    471471
     472.<?php echo esc_attr( $id ); ?> .digiblocks-table .digiblocks-cell-warning {
     473    color: #dca236;
     474}
     475
    472476.<?php echo esc_attr( $id ); ?> .digiblocks-table .digiblocks-cell-cross {
    473477    color: #dc3545;
  • digiblocks/trunk/blocks/team/index.js

    r3317829 r3346454  
    77import TeamEdit from './edit';
    88import TeamSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    2929    keywords: [__('team', 'digiblocks'), __('members', 'digiblocks'), __('staff', 'digiblocks'), __('people', 'digiblocks')],
    3030    supports: {
    31         inserter: getBlockActiveStatus('team') ? true : false,
    3231        html: false,
    3332        className: false,
  • digiblocks/trunk/blocks/testimonials/index.js

    r3317829 r3346454  
    77import TestimonialsEdit from './edit';
    88import TestimonialsSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable all default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('testimonials') ? true : false,
    3332        html: false,
    3433        className: false,
  • digiblocks/trunk/blocks/text/edit.js

    r3317829 r3346454  
    557557                                }
    558558                                defaults={{
    559                                     fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     559                                    fontSize: { desktop: '', tablet: '', mobile: '' },
    560560                                    fontSizeUnit: 'px',
    561                                     lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     561                                    lineHeight: { desktop: '', tablet: '', mobile: '' },
    562562                                    lineHeightUnit: 'em',
    563563                                }}
     
    936936                    value={content}
    937937                    onChange={(value) => setAttributes({ content: value })}
    938                     placeholder={__("Start writing or type / to add blocks", "digiblocks")}
     938                    placeholder={__("Start writing your content", "digiblocks")}
    939939                    allowedFormats={['core/bold', 'core/italic', 'core/link', 'core/strikethrough', 'core/underline', 'core/text-color', 'core/code', 'core/superscript', 'core/subscript']}
    940940                />
  • digiblocks/trunk/blocks/text/index.js

    r3317829 r3346454  
    77import TextEdit from './edit';
    88import TextSave from './save';
    9 const { getBlockActiveStatus } = wp.digiBlocks;
     9
    1010
    1111/**
     
    3030    // Disable default controls and settings panels
    3131    supports: {
    32         inserter: getBlockActiveStatus('text') ? true : false,
    3332        html: false,
    3433        className: false,
     
    8382        textColor: {
    8483            type: 'string',
    85             default: '#333333'
     84            default: ''
    8685        },
    8786        textHoverColor: {
     
    105104            default: {
    106105                fontFamily: '',
    107                 fontSize: { desktop: 16, tablet: 15, mobile: 14 },
     106                fontSize: { desktop: '', tablet: '', mobile: '' },
    108107                fontSizeUnit: 'px',
    109108                fontWeight: '',
     
    111110                textTransform: '',
    112111                textDecoration: '',
    113                 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3 },
     112                lineHeight: { desktop: '', tablet: '', mobile: '' },
    114113                lineHeightUnit: 'em',
    115                 letterSpacing: { desktop: 0, tablet: 0, mobile: 0 },
     114                letterSpacing: { desktop: '', tablet: '', mobile: '' },
    116115                letterSpacingUnit: 'px'
    117116            }
  • digiblocks/trunk/blocks/text/styles.php

    r3317829 r3346454  
    1818    'mobile'  => false,
    1919];
    20 $textColor                    = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#333333';
     20$textColor                    = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '';
    2121$textHoverColor               = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : '';
    2222$backgroundColor              = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '';
     
    173173    'fontFamily'        => '',
    174174    'fontSize'          => array(
    175         'desktop' => 16,
    176         'tablet'  => 15,
    177         'mobile'  => 14,
     175        'desktop' => '',
     176        'tablet'  => '',
     177        'mobile'  => '',
    178178    ),
    179179    'fontSizeUnit'      => 'px',
     
    183183    'textDecoration'    => '',
    184184    'lineHeight'        => array(
    185         'desktop' => 1.5,
    186         'tablet'  => 1.4,
    187         'mobile'  => 1.3,
     185        'desktop' => '',
     186        'tablet'  => '',
     187        'mobile'  => '',
    188188    ),
    189189    'lineHeightUnit'    => 'em',
    190190    'letterSpacing'     => array(
    191         'desktop' => 0,
    192         'tablet'  => 0,
    193         'mobile'  => 0,
     191        'desktop' => '',
     192        'tablet'  => '',
     193        'mobile'  => '',
    194194    ),
    195195    'letterSpacingUnit' => 'px',
     
    202202.<?php echo esc_attr( $id ); ?> {
    203203    text-align: <?php echo esc_attr( $align['desktop'] ); ?>;
     204    <?php if ( ! empty( $textColor ) ) : ?>
    204205    color: <?php echo esc_attr( $textColor ); ?>;
     206    <?php endif; ?>
    205207   
    206208    <?php if ( $backgroundGradient && 'none' !== $backgroundGradient ) : ?>
     
    326328        <?php endif; ?>
    327329       
    328         <?php if ( isset( $typography['fontSize']['tablet']) || isset( $typography['lineHeight']['tablet']) || isset( $typography['letterSpacing']['tablet'] ) ) : ?>
    329             <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>
     330        <?php if ( ! empty( $typography['fontSize']['tablet']) || ! empty( $typography['lineHeight']['tablet']) || ! empty( $typography['letterSpacing']['tablet'] ) ) : ?>
     331            <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?>
    330332                font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    331333            <?php endif; ?>
    332             <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>
     334            <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?>
    333335                line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    334336            <?php endif; ?>
    335             <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>
     337            <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?>
    336338                letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    337339            <?php endif; ?>
     
    369371        <?php endif; ?>
    370372       
    371         <?php if ( isset( $typography['fontSize']['mobile']) || isset( $typography['lineHeight']['mobile']) || isset( $typography['letterSpacing']['mobile'] ) ) : ?>
    372             <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>
     373        <?php if ( ! empty( $typography['fontSize']['mobile']) || ! empty( $typography['lineHeight']['mobile']) || ! empty( $typography['letterSpacing']['mobile'] ) ) : ?>
     374            <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?>
    373375                font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>;
    374376            <?php endif; ?>
    375             <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>
     377            <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?>
    376378                line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>;
    377379            <?php endif; ?>
    378             <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>
     380            <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?>
    379381                letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>;
    380382            <?php endif; ?>
  • digiblocks/trunk/digiblocks.php

    r3317829 r3346454  
    44 * Plugin URI: https://digiblocks.me/
    55 * Description: A collection of beautiful custom Gutenberg blocks for WordPress.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: DigiHold
    88 * Author URI: https://digihold.me?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=digiblocks
     
    2626// Define constants.
    2727if ( ! defined( 'DIGIBLOCKS_VERSION' ) ) {
    28     define( 'DIGIBLOCKS_VERSION', '1.0.0' );
     28    define( 'DIGIBLOCKS_VERSION', '1.0.1' );
    2929}
    3030if ( ! defined( 'DIGIBLOCKS_PLUGIN_DIR' ) ) {
  • digiblocks/trunk/includes/class-digiblocks-blocks-data.php

    r3317829 r3346454  
    167167                'description' => __( 'Create beautiful pricing tables with multiple plans and features.', 'digiblocks' ),
    168168            ),
     169            'row' => array(
     170                'title'       => __( 'Row', 'digiblocks' ),
     171                'icon'        => array(
     172                    'viewbox' => '580 512',
     173                    'path'    => 'M264.53,48v416c0,4.4-1.8,8.4-4.7,11.3-2.9,2.9-6.9,4.7-11.3,4.7H50c-8.8,0-16-7.2-16-16,0-4.4,1.8-8.4,4.7-11.3,2.9-2.9,6.9-4.7,11.3-4.7h182.53V64H50c-8.8,0-16-7.2-16-16,0-4.4,1.8-8.4,4.7-11.3,2.9-2.9,6.9-4.7,11.3-4.7h198.53c4.4,0,8.4,1.8,11.3,4.7s4.7,6.9,4.7,11.3ZM530,448h-182.53V64h182.53c8.8,0,16-7.2,16-16,0-4.4-1.8-8.4-4.7-11.3-2.9-2.9-6.9-4.7-11.3-4.7h-198.53c-4.4,0-8.4,1.8-11.3,4.7-2.9,2.9-4.7,6.9-4.7,11.3v416c0,4.4,1.8,8.4,4.7,11.3s6.9,4.7,11.3,4.7h198.53c8.8,0,16-7.2,16-16,0-4.4-1.8-8.4-4.7-11.3s-6.9-4.7-11.3-4.7Z',
     174                ),
     175                'description' => __( 'Create horizontal layouts with flexible alignment and spacing controls.', 'digiblocks' ),
     176            ),
    169177            'separator' => array(
    170178                'title'       => __( 'Separator', 'digiblocks' ),
  • digiblocks/trunk/includes/class-digiblocks.php

    r3317829 r3346454  
    8787        // Enqueue assets.
    8888        add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) );
    89 
     89       
    9090        // Enqueue admin scripts.
    9191        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
     
    106106        add_action( 'wp_trash_post', array( $this, 'clear_reusable_cache_on_delete' ), 10, 1 );
    107107        add_action( 'untrash_post', array( $this, 'clear_reusable_cache_on_save' ), 10, 1 );
     108       
     109        // Allow DigiBlocks text block in excerpts
     110        add_filter( 'excerpt_allowed_blocks', array( $this, 'allow_digiblocks_in_excerpts' ) );
    108111
    109112        // Enqueue block assets on frontend
     
    118121        // Initialize conditional handlers
    119122        add_action( 'init', array( $this, 'init_conditional_handlers' ) );
     123
     124        if ( wp_is_block_theme() ) {
     125            // Watch for template modifications
     126            add_action( 'wp_after_insert_post', array( $this, 'handle_template_modification' ), 10, 4 );
     127            add_action( 'delete_post', array( $this, 'handle_template_deletion' ), 10, 2 );
     128        }
    120129
    121130        // Custom footer
     
    295304       
    296305        self::$reusable_processing_cache[ $cache_key ] = $result;
     306    }
     307
     308    /**
     309     * Allow DigiBlocks text block in excerpts
     310     *
     311     * @param array $allowed_blocks Array of allowed block types for excerpts
     312     * @return array Modified array with DigiBlocks text block added
     313     */
     314    public function allow_digiblocks_in_excerpts( $allowed_blocks ) {
     315        // Add our text block to the allowed blocks list
     316        $allowed_blocks[] = 'digiblocks/text';
     317       
     318        return $allowed_blocks;
    297319    }
    298320
     
    500522                <div class="digiblocks-promo-product">
    501523                    <div class="digiblocks-promo-logo">
    502                         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1693 350" width="150" height="33"><g><path d="M426.4603,249.9932V108.5933h69.6904c15.7559,0,29.624,2.8628,41.6123,8.585,11.9844,5.7256,21.3418,13.8369,28.0771,24.3408,6.7324,10.5039,10.1006,23.0283,10.1006,37.5728,0,14.6797-3.3682,27.3047-10.1006,37.875-6.7354,10.5732-16.0928,18.7197-28.0771,24.4414-11.9883,5.7256-25.8564,8.585-41.6123,8.585h-69.6904ZM474.1322,212.8252h19.998c6.7324,0,12.625-1.2783,17.6758-3.8379,5.0498-2.5566,8.9883-6.3633,11.8164-11.4131s4.2422-11.2109,4.2422-18.4824c0-7.1367-1.4141-13.1968-4.2422-18.1807-2.8281-4.9805-6.7666-8.7524-11.8164-11.312-5.0508-2.5566-10.9434-3.8379-17.6758-3.8379h-19.998v67.064Z" fill="#2c3e50"/><path d="M593.3099,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M737.3344,253.2256c-11.4473,0-21.9863-1.7861-31.6133-5.3535-9.6289-3.5664-17.9775-8.6514-25.0479-15.251-7.0693-6.5967-12.5586-14.4082-16.4629-23.4316-3.9072-9.0205-5.8574-18.9883-5.8574-29.8965s1.9502-20.8721,5.8574-29.896c3.9043-9.0205,9.4248-16.832,16.5645-23.4316,7.1357-6.5967,15.585-11.6816,25.3506-15.251,9.7627-3.5669,20.5029-5.353,32.2188-5.353,14.0049,0,26.4941,2.3574,37.4717,7.0698,10.9736,4.7153,20.0293,11.4478,27.1689,20.2002l-30.502,26.8657c-4.4443-5.1162-9.2607-8.9888-14.4434-11.6147-5.1855-2.626-10.9424-3.939-17.2705-3.939-5.252,0-9.999.8076-14.2412,2.4238s-7.8467,3.9736-10.8076,7.0698c-2.9629,3.0996-5.252,6.8018-6.8672,11.1104-1.6162,4.311-2.4248,9.2256-2.4248,14.7456,0,5.252.8086,10.0693,2.4248,14.4434,1.6152,4.3779,3.9043,8.1152,6.8672,11.2109,2.9609,3.0996,6.4961,5.4893,10.6055,7.1709,4.1064,1.6855,8.7178,2.5254,13.8369,2.5254,5.3848,0,10.6367-.9092,15.7559-2.7275,5.1162-1.8174,10.5703-4.9482,16.3623-9.3926l26.6641,32.7236c-8.6201,5.792-18.4512,10.2363-29.4922,13.332-11.0439,3.0967-21.75,4.6465-32.1182,4.6465ZM757.5346,229.1875v-53.7324h41.4102v59.792l-41.4102-6.0596Z" fill="#2c3e50"/><path d="M819.3461,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M937.7152,249.9932h-47.6719V108.5933h114.9385v35.9561h-67.2666v105.4438ZM934.4838,168.7891h62.2158v35.9561h-62.2158v-35.9561Z" fill="#2c3e50"/><path d="M1087.8012,253.2256c-21.6826,0-38.582-5.8584-50.7012-17.5742-12.1201-11.7158-18.1807-28.1445-18.1807-49.2881v-77.77h47.6719v76.356c0,10.7754,1.9512,18.417,5.8584,22.9268,3.9043,4.5137,9.1562,6.7676,15.7559,6.7676,6.7324,0,12.0195-2.2539,15.8574-6.7676,3.8379-4.5098,5.7568-12.1514,5.7568-22.9268v-76.356h46.8643v77.77c0,21.1436-6.0605,37.5723-18.1807,49.2881s-29.0215,17.5742-50.7021,17.5742Z" fill="#2c3e50"/><path d="M1231.2211,253.2256c-11.8516,0-23.2998-1.3477-34.3398-4.04-11.0439-2.6924-20.1338-6.1924-27.2705-10.5039l15.3516-34.7441c6.7324,3.9072,14.2412,7.0381,22.5234,9.3926,8.2822,2.3584,16.3271,3.5352,24.1387,3.5352,4.5771,0,8.1816-.3027,10.8076-.9092,2.626-.6055,4.5449-1.4795,5.7568-2.626,1.2119-1.1426,1.8184-2.5244,1.8184-4.1406,0-2.5566-1.4141-4.5762-4.2422-6.0596-2.8281-1.4805-6.5654-2.7275-11.2109-3.7373-4.6465-1.0098-9.7314-2.0869-15.251-3.2324-5.5234-1.1426-11.0791-2.6572-16.665-4.5449-5.5898-1.8838-10.7061-4.374-15.3525-7.4736-4.6455-3.0967-8.3828-7.1709-11.2109-12.2217-2.8281-5.0498-4.2422-11.3433-4.2422-18.8867,0-8.7524,2.4561-16.7314,7.373-23.937,4.915-7.2026,12.2529-12.9595,22.0186-17.271,9.7617-4.3081,21.917-6.4639,36.4609-6.4639,9.5605,0,18.9883,1.0098,28.2803,3.0298s17.6396,5.1196,25.0479,9.292l-14.3428,34.542c-7.0029-3.5-13.7705-6.1265-20.3008-7.8779-6.5332-1.7485-12.8965-2.626-19.0889-2.626-4.5801,0-8.2158.4038-10.9082,1.2119-2.6953.8081-4.6143,1.8877-5.7568,3.2319-1.1455,1.3477-1.7168,2.8281-1.7168,4.4443,0,2.4238,1.4141,4.3428,4.2422,5.7568s6.5645,2.5942,11.2109,3.5352c4.6455.9434,9.7617,1.9536,15.3516,3.0298,5.5869,1.0796,11.1416,2.5596,16.665,4.4438,5.5205,1.8877,10.6055,4.3779,15.251,7.4741,4.6465,3.1001,8.3828,7.1401,11.2109,12.1206,2.8281,4.9834,4.2422,11.1787,4.2422,18.584,0,8.6191-2.459,16.5322-7.373,23.7344-4.917,7.2061-12.2207,12.998-21.917,17.3721-9.6963,4.375-21.8857,6.5654-36.5615,6.5654Z" fill="#2c3e50"/><path d="M1311.2123,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M1456.2465,253.2256c-11.583,0-22.2539-1.8184-32.0166-5.4541-9.7656-3.6357-18.2148-8.7871-25.3506-15.4531-7.1396-6.666-12.6953-14.5088-16.665-23.5332-3.9736-9.0205-5.959-18.8516-5.959-29.4922,0-10.772,1.9854-20.6353,5.959-29.5928,3.9697-8.9541,9.5254-16.7661,16.665-23.4321,7.1357-6.666,15.585-11.8169,25.3506-15.4531,9.7627-3.6357,20.3672-5.4536,31.8154-5.4536,11.5801,0,22.2197,1.8179,31.916,5.4536,9.6953,3.6362,18.1104,8.7871,25.25,15.4531,7.1357,6.666,12.6904,14.478,16.6641,23.4321,3.9707,8.9575,5.96,18.8208,5.96,29.5928,0,10.6406-1.9893,20.4717-5.96,29.4922-3.9736,9.0244-9.5283,16.8672-16.6641,23.5332-7.1396,6.666-15.5547,11.8174-25.25,15.4531-9.6963,3.6357-20.2695,5.4541-31.7148,5.4541ZM1456.0453,214.6436c4.4434,0,8.585-.8086,12.4229-2.4238,3.8379-1.6162,7.2021-3.9395,10.0996-6.9697,2.8945-3.0293,5.1514-6.7314,6.7676-11.1094,1.6152-4.375,2.4238-9.3242,2.4238-14.8477,0-5.52-.8086-10.4692-2.4238-14.8467-1.6162-4.3745-3.873-8.0801-6.7676-11.1104-2.8975-3.0298-6.2617-5.3525-10.0996-6.9688s-7.9795-2.4238-12.4229-2.4238-8.585.8076-12.4238,2.4238c-3.8379,1.6162-7.2051,3.939-10.0996,6.9688-2.8975,3.0303-5.1514,6.7358-6.7666,11.1104-1.6162,4.3774-2.4248,9.3267-2.4248,14.8467,0,5.5234.8086,10.4727,2.4248,14.8477,1.6152,4.3779,3.8691,8.0801,6.7666,11.1094,2.8945,3.0303,6.2617,5.3535,10.0996,6.9697,3.8389,1.6152,7.9795,2.4238,12.4238,2.4238Z" fill="#2c3e50"/><path d="M1553.2045,249.9932V108.5933h39.1885l71.9121,86.0522h-18.1807v-86.0522h46.46v141.3999h-39.1875l-71.9121-86.0518h18.1797v86.0518h-46.46Z" fill="#2c3e50"/></g><g><circle cx="175.4613" cy="175" r="175" fill="#e74c3c"/><polygon points="246.7033 149.4986 176.332 149.4986 211.4184 53.5342 104.2193 200.5014 174.5906 200.5014 139.5043 296.4658 246.7033 149.4986" fill="#ffd83b"/></g></svg>
     524                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1694 350" width="150" height="33"><path d="M426.999,249.9932V108.5933h69.6904c15.7559,0,29.624,2.8628,41.6123,8.585,11.9844,5.7256,21.3418,13.8369,28.0771,24.3408,6.7324,10.5039,10.1006,23.0283,10.1006,37.5728,0,14.6797-3.3682,27.3047-10.1006,37.875-6.7354,10.5732-16.0928,18.7197-28.0771,24.4414-11.9883,5.7256-25.8564,8.585-41.6123,8.585h-69.6904ZM474.6709,212.8252h19.998c6.7324,0,12.625-1.2783,17.6758-3.8379,5.0498-2.5566,8.9883-6.3633,11.8164-11.4131s4.2422-11.2109,4.2422-18.4824c0-7.1367-1.4141-13.1968-4.2422-18.1807-2.8281-4.9805-6.7666-8.7524-11.8164-11.312-5.0508-2.5566-10.9434-3.8379-17.6758-3.8379h-19.998v67.064Z" fill="#27293b"></path><path d="M593.8486,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M737.873,253.2256c-11.4473,0-21.9863-1.7861-31.6133-5.3535-9.6289-3.5664-17.9775-8.6514-25.0479-15.251-7.0693-6.5967-12.5586-14.4082-16.4629-23.4316-3.9072-9.0205-5.8574-18.9883-5.8574-29.8965s1.9502-20.8721,5.8574-29.896c3.9043-9.0205,9.4248-16.832,16.5645-23.4316,7.1357-6.5967,15.585-11.6816,25.3506-15.251,9.7627-3.5669,20.5029-5.353,32.2188-5.353,14.0049,0,26.4941,2.3574,37.4717,7.0698,10.9736,4.7153,20.0293,11.4478,27.1689,20.2002l-30.502,26.8657c-4.4443-5.1162-9.2607-8.9888-14.4434-11.6147-5.1855-2.626-10.9424-3.939-17.2705-3.939-5.252,0-9.999.8076-14.2412,2.4238s-7.8467,3.9736-10.8076,7.0698c-2.9629,3.0996-5.252,6.8018-6.8672,11.1104-1.6162,4.311-2.4248,9.2256-2.4248,14.7456,0,5.252.8086,10.0693,2.4248,14.4434,1.6152,4.3779,3.9043,8.1152,6.8672,11.2109,2.9609,3.0996,6.4961,5.4893,10.6055,7.1709,4.1064,1.6855,8.7178,2.5254,13.8369,2.5254,5.3848,0,10.6367-.9092,15.7559-2.7275,5.1162-1.8174,10.5703-4.9482,16.3623-9.3926l26.6641,32.7236c-8.6201,5.792-18.4512,10.2363-29.4922,13.332-11.0439,3.0967-21.75,4.6465-32.1182,4.6465ZM758.0732,229.1875v-53.7324h41.4102v59.792l-41.4102-6.0596Z" fill="#27293b"></path><path d="M819.8848,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M938.2539,249.9932h-47.6719V108.5933h114.9385v35.9561h-67.2666v105.4438ZM935.0225,168.7891h62.2158v35.9561h-62.2158v-35.9561Z" fill="#27293b"></path><path d="M1088.3398,253.2256c-21.6826,0-38.582-5.8584-50.7012-17.5742-12.1201-11.7158-18.1807-28.1445-18.1807-49.2881v-77.77h47.6719v76.356c0,10.7754,1.9512,18.417,5.8584,22.9268,3.9043,4.5137,9.1562,6.7676,15.7559,6.7676,6.7324,0,12.0195-2.2539,15.8574-6.7676,3.8379-4.5098,5.7568-12.1514,5.7568-22.9268v-76.356h46.8643v77.77c0,21.1436-6.0605,37.5723-18.1807,49.2881s-29.0215,17.5742-50.7021,17.5742Z" fill="#27293b"></path><path d="M1231.7598,253.2256c-11.8516,0-23.2998-1.3477-34.3398-4.04-11.0439-2.6924-20.1338-6.1924-27.2705-10.5039l15.3516-34.7441c6.7324,3.9072,14.2412,7.0381,22.5234,9.3926,8.2822,2.3584,16.3271,3.5352,24.1387,3.5352,4.5771,0,8.1816-.3027,10.8076-.9092,2.626-.6055,4.5449-1.4795,5.7568-2.626,1.2119-1.1426,1.8184-2.5244,1.8184-4.1406,0-2.5566-1.4141-4.5762-4.2422-6.0596-2.8281-1.4805-6.5654-2.7275-11.2109-3.7373-4.6465-1.0098-9.7314-2.0869-15.251-3.2324-5.5234-1.1426-11.0791-2.6572-16.665-4.5449-5.5898-1.8838-10.7061-4.374-15.3525-7.4736-4.6455-3.0967-8.3828-7.1709-11.2109-12.2217-2.8281-5.0498-4.2422-11.3433-4.2422-18.8867,0-8.7524,2.4561-16.7314,7.373-23.937,4.915-7.2026,12.2529-12.9595,22.0186-17.271,9.7617-4.3081,21.917-6.4639,36.4609-6.4639,9.5605,0,18.9883,1.0098,28.2803,3.0298s17.6396,5.1196,25.0479,9.292l-14.3428,34.542c-7.0029-3.5-13.7705-6.1265-20.3008-7.8779-6.5332-1.7485-12.8965-2.626-19.0889-2.626-4.5801,0-8.2158.4038-10.9082,1.2119-2.6953.8081-4.6143,1.8877-5.7568,3.2319-1.1455,1.3477-1.7168,2.8281-1.7168,4.4443,0,2.4238,1.4141,4.3428,4.2422,5.7568s6.5645,2.5942,11.2109,3.5352c4.6455.9434,9.7617,1.9536,15.3516,3.0298,5.5869,1.0796,11.1416,2.5596,16.665,4.4438,5.5205,1.8877,10.6055,4.3779,15.251,7.4741,4.6465,3.1001,8.3828,7.1401,11.2109,12.1206,2.8281,4.9834,4.2422,11.1787,4.2422,18.584,0,8.6191-2.459,16.5322-7.373,23.7344-4.917,7.2061-12.2207,12.998-21.917,17.3721-9.6963,4.375-21.8857,6.5654-36.5615,6.5654Z" fill="#27293b"></path><path d="M1311.751,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M1456.7852,253.2256c-11.583,0-22.2539-1.8184-32.0166-5.4541-9.7656-3.6357-18.2148-8.7871-25.3506-15.4531-7.1396-6.666-12.6953-14.5088-16.665-23.5332-3.9736-9.0205-5.959-18.8516-5.959-29.4922,0-10.772,1.9854-20.6353,5.959-29.5928,3.9697-8.9541,9.5254-16.7661,16.665-23.4321,7.1357-6.666,15.585-11.8169,25.3506-15.4531,9.7627-3.6357,20.3672-5.4536,31.8154-5.4536,11.5801,0,22.2197,1.8179,31.916,5.4536,9.6953,3.6362,18.1104,8.7871,25.25,15.4531,7.1357,6.666,12.6904,14.478,16.6641,23.4321,3.9707,8.9575,5.96,18.8208,5.96,29.5928,0,10.6406-1.9893,20.4717-5.96,29.4922-3.9736,9.0244-9.5283,16.8672-16.6641,23.5332-7.1396,6.666-15.5547,11.8174-25.25,15.4531-9.6963,3.6357-20.2695,5.4541-31.7148,5.4541ZM1456.584,214.6436c4.4434,0,8.585-.8086,12.4229-2.4238,3.8379-1.6162,7.2021-3.9395,10.0996-6.9697,2.8945-3.0293,5.1514-6.7314,6.7676-11.1094,1.6152-4.375,2.4238-9.3242,2.4238-14.8477,0-5.52-.8086-10.4692-2.4238-14.8467-1.6162-4.3745-3.873-8.0801-6.7676-11.1104-2.8975-3.0298-6.2617-5.3525-10.0996-6.9688s-7.9795-2.4238-12.4229-2.4238-8.585.8076-12.4238,2.4238c-3.8379,1.6162-7.2051,3.939-10.0996,6.9688-2.8975,3.0303-5.1514,6.7358-6.7666,11.1104-1.6162,4.3774-2.4248,9.3267-2.4248,14.8467,0,5.5234.8086,10.4727,2.4248,14.8477,1.6152,4.3779,3.8691,8.0801,6.7666,11.1094,2.8945,3.0303,6.2617,5.3535,10.0996,6.9697,3.8389,1.6152,7.9795,2.4238,12.4238,2.4238Z" fill="#27293b"></path><path d="M1553.7432,249.9932V108.5933h39.1885l71.9121,86.0522h-18.1807v-86.0522h46.46v141.3999h-39.1875l-71.9121-86.0518h18.1797v86.0518h-46.46Z" fill="#27293b"></path><path d="M51.8626,51.2563c68.4318-68.3418,179.3817-68.3418,247.8136,0,68.4318,68.3418,68.4318,179.1456,0,247.4874-68.4318,68.3418-179.3817,68.3418-247.8136,0-68.4318-68.3418-68.4318-179.1456,0-247.4874Z" fill="#7091e6" fill-rule="evenodd"></path><path d="M195.6852,296.4658c11.0519-18.2927,12.0703-38.0499,3.0552-59.2724-2.507,11.3857-7.0929,18.2957-13.7581,20.7313,6.1895-19.7839,1.0175-41.1579-15.5162-64.1223-.3568,23.7179-5.4493,40.9952-15.2779,51.8324-13.5398,14.9145-13.3804,31.7468.4775,50.4962-57.5269-34.264-65.6429-80.2189-24.349-137.8632,2.5612,13.9258,8.7676,22.4755,18.6201,25.6492-10.7393-51.0064.56-94.4673,33.8976-130.3828.2049,79.7044,22.0426,86.7888,49.653,122.3671,29.8109,42.6957,12.2922,91.9676-36.8022,120.5645h0Z" fill="#f8faff" fill-rule="evenodd"></path></svg>
    503525                    </div>
    504526                    <div class="digiblocks-promo-content">
     
    10151037       
    10161038        $post_ids_to_check = array();
     1039        $template_content_to_check = array();
    10171040       
    10181041        // Get post IDs to check based on current page type
     
    10311054        }
    10321055       
     1056        // Check for block theme templates and template parts
     1057        $current_template_content = $this->get_current_template_content();
     1058        if ( ! empty( $current_template_content ) ) {
     1059            $template_content_to_check[] = $current_template_content;
     1060        }
     1061       
    10331062        // Add active builder posts if DigiStore Builder is active
    10341063        if ( class_exists( 'DigiStore_Builder' ) ) {
     
    10421071        $post_ids_to_check = array_unique( array_filter( $post_ids_to_check ) );
    10431072       
    1044         if ( empty( $post_ids_to_check ) ) {
    1045             return;
    1046         }
    1047        
    10481073        // Track what we've enqueued to avoid duplicates
    10491074        static $enqueued_posts = array();
     1075        static $enqueued_templates = array();
    10501076        static $global_assets_enqueued = false;
    10511077       
     
    11221148        }
    11231149       
     1150        // Process template content
     1151        foreach ( $template_content_to_check as $index => $template_content ) {
     1152            $template_key = 'template_' . $index;
     1153           
     1154            // Skip if already processed
     1155            if ( isset( $enqueued_templates[ $template_key ] ) ) {
     1156                continue;
     1157            }
     1158           
     1159            // Check if template contains DigiBlocks
     1160            if ( false === strpos( $template_content, '<!-- wp:digiblocks/' ) && false === strpos( $template_content, '<!-- wp:block ' ) ) {
     1161                $enqueued_templates[ $template_key ] = false;
     1162                continue;
     1163            }
     1164           
     1165            // Generate a unique identifier for this template content
     1166            $template_hash = substr( md5( $template_content ), 0, 6 );
     1167            $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css';
     1168            $js_file  = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js';
     1169           
     1170            // Generate assets if they don't exist
     1171            if ( ! file_exists( $css_file ) || ! file_exists( $js_file ) ) {
     1172                $this->generate_template_assets( $template_content, $template_hash );
     1173            }
     1174           
     1175            // Final check after potential generation
     1176            $has_css = file_exists( $css_file );
     1177            $has_js = file_exists( $js_file );
     1178           
     1179            // Skip if still no assets
     1180            if ( ! $has_css && ! $has_js ) {
     1181                $enqueued_templates[ $template_key ] = false;
     1182                continue;
     1183            }
     1184           
     1185            $has_any_digiblocks = true;
     1186           
     1187            // Enqueue CSS
     1188            if ( $has_css ) {
     1189                wp_enqueue_style(
     1190                    'digiblocks-template-' . $template_hash,
     1191                    DIGIBLOCKS_ASSETS_URL . '/digiblocks-template-' . $template_hash . '.css',
     1192                    array(),
     1193                    filemtime( $css_file )
     1194                );
     1195            }
     1196           
     1197            // Enqueue JS and add script data
     1198            if ( $has_js ) {
     1199                wp_enqueue_script(
     1200                    'digiblocks-template-' . $template_hash,
     1201                    DIGIBLOCKS_ASSETS_URL . '/digiblocks-template-' . $template_hash . '.js',
     1202                    array(),
     1203                    filemtime( $js_file ),
     1204                    true
     1205                );
     1206               
     1207                $blocks = parse_blocks( $template_content );
     1208                $this->enqueue_consolidated_script_data( 'digiblocks-template-' . $template_hash, $blocks );
     1209                $all_blocks_for_global_assets = array_merge( $all_blocks_for_global_assets, $blocks );
     1210            }
     1211           
     1212            // Mark as processed
     1213            $enqueued_templates[ $template_key ] = true;
     1214        }
     1215       
    11241216        // Enqueue global assets only once per page if any DigiBlocks were found
    11251217        if ( $has_any_digiblocks && ! $global_assets_enqueued && ! empty( $all_blocks_for_global_assets ) ) {
     
    13101402        $consolidated_data = apply_filters( 'digiblocks_consolidated_script_data', $consolidated_data, $blocks, $script_handle );
    13111403
    1312         // NEW: Check if DigiFusion Builder is active and needs to add data
     1404        // Check if DigiFusion Builder is active and needs to add data
    13131405        $builder_data = $this->get_digifusion_builder_data();
    13141406        if ( ! empty( $builder_data ) ) {
     
    15061598     */
    15071599    public function enqueue_editor_assets() {
    1508         // Style for editor.
    1509         wp_enqueue_style(
    1510             'digiblocks-editor',
    1511             DIGIBLOCKS_PLUGIN_URL . 'assets/css/blocks/editor.css',
    1512             array( 'wp-edit-blocks' ),
    1513             DIGIBLOCKS_VERSION
    1514         );
    1515 
    15161600        // First enqueue the globals script
    15171601        wp_enqueue_script(
     
    15311615        );
    15321616
    1533         // Enqueue editor scripts.
    1534         wp_enqueue_script(
    1535             'digiblocks-blocks-editor',
    1536             DIGIBLOCKS_PLUGIN_URL . 'assets/js/blocks/index.js',
    1537             array(
    1538                 'wp-blocks',
    1539                 'wp-i18n',
    1540                 'wp-element',
    1541                 'wp-editor',
    1542                 'wp-components',
    1543                 'wp-data',
    1544                 'wp-block-editor',
    1545                 'digiblocks-globals',
    1546             ),
    1547             DIGIBLOCKS_VERSION,
    1548             true
     1617        // Enqueue individual block scripts with dependencies
     1618        $this->enqueue_block_scripts();
     1619
     1620        // Style for editor.
     1621        wp_enqueue_style(
     1622            'digiblocks-editor',
     1623            DIGIBLOCKS_PLUGIN_URL . 'assets/css/blocks/editor.css',
     1624            array( 'wp-edit-blocks' ),
     1625            DIGIBLOCKS_VERSION
    15491626        );
    15501627
     
    15881665            )
    15891666        );
     1667    }
     1668
     1669    /**
     1670     * Enqueue block scripts with proper dependencies
     1671     */
     1672    private function enqueue_block_scripts() {
     1673        $build_dir = DIGIBLOCKS_PLUGIN_DIR . 'assets/js/blocks/';
     1674       
     1675        if ( is_dir( $build_dir ) ) {
     1676            $block_folders = array_filter( glob( $build_dir . '*' ), 'is_dir' );
     1677           
     1678            foreach ( $block_folders as $block_folder ) {
     1679                $block_name = basename( $block_folder );
     1680                $inactive_blocks = get_option( 'digiblocks_inactive_blocks', array() );
     1681               
     1682                if ( ! isset( $inactive_blocks[ $block_name ] ) || ! $inactive_blocks[ $block_name ] ) {
     1683                    $script_path = $block_folder . '/index.js';
     1684                    $script_handle = 'digiblocks-' . $block_name;
     1685                   
     1686                    if ( file_exists( $script_path ) && ! wp_script_is( $script_handle, 'enqueued' ) ) {
     1687                        wp_enqueue_script(
     1688                            $script_handle,
     1689                            DIGIBLOCKS_PLUGIN_URL . 'assets/js/blocks/' . $block_name . '/index.js',
     1690                            array( 'digiblocks-globals' ),
     1691                            DIGIBLOCKS_VERSION,
     1692                            true
     1693                        );
     1694                    }
     1695                }
     1696            }
     1697        }
    15901698    }
    15911699
     
    19972105        // Increase execution time for large sites
    19982106        set_time_limit( 300 );
    1999 
     2107   
    20002108        // Clear reusable block cache before regeneration
    20012109        $this->clear_reusable_block_cache();
    2002 
     2110   
    20032111        $regenerated = array(
    20042112            'posts' => 0,
    20052113            'builders' => 0,
     2114            'templates' => 0,
    20062115            'css_files' => 0,
    20072116            'js_files' => 0,
     
    20092118            'errors' => array(),
    20102119        );
    2011 
     2120   
    20122121        try {
    20132122            // Get all public post types
     
    20262135                'suppress_filters' => false,
    20272136            ) );
    2028 
     2137   
    20292138            // Process each post
    20302139            foreach ( $posts as $post ) {
     
    20342143                        continue;
    20352144                    }
    2036 
     2145   
    20372146                    $content = $post->post_content;
    2038 
     2147   
    20392148                    // Check if content has any DigiBlocks blocks (including Pro blocks)
    20402149                    if ( false === strpos( $content, '<!-- wp:digiblocks/' ) && false === strpos( $content, '<!-- wp:block ' ) ) {
     
    20432152                        continue;
    20442153                    }
    2045 
     2154   
    20462155                    // Use the existing generate_block_assets method which now works with Pro blocks
    20472156                    $this->generate_block_assets( $post->ID, $post );
    2048 
     2157   
    20492158                    // Check if files were actually created
    20502159                    $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-' . $post->ID . '.css';
    20512160                    $js_file  = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-' . $post->ID . '.js';
    2052 
     2161   
    20532162                    if ( file_exists( $css_file ) ) {
    20542163                        $regenerated['css_files']++;
    20552164                    }
    2056 
     2165   
    20572166                    if ( file_exists( $js_file ) ) {
    20582167                        $regenerated['js_files']++;
    20592168                    }
    2060 
     2169   
    20612170                    // Process fonts if the fonts manager exists
    20622171                    if ( class_exists( 'DigiBlocks_Fonts' ) ) {
     
    20652174                        $regenerated['font_files']++;
    20662175                    }
    2067 
     2176   
    20682177                    // Track if this was a builder or regular post
    20692178                    if ( $post->post_type === 'digi_builder' ) {
     
    20722181                        $regenerated['posts']++;
    20732182                    }
    2074 
     2183   
    20752184                } catch ( Exception $e ) {
    20762185                    $regenerated['errors'][] = sprintf(
     
    20912200                }
    20922201            }
    2093 
     2202   
     2203            // Process block theme templates
     2204            if ( wp_is_block_theme() ) {
     2205                try {
     2206                    $template_content = $this->get_current_template_content();
     2207                   
     2208                    if ( ! empty( $template_content ) &&
     2209                         ( false !== strpos( $template_content, '<!-- wp:digiblocks/' ) || false !== strpos( $template_content, '<!-- wp:block ' ) ) ) {
     2210                       
     2211                        $template_hash = substr( md5( $template_content ), 0, 6 );
     2212                        $this->generate_template_assets( $template_content, $template_hash );
     2213                       
     2214                        // Check if template files were created
     2215                        $template_css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css';
     2216                        $template_js_file  = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js';
     2217   
     2218                        if ( file_exists( $template_css_file ) ) {
     2219                            $regenerated['css_files']++;
     2220                        }
     2221   
     2222                        if ( file_exists( $template_js_file ) ) {
     2223                            $regenerated['js_files']++;
     2224                        }
     2225   
     2226                        $regenerated['templates']++;
     2227                    }
     2228                } catch ( Exception $e ) {
     2229                    $regenerated['errors'][] = 'Error processing template: ' . $e->getMessage();
     2230                } catch ( Error $e ) {
     2231                    $regenerated['errors'][] = 'Fatal error processing template: ' . $e->getMessage();
     2232                }
     2233            }
     2234   
    20942235            // Clean up orphaned files
    20952236            $this->cleanup_orphaned_assets();
    2096 
     2237   
    20972238            // Clear builder cache if DigiFusion Builder exists
    20982239            if ( class_exists( 'DigiFusion_Builder' ) ) {
    20992240                $this->clear_digifusion_builder_cache();
    21002241            }
    2101 
     2242   
    21022243            // Regenerate all fonts if local fonts are enabled
    21032244            $settings = get_option( 'digiblocks_settings', array() );
     
    21122253                }
    21132254            }
    2114 
     2255   
    21152256            // Create success message
    21162257            $message_parts = array();
     
    21212262                $message_parts[] = sprintf( '%d builders', $regenerated['builders'] );
    21222263            }
    2123            
    2124             $processed_items = ! empty( $message_parts ) ? implode( ' and ', $message_parts ) : '0 items';
    2125 
     2264            if ( $regenerated['templates'] > 0 ) {
     2265                $message_parts[] = sprintf( '%d templates', $regenerated['templates'] );
     2266            }
     2267           
     2268            $processed_items = ! empty( $message_parts ) ? implode( ', ', $message_parts ) : '0 items';
     2269   
    21262270            return rest_ensure_response( array(
    21272271                'success' => true,
     
    21352279                'details' => $regenerated,
    21362280            ) );
    2137 
     2281   
    21382282        } catch ( Exception $e ) {
    21392283            return rest_ensure_response( array(
     
    21862330            return;
    21872331        }
    2188 
     2332   
    21892333        // Get all existing posts including builders
    21902334        $post_types = get_post_types( array( 'public' => true ) );
     
    21942338            $post_types[] = 'digi_builder';
    21952339        }
    2196 
     2340   
    21972341        $existing_posts = get_posts( array(
    21982342            'post_type'      => $post_types,
     
    22012345            'fields'         => 'ids',
    22022346        ) );
    2203 
     2347   
    22042348        $existing_post_ids = array_flip( $existing_posts );
    2205 
     2349   
    22062350        // Get all files in the assets directory
    22072351        $files = glob( DIGIBLOCKS_ASSETS_DIR . '/digiblocks-*.{css,js}', GLOB_BRACE );
     
    22102354            return;
    22112355        }
    2212 
     2356   
     2357        // Get current template content hash for comparison
     2358        $current_template_content = '';
     2359        if ( wp_is_block_theme() ) {
     2360            $current_template_content = $this->get_current_template_content();
     2361        }
     2362        $current_template_hash = ! empty( $current_template_content ) ? md5( $current_template_content ) : '';
     2363   
    22132364        foreach ( $files as $file ) {
    22142365            $filename = basename( $file );
     2366            $should_delete = false;
    22152367           
    22162368            // Extract post ID from filename (digiblocks-{post_id}.css or digiblocks-{post_id}.js)
    2217             if ( preg_match( '/digiblocks-(\d+)\.(css|js)$/', $filename, $matches ) ) {
     2369            if ( preg_match( '/^digiblocks-(\d+)\.(css|js)$/', $filename, $matches ) ) {
    22182370                $post_id = (int) $matches[1];
    22192371               
    22202372                // Delete file if post doesn't exist
    22212373                if ( ! isset( $existing_post_ids[ $post_id ] ) ) {
    2222                     wp_delete_file( $file );
     2374                    $should_delete = true;
    22232375                }
    22242376            }
    22252377           
    22262378            // Handle font files (digiblocks-fonts-{post_id}.css)
    2227             if ( preg_match( '/digiblocks-fonts-(\d+)\.css$/', $filename, $matches ) ) {
     2379            elseif ( preg_match( '/^digiblocks-fonts-(\d+)\.css$/', $filename, $matches ) ) {
    22282380                $post_id = (int) $matches[1];
    22292381               
    22302382                // Delete file if post doesn't exist
    22312383                if ( ! isset( $existing_post_ids[ $post_id ] ) ) {
    2232                     wp_delete_file( $file );
     2384                    $should_delete = true;
    22332385                }
     2386            }
     2387           
     2388            // Handle template files (digiblocks-template-{hash}.css or digiblocks-template-{hash}.js)
     2389            elseif ( preg_match( '/^digiblocks-template-([a-f0-9]{32})\.(css|js)$/', $filename, $matches ) ) {
     2390                $template_hash = $matches[1];
     2391               
     2392                // Delete template files if they don't match the current template
     2393                if ( empty( $current_template_hash ) || $template_hash !== $current_template_hash ) {
     2394                    $should_delete = true;
     2395                }
     2396            }
     2397           
     2398            // Delete the file if it should be removed
     2399            if ( $should_delete ) {
     2400                wp_delete_file( $file );
    22342401            }
    22352402        }
     
    24172584            default:
    24182585                return false;
     2586        }
     2587    }
     2588
     2589    /**
     2590     * Get current template content from block theme
     2591     *
     2592     * @return string Template content
     2593     */
     2594    private function get_current_template_content() {
     2595        // Only proceed if we're using a block theme
     2596        if ( ! wp_is_block_theme() ) {
     2597            return '';
     2598        }
     2599       
     2600        $template_content = '';
     2601       
     2602        try {
     2603            // Get the current template
     2604            $template = get_block_template( get_stylesheet() . '//' . get_page_template_slug() );
     2605           
     2606            // If no specific template, try to get the current template based on the query
     2607            if ( ! $template ) {
     2608                $template_hierarchy = array();
     2609               
     2610                if ( is_front_page() && is_home() ) {
     2611                    $template_hierarchy[] = 'front-page';
     2612                    $template_hierarchy[] = 'home';
     2613                    $template_hierarchy[] = 'index';
     2614                } elseif ( is_front_page() ) {
     2615                    $template_hierarchy[] = 'front-page';
     2616                    $template_hierarchy[] = 'page';
     2617                    $template_hierarchy[] = 'index';
     2618                } elseif ( is_home() ) {
     2619                    $template_hierarchy[] = 'home';
     2620                    $template_hierarchy[] = 'index';
     2621                } elseif ( is_singular() ) {
     2622                    $post_type = get_post_type();
     2623                    $template_hierarchy[] = "single-{$post_type}";
     2624                    $template_hierarchy[] = 'single';
     2625                    $template_hierarchy[] = 'index';
     2626                } elseif ( is_category() ) {
     2627                    $category = get_queried_object();
     2628                    $template_hierarchy[] = "category-{$category->slug}";
     2629                    $template_hierarchy[] = "category-{$category->term_id}";
     2630                    $template_hierarchy[] = 'category';
     2631                    $template_hierarchy[] = 'archive';
     2632                    $template_hierarchy[] = 'index';
     2633                } elseif ( is_tag() ) {
     2634                    $tag = get_queried_object();
     2635                    $template_hierarchy[] = "tag-{$tag->slug}";
     2636                    $template_hierarchy[] = "tag-{$tag->term_id}";
     2637                    $template_hierarchy[] = 'tag';
     2638                    $template_hierarchy[] = 'archive';
     2639                    $template_hierarchy[] = 'index';
     2640                } elseif ( is_author() ) {
     2641                    $author = get_queried_object();
     2642                    $template_hierarchy[] = "author-{$author->user_nicename}";
     2643                    $template_hierarchy[] = "author-{$author->ID}";
     2644                    $template_hierarchy[] = 'author';
     2645                    $template_hierarchy[] = 'archive';
     2646                    $template_hierarchy[] = 'index';
     2647                } elseif ( is_date() ) {
     2648                    $template_hierarchy[] = 'date';
     2649                    $template_hierarchy[] = 'archive';
     2650                    $template_hierarchy[] = 'index';
     2651                } elseif ( is_archive() ) {
     2652                    $post_type = get_post_type();
     2653                    if ( $post_type ) {
     2654                        $template_hierarchy[] = "archive-{$post_type}";
     2655                    }
     2656                    $template_hierarchy[] = 'archive';
     2657                    $template_hierarchy[] = 'index';
     2658                } elseif ( is_search() ) {
     2659                    $template_hierarchy[] = 'search';
     2660                    $template_hierarchy[] = 'index';
     2661                } elseif ( is_404() ) {
     2662                    $template_hierarchy[] = '404';
     2663                    $template_hierarchy[] = 'index';
     2664                } else {
     2665                    $template_hierarchy[] = 'index';
     2666                }
     2667               
     2668                // Try to get template from hierarchy
     2669                foreach ( $template_hierarchy as $template_slug ) {
     2670                    $template = get_block_template( get_stylesheet() . '//' . $template_slug );
     2671                    if ( $template ) {
     2672                        break;
     2673                    }
     2674                }
     2675            }
     2676           
     2677            // Get template content
     2678            if ( $template && isset( $template->content ) ) {
     2679                $template_content = $template->content;
     2680            }
     2681           
     2682            // Also get template parts used in the template
     2683            if ( ! empty( $template_content ) ) {
     2684                $template_content .= $this->get_template_parts_content( $template_content );
     2685            }
     2686           
     2687        } catch ( Exception $e ) {
     2688            // Silently handle errors
     2689            return '';
     2690        }
     2691       
     2692        return $template_content;
     2693    }
     2694
     2695    /**
     2696     * Get content from template parts referenced in template
     2697     *
     2698     * @param string $template_content Template content to scan
     2699     * @return string Combined template parts content
     2700     */
     2701    private function get_template_parts_content( $template_content ) {
     2702        $template_parts_content = '';
     2703       
     2704        // Parse blocks to find template parts
     2705        $blocks = parse_blocks( $template_content );
     2706        $template_parts_content .= $this->extract_template_parts_content( $blocks );
     2707       
     2708        return $template_parts_content;
     2709    }
     2710
     2711    /**
     2712     * Recursively extract template parts content
     2713     *
     2714     * @param array $blocks Array of parsed blocks
     2715     * @return string Combined template parts content
     2716     */
     2717    private function extract_template_parts_content( $blocks ) {
     2718        $content = '';
     2719       
     2720        foreach ( $blocks as $block ) {
     2721            // Check if this is a template part block
     2722            if ( isset( $block['blockName'] ) && $block['blockName'] === 'core/template-part' ) {
     2723                if ( isset( $block['attrs']['slug'] ) ) {
     2724                    $template_part_slug = $block['attrs']['slug'];
     2725                    $template_part_theme = isset( $block['attrs']['theme'] ) ? $block['attrs']['theme'] : get_stylesheet();
     2726                   
     2727                    // Get the template part
     2728                    $template_part = get_block_template( $template_part_theme . '//' . $template_part_slug, 'wp_template_part' );
     2729                   
     2730                    if ( $template_part && isset( $template_part->content ) ) {
     2731                        $content .= $template_part->content;
     2732                       
     2733                        // Recursively get nested template parts
     2734                        $nested_blocks = parse_blocks( $template_part->content );
     2735                        $content .= $this->extract_template_parts_content( $nested_blocks );
     2736                    }
     2737                }
     2738            }
     2739           
     2740            // Check inner blocks
     2741            if ( ! empty( $block['innerBlocks'] ) ) {
     2742                $content .= $this->extract_template_parts_content( $block['innerBlocks'] );
     2743            }
     2744        }
     2745       
     2746        return $content;
     2747    }
     2748
     2749    /**
     2750     * Generate CSS and JS files for template content
     2751     *
     2752     * @param string $template_content Template content
     2753     * @param string $template_hash Unique hash for the template
     2754     */
     2755    private function generate_template_assets( $template_content, $template_hash ) {
     2756        // Extract CSS and JS from template blocks
     2757        $css = $this->extract_block_css( $template_content, 'template-' . $template_hash );
     2758        $js  = $this->extract_block_js( $template_content, 'template-' . $template_hash );
     2759       
     2760        // Generate CSS file
     2761        $this->generate_template_css_file( $template_hash, $css );
     2762       
     2763        // Generate JS file
     2764        $this->generate_template_js_file( $template_hash, $js );
     2765    }
     2766
     2767    /**
     2768     * Generate CSS file for template
     2769     *
     2770     * @param string $template_hash Template hash
     2771     * @param string $css CSS content
     2772     */
     2773    private function generate_template_css_file( $template_hash, $css ) {
     2774        // Initialize WP_Filesystem
     2775        global $wp_filesystem;
     2776        if ( ! is_object( $wp_filesystem ) ) {
     2777            require_once ABSPATH . 'wp-admin/includes/file.php';
     2778            $filesystem_init = WP_Filesystem();
     2779        }
     2780
     2781        $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css';
     2782
     2783        if ( empty( $css ) ) {
     2784            // Clean up CSS file if it exists
     2785            if ( $wp_filesystem && $wp_filesystem->exists( $css_file ) ) {
     2786                $delete_result = $wp_filesystem->delete( $css_file );
     2787            }
     2788            return;
     2789        }
     2790
     2791        // Ensure digiblocks directory exists in uploads folder
     2792        if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) {
     2793            $mkdir_result = wp_mkdir_p( DIGIBLOCKS_ASSETS_DIR );
     2794        }
     2795
     2796        // Direct file system access backup in case WP_Filesystem fails
     2797        if ( ! $wp_filesystem || ! is_object( $wp_filesystem ) ) {
     2798            if ( ! class_exists( 'WP_Filesystem_Direct' ) ) {
     2799                require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
     2800                require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
     2801            }
     2802            $wp_filesystem_direct = new WP_Filesystem_Direct( null );
     2803            $write_result = $wp_filesystem_direct->put_contents( $css_file, $this->minify_css( $css ), FS_CHMOD_FILE );
     2804            return;
     2805        }
     2806
     2807        // Minify CSS and write file
     2808        $put_result = $wp_filesystem->put_contents( $css_file, $this->minify_css( $css ), FS_CHMOD_FILE );
     2809    }
     2810
     2811    /**
     2812     * Generate JS file for template
     2813     *
     2814     * @param string $template_hash Template hash
     2815     * @param string $js JS content
     2816     */
     2817    private function generate_template_js_file( $template_hash, $js ) {
     2818        // Initialize WP_Filesystem
     2819        global $wp_filesystem;
     2820        if ( ! is_object( $wp_filesystem ) ) {
     2821            require_once ABSPATH . 'wp-admin/includes/file.php';
     2822            $filesystem_init = WP_Filesystem();
     2823        }
     2824
     2825        $js_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js';
     2826
     2827        if ( empty( $js ) ) {
     2828            // Clean up JS file if it exists
     2829            if ( $wp_filesystem && $wp_filesystem->exists( $js_file ) ) {
     2830                $delete_result = $wp_filesystem->delete( $js_file );
     2831            }
     2832            return;
     2833        }
     2834
     2835        // Ensure digiblocks directory exists in uploads folder
     2836        if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) {
     2837            $mkdir_result = wp_mkdir_p( DIGIBLOCKS_ASSETS_DIR );
     2838        }
     2839
     2840        // Direct file system access backup in case WP_Filesystem fails
     2841        if ( ! $wp_filesystem || ! is_object( $wp_filesystem ) ) {
     2842            if ( ! class_exists( 'WP_Filesystem_Direct' ) ) {
     2843                require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
     2844                require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
     2845            }
     2846            $wp_filesystem_direct = new WP_Filesystem_Direct( null );
     2847            $write_result = $wp_filesystem_direct->put_contents( $js_file, $this->minify_js( $js ), FS_CHMOD_FILE );
     2848            return;
     2849        }
     2850
     2851        // Minify JS and write file
     2852        $put_result = $wp_filesystem->put_contents( $js_file, $this->minify_js( $js ), FS_CHMOD_FILE );
     2853    }
     2854
     2855    /**
     2856     * Handle template modification
     2857     *
     2858     * @param int     $post_id Post ID
     2859     * @param WP_Post $post Post object
     2860     * @param bool    $update Whether this is an update
     2861     * @param WP_Post $post_before Previous post object
     2862     */
     2863    public function handle_template_modification( $post_id, $post, $update, $post_before ) {
     2864        // Only handle wp_template and wp_template_part post types
     2865        if ( ! in_array( $post->post_type, array( 'wp_template', 'wp_template_part' ), true ) ) {
     2866            return;
     2867        }
     2868
     2869        // Skip autosaves and revisions
     2870        if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) {
     2871            return;
     2872        }
     2873
     2874        // Clear any existing template assets since template content has changed
     2875        $this->cleanup_template_assets();
     2876    }
     2877
     2878    /**
     2879     * Handle template deletion
     2880     *
     2881     * @param int     $post_id Post ID
     2882     * @param WP_Post $post Post object
     2883     */
     2884    public function handle_template_deletion( $post_id, $post ) {
     2885        // Only handle wp_template and wp_template_part post types
     2886        if ( ! in_array( $post->post_type, array( 'wp_template', 'wp_template_part' ), true ) ) {
     2887            return;
     2888        }
     2889
     2890        // Clear any existing template assets since template was deleted
     2891        $this->cleanup_template_assets();
     2892    }
     2893
     2894    /**
     2895     * Clean up template assets
     2896     */
     2897    private function cleanup_template_assets() {
     2898        if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) {
     2899            return;
     2900        }
     2901
     2902        // Get all template files
     2903        $template_files = glob( DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-*.{css,js}', GLOB_BRACE );
     2904       
     2905        if ( $template_files ) {
     2906            foreach ( $template_files as $file ) {
     2907                wp_delete_file( $file );
     2908            }
    24192909        }
    24202910    }
  • digiblocks/trunk/includes/helpers.php

    r3317829 r3346454  
    186186}
    187187
     188if ( ! function_exists( 'digiblocks_get_single_gap_css' ) ) {
     189    /**
     190     * Get single gap CSS for responsive design
     191     *
     192     * @param array  $gap_values Gap values array
     193     * @param string $device Current device
     194     * @return string CSS gap property
     195     */
     196    function digiblocks_get_single_gap_css( $gap_values, $device ) {
     197        // Default gap structure
     198        $default_gap = array(
     199            'desktop' => array( 'value' => 20, 'unit' => 'px' ),
     200            'tablet'  => array( 'value' => '', 'unit' => 'px' ),
     201            'mobile'  => array( 'value' => '', 'unit' => 'px' ),
     202        );
     203       
     204        // Merge with defaults
     205        $gap_values = wp_parse_args( $gap_values, $default_gap );
     206       
     207        // Get gap value with responsive fallback
     208        $gap_value = '';
     209        $gap_unit = 'px';
     210       
     211        // If current device has a value, use it
     212        if ( isset( $gap_values[ $device ] ) && ! empty( $gap_values[ $device ]['value'] ) ) {
     213            $gap_value = $gap_values[ $device ]['value'];
     214            $gap_unit = isset( $gap_values[ $device ]['unit'] ) ? $gap_values[ $device ]['unit'] : 'px';
     215        }
     216        // For tablet: fallback to desktop
     217        elseif ( $device === 'tablet' && isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) {
     218            $gap_value = $gap_values['desktop']['value'];
     219            $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px';
     220        }
     221        // For mobile: try tablet first, then desktop
     222        elseif ( $device === 'mobile' ) {
     223            if ( isset( $gap_values['tablet'] ) && ! empty( $gap_values['tablet']['value'] ) ) {
     224                $gap_value = $gap_values['tablet']['value'];
     225                $gap_unit = isset( $gap_values['tablet']['unit'] ) ? $gap_values['tablet']['unit'] : 'px';
     226            } elseif ( isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) {
     227                $gap_value = $gap_values['desktop']['value'];
     228                $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px';
     229            }
     230        }
     231        // Default case
     232        elseif ( isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) {
     233            $gap_value = $gap_values['desktop']['value'];
     234            $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px';
     235        }
     236       
     237        // Return gap CSS if we have a value
     238        if ( ! empty( $gap_value ) || $gap_value === 0 || $gap_value === '0' ) {
     239            return "gap: {$gap_value}{$gap_unit};";
     240        }
     241       
     242        return '';
     243    }
     244}
     245
    188246/**
    189247 * Get default responsive dimension values.
  • digiblocks/trunk/readme.txt

    r3317839 r3346454  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3737* **[Lottie Animation](https://digiblocks.me/block/lottie?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add beautiful Lottie animations to your content.
    3838* **[Newsletter](https://digiblocks.me/block/newsletter?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a newsletter subscription form.
    39 * **[Posts](https://digiblocks.me/block/posts?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Display your WordPress posts in beautiful grid and list layouts.
     39* **[Row](https://digiblocks.me/block/row?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Create horizontal layouts with flexible alignment and spacing controls.
    4040* **[Pricing Table](https://digiblocks.me/block/pricing-table?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Create beautiful pricing tables with multiple plans and features.
    4141* **[Separator](https://digiblocks.me/block/separator?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a separator with various styles, text, and icon options.
     
    4949= Pro Version Blocks =
    5050
     51* **[Posts](https://digiblocks.me/block/posts?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Display your WordPress posts in beautiful grid and list layouts.
    5152* **[Money Back](https://digiblocks.me/block/money-back?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a customizable money back guarantee.
    5253* **[Logo](https://digiblocks.me/block/logo?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a customizable logo for your website header or footer.
     
    210211== Changelog ==
    211212
     213= 1.0.1 - August 18, 2025 =
     214* Tweak: Table block, warning icon added
     215* Tweak: Icon box block, Better settings for icon width and spacing
     216* Fixed: If the Text block was used in post content, it wasn't added in excerpt
     217
    212218= 1.0.0 - June 15, 2025 =
    213219* Initial release
  • digiblocks/trunk/resources/css/blocks/_container.css

    r3317829 r3346454  
    1 /**
    2  * Editor styles for Container and Column blocks
    3  */
    4 
    51/* Container block */
    62.block-editor-block-list__block[data-type="digiblocks/container"] {
  • digiblocks/trunk/resources/css/blocks/editor.css

    r3317829 r3346454  
    99/* Blocks */
    1010@import "_container.css";
     11@import "_row.css";
    1112@import "_social-icons.css";
    1213
Note: See TracChangeset for help on using the changeset viewer.