@transferwise/components 46.9.0 → 46.10.1

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 (97) hide show
  1. package/build/i18n/de.json +1 -0
  2. package/build/i18n/en.json +1 -0
  3. package/build/i18n/es.json +1 -0
  4. package/build/i18n/fr.json +1 -0
  5. package/build/i18n/hu.json +1 -0
  6. package/build/i18n/id.json +1 -0
  7. package/build/i18n/it.json +1 -0
  8. package/build/i18n/ja.json +1 -0
  9. package/build/i18n/pl.json +1 -0
  10. package/build/i18n/pt.json +1 -0
  11. package/build/i18n/ro.json +1 -0
  12. package/build/i18n/ru.json +1 -0
  13. package/build/i18n/th.json +1 -0
  14. package/build/i18n/tr.json +1 -0
  15. package/build/i18n/zh-CN.json +1 -0
  16. package/build/i18n/zh-HK.json +1 -0
  17. package/build/index.esm.js +82 -88
  18. package/build/index.esm.js.map +1 -1
  19. package/build/index.js +82 -88
  20. package/build/index.js.map +1 -1
  21. package/build/main.css +6 -0
  22. package/build/styles/drawer/Drawer.css +3 -0
  23. package/build/styles/main.css +6 -0
  24. package/build/styles/modal/Modal.css +3 -0
  25. package/build/types/common/index.d.ts +0 -1
  26. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  27. package/build/types/inputs/SelectInput.d.ts +2 -1
  28. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  29. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  30. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  31. package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts +8 -0
  32. package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -0
  33. package/build/types/select/Select.d.ts.map +1 -1
  34. package/build/types/switch/Switch.d.ts.map +1 -1
  35. package/build/types/tabs/Tabs.d.ts.map +1 -1
  36. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  37. package/package.json +14 -17
  38. package/src/button/Button.story.tsx +3 -3
  39. package/src/common/fakeEvents.js +2 -2
  40. package/src/common/index.js +0 -1
  41. package/src/dateInput/DateInput.story.tsx +4 -3
  42. package/src/dateLookup/DateLookup.js +6 -7
  43. package/src/dateLookup/DateLookup.keyboardEvents.spec.js +24 -25
  44. package/src/dateLookup/DateLookup.story.js +4 -3
  45. package/src/dateLookup/dateTrigger/DateTrigger.spec.js +3 -3
  46. package/src/drawer/Drawer.css +3 -0
  47. package/src/drawer/Drawer.less +4 -0
  48. package/src/i18n/de.json +1 -0
  49. package/src/i18n/en.json +1 -0
  50. package/src/i18n/es.json +1 -0
  51. package/src/i18n/fr.json +1 -0
  52. package/src/i18n/hu.json +1 -0
  53. package/src/i18n/id.json +1 -0
  54. package/src/i18n/it.json +1 -0
  55. package/src/i18n/ja.json +1 -0
  56. package/src/i18n/pl.json +1 -0
  57. package/src/i18n/pt.json +1 -0
  58. package/src/i18n/ro.json +1 -0
  59. package/src/i18n/ru.json +1 -0
  60. package/src/i18n/th.json +1 -0
  61. package/src/i18n/tr.json +1 -0
  62. package/src/i18n/zh-CN.json +1 -0
  63. package/src/i18n/zh-HK.json +1 -0
  64. package/src/info/Info.story.tsx +3 -3
  65. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +2 -7
  66. package/src/inputs/SelectInput.spec.tsx +7 -0
  67. package/src/inputs/SelectInput.story.tsx +223 -317
  68. package/src/inputs/SelectInput.tsx +4 -0
  69. package/src/logo/Logo.js +4 -4
  70. package/src/main.css +6 -0
  71. package/src/modal/Modal.css +3 -0
  72. package/src/modal/Modal.less +4 -0
  73. package/src/modal/Modal.story.tsx +55 -21
  74. package/src/moneyInput/MoneyInput.story.tsx +3 -3
  75. package/src/moneyInput/MoneyInput.tsx +14 -24
  76. package/src/phoneNumberInput/PhoneNumberInput.messages.ts +8 -0
  77. package/src/phoneNumberInput/PhoneNumberInput.spec.js +12 -7
  78. package/src/phoneNumberInput/PhoneNumberInput.tsx +3 -2
  79. package/src/select/Select.js +8 -9
  80. package/src/snackbar/Snackbar.story.tsx +3 -3
  81. package/src/switch/Switch.spec.js +2 -3
  82. package/src/switch/Switch.tsx +1 -2
  83. package/src/switchOption/SwitchOption.spec.js +1 -4
  84. package/src/tabs/Tabs.js +1 -2
  85. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +5 -4
  86. package/src/tile/Tile.js +2 -2
  87. package/src/tile/Tile.spec.js +5 -5
  88. package/src/tooltip/Tooltip.story.tsx +3 -3
  89. package/src/typeahead/Typeahead.js +5 -6
  90. package/src/typeahead/Typeahead.spec.js +3 -8
  91. package/src/typeahead/Typeahead.story.js +3 -4
  92. package/build/types/common/key.d.ts +0 -9
  93. package/build/types/common/key.d.ts.map +0 -1
  94. package/build/types/common/keyCodes.d.ts +0 -16
  95. package/build/types/common/keyCodes.d.ts.map +0 -1
  96. package/src/common/key.js +0 -8
  97. package/src/common/keyCodes.js +0 -19
package/src/i18n/ja.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "詳細",
21
21
  "neptune.Link.opensInNewTab": "(新しいタブで開きます)",
22
22
  "neptune.MoneyInput.Select.placeholder": "選択してください...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "選択してください…",
23
24
  "neptune.Select.searchPlaceholder": "検索... ",
