@onepercentio/one-ui 0.2.0 → 0.2.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 (351) hide show
  1. package/dist/__test__/analytics.d.ts +3 -3
  2. package/dist/__test__/analytics.js +18 -18
  3. package/dist/__test__/firestore.d.ts +2 -2
  4. package/dist/__test__/firestore.js +25 -25
  5. package/dist/__test__/utils.d.ts +17 -17
  6. package/dist/__test__/utils.js +187 -187
  7. package/dist/components/AdaptiveButton/AdaptiveButton.d.ts +8 -8
  8. package/dist/components/AdaptiveButton/AdaptiveButton.js +84 -84
  9. package/dist/components/AdaptiveButton/AdaptiveButton.stories.d.ts +18 -18
  10. package/dist/components/AdaptiveButton/AdaptiveButton.stories.js +81 -81
  11. package/dist/components/AdaptiveButton/index.d.ts +1 -1
  12. package/dist/components/AdaptiveButton/index.js +8 -8
  13. package/dist/components/AdaptiveDialog/AdaptiveDialog.d.ts +9 -9
  14. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +59 -59
  15. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.d.ts +19 -19
  16. package/dist/components/AdaptiveDialog/AdaptiveDialog.stories.js +93 -93
  17. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.d.ts +1 -1
  18. package/dist/components/AdaptiveDialog/AdaptiveDialog.test.js +14 -14
  19. package/dist/components/AdaptiveDialog/index.d.ts +1 -1
  20. package/dist/components/AdaptiveDialog/index.js +8 -8
  21. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.d.ts +10 -10
  22. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +69 -69
  23. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.d.ts +18 -18
  24. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.stories.js +20 -20
  25. package/dist/components/AdaptiveSidebar/index.d.ts +1 -1
  26. package/dist/components/AdaptiveSidebar/index.js +8 -8
  27. package/dist/components/AnchoredTooltip/AnchoredTooltip.d.ts +13 -13
  28. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +173 -173
  29. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.d.ts +16 -16
  30. package/dist/components/AnchoredTooltip/AnchoredTooltip.stories.js +85 -85
  31. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.d.ts +1 -1
  32. package/dist/components/AnchoredTooltip/AnchoredTooltip.test.js +19 -19
  33. package/dist/components/AnchoredTooltip/index.d.ts +1 -1
  34. package/dist/components/AnchoredTooltip/index.js +8 -8
  35. package/dist/components/AsyncWrapper/AsyncWrapper.d.ts +10 -10
  36. package/dist/components/AsyncWrapper/AsyncWrapper.js +24 -24
  37. package/dist/components/AsyncWrapper/AsyncWrapper.stories.d.ts +18 -18
  38. package/dist/components/AsyncWrapper/AsyncWrapper.stories.js +33 -33
  39. package/dist/components/AsyncWrapper/AsyncWrapper.test.d.ts +1 -1
  40. package/dist/components/AsyncWrapper/AsyncWrapper.test.js +18 -18
  41. package/dist/components/AsyncWrapper/index.d.ts +1 -1
  42. package/dist/components/AsyncWrapper/index.js +8 -8
  43. package/dist/components/Avatar/Avatar.d.ts +8 -8
  44. package/dist/components/Avatar/Avatar.js +44 -44
  45. package/dist/components/Avatar/Avatar.stories.d.ts +14 -14
  46. package/dist/components/Avatar/Avatar.stories.js +18 -18
  47. package/dist/components/Avatar/Avatar.test.d.ts +1 -1
  48. package/dist/components/Avatar/Avatar.test.js +35 -35
  49. package/dist/components/Avatar/index.d.ts +1 -1
  50. package/dist/components/Avatar/index.js +8 -8
  51. package/dist/components/Button/Button.d.ts +7 -7
  52. package/dist/components/Button/Button.js +49 -49
  53. package/dist/components/Button/Button.stories.d.ts +13 -13
  54. package/dist/components/Button/Button.stories.js +33 -33
  55. package/dist/components/Button/Button.test.d.ts +1 -1
  56. package/dist/components/Button/Button.test.js +14 -14
  57. package/dist/components/Button/index.d.ts +1 -1
  58. package/dist/components/Button/index.js +8 -8
  59. package/dist/components/Card/Card.d.ts +7 -7
  60. package/dist/components/Card/Card.js +14 -14
  61. package/dist/components/Card/Card.stories.d.ts +15 -15
  62. package/dist/components/Card/Card.stories.js +15 -15
  63. package/dist/components/Card/index.d.ts +1 -1
  64. package/dist/components/Card/index.js +8 -8
  65. package/dist/components/CheckBox/CheckBox.d.ts +11 -11
  66. package/dist/components/CheckBox/CheckBox.js +31 -31
  67. package/dist/components/CheckBox/CheckBox.stories.d.ts +20 -20
  68. package/dist/components/CheckBox/CheckBox.stories.js +29 -29
  69. package/dist/components/CheckBox/index.d.ts +1 -1
  70. package/dist/components/CheckBox/index.js +8 -8
  71. package/dist/components/Collapsable/Collapsable.d.ts +33 -33
  72. package/dist/components/Collapsable/Collapsable.js +128 -128
  73. package/dist/components/Collapsable/Collapsable.stories.d.ts +39 -39
  74. package/dist/components/Collapsable/Collapsable.stories.js +27 -27
  75. package/dist/components/Collapsable/index.d.ts +1 -1
  76. package/dist/components/Collapsable/index.js +8 -8
  77. package/dist/components/Countdown/Countdown.d.ts +13 -13
  78. package/dist/components/Countdown/Countdown.js +79 -79
  79. package/dist/components/Countdown/Countdown.stories.d.ts +14 -14
  80. package/dist/components/Countdown/Countdown.stories.js +31 -31
  81. package/dist/components/Countdown/index.d.ts +1 -1
  82. package/dist/components/Countdown/index.js +8 -8
  83. package/dist/components/Divider/Divider.d.ts +6 -6
  84. package/dist/components/Divider/Divider.js +15 -15
  85. package/dist/components/Divider/Divider.stories.d.ts +7 -7
  86. package/dist/components/Divider/Divider.stories.js +14 -14
  87. package/dist/components/Divider/index.d.ts +1 -1
  88. package/dist/components/Divider/index.js +8 -8
  89. package/dist/components/EmailInput/EmailInput.d.ts +23 -23
  90. package/dist/components/EmailInput/EmailInput.js +51 -51
  91. package/dist/components/EmailInput/EmailInput.stories.d.ts +26 -26
  92. package/dist/components/EmailInput/EmailInput.stories.js +14 -14
  93. package/dist/components/EmailInput/EmailInput.test.d.ts +1 -1
  94. package/dist/components/EmailInput/EmailInput.test.js +76 -76
  95. package/dist/components/EmailInput/index.d.ts +1 -1
  96. package/dist/components/EmailInput/index.js +9 -9
  97. package/dist/components/FadeIn/FadeIn.d.ts +10 -10
  98. package/dist/components/FadeIn/FadeIn.js +63 -63
  99. package/dist/components/FadeIn/FadeIn.stories.d.ts +24 -24
  100. package/dist/components/FadeIn/FadeIn.stories.js +15 -15
  101. package/dist/components/FadeIn/FadeIn.test.d.ts +1 -1
  102. package/dist/components/FadeIn/FadeIn.test.js +21 -21
  103. package/dist/components/FadeIn/index.d.ts +1 -1
  104. package/dist/components/FadeIn/index.js +8 -8
  105. package/dist/components/FileInput/FileInput.d.ts +13 -13
  106. package/dist/components/FileInput/FileInput.js +74 -74
  107. package/dist/components/FileInput/FileInput.stories.d.ts +19 -19
  108. package/dist/components/FileInput/FileInput.stories.js +58 -58
  109. package/dist/components/FileInput/index.d.ts +1 -1
  110. package/dist/components/FileInput/index.js +8 -8
  111. package/dist/components/FlowController/FlowController.d.ts +23 -23
  112. package/dist/components/FlowController/FlowController.js +33 -33
  113. package/dist/components/FlowController/FlowController.stories.d.ts +43 -43
  114. package/dist/components/FlowController/FlowController.stories.js +100 -100
  115. package/dist/components/FlowController/FlowController.test.d.ts +1 -1
  116. package/dist/components/FlowController/FlowController.test.js +165 -165
  117. package/dist/components/FlowController/index.d.ts +1 -1
  118. package/dist/components/FlowController/index.js +8 -8
  119. package/dist/components/Form/Form.d.ts +40 -40
  120. package/dist/components/Form/Form.js +91 -91
  121. package/dist/components/Form/index.d.ts +1 -1
  122. package/dist/components/Form/index.js +8 -8
  123. package/dist/components/Freeze/Freeze.d.ts +5 -5
  124. package/dist/components/Freeze/Freeze.js +12 -12
  125. package/dist/components/Freeze/Freeze.stories.d.ts +7 -7
  126. package/dist/components/Freeze/Freeze.stories.js +55 -55
  127. package/dist/components/Freeze/Freeze.test.d.ts +1 -1
  128. package/dist/components/Freeze/Freeze.test.js +14 -14
  129. package/dist/components/Freeze/index.d.ts +1 -1
  130. package/dist/components/Freeze/index.js +8 -8
  131. package/dist/components/HSForms/HSForms.d.ts +5 -5
  132. package/dist/components/HSForms/HSForms.js +46 -46
  133. package/dist/components/HSForms/index.d.ts +1 -1
  134. package/dist/components/HSForms/index.js +8 -8
  135. package/dist/components/Header/Header.d.ts +25 -25
  136. package/dist/components/Header/Header.js +74 -74
  137. package/dist/components/Header/Header.stories.d.ts +28 -28
  138. package/dist/components/Header/Header.stories.js +40 -40
  139. package/dist/components/Header/Header.test.d.ts +1 -1
  140. package/dist/components/Header/Header.test.js +99 -99
  141. package/dist/components/Header/index.d.ts +1 -1
  142. package/dist/components/Header/index.js +8 -8
  143. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.d.ts +8 -8
  144. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +16 -16
  145. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.d.ts +14 -14
  146. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.stories.js +15 -15
  147. package/dist/components/HeaderCloseBtn/index.d.ts +1 -1
  148. package/dist/components/HeaderCloseBtn/index.js +8 -8
  149. package/dist/components/InfinityScroll/InfinityScroll.d.ts +11 -11
  150. package/dist/components/InfinityScroll/InfinityScroll.js +111 -111
  151. package/dist/components/InfinityScroll/InfinityScroll.stories.d.ts +23 -23
  152. package/dist/components/InfinityScroll/InfinityScroll.stories.js +53 -53
  153. package/dist/components/InfinityScroll/InfinityScroll.test.d.ts +1 -1
  154. package/dist/components/InfinityScroll/InfinityScroll.test.js +188 -188
  155. package/dist/components/InfinityScroll/index.d.ts +1 -1
  156. package/dist/components/InfinityScroll/index.js +8 -8
  157. package/dist/components/Input/Input.d.ts +30 -30
  158. package/dist/components/Input/Input.js +93 -93
  159. package/dist/components/Input/Input.stories.d.ts +22 -22
  160. package/dist/components/Input/Input.stories.js +20 -20
  161. package/dist/components/Input/Input.test.d.ts +1 -1
  162. package/dist/components/Input/Input.test.js +57 -57
  163. package/dist/components/Input/index.d.ts +1 -1
  164. package/dist/components/Input/index.js +8 -8
  165. package/dist/components/InstantCounter/InstantCounter.d.ts +13 -13
  166. package/dist/components/InstantCounter/InstantCounter.js +58 -58
  167. package/dist/components/InstantCounter/InstantCounter.stories.d.ts +28 -28
  168. package/dist/components/InstantCounter/InstantCounter.stories.js +15 -15
  169. package/dist/components/InstantCounter/InstantCounter.test.d.ts +1 -1
  170. package/dist/components/InstantCounter/InstantCounter.test.js +49 -49
  171. package/dist/components/InstantCounter/index.d.ts +1 -1
  172. package/dist/components/InstantCounter/index.js +8 -8
  173. package/dist/components/LinkToId/LinkToId.d.ts +10 -10
  174. package/dist/components/LinkToId/LinkToId.js +32 -32
  175. package/dist/components/LinkToId/LinkToId.test.d.ts +1 -1
  176. package/dist/components/LinkToId/LinkToId.test.js +11 -11
  177. package/dist/components/LinkToId/index.d.ts +1 -1
  178. package/dist/components/LinkToId/index.js +9 -9
  179. package/dist/components/Loader/Loader.d.ts +6 -6
  180. package/dist/components/Loader/Loader.js +17 -17
  181. package/dist/components/Loader/Loader.stories.d.ts +12 -12
  182. package/dist/components/Loader/Loader.stories.js +15 -15
  183. package/dist/components/Loader/index.d.ts +1 -1
  184. package/dist/components/Loader/index.js +8 -8
  185. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.d.ts +6 -6
  186. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +41 -41
  187. package/dist/components/LoaderDotsIndicator/index.d.ts +1 -1
  188. package/dist/components/LoaderDotsIndicator/index.js +8 -8
  189. package/dist/components/MainGrid/MainGrid.d.ts +10 -10
  190. package/dist/components/MainGrid/MainGrid.js +55 -55
  191. package/dist/components/MainGrid/MainGrid.stories.d.ts +14 -14
  192. package/dist/components/MainGrid/MainGrid.stories.js +69 -69
  193. package/dist/components/MainGrid/MainGrid.test.d.ts +1 -1
  194. package/dist/components/MainGrid/MainGrid.test.js +17 -17
  195. package/dist/components/MainGrid/index.d.ts +1 -1
  196. package/dist/components/MainGrid/index.js +8 -8
  197. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.d.ts +8 -8
  198. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +29 -29
  199. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.d.ts +14 -14
  200. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.stories.js +15 -15
  201. package/dist/components/MutableHamburgerButton/index.d.ts +1 -1
  202. package/dist/components/MutableHamburgerButton/index.js +8 -8
  203. package/dist/components/Notification/Notification.d.ts +7 -7
  204. package/dist/components/Notification/Notification.js +15 -15
  205. package/dist/components/Notification/Notification.stories.d.ts +15 -15
  206. package/dist/components/Notification/Notification.stories.js +18 -18
  207. package/dist/components/Notification/index.d.ts +1 -1
  208. package/dist/components/Notification/index.js +8 -8
  209. package/dist/components/Parallax/Parallax.d.ts +15 -15
  210. package/dist/components/Parallax/Parallax.js +174 -174
  211. package/dist/components/Parallax/Parallax.stories.d.ts +32 -32
  212. package/dist/components/Parallax/Parallax.stories.js +22 -22
  213. package/dist/components/Parallax/Parallax.test.d.ts +1 -1
  214. package/dist/components/Parallax/Parallax.test.js +21 -21
  215. package/dist/components/Parallax/index.d.ts +1 -1
  216. package/dist/components/Parallax/index.js +8 -8
  217. package/dist/components/Parallax/math/helpers.d.ts +58 -58
  218. package/dist/components/Parallax/math/helpers.js +228 -228
  219. package/dist/components/PasswordInput/PasswordInput.d.ts +40 -40
  220. package/dist/components/PasswordInput/PasswordInput.js +105 -105
  221. package/dist/components/PasswordInput/PasswordInput.test.d.ts +1 -1
  222. package/dist/components/PasswordInput/PasswordInput.test.js +156 -156
  223. package/dist/components/PasswordInput/index.d.ts +1 -1
  224. package/dist/components/PasswordInput/index.js +8 -8
  225. package/dist/components/PixelatedScan/PixelatedScan.d.ts +8 -8
  226. package/dist/components/PixelatedScan/PixelatedScan.js +104 -104
  227. package/dist/components/PixelatedScan/PixelatedScan.stories.d.ts +15 -15
  228. package/dist/components/PixelatedScan/PixelatedScan.stories.js +39 -39
  229. package/dist/components/PixelatedScan/index.d.ts +1 -1
  230. package/dist/components/PixelatedScan/index.js +8 -8
  231. package/dist/components/ProgressTexts/ProgressTexts.d.ts +22 -22
  232. package/dist/components/ProgressTexts/ProgressTexts.js +37 -37
  233. package/dist/components/ProgressTexts/ProgressTexts.stories.d.ts +24 -24
  234. package/dist/components/ProgressTexts/ProgressTexts.stories.js +89 -89
  235. package/dist/components/ProgressTexts/ProgressTexts.test.d.ts +1 -1
  236. package/dist/components/ProgressTexts/ProgressTexts.test.js +51 -51
  237. package/dist/components/ProgressTexts/index.d.ts +1 -1
  238. package/dist/components/ProgressTexts/index.js +8 -8
  239. package/dist/components/SectionContainer/SectionContainer.d.ts +11 -11
  240. package/dist/components/SectionContainer/SectionContainer.js +45 -45
  241. package/dist/components/SectionContainer/index.d.ts +1 -1
  242. package/dist/components/SectionContainer/index.js +8 -8
  243. package/dist/components/Select/Select.d.ts +22 -22
  244. package/dist/components/Select/Select.js +75 -75
  245. package/dist/components/Select/Select.stories.d.ts +52 -52
  246. package/dist/components/Select/Select.stories.js +33 -33
  247. package/dist/components/Select/Select.test.d.ts +1 -1
  248. package/dist/components/Select/Select.test.js +11 -11
  249. package/dist/components/Select/index.d.ts +1 -1
  250. package/dist/components/Select/index.js +8 -8
  251. package/dist/components/Spacing/Spacing.d.ts +6 -6
  252. package/dist/components/Spacing/Spacing.js +14 -14
  253. package/dist/components/Spacing/Spacing.stories.d.ts +7 -7
  254. package/dist/components/Spacing/Spacing.stories.js +34 -34
  255. package/dist/components/Spacing/index.d.ts +1 -1
  256. package/dist/components/Spacing/index.js +8 -8
  257. package/dist/components/Table/Table.d.ts +19 -19
  258. package/dist/components/Table/Table.js +87 -87
  259. package/dist/components/Table/Table.stories.d.ts +15 -15
  260. package/dist/components/Table/Table.stories.js +87 -87
  261. package/dist/components/Table/Table.test.d.ts +1 -1
  262. package/dist/components/Table/Table.test.js +34 -34
  263. package/dist/components/Table/index.d.ts +1 -1
  264. package/dist/components/Table/index.js +8 -8
  265. package/dist/components/Tabs/Tabs.d.ts +11 -11
  266. package/dist/components/Tabs/Tabs.js +48 -48
  267. package/dist/components/Tabs/Tabs.test.d.ts +1 -1
  268. package/dist/components/Tabs/Tabs.test.js +38 -38
  269. package/dist/components/Tabs/index.d.ts +1 -1
  270. package/dist/components/Tabs/index.js +8 -8
  271. package/dist/components/Text/Text.d.ts +8 -8
  272. package/dist/components/Text/Text.js +51 -51
  273. package/dist/components/Text/Text.stories.d.ts +12 -12
  274. package/dist/components/Text/Text.stories.js +19 -19
  275. package/dist/components/Text/Text.test.d.ts +1 -1
  276. package/dist/components/Text/Text.test.js +11 -11
  277. package/dist/components/Text/index.d.ts +1 -1
  278. package/dist/components/Text/index.js +8 -8
  279. package/dist/components/Transition/Transition.d.ts +44 -44
  280. package/dist/components/Transition/Transition.js +226 -226
  281. package/dist/components/Transition/Transition.stories.d.ts +10 -10
  282. package/dist/components/Transition/Transition.stories.js +28 -28
  283. package/dist/components/Transition/Transition.test.d.ts +1 -1
  284. package/dist/components/Transition/Transition.test.js +54 -54
  285. package/dist/components/Transition/index.d.ts +1 -1
  286. package/dist/components/Transition/index.js +9 -9
  287. package/dist/components/UncontrolledTransition/UncontrolledTransition.d.ts +12 -12
  288. package/dist/components/UncontrolledTransition/UncontrolledTransition.js +95 -95
  289. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.d.ts +30 -30
  290. package/dist/components/UncontrolledTransition/UncontrolledTransition.stories.js +183 -183
  291. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.d.ts +1 -1
  292. package/dist/components/UncontrolledTransition/UncontrolledTransition.test.js +134 -134
  293. package/dist/components/UncontrolledTransition/index.d.ts +1 -1
  294. package/dist/components/UncontrolledTransition/index.js +8 -8
  295. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.d.ts +52 -46
  296. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +121 -113
  297. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +1 -1
  298. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.d.ts +70 -70
  299. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.stories.js +64 -64
  300. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.d.ts +1 -1
  301. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.test.js +136 -136
  302. package/dist/components/WalletConnectionWrapper/index.d.ts +1 -1
  303. package/dist/components/WalletConnectionWrapper/index.js +9 -8
  304. package/dist/components/WalletConnectionWrapper/index.js.map +1 -1
  305. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.d.ts +40 -0
  306. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.js +130 -0
  307. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.js.map +1 -0
  308. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.d.ts +59 -0
  309. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.js +62 -0
  310. package/dist/components/WalletConnectionWrapper/v2/WalletConnectionWrapper.stories.js.map +1 -0
  311. package/dist/components/WalletConnectionWrapper/v2/index.d.ts +1 -0
  312. package/dist/components/WalletConnectionWrapper/v2/index.js +9 -0
  313. package/dist/components/WalletConnectionWrapper/v2/index.js.map +1 -0
  314. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.d.ts +6 -0
  315. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.js +52 -0
  316. package/dist/components/WalletConnectionWrapper/v2/rLoginConfig.js.map +1 -0
  317. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.d.ts +7 -7
  318. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +70 -70
  319. package/dist/components/utilitary/ScrollAndFocusLock/index.d.ts +1 -1
  320. package/dist/components/utilitary/ScrollAndFocusLock/index.js +8 -8
  321. package/dist/context/OneUIProvider.d.ts +67 -67
  322. package/dist/context/OneUIProvider.js +63 -63
  323. package/dist/context/OneUIProvider.test.d.ts +1 -1
  324. package/dist/context/OneUIProvider.test.js +44 -44
  325. package/dist/context/__mocks__/OneUIProvider.d.ts +67 -67
  326. package/dist/context/__mocks__/OneUIProvider.js +12 -12
  327. package/dist/hooks/shims/ObjectWatchShim.js +47 -47
  328. package/dist/hooks/useAsyncControl.d.ts +9 -9
  329. package/dist/hooks/useAsyncControl.js +39 -39
  330. package/dist/hooks/useIntersection.d.ts +4 -4
  331. package/dist/hooks/useIntersection.js +29 -29
  332. package/dist/hooks/useObserve.d.ts +2 -2
  333. package/dist/hooks/useObserve.js +13 -13
  334. package/dist/hooks/usePagination.d.ts +19 -19
  335. package/dist/hooks/usePagination.js +64 -64
  336. package/dist/hooks/usePooledOperation.d.ts +15 -15
  337. package/dist/hooks/usePooledOperation.js +63 -63
  338. package/dist/hooks/usePooling.d.ts +16 -16
  339. package/dist/hooks/usePooling.js +46 -46
  340. package/dist/hooks/usePooling.test.d.ts +1 -1
  341. package/dist/hooks/usePooling.test.js +103 -103
  342. package/dist/hooks/useScrollLock.d.ts +0 -0
  343. package/dist/hooks/useScrollLock.js +2 -0
  344. package/dist/hooks/useScrollLock.js.map +1 -0
  345. package/dist/hooks/useShortIntl.d.ts +14 -14
  346. package/dist/hooks/useShortIntl.js +34 -34
  347. package/dist/models/GenericContract.d.ts +66 -66
  348. package/dist/models/GenericContract.js +13 -13
  349. package/dist/storybookUtils/index.d.ts +5 -5
  350. package/dist/storybookUtils/index.js +26 -26
  351. package/package.json +3 -2
