@brighthr/component-avatar
Advanced tools
Comparing version 0.0.9 to 0.0.11
@@ -1,2 +0,2 @@ | ||
import*as e from"react";import t from"classnames";import l from"@brighthr/component-icon";const s=e=>t("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e}),a=(e,l)=>t("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===l||"xxs"===l,"w-2 h-2":"sm"===l,"w-3 h-3":"base"===l,"w-4 h-4":"lg"===l,"w-5 h-5":"xl"===l,"w-8 h-8":"xxl"===l,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e}),r=({name:a,size:r="base"})=>e.createElement("div",{className:t(s(r))},a?a.split(" ").map(e=>e.match(/[A-Za-z]/)).slice(0,3).join("").toUpperCase():e.createElement(l,{iconName:"user",size:r,className:t("fill-white flex justify-center items-center")})),i=({name:l,imageHref:i,size:n,presence:m})=>e.createElement("div",{className:t("relative inline-block")},i?e.createElement("img",{src:i,title:`${l}'s profile`,className:t("inline object-cover rounded-full",s(n)),alt:`${l}'s profile`}):e.createElement(r,{name:l,size:n}),m&&e.createElement("span",{className:t(a(m,n))}," "));export{i as default}; | ||
import*as e from"react";import t from"classnames";import l from"@brighthr/component-icon";const s=e=>t("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e}),a=(e,l)=>t("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===l||"xxs"===l,"w-2 h-2":"sm"===l,"w-3 h-3":"base"===l,"w-4 h-4":"lg"===l,"w-5 h-5":"xl"===l,"w-8 h-8":"xxl"===l,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e}),r=({name:a,size:r="base"})=>e.createElement("div",{className:t(s(r))},a?a.split(" ").map(e=>e.match(/[A-Za-z]/)).slice(0,3).join("").toUpperCase():e.createElement(l,{iconName:"user",size:r,className:t("fill-white flex justify-center items-center")})),n=({name:l,imageHref:n,size:i,presence:m})=>e.createElement("div",{className:t("relative inline-block")},n?e.createElement("img",{src:n,title:`${l}'s profile`,className:t("max-w-none inline object-cover rounded-full",s(i)),alt:`${l}'s profile`}):e.createElement(r,{name:l,size:i}),m&&e.createElement("span",{className:t(a(m,i))}," "));export{n 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 l=function(e){return t("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e})},n=function(e,r){return t("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===r||"xxs"===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,"w-8 h-8":"xxl"===r,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e})},s=function(n){var s=n.name,a=n.size,i=void 0===a?"base":a;return e.createElement("div",{className:t(l(i))},s?s.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():e.createElement(r,{iconName:"user",size:i,className:t("fill-white flex justify-center items-center")}))},a=function(r){var a=r.name,i=r.imageHref,o=r.size,c=r.presence;return e.createElement("div",{className:t("relative inline-block")},i?e.createElement("img",{src:i,title:a+"'s profile",className:t("inline object-cover rounded-full",l(o)),alt:a+"'s profile"}):e.createElement(s,{name:a,size:o}),c&&e.createElement("span",{className:t(n(c,o))}," "))};export{a as default}; | ||
import*as e from"react";import t from"classnames";import r from"@brighthr/component-icon";var n=function(e){return t("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e})},l=function(e,r){return t("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===r||"xxs"===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,"w-8 h-8":"xxl"===r,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e})},s=function(l){var s=l.name,a=l.size,i=void 0===a?"base":a;return e.createElement("div",{className:t(n(i))},s?s.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():e.createElement(r,{iconName:"user",size:i,className:t("fill-white flex justify-center items-center")}))},a=function(r){var a=r.name,i=r.imageHref,o=r.size,c=r.presence;return e.createElement("div",{className:t("relative inline-block")},i?e.createElement("img",{src:i,title:a+"'s profile",className:t("max-w-none inline object-cover rounded-full",n(o)),alt:a+"'s profile"}):e.createElement(s,{name:a,size:o}),c&&e.createElement("span",{className:t(l(c,o))}," "))};export{a 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 l(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 a=/*#__PURE__*/l(e),i=/*#__PURE__*/r(t),s=/*#__PURE__*/r(n),u=function(e){return i.default("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e})},o=function(e,t){return i.default("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===t||"xxs"===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,"w-8 h-8":"xxl"===t,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e})},c=function(e){var t=e.name,n=e.size,r=void 0===n?"base":n;return a.createElement("div",{className:i.default(u(r))},t?t.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():a.createElement(s.default,{iconName:"user",size:r,className:i.default("fill-white flex justify-center items-center")}))};return function(e){var t=e.name,n=e.imageHref,r=e.size,l=e.presence;return a.createElement("div",{className:i.default("relative inline-block")},n?a.createElement("img",{src:n,title:t+"'s profile",className:i.default("inline object-cover rounded-full",u(r)),alt:t+"'s profile"}):a.createElement(c,{name:t,size:r}),l&&a.createElement("span",{className:i.default(o(l,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 l(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 a=/*#__PURE__*/l(e),i=/*#__PURE__*/r(t),s=/*#__PURE__*/r(n),u=function(e){return i.default("bg-primary-400 text-white rounded-full flex justify-center items-center",{"w-5 h-5 text-xs":"xs"===e||"xxs"===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,"w-32 h-32 text-3xl":"xxl"===e})},o=function(e,t){return i.default("absolute bottom-0 right-0 inline-block rounded-full",{"w-1.5 h-1.5":"xs"===t||"xxs"===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,"w-8 h-8":"xxl"===t,"bg-success-600 rounded-full":"in"===e,"bg-neutral-400 rounded-full":"out"===e,"bg-error-500 rounded-full":"absent"===e})},c=function(e){var t=e.name,n=e.size,r=void 0===n?"base":n;return a.createElement("div",{className:i.default(u(r))},t?t.split(" ").map(function(e){return e.match(/[A-Za-z]/)}).slice(0,3).join("").toUpperCase():a.createElement(s.default,{iconName:"user",size:r,className:i.default("fill-white flex justify-center items-center")}))};return function(e){var t=e.name,n=e.imageHref,r=e.size,l=e.presence;return a.createElement("div",{className:i.default("relative inline-block")},n?a.createElement("img",{src:n,title:t+"'s profile",className:i.default("max-w-none inline object-cover rounded-full",u(r)),alt:t+"'s profile"}):a.createElement(c,{name:t,size:r}),l&&a.createElement("span",{className:i.default(o(l,r))}," "))}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@brighthr/component-avatar", | ||
"version": "0.0.9", | ||
"version": "0.0.11", | ||
"license": "MIT", | ||
@@ -40,3 +40,3 @@ "type": "module", | ||
}, | ||
"gitHead": "2b7a0d8f61798205f9aa88aed758c7f6279529bb" | ||
"gitHead": "83b1e7e991559343e7f048331a0eb101d35b1fcb" | ||
} |
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
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
42080
278