Stackable – Page Builder Gutenberg Blocks - Version 0.2

Version Description

  • New: Expand block
  • New: Number box
  • Fixed: Formatting buttons now appear again in blockquote, button, ghost button and pullquote, call-to-action, notification, team member
  • Fixed: Compatibility issues and changes with Gutenberg 2.2
Download this release

Release Info

Developer bfintal
Plugin Icon 128x128 Stackable – Page Builder Gutenberg Blocks
Version 0.2
Comparing to
See all releases

Code changes from version 0.1 to 0.2

dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(l){if(n[l])return n[l].exports;var o=n[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";n.d(t,"e",function(){return a}),n.d(t,"a",function(){return r}),n.d(t,"d",function(){return i}),n.d(t,"c",function(){return c}),n.d(t,"f",function(){return s}),n.d(t,"g",function(){return m}),n.d(t,"i",function(){return u}),n.d(t,"b",function(){return p}),n.d(t,"h",function(){return b});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},o=function(e){return wp.element.createElement("defs",null,wp.element.createElement("linearGradient",l({},e,{gradientTransform:"rotate(90)"}),wp.element.createElement("stop",{offset:"0%",stopColor:"#2FDDD1",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"20%",stopColor:"#30A2E3",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"50%",stopColor:"#F56FAE",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"100%",stopColor:"#FFC58E",stopOpacity:"1"})))},a=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"20",height:"20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M512 96c-111.118 0-215.584 43.272-294.156 121.844S96 400.882 96 512s43.272 215.584 121.844 294.156S400.882 928 512 928s215.584-43.272 294.156-121.844S928 623.118 928 512s-43.272-215.584-121.843-294.156S623.118 96 512 96zm0-96c282.77 0 512 229.23 512 512s-229.23 512-512 512S0 794.77 0 512 229.23 0 512 0zm-64 704h128v128H448zm0-512h128v384H448z"}))},r=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z"}))},i=function(){return wp.element.createElement(r,null)},c=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M4 9h12v2H4V9z"}))},s=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z"}))},m=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 14 32"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M0 29h5.833L0 23h5V9H0l5.833-6H0V0h14v3H8.167L14 9H9v14h5l-5.833 6H14v3H0v-3z"}))},u=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 13 12.916010856628418"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M5.68 12.916a.5.5 0 0 1-.397-.196L3.208 10H1.463C.656 10 0 9.428 0 8.621V1.463C0 .656.656 0 1.463 0h10.074C12.344 0 13 .656 13 1.463v7.158C13 9.428 12.344 10 11.537 10H8.151l-2.073 2.72a.504.504 0 0 1-.398.196zM1.463 1A.464.464 0 0 0 1 1.463v7.158c0 .255.208.463.463.463h1.993a.5.5 0 0 1 .397.196l1.827 2.312L7.507 9.28a.502.502 0 0 1 .397-.196h3.633A.464.464 0 0 0 12 8.621V1.463A.464.464 0 0 0 11.537 1H1.463zm1.193 2h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49zm0 3h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49z"}))},p=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 75.22699737548828 73.15494537353516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M14.941 14.912C6.689 14.912 0 21.601 0 29.853s6.689 14.941 14.941 14.941a2.712 2.712 0 0 0 2.676-2.296h.043V17.632a2.72 2.72 0 0 0-2.719-2.72zM75.227 2.719A2.72 2.72 0 0 0 72.508 0c-.623 0-1.19.218-1.648.57L46.934 14.384H25.366a2.719 2.719 0 0 0-2.719 2.719v25.809h.034a2.71 2.71 0 0 0 2.685 2.383h19.138l26.16 15.103c.485.45 1.13.731 1.844.731a2.72 2.72 0 0 0 2.719-2.719c0-.103-.019-.201-.03-.301h.03V2.877h-.016c.003-.053.016-.103.016-.158zM43.825 65.977l-.038-.066c-.013-.024-.019-.049-.033-.073s-.032-.042-.046-.064l-8.305-14.383-.031.018a2.7 2.7 0 0 0-1.857-1.096v-.03h-7.222v.018a2.693 2.693 0 0 0-1.135.347 2.718 2.718 0 0 0-.995 3.714c.064.11.142.206.219.303l-.032.019 9.678 16.764.002.005a.014.014 0 0 0 .003.004l.097.168.017-.01a2.71 2.71 0 0 0 3.596.832c.145-.084.276-.183.399-.287l.025.043 4.983-2.876-.023-.04a2.708 2.708 0 0 0 .691-3.306l.007-.004z"}))},b=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 896 1023"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"}))}},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(3),n(6),n(9),n(12),n(15),n(21),n(24),n(27),n(30),n(33)},function(e,t,n){"use strict";var l=n(4),o=(n.n(l),n(5)),a=(n.n(o),n(0)),r=wp.i18n.__;(0,wp.blocks.registerBlockType)("ugb/spacer",{title:r("Spacer","UGB"),icon:a.g,category:"layout",keywords:[r("Spacer"),r("Stackable")],attributes:{height:{default:50,type:"number"}},edit:function(e){var t=e.focus,n=wp.blocks.InspectorControls,l=wp.blocks.InspectorControls,o=l.RangeControl,a=(l.TextControl,e.attributes.height);return[!!t&&wp.element.createElement(n,{key:"inspector"},wp.element.createElement(o,{label:r("Height"),value:a,min:"30",max:"200",onChange:function(t){e.setAttributes({height:t})}})),wp.element.createElement("div",{className:e.className,style:{height:a+"px"}})]},save:function(e){var t=e.attributes.height;return wp.element.createElement("div",{className:e.className,style:{height:t+"px"}})}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(7),o=(n.n(l),n(8)),a=(n.n(o),n(0)),r=wp.i18n.__,i=wp.blocks.registerBlockType,c=wp.components.PanelColor;i("ugb/divider",{title:r("Divider","UGB"),icon:a.c,category:"layout",keywords:[r("Divider"),r("Stackable")],attributes:{height:{default:1,type:"number"},width:{default:50,type:"number"},color:{type:"string",default:"#dddddd"},alignment:{type:"string",default:"center"}},edit:function(e){var t=e.focus,n=wp.blocks,l=n.InspectorControls,o=n.ColorPalette,a=n.BlockControls,i=n.AlignmentToolbar,s=wp.blocks.InspectorControls,m=s.RangeControl,u=(s.TextControl,e.attributes),p=u.height,b=u.width,d=u.color,f=u.alignment;return[!!t&&wp.element.createElement(a,{key:"controls"},wp.element.createElement(i,{value:f,onChange:function(t){e.setAttributes({alignment:t})}})),!!t&&wp.element.createElement(l,{key:"inspector"},wp.element.createElement(m,{label:r("Height"),value:p,min:"1",max:"10",onChange:function(t){e.setAttributes({height:t})}}),wp.element.createElement(m,{label:r("Width"),value:b,min:"10",max:"100",step:"0.1",onChange:function(t){e.setAttributes({width:t})}}),wp.element.createElement(c,{title:r("Divider Color"),colorValue:d,initialOpen:!1},wp.element.createElement(o,{value:d,onChange:function(t){return e.setAttributes({color:t})}}))),wp.element.createElement("div",{className:"ugb-divider",style:{paddingTop:8,paddingBottom:8}},wp.element.createElement("hr",{align:f,style:{marginTop:0,marginBottom:0,backgroundColor:d,width:b+"%",height:p}}))]},save:function(e){var t=e.attributes,n=t.height,l=t.width,o=t.color,a=t.alignment;return wp.element.createElement("div",{className:"ugb-divider"},wp.element.createElement("hr",{align:a,style:{backgroundColor:o,width:l+"%",height:n}}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=n(10),i=(n.n(r),n(11)),c=(n.n(i),n(0)),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,u=wp.element.Component,p=wp.blocks.registerBlockType,b=wp.components,d=b.PanelColor,f=b.Dashicon,g=b.IconButton,w=wp.blocks,h=w.InspectorControls,y=w.BlockControls,E=w.AlignmentToolbar,v=w.Editable,k=w.ColorPalette,C=w.UrlInput,T=wp.blocks.InspectorControls,N=T.SelectControl,x=T.RangeControl,R=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.focus,n=e.setFocus,l=(e.className,e.setAttributes),o=this.props.attributes,a=o.url,r=o.title,i=o.text,c=o.color,s=o.textColor,u=o.size,p=o.textAlignment,b=o.cornerButtonRadius,w=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(y,{key:"controls"},wp.element.createElement(E,{value:p,onChange:function(e){l({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+p},wp.element.createElement(v,{tagName:"span",placeholder:m("Enter Text"),value:i,focus:t,onFocus:n,onChange:function(e){return l({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+u,style:{backgroundColor:c,color:s,borderRadius:b+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(h,{key:"inspector"},wp.element.createElement(N,{label:m("Size"),value:u,options:w.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({size:e})}}),wp.element.createElement(x,{label:m("Corner Radius"),value:b,min:"1",max:"50",onChange:function(e){return l({cornerButtonRadius:e})}}),wp.element.createElement(d,{title:m("Background Color"),colorValue:c,initialOpen:!1},wp.element.createElement(k,{value:c,onChange:function(e){return l({color:e})}})),wp.element.createElement(d,{title:m("Text Color"),colorValue:s,initialOpen:!1},wp.element.createElement(k,{value:s,onChange:function(e){return l({textColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+p},wp.element.createElement(f,{icon:"admin-links"}),wp.element.createElement(C,{value:a,onChange:function(e){return l({url:e})}}),wp.element.createElement(g,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(u);p("ugb/button",{title:m("Button","UGB"),icon:c.a,category:"layout",keywords:[m("Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:4}},edit:R,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,a=t.color,r=t.textColor,i=t.size,c=t.cornerButtonRadius,s={backgroundColor:a,color:r,borderRadius:c+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+i,style:s},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=n(13),i=(n.n(r),n(14)),c=(n.n(i),n(0)),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,u=wp.element.Component,p=wp.blocks,b=p.registerBlockType,d=p.InspectorControls,f=p.BlockControls,g=p.Editable,w=p.AlignmentToolbar,h=(p.ToggleControl,p.ColorPalette),y=(p.ContrastChecker,p.UrlInput),E=wp.components,v=E.PanelColor,k=(E.PanelBody,E.IconButton),C=(E.withFallbackStyles,E.Dashicon),T=wp.blocks.InspectorControls,N=T.SelectControl,x=T.RangeControl,R=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.focus,n=e.setFocus,l=e.setAttributes,o=this.props.attributes,a=o.url,r=o.title,i=o.text,c=o.color,s=o.size,u=o.textAlignment,p=o.cornerButtonRadius,b=o.borderThickness,E=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal ")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(f,{key:"controls"},wp.element.createElement(w,{value:u,onChange:function(e){l({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+u},wp.element.createElement(g,{tagName:"span",placeholder:m("Enter Text"),value:i,focus:t,onFocus:n,onChange:function(e){return l({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+s+" ugb-ghost-button",style:{borderColor:c,color:c,borderRadius:p+"px",borderWidth:b+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(N,{label:m("Size"),value:s,options:E.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({size:e})}}),wp.element.createElement(x,{label:m("Corner Radius"),value:p,min:"1",max:"50",onChange:function(e){return l({cornerButtonRadius:e})}}),wp.element.createElement(x,{label:m("Border Thickness"),value:b,min:"1",max:"10",onChange:function(e){return l({borderThickness:e})}}),wp.element.createElement(v,{title:m("Button Color"),colorValue:c,initialOpen:!1},wp.element.createElement(h,{value:c,onChange:function(e){return l({color:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+u},wp.element.createElement(C,{icon:"admin-links"}),wp.element.createElement(y,{value:a,onChange:function(e){return l({url:e})}}),wp.element.createElement(k,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(u);b("ugb/ghost-button",{title:m("Ghost Button"),icon:c.d,category:"layout",keywords:[m("Ghost Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string"},textColor:{type:"string"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:"4"},borderThickness:{type:"number",default:"1"}},edit:R,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,a=t.color,r=t.size,i=t.cornerButtonRadius,c=t.borderThickness,s={borderColor:a,color:a,borderRadius:i+"px",borderWidth:c+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+r+" ugb-ghost-button",style:s},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(16),o=(n.n(l),n(17)),a=(n.n(o),n(18)),r=n.n(a),i=n(0),c=wp.i18n.__,s=(wp.element.Component,wp.components.PanelColor),m=wp.blocks,u=m.registerBlockType,p=m.InspectorControls,b=m.Editable,d=m.ColorPalette,f=wp.blocks.InspectorControls,g=f.SelectControl,w=f.ToggleControl;u("ugb/notification",{title:c("Notification","UGB"),icon:i.e,category:"layout",keywords:[c("Notification"),c("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:c("This is an informational alert, usually used for successful subscriptions, promo announcements, and the like.")},color:{type:"string"},textColor:{type:"string"},notifType:{type:"string",default:"success"},dismissible:{type:"boolean",default:!1}},edit:function(e){var t=[{value:"success",label:c("Success")},{value:"error",label:c("Error")},{value:"warning",label:c("Warning")},{value:"info",label:c("Information")}],n=e.focus,l=e.setFocus,o=e.setAttributes,a=(e.className,e.attributes),r=a.text,i=a.color,m=a.textColor,u=a.notifType,f=a.dismissible;return wp.element.createElement("div",{key:"editable",className:"ugb-notification type-"+u+" dismissible-"+f},f&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:m}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement(b,{tagName:"p",placeholder:e.attributes.text.default,value:r,focus:n,onFocus:l,onChange:function(e){return o({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-notif notif-"+u,style:{backgroundColor:i,color:m},keepPlaceholderOnFocus:!0}),n&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(w,{label:c("Dismissible"),checked:f,onChange:function(){return o({dismissible:!f})}}),wp.element.createElement(g,{label:c("Notification Type"),value:u,options:t.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({notifType:e})}}),wp.element.createElement(s,{title:c("Background Color"),colorValue:i,initialOpen:!1},wp.element.createElement(d,{value:i,onChange:function(e){return o({color:e})}})),wp.element.createElement(s,{title:c("Text Color"),colorValue:m,initialOpen:!1},wp.element.createElement(d,{value:m,onChange:function(e){return o({textColor:e})}}))))},save:function(e){var t=e.attributes,n=t.text,l=t.color,o=t.textColor,a=t.notifType,i=t.dismissible,c={backgroundColor:l,color:o},s=r()(n+a).substr(0,6);return wp.element.createElement("div",{className:"ugb-notification type-"+a+" dismissible-"+i,"data-uid":s},i&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:o}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement("p",{className:"wp-ugb-notif notif-"+a,style:c},n))}})},function(e,t){},function(e,t){},function(e,t,n){!function(){var t=n(19),l=n(1).utf8,o=n(20),a=n(1).bin,r=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?a.stringToBytes(e):l.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var i=t.bytesToWords(e),c=8*e.length,s=1732584193,m=-271733879,u=-1732584194,p=271733878,b=0;b<i.length;b++)i[b]=16711935&(i[b]<<8|i[b]>>>24)|4278255360&(i[b]<<24|i[b]>>>8);i[c>>>5]|=128<<c%32,i[14+(c+64>>>9<<4)]=c;for(var d=r._ff,f=r._gg,g=r._hh,w=r._ii,b=0;b<i.length;b+=16){var h=s,y=m,E=u,v=p;s=d(s,m,u,p,i[b+0],7,-680876936),p=d(p,s,m,u,i[b+1],12,-389564586),u=d(u,p,s,m,i[b+2],17,606105819),m=d(m,u,p,s,i[b+3],22,-1044525330),s=d(s,m,u,p,i[b+4],7,-176418897),p=d(p,s,m,u,i[b+5],12,1200080426),u=d(u,p,s,m,i[b+6],17,-1473231341),m=d(m,u,p,s,i[b+7],22,-45705983),s=d(s,m,u,p,i[b+8],7,1770035416),p=d(p,s,m,u,i[b+9],12,-1958414417),u=d(u,p,s,m,i[b+10],17,-42063),m=d(m,u,p,s,i[b+11],22,-1990404162),s=d(s,m,u,p,i[b+12],7,1804603682),p=d(p,s,m,u,i[b+13],12,-40341101),u=d(u,p,s,m,i[b+14],17,-1502002290),m=d(m,u,p,s,i[b+15],22,1236535329),s=f(s,m,u,p,i[b+1],5,-165796510),p=f(p,s,m,u,i[b+6],9,-1069501632),u=f(u,p,s,m,i[b+11],14,643717713),m=f(m,u,p,s,i[b+0],20,-373897302),s=f(s,m,u,p,i[b+5],5,-701558691),p=f(p,s,m,u,i[b+10],9,38016083),u=f(u,p,s,m,i[b+15],14,-660478335),m=f(m,u,p,s,i[b+4],20,-405537848),s=f(s,m,u,p,i[b+9],5,568446438),p=f(p,s,m,u,i[b+14],9,-1019803690),u=f(u,p,s,m,i[b+3],14,-187363961),m=f(m,u,p,s,i[b+8],20,1163531501),s=f(s,m,u,p,i[b+13],5,-1444681467),p=f(p,s,m,u,i[b+2],9,-51403784),u=f(u,p,s,m,i[b+7],14,1735328473),m=f(m,u,p,s,i[b+12],20,-1926607734),s=g(s,m,u,p,i[b+5],4,-378558),p=g(p,s,m,u,i[b+8],11,-2022574463),u=g(u,p,s,m,i[b+11],16,1839030562),m=g(m,u,p,s,i[b+14],23,-35309556),s=g(s,m,u,p,i[b+1],4,-1530992060),p=g(p,s,m,u,i[b+4],11,1272893353),u=g(u,p,s,m,i[b+7],16,-155497632),m=g(m,u,p,s,i[b+10],23,-1094730640),s=g(s,m,u,p,i[b+13],4,681279174),p=g(p,s,m,u,i[b+0],11,-358537222),u=g(u,p,s,m,i[b+3],16,-722521979),m=g(m,u,p,s,i[b+6],23,76029189),s=g(s,m,u,p,i[b+9],4,-640364487),p=g(p,s,m,u,i[b+12],11,-421815835),u=g(u,p,s,m,i[b+15],16,530742520),m=g(m,u,p,s,i[b+2],23,-995338651),s=w(s,m,u,p,i[b+0],6,-198630844),p=w(p,s,m,u,i[b+7],10,1126891415),u=w(u,p,s,m,i[b+14],15,-1416354905),m=w(m,u,p,s,i[b+5],21,-57434055),s=w(s,m,u,p,i[b+12],6,1700485571),p=w(p,s,m,u,i[b+3],10,-1894986606),u=w(u,p,s,m,i[b+10],15,-1051523),m=w(m,u,p,s,i[b+1],21,-2054922799),s=w(s,m,u,p,i[b+8],6,1873313359),p=w(p,s,m,u,i[b+15],10,-30611744),u=w(u,p,s,m,i[b+6],15,-1560198380),m=w(m,u,p,s,i[b+13],21,1309151649),s=w(s,m,u,p,i[b+4],6,-145523070),p=w(p,s,m,u,i[b+11],10,-1120210379),u=w(u,p,s,m,i[b+2],15,718787259),m=w(m,u,p,s,i[b+9],21,-343485551),s=s+h>>>0,m=m+y>>>0,u=u+E>>>0,p=p+v>>>0}return t.endian([s,m,u,p])};r._ff=function(e,t,n,l,o,a,r){var i=e+(t&n|~t&l)+(o>>>0)+r;return(i<<a|i>>>32-a)+t},r._gg=function(e,t,n,l,o,a,r){var i=e+(t&l|n&~l)+(o>>>0)+r;return(i<<a|i>>>32-a)+t},r._hh=function(e,t,n,l,o,a,r){var i=e+(t^n^l)+(o>>>0)+r;return(i<<a|i>>>32-a)+t},r._ii=function(e,t,n,l,o,a,r){var i=e+(n^(t|~l))+(o>>>0)+r;return(i<<a|i>>>32-a)+t},r._blocksize=16,r._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var l=t.wordsToBytes(r(e,n));return n&&n.asBytes?l:n&&n.asString?a.bytesToString(l):t.bytesToHex(l)}}()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,l=0;n<e.length;n++,l+=8)t[l>>>5]|=e[n]<<24-l%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],l=0;l<e.length;l+=3)for(var o=e[l]<<16|e[l+1]<<8|e[l+2],a=0;a<4;a++)8*l+6*a<=8*e.length?n.push(t.charAt(o>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],l=0,o=0;l<e.length;o=++l%4)0!=o&&n.push((t.indexOf(e.charAt(l-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(l))>>>6-2*o);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||l(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var l=n(22),o=(n.n(l),n(23)),a=(n.n(o),n(0)),r=wp.i18n.__,i=(wp.element.Component,wp.components.PanelColor),c=wp.blocks,s=c.registerBlockType,m=c.InspectorControls,u=c.Editable,p=c.ColorPalette,b=(c.BlockControls,wp.blocks.InspectorControls);b.SelectControl,b.RangeControl;s("ugb/blockquote",{title:r("Blockquote","UGB"),icon:a.f,category:"common",keywords:[r("Blockquote"),r("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:r("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#424242"},borderColor:{type:"string",default:"#2091e1"}},edit:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor,a=e.focus,c=e.setFocus,s=e.setAttributes;e.className;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-blockquote",style:{borderLeftColor:o}},wp.element.createElement(u,{tagName:"p",className:"ugb-blockquote-text",value:l,onChange:function(e){return s({text:e})},focus:a,onFocus:c,formattingControls:["bold","strikethrough","link"],keepPlaceholderOnFocus:!0,style:{color:n}})),a&&wp.element.createElement(m,{key:"inspector"},wp.element.createElement(i,{title:r("Text Color"),colorValue:n,initialOpen:!1},wp.element.createElement(p,{value:n,onChange:function(e){return s({color:e})}})),wp.element.createElement(i,{title:r("Border Color"),colorValue:o,initialOpen:!1},wp.element.createElement(p,{value:o,onChange:function(e){return s({borderColor:e})}})))]},save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-blockquote",style:{borderLeftColor:o,color:n}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(25),o=(n.n(l),n(26)),a=(n.n(o),n(0)),r=wp.i18n.__,i=(wp.element.Component,wp.components.PanelColor),c=wp.blocks,s=c.registerBlockType,m=c.InspectorControls,u=c.Editable,p=c.ColorPalette,b=wp.blocks.InspectorControls;b.SelectControl,b.RangeControl;s("ugb/pullquote",{title:r("Pullquote","UGB"),icon:a.f,category:"formatting",keywords:[r("Pullquote"),r("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:r("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#2091e1"},borderColor:{type:"string",default:"#2091e1"}},edit:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor,a=e.focus,c=e.setFocus,s=e.setAttributes;e.className;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-pullquote",style:{borderTopColor:o,borderBottomColor:o}},wp.element.createElement(u,{tagName:"p",className:"ugb-pullquote-text",value:l,onChange:function(e){return s({text:e})},focus:a,onFocus:c,placeholder:r("Write quote\u2026"),formattingControls:["bold","italic","strikethrough","link"],keepPlaceholderOnFocus:!0,style:{color:n}})),a&&wp.element.createElement(m,{key:"inspector"},wp.element.createElement(i,{title:r("Text Color"),colorValue:n,initialOpen:!1},wp.element.createElement(p,{value:n,onChange:function(e){return s({color:e})}})),wp.element.createElement(i,{title:r("Border Color"),colorValue:o,initialOpen:!1},wp.element.createElement(p,{value:o,onChange:function(e){return s({borderColor:e})}})))]},save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-pullquote",style:{borderTopColor:o,borderBottomColor:o,color:n}},wp.element.createElement("p",null,l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=n(28),i=(n.n(r),n(29)),c=(n.n(i),n(0)),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,u=wp.element.Component,p=wp.blocks.registerBlockType,b=wp.components,d=b.PanelColor,f=b.Dashicon,g=b.IconButton,w=wp.blocks,h=w.InspectorControls,y=(w.BlockControls,w.AlignmentToolbar,w.Editable),E=w.ColorPalette,v=w.UrlInput,k=wp.blocks.InspectorControls,C=k.SelectControl,T=k.RangeControl,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.focus,n=e.setFocus,l=(e.mergeBlocks,e.className,e.onReplace,e.setAttributes),o=t?t.editable||"ctaTitle":null,a=this.props.attributes,r=a.url,i=a.buttonText,c=(a.title,a.ctaTitle),s=a.bodyText,u=a.color,p=a.textColor,b=a.size,w=a.borderButtonRadius,k=a.bodyTextColor,N=a.titleColor,x=a.bgColor,R=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[wp.element.createElement("div",{key:"editable",className:"ugb-cta",style:{backgroundColor:x}},wp.element.createElement(y,{className:"ugb-cta-title",tagName:"h3",placeholder:m("Add Title"),value:c,focus:"ctaTitle"===o?t:null,onChange:function(e){return l({ctaTitle:e})},keepPlaceholderOnFocus:!0,onFocus:function(e){return n(Object.assign({},e,{editable:"ctaTitle"}))},style:{color:N}}),wp.element.createElement(y,{tagName:"p",value:s,className:"ugb-cta-bodyText",onChange:function(e){return l({bodyText:e})},focus:"bodyText"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"bodyText"}))},placeholder:m("Write body text\u2026"),style:{color:k}}),wp.element.createElement("span",{key:"button",className:"wp-block-button ugb-cta-button"},wp.element.createElement(y,{tagName:"span",placeholder:m("Add Text"),value:i,focus:"buttonText"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"buttonText"}))},onChange:function(e){return l({buttonText:e})},className:"wp-ugb-button ugb-button-"+b,style:{backgroundColor:u,color:p,borderRadius:w+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(h,{key:"inspector"},wp.element.createElement(C,{label:m("Button Size"),value:b,options:R.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({size:e})}}),wp.element.createElement(T,{label:m("Button Border Radius"),value:w,min:"1",max:"50",onChange:function(e){return l({borderButtonRadius:e})}}),wp.element.createElement(d,{title:m("Title Color"),colorValue:N,initialOpen:!1},wp.element.createElement(E,{value:u,onChange:function(e){return l({titleColor:e})}})),wp.element.createElement(d,{title:m("Body Text Color"),colorValue:k,initialOpen:!1},wp.element.createElement(E,{value:u,onChange:function(e){return l({bodyTextColor:e})}})),wp.element.createElement(d,{title:m("Button Background Color"),colorValue:u,initialOpen:!1},wp.element.createElement(E,{value:u,onChange:function(e){return l({color:e})}})),wp.element.createElement(d,{title:m("Button Text Color"),colorValue:p,initialOpen:!1},wp.element.createElement(E,{value:p,onChange:function(e){return l({textColor:e})}})),wp.element.createElement(d,{title:m("Background Color"),colorValue:x,initialOpen:!1},wp.element.createElement(E,{value:x,onChange:function(e){return l({bgColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link"},wp.element.createElement(f,{icon:"admin-links"}),wp.element.createElement(v,{value:r,onChange:function(e){return l({url:e})}}),wp.element.createElement(g,{icon:"editor-break",label:m("Apply"),type:"submit"})))]}}]),t}(u);p("ugb/cta",{title:m("Call to Action","UGB"),icon:c.b,category:"layout",keywords:[m("Call to Action"),m("Stackable"),m("CTA")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},ctaTitle:{type:"array",source:"children",selector:"h3",default:m("Get Started Today")},bodyText:{type:"array",source:"children",selector:"p",default:m("Get Stackable: Ultimate Gutenberg Blocks today.\xa0 Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg\u2019s functionality.")},buttonText:{type:"array",source:"children",selector:"a"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},titleColor:{type:"string"},bodyTextColor:{type:"string"},bgColor:{type:"string"},size:{type:"string",default:"normal"},borderButtonRadius:{type:"number",default:4}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.buttonText),o=t.ctaTitle,a=t.bodyText,r=t.color,i=t.textColor,c=t.size,s=t.borderButtonRadius,m=t.bodyTextColor,u=t.titleColor,p=t.bgColor,b={backgroundColor:r,color:i,borderRadius:s+"px"};return wp.element.createElement("div",{className:"ugb-cta",style:{backgroundColor:p}},o&&!!o.length&&wp.element.createElement("h3",{className:"ugb-cta-title",style:{color:u}},o),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-cta-bodyText",style:{color:m}},a),l&&!!l.length&&wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-cta-button ugb-button-"+c,style:b},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(31),o=(n.n(l),n(32)),a=(n.n(o),n(0)),r=wp.i18n.__,i=(wp.element.Component,wp.blocks.registerBlockType),c=wp.components,s=c.PanelColor,m=c.Button,u=wp.blocks,p=u.InspectorControls,b=u.Editable,d=u.ColorPalette,f=u.MediaUpload,g=u.BlockControls,w=(u.AlignmentToolbar,wp.blocks.InspectorControls.SelectControl);i("ugb/testimonial",{title:r("Testimonial","Stackable"),icon:a.i,category:"common",keywords:[r("Testimonial"),r("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-testimonial-column-one .testimonial-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-testimonial-column-two .testimonial-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-testimonial-column-three .testimonial-image",attribute:"data-src"},testimonialTitle:{type:"array",source:"children",selector:".ugb-testimonial-column-one h4",default:r("Ben Adams")},testimonialTitleTwo:{type:"array",source:"children",selector:".ugb-testimonial-column-two h4",default:r("Alex Johnson")},testimonialTitleThree:{type:"array",source:"children",selector:".ugb-testimonial-column-three h4",default:r("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-testimonial-position",default:r("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-testimonial-position-two",default:r("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-testimonial-position-three",default:r("Programmer")},body:{type:"array",source:"children",selector:".ugb-testimonial-body",default:r("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyTwo:{type:"array",source:"children",selector:".ugb-testimonial-body-two",default:r("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyThree:{type:"array",source:"children",selector:".ugb-testimonial-body-three",default:r("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},titleColor:{type:"string"},posColor:{type:"string"},bodyTextColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"}},edit:function(e){var t=e.focus,n=e.setFocus,l=(e.className,e.setAttributes),o=t?t.editable||"testimonialTitle":null,a=e.attributes,i=(a.url,a.title,a.testimonialTitle),c=a.testimonialTitleTwo,u=a.testimonialTitleThree,h=a.body,y=a.bodyTwo,E=a.bodyThree,v=a.position,k=a.positionTwo,C=a.positionThree,T=(a.href,a.hrefTwo,a.hrefThree,a.mediaID),N=a.mediaIDTwo,x=a.mediaIDThree,R=a.mediaURL,L=a.mediaURLTwo,O=a.mediaURLThree,U=a.columns,B=a.titleColor,A=a.posColor,I=a.bodyTextColor,_=a.iconColor,S=[{value:"1",label:r("One Column")},{value:"2",label:r("Two Column")},{value:"3",label:r("Three Column")}];return[wp.element.createElement(g,{key:"controls"}),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(w,{label:r("Column Number"),value:U,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({columns:e})}}),wp.element.createElement(s,{title:r("Title Color"),colorValue:B,initialOpen:!1},wp.element.createElement(d,{value:B,onChange:function(e){return l({titleColor:e})}})),wp.element.createElement(s,{title:r("Position Color"),colorValue:A,initialOpen:!1},wp.element.createElement(d,{value:A,onChange:function(e){return l({posColor:e})}})),wp.element.createElement(s,{title:r("Body Text Color"),colorValue:I,initialOpen:!1},wp.element.createElement(d,{value:I,onChange:function(e){return l({bodyTextColor:e})}})),wp.element.createElement(s,{title:r("Icon Color"),colorValue:_,initialOpen:!1},wp.element.createElement(d,{value:_,onChange:function(e){return l({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-testimonial column-"+U},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURL:e.url,mediaID:e.id})},type:"image",value:T,render:function(e){return wp.element.createElement(m,{className:T?"":"button button-large",onClick:e.open},T?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+R+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:i,focus:"testimonialTitle"===o?t:null,onChange:function(e){return l({testimonialTitle:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"testimonialTitle"}))},style:{color:B},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:v,className:"ugb-testimonial-position",onChange:function(e){return l({position:e})},focus:"position"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"position"}))},placeholder:r("Add position\u2026"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:h,className:"ugb-testimonial-body",onChange:function(e){return l({body:e})},focus:"body"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"body"}))},placeholder:r("Add body\u2026"),style:{color:I},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-two"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(m,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+L+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:c,focus:"testimonialTitleTwo"===o?t:null,onChange:function(e){return l({testimonialTitleTwo:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"testimonialTitleTwo"}))},style:{color:B},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:k,className:"ugb-testimonial-position-two",onChange:function(e){return l({positionTwo:e})},focus:"positionTwo"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"positionTwo"}))},placeholder:r("Add position\u2026"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:y,className:"ugb-testimonial-body-two",onChange:function(e){return l({bodyTwo:e})},focus:"bodyTwo"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"bodyTwo"}))},placeholder:r("Add body\u2026"),style:{color:I},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-three"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(m,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+O+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:u,focus:"testimonialTitleThree"===o?t:null,onChange:function(e){return l({testimonialTitleThree:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"testimonialTitleThree"}))},style:{color:B},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:C,className:"ugb-testimonial-position-three",onChange:function(e){return l({positionThree:e})},focus:"positionThree"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"positionThree"}))},placeholder:r("Add position\u2026"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:E,className:"ugb-testimonial-body-three",onChange:function(e){return l({bodyThree:e})},focus:"bodyThree"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"bodyThree"}))},placeholder:r("Add body\u2026"),style:{color:I},keepPlaceholderOnFocus:!0})))]},save:function(e){var t=e.attributes,n=(t.url,t.title,t.testimonialTitle),l=t.testimonialTitleTwo,o=t.testimonialTitleThree,a=t.body,r=t.bodyTwo,i=t.bodyThree,c=t.position,s=t.positionTwo,m=t.positionThree,u=t.mediaURL,p=t.mediaURLTwo,b=t.mediaURLThree,d=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.titleColor),f=t.posColor,g=t.bodyTextColor,w=t.iconColor,h=t.columns,y=wp.element.createElement("div",{key:"button",className:"quote-icon"},wp.element.createElement("svg",{viewBox:"0 0 246 187.5",style:{fill:w}},wp.element.createElement("path",{d:"M98.5,0h-93C2.5,0,0,2.5,0,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C104,2.5,101.5,0,98.5,0z"}),wp.element.createElement("path",{d:"M240.5,0h-93c-3,0-5.5,2.5-5.5,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C246,2.5,243.5,0,240.5,0z"}),wp.element.createElement("path",{d:"M161.3-86.3c3.2,0,3.2-5,0-5C158.1-91.3,158.1-86.3,161.3-86.3L161.3-86.3z"})));return wp.element.createElement("div",{className:"ugb-testimonial column-"+h},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},u?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+u+")"},"data-src":u}):y,n&&!!n.length&&wp.element.createElement("h4",{style:{color:d}},n),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-testimonial-position",style:{color:f}},c),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-testimonial-body",style:{color:g}},a)),h>1&&wp.element.createElement("div",{className:"ugb-testimonial-column-two"},p?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+p+")"},"data-src":p}):y,l&&!!l.length&&wp.element.createElement("h4",{style:{color:d}},l),s&&!!s.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-two",style:{color:f}},s),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-two",style:{color:g}},r)),h>2&&wp.element.createElement("div",{className:"ugb-testimonial-column-three"},b?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+b+")"},"data-src":b}):y,o&&!!o.length&&wp.element.createElement("h4",{style:{color:d}},o),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-three",style:{color:f}},m),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-three",style:{color:g}},i)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(34),o=(n.n(l),n(35)),a=(n.n(o),n(0)),r=wp.i18n.__,i=(wp.element.Component,wp.blocks.registerBlockType),c=wp.components,s=c.PanelColor,m=c.Button,u=wp.blocks,p=u.InspectorControls,b=u.Editable,d=u.ColorPalette,f=u.MediaUpload,g=u.BlockControls,w=(u.AlignmentToolbar,wp.blocks.InspectorControls),h=w.SelectControl,y=w.TextControl;i("ugb/team-member",{title:r("Team Member","Stackable"),icon:a.h,category:"common",keywords:[r("Team Member"),r("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-team-member-column-one .team-member-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-team-member-column-two .team-member-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-team-member-column-three .team-member-image",attribute:"data-src"},name:{type:"array",source:"children",selector:".ugb-team-member-column-one h4",default:r("Ben Adams")},nameTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two h4",default:r("Alex Johnson")},nameThree:{type:"array",source:"children",selector:".ugb-team-member-column-three h4",default:r("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-team-member-column-one .ugb-team-member-position",default:r("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two .ugb-team-member-position",default:r("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-team-member-column-three .ugb-team-member-position",default:r("Programmer")},des:{type:"array",source:"children",selector:".ugb-team-member-des",default:r("Ben is the head of our small team. He loves walking his dog, Walter, when he has some free time.")},desTwo:{type:"array",source:"children",selector:".ugb-team-member-des-two",default:r("Alex handles all written content. She enjoys painting and playing softball on the weekends.")},desThree:{type:"array",source:"children",selector:".ugb-team-member-des-three",default:r("Sammy is our programmer. You'll usually find her nose in a book. She has a cat named Skitty.")},nameColor:{type:"string"},posColor:{type:"string"},desColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"},shapes:{type:"select",default:"square"},facebookURL:{type:"url"},twitterURL:{type:"url"},instagramURL:{type:"url"},linkedURL:{type:"url"},emailAddress:{type:"string"},facebookURLTwo:{type:"url"},twitterURLTwo:{type:"url"},instagramURLTwo:{type:"url"},linkedURLTwo:{type:"url"},emailAddressTwo:{type:"string"},facebookURLThree:{type:"url"},twitterURLThree:{type:"url"},instagramURLThree:{type:"url"},linkedURLThree:{type:"url"},emailAddressThree:{type:"string"}},edit:function(e){var t=e.focus,n=e.setFocus,l=(e.className,e.setAttributes),o=t?t.editable||"name":null,a=e.attributes,i=(a.url,a.title,a.name),c=a.nameTwo,u=a.nameThree,w=a.des,E=a.desTwo,v=a.desThree,k=a.position,C=a.positionTwo,T=a.positionThree,N=(a.href,a.hrefTwo,a.hrefThree,a.mediaID),x=a.mediaIDTwo,R=a.mediaIDThree,L=a.mediaURL,O=a.mediaURLTwo,U=a.mediaURLThree,B=a.columns,A=a.nameColor,I=a.posColor,_=a.desColor,S=a.iconColor,F=a.shapes,P=a.facebookURL,j=a.twitterURL,z=a.instagramURL,q=a.linkedURL,D=a.emailAddress,V=a.facebookURLTwo,M=a.twitterURLTwo,G=a.instagramURLTwo,H=a.linkedURLTwo,W=a.emailAddressTwo,J=a.facebookURLThree,Q=a.twitterURLThree,Y=a.instagramURLThree,Z=a.linkedURLThree,K=a.emailAddressThree,X=[{value:"1",label:r("One Column")},{value:"2",label:r("Two Column")},{value:"3",label:r("Three Column")}],$=[{value:"square",label:r("Square")},{value:"circle",label:r("Circle")}];return[wp.element.createElement(g,{key:"controls"}),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(h,{label:r("Image Shape"),value:F,options:$.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({shapes:e})}}),wp.element.createElement(h,{label:r("Column Number"),value:B,options:X.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){l({columns:e})}}),wp.element.createElement("div",null,wp.element.createElement("h2",null,r("Social Media Links - Column One"))),wp.element.createElement(y,{type:"url",label:r("Facebook URL"),value:P,onChange:function(e){return l({facebookURL:e})}}),wp.element.createElement(y,{type:"url",label:r("Twitter URL"),value:j,onChange:function(e){return l({twitterURL:e})}}),wp.element.createElement(y,{type:"url",label:r("Instagram URL"),value:z,onChange:function(e){return l({instagramURL:e})}}),wp.element.createElement(y,{type:"url",label:r("LinkedIn URL"),value:q,onChange:function(e){return l({linkedURL:e})}}),wp.element.createElement(y,{type:"url",label:r("Email Address"),value:D,onChange:function(e){return l({emailAddress:e})}}),B>1&&wp.element.createElement("div",null,wp.element.createElement("h2",null,r("Social Media Links - Column Two")),wp.element.createElement(y,{type:"url",label:r("Facebook URL"),value:V,onChange:function(e){return l({facebookURLTwo:e})}}),wp.element.createElement(y,{type:"url",label:r("Twitter URL"),value:M,onChange:function(e){return l({twitterURLTwo:e})}}),wp.element.createElement(y,{type:"url",label:r("Instagram URL"),value:G,onChange:function(e){return l({instagramURLTwo:e})}}),wp.element.createElement(y,{type:"url",label:r("LinkedIn URL"),value:H,onChange:function(e){return l({linkedURLTwo:e})}}),wp.element.createElement(y,{type:"url",label:r("Email Address"),value:W,onChange:function(e){return l({emailAddressTwo:e})}})),B>2&&wp.element.createElement("div",null,wp.element.createElement("h2",null,r("Social Media Links - Column Three")),wp.element.createElement(y,{type:"url",label:r("Facebook URL"),value:J,onChange:function(e){return l({facebookURLThree:e})}}),wp.element.createElement(y,{type:"url",label:r("Twitter URL"),value:Q,onChange:function(e){return l({twitterURLThree:e})}}),wp.element.createElement(y,{type:"url",label:r("Instagram URL"),value:Y,onChange:function(e){return l({instagramURLThree:e})}}),wp.element.createElement(y,{type:"url",label:r("LinkedIn URL"),value:Z,onChange:function(e){return l({linkedURLThree:e})}}),wp.element.createElement(y,{type:"url",label:r("Email Address"),value:K,onChange:function(e){return l({emailAddressThree:e})}})),wp.element.createElement(s,{title:r("Name Color"),colorValue:A,initialOpen:!1},wp.element.createElement(d,{value:A,onChange:function(e){return l({nameColor:e})}})),wp.element.createElement(s,{title:r("Position Color"),colorValue:I,initialOpen:!1},wp.element.createElement(d,{value:I,onChange:function(e){return l({posColor:e})}})),wp.element.createElement(s,{title:r("Description Color"),colorValue:_,initialOpen:!1},wp.element.createElement(d,{value:_,onChange:function(e){return l({desColor:e})}})),wp.element.createElement(s,{title:r("Icon Color"),colorValue:S,initialOpen:!1},wp.element.createElement(d,{value:S,onChange:function(e){return l({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-team-member column-"+B+" image-"+F},wp.element.createElement("div",{className:"ugb-team-member-column-one"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURL:e.url,mediaID:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(m,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+L+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:i,focus:"name"===o?t:null,onChange:function(e){return l({name:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"name"}))},style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:k,className:"ugb-team-member-position",onChange:function(e){return l({position:e})},focus:"position"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"position"}))},placeholder:r("Add position\u2026"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:w,className:"ugb-team-member-des",onChange:function(e){return l({des:e})},focus:"des"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"des"}))},placeholder:r("Add des\u2026"),style:{color:_},keepPlaceholderOnFocus:!0}),wp.element.createElement("div",{className:"team-member-social"},!!P&&wp.element.createElement("a",{className:"social-link",href:P,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),!!j&&wp.element.createElement("a",{className:"social-link",href:j,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),!!z&&wp.element.createElement("a",{className:"social-link",href:z,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),!!q&&wp.element.createElement("a",{className:"social-link",href:q,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),!!D&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+D,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))),wp.element.createElement("div",{className:"ugb-team-member-column-two"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(m,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+O+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:c,focus:"nameTwo"===o?t:null,onChange:function(e){return l({nameTwo:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"nameTwo"}))},style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:C,className:"ugb-team-member-position",onChange:function(e){return l({positionTwo:e})},focus:"positionTwo"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"positionTwo"}))},placeholder:r("Add position\u2026"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:E,className:"ugb-team-member-des-two",onChange:function(e){return l({desTwo:e})},focus:"desTwo"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"desTwo"}))},placeholder:r("Add des\u2026"),style:{color:_},keepPlaceholderOnFocus:!0}),wp.element.createElement("div",{className:"team-member-social"},!!V&&wp.element.createElement("a",{className:"social-link",href:V,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),!!M&&wp.element.createElement("a",{className:"social-link",href:M,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),!!G&&wp.element.createElement("a",{className:"social-link",href:G,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),!!H&&wp.element.createElement("a",{className:"social-link",href:H,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),!!W&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+W,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))),wp.element.createElement("div",{className:"ugb-team-member-column-three"},wp.element.createElement("div",null,wp.element.createElement(f,{onSelect:function(e){return l({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:R,render:function(e){return wp.element.createElement(m,{className:R?"":"button button-large",onClick:e.open},R?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+U+")"}}):r("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:r("Add title\u2026"),value:u,focus:"nameThree"===o?t:null,onChange:function(e){return l({nameThree:e})},onFocus:function(e){return n(Object.assign({},e,{editable:"nameThree"}))},style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:T,className:"ugb-team-member-position",onChange:function(e){return l({positionThree:e})},focus:"positionThree"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"positionThree"}))},placeholder:r("Add position\u2026"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:v,className:"ugb-team-member-des-three",onChange:function(e){return l({desThree:e})},focus:"desThree"===o?t:null,onFocus:function(e){return n(Object.assign({},e,{editable:"desThree"}))},placeholder:r("Add des\u2026"),style:{color:_},keepPlaceholderOnFocus:!0}),wp.element.createElement("div",{className:"team-member-social"},!!J&&wp.element.createElement("a",{className:"social-link",href:J,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),!!Q&&wp.element.createElement("a",{className:"social-link",href:Q,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),!!Y&&wp.element.createElement("a",{className:"social-link",href:Y,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),!!Z&&wp.element.createElement("a",{className:"social-link",href:Z,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),!!K&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+W,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))))]},save:function(e){var t=e.attributes,n=(t.url,t.title,t.name),l=t.nameTwo,o=t.nameThree,a=t.shapes,r=t.des,i=t.desTwo,c=t.desThree,s=t.position,m=t.positionTwo,u=t.positionThree,p=t.mediaURL,b=t.mediaURLTwo,d=t.mediaURLThree,f=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.nameColor),g=t.posColor,w=t.desColor,h=(t.iconColor,t.columns),y=t.facebookURL,E=t.twitterURL,v=t.instagramURL,k=t.linkedURL,C=t.emailAddress,T=t.facebookURLTwo,N=t.twitterURLTwo,x=t.instagramURLTwo,R=t.linkedURLTwo,L=t.emailAddressTwo,O=t.facebookURLThree,U=t.twitterURLThree,B=t.instagramURLThree,A=t.linkedURLThree,I=t.emailAddressThree;return wp.element.createElement("div",{className:"ugb-team-member column-"+h+" image-"+a},wp.element.createElement("div",{className:"ugb-team-member-column-one"},p&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+p+")"},"data-src":p}),n&&!!n.length&&wp.element.createElement("h4",{style:{color:f}},n),s&&!!s.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:g}},s),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-team-member-des",style:{color:w}},r),wp.element.createElement("div",{className:"team-member-social"},y&&wp.element.createElement("a",{className:"social-link",href:y,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),E&&wp.element.createElement("a",{className:"social-link",href:E,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),v&&wp.element.createElement("a",{className:"social-link",href:v,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),k&&wp.element.createElement("a",{className:"social-link",href:k,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),C&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+C,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))),h>1&&wp.element.createElement("div",{className:"ugb-team-member-column-two"},b&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+b+")"},"data-src":b}),l&&!!l.length&&wp.element.createElement("h4",{style:{color:f}},l),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:g}},m),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-team-member-des-two",style:{color:w}},i),wp.element.createElement("div",{className:"team-member-social"},T&&wp.element.createElement("a",{className:"social-link",href:T,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),N&&wp.element.createElement("a",{className:"social-link",href:N,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),x&&wp.element.createElement("a",{className:"social-link",href:x,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),R&&wp.element.createElement("a",{className:"social-link",href:R,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),L&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+L,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))),h>2&&wp.element.createElement("div",{className:"ugb-team-member-column-three"},d&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+d+")"},"data-src":d}),o&&!!o.length&&wp.element.createElement("h4",{style:{color:f}},o),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:g}},u),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-team-member-des-three",style:{color:w}},c),wp.element.createElement("div",{className:"team-member-social"},O&&wp.element.createElement("a",{className:"social-link",href:O,target:"_blank"},wp.element.createElement("i",{className:"fa fa-facebook"})),U&&wp.element.createElement("a",{className:"social-link",href:U,target:"_blank"},wp.element.createElement("i",{className:"fa fa-twitter"})),B&&wp.element.createElement("a",{className:"social-link",href:B,target:"_blank"},wp.element.createElement("i",{className:"fa fa-instagram"})),A&&wp.element.createElement("a",{className:"social-link",href:A,target:"_blank"},wp.element.createElement("i",{className:"fa fa-linkedin"})),I&&wp.element.createElement("a",{className:"social-link",href:"mailto:"+I,target:"_blank"},wp.element.createElement("i",{className:"fa fa-envelope"})))))}})},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(l){if(n[l])return n[l].exports;var o=n[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";n.d(t,"f",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"e",function(){return c}),n.d(t,"c",function(){return i}),n.d(t,"h",function(){return u}),n.d(t,"i",function(){return m}),n.d(t,"k",function(){return s}),n.d(t,"b",function(){return p}),n.d(t,"j",function(){return d}),n.d(t,"d",function(){return b}),n.d(t,"g",function(){return g});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},o=function(e){return wp.element.createElement("defs",null,wp.element.createElement("linearGradient",l({},e,{gradientTransform:"rotate(90)"}),wp.element.createElement("stop",{offset:"0%",stopColor:"#2FDDD1",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"20%",stopColor:"#30A2E3",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"50%",stopColor:"#F56FAE",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"100%",stopColor:"#FFC58E",stopOpacity:"1"})))},r=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"20",height:"20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M512 96c-111.118 0-215.584 43.272-294.156 121.844S96 400.882 96 512s43.272 215.584 121.844 294.156S400.882 928 512 928s215.584-43.272 294.156-121.844S928 623.118 928 512s-43.272-215.584-121.843-294.156S623.118 96 512 96zm0-96c282.77 0 512 229.23 512 512s-229.23 512-512 512S0 794.77 0 512 229.23 0 512 0zm-64 704h128v128H448zm0-512h128v384H448z"}))},a=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z"}))},c=function(){return wp.element.createElement(a,null)},i=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M4 9h12v2H4V9z"}))},u=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z"}))},m=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 14 32"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M0 29h5.833L0 23h5V9H0l5.833-6H0V0h14v3H8.167L14 9H9v14h5l-5.833 6H14v3H0v-3z"}))},s=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 13 12.916010856628418"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M5.68 12.916a.5.5 0 0 1-.397-.196L3.208 10H1.463C.656 10 0 9.428 0 8.621V1.463C0 .656.656 0 1.463 0h10.074C12.344 0 13 .656 13 1.463v7.158C13 9.428 12.344 10 11.537 10H8.151l-2.073 2.72a.504.504 0 0 1-.398.196zM1.463 1A.464.464 0 0 0 1 1.463v7.158c0 .255.208.463.463.463h1.993a.5.5 0 0 1 .397.196l1.827 2.312L7.507 9.28a.502.502 0 0 1 .397-.196h3.633A.464.464 0 0 0 12 8.621V1.463A.464.464 0 0 0 11.537 1H1.463zm1.193 2h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49zm0 3h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49z"}))},p=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 75.22699737548828 73.15494537353516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M14.941 14.912C6.689 14.912 0 21.601 0 29.853s6.689 14.941 14.941 14.941a2.712 2.712 0 0 0 2.676-2.296h.043V17.632a2.72 2.72 0 0 0-2.719-2.72zM75.227 2.719A2.72 2.72 0 0 0 72.508 0c-.623 0-1.19.218-1.648.57L46.934 14.384H25.366a2.719 2.719 0 0 0-2.719 2.719v25.809h.034a2.71 2.71 0 0 0 2.685 2.383h19.138l26.16 15.103c.485.45 1.13.731 1.844.731a2.72 2.72 0 0 0 2.719-2.719c0-.103-.019-.201-.03-.301h.03V2.877h-.016c.003-.053.016-.103.016-.158zM43.825 65.977l-.038-.066c-.013-.024-.019-.049-.033-.073s-.032-.042-.046-.064l-8.305-14.383-.031.018a2.7 2.7 0 0 0-1.857-1.096v-.03h-7.222v.018a2.693 2.693 0 0 0-1.135.347 2.718 2.718 0 0 0-.995 3.714c.064.11.142.206.219.303l-.032.019 9.678 16.764.002.005a.014.014 0 0 0 .003.004l.097.168.017-.01a2.71 2.71 0 0 0 3.596.832c.145-.084.276-.183.399-.287l.025.043 4.983-2.876-.023-.04a2.708 2.708 0 0 0 .691-3.306l.007-.004z"}))},d=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 896 1023"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"}))},b=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 32 8"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M4 0C1.79 0 0 1.79 0 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zM16 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}))},g=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 21.027502059936523 10.284000396728516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"}))}},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(3),n(6),n(9),n(12),n(15),n(21),n(24),n(27),n(30),n(33),n(36),n(39)},function(e,t,n){"use strict";var l=n(4),o=(n.n(l),n(5)),r=(n.n(o),n(0)),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("ugb/spacer",{title:a("Spacer","UGB"),icon:r.i,category:"layout",keywords:[a("Spacer"),a("Stackable")],attributes:{height:{default:50,type:"number"}},edit:function(e){var t=e.isSelected,n=wp.blocks.InspectorControls,l=wp.components,o=l.RangeControl,r=(l.TextControl,e.attributes.height);return[!!t&&wp.element.createElement(n,{key:"inspector"},wp.element.createElement(o,{label:a("Height"),value:r,min:"30",max:"200",onChange:function(t){e.setAttributes({height:t})}})),wp.element.createElement("div",{className:e.className,style:{height:r+"px"}})]},save:function(e){var t=e.attributes.height;return wp.element.createElement("div",{className:e.className,style:{height:t+"px"}})}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(7),o=(n.n(l),n(8)),r=(n.n(o),n(0)),a=wp.i18n.__,c=wp.blocks.registerBlockType,i=wp.components.PanelColor;c("ugb/divider",{title:a("Divider","UGB"),icon:r.c,category:"layout",keywords:[a("Divider"),a("Stackable")],attributes:{height:{default:1,type:"number"},width:{default:50,type:"number"},color:{type:"string",default:"#dddddd"},alignment:{type:"string",default:"center"}},edit:function(e){var t=e.focus,n=wp.blocks,l=n.InspectorControls,o=n.ColorPalette,r=n.BlockControls,c=n.AlignmentToolbar,u=wp.components.RangeControl,m=e.attributes,s=m.height,p=m.width,d=m.color,b=m.alignment;return[!!t&&wp.element.createElement(r,{key:"controls"},wp.element.createElement(c,{value:b,onChange:function(t){e.setAttributes({alignment:t})}})),!!t&&wp.element.createElement(l,{key:"inspector"},wp.element.createElement(u,{label:a("Height"),value:s,min:"1",max:"10",onChange:function(t){e.setAttributes({height:t})}}),wp.element.createElement(u,{label:a("Width"),value:p,min:"10",max:"100",step:"0.1",onChange:function(t){e.setAttributes({width:t})}}),wp.element.createElement(i,{title:a("Divider Color"),colorValue:d,initialOpen:!1},wp.element.createElement(o,{value:d,onChange:function(t){return e.setAttributes({color:t})}}))),wp.element.createElement("div",{className:"ugb-divider",style:{paddingTop:8,paddingBottom:8}},wp.element.createElement("hr",{align:b,style:{marginTop:0,marginBottom:0,backgroundColor:d,width:p+"%",height:s}}))]},save:function(e){var t=e.attributes,n=t.height,l=t.width,o=t.color,r=t.alignment;return wp.element.createElement("div",{className:"ugb-divider"},wp.element.createElement("hr",{align:r,style:{backgroundColor:o,width:l+"%",height:n}}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(10),c=(n.n(a),n(11)),i=(n.n(c),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks.registerBlockType,d=wp.components,b=d.PanelColor,g=d.Dashicon,h=d.IconButton,w=d.SelectControl,f=d.RangeControl,y=wp.blocks,v=y.InspectorControls,C=y.BlockControls,E=y.AlignmentToolbar,T=y.RichText,x=y.ColorPalette,k=y.UrlInput,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=(e.className,e.setAttributes),l=this.props.attributes,o=l.url,r=l.title,a=l.text,c=l.color,i=l.textColor,u=l.size,s=l.textAlignment,p=l.cornerButtonRadius,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(C,{key:"controls"},wp.element.createElement(E,{value:s,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+s},wp.element.createElement(T,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+u,style:{backgroundColor:c,color:i,borderRadius:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(v,{key:"inspector"},wp.element.createElement(w,{label:m("Size"),value:u,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(f,{label:m("Corner Radius"),value:p,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(b,{title:m("Background Color"),colorValue:c,initialOpen:!1},wp.element.createElement(x,{value:c,onChange:function(e){return n({color:e})}})),wp.element.createElement(b,{title:m("Text Color"),colorValue:i,initialOpen:!1},wp.element.createElement(x,{value:i,onChange:function(e){return n({textColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+s},wp.element.createElement(g,{icon:"admin-links"}),wp.element.createElement(k,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(h,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);p("ugb/button",{title:m("Button","UGB"),icon:i.a,category:"layout",keywords:[m("Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:4}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.textColor,c=t.size,i=t.cornerButtonRadius,u={backgroundColor:r,color:a,borderRadius:i+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+c,style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(13),c=(n.n(a),n(14)),i=(n.n(c),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.BlockControls,h=p.RichText,w=p.AlignmentToolbar,f=p.ColorPalette,y=p.UrlInput,v=wp.components,C=v.PanelColor,E=v.IconButton,T=v.Dashicon,x=v.SelectControl,k=v.RangeControl,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.setAttributes,l=this.props.attributes,o=l.url,r=l.title,a=l.text,c=l.color,i=l.size,u=l.textAlignment,s=l.cornerButtonRadius,p=l.borderThickness,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal ")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(g,{key:"controls"},wp.element.createElement(w,{value:u,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+u},wp.element.createElement(h,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+i+" ugb-ghost-button",style:{borderColor:c,color:c,borderRadius:s+"px",borderWidth:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(x,{label:m("Size"),value:i,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(k,{label:m("Corner Radius"),value:s,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(k,{label:m("Border Thickness"),value:p,min:"1",max:"10",onChange:function(e){return n({borderThickness:e})}}),wp.element.createElement(C,{title:m("Button Color"),colorValue:c,initialOpen:!1},wp.element.createElement(f,{value:c,onChange:function(e){return n({color:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+u},wp.element.createElement(T,{icon:"admin-links"}),wp.element.createElement(y,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(E,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);d("ugb/ghost-button",{title:m("Ghost Button"),icon:i.e,category:"layout",keywords:[m("Ghost Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string"},textColor:{type:"string"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:"4"},borderThickness:{type:"number",default:"1"}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.size,c=t.cornerButtonRadius,i=t.borderThickness,u={borderColor:r,color:r,borderRadius:c+"px",borderWidth:i+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+a+" ugb-ghost-button",style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(16),o=(n.n(l),n(17)),r=(n.n(o),n(18)),a=n.n(r),c=n(0),i=wp.i18n.__,u=(wp.element.Component,wp.components.PanelColor),m=wp.components.withState,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=s.BlockControls,w=wp.blocks.InspectorControls,f=w.SelectControl,y=w.ToggleControl;p("ugb/notification",{title:i("Notification","UGB"),icon:c.f,category:"layout",keywords:[i("Notification"),i("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:i("This is an informational alert, usually used for successful subscriptions, promo announcements, and the like.")},color:{type:"string"},textColor:{type:"string"},notifType:{type:"string",default:"success"},dismissible:{type:"boolean",default:!1}},edit:m({editable:"content"})(function(e){var t=[{value:"success",label:i("Success")},{value:"error",label:i("Error")},{value:"warning",label:i("Warning")},{value:"info",label:i("Information")}],n=e.isSelected,l=e.editable,o=e.setState,r=e.setAttributes,a=(e.className,e.attributes),c=a.text,m=a.color,s=a.textColor,p=a.notifType,w=a.dismissible;return[n&&wp.element.createElement(h,{key:"controls"}),wp.element.createElement("div",{key:"editable",className:"ugb-notification type-"+p+" dismissible-"+w},w&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:s}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement(b,{tagName:"p",placeholder:e.attributes.text.default,value:c,isSelected:n&&"content"===l,onFocus:function(e){return function(){o({editable:e})}}("content"),onChange:function(e){return r({text:e})},className:"wp-ugb-notif notif-"+p,style:{backgroundColor:m,color:s}}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(y,{label:i("Dismissible"),checked:w,onChange:function(){return r({dismissible:!w})}}),wp.element.createElement(f,{label:i("Notification Type"),value:p,options:t.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){r({notifType:e})}}),wp.element.createElement(u,{title:i("Background Color"),colorValue:m,initialOpen:!1},wp.element.createElement(g,{value:m,onChange:function(e){return r({color:e})}})),wp.element.createElement(u,{title:i("Text Color"),colorValue:s,initialOpen:!1},wp.element.createElement(g,{value:s,onChange:function(e){return r({textColor:e})}}))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.color,o=t.textColor,r=t.notifType,c=t.dismissible,i={backgroundColor:l,color:o},u=a()(n+r).substr(0,6);return wp.element.createElement("div",{className:"ugb-notification type-"+r+" dismissible-"+c,"data-uid":u},c&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:o}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement("p",{className:"wp-ugb-notif notif-"+r,style:i},n))}})},function(e,t){},function(e,t){},function(e,t,n){!function(){var t=n(19),l=n(1).utf8,o=n(20),r=n(1).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?r.stringToBytes(e):l.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var c=t.bytesToWords(e),i=8*e.length,u=1732584193,m=-271733879,s=-1732584194,p=271733878,d=0;d<c.length;d++)c[d]=16711935&(c[d]<<8|c[d]>>>24)|4278255360&(c[d]<<24|c[d]>>>8);c[i>>>5]|=128<<i%32,c[14+(i+64>>>9<<4)]=i;for(var b=a._ff,g=a._gg,h=a._hh,w=a._ii,d=0;d<c.length;d+=16){var f=u,y=m,v=s,C=p;u=b(u,m,s,p,c[d+0],7,-680876936),p=b(p,u,m,s,c[d+1],12,-389564586),s=b(s,p,u,m,c[d+2],17,606105819),m=b(m,s,p,u,c[d+3],22,-1044525330),u=b(u,m,s,p,c[d+4],7,-176418897),p=b(p,u,m,s,c[d+5],12,1200080426),s=b(s,p,u,m,c[d+6],17,-1473231341),m=b(m,s,p,u,c[d+7],22,-45705983),u=b(u,m,s,p,c[d+8],7,1770035416),p=b(p,u,m,s,c[d+9],12,-1958414417),s=b(s,p,u,m,c[d+10],17,-42063),m=b(m,s,p,u,c[d+11],22,-1990404162),u=b(u,m,s,p,c[d+12],7,1804603682),p=b(p,u,m,s,c[d+13],12,-40341101),s=b(s,p,u,m,c[d+14],17,-1502002290),m=b(m,s,p,u,c[d+15],22,1236535329),u=g(u,m,s,p,c[d+1],5,-165796510),p=g(p,u,m,s,c[d+6],9,-1069501632),s=g(s,p,u,m,c[d+11],14,643717713),m=g(m,s,p,u,c[d+0],20,-373897302),u=g(u,m,s,p,c[d+5],5,-701558691),p=g(p,u,m,s,c[d+10],9,38016083),s=g(s,p,u,m,c[d+15],14,-660478335),m=g(m,s,p,u,c[d+4],20,-405537848),u=g(u,m,s,p,c[d+9],5,568446438),p=g(p,u,m,s,c[d+14],9,-1019803690),s=g(s,p,u,m,c[d+3],14,-187363961),m=g(m,s,p,u,c[d+8],20,1163531501),u=g(u,m,s,p,c[d+13],5,-1444681467),p=g(p,u,m,s,c[d+2],9,-51403784),s=g(s,p,u,m,c[d+7],14,1735328473),m=g(m,s,p,u,c[d+12],20,-1926607734),u=h(u,m,s,p,c[d+5],4,-378558),p=h(p,u,m,s,c[d+8],11,-2022574463),s=h(s,p,u,m,c[d+11],16,1839030562),m=h(m,s,p,u,c[d+14],23,-35309556),u=h(u,m,s,p,c[d+1],4,-1530992060),p=h(p,u,m,s,c[d+4],11,1272893353),s=h(s,p,u,m,c[d+7],16,-155497632),m=h(m,s,p,u,c[d+10],23,-1094730640),u=h(u,m,s,p,c[d+13],4,681279174),p=h(p,u,m,s,c[d+0],11,-358537222),s=h(s,p,u,m,c[d+3],16,-722521979),m=h(m,s,p,u,c[d+6],23,76029189),u=h(u,m,s,p,c[d+9],4,-640364487),p=h(p,u,m,s,c[d+12],11,-421815835),s=h(s,p,u,m,c[d+15],16,530742520),m=h(m,s,p,u,c[d+2],23,-995338651),u=w(u,m,s,p,c[d+0],6,-198630844),p=w(p,u,m,s,c[d+7],10,1126891415),s=w(s,p,u,m,c[d+14],15,-1416354905),m=w(m,s,p,u,c[d+5],21,-57434055),u=w(u,m,s,p,c[d+12],6,1700485571),p=w(p,u,m,s,c[d+3],10,-1894986606),s=w(s,p,u,m,c[d+10],15,-1051523),m=w(m,s,p,u,c[d+1],21,-2054922799),u=w(u,m,s,p,c[d+8],6,1873313359),p=w(p,u,m,s,c[d+15],10,-30611744),s=w(s,p,u,m,c[d+6],15,-1560198380),m=w(m,s,p,u,c[d+13],21,1309151649),u=w(u,m,s,p,c[d+4],6,-145523070),p=w(p,u,m,s,c[d+11],10,-1120210379),s=w(s,p,u,m,c[d+2],15,718787259),m=w(m,s,p,u,c[d+9],21,-343485551),u=u+f>>>0,m=m+y>>>0,s=s+v>>>0,p=p+C>>>0}return t.endian([u,m,s,p])};a._ff=function(e,t,n,l,o,r,a){var c=e+(t&n|~t&l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._gg=function(e,t,n,l,o,r,a){var c=e+(t&l|n&~l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._hh=function(e,t,n,l,o,r,a){var c=e+(t^n^l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._ii=function(e,t,n,l,o,r,a){var c=e+(n^(t|~l))+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var l=t.wordsToBytes(a(e,n));return n&&n.asBytes?l:n&&n.asString?r.bytesToString(l):t.bytesToHex(l)}}()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,l=0;n<e.length;n++,l+=8)t[l>>>5]|=e[n]<<24-l%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],l=0;l<e.length;l+=3)for(var o=e[l]<<16|e[l+1]<<8|e[l+2],r=0;r<4;r++)8*l+6*r<=8*e.length?n.push(t.charAt(o>>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],l=0,o=0;l<e.length;o=++l%4)0!=o&&n.push((t.indexOf(e.charAt(l-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(l))>>>6-2*o);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||l(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var l=n(22),o=(n.n(l),n(23)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/blockquote",{title:a("Blockquote","UGB"),icon:r.h,category:"common",keywords:[a("Blockquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#424242"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,c=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-blockquote",style:{borderLeftColor:c}},wp.element.createElement(d,{tagName:"p",className:"ugb-blockquote-text",value:r,onChange:function(e){return n({text:e})},isSelected:t,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(i,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(i,{title:a("Border Color"),colorValue:c,initialOpen:!1},wp.element.createElement(b,{value:c,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-blockquote",style:{borderLeftColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(25),o=(n.n(l),n(26)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/pullquote",{title:a("Pullquote","UGB"),icon:r.h,category:"formatting",keywords:[a("Pullquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#2091e1"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,c=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-pullquote",style:{borderTopColor:c,borderBottomColor:c}},wp.element.createElement(d,{tagName:"p",className:"ugb-pullquote-text",value:r,onChange:function(e){return n({text:e})},placeholder:a("Write quote\u2026"),formattingControls:["bold","italic","strikethrough","link"],isSelected:t,keepPlaceholderOnFocus:!0,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(i,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(i,{title:a("Border Color"),colorValue:c,initialOpen:!1},wp.element.createElement(b,{value:c,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-pullquote",style:{borderTopColor:o,borderBottomColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(28),o=(n.n(l),n(29)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.Dashicon,m=c.IconButton,s=c.withState,p=c.SelectControl,d=c.RangeControl,b=wp.blocks,g=b.registerBlockType,h=b.InspectorControls,w=(b.BlockControls,b.AlignmentToolbar,b.RichText),f=b.ColorPalette,y=b.UrlInput;g("ugb/cta",{title:a("Call to Action","UGB"),icon:r.b,category:"layout",keywords:[a("Call to Action"),a("Stackable"),a("CTA")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},ctaTitle:{type:"array",source:"children",selector:"h3",default:a("Get Started Today")},bodyText:{type:"array",source:"children",selector:"p",default:a("Get Stackable: Ultimate Gutenberg Blocks today.\xa0 Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg\u2019s functionality.")},buttonText:{type:"array",source:"children",selector:"a"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},titleColor:{type:"string"},bodyTextColor:{type:"string"},bgColor:{type:"string"},size:{type:"string",default:"normal"},borderButtonRadius:{type:"number",default:4}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,c=r.url,s=r.buttonText,b=(r.title,r.ctaTitle),g=r.bodyText,v=r.color,C=r.textColor,E=r.size,T=r.borderButtonRadius,x=r.bodyTextColor,k=r.titleColor,N=r.bgColor,S=[{value:"small",label:a("Small")},{value:"normal",label:a("Normal")},{value:"medium",label:a("Medium")},{value:"large",label:a("Large")}],B=function(e){return function(){l({editable:e})}};return[wp.element.createElement("div",{key:"editable",className:"ugb-cta",style:{backgroundColor:N}},wp.element.createElement(w,{className:"ugb-cta-title",tagName:"h3",placeholder:a("Add Title"),value:b,onChange:function(e){return o({ctaTitle:e})},isSelected:t&&"ctaTitle"===n,onFocus:B("ctaTitle"),keepPlaceholderOnFocus:!0,style:{color:k}}),wp.element.createElement(w,{tagName:"p",value:g,className:"ugb-cta-bodyText",onChange:function(e){return o({bodyText:e})},isSelected:t&&"bodyText"===n,onFocus:B("bodyText"),placeholder:a("Write body text\u2026"),style:{color:x}}),wp.element.createElement("span",{key:"button",className:"wp-block-button ugb-cta-button"},wp.element.createElement(w,{tagName:"span",placeholder:a("Add Text"),value:s,onChange:function(e){return o({buttonText:e})},isSelected:t&&"buttonText"===n,onFocus:B("buttonText"),className:"wp-ugb-button ugb-button-"+E,style:{backgroundColor:v,color:C,borderRadius:T+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(h,{key:"inspector"},wp.element.createElement(p,{label:a("Button Size"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({size:e})}}),wp.element.createElement(d,{label:a("Button Border Radius"),value:T,min:"1",max:"50",onChange:function(e){return o({borderButtonRadius:e})}}),wp.element.createElement(i,{title:a("Title Color"),colorValue:k,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(i,{title:a("Body Text Color"),colorValue:x,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(i,{title:a("Button Background Color"),colorValue:v,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({color:e})}})),wp.element.createElement(i,{title:a("Button Text Color"),colorValue:C,initialOpen:!1},wp.element.createElement(f,{value:C,onChange:function(e){return o({textColor:e})}})),wp.element.createElement(i,{title:a("Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(f,{value:N,onChange:function(e){return o({bgColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link"},wp.element.createElement(u,{icon:"admin-links"}),wp.element.createElement(y,{value:c,onChange:function(e){return o({url:e})}}),wp.element.createElement(m,{icon:"editor-break",label:a("Apply"),type:"submit"})))]}),save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.buttonText),o=t.ctaTitle,r=t.bodyText,a=t.color,c=t.textColor,i=t.size,u=t.borderButtonRadius,m=t.bodyTextColor,s=t.titleColor,p=t.bgColor,d={backgroundColor:a,color:c,borderRadius:u+"px"};return wp.element.createElement("div",{className:"ugb-cta",style:{backgroundColor:p}},o&&!!o.length&&wp.element.createElement("h3",{className:"ugb-cta-title",style:{color:s}},o),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-cta-bodyText",style:{color:m}},r),l&&!!l.length&&wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-cta-button ugb-button-"+i,style:d},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(31),o=(n.n(l),n(32)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.blocks.registerBlockType),i=wp.components,u=i.PanelColor,m=i.Button,s=i.withState,p=wp.blocks,d=p.InspectorControls,b=p.RichText,g=p.ColorPalette,h=p.MediaUpload,w=p.BlockControls,f=(p.AlignmentToolbar,wp.blocks.InspectorControls.SelectControl);c("ugb/testimonial",{title:a("Testimonial","Stackable"),icon:r.k,category:"common",keywords:[a("Testimonial"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-testimonial-column-one .testimonial-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-testimonial-column-two .testimonial-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-testimonial-column-three .testimonial-image",attribute:"data-src"},testimonialTitle:{type:"array",source:"children",selector:".ugb-testimonial-column-one h4",default:a("Ben Adams")},testimonialTitleTwo:{type:"array",source:"children",selector:".ugb-testimonial-column-two h4",default:a("Alex Johnson")},testimonialTitleThree:{type:"array",source:"children",selector:".ugb-testimonial-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-testimonial-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-testimonial-position-two",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-testimonial-position-three",default:a("Programmer")},body:{type:"array",source:"children",selector:".ugb-testimonial-body",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyTwo:{type:"array",source:"children",selector:".ugb-testimonial-body-two",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyThree:{type:"array",source:"children",selector:".ugb-testimonial-body-three",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},titleColor:{type:"string"},posColor:{type:"string"},bodyTextColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,c=(r.url,r.title,r.testimonialTitle),i=r.testimonialTitleTwo,s=r.testimonialTitleThree,p=r.body,y=r.bodyTwo,v=r.bodyThree,C=r.position,E=r.positionTwo,T=r.positionThree,x=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),k=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,O=r.mediaURLThree,A=r.columns,I=r.titleColor,F=r.posColor,P=r.bodyTextColor,L=r.iconColor,R=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],_=function(e){return function(){l({editable:e})}};return[wp.element.createElement(w,null),t&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(f,{label:a("Column Number"),value:A,options:R.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(u,{title:a("Title Color"),colorValue:I,initialOpen:!1},wp.element.createElement(g,{value:I,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(u,{title:a("Position Color"),colorValue:F,initialOpen:!1},wp.element.createElement(g,{value:F,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(u,{title:a("Body Text Color"),colorValue:P,initialOpen:!1},wp.element.createElement(g,{value:P,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(u,{title:a("Icon Color"),colorValue:L,initialOpen:!1},wp.element.createElement(g,{value:L,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-testimonial column-"+A},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(m,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:c,onChange:function(e){return o({testimonialTitle:e})},isSelected:t&&"testimonialTitle"===n,onFocus:_("testimonialTitle"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:C,className:"ugb-testimonial-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:_("position"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-testimonial-body",onChange:function(e){return o({body:e})},isSelected:t&&"body"===n,onFocus:_("body"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-two"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(m,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:i,onChange:function(e){return o({testimonialTitleTwo:e})},isSelected:t&&"testimonialTitleTwo"===n,onFocus:_("testimonialTitleTwo"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:E,className:"ugb-testimonial-position-two",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:_("positionTwo"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:y,className:"ugb-testimonial-body-two",onChange:function(e){return o({bodyTwo:e})},isSelected:t&&"bodyTwo"===n,onFocus:_("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-three"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(m,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+O+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:s,onChange:function(e){return o({testimonialTitleThree:e})},isSelected:t&&"testimonialTitleThree"===n,onFocus:_("testimonialTitleThree"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:T,className:"ugb-testimonial-position-three",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:_("positionThree"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:v,className:"ugb-testimonial-body-three",onChange:function(e){return o({bodyThree:e})},isSelected:t&&"bodyThree"===n,onFocus:_("bodyThree"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.testimonialTitle),l=t.testimonialTitleTwo,o=t.testimonialTitleThree,r=t.body,a=t.bodyTwo,c=t.bodyThree,i=t.position,u=t.positionTwo,m=t.positionThree,s=t.mediaURL,p=t.mediaURLTwo,d=t.mediaURLThree,b=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.titleColor),g=t.posColor,h=t.bodyTextColor,w=t.iconColor,f=t.columns,y=wp.element.createElement("div",{key:"button",className:"quote-icon"},wp.element.createElement("svg",{viewBox:"0 0 246 187.5",style:{fill:w}},wp.element.createElement("path",{d:"M98.5,0h-93C2.5,0,0,2.5,0,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C104,2.5,101.5,0,98.5,0z"}),wp.element.createElement("path",{d:"M240.5,0h-93c-3,0-5.5,2.5-5.5,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C246,2.5,243.5,0,240.5,0z"}),wp.element.createElement("path",{d:"M161.3-86.3c3.2,0,3.2-5,0-5C158.1-91.3,158.1-86.3,161.3-86.3L161.3-86.3z"})));return wp.element.createElement("div",{className:"ugb-testimonial column-"+f},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},s?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+s+")"},"data-src":s}):y,n&&!!n.length&&wp.element.createElement("h4",{style:{color:b}},n),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-testimonial-position",style:{color:g}},i),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-testimonial-body",style:{color:h}},r)),f>1&&wp.element.createElement("div",{className:"ugb-testimonial-column-two"},p?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+p+")"},"data-src":p}):y,l&&!!l.length&&wp.element.createElement("h4",{style:{color:b}},l),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-two",style:{color:g}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-two",style:{color:h}},a)),f>2&&wp.element.createElement("div",{className:"ugb-testimonial-column-three"},d?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+d+")"},"data-src":d}):y,o&&!!o.length&&wp.element.createElement("h4",{style:{color:b}},o),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-three",style:{color:g}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-three",style:{color:h}},c)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(34),o=(n.n(l),n(35)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.Button,m=c.SelectControl,s=(c.TextControl,c.withState),p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.RichText,h=p.ColorPalette,w=p.MediaUpload,f=p.BlockControls;p.AlignmentToolbar;d("ugb/team-member",{title:a("Team Member","Stackable"),icon:r.j,category:"common",keywords:[a("Team Member"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-team-member-column-one .team-member-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-team-member-column-two .team-member-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-team-member-column-three .team-member-image",attribute:"data-src"},name:{type:"array",source:"children",selector:".ugb-team-member-column-one h4",default:a("Ben Adams")},nameTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two h4",default:a("Alex Johnson")},nameThree:{type:"array",source:"children",selector:".ugb-team-member-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-team-member-column-one .ugb-team-member-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two .ugb-team-member-position",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-team-member-column-three .ugb-team-member-position",default:a("Programmer")},des:{type:"array",source:"children",selector:".ugb-team-member-des",default:a("Ben is the head of our small team. He loves walking his dog, Walter, when he has some free time.")},desTwo:{type:"array",source:"children",selector:".ugb-team-member-des-two",default:a("Alex handles all written content. She enjoys painting and playing softball on the weekends.")},desThree:{type:"array",source:"children",selector:".ugb-team-member-des-three",default:a("Sammy is our programmer. You'll usually find her nose in a book. She has a cat named Skitty.")},nameColor:{type:"string"},posColor:{type:"string"},desColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"},shapes:{type:"select",default:"square"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=(focus&&focus.editable,e.attributes),c=(r.url,r.title,r.name),s=r.nameTwo,p=r.nameThree,d=r.des,y=r.desTwo,v=r.desThree,C=r.position,E=r.positionTwo,T=r.positionThree,x=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),k=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,O=r.mediaURLThree,A=r.columns,I=r.nameColor,F=r.posColor,P=r.desColor,L=r.iconColor,R=r.shapes,_=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],z=[{value:"square",label:a("Square")},{value:"circle",label:a("Circle")}],U=function(e){return function(){l({editable:e})}};return[wp.element.createElement(f,{key:"controls"}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(m,{label:a("Image Shape"),value:R,options:z.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({shapes:e})}}),wp.element.createElement(m,{label:a("Column Number"),value:A,options:_.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(i,{title:a("Name Color"),colorValue:I,initialOpen:!1},wp.element.createElement(h,{value:I,onChange:function(e){return o({nameColor:e})}})),wp.element.createElement(i,{title:a("Position Color"),colorValue:F,initialOpen:!1},wp.element.createElement(h,{value:F,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(i,{title:a("Description Color"),colorValue:P,initialOpen:!1},wp.element.createElement(h,{value:P,onChange:function(e){return o({desColor:e})}})),wp.element.createElement(i,{title:a("Icon Color"),colorValue:L,initialOpen:!1},wp.element.createElement(h,{value:L,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-team-member column-"+A+" image-"+R},wp.element.createElement("div",{className:"ugb-team-member-column-one"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(u,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:c,onChange:function(e){return o({name:e})},isSelected:t&&"name"===n,onFocus:U("name"),placeholder:c.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:C,className:"ugb-team-member-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:U("position"),placeholder:C.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:d,className:"ugb-team-member-des",onChange:function(e){return o({des:e})},isSelected:t&&"des"===n,onFocus:U("des"),placeholder:d.default,style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-two"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(u,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:s,onChange:function(e){return o({nameTwo:e})},isSelected:t&&"nameTwo"===n,onFocus:U("nameTwo"),placeholder:s.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:E,className:"ugb-team-member-position",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:U("positionTwo"),placeholder:E.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:y,className:"ugb-team-member-des-two",onChange:function(e){return o({desTwo:e})},isSelected:t&&"desTwo"===n,onFocus:U("desTwo"),placeholder:y.default,style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-three"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(u,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+O+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:p,onChange:function(e){return o({nameThree:e})},isSelected:t&&"nameThree"===n,onFocus:U("nameThree"),placeholder:p.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:T,className:"ugb-team-member-position",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:U("positionThree"),placeholder:T.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:v,className:"ugb-team-member-des-three",onChange:function(e){return o({desThree:e})},isSelected:t&&"desThree"===n,onFocus:U("desThree"),placeholder:v.default,style:{color:P},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.name),l=t.nameTwo,o=t.nameThree,r=t.shapes,a=t.des,c=t.desTwo,i=t.desThree,u=t.position,m=t.positionTwo,s=t.positionThree,p=t.mediaURL,d=t.mediaURLTwo,b=t.mediaURLThree,g=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.nameColor),h=t.posColor,w=t.desColor,f=(t.iconColor,t.columns);return wp.element.createElement("div",{className:"ugb-team-member column-"+f+" image-"+r},wp.element.createElement("div",{className:"ugb-team-member-column-one"},p&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+p+")"},"data-src":p}),n&&!!n.length&&wp.element.createElement("h4",{style:{color:g}},n),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-team-member-des",style:{color:w}},a)),f>1&&wp.element.createElement("div",{className:"ugb-team-member-column-two"},d&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+d+")"},"data-src":d}),l&&!!l.length&&wp.element.createElement("h4",{style:{color:g}},l),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-team-member-des-two",style:{color:w}},c)),f>2&&wp.element.createElement("div",{className:"ugb-team-member-column-three"},b&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+b+")"},"data-src":b}),o&&!!o.length&&wp.element.createElement("h4",{style:{color:g}},o),s&&!!s.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},s),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-team-member-des-three",style:{color:w}},i)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(37),r=(n.n(o),n(38)),a=(n.n(r),n(0)),c=wp.i18n.__,i=(wp.element.Component,wp.components.withState),u=wp.blocks,m=u.registerBlockType,s=u.RichText,p=u.BlockControls,d=function(e){return e.map(function(e){return e.children})},b=function(e){return e.map(function(e){return{children:e}})};m("ugb/expand",{title:c("Expand / Show More","UGB"),icon:a.d,category:"formatting",keywords:[c("Expand"),c("Show more"),c("Stackable")],attributes:{text:{type:"array",source:"query",selector:".ugb-expand-less-text > p",query:{children:{source:"node"}},default:[]},moreText:{type:"array",source:"query",selector:".ugb-expand-more-text > p",query:{children:{source:"node"}},default:[]},moreLabel:{type:"array",source:"children",selector:".ugb-expand-more",default:c("Show more")},lessLabel:{type:"array",source:"children",selector:".ugb-expand-less",default:c("Show less")}},edit:i({editable:"text"})(function(e){var t=(e.focus,e.setFocus,e.editable),n=e.setAttributes,o=e.setState,r=e.className,a=e.isSelected,i=function(e){return function(){o({editable:e})}},u=e.attributes,m=u.text,g=u.moreLabel,h=u.moreText,w=u.lessLabel;return[a&&wp.element.createElement(p,{key:"controls"}),wp.element.createElement("div",{key:"expand",className:r},a&&wp.element.createElement("label",{className:"ugb-editor-label"},"Less text"),wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.text.default,value:d(m),onChange:function(e){return n({text:b(e)})},isSelected:a&&"text"===t,onFocus:i("text"),className:"ugb-expand-less-text"},"placeholder",c("Some short text that can be expanded to show more details."))),wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.moreLabel.default,value:g,isSelected:a&&"moreLabel"===t,onFocus:i("moreLabel"),onChange:function(e){return n({moreLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-more"},"placeholder",c("Show more"))),a&&wp.element.createElement("label",{className:"ugb-editor-label"},"More text"),a&&wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.moreText.default,value:d(h),isSelected:a&&"moreText"===t,onFocus:i("moreText"),onChange:function(e){return n({moreText:b(e)})},className:"ugb-expand-more-text"},"placeholder",c("Some short text that can be expanded to show more details. Some additional text that can only be seen when expanded."))),a&&wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.lessLabel.default,value:w,isSelected:a&&"lessLabel"===t,onFocus:i("lessLabel"),onChange:function(e){return n({lessLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-less"},"placeholder",c("Show less"))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.moreLabel,o=t.moreText,r=t.lessLabel;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"ugb-expand-less-text"},n.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("div",{className:"ugb-expand-more-text",style:{display:"none"}},o.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("a",{className:"ugb-expand-button",href:"#"},wp.element.createElement("span",{className:"ugb-expand-more"},l),wp.element.createElement("span",{className:"ugb-expand-less",style:{display:"none"}},r)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(40),o=(n.n(l),n(41)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=c.SelectControl,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=(s.MediaUpload,s.BlockControls);s.AlignmentToolbar,s.BlockAlignmentToolbar;p("ugb/number-box",{title:a("Number Box","Stackable"),icon:r.g,category:"common",keywords:[a("Number Box"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},numberBox:{type:"array",source:"children",selector:".ugb-number-box-column-one span",default:a("01")},numberBoxTwo:{type:"array",source:"children",selector:".ugb-number-box-column-two span",default:a("02")},numberBoxThree:{type:"array",source:"children",selector:".ugb-number-box-column-three span",default:a("03")},name:{type:"array",source:"children",selector:".ugb-number-box-name",default:a("Registration")},nameTwo:{type:"array",source:"children",selector:".ugb-number-box-name-two",default:a("Waiting Period")},nameThree:{type:"array",source:"children",selector:".ugb-number-box-name-three",default:a("Delivery")},body:{type:"array",source:"children",selector:".ugb-number-box-body",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyTwo:{type:"array",source:"children",selector:".ugb-number-box-body-two",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyThree:{type:"array",source:"children",selector:".ugb-number-box-body-three",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},numberBoxColor:{type:"string"},nameColor:{type:"string"},bodyTextColor:{type:"string"},numberBGColor:{type:"string"},columns:{type:"select",default:"1"}},edit:u({editable:"content"})(function(e){var t=(e.className,e.setAttributes),n=e.isSelected,l=e.editable,o=e.setState,r=e.attributes,c=(r.title,r.numberBox),u=r.numberBoxTwo,s=r.numberBoxThree,p=r.body,w=r.bodyTwo,f=r.bodyThree,y=r.name,v=r.nameTwo,C=r.nameThree,E=r.columns,T=r.numberBoxColor,x=r.nameColor,k=r.bodyTextColor,N=r.numberBGColor,S=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],B=function(e){return function(){o({editable:e})}};return[wp.element.createElement(h,{key:"controls"}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(m,{label:a("Column Number"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({columns:e})}}),wp.element.createElement(i,{title:a("Number Color"),colorValue:T,initialOpen:!1},wp.element.createElement(g,{value:T,onChange:function(e){return t({numberBoxColor:e})}})),wp.element.createElement(i,{title:a("Number Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(g,{value:N,onChange:function(e){return t({numberBGColor:e})}})),wp.element.createElement(i,{title:a("Name Color"),colorValue:x,initialOpen:!1},wp.element.createElement(g,{value:x,onChange:function(e){return t({nameColor:e})}})),wp.element.createElement(i,{title:a("Body Text Color"),colorValue:k,initialOpen:!1},wp.element.createElement(g,{value:k,onChange:function(e){return t({bodyTextColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-number-box column-"+E},wp.element.createElement("div",{className:"ugb-number-box-column-one"},wp.element.createElement(b,{tagName:"span",placeholder:c.default,value:c,onChange:function(e){return t({numberBox:e})},isSelected:n&&"numberBox"===l,onFocus:B("numberBox"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:y,className:"ugb-number-box-name",onChange:function(e){return t({name:e})},isSelected:n&&"name"===l,onFocus:B("name"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-number-box-body",onChange:function(e){return t({body:e})},isSelected:n&&"body"===l,onFocus:B("body"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-two"},wp.element.createElement(b,{tagName:"span",placeholder:u.default,value:u,onChange:function(e){return t({numberBoxTwo:e})},isSelected:n&&"numberBoxTwo"===l,onFocus:B("numberBoxTwo"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:v,className:"ugb-number-box-name-two",onChange:function(e){return t({nameTwo:e})},isSelected:n&&"nameTwo"===l,onFocus:B("nameTwo"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:w,className:"ugb-number-box-body-two",onChange:function(e){return t({bodyTwo:e})},isSelected:n&&"bodyTwo"===l,onFocus:B("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-three"},wp.element.createElement(b,{tagName:"span",placeholder:s.default,value:s,onChange:function(e){return t({numberBoxThree:e})},isSelected:n&&"numberBoxThree"===l,onFocus:B("numberBoxThree"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:C,className:"ugb-number-box-name-three",onChange:function(e){return t({nameThree:e})},isSelected:n&&"nameThree"===l,onFocus:B("nameThree"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:f,className:"ugb-number-box-body-three",onChange:function(e){return t({bodyThree:e})},isSelected:n&&"bodyThree"===l,onFocus:B("bodyThree"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.title,t.numberBox),l=t.numberBoxTwo,o=t.numberBoxThree,r=t.body,a=t.bodyTwo,c=t.bodyThree,i=t.name,u=t.nameTwo,m=t.nameThree,s=t.numberBoxColor,p=t.nameColor,d=t.bodyTextColor,b=t.numberBGColor,g=t.columns;return wp.element.createElement("div",{className:"ugb-number-box column-"+g},wp.element.createElement("div",{className:"ugb-number-box-column-one"},n&&!!n.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},n),i&&!!i.length&&wp.element.createElement("h4",{className:"ugb-number-box-name",style:{color:p}},i),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-number-box-body",style:{color:d}},r)),g>1&&wp.element.createElement("div",{className:"ugb-number-box-column-two"},l&&!!l.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},l),u&&!!u.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-two",style:{color:p}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-number-box-body-two",style:{color:d}},a)),g>2&&wp.element.createElement("div",{className:"ugb-number-box-column-three"},o&&!!o.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},o),m&&!!m.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-three",style:{color:p}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-number-box-body-three",style:{color:d}},c)))}})},function(e,t){},function(e,t){}]);
dist/blocks.editor.build.css CHANGED
@@ -1 +1,12 @@
1
- .wp-ugb-button__link{background:#fff;width:280px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}
 
 
 
 
 
 
 
 
 
 
 
1
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
2
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-divider hr{border:0 !important}
3
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-ugb-button__link{background:#fff;width:280px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}
4
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
5
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
6
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
7
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
8
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
9
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
10
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
11
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
12
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
dist/blocks.frontend.build.js CHANGED
@@ -61,17 +61,79 @@ var main =
61
  /******/ __webpack_require__.p = "";
62
  /******/
63
  /******/ // Load entry module and return exports
64
- /******/ return __webpack_require__(__webpack_require__.s = 0);
65
  /******/ })
66
  /************************************************************************/
67
  /******/ ([
68
  /* 0 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /***/ (function(module, exports, __webpack_require__) {
70
 
71
  "use strict";
72
 
73
 
74
- var _domReady = __webpack_require__(1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  var _domReady2 = _interopRequireDefault(_domReady);
77
 
@@ -94,28 +156,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
94
  });
95
  });
96
 
97
- /***/ }),
98
- /* 1 */
99
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
100
-
101
- "use strict";
102
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
103
- /**
104
- * Specify a function to execute when the DOM is fully loaded.
105
- *
106
- * @param {Function} callback A function to execute after the DOM is ready.
107
- *
108
- * @returns {void}
109
- */
110
- var domReady = function domReady(callback) {
111
- if (document.readyState === 'complete') {
112
- return callback();
113
- }
114
-
115
- document.addEventListener('DOMContentLoaded', callback);
116
- };
117
-
118
- /* harmony default export */ __webpack_exports__["default"] = (domReady);
119
-
120
  /***/ })
