@transferwise/components 46.160.5 → 46.160.7
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/Prompt/InfoPrompt/InfoPrompt.js +13 -6
- package/build/Prompt/InfoPrompt/InfoPrompt.js.map +1 -1
- package/build/Prompt/InfoPrompt/InfoPrompt.mjs +13 -6
- package/build/Prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.js +1 -0
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.mjs +1 -0
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.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 +68 -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/Prompt/PrimitivePrompt/PrimitivePrompt.css +17 -0
- package/build/styles/main.css +68 -1
- 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/Prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -1
- package/build/types/Prompt/PrimitivePrompt/PrimitivePrompt.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 +1 -1
- 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/Prompt/InfoPrompt/InfoPrompt.test.tsx +56 -2
- package/src/Prompt/InfoPrompt/InfoPrompt.tsx +14 -7
- package/src/Prompt/InfoPrompt/_stories/InfoPrompt.story.tsx +6 -1
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +17 -0
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +15 -0
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.tsx +1 -0
- 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 +68 -1
- package/src/Inputs/_stories/InputGroup.test.story.tsx +0 -69
- package/src/Inputs/_stories/SearchInput.test.story.tsx +0 -32
package/src/main.css
CHANGED
|
@@ -22607,6 +22607,25 @@ button.np-option {
|
|
|
22607
22607
|
color: #768e9c;
|
|
22608
22608
|
color: var(--color-content-tertiary);
|
|
22609
22609
|
}
|
|
22610
|
+
[dir="rtl"] .np-input::-moz-placeholder {
|
|
22611
|
+
direction: rtl !important;
|
|
22612
|
+
}
|
|
22613
|
+
[dir="rtl"] .np-input:-moz-placeholder {
|
|
22614
|
+
direction: rtl !important;
|
|
22615
|
+
}
|
|
22616
|
+
[dir="rtl"] .np-input::placeholder,
|
|
22617
|
+
[dir="rtl"] .np-input:placeholder-shown {
|
|
22618
|
+
direction: rtl !important;
|
|
22619
|
+
}
|
|
22620
|
+
[dir="rtl"] .np-input:-moz-placeholder[type="email"], [dir="rtl"] .np-input:-moz-placeholder[type="tel"], [dir="rtl"] .np-input:-moz-placeholder[type="number"], [dir="rtl"] .np-input:-moz-placeholder[type="url"] {
|
|
22621
|
+
direction: ltr !important;
|
|
22622
|
+
}
|
|
22623
|
+
[dir="rtl"] .np-input:placeholder-shown[type="email"],
|
|
22624
|
+
[dir="rtl"] .np-input:placeholder-shown[type="tel"],
|
|
22625
|
+
[dir="rtl"] .np-input:placeholder-shown[type="number"],
|
|
22626
|
+
[dir="rtl"] .np-input:placeholder-shown[type="url"] {
|
|
22627
|
+
direction: ltr !important;
|
|
22628
|
+
}
|
|
22610
22629
|
.np-input--shape-rectangle {
|
|
22611
22630
|
border-radius: 10px !important;
|
|
22612
22631
|
border-radius: var(--radius-small) !important;
|
|
@@ -23794,10 +23813,25 @@ button.np-option {
|
|
|
23794
23813
|
color: #768e9c;
|
|
23795
23814
|
color: var(--color-content-tertiary);
|
|
23796
23815
|
}
|
|
23797
|
-
.np-text-area
|
|
23816
|
+
.np-text-area:-moz-placeholder {
|
|
23817
|
+
color: #768e9c;
|
|
23818
|
+
color: var(--color-content-tertiary);
|
|
23819
|
+
}
|
|
23820
|
+
.np-text-area::placeholder,
|
|
23821
|
+
.np-text-area:placeholder-shown {
|
|
23798
23822
|
color: #768e9c;
|
|
23799
23823
|
color: var(--color-content-tertiary);
|
|
23800
23824
|
}
|
|
23825
|
+
[dir="rtl"] .np-text-area::-moz-placeholder {
|
|
23826
|
+
direction: rtl !important;
|
|
23827
|
+
}
|
|
23828
|
+
[dir="rtl"] .np-text-area:-moz-placeholder {
|
|
23829
|
+
direction: rtl !important;
|
|
23830
|
+
}
|
|
23831
|
+
[dir="rtl"] .np-text-area::placeholder,
|
|
23832
|
+
[dir="rtl"] .np-text-area:placeholder-shown {
|
|
23833
|
+
direction: rtl !important;
|
|
23834
|
+
}
|
|
23801
23835
|
.tw-instructions {
|
|
23802
23836
|
/* Reset */
|
|
23803
23837
|
margin: 0;
|
|
@@ -24208,6 +24242,9 @@ button.np-link {
|
|
|
24208
24242
|
font-weight: 600;
|
|
24209
24243
|
font-weight: var(--font-weight-semi-bold);
|
|
24210
24244
|
}
|
|
24245
|
+
[dir="rtl"] .tw-money-input .money-input__number-input {
|
|
24246
|
+
text-align: end;
|
|
24247
|
+
}
|
|
24211
24248
|
.tw-money-input .money-input-currency-flag {
|
|
24212
24249
|
display: flex;
|
|
24213
24250
|
align-items: center;
|
|
@@ -24276,6 +24313,10 @@ button.np-link {
|
|
|
24276
24313
|
overflow: hidden;
|
|
24277
24314
|
margin-block-end: 0 !important;
|
|
24278
24315
|
}
|
|
24316
|
+
[dir="rtl"] .wds-amount-input-input-container {
|
|
24317
|
+
display: inline-grid;
|
|
24318
|
+
grid-template-columns: auto 1fr;
|
|
24319
|
+
}
|
|
24279
24320
|
@media (prefers-reduced-motion: reduce) {
|
|
24280
24321
|
.wds-amount-input-input-container {
|
|
24281
24322
|
transition: none;
|
|
@@ -24288,6 +24329,8 @@ button.np-link {
|
|
|
24288
24329
|
text-align: end;
|
|
24289
24330
|
background-color: transparent;
|
|
24290
24331
|
line-height: inherit;
|
|
24332
|
+
field-sizing: content;
|
|
24333
|
+
block-size: inherit;
|
|
24291
24334
|
}
|
|
24292
24335
|
.wds-amount-input-input:focus-visible {
|
|
24293
24336
|
outline: none;
|
|
@@ -24552,6 +24595,9 @@ button.np-link {
|
|
|
24552
24595
|
margin-inline-start: 12px;
|
|
24553
24596
|
margin-inline-start: var(--size-12);
|
|
24554
24597
|
}
|
|
24598
|
+
[dir="rtl"] .tw-telephone__number-input-field {
|
|
24599
|
+
text-align: end;
|
|
24600
|
+
}
|
|
24555
24601
|
.tw-telephone__country-select {
|
|
24556
24602
|
flex-basis: 120px;
|
|
24557
24603
|
flex-shrink: 0;
|
|
@@ -24559,6 +24605,10 @@ button.np-link {
|
|
|
24559
24605
|
.tw-telephone__country-select .np-input-group {
|
|
24560
24606
|
inline-size: 100%;
|
|
24561
24607
|
}
|
|
24608
|
+
[dir="rtl"] .tw-telephone__country-select .np-select-input-content {
|
|
24609
|
+
text-align: end;
|
|
24610
|
+
direction: ltr;
|
|
24611
|
+
}
|
|
24562
24612
|
.tw-telephone__country-select--with-input-group-addon-start .np-button-input {
|
|
24563
24613
|
padding-inline-start: 48px;
|
|
24564
24614
|
padding-inline-start: var(--size-48);
|
|
@@ -24871,6 +24921,23 @@ button.np-link {
|
|
|
24871
24921
|
grid-column: span 3;
|
|
24872
24922
|
}
|
|
24873
24923
|
}
|
|
24924
|
+
.wds-prompt__dismiss {
|
|
24925
|
+
position: relative;
|
|
24926
|
+
}
|
|
24927
|
+
.wds-prompt__dismiss:before {
|
|
24928
|
+
--size: calc(var(--size-24) + var(--Prompt-padding-x, var(--padding-x-small)) * 2);
|
|
24929
|
+
--offset: calc(-1 * var(--Prompt-padding-x, var(--padding-x-small)));
|
|
24930
|
+
content: "";
|
|
24931
|
+
position: absolute;
|
|
24932
|
+
inset: calc(-1 * 8px);
|
|
24933
|
+
inset: var(--offset);
|
|
24934
|
+
inline-size: calc(24px + 8px * 2);
|
|
24935
|
+
inline-size: var(--size);
|
|
24936
|
+
block-size: calc(24px + 8px * 2);
|
|
24937
|
+
block-size: var(--size);
|
|
24938
|
+
border-radius: 10px;
|
|
24939
|
+
border-radius: var(--Prompt-border-radius, var(--radius-small));
|
|
24940
|
+
}
|
|
24874
24941
|
.wds-inline-prompt {
|
|
24875
24942
|
--Prompt-gap: calc(var(--size-12) / 2);
|
|
24876
24943
|
--Prompt-padding-x: var(--padding-x-small);
|
|
@@ -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
|
-
};
|