react-social-icons
Advanced tools
Comparing version 3.1.0 to 4.0.0
@@ -1,5 +0,7 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
/* eslint-disable */ | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
@@ -16,4 +18,3 @@ /** | ||
}; | ||
exports.default = { | ||
var _default = { | ||
fivehundredpix: { | ||
@@ -211,2 +212,3 @@ icon: 'M42.9,27.6c-2.1,0-3.6,1-5.8,3.5c-1.9-2.5-3.8-3.5-5.8-3.5c-1.7,0-3.7,0.7-4.7,3.2 c-1-2-2.7-2.6-4.1-2.6c-1,0-2,0.2-2.9,1.1l0.6-3.3h6.2v-2.5h-8.4l-1.5,8v0.2h2.7c0.6-1,1.5-1.2,2.3-1.2c1.2,0,2.3,0.6,2.6,2.4v0.7 c-0.2,1.6-1.3,2.6-2.6,2.6c-1.1,0-2.3-0.6-2.4-2.2h-3v0.7c0,0.3,0.5,1.5,0.5,1.6c1.3,2.1,3.4,2.5,5,2.5c1.8,0,3.9-0.7,5.1-3.2 c1.1,2.4,3,3.1,4.8,3.1c2.1,0,3.5-0.9,5.7-3.3c1.9,2.3,3.7,3.3,5.7,3.3c3.4,0,5.1-2.6,5.1-5.6C48,30,46.2,27.6,42.9,27.6z M34.7,33.7c-0.4,0.4-1,0.9-1.4,1.1c-0.7,0.4-1.3,0.6-1.9,0.6c-0.6,0-1.7-0.4-2.1-1.3c-0.1-0.2-0.2-0.6-0.2-0.7v-0.9 c0.3-1.5,1.1-2.1,2.2-2.1c0.1,0,0.6,0,0.9,0.1c0.4,0.1,0.7,0.3,1.1,0.6c0.4,0.3,2,1.6,2,1.8C35.3,33.2,34.9,33.5,34.7,33.7z M42.9,35.5c-1.3,0-2.6-0.9-3.9-2.3c1.4-1.5,2.5-2.6,3.8-2.6c1.5,0,2.3,1.1,2.3,2.5C45.2,34.4,44.4,35.5,42.9,35.5z', | ||
} | ||
}; | ||
}; | ||
exports.default = _default; |
@@ -1,33 +0,35 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _styles = require("./styles.js"); | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var _react = require('react'); | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var _react2 = _interopRequireDefault(_react); | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
var _styles = require('./styles.js'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// eslint-disable-next-line no-unused-vars, react/prop-types | ||
function Background(_ref) { | ||
var networkKey = _ref.networkKey, | ||
props = (0, _objectWithoutProperties3.default)(_ref, ['networkKey']); | ||
props = _objectWithoutProperties(_ref, ["networkKey"]); | ||
return _react2.default.createElement( | ||
'g', | ||
(0, _extends3.default)({}, props, { className: 'social-svg-background', style: _styles.socialSvgContent }), | ||
_react2.default.createElement('circle', { cx: '32', cy: '32', r: '31' }) | ||
); | ||
return _react.default.createElement("g", _extends({}, props, { | ||
className: "social-svg-background", | ||
style: _styles.socialSvgContent | ||
}), _react.default.createElement("circle", { | ||
cx: "32", | ||
cy: "32", | ||
r: "31" | ||
})); | ||
} | ||
exports.default = Background; | ||
var _default = Background; | ||
exports.default = _default; |
@@ -1,34 +0,56 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
var _networks = require("./networks.js"); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _styles = require("./styles.js"); | ||
var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _react2 = _interopRequireDefault(_react); | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var _networks = require('./networks'); | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var _styles = require('./styles.js'); | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function Icon(_ref) { | ||
var networkKey = _ref.networkKey, | ||
props = (0, _objectWithoutProperties3.default)(_ref, ['networkKey']); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
return _react2.default.createElement( | ||
'g', | ||
(0, _extends3.default)({}, props, { className: 'social-svg-icon', style: _styles.socialSvgContent }), | ||
_react2.default.createElement('path', { d: (0, _networks.iconFor)(networkKey) }) | ||
); | ||
function getStyle(_ref) { | ||
var fgColor = _ref.fgColor, | ||
networkKey = _ref.networkKey; | ||
return _objectSpread({}, _styles.socialSvgContent, { | ||
fill: fgColor || 'transparent' | ||
}); | ||
} | ||
exports.default = Icon; | ||
function Icon(_ref2) { | ||
var fgColor = _ref2.fgColor, | ||
networkKey = _ref2.networkKey, | ||
props = _objectWithoutProperties(_ref2, ["fgColor", "networkKey"]); | ||
return _react.default.createElement("g", _extends({}, props, { | ||
className: "social-svg-icon", | ||
style: getStyle({ | ||
fgColor: fgColor | ||
}) | ||
}), _react.default.createElement("path", { | ||
d: (0, _networks.iconFor)(networkKey) | ||
})); | ||
} | ||
Icon.propTypes = { | ||
fgColor: _propTypes.default.string, | ||
networkKey: _propTypes.default.string.isRequired | ||
}; | ||
var _default = Icon; | ||
exports.default = _default; |
@@ -1,29 +0,33 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _networks = require("./networks.js"); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _styles = require("./styles.js"); | ||
var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _react2 = _interopRequireDefault(_react); | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var _networks = require('./networks'); | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var _styles = require('./styles.js'); | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function getStyle(_ref) { | ||
var color = _ref.color, | ||
var bgColor = _ref.bgColor, | ||
networkKey = _ref.networkKey; | ||
return (0, _extends3.default)({}, _styles.socialSvgMask, { | ||
fill: color || (0, _networks.colorFor)(networkKey) | ||
return _objectSpread({}, _styles.socialSvgMask, { | ||
fill: bgColor || (0, _networks.colorFor)(networkKey) | ||
}); | ||
@@ -33,13 +37,22 @@ } | ||
function Mask(_ref2) { | ||
var color = _ref2.color, | ||
var bgColor = _ref2.bgColor, | ||
networkKey = _ref2.networkKey, | ||
rest = (0, _objectWithoutProperties3.default)(_ref2, ['color', 'networkKey']); | ||
rest = _objectWithoutProperties(_ref2, ["bgColor", "networkKey"]); | ||
return _react2.default.createElement( | ||
'g', | ||
(0, _extends3.default)({}, rest, { className: 'social-svg-mask', style: getStyle({ color: color, networkKey: networkKey }) }), | ||
_react2.default.createElement('path', { d: (0, _networks.maskFor)(networkKey) }) | ||
); | ||
return _react.default.createElement("g", _extends({}, rest, { | ||
className: "social-svg-mask", | ||
style: getStyle({ | ||
bgColor: bgColor, | ||
networkKey: networkKey | ||
}) | ||
}), _react.default.createElement("path", { | ||
d: (0, _networks.maskFor)(networkKey) | ||
})); | ||
} | ||
exports.default = Mask; | ||
Mask.propTypes = { | ||
bgColor: _propTypes.default.string, | ||
networkKey: _propTypes.default.string.isRequired | ||
}; | ||
var _default = Mask; | ||
exports.default = _default; |
@@ -1,5 +0,6 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.KEYS = undefined; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.iconFor = iconFor; | ||
@@ -10,23 +11,23 @@ exports.maskFor = maskFor; | ||
exports.keysFor = keysFor; | ||
exports.KEYS = void 0; | ||
var _networksDb = require('./_networks-db'); | ||
var _networksDb = _interopRequireDefault(require("./_networks-db.js")); | ||
var _networksDb2 = _interopRequireDefault(_networksDb); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var DEFAULT_KEY = 'sharethis'; | ||
var KEYS = exports.KEYS = Object.keys(_networksDb2.default); | ||
var KEYS = Object.keys(_networksDb.default); | ||
exports.KEYS = KEYS; | ||
var KEYS_REGEX = new RegExp('(?:https?:\\/\\/(?:[a-z0-9]*.)?)?(' + KEYS.join('|') + ').*'); | ||
function iconFor(key) { | ||
return _networksDb2.default[key] ? _networksDb2.default[key].icon : null; | ||
return _networksDb.default[key] ? _networksDb.default[key].icon : null; | ||
} | ||
function maskFor(key) { | ||
return _networksDb2.default[key] ? _networksDb2.default[key].mask : null; | ||
return _networksDb.default[key] ? _networksDb.default[key].mask : null; | ||
} | ||
function colorFor(key) { | ||
return _networksDb2.default[key] ? _networksDb2.default[key].color : null; | ||
return _networksDb.default[key] ? _networksDb.default[key].color : null; | ||
} | ||
@@ -33,0 +34,0 @@ |
@@ -1,12 +0,13 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.SocialIcon = undefined; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.SocialIcon = void 0; | ||
var _socialIcon = require('./social-icon'); | ||
var _socialIcon = _interopRequireDefault(require("./social-icon.js")); | ||
var _socialIcon2 = _interopRequireDefault(_socialIcon); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.SocialIcon = _socialIcon2.default; | ||
var SocialIcon = _socialIcon.default; | ||
exports.SocialIcon = SocialIcon; |
@@ -1,39 +0,36 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _background = _interopRequireDefault(require("./background.js")); | ||
var _react = require('react'); | ||
var _icon = _interopRequireDefault(require("./icon.js")); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _mask = _interopRequireDefault(require("./mask.js")); | ||
var _classnames = require('classnames'); | ||
var _networks = require("./networks.js"); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _styles = require("./styles.js"); | ||
var _background = require('./background'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _background2 = _interopRequireDefault(_background); | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var _icon = require('./icon'); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
var _icon2 = _interopRequireDefault(_icon); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var _mask = require('./mask'); | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var _mask2 = _interopRequireDefault(_mask); | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
var _networks = require('./networks'); | ||
var _styles = require('./styles'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function getNetworkKey(props) { | ||
@@ -46,32 +43,43 @@ return props.network || (0, _networks.keyFor)(props.url); | ||
network = props.network, | ||
color = props.color, | ||
bgColor = props.bgColor, | ||
fgColor = props.fgColor, | ||
className = props.className, | ||
label = props.label, | ||
rest = (0, _objectWithoutProperties3.default)(props, ['url', 'network', 'color', 'className', 'label']); | ||
rest = _objectWithoutProperties(props, ["url", "network", "bgColor", "fgColor", "className", "label"]); | ||
var networkKey = getNetworkKey({ url: url, network: network }); | ||
return _react2.default.createElement( | ||
'a', | ||
(0, _extends3.default)({}, rest, { | ||
href: url, | ||
target: '_blank', | ||
rel: 'noopener', | ||
className: (0, _classnames2.default)('social-icon', className), | ||
style: (0, _extends3.default)({}, _styles.socialIcon, props.style), | ||
'aria-label': label || networkKey }), | ||
_react2.default.createElement( | ||
'div', | ||
{ className: 'social-container', style: _styles.socialContainer }, | ||
_react2.default.createElement( | ||
'svg', | ||
{ className: 'social-svg', style: _styles.socialSvg, viewBox: '0 0 64 64' }, | ||
_react2.default.createElement(_background2.default, null), | ||
_react2.default.createElement(_icon2.default, { networkKey: networkKey }), | ||
_react2.default.createElement(_mask2.default, { networkKey: networkKey, color: color }) | ||
) | ||
) | ||
); | ||
var networkKey = getNetworkKey({ | ||
url: url, | ||
network: network | ||
}); | ||
return _react.default.createElement("a", _extends({}, rest, { | ||
href: url, | ||
target: "_blank", | ||
rel: "noopener", | ||
className: (0, _classnames.default)('social-icon', className), | ||
style: _objectSpread({}, _styles.socialIcon, props.style), | ||
"aria-label": label || networkKey | ||
}), _react.default.createElement("div", { | ||
className: "social-container", | ||
style: _styles.socialContainer | ||
}, _react.default.createElement("svg", { | ||
className: "social-svg", | ||
style: _styles.socialSvg, | ||
viewBox: "0 0 64 64" | ||
}, _react.default.createElement(_background.default, null), _react.default.createElement(_icon.default, { | ||
networkKey: networkKey, | ||
fgColor: fgColor | ||
}), _react.default.createElement(_mask.default, { | ||
networkKey: networkKey, | ||
bgColor: bgColor | ||
})))); | ||
} | ||
exports.default = SocialIcon; | ||
SocialIcon.propTypes = { | ||
className: _propTypes.default.string, | ||
bgColor: _propTypes.default.string, | ||
label: _propTypes.default.string, | ||
network: _propTypes.default.string, | ||
url: _propTypes.default.string | ||
}; | ||
var _default = SocialIcon; | ||
exports.default = _default; |
@@ -1,13 +0,13 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.socialSvgMask = exports.socialSvgContent = exports.socialSvg = exports.socialContainer = exports.socialIcon = undefined; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.socialSvgMask = exports.socialSvgContent = exports.socialSvg = exports.socialContainer = exports.socialIcon = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var socialIcon = exports.socialIcon = { | ||
var socialIcon = { | ||
display: 'inline-block', | ||
@@ -20,4 +20,4 @@ width: '50px', | ||
}; | ||
var socialContainer = exports.socialContainer = { | ||
exports.socialIcon = socialIcon; | ||
var socialContainer = { | ||
position: 'absolute', | ||
@@ -29,4 +29,4 @@ top: 0, | ||
}; | ||
var socialSvg = exports.socialSvg = { | ||
exports.socialContainer = socialContainer; | ||
var socialSvg = { | ||
borderRadius: '50%', | ||
@@ -40,4 +40,4 @@ position: 'absolute', | ||
}; | ||
var socialSvgContent = exports.socialSvgContent = { | ||
exports.socialSvg = socialSvg; | ||
var socialSvgContent = { | ||
msTransition: 'fill 170ms ease-in-out', | ||
@@ -50,5 +50,8 @@ OTransition: 'fill 170ms ease-in-out', | ||
}; | ||
exports.socialSvgContent = socialSvgContent; | ||
var socialSvgMask = exports.socialSvgMask = (0, _extends3.default)({}, socialSvgContent, { | ||
var socialSvgMask = _objectSpread({}, socialSvgContent, { | ||
fill: '#0f0b0b' | ||
}); | ||
}); | ||
exports.socialSvgMask = socialSvgMask; |
@@ -1,23 +0,25 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _react = require('react'); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _networks = require("./networks.js"); | ||
var _networks = require('./networks'); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function renderBackgroundSymbol() { | ||
return _react2.default.createElement( | ||
'symbol', | ||
{ id: 'background', viewBox: '0 0 64 64' }, | ||
_react2.default.createElement( | ||
'g', | ||
{ className: 'social-background' }, | ||
_react2.default.createElement('circle', { cx: '32', cy: '32', r: '31' }) | ||
) | ||
); | ||
return _react.default.createElement("symbol", { | ||
id: "background", | ||
viewBox: "0 0 64 64" | ||
}, _react.default.createElement("g", { | ||
className: "social-background" | ||
}, _react.default.createElement("circle", { | ||
cx: "32", | ||
cy: "32", | ||
r: "31" | ||
}))); | ||
} | ||
@@ -27,19 +29,17 @@ | ||
return props.networks.map(function (key) { | ||
return [_react2.default.createElement( | ||
'symbol', | ||
{ id: key + '-icon', viewBox: '0 0 64 64' }, | ||
_react2.default.createElement( | ||
'g', | ||
{ className: 'social-icon' }, | ||
_react2.default.createElement('path', { d: (0, _networks.iconFor)(key) }) | ||
) | ||
), _react2.default.createElement( | ||
'symbol', | ||
{ id: key + '-mask', viewBox: '0 0 64 64' }, | ||
_react2.default.createElement( | ||
'g', | ||
{ className: 'social-mask' }, | ||
_react2.default.createElement('path', { d: (0, _networks.maskFor)(key) }) | ||
) | ||
)]; | ||
return [_react.default.createElement("symbol", { | ||
id: "".concat(key, "-icon"), | ||
viewBox: "0 0 64 64" | ||
}, _react.default.createElement("g", { | ||
className: "social-icon" | ||
}, _react.default.createElement("path", { | ||
d: (0, _networks.iconFor)(key) | ||
}))), _react.default.createElement("symbol", { | ||
id: "".concat(key, "-mask"), | ||
viewBox: "0 0 64 64" | ||
}, _react.default.createElement("g", { | ||
className: "social-mask" | ||
}, _react.default.createElement("path", { | ||
d: (0, _networks.maskFor)(key) | ||
})))]; | ||
}); | ||
@@ -49,10 +49,13 @@ } | ||
function Symbols(props) { | ||
return _react2.default.createElement( | ||
'svg', | ||
{ xmlns: 'http://www.w3.org/2000/svg', id: 'social-symbols', version: '1.1' }, | ||
renderBackgroundSymbol(), | ||
renderSymbols(props) | ||
); | ||
return _react.default.createElement("svg", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
id: "social-symbols", | ||
version: "1.1" | ||
}, renderBackgroundSymbol(), renderSymbols(props)); | ||
} | ||
exports.default = Symbols; | ||
Symbols.propTypes = { | ||
networks: _react.PropTypes.arrayOf(_react.PropTypes.string).isRequired | ||
}; | ||
var _default = Symbols; | ||
exports.default = _default; |
{ | ||
"name": "react-social-icons", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"description": "beautiful, easy svg social icons in react", | ||
"main": "./lib/react-social-icons.js", | ||
"main": "./dist/react-social-icons.js", | ||
"scripts": { | ||
"start": "./scripts/dev-examples.sh", | ||
"test": "karma start", | ||
"test-dev": "karma start --auto-watch --no-single-run", | ||
"build": "babel -d ./dist ./src", | ||
"build:watch": "npm run build -- --watch", | ||
"examples:serve": "parcel examples/index.html", | ||
"prepublish": "NODE_ENV=production babel -d ./lib ./src", | ||
"publish": "./scripts/release.sh" | ||
"start": "npm run examples:serve", | ||
"test": "mocha", | ||
"test:watch": "npm run test -- --watch" | ||
}, | ||
@@ -23,40 +25,19 @@ "author": "jaketrent", | ||
"devDependencies": { | ||
"babel-cli": "^6.11.4", | ||
"babel-eslint": "^6.1.2", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-transform-runtime": "^6.12.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-react": "^6.11.1", | ||
"babel-preset-react-optimize": "^1.0.1", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"chai": "^3.5.0", | ||
"enzyme": "^2.4.1", | ||
"eslint": "^3.1.1", | ||
"eslint-config-airbnb": "^9.0.1", | ||
"eslint-plugin-import": "^1.12.0", | ||
"eslint-plugin-jsx-a11y": "^2.0.1", | ||
"eslint-plugin-react": "^5.2.2", | ||
"json": "^9.0.4", | ||
"json-loader": "^0.5.4", | ||
"karma": "^1.1.2", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-cli": "^1.0.1", | ||
"karma-mocha": "^1.1.1", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^1.7.0", | ||
"lodash": "^4.14.0", | ||
"mocha": "^2.5.3", | ||
"react": "^16.2.0", | ||
"react-addons-test-utils": "^15.2.1", | ||
"react-dom": "^16.2.0", | ||
"should": "^10.0.0", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-middleware": "^1.0.11", | ||
"webpack-dev-server": "^1.7.0" | ||
"@babel/cli": "^7.2.3", | ||
"@babel/preset-env": "^7.2.3", | ||
"@babel/preset-react": "^7.0.0", | ||
"enzyme": "^3.8.0", | ||
"enzyme-adapter-react-16": "^1.7.1", | ||
"mocha": "^5.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"parcel-bundler": "^1.11.0", | ||
"react-dom": "^16.7.0", | ||
"should": "^13.2.3" | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "^6.11.6", | ||
"classnames": "^2.2.5" | ||
"@babel/core": "^7.2.2", | ||
"@babel/register": "^7.0.0", | ||
"classnames": "^2.2.5", | ||
"prop-types": "^15.6.2", | ||
"react": "^16.7.0" | ||
}, | ||
@@ -63,0 +44,0 @@ "peerDependencies": { |
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
73203
10
14
688
6
+ Added@babel/core@^7.2.2
+ Added@babel/register@^7.0.0
+ Addedprop-types@^15.6.2
+ Addedreact@^16.7.0
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.3(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/register@7.25.9(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.4(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbrowserslist@4.24.3(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcaniuse-lite@1.0.30001688(transitive)
+ Addedclone-deep@4.0.1(transitive)
+ Addedcommondir@1.0.1(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedelectron-to-chromium@1.5.73(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedfind-cache-dir@2.1.0(transitive)
+ Addedfind-up@3.0.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedjsesc@3.1.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedkind-of@6.0.3(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedpirates@4.0.6(transitive)
+ Addedpkg-dir@3.0.0(transitive)
+ Addedsemver@5.7.26.3.1(transitive)
+ Addedshallow-clone@3.0.1(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedbabel-runtime@^6.11.6
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.11.1(transitive)