@transferwise/components 0.0.0-experimental-4553cce → 0.0.0-experimental-03e1dec

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.
Files changed (38) hide show
  1. package/build/index.js +133 -290
  2. package/build/index.js.map +1 -1
  3. package/build/index.mjs +135 -292
  4. package/build/index.mjs.map +1 -1
  5. package/build/types/alert/Alert.d.ts +47 -58
  6. package/build/types/alert/Alert.d.ts.map +1 -1
  7. package/build/types/alert/index.d.ts +2 -1
  8. package/build/types/alert/index.d.ts.map +1 -1
  9. package/build/types/common/propsValues/sentiment.d.ts +0 -1
  10. package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
  11. package/build/types/index.d.ts +1 -1
  12. package/build/types/index.d.ts.map +1 -1
  13. package/build/types/inlineAlert/InlineAlert.d.ts +2 -4
  14. package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
  15. package/build/types/statusIcon/StatusIcon.d.ts +1 -1
  16. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  17. package/package.json +2 -2
  18. package/src/alert/{Alert.spec.js → Alert.spec.tsx} +42 -44
  19. package/src/alert/Alert.story.tsx +1 -2
  20. package/src/alert/Alert.tsx +222 -0
  21. package/src/alert/index.ts +2 -0
  22. package/src/common/propsValues/sentiment.ts +0 -10
  23. package/src/index.ts +1 -1
  24. package/src/inlineAlert/InlineAlert.spec.tsx +0 -7
  25. package/src/inlineAlert/InlineAlert.tsx +19 -47
  26. package/src/statusIcon/StatusIcon.tsx +14 -14
  27. package/build/types/alert/withArrow/alertArrowPositions.d.ts +0 -9
  28. package/build/types/alert/withArrow/alertArrowPositions.d.ts.map +0 -1
  29. package/build/types/alert/withArrow/index.d.ts +0 -3
  30. package/build/types/alert/withArrow/index.d.ts.map +0 -1
  31. package/build/types/alert/withArrow/withArrow.d.ts +0 -11
  32. package/build/types/alert/withArrow/withArrow.d.ts.map +0 -1
  33. package/src/alert/Alert.js +0 -196
  34. package/src/alert/index.js +0 -1
  35. package/src/alert/withArrow/alertArrowPositions.ts +0 -9
  36. package/src/alert/withArrow/index.js +0 -2
  37. package/src/alert/withArrow/withArrow.js +0 -50
  38. package/src/alert/withArrow/withArrow.spec.js +0 -51
