Socket
Socket
Sign inDemoInstall

@yamada-ui/avatar

Package Overview
Dependencies
Maintainers
1
Versions
806
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/avatar - npm Package Compare versions

Comparing version 0.0.0-dev-20231104154042 to 0.0.0-dev-20231113164540

dist/chunk-DCJPPMQG.mjs

4

dist/avatar-badge.d.ts

@@ -10,7 +10,7 @@ import * as _yamada_ui_core from '@yamada-ui/core';

*/
placement?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
placement?: "top-start" | "top-end" | "bottom-start" | "bottom-end";
};
type AvatarBadgeProps = HTMLUIProps<'div'> & AvatarBadgeOptions;
type AvatarBadgeProps = HTMLUIProps<"div"> & AvatarBadgeOptions;
declare const AvatarBadge: _yamada_ui_core.Component<"div", AvatarBadgeProps>;
export { AvatarBadge, AvatarBadgeProps };

@@ -111,3 +111,3 @@ "use client"

} = (0, import_core2.omitThemeProps)(mergedProps);
const [isLoading, setIsLoading] = (0, import_react.useState)(true);
const [isLoaded, setIsLoaded] = (0, import_react.useState)(false);
const css = {

@@ -129,3 +129,3 @@ position: "relative",

className: (0, import_utils.cx)("ui-avatar", className),
"data-loading": (0, import_utils.dataAttr)(isLoading),
"data-loaded": (0, import_utils.dataAttr)(isLoaded),
borderRadius,

@@ -144,3 +144,3 @@ rounded,

rounded,
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoading(false)),
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoaded(true)),
onError,

@@ -173,3 +173,3 @@ format,

}) => {
const status = (0, import_image.useImage)({ src, onError, crossOrigin, ignoreFallback });
const status = (0, import_image.useImage)({ src, onLoad, onError, crossOrigin, ignoreFallback });
const isLoaded = status === "loaded";

@@ -192,3 +192,2 @@ const isFallback = !src || !isLoaded;

loading,
onLoad,
referrerPolicy,

@@ -195,0 +194,0 @@ borderRadius,

@@ -10,5 +10,5 @@ import * as _yamada_ui_core from '@yamada-ui/core';

};
type AvatarGroupProps = HTMLUIProps<'div'> & ThemeProps<'Avatar'> & AvatarGroupOptions;
type AvatarGroupProps = HTMLUIProps<"div"> & ThemeProps<"Avatar"> & AvatarGroupOptions;
declare const AvatarGroup: _yamada_ui_core.Component<"div", AvatarGroupProps>;
export { AvatarGroup, AvatarGroupProps };

@@ -6,5 +6,5 @@ import { HTMLUIProps } from '@yamada-ui/core';

type AvatarNameProps = HTMLUIProps<'div'> & Pick<AvatarProps, 'name' | 'format'>;
type AvatarNameProps = HTMLUIProps<"div"> & Pick<AvatarProps, "name" | "format">;
declare const AvatarName: FC<AvatarNameProps>;
export { AvatarName, AvatarNameProps };

@@ -90,3 +90,3 @@ "use client"

} = (0, import_core.omitThemeProps)(mergedProps);
const [isLoading, setIsLoading] = (0, import_react.useState)(true);
const [isLoaded, setIsLoaded] = (0, import_react.useState)(false);
const css = {

@@ -108,3 +108,3 @@ position: "relative",

className: (0, import_utils.cx)("ui-avatar", className),
"data-loading": (0, import_utils.dataAttr)(isLoading),
"data-loaded": (0, import_utils.dataAttr)(isLoaded),
borderRadius,

@@ -123,3 +123,3 @@ rounded,

rounded,
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoading(false)),
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoaded(true)),
onError,

