react-awesome-button
Advanced tools
Comparing version 6.3.1 to 6.4.0
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports["react-awesome-button"]=t(require("react"),require("prop-types")):e["react-awesome-button"]=t(e.React,e.PropTypes)}(this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);Object.defineProperty(t,"AwesomeButton",{enumerable:!0,get:function(){return c(r).default}});var o=n(7);Object.defineProperty(t,"AwesomeButtonSocial",{enumerable:!0,get:function(){return c(o).default}});var i=n(10);function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"AwesomeButtonProgress",{enumerable:!0,get:function(){return c(i).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,l=e[Symbol.iterator]();!(r=(c=l.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.serialize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return Object.entries(e).map((function(e){var t=r(e,2);return t[0]+"="+t[1]})).join(t)},t.classToModules=i,t.getClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if(t)return t[e]||e;return e},t.setCssEndEvent=c,t.toggleMoveClasses=function(e){var t=e.element,n=e.root,r=e.cssModule,c=void 0===r?null:r,l=e.state,s=void 0===l?null:l;if(!t)return!1;if(!s)return t.classList.remove(i([n+"--"+o[0]],c),i([n+"--"+o[1]],c),i([n+"--"+o[2]],c)),!1;var a=o.filter((function(e){return e!==s})),u=a.length;for(;u--;)t.classList.remove(i([n+"--"+a[u]],c));return t.classList.add(i([n+"--"+s],c)),!0},t.createBubbleEffect=function(e){var t=e.event,n=e.button,r=e.content,o=e.className,i=n.getBoundingClientRect(),l=window.pageYOffset||document.documentElement.scrolltop||0,s=document.createElement("span"),a=i.width<50?3*i.width:2*i.width;s.className=o,s.style.top="-"+(a/2-(t.pageY-i.top-l))+"px",s.style.left="-"+(a/2-(t.pageX-i.left))+"px",s.style.width=a+"px",s.style.height=a+"px",c(s,"animation",(function(){window.requestAnimationFrame((function(){r.removeChild(s)}))})),window.requestAnimationFrame((function(){r.appendChild(s)}))};var o=["middle","left","right"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];if(!t)return e.join(" ").trim();for(var n=[],r=e.length;r--;)t[e[r]]&&n.push(t[e[r]]);return n.join(" ").trim()}function c(e,t,n){if(!e)return!1;var r=t.charAt(0).toUpperCase()+t.slice(1);return void 0!==e.style["Webkit"+r]?e.addEventListener("webkit"+r+"End",n):void 0!==e.style.OTransition?e.addEventListener("o"+t+"End",n):e.addEventListener(t+"End",n)}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t,{tolerance:n=0,propertyName:r}={}){return new Promise(o=>{if(!e)return void o(!1);let i=null;const c=t.charAt(0).toUpperCase()+t.slice(1);let l=0;function s(t){if((t.srcElement||t.target)===e){if(l>=n){if(r&&r!==t.propertyName)return;e.removeEventListener(i,s),o(t)}l+=1}}void 0!==e.style[`Webkit${c}`]&&(i=`webkit${c}End`),void 0!==e.style.OTransition&&(i=`o${t}End`),void 0!==e.style[t]&&(i=`${t}end`),e.clearCssEndEvent&&e.clearCssEndEvent(),e.clearCssEndEvent=function(){e.removeEventListener(i,s)},e.addEventListener(i,s)})}function o(e){window&&window.requestAnimationFrame(e)}function i(e){window&&window.requestAnimationFrame(()=>{window.requestAnimationFrame(e)})}function c(e,t){!function e(t,n){window&&t&&Number.isInteger(t)&&t>0?window.requestAnimationFrame(()=>{e(t-1,n)}):n()}(e+1,t)}function l(){return new Promise(e=>{i(e)})}function s(e,t={}){return new Promise(n=>{r(e,"transition",t).then(n)})}function a(e,t={}){return new Promise(n=>{r(e,"animation",t).then(n)})}n.r(t),n.d(t,"setCssEndEvent",(function(){return r})),n.d(t,"beforeCssLayout",(function(){return o})),n.d(t,"beforeNextCssLayout",(function(){return i})),n.d(t,"beforeFutureCssLayout",(function(){return c})),n.d(t,"onceNextCssLayout",(function(){return l})),n.d(t,"onceTransitionEnd",(function(){return s})),n.d(t,"onceAnimationEnd",(function(){return a}))}])},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),c=a(n(1)),l=n(4),s=n(3);function a(e){return e&&e.__esModule?e:{default:e}}var u="aws-btn",d=function(e){return i.default.createElement("a",e)},f=function(e){return i.default.createElement("button",e)},p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.rootElement=e.rootElement||u,n.animationStage=0,n.extraProps={},n.state={disabled:e.disabled||e.placeholder&&!e.children},n.checkProps(e),n}return function(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)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.container=this.button&&this.button.parentNode}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.checkPlaceholder(e),this.checkProps(e),this.checkActive(e)}},{key:"componentWillUnmount",value:function(){this.clearTimer&&clearTimeout(this.clearTimer)}},{key:"getRootClassName",value:function(){var e=this.rootElement,t=this.props,n=t.type,r=t.size,o=t.placeholder,i=t.children,c=t.visible,l=t.cssModule,a=this.state,u=a.disabled,d=a.pressPosition,f=[this.rootElement,n&&e+"--"+n,r&&e+"--"+r,c&&e+"--visible",o&&!i&&e+"--placeholder"||null];return!0===u&&f.push(e+"--disabled"),d&&f.push(d),this.props.className&&f.push.apply(f,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(this.props.className.split(" "))),l&&l["aws-btn"]?(0,s.classToModules)(f,l):f.join(" ").trim().replace(/[\s]+/gi," ")}},{key:"checkActive",value:function(e){if(e.active!==this.props.active){if(!0===e.active)return void this.setState({pressPosition:this.rootElement+"--active"});this.clearPress({force:!0})}}},{key:"checkProps",value:function(e){var t=e.to,n=e.href,r=e.target,o=e.element;this.extraProps.to=t||null,this.extraProps.href=n||null,this.extraProps.target=r||null,this.renderComponent=o||(this.props.href?d:f)}},{key:"checkPlaceholder",value:function(e){var t=e.disabled,n=e.placeholder,r=e.children;!0===n?r?this.setState({disabled:!1}):this.setState({disabled:!0}):this.setState({disabled:t})}},{key:"clearPress",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.force,r=void 0!==n&&n,o=t.leave,i=void 0!==o&&o;(0,s.toggleMoveClasses)({element:this.container,root:this.rootElement,cssModule:this.props.cssModule});var c=this.props.active&&!r?this.rootElement+"--active":null;null===c&&!1===i&&(0,l.setCssEndEvent)(this.content,"transition",{tolerance:1}).then((function(){e.props.onReleased&&e.props.onReleased(e.container)})),this.setState({pressPosition:c})}},{key:"pressIn",value:function(){!0!==this.state.disabled&&!0!==this.props.blocked&&(this.pressed=(new Date).getTime(),this.setState({pressPosition:this.rootElement+"--active"}))}},{key:"pressOut",value:function(e){var t=this;this.clearTimer&&clearTimeout(this.clearTimer);var n=(new Date).getTime()-this.pressed;if(!0===this.props.ripple&&this.createBubble(e),"undefined"!=typeof window&&this.button){var r=new Event("action");this.button.dispatchEvent(r)}this.action(),this.clearTimer=setTimeout((function(){t.clearPress()}),100-n)}},{key:"action",value:function(){var e=this.props,t=e.action,n=e.onPress;if(this.button){if(t)return void t(this.container);n&&n(this.container)}}},{key:"createBubble",value:function(e){(0,s.createBubbleEffect)({event:e,button:this.button,content:this.content,className:(0,s.getClassName)(this.rootElement+"__bubble",this.props.cssModule)})}},{key:"moveEvents",value:function(){var e=this,t={onClick:function(t){e.props.href&&e.state.disabled&&(t.preventDefault(),t.stopPropagation())},onMouseLeave:function(){e.clearPress({leave:!0})},onMouseDown:function(t){t&&1!==t.nativeEvent.which||e.pressIn()},onMouseUp:function(t){if(!0===e.state.disabled||!0===e.props.blocked)return t.preventDefault(),void t.stopPropagation();e.pressOut(t)}};return!0===this.props.moveEvents?t.onMouseMove=function(t){if(!0!==e.state.disabled){var n=e.button,r=n.getBoundingClientRect().left,o=n.offsetWidth,i=t.pageX<r+.3*o?"left":t.pageX>r+.65*o?"right":"middle";(0,s.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:i})}}:t.onMouseEnter=function(){(0,s.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:"middle"})},t}},{key:"render",value:function(){var e=this,t=this.renderComponent,n=this.props,o=n.title,c=n.style,l=n.cssModule,a=n.children;return i.default.createElement(t,r({style:c,className:this.getRootClassName(),role:"button",title:o},this.extraProps,this.moveEvents()),i.default.createElement("span",{ref:function(t){e.button=t},className:(0,s.getClassName)(this.rootElement+"__wrapper",l)},i.default.createElement("span",{ref:function(t){e.content=t},className:(0,s.getClassName)(this.rootElement+"__content",l)},i.default.createElement("span",{ref:function(t){e.child=t}},a))))}}]),t}(i.default.Component);p.propTypes={action:c.default.func,onPress:c.default.func,onReleased:c.default.func,ripple:c.default.bool,children:c.default.node,disabled:c.default.bool,element:c.default.func,href:c.default.string,placeholder:c.default.bool,title:c.default.string,rootElement:c.default.string,moveEvents:c.default.bool,size:c.default.string,style:c.default.object,cssModule:c.default.object,className:c.default.string,target:c.default.string,to:c.default.string,type:c.default.string,visible:c.default.bool,active:c.default.bool,blocked:c.default.bool},p.defaultProps={action:null,onPress:null,onReleased:null,ripple:!1,blocked:!1,cssModule:null,children:null,disabled:!1,title:null,element:null,href:null,className:null,moveEvents:!0,placeholder:!1,rootElement:u,size:null,style:{},target:null,to:null,type:"primary",visible:!0,active:!1},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(0)),c=u(n(1)),l=n(2),s=u(n(8)),a=u(n(9));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.action=function(e){var t=n.props,r=t.action,o=t.onPress,i=t.href,c=t.type,l=t.user,a=t.phone;if(r)r(e);else if(o)o(e);else if(null===i){var u=(0,s.default)({height:600,width:575,url:n.getUrl(),message:n.getMessage(),type:c,user:l,phone:a});n.window&&window.open(u.url,u.title,u.extra)}},n.window="undefined"!=typeof window,n}return function(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)}(t,e),o(t,[{key:"getUrl",value:function(){return this.props.url?this.props.url:this.window?window.location.href:null}},{key:"getMessage",value:function(){if(this.props.message)return this.props.message;if("undefined"!==this.window){var e=document.querySelector("title");if(e)return e.innerHTML}return null}},{key:"getImage",value:function(){if(null!==this.props.image)return this.props.image;if(null!==this.window){var e=document.querySelector('meta[property="og:image"]');if(e)return e.getAttribute("content")}return null}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.icon,o=e.type,c=(e.action,e.onPress,e.iconWidth),s=e.iconHeight,u=e.href,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","icon","type","action","onPress","iconWidth","iconHeight","href"]);return i.default.createElement(l.AwesomeButton,r({type:o,action:this.action,href:u},d),n&&(0,a.default)({type:o,width:c,height:s,color:this.props.disabled?"rgba(255,255,255,0.35)":"#FFF"})," ",t)}}]),t}(i.default.Component);d.propTypes={action:c.default.func,onPress:c.default.func,children:c.default.node,disabled:c.default.bool,href:c.default.string,icon:c.default.bool,iconHeight:c.default.number,iconWidth:c.default.number,image:c.default.string,message:c.default.string,phone:c.default.string,type:c.default.string.isRequired,url:c.default.string,user:c.default.string},d.defaultProps={action:null,onPress:null,children:null,disabled:!1,href:null,icon:!0,iconHeight:23,iconWidth:30,image:null,message:null,phone:null,url:null,user:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=e.url,n=e.message,i=e.title,c=e.image,l=e.user,s=e.type,a=e.phone,u=e.width,d=e.height,f={},p={};switch(s){case"facebook":p.u=encodeURIComponent(t),f.url="https://www.facebook.com/sharer.php?"+(0,o.serialize)(p,"&"),f.title="Facebook Sharer";break;case"twitter":p.text=n,p.url=t,f.height=250,f.url="https://twitter.com/share?"+(0,o.serialize)(p,"&"),f.title="Twitter Sharer";break;case"pinterest":p.url=t,c&&(p.media=c),f.url="https://pinterest.com/pin/create/button/?"+(0,o.serialize)(p,"&"),f.title="Pinterest Sharer";break;case"google":case"gplus":p.url=t,f.url="https://plus.google.com/share?"+(0,o.serialize)(p,"&"),f.title="Google+ Sharer",f.width=400;break;case"linkedin":p.mini=!0,p.url=t,p.title=n||i,f.url="https://www.linkedin.com/shareArticle?"+(0,o.serialize)(p,"&"),f.title="Linkedin Sharer";break;case"reddit":p.url=t,p.title=n||i,f.url="https://www.reddit.com/submit?"+(0,o.serialize)(p,"&"),f.title="",f.width=850;break;case"whatsapp":p.phone=a.replace(/\+|(|)/gim,""),p.title=n||i,f.url="https://api.whatsapp.com/send?"+(0,o.serialize)(p,"&"),f.title="Whatsapp Message",f.width=850;break;case"messenger":f.url="https://m.me/"+l,f.title="Messenger Message",f.width=850;break;case"mail":f.url="mailto:"+t,f.title="_self";break;case"instagram":f.url=t,f.title="_self";break;default:return f}return f.extra=(0,o.serialize)(r({width:(f.width||u)+"px",height:(f.height||d)+"px"},function(e,t){if("undefined"==typeof window)return{top:0,left:0};var n=void 0!==window.screenLeft?window.screenLeft:screen.left,r=void 0!==window.screenTop?window.screenTop:screen.top,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width;return{top:(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/2-t/2+r,left:o/2-e/2+n}}(f.width||u,f.height||d)),","),f};var o=n(3)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(0)),o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}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1,0.5,0.2,0.7c0.1,0.2,0.3,0.4,0.6,0.5c2.4,1.4,5.2,2.1,8.1,2.1c2.6,0,5.2-0.5,7.5-1.5l0,0l0,0c0.3-0.2,0.7-0.3,1.1-0.5c0.2-0.1,0.4-0.2,0.5-0.4c0.2-0.2,0.3-0.4,0.4-0.6l0,0c0-0.1,0-0.2,0-0.3c0-0.2-0.1-0.4-0.1-0.5C33.3,29.5,33.1,29.3,32.9,29.2zM16.8,19.8c-1.7,0-3.1,1.4-3.1,3.1s1.4,3.1,3.1,3.1s3.1-1.4,3.1-3.1C19.9,21.1,18.5,19.8,16.8,19.8z M32.1,19.8c-1.7,0-3.1,1.4-3.1,3.1s1.4,3.1,3.1,3.1s3.1-1.4,3.1-3.1C35.1,21.1,33.8,19.8,32.1,19.8z"};function l(e){var t=e.type,n=e.width,o=e.height,i=e.margin,l=e.color;return r.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",space:"preserve",viewBox:"0 0 50 50",style:{marginRight:i},width:n,height:o},r.default.createElement("path",{fill:l,d:c[t]}))}l.propTypes={type:o.default.string.isRequired,width:o.default.string.isRequired,height:o.default.string.isRequired,margin:o.default.string.isRequired,color:o.default.string.isRequired},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(0)),c=u(n(1)),l=n(4),s=n(2),a=n(3);function u(e){return e&&e.__esModule?e:{default:e}}var d="aws-btn",f=4,p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clearStagedWrapperAnimation=function(){n.timeout=setTimeout((function(){"undefined"!=typeof window&&window.requestAnimationFrame((function(){n.clearLoading((function(){setTimeout((function(){n.setState({blocked:!1,loadingError:!1,errorLabel:null})}),500)}))}))}),n.props.releaseDelay)},n.action=function(){var e=n.props.action||n.props.onPress;n.startLoading(),(0,l.onceTransitionEnd)(n.content).then((function(){e&&e(n.content,n.endLoading.bind(n)),(0,l.setCssEndEvent)(n.content,"transition",{tolerance:f}).then((function(){n.clearStagedWrapperAnimation()}))}))},n.rootElement=e.rootElement||d,n.animationStage=0,n.loading=!1,n.timeout=null,n.state={loadingEnd:!1,loadingStart:!1,loadingError:!1,errorLabel:null,blocked:!1,active:!1},n}return function(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)}(t,e),o(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.checkFakePress(e)}},{key:"componentWillUnmount",value:function(){this.timeout&&clearTimeout(this.timeout)}},{key:"getRootClassName",value:function(){var e=this.rootElement,t=this.state;return[t.loadingStart&&e+"--start"||null,t.loadingEnd&&e+"--end"||null,t.loadingError&&e+"--errored"||null,e+"--progress"].join(" ").trim().replace(/[\s]+/gi," ")}},{key:"checkFakePress",value:function(e){e.fakePress!==this.props.fakePress&&!0===e.fakePress&&this.action()}},{key:"endLoading",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.setState({loadingEnd:!0,loadingError:!e,errorLabel:t}),this.animationStage=1}},{key:"startLoading",value:function(){var e=this;this.loading=!0,this.setState({blocked:!0,active:!0},(function(){(0,l.beforeFutureCssLayout)(2,(function(){e.setState({loadingStart:!0})}))}))}},{key:"clearLoading",value:function(e){this.loading=!1,this.setState({loadingStart:!1,loadingEnd:!1,active:!1},e)}},{key:"moveEvents",value:function(){var e=this;return{onMouseDown:function(t){!0===e.props.disabled||!0===e.loading||!0===e.state.blocked||t&&1!==t.nativeEvent.which||(e.loading=!0)},onMouseUp:function(t){if(!0===e.props.disabled||!0===e.loading||!0===e.state.blocked)return t.preventDefault(),void t.stopPropagation();e.action()}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.size,c=t.cssModule,l=t.loadingLabel,u=t.resultLabel,d=(t.action,t.type),f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","size","cssModule","loadingLabel","resultLabel","action","type"]),p=this.state,h=p.active,v=p.blocked,m=p.errorLabel;return i.default.createElement(s.AwesomeButton,r({size:o,type:d,className:this.getRootClassName(),action:this.action,cssModule:c,active:h,blocked:v},this.moveEvents(),f),i.default.createElement("span",{ref:function(t){e.content=t},"data-loading":l||null,"data-status":m||u||null,className:(0,a.getClassName)(this.rootElement+"__progress",c)},i.default.createElement("span",null,n)))}}]),t}(i.default.Component);p.propTypes={action:c.default.func,onPress:c.default.func,loadingLabel:c.default.string,resultLabel:c.default.string,rootElement:c.default.node,cssModule:c.default.object,children:c.default.node,disabled:c.default.bool,size:c.default.string,type:c.default.string,fakePress:c.default.bool,releaseDelay:c.default.number},p.defaultProps={action:null,onPress:null,rootElement:null,loadingLabel:"Wait..",resultLabel:"Success!",disabled:!1,cssModule:null,fakePress:!1,children:null,size:null,type:null,releaseDelay:500},t.default=p}])})); | ||
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports["react-awesome-button"]=t(require("react"),require("prop-types")):e["react-awesome-button"]=t(e.React,e.PropTypes)}(this,(function(e,t){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);Object.defineProperty(t,"AwesomeButton",{enumerable:!0,get:function get(){return _interopRequireDefault(r).default}});var o=n(7);Object.defineProperty(t,"AwesomeButtonSocial",{enumerable:!0,get:function get(){return _interopRequireDefault(o).default}});var i=n(10);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"AwesomeButtonProgress",{enumerable:!0,get:function get(){return _interopRequireDefault(i).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function sliceIterator(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.serialize=function serialize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return Object.entries(e).map((function(e){var t=_slicedToArray(e,2);return t[0]+"="+t[1]})).join(t)},t.classToModules=classToModules,t.getClassName=function getClassName(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if(t)return t[e]||e;return e},t.setCssEndEvent=setCssEndEvent,t.toggleMoveClasses=function toggleMoveClasses(e){var t=e.element,n=e.root,o=e.cssModule,i=void 0===o?null:o,c=e.state,s=void 0===c?null:c;if(!t)return!1;if(!s)return t.classList.remove(classToModules([n+"--"+r[0]],i),classToModules([n+"--"+r[1]],i),classToModules([n+"--"+r[2]],i)),!1;var l=r.filter((function(e){return e!==s})),a=l.length;for(;a--;)t.classList.remove(classToModules([n+"--"+l[a]],i));return t.classList.add(classToModules([n+"--"+s],i)),!0},t.createBubbleEffect=function createBubbleEffect(e){var t=e.event,n=e.button,r=e.content,o=e.className,i=n.getBoundingClientRect(),c=window.pageYOffset||document.documentElement.scrolltop||0,s=document.createElement("span"),l=i.width<50?3*i.width:2*i.width;s.className=o,s.style.top="-"+(l/2-(t.pageY-i.top-c))+"px",s.style.left="-"+(l/2-(t.pageX-i.left))+"px",s.style.width=l+"px",s.style.height=l+"px",setCssEndEvent(s,"animation",(function(){window.requestAnimationFrame((function(){r.removeChild(s)}))})),window.requestAnimationFrame((function(){r.appendChild(s)}))};var r=["middle","left","right"];function classToModules(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];if(!t)return e.join(" ").trim();for(var n=[],r=e.length;r--;)t[e[r]]&&n.push(t[e[r]]);return n.join(" ").trim()}function setCssEndEvent(e,t,n){if(!e)return!1;var r=t.charAt(0).toUpperCase()+t.slice(1);return void 0!==e.style["Webkit"+r]?e.addEventListener("webkit"+r+"End",n):void 0!==e.style.OTransition?e.addEventListener("o"+t+"End",n):e.addEventListener(t+"End",n)}},function(e,t,n){e.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=0)}([function(e,t,n){"use strict";function r(e,t,{tolerance:n=0,propertyName:r}={}){return new Promise(o=>{if(!e)return void o(!1);let i=null;const s=t.charAt(0).toUpperCase()+t.slice(1);let l=0;function c(t){if((t.srcElement||t.target)===e){if(l>=n){if(r&&r!==t.propertyName)return;e.removeEventListener(i,c),o(t)}l+=1}}void 0!==e.style[`Webkit${s}`]&&(i=`webkit${s}End`),void 0!==e.style.OTransition&&(i=`o${t}End`),void 0!==e.style[t]&&(i=`${t}end`),e.clearCssEndEvent&&e.clearCssEndEvent(),e.clearCssEndEvent=function(){e.removeEventListener(i,c)},e.addEventListener(i,c)})}function o(e){window&&window.requestAnimationFrame(e)}function i(e){window&&window.requestAnimationFrame(()=>{window.requestAnimationFrame(e)})}function u(e,t){!function e(t,n){window&&t&&Number.isInteger(t)&&t>0?window.requestAnimationFrame(()=>{e(t-1,n)}):n()}(e+1,t)}function f(){return new Promise(e=>{i(e)})}function c(e,t={}){return new Promise(n=>{r(e,"transition",t).then(n)})}function s(e,t={}){return new Promise(n=>{r(e,"animation",t).then(n)})}n.r(t),n.d(t,"setCssEndEvent",(function(){return r})),n.d(t,"beforeCssLayout",(function(){return o})),n.d(t,"beforeNextCssLayout",(function(){return i})),n.d(t,"beforeFutureCssLayout",(function(){return u})),n.d(t,"onceNextCssLayout",(function(){return f})),n.d(t,"onceTransitionEnd",(function(){return c})),n.d(t,"onceAnimationEnd",(function(){return s}))}])},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=_interopRequireDefault(n(0)),c=_interopRequireDefault(n(1)),s=n(4),l=n(3);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a="aws-btn",u=function Anchor(e){return i.default.createElement("a",e)},d=function Button(e){return i.default.createElement("button",e)},f=function(e){function AwesomeButton(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,AwesomeButton);var t=function _possibleConstructorReturn(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}(this,(AwesomeButton.__proto__||Object.getPrototypeOf(AwesomeButton)).call(this,e));return t.rootElement=e.rootElement||a,t.animationStage=0,t.extraProps={},t.state={disabled:e.disabled||e.placeholder&&!e.children},t.checkProps(e),t}return function _inherits(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)}(AwesomeButton,e),o(AwesomeButton,[{key:"componentDidMount",value:function componentDidMount(){this.container=this.button&&this.button.parentNode}},{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(e){this.checkPlaceholder(e),this.checkProps(e),this.checkActive(e)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.clearTimer&&clearTimeout(this.clearTimer)}},{key:"getRootClassName",value:function getRootClassName(){var e=this.rootElement,t=this.props,n=t.type,r=t.size,o=t.placeholder,i=t.children,c=t.visible,s=t.cssModule,a=this.state,u=a.disabled,d=a.pressPosition,f=[this.rootElement,n&&e+"--"+n,r&&e+"--"+r,c&&e+"--visible",o&&!i&&e+"--placeholder"||null];return!0===u&&f.push(e+"--disabled"),d&&f.push(d),this.props.className&&f.push.apply(f,function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(this.props.className.split(" "))),s&&s["aws-btn"]?(0,l.classToModules)(f,s):f.join(" ").trim().replace(/[\s]+/gi," ")}},{key:"checkActive",value:function checkActive(e){if(e.active!==this.props.active){if(!0===e.active)return void this.setState({pressPosition:this.rootElement+"--active"});this.clearPress({force:!0})}}},{key:"checkProps",value:function checkProps(e){var t=e.to,n=e.href,r=e.target,o=e.element;this.extraProps.to=t||null,this.extraProps.href=n||null,this.extraProps.target=r||null,this.renderComponent=o||(this.props.href?u:d)}},{key:"checkPlaceholder",value:function checkPlaceholder(e){var t=e.disabled,n=e.placeholder,r=e.children;!0===n?r?this.setState({disabled:!1}):this.setState({disabled:!0}):this.setState({disabled:t})}},{key:"clearPress",value:function clearPress(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.force,r=void 0!==n&&n,o=t.leave,i=void 0!==o&&o;(0,l.toggleMoveClasses)({element:this.container,root:this.rootElement,cssModule:this.props.cssModule});var c=this.props.active&&!r?this.rootElement+"--active":null;null===c&&!1===i&&(0,s.setCssEndEvent)(this.content,"transition",{tolerance:1}).then((function(){e.props.onReleased&&e.props.onReleased(e.container)})),this.setState({pressPosition:c})}},{key:"pressIn",value:function pressIn(){!0!==this.state.disabled&&!0!==this.props.blocked&&(this.pressed=(new Date).getTime(),this.setState({pressPosition:this.rootElement+"--active"}))}},{key:"pressOut",value:function pressOut(e){var t=this;this.clearTimer&&clearTimeout(this.clearTimer);var n=(new Date).getTime()-this.pressed;if(!0===this.props.ripple&&this.createBubble(e),"undefined"!=typeof window&&this.button){var r=new Event("action");this.button.dispatchEvent(r)}this.action(),this.clearTimer=setTimeout((function(){t.clearPress()}),100-n)}},{key:"action",value:function action(){var e=this.props,action=e.action,t=e.onPress;if(this.button){if(action)return void action(this.container);t&&t(this.container)}}},{key:"createBubble",value:function createBubble(e){(0,l.createBubbleEffect)({event:e,button:this.button,content:this.content,className:(0,l.getClassName)(this.rootElement+"__bubble",this.props.cssModule)})}},{key:"moveEvents",value:function moveEvents(){var e=this,t={onClick:function onClick(t){e.props.href&&e.state.disabled&&(t.preventDefault(),t.stopPropagation())},onMouseLeave:function onMouseLeave(){e.clearPress({leave:!0})},onMouseDown:function onMouseDown(t){t&&1!==t.nativeEvent.which||e.pressIn()},onMouseUp:function onMouseUp(t){if(!0===e.state.disabled||!0===e.props.blocked)return t.preventDefault(),void t.stopPropagation();e.pressOut(t)}};return!0===this.props.moveEvents?t.onMouseMove=function(t){if(!0!==e.state.disabled){var n=e.button,r=n.getBoundingClientRect().left,o=n.offsetWidth,i=t.pageX<r+.3*o?"left":t.pageX>r+.65*o?"right":"middle";(0,l.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:i})}}:t.onMouseEnter=function(){(0,l.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:"middle"})},t}},{key:"render",value:function render(){var e=this,t=this.renderComponent,n=this.props,o=n.title,c=n.style,s=n.cssModule,a=n.children;return i.default.createElement(t,r({style:c,className:this.getRootClassName(),role:"button",title:o},this.extraProps,this.moveEvents()),i.default.createElement("span",{ref:function ref(t){e.button=t},className:(0,l.getClassName)(this.rootElement+"__wrapper",s)},i.default.createElement("span",{ref:function ref(t){e.content=t},className:(0,l.getClassName)(this.rootElement+"__content",s)},i.default.createElement("span",{ref:function ref(t){e.child=t}},a))))}}]),AwesomeButton}(i.default.Component);f.propTypes={action:c.default.func,onPress:c.default.func,onReleased:c.default.func,ripple:c.default.bool,children:c.default.node,disabled:c.default.bool,element:c.default.func,href:c.default.string,placeholder:c.default.bool,title:c.default.string,rootElement:c.default.string,moveEvents:c.default.bool,size:c.default.string,style:c.default.object,cssModule:c.default.object,className:c.default.string,target:c.default.string,to:c.default.string,type:c.default.string,visible:c.default.bool,active:c.default.bool,blocked:c.default.bool},f.defaultProps={action:null,onPress:null,onReleased:null,ripple:!1,blocked:!1,cssModule:null,children:null,disabled:!1,title:null,element:null,href:null,className:null,moveEvents:!0,placeholder:!1,rootElement:a,size:null,style:{},target:null,to:null,type:"primary",visible:!0,active:!1},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=_interopRequireDefault(n(0)),c=_interopRequireDefault(n(1)),s=n(2),l=_interopRequireDefault(n(8)),a=_interopRequireDefault(n(9));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function AwesomeButtonSocial(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,AwesomeButtonSocial);var t=function _possibleConstructorReturn(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}(this,(AwesomeButtonSocial.__proto__||Object.getPrototypeOf(AwesomeButtonSocial)).call(this,e));return t.action=function(e){var n=t.props,r=n.action,o=n.onPress,i=n.href,c=n.type,s=n.user,a=n.phone;if(r)r(e);else if(o)o(e);else if(null===i){var u=(0,l.default)({height:600,width:575,url:t.getUrl(),message:t.getMessage(),type:c,user:s,phone:a});t.window&&window.open(u.url,u.title,u.extra)}},t.window="undefined"!=typeof window,t}return function _inherits(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)}(AwesomeButtonSocial,e),o(AwesomeButtonSocial,[{key:"getUrl",value:function getUrl(){return this.props.url?this.props.url:this.window?window.location.href:null}},{key:"getMessage",value:function getMessage(){if(this.props.message)return this.props.message;if("undefined"!==this.window){var e=document.querySelector("title");if(e)return e.innerHTML}return null}},{key:"getImage",value:function getImage(){if(null!==this.props.image)return this.props.image;if(null!==this.window){var e=document.querySelector('meta[property="og:image"]');if(e)return e.getAttribute("content")}return null}},{key:"render",value:function render(){var e=this.props,t=e.children,n=e.icon,o=e.type,c=(e.action,e.onPress,e.iconWidth),l=e.iconHeight,u=e.href,d=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","icon","type","action","onPress","iconWidth","iconHeight","href"]);return i.default.createElement(s.AwesomeButton,r({type:o,action:this.action,href:u},d),n&&(0,a.default)({type:o,width:c,height:l,color:this.props.disabled?"rgba(255,255,255,0.35)":"#FFF"})," ",t)}}]),AwesomeButtonSocial}(i.default.Component);u.propTypes={action:c.default.func,onPress:c.default.func,children:c.default.node,disabled:c.default.bool,href:c.default.string,icon:c.default.bool,iconHeight:c.default.number,iconWidth:c.default.number,image:c.default.string,message:c.default.string,phone:c.default.string,type:c.default.string.isRequired,url:c.default.string,user:c.default.string},u.defaultProps={action:null,onPress:null,children:null,disabled:!1,href:null,icon:!0,iconHeight:23,iconWidth:30,image:null,message:null,phone:null,url:null,user:null},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function Sharer(e){var t=e.url,n=e.message,i=e.title,c=e.image,s=e.user,l=e.type,a=e.phone,u=e.width,d=e.height,f={},p={};switch(l){case"facebook":p.u=encodeURIComponent(t),f.url="https://www.facebook.com/sharer.php?"+(0,o.serialize)(p,"&"),f.title="Facebook Sharer";break;case"twitter":p.text=n,p.url=t,f.height=250,f.url="https://twitter.com/share?"+(0,o.serialize)(p,"&"),f.title="Twitter Sharer";break;case"pinterest":p.url=t,c&&(p.media=c),f.url="https://pinterest.com/pin/create/button/?"+(0,o.serialize)(p,"&"),f.title="Pinterest Sharer";break;case"google":case"gplus":p.url=t,f.url="https://plus.google.com/share?"+(0,o.serialize)(p,"&"),f.title="Google+ Sharer",f.width=400;break;case"linkedin":p.mini=!0,p.url=t,p.title=n||i,f.url="https://www.linkedin.com/shareArticle?"+(0,o.serialize)(p,"&"),f.title="Linkedin Sharer";break;case"reddit":p.url=t,p.title=n||i,f.url="https://www.reddit.com/submit?"+(0,o.serialize)(p,"&"),f.title="",f.width=850;break;case"whatsapp":p.phone=a.replace(/\+|(|)/gim,""),p.title=n||i,f.url="https://api.whatsapp.com/send?"+(0,o.serialize)(p,"&"),f.title="Whatsapp Message",f.width=850;break;case"messenger":f.url="https://m.me/"+s,f.title="Messenger Message",f.width=850;break;case"mail":f.url="mailto:"+t,f.title="_self";break;case"instagram":f.url=t,f.title="_self";break;default:return f}return f.extra=(0,o.serialize)(r({width:(f.width||u)+"px",height:(f.height||d)+"px"},function centerWindow(e,t){if("undefined"==typeof window)return{top:0,left:0};var n=void 0!==window.screenLeft?window.screenLeft:screen.left,r=void 0!==window.screenTop?window.screenTop:screen.top,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width;return{top:(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/2-t/2+r,left:o/2-e/2+n}}(f.width||u,f.height||d)),","),f};var o=n(3)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=_interopRequireDefault(n(0)),o=_interopRequireDefault(n(1));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={youtube:"M38.1,23H11.9c-4.1,0-7.6,3.4-7.6,7.6v6.1c0,4.1,3.4,7.6,7.6,7.6h26.3c4.1,0,7.6-3.4,7.6-7.6v-6.1C45.8,26.4,42.4,23,38.1,23z M17.4,27.7h-2.5v12.2h-2.4V27.7h-2.5v-2h7.3V27.7z M24.3,39.9h-2.1v-1.2c-0.4,0.4-0.8,0.8-1.2,0.9c-0.4,0.3-0.8,0.3-1.2,0.3c-0.5,0-0.8-0.2-1.1-0.5c-0.3-0.3-0.3-0.8-0.3-1.4v-8.6h2.1v8c0,0.3,0.1,0.4,0.2,0.5c0.1,0.1,0.3,0.2,0.4,0.2c0.2,0,0.3-0.1,0.6-0.3c0.3-0.2,0.4-0.3,0.7-0.6v-7.9h2.1v10.6H24.3z M31.9,37.7c0,0.8-0.2,1.4-0.5,1.7C31,39.8,30.5,40,29.9,40c-0.4,0-0.8-0.1-1.1-0.3c-0.3-0.2-0.6-0.4-0.9-0.7v0.8h-2.1V25.7h2.1v4.6c0.3-0.3,0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0,0.1,0,0.2c0,0.5,0.2,1,0.4,1.4C3.8,20.7,4,21,4.3,21.3C5.2,19.3,6.6,17.6,8.2,16.2zM45.7,18.9c0-0.4-0.1-0.9-0.3-1.3l0,0l0,0c-0.3-0.6-0.7-1-1.3-1.4c-0.5-0.3-1.2-0.5-1.8-0.5s-1.1,0.1-1.7,0.4c1.6,1.4,3,3.1,3.9,5.1c0.3-0.3,0.5-0.6,0.7-0.9C45.6,19.9,45.7,19.4,45.7,18.9z M32.9,29.2c-0.2-0.1-0.5-0.2-0.8-0.2c-0.2,0-0.5,0.1-0.7,0.2c-2.1,1.1-4.6,1.7-7.1,1.7c-1.9,0-3.7-0.3-5.4-1.1l0,0l0,0c-0.3-0.1-0.5-0.3-0.9-0.5c-0.2-0.1-0.3-0.2-0.5-0.2C17.3,29,17.1,29,16.9,29s-0.4,0-0.6,0.1l0,0l0,0c-0.3,0.1-0.5,0.3-0.7,0.5s-0.2,0.5-0.2,0.7s0.1,0.5,0.2,0.7c0.1,0.2,0.3,0.4,0.6,0.5c2.4,1.4,5.2,2.1,8.1,2.1c2.6,0,5.2-0.5,7.5-1.5l0,0l0,0c0.3-0.2,0.7-0.3,1.1-0.5c0.2-0.1,0.4-0.2,0.5-0.4c0.2-0.2,0.3-0.4,0.4-0.6l0,0c0-0.1,0-0.2,0-0.3c0-0.2-0.1-0.4-0.1-0.5C33.3,29.5,33.1,29.3,32.9,29.2zM16.8,19.8c-1.7,0-3.1,1.4-3.1,3.1s1.4,3.1,3.1,3.1s3.1-1.4,3.1-3.1C19.9,21.1,18.5,19.8,16.8,19.8z M32.1,19.8c-1.7,0-3.1,1.4-3.1,3.1s1.4,3.1,3.1,3.1s3.1-1.4,3.1-3.1C35.1,21.1,33.8,19.8,32.1,19.8z"};function getIcon(e){var t=e.type,n=e.width,o=e.height,c=e.margin,s=e.color;return r.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",space:"preserve",viewBox:"0 0 50 50",style:{marginRight:c},width:n,height:o},r.default.createElement("path",{fill:s,d:i[t]}))}getIcon.propTypes={type:o.default.string.isRequired,width:o.default.string.isRequired,height:o.default.string.isRequired,margin:o.default.string.isRequired,color:o.default.string.isRequired},t.default=getIcon},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}(),i=_interopRequireDefault(n(0)),c=_interopRequireDefault(n(1)),s=n(4),l=n(2),a=n(3);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u="aws-btn",d=4,f=function(e){function AwesomeProgress(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,AwesomeProgress);var t=function _possibleConstructorReturn(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}(this,(AwesomeProgress.__proto__||Object.getPrototypeOf(AwesomeProgress)).call(this,e));return t.clearStagedWrapperAnimation=function(){t.timeout=setTimeout((function(){"undefined"!=typeof window&&window.requestAnimationFrame((function(){t.clearLoading((function(){setTimeout((function(){t.setState({blocked:!1,loadingError:!1,errorLabel:null})}),500)}))}))}),t.props.releaseDelay)},t.action=function(){var e=t.props.action||t.props.onPress;t.startLoading(),(0,s.onceTransitionEnd)(t.content).then((function(){e&&e(t.content,t.endLoading.bind(t)),(0,s.setCssEndEvent)(t.content,"transition",{tolerance:d}).then((function(){t.clearStagedWrapperAnimation()}))}))},t.rootElement=e.rootElement||u,t.animationStage=0,t.loading=!1,t.timeout=null,t.state={loadingEnd:!1,loadingStart:!1,loadingError:!1,errorLabel:null,blocked:!1,active:!1},t}return function _inherits(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)}(AwesomeProgress,e),o(AwesomeProgress,[{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(e){this.checkFakePress(e)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.timeout&&clearTimeout(this.timeout)}},{key:"getRootClassName",value:function getRootClassName(){var e=this.rootElement,t=this.state;return[t.loadingStart&&e+"--start"||null,t.loadingEnd&&e+"--end"||null,t.loadingError&&e+"--errored"||null,e+"--progress"].join(" ").trim().replace(/[\s]+/gi," ")}},{key:"checkFakePress",value:function checkFakePress(e){e.fakePress!==this.props.fakePress&&!0===e.fakePress&&this.action()}},{key:"endLoading",value:function endLoading(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.setState({loadingEnd:!0,loadingError:!e,errorLabel:t}),this.animationStage=1}},{key:"startLoading",value:function startLoading(){var e=this;this.loading=!0,this.setState({blocked:!0,active:!0},(function(){(0,s.beforeFutureCssLayout)(2,(function(){e.setState({loadingStart:!0})}))}))}},{key:"clearLoading",value:function clearLoading(e){this.loading=!1,this.setState({loadingStart:!1,loadingEnd:!1,active:!1},e)}},{key:"moveEvents",value:function moveEvents(){var e=this;return{onMouseDown:function onMouseDown(t){!0===e.props.disabled||!0===e.loading||!0===e.state.blocked||t&&1!==t.nativeEvent.which||(e.loading=!0)},onMouseUp:function onMouseUp(t){if(!0===e.props.disabled||!0===e.loading||!0===e.state.blocked)return t.preventDefault(),void t.stopPropagation();e.action()}}}},{key:"render",value:function render(){var e=this,t=this.props,n=t.children,o=t.size,c=t.cssModule,s=t.loadingLabel,u=t.resultLabel,d=(t.action,t.type),f=function _objectWithoutProperties(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","size","cssModule","loadingLabel","resultLabel","action","type"]),p=this.state,h=p.active,v=p.blocked,m=p.errorLabel;return i.default.createElement(l.AwesomeButton,r({size:o,type:d,className:this.getRootClassName(),action:this.action,cssModule:c,active:h,blocked:v},this.moveEvents(),f),i.default.createElement("span",{ref:function ref(t){e.content=t},"data-loading":s||null,"data-status":m||u||null,className:(0,a.getClassName)(this.rootElement+"__progress",c)},i.default.createElement("span",null,n)))}}]),AwesomeProgress}(i.default.Component);f.propTypes={action:c.default.func,onPress:c.default.func,loadingLabel:c.default.string,resultLabel:c.default.string,rootElement:c.default.node,cssModule:c.default.object,children:c.default.node,disabled:c.default.bool,size:c.default.string,type:c.default.string,fakePress:c.default.bool,releaseDelay:c.default.number},f.defaultProps={action:null,onPress:null,rootElement:null,loadingLabel:"Wait..",resultLabel:"Success!",disabled:!1,cssModule:null,fakePress:!1,children:null,size:null,type:null,releaseDelay:500},t.default=f}])})); |
{ | ||
"name": "react-awesome-button", | ||
"version": "6.3.1", | ||
"version": "6.4.0", | ||
"description": "Performant, extendable, highly customisable, production ready React Component that renders an animated basic set of UI buttons", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -220,3 +220,3 @@ # React <AwesomeButton /> UI Component | ||
- Other open source projects @ <a title="Web Software Developer Code Laboratory" target="_blank" href="https://caferati.me/labs">Code Laboratory</a> | ||
- A scope of my work @ <a title="Web Software Developer Portfolio" target="_blank" href="https://caferati.me/portfolio">Web Portfolio</a> | ||
- A scope of my work @ <a title="Web Software Developer Portfolio" target="_blank" href="https://caferati.me/portfolio">Web Developer Portfolio</a> | ||
@@ -223,0 +223,0 @@ ## License |
@@ -42,4 +42,14 @@ const TerserPlugin = require('terser-webpack-plugin'); | ||
}, | ||
optimization: { | ||
minimize: true, | ||
minimizer: [ | ||
new TerserPlugin({ | ||
terserOptions: { | ||
keep_fnames: true, | ||
}, | ||
}), | ||
], | ||
}, | ||
}; | ||
module.exports = config; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5656458
24408