@transferwise/components 46.145.0 → 46.147.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/main.css +509 -551
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +2 -2
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
- package/build/sentimentSurface/SentimentSurface.js +9 -2
- package/build/sentimentSurface/SentimentSurface.js.map +1 -1
- package/build/sentimentSurface/SentimentSurface.mjs +9 -2
- package/build/sentimentSurface/SentimentSurface.mjs.map +1 -1
- package/build/styles/main.css +509 -551
- package/build/styles/nudge/Nudge.css +11 -0
- package/build/styles/sentimentSurface/SentimentSurface.css +325 -337
- package/build/types/nudge/Nudge.d.ts +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts +3 -2
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -1
- package/build/types/sentimentSurface/SentimentSurface.d.ts.map +1 -1
- package/package.json +24 -20
- package/src/criticalBanner/CriticalCommsBanner.test.tsx +1 -1
- package/src/main.css +509 -551
- package/src/nudge/Nudge.css +11 -0
- package/src/nudge/Nudge.less +4 -0
- package/src/nudge/Nudge.story.tsx +9 -0
- package/src/nudge/Nudge.tsx +2 -1
- package/src/prompt/InfoPrompt/InfoPrompt.story.tsx +42 -0
- package/src/prompt/InfoPrompt/InfoPrompt.test.tsx +65 -1
- package/src/prompt/InfoPrompt/InfoPrompt.tsx +15 -4
- package/src/sentimentSurface/SentimentSurface.css +325 -337
- package/src/sentimentSurface/SentimentSurface.docs.mdx +2 -0
- package/src/sentimentSurface/SentimentSurface.less +2 -322
- package/src/sentimentSurface/SentimentSurface.story.tsx +4 -0
- package/src/sentimentSurface/SentimentSurface.test.story.tsx +1 -5
- package/src/sentimentSurface/SentimentSurface.test.tsx +84 -3
- package/src/sentimentSurface/SentimentSurface.tsx +10 -2
|
@@ -2,7 +2,7 @@ import { Assets } from '@wise/art';
|
|
|
2
2
|
import { ReactNode, MouseEvent } from 'react';
|
|
3
3
|
import type { AlertAction } from '../alert';
|
|
4
4
|
export declare const STORAGE_NAME = "dismissedNudges";
|
|
5
|
-
type MediaNameType = `${Assets.GLOBE}` | `${Assets.LOCK}` | `${Assets.WALLET}` | `${Assets.GEAR}` | `${Assets.INVITE_LETTER}` | `${Assets.PERSONAL_CARD}` | `${Assets.BUSINESS_CARD}` | `${Assets.HEART}` | `${Assets.MULTI_CURRENCY}` | `${Assets.SHOPPING_BAG}` | `${Assets.FLOWER}` | `${Assets.GIFT_BOX}` | `${Assets.BACKPACK}`;
|
|
5
|
+
type MediaNameType = `${Assets.GLOBE}` | `${Assets.LOCK}` | `${Assets.WALLET}` | `${Assets.GEAR}` | `${Assets.INVITE_LETTER}` | `${Assets.PERSONAL_CARD}` | `${Assets.BUSINESS_CARD}` | `${Assets.HEART}` | `${Assets.MULTI_CURRENCY}` | `${Assets.SHOPPING_BAG}` | `${Assets.FLOWER}` | `${Assets.GIFT_BOX}` | `${Assets.BACKPACK}` | `${Assets.DOCUMENTS}`;
|
|
6
6
|
type BaseProps = {
|
|
7
7
|
/** @deprecated Use `mediaName` property instead. */
|
|
8
8
|
media?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nudge.d.ts","sourceRoot":"","sources":["../../../src/nudge/Nudge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAA0B,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAuB,UAAU,EAAe,MAAM,OAAO,CAAC;AAKhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAO5C,eAAO,MAAM,YAAY,oBAAoB,CAAC;AA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
|
|
44
|
+
* Description content for the prompt (required). Accepts plain text or rich content (ReactNode).
|
|
45
|
+
* If the description contains an interactive element, the `action` prop must not be used simultaneously.
|
|
45
46
|
*/
|
|
46
|
-
description:
|
|
47
|
+
description: ReactNode;
|
|
47
48
|
className?: string;
|
|
48
49
|
/**
|
|
49
50
|
* Sets the ARIA live region politeness level.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoPrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InfoPrompt/InfoPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InfoPrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InfoPrompt/InfoPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI5E,OAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,GAAG;IAC9E;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC,GAChG,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,GAAG;IAC1C;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;CACxB,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,wIAWxB,eAAe,gCA2FjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentimentSurface.d.ts","sourceRoot":"","sources":["../../../src/sentimentSurface/SentimentSurface.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,QAAA,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"SentimentSurface.d.ts","sourceRoot":"","sources":["../../../src/sentimentSurface/SentimentSurface.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,QAAA,MAAM,gBAAgB,EAAE,yBAgDtB,CAAC;AAIH,eAAe,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.147.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"!**/*.tsbuildinfo"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@babel/core": "^7.29.
|
|
43
|
-
"@babel/plugin-transform-runtime": "^7.29.
|
|
44
|
-
"@babel/preset-env": "^7.29.
|
|
45
|
-
"@babel/preset-react": "^7.
|
|
46
|
-
"@babel/preset-typescript": "^7.
|
|
47
|
-
"@formatjs/cli": "^6.16.
|
|
48
|
-
"@rollup/plugin-babel": "^7.
|
|
42
|
+
"@babel/core": "^7.29.7",
|
|
43
|
+
"@babel/plugin-transform-runtime": "^7.29.7",
|
|
44
|
+
"@babel/preset-env": "^7.29.7",
|
|
45
|
+
"@babel/preset-react": "^7.29.7",
|
|
46
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
47
|
+
"@formatjs/cli": "^6.16.6",
|
|
48
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
49
49
|
"@rollup/plugin-json": "^6.1.0",
|
|
50
50
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
51
51
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
52
52
|
"@rollup/plugin-url": "^8.0.2",
|
|
53
|
-
"@storybook/addon-a11y": "^10.4.
|
|
54
|
-
"@storybook/addon-docs": "^10.4.
|
|
53
|
+
"@storybook/addon-a11y": "^10.4.1",
|
|
54
|
+
"@storybook/addon-docs": "^10.4.1",
|
|
55
55
|
"@storybook/addon-mcp": "^0.6.0",
|
|
56
56
|
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
57
|
-
"@storybook/react-webpack5": "^10.4.
|
|
57
|
+
"@storybook/react-webpack5": "^10.4.1",
|
|
58
58
|
"@testing-library/dom": "^10.4.1",
|
|
59
59
|
"@testing-library/jest-dom": "^6.9.1",
|
|
60
60
|
"@testing-library/react": "^16.3.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/lodash": "4.17.24",
|
|
68
68
|
"@types/lodash.clamp": "^4.0.9",
|
|
69
69
|
"@types/lodash.debounce": "^4.0.9",
|
|
70
|
-
"@types/react": "^18.3.
|
|
70
|
+
"@types/react": "^18.3.29",
|
|
71
71
|
"@types/react-dom": "^18.3.7",
|
|
72
72
|
"@types/react-transition-group": "4.4.12",
|
|
73
73
|
"@monaco-editor/react": "^4.7.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@wise/eslint-config": "^14.2.1",
|
|
78
78
|
"babel-plugin-formatjs": "^10.5.41",
|
|
79
79
|
"eslint": "^9.39.4",
|
|
80
|
-
"eslint-plugin-storybook": "^10.4.
|
|
80
|
+
"eslint-plugin-storybook": "^10.4.1",
|
|
81
81
|
"gulp": "^5.0.1",
|
|
82
82
|
"jest": "^29.7.0",
|
|
83
83
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
"react-live": "^4.1.8",
|
|
89
89
|
"rollup": "^4.60.4",
|
|
90
90
|
"rollup-preserve-directives": "^1.1.3",
|
|
91
|
-
"storybook": "^10.4.
|
|
91
|
+
"storybook": "^10.4.1",
|
|
92
92
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
93
93
|
"storybook-addon-test-codegen": "^3.0.1",
|
|
94
94
|
"@transferwise/less-config": "3.1.2",
|
|
95
|
-
"@wise/
|
|
96
|
-
"@wise/
|
|
95
|
+
"@wise/components-theming": "1.10.2",
|
|
96
|
+
"@wise/wds-configs": "0.0.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@transferwise/icons": "^3 || ^4",
|
|
@@ -105,18 +105,18 @@
|
|
|
105
105
|
"react-intl": "^5.10.0 || ^6 || ^7"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@babel/runtime": "^7.29.
|
|
108
|
+
"@babel/runtime": "^7.29.7",
|
|
109
109
|
"@floating-ui/react": "^0.27.19",
|
|
110
110
|
"@headlessui/react": "^2.2.10",
|
|
111
|
-
"@react-aria/focus": "^3.22.
|
|
112
|
-
"@react-aria/overlays": "^3.32.
|
|
111
|
+
"@react-aria/focus": "^3.22.1",
|
|
112
|
+
"@react-aria/overlays": "^3.32.1",
|
|
113
113
|
"@transferwise/formatting": "^2.14.1",
|
|
114
114
|
"@transferwise/neptune-tokens": "^8.24.0",
|
|
115
115
|
"@transferwise/neptune-validation": "^3.3.4",
|
|
116
116
|
"clsx": "^2.1.1",
|
|
117
117
|
"commonmark": "^0.31.2",
|
|
118
118
|
"core-js": "^3.49.0",
|
|
119
|
-
"framer-motion": "^12.
|
|
119
|
+
"framer-motion": "^12.40.0",
|
|
120
120
|
"lodash.clamp": "^4.0.3",
|
|
121
121
|
"lodash.debounce": "^4.0.8",
|
|
122
122
|
"merge-props": "^6.0.0",
|
|
@@ -127,6 +127,10 @@
|
|
|
127
127
|
"access": "public",
|
|
128
128
|
"registry": "https://registry.npmjs.org/"
|
|
129
129
|
},
|
|
130
|
+
"wise": {
|
|
131
|
+
"platform": "wise-library",
|
|
132
|
+
"strict": true
|
|
133
|
+
},
|
|
130
134
|
"scripts": {
|
|
131
135
|
"dev": "npm-run-all --parallel dev:* dev:*:* storybook:dev",
|
|
132
136
|
"dev:less:watch": "gulp watchLess --dest=src",
|
|
@@ -80,7 +80,7 @@ describe('CriticalCommsBanner', () => {
|
|
|
80
80
|
|
|
81
81
|
const surface = screen.getByTestId('alert').closest('.critical-comms');
|
|
82
82
|
expect(surface).toHaveClass('wds-sentiment-surface');
|
|
83
|
-
expect(surface).toHaveClass('wds-sentiment-
|
|
83
|
+
expect(surface).toHaveClass('wds-sentiment-warning-light-elevated');
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
it('applies className to the wrapper', () => {
|