@onepercentio/one-ui 0.6.2 → 0.6.3

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 (409) hide show
  1. package/cypress/support/e2e.js +16 -18
  2. package/dist/__test__/analytics.d.ts +3 -3
  3. package/dist/__test__/analytics.js +18 -18
  4. package/dist/__test__/firestore.d.ts +2 -2
  5. package/dist/__test__/firestore.js +25 -25
  6. package/dist/__test__/utils.d.ts +16 -16
  7. package/dist/__test__/utils.js +155 -155
  8. package/dist/components/AdaptiveButton/AdaptiveButton.d.ts +8 -8
  9. package/dist/components/AdaptiveButton/AdaptiveButton.js +92 -92
  10. package/dist/components/AdaptiveButton/AdaptiveButton.stories.d.ts +18 -18
  11. package/dist/components/AdaptiveButton/AdaptiveButton.stories.js +81 -81
  12. package/dist/components/AdaptiveButton/index.d.ts +1 -1
  13. package/dist/components/AdaptiveButton/index.js +8 -8
  14. package/dist/components/AdaptiveDialog/AdaptiveDialog.d.ts +9 -9
  15. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +59 -59
  16. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.d.ts +19 -19
  17. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.js +93 -93
  18. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.d.ts +1 -1
  19. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.js +14 -14
  20. package/dist/components/AdaptiveDialog/index.d.ts +1 -1
  21. package/dist/components/AdaptiveDialog/index.js +8 -8
  22. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.d.ts +14 -14
  23. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +72 -72
  24. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.d.ts +19 -19
  25. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.js +20 -20
  26. package/dist/components/AdaptiveSidebar/index.d.ts +1 -1
  27. package/dist/components/AdaptiveSidebar/index.js +8 -8
  28. package/dist/components/AnchoredTooltip/AnchoredTooltip.d.ts +13 -13
  29. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +173 -173
  30. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.d.ts +16 -16
  31. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.js +85 -85
  32. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.d.ts +1 -1
  33. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.js +19 -19
  34. package/dist/components/AnchoredTooltip/index.d.ts +1 -1
  35. package/dist/components/AnchoredTooltip/index.js +8 -8
  36. package/dist/components/AnimatedEntrance/AnimatedEntrance.d.ts +18 -18
  37. package/dist/components/AnimatedEntrance/AnimatedEntrance.js +125 -125
  38. package/dist/components/AnimatedEntrance/AnimatedEntrance.js.map +1 -1
  39. package/dist/components/AnimatedEntrance/AnimatedEntrance.stories.d.ts +14 -14
  40. package/dist/components/AnimatedEntrance/AnimatedEntrance.stories.js +66 -66
  41. package/dist/components/AnimatedEntrance/index.d.ts +1 -1
  42. package/dist/components/AnimatedEntrance/index.js +8 -8
  43. package/dist/components/AsyncWrapper/AsyncWrapper.d.ts +10 -10
  44. package/dist/components/AsyncWrapper/AsyncWrapper.js +24 -24
  45. package/dist/components/AsyncWrapper/AsyncWrapper.stories.d.ts +18 -18
  46. package/dist/components/AsyncWrapper/AsyncWrapper.stories.js +33 -33
  47. package/dist/components/AsyncWrapper/AsyncWrapper.test.d.ts +1 -1
  48. package/dist/components/AsyncWrapper/AsyncWrapper.test.js +18 -18
  49. package/dist/components/AsyncWrapper/index.d.ts +1 -1
  50. package/dist/components/AsyncWrapper/index.js +8 -8
  51. package/dist/components/Avatar/Avatar.d.ts +8 -8
  52. package/dist/components/Avatar/Avatar.js +44 -44
  53. package/dist/components/Avatar/Avatar.stories.d.ts +14 -14
  54. package/dist/components/Avatar/Avatar.stories.js +18 -18
  55. package/dist/components/Avatar/Avatar.test.d.ts +1 -1
  56. package/dist/components/Avatar/Avatar.test.js +35 -35
  57. package/dist/components/Avatar/index.d.ts +1 -1
  58. package/dist/components/Avatar/index.js +8 -8
  59. package/dist/components/BucketFill/BucketFill.d.ts +12 -12
  60. package/dist/components/BucketFill/BucketFill.js +65 -65
  61. package/dist/components/BucketFill/BucketFill.stories.d.ts +17 -17
  62. package/dist/components/BucketFill/BucketFill.stories.js +140 -140
  63. package/dist/components/BucketFill/index.d.ts +1 -1
  64. package/dist/components/BucketFill/index.js +8 -8
  65. package/dist/components/Button/Button.d.ts +14 -14
  66. package/dist/components/Button/Button.js +51 -51
  67. package/dist/components/Button/Button.stories.d.ts +9 -9
  68. package/dist/components/Button/Button.stories.js +57 -57
  69. package/dist/components/Button/Button.test.d.ts +1 -1
  70. package/dist/components/Button/Button.test.js +14 -14
  71. package/dist/components/Button/index.d.ts +1 -1
  72. package/dist/components/Button/index.js +8 -8
  73. package/dist/components/Card/Card.d.ts +7 -7
  74. package/dist/components/Card/Card.js +14 -14
  75. package/dist/components/Card/Card.stories.d.ts +15 -15
  76. package/dist/components/Card/Card.stories.js +15 -15
  77. package/dist/components/Card/index.d.ts +1 -1
  78. package/dist/components/Card/index.js +8 -8
  79. package/dist/components/CheckBox/CheckBox.d.ts +11 -11
  80. package/dist/components/CheckBox/CheckBox.js +31 -31
  81. package/dist/components/CheckBox/CheckBox.stories.d.ts +20 -20
  82. package/dist/components/CheckBox/CheckBox.stories.js +52 -52
  83. package/dist/components/CheckBox/index.d.ts +1 -1
  84. package/dist/components/CheckBox/index.js +8 -8
  85. package/dist/components/Collapsable/Collapsable.d.ts +31 -31
  86. package/dist/components/Collapsable/Collapsable.js +126 -126
  87. package/dist/components/Collapsable/Collapsable.stories.d.ts +39 -39
  88. package/dist/components/Collapsable/Collapsable.stories.js +27 -27
  89. package/dist/components/Collapsable/index.d.ts +1 -1
  90. package/dist/components/Collapsable/index.js +8 -8
  91. package/dist/components/Countdown/Countdown.d.ts +13 -13
  92. package/dist/components/Countdown/Countdown.js +79 -79
  93. package/dist/components/Countdown/Countdown.stories.d.ts +14 -14
  94. package/dist/components/Countdown/Countdown.stories.js +54 -54
  95. package/dist/components/Countdown/index.d.ts +1 -1
  96. package/dist/components/Countdown/index.js +8 -8
  97. package/dist/components/Divider/Divider.d.ts +6 -6
  98. package/dist/components/Divider/Divider.js +15 -15
  99. package/dist/components/Divider/Divider.stories.d.ts +7 -7
  100. package/dist/components/Divider/Divider.stories.js +14 -14
  101. package/dist/components/Divider/index.d.ts +1 -1
  102. package/dist/components/Divider/index.js +8 -8
  103. package/dist/components/EmailInput/EmailInput.d.ts +25 -25
  104. package/dist/components/EmailInput/EmailInput.js +51 -51
  105. package/dist/components/EmailInput/EmailInput.stories.d.ts +28 -28
  106. package/dist/components/EmailInput/EmailInput.stories.js +14 -14
  107. package/dist/components/EmailInput/EmailInput.test.d.ts +1 -1
  108. package/dist/components/EmailInput/EmailInput.test.js +76 -76
  109. package/dist/components/EmailInput/index.d.ts +1 -1
  110. package/dist/components/EmailInput/index.js +9 -9
  111. package/dist/components/FadeIn/FadeIn.d.ts +10 -10
  112. package/dist/components/FadeIn/FadeIn.js +63 -63
  113. package/dist/components/FadeIn/FadeIn.stories.d.ts +24 -24
  114. package/dist/components/FadeIn/FadeIn.stories.js +15 -15
  115. package/dist/components/FadeIn/FadeIn.test.d.ts +1 -1
  116. package/dist/components/FadeIn/FadeIn.test.js +21 -21
  117. package/dist/components/FadeIn/index.d.ts +1 -1
  118. package/dist/components/FadeIn/index.js +8 -8
  119. package/dist/components/FileInput/FileInput.d.ts +13 -13
  120. package/dist/components/FileInput/FileInput.js +74 -74
  121. package/dist/components/FileInput/FileInput.stories.d.ts +19 -19
  122. package/dist/components/FileInput/FileInput.stories.js +58 -58
  123. package/dist/components/FileInput/index.d.ts +1 -1
  124. package/dist/components/FileInput/index.js +8 -8
  125. package/dist/components/FlowController/FlowController.d.ts +23 -23
  126. package/dist/components/FlowController/FlowController.js +33 -33
  127. package/dist/components/FlowController/FlowController.stories.d.ts +43 -43
  128. package/dist/components/FlowController/FlowController.stories.js +100 -100
  129. package/dist/components/FlowController/FlowController.test.d.ts +1 -1
  130. package/dist/components/FlowController/FlowController.test.js +165 -165
  131. package/dist/components/FlowController/index.d.ts +1 -1
  132. package/dist/components/FlowController/index.js +8 -8
  133. package/dist/components/Form/Form.d.ts +48 -48
  134. package/dist/components/Form/Form.js +101 -101
  135. package/dist/components/Form/Form.stories.d.ts +13 -13
  136. package/dist/components/Form/Form.stories.js +35 -35
  137. package/dist/components/Form/index.d.ts +1 -1
  138. package/dist/components/Form/index.js +8 -8
  139. package/dist/components/Freeze/Freeze.d.ts +5 -5
  140. package/dist/components/Freeze/Freeze.js +12 -12
  141. package/dist/components/Freeze/Freeze.stories.d.ts +7 -7
  142. package/dist/components/Freeze/Freeze.stories.js +55 -55
  143. package/dist/components/Freeze/Freeze.test.d.ts +1 -1
  144. package/dist/components/Freeze/Freeze.test.js +14 -14
  145. package/dist/components/Freeze/index.d.ts +1 -1
  146. package/dist/components/Freeze/index.js +8 -8
  147. package/dist/components/HSForms/HSForms.d.ts +5 -5
  148. package/dist/components/HSForms/HSForms.js +46 -46
  149. package/dist/components/HSForms/index.d.ts +1 -1
  150. package/dist/components/HSForms/index.js +8 -8
  151. package/dist/components/Header/Header.d.ts +25 -25
  152. package/dist/components/Header/Header.js +74 -74
  153. package/dist/components/Header/Header.stories.d.ts +28 -28
  154. package/dist/components/Header/Header.stories.js +40 -40
  155. package/dist/components/Header/Header.test.d.ts +1 -1
  156. package/dist/components/Header/Header.test.js +99 -99
  157. package/dist/components/Header/index.d.ts +1 -1
  158. package/dist/components/Header/index.js +8 -8
  159. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.d.ts +8 -8
  160. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +16 -16
  161. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.d.ts +14 -14
  162. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.js +15 -15
  163. package/dist/components/HeaderCloseBtn/index.d.ts +1 -1
  164. package/dist/components/HeaderCloseBtn/index.js +8 -8
  165. package/dist/components/InfinityScroll/InfinityScroll.d.ts +11 -11
  166. package/dist/components/InfinityScroll/InfinityScroll.js +111 -111
  167. package/dist/components/InfinityScroll/InfinityScroll.stories.d.ts +23 -23
  168. package/dist/components/InfinityScroll/InfinityScroll.stories.js +53 -53
  169. package/dist/components/InfinityScroll/InfinityScroll.test.d.ts +1 -1
  170. package/dist/components/InfinityScroll/InfinityScroll.test.js +188 -188
  171. package/dist/components/InfinityScroll/index.d.ts +1 -1
  172. package/dist/components/InfinityScroll/index.js +8 -8
  173. package/dist/components/Input/Input.d.ts +34 -34
  174. package/dist/components/Input/Input.js +95 -95
  175. package/dist/components/Input/Input.stories.d.ts +24 -24
  176. package/dist/components/Input/Input.stories.js +20 -20
  177. package/dist/components/Input/Input.test.d.ts +1 -1
  178. package/dist/components/Input/Input.test.js +57 -57
  179. package/dist/components/Input/index.d.ts +1 -1
  180. package/dist/components/Input/index.js +8 -8
  181. package/dist/components/InstantCounter/InstantCounter.d.ts +13 -13
  182. package/dist/components/InstantCounter/InstantCounter.js +58 -58
  183. package/dist/components/InstantCounter/InstantCounter.stories.d.ts +41 -41
  184. package/dist/components/InstantCounter/InstantCounter.stories.js +60 -60
  185. package/dist/components/InstantCounter/InstantCounter.test.d.ts +1 -1
  186. package/dist/components/InstantCounter/InstantCounter.test.js +49 -49
  187. package/dist/components/InstantCounter/index.d.ts +1 -1
  188. package/dist/components/InstantCounter/index.js +8 -8
  189. package/dist/components/LinkToId/LinkToId.d.ts +10 -10
  190. package/dist/components/LinkToId/LinkToId.js +32 -32
  191. package/dist/components/LinkToId/LinkToId.stories.d.ts +7 -7
  192. package/dist/components/LinkToId/LinkToId.stories.js +14 -14
  193. package/dist/components/LinkToId/LinkToId.test.d.ts +1 -1
  194. package/dist/components/LinkToId/LinkToId.test.js +11 -11
  195. package/dist/components/LinkToId/index.d.ts +1 -1
  196. package/dist/components/LinkToId/index.js +9 -9
  197. package/dist/components/Loader/Loader.d.ts +6 -6
  198. package/dist/components/Loader/Loader.js +17 -17
  199. package/dist/components/Loader/Loader.stories.d.ts +12 -12
  200. package/dist/components/Loader/Loader.stories.js +15 -15
  201. package/dist/components/Loader/index.d.ts +1 -1
  202. package/dist/components/Loader/index.js +8 -8
  203. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.d.ts +6 -6
  204. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +41 -41
  205. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.stories.d.ts +7 -7
  206. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.stories.js +14 -14
  207. package/dist/components/LoaderDotsIndicator/index.d.ts +1 -1
  208. package/dist/components/LoaderDotsIndicator/index.js +8 -8
  209. package/dist/components/MainGrid/MainGrid.d.ts +10 -10
  210. package/dist/components/MainGrid/MainGrid.js +55 -55
  211. package/dist/components/MainGrid/MainGrid.stories.d.ts +14 -14
  212. package/dist/components/MainGrid/MainGrid.stories.js +69 -69
  213. package/dist/components/MainGrid/MainGrid.test.d.ts +1 -1
  214. package/dist/components/MainGrid/MainGrid.test.js +17 -17
  215. package/dist/components/MainGrid/index.d.ts +1 -1
  216. package/dist/components/MainGrid/index.js +8 -8
  217. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.d.ts +8 -8
  218. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +29 -29
  219. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.d.ts +21 -21
  220. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.js +73 -73
  221. package/dist/components/MutableHamburgerButton/index.d.ts +1 -1
  222. package/dist/components/MutableHamburgerButton/index.js +8 -8
  223. package/dist/components/Notification/Notification.d.ts +7 -7
  224. package/dist/components/Notification/Notification.js +15 -15
  225. package/dist/components/Notification/Notification.stories.d.ts +15 -15
  226. package/dist/components/Notification/Notification.stories.js +18 -18
  227. package/dist/components/Notification/index.d.ts +1 -1
  228. package/dist/components/Notification/index.js +8 -8
  229. package/dist/components/Parallax/Parallax.d.ts +15 -15
  230. package/dist/components/Parallax/Parallax.js +174 -174
  231. package/dist/components/Parallax/Parallax.stories.d.ts +32 -32
  232. package/dist/components/Parallax/Parallax.stories.js +22 -22
  233. package/dist/components/Parallax/Parallax.test.d.ts +1 -1
  234. package/dist/components/Parallax/Parallax.test.js +21 -21
  235. package/dist/components/Parallax/index.d.ts +1 -1
  236. package/dist/components/Parallax/index.js +8 -8
  237. package/dist/components/Parallax/math/helpers.d.ts +58 -58
  238. package/dist/components/Parallax/math/helpers.js +228 -228
  239. package/dist/components/PasswordInput/PasswordInput.d.ts +42 -42
  240. package/dist/components/PasswordInput/PasswordInput.js +105 -105
  241. package/dist/components/PasswordInput/PasswordInput.stories.d.ts +45 -45
  242. package/dist/components/PasswordInput/PasswordInput.stories.js +21 -21
  243. package/dist/components/PasswordInput/PasswordInput.test.d.ts +1 -1
  244. package/dist/components/PasswordInput/PasswordInput.test.js +156 -156
  245. package/dist/components/PasswordInput/index.d.ts +1 -1
  246. package/dist/components/PasswordInput/index.js +8 -8
  247. package/dist/components/PixelatedScan/PixelatedScan.d.ts +8 -8
  248. package/dist/components/PixelatedScan/PixelatedScan.js +104 -104
  249. package/dist/components/PixelatedScan/PixelatedScan.stories.d.ts +15 -15
  250. package/dist/components/PixelatedScan/PixelatedScan.stories.js +39 -39
  251. package/dist/components/PixelatedScan/index.d.ts +1 -1
  252. package/dist/components/PixelatedScan/index.js +8 -8
  253. package/dist/components/Portal/Portal.d.ts +11 -11
  254. package/dist/components/Portal/Portal.js +61 -61
  255. package/dist/components/Portal/Portal.stories.d.ts +7 -7
  256. package/dist/components/Portal/Portal.stories.js +14 -14
  257. package/dist/components/Portal/index.d.ts +1 -1
  258. package/dist/components/Portal/index.js +9 -9
  259. package/dist/components/ProgressTexts/ProgressTexts.d.ts +22 -22
  260. package/dist/components/ProgressTexts/ProgressTexts.js +37 -37
  261. package/dist/components/ProgressTexts/ProgressTexts.stories.d.ts +24 -24
  262. package/dist/components/ProgressTexts/ProgressTexts.stories.js +89 -89
  263. package/dist/components/ProgressTexts/ProgressTexts.test.d.ts +1 -1
  264. package/dist/components/ProgressTexts/ProgressTexts.test.js +51 -51
  265. package/dist/components/ProgressTexts/index.d.ts +1 -1
  266. package/dist/components/ProgressTexts/index.js +8 -8
  267. package/dist/components/SectionContainer/SectionContainer.d.ts +11 -11
  268. package/dist/components/SectionContainer/SectionContainer.js +45 -45
  269. package/dist/components/SectionContainer/SectionContainer.stories.d.ts +14 -14
  270. package/dist/components/SectionContainer/SectionContainer.stories.js +14 -14
  271. package/dist/components/SectionContainer/index.d.ts +1 -1
  272. package/dist/components/SectionContainer/index.js +8 -8
  273. package/dist/components/Select/Select.d.ts +22 -22
  274. package/dist/components/Select/Select.js +75 -75
  275. package/dist/components/Select/Select.stories.d.ts +56 -56
  276. package/dist/components/Select/Select.stories.js +33 -33
  277. package/dist/components/Select/Select.test.d.ts +1 -1
  278. package/dist/components/Select/Select.test.js +11 -11
  279. package/dist/components/Select/index.d.ts +1 -1
  280. package/dist/components/Select/index.js +8 -8
  281. package/dist/components/Spacing/Spacing.d.ts +6 -6
  282. package/dist/components/Spacing/Spacing.js +14 -14
  283. package/dist/components/Spacing/Spacing.stories.d.ts +7 -7
  284. package/dist/components/Spacing/Spacing.stories.js +34 -34
  285. package/dist/components/Spacing/index.d.ts +1 -1
  286. package/dist/components/Spacing/index.js +8 -8
  287. package/dist/components/Table/Table.d.ts +19 -19
  288. package/dist/components/Table/Table.js +87 -87
  289. package/dist/components/Table/Table.stories.d.ts +15 -15
  290. package/dist/components/Table/Table.stories.js +87 -87
  291. package/dist/components/Table/Table.test.d.ts +1 -1
  292. package/dist/components/Table/Table.test.js +34 -34
  293. package/dist/components/Table/index.d.ts +1 -1
  294. package/dist/components/Table/index.js +8 -8
  295. package/dist/components/Tabs/Tabs.d.ts +11 -11
  296. package/dist/components/Tabs/Tabs.js +48 -48
  297. package/dist/components/Tabs/Tabs.stories.d.ts +17 -17
  298. package/dist/components/Tabs/Tabs.stories.js +56 -56
  299. package/dist/components/Tabs/Tabs.test.d.ts +1 -1
  300. package/dist/components/Tabs/Tabs.test.js +38 -38
  301. package/dist/components/Tabs/index.d.ts +1 -1
  302. package/dist/components/Tabs/index.js +8 -8
  303. package/dist/components/Text/Text.d.ts +15 -15
  304. package/dist/components/Text/Text.js +53 -53
  305. package/dist/components/Text/Text.stories.d.ts +7 -7
  306. package/dist/components/Text/Text.stories.js +42 -42
  307. package/dist/components/Text/Text.test.d.ts +1 -1
  308. package/dist/components/Text/Text.test.js +11 -11
  309. package/dist/components/Text/index.d.ts +1 -1
  310. package/dist/components/Text/index.js +8 -8
  311. package/dist/components/Transition/Transition.d.ts +45 -45
  312. package/dist/components/Transition/Transition.js +242 -242
  313. package/dist/components/Transition/Transition.stories.d.ts +10 -10
  314. package/dist/components/Transition/Transition.stories.js +28 -28
  315. package/dist/components/Transition/Transition.test.d.ts +1 -1
  316. package/dist/components/Transition/Transition.test.js +54 -54
  317. package/dist/components/Transition/index.d.ts +1 -1
  318. package/dist/components/Transition/index.js +9 -9
  319. package/dist/components/UncontrolledTransition/UncontrolledTransition.d.ts +13 -13
  320. package/dist/components/UncontrolledTransition/UncontrolledTransition.js +88 -88
  321. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.d.ts +33 -33
  322. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.js +224 -224
  323. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.d.ts +1 -1
  324. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.js +134 -134
  325. package/dist/components/UncontrolledTransition/index.d.ts +1 -1
  326. package/dist/components/UncontrolledTransition/index.js +8 -8
  327. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.d.ts +52 -52
  328. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +120 -120
  329. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.d.ts +70 -70
  330. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.js +64 -64
  331. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.d.ts +1 -1
  332. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.js +136 -136
  333. package/dist/components/WalletConnectionWrapper/index.d.ts +1 -1
  334. package/dist/components/WalletConnectionWrapper/index.js +9 -9
  335. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.d.ts +7 -7
  336. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +74 -74
  337. package/dist/components/utilitary/ScrollAndFocusLock/index.d.ts +1 -1
  338. package/dist/components/utilitary/ScrollAndFocusLock/index.js +8 -8
  339. package/dist/context/CustomBrowserRouter.d.ts +5 -5
  340. package/dist/context/CustomBrowserRouter.js +53 -53
  341. package/dist/context/OneUIProvider.d.ts +69 -69
  342. package/dist/context/OneUIProvider.js +62 -62
  343. package/dist/context/OneUIProvider.test.d.ts +1 -1
  344. package/dist/context/OneUIProvider.test.js +44 -44
  345. package/dist/context/__mocks__/OneUIProvider.d.ts +67 -67
  346. package/dist/context/__mocks__/OneUIProvider.js +12 -12
  347. package/dist/hooks/shims/ObjectWatchShim.js +51 -51
  348. package/dist/hooks/useAsyncControl.d.ts +9 -9
  349. package/dist/hooks/useAsyncControl.js +39 -39
  350. package/dist/hooks/useCustomHistory.d.ts +14 -14
  351. package/dist/hooks/useCustomHistory.js +14 -14
  352. package/dist/hooks/useCustomHistory.js.map +1 -1
  353. package/dist/hooks/useFirestoreWatch.d.ts +12 -12
  354. package/dist/hooks/useFirestoreWatch.js +37 -37
  355. package/dist/hooks/useForm.d.ts +16 -16
  356. package/dist/hooks/useForm.js +23 -23
  357. package/dist/hooks/useIntersection.d.ts +4 -4
  358. package/dist/hooks/useIntersection.js +29 -29
  359. package/dist/hooks/useObserve.d.ts +2 -2
  360. package/dist/hooks/useObserve.js +17 -17
  361. package/dist/hooks/usePagination.d.ts +19 -19
  362. package/dist/hooks/usePagination.js +64 -64
  363. package/dist/hooks/usePooledOperation.d.ts +15 -15
  364. package/dist/hooks/usePooledOperation.js +63 -63
  365. package/dist/hooks/usePooling.d.ts +16 -16
  366. package/dist/hooks/usePooling.js +46 -46
  367. package/dist/hooks/usePooling.test.d.ts +1 -1
  368. package/dist/hooks/usePooling.test.js +103 -103
  369. package/dist/hooks/useRebound.d.ts +9 -9
  370. package/dist/hooks/useRebound.js +23 -23
  371. package/dist/hooks/useShortIntl.d.ts +15 -15
  372. package/dist/hooks/useShortIntl.js +37 -37
  373. package/dist/models/GenericContract.d.ts +74 -66
  374. package/dist/models/GenericContract.js +13 -13
  375. package/dist/models/GenericContract.js.map +1 -1
  376. package/dist/storybookUtils/index.d.ts +5 -5
  377. package/dist/storybookUtils/index.js +26 -26
  378. package/package.json +1 -1
  379. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.d.ts +0 -4
  380. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.js +0 -14
  381. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.js.map +0 -1
  382. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.module.scss +0 -0
  383. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.stories.d.ts +0 -10
  384. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.stories.js +0 -16
  385. package/dist/components/AsyncProcessQueue/AsyncProcessQueue.stories.js.map +0 -1
  386. package/dist/components/AsyncProcessQueue/index.d.ts +0 -1
  387. package/dist/components/AsyncProcessQueue/index.js +0 -9
  388. package/dist/components/AsyncProcessQueue/index.js.map +0 -1
  389. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.d.ts +0 -40
  390. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.js +0 -130
  391. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.js.map +0 -1
  392. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.d.ts +0 -59
  393. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.js +0 -62
  394. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.js.map +0 -1
  395. package/dist/components/WalletConnectionWrapper/v2/index.d.ts +0 -1
  396. package/dist/components/WalletConnectionWrapper/v2/index.js +0 -9
  397. package/dist/components/WalletConnectionWrapper/v2/index.js.map +0 -1
  398. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.d.ts +0 -6
  399. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.js +0 -52
  400. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.js.map +0 -1
  401. package/dist/context/AsyncProcessQueue.d.ts +0 -10
  402. package/dist/context/AsyncProcessQueue.js +0 -16
  403. package/dist/context/AsyncProcessQueue.js.map +0 -1
  404. package/dist/hooks/useImprovedHistory.d.ts +0 -0
  405. package/dist/hooks/useImprovedHistory.js +0 -2
  406. package/dist/hooks/useImprovedHistory.js.map +0 -1
  407. package/dist/hooks/useScrollLock.d.ts +0 -0
  408. package/dist/hooks/useScrollLock.js +0 -2
  409. package/dist/hooks/useScrollLock.js.map +0 -1
