@transferwise/components 45.14.0 → 45.14.2

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.
@@ -6,7 +6,7 @@ export type CloseButtonProps = Pick<React.ComponentPropsWithoutRef<'button'>, 'a
6
6
  isDisabled?: boolean;
7
7
  testId?: string;
8
8
  };
9
- export declare const CloseButton: import("react").ForwardRefExoticComponent<Pick<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "className" | "aria-label" | "onClick"> & {
9
+ export declare const CloseButton: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "className" | "aria-label" | "onClick"> & {
10
10
  size?: "sm" | "md" | "lg" | undefined;
11
11
  filled?: boolean | undefined;
12
12
  isDisabled?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"TableLink.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/TableLink.js"],"names":[],"mappings":";AAGA;IA6CwtkB,wBAA8C;IAAA,sCAAgK;IA5Cp6kB,8BAKE;IAEF,sCAiBC;CACF"}
1
+ {"version":3,"file":"TableLink.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/TableLink.js"],"names":[],"mappings":";AAGA;IA6Co1kB,wBAA8C;IAAA,sCAAgK;IA5ChilB,8BAKE;IAEF,sCAiBC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"YearCalendar.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/yearCalendar/YearCalendar.js"],"names":[],"mappings":";AAOA;IA6C8mkB,wBAA8C;IAAA,sCAAgK;IA5C1zkB,kCAGE;IAEF,gCAEE;IAEF,4BAEE;IAEF,sCAWC;CACF"}
1
+ {"version":3,"file":"YearCalendar.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/yearCalendar/YearCalendar.js"],"names":[],"mappings":";AAOA;IA6C0ukB,wBAA8C;IAAA,sCAAgK;IA5Ct7kB,kCAGE;IAEF,gCAEE;IAEF,4BAEE;IAEF,sCAWC;CACF"}
@@ -6,5 +6,5 @@ export interface InputProps extends Merge<React.ComponentPropsWithRef<'input'>,
6
6
  'aria-invalid'?: boolean;
7
7
  }> {
8
8
  }
9
- export declare const Input: import("react").ForwardRefExoticComponent<Pick<InputProps, "id" | "value" | "children" | "content" | "disabled" | "className" | "form" | "slot" | "style" | "title" | "pattern" | "size" | "key" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLInputElement>>;
9
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
10
10
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/inputs/Input.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,MAAM,WAAW,UACf,SAAQ,KAAK,CACX,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACpC;IACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEN,eAAO,MAAM,KAAK,+gKAehB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/inputs/Input.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,MAAM,WAAW,UACf,SAAQ,KAAK,CACX,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACpC;IACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEN,eAAO,MAAM,KAAK,sHAehB,CAAC"}
@@ -4,5 +4,5 @@ export interface TextAreaProps extends Merge<React.ComponentPropsWithRef<'textar
4
4
  'aria-invalid'?: boolean;
5
5
  }> {
6
6
  }
7
- export declare const TextArea: import("react").ForwardRefExoticComponent<Pick<TextAreaProps, "id" | "value" | "children" | "content" | "disabled" | "className" | "form" | "slot" | "style" | "title" | "key" | "autoComplete" | "maxLength" | "minLength" | "name" | "placeholder" | "readOnly" | "required" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "wrap" | "cols" | "dirName" | "rows"> & import("react").RefAttributes<HTMLTextAreaElement>>;
7
+ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
8
8
  //# sourceMappingURL=TextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/inputs/TextArea.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,MAAM,WAAW,aACf,SAAQ,KAAK,CACX,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACvC;IACE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEN,eAAO,MAAM,QAAQ,szJAWnB,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/inputs/TextArea.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,MAAM,WAAW,aACf,SAAQ,KAAK,CACX,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACvC;IACE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEN,eAAO,MAAM,QAAQ,4HAWnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,MAAM,KAAK,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAAC;AAEjG;;;;GAIG;AACH,QAAA,MAAM,IAAI,4FASP,KAAK,gCAsBP,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAInD,MAAM,MAAM,KAAK,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAAC;AAEjG;;;;GAIG;AACH,QAAA,MAAM,IAAI,4FASP,KAAK,gCAuBP,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ opensInNewTab: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Link.messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Link.messages.d.ts","sourceRoot":"","sources":["../../../src/link/Link.messages.ts"],"names":[],"mappings":";;;;;;AAEA,wBAKG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "45.14.0",
3
+ "version": "45.14.2",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -58,11 +58,11 @@
58
58
  "@types/babel__core": "^7.20.1",
59
59
  "@types/jest": "^26.0.20",
60
60
  "@types/node": "^14.14.31",
61
- "@types/react": "^17.0.59",
61
+ "@types/react": "^17.0.65",
62
62
  "@types/react-dom": "^17.0.20",
63
63
  "@types/react-transition-group": "4.4.5",
64
64
  "@types/testing-library__jest-dom": "^5.14.5",
