@bookjane2/bookjane-design-library 7.0.12 → 7.0.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BKJAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyB/C,CAAC"}
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 { Fragment, useCallback } from 'react';
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(Fragment, { children: [_jsx(BKJImage, Object.assign({ alt: "Avatar", src: src || '', LoadingComponent: FallbackLoadingComponent, FallbackComponent: FallbackLoadingComponent, variant: 'Round' }, rest), void 0),
9
- showPendingSignUp && _jsx(PendingSignUpIcon, { iconName: "PendingSignup" }, void 0)] }, void 0));
8
+ return (_jsxs(ImageContainer, { children: [_jsx(BKJImage, Object.assign({ alt: "Avatar", src: src || '', LoadingComponent: FallbackLoadingComponent, FallbackComponent: FallbackLoadingComponent, variant: 'Round' }, rest), void 0),
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,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,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,QAAQ,eACP,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,IAAC,QAAQ,EAAC,eAAe,WAAG,YAC3D,CACZ,CAAC;AACJ,CAAC,CAAC"}
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"}
@@ -40,8 +40,8 @@ export default {
40
40
  const Template = ({ ...rest }) => (_jsx(BKJThemeProvider, { children: _jsx(BKJAvatar, Object.assign({}, rest), void 0) }, void 0));
41
41
  export const Default = Template.bind({
42
42
  src: 'https://s3.amazonaws.com/bjk2-0/sandbox/user/avatar/15605/small_8153694F-2098-49BE-A135-4C2B9EBA3DFA.jpg',
43
- width: '20',
44
- height: '20',
43
+ width: '20px',
44
+ height: '20px',
45
45
  fallbackAvatarColor: 'Grey3',
46
46
  });
47
47
  //# sourceMappingURL=BKJAvatar.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJAvatar.stories.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,IAAI,EAAE,KAAK;YACX,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,mBAAmB,EAAE;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;aACd;SACF;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;KACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAA2B,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACxD,KAAC,gBAAgB,cACf,KAAC,SAAS,oBAAK,IAAI,UAAI,WACN,CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC;IACnC,GAAG,EAAE,0GAA0G;IAC/G,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,mBAAmB,EAAE,OAAO;CAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"BKJAvatar.stories.js","sourceRoot":"","sources":["../../../src/components/BKJAvatar/BKJAvatar.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,IAAI,EAAE,KAAK;YACX,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,mBAAmB,EAAE;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;aACd;SACF;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;KACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAA2B,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACxD,KAAC,gBAAgB,cACf,KAAC,SAAS,oBAAK,IAAI,UAAI,WACN,CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC;IACnC,GAAG,EAAE,0GAA0G;IAC/G,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,mBAAmB,EAAE,OAAO;CAC7B,CAAC,CAAC"}
@@ -2,5 +2,9 @@
2
2
  export declare const Avatar: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {
3
3
  fontSize: number;
4
4
  }, never>;
5
- export declare const PendingSignUpIcon: import("styled-components").StyledComponent<import("react").FC<import("../BKJIcon/BKJIcon.types.js").IBKJIconProps>, import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const PendingSignUpIcon: import("styled-components").StyledComponent<import("react").FC<import("../BKJIcon/BKJIcon.types.js").IBKJIconProps>, import("styled-components").DefaultTheme, {
6
+ width: string;
7
+ height: string;
8
+ }, never>;
9
+ export declare const ImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
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;SAUlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,wKAK7B,CAAC"}
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;SAUf,CAAC;AACF,eAAO,MAAM,cAAc,yGAE1B,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,9 +10,15 @@ export const Avatar = styled.img `
11
10
  `}
12
11
  `;
13
12
  export const PendingSignUpIcon = styled(BKJIcon) `
13
+ position: absolute;
14
+ ${({ width }) => width &&
15
+ css `
16
+ top: calc(${width} / 2.4);
17
+ left: calc(${width} / 1.5);
18
+ width: calc(${width} / 2);
19
+ `};
20
+ `;
21
+ export const ImageContainer = styled.div `
14
22
  position: relative;
15
- left: 16px;
16
- top: -16px;
17
- pointer-events: none;
18
23
  `;
19
24
  //# 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;;;IAGnD,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,CAAA;;;;;CAK/C,CAAC"}
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;kBACW,KAAK;mBACJ,KAAK;oBACJ,KAAK;KACpB;CACJ,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookjane2/bookjane-design-library",
3
- "version": "7.0.12",
3
+ "version": "7.0.13",
4
4
  "main": "./lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "engines": {