@transferwise/components 0.0.0-experimental-8d0974a → 0.0.0-experimental-53b8447

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 (207) hide show
  1. package/build/avatar/Avatar.js +3 -0
  2. package/build/avatar/Avatar.js.map +1 -1
  3. package/build/avatar/Avatar.mjs +3 -0
  4. package/build/avatar/Avatar.mjs.map +1 -1
  5. package/build/avatarView/AvatarView.js +187 -0
  6. package/build/avatarView/AvatarView.js.map +1 -0
  7. package/build/avatarView/AvatarView.mjs +185 -0
  8. package/build/avatarView/AvatarView.mjs.map +1 -0
  9. package/build/avatarView/NotificationDot.js +56 -0
  10. package/build/avatarView/NotificationDot.js.map +1 -0
  11. package/build/avatarView/NotificationDot.mjs +54 -0
  12. package/build/avatarView/NotificationDot.mjs.map +1 -0
  13. package/build/avatarWrapper/AvatarWrapper.js +6 -1
  14. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  15. package/build/avatarWrapper/AvatarWrapper.mjs +6 -1
  16. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  17. package/build/badge/Badge.js +8 -1
  18. package/build/badge/Badge.js.map +1 -1
  19. package/build/badge/Badge.mjs +8 -1
  20. package/build/badge/Badge.mjs.map +1 -1
  21. package/build/badge/BadgeAssets.js +63 -0
  22. package/build/badge/BadgeAssets.js.map +1 -0
  23. package/build/badge/BadgeAssets.mjs +61 -0
  24. package/build/badge/BadgeAssets.mjs.map +1 -0
  25. package/build/common/circle/Circle.js +29 -3
  26. package/build/common/circle/Circle.js.map +1 -1
  27. package/build/common/circle/Circle.mjs +29 -3
  28. package/build/common/circle/Circle.mjs.map +1 -1
  29. package/build/dateLookup/DateLookup.js +6 -6
  30. package/build/dateLookup/DateLookup.js.map +1 -1
  31. package/build/dateLookup/DateLookup.mjs +6 -6
  32. package/build/dateLookup/DateLookup.mjs.map +1 -1
  33. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +1 -4
  34. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
  35. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +1 -4
  36. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
  37. package/build/i18n/de.json +5 -0
  38. package/build/i18n/de.json.js +5 -0
  39. package/build/i18n/de.json.js.map +1 -1
  40. package/build/i18n/de.json.mjs +5 -0
  41. package/build/i18n/de.json.mjs.map +1 -1
  42. package/build/i18n/es.json +5 -0
  43. package/build/i18n/es.json.js +5 -0
  44. package/build/i18n/es.json.js.map +1 -1
  45. package/build/i18n/es.json.mjs +5 -0
  46. package/build/i18n/es.json.mjs.map +1 -1
  47. package/build/i18n/fr.json +5 -0
  48. package/build/i18n/fr.json.js +5 -0
  49. package/build/i18n/fr.json.js.map +1 -1
  50. package/build/i18n/fr.json.mjs +5 -0
  51. package/build/i18n/fr.json.mjs.map +1 -1
  52. package/build/i18n/hu.json +5 -0
  53. package/build/i18n/hu.json.js +5 -0
  54. package/build/i18n/hu.json.js.map +1 -1
  55. package/build/i18n/hu.json.mjs +5 -0
  56. package/build/i18n/hu.json.mjs.map +1 -1
  57. package/build/i18n/id.json +5 -0
  58. package/build/i18n/id.json.js +5 -0
  59. package/build/i18n/id.json.js.map +1 -1
  60. package/build/i18n/id.json.mjs +5 -0
  61. package/build/i18n/id.json.mjs.map +1 -1
  62. package/build/i18n/it.json +5 -0
  63. package/build/i18n/it.json.js +5 -0
  64. package/build/i18n/it.json.js.map +1 -1
  65. package/build/i18n/it.json.mjs +5 -0
  66. package/build/i18n/it.json.mjs.map +1 -1
  67. package/build/i18n/ja.json +5 -0
  68. package/build/i18n/ja.json.js +5 -0
  69. package/build/i18n/ja.json.js.map +1 -1
  70. package/build/i18n/ja.json.mjs +5 -0
  71. package/build/i18n/ja.json.mjs.map +1 -1
  72. package/build/i18n/pl.json +5 -0
  73. package/build/i18n/pl.json.js +5 -0
  74. package/build/i18n/pl.json.js.map +1 -1
  75. package/build/i18n/pl.json.mjs +5 -0
  76. package/build/i18n/pl.json.mjs.map +1 -1
  77. package/build/i18n/pt.json +5 -0
  78. package/build/i18n/pt.json.js +5 -0
  79. package/build/i18n/pt.json.js.map +1 -1
  80. package/build/i18n/pt.json.mjs +5 -0
  81. package/build/i18n/pt.json.mjs.map +1 -1
  82. package/build/i18n/ro.json +5 -0
  83. package/build/i18n/ro.json.js +5 -0
  84. package/build/i18n/ro.json.js.map +1 -1
  85. package/build/i18n/ro.json.mjs +5 -0
  86. package/build/i18n/ro.json.mjs.map +1 -1
  87. package/build/i18n/ru.json +5 -0
  88. package/build/i18n/ru.json.js +5 -0
  89. package/build/i18n/ru.json.js.map +1 -1
  90. package/build/i18n/ru.json.mjs +5 -0
  91. package/build/i18n/ru.json.mjs.map +1 -1
  92. package/build/i18n/tr.json +5 -0
  93. package/build/i18n/tr.json.js +5 -0
  94. package/build/i18n/tr.json.js.map +1 -1
  95. package/build/i18n/tr.json.mjs +5 -0
  96. package/build/i18n/tr.json.mjs.map +1 -1
  97. package/build/index.js +15 -4
  98. package/build/index.js.map +1 -1
  99. package/build/index.mjs +10 -2
  100. package/build/index.mjs.map +1 -1
  101. package/build/main.css +98 -25
  102. package/build/statusIcon/StatusIcon.js +2 -2
  103. package/build/statusIcon/StatusIcon.js.map +1 -1
  104. package/build/statusIcon/StatusIcon.mjs +2 -2
  105. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  106. package/build/styles/avatarGroup/AvatarGroup.css +28 -0
  107. package/build/styles/avatarView/AvatarView.css +28 -0
  108. package/build/styles/avatarView/NotificationDot.css +20 -0
  109. package/build/styles/badge/Badge.css +6 -5
  110. package/build/styles/common/circle/Circle.css +36 -0
  111. package/build/styles/main.css +98 -25
  112. package/build/styles/statusIcon/StatusIcon.css +0 -20
  113. package/build/types/avatar/Avatar.d.ts +3 -0
  114. package/build/types/avatar/Avatar.d.ts.map +1 -1
  115. package/build/types/avatarGroup/AvatarGroup.d.ts +18 -0
  116. package/build/types/avatarGroup/AvatarGroup.d.ts.map +1 -0
  117. package/build/types/avatarGroup/index.d.ts +3 -0
  118. package/build/types/avatarGroup/index.d.ts.map +1 -0
  119. package/build/types/avatarView/AvatarView.d.ts +25 -0
  120. package/build/types/avatarView/AvatarView.d.ts.map +1 -0
  121. package/build/types/avatarView/NotificationDot.d.ts +8 -0
  122. package/build/types/avatarView/NotificationDot.d.ts.map +1 -0
  123. package/build/types/avatarView/index.d.ts +3 -0
  124. package/build/types/avatarView/index.d.ts.map +1 -0
  125. package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
  126. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  127. package/build/types/badge/Badge.d.ts +5 -1
  128. package/build/types/badge/Badge.d.ts.map +1 -1
  129. package/build/types/badge/BadgeAssets.d.ts +15 -0
  130. package/build/types/badge/BadgeAssets.d.ts.map +1 -0
  131. package/build/types/badge/index.d.ts +2 -0
  132. package/build/types/badge/index.d.ts.map +1 -1
  133. package/build/types/common/circle/Circle.d.ts +3 -1
  134. package/build/types/common/circle/Circle.d.ts.map +1 -1
  135. package/build/types/common/dateUtils/index.d.ts +0 -1
  136. package/build/types/common/dateUtils/index.d.ts.map +1 -1
  137. package/build/types/dateLookup/DateLookup.d.ts +1 -1
  138. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  139. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +1 -1
  140. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
  141. package/build/types/index.d.ts +3 -1
  142. package/build/types/index.d.ts.map +1 -1
  143. package/build/types/statusIcon/StatusIcon.d.ts +6 -2
  144. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  145. package/package.json +3 -3
  146. package/src/avatar/Avatar.tsx +3 -0
  147. package/src/avatarGroup/AvatarGroup.css +28 -0
  148. package/src/avatarGroup/AvatarGroup.less +32 -0
  149. package/src/avatarGroup/AvatarGroup.story.tsx +195 -0
  150. package/src/avatarGroup/AvatarGroup.tsx +80 -0
  151. package/src/avatarGroup/index.ts +2 -0
  152. package/src/avatarView/AvatarView.css +28 -0
  153. package/src/avatarView/AvatarView.less +16 -0
  154. package/src/avatarView/AvatarView.story.tsx +573 -0
  155. package/src/avatarView/AvatarView.tsx +184 -0
  156. package/src/avatarView/NotificationDot.css +20 -0
  157. package/src/avatarView/NotificationDot.less +24 -0
  158. package/src/avatarView/NotificationDot.tsx +32 -0
  159. package/src/avatarView/index.ts +2 -0
  160. package/src/avatarWrapper/AvatarWrapper.story.tsx +6 -0
  161. package/src/avatarWrapper/AvatarWrapper.tsx +3 -0
  162. package/src/badge/Badge.css +6 -5
  163. package/src/badge/Badge.less +4 -3
  164. package/src/badge/Badge.tsx +8 -1
  165. package/src/badge/BadgeAssets.tsx +65 -0
  166. package/src/badge/index.ts +3 -0
  167. package/src/common/circle/Circle.css +36 -0
  168. package/src/common/circle/Circle.less +42 -1
  169. package/src/common/circle/Circle.tsx +41 -3
  170. package/src/common/dateUtils/index.ts +0 -1
  171. package/src/dateLookup/DateLookup.tests.story.tsx +5 -40
  172. package/src/dateLookup/DateLookup.tsx +11 -9
  173. package/src/dateLookup/dayCalendar/table/DayCalendarTable.tsx +2 -5
  174. package/src/decision/Decision.story.tsx +10 -46
  175. package/src/flowNavigation/FlowNavigation.story.js +10 -39
  176. package/src/i18n/de.json +5 -0
  177. package/src/i18n/es.json +5 -0
  178. package/src/i18n/fr.json +5 -0
  179. package/src/i18n/hu.json +5 -0
  180. package/src/i18n/id.json +5 -0
  181. package/src/i18n/it.json +5 -0
  182. package/src/i18n/ja.json +5 -0
  183. package/src/i18n/pl.json +5 -0
  184. package/src/i18n/pt.json +5 -0
  185. package/src/i18n/ro.json +5 -0
  186. package/src/i18n/ru.json +5 -0
  187. package/src/i18n/tr.json +5 -0
  188. package/src/index.ts +4 -0
  189. package/src/listItem/ListItem.story.tsx +6 -43
  190. package/src/main.css +98 -25
  191. package/src/main.less +2 -0
  192. package/src/navigationOption/NavigationOption.story.js +14 -65
  193. package/src/overlayHeader/OverlayHeader.story.tsx +5 -10
  194. package/src/radio/Radio.story.tsx +5 -5
  195. package/src/radioGroup/RadioGroup.story.tsx +3 -3
  196. package/src/selectOption/SelectOption.story.tsx +31 -30
  197. package/src/statusIcon/StatusIcon.css +0 -20
  198. package/src/statusIcon/StatusIcon.less +0 -17
  199. package/src/statusIcon/StatusIcon.tsx +14 -4
  200. package/src/tile/Tile.story.tsx +2 -6
  201. package/build/common/dateUtils/getDateView/getDateView.js +0 -10
  202. package/build/common/dateUtils/getDateView/getDateView.js.map +0 -1
  203. package/build/common/dateUtils/getDateView/getDateView.mjs +0 -8
  204. package/build/common/dateUtils/getDateView/getDateView.mjs.map +0 -1
  205. package/build/types/common/dateUtils/getDateView/getDateView.d.ts +0 -2
  206. package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +0 -1
  207. package/src/common/dateUtils/getDateView/getDateView.ts +0 -5