121
  /******/ ]);
61
  /******/ __webpack_require__.p = "";
62
  /******/
63
  /******/ // Load entry module and return exports
64
+ /******/ return __webpack_require__(__webpack_require__.s = 1);
65
  /******/ })
66
  /************************************************************************/
67
  /******/ ([
68
  /* 0 */
69
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
70
+
71
+ "use strict";
72
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
73
+ /**
74
+ * Specify a function to execute when the DOM is fully loaded.
75
+ *
76
+ * @param {Function} callback A function to execute after the DOM is ready.
77
+ *
78
+ * @returns {void}
79
+ */
80
+ var domReady = function domReady(callback) {
81
+ if (document.readyState === 'complete') {
82
+ return callback();
83
+ }
84
+
85
+ document.addEventListener('DOMContentLoaded', callback);
86
+ };
87
+
88
+ /* harmony default export */ __webpack_exports__["default"] = (domReady);
89
+
90
+ /***/ }),
91
+ /* 1 */
92
+ /***/ (function(module, exports, __webpack_require__) {
93
+
94
+ __webpack_require__(2);
95
+ module.exports = __webpack_require__(3);
96
+
97
+
98
+ /***/ }),
99
+ /* 2 */
100
  /***/ (function(module, exports, __webpack_require__) {
101
 
102
  "use strict";
103
 
104
 
105
+ var _domReady = __webpack_require__(0);
106
+
107
+ var _domReady2 = _interopRequireDefault(_domReady);
108
+
109
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
110
+
111
+ /**
112
+ * Permanently hide the dismissible notification if clicked.
113
+ */
114
+ (0, _domReady2.default)(function () {
115
+ var elems = document.querySelectorAll('.wp-block-ugb-expand');
116
+ elems.forEach(function (el) {
117
+ var btn = el.querySelector('.ugb-expand-button');
118
+ var clickHandler = function clickHandler(e) {
119
+ el.classList.toggle('ugb-more');
120
+ e.preventDefault();
121
+ };
122
+ if (btn) {
123
+ btn.addEventListener('click', clickHandler);
124
+ btn.addEventListener('tapEnd', clickHandler);
125
+ }
126
+ });
127
+ });
128
+
129
+ /***/ }),
130
+ /* 3 */
131
+ /***/ (function(module, exports, __webpack_require__) {
132
+
133
+ "use strict";
134
+
135
+
136
+ var _domReady = __webpack_require__(0);
137
 
138
  var _domReady2 = _interopRequireDefault(_domReady);
139
 
156
  });
