@transferwise/components 46.97.5 → 46.98.0
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/alert/Alert.js +8 -0
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +8 -0
- package/build/alert/Alert.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.js +3 -1
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.mjs +3 -1
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/i18n/cs.json +3 -0
- package/build/i18n/cs.json.js +3 -0
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +3 -0
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/de.json +3 -0
- package/build/i18n/de.json.js +3 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +3 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/en.json +3 -0
- package/build/i18n/en.json.js +3 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +3 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/i18n/es.json +3 -0
- package/build/i18n/es.json.js +3 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +3 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +3 -0
- package/build/i18n/fr.json.js +3 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +3 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +3 -0
- package/build/i18n/hu.json.js +3 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +3 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +3 -0
- package/build/i18n/id.json.js +3 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +3 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +3 -0
- package/build/i18n/it.json.js +3 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +3 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +3 -0
- package/build/i18n/ja.json.js +3 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +3 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/nl.json +6 -3
- package/build/i18n/pl.json +3 -0
- package/build/i18n/pl.json.js +3 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +3 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +3 -0
- package/build/i18n/pt.json.js +3 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +3 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +3 -0
- package/build/i18n/ro.json.js +3 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +3 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +3 -0
- package/build/i18n/ru.json.js +3 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +3 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/th.json +3 -0
- package/build/i18n/th.json.js +3 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +3 -0
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/i18n/tr.json +3 -0
- package/build/i18n/tr.json.js +3 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +3 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/i18n/zh-CN.json +3 -0
- package/build/i18n/zh-CN.json.js +3 -0
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-CN.json.mjs +3 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +3 -0
- package/build/i18n/zh-HK.json.js +3 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +3 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/image/Image.js +9 -10
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs +11 -11
- package/build/image/Image.mjs.map +1 -1
- package/build/main.css +5 -2
- package/build/moneyInput/MoneyInput.js +2 -6
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.js +3 -0
- package/build/moneyInput/MoneyInput.messages.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.mjs +3 -0
- package/build/moneyInput/MoneyInput.messages.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +2 -6
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +36 -2
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.js +6 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs +6 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +36 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/styles/circularButton/CircularButton.css +1 -0
- package/build/styles/dateInput/DateInput.css +2 -1
- package/build/styles/main.css +5 -2
- package/build/styles/uploadInput/uploadItem/UploadItem.css +2 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/common/closeButton/CloseButton.d.ts +2 -0
- package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
- package/build/types/image/Image.d.ts +0 -1
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.messages.d.ts +5 -0
- package/build/types/moneyInput/MoneyInput.messages.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 -1
- package/build/types/test-utils/index.d.ts +6 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts +1 -2
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/upload/steps/processingStep/processingStep.d.ts +1 -3
- package/build/types/upload/steps/processingStep/processingStep.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/upload/Upload.js +27 -43
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +27 -43
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +1 -3
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -3
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +55 -6
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +55 -6
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +12 -6
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +12 -6
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +3 -2
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +3 -2
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +6 -9
- package/src/alert/Alert.spec.tsx +11 -0
- package/src/alert/Alert.story.tsx +23 -9
- package/src/alert/Alert.tsx +14 -1
- package/src/circularButton/CircularButton.css +1 -0
- package/src/circularButton/CircularButton.less +1 -0
- package/src/circularButton/CircularButton.tests.story.tsx +23 -0
- package/src/common/closeButton/CloseButton.spec.tsx +13 -1
- package/src/common/closeButton/CloseButton.tsx +3 -0
- package/src/dateInput/DateInput.css +2 -1
- package/src/dateInput/DateInput.less +7 -4
- package/src/i18n/cs.json +3 -0
- package/src/i18n/de.json +3 -0
- package/src/i18n/en.json +3 -0
- package/src/i18n/es.json +3 -0
- package/src/i18n/fr.json +3 -0
- package/src/i18n/hu.json +3 -0
- package/src/i18n/id.json +3 -0
- package/src/i18n/it.json +3 -0
- package/src/i18n/ja.json +3 -0
- package/src/i18n/nl.json +6 -3
- package/src/i18n/pl.json +3 -0
- package/src/i18n/pt.json +3 -0
- package/src/i18n/ro.json +3 -0
- package/src/i18n/ru.json +3 -0
- package/src/i18n/th.json +3 -0
- package/src/i18n/tr.json +3 -0
- package/src/i18n/zh-CN.json +3 -0
- package/src/i18n/zh-HK.json +3 -0
- package/src/image/Image.spec.tsx +3 -3
- package/src/image/Image.tsx +10 -12
- package/src/main.css +5 -2
- package/src/moneyInput/MoneyInput.messages.ts +5 -0
- package/src/moneyInput/MoneyInput.spec.tsx +42 -5
- package/src/moneyInput/MoneyInput.story.tsx +11 -2
- package/src/moneyInput/MoneyInput.tsx +5 -7
- package/src/phoneNumberInput/PhoneNumberInput.messages.ts +8 -0
- package/src/phoneNumberInput/PhoneNumberInput.spec.tsx +77 -43
- package/src/phoneNumberInput/PhoneNumberInput.tsx +34 -2
- package/src/promoCard/__snapshots__/PromoCard.spec.tsx.snap +1 -0
- package/src/promoCard/__snapshots__/PromoCardGroup.spec.tsx.snap +2 -0
- package/src/test-utils/jest.setup.ts +0 -4
- package/src/typeahead/Typeahead.spec.tsx +182 -0
- package/src/typeahead/typeaheadInput/TypeaheadInput.spec.tsx +103 -0
- package/src/typeahead/util/highlight.spec.tsx +43 -0
- package/src/upload/Upload.spec.tsx +63 -0
- package/src/upload/Upload.story.tsx +0 -51
- package/src/upload/Upload.tests.story.tsx +93 -0
- package/src/upload/Upload.tsx +28 -49
- package/src/upload/steps/processingStep/processingStep.tsx +2 -7
- package/src/uploadInput/UploadInput.tsx +81 -8
- package/src/uploadInput/uploadItem/UploadItem.css +2 -1
- package/src/uploadInput/uploadItem/UploadItem.less +1 -1
- package/src/uploadInput/uploadItem/UploadItem.tsx +11 -6
- package/src/withDisplayFormat/WithDisplayFormat.spec.js +11 -15
- package/src/withDisplayFormat/WithDisplayFormat.tsx +3 -2
- package/src/typeahead/Typeahead.rtl.spec.tsx +0 -54
- package/src/typeahead/Typeahead.spec.js +0 -404
- package/src/typeahead/typeaheadInput/TypeaheadInput.spec.js +0 -74
- package/src/typeahead/typeaheadOption/TypeaheadOption.spec.js +0 -75
- package/src/typeahead/util/highlight.spec.js +0 -34
package/src/i18n/cs.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Volitelné)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(otevře se v nové kartě)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Vybrat možnost...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Napište měnu nebo zemi",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Vybrat měnu",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
28
31
|
"neptune.SelectOption.action.label": "Vybrat",
|
package/src/i18n/de.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Optional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(wird in einem neuen Tab geöffnet)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Wähle eine der Möglichkeiten aus...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Gib eine Währung oder ein Land ein",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Wähle eine Währung",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Ländercode",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonnummer",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Wird gesucht...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
|
|
28
31
|
"neptune.SelectOption.action.label": "Auswählen",
|
package/src/i18n/en.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Optional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Type a currency or country",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Select currency",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Select an option...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Country code",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Phone number",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
28
31
|
"neptune.SelectOption.action.label": "Choose",
|
package/src/i18n/es.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Opcional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(se abre en una pestaña nueva)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Selecciona una opción...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Indica una divisa o país",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Selecciona una divisa",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecciona una opción...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Código de país",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de teléfono",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "No se han encontrado resultados",
|
|
28
31
|
"neptune.SelectOption.action.label": "Elegir",
|
package/src/i18n/fr.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(facultatif)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(ouvre dans un nouvel onglet)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Saisissez une devise ou un pays",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Sélectionnez une devise",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Code pays",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Numéro de téléphone",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Recherche...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
|
|
28
31
|
"neptune.SelectOption.action.label": "Sélectionner",
|
package/src/i18n/hu.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Válaszható)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(új lapon nyílik meg)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Válassz ki egy lehetőséget...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Írj be egy pénznemet vagy országot",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Pénznem kiválasztása",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Válassz ki egy lehetőséget...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Országazonosító",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonszám",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Keresés...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nincs találat",
|
|
28
31
|
"neptune.SelectOption.action.label": "Kiválasztás",
|
package/src/i18n/id.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Opsional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(terbuka di tab baru)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Pilih opsi...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Ketik nama mata uang atau negara",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Pilih mata uang",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Pilih opsi...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Kode negara",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Nomor telepon",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Cari...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Hasil tidak ditemukan",
|
|
28
31
|
"neptune.SelectOption.action.label": "Pilih",
|
package/src/i18n/it.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Facoltativo)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(si apre in una nuova scheda)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Inserisci una valuta o un paese",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Scegli la valuta",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Seleziona un'opzione...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Prefisso",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Numero di telefono",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Cerca...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nessun risultato trovato",
|
|
28
31
|
"neptune.SelectOption.action.label": "Scegli",
|
package/src/i18n/ja.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(任意)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(新しいタブで開きます)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "選択してください...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "通貨または国をご入力ください",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "通貨を選択してください",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選択してください…",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "国コード",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "電話番号",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "検索する... ",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "結果が見つかりませんでした",
|
|
28
31
|
"neptune.SelectOption.action.label": "選択してください",
|
package/src/i18n/nl.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Optioneel)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(wordt geopend in een nieuw tabblad)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Selecteer een optie...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Typ een valuta of land",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Selecteer valuta",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecteer een optie...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Landcode",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefoonnummer",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Zoeken...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Geen resultaten gevonden",
|
|
28
31
|
"neptune.SelectOption.action.label": "Kiezen",
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
"neptune.StatusIcon.iconLabel.success": "Gelukt:",
|
|
34
37
|
"neptune.StatusIcon.iconLabel.warning": "Waarschuwing:",
|
|
35
38
|
"neptune.Summary.statusDone": "Item klaar",
|
|
36
|
-
"neptune.Summary.statusNotDone": "
|
|
39
|
+
"neptune.Summary.statusNotDone": "Te doen-item",
|
|
37
40
|
"neptune.Summary.statusPending": "Item in behandeling",
|
|
38
41
|
"neptune.Table.actionHeader": "Actie",
|
|
39
42
|
"neptune.Table.emptyData": "Geen resultaten gevonden",
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
"neptune.Upload.csFailureText": "Uploaden mislukt. Probeer het opnieuw",
|
|
45
48
|
"neptune.Upload.csSuccessText": "Uploaden voltooid!",
|
|
46
49
|
"neptune.Upload.csTooLargeMessage": "Upload een bestand kleiner dan {maxSize} MB",
|
|
47
|
-
"neptune.Upload.csWrongTypeMessage": "Het bestandstype wordt niet ondersteund. Probeer het opnieuw met een ander bestand
|
|
50
|
+
"neptune.Upload.csWrongTypeMessage": "Het bestandstype wordt niet ondersteund. Probeer het opnieuw met een ander bestand",
|
|
48
51
|
"neptune.Upload.psButtonText": "Annuleren",
|
|
49
52
|
"neptune.Upload.psProcessingText": "Uploaden...",
|
|
50
53
|
"neptune.Upload.retry": "Opnieuw proberen",
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
"neptune.UploadButton.maximumFiles": "Maximaal {maxFiles} bestanden.",
|
|
58
61
|
"neptune.UploadButton.uploadFile": "Bestand uploaden",
|
|
59
62
|
"neptune.UploadButton.uploadFiles": "Bestanden uploaden",
|
|
60
|
-
"neptune.UploadInput.deleteModalBody": "
|
|
63
|
+
"neptune.UploadInput.deleteModalBody": "Als je dit bestand verwijdert, wordt het van ons systeem gewist.",
|
|
61
64
|
"neptune.UploadInput.deleteModalCancelButtonText": "Annuleren",
|
|
62
65
|
"neptune.UploadInput.deleteModalConfirmButtonText": "Verwijderen",
|
|
63
66
|
"neptune.UploadInput.deleteModalTitle": "Weet je zeker dat je dit bestand wilt verwijderen?",
|
package/src/i18n/pl.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(opcjonalne)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(otworzy się w nowej zakładce)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Wpisz walutę lub kraj",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Wybierz walutę",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wybierz opcję...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Numer kierunkowy",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Numer telefonu",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Wyszukaj...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nie znaleziono wyników",
|
|
28
31
|
"neptune.SelectOption.action.label": "Wybierz",
|
package/src/i18n/pt.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Opcional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(abre em uma nova aba)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Escolha uma opção...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Digite uma moeda ou país",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Selecione a moeda",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
28
31
|
"neptune.SelectOption.action.label": "Selecionar",
|
package/src/i18n/ro.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(Opțional)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(se deschide într-o filă nouă)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Selectează o opţiune...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Tastează o monedă sau țară",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Selectează moneda",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selectează o opțiune...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Codul țării",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Număr de telefon",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Caută...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Nu s-a găsit niciun rezultat",
|
|
28
31
|
"neptune.SelectOption.action.label": "Alege",
|
package/src/i18n/ru.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(необязательно)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(откроется в новой вкладке)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Выберите вариант...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Введите валюту или страну",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Выберите валюту",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
28
31
|
"neptune.SelectOption.action.label": "Выбрать",
|
package/src/i18n/th.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(ไม่บังคับ)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(เปิดในแท็บใหม่)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "เลือกตัวเลือก...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "ป้อนสกุลเงินหรือประเทศ",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "เลือกสกุลเงิน",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "รหัสประเทศ",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "หมายเลขโทรศัพท์",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "ค้นหา...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
|
|
28
31
|
"neptune.SelectOption.action.label": "เลือก",
|
package/src/i18n/tr.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(İsteğe bağlı)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(yeni sekmede açılır)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "Bir seçenek seçin...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "Bir para birimi veya ülke girin",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "Para birimi seçin",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "Ülke kodu",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefon numarası",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "Ara...",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
|
|
28
31
|
"neptune.SelectOption.action.label": "Seç",
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(可选)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(在新标签页中打开)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "请选择...",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "输入货币或国家/地区",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "选择货币",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "选择其中一项...",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "国家/地区代码",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "电话号码",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "搜索",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "找不到结果",
|
|
28
31
|
"neptune.SelectOption.action.label": "选择",
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
"neptune.Label.optional": "(可選)",
|
|
22
22
|
"neptune.Link.opensInNewTab": "(在新分頁中開啟)",
|
|
23
23
|
"neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
|
|
24
|
+
"neptune.MoneyInput.Select.searchPlaceholder": "輸入貨幣或國家/地區",
|
|
24
25
|
"neptune.MoneyInput.Select.selectCurrencyLabel": "選擇貨幣",
|
|
25
26
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選擇其中一項…",
|
|
27
|
+
"neptune.PhoneNumberInput.countryCodeLabel": "國家/地區代碼",
|
|
28
|
+
"neptune.PhoneNumberInput.phoneNumberLabel": "電話號碼",
|
|
26
29
|
"neptune.Select.searchPlaceholder": "搜尋…",
|
|
27
30
|
"neptune.SelectInput.noResultsFound": "找不到任何結果",
|
|
28
31
|
"neptune.SelectOption.action.label": "選擇",
|
package/src/image/Image.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as useHasIntersectedUtils from '../common/hooks/useHasIntersected/useHasIntersected';
|
|
2
2
|
import { render, fireEvent, screen } from '../test-utils';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { ImageProps } from './Image';
|
|
5
5
|
|
|
6
6
|
import Image from '.';
|
|
7
7
|
|
|
@@ -32,14 +32,14 @@ describe('Image', () => {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
describe('when lazy loading is enabled', () => {
|
|
35
|
-
it('renders the image with
|
|
35
|
+
it('renders the image with actual src even if element is not visible', () => {
|
|
36
36
|
jest.spyOn(useHasIntersectedUtils, 'useHasIntersected').mockReturnValue([false]);
|
|
37
37
|
render(<Image {...props} />);
|
|
38
38
|
|
|
39
39
|
const image: HTMLImageElement = screen.getByRole('img');
|
|
40
40
|
|
|
41
41
|
expect(image).toBeInTheDocument();
|
|
42
|
-
expect(image.src).toStrictEqual(
|
|
42
|
+
expect(image.src).toStrictEqual(props.src);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
it('renders the image with src if element is visible', () => {
|
package/src/image/Image.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
|
-
import { useRef } from 'react';
|
|
2
|
+
import { useRef, useCallback } from 'react';
|
|
3
3
|
|
|
4
4
|
import { useHasIntersected } from '../common/hooks';
|
|
5
5
|
|
|
@@ -16,9 +16,6 @@ export interface ImageProps {
|
|
|
16
16
|
shrink?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const EmptyTransparentImage =
|
|
20
|
-
'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
|
|
21
|
-
|
|
22
19
|
const Image = ({
|
|
23
20
|
id,
|
|
24
21
|
src,
|
|
@@ -33,20 +30,21 @@ const Image = ({
|
|
|
33
30
|
}: ImageProps) => {
|
|
34
31
|
const elementReference = useRef<HTMLImageElement>(null);
|
|
35
32
|
const [hasIntersected] = useHasIntersected({ elRef: elementReference, loading });
|
|
36
|
-
let imageSource = src;
|
|
37
|
-
let imageOnLoad = onLoad;
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
// Internal onLoad handler that calls user onLoad only if hasIntersected is true
|
|
35
|
+
const handleLoad = useCallback(() => {
|
|
36
|
+
if (hasIntersected && onLoad) {
|
|
37
|
+
onLoad();
|
|
38
|
+
}
|
|
39
|
+
}, [hasIntersected, onLoad]);
|
|
43
40
|
|
|
44
41
|
return (
|
|
45
42
|
<img
|
|
46
43
|
ref={elementReference}
|
|
47
44
|
id={id}
|
|
48
45
|
alt={alt}
|
|
49
|
-
src={
|
|
46
|
+
src={src}
|
|
47
|
+
loading={loading}
|
|
50
48
|
className={clsx([
|
|
51
49
|
'tw-image',
|
|
52
50
|
{
|
|
@@ -56,7 +54,7 @@ const Image = ({
|
|
|
56
54
|
className,
|
|
57
55
|
])}
|
|
58
56
|
role={role}
|
|
59
|
-
onLoad={
|
|
57
|
+
onLoad={handleLoad}
|
|
60
58
|
onError={onError}
|
|
61
59
|
/>
|
|
62
60
|
);
|
package/src/main.css
CHANGED
|
@@ -1402,6 +1402,7 @@
|
|
|
1402
1402
|
}
|
|
1403
1403
|
.np-circular-btn-primary-default .np-circular-btn-label,
|
|
1404
1404
|
.np-circular-btn-secondary-default .np-circular-btn-label {
|
|
1405
|
+
text-align: center;
|
|
1405
1406
|
color: var(--color-interactive-primary);
|
|
1406
1407
|
}
|
|
1407
1408
|
.np-circular-btn-primary-default .np-circular-btn-label:not(.disabled):not(:disabled):hover,
|
|
@@ -1909,8 +1910,9 @@ button.np-option {
|
|
|
1909
1910
|
border-color: rgba(0,0,0,0.10196);
|
|
1910
1911
|
border-color: var(--color-border-neutral);
|
|
1911
1912
|
}
|
|
1912
|
-
.tw-date label {
|
|
1913
|
+
.np-theme-personal .tw-date label {
|
|
1913
1914
|
width: 100%;
|
|
1915
|
+
margin-bottom: 0;
|
|
1914
1916
|
}
|
|
1915
1917
|
.tw-date-lookup-menu {
|
|
1916
1918
|
width: 400px;
|
|
@@ -6243,7 +6245,8 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
6243
6245
|
padding-left: var(--size-16);
|
|
6244
6246
|
}
|
|
6245
6247
|
.np-upload-input__item .np-upload-input-errors > li::before {
|
|
6246
|
-
content: '•';
|
|
6248
|
+
content: '•' ;
|
|
6249
|
+
content: '•' / '';
|
|
6247
6250
|
position: absolute;
|
|
6248
6251
|
display: block;
|
|
6249
6252
|
left: 0;
|
|
@@ -5,6 +5,11 @@ export default defineMessages({
|
|
|
5
5
|
id: 'neptune.MoneyInput.Select.placeholder',
|
|
6
6
|
defaultMessage: 'Select an option...',
|
|
7
7
|
},
|
|
8
|
+
searchPlaceholder: {
|
|
9
|
+
id: 'neptune.MoneyInput.Select.searchPlaceholder',
|
|
10
|
+
defaultMessage: 'Type a currency or country',
|
|
11
|
+
description: 'Default placeholder text for the search input in the currency selector.',
|
|
12
|
+
},
|
|
8
13
|
selectCurrencyLabel: {
|
|
9
14
|
id: 'neptune.MoneyInput.Select.selectCurrencyLabel',
|
|
10
15
|
defaultMessage: 'Select currency',
|
|
@@ -316,11 +316,21 @@ describe('Money Input', () => {
|
|
|
316
316
|
});
|
|
317
317
|
});
|
|
318
318
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
describe('search placeholder', () => {
|
|
320
|
+
it('uses default value', async () => {
|
|
321
|
+
customRender();
|
|
322
|
+
await openDropdown();
|
|
323
|
+
expect(
|
|
324
|
+
screen.getByRole('combobox', { name: messages.searchPlaceholder.defaultMessage }),
|
|
325
|
+
).toBeInTheDocument();
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
it('allows for custom values', async () => {
|
|
329
|
+
const searchPlaceholder = 'custom placeholder';
|
|
330
|
+
customRender({ searchPlaceholder });
|
|
331
|
+
await openDropdown();
|
|
332
|
+
expect(screen.getByRole('combobox', { name: searchPlaceholder })).toBeInTheDocument();
|
|
333
|
+
});
|
|
324
334
|
});
|
|
325
335
|
|
|
326
336
|
it('calls onSearchChange', async () => {
|
|
@@ -465,4 +475,31 @@ describe('Money Input', () => {
|
|
|
465
475
|
expect(triggerLabel).toBeTruthy();
|
|
466
476
|
expect(screen.getByRole('listbox', { name: triggerLabel ?? '' })).toBeInTheDocument();
|
|
467
477
|
});
|
|
478
|
+
|
|
479
|
+
it('renders custom action button in dropdown footer and calls onCustomAction', async () => {
|
|
480
|
+
const onCustomAction = jest.fn();
|
|
481
|
+
render(
|
|
482
|
+
<MoneyInput
|
|
483
|
+
currencies={[
|
|
484
|
+
{ value: 'USD', label: 'US Dollar', currency: 'usd' },
|
|
485
|
+
{ value: 'EUR', label: 'Euro', currency: 'eur' },
|
|
486
|
+
]}
|
|
487
|
+
selectedCurrency={{ value: 'USD', label: 'US Dollar', currency: 'usd' }}
|
|
488
|
+
amount={100}
|
|
489
|
+
customActionLabel="Go to Wishes"
|
|
490
|
+
onCurrencyChange={jest.fn()}
|
|
491
|
+
onAmountChange={jest.fn()}
|
|
492
|
+
onCustomAction={onCustomAction}
|
|
493
|
+
/>,
|
|
494
|
+
);
|
|
495
|
+
|
|
496
|
+
const trigger = screen.getByRole('combobox', { name: /select currency/i });
|
|
497
|
+
await userEvent.click(trigger);
|
|
498
|
+
|
|
499
|
+
const customActionBtn = await screen.findByRole('button', { name: /go to wishes/i });
|
|
500
|
+
expect(customActionBtn).toBeInTheDocument();
|
|
501
|
+
|
|
502
|
+
await userEvent.click(customActionBtn);
|
|
503
|
+
expect(onCustomAction).toHaveBeenCalled();
|
|
504
|
+
});
|
|
468
505
|
});
|
|
@@ -5,6 +5,7 @@ import { useState } from 'react';
|
|
|
5
5
|
|
|
6
6
|
import MoneyInput, { CurrencyOptionItem } from '.';
|
|
7
7
|
import { Field } from '../field/Field';
|
|
8
|
+
import translations from '../i18n/en.json';
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
component: MoneyInput,
|
|
@@ -27,9 +28,19 @@ export default {
|
|
|
27
28
|
args: {
|
|
28
29
|
amount: 1000,
|
|
29
30
|
id: 'moneyInput',
|
|
31
|
+
searchPlaceholder: '',
|
|
30
32
|
onAmountChange: () => {},
|
|
31
33
|
onCurrencyChange: () => {},
|
|
32
34
|
},
|
|
35
|
+
argTypes: {
|
|
36
|
+
searchPlaceholder: {
|
|
37
|
+
table: {
|
|
38
|
+
defaultValue: {
|
|
39
|
+
summary: `"${translations['neptune.MoneyInput.Select.searchPlaceholder']}"`,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
33
44
|
tags: ['autodocs'],
|
|
34
45
|
} satisfies Meta<typeof MoneyInput>;
|
|
35
46
|
|
|
@@ -128,7 +139,6 @@ export const MultipleCurrencies: Story = {
|
|
|
128
139
|
console.log('Custom action');
|
|
129
140
|
},
|
|
130
141
|
selectedCurrency: exampleCurrency.usd,
|
|
131
|
-
searchPlaceholder: 'Type a currency / country',
|
|
132
142
|
id: 'moneyInput',
|
|
133
143
|
},
|
|
134
144
|
};
|
|
@@ -143,7 +153,6 @@ export const BalanceCurrencies: Story = {
|
|
|
143
153
|
exampleBalanceCurrency.gbp,
|
|
144
154
|
],
|
|
145
155
|
selectedCurrency: exampleBalanceCurrency.eur,
|
|
146
|
-
searchPlaceholder: 'Type a currency / country',
|
|
147
156
|
},
|
|
148
157
|
};
|
|
149
158
|
|
|
@@ -262,11 +262,6 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
262
262
|
this.props.onCurrencyChange?.(value);
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
-
handleCustomAction = () => {
|
|
266
|
-
this.handleSearchChange('');
|
|
267
|
-
this.props.onCustomAction?.();
|
|
268
|
-
};
|
|
269
|
-
|
|
270
265
|
handleSearchChange = (searchQuery: string) => {
|
|
271
266
|
this.setState({ searchQuery });
|
|
272
267
|
this.props.onSearchChange?.({
|
|
@@ -413,7 +408,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
413
408
|
this.props.onCustomAction
|
|
414
409
|
? () => (
|
|
415
410
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
416
|
-
<div role="button" tabIndex={0} onClick={this.
|
|
411
|
+
<div role="button" tabIndex={0} onClick={this.props.onCustomAction}>
|
|
417
412
|
{this.props.customActionLabel}
|
|
418
413
|
</div>
|
|
419
414
|
)
|
|
@@ -421,7 +416,10 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
421
416
|
}
|
|
422
417
|
placeholder={this.props.intl.formatMessage(messages.selectPlaceholder)}
|
|
423
418
|
filterable
|
|
424
|
-
filterPlaceholder={
|
|
419
|
+
filterPlaceholder={
|
|
420
|
+
this.props.searchPlaceholder ||
|
|
421
|
+
this.props.intl.formatMessage(messages.searchPlaceholder)
|
|
422
|
+
}
|
|
425
423
|
disabled={disabled}
|
|
426
424
|
size={size}
|
|
427
425
|
onChange={this.handleSelectChange}
|
|
@@ -5,4 +5,12 @@ export default defineMessages({
|
|
|
5
5
|
id: 'neptune.PhoneNumberInput.SelectInput.placeholder',
|
|
6
6
|
defaultMessage: 'Select an option...',
|
|
7
7
|
},
|
|
8
|
+
countryCodeLabel: {
|
|
9
|
+
id: 'neptune.PhoneNumberInput.countryCodeLabel',
|
|
10
|
+
defaultMessage: 'Country code',
|
|
11
|
+
},
|
|
12
|
+
phoneNumberLabel: {
|
|
13
|
+
id: 'neptune.PhoneNumberInput.phoneNumberLabel',
|
|
14
|
+
defaultMessage: 'Phone number',
|
|
15
|
+
},
|
|
8
16
|
});
|