@transferwise/components 0.0.0-experimental-bb03a6a → 0.0.0-experimental-6d4124a
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/README.md +1 -1
- package/build/i18n/{cs.json → cs-CZ.json} +10 -3
- package/build/i18n/{de.json → de-DE.json} +10 -3
- package/{src/i18n/es.json → build/i18n/es-ES.json} +10 -3
- package/{src/i18n/fr.json → build/i18n/fr-FR.json} +10 -3
- package/{src/i18n/hu.json → build/i18n/hu-HU.json} +10 -3
- package/{src/i18n/id.json → build/i18n/id-ID.json} +10 -3
- package/build/i18n/{it.json → it-IT.json} +10 -3
- package/build/i18n/{ja.json → ja-JP.json} +10 -3
- package/build/i18n/{pl.json → pl-PL.json} +10 -3
- package/build/i18n/{pt.json → pt-BR.json} +10 -3
- package/{src/i18n/ro.json → build/i18n/ro-RO.json} +10 -3
- package/build/i18n/{ru.json → ru-RU.json} +10 -3
- package/build/i18n/{th.json → th-TH.json} +10 -3
- package/{src/i18n/tr.json → build/i18n/tr-TR.json} +10 -3
- package/{src/i18n/uk.json → build/i18n/uk-UA.json} +10 -3
- package/build/i18n/zh-CN.json +10 -3
- package/{src/i18n/zh.json → build/i18n/zh-HK.json} +10 -3
- package/build/index.esm.js +441 -169
- package/build/index.esm.js.map +1 -1
- package/build/index.js +439 -167
- package/build/index.js.map +1 -1
- package/build/types/common/locale/index.d.ts +40 -31
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +2 -16
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/index.d.ts +1 -1
- package/build/types/dateLookup/tableLink/index.d.ts.map +1 -1
- package/build/types/i18n/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/button/Button.spec.js +12 -0
- package/src/button/Button.tsx +1 -1
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +8 -8
- package/src/common/focusBoundary/FocusBoundary.tsx +4 -4
- package/src/common/locale/index.spec.js +27 -37
- package/src/common/locale/index.ts +192 -0
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +0 -26
- package/src/dateLookup/tableLink/TableLink.js +70 -0
- package/src/i18n/{cs.json → cs-CZ.json} +10 -3
- package/src/i18n/{de.json → de-DE.json} +10 -3
- package/{build/i18n/es.json → src/i18n/es-ES.json} +10 -3
- package/{build/i18n/fr.json → src/i18n/fr-FR.json} +10 -3
- package/{build/i18n/hu.json → src/i18n/hu-HU.json} +10 -3
- package/{build/i18n/id.json → src/i18n/id-ID.json} +10 -3
- package/src/i18n/index.ts +36 -32
- package/src/i18n/{it.json → it-IT.json} +10 -3
- package/src/i18n/{ja.json → ja-JP.json} +10 -3
- package/src/i18n/{pl.json → pl-PL.json} +10 -3
- package/src/i18n/{pt.json → pt-BR.json} +10 -3
- package/{build/i18n/ro.json → src/i18n/ro-RO.json} +10 -3
- package/src/i18n/{ru.json → ru-RU.json} +10 -3
- package/src/i18n/{th.json → th-TH.json} +10 -3
- package/{build/i18n/tr.json → src/i18n/tr-TR.json} +10 -3
- package/{build/i18n/uk.json → src/i18n/uk-UA.json} +10 -3
- package/src/i18n/zh-CN.json +10 -3
- package/{build/i18n/zh.json → src/i18n/zh-HK.json} +10 -3
- package/src/index.ts +1 -1
- package/src/inputs/SelectInput.tsx +8 -3
- package/src/provider/Provider.js +1 -1
- package/src/provider/Provider.spec.tsx +3 -3
- package/src/ssr.spec.js +2 -2
- package/src/test-utils/index.js +1 -1
- package/build/i18n/zh_CN.json +0 -44
- package/src/common/locale/index.js +0 -130
- package/src/dateLookup/tableLink/TableLink.tsx +0 -74
- package/src/i18n/zh_CN.json +0 -44
- /package/build/i18n/{en.json → en-GB.json} +0 -0
- /package/src/dateLookup/tableLink/{index.ts → index.js} +0 -0
- /package/src/i18n/{en.json → en-GB.json} +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { injectIntl } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import messages from '../DateLookup.messages';
|
|
6
|
+
|
|
7
|
+
class TableLink extends PureComponent {
|
|
8
|
+
onClick = (event) => {
|
|
9
|
+
event.preventDefault();
|
|
10
|
+
if (!this.props.disabled) {
|
|
11
|
+
this.props.onClick(this.props.item);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
calculateAriaLabel = (longTitle, title, active, type, formatMessage) => {
|
|
16
|
+
if (active) {
|
|
17
|
+
return `${longTitle || title}, ${formatMessage(messages.selected)} ${formatMessage(
|
|
18
|
+
messages[type],
|
|
19
|
+
)}`;
|
|
20
|
+
}
|
|
21
|
+
return longTitle || title;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
render() {
|
|
25
|
+
const {
|
|
26
|
+
item,
|
|
27
|
+
type,
|
|
28
|
+
title,
|
|
29
|
+
longTitle,
|
|
30
|
+
active,
|
|
31
|
+
disabled,
|
|
32
|
+
today,
|
|
33
|
+
intl: { formatMessage },
|
|
34
|
+
} = this.props;
|
|
35
|
+
return (
|
|
36
|
+
<>
|
|
37
|
+
<button
|
|
38
|
+
type="button"
|
|
39
|
+
className={`tw-date-lookup-${type}-option ${active ? 'active' : ''} ${
|
|
40
|
+
today ? 'today' : ''
|
|
41
|
+
} np-text-body-default-bold`}
|
|
42
|
+
disabled={disabled}
|
|
43
|
+
aria-label={this.calculateAriaLabel(longTitle, title, active, type, formatMessage)}
|
|
44
|
+
aria-pressed={active}
|
|
45
|
+
onClick={this.onClick}
|
|
46
|
+
>
|
|
47
|
+
{title || item}
|
|
48
|
+
</button>
|
|
49
|
+
</>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
TableLink.propTypes = {
|
|
55
|
+
item: PropTypes.number.isRequired, // day (1-31), month (0-11) or year (2018 etc)
|
|
56
|
+
type: PropTypes.oneOf(['day', 'month', 'year']).isRequired,
|
|
57
|
+
title: PropTypes.string,
|
|
58
|
+
longTitle: PropTypes.string,
|
|
59
|
+
active: PropTypes.bool.isRequired,
|
|
60
|
+
disabled: PropTypes.bool.isRequired,
|
|
61
|
+
today: PropTypes.bool.isRequired,
|
|
62
|
+
onClick: PropTypes.func.isRequired,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
TableLink.defaultProps = {
|
|
66
|
+
title: null,
|
|
67
|
+
longTitle: null,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default injectIntl(TableLink);
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "načítání",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Vyčistit {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Vyčistit",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Zavřít",
|
|
5
6
|
"neptune.DateInput.day.label": "Den",
|
|
6
7
|
"neptune.DateInput.month.label": "Měsíc",
|
|
7
8
|
"neptune.DateInput.year.label": "Rok",
|
|
9
|
+
"neptune.DateLookup.day": "den",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "měsíc",
|
|
12
|
+
"neptune.DateLookup.next": "další",
|
|
13
|
+
"neptune.DateLookup.previous": "předchozí",
|
|
14
|
+
"neptune.DateLookup.selected": "vybráno",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 let",
|
|
16
|
+
"neptune.DateLookup.year": "rok",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Vybrat možnost...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navigace v Pagination",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Přejít na stránku {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Současná stránka, stránka {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
13
20
|
"neptune.Summary.statusDone": "Položka dokončena",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Položka k dokončení",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "wird geladen",
|
|
2
3
|
"neptune.Chips.ariaLabel": "{choice} zurücksetzen",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Zurücksetzen",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Schließen",
|
|
5
6
|
"neptune.DateInput.day.label": "Tag",
|
|
6
7
|
"neptune.DateInput.month.label": "Monat",
|
|
7
8
|
"neptune.DateInput.year.label": "Jahr",
|
|
9
|
+
"neptune.DateLookup.day": "Tag",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Zur 20-Jahres-Ansicht",
|
|
11
|
+
"neptune.DateLookup.month": "Monat",
|
|
12
|
+
"neptune.DateLookup.next": "weiter",
|
|
13
|
+
"neptune.DateLookup.previous": "zurück",
|
|
14
|
+
"neptune.DateLookup.selected": "ausgewählt",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 Jahre",
|
|
16
|
+
"neptune.DateLookup.year": "Jahr",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(wird in einem neuen Tab geöffnet)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Wähle eine der Möglichkeiten aus...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Seitennummer-Navigation",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Weiter zur Seite {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Aktuelle Seite – Seite {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Wird gesucht...",
|
|
13
20
|
"neptune.Summary.statusDone": "Schritt erledigt",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Schritt noch zu erledigen",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "cargando",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Descartar {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Borrar",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Cerrar",
|
|
5
6
|
"neptune.DateInput.day.label": "Día",
|
|
6
7
|
"neptune.DateInput.month.label": "Mes",
|
|
7
8
|
"neptune.DateInput.year.label": "Año",
|
|
9
|
+
"neptune.DateLookup.day": "día",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Ir a vista de 20 años",
|
|
11
|
+
"neptune.DateLookup.month": "mes",
|
|
12
|
+
"neptune.DateLookup.next": "siguiente",
|
|
13
|
+
"neptune.DateLookup.previous": "anterior",
|
|
14
|
+
"neptune.DateLookup.selected": "seleccionado",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 años",
|
|
16
|
+
"neptune.DateLookup.year": "año",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(se abre en una pestaña nueva)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Selecciona una opción...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navegación por las páginas",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Ve a la página {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Página actual, página {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
13
20
|
"neptune.Summary.statusDone": "Apartado listo",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Apartado a completar",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "chargement",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Effacer {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Effacer",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Fermer",
|
|
5
6
|
"neptune.DateInput.day.label": "Jour",
|
|
6
7
|
"neptune.DateInput.month.label": "Mois",
|
|
7
8
|
"neptune.DateInput.year.label": "Année",
|
|
9
|
+
"neptune.DateLookup.day": "jour",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Accéder à la vue sur 20 ans",
|
|
11
|
+
"neptune.DateLookup.month": "mois",
|
|
12
|
+
"neptune.DateLookup.next": "suivant",
|
|
13
|
+
"neptune.DateLookup.previous": "précédent",
|
|
14
|
+
"neptune.DateLookup.selected": "sélectionnée",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 ans",
|
|
16
|
+
"neptune.DateLookup.year": "année",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(ouvre dans un nouvel onglet)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navigation par pagination",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Aller à la page {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Page actuelle, page {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Recherche...",
|
|
13
20
|
"neptune.Summary.statusDone": "Validé",
|
|
14
21
|
"neptune.Summary.statusNotDone": "À compléter",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "betöltés",
|
|
2
3
|
"neptune.Chips.ariaLabel": "{choice} törlése",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Törlés",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Bezárás",
|
|
5
6
|
"neptune.DateInput.day.label": "Nap",
|
|
6
7
|
"neptune.DateInput.month.label": "Hónap",
|
|
7
8
|
"neptune.DateInput.year.label": "Év",
|
|
9
|
+
"neptune.DateLookup.day": "nap",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Ugrás a 20 éves nézetre",
|
|
11
|
+
"neptune.DateLookup.month": "hónap",
|
|
12
|
+
"neptune.DateLookup.next": "következő",
|
|
13
|
+
"neptune.DateLookup.previous": "előző",
|
|
14
|
+
"neptune.DateLookup.selected": "kiválasztva",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 év",
|
|
16
|
+
"neptune.DateLookup.year": "év",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(új lapon nyílik meg)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Válassz ki egy lehetőséget...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Lapszámos navigáció",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Ugrás a(z) {pageNumber}. oldalra",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Jelenlegi oldal, {pageNumber}. oldal",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Keresés...",
|
|
13
20
|
"neptune.Summary.statusDone": "Kész",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Hátravan",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "memuat",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Hapus {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Hapus",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Tutup",
|
|
5
6
|
"neptune.DateInput.day.label": "Hari",
|
|
6
7
|
"neptune.DateInput.month.label": "Bulan",
|
|
7
8
|
"neptune.DateInput.year.label": "Tahun",
|
|
9
|
+
"neptune.DateLookup.day": "hari",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Lihat tampilan 20 tahun",
|
|
11
|
+
"neptune.DateLookup.month": "bulan",
|
|
12
|
+
"neptune.DateLookup.next": "berikutnya",
|
|
13
|
+
"neptune.DateLookup.previous": "sebelumnya",
|
|
14
|
+
"neptune.DateLookup.selected": "terpilih",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 tahun",
|
|
16
|
+
"neptune.DateLookup.year": "tahun",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(terbuka di tab baru)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Pilih opsi...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Halaman navigasi",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Lanjut ke halaman {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Halaman saat ini, halaman {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Cari...",
|
|
13
20
|
"neptune.Summary.statusDone": "Item selesai",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Item yang harus dilakukan",
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
1
|
+
import cs from './cs-CZ.json';
|
|
2
|
+
import de from './de-DE.json';
|
|
3
|
+
import en from './en-GB.json';
|
|
4
|
+
import es from './es-ES.json';
|
|
5
|
+
import fr from './fr-FR.json';
|
|
6
|
+
import hu from './hu-HU.json';
|
|
7
|
+
import id from './id-ID.json';
|
|
8
|
+
import it from './it-IT.json';
|
|
9
|
+
import ja from './ja-JP.json';
|
|
10
|
+
import pl from './pl-PL.json';
|
|
11
|
+
import pt from './pt-BR.json';
|
|
12
|
+
import ro from './ro-RO.json';
|
|
13
|
+
import ru from './ru-RU.json';
|
|
14
|
+
import th from './th-TH.json';
|
|
15
|
+
import tr from './tr-TR.json';
|
|
16
|
+
import uk from './uk-UA.json';
|
|
17
|
+
import zhCN from './zh-CN.json';
|
|
18
|
+
import zhHK from './zh-HK.json';
|
|
17
19
|
|
|
18
20
|
const translations: Record<string, Record<string, string>> = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
'cs-CZ': cs,
|
|
22
|
+
'de-DE': de,
|
|
23
|
+
'en-GB': en,
|
|
24
|
+
'es-ES': es,
|
|
25
|
+
'fr-FR': fr,
|
|
26
|
+
'hu-HU': hu,
|
|
27
|
+
'id-ID': id,
|
|
28
|
+
'it-IT': it,
|
|
29
|
+
'ja-JP': ja,
|
|
30
|
+
'pl-PL': pl,
|
|
31
|
+
'pt-BR': pt,
|
|
32
|
+
'ro-RO': ro,
|
|
33
|
+
'ru-RU': ru,
|
|
34
|
+
'th-TH': th,
|
|
35
|
+
'tr-TR': tr,
|
|
36
|
+
'uk-UA': uk,
|
|
37
|
+
'zh-CN': zhCN,
|
|
38
|
+
'zh-HK': zhHK,
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
export default translations;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "caricamento",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Rimuovi {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Elimina",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Chiudi",
|
|
5
6
|
"neptune.DateInput.day.label": "Giorno",
|
|
6
7
|
"neptune.DateInput.month.label": "Mese",
|
|
7
8
|
"neptune.DateInput.year.label": "Anno",
|
|
9
|
+
"neptune.DateLookup.day": "giorno",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Vai alla vista su 20 anni",
|
|
11
|
+
"neptune.DateLookup.month": "mese",
|
|
12
|
+
"neptune.DateLookup.next": "continua",
|
|
13
|
+
"neptune.DateLookup.previous": "indietro",
|
|
14
|
+
"neptune.DateLookup.selected": "selezionata",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 anni",
|
|
16
|
+
"neptune.DateLookup.year": "anno",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(si apre in una nuova scheda)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navigazione",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Via a pagina {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Pagina corrente, pagina {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Cerca...",
|
|
13
20
|
"neptune.Summary.statusDone": "Completato",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Da completare",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "読み込み中…",
|
|
2
3
|
"neptune.Chips.ariaLabel": "{choice} をクリア",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "消去",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "閉じる",
|
|
5
6
|
"neptune.DateInput.day.label": "日",
|
|
6
7
|
"neptune.DateInput.month.label": "月",
|
|
7
8
|
"neptune.DateInput.year.label": "年",
|
|
9
|
+
"neptune.DateLookup.day": "日",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "20年表示に移動する",
|
|
11
|
+
"neptune.DateLookup.month": "月",
|
|
12
|
+
"neptune.DateLookup.next": "次",
|
|
13
|
+
"neptune.DateLookup.previous": "前",
|
|
14
|
+
"neptune.DateLookup.selected": "選択済み",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20年",
|
|
16
|
+
"neptune.DateLookup.year": "年",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(新しいタブで開きます)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "選択してください...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "ページネーションナビゲーション",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "{pageNumber}のページへ移動します",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "現在のページ、{pageNumber}ページ",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "検索... ",
|
|
13
20
|
"neptune.Summary.statusDone": "完了",
|
|
14
21
|
"neptune.Summary.statusNotDone": "未対応",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "ładowanie",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Wyczyść {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Wyczyść",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Zamknij",
|
|
5
6
|
"neptune.DateInput.day.label": "Dzień",
|
|
6
7
|
"neptune.DateInput.month.label": "Miesiąc",
|
|
7
8
|
"neptune.DateInput.year.label": "Rok",
|
|
9
|
+
"neptune.DateLookup.day": "dzień",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Przejdź do widoku 20-letniego",
|
|
11
|
+
"neptune.DateLookup.month": "miesiąc",
|
|
12
|
+
"neptune.DateLookup.next": "następny",
|
|
13
|
+
"neptune.DateLookup.previous": "poprzedni",
|
|
14
|
+
"neptune.DateLookup.selected": "wybrano",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 lat",
|
|
16
|
+
"neptune.DateLookup.year": "rok",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(otworzy się w nowej zakładce)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Nawigacja w paginacji",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Przejdź do strony {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Obecna strona, strona {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Wyszukaj...",
|
|
13
20
|
"neptune.Summary.statusDone": "Czynność wykonana",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Czynność do wykonania",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "carregando",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Remover {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Remover",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Fechar",
|
|
5
6
|
"neptune.DateInput.day.label": "Dia",
|
|
6
7
|
"neptune.DateInput.month.label": "Mês",
|
|
7
8
|
"neptune.DateInput.year.label": "Ano",
|
|
9
|
+
"neptune.DateLookup.day": "dia",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "mês",
|
|
12
|
+
"neptune.DateLookup.next": "próximo",
|
|
13
|
+
"neptune.DateLookup.previous": "anterior",
|
|
14
|
+
"neptune.DateLookup.selected": "selecionada",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 anos",
|
|
16
|
+
"neptune.DateLookup.year": "ano",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(abrir a página em uma nova aba)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Escolha uma opção...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navegação pelas páginas",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Ir para a página {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Página atual, página {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
13
20
|
"neptune.Summary.statusDone": "Pronto",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Não iniciado",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "se încarcă",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Șterge {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Elimină",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Închide",
|
|
5
6
|
"neptune.DateInput.day.label": "Zi",
|
|
6
7
|
"neptune.DateInput.month.label": "Lună",
|
|
7
8
|
"neptune.DateInput.year.label": "An",
|
|
9
|
+
"neptune.DateLookup.day": "zi",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Accesează vizualizarea pe 20 de ani",
|
|
11
|
+
"neptune.DateLookup.month": "luna",
|
|
12
|
+
"neptune.DateLookup.next": "înainte",
|
|
13
|
+
"neptune.DateLookup.previous": "precedenta",
|
|
14
|
+
"neptune.DateLookup.selected": "selectată",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 de ani",
|
|
16
|
+
"neptune.DateLookup.year": "anul",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(se deschide într-o filă nouă)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Selectează o opţiune...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Navigare prin pagină",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Du-te la pagina {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Pagina curentă, pagina {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Caută...",
|
|
13
20
|
"neptune.Summary.statusDone": "Finalizat",
|
|
14
21
|
"neptune.Summary.statusNotDone": "De făcut",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "загрузка",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Очистить {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Очистить",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Закрыть",
|
|
5
6
|
"neptune.DateInput.day.label": "День",
|
|
6
7
|
"neptune.DateInput.month.label": "Месяц",
|
|
7
8
|
"neptune.DateInput.year.label": "Год",
|
|
9
|
+
"neptune.DateLookup.day": "день",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Перейти к обзору 20 лет",
|
|
11
|
+
"neptune.DateLookup.month": "месяц",
|
|
12
|
+
"neptune.DateLookup.next": "далее",
|
|
13
|
+
"neptune.DateLookup.previous": "предыдущий",
|
|
14
|
+
"neptune.DateLookup.selected": "выбрано",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 лет",
|
|
16
|
+
"neptune.DateLookup.year": "год",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(откроется в новой вкладке)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Выберите вариант...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Постраничная навигация",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Перейти на страницу {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Текущая страница, страница {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
13
20
|
"neptune.Summary.statusDone": "Этап завершен",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Этап к выполнению",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "กำลังโหลด",
|
|
2
3
|
"neptune.Chips.ariaLabel": "เคลียร์ {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "ชัดเจน",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "ปิด",
|
|
5
6
|
"neptune.DateInput.day.label": "วัน",
|
|
6
7
|
"neptune.DateInput.month.label": "เดือน",
|
|
7
8
|
"neptune.DateInput.year.label": "ปี",
|
|
9
|
+
"neptune.DateLookup.day": "วัน",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "เดือน",
|
|
12
|
+
"neptune.DateLookup.next": "ถัดไป",
|
|
13
|
+
"neptune.DateLookup.previous": "ก่อนหน้า",
|
|
14
|
+
"neptune.DateLookup.selected": "เลือกแล้ว",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 ปี",
|
|
16
|
+
"neptune.DateLookup.year": "ปี",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "เลือกตัวเลือก...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "การนำทางเลขหน้า",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "ไปที่หน้า {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "หน้าปัจจุบัน หน้า {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "ค้นหา...",
|
|
13
20
|
"neptune.Summary.statusDone": "รายการที่ทำแล้ว",
|
|
14
21
|
"neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "yükleniyor",
|
|
2
3
|
"neptune.Chips.ariaLabel": "{choice} temizle",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Sil",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Kapat",
|
|
5
6
|
"neptune.DateInput.day.label": "Gün",
|
|
6
7
|
"neptune.DateInput.month.label": "Ay",
|
|
7
8
|
"neptune.DateInput.year.label": "Yıl",
|
|
9
|
+
"neptune.DateLookup.day": "gün",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "ay",
|
|
12
|
+
"neptune.DateLookup.next": "devam et",
|
|
13
|
+
"neptune.DateLookup.previous": "önceki",
|
|
14
|
+
"neptune.DateLookup.selected": "seçili",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 yıl",
|
|
16
|
+
"neptune.DateLookup.year": "yıl",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Bir seçenek seçin...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Sayfalandırma gezintisi",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "{pageNumber} numaralı sayfaya git",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Mevcut sayfa, sayfa {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Ara...",
|
|
13
20
|
"neptune.Summary.statusDone": "Tamamlanan aşama",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Yapılacak",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "завантаження",
|
|
2
3
|
"neptune.Chips.ariaLabel": "Очистити {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "Очистити",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "Закрити",
|
|
5
6
|
"neptune.DateInput.day.label": "День",
|
|
6
7
|
"neptune.DateInput.month.label": "Місяць",
|
|
7
8
|
"neptune.DateInput.year.label": "Рік",
|
|
9
|
+
"neptune.DateLookup.day": "дня",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "місяць",
|
|
12
|
+
"neptune.DateLookup.next": "уперед",
|
|
13
|
+
"neptune.DateLookup.previous": "назад",
|
|
14
|
+
"neptune.DateLookup.selected": "вибрано",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20 років",
|
|
16
|
+
"neptune.DateLookup.year": "рік",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "Виберіть варіант…",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "Перехід за сторінками",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "Перейти на сторінку {pageNumber}",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "Ця сторінка, сторінка {pageNumber}",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "Пошук…",
|
|
13
20
|
"neptune.Summary.statusDone": "Виконано",
|
|
14
21
|
"neptune.Summary.statusNotDone": "Не виконано",
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "正在加载",
|
|
2
3
|
"neptune.Chips.ariaLabel": "清除 {choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "清晰",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "关闭",
|
|
5
6
|
"neptune.DateInput.day.label": "日",
|
|
6
7
|
"neptune.DateInput.month.label": "月",
|
|
7
8
|
"neptune.DateInput.year.label": "年",
|
|
9
|
+
"neptune.DateLookup.day": "日",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
11
|
+
"neptune.DateLookup.month": "月",
|
|
12
|
+
"neptune.DateLookup.next": "下一页",
|
|
13
|
+
"neptune.DateLookup.previous": "上一页",
|
|
14
|
+
"neptune.DateLookup.selected": "已选",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20年",
|
|
16
|
+
"neptune.DateLookup.year": "年",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "请选择...",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "分页导航",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "转到第 {pageNumber} 页",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "当前页面,第 {pageNumber} 页",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "搜索",
|
|
13
20
|
"neptune.Summary.statusDone": "已完成",
|
|
14
21
|
"neptune.Summary.statusNotDone": "未完成",
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "載入中",
|
|
2
3
|
"neptune.Chips.ariaLabel": "清除{choice}",
|
|
3
4
|
"neptune.ClearButton.ariaLabel": "清除",
|
|
4
5
|
"neptune.CloseButton.ariaLabel": "關閉",
|
|
5
6
|
"neptune.DateInput.day.label": "日",
|
|
6
7
|
"neptune.DateInput.month.label": "月",
|
|
7
8
|
"neptune.DateInput.year.label": "年",
|
|
9
|
+
"neptune.DateLookup.day": "日",
|
|
10
|
+
"neptune.DateLookup.goTo20YearView": "切換至20年視圖",
|
|
11
|
+
"neptune.DateLookup.month": "月",
|
|
12
|
+
"neptune.DateLookup.next": "下一個",
|
|
13
|
+
"neptune.DateLookup.previous": "上一個",
|
|
14
|
+
"neptune.DateLookup.selected": "已選",
|
|
15
|
+
"neptune.DateLookup.twentyYears": "20年",
|
|
16
|
+
"neptune.DateLookup.year": "年",
|
|
17
|
+
"neptune.Link.opensInNewTab": "(在新分頁中開啟)",
|
|
8
18
|
"neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
|
|
9
|
-
"neptune.Pagination.ariaLabel": "分頁導航",
|
|
10
|
-
"neptune.PaginationLink.ariaLabel.active": "前往第{pageNumber}頁",
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "目前在第{pageNumber}頁",
|
|
12
19
|
"neptune.Select.searchPlaceholder": "搜尋…",
|
|
13
20
|
"neptune.Summary.statusDone": "已完成事項",
|
|
14
21
|
"neptune.Summary.statusNotDone": "未完成事項",
|
package/src/index.ts
CHANGED
|
@@ -360,7 +360,12 @@ function SelectInputOptions<T = string>({
|
|
|
360
360
|
listboxRef,
|
|
361
361
|
}: SelectInputOptionsProps<T>) {
|
|
362
362
|
const [query, setQuery] = useState('');
|
|
363
|
-
const needle = useMemo(() =>
|
|
363
|
+
const needle = useMemo(() => {
|
|
364
|
+
if (filterable) {
|
|
365
|
+
return query ? searchableString(query) : null;
|
|
366
|
+
}
|
|
367
|
+
return undefined;
|
|
368
|
+
}, [filterable, query]);
|
|
364
369
|
|
|
365
370
|
const listboxContainerRef = useRef<HTMLDivElement>(null);
|
|
366
371
|
useEffect(() => {
|
|
@@ -449,7 +454,7 @@ interface SelectInputItemViewProps<
|
|
|
449
454
|
I extends SelectInputItem<T | undefined> = SelectInputItem<T | undefined>,
|
|
450
455
|
> extends Required<Pick<SelectInputProps<T>, 'renderValue'>> {
|
|
451
456
|
item: I;
|
|
452
|
-
needle: string | null;
|
|
457
|
+
needle: string | null | undefined;
|
|
453
458
|
}
|
|
454
459
|
|
|
455
460
|
function SelectInputItemView<T = string>({
|
|
@@ -503,7 +508,7 @@ function SelectInputGroupItemView<T = string>({
|
|
|
503
508
|
<section
|
|
504
509
|
role="group"
|
|
505
510
|
aria-labelledby={headerId}
|
|
506
|
-
className={classNames(needle
|
|
511
|
+
className={classNames(needle === null && 'np-select-input-group-item--without-needle')}
|
|
507
512
|
>
|
|
508
513
|
{needle == null ? (
|
|
509
514
|
<header
|
package/src/provider/Provider.js
CHANGED
|
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import { IntlProvider } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common';
|
|
5
|
-
import en from '../i18n/en.json';
|
|
5
|
+
import en from '../i18n/en-GB.json';
|
|
6
6
|
|
|
7
7
|
import { DirectionProvider } from './direction';
|
|
8
8
|
import { LanguageProvider } from './language';
|