@transferwise/components 46.77.0 → 46.79.0

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 (503) 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 +22 -6
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +22 -6
  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 -6
  34. package/build/button/Button.js.map +1 -1
  35. package/build/button/Button.messages.js.map +1 -1
  36. package/build/button/Button.messages.mjs.map +1 -1
  37. package/build/button/Button.mjs +22 -6
  38. package/build/button/Button.mjs.map +1 -1
  39. package/build/button/classMap.js +24 -0
  40. package/build/button/classMap.js.map +1 -1
  41. package/build/button/classMap.mjs +24 -0
  42. package/build/button/classMap.mjs.map +1 -1
  43. package/build/button/legacyUtils/legacyUtils.js +30 -7
  44. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  45. package/build/button/legacyUtils/legacyUtils.mjs +30 -7
  46. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  47. package/build/card/Card.js +23 -3
  48. package/build/card/Card.js.map +1 -1
  49. package/build/card/Card.mjs +23 -3
  50. package/build/card/Card.mjs.map +1 -1
  51. package/build/checkbox/Checkbox.js +23 -1
  52. package/build/checkbox/Checkbox.js.map +1 -1
  53. package/build/checkbox/Checkbox.mjs +23 -1
  54. package/build/checkbox/Checkbox.mjs.map +1 -1
  55. package/build/checkboxOption/CheckboxOption.js +1 -1
  56. package/build/checkboxOption/CheckboxOption.mjs +1 -1
  57. package/build/chevron/Chevron.js +21 -1
  58. package/build/chevron/Chevron.js.map +1 -1
  59. package/build/chevron/Chevron.mjs +21 -1
  60. package/build/chevron/Chevron.mjs.map +1 -1
  61. package/build/chips/Chip.js +19 -1
  62. package/build/chips/Chip.js.map +1 -1
  63. package/build/chips/Chip.mjs +19 -1
  64. package/build/chips/Chip.mjs.map +1 -1
  65. package/build/circularButton/CircularButton.js +24 -5
  66. package/build/circularButton/CircularButton.js.map +1 -1
  67. package/build/circularButton/CircularButton.mjs +24 -5
  68. package/build/circularButton/CircularButton.mjs.map +1 -1
  69. package/build/common/bottomSheet/BottomSheet.js +3 -2
  70. package/build/common/bottomSheet/BottomSheet.js.map +1 -1
  71. package/build/common/bottomSheet/BottomSheet.mjs +3 -2
  72. package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
  73. package/build/common/circle/Circle.js +15 -2
  74. package/build/common/circle/Circle.js.map +1 -1
  75. package/build/common/circle/Circle.mjs +15 -2
  76. package/build/common/circle/Circle.mjs.map +1 -1
  77. package/build/common/hooks/useHasIntersected/useHasIntersected.js +10 -10
  78. package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
  79. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +10 -10
  80. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
  81. package/build/common/locale/index.js +24 -0
  82. package/build/common/locale/index.js.map +1 -1
  83. package/build/common/locale/index.mjs +24 -0
  84. package/build/common/locale/index.mjs.map +1 -1
  85. package/build/common/panel/Panel.js +23 -2
  86. package/build/common/panel/Panel.js.map +1 -1
  87. package/build/common/panel/Panel.mjs +23 -2
  88. package/build/common/panel/Panel.mjs.map +1 -1
  89. package/build/common/responsivePanel/ResponsivePanel.js +27 -3
  90. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  91. package/build/common/responsivePanel/ResponsivePanel.mjs +27 -3
  92. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  93. package/build/criticalBanner/CriticalCommsBanner.js +22 -3
  94. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  95. package/build/criticalBanner/CriticalCommsBanner.mjs +22 -3
  96. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  97. package/build/dateInput/DateInput.js +22 -5
  98. package/build/dateInput/DateInput.js.map +1 -1
  99. package/build/dateInput/DateInput.mjs +22 -5
  100. package/build/dateInput/DateInput.mjs.map +1 -1
  101. package/build/dateLookup/DateLookup.js +24 -6
  102. package/build/dateLookup/DateLookup.js.map +1 -1
  103. package/build/dateLookup/DateLookup.mjs +24 -6
  104. package/build/dateLookup/DateLookup.mjs.map +1 -1
  105. package/build/dateLookup/dateHeader/DateHeader.js +26 -5
  106. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  107. package/build/dateLookup/dateHeader/DateHeader.mjs +26 -5
  108. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  109. package/build/dateLookup/dateTrigger/DateTrigger.js +19 -3
  110. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  111. package/build/dateLookup/dateTrigger/DateTrigger.mjs +19 -3
  112. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  113. package/build/decision/Decision.js +24 -3
  114. package/build/decision/Decision.js.map +1 -1
  115. package/build/decision/Decision.mjs +24 -3
  116. package/build/decision/Decision.mjs.map +1 -1
  117. package/build/definitionList/DefinitionList.js +23 -1
  118. package/build/definitionList/DefinitionList.js.map +1 -1
  119. package/build/definitionList/DefinitionList.mjs +23 -1
  120. package/build/definitionList/DefinitionList.mjs.map +1 -1
  121. package/build/dimmer/Dimmer.js +24 -2
  122. package/build/dimmer/Dimmer.js.map +1 -1
  123. package/build/dimmer/Dimmer.mjs +24 -2
  124. package/build/dimmer/Dimmer.mjs.map +1 -1
  125. package/build/display/Display.js +23 -1
  126. package/build/display/Display.js.map +1 -1
  127. package/build/display/Display.mjs +23 -1
  128. package/build/display/Display.mjs.map +1 -1
  129. package/build/drawer/Drawer.js +23 -4
  130. package/build/drawer/Drawer.js.map +1 -1
  131. package/build/drawer/Drawer.mjs +23 -4
  132. package/build/drawer/Drawer.mjs.map +1 -1
  133. package/build/field/Field.js +23 -2
  134. package/build/field/Field.js.map +1 -1
  135. package/build/field/Field.mjs +23 -2
  136. package/build/field/Field.mjs.map +1 -1
  137. package/build/flowNavigation/FlowNavigation.js +19 -2
  138. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  139. package/build/flowNavigation/FlowNavigation.mjs +19 -2
  140. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  141. package/build/header/Header.js +24 -2
  142. package/build/header/Header.js.map +1 -1
  143. package/build/header/Header.mjs +24 -2
  144. package/build/header/Header.mjs.map +1 -1
  145. package/build/i18n/de.json +5 -0
  146. package/build/i18n/de.json.js +5 -0
  147. package/build/i18n/de.json.js.map +1 -1
  148. package/build/i18n/de.json.mjs +5 -0
  149. package/build/i18n/de.json.mjs.map +1 -1
  150. package/build/i18n/es.json +5 -0
  151. package/build/i18n/es.json.js +5 -0
  152. package/build/i18n/es.json.js.map +1 -1
  153. package/build/i18n/es.json.mjs +5 -0
  154. package/build/i18n/es.json.mjs.map +1 -1
  155. package/build/i18n/fr.json +5 -0
  156. package/build/i18n/fr.json.js +5 -0
  157. package/build/i18n/fr.json.js.map +1 -1
  158. package/build/i18n/fr.json.mjs +5 -0
  159. package/build/i18n/fr.json.mjs.map +1 -1
  160. package/build/i18n/hu.json +5 -0
  161. package/build/i18n/hu.json.js +5 -0
  162. package/build/i18n/hu.json.js.map +1 -1
  163. package/build/i18n/hu.json.mjs +5 -0
  164. package/build/i18n/hu.json.mjs.map +1 -1
  165. package/build/i18n/id.json +5 -0
  166. package/build/i18n/id.json.js +5 -0
  167. package/build/i18n/id.json.js.map +1 -1
  168. package/build/i18n/id.json.mjs +5 -0
  169. package/build/i18n/id.json.mjs.map +1 -1
  170. package/build/i18n/it.json +5 -0
  171. package/build/i18n/it.json.js +5 -0
  172. package/build/i18n/it.json.js.map +1 -1
  173. package/build/i18n/it.json.mjs +5 -0
  174. package/build/i18n/it.json.mjs.map +1 -1
  175. package/build/i18n/ja.json +5 -0
  176. package/build/i18n/ja.json.js +5 -0
  177. package/build/i18n/ja.json.js.map +1 -1
  178. package/build/i18n/ja.json.mjs +5 -0
  179. package/build/i18n/ja.json.mjs.map +1 -1
  180. package/build/i18n/pl.json +5 -0
  181. package/build/i18n/pl.json.js +5 -0
  182. package/build/i18n/pl.json.js.map +1 -1
  183. package/build/i18n/pl.json.mjs +5 -0
  184. package/build/i18n/pl.json.mjs.map +1 -1
  185. package/build/i18n/pt.json +5 -0
  186. package/build/i18n/pt.json.js +5 -0
  187. package/build/i18n/pt.json.js.map +1 -1
  188. package/build/i18n/pt.json.mjs +5 -0
  189. package/build/i18n/pt.json.mjs.map +1 -1
  190. package/build/i18n/ro.json +5 -0
  191. package/build/i18n/ro.json.js +5 -0
  192. package/build/i18n/ro.json.js.map +1 -1
  193. package/build/i18n/ro.json.mjs +5 -0
  194. package/build/i18n/ro.json.mjs.map +1 -1
  195. package/build/i18n/ru.json +5 -0
  196. package/build/i18n/ru.json.js +5 -0
  197. package/build/i18n/ru.json.js.map +1 -1
  198. package/build/i18n/ru.json.mjs +5 -0
  199. package/build/i18n/ru.json.mjs.map +1 -1
  200. package/build/i18n/tr.json +5 -0
  201. package/build/i18n/tr.json.js +5 -0
  202. package/build/i18n/tr.json.js.map +1 -1
  203. package/build/i18n/tr.json.mjs +5 -0
  204. package/build/i18n/tr.json.mjs.map +1 -1
  205. package/build/image/Image.js +4 -1
  206. package/build/image/Image.js.map +1 -1
  207. package/build/image/Image.mjs +4 -1
  208. package/build/image/Image.mjs.map +1 -1
  209. package/build/index.js +69 -62
  210. package/build/index.js.map +1 -1
  211. package/build/index.mjs +27 -20
  212. package/build/index.mjs.map +1 -1
  213. package/build/info/Info.js +21 -3
  214. package/build/info/Info.js.map +1 -1
  215. package/build/info/Info.mjs +21 -3
  216. package/build/info/Info.mjs.map +1 -1
  217. package/build/inlineAlert/InlineAlert.js +24 -3
  218. package/build/inlineAlert/InlineAlert.js.map +1 -1
  219. package/build/inlineAlert/InlineAlert.mjs +24 -3
  220. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  221. package/build/inputs/SearchInput.js +23 -2
  222. package/build/inputs/SearchInput.js.map +1 -1
  223. package/build/inputs/SearchInput.mjs +23 -2
  224. package/build/inputs/SearchInput.mjs.map +1 -1
  225. package/build/instructionsList/InstructionsList.js +22 -1
  226. package/build/instructionsList/InstructionsList.js.map +1 -1
  227. package/build/instructionsList/InstructionsList.mjs +22 -1
  228. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  229. package/build/loader/Loader.js +22 -1
  230. package/build/loader/Loader.js.map +1 -1
  231. package/build/loader/Loader.mjs +22 -1
  232. package/build/loader/Loader.mjs.map +1 -1
  233. package/build/main.css +46 -22
  234. package/build/markdown/Markdown.js +24 -1
  235. package/build/markdown/Markdown.js.map +1 -1
  236. package/build/markdown/Markdown.mjs +24 -1
  237. package/build/markdown/Markdown.mjs.map +1 -1
  238. package/build/modal/Modal.js +22 -5
  239. package/build/modal/Modal.js.map +1 -1
  240. package/build/modal/Modal.mjs +22 -5
  241. package/build/modal/Modal.mjs.map +1 -1
  242. package/build/moneyInput/MoneyInput.js +22 -3
  243. package/build/moneyInput/MoneyInput.js.map +1 -1
  244. package/build/moneyInput/MoneyInput.mjs +22 -3
  245. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  246. package/build/navigationOption/NavigationOption.js +23 -2
  247. package/build/navigationOption/NavigationOption.js.map +1 -1
  248. package/build/navigationOption/NavigationOption.mjs +23 -2
  249. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  250. package/build/nudge/Nudge.js +19 -1
  251. package/build/nudge/Nudge.js.map +1 -1
  252. package/build/nudge/Nudge.mjs +19 -1
  253. package/build/nudge/Nudge.mjs.map +1 -1
  254. package/build/overlayHeader/OverlayHeader.js +19 -1
  255. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  256. package/build/overlayHeader/OverlayHeader.mjs +19 -1
  257. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  258. package/build/phoneNumberInput/PhoneNumberInput.js +23 -2
  259. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  260. package/build/phoneNumberInput/PhoneNumberInput.mjs +23 -2
  261. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  262. package/build/popover/Popover.js +24 -4
  263. package/build/popover/Popover.js.map +1 -1
  264. package/build/popover/Popover.mjs +24 -4
  265. package/build/popover/Popover.mjs.map +1 -1
  266. package/build/processIndicator/ProcessIndicator.js +22 -1
  267. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  268. package/build/processIndicator/ProcessIndicator.mjs +22 -1
  269. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  270. package/build/progressBar/ProgressBar.js +24 -2
  271. package/build/progressBar/ProgressBar.js.map +1 -1
  272. package/build/progressBar/ProgressBar.mjs +24 -2
  273. package/build/progressBar/ProgressBar.mjs.map +1 -1
  274. package/build/promoCard/PromoCard.js +22 -2
  275. package/build/promoCard/PromoCard.js.map +1 -1
  276. package/build/promoCard/PromoCard.mjs +22 -2
  277. package/build/promoCard/PromoCard.mjs.map +1 -1
  278. package/build/promoCard/PromoCardIndicator.js +22 -1
  279. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  280. package/build/promoCard/PromoCardIndicator.mjs +22 -1
  281. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  282. package/build/provider/Provider.js +25 -2
  283. package/build/provider/Provider.js.map +1 -1
  284. package/build/provider/Provider.mjs +25 -2
  285. package/build/provider/Provider.mjs.map +1 -1
  286. package/build/radio/Radio.js +24 -2
  287. package/build/radio/Radio.js.map +1 -1
  288. package/build/radio/Radio.mjs +24 -2
  289. package/build/radio/Radio.mjs.map +1 -1
  290. package/build/segmentedControl/SegmentedControl.js +22 -1
  291. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  292. package/build/segmentedControl/SegmentedControl.mjs +22 -1
  293. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  294. package/build/select/Select.js +26 -4
  295. package/build/select/Select.js.map +1 -1
  296. package/build/select/Select.mjs +26 -4
  297. package/build/select/Select.mjs.map +1 -1
  298. package/build/select/option/Option.js +22 -1
  299. package/build/select/option/Option.js.map +1 -1
  300. package/build/select/option/Option.mjs +22 -1
  301. package/build/select/option/Option.mjs.map +1 -1
  302. package/build/selectOption/SelectOption.js +24 -6
  303. package/build/selectOption/SelectOption.js.map +1 -1
  304. package/build/selectOption/SelectOption.mjs +24 -6
  305. package/build/selectOption/SelectOption.mjs.map +1 -1
  306. package/build/statusIcon/StatusIcon.js +26 -8
  307. package/build/statusIcon/StatusIcon.js.map +1 -1
  308. package/build/statusIcon/StatusIcon.mjs +26 -8
  309. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  310. package/build/stepper/Stepper.js +25 -3
  311. package/build/stepper/Stepper.js.map +1 -1
  312. package/build/stepper/Stepper.mjs +25 -3
  313. package/build/stepper/Stepper.mjs.map +1 -1
  314. package/build/stepper/deviceDetection.js +2 -3
  315. package/build/stepper/deviceDetection.js.map +1 -1
  316. package/build/stepper/deviceDetection.mjs +2 -3
  317. package/build/stepper/deviceDetection.mjs.map +1 -1
  318. package/build/sticky/Sticky.js +25 -2
  319. package/build/sticky/Sticky.js.map +1 -1
  320. package/build/sticky/Sticky.mjs +25 -2
  321. package/build/sticky/Sticky.mjs.map +1 -1
  322. package/build/styles/avatar/Avatar.css +29 -0
  323. package/build/styles/badge/Badge.css +6 -0
  324. package/build/styles/circularButton/CircularButton.css +2 -2
  325. package/build/styles/common/circle/Circle.css +4 -0
  326. package/build/styles/main.css +46 -22
  327. package/build/styles/statusIcon/StatusIcon.css +0 -20
  328. package/build/summary/Summary.js +21 -5
  329. package/build/summary/Summary.js.map +1 -1
  330. package/build/summary/Summary.mjs +21 -5
  331. package/build/summary/Summary.mjs.map +1 -1
  332. package/build/tabs/Tabs.js +23 -3
  333. package/build/tabs/Tabs.js.map +1 -1
  334. package/build/tabs/Tabs.mjs +23 -3
  335. package/build/tabs/Tabs.mjs.map +1 -1
  336. package/build/tile/Tile.js +24 -2
  337. package/build/tile/Tile.js.map +1 -1
  338. package/build/tile/Tile.mjs +24 -2
  339. package/build/tile/Tile.mjs.map +1 -1
  340. package/build/title/Title.js +23 -1
  341. package/build/title/Title.js.map +1 -1
  342. package/build/title/Title.mjs +23 -1
  343. package/build/title/Title.mjs.map +1 -1
  344. package/build/tooltip/Tooltip.js +22 -1
  345. package/build/tooltip/Tooltip.js.map +1 -1
  346. package/build/tooltip/Tooltip.mjs +22 -1
  347. package/build/tooltip/Tooltip.mjs.map +1 -1
  348. package/build/typeahead/Typeahead.js +22 -4
  349. package/build/typeahead/Typeahead.js.map +1 -1
  350. package/build/typeahead/Typeahead.mjs +22 -4
  351. package/build/typeahead/Typeahead.mjs.map +1 -1
  352. package/build/types/avatar/Avatar.d.ts.map +1 -1
  353. package/build/types/badge/Badge.d.ts.map +1 -1
  354. package/build/types/button/Button.d.ts.map +1 -1
  355. package/build/types/button/Button.messages.d.ts +7 -7
  356. package/build/types/button/Button.messages.d.ts.map +1 -1
  357. package/build/types/button/classMap.d.ts +10 -10
  358. package/build/types/button/classMap.d.ts.map +1 -1
  359. package/build/types/button/legacyUtils/index.d.ts +1 -1
  360. package/build/types/button/legacyUtils/index.d.ts.map +1 -1
  361. package/build/types/button/legacyUtils/legacyUtils.d.ts +20 -6
  362. package/build/types/button/legacyUtils/legacyUtils.d.ts.map +1 -1
  363. package/build/types/checkboxButton/index.d.ts +1 -1
  364. package/build/types/checkboxButton/index.d.ts.map +1 -1
  365. package/build/types/common/circle/Circle.d.ts +1 -1
  366. package/build/types/common/circle/Circle.d.ts.map +1 -1
  367. package/build/types/common/fakeEvents.d.ts +23 -0
  368. package/build/types/common/fakeEvents.d.ts.map +1 -0
  369. package/build/types/common/hooks/index.d.ts +4 -4
  370. package/build/types/common/hooks/index.d.ts.map +1 -1
  371. package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -1
  372. package/build/types/common/hooks/useConditionalListener/index.d.ts.map +1 -1
  373. package/build/types/common/hooks/useDirection/index.d.ts +1 -1
  374. package/build/types/common/hooks/useDirection/index.d.ts.map +1 -1
  375. package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -1
  376. package/build/types/common/hooks/useHasIntersected/index.d.ts.map +1 -1
  377. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +15 -4
  378. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
  379. package/build/types/common/index.d.ts +28 -28
  380. package/build/types/common/index.d.ts.map +1 -1
  381. package/build/types/common/responsivePanel/index.d.ts +1 -1
  382. package/build/types/common/responsivePanel/index.d.ts.map +1 -1
  383. package/build/types/index.d.ts +1 -0
  384. package/build/types/index.d.ts.map +1 -1
  385. package/build/types/navigationOption/NavigationOption.d.ts +1 -0
  386. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  387. package/build/types/statusIcon/StatusIcon.d.ts +7 -3
  388. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  389. package/build/types/stepper/deviceDetection.d.ts +1 -1
  390. package/build/types/stepper/deviceDetection.d.ts.map +1 -1
  391. package/build/types/test-utils/style-mock.d.ts +1 -0
  392. package/build/types/test-utils/style-mock.d.ts.map +1 -0
  393. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts +8 -6
  394. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
  395. package/build/types/utilities/deprecatedProperty/index.d.ts +1 -1
  396. package/build/types/utilities/deprecatedProperty/index.d.ts.map +1 -1
  397. package/build/types/utilities/index.d.ts +2 -2
  398. package/build/types/utilities/index.d.ts.map +1 -1
  399. package/build/types/utilities/logActionRequired.d.ts +2 -2
  400. package/build/types/utilities/logActionRequired.d.ts.map +1 -1
  401. package/build/upload/Upload.js +21 -2
  402. package/build/upload/Upload.js.map +1 -1
  403. package/build/upload/Upload.mjs +21 -2
  404. package/build/upload/Upload.mjs.map +1 -1
  405. package/build/upload/steps/processingStep/processingStep.js +25 -3
  406. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  407. package/build/upload/steps/processingStep/processingStep.mjs +25 -3
  408. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  409. package/build/upload/steps/uploadImageStep/uploadImageStep.js +23 -3
  410. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  411. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +23 -3
  412. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  413. package/build/uploadInput/UploadInput.js +22 -3
  414. package/build/uploadInput/UploadInput.js.map +1 -1
  415. package/build/uploadInput/UploadInput.mjs +22 -3
  416. package/build/uploadInput/UploadInput.mjs.map +1 -1
  417. package/build/uploadInput/uploadButton/UploadButton.js +21 -2
  418. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  419. package/build/uploadInput/uploadButton/UploadButton.mjs +21 -2
  420. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  421. package/build/uploadInput/uploadButton/defaults.js +24 -0
  422. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  423. package/build/uploadInput/uploadButton/defaults.mjs +24 -0
  424. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  425. package/build/uploadInput/uploadItem/UploadItem.js +21 -4
  426. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  427. package/build/uploadInput/uploadItem/UploadItem.mjs +21 -4
  428. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  429. package/build/utilities/logActionRequired.js.map +1 -1
  430. package/build/utilities/logActionRequired.mjs.map +1 -1
  431. package/build/withDisplayFormat/WithDisplayFormat.js +25 -1
  432. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  433. package/build/withDisplayFormat/WithDisplayFormat.mjs +25 -1
  434. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  435. package/package.json +3 -3
  436. package/src/avatar/Avatar.css +29 -0
  437. package/src/avatar/Avatar.less +12 -0
  438. package/src/avatar/Avatar.tsx +4 -8
  439. package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -22
  440. package/src/badge/Badge.css +6 -0
  441. package/src/badge/Badge.less +6 -0
  442. package/src/badge/Badge.tsx +1 -11
  443. package/src/button/Button.tsx +0 -3
  444. package/src/button/legacyUtils/legacyUtils.ts +74 -0
  445. package/src/circularButton/CircularButton.css +2 -2
  446. package/src/circularButton/CircularButton.less +1 -1
  447. package/src/circularButton/CircularButton.story.tsx +3 -0
  448. package/src/circularButton/CircularButton.tsx +1 -1
  449. package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
  450. package/src/common/circle/Circle.css +4 -0
  451. package/src/common/circle/Circle.less +6 -0
  452. package/src/common/circle/Circle.story.tsx +2 -2
  453. package/src/common/circle/Circle.tsx +25 -2
  454. package/src/common/{fakeEvents.js → fakeEvents.ts} +1 -1
  455. package/src/common/hooks/useHasIntersected/{useHasIntersected.js → useHasIntersected.ts} +20 -11
  456. package/src/flowNavigation/{FlowNavigation.story.js → FlowNavigation.story.tsx} +34 -16
  457. package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -8
  458. package/src/i18n/de.json +5 -0
  459. package/src/i18n/es.json +5 -0
  460. package/src/i18n/fr.json +5 -0
  461. package/src/i18n/hu.json +5 -0
  462. package/src/i18n/id.json +5 -0
  463. package/src/i18n/it.json +5 -0
  464. package/src/i18n/ja.json +5 -0
  465. package/src/i18n/pl.json +5 -0
  466. package/src/i18n/pt.json +5 -0
  467. package/src/i18n/ro.json +5 -0
  468. package/src/i18n/ru.json +5 -0
  469. package/src/i18n/tr.json +5 -0
  470. package/src/index.ts +1 -0
  471. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +78 -0
  472. package/src/main.css +46 -22
  473. package/src/navigationOption/{NavigationOption.story.js → NavigationOption.story.tsx} +23 -5
  474. package/src/navigationOption/NavigationOption.tsx +1 -1
  475. package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -4
  476. package/src/promoCard/PromoCard.spec.tsx +1 -1
  477. package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -4
  478. package/src/select/{Select.story.js → Select.story.tsx} +97 -47
  479. package/src/statusIcon/StatusIcon.css +0 -20
  480. package/src/statusIcon/StatusIcon.less +0 -17
  481. package/src/statusIcon/StatusIcon.spec.tsx +2 -21
  482. package/src/statusIcon/StatusIcon.story.tsx +32 -1
  483. package/src/statusIcon/StatusIcon.tsx +11 -10
  484. package/src/stepper/{deviceDetection.js → deviceDetection.ts} +2 -6
  485. package/src/utilities/deprecatedProperty/{deprecatedProperty.spec.js → deprecatedProperty.spec.ts} +7 -13
  486. package/src/utilities/deprecatedProperty/{deprecatedProperty.js → deprecatedProperty.ts} +23 -4
  487. package/src/utilities/{logActionRequired.js → logActionRequired.ts} +2 -2
  488. package/src/button/legacyUtils/legacyUtils.js +0 -54
  489. package/src/common/requirements.js +0 -440
  490. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +0 -85
  491. /package/src/button/{Button.messages.js → Button.messages.ts} +0 -0
  492. /package/src/button/{classMap.js → classMap.ts} +0 -0
  493. /package/src/button/legacyUtils/{index.js → index.ts} +0 -0
  494. /package/src/checkboxButton/{index.js → index.ts} +0 -0
  495. /package/src/common/hooks/{index.js → index.ts} +0 -0
  496. /package/src/common/hooks/useConditionalListener/{index.js → index.ts} +0 -0
  497. /package/src/common/hooks/useDirection/{index.js → index.ts} +0 -0
  498. /package/src/common/hooks/useHasIntersected/{index.js → index.ts} +0 -0
  499. /package/src/common/{index.js → index.ts} +0 -0
  500. /package/src/common/responsivePanel/{index.js → index.ts} +0 -0
  501. /package/src/test-utils/{style-mock.js → style-mock.ts} +0 -0
  502. /package/src/utilities/deprecatedProperty/{index.js → index.ts} +0 -0
  503. /package/src/utilities/{index.js → index.ts} +0 -0
