@transferwise/components 46.160.4 → 46.160.6
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/ExpressiveMoneyInput/AmountInput/AmountInput.js +2 -0
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +2 -0
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
- package/build/ExpressiveMoneyInput/hooks/useInputStyle.js +1 -1
- package/build/ExpressiveMoneyInput/hooks/useInputStyle.js.map +1 -1
- package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs +1 -1
- package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs.map +1 -1
- package/build/Inputs/Input/Input.js +1 -0
- package/build/Inputs/Input/Input.js.map +1 -1
- package/build/Inputs/Input/Input.mjs +1 -0
- package/build/Inputs/Input/Input.mjs.map +1 -1
- package/build/Inputs/TextArea/TextArea.js +1 -0
- package/build/Inputs/TextArea/TextArea.js.map +1 -1
- package/build/Inputs/TextArea/TextArea.mjs +1 -0
- package/build/Inputs/TextArea/TextArea.mjs.map +1 -1
- package/build/MoneyInput/MoneyInput.js +1 -0
- package/build/MoneyInput/MoneyInput.js.map +1 -1
- package/build/MoneyInput/MoneyInput.mjs +1 -0
- package/build/MoneyInput/MoneyInput.mjs.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.js +3 -2
- package/build/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.messages.js +3 -0
- package/build/PhoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs +3 -0
- package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.mjs +3 -2
- package/build/PhoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +50 -20
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +50 -20
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/i18n/en.json +1 -0
- package/build/i18n/en.json.js +1 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +1 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +69 -1
- package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
- package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
- package/build/styles/Inputs/Input/Input.css +19 -0
- package/build/styles/Inputs/TextArea/TextArea.css +16 -1
- package/build/styles/MoneyInput/MoneyInput.css +3 -0
- package/build/styles/PhoneNumberInput/PhoneNumberInput.css +7 -0
- package/build/styles/PocketSurface/PocketSurface.css +1 -0
- package/build/styles/SentimentSurface/SentimentSurface.css +5 -0
- package/build/styles/css/neptune.css +11 -0
- package/build/styles/main.css +69 -1
- package/build/styles/styles/less/neptune.css +11 -0
- package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
- package/build/types/ExpressiveMoneyInput/hooks/useInputStyle.d.ts.map +1 -1
- package/build/types/Inputs/Input/Input.d.ts.map +1 -1
- package/build/types/Inputs/TextArea/TextArea.d.ts.map +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/PhoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts +5 -0
- package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -1
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts +1 -1
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +2 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +7 -0
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +2 -1
- package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
- package/src/ExpressiveMoneyInput/hooks/useInputStyle.ts +1 -2
- package/src/Field/_stories/Field.test.story.tsx +27 -0
- package/src/Inputs/Input/Input.css +19 -0
- package/src/Inputs/Input/Input.less +16 -0
- package/src/Inputs/Input/Input.tsx +1 -0
- package/src/Inputs/{_stories → InputGroup/_stories}/InputGroup.story.tsx +9 -9
- package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +80 -0
- package/src/Inputs/{_stories → SearchInput/_stories}/SearchInput.story.tsx +4 -4
- package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +38 -0
- package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +31 -19
- package/src/Inputs/TextArea/TextArea.css +16 -1
- package/src/Inputs/TextArea/TextArea.less +6 -1
- package/src/Inputs/TextArea/TextArea.tsx +1 -0
- package/src/Inputs/{_stories → TextArea/_stories}/TextArea.story.tsx +4 -4
- package/src/Inputs/{_stories → TextArea/_stories}/TextArea.test.story.tsx +50 -26
- package/src/MoneyInput/MoneyInput.css +3 -0
- package/src/MoneyInput/MoneyInput.less +6 -0
- package/src/MoneyInput/MoneyInput.tsx +1 -0
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +14 -10
- package/src/PhoneNumberInput/PhoneNumberInput.css +7 -0
- package/src/PhoneNumberInput/PhoneNumberInput.less +13 -0
- package/src/PhoneNumberInput/PhoneNumberInput.messages.ts +5 -0
- package/src/PhoneNumberInput/PhoneNumberInput.tsx +3 -2
- package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +15 -7
- package/src/PocketSurface/PocketSurface.css +1 -0
- package/src/Prompt/ActionPrompt/_stories/ActionPrompt.story.tsx +5 -1
- package/src/Prompt/InfoPrompt/_stories/InfoPrompt.story.tsx +12 -9
- package/src/Prompt/InlinePrompt/_stories/InlinePrompt.story.tsx +5 -5
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +2 -1
- package/src/SentimentSurface/SentimentSurface.css +5 -0
- package/src/SentimentSurface/SentimentSurface.less +5 -0
- package/src/SentimentSurface/_stories/SentimentSurface.story.tsx +6 -2
- package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +49 -34
- package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +31 -20
- package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +90 -57
- package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +8 -1
- package/src/main.css +69 -1
- package/src/styles/less/neptune.css +11 -0
- package/src/Inputs/_stories/InputGroup.test.story.tsx +0 -69
- package/src/Inputs/_stories/SearchInput.test.story.tsx +0 -32
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { Search } from '@transferwise/icons';
|
|
3
|
-
|
|
4
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
5
|
-
import Button from '../../Button';
|
|
6
|
-
import { Input } from '../Input/Input';
|
|
7
|
-
import { InputGroup } from '../InputGroup/InputGroup';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
component: InputGroup,
|
|
11
|
-
title: 'Forms/InputGroup/Tests',
|
|
12
|
-
tags: ['!autodocs', '!manifest'],
|
|
13
|
-
} satisfies Meta<typeof InputGroup>;
|
|
14
|
-
|
|
15
|
-
type Story = StoryObj<typeof InputGroup>;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* InputGroup positions addons at the logical start or end of an input.
|
|
19
|
-
* In RTL mode the start and end sides are mirrored, so an addonStart icon
|
|
20
|
-
* should appear on the right and an addonEnd button should appear on the left.
|
|
21
|
-
* All three placement combinations are included to verify each case.
|
|
22
|
-
*/
|
|
23
|
-
export const RTLDiff: Story = {
|
|
24
|
-
render: () => (
|
|
25
|
-
<>
|
|
26
|
-
<InputGroup
|
|
27
|
-
addonStart={{
|
|
28
|
-
content: <Search size={24} />,
|
|
29
|
-
initialContentWidth: 24,
|
|
30
|
-
}}
|
|
31
|
-
>
|
|
32
|
-
<Input placeholder="addonStart only" />
|
|
33
|
-
</InputGroup>
|
|
34
|
-
|
|
35
|
-
<InputGroup
|
|
36
|
-
addonEnd={{
|
|
37
|
-
content: (
|
|
38
|
-
<Button v2 size="sm">
|
|
39
|
-
Copy
|
|
40
|
-
</Button>
|
|
41
|
-
),
|
|
42
|
-
interactive: true,
|
|
43
|
-
padding: 'sm',
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
<Input placeholder="addonEnd only" />
|
|
47
|
-
</InputGroup>
|
|
48
|
-
|
|
49
|
-
<InputGroup
|
|
50
|
-
addonStart={{
|
|
51
|
-
content: <Search size={24} />,
|
|
52
|
-
initialContentWidth: 24,
|
|
53
|
-
}}
|
|
54
|
-
addonEnd={{
|
|
55
|
-
content: (
|
|
56
|
-
<Button v2 size="sm">
|
|
57
|
-
Clear
|
|
58
|
-
</Button>
|
|
59
|
-
),
|
|
60
|
-
interactive: true,
|
|
61
|
-
padding: 'sm',
|
|
62
|
-
}}
|
|
63
|
-
>
|
|
64
|
-
<Input placeholder="addonStart and addonEnd" />
|
|
65
|
-
</InputGroup>
|
|
66
|
-
</>
|
|
67
|
-
),
|
|
68
|
-
...withRTLDiff(),
|
|
69
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
|
|
3
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
4
|
-
import { Size } from '../../common';
|
|
5
|
-
import { SearchInput } from '../SearchInput/SearchInput';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: SearchInput,
|
|
9
|
-
title: 'Forms/SearchInput/Tests',
|
|
10
|
-
tags: ['!autodocs', '!manifest'],
|
|
11
|
-
} satisfies Meta<typeof SearchInput>;
|
|
12
|
-
|
|
13
|
-
type Story = StoryObj<typeof SearchInput>;
|
|
14
|
-
|
|
15
|
-
export const RTLDiff: Story = {
|
|
16
|
-
render: () => (
|
|
17
|
-
<>
|
|
18
|
-
{/* sm — search icon (addonStart) position flips to trailing side in RTL */}
|
|
19
|
-
<SearchInput size={Size.SMALL} shape="pill" placeholder="Search" />
|
|
20
|
-
|
|
21
|
-
{/* md — search icon (addonStart) position flips to trailing side in RTL */}
|
|
22
|
-
<SearchInput size={Size.MEDIUM} shape="pill" placeholder="Search" />
|
|
23
|
-
|
|
24
|
-
{/* sm rectangle — icon flip with rectangle shape */}
|
|
25
|
-
<SearchInput size={Size.SMALL} shape="rectangle" placeholder="Search" />
|
|
26
|
-
|
|
27
|
-
{/* md rectangle — icon flip with rectangle shape */}
|
|
28
|
-
<SearchInput size={Size.MEDIUM} shape="rectangle" placeholder="Search" />
|
|
29
|
-
</>
|
|
30
|
-
),
|
|
31
|
-
...withRTLDiff(),
|
|
32
|
-
};
|