@transferwise/components 0.0.0-experimental-bab2370 → 0.0.0-experimental-a6e26d3
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/main.css +2 -0
- package/build/styles/listItem/ListItem.css +2 -0
- package/build/styles/main.css +2 -0
- package/build/types/listItem/_stories/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/listItem/ListItem.css +2 -0
- package/src/listItem/ListItem.less +1 -0
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +2 -119
- package/src/listItem/_stories/ListItem.story.tsx +1 -1
- package/src/listItem/_stories/helpers.tsx +9 -3
- package/src/main.css +2 -0
package/build/main.css
CHANGED
|
@@ -3166,6 +3166,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3166
3166
|
width: 100%;
|
|
3167
3167
|
border-radius: 16px;
|
|
3168
3168
|
border-radius: var(--radius-medium);
|
|
3169
|
+
background-color: #ffffff;
|
|
3170
|
+
background-color: var(--color-background-screen);
|
|
3169
3171
|
position: relative;
|
|
3170
3172
|
padding: 12px 0;
|
|
3171
3173
|
padding: var(--size-12) 0;
|
package/build/styles/main.css
CHANGED
|
@@ -3166,6 +3166,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3166
3166
|
width: 100%;
|
|
3167
3167
|
border-radius: 16px;
|
|
3168
3168
|
border-radius: var(--radius-medium);
|
|
3169
|
+
background-color: #ffffff;
|
|
3170
|
+
background-color: var(--color-background-screen);
|
|
3169
3171
|
position: relative;
|
|
3170
3172
|
padding: 12px 0;
|
|
3171
3173
|
padding: var(--size-12) 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/listItem/_stories/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,KAAK,KAAG,KAuBvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/listItem/_stories/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,KAAK,KAAG,KAuBvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,SAQxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GACzB,kBAAiB,MAAM,EAAO,MAC9B,iBAAgB,MAAM,EAAO;;;;;;CAG7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,15 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
import { Title, Subtitle, Description, Stories } from '@storybook/addon-docs/blocks';
|
|
3
3
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
4
4
|
import { action } from 'storybook/actions';
|
|
5
|
-
import {
|
|
6
|
-
InfoCircle,
|
|
7
|
-
Documents,
|
|
8
|
-
Warning,
|
|
9
|
-
Home,
|
|
10
|
-
Globe,
|
|
11
|
-
People,
|
|
12
|
-
Link as LinkIcon,
|
|
13
|
-
} from '@transferwise/icons';
|
|
5
|
+
import { InfoCircle, Documents } from '@transferwise/icons';
|
|
14
6
|
import { lorem10, lorem100, lorem20, lorem5 } from '../../test-utils';
|
|
15
7
|
import Modal from '../../modal';
|
|
16
8
|
import Link from '../../link';
|
|
@@ -31,7 +23,7 @@ import {
|
|
|
31
23
|
|
|
32
24
|
export default {
|
|
33
25
|
component: ListItem,
|
|
34
|
-
title: 'Content/ListItem/
|
|
26
|
+
title: 'Content/ListItem/common scenarios',
|
|
35
27
|
tags: ['autodocs'],
|
|
36
28
|
args: {
|
|
37
29
|
title: lorem5,
|
|
@@ -234,112 +226,3 @@ export const CopyAndPasteWithSnackbar: Story = storySourceWithoutNoise({
|
|
|
234
226
|
);
|
|
235
227
|
},
|
|
236
228
|
});
|
|
237
|
-
|
|
238
|
-
export const Summary: Story = {
|
|
239
|
-
parameters: {
|
|
240
|
-
docs: {
|
|
241
|
-
canvas: {
|
|
242
|
-
sourceState: 'shown',
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
backgrounds: {
|
|
246
|
-
default: 'light',
|
|
247
|
-
values: [
|
|
248
|
-
{ name: 'light', value: '#f8f9fa' },
|
|
249
|
-
{ name: 'dark', value: '#343a40' },
|
|
250
|
-
],
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
render: () => {
|
|
254
|
-
const listItems = (
|
|
255
|
-
<List>
|
|
256
|
-
<ListItem
|
|
257
|
-
title="System maintenance"
|
|
258
|
-
subtitle="Scheduled downtime notification"
|
|
259
|
-
media={
|
|
260
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
261
|
-
<Warning />
|
|
262
|
-
</ListItem.AvatarView>
|
|
263
|
-
}
|
|
264
|
-
control={
|
|
265
|
-
<ListItem.IconButton partiallyInteractive>
|
|
266
|
-
<InfoCircle />
|
|
267
|
-
</ListItem.IconButton>
|
|
268
|
-
}
|
|
269
|
-
/>
|
|
270
|
-
<ListItem
|
|
271
|
-
title="One link, one QR code, many uses"
|
|
272
|
-
subtitle="Quick Pay is a unique link and QR code for your business to get paid online and in person."
|
|
273
|
-
media={
|
|
274
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
275
|
-
<LinkIcon />
|
|
276
|
-
</ListItem.AvatarView>
|
|
277
|
-
}
|
|
278
|
-
/>
|
|
279
|
-
<ListItem
|
|
280
|
-
title="Action required"
|
|
281
|
-
subtitle="Update your payment address"
|
|
282
|
-
media={
|
|
283
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
284
|
-
<Home />
|
|
285
|
-
</ListItem.AvatarView>
|
|
286
|
-
}
|
|
287
|
-
additionalInfo={
|
|
288
|
-
<ListItem.AdditionalInfo
|
|
289
|
-
action={{ label: 'Change Address', onClick: () => console.log('hello') }}
|
|
290
|
-
/>
|
|
291
|
-
}
|
|
292
|
-
/>
|
|
293
|
-
<ListItem
|
|
294
|
-
title="Action required"
|
|
295
|
-
subtitle="Update your payment address"
|
|
296
|
-
media={
|
|
297
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
298
|
-
<Home />
|
|
299
|
-
</ListItem.AvatarView>
|
|
300
|
-
}
|
|
301
|
-
additionalInfo={
|
|
302
|
-
<ListItem.AdditionalInfo
|
|
303
|
-
action={{ label: 'Change Address', onClick: () => console.log('hello') }}
|
|
304
|
-
/>
|
|
305
|
-
}
|
|
306
|
-
control={
|
|
307
|
-
<ListItem.IconButton partiallyInteractive>
|
|
308
|
-
<InfoCircle />
|
|
309
|
-
</ListItem.IconButton>
|
|
310
|
-
}
|
|
311
|
-
/>
|
|
312
|
-
<ListItem
|
|
313
|
-
title="Receive money from around the world"
|
|
314
|
-
media={
|
|
315
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
316
|
-
<Globe />
|
|
317
|
-
</ListItem.AvatarView>
|
|
318
|
-
}
|
|
319
|
-
/>
|
|
320
|
-
<ListItem
|
|
321
|
-
title="Let customers pay in a currency they trust"
|
|
322
|
-
media={
|
|
323
|
-
<ListItem.AvatarView size={32} style={{ border: 'none' }}>
|
|
324
|
-
<People />
|
|
325
|
-
</ListItem.AvatarView>
|
|
326
|
-
}
|
|
327
|
-
/>
|
|
328
|
-
</List>
|
|
329
|
-
);
|
|
330
|
-
return (
|
|
331
|
-
<>
|
|
332
|
-
<div style={{ padding: '24px', width: '450px' }}>{listItems}</div>
|
|
333
|
-
<div
|
|
334
|
-
style={{
|
|
335
|
-
padding: '24px',
|
|
336
|
-
width: '450px',
|
|
337
|
-
backgroundColor: 'var(--color-background-neutral)',
|
|
338
|
-
}}
|
|
339
|
-
>
|
|
340
|
-
{listItems}
|
|
341
|
-
</div>
|
|
342
|
-
</>
|
|
343
|
-
);
|
|
344
|
-
},
|
|
345
|
-
};
|
|
@@ -38,9 +38,15 @@ export const storySourceWithoutNoise = (config: Story): Story => {
|
|
|
38
38
|
* In order to make preview controls work correctly, we have to refresh the render
|
|
39
39
|
* by swapping the `key`. This is a workaround for the Storybook's limitation.
|
|
40
40
|
*/
|
|
41
|
-
export const withoutKey: Decorator = (Story, { args }) =>
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
export const withoutKey: Decorator = (Story, { args }) => {
|
|
42
|
+
const key = [
|
|
43
|
+
args.previewInteractivity,
|
|
44
|
+
args?.disabled ? 'disabled' : 'enabled',
|
|
45
|
+
args?.inverted ? 'desc' : 'asc',
|
|
46
|
+
].join('-');
|
|
47
|
+
|
|
48
|
+
return <Story key={key} />;
|
|
49
|
+
};
|
|
44
50
|
|
|
45
51
|
/**
|
|
46
52
|
* Not all stories need access to all controls as it causes unnecessary UI noise.
|
package/src/main.css
CHANGED
|
@@ -3166,6 +3166,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3166
3166
|
width: 100%;
|
|
3167
3167
|
border-radius: 16px;
|
|
3168
3168
|
border-radius: var(--radius-medium);
|
|
3169
|
+
background-color: #ffffff;
|
|
3170
|
+
background-color: var(--color-background-screen);
|
|
3169
3171
|
position: relative;
|
|
3170
3172
|
padding: 12px 0;
|
|
3171
3173
|
padding: var(--size-12) 0;
|