@transferwise/components 0.0.0-experimental-850e2db → 0.0.0-experimental-308f971
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/dateInput/DateInput.js +4 -4
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +4 -4
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/main.css +13 -213
- package/build/styles/dateInput/DateInput.css +13 -1
- package/build/styles/main.css +13 -213
- package/build/types/index.d.ts +0 -2
- package/build/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/dateInput/DateInput.css +13 -1
- package/src/dateInput/DateInput.less +20 -3
- package/src/dateInput/DateInput.tests.story.tsx +14 -2
- package/src/dateInput/DateInput.tsx +4 -4
- package/src/index.ts +0 -2
- package/src/main.css +13 -213
- package/src/main.less +0 -1
- package/build/styles/listItem/ListItem.css +0 -212
- package/build/types/listItem/ListItem.d.ts +0 -50
- package/build/types/listItem/ListItem.d.ts.map +0 -1
- package/build/types/listItem/ListItemAdditionalInfo.d.ts +0 -9
- package/build/types/listItem/ListItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/listItem/ListItemButton.d.ts +0 -6
- package/build/types/listItem/ListItemButton.d.ts.map +0 -1
- package/build/types/listItem/ListItemCheckbox.d.ts +0 -4
- package/build/types/listItem/ListItemCheckbox.d.ts.map +0 -1
- package/build/types/listItem/ListItemIconButton.d.ts +0 -8
- package/build/types/listItem/ListItemIconButton.d.ts.map +0 -1
- package/build/types/listItem/ListItemMedia.d.ts +0 -19
- package/build/types/listItem/ListItemMedia.d.ts.map +0 -1
- package/build/types/listItem/ListItemNavigation.d.ts +0 -4
- package/build/types/listItem/ListItemNavigation.d.ts.map +0 -1
- package/build/types/listItem/ListItemSwitch.d.ts +0 -3
- package/build/types/listItem/ListItemSwitch.d.ts.map +0 -1
- package/build/types/listItem/index.d.ts +0 -6
- package/build/types/listItem/index.d.ts.map +0 -1
- package/build/types/listItem/prompt/Prompt.d.ts +0 -12
- package/build/types/listItem/prompt/Prompt.d.ts.map +0 -1
- package/build/types/listItem/useItemControl.d.ts +0 -5
- package/build/types/listItem/useItemControl.d.ts.map +0 -1
- package/src/listItem/ListItem.css +0 -212
- package/src/listItem/ListItem.less +0 -210
- package/src/listItem/ListItem.spec.tsx +0 -35
- package/src/listItem/ListItem.story.tsx +0 -461
- package/src/listItem/ListItem.tsx +0 -282
- package/src/listItem/ListItemAdditionalInfo.tsx +0 -31
- package/src/listItem/ListItemButton.spec.tsx +0 -92
- package/src/listItem/ListItemButton.tsx +0 -24
- package/src/listItem/ListItemCheckbox.tsx +0 -14
- package/src/listItem/ListItemIconButton.tsx +0 -16
- package/src/listItem/ListItemMedia.tsx +0 -52
- package/src/listItem/ListItemNavigation.tsx +0 -23
- package/src/listItem/ListItemSwitch.tsx +0 -8
- package/src/listItem/index.ts +0 -10
- package/src/listItem/prompt/Prompt.spec.tsx +0 -77
- package/src/listItem/prompt/Prompt.story.tsx +0 -170
- package/src/listItem/prompt/Prompt.tsx +0 -44
- package/src/listItem/useItemControl.tsx +0 -23
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
.wds-list-item {
|
|
2
|
-
list-style: none;
|
|
3
|
-
width: 100%;
|
|
4
|
-
padding: 0;
|
|
5
|
-
border-radius: var(--radius-medium);
|
|
6
|
-
background-color: var(--color-background-screen);
|
|
7
|
-
gap: var(--size-16);
|
|
8
|
-
|
|
9
|
-
.partially-interactive {
|
|
10
|
-
padding: var(--size-16);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
label, a {
|
|
14
|
-
padding: var(--size-16);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&-interactive {
|
|
18
|
-
label {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
}
|
|
21
|
-
&:hover {
|
|
22
|
-
background-color: var(--color-background-screen-hover);
|
|
23
|
-
.wds-list-item-control {
|
|
24
|
-
.wds-Button {
|
|
25
|
-
background-color: var(--Button-background-hover);
|
|
26
|
-
color: var(--Button-color-hover);
|
|
27
|
-
transition: none;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
&:active {
|
|
32
|
-
background-color: var(--color-background-screen-active);
|
|
33
|
-
}
|
|
34
|
-
.wds-list-item-control {
|
|
35
|
-
.wds-Button {
|
|
36
|
-
transition: none;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-media {
|
|
42
|
-
|
|
43
|
-
&-image {
|
|
44
|
-
width: var(--item-media-image-size);
|
|
45
|
-
height: var(--item-media-image-size);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&-body {
|
|
50
|
-
width: 100%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&-title {
|
|
54
|
-
color: var(--color-content-primary);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&-additional-info {
|
|
58
|
-
color: var(--color-content-tertiary);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&-value {
|
|
62
|
-
flex: 0 0 auto;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&-control {
|
|
66
|
-
flex: 0 0 auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&-navigation {
|
|
70
|
-
&, &:hover, &:focus {
|
|
71
|
-
text-decoration: none;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&-spotlight {
|
|
76
|
-
&-active {
|
|
77
|
-
background-color: var(--color-background-neutral);
|
|
78
|
-
&:not(.disabled, :disabled):hover {
|
|
79
|
-
background-color: var(--color-background-neutral-hover);
|
|
80
|
-
}
|
|
81
|
-
&:not(.disabled, :disabled):active {
|
|
82
|
-
background-color: var(--color-background-neutral-active);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&-inactive {
|
|
87
|
-
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
88
|
-
border: 1px dashed var(--color-border-neutral);
|
|
89
|
-
&:not(.disabled, :disabled):hover {
|
|
90
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
91
|
-
}
|
|
92
|
-
&:not(.disabled, :disabled):active {
|
|
93
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&-prompt {
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
padding-top: calc(var(--padding-x-small) / 2);
|
|
101
|
-
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
102
|
-
padding-left: calc(var(--padding-x-small) - 1px);
|
|
103
|
-
padding-right: var(--padding-x-small);
|
|
104
|
-
border-radius: var(--radius-small);
|
|
105
|
-
word-break: break-word;
|
|
106
|
-
overflow-wrap: break-word;
|
|
107
|
-
|
|
108
|
-
.np-prompt-icon {
|
|
109
|
-
padding-right: calc(var(--size-12) / 2);
|
|
110
|
-
padding-top: calc(var(--size-4) - 1px);
|
|
111
|
-
padding-bottom: calc(var(--size-4) - 1px);
|
|
112
|
-
|
|
113
|
-
.tw-icon-tags,
|
|
114
|
-
.tw-icon-confetti {
|
|
115
|
-
color: var(--color-sentiment-positive-primary);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
a {
|
|
120
|
-
text-underline-offset: calc(var(--size-4) / 2);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&.np-prompt-interactive {
|
|
124
|
-
text-decoration: none;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
border: none;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&.negative {
|
|
130
|
-
background-color: var(--color-sentiment-negative-secondary);
|
|
131
|
-
color: var(--color-sentiment-negative-primary);
|
|
132
|
-
a {
|
|
133
|
-
color: var(--color-sentiment-negative-primary);
|
|
134
|
-
&:hover {
|
|
135
|
-
color: var(--color-sentiment-negative-primary-hover);
|
|
136
|
-
}
|
|
137
|
-
&:active {
|
|
138
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
.np-prompt-interactive& {
|
|
142
|
-
&:hover {
|
|
143
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
|
|
144
|
-
}
|
|
145
|
-
&:active {
|
|
146
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
&.positive,
|
|
151
|
-
&.discount,
|
|
152
|
-
&.savings {
|
|
153
|
-
background-color: var(--color-sentiment-positive-secondary);
|
|
154
|
-
color: var(--color-sentiment-positive-primary);
|
|
155
|
-
a {
|
|
156
|
-
color: var(--color-sentiment-positive-primary);
|
|
157
|
-
&:hover {
|
|
158
|
-
color: var(--color-sentiment-positive-primary-hover);
|
|
159
|
-
}
|
|
160
|
-
&:active {
|
|
161
|
-
color: var(--color-sentiment-positive-primary-active);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
.np-prompt-interactive& {
|
|
165
|
-
&:hover {
|
|
166
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
|
|
167
|
-
}
|
|
168
|
-
&:active {
|
|
169
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
&.neutral {
|
|
174
|
-
background-color: var(--color-background-neutral);
|
|
175
|
-
color: var(--color-content-primary);
|
|
176
|
-
a {
|
|
177
|
-
color: var(--color-content-primary);
|
|
178
|
-
}
|
|
179
|
-
.np-prompt-interactive& {
|
|
180
|
-
&:hover {
|
|
181
|
-
background-color: var(--color-background-neutral-hover);
|
|
182
|
-
}
|
|
183
|
-
&:active {
|
|
184
|
-
background-color: var(--color-background-neutral-active);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
&.warning {
|
|
189
|
-
background-color: var(--color-sentiment-warning-secondary);
|
|
190
|
-
color: var(--color-sentiment-warning-content);
|
|
191
|
-
a {
|
|
192
|
-
color: var(--color-sentiment-warning-content);
|
|
193
|
-
&:hover {
|
|
194
|
-
color: var(--color-sentiment-warning-content-hover);
|
|
195
|
-
}
|
|
196
|
-
&:active {
|
|
197
|
-
color: var(--color-sentiment-warning-content-active);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
.np-prompt-interactive& {
|
|
201
|
-
&:hover {
|
|
202
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
|
|
203
|
-
}
|
|
204
|
-
&:active {
|
|
205
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '../test-utils';
|
|
2
|
-
import ListItem from './ListItem';
|
|
3
|
-
|
|
4
|
-
describe('ListItem', () => {
|
|
5
|
-
describe('spotlight', () => {
|
|
6
|
-
it('only fully interactive variant can have spotlight:active', () => {
|
|
7
|
-
render(<ListItem title="Test Title" spotlight="active" control={<ListItem.Navigation />} />);
|
|
8
|
-
const listItem = screen.getByRole('listitem');
|
|
9
|
-
expect(listItem).toHaveClass('wds-list-item-interactive');
|
|
10
|
-
expect(listItem).toHaveClass('wds-list-item-spotlight-active');
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('only fully interactive variant can have spotlight:inactive', () => {
|
|
14
|
-
render(
|
|
15
|
-
<ListItem
|
|
16
|
-
title="Test Title"
|
|
17
|
-
spotlight="inactive"
|
|
18
|
-
control={<ListItem.Switch onClick={() => {}} />}
|
|
19
|
-
/>,
|
|
20
|
-
);
|
|
21
|
-
const listItem = screen.getByRole('listitem');
|
|
22
|
-
expect(listItem).toHaveClass('wds-list-item-interactive');
|
|
23
|
-
expect(listItem).toHaveClass('wds-list-item-spotlight-inactive');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('non interactive variant can have spotlight', () => {
|
|
27
|
-
render(<ListItem title="Test Title" spotlight="inactive" />);
|
|
28
|
-
const listItem = screen.getByRole('listitem');
|
|
29
|
-
expect(listItem).toHaveClass('wds-list-item-non-interactive');
|
|
30
|
-
expect(listItem).not.toHaveClass('wds-list-item-interactive');
|
|
31
|
-
expect(listItem).not.toHaveClass('wds-list-item-spotlight-inactive');
|
|
32
|
-
expect(listItem).not.toHaveClass('wds-list-item-spotlight-active');
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
import ListItem, { Props as ItemProps } from './ListItem';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
Bank,
|
|
6
|
-
BankTransfer,
|
|
7
|
-
FastFlag,
|
|
8
|
-
MultiCurrency,
|
|
9
|
-
Plus,
|
|
10
|
-
Receipt,
|
|
11
|
-
Savings,
|
|
12
|
-
} from '@transferwise/icons';
|
|
13
|
-
|
|
14
|
-
import { lorem10, lorem20, lorem40, lorem5 } from '../test-utils';
|
|
15
|
-
import { Flag } from '@wise/art';
|
|
16
|
-
import { List } from '../legacylistItem/List';
|
|
17
|
-
import Money from '../money';
|
|
18
|
-
import Section from '../section';
|
|
19
|
-
import Header from '../header';
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
component: ListItem,
|
|
23
|
-
title: 'Content/ListItem',
|
|
24
|
-
} satisfies Meta<ItemProps>;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<ItemProps>;
|
|
27
|
-
|
|
28
|
-
// TODO: delete this story later when we have more peace of the List Item puzzle
|
|
29
|
-
export const TempPlayground: Story = {
|
|
30
|
-
render: () => {
|
|
31
|
-
const [checked, setChecked] = useState(false);
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div>
|
|
35
|
-
<ListItem
|
|
36
|
-
media={
|
|
37
|
-
<ListItem.AvatarView badge={{ type: 'action' }}>
|
|
38
|
-
<Flag code="BBD" />
|
|
39
|
-
</ListItem.AvatarView>
|
|
40
|
-
}
|
|
41
|
-
title="Test title"
|
|
42
|
-
subtitle="Test subtitle"
|
|
43
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem10}</ListItem.AdditionalInfo>}
|
|
44
|
-
/>
|
|
45
|
-
<ListItem
|
|
46
|
-
media={
|
|
47
|
-
<ListItem.AvatarLayout
|
|
48
|
-
avatars={[{ asset: <Flag code="BBD" /> }, { asset: <Flag code="MXN" /> }]}
|
|
49
|
-
/>
|
|
50
|
-
}
|
|
51
|
-
title="Test title"
|
|
52
|
-
subtitle={lorem10}
|
|
53
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
54
|
-
/>
|
|
55
|
-
<ListItem
|
|
56
|
-
media={
|
|
57
|
-
<ListItem.AvatarLayout
|
|
58
|
-
size={72}
|
|
59
|
-
orientation="diagonal"
|
|
60
|
-
avatars={[{ asset: <Flag code="BBD" /> }, { asset: <Flag code="MXN" /> }]}
|
|
61
|
-
/>
|
|
62
|
-
}
|
|
63
|
-
title="Test title"
|
|
64
|
-
subtitle={lorem10}
|
|
65
|
-
valueTitle="100 GBP"
|
|
66
|
-
valueSubtitle="100 USD"
|
|
67
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
68
|
-
/>
|
|
69
|
-
<ListItem
|
|
70
|
-
media={<ListItem.AvatarView profileType="BUSINESS" notification />}
|
|
71
|
-
title="Test title"
|
|
72
|
-
subtitle="Test subtitle"
|
|
73
|
-
additionalInfo={
|
|
74
|
-
<ListItem.AdditionalInfo
|
|
75
|
-
action={{ label: 'Learn more', href: 'https://wise.com', target: '_blank' }}
|
|
76
|
-
>
|
|
77
|
-
{lorem10}
|
|
78
|
-
</ListItem.AdditionalInfo>
|
|
79
|
-
}
|
|
80
|
-
prompt={<ListItem.Prompt type="negative">You have done something wrong</ListItem.Prompt>}
|
|
81
|
-
/>
|
|
82
|
-
<ListItem
|
|
83
|
-
media={<ListItem.AvatarView imgSrc="../avatar-square-dude.webp" selected />}
|
|
84
|
-
title="Test title"
|
|
85
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem10}</ListItem.AdditionalInfo>}
|
|
86
|
-
prompt={
|
|
87
|
-
<ListItem.Prompt
|
|
88
|
-
type="discount"
|
|
89
|
-
action={{
|
|
90
|
-
href: 'https://wise.com',
|
|
91
|
-
target: '_blank',
|
|
92
|
-
'aria-label': 'clickable prompt',
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
The whole prompt is secretly clickable
|
|
96
|
-
</ListItem.Prompt>
|
|
97
|
-
}
|
|
98
|
-
/>
|
|
99
|
-
|
|
100
|
-
<ListItem
|
|
101
|
-
media={<ListItem.Image src="../apple-pay-logo.svg" />}
|
|
102
|
-
title="Accepting Apple Pay"
|
|
103
|
-
subtitle={lorem10}
|
|
104
|
-
/>
|
|
105
|
-
|
|
106
|
-
<ListItem
|
|
107
|
-
media={<ListItem.Image src="../wise-card.svg" />}
|
|
108
|
-
title="Wise Business Card"
|
|
109
|
-
subtitle={lorem5}
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
<ListItem
|
|
113
|
-
title="Test title"
|
|
114
|
-
disabled
|
|
115
|
-
subtitle={lorem10}
|
|
116
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
117
|
-
control={<ListItem.Button priority="secondary-neutral">as Button</ListItem.Button>}
|
|
118
|
-
/>
|
|
119
|
-
<ListItem
|
|
120
|
-
title="Test title"
|
|
121
|
-
disabled
|
|
122
|
-
subtitle={lorem10}
|
|
123
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
124
|
-
control={
|
|
125
|
-
<ListItem.IconButton>
|
|
126
|
-
<Plus />
|
|
127
|
-
</ListItem.IconButton>
|
|
128
|
-
}
|
|
129
|
-
/>
|
|
130
|
-
|
|
131
|
-
<ListItem
|
|
132
|
-
title="Test title"
|
|
133
|
-
subtitle={lorem10}
|
|
134
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
135
|
-
control={
|
|
136
|
-
<ListItem.Button
|
|
137
|
-
priority="secondary-neutral"
|
|
138
|
-
as="a"
|
|
139
|
-
target="dfdf"
|
|
140
|
-
aria-label="adsfasfd"
|
|
141
|
-
href="wise.com"
|
|
142
|
-
>
|
|
143
|
-
as Link
|
|
144
|
-
</ListItem.Button>
|
|
145
|
-
}
|
|
146
|
-
/>
|
|
147
|
-
|
|
148
|
-
<ListItem
|
|
149
|
-
media={
|
|
150
|
-
<ListItem.AvatarView>
|
|
151
|
-
<Bank />
|
|
152
|
-
</ListItem.AvatarView>
|
|
153
|
-
}
|
|
154
|
-
spotlight="inactive"
|
|
155
|
-
title="Test title"
|
|
156
|
-
subtitle={lorem5}
|
|
157
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem10}</ListItem.AdditionalInfo>}
|
|
158
|
-
control={<ListItem.Checkbox indeterminate />}
|
|
159
|
-
className="m-t-2"
|
|
160
|
-
/>
|
|
161
|
-
|
|
162
|
-
<ListItem
|
|
163
|
-
media={
|
|
164
|
-
<ListItem.AvatarLayout
|
|
165
|
-
orientation="diagonal"
|
|
166
|
-
avatars={[{ asset: <BankTransfer /> }, { asset: <Bank /> }]}
|
|
167
|
-
/>
|
|
168
|
-
}
|
|
169
|
-
spotlight="active"
|
|
170
|
-
title="Test title"
|
|
171
|
-
subtitle={lorem5}
|
|
172
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem10}</ListItem.AdditionalInfo>}
|
|
173
|
-
control={
|
|
174
|
-
<ListItem.Switch
|
|
175
|
-
checked={checked}
|
|
176
|
-
onClick={() => {
|
|
177
|
-
setChecked(!checked);
|
|
178
|
-
}}
|
|
179
|
-
/>
|
|
180
|
-
}
|
|
181
|
-
className="m-t-2 m-b-4"
|
|
182
|
-
/>
|
|
183
|
-
</div>
|
|
184
|
-
);
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export const Navigation: Story = {
|
|
189
|
-
render: () => (
|
|
190
|
-
<div>
|
|
191
|
-
<ListItem
|
|
192
|
-
media={
|
|
193
|
-
<ListItem.AvatarView>
|
|
194
|
-
<MultiCurrency />
|
|
195
|
-
</ListItem.AvatarView>
|
|
196
|
-
}
|
|
197
|
-
title="Test title"
|
|
198
|
-
subtitle={lorem5}
|
|
199
|
-
control={
|
|
200
|
-
<ListItem.Navigation
|
|
201
|
-
onClick={() => {
|
|
202
|
-
console.log('clicked');
|
|
203
|
-
}}
|
|
204
|
-
/>
|
|
205
|
-
}
|
|
206
|
-
className="m-b-2"
|
|
207
|
-
/>
|
|
208
|
-
|
|
209
|
-
<ListItem
|
|
210
|
-
media={
|
|
211
|
-
<ListItem.AvatarView>
|
|
212
|
-
<MultiCurrency />
|
|
213
|
-
</ListItem.AvatarView>
|
|
214
|
-
}
|
|
215
|
-
spotlight="inactive"
|
|
216
|
-
title="Test title"
|
|
217
|
-
subtitle={lorem5}
|
|
218
|
-
control={
|
|
219
|
-
<ListItem.Navigation
|
|
220
|
-
onClick={() => {
|
|
221
|
-
console.log('clicked');
|
|
222
|
-
}}
|
|
223
|
-
/>
|
|
224
|
-
}
|
|
225
|
-
className="m-b-2"
|
|
226
|
-
/>
|
|
227
|
-
|
|
228
|
-
<ListItem
|
|
229
|
-
media={
|
|
230
|
-
<ListItem.AvatarView>
|
|
231
|
-
<MultiCurrency />
|
|
232
|
-
</ListItem.AvatarView>
|
|
233
|
-
}
|
|
234
|
-
spotlight="inactive"
|
|
235
|
-
title="Test title"
|
|
236
|
-
subtitle={lorem5}
|
|
237
|
-
control={<ListItem.Navigation href="https://wise.com" target="_blank" />}
|
|
238
|
-
className="m-b-2"
|
|
239
|
-
/>
|
|
240
|
-
|
|
241
|
-
<ListItem
|
|
242
|
-
media={
|
|
243
|
-
<ListItem.AvatarView>
|
|
244
|
-
<MultiCurrency />
|
|
245
|
-
</ListItem.AvatarView>
|
|
246
|
-
}
|
|
247
|
-
disabled
|
|
248
|
-
title="Test title"
|
|
249
|
-
subtitle={lorem5}
|
|
250
|
-
control={
|
|
251
|
-
<ListItem.Navigation
|
|
252
|
-
onClick={() => {
|
|
253
|
-
console.log('clicked');
|
|
254
|
-
}}
|
|
255
|
-
/>
|
|
256
|
-
}
|
|
257
|
-
className="m-b-2"
|
|
258
|
-
/>
|
|
259
|
-
|
|
260
|
-
<ListItem
|
|
261
|
-
media={
|
|
262
|
-
<ListItem.AvatarView>
|
|
263
|
-
<MultiCurrency />
|
|
264
|
-
</ListItem.AvatarView>
|
|
265
|
-
}
|
|
266
|
-
spotlight="inactive"
|
|
267
|
-
disabled
|
|
268
|
-
title="Test title"
|
|
269
|
-
subtitle={lorem5}
|
|
270
|
-
control={
|
|
271
|
-
<ListItem.Navigation
|
|
272
|
-
onClick={() => {
|
|
273
|
-
console.log('clicked');
|
|
274
|
-
}}
|
|
275
|
-
/>
|
|
276
|
-
}
|
|
277
|
-
className="m-b-2"
|
|
278
|
-
/>
|
|
279
|
-
|
|
280
|
-
<ListItem
|
|
281
|
-
media={
|
|
282
|
-
<ListItem.AvatarView>
|
|
283
|
-
<MultiCurrency />
|
|
284
|
-
</ListItem.AvatarView>
|
|
285
|
-
}
|
|
286
|
-
spotlight="inactive"
|
|
287
|
-
disabled
|
|
288
|
-
title="Test title"
|
|
289
|
-
subtitle={lorem5}
|
|
290
|
-
control={<ListItem.Navigation href="https://wise.com" target="_blank" />}
|
|
291
|
-
className="m-b-2"
|
|
292
|
-
/>
|
|
293
|
-
</div>
|
|
294
|
-
),
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
export const Radio: Story = {
|
|
298
|
-
render: () => (
|
|
299
|
-
<div>
|
|
300
|
-
{/* Basic */}
|
|
301
|
-
{/* with additional info */}
|
|
302
|
-
{/* with prompt */}
|
|
303
|
-
{/* Disabled */}
|
|
304
|
-
{/* Spotlight */}
|
|
305
|
-
{/* Active */}
|
|
306
|
-
</div>
|
|
307
|
-
),
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
export const Button: Story = {
|
|
311
|
-
render: () => (
|
|
312
|
-
<div>
|
|
313
|
-
{/* Basic */}
|
|
314
|
-
{/* with additional info */}
|
|
315
|
-
{/* with prompt */}
|
|
316
|
-
{/* partially interactive */}
|
|
317
|
-
{/* Disabled */}
|
|
318
|
-
{/* Spotlight */}
|
|
319
|
-
{/* Active */}
|
|
320
|
-
</div>
|
|
321
|
-
),
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
export const NonInteractive: Story = {
|
|
325
|
-
render: () => (
|
|
326
|
-
<div>
|
|
327
|
-
<Section>
|
|
328
|
-
<Header title="Transcation Details" />
|
|
329
|
-
<List>
|
|
330
|
-
<ListItem
|
|
331
|
-
media={
|
|
332
|
-
<ListItem.AvatarView>
|
|
333
|
-
<MultiCurrency />
|
|
334
|
-
</ListItem.AvatarView>
|
|
335
|
-
}
|
|
336
|
-
title="Estimated costs"
|
|
337
|
-
subtitle="Other providers"
|
|
338
|
-
valueTitle={<Money amount={100} currency="GBP" />}
|
|
339
|
-
/>
|
|
340
|
-
<ListItem
|
|
341
|
-
media={
|
|
342
|
-
<ListItem.AvatarView>
|
|
343
|
-
<FastFlag />
|
|
344
|
-
</ListItem.AvatarView>
|
|
345
|
-
}
|
|
346
|
-
title="Total paid"
|
|
347
|
-
subtitle="Wise"
|
|
348
|
-
valueTitle={<Money amount={12.15} currency="GBP" />}
|
|
349
|
-
valueSubtitle={<Money amount={100.9} currency="GBP" />}
|
|
350
|
-
/>
|
|
351
|
-
<ListItem
|
|
352
|
-
media={
|
|
353
|
-
<ListItem.AvatarView>
|
|
354
|
-
<Receipt />
|
|
355
|
-
</ListItem.AvatarView>
|
|
356
|
-
}
|
|
357
|
-
title="Total fees"
|
|
358
|
-
subtitle={lorem5}
|
|
359
|
-
valueSubtitle={<Money amount={5.5} currency="GBP" />}
|
|
360
|
-
/>
|
|
361
|
-
<ListItem
|
|
362
|
-
media={
|
|
363
|
-
<ListItem.AvatarView>
|
|
364
|
-
<Savings />
|
|
365
|
-
</ListItem.AvatarView>
|
|
366
|
-
}
|
|
367
|
-
title="You saved"
|
|
368
|
-
valueSubtitle={<Money amount={1000} currency="GBP" />}
|
|
369
|
-
/>
|
|
370
|
-
</List>
|
|
371
|
-
</Section>
|
|
372
|
-
|
|
373
|
-
<ListItem
|
|
374
|
-
as="div"
|
|
375
|
-
title="Bank name and address"
|
|
376
|
-
subtitle="Bank Ltd, 2 Street Boulevard, Singapore, 1213423"
|
|
377
|
-
additionalInfo={
|
|
378
|
-
<ListItem.AdditionalInfo
|
|
379
|
-
action={{ label: 'Learn more', href: 'https://wise.com', target: '_blank' }}
|
|
380
|
-
>
|
|
381
|
-
This is our partner bank in Singapore.
|
|
382
|
-
</ListItem.AdditionalInfo>
|
|
383
|
-
}
|
|
384
|
-
/>
|
|
385
|
-
<ListItem
|
|
386
|
-
as="div"
|
|
387
|
-
title="Bank name and address"
|
|
388
|
-
subtitle="Capital Ltd, 2 Canal Street, London, E14 111"
|
|
389
|
-
additionalInfo={
|
|
390
|
-
<ListItem.AdditionalInfo
|
|
391
|
-
action={{ label: 'Learn more', href: 'https://wise.com', target: '_blank' }}
|
|
392
|
-
/>
|
|
393
|
-
}
|
|
394
|
-
/>
|
|
395
|
-
{/* Basic */}
|
|
396
|
-
{/* with additional info */}
|
|
397
|
-
{/* with prompt */}
|
|
398
|
-
{/* Disabled */}
|
|
399
|
-
{/* Spotlight */}
|
|
400
|
-
{/* Active */}
|
|
401
|
-
</div>
|
|
402
|
-
),
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
export const ButtonInteractivity: Story = {
|
|
406
|
-
render: () => {
|
|
407
|
-
const [clicked, setClicked] = useState(0);
|
|
408
|
-
|
|
409
|
-
return (
|
|
410
|
-
<>
|
|
411
|
-
<label>Count: {clicked}</label>
|
|
412
|
-
<ListItem
|
|
413
|
-
title="Fully interactive"
|
|
414
|
-
subtitle={lorem10}
|
|
415
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
416
|
-
control={
|
|
417
|
-
<ListItem.Button priority="secondary-neutral" onClick={() => setClicked(clicked + 1)}>
|
|
418
|
-
as Button
|
|
419
|
-
</ListItem.Button>
|
|
420
|
-
}
|
|
421
|
-
/>
|
|
422
|
-
<ListItem
|
|
423
|
-
title="Partially interactive"
|
|
424
|
-
subtitle={lorem10}
|
|
425
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
426
|
-
control={
|
|
427
|
-
<ListItem.Button
|
|
428
|
-
priority="secondary-neutral"
|
|
429
|
-
partiallyInteractive
|
|
430
|
-
onClick={() => setClicked(clicked + 1)}
|
|
431
|
-
>
|
|
432
|
-
as Button
|
|
433
|
-
</ListItem.Button>
|
|
434
|
-
}
|
|
435
|
-
/>
|
|
436
|
-
<ListItem
|
|
437
|
-
title="Fully interactive"
|
|
438
|
-
subtitle={lorem10}
|
|
439
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
440
|
-
control={
|
|
441
|
-
<ListItem.IconButton onClick={() => setClicked(clicked + 1)}>
|
|
442
|
-
<Plus />
|
|
443
|
-
</ListItem.IconButton>
|
|
444
|
-
}
|
|
445
|
-
/>
|
|
446
|
-
<ListItem
|
|
447
|
-
title="Partially interactive"
|
|
448
|
-
subtitle={lorem10}
|
|
449
|
-
additionalInfo={<ListItem.AdditionalInfo>{lorem20}</ListItem.AdditionalInfo>}
|
|
450
|
-
control={
|
|
451
|
-
<ListItem.IconButton partiallyInteractive onClick={() => setClicked(clicked + 1)}>
|
|
452
|
-
<Plus />
|
|
453
|
-
</ListItem.IconButton>
|
|
454
|
-
}
|
|
455
|
-
/>
|
|
456
|
-
</>
|
|
457
|
-
);
|
|
458
|
-
},
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
// add intaces with dark mode
|