@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.
Files changed (59) hide show
  1. package/build/inputs/SelectInput.js +3 -4
  2. package/build/inputs/SelectInput.js.map +1 -1
  3. package/build/inputs/SelectInput.mjs +4 -5
  4. package/build/inputs/SelectInput.mjs.map +1 -1
  5. package/build/inputs/_BottomSheet.js +2 -5
  6. package/build/inputs/_BottomSheet.js.map +1 -1
  7. package/build/inputs/_BottomSheet.mjs +3 -6
  8. package/build/inputs/_BottomSheet.mjs.map +1 -1
  9. package/build/inputs/_Popover.js +0 -2
  10. package/build/inputs/_Popover.js.map +1 -1
  11. package/build/inputs/_Popover.mjs +0 -2
  12. package/build/inputs/_Popover.mjs.map +1 -1
  13. package/build/main.css +1 -1
  14. package/build/styles/avatarView/AvatarView.css +1 -1
  15. package/build/styles/main.css +1 -1
  16. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  17. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  18. package/build/types/inputs/_Popover.d.ts.map +1 -1
  19. package/package.json +9 -10
  20. package/src/alert/Alert.tests.story.tsx +1 -0
  21. package/src/avatarLayout/AvatarLayout.story.tsx +53 -0
  22. package/src/avatarView/AvatarView.css +1 -1
  23. package/src/avatarView/AvatarView.less +1 -1
  24. package/src/avatarView/AvatarView.story.tsx +66 -0
  25. package/src/button/_stories/Button.brightGreen.tests.story.tsx +1 -1
  26. package/src/button/_stories/Button.dark.tests.story.tsx +1 -1
  27. package/src/button/_stories/Button.default.tests.story.tsx +1 -1
  28. package/src/button/_stories/Button.forestGreen.tests.story.tsx +1 -1
  29. package/src/button/_stories/Button.tests.story.tsx +1 -1
  30. package/src/circularButton/CircularButton.tests.story.tsx +1 -0
  31. package/src/dateInput/DateInput.tests.story.tsx +1 -0
  32. package/src/dateLookup/DateLookup.tests.story.tsx +1 -0
  33. package/src/header/Header.tests.story.tsx +1 -1
  34. package/src/inputs/SelectInput.spec.tsx +7 -3
  35. package/src/inputs/SelectInput.tsx +8 -14
  36. package/src/inputs/_BottomSheet.tsx +4 -7
  37. package/src/inputs/_Popover.tsx +0 -2
  38. package/src/legacylistItem/LegacyListItem.tests.story.tsx +1 -1
  39. package/src/listItem/_stories/ListItem.focus.test.story.tsx +1 -1
  40. package/src/listItem/_stories/ListItem.layout.test.story.tsx +1 -1
  41. package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +1 -1
  42. package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +1 -1
  43. package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +1 -1
  44. package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
  45. package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +1 -1
  46. package/src/listItem/_stories/variants/ListItem.personal.test.story.tsx +1 -1
  47. package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +1 -1
  48. package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
  49. package/src/main.css +1 -1
  50. package/src/moneyInput/MoneyInput.spec.tsx +7 -26
  51. package/src/radioGroup/RadioGroup.test.story.tsx +1 -1
  52. package/src/sentimentSurface/SentimentSurface.tests.story.tsx +1 -1
  53. package/src/snackbar/Snackbar.tests.story.tsx +1 -1
  54. package/src/stepper/Stepper.tests.story.tsx +1 -0
  55. package/src/summary/Summary.tests.story.tsx +1 -0
  56. package/src/title/Title.test.story.tsx +1 -0
  57. package/src/upload/Upload.tests.story.tsx +1 -0
  58. package/src/uploadInput/UploadInput.tests.story.tsx +1 -0
  59. 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 },
@@ -12,7 +12,7 @@ import {
12
12
  export default {
13
13
  component: ListItem,
14
14
  title: 'Content/ListItem/tests/variants/surface: neutral',
15
- tags: ['!autodocs'],
15
+ tags: ['!autodocs', '!manifest'],
16
16
  parameters: {
17
17
  controls: { disable: true },
18
18
  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
- mockAnimationsApi();
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
- await waitFor(() => {
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
- await waitFor(() => {
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
 
@@ -6,7 +6,7 @@ import { fn } from 'storybook/test';
6
6
  const meta = {
7
7
  component: RadioGroup,
8
8
  title: 'Forms/RadioGroup/tests',
9
- tags: ['!autodocs'],
9
+ tags: ['!autodocs', '!manifest'],
10
10
  args: {
11
11
  selectedValue: 'radio-2',
12
12
  name: 'radio-group',
@@ -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>;
@@ -13,7 +13,7 @@ export default {
13
13
  title: 'Dialogs/Snackbar/Tests',
14
14
  component: Snackbar,
15
15
  argTypes: {},
16
- tags: ['!autodocs'],
16
+ tags: ['!autodocs', '!manifest'],
17
17
  };
18
18
 
19
19
  const launchSnackbar = async (canvasElement: HTMLElement) => {
@@ -27,6 +27,7 @@ const STEPS = [
27
27
  const meta = {
28
28
  component: Stepper,
29
29
  title: 'Navigation/Stepper/tests',
30
+ tags: ['!manifest'],
30
31
  argTypes: {
31
32
  activeStep: {
32
33
  control: 'radio',
@@ -5,6 +5,7 @@ import Summary, { type SummaryProps } from '.';
5
5
  export default {
6
6
  component: Summary,
7
7
  title: 'Content/Summary/tests',
8
+ tags: ['deprecated', '!manifest'],
8
9
  };
9
10
 
10
11
  export const LongText = () => {
@@ -6,6 +6,7 @@ import Title from './Title';
6
6
  export default {
7
7
  component: Title,
8
8
  title: 'Typography/Title/Tests',
9
+ tags: ['!autodocs', '!manifest'],
9
10
  args: {
10
11
  children: lorem1000.replaceAll(' ', ''),
11
12
  },
@@ -7,6 +7,7 @@ import { Field } from '../field/Field';
7
7
  const meta = {
8
8
  component: Upload,
9
9
  title: 'Forms/Upload/Tests',
10
+ tags: ['!manifest'],
10
11
  argTypes: {
11
12
  maxSize: {
12
13
  control: {
@@ -8,6 +8,7 @@ import { userEvent } from 'storybook/test';
8
8
 
9
9
  const meta: Meta<typeof UploadInput> = {
10
10
  title: 'Forms/UploadInput/Tests',
11
+ tags: ['!manifest'],
11
12
  component: UploadInput,
12
13
  };
13
14
  export default meta;
@@ -27,7 +27,7 @@ DescribedButton.displayName = 'DescribedButton';
27
27
  export default {
28
28
  component: DescribedButton,
29
29
  title: 'HoCs/withId',
30
- tags: ['docs-only', '!manifest'],
30
+ tags: ['!manifest'],
31
31
  } satisfies Meta<typeof withId>;
32
32
 
33
33
  export const WithoutId: Story = {};