157
  });
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  /***/ })
160
  /******/ ]);
dist/blocks.frontend.build.min.js CHANGED
@@ -1 +1 @@
1
- var main=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r,o=n(1);(0,((r=o)&&r.__esModule?r:{default:r}).default)(function(){document.querySelectorAll(".ugb-notification.dismissible-true[data-uid]").forEach(function(t){var e=t.getAttribute("data-uid");localStorage.getItem("stckbl-notif-"+e)||(t.style.display="block"),t.querySelector(".close-button").addEventListener("click",function(){localStorage.setItem("stckbl-notif-"+e,1),t.style.display=""})})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){if("complete"===document.readyState)return t();document.addEventListener("DOMContentLoaded",t)}}]);
1
+ var main=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){if("complete"===document.readyState)return t();document.addEventListener("DOMContentLoaded",t)}},function(t,e,n){n(2),t.exports=n(3)},function(t,e,n){"use strict";var o,r=n(0);(0,((o=r)&&o.__esModule?o:{default:o}).default)(function(){document.querySelectorAll(".wp-block-ugb-expand").forEach(function(t){var e=t.querySelector(".ugb-expand-button"),n=function(e){t.classList.toggle("ugb-more"),e.preventDefault()};e&&(e.addEventListener("click",n),e.addEventListener("tapEnd",n))})})},function(t,e,n){"use strict";var o,r=n(0);(0,((o=r)&&o.__esModule?o:{default:o}).default)(function(){document.querySelectorAll(".ugb-notification.dismissible-true[data-uid]").forEach(function(t){var e=t.getAttribute("data-uid");localStorage.getItem("stckbl-notif-"+e)||(t.style.display="block"),t.querySelector(".close-button").addEventListener("click",function(){localStorage.setItem("stckbl-notif-"+e,1),t.style.display=""})})})}]);
dist/blocks.style.build.css CHANGED
@@ -1,9 +1,12 @@
1
- .wp-block-ugb-divider{border:0;height:1px;width:100%;background-color:transparent;margin-top:2rem;margin-bottom:2rem}.wp-block-ugb-divider hr{background-color:#dddddd;border:0 !important}
2
- .wp-block-button.ugb-button-center{-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);left:50%;position:relative}span.wp-block-button.ugb-button-right,form.blocks-button__inline-link.ugb-button-right{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);left:100%;position:relative}form.blocks-button__inline-link.ugb-button-center{margin:0 auto}.wp-ugb-button.wp-ugb-button{border:none;border-radius:4px;-webkit-box-shadow:none !important;box-shadow:none !important;cursor:pointer;display:inline-block;line-height:1em;margin:0;text-decoration:none !important;white-space:nowrap;display:inline-block;opacity:1;background:#2091e1;color:#fff;padding:0.75em 1em;-webkit-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;box-shadow:none !important}.wp-ugb-button.wp-ugb-button:hover{opacity:.85;-webkit-box-shadow:none !important;box-shadow:none !important;border:0}.wp-block-ugb-button .wp-ugb-button:hover{color:white}.wp-block-ugb-button.ugb-button-right{margin:10px 0;text-align:right}.wp-block-ugb-button.ugb-button-center{margin:10px 0;text-align:center}.wp-block-ugb-button.ugb-button-left{margin:10px 0;text-align:left}.ugb-button-small{font-size:.75em}.ugb-button-normal{font-size:1em}.ugb-button-medium{font-size:1.25em}.ugb-button-large{font-size:1.5em}
3
- .wp-block-ugb-ghost-button.ugb-button-right{margin:10px 0;text-align:right}.wp-block-ugb-ghost-button.ugb-button-center{margin:10px 0;text-align:center}.wp-block-ugb-ghost-button.ugb-button-left{margin:10px 0;text-align:left}.wp-block-button .wp-ugb-button.ugb-ghost-button,.wp-block-ugb-ghost-button .wp-ugb-button.ugb-ghost-button{background-color:transparent;border:2px solid #2091e1;color:#2091e1}.wp-block-button .wp-ugb-button.ugb-ghost-button:hover,.wp-block-ugb-ghost-button .wp-ugb-button.ugb-ghost-button:hover{opacity:.85;-webkit-box-shadow:none !important;box-shadow:none !important;color:#2091e1}
4
- .wp-block-ugb-notification{position:relative}.wp-ugb-notif{border-radius:4px;padding:1.3em 1.5em;color:#ffffff}.notif-success{background-color:#40ba7b}.notif-error{background-color:#d9534f}.notif-warning{background-color:#ffdd57;color:#424242}.notif-info{background-color:#2091e1}.ugb-notification,.wp-block-ugb-notification{position:relative}.ugb-notification .close-button,.wp-block-ugb-notification .close-button{position:absolute;right:0;z-index:2;margin-right:1.5rem;margin-top:1.3rem;font-size:8px;padding-top:.3rem;cursor:pointer}.ugb-notification .close-button svg,.wp-block-ugb-notification .close-button svg{width:13px;height:auto}.ugb-notification.dismissible-true .wp-ugb-notif{padding-right:4rem}.ugb-notification.type-success svg,.ugb-notification.type-error svg,.ugb-notification.type-info svg{fill:#ffffff}.ugb-notification.type-warning svg{fill:#424242}.ugb-notification.dismissible-true[data-uid]{display:none}
5
- .ugb-blockquote{border:0;border-left:8px solid #2091e1;padding:1rem 2rem;margin:1rem 2rem;opacity:.5;font-style:italic;text-align:inherit;background:transparent}.ugb-blockquote p{margin:0}.ugb-blockquote:after,.ugb-blockquote:before,.ugb-blockquote p:after,.ugb-blockquote p:before{display:none}
6
- blockquote.ugb-pullquote{border-top:8px solid #2091e1;border-bottom:8px solid #2091e1;border-left:none !important;border-right:none !important;text-align:center;padding:2rem;margin:1rem 0;opacity:.5;color:#2091e1;font-size:1.5em;font-style:normal}blockquote.ugb-pullquote p{margin:0;text-align:center}blockquote.ugb-pullquote:after,blockquote.ugb-pullquote:before,blockquote.ugb-pullquote p:after,blockquote.ugb-pullquote p:before{display:none}
7
- div.ugb-cta{text-align:center;padding:4rem 2rem;background-color:#f4f4f4}div.ugb-cta .ugb-cta-title{margin:0 0 1rem !important}div.ugb-cta .ugb-cta-bodyText{opacity:.5;margin:0 0 1.5rem}div.ugb-cta .ugb-cta-button{margin:0}div.ugb-cta .blocks-button__inline-link{margin:0 auto}div.ugb-cta p{text-align:center}.wp-block-ugb-button .wp-ugb-button:hover{color:white}
8
- .ugb-testimonial{display:-ms-flexbox;display:flex}.ugb-testimonial .testimonial-image{height:75px;width:75px;background-size:cover;background-position:center;border-radius:100%;margin:0 auto 1.3rem}.ugb-testimonial .quote-icon{height:75px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ugb-testimonial .quote-icon svg{height:50px;width:auto;fill:#e6e6e6}.ugb-testimonial>div{text-align:center;padding:1rem 0;margin:0 auto}.ugb-testimonial>div p{text-align:center}.ugb-testimonial h4{margin:0 0 .5rem !important}.ugb-testimonial .ugb-testimonial-position,.ugb-testimonial .ugb-testimonial-position-two,.ugb-testimonial .ugb-testimonial-position-three{opacity:.3;font-size:.75em;margin:0 0 1rem;text-transform:uppercase}.ugb-testimonial .ugb-testimonial-body,.ugb-testimonial .ugb-testimonial-body-two,.ugb-testimonial .ugb-testimonial-body-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-testimonial.column-1 .ugb-testimonial-column-two,.ugb-testimonial.column-1 .ugb-testimonial-column-three{display:none}.ugb-testimonial.column-2 .ugb-testimonial-column-one{margin-right:1rem}.ugb-testimonial.column-2 .ugb-testimonial-column-two{margin-left:1rem}.ugb-testimonial.column-2>div{width:50%}.ugb-testimonial.column-2 .ugb-testimonial-column-three{display:none}.ugb-testimonial.column-3>div{width:33.2%;margin-left:1rem;margin-right:1rem}.ugb-testimonial.column-3>div:first-child{margin-left:0}.ugb-testimonial.column-3>div:last-child{margin-right:0}@media screen and (max-width: 800px){.ugb-testimonial.column-3.column-3{display:block}.ugb-testimonial.column-3.column-3>div{width:100%;margin:0}}@media screen and (max-width: 600px){.ugb-testimonial.column-2.column-2{display:block}.ugb-testimonial.column-2.column-2>div{width:100%;margin:0}}
9
- .ugb-team-member .team-member-image{width:300px;height:300px;background-size:cover;background-position:center;margin:0 auto 1.3rem}.ugb-team-member.image-circle .team-member-image{border-radius:100%}.ugb-team-member.column-2 .team-member-image{width:220px;height:220px}.ugb-team-member.column-3 .team-member-image{width:150px;height:150px}.ugb-team-member>div{text-align:center;padding:1rem 0}.ugb-team-member>div p{text-align:center}.ugb-team-member h4{margin:0 0 .5rem !important}.ugb-team-member .ugb-team-member-position{margin:0 0 1rem}.ugb-team-member .ugb-team-member-position{opacity:.3;font-size:.75em;text-transform:uppercase}.ugb-team-member .ugb-team-member-des,.ugb-team-member .ugb-team-member-des-two,.ugb-team-member .ugb-team-member-des-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-team-member.column-1 .ugb-team-member-column-two,.ugb-team-member.column-1 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2{display:-ms-flexbox;display:flex}.ugb-team-member.column-2 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-2 .ugb-team-member-column-two{padding-left:1rem}.ugb-team-member.column-2 .ugb-team-member-column-one,.ugb-team-member.column-2 .ugb-team-member-column-two{width:50%}.ugb-team-member.column-2 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2 .team-member-image img{height:200px;width:250px}.ugb-team-member.column-3{display:-ms-flexbox;display:flex}.ugb-team-member.column-3 .ugb-team-member-column-one,.ugb-team-member.column-3 .ugb-team-member-column-two,.ugb-team-member.column-3 .ugb-team-member-column-three{width:33.33%}.ugb-team-member.column-3 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-two{padding-left:1rem;padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-three{padding-left:1rem}.ugb-team-member.column-3 .team-member-image img{height:200px;width:200px}.team-member-social a{color:#000000;opacity:.30;padding:0 3px}
 
 
 
1
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
2
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-divider{border:0;height:1px;width:100%;background-color:transparent;margin-top:2rem;margin-bottom:2rem}.wp-block-ugb-divider hr{background-color:#dddddd;border:0 !important}
3
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-button.ugb-button-center{-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);left:50%;position:relative}span.wp-block-button.ugb-button-right,form.blocks-button__inline-link.ugb-button-right{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);left:100%;position:relative}form.blocks-button__inline-link.ugb-button-center{margin:0 auto}.wp-ugb-button.wp-ugb-button{border:none;border-radius:4px;-webkit-box-shadow:none !important;box-shadow:none !important;cursor:pointer;display:inline-block;line-height:1em;margin:0;text-decoration:none !important;white-space:nowrap;display:inline-block;opacity:1;background:#2091e1;color:#fff;padding:0.75em 1em;-webkit-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;box-shadow:none !important}.wp-ugb-button.wp-ugb-button:hover{opacity:.85;-webkit-box-shadow:none !important;box-shadow:none !important;border:0}.wp-block-ugb-button .wp-ugb-button:hover{color:white}.wp-block-ugb-button.ugb-button-right{margin:10px 0;text-align:right}.wp-block-ugb-button.ugb-button-center{margin:10px 0;text-align:center}.wp-block-ugb-button.ugb-button-left{margin:10px 0;text-align:left}.ugb-button-small{font-size:.75em}.ugb-button-normal{font-size:1em}.ugb-button-medium{font-size:1.25em}.ugb-button-large{font-size:1.5em}
4
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-ghost-button.ugb-button-right{margin:10px 0;text-align:right}.wp-block-ugb-ghost-button.ugb-button-center{margin:10px 0;text-align:center}.wp-block-ugb-ghost-button.ugb-button-left{margin:10px 0;text-align:left}.wp-block-button .wp-ugb-button.ugb-ghost-button,.wp-block-ugb-ghost-button .wp-ugb-button.ugb-ghost-button{background-color:transparent;border:2px solid #2091e1;color:#2091e1}.wp-block-button .wp-ugb-button.ugb-ghost-button:hover,.wp-block-ugb-ghost-button .wp-ugb-button.ugb-ghost-button:hover{opacity:.85;-webkit-box-shadow:none !important;box-shadow:none !important;color:#2091e1}
5
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-notification{position:relative}.wp-ugb-notif{border-radius:4px;padding:1.3em 1.5em;color:#ffffff}.notif-success{background-color:#40ba7b}.notif-error{background-color:#d9534f}.notif-warning{background-color:#ffdd57;color:#424242}.notif-info{background-color:#2091e1}.ugb-notification,.wp-block-ugb-notification{position:relative}.ugb-notification .close-button,.wp-block-ugb-notification .close-button{position:absolute;right:0;z-index:2;margin-right:1.5rem;margin-top:1.3rem;font-size:8px;padding-top:.3rem;cursor:pointer}.ugb-notification .close-button svg,.wp-block-ugb-notification .close-button svg{width:13px;height:auto}.ugb-notification.dismissible-true .wp-ugb-notif{padding-right:4rem}.ugb-notification.type-success svg,.ugb-notification.type-error svg,.ugb-notification.type-info svg{fill:#ffffff}.ugb-notification.type-warning svg{fill:#424242}.ugb-notification.dismissible-true[data-uid]{display:none}
6
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-blockquote{border:0;border-left:8px solid #2091e1;padding:1rem 2rem;margin:1rem 2rem;opacity:.5;font-style:italic;text-align:inherit;background:transparent}.ugb-blockquote p{margin:0}.ugb-blockquote:after,.ugb-blockquote:before,.ugb-blockquote p:after,.ugb-blockquote p:before{display:none}
7
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}blockquote.ugb-pullquote{border-top:8px solid #2091e1;border-bottom:8px solid #2091e1;border-left:none !important;border-right:none !important;text-align:center;padding:2rem;margin:1rem 0;opacity:.5;color:#2091e1;font-size:1.5em;font-style:normal}blockquote.ugb-pullquote p{margin:0;text-align:center}blockquote.ugb-pullquote:after,blockquote.ugb-pullquote:before,blockquote.ugb-pullquote p:after,blockquote.ugb-pullquote p:before{display:none}
8
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}div.ugb-cta{text-align:center;padding:4rem 2rem;background-color:#f4f4f4}div.ugb-cta .ugb-cta-title{margin:0 0 1rem !important}div.ugb-cta .ugb-cta-bodyText{opacity:.5;margin:0 0 1.5rem}div.ugb-cta .ugb-cta-button{margin:0}div.ugb-cta .blocks-button__inline-link{margin:0 auto}div.ugb-cta p{text-align:center}.wp-block-ugb-button .wp-ugb-button:hover{color:white}
9
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-testimonial{display:-ms-flexbox;display:flex}.ugb-testimonial .testimonial-image{height:75px;width:75px;background-size:cover;background-position:center;border-radius:100%;margin:0 auto 1.3rem}.ugb-testimonial .quote-icon{height:75px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ugb-testimonial .quote-icon svg{height:50px;width:auto;fill:#e6e6e6}.ugb-testimonial>div{text-align:center;padding:1rem 0;margin:0 auto}.ugb-testimonial>div p{text-align:center}.ugb-testimonial h4{margin:0 0 .5rem !important}.ugb-testimonial .ugb-testimonial-position,.ugb-testimonial .ugb-testimonial-position-two,.ugb-testimonial .ugb-testimonial-position-three{opacity:.3;font-size:.75em;margin:0 0 1rem;text-transform:uppercase}.ugb-testimonial .ugb-testimonial-body,.ugb-testimonial .ugb-testimonial-body-two,.ugb-testimonial .ugb-testimonial-body-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-testimonial.column-1 .ugb-testimonial-column-two,.ugb-testimonial.column-1 .ugb-testimonial-column-three{display:none}.ugb-testimonial.column-2 .ugb-testimonial-column-one{margin-right:1rem}.ugb-testimonial.column-2 .ugb-testimonial-column-two{margin-left:1rem}.ugb-testimonial.column-2>div{width:50%}.ugb-testimonial.column-2 .ugb-testimonial-column-three{display:none}.ugb-testimonial.column-3>div{width:33.2%;margin-left:1rem;margin-right:1rem}.ugb-testimonial.column-3>div:first-child{margin-left:0}.ugb-testimonial.column-3>div:last-child{margin-right:0}@media screen and (max-width: 800px){.ugb-testimonial.column-3.column-3{display:block}.ugb-testimonial.column-3.column-3>div{width:100%;margin:0}}@media screen and (max-width: 600px){.ugb-testimonial.column-2.column-2{display:block}.ugb-testimonial.column-2.column-2>div{width:100%;margin:0}}
10
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-team-member .team-member-image{width:300px;height:300px;background-size:cover;background-position:center;margin:0 auto 1.3rem}.ugb-team-member.image-circle .team-member-image{border-radius:100%}.ugb-team-member.column-2 .team-member-image{width:220px;height:220px}.ugb-team-member.column-3 .team-member-image{width:150px;height:150px}.ugb-team-member>div{text-align:center;padding:1rem 0}.ugb-team-member>div p{text-align:center}.ugb-team-member h4{margin:0 0 .5rem !important}.ugb-team-member .ugb-team-member-position{margin:0 0 1rem}.ugb-team-member .ugb-team-member-position{opacity:.3;font-size:.75em;text-transform:uppercase}.ugb-team-member .ugb-team-member-des,.ugb-team-member .ugb-team-member-des-two,.ugb-team-member .ugb-team-member-des-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-team-member.column-1 .ugb-team-member-column-two,.ugb-team-member.column-1 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2{display:-ms-flexbox;display:flex}.ugb-team-member.column-2 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-2 .ugb-team-member-column-two{padding-left:1rem}.ugb-team-member.column-2 .ugb-team-member-column-one,.ugb-team-member.column-2 .ugb-team-member-column-two{width:50%}.ugb-team-member.column-2 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2 .team-member-image img{height:200px;width:250px}.ugb-team-member.column-3{display:-ms-flexbox;display:flex}.ugb-team-member.column-3 .ugb-team-member-column-one,.ugb-team-member.column-3 .ugb-team-member-column-two,.ugb-team-member.column-3 .ugb-team-member-column-three{width:33.33%}.ugb-team-member.column-3 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-two{padding-left:1rem;padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-three{padding-left:1rem}.ugb-team-member.column-3 .team-member-image img{height:200px;width:200px}.team-member-social a{color:#000000;opacity:.30;padding:0 3px}
11
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-expand p:last-child{margin-bottom:0}.wp-block-ugb-expand.ugb-more .ugb-expand-less-text,.wp-block-ugb-expand.ugb-more .ugb-expand-more{display:none}.wp-block-ugb-expand.ugb-more .ugb-expand-more-text,.wp-block-ugb-expand.ugb-more .ugb-expand-less{display:inline !important}
12
+ .gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-number-box{display:-ms-flexbox;display:flex;margin:1rem 0}.ugb-number-box span,.ugb-number-box .blocks-rich-text span{background-color:#ddd;border-radius:100%;font-size:3em;display:block;padding:0;text-align:center;overflow:hidden;margin:0 auto;height:2.5em;width:2.5em;line-height:2.5em}.ugb-number-box>div{text-align:center;margin:0 auto}.ugb-number-box>div p{text-align:center}.ugb-number-box .ugb-number-box-name,.ugb-number-box .ugb-number-box-name-two,.ugb-number-box .ugb-number-box-name-three{margin:1.3rem 0 1rem}.ugb-number-box .ugb-number-box-body,.ugb-number-box .ugb-number-box-body-two,.ugb-number-box .ugb-number-box-body-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-number-box.column-1 .ugb-number-box-column-two,.ugb-number-box.column-1 .ugb-number-box-column-three{display:none}.ugb-number-box.column-2 .ugb-number-box-column-one{margin-right:1rem}.ugb-number-box.column-2 .ugb-number-box-column-two{margin-left:1rem}.ugb-number-box.column-2>div{width:50%}.ugb-number-box.column-2 .ugb-number-box-column-three{display:none}.ugb-number-box.column-3>div{width:33.2%;margin-left:1rem;margin-right:1rem}.ugb-number-box.column-3>div:first-child{margin-left:0}.ugb-number-box.column-3>div:last-child{margin-right:0}@media screen and (max-width: 800px){.ugb-number-box.column-3.column-3{display:block}.ugb-number-box.column-3.column-3>div{width:100%;margin:0}}@media screen and (max-width: 600px){.ugb-number-box.column-2.column-2{display:block}.ugb-number-box.column-2.column-2>div{width:100%;margin:0}}
plugin.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
6
  * Author: Gambit Technologies, Inc
7
  * Author URI: http://gambit.ph
8
- * Version: 0.1
9
  *
10
  * @package Stackable
11
  */
5
  * Description: Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
6
  * Author: Gambit Technologies, Inc
7
  * Author URI: http://gambit.ph
8
+ * Version: 0.2
9
  *
10
  * @package Stackable
11
  */
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, addon, add on, add-on, gutenb
4
  Requires at least: 4.8
5
  Tested up to: 4.9.4
6
  Requires PHP: 5.3
7
- Stable tag: 0.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -12,11 +12,13 @@ Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
12
 
13
  == Description ==
14
 
15
- Stackable adds the missing design blocks and options you need in the Gutenberg editor. Each block contains essential features to create a website from WordPress’ latest visual editor.
16
 
17
- > Note that this plugin is in alpha stage since Gutenberg hasn't been merged into core yet and is actively being developed. As things change in Gutenberg and as features, best practices and APIs arrive, things will also change in this plugin.
18
 
19
- Stackable also gives Gutenberg users more options and settings to tinker with that aren't found in the current set Gutenberg blocks - like adjusting corner radius for buttons and different styled dividers.
 
 
20
 
21
  With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and more in a single install.
22
 
@@ -24,7 +26,7 @@ With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and
24
 
25
  = More Gutenberg blocks for added functionality =
26
 
27
- Stackable extends Gutenberg's functionality, with the blocks built with effective usability in mind. It's a list of blocks designed to maintain the simplicity of Gutenberg:
28
 
29
  1. Testimonials
30
  2. Team Members
@@ -32,56 +34,66 @@ Stackable extends Gutenberg's functionality, with the blocks built with effectiv
32
  4. Notification
33
  5. Blockquote (Improved!)
34
  6. Pullquote
35
- 7. Button (Improved!)
36
- 8. Ghost Button
37
- 9. Divider (Improved!)
38
- 10. Spacer
 
 
39
 
40
  We plan to add more in the future.
41
 
42
  = Adjustable settings for each block =
43
 
44
- Each Stackable block has a set of unique features that can be modified. Change colors, tweak text sizes, change background images, add hover animations, and much more.
45
 
46
  = Our current list of blocks =
47
 
48
  **1. Testimonials**
49
 
50
- Lets you add simple yet stylish testimonial sections on your website. Add a text description, and choose between uploading a thumbnail image or icon for each testimonial.
51
 
52
  **2. Team Members**
53
 
54
- Familiarize your users with your team through individual photos and write-ups in columns. Comes with optional social media icons for each member.
55
 
56
  **3. Call to Action**
57
 
58
- Entice your users to take action. Feature your promos and alerts, and engage more with the Call to Action block.
59
 
60
  **4. Notification**
61
 
62
- Add alerts on your Gutenberg-built website for your users. Use these to notify your site visitors of promos, license expiration, and other important alerts. Choose from a range of basic settings and styles.
63
 
64
  **5. Blockquote**
65
 
66
- Extends the functionality of the current Gutenberg blockqoute by allowing you to change both text and background color.
67
 
68
  **6. Pullquote**
69
 
70
- Perfect for pulling quotes from your chosen article and showcasing them as your readers scroll down. Change text and background color to suit your pages design.
 
 
71
 
72
- **7. Button**
73
 
74
- A more flexible, customizable button block for Gutenberg. Change its size, alignment, color, text color, and even corner radius to match the overall look of your site. You can customize it a little more by placing links and icons inside, too.
75
 
76
- **8. Ghost Button**
 
 
77
 
78
  Just like the Button block, but presented in a sleek, minimalistic way: outlines only.
79
 
80
- **9. Divider**
 
 
81
 
82
- Extended options for Gutenberg’s divider. Adjust height, weight, color, and more.
83
 
84
- **10. Spacer**
 
 
85
 
86
  A simple block that lets you adjust space in between Gutenberg blocks on your page.
87
 
@@ -116,6 +128,13 @@ Nope. Stackable only works with Gutenberg.
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
119
  = 0.1 =
120
 
121
  * First release
4
  Requires at least: 4.8
5
  Tested up to: 4.9.4
6
  Requires PHP: 5.3
7
+ Stable tag: 0.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Stackable adds the missing design blocks and options you need in the Gutenberg editor.
16
 
17
+ **12 Blocks so far and counting...**
18
 
19
+ > We are in alpha stage until Gutenberg is merged into core. As features, APIs, and best practices change in Gutenberg, so will this plugin.
20
+
21
+ Stackable gives you more customization options that aren't found in the current set Gutenberg blocks ' like adjusting corner radius for buttons and different styled dividers.
22
 
23
  With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and more in a single install.
24
 
26
 
27
  = More Gutenberg blocks for added functionality =
28
 
29
+ These blocks are built with usability in mind. Stackable is also designed to suit Gutenberg's interface, simple and straightforward:
30
 
31
  1. Testimonials
32
  2. Team Members
34
  4. Notification
35
  5. Blockquote (Improved!)
36
  6. Pullquote
37
+ 7. Number box
38
+ 8. Button (Improved!)
39
+ 9. Ghost Button
40
+ 10. Expand / Show more
41
+ 11. Divider (Improved!)
42
+ 12. Spacer
43
 
44
  We plan to add more in the future.
45
 
46
  = Adjustable settings for each block =
47
 
48
+ Each Stackable block has unique features you can modify. Change colors, tweak text sizes, change background images, add hover animations, and much more.
49
 
50
  = Our current list of blocks =
51
 
52
  **1. Testimonials**
53
 
54
+ Add testimonial sections on your website. Add a text description, and choose between uploading a thumbnail image or icon for each testimonial.
55
 
56
  **2. Team Members**
57
 
58
+ Introduce your team through individual photos and write-ups in columns. Comes with optional social media icons for each member.
59
 
60
  **3. Call to Action**
61
 
62
+ Persuade your visitors to take action. Feature , and engage with Call to Action blocks.
63
 
64
  **4. Notification**
65
 
66
+ Add alerts on your Gutenberg-built website. Use these to notify your site visitors of promos, license expiration, and other important alerts. Choose from a range of basic settings and styles.
67
 
68
  **5. Blockquote**
69
 
70
+ Customize the current Gutenberg blockqoute by changing both text and background color.
71
 
72
  **6. Pullquote**
73
 
74
+ Perfect for pulling quotes from your chosen article and showcasing them as your readers scroll down. Change text and background color to suit your page's design.
75
+
76
+ **7. Number Box**
77
 
78
+ Highlight steps or procedures that only take a few steps.
79
 
80
+ **8. Button**
81
 
82
+ A more flexible, customizable button block for Gutenberg. Change size, alignment, color, text color, and even corner radius to match the overall look of your site. Modify more by placing links and icons inside.
83
+
84
+ **9. Ghost Button**
85
 
86
  Just like the Button block, but presented in a sleek, minimalistic way: outlines only.
87
 
88
+ **10. Expand / Show More**
89
+
90
+ Show snippets of text as short previews of longer text, and let visitors have the option to show more details.
91
 
92
+ **11. Divider**
93
 
94
+ Extended options for Gutenberg's divider. Adjust height, weight, color, and more.
95
+
96
+ **12. Spacer**
97
 
98
  A simple block that lets you adjust space in between Gutenberg blocks on your page.
99
 
128
 
129
  == Changelog ==
130
 
131
+ = 0.2 =
132
+
133
+ * New: Expand block
134
+ * New: Number box
135
+ * Fixed: Formatting buttons now appear again in blockquote, button, ghost button and pullquote, call-to-action, notification, team member
136
+ * Fixed: Compatibility issues and changes with Gutenberg 2.2
137
+
138
  = 0.1 =
139
 
140
  * First release
src/block/blockquote/index.js CHANGED
@@ -12,20 +12,14 @@ import './editor.scss';
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
- const { PanelColor } = wp.components
16
  const {
17
  registerBlockType, // Import registerBlockType() from wp.blocks
18
  InspectorControls,
19
- Editable,
20
- ColorPalette,
21
- BlockControls
22
  } = wp.blocks
23
 
24
- const {
25
- SelectControl,
26
- RangeControl
27
- } = wp.blocks.InspectorControls
28
-
29
  import { QuoteIcon } from '../../icons'
30
 
31
  /**
@@ -67,9 +61,15 @@ registerBlockType( 'ugb/blockquote', {
67
  },
68
 
69
  // The "edit" property must be a valid function.
70
- edit: function( props ) {
 
 
 
 
 
 
 
71
  const { color, text, borderColor } = props.attributes
72
- const { focus, setFocus, setAttributes, className } = props
73
 
74
  return [
75
  <blockquote
@@ -78,22 +78,18 @@ registerBlockType( 'ugb/blockquote', {
78
  style={ {
79
  borderLeftColor: borderColor
80
  } }>
81
- <Editable
82
  tagName={ 'p' }
83
  className={ 'ugb-blockquote-text' }
84
  value={ text }
85
  onChange={ ( nextValue ) => setAttributes( { text: nextValue } ) }
86
- focus={ focus }
87
- onFocus={ setFocus }
88
- // placeholder={ __( 'Write quote…' ) }
89
- formattingControls={ [ 'bold', 'strikethrough', 'link' ] }
90
- keepPlaceholderOnFocus
91
  style={ {
92
  color: color,
93
  } }
94
  />
95
  </blockquote>,
96
- focus && (
97
  <InspectorControls key='inspector'>
98
  <PanelColor
99
  title={ __( 'Text Color' ) }
@@ -116,7 +112,7 @@ registerBlockType( 'ugb/blockquote', {
116
  </InspectorControls>
117
  )
118
  ];
119
- },
120
 
121
  // The "save" property must be specified and must be a valid function.
122
  save: function( props ) {
@@ -127,7 +123,6 @@ registerBlockType( 'ugb/blockquote', {
127
  className={ 'ugb-blockquote' }
128
  style={ {
129
  borderLeftColor: borderColor,
130
- color: color
131
  } }>
132
  <p style={ { color: color } }>{ text }</p>
133
  </blockquote>
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
+ const { PanelColor, withState } = wp.components
16
  const {
17
  registerBlockType, // Import registerBlockType() from wp.blocks
18
  InspectorControls,
19
+ RichText,
20
+ ColorPalette
 
21
  } = wp.blocks
22
 
 
 
 
 
 
23
  import { QuoteIcon } from '../../icons'
24
 
25
  /**
61
  },
62
 
63
  // The "edit" property must be a valid function.
64
+ edit: withState( { editable: 'content', } )( ( props ) => {
65
+
66
+ const onSetActiveEditable = ( newEditable ) => () => {
67
+ setState( { editable: newEditable } )
68
+ }
69
+
70
+ const { isSelected, setAttributes, className } = props
71
+
72
  const { color, text, borderColor } = props.attributes
 
73
 
74
  return [
75
  <blockquote
78
  style={ {
79
  borderLeftColor: borderColor
80
  } }>
81
+ <RichText
82
  tagName={ 'p' }
83
  className={ 'ugb-blockquote-text' }
84
  value={ text }
85
  onChange={ ( nextValue ) => setAttributes( { text: nextValue } ) }
86
+ isSelected={ isSelected }
 
 
 
 
87
  style={ {
88
  color: color,
89
  } }
90
  />
91
  </blockquote>,
92
+ isSelected && (
93
  <InspectorControls key='inspector'>
94
  <PanelColor
95
  title={ __( 'Text Color' ) }
112
  </InspectorControls>
113
  )
114
  ];
115
+ } ),
116
 
117
  // The "save" property must be specified and must be a valid function.
118
  save: function( props ) {
123
  className={ 'ugb-blockquote' }
124
  style={ {
125
  borderLeftColor: borderColor,
 
126
  } }>
127
  <p style={ { color: color } }>{ text }</p>
128
  </blockquote>
src/block/button/index.js CHANGED
@@ -16,25 +16,25 @@ const {
16
  PanelColor,
17
  Dashicon,
18
  IconButton,
 
 
19
  } = wp.components;
20
 
21
  const {
22
  InspectorControls,
23
  BlockControls,
24
  AlignmentToolbar,
25
- Editable,
26
  ColorPalette,
27
  UrlInput,
28
  } = wp.blocks;
29
 
30
- const { SelectControl, RangeControl } = wp.blocks.InspectorControls;
31
-
32
  import { ButtonIcon } from '../../icons'
33
 
34
  class UGBButtonBlock extends Component {
35
 
36
  render() {
37
- const { focus, setFocus, className, setAttributes } = this.props;
38
  const { url, title, text, color, textColor, size, textAlignment, cornerButtonRadius } = this.props.attributes;
39
  const linkOptions = [
40
  { value: 'small', label: __( 'Small' ) },
@@ -44,7 +44,7 @@ class UGBButtonBlock extends Component {
44
  ];
45
 
46
  return [
47
- focus && (
48
  <BlockControls key="controls">
49
  <AlignmentToolbar
50
  value={ textAlignment }
@@ -57,12 +57,10 @@ class UGBButtonBlock extends Component {
57
  <span key={ 'button' }
58
  title={ title }
59
  className={ `wp-block-button ugb-button-${textAlignment}` }>
60
- <Editable
61
  tagName={ 'span' }
62
  placeholder={ __( 'Enter Text' ) }
63
  value={ text }
64
- focus={ focus }
65
- onFocus={ setFocus }
66
  onChange={ (text) => setAttributes( { text: text } ) }
67
  formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
68
  className={`wp-ugb-button ugb-button-${size}`}
@@ -71,10 +69,11 @@ class UGBButtonBlock extends Component {
71
  color: textColor,
72
  borderRadius: cornerButtonRadius + 'px',
73
  } }
 
74
  keepPlaceholderOnFocus
75
  />
76
  {
77
- focus &&
78
  <InspectorControls key={ 'inspector' }>
79
  <SelectControl
80
  label={ __( 'Size' ) }
@@ -116,7 +115,7 @@ class UGBButtonBlock extends Component {
116
  </InspectorControls>
117
  }
118
  </span>,
119
- focus && (
120
  <form
121
  key={ 'form-link' }
122
  onSubmit={ ( event ) => event.preventDefault() }
16
  PanelColor,
17
  Dashicon,
18
  IconButton,
19
+ SelectControl,
20
+ RangeControl
21
  } = wp.components;
22
 
23
  const {
24
  InspectorControls,
25
  BlockControls,
26
  AlignmentToolbar,
27
+ RichText,
28
  ColorPalette,
29
  UrlInput,
30
  } = wp.blocks;
31
 
 
 
32
  import { ButtonIcon } from '../../icons'
33
 
34
  class UGBButtonBlock extends Component {
35
 
36
  render() {
37
+ const { isSelected, className, setAttributes } = this.props;
38
  const { url, title, text, color, textColor, size, textAlignment, cornerButtonRadius } = this.props.attributes;
39
  const linkOptions = [
40
  { value: 'small', label: __( 'Small' ) },
44
  ];
45
 
46
  return [
47
+ isSelected && (
48
  <BlockControls key="controls">
49
  <AlignmentToolbar
50
  value={ textAlignment }
57
  <span key={ 'button' }
58
  title={ title }
59
  className={ `wp-block-button ugb-button-${textAlignment}` }>
60
+ <RichText
61
  tagName={ 'span' }
62
  placeholder={ __( 'Enter Text' ) }
63
  value={ text }
 
 
64
  onChange={ (text) => setAttributes( { text: text } ) }
65
  formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
66
  className={`wp-ugb-button ugb-button-${size}`}
69
  color: textColor,
70
  borderRadius: cornerButtonRadius + 'px',
71
  } }
72
+ isSelected={ isSelected }
73
  keepPlaceholderOnFocus
74
  />
75
  {
76
+ isSelected &&
77
  <InspectorControls key={ 'inspector' }>
78
  <SelectControl
79
  label={ __( 'Size' ) }
115
  </InspectorControls>
116
  }
117
  </span>,
118
+ isSelected && (
119
  <form
120
  key={ 'form-link' }
121
  onSubmit={ ( event ) => event.preventDefault() }
src/block/call-to-action/index.js CHANGED
@@ -12,40 +12,117 @@ import './editor.scss';
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
- const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
16
  const {
17
  PanelColor,
18
  Dashicon,
19
  IconButton,
 
 
 
20
  } = wp.components;
21
 
22
  const {
 
23
  InspectorControls,
24
  BlockControls,
25
  AlignmentToolbar,
26
- Editable,
27
  ColorPalette,
28
  UrlInput,
29
  } = wp.blocks;
30
 
31
- const { SelectControl, RangeControl } = wp.blocks.InspectorControls;
32
-
33
  import { CTAIcon } from '../../icons'
34
 
35
- class UGBCTABlock extends Component {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- render() {
 
38
 
39
  const {
40
- focus,
41
- setFocus,
42
- mergeBlocks,
43
  className,
44
- onReplace,
45
  setAttributes
46
- } = this.props;
47
-
48
- const focusedEditable = focus ? focus.editable || 'ctaTitle' : null;
49
 
50
  const {
51
  url,
@@ -60,7 +137,7 @@ class UGBCTABlock extends Component {
60
  bodyTextColor,
61
  titleColor,
62
  bgColor
63
- } = this.props.attributes;
64
 
65
  const linkOptions = [
66
  { value: 'small', label: __( 'Small' ) },
@@ -69,28 +146,32 @@ class UGBCTABlock extends Component {
69
  { value: 'large', label: __( 'Large' ) },
70
  ];
71
 
 
 
 
 
72
  return [
73
  <div key={'editable'} className={ 'ugb-cta' } style={ { backgroundColor: bgColor } }>
74
- <Editable
75
  className={ 'ugb-cta-title' }
76
  tagName={ 'h3' }
77
  placeholder={ __('Add Title') }
78
  value={ ctaTitle }
79
- focus={ focusedEditable === 'ctaTitle' ? focus : null }
80
  onChange={ (text) => setAttributes( { ctaTitle: text } ) }
 
 
81
  keepPlaceholderOnFocus
82
- onFocus={ ( props ) => setFocus( { ...props, editable: 'ctaTitle' } ) }
83
  style={ {
84
  color: titleColor,
85
  } }
86
  />
87
- <Editable
88
  tagName={'p'}
89
  value={ bodyText }
90
  className={ 'ugb-cta-bodyText' }
91
  onChange={ (text) => setAttributes( { bodyText: text } ) }
92
- focus={ focusedEditable === 'bodyText' ? focus : null }
93
- onFocus={ ( props ) => setFocus( { ...props, editable: 'bodyText' } ) }
94
  placeholder={ __( 'Write body text…' ) }
95
  style={ {
96
  color: bodyTextColor,
@@ -98,13 +179,13 @@ class UGBCTABlock extends Component {
98
  />
99
  <span key={ 'button' }
100
  className={ `wp-block-button ugb-cta-button` }>
101
- <Editable
102
  tagName={ 'span' }
103
  placeholder={ __( 'Add Text' ) }
104
  value={ buttonText }
105
- focus={ focusedEditable === 'buttonText' ? focus : null }
106
- onFocus={ ( props ) => setFocus( { ...props, editable: 'buttonText' } ) }
107
  onChange={ (text) => setAttributes( { buttonText: text } ) }
 
 
108
  className={`wp-ugb-button ugb-button-${size}`}
109
  style={ {
110
  backgroundColor: color,
@@ -114,7 +195,7 @@ class UGBCTABlock extends Component {
114
  keepPlaceholderOnFocus
115
  />
116
  {
117
- focus &&
118
  <InspectorControls key={ 'inspector' }>
119
  <SelectControl
120
  label={ __( 'Button Size' ) }
@@ -186,7 +267,7 @@ class UGBCTABlock extends Component {
186
  }
187
  </span>
188
  {
189
- focus && (
190
  <form
191
  key={ 'form-link' }
192
  onSubmit={ ( event ) => event.preventDefault() }
@@ -205,93 +286,8 @@ class UGBCTABlock extends Component {
205
  )
206
  }
207
  </div>
208
-
209
  ];
210
- }
211
- }
212
-
213
-
214
- /**
215
- * Register: Gutenberg Block.
216
- *
217
- * Registers a new block provided a unique name and an object defining its
218
- * behavior. Once registered, the block is made editor as an option to any
219
- * editor interface where blocks are implemented.
220
- *
221
- * @param {string} name Block name.
222
- * @param {Object} settings Block settings.
223
- * @return {?WPBlock} The block, if it has been successfully
224
- * registered; otherwise `undefined`.
225
- */
226
- registerBlockType( 'ugb/cta', {
227
- // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
228
- title: __( 'Call to Action', 'UGB' ), // Block title.
229
- icon: CTAIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
230
- category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
231
- keywords: [
232
- __( 'Call to Action' ),
233
- __( 'Stackable' ),
234
- __( 'CTA' ),
235
- ],
236
- attributes: {
237
- url: {
238
- type: 'string',
239
- source: 'attribute',
240
- selector: 'a',
241
- attribute: 'href',
242
- },
243
- title: {
244
- type: 'string',
245
- source: 'attribute',
246
- selector: 'a',
247
- attribute: 'title',
248
- },
249
- ctaTitle: {
250
- type: 'array',
251
- source: 'children',
252
- selector: 'h3',
253
- default: __( 'Get Started Today' )
254
- },
255
- bodyText: {
256
- type: 'array',
257
- source: 'children',
258
- selector: 'p',
259
- default: __( 'Get Stackable: Ultimate Gutenberg Blocks today.  Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg’s functionality.' )
260
- },
261
- buttonText: {
262
- type: 'array',
263
- source: 'children',
264
- selector: 'a',
265
- },
266
- color: {
267
- type: 'string',
268
- default: '#2091e1',
269
- },
270
- textColor: {
271
- type: 'string',
272
- default: '#ffffff',
273
- },
274
- titleColor: {
275
- type: 'string',
276
- },
277
- bodyTextColor: {
278
- type: 'string',
279
- },
280
- bgColor: {
281
- type: 'string',
282
- },
283
- size: {
284
- type: 'string',
285
- default: 'normal',
286
- },
287
- borderButtonRadius: {
288
- type: 'number',
289
- default: 4,
290
- }
291
- },
292
-
293
- // The "edit" property must be a valid function.
294
- edit: UGBCTABlock,
295
 
296
  // The "save" property must be specified and must be a valid function.
297
  save: function( props ) {
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
+
16
  const {
17
  PanelColor,
18
  Dashicon,
19
  IconButton,
20
+ withState,
21
+ SelectControl,
22
+ RangeControl
23
  } = wp.components;
24
 
25
  const {
26
+ registerBlockType, // Import registerBlockType() from wp.blocks
27
  InspectorControls,
28
  BlockControls,
29
  AlignmentToolbar,
30
+ RichText,
31
  ColorPalette,
32
  UrlInput,
33
  } = wp.blocks;
34
 
 
 
35
  import { CTAIcon } from '../../icons'
36
 
37
+ /**
38
+ * Register: Gutenberg Block.
39
+ *
40
+ * Registers a new block provided a unique name and an object defining its
41
+ * behavior. Once registered, the block is made editor as an option to any
42
+ * editor interface where blocks are implemented.
43
+ *
44
+ * @param {string} name Block name.
45
+ * @param {Object} settings Block settings.
46
+ * @return {?WPBlock} The block, if it has been successfully
47
+ * registered; otherwise `undefined`.
48
+ */
49
+ registerBlockType( 'ugb/cta', {
50
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
51
+ title: __( 'Call to Action', 'UGB' ), // Block title.
52
+ icon: CTAIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
53
+ category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
54
+ keywords: [
55
+ __( 'Call to Action' ),
56
+ __( 'Stackable' ),
57
+ __( 'CTA' ),
58
+ ],
59
+ attributes: {
60
+ url: {
61
+ type: 'string',
62
+ source: 'attribute',
63
+ selector: 'a',
64
+ attribute: 'href',
65
+ },
66
+ title: {
67
+ type: 'string',
68
+ source: 'attribute',
69
+ selector: 'a',
70
+ attribute: 'title',
71
+ },
72
+ ctaTitle: {
73
+ type: 'array',
74
+ source: 'children',
75
+ selector: 'h3',
76
+ default: __( 'Get Started Today' )
77
+ },
78
+ bodyText: {
79
+ type: 'array',
80
+ source: 'children',
81
+ selector: 'p',
82
+ default: __( 'Get Stackable: Ultimate Gutenberg Blocks today.  Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg’s functionality.' )
83
+ },
84
+ buttonText: {
85
+ type: 'array',
86
+ source: 'children',
87
+ selector: 'a',
88
+ },
89
+ color: {
90
+ type: 'string',
91
+ default: '#2091e1',
92
+ },
93
+ textColor: {
94
+ type: 'string',
95
+ default: '#ffffff',
96
+ },
97
+ titleColor: {
98
+ type: 'string',
99
+ },
100
+ bodyTextColor: {
101
+ type: 'string',
102
+ },
103
+ bgColor: {
104
+ type: 'string',
105
+ },
106
+ size: {
107
+ type: 'string',
108
+ default: 'normal',
109
+ },
110
+ borderButtonRadius: {
111
+ type: 'number',
112
+ default: 4,
113
+ }
114
+ },
115
 
116
+ // The "edit" property must be a valid function.
117
+ edit: withState( { editable: 'content', } )( ( props ) => {
118
 
119
  const {
120
+ isSelected,
121
+ editable,
122
+ setState,
123
  className,
 
124
  setAttributes
125
+ } = props;
 
 
126
 
127
  const {
128
  url,
137
  bodyTextColor,
138
  titleColor,
139
  bgColor
140
+ } = props.attributes;
141
 
142
  const linkOptions = [
143
  { value: 'small', label: __( 'Small' ) },
146
  { value: 'large', label: __( 'Large' ) },
147
  ];
148
 
149
+ const onSetActiveEditable = ( newEditable ) => () => {
150
+ setState( { editable: newEditable } )
151
+ }
152
+
153
  return [
154
  <div key={'editable'} className={ 'ugb-cta' } style={ { backgroundColor: bgColor } }>
155
+ <RichText
156
  className={ 'ugb-cta-title' }
157
  tagName={ 'h3' }
158
  placeholder={ __('Add Title') }
159
  value={ ctaTitle }
 
160
  onChange={ (text) => setAttributes( { ctaTitle: text } ) }
161
+ isSelected={ isSelected && editable === 'ctaTitle' }
162
+ onFocus={ onSetActiveEditable( 'ctaTitle' ) }
163
  keepPlaceholderOnFocus
 
164
  style={ {
165
  color: titleColor,
166
  } }
167
  />
168
+ <RichText
169
  tagName={'p'}
170
  value={ bodyText }
171
  className={ 'ugb-cta-bodyText' }
172
  onChange={ (text) => setAttributes( { bodyText: text } ) }
173
+ isSelected={ isSelected && editable === 'bodyText' }
174
+ onFocus={ onSetActiveEditable( 'bodyText' ) }
175
  placeholder={ __( 'Write body text…' ) }
176
  style={ {
177
  color: bodyTextColor,
179
  />
180
  <span key={ 'button' }
181
  className={ `wp-block-button ugb-cta-button` }>
182
+ <RichText
183
  tagName={ 'span' }
184
  placeholder={ __( 'Add Text' ) }
185
  value={ buttonText }
 
 
186
  onChange={ (text) => setAttributes( { buttonText: text } ) }
187
+ isSelected={ isSelected && editable === 'buttonText' }
188
+ onFocus={ onSetActiveEditable( 'buttonText' ) }
189
  className={`wp-ugb-button ugb-button-${size}`}
190
  style={ {
191
  backgroundColor: color,
195
  keepPlaceholderOnFocus
196
  />
197
  {
198
+ isSelected &&
199
  <InspectorControls key={ 'inspector' }>
200
  <SelectControl
201
  label={ __( 'Button Size' ) }
267
  }
268
  </span>
269
  {
270
+ isSelected && (
271
  <form
272
  key={ 'form-link' }
273
  onSubmit={ ( event ) => event.preventDefault() }
286
  )
287
  }
288
  </div>
 
289
  ];
290
+ } ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
 
292
  // The "save" property must be specified and must be a valid function.
293
  save: function( props ) {
src/block/divider/editor.scss CHANGED
@@ -4,3 +4,7 @@
4
  * CSS for just Backend enqueued after style.scss
5
  * which makes it higher in priority.
6
  */
 
 
 
 
4
  * CSS for just Backend enqueued after style.scss
5
  * which makes it higher in priority.
6
  */
7
+
8
+ .ugb-divider hr {
9
+ border: 0 !important;
10
+ }
src/block/divider/index.js CHANGED
@@ -60,7 +60,7 @@ registerBlockType( 'ugb/divider', {
60
 
61
  const { focus } = props;
62
  const { InspectorControls, ColorPalette, BlockControls, AlignmentToolbar } = wp.blocks;
63
- const { RangeControl, TextControl } = wp.blocks.InspectorControls;
64
  const { height, width, color, alignment } = props.attributes;
65
 
66
  return [
60
 
61
  const { focus } = props;
62
  const { InspectorControls, ColorPalette, BlockControls, AlignmentToolbar } = wp.blocks;
63
+ const { RangeControl } = wp.components
64
  const { height, width, color, alignment } = props.attributes;
65
 
66
  return [
src/block/expand/editor.scss ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * #.# Editor Styles for Toggle Block
3
+ *
4
+ * CSS for just Backend enqueued after style.scss
5
+ * which makes it higher in priority.
6
+ */
src/block/expand/frontend.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import domReady from '@wordpress/dom-ready';
2
+
3
+ /**
4
+ * Permanently hide the dismissible notification if clicked.
5
+ */
6
+ domReady(() => {
7
+ const elems = document.querySelectorAll('.wp-block-ugb-expand')
8
+ elems.forEach(el => {
9
+ const btn = el.querySelector('.ugb-expand-button')
10
+ const clickHandler = e => {
11
+ el.classList.toggle('ugb-more')
12
+ e.preventDefault()
13
+ }
14
+ if ( btn ) {
15
+ btn.addEventListener('click', clickHandler)
16
+ btn.addEventListener('tapEnd', clickHandler)
17
+ }
18
+ })
19
+ })
src/block/expand/index.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BLOCK: Notification
3
+ *
4
+ * Registering a basic block with Gutenberg.
5
+ * Simple block, renders and saves the same content without any interactivity.
6
+ */
7
+
8
+ // Import CSS.
9
+ import './style.scss';
10
+ import './editor.scss';
11
+
12
+ const { __ } = wp.i18n; // Import __() from wp.i18n
13
+ const { Component } = wp.element
14
+ const { withState } = wp.components
15
+
16
+ const {
17
+ registerBlockType, // Import registerBlockType() from wp.blocks
18
+ RichText,
19
+ BlockControls,
20
+ } = wp.blocks;
21
+
22
+ import { ExpandIcon } from '../../icons'
23
+
24
+ const toRichTextMultilineValue = value => value.map( ( subValue => subValue.children ) );
25
+ const fromRichTextMultilineValue = value => value.map( ( subValue ) => ( {
26
+ children: subValue,
27
+ } ) );
28
+
29
+ /**
30
+ * Register: aa Gutenberg Block.
31
+ *
32
+ * Registers a new block provided a unique name and an object defining its
33
+ * behavior. Once registered, the block is made editor as an option to any
34
+ * editor interface where blocks are implemented.
35
+ *
36
+ * @param {string} name Block name.
37
+ * @param {Object} settings Block settings.
38
+ * @return {?WPBlock} The block, if it has been successfully
39
+ * registered; otherwise `undefined`.
40
+ */
41
+ registerBlockType( 'ugb/expand', {
42
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
43
+ title: __( 'Expand / Show More', 'UGB' ), // Block title.
44
+ icon: ExpandIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
45
+ category: 'formatting', // Block category — Group blocks together based on common traits E.g. common, formatting, layout, widgets, embed.
46
+ keywords: [
47
+ __( 'Expand' ),
48
+ __( 'Show more' ),
49
+ __( 'Stackable' ),
50
+ ],
51
+ attributes: {
52
+
53
+ // Multilines.
54
+ text: {
55
+ type: 'array',
56
+ source: 'query',
57
+ selector: '.ugb-expand-less-text > p',
58
+ query: {
59
+ children: {
60
+ source: 'node',
61
+ },
62
+ },
63
+ default: [],
64
+ },
65
+ moreText: {
66
+ type: 'array',
67
+ source: 'query',
68
+ selector: '.ugb-expand-more-text > p',
69
+ query: {
70
+ children: {
71
+ source: 'node',
72
+ },
73
+ },
74
+ default: [],
75
+ },
76
+
77
+ // Single lines.
78
+ moreLabel: {
79
+ type: 'array',
80
+ source: 'children',
81
+ selector: '.ugb-expand-more',
82
+ default: __( 'Show more' ),
83
+ },
84
+ lessLabel: {
85
+ type: 'array',
86
+ source: 'children',
87
+ selector: '.ugb-expand-less',
88
+ default: __( 'Show less' ),
89
+ },
90
+ },
91
+
92
+
93
+
94
+ // The "edit" property must be a valid function.
95
+ edit: withState( { editable: 'text', } )( ( props ) => {
96
+
97
+ const {
98
+ focus,
99
+ setFocus,
100
+ editable,
101
+ setAttributes,
102
+ setState,
103
+ className,
104
+ isSelected,
105
+ } = props
106
+
107
+ const onSetActiveEditable = ( newEditable ) => () => {
108
+ setState( { editable: newEditable } );
109
+ };
110
+
111
+ const {
112
+ text,
113
+ moreLabel,
114
+ moreText,
115
+ lessLabel,
116
+ } = props.attributes
117
+
118
+ return [
119
+ isSelected && (
120
+ <BlockControls key="controls"/>
121
+ ),
122
+ <div key='expand' className={ className }>
123
+ { isSelected && <label className="ugb-editor-label">Less text</label> }
124
+ <RichText
125
+ multiline='p'
126
+ placeholder={ props.attributes.text.default }
127
+ value={ toRichTextMultilineValue( text ) }
128
+ onChange={ (text) => setAttributes( { text: fromRichTextMultilineValue( text ) } ) }
129
+ isSelected={ isSelected && editable === 'text' }
130
+ onFocus={ onSetActiveEditable( 'text' ) }
131
+ className={`ugb-expand-less-text`}
132
+ placeholder={ __( 'Some short text that can be expanded to show more details.' ) }
133
+ />
134
+ <RichText
135
+ tagName='a'
136
+ placeholder={ props.attributes.moreLabel.default }
137
+ value={ moreLabel }
138
+ isSelected={ isSelected && editable === 'moreLabel' }
139
+ onFocus={ onSetActiveEditable( 'moreLabel' ) }
140
+ onChange={ (text) => setAttributes( { moreLabel: text } ) }
141
+ formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
142
+ className={`ugb-expand-more`}
143
+ placeholder={ __( 'Show more' ) }
144
+ />
145
+ { isSelected && <label className="ugb-editor-label">More text</label> }
146
+ {
147
+ isSelected &&
148
+ <RichText
149
+ multiline='p'
150
+ placeholder={ props.attributes.moreText.default }
151
+ value={ toRichTextMultilineValue( moreText ) }
152
+ isSelected={ isSelected && editable === 'moreText' }
153
+ onFocus={ onSetActiveEditable( 'moreText' ) }
154
+ onChange={ (text) => setAttributes( { moreText: fromRichTextMultilineValue( text ) } ) }
155
+ className={`ugb-expand-more-text`}
156
+ placeholder={ __( 'Some short text that can be expanded to show more details. Some additional text that can only be seen when expanded.' ) }
157
+ />
158
+ }
159
+ { isSelected &&
160
+ <RichText
161
+ tagName='a'
162
+ placeholder={ props.attributes.lessLabel.default }
163
+ value={ lessLabel }
164
+ isSelected={ isSelected && editable === 'lessLabel' }
165
+ onFocus={ onSetActiveEditable( 'lessLabel' ) }
166
+ onChange={ (text) => setAttributes( { lessLabel: text } ) }
167
+ formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
168
+ className={`ugb-expand-less`}
169
+ placeholder={ __( 'Show less' ) }
170
+ />
171
+ }
172
+ </div>
173
+ ]
174
+ } ),
175
+
176
+ // The "save" property must be specified and must be a valid function.
177
+ save: function( props ) {
178
+
179
+ const {
180
+ text,
181
+ moreLabel,
182
+ moreText,
183
+ lessLabel,
184
+ } = props.attributes
185
+
186
+ return (
187
+ <div>
188
+ <div className='ugb-expand-less-text'>
189
+ { text.map( ( paragraph, i ) => (
190
+ <p key={ i }>{ paragraph.children && paragraph.children.props.children }</p>
191
+ ) ) }
192
+ </div>
193
+ <div className='ugb-expand-more-text' style={{ display: 'none' }}>
194
+ { moreText.map( ( paragraph, i ) => (
195
+ <p key={ i }>{ paragraph.children && paragraph.children.props.children }</p>
196
+ ) ) }
197
+ </div>
198
+ <a className='ugb-expand-button' href="#">
199
+ <span className='ugb-expand-more'>{ moreLabel }</span>
200
+ <span className='ugb-expand-less' style={{ display: 'none' }}>{ lessLabel }</span>
201
+ </a>
202
+ </div>
203
+ )
204
+ },
205
+ } );
src/block/expand/style.scss ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * #.# Styles for Toggle Block.
3
+ *
4
+ * CSS for both Frontend+Backend.
5
+ */
6
+
7
+ .wp-block-ugb-expand {
8
+ p:last-child {
9
+ margin-bottom: 0;
10
+ }
11
+ &.ugb-more {
12
+ .ugb-expand-less-text, .ugb-expand-more {
13
+ display: none;
14
+ }
15
+ .ugb-expand-more-text, .ugb-expand-less {
16
+ display: inline !important;
17
+ }
18
+ }
19
+ }
src/block/ghost-button/index.js CHANGED
@@ -15,26 +15,19 @@ const {
15
  registerBlockType, // Import registerBlockType() from wp.block
16
  InspectorControls,
17
  BlockControls,
18
- Editable,
19
  AlignmentToolbar,
20
- ToggleControl,
21
  ColorPalette,
22
- ContrastChecker,
23
  UrlInput
24
  } = wp.blocks
25
 
26
  const {
27
  PanelColor,
28
- PanelBody,
29
  IconButton,
30
- withFallbackStyles,
31
- Dashicon
32
- } = wp.components
33
-
34
- const {
35
  SelectControl,
36
  RangeControl,
37
- } = wp.blocks.InspectorControls
38
 
39
  import { GhostButtonIcon } from '../../icons'
40
 
@@ -42,8 +35,7 @@ class UGBGhostButtonBlock extends Component {
42
 
43
  render() {
44
  const {
45
- focus,
46
- setFocus,
47
  setAttributes
48
  } = this.props
49
 
@@ -66,7 +58,7 @@ class UGBGhostButtonBlock extends Component {
66
  ]
67
 
68
  return [
69
- focus && (
70
  <BlockControls key='controls'>
71
  <AlignmentToolbar
72
  value={textAlignment}
@@ -79,12 +71,10 @@ class UGBGhostButtonBlock extends Component {
79
  <span key='button'
80
  title={ title }
81
  className={ `wp-block-button ugb-button-${textAlignment}` }>
82
- <Editable
83
  tagName={ 'span' }
84
  placeholder={ __( 'Enter Text' ) }
85
  value={ text }
86
- focus={ focus }
87
- onFocus={ setFocus }
88
  onChange={ ( text ) => setAttributes( { text: text } ) }
89
  formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
90
  className={ `wp-ugb-button ugb-button-${size} ugb-ghost-button` }
@@ -94,10 +84,11 @@ class UGBGhostButtonBlock extends Component {
94
  borderRadius: cornerButtonRadius + 'px',
95
  borderWidth: borderThickness + 'px',
96
  } }
 
97
  keepPlaceholderOnFocus
98
  />
99
  {
100
- focus &&
101
  <InspectorControls key='inspector'>
102
  <SelectControl
103
  label={ __( 'Size' ) }
@@ -135,7 +126,7 @@ class UGBGhostButtonBlock extends Component {
135
  </InspectorControls>
136
  }
137
  </span>,
138
- focus && (
139
  <form
140
  key={ 'form-link' }
141
  onSubmit={ ( event ) => event.preventDefault() }
15
  registerBlockType, // Import registerBlockType() from wp.block
16
  InspectorControls,
17
  BlockControls,
18
+ RichText,
19
  AlignmentToolbar,
 
20
  ColorPalette,
 
21
  UrlInput
22
  } = wp.blocks
23
 
24
  const {
25
  PanelColor,
 
26
  IconButton,
27
+ Dashicon,
 
 
 
 
28
  SelectControl,
29
  RangeControl,
30
+ } = wp.components
31
 
32
  import { GhostButtonIcon } from '../../icons'
33
 
35
 
36
  render() {
37
  const {
38
+ isSelected,
 
39
  setAttributes
40
  } = this.props
41
 
58
  ]
59
 
60
  return [
61
+ isSelected && (
62
  <BlockControls key='controls'>
63
  <AlignmentToolbar
64
  value={textAlignment}
71
  <span key='button'
72
  title={ title }
73
  className={ `wp-block-button ugb-button-${textAlignment}` }>
74
+ <RichText
75
  tagName={ 'span' }
76
  placeholder={ __( 'Enter Text' ) }
77
  value={ text }
 
 
78
  onChange={ ( text ) => setAttributes( { text: text } ) }
79
  formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
80
  className={ `wp-ugb-button ugb-button-${size} ugb-ghost-button` }
84
  borderRadius: cornerButtonRadius + 'px',
85
  borderWidth: borderThickness + 'px',
86
  } }
87
+ isSelected={ isSelected }
88
  keepPlaceholderOnFocus
89
  />
90
  {
91
+ isSelected &&
92
  <InspectorControls key='inspector'>
93
  <SelectControl
94
  label={ __( 'Size' ) }
126
  </InspectorControls>
127
  }
128
  </span>,
129
+ isSelected && (
130
  <form
131
  key={ 'form-link' }
132
  onSubmit={ ( event ) => event.preventDefault() }
src/block/notification/index.js CHANGED
@@ -11,14 +11,16 @@ import './editor.scss';
11
 
12
  const { __ } = wp.i18n; // Import __() from wp.i18n
13
  const { Component } = wp.element
14
- const { PanelColor } = wp.components;
 
15
  import md5 from 'md5'
16
 
17
  const {
18
  registerBlockType, // Import registerBlockType() from wp.blocks
19
  InspectorControls,
20
- Editable,
21
  ColorPalette,
 
22
  } = wp.blocks;
23
 
24
  const {
@@ -75,7 +77,12 @@ registerBlockType( 'ugb/notification', {
75
 
76
 
77
  // The "edit" property must be a valid function.
78
- edit: function( props ) {
 
 
 
 
 
79
  const notifAlert = [
80
  { value: 'success', label: __( 'Success' ) },
81
  { value: 'error', label: __( 'Error' ) },
@@ -84,8 +91,9 @@ registerBlockType( 'ugb/notification', {
84
  ];
85
 
86
  const {
87
- focus,
88
- setFocus,
 
89
  setAttributes,
90
  className
91
  } = props
@@ -98,7 +106,10 @@ registerBlockType( 'ugb/notification', {
98
  dismissible
99
  } = props.attributes
100
 
101
- return (
 
 
 
102
  <div key={ 'editable' } className={ `ugb-notification type-${notifType} dismissible-${dismissible}` }>
103
  {
104
  dismissible && (
@@ -110,23 +121,21 @@ registerBlockType( 'ugb/notification', {
110
  </span>
111
  )
112
  }
113
- <Editable
114
- tagName={ 'p' }
115
  placeholder={ props.attributes.text.default }
116
  value={ text }
117
- focus={ focus }
118
- onFocus={ setFocus }
119
  onChange={ (text) => setAttributes( { text: text } ) }
120
- formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
121
  className={`wp-ugb-notif notif-${notifType}`}
122
  style={ {
123
  backgroundColor: color,
124
  color: textColor,
125
  } }
126
- keepPlaceholderOnFocus
127
  />
128
  {
129
- focus &&
130
  <InspectorControls key={ 'inspector' }>
131
  <ToggleControl
132
  label={ __( 'Dismissible' ) }
@@ -167,8 +176,8 @@ registerBlockType( 'ugb/notification', {
167
  </InspectorControls>
168
  }
169
  </div>
170
- )
171
- },
172
 
173
  // The "save" property must be specified and must be a valid function.
174
  save: function( props ) {
11
 
12
  const { __ } = wp.i18n; // Import __() from wp.i18n
13
  const { Component } = wp.element
14
+ const { PanelColor } = wp.components
15
+ const { withState } = wp.components
16
  import md5 from 'md5'
17
 
18
  const {
19
  registerBlockType, // Import registerBlockType() from wp.blocks
20
  InspectorControls,
21
+ RichText,
22
  ColorPalette,
23
+ BlockControls,
24
  } = wp.blocks;
25
 
26
  const {
77
 
78
 
79
  // The "edit" property must be a valid function.
80
+ edit: withState( { editable: 'content', } )( ( props ) => {
81
+
82
+ const onSetActiveEditable = ( newEditable ) => () => {
83
+ setState( { editable: newEditable } );
84
+ };
85
+
86
  const notifAlert = [
87
  { value: 'success', label: __( 'Success' ) },
88
  { value: 'error', label: __( 'Error' ) },
91
  ];
92
 
93
  const {
94
+ isSelected,
95
+ editable,
96
+ setState,
97
  setAttributes,
98
  className
99
  } = props
106
  dismissible
107
  } = props.attributes
108
 
109
+ return [
110
+ isSelected && (
111
+ <BlockControls key="controls"/>
112
+ ), (
113
  <div key={ 'editable' } className={ `ugb-notification type-${notifType} dismissible-${dismissible}` }>
114
  {
115
  dismissible && (
121
  </span>
122
  )
123
  }
124
+ <RichText
125
+ tagName='p'
126
  placeholder={ props.attributes.text.default }
127
  value={ text }
128
+ isSelected={ isSelected && editable === 'content' }
129
+ onFocus={ onSetActiveEditable( 'content' ) }
130
  onChange={ (text) => setAttributes( { text: text } ) }
 
131
  className={`wp-ugb-notif notif-${notifType}`}
132
  style={ {
133
  backgroundColor: color,
134
  color: textColor,
135
  } }
 
136
  />
137
  {
138
+ isSelected &&
139
  <InspectorControls key={ 'inspector' }>
140
  <ToggleControl
141
  label={ __( 'Dismissible' ) }
176
  </InspectorControls>
177
  }
178
  </div>
179
+ ) ]
180
+ } ),
181
 
182
  // The "save" property must be specified and must be a valid function.
183
  save: function( props ) {
src/block/number-box/editor.scss ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * #.# Editor Styles for Number Box Block
3
+ *
4
+ * CSS for just Backend enqueued after style.scss
5
+ * which makes it higher in priority.
6
+ */
src/block/number-box/index.js ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BLOCK: Number Box Block.
3
+ *
4
+ * Registering a basic block with Gutenberg.
5
+ * Simple block, renders and saves the same content without any interactivity.
6
+ */
7
+
8
+ // Import CSS.
9
+ import './style.scss';
10
+ import './editor.scss';
11
+
12
+ const { __ } = wp.i18n; // Import __() from wp.i18n
13
+ const { Component } = wp.element
14
+ const {
15
+ PanelColor,
16
+ withState,
17
+ SelectControl
18
+ } = wp.components;
19
+
20
+ const {
21
+ registerBlockType, // Import registerBlockType() from wp.blocks
22
+ InspectorControls,
23
+ RichText,
24
+ ColorPalette,
25
+ MediaUpload,
26
+ BlockControls,
27
+ AlignmentToolbar,
28
+ BlockAlignmentToolbar
29
+ } = wp.blocks;
30
+
31
+ import { NumberBoxIcon } from '../../icons'
32
+
33
+ /**
34
+ * Register: Gutenberg Block.
35
+ *
36
+ * Registers a new block provided a unique name and an object defining its
37
+ * behavior. Once registered, the block is made editor as an option to any
38
+ * editor interface where blocks are implemented.
39
+ *
40
+ * @param {string} name Block name.
41
+ * @param {Object} settings Block settings.
42
+ * @return {?WPBlock} The block, if it has been successfully
43
+ * registered; otherwise `undefined`.
44
+ */
45
+ registerBlockType( 'ugb/number-box', {
46
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
47
+ title: __( 'Number Box', 'Stackable' ), // Block title.
48
+ icon: NumberBoxIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
49
+ category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
50
+ keywords: [
51
+ __( 'Number Box' ),
52
+ __( 'Stackable' ),
53
+ ],
54
+ attributes: {
55
+ title: {
56
+ type: 'string',
57
+ source: 'attribute',
58
+ selector: 'a',
59
+ attribute: 'title',
60
+ },
61
+ numberBox: {
62
+ type: 'array',
63
+ source: 'children',
64
+ selector: '.ugb-number-box-column-one span',
65
+ default: __( '01' ),
66
+ },
67
+ numberBoxTwo: {
68
+ type: 'array',
69
+ source: 'children',
70
+ selector: '.ugb-number-box-column-two span',
71
+ default: __( '02' ),
72
+ },
73
+ numberBoxThree: {
74
+ type: 'array',
75
+ source: 'children',
76
+ selector: '.ugb-number-box-column-three span',
77
+ default: __( '03' ),
78
+ },
79
+ name: {
80
+ type: 'array',
81
+ source: 'children',
82
+ selector: '.ugb-number-box-name',
83
+ default: __( 'Registration' ),
84
+ },
85
+ nameTwo: {
86
+ type: 'array',
87
+ source: 'children',
88
+ selector: '.ugb-number-box-name-two',
89
+ default: __( 'Waiting Period' ),
90
+ },
91
+ nameThree: {
92
+ type: 'array',
93
+ source: 'children',
94
+ selector: '.ugb-number-box-name-three',
95
+ default: __( 'Delivery' ),
96
+ },
97
+ body: {
98
+ type: 'array',
99
+ source: 'children',
100
+ selector: '.ugb-number-box-body',
101
+ default: __( 'This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.' ),
102
+ },
103
+ bodyTwo: {
104
+ type: 'array',
105
+ source: 'children',
106
+ selector: '.ugb-number-box-body-two',
107
+ default: __( 'This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.' ),
108
+ },
109
+ bodyThree: {
110
+ type: 'array',
111
+ source: 'children',
112
+ selector: '.ugb-number-box-body-three',
113
+ default: __( 'This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.' ),
114
+ },
115
+ numberBoxColor: {
116
+ type: 'string',
117
+ },
118
+ nameColor: {
119
+ type: 'string',
120
+ },
121
+ bodyTextColor: {
122
+ type: 'string',
123
+ },
124
+ numberBGColor: {
125
+ type: 'string',
126
+ },
127
+ columns: {
128
+ type: 'select',
129
+ default: '1'
130
+ }
131
+ },
132
+
133
+ // The "edit" property must be a valid function.
134
+ edit: withState( { editable: 'content', } )( ( props ) => {
135
+
136
+ const {
137
+ className,
138
+ setAttributes,
139
+ isSelected,
140
+ editable,
141
+ setState
142
+ } = props;
143
+
144
+ const {
145
+ title,
146
+ numberBox,
147
+ numberBoxTwo,
148
+ numberBoxThree,
149
+ body,
150
+ bodyTwo,
151
+ bodyThree,
152
+ name,
153
+ nameTwo,
154
+ nameThree,
155
+ columns,
156
+ numberBoxColor,
157
+ nameColor,
158
+ bodyTextColor,
159
+ numberBGColor
160
+ } = props.attributes;
161
+
162
+ const column = [
163
+ { value: '1', label: __( 'One Column' ) },
164
+ { value: '2', label: __( 'Two Column' ) },
165
+ { value: '3', label: __( 'Three Column' ) },
166
+ ];
167
+
168
+ const onSetActiveEditable = ( newEditable ) => () => {
169
+ setState( { editable: newEditable } )
170
+ }
171
+
172
+ return [
173
+ <BlockControls key="controls"/>,
174
+ isSelected && (
175
+ <InspectorControls key={ 'inspector' }>
176
+ <SelectControl
177
+ label={ __( 'Column Number' ) }
178
+ value={ columns }
179
+ options={ column.map( ({ value, label }) => ( {
180
+ value: value,
181
+ label: label,
182
+ } ) ) }
183
+ onChange={ ( newColumns ) => { setAttributes( { columns: newColumns } ) } }
184
+ />
185
+ <PanelColor
186
+ title={ __( 'Number Color' ) }
187
+ colorValue={ numberBoxColor }
188
+ initialOpen={ false }
189
+ >
190
+ <ColorPalette
191
+ value={ numberBoxColor }
192
+ onChange={ ( colorValue ) => setAttributes( { numberBoxColor: colorValue } ) }
193
+ />
194
+ </PanelColor>
195
+ <PanelColor
196
+ title={ __( 'Number Background Color' ) }
197
+ colorValue={ numberBGColor }
198
+ initialOpen={ false }
199
+ >
200
+ <ColorPalette
201
+ value={ numberBGColor }
202
+ onChange={ ( colorValue ) => setAttributes( { numberBGColor: colorValue } ) }
203
+ />
204
+ </PanelColor>
205
+ <PanelColor
206
+ title={ __( 'Name Color' ) }
207
+ colorValue={ nameColor }
208
+ initialOpen={ false }
209
+ >
210
+ <ColorPalette
211
+ value={ nameColor }
212
+ onChange={ ( colorValue ) => setAttributes( { nameColor: colorValue } ) }
213
+ />
214
+ </PanelColor>
215
+ <PanelColor
216
+ title={ __( 'Body Text Color' ) }
217
+ colorValue={ bodyTextColor }
218
+ initialOpen={ false }
219
+ >
220
+ <ColorPalette
221
+ value={ bodyTextColor }
222
+ onChange={ ( colorValue ) => setAttributes( { bodyTextColor: colorValue } ) }
223
+ />
224
+ </PanelColor>
225
+ </InspectorControls>
226
+ ),
227
+ <div key={'editable'} className={ `ugb-number-box column-${columns}` }>
228
+ <div className={ 'ugb-number-box-column-one' }>
229
+ <RichText
230
+ tagName={ 'span' }
231
+ placeholder={ numberBox.default }
232
+ value={ numberBox }
233
+ onChange={ (text) => setAttributes( { numberBox: text } ) }
234
+ isSelected={ isSelected && editable === 'numberBox' }
235
+ onFocus={ onSetActiveEditable( 'numberBox' ) }
236
+ style={ {
237
+ color: numberBoxColor,
238
+ backgroundColor: numberBGColor
239
+ } }
240
+ keepPlaceholderOnFocus
241
+ />
242
+ <RichText
243
+ tagName={'h4'}
244
+ value={ name }
245
+ className={ 'ugb-number-box-name' }
246
+ onChange={ (text) => setAttributes( { name: text } ) }
247
+ isSelected={ isSelected && editable === 'name' }
248
+ onFocus={ onSetActiveEditable( 'name' ) }
249
+ placeholder={ __( 'Add name…' ) }
250
+ style={ {
251
+ color: nameColor
252
+ } }
253
+ keepPlaceholderOnFocus
254
+ />
255
+ <RichText
256
+ tagName={'p'}
257
+ value={ body }
258
+ className={ 'ugb-number-box-body' }
259
+ onChange={ (text) => setAttributes( { body: text } ) }
260
+ isSelected={ isSelected && editable === 'body' }
261
+ onFocus={ onSetActiveEditable( 'body' ) }
262
+ placeholder={ __( 'Add body…' ) }
263
+ style={ {
264
+ color: bodyTextColor
265
+ } }
266
+ keepPlaceholderOnFocus
267
+ />
268
+ </div>
269
+ <div className={ 'ugb-number-box-column-two' }>
270
+ <RichText
271
+ tagName={ 'span' }
272
+ placeholder={ numberBoxTwo.default }
273
+ value={ numberBoxTwo }
274
+ onChange={ (text) => setAttributes( { numberBoxTwo: text } ) }
275
+ isSelected={ isSelected && editable === 'numberBoxTwo' }
276
+ onFocus={ onSetActiveEditable( 'numberBoxTwo' ) }
277
+ style={ {
278
+ color: numberBoxColor,
279
+ backgroundColor: numberBGColor
280
+ } }
281
+ keepPlaceholderOnFocus
282
+ />
283
+ <RichText
284
+ tagName={'h4'}
285
+ value={ nameTwo }
286
+ className={ 'ugb-number-box-name-two' }
287
+ onChange={ (text) => setAttributes( { nameTwo: text } ) }
288
+ isSelected={ isSelected && editable === 'nameTwo' }
289
+ onFocus={ onSetActiveEditable( 'nameTwo' ) }
290
+ placeholder={ __( 'Add name…' ) }
291
+ style={ {
292
+ color: nameColor
293
+ } }
294
+ keepPlaceholderOnFocus
295
+ />
296
+ <RichText
297
+ tagName={'p'}
298
+ value={ bodyTwo }
299
+ className={ 'ugb-number-box-body-two' }
300
+ onChange={ (text) => setAttributes( { bodyTwo: text } ) }
301
+ isSelected={ isSelected && editable === 'bodyTwo' }
302
+ onFocus={ onSetActiveEditable( 'bodyTwo' ) }
303
+ placeholder={ __( 'Add body…' ) }
304
+ style={ {
305
+ color: bodyTextColor
306
+ } }
307
+ keepPlaceholderOnFocus
308
+ />
309
+ </div>
310
+ <div className={ 'ugb-number-box-column-three' }>
311
+ <RichText
312
+ tagName={ 'span' }
313
+ placeholder={ numberBoxThree.default }
314
+ value={ numberBoxThree }
315
+ onChange={ (text) => setAttributes( { numberBoxThree: text } ) }
316
+ isSelected={ isSelected && editable === 'numberBoxThree' }
317
+ onFocus={ onSetActiveEditable( 'numberBoxThree' ) }
318
+ style={ {
319
+ color: numberBoxColor,
320
+ backgroundColor: numberBGColor
321
+ } }
322
+ keepPlaceholderOnFocus
323
+ />
324
+ <RichText
325
+ tagName={'h4'}
326
+ value={ nameThree }
327
+ className={ 'ugb-number-box-name-three' }
328
+ onChange={ (text) => setAttributes( { nameThree: text } ) }
329
+ isSelected={ isSelected && editable === 'nameThree' }
330
+ onFocus={ onSetActiveEditable( 'nameThree' ) }
331
+ placeholder={ __( 'Add name…' ) }
332
+ style={ {
333
+ color: nameColor
334
+ } }
335
+ keepPlaceholderOnFocus
336
+ />
337
+ <RichText
338
+ tagName={'p'}
339
+ value={ bodyThree }
340
+ className={ 'ugb-number-box-body-three' }
341
+ onChange={ (text) => setAttributes( { bodyThree: text } ) }
342
+ isSelected={ isSelected && editable === 'bodyThree' }
343
+ onFocus={ onSetActiveEditable( 'bodyThree' ) }
344
+ placeholder={ __( 'Add body…' ) }
345
+ style={ {
346
+ color: bodyTextColor
347
+ } }
348
+ keepPlaceholderOnFocus
349
+ />
350
+ </div>
351
+ </div>
352
+ ];
353
+ } ),
354
+
355
+ // The "save" property must be specified and must be a valid function.
356
+ save: function( props ) {
357
+ const {
358
+ title,
359
+ numberBox,
360
+ numberBoxTwo,
361
+ numberBoxThree,
362
+ body,
363
+ bodyTwo,
364
+ bodyThree,
365
+ name,
366
+ nameTwo,
367
+ nameThree,
368
+ numberBoxColor,
369
+ nameColor,
370
+ bodyTextColor,
371
+ numberBGColor,
372
+ columns
373
+ } = props.attributes;
374
+
375
+ return (
376
+ <div className={ `ugb-number-box column-${columns}` }>
377
+ <div className={ 'ugb-number-box-column-one' }>
378
+ { numberBox && !! numberBox.length && (
379
+ <span style={ { color: numberBoxColor, backgroundColor: numberBGColor } }>
380
+ { numberBox }
381
+ </span>
382
+ ) }
383
+ { name && !! name.length && (
384
+ <h4 className={ 'ugb-number-box-name' } style={ { color: nameColor } }>
385
+ { name }
386
+ </h4>
387
+ ) }
388
+ { body && !! body.length && (
389
+ <p className={ 'ugb-number-box-body' } style={ { color: bodyTextColor } }>
390
+ { body }
391
+ </p>
392
+ ) }
393
+ </div>
394
+ { columns > 1 && (
395
+ <div className={ 'ugb-number-box-column-two' }>
396
+ { numberBoxTwo && !! numberBoxTwo.length && (
397
+ <span style={ { color: numberBoxColor, backgroundColor: numberBGColor } }>
398
+ { numberBoxTwo }
399
+ </span>
400
+ ) }
401
+ { nameTwo && !! nameTwo.length && (
402
+ <h4 className={ 'ugb-number-box-name-two' } style={ { color: nameColor } }>
403
+ { nameTwo }
404
+ </h4>
405
+ ) }
406
+ { bodyTwo && !! bodyTwo.length && (
407
+ <p className={ 'ugb-number-box-body-two' } style={ { color: bodyTextColor } }>
408
+ { bodyTwo }
409
+ </p>
410
+ ) }
411
+ </div>
412
+ ) }
413
+ { columns > 2 && (
414
+ <div className={ 'ugb-number-box-column-three' }>
415
+ { numberBoxThree && !! numberBoxThree.length && (
416
+ <span style={ { color: numberBoxColor, backgroundColor: numberBGColor } }>
417
+ { numberBoxThree }
418
+ </span>
419
+ ) }
420
+ { nameThree && !! nameThree.length && (
421
+ <h4 className={ 'ugb-number-box-name-three' } style={ { color: nameColor } }>
422
+ { nameThree }
423
+ </h4>
424
+ ) }
425
+ { bodyThree && !! bodyThree.length && (
426
+ <p className={ 'ugb-number-box-body-three' } style={ { color: bodyTextColor } }>
427
+ { bodyThree }
428
+ </p>
429
+ ) }
430
+ </div>
431
+ ) }
432
+ </div>
433
+ );
434
+ },
435
+ } );
src/block/number-box/style.scss ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * #.# Styles for Number Box Block.
3
+ *
4
+ * CSS for both Frontend+Backend.
5
+ */
6
+ .ugb-number-box {
7
+ display: flex;
8
+ margin: 1rem 0;
9
+ span, .blocks-rich-text span {
10
+ background-color: #ddd;
11
+ border-radius: 100%;
12
+ font-size: 3em;
13
+ display: block;
14
+ padding: 0;
15
+ text-align: center;
16
+ overflow: hidden;
17
+ margin: 0 auto;
18
+ /* size */
19
+ height: 2.5em;
20
+ width: 2.5em;
21
+ line-height: 2.5em;
22
+ }
23
+ > div {
24
+ text-align: center;
25
+ margin: 0 auto;
26
+ p {
27
+ text-align: center;
28
+ }
29
+ }
30
+ }
31
+ .ugb-number-box {
32
+ .ugb-number-box-name,
33
+ .ugb-number-box-name-two,
34
+ .ugb-number-box-name-three {
35
+ margin: 1.3rem 0 1rem;
36
+ }
37
+ .ugb-number-box-body,
38
+ .ugb-number-box-body-two,
39
+ .ugb-number-box-body-three {
40
+ opacity: .5;
41
+ margin: 0 0 1rem;
42
+ left: 0;
43
+ }
44
+ }
45
+
46
+ .ugb-number-box.column-1 {
47
+ .ugb-number-box-column-two,
48
+ .ugb-number-box-column-three {
49
+ display: none;
50
+ }
51
+ }
52
+ .ugb-number-box.column-2 {
53
+ .ugb-number-box-column-one {
54
+ margin-right: 1rem;
55
+ }
56
+ .ugb-number-box-column-two {
57
+ margin-left: 1rem;
58
+ }
59
+ > div {
60
+ width: 50%;
61
+ }
62
+ .ugb-number-box-column-three {
63
+ display: none;
64
+ }
65
+ }
66
+ .ugb-number-box.column-3 {
67
+ > div {
68
+ width: 33.2%;
69
+ margin-left: 1rem;
70
+ margin-right: 1rem;
71
+ }
72
+ > div:first-child {
73
+ margin-left: 0;
74
+ }
75
+ > div:last-child {
76
+ margin-right: 0;
77
+ }
78
+ }
79
+
80
+ @media screen and (max-width: 800px) {
81
+ .ugb-number-box.column-3.column-3 {
82
+ display: block;
83
+ > div {
84
+ width: 100%;
85
+ margin: 0;
86
+ }
87
+ }
88
+ }
89
+
90
+ @media screen and (max-width: 600px) {
91
+ .ugb-number-box.column-2.column-2 {
92
+ display: block;
93
+ > div {
94
+ width: 100%;
95
+ margin: 0;
96
+ }
97
+ }
98
+ }
src/block/pullquote/index.js CHANGED
@@ -12,19 +12,14 @@ import './editor.scss';
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
- const { PanelColor } = wp.components
16
  const {
17
  registerBlockType, // Import registerBlockType() from wp.blocks
18
  InspectorControls,
19
- Editable,
20
  ColorPalette
21
  } = wp.blocks
22
 
23
- const {
24
- SelectControl,
25
- RangeControl
26
- } = wp.blocks.InspectorControls
27
-
28
  import { QuoteIcon } from '../../icons'
29
 
30
  /**
@@ -66,9 +61,16 @@ registerBlockType( 'ugb/pullquote', {
66
  },
67
 
68
  // The "edit" property must be a valid function.
69
- edit: function( props ) {
 
 
 
 
 
 
 
70
  const { color, text, borderColor } = props.attributes
71
- const { focus, setFocus, setAttributes, className } = props
72
 
73
  return [
74
  <blockquote
@@ -78,22 +80,21 @@ registerBlockType( 'ugb/pullquote', {
78
  borderTopColor: borderColor,
79
  borderBottomColor: borderColor
80
  } }>
81
- <Editable
82
  tagName={ 'p' }
83
  className={ 'ugb-pullquote-text' }
84
  value={ text }
85
  onChange={ ( nextValue ) => setAttributes( { text: nextValue } ) }
86
- focus={ focus }
87
- onFocus={ setFocus }
88
  placeholder={ __( 'Write quote…' ) }
89
  formattingControls={ [ 'bold', 'italic', 'strikethrough', 'link' ] }
 
90
  keepPlaceholderOnFocus
91
  style={ {
92
  color: color
93
  } }
94
  />
95
  </blockquote>,
96
- focus && (
97
  <InspectorControls key='inspector'>
98
  <PanelColor
99
  title={ __( 'Text Color' ) }
@@ -116,7 +117,7 @@ registerBlockType( 'ugb/pullquote', {
116
  </InspectorControls>
117
  )
118
  ];
119
- },
120
 
121
  // The "save" property must be specified and must be a valid function.
122
  save: function( props ) {
@@ -128,9 +129,8 @@ registerBlockType( 'ugb/pullquote', {
128
  style={ {
129
  borderTopColor: borderColor,
130
  borderBottomColor: borderColor,
131
- color: color
132
  } }>
133
- <p>{ text }</p>
134
  </blockquote>
135
  );
136
  },
12
 
13
  const { __ } = wp.i18n; // Import __() from wp.i18n
14
  const { Component } = wp.element
15
+ const { PanelColor, withState } = wp.components
16
  const {
17
  registerBlockType, // Import registerBlockType() from wp.blocks
18
  InspectorControls,
19
+ RichText,
20
  ColorPalette
21
  } = wp.blocks
22
 
 
 
 
 
 
23
  import { QuoteIcon } from '../../icons'
24
 
25
  /**
61
  },
62
 
63
  // The "edit" property must be a valid function.
64
+ edit: withState( { editable: 'content', } )( ( props ) => {
65
+
66
+ const onSetActiveEditable = ( newEditable ) => () => {
67
+ setState( { editable: newEditable } )
68
+ }
69
+
70
+ const { isSelected, setAttributes, className } = props
71
+
72
  const { color, text, borderColor } = props.attributes
73
+
74
 
75
  return [
76
  <blockquote
80
  borderTopColor: borderColor,
81
  borderBottomColor: borderColor
82
  } }>
83
+ <RichText
84
  tagName={ 'p' }
85
  className={ 'ugb-pullquote-text' }
86
  value={ text }
87
  onChange={ ( nextValue ) => setAttributes( { text: nextValue } ) }
 
 
88
  placeholder={ __( 'Write quote…' ) }
89
  formattingControls={ [ 'bold', 'italic', 'strikethrough', 'link' ] }
90
+ isSelected={ isSelected }
91
  keepPlaceholderOnFocus
92
  style={ {
93
  color: color
94
  } }
95
  />
96
  </blockquote>,
97
+ isSelected && (
98
  <InspectorControls key='inspector'>
99
  <PanelColor
100
  title={ __( 'Text Color' ) }
117
  </InspectorControls>
118
  )
119
  ];
120
+ } ),
121
 
122
  // The "save" property must be specified and must be a valid function.
123
  save: function( props ) {
129
  style={ {
130
  borderTopColor: borderColor,
131
  borderBottomColor: borderColor,
 
132
  } }>
133
+ <p style={ { color: color } }>{ text }</p>
134
  </blockquote>
135
  );
136
  },
src/block/spacer/index.js CHANGED
@@ -45,14 +45,14 @@ registerBlockType( 'ugb/spacer', {
45
  // The "edit" property must be a valid function.
46
  edit: function( props ) {
47
 
48
- const { focus } = props;
49
  const { InspectorControls } = wp.blocks;
50
- const { RangeControl, TextControl } = wp.blocks.InspectorControls;
51
  const { height } = props.attributes;
52
 
53
  return [
54
 
55
- !! focus && (
56
  <InspectorControls key='inspector'>
57
  <RangeControl
58
  label={__('Height')}
45
  // The "edit" property must be a valid function.
46
  edit: function( props ) {
47
 
48
+ const { isSelected } = props;
49
  const { InspectorControls } = wp.blocks;
50
+ const { RangeControl, TextControl } = wp.components;
51
  const { height } = props.attributes;
52
 
53
  return [
54
 
55
+ !! isSelected && (
56
  <InspectorControls key='inspector'>
57
  <RangeControl
58
  label={__('Height')}
src/block/team-member/index.js CHANGED
@@ -11,23 +11,24 @@ import './editor.scss';
11
 
12
  const { __ } = wp.i18n; // Import __() from wp.i18n
13
  const { Component } = wp.element
14
- const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
15
  const {
16
  PanelColor,
17
- Button
 
 
 
18
  } = wp.components;
19
 
20
  const {
 
21
  InspectorControls,
22
- Editable,
23
  ColorPalette,
24
  MediaUpload,
25
  BlockControls,
26
  AlignmentToolbar
27
  } = wp.blocks;
28
 
29
- const { SelectControl,TextControl } = wp.blocks.InspectorControls;
30
-
31
  import { TeamMemberIcon } from '../../icons'
32
 
33
  /**
@@ -173,60 +174,16 @@ registerBlockType( 'ugb/team-member', {
173
  shapes: {
174
  type: 'select',
175
  default: 'square'
176
- },
177
- facebookURL: {
178
- type: 'url',
179
- },
180
- twitterURL: {
181
- type: 'url',
182
- },
183
- instagramURL: {
184
- type: 'url',
185
- },
186
- linkedURL: {
187
- type: 'url',
188
- },
189
- emailAddress: {
190
- type: 'string',
191
- },
192
- facebookURLTwo: {
193
- type: 'url',
194
- },
195
- twitterURLTwo: {
196
- type: 'url',
197
- },
198
- instagramURLTwo: {
199
- type: 'url',
200
- },
201
- linkedURLTwo: {
202
- type: 'url',
203
- },
204
- emailAddressTwo: {
205
- type: 'string',
206
- },
207
- facebookURLThree: {
208
- type: 'url',
209
- },
210
- twitterURLThree: {
211
- type: 'url',
212
- },
213
- instagramURLThree: {
214
- type: 'url',
215
- },
216
- linkedURLThree: {
217
- type: 'url',
218
- },
219
- emailAddressThree: {
220
- type: 'string',
221
  }
222
  },
223
 
224
  // The "edit" property must be a valid function.
225
- edit: function( props ) {
226
 
227
  const {
228
- focus,
229
- setFocus,
 
230
  className,
231
  setAttributes
232
  } = props;
@@ -259,22 +216,7 @@ registerBlockType( 'ugb/team-member', {
259
  posColor,
260
  desColor,
261
  iconColor,
262
- shapes,
263
- facebookURL,
264
- twitterURL,
265
- instagramURL,
266
- linkedURL,
267
- emailAddress,
268
- facebookURLTwo,
269
- twitterURLTwo,
270
- instagramURLTwo,
271
- linkedURLTwo,
272
- emailAddressTwo,
273
- facebookURLThree,
274
- twitterURLThree,
275
- instagramURLThree,
276
- linkedURLThree,
277
- emailAddressThree
278
  } = props.attributes;
279
 
280
  const column = [
@@ -287,9 +229,13 @@ registerBlockType( 'ugb/team-member', {
287
  { value: 'circle', label: __( 'Circle' ) },
288
  ];
289
 
 
 
 
 
290
  return [
291
  <BlockControls key="controls"/>,
292
- focus && (
293
  <InspectorControls key={ 'inspector' }>
294
  <SelectControl
295
  label={ __( 'Image Shape' ) }
@@ -309,114 +255,6 @@ registerBlockType( 'ugb/team-member', {
309
  } ) ) }
310
  onChange={ ( newColumns ) => { setAttributes( { columns: newColumns } ) } }
311
  />
312
-
313
- <div>
314
- <h2>{__( 'Social Media Links - Column One' ) }</h2>
315
- </div>
316
- <TextControl
317
- type={'url'}
318
- label={ __( 'Facebook URL' ) }
319
- value={ facebookURL }
320
- onChange={ ( newFacebook ) => setAttributes( { facebookURL: newFacebook } ) }
321
- />
322
- <TextControl
323
- type={'url'}
324
- label={ __( 'Twitter URL' ) }
325
- value={ twitterURL }
326
- onChange={ ( newTwitter ) => setAttributes( { twitterURL: newTwitter } ) }
327
- />
328
- <TextControl
329
- type={'url'}
330
- label={ __( 'Instagram URL' ) }
331
- value={ instagramURL }
332
- onChange={ ( newInstagram ) => setAttributes( { instagramURL: newInstagram } ) }
333
- />
334
- <TextControl
335
- type={'url'}
336
- label={ __( 'LinkedIn URL' ) }
337
- value={ linkedURL }
338
- onChange={ ( newLinkedIn ) => setAttributes( { linkedURL: newLinkedIn } ) }
339
- />
340
- <TextControl
341
- type={'url'}
342
- label={ __( 'Email Address' ) }
343
- value={ emailAddress }
344
- onChange={ ( newEmail ) => setAttributes( { emailAddress: newEmail } ) }
345
- />
346
- {
347
- columns > 1 && (
348
- <div>
349
- <h2>{__( 'Social Media Links - Column Two' ) }</h2>
350
- <TextControl
351
- type={'url'}
352
- label={ __( 'Facebook URL' ) }
353
- value={ facebookURLTwo }
354
- onChange={ ( newFacebook ) => setAttributes( { facebookURLTwo: newFacebook } ) }
355
- />
356
- <TextControl
357
- type={'url'}
358
- label={ __( 'Twitter URL' ) }
359
- value={ twitterURLTwo }
360
- onChange={ ( newTwitter ) => setAttributes( { twitterURLTwo: newTwitter } ) }
361
- />
362
- <TextControl
363
- type={'url'}
364
- label={ __( 'Instagram URL' ) }
365
- value={ instagramURLTwo }
366
- onChange={ ( newInstagram ) => setAttributes( { instagramURLTwo: newInstagram } ) }
367
- />
368
- <TextControl
369
- type={'url'}
370
- label={ __( 'LinkedIn URL' ) }
371
- value={ linkedURLTwo }
372
- onChange={ ( newLinkedIn ) => setAttributes( { linkedURLTwo: newLinkedIn } ) }
373
- />
374
- <TextControl
375
- type={'url'}
376
- label={ __( 'Email Address' ) }
377
- value={ emailAddressTwo }
378
- onChange={ ( newEmail ) => setAttributes( { emailAddressTwo: newEmail } ) }
379
- />
380
- </div>
381
- )
382
- }
383
- {
384
- columns > 2 && (
385
- <div>
386
- <h2>{__( 'Social Media Links - Column Three' ) }</h2>
387
- <TextControl
388
- type={'url'}
389
- label={ __( 'Facebook URL' ) }
390
- value={ facebookURLThree }
391
- onChange={ ( newFacebook ) => setAttributes( { facebookURLThree: newFacebook } ) }
392
- />
393
- <TextControl
394
- type={'url'}
395
- label={ __( 'Twitter URL' ) }
396
- value={ twitterURLThree }
397
- onChange={ ( newTwitter ) => setAttributes( { twitterURLThree: newTwitter } ) }
398
- />
399
- <TextControl
400
- type={'url'}
401
- label={ __( 'Instagram URL' ) }
402
- value={ instagramURLThree }
403
- onChange={ ( newInstagram ) => setAttributes( { instagramURLThree: newInstagram } ) }
404
- />
405
- <TextControl
406
- type={'url'}
407
- label={ __( 'LinkedIn URL' ) }
408
- value={ linkedURLThree }
409
- onChange={ ( newLinkedIn ) => setAttributes( { linkedURLThree: newLinkedIn } ) }
410
- />
411
- <TextControl
412
- type={'url'}
413
- label={ __( 'Email Address' ) }
414
- value={ emailAddressThree }
415
- onChange={ ( newEmail ) => setAttributes( { emailAddressThree: newEmail } ) }
416
- />
417
- </div>
418
- )
419
- }
420
  <PanelColor
421
  title={ __( 'Name Color' ) }
422
  colorValue={ nameColor }
@@ -477,91 +315,44 @@ registerBlockType( 'ugb/team-member', {
477
  } }
478
  />
479
  </div>
480
- <Editable
481
  tagName={ 'h4' }
482
- placeholder={ __('Add title…') }
483
  value={ name }
484
- focus={ focusedEditable === 'name' ? focus : null }
485
  onChange={ (text) => setAttributes( { name: text } ) }
486
- onFocus={ ( props ) => setFocus( { ...props, editable: 'name' } ) }
 
 
487
  style={ {
488
  color: nameColor
489
  } }
490
  keepPlaceholderOnFocus
491
  />
492
- <Editable
493
  tagName={'p'}
494
  value={ position }
495
  className={ 'ugb-team-member-position' }
496
  onChange={ (text) => setAttributes( { position: text } ) }
497
- focus={ focusedEditable === 'position' ? focus : null }
498
- onFocus={ ( props ) => setFocus( { ...props, editable: 'position' } ) }
499
- placeholder={ __( 'Add position…' ) }
500
  style={ {
501
  color: posColor
502
  } }
503
  keepPlaceholderOnFocus
504
  />
505
- <Editable
506
  tagName={'p'}
507
  value={ des }
508
  className={ 'ugb-team-member-des' }
509
  onChange={ (text) => setAttributes( { des: text } ) }
510
- focus={ focusedEditable === 'des' ? focus : null }
511
- onFocus={ ( props ) => setFocus( { ...props, editable: 'des' } ) }
512
- placeholder={ __( 'Add des…' ) }
513
  style={ {
514
  color: desColor
515
  } }
516
  keepPlaceholderOnFocus
517
  />
518
- <div className={ 'team-member-social'} >
519
- {
520
- !! facebookURL && (
521
- <a className='social-link'
522
- href={ facebookURL }
523
- target='_blank'>
524
- <i className={ 'fa fa-facebook' } />
525
- </a>
526
- )
527
- }
528
- {
529
- !! twitterURL && (
530
- <a className='social-link'
531
- href={ twitterURL }
532
- target='_blank'>
533
- <i className={ 'fa fa-twitter' } />
534
- </a>
535
- )
536
- }
537
- {
538
- !! instagramURL && (
539
- <a className='social-link'
540
- href={ instagramURL }
541
- target='_blank'>
542
- <i className={ 'fa fa-instagram' } />
543
- </a>
544
- )
545
- }
546
- {
547
- !! linkedURL && (
548
- <a className='social-link'
549
- href={ linkedURL }
550
- target='_blank'>
551
- <i className={ 'fa fa-linkedin' } />
552
- </a>
553
- )
554
- }
555
- {
556
- !! emailAddress && (
557
- <a className='social-link'
558
- href={ 'mailto:' + emailAddress }
559
- target='_blank'>
560
- <i className={ 'fa fa-envelope' } />
561
- </a>
562
- )
563
- }
564
- </div>
565
  </div>
566
  <div className={ 'ugb-team-member-column-two' }>
567
  <div>
@@ -580,91 +371,44 @@ registerBlockType( 'ugb/team-member', {
580
  } }
581
  />
582
  </div>
583
- <Editable
584
  tagName={ 'h4' }
585
- placeholder={ __('Add title…') }
586
  value={ nameTwo }
587
- focus={ focusedEditable === 'nameTwo' ? focus : null }
588
  onChange={ (text) => setAttributes( { nameTwo: text } ) }
589
- onFocus={ ( props ) => setFocus( { ...props, editable: 'nameTwo' } ) }
 
 
590
  style={ {
591
  color: nameColor
592
  } }
593
  keepPlaceholderOnFocus
594
  />
595
- <Editable
596
  tagName={'p'}
597
  value={ positionTwo }
598
  className={ 'ugb-team-member-position' }
599
  onChange={ (text) => setAttributes( { positionTwo: text } ) }
600
- focus={ focusedEditable === 'positionTwo' ? focus : null }
601
- onFocus={ ( props ) => setFocus( { ...props, editable: 'positionTwo' } ) }
602
- placeholder={ __( 'Add position…' ) }
603
  style={ {
604
  color: posColor
605
  } }
606
  keepPlaceholderOnFocus
607
  />
608
- <Editable
609
  tagName={'p'}
610
  value={ desTwo }
611
  className={ 'ugb-team-member-des-two' }
612
  onChange={ (text) => setAttributes( { desTwo: text } ) }
613
- focus={ focusedEditable === 'desTwo' ? focus : null }
614
- onFocus={ ( props ) => setFocus( { ...props, editable: 'desTwo' } ) }
615
- placeholder={ __( 'Add des…' ) }
616
  style={ {
617
  color: desColor
618
  } }
619
  keepPlaceholderOnFocus
620
  />
621
- <div className={ 'team-member-social'} >
622
- {
623
- !! facebookURLTwo && (
624
- <a className='social-link'
625
- href={ facebookURLTwo }
626
- target='_blank'>
627
- <i className={ 'fa fa-facebook' } />
628
- </a>
629
- )
630
- }
631
- {
632
- !! twitterURLTwo && (
633
- <a className='social-link'
634
- href={ twitterURLTwo }
635
- target='_blank'>
636
- <i className={ 'fa fa-twitter' } />
637
- </a>
638
- )
639
- }
640
- {
641
- !! instagramURLTwo && (
642
- <a className='social-link'
643
- href={ instagramURLTwo }
644
- target='_blank'>
645
- <i className={ 'fa fa-instagram' } />
646
- </a>
647
- )
648
- }
649
- {
650
- !! linkedURLTwo && (
651
- <a className='social-link'
652
- href={ linkedURLTwo }
653
- target='_blank'>
654
- <i className={ 'fa fa-linkedin' } />
655
- </a>
656
- )
657
- }
658
- {
659
- !! emailAddressTwo && (
660
- <a className='social-link'
661
- href={ 'mailto:' + emailAddressTwo }
662
- target='_blank'>
663
- <i className={ 'fa fa-envelope' } />
664
- </a>
665
- )
666
- }
667
- </div>
668
  </div>
669
  <div className={ 'ugb-team-member-column-three' }>
670
  <div>
@@ -683,95 +427,48 @@ registerBlockType( 'ugb/team-member', {
683
  } }
684
  />
685
  </div>
686
- <Editable
687
  tagName={ 'h4' }
688
- placeholder={ __('Add title…') }
689
  value={ nameThree }
690
- focus={ focusedEditable === 'nameThree' ? focus : null }
691
  onChange={ (text) => setAttributes( { nameThree: text } ) }
692
- onFocus={ ( props ) => setFocus( { ...props, editable: 'nameThree' } ) }
 
 
693
  style={ {
694
  color: nameColor
695
  } }
696
  keepPlaceholderOnFocus
697
  />
698
- <Editable
699
  tagName={'p'}
700
  value={ positionThree }
701
  className={ 'ugb-team-member-position' }
702
  onChange={ (text) => setAttributes( { positionThree: text } ) }
703
- focus={ focusedEditable === 'positionThree' ? focus : null }
704
- onFocus={ ( props ) => setFocus( { ...props, editable: 'positionThree' } ) }
705
- placeholder={ __( 'Add position…' ) }
706
  style={ {
707
  color: posColor
708
  } }
709
  keepPlaceholderOnFocus
710
  />
711
- <Editable
712
  tagName={'p'}
713
  value={ desThree }
714
  className={ 'ugb-team-member-des-three' }
715
  onChange={ (text) => setAttributes( { desThree: text } ) }
716
- focus={ focusedEditable === 'desThree' ? focus : null }
717
- onFocus={ ( props ) => setFocus( { ...props, editable: 'desThree' } ) }
718
- placeholder={ __( 'Add des…' ) }
719
  style={ {
720
  color: desColor
721
  } }
722
  keepPlaceholderOnFocus
723
  />
724
- <div className={ 'team-member-social'} >
725
- {
726
- !! facebookURLThree && (
727
- <a className='social-link'
728
- href={ facebookURLThree }
729
- target='_blank'>
730
- <i className={ 'fa fa-facebook' } />
731
- </a>
732
- )
733
- }
734
- {
735
- !! twitterURLThree && (
736
- <a className='social-link'
737
- href={ twitterURLThree }
738
- target='_blank'>
739
- <i className={ 'fa fa-twitter' } />
740
- </a>
741
- )
742
- }
743
- {
744
- !! instagramURLThree && (
745
- <a className='social-link'
746
- href={ instagramURLThree }
747
- target='_blank'>
748
- <i className={ 'fa fa-instagram' } />
749
- </a>
750
- )
751
- }
752
- {
753
- !! linkedURLThree && (
754
- <a className='social-link'
755
- href={ linkedURLThree }
756
- target='_blank'>
757
- <i className={ 'fa fa-linkedin' } />
758
- </a>
759
- )
760
- }
761
- {
762
- !! emailAddressThree && (
763
- <a className='social-link'
764
- href={ 'mailto:' + emailAddressTwo }
765
- target='_blank'>
766
- <i className={ 'fa fa-envelope' } />
767
- </a>
768
- )
769
- }
770
- </div>
771
  </div>
772
  </div>
773
  ];
774
- },
775
 
776
  // The "save" property must be specified and must be a valid function.
777
  save: function( props ) {
@@ -798,22 +495,7 @@ registerBlockType( 'ugb/team-member', {
798
  posColor,
799
  desColor,
800
  iconColor,
801
- columns,
802
- facebookURL,
803
- twitterURL,
804
- instagramURL,
805
- linkedURL,
806
- emailAddress,
807
- facebookURLTwo,
808
- twitterURLTwo,
809
- instagramURLTwo,
810
- linkedURLTwo,
811
- emailAddressTwo,
812
- facebookURLThree,
813
- twitterURLThree,
814
- instagramURLThree,
815
- linkedURLThree,
816
- emailAddressThree
817
  } = props.attributes;
818
 
819
  return (
@@ -835,48 +517,6 @@ registerBlockType( 'ugb/team-member', {
835
  { des }
836
  </p>
837
  ) }
838
- <div className={ 'team-member-social' } >
839
- { facebookURL && (
840
- <a className={ 'social-link' }
841
- href={ facebookURL }
842
- target={ '_blank' }
843
- >
844
- <i className={ 'fa fa-facebook' } />
845
- </a>
846
- ) }
847
- { twitterURL && (
848
- <a className={ 'social-link' }
849
- href={ twitterURL }
850
- target={ '_blank' }
851
- >
852
- <i className={ 'fa fa-twitter' } />
853
- </a>
854
- ) }
855
- { instagramURL && (
856
- <a className={ 'social-link' }
857
- href={ instagramURL }
858
- target={ '_blank' }
859
- >
860
- <i className={ 'fa fa-instagram' } />
861
- </a>
862
- ) }
863
- { linkedURL && (
864
- <a className={ 'social-link' }
865
- href={ linkedURL }
866
- target={ '_blank' }
867
- >
868
- <i className={ 'fa fa-linkedin' } />
869
- </a>
870
- ) }
871
- { emailAddress && (
872
- <a className={ 'social-link' }
873
- href={ 'mailto:' + emailAddress }
874
- target={ '_blank' }
875
- >
876
- <i className={ 'fa fa-envelope' } />
877
- </a>
878
- ) }
879
- </div>
880
  </div>
881
  { columns > 1 && (
882
  <div className={ 'ugb-team-member-column-two' }>
@@ -896,48 +536,6 @@ registerBlockType( 'ugb/team-member', {
896
  { desTwo }
897
  </p>
898
  ) }
899
- <div className={ 'team-member-social' } >
900
- { facebookURLTwo && (
901
- <a className={ 'social-link' }
902
- href={ facebookURLTwo }
903
- target={ '_blank' }
904
- >
905
- <i className={ 'fa fa-facebook' } />
906
- </a>
907
- ) }
908
- { twitterURLTwo && (
909
- <a className={ 'social-link' }
910
- href={ twitterURLTwo }
911
- target={ '_blank' }
912
- >
913
- <i className={ 'fa fa-twitter' } />
914
- </a>
915
- ) }
916
- { instagramURLTwo && (
917
- <a className={ 'social-link' }
918
- href={ instagramURLTwo }
919
- target={ '_blank' }
920
- >
921
- <i className={ 'fa fa-instagram' } />
922
- </a>
923
- ) }
924
- { linkedURLTwo && (
925
- <a className={ 'social-link' }
926
- href={ linkedURLTwo }
927
- target={ '_blank' }
928
- >
929
- <i className={ 'fa fa-linkedin' } />
930
- </a>
931
- ) }
932
- { emailAddressTwo && (
933
- <a className={ 'social-link' }
934
- href={ 'mailto:' + emailAddressTwo }
935
- target={ '_blank' }
936
- >
937
- <i className={ 'fa fa-envelope' } />
938
- </a>
939
- ) }
940
- </div>
941
  </div>
942
  ) }
943
  { columns > 2 && (
@@ -958,48 +556,6 @@ registerBlockType( 'ugb/team-member', {
958
  { desThree }
959
  </p>
960
  ) }
961
- <div className={ 'team-member-social' } >
962
- { facebookURLThree && (
963
- <a className={ 'social-link' }
964
- href={ facebookURLThree }
965
- target={ '_blank' }
966
- >
967
- <i className={ 'fa fa-facebook' } />
968
- </a>
969
- ) }
970
- { twitterURLThree && (
971
- <a className={ 'social-link' }
972
- href={ twitterURLThree }
973
- target={ '_blank' }
974
- >
975
- <i className={ 'fa fa-twitter' } />
976
- </a>
977
- ) }
978
- { instagramURLThree && (
979
- <a className={ 'social-link' }
980
- href={ instagramURLThree }
981
- target={ '_blank' }
982
- >
983
- <i className={ 'fa fa-instagram' } />
984
- </a>
985
- ) }
986
- { linkedURLThree && (
987
- <a className={ 'social-link' }
988
- href={ linkedURLThree }
989
- target={ '_blank' }
990
- >
991
- <i className={ 'fa fa-linkedin' } />
992
- </a>
993
- ) }
994
- { emailAddressThree && (
995
- <a className={ 'social-link' }
996
- href={ 'mailto:' + emailAddressThree }
997
- target={ '_blank' }
998
- >
999
- <i className={ 'fa fa-envelope' } />
1000
- </a>
1001
- ) }
1002
- </div>
1003
  </div>
1004
  ) }
1005
  </div>
11
 
12
  const { __ } = wp.i18n; // Import __() from wp.i18n
13
  const { Component } = wp.element
 
14
  const {
15
  PanelColor,
16
+ Button,
17
+ SelectControl,
18
+ TextControl,
19
+ withState
20
  } = wp.components;
21
 
22
  const {
23
+ registerBlockType, // Import registerBlockType() from wp.blocks
24
  InspectorControls,
25
+ RichText,
26
  ColorPalette,
27
  MediaUpload,
28
  BlockControls,
29
  AlignmentToolbar
30
  } = wp.blocks;
31
 
 
 
32
  import { TeamMemberIcon } from '../../icons'
33
 
34
  /**
174
  shapes: {
175
  type: 'select',
176
  default: 'square'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  }
178
  },
179
 
180
  // The "edit" property must be a valid function.
181
+ edit: withState( { editable: 'content', } )( ( props ) => {
182
 
183
  const {
184
+ isSelected,
185
+ editable,
186
+ setState,
187
  className,
188
  setAttributes
189
  } = props;
216
  posColor,
217
  desColor,
218
  iconColor,
219
+ shapes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  } = props.attributes;
221
 
222
  const column = [
229
  { value: 'circle', label: __( 'Circle' ) },
230
  ];
231
 
232
+ const onSetActiveEditable = ( newEditable ) => () => {
233
+ setState( { editable: newEditable } )
234
+ }
235
+
236
  return [
237
  <BlockControls key="controls"/>,
238
+ isSelected && (
239
  <InspectorControls key={ 'inspector' }>
240
  <SelectControl
241
  label={ __( 'Image Shape' ) }
255
  } ) ) }
256
  onChange={ ( newColumns ) => { setAttributes( { columns: newColumns } ) } }
257
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  <PanelColor
259
  title={ __( 'Name Color' ) }
260
  colorValue={ nameColor }
315
  } }
316
  />
317
  </div>
318
+ <RichText
319
  tagName={ 'h4' }
 
320
  value={ name }
 
321
  onChange={ (text) => setAttributes( { name: text } ) }
322
+ isSelected={ isSelected && editable === 'name' }
323
+ onFocus={ onSetActiveEditable( 'name' ) }
324
+ placeholder={ name.default }
325
  style={ {
326
  color: nameColor
327
  } }
328
  keepPlaceholderOnFocus
329
  />
330
+ <RichText
331
  tagName={'p'}
332
  value={ position }
333
  className={ 'ugb-team-member-position' }
334
  onChange={ (text) => setAttributes( { position: text } ) }
335
+ isSelected={ isSelected && editable === 'position' }
336
+ onFocus={ onSetActiveEditable( 'position' ) }
337
+ placeholder={ position.default }
338
  style={ {
339
  color: posColor
340
  } }
341
  keepPlaceholderOnFocus
342
  />
343
+ <RichText
344
  tagName={'p'}
345
  value={ des }
346
  className={ 'ugb-team-member-des' }
347
  onChange={ (text) => setAttributes( { des: text } ) }
348
+ isSelected={ isSelected && editable === 'des' }
349
+ onFocus={ onSetActiveEditable( 'des' ) }
350
+ placeholder={ des.default }
351
  style={ {
352
  color: desColor
353
  } }
354
  keepPlaceholderOnFocus
355
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  </div>
357
  <div className={ 'ugb-team-member-column-two' }>
358
  <div>
371
  } }
372
  />
373
  </div>
374
+ <RichText
375
  tagName={ 'h4' }
 
376
  value={ nameTwo }
 
377
  onChange={ (text) => setAttributes( { nameTwo: text } ) }
378
+ isSelected={ isSelected && editable === 'nameTwo' }
379
+ onFocus={ onSetActiveEditable( 'nameTwo' ) }
380
+ placeholder={ nameTwo.default }
381
  style={ {
382
  color: nameColor
383
  } }
384
  keepPlaceholderOnFocus
385
  />
386
+ <RichText
387
  tagName={'p'}
388
  value={ positionTwo }
389
  className={ 'ugb-team-member-position' }
390
  onChange={ (text) => setAttributes( { positionTwo: text } ) }
391
+ isSelected={ isSelected && editable === 'positionTwo' }
392
+ onFocus={ onSetActiveEditable( 'positionTwo' ) }
393
+ placeholder={ positionTwo.default }
394
  style={ {
395
  color: posColor
396
  } }
397
  keepPlaceholderOnFocus
398
  />
399
+ <RichText
400
  tagName={'p'}
401
  value={ desTwo }
402
  className={ 'ugb-team-member-des-two' }
403
  onChange={ (text) => setAttributes( { desTwo: text } ) }
404
+ isSelected={ isSelected && editable === 'desTwo' }
405
+ onFocus={ onSetActiveEditable( 'desTwo' ) }
406
+ placeholder={ desTwo.default }
407
  style={ {
408
  color: desColor
409
  } }
410
  keepPlaceholderOnFocus
411
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  </div>
413
  <div className={ 'ugb-team-member-column-three' }>
414
  <div>
427
  } }
428
  />
429
  </div>
430
+ <RichText
431
  tagName={ 'h4' }
 
432
  value={ nameThree }
 
433
  onChange={ (text) => setAttributes( { nameThree: text } ) }
434
+ isSelected={ isSelected && editable === 'nameThree' }
435
+ onFocus={ onSetActiveEditable( 'nameThree' ) }
436
+ placeholder={ nameThree.default }
437
  style={ {
438
  color: nameColor
439
  } }
440
  keepPlaceholderOnFocus
441
  />
442
+ <RichText
443
  tagName={'p'}
444
  value={ positionThree }
445
  className={ 'ugb-team-member-position' }
446
  onChange={ (text) => setAttributes( { positionThree: text } ) }
447
+ isSelected={ isSelected && editable === 'positionThree' }
448
+ onFocus={ onSetActiveEditable( 'positionThree' ) }
449
+ placeholder={ positionThree.default }
450
  style={ {
451
  color: posColor
452
  } }
453
  keepPlaceholderOnFocus
454
  />
455
+ <RichText
456
  tagName={'p'}
457
  value={ desThree }
458
  className={ 'ugb-team-member-des-three' }
459
  onChange={ (text) => setAttributes( { desThree: text } ) }
460
+ isSelected={ isSelected && editable === 'desThree' }
461
+ onFocus={ onSetActiveEditable( 'desThree' ) }
462
+ placeholder={ desThree.default }
463
  style={ {
464
  color: desColor
465
  } }
466
  keepPlaceholderOnFocus
467
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  </div>
469
  </div>
470
  ];
471
+ } ),
472
 
473
  // The "save" property must be specified and must be a valid function.
474
  save: function( props ) {
495
  posColor,
496
  desColor,
497
  iconColor,
498
+ columns
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  } = props.attributes;
500
 
501
  return (
517
  { des }
518
  </p>
519
  ) }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  </div>
521
  { columns > 1 && (
522
  <div className={ 'ugb-team-member-column-two' }>
536
  { desTwo }
537
  </p>
538
  ) }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  </div>
540
  ) }
541
  { columns > 2 && (
556
  { desThree }
557
  </p>
558
  ) }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  </div>
560
  ) }
561
  </div>
src/block/testimonial/index.js CHANGED
@@ -14,12 +14,13 @@ const { Component } = wp.element
14
  const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
15
  const {
16
  PanelColor,
17
- Button
 
18
  } = wp.components;
19
 
20
  const {
21
  InspectorControls,
22
- Editable,
23
  ColorPalette,
24
  MediaUpload,
25
  BlockControls,
@@ -173,17 +174,16 @@ registerBlockType( 'ugb/testimonial', {
173
  },
174
 
175
  // The "edit" property must be a valid function.
176
- edit: function( props ) {
177
 
178
  const {
179
- focus,
180
- setFocus,
 
181
  className,
182
  setAttributes
183
  } = props;
184
 
185
- const focusedEditable = focus ? focus.editable || 'testimonialTitle' : null;
186
-
187
  const {
188
  url,
189
  title,
@@ -218,9 +218,13 @@ registerBlockType( 'ugb/testimonial', {
218
  { value: '3', label: __( 'Three Column' ) },
219
  ];
220
 
 
 
 
 
221
  return [
222
- <BlockControls key="controls"/>,
223
- focus && (
224
  <InspectorControls key={ 'inspector' }>
225
  <SelectControl
226
  label={ __( 'Column Number' ) }
@@ -291,38 +295,38 @@ registerBlockType( 'ugb/testimonial', {
291
  } }
292
  />
293
  </div>
294
- <Editable
295
  tagName={ 'h4' }
296
  placeholder={ __('Add title…') }
297
  value={ testimonialTitle }
298
- focus={ focusedEditable === 'testimonialTitle' ? focus : null }
299
  onChange={ (text) => setAttributes( { testimonialTitle: text } ) }
300
- onFocus={ ( props ) => setFocus( { ...props, editable: 'testimonialTitle' } ) }
 
301
  style={ {
302
  color: titleColor
303
  } }
304
  keepPlaceholderOnFocus
305
  />
306
- <Editable
307
  tagName={'p'}
308
  value={ position }
309
  className={ 'ugb-testimonial-position' }
310
  onChange={ (text) => setAttributes( { position: text } ) }
311
- focus={ focusedEditable === 'position' ? focus : null }
312
- onFocus={ ( props ) => setFocus( { ...props, editable: 'position' } ) }
313
  placeholder={ __( 'Add position…' ) }
314
  style={ {
315
  color: posColor
316
  } }
317
  keepPlaceholderOnFocus
318
  />
319
- <Editable
320
  tagName={'p'}
321
  value={ body }
322
  className={ 'ugb-testimonial-body' }
323
  onChange={ (text) => setAttributes( { body: text } ) }
324
- focus={ focusedEditable === 'body' ? focus : null }
325
- onFocus={ ( props ) => setFocus( { ...props, editable: 'body' } ) }
326
  placeholder={ __( 'Add body…' ) }
327
  style={ {
328
  color: bodyTextColor
@@ -347,38 +351,39 @@ registerBlockType( 'ugb/testimonial', {
347
  } }
348
  />
349
  </div>
350
- <Editable
351
  tagName={ 'h4' }
352
  placeholder={ __('Add title…') }
353
  value={ testimonialTitleTwo }
354
- focus={ focusedEditable === 'testimonialTitleTwo' ? focus : null }
355
  onChange={ (text) => setAttributes( { testimonialTitleTwo: text } ) }
356
- onFocus={ ( props ) => setFocus( { ...props, editable: 'testimonialTitleTwo' } ) }
 
 
357
  style={ {
358
  color: titleColor
359
  } }
360
  keepPlaceholderOnFocus
361
  />
362
- <Editable
363
  tagName={'p'}
364
  value={ positionTwo }
365
  className={ 'ugb-testimonial-position-two' }
366
  onChange={ (text) => setAttributes( { positionTwo: text } ) }
367
- focus={ focusedEditable === 'positionTwo' ? focus : null }
368
- onFocus={ ( props ) => setFocus( { ...props, editable: 'positionTwo' } ) }
369
  placeholder={ __( 'Add position…' ) }
370
  style={ {
371
  color: posColor
372
  } }
373
  keepPlaceholderOnFocus
374
  />
375
- <Editable
376
  tagName={'p'}
377
  value={ bodyTwo }
378
  className={ 'ugb-testimonial-body-two' }
379
  onChange={ (text) => setAttributes( { bodyTwo: text } ) }
380
- focus={ focusedEditable === 'bodyTwo' ? focus : null }
381
- onFocus={ ( props ) => setFocus( { ...props, editable: 'bodyTwo' } ) }
382
  placeholder={ __( 'Add body…' ) }
383
  style={ {
384
  color: bodyTextColor
@@ -403,38 +408,38 @@ registerBlockType( 'ugb/testimonial', {
403
  } }
404
  />
405
  </div>
406
- <Editable
407
  tagName={ 'h4' }
408
  placeholder={ __('Add title…') }
409
  value={ testimonialTitleThree }
410
- focus={ focusedEditable === 'testimonialTitleThree' ? focus : null }
411
  onChange={ (text) => setAttributes( { testimonialTitleThree: text } ) }
412
- onFocus={ ( props ) => setFocus( { ...props, editable: 'testimonialTitleThree' } ) }
 
413
  style={ {
414
  color: titleColor
415
  } }
416
  keepPlaceholderOnFocus
417
  />
418
- <Editable
419
  tagName={'p'}
420
  value={ positionThree }
421
  className={ 'ugb-testimonial-position-three' }
422
  onChange={ (text) => setAttributes( { positionThree: text } ) }
423
- focus={ focusedEditable === 'positionThree' ? focus : null }
424
- onFocus={ ( props ) => setFocus( { ...props, editable: 'positionThree' } ) }
425
  placeholder={ __( 'Add position…' ) }
426
  style={ {
427
  color: posColor
428
  } }
429
  keepPlaceholderOnFocus
430
  />
431
- <Editable
432
  tagName={'p'}
433
  value={ bodyThree }
434
  className={ 'ugb-testimonial-body-three' }
435
  onChange={ (text) => setAttributes( { bodyThree: text } ) }
436
- focus={ focusedEditable === 'bodyThree' ? focus : null }
437
- onFocus={ ( props ) => setFocus( { ...props, editable: 'bodyThree' } ) }
438
  placeholder={ __( 'Add body…' ) }
439
  style={ {
440
  color: bodyTextColor
@@ -444,7 +449,7 @@ registerBlockType( 'ugb/testimonial', {
444
  </div>
445
  </div>
446
  ];
447
- },
448
 
449
  // The "save" property must be specified and must be a valid function.
450
  save: function( props ) {
14
  const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
15
  const {
16
  PanelColor,
17
+ Button,
18
+ withState
19
  } = wp.components;
20
 
21
  const {
22
  InspectorControls,
23
+ RichText,
24
  ColorPalette,
25
  MediaUpload,
26
  BlockControls,
174
  },
175
 
176
  // The "edit" property must be a valid function.
177
+ edit: withState( { editable: 'content', } )( ( props ) => {
178
 
179
  const {
180
+ isSelected,
181
+ editable,
182
+ setState,
183
  className,
184
  setAttributes
185
  } = props;
186
 
 
 
187
  const {
188
  url,
189
  title,
218
  { value: '3', label: __( 'Three Column' ) },
219
  ];
220
 
221
+ const onSetActiveEditable = ( newEditable ) => () => {
222
+ setState( { editable: newEditable } )
223
+ }
224
+
225
  return [
226
+ <BlockControls/>,
227
+ isSelected && (
228
  <InspectorControls key={ 'inspector' }>
229
  <SelectControl
230
  label={ __( 'Column Number' ) }
295
  } }
296
  />
297
  </div>
298
+ <RichText
299
  tagName={ 'h4' }
300
  placeholder={ __('Add title…') }
301
  value={ testimonialTitle }
 
302
  onChange={ (text) => setAttributes( { testimonialTitle: text } ) }
303
+ isSelected={ isSelected && editable === 'testimonialTitle' }
304
+ onFocus={ onSetActiveEditable( 'testimonialTitle' ) }
305
  style={ {
306
  color: titleColor
307
  } }
308
  keepPlaceholderOnFocus
309
  />
310
+ <RichText
311
  tagName={'p'}
312
  value={ position }
313
  className={ 'ugb-testimonial-position' }
314
  onChange={ (text) => setAttributes( { position: text } ) }
315
+ isSelected={ isSelected && editable === 'position' }
316
+ onFocus={ onSetActiveEditable( 'position' ) }
317
  placeholder={ __( 'Add position…' ) }
318
  style={ {
319
  color: posColor
320
  } }
321
  keepPlaceholderOnFocus
322
  />
323
+ <RichText
324
  tagName={'p'}
325
  value={ body }
326
  className={ 'ugb-testimonial-body' }
327
  onChange={ (text) => setAttributes( { body: text } ) }
328
+ isSelected={ isSelected && editable === 'body' }
329
+ onFocus={ onSetActiveEditable( 'body' ) }
330
  placeholder={ __( 'Add body…' ) }
331
  style={ {
332
  color: bodyTextColor
351
  } }
352
  />
353
  </div>
354
+ <RichText
355
  tagName={ 'h4' }
356
  placeholder={ __('Add title…') }
357
  value={ testimonialTitleTwo }
 
358
  onChange={ (text) => setAttributes( { testimonialTitleTwo: text } ) }
359
+ isSelected={ isSelected && editable === 'testimonialTitleTwo' }
360
+ onFocus={ onSetActiveEditable( 'testimonialTitleTwo' ) }
361
+ // onFocus={ ( props ) => setFocus( { ...props, editable: 'testimonialTitleTwo' } ) }
362
  style={ {
363
  color: titleColor
364
  } }
365
  keepPlaceholderOnFocus
366
  />
367
+ <RichText
368
  tagName={'p'}
369
  value={ positionTwo }
370
  className={ 'ugb-testimonial-position-two' }
371
  onChange={ (text) => setAttributes( { positionTwo: text } ) }
372
+ isSelected={ isSelected && editable === 'positionTwo' }
373
+ onFocus={ onSetActiveEditable( 'positionTwo' ) }
374
  placeholder={ __( 'Add position…' ) }
375
  style={ {
376
  color: posColor
377
  } }
378
  keepPlaceholderOnFocus
379
  />
380
+ <RichText
381
  tagName={'p'}
382
  value={ bodyTwo }
383
  className={ 'ugb-testimonial-body-two' }
384
  onChange={ (text) => setAttributes( { bodyTwo: text } ) }
385
+ isSelected={ isSelected && editable === 'bodyTwo' }
386
+ onFocus={ onSetActiveEditable( 'bodyTwo' ) }
387
  placeholder={ __( 'Add body…' ) }
388
  style={ {
389
  color: bodyTextColor
408
  } }
409
  />
410
  </div>
411
+ <RichText
412
  tagName={ 'h4' }
413
  placeholder={ __('Add title…') }
414
  value={ testimonialTitleThree }
 
415
  onChange={ (text) => setAttributes( { testimonialTitleThree: text } ) }
416
+ isSelected={ isSelected && editable === 'testimonialTitleThree' }
417
+ onFocus={ onSetActiveEditable( 'testimonialTitleThree' ) }
418
  style={ {
419
  color: titleColor
420
  } }
421
  keepPlaceholderOnFocus
422
  />
423
+ <RichText
424
  tagName={'p'}
425
  value={ positionThree }
426
  className={ 'ugb-testimonial-position-three' }
427
  onChange={ (text) => setAttributes( { positionThree: text } ) }
428
+ isSelected={ isSelected && editable === 'positionThree' }
429
+ onFocus={ onSetActiveEditable( 'positionThree' ) }
430
  placeholder={ __( 'Add position…' ) }
431
  style={ {
432
  color: posColor
433
  } }
434
  keepPlaceholderOnFocus
435
  />
436
+ <RichText
437
  tagName={'p'}
438
  value={ bodyThree }
439
  className={ 'ugb-testimonial-body-three' }
440
  onChange={ (text) => setAttributes( { bodyThree: text } ) }
441
+ isSelected={ isSelected && editable === 'bodyThree' }
442
+ onFocus={ onSetActiveEditable( 'bodyThree' ) }
443
  placeholder={ __( 'Add body…' ) }
444
  style={ {
445
  color: bodyTextColor
449
  </div>
450
  </div>
451
  ];
452
+ } ),
453
 
454
  // The "save" property must be specified and must be a valid function.
455
  save: function( props ) {
src/blocks.js CHANGED
@@ -20,3 +20,5 @@ import './block/pullquote/index.js';
20
  import './block/call-to-action/index.js';
21
  import './block/testimonial/index.js';
22
  import './block/team-member/index.js';
 
 
20
  import './block/call-to-action/index.js';
21
  import './block/testimonial/index.js';
22
  import './block/team-member/index.js';
23
+ import './block/expand/index.js';
24
+ import './block/number-box/index.js';
src/common.scss CHANGED
@@ -4,3 +4,22 @@
4
  * Can include things like variables and mixins
5
  * that are used across the project.
6
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * Can include things like variables and mixins
5
  * that are used across the project.
6
  */
7
+
8
+ .gutenberg {
9
+ .ugb-editor-label {
10
+ font-size: 12px;
11
+ text-transform: uppercase;
12
+ font-weight: 600;
13
+ font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
14
+ color: #8e979e;
15
+ padding: 2em 0 0;
16
+ background: #fff;
17
+ border: none;
18
+ box-shadow: none;
19
+ white-space: nowrap;
20
+ display: block;
21
+ &:first-child {
22
+ padding-top: 0;
23
+ }
24
+ }
25
+ }
src/icons.js CHANGED
@@ -72,3 +72,17 @@ export const TeamMemberIcon = () => (
72
  <path fill="url(#Grad)" d="M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"/>
73
  </svg>
74
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  <path fill="url(#Grad)" d="M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"/>
73
  </svg>
74
  )
75
+
76
+ export const ExpandIcon = () => (
77
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 8">
78
+ <Gradient id="Grad" />
79
+ <path fill="url(#Grad)" d="M4 0C1.79 0 0 1.79 0 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zM16 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/>
80
+ </svg>
81
+ )
82
+
83
+ export const NumberBoxIcon = () => (
84
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 21.027502059936523 10.284000396728516">
85
+ <Gradient id="Grad" />
86
+ <path fill="url(#Grad)" d="M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"/>
87
+ </svg>
88
+ )