@@ -1,58 +1,47 @@
1
- import * as React from 'react';
2
-
3
- export interface AlertAction {
4
- "aria-label"?: string;
5
- href: string;
6
- target?: string;
7
- text: React.ReactNode;
8
- }
9
-
10
- export type AlertType = "negative" | "neutral" | "positive" | "warning" | "info" | "error" | "success";
11
-
12
- export type AlertVariant = "desktop" | "mobile";
13
-
14
- export interface AlertProps {
15
- /**
16
- * An optional call to action to sit under the main body of the alert. If your label is short, use aria-label to provide more context
17
- */
18
- action?: AlertAction;
19
- className?: string;
20
- /**
21
- * An optional icon. If not provided, we will default the icon to something appropriate for the type
22
- */
23
- icon?: React.ReactElement<any>;
24
- /**
25
- * Title for the alert component
26
- */
27
- title?: string;
28
- /**
29
- * The main body of the alert. Accepts plain text and bold words specified with **double stars
30
- */
31
- message?: any;
32
- /**
33
- * The presence of the onDismiss handler will trigger the visibility of the close button
34
- */
35
- onDismiss?: (...args: any[])=>any;
36
- /**
37
- * The type dictates which icon and colour will be used
38
- */
39
- type?: AlertType;
40
- variant?: AlertVariant;
41
- /**
42
- * @deprecated no arrow for `Alert` component anymore, consider to use [`InlineAlert`](https://transferwise.github.io/neptune-web/components/alerts/InlineAlert) component
43
- */
44
- arrow?: any;
45
- /**
46
- * @deprecated use `message` property instead
47
- */
48
- children?: any;
49
- /**
50
- * @deprecated use `onDismiss` instead
51
- */
52
- dismissible?: any;
53
- }
54
-
55
- declare const Alert: React.FC<AlertProps>;
56
-
57
- export default Alert;
58
-
1
+ /// <reference types="react" />
2
+ import { Sentiment, Size, Variant } from '../common';
3
+ export type AlertAction = {
4
+ 'aria-label'?: string;
5
+ href: string;
6
+ target?: string;
7
+ text: React.ReactNode;
8
+ };
9
+ /** @deprecated Use `"top" | "bottom"` instead. */
10
+ type AlertTypeDeprecated = `${Sentiment.SUCCESS | Sentiment.INFO | Sentiment.ERROR}`;
11
+ type AlertTypeResolved = `${Sentiment.POSITIVE | Sentiment.NEUTRAL | Sentiment.WARNING | Sentiment.NEGATIVE}`;
12
+ export type AlertType = AlertTypeResolved | AlertTypeDeprecated;
13
+ export declare enum AlertArrowPosition {
14
+ TOP_LEFT = "up-left",
15
+ TOP = "up-center",
16
+ TOP_RIGHT = "up-right",
17
+ BOTTOM_LEFT = "down-left",
18
+ BOTTOM = "down-center",
19
+ BOTTOM_RIGHT = "down-right"
20
+ }
21
+ export interface AlertProps {
22
+ /** An optional call to action to sit under the main body of the alert. If your label is short, use aria-label to provide more context */
23
+ action?: AlertAction;
24
+ className?: string;
25
+ /** An optional icon. If not provided, we will default the icon to something appropriate for the type */
26
+ icon?: React.ReactElement;
27
+ /** Title for the alert component */
28
+ title?: string;
29
+ /** The main body of the alert. Accepts plain text and bold words specified with **double stars*/
30
+ message?: string;
31
+ /** The presence of the onDismiss handler will trigger the visibility of the close button */
32
+ onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
33
+ /** The type dictates which icon and colour will be used */
34
+ type?: AlertType;
35
+ variant?: `${Variant}`;
36
+ /** @deprecated Use `InlineAlert` instead. */
37
+ arrow?: `${AlertArrowPosition}`;
38
+ /** @deprecated Use `message` instead. Be aware `message` only accepts plain text or text with **bold** markdown. */
39
+ children?: React.ReactNode;
40
+ /** @deprecated Use `onDismiss` instead. */
41
+ dismissible?: boolean;
42
+ /** @deprecated Alert component doesn't support `size` anymore, please remove this prop. */
43
+ size?: `${Size}`;
44
+ }
45
+ export default function Alert({ arrow, action, children, className, dismissible, icon, onDismiss, message, size, title, type, variant, }: AlertProps): import("react").JSX.Element;
46
+ export {};
47
+ //# sourceMappingURL=Alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/alert/Alert.js"],"names":[],"mappings":";AA8BA,gEA2FC"}
1
+ {"version":3,"file":"Alert.d.ts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IACvB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAChC,oHAAoH;IACpH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;CAClB;AAcD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,IAAI,EACJ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,IAAgB,EAChB,OAAmB,GACpB,EAAE,UAAU,+BA8GZ"}
@@ -1,2 +1,3 @@
1
- export { default } from "./Alert";
1
+ export { default } from './Alert';
2
+ export type { AlertProps, AlertAction, AlertArrowPosition, AlertType } from './Alert';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -17,5 +17,4 @@ export declare enum Sentiment {
17
17
  */
18
18
  SUCCESS = "success"
19
19
  }
20
- export type SentimentString = 'negative' | 'neutral' | 'positive' | 'warning' | 'pending' | 'info' | 'error' | 'success';
21
20
  //# sourceMappingURL=sentiment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sentiment.d.ts","sourceRoot":"","sources":["../../../../src/common/propsValues/sentiment.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IAEnB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,CAAC"}
1
+ {"version":3,"file":"sentiment.d.ts","sourceRoot":"","sources":["../../../../src/common/propsValues/sentiment.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IAEnB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,OAAO,YAAY;CACpB"}
@@ -4,6 +4,7 @@
4
4
  export type { AccordionProps, AccordionItem } from './accordion';
5
5
  export type { AvatarProps } from './avatar';
6
6
  export type { ActionOptionProps } from './actionOption';
7
+ export type { AlertProps, AlertAction, AlertArrowPosition, AlertType } from './alert';
7
8
  export type { BadgeProps } from './badge';
8
9
  export type { CircularButtonProps } from './circularButton';
9
10
  export type { DecisionProps } from './decision/Decision';
@@ -147,7 +148,6 @@ export { AvatarType } from './avatar';
147
148
  export { InfoPresentation } from './info';
148
149
  export { UploadStep } from './upload';
149
150
  export { DecisionPresentation, DecisionType } from './decision';
150
- export { AlertArrowPosition } from './alert/withArrow';
151
151
  export { LogoType } from './logo';
152
152
  export { FileType } from './common';
153
153
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,MAAM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EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Sentiment } from '../common';
3
- import { SentimentString } from '../common/propsValues/sentiment';
4
3
  export interface InlineAlertProps {
5
4
  id?: string;
6
- type?: Sentiment | SentimentString;
5
+ type?: `${Sentiment}`;
7
6
  className?: string;
8
7
  children: ReactNode;
9
8
  }