@@ -1,106 +1,106 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
30
- const OneUIProvider_1 = require("../../context/OneUIProvider");
31
- const Input_1 = __importDefault(require("../Input"));
32
- const Text_1 = __importDefault(require("../Text"));
33
- const PasswordInput_module_scss_1 = __importDefault(require("./PasswordInput.module.scss"));
34
- const BASE_VALIDATION = [
35
- { code: "size", validate: (pass) => pass.length >= 8 },
36
- ];
37
- const RULES = [
38
- {
39
- code: "duplication",
40
- validate: (pass) => {
41
- for (let i = 0; i < pass.length; i++) {
42
- const charCode = pass.charCodeAt(i);
43
- const [firstNext, secondNext] = [
44
- pass.charCodeAt(i + 1) || 0,
45
- pass.charCodeAt(i + 2) || 0,
46
- ];
47
- if (firstNext - charCode === 1 && secondNext - firstNext === 1) {
48
- return false;
49
- }
50
- }
51
- return true;
52
- },
53
- },
54
- ...BASE_VALIDATION,
55
- ];
56
- /**
57
- * A Input based wrapper to handle inputing of password
58
- **/
59
- function PasswordInput(props, ref) {
60
- const [isPasswordVisibile, setIPV] = (0, react_1.useState)(false);
61
- const { passwordHidden, passwordVisible, } = (0, OneUIProvider_1.useOneUIContext)().component.passwordInput.iconSrc;
62
- function _validatePassword(password) {
63
- switch (props.mode) {
64
- case "creation":
65
- return RULES.reduce((isValid, R) => isValid && R.validate(password), true);
66
- case "comparision":
67
- return password === props.otherPassword;
68
- case "input":
69
- return BASE_VALIDATION.reduce((isValid, R) => isValid && R.validate(password), true);
70
- }
71
- }
72
- (0, react_1.useImperativeHandle)(ref, () => ({
73
- validatePassword: (pass) => _validatePassword(pass),
74
- }));
75
- function _onChange(e) {
76
- const password = e.target.value;
77
- switch (props.mode) {
78
- case "comparision":
79
- case "creation":
80
- props.onChange(password, _validatePassword(password));
81
- break;
82
- case "input":
83
- props.onChange(password);
84
- break;
85
- }
86
- }
87
- return (react_1.default.createElement("div", { className: `${PasswordInput_module_scss_1.default.inputContainer} ${PasswordInput_module_scss_1.default[props.mode]}` },
88
- react_1.default.createElement(Input_1.default, { value: props.value, onChange: _onChange, type: !isPasswordVisibile ? "password" : "", icon: {
89
- src: isPasswordVisibile ? passwordHidden : passwordVisible,
90
- onMouseLeave: () => setIPV(false),
91
- onMouseDown: () => setIPV(true),
92
- onMouseUp: () => setIPV(false),
93
- onTouchMove: () => setIPV(false),
94
- onTouchStart: () => setIPV(true),
95
- onTouchEnd: () => setIPV(false),
96
- }, error: props.mode === "comparision" && !_validatePassword(props.value)
97
- ? props.messages.passwordsAreDifferent
98
- : props.error, disabled: props.disabled, placeholder: props.placeholder }),
99
- props.mode === "creation" && (react_1.default.createElement("div", { className: PasswordInput_module_scss_1.default.rules, "data-testid": "password-rules" },
100
- react_1.default.createElement(Text_1.default, { type: "caption" }, props.messages.rulesTitle),
101
- RULES.map((R) => (react_1.default.createElement(Text_1.default, { key: R.code, type: R.validate(props.value) ? "caption" : "error" },
102
- "- ",
103
- props.messages.invalidRules[R.code])))))));
104
- }
105
- exports.default = (0, react_1.forwardRef)(PasswordInput);
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const OneUIProvider_1 = require("../../context/OneUIProvider");
31
+ const Input_1 = __importDefault(require("../Input"));
32
+ const Text_1 = __importDefault(require("../Text"));
33
+ const PasswordInput_module_scss_1 = __importDefault(require("./PasswordInput.module.scss"));
34
+ const BASE_VALIDATION = [
35
+ { code: "size", validate: (pass) => pass.length >= 8 },
36
+ ];
37
+ const RULES = [
38
+ {
39
+ code: "duplication",
40
+ validate: (pass) => {
41
+ for (let i = 0; i < pass.length; i++) {
42
+ const charCode = pass.charCodeAt(i);
43
+ const [firstNext, secondNext] = [
44
+ pass.charCodeAt(i + 1) || 0,
45
+ pass.charCodeAt(i + 2) || 0,
46
+ ];
47
+ if (firstNext - charCode === 1 && secondNext - firstNext === 1) {
48
+ return false;
49
+ }
50
+ }
51
+ return true;
52
+ },
53
+ },
54
+ ...BASE_VALIDATION,
55
+ ];
56
+ /**
57
+ * A Input based wrapper to handle inputing of password
58
+ **/
59
+ function PasswordInput(props, ref) {
60
+ const [isPasswordVisibile, setIPV] = (0, react_1.useState)(false);
61
+ const { passwordHidden, passwordVisible, } = (0, OneUIProvider_1.useOneUIContext)().component.passwordInput.iconSrc;
62
+ function _validatePassword(password) {
63
+ switch (props.mode) {
64
+ case "creation":
65
+ return RULES.reduce((isValid, R) => isValid && R.validate(password), true);
66
+ case "comparision":
67
+ return password === props.otherPassword;
68
+ case "input":
69
+ return BASE_VALIDATION.reduce((isValid, R) => isValid && R.validate(password), true);
70
+ }
71
+ }
72
+ (0, react_1.useImperativeHandle)(ref, () => ({
73
+ validatePassword: (pass) => _validatePassword(pass),
74
+ }));
75
+ function _onChange(e) {
76
+ const password = e.target.value;
77
+ switch (props.mode) {
78
+ case "comparision":
79
+ case "creation":
80
+ props.onChange(password, _validatePassword(password));
81
+ break;
82
+ case "input":
83
+ props.onChange(password);
84
+ break;
85
+ }
86
+ }
87
+ return (react_1.default.createElement("div", { className: `${PasswordInput_module_scss_1.default.inputContainer} ${PasswordInput_module_scss_1.default[props.mode]}` },
88
+ react_1.default.createElement(Input_1.default, { value: props.value, onChange: _onChange, type: !isPasswordVisibile ? "password" : "", icon: {
89
+ src: isPasswordVisibile ? passwordHidden : passwordVisible,
90
+ onMouseLeave: () => setIPV(false),
91
+ onMouseDown: () => setIPV(true),
92
+ onMouseUp: () => setIPV(false),
93
+ onTouchMove: () => setIPV(false),
94
+ onTouchStart: () => setIPV(true),
95
+ onTouchEnd: () => setIPV(false),
96
+ }, error: props.mode === "comparision" && !_validatePassword(props.value)
97
+ ? props.messages.passwordsAreDifferent
98
+ : props.error, disabled: props.disabled, placeholder: props.placeholder }),
99
+ props.mode === "creation" && (react_1.default.createElement("div", { className: PasswordInput_module_scss_1.default.rules, "data-testid": "password-rules" },
100
+ react_1.default.createElement(Text_1.default, { type: "caption" }, props.messages.rulesTitle),
101
+ RULES.map((R) => (react_1.default.createElement(Text_1.default, { key: R.code, type: R.validate(props.value) ? "caption" : "error" },
102
+ "- ",
103
+ props.messages.invalidRules[R.code])))))));
104
+ }
105
+ exports.default = (0, react_1.forwardRef)(PasswordInput);
106
106
  //# sourceMappingURL=PasswordInput.js.map
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,157 +1,157 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- const react_1 = __importStar(require("react"));
39
- const react_2 = require("@testing-library/react");
40
- const PasswordInput_1 = __importDefault(require("./PasswordInput"));
41
- const user_event_1 = __importDefault(require("@testing-library/user-event"));
42
- const Text_module_scss_1 = __importDefault(require("../Text/Text.module.scss"));
43
- const passwordInputRulesDescription = {
44
- duplication: "MOCK_passwordInputRulesDescription_duplication",
45
- size: "MOCK_passwordInputRulesDescription_size",
46
- };
47
- jest.unmock("../../../ux/components/elements/icon/icon");
48
- const MOCKED_CREATION_MESSAGES = {
49
- invalidRules: { duplication: "d", size: "s" },
50
- rulesTitle: "t",
51
- };
52
- function Wrapper(props) {
53
- const [s, ss] = (0, react_1.useState)(props.value);
54
- return (react_1.default.createElement(PasswordInput_1.default, Object.assign({}, props, { value: s, onChange: (...args) => {
55
- ss(args[0]);
56
- props.onChange(...args);
57
- } })));
58
- }
59
- function renderScreen(props) {
60
- return (0, react_2.render)(react_1.default.createElement(Wrapper, Object.assign({}, props)));
61
- }
62
- it("Should at least render :)", () => {
63
- renderScreen({ value: "", mode: "input", onChange: jest.fn() });
64
- });
65
- it.each([
66
- ["creation", true],
67
- ["input", false],
68
- ])("Should have a validation mode, where it should display all the validations that are being made over the informed password %s", (mode, shouldShow) => {
69
- const changeCb = jest.fn();
70
- const w = renderScreen(mode === "creation"
71
- ? {
72
- mode: mode,
73
- value: "",
74
- onChange: changeCb,
75
- messages: MOCKED_CREATION_MESSAGES,
76
- }
77
- : { mode: mode, value: "", onChange: changeCb });
78
- if (shouldShow)
79
- expect(w.getByTestId("password-rules"));
80
- else
81
- expect(w.queryByTestId("password-rules")).toBeNull();
82
- });
83
- it("Should reject small passwords < 8", () => __awaiter(void 0, void 0, void 0, function* () {
84
- const changeCb = jest.fn();
85
- const w = renderScreen({
86
- mode: "creation",
87
- value: "",
88
- onChange: changeCb,
89
- messages: MOCKED_CREATION_MESSAGES,
90
- });
91
- yield user_event_1.default.type(w.container.querySelector("input"), "Short", {
92
- delay: 50,
93
- });
94
- expect(changeCb).toHaveBeenLastCalledWith("Short", false);
95
- expect(w.getByText(`- ${passwordInputRulesDescription.size}`).className).toContain(Text_module_scss_1.default.error);
96
- }));
97
- it.each([
98
- ["abc123senha", false],
99
- ["teste123", false],
100
- ["mnolol1997", false],
101
- ["UMASENHASECRETA", true],
102
- ["1928371281923", true],
103
- ["Netspaces", true],
104
- ])("when %s should reject = %s sequencial numbers or letters ", (pass, isValid) => __awaiter(void 0, void 0, void 0, function* () {
105
- const changeCb = jest.fn();
106
- const w = renderScreen({
107
- mode: "creation",
108
- value: "",
109
- onChange: changeCb,
110
- messages: MOCKED_CREATION_MESSAGES,
111
- });
112
- yield user_event_1.default.type(w.container.querySelector("input"), pass, {
113
- delay: 50,
114
- });
115
- expect(changeCb).toHaveBeenLastCalledWith(pass, isValid);
116
- const expectation = expect(w.getByText(`- ${passwordInputRulesDescription.duplication}`).className);
117
- if (isValid)
118
- expectation.not.toContain(Text_module_scss_1.default.error);
119
- else
120
- expectation.toContain(Text_module_scss_1.default.error);
121
- }));
122
- function createMouseEvent(type) {
123
- const e = new MouseEvent(type);
124
- e.initEvent(type, true, true);
125
- return e;
126
- }
127
- it("Should be able to show password temporarly when mouseenter and hiding onmouseexit", () => __awaiter(void 0, void 0, void 0, function* () {
128
- const w = renderScreen({ mode: "input", value: "", onChange: jest.fn() });
129
- const icon = w.container.querySelector("i");
130
- const input = w.container.querySelector("input");
131
- expect(input.getAttribute("type")).toEqual("password");
132
- icon.dispatchEvent(createMouseEvent("mousedown"));
133
- yield (0, react_2.waitFor)(() => expect(input.getAttribute("type")).toEqual(""));
134
- icon.dispatchEvent(createMouseEvent("mouseup"));
135
- yield (0, react_2.waitFor)(() => expect(input.getAttribute("type")).toEqual("password"));
136
- }));
137
- it("Should be able to validate against a previous password", () => __awaiter(void 0, void 0, void 0, function* () {
138
- const changeCb = jest.fn();
139
- const w = renderScreen({
140
- mode: "comparision",
141
- value: "",
142
- otherPassword: "Senhaigual",
143
- onChange: changeCb,
144
- messages: {
145
- passwordsAreDifferent: "d",
146
- },
147
- });
148
- yield user_event_1.default.type(w.container.querySelector("input"), "Senhaigua", {
149
- delay: 50,
150
- });
151
- expect(changeCb).toHaveBeenLastCalledWith("Senhaigua", false);
152
- yield user_event_1.default.type(w.container.querySelector("input"), "l", {
153
- delay: 50,
154
- });
155
- expect(changeCb).toHaveBeenLastCalledWith("Senhaigual", true);
156
- }));
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ const react_1 = __importStar(require("react"));
39
+ const react_2 = require("@testing-library/react");
40
+ const PasswordInput_1 = __importDefault(require("./PasswordInput"));
41
+ const user_event_1 = __importDefault(require("@testing-library/user-event"));
42
+ const Text_module_scss_1 = __importDefault(require("../Text/Text.module.scss"));
43
+ const passwordInputRulesDescription = {
44
+ duplication: "MOCK_passwordInputRulesDescription_duplication",
45
+ size: "MOCK_passwordInputRulesDescription_size",
46
+ };
47
+ jest.unmock("../../../ux/components/elements/icon/icon");
48
+ const MOCKED_CREATION_MESSAGES = {
49
+ invalidRules: { duplication: "d", size: "s" },
50
+ rulesTitle: "t",
51
+ };
52
+ function Wrapper(props) {
53
+ const [s, ss] = (0, react_1.useState)(props.value);
54
+ return (react_1.default.createElement(PasswordInput_1.default, Object.assign({}, props, { value: s, onChange: (...args) => {
55
+ ss(args[0]);
56
+ props.onChange(...args);
57
+ } })));
58
+ }
59
+ function renderScreen(props) {
60
+ return (0, react_2.render)(react_1.default.createElement(Wrapper, Object.assign({}, props)));
61
+ }
62
+ it("Should at least render :)", () => {
63
+ renderScreen({ value: "", mode: "input", onChange: jest.fn() });
64
+ });
65
+ it.each([
66
+ ["creation", true],
67
+ ["input", false],
68
+ ])("Should have a validation mode, where it should display all the validations that are being made over the informed password %s", (mode, shouldShow) => {
69
+ const changeCb = jest.fn();
70
+ const w = renderScreen(mode === "creation"
71
+ ? {
72
+ mode: mode,
73
+ value: "",
74
+ onChange: changeCb,
75
+ messages: MOCKED_CREATION_MESSAGES,
76
+ }
77
+ : { mode: mode, value: "", onChange: changeCb });
78
+ if (shouldShow)
79
+ expect(w.getByTestId("password-rules"));
80
+ else
81
+ expect(w.queryByTestId("password-rules")).toBeNull();
82
+ });
83
+ it("Should reject small passwords < 8", () => __awaiter(void 0, void 0, void 0, function* () {
84
+ const changeCb = jest.fn();
85
+ const w = renderScreen({
86
+ mode: "creation",
87
+ value: "",
88
+ onChange: changeCb,
89
+ messages: MOCKED_CREATION_MESSAGES,
90
+ });
91
+ yield user_event_1.default.type(w.container.querySelector("input"), "Short", {
92
+ delay: 50,
93
+ });
94
+ expect(changeCb).toHaveBeenLastCalledWith("Short", false);
95
+ expect(w.getByText(`- ${passwordInputRulesDescription.size}`).className).toContain(Text_module_scss_1.default.error);
96
+ }));
97
+ it.each([
98
+ ["abc123senha", false],
99
+ ["teste123", false],
100
+ ["mnolol1997", false],
101
+ ["UMASENHASECRETA", true],
102
+ ["1928371281923", true],
103
+ ["Netspaces", true],
104
+ ])("when %s should reject = %s sequencial numbers or letters ", (pass, isValid) => __awaiter(void 0, void 0, void 0, function* () {
105
+ const changeCb = jest.fn();
106
+ const w = renderScreen({
107
+ mode: "creation",
108
+ value: "",
109
+ onChange: changeCb,
110
+ messages: MOCKED_CREATION_MESSAGES,
111
+ });
112
+ yield user_event_1.default.type(w.container.querySelector("input"), pass, {
113
+ delay: 50,
114
+ });
115
+ expect(changeCb).toHaveBeenLastCalledWith(pass, isValid);
116
+ const expectation = expect(w.getByText(`- ${passwordInputRulesDescription.duplication}`).className);
117
+ if (isValid)
118
+ expectation.not.toContain(Text_module_scss_1.default.error);
119
+ else
120
+ expectation.toContain(Text_module_scss_1.default.error);
121
+ }));
122
+ function createMouseEvent(type) {
123
+ const e = new MouseEvent(type);
124
+ e.initEvent(type, true, true);
125
+ return e;
126
+ }
127
+ it("Should be able to show password temporarly when mouseenter and hiding onmouseexit", () => __awaiter(void 0, void 0, void 0, function* () {
128
+ const w = renderScreen({ mode: "input", value: "", onChange: jest.fn() });
129
+ const icon = w.container.querySelector("i");
130
+ const input = w.container.querySelector("input");
131
+ expect(input.getAttribute("type")).toEqual("password");
132
+ icon.dispatchEvent(createMouseEvent("mousedown"));
133
+ yield (0, react_2.waitFor)(() => expect(input.getAttribute("type")).toEqual(""));
134
+ icon.dispatchEvent(createMouseEvent("mouseup"));
135
+ yield (0, react_2.waitFor)(() => expect(input.getAttribute("type")).toEqual("password"));
136
+ }));
137
+ it("Should be able to validate against a previous password", () => __awaiter(void 0, void 0, void 0, function* () {
138
+ const changeCb = jest.fn();
139
+ const w = renderScreen({
140
+ mode: "comparision",
141
+ value: "",
142
+ otherPassword: "Senhaigual",
143
+ onChange: changeCb,
144
+ messages: {
145
+ passwordsAreDifferent: "d",
146
+ },
147
+ });
148
+ yield user_event_1.default.type(w.container.querySelector("input"), "Senhaigua", {
149
+ delay: 50,
150
+ });
151
+ expect(changeCb).toHaveBeenLastCalledWith("Senhaigua", false);
152
+ yield user_event_1.default.type(w.container.querySelector("input"), "l", {
153
+ delay: 50,
154
+ });
155
+ expect(changeCb).toHaveBeenLastCalledWith("Senhaigual", true);
156
+ }));
157
157
  //# sourceMappingURL=PasswordInput.test.js.map
@@ -1 +1 @@
1
- export { default } from './PasswordInput';
1
+ export { default } from './PasswordInput';
@@ -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 PasswordInput_1 = require("./PasswordInput");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(PasswordInput_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 PasswordInput_1 = require("./PasswordInput");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(PasswordInput_1).default; } });
9
9
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- /**
2
- * This effect scans up and down on the div with a following pixelated trail
3
- **/
4
- export default function PixelatedScan({ squaresByLine, color, className, }: {
5
- squaresByLine: number;
6
- color: string;
7
- className?: string;
8
- }): JSX.Element;
1
+ /**
2
+ * This effect scans up and down on the div with a following pixelated trail
3
+ **/
4
+ export default function PixelatedScan({ squaresByLine, color, className, }: {
5
+ squaresByLine: number;
6
+ color: string;
7
+ className?: string;
8
+ }): JSX.Element;