react-custom-share
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -1,1 +0,79 @@ | ||
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("react"));else if("function"==typeof define&&define.amd)define(["React"],n);else{var r="object"==typeof exports?n(require("react")):n(e.React);for(var t in r)("object"==typeof exports?exports:e)[t]=r[t]}}(window,function(e){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=30)}([function(e,n,r){e.exports=r(29)()},function(n,r){n.exports=e},function(e,n,r){var t={},o=function(e){var n;return function(){return void 0===n&&(n=e.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),a=function(e){var n={};return function(e){if("function"==typeof e)return e();if(void 0===n[e]){var r=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}n[e]=r}return n[e]}}(),i=null,s=0,c=[],u=r(21);function l(e,n){for(var r=0;r<e.length;r++){var o=e[r],a=t[o.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](o.parts[i]);for(;i<o.parts.length;i++)a.parts.push(g(o.parts[i],n))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(g(o.parts[i],n));t[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,n){for(var r=[],t={},o=0;o<e.length;o++){var a=e[o],i=n.base?a[0]+n.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};t[i]?t[i].parts.push(s):r.push(t[i]={id:i,parts:[s]})}return r}function d(e,n){var r=a(e.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var t=c[c.length-1];if("top"===e.insertAt)t?t.nextSibling?r.insertBefore(n,t.nextSibling):r.appendChild(n):r.insertBefore(n,r.firstChild),c.push(n);else if("bottom"===e.insertAt)r.appendChild(n);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(e.insertInto+" "+e.insertAt.before);r.insertBefore(n,o)}}function p(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var n=c.indexOf(e);n>=0&&c.splice(n,1)}function b(e){var n=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),h(n,e.attrs),d(e,n),n}function h(e,n){Object.keys(n).forEach(function(r){e.setAttribute(r,n[r])})}function g(e,n){var r,t,o,a;if(n.transform&&e.css){if(!(a=n.transform(e.css)))return function(){};e.css=a}if(n.singleton){var c=s++;r=i||(i=b(n)),t=m.bind(null,r,c,!1),o=m.bind(null,r,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var n=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",h(n,e.attrs),d(e,n),n}(n),t=function(e,n,r){var t=r.css,o=r.sourceMap,a=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||a)&&(t=u(t));o&&(t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([t],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}.bind(null,r,n),o=function(){p(r),r.href&&URL.revokeObjectURL(r.href)}):(r=b(n),t=function(e,n){var r=n.css,t=n.media;t&&e.setAttribute("media",t);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),o=function(){p(r)});return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else o()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=o()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var r=f(e,n);return l(r,n),function(e){for(var o=[],a=0;a<r.length;a++){var i=r[a];(s=t[i.id]).refs--,o.push(s)}e&&l(f(e,n),n);for(a=0;a<o.length;a++){var s;if(0===(s=o[a]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete t[s.id]}}}};var v=function(){var e=[];return function(n,r){return e[n]=r,e.filter(Boolean).join("\n")}}();function m(e,n,r,t){var o=r?"":t.css;if(e.styleSheet)e.styleSheet.cssText=v(n,o);else{var a=document.createTextNode(o),i=e.childNodes;i[n]&&e.removeChild(i[n]),i.length?e.insertBefore(a,i[n]):e.appendChild(a)}}},function(e,n){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var r=function(e,n){var r=e[1]||"",t=e[3];if(!t)return r;if(n&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(t),a=t.sources.map(function(e){return"/*# sourceURL="+t.sourceRoot+e+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+r+"}":r}).join("")},n.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var t={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(t[a]=!0)}for(o=0;o<e.length;o++){var i=e[o];"number"==typeof i[0]&&t[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),n.push(i))}},n}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),o=c(r(1)),a=c(r(0)),i=c(r(27)),s=c(r(26));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}var l=function(e){function n(){var e,r,t;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=Array(o),c=0;c<o;c++)a[c]=arguments[c];return r=t=u(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(a))),t.onClick=function(e){e.preventDefault();var n=t.props.url,r=t.props.network,o=t.props.text,a=(0,s.default)({network:r,url:n,text:o});t.openShareWindow(a)},t.onKeyPress=function(e){},t.openShareWindow=function(e){(0,i.default)(e)},u(t,r)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,o.default.PureComponent),t(n,[{key:"render",value:function(){var e=this.props,n=e.network,r=e.children,t=e.styleClass;return o.default.createElement("button",{className:"rcs-sharebutton "+t,"aria-label":"share on "+n,onClick:this.onClick},r)}}]),n}();l.propTypes={network:a.default.string.isRequired,url:a.default.string.isRequired,text:a.default.string,children:a.default.node,styleClass:a.default.string},n.default=l},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=i(r(1)),a=i(r(0));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var n=e.url,r=e.button,a=e.buttons,i=e.text,s=void 0===i?"":i,c=e.themeClass,u=void 0===c?"":c;return o.default.createElement("div",{className:"rcs-shareblock "+u},a.map(function(e){var a=e.network,i=e.icon,c=function(e,n){var r={};for(var t in e)n.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}(e,["network","icon"]);return o.default.createElement(r,t({key:a,network:a,url:n,text:s},c),o.default.createElement(i,null))}))};s.propTypes={url:a.default.string.isRequired,button:a.default.func.isRequired,buttons:a.default.array.isRequired,text:a.default.string,themeClass:a.default.string},n.default=s},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,".rcs-shareblock--standard {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: horizontal;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: row;\r\n flex-direction: row;\r\n -ms-flex-wrap: wrap;\r\n flex-wrap: wrap;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n}\r\n",""])},function(e,n,r){var t=r(6);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(1)),a=s(r(0));r(7);var i=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){return o.default.createElement(i.default,t({themeClass:"rcs-shareblock--standard"},e))};c.propTypes={url:a.default.string.isRequired,button:a.default.func.isRequired,buttons:a.default.array.isRequired,text:a.default.string},n.default=c},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,'.rcs-sharebutton--round-square {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: currentColor;\n border: 0;\n border-radius: 8%;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n height: 44px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 3px;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 44px;\n}\n.rcs-sharebutton--round-square > svg {\n fill: #fff;\n height: 50%;\n -webkit-transform: rotate(0) scale(1);\n transform: rotate(0) scale(1);\n -webkit-transition: 0.5s;\n transition: 0.5s;\n width: 50%;\n}\n.rcs-sharebutton--round-square:hover > svg {\n filter: url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur in="SourceAlpha" stdDeviation="3" /><feOffset dx="1" dy="1" result="offsetblur" /><feFlood flood-color="rgba(255,255,255,1)" /><feComposite in2="offsetblur" operator="in" /><feMerge><feMergeNode /><feMergeNode in="SourceGraphic" /></feMerge></filter></svg>#filter\');\n -webkit-filter: drop-shadow(0 0 3px rgba(255, 255, 255, 1));\n filter: drop-shadow(0 0 3px rgba(255, 255, 255, 1));\n -webkit-transform: rotate(360deg) scale(1.2);\n transform: rotate(360deg) scale(1.2);\n}\n.rcs-sharebutton--round-square.rcs-facebook {\n color: rgba(80, 124, 190, 1);\n}\n.rcs-sharebutton--round-square.rcs-googleplus {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--round-square.rcs-twitter {\n color: rgba(99, 205, 241, 1);\n}\n.rcs-sharebutton--round-square.rcs-email {\n color: rgba(252, 201, 93, 1);\n}\n.rcs-sharebutton--round-square.rcs-pinterest {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--round-square.rcs-linkedin {\n color: rgba(144, 202, 221, 1);\n}\n@media (any-hover: none) {\n .rcs-sharebutton--round-square:hover > svg {\n -webkit-filter: none;\n filter: none;\n -webkit-transform: rotate(0) scale(1);\n transform: rotate(0) scale(1);\n }\n}\n@media screen and (min-width: 330px) {\n .rcs-sharebutton--round-square {\n margin: 5px;\n }\n}\n@media screen and (min-width: 600px) {\n .rcs-sharebutton--round-square {\n margin: 7px;\n }\n}\n@media screen and (min-width: 1025px) {\n .rcs-sharebutton--round-square {\n margin: 10px;\n }\n}\n',""])},function(e,n,r){var t=r(9);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(1)),a=s(r(0));r(10);var i=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var n=e.network.toLowerCase();return o.default.createElement(i.default,t({styleClass:"rcs-sharebutton--round-square rcs-"+n},e))};c.propTypes={network:a.default.string.isRequired,url:a.default.string.isRequired,children:a.default.node.isRequired,text:a.default.string},n.default=c},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,".rcs-sharebutton--rectangle {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: currentColor;\n border: 0;\n color: #666;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-preferred-size: 44px;\n flex-basis: 44px;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n min-height: 44px;\n overflow: hidden;\n -webkit-transform: scale(1);\n transform: scale(1);\n}\n.rcs-sharebutton--rectangle > svg {\n fill: #fff;\n height: 24px;\n -webkit-transform: scale(1);\n transform: scale(1);\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 24px;\n}\n.rcs-sharebutton--rectangle:hover > svg {\n -webkit-transform: rotate(-5deg) scale(3);\n transform: rotate(-5deg) scale(3);\n}\n.rcs-sharebutton--rectangle.rcs-facebook {\n color: rgba(80, 124, 190, 1);\n}\n.rcs-sharebutton--rectangle.rcs-googleplus {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--rectangle.rcs-twitter {\n color: rgba(99, 205, 241, 1);\n}\n.rcs-sharebutton--rectangle.rcs-email {\n color: rgba(252, 201, 93, 1);\n}\n.rcs-sharebutton--rectangle.rcs-pinterest {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--rectangle.rcs-linkedin {\n color: rgba(144, 202, 221, 1);\n}\n@media (any-hover: none) {\n .rcs-sharebutton--rectangle:hover > svg {\n -webkit-transform: rotate(0) scale(1);\n transform: rotate(0) scale(1);\n }\n}\n",""])},function(e,n,r){var t=r(12);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(1)),a=s(r(0));r(13);var i=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var n=e.network.toLowerCase();return o.default.createElement(i.default,t({styleClass:"rcs-sharebutton--rectangle rcs-"+n},e))};c.propTypes={network:a.default.string.isRequired,url:a.default.string.isRequired,children:a.default.node.isRequired,text:a.default.string},n.default=c},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,'.rcs-sharebutton--outline {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: none;\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n height: 44px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 3px;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 44px;\n}\n.rcs-sharebutton--outline > svg {\n fill: white;\n filter: url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur in="SourceAlpha" stdDeviation="2" /><feOffset dx="1" dy="1" result="offsetblur" /><feFlood flood-color="rgba(0,0,0,0.5)" /><feComposite in2="offsetblur" operator="in" /><feMerge><feMergeNode /><feMergeNode in="SourceGraphic" /></feMerge></filter></svg>#filter\');\n -webkit-filter: drop-shadow(0 0 2px rgba(0, 0, 0, .5));\n filter: drop-shadow(0 0 2px rgba(0, 0, 0, .5));\n height: 80%;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 80%;\n}\n.rcs-sharebutton--outline:hover > svg {\n fill: currentColor;\n}\n.rcs-sharebutton--outline.rcs-facebook {\n color: rgba(80, 124, 190, 1);\n}\n.rcs-sharebutton--outline.rcs-googleplus {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--outline.rcs-twitter {\n color: rgba(99, 205, 241, 1);\n}\n.rcs-sharebutton--outline.rcs-email {\n color: rgba(252, 201, 93, 1);\n}\n.rcs-sharebutton--outline.rcs-pinterest {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--outline.rcs-linkedin {\n color: rgba(144, 202, 221, 1);\n}\n@media (any-hover: none) {\n .rcs-sharebutton--outline:hover > svg {\n fill: white;\n\n /* filter: drop-shadow(0 0 1px currentColor); */\n }\n}\n@media screen and (min-width: 330px) {\n .rcs-sharebutton--outline {\n margin: 5px;\n }\n}\n@media screen and (min-width: 600px) {\n .rcs-sharebutton--outline {\n margin: 7px;\n }\n}\n@media screen and (min-width: 1025px) {\n .rcs-sharebutton--outline {\n margin: 10px;\n }\n}\n',""])},function(e,n,r){var t=r(15);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(1)),a=s(r(0));r(16);var i=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var n=e.network.toLowerCase();return o.default.createElement(i.default,t({styleClass:"rcs-sharebutton--outline rcs-"+n},e))};c.propTypes={network:a.default.string.isRequired,url:a.default.string.isRequired,children:a.default.node.isRequired,text:a.default.string},n.default=c},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,".rcs-sharebutton--icon-only {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: none;\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n height: 44px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 1px;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 44px;\n}\n.rcs-sharebutton--icon-only > svg {\n fill: currentColor;\n height: 65%;\n -webkit-transition: -webkit-transform 0.3s;\n transition: -webkit-transform 0.3s;\n transition: transform 0.3s;\n transition: transform 0.3s, -webkit-transform 0.3s;\n width: 65%;\n}\n.rcs-sharebutton--icon-only:hover {\n background: currentColor;\n -webkit-box-shadow: 0 0 10px currentColor;\n box-shadow: 0 0 10px currentColor;\n}\n.rcs-sharebutton--icon-only:hover > svg {\n fill: #fff;\n}\n.rcs-sharebutton--icon-only.rcs-facebook {\n color: rgba(80, 124, 190, 1);\n}\n.rcs-sharebutton--icon-only.rcs-googleplus {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--icon-only.rcs-twitter {\n color: rgba(99, 205, 241, 1);\n}\n.rcs-sharebutton--icon-only.rcs-email {\n color: rgba(252, 201, 93, 1);\n}\n.rcs-sharebutton--icon-only.rcs-pinterest {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--icon-only.rcs-linkedin {\n color: rgba(144, 202, 221, 1);\n}\n@media (any-hover: none) {\n .rcs-sharebutton--icon-only:hover {\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n\n .rcs-sharebutton--icon-only:hover > svg {\n fill: currentColor;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@media screen and (min-width: 330px) {\n .rcs-sharebutton--icon-only {\n margin: 3px;\n }\n}\n@media screen and (min-width: 600px) {\n .rcs-sharebutton--icon-only {\n margin: 5px;\n }\n}\n@media screen and (min-width: 1025px) {\n .rcs-sharebutton--icon-only {\n margin: 7px;\n }\n}\n",""])},function(e,n,r){var t=r(18);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(1)),a=s(r(0));r(19);var i=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var n=e.network.toLowerCase();return o.default.createElement(i.default,t({styleClass:"rcs-sharebutton--icon-only rcs-"+n},e))};c.propTypes={network:a.default.string.isRequired,url:a.default.string.isRequired,children:a.default.node.isRequired,text:a.default.string},n.default=c},function(e,n){e.exports=function(e){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=n.protocol+"//"+n.host,t=r+n.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,n){var o,a=n.trim().replace(/^"(.*)"$/,function(e,n){return n}).replace(/^'(.*)'$/,function(e,n){return n});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?r+a:t+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,n,r){(e.exports=r(3)(!1)).push([e.i,".rcs-sharebutton--circle {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: currentColor;\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n height: 44px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 3px;\n position: relative;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 44px;\n}\n.rcs-sharebutton--circle::before {\n background-color: rgba(255, 255, 255, .2);\n border-bottom-left-radius: 100px;\n border-top-left-radius: 100px;\n color: inherit;\n content: '';\n height: 100%;\n left: 50%;\n position: absolute;\n top: 50%;\n -webkit-transform: translate(-100%, -50%);\n transform: translate(-100%, -50%);\n -webkit-transition: 0.2s;\n transition: 0.2s;\n width: 50%;\n}\n.rcs-sharebutton--circle > svg {\n fill: #fff;\n height: 70%;\n -webkit-transform: scale(1);\n transform: scale(1);\n -webkit-transition: 0.3s;\n transition: 0.3s;\n width: 70%;\n z-index: 1;\n}\n.rcs-sharebutton--circle:hover::before {\n background-color: rgba(0, 0, 0, .1);\n -webkit-transform: translate(0%, -50%) rotateY(180deg);\n transform: translate(0%, -50%) rotateY(180deg);\n}\n.rcs-sharebutton--circle:hover > svg {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n.rcs-sharebutton--circle.rcs-facebook {\n color: rgba(80, 124, 190, 1);\n}\n.rcs-sharebutton--circle.rcs-googleplus {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--circle.rcs-twitter {\n color: rgba(99, 205, 241, 1);\n}\n.rcs-sharebutton--circle.rcs-email {\n color: rgba(252, 201, 93, 1);\n}\n.rcs-sharebutton--circle.rcs-pinterest {\n color: rgba(241, 98, 97, 1);\n}\n.rcs-sharebutton--circle.rcs-linkedin {\n color: rgba(144, 202, 221, 1);\n}\n@media (any-hover: none) {\n .rcs-sharebutton--circle:hover::before {\n background-color: rgba(255, 255, 255, .2);\n -webkit-transform: translate(-100%, -50%);\n transform: translate(-100%, -50%);\n }\n\n .rcs-sharebutton--circle:hover > svg {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@media screen and (min-width: 330px) {\n .rcs-sharebutton--circle {\n margin: 5px;\n }\n}\n@media screen and (min-width: 600px) {\n .rcs-sharebutton--circle {\n margin: 7px;\n }\n}\n@media screen and (min-width: 1025px) {\n .rcs-sharebutton--circle {\n margin: 10px;\n }\n}\n",""])},function(e,n,r){var t=r(22);"string"==typeof t&&(t=[[e.i,t,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(2)(t,o);t.locals&&(e.exports=t.locals)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},o=s(r(0)),a=s(r(1)),i=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}r(23);var c=function(e){var n=e.network.toLowerCase();return a.default.createElement(i.default,t({styleClass:"rcs-sharebutton--circle rcs-"+n},e))};c.propTypes={network:o.default.string.isRequired,url:o.default.string.isRequired,children:o.default.node.isRequired,text:o.default.string},n.default=c},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=Object.keys(e).filter(function(n){return!!e[n]});return n.length?"?"+n.map(function(n){return n+"="+encodeURIComponent(e[n])}).join("&"):""}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var o={facebook:function(e){var n=e.url,r=e.text,o=void 0===r?"":r,a=e.hashtag,i=void 0===a?"":a;return"https://www.facebook.com/sharer/sharer.php"+(0,t.default)({u:n,quote:o,hashtag:i})},twitter:function(e){var n=e.url,r=e.text,o=void 0===r?"":r,a=e.via,i=void 0===a?"":a,s=e.hashtags,c=void 0===s?[]:s;return"https://twitter.com/share"+(0,t.default)({url:n,text:o,via:i,hashtags:c.join(",")})},googleplus:function(e){var n=e.url;return"https://plus.google.com/share"+(0,t.default)({url:n})},linkedin:function(e){var n=e.url,r=e.text,o=void 0===r?"":r,a=e.longerText,i=void 0===a?"":a;return"https://linkedin.com/shareArticle"+(0,t.default)({url:n,title:o,summary:i})},pinterest:function(e){var n=e.media,r=e.text,o=void 0===r?"":r;return"https://pinterest.com/pin/create/button/"+(0,t.default)({media:n,description:o})}};n.default=function(e){var n=e.network,r=function(e,n){var r={};for(var t in e)n.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}(e,["network"]),t=r.url,a=r.media,i=n.toLowerCase();if(!i)throw new Error("the ShareButton's 'network' prop can't be undefined");if(!function(e){return!!o.hasOwnProperty(e)}(i))throw new Error("the '"+i+"' is not a valid value of a 'network' prop for ShareButton");if(!t)throw new Error("the ShareButton's 'url' prop can't be undefined");if("Pinterest"===n&&!a)throw new Error("the ShareButton's 'media' prop for the 'Pinterest' network can't be undefined");return o[i](r)}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:600,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400,t={height:r,width:n,left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-n/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-r/2,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"};return window.open(e,"share",Object.keys(t).map(function(e){return e+"="+t[e]}).join(","))}},function(e,n,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n,r){"use strict";var t=r(28);function o(){}e.exports=function(){function e(e,n,r,o,a,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return r.checkPropTypes=o,r.PropTypes=r,r}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(4);Object.defineProperty(n,"ShareButton",{enumerable:!0,get:function(){return f(t).default}});var o=r(5);Object.defineProperty(n,"ShareBlock",{enumerable:!0,get:function(){return f(o).default}});var a=r(24);Object.defineProperty(n,"ShareButtonCircle",{enumerable:!0,get:function(){return f(a).default}});var i=r(20);Object.defineProperty(n,"ShareButtonIconOnly",{enumerable:!0,get:function(){return f(i).default}});var s=r(17);Object.defineProperty(n,"ShareButtonOutline",{enumerable:!0,get:function(){return f(s).default}});var c=r(14);Object.defineProperty(n,"ShareButtonRectangle",{enumerable:!0,get:function(){return f(c).default}});var u=r(11);Object.defineProperty(n,"ShareButtonRoundSquare",{enumerable:!0,get:function(){return f(u).default}});var l=r(8);function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"ShareBlockStandard",{enumerable:!0,get:function(){return f(l).default}})}])}); | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _ShareButton = require('./ShareButton'); | ||
Object.defineProperty(exports, 'ShareButton', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButton).default; | ||
} | ||
}); | ||
var _ShareBlock = require('./ShareBlock'); | ||
Object.defineProperty(exports, 'ShareBlock', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareBlock).default; | ||
} | ||
}); | ||
var _ShareButtonCircle = require('./styles/ShareButtonCircle'); | ||
Object.defineProperty(exports, 'ShareButtonCircle', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButtonCircle).default; | ||
} | ||
}); | ||
var _ShareButtonIconOnly = require('./styles/ShareButtonIconOnly'); | ||
Object.defineProperty(exports, 'ShareButtonIconOnly', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButtonIconOnly).default; | ||
} | ||
}); | ||
var _ShareButtonOutline = require('./styles/ShareButtonOutline'); | ||
Object.defineProperty(exports, 'ShareButtonOutline', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButtonOutline).default; | ||
} | ||
}); | ||
var _ShareButtonRectangle = require('./styles/ShareButtonRectangle'); | ||
Object.defineProperty(exports, 'ShareButtonRectangle', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButtonRectangle).default; | ||
} | ||
}); | ||
var _ShareButtonRoundSquare = require('./styles/ShareButtonRoundSquare'); | ||
Object.defineProperty(exports, 'ShareButtonRoundSquare', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareButtonRoundSquare).default; | ||
} | ||
}); | ||
var _ShareBlockStandard = require('./styles/ShareBlockStandard'); | ||
Object.defineProperty(exports, 'ShareBlockStandard', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_ShareBlockStandard).default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
{ | ||
"name": "react-custom-share", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Social sharing buttons for React", | ||
@@ -9,4 +9,6 @@ "main": "dist/index.js", | ||
"start": "webpack --watch", | ||
"develop": "webpack-dev-server --mode development", | ||
"prebuild": "rimraf dist", | ||
"build": "webpack", | ||
"transpile": "babel src -d dist --ignore /__tests__/ --copy-files", | ||
"test": "jest --coverage", | ||
@@ -16,3 +18,3 @@ "test:watch": "jest --watch", | ||
"stylelint": "stylelint src/styles/css/*", | ||
"validate": "cross-env NO_UPDATE_NOTIFIER=true npm-run-all --parallel test lint stylelint build", | ||
"validate": "npm-run-all --parallel test lint stylelint transpile", | ||
"semantic-release": "semantic-release", | ||
@@ -47,9 +49,9 @@ "travis-deploy-once": "travis-deploy-once" | ||
"peerDependencies": { | ||
"prop-types": ">=15.0.1", | ||
"react": ">=16.0.1", | ||
"react-dom": ">=16.0.1" | ||
"prop-types": "^15.0.0", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^7.0.0", | ||
"@commitlint/config-conventional": "^7.0.1", | ||
"@commitlint/cli": "7.0.0", | ||
"@commitlint/config-conventional": "7.0.1", | ||
"babel-cli": "6.24.1", | ||
@@ -76,5 +78,6 @@ "babel-core": "6.24.1", | ||
"eslint-plugin-react": "7.1.0", | ||
"globals": "^11.7.0", | ||
"husky": "^1.0.0-rc.9", | ||
"jest": "^23.2.0", | ||
"globals": "11.7.0", | ||
"html-webpack-plugin": "3.2.0", | ||
"husky": "1.0.0-rc.9", | ||
"jest": "23.2.0", | ||
"npm-run-all": "4.1.3", | ||
@@ -86,9 +89,9 @@ "postcss": "6.0.23", | ||
"prettier": "1.13.7", | ||
"prop-types": ">=15.0.1", | ||
"react": ">=16.0.1", | ||
"react-dom": ">=16.0.1", | ||
"react-icons": "^2.2.7", | ||
"rimraf": "^2.6.2", | ||
"semantic-release": "^15.6.0", | ||
"simple-commit-message": "^4.0.3", | ||
"prop-types": "^15.0.0", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-icons": "2.2.7", | ||
"rimraf": "2.6.2", | ||
"semantic-release": "15.6.0", | ||
"simple-commit-message": "4.0.3", | ||
"style-loader": "0.21.0", | ||
@@ -98,5 +101,6 @@ "stylelint": "9.3.0", | ||
"stylelint-order": "0.8.1", | ||
"travis-deploy-once": "^5.0.1", | ||
"travis-deploy-once": "5.0.1", | ||
"webpack": "4.12.1", | ||
"webpack-cli": "3.0.8" | ||
"webpack-cli": "3.0.8", | ||
"webpack-dev-server": "3.1.4" | ||
}, | ||
@@ -103,0 +107,0 @@ "dependencies": {}, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
22
728
1
0
1
30438
48