@transferwise/components 0.0.0-experimental-975c35d → 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/build/main.css CHANGED
@@ -29148,7 +29148,7 @@ button.np-option {
29148
29148
  .np-flow-navigation__content {
29149
29149
  width: 100%;
29150
29150
  min-width: 320px;
29151
- max-width: 1164px;
29151
+ max-width: calc(100% - 36px);
29152
29152
  }
29153
29153
 
29154
29154
  .np-flow-navigation__stepper {
@@ -10,7 +10,7 @@
10
10
  .np-flow-navigation__content {
11
11
  width: 100%;
12
12
  min-width: 320px;
13
- max-width: 1164px;
13
+ max-width: calc(100% - 36px);
14
14
  }
15
15
  .np-flow-navigation__stepper {
16
16
  padding-bottom: 0 !important;
@@ -29148,7 +29148,7 @@ button.np-option {
29148
29148
  .np-flow-navigation__content {
29149
29149
  width: 100%;
29150
29150
  min-width: 320px;
29151
- max-width: 1164px;
29151
+ max-width: calc(100% - 36px);
29152
29152
  }
29153
29153
 
29154
29154
  .np-flow-navigation__stepper {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-975c35d",
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.2",
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.3",
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.5",
53
- "@storybook/addon-docs": "^10.3.5",
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.5",
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.5",
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.5",
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-975c35d",
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.48.8"
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/hrk.svg"
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 />
@@ -0,0 +1,85 @@
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+
3
+ import CriticalCommsBanner from '.';
4
+ import { withVariantConfig } from '../../.storybook/helpers';
5
+
6
+ export default {
7
+ component: CriticalCommsBanner,
8
+ title: 'Prompts/CriticalCommsBanner/Tests',
9
+ tags: ['!autodocs', 'deprecated'],
10
+ } satisfies Meta<typeof CriticalCommsBanner>;
11
+
12
+ type Story = StoryObj<typeof CriticalCommsBanner>;
13
+
14
+ export const Sentiments: Story = {
15
+ render: (args) => (
16
+ <>
17
+ <CriticalCommsBanner {...args} sentiment="negative" />
18
+ <CriticalCommsBanner {...args} sentiment="warning" />
19
+ <CriticalCommsBanner {...args} sentiment="neutral" />
20
+ </>
21
+ ),
22
+ args: {
23
+ subtitle: 'Add money within the next 30 days',
24
+ action: { label: 'Take action', href: 'https://wise.com' },
25
+ className: 'm-b-1',
26
+ },
27
+ ...withVariantConfig([
28
+ 'default',
29
+ 'dark',
30
+ 'bright-green',
31
+ 'forest-green',
32
+ 'business',
33
+ 'business--forest-green',
34
+ 'business--bright-green',
35
+ ]),
36
+ };
37
+
38
+ export const RTL: Story = {
39
+ render: (args) => (
40
+ <>
41
+ <CriticalCommsBanner {...args} sentiment="negative" />
42
+ <CriticalCommsBanner {...args} sentiment="warning" />
43
+ <CriticalCommsBanner {...args} sentiment="neutral" />
44
+ </>
45
+ ),
46
+ args: {
47
+ subtitle: 'Add money within the next 30 days',
48
+ action: { label: 'Take action', href: 'https://wise.com' },
49
+ className: 'm-b-1',
50
+ },
51
+ ...withVariantConfig(['rtl']),
52
+ };
53
+
54
+ export const Mobile: Story = {
55
+ args: {
56
+ subtitle: 'Add money within the next 30 days',
57
+ action: { label: 'Take action', href: 'https://wise.com' },
58
+ className: 'm-b-1',
59
+ },
60
+ ...withVariantConfig(['mobile']),
61
+ };
62
+
63
+ export const Zoom: Story = {
64
+ args: {
65
+ subtitle: 'Add money within the next 30 days',
66
+ action: { label: 'Take action', href: 'https://wise.com' },
67
+ className: 'm-b-1',
68
+ },
69
+ ...withVariantConfig(['400%']),
70
+ };
71
+
72
+ export const WithoutAction: Story = {
73
+ render: (args) => (
74
+ <>
75
+ <CriticalCommsBanner {...args} sentiment="negative" />
76
+ <CriticalCommsBanner {...args} sentiment="warning" />
77
+ <CriticalCommsBanner {...args} sentiment="neutral" />
78
+ </>
79
+ ),
80
+ args: {
81
+ subtitle: 'Add money within the next 30 days',
82
+ className: 'm-b-1',
83
+ },
84
+ ...withVariantConfig(['default']),
85
+ };
@@ -10,7 +10,7 @@
10
10
  .np-flow-navigation__content {
11
11
  width: 100%;
12
12
  min-width: 320px;
13
- max-width: 1164px;
13
+ max-width: calc(100% - 36px);
14
14
  }
15
15
  .np-flow-navigation__stepper {
16
16
  padding-bottom: 0 !important;
@@ -14,7 +14,7 @@
14
14
  &__content {
15
15
  width: 100%;
16
16
  min-width: 320px;
17
- max-width: 1164px;
17
+ max-width: calc(100% - 36px);
18
18
  }
19
19
 
20
20
  &__stepper {
@@ -309,6 +309,9 @@ export const WithOverlayHeaderComparison: Story = {
309
309
  done: false,
310
310
  avatarURL: '../tapestry-01.png',
311
311
  },
312
+ parameters: {
313
+ padding: '0',
314
+ },
312
315
  render: (args) => {
313
316
  const [activeStep, setActiveStep] = useState(4);
314
317
  const [closed, setClosed] = useState(false);
package/src/main.css CHANGED
@@ -29148,7 +29148,7 @@ button.np-option {
29148
29148
  .np-flow-navigation__content {
29149
29149
  width: 100%;
29150
29150
  min-width: 320px;
29151
- max-width: 1164px;
29151
+ max-width: calc(100% - 36px);
29152
29152
  }
29153
29153
 
29154
29154
  .np-flow-navigation__stepper {
@@ -52,7 +52,7 @@ export const Variants: StoryObj<RadioProps> = {
52
52
  id="radioGroup2"
53
53
  avatar={
54
54
  <AvatarView>
55
- <Flag code="IMP" />
55
+ <Flag code="IM" />
56
56
  </AvatarView>
57
57
  }
58
58
  value="option2"