@@ -1,440 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- /* eslint-disable no-param-reassign */
3
-
4
- const prepRequirements = (alternatives) => {
5
- if (!alternatives || alternatives.length === 0) {
6
- return [];
7
- }
8
-
9
- const preppedAlternatives = copyOf(alternatives);
10
-
11
- preppedAlternatives.forEach((alternative) => {
12
- if (alternative.prepared) {
13
- return;
14
- }
15
-
16
- prepLegacyAlternatives(alternative);
17
-
18
- alternative.properties = prepFields(alternative.properties || alternative.fields);
19
-
20
- // If we're still treating type as a special case, move it to a hidden value
21
- if (alternative.type && alternative.type !== 'object' && !alternative.types) {
22
- alternative.properties.type = {
23
- type: 'string',
24
- enum: [alternative.type],
25
- required: true,
26
- hidden: true,
27
- };
28
-
29
- alternative.type = 'object';
30
- }
31
-
32
- alternative.prepared = true;
33
- });
34
-
35
- return preppedAlternatives;
36
- };
37
-
38
- const prepFields = (fields, model, validationMessages) => {
39
- if (!fields) {
40
- return {};
41
- }
42
-
43
- let preparedFields = copyOf(fields);
44
-
45
- preparedFields = flattenFieldsWithGroups(preparedFields);
46
- preparedFields = transformFieldArrayToMap(preparedFields);
47
- preparedFields = transformNestedKeysToNestedSpecs(preparedFields);
48
-
49
- Object.keys(preparedFields).forEach((key) => {
50
- preparedFields[key] = prepField(preparedFields[key], model, validationMessages);
51
- });
52
-
53
- return preparedFields;
54
- };
55
-
56
- const prepField = (field, model, validationMessages) => {
57
- const preparedField = copyOf(field);
58
-
59
- prepLegacyProps(preparedField);
60
- prepType(preparedField);
61
- prepPattern(preparedField);
62
- prepValidationMessages(preparedField, validationMessages);
63
-
64
- return preparedField;
65
- };
66
-
67
- /**
68
- * In an older format we had an extra fieldGroup level, here we flatten that out
69
- * So the inner arrays of fields within the different field groups are flattened
70
- * to a single array, which is returned.
71
- *
72
- * @param fields
73
- */
74
- const flattenFieldsWithGroups = (fields) => {
75
- if (Array.isArray(fields)) {
76
- let flattenedFields = [];
77
- fields.forEach((field) => {
78
- // If we've been given a group with nested fields, break them out.
79
- if (field.fields) {
80
- flattenedFields = flattenedFields.concat(flattenFieldWithGroup(field, field.fields));
81
- } else if (field.group) {
82
- flattenedFields = flattenedFields.concat(flattenFieldWithGroup(field, field.group));
83
- } else {
84
- // Otherwise it's a regular field, just add it.
85
- flattenedFields.push(field);
86
- }
87
- });
88
- return flattenedFields;
89
- }
90
- return fields;
91
- };
92
-
93
- const flattenFieldWithGroup = (field, subFields) => {
94
- // If first field doesn't have a label, use the one from the group
95
- if (field.name && subFields.length > 0 && !subFields[0].name) {
96
- subFields[0].name = field.name;
97
- }
98
-
99
- if (field.width && subFields.length > 0 && !subFields[0].width) {
100
- subFields[0].width = field.width;
101
- }
102
-
103
- // If there was a tooltip at fieldGroup level move it to first field.
104
- if (field.tooltip && subFields.length > 0 && !subFields[0].help) {
105
- subFields[0].help = { message: field.tooltip };
106
- }
107
-
108
- if (field.info && subFields.length > 0 && !subFields[0].help) {
109
- subFields[0].help = { message: field.info };
110
- }
111
-
112
- // If there are two parts of this group, render them side by side
113
- if (subFields.length === 2) {
114
- subFields.forEach((nestedField) => {
115
- nestedField.width = 'md';
116
- });
117
- }
118
-
119
- // If there are three parts, render the first two side by side
120
- if (subFields.length === 3) {
121
- subFields[0].width = 'md';
122
- subFields[1].width = 'md';
123
- }
124
-
125
- return subFields;
126
- };
127
-
128
- /*
129
- * Some older requirements return an array of fields, where it should be a map
130
- * from the property name to the spec. This converts arrays to maps.
131
- */
132
- const transformFieldArrayToMap = (fields) => {
133
- if (Array.isArray(fields)) {
134
- const fieldMap = {};
135
- fields.forEach((field) => {
136
- const key = field.key || field.name;
137
- delete field.key;
138
-
139
- fieldMap[key] = copyOf(field);
140
- });
141
- return fieldMap;
142
- }
143
- return fields;
144
- };
145
-
146
- /*
147
- * Some older format return keys like 'address.city', expecting the value of
148
- * city to be nested inside an address object. This function creates a spec of
149
- * type 'object', and nests such fields inside of it. When we render we pass
150
- * this object spec to a nested fieldset.
151
- */
152
- const transformNestedKeysToNestedSpecs = (fieldMap) => {
153
- if (Array.isArray(fieldMap)) {
154
- throw new TypeError('Expecting a map of fields, not an array');
155
- }
156
-
157
- const nestedFields = {};
158
- Object.keys(fieldMap).forEach((key) => {
159
- if (key.indexOf('.') > 0) {
160
- // If the key contains a period we need to nest the fields in another object
161
- const pathSections = key.split('.');
162
- const nestedKey = pathSections[0];
163
-
164
- // If this sub object doesn't exist yet, create it
165
- if (!nestedFields[nestedKey]) {
166
- nestedFields[nestedKey] = {
167
- type: 'object',
168
- properties: {},
169
- };
170
- }
171
- nestedFields[nestedKey].properties[pathSections[1]] = fieldMap[key];
172
- } else {
173
- nestedFields[key] = fieldMap[key];
174
- }
175
- });
176
- return nestedFields;
177
- };
178
-
179
- const prepType = (field) => {
180
- const type = field.type && field.type.toLowerCase && field.type.toLowerCase();
181
-
182
- switch (type) {
183
- case 'text':
184
- field.type = 'string';
185
- break;
186
- case 'date':
187
- field.type = 'string';
188
- field.format = 'date';
189
- break;
190
- case 'password':
191
- field.type = 'string';
192
- field.control = 'password';
193
- break;
194
- case 'checkbox':
195
- field.type = 'boolean';
196
- break;
197
- case 'select':
198
- if (!field.control) {
199
- field.control = 'select';
200
- }
201
- delete field.type;
202
- break;
203
- case 'radio':
204
- field.control = 'radio';
205
- delete field.type;
206
- break;
207
- case 'upload':
208
- field.type = 'string';
209
- field.format = 'base64url';
210
- break;
211
- case 'tel':
212
- field.type = 'string';
213
- field.format = 'phone';
214
- break;
215
- case 'textarea':
216
- field.type = 'string';
217
- field.control = 'textarea';
218
- break;
219
- default:
220
- }
221
-
222
- if (!field.control && field.type !== 'object') {
223
- field.control = getControlType(field);
224
- }
225
- };
226
-
227
- const prepLegacyAlternatives = (alternative) => {
228
- if (!alternative.title && alternative.label) {
229
- alternative.title = alternative.label;
230
- }
231
- if (!alternative.title) {
232
- alternative.title = getNameFromType(alternative.type);
233
- }
234
- if (!alternative.type && alternative.name) {
235
- alternative.type = alternative.name;
236
- }
237
- if (!alternative.description && alternative.tooltip) {
238
- alternative.description = alternative.tooltip;
239
- }
240
- if (alternative.fieldGroups && !alternative.fields) {
241
- alternative.fields = flattenFieldsWithGroups(alternative.fieldGroups);
242
- delete alternative.fieldGroups;
243
- }
244
- };
245
-
246
- const prepLegacyProps = (field) => {
247
- if (field.name && !field.title) {
248
- field.title = field.name;
249
- delete field.name;
250
- }
251
-
252
- if (field.validationRegexp) {
253
- field.pattern = field.validationRegexp;
254
- delete field.validationRegexp;
255
- }
256
-
257
- if (field.min) {
258
- field.minimum = field.min;
259
- delete field.min;
260
- }
261
-
262
- if (field.max) {
263
- field.maximum = field.max;
264
- delete field.max;
265
- }
266
-
267
- if (field.example && !field.placeholder) {
268
- field.placeholder = field.example;
269
- delete field.example;
270
- }
271
-
272
- if (field.tooltip && !field.help) {
273
- field.help = { message: field.tooltip };
274
- delete field.tooltip;
275
- }
276
-
277
- if (field.valuesAllowed && !field.values) {
278
- field.values = field.valuesAllowed;
279
- delete field.valuesAllowed;
280
- }
281
-
282
- if (field.values && field.values.map) {
283
- field.values = prepLegacyValues(field.values);
284
- }
285
-
286
- if (field.value && !field.default) {
287
- field.default = field.value;
288
- delete field.value;
289
- }
290
-
291
- if (field.values) {
292
- // In some legacy arrays the first value is a placeholder, extract it.
293
- if (
294
- field.values &&
295
- field.values.length > 0 &&
296
- field.values[0] &&
297
- !field.values[0].value &&
298
- field.values[0].label &&
299
- !field.placeholder
300
- ) {
301
- field.placeholder = field.values[0].label;
302
- field.values = field.values.slice(1);
303
- }
304
- }
305
- };
306
-
307
- const prepLegacyValues = (values) => values.map(prepLegacyValue);
308
-
309
- const prepLegacyValue = (value) => {
310
- if (!value.label && value.title) {
311
- value.label = value.title;
312
- delete value.title;
313
- }
314
- if (!value.label && value.name) {
315
- value.label = value.name;
316
- delete value.name;
317
- }
318
-
319
- if (!value.value && value.code) {
320
- value.value = value.code;
321
- delete value.code;
322
- }
323
- if (!value.value && value.key) {
324
- value.value = value.key;
325
- delete value.key;
326
- }
327
-
328
- return value;
329
- };
330
-
331
- const prepPattern = (field) => {
332
- if (field.pattern) {
333
- try {
334
- new RegExp(field.pattern);
335
- } catch {
336
- // eslint-disable-next-line no-console
337
- console.warn('API regexp is invalid');
338
- delete field.pattern;
339
- }
340
- } else {
341
- delete field.pattern;
342
- }
343
- };
344
-
345
- const prepValidationMessages = (field, validationMessages) => {
346
- field.validationMessages = field.validationMessages
347
- ? field.validationMessages
348
- : validationMessages;
349
-
350
- if (!field.validationMessages) {
351
- delete field.validationMessages;
352
- return;
353
- }
354
-
355
- if (field.validationMessages.minimum) {
356
- field.validationMessages.min = field.validationMessages.minimum;
357
- delete field.validationMessages.minimum;
358
- }
359
- if (field.validationMessages.maximum) {
360
- field.validationMessages.max = field.validationMessages.maximum;
361
- delete field.validationMessages.maximum;
362
- }
363
- };
364
-
365
- const getControlType = (field) => {
366
- if (field.control) {
367
- return field.control.toLowerCase();
368
- }
369
- if (field.hidden) {
370
- return 'hidden';
371
- }
372
- if (field.values && field.values.length > 0) {
373
- return getSelectionType(field);
374
- }
375
-
376
- switch (field.type) {
377
- case 'string':
378
- return getControlForStringFormat(field.format);
379
- case 'number':
380
- case 'integer':
381
- return 'number';
382
- case 'boolean':
383
- return 'checkbox';
384
- default:
385
- return 'text';
386
- }
387
- };
388
-
389
- const getControlForStringFormat = (format) => {
390
- switch (format) {
391
- case 'date':
392
- return 'date';
393
- case 'base64url':
394
- return 'file';
395
- case 'password':
396
- return 'password';
397
- case 'uri':
398
- return 'text'; // 'url'; - not implemented
399
- case 'email':
400
- return 'text'; // 'email'; - not implemented
401
- case 'phone':
402
- return 'tel';
403
- default:
404
- return 'text';
405
- }
406
- };
407
-
408
- const getSelectionType = (field) => {
409
- if (field.control) {
410
- return field.control;
411
- }
412
- if (field.type === 'select') {
413
- return 'select';
414
- }
415
- if (field.type === 'radio') {
416
- return 'radio';
417
- }
418
-
419
- if (field.values) {
420
- return field.values.length > 3 ? 'select' : 'radio';
421
- }
422
- return 'select';
423
- };
424
-
425
- const copyOf = (object) => JSON.parse(JSON.stringify(object));
426
-
427
- /**
428
- * Some older requirments formats do not include a label for alternatives
429
- *
430
- * @param tabType
431
- */
432
- const getNameFromType = (tabType) => {
433
- if (tabType && tabType.length > 0) {
434
- const tabNameWithSpaces = tabType.toLowerCase().split('_').join(' '); // String.replace method only replaces first instance
435
- return tabNameWithSpaces.charAt(0).toUpperCase() + tabNameWithSpaces.slice(1);
436
- }
437
- return '';
438
- };
439
-
440
- export { prepFields, getControlType };
@@ -1,85 +0,0 @@
1
- import { text } from '@storybook/addon-knobs';
2
- import { userEvent, within } from '@storybook/test';
3
-
4
- import InputWithDisplayFormat from '.';
5
- import { Field } from '../field/Field';
6
-
7
- export default {
8
- component: InputWithDisplayFormat,
9
- title: 'Forms/InputWithDisplayFormat',
10
- };
11
-
12
- export const Basic = () => {
13
- const placeholder = text('Placeholder', '**-**-**');
14
- const displayPattern = text('DisplayPattern', '**-**-**');
15
-
16
- return (
17
- <Field label="Display pattern is controlled via knobs" id="Basic">
18
- <InputWithDisplayFormat
19
- id="Basic"
20
- placeholder={placeholder}
21
- displayPattern={displayPattern}
22
- className="form-control"
23
- onChange={(v) => console.log(v)}
24
- onBlur={(v) => console.log(v)}
25
- onFocus={(v) => console.log(v)}
26
- />
27
- </Field>
28
- );
29
- };
30
-
31
- const Template = (args) => {
32
- const placeholder = args.pattern;
33
- const displayPattern = args.pattern;
34
- const label = args.label;
35
- const id = label.replaceAll(' ', '-').toLowerCase();
36
-
37
- return (
38
- <Field label={label} id={id}>
39
- <InputWithDisplayFormat
40
- id={id}
41
- placeholder={placeholder}
42
- displayPattern={displayPattern}
43
- className="form-control"
44
- onChange={(v) => console.log(v)}
45
- onBlur={(v) => console.log(v)}
46
- onFocus={(v) => console.log(v)}
47
- />
48
- </Field>
49
- );
50
- };
51
-
52
- export const CardNumber = Template.bind({});
53
- CardNumber.args = {
54
- label: 'Card Number',
55
- pattern: '**** **** **** **** ***',
56
- };
57
-
58
- export const CVC = Template.bind({});
59
- CVC.args = {
60
- label: 'CVC',
61
- pattern: '***',
62
- };
63
-
64
- export const ExpiryDate = Template.bind({});
65
- ExpiryDate.args = {
66
- label: 'Expiry Date',
67
- pattern: '** / **',
68
- };
69
-
70
- export const SecurityPin = Template.bind({});
71
- SecurityPin.args = {
72
- label: 'Security Pin',
73
- pattern: '*-*-*-*-*-*',
74
- };
75
-
76
- export const SecurityPinPlay = Template.bind({});
77
- SecurityPinPlay.args = {
78
- label: 'Security Pin',
79
- pattern: '*-*-*-*-*-*',
80
- };
81
-
82
- SecurityPinPlay.play = async ({ canvasElement }) => {
83
- const canvas = within(canvasElement);
84
- await userEvent.type(canvas.getByPlaceholderText('*-*-*-*-*-*'), '123456');
85
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes