Socket
Socket
Sign inDemoInstall

@chakra-ui/avatar

Package Overview
Dependencies
Maintainers
4
Versions
508
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/avatar - npm Package Compare versions

Comparing version 1.2.9 to 1.2.10

14

CHANGELOG.md
# Change Log
## 1.2.10
### Patch Changes
- [`93c99bdd7`](https://github.com/chakra-ui/chakra-ui/commit/93c99bdd77b01f699a70a9fe1ffbfc2f0be5776a)
Thanks [@segunadebayo](https://github.com/segunadebayo)! - Fix issue where
avatar blinks during API call due to its fallback logic. You can disable the
fallback logic by setting `ignoreFallback`, just like you can with the `Image`
component
- Updated dependencies
[[`a1ca91b76`](https://github.com/chakra-ui/chakra-ui/commit/a1ca91b769000a9d4e6badb5bce46cd5e4035106),
[`11eebac4c`](https://github.com/chakra-ui/chakra-ui/commit/11eebac4cc951c3af65ebdf4ec0f70b8fe9d0f63)]:
- @chakra-ui/image@1.0.20
## 1.2.9

@@ -4,0 +18,0 @@

12

dist/cjs/avatar.js

@@ -132,3 +132,4 @@ "use strict";

borderColor = _omitThemingProps.borderColor,
rest = _objectWithoutPropertiesLoose(_omitThemingProps, ["src", "name", "showBorder", "borderRadius", "onError", "getInitials", "icon", "iconLabel", "loading", "children", "borderColor"]);
ignoreFallback = _omitThemingProps.ignoreFallback,
rest = _objectWithoutPropertiesLoose(_omitThemingProps, ["src", "name", "showBorder", "borderRadius", "onError", "getInitials", "icon", "iconLabel", "loading", "children", "borderColor", "ignoreFallback"]);

@@ -159,3 +160,4 @@ var avatarStyles = _extends({

icon: icon,
iconLabel: iconLabel
iconLabel: iconLabel,
ignoreFallback: ignoreFallback
}), children));

@@ -178,3 +180,4 @@ });

_props$icon = props.icon,
icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(DefaultIcon, null) : _props$icon;
icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(DefaultIcon, null) : _props$icon,
ignoreFallback = props.ignoreFallback;
/**

@@ -186,3 +189,4 @@ * use the image hook to only show the image when it has loaded

src: src,
onError: onError
onError: onError,
ignoreFallback: ignoreFallback
});

@@ -189,0 +193,0 @@ var hasLoaded = status === "loaded";

@@ -111,5 +111,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

children,
borderColor
borderColor,
ignoreFallback
} = _omitThemingProps,
rest = _objectWithoutPropertiesLoose(_omitThemingProps, ["src", "name", "showBorder", "borderRadius", "onError", "getInitials", "icon", "iconLabel", "loading", "children", "borderColor"]);
rest = _objectWithoutPropertiesLoose(_omitThemingProps, ["src", "name", "showBorder", "borderRadius", "onError", "getInitials", "icon", "iconLabel", "loading", "children", "borderColor", "ignoreFallback"]);

@@ -140,3 +141,4 @@ var avatarStyles = _extends({

icon: icon,
iconLabel: iconLabel
iconLabel: iconLabel,
ignoreFallback: ignoreFallback
}), children));

@@ -158,3 +160,4 @@ });

iconLabel,
icon = /*#__PURE__*/React.createElement(DefaultIcon, null)
icon = /*#__PURE__*/React.createElement(DefaultIcon, null),
ignoreFallback
} = props;

@@ -167,3 +170,4 @@ /**

src,
onError
onError,
ignoreFallback
});

@@ -170,0 +174,0 @@ var hasLoaded = status === "loaded";

@@ -63,2 +63,7 @@ import type { SystemProps, SystemStyleObject, ThemingProps, HTMLChakraProps } from "@chakra-ui/system";

iconLabel?: string;
/**
* If `true`, opt out of the avatar's `fallback` logic and
* renders the `img` at all times.
*/
ignoreFallback?: boolean;
}

@@ -65,0 +70,0 @@ /**

{
"name": "@chakra-ui/avatar",
"version": "1.2.9",
"version": "1.2.10",
"description": "A React component used to show users avatar or initials",

@@ -62,3 +62,3 @@ "keywords": [

"dependencies": {
"@chakra-ui/image": "1.0.19",
"@chakra-ui/image": "1.0.20",
"@chakra-ui/react-utils": "1.1.2",

@@ -65,0 +65,0 @@ "@chakra-ui/utils": "1.8.2"

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