@transferwise/components 46.71.0 → 46.71.2
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/button/Button.js.map +1 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +4 -3
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +4 -3
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/snackbar/Snackbar.js +2 -2
- package/build/snackbar/Snackbar.js.map +1 -1
- package/build/snackbar/Snackbar.mjs +2 -2
- package/build/snackbar/Snackbar.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +1 -1
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +1 -1
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/button/Button.d.ts +1 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +3 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/package.json +4 -5
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.spec.js.snap +4 -4
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +8 -8
- package/src/button/Button.tsx +1 -1
- package/src/chips/__snapshots__/Chips.spec.tsx.snap +2 -2
- package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +20 -20
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +2 -2
- package/src/common/closeButton/__snapshots__/CloseButton.spec.tsx.snap +2 -2
- package/src/drawer/__snapshots__/Drawer.rtl.spec.tsx.snap +2 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -4
- package/src/instructionsList/InstructionsList.spec.tsx +21 -5
- package/src/instructionsList/InstructionsList.tsx +11 -3
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -2
- package/src/snackbar/Snackbar.story.tsx +1 -3
- package/src/snackbar/Snackbar.tsx +2 -8
- package/src/typeahead/Typeahead.tsx +5 -3
- package/src/uploadInput/UploadInput.tsx +1 -4
|
@@ -23,15 +23,15 @@ exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar w
|
|
|
23
23
|
class="tw-avatar__content"
|
|
24
24
|
>
|
|
25
25
|
<span
|
|
26
|
-
aria-hidden="true"
|
|
27
26
|
class="tw-icon tw-icon-briefcase "
|
|
28
27
|
data-testid="briefcase-icon"
|
|
29
|
-
role="presentation"
|
|
30
28
|
>
|
|
31
29
|
<svg
|
|
30
|
+
aria-hidden="true"
|
|
32
31
|
fill="currentColor"
|
|
33
32
|
focusable="false"
|
|
34
33
|
height="24"
|
|
34
|
+
role="none"
|
|
35
35
|
viewBox="0 0 24 24"
|
|
36
36
|
width="24"
|
|
37
37
|
>
|
|
@@ -52,15 +52,15 @@ exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar w
|
|
|
52
52
|
class="tw-avatar__content"
|
|
53
53
|
>
|
|
54
54
|
<span
|
|
55
|
-
aria-hidden="true"
|
|
56
55
|
class="tw-icon tw-icon-person "
|
|
57
56
|
data-testid="person-icon"
|
|
58
|
-
role="presentation"
|
|
59
57
|
>
|
|
60
58
|
<svg
|
|
59
|
+
aria-hidden="true"
|
|
61
60
|
fill="currentColor"
|
|
62
61
|
focusable="false"
|
|
63
62
|
height="24"
|
|
63
|
+
role="none"
|
|
64
64
|
viewBox="0 0 24 24"
|
|
65
65
|
width="24"
|
|
66
66
|
>
|
|
@@ -87,15 +87,15 @@ exports[`FlowNavigationAvatar with a name AND profileType with a badge url passe
|
|
|
87
87
|
class="tw-avatar__content"
|
|
88
88
|
>
|
|
89
89
|
<span
|
|
90
|
-
aria-hidden="true"
|
|
91
90
|
class="tw-icon tw-icon-person "
|
|
92
91
|
data-testid="person-icon"
|
|
93
|
-
role="presentation"
|
|
94
92
|
>
|
|
95
93
|
<svg
|
|
94
|
+
aria-hidden="true"
|
|
96
95
|
fill="currentColor"
|
|
97
96
|
focusable="false"
|
|
98
97
|
height="24"
|
|
98
|
+
role="none"
|
|
99
99
|
viewBox="0 0 24 24"
|
|
100
100
|
width="24"
|
|
101
101
|
>
|
|
@@ -126,15 +126,15 @@ exports[`FlowNavigationAvatar with a name AND profileType with nothing passed re
|
|
|
126
126
|
class="tw-avatar__content"
|
|
127
127
|
>
|
|
128
128
|
<span
|
|
129
|
-
aria-hidden="true"
|
|
130
129
|
class="tw-icon tw-icon-person "
|
|
131
130
|
data-testid="person-icon"
|
|
132
|
-
role="presentation"
|
|
133
131
|
>
|
|
134
132
|
<svg
|
|
133
|
+
aria-hidden="true"
|
|
135
134
|
fill="currentColor"
|
|
136
135
|
focusable="false"
|
|
137
136
|
height="24"
|
|
137
|
+
role="none"
|
|
138
138
|
viewBox="0 0 24 24"
|
|
139
139
|
width="24"
|
|
140
140
|
>
|
package/src/button/Button.tsx
CHANGED
|
@@ -127,15 +127,15 @@ exports[`Chips Filter Chips renders as expected 1`] = `
|
|
|
127
127
|
type="button"
|
|
128
128
|
>
|
|
129
129
|
<span
|
|
130
|
-
aria-hidden="true"
|
|
131
130
|
class="tw-icon tw-icon-cross "
|
|
132
131
|
data-testid="cross-icon"
|
|
133
|
-
role="presentation"
|
|
134
132
|
>
|
|
135
133
|
<svg
|
|
134
|
+
aria-hidden="true"
|
|
136
135
|
fill="currentColor"
|
|
137
136
|
focusable="false"
|
|
138
137
|
height="16"
|
|
138
|
+
role="none"
|
|
139
139
|
viewBox="0 0 24 24"
|
|
140
140
|
width="16"
|
|
141
141
|
>
|
|
@@ -11,15 +11,15 @@ exports[`CircularButton defaults renders a button of type accent and priority pr
|
|
|
11
11
|
type="button"
|
|
12
12
|
/>
|
|
13
13
|
<span
|
|
14
|
-
aria-hidden="true"
|
|
15
14
|
class="tw-icon tw-icon-plus "
|
|
16
15
|
data-testid="plus-icon"
|
|
17
|
-
role="presentation"
|
|
18
16
|
>
|
|
19
17
|
<svg
|
|
18
|
+
aria-hidden="true"
|
|
20
19
|
fill="currentColor"
|
|
21
20
|
focusable="false"
|
|
22
21
|
height="24"
|
|
22
|
+
role="none"
|
|
23
23
|
viewBox="0 0 24 24"
|
|
24
24
|
width="24"
|
|
25
25
|
>
|
|
@@ -48,15 +48,15 @@ exports[`CircularButton priorities renders primary buttons 1`] = `
|
|
|
48
48
|
type="button"
|
|
49
49
|
/>
|
|
50
50
|
<span
|
|
51
|
-
aria-hidden="true"
|
|
52
51
|
class="tw-icon tw-icon-plus "
|
|
53
52
|
data-testid="plus-icon"
|
|
54
|
-
role="presentation"
|
|
55
53
|
>
|
|
56
54
|
<svg
|
|
55
|
+
aria-hidden="true"
|
|
57
56
|
fill="currentColor"
|
|
58
57
|
focusable="false"
|
|
59
58
|
height="24"
|
|
59
|
+
role="none"
|
|
60
60
|
viewBox="0 0 24 24"
|
|
61
61
|
width="24"
|
|
62
62
|
>
|
|
@@ -85,15 +85,15 @@ exports[`CircularButton priorities renders primary buttons 2`] = `
|
|
|
85
85
|
type="button"
|
|
86
86
|
/>
|
|
87
87
|
<span
|
|
88
|
-
aria-hidden="true"
|
|
89
88
|
class="tw-icon tw-icon-plus "
|
|
90
89
|
data-testid="plus-icon"
|
|
91
|
-
role="presentation"
|
|
92
90
|
>
|
|
93
91
|
<svg
|
|
92
|
+
aria-hidden="true"
|
|
94
93
|
fill="currentColor"
|
|
95
94
|
focusable="false"
|
|
96
95
|
height="24"
|
|
96
|
+
role="none"
|
|
97
97
|
viewBox="0 0 24 24"
|
|
98
98
|
width="24"
|
|
99
99
|
>
|
|
@@ -122,15 +122,15 @@ exports[`CircularButton priorities renders primary buttons 3`] = `
|
|
|
122
122
|
type="button"
|
|
123
123
|
/>
|
|
124
124
|
<span
|
|
125
|
-
aria-hidden="true"
|
|
126
125
|
class="tw-icon tw-icon-plus "
|
|
127
126
|
data-testid="plus-icon"
|
|
128
|
-
role="presentation"
|
|
129
127
|
>
|
|
130
128
|
<svg
|
|
129
|
+
aria-hidden="true"
|
|
131
130
|
fill="currentColor"
|
|
132
131
|
focusable="false"
|
|
133
132
|
height="24"
|
|
133
|
+
role="none"
|
|
134
134
|
viewBox="0 0 24 24"
|
|
135
135
|
width="24"
|
|
136
136
|
>
|
|
@@ -159,15 +159,15 @@ exports[`CircularButton priorities renders secondary buttons 1`] = `
|
|
|
159
159
|
type="button"
|
|
160
160
|
/>
|
|
161
161
|
<span
|
|
162
|
-
aria-hidden="true"
|
|
163
162
|
class="tw-icon tw-icon-plus "
|
|
164
163
|
data-testid="plus-icon"
|
|
165
|
-
role="presentation"
|
|
166
164
|
>
|
|
167
165
|
<svg
|
|
166
|
+
aria-hidden="true"
|
|
168
167
|
fill="currentColor"
|
|
169
168
|
focusable="false"
|
|
170
169
|
height="24"
|
|
170
|
+
role="none"
|
|
171
171
|
viewBox="0 0 24 24"
|
|
172
172
|
width="24"
|
|
173
173
|
>
|
|
@@ -196,15 +196,15 @@ exports[`CircularButton priorities renders secondary buttons 2`] = `
|
|
|
196
196
|
type="button"
|
|
197
197
|
/>
|
|
198
198
|
<span
|
|
199
|
-
aria-hidden="true"
|
|
200
199
|
class="tw-icon tw-icon-plus "
|
|
201
200
|
data-testid="plus-icon"
|
|
202
|
-
role="presentation"
|
|
203
201
|
>
|
|
204
202
|
<svg
|
|
203
|
+
aria-hidden="true"
|
|
205
204
|
fill="currentColor"
|
|
206
205
|
focusable="false"
|
|
207
206
|
height="24"
|
|
207
|
+
role="none"
|
|
208
208
|
viewBox="0 0 24 24"
|
|
209
209
|
width="24"
|
|
210
210
|
>
|
|
@@ -233,15 +233,15 @@ exports[`CircularButton priorities renders secondary buttons 3`] = `
|
|
|
233
233
|
type="button"
|
|
234
234
|
/>
|
|
235
235
|
<span
|
|
236
|
-
aria-hidden="true"
|
|
237
236
|
class="tw-icon tw-icon-plus "
|
|
238
237
|
data-testid="plus-icon"
|
|
239
|
-
role="presentation"
|
|
240
238
|
>
|
|
241
239
|
<svg
|
|
240
|
+
aria-hidden="true"
|
|
242
241
|
fill="currentColor"
|
|
243
242
|
focusable="false"
|
|
244
243
|
height="24"
|
|
244
|
+
role="none"
|
|
245
245
|
viewBox="0 0 24 24"
|
|
246
246
|
width="24"
|
|
247
247
|
>
|
|
@@ -270,15 +270,15 @@ exports[`CircularButton types renders accent buttons 1`] = `
|
|
|
270
270
|
type="button"
|
|
271
271
|
/>
|
|
272
272
|
<span
|
|
273
|
-
aria-hidden="true"
|
|
274
273
|
class="tw-icon tw-icon-plus "
|
|
275
274
|
data-testid="plus-icon"
|
|
276
|
-
role="presentation"
|
|
277
275
|
>
|
|
278
276
|
<svg
|
|
277
|
+
aria-hidden="true"
|
|
279
278
|
fill="currentColor"
|
|
280
279
|
focusable="false"
|
|
281
280
|
height="24"
|
|
281
|
+
role="none"
|
|
282
282
|
viewBox="0 0 24 24"
|
|
283
283
|
width="24"
|
|
284
284
|
>
|
|
@@ -307,15 +307,15 @@ exports[`CircularButton types renders negative buttons 1`] = `
|
|
|
307
307
|
type="button"
|
|
308
308
|
/>
|
|
309
309
|
<span
|
|
310
|
-
aria-hidden="true"
|
|
311
310
|
class="tw-icon tw-icon-plus "
|
|
312
311
|
data-testid="plus-icon"
|
|
313
|
-
role="presentation"
|
|
314
312
|
>
|
|
315
313
|
<svg
|
|
314
|
+
aria-hidden="true"
|
|
316
315
|
fill="currentColor"
|
|
317
316
|
focusable="false"
|
|
318
317
|
height="24"
|
|
318
|
+
role="none"
|
|
319
319
|
viewBox="0 0 24 24"
|
|
320
320
|
width="24"
|
|
321
321
|
>
|
|
@@ -344,15 +344,15 @@ exports[`CircularButton types renders positive buttons 1`] = `
|
|
|
344
344
|
type="button"
|
|
345
345
|
/>
|
|
346
346
|
<span
|
|
347
|
-
aria-hidden="true"
|
|
348
347
|
class="tw-icon tw-icon-plus "
|
|
349
348
|
data-testid="plus-icon"
|
|
350
|
-
role="presentation"
|
|
351
349
|
>
|
|
352
350
|
<svg
|
|
351
|
+
aria-hidden="true"
|
|
353
352
|
fill="currentColor"
|
|
354
353
|
focusable="false"
|
|
355
354
|
height="24"
|
|
355
|
+
role="none"
|
|
356
356
|
viewBox="0 0 24 24"
|
|
357
357
|
width="24"
|
|
358
358
|
>
|
|
@@ -39,15 +39,15 @@ exports[`BottomSheet renders content when open 1`] = `
|
|
|
39
39
|
type="button"
|
|
40
40
|
>
|
|
41
41
|
<span
|
|
42
|
-
aria-hidden="true"
|
|
43
42
|
class="tw-icon tw-icon-cross "
|
|
44
43
|
data-testid="cross-icon"
|
|
45
|
-
role="presentation"
|
|
46
44
|
>
|
|
47
45
|
<svg
|
|
46
|
+
aria-hidden="true"
|
|
48
47
|
fill="currentColor"
|
|
49
48
|
focusable="false"
|
|
50
49
|
height="16"
|
|
50
|
+
role="none"
|
|
51
51
|
viewBox="0 0 24 24"
|
|
52
52
|
width="16"
|
|
53
53
|
>
|
|
@@ -8,15 +8,15 @@ exports[`CloseButton renders as expected 1`] = `
|
|
|
8
8
|
type="button"
|
|
9
9
|
>
|
|
10
10
|
<span
|
|
11
|
-
aria-hidden="true"
|
|
12
11
|
class="tw-icon tw-icon-cross "
|
|
13
12
|
data-testid="cross-icon"
|
|
14
|
-
role="presentation"
|
|
15
13
|
>
|
|
16
14
|
<svg
|
|
15
|
+
aria-hidden="true"
|
|
17
16
|
fill="currentColor"
|
|
18
17
|
focusable="false"
|
|
19
18
|
height="24"
|
|
19
|
+
role="none"
|
|
20
20
|
viewBox="0 0 24 24"
|
|
21
21
|
width="24"
|
|
22
22
|
>
|
|
@@ -24,15 +24,15 @@ exports[`Drawer renders content when open 1`] = `
|
|
|
24
24
|
type="button"
|
|
25
25
|
>
|
|
26
26
|
<span
|
|
27
|
-
aria-hidden="true"
|
|
28
27
|
class="tw-icon tw-icon-cross "
|
|
29
28
|
data-testid="cross-icon"
|
|
30
|
-
role="presentation"
|
|
31
29
|
>
|
|
32
30
|
<svg
|
|
31
|
+
aria-hidden="true"
|
|
33
32
|
fill="currentColor"
|
|
34
33
|
focusable="false"
|
|
35
34
|
height="24"
|
|
35
|
+
role="none"
|
|
36
36
|
viewBox="0 0 24 24"
|
|
37
37
|
width="24"
|
|
38
38
|
>
|
|
@@ -38,15 +38,15 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
38
38
|
type="button"
|
|
39
39
|
>
|
|
40
40
|
<span
|
|
41
|
-
aria-hidden="true"
|
|
42
41
|
class="tw-icon tw-icon-cross "
|
|
43
42
|
data-testid="cross-icon"
|
|
44
|
-
role="presentation"
|
|
45
43
|
>
|
|
46
44
|
<svg
|
|
45
|
+
aria-hidden="true"
|
|
47
46
|
fill="currentColor"
|
|
48
47
|
focusable="false"
|
|
49
48
|
height="24"
|
|
49
|
+
role="none"
|
|
50
50
|
viewBox="0 0 24 24"
|
|
51
51
|
width="24"
|
|
52
52
|
>
|
|
@@ -153,15 +153,15 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
153
153
|
type="button"
|
|
154
154
|
>
|
|
155
155
|
<span
|
|
156
|
-
aria-hidden="true"
|
|
157
156
|
class="tw-icon tw-icon-cross "
|
|
158
157
|
data-testid="cross-icon"
|
|
159
|
-
role="presentation"
|
|
160
158
|
>
|
|
161
159
|
<svg
|
|
160
|
+
aria-hidden="true"
|
|
162
161
|
fill="currentColor"
|
|
163
162
|
focusable="false"
|
|
164
163
|
height="24"
|
|
164
|
+
role="none"
|
|
165
165
|
viewBox="0 0 24 24"
|
|
166
166
|
width="24"
|
|
167
167
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { render, screen } from '../test-utils';
|
|
1
|
+
import { render, screen, within } from '../test-utils';
|
|
2
2
|
|
|
3
3
|
import InstructionsList from '.';
|
|
4
4
|
|
|
@@ -34,8 +34,16 @@ describe('InstructionsList', () => {
|
|
|
34
34
|
|
|
35
35
|
const instructions = container.querySelectorAll('.instruction');
|
|
36
36
|
expect(instructions).toHaveLength(2);
|
|
37
|
-
expect(
|
|
38
|
-
|
|
37
|
+
expect(
|
|
38
|
+
within(instructions[0] as HTMLElement).getByRole('graphics-symbol', {
|
|
39
|
+
name: dos[0]['aria-label'],
|
|
40
|
+
}),
|
|
41
|
+
).toBeInTheDocument();
|
|
42
|
+
expect(
|
|
43
|
+
within(instructions[1] as HTMLElement).getByRole('graphics-symbol', {
|
|
44
|
+
name: donts[0]['aria-label'],
|
|
45
|
+
}),
|
|
46
|
+
).toBeInTheDocument();
|
|
39
47
|
});
|
|
40
48
|
|
|
41
49
|
it('should render donts first when sort is set to `dontsFirst`', () => {
|
|
@@ -48,7 +56,15 @@ describe('InstructionsList', () => {
|
|
|
48
56
|
|
|
49
57
|
const instructions = container.querySelectorAll('.instruction');
|
|
50
58
|
expect(instructions).toHaveLength(2);
|
|
51
|
-
expect(
|
|
52
|
-
|
|
59
|
+
expect(
|
|
60
|
+
within(instructions[0] as HTMLElement).getByRole('graphics-symbol', {
|
|
61
|
+
name: donts[0]['aria-label'],
|
|
62
|
+
}),
|
|
63
|
+
).toBeInTheDocument();
|
|
64
|
+
expect(
|
|
65
|
+
within(instructions[1] as HTMLElement).getByRole('graphics-symbol', {
|
|
66
|
+
name: dos[0]['aria-label'],
|
|
67
|
+
}),
|
|
68
|
+
).toBeInTheDocument();
|
|
53
69
|
});
|
|
54
70
|
});
|
|
@@ -57,11 +57,19 @@ function Instruction({ item, type }: { item: ReactNode | InstructionNode; type:
|
|
|
57
57
|
const isInstructionNode =
|
|
58
58
|
typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;
|
|
59
59
|
return (
|
|
60
|
-
<li className="instruction"
|
|
60
|
+
<li className="instruction">
|
|
61
61
|
{type === 'do' ? (
|
|
62
|
-
<DoIcon
|
|
62
|
+
<DoIcon
|
|
63
|
+
size={24}
|
|
64
|
+
className={type}
|
|
65
|
+
title={isInstructionNode ? item['aria-label'] : undefined}
|
|
66
|
+
/>
|
|
63
67
|
) : (
|
|
64
|
-
<DontIcon
|
|
68
|
+
<DontIcon
|
|
69
|
+
size={24}
|
|
70
|
+
className={type}
|
|
71
|
+
title={isInstructionNode ? item['aria-label'] : undefined}
|
|
72
|
+
/>
|
|
65
73
|
)}
|
|
66
74
|
<Body className="text-primary" type={Typography.BODY_LARGE}>
|
|
67
75
|
{isInstructionNode ? item.content : item}
|
|
@@ -35,15 +35,15 @@ exports[`OverlayHeader renders as expected 1`] = `
|
|
|
35
35
|
type="button"
|
|
36
36
|
>
|
|
37
37
|
<span
|
|
38
|
-
aria-hidden="true"
|
|
39
38
|
class="tw-icon tw-icon-cross "
|
|
40
39
|
data-testid="cross-icon"
|
|
41
|
-
role="presentation"
|
|
42
40
|
>
|
|
43
41
|
<svg
|
|
42
|
+
aria-hidden="true"
|
|
44
43
|
fill="currentColor"
|
|
45
44
|
focusable="false"
|
|
46
45
|
height="24"
|
|
46
|
+
role="none"
|
|
47
47
|
viewBox="0 0 24 24"
|
|
48
48
|
width="24"
|
|
49
49
|
>
|
|
@@ -95,7 +95,7 @@ export class Snackbar extends Component<SnackbarProps, SnackbarState> {
|
|
|
95
95
|
const { timeout } = this.props;
|
|
96
96
|
|
|
97
97
|
return (
|
|
98
|
-
<div className="snackbar">
|
|
98
|
+
<div className="snackbar" aria-live="assertive" role="alert">
|
|
99
99
|
<CSSTransition
|
|
100
100
|
nodeRef={this.bodyRef}
|
|
101
101
|
in={visible}
|
|
@@ -107,13 +107,7 @@ export class Snackbar extends Component<SnackbarProps, SnackbarState> {
|
|
|
107
107
|
}}
|
|
108
108
|
unmountOnExit
|
|
109
109
|
>
|
|
110
|
-
<Body
|
|
111
|
-
ref={this.bodyRef}
|
|
112
|
-
as="span"
|
|
113
|
-
className="snackbar__text"
|
|
114
|
-
role="status"
|
|
115
|
-
aria-live="assertive"
|
|
116
|
-
>
|
|
110
|
+
<Body ref={this.bodyRef} as="span" className="snackbar__text">
|
|
117
111
|
{text}
|
|
118
112
|
{action ? (
|
|
119
113
|
<ActionButton className="snackbar__text__action" onClick={action.onClick}>
|
|
@@ -36,7 +36,7 @@ export type TypeaheadOption<T = string> = {
|
|
|
36
36
|
keepFocusOnSelect?: boolean;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export interface TypeaheadProps<T> extends WrappedComponentProps {
|
|
39
|
+
export interface TypeaheadProps<T> extends Partial<WrappedComponentProps> {
|
|
40
40
|
id: string;
|
|
41
41
|
name: string;
|
|
42
42
|
addon?: ReactNode;
|
|
@@ -70,7 +70,9 @@ export interface TypeaheadProps<T> extends WrappedComponentProps {
|
|
|
70
70
|
validateChip?: (chip: TypeaheadOption<T>) => boolean;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
type TypeaheadPropsWithInputAttributes<T> = TypeaheadProps<T> &
|
|
73
|
+
type TypeaheadPropsWithInputAttributes<T> = TypeaheadProps<T> &
|
|
74
|
+
Partial<WithInputAttributesProps> &
|
|
75
|
+
WrappedComponentProps;
|
|
74
76
|
|
|
75
77
|
type TypeaheadState<T> = {
|
|
76
78
|
selected: readonly TypeaheadOption<T>[];
|
|
@@ -536,7 +538,7 @@ class Typeahead<T> extends Component<TypeaheadPropsWithInputAttributes<T>, Typea
|
|
|
536
538
|
<button
|
|
537
539
|
type="button"
|
|
538
540
|
className="btn-unstyled"
|
|
539
|
-
aria-label={this.props
|
|
541
|
+
aria-label={this.props?.intl?.formatMessage(messages.clearLabel)}
|
|
540
542
|
onClick={this.clear}
|
|
541
543
|
>
|
|
542
544
|
<CrossIcon />
|
|
@@ -97,9 +97,7 @@ export type UploadInputProps = {
|
|
|
97
97
|
} & Pick<
|
|
98
98
|
UploadButtonProps,
|
|
99
99
|
'disabled' | 'multiple' | 'fileTypes' | 'sizeLimit' | 'description' | 'id' | 'uploadButtonTitle'
|
|
100
|
-
> &
|
|
101
|
-
Pick<UploadItemProps, 'onDownload'> &
|
|
102
|
-
CommonProps;
|
|
100
|
+
> & { onDownload?: UploadItemProps['onDownload'] } & CommonProps;
|
|
103
101
|
|
|
104
102
|
interface UploadItemRef {
|
|
105
103
|
focus: () => void;
|
|
@@ -386,7 +384,6 @@ const UploadInput = ({
|
|
|
386
384
|
maxFiles={maxFiles}
|
|
387
385
|
withEntries={Boolean(uploadedFiles.length)}
|
|
388
386
|
onChange={addFiles}
|
|
389
|
-
|
|
390
387
|
/>
|
|
391
388
|
</div>
|
|
392
389
|
)}
|