@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
@@ -1,15 +1,11 @@
1
1
  export class FiatCurrenciesService {
2
2
  static getFullCurrencyNameByCode(code = "") {
3
- const data = fiatCurrenciesList.find(
4
- (currencyData) => currencyData[0] === code.toUpperCase()
5
- );
3
+ const data = fiatCurrenciesList.find(currencyData => currencyData[0] === code.toUpperCase());
6
4
  return (data && data[2]) || null;
7
5
  }
8
6
 
9
7
  static isCodeValid(code) {
10
- return !!fiatCurrenciesList.find(
11
- (currenciesData) => currenciesData[0] === code
12
- );
8
+ return !!fiatCurrenciesList.find(currenciesData => currenciesData[0] === code);
13
9
  }
14
10
 
15
11
  /**
@@ -19,9 +15,7 @@ export class FiatCurrenciesService {
19
15
  * @return {string|null} code or null if there is no symbol for the currency
20
16
  */
21
17
  static getCurrencySymbolByCode(code = "") {
22
- const data = fiatCurrenciesList.find(
23
- (currencyData) => currencyData[0] === code.toUpperCase()
24
- );
18
+ const data = fiatCurrenciesList.find(currencyData => currencyData[0] === code.toUpperCase());
25
19
  return data?.[1] ?? null;
26
20
  }
27
21
 
@@ -30,9 +24,7 @@ export class FiatCurrenciesService {
30
24
  * @return {number|null}
31
25
  */
32
26
  static getCurrencyDecimalCountByCode(code = "") {
33
- const data = fiatCurrenciesList.find(
34
- (currencyData) => currencyData[0] === code.toUpperCase()
35
- );
27
+ const data = fiatCurrenciesList.find(currencyData => currencyData[0] === code.toUpperCase());
36
28
  return data?.[3] ?? null;
37
29
  }
38
30
  }
@@ -130,9 +130,7 @@ export class Coin {
130
130
  * @param coinAtomsString {string} coin atoms positive integer amount
131
131
  * @return {string} string of coin amount and fee rate units
132
132
  */
133
- coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(
134
- coinAtomsString
135
- ) {
133
+ coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
136
134
  throw new Error("Not implemented in base Coin");
137
135
  }
138
136
 
@@ -147,9 +145,7 @@ export class Coin {
147
145
 
148
146
  tickerAndProtocol() {
149
147
  try {
150
- return `${this.tickerPrintable}${
151
- this.protocol ? " " + this.protocol.protocol ?? "" : ""
152
- }`;
148
+ return `${this.tickerPrintable}${this.protocol ? " " + this.protocol.protocol ?? "" : ""}`;
153
149
  } catch (e) {
154
150
  improveAndRethrow(e, "tickerAndProtocol");
155
151
  }
@@ -9,9 +9,7 @@ describe("AmountUtils", function () {
9
9
  let toIntegerStringStub;
10
10
 
11
11
  beforeEach(function () {
12
- toIntegerStringStub = sinon
13
- .stub(AmountUtils, "toIntegerString")
14
- .callsFake((number) => number.toFixed(0));
12
+ toIntegerStringStub = sinon.stub(AmountUtils, "toIntegerString").callsFake(number => number.toFixed(0));
15
13
  });
16
14
 
17
15
  afterEach(function () {
@@ -26,46 +24,25 @@ describe("AmountUtils", function () {
26
24
  });
27
25
 
28
26
  it("Should handle rate with strictRate set to true", function () {
29
- const result = AmountUtils.composeRateText(
30
- "BTC",
31
- "ETH",
32
- "0.1",
33
- 8,
34
- true
35
- );
27
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.1", 8, true);
36
28
 
37
29
  result.should.equal("1 BTC = 0.10000000 ETH");
38
30
  });
39
31
 
40
32
  it("Should handle rate with high precision", function () {
41
- const result = AmountUtils.composeRateText(
42
- "BTC",
43
- "ETH",
44
- "0.12345678903422",
45
- 8
46
- );
33
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.12345678903422", 8);
47
34
 
48
35
  result.should.equal("1 BTC ~ 0.12345678 ETH");
49
36
  });
50
37
 
51
38
  it("Should handle very small rates by scaling up", function () {
52
- const result = AmountUtils.composeRateText(
53
- "BTC",
54
- "ETH",
55
- "0.000000000000001",
56
- 8
57
- );
39
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.000000000000001", 8);
58
40
 
59
41
  result.should.equal("100000000 BTC ~ 0.00000010 ETH");
60
42
  });
61
43
 
62
44
  it("Should handle large rates", function () {
63
- const result = AmountUtils.composeRateText(
64
- "BTC",
65
- "ETH",
66
- "1000000000000000",
67
- 8
68
- );
45
+ const result = AmountUtils.composeRateText("BTC", "ETH", "1000000000000000", 8);
69
46
 
70
47
  result.should.equal("1 BTC ~ 1000000000000000.00000000 ETH");
71
48
  });
@@ -89,45 +66,25 @@ describe("AmountUtils", function () {
89
66
  });
90
67
 
91
68
  it("Should handle rate with different rightCurrencyDigitsAfterDots", function () {
92
- const result = AmountUtils.composeRateText(
93
- "BTC",
94
- "ETH",
95
- "0.123456789",
96
- 5
97
- );
69
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", 5);
98
70
 
99
71
  result.should.equal("1 BTC ~ 0.12345 ETH");
100
72
  });
101
73
 
102
74
  it("Should handle rate with max rightCurrencyDigitsAfterDots", function () {
103
- const result = AmountUtils.composeRateText(
104
- "BTC",
105
- "ETH",
106
- "0.123456789",
107
- 10
108
- );
75
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", 10);
109
76
 
110
77
  result.should.equal("1 BTC ~ 0.1234567890 ETH");
111
78
  });
112
79
 
113
80
  it("Should ensure proper rounding of right amount", function () {
114
- const result = AmountUtils.composeRateText(
115
- "BTC",
116
- "ETH",
117
- "0.123456789",
118
- 4
119
- );
81
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", 4);
120
82
 
121
83
  result.should.equal("1 BTC ~ 0.1234 ETH");
122
84
  });
123
85
 
124
86
  it("Should handle great rightCurrencyDigitsAfterDots", function () {
125
- const result = AmountUtils.composeRateText(
126
- "BTC",
127
- "ETH",
128
- "0.123456789",
129
- 20
130
- );
87
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", 20);
131
88
 
132
89
  result.should.equal("1 BTC ~ 0.12345678900000000000 ETH");
133
90
  });
@@ -163,33 +120,19 @@ describe("AmountUtils", function () {
163
120
  });
164
121
 
165
122
  it("Should return correct format when rate has a lot of trailing zeros", function () {
166
- const result = AmountUtils.composeRateText(
167
- "BTC",
168
- "ETH",
169
- "0.1000000000000000000000"
170
- );
123
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.1000000000000000000000");
171
124
 
172
125
  result.should.equal("1 BTC ~ 0.10000000 ETH");
173
126
  });
174
127
 
175
128
  it("Should handle zero rightCurrencyDigitsAfterDots", function () {
176
- const result = AmountUtils.composeRateText(
177
- "BTC",
178
- "ETH",
179
- "0.123456789",
180
- 0
181
- );
129
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", 0);
182
130
 
183
131
  result.should.equal("100 BTC ~ 12 ETH");
184
132
  });
185
133
 
186
134
  it("Should handle negative rightCurrencyDigitsAfterDots", function () {
187
- const result = AmountUtils.composeRateText(
188
- "BTC",
189
- "ETH",
190
- "0.123456789",
191
- -1
192
- );
135
+ const result = AmountUtils.composeRateText("BTC", "ETH", "0.123456789", -1);
193
136
 
194
137
  result.should.equal("1 BTC ~ 0.12345678 ETH");
195
138
  });
@@ -6,9 +6,7 @@ import { IpAddressProvider } from "../../../../external-apis/ipAddressProviders.
6
6
  describe("ipAddressProviders", function () {
7
7
  describe("#getClientIpAddress", function () {
8
8
  it("Should successfully retrieve IP address", async function () {
9
- (
10
- await IpAddressProvider.getClientIpAddress()
11
- ).should.not.be.empty();
9
+ (await IpAddressProvider.getClientIpAddress()).should.not.be.empty();
12
10
  });
13
11
  });
14
12
  });
@@ -24,11 +24,7 @@ export class Cache {
24
24
  try {
25
25
  for (const key of this._cache.keys()) {
26
26
  const item = this._cache.get(key);
27
- if (
28
- item &&
29
- item.ttlMs &&
30
- item.addedMsTimestamp + item.ttlMs < Date.now()
31
- ) {
27
+ if (item && item.ttlMs && item.addedMsTimestamp + item.ttlMs < Date.now()) {
32
28
  this._cache.delete(key);
33
29
  }
34
30
  }
@@ -53,9 +49,7 @@ export class Cache {
53
49
  put(key, data, ttlMs = null) {
54
50
  try {
55
51
  if (typeof key !== "string" || data == null) {
56
- throw new Error(
57
- `Trying to cache corrupted data: ${key}, ${data}`
58
- );
52
+ throw new Error(`Trying to cache corrupted data: ${key}, ${data}`);
59
53
  }
60
54
  this._cache.set(key, {
61
55
  data: data,
@@ -87,9 +81,7 @@ export class Cache {
87
81
  _putEventDependentData(key, data, events, ttlMs = null) {
88
82
  try {
89
83
  if (typeof key !== "string" || data == null) {
90
- throw new Error(
91
- `Trying to cache corrupted data: ${key}, ${data}`
92
- );
84
+ throw new Error(`Trying to cache corrupted data: ${key}, ${data}`);
93
85
  }
94
86
  this._cache.set(key, {
95
87
  data: data,
@@ -97,27 +89,17 @@ export class Cache {
97
89
  ttlMs: ttlMs,
98
90
  });
99
91
  for (let event of events) {
100
- const eventAndKeys = this._eventDependentDataKeys.find(
101
- (item) => item[0] === event
102
- );
92
+ const eventAndKeys = this._eventDependentDataKeys.find(item => item[0] === event);
103
93
  if (eventAndKeys) {
104
94
  eventAndKeys.push(key);
105
95
  } else if (this._eventBus) {
106
96
  this._eventDependentDataKeys.push([event, key]);
107
97
  this._eventBus.addEventListener(event, () => {
108
98
  try {
109
- const keys = this._eventDependentDataKeys.find(
110
- (item) => item[0] === event
111
- );
112
- (keys ?? [event])
113
- .slice(1)
114
- .forEach((key) => this._cache.delete(key));
99
+ const keys = this._eventDependentDataKeys.find(item => item[0] === event);
100
+ (keys ?? [event]).slice(1).forEach(key => this._cache.delete(key));
115
101
  } catch (e) {
116
- Logger.logError(
117
- e,
118
- "cache.removing-for-event",
119
- `Event: ${event}`
120
- );
102
+ Logger.logError(e, "cache.removing-for-event", `Event: ${event}`);
121
103
  }
122
104
  });
123
105
  }
@@ -132,11 +114,7 @@ export class Cache {
132
114
  try {
133
115
  const item = this._cache.get(key);
134
116
  if (item) {
135
- if (
136
- item.addedMsTimestamp &&
137
- item.ttlMs !== null &&
138
- item.addedMsTimestamp + item.ttlMs < Date.now()
139
- ) {
117
+ if (item.addedMsTimestamp && item.ttlMs !== null && item.addedMsTimestamp + item.ttlMs < Date.now()) {
140
118
  this._cache.delete(key);
141
119
  return null;
142
120
  } else {
@@ -185,16 +163,12 @@ export class Cache {
185
163
 
186
164
  invalidateContaining(keyPart) {
187
165
  if (typeof keyPart !== "string" || keyPart === "") {
188
- throw new Error(
189
- "Trying to invalidate containing wrong key or empty key: " +
190
- keyPart
191
- );
166
+ throw new Error("Trying to invalidate containing wrong key or empty key: " + keyPart);
192
167
  }
193
168
 
194
169
  try {
195
170
  const matchedKeys = Array.from(this._cache.keys()).filter(
196
- (key) =>
197
- typeof key === "string" && new RegExp(keyPart).test(key)
171
+ key => typeof key === "string" && new RegExp(keyPart).test(key)
198
172
  );
199
173
  for (let i = 0; i < matchedKeys.length; ++i) {
200
174
  this._cache.delete(matchedKeys[i]);
@@ -7,9 +7,7 @@ export class EmailsApi {
7
7
 
8
8
  static async sendEmail(subject, body) {
9
9
  try {
10
- const url = `${
11
- window.location.protocol + "//" + window.location.host
12
- }/api/v1/${this.serverEndpointEntity}`;
10
+ const url = `${window.location.protocol + "//" + window.location.host}/api/v1/${this.serverEndpointEntity}`;
13
11
  await axios.post(url, { subject, body });
14
12
  } catch (e) {
15
13
  improveAndRethrow(e, "sendEmail", subject + body);
@@ -15,20 +15,13 @@ export class Logger {
15
15
  LogsStorage.saveLog(`${timestamp}|${source}:${logString}`);
16
16
  }
17
17
 
18
- static logError(
19
- e,
20
- settingFunction,
21
- additionalMessage = "",
22
- onlyToConsole = false
23
- ) {
24
- let message = `\nFunction call ${
25
- settingFunction ?? ""
26
- } failed. Error message: ${e?.message}. ${additionalMessage} `;
18
+ static logError(e, settingFunction, additionalMessage = "", onlyToConsole = false) {
19
+ let message = `\nFunction call ${settingFunction ?? ""} failed. Error message: ${
20
+ e?.message
21
+ }. ${additionalMessage} `;
27
22
  message +=
28
23
  `${e?.errorDescription ?? ""}${e?.howToFix ?? ""}` +
29
- (e?.httpStatus === 403
30
- ? "Authentication has expired or was lost. "
31
- : "");
24
+ (e?.httpStatus === 403 ? "Authentication has expired or was lost. " : "");
32
25
 
33
26
  if (e?.response) {
34
27
  try {
@@ -12,13 +12,8 @@ import s from "./asset-icon.module.scss";
12
12
  * @param {string} [fallbackSrc=null] - The fallback source URL in case the main source fails to load.
13
13
  * @param {boolean} [small=false] - Whether to display a smaller version of the icon.
14
14
  */
15
- export const AssetIcon = ({
16
- assetIconSrc,
17
- assetIconProtocolSrc = null,
18
- fallbackSrc = null,
19
- small = false,
20
- }) => {
21
- const handleFailedLoad = (e) => {
15
+ export const AssetIcon = ({ assetIconSrc, assetIconProtocolSrc = null, fallbackSrc = null, small = false }) => {
16
+ const handleFailedLoad = e => {
22
17
  e.target.onerror = null;
23
18
  e.target.src = fallbackSrc;
24
19
  };
@@ -27,19 +22,14 @@ export const AssetIcon = ({
27
22
  <div className={s["asset-icon"] + (small ? " " + s["small"] : "")}>
28
23
  <img
29
24
  src={assetIconSrc}
30
- className={
31
- s["asset-icon-primary"] + (small ? " " + s["small"] : "")
32
- }
25
+ className={s["asset-icon-primary"] + (small ? " " + s["small"] : "")}
33
26
  alt={" "}
34
27
  onError={handleFailedLoad}
35
28
  />
36
29
  {assetIconProtocolSrc ? (
37
30
  <img
38
31
  src={assetIconProtocolSrc}
39
- className={
40
- s["asset-icon-secondary"] +
41
- (small ? " " + s["small"] : "")
42
- }
32
+ className={s["asset-icon-secondary"] + (small ? " " + s["small"] : "")}
43
33
  alt={" "}
44
34
  onError={handleFailedLoad}
45
35
  />
@@ -31,10 +31,8 @@ export const AssetSelection = ({
31
31
 
32
32
  return (
33
33
  <div
34
- className={
35
- s["asset-selection"] + " " + (disabled ? s["disabled"] : "")
36
- }
37
- onClick={disabled ? () => {} : (e) => handleError(handleClick, e)}
34
+ className={s["asset-selection"] + " " + (disabled ? s["disabled"] : "")}
35
+ onClick={disabled ? () => {} : e => handleError(handleClick, e)}
38
36
  >
39
37
  <div className={s["asset-selection-icon-wrapper"]}>
40
38
  <AssetIcon
@@ -44,13 +42,7 @@ export const AssetSelection = ({
44
42
  fallbackSrc={fallbackSrc}
45
43
  />
46
44
  </div>
47
- {protocolName ? (
48
- <div className={s["asset-selection-protocol-wrapper"]}>
49
- {protocolName}
50
- </div>
51
- ) : (
52
- ""
53
- )}
45
+ {protocolName ? <div className={s["asset-selection-protocol-wrapper"]}>{protocolName}</div> : ""}
54
46
  <div className={s["arrow"]}>
55
47
  <ArrowIcon />
56
48
  </div>
@@ -15,18 +15,8 @@ import s from "./background-title.module.scss";
15
15
  export const BackgroundTitle = ({ text, smallMargins = false }) => {
16
16
  return (
17
17
  <div className={s["background-title"]}>
18
- <div
19
- className={
20
- s["background-title-wrapper"] +
21
- (smallMargins ? " " + s["small-margins"] : "")
22
- }
23
- >
24
- <div
25
- className={
26
- s["background-title-wrapper-text"] +
27
- (smallMargins ? " " + s["small-margins"] : "")
28
- }
29
- >
18
+ <div className={s["background-title-wrapper"] + (smallMargins ? " " + s["small-margins"] : "")}>
19
+ <div className={s["background-title-wrapper-text"] + (smallMargins ? " " + s["small-margins"] : "")}>
30
20
  {text}
31
21
  </div>
32
22
  </div>
@@ -23,19 +23,9 @@ export const InformationMessage = ({
23
23
  children = null,
24
24
  }) => {
25
25
  return (
26
- <div
27
- className={
28
- s["information-message"] +
29
- (bigImage ? " " + s["big-image"] : "")
30
- }
31
- >
26
+ <div className={s["information-message"] + (bigImage ? " " + s["big-image"] : "")}>
32
27
  {icon ? <img src={icon} alt="info icon" /> : <InfoIcon />}
33
- <p
34
- className={
35
- s["information-message-text"] +
36
- (whiteText ? " " + s["white-text"] : "")
37
- }
38
- >
28
+ <p className={s["information-message-text"] + (whiteText ? " " + s["white-text"] : "")}>
39
29
  {text}
40
30
  {children}
41
31
  </p>
@@ -13,13 +13,15 @@
13
13
  align-items: flex-start;
14
14
  }
15
15
 
16
- img, svg {
16
+ img,
17
+ svg {
17
18
  min-width: 24px;
18
19
  height: 24px;
19
20
  }
20
21
 
21
22
  &.big-image {
22
- img, svg {
23
+ img,
24
+ svg {
23
25
  min-width: 29px;
24
26
  height: 29px;
25
27
  }
@@ -51,7 +51,7 @@ export const Input = forwardRef(
51
51
  value = "",
52
52
  successAlertText = "",
53
53
  disabled = false,
54
- onKeyUp = (event) => {},
54
+ onKeyUp = event => {},
55
55
  autoFocus = false,
56
56
  fillWidth = false,
57
57
  clearButton = false,
@@ -92,10 +92,7 @@ export const Input = forwardRef(
92
92
 
93
93
  {clearButton ? (
94
94
  <div className={s["input-clear-button"]}>
95
- <Close
96
- onClick={handleClearButtonClick}
97
- color={"dark-invert"}
98
- />
95
+ <Close onClick={handleClearButtonClick} color={"dark-invert"} />
99
96
  </div>
100
97
  ) : (
101
98
  ""
@@ -106,17 +103,12 @@ export const Input = forwardRef(
106
103
  id={id}
107
104
  type={type}
108
105
  name={name}
109
- onChange={(e) => handleError(onChange, e)}
106
+ onChange={e => handleError(onChange, e)}
110
107
  placeholder={placeholder}
111
- className={
112
- className +
113
- (errorEncountered
114
- ? " " + s["error-encountered"]
115
- : "")
116
- }
108
+ className={className + (errorEncountered ? " " + s["error-encountered"] : "")}
117
109
  defaultValue={defaultValue}
118
110
  disabled={disabled}
119
- onKeyUp={(event) => onKeyUp(event)}
111
+ onKeyUp={event => onKeyUp(event)}
120
112
  autoFocus={autoFocus}
121
113
  ref={ref}
122
114
  />
@@ -125,27 +117,19 @@ export const Input = forwardRef(
125
117
  id={id}
126
118
  type={type}
127
119
  name={name}
128
- onChange={(e) => handleError(onChange, e)}
120
+ onChange={e => handleError(onChange, e)}
129
121
  placeholder={placeholder}
130
- className={
131
- className +
132
- (errorEncountered
133
- ? " " + s["error-encountered"]
134
- : "")
135
- }
122
+ className={className + (errorEncountered ? " " + s["error-encountered"] : "")}
136
123
  value={value}
137
124
  disabled={disabled}
138
- onKeyUp={(event) => onKeyUp(event)}
125
+ onKeyUp={event => onKeyUp(event)}
139
126
  autoFocus={autoFocus}
140
127
  ref={ref}
141
128
  />
142
129
  )}
143
130
 
144
131
  {alertText || successAlertText ? (
145
- <Validation
146
- text={alertText || successAlertText}
147
- isSuccessAlert={!alertText}
148
- />
132
+ <Validation text={alertText || successAlertText} isSuccessAlert={!alertText} />
149
133
  ) : null}
150
134
  </div>
151
135
  );
@@ -15,33 +15,16 @@ import styles from "./LoadingDots.module.scss";
15
15
  * @param {(boolean|'left'|'right')} [props.align=false] - Aligns the loading dots to the left or right if specified, otherwise centered.
16
16
  * @returns {React.ReactElement} A React component that renders the loading dots animation.
17
17
  */
18
- export const LoadingDots = ({
19
- size = "small",
20
- isColored = false,
21
- noMargins = false,
22
- align = false,
23
- }) => {
18
+ export const LoadingDots = ({ size = "small", isColored = false, noMargins = false, align = false }) => {
24
19
  return (
25
20
  <div
26
- className={`${styles["loading-dots"]} ${styles[size]} ${
27
- noMargins ? ` ${styles["no-margins"]}` : ""
28
- } ${align ? styles["align-" + align] : ""}`}
21
+ className={`${styles["loading-dots"]} ${styles[size]} ${noMargins ? ` ${styles["no-margins"]}` : ""} ${
22
+ align ? styles["align-" + align] : ""
23
+ }`}
29
24
  >
30
- <div
31
- className={`${styles.dot} ${
32
- isColored ? ` ${styles.colored}` : ""
33
- }`}
34
- />
35
- <div
36
- className={`${styles.dot} ${
37
- isColored ? ` ${styles.colored}` : ""
38
- }`}
39
- />
40
- <div
41
- className={`${styles.dot} ${
42
- isColored ? ` ${styles.colored}` : ""
43
- }`}
44
- />
25
+ <div className={`${styles.dot} ${isColored ? ` ${styles.colored}` : ""}`} />
26
+ <div className={`${styles.dot} ${isColored ? ` ${styles.colored}` : ""}`} />
27
+ <div className={`${styles.dot} ${isColored ? ` ${styles.colored}` : ""}`} />
45
28
  </div>
46
29
  );
47
30
  };
@@ -50,8 +33,5 @@ LoadingDots.propTypes = {
50
33
  size: PropTypes.oneOf(["big", "small", "extra-small"]),
51
34
  isColored: PropTypes.bool,
52
35
  noMargins: PropTypes.bool,
53
- align: PropTypes.oneOfType([
54
- PropTypes.oneOf(["left", "right"]),
55
- PropTypes.bool,
56
- ]),
36
+ align: PropTypes.oneOfType([PropTypes.oneOf(["left", "right"]), PropTypes.bool]),
57
37
  };
@@ -17,19 +17,12 @@ import { TOOLTIP_POSITIONS } from "../../../constants/atoms/Tooltip/tooltip.jsx"
17
17
  * @param {string} [titleNoticeIcon] - The source URL for the icon displayed on the notice.
18
18
  * @param {string} tooltipPosition - Position for the tooltip relative to the icon.
19
19
  */
20
- export const NoticeIcon = ({
21
- noticeText,
22
- titleNoticeIcon = "",
23
- tooltipPosition = TOOLTIP_POSITIONS.TOP,
24
- }) => {
20
+ export const NoticeIcon = ({ noticeText, titleNoticeIcon = "", tooltipPosition = TOOLTIP_POSITIONS.TOP }) => {
25
21
  const [showTooltip, setShowTooltip] = useState(false);
26
22
 
27
23
  const noticeRef = useRef();
28
24
 
29
- useEffect(
30
- () => handleClickOutside([noticeRef], () => setShowTooltip(false)),
31
- []
32
- );
25
+ useEffect(() => handleClickOutside([noticeRef], () => setShowTooltip(false)), []);
33
26
 
34
27
  return (
35
28
  <div ref={noticeRef} className={s["notice-icon"]}>
@@ -37,14 +30,11 @@ export const NoticeIcon = ({
37
30
  <img
38
31
  src={titleNoticeIcon}
39
32
  alt="title icon"
40
- onClick={() => setShowTooltip((prev) => !prev)}
33
+ onClick={() => setShowTooltip(prev => !prev)}
41
34
  className={s["notice-icon-image"]}
42
35
  />
43
36
  ) : (
44
- <div
45
- className={s["notice-icon-image"]}
46
- onClick={() => setShowTooltip((prev) => !prev)}
47
- >
37
+ <div className={s["notice-icon-image"]} onClick={() => setShowTooltip(prev => !prev)}>
48
38
  <NoticeQuestionIcon />
49
39
  </div>
50
40
  )}