@transferwise/components 0.0.0-experimental-1dc47da → 0.0.0-experimental-63ba67a
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-63ba67a",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
"react-intl": "^6.6.6",
|
|
95
95
|
"rollup": "^4.17.2",
|
|
96
96
|
"storybook": "^7.6.19",
|
|
97
|
-
"@transferwise/
|
|
97
|
+
"@transferwise/neptune-css": "14.10.0",
|
|
98
98
|
"@wise/components-theming": "1.3.0",
|
|
99
|
-
"@transferwise/
|
|
99
|
+
"@transferwise/less-config": "3.1.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { within, userEvent } from '@storybook/test';
|
|
2
|
+
import { expect, within, userEvent } from '@storybook/test';
|
|
3
3
|
import { Lock } from '@transferwise/icons';
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
|
|
@@ -148,6 +148,19 @@ export const BalanceCurrencies: Story = {
|
|
|
148
148
|
},
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
+
export const MaxLengthOverride: Story = {
|
|
152
|
+
args: {
|
|
153
|
+
...SingleCurrency.args,
|
|
154
|
+
maxLengthOverride: 5,
|
|
155
|
+
},
|
|
156
|
+
play: async ({ canvasElement }) => {
|
|
157
|
+
await userEvent.tab();
|
|
158
|
+
await userEvent.keyboard('12.345');
|
|
159
|
+
|
|
160
|
+
await expect(within(canvasElement).getByRole('textbox')).toHaveValue('12.34');
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
|
|
151
164
|
export const OpenedInput: Story = {
|
|
152
165
|
...MultipleCurrencies,
|
|
153
166
|
play: async ({ canvasElement }) => {
|