diff --git a/.eslintrc.js b/.eslintrc.js index c13bc5930..06ff40535 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -58,6 +58,7 @@ const eslintConfig = { Masonry: 'readable', IntersectionObserver: 'readable', getComputedStyle: 'readable', + ScrollMagic: 'readable', }, rules: { '@wordpress/i18n-text-domain': [ diff --git a/includes/assets/js/kb-countup.min.js b/includes/assets/js/kb-countup.min.js index 3bb56346f..2b862371e 100644 --- a/includes/assets/js/kb-countup.min.js +++ b/includes/assets/js/kb-countup.min.js @@ -1 +1 @@ -(function(){"use strict";window.kadenceCountUp={cache:{},countUpItems:{},listenerCache:{},isInViewport(a){const b=a.getBoundingClientRect();return 0<=b.top&&-300<=b.left&&b.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&b.right<=(window.innerWidth||document.documentElement.clientWidth)+300},stripHtml(a){const b=new DOMParser().parseFromString(`
${a}
`,"text/html");return b.body.textContent||""},initScrollSpy(){if(window.kadenceCountUp.countUpItems=document.querySelectorAll(".kb-count-up"),!!window.kadenceCountUp.countUpItems.length)for(let a=0;a${a}`,"text/html");return b.body.textContent||""},initScrollSpy(){if(window.kadenceCountUp.countUpItems=document.querySelectorAll(".kb-count-up"),!!window.kadenceCountUp.countUpItems.length)for(let a=0;a=this.items.length?a=0:0>a&&(a=this.items.length-1),a},showPosition(a){const b=this.normalizePosition(a);return"undefined"!=typeof this.currentPosition&&(this.direction=b>this.currentPosition?"next":"prev"),this.currentPosition=b,this.setupLightboxHtml().prepareItem(this.currentPosition,this.setContent).show()},loading(a){const d=this,e=this.options;a?this.loadingTimeout=setTimeout(function(){b(d.$el,e.elementLoadingClass),d.$content.innerHTML="

"+e.loadingCaption+"

",d.show()},e.loadingTimeout):(c(this.$el,e.elementLoadingClass),clearTimeout(this.loadingTimeout))},getVideoURL(a){const b=[{rx:/^(?:https?:)?\/\/(?:www\.)?vimeo\.com\/([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","player.vimeo.com/video/$1")},{rx:/^.*(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/|v\/|user\/.+\/)?([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","www.youtube.com/embed/$1")},{rx:/^.*(?:https?:\/\/)?(?:www\.)?(?:youtube-nocookie\.com)\/(?:watch\?v=|embed\/|v\/|user\/.+\/)?([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","www.youtube-nocookie.com/embed/$1")}];for(let c=0;c"))}else{const f=d("
");this.$currentImage=f.querySelector(".slbImage"),this.options.showCaptions&&this.captions[a]&&f.appendChild(d("
"+this.captions[a]+"
")),this.loadImage(e,function(){c.setImageDimensions(),b.call(c,f),c.loadImage(c.items[c.normalizePosition(c.currentPosition+1)])})}return this},loadImage(a,b){if(!this.options.videoRegex.test(a)){const c=new Image;b&&(c.onload=b),c.src=a}},setupLightboxHtml(){const a=this.options;return this.$el||(this.$el=d("
"+(1
":"")+"
"),this.$content=this.$el.querySelector(".slbContent")),this.$content.innerHTML="",this},show(){return this.modalInDom||(document.querySelector(this.options.appendTarget).appendChild(this.$el),b(document.documentElement,this.options.htmlClass),this.setupLightboxEvents(),this.modalInDom=!0),this},setContent(a){const e="string"==typeof a?d(a):a;return this.loading(!1),this.setupLightboxHtml(),c(this.$content,"slbDirectionNext"),c(this.$content,"slbDirectionPrev"),this.direction&&b(this.$content,"next"===this.direction?"slbDirectionNext":"slbDirectionPrev"),this.options.beforeSetContent&&this.options.beforeSetContent(e,this),this.$content.appendChild(e),this},setImageDimensions(){this.$currentImage&&(this.$currentImage.style.maxHeight=g()+"px")},setupLightboxEvents(){const a=this;return this.eventRegistry.lightbox.length?this:(this.addEvent(this.$el,"click",function(b){const c=b.target;f(c,".slbCloseBtn")||a.options.closeOnOverlayClick&&f(c,".slbWrap")?a.close():f(c,".slbArrow")?f(c,".next")?a.next():a.prev():a.options.nextOnImageClick&&1=this.items.length?a=0:0>a&&(a=this.items.length-1),a},showPosition(a){const b=this.normalizePosition(a);return"undefined"!=typeof this.currentPosition&&(this.direction=b>this.currentPosition?"next":"prev"),this.currentPosition=b,this.setupLightboxHtml().prepareItem(this.currentPosition,this.setContent).show()},loading(a){const d=this,e=this.options;a?this.loadingTimeout=setTimeout(function(){b(d.$el,e.elementLoadingClass),d.$content.innerHTML="

"+e.loadingCaption+"

",d.show()},e.loadingTimeout):(c(this.$el,e.elementLoadingClass),clearTimeout(this.loadingTimeout))},getVideoURL(a){const b=[{rx:/^(?:https?:)?\/\/(?:www\.)?vimeo\.com\/([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","player.vimeo.com/video/$1")},{rx:/^.*(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/|v\/|user\/.+\/)?([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","www.youtube.com/embed/$1")},{rx:/^.*(?:https?:\/\/)?(?:www\.)?(?:youtube-nocookie\.com)\/(?:watch\?v=|embed\/|v\/|user\/.+\/)?([^\?&"]+).*$/g,tmpl:"//_URL_".replace("_URL_","www.youtube-nocookie.com/embed/$1")}];for(let c=0;c"))}else{const f=d("
");this.$currentImage=f.querySelector(".slbImage"),this.options.showCaptions&&this.captions[a]&&f.appendChild(d("
"+this.captions[a]+"
")),this.loadImage(e,function(){c.setImageDimensions(),b.call(c,f),c.loadImage(c.items[c.normalizePosition(c.currentPosition+1)])})}return this},loadImage(a,b){if(!this.options.videoRegex.test(a)){const c=new Image;b&&(c.onload=b),c.src=a}},setupLightboxHtml(){const a=this.options;return this.$el||(this.$el=d("
"+(1
":"")+"
"),this.$content=this.$el.querySelector(".slbContent")),this.$content.innerHTML="",this},show(){return this.modalInDom||(document.querySelector(this.options.appendTarget).appendChild(this.$el),b(document.documentElement,this.options.htmlClass),this.setupLightboxEvents(),this.modalInDom=!0),this},setContent(a){const e="string"==typeof a?d(a):a;return this.loading(!1),this.setupLightboxHtml(),c(this.$content,"slbDirectionNext"),c(this.$content,"slbDirectionPrev"),this.direction&&b(this.$content,"next"===this.direction?"slbDirectionNext":"slbDirectionPrev"),this.options.beforeSetContent&&this.options.beforeSetContent(e,this),this.$content.appendChild(e),this},setImageDimensions(){this.$currentImage&&(this.$currentImage.style.maxHeight=g()+"px")},setupLightboxEvents(){const a=this;return this.eventRegistry.lightbox.length?this:(this.addEvent(this.$el,"click",function(b){const c=b.target;f(c,".slbCloseBtn")||a.options.closeOnOverlayClick&&f(c,".slbWrap")?a.close():f(c,".slbArrow")?f(c,".next")?a.next():a.prev():a.options.nextOnImageClick&&1 @@ -190,7 +190,7 @@ export function Edit(props) { <> {__('The selected header is in the trash.', 'kadence-blocks')} diff --git a/src/blocks/table/components/backend-styles/index.js b/src/blocks/table/components/backend-styles/index.js index 2afc8ecae..e7c4ac16a 100644 --- a/src/blocks/table/components/backend-styles/index.js +++ b/src/blocks/table/components/backend-styles/index.js @@ -68,9 +68,9 @@ export default function BackendStyles(props) { const previewRowMinHeight = getPreviewSize(previewDevice, rowMinHeight, tabletRowMinHeight, mobileRowMinHeight); const previewColumnSettingUnit = getPreviewSize( previewDevice, - columnSettings?.[0]?.unit, - columnSettings?.[0]?.unitTablet, - columnSettings?.[0]?.unitMobile + columnSettings?.find((setting) => setting?.unit)?.unit, + columnSettings?.find((setting) => setting?.unitTablet)?.unitTablet, + columnSettings?.find((setting) => setting?.unitMobile)?.unitMobile ); css.set_selector(`.kb-table${uniqueID}`); @@ -113,9 +113,9 @@ export default function BackendStyles(props) { if (!settings?.useAuto) { const previewWidth = getPreviewSize( previewDevice, - settings.width, - settings.widthTablet, - settings.widthMobile, + settings?.width, + settings?.widthTablet, + settings?.widthMobile, true ); css.set_selector(`.kb-table${uniqueID} tr > *:nth-child(${index + 1})`); diff --git a/src/blocks/table/edit.js b/src/blocks/table/edit.js index 1895d3339..58122f288 100644 --- a/src/blocks/table/edit.js +++ b/src/blocks/table/edit.js @@ -330,9 +330,9 @@ export function Edit(props) { }; const previewColumnSettingUnit = getPreviewSize( previewDevice, - columnSettings?.[0]?.unit, - columnSettings?.[0]?.unitTablet, - columnSettings?.[0]?.unitMobile + columnSettings?.find((setting) => setting?.unit)?.unit, + columnSettings?.find((setting) => setting?.unitTablet)?.unitTablet, + columnSettings?.find((setting) => setting?.unitMobile)?.unitMobile ); const StickyUpsell = ( @@ -372,7 +372,7 @@ export function Edit(props) { label={__('Columns', 'kadence-blocks')} value={placeholderColumns} onChange={(value) => setPlaceholderColumns(value)} - min={2} + min={1} max={15} /> @@ -380,7 +380,7 @@ export function Edit(props) { label={__('Rows', 'kadence-blocks')} value={placeholderRows} onChange={(value) => setPlaceholderRows(value)} - min={2} + min={1} max={100} /> @@ -477,7 +477,11 @@ export function Edit(props) { }} >

- {sprintf(__('Column %d', 'kadence-blocks'), index + 1)} + {sprintf( + // Translators: %d is the column number. + __('Column %d', 'kadence-blocks'), + index + 1 + )}

@@ -890,7 +894,8 @@ export function Edit(props) { {Array.from({ length: columns }).map((_, index) => ( diff --git a/src/blocks/tableofcontents/style.scss b/src/blocks/tableofcontents/style.scss index 5556d56ba..ec8304f04 100644 --- a/src/blocks/tableofcontents/style.scss +++ b/src/blocks/tableofcontents/style.scss @@ -1,8 +1,8 @@ /** * Front End Styles */ - .entry-content:not(.single-content) .kb-table-of-content-nav { - margin-bottom: 30px; +.entry-content:not(.single-content) .kb-table-of-content-nav { + margin-bottom: 30px; } .kb-table-of-content-nav { .kb-table-of-contents-title { @@ -17,14 +17,14 @@ &:after { clear: both; display: table; - content: ''; + content: ""; } .kb-table-of-content-list { margin: var(--global-kb-spacing-sm, 1.5rem) 0 0 0; padding-left: 1.75em; list-style: disc; - .kb-table-of-contents__entry{ - color:inherit; + .kb-table-of-contents__entry { + color: inherit; } li:last-child { margin-bottom: 0px; @@ -118,12 +118,14 @@ border-radius: 0; color: inherit; border: 0; - box-shadow:none !important; + box-shadow: none !important; } } // Basic -.kb-toggle-icon-style-basic, .kb-toggle-icon-style-basiccircle { - .kb-table-of-contents-icon-trigger:after, .kb-table-of-contents-icon-trigger:before { +.kb-toggle-icon-style-basic, +.kb-toggle-icon-style-basiccircle { + .kb-table-of-contents-icon-trigger:after, + .kb-table-of-contents-icon-trigger:before { content: ""; height: 4px; position: absolute; @@ -143,7 +145,8 @@ } } .kb-toc-toggle-active { - .kb-toggle-icon-style-basic, .kb-toggle-icon-style-basiccircle { + .kb-toggle-icon-style-basic, + .kb-toggle-icon-style-basiccircle { .kb-table-of-contents-icon-trigger:before { transform: rotate(0deg); } @@ -157,7 +160,8 @@ .kb-table-of-contents-icon-trigger { border-radius: 50%; background-color: currentColor; - &:after, &:before { + &:after, + &:before { background-color: #fff; width: 16px; left: 4px; @@ -166,8 +170,10 @@ } } // x close -.kb-toggle-icon-style-xclose, .kb-toggle-icon-style-xclosecircle { - .kb-table-of-contents-icon-trigger:after, .kb-table-of-contents-icon-trigger:before { +.kb-toggle-icon-style-xclose, +.kb-toggle-icon-style-xclosecircle { + .kb-table-of-contents-icon-trigger:after, + .kb-table-of-contents-icon-trigger:before { content: ""; background-color: currentColor; height: 4px; @@ -187,7 +193,8 @@ } } .kb-toc-toggle-active { - .kb-toggle-icon-style-xclose, .kb-toggle-icon-style-xclosecircle { + .kb-toggle-icon-style-xclose, + .kb-toggle-icon-style-xclosecircle { .kb-table-of-contents-icon-trigger:before { transform: rotate(45deg); } @@ -202,7 +209,8 @@ border-radius: 50%; background-color: currentColor; } - .kb-table-of-contents-icon-trigger:after, .kb-table-of-contents-icon-trigger:before { + .kb-table-of-contents-icon-trigger:after, + .kb-table-of-contents-icon-trigger:before { background-color: #fff; width: 16px; left: 4px; @@ -211,7 +219,8 @@ } // Arrows .kb-toc-toggle-active { - .kb-toggle-icon-style-arrow, .kb-toggle-icon-style-arrowcircle { + .kb-toggle-icon-style-arrow, + .kb-toggle-icon-style-arrowcircle { .kb-table-of-contents-icon-trigger:before { transform: rotate(-45deg); } @@ -220,8 +229,10 @@ } } } -.kb-toggle-icon-style-arrow, .kb-toggle-icon-style-arrowcircle { - .kb-table-of-contents-icon-trigger:after, .kb-table-of-contents-icon-trigger:before { +.kb-toggle-icon-style-arrow, +.kb-toggle-icon-style-arrowcircle { + .kb-table-of-contents-icon-trigger:after, + .kb-table-of-contents-icon-trigger:before { content: ""; background-color: currentColor; height: 2px; @@ -247,7 +258,8 @@ background-color: currentColor; border-radius: 50%; } - .kb-table-of-contents-icon-trigger:after, .kb-table-of-contents-icon-trigger:before { + .kb-table-of-contents-icon-trigger:after, + .kb-table-of-contents-icon-trigger:before { width: 10px; background-color: #fff; } @@ -259,27 +271,28 @@ } } .kb-table-of-content-nav.kb-toc-toggle-hidden .kb-table-of-content-wrap .kb-table-of-content-list { - height: 0 !important; - padding: 0 !important; - margin: 0 !important; - overflow: hidden; + height: 0 !important; + padding: 0 !important; + margin: 0 !important; + overflow: hidden; + visibility: hidden; } .kb-table-of-contents-title-wrap .kb-table-of-contents-title-btn.kb-table-of-contents-toggle { - box-shadow: none; - background: transparent; - color: inherit; - text-transform: inherit; - display: flex; - align-content: space-between; - align-items: center; - width: 100%; - border-style: solid; - border-width: 0; - padding: 0; - margin: 0; - text-align: inherit; - border-radius: 0; - font-size: inherit; - letter-spacing: inherit; - font-family: inherit; -} \ No newline at end of file + box-shadow: none; + background: transparent; + color: inherit; + text-transform: inherit; + display: flex; + align-content: space-between; + align-items: center; + width: 100%; + border-style: solid; + border-width: 0; + padding: 0; + margin: 0; + text-align: inherit; + border-radius: 0; + font-size: inherit; + letter-spacing: inherit; + font-family: inherit; +} diff --git a/src/plugins/prebuilt-library/editor.scss b/src/plugins/prebuilt-library/editor.scss index 7566bc656..88bbc21f4 100644 --- a/src/plugins/prebuilt-library/editor.scss +++ b/src/plugins/prebuilt-library/editor.scss @@ -418,6 +418,7 @@ button.components-button.kb-reload-context-confirm.has-icon svg { top: 0; z-index: 100; padding-left: 320px; + overflow-y: auto; } .preparing-importing-images { display: flex; diff --git a/wpml-config.xml b/wpml-config.xml index 627763d11..4a0b1bd65 100644 --- a/wpml-config.xml +++ b/wpml-config.xml @@ -4,6 +4,7 @@ + //a/@href @@ -224,75 +225,75 @@ kadence_form - _kad_form_fields - _kad_form_email - _kad_form_mailerlite - _kad_form_fluentcrm - _kad_form_sendinblue - _kad_form_mailchimp - _kad_form_getresponse - _kad_form_convertkit - _kad_form_activecampaign - _kad_form_browservalidation - _kad_form_enableanalytics - _kad_form_redirect - _kad_form_submithide - _kad_form_recaptcha - _kad_form_recaptchaversion - _kad_form_webhook - _kad_form_autoemail - _kad_form_entry - _kad_form_fieldborderradius - _kad_form_tabletfieldborderradius - _kad_form_mobilefieldborderradius - _kad_form_fieldborderradiusunit - _kad_form_description - _kad_form_fieldborderstyle - _kad_form_tabletfieldborderstyle - _kad_form_mobilefieldborderstyle - _kad_form_messages - _kad_form_inputfont - _kad_form_style - _kad_form_background - _kad_form_labelfont - _kad_form_radiolabelfont - _kad_form_helpfont - _kad_form_messagebordersuccess - _kad_form_tabletmessagebordersuccess - _kad_form_mobilemessagebordersuccess - _kad_form_messagebordererror - _kad_form_tabletmessagebordererror - _kad_form_mobilemessagebordererror - _kad_form_anchor - _kad_form_classname - _kad_form_actions - _kad_form_padding - _kad_form_tabletpadding - _kad_form_mobilepadding - _kad_form_paddingunit - _kad_form_margin - _kad_form_tabletmargin - _kad_form_mobilemargin - _kad_form_marginunit - _kad_form_messageborderradius - _kad_form_tabletmessageborderradius - _kad_form_mobilemessageborderradius - _kad_form_messageborderradiusunit - _kad_form_messagepadding - _kad_form_tablemessagepadding - _kad_form_mobilemessagepadding - _kad_form_messagepaddingunit - _kad_form_messagemargin - _kad_form_tabletmessagemargin - _kad_form_mobilemessagemargin - _kad_form_messagemarginunit - _kad_form_messagecolor - _kad_form_messagebackground - _kad_form_messagecolorerror - _kad_form_messagebackgrounderror - _kad_form_messagefont - _kad_form_maxwidthunit - _kad_form_maxwidth - _kad_form_importid + _kad_form_fields + _kad_form_email + _kad_form_mailerlite + _kad_form_fluentcrm + _kad_form_sendinblue + _kad_form_mailchimp + _kad_form_getresponse + _kad_form_convertkit + _kad_form_activecampaign + _kad_form_browservalidation + _kad_form_enableanalytics + _kad_form_redirect + _kad_form_submithide + _kad_form_recaptcha + _kad_form_recaptchaversion + _kad_form_webhook + _kad_form_autoemail + _kad_form_entry + _kad_form_fieldborderradius + _kad_form_tabletfieldborderradius + _kad_form_mobilefieldborderradius + _kad_form_fieldborderradiusunit + _kad_form_description + _kad_form_fieldborderstyle + _kad_form_tabletfieldborderstyle + _kad_form_mobilefieldborderstyle + _kad_form_messages + _kad_form_inputfont + _kad_form_style + _kad_form_background + _kad_form_labelfont + _kad_form_radiolabelfont + _kad_form_helpfont + _kad_form_messagebordersuccess + _kad_form_tabletmessagebordersuccess + _kad_form_mobilemessagebordersuccess + _kad_form_messagebordererror + _kad_form_tabletmessagebordererror + _kad_form_mobilemessagebordererror + _kad_form_anchor + _kad_form_classname + _kad_form_actions + _kad_form_padding + _kad_form_tabletpadding + _kad_form_mobilepadding + _kad_form_paddingunit + _kad_form_margin + _kad_form_tabletmargin + _kad_form_mobilemargin + _kad_form_marginunit + _kad_form_messageborderradius + _kad_form_tabletmessageborderradius + _kad_form_mobilemessageborderradius + _kad_form_messageborderradiusunit + _kad_form_messagepadding + _kad_form_tablemessagepadding + _kad_form_mobilemessagepadding + _kad_form_messagepaddingunit + _kad_form_messagemargin + _kad_form_tabletmessagemargin + _kad_form_mobilemessagemargin + _kad_form_messagemarginunit + _kad_form_messagecolor + _kad_form_messagebackground + _kad_form_messagecolorerror + _kad_form_messagebackgrounderror + _kad_form_messagefont + _kad_form_maxwidthunit + _kad_form_maxwidth + _kad_form_importid