65
- "@wise/art": "^2.0.1",
65
+ "@wise/art": "^2.7.0",
66
66
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
67
67
  "babel-plugin-formatjs": "^10.5.3",
68
68
  "babel-plugin-inline-react-svg": "^2.0.2",
@@ -77,14 +77,14 @@
77
77
  "rollup": "^3.28.1",
78
78
  "storybook": "^7.0.6",
79
79
  "@transferwise/less-config": "3.0.6",
80
- "@transferwise/neptune-css": "14.5.2",
81
- "@wise/components-theming": "0.8.3"
80
+ "@transferwise/neptune-css": "14.6.0",
81
+ "@wise/components-theming": "0.8.4"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@transferwise/icons": "^3.7.0",
85
85
  "@transferwise/neptune-css": "^14.5.2",
86
86
  "@wise/art": "^2",
87
- "@wise/components-theming": "^0.8.3",
87
+ "@wise/components-theming": "^0.8.4",
88
88
  "currency-flags": "^4.0.2",
89
89
  "react": ">=16.14",
90
90
  "react-dom": ">=16.14",
@@ -1,5 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import * as wiseIcons from '@transferwise/icons';
3
+ import { Flag } from '@wise/art';
3
4
 
4
5
  import { Size } from '../common';
5
6
  import { storyConfig } from '../test-utils';
@@ -22,10 +23,11 @@ export const Emoji: Story = {
22
23
  },
23
24
  };
24
25
 
