@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.
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/hu.json +1 -0
- package/build/i18n/id.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/ja.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/th.json +1 -0
- package/build/i18n/tr.json +1 -0
- package/build/i18n/zh-CN.json +1 -0
- package/build/i18n/zh-HK.json +1 -0
- package/build/index.esm.js +82 -88
- package/build/index.esm.js.map +1 -1
- package/build/index.js +82 -88
- package/build/index.js.map +1 -1
- package/build/main.css +6 -0
- package/build/styles/drawer/Drawer.css +3 -0
- package/build/styles/main.css +6 -0
- package/build/styles/modal/Modal.css +3 -0
- package/build/types/common/index.d.ts +0 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +2 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts +8 -0
- package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -0
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/package.json +14 -17
- package/src/button/Button.story.tsx +3 -3
- package/src/common/fakeEvents.js +2 -2
- package/src/common/index.js +0 -1
- package/src/dateInput/DateInput.story.tsx +4 -3
- package/src/dateLookup/DateLookup.js +6 -7
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +24 -25
- package/src/dateLookup/DateLookup.story.js +4 -3
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +3 -3
- package/src/drawer/Drawer.css +3 -0
- package/src/drawer/Drawer.less +4 -0
- package/src/i18n/de.json +1 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +1 -0
- package/src/i18n/fr.json +1 -0
- package/src/i18n/hu.json +1 -0
- package/src/i18n/id.json +1 -0
- package/src/i18n/it.json +1 -0
- package/src/i18n/ja.json +1 -0
- package/src/i18n/pl.json +1 -0
- package/src/i18n/pt.json +1 -0
- package/src/i18n/ro.json +1 -0
- package/src/i18n/ru.json +1 -0
- package/src/i18n/th.json +1 -0
- package/src/i18n/tr.json +1 -0
- package/src/i18n/zh-CN.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
- package/src/info/Info.story.tsx +3 -3
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +2 -7
- package/src/inputs/SelectInput.spec.tsx +7 -0
- package/src/inputs/SelectInput.story.tsx +223 -317
- package/src/inputs/SelectInput.tsx +4 -0
- package/src/logo/Logo.js +4 -4
- package/src/main.css +6 -0
- package/src/modal/Modal.css +3 -0
- package/src/modal/Modal.less +4 -0
- package/src/modal/Modal.story.tsx +55 -21
- package/src/moneyInput/MoneyInput.story.tsx +3 -3
- package/src/moneyInput/MoneyInput.tsx +14 -24
- package/src/phoneNumberInput/PhoneNumberInput.messages.ts +8 -0
- package/src/phoneNumberInput/PhoneNumberInput.spec.js +12 -7
- package/src/phoneNumberInput/PhoneNumberInput.tsx +3 -2
- package/src/select/Select.js +8 -9
- package/src/snackbar/Snackbar.story.tsx +3 -3
- package/src/switch/Switch.spec.js +2 -3
- package/src/switch/Switch.tsx +1 -2
- package/src/switchOption/SwitchOption.spec.js +1 -4
- package/src/tabs/Tabs.js +1 -2
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +5 -4
- package/src/tile/Tile.js +2 -2
- package/src/tile/Tile.spec.js +5 -5
- package/src/tooltip/Tooltip.story.tsx +3 -3
- package/src/typeahead/Typeahead.js +5 -6
- package/src/typeahead/Typeahead.spec.js +3 -8
- package/src/typeahead/Typeahead.story.js +3 -4
- package/build/types/common/key.d.ts +0 -9
- package/build/types/common/key.d.ts.map +0 -1
- package/build/types/common/keyCodes.d.ts +0 -16
- package/build/types/common/keyCodes.d.ts.map +0 -1
- package/src/common/key.js +0 -8
- 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",
|
package/src/i18n/zh-CN.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/zh-HK.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/info/Info.story.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { userEvent, within } from '@storybook/
|
|
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
|
-
|
|
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
|
});
|