@rabbitio/ui-kit 1.0.0-beta.65 → 1.0.0-beta.68

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 (254) hide show
  1. package/coverage/clover.xml +6311 -4236
  2. package/coverage/coverage-final.json +160 -99
  3. package/coverage/index.html +442 -187
  4. package/coverage/{rabbit-ui-kit → ui-kit}/index.html +3 -3
  5. package/coverage/{rabbit-ui-kit → ui-kit}/index.js.html +3 -3
  6. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html → ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html} +8 -29
  7. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html → ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html} +9 -24
  8. package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/arrowWhite.jsx.html +7 -25
  9. package/coverage/ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html +106 -0
  10. package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/determinedError.jsx.html +9 -42
  11. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html → ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html} +28 -31
  12. package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/index.html +25 -25
  13. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html → ui-kit/src/assets/wrappedImages/infoIcon.jsx.html} +13 -19
  14. package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/noticeQuestionIcon.jsx.html +7 -25
  15. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/walletIcon.jsx.html → ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html} +23 -59
  16. package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/infoIcon.jsx.html → ui-kit/src/assets/wrappedImages/walletIcon.jsx.html} +16 -16
  17. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/axiosAdapter.js.html +3 -3
  18. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/index.html +3 -3
  19. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/qrUtils.js.html +3 -3
  20. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/amountUtils.js.html +44 -308
  21. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/errorUtils.js.html +3 -3
  22. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/apiGroups.js.html +3 -3
  23. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/index.html +14 -14
  24. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/ipAddressProviders.js.html +31 -178
  25. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/fiatCurrenciesService.js.html +12 -36
  26. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/index.html +20 -20
  27. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/blockchain.js.html +3 -3
  28. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/coin.js.html +10 -22
  29. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/index.html +13 -13
  30. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/protocol.js.html +3 -3
  31. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/cache.js.html +23 -101
  32. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/emailAPI.js.html +9 -15
  33. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/index.html +19 -19
  34. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/index.html +9 -9
  35. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logger.js.html +14 -35
  36. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logsStorage.js.html +5 -5
  37. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/postponeExecution.js.html +3 -3
  38. package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/safeStringify.js.html +29 -29
  39. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetIcon/AssetIcon.jsx.html +11 -41
  40. package/coverage/ui-kit/src/components/atoms/AssetIcon/index.html +116 -0
  41. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/AssetSelection.jsx.html +9 -33
  42. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/index.html +7 -7
  43. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +8 -38
  44. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/index.html +7 -7
  45. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/InformationMessage.jsx.html +8 -38
  46. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/index.html +7 -7
  47. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/Input.jsx.html +15 -63
  48. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/index.html +7 -7
  49. package/coverage/ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +196 -0
  50. package/coverage/{rabbit-ui-kit/src/components/atoms/RateSelector → ui-kit/src/components/atoms/LoadingDots}/index.html +4 -4
  51. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/NoticeIcon/NoticeIcon.jsx.html +10 -40
  52. package/coverage/{rabbit-ui-kit/src/components/atoms/AssetIcon → ui-kit/src/components/atoms/NoticeIcon}/index.html +4 -4
  53. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/QrCode.jsx.html +8 -26
  54. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/index.html +7 -7
  55. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/RateSelector/RateSelector.jsx.html +10 -34
  56. package/coverage/ui-kit/src/components/atoms/RateSelector/index.html +116 -0
  57. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/SupportChat.jsx.html +7 -22
  58. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/index.html +7 -7
  59. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/Textarea.jsx.html +17 -53
  60. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/index.html +7 -7
  61. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/TitleBox.jsx.html +13 -82
  62. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/index.html +7 -7
  63. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/Tooltip.jsx.html +12 -18
  64. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/index.html +7 -7
  65. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +12 -30
  66. package/coverage/{rabbit-ui-kit/src/components/atoms/NoticeIcon → ui-kit/src/components/atoms/TwoLinesOfText}/index.html +4 -4
  67. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/Validation.jsx.html +3 -3
  68. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/index.html +3 -3
  69. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/Button.jsx.html +23 -113
  70. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/index.html +7 -7
  71. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/Close.jsx.html +9 -27
  72. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/index.html +7 -7
  73. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/LinkButton.jsx.html +11 -38
  74. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/index.html +7 -7
  75. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +13 -67
  76. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/index.html +7 -7
  77. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/index.html +7 -7
  78. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useCallHandlingErrors.js.html +7 -19
  79. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useReferredState.js.html +4 -4
  80. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/AmountInput.jsx.html +56 -407
  81. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/index.html +7 -7
  82. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/CoinPicker.jsx.html +67 -466
  83. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/index.html +7 -7
  84. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +7 -22
  85. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/index.html +7 -7
  86. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
  87. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/index.html +3 -3
  88. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +9 -15
  89. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/index.html +7 -7
  90. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/Dialog.jsx.html +44 -194
  91. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
  92. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/index.html +3 -3
  93. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +61 -523
  94. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/index.html +7 -7
  95. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/index.html +7 -7
  96. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/SwapForm.jsx.html +96 -762
  97. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/index.html +7 -7
  98. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
  99. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/index.html +3 -3
  100. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/index.html +20 -20
  101. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/inputValueProviders.js.html +11 -35
  102. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/textUtils.js.html +3 -3
  103. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/uiUtils.js.html +7 -13
  104. package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/urlQueryUtils.js.html +18 -93
  105. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/close.jsx.html +3 -3
  106. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/index.html +3 -3
  107. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/index.html +3 -3
  108. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/linkButton.jsx.html +3 -3
  109. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/index.html +3 -3
  110. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/tooltip.jsx.html +3 -3
  111. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/globalConstants.jsx.html +7 -10
  112. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/index.html +7 -7
  113. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/dialogStep.js.html +3 -3
  114. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/index.html +3 -3
  115. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/dialog.js.html +3 -3
  116. package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/index.html +3 -3
  117. package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +7 -7
  118. package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +8 -26
  119. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js.html +30 -222
  120. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js.html +24 -147
  121. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cancelProcessing.js.html +3 -3
  122. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js.html +19 -103
  123. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalApiProvider.js.html +3 -3
  124. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalServicesStatsCollector.js.html +11 -23
  125. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/index.html +38 -38
  126. package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/robustExternalAPICallerService.js.html +53 -305
  127. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +24 -24
  128. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +10 -28
  129. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +277 -1009
  130. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
  131. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
  132. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +9 -27
  133. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +13 -13
  134. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/index.html +7 -7
  135. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/publicSwapService.js.html +53 -374
  136. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +13 -13
  137. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +32 -179
  138. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
  139. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
  140. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
  141. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
  142. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
  143. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
  144. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
  145. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
  146. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
  147. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +3 -3
  148. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/index.html +3 -3
  149. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
  150. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
  151. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/index.html +3 -3
  152. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
  153. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
  154. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
  155. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
  156. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
  157. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/index.html +3 -3
  158. package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
  159. package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/index.html +3 -3
  160. package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
  161. package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +3 -3
  162. package/dist/index.cjs +12 -14
  163. package/dist/index.cjs.map +1 -1
  164. package/dist/index.css +5 -2
  165. package/dist/index.css.map +1 -1
  166. package/dist/index.modern.js +12 -13
  167. package/dist/index.modern.js.map +1 -1
  168. package/dist/index.module.js +12 -14
  169. package/dist/index.module.js.map +1 -1
  170. package/dist/index.umd.js +12 -14
  171. package/dist/index.umd.js.map +1 -1
  172. package/package.json +5 -3
  173. package/src/assets/wrappedImages/arrowIcon.jsx +1 -7
  174. package/src/assets/wrappedImages/arrowTosca.jsx +1 -7
  175. package/src/assets/wrappedImages/arrowWhite.jsx +1 -7
  176. package/src/assets/wrappedImages/darkRectangle.jsx +2 -13
  177. package/src/assets/wrappedImages/determinedError.jsx +2 -13
  178. package/src/assets/wrappedImages/failedValidationIcon.jsx +2 -16
  179. package/src/assets/wrappedImages/infoIcon.jsx +1 -7
  180. package/src/assets/wrappedImages/noticeQuestionIcon.jsx +1 -7
  181. package/src/assets/wrappedImages/successfulValidationIcon.jsx +2 -16
  182. package/src/assets/wrappedImages/walletIcon.jsx +3 -19
  183. package/src/common/amountUtils.js +36 -124
  184. package/src/common/external-apis/ipAddressProviders.js +22 -71
  185. package/src/common/fiatCurrenciesService.js +4 -12
  186. package/src/common/models/coin.js +2 -6
  187. package/src/common/tests/amountUtils/composeRateText.test.js +12 -69
  188. package/src/common/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +1 -3
  189. package/src/common/utils/cache.js +10 -36
  190. package/src/common/utils/emailAPI.js +1 -3
  191. package/src/common/utils/logging/logger.js +5 -12
  192. package/src/components/atoms/AssetIcon/AssetIcon.jsx +4 -14
  193. package/src/components/atoms/AssetSelection/AssetSelection.jsx +3 -11
  194. package/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx +2 -12
  195. package/src/components/atoms/InformationMessage/InformationMessage.jsx +2 -12
  196. package/src/components/atoms/InformationMessage/information-message.module.scss +4 -2
  197. package/src/components/atoms/Input/Input.jsx +9 -25
  198. package/src/components/atoms/LoadingDots/LoadingDots.jsx +8 -28
  199. package/src/components/atoms/NoticeIcon/NoticeIcon.jsx +4 -14
  200. package/src/components/atoms/QrCode/QrCode.jsx +2 -8
  201. package/src/components/atoms/RateSelector/RateSelector.jsx +4 -12
  202. package/src/components/atoms/SupportChat/SupportChat.jsx +1 -6
  203. package/src/components/atoms/Textarea/Textarea.jsx +11 -23
  204. package/src/components/atoms/TitleBox/TitleBox.jsx +7 -30
  205. package/src/components/atoms/TitleBox/title-box.module.scss +2 -0
  206. package/src/components/atoms/Tooltip/Tooltip.jsx +6 -8
  207. package/src/components/atoms/TwoLinesOfText/LinesOfText.jsx +5 -11
  208. package/src/components/atoms/buttons/Button/Button.jsx +17 -47
  209. package/src/components/atoms/buttons/Close/Close.jsx +3 -9
  210. package/src/components/atoms/buttons/LinkButton/LinkButton.jsx +5 -14
  211. package/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx +7 -25
  212. package/src/components/hooks/useCallHandlingErrors.js +1 -5
  213. package/src/components/hooks/useReferredState.js +1 -1
  214. package/src/components/molecules/AmountInput/AmountInput.jsx +50 -167
  215. package/src/components/molecules/CoinPicker/CoinPicker.jsx +61 -194
  216. package/src/components/molecules/CoinPicker/coin-picker.module.scss +1 -4
  217. package/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx +1 -6
  218. package/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx +3 -5
  219. package/src/components/organisms/Dialog/Dialog.jsx +38 -88
  220. package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +55 -209
  221. package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +2 -4
  222. package/src/components/organisms/SwapForm/SwapForm.jsx +90 -312
  223. package/src/components/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +5 -12
  224. package/src/components/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +3 -9
  225. package/src/components/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +11 -51
  226. package/src/components/utils/inputValueProviders.js +3 -11
  227. package/src/components/utils/uiUtils.js +1 -3
  228. package/src/components/utils/urlQueryUtils.js +10 -35
  229. package/src/constants/globalConstants.jsx +1 -2
  230. package/src/index.js +2 -8
  231. package/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js +22 -86
  232. package/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js +15 -56
  233. package/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js +11 -39
  234. package/src/robustExteranlApiCallerService/externalServicesStatsCollector.js +3 -7
  235. package/src/robustExteranlApiCallerService/robustExternalAPICallerService.js +45 -129
  236. package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +76 -330
  237. package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +57 -270
  238. package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +3 -15
  239. package/src/swaps-lib/external-apis/swapProvider.js +1 -7
  240. package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +117 -361
  241. package/src/swaps-lib/models/existingSwapWithFiatData.js +1 -7
  242. package/src/swaps-lib/services/publicSwapService.js +47 -154
  243. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +33 -118
  244. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +23 -85
  245. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getAllSupportedCurrencies.test.js +4 -14
  246. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getDepositCurrencies.test.js +3 -9
  247. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +148 -460
  248. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getWithdrawalCurrencies.test.js +5 -11
  249. package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +2 -10
  250. package/src/swaps-lib/utils/swapUtils.js +24 -73
  251. package/coverage/rabbit-ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html +0 -244
  252. package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +0 -256
  253. package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/index.html +0 -116
  254. package/coverage/rabbit-ui-kit/src/components/atoms/TwoLinesOfText/index.html +0 -116
