Socket
Socket
Sign inDemoInstall

@nextui-org/avatar

Package Overview
Dependencies
Maintainers
1
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextui-org/avatar - npm Package Compare versions

Comparing version 0.0.0-dev-v2-20230412124525 to 0.0.0-dev-v2-20230413014154

dist/chunk-I6AMYGKL.mjs

20

dist/avatar-group.js

@@ -70,3 +70,3 @@ "use strict";

);
const styles = (0, import_react.useMemo)(() => (0, import_theme.avatarGroup)({ className, isGrid }), [className, isGrid]);
const classNames = (0, import_react.useMemo)(() => (0, import_theme.avatarGroup)({ className, isGrid }), [className, isGrid]);
const validChildren = (0, import_shared_utils2.getValidChildren)(children);

@@ -89,3 +89,3 @@ const childrenWithinMax = max ? validChildren.slice(0, max) : validChildren;

ref: domRef,
className: styles,
className: classNames,
role: "group",

@@ -157,3 +157,3 @@ ...otherProps

icon,
styles,
classNames,
fallback,

@@ -203,3 +203,3 @@ alt = name,

}, [as]);
const baseStyles = (0, import_shared_utils3.clsx)(styles == null ? void 0 : styles.base, className);
const baseStyles = (0, import_shared_utils3.clsx)(classNames == null ? void 0 : classNames.base, className);
const canBeFocused = (0, import_react2.useMemo)(() => {

@@ -223,3 +223,3 @@ return isFocusable || as === "button";

"data-loaded": isImgLoaded,
className: slots.img({ class: styles == null ? void 0 : styles.img })
className: slots.img({ class: classNames == null ? void 0 : classNames.img })
}),

@@ -237,3 +237,3 @@ [slots, isImgLoaded, src, imgRef]

slots,
styles,
classNames,
fallback,

@@ -258,3 +258,3 @@ isImgLoaded,

domRef,
styles,
classNames,
slots,

@@ -280,3 +280,3 @@ name,

"aria-label": ariaLabel,
className: slots.fallback({ class: styles == null ? void 0 : styles.fallback }),
className: slots.fallback({ class: classNames == null ? void 0 : classNames.fallback }),
role: "img",

@@ -287,4 +287,4 @@ children: fallbackComponent

}
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: styles == null ? void 0 : styles.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: styles == null ? void 0 : styles.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, styles]);
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: classNames == null ? void 0 : classNames.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, classNames]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ref: domRef, ...getAvatarProps(), children: [

@@ -291,0 +291,0 @@ src && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { ...getImageProps(), alt }),

@@ -86,3 +86,3 @@ "use strict";

icon,
styles,
classNames,
fallback,

@@ -132,3 +132,3 @@ alt = name,

}, [as]);
const baseStyles = (0, import_shared_utils2.clsx)(styles == null ? void 0 : styles.base, className);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
const canBeFocused = (0, import_react.useMemo)(() => {

@@ -152,3 +152,3 @@ return isFocusable || as === "button";

"data-loaded": isImgLoaded,
className: slots.img({ class: styles == null ? void 0 : styles.img })
className: slots.img({ class: classNames == null ? void 0 : classNames.img })
}),

@@ -166,3 +166,3 @@ [slots, isImgLoaded, src, imgRef]

slots,
styles,
classNames,
fallback,

@@ -187,3 +187,3 @@ isImgLoaded,

domRef,
styles,
classNames,
slots,

@@ -209,3 +209,3 @@ name,

"aria-label": ariaLabel,
className: slots.fallback({ class: styles == null ? void 0 : styles.fallback }),
className: slots.fallback({ class: classNames == null ? void 0 : classNames.fallback }),
role: "img",

@@ -216,4 +216,4 @@ children: fallbackComponent

}
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: styles == null ? void 0 : styles.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: styles == null ? void 0 : styles.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, styles]);
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: classNames == null ? void 0 : classNames.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, classNames]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ref: domRef, ...getAvatarProps(), children: [

@@ -220,0 +220,0 @@ src && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { ...getImageProps(), alt }),

@@ -92,3 +92,3 @@ "use strict";

icon,
styles,
classNames,
fallback,

@@ -138,3 +138,3 @@ alt = name,

}, [as]);
const baseStyles = (0, import_shared_utils2.clsx)(styles == null ? void 0 : styles.base, className);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
const canBeFocused = (0, import_react.useMemo)(() => {

@@ -158,3 +158,3 @@ return isFocusable || as === "button";

"data-loaded": isImgLoaded,
className: slots.img({ class: styles == null ? void 0 : styles.img })
className: slots.img({ class: classNames == null ? void 0 : classNames.img })
}),

@@ -172,3 +172,3 @@ [slots, isImgLoaded, src, imgRef]

slots,
styles,
classNames,
fallback,

@@ -193,3 +193,3 @@ isImgLoaded,

domRef,
styles,
classNames,
slots,

@@ -215,3 +215,3 @@ name,

"aria-label": ariaLabel,
className: slots.fallback({ class: styles == null ? void 0 : styles.fallback }),
className: slots.fallback({ class: classNames == null ? void 0 : classNames.fallback }),
role: "img",

