Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zendeskgarden/react-avatars

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zendeskgarden/react-avatars - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

66

dist/index.js

@@ -95,12 +95,12 @@ /*!

/* 0 */
/***/ (function(module, exports, __webpack_require__) {
/***/ (function(module, exports) {
// extracted by mini-css-extract-plugin
module.exports = {"c-avatar":"index__c-avatar___3aVjT","c-avatar__img":"index__c-avatar__img___I6W1R","c-avatar__txt":"index__c-avatar__txt___2Ha1o","c-avatar__svg":"index__c-avatar__svg___2a5Ep","c-avatar--lg":"index__c-avatar--lg___2qa8G","c-avatar--sm":"index__c-avatar--sm___3JmRS","c-avatar--xs":"index__c-avatar--xs___29izH","is-active":"index__is-active___26XAP","is-available":"index__is-available___-g8NJ","is-away":"index__is-away___1ZY1P","c-avatar--system":"index__c-avatar--system___11Vhj","c-avatar__badge":"index__c-avatar__badge___3Wm8i","zd-avatar--active__badge":"index__zd-avatar--active__badge___1lgTM","is-rtl":"index__is-rtl___3yJMN"};
module.exports = require("prop-types");
/***/ }),
/* 1 */
/***/ (function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
module.exports = require("prop-types");
// extracted by mini-css-extract-plugin
module.exports = {"c-avatar":"index__c-avatar___3aVjT","c-avatar__img":"index__c-avatar__img___I6W1R","c-avatar__txt":"index__c-avatar__txt___2Ha1o","c-avatar__svg":"index__c-avatar__svg___2a5Ep","c-avatar--lg":"index__c-avatar--lg___2qa8G","c-avatar--sm":"index__c-avatar--sm___3JmRS","c-avatar--xs":"index__c-avatar--xs___29izH","is-active":"index__is-active___26XAP","is-available":"index__is-available___-g8NJ","is-away":"index__is-away___1ZY1P","c-avatar--system":"index__c-avatar--system___11Vhj","zd-avatar--active__badge":"index__zd-avatar--active__badge___1lgTM","is-rtl":"index__is-rtl___3yJMN"};

@@ -111,3 +111,3 @@ /***/ }),

module.exports = require("react");
module.exports = require("@zendeskgarden/react-theming");

@@ -118,3 +118,3 @@ /***/ }),

module.exports = require("@zendeskgarden/react-theming");
module.exports = require("styled-components");

@@ -125,3 +125,3 @@ /***/ }),

module.exports = require("styled-components");
module.exports = require("react");

@@ -142,11 +142,11 @@ /***/ }),

// EXTERNAL MODULE: external "react"
var external_react_ = __webpack_require__(2);
var external_react_ = __webpack_require__(4);
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
// EXTERNAL MODULE: external "prop-types"
var external_prop_types_ = __webpack_require__(1);
var external_prop_types_ = __webpack_require__(0);
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
// EXTERNAL MODULE: external "styled-components"
var external_styled_components_ = __webpack_require__(4);
var external_styled_components_ = __webpack_require__(3);
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);

@@ -159,6 +159,6 @@

// EXTERNAL MODULE: external "@zendeskgarden/react-theming"
var react_theming_ = __webpack_require__(3);
var react_theming_ = __webpack_require__(2);
// EXTERNAL MODULE: ./node_modules/@zendeskgarden/css-avatars/dist/index.css
var dist = __webpack_require__(0);
var dist = __webpack_require__(1);
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);

@@ -200,3 +200,3 @@

'data-garden-id': AVATARS_COMPONENT_ID,
'data-garden-version': "6.0.1",
'data-garden-version': "6.0.2",
className: external_classnames_default()(dist_default.a['c-avatar'], (_classNames = {}, _defineProperty(_classNames, dist_default.a['c-avatar--system'], props.isSystem), _defineProperty(_classNames, dist_default.a['c-avatar--xs'], props.size === SIZE.EXTRASMALL), _defineProperty(_classNames, dist_default.a['c-avatar--sm'], props.size === SIZE.SMALL), _defineProperty(_classNames, dist_default.a['c-avatar--lg'], props.size === SIZE.LARGE), _defineProperty(_classNames, dist_default.a['is-available'], props.status === STATUS.AVAILABLE), _defineProperty(_classNames, dist_default.a['is-active'], props.status === STATUS.ACTIVE), _defineProperty(_classNames, dist_default.a['is-away'], props.status === STATUS.AWAY), _defineProperty(_classNames, dist_default.a['is-rtl'], Object(react_theming_["isRtl"])(props)), _classNames))

