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