@transferwise/components 46.135.2 → 46.135.3
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/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/listItem/ListItem.js +2 -2
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +2 -2
- package/build/listItem/ListItem.mjs.map +1 -1
- package/package.json +1 -1
- package/src/actionButton/ActionButton.story.tsx +4 -4
- package/src/actionButton/ActionButton.test.story.tsx +4 -4
- package/src/avatarWrapper/AvatarWrapper.tsx +3 -3
- package/src/common/circle/Circle.story.tsx +3 -3
- package/src/iconButton/IconButton.story.tsx +5 -6
- package/src/iconButton/IconButton.test.story.tsx +8 -8
- package/src/icons/Icons.story.tsx +381 -0
- package/src/listItem/ListItem.test.tsx +24 -0
- package/src/listItem/ListItem.tsx +2 -2
- package/src/listItem/_stories/ListItem.context.test.story.tsx +63 -0
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +3 -3
- package/src/moneyInput/MoneyInput.story.tsx +2 -2
- package/src/navigationOption/NavigationOption.story.tsx +3 -3
- package/src/overlayHeader/OverlayHeader.story.tsx +2 -2
- package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +3 -3
- package/src/prompt/ActionPrompt/ActionPrompt.test.story.tsx +3 -3
- package/src/prompt/InfoPrompt/InfoPrompt.accessibility.docs.mdx +1 -1
- package/src/prompt/InfoPrompt/InfoPrompt.story.tsx +3 -3
- package/src/prompt/InlinePrompt/InlinePrompt.accessibility.docs.mdx +1 -1
- package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +5 -5
- package/src/prompt/InlinePrompt/InlinePrompt.test.story.tsx +2 -2
- package/src/select/Select.story.tsx +3 -3
- package/src/select/option/Option.test.tsx +3 -3
- package/src/summary/Summary.story.tsx +5 -5
- package/src/summary/Summary.test.story.tsx +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
import { action } from 'storybook/actions';
|
|
4
|
-
import { Clock, Taxi,
|
|
4
|
+
import { Clock, Taxi, Suitcase } from '@transferwise/icons';
|
|
5
5
|
import { lorem5 } from '../../test-utils';
|
|
6
6
|
import Link from '../../link';
|
|
7
7
|
import { InlinePrompt, InlinePromptProps } from './InlinePrompt';
|
|
@@ -233,7 +233,7 @@ export const IconOverrides: StoryObj<PreviewStoryArgs> = {
|
|
|
233
233
|
<InlinePrompt {...args} media={<Clock title="Processing: " />} sentiment="warning">
|
|
234
234
|
The account verification is taking longer than usual.
|
|
235
235
|
</InlinePrompt>
|
|
236
|
-
<InlinePrompt {...args} media={<
|
|
236
|
+
<InlinePrompt {...args} media={<Suitcase title="Activated: " />} sentiment="positive">
|
|
237
237
|
Your travel account is set up and ready to use.
|
|
238
238
|
</InlinePrompt>
|
|
239
239
|
<InlinePrompt {...args} media={<Taxi title="Taxi addon: " />} sentiment="proposition">
|
|
@@ -256,13 +256,13 @@ export const SizingStrategies: StoryObj<PreviewStoryArgs> = {
|
|
|
256
256
|
render: (args: PreviewStoryArgs) => {
|
|
257
257
|
return (
|
|
258
258
|
<>
|
|
259
|
-
<InlinePrompt {...args} media={<
|
|
259
|
+
<InlinePrompt {...args} media={<Suitcase />} sentiment="positive" width="full">
|
|
260
260
|
This prompt will take the full width of its container.
|
|
261
261
|
</InlinePrompt>
|
|
262
|
-
<InlinePrompt {...args} media={<
|
|
262
|
+
<InlinePrompt {...args} media={<Suitcase />} sentiment="positive">
|
|
263
263
|
This prompt will hug its content.
|
|
264
264
|
</InlinePrompt>
|
|
265
|
-
<InlinePrompt {...args} media={<
|
|
265
|
+
<InlinePrompt {...args} media={<Suitcase />} sentiment="positive">
|
|
266
266
|
This prompt is configured to hug its content, but since the content is long enough to span
|
|
267
267
|
across multiple lines, it will expand to the full width of its container. And no, you
|
|
268
268
|
should not put pages of text here in the first place, but we recognise that some
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import {
|
|
2
|
+
import { Suitcase } from '@transferwise/icons';
|
|
3
3
|
import { InlinePrompt } from './InlinePrompt';
|
|
4
4
|
import { withVariantConfig } from '../../../.storybook/helpers';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ type Story = StoryObj<typeof InlinePrompt>;
|
|
|
13
13
|
|
|
14
14
|
export const TinyScreen: Story = {
|
|
15
15
|
render: () => (
|
|
16
|
-
<InlinePrompt sentiment="positive" media={<
|
|
16
|
+
<InlinePrompt sentiment="positive" media={<Suitcase />}>
|
|
17
17
|
Your travel money account is now active and ready to use for international transactions.
|
|
18
18
|
</InlinePrompt>
|
|
19
19
|
),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { Person
|
|
2
|
+
import { Person, Globe as GlobeIcon } from '@transferwise/icons';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import Select, { SelectItem, SelectOptionItem } from './Select';
|
|
5
5
|
|
|
@@ -75,7 +75,7 @@ export const Basic: Story = {
|
|
|
75
75
|
{ value: 2, label: 'A disabled thing', disabled: true },
|
|
76
76
|
{ separator: true },
|
|
77
77
|
{ header: 'Icons' },
|
|
78
|
-
{ value: 3, label: 'Profile', icon: <
|
|
78
|
+
{ value: 3, label: 'Profile', icon: <Person /> },
|
|
79
79
|
{
|
|
80
80
|
value: 4,
|
|
81
81
|
label: 'USD',
|
|
@@ -312,7 +312,7 @@ export const AdvancedSearch: Story = {
|
|
|
312
312
|
{ value: 2, label: 'A disabled thing', disabled: true },
|
|
313
313
|
{ separator: true },
|
|
314
314
|
{ header: 'Icons' },
|
|
315
|
-
{ value: 3, label: 'Profile', icon: <
|
|
315
|
+
{ value: 3, label: 'Profile', icon: <Person /> },
|
|
316
316
|
{ value: 4, label: 'Globe', icon: <GlobeIcon /> },
|
|
317
317
|
{ header: 'Currencies' },
|
|
318
318
|
{ value: 5, label: 'British pound', currency: 'gbp' },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import { Person
|
|
3
|
+
import { Person } from '@transferwise/icons';
|
|
4
4
|
|
|
5
5
|
import Option, { Props as OptionProps } from './Option';
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ describe('Option', () => {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it('should render the given icon', () => {
|
|
34
|
-
renderOption({ icon: <
|
|
34
|
+
renderOption({ icon: <Person /> });
|
|
35
35
|
const optionElement = screen.getByTestId('test-option');
|
|
36
36
|
expect(optionElement.querySelector('svg')).toBeInTheDocument();
|
|
37
37
|
});
|
|
@@ -43,7 +43,7 @@ describe('Option', () => {
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
it('should override the currency flag with the given icon', () => {
|
|
46
|
-
renderOption({ currency: 'USD', icon: <
|
|
46
|
+
renderOption({ currency: 'USD', icon: <Person /> });
|
|
47
47
|
const optionElement = screen.getByTestId('test-option');
|
|
48
48
|
expect(optionElement.querySelector('svg')).toBeInTheDocument();
|
|
49
49
|
expect(optionElement.querySelectorAll('svg')).toHaveLength(1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { action } from 'storybook/actions';
|
|
3
|
-
import {
|
|
3
|
+
import { House } from '@transferwise/icons';
|
|
4
4
|
import { Status } from '../common';
|
|
5
5
|
import { InfoPresentation } from '../info';
|
|
6
6
|
import Summary, { type Props as SummaryProps } from './Summary';
|
|
@@ -32,7 +32,7 @@ export const Basic = (args: SummaryProps) => {
|
|
|
32
32
|
}}
|
|
33
33
|
as="li"
|
|
34
34
|
description={description}
|
|
35
|
-
icon={<
|
|
35
|
+
icon={<House size={24} />}
|
|
36
36
|
title="Verify your address"
|
|
37
37
|
status={Status.NOT_DONE}
|
|
38
38
|
/>
|
|
@@ -51,7 +51,7 @@ export const Basic = (args: SummaryProps) => {
|
|
|
51
51
|
'aria-label': 'Please click here to know more about your address update status',
|
|
52
52
|
onClick: action('Summary Info clicked'),
|
|
53
53
|
}}
|
|
54
|
-
icon={<
|
|
54
|
+
icon={<House size={24} />}
|
|
55
55
|
title="You verified your address"
|
|
56
56
|
status={Status.DONE}
|
|
57
57
|
/>
|
|
@@ -72,7 +72,7 @@ export const Basic = (args: SummaryProps) => {
|
|
|
72
72
|
'aria-label': 'Please click here to know more about your address update status',
|
|
73
73
|
onClick: action('Summary Info clicked'),
|
|
74
74
|
}}
|
|
75
|
-
icon={<
|
|
75
|
+
icon={<House size={24} />}
|
|
76
76
|
title="We’re verifying your address"
|
|
77
77
|
status={Status.PENDING}
|
|
78
78
|
/>
|
|
@@ -85,7 +85,7 @@ export const Basic = (args: SummaryProps) => {
|
|
|
85
85
|
}}
|
|
86
86
|
as="li"
|
|
87
87
|
description={description}
|
|
88
|
-
icon={<
|
|
88
|
+
icon={<House size={24} />}
|
|
89
89
|
title="We’re verifying your address"
|
|
90
90
|
status={Status.PENDING}
|
|
91
91
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { House } from '@transferwise/icons';
|
|
2
2
|
import { Status } from '../common';
|
|
3
3
|
import Summary, { type SummaryProps } from '.';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ export const LongText = () => {
|
|
|
16
16
|
'aria-label': ' Click here to change address',
|
|
17
17
|
},
|
|
18
18
|
as: 'li',
|
|
19
|
-
icon: <
|
|
19
|
+
icon: <House size={24} />,
|
|
20
20
|
status: Status.NOT_DONE,
|
|
21
21
|
info: {
|
|
22
22
|
title: 'Title',
|