@transferwise/components 0.0.0-experimental-76bb7cd → 0.0.0-experimental-54cbbb2
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/avatar/Avatar.js +3 -0
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +3 -0
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +170 -0
- package/build/avatarView/AvatarView.js.map +1 -0
- package/build/avatarView/AvatarView.mjs +168 -0
- package/build/avatarView/AvatarView.mjs.map +1 -0
- package/build/avatarView/NotificationDot.js +59 -0
- package/build/avatarView/NotificationDot.js.map +1 -0
- package/build/avatarView/NotificationDot.mjs +57 -0
- package/build/avatarView/NotificationDot.mjs.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.js +10 -4
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +10 -4
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +16 -4
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +15 -3
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js +60 -0
- package/build/badge/BadgeAssets.js.map +1 -0
- package/build/badge/BadgeAssets.mjs +58 -0
- package/build/badge/BadgeAssets.mjs.map +1 -0
- package/build/common/circle/Circle.js +17 -1
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +17 -1
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/index.js +20 -13
- package/build/index.js.map +1 -1
- package/build/index.mjs +11 -7
- package/build/index.mjs.map +1 -1
- package/build/main.css +109 -5
- package/build/styles/avatarGroup/AvatarGroup.css +29 -0
- package/build/styles/avatarView/AvatarView.css +42 -0
- package/build/styles/avatarView/NotificationDot.css +20 -0
- package/build/styles/badge/Badge.css +6 -5
- package/build/styles/common/circle/Circle.css +32 -0
- package/build/styles/main.css +109 -5
- package/build/types/avatar/Avatar.d.ts +3 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatarGroup/AvatarGroup.d.ts +18 -0
- package/build/types/avatarGroup/AvatarGroup.d.ts.map +1 -0
- package/build/types/avatarGroup/index.d.ts +3 -0
- package/build/types/avatarGroup/index.d.ts.map +1 -0
- package/build/types/avatarView/AvatarView.d.ts +26 -0
- package/build/types/avatarView/AvatarView.d.ts.map +1 -0
- package/build/types/avatarView/NotificationDot.d.ts +8 -0
- package/build/types/avatarView/NotificationDot.d.ts.map +1 -0
- package/build/types/avatarView/index.d.ts +3 -0
- package/build/types/avatarView/index.d.ts.map +1 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +9 -4
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/badge/BadgeAssets.d.ts +14 -0
- package/build/types/badge/BadgeAssets.d.ts.map +1 -0
- package/build/types/badge/index.d.ts +2 -0
- package/build/types/badge/index.d.ts.map +1 -1
- package/build/types/common/circle/Circle.d.ts +2 -0
- package/build/types/common/circle/Circle.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.tsx +3 -0
- package/src/avatarGroup/AvatarGroup.css +29 -0
- package/src/avatarGroup/AvatarGroup.less +42 -0
- package/src/avatarGroup/AvatarGroup.story.tsx +284 -0
- package/src/avatarGroup/AvatarGroup.tsx +117 -0
- package/src/avatarGroup/index.ts +2 -0
- package/src/avatarView/AvatarView.css +42 -0
- package/src/avatarView/AvatarView.less +33 -0
- package/src/avatarView/AvatarView.story.tsx +482 -0
- package/src/avatarView/AvatarView.tsx +169 -0
- package/src/avatarView/NotificationDot.css +20 -0
- package/src/avatarView/NotificationDot.less +24 -0
- package/src/avatarView/NotificationDot.tsx +35 -0
- package/src/avatarView/index.ts +2 -0
- package/src/avatarWrapper/AvatarWrapper.tsx +3 -0
- package/src/badge/Badge.css +6 -5
- package/src/badge/Badge.less +4 -3
- package/src/badge/Badge.tsx +20 -6
- package/src/badge/BadgeAssets.tsx +61 -0
- package/src/badge/index.ts +3 -0
- package/src/common/circle/Circle.css +32 -0
- package/src/common/circle/Circle.less +35 -0
- package/src/common/circle/Circle.tsx +22 -1
- package/src/decision/Decision.story.tsx +10 -46
- package/src/flowNavigation/FlowNavigation.story.tsx +10 -48
- package/src/index.ts +4 -0
- package/src/listItem/ListItem.story.tsx +5 -43
- package/src/main.css +109 -5
- package/src/main.less +2 -0
- package/src/navigationOption/NavigationOption.story.tsx +14 -65
- package/src/overlayHeader/OverlayHeader.story.tsx +5 -10
- package/src/radio/Radio.story.tsx +5 -5
- package/src/radioGroup/RadioGroup.story.tsx +3 -3
- package/src/selectOption/SelectOption.story.tsx +31 -30
- package/src/tile/Tile.story.tsx +2 -6
|
@@ -2,9 +2,8 @@ import { action } from '@storybook/addon-actions';
|
|
|
2
2
|
import { select, text } from '@storybook/addon-knobs';
|
|
3
3
|
import { Person as ProfileIcon, Briefcase as BriefcaseIcon } from '@transferwise/icons';
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ProfileType, Size } from '../common';
|
|
5
|
+
import AvatarView from '../avatarView';
|
|
6
|
+
import { ProfileType } from '../common';
|
|
8
7
|
import Logo from '../logo';
|
|
9
8
|
|
|
10
9
|
import OverlayHeader from './OverlayHeader';
|
|
@@ -29,11 +28,7 @@ export const Basic = () => {
|
|
|
29
28
|
return (
|
|
30
29
|
<OverlayHeader
|
|
31
30
|
logo={<Logo />}
|
|
32
|
-
avatar={
|
|
33
|
-
<Avatar type={AvatarType.ICON} size={Size.MEDIUM}>
|
|
34
|
-
{avatarProfiles[showAvatar]}
|
|
35
|
-
</Avatar>
|
|
36
|
-
}
|
|
31
|
+
avatar={<AvatarView>{avatarProfiles[showAvatar]}</AvatarView>}
|
|
37
32
|
onClose={action('Close clicked')}
|
|
38
33
|
/>
|
|
39
34
|
);
|
|
@@ -46,13 +41,13 @@ export const WithAvatarWrapper = () => {
|
|
|
46
41
|
);
|
|
47
42
|
const profileType = select(
|
|
48
43
|
'profileType',
|
|
49
|
-
|
|
44
|
+
[ProfileType.PERSONAL, ProfileType.BUSINESS],
|
|
50
45
|
undefined,
|
|
51
46
|
);
|
|
52
47
|
return (
|
|
53
48
|
<OverlayHeader
|
|
54
49
|
logo={<Logo />}
|
|
55
|
-
avatar={<
|
|
50
|
+
avatar={<AvatarView imgSrc={avatarURL} profileType={profileType?.toLowerCase()} />}
|
|
56
51
|
onClose={action('Close clicked')}
|
|
57
52
|
/>
|
|
58
53
|
);
|
|
@@ -2,7 +2,7 @@ import { boolean, text } from '@storybook/addon-knobs';
|
|
|
2
2
|
import { Flag } from '@wise/art';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import AvatarView from '../avatarView';
|
|
6
6
|
import Checkbox from '../checkbox';
|
|
7
7
|
|
|
8
8
|
import Radio from './Radio';
|
|
@@ -32,9 +32,9 @@ export const Basic = () => {
|
|
|
32
32
|
disabled={disabled}
|
|
33
33
|
avatar={
|
|
34
34
|
showAvatar ? (
|
|
35
|
-
<
|
|
35
|
+
<AvatarView>
|
|
36
36
|
<Flag code="IMP" />
|
|
37
|
-
</
|
|
37
|
+
</AvatarView>
|
|
38
38
|
) : null
|
|
39
39
|
}
|
|
40
40
|
onChange={() => setChecked(!checked)}
|
|
@@ -50,9 +50,9 @@ export const Basic = () => {
|
|
|
50
50
|
secondary={secondary}
|
|
51
51
|
avatar={
|
|
52
52
|
showAvatar ? (
|
|
53
|
-
<
|
|
53
|
+
<AvatarView>
|
|
54
54
|
<Flag code="KES" />
|
|
55
|
-
</
|
|
55
|
+
</AvatarView>
|
|
56
56
|
) : null
|
|
57
57
|
}
|
|
58
58
|
onChange={() => setChecked(!checked)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Flag } from '@wise/art';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import AvatarView from '../avatarView';
|
|
4
4
|
|
|
5
5
|
import RadioGroup, { RadioGroupProps, RadioGroupRadio } from './RadioGroup';
|
|
6
6
|
import { Field } from '../field/Field';
|
|
@@ -52,9 +52,9 @@ export const WithAvatars = {
|
|
|
52
52
|
({
|
|
53
53
|
...radio,
|
|
54
54
|
avatar: (
|
|
55
|
-
<
|
|
55
|
+
<AvatarView>
|
|
56
56
|
<Flag code="NZD" />
|
|
57
|
-
</
|
|
57
|
+
</AvatarView>
|
|
58
58
|
),
|
|
59
59
|
}) satisfies RadioGroupRadio,
|
|
60
60
|
),
|
|
@@ -8,8 +8,7 @@ import SelectOption, {
|
|
|
8
8
|
import { Bank, BankTransfer, Beach, Briefcase, Card, Plane } from '@transferwise/icons';
|
|
9
9
|
import { Field } from '../field/Field';
|
|
10
10
|
import { lorem10 } from '../test-utils';
|
|
11
|
-
import
|
|
12
|
-
import Avatar from '../avatar';
|
|
11
|
+
import AvatarView from '../avatarView';
|
|
13
12
|
import { Sentiment } from '../common';
|
|
14
13
|
import { useState } from 'react';
|
|
15
14
|
|
|
@@ -116,57 +115,59 @@ const paymentMethods: SelectOptiopsSection<CustomData>[] = [
|
|
|
116
115
|
];
|
|
117
116
|
|
|
118
117
|
const balances: SelectOptiopsSection[] = [
|
|
119
|
-
{
|
|
120
|
-
title: 'Balances',
|
|
121
|
-
options: [
|
|
122
|
-
{
|
|
123
|
-
media: <Flag code="gbp" />,
|
|
124
|
-
title: 'Wise GBP balance',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
media: <Flag code="eur" />,
|
|
128
|
-
title: 'Wise EUR balance',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
118
|
{
|
|
133
119
|
title: 'Jars',
|
|
134
120
|
options: [
|
|
135
121
|
{
|
|
136
122
|
media: (
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
123
|
+
<AvatarView
|
|
124
|
+
badge={{ flagCode: 'usd' }}
|
|
125
|
+
style={{ backgroundColor: 'var(--color-bright-pink)' }}
|
|
126
|
+
profileName="Tim Cook"
|
|
127
|
+
/>
|
|
142
128
|
),
|
|
143
129
|
title: 'Hawaii Holiday',
|
|
144
130
|
content: 'Wise USD jar',
|
|
145
131
|
},
|
|
146
132
|
{
|
|
147
133
|
media: (
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
134
|
+
<AvatarView
|
|
135
|
+
badge={{ flagCode: 'aed' }}
|
|
136
|
+
style={{ backgroundColor: 'var(--color-bright-yellow)' }}
|
|
137
|
+
>
|
|
138
|
+
<Briefcase />
|
|
139
|
+
</AvatarView>
|
|
153
140
|
),
|
|
154
141
|
title: 'Emirates Business Trip',
|
|
155
142
|
content: 'Wise AED jar',
|
|
156
143
|
},
|
|
157
144
|
{
|
|
158
145
|
media: (
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
146
|
+
<AvatarView
|
|
147
|
+
badge={{ flagCode: 'jpy' }}
|
|
148
|
+
style={{ backgroundColor: 'var(--color-bright-blue)' }}
|
|
149
|
+
>
|
|
150
|
+
<Plane />
|
|
151
|
+
</AvatarView>
|
|
164
152
|
),
|
|
165
153
|
title: 'Trip to Mars',
|
|
166
154
|
content: 'Wise Jpy jar',
|
|
167
155
|
},
|
|
168
156
|
],
|
|
169
157
|
},
|
|
158
|
+
{
|
|
159
|
+
title: 'Balances',
|
|
160
|
+
options: [
|
|
161
|
+
{
|
|
162
|
+
media: <Flag code="gbp" />,
|
|
163
|
+
title: 'Wise GBP balance',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
media: <Flag code="eur" />,
|
|
167
|
+
title: 'Wise EUR balance',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
170
171
|
];
|
|
171
172
|
|
|
172
173
|
export const Basic: Story = {
|
package/src/tile/Tile.story.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
import { text, boolean } from '@storybook/addon-knobs';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import AvatarView from '../avatarView';
|
|
5
5
|
import { Size } from '../common';
|
|
6
6
|
|
|
7
7
|
import Tile from '.';
|
|
@@ -41,11 +41,7 @@ export const Basic = () => {
|
|
|
41
41
|
description={description}
|
|
42
42
|
disabled={disabled}
|
|
43
43
|
href="#href1"
|
|
44
|
-
media={
|
|
45
|
-
<Avatar size="md" type="initials">
|
|
46
|
-
HM
|
|
47
|
-
</Avatar>
|
|
48
|
-
}
|
|
44
|
+
media={<AvatarView profileName="Henry Mike" />}
|
|
49
45
|
size={medium ? Size.MEDIUM : Size.SMALL}
|
|
50
46
|
title={title}
|
|
51
47
|
onClick={action('onClick')}
|