@@ -216,17 +216,2 @@ };

};
var BADGE_COMPONENT_ID = 'avatars.badge';
/**
* Accepts all `<figcaption>` attributes
*/
var StyledBadge = external_styled_components_default.a.figcaption.attrs({
'data-garden-id': BADGE_COMPONENT_ID,
'data-garden-version': "6.0.1",
className: dist_default.a['c-avatar__badge']
}).withConfig({
displayName: "styled__StyledBadge",
componentId: "sqcyr7-1"
})(["", ";"], function (props) {
return Object(react_theming_["retrieveTheme"])(BADGE_COMPONENT_ID, props);
});
var TEXT_COMPONENT_ID = 'avatars.text';

@@ -239,7 +224,7 @@ /**

'data-garden-id': TEXT_COMPONENT_ID,
'data-garden-version': "6.0.1",
'data-garden-version': "6.0.2",
className: dist_default.a['c-avatar__txt']
}).withConfig({
displayName: "styled__StyledText",
componentId: "sqcyr7-2"
componentId: "sqcyr7-1"
})(["", ";"], function (props) {

@@ -288,18 +273,6 @@ return Object(react_theming_["retrieveTheme"])(TEXT_COMPONENT_ID, props);

if (status === Avatar_STATUS.AVAILABLE && badge !== undefined) {
if (status === Avatar_STATUS.AVAILABLE && badge) {
computedStatus = Avatar_STATUS.ACTIVE;
}
var FormattedBadge = function FormattedBadge() {
if (status === undefined || status === Avatar_STATUS.AWAY) {
return null;
}
if (computedStatus === Avatar_STATUS.AVAILABLE) {
return external_react_default.a.createElement(StyledBadge, null);
}
return external_react_default.a.createElement(StyledBadge, null, badge);
};
return external_react_default.a.createElement(StyledAvatar, _extends({

@@ -309,4 +282,5 @@ isSystem: isSystem,

status: computedStatus,
"data-badge": badge,
"aria-live": "polite"
}, other), children, external_react_default.a.createElement(FormattedBadge, null));
}, other), children);
};

@@ -317,3 +291,3 @@

isSystem: external_prop_types_default.a.bool,
badge: external_prop_types_default.a.node,
badge: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
size: external_prop_types_default.a.oneOf([Avatar_SIZE.EXTRASMALL, Avatar_SIZE.SMALL, Avatar_SIZE.LARGE]),

@@ -320,0 +294,0 @@ status: external_prop_types_default.a.oneOf([Avatar_STATUS.AVAILABLE, Avatar_STATUS.AWAY]),

@@ -7,3 +7,3 @@ /*!

*/
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("prop-types"),require("react"),require("@zendeskgarden/react-theming"),require("styled-components")):"function"==typeof define&&define.amd?define(["prop-types","react","@zendeskgarden/react-theming","styled-components"],a):"object"==typeof exports?exports.GardenAvatars=a(require("prop-types"),require("react"),require("@zendeskgarden/react-theming"),require("styled-components")):e.GardenAvatars=a(e.PropTypes,e.React,e.GardenTheming,e.styled)}(window,function(t,r,n,i){return c={},s.m=o=[function(e,a,t){e.exports={"c-avatar":"index__c-avatar___3aVjT","c-avatar__img":"index__c-avatar__img___I6W1R","c-avatar__txt":"index__c-avatar__txt___2Ha1o","c-avatar__svg":"index__c-avatar__svg___2a5Ep","c-avatar--lg":"index__c-avatar--lg___2qa8G","c-avatar--sm":"index__c-avatar--sm___3JmRS","c-avatar--xs":"index__c-avatar--xs___29izH","is-active":"index__is-active___26XAP","is-available":"index__is-available___-g8NJ","is-away":"index__is-away___1ZY1P","c-avatar--system":"index__c-avatar--system___11Vhj","c-avatar__badge":"index__c-avatar__badge___3Wm8i","zd-avatar--active__badge":"index__zd-avatar--active__badge___1lgTM","is-rtl":"index__is-rtl___3yJMN"}},function(e,a){e.exports=t},function(e,a){e.exports=r},function(e,a){e.exports=n},function(e,a){e.exports=i},function(e,a,t){var r;
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("@zendeskgarden/react-theming"),require("styled-components"),require("react")):"function"==typeof define&&define.amd?define(["prop-types","@zendeskgarden/react-theming","styled-components","react"],t):"object"==typeof exports?exports.GardenAvatars=t(require("prop-types"),require("@zendeskgarden/react-theming"),require("styled-components"),require("react")):e.GardenAvatars=t(e.PropTypes,e.GardenTheming,e.styled,e.React)}(window,function(a,r,n,i){return c={},s.m=o=[function(e,t){e.exports=a},function(e,t,a){e.exports={"c-avatar":"index__c-avatar___3aVjT","c-avatar__img":"index__c-avatar__img___I6W1R","c-avatar__txt":"index__c-avatar__txt___2Ha1o","c-avatar__svg":"index__c-avatar__svg___2a5Ep","c-avatar--lg":"index__c-avatar--lg___2qa8G","c-avatar--sm":"index__c-avatar--sm___3JmRS","c-avatar--xs":"index__c-avatar--xs___29izH","is-active":"index__is-active___26XAP","is-available":"index__is-available___-g8NJ","is-away":"index__is-away___1ZY1P","c-avatar--system":"index__c-avatar--system___11Vhj","zd-avatar--active__badge":"index__zd-avatar--active__badge___1lgTM","is-rtl":"index__is-rtl___3yJMN"}},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,a){var r;
/*!

@@ -19,3 +19,3 @@ Copyright (c) 2017 Jed Watson.

*/
!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var e=[],a=0;a<arguments.length;a++){var t=arguments[a];if(t){var r=typeof t;if("string"==r||"number"==r)e.push(t);else if(Array.isArray(t)&&t.length){var n=o.apply(null,t);n&&e.push(n)}else if("object"==r)for(var i in t)s.call(t,i)&&t[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(a,[]))||(e.exports=r)}()},function(e,a,t){"use strict";t.r(a);var r=t(2),c=t.n(r),n=t(1),i=t.n(n),s=t(4),o=t.n(s),l=t(5),u=t.n(l),_=t(3),d=t(0),v=t.n(d);function f(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var p="avatars.avatar",y="extrasmall",m="small",g="large",b="available",x="active",O="away",h=o.a.figure.attrs(function(e){var a;return{"data-garden-id":p,"data-garden-version":"6.0.1",className:u()(v.a["c-avatar"],(a={},f(a,v.a["c-avatar--system"],e.isSystem),f(a,v.a["c-avatar--xs"],e.size===y),f(a,v.a["c-avatar--sm"],e.size===m),f(a,v.a["c-avatar--lg"],e.size===g),f(a,v.a["is-available"],e.status===b),f(a,v.a["is-active"],e.status===x),f(a,v.a["is-away"],e.status===O),f(a,v.a["is-rtl"],Object(_.isRtl)(e)),a))}}).withConfig({displayName:"styled__StyledAvatar",componentId:"sqcyr7-0"})(["",";"],function(e){return Object(_.retrieveTheme)(p,e)});h.propTypes={isSystem:i.a.bool,size:i.a.oneOf([y,m,g]),status:i.a.oneOf([b,x,O])};var j="avatars.badge",S=o.a.figcaption.attrs({"data-garden-id":j,"data-garden-version":"6.0.1",className:v.a["c-avatar__badge"]}).withConfig({displayName:"styled__StyledBadge",componentId:"sqcyr7-1"})(["",";"],function(e){return Object(_.retrieveTheme)(j,e)}),w="avatars.text",z=o.a.span.attrs({"data-garden-id":w,"data-garden-version":"6.0.1",className:v.a["c-avatar__txt"]}).withConfig({displayName:"styled__StyledText",componentId:"sqcyr7-2"})(["",";"],function(e){return Object(_.retrieveTheme)(w,e)});function P(){return(P=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function T(e,a){if(null==e)return{};var t,r,n=function(e,a){if(null==e)return{};var t,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],0<=a.indexOf(t)||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],0<=a.indexOf(t)||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function q(e){var a=e.isSystem,t=e.size,r=e.status,n=e.children,i=e.badge,s=T(e,["isSystem","size","status","children","badge"]),o=r;return r===M&&void 0!==i&&(o=I),c.a.createElement(h,P({isSystem:a,size:t,status:o,"aria-live":"polite"},s),n,c.a.createElement(function(){return void 0===r||r===k?null:o===M?c.a.createElement(S,null):c.a.createElement(S,null,i)},null))}var N="extrasmall",A="small",E="large",M="available",I="active",k="away";q.propTypes={isSystem:i.a.bool,badge:i.a.node,size:i.a.oneOf([N,A,E]),status:i.a.oneOf([M,k]),children:i.a.node};var G=q,R=z;t.d(a,"Avatar",function(){return G}),t.d(a,"Text",function(){return R})}],s.c=c,s.d=function(e,a,t){s.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:t})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(a,e){if(1&e&&(a=s(a)),8&e)return a;if(4&e&&"object"==typeof a&&a&&a.__esModule)return a;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:a}),2&e&&"string"!=typeof a)for(var r in a)s.d(t,r,function(e){return a[e]}.bind(null,r));return t},s.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(a,"a",a),a},s.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},s.p="",s(s.s=6);function s(e){if(c[e])return c[e].exports;var a=c[e]={i:e,l:!1,exports:{}};return o[e].call(a.exports,a,a.exports,s),a.l=!0,a.exports}var o,c});
!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var r=typeof a;if("string"==r||"number"==r)e.push(a);else if(Array.isArray(a)&&a.length){var n=o.apply(null,a);n&&e.push(n)}else if("object"==r)for(var i in a)s.call(a,i)&&a[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,a){"use strict";a.r(t);var r=a(4),c=a.n(r),n=a(0),i=a.n(n),s=a(3),o=a.n(s),u=a(5),l=a.n(u),_=a(2),d=a(1),f=a.n(d);function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var v="avatars.avatar",y="extrasmall",m="small",b="large",g="available",x="active",O="away",h=o.a.figure.attrs(function(e){var t;return{"data-garden-id":v,"data-garden-version":"6.0.2",className:l()(f.a["c-avatar"],(t={},p(t,f.a["c-avatar--system"],e.isSystem),p(t,f.a["c-avatar--xs"],e.size===y),p(t,f.a["c-avatar--sm"],e.size===m),p(t,f.a["c-avatar--lg"],e.size===b),p(t,f.a["is-available"],e.status===g),p(t,f.a["is-active"],e.status===x),p(t,f.a["is-away"],e.status===O),p(t,f.a["is-rtl"],Object(_.isRtl)(e)),t))}}).withConfig({displayName:"styled__StyledAvatar",componentId:"sqcyr7-0"})(["",";"],function(e){return Object(_.retrieveTheme)(v,e)});h.propTypes={isSystem:i.a.bool,size:i.a.oneOf([y,m,b]),status:i.a.oneOf([g,x,O])};var j="avatars.text",S=o.a.span.attrs({"data-garden-id":j,"data-garden-version":"6.0.2",className:f.a["c-avatar__txt"]}).withConfig({displayName:"styled__StyledText",componentId:"sqcyr7-1"})(["",";"],function(e){return Object(_.retrieveTheme)(j,e)});function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function z(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],0<=t.indexOf(a)||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],0<=t.indexOf(a)||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function P(e){var t=e.isSystem,a=e.size,r=e.status,n=e.children,i=e.badge,s=z(e,["isSystem","size","status","children","badge"]),o=r;return r===M&&i&&(o=N),c.a.createElement(h,w({isSystem:t,size:a,status:o,"data-badge":i,"aria-live":"polite"},s),n)}var T="extrasmall",q="small",A="large",M="available",N="active",k="away";P.propTypes={isSystem:i.a.bool,badge:i.a.oneOfType([i.a.string,i.a.number]),size:i.a.oneOf([T,q,A]),status:i.a.oneOf([M,k]),children:i.a.node};var G=P,I=S;a.d(t,"Avatar",function(){return G}),a.d(t,"Text",function(){return I})}],s.c=c,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(a,r,function(e){return t[e]}.bind(null,r));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=6);function s(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}var o,c});
//# sourceMappingURL=bundle.min.js.map

@@ -11,3 +11,3 @@ {

},
"version": "6.0.1",
"version": "6.0.2",
"main": "./dist/index.js",

@@ -33,3 +33,3 @@ "files": [

"devDependencies": {
"@zendeskgarden/css-avatars": "5.0.0",
"@zendeskgarden/css-avatars": "6.0.0",
"@zendeskgarden/react-theming": "^6.0.1"

@@ -48,3 +48,3 @@ },

"zendeskgarden:src": "src/index.js",
"gitHead": "7213158d7b0e3421d292d34bcad6724ffe727b0c"
"gitHead": "74223e9957856d50cca82220844de4ada2c0bf70"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc