@transferwise/components 0.0.0-experimental-468b85f → 0.0.0-experimental-a9e2e05

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 (153) hide show
  1. package/build/avatarLayout/AvatarLayout.js +9 -2
  2. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  3. package/build/avatarLayout/AvatarLayout.mjs +9 -2
  4. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  5. package/build/button/Button/src/Button.js +93 -0
  6. package/build/button/Button/src/Button.js.map +1 -0
  7. package/build/button/Button/src/Button.mjs +91 -0
  8. package/build/button/Button/src/Button.mjs.map +1 -0
  9. package/build/button/{Button.js → LegacyButton/Button.js} +25 -24
  10. package/build/button/LegacyButton/Button.js.map +1 -0
  11. package/build/button/{Button.mjs → LegacyButton/Button.mjs} +25 -24
  12. package/build/button/LegacyButton/Button.mjs.map +1 -0
  13. package/build/button/LegacyButton/classMap.js +42 -0
  14. package/build/button/LegacyButton/classMap.js.map +1 -0
  15. package/build/button/LegacyButton/classMap.mjs +39 -0
  16. package/build/button/LegacyButton/classMap.mjs.map +1 -0
  17. package/build/button/{legacyUtils → LegacyButton/legacyUtils}/legacyUtils.js +21 -21
  18. package/build/button/LegacyButton/legacyUtils/legacyUtils.js.map +1 -0
  19. package/build/button/{legacyUtils → LegacyButton/legacyUtils}/legacyUtils.mjs +21 -21
  20. package/build/button/LegacyButton/legacyUtils/legacyUtils.mjs.map +1 -0
  21. package/build/button/src/Button.js +66 -0
  22. package/build/button/src/Button.js.map +1 -0
  23. package/build/button/src/Button.mjs +64 -0
  24. package/build/button/src/Button.mjs.map +1 -0
  25. package/build/circularButton/CircularButton.js +1 -1
  26. package/build/circularButton/CircularButton.js.map +1 -1
  27. package/build/circularButton/CircularButton.mjs +1 -1
  28. package/build/circularButton/CircularButton.mjs.map +1 -1
  29. package/build/common/action/Action.js +1 -1
  30. package/build/common/action/Action.js.map +1 -1
  31. package/build/common/action/Action.mjs +1 -1
  32. package/build/common/action/Action.mjs.map +1 -1
  33. package/build/criticalBanner/CriticalCommsBanner.js +1 -1
  34. package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
  35. package/build/header/Header.js +1 -1
  36. package/build/header/Header.mjs +1 -1
  37. package/build/index.js +1 -1
  38. package/build/index.mjs +1 -1
  39. package/build/link/Link.js +8 -3
  40. package/build/link/Link.js.map +1 -1
  41. package/build/link/Link.mjs +8 -3
  42. package/build/link/Link.mjs.map +1 -1
  43. package/build/main.css +288 -29
  44. package/build/nudge/Nudge.js +1 -1
  45. package/build/nudge/Nudge.js.map +1 -1
  46. package/build/nudge/Nudge.mjs +1 -1
  47. package/build/nudge/Nudge.mjs.map +1 -1
  48. package/build/select/Select.js +1 -1
  49. package/build/select/Select.mjs +1 -1
  50. package/build/styles/avatarLayout/AvatarLayout.css +11 -0
  51. package/build/styles/button/Button/less/Button.css +253 -0
  52. package/build/styles/button/Button/less/Button.vars.css +57 -0
  53. package/build/styles/iconButton/IconButton.css +24 -29
  54. package/build/styles/main.css +288 -29
  55. package/build/types/avatarLayout/AvatarLayout.d.ts +1 -2
  56. package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
  57. package/build/types/avatarLayout/index.d.ts +1 -0
  58. package/build/types/avatarLayout/index.d.ts.map +1 -1
  59. package/build/types/button/Button/index.d.ts +3 -0
  60. package/build/types/button/Button/index.d.ts.map +1 -0
  61. package/build/types/button/Button/src/Button.d.ts +4 -0
  62. package/build/types/button/Button/src/Button.d.ts.map +1 -0
  63. package/build/types/button/Button/src/Button.types.d.ts +50 -0
  64. package/build/types/button/Button/src/Button.types.d.ts.map +1 -0
  65. package/build/types/button/Button/src/index.d.ts +2 -0
  66. package/build/types/button/Button/src/index.d.ts.map +1 -0
  67. package/build/types/button/{Button.d.ts → LegacyButton/Button.d.ts} +8 -5
  68. package/build/types/button/LegacyButton/Button.d.ts.map +1 -0
  69. package/build/types/button/LegacyButton/classMap.d.ts.map +1 -0
  70. package/build/types/button/LegacyButton/index.d.ts +3 -0
  71. package/build/types/button/LegacyButton/index.d.ts.map +1 -0
  72. package/build/types/button/LegacyButton/legacyUtils/index.d.ts.map +1 -0
  73. package/build/types/button/{legacyUtils → LegacyButton/legacyUtils}/legacyUtils.d.ts +1 -1
  74. package/build/types/button/LegacyButton/legacyUtils/legacyUtils.d.ts.map +1 -0
  75. package/build/types/button/index.d.ts +2 -2
  76. package/build/types/button/index.d.ts.map +1 -1
  77. package/build/types/button/src/Button.d.ts +47 -0
  78. package/build/types/button/src/Button.d.ts.map +1 -0
  79. package/build/types/button/src/index.d.ts +3 -0
  80. package/build/types/button/src/index.d.ts.map +1 -0
  81. package/build/types/link/Link.d.ts +2 -2
  82. package/build/types/link/Link.d.ts.map +1 -1
  83. package/build/types/test-utils/index.d.ts.map +1 -1
  84. package/build/upload/steps/completeStep/completeStep.js +1 -1
  85. package/build/upload/steps/completeStep/completeStep.mjs +1 -1
  86. package/build/upload/steps/processingStep/processingStep.js +1 -1
  87. package/build/upload/steps/processingStep/processingStep.mjs +1 -1
  88. package/build/uploadInput/UploadInput.js +1 -1
  89. package/build/uploadInput/UploadInput.mjs +1 -1
  90. package/package.json +3 -3
  91. package/src/avatarLayout/AvatarLayout.css +11 -0
  92. package/src/avatarLayout/AvatarLayout.less +18 -1
  93. package/src/avatarLayout/AvatarLayout.tsx +11 -3
  94. package/src/avatarLayout/index.ts +1 -0
  95. package/src/avatarWrapper/AvatarWrapper.story.tsx +2 -0
  96. package/src/button/Button/index.ts +2 -0
  97. package/src/button/Button/less/Button.css +253 -0
  98. package/src/button/Button/less/Button.less +221 -0
  99. package/src/button/Button/less/Button.vars.css +57 -0
  100. package/src/button/Button/less/Button.vars.less +65 -0
  101. package/src/button/Button/src/Button.tsx +116 -0
  102. package/src/button/Button/src/Button.types.ts +70 -0
  103. package/src/button/Button/src/index.ts +1 -0
  104. package/src/button/Button/stories/Button.story.tsx +314 -0
  105. package/src/button/Button/stories/Button.tests.story.tsx +288 -0
  106. package/src/button/Button/test/Button.spec.tsx +328 -0
  107. package/src/button/{Button.less → LegacyButton/Button.less} +1 -1
  108. package/src/button/{Button.spec.tsx → LegacyButton/Button.spec.tsx} +3 -3
  109. package/src/button/LegacyButton/Button.story.tsx +224 -0
  110. package/src/button/{Button.tsx → LegacyButton/Button.tsx} +14 -9
  111. package/src/button/{classMap.ts → LegacyButton/classMap.ts} +1 -1
  112. package/src/button/LegacyButton/index.ts +3 -0
  113. package/src/button/{legacyUtils → LegacyButton/legacyUtils}/legacyUtils.spec.tsx +2 -2
  114. package/src/button/{legacyUtils → LegacyButton/legacyUtils}/legacyUtils.ts +2 -2
  115. package/src/button/index.ts +2 -3
  116. package/src/button/src/Button.tsx +87 -0
  117. package/src/button/src/index.ts +2 -0
  118. package/src/button/test/Button.spec.tsx +32 -0
  119. package/src/circularButton/CircularButton.tsx +1 -1
  120. package/src/common/action/Action.tsx +1 -1
  121. package/src/iconButton/IconButton.css +24 -29
  122. package/src/iconButton/IconButton.less +4 -4
  123. package/src/link/Link.tsx +15 -6
  124. package/src/main.css +288 -29
  125. package/src/main.less +2 -1
  126. package/src/nudge/Nudge.tsx +1 -1
  127. package/src/phoneNumberInput/PhoneNumberInput.rtl.spec.tsx +32 -0
  128. package/src/phoneNumberInput/PhoneNumberInput.spec.js +356 -0
  129. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +1 -1
  130. package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +1 -1
  131. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +1 -1
  132. package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +2 -3
  133. package/src/test-utils/index.tsx +0 -1
  134. package/build/button/Button.js.map +0 -1
  135. package/build/button/Button.mjs.map +0 -1
  136. package/build/button/classMap.js +0 -42
  137. package/build/button/classMap.js.map +0 -1
  138. package/build/button/classMap.mjs +0 -39
  139. package/build/button/classMap.mjs.map +0 -1
  140. package/build/button/legacyUtils/legacyUtils.js.map +0 -1
  141. package/build/button/legacyUtils/legacyUtils.mjs.map +0 -1
  142. package/build/types/button/Button.d.ts.map +0 -1
  143. package/build/types/button/classMap.d.ts.map +0 -1
  144. package/build/types/button/legacyUtils/index.d.ts.map +0 -1
  145. package/build/types/button/legacyUtils/legacyUtils.d.ts.map +0 -1
  146. package/src/button/Button.story.tsx +0 -163
  147. package/src/phoneNumberInput/PhoneNumberInput.spec.tsx +0 -300
  148. /package/build/styles/button/{Button.css → LegacyButton/Button.css} +0 -0
  149. /package/build/types/button/{classMap.d.ts → LegacyButton/classMap.d.ts} +0 -0
  150. /package/build/types/button/{legacyUtils → LegacyButton/legacyUtils}/index.d.ts +0 -0
  151. /package/src/button/{Button.css → LegacyButton/Button.css} +0 -0
  152. /package/src/button/{__snapshots__ → LegacyButton/__snapshots__}/Button.spec.tsx.snap +0 -0
  153. /package/src/button/{legacyUtils → LegacyButton/legacyUtils}/index.ts +0 -0
@@ -0,0 +1,356 @@
1
+ import { shallow, mount } from 'enzyme';
2
+ import { useIntl } from 'react-intl';
3
+
4
+ import { mockMatchMedia, mockResizeObserver } from '../test-utils';
5
+
6
+ import PhoneNumberInput from '.';
7
+
8
+ const locale = 'en-GB';
9
+ const formatMessage = (message) => message.defaultMessage;
10
+ jest.mock('react-intl', () => ({
11
+ ...jest.requireActual('react-intl'),
12
+ useIntl: jest.fn(() => ({ locale, formatMessage })),
13
+ }));
14
+
15
+ mockMatchMedia();
16
+ mockResizeObserver();
17
+
18
+ const simulatePaste = (element, value) =>
19
+ element.simulate('paste', { nativeEvent: { clipboardData: { getData: () => value } } });
20
+
21
+ describe('Given a telephone number component', () => {
22
+ let select;
23
+ let input;
24
+ let component;
25
+ const props = { onChange: jest.fn() };
26
+ const PREFIX_SELECT_SELECTOR = 'SelectInput';
27
+ const NUMBER_SELECTOR = 'input[name="phoneNumber"]';
28
+
29
+ beforeEach(() => {
30
+ useIntl.mockReturnValue({ locale, formatMessage });
31
+ });
32
+
33
+ afterEach(() => {
34
+ jest.clearAllMocks();
35
+ });
36
+
37
+ describe('when initialised without a model', () => {
38
+ beforeEach(() => {
39
+ component = shallow(<PhoneNumberInput {...props} />);
40
+ select = component.find(PREFIX_SELECT_SELECTOR);
41
+ input = component.find(NUMBER_SELECTOR);
42
+ });
43
+
44
+ it('should set prefix control to default UK value', () => {
45
+ expect(select.props().value).toBe('+44');
46
+ });
47
+
48
+ it('should set number control to empty', () => {
49
+ expect(input.prop('value')).toBe('');
50
+ });
51
+
52
+ it('should not disable the select', () => {
53
+ expect(select.prop('disabled')).toBeFalsy();
54
+ });
55
+
56
+ it('should not disable the input', () => {
57
+ expect(input.prop('disabled')).toBeFalsy();
58
+ });
59
+ });
60
+
61
+ describe('when a valid model is supplied', () => {
62
+ beforeEach(() => {
63
+ component = shallow(<PhoneNumberInput {...props} initialValue="+39123456789" />);
64
+ select = component.find(PREFIX_SELECT_SELECTOR);
65
+ input = component.find(NUMBER_SELECTOR);
66
+ });
67
+
68
+ it('should set control values correctly', () => {
69
+ expect(select.props().value).toBe('+39');
70
+ expect(input.prop('value')).toBe('123456789');
71
+ });
72
+ });
73
+
74
+ describe('when an id is supplied', () => {
75
+ beforeEach(() => {
76
+ component = shallow(<PhoneNumberInput id="mock-id" {...props} />);
77
+ select = component.find(PREFIX_SELECT_SELECTOR);
78
+ input = component.find(NUMBER_SELECTOR);
79
+ });
80
+
81
+ it('should render select with undefined id', () => {
82
+ expect(select.prop('id')).toBeUndefined();
83
+ });
84
+
85
+ it('should render input with expected id', () => {
86
+ expect(input.prop('id')).toBe('mock-id');
87
+ });
88
+ });
89
+
90
+ describe('when an id is not supplied', () => {
91
+ beforeEach(() => {
92
+ component = shallow(<PhoneNumberInput {...props} />);
93
+ input = component.find(NUMBER_SELECTOR);
94
+ });
95
+
96
+ it('should render input with unspecified id', () => {
97
+ expect(input.prop('id')).toBeUndefined();
98
+ });
99
+ });
100
+
101
+ describe('when pasting', () => {
102
+ beforeEach(() => {
103
+ component = mount(<PhoneNumberInput {...props} initialValue="+39123456789" />);
104
+ select = () => component.find(PREFIX_SELECT_SELECTOR);
105
+ input = () => component.find(NUMBER_SELECTOR);
106
+ });
107
+
108
+ [
109
+ { number: '+36303932551', countryCode: '+36', localNumber: '303932551' },
110
+ { number: '+39123456781', countryCode: '+39', localNumber: '123456781' },
111
+ { number: '+44 7700 900415', countryCode: '+44', localNumber: '7700900415' },
112
+ { number: '+2975557308515', countryCode: '+297', localNumber: '5557308515' },
113
+ { number: '+297-555-7217-360', countryCode: '+297', localNumber: '5557217360' },
114
+ { number: '+213-555-5160-67', countryCode: '+213', localNumber: '555516067' },
115
+ { number: '+246-387-5553', countryCode: '+246', localNumber: '3875553' },
116
+ { number: '+852-940-5558--6', countryCode: '+852', localNumber: '94055586' },
117
+ { number: '+228 253 5558 4', countryCode: '+228', localNumber: '25355584' },
118
+ ].forEach(({ number, countryCode, localNumber }) => {
119
+ it(`${number} code should update the value properly`, () => {
120
+ simulatePaste(component.find('input'), number);
121
+
122
+ expect(select().props().value).toBe(countryCode);
123
+ expect(input().prop('value')).toBe(localNumber);
124
+ expect(props.onChange).toHaveBeenCalledWith(number.replace(/(\s|-)+/g, ''), countryCode);
125
+ });
126
+ });
127
+
128
+ it('should not paste invalid characters', () => {
129
+ simulatePaste(component.find('input'), '+36asdasdasd');
130
+ expect(select().props().value).toBe('+39');
131
+ expect(input().prop('value')).toBe('123456789');
132
+ expect(props.onChange).not.toHaveBeenCalled();
133
+ });
134
+
135
+ it('should not paste countries which are not in the select', () => {
136
+ simulatePaste(component.find('input'), '+9992342343423');
137
+ expect(select().props().value).toBe('+39');
138
+ expect(input().prop('value')).toBe('123456789');
139
+ expect(props.onChange).not.toHaveBeenCalled();
140
+ });
141
+
142
+ it("should not paste numbers which doesn't start with the country code", () => {
143
+ simulatePaste(component.find('input'), '0+36303932551');
144
+ expect(select().props().value).toBe('+39');
145
+ expect(input().prop('value')).toBe('123456789');
146
+ expect(props.onChange).not.toHaveBeenCalled();
147
+ });
148
+
149
+ it("should not paste numbers which doesn't contain a country code", () => {
150
+ simulatePaste(component.find('input'), '06303932551');
151
+ expect(select().props().value).toBe('+39');
152
+ expect(input().prop('value')).toBe('123456789');
153
+ expect(props.onChange).not.toHaveBeenCalled();
154
+ });
155
+ });
156
+
157
+ describe('when a model is supplied that could match more than one prefix', () => {
158
+ beforeEach(() => {
159
+ component = shallow(<PhoneNumberInput {...props} initialValue="+1868123456789" />);
160
+ select = component.find(PREFIX_SELECT_SELECTOR);
161
+ input = component.find(NUMBER_SELECTOR);
162
+ });
163
+
164
+ it('should set the select to the longest matching prefix', () => {
165
+ expect(select.props().value).toBe('+1868');
166
+ });
167
+
168
+ it('should set the number input to the rest of the number', () => {
169
+ expect(input.prop('value')).toBe('123456789');
170
+ });
171
+ });
172
+
173
+ describe('when a model is supplied with no matching prefix', () => {
174
+ beforeEach(() => {
175
+ component = shallow(<PhoneNumberInput {...props} initialValue="+999123456789" />);
176
+ select = component.find(PREFIX_SELECT_SELECTOR);
177
+ input = component.find(NUMBER_SELECTOR);
178
+ });
179
+
180
+ it('should empty the select', () => {
181
+ expect(select.props().value).toBeNull();
182
+ });
183
+
184
+ it('should put the whole value in the input without the plus', () => {
185
+ expect(input.prop('value')).toBe('999123456789');
186
+ });
187
+ });
188
+
189
+ describe('when an invalid model is supplied', () => {
190
+ it('should not re-explode model', () => {
191
+ component = shallow(<PhoneNumberInput {...props} initialValue="+123" />);
192
+ select = component.find(PREFIX_SELECT_SELECTOR);
193
+ input = component.find(NUMBER_SELECTOR);
194
+
195
+ expect(select.props().value).toBe('+44');
196
+ expect(input.prop('value')).toBe('');
197
+ });
198
+ });
199
+
200
+ describe('when disabled is true', () => {
201
+ beforeEach(() => {
202
+ component = shallow(<PhoneNumberInput {...props} disabled />);
203
+ select = component.find(PREFIX_SELECT_SELECTOR);
204
+ input = component.find(NUMBER_SELECTOR);
205
+ });
206
+
207
+ it('should disable the select', () => {
208
+ expect(select.prop('disabled')).toBe(true);
209
+ });
210
+
211
+ it('should disable the input', () => {
212
+ expect(input.prop('disabled')).toBe(true);
213
+ });
214
+ });
215
+
216
+ describe('when supplied with a placeholder', () => {
217
+ beforeEach(() => {
218
+ useIntl.mockReturnValue({ locale: 'es-ES', formatMessage });
219
+ component = shallow(
220
+ <PhoneNumberInput {...props} initialValue="+12345678" placeholder="placeholder" />,
221
+ );
222
+ input = component.find(NUMBER_SELECTOR);
223
+ });
224
+
225
+ it('should use the provided placeholder', () => {
226
+ expect(input.prop('placeholder')).toBe('placeholder');
227
+ });
228
+ });
229
+
230
+ describe('when supplied with a search placeholder', () => {
231
+ beforeEach(() => {
232
+ useIntl.mockReturnValue({ locale: 'es-ES', formatMessage });
233
+ component = shallow(
234
+ <PhoneNumberInput
235
+ {...props}
236
+ initialValue="+12345678"
237
+ searchPlaceholder="searchPlaceholder"
238
+ />,
239
+ );
240
+ select = component.find(PREFIX_SELECT_SELECTOR);
241
+ });
242
+
243
+ it('should use the provided searchPlaceholder', () => {
244
+ expect(select.prop('filterPlaceholder')).toBe('searchPlaceholder');
245
+ });
246
+ });
247
+
248
+ describe('when supplied with a locale', () => {
249
+ describe('and a value', () => {
250
+ beforeEach(() => {
251
+ useIntl.mockReturnValue({ locale: 'es-ES', formatMessage });
252
+ component = shallow(<PhoneNumberInput {...props} initialValue="+12345678" />);
253
+ select = component.find(PREFIX_SELECT_SELECTOR);
254
+ input = component.find(NUMBER_SELECTOR);
255
+ });
256
+
257
+ it('should use the prefix of the supplied value', () => {
258
+ expect(select.props().value).toBe('+1');
259
+ });
260
+ });
261
+
262
+ describe('and no value', () => {
263
+ describe('and no country code', () => {
264
+ beforeEach(() => {
265
+ useIntl.mockReturnValue({ locale: 'es', formatMessage });
266
+ component = shallow(<PhoneNumberInput {...props} />);
267
+ select = component.find(PREFIX_SELECT_SELECTOR);
268
+ input = component.find(NUMBER_SELECTOR);
269
+ });
270
+
271
+ it('should default the prefix to the local country', () => {
272
+ expect(select.props().value).toBe('+34');
273
+ });
274
+ });
275
+
276
+ describe('and country code', () => {
277
+ beforeEach(() => {
278
+ useIntl.mockReturnValue({ locale: 'es-ES', formatMessage });
279
+ component = shallow(<PhoneNumberInput {...props} countryCode="US" />);
280
+ select = component.find(PREFIX_SELECT_SELECTOR);
281
+ input = component.find(NUMBER_SELECTOR);
282
+ });
283
+
284
+ it('should override locale prefix with country specific prefix', () => {
285
+ expect(select.props().value).toBe('+1');
286
+ });
287
+ });
288
+ });
289
+ });
290
+
291
+ describe('when user insert valid value', () => {
292
+ beforeEach(() => {
293
+ component = mount(<PhoneNumberInput {...props} />);
294
+ select = component.find(PREFIX_SELECT_SELECTOR);
295
+ input = component.find(NUMBER_SELECTOR);
296
+ });
297
+
298
+ it('should trigger onChange handler', () => {
299
+ input.simulate('change', { target: { value: '123' } });
300
+ expect(props.onChange).toHaveBeenCalledWith('+44123', '+44');
301
+ });
302
+ });
303
+
304
+ describe('when user insert an invalid number', () => {
305
+ it('should trigger onChange with null value', () => {
306
+ component = mount(<PhoneNumberInput {...props} initialValue="+12345678" />);
307
+ input = component.find(NUMBER_SELECTOR);
308
+
309
+ input.simulate('change', { target: { value: '1' } });
310
+ expect(props.onChange).toHaveBeenCalledWith(null, '+1');
311
+ });
312
+
313
+ it("shouldn't re-trigger onChange and set previousReturned state", () => {
314
+ component = shallow(<PhoneNumberInput {...props} />);
315
+ select = component.find(PREFIX_SELECT_SELECTOR);
316
+ input = component.find(NUMBER_SELECTOR);
317
+
318
+ select.simulate('change', { value: { value: '+1', label: '+1' } });
319
+ input.simulate('change', { target: { value: '12' } });
320
+ expect(props.onChange).not.toHaveBeenCalled();
321
+ });
322
+ });
323
+
324
+ describe('when user insert invalid character', () => {
325
+ it('should strip them', () => {
326
+ component = mount(<PhoneNumberInput {...props} value="+12345678" />);
327
+ input = component.find(NUMBER_SELECTOR);
328
+
329
+ input.simulate('change', { target: { value: '123--' } });
330
+ expect(props.onChange).toHaveBeenCalledWith('+44123', '+44');
331
+ });
332
+ });
333
+
334
+ describe('overlapping prefix and suffix numbers', () => {
335
+ it("shouldn't change the prefix number on matching suffix input", () => {
336
+ component = mount(<PhoneNumberInput {...props} countryCode="eg" />);
337
+ component.find(NUMBER_SELECTOR).simulate('change', { target: { value: '1111111' } });
338
+
339
+ expect(component.find(NUMBER_SELECTOR).props().value).toBe('1111111');
340
+ expect(props.onChange).toHaveBeenCalledWith('+201111111', '+20');
341
+ });
342
+ });
343
+
344
+ describe('when selectProps is supplied', () => {
345
+ beforeEach(() => {
346
+ component = shallow(
347
+ <PhoneNumberInput selectProps={{ className: 'custom-class' }} {...props} />,
348
+ );
349
+ });
350
+
351
+ it('renders Select component with expected props', () => {
352
+ const select = component.find(PREFIX_SELECT_SELECTOR);
353
+ expect(select.prop('className')).toBe('custom-class');
354
+ });
355
+ });
356
+ });
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { fn } from '@storybook/test';
3
- import PrimitiveAnchor from '..';
3
+ import PrimitiveAnchor from '../src';
4
4
 
