@bookjane2/bookjane-design-library 7.0.1-1.2 → 7.0.1-1.4
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/lib/components/BKJAvatar/BKJAvatar.d.ts.map +1 -1
- package/lib/components/BKJAvatar/BKJAvatar.js +3 -3
- package/lib/components/BKJAvatar/BKJAvatar.js.map +1 -1
- package/lib/components/BKJAvatar/BKJAvatar.styled.d.ts +1 -0
- package/lib/components/BKJAvatar/BKJAvatar.styled.d.ts.map +1 -1
- package/lib/components/BKJAvatar/BKJAvatar.styled.js +13 -7
- package/lib/components/BKJAvatar/BKJAvatar.styled.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BKJAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyB/C,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
3
|
import { BKJIcon } from '../index.js';
|
|
4
4
|
import { BKJImage } from '../BKJImage/index.js';
|
|
5
|
-
import { PendingSignUpIcon } from './BKJAvatar.styled.js';
|
|
5
|
+
import { PendingSignUpIcon, ImageContainer } from './BKJAvatar.styled.js';
|
|
6
6
|
export const BKJAvatar = ({ src, fontSize = 24, fallbackAvatarColor, showPendingSignUp = false, ...rest }) => {
|
|
7
7
|
const FallbackLoadingComponent = useCallback(() => _jsx(BKJIcon, Object.assign({ color: fallbackAvatarColor, fontSize: fontSize, iconName: "Avatar" }, rest), void 0), [fallbackAvatarColor, fontSize, rest]);
|
|
8
|
-
return (_jsxs(
|
|
8
|
+
return (_jsxs(ImageContainer, { children: [_jsx(BKJImage, Object.assign({ alt: "Avatar", src: src || '', LoadingComponent: FallbackLoadingComponent, FallbackComponent: FallbackLoadingComponent, variant: 'Round' }, rest), void 0),
|
|
9
9
|
showPendingSignUp && _jsx(PendingSignUpIcon, Object.assign({ iconName: "PendingSignup" }, rest), void 0)] }, void 0));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=BKJAvatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJAvatar.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"BKJAvatar.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,MAAM,SAAS,GAA8B,CAAC,EACnD,GAAG,EACH,QAAQ,GAAG,EAAE,EACb,mBAAmB,EACnB,iBAAiB,GAAG,KAAK,EACzB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,wBAAwB,GAAG,WAAW,CAC1C,GAAG,EAAE,CAAC,KAAC,OAAO,kBAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAC,QAAQ,IAAK,IAAI,UAAI,EAC7F,CAAC,mBAAmB,EAAE,QAAQ,EAAE,IAAI,CAAC,CACtC,CAAC;IAEF,OAAO,CACL,MAAC,cAAc,eACb,KAAC,QAAQ,kBACP,GAAG,EAAC,QAAQ,EACZ,GAAG,EAAE,GAAG,IAAI,EAAE,EACd,gBAAgB,EAAE,wBAAwB,EAC1C,iBAAiB,EAAE,wBAAwB,EAC3C,OAAO,EAAE,OAAO,IACZ,IAAI,UACR;YACD,iBAAiB,IAAI,KAAC,iBAAiB,kBAAC,QAAQ,EAAC,eAAe,IAAK,IAAI,UAAI,YAC/D,CAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -6,4 +6,5 @@ export declare const PendingSignUpIcon: import("styled-components").StyledCompon
|
|
|
6
6
|
width: string;
|
|
7
7
|
height: string;
|
|
8
8
|
}, never>;
|
|
9
|
+
export declare const ImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
10
|
//# sourceMappingURL=BKJAvatar.styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJAvatar.styled.d.ts","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.styled.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,MAAM;cAA0B,MAAM;
|
|
1
|
+
{"version":3,"file":"BKJAvatar.styled.d.ts","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.styled.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,MAAM;cAA0B,MAAM;SASlD,CAAC;AAEF,eAAO,MAAM,iBAAiB;WACrB,MAAM;YACL,MAAM;SAmBf,CAAC;AACF,eAAO,MAAM,cAAc,yGAG1B,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { BKJIcon } from '../BKJIcon/BKJIcon.js';
|
|
|
3
3
|
export const Avatar = styled.img `
|
|
4
4
|
border: 1px solid ${({ theme }) => theme.colors.Grey3};
|
|
5
5
|
border-radius: 50%;
|
|
6
|
-
|
|
7
6
|
${({ fontSize }) => fontSize &&
|
|
8
7
|
css `
|
|
9
8
|
width: ${fontSize}px;
|
|
@@ -11,17 +10,24 @@ export const Avatar = styled.img `
|
|
|
11
10
|
`}
|
|
12
11
|
`;
|
|
13
12
|
export const PendingSignUpIcon = styled(BKJIcon) `
|
|
14
|
-
position:
|
|
13
|
+
position: absolute;
|
|
15
14
|
${({ width }) => width &&
|
|
16
15
|
css `
|
|
17
|
-
bottom: ${
|
|
18
|
-
right: ${
|
|
19
|
-
transform: translate(
|
|
20
|
-
|
|
16
|
+
bottom: calc(${width}* 0.45px);
|
|
17
|
+
right: calc(${width} * 0.45px);
|
|
18
|
+
transform: translate(
|
|
19
|
+
calc(100% + calc(${width} * 0.1px)),
|
|
20
|
+
calc(100% + calc(${width} * 0.1px))
|
|
21
|
+
);
|
|
22
|
+
width: calc(${width} * 0.45px);
|
|
21
23
|
`};
|
|
22
24
|
${({ height }) => height &&
|
|
23
25
|
css `
|
|
24
|
-
height: calc(${height} * 0.
|
|
26
|
+
height: calc(${height} * 0.45px);
|
|
25
27
|
`};
|
|
26
28
|
`;
|
|
29
|
+
export const ImageContainer = styled.div `
|
|
30
|
+
position: relative;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
`;
|
|
27
33
|
//# sourceMappingURL=BKJAvatar.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJAvatar.styled.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAsB;sBAChC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"BKJAvatar.styled.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAsB;sBAChC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;IAEnD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjB,QAAQ;IACR,GAAG,CAAA;eACQ,QAAQ;gBACP,QAAQ;KACnB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAG9C;;IAEE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACd,KAAK;IACL,GAAG,CAAA;qBACc,KAAK;oBACN,KAAK;;2BAEE,KAAK;2BACL,KAAK;;oBAEZ,KAAK;KACpB;IACD,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CACf,MAAM;IACN,GAAG,CAAA;qBACc,MAAM;KACtB;CACJ,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGvC,CAAC"}
|