24
25
  "neptune.SelectInput.noResultsFound": "結果が見つかりませんでした",
25
26
  "neptune.Summary.statusDone": "完了",
package/src/i18n/pl.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "Więcej informacji",
21
21
  "neptune.Link.opensInNewTab": "(otworzy się w nowej zakładce)",
22
22
  "neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Wybierz opcję...",
23
24
  "neptune.Select.searchPlaceholder": "Wyszukaj...",
24
25
  "neptune.SelectInput.noResultsFound": "Nie znaleziono wyników",
25
26
  "neptune.Summary.statusDone": "Czynność wykonana",
package/src/i18n/pt.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "Mais informações",
21
21
  "neptune.Link.opensInNewTab": "(abre em uma nova aba)",
22
22
  "neptune.MoneyInput.Select.placeholder": "Escolha uma opção...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
23
24
  "neptune.Select.searchPlaceholder": "Buscar...",
24
25
  "neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
25
26
  "neptune.Summary.statusDone": "Pronto",
package/src/i18n/ro.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "Mai multe informații",
21
21
  "neptune.Link.opensInNewTab": "(se deschide într-o filă nouă)",
22
22
  "neptune.MoneyInput.Select.placeholder": "Selectează o opţiune...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Selectează o opțiune...",
23
24
  "neptune.Select.searchPlaceholder": "Caută...",
24
25
  "neptune.SelectInput.noResultsFound": "Nu s-a găsit niciun rezultat",
25
26
  "neptune.Summary.statusDone": "Finalizat",
package/src/i18n/ru.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "Подробнее",
21
21
  "neptune.Link.opensInNewTab": "(откроется в новой вкладке)",
22
22
  "neptune.MoneyInput.Select.placeholder": "Выберите вариант...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
23
24
  "neptune.Select.searchPlaceholder": "Поиск...",
24
25
  "neptune.SelectInput.noResultsFound": "Ничего не найдено",
25
26
  "neptune.Summary.statusDone": "Этап завершен",
package/src/i18n/th.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "ข้อมูลเพิ่มเติม",
21
21
  "neptune.Link.opensInNewTab": "(เปิดในแท็บใหม่)",
22
22
  "neptune.MoneyInput.Select.placeholder": "เลือกตัวเลือก...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
23
24
  "neptune.Select.searchPlaceholder": "ค้นหา...",
24
25
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
25
26
  "neptune.Summary.statusDone": "รายการที่ทำแล้ว",
package/src/i18n/tr.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "Daha fazla bilgi",
21
21
  "neptune.Link.opensInNewTab": "(yeni sekmede açılır)",
22
22
  "neptune.MoneyInput.Select.placeholder": "Bir seçenek seçin...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
23
24
  "neptune.Select.searchPlaceholder": "Ara...",
24
25
  "neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
25
26
  "neptune.Summary.statusDone": "Tamamlanan aşama",
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "更多信息",
21
21
  "neptune.Link.opensInNewTab": "(在新标签页中打开)",
22
22
  "neptune.MoneyInput.Select.placeholder": "请选择...",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "选择一个选项...",
23
24
  "neptune.Select.searchPlaceholder": "搜索",
24
25
  "neptune.SelectInput.noResultsFound": "找不到结果",
25
26
  "neptune.Summary.statusDone": "已完成",
@@ -20,6 +20,7 @@
20
20
  "neptune.Info.ariaLabel": "更多資訊",
21
21
  "neptune.Link.opensInNewTab": "(在新分頁中開啟)",
22
22
  "neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
23
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "選擇其中一項…",
23
24
  "neptune.Select.searchPlaceholder": "搜尋…",
24
25
  "neptune.SelectInput.noResultsFound": "找不到任何結果",
25
26
  "neptune.Summary.statusDone": "已完成事項",
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
- import { userEvent, within } from '@storybook/testing-library';
2
+ import { userEvent, within } from '@storybook/test';
3
3
 
4
4
  import { lorem10, storyConfig } from '../test-utils';
5
5
 
@@ -35,9 +35,9 @@ export const OpenedPopover: Story = {
35
35
  delay: 1000,
36
36
  },
37
37
  },
38
- play: ({ canvasElement }) => {
38
+ play: async ({ canvasElement }) => {
39
39
  const canvas = within(canvasElement);
40
- userEvent.click(canvas.getByRole('button'));
40
+ await userEvent.click(canvas.getByRole('button'));
41
41
  },
42
42
  };
43
43
 
@@ -1,6 +1,5 @@
1
1
  import { text } from '@storybook/addon-knobs';
2
-
3
- import { within, userEvent } from '../test-utils';
2
+ import { userEvent, within } from '@storybook/test';
4
3
 
5
4
  import InputWithDisplayFormat from '.';
6
5
 
@@ -86,9 +85,5 @@ SecurityPinPlay.args = {
86
85
 
87
86
  SecurityPinPlay.play = async ({ canvasElement }) => {
88
87
  const canvas = within(canvasElement);
89
- let i = 0;
90
- while (i < 6) {
91
- await userEvent.type(canvas.getByPlaceholderText('*-*-*-*-*-*'), `${i + 1}`, { delay: 5000 });
92
- i++;
93
- }
88
+ await userEvent.type(canvas.getByPlaceholderText('*-*-*-*-*-*'), '123456');
94
89
  };
@@ -208,4 +208,11 @@ describe('SelectInput', () => {
208
208
 
209
209
  expect(trigger).toHaveTextContent('USD, EUR');
210
210
  });
211
+
212
+ it('supports custom `id` attribute', () => {
213
+ render(<SelectInput id="custom" items={[]} />);
214
+
215
+ const trigger = screen.getAllByRole('button')[0];
216
+ expect(trigger).toHaveAttribute('id', 'custom');
217
+ });
211
218
  });