25
- export const Flag: Story = {
26
+ export const FlagStory: Story = {
27
+ name: 'Flag',
26
28
  render: (args) => (
27
29
  <Avatar {...args}>
28
- <img src="https://wise.com/web-art/assets/flags/gbp.svg" alt="" />
30
+ <Flag code="GBP" />
29
31
  </Avatar>
30
32
  ),
31
33
  args: {
@@ -38,8 +40,8 @@ export const Flag: Story = {
38
40
  export const Table: Story = storyConfig(
39
41
  {
40
42
  render: () => {
41
- const flagResourceJpy = 'https://wise.com/web-art/assets/flags/jpy.svg';
42
- const flagResourceGbp = 'https://wise.com/web-art/assets/flags/gbp.svg';
43
+ const flagJPY = <Flag code="JPY" />;
44
+ const flagGBP = <Flag code="GBP" />;
43
45
  const backgroundColor = '#d6f5e3';
44
46
  const emoji = '✈️';
45
47
  const initials = 'GN';
@@ -52,27 +54,27 @@ export const Table: Story = storyConfig(
52
54
  <tr>
53
55
  <td>
54
56
  <Avatar size={Size.LARGE} type={AvatarType.THUMBNAIL} outlined>
55
- <img src={flagResourceJpy} alt="" />
57
+ {flagJPY}
56
58
  </Avatar>
57
59
  </td>
58
60
  <td>
59
61
  <Avatar size={56} type={AvatarType.THUMBNAIL} outlined>
60
- <img src={flagResourceJpy} alt="" />
62
+ {flagJPY}
61
63
  </Avatar>
62
64
  </td>
63
65
  <td>
64
66
  <Avatar size={Size.MEDIUM} type={AvatarType.THUMBNAIL} outlined>
65
- <img src={flagResourceJpy} alt="" />
67
+ {flagJPY}
66
68
  </Avatar>
67
69
  </td>
68
70
  <td>
69
71
  <Avatar size={40} type={AvatarType.THUMBNAIL} outlined>
70
- <img src={flagResourceJpy} alt="" />
72
+ {flagJPY}
71
73
  </Avatar>
72
74
  </td>
73
75
  <td>
74
76
  <Avatar size={Size.SMALL} type={AvatarType.THUMBNAIL} outlined>
75
- <img src={flagResourceJpy} alt="" />
77
+ {flagJPY}
76
78
  </Avatar>
77
79
  </td>
78
80
  </tr>
@@ -80,27 +82,27 @@ export const Table: Story = storyConfig(
80
82
  <tr>
81
83
  <td>
82
84
  <Avatar size={Size.LARGE} type={AvatarType.THUMBNAIL}>
83
- <img src={flagResourceGbp} alt="" />
85
+ {flagGBP}
84
86
  </Avatar>
85
87
  </td>
86
88
  <td>
87
89
  <Avatar size={56} type={AvatarType.THUMBNAIL}>
88
- <img src={flagResourceGbp} alt="" />
90
+ {flagGBP}
89
91
  </Avatar>
90
92
  </td>
91
93
  <td>
92
94
  <Avatar size={Size.MEDIUM} type={AvatarType.THUMBNAIL}>
93
- <img src={flagResourceGbp} alt="" />
95
+ {flagGBP}
94
96
  </Avatar>
95
97
  </td>
96
98
  <td>
97
99
  <Avatar size={40} type={AvatarType.THUMBNAIL}>
98
- <img src={flagResourceGbp} alt="" />
100
+ {flagGBP}
99
101
  </Avatar>
100
102
  </td>
101
103
  <td>
102
104
  <Avatar size={Size.SMALL} type={AvatarType.THUMBNAIL}>
103
- <img src={flagResourceGbp} alt="" />
105
+ {flagGBP}
104
106
  </Avatar>
105
107
  </td>
106
108
  </tr>
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl';
2
+
3
+ export default defineMessages({
4
+ opensInNewTab: {
5
+ id: 'neptune.Link.opensInNewTab',
6
+ defaultMessage: '(opens in new tab)',
7
+ },
8
+ });
package/src/link/Link.tsx CHANGED
@@ -1,9 +1,12 @@
1
1
  import { NavigateAway as NavigateAwayIcon } from '@transferwise/icons';
2
2
  import classNames from 'classnames';
3
3
  import { AnchorHTMLAttributes } from 'react';
4
+ import { useIntl } from 'react-intl';
4
5
 
5
6
  import { LinkLarge, LinkDefault } from '../common';
6
7
 
8
+ import messages from './Link.messages';
9
+
7
10
  export type Props = AnchorHTMLAttributes<HTMLAnchorElement> & { type?: LinkLarge | LinkDefault };
8
11
 
9
12
  /**
@@ -23,6 +26,8 @@ const Link = ({
23
26
  }: Props) => {
24
27
  const isBlank = target === '_blank';
25
28
 
29
+ const { formatMessage } = useIntl();
30
+
26
31
  return (
27
32
  <a
28
33
  href={href}
@@ -38,8 +43,7 @@ const Link = ({
38
43
  onClick={onClick}
39
44
  {...props}
40
45
  >
41
- {children}
42
- {isBlank && <NavigateAwayIcon />}
46
+ {children} {isBlank && <NavigateAwayIcon title={formatMessage(messages.opensInNewTab)} />}
43
47
  </a>
44
48
  );
45
49
  };
@@ -7,7 +7,7 @@ import {
7
7
  Profile,
8
8
  UpwardGraph as UpwardGraphIcon,
9
9
  } from '@transferwise/icons';
10
- import { Illustration, Assets } from '@wise/art';
10
+ import { Illustration, Assets, Flag } from '@wise/art';
11
11
 
12
12
  import { Badge, Nudge, Avatar, Header } from '..';
13
13
 
@@ -203,7 +203,7 @@ export const BalanceContent = () => (
203
203
  showMediaCircle={false}
204
204
  media={
205
205
  <Avatar type="icon">
206
- <img src="https://wise.com/web-art/assets/flags/gbp.svg" alt="" />
206
+ <Flag code="GBP" />
207
207
  </Avatar>
208
208
  }
209
209
  />
@@ -229,9 +229,7 @@ export const ExistingContactContent = () => (
229
229
  content="EUR account ending in 1111"
230
230
  showMediaCircle={false}
231
231
  media={
232
- <Badge
233
- badge={<img src="https://wise.com/public-resources/assets/flags/square/eur.svg" alt="" />}
234
- >
232
+ <Badge badge={<Flag code="EUR" />}>
235
233
  <Avatar type="initials" size="md">
236
234
  <span aria-hidden>WS</span>
237
235
  </Avatar>
@@ -1,5 +1,6 @@
1
1
  import { boolean, text } from '@storybook/addon-knobs';
2
2
  import { Check } from '@transferwise/icons';
3
+ import { Flag } from '@wise/art';
3
4
  import { useState } from 'react';
4
5
 
5
6
  import Avatar, { AvatarType } from '../avatar';
@@ -33,7 +34,7 @@ export const Basic = () => {
33
34
  avatar={
34
35
  showAvatar ? (
35
36
  <Avatar type={AvatarType.THUMBNAIL}>
36
- <img src="https://wise.com/web-art/assets/flags/imp.svg" alt="" />
37
+ <Flag code="IMP" />
37
38
  </Avatar>
38
39
  ) : null
39
40
  }
@@ -51,7 +52,7 @@ export const Basic = () => {
51
52
  avatar={
52
53
  showAvatar ? (
53
54
  <Avatar type={AvatarType.THUMBNAIL}>
54
- <img src="https://wise.com/web-art/assets/flags/kes.svg" alt="" />
55
+ <Flag code="KES" />
55
56
  </Avatar>
56
57
  ) : null
57
58
  }
@@ -1,5 +1,6 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { boolean } from '@storybook/addon-knobs';
3
+ import { Flag } from '@wise/art';
3
4
 
4
5
  import Avatar, { AvatarType } from '../avatar';
5
6
 
@@ -16,7 +17,7 @@ export const Basic = () => {
16
17
 
17
18
  const avatar = showAvatars ? (
18
19
  <Avatar type={AvatarType.THUMBNAIL}>
19
- <img src="https://wise.com/web-art/assets/flags/nzd.svg" alt="" />
20
+ <Flag code="NZD" />
20
21
  </Avatar>
21
22
  ) : undefined;
22
23