@transferwise/components 46.29.1 → 46.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +4737 -4678
- package/build/index.js.map +1 -1
- package/build/index.mjs +3504 -3445
- package/build/index.mjs.map +1 -1
- package/build/mocks.js.map +1 -1
- package/build/mocks.mjs.map +1 -1
- package/build/types/common/DOMOperations/DOMOperations.d.ts +10 -2
- package/build/types/common/DOMOperations/DOMOperations.d.ts.map +1 -1
- package/build/types/common/DOMOperations/index.d.ts +1 -3
- package/build/types/common/DOMOperations/index.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts +2 -2
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/bottomSheet/index.d.ts +2 -1
- package/build/types/common/bottomSheet/index.d.ts.map +1 -1
- package/build/types/common/closeButton/CloseButton.messages.d.ts +7 -7
- package/build/types/common/closeButton/CloseButton.messages.d.ts.map +1 -1
- package/build/types/common/closeButton/index.d.ts +0 -1
- package/build/types/common/closeButton/index.d.ts.map +1 -1
- package/build/types/common/deviceDetection/deviceDetection.d.ts +1 -1
- package/build/types/common/deviceDetection/deviceDetection.d.ts.map +1 -1
- package/build/types/common/deviceDetection/index.d.ts +1 -1
- package/build/types/common/deviceDetection/index.d.ts.map +1 -1
- package/build/types/common/domHelpers/documentIosClick.d.ts +7 -2
- package/build/types/common/domHelpers/documentIosClick.d.ts.map +1 -1
- package/build/types/common/domHelpers/index.d.ts +1 -6
- package/build/types/common/domHelpers/index.d.ts.map +1 -1
- package/build/types/common/flowHeader/index.d.ts +2 -0
- package/build/types/common/flowHeader/index.d.ts.map +1 -0
- package/build/types/common/focusBoundary/index.d.ts +1 -1
- package/build/types/common/focusBoundary/index.d.ts.map +1 -1
- package/build/types/common/historyNavigator/historyNavigator.d.ts +8 -8
- package/build/types/common/historyNavigator/historyNavigator.d.ts.map +1 -1
- package/build/types/common/historyNavigator/index.d.ts +1 -1
- package/build/types/common/historyNavigator/index.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/common/panel/index.d.ts +1 -1
- package/build/types/common/panel/index.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts +1 -1
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/dimmer/index.d.ts +2 -1
- package/build/types/dimmer/index.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/index.d.ts +42 -41
- package/build/types/index.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/nudge/Nudge.d.ts.map +1 -1
- package/build/types/promoCard/PromoCard.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardGroup.d.ts.map +1 -1
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +58 -59
- package/src/chevron/Chevron.tsx +1 -1
- package/src/common/DOMOperations/index.ts +1 -0
- package/src/common/bottomSheet/BottomSheet.tsx +6 -3
- package/src/common/bottomSheet/index.ts +2 -0
- package/src/common/closeButton/{CloseButton.spec.js → CloseButton.spec.tsx} +1 -0
- package/src/common/closeButton/index.ts +0 -1
- package/src/common/deviceDetection/{deviceDetection.spec.js → deviceDetection.spec.ts} +1 -1
- package/src/common/deviceDetection/deviceDetection.ts +7 -0
- package/src/common/domHelpers/{documentIosClick.spec.js → documentIosClick.spec.ts} +7 -13
- package/src/common/domHelpers/{documentIosClick.js → documentIosClick.ts} +23 -0
- package/src/common/domHelpers/index.ts +4 -23
- package/src/common/flowHeader/{FlowHeader.spec.js → FlowHeader.spec.tsx} +2 -1
- package/src/common/flowHeader/index.ts +1 -0
- package/src/common/historyNavigator/{historyNavigator.js → historyNavigator.ts} +9 -5
- package/src/common/panel/{Panel.spec.js → Panel.spec.tsx} +14 -9
- package/src/common/panel/Panel.tsx +3 -3
- package/src/common/responsivePanel/ResponsivePanel.tsx +1 -1
- package/src/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.spec.ts +1 -1
- package/src/dateLookup/DateLookup.testingLibrary.spec.js +2 -2
- package/src/dimmer/Dimmer.tsx +1 -1
- package/src/dimmer/index.ts +2 -0
- package/src/flowNavigation/FlowNavigation.tsx +1 -2
- package/src/index.ts +68 -66
- package/src/inputs/SelectInput.spec.tsx +12 -0
- package/src/inputs/SelectInput.story.tsx +2 -0
- package/src/inputs/SelectInput.tsx +14 -0
- package/src/listItem/ListItem.tsx +1 -1
- package/src/nudge/Nudge.tsx +5 -8
- package/src/overlayHeader/OverlayHeader.js +1 -1
- package/src/promoCard/PromoCard.tsx +10 -7
- package/src/promoCard/PromoCardGroup.tsx +9 -7
- package/src/select/Select.story.js +1 -1
- package/src/stepper/Stepper.spec.js +13 -13
- package/src/title/Title.tsx +4 -5
- package/src/withDisplayFormat/WithDisplayFormat.tsx +2 -2
- package/src/common/DOMOperations/index.js +0 -3
- package/src/common/bottomSheet/index.js +0 -1
- package/src/common/deviceDetection/deviceDetection.js +0 -7
- package/src/dimmer/index.js +0 -1
- /package/src/common/DOMOperations/{DOMOperations.spec.js → DOMOperations.spec.tsx} +0 -0
- /package/src/common/DOMOperations/{DOMOperations.js → DOMOperations.ts} +0 -0
- /package/src/common/closeButton/{CloseButton.messages.js → CloseButton.messages.ts} +0 -0
- /package/src/common/closeButton/__snapshots__/{CloseButton.spec.js.snap → CloseButton.spec.tsx.snap} +0 -0
- /package/src/common/deviceDetection/{index.js → index.ts} +0 -0
- /package/src/common/flowHeader/__snapshots__/{FlowHeader.spec.js.snap → FlowHeader.spec.tsx.snap} +0 -0
- /package/src/common/focusBoundary/{index.js → index.ts} +0 -0
- /package/src/common/historyNavigator/{historyNavigator.spec.js → historyNavigator.spec.ts} +0 -0
- /package/src/common/historyNavigator/{index.js → index.ts} +0 -0
- /package/src/common/panel/__snapshots__/{Panel.spec.js.snap → Panel.spec.tsx.snap} +0 -0
- /package/src/common/panel/{index.js → index.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromoCard.d.ts","sourceRoot":"","sources":["../../../src/promoCard/PromoCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAIlF,OAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMjD,OAA2B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACxD,MAAM,MAAM,YAAY,GACpB,EAAE,GACF,WAAW,GACX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,MAAM,GACN,SAAS,GACT,MAAM,GACN,UAAU,GACV,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzC,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gFAAgF;IAChF,aAAa,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAEhD,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,uDAAuD;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AE1B,gEAAgE;IAChE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAE5B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,kBAAkB,GAAG,qBAAqB,KAC9C,GAAG,CAAC,OAAO,CAAC;;AAuOjB,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromoCardGroup.d.ts","sourceRoot":"","sources":["../../../src/promoCard/PromoCardGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAK1F,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;
|
|
1
|
+
{"version":3,"file":"PromoCardGroup.d.ts","sourceRoot":"","sources":["../../../src/promoCard/PromoCardGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAK1F,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;AA2FD,wBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AAY5D,KAAK,KAAK,GAAG,mBAAmB,CAAC,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAC,GACvF,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ,iBAAS,KAAK,CAAC,EAAE,EAAE,EAAE,IAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,+
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AAY5D,KAAK,KAAK,GAAG,mBAAmB,CAAC,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAC,GACvF,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ,iBAAS,KAAK,CAAC,EAAE,EAAE,EAAE,IAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,+BASrE;AAED,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.30.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -38,68 +38,67 @@
|
|
|
38
38
|
"!**/*.tsbuildinfo"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.
|
|
42
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
43
|
-
"@babel/preset-env": "^7.
|
|
44
|
-
"@babel/preset-react": "^7.
|
|
45
|
-
"@babel/preset-typescript": "^7.
|
|
46
|
-
"@formatjs/cli": "^
|
|
47
|
-
"@rollup/plugin-babel": "^6.0.
|
|
48
|
-
"@rollup/plugin-json": "^6.
|
|
49
|
-
"@rollup/plugin-node-resolve": "^15.2.
|
|
50
|
-
"@rollup/plugin-typescript": "^11.1.
|
|
41
|
+
"@babel/core": "^7.24.5",
|
|
42
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
43
|
+
"@babel/preset-env": "^7.24.5",
|
|
44
|
+
"@babel/preset-react": "^7.24.1",
|
|
45
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
46
|
+
"@formatjs/cli": "^6.2.10",
|
|
47
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
48
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
50
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
51
51
|
"@rollup/plugin-url": "^8.0.2",
|
|
52
|
-
"@storybook/addon-a11y": "^7.6.
|
|
53
|
-
"@storybook/addon-actions": "^7.6.
|
|
54
|
-
"@storybook/addon-essentials": "^7.6.
|
|
55
|
-
"@storybook/addon-interactions": "^7.6.
|
|
52
|
+
"@storybook/addon-a11y": "^7.6.19",
|
|
53
|
+
"@storybook/addon-actions": "^7.6.19",
|
|
54
|
+
"@storybook/addon-essentials": "^7.6.19",
|
|
55
|
+
"@storybook/addon-interactions": "^7.6.19",
|
|
56
56
|
"@storybook/addon-knobs": "^7.0.2",
|
|
57
|
-
"@storybook/addon-viewport": "^7.6.
|
|
57
|
+
"@storybook/addon-viewport": "^7.6.19",
|
|
58
58
|
"@storybook/addons": "^7.6.17",
|
|
59
59
|
"@storybook/api": "^7.6.17",
|
|
60
|
-
"@storybook/components": "^7.6.
|
|
61
|
-
"@storybook/core-events": "^7.6.
|
|
62
|
-
"@storybook/manager-api": "^7.6.
|
|
63
|
-
"@storybook/react": "^7.6.
|
|
64
|
-
"@storybook/react-webpack5": "^7.6.
|
|
65
|
-
"@storybook/test": "^7.6.
|
|
66
|
-
"@storybook/theming": "^7.6.
|
|
67
|
-
"@storybook/types": "^7.6.
|
|
68
|
-
"@testing-library/dom": "^7.
|
|
69
|
-
"@testing-library/jest-dom": "^5.
|
|
70
|
-
"@testing-library/react": "^12.
|
|
71
|
-
"@testing-library/react-hooks": "^8.0.
|
|
72
|
-
"@testing-library/user-event": "^13.
|
|
60
|
+
"@storybook/components": "^7.6.19",
|
|
61
|
+
"@storybook/core-events": "^7.6.19",
|
|
62
|
+
"@storybook/manager-api": "^7.6.19",
|
|
63
|
+
"@storybook/react": "^7.6.19",
|
|
64
|
+
"@storybook/react-webpack5": "^7.6.19",
|
|
65
|
+
"@storybook/test": "^7.6.19",
|
|
66
|
+
"@storybook/theming": "^7.6.19",
|
|
67
|
+
"@storybook/types": "^7.6.19",
|
|
68
|
+
"@testing-library/dom": "^7.31.2",
|
|
69
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
70
|
+
"@testing-library/react": "^12.1.5",
|
|
71
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
72
|
+
"@testing-library/user-event": "^13.5.0",
|
|
73
73
|
"@transferwise/icons": "^3.7.0",
|
|
74
74
|
"@transferwise/neptune-tokens": "^8.9.2",
|
|
75
|
-
"@tsconfig/recommended": "^1.0.
|
|
76
|
-
"@types/babel__core": "^7.20.
|
|
75
|
+
"@tsconfig/recommended": "^1.0.6",
|
|
76
|
+
"@types/babel__core": "^7.20.5",
|
|
77
77
|
"@types/commonmark": "^0.27.9",
|
|
78
78
|
"@types/jest": "^29.5.12",
|
|
79
|
-
"@types/lodash": "4.
|
|
79
|
+
"@types/lodash": "4.17.1",
|
|
80
80
|
"@types/lodash.clamp": "^4.0.9",
|
|
81
81
|
"@types/lodash.debounce": "^4.0.9",
|
|
82
|
-
"@types/
|
|
83
|
-
"@types/react": "^17.0.
|
|
84
|
-
"@types/react-
|
|
85
|
-
"@types/
|
|
86
|
-
"@types/
|
|
87
|
-
"@types/use-sync-external-store": "^0.0.4",
|
|
82
|
+
"@types/react": "^17.0.80",
|
|
83
|
+
"@types/react-dom": "^17.0.25",
|
|
84
|
+
"@types/react-transition-group": "4.4.10",
|
|
85
|
+
"@types/testing-library__jest-dom": "^5.14.9",
|
|
86
|
+
"@types/use-sync-external-store": "^0.0.6",
|
|
88
87
|
"@wise/art": "^2.7.0",
|
|
89
88
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
|
|
90
|
-
"babel-plugin-formatjs": "^10.5.
|
|
89
|
+
"babel-plugin-formatjs": "^10.5.14",
|
|
91
90
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
92
91
|
"enzyme": "^3.11.0",
|
|
93
92
|
"jest": "^29.7.0",
|
|
94
93
|
"jest-environment-jsdom": "^29.7.0",
|
|
95
94
|
"jest-fetch-mock": "^3.0.3",
|
|
96
95
|
"lodash.times": "^4.3.2",
|
|
97
|
-
"react-intl": "^
|
|
98
|
-
"rollup": "^
|
|
99
|
-
"storybook": "^7.6.
|
|
100
|
-
"@transferwise/less-config": "3.1.0",
|
|
96
|
+
"react-intl": "^6.6.6",
|
|
97
|
+
"rollup": "^4.17.2",
|
|
98
|
+
"storybook": "^7.6.19",
|
|
101
99
|
"@transferwise/neptune-css": "14.10.0",
|
|
102
|
-
"@wise/components-theming": "1.2.
|
|
100
|
+
"@wise/components-theming": "1.2.2",
|
|
101
|
+
"@transferwise/less-config": "3.1.0"
|
|
103
102
|
},
|
|
104
103
|
"peerDependencies": {
|
|
105
104
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -111,29 +110,29 @@
|
|
|
111
110
|
"react-intl": "^5.10.0 || ^6"
|
|
112
111
|
},
|
|
113
112
|
"dependencies": {
|
|
114
|
-
"@babel/runtime": "^7.
|
|
115
|
-
"@floating-ui/react": "^0.
|
|
116
|
-
"@formatjs/intl-locale": "^
|
|
117
|
-
"@headlessui/react": "^1.7.
|
|
118
|
-
"@popperjs/core": "^2.
|
|
119
|
-
"@radix-ui/react-id": "^1.0.
|
|
120
|
-
"@react-aria/focus": "^3.
|
|
121
|
-
"@react-aria/overlays": "^3.
|
|
122
|
-
"@react-spring/web": "~9.
|
|
123
|
-
"@transferwise/formatting": "^2.
|
|
113
|
+
"@babel/runtime": "^7.24.5",
|
|
114
|
+
"@floating-ui/react": "^0.26.15",
|
|
115
|
+
"@formatjs/intl-locale": "^3.4.5",
|
|
116
|
+
"@headlessui/react": "^1.7.19",
|
|
117
|
+
"@popperjs/core": "^2.11.8",
|
|
118
|
+
"@radix-ui/react-id": "^1.0.1",
|
|
119
|
+
"@react-aria/focus": "^3.17.0",
|
|
120
|
+
"@react-aria/overlays": "^3.22.0",
|
|
121
|
+
"@react-spring/web": "~9.7.3",
|
|
122
|
+
"@transferwise/formatting": "^2.13.0",
|
|
124
123
|
"@transferwise/neptune-validation": "^3.3.0",
|
|
125
|
-
"classnames": "^2.
|
|
124
|
+
"classnames": "^2.5.1",
|
|
126
125
|
"commonmark": "0.29.1",
|
|
127
|
-
"core-js": "^3.
|
|
126
|
+
"core-js": "^3.37.1",
|
|
128
127
|
"lodash.clamp": "^4.0.3",
|
|
129
128
|
"lodash.debounce": "^4.0.8",
|
|
130
129
|
"lodash.topairs": "^4.3.0",
|
|
131
130
|
"merge-props": "^6.0.0",
|
|
132
|
-
"prop-types": "^15.
|
|
131
|
+
"prop-types": "^15.8.1",
|
|
133
132
|
"react-popper": "^2.3.0",
|
|
134
133
|
"react-required-if": "^1.0.3",
|
|
135
|
-
"react-transition-group": "^4.4.
|
|
136
|
-
"use-sync-external-store": "^1.2.
|
|
134
|
+
"react-transition-group": "^4.4.5",
|
|
135
|
+
"use-sync-external-store": "^1.2.2"
|
|
137
136
|
},
|
|
138
137
|
"publishConfig": {
|
|
139
138
|
"access": "public"
|
package/src/chevron/Chevron.tsx
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { addNoScrollClass, removeNoScrollClass } from './DOMOperations';
|
|
@@ -25,8 +25,11 @@ const CONTENT_SCROLL_THRESHOLD = 1;
|
|
|
25
25
|
|
|
26
26
|
const MOVE_OFFSET_THRESHOLD = 50;
|
|
27
27
|
|
|
28
|
-
type
|
|
29
|
-
{
|
|
28
|
+
export type BottomSheetProps = PropsWithChildren<
|
|
29
|
+
{
|
|
30
|
+
onClose?: (event: Event | SyntheticEvent) => void;
|
|
31
|
+
open: boolean;
|
|
32
|
+
} & CommonProps
|
|
30
33
|
>;
|
|
31
34
|
|
|
32
35
|
/**
|
|
@@ -35,7 +38,7 @@ type Props = PropsWithChildren<
|
|
|
35
38
|
* Neptune Web: https://transferwise.github.io/neptune-web/components/overlays/BottomSheet
|
|
36
39
|
*
|
|
37
40
|
*/
|
|
38
|
-
const BottomSheet = (props:
|
|
41
|
+
const BottomSheet = (props: BottomSheetProps): ReactElement => {
|
|
39
42
|
const bottomSheetReference = useRef<HTMLDivElement>(null);
|
|
40
43
|
const topBarReference = useRef<HTMLDivElement>(null);
|
|
41
44
|
const contentReference = useRef<HTMLDivElement>(null);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function isIosDevice() {
|
|
2
|
+
const sampleTouchDevices = ['iphone', 'ipad', 'ipod'];
|
|
3
|
+
const matchString = sampleTouchDevices.map((device: string) => `(${device})`).join('|');
|
|
4
|
+
const regex = new RegExp(matchString, 'gi');
|
|
5
|
+
|
|
6
|
+
return typeof navigator !== 'undefined' && !!regex.test(navigator.userAgent);
|
|
7
|
+
}
|
|
@@ -8,19 +8,13 @@ import {
|
|
|
8
8
|
jest.mock('../deviceDetection');
|
|
9
9
|
|
|
10
10
|
describe('Document ios click', () => {
|
|
11
|
-
let add;
|
|
12
|
-
let remove;
|
|
11
|
+
let add: jest.SpyInstance;
|
|
12
|
+
let remove: jest.SpyInstance;
|
|
13
13
|
|
|
14
14
|
beforeEach(() => {
|
|
15
|
-
isIosDevice.mockReturnValue(false);
|
|
16
|
-
global.document =
|
|
17
|
-
|
|
18
|
-
classList: {
|
|
19
|
-
add: jest.fn(),
|
|
20
|
-
remove: jest.fn(),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
15
|
+
(isIosDevice as jest.Mock).mockReturnValue(false);
|
|
16
|
+
global.document.documentElement.classList.add = jest.fn();
|
|
17
|
+
global.document.documentElement.classList.remove = jest.fn();
|
|
24
18
|
|
|
25
19
|
add = jest.spyOn(global.document.documentElement.classList, 'add');
|
|
26
20
|
remove = jest.spyOn(global.document.documentElement.classList, 'remove');
|
|
@@ -37,13 +31,13 @@ describe('Document ios click', () => {
|
|
|
37
31
|
});
|
|
38
32
|
|
|
39
33
|
it('does add ios click to document if it is ios device', () => {
|
|
40
|
-
isIosDevice.mockReturnValue(true);
|
|
34
|
+
(isIosDevice as jest.Mock).mockReturnValue(true);
|
|
41
35
|
addClickClassToDocumentOnIos();
|
|
42
36
|
expect(add).toHaveBeenCalledWith('ios-click');
|
|
43
37
|
});
|
|
44
38
|
|
|
45
39
|
it('does remove ios click from document if it is ios device', () => {
|
|
46
|
-
isIosDevice.mockReturnValue(true);
|
|
40
|
+
(isIosDevice as jest.Mock).mockReturnValue(true);
|
|
47
41
|
removeClickClassFromDocumentOnIos();
|
|
48
42
|
expect(remove).toHaveBeenCalledWith('ios-click');
|
|
49
43
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
|
+
|
|
1
3
|
import { isIosDevice } from '../deviceDetection';
|
|
2
4
|
|
|
3
5
|
/*
|
|
@@ -17,3 +19,24 @@ export function removeClickClassFromDocumentOnIos() {
|
|
|
17
19
|
document.documentElement.classList.remove('ios-click');
|
|
18
20
|
}
|
|
19
21
|
}
|
|
22
|
+
|
|
23
|
+
export function isServerSide(): boolean {
|
|
24
|
+
return typeof window === 'undefined';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isBrowser(): boolean {
|
|
28
|
+
return !isServerSide();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function stopPropagation(event: SyntheticEvent) {
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
if (event.nativeEvent && event.nativeEvent.stopImmediatePropagation) {
|
|
35
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getSimpleRandomId(prefix: string): string {
|
|
40
|
+
const random = Math.ceil(Math.random() * 999999);
|
|
41
|
+
return `${prefix}${random}`;
|
|
42
|
+
}
|
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
export function isServerSide(): boolean {
|
|
4
|
-
return typeof window === 'undefined';
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function isBrowser(): boolean {
|
|
8
|
-
return !isServerSide();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function stopPropagation(event: SyntheticEvent) {
|
|
12
|
-
event.stopPropagation();
|
|
13
|
-
event.preventDefault();
|
|
14
|
-
if (event.nativeEvent && event.nativeEvent.stopImmediatePropagation) {
|
|
15
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function getSimpleRandomId(prefix: string): string {
|
|
20
|
-
const random = Math.ceil(Math.random() * 999999);
|
|
21
|
-
return `${prefix}${random}`;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
1
|
export {
|
|
25
2
|
addClickClassToDocumentOnIos,
|
|
3
|
+
getSimpleRandomId,
|
|
4
|
+
isBrowser,
|
|
5
|
+
isServerSide,
|
|
26
6
|
removeClickClassFromDocumentOnIos,
|
|
7
|
+
stopPropagation,
|
|
27
8
|
} from './documentIosClick';
|
|
@@ -4,6 +4,7 @@ import { render } from '@testing-library/react';
|
|
|
4
4
|
import { Layout } from '../propsValues/layouts';
|
|
5
5
|
|
|
6
6
|
import FlowHeader from './FlowHeader';
|
|
7
|
+
import type { FlowHeaderProps } from './FlowHeader';
|
|
7
8
|
|
|
8
9
|
describe('FlowHeader', () => {
|
|
9
10
|
const props = {
|
|
@@ -11,7 +12,7 @@ describe('FlowHeader', () => {
|
|
|
11
12
|
rightContent: 'rightContent',
|
|
12
13
|
bottomContent: 'bottomContent',
|
|
13
14
|
className: 'className',
|
|
14
|
-
};
|
|
15
|
+
} satisfies FlowHeaderProps;
|
|
15
16
|
it('renders as expected', () => {
|
|
16
17
|
expect(render(<FlowHeader {...props} />).container).toMatchSnapshot();
|
|
17
18
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './FlowHeader';
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
class HistoryNavigator {
|
|
2
|
-
|
|
2
|
+
history: (string | number)[];
|
|
3
|
+
currIndex: number;
|
|
4
|
+
historyLimit: number | undefined;
|
|
5
|
+
|
|
6
|
+
constructor(history?: (string | number)[], historyLimit?: number) {
|
|
3
7
|
this.history = history && history.length > 0 ? history : [''];
|
|
4
8
|
this.currIndex = this.history.length - 1;
|
|
5
9
|
this.historyLimit = historyLimit;
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
reset = (newHistory
|
|
9
|
-
this.history = newHistory;
|
|
10
|
-
this.currIndex =
|
|
12
|
+
reset = (newHistory?: (string | number)[], historyLimit = 20) => {
|
|
13
|
+
this.history = newHistory && newHistory.length > 0 ? newHistory : [''];
|
|
14
|
+
this.currIndex = this.history.length - 1;
|
|
11
15
|
this.historyLimit = historyLimit;
|
|
12
16
|
};
|
|
13
17
|
|
|
14
|
-
add = (element) => {
|
|
18
|
+
add = (element: string | number) => {
|
|
15
19
|
if (!this.historyLimit || this.history.length <= this.historyLimit) {
|
|
16
20
|
this.history.push(element);
|
|
17
21
|
// Always keep the current Index to the latest change
|
|
@@ -4,6 +4,11 @@ import { Position } from '..';
|
|
|
4
4
|
import { render } from '../../test-utils';
|
|
5
5
|
|
|
6
6
|
import Panel from './Panel';
|
|
7
|
+
import type { PanelProps } from './Panel';
|
|
8
|
+
|
|
9
|
+
const mockAnchorRef: React.RefObject<HTMLAnchorElement> = {
|
|
10
|
+
current: document.createElement('a'),
|
|
11
|
+
};
|
|
7
12
|
|
|
8
13
|
describe('Panel', () => {
|
|
9
14
|
const props = {
|
|
@@ -11,9 +16,9 @@ describe('Panel', () => {
|
|
|
11
16
|
children: <div>children</div>,
|
|
12
17
|
open: true,
|
|
13
18
|
position: Position.TOP,
|
|
14
|
-
anchorRef:
|
|
19
|
+
anchorRef: mockAnchorRef,
|
|
15
20
|
onClose: jest.fn(),
|
|
16
|
-
};
|
|
21
|
+
} satisfies PanelProps;
|
|
17
22
|
|
|
18
23
|
it('renders', () => {
|
|
19
24
|
const { container } = render(<Panel {...props} />);
|
|
@@ -31,7 +36,7 @@ describe('Panel', () => {
|
|
|
31
36
|
expect(getArrow()).toBeInTheDocument();
|
|
32
37
|
});
|
|
33
38
|
|
|
34
|
-
it('opens/closes Panel based on open',
|
|
39
|
+
it('opens/closes Panel based on open', () => {
|
|
35
40
|
const { rerender } = render(<Panel {...props} open={false} />);
|
|
36
41
|
|
|
37
42
|
expect(getPanel()).not.toBeInTheDocument();
|
|
@@ -41,9 +46,9 @@ describe('Panel', () => {
|
|
|
41
46
|
expect(getPanel()).toBeInTheDocument();
|
|
42
47
|
});
|
|
43
48
|
|
|
44
|
-
it('does not set width for content as width of an anchor (by default)',
|
|
45
|
-
const anchorReference = createRef();
|
|
46
|
-
const panelReference = createRef();
|
|
49
|
+
it('does not set width for content as width of an anchor (by default)', () => {
|
|
50
|
+
const anchorReference = createRef<HTMLDivElement>();
|
|
51
|
+
const panelReference = createRef<HTMLDivElement>();
|
|
47
52
|
|
|
48
53
|
render(
|
|
49
54
|
<>
|
|
@@ -61,9 +66,9 @@ describe('Panel', () => {
|
|
|
61
66
|
expect(panelReference.current).toHaveStyle({ width: undefined });
|
|
62
67
|
});
|
|
63
68
|
|
|
64
|
-
it('sets same width for content as width of an anchor (anchorWidth={true})',
|
|
65
|
-
const anchorReference = createRef();
|
|
66
|
-
const panelReference = createRef();
|
|
69
|
+
it('sets same width for content as width of an anchor (anchorWidth={true})', () => {
|
|
70
|
+
const anchorReference = createRef<HTMLDivElement>();
|
|
71
|
+
const panelReference = createRef<HTMLDivElement>();
|
|
67
72
|
|
|
68
73
|
render(
|
|
69
74
|
<>
|
|
@@ -26,7 +26,7 @@ const fallbackPlacements = {
|
|
|
26
26
|
[Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export type
|
|
29
|
+
export type PanelProps = PropsWithChildren<{
|
|
30
30
|
arrow?: boolean;
|
|
31
31
|
flip?: boolean;
|
|
32
32
|
altAxis?: boolean;
|
|
@@ -38,7 +38,7 @@ export type Props = PropsWithChildren<{
|
|
|
38
38
|
}> &
|
|
39
39
|
HTMLAttributes<HTMLDivElement>;
|
|
40
40
|
|
|
41
|
-
const Panel = forwardRef<HTMLDivElement,
|
|
41
|
+
const Panel = forwardRef<HTMLDivElement, PanelProps>(
|
|
42
42
|
(
|
|
43
43
|
{
|
|
44
44
|
arrow = false,
|
|
@@ -51,7 +51,7 @@ const Panel = forwardRef<HTMLDivElement, Props>(
|
|
|
51
51
|
anchorRef,
|
|
52
52
|
anchorWidth = false,
|
|
53
53
|
...rest
|
|
54
|
-
}:
|
|
54
|
+
}: PanelProps,
|
|
55
55
|
reference,
|
|
56
56
|
) => {
|
|
57
57
|
const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);
|
|
@@ -6,7 +6,7 @@ import { Position } from '..';
|
|
|
6
6
|
import BottomSheet from '../bottomSheet';
|
|
7
7
|
import { useLayout } from '../hooks';
|
|
8
8
|
import Panel from '../panel';
|
|
9
|
-
import {
|
|
9
|
+
import { PanelProps } from '../panel/Panel';
|
|
10
10
|
|
|
11
11
|
const ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(
|
|
12
12
|
(
|
|
@@ -122,7 +122,7 @@ describe('pushValueToStack', () => {
|
|
|
122
122
|
pattern,
|
|
123
123
|
pastedLength = 0,
|
|
124
124
|
} = test;
|
|
125
|
-
it(
|
|
125
|
+
it(testMessage, () => {
|
|
126
126
|
expect(
|
|
127
127
|
getCursorPositionAfterKeystroke(key, selectionStart, selectionEnd, pattern, pastedLength),
|
|
128
128
|
).toStrictEqual(expectedValue);
|
|
@@ -105,7 +105,7 @@ describe('DateLookup (events)', () => {
|
|
|
105
105
|
it('updates selected date and closes', () => {
|
|
106
106
|
openDateLookup();
|
|
107
107
|
const d = new Date(2018, 11, 28);
|
|
108
|
-
const newDay = screen.getByText(
|
|
108
|
+
const newDay = screen.getByText(d.getDate().toString());
|
|
109
109
|
user.click(newDay);
|
|
110
110
|
|
|
111
111
|
expect(props.onChange).toHaveBeenCalledWith(d);
|
|
@@ -115,7 +115,7 @@ describe('DateLookup (events)', () => {
|
|
|
115
115
|
it('has aria label on selected date', () => {
|
|
116
116
|
openDateLookup();
|
|
117
117
|
const d = new Date(2018, 11, 28);
|
|
118
|
-
const newDay = screen.getByText(
|
|
118
|
+
const newDay = screen.getByText(d.getDate().toString());
|
|
119
119
|
user.click(newDay);
|
|
120
120
|
openDateLookup();
|
|
121
121
|
expect(screen.getByRole('button', { name: /selected day/i })).toBeInTheDocument();
|
package/src/dimmer/Dimmer.tsx
CHANGED
|
@@ -29,7 +29,7 @@ export const EXIT_ANIMATION = 350;
|
|
|
29
29
|
|
|
30
30
|
const dimmerManager = new DimmerManager();
|
|
31
31
|
|
|
32
|
-
type DimmerProps = CommonProps & {
|
|
32
|
+
export type DimmerProps = CommonProps & {
|
|
33
33
|
children?: ReactNode;
|
|
34
34
|
disableClickToClose?: boolean;
|
|
35
35
|
contentPosition?: PositionTop | PositionCenter | PositionBottom;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { useRef } from 'react';
|
|
3
2
|
import { useIntl } from 'react-intl';
|
|
4
3
|
|
|
5
4
|
import { Breakpoint, Layout } from '../common';
|
|
@@ -8,10 +7,10 @@ import FlowHeader from '../common/flowHeader/FlowHeader';
|
|
|
8
7
|
import Logo from '../logo';
|
|
9
8
|
import Stepper, { type Step } from '../stepper/Stepper';
|
|
10
9
|
|
|
10
|
+
import { useScreenSize } from '../common/hooks/useScreenSize';
|
|
11
11
|
import messages from './FlowNavigation.messages';
|
|
12
12
|
import AnimatedLabel from './animatedLabel';
|
|
13
13
|
import BackButton from './backButton';
|
|
14
|
-
import { useScreenSize } from '../common/hooks/useScreenSize';
|
|
15
14
|
|
|
16
15
|
export interface FlowNavigationProps {
|
|
17
16
|
activeStep?: number;
|