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

@brighthr/component-avatar

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brighthr/component-avatar - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

dist/index.modern.js

@@ -1,2 +0,2 @@

import*as e from"react";import t from"classnames";import s from"@brighthr/component-icon";const a=e=>t("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-[86px] h-[86px] text-2xl":"xl"===e}),r=(e,s)=>t("absolute bottom-0 right-0",{"w-[5px] h-[5px]":"xs"===s},{"w-2 h-2":"sm"===s},{"w-3 h-3":"base"===s},{"w-4 h-4":"lg"===s},{"w-[22px] h-[22px]":"xl"===s},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e}),l=e=>{switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},n=({name:r,size:n})=>e.createElement("div",{className:t(a(n))},r?r.split(" ").map(e=>e.match(/[A-Za-z]/)).slice(0,3).join("").toUpperCase():e.createElement(s,{iconName:"user",className:t("fill-white flex justify-center items-center"),size:l(n)})),m=({name:s,imageHref:l,size:m,presence:c})=>e.createElement("div",{className:"relative inline-block"},l?e.createElement("img",{src:l,className:t(a(m)),title:`${s}'s profile`,alt:`${s}'s profile`}):e.createElement(n,{name:s,size:m}),c&&e.createElement("span",{className:t(r(c,m))}," "));export{m as default};
import*as e from"react";import t from"classnames";import s from"@brighthr/component-icon";const a=e=>t("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-20 h-20 text-2xl":"xl"===e}),r=(e,s)=>t("absolute bottom-0 right-0",{"w-1.5 h-1.5":"xs"===s},{"w-2 h-2":"sm"===s},{"w-3 h-3":"base"===s},{"w-4 h-4":"lg"===s},{"w-5 h-5":"xl"===s},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e}),l=e=>{switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},n=({name:r,size:n})=>e.createElement("div",{className:t(a(n))},r?r.split(" ").map(e=>e.match(/[A-Za-z]/)).slice(0,3).join("").toUpperCase():e.createElement(s,{iconName:"user",className:t("fill-white flex justify-center items-center"),size:l(n)})),m=({name:s,imageHref:l,size:m,presence:c})=>e.createElement("div",{className:"relative inline-block"},l?e.createElement("img",{src:l,className:t(a(m)),title:`${s}'s profile`,alt:`${s}'s profile`}):e.createElement(n,{name:s,size:m}),c&&e.createElement("span",{className:t(r(c,m))}," "));export{m as default};
//# sourceMappingURL=index.modern.js.map

@@ -1,2 +0,2 @@