@@ -1,175 +1,175 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.givenTheRelativePositionHowMuchToRotate = exports.calculateDistanceRelativeToBounds = void 0;
41
- const react_1 = __importStar(require("react"));
42
- const Parallax_module_scss_1 = __importDefault(require("./Parallax.module.scss"));
43
- const lodash_1 = require("lodash");
44
- const helpers_1 = require("./math/helpers");
45
- const MAXIMUM_PARALLAX = {
46
- x: 20,
47
- y: 20,
48
- };
49
- function calculateDistanceRelativeToBounds(mousePosition, elementInitialPosition, elementSizeDimension) {
50
- const normalizeInitialPosition = mousePosition - elementInitialPosition;
51
- const doNotAllowGoingBeyondLowerLimit = Math.max(normalizeInitialPosition, 0);
52
- const doNotAllowHoingBeyondHigherLimit = Math.min(doNotAllowGoingBeyondLowerLimit, elementSizeDimension);
53
- const threeRule = (doNotAllowHoingBeyondHigherLimit * 100) / elementSizeDimension;
54
- const result = Math.round(threeRule) / 100;
55
- return result;
56
- }
57
- exports.calculateDistanceRelativeToBounds = calculateDistanceRelativeToBounds;
58
- function givenTheRelativePositionHowMuchToRotate(relativePosition, maxRotation) {
59
- return relativePosition * maxRotation - maxRotation / 2;
60
- }
61
- exports.givenTheRelativePositionHowMuchToRotate = givenTheRelativePositionHowMuchToRotate;
62
- /**
63
- * It holds a children and animates it according to mouse position
64
- **/
65
- function Parallax(_a, ref) {
66
- var { children, className = "", active, onClick, reflection, maxParallax = MAXIMUM_PARALLAX } = _a, props = __rest(_a, ["children", "className", "active", "onClick", "reflection", "maxParallax"]);
67
- const parallaxableRef = (0, react_1.useRef)(null);
68
- const reflectionRef = (0, react_1.useRef)(null);
69
- const multiplierRef = (0, react_1.useRef)(1);
70
- const initialPositionRef = (0, react_1.useRef)();
71
- (0, react_1.useEffect)(() => {
72
- if (ref)
73
- ref.current =
74
- parallaxableRef.current;
75
- const el = parallaxableRef.current;
76
- if (active && !initialPositionRef.current) {
77
- initialPositionRef.current = getComputedStyle(el).transform;
78
- if (initialPositionRef.current === "none")
79
- initialPositionRef.current = "";
80
- el.style.transform = `${initialPositionRef.current} rotateX(0deg) rotateY(0deg) translateZ(0px)`;
81
- }
82
- // eslint-disable-next-line
83
- }, [active]);
84
- (0, react_1.useEffect)(() => {
85
- const el = parallaxableRef.current;
86
- if (active) {
87
- const updatePositions = (relativeToX, relativeToY) => {
88
- const rect = el.getBoundingClientRect();
89
- const { width: [x0, xW], height: [y0, yH], } = {
90
- width: [rect.left, el.clientWidth],
91
- height: [rect.top, el.clientHeight],
92
- };
93
- const distanceOffRight = calculateDistanceRelativeToBounds(relativeToX, x0, xW);
94
- const distanceOffBottom = calculateDistanceRelativeToBounds(relativeToY, y0, yH);
95
- const howMuchToRotateY = givenTheRelativePositionHowMuchToRotate(distanceOffRight, maxParallax.y) * multiplierRef.current;
96
- const howMuchToRotateX = givenTheRelativePositionHowMuchToRotate(distanceOffBottom, maxParallax.x) * multiplierRef.current;
97
- const howMuchToOpacify = Math.abs(Math.abs(distanceOffBottom - 0.5) / 0.5);
98
- const howMuchToOpacifyHorizontal = Math.max(Math.abs(Math.abs(distanceOffRight - 0.5) / 0.5), Math.abs(Math.abs(distanceOffBottom - 0.5) / 0.5));
99
- el.style.transform = `${initialPositionRef.current} rotateY(${howMuchToRotateY}deg) rotateX(${-howMuchToRotateX}deg) translateZ(${multiplierRef.current === 1 ? 0 : -30}px)`;
100
- if (reflectionRef.current) {
101
- reflectionRef.current.style.left = `${(1 - distanceOffRight) * 100}%`;
102
- reflectionRef.current.style.top = `${(1 - distanceOffBottom) * 100}%`;
103
- reflectionRef.current.style.opacity = `${Math.min(howMuchToOpacify, howMuchToOpacifyHorizontal)}`;
104
- }
105
- };
106
- const handler = (0, lodash_1.throttle)(({ x, y }) => {
107
- updatePositions(x, y);
108
- }, 1000 / 30);
109
- const touchHandler = (0, lodash_1.throttle)(({ touches }) => {
110
- const { pageX, pageY } = touches[0];
111
- updatePositions(pageX, pageY);
112
- }, 1000 / 30);
113
- const mouseDownHandler = () => {
114
- multiplierRef.current = 1.5;
115
- };
116
- const mouseUpHandler = () => {
117
- multiplierRef.current = 1;
118
- };
119
- window.addEventListener("mousemove", handler);
120
- window.addEventListener("touchmove", touchHandler);
121
- let _inverseMatrix;
122
- const _limits = {
123
- beta: undefined,
124
- gamma: undefined,
125
- };
126
- const orientationListener = ({ beta, gamma, }) => {
127
- beta = beta * 0.5;
128
- gamma = gamma * 0.5;
129
- if (!_inverseMatrix) {
130
- window.removeEventListener("mousemove", handler);
131
- window.removeEventListener("touchmove", touchHandler);
132
- const offset = 12.5;
133
- _limits.beta = [beta - offset, beta + offset];
134
- _limits.gamma = [gamma - offset, gamma + offset];
135
- }
136
- const _beta = Math.min(_limits.beta[1], Math.max(_limits.beta[0], beta));
137
- const _gamma = Math.min(_limits.gamma[1], Math.max(_limits.gamma[0], gamma));
138
- if (!_inverseMatrix) {
139
- _inverseMatrix = (0, helpers_1.flattenMatrix)((0, helpers_1.invertMatrix)((0, helpers_1.generateMatrixFromOperations)({
140
- type: "rotateY",
141
- angle: _gamma,
142
- }, {
143
- type: "rotateX",
144
- angle: -_beta,
145
- })));
146
- }
147
- el.style.transform = `matrix3d(${_inverseMatrix.join(",")}) rotateX(${-_beta}deg) rotateY(${_gamma}deg)`;
148
- };
149
- window.addEventListener("deviceorientation", orientationListener);
150
- window.addEventListener("touchend", () => {
151
- _inverseMatrix = undefined;
152
- });
153
- el.addEventListener("touchstart", mouseDownHandler);
154
- el.addEventListener("touchend", mouseUpHandler);
155
- el.addEventListener("mousedown", mouseDownHandler);
156
- el.addEventListener("mouseup", mouseUpHandler);
157
- return () => {
158
- window.removeEventListener("deviceorientation", orientationListener);
159
- window.removeEventListener("mousemove", handler);
160
- window.removeEventListener("touchmove", touchHandler);
161
- el.removeEventListener("mousedown", mouseDownHandler);
162
- el.removeEventListener("mouseup", mouseUpHandler);
163
- el.removeEventListener("touchstart", mouseDownHandler);
164
- el.removeEventListener("touchend", mouseUpHandler);
165
- // el.style.transform = initialPositionRef.current!;
166
- el.style.transform = `rotateX(0deg) rotateY(0deg) translateZ(0px)`;
167
- };
168
- }
169
- }, [active]);
170
- return (react_1.default.createElement("div", Object.assign({ onClick: onClick, ref: parallaxableRef, className: `${Parallax_module_scss_1.default.parallax} ${className}` }, props),
171
- children,
172
- reflection && react_1.default.createElement("div", { ref: reflectionRef, className: Parallax_module_scss_1.default.reflection })));
173
- }
174
- exports.default = (0, react_1.forwardRef)(Parallax);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.givenTheRelativePositionHowMuchToRotate = exports.calculateDistanceRelativeToBounds = void 0;
41
+ const react_1 = __importStar(require("react"));
42
+ const Parallax_module_scss_1 = __importDefault(require("./Parallax.module.scss"));
43
+ const lodash_1 = require("lodash");
44
+ const helpers_1 = require("./math/helpers");
45
+ const MAXIMUM_PARALLAX = {
46
+ x: 20,
47
+ y: 20,
48
+ };
49
+ function calculateDistanceRelativeToBounds(mousePosition, elementInitialPosition, elementSizeDimension) {
50
+ const normalizeInitialPosition = mousePosition - elementInitialPosition;
51
+ const doNotAllowGoingBeyondLowerLimit = Math.max(normalizeInitialPosition, 0);
52
+ const doNotAllowHoingBeyondHigherLimit = Math.min(doNotAllowGoingBeyondLowerLimit, elementSizeDimension);
53
+ const threeRule = (doNotAllowHoingBeyondHigherLimit * 100) / elementSizeDimension;
54
+ const result = Math.round(threeRule) / 100;
55
+ return result;
56
+ }
57
+ exports.calculateDistanceRelativeToBounds = calculateDistanceRelativeToBounds;
58
+ function givenTheRelativePositionHowMuchToRotate(relativePosition, maxRotation) {
59
+ return relativePosition * maxRotation - maxRotation / 2;
60
+ }
61
+ exports.givenTheRelativePositionHowMuchToRotate = givenTheRelativePositionHowMuchToRotate;
62
+ /**
63
+ * It holds a children and animates it according to mouse position
64
+ **/
65
+ function Parallax(_a, ref) {
66
+ var { children, className = "", active, onClick, reflection, maxParallax = MAXIMUM_PARALLAX } = _a, props = __rest(_a, ["children", "className", "active", "onClick", "reflection", "maxParallax"]);
67
+ const parallaxableRef = (0, react_1.useRef)(null);
68
+ const reflectionRef = (0, react_1.useRef)(null);
69
+ const multiplierRef = (0, react_1.useRef)(1);
70
+ const initialPositionRef = (0, react_1.useRef)();
71
+ (0, react_1.useEffect)(() => {
72
+ if (ref)
73
+ ref.current =
74
+ parallaxableRef.current;
75
+ const el = parallaxableRef.current;
76
+ if (active && !initialPositionRef.current) {
77
+ initialPositionRef.current = getComputedStyle(el).transform;
78
+ if (initialPositionRef.current === "none")
79
+ initialPositionRef.current = "";
80
+ el.style.transform = `${initialPositionRef.current} rotateX(0deg) rotateY(0deg) translateZ(0px)`;
81
+ }
82
+ // eslint-disable-next-line
83
+ }, [active]);
84
+ (0, react_1.useEffect)(() => {
85
+ const el = parallaxableRef.current;
86
+ if (active) {
87
+ const updatePositions = (relativeToX, relativeToY) => {
88
+ const rect = el.getBoundingClientRect();
89
+ const { width: [x0, xW], height: [y0, yH], } = {
90
+ width: [rect.left, el.clientWidth],
91
+ height: [rect.top, el.clientHeight],
92
+ };
93
+ const distanceOffRight = calculateDistanceRelativeToBounds(relativeToX, x0, xW);
94
+ const distanceOffBottom = calculateDistanceRelativeToBounds(relativeToY, y0, yH);
95
+ const howMuchToRotateY = givenTheRelativePositionHowMuchToRotate(distanceOffRight, maxParallax.y) * multiplierRef.current;
96
+ const howMuchToRotateX = givenTheRelativePositionHowMuchToRotate(distanceOffBottom, maxParallax.x) * multiplierRef.current;
97
+ const howMuchToOpacify = Math.abs(Math.abs(distanceOffBottom - 0.5) / 0.5);
98
+ const howMuchToOpacifyHorizontal = Math.max(Math.abs(Math.abs(distanceOffRight - 0.5) / 0.5), Math.abs(Math.abs(distanceOffBottom - 0.5) / 0.5));
99
+ el.style.transform = `${initialPositionRef.current} rotateY(${howMuchToRotateY}deg) rotateX(${-howMuchToRotateX}deg) translateZ(${multiplierRef.current === 1 ? 0 : -30}px)`;
100
+ if (reflectionRef.current) {
101
+ reflectionRef.current.style.left = `${(1 - distanceOffRight) * 100}%`;
102
+ reflectionRef.current.style.top = `${(1 - distanceOffBottom) * 100}%`;
103
+ reflectionRef.current.style.opacity = `${Math.min(howMuchToOpacify, howMuchToOpacifyHorizontal)}`;
104
+ }
105
+ };
106
+ const handler = (0, lodash_1.throttle)(({ x, y }) => {
107
+ updatePositions(x, y);
108
+ }, 1000 / 30);
109
+ const touchHandler = (0, lodash_1.throttle)(({ touches }) => {
110
+ const { pageX, pageY } = touches[0];
111
+ updatePositions(pageX, pageY);
112
+ }, 1000 / 30);
113
+ const mouseDownHandler = () => {
114
+ multiplierRef.current = 1.5;
115
+ };
116
+ const mouseUpHandler = () => {
117
+ multiplierRef.current = 1;
118
+ };
119
+ window.addEventListener("mousemove", handler);
120
+ window.addEventListener("touchmove", touchHandler);
121
+ let _inverseMatrix;
122
+ const _limits = {
123
+ beta: undefined,
124
+ gamma: undefined,
125
+ };
126
+ const orientationListener = ({ beta, gamma, }) => {
127
+ beta = beta * 0.5;
128
+ gamma = gamma * 0.5;
129
+ if (!_inverseMatrix) {
130
+ window.removeEventListener("mousemove", handler);
131
+ window.removeEventListener("touchmove", touchHandler);
132
+ const offset = 12.5;
133
+ _limits.beta = [beta - offset, beta + offset];
134
+ _limits.gamma = [gamma - offset, gamma + offset];
135
+ }
136
+ const _beta = Math.min(_limits.beta[1], Math.max(_limits.beta[0], beta));
137
+ const _gamma = Math.min(_limits.gamma[1], Math.max(_limits.gamma[0], gamma));
138
+ if (!_inverseMatrix) {
139
+ _inverseMatrix = (0, helpers_1.flattenMatrix)((0, helpers_1.invertMatrix)((0, helpers_1.generateMatrixFromOperations)({
140
+ type: "rotateY",
141
+ angle: _gamma,
142
+ }, {
143
+ type: "rotateX",
144
+ angle: -_beta,
145
+ })));
146
+ }
147
+ el.style.transform = `matrix3d(${_inverseMatrix.join(",")}) rotateX(${-_beta}deg) rotateY(${_gamma}deg)`;
148
+ };
149
+ window.addEventListener("deviceorientation", orientationListener);
150
+ window.addEventListener("touchend", () => {
151
+ _inverseMatrix = undefined;
152
+ });
153
+ el.addEventListener("touchstart", mouseDownHandler);
154
+ el.addEventListener("touchend", mouseUpHandler);
155
+ el.addEventListener("mousedown", mouseDownHandler);
156
+ el.addEventListener("mouseup", mouseUpHandler);
157
+ return () => {
158
+ window.removeEventListener("deviceorientation", orientationListener);
159
+ window.removeEventListener("mousemove", handler);
160
+ window.removeEventListener("touchmove", touchHandler);
161
+ el.removeEventListener("mousedown", mouseDownHandler);
162
+ el.removeEventListener("mouseup", mouseUpHandler);
163
+ el.removeEventListener("touchstart", mouseDownHandler);
164
+ el.removeEventListener("touchend", mouseUpHandler);
165
+ // el.style.transform = initialPositionRef.current!;
166
+ el.style.transform = `rotateX(0deg) rotateY(0deg) translateZ(0px)`;
167
+ };
168
+ }
169
+ }, [active]);
170
+ return (react_1.default.createElement("div", Object.assign({ onClick: onClick, ref: parallaxableRef, className: `${Parallax_module_scss_1.default.parallax} ${className}` }, props),
171
+ children,
172
+ reflection && react_1.default.createElement("div", { ref: reflectionRef, className: Parallax_module_scss_1.default.reflection })));
173
+ }
174
+ exports.default = (0, react_1.forwardRef)(Parallax);
175
175
  //# sourceMappingURL=Parallax.js.map
@@ -1,32 +1,32 @@
1
- import React from "react";
2
- declare const _default: {
3
- title: string;
4
- component: React.ForwardRefExoticComponent<Pick<{
5
- className?: string | undefined;
6
- active: boolean;
7
- onClick?: ((e: any) => void) | undefined;
8
- reflection?: boolean | undefined;
9
- maxParallax?: {
10
- x: number;
11
- y: number;
12
- } | undefined;
13
- } & {
14
- children?: React.ReactNode;
15
- } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "key" | "active" | keyof React.HTMLAttributes<HTMLDivElement> | "reflection" | "maxParallax"> & React.RefAttributes<HTMLDivElement>>;
16
- };
17
- export default _default;
18
- export declare const InitialImplementation: {
19
- (args: any): JSX.Element;
20
- args: Partial<Pick<{
21
- className?: string | undefined;
22
- active: boolean;
23
- onClick?: ((e: any) => void) | undefined;
24
- reflection?: boolean | undefined;
25
- maxParallax?: {
26
- x: number;
27
- y: number;
28
- } | undefined;
29
- } & {
30
- children?: React.ReactNode;
31
- } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "key" | "active" | keyof React.HTMLAttributes<HTMLDivElement> | "reflection" | "maxParallax"> & React.RefAttributes<HTMLDivElement>>;
32
- };
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.ForwardRefExoticComponent<Pick<{
5
+ className?: string | undefined;
6
+ active: boolean;
7
+ onClick?: ((e: any) => void) | undefined;
8
+ reflection?: boolean | undefined;
9
+ maxParallax?: {
10
+ x: number;
11
+ y: number;
12
+ } | undefined;
13
+ } & {
14
+ children?: React.ReactNode;
15
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "key" | "active" | keyof React.HTMLAttributes<HTMLDivElement> | "reflection" | "maxParallax"> & React.RefAttributes<HTMLDivElement>>;
16
+ };
17
+ export default _default;
18
+ export declare const InitialImplementation: {
19
+ (args: any): JSX.Element;
20
+ args: Partial<Pick<{
21
+ className?: string | undefined;
22
+ active: boolean;
23
+ onClick?: ((e: any) => void) | undefined;
24
+ reflection?: boolean | undefined;
25
+ maxParallax?: {
26
+ x: number;
27
+ y: number;
28
+ } | undefined;
29
+ } & {
30
+ children?: React.ReactNode;
31
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "key" | "active" | keyof React.HTMLAttributes<HTMLDivElement> | "reflection" | "maxParallax"> & React.RefAttributes<HTMLDivElement>>;
32
+ };
@@ -1,23 +1,23 @@
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.InitialImplementation = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const Parallax_1 = __importDefault(require("./Parallax"));
9
- exports.default = {
10
- title: "Parallax",
11
- component: Parallax_1.default,
12
- };
13
- const InitialImplementation = (args) => {
14
- return (react_1.default.createElement(Parallax_1.default, Object.assign({}, args),
15
- react_1.default.createElement("div", null,
16
- react_1.default.createElement("h1", null, "This is a parallax component"),
17
- react_1.default.createElement("p", null, "It should emulate movement when moving the screen on mobile or hovering the mouse on desktop"))));
18
- };
19
- exports.InitialImplementation = InitialImplementation;
20
- exports.InitialImplementation.args = {
21
- active: true,
22
- };
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.InitialImplementation = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Parallax_1 = __importDefault(require("./Parallax"));
9
+ exports.default = {
10
+ title: "Parallax",
11
+ component: Parallax_1.default,
12
+ };
13
+ const InitialImplementation = (args) => {
14
+ return (react_1.default.createElement(Parallax_1.default, Object.assign({}, args),
15
+ react_1.default.createElement("div", null,
16
+ react_1.default.createElement("h1", null, "This is a parallax component"),
17
+ react_1.default.createElement("p", null, "It should emulate movement when moving the screen on mobile or hovering the mouse on desktop"))));
18
+ };
19
+ exports.InitialImplementation = InitialImplementation;
20
+ exports.InitialImplementation.args = {
21
+ active: true,
22
+ };
23
23
  //# sourceMappingURL=Parallax.stories.js.map
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Parallax_1 = require("./Parallax");
4
- const ELEMENT_POSITION_SIZE = [130, 500];
5
- it.each([
6
- [0, ...ELEMENT_POSITION_SIZE, 0],
7
- [130, ...ELEMENT_POSITION_SIZE, 0],
8
- [380, ...ELEMENT_POSITION_SIZE, 0.5],
9
- [630, ...ELEMENT_POSITION_SIZE, 1],
10
- [750, ...ELEMENT_POSITION_SIZE, 1],
11
- ])("Should calculate relative mouse position correctly", (mousePosition, elementPosition, elementSize, expectedResult) => {
12
- expect((0, Parallax_1.calculateDistanceRelativeToBounds)(mousePosition, elementPosition, elementSize)).toEqual(expectedResult);
13
- });
14
- const MAX_ROTATION = 50;
15
- it.each([
16
- [0, MAX_ROTATION, -25],
17
- [0.5, MAX_ROTATION, 0],
18
- [1, MAX_ROTATION, 25],
19
- ])("Should calculate rotation correctly", (relativePosition, maxRotation, expectedRotation) => {
20
- expect((0, Parallax_1.givenTheRelativePositionHowMuchToRotate)(relativePosition, maxRotation)).toEqual(expectedRotation);
21
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Parallax_1 = require("./Parallax");
4
+ const ELEMENT_POSITION_SIZE = [130, 500];
5
+ it.each([
6
+ [0, ...ELEMENT_POSITION_SIZE, 0],
7
+ [130, ...ELEMENT_POSITION_SIZE, 0],
8
+ [380, ...ELEMENT_POSITION_SIZE, 0.5],
9
+ [630, ...ELEMENT_POSITION_SIZE, 1],
10
+ [750, ...ELEMENT_POSITION_SIZE, 1],
11
+ ])("Should calculate relative mouse position correctly", (mousePosition, elementPosition, elementSize, expectedResult) => {
12
+ expect((0, Parallax_1.calculateDistanceRelativeToBounds)(mousePosition, elementPosition, elementSize)).toEqual(expectedResult);
13
+ });
14
+ const MAX_ROTATION = 50;
15
+ it.each([
16
+ [0, MAX_ROTATION, -25],
17
+ [0.5, MAX_ROTATION, 0],
18
+ [1, MAX_ROTATION, 25],
19
+ ])("Should calculate rotation correctly", (relativePosition, maxRotation, expectedRotation) => {
20
+ expect((0, Parallax_1.givenTheRelativePositionHowMuchToRotate)(relativePosition, maxRotation)).toEqual(expectedRotation);
21
+ });
22
22
  //# sourceMappingURL=Parallax.test.js.map
@@ -1 +1 @@
1
- export { default } from './Parallax';
1
+ export { default } from './Parallax';
@@ -1,9 +1,9 @@
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.default = void 0;
7
- var Parallax_1 = require("./Parallax");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Parallax_1).default; } });
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.default = void 0;
7
+ var Parallax_1 = require("./Parallax");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Parallax_1).default; } });
9
9
  //# sourceMappingURL=index.js.map