@transferwise/components 0.0.0-experimental-06b4575 → 0.0.0-experimental-7fec974
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/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -1
- package/build/field/Field.js +1 -0
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +1 -0
- package/build/field/Field.mjs.map +1 -1
- package/build/header/Header.js +1 -1
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/header/Header.mjs.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +1 -0
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +1 -0
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +31 -0
- package/build/prompt/InfoPrompt/InfoPrompt.js +113 -0
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -0
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +111 -0
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/slidingPanel/SlidingPanel.js.map +1 -1
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
- package/build/styles/main.css +31 -0
- package/build/styles/prompt/InfoPrompt/InfoPrompt.css +31 -0
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableCell.mjs.map +1 -1
- package/build/tabs/Tabs.js +1 -1
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +1 -1
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +1 -0
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +1 -0
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/SearchInput.d.ts.map +1 -1
- package/build/types/inputs/TextArea.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/PrimitiveButton.types.d.ts.map +1 -1
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts +56 -0
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -0
- package/build/types/prompt/InfoPrompt/index.d.ts +3 -0
- package/build/types/prompt/InfoPrompt/index.d.ts.map +1 -0
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +5 -5
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +2 -0
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts.map +1 -1
- package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
- package/build/types/table/TableCell.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/uploadInput/UploadInput.js +1 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +3 -3
- package/src/actionButton/ActionButton.story.tsx +9 -2
- package/src/avatar/Avatar.story.tsx +8 -2
- package/src/avatarLayout/AvatarLayout.story.tsx +3 -3
- package/src/avatarView/AvatarView.story.tsx +29 -24
- package/src/button/_stories/Button.test.story.tsx +10 -5
- package/src/checkbox/Checkbox.story.tsx +16 -3
- package/src/circularButton/CircularButton.story.tsx +7 -2
- package/src/common/bottomSheet/BottomSheet.story.tsx +32 -6
- package/src/common/circle/Circle.story.tsx +14 -3
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +16 -3
- package/src/dateInput/DateInput.test.story.tsx +13 -3
- package/src/dateLookup/DateLookup.story.tsx +7 -9
- package/src/dateLookup/monthCalendar/table/MonthCalendarTable.tsx +1 -5
- package/src/dateLookup/yearCalendar/table/YearCalendarTable.tsx +1 -1
- package/src/header/Header.test.story.tsx +10 -5
- package/src/header/Header.tsx +1 -1
- package/src/index.ts +2 -1
- package/src/info/Info.story.tsx +20 -4
- package/src/inputs/Input.tsx +8 -9
- package/src/inputs/SearchInput.tsx +8 -9
- package/src/inputs/TextArea.tsx +6 -7
- package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +7 -2
- package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +7 -2
- package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +7 -2
- package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +7 -2
- package/src/main.css +31 -0
- package/src/main.less +2 -1
- package/src/modal/Modal.story.tsx +31 -6
- package/src/primitives/PrimitiveAnchor/PrimitiveAnchor.types.ts +1 -3
- package/src/primitives/PrimitiveButton/PrimitiveButton.types.ts +1 -3
- package/src/prompt/ActionPrompt/ActionPrompt.less +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +7 -2
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +2 -7
- package/src/prompt/InfoPrompt/InfoPrompt.css +31 -0
- package/src/prompt/InfoPrompt/InfoPrompt.less +37 -0
- package/src/prompt/InfoPrompt/InfoPrompt.story.tsx +312 -0
- package/src/prompt/InfoPrompt/InfoPrompt.test.story.tsx +246 -0
- package/src/prompt/InfoPrompt/InfoPrompt.test.tsx +224 -0
- package/src/prompt/InfoPrompt/InfoPrompt.tsx +148 -0
- package/src/prompt/InfoPrompt/index.ts +2 -0
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +1 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +5 -5
- package/src/prompt/index.ts +5 -0
- package/src/radioOption/RadioOption.tsx +2 -1
- package/src/select/Select.story.tsx +1 -1
- package/src/slidingPanel/SlidingPanel.tsx +4 -2
- package/src/snackbar/Snackbar.test.story.tsx +32 -6
- package/src/ssr.test.tsx +1 -0
- package/src/statusIcon/StatusIcon.story.tsx +9 -5
- package/src/table/TableCell.tsx +1 -3
- package/src/tabs/Tabs.tsx +1 -1
- package/src/tooltip/Tooltip.story.tsx +7 -2
- package/src/uploadInput/UploadInput.tsx +1 -1
- package/src/withDisplayFormat/WithDisplayFormat.tsx +13 -14
|
@@ -6,8 +6,10 @@ import { Position } from '../common';
|
|
|
6
6
|
|
|
7
7
|
export const EXIT_ANIMATION = 350;
|
|
8
8
|
|
|
9
|
-
export interface SlidingPanelProps
|
|
10
|
-
|
|
9
|
+
export interface SlidingPanelProps extends Pick<
|
|
10
|
+
React.ComponentPropsWithRef<'div'>,
|
|
11
|
+
'ref' | 'className' | 'children'
|
|
12
|
+
> {
|
|
11
13
|
position?: `${Position.TOP | Position.RIGHT | Position.BOTTOM | Position.LEFT}`;
|
|
12
14
|
open: boolean;
|
|
13
15
|
showSlidingPanelBorder?: boolean;
|
|
@@ -7,7 +7,7 @@ import SnackbarProvider from './SnackbarProvider';
|
|
|
7
7
|
import Button from '../button';
|
|
8
8
|
import CheckboxOption from '../checkboxOption';
|
|
9
9
|
import { wait } from '../test-utils/wait';
|
|
10
|
-
import {
|
|
10
|
+
import { allModes } from '../../.storybook/modes';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Dialogs/Snackbar/Tests',
|
|
@@ -115,7 +115,12 @@ export const Mobile = {
|
|
|
115
115
|
</div>
|
|
116
116
|
) as React.ReactNode,
|
|
117
117
|
},
|
|
118
|
-
|
|
118
|
+
parameters: {
|
|
119
|
+
variants: ['mobile'],
|
|
120
|
+
chromatic: {
|
|
121
|
+
mobile: allModes.largeMobile,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
119
124
|
};
|
|
120
125
|
|
|
121
126
|
const switchToDarkMode = async (context: { canvasElement: HTMLElement }) => {
|
|
@@ -147,7 +152,12 @@ export const DarkMode = {
|
|
|
147
152
|
) as React.ReactNode,
|
|
148
153
|
},
|
|
149
154
|
play: switchToDarkMode,
|
|
150
|
-
|
|
155
|
+
parameters: {
|
|
156
|
+
variants: ['dark'],
|
|
157
|
+
chromatic: {
|
|
158
|
+
dark: allModes.dark,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
151
161
|
};
|
|
152
162
|
|
|
153
163
|
const switchToRTL = async (context: { canvasElement: HTMLElement }) => {
|
|
@@ -199,7 +209,12 @@ export const RTL = {
|
|
|
199
209
|
) as React.ReactNode,
|
|
200
210
|
},
|
|
201
211
|
play: switchToRTL,
|
|
202
|
-
|
|
212
|
+
parameters: {
|
|
213
|
+
variants: ['rtl'],
|
|
214
|
+
chromatic: {
|
|
215
|
+
rtl: allModes.rtl,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
203
218
|
};
|
|
204
219
|
|
|
205
220
|
export const RTLMobile = {
|
|
@@ -208,7 +223,13 @@ export const RTLMobile = {
|
|
|
208
223
|
...RTL.args,
|
|
209
224
|
},
|
|
210
225
|
play: switchToRTL,
|
|
211
|
-
|
|
226
|
+
parameters: {
|
|
227
|
+
variants: ['rtl', 'mobile'],
|
|
228
|
+
chromatic: {
|
|
229
|
+
rtl: allModes.rtl,
|
|
230
|
+
mobile: allModes.largeMobile,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
212
233
|
};
|
|
213
234
|
|
|
214
235
|
export const Zoom400 = {
|
|
@@ -233,7 +254,12 @@ export const Zoom400 = {
|
|
|
233
254
|
</div>
|
|
234
255
|
),
|
|
235
256
|
},
|
|
236
|
-
|
|
257
|
+
parameters: {
|
|
258
|
+
variants: ['400%'],
|
|
259
|
+
chromatic: {
|
|
260
|
+
zoom400: allModes.zoom400,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
237
263
|
};
|
|
238
264
|
|
|
239
265
|
export const MultipleClicks = {
|
package/src/ssr.test.tsx
CHANGED
|
@@ -91,6 +91,7 @@ describe('Server side rendering', () => {
|
|
|
91
91
|
|
|
92
92
|
// stick all possible properties we might need to render all components in here
|
|
93
93
|
const allProps: Record<string, unknown> = {
|
|
94
|
+
actionPrimary: { label: 'Action', onClick: jest.fn(), href: '#' },
|
|
94
95
|
currencies: [],
|
|
95
96
|
currencySelector: { options: [] },
|
|
96
97
|
steps: [],
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
3
3
|
import { Sentiment, Size, Status } from '../common';
|
|
4
4
|
|
|
5
5
|
import StatusIcon, { StatusIconSentiment } from './StatusIcon';
|
|
6
|
-
import {
|
|
6
|
+
import { allModes } from '../../.storybook/modes';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
component: StatusIcon,
|
|
@@ -30,11 +30,15 @@ export const Presentational: Story = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const Variants: Story = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
parameters: {
|
|
34
|
+
padding: '0',
|
|
35
|
+
variants: ['default', 'dark', 'bright-green', 'forest-green'],
|
|
36
|
+
chromatic: {
|
|
37
|
+
dark: allModes.dark,
|
|
38
|
+
brightGreen: allModes.brightGreen,
|
|
39
|
+
forestGreen: allModes.forestGreen,
|
|
36
40
|
},
|
|
37
|
-
}
|
|
41
|
+
},
|
|
38
42
|
render: () => (
|
|
39
43
|
<span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
|
|
40
44
|
{[
|
package/src/table/TableCell.tsx
CHANGED
|
@@ -27,9 +27,7 @@ export interface TableCellMedia extends TableCellTypeProp, TableCellTextProps {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface TableCellLeading
|
|
30
|
-
extends TableCellTypeProp,
|
|
31
|
-
TableCellTextProps,
|
|
32
|
-
TableCellStatusProp {
|
|
30
|
+
extends TableCellTypeProp, TableCellTextProps, TableCellStatusProp {
|
|
33
31
|
avatar?: Pick<AvatarViewProps, 'badge' | 'imgSrc' | 'profileName' | 'profileType'> & {
|
|
34
32
|
asset?: AvatarViewProps['children'];
|
|
35
33
|
/** @deprecated Use `"imgSrc" instead. */
|
package/src/tabs/Tabs.tsx
CHANGED
|
@@ -353,7 +353,7 @@ export default class Tabs extends Component<TabsProps, TabsState> {
|
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
onKeyDown = (index: number) => (event: React.KeyboardEvent<HTMLLIElement>) => {
|
|
356
|
-
if (event
|
|
356
|
+
if (event?.key === 'Enter') {
|
|
357
357
|
this.switchTab(index);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
@@ -4,7 +4,7 @@ import { userEvent, within } from 'storybook/test';
|
|
|
4
4
|
import Button from '../button';
|
|
5
5
|
|
|
6
6
|
import Tooltip from './Tooltip';
|
|
7
|
-
import {
|
|
7
|
+
import { allModes } from '../../.storybook/modes';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
10
|
component: Tooltip,
|
|
@@ -40,5 +40,10 @@ export const OpenedTooltip: Story = {
|
|
|
40
40
|
|
|
41
41
|
export const OpenedTooltipDark: Story = {
|
|
42
42
|
...OpenedTooltip,
|
|
43
|
-
|
|
43
|
+
parameters: {
|
|
44
|
+
variants: ['dark'],
|
|
45
|
+
chromatic: {
|
|
46
|
+
dark: allModes.dark,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
44
49
|
};
|
|
@@ -36,20 +36,19 @@ interface WithDisplayFormatState {
|
|
|
36
36
|
selectionEnd: number;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
> {
|
|
39
|
+
export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps> extends Pick<
|
|
40
|
+
TextElementProps,
|
|
41
|
+
| 'className'
|
|
42
|
+
| 'disabled'
|
|
43
|
+
| 'id'
|
|
44
|
+
| 'maxLength'
|
|
45
|
+
| 'minLength'
|
|
46
|
+
| 'name'
|
|
47
|
+
| 'placeholder'
|
|
48
|
+
| 'readOnly'
|
|
49
|
+
| 'required'
|
|
50
|
+
| 'inputMode'
|
|
51
|
+
> {
|
|
53
52
|
value?: string;
|
|
54
53
|
displayPattern: string;
|
|
55
54
|
/**
|