import*as e from"react";import t from"classnames";import r from"@brighthr/component-icon";var s=function(e){return t("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-[86px] h-[86px] text-2xl":"xl"===e})},n=function(e,r){return t("absolute bottom-0 right-0",{"w-[5px] h-[5px]":"xs"===r},{"w-2 h-2":"sm"===r},{"w-3 h-3":"base"===r},{"w-4 h-4":"lg"===r},{"w-[22px] h-[22px]":"xl"===r},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e})},a=function(e){switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},l=function(n){var l=n.name,i=n.size;return e.createElement("div",{className:t(s(i))},l?l.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():e.createElement(r,{iconName:"user",className:t("fill-white flex justify-center items-center"),size:a(i)}))},i=function(r){var a=r.name,i=r.imageHref,c=r.size,m=r.presence;return e.createElement("div",{className:"relative inline-block"},i?e.createElement("img",{src:i,className:t(s(c)),title:a+"'s profile",alt:a+"'s profile"}):e.createElement(l,{name:a,size:c}),m&&e.createElement("span",{className:t(n(m,c))}," "))};export{i as default};
import*as e from"react";import t from"classnames";import r from"@brighthr/component-icon";var s=function(e){return t("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-20 h-20 text-2xl":"xl"===e})},n=function(e,r){return t("absolute bottom-0 right-0",{"w-1.5 h-1.5":"xs"===r},{"w-2 h-2":"sm"===r},{"w-3 h-3":"base"===r},{"w-4 h-4":"lg"===r},{"w-5 h-5":"xl"===r},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e})},a=function(e){switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},l=function(n){var l=n.name,i=n.size;return e.createElement("div",{className:t(s(i))},l?l.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():e.createElement(r,{iconName:"user",className:t("fill-white flex justify-center items-center"),size:a(i)}))},i=function(r){var a=r.name,i=r.imageHref,c=r.size,m=r.presence;return e.createElement("div",{className:"relative inline-block"},i?e.createElement("img",{src:i,className:t(s(c)),title:a+"'s profile",alt:a+"'s profile"}):e.createElement(l,{name:a,size:c}),m&&e.createElement("span",{className:t(n(m,c))}," "))};export{i as default};
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("classnames"),require("@brighthr/component-icon")):"function"==typeof define&&define.amd?define(["react","classnames","@brighthr/component-icon"],t):(e||self).componentAvatar=t(e.react,e.classnames,e.Icon)}(this,function(e,t,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var s=/*#__PURE__*/a(e),l=/*#__PURE__*/r(t),u=/*#__PURE__*/r(n),c=function(e){return l.default("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-[86px] h-[86px] text-2xl":"xl"===e})},i=function(e,t){return l.default("absolute bottom-0 right-0",{"w-[5px] h-[5px]":"xs"===t},{"w-2 h-2":"sm"===t},{"w-3 h-3":"base"===t},{"w-4 h-4":"lg"===t},{"w-[22px] h-[22px]":"xl"===t},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e})},o=function(e){switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},f=function(e){var t=e.name,n=e.size;return s.createElement("div",{className:l.default(c(n))},t?t.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():s.createElement(u.default,{iconName:"user",className:l.default("fill-white flex justify-center items-center"),size:o(n)}))};return function(e){var t=e.name,n=e.imageHref,r=e.size,a=e.presence;return s.createElement("div",{className:"relative inline-block"},n?s.createElement("img",{src:n,className:l.default(c(r)),title:t+"'s profile",alt:t+"'s profile"}):s.createElement(f,{name:t,size:r}),a&&s.createElement("span",{className:l.default(i(a,r))}," "))}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("classnames"),require("@brighthr/component-icon")):"function"==typeof define&&define.amd?define(["react","classnames","@brighthr/component-icon"],t):(e||self).componentAvatar=t(e.react,e.classnames,e.Icon)}(this,function(e,t,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var s=/*#__PURE__*/a(e),l=/*#__PURE__*/r(t),u=/*#__PURE__*/r(n),c=function(e){return l.default("bg-primary-400 text-white rounded-full flex justify-center items-center max-w-none",{"w-5 h-5 text-xs":"xs"===e},{"w-9 h-9 text-xs":"sm"===e},{"w-12 h-12 text-base":"base"===e},{"w-16 h-16 text-base":"lg"===e},{"w-20 h-20 text-2xl":"xl"===e})},i=function(e,t){return l.default("absolute bottom-0 right-0",{"w-1.5 h-1.5":"xs"===t},{"w-2 h-2":"sm"===t},{"w-3 h-3":"base"===t},{"w-4 h-4":"lg"===t},{"w-5 h-5":"xl"===t},{"bg-success-600 rounded-full":"in"===e},{"bg-neutral-400 rounded-full":"out"===e},{"bg-error-500 rounded-sm":"absent"===e})},o=function(e){switch(e){case"xs":return 9;case"sm":return 14;case"base":default:return 22;case"lg":return 28;case"xl":return 38}},f=function(e){var t=e.name,n=e.size;return s.createElement("div",{className:l.default(c(n))},t?t.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():s.createElement(u.default,{iconName:"user",className:l.default("fill-white flex justify-center items-center"),size:o(n)}))};return function(e){var t=e.name,n=e.imageHref,r=e.size,a=e.presence;return s.createElement("div",{className:"relative inline-block"},n?s.createElement("img",{src:n,className:l.default(c(r)),title:t+"'s profile",alt:t+"'s profile"}):s.createElement(f,{name:t,size:r}),a&&s.createElement("span",{className:l.default(i(a,r))}," "))}});
//# sourceMappingURL=index.umd.js.map
{
"name": "@brighthr/component-avatar",
"version": "0.0.3",
"version": "0.0.4",
"license": "MIT",

@@ -40,3 +40,3 @@ "type": "module",

},
"gitHead": "2d4a59110e223666f4139a41252b3a8abd11d9e4"
"gitHead": "029c2f35f6846df08a74293cc1b53088a95af10c"
}

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

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