10
- declare const InlineAlert: ({ id, type, className, children }: InlineAlertProps) => import("react").JSX.Element;
11
- export default InlineAlert;
9
+ export default function InlineAlert({ id, type, className, children, }: InlineAlertProps): import("react").JSX.Element;
12
10
  //# sourceMappingURL=InlineAlert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlineAlert.d.ts","sourceRoot":"","sources":["../../../src/inlineAlert/InlineAlert.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAOD,QAAA,MAAM,WAAW,sCAA2D,gBAAgB,gCAmC3F,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"InlineAlert.d.ts","sourceRoot":"","sources":["../../../src/inlineAlert/InlineAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,EAAE,EACF,IAAwB,EACxB,SAAS,EACT,QAAQ,GACT,EAAE,gBAAgB,+BAYlB"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { SizeSmall, SizeMedium, SizeLarge, Sentiment } from '../common';
3
3
  export type StatusIconProps = {
4
- sentiment: Sentiment;
4
+ sentiment: `${Sentiment}`;
5
5
  size: SizeSmall | SizeMedium | SizeLarge;
6
6
  };
7
7
  declare const StatusIcon: ({ sentiment, size }: StatusIconProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAQ,MAAM,WAAW,CAAC;AAE9E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,QAAA,MAAM,UAAU,wBAA2D,eAAe,gCAuBzF,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC;IAC1B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CAC1C,CAAC;AAaF,QAAA,MAAM,UAAU,wBAA4C,eAAe,gCAY1E,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-4553cce",
3
+ "version": "0.0.0-experimental-03e1dec",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -93,8 +93,8 @@
93
93
  "react-intl": "^5.10.0",
94
94
  "rollup": "^3.28.1",
95
95
  "storybook": "^7.6.17",
96
- "@transferwise/neptune-css": "14.9.6",
97
96
  "@transferwise/less-config": "3.1.0",
97
+ "@transferwise/neptune-css": "14.9.6",
98
98
  "@wise/components-theming": "1.1.0"
99
99
  },
