frst-components 0.22.45 → 0.22.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2156,8 +2156,12 @@ const AvatarWrapper = styled__default["default"].div `
2156
2156
  `;
2157
2157
 
2158
2158
  function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style }) {
2159
+ const [isImage, setIsImage] = React.useState(false);
2159
2160
  const defaultImg = 'https://cdn-images.frstfalconi.cloud/Avatar_default.png';
2160
- return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: jsxRuntime.jsx(AvatarImg$1, { src: src || defaultImg, alt: alt, size: size, disabled: disabled }) }) }));
2161
+ React.useEffect(() => {
2162
+ setIsImage(!!src);
2163
+ }, [src]);
2164
+ return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: jsxRuntime.jsx(AvatarImg$1, { src: isImage ? src : defaultImg, alt: alt, size: size, disabled: disabled }) }) }));
2161
2165
  }
2162
2166
 
2163
2167
  ///-----------------------------------------
@@ -5082,7 +5086,7 @@ const CommentaryBoxV2 = ({ userName, imgProfile, userCompany, userOffice, showMo
5082
5086
  };
5083
5087
  }, []);
5084
5088
  return (jsxRuntime.jsxs(styled.ThemeProvider, { theme: FRSTTheme, children: [jsxRuntime.jsxs(Container$j, { style: { ...styles }, children: [jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Avatar, { size: isMainComment ? '48px' : '32px', src: imgProfile, onClick: onClickUserInfo, style: { cursor: hasActionToClickOnAvatar ? 'pointer' : 'default', marginRight: '6px' } }), showInterconnectionLine && (jsxRuntime.jsx("div", { style: {
5085
- height: '110px',
5089
+ height: '100%',
5086
5090
  width: '2px',
5087
5091
  position: 'absolute',
5088
5092
  left: '16px',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/index.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAIhC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,eAUjH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/index.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAIhC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,eAgBjH"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.22.45",
4
+ "version": "0.22.47",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",