@onepercentio/one-ui 0.1.2

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 (483) hide show
  1. package/WebpackConfigs/__snapshots__/email-templates.test.js.snap +9 -0
  2. package/WebpackConfigs/email-templates.js +251 -0
  3. package/WebpackConfigs/email-templates.test.js +53 -0
  4. package/WebpackConfigs/loaders/css-var-removal.js +44 -0
  5. package/WebpackConfigs/loaders/css-var-removal.test.ts +17 -0
  6. package/WebpackConfigs/loaders/static-loader.js +26 -0
  7. package/WebpackConfigs/loaders/svg-to-png.js +170 -0
  8. package/WebpackConfigs/scripts/css-inliner.ts +24 -0
  9. package/dist/__test__/utils.d.ts +1 -0
  10. package/dist/__test__/utils.js +14 -0
  11. package/dist/__test__/utils.js.map +1 -0
  12. package/dist/assets/img/svg/checkbox.svg +3 -0
  13. package/dist/assets/styles/index.scss +2 -0
  14. package/dist/assets/styles/mixins.scss +12 -0
  15. package/dist/assets/styles/variables.scss +49 -0
  16. package/dist/components/AdaptiveDialog/AdaptiveDialog.d.ts +9 -0
  17. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +86 -0
  18. package/dist/components/AdaptiveDialog/AdaptiveDialog.js.map +1 -0
  19. package/dist/components/AdaptiveDialog/AdaptiveDialog.module.scss +137 -0
  20. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.d.ts +19 -0
  21. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.js +90 -0
  22. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.js.map +1 -0
  23. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.d.ts +1 -0
  24. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.js +15 -0
  25. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.js.map +1 -0
  26. package/dist/components/AdaptiveDialog/index.d.ts +1 -0
  27. package/dist/components/AdaptiveDialog/index.js +9 -0
  28. package/dist/components/AdaptiveDialog/index.js.map +1 -0
  29. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.d.ts +7 -0
  30. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +59 -0
  31. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js.map +1 -0
  32. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.module.scss +48 -0
  33. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.d.ts +15 -0
  34. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.js +21 -0
  35. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.js.map +1 -0
  36. package/dist/components/AdaptiveSidebar/index.d.ts +1 -0
  37. package/dist/components/AdaptiveSidebar/index.js +9 -0
  38. package/dist/components/AdaptiveSidebar/index.js.map +1 -0
  39. package/dist/components/AnchoredTooltip/AnchoredTooltip.d.ts +12 -0
  40. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +162 -0
  41. package/dist/components/AnchoredTooltip/AnchoredTooltip.js.map +1 -0
  42. package/dist/components/AnchoredTooltip/AnchoredTooltip.module.scss +61 -0
  43. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.d.ts +16 -0
  44. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.js +82 -0
  45. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.js.map +1 -0
  46. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.d.ts +1 -0
  47. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.js +20 -0
  48. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.js.map +1 -0
  49. package/dist/components/AnchoredTooltip/index.d.ts +1 -0
  50. package/dist/components/AnchoredTooltip/index.js +9 -0
  51. package/dist/components/AnchoredTooltip/index.js.map +1 -0
  52. package/dist/components/AsyncWrapper/AsyncWrapper.d.ts +10 -0
  53. package/dist/components/AsyncWrapper/AsyncWrapper.js +25 -0
  54. package/dist/components/AsyncWrapper/AsyncWrapper.js.map +1 -0
  55. package/dist/components/AsyncWrapper/AsyncWrapper.stories.d.ts +18 -0
  56. package/dist/components/AsyncWrapper/AsyncWrapper.stories.js +34 -0
  57. package/dist/components/AsyncWrapper/AsyncWrapper.stories.js.map +1 -0
  58. package/dist/components/AsyncWrapper/AsyncWrapper.test.d.ts +1 -0
  59. package/dist/components/AsyncWrapper/AsyncWrapper.test.js +19 -0
  60. package/dist/components/AsyncWrapper/AsyncWrapper.test.js.map +1 -0
  61. package/dist/components/AsyncWrapper/index.d.ts +1 -0
  62. package/dist/components/AsyncWrapper/index.js +9 -0
  63. package/dist/components/AsyncWrapper/index.js.map +1 -0
  64. package/dist/components/Avatar/Avatar.d.ts +8 -0
  65. package/dist/components/Avatar/Avatar.js +41 -0
  66. package/dist/components/Avatar/Avatar.js.map +1 -0
  67. package/dist/components/Avatar/Avatar.module.scss +19 -0
  68. package/dist/components/Avatar/Avatar.stories.d.ts +14 -0
  69. package/dist/components/Avatar/Avatar.stories.js +19 -0
  70. package/dist/components/Avatar/Avatar.stories.js.map +1 -0
  71. package/dist/components/Avatar/Avatar.test.d.ts +1 -0
  72. package/dist/components/Avatar/Avatar.test.js +36 -0
  73. package/dist/components/Avatar/Avatar.test.js.map +1 -0
  74. package/dist/components/Avatar/index.d.ts +1 -0
  75. package/dist/components/Avatar/index.js +9 -0
  76. package/dist/components/Avatar/index.js.map +1 -0
  77. package/dist/components/Button/Button.d.ts +7 -0
  78. package/dist/components/Button/Button.js +27 -0
  79. package/dist/components/Button/Button.js.map +1 -0
  80. package/dist/components/Button/Button.module.scss +42 -0
  81. package/dist/components/Button/Button.stories.d.ts +9 -0
  82. package/dist/components/Button/Button.stories.js +34 -0
  83. package/dist/components/Button/Button.stories.js.map +1 -0
  84. package/dist/components/Button/Button.test.d.ts +1 -0
  85. package/dist/components/Button/Button.test.js +15 -0
  86. package/dist/components/Button/Button.test.js.map +1 -0
  87. package/dist/components/Button/index.d.ts +1 -0
  88. package/dist/components/Button/index.js +9 -0
  89. package/dist/components/Button/index.js.map +1 -0
  90. package/dist/components/Card/Card.d.ts +7 -0
  91. package/dist/components/Card/Card.js +15 -0
  92. package/dist/components/Card/Card.js.map +1 -0
  93. package/dist/components/Card/Card.module.scss +12 -0
  94. package/dist/components/Card/Card.stories.d.ts +15 -0
  95. package/dist/components/Card/Card.stories.js +16 -0
  96. package/dist/components/Card/Card.stories.js.map +1 -0
  97. package/dist/components/Card/index.d.ts +1 -0
  98. package/dist/components/Card/index.js +9 -0
  99. package/dist/components/Card/index.js.map +1 -0
  100. package/dist/components/CheckBox/CheckBox.d.ts +11 -0
  101. package/dist/components/CheckBox/CheckBox.js +32 -0
  102. package/dist/components/CheckBox/CheckBox.js.map +1 -0
  103. package/dist/components/CheckBox/CheckBox.module.scss +25 -0
  104. package/dist/components/CheckBox/CheckBox.stories.d.ts +20 -0
  105. package/dist/components/CheckBox/CheckBox.stories.js +30 -0
  106. package/dist/components/CheckBox/CheckBox.stories.js.map +1 -0
  107. package/dist/components/CheckBox/index.d.ts +1 -0
  108. package/dist/components/CheckBox/index.js +9 -0
  109. package/dist/components/CheckBox/index.js.map +1 -0
  110. package/dist/components/Collapsable/Collapsable.d.ts +33 -0
  111. package/dist/components/Collapsable/Collapsable.js +120 -0
  112. package/dist/components/Collapsable/Collapsable.js.map +1 -0
  113. package/dist/components/Collapsable/Collapsable.module.scss +33 -0
  114. package/dist/components/Collapsable/Collapsable.stories.d.ts +39 -0
  115. package/dist/components/Collapsable/Collapsable.stories.js +28 -0
  116. package/dist/components/Collapsable/Collapsable.stories.js.map +1 -0
  117. package/dist/components/Collapsable/index.d.ts +1 -0
  118. package/dist/components/Collapsable/index.js +9 -0
  119. package/dist/components/Collapsable/index.js.map +1 -0
  120. package/dist/components/Countdown/Countdown.d.ts +13 -0
  121. package/dist/components/Countdown/Countdown.js +76 -0
  122. package/dist/components/Countdown/Countdown.js.map +1 -0
  123. package/dist/components/Countdown/Countdown.stories.d.ts +14 -0
  124. package/dist/components/Countdown/Countdown.stories.js +32 -0
  125. package/dist/components/Countdown/Countdown.stories.js.map +1 -0
  126. package/dist/components/Countdown/index.d.ts +1 -0
  127. package/dist/components/Countdown/index.js +9 -0
  128. package/dist/components/Countdown/index.js.map +1 -0
  129. package/dist/components/Divider/Divider.d.ts +6 -0
  130. package/dist/components/Divider/Divider.js +16 -0
  131. package/dist/components/Divider/Divider.js.map +1 -0
  132. package/dist/components/Divider/Divider.module.scss +7 -0
  133. package/dist/components/Divider/Divider.stories.d.ts +7 -0
  134. package/dist/components/Divider/Divider.stories.js +15 -0
  135. package/dist/components/Divider/Divider.stories.js.map +1 -0
  136. package/dist/components/Divider/index.d.ts +1 -0
  137. package/dist/components/Divider/index.js +9 -0
  138. package/dist/components/Divider/index.js.map +1 -0
  139. package/dist/components/EmailInput/EmailInput.d.ts +20 -0
  140. package/dist/components/EmailInput/EmailInput.js +46 -0
  141. package/dist/components/EmailInput/EmailInput.js.map +1 -0
  142. package/dist/components/EmailInput/EmailInput.module.scss +0 -0
  143. package/dist/components/EmailInput/EmailInput.stories.d.ts +24 -0
  144. package/dist/components/EmailInput/EmailInput.stories.js +15 -0
  145. package/dist/components/EmailInput/EmailInput.stories.js.map +1 -0
  146. package/dist/components/EmailInput/EmailInput.test.d.ts +1 -0
  147. package/dist/components/EmailInput/EmailInput.test.js +73 -0
  148. package/dist/components/EmailInput/EmailInput.test.js.map +1 -0
  149. package/dist/components/EmailInput/index.d.ts +1 -0
  150. package/dist/components/EmailInput/index.js +9 -0
  151. package/dist/components/EmailInput/index.js.map +1 -0
  152. package/dist/components/FadeIn/FadeIn.d.ts +10 -0
  153. package/dist/components/FadeIn/FadeIn.js +60 -0
  154. package/dist/components/FadeIn/FadeIn.js.map +1 -0
  155. package/dist/components/FadeIn/FadeIn.module.scss +18 -0
  156. package/dist/components/FadeIn/FadeIn.stories.d.ts +24 -0
  157. package/dist/components/FadeIn/FadeIn.stories.js +16 -0
  158. package/dist/components/FadeIn/FadeIn.stories.js.map +1 -0
  159. package/dist/components/FadeIn/FadeIn.test.d.ts +1 -0
  160. package/dist/components/FadeIn/FadeIn.test.js +22 -0
  161. package/dist/components/FadeIn/FadeIn.test.js.map +1 -0
  162. package/dist/components/FadeIn/index.d.ts +1 -0
  163. package/dist/components/FadeIn/index.js +9 -0
  164. package/dist/components/FadeIn/index.js.map +1 -0
  165. package/dist/components/FileInput/FileInput.d.ts +13 -0
  166. package/dist/components/FileInput/FileInput.js +71 -0
  167. package/dist/components/FileInput/FileInput.js.map +1 -0
  168. package/dist/components/FileInput/FileInput.module.scss +27 -0
  169. package/dist/components/FileInput/FileInput.stories.d.ts +19 -0
  170. package/dist/components/FileInput/FileInput.stories.js +55 -0
  171. package/dist/components/FileInput/FileInput.stories.js.map +1 -0
  172. package/dist/components/FileInput/index.d.ts +1 -0
  173. package/dist/components/FileInput/index.js +9 -0
  174. package/dist/components/FileInput/index.js.map +1 -0
  175. package/dist/components/FlowController/FlowController.d.ts +23 -0
  176. package/dist/components/FlowController/FlowController.js +34 -0
  177. package/dist/components/FlowController/FlowController.js.map +1 -0
  178. package/dist/components/FlowController/FlowController.module.scss +47 -0
  179. package/dist/components/FlowController/FlowController.stories.d.ts +43 -0
  180. package/dist/components/FlowController/FlowController.stories.js +97 -0
  181. package/dist/components/FlowController/FlowController.stories.js.map +1 -0
  182. package/dist/components/FlowController/FlowController.test.d.ts +1 -0
  183. package/dist/components/FlowController/FlowController.test.js +166 -0
  184. package/dist/components/FlowController/FlowController.test.js.map +1 -0
  185. package/dist/components/FlowController/index.d.ts +1 -0
  186. package/dist/components/FlowController/index.js +9 -0
  187. package/dist/components/FlowController/index.js.map +1 -0
  188. package/dist/components/Freeze/Freeze.d.ts +5 -0
  189. package/dist/components/Freeze/Freeze.js +13 -0
  190. package/dist/components/Freeze/Freeze.js.map +1 -0
  191. package/dist/components/Freeze/Freeze.stories.d.ts +7 -0
  192. package/dist/components/Freeze/Freeze.stories.js +52 -0
  193. package/dist/components/Freeze/Freeze.stories.js.map +1 -0
  194. package/dist/components/Freeze/Freeze.test.d.ts +1 -0
  195. package/dist/components/Freeze/Freeze.test.js +15 -0
  196. package/dist/components/Freeze/Freeze.test.js.map +1 -0
  197. package/dist/components/Freeze/index.d.ts +1 -0
  198. package/dist/components/Freeze/index.js +9 -0
  199. package/dist/components/Freeze/index.js.map +1 -0
  200. package/dist/components/HSForms/HSForms.d.ts +5 -0
  201. package/dist/components/HSForms/HSForms.js +47 -0
  202. package/dist/components/HSForms/HSForms.js.map +1 -0
  203. package/dist/components/HSForms/index.d.ts +1 -0
  204. package/dist/components/HSForms/index.js +9 -0
  205. package/dist/components/HSForms/index.js.map +1 -0
  206. package/dist/components/Header/Header.d.ts +24 -0
  207. package/dist/components/Header/Header.js +71 -0
  208. package/dist/components/Header/Header.js.map +1 -0
  209. package/dist/components/Header/Header.module.scss +109 -0
  210. package/dist/components/Header/Header.stories.d.ts +27 -0
  211. package/dist/components/Header/Header.stories.js +41 -0
  212. package/dist/components/Header/Header.stories.js.map +1 -0
  213. package/dist/components/Header/Header.test.d.ts +1 -0
  214. package/dist/components/Header/Header.test.js +96 -0
  215. package/dist/components/Header/Header.test.js.map +1 -0
  216. package/dist/components/Header/index.d.ts +1 -0
  217. package/dist/components/Header/index.js +9 -0
  218. package/dist/components/Header/index.js.map +1 -0
  219. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.d.ts +8 -0
  220. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +17 -0
  221. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js.map +1 -0
  222. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.module.scss +44 -0
  223. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.d.ts +14 -0
  224. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.js +16 -0
  225. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.js.map +1 -0
  226. package/dist/components/HeaderCloseBtn/index.d.ts +1 -0
  227. package/dist/components/HeaderCloseBtn/index.js +9 -0
  228. package/dist/components/HeaderCloseBtn/index.js.map +1 -0
  229. package/dist/components/InfinityScroll/InfinityScroll.d.ts +11 -0
  230. package/dist/components/InfinityScroll/InfinityScroll.js +108 -0
  231. package/dist/components/InfinityScroll/InfinityScroll.js.map +1 -0
  232. package/dist/components/InfinityScroll/InfinityScroll.module.scss +30 -0
  233. package/dist/components/InfinityScroll/InfinityScroll.stories.d.ts +23 -0
  234. package/dist/components/InfinityScroll/InfinityScroll.stories.js +50 -0
  235. package/dist/components/InfinityScroll/InfinityScroll.stories.js.map +1 -0
  236. package/dist/components/InfinityScroll/InfinityScroll.test.d.ts +1 -0
  237. package/dist/components/InfinityScroll/InfinityScroll.test.js +185 -0
  238. package/dist/components/InfinityScroll/InfinityScroll.test.js.map +1 -0
  239. package/dist/components/InfinityScroll/index.d.ts +1 -0
  240. package/dist/components/InfinityScroll/index.js +9 -0
  241. package/dist/components/InfinityScroll/index.js.map +1 -0
  242. package/dist/components/Input/Input.d.ts +26 -0
  243. package/dist/components/Input/Input.js +82 -0
  244. package/dist/components/Input/Input.js.map +1 -0
  245. package/dist/components/Input/Input.module.scss +68 -0
  246. package/dist/components/Input/Input.stories.d.ts +20 -0
  247. package/dist/components/Input/Input.stories.js +21 -0
  248. package/dist/components/Input/Input.stories.js.map +1 -0
  249. package/dist/components/Input/Input.test.d.ts +1 -0
  250. package/dist/components/Input/Input.test.js +54 -0
  251. package/dist/components/Input/Input.test.js.map +1 -0
  252. package/dist/components/Input/index.d.ts +1 -0
  253. package/dist/components/Input/index.js +9 -0
  254. package/dist/components/Input/index.js.map +1 -0
  255. package/dist/components/Loader/Loader.d.ts +6 -0
  256. package/dist/components/Loader/Loader.js +18 -0
  257. package/dist/components/Loader/Loader.js.map +1 -0
  258. package/dist/components/Loader/Loader.module.scss +40 -0
  259. package/dist/components/Loader/Loader.stories.d.ts +12 -0
  260. package/dist/components/Loader/Loader.stories.js +16 -0
  261. package/dist/components/Loader/Loader.stories.js.map +1 -0
  262. package/dist/components/Loader/index.d.ts +1 -0
  263. package/dist/components/Loader/index.js +9 -0
  264. package/dist/components/Loader/index.js.map +1 -0
  265. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.d.ts +6 -0
  266. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +38 -0
  267. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js.map +1 -0
  268. package/dist/components/LoaderDotsIndicator/index.d.ts +1 -0
  269. package/dist/components/LoaderDotsIndicator/index.js +9 -0
  270. package/dist/components/LoaderDotsIndicator/index.js.map +1 -0
  271. package/dist/components/MainGrid/MainGrid.d.ts +9 -0
  272. package/dist/components/MainGrid/MainGrid.js +52 -0
  273. package/dist/components/MainGrid/MainGrid.js.map +1 -0
  274. package/dist/components/MainGrid/MainGrid.module.scss +28 -0
  275. package/dist/components/MainGrid/MainGrid.stories.d.ts +13 -0
  276. package/dist/components/MainGrid/MainGrid.stories.js +66 -0
  277. package/dist/components/MainGrid/MainGrid.stories.js.map +1 -0
  278. package/dist/components/MainGrid/MainGrid.test.d.ts +1 -0
  279. package/dist/components/MainGrid/MainGrid.test.js +18 -0
  280. package/dist/components/MainGrid/MainGrid.test.js.map +1 -0
  281. package/dist/components/MainGrid/index.d.ts +1 -0
  282. package/dist/components/MainGrid/index.js +9 -0
  283. package/dist/components/MainGrid/index.js.map +1 -0
  284. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.d.ts +7 -0
  285. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +18 -0
  286. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js.map +1 -0
  287. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.module.scss +82 -0
  288. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.d.ts +13 -0
  289. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.js +16 -0
  290. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.js.map +1 -0
  291. package/dist/components/MutableHamburgerButton/index.d.ts +1 -0
  292. package/dist/components/MutableHamburgerButton/index.js +9 -0
  293. package/dist/components/MutableHamburgerButton/index.js.map +1 -0
  294. package/dist/components/Notification/Notification.d.ts +7 -0
  295. package/dist/components/Notification/Notification.js +16 -0
  296. package/dist/components/Notification/Notification.js.map +1 -0
  297. package/dist/components/Notification/Notification.module.scss +25 -0
  298. package/dist/components/Notification/Notification.stories.d.ts +15 -0
  299. package/dist/components/Notification/Notification.stories.js +19 -0
  300. package/dist/components/Notification/Notification.stories.js.map +1 -0
  301. package/dist/components/Notification/index.d.ts +1 -0
  302. package/dist/components/Notification/index.js +9 -0
  303. package/dist/components/Notification/index.js.map +1 -0
  304. package/dist/components/Parallax/Parallax.d.ts +15 -0
  305. package/dist/components/Parallax/Parallax.js +171 -0
  306. package/dist/components/Parallax/Parallax.js.map +1 -0
  307. package/dist/components/Parallax/Parallax.module.scss +28 -0
  308. package/dist/components/Parallax/Parallax.stories.d.ts +32 -0
  309. package/dist/components/Parallax/Parallax.stories.js +23 -0
  310. package/dist/components/Parallax/Parallax.stories.js.map +1 -0
  311. package/dist/components/Parallax/Parallax.test.d.ts +1 -0
  312. package/dist/components/Parallax/Parallax.test.js +22 -0
  313. package/dist/components/Parallax/Parallax.test.js.map +1 -0
  314. package/dist/components/Parallax/index.d.ts +1 -0
  315. package/dist/components/Parallax/index.js +9 -0
  316. package/dist/components/Parallax/index.js.map +1 -0
  317. package/dist/components/Parallax/math/helpers.d.ts +58 -0
  318. package/dist/components/Parallax/math/helpers.js +230 -0
  319. package/dist/components/Parallax/math/helpers.js.map +1 -0
  320. package/dist/components/PasswordInput/PasswordInput.d.ts +38 -0
  321. package/dist/components/PasswordInput/PasswordInput.js +102 -0
  322. package/dist/components/PasswordInput/PasswordInput.js.map +1 -0
  323. package/dist/components/PasswordInput/PasswordInput.module.scss +11 -0
  324. package/dist/components/PasswordInput/PasswordInput.test.d.ts +1 -0
  325. package/dist/components/PasswordInput/PasswordInput.test.js +153 -0
  326. package/dist/components/PasswordInput/PasswordInput.test.js.map +1 -0
  327. package/dist/components/PasswordInput/index.d.ts +1 -0
  328. package/dist/components/PasswordInput/index.js +9 -0
  329. package/dist/components/PasswordInput/index.js.map +1 -0
  330. package/dist/components/PixelatedScan/PixelatedScan.d.ts +8 -0
  331. package/dist/components/PixelatedScan/PixelatedScan.js +101 -0
  332. package/dist/components/PixelatedScan/PixelatedScan.js.map +1 -0
  333. package/dist/components/PixelatedScan/PixelatedScan.module.scss +86 -0
  334. package/dist/components/PixelatedScan/PixelatedScan.stories.d.ts +15 -0
  335. package/dist/components/PixelatedScan/PixelatedScan.stories.js +40 -0
  336. package/dist/components/PixelatedScan/PixelatedScan.stories.js.map +1 -0
  337. package/dist/components/PixelatedScan/index.d.ts +1 -0
  338. package/dist/components/PixelatedScan/index.js +9 -0
  339. package/dist/components/PixelatedScan/index.js.map +1 -0
  340. package/dist/components/ProgressTexts/ProgressTexts.d.ts +22 -0
  341. package/dist/components/ProgressTexts/ProgressTexts.js +38 -0
  342. package/dist/components/ProgressTexts/ProgressTexts.js.map +1 -0
  343. package/dist/components/ProgressTexts/ProgressTexts.module.scss +37 -0
  344. package/dist/components/ProgressTexts/ProgressTexts.stories.d.ts +24 -0
  345. package/dist/components/ProgressTexts/ProgressTexts.stories.js +86 -0
  346. package/dist/components/ProgressTexts/ProgressTexts.stories.js.map +1 -0
  347. package/dist/components/ProgressTexts/ProgressTexts.test.d.ts +1 -0
  348. package/dist/components/ProgressTexts/ProgressTexts.test.js +52 -0
  349. package/dist/components/ProgressTexts/ProgressTexts.test.js.map +1 -0
  350. package/dist/components/ProgressTexts/index.d.ts +1 -0
  351. package/dist/components/ProgressTexts/index.js +9 -0
  352. package/dist/components/ProgressTexts/index.js.map +1 -0
  353. package/dist/components/Select/Select.d.ts +22 -0
  354. package/dist/components/Select/Select.js +72 -0
  355. package/dist/components/Select/Select.js.map +1 -0
  356. package/dist/components/Select/Select.module.scss +47 -0
  357. package/dist/components/Select/Select.stories.d.ts +48 -0
  358. package/dist/components/Select/Select.stories.js +34 -0
  359. package/dist/components/Select/Select.stories.js.map +1 -0
  360. package/dist/components/Select/Select.test.d.ts +1 -0
  361. package/dist/components/Select/Select.test.js +12 -0
  362. package/dist/components/Select/Select.test.js.map +1 -0
  363. package/dist/components/Select/index.d.ts +1 -0
  364. package/dist/components/Select/index.js +9 -0
  365. package/dist/components/Select/index.js.map +1 -0
  366. package/dist/components/Spacing/Spacing.d.ts +6 -0
  367. package/dist/components/Spacing/Spacing.js +15 -0
  368. package/dist/components/Spacing/Spacing.js.map +1 -0
  369. package/dist/components/Spacing/Spacing.module.scss +13 -0
  370. package/dist/components/Spacing/Spacing.stories.d.ts +7 -0
  371. package/dist/components/Spacing/Spacing.stories.js +35 -0
  372. package/dist/components/Spacing/Spacing.stories.js.map +1 -0
  373. package/dist/components/Spacing/index.d.ts +1 -0
  374. package/dist/components/Spacing/index.js +9 -0
  375. package/dist/components/Spacing/index.js.map +1 -0
  376. package/dist/components/Table/Table.d.ts +19 -0
  377. package/dist/components/Table/Table.js +84 -0
  378. package/dist/components/Table/Table.js.map +1 -0
  379. package/dist/components/Table/Table.module.scss +76 -0
  380. package/dist/components/Table/Table.stories.d.ts +15 -0
  381. package/dist/components/Table/Table.stories.js +84 -0
  382. package/dist/components/Table/Table.stories.js.map +1 -0
  383. package/dist/components/Table/Table.test.d.ts +1 -0
  384. package/dist/components/Table/Table.test.js +35 -0
  385. package/dist/components/Table/Table.test.js.map +1 -0
  386. package/dist/components/Table/index.d.ts +1 -0
  387. package/dist/components/Table/index.js +9 -0
  388. package/dist/components/Table/index.js.map +1 -0
  389. package/dist/components/Tabs/Tabs.d.ts +11 -0
  390. package/dist/components/Tabs/Tabs.js +45 -0
  391. package/dist/components/Tabs/Tabs.js.map +1 -0
  392. package/dist/components/Tabs/Tabs.module.scss +22 -0
  393. package/dist/components/Tabs/Tabs.test.d.ts +1 -0
  394. package/dist/components/Tabs/Tabs.test.js +39 -0
  395. package/dist/components/Tabs/Tabs.test.js.map +1 -0
  396. package/dist/components/Tabs/index.d.ts +1 -0
  397. package/dist/components/Tabs/index.js +9 -0
  398. package/dist/components/Tabs/index.js.map +1 -0
  399. package/dist/components/Text/Text.d.ts +8 -0
  400. package/dist/components/Text/Text.js +27 -0
  401. package/dist/components/Text/Text.js.map +1 -0
  402. package/dist/components/Text/Text.module.scss +77 -0
  403. package/dist/components/Text/Text.stories.d.ts +7 -0
  404. package/dist/components/Text/Text.stories.js +20 -0
  405. package/dist/components/Text/Text.stories.js.map +1 -0
  406. package/dist/components/Text/Text.test.d.ts +1 -0
  407. package/dist/components/Text/Text.test.js +12 -0
  408. package/dist/components/Text/Text.test.js.map +1 -0
  409. package/dist/components/Text/index.d.ts +1 -0
  410. package/dist/components/Text/index.js +9 -0
  411. package/dist/components/Text/index.js.map +1 -0
  412. package/dist/components/Transition/Transition.d.ts +47 -0
  413. package/dist/components/Transition/Transition.js +223 -0
  414. package/dist/components/Transition/Transition.js.map +1 -0
  415. package/dist/components/Transition/Transition.module.scss +135 -0
  416. package/dist/components/Transition/Transition.stories.d.ts +10 -0
  417. package/dist/components/Transition/Transition.stories.js +29 -0
  418. package/dist/components/Transition/Transition.stories.js.map +1 -0
  419. package/dist/components/Transition/Transition.test.d.ts +1 -0
  420. package/dist/components/Transition/Transition.test.js +55 -0
  421. package/dist/components/Transition/Transition.test.js.map +1 -0
  422. package/dist/components/Transition/index.d.ts +1 -0
  423. package/dist/components/Transition/index.js +10 -0
  424. package/dist/components/Transition/index.js.map +1 -0
  425. package/dist/components/UncontrolledTransition/UncontrolledTransition.d.ts +11 -0
  426. package/dist/components/UncontrolledTransition/UncontrolledTransition.js +95 -0
  427. package/dist/components/UncontrolledTransition/UncontrolledTransition.js.map +1 -0
  428. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.d.ts +28 -0
  429. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.js +180 -0
  430. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.js.map +1 -0
  431. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.module.scss +62 -0
  432. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.d.ts +1 -0
  433. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.js +131 -0
  434. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.js.map +1 -0
  435. package/dist/components/UncontrolledTransition/index.d.ts +1 -0
  436. package/dist/components/UncontrolledTransition/index.js +9 -0
  437. package/dist/components/UncontrolledTransition/index.js.map +1 -0
  438. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.d.ts +35 -0
  439. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +86 -0
  440. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +1 -0
  441. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.d.ts +47 -0
  442. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.js +56 -0
  443. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.js.map +1 -0
  444. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.d.ts +1 -0
  445. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.js +133 -0
  446. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.js.map +1 -0
  447. package/dist/components/WalletConnectionWrapper/index.d.ts +1 -0
  448. package/dist/components/WalletConnectionWrapper/index.js +9 -0
  449. package/dist/components/WalletConnectionWrapper/index.js.map +1 -0
  450. package/dist/context/OneUIProvider.d.ts +54 -0
  451. package/dist/context/OneUIProvider.js +60 -0
  452. package/dist/context/OneUIProvider.js.map +1 -0
  453. package/dist/context/OneUIProvider.test.d.ts +1 -0
  454. package/dist/context/OneUIProvider.test.js +46 -0
  455. package/dist/context/OneUIProvider.test.js.map +1 -0
  456. package/dist/context/__mocks__/OneUIProvider.d.ts +45 -0
  457. package/dist/context/__mocks__/OneUIProvider.js +13 -0
  458. package/dist/context/__mocks__/OneUIProvider.js.map +1 -0
  459. package/dist/hooks/useAsyncControl.d.ts +9 -0
  460. package/dist/hooks/useAsyncControl.js +40 -0
  461. package/dist/hooks/useAsyncControl.js.map +1 -0
  462. package/dist/hooks/usePagination.d.ts +19 -0
  463. package/dist/hooks/usePagination.js +65 -0
  464. package/dist/hooks/usePagination.js.map +1 -0
  465. package/dist/hooks/usePooledOperation.d.ts +15 -0
  466. package/dist/hooks/usePooledOperation.js +64 -0
  467. package/dist/hooks/usePooledOperation.js.map +1 -0
  468. package/dist/hooks/usePooling.d.ts +16 -0
  469. package/dist/hooks/usePooling.js +47 -0
  470. package/dist/hooks/usePooling.js.map +1 -0
  471. package/dist/hooks/usePooling.test.d.ts +1 -0
  472. package/dist/hooks/usePooling.test.js +104 -0
  473. package/dist/hooks/usePooling.test.js.map +1 -0
  474. package/dist/hooks/useShortIntl.d.ts +14 -0
  475. package/dist/hooks/useShortIntl.js +35 -0
  476. package/dist/hooks/useShortIntl.js.map +1 -0
  477. package/dist/models/GenericContract.d.ts +66 -0
  478. package/dist/models/GenericContract.js +14 -0
  479. package/dist/models/GenericContract.js.map +1 -0
  480. package/dist/storybookUtils/index.d.ts +5 -0
  481. package/dist/storybookUtils/index.js +27 -0
  482. package/dist/storybookUtils/index.js.map +1 -0
  483. package/package.json +85 -0
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const react_1 = require("react");
16
+ const useAsyncControl_1 = __importDefault(require("./useAsyncControl"));
17
+ const usePooling_1 = __importDefault(require("./usePooling"));
18
+ /**
19
+ * A toolkit hook to trigger an request to start a process and execute a pooling operation to validate when the operation is finished
20
+ */
21
+ function usePooledOperation() {
22
+ const requestOperation = (0, react_1.useRef)();
23
+ const poolingOperation = (0, react_1.useRef)();
24
+ const requestControl = (0, useAsyncControl_1.default)();
25
+ const pollingControl = (0, usePooling_1.default)();
26
+ function triggerRequest() {
27
+ requestControl.process(() => __awaiter(this, void 0, void 0, function* () {
28
+ yield requestOperation.current();
29
+ triggerPooling();
30
+ }));
31
+ }
32
+ function triggerPooling() {
33
+ pollingControl.startPolling(poolingOperation.current);
34
+ }
35
+ return {
36
+ /** Indicates when it's loading */
37
+ loading: requestControl.loading || pollingControl.isPooling,
38
+ /** Indicates error of pooling or request */
39
+ error: !!requestControl.error || !!pollingControl.failed,
40
+ /** Retries the operation based on the current failed step */
41
+ retry: requestControl.error
42
+ ? triggerRequest
43
+ : pollingControl.failed
44
+ ? triggerPooling
45
+ : undefined,
46
+ /** Initiates the request followed by the pooling operation */
47
+ start: (
48
+ /** An arbitrary request */
49
+ _requestOperation,
50
+ /** Resolves to a boolean that indicated if is finished (true) or not (false) */
51
+ _poolingOperation) => {
52
+ requestOperation.current = _requestOperation;
53
+ poolingOperation.current = _poolingOperation;
54
+ triggerRequest();
55
+ },
56
+ /** Clear any error that is registered */
57
+ clearError: () => {
58
+ requestControl.setError(undefined);
59
+ pollingControl.setFailed(false);
60
+ },
61
+ };
62
+ }
63
+ exports.default = usePooledOperation;
64
+ //# sourceMappingURL=usePooledOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePooledOperation.js","sourceRoot":"","sources":["../../src/hooks/usePooledOperation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAA0C;AAC1C,wEAAgD;AAChD,8DAAsC;AAEtC;;GAEG;AACH,SAAwB,kBAAkB;IACxC,MAAM,gBAAgB,GAAG,IAAA,cAAM,GAA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react" />
2
+ /**
3
+ * This callback should return a boolean that indicates if the pooling has finished (true) or it should continue (false)
4
+ */
5
+ declare type PoolingAction = () => Promise<boolean>;
6
+ export default function usePooling(intervalMs?: number, maxPoolingTime?: number): {
7
+ failed: boolean;
8
+ setFailed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
9
+ isPooling: boolean;
10
+ /**
11
+ *
12
+ * @param cb {@link PoolingAction} - Executes and returns if has finished (true) or not (false)
13
+ */
14
+ startPolling: (cb: PoolingAction) => void;
15
+ };
16
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const react_1 = require("react");
13
+ function usePooling(intervalMs = 1000, maxPoolingTime = 60000) {
14
+ const [intervalId, setIntervalId] = (0, react_1.useState)();
15
+ const [failed, setFailed] = (0, react_1.useState)(false);
16
+ (0, react_1.useEffect)(() => () => {
17
+ if (intervalId)
18
+ clearInterval(intervalId);
19
+ }, [intervalId]);
20
+ return {
21
+ failed,
22
+ setFailed,
23
+ isPooling: !!intervalId,
24
+ /**
25
+ *
26
+ * @param cb {@link PoolingAction} - Executes and returns if has finished (true) or not (false)
27
+ */
28
+ startPolling: (cb) => {
29
+ const maxPoolings = Math.ceil(maxPoolingTime / intervalMs);
30
+ let poolingCount = 0;
31
+ const intervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () {
32
+ poolingCount++;
33
+ const finished = yield cb();
34
+ if (finished)
35
+ setIntervalId(undefined);
36
+ else if (poolingCount === maxPoolings) {
37
+ setIntervalId(undefined);
38
+ setFailed(true);
39
+ }
40
+ }), intervalMs);
41
+ setIntervalId(intervalId);
42
+ setFailed(false);
43
+ },
44
+ };
45
+ }
46
+ exports.default = usePooling;
47
+ //# sourceMappingURL=usePooling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePooling.js","sourceRoot":"","sources":["../../src/hooks/usePooling.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAA4C;AAO5C,SAAwB,UAAU,CAAC,UAAU,GAAG,IAAI,EAAE,cAAc,GAAG,KAAK;IAC1E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,GAAgB,CAAC;IAC7D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErD,IAAA,iBAAS,EACP,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,IAAI,UAAU;YAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO;QACL,MAAM;QACN,SAAS;QACT,SAAS,EAAE,CAAC,CAAC,UAAU;QACvB;;;WAGG;QACH,YAAY,EAAE,CAAC,EAAiB,EAAE,EAAE;YAClC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,CAAC;YAC3D,IAAI,YAAY,GAAG,CAAC,CAAC;YACrB,MAAM,UAAU,GAAG,WAAW,CAAC,GAAS,EAAE;gBACxC,YAAY,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,MAAM,EAAE,EAAE,CAAC;gBAC5B,IAAI,QAAQ;oBAAE,aAAa,CAAC,SAAS,CAAC,CAAC;qBAClC,IAAI,YAAY,KAAK,WAAW,EAAE;oBACrC,aAAa,CAAC,SAAS,CAAC,CAAC;oBACzB,SAAS,CAAC,IAAI,CAAC,CAAC;iBACjB;YACH,CAAC,CAAA,EAAE,UAAU,CAAC,CAAC;YACf,aAAa,CAAC,UAAU,CAAC,CAAC;YAC1B,SAAS,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC;AAnCD,6BAmCC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const react_hooks_1 = require("@testing-library/react-hooks");
16
+ const test_utils_1 = require("react-dom/test-utils");
17
+ const usePooling_1 = __importDefault(require("./usePooling"));
18
+ const mockCb = () => Promise.resolve(true);
19
+ beforeEach(() => {
20
+ jest.useFakeTimers();
21
+ });
22
+ afterEach(() => {
23
+ jest.useRealTimers();
24
+ jest.clearAllTimers();
25
+ });
26
+ function actAndSync(cb) {
27
+ (0, test_utils_1.act)(() => {
28
+ cb();
29
+ // This is to advance the timer for the setState
30
+ jest.advanceTimersByTime(100);
31
+ });
32
+ }
33
+ const renderHookAndSync = (cb) => {
34
+ const result = (0, react_hooks_1.renderHook)(cb);
35
+ jest.advanceTimersByTime(100);
36
+ return result;
37
+ };
38
+ it("Should mount", () => {
39
+ renderHookAndSync(() => (0, usePooling_1.default)());
40
+ });
41
+ it("Should be able to create an interval", () => {
42
+ expect(jest.getTimerCount()).toBe(0);
43
+ const { result: { current: { startPolling }, }, } = renderHookAndSync(() => (0, usePooling_1.default)());
44
+ actAndSync(() => startPolling(mockCb));
45
+ expect(jest.getTimerCount()).toBe(1);
46
+ /** Should clear the old interval */
47
+ actAndSync(() => startPolling(mockCb));
48
+ expect(jest.getTimerCount()).toBe(1);
49
+ });
50
+ it("Should indicate when the interval shall end", () => __awaiter(void 0, void 0, void 0, function* () {
51
+ let num = 0;
52
+ const cb = () => __awaiter(void 0, void 0, void 0, function* () {
53
+ num++;
54
+ return num === 3;
55
+ });
56
+ const { result, rerender } = renderHookAndSync(() => (0, usePooling_1.default)());
57
+ const { startPolling } = result.current;
58
+ expect(jest.getTimerCount()).toBe(0);
59
+ expect(result.current.isPooling).toBeFalsy();
60
+ actAndSync(() => startPolling(cb));
61
+ expect(jest.getTimerCount()).toBe(1);
62
+ expect(result.current.isPooling).toBeTruthy();
63
+ // First execution
64
+ (0, test_utils_1.act)(() => {
65
+ jest.advanceTimersByTime(1000);
66
+ });
67
+ expect(jest.getTimerCount()).toBe(1);
68
+ expect(result.current.isPooling).toBeTruthy();
69
+ //Second execution
70
+ (0, test_utils_1.act)(() => {
71
+ jest.advanceTimersByTime(1000);
72
+ });
73
+ expect(jest.getTimerCount()).toBe(1);
74
+ expect(result.current.isPooling).toBeTruthy();
75
+ //Last execution
76
+ (0, test_utils_1.act)(() => {
77
+ jest.advanceTimersByTime(1000);
78
+ });
79
+ // expect(jest.getTimerCount()).toBe(0);
80
+ // expect(result.current.isPooling).toBeFalsy();
81
+ }));
82
+ it.each([
83
+ [1000, 5000, 5],
84
+ [500, 10000, 20],
85
+ [1000, 2578, 3],
86
+ ])("Should end the pooling with error when the pooling of interval %s with max of %s exceeds max executions of %s", (poolingInterval, maxTime, expectedExecutionsCount) => {
87
+ const { result } = renderHookAndSync(() => (0, usePooling_1.default)(poolingInterval, maxTime));
88
+ const { startPolling } = result.current;
89
+ actAndSync(() => startPolling(() => __awaiter(void 0, void 0, void 0, function* () { return false; })));
90
+ for (let i = 1; i < expectedExecutionsCount; i++) {
91
+ (0, test_utils_1.act)(() => {
92
+ jest.advanceTimersByTime(poolingInterval);
93
+ });
94
+ if (i === expectedExecutionsCount) {
95
+ expect(result.current.isPooling).toBeFalsy();
96
+ expect(result.current.failed).toBeTruthy();
97
+ }
98
+ else {
99
+ expect(result.current.isPooling).toBeTruthy();
100
+ expect(result.current.failed).toBeFalsy();
101
+ }
102
+ }
103
+ });
104
+ //# sourceMappingURL=usePooling.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePooling.test.js","sourceRoot":"","sources":["../../src/hooks/usePooling.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8DAA0D;AAC1D,qDAA2C;AAC3C,8DAAsC;AAEtC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3C,UAAU,CAAC,GAAG,EAAE;IACd,IAAI,CAAC,aAAa,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC;AACH,SAAS,CAAC,GAAG,EAAE;IACb,IAAI,CAAC,aAAa,EAAE,CAAC;IACrB,IAAI,CAAC,cAAc,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,EAAY;IAC9B,IAAA,gBAAG,EAAC,GAAG,EAAE;QACP,EAAE,EAAE,CAAC;QACL,gDAAgD;QAChD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,iBAAiB,GAAsB,CAAC,EAAE,EAAE,EAAE;IAClD,MAAM,MAAM,GAAG,IAAA,wBAAU,EAAC,EAAE,CAAC,CAAC;IAC9B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,EAAE,CAAC,cAAc,EAAE,GAAG,EAA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AAC,eAAe,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE;IACpD,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAC,GAAG,EAAE,CACxC,IAAA,oBAAU,EAAC,eAAe,EAAE,OAAO,CAAC,CACrC,CAAC;IACF,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;IACxC,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,GAAS,EAAE,kDAAC,OAAA,KAAK,CAAA,GAAA,CAAC,CAAC,CAAC;IAElD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,uBAAuB,EAAE,CAAC,EAAE,EAAE;QAChD,IAAA,gBAAG,EAAC,GAAG,EAAE;YACP,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,uBAAuB,EAAE;YACjC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC;YAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;SAC5C;aAAM;YACL,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC;SAC3C;KACF;AACH,CAAC,CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { IntlFormatters, IntlShape } from "react-intl";
2
+ import { BigNumber } from "bignumber.js";
3
+ export default function useShortIntl(): IntlShape & {
4
+ txt: (id: OnepercentUtility.IntlIds, params?: Parameters<IntlFormatters["formatMessage"]>[1]) => ReturnType<IntlFormatters["formatMessage"]>;
5
+ formatBigNumber(number: BigNumber, options?: Parameters<IntlFormatters["formatNumber"]>[1]): string;
6
+ };
7
+ declare type StrMap = {
8
+ [s: string]: string;
9
+ };
10
+ declare type IsolatedMessages<A extends string, M extends StrMap, P extends string> = {
11
+ [s1 in `${P}.${keyof M extends string ? keyof M : ""}`]: M[keyof M];
12
+ };
13
+ export declare function isolateMessages<A extends string, M extends StrMap>(preffix: A, strings: M): IsolatedMessages<A, M, A>;
14
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isolateMessages = void 0;
4
+ const react_intl_1 = require("react-intl");
5
+ function useShortIntl() {
6
+ const intl = (0, react_intl_1.useIntl)();
7
+ const { formatMessage } = intl;
8
+ return Object.assign(Object.assign({}, intl), { txt: (id, params) => {
9
+ return formatMessage({ id }, params);
10
+ }, formatBigNumber(bigNumber, options) {
11
+ const { decimalSeparator } = intl
12
+ .formatNumberToParts(1000.1)
13
+ .reduce((r, a) => {
14
+ if (a.type === "decimal")
15
+ return Object.assign(Object.assign({}, r), { decimalSeparator: a.value });
16
+ if (a.type === "group")
17
+ return Object.assign(Object.assign({}, r), { thousandSeparator: a.value });
18
+ return r;
19
+ }, {});
20
+ const integerPart = bigNumber.integerValue(1);
21
+ const integer = intl.formatNumber(integerPart.toNumber(), options);
22
+ const decimals = bigNumber
23
+ .minus(integerPart)
24
+ .decimalPlaces((options === null || options === void 0 ? void 0 : options.maximumFractionDigits) || bigNumber.decimalPlaces(), 5)
25
+ .toString()
26
+ .replace("0.", "");
27
+ return `${integer}${decimals !== "0" ? `${decimalSeparator}${decimals}` : ""}`;
28
+ } });
29
+ }
30
+ exports.default = useShortIntl;
31
+ function isolateMessages(preffix, strings) {
32
+ return Object.entries(strings).reduce((r, [k, v]) => (Object.assign(Object.assign({}, r), { [`${preffix}.${k}`]: v })), {});
33
+ }
34
+ exports.isolateMessages = isolateMessages;
35
+ //# sourceMappingURL=useShortIntl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShortIntl.js","sourceRoot":"","sources":["../../src/hooks/useShortIntl.ts"],"names":[],"mappings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GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,EACxD,EAAE,CAAC;QACL,CAAC,IACD;AACJ,CAAC;AAzCD,+BAyCC;AAUD,SAAgB,eAAe,CAC7B,OAAU,EACV,OAAU;IAEV,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACnC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,iCACV,CAAC,KACJ,CAAC,GAAG,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IACtB,EACF,EAA4C,CAC7C,CAAC;AACJ,CAAC;AAXD,0CAWC"}
@@ -0,0 +1,66 @@
1
+ import { Contract, ContractOptions, EventData, PastEventOptions } from "web3-eth-contract";
2
+ export declare type AllABIs = OnepercentUtility.ApplicationABIs;
3
+ declare type ExtractMethods<A extends AllABIs[number]> = A extends {
4
+ type: "function";
5
+ } ? A["name"] : never;
6
+ declare type ExtractEvents<A extends AllABIs[number]> = A extends {
7
+ type: "event";
8
+ } ? A["name"] : never;
9
+ declare type MapTypeToJS<L> = L extends "string" ? string : L extends "address" ? string : L extends "uint256" ? string : L extends "bool" ? boolean : unknown;
10
+ declare type ExtractFromObj<R extends (AllABIs[number] & {
11
+ type: "function";
12
+ })> = {
13
+ [K in R["outputs"][number]["name"]]: MapTypeToJS<(R["outputs"][number] & {
14
+ name: K;
15
+ })["type"]>;
16
+ };
17
+ declare type ExtractMethodDefinition<A extends AllABIs, N extends (AllABIs[number] & {
18
+ type: "function";
19
+ })["name"], R = A[number] & {
20
+ type: "function";
21
+ name: N;
22
+ }> = (...args: TuplifyUnion<(A[number] & {
23
+ type: "function";
24
+ name: N;
25
+ })["inputs"][number]["name"]>) => {
26
+ call: () => Promise<R extends {
27
+ outputs: {
28
+ length: 1;
29
+ };
30
+ } ? MapTypeToJS<R["outputs"][0]["type"]> : R extends {
31
+ outputs: any;
32
+ } ? ExtractFromObj<R> : void>;
33
+ send: (prop: {
34
+ from: string;
35
+ }) => Promise<void>;
36
+ };
37
+ declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
38
+ declare type LastOf<T> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? R : never;
39
+ declare type Push<T extends any[], V> = [...T, V];
40
+ declare type TuplifyUnion<T, L = LastOf<T>, N = [T] extends [never] ? true : false> = true extends N ? [] : Push<TuplifyUnion<Exclude<T, L>>, MapTypeToJS<L>>;
41
+ export default class GenericContract<A extends AllABIs = AllABIs, E extends string = ExtractEvents<A[number]> | "allEvents"> extends Contract {
42
+ events: Exclude<E, "allEvents">;
43
+ constructor(jsonInterface: A, address?: string, options?: ContractOptions);
44
+ methods: {
45
+ [k in ExtractMethods<A[number]>]: ExtractMethodDefinition<A, k>;
46
+ };
47
+ getPastEvents(event: E): Promise<GenericEventData<A>[]>;
48
+ getPastEvents(event: E, options: PastEventOptions, callback: (error: Error, event: EventData) => void): Promise<GenericEventData<A>[]>;
49
+ getPastEvents(event: E, options: PastEventOptions): Promise<GenericEventData<A>[]>;
50
+ getPastEvents(event: E, callback: (error: Error, event: EventData) => void): Promise<GenericEventData<A>[]>;
51
+ }
52
+ export declare type GenericEventData<E extends AllABIs> = EventData & GenericEvent<E>;
53
+ declare type ABIEvent = AllABIs[number] & {
54
+ type: "event";
55
+ };
56
+ declare type GenericEvent<ABI extends AllABIs, E extends string = ExtractEvents<ABI[number]>> = {
57
+ event: E;
58
+ returnValues: ExtractReturnValues<ABIEvent & {
59
+ name: E;
60
+ }>;
61
+ };
62
+ declare type ExtractReturnValues<E extends ABIEvent> = ExtractInputType<E["inputs"][number]>;
63
+ declare type ExtractInputType<I extends ABIEvent["inputs"][number]> = {
64
+ [k in I["name"]]: MapTypeToJS<I["internalType"]>;
65
+ };
66
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
4
+ const web3_eth_contract_1 = require("web3-eth-contract");
5
+ class GenericContract extends web3_eth_contract_1.Contract {
6
+ constructor(jsonInterface, address, options) {
7
+ super(jsonInterface, address, options);
8
+ }
9
+ getPastEvents(event, options, callback) {
10
+ return super.getPastEvents(event, options, callback);
11
+ }
12
+ }
13
+ exports.default = GenericContract;
14
+ //# sourceMappingURL=GenericContract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericContract.js","sourceRoot":"","sources":["../../src/models/GenericContract.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,yDAK6B;AAoF3B,MAAqB,eAGnB,SAAQ,4BAAQ;IAEhB,YAAY,aAAgB,EAAE,OAAgB,EAAE,OAAyB;QACvE,KAAK,CAAC,aAAqC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAkBQ,aAAa,CACpB,KAAU,EACV,OAAa,EACb,QAAc;QAEd,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAQ,CAAC;IAC9D,CAAC;CACF;AAhCD,kCAgCC"}
@@ -0,0 +1,5 @@
1
+ import React, { ComponentProps, PropsWithChildren } from "react";
2
+ export declare function extractAllPossibilitiesFromEnumProp<C extends React.JSXElementConstructor<any>, K extends keyof P, P = ComponentProps<C>>(component: C, propName: K): P[K][];
3
+ export declare function SideBySideContainer({ children, exampleName, }: PropsWithChildren<{
4
+ exampleName: string;
5
+ }>): JSX.Element;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SideBySideContainer = exports.extractAllPossibilitiesFromEnumProp = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Spacing_1 = __importDefault(require("../components/Spacing"));
9
+ function extractAllPossibilitiesFromEnumProp(component, propName) {
10
+ return component.__docgenInfo.props[propName].type.value.map((a) => JSON.parse(a.value));
11
+ }
12
+ exports.extractAllPossibilitiesFromEnumProp = extractAllPossibilitiesFromEnumProp;
13
+ function SideBySideContainer({ children, exampleName, }) {
14
+ return (react_1.default.createElement("div", { style: {
15
+ width: "25%",
16
+ marginRight: 24,
17
+ display: "inline-flex",
18
+ flexDirection: "column",
19
+ } },
20
+ react_1.default.createElement("span", { style: { borderBottom: "2px solid black", marginBottom: 14 } },
21
+ "Tipo: ",
22
+ react_1.default.createElement("b", null, exampleName)),
23
+ children,
24
+ react_1.default.createElement(Spacing_1.default, { size: "large" })));
25
+ }
26
+ exports.SideBySideContainer = SideBySideContainer;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storybookUtils/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAiE;AACjE,oEAA4C;AAE5C,SAAgB,mCAAmC,CAIjD,SAAY,EAAE,QAAW;IACzB,OAAQ,SAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CACnE,CAAC,CAAoB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CACpC,CAAC;AACd,CAAC;AARD,kFAQC;AAED,SAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,WAAW,GACgC;IAC3C,OAAO,CACL,uCACE,KAAK,EAAE;YACL,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,aAAa;YACtB,aAAa,EAAE,QAAQ;SACxB;QAED,wCAAM,KAAK,EAAE,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,EAAE,EAAE;;YAC1D,yCAAI,WAAW,CAAK,CACrB;QACN,QAAQ;QACT,8BAAC,iBAAO,IAAC,IAAI,EAAC,OAAO,GAAG,CACpB,CACP,CAAC;AACJ,CAAC;AApBD,kDAoBC"}
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@onepercentio/one-ui",
3
+ "version": "0.1.2",
4
+ "description": "A set of reusable components created through the development of Onepercent projects",
5
+ "files": [
6
+ "dist",
7
+ "WebpackConfigs"
8
+ ],
9
+ "repository": "git@github.com:onepercentio/one-ui.git",
10
+ "author": "Murilo Oliveira de Araujo <muritavo@outlook.com>",
11
+ "license": "MIT",
12
+ "private": false,
13
+ "types": "src/types.d.ts",
14
+ "devDependencies": {
15
+ "@babel/core": "^7.16.0",
16
+ "@muritavo/webpack-microfrontend-scripts": "^0.0.16",
17
+ "@storybook/addon-actions": "^6.4.18",
18
+ "@storybook/addon-essentials": "^6.4.18",
19
+ "@storybook/addon-links": "^6.4.18",
20
+ "@storybook/builder-webpack5": "^6.4.18",
21
+ "@storybook/manager-webpack5": "^6.4.18",
22
+ "@storybook/preset-scss": "^1.0.3",
23
+ "@storybook/react": "^6.4.18",
24
+ "@testing-library/react": "^12.1.2",
25
+ "@testing-library/react-hooks": "^7.0.2",
26
+ "@testing-library/user-event": "^13.5.0",
27
+ "@types/jest": "^27.4.0",
28
+ "@types/node": "^17.0.13",
29
+ "assert": "^2.0.0",
30
+ "babel-loader": "^8.2.3",
31
+ "buffer": "^6.0.3",
32
+ "chroma-js": "^2.4.2",
33
+ "cpy-cli": "^3.1.1",
34
+ "crypto-browserify": "^3.12.0",
35
+ "css-loader": "^5",
36
+ "cypress": "^9.2.0",
37
+ "https-browserify": "^1.0.0",
38
+ "inquirer": "^8.2.2",
39
+ "jest": "^27.3.1",
40
+ "node-sass": "^6.0.1",
41
+ "os-browserify": "^0.3.0",
42
+ "react": "^17.0.2",
43
+ "react-dom": "^17.0.2",
44
+ "react-intl": "^5.24.4",
45
+ "react-scripts": "^5.0.0",
46
+ "sass": "^1.43.4",
47
+ "sass-loader": "^10",
48
+ "stream-browserify": "^3.0.0",
49
+ "stream-http": "^3.2.0",
50
+ "style-loader": "^2",
51
+ "ts-jest": "^27.0.7",
52
+ "typescript": "^4.5.2",
53
+ "url": "^0.11.0"
54
+ },
55
+ "dependencies": {
56
+ "@types/chroma-js": "^2.1.3",
57
+ "@types/lodash": "^4.14.177",
58
+ "bignumber.js": "^9.0.2",
59
+ "deepdash": "^5.3.9",
60
+ "identity-obj-proxy": "^3.0.0",
61
+ "lodash": "^4.17.21",
62
+ "prerender-loader": "^1.3.0",
63
+ "sharp": "^0.30.3"
64
+ },
65
+ "resolutions": {
66
+ "**/html-webpack-plugin": "^5",
67
+ "**/webpack": "^5"
68
+ },
69
+ "scripts": {
70
+ "storybook": "start-storybook -p 6006",
71
+ "build-storybook": "build-storybook",
72
+ "prebuild": "cd src",
73
+ "copy-css": "cpy --cwd=\"src\" \"**/*.{scss,svg}\" \"../dist\" --parents",
74
+ "build": "tsc && npm run copy-css",
75
+ "postbuild": "cd ..",
76
+ "prepare": "npm run build",
77
+ "dev": "tsc --watch",
78
+ "test:watch": "jest --watchAll --coverage",
79
+ "deploy:storybook": "yarn build-storybook; firebase deploy --only hosting"
80
+ },
81
+ "peerDependencies": {
82
+ "chroma-js": "^2.4.2",
83
+ "use-wallet": "^0.13.4"
84
+ }
85
+ }