PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 4.2.0
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v4.2.0
4.2.0 4.1.0 4.0.9 4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / blocks / form-step / index.js
superb-blocks / blocks / form-step Last commit date
block.json 3 weeks ago index-rtl.css 3 weeks ago index.asset.php 1 day ago index.css 3 weeks ago index.js 1 day ago style-index-rtl.css 3 weeks ago style-index.css 3 weeks ago
index.js
1 lines
1 (()=>{"use strict";var e,t={768(){const e=window.wp.blocks,t=window.React;var s,r;function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},o.apply(null,arguments)}const a=window.wp.i18n,n=window.wp.blockEditor,l=window.wp.components,i=(window.wp.data,JSON.parse('{"UU":"superb-addons/form-field"}')),c=window.ReactJSXRuntime;function p(e){return e?e.replace(/<[^>]*>/g,""):""}const d=JSON.parse('{"UU":"superb-addons/form-step","DD":"Superb Form Step"}');(0,e.registerBlockType)(d.UU,{icon:{src:function(e){return t.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 256 256"},e),s||(s=t.createElement("path",{fill:"#6448e7",d:"M240 56v128a16 16 0 0 1-16 16H72v-48h56v-48h56V56Z",opacity:.2})),r||(r=t.createElement("path",{fill:"#6448e7",d:"M248 56a8 8 0 0 1-8 8h-48v40a8 8 0 0 1-8 8h-48v40a8 8 0 0 1-8 8H80v40a8 8 0 0 1-8 8H16a8 8 0 0 1 0-16h48v-40a8 8 0 0 1 8-8h48v-40a8 8 0 0 1 8-8h48V56a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8"})))}},__experimentalLabel:e=>{return t=e&&e.stepLabel,String(t||"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0?39;/g,"'").trim()||d.DD;var t},edit:function({clientId:e,attributes:t,setAttributes:s}){const{stepBgColor:r,stepLabel:o,stepDescription:p,hideTitle:d,hideDescription:u,autoAdvance:b}=t,h={};r&&(h.backgroundColor=r);const g=(0,n.useBlockProps)({className:"superb-form-step",style:Object.keys(h).length?h:void 0});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.InspectorControls,{children:(0,c.jsxs)(l.PanelBody,{title:(0,a.__)("Step Settings","superb-blocks"),initialOpen:!0,children:[(0,c.jsx)(l.ToggleControl,{label:(0,a.__)("Hide Title","superb-blocks"),help:(0,a.__)("Hides the title visually but keeps it accessible to screen readers.","superb-blocks"),checked:d||!1,onChange:e=>s({hideTitle:e}),__nextHasNoMarginBottom:!0}),(0,c.jsx)(l.ToggleControl,{label:(0,a.__)("Hide Description","superb-blocks"),help:(0,a.__)("Hides the description visually but keeps it accessible to screen readers.","superb-blocks"),checked:u||!1,onChange:e=>s({hideDescription:e}),__nextHasNoMarginBottom:!0}),(0,c.jsx)(l.ToggleControl,{label:(0,a.__)("Auto-Advance","superb-blocks"),checked:b||!1,onChange:e=>s({autoAdvance:e}),help:(0,a.__)("Automatically advance when the last field in this step is completed.","superb-blocks"),__nextHasNoMarginBottom:!0})]})}),(0,c.jsxs)("div",{...g,children:[(0,c.jsxs)("div",{className:"superb-form-step__header",children:[(0,c.jsx)(n.RichText,{tagName:"h3",className:"superb-form-step__title"+(d?" superb-sr-only":""),value:o,onChange:e=>s({stepLabel:e}),placeholder:(0,a.__)("Step title (optional)","superb-blocks"),allowedFormats:[]}),(0,c.jsx)(n.RichText,{tagName:"p",className:"superb-form-step__description"+(u?" superb-sr-only":""),value:p,onChange:e=>s({stepDescription:e}),placeholder:(0,a.__)("Step description (optional)","superb-blocks"),allowedFormats:["core/bold","core/italic"]})]}),(0,c.jsx)(n.InnerBlocks,{allowedBlocks:[i.UU],templateLock:!1,renderAppender:n.InnerBlocks.ButtonBlockAppender})]})]})},save:function({attributes:e}){const{stepLabel:t,stepDescription:s,hideTitle:r,hideDescription:o,autoAdvance:a}=e,l={},i=p(t),d=p(s);i&&(l["data-step-label"]=i),d&&(l["data-step-description"]=d),a&&(l["data-auto-advance"]="true");const u=["superb-form-step__title",r?"superb-sr-only":""].filter(Boolean).join(" "),b=["superb-form-step__description",o?"superb-sr-only":""].filter(Boolean).join(" "),h=n.useBlockProps.save({className:"superb-form-step",...l});return(0,c.jsxs)("div",{...h,children:[(t||s)&&(0,c.jsxs)("div",{className:"superb-form-step__header",children:[t&&(0,c.jsx)(n.RichText.Content,{tagName:"h3",className:u,value:t}),s&&(0,c.jsx)(n.RichText.Content,{tagName:"p",className:b,value:s})]}),(0,c.jsx)(n.InnerBlocks.Content,{})]})}})}},s={};function r(e){var o=s[e];if(void 0!==o)return o.exports;var a=s[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,s,o,a)=>{if(!s){var n=1/0;for(p=0;p<e.length;p++){for(var[s,o,a]=e[p],l=!0,i=0;i<s.length;i++)(!1&a||n>=a)&&Object.keys(r.O).every((e=>r.O[e](s[i])))?s.splice(i--,1):(l=!1,a<n&&(n=a));if(l){e.splice(p--,1);var c=o();void 0!==c&&(t=c)}}return t}a=a||0;for(var p=e.length;p>0&&e[p-1][2]>a;p--)e[p]=e[p-1];e[p]=[s,o,a]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={53:0,281:0};r.O.j=t=>0===e[t];var t=(t,s)=>{var o,a,[n,l,i]=s,c=0;if(n.some((t=>0!==e[t]))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(i)var p=i(r)}for(t&&t(s);c<n.length;c++)a=n[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(p)},s=globalThis.webpackChunksuperb_elementor_and_gutenberg_addons=globalThis.webpackChunksuperb_elementor_and_gutenberg_addons||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var o=r.O(void 0,[281],(()=>r(768)));o=r.O(o)})();