100
100
  "peerDependencies": {
@@ -1,22 +1,15 @@
1
1
  /* eslint-disable no-console */
2
- import {
3
- InfoCircle,
4
- CheckCircle,
5
- AlertCircle,
6
- Warning as AlertIcon,
7
- HappyEmoji,
8
- } from '@transferwise/icons';
2
+ import { HappyEmoji } from '@transferwise/icons';
9
3
  import { ThemeProvider } from '@wise/components-theming';
10
4
  import React from 'react';
11
5
 
12
6
  import { Sentiment, Size, Theme, Variant } from '../common';
13
7
  import { render, cleanup, screen, userEvent, fireEvent } from '../test-utils';
14
8
 
15
- import Alert from './Alert';
16
- import { AlertArrowPosition } from './withArrow';
9
+ import Alert, { AlertAction, AlertArrowPosition, AlertType } from './Alert';
17
10
 
18
11
  jest.mock('react', () => {
19
- const originReact = jest.requireActual('react');
12
+ const originReact = jest.requireActual<typeof import('react')>('react');
20
13
  const mUseReference = jest.fn();
21
14
  return {
22
15
  ...originReact,
@@ -25,20 +18,18 @@ jest.mock('react', () => {
25
18
  });
26
19
 
27
20
  describe('Alert', () => {
28
- let component;
29
- let container;
30
- let alert;
31
- let closeButton;
32
- let action;
21
+ let component: HTMLElement;
22
+ let container: HTMLElement;
23
+ let alert: HTMLElement;
24
+ let closeButton: HTMLElement;
25
+ let action: AlertAction;
33
26
 
34
- const renderIcon = (Icon) => render(<Icon size={24} />).container.innerHTML;
35
-
36
- const classForType = (type) => `alert-${type}`;
27
+ const classForType = (type: AlertType) => `alert-${type}`;
37
28
 
38
29
  const message = 'Your card is on its way.';
39
30
 
40
31
  const origWarn = console.warn;
41
- let mockedWarn;
32
+ let mockedWarn: jest.Mock;
42
33
 
43
34
  beforeAll(() => {
44
35
  mockedWarn = jest.fn();
@@ -56,11 +47,11 @@ describe('Alert', () => {
56
47
 
57
48
  describe('defaults', () => {
58
49
  beforeEach(() => {
59
- ({ container } = render(
50
+ container = render(
60
51
  <ThemeProvider theme={Theme.LIGHT}>
61
52
  <Alert message={message} />
62
53
  </ThemeProvider>,
63
- ));
54
+ ).container;
64
55
  component = screen.getByTestId('alert');
65
56
  });
66
57
 
@@ -68,11 +59,6 @@ describe('Alert', () => {
68
59
  expect(screen.getByText(message)).toBeInTheDocument();
69
60
  });
70
61
 
71
- it('will be of type neutral', () => {
72
- expect(component).toHaveClass(classForType(Sentiment.NEUTRAL));
73
- expect(screen.getByTestId('info-circle-icon')).toBeInTheDocument();
74
- });
75
-
76
62
  it('is not dismissible', () => {
77
63
  expect(container.querySelector('button')).not.toBeInTheDocument();
78
64
  });
@@ -90,7 +76,9 @@ describe('Alert', () => {
90
76
  expect(component).toHaveClass('arrow');
91
77
  expect(component).toHaveClass('arrow-bottom');
92
78
  expect(mockedWarn).toHaveBeenCalledWith(
93
- expect.stringContaining('Alert has deprecated the use of arrow.'),
79
+ expect.stringContaining(
80
+ "Alert component doesn't support 'arrow' anymore, use 'InlineAlert' instead.",
81
+ ),
94
82
  );
95
83
  });
96
84
 
@@ -99,7 +87,9 @@ describe('Alert', () => {
99
87
 
100
88
  expect(screen.getByText(message)).toBeInTheDocument();
101
89
  expect(mockedWarn).toHaveBeenCalledWith(
102
- expect.stringContaining('Alert has deprecated the use of children.'),
90
+ expect.stringContaining(
91
+ "Alert component doesn't support 'children' anymore, use 'message' instead.",
92
+ ),
103
93
  );
104
94
  });
105
95
 
@@ -108,7 +98,9 @@ describe('Alert', () => {
108
98
 
109
99
  expect(container.querySelector('button')).not.toBeInTheDocument();
110
100
  expect(mockedWarn).toHaveBeenCalledWith(
111
- expect.stringContaining('Alert has deprecated the use of dismissible.'),
101
+ expect.stringContaining(
102
+ "Alert component doesn't support 'dismissible' anymore, use 'onDismiss' instead.",
103
+ ),
112
104
  );
113
105
  });
114
106
 
@@ -118,7 +110,9 @@ describe('Alert', () => {
118
110
 
119
111
  expect(small.innerHTML).toStrictEqual(large.innerHTML);
120
112
  expect(mockedWarn).toHaveBeenCalledWith(
121
- expect.stringContaining('Alert no longer supports any possible variations in size'),
113
+ expect.stringContaining(
114
+ "Alert component doesn't support 'size' anymore, please remove that prop.",
115
+ ),
122
116
  );
123
117
  });
124
118
 
@@ -128,9 +122,9 @@ describe('Alert', () => {
128
122
  const success = screen.getByTestId('alert');
129
123
 
130
124
  expect(success).toHaveClass(classForType(Sentiment.POSITIVE));
131
- expect(screen.getByTestId('check-circle-icon')).toBeInTheDocument();
125
+ expect(screen.getByTestId('check-icon')).toBeInTheDocument();
132
126
  expect(mockedWarn).toHaveBeenCalledWith(
133
- 'Alert has deprecated the success value for the `type` prop. Please update to Sentiment.POSITIVE.',
127
+ "Alert component has deprecated 'success' value for the 'type' prop. Please use 'positive' instead.",
134
128
  );
135
129
  });
136
130
 
@@ -140,9 +134,9 @@ describe('Alert', () => {
140
134
  const info = screen.getByTestId('alert');
141
135
 
142
136
  expect(info).toHaveClass(classForType(Sentiment.NEUTRAL));
143
- expect(screen.getByTestId('info-circle-icon')).toBeInTheDocument();
137
+ expect(screen.getByTestId('info-icon')).toBeInTheDocument();
144
138
  expect(mockedWarn).toHaveBeenCalledWith(
145
- 'Alert has deprecated the info value for the `type` prop. Please update to Sentiment.NEUTRAL.',
139
+ "Alert component has deprecated 'info' value for the 'type' prop. Please use 'neutral' instead.",
146
140
  );
147
141
  });
148
142
  });
@@ -153,9 +147,11 @@ describe('Alert', () => {
153
147
  const error = screen.getByTestId('alert');
154
148
 
155
149
  expect(error).toHaveClass(classForType(Sentiment.NEGATIVE));
156
- expect(screen.getByTestId('cross-circle-icon')).toBeInTheDocument();
150
+ expect(screen.getByTestId('cross-icon')).toBeInTheDocument();
157
151
  expect(mockedWarn).toHaveBeenCalledWith(
158
- expect.stringContaining('Alert has deprecated the error value for the `type` prop.'),
152
+ expect.stringContaining(
153
+ "Alert component has deprecated 'error' value for the 'type' prop. Please use 'negative' instead.",
154
+ ),
159
155
  );
160
156
  });
161
157
 
@@ -167,7 +163,7 @@ describe('Alert', () => {
167
163
  };
168
164
  render(<Alert action={action} message={message} />);
169
165
 
170
- const element = screen.getByText(action.text);
166
+ const element = screen.getByText(action.text?.toString() ?? '');
171
167
 
172
168
  expect(element).toHaveAttribute('href', action.href);
173
169
  expect(element).not.toHaveAttribute('aria-label');
@@ -183,7 +179,7 @@ describe('Alert', () => {
183
179
  };
184
180
  render(<Alert action={action} message={message} />);
185
181
 
186
- const element = screen.getByText(action.text);
182
+ const element = screen.getByText(action.text?.toString() ?? '');
187
183
 
188
184
  expect(element).toHaveAttribute('aria-label', action['aria-label']);
189
185
  expect(element).toHaveAttribute('target', action.target);
@@ -245,7 +241,7 @@ describe('Alert', () => {
245
241
  });
246
242
 
247
243
  describe('types', () => {
248
- const getComponentWithType = (type) => {
244
+ const getComponentWithType = (type: AlertType) => {
249
245
  render(<Alert type={type} message={message} />);
250
246
  return screen.getByTestId('alert');
251
247
  };
@@ -254,28 +250,28 @@ describe('Alert', () => {
254
250
  component = getComponentWithType(Sentiment.NEUTRAL);
255
251
 
256
252
  expect(component).toHaveClass(classForType(Sentiment.NEUTRAL));
257
- expect(screen.getByTestId('info-circle-icon')).toBeInTheDocument();
253
+ expect(screen.getByTestId('info-icon')).toBeInTheDocument();
258
254
  });
259
255
 
260
256
  it('renders positive', () => {
261
257
  component = getComponentWithType(Sentiment.POSITIVE);
262
258
 
263
259
  expect(component).toHaveClass(classForType(Sentiment.POSITIVE));
264
- expect(screen.getByTestId('check-circle-icon')).toBeInTheDocument();
260
+ expect(screen.getByTestId('check-icon')).toBeInTheDocument();
265
261
  });
266
262
 
267
263
  it('renders negative', () => {
268
264
  component = getComponentWithType(Sentiment.NEGATIVE);
269
265
 
270
266
  expect(component).toHaveClass(classForType(Sentiment.NEGATIVE));
271
- expect(screen.getByTestId('cross-circle-icon')).toBeInTheDocument();
267
+ expect(screen.getByTestId('cross-icon')).toBeInTheDocument();
272
268
  });
273
269
 
274
270
  it('renders warning', () => {
275
271
  component = getComponentWithType(Sentiment.WARNING);
276
272
 
277
273
  expect(component).toHaveClass(classForType(Sentiment.WARNING));
278
- expect(screen.getByTestId('warning-icon')).toBeInTheDocument();
274
+ expect(screen.getByTestId('alert-icon')).toBeInTheDocument();
279
275
  });
280
276
 
281
277
  it('renders error alerts with aria-role alert', () => {
@@ -292,9 +288,11 @@ describe('Alert', () => {
292
288
  const { location } = window;
293
289
 
294
290
  beforeAll(() => {
295
- delete window.location;
296
291
  jest.spyOn(window, 'open').mockImplementation();
292
+ // @ts-expect-error value gets set right after its deletion
293
+ delete window.location;
297
294
  window.location = {
295
+ ...window.location,
298
296
  assign: jest.fn(),
299
297
  };
300
298
  });
@@ -4,8 +4,7 @@ import { ClockBorderless } from '@transferwise/icons';
4
4
 
5
5
  import { Sentiment } from '../common';
6
6
 
7
- import Alert from './Alert';
8
- import { AlertArrowPosition } from './withArrow';
7
+ import Alert, { AlertArrowPosition } from './Alert';
9
8
 
10
9
  export default {
11
10
  component: Alert,