5
5
  export default {
6
6
  component: PrimitiveAnchor,
@@ -1,5 +1,5 @@
1
1
  import { render, screen } from '@testing-library/react';
2
- import PrimitiveAnchor from '..';
2
+ import PrimitiveAnchor from '../src';
3
3
 
4
4
  describe('PrimitiveAnchor', () => {
5
5
  const defaultProps = {
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { fn } from '@storybook/test';
3
- import PrimitiveButton from '..';
3
+ import PrimitiveButton from '../src';
4
4
 
5
5
  export default {
6
6
  component: PrimitiveButton,
@@ -1,6 +1,5 @@
1
- import { fireEvent, screen } from '@testing-library/react';
2
- import { userEvent } from '@testing-library/user-event';
3
- import PrimitiveButton from '..';
1
+ import { screen } from '@testing-library/react';
2
+ import PrimitiveButton from '../src';
4
3
  import messages from '../../../i18n/commonMessages/Button.messages';
5
4
  import { render } from '../../../test-utils';
6
5
 
@@ -1,6 +1,5 @@
1
1
  import { ReactElement, FC } from 'react';
2
2
  import { render, renderHook } from '@testing-library/react';
3
- import { renderToString } from 'react-dom/server';
4
3
  import { userEvent } from '@testing-library/user-event';
5
4
 
6
5
  import { Provider } from '..';
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sources":["../../src/button/Button.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, forwardRef, MouseEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n ControlType,\n Priority,\n ControlTypeAccent,\n ControlTypeNegative,\n ControlTypePositive,\n PriorityPrimary,\n PrioritySecondary,\n PriorityTertiary,\n SizeExtraSmall,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n} from '../common';\nimport ProcessIndicator from '../processIndicator';\n\nimport messages from '../i18n/commonMessages/Button.messages';\nimport { typeClassMap, priorityClassMap } from './classMap';\nimport { establishNewPriority, establishNewType, logDeprecationNotices } from './legacyUtils';\n\n/** @deprecated */\ntype DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';\n\n/** @deprecated */\ntype DeprecatedSizes = SizeExtraSmall;\n\ntype CommonProps = {\n block?: boolean;\n disabled?: boolean;\n loading?: boolean;\n type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;\n priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;\n size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;\n};\n\ntype ButtonProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'button'>, 'type'> & {\n as?: 'button';\n htmlType?: 'submit' | 'reset' | 'button';\n };\n\ntype AnchorProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'a'>, 'type'> & {\n as?: 'a';\n };\n\nexport type Props = ButtonProps | AnchorProps;\n\nexport type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;\n\nconst Button = forwardRef<ButtonReferenceType, Props>(\n (\n {\n as: component,\n block = false,\n children,\n className,\n disabled,\n loading = false,\n priority = Priority.PRIMARY,\n size = Size.MEDIUM,\n type = ControlType.ACCENT,\n onClick,\n ...rest\n }: Props,\n reference,\n ) => {\n const intl = useIntl();\n\n logDeprecationNotices({ size, type });\n\n const newType = establishNewType(type);\n const newPriority = establishNewPriority(priority, type);\n\n const classes = clsx(\n `btn btn-${size}`,\n `np-btn np-btn-${size}`,\n {\n 'btn-loading': loading,\n 'btn-block np-btn-block': block,\n disabled,\n },\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n typeClassMap[newType],\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n priorityClassMap[newPriority],\n className,\n );\n\n function processIndicatorSize() {\n return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';\n }\n\n const Element = (component as ElementType) ?? 'button';\n let props;\n\n if (Element === 'button') {\n const { htmlType = 'button', ...restProps } = rest as ButtonProps;\n props = {\n ...restProps,\n disabled,\n 'aria-disabled': loading,\n type: htmlType,\n };\n } else {\n props = {\n ...rest,\n 'aria-disabled': loading,\n } as AnchorProps;\n }\n\n /**\n * Ensures that the button cannot be activated in loading or disabled mode,\n * when `aria-disabled` might be used over the `disabled` HTML attribute\n */\n const handleClick =\n (handler: Props['onClick']) =>\n (event: MouseEvent<HTMLButtonElement> & MouseEvent<HTMLAnchorElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else if (typeof handler === 'function') {\n handler(event);\n }\n };\n\n return (\n <Element\n ref={reference}\n className={classes}\n onClick={handleClick(onClick)}\n {...props}\n aria-live={loading ? 'polite' : 'off'}\n aria-busy={loading}\n aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : rest['aria-label']}\n >\n {children}\n {loading && (\n <ProcessIndicator\n size={processIndicatorSize()}\n className=\"btn-loader\"\n data-testid=\"ButtonProgressIndicator\"\n />\n )}\n </Element>\n );\n },\n);\n\nexport default Button;\n"],"names":["Button","forwardRef","as","component","block","children","className","disabled","loading","priority","Priority","PRIMARY","size","Size","MEDIUM","type","ControlType","ACCENT","onClick","rest","reference","intl","useIntl","logDeprecationNotices","newType","establishNewType","newPriority","establishNewPriority","classes","clsx","typeClassMap","priorityClassMap","processIndicatorSize","includes","Element","props","htmlType","restProps","handleClick","handler","event","preventDefault","_jsxs","ref","formatMessage","messages","loadingAriaLabel","_jsx","ProcessIndicator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAMA,MAAM,gBAAGC,gBAAU,CACvB,CACE;AACEC,EAAAA,EAAE,EAAEC,SAAS;AACbC,EAAAA,KAAK,GAAG,KAAK;EACbC,QAAQ;EACRC,SAAS;EACTC,QAAQ;AACRC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ,GAAGC,gBAAQ,CAACC,OAAO;QAC3BC,MAAI,GAAGC,SAAI,CAACC,MAAM;EAClBC,IAAI,GAAGC,mBAAW,CAACC,MAAM;EACzBC,OAAO;EACP,GAAGC,IAAAA;AACG,CAAA,EACRC,SAAS,KACP;AACF,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE,CAAA;AAEtBC,EAAAA,iCAAqB,CAAC;UAAEX,MAAI;AAAEG,IAAAA,IAAAA;AAAI,GAAE,CAAC,CAAA;AAErC,EAAA,MAAMS,OAAO,GAAGC,4BAAgB,CAACV,IAAI,CAAC,CAAA;AACtC,EAAA,MAAMW,WAAW,GAAGC,gCAAoB,CAAClB,QAAQ,EAAEM,IAAI,CAAC,CAAA;EAExD,MAAMa,OAAO,GAAGC,SAAI,CAClB,CAAA,QAAA,EAAWjB,MAAI,CAAA,CAAE,EACjB,CAAA,cAAA,EAAiBA,MAAI,CAAA,CAAE,EACvB;AACE,IAAA,aAAa,EAAEJ,OAAO;AACtB,IAAA,wBAAwB,EAAEJ,KAAK;AAC/BG,IAAAA,QAAAA;GACD;AACD;AACA;EACAuB,qBAAY,CAACN,OAAO,CAAC;AACrB;AACA;AACAO,EAAAA,yBAAgB,CAACL,WAAW,CAAC,EAC7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A,EAAYA,OAAO,GAAGa,IAAI,CAACuB,aAAa,CAACC,eAAQ,CAACC,gBAAgB,CAAC,GAAG3B,IAAI,CAAC,YAAY,CAAE;AAAAd,IAAAA,QAAA,GAExFA,QAAQ,EACRG,OAAO,iBACNuC,cAAA,CAACC,gBAAgB,EAAA;MACfpC,IAAI,EAAEoB,oBAAoB,EAAG;AAC7B1B,MAAAA,SAAS,EAAC,YAAY;MACtB,aAAY,EAAA,yBAAA;AAAyB,KACrC,CACH,CAAA;AAAA,GACM,CAAC,CAAA;AAEd,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.mjs","sources":["../../src/button/Button.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, forwardRef, MouseEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n ControlType,\n Priority,\n ControlTypeAccent,\n ControlTypeNegative,\n ControlTypePositive,\n PriorityPrimary,\n PrioritySecondary,\n PriorityTertiary,\n SizeExtraSmall,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n} from '../common';\nimport ProcessIndicator from '../processIndicator';\n\nimport messages from '../i18n/commonMessages/Button.messages';\nimport { typeClassMap, priorityClassMap } from './classMap';\nimport { establishNewPriority, establishNewType, logDeprecationNotices } from './legacyUtils';\n\n/** @deprecated */\ntype DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';\n\n/** @deprecated */\ntype DeprecatedSizes = SizeExtraSmall;\n\ntype CommonProps = {\n block?: boolean;\n disabled?: boolean;\n loading?: boolean;\n type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;\n priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;\n size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;\n};\n\ntype ButtonProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'button'>, 'type'> & {\n as?: 'button';\n htmlType?: 'submit' | 'reset' | 'button';\n };\n\ntype AnchorProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'a'>, 'type'> & {\n as?: 'a';\n };\n\nexport type Props = ButtonProps | AnchorProps;\n\nexport type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;\n\nconst Button = forwardRef<ButtonReferenceType, Props>(\n (\n {\n as: component,\n block = false,\n children,\n className,\n disabled,\n loading = false,\n priority = Priority.PRIMARY,\n size = Size.MEDIUM,\n type = ControlType.ACCENT,\n onClick,\n ...rest\n }: Props,\n reference,\n ) => {\n const intl = useIntl();\n\n logDeprecationNotices({ size, type });\n\n const newType = establishNewType(type);\n const newPriority = establishNewPriority(priority, type);\n\n const classes = clsx(\n `btn btn-${size}`,\n `np-btn np-btn-${size}`,\n {\n 'btn-loading': loading,\n 'btn-block np-btn-block': block,\n disabled,\n },\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n typeClassMap[newType],\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n priorityClassMap[newPriority],\n className,\n );\n\n function processIndicatorSize() {\n return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';\n }\n\n const Element = (component as ElementType) ?? 'button';\n let props;\n\n if (Element === 'button') {\n const { htmlType = 'button', ...restProps } = rest as ButtonProps;\n props = {\n ...restProps,\n disabled,\n 'aria-disabled': loading,\n type: htmlType,\n };\n } else {\n props = {\n ...rest,\n 'aria-disabled': loading,\n } as AnchorProps;\n }\n\n /**\n * Ensures that the button cannot be activated in loading or disabled mode,\n * when `aria-disabled` might be used over the `disabled` HTML attribute\n */\n const handleClick =\n (handler: Props['onClick']) =>\n (event: MouseEvent<HTMLButtonElement> & MouseEvent<HTMLAnchorElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else if (typeof handler === 'function') {\n handler(event);\n }\n };\n\n return (\n <Element\n ref={reference}\n className={classes}\n onClick={handleClick(onClick)}\n {...props}\n aria-live={loading ? 'polite' : 'off'}\n aria-busy={loading}\n aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : rest['aria-label']}\n >\n {children}\n {loading && (\n <ProcessIndicator\n size={processIndicatorSize()}\n className=\"btn-loader\"\n data-testid=\"ButtonProgressIndicator\"\n />\n )}\n </Element>\n );\n },\n);\n\nexport default Button;\n"],"names":["Button","forwardRef","as","component","block","children","className","disabled","loading","priority","Priority","PRIMARY","size","Size","MEDIUM","type","ControlType","ACCENT","onClick","rest","reference","intl","useIntl","logDeprecationNotices","newType","establishNewType","newPriority","establishNewPriority","classes","clsx","typeClassMap","priorityClassMap","processIndicatorSize","includes","Element","props","htmlType","restProps","handleClick","handler","event","preventDefault","_jsxs","ref","formatMessage","messages","loadingAriaLabel","_jsx","ProcessIndicator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAMA,MAAM,gBAAGC,UAAU,CACvB,CACE;AACEC,EAAAA,EAAE,EAAEC,SAAS;AACbC,EAAAA,KAAK,GAAG,KAAK;EACbC,QAAQ;EACRC,SAAS;EACTC,QAAQ;AACRC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ,GAAGC,QAAQ,CAACC,OAAO;EAC3BC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAClBC,IAAI,GAAGC,WAAW,CAACC,MAAM;EACzBC,OAAO;EACP,GAAGC,IAAAA;AACG,CAAA,EACRC,SAAS,KACP;AACF,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;AAEtBC,EAAAA,qBAAqB,CAAC;IAAEX,IAAI;AAAEG,IAAAA,IAAAA;AAAI,GAAE,CAAC,CAAA;AAErC,EAAA,MAAMS,OAAO,GAAGC,gBAAgB,CAACV,IAAI,CAAC,CAAA;AACtC,EAAA,MAAMW,WAAW,GAAGC,oBAAoB,CAAClB,QAAQ,EAAEM,IAAI,CAAC,CAAA;EAExD,MAAMa,OAAO,GAAGC,IAAI,CAClB,CAAA,QAAA,EAAWjB,IAAI,CAAA,CAA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,GAAG,EAAEvB,SAAU;AACfd,IAAAA,SAAS,EAAEsB,OAAQ;AACnBV,IAAAA,OAAO,EAAEoB,WAAW,CAACpB,OAAO,CAAE;AAAA,IAAA,GAC1BiB,KAAK;AACT,IAAA,WAAA,EAAW3B,OAAO,GAAG,QAAQ,GAAG,KAAM;AACtC,IAAA,WAAA,EAAWA,OAAQ;AACnB,IAAA,YAAA,EAAYA,OAAO,GAAGa,IAAI,CAACuB,aAAa,CAACC,QAAQ,CAACC,gBAAgB,CAAC,GAAG3B,IAAI,CAAC,YAAY,CAAE;AAAAd,IAAAA,QAAA,GAExFA,QAAQ,EACRG,OAAO,iBACNuC,GAAA,CAACC,gBAAgB,EAAA;MACfpC,IAAI,EAAEoB,oBAAoB,EAAG;AAC7B1B,MAAAA,SAAS,EAAC,YAAY;MACtB,aAAY,EAAA,yBAAA;AAAyB,KACrC,CACH,CAAA;AAAA,GACM,CAAC,CAAA;AAEd,CAAC;;;;"}
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- require('../common/theme.js');
4
- require('../common/direction.js');
5
- var control = require('../common/propsValues/control.js');
6
- require('../common/propsValues/breakpoint.js');
7
- require('../common/propsValues/size.js');
8
- require('../common/propsValues/typography.js');
9
- require('../common/propsValues/width.js');
10
- require('../common/propsValues/type.js');
11
- require('../common/propsValues/dateMode.js');
12
- require('../common/propsValues/monthFormat.js');
13
- require('../common/propsValues/position.js');
14
- require('../common/propsValues/layouts.js');
15
- require('../common/propsValues/status.js');
16
- require('../common/propsValues/sentiment.js');
17
- require('../common/propsValues/profileType.js');
18
- require('../common/propsValues/variant.js');
19
- require('../common/propsValues/scroll.js');
20
- require('../common/propsValues/markdownNodeType.js');
21
- require('../common/fileType.js');
22
- require('@transferwise/icons');
23
- require('clsx');
24
- require('react');
25
- require('react-intl');
26
- require('../common/closeButton/CloseButton.messages.js');
27
- require('react/jsx-runtime');
28
-
29
- const typeClassMap = {
30
- [control.ControlType.ACCENT]: 'btn-accent',
31
- [control.ControlType.POSITIVE]: 'btn-positive',
32
- [control.ControlType.NEGATIVE]: 'btn-negative'
33
- };
34
- const priorityClassMap = {
35
- [control.Priority.PRIMARY]: 'btn-priority-1',
36
- [control.Priority.SECONDARY]: 'btn-priority-2',
37
- [control.Priority.TERTIARY]: 'btn-priority-3'
38
- };
39
-
40
- exports.priorityClassMap = priorityClassMap;
41
- exports.typeClassMap = typeClassMap;
42
- //# sourceMappingURL=classMap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classMap.js","sources":["../../src/button/classMap.ts"],"sourcesContent":["import { ControlType, Priority } from '../common';\n\nexport const typeClassMap = {\n [ControlType.ACCENT]: 'btn-accent',\n [ControlType.POSITIVE]: 'btn-positive',\n [ControlType.NEGATIVE]: 'btn-negative',\n};\n\nexport const priorityClassMap = {\n [Priority.PRIMARY]: 'btn-priority-1',\n [Priority.SECONDARY]: 'btn-priority-2',\n [Priority.TERTIARY]: 'btn-priority-3',\n};\n"],"names":["typeClassMap","ControlType","ACCENT","POSITIVE","NEGATIVE","priorityClassMap","Priority","PRIMARY","SECONDARY","TERTIARY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,YAAY,GAAG;AAC1B,EAAA,CAACC,mBAAW,CAACC,MAAM,GAAG,YAAY;AAClC,EAAA,CAACD,mBAAW,CAACE,QAAQ,GAAG,cAAc;EACtC,CAACF,mBAAW,CAACG,QAAQ,GAAG,cAAA;EACzB;AAEM,MAAMC,gBAAgB,GAAG;AAC9B,EAAA,CAACC,gBAAQ,CAACC,OAAO,GAAG,gBAAgB;AACpC,EAAA,CAACD,gBAAQ,CAACE,SAAS,GAAG,gBAAgB;EACtC,CAACF,gBAAQ,CAACG,QAAQ,GAAG,gBAAA;;;;;;"}
@@ -1,39 +0,0 @@
1
- import '../common/theme.mjs';
2
- import '../common/direction.mjs';
3
- import { ControlType, Priority } from '../common/propsValues/control.mjs';
4
- import '../common/propsValues/breakpoint.mjs';
5
- import '../common/propsValues/size.mjs';
6
- import '../common/propsValues/typography.mjs';
7
- import '../common/propsValues/width.mjs';
8
- import '../common/propsValues/type.mjs';
9
- import '../common/propsValues/dateMode.mjs';
10
- import '../common/propsValues/monthFormat.mjs';
11
- import '../common/propsValues/position.mjs';
12
- import '../common/propsValues/layouts.mjs';
13
- import '../common/propsValues/status.mjs';
14
- import '../common/propsValues/sentiment.mjs';
15
- import '../common/propsValues/profileType.mjs';
16
- import '../common/propsValues/variant.mjs';
17
- import '../common/propsValues/scroll.mjs';
18
- import '../common/propsValues/markdownNodeType.mjs';
19
- import '../common/fileType.mjs';
20
- import '@transferwise/icons';
21
- import 'clsx';
22
- import 'react';
23
- import 'react-intl';
24
- import '../common/closeButton/CloseButton.messages.mjs';
25
- import 'react/jsx-runtime';
26
-
27
- const typeClassMap = {
28
- [ControlType.ACCENT]: 'btn-accent',
29
- [ControlType.POSITIVE]: 'btn-positive',
30
- [ControlType.NEGATIVE]: 'btn-negative'
31
- };
32
- const priorityClassMap = {
33
- [Priority.PRIMARY]: 'btn-priority-1',
34
- [Priority.SECONDARY]: 'btn-priority-2',
35
- [Priority.TERTIARY]: 'btn-priority-3'
36
- };
37
-
38
- export { priorityClassMap, typeClassMap };
39
- //# sourceMappingURL=classMap.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classMap.mjs","sources":["../../src/button/classMap.ts"],"sourcesContent":["import { ControlType, Priority } from '../common';\n\nexport const typeClassMap = {\n [ControlType.ACCENT]: 'btn-accent',\n [ControlType.POSITIVE]: 'btn-positive',\n [ControlType.NEGATIVE]: 'btn-negative',\n};\n\nexport const priorityClassMap = {\n [Priority.PRIMARY]: 'btn-priority-1',\n [Priority.SECONDARY]: 'btn-priority-2',\n [Priority.TERTIARY]: 'btn-priority-3',\n};\n"],"names":["typeClassMap","ControlType","ACCENT","POSITIVE","NEGATIVE","priorityClassMap","Priority","PRIMARY","SECONDARY","TERTIARY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,YAAY,GAAG;AAC1B,EAAA,CAACC,WAAW,CAACC,MAAM,GAAG,YAAY;AAClC,EAAA,CAACD,WAAW,CAACE,QAAQ,GAAG,cAAc;EACtC,CAACF,WAAW,CAACG,QAAQ,GAAG,cAAA;EACzB;AAEM,MAAMC,gBAAgB,GAAG;AAC9B,EAAA,CAACC,QAAQ,CAACC,OAAO,GAAG,gBAAgB;AACpC,EAAA,CAACD,QAAQ,CAACE,SAAS,GAAG,gBAAgB;EACtC,CAACF,QAAQ,CAACG,QAAQ,GAAG,gBAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyUtils.js","sources":["../../../src/button/legacyUtils/legacyUtils.ts"],"sourcesContent":["import { ControlType, Priority, Size, Type } from '../../common';\nimport { logActionRequired, logActionRequiredIf } from '../../utilities';\n\nconst deprecatedTypeMap: Record<Type, ControlType> = {\n [Type.PRIMARY]: ControlType.ACCENT,\n [Type.SECONDARY]: ControlType.ACCENT,\n [Type.LINK]: ControlType.ACCENT,\n [Type.PAY]: ControlType.POSITIVE,\n [Type.DANGER]: ControlType.NEGATIVE,\n};\n\ntype OldTypeKeys = Type.DANGER | Type.LINK | Type.SECONDARY;\nconst oldTypePriorityMap: Record<OldTypeKeys, Priority> = {\n [Type.DANGER]: Priority.SECONDARY,\n [Type.LINK]: Priority.TERTIARY,\n [Type.SECONDARY]: Priority.SECONDARY,\n};\n\nconst deprecatedTypeMapMessage = {\n [Type.DANGER]: 'Type.NEGATIVE',\n [Type.LINK]: 'ControlType.ACCENT with priority Priority.TERTIARY',\n [Type.PAY]: 'ControlType.POSITIVE',\n [Type.PRIMARY]: 'ControlType.ACCENT',\n [Type.SECONDARY]: 'ControlType.ACCENT with priority Priority.SECONDARY',\n};\n\nconst deprecatedTypes = Object.keys(deprecatedTypeMap);\n\ntype EstablishNewTypeType = (\n originalType: Type | (string & Record<never, never>) | null,\n) => `${ControlType}` | string | null;\n\nexport const establishNewType: EstablishNewTypeType = (originalType) =>\n originalType && originalType in deprecatedTypeMap\n ? deprecatedTypeMap[originalType as Type]\n : originalType;\n\ntype EstablishNewPriorityType = (\n originalPriority?: Priority | (string & Record<never, never>) | null,\n originalType?: OldTypeKeys | (string & Record<never, never>) | null,\n) => `${ControlType}` | string | null | undefined;\n\nexport const establishNewPriority: EstablishNewPriorityType = (originalPriority, originalType) => {\n const type = originalType ? establishNewType(originalType) : '';\n\n // The old SECONDARY and LINK types now map to priorities. If they're still using one of\n // these old types, ignore whatever priority they've passed and use this instead.\n if (originalType && originalType in oldTypePriorityMap) {\n return oldTypePriorityMap[originalType as OldTypeKeys];\n }\n // Only ControlType.ACCENT supports tertiary styles\n if (originalPriority === Priority.TERTIARY && type !== ControlType.ACCENT) {\n return Priority.SECONDARY;\n }\n return originalPriority;\n};\n\ntype DeprecatedTypeMapMessageType = keyof typeof deprecatedTypeMapMessage;\ntype LogDeprecationNoticesType = (params: {\n size?: `${Size}`;\n type?: DeprecatedTypeMapMessageType | (string & Record<never, never>) | null;\n}) => void;\nexport const logDeprecationNotices: LogDeprecationNoticesType = ({ size, type }) => {\n logActionRequiredIf(\n 'Button has deprecated the `Size.EXTRA_SMALL` value for the `size` prop. Please use Size.SMALL instead.',\n size === Size.EXTRA_SMALL,\n );\n\n if (type && deprecatedTypes.includes(type) && type in deprecatedTypeMapMessage) {\n logActionRequired(\n `Button has deprecated the ${type} value for the \\`type\\` prop. Please update to ${deprecatedTypeMapMessage[type as DeprecatedTypeMapMessageType]}.`,\n );\n }\n};\n"],"names":["deprecatedTypeMap","Type","PRIMARY","ControlType","ACCENT","SECONDARY","LINK","PAY","POSITIVE","DANGER","NEGATIVE","oldTypePriorityMap","Priority","TERTIARY","deprecatedTypeMapMessage","deprecatedTypes","Object","keys","establishNewType","originalType","establishNewPriority","originalPriority","type","logDeprecationNotices","size","logActionRequiredIf","Size","EXTRA_SMALL","includes","logActionRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,iBAAiB,GAA8B;AACnD,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A,YAAY,IAAIR,kBAAkB,EAAE;IACtD,OAAOA,kBAAkB,CAACQ,YAA2B,CAAC,CAAA;AACxD,GAAA;AACA;EACA,IAAIE,gBAAgB,KAAKT,gBAAQ,CAACC,QAAQ,IAAIS,IAAI,KAAKnB,mBAAW,CAACC,MAAM,EAAE;IACzE,OAAOQ,gBAAQ,CAACP,SAAS,CAAA;AAC3B,GAAA;AACA,EAAA,OAAOgB,gBAAgB,CAAA;AACzB,EAAC;AAOM,MAAME,qBAAqB,GAA8BA,CAAC;QAAEC,MAAI;AAAEF,EAAAA,IAAAA;AAAM,CAAA,KAAI;EACjFG,qCAAmB,CACjB,wGAAwG,EACxGD,MAAI,KAAKE,SAAI,CAACC,WAAW,CAC1B,CAAA;AAED,EAAA,IAAIL,IAAI,IAAIP,eAAe,CAACa,QAAQ,CAACN,IAAI,CAAC,IAAIA,IAAI,IAAIR,wBAAwB,EAAE;IAC9Ee,mCAAiB,CACf,6BAA6BP,IAAI,CAAA,+CAAA,EAAkDR,wBAAwB,CAACQ,IAAoC,CAAC,CAAA,CAAA,CAAG,CACrJ,CAAA;AACH,GAAA;AACF;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyUtils.mjs","sources":["../../../src/button/legacyUtils/legacyUtils.ts"],"sourcesContent":["import { ControlType, Priority, Size, Type } from '../../common';\nimport { logActionRequired, logActionRequiredIf } from '../../utilities';\n\nconst deprecatedTypeMap: Record<Type, ControlType> = {\n [Type.PRIMARY]: ControlType.ACCENT,\n [Type.SECONDARY]: ControlType.ACCENT,\n [Type.LINK]: ControlType.ACCENT,\n [Type.PAY]: ControlType.POSITIVE,\n [Type.DANGER]: ControlType.NEGATIVE,\n};\n\ntype OldTypeKeys = Type.DANGER | Type.LINK | Type.SECONDARY;\nconst oldTypePriorityMap: Record<OldTypeKeys, Priority> = {\n [Type.DANGER]: Priority.SECONDARY,\n [Type.LINK]: Priority.TERTIARY,\n [Type.SECONDARY]: Priority.SECONDARY,\n};\n\nconst deprecatedTypeMapMessage = {\n [Type.DANGER]: 'Type.NEGATIVE',\n [Type.LINK]: 'ControlType.ACCENT with priority Priority.TERTIARY',\n [Type.PAY]: 'ControlType.POSITIVE',\n [Type.PRIMARY]: 'ControlType.ACCENT',\n [Type.SECONDARY]: 'ControlType.ACCENT with priority Priority.SECONDARY',\n};\n\nconst deprecatedTypes = Object.keys(deprecatedTypeMap);\n\ntype EstablishNewTypeType = (\n originalType: Type | (string & Record<never, never>) | null,\n) => `${ControlType}` | string | null;\n\nexport const establishNewType: EstablishNewTypeType = (originalType) =>\n originalType && originalType in deprecatedTypeMap\n ? deprecatedTypeMap[originalType as Type]\n : originalType;\n\ntype EstablishNewPriorityType = (\n originalPriority?: Priority | (string & Record<never, never>) | null,\n originalType?: OldTypeKeys | (string & Record<never, never>) | null,\n) => `${ControlType}` | string | null | undefined;\n\nexport const establishNewPriority: EstablishNewPriorityType = (originalPriority, originalType) => {\n const type = originalType ? establishNewType(originalType) : '';\n\n // The old SECONDARY and LINK types now map to priorities. If they're still using one of\n // these old types, ignore whatever priority they've passed and use this instead.\n if (originalType && originalType in oldTypePriorityMap) {\n return oldTypePriorityMap[originalType as OldTypeKeys];\n }\n // Only ControlType.ACCENT supports tertiary styles\n if (originalPriority === Priority.TERTIARY && type !== ControlType.ACCENT) {\n return Priority.SECONDARY;\n }\n return originalPriority;\n};\n\ntype DeprecatedTypeMapMessageType = keyof typeof deprecatedTypeMapMessage;\ntype LogDeprecationNoticesType = (params: {\n size?: `${Size}`;\n type?: DeprecatedTypeMapMessageType | (string & Record<never, never>) | null;\n}) => void;\nexport const logDeprecationNotices: LogDeprecationNoticesType = ({ size, type }) => {\n logActionRequiredIf(\n 'Button has deprecated the `Size.EXTRA_SMALL` value for the `size` prop. Please use Size.SMALL instead.',\n size === Size.EXTRA_SMALL,\n );\n\n if (type && deprecatedTypes.includes(type) && type in deprecatedTypeMapMessage) {\n logActionRequired(\n `Button has deprecated the ${type} value for the \\`type\\` prop. Please update to ${deprecatedTypeMapMessage[type as DeprecatedTypeMapMessageType]}.`,\n );\n }\n};\n"],"names":["deprecatedTypeMap","Type","PRIMARY","ControlType","ACCENT","SECONDARY","LINK","PAY","POSITIVE","DANGER","NEGATIVE","oldTypePriorityMap","Priority","TERTIARY","deprecatedTypeMapMessage","deprecatedTypes","Object","keys","establishNewType","originalType","establishNewPriority","originalPriority","type","logDeprecationNotices","size","logActionRequiredIf","Size","EXTRA_SMALL","includes","logActionRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,iBAAiB,GAA8B;AACnD,EAAA,CAACC,IAAI,CAACC,OAAO,GAAGC,WAAW,CAACC,MAAM;AAClC,EAAA,CAACH,IAAI,CAACI,SAAS,GAAGF,WAAW,CAACC,MAAM;AACpC,EAAA,CAACH,IAAI,CAACK,IAAI,GAAGH,WAAW,CAACC,MAAM;AAC/B,EAAA,CAACH,IAAI,CAACM,GAAG,GAAGJ,WAAW,CAACK,QAAQ;AAChC,EAAA,CAACP,IAAI,CAACQ,MAAM,GAAGN,WAAW,CAACO,QAAAA;CAC5B,CAAA;AAGD,MAAMC,kBAAkB,GAAkC;AACxD,EAAA,CAACV,IAAI,CAACQ,MAAM,GAAGG,QAAQ,CAACP,SAAS;AACjC,EAAA,CAACJ,IAAI,CAACK,IAAI,GAAGM,QAAQ,CAACC,QAAQ;AAC9B,EAAA,CAACZ,IAAI,CAACI,SAAS,GAAGO,QAAQ,CAACP,SAAAA;CAC5B,CAAA;AAED,MAAMS,wBAAwB,GAAG;AAC/B,EAAA,CAACb,IAAI,CAACQ,MAAM,GAAG,eAAe;AAC9B,EAAA,CAACR,IAAI,CAACK,IAAI,GAAG,oDAAoD;AACjE,EAAA,CAACL,IAAI,CAACM,GAAG,GAAG,sBAAsB;AAClC,EAAA,CAACN,IAAI,CAACC,OAAO,GAAG,oBAAoB;EACpC,CAACD,IAAI,CAACI,SAAS,GAAG,qDAAA;CACnB,CAAA;AAED,MAAMU,eAAe,GAAGC,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ts","sourceRoot":"","sources":["../../../src/button/classMap.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/legacyUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyUtils.d.ts","sourceRoot":"","sources":["../../../../src/button/legacyUtils/legacyUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAWjE,KAAK,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;AAO5D,QAAA,MAAM,wBAAwB;;;;;;CAM7B,CAAC;AAIF,KAAK,oBAAoB,GAAG,CAC1B,YAAY,EAAE,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,KACxD,GAAG,WAAW,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC;AAEtC,eAAO,MAAM,gBAAgB,EAAE,oBAGb,CAAC;AAEnB,KAAK,wBAAwB,GAAG,CAC9B,gBAAgB,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,EACpE,YAAY,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,KAChE,GAAG,WAAW,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAElD,eAAO,MAAM,oBAAoB,EAAE,wB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