@transferwise/components 0.0.0-experimental-8809019 → 0.0.0-experimental-50c66a1
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/inputs/SelectInput.js +3 -4
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +4 -5
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/_BottomSheet.js +2 -5
- package/build/inputs/_BottomSheet.js.map +1 -1
- package/build/inputs/_BottomSheet.mjs +3 -6
- package/build/inputs/_BottomSheet.mjs.map +1 -1
- package/build/inputs/_Popover.js +0 -2
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +0 -2
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/avatarView/AvatarView.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/package.json +9 -10
- package/src/alert/Alert.tests.story.tsx +1 -0
- package/src/avatarLayout/AvatarLayout.story.tsx +53 -0
- package/src/avatarView/AvatarView.css +1 -1
- package/src/avatarView/AvatarView.less +1 -1
- package/src/avatarView/AvatarView.story.tsx +66 -0
- package/src/button/_stories/Button.brightGreen.tests.story.tsx +1 -1
- package/src/button/_stories/Button.dark.tests.story.tsx +1 -1
- package/src/button/_stories/Button.default.tests.story.tsx +1 -1
- package/src/button/_stories/Button.forestGreen.tests.story.tsx +1 -1
- package/src/button/_stories/Button.tests.story.tsx +1 -1
- package/src/circularButton/CircularButton.tests.story.tsx +1 -0
- package/src/dateInput/DateInput.tests.story.tsx +1 -0
- package/src/dateLookup/DateLookup.tests.story.tsx +1 -0
- package/src/header/Header.tests.story.tsx +1 -1
- package/src/inputs/SelectInput.spec.tsx +7 -3
- package/src/inputs/SelectInput.tsx +8 -14
- package/src/inputs/_BottomSheet.tsx +4 -7
- package/src/inputs/_Popover.tsx +0 -2
- package/src/legacylistItem/LegacyListItem.tests.story.tsx +1 -1
- package/src/listItem/_stories/ListItem.focus.test.story.tsx +1 -1
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.personal.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
- package/src/main.css +1 -1
- package/src/moneyInput/MoneyInput.spec.tsx +7 -26
- package/src/radioGroup/RadioGroup.test.story.tsx +1 -1
- package/src/sentimentSurface/SentimentSurface.tests.story.tsx +1 -1
- package/src/snackbar/Snackbar.tests.story.tsx +1 -1
- package/src/stepper/Stepper.tests.story.tsx +1 -0
- package/src/summary/Summary.tests.story.tsx +1 -0
- package/src/title/Title.test.story.tsx +1 -0
- package/src/upload/Upload.tests.story.tsx +1 -0
- package/src/uploadInput/UploadInput.tests.story.tsx +1 -0
- package/src/withId/withId.story.tsx +1 -1
|
@@ -6,7 +6,7 @@ import { allModes } from '../../../../.storybook/modes';
|
|
|
6
6
|
export default {
|
|
7
7
|
component: ListItem,
|
|
8
8
|
title: 'Content/ListItem/tests/variants/theme: forest-green',
|
|
9
|
-
tags: ['!autodocs'],
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
10
|
parameters: {
|
|
11
11
|
controls: { disable: true },
|
|
12
12
|
actions: { disable: true },
|
|
@@ -6,7 +6,7 @@ import { withSizedContainer } from '../helpers';
|
|
|
6
6
|
export default {
|
|
7
7
|
component: ListItem,
|
|
8
8
|
title: 'Content/ListItem/tests/variants/cq: medium',
|
|
9
|
-
tags: ['!autodocs'],
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
10
|
parameters: {
|
|
11
11
|
controls: { disable: true },
|
|
12
12
|
actions: { disable: true },
|
|
@@ -11,7 +11,7 @@ import { VariantStory } from './helpers';
|
|
|
11
11
|
export default {
|
|
12
12
|
component: ListItem,
|
|
13
13
|
title: 'Content/ListItem/tests/variants/theme: personal',
|
|
14
|
-
tags: ['!autodocs'],
|
|
14
|
+
tags: ['!autodocs', '!manifest'],
|
|
15
15
|
parameters: {
|
|
16
16
|
controls: { disable: true },
|
|
17
17
|
actions: { disable: true },
|
|
@@ -6,7 +6,7 @@ import { allModes } from '../../../../.storybook/modes';
|
|
|
6
6
|
export default {
|
|
7
7
|
component: ListItem,
|
|
8
8
|
title: 'Content/ListItem/tests/variants/rtl',
|
|
9
|
-
tags: ['!autodocs'],
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
10
|
parameters: {
|
|
11
11
|
controls: { disable: true },
|
|
12
12
|
actions: { disable: true },
|
|
@@ -6,7 +6,7 @@ import { withSizedContainer } from '../helpers';
|
|
|
6
6
|
export default {
|
|
7
7
|
component: ListItem,
|
|
8
8
|
title: 'Content/ListItem/tests/variants/cq: small',
|
|
9
|
-
tags: ['!autodocs'],
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
10
|
parameters: {
|
|
11
11
|
controls: { disable: true },
|
|
12
12
|
actions: { disable: true },
|
package/src/main.css
CHANGED
|
@@ -1025,7 +1025,7 @@
|
|
|
1025
1025
|
}
|
|
1026
1026
|
.np-avatar-view .np-avatar-view-content {
|
|
1027
1027
|
color: #37517e;
|
|
1028
|
-
color: var(--color-content-primary);
|
|
1028
|
+
color: var(--color-sentiment-content-primary, var(--color-content-primary));
|
|
1029
1029
|
}
|
|
1030
1030
|
.np-avatar-view-interactive {
|
|
1031
1031
|
cursor: pointer;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { mockAnimationsApi } from 'jsdom-testing-mocks';
|
|
2
1
|
import {
|
|
3
2
|
mockMatchMedia,
|
|
3
|
+
mockRequestAnimationFrame,
|
|
4
4
|
mockResizeObserver,
|
|
5
5
|
render,
|
|
6
6
|
screen,
|
|
7
7
|
userEvent,
|
|
8
|
-
waitFor,
|
|
9
|
-
within,
|
|
10
8
|
} from '../test-utils';
|
|
11
9
|
|
|
12
10
|
import { MoneyInput, CurrencyItem, CurrencyOptionItem, Field } from '..';
|
|
13
11
|
import { MoneyInputPropsWithInputAttributes } from './MoneyInput';
|
|
12
|
+
import { within } from '@testing-library/react';
|
|
14
13
|
import messages from './MoneyInput.messages';
|
|
15
14
|
|
|
16
15
|
mockMatchMedia();
|
|
17
16
|
mockResizeObserver();
|
|
18
|
-
|
|
17
|
+
mockRequestAnimationFrame();
|
|
19
18
|
|
|
20
19
|
describe('Money Input', () => {
|
|
21
20
|
const popularCurrencies: CurrencyOptionItem[] = [
|
|
@@ -115,30 +114,12 @@ describe('Money Input', () => {
|
|
|
115
114
|
it('calls onCurrencyChange when the user selects a different currency', async () => {
|
|
116
115
|
customRender();
|
|
117
116
|
await openDropdown();
|
|
118
|
-
await userEvent.keyboard('eur');
|
|
119
|
-
|
|
120
|
-
expect(screen.getAllByRole('option')).toHaveLength(1);
|
|
121
|
-
});
|
|
122
|
-
await userEvent.keyboard('{Enter}');
|
|
123
|
-
|
|
124
|
-
await waitFor(() => {
|
|
125
|
-
expect(initialProps.onCurrencyChange).toHaveBeenCalledTimes(1);
|
|
126
|
-
});
|
|
117
|
+
await userEvent.keyboard('eur{Enter}');
|
|
118
|
+
expect(initialProps.onCurrencyChange).toHaveBeenCalledTimes(1);
|
|
127
119
|
expect(initialProps.onCurrencyChange).toHaveBeenCalledWith(popularCurrencies[0]);
|
|
128
|
-
|
|
129
|
-
await waitFor(() => {
|
|
130
|
-
expect(screen.queryByRole('listbox')).not.toBeInTheDocument();
|
|
131
|
-
});
|
|
132
120
|
await openDropdown();
|
|
133
|
-
await userEvent.keyboard('gbp');
|
|
134
|
-
|
|
135
|
-
expect(screen.getAllByRole('option')).toHaveLength(1);
|
|
136
|
-
});
|
|
137
|
-
await userEvent.keyboard('{Enter}');
|
|
138
|
-
|
|
139
|
-
await waitFor(() => {
|
|
140
|
-
expect(initialProps.onCurrencyChange).toHaveBeenCalledTimes(2);
|
|
141
|
-
});
|
|
121
|
+
await userEvent.keyboard('gbp{Enter}');
|
|
122
|
+
expect(initialProps.onCurrencyChange).toHaveBeenCalledTimes(2);
|
|
142
123
|
expect(initialProps.onCurrencyChange).toHaveBeenCalledWith(popularCurrencies[2]);
|
|
143
124
|
});
|
|
144
125
|
|
|
@@ -22,7 +22,7 @@ const screenModes: Theming['screenMode'][] = ['light', 'dark'];
|
|
|
22
22
|
export default {
|
|
23
23
|
component: SentimentSurface,
|
|
24
24
|
title: 'Foundations/SentimentSurface/Tests',
|
|
25
|
-
tags: ['!autodocs'],
|
|
25
|
+
tags: ['!autodocs', '!manifest'],
|
|
26
26
|
} satisfies Meta<typeof SentimentSurface>;
|
|
27
27
|
|
|
28
28
|
type Story = StoryObj<typeof SentimentSurface>;
|
|
@@ -27,7 +27,7 @@ DescribedButton.displayName = 'DescribedButton';
|
|
|
27
27
|
export default {
|
|
28
28
|
component: DescribedButton,
|
|
29
29
|
title: 'HoCs/withId',
|
|
30
|
-
tags: ['
|
|
30
|
+
tags: ['!manifest'],
|
|
31
31
|
} satisfies Meta<typeof withId>;
|
|
32
32
|
|
|
33
33
|
export const WithoutId: Story = {};
|