@transferwise/components 0.0.0-experimental-acbc541 → 0.0.0-experimental-6075266
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-6075266",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.29.0",
|
|
42
42
|
"@babel/plugin-transform-runtime": "^7.29.0",
|
|
43
|
-
"@babel/preset-env": "^7.29.
|
|
43
|
+
"@babel/preset-env": "^7.29.3",
|
|
44
44
|
"@babel/preset-react": "^7.28.5",
|
|
45
45
|
"@babel/preset-typescript": "^7.28.5",
|
|
46
|
-
"@formatjs/cli": "^6.14.
|
|
46
|
+
"@formatjs/cli": "^6.14.4",
|
|
47
47
|
"@rollup/plugin-babel": "^6.1.0",
|
|
48
48
|
"@rollup/plugin-json": "^6.1.0",
|
|
49
49
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
50
50
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
51
|
"@rollup/plugin-url": "^8.0.2",
|
|
52
|
-
"@storybook/addon-a11y": "^10.3.
|
|
53
|
-
"@storybook/addon-docs": "^10.3.
|
|
52
|
+
"@storybook/addon-a11y": "^10.3.6",
|
|
53
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
54
54
|
"@storybook/addon-mcp": "^0.6.0",
|
|
55
55
|
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
56
|
-
"@storybook/react-webpack5": "^10.3.
|
|
56
|
+
"@storybook/react-webpack5": "^10.3.6",
|
|
57
57
|
"@testing-library/dom": "^10.4.1",
|
|
58
58
|
"@testing-library/jest-dom": "^6.9.1",
|
|
59
59
|
"@testing-library/react": "^16.3.2",
|
|
@@ -69,11 +69,14 @@
|
|
|
69
69
|
"@types/react": "^18.3.28",
|
|
70
70
|
"@types/react-dom": "^18.3.7",
|
|
71
71
|
"@types/react-transition-group": "4.4.12",
|
|
72
|
+
"@monaco-editor/react": "^4.7.0",
|
|
73
|
+
"monaco-editor": "^0.55.1",
|
|
74
|
+
"monaco-editor-webpack-plugin": "^7.1.1",
|
|
72
75
|
"@wise/art": "^2.30.1",
|
|
73
76
|
"@wise/eslint-config": "^13.3.0",
|
|
74
77
|
"babel-plugin-formatjs": "^10.5.41",
|
|
75
78
|
"eslint": "^9.39.4",
|
|
76
|
-
"eslint-plugin-storybook": "^10.3.
|
|
79
|
+
"eslint-plugin-storybook": "^10.3.6",
|
|
77
80
|
"gulp": "^5.0.1",
|
|
78
81
|
"jest": "^30.3.0",
|
|
79
82
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -81,13 +84,14 @@
|
|
|
81
84
|
"jsdom-testing-mocks": "^1.16.0",
|
|
82
85
|
"lodash.times": "^4.3.2",
|
|
83
86
|
"react-intl": "^7.1.14",
|
|
87
|
+
"react-live": "^4.1.8",
|
|
84
88
|
"rollup": "^4.60.2",
|
|
85
89
|
"rollup-preserve-directives": "^1.1.3",
|
|
86
|
-
"storybook": "^10.3.
|
|
90
|
+
"storybook": "^10.3.6",
|
|
87
91
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
88
92
|
"storybook-addon-test-codegen": "^3.0.1",
|
|
89
93
|
"@transferwise/less-config": "3.1.2",
|
|
90
|
-
"@transferwise/neptune-css": "0.0.0-experimental-
|
|
94
|
+
"@transferwise/neptune-css": "0.0.0-experimental-6075266",
|
|
91
95
|
"@wise/components-theming": "1.10.1",
|
|
92
96
|
"@wise/wds-configs": "0.0.0"
|
|
93
97
|
},
|
|
@@ -117,7 +121,7 @@
|
|
|
117
121
|
"lodash.debounce": "^4.0.8",
|
|
118
122
|
"merge-props": "^6.0.0",
|
|
119
123
|
"react-transition-group": "^4.4.5",
|
|
120
|
-
"virtua": "^0.
|
|
124
|
+
"virtua": "^0.49.1"
|
|
121
125
|
},
|
|
122
126
|
"publishConfig": {
|
|
123
127
|
"access": "public",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
import { action } from 'storybook/actions';
|
|
4
4
|
import { ClockBorderless } from '@transferwise/icons';
|
|
5
|
+
import { createSandboxStory } from '../../.storybook/components/sandbox/SandboxEditor';
|
|
5
6
|
|
|
6
7
|
import { lorem40 } from '../test-utils';
|
|
7
8
|
import { Sentiment, Status } from '../common';
|
|
@@ -48,6 +49,34 @@ type Story = StoryObj<typeof Alert>;
|
|
|
48
49
|
|
|
49
50
|
export const Basic: Story = {};
|
|
50
51
|
|
|
52
|
+
export const Sandbox = createSandboxStory({
|
|
53
|
+
code: `const App = () => {
|
|
54
|
+
const [dismissed, setDismissed] = React.useState(false);
|
|
55
|
+
|
|
56
|
+
if (dismissed) {
|
|
57
|
+
return (
|
|
58
|
+
<Button v2 size="md" onClick={() => setDismissed(false)}>
|
|
59
|
+
Show alert again
|
|
60
|
+
</Button>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<Alert
|
|
66
|
+
action={{
|
|
67
|
+
'aria-label': 'Learn more',
|
|
68
|
+
text: 'Learn more',
|
|
69
|
+
href: '#',
|
|
70
|
+
}}
|
|
71
|
+
message="Payments sent to your bank details **today** might not arrive in time for the holidays."
|
|
72
|
+
onDismiss={() => setDismissed(true)}
|
|
73
|
+
type="positive"
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
};`,
|
|
77
|
+
scope: { Alert, Button, React },
|
|
78
|
+
});
|
|
79
|
+
|
|
51
80
|
export const Variants: Story = {
|
|
52
81
|
render: ({ message }) => {
|
|
53
82
|
const variants = [
|
|
@@ -81,7 +81,7 @@ export const All: Story = {
|
|
|
81
81
|
<div>
|
|
82
82
|
<AvatarWrapper
|
|
83
83
|
badgeStatusIcon={Sentiment.NEGATIVE}
|
|
84
|
-
url="https://wise.com/web-art/assets/flags/
|
|
84
|
+
url="https://wise.com/web-art/assets/flags/hr.svg"
|
|
85
85
|
profileType={ProfileType.BUSINESS}
|
|
86
86
|
avatarProps={avatarProps}
|
|
87
87
|
/>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import { fn } from 'storybook/test';
|
|
3
3
|
import { Freeze, ArrowRight, ChevronRight } from '@transferwise/icons';
|
|
4
|
+
import {
|
|
5
|
+
createSandboxStory,
|
|
6
|
+
globalScope,
|
|
7
|
+
} from '../../../.storybook/components/sandbox/SandboxEditor';
|
|
4
8
|
import { Flag } from '@wise/art';
|
|
5
9
|
import { lorem10, lorem20 } from '../../test-utils';
|
|
6
10
|
import SentimentSurface from '../../sentimentSurface';
|
|
@@ -317,6 +321,13 @@ export const Playground: StoryObj<PreviewStoryArgs> = {
|
|
|
317
321
|
},
|
|
318
322
|
};
|
|
319
323
|
|
|
324
|
+
export const Sandbox = createSandboxStory({
|
|
325
|
+
code: `<Button v2 size="md" onClick={console.log}>
|
|
326
|
+
Click me
|
|
327
|
+
</Button>`,
|
|
328
|
+
scope: globalScope,
|
|
329
|
+
});
|
|
330
|
+
|
|
320
331
|
/**
|
|
321
332
|
* There are two different types of button – default and negative – designed to emphasise the nature of the action. <br />
|
|
322
333
|
* **NB:** Sentiment only applies to `primary` and `secondary` priorities. <br />
|