@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.
Files changed (106) hide show
  1. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js +2 -0
  2. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
  3. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +2 -0
  4. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
  5. package/build/ExpressiveMoneyInput/hooks/useInputStyle.js +1 -1
  6. package/build/ExpressiveMoneyInput/hooks/useInputStyle.js.map +1 -1
  7. package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs +1 -1
  8. package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs.map +1 -1
  9. package/build/Inputs/Input/Input.js +1 -0
  10. package/build/Inputs/Input/Input.js.map +1 -1
  11. package/build/Inputs/Input/Input.mjs +1 -0
  12. package/build/Inputs/Input/Input.mjs.map +1 -1
  13. package/build/Inputs/TextArea/TextArea.js +1 -0
  14. package/build/Inputs/TextArea/TextArea.js.map +1 -1
  15. package/build/Inputs/TextArea/TextArea.mjs +1 -0
  16. package/build/Inputs/TextArea/TextArea.mjs.map +1 -1
  17. package/build/MoneyInput/MoneyInput.js +1 -0
  18. package/build/MoneyInput/MoneyInput.js.map +1 -1
  19. package/build/MoneyInput/MoneyInput.mjs +1 -0
  20. package/build/MoneyInput/MoneyInput.mjs.map +1 -1
  21. package/build/PhoneNumberInput/PhoneNumberInput.js +3 -2
  22. package/build/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
  23. package/build/PhoneNumberInput/PhoneNumberInput.messages.js +3 -0
  24. package/build/PhoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
  25. package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs +3 -0
  26. package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
  27. package/build/PhoneNumberInput/PhoneNumberInput.mjs +3 -2
  28. package/build/PhoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  29. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +50 -20
  30. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
  31. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +50 -20
  32. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
  33. package/build/i18n/en.json +1 -0
  34. package/build/i18n/en.json.js +1 -0
  35. package/build/i18n/en.json.js.map +1 -1
  36. package/build/i18n/en.json.mjs +1 -0
  37. package/build/i18n/en.json.mjs.map +1 -1
  38. package/build/main.css +69 -1
  39. package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
  40. package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
  41. package/build/styles/Inputs/Input/Input.css +19 -0
  42. package/build/styles/Inputs/TextArea/TextArea.css +16 -1
  43. package/build/styles/MoneyInput/MoneyInput.css +3 -0
  44. package/build/styles/PhoneNumberInput/PhoneNumberInput.css +7 -0
  45. package/build/styles/PocketSurface/PocketSurface.css +1 -0
  46. package/build/styles/SentimentSurface/SentimentSurface.css +5 -0
  47. package/build/styles/css/neptune.css +11 -0
  48. package/build/styles/main.css +69 -1
  49. package/build/styles/styles/less/neptune.css +11 -0
  50. package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
  51. package/build/types/ExpressiveMoneyInput/hooks/useInputStyle.d.ts.map +1 -1
  52. package/build/types/Inputs/Input/Input.d.ts.map +1 -1
  53. package/build/types/Inputs/TextArea/TextArea.d.ts.map +1 -1
  54. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  55. package/build/types/PhoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  56. package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts +5 -0
  57. package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -1
  58. package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts +1 -1
  59. package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
  60. package/build/types/test-utils/index.d.ts +2 -0
  61. package/build/types/test-utils/index.d.ts.map +1 -1
  62. package/package.json +14 -14
  63. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
  64. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +7 -0
  65. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +2 -1
  66. package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
  67. package/src/ExpressiveMoneyInput/hooks/useInputStyle.ts +1 -2
  68. package/src/Field/_stories/Field.test.story.tsx +27 -0
  69. package/src/Inputs/Input/Input.css +19 -0
  70. package/src/Inputs/Input/Input.less +16 -0
  71. package/src/Inputs/Input/Input.tsx +1 -0
  72. package/src/Inputs/{_stories → InputGroup/_stories}/InputGroup.story.tsx +9 -9
  73. package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +80 -0
  74. package/src/Inputs/{_stories → SearchInput/_stories}/SearchInput.story.tsx +4 -4
  75. package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +38 -0
  76. package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +31 -19
  77. package/src/Inputs/TextArea/TextArea.css +16 -1
  78. package/src/Inputs/TextArea/TextArea.less +6 -1
  79. package/src/Inputs/TextArea/TextArea.tsx +1 -0
  80. package/src/Inputs/{_stories → TextArea/_stories}/TextArea.story.tsx +4 -4
  81. package/src/Inputs/{_stories → TextArea/_stories}/TextArea.test.story.tsx +50 -26
  82. package/src/MoneyInput/MoneyInput.css +3 -0
  83. package/src/MoneyInput/MoneyInput.less +6 -0
  84. package/src/MoneyInput/MoneyInput.tsx +1 -0
  85. package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +14 -10
  86. package/src/PhoneNumberInput/PhoneNumberInput.css +7 -0
  87. package/src/PhoneNumberInput/PhoneNumberInput.less +13 -0
  88. package/src/PhoneNumberInput/PhoneNumberInput.messages.ts +5 -0
  89. package/src/PhoneNumberInput/PhoneNumberInput.tsx +3 -2
  90. package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +15 -7
  91. package/src/PocketSurface/PocketSurface.css +1 -0
  92. package/src/Prompt/ActionPrompt/_stories/ActionPrompt.story.tsx +5 -1
  93. package/src/Prompt/InfoPrompt/_stories/InfoPrompt.story.tsx +12 -9
  94. package/src/Prompt/InlinePrompt/_stories/InlinePrompt.story.tsx +5 -5
  95. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +2 -1
  96. package/src/SentimentSurface/SentimentSurface.css +5 -0
  97. package/src/SentimentSurface/SentimentSurface.less +5 -0
  98. package/src/SentimentSurface/_stories/SentimentSurface.story.tsx +6 -2
  99. package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +49 -34
  100. package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +31 -20
  101. package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +90 -57
  102. package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +8 -1
  103. package/src/main.css +69 -1
  104. package/src/styles/less/neptune.css +11 -0
  105. package/src/Inputs/_stories/InputGroup.test.story.tsx +0 -69
  106. 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
- };