@@ -7,10 +7,15 @@ import Circle, { CircleProps } from '../common/circle';
7
7
  import { useMedia } from '../common/hooks/useMedia';
8
8
 
9
9
  import messages from './StatusIcon.messages';
10
+
11
+ /**
12
+ * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead
13
+ */
14
+ type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
10
15
 
11
16
  export type StatusIconProps = {
12
- sentiment: `${Sentiment}`;
13
- size: SizeSmall | SizeMedium | SizeLarge;
17
+ sentiment?: `${Sentiment}`;
18
+ size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
14
19
  /**
15
20
  * Override for the sentiment's-derived, default, accessible
16
21
  * name announced by the screen readers. <br />
@@ -77,13 +82,18 @@ const StatusIcon = ({
77
82
 
78
83
  const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
79
84
  const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
80
- const size = sizeProp === Size.SMALL && isTinyViewport ? 32 : mapLegacySize[sizeProp];
85
+ const size =
86
+ sizeProp === Size.SMALL && isTinyViewport
87
+ ? 32
88
+ : typeof sizeProp === 'string'
89
+ ? mapLegacySize[sizeProp]
90
+ : sizeProp;
81
91
  return (
82
92
  <Circle
83
93
  as="span"
84
94
  size={size}
85
95
  data-testid="status-icon"
86
- className={clsx('status-circle', `status-circle-${sizeProp}`, sentiment)}
96
+ className={clsx('status-circle', sentiment)}
87
97
  >
88
98
  <Icon
89
99
  className={clsx('status-icon', iconColor)}
@@ -1,7 +1,7 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { text, boolean } from '@storybook/addon-knobs';
3
3
 
4
- import Avatar from '../avatar';
4
+ import AvatarView from '../avatarView';
5
5
  import { Size } from '../common';
6
6
 
7
7
  import Tile from '.';
@@ -41,11 +41,7 @@ export const Basic = () => {
41
41
  description={description}
42
42
  disabled={disabled}
43
43
  href="#href1"
44
- media={
45
- <Avatar size="md" type="initials">
46
- HM
47
- </Avatar>
48
- }
44
+ media={<AvatarView name="Henry Mike" />}
49
45
  size={medium ? Size.MEDIUM : Size.SMALL}
50
46
  title={title}
51
47
  onClick={action('onClick')}
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var moveToWithinRange = require('../moveToWithinRange/moveToWithinRange.js');
4
-
5
- const returnDateView = (selectedDate, min, max) => {
6
- return selectedDate || (min || max) && moveToWithinRange.moveToWithinRange(new Date(), min, max) || new Date();
7
- };
8
-
9
- exports.returnDateView = returnDateView;
10
- //# sourceMappingURL=getDateView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDateView.js","sources":["../../../../src/common/dateUtils/getDateView/getDateView.ts"],"sourcesContent":["import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';\n\nexport const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {\n return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();\n};\n"],"names":["returnDateView","selectedDate","min","max","moveToWithinRange","Date"],"mappings":";;;;AAEO,MAAMA,cAAc,GAAGA,CAACC,YAAyB,EAAEC,GAAgB,EAAEC,GAAgB,KAAI;EAC9F,OAAOF,YAAY,IAAK,CAACC,GAAG,IAAIC,GAAG,KAAKC,mCAAiB,CAAC,IAAIC,IAAI,EAAE,EAAEH,GAAG,EAAEC,GAAG,CAAE,IAAI,IAAIE,IAAI,EAAE,CAAA;AAChG;;;;"}
@@ -1,8 +0,0 @@
1
- import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange.mjs';
2
-
3
- const returnDateView = (selectedDate, min, max) => {
4
- return selectedDate || (min || max) && moveToWithinRange(new Date(), min, max) || new Date();
5
- };
6
-
7
- export { returnDateView };
8
- //# sourceMappingURL=getDateView.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDateView.mjs","sources":["../../../../src/common/dateUtils/getDateView/getDateView.ts"],"sourcesContent":["import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';\n\nexport const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {\n return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();\n};\n"],"names":["returnDateView","selectedDate","min","max","moveToWithinRange","Date"],"mappings":";;AAEO,MAAMA,cAAc,GAAGA,CAACC,YAAyB,EAAEC,GAAgB,EAAEC,GAAgB,KAAI;EAC9F,OAAOF,YAAY,IAAK,CAACC,GAAG,IAAIC,GAAG,KAAKC,iBAAiB,CAAC,IAAIC,IAAI,EAAE,EAAEH,GAAG,EAAEC,GAAG,CAAE,IAAI,IAAIE,IAAI,EAAE,CAAA;AAChG;;;;"}
@@ -1,2 +0,0 @@
1
- export declare const returnDateView: (selectedDate: Date | null, min: Date | null, max: Date | null) => Date;
2
- //# sourceMappingURL=getDateView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDateView.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDateView/getDateView.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,iBAAkB,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,SAE3F,CAAC"}
@@ -1,5 +0,0 @@
1
- import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';
2
-
3
- export const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {
4
- return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();
5
- };