@transferwise/components 46.54.0 → 46.55.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/README.md +0 -8
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/common/panel/Panel.js +1 -2
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +1 -2
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/de.json.js +2 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +2 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/es.json +2 -0
- package/build/i18n/es.json.js +2 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +2 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +2 -0
- package/build/i18n/fr.json.js +2 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +2 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +2 -0
- package/build/i18n/hu.json.js +2 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +2 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +2 -0
- package/build/i18n/id.json.js +2 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +2 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +2 -0
- package/build/i18n/it.json.js +2 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +2 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ja.json.js +2 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +2 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pl.json.js +2 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +2 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +2 -0
- package/build/i18n/pt.json.js +2 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +2 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ro.json.js +2 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +2 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +2 -0
- package/build/i18n/ru.json.js +2 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +2 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/th.json +2 -0
- package/build/i18n/th.json.js +2 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +2 -0
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/i18n/tr.json +2 -0
- package/build/i18n/tr.json.js +2 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +2 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/i18n/zh-CN.json +2 -0
- package/build/i18n/zh-CN.json.js +2 -0
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-CN.json.mjs +2 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/main.css +1 -1
- package/build/select/Select.js +39 -123
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +39 -119
- package/build/select/Select.mjs.map +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/types/button/Button.d.ts +2 -2
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/select/Select.d.ts +64 -94
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/select/index.d.ts +2 -2
- package/build/types/select/index.d.ts.map +1 -1
- package/build/types/select/option/index.d.ts +1 -1
- package/build/types/select/option/index.d.ts.map +1 -1
- package/build/types/select/searchBox/index.d.ts +1 -1
- package/build/types/select/searchBox/index.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/button/Button.tsx +2 -2
- package/src/i18n/de.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/id.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
- package/src/index.ts +6 -0
- package/src/main.css +1 -1
- package/src/nudge/Nudge.css +1 -1
- package/src/nudge/Nudge.less +1 -1
- package/src/select/{Select.spec.js → Select.spec.tsx} +8 -6
- package/src/select/{Select.js → Select.tsx} +135 -153
- package/src/select/index.ts +7 -0
- package/build/select/index.js +0 -8
- package/build/select/index.js.map +0 -1
- package/build/select/index.mjs +0 -6
- package/build/select/index.mjs.map +0 -1
- package/src/select/index.js +0 -3
- /package/src/select/option/{index.js → index.ts} +0 -0
- /package/src/select/searchBox/{SearchBox.spec.js → SearchBox.spec.tsx} +0 -0
- /package/src/select/searchBox/{index.js → index.ts} +0 -0
|
@@ -1,94 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare const Select: React.FC<SelectProps>;
|
|
68
|
-
|
|
69
|
-
export default Select;
|
|
70
|
-
|
|
71
|
-
declare const renderOptionsList: React.FC;
|
|
72
|
-
|
|
73
|
-
export default renderOptionsList;
|
|
74
|
-
|
|
75
|
-
declare const ShowMoreOption: React.FC;
|
|
76
|
-
|
|
77
|
-
export default ShowMoreOption;
|
|
78
|
-
|
|
79
|
-
declare const PlaceHolderOption: React.FC;
|
|
80
|
-
|
|
81
|
-
export default PlaceHolderOption;
|
|
82
|
-
|
|
83
|
-
declare const SeparatorOption: React.FC;
|
|
84
|
-
|
|
85
|
-
export default SeparatorOption;
|
|
86
|
-
|
|
87
|
-
declare const HeaderOption: React.FC;
|
|
88
|
-
|
|
89
|
-
export default HeaderOption;
|
|
90
|
-
|
|
91
|
-
declare const renderOption: React.FC;
|
|
92
|
-
|
|
93
|
-
export default renderOption;
|
|
94
|
-
|
|
1
|
+
import { ButtonProps } from '../button';
|
|
2
|
+
import { Size } from '../common';
|
|
3
|
+
export interface SelectOptionItem {
|
|
4
|
+
value: any;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
currency?: string;
|
|
8
|
+
note?: React.ReactNode;
|
|
9
|
+
secondary?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface SelectItem extends Partial<SelectOptionItem> {
|
|
12
|
+
header?: React.ReactNode;
|
|
13
|
+
separator?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
searchStrings?: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface SelectItemWithPlaceholder extends SelectItem {
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* No option or placeholder option is selected
|
|
22
|
+
*/
|
|
23
|
+
declare const DEFAULT_SELECTED_OPTION: null;
|
|
24
|
+
export interface SelectProps {
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
inverse?: boolean;
|
|
30
|
+
dropdownRight?: `${Size.EXTRA_SMALL | Size.SMALL | Size.MEDIUM | Size.LARGE | Size.EXTRA_LARGE}`;
|
|
31
|
+
dropdownWidth?: `${Size.SMALL | Size.MEDIUM | Size.LARGE}`;
|
|
32
|
+
size?: `${Size.SMALL | Size.MEDIUM | Size.LARGE}`;
|
|
33
|
+
block?: boolean;
|
|
34
|
+
selected?: SelectOptionItem;
|
|
35
|
+
/**
|
|
36
|
+
* Search toggle
|
|
37
|
+
* if `true` default search functionality being enabled (not case sensitive search in option labels & currency props)
|
|
38
|
+
* if `function` you can define your own search function to implement custom search experience. This search function used while filtering the options array.
|
|
39
|
+
*/
|
|
40
|
+
search?: boolean | ((option: SelectItemWithPlaceholder, searchValue: string) => boolean);
|
|
41
|
+
options: SelectItem[];
|
|
42
|
+
searchValue?: string;
|
|
43
|
+
searchPlaceholder?: string;
|
|
44
|
+
classNames?: Record<string, string>;
|
|
45
|
+
dropdownUp?: boolean;
|
|
46
|
+
buttonProps?: Extract<ButtonProps, {
|
|
47
|
+
as?: 'button';
|
|
48
|
+
}>;
|
|
49
|
+
dropdownProps?: React.ComponentPropsWithoutRef<'ul'>;
|
|
50
|
+
onChange: (value: SelectItem | typeof DEFAULT_SELECTED_OPTION) => void;
|
|
51
|
+
onFocus?: React.FocusEventHandler<HTMLDivElement>;
|
|
52
|
+
onBlur?: React.FocusEventHandler<HTMLDivElement>;
|
|
53
|
+
/**
|
|
54
|
+
* To have full control of your search value and response use `onSearchChange` function combined with `searchValue` and custom filtering on the options array.
|
|
55
|
+
* DO NOT USE TOGETHER WITH `search` PROPERTY
|
|
56
|
+
*/
|
|
57
|
+
onSearchChange?: (value: string) => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Use `SelectInput` instead (https://neptune.wise.design/blog/2023-11-28-adopting-our-new-selectinput)
|
|
61
|
+
*/
|
|
62
|
+
export default function Select({ placeholder, id, required, disabled, inverse, dropdownWidth, size, block, selected, search, onChange, onFocus, onBlur, options: defaultOptions, onSearchChange, searchValue: initSearchValue, searchPlaceholder, classNames: classNamesProp, dropdownUp, dropdownProps, buttonProps, }: SelectProps): import("react").JSX.Element;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default Select;
|
|
2
|
-
|
|
1
|
+
export { default } from './Select';
|
|
2
|
+
export type { SelectItem, SelectItemWithPlaceholder, SelectOptionItem, SelectProps, } from './Select';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/select/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,YAAY,EACV,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,WAAW,GACZ,MAAM,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/option/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,eAAe,MAAM,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './SearchBox';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.55.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"rollup-preserve-directives": "^1.1.1",
|
|
94
94
|
"storybook": "^8.2.2",
|
|
95
95
|
"@transferwise/less-config": "3.1.0",
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
96
|
+
"@wise/components-theming": "1.5.0",
|
|
97
|
+
"@transferwise/neptune-css": "14.13.2"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -123,7 +123,6 @@
|
|
|
123
123
|
"lodash.debounce": "^4.0.8",
|
|
124
124
|
"lodash.topairs": "^4.3.0",
|
|
125
125
|
"merge-props": "^6.0.0",
|
|
126
|
-
"prop-types": "^15.8.1",
|
|
127
126
|
"react-popper": "^2.3.0",
|
|
128
127
|
"react-transition-group": "^4.4.5",
|
|
129
128
|
"virtua": "^0.33.3"
|
|
@@ -142,7 +141,6 @@
|
|
|
142
141
|
"build:clean": "rm -rf lib build",
|
|
143
142
|
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --write src/i18n/*.json",
|
|
144
143
|
"build:js": "rollup --config --sourcemap",
|
|
145
|
-
"build:generate-types": "node ./scripts/generate-type-declarations.js",
|
|
146
144
|
"build:copy-files": "cpx 'src/**/!(db)/*.{json,svg}' build",
|
|
147
145
|
"build:copy-css": "cpx 'src/main.css' build/ & cpx 'src/**/*.css' build/styles/",
|
|
148
146
|
"build:copy-lang": "cpx 'src/i18n/*.json' build/i18n && cpx 'src/i18n/index.js' build/i18n",
|
package/src/button/Button.tsx
CHANGED
|
@@ -33,8 +33,8 @@ type CommonProps = {
|
|
|
33
33
|
block?: boolean;
|
|
34
34
|
disabled?: boolean;
|
|
35
35
|
loading?: boolean;
|
|
36
|
-
type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes;
|
|
37
|
-
priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary;
|
|
36
|
+
type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;
|
|
37
|
+
priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;
|
|
38
38
|
size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;
|
|
39
39
|
};
|
|
40
40
|
|
package/src/i18n/de.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "Jahr",
|
|
19
19
|
"neptune.FlowNavigation.back": "zurück zum vorherigen Schritt",
|
|
20
20
|
"neptune.Info.ariaLabel": "Weitere Informationen",
|
|
21
|
+
"neptune.Label.optional": "(Optional)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(wird in einem neuen Tab geöffnet)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Wähle eine der Möglichkeiten aus...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Dateityp wird nicht unterstützt. Bitte versuche es erneut mit einer anderen Datei",
|
|
36
37
|
"neptune.Upload.psButtonText": "Abbrechen",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Wird hochgeladen...",
|
|
39
|
+
"neptune.Upload.retry": "Erneut versuchen",
|
|
38
40
|
"neptune.Upload.usButtonText": "Oder wähle eine Datei aus",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Datei zum Hochladen in dieses Feld ziehen",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Zieh eine Datei in dieses Feld, die kleiner als {maxSize} MB ist",
|
package/src/i18n/es.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "año",
|
|
19
19
|
"neptune.FlowNavigation.back": "volver al paso anterior",
|
|
20
20
|
"neptune.Info.ariaLabel": "Más información",
|
|
21
|
+
"neptune.Label.optional": "(Opcional)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(se abre en una pestaña nueva)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Selecciona una opción...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecciona una opción...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Tipo de archivo no aceptado. Por favor, inténtalo de nuevo con un archivo diferente",
|
|
36
37
|
"neptune.Upload.psButtonText": "Cancela",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Subiendo...",
|
|
39
|
+
"neptune.Upload.retry": "Reintentar",
|
|
38
40
|
"neptune.Upload.usButtonText": "O selecciona un archivo",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Arrastra un archivo para subirlo",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Arrastra y suelta un archivo de menos de {maxSize} MB",
|
package/src/i18n/fr.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "année",
|
|
19
19
|
"neptune.FlowNavigation.back": "revenir à l'étape précédente",
|
|
20
20
|
"neptune.Info.ariaLabel": "Plus d'informations",
|
|
21
|
+
"neptune.Label.optional": "(Facultatif)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(ouvre dans un nouvel onglet)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Format non pris en charge. Veuillez réessayer avec un fichier différent",
|
|
36
37
|
"neptune.Upload.psButtonText": "Annuler",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Téléchargement...",
|
|
39
|
+
"neptune.Upload.retry": "Réessayez",
|
|
38
40
|
"neptune.Upload.usButtonText": "Ou sélectionnez un fichier",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Déposer un fichier pour démarrer le téléchargement",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Glissez-déposez un fichier de moins de {maxSize} Mo",
|
package/src/i18n/hu.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "év",
|
|
19
19
|
"neptune.FlowNavigation.back": "vissza az előző lépéshez",
|
|
20
20
|
"neptune.Info.ariaLabel": "További információ",
|
|
21
|
+
"neptune.Label.optional": "(Válaszható)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(új lapon nyílik meg)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Válassz ki egy lehetőséget...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Válassz ki egy lehetőséget...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Nem támogatott fájltípus. Kérünk, próbáld újra másik fájllal",
|
|
36
37
|
"neptune.Upload.psButtonText": "Mégsem",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Feltöltés...",
|
|
39
|
+
"neptune.Upload.retry": "Újra",
|
|
38
40
|
"neptune.Upload.usButtonText": "Vagy válaszd ki a fájlt",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Húzd ide a fájlokat a feltöltéshez",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Húzz ide egy legfeljebb {maxSize}MB méretű fájlt",
|
package/src/i18n/id.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "tahun",
|
|
19
19
|
"neptune.FlowNavigation.back": "kembali ke langkah sebelumnya",
|
|
20
20
|
"neptune.Info.ariaLabel": "Informasi lebih lanjut",
|
|
21
|
+
"neptune.Label.optional": "(Opsional)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(terbuka di tab baru)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Pilih opsi...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Pilih opsi...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Tipe file ini tidak didukung. Mohon coba lagi dengan file yang berbeda",
|
|
36
37
|
"neptune.Upload.psButtonText": "Batalkan",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Mengunggah...",
|
|
39
|
+
"neptune.Upload.retry": "Coba lagi",
|
|
38
40
|
"neptune.Upload.usButtonText": "Atau pilih file",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Letakkan file untuk mulai mengunggah",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Seret dan lepas file yang kurang dari {maxSize} MB",
|
package/src/i18n/it.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "anno",
|
|
19
19
|
"neptune.FlowNavigation.back": "torna al passaggio precedente",
|
|
20
20
|
"neptune.Info.ariaLabel": "Maggiori informazioni",
|
|
21
|
+
"neptune.Label.optional": "(Facoltativo)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(si apre in una nuova scheda)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Seleziona un'opzione...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Formato del documento non supportato. Riprova con un formato diverso",
|
|
36
37
|
"neptune.Upload.psButtonText": "Annulla",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Caricamento...",
|
|
39
|
+
"neptune.Upload.retry": "Riprova",
|
|
38
40
|
"neptune.Upload.usButtonText": "O seleziona un documento",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Rilascia il documento per iniziare il caricamento",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Trascina e rilascia un file inferiore a {maxSize}MB",
|
package/src/i18n/ja.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "年",
|
|
19
19
|
"neptune.FlowNavigation.back": "前のステップに戻る",
|
|
20
20
|
"neptune.Info.ariaLabel": "詳細",
|
|
21
|
+
"neptune.Label.optional": "(任意)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(新しいタブで開きます)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "選択してください...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選択してください…",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "ファイルの種類はサポートされていません。別のファイルで再度お試しください",
|
|
36
37
|
"neptune.Upload.psButtonText": "キャンセルする",
|
|
37
38
|
"neptune.Upload.psProcessingText": "アップロードしています…",
|
|
39
|
+
"neptune.Upload.retry": "やり直す",
|
|
38
40
|
"neptune.Upload.usButtonText": "またはファイルを選択する",
|
|
39
41
|
"neptune.Upload.usDropMessage": "ファイルをドロップしてアップロードする",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "{maxSize}MB以下のファイルをドラッグ&ドロップしてください",
|
package/src/i18n/pl.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "rok",
|
|
19
19
|
"neptune.FlowNavigation.back": "wróć do poprzedniego kroku",
|
|
20
20
|
"neptune.Info.ariaLabel": "Więcej informacji",
|
|
21
|
+
"neptune.Label.optional": "(opcjonalne)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(otworzy się w nowej zakładce)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wybierz opcję...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Nieobsługiwany typ pliku. Spróbuj ponownie z innym plikiem",
|
|
36
37
|
"neptune.Upload.psButtonText": "Anuluj",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Przesyłanie...",
|
|
39
|
+
"neptune.Upload.retry": "Spróbuj ponownie",
|
|
38
40
|
"neptune.Upload.usButtonText": "Lub wybierz plik",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Upuść plik, aby rozpocząć przesyłanie",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Przeciągnij i upuść plik nie większy niż {maxSize} MB",
|
package/src/i18n/pt.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "ano",
|
|
19
19
|
"neptune.FlowNavigation.back": "voltar à etapa anterior",
|
|
20
20
|
"neptune.Info.ariaLabel": "Mais informações",
|
|
21
|
+
"neptune.Label.optional": "(Opcional)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(abre em uma nova aba)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Escolha uma opção...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Não trabalhamos com este tipo de arquivo. Por favor, tente novamente com um arquivo diferente",
|
|
36
37
|
"neptune.Upload.psButtonText": "Cancelar",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Enviando...",
|
|
39
|
+
"neptune.Upload.retry": "Tente novamente",
|
|
38
40
|
"neptune.Upload.usButtonText": "Ou escolha um arquivo",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Arraste o arquivo para iniciar o envio",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Selecione e envie um arquivo com menos de {maxSize}MB",
|
package/src/i18n/ro.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "an",
|
|
19
19
|
"neptune.FlowNavigation.back": "înapoi la pasul anterior",
|
|
20
20
|
"neptune.Info.ariaLabel": "Mai multe informații",
|
|
21
|
+
"neptune.Label.optional": "(Opțional)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(se deschide într-o filă nouă)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Selectează o opţiune...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selectează o opțiune...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Tipul de fișier nu a fost acceptat. Te rugăm să încerci din nou cu un alt fișier",
|
|
36
37
|
"neptune.Upload.psButtonText": "Anulează",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Se încarcă...",
|
|
39
|
+
"neptune.Upload.retry": "Încearcă din nou",
|
|
38
40
|
"neptune.Upload.usButtonText": "Sau selectează un fișier",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Atașează fișierul pentru a începe încărcarea",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Glisează și atașează un fișier mai mic de {maxSize} MB",
|
package/src/i18n/ru.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "год",
|
|
19
19
|
"neptune.FlowNavigation.back": "вернуться к предыдущему шагу",
|
|
20
20
|
"neptune.Info.ariaLabel": "Подробнее",
|
|
21
|
+
"neptune.Label.optional": "(необязательно)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(откроется в новой вкладке)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Выберите вариант...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Тип файла не поддерживается. Пожалуйста, попробуйте еще раз с другим файлом",
|
|
36
37
|
"neptune.Upload.psButtonText": "Отменить",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Загружаем...",
|
|
39
|
+
"neptune.Upload.retry": "Повторить попытку",
|
|
38
40
|
"neptune.Upload.usButtonText": "Или выберите файл",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Перетащите файл, чтобы начать загрузку",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "Перетащите файл размером не более {maxSize} Mб",
|
package/src/i18n/th.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "ปี",
|
|
19
19
|
"neptune.FlowNavigation.back": "กลับไปที่ขั้นก่อนหน้า",
|
|
20
20
|
"neptune.Info.ariaLabel": "ข้อมูลเพิ่มเติม",
|
|
21
|
+
"neptune.Label.optional": "(ไม่บังคับ)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(เปิดในแท็บใหม่)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "เลือกตัวเลือก...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "ไม่รองรับประเภทไฟล์ โปรดลองอีกครั้งโดยใช้ไฟล์อื่น",
|
|
36
37
|
"neptune.Upload.psButtonText": "ยกเลิก",
|
|
37
38
|
"neptune.Upload.psProcessingText": "กำลังอัปโหลด...",
|
|
39
|
+
"neptune.Upload.retry": "ลองอีกครั้ง",
|
|
38
40
|
"neptune.Upload.usButtonText": "หรือเลือกไฟล์",
|
|
39
41
|
"neptune.Upload.usDropMessage": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "ลากและวางไฟล์ที่น้อยกว่า {maxSize} MB",
|
package/src/i18n/tr.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "yıl",
|
|
19
19
|
"neptune.FlowNavigation.back": "önceki adıma dön",
|
|
20
20
|
"neptune.Info.ariaLabel": "Daha fazla bilgi",
|
|
21
|
+
"neptune.Label.optional": "(Isteğe bağlı)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(yeni sekmede açılır)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Bir seçenek seçin...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "Desteklenmeyen dosya biçimi. Lütfen başka bir dosyayla tekrar deneyin",
|
|
36
37
|
"neptune.Upload.psButtonText": "İptal edin",
|
|
37
38
|
"neptune.Upload.psProcessingText": "Yükleniyor...",
|
|
39
|
+
"neptune.Upload.retry": "Tekrar deneyin",
|
|
38
40
|
"neptune.Upload.usButtonText": "Veya bir dosya seçin",
|
|
39
41
|
"neptune.Upload.usDropMessage": "Yüklemeyi başlatmak için dosyayı bırakın",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "{maxSize} MB'den küçük bir dosya sürükleyin ve bırakın",
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "年",
|
|
19
19
|
"neptune.FlowNavigation.back": "返回上一步",
|
|
20
20
|
"neptune.Info.ariaLabel": "更多信息",
|
|
21
|
+
"neptune.Label.optional": "(可选)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(在新标签页中打开)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "请选择...",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "选择其中一项...",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "不支持该文件类型,请试试其他文件",
|
|
36
37
|
"neptune.Upload.psButtonText": "取消",
|
|
37
38
|
"neptune.Upload.psProcessingText": "正在上传…",
|
|
39
|
+
"neptune.Upload.retry": "重试",
|
|
38
40
|
"neptune.Upload.usButtonText": "或选择文件",
|
|
39
41
|
"neptune.Upload.usDropMessage": "拖放文件开始上传",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "拖放一个不超过 {maxSize} MB 的文件",
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"neptune.DateLookup.year": "年",
|
|
19
19
|
"neptune.FlowNavigation.back": "返回上一個步驟",
|
|
20
20
|
"neptune.Info.ariaLabel": "更多資訊",
|
|
21
|
+
"neptune.Label.optional": "(可選)",
|
|
21
22
|
"neptune.Link.opensInNewTab": "(在新分頁中開啟)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
|
|
23
24
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選擇其中一項…",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"neptune.Upload.csWrongTypeMessage": "不支持檔案類型,請使用其他檔案重試",
|
|
36
37
|
"neptune.Upload.psButtonText": "取消",
|
|
37
38
|
"neptune.Upload.psProcessingText": "上載中...",
|
|
39
|
+
"neptune.Upload.retry": "重試",
|
|
38
40
|
"neptune.Upload.usButtonText": "或者選擇一個檔案",
|
|
39
41
|
"neptune.Upload.usDropMessage": "拖放檔案以開始上載",
|
|
40
42
|
"neptune.Upload.usPlaceholder": "拖放一個不超過{maxSize}MB的檔案",
|
package/src/index.ts
CHANGED
|
@@ -67,6 +67,12 @@ export type { RadioProps } from './radio';
|
|
|
67
67
|
export type { RadioGroupProps, RadioGroupRadio } from './radioGroup';
|
|
68
68
|
export type { RadioOptionProps } from './radioOption';
|
|
69
69
|
export type { SegmentedControlProps } from './segmentedControl';
|
|
70
|
+
export type {
|
|
71
|
+
SelectItem,
|
|
72
|
+
SelectItemWithPlaceholder,
|
|
73
|
+
SelectOptionItem,
|
|
74
|
+
SelectProps,
|
|
75
|
+
} from './select';
|
|
70
76
|
export type { SlidingPanelProps } from './slidingPanel';
|
|
71
77
|
export type { SnackbarProps } from './snackbar/Snackbar';
|
|
72
78
|
export type { SnackbarContextType } from './snackbar/SnackbarContext';
|
package/src/main.css
CHANGED
|
@@ -3685,7 +3685,7 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
3685
3685
|
align-self: var(--nudge-content-flex-alignment);
|
|
3686
3686
|
display: flex;
|
|
3687
3687
|
flex-direction: column;
|
|
3688
|
-
align-items: start;
|
|
3688
|
+
align-items: flex-start;
|
|
3689
3689
|
}
|
|
3690
3690
|
.wds-nudge-container .wds-nudge-content .wds-nudge-title {
|
|
3691
3691
|
color: var(--nudge-title-color);
|
package/src/nudge/Nudge.css
CHANGED
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
align-self: var(--nudge-content-flex-alignment);
|
|
156
156
|
display: flex;
|
|
157
157
|
flex-direction: column;
|
|
158
|
-
align-items: start;
|
|
158
|
+
align-items: flex-start;
|
|
159
159
|
}
|
|
160
160
|
.wds-nudge-container .wds-nudge-content .wds-nudge-title {
|
|
161
161
|
color: var(--nudge-title-color);
|
package/src/nudge/Nudge.less
CHANGED
|
@@ -2,6 +2,7 @@ import { Breakpoint } from '../common';
|
|
|
2
2
|
import { render, screen, userEvent, waitFor, mockMatchMedia } from '../test-utils';
|
|
3
3
|
|
|
4
4
|
import Select from '.';
|
|
5
|
+
import { SelectItemWithPlaceholder } from './Select';
|
|
5
6
|
|
|
6
7
|
mockMatchMedia();
|
|
7
8
|
|
|
@@ -42,7 +43,7 @@ describe('Select', () => {
|
|
|
42
43
|
global.requestAnimationFrame = originalRAF;
|
|
43
44
|
});
|
|
44
45
|
|
|
45
|
-
const openSelect = async (container) => {
|
|
46
|
+
const openSelect = async (container: HTMLElement) => {
|
|
46
47
|
const button = screen.getByRole('button');
|
|
47
48
|
await userEvent.click(button);
|
|
48
49
|
};
|
|
@@ -81,7 +82,7 @@ describe('Select', () => {
|
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
describe('when options contain searchables', () => {
|
|
84
|
-
let input;
|
|
85
|
+
let input: HTMLElement;
|
|
85
86
|
|
|
86
87
|
const searchableOptions = [
|
|
87
88
|
{
|
|
@@ -207,8 +208,8 @@ describe('Select', () => {
|
|
|
207
208
|
container.querySelector('.np-dropdown-item'),
|
|
208
209
|
);
|
|
209
210
|
expect(
|
|
210
|
-
screen.getByText('Hungarian forint').parentElement
|
|
211
|
-
|
|
211
|
+
screen.getByText('Hungarian forint').parentElement?.parentElement?.parentElement
|
|
212
|
+
?.parentElement,
|
|
212
213
|
).toHaveClass('np-dropdown-item clickable np-dropdown-item--focused');
|
|
213
214
|
});
|
|
214
215
|
|
|
@@ -231,7 +232,7 @@ describe('Select', () => {
|
|
|
231
232
|
expect(container.querySelector('.np-dropdown-item.np-dropdown-item--focused')).toStrictEqual(
|
|
232
233
|
container.querySelector('.np-dropdown-item'),
|
|
233
234
|
);
|
|
234
|
-
expect(screen.getByText('Estonia').parentElement
|
|
235
|
+
expect(screen.getByText('Estonia').parentElement?.parentElement).toHaveClass(
|
|
235
236
|
'np-dropdown-item clickable np-dropdown-item--focused',
|
|
236
237
|
);
|
|
237
238
|
});
|
|
@@ -247,7 +248,8 @@ describe('Select', () => {
|
|
|
247
248
|
});
|
|
248
249
|
|
|
249
250
|
it('should filter the options with a custom search function with 3 results', async () => {
|
|
250
|
-
const searchFunction = (option, searchValue) =>
|
|
251
|
+
const searchFunction = (option: SelectItemWithPlaceholder, searchValue: string) =>
|
|
252
|
+
typeof option.label === 'string' && option.label.includes(searchValue);
|
|
251
253
|
const { container } = render(<Select {...props} search={searchFunction} />);
|
|
252
254
|
await openSelect(container);
|
|
253
255
|
|