@@ -116,36 +116,29 @@ export const DialogStep = ({
116
116
 
117
117
  const [isMultiStep, setIsMultiStep] = useState(false);
118
118
  const [stepClass, setStepClass] = useState("");
119
- const [wrapperDirectionSubclass, setWrapperDirectionSubclass] =
120
- useState("");
121
- const [unmountOnAnimationEndTrigger, setUnmountOnAnimationEndTrigger] =
122
- useState(0);
119
+ const [wrapperDirectionSubclass, setWrapperDirectionSubclass] = useState("");
120
+ const [unmountOnAnimationEndTrigger, setUnmountOnAnimationEndTrigger] = useState(0);
123
121
  const [stepMounted, setStepMounted] = useState(false);
124
122
  const [isTopImagePassed, setIsTopImagePassed] = useState(false);
125
123
 
126
124
  const currentStepRef = useRef();
127
125
  // const { t } = useTranslation();
128
126
 
129
- useEffect(
130
- () => setIsTopImagePassed(!!image || !!ImageRaw),
131
- [image, ImageRaw]
132
- );
127
+ useEffect(() => setIsTopImagePassed(!!image || !!ImageRaw), [image, ImageRaw]);
133
128
 
134
129
  useEffect(() => {
135
130
  if (controls !== {} && stepName !== "") setIsMultiStep(true);
136
131
  // eslint-disable-next-line react-hooks/exhaustive-deps
137
132
  }, []);
138
133
 
139
- const handleTransitionEnd = (event) => {
134
+ const handleTransitionEnd = event => {
140
135
  if (
141
136
  isMultiStep &&
142
137
  isCurrentStep(stepName) &&
143
138
  event.propertyName === "opacity" &&
144
139
  event.target.classList[0] === s[DIALOG_STEP_CLASS]
145
140
  ) {
146
- disableAnimation(
147
- animationConfiguration.animateHeightTransitionEnabled
148
- );
141
+ disableAnimation(animationConfiguration.animateHeightTransitionEnabled);
149
142
  }
150
143
 
151
144
  if (
@@ -180,11 +173,10 @@ export const DialogStep = ({
180
173
  if (getStepClass(stepName) === "current") setStepMounted(true);
181
174
 
182
175
  if (stepClass === "current" && getStepClass(stepName) !== "current")
183
- setUnmountOnAnimationEndTrigger((prev) => prev + 1);
176
+ setUnmountOnAnimationEndTrigger(prev => prev + 1);
184
177
 
185
178
  setWrapperDirectionSubclass(
186
- getStepClass(stepName) === "current" &&
187
- animationConfiguration.currentStepAnimationEnabled
179
+ getStepClass(stepName) === "current" && animationConfiguration.currentStepAnimationEnabled
188
180
  ? stepClass === "prev"
189
181
  ? "appear-from-left"
190
182
  : "appear-from-right"
@@ -204,17 +196,14 @@ export const DialogStep = ({
204
196
  if (multiStep && isCurrentStep(stepName)) {
205
197
  setTimeout(
206
198
  () => updateButtonControllingStep(stepName),
207
- buttonControllingStep === ""
208
- ? 0
209
- : DIALOG_TRANSITION_STEP_DURATION
199
+ buttonControllingStep === "" ? 0 : DIALOG_TRANSITION_STEP_DURATION
210
200
  );
211
201
 
212
202
  setTimeout(() => {
213
203
  updateButtonsConfiguration(
214
204
  {
215
205
  primaryButtonTitle: confirmButtonText,
216
- primaryButtonOnClick: (resetButtonLoader) =>
217
- confirmButtonClick(resetButtonLoader),
206
+ primaryButtonOnClick: resetButtonLoader => confirmButtonClick(resetButtonLoader),
218
207
  primaryButtonLoader: primaryButtonLoader,
219
208
  primaryButtonTo: confirmButtonLink,
220
209
  primaryButtonSetClickTrigger: setClickTrigger,
@@ -226,7 +215,7 @@ export const DialogStep = ({
226
215
  stepName
227
216
  );
228
217
 
229
- updateAnimationConfiguration((prev) => {
218
+ updateAnimationConfiguration(prev => {
230
219
  return {
231
220
  ...prev,
232
221
  hideMobileBottomButtonSection: false,
@@ -234,7 +223,7 @@ export const DialogStep = ({
234
223
  });
235
224
  }, DIALOG_TRANSITION_STEP_DURATION * 3);
236
225
 
237
- updateDialogConfiguration((prev) => {
226
+ updateDialogConfiguration(prev => {
238
227
  return {
239
228
  ...prev,
240
229
  cornerBackButtonTitle: cornerBackButtonTitle,
@@ -247,17 +236,11 @@ export const DialogStep = ({
247
236
  }, [currentStep]);
248
237
 
249
238
  useEffect(() => {
250
- if (
251
- isMultiStep &&
252
- isCurrentStep(stepName) &&
253
- fixedButtons &&
254
- (confirmButtonText || backButtonText)
255
- ) {
239
+ if (isMultiStep && isCurrentStep(stepName) && fixedButtons && (confirmButtonText || backButtonText)) {
256
240
  updateButtonsConfiguration(
257
241
  {
258
242
  primaryButtonTitle: confirmButtonText,
259
- primaryButtonOnClick: (resetButtonLoader) =>
260
- confirmButtonClick(resetButtonLoader),
243
+ primaryButtonOnClick: resetButtonLoader => confirmButtonClick(resetButtonLoader),
261
244
  primaryButtonLoader: primaryButtonLoader,
262
245
  primaryButtonTo: confirmButtonLink,
263
246
  primaryButtonSetClickTrigger: setClickTrigger,
@@ -291,14 +274,11 @@ export const DialogStep = ({
291
274
  s[DIALOG_STEP_CLASS] +
292
275
  " " +
293
276
  s[stepClass] +
294
- (!isMultiStep ||
295
- !animationConfiguration?.currentStepAnimationEnabled
277
+ (!isMultiStep || !animationConfiguration?.currentStepAnimationEnabled
296
278
  ? " " + s["animation-disabled"]
297
279
  : "") +
298
280
  (!isMultiStep ? " " + s["single-step"] : "") +
299
- (backgroundImage || backgroundImageMobile
300
- ? " " + s["with-background"]
301
- : "") +
281
+ (backgroundImage || backgroundImageMobile ? " " + s["with-background"] : "") +
302
282
  (inline ? " " + s["inline"] : "")
303
283
  }
304
284
  ref={currentStepRef}
@@ -308,25 +288,15 @@ export const DialogStep = ({
308
288
  {stepMounted ? (
309
289
  <>
310
290
  {backgroundImage || backgroundImageMobile ? (
311
- <div
312
- className={
313
- s["dialog-step-background-image"] +
314
- " " +
315
- s[stepClass]
316
- }
317
- >
291
+ <div className={s["dialog-step-background-image"] + " " + s[stepClass]}>
318
292
  {backgroundImage ? (
319
293
  <img
320
294
  src={backgroundImage}
321
295
  className={
322
- s[
323
- "dialog-step-background-image-desktop"
324
- ] +
296
+ s["dialog-step-background-image-desktop"] +
325
297
  " " +
326
298
  stepClass +
327
- (!backgroundImageMobile
328
- ? " " + s["primary"]
329
- : "")
299
+ (!backgroundImageMobile ? " " + s["primary"] : "")
330
300
  }
331
301
  alt={"dialog step background"}
332
302
  />
@@ -335,14 +305,10 @@ export const DialogStep = ({
335
305
  <img
336
306
  src={backgroundImageMobile}
337
307
  className={
338
- s[
339
- "dialog-step-background-image-mobile"
340
- ] +
308
+ s["dialog-step-background-image-mobile"] +
341
309
  " " +
342
310
  stepClass +
343
- (!backgroundImage
344
- ? " " + s["primary"]
345
- : "")
311
+ (!backgroundImage ? " " + s["primary"] : "")
346
312
  }
347
313
  alt={"dialog step background"}
348
314
  />
@@ -359,37 +325,19 @@ export const DialogStep = ({
359
325
  (inline ? " " + s["inline"] : "")
360
326
  }
361
327
  >
362
- {isMultiStep &&
363
- showCornerButtonForStep(
364
- stepName,
365
- showCornerBackButton
366
- ) ? (
367
- <div
368
- className={s["dialog-step-wrapper-back-button"]}
369
- >
328
+ {isMultiStep && showCornerButtonForStep(stepName, showCornerBackButton) ? (
329
+ <div className={s["dialog-step-wrapper-back-button"]}>
370
330
  <LinkButton
371
- onClick={
372
- cornerBackButtonClick
373
- ? cornerBackButtonClick
374
- : previousStep
375
- }
331
+ onClick={cornerBackButtonClick ? cornerBackButtonClick : previousStep}
376
332
  content={
377
333
  cornerBackButtonTitle
378
334
  ? cornerBackButtonTitle
379
335
  : // : t("organisms.DialogWithSteps.DialogStep.default-back-button-title")
380
336
  "Back"
381
337
  }
382
- IconComponent={
383
- backgroundImage || backgroundImageMobile
384
- ? arrowWhite
385
- : arrowTosca
386
- }
338
+ IconComponent={backgroundImage || backgroundImageMobile ? arrowWhite : arrowTosca}
387
339
  iconRotate={ICON_ROTATE_OPTIONS.rotate90}
388
- isColored={
389
- backgroundImage || backgroundImageMobile
390
- ? false
391
- : undefined
392
- }
340
+ isColored={backgroundImage || backgroundImageMobile ? false : undefined}
393
341
  />
394
342
  </div>
395
343
  ) : null}
@@ -398,25 +346,17 @@ export const DialogStep = ({
398
346
  className={
399
347
  s["dialog-step-wrapper-header"] +
400
348
  (headerTitleLeft ? " " + s["text-left"] : "") +
401
- (backgroundImage || backgroundImageMobile
402
- ? " " + s["with-background-image"]
403
- : "")
349
+ (backgroundImage || backgroundImageMobile ? " " + s["with-background-image"] : "")
404
350
  }
405
351
  >
406
352
  {image ? (
407
353
  <img
408
354
  src={image}
409
355
  alt="dialog popup logo"
410
- className={
411
- s["dialog-step-wrapper-header-logo"]
412
- }
356
+ className={s["dialog-step-wrapper-header-logo"]}
413
357
  />
414
358
  ) : ImageRaw ? (
415
- <div
416
- className={
417
- s["dialog-step-wrapper-header-logo"]
418
- }
419
- >
359
+ <div className={s["dialog-step-wrapper-header-logo"]}>
420
360
  <ImageRaw />
421
361
  </div>
422
362
  ) : null}
@@ -424,83 +364,38 @@ export const DialogStep = ({
424
364
  <div
425
365
  className={
426
366
  s["dialog-step-wrapper-header-title"] +
427
- (!isTopImagePassed
428
- ? " " + s["without-logo"]
429
- : "") +
430
- (!isTopImagePassed && headerTitleLeft
431
- ? " " + s["close-button-padding"]
432
- : "") +
433
- (inline
434
- ? " " + s["no-close-button-padding"]
435
- : "")
367
+ (!isTopImagePassed ? " " + s["without-logo"] : "") +
368
+ (!isTopImagePassed && headerTitleLeft ? " " + s["close-button-padding"] : "") +
369
+ (inline ? " " + s["no-close-button-padding"] : "")
436
370
  }
437
371
  >
438
372
  {titleIconCoin ? (
439
- <div
440
- className={
441
- s[
442
- "dialog-step-wrapper-header-title-coin-icon"
443
- ]
444
- }
445
- >
373
+ <div className={s["dialog-step-wrapper-header-title-coin-icon"]}>
446
374
  <AssetIcon
447
375
  assetIconSrc={assetIconSrc}
448
- assetIconProtocolSrc={
449
- assetIconProtocolSrc
450
- }
376
+ assetIconProtocolSrc={assetIconProtocolSrc}
451
377
  fallbackSrc={fallbackSrc}
452
378
  />
453
379
  </div>
454
380
  ) : titleIcon ? (
455
- <div
456
- className={
457
- s[
458
- "dialog-step-wrapper-header-title-icon"
459
- ]
460
- }
461
- >
462
- <img
463
- src={titleIcon}
464
- alt="coin icon to send"
465
- />
381
+ <div className={s["dialog-step-wrapper-header-title-icon"]}>
382
+ <img src={titleIcon} alt="coin icon to send" />
466
383
  </div>
467
384
  ) : null}
468
385
  {titleLoadingDots ? (
469
- <div
470
- className={
471
- s[
472
- "dialog-step-wrapper-header-title-loading"
473
- ]
474
- }
475
- >
386
+ <div className={s["dialog-step-wrapper-header-title-loading"]}>
476
387
  <LoadingDots isColored />
477
388
  </div>
478
389
  ) : (
479
390
  ""
480
391
  )}
481
- <div
482
- className={
483
- s[
484
- "dialog-step-wrapper-header-title-text"
485
- ]
486
- }
487
- >
488
- {!isTopImagePassed &&
489
- showBackgroundTitle ? (
490
- <BackgroundTitle text={title} />
491
- ) : null}
392
+ <div className={s["dialog-step-wrapper-header-title-text"]}>
393
+ {!isTopImagePassed && showBackgroundTitle ? <BackgroundTitle text={title} /> : null}
492
394
  <h5
493
395
  className={
494
- s[
495
- "dialog-step-wrapper-header-title-text-content"
496
- ] +
497
- (!isTopImagePassed
498
- ? " " + s["without-logo"]
499
- : "") +
500
- (backgroundImage ||
501
- backgroundImageMobile
502
- ? " " + s["white"]
503
- : "")
396
+ s["dialog-step-wrapper-header-title-text-content"] +
397
+ (!isTopImagePassed ? " " + s["without-logo"] : "") +
398
+ (backgroundImage || backgroundImageMobile ? " " + s["white"] : "")
504
399
  }
505
400
  >
506
401
  {title}
@@ -512,31 +407,12 @@ export const DialogStep = ({
512
407
  <p
513
408
  className={
514
409
  s["dialog-step-wrapper-header-text"] +
515
- ` ${
516
- !isTopImagePassed
517
- ? s["without-logo"]
518
- : ""
519
- } ${
520
- subtitleSmallMargin
521
- ? s["small-margin"]
522
- : ""
523
- }${
524
- subtitleNoMargin
525
- ? s["no-margin"]
526
- : ""
527
- } ${
528
- headerTitleLeft
529
- ? s["text-left"]
530
- : ""
531
- } ${
532
- breakSubtitleWords
533
- ? s["break-words"]
534
- : ""
535
- } ${
536
- backgroundImage ||
537
- backgroundImageMobile
538
- ? s["white"]
539
- : ""
410
+ ` ${!isTopImagePassed ? s["without-logo"] : ""} ${
411
+ subtitleSmallMargin ? s["small-margin"] : ""
412
+ }${subtitleNoMargin ? s["no-margin"] : ""} ${
413
+ headerTitleLeft ? s["text-left"] : ""
414
+ } ${breakSubtitleWords ? s["break-words"] : ""} ${
415
+ backgroundImage || backgroundImageMobile ? s["white"] : ""
540
416
  }`
541
417
  }
542
418
  >
@@ -544,13 +420,7 @@ export const DialogStep = ({
544
420
  </p>
545
421
  ) : null}
546
422
  </div>
547
- <div
548
- className={
549
- s["dialog-step-wrapper-content"] +
550
- " " +
551
- s["align-" + contentAlign]
552
- }
553
- >
423
+ <div className={s["dialog-step-wrapper-content"] + " " + s["align-" + contentAlign]}>
554
424
  {children}
555
425
  </div>
556
426
 
@@ -558,40 +428,23 @@ export const DialogStep = ({
558
428
  <div
559
429
  className={
560
430
  s["dialog-step-wrapper-buttons"] +
561
- ` ${
562
- bigButtonMargins ? s["big-margin"] : ""
563
- } ${
431
+ ` ${bigButtonMargins ? s["big-margin"] : ""} ${
564
432
  noButtonMargins ? s["no-margin"] : ""
565
- } ${
566
- isSecondaryButtonBig
567
- ? s["space-between-layout"]
568
- : ""
569
- }`
433
+ } ${isSecondaryButtonBig ? s["space-between-layout"] : ""}`
570
434
  }
571
435
  >
572
436
  <DialogButtons
573
437
  primaryButtonTitle={confirmButtonText}
574
- primaryButtonOnClick={(resetButtonLoader) =>
575
- confirmButtonClick(resetButtonLoader)
576
- }
438
+ primaryButtonOnClick={resetButtonLoader => confirmButtonClick(resetButtonLoader)}
577
439
  primaryButtonLoader={primaryButtonLoader}
578
440
  primaryButtonTo={confirmButtonLink}
579
- primaryButtonSetClickTrigger={
580
- setClickTrigger
581
- }
441
+ primaryButtonSetClickTrigger={setClickTrigger}
582
442
  secondaryButtonTitle={backButtonText}
583
443
  secondaryButtonOnClick={backButtonClick}
584
444
  secondaryButtonTo={backButtonTo}
585
445
  secondaryButtonBig={isSecondaryButtonBig}
586
- withBackgroundImage={
587
- !!backgroundImage ||
588
- !!backgroundImageMobile
589
- }
590
- hideOnMobiles={
591
- isMultiStep &&
592
- fixedButtons &&
593
- (backButtonText || confirmButtonText)
594
- }
446
+ withBackgroundImage={!!backgroundImage || !!backgroundImageMobile}
447
+ hideOnMobiles={isMultiStep && fixedButtons && (backButtonText || confirmButtonText)}
595
448
  />
596
449
  </div>
597
450
  ) : (
@@ -636,14 +489,7 @@ DialogStep.propTypes = {
636
489
  breakSubtitleWords: PropTypes.bool,
637
490
  contentAlign: PropTypes.string,
638
491
  controls: PropTypes.object,
639
- width: PropTypes.oneOf([
640
- "550px",
641
- "600px",
642
- "700px",
643
- "750px",
644
- "800px",
645
- "1000px",
646
- ]),
492
+ width: PropTypes.oneOf(["550px", "600px", "700px", "750px", "800px", "1000px"]),
647
493
  height: PropTypes.string,
648
494
  backgroundImage: PropTypes.string,
649
495
  backgroundImageMobile: PropTypes.string,
@@ -150,14 +150,12 @@
150
150
 
151
151
  &.current {
152
152
  &.appear-from-left {
153
- animation: slideFromLeft $transitionDuration $transitionEaseOut
154
- $transitionDuration * 4;
153
+ animation: slideFromLeft $transitionDuration $transitionEaseOut $transitionDuration * 4;
155
154
  animation-fill-mode: both;
156
155
  }
157
156
 
158
157
  &.appear-from-right {
159
- animation: slideFromRight $transitionDuration $transitionEaseOut
160
- $transitionDuration * 4;
158
+ animation: slideFromRight $transitionDuration $transitionEaseOut $transitionDuration * 4;
161
159
  animation-fill-mode: both;
162
160
  }
163
161
  }