@transferwise/components 0.0.0-experimental-9f96230 → 0.0.0-experimental-9b505c9

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 (417) hide show
  1. package/build/accordion/AccordionItem/AccordionItem.js +22 -3
  2. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.mjs +22 -3
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js +22 -1
  6. package/build/actionButton/ActionButton.js.map +1 -1
  7. package/build/actionButton/ActionButton.mjs +22 -1
  8. package/build/actionButton/ActionButton.mjs.map +1 -1
  9. package/build/actionOption/ActionOption.js +24 -2
  10. package/build/actionOption/ActionOption.js.map +1 -1
  11. package/build/actionOption/ActionOption.mjs +24 -2
  12. package/build/actionOption/ActionOption.mjs.map +1 -1
  13. package/build/alert/Alert.js +21 -5
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +21 -5
  16. package/build/alert/Alert.mjs.map +1 -1
  17. package/build/alert/inlineMarkdown/InlineMarkdown.js +25 -2
  18. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  19. package/build/alert/inlineMarkdown/InlineMarkdown.mjs +25 -2
  20. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  21. package/build/avatar/Avatar.js +25 -9
  22. package/build/avatar/Avatar.js.map +1 -1
  23. package/build/avatar/Avatar.mjs +25 -9
  24. package/build/avatar/Avatar.mjs.map +1 -1
  25. package/build/avatarWrapper/AvatarWrapper.js +23 -3
  26. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  27. package/build/avatarWrapper/AvatarWrapper.mjs +23 -3
  28. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  29. package/build/badge/Badge.js +24 -12
  30. package/build/badge/Badge.js.map +1 -1
  31. package/build/badge/Badge.mjs +24 -12
  32. package/build/badge/Badge.mjs.map +1 -1
  33. package/build/button/Button.js +22 -3
  34. package/build/button/Button.js.map +1 -1
  35. package/build/button/Button.mjs +22 -3
  36. package/build/button/Button.mjs.map +1 -1
  37. package/build/button/classMap.js +24 -0
  38. package/build/button/classMap.js.map +1 -1
  39. package/build/button/classMap.mjs +24 -0
  40. package/build/button/classMap.mjs.map +1 -1
  41. package/build/button/legacyUtils/legacyUtils.js +24 -2
  42. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  43. package/build/button/legacyUtils/legacyUtils.mjs +24 -2
  44. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  45. package/build/card/Card.js +23 -3
  46. package/build/card/Card.js.map +1 -1
  47. package/build/card/Card.mjs +23 -3
  48. package/build/card/Card.mjs.map +1 -1
  49. package/build/checkbox/Checkbox.js +23 -1
  50. package/build/checkbox/Checkbox.js.map +1 -1
  51. package/build/checkbox/Checkbox.mjs +23 -1
  52. package/build/checkbox/Checkbox.mjs.map +1 -1
  53. package/build/chevron/Chevron.js +21 -1
  54. package/build/chevron/Chevron.js.map +1 -1
  55. package/build/chevron/Chevron.mjs +21 -1
  56. package/build/chevron/Chevron.mjs.map +1 -1
  57. package/build/chips/Chip.js +19 -1
  58. package/build/chips/Chip.js.map +1 -1
  59. package/build/chips/Chip.mjs +19 -1
  60. package/build/chips/Chip.mjs.map +1 -1
  61. package/build/circularButton/CircularButton.js +24 -5
  62. package/build/circularButton/CircularButton.js.map +1 -1
  63. package/build/circularButton/CircularButton.mjs +24 -5
  64. package/build/circularButton/CircularButton.mjs.map +1 -1
  65. package/build/common/bottomSheet/BottomSheet.js +3 -2
  66. package/build/common/bottomSheet/BottomSheet.js.map +1 -1
  67. package/build/common/bottomSheet/BottomSheet.mjs +3 -2
  68. package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
  69. package/build/common/circle/Circle.js +15 -2
  70. package/build/common/circle/Circle.js.map +1 -1
  71. package/build/common/circle/Circle.mjs +15 -2
  72. package/build/common/circle/Circle.mjs.map +1 -1
  73. package/build/common/hooks/useHasIntersected/useHasIntersected.js +10 -10
  74. package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
  75. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +10 -10
  76. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
  77. package/build/common/locale/index.js +24 -0
  78. package/build/common/locale/index.js.map +1 -1
  79. package/build/common/locale/index.mjs +24 -0
  80. package/build/common/locale/index.mjs.map +1 -1
  81. package/build/common/panel/Panel.js +23 -2
  82. package/build/common/panel/Panel.js.map +1 -1
  83. package/build/common/panel/Panel.mjs +23 -2
  84. package/build/common/panel/Panel.mjs.map +1 -1
  85. package/build/common/responsivePanel/ResponsivePanel.js +27 -3
  86. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  87. package/build/common/responsivePanel/ResponsivePanel.mjs +27 -3
  88. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  89. package/build/criticalBanner/CriticalCommsBanner.js +22 -3
  90. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  91. package/build/criticalBanner/CriticalCommsBanner.mjs +22 -3
  92. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  93. package/build/dateInput/DateInput.js +22 -5
  94. package/build/dateInput/DateInput.js.map +1 -1
  95. package/build/dateInput/DateInput.mjs +22 -5
  96. package/build/dateInput/DateInput.mjs.map +1 -1
  97. package/build/dateLookup/DateLookup.js +24 -6
  98. package/build/dateLookup/DateLookup.js.map +1 -1
  99. package/build/dateLookup/DateLookup.mjs +24 -6
  100. package/build/dateLookup/DateLookup.mjs.map +1 -1
  101. package/build/dateLookup/dateHeader/DateHeader.js +26 -5
  102. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  103. package/build/dateLookup/dateHeader/DateHeader.mjs +26 -5
  104. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  105. package/build/dateLookup/dateTrigger/DateTrigger.js +19 -3
  106. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  107. package/build/dateLookup/dateTrigger/DateTrigger.mjs +19 -3
  108. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  109. package/build/decision/Decision.js +24 -3
  110. package/build/decision/Decision.js.map +1 -1
  111. package/build/decision/Decision.mjs +24 -3
  112. package/build/decision/Decision.mjs.map +1 -1
  113. package/build/definitionList/DefinitionList.js +23 -1
  114. package/build/definitionList/DefinitionList.js.map +1 -1
  115. package/build/definitionList/DefinitionList.mjs +23 -1
  116. package/build/definitionList/DefinitionList.mjs.map +1 -1
  117. package/build/dimmer/Dimmer.js +24 -2
  118. package/build/dimmer/Dimmer.js.map +1 -1
  119. package/build/dimmer/Dimmer.mjs +24 -2
  120. package/build/dimmer/Dimmer.mjs.map +1 -1
  121. package/build/display/Display.js +23 -1
  122. package/build/display/Display.js.map +1 -1
  123. package/build/display/Display.mjs +23 -1
  124. package/build/display/Display.mjs.map +1 -1
  125. package/build/drawer/Drawer.js +22 -3
  126. package/build/drawer/Drawer.js.map +1 -1
  127. package/build/drawer/Drawer.mjs +22 -3
  128. package/build/drawer/Drawer.mjs.map +1 -1
  129. package/build/field/Field.js +23 -2
  130. package/build/field/Field.js.map +1 -1
  131. package/build/field/Field.mjs +23 -2
  132. package/build/field/Field.mjs.map +1 -1
  133. package/build/flowNavigation/FlowNavigation.js +19 -2
  134. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  135. package/build/flowNavigation/FlowNavigation.mjs +19 -2
  136. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  137. package/build/header/Header.js +24 -2
  138. package/build/header/Header.js.map +1 -1
  139. package/build/header/Header.mjs +24 -2
  140. package/build/header/Header.mjs.map +1 -1
  141. package/build/i18n/en.json +0 -5
  142. package/build/i18n/en.json.js +0 -5
  143. package/build/i18n/en.json.js.map +1 -1
  144. package/build/i18n/en.json.mjs +0 -5
  145. package/build/i18n/en.json.mjs.map +1 -1
  146. package/build/image/Image.js +4 -1
  147. package/build/image/Image.js.map +1 -1
  148. package/build/image/Image.mjs +4 -1
  149. package/build/image/Image.mjs.map +1 -1
  150. package/build/index.js +69 -62
  151. package/build/index.js.map +1 -1
  152. package/build/index.mjs +27 -20
  153. package/build/index.mjs.map +1 -1
  154. package/build/info/Info.js +21 -3
  155. package/build/info/Info.js.map +1 -1
  156. package/build/info/Info.mjs +21 -3
  157. package/build/info/Info.mjs.map +1 -1
  158. package/build/inlineAlert/InlineAlert.js +24 -3
  159. package/build/inlineAlert/InlineAlert.js.map +1 -1
  160. package/build/inlineAlert/InlineAlert.mjs +24 -3
  161. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  162. package/build/inputs/SearchInput.js +23 -2
  163. package/build/inputs/SearchInput.js.map +1 -1
  164. package/build/inputs/SearchInput.mjs +23 -2
  165. package/build/inputs/SearchInput.mjs.map +1 -1
  166. package/build/instructionsList/InstructionsList.js +22 -1
  167. package/build/instructionsList/InstructionsList.js.map +1 -1
  168. package/build/instructionsList/InstructionsList.mjs +22 -1
  169. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  170. package/build/loader/Loader.js +22 -1
  171. package/build/loader/Loader.js.map +1 -1
  172. package/build/loader/Loader.mjs +22 -1
  173. package/build/loader/Loader.mjs.map +1 -1
  174. package/build/main.css +46 -322
  175. package/build/markdown/Markdown.js +24 -1
  176. package/build/markdown/Markdown.js.map +1 -1
  177. package/build/markdown/Markdown.mjs +24 -1
  178. package/build/markdown/Markdown.mjs.map +1 -1
  179. package/build/modal/Modal.js +22 -5
  180. package/build/modal/Modal.js.map +1 -1
  181. package/build/modal/Modal.mjs +22 -5
  182. package/build/modal/Modal.mjs.map +1 -1
  183. package/build/moneyInput/MoneyInput.js +22 -3
  184. package/build/moneyInput/MoneyInput.js.map +1 -1
  185. package/build/moneyInput/MoneyInput.mjs +22 -3
  186. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  187. package/build/navigationOption/NavigationOption.js +23 -2
  188. package/build/navigationOption/NavigationOption.js.map +1 -1
  189. package/build/navigationOption/NavigationOption.mjs +23 -2
  190. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  191. package/build/nudge/Nudge.js +19 -1
  192. package/build/nudge/Nudge.js.map +1 -1
  193. package/build/nudge/Nudge.mjs +19 -1
  194. package/build/nudge/Nudge.mjs.map +1 -1
  195. package/build/overlayHeader/OverlayHeader.js +19 -1
  196. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  197. package/build/overlayHeader/OverlayHeader.mjs +19 -1
  198. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  199. package/build/phoneNumberInput/PhoneNumberInput.js +23 -2
  200. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  201. package/build/phoneNumberInput/PhoneNumberInput.mjs +23 -2
  202. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  203. package/build/popover/Popover.js +24 -4
  204. package/build/popover/Popover.js.map +1 -1
  205. package/build/popover/Popover.mjs +24 -4
  206. package/build/popover/Popover.mjs.map +1 -1
  207. package/build/processIndicator/ProcessIndicator.js +22 -1
  208. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  209. package/build/processIndicator/ProcessIndicator.mjs +22 -1
  210. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  211. package/build/progressBar/ProgressBar.js +24 -2
  212. package/build/progressBar/ProgressBar.js.map +1 -1
  213. package/build/progressBar/ProgressBar.mjs +24 -2
  214. package/build/progressBar/ProgressBar.mjs.map +1 -1
  215. package/build/promoCard/PromoCard.js +22 -2
  216. package/build/promoCard/PromoCard.js.map +1 -1
  217. package/build/promoCard/PromoCard.mjs +22 -2
  218. package/build/promoCard/PromoCard.mjs.map +1 -1
  219. package/build/promoCard/PromoCardIndicator.js +22 -1
  220. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  221. package/build/promoCard/PromoCardIndicator.mjs +22 -1
  222. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  223. package/build/provider/Provider.js +25 -2
  224. package/build/provider/Provider.js.map +1 -1
  225. package/build/provider/Provider.mjs +25 -2
  226. package/build/provider/Provider.mjs.map +1 -1
  227. package/build/radio/Radio.js +24 -2
  228. package/build/radio/Radio.js.map +1 -1
  229. package/build/radio/Radio.mjs +24 -2
  230. package/build/radio/Radio.mjs.map +1 -1
  231. package/build/segmentedControl/SegmentedControl.js +22 -1
  232. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  233. package/build/segmentedControl/SegmentedControl.mjs +22 -1
  234. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  235. package/build/select/Select.js +26 -4
  236. package/build/select/Select.js.map +1 -1
  237. package/build/select/Select.mjs +26 -4
  238. package/build/select/Select.mjs.map +1 -1
  239. package/build/select/option/Option.js +22 -1
  240. package/build/select/option/Option.js.map +1 -1
  241. package/build/select/option/Option.mjs +22 -1
  242. package/build/select/option/Option.mjs.map +1 -1
  243. package/build/selectOption/SelectOption.js +24 -6
  244. package/build/selectOption/SelectOption.js.map +1 -1
  245. package/build/selectOption/SelectOption.mjs +24 -6
  246. package/build/selectOption/SelectOption.mjs.map +1 -1
  247. package/build/statusIcon/StatusIcon.js +26 -8
  248. package/build/statusIcon/StatusIcon.js.map +1 -1
  249. package/build/statusIcon/StatusIcon.mjs +26 -8
  250. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  251. package/build/stepper/Stepper.js +25 -3
  252. package/build/stepper/Stepper.js.map +1 -1
  253. package/build/stepper/Stepper.mjs +25 -3
  254. package/build/stepper/Stepper.mjs.map +1 -1
  255. package/build/sticky/Sticky.js +25 -2
  256. package/build/sticky/Sticky.js.map +1 -1
  257. package/build/sticky/Sticky.mjs +25 -2
  258. package/build/sticky/Sticky.mjs.map +1 -1
  259. package/build/styles/avatar/Avatar.css +29 -0
  260. package/build/styles/badge/Badge.css +6 -0
  261. package/build/styles/circularButton/CircularButton.css +2 -2
  262. package/build/styles/common/circle/Circle.css +4 -0
  263. package/build/styles/main.css +46 -322
  264. package/build/styles/statusIcon/StatusIcon.css +0 -20
  265. package/build/summary/Summary.js +21 -5
  266. package/build/summary/Summary.js.map +1 -1
  267. package/build/summary/Summary.mjs +21 -5
  268. package/build/summary/Summary.mjs.map +1 -1
  269. package/build/tabs/Tabs.js +23 -3
  270. package/build/tabs/Tabs.js.map +1 -1
  271. package/build/tabs/Tabs.mjs +23 -3
  272. package/build/tabs/Tabs.mjs.map +1 -1
  273. package/build/tile/Tile.js +24 -2
  274. package/build/tile/Tile.js.map +1 -1
  275. package/build/tile/Tile.mjs +24 -2
  276. package/build/tile/Tile.mjs.map +1 -1
  277. package/build/title/Title.js +23 -1
  278. package/build/title/Title.js.map +1 -1
  279. package/build/title/Title.mjs +23 -1
  280. package/build/title/Title.mjs.map +1 -1
  281. package/build/tooltip/Tooltip.js +22 -1
  282. package/build/tooltip/Tooltip.js.map +1 -1
  283. package/build/tooltip/Tooltip.mjs +22 -1
  284. package/build/tooltip/Tooltip.mjs.map +1 -1
  285. package/build/typeahead/Typeahead.js +22 -4
  286. package/build/typeahead/Typeahead.js.map +1 -1
  287. package/build/typeahead/Typeahead.mjs +22 -4
  288. package/build/typeahead/Typeahead.mjs.map +1 -1
  289. package/build/types/avatar/Avatar.d.ts.map +1 -1
  290. package/build/types/badge/Badge.d.ts.map +1 -1
  291. package/build/types/common/circle/Circle.d.ts +1 -1
  292. package/build/types/common/circle/Circle.d.ts.map +1 -1
  293. package/build/types/common/fakeEvents.d.ts +23 -0
  294. package/build/types/common/fakeEvents.d.ts.map +1 -0
  295. package/build/types/common/hooks/index.d.ts +4 -4
  296. package/build/types/common/hooks/index.d.ts.map +1 -1
  297. package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -1
  298. package/build/types/common/hooks/useConditionalListener/index.d.ts.map +1 -1
  299. package/build/types/common/hooks/useDirection/index.d.ts +1 -1
  300. package/build/types/common/hooks/useDirection/index.d.ts.map +1 -1
  301. package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -1
  302. package/build/types/common/hooks/useHasIntersected/index.d.ts.map +1 -1
  303. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +15 -4
  304. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
  305. package/build/types/common/index.d.ts +28 -28
  306. package/build/types/common/index.d.ts.map +1 -1
  307. package/build/types/common/responsivePanel/index.d.ts +1 -1
  308. package/build/types/common/responsivePanel/index.d.ts.map +1 -1
  309. package/build/types/index.d.ts +1 -0
  310. package/build/types/index.d.ts.map +1 -1
  311. package/build/types/navigationOption/NavigationOption.d.ts +1 -0
  312. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  313. package/build/types/statusIcon/StatusIcon.d.ts +7 -3
  314. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  315. package/build/upload/Upload.js +21 -2
  316. package/build/upload/Upload.js.map +1 -1
  317. package/build/upload/Upload.mjs +21 -2
  318. package/build/upload/Upload.mjs.map +1 -1
  319. package/build/upload/steps/processingStep/processingStep.js +25 -3
  320. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  321. package/build/upload/steps/processingStep/processingStep.mjs +25 -3
  322. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  323. package/build/upload/steps/uploadImageStep/uploadImageStep.js +23 -3
  324. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  325. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +23 -3
  326. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  327. package/build/uploadInput/UploadInput.js +22 -3
  328. package/build/uploadInput/UploadInput.js.map +1 -1
  329. package/build/uploadInput/UploadInput.mjs +22 -3
  330. package/build/uploadInput/UploadInput.mjs.map +1 -1
  331. package/build/uploadInput/uploadButton/UploadButton.js +21 -2
  332. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  333. package/build/uploadInput/uploadButton/UploadButton.mjs +21 -2
  334. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  335. package/build/uploadInput/uploadButton/defaults.js +24 -0
  336. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  337. package/build/uploadInput/uploadButton/defaults.mjs +24 -0
  338. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  339. package/build/uploadInput/uploadItem/UploadItem.js +21 -4
  340. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  341. package/build/uploadInput/uploadItem/UploadItem.mjs +21 -4
  342. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  343. package/build/withDisplayFormat/WithDisplayFormat.js +25 -1
  344. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  345. package/build/withDisplayFormat/WithDisplayFormat.mjs +25 -1
  346. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  347. package/package.json +3 -3
  348. package/src/avatar/Avatar.css +29 -0
  349. package/src/avatar/Avatar.less +12 -0
  350. package/src/avatar/Avatar.tsx +4 -8
  351. package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -22
  352. package/src/badge/Badge.css +6 -0
  353. package/src/badge/Badge.less +6 -0
  354. package/src/badge/Badge.tsx +1 -11
  355. package/src/circularButton/CircularButton.css +2 -2
  356. package/src/circularButton/CircularButton.less +1 -1
  357. package/src/circularButton/CircularButton.story.tsx +3 -0
  358. package/src/circularButton/CircularButton.tsx +1 -1
  359. package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
  360. package/src/common/circle/Circle.css +4 -0
  361. package/src/common/circle/Circle.less +6 -0
  362. package/src/common/circle/Circle.story.tsx +2 -2
  363. package/src/common/circle/Circle.tsx +25 -2
  364. package/src/common/{fakeEvents.js → fakeEvents.ts} +1 -1
  365. package/src/common/hooks/useHasIntersected/{useHasIntersected.js → useHasIntersected.ts} +20 -11
  366. package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -8
  367. package/src/i18n/en.json +0 -5
  368. package/src/index.ts +1 -0
  369. package/src/main.css +46 -322
  370. package/src/main.less +0 -1
  371. package/src/navigationOption/{NavigationOption.story.js → NavigationOption.story.tsx} +23 -5
  372. package/src/navigationOption/NavigationOption.tsx +1 -1
  373. package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -4
  374. package/src/promoCard/PromoCard.spec.tsx +1 -1
  375. package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -4
  376. package/src/statusIcon/StatusIcon.css +0 -20
  377. package/src/statusIcon/StatusIcon.less +0 -17
  378. package/src/statusIcon/StatusIcon.spec.tsx +2 -21
  379. package/src/statusIcon/StatusIcon.story.tsx +32 -1
  380. package/src/statusIcon/StatusIcon.tsx +11 -10
  381. package/build/styles/table/Table.css +0 -300
  382. package/build/types/table/Table.d.ts +0 -24
  383. package/build/types/table/Table.d.ts.map +0 -1
  384. package/build/types/table/Table.messages.d.ts +0 -24
  385. package/build/types/table/Table.messages.d.ts.map +0 -1
  386. package/build/types/table/TableCell.d.ts +0 -44
  387. package/build/types/table/TableCell.d.ts.map +0 -1
  388. package/build/types/table/TableHeader.d.ts +0 -13
  389. package/build/types/table/TableHeader.d.ts.map +0 -1
  390. package/build/types/table/TableRow.d.ts +0 -17
  391. package/build/types/table/TableRow.d.ts.map +0 -1
  392. package/build/types/table/TableStatusText.d.ts +0 -9
  393. package/build/types/table/TableStatusText.d.ts.map +0 -1
  394. package/build/types/table/index.d.ts +0 -6
  395. package/build/types/table/index.d.ts.map +0 -1
  396. package/src/common/requirements.js +0 -440
  397. package/src/table/Table.css +0 -300
  398. package/src/table/Table.less +0 -361
  399. package/src/table/Table.messages.ts +0 -24
  400. package/src/table/Table.spec.tsx +0 -89
  401. package/src/table/Table.story.tsx +0 -364
  402. package/src/table/Table.tsx +0 -167
  403. package/src/table/TableCell.spec.tsx +0 -304
  404. package/src/table/TableCell.tsx +0 -170
  405. package/src/table/TableHeader.spec.tsx +0 -55
  406. package/src/table/TableHeader.tsx +0 -75
  407. package/src/table/TableRow.spec.tsx +0 -117
  408. package/src/table/TableRow.tsx +0 -67
  409. package/src/table/TableStatusText.spec.tsx +0 -53
  410. package/src/table/TableStatusText.tsx +0 -36
  411. package/src/table/index.ts +0 -11
  412. /package/src/common/hooks/{index.js → index.ts} +0 -0
  413. /package/src/common/hooks/useConditionalListener/{index.js → index.ts} +0 -0
  414. /package/src/common/hooks/useDirection/{index.js → index.ts} +0 -0
  415. /package/src/common/hooks/useHasIntersected/{index.js → index.ts} +0 -0
  416. /package/src/common/{index.js → index.ts} +0 -0
  417. /package/src/common/responsivePanel/{index.js → index.ts} +0 -0
