@transferwise/components 45.2.0 → 45.3.0
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/build/es/no-polyfill/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/no-polyfill/avatar/colors/avatarColorTestCases.json +402 -0
- package/build/es/no-polyfill/avatar/colors/colors.js +10 -0
- package/build/es/no-polyfill/avatar/colors/index.js +1 -0
- package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/es/polyfill/avatar/Avatar.js +1 -1
- package/build/es/polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/polyfill/avatar/colors/avatarColorTestCases.json +402 -0
- package/build/es/polyfill/avatar/colors/colors.js +10 -0
- package/build/es/polyfill/avatar/colors/index.js +1 -0
- package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/avatar/Avatar.d.ts +18 -22
- package/build/types/avatar/Avatar.story.d.ts +3 -34
- package/build/types/avatar/colors/colors.d.ts +3 -0
- package/build/types/avatar/colors/index.d.ts +1 -0
- package/build/types/avatar/index.d.ts +2 -2
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +1 -0
- package/build/types/avatarWrapper/AvatarWrapper.story.d.ts +4 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +2 -2
- package/scripts/generate-type-declarations.js +0 -1
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type AvatarTheme =
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare const Avatar: React.FC<AvatarProps>;
|
|
20
|
-
|
|
21
|
-
export default Avatar;
|
|
22
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type NumericAvatarSize = 24 | 40 | 48 | 56 | 72;
|
|
3
|
+
type LegacyAvatarSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type AvatarSize = NumericAvatarSize | LegacyAvatarSize;
|
|
5
|
+
export type AvatarTheme = 'light' | 'dark';
|
|
6
|
+
export type AvatarType = 'thumbnail' | 'icon' | 'emoji' | 'initials';
|
|
7
|
+
export interface AvatarProps {
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
backgroundColorSeed?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
outlined?: boolean;
|
|
13
|
+
size?: AvatarSize;
|
|
14
|
+
theme?: AvatarTheme;
|
|
15
|
+
type?: AvatarType;
|
|
16
|
+
}
|
|
17
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
18
|
+
export default Avatar;
|
|
@@ -1,42 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import
|
|
4
|
-
import Avatar, { AvatarType } from '.';
|
|
3
|
+
import Avatar from '.';
|
|
5
4
|
declare const _default: {
|
|
6
|
-
component:
|
|
7
|
-
({ backgroundColor, children, className, outlined, size, theme, type }: {
|
|
8
|
-
backgroundColor: any;
|
|
9
|
-
children: any;
|
|
10
|
-
className: any;
|
|
11
|
-
outlined: any;
|
|
12
|
-
size: any;
|
|
13
|
-
theme: any;
|
|
14
|
-
type: any;
|
|
15
|
-
}): JSX.Element;
|
|
16
|
-
propTypes: {
|
|
17
|
-
backgroundColor: any;
|
|
18
|
-
children: any;
|
|
19
|
-
className: any;
|
|
20
|
-
outlined: any;
|
|
21
|
-
size: any;
|
|
22
|
-
theme: any;
|
|
23
|
-
type: any;
|
|
24
|
-
};
|
|
25
|
-
defaultProps: {
|
|
26
|
-
backgroundColor: null;
|
|
27
|
-
children: null;
|
|
28
|
-
className: null;
|
|
29
|
-
outlined: boolean;
|
|
30
|
-
size: Size;
|
|
31
|
-
theme: Theme;
|
|
32
|
-
type: AvatarType;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
5
|
+
component: import("react").FC<import("./Avatar").AvatarProps>;
|
|
35
6
|
title: string;
|
|
36
7
|
tags: string[];
|
|
37
8
|
};
|
|
38
9
|
export default _default;
|
|
39
10
|
type Story = StoryObj<typeof Avatar>;
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const Flag: Story;
|
|
42
|
-
export declare const Table: Story;
|
|
11
|
+
export declare const Tables: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AvatarType } from
|
|
2
|
-
export { default } from
|
|
1
|
+
export { AvatarType } from './avatarTypes';
|
|
2
|
+
export { default } from './Avatar';
|
|
@@ -13,6 +13,7 @@ export interface AvatarWrapperBadgeProps {
|
|
|
13
13
|
export interface AvatarWrapperProps {
|
|
14
14
|
url?: string;
|
|
15
15
|
profileType?: AvatarWrapperProfileType;
|
|
16
|
+
profileId?: number;
|
|
16
17
|
badgeUrl?: string;
|
|
17
18
|
badgeAltText?: string;
|
|
18
19
|
badgeStatusIcon?: AvatarWrapperBadgeStatusIcon;
|
|
@@ -4,9 +4,10 @@ import { Sentiment } from '../common';
|
|
|
4
4
|
import AvatarWrapper from './AvatarWrapper';
|
|
5
5
|
declare const _default: {
|
|
6
6
|
component: {
|
|
7
|
-
({ url, profileType, badgeUrl, badgeAltText, badgeStatusIcon, name, avatarProps, badgeProps, }: {
|
|
7
|
+
({ url, profileType, profileId, badgeUrl, badgeAltText, badgeStatusIcon, name, avatarProps, badgeProps, }: {
|
|
8
8
|
url: any;
|
|
9
9
|
profileType: any;
|
|
10
|
+
profileId: any;
|
|
10
11
|
badgeUrl: any;
|
|
11
12
|
badgeAltText: any;
|
|
12
13
|
badgeStatusIcon: any;
|
|
@@ -17,6 +18,7 @@ declare const _default: {
|
|
|
17
18
|
defaultProps: {
|
|
18
19
|
url: undefined;
|
|
19
20
|
profileType: undefined;
|
|
21
|
+
profileId: undefined;
|
|
20
22
|
badgeUrl: undefined;
|
|
21
23
|
badgeAltText: undefined;
|
|
22
24
|
badgeStatusIcon: undefined;
|
|
@@ -27,6 +29,7 @@ declare const _default: {
|
|
|
27
29
|
propTypes: {
|
|
28
30
|
url: any;
|
|
29
31
|
profileType: any;
|
|
32
|
+
profileId: any;
|
|
30
33
|
badgeUrl: any;
|
|
31
34
|
badgeAltText: any;
|
|
32
35
|
badgeStatusIcon: any;
|