frst-components 0.22.68 → 0.22.69
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
|
@@ -2145,25 +2145,11 @@ const AvatarImg$1 = styled__default["default"].img `
|
|
|
2145
2145
|
object-fit: cover;
|
|
2146
2146
|
background-image: url('https://cdn-images.frstfalconi.cloud/Avatar_default.png');
|
|
2147
2147
|
background-size: cover;
|
|
2148
|
-
background-position: center;
|
|
2149
|
-
display: flex;
|
|
2150
|
-
align-items: center;
|
|
2151
|
-
justify-content: center;
|
|
2152
2148
|
|
|
2153
2149
|
${({ disabled }) => disabled === true &&
|
|
2154
2150
|
`
|
|
2155
2151
|
filter: grayscale(100%);
|
|
2156
2152
|
`}
|
|
2157
|
-
|
|
2158
|
-
&::after {
|
|
2159
|
-
content: "";
|
|
2160
|
-
width: 100%;
|
|
2161
|
-
height: 100%;
|
|
2162
|
-
background-repeat: no-repeat;
|
|
2163
|
-
background-size: cover;
|
|
2164
|
-
background-position: center;
|
|
2165
|
-
background-image: ${(props) => props.src ? `url(${props.src})` : 'none'};
|
|
2166
|
-
}
|
|
2167
2153
|
`;
|
|
2168
2154
|
const AvatarWrapper = styled__default["default"].div `
|
|
2169
2155
|
width: ${(props) => props.size || '120px'};
|
|
@@ -2172,12 +2158,7 @@ const AvatarWrapper = styled__default["default"].div `
|
|
|
2172
2158
|
`;
|
|
2173
2159
|
|
|
2174
2160
|
function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style }) {
|
|
2175
|
-
|
|
2176
|
-
const defaultImg = 'https://cdn-images.frstfalconi.cloud/Avatar_default.png';
|
|
2177
|
-
React.useEffect(() => {
|
|
2178
|
-
setIsImage(!!src);
|
|
2179
|
-
}, [src]);
|
|
2180
|
-
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, size: size, disabled: disabled }) }) }));
|
|
2161
|
+
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, size: size, disabled: disabled }) }) }));
|
|
2181
2162
|
}
|
|
2182
2163
|
|
|
2183
2164
|
///-----------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatarStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/avatarStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"avatarStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/avatarStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,SAAS,yEAarB,CAAA;AAED,eAAO,MAAM,aAAa,yEAIzB,CAAA"}
|
|
@@ -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;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,
|
|
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,eASjH"}
|