block.json
6 days ago
index-rtl.css
6 days ago
index.asset.php
6 days ago
index.css
6 days ago
index.js
6 days ago
style-index-rtl.css
6 days ago
style-index.css
6 days ago
index.js
1 lines
| 1 | (()=>{"use strict";var e,t={768(){const e=window.wp.blocks,t=window.React;var s,o;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var o in s)({}).hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},r.apply(null,arguments)}const n=window.wp.i18n,a=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"}');(0,e.registerBlockType)(d.UU,{icon:{src:function(e){return t.createElement("svg",r({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})),o||(o=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"})))}},edit:function({clientId:e,attributes:t,setAttributes:s}){const{stepBgColor:o,stepLabel:r,stepDescription:p,hideTitle:d,hideDescription:u,autoAdvance:h}=t,b={};o&&(b.backgroundColor=o);const v=(0,a.useBlockProps)({className:"superb-form-step",style:Object.keys(b).length?b:void 0});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(a.InspectorControls,{children:(0,c.jsxs)(l.PanelBody,{title:(0,n.__)("Step Settings","superb-blocks"),initialOpen:!0,children:[(0,c.jsx)(l.ToggleControl,{label:(0,n.__)("Hide Title","superb-blocks"),help:(0,n.__)("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,n.__)("Hide Description","superb-blocks"),help:(0,n.__)("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,n.__)("Auto-Advance","superb-blocks"),checked:h||!1,onChange:e=>s({autoAdvance:e}),help:(0,n.__)("Automatically advance when the last field in this step is completed.","superb-blocks"),__nextHasNoMarginBottom:!0})]})}),(0,c.jsxs)("div",{...v,children:[(0,c.jsxs)("div",{className:"superb-form-step__header",children:[(0,c.jsx)(a.RichText,{tagName:"h3",className:"superb-form-step__title"+(d?" superb-sr-only":""),value:r,onChange:e=>s({stepLabel:e}),placeholder:(0,n.__)("Step title (optional)","superb-blocks"),allowedFormats:[]}),(0,c.jsx)(a.RichText,{tagName:"p",className:"superb-form-step__description"+(u?" superb-sr-only":""),value:p,onChange:e=>s({stepDescription:e}),placeholder:(0,n.__)("Step description (optional)","superb-blocks"),allowedFormats:["core/bold","core/italic"]})]}),(0,c.jsx)(a.InnerBlocks,{allowedBlocks:[i.UU],templateLock:!1,renderAppender:a.InnerBlocks.ButtonBlockAppender})]})]})},save:function({attributes:e}){const{stepLabel:t,stepDescription:s,hideTitle:o,hideDescription:r,autoAdvance:n}=e,l={},i=p(t),d=p(s);i&&(l["data-step-label"]=i),d&&(l["data-step-description"]=d),n&&(l["data-auto-advance"]="true");const u=["superb-form-step__title",o?"superb-sr-only":""].filter(Boolean).join(" "),h=["superb-form-step__description",r?"superb-sr-only":""].filter(Boolean).join(" "),b=a.useBlockProps.save({className:"superb-form-step",...l});return(0,c.jsxs)("div",{...b,children:[(t||s)&&(0,c.jsxs)("div",{className:"superb-form-step__header",children:[t&&(0,c.jsx)(a.RichText.Content,{tagName:"h3",className:u,value:t}),s&&(0,c.jsx)(a.RichText.Content,{tagName:"p",className:h,value:s})]}),(0,c.jsx)(a.InnerBlocks.Content,{})]})}})}},s={};function o(e){var r=s[e];if(void 0!==r)return r.exports;var n=s[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,s,r,n)=>{if(!s){var a=1/0;for(p=0;p<e.length;p++){for(var[s,r,n]=e[p],l=!0,i=0;i<s.length;i++)(!1&n||a>=n)&&Object.keys(o.O).every((e=>o.O[e](s[i])))?s.splice(i--,1):(l=!1,n<a&&(a=n));if(l){e.splice(p--,1);var c=r();void 0!==c&&(t=c)}}return t}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[s,r,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={53:0,281:0};o.O.j=t=>0===e[t];var t=(t,s)=>{var r,n,[a,l,i]=s,c=0;if(a.some((t=>0!==e[t]))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(i)var p=i(o)}for(t&&t(s);c<a.length;c++)n=a[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.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 r=o.O(void 0,[281],(()=>o(768)));r=o.O(r)})(); |