@@ -222,4 +222,4 @@ children: fallbackComponent

}
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: styles == null ? void 0 : styles.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: styles == null ? void 0 : styles.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, styles]);
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.name({ class: classNames == null ? void 0 : classNames.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": ariaLabel, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, classNames]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ref: domRef, ...getAvatarProps(), children: [

@@ -271,3 +271,3 @@ src && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { ...getImageProps(), alt }),

);
const styles = (0, import_react3.useMemo)(() => (0, import_theme2.avatarGroup)({ className, isGrid }), [className, isGrid]);
const classNames = (0, import_react3.useMemo)(() => (0, import_theme2.avatarGroup)({ className, isGrid }), [className, isGrid]);
const validChildren = (0, import_shared_utils3.getValidChildren)(children);

@@ -290,3 +290,3 @@ const childrenWithinMax = max ? validChildren.slice(0, max) : validChildren;

ref: domRef,
className: styles,
className: classNames,
role: "group",

@@ -293,0 +293,0 @@ ...otherProps

@@ -60,3 +60,3 @@ "use strict";

);
const styles = (0, import_react.useMemo)(() => (0, import_theme.avatarGroup)({ className, isGrid }), [className, isGrid]);
const classNames = (0, import_react.useMemo)(() => (0, import_theme.avatarGroup)({ className, isGrid }), [className, isGrid]);
const validChildren = (0, import_shared_utils.getValidChildren)(children);

@@ -79,3 +79,3 @@ const childrenWithinMax = max ? validChildren.slice(0, max) : validChildren;

ref: domRef,
className: styles,
className: classNames,
role: "group",

@@ -82,0 +82,0 @@ ...otherProps

@@ -59,3 +59,3 @@ import * as tailwind_variants from 'tailwind-variants';

/**
* Classname or List of classes to change the styles of the avatar.
* Classname or List of classes to change the classNames of the avatar.
* if `className` is passed, it will be added to the base slot.

@@ -65,3 +65,3 @@ *

* ```ts
* <Avatar styles={{
* <Avatar classNames={{
* base:"base-classes",

@@ -75,3 +75,3 @@ * img: "image-classes",

*/
styles?: SlotsToClasses<AvatarSlots>;
classNames?: SlotsToClasses<AvatarSlots>;
}

@@ -89,7 +89,7 @@ declare function useAvatar(props: UseAvatarProps): {

img: (slotProps?: tailwind_variants.ClassProp<tailwind_variants.ClassValue> | undefined) => string;
fallback: (slotProps?: tailwind_variants.ClassProp<tailwind_variants.ClassValue> | undefined) => string;
name: (slotProps?: tailwind_variants.ClassProp<tailwind_variants.ClassValue> | undefined) => string;
fallback: (slotProps?: tailwind_variants.ClassProp<tailwind_variants.ClassValue> | undefined) => string;
icon: (slotProps?: tailwind_variants.ClassProp<tailwind_variants.ClassValue> | undefined) => string;
};
styles: SlotsToClasses<"base" | "img" | "name" | "fallback" | "icon"> | undefined;
classNames: SlotsToClasses<"base" | "img" | "fallback" | "name" | "icon"> | undefined;
fallback: react.ReactNode;

@@ -96,0 +96,0 @@ isImgLoaded: boolean;

@@ -52,3 +52,3 @@ "use strict";

icon,
styles,
classNames,
fallback,

@@ -98,3 +98,3 @@ alt = name,

}, [as]);
const baseStyles = (0, import_shared_utils2.clsx)(styles == null ? void 0 : styles.base, className);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
const canBeFocused = (0, import_react.useMemo)(() => {

@@ -118,3 +118,3 @@ return isFocusable || as === "button";

"data-loaded": isImgLoaded,
className: slots.img({ class: styles == null ? void 0 : styles.img })
className: slots.img({ class: classNames == null ? void 0 : classNames.img })
}),

@@ -132,3 +132,3 @@ [slots, isImgLoaded, src, imgRef]

slots,
styles,
classNames,
fallback,

@@ -135,0 +135,0 @@ isImgLoaded,

{
"name": "@nextui-org/avatar",
"version": "0.0.0-dev-v2-20230412124525",
"version": "0.0.0-dev-v2-20230413014154",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",

@@ -33,7 +33,7 @@ "keywords": [

"@react-aria/utils": "^3.16.0",
"@nextui-org/system": "0.0.0-dev-v2-20230412021924",
"@nextui-org/theme": "0.0.0-dev-v2-20230412124525",
"@nextui-org/shared-utils": "0.0.0-dev-v2-20230412021924",
"@nextui-org/dom-utils": "0.0.0-dev-v2-20230412021924",
"@nextui-org/use-image": "0.0.0-dev-v2-20230412021924"
"@nextui-org/system": "0.0.0-dev-v2-20230413014154",
"@nextui-org/shared-utils": "0.0.0-dev-v2-20230413014154",
"@nextui-org/dom-utils": "0.0.0-dev-v2-20230413014154",
"@nextui-org/theme": "0.0.0-dev-v2-20230413014154",
"@nextui-org/use-image": "0.0.0-dev-v2-20230413014154"
},

@@ -43,4 +43,4 @@ "devDependencies": {

"react": "^18.0.0",
"@nextui-org/shared-icons": "0.0.0-dev-v2-20230412021924",
"@nextui-org/test-utils": "0.0.0-dev-v2-20230412021924"
"@nextui-org/shared-icons": "0.0.0-dev-v2-20230413014154",
"@nextui-org/test-utils": "0.0.0-dev-v2-20230413014154"
},

@@ -47,0 +47,0 @@ "clean-package": "../../../clean-package.config.json",

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