@transferwise/components 0.0.0-experimental-53c607c → 0.0.0-experimental-b002e6f
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/avatarLayout/AvatarLayout.js +2 -9
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +2 -9
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/button/Button.js +97 -74
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +98 -75
- package/build/button/Button.mjs.map +1 -1
- package/build/common/action/Action.js +1 -1
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +1 -1
- package/build/common/action/Action.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +2 -2
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/header/Header.js +2 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/link/Link.js +3 -8
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +3 -8
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +0 -269
- package/build/nudge/Nudge.js +1 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +3 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +3 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +4 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +4 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -1
- package/build/select/Select.js +3 -5
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +2 -4
- package/build/select/Select.mjs.map +1 -1
- package/build/styles/avatarLayout/AvatarLayout.css +0 -11
- package/build/styles/button/Button.css +16 -251
- package/build/styles/main.css +0 -269
- package/build/types/avatarLayout/AvatarLayout.d.ts +2 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/avatarLayout/index.d.ts +0 -1
- package/build/types/avatarLayout/index.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +23 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/index.d.ts +2 -2
- package/build/types/button/index.d.ts.map +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +1 -2
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +2 -2
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -2
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -2
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +3 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/package.json +3 -3
- package/src/avatarLayout/AvatarLayout.css +0 -11
- package/src/avatarLayout/AvatarLayout.less +1 -18
- package/src/avatarLayout/AvatarLayout.tsx +3 -11
- package/src/avatarLayout/index.ts +0 -1
- package/src/avatarWrapper/AvatarWrapper.story.tsx +0 -2
- package/src/button/Button.css +16 -251
- package/src/button/Button.less +14 -214
- package/src/button/Button.spec.tsx +231 -54
- package/src/button/Button.story.tsx +136 -287
- package/src/button/Button.tsx +131 -86
- package/src/button/__snapshots__/{LegacyButton.spec.tsx.snap → Button.spec.tsx.snap} +22 -22
- package/src/button/index.ts +3 -2
- package/src/common/action/Action.tsx +1 -1
- package/src/definitionList/DefinitionList.story.tsx +57 -57
- package/src/definitionList/DefinitionList.tsx +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +1 -1
- package/src/iconButton/IconButton.less +1 -1
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/link/Link.tsx +6 -15
- package/src/main.css +0 -269
- package/src/main.less +0 -1
- package/src/nudge/Nudge.tsx +1 -1
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx +7 -1
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +1 -1
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +3 -1
- package/src/primitives/PrimitiveButton/src/PrimitiveButton.tsx +8 -1
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +1 -1
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +5 -2
- package/src/select/Select.tsx +0 -1
- package/src/slidingPanel/SlidingPanel.spec.tsx +69 -0
- package/src/test-utils/index.tsx +1 -0
- package/build/button/Button.resolver.js +0 -67
- package/build/button/Button.resolver.js.map +0 -1
- package/build/button/Button.resolver.mjs +0 -65
- package/build/button/Button.resolver.mjs.map +0 -1
- package/build/button/LegacyButton.js +0 -114
- package/build/button/LegacyButton.js.map +0 -1
- package/build/button/LegacyButton.mjs +0 -112
- package/build/button/LegacyButton.mjs.map +0 -1
- package/build/styles/button/Button.vars.css +0 -57
- package/build/styles/button/LegacyButton.css +0 -23
- package/build/types/button/Button.resolver.d.ts +0 -31
- package/build/types/button/Button.resolver.d.ts.map +0 -1
- package/build/types/button/Button.types.d.ts +0 -50
- package/build/types/button/Button.types.d.ts.map +0 -1
- package/build/types/button/LegacyButton.d.ts +0 -30
- package/build/types/button/LegacyButton.d.ts.map +0 -1
- package/src/button/Button.resolver.tsx +0 -113
- package/src/button/Button.types.ts +0 -70
- package/src/button/Button.vars.css +0 -57
- package/src/button/Button.vars.less +0 -71
- package/src/button/LegacyButton.css +0 -23
- package/src/button/LegacyButton.less +0 -24
- package/src/button/LegacyButton.spec.tsx +0 -245
- package/src/button/LegacyButton.story.tsx +0 -224
- package/src/button/LegacyButton.tsx +0 -161
- package/src/definitionList/DefinitionList.spec.js +0 -91
- package/src/slidingPanel/SlidingPanel.spec.js +0 -56
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`Button by default renders a medium button of type accent and priority primary 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<button
|
|
6
6
|
aria-busy="false"
|
|
@@ -14,7 +14,7 @@ exports[`LegacyButton by default renders a medium button of type accent and prio
|
|
|
14
14
|
</div>
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
exports[`
|
|
17
|
+
exports[`Button by default renders an anchor tag with button styles of type accent and priority primary 1`] = `
|
|
18
18
|
<div>
|
|
19
19
|
<a
|
|
20
20
|
aria-busy="false"
|
|
@@ -28,7 +28,7 @@ exports[`LegacyButton by default renders an anchor tag with button styles of typ
|
|
|
28
28
|
</div>
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
|
-
exports[`
|
|
31
|
+
exports[`Button deprecated types renders danger as negative buttons with priority secondary and logs a warning 1`] = `
|
|
32
32
|
<div>
|
|
33
33
|
<button
|
|
34
34
|
aria-busy="false"
|
|
@@ -42,7 +42,7 @@ exports[`LegacyButton deprecated types renders danger as negative buttons with p
|
|
|
42
42
|
</div>
|
|
43
43
|
`;
|
|
44
44
|
|
|
45
|
-
exports[`
|
|
45
|
+
exports[`Button deprecated types renders link as accent buttons with priority tertiary and logs a warning 1`] = `
|
|
46
46
|
<div>
|
|
47
47
|
<button
|
|
48
48
|
aria-busy="false"
|
|
@@ -56,7 +56,7 @@ exports[`LegacyButton deprecated types renders link as accent buttons with prior
|
|
|
56
56
|
</div>
|
|
57
57
|
`;
|
|
58
58
|
|
|
59
|
-
exports[`
|
|
59
|
+
exports[`Button deprecated types renders pay as positive buttons and logs a warning 1`] = `
|
|
60
60
|
<div>
|
|
61
61
|
<button
|
|
62
62
|
aria-busy="false"
|
|
@@ -70,7 +70,7 @@ exports[`LegacyButton deprecated types renders pay as positive buttons and logs
|
|
|
70
70
|
</div>
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
|
-
exports[`
|
|
73
|
+
exports[`Button deprecated types renders primary as accent buttons and logs a warning 1`] = `
|
|
74
74
|
<div>
|
|
75
75
|
<button
|
|
76
76
|
aria-busy="false"
|
|
@@ -84,7 +84,7 @@ exports[`LegacyButton deprecated types renders primary as accent buttons and log
|
|
|
84
84
|
</div>
|
|
85
85
|
`;
|
|
86
86
|
|
|
87
|
-
exports[`
|
|
87
|
+
exports[`Button other states renders as block if block is true 1`] = `
|
|
88
88
|
<div>
|
|
89
89
|
<button
|
|
90
90
|
aria-busy="false"
|
|
@@ -98,7 +98,7 @@ exports[`LegacyButton other states renders as block if block is true 1`] = `
|
|
|
98
98
|
</div>
|
|
99
99
|
`;
|
|
100
100
|
|
|
101
|
-
exports[`
|
|
101
|
+
exports[`Button priorities defaults tertiary buttons to secondary for positive buttons 1`] = `
|
|
102
102
|
<div>
|
|
103
103
|
<button
|
|
104
104
|
aria-busy="false"
|
|
@@ -112,7 +112,7 @@ exports[`LegacyButton priorities defaults tertiary buttons to secondary for posi
|
|
|
112
112
|
</div>
|
|
113
113
|
`;
|
|
114
114
|
|
|
115
|
-
exports[`
|
|
115
|
+
exports[`Button priorities defaults tertiary buttons to secondary for positive buttons 2`] = `
|
|
116
116
|
<div>
|
|
117
117
|
<button
|
|
118
118
|
aria-busy="false"
|
|
@@ -126,7 +126,7 @@ exports[`LegacyButton priorities defaults tertiary buttons to secondary for posi
|
|
|
126
126
|
</div>
|
|
127
127
|
`;
|
|
128
128
|
|
|
129
|
-
exports[`
|
|
129
|
+
exports[`Button priorities renders primary buttons 1`] = `
|
|
130
130
|
<div>
|
|
131
131
|
<button
|
|
132
132
|
aria-busy="false"
|
|
@@ -140,7 +140,7 @@ exports[`LegacyButton priorities renders primary buttons 1`] = `
|
|
|
140
140
|
</div>
|
|
141
141
|
`;
|
|
142
142
|
|
|
143
|
-
exports[`
|
|
143
|
+
exports[`Button priorities renders primary buttons 2`] = `
|
|
144
144
|
<div>
|
|
145
145
|
<button
|
|
146
146
|
aria-busy="false"
|
|
@@ -154,7 +154,7 @@ exports[`LegacyButton priorities renders primary buttons 2`] = `
|
|
|
154
154
|
</div>
|
|
155
155
|
`;
|
|
156
156
|
|
|
157
|
-
exports[`
|
|
157
|
+
exports[`Button priorities renders primary buttons 3`] = `
|
|
158
158
|
<div>
|
|
159
159
|
<button
|
|
160
160
|
aria-busy="false"
|
|
@@ -168,7 +168,7 @@ exports[`LegacyButton priorities renders primary buttons 3`] = `
|
|
|
168
168
|
</div>
|
|
169
169
|
`;
|
|
170
170
|
|
|
171
|
-
exports[`
|
|
171
|
+
exports[`Button priorities renders secondary buttons 1`] = `
|
|
172
172
|
<div>
|
|
173
173
|
<button
|
|
174
174
|
aria-busy="false"
|
|
@@ -182,7 +182,7 @@ exports[`LegacyButton priorities renders secondary buttons 1`] = `
|
|
|
182
182
|
</div>
|
|
183
183
|
`;
|
|
184
184
|
|
|
185
|
-
exports[`
|
|
185
|
+
exports[`Button priorities renders secondary buttons 2`] = `
|
|
186
186
|
<div>
|
|
187
187
|
<button
|
|
188
188
|
aria-busy="false"
|
|
@@ -196,7 +196,7 @@ exports[`LegacyButton priorities renders secondary buttons 2`] = `
|
|
|
196
196
|
</div>
|
|
197
197
|
`;
|
|
198
198
|
|
|
199
|
-
exports[`
|
|
199
|
+
exports[`Button priorities renders secondary buttons 3`] = `
|
|
200
200
|
<div>
|
|
201
201
|
<button
|
|
202
202
|
aria-busy="false"
|
|
@@ -210,7 +210,7 @@ exports[`LegacyButton priorities renders secondary buttons 3`] = `
|
|
|
210
210
|
</div>
|
|
211
211
|
`;
|
|
212
212
|
|
|
213
|
-
exports[`
|
|
213
|
+
exports[`Button priorities renders tertiary buttons 1`] = `
|
|
214
214
|
<div>
|
|
215
215
|
<button
|
|
216
216
|
aria-busy="false"
|
|
@@ -224,7 +224,7 @@ exports[`LegacyButton priorities renders tertiary buttons 1`] = `
|
|
|
224
224
|
</div>
|
|
225
225
|
`;
|
|
226
226
|
|
|
227
|
-
exports[`
|
|
227
|
+
exports[`Button sizes renders large buttons 1`] = `
|
|
228
228
|
<div>
|
|
229
229
|
<button
|
|
230
230
|
aria-busy="false"
|
|
@@ -238,7 +238,7 @@ exports[`LegacyButton sizes renders large buttons 1`] = `
|
|
|
238
238
|
</div>
|
|
239
239
|
`;
|
|
240
240
|
|
|
241
|
-
exports[`
|
|
241
|
+
exports[`Button sizes renders medium buttons 1`] = `
|
|
242
242
|
<div>
|
|
243
243
|
<button
|
|
244
244
|
aria-busy="false"
|
|
@@ -252,7 +252,7 @@ exports[`LegacyButton sizes renders medium buttons 1`] = `
|
|
|
252
252
|
</div>
|
|
253
253
|
`;
|
|
254
254
|
|
|
255
|
-
exports[`
|
|
255
|
+
exports[`Button sizes renders small buttons 1`] = `
|
|
256
256
|
<div>
|
|
257
257
|
<button
|
|
258
258
|
aria-busy="false"
|
|
@@ -266,7 +266,7 @@ exports[`LegacyButton sizes renders small buttons 1`] = `
|
|
|
266
266
|
</div>
|
|
267
267
|
`;
|
|
268
268
|
|
|
269
|
-
exports[`
|
|
269
|
+
exports[`Button types renders accent buttons 1`] = `
|
|
270
270
|
<div>
|
|
271
271
|
<button
|
|
272
272
|
aria-busy="false"
|
|
@@ -280,7 +280,7 @@ exports[`LegacyButton types renders accent buttons 1`] = `
|
|
|
280
280
|
</div>
|
|
281
281
|
`;
|
|
282
282
|
|
|
283
|
-
exports[`
|
|
283
|
+
exports[`Button types renders negative buttons 1`] = `
|
|
284
284
|
<div>
|
|
285
285
|
<button
|
|
286
286
|
aria-busy="false"
|
|
@@ -294,7 +294,7 @@ exports[`LegacyButton types renders negative buttons 1`] = `
|
|
|
294
294
|
</div>
|
|
295
295
|
`;
|
|
296
296
|
|
|
297
|
-
exports[`
|
|
297
|
+
exports[`Button types renders positive buttons 1`] = `
|
|
298
298
|
<div>
|
|
299
299
|
<button
|
|
300
300
|
aria-busy="false"
|
package/src/button/index.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default } from './Button
|
|
2
|
-
|
|
1
|
+
export { default } from './Button';
|
|
2
|
+
|
|
3
|
+
export type { Props as ButtonProps } from './Button';
|
|
@@ -22,7 +22,7 @@ export function Action({ action, className, variant = 'button' }: Props) {
|
|
|
22
22
|
if ('href' in action) {
|
|
23
23
|
return (
|
|
24
24
|
<Link
|
|
25
|
-
href={action.href
|
|
25
|
+
href={action.href}
|
|
26
26
|
className={className}
|
|
27
27
|
aria-label={action['aria-label']}
|
|
28
28
|
target={action.target}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { select, text, boolean } from '@storybook/addon-knobs';
|
|
3
2
|
|
|
4
3
|
import { Layout } from '../common';
|
|
5
4
|
|
|
6
|
-
import DefinitionList from './DefinitionList';
|
|
5
|
+
import DefinitionList, { type DefinitionListLayout } from './DefinitionList';
|
|
6
|
+
import { lorem10 } from '../test-utils';
|
|
7
|
+
import Section from '../section';
|
|
8
|
+
import Header from '../header';
|
|
7
9
|
|
|
8
10
|
export default {
|
|
9
11
|
component: DefinitionList,
|
|
10
12
|
title: 'Typography/DefinitionList',
|
|
11
13
|
};
|
|
12
14
|
|
|
15
|
+
const layouts: DefinitionListLayout[] = [
|
|
16
|
+
Layout.VERTICAL_TWO_COLUMN,
|
|
17
|
+
Layout.VERTICAL_ONE_COLUMN,
|
|
18
|
+
Layout.HORIZONTAL_JUSTIFIED,
|
|
19
|
+
Layout.HORIZONTAL_LEFT_ALIGNED,
|
|
20
|
+
Layout.HORIZONTAL_RIGHT_ALIGNED,
|
|
21
|
+
];
|
|
22
|
+
|
|
13
23
|
const definitions = [
|
|
14
24
|
{
|
|
15
|
-
title:
|
|
16
|
-
value:
|
|
25
|
+
title: 'Definition List title',
|
|
26
|
+
value: 'Definition List value',
|
|
17
27
|
key: 'first',
|
|
18
28
|
},
|
|
19
29
|
{
|
|
@@ -23,67 +33,57 @@ const definitions = [
|
|
|
23
33
|
},
|
|
24
34
|
{
|
|
25
35
|
title: 'Long strings will wrap',
|
|
26
|
-
value:
|
|
36
|
+
value: lorem10,
|
|
27
37
|
key: 'third',
|
|
28
38
|
},
|
|
29
39
|
];
|
|
30
40
|
|
|
31
41
|
export const Basic = () => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Layout.HORIZONTAL_JUSTIFIED,
|
|
39
|
-
Layout.HORIZONTAL_LEFT_ALIGNED,
|
|
40
|
-
Layout.HORIZONTAL_RIGHT_ALIGNED,
|
|
41
|
-
],
|
|
42
|
-
Layout.HORIZONTAL_LEFT_ALIGNED,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
return <DefinitionList layout={layout} muted={muted} definitions={definitions} />;
|
|
42
|
+
return layouts.map((layout) => (
|
|
43
|
+
<Section key={layout}>
|
|
44
|
+
<Header title={`Instace of: ${layout}`} />
|
|
45
|
+
<DefinitionList layout={layout} definitions={definitions} />
|
|
46
|
+
</Section>
|
|
47
|
+
));
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
export const WithActionButtons = () => {
|
|
49
|
-
const muted = boolean('muted', false);
|
|
50
|
-
const layout = select(
|
|
51
|
-
'layout',
|
|
52
|
-
[
|
|
53
|
-
Layout.VERTICAL_TWO_COLUMN,
|
|
54
|
-
Layout.VERTICAL_ONE_COLUMN,
|
|
55
|
-
Layout.HORIZONTAL_JUSTIFIED,
|
|
56
|
-
Layout.HORIZONTAL_LEFT_ALIGNED,
|
|
57
|
-
Layout.HORIZONTAL_RIGHT_ALIGNED,
|
|
58
|
-
],
|
|
59
|
-
Layout.HORIZONTAL_LEFT_ALIGNED,
|
|
60
|
-
);
|
|
61
|
-
|
|
62
51
|
return (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
52
|
+
<>
|
|
53
|
+
{layouts.map((layout) => (
|
|
54
|
+
<Section key={layout}>
|
|
55
|
+
<Header title={`Instace of: ${layout}`} />
|
|
56
|
+
<DefinitionList
|
|
57
|
+
key={layout}
|
|
58
|
+
layout={layout}
|
|
59
|
+
definitions={[
|
|
60
|
+
...definitions,
|
|
61
|
+
{
|
|
62
|
+
title: 'Action buttons are useful',
|
|
63
|
+
value: lorem10,
|
|
64
|
+
key: 'fourth',
|
|
65
|
+
action: {
|
|
66
|
+
label: 'Epic button',
|
|
67
|
+
onClick: action(lorem10),
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'tiny',
|
|
72
|
+
value: 'tiny',
|
|
73
|
+
key: 'fifth',
|
|
74
|
+
action: {
|
|
75
|
+
label: 'Epic button',
|
|
76
|
+
onClick: action(lorem10),
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
</Section>
|
|
82
|
+
))}
|
|
83
|
+
</>
|
|
88
84
|
);
|
|
89
85
|
};
|
|
86
|
+
|
|
87
|
+
export const Muted = () => {
|
|
88
|
+
return <DefinitionList muted definitions={definitions} />;
|
|
89
|
+
};
|
|
@@ -13,7 +13,7 @@ export interface DefinitionListDefinition {
|
|
|
13
13
|
key: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
type DefinitionListLayout =
|
|
16
|
+
export type DefinitionListLayout =
|
|
17
17
|
`${Layout.VERTICAL_TWO_COLUMN | Layout.VERTICAL_ONE_COLUMN | Layout.HORIZONTAL_JUSTIFIED | Layout.HORIZONTAL_LEFT_ALIGNED | Layout.HORIZONTAL_RIGHT_ALIGNED}`;
|
|
18
18
|
|
|
19
19
|
export interface DefinitionListProps {
|
|
@@ -12,7 +12,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
12
12
|
aria-disabled="false"
|
|
13
13
|
aria-label="back to previous step"
|
|
14
14
|
aria-live="off"
|
|
15
|
-
class="np-circle d-flex align-items-center justify-content-center np-icon-button np-icon-button-tertiary-default"
|
|
15
|
+
class="wds-Button np-circle d-flex align-items-center justify-content-center np-icon-button np-icon-button-tertiary-default"
|
|
16
16
|
style="--circle-size: 40px; --circle-icon-size: 20px; --circle-font-size: 18px;"
|
|
17
17
|
type="button"
|
|
18
18
|
>
|
|
@@ -5,7 +5,7 @@ import { Flag } from '@wise/art';
|
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import Button from '../button/Button
|
|
8
|
+
import Button from '../button/Button';
|
|
9
9
|
import { getMonthNames } from '../common/dateUtils';
|
|
10
10
|
import Drawer from '../drawer';
|
|
11
11
|
import { Field } from '../field/Field';
|
package/src/link/Link.tsx
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { NavigateAway as NavigateAwayIcon } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
3
4
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { PrimitiveAnchor } from '../primitives';
|
|
5
|
-
import type { PrimitiveAnchorProps } from '../primitives';
|
|
6
5
|
|
|
7
6
|
import { LinkLarge, LinkDefault } from '../common';
|
|
8
7
|
|
|
9
8
|
import messages from './Link.messages';
|
|
10
9
|
|
|
11
|
-
export type Props =
|
|
10
|
+
export type Props = AnchorHTMLAttributes<HTMLAnchorElement> & { type?: LinkLarge | LinkDefault };
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Standard Link component with navigate away icon
|
|
@@ -25,30 +24,22 @@ const Link = ({
|
|
|
25
24
|
onClick,
|
|
26
25
|
...props
|
|
27
26
|
}: Props) => {
|
|
28
|
-
const { formatMessage } = useIntl();
|
|
29
27
|
const isBlank = target === '_blank';
|
|
30
28
|
|
|
31
|
-
const
|
|
32
|
-
'np-link',
|
|
33
|
-
'd-inline-flex',
|
|
34
|
-
{
|
|
35
|
-
[`np-text-${type}`]: type,
|
|
36
|
-
},
|
|
37
|
-
className,
|
|
38
|
-
);
|
|
29
|
+
const { formatMessage } = useIntl();
|
|
39
30
|
|
|
40
31
|
return (
|
|
41
|
-
<
|
|
32
|
+
<a
|
|
42
33
|
href={href}
|
|
43
34
|
target={target}
|
|
44
|
-
className={
|
|
35
|
+
className={clsx('np-link', type ? `np-text-${type}` : undefined, 'd-inline-flex', className)}
|
|
45
36
|
aria-label={ariaLabel}
|
|
46
37
|
rel={isBlank ? 'noreferrer' : undefined}
|
|
47
38
|
onClick={onClick}
|
|
48
39
|
{...props}
|
|
49
40
|
>
|
|
50
41
|
{children} {isBlank && <NavigateAwayIcon title={formatMessage(messages.opensInNewTab)} />}
|
|
51
|
-
</
|
|
42
|
+
</a>
|
|
52
43
|
);
|
|
53
44
|
};
|
|
54
45
|
|