@@ -1,117 +0,0 @@
1
- import { render, screen, within } from '@testing-library/react';
2
- import TableRow, { TableRowType, TableRowClickableType } from './TableRow';
3
- import { IntlProvider } from 'react-intl';
4
- import { userEvent } from '@testing-library/user-event';
5
-
6
- describe('TableRow Component', () => {
7
- const mockData = {
8
- cells: [
9
- {
10
- cell: {
11
- type: 'text',
12
- text: 'Cell content 1',
13
- },
14
- },
15
- {
16
- cell: {
17
- type: 'text',
18
- text: 'Cell content 2',
19
- },
20
- },
21
- ],
22
- } satisfies TableRowType;
23
-
24
- const mockDataClickable = {
25
- id: 1,
26
- cells: mockData.cells,
27
- } satisfies TableRowClickableType;
28
-
29
- const handleClick = jest.fn();
30
-
31
- const renderWithIntl = (component: React.ReactElement) => {
32
- return render(<IntlProvider locale="en">{component}</IntlProvider>);
33
- };
34
-
35
- it('renders row', () => {
36
- renderWithIntl(<TableRow />);
37
- expect(screen.getByTestId('np-table-row')).toBeInTheDocument();
38
- });
39
-
40
- it('renders `children` when data is not provided', () => {
41
- renderWithIntl(
42
- <TableRow>
43
- <td>Cell text</td>
44
- </TableRow>,
45
- );
46
- expect(screen.getByText('Cell text')).toBeInTheDocument();
47
- });
48
-
49
- it('renders cells when data is provided', () => {
50
- renderWithIntl(<TableRow rowData={mockData} />);
51
- expect(screen.getByText('Cell content 1')).toBeInTheDocument();
52
- expect(screen.getByText('Cell content 2')).toBeInTheDocument();
53
- });
54
-
55
- it('renders correct number of cells', () => {
56
- renderWithIntl(<TableRow rowData={mockData} />);
57
- expect(screen.getAllByRole('cell')).toHaveLength(mockData.cells.length);
58
- });
59
-
60
- it('renders correct number of cells with chevron when clickable', () => {
61
- renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
62
- expect(screen.getAllByRole('cell')).toHaveLength(mockDataClickable.cells.length + 1);
63
- });
64
-
65
- it('renders a separator row when `hasSeparator` is passed', () => {
66
- renderWithIntl(<TableRow rowData={mockData} hasSeparator />);
67
- expect(screen.getAllByTestId('np-table-row')).toHaveLength(1);
68
- expect(screen.getAllByTestId('np-table-row--separator')).toHaveLength(1);
69
- });
70
-
71
- it('renders correct `colSpan` for separator row', () => {
72
- renderWithIntl(<TableRow rowData={mockData} hasSeparator />);
73
- const separatorCell = within(screen.getByTestId('np-table-row--separator')).getByRole('cell');
74
- expect(separatorCell).toHaveAttribute('colSpan', mockData.cells.length.toString());
75
- });
76
-
77
- it('renders correct `colSpan` for separator row with clickable row', () => {
78
- renderWithIntl(<TableRow rowData={mockDataClickable} hasSeparator onRowClick={handleClick} />);
79
- const separatorCell = within(screen.getByTestId('np-table-row--separator')).getByRole('cell');
80
- expect(separatorCell).toHaveAttribute(
81
- 'colSpan',
82
- (mockDataClickable.cells.length + 1).toString(),
83
- );
84
- });
85
-
86
- it('does not render separator row when `hasSeparator` is not provided', () => {
87
- renderWithIntl(<TableRow rowData={mockData} />);
88
- expect(screen.queryByTestId('np-table-row--separator')).not.toBeInTheDocument();
89
- });
90
-
91
- it('does not call `onRowClick` when row is not clickable', async () => {
92
- renderWithIntl(<TableRow rowData={mockData} />);
93
- await userEvent.click(screen.getByTestId('np-table-row'));
94
- expect(handleClick).not.toHaveBeenCalled();
95
- });
96
-
97
- it('applies the clickable class when row is clickable', () => {
98
- renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
99
- expect(screen.getAllByTestId('np-table-row')[0]).toHaveClass('np-table-row--clickable');
100
- });
101
-
102
- it('calls `onRowClick` when row is clicked for clickable row', async () => {
103
- renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
104
- await userEvent.click(screen.getByTestId('np-table-row'));
105
- expect(handleClick).toHaveBeenCalledWith(mockDataClickable);
106
- });
107
-
108
- it('renders a chevron icon when row is clickable', () => {
109
- renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
110
- expect(screen.getByTestId('chevron-up-icon')).toBeInTheDocument();
111
- });
112
-
113
- it('does not render a chevron icon when row is not clickable', () => {
114
- renderWithIntl(<TableRow rowData={mockData} />);
115
- expect(screen.queryByTestId('chevron-up-icon')).not.toBeInTheDocument();
116
- });
117
- });
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import TableCell, { TableCellProps } from './TableCell';
3
- import Chevron from '../chevron';
4
- import { Position } from '../common';
5
- import { clsx } from 'clsx';
6
-
7
- export interface TableRowType {
8
- cells?: TableCellProps[];
9
- }
10
-
11
- export interface TableRowClickableType extends TableRowType {
12
- id: number | string; // `id` is mandatory for clickable rows
13
- }
14
-
15
- export interface TableRowProps {
16
- rowData?: TableRowType | TableRowClickableType;
17
- hasSeparator?: boolean;
18
- children?: React.ReactNode;
19
- onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
20
- }
21
-
22
- const TableRow = ({ rowData, hasSeparator = false, children, onRowClick }: TableRowProps) => {
23
- return (
24
- <>
25
- <tr
26
- className={clsx('np-table-row', { 'np-table-row--clickable': !!onRowClick })}
27
- data-testid="np-table-row"
28
- role={onRowClick ? 'button' : undefined}
29
- tabIndex={onRowClick ? 0 : undefined}
30
- onClick={onRowClick && rowData ? () => onRowClick(rowData) : undefined}
31
- onKeyDown={({ key }) => {
32
- if (onRowClick && rowData && key === 'Enter') {
33
- onRowClick(rowData);
34
- }
35
- }}
36
- >
37
- {rowData?.cells
38
- ? rowData?.cells?.map((item, index) => {
39
- const itemIndex = item.cell?.text ? item.cell?.text.concat(index.toString()) : index;
40
- return <TableCell key={itemIndex} {...item} />;
41
- })
42
- : children}
43
- {onRowClick && (
44
- <TableCell className="np-table-cell--action">
45
- <Chevron orientation={Position.RIGHT} />
46
- </TableCell>
47
- )}
48
- </tr>
49
- {hasSeparator && (
50
- <tr
51
- role="presentation"
52
- className="np-table-row np-table-row--separator"
53
- data-testid="np-table-row--separator"
54
- >
55
- <td
56
- className="np-table-cell np-table-cell--cosmetic"
57
- colSpan={onRowClick ? Number(rowData?.cells?.length) + 1 : rowData?.cells?.length}
58
- >
59
- <div className="np-table-cell-separator" data-testid="np-table-cell-separator" />
60
- </td>
61
- </tr>
62
- )}
63
- </>
64
- );
65
- };
66
-
67
- export default TableRow;
@@ -1,53 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
- import TableStatusText, { TableStatusTextProps } from './TableStatusText';
3
-
4
- describe('TableStatusText Component', () => {
5
- const renderComponent = (props: Partial<TableStatusTextProps> = {}) => {
6
- const defaultProps: TableStatusTextProps = {
7
- text: 'Status Text',
8
- ...props,
9
- };
10
- return render(<TableStatusText {...defaultProps} />);
11
- };
12
-
13
- it('renders the text and applies the default class', () => {
14
- renderComponent();
15
- expect(screen.getByText('Status Text')).toBeInTheDocument();
16
- expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
17
- });
18
-
19
- it('applies the custom class name', () => {
20
- renderComponent({ className: 'custom-class' });
21
- expect(screen.getByText('Status Text')).toHaveClass('custom-class');
22
- });
23
-
24
- it('applies the default typography class when typography is not provided', () => {
25
- renderComponent();
26
- expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
27
- });
28
-
29
- it('applies the typography class when typography equals `default-bold`', () => {
30
- renderComponent({ typography: 'default-bold' });
31
- expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
32
- });
33
-
34
- it('does not render any icon when status is not provided', () => {
35
- renderComponent();
36
- expect(screen.queryByTestId('check-icon')).not.toBeInTheDocument();
37
- expect(screen.queryByTestId('alert-icon')).not.toBeInTheDocument();
38
- });
39
-
40
- it('applies the typography and status classes, renders the error icon when status equals `error`', () => {
41
- renderComponent({ status: 'error' });
42
- expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
43
- expect(screen.getByText('Status Text')).toHaveClass('np-table-content--error');
44
- expect(screen.getByTestId('alert-icon')).toBeInTheDocument();
45
- });
46
-
47
- it('applies the typography and status classes, renders the success icon when status equals `success`', () => {
48
- renderComponent({ status: 'success' });
49
- expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
50
- expect(screen.getByText('Status Text')).toHaveClass('np-table-content--success');
51
- expect(screen.getByTestId('check-icon')).toBeInTheDocument();
52
- });
53
- });
@@ -1,36 +0,0 @@
1
- import { AlertCircle, CheckCircle } from '@transferwise/icons';
2
- import { clsx } from 'clsx';
3
-
4
- export interface TableStatusTextProps {
5
- text: string;
6
- className?: string;
7
- status?: 'success' | 'error';
8
- typography?: 'default' | 'default-bold';
9
- }
10
-
11
- const TableStatusText: React.FC<TableStatusTextProps> = ({
12
- text,
13
- className,
14
- status,
15
- typography = 'default',
16
- }: TableStatusTextProps) => {
17
- let typographyClass = 'np-text-body-default';
18
- if (status ?? typography === 'default-bold') {
19
- typographyClass += '-bold';
20
- }
21
-
22
- return (
23
- <div
24
- className={clsx(className, typographyClass, {
25
- 'np-table-content--success': status === 'success',
26
- 'np-table-content--error': status === 'error',
27
- })}
28
- >
29
- {text}
30
- {status === 'success' && <CheckCircle className="tw-icon--status" data-testid="check-icon" />}
31
- {status === 'error' && <AlertCircle className="tw-icon--status" data-testid="alert-icon" />}
32
- </div>
33
- );
34
- };
35
-
36
- export default TableStatusText;
@@ -1,11 +0,0 @@
1
- export { default } from './Table';
2
- export type { TableProps } from './Table';
3
- export type { TableRowType, TableRowClickableType } from './TableRow';
4
- export type { TableHeaderType } from './TableHeader';
5
- export type {
6
- TableCellLeading,
7
- TableCellText,
8
- TableCellCurrency,
9
- TableCellStatus,
10
- TableCellType,
11
- } from './TableCell';
File without changes
File without changes