@transferwise/components 46.9.0 → 46.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/hu.json +1 -0
- package/build/i18n/id.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/ja.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/th.json +1 -0
- package/build/i18n/tr.json +1 -0
- package/build/i18n/zh-CN.json +1 -0
- package/build/i18n/zh-HK.json +1 -0
- package/build/index.esm.js +82 -88
- package/build/index.esm.js.map +1 -1
- package/build/index.js +82 -88
- package/build/index.js.map +1 -1
- package/build/main.css +6 -0
- package/build/styles/drawer/Drawer.css +3 -0
- package/build/styles/main.css +6 -0
- package/build/styles/modal/Modal.css +3 -0
- package/build/types/common/index.d.ts +0 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +2 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts +8 -0
- package/build/types/phoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -0
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/package.json +14 -17
- package/src/button/Button.story.tsx +3 -3
- package/src/common/fakeEvents.js +2 -2
- package/src/common/index.js +0 -1
- package/src/dateInput/DateInput.story.tsx +4 -3
- package/src/dateLookup/DateLookup.js +6 -7
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +24 -25
- package/src/dateLookup/DateLookup.story.js +4 -3
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +3 -3
- package/src/drawer/Drawer.css +3 -0
- package/src/drawer/Drawer.less +4 -0
- package/src/i18n/de.json +1 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +1 -0
- package/src/i18n/fr.json +1 -0
- package/src/i18n/hu.json +1 -0
- package/src/i18n/id.json +1 -0
- package/src/i18n/it.json +1 -0
- package/src/i18n/ja.json +1 -0
- package/src/i18n/pl.json +1 -0
- package/src/i18n/pt.json +1 -0
- package/src/i18n/ro.json +1 -0
- package/src/i18n/ru.json +1 -0
- package/src/i18n/th.json +1 -0
- package/src/i18n/tr.json +1 -0
- package/src/i18n/zh-CN.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
- package/src/info/Info.story.tsx +3 -3
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +2 -7
- package/src/inputs/SelectInput.spec.tsx +7 -0
- package/src/inputs/SelectInput.story.tsx +223 -317
- package/src/inputs/SelectInput.tsx +4 -0
- package/src/logo/Logo.js +4 -4
- package/src/main.css +6 -0
- package/src/modal/Modal.css +3 -0
- package/src/modal/Modal.less +4 -0
- package/src/modal/Modal.story.tsx +55 -21
- package/src/moneyInput/MoneyInput.story.tsx +3 -3
- package/src/moneyInput/MoneyInput.tsx +14 -24
- package/src/phoneNumberInput/PhoneNumberInput.messages.ts +8 -0
- package/src/phoneNumberInput/PhoneNumberInput.spec.js +12 -7
- package/src/phoneNumberInput/PhoneNumberInput.tsx +3 -2
- package/src/select/Select.js +8 -9
- package/src/snackbar/Snackbar.story.tsx +3 -3
- package/src/switch/Switch.spec.js +2 -3
- package/src/switch/Switch.tsx +1 -2
- package/src/switchOption/SwitchOption.spec.js +1 -4
- package/src/tabs/Tabs.js +1 -2
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +5 -4
- package/src/tile/Tile.js +2 -2
- package/src/tile/Tile.spec.js +5 -5
- package/src/tooltip/Tooltip.story.tsx +3 -3
- package/src/typeahead/Typeahead.js +5 -6
- package/src/typeahead/Typeahead.spec.js +3 -8
- package/src/typeahead/Typeahead.story.js +3 -4
- package/build/types/common/key.d.ts +0 -9
- package/build/types/common/key.d.ts.map +0 -1
- package/build/types/common/keyCodes.d.ts +0 -16
- package/build/types/common/keyCodes.d.ts.map +0 -1
- package/src/common/key.js +0 -8
- package/src/common/keyCodes.js +0 -19
package/build/main.css
CHANGED
|
@@ -1884,6 +1884,9 @@ button.np-option {
|
|
|
1884
1884
|
overflow-y: auto;
|
|
1885
1885
|
flex: 1;
|
|
1886
1886
|
}
|
|
1887
|
+
.np-drawer .np-drawer-content .np-theme-personal {
|
|
1888
|
+
background-color: transparent;
|
|
1889
|
+
}
|
|
1887
1890
|
.np-drawer .np-drawer-footer,
|
|
1888
1891
|
.np-drawer .np-drawer-content {
|
|
1889
1892
|
padding: 16px;
|
|
@@ -3197,6 +3200,9 @@ a {
|
|
|
3197
3200
|
min-height: var(--size-32);
|
|
3198
3201
|
padding-bottom: 4px !important;
|
|
3199
3202
|
}
|
|
3203
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
3204
|
+
background-color: transparent;
|
|
3205
|
+
}
|
|
3200
3206
|
.tw-modal table,
|
|
3201
3207
|
.tw-modal .table {
|
|
3202
3208
|
background-color: transparent;
|
package/build/styles/main.css
CHANGED
|
@@ -1884,6 +1884,9 @@ button.np-option {
|
|
|
1884
1884
|
overflow-y: auto;
|
|
1885
1885
|
flex: 1;
|
|
1886
1886
|
}
|
|
1887
|
+
.np-drawer .np-drawer-content .np-theme-personal {
|
|
1888
|
+
background-color: transparent;
|
|
1889
|
+
}
|
|
1887
1890
|
.np-drawer .np-drawer-footer,
|
|
1888
1891
|
.np-drawer .np-drawer-content {
|
|
1889
1892
|
padding: 16px;
|
|
@@ -3197,6 +3200,9 @@ a {
|
|
|
3197
3200
|
min-height: var(--size-32);
|
|
3198
3201
|
padding-bottom: 4px !important;
|
|
3199
3202
|
}
|
|
3203
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
3204
|
+
background-color: transparent;
|
|
3205
|
+
}
|
|
3200
3206
|
.tw-modal table,
|
|
3201
3207
|
.tw-modal .table {
|
|
3202
3208
|
background-color: transparent;
|
|
@@ -22,6 +22,5 @@ export { Sentiment } from "./propsValues/sentiment";
|
|
|
22
22
|
export { Variant } from "./propsValues/variant";
|
|
23
23
|
export { MarkdownNodeType } from "./propsValues/markdownNodeType";
|
|
24
24
|
export { FileType } from "./fileType";
|
|
25
|
-
export { Key } from "./key";
|
|
26
25
|
export { addNoScrollClass, removeNoScrollClass } from "./DOMOperations";
|
|
27
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateLookup.d.ts","sourceRoot":"","sources":["../../../src/dateLookup/DateLookup.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateLookup.d.ts","sourceRoot":"","sources":["../../../src/dateLookup/DateLookup.js"],"names":[],"mappings":";AAoBA;IAoBE;;;;;;aAqBC;IApCD,wBAaC;IAjBD,wCAAsB;IAEtB,yCAAuB;IAIrB;;;;;;;;;;MAUC;IA0BH,6CAMC;IAFC,uCAAyE;IAI3E,6BAGC;IAED,iBAOE;IAEF,oBAME;IAEF,kBAME;IAEF,oCA6CE;IAEF,wEAmBE;IAEF,+DAOE;IAEF,gCAIE;IAEF,yBAA+C;IAE/C,2BAAmD;IAEnD,0BAAiD;IAEjD,sDAME;IAEF;;;eAEE;IAEF,+CA8BE;IAEF,wBAGE;IAEF,sCA0BC;CACF"}
|
|
@@ -16,6 +16,7 @@ export interface SelectInputSeparatorItem {
|
|
|
16
16
|
}
|
|
17
17
|
export type SelectInputItem<T = string> = SelectInputOptionItem<T> | SelectInputGroupItem<T> | SelectInputSeparatorItem;
|
|
18
18
|
export interface SelectInputProps<T = string, M extends boolean = false> {
|
|
19
|
+
id?: string;
|
|
19
20
|
name?: string;
|
|
20
21
|
multiple?: M;
|
|
21
22
|
placeholder?: string;
|
|
@@ -48,7 +49,7 @@ export interface SelectInputProps<T = string, M extends boolean = false> {
|
|
|
48
49
|
onChange?: (value: M extends true ? T[] : T) => void;
|
|
49
50
|
onClear?: () => void;
|
|
50
51
|
}
|
|
51
|
-
export declare function SelectInput<T = string, M extends boolean = false>({ name, multiple, placeholder, items, defaultValue, value: controlledValue, compareValues, renderValue, renderFooter, renderTrigger, filterable, filterPlaceholder, disabled, size, className, onFilterChange, onChange, onClear, }: SelectInputProps<T, M>): import("react").JSX.Element;
|
|
52
|
+
export declare function SelectInput<T = string, M extends boolean = false>({ id, name, multiple, placeholder, items, defaultValue, value: controlledValue, compareValues, renderValue, renderFooter, renderTrigger, filterable, filterPlaceholder, disabled, size, className, onFilterChange, onChange, onClear, }: SelectInputProps<T, M>): import("react").JSX.Element;
|
|
52
53
|
type SelectInputTriggerButtonElementType = 'button' | React.ComponentType;
|
|
53
54
|
export type SelectInputTriggerButtonProps<T extends SelectInputTriggerButtonElementType = 'button'> = Merge<React.ComponentPropsWithoutRef<T>, {
|
|
54
55
|
as?: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/inputs/SelectInput.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/inputs/SelectInput.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAoCjC,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACp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EACT,cAAqB,EACrB,QAAQ,EACR,OAAO,GACR,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,+BA+HxB;AAED,KAAK,mCAAmC,GAAG,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC;AAE1E,MAAM,MAAM,6BAA6B,CACvC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,IACtD,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEzD,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,EAAE,EACjG,EAAkB,EAClB,GAAG,SAAS,EACb,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAalC;AAwTD,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,WAAW,EACX,IAAI,GACL,EAAE,6BAA6B,+BAiD/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAc,qBAAqB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAc,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,EAKL,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAM/B,MAAM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B,CAAC,CAAC,CAAC;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;;;;AAqYD,wBAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAyC,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"PhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAyC,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAkBhG,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACvD,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAKD,QAAA,MAAM,gBAAgB,4JAcnB,qBAAqB,gCAuIvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneNumberInput.messages.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.messages.ts"],"names":[],"mappings":";;;;;;AAEA,wBAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA6EA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;gCAkeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/switch/Switch.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAwB,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/switch/Switch.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAwB,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,KAAK,KAAK,GAAG,WAAW,GAAG;IACzB,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,QAAA,MAAM,MAAM,UAAW,KAAK,KAAG,YAgE9B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/tabs/Tabs.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/tabs/Tabs.js"],"names":[],"mappings":";AA4BA;IAIE,wBAcC;IAjBD,wCAAwC;IACxC,oBADW,UAAU,cAAc,CAAC,CACH;IAI/B;;;;;;;;;;;MAWC;IAGH,gBAAiB;IAEjB,uBAAmB;IAEnB,eAAa;IAEb,8BAEC;IAED,wBAEC;IAED,0BASC;IAED,iEAiCC;IAED,6BAIC;IAED,yBAME;IAEF,6CAGE;IAEF,uCAQE;IAEF,mCAIE;IAEF,2BAME;IAEF,yDAKE;IAEF,wBAeE;IAEF,8BAWE;IAMF,6DA4BE;IAEF,wDAAoF;IAEpF;;;;;yBAkBE;IAEF,gCAGE;IAEF,mDAEC;IAED,iDAIE;IAEF,kCAME;IAGF,sDAYE;IAEF,oCAME;IAEF,2CAEE;IAEF,gDAIE;IAEF,uCAYE;IAEF,sCAiDE;IAEF,qCAoCE;IAEF,sCAiKC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;;;;EAAiD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../../src/typeahead/Typeahead.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../../src/typeahead/Typeahead.js"],"names":[],"mappings":"AAyBA;IACE,wBAWC;IARC,2BAAqE;IAErE;;;;;MAKC;IAGH,uDAeC;IAED,6BAEC;IAED,0BAOE;IAEF,kDAGE;IAEF,qCAoBE;IAEF,oCAiBE;IAEF,sCAmCE;IAEF,qCAYC;IAED,gCAiBE;IAEF,sCAME;IAEF,mCASE;IAEF,gCAgBE;IAEF,qBAWE;IAEF,qBAWE;IAEF,6CAOE;IAEF,4BASE;IAEF,kCAME;IAEF,mEAcE;IAEF;;;;;;;;;sCA0CE;IAEF,sCAmGC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqEe,0CAAU;;;;;;;;;;AAle1B,gCAAyB;AADzB,0CAAmC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.10.1",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -28,25 +28,22 @@
|
|
|
28
28
|
"@babel/preset-typescript": "^7.22.15",
|
|
29
29
|
"@formatjs/cli": "^4.8.3",
|
|
30
30
|
"@rollup/plugin-babel": "^6.0.3",
|
|
31
|
-
"@rollup/plugin-image": "^3.0.2",
|
|
32
31
|
"@rollup/plugin-json": "^6.0.0",
|
|
33
32
|
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
34
33
|
"@rollup/plugin-typescript": "^11.1.3",
|
|
35
|
-
"@
|
|
36
|
-
"@storybook/addon-
|
|
37
|
-
"@storybook/addon-
|
|
38
|
-
"@storybook/addon-
|
|
34
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
35
|
+
"@storybook/addon-a11y": "^7.6.17",
|
|
36
|
+
"@storybook/addon-actions": "^7.6.17",
|
|
37
|
+
"@storybook/addon-essentials": "^7.6.17",
|
|
38
|
+
"@storybook/addon-interactions": "^7.6.17",
|
|
39
39
|
"@storybook/addon-knobs": "^7.0.2",
|
|
40
|
-
"@storybook/addon-viewport": "^7.
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/
|
|
43
|
-
"@storybook/
|
|
44
|
-
"@storybook/
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/testing-library": "^0.1.0",
|
|
48
|
-
"@storybook/theming": "^7.4.5",
|
|
49
|
-
"@storybook/types": "^7.4.5",
|
|
40
|
+
"@storybook/addon-viewport": "^7.6.17",
|
|
41
|
+
"@storybook/manager-api": "^7.6.17",
|
|
42
|
+
"@storybook/react": "^7.6.17",
|
|
43
|
+
"@storybook/react-webpack5": "^7.6.17",
|
|
44
|
+
"@storybook/test": "^7.6.17",
|
|
45
|
+
"@storybook/theming": "^7.6.17",
|
|
46
|
+
"@storybook/types": "^7.6.17",
|
|
50
47
|
"@testing-library/dom": "^7.21.4",
|
|
51
48
|
"@testing-library/jest-dom": "^5.14.1",
|
|
52
49
|
"@testing-library/react": "^12.0.0",
|
|
@@ -74,7 +71,7 @@
|
|
|
74
71
|
"lodash.times": "^4.3.2",
|
|
75
72
|
"react-intl": "^5.10.0",
|
|
76
73
|
"rollup": "^3.28.1",
|
|
77
|
-
"storybook": "^7.
|
|
74
|
+
"storybook": "^7.6.17",
|
|
78
75
|
"@transferwise/less-config": "3.1.0",
|
|
79
76
|
"@transferwise/neptune-css": "14.9.5",
|
|
80
77
|
"@wise/components-theming": "1.0.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { userEvent, within } from '@storybook/
|
|
2
|
+
import { userEvent, within } from '@storybook/test';
|
|
3
3
|
|
|
4
4
|
import { ControlType, Priority } from '../common';
|
|
5
5
|
import { storyConfig } from '../test-utils';
|
|
@@ -34,9 +34,9 @@ export const Focused = storyConfig<Story>(
|
|
|
34
34
|
delay: 1000,
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
-
play: ({ canvasElement }) => {
|
|
37
|
+
play: async ({ canvasElement }) => {
|
|
38
38
|
const canvas = within(canvasElement);
|
|
39
|
-
userEvent.click(canvas.getByRole('button'));
|
|
39
|
+
await userEvent.click(canvas.getByRole('button'));
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
{
|
package/src/common/fakeEvents.js
CHANGED
|
@@ -4,9 +4,9 @@ export const fakeEvent = () => ({
|
|
|
4
4
|
preventDefault() {},
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
export const fakeKeyDownEventForKey = (
|
|
7
|
+
export const fakeKeyDownEventForKey = (key) => ({
|
|
8
8
|
...fakeEvent(),
|
|
9
|
-
|
|
9
|
+
key,
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
export const fakeKeyDownEvent = (eventAttribute = {}) => ({
|
package/src/common/index.js
CHANGED
|
@@ -21,7 +21,6 @@ export { Variant } from './propsValues/variant';
|
|
|
21
21
|
export * from './propsValues/scroll';
|
|
22
22
|
export { MarkdownNodeType } from './propsValues/markdownNodeType';
|
|
23
23
|
export { FileType } from './fileType';
|
|
24
|
-
export { Key } from './key';
|
|
25
24
|
export * from './locale';
|
|
26
25
|
export * from './commonProps';
|
|
27
26
|
export * from './randomId';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { userEvent, within } from '@storybook/test';
|
|
2
3
|
|
|
3
4
|
import { DateInput, Info, InlineAlert, Title, Typography } from '..';
|
|
4
|
-
import { lorem10, storyConfig
|
|
5
|
+
import { lorem10, storyConfig } from '../test-utils';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
component: DateInput,
|
|
@@ -25,9 +26,9 @@ type Story = StoryObj<typeof DateInput>;
|
|
|
25
26
|
|
|
26
27
|
export const Basic: Story = {};
|
|
27
28
|
|
|
28
|
-
Basic.play = ({ canvasElement }) => {
|
|
29
|
+
Basic.play = async ({ canvasElement }) => {
|
|
29
30
|
const canvas = within(canvasElement);
|
|
30
|
-
userEvent.click(canvas.getByRole('button'));
|
|
31
|
+
await userEvent.click(canvas.getByRole('button'));
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export const WithLabel: Story = {
|
|
@@ -4,7 +4,6 @@ import { createRef, PureComponent } from 'react';
|
|
|
4
4
|
|
|
5
5
|
import { Size, MonthFormat, Position, Breakpoint } from '../common';
|
|
6
6
|
import { isWithinRange, moveToWithinRange } from '../common/dateUtils';
|
|
7
|
-
import KeyCodes from '../common/keyCodes';
|
|
8
7
|
import ResponsivePanel from '../common/responsivePanel';
|
|
9
8
|
|
|
10
9
|
import DateTrigger from './dateTrigger';
|
|
@@ -102,8 +101,8 @@ class DateLookup extends PureComponent {
|
|
|
102
101
|
|
|
103
102
|
handleKeyDown = (event) => {
|
|
104
103
|
const { open, originalDate } = this.state;
|
|
105
|
-
switch (event.
|
|
106
|
-
case
|
|
104
|
+
switch (event.key) {
|
|
105
|
+
case 'ArrowLeft':
|
|
107
106
|
if (open) {
|
|
108
107
|
this.adjustDate(-1, -1, -1);
|
|
109
108
|
} else {
|
|
@@ -111,7 +110,7 @@ class DateLookup extends PureComponent {
|
|
|
111
110
|
}
|
|
112
111
|
event.preventDefault();
|
|
113
112
|
break;
|
|
114
|
-
case
|
|
113
|
+
case 'ArrowUp':
|
|
115
114
|
if (open) {
|
|
116
115
|
this.adjustDate(-7, -4, -4);
|
|
117
116
|
} else {
|
|
@@ -119,7 +118,7 @@ class DateLookup extends PureComponent {
|
|
|
119
118
|
}
|
|
120
119
|
event.preventDefault();
|
|
121
120
|
break;
|
|
122
|
-
case
|
|
121
|
+
case 'ArrowRight':
|
|
123
122
|
if (open) {
|
|
124
123
|
this.adjustDate(1, 1, 1);
|
|
125
124
|
} else {
|
|
@@ -127,7 +126,7 @@ class DateLookup extends PureComponent {
|
|
|
127
126
|
}
|
|
128
127
|
event.preventDefault();
|
|
129
128
|
break;
|
|
130
|
-
case
|
|
129
|
+
case 'ArrowDown':
|
|
131
130
|
if (open) {
|
|
132
131
|
this.adjustDate(7, 4, 4);
|
|
133
132
|
} else {
|
|
@@ -135,7 +134,7 @@ class DateLookup extends PureComponent {
|
|
|
135
134
|
}
|
|
136
135
|
event.preventDefault();
|
|
137
136
|
break;
|
|
138
|
-
case
|
|
137
|
+
case 'Escape':
|
|
139
138
|
if (originalDate !== null) {
|
|
140
139
|
this.props.onChange(originalDate);
|
|
141
140
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { mount } from 'enzyme';
|
|
3
3
|
|
|
4
4
|
import { fakeKeyDownEventForKey } from '../common/fakeEvents';
|
|
5
|
-
import KEY_CODES from '../common/keyCodes';
|
|
6
5
|
import { mockMatchMedia } from '../test-utils';
|
|
7
6
|
|
|
8
7
|
import DateLookup from '.';
|
|
@@ -31,28 +30,28 @@ describe('DateLookup (keyboard events)', () => {
|
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
it('can be opened by LEFT arrow', () => {
|
|
34
|
-
pressKey(
|
|
33
|
+
pressKey('ArrowLeft');
|
|
35
34
|
expect(component.instance().state.open).toBe(true);
|
|
36
35
|
});
|
|
37
36
|
|
|
38
37
|
it('can be opened by UP arrow', () => {
|
|
39
|
-
pressKey(
|
|
38
|
+
pressKey('ArrowUp');
|
|
40
39
|
expect(component.instance().state.open).toBe(true);
|
|
41
40
|
});
|
|
42
41
|
|
|
43
42
|
it('can be opened by RIGHT arrow', () => {
|
|
44
|
-
pressKey(
|
|
43
|
+
pressKey('ArrowRight');
|
|
45
44
|
expect(component.instance().state.open).toBe(true);
|
|
46
45
|
});
|
|
47
46
|
|
|
48
47
|
it('can be opened by DOWN arrow', () => {
|
|
49
|
-
pressKey(
|
|
48
|
+
pressKey('ArrowDown');
|
|
50
49
|
expect(component.instance().state.open).toBe(true);
|
|
51
50
|
});
|
|
52
51
|
|
|
53
52
|
it('can be closed by pressing ESCAPE', () => {
|
|
54
53
|
component.setState({ open: true });
|
|
55
|
-
pressKey(
|
|
54
|
+
pressKey('Escape');
|
|
56
55
|
expect(component.instance().state.open).toBe(false);
|
|
57
56
|
});
|
|
58
57
|
|
|
@@ -62,33 +61,33 @@ describe('DateLookup (keyboard events)', () => {
|
|
|
62
61
|
});
|
|
63
62
|
|
|
64
63
|
it('moves 1 day back by pressing LEFT', () => {
|
|
65
|
-
pressKey(
|
|
64
|
+
pressKey('ArrowLeft');
|
|
66
65
|
onChangeCalledWith(new Date(2018, 11, 26));
|
|
67
66
|
});
|
|
68
67
|
|
|
69
68
|
it('moves 7 days back by pressing UP', () => {
|
|
70
|
-
pressKey(
|
|
69
|
+
pressKey('ArrowUp');
|
|
71
70
|
onChangeCalledWith(new Date(2018, 11, 20));
|
|
72
71
|
});
|
|
73
72
|
|
|
74
73
|
it('moves 1 day forward by pressing RIGHT', () => {
|
|
75
|
-
pressKey(
|
|
74
|
+
pressKey('ArrowRight');
|
|
76
75
|
onChangeCalledWith(new Date(2018, 11, 28));
|
|
77
76
|
});
|
|
78
77
|
|
|
79
78
|
it('moves 7 day forward by pressing DOWN', () => {
|
|
80
|
-
pressKey(
|
|
79
|
+
pressKey('ArrowDown');
|
|
81
80
|
onChangeCalledWith(new Date(2019, 0, 3));
|
|
82
81
|
});
|
|
83
82
|
|
|
84
83
|
it('resets to original date when escape key is pressed', () => {
|
|
85
|
-
pressKey(
|
|
86
|
-
pressKey(
|
|
84
|
+
pressKey('ArrowLeft');
|
|
85
|
+
pressKey('Escape');
|
|
87
86
|
onChangeCalledWith(date);
|
|
88
87
|
});
|
|
89
88
|
|
|
90
89
|
it('resets to original date when clicking outside modal', () => {
|
|
91
|
-
pressKey(
|
|
90
|
+
pressKey('ArrowLeft');
|
|
92
91
|
component.find('.dimmer').simulate('click');
|
|
93
92
|
onChangeCalledWith(date);
|
|
94
93
|
});
|
|
@@ -100,22 +99,22 @@ describe('DateLookup (keyboard events)', () => {
|
|
|
100
99
|
});
|
|
101
100
|
|
|
102
101
|
it('moves 1 month back by pressing LEFT', () => {
|
|
103
|
-
pressKey(
|
|
102
|
+
pressKey('ArrowLeft');
|
|
104
103
|
onChangeCalledWith(new Date(2018, 10, 27));
|
|
105
104
|
});
|
|
106
105
|
|
|
107
106
|
it('moves 4 months back by pressing UP', () => {
|
|
108
|
-
pressKey(
|
|
107
|
+
pressKey('ArrowUp');
|
|
109
108
|
onChangeCalledWith(new Date(2018, 7, 27));
|
|
110
109
|
});
|
|
111
110
|
|
|
112
111
|
it('moves 1 month forward by pressing RIGHT', () => {
|
|
113
|
-
pressKey(
|
|
112
|
+
pressKey('ArrowRight');
|
|
114
113
|
onChangeCalledWith(new Date(2019, 0, 27));
|
|
115
114
|
});
|
|
116
115
|
|
|
117
116
|
it('moves 4 months forward by pressing DOWN', () => {
|
|
118
|
-
pressKey(
|
|
117
|
+
pressKey('ArrowDown');
|
|
119
118
|
onChangeCalledWith(new Date(2019, 3, 27));
|
|
120
119
|
});
|
|
121
120
|
});
|
|
@@ -126,22 +125,22 @@ describe('DateLookup (keyboard events)', () => {
|
|
|
126
125
|
});
|
|
127
126
|
|
|
128
127
|
it('moves 1 year back by pressing LEFT', () => {
|
|
129
|
-
pressKey(
|
|
128
|
+
pressKey('ArrowLeft');
|
|
130
129
|
onChangeCalledWith(new Date(2017, 11, 27));
|
|
131
130
|
});
|
|
132
131
|
|
|
133
132
|
it('moves 4 years back by pressing UP', () => {
|
|
134
|
-
pressKey(
|
|
133
|
+
pressKey('ArrowUp');
|
|
135
134
|
onChangeCalledWith(new Date(2014, 11, 27));
|
|
136
135
|
});
|
|
137
136
|
|
|
138
137
|
it('moves 1 year forward by pressing RIGHT', () => {
|
|
139
|
-
pressKey(
|
|
138
|
+
pressKey('ArrowRight');
|
|
140
139
|
onChangeCalledWith(new Date(2019, 11, 27));
|
|
141
140
|
});
|
|
142
141
|
|
|
143
142
|
it('moves 4 year forward by pressing DOWN', () => {
|
|
144
|
-
pressKey(
|
|
143
|
+
pressKey('ArrowDown');
|
|
145
144
|
onChangeCalledWith(new Date(2022, 11, 27));
|
|
146
145
|
});
|
|
147
146
|
});
|
|
@@ -157,16 +156,16 @@ describe('DateLookup (keyboard events)', () => {
|
|
|
157
156
|
});
|
|
158
157
|
|
|
159
158
|
it('makes sure that date is >= min', () => {
|
|
160
|
-
pressKey(
|
|
159
|
+
pressKey('ArrowLeft');
|
|
161
160
|
onChangeCalledWith(new Date(2018, 11, 26));
|
|
162
|
-
pressKey(
|
|
161
|
+
pressKey('ArrowLeft');
|
|
163
162
|
onChangeCalledWith(new Date(2018, 11, 26));
|
|
164
163
|
});
|
|
165
164
|
|
|
166
165
|
it('makes sure that date is <= max', () => {
|
|
167
|
-
pressKey(
|
|
166
|
+
pressKey('ArrowRight');
|
|
168
167
|
onChangeCalledWith(new Date(2018, 11, 28));
|
|
169
|
-
pressKey(
|
|
168
|
+
pressKey('ArrowRight');
|
|
170
169
|
onChangeCalledWith(new Date(2018, 11, 28));
|
|
171
170
|
});
|
|
172
171
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { boolean, select, date, text } from '@storybook/addon-knobs';
|
|
2
|
+
import { userEvent, within } from '@storybook/test';
|
|
2
3
|
import { useState } from 'react';
|
|
3
4
|
|
|
4
5
|
import { Size } from '../common';
|
|
5
|
-
import {
|
|
6
|
+
import { storyConfig } from '../test-utils';
|
|
6
7
|
|
|
7
8
|
import DateLookup from './DateLookup';
|
|
8
9
|
|
|
@@ -48,8 +49,8 @@ export const Basic = () => {
|
|
|
48
49
|
Basic.play = async ({ canvasElement }) => {
|
|
49
50
|
// testing focus state on keyboard nav
|
|
50
51
|
const canvas = within(canvasElement);
|
|
51
|
-
userEvent.tab(canvas.getByRole('button'));
|
|
52
|
-
userEvent.keyboard('
|
|
52
|
+
await userEvent.tab(canvas.getByRole('button'));
|
|
53
|
+
await userEvent.keyboard(' ');
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
export const Basic400Zoom = storyConfig(
|
|
@@ -111,21 +111,21 @@ describe('DateTrigger', () => {
|
|
|
111
111
|
it('calls onClear when user press Space', () => {
|
|
112
112
|
const onClear = jest.fn();
|
|
113
113
|
component.setProps({ onClear });
|
|
114
|
-
clearButton().simulate('keypress', fakeKeyDownEventForKey(
|
|
114
|
+
clearButton().simulate('keypress', fakeKeyDownEventForKey(' '));
|
|
115
115
|
expect(onClear).toHaveBeenCalledTimes(1);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
it('calls onClear when user press Enter', () => {
|
|
119
119
|
const onClear = jest.fn();
|
|
120
120
|
component.setProps({ onClear });
|
|
121
|
-
clearButton().simulate('keypress', fakeKeyDownEventForKey(
|
|
121
|
+
clearButton().simulate('keypress', fakeKeyDownEventForKey('Enter'));
|
|
122
122
|
expect(onClear).toHaveBeenCalledTimes(1);
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
it(`doesn't call onClear when user press a random key`, () => {
|
|
126
126
|
const onClear = jest.fn();
|
|
127
127
|
component.setProps({ onClear });
|
|
128
|
-
clearButton().simulate('keypress', fakeKeyDownEventForKey(
|
|
128
|
+
clearButton().simulate('keypress', fakeKeyDownEventForKey('r'));
|
|
129
129
|
expect(onClear).not.toHaveBeenCalled();
|
|
130
130
|
});
|
|
131
131
|
|
package/src/drawer/Drawer.css
CHANGED
package/src/drawer/Drawer.less
CHANGED
package/src/i18n/de.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "Weitere Informationen",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(wird in einem neuen Tab geöffnet)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Wähle eine der Möglichkeiten aus...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine der Möglichkeiten aus...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Wird gesucht...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
|
|
25
26
|
"neptune.Summary.statusDone": "Schritt erledigt",
|
package/src/i18n/en.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "More information",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Select an option...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
25
26
|
"neptune.Summary.statusDone": "Item done",
|
package/src/i18n/es.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "Más información",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(se abre en una pestaña nueva)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Selecciona una opción...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecciona una opción...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "No se han encontrado resultados",
|
|
25
26
|
"neptune.Summary.statusDone": "Apartado listo",
|
package/src/i18n/fr.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "Plus d'informations",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(ouvre dans un nouvel onglet)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Recherche...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
|
|
25
26
|
"neptune.Summary.statusDone": "Validé",
|
package/src/i18n/hu.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "További információ",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(új lapon nyílik meg)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Válassz ki egy lehetőséget...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Válassz ki egy lehetőséget...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Keresés...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "Nincs találat",
|
|
25
26
|
"neptune.Summary.statusDone": "Kész",
|
package/src/i18n/id.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "Informasi lebih lanjut",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(terbuka di tab baru)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Pilih opsi...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Pilih opsi...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Cari...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "Hasil tidak ditemukan",
|
|
25
26
|
"neptune.Summary.statusDone": "Item selesai",
|
package/src/i18n/it.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"neptune.Info.ariaLabel": "Maggiori informazioni",
|
|
21
21
|
"neptune.Link.opensInNewTab": "(si apre in una nuova scheda)",
|
|
22
22
|
"neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
|
|
23
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Seleziona un'opzione...",
|
|
23
24
|
"neptune.Select.searchPlaceholder": "Cerca...",
|
|
24
25
|
"neptune.SelectInput.noResultsFound": "Nessun risultato trovato",
|
|
25
26
|
"neptune.Summary.statusDone": "Completato",
|