@@ -152,3 +152,3 @@ format,

}) => {
const status = (0, import_image.useImage)({ src, onError, crossOrigin, ignoreFallback });
const status = (0, import_image.useImage)({ src, onLoad, onError, crossOrigin, ignoreFallback });
const isLoaded = status === "loaded";

@@ -171,3 +171,2 @@ const isFallback = !src || !isLoaded;

loading,
onLoad,
referrerPolicy,

@@ -174,0 +173,0 @@ borderRadius,

@@ -5,3 +5,3 @@ import * as _yamada_ui_core from '@yamada-ui/core';

import { ReactElement, HTMLAttributeReferrerPolicy } from 'react';
import { ImageProps } from '@yamada-ui/image';
import { UseImageProps, ImageProps } from '@yamada-ui/image';

@@ -22,11 +22,11 @@ type AvatarContext = Record<string, CSSUIObject>;

*/
src?: ImageProps['src'];
src?: ImageProps["src"];
/**
* List of sources to use for different screen resolutions.
*/
srcSet?: ImageProps['srcSet'];
srcSet?: ImageProps["srcSet"];
/**
* Defines loading strategy.
*/
loading?: ImageProps['loading'];
loading?: ImageProps["loading"];
/**

@@ -37,3 +37,3 @@ * If `true`, opt out of the avatar's `fallback` logic and renders the `img` at all times.

*/
ignoreFallback?: ImageProps['ignoreFallback'];
ignoreFallback?: ImageProps["ignoreFallback"];
/**

@@ -44,6 +44,2 @@ * The avatar icon to use.

/**
* Function called when image failed to load.
*/
onError?: () => void;
/**
* Function to get the initials to display.

@@ -57,5 +53,5 @@ */

};
type AvatarProps = HTMLUIProps<'span'> & ThemeProps<'Avatar'> & AvatarOptions;
type AvatarProps = HTMLUIProps<"span"> & ThemeProps<"Avatar"> & AvatarOptions & Pick<UseImageProps, "onLoad" | "onError">;
declare const Avatar: _yamada_ui_core.Component<"span", AvatarProps>;
export { Avatar, AvatarProps, AvatarProvider, useAvatarContext };

@@ -109,3 +109,3 @@ "use client"

} = (0, import_core2.omitThemeProps)(mergedProps);
const [isLoading, setIsLoading] = (0, import_react.useState)(true);
const [isLoaded, setIsLoaded] = (0, import_react.useState)(false);
const css = {

@@ -127,3 +127,3 @@ position: "relative",

className: (0, import_utils.cx)("ui-avatar", className),
"data-loading": (0, import_utils.dataAttr)(isLoading),
"data-loaded": (0, import_utils.dataAttr)(isLoaded),
borderRadius,

@@ -142,3 +142,3 @@ rounded,

rounded,
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoading(false)),
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoaded(true)),
onError,

@@ -171,3 +171,3 @@ format,

}) => {
const status = (0, import_image.useImage)({ src, onError, crossOrigin, ignoreFallback });
const status = (0, import_image.useImage)({ src, onLoad, onError, crossOrigin, ignoreFallback });
const isLoaded = status === "loaded";

@@ -190,3 +190,2 @@ const isFallback = !src || !isLoaded;

loading,
onLoad,
referrerPolicy,

@@ -193,0 +192,0 @@ borderRadius,

@@ -111,3 +111,3 @@ "use client"

} = (0, import_core2.omitThemeProps)(mergedProps);
const [isLoading, setIsLoading] = (0, import_react.useState)(true);
const [isLoaded, setIsLoaded] = (0, import_react.useState)(false);
const css = {

@@ -129,3 +129,3 @@ position: "relative",

className: (0, import_utils.cx)("ui-avatar", className),
"data-loading": (0, import_utils.dataAttr)(isLoading),
"data-loaded": (0, import_utils.dataAttr)(isLoaded),
borderRadius,

@@ -144,3 +144,3 @@ rounded,

rounded,
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoading(false)),
onLoad: (0, import_utils.handlerAll)(onLoad, () => setIsLoaded(true)),
onError,

@@ -173,3 +173,3 @@ format,

}) => {
const status = (0, import_image.useImage)({ src, onError, crossOrigin, ignoreFallback });
const status = (0, import_image.useImage)({ src, onLoad, onError, crossOrigin, ignoreFallback });
const isLoaded = status === "loaded";

@@ -192,3 +192,2 @@ const isFallback = !src || !isLoaded;

loading,
onLoad,
referrerPolicy,

@@ -195,0 +194,0 @@ borderRadius,

{
"name": "@yamada-ui/avatar",
"version": "0.0.0-dev-20231104154042",
"version": "0.0.0-dev-20231113164540",
"description": "Yamada UI avatar component",

@@ -38,6 +38,6 @@ "keywords": [

"dependencies": {
"@yamada-ui/core": "0.0.0-dev-20231104154042",
"@yamada-ui/utils": "0.0.0-dev-20231104154042",
"@yamada-ui/image": "0.0.0-dev-20231104154042",
"@yamada-ui/icon": "0.0.0-dev-20231104154042"
"@yamada-ui/core": "0.0.0-dev-20231113164540",
"@yamada-ui/utils": "0.3.3",
"@yamada-ui/image": "0.0.0-dev-20231113164540",
"@yamada-ui/icon": "0.0.0-dev-20231113164540"
},

@@ -44,0 +44,0 @@ "devDependencies": {

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

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