@onepercentio/one-ui 0.28.9 → 0.29.1

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 (698) hide show
  1. package/dist/utils/e2e.d.ts +13 -0
  2. package/dist/utils/e2e.js +42 -0
  3. package/dist-ts/assets/img/svg/checkbox.svg +3 -0
  4. package/dist-ts/assets/styles/index.scss +2 -0
  5. package/dist-ts/assets/styles/mixins.scss +12 -0
  6. package/dist-ts/assets/styles/variables.scss +49 -0
  7. package/dist-ts/components/AdaptiveButton/AdaptiveButton.d.ts +8 -0
  8. package/dist-ts/components/AdaptiveButton/AdaptiveButton.js +11 -0
  9. package/dist-ts/components/AdaptiveButton/AdaptiveButton.js.map +1 -0
  10. package/dist-ts/components/AdaptiveButton/AdaptiveButton.module.scss +7 -0
  11. package/dist-ts/components/AdaptiveButton/index.d.ts +1 -0
  12. package/dist-ts/components/AdaptiveButton/index.js +2 -0
  13. package/dist-ts/components/AdaptiveButton/index.js.map +1 -0
  14. package/dist-ts/components/AdaptiveContainer/AdaptiveContainer.d.ts +21 -0
  15. package/dist-ts/components/AdaptiveContainer/AdaptiveContainer.js +125 -0
  16. package/dist-ts/components/AdaptiveContainer/AdaptiveContainer.js.map +1 -0
  17. package/dist-ts/components/AdaptiveContainer/AdaptiveContainer.module.scss +53 -0
  18. package/dist-ts/components/AdaptiveContainer/index.d.ts +1 -0
  19. package/dist-ts/components/AdaptiveContainer/index.js +2 -0
  20. package/dist-ts/components/AdaptiveContainer/index.js.map +1 -0
  21. package/dist-ts/components/AdaptiveDialog/AdaptiveDialog.d.ts +16 -0
  22. package/dist-ts/components/AdaptiveDialog/AdaptiveDialog.js +39 -0
  23. package/dist-ts/components/AdaptiveDialog/AdaptiveDialog.js.map +1 -0
  24. package/dist-ts/components/AdaptiveDialog/AdaptiveDialog.module.scss +147 -0
  25. package/dist-ts/components/AdaptiveDialog/index.d.ts +1 -0
  26. package/dist-ts/components/AdaptiveDialog/index.js +2 -0
  27. package/dist-ts/components/AdaptiveDialog/index.js.map +1 -0
  28. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.d.ts +24 -0
  29. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.js +43 -0
  30. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.js.map +1 -0
  31. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.module.scss +49 -0
  32. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.sample.d.ts +1 -0
  33. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.sample.js +6 -0
  34. package/dist-ts/components/AdaptiveSidebar/AdaptiveSidebar.sample.js.map +1 -0
  35. package/dist-ts/components/AdaptiveSidebar/index.d.ts +1 -0
  36. package/dist-ts/components/AdaptiveSidebar/index.js +2 -0
  37. package/dist-ts/components/AdaptiveSidebar/index.js.map +1 -0
  38. package/dist-ts/components/AnchoredTooltip/AnchoredTooltip.d.ts +34 -0
  39. package/dist-ts/components/AnchoredTooltip/AnchoredTooltip.js +145 -0
  40. package/dist-ts/components/AnchoredTooltip/AnchoredTooltip.js.map +1 -0
  41. package/dist-ts/components/AnchoredTooltip/AnchoredTooltip.module.scss +64 -0
  42. package/dist-ts/components/AnchoredTooltip/index.d.ts +1 -0
  43. package/dist-ts/components/AnchoredTooltip/index.js +2 -0
  44. package/dist-ts/components/AnchoredTooltip/index.js.map +1 -0
  45. package/dist-ts/components/AnimatedEntrance/AnimatedEntrance.d.ts +18 -0
  46. package/dist-ts/components/AnimatedEntrance/AnimatedEntrance.js +122 -0
  47. package/dist-ts/components/AnimatedEntrance/AnimatedEntrance.js.map +1 -0
  48. package/dist-ts/components/AnimatedEntrance/AnimatedEntrance.module.scss +108 -0
  49. package/dist-ts/components/AnimatedEntrance/index.d.ts +1 -0
  50. package/dist-ts/components/AnimatedEntrance/index.js +2 -0
  51. package/dist-ts/components/AnimatedEntrance/index.js.map +1 -0
  52. package/dist-ts/components/AsyncWrapper/AsyncWrapper.d.ts +10 -0
  53. package/dist-ts/components/AsyncWrapper/AsyncWrapper.js +14 -0
  54. package/dist-ts/components/AsyncWrapper/AsyncWrapper.js.map +1 -0
  55. package/dist-ts/components/AsyncWrapper/index.d.ts +1 -0
  56. package/dist-ts/components/AsyncWrapper/index.js +2 -0
  57. package/dist-ts/components/AsyncWrapper/index.js.map +1 -0
  58. package/dist-ts/components/Avatar/Avatar.d.ts +8 -0
  59. package/dist-ts/components/Avatar/Avatar.js +17 -0
  60. package/dist-ts/components/Avatar/Avatar.js.map +1 -0
  61. package/dist-ts/components/Avatar/Avatar.module.scss +22 -0
  62. package/dist-ts/components/Avatar/index.d.ts +1 -0
  63. package/dist-ts/components/Avatar/index.js +2 -0
  64. package/dist-ts/components/Avatar/index.js.map +1 -0
  65. package/dist-ts/components/BucketFill/BucketFill.d.ts +12 -0
  66. package/dist-ts/components/BucketFill/BucketFill.js +36 -0
  67. package/dist-ts/components/BucketFill/BucketFill.js.map +1 -0
  68. package/dist-ts/components/BucketFill/BucketFill.module.scss +36 -0
  69. package/dist-ts/components/BucketFill/index.d.ts +1 -0
  70. package/dist-ts/components/BucketFill/index.js +2 -0
  71. package/dist-ts/components/BucketFill/index.js.map +1 -0
  72. package/dist-ts/components/Button/Button.d.ts +14 -0
  73. package/dist-ts/components/Button/Button.js +14 -0
  74. package/dist-ts/components/Button/Button.js.map +1 -0
  75. package/dist-ts/components/Button/Button.module.scss +45 -0
  76. package/dist-ts/components/Button/index.d.ts +1 -0
  77. package/dist-ts/components/Button/index.js +2 -0
  78. package/dist-ts/components/Button/index.js.map +1 -0
  79. package/dist-ts/components/Card/Card.d.ts +7 -0
  80. package/dist-ts/components/Card/Card.js +9 -0
  81. package/dist-ts/components/Card/Card.js.map +1 -0
  82. package/dist-ts/components/Card/Card.module.scss +12 -0
  83. package/dist-ts/components/Card/index.d.ts +1 -0
  84. package/dist-ts/components/Card/index.js +2 -0
  85. package/dist-ts/components/Card/index.js.map +1 -0
  86. package/dist-ts/components/Chart/Chart.e2e.d.ts +4 -0
  87. package/dist-ts/components/Chart/Chart.e2e.js +6 -0
  88. package/dist-ts/components/Chart/Chart.e2e.js.map +1 -0
  89. package/dist-ts/components/Chart/Chart.logic.d.ts +3 -0
  90. package/dist-ts/components/Chart/Chart.logic.js +7 -0
  91. package/dist-ts/components/Chart/Chart.logic.js.map +1 -0
  92. package/dist-ts/components/Chart/Chart.module.scss +58 -0
  93. package/dist-ts/components/Chart/Chart.types.d.ts +24 -0
  94. package/dist-ts/components/Chart/Chart.types.js +2 -0
  95. package/dist-ts/components/Chart/Chart.types.js.map +1 -0
  96. package/dist-ts/components/Chart/Chart.view.d.ts +5 -0
  97. package/dist-ts/components/Chart/Chart.view.js +102 -0
  98. package/dist-ts/components/Chart/Chart.view.js.map +1 -0
  99. package/dist-ts/components/Chart/index.d.ts +1 -0
  100. package/dist-ts/components/Chart/index.js +2 -0
  101. package/dist-ts/components/Chart/index.js.map +1 -0
  102. package/dist-ts/components/CheckBox/CheckBox.d.ts +13 -0
  103. package/dist-ts/components/CheckBox/CheckBox.js +14 -0
  104. package/dist-ts/components/CheckBox/CheckBox.js.map +1 -0
  105. package/dist-ts/components/CheckBox/CheckBox.module.scss +36 -0
  106. package/dist-ts/components/CheckBox/index.d.ts +1 -0
  107. package/dist-ts/components/CheckBox/index.js +2 -0
  108. package/dist-ts/components/CheckBox/index.js.map +1 -0
  109. package/dist-ts/components/CodeInput/CodeInput.d.ts +8 -0
  110. package/dist-ts/components/CodeInput/CodeInput.js +73 -0
  111. package/dist-ts/components/CodeInput/CodeInput.js.map +1 -0
  112. package/dist-ts/components/CodeInput/CodeInput.module.scss +5 -0
  113. package/dist-ts/components/CodeInput/index.d.ts +1 -0
  114. package/dist-ts/components/CodeInput/index.js +2 -0
  115. package/dist-ts/components/CodeInput/index.js.map +1 -0
  116. package/dist-ts/components/Collapsable/Collapsable.d.ts +49 -0
  117. package/dist-ts/components/Collapsable/Collapsable.js +133 -0
  118. package/dist-ts/components/Collapsable/Collapsable.js.map +1 -0
  119. package/dist-ts/components/Collapsable/Collapsable.module.scss +42 -0
  120. package/dist-ts/components/Collapsable/index.d.ts +1 -0
  121. package/dist-ts/components/Collapsable/index.js +2 -0
  122. package/dist-ts/components/Collapsable/index.js.map +1 -0
  123. package/dist-ts/components/Countdown/Countdown.d.ts +24 -0
  124. package/dist-ts/components/Countdown/Countdown.js +73 -0
  125. package/dist-ts/components/Countdown/Countdown.js.map +1 -0
  126. package/dist-ts/components/Countdown/index.d.ts +1 -0
  127. package/dist-ts/components/Countdown/index.js +2 -0
  128. package/dist-ts/components/Countdown/index.js.map +1 -0
  129. package/dist-ts/components/CurrencyInput/CurrencyInput.d.ts +7 -0
  130. package/dist-ts/components/CurrencyInput/CurrencyInput.hook.d.ts +6 -0
  131. package/dist-ts/components/CurrencyInput/CurrencyInput.hook.js +23 -0
  132. package/dist-ts/components/CurrencyInput/CurrencyInput.hook.js.map +1 -0
  133. package/dist-ts/components/CurrencyInput/CurrencyInput.js +12 -0
  134. package/dist-ts/components/CurrencyInput/CurrencyInput.js.map +1 -0
  135. package/dist-ts/components/CurrencyInput/index.d.ts +1 -0
  136. package/dist-ts/components/CurrencyInput/index.js +2 -0
  137. package/dist-ts/components/CurrencyInput/index.js.map +1 -0
  138. package/dist-ts/components/Divider/Divider.d.ts +6 -0
  139. package/dist-ts/components/Divider/Divider.js +9 -0
  140. package/dist-ts/components/Divider/Divider.js.map +1 -0
  141. package/dist-ts/components/Divider/Divider.module.scss +7 -0
  142. package/dist-ts/components/Divider/index.d.ts +1 -0
  143. package/dist-ts/components/Divider/index.js +2 -0
  144. package/dist-ts/components/Divider/index.js.map +1 -0
  145. package/dist-ts/components/EmailInput/EmailInput.d.ts +31 -0
  146. package/dist-ts/components/EmailInput/EmailInput.js +24 -0
  147. package/dist-ts/components/EmailInput/EmailInput.js.map +1 -0
  148. package/dist-ts/components/EmailInput/EmailInput.module.scss +0 -0
  149. package/dist-ts/components/EmailInput/index.d.ts +1 -0
  150. package/dist-ts/components/EmailInput/index.js +2 -0
  151. package/dist-ts/components/EmailInput/index.js.map +1 -0
  152. package/dist-ts/components/FadeIn/FadeIn.d.ts +15 -0
  153. package/dist-ts/components/FadeIn/FadeIn.js +40 -0
  154. package/dist-ts/components/FadeIn/FadeIn.js.map +1 -0
  155. package/dist-ts/components/FadeIn/FadeIn.module.scss +9 -0
  156. package/dist-ts/components/FadeIn/index.d.ts +1 -0
  157. package/dist-ts/components/FadeIn/index.js +2 -0
  158. package/dist-ts/components/FadeIn/index.js.map +1 -0
  159. package/dist-ts/components/FileInput/FileInput.d.ts +31 -0
  160. package/dist-ts/components/FileInput/FileInput.js +26 -0
  161. package/dist-ts/components/FileInput/FileInput.js.map +1 -0
  162. package/dist-ts/components/FileInput/FileInput.module.scss +6 -0
  163. package/dist-ts/components/FileInput/View/BigFactory/BigFactory.d.ts +6 -0
  164. package/dist-ts/components/FileInput/View/BigFactory/BigFactory.js +14 -0
  165. package/dist-ts/components/FileInput/View/BigFactory/BigFactory.js.map +1 -0
  166. package/dist-ts/components/FileInput/View/BigFactory/BigFactory.module.scss +20 -0
  167. package/dist-ts/components/FileInput/View/BigFactory/index.d.ts +1 -0
  168. package/dist-ts/components/FileInput/View/BigFactory/index.js +2 -0
  169. package/dist-ts/components/FileInput/View/BigFactory/index.js.map +1 -0
  170. package/dist-ts/components/FileInput/View/Compact/Compact.d.ts +11 -0
  171. package/dist-ts/components/FileInput/View/Compact/Compact.js +45 -0
  172. package/dist-ts/components/FileInput/View/Compact/Compact.js.map +1 -0
  173. package/dist-ts/components/FileInput/View/Compact/Compact.module.scss +68 -0
  174. package/dist-ts/components/FileInput/View/Compact/index.d.ts +1 -0
  175. package/dist-ts/components/FileInput/View/Compact/index.js +2 -0
  176. package/dist-ts/components/FileInput/View/Compact/index.js.map +1 -0
  177. package/dist-ts/components/FileInput/View/View.types.d.ts +8 -0
  178. package/dist-ts/components/FileInput/View/View.types.js +2 -0
  179. package/dist-ts/components/FileInput/View/View.types.js.map +1 -0
  180. package/dist-ts/components/FileInput/index.d.ts +1 -0
  181. package/dist-ts/components/FileInput/index.js +2 -0
  182. package/dist-ts/components/FileInput/index.js.map +1 -0
  183. package/dist-ts/components/FlowController/FlowController.d.ts +23 -0
  184. package/dist-ts/components/FlowController/FlowController.js +23 -0
  185. package/dist-ts/components/FlowController/FlowController.js.map +1 -0
  186. package/dist-ts/components/FlowController/FlowController.module.scss +47 -0
  187. package/dist-ts/components/FlowController/index.d.ts +1 -0
  188. package/dist-ts/components/FlowController/index.js +2 -0
  189. package/dist-ts/components/FlowController/index.js.map +1 -0
  190. package/dist-ts/components/Form/Form.d.ts +49 -0
  191. package/dist-ts/components/Form/Form.js +69 -0
  192. package/dist-ts/components/Form/Form.js.map +1 -0
  193. package/dist-ts/components/Form/index.d.ts +1 -0
  194. package/dist-ts/components/Form/index.js +2 -0
  195. package/dist-ts/components/Form/index.js.map +1 -0
  196. package/dist-ts/components/Form/v2/Form.d.ts +18 -0
  197. package/dist-ts/components/Form/v2/Form.hook.d.ts +40 -0
  198. package/dist-ts/components/Form/v2/Form.hook.js +222 -0
  199. package/dist-ts/components/Form/v2/Form.hook.js.map +1 -0
  200. package/dist-ts/components/Form/v2/Form.js +31 -0
  201. package/dist-ts/components/Form/v2/Form.js.map +1 -0
  202. package/dist-ts/components/Form/v2/Form.module.scss +0 -0
  203. package/dist-ts/components/Form/v2/Form.types.d.ts +97 -0
  204. package/dist-ts/components/Form/v2/Form.types.js +51 -0
  205. package/dist-ts/components/Form/v2/Form.types.js.map +1 -0
  206. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/DateField.d.ts +11 -0
  207. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/DateField.js +38 -0
  208. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/DateField.js.map +1 -0
  209. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/DateField.module.scss +0 -0
  210. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/index.d.ts +1 -0
  211. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/index.js +2 -0
  212. package/dist-ts/components/Form/v2/FormField/Extensions/DateField/index.js.map +1 -0
  213. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.d.ts +9 -0
  214. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.js +57 -0
  215. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.js.map +1 -0
  216. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.module.scss +0 -0
  217. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/index.d.ts +1 -0
  218. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/index.js +2 -0
  219. package/dist-ts/components/Form/v2/FormField/Extensions/PhoneField/index.js.map +1 -0
  220. package/dist-ts/components/Form/v2/FormField/FormField.d.ts +5 -0
  221. package/dist-ts/components/Form/v2/FormField/FormField.js +133 -0
  222. package/dist-ts/components/Form/v2/FormField/FormField.js.map +1 -0
  223. package/dist-ts/components/Form/v2/FormField/FormField.module.scss +0 -0
  224. package/dist-ts/components/Form/v2/FormField/FormField.types.d.ts +90 -0
  225. package/dist-ts/components/Form/v2/FormField/FormField.types.js +6 -0
  226. package/dist-ts/components/Form/v2/FormField/FormField.types.js.map +1 -0
  227. package/dist-ts/components/Form/v2/FormField/index.d.ts +1 -0
  228. package/dist-ts/components/Form/v2/FormField/index.js +2 -0
  229. package/dist-ts/components/Form/v2/FormField/index.js.map +1 -0
  230. package/dist-ts/components/Form/v2/index.d.ts +1 -0
  231. package/dist-ts/components/Form/v2/index.js +2 -0
  232. package/dist-ts/components/Form/v2/index.js.map +1 -0
  233. package/dist-ts/components/Freeze/Freeze.d.ts +5 -0
  234. package/dist-ts/components/Freeze/Freeze.js +8 -0
  235. package/dist-ts/components/Freeze/Freeze.js.map +1 -0
  236. package/dist-ts/components/Freeze/index.d.ts +1 -0
  237. package/dist-ts/components/Freeze/index.js +2 -0
  238. package/dist-ts/components/Freeze/index.js.map +1 -0
  239. package/dist-ts/components/HSForms/HSForms.d.ts +8 -0
  240. package/dist-ts/components/HSForms/HSForms.js +46 -0
  241. package/dist-ts/components/HSForms/HSForms.js.map +1 -0
  242. package/dist-ts/components/HSForms/index.d.ts +1 -0
  243. package/dist-ts/components/HSForms/index.js +2 -0
  244. package/dist-ts/components/HSForms/index.js.map +1 -0
  245. package/dist-ts/components/Header/Header.d.ts +25 -0
  246. package/dist-ts/components/Header/Header.js +35 -0
  247. package/dist-ts/components/Header/Header.js.map +1 -0
  248. package/dist-ts/components/Header/Header.module.scss +119 -0
  249. package/dist-ts/components/Header/index.d.ts +1 -0
  250. package/dist-ts/components/Header/index.js +2 -0
  251. package/dist-ts/components/Header/index.js.map +1 -0
  252. package/dist-ts/components/HeaderCloseBtn/HeaderCloseBtn.d.ts +8 -0
  253. package/dist-ts/components/HeaderCloseBtn/HeaderCloseBtn.js +9 -0
  254. package/dist-ts/components/HeaderCloseBtn/HeaderCloseBtn.js.map +1 -0
  255. package/dist-ts/components/HeaderCloseBtn/HeaderCloseBtn.module.scss +44 -0
  256. package/dist-ts/components/HeaderCloseBtn/index.d.ts +1 -0
  257. package/dist-ts/components/HeaderCloseBtn/index.js +2 -0
  258. package/dist-ts/components/HeaderCloseBtn/index.js.map +1 -0
  259. package/dist-ts/components/InfinityScroll/InfinityScroll.d.ts +21 -0
  260. package/dist-ts/components/InfinityScroll/InfinityScroll.js +102 -0
  261. package/dist-ts/components/InfinityScroll/InfinityScroll.js.map +1 -0
  262. package/dist-ts/components/InfinityScroll/InfinityScroll.module.scss +30 -0
  263. package/dist-ts/components/InfinityScroll/index.d.ts +1 -0
  264. package/dist-ts/components/InfinityScroll/index.js +2 -0
  265. package/dist-ts/components/InfinityScroll/index.js.map +1 -0
  266. package/dist-ts/components/Input/Input.d.ts +43 -0
  267. package/dist-ts/components/Input/Input.js +51 -0
  268. package/dist-ts/components/Input/Input.js.map +1 -0
  269. package/dist-ts/components/Input/Input.module.scss +71 -0
  270. package/dist-ts/components/Input/index.d.ts +1 -0
  271. package/dist-ts/components/Input/index.js +2 -0
  272. package/dist-ts/components/Input/index.js.map +1 -0
  273. package/dist-ts/components/InstantCounter/InstantCounter.d.ts +16 -0
  274. package/dist-ts/components/InstantCounter/InstantCounter.js +35 -0
  275. package/dist-ts/components/InstantCounter/InstantCounter.js.map +1 -0
  276. package/dist-ts/components/InstantCounter/index.d.ts +1 -0
  277. package/dist-ts/components/InstantCounter/index.js +2 -0
  278. package/dist-ts/components/InstantCounter/index.js.map +1 -0
  279. package/dist-ts/components/LavaLamp/LavaLamp.d.ts +12 -0
  280. package/dist-ts/components/LavaLamp/LavaLamp.data.d.ts +16 -0
  281. package/dist-ts/components/LavaLamp/LavaLamp.data.js +85 -0
  282. package/dist-ts/components/LavaLamp/LavaLamp.data.js.map +1 -0
  283. package/dist-ts/components/LavaLamp/LavaLamp.js +32 -0
  284. package/dist-ts/components/LavaLamp/LavaLamp.js.map +1 -0
  285. package/dist-ts/components/LavaLamp/LavaLamp.module.scss +26 -0
  286. package/dist-ts/components/LavaLamp/index.d.ts +1 -0
  287. package/dist-ts/components/LavaLamp/index.js +2 -0
  288. package/dist-ts/components/LavaLamp/index.js.map +1 -0
  289. package/dist-ts/components/LavaLamp/v2/LavaLamp.d.ts +4 -0
  290. package/dist-ts/components/LavaLamp/v2/LavaLamp.js +132 -0
  291. package/dist-ts/components/LavaLamp/v2/LavaLamp.js.map +1 -0
  292. package/dist-ts/components/LavaLamp/v2/LavaLamp.module.scss +23 -0
  293. package/dist-ts/components/LinkToId/LinkToId.d.ts +10 -0
  294. package/dist-ts/components/LinkToId/LinkToId.js +25 -0
  295. package/dist-ts/components/LinkToId/LinkToId.js.map +1 -0
  296. package/dist-ts/components/LinkToId/LinkToId.module.scss +4 -0
  297. package/dist-ts/components/LinkToId/index.d.ts +1 -0
  298. package/dist-ts/components/LinkToId/index.js +2 -0
  299. package/dist-ts/components/LinkToId/index.js.map +1 -0
  300. package/dist-ts/components/Loader/Loader.d.ts +7 -0
  301. package/dist-ts/components/Loader/Loader.js +9 -0
  302. package/dist-ts/components/Loader/Loader.js.map +1 -0
  303. package/dist-ts/components/Loader/Loader.module.scss +40 -0
  304. package/dist-ts/components/Loader/index.d.ts +1 -0
  305. package/dist-ts/components/Loader/index.js +2 -0
  306. package/dist-ts/components/Loader/index.js.map +1 -0
  307. package/dist-ts/components/LoaderDotsIndicator/LoaderDotsIndicator.d.ts +8 -0
  308. package/dist-ts/components/LoaderDotsIndicator/LoaderDotsIndicator.js +17 -0
  309. package/dist-ts/components/LoaderDotsIndicator/LoaderDotsIndicator.js.map +1 -0
  310. package/dist-ts/components/LoaderDotsIndicator/index.d.ts +1 -0
  311. package/dist-ts/components/LoaderDotsIndicator/index.js +2 -0
  312. package/dist-ts/components/LoaderDotsIndicator/index.js.map +1 -0
  313. package/dist-ts/components/LoopableVideo/LoopableVideo.d.ts +9 -0
  314. package/dist-ts/components/LoopableVideo/LoopableVideo.js +15 -0
  315. package/dist-ts/components/LoopableVideo/LoopableVideo.js.map +1 -0
  316. package/dist-ts/components/LoopableVideo/index.d.ts +1 -0
  317. package/dist-ts/components/LoopableVideo/index.js +2 -0
  318. package/dist-ts/components/LoopableVideo/index.js.map +1 -0
  319. package/dist-ts/components/MainGrid/MainGrid.d.ts +13 -0
  320. package/dist-ts/components/MainGrid/MainGrid.js +23 -0
  321. package/dist-ts/components/MainGrid/MainGrid.js.map +1 -0
  322. package/dist-ts/components/MainGrid/MainGrid.module.scss +28 -0
  323. package/dist-ts/components/MainGrid/index.d.ts +1 -0
  324. package/dist-ts/components/MainGrid/index.js +2 -0
  325. package/dist-ts/components/MainGrid/index.js.map +1 -0
  326. package/dist-ts/components/MutableHamburgerButton/MutableHamburgerButton.d.ts +8 -0
  327. package/dist-ts/components/MutableHamburgerButton/MutableHamburgerButton.js +10 -0
  328. package/dist-ts/components/MutableHamburgerButton/MutableHamburgerButton.js.map +1 -0
  329. package/dist-ts/components/MutableHamburgerButton/MutableHamburgerButton.module.scss +220 -0
  330. package/dist-ts/components/MutableHamburgerButton/index.d.ts +1 -0
  331. package/dist-ts/components/MutableHamburgerButton/index.js +2 -0
  332. package/dist-ts/components/MutableHamburgerButton/index.js.map +1 -0
  333. package/dist-ts/components/Notification/Notification.d.ts +7 -0
  334. package/dist-ts/components/Notification/Notification.js +10 -0
  335. package/dist-ts/components/Notification/Notification.js.map +1 -0
  336. package/dist-ts/components/Notification/Notification.module.scss +25 -0
  337. package/dist-ts/components/Notification/index.d.ts +1 -0
  338. package/dist-ts/components/Notification/index.js +2 -0
  339. package/dist-ts/components/Notification/index.js.map +1 -0
  340. package/dist-ts/components/OrderableList/OrderableList.d.ts +38 -0
  341. package/dist-ts/components/OrderableList/OrderableList.js +407 -0
  342. package/dist-ts/components/OrderableList/OrderableList.js.map +1 -0
  343. package/dist-ts/components/OrderableList/OrderableList.module.scss +98 -0
  344. package/dist-ts/components/OrderableList/index.d.ts +1 -0
  345. package/dist-ts/components/OrderableList/index.js +2 -0
  346. package/dist-ts/components/OrderableList/index.js.map +1 -0
  347. package/dist-ts/components/PaginationIndicator/PaginationIndicator.d.ts +40 -0
  348. package/dist-ts/components/PaginationIndicator/PaginationIndicator.js +206 -0
  349. package/dist-ts/components/PaginationIndicator/PaginationIndicator.js.map +1 -0
  350. package/dist-ts/components/PaginationIndicator/index.d.ts +1 -0
  351. package/dist-ts/components/PaginationIndicator/index.js +2 -0
  352. package/dist-ts/components/PaginationIndicator/index.js.map +1 -0
  353. package/dist-ts/components/Parallax/Parallax.d.ts +18 -0
  354. package/dist-ts/components/Parallax/Parallax.js +132 -0
  355. package/dist-ts/components/Parallax/Parallax.js.map +1 -0
  356. package/dist-ts/components/Parallax/Parallax.module.scss +28 -0
  357. package/dist-ts/components/Parallax/index.d.ts +1 -0
  358. package/dist-ts/components/Parallax/index.js +2 -0
  359. package/dist-ts/components/Parallax/index.js.map +1 -0
  360. package/dist-ts/components/Parallax/math/helpers.d.ts +58 -0
  361. package/dist-ts/components/Parallax/math/helpers.js +222 -0
  362. package/dist-ts/components/Parallax/math/helpers.js.map +1 -0
  363. package/dist-ts/components/PasswordInput/PasswordInput.d.ts +48 -0
  364. package/dist-ts/components/PasswordInput/PasswordInput.js +74 -0
  365. package/dist-ts/components/PasswordInput/PasswordInput.js.map +1 -0
  366. package/dist-ts/components/PasswordInput/PasswordInput.module.scss +17 -0
  367. package/dist-ts/components/PasswordInput/index.d.ts +1 -0
  368. package/dist-ts/components/PasswordInput/index.js +2 -0
  369. package/dist-ts/components/PasswordInput/index.js.map +1 -0
  370. package/dist-ts/components/PingPongText/PingPongText.d.ts +6 -0
  371. package/dist-ts/components/PingPongText/PingPongText.js +58 -0
  372. package/dist-ts/components/PingPongText/PingPongText.js.map +1 -0
  373. package/dist-ts/components/PingPongText/PingPongText.module.scss +4 -0
  374. package/dist-ts/components/PingPongText/index.d.ts +1 -0
  375. package/dist-ts/components/PingPongText/index.js +2 -0
  376. package/dist-ts/components/PingPongText/index.js.map +1 -0
  377. package/dist-ts/components/PixelatedScan/PixelatedScan.d.ts +8 -0
  378. package/dist-ts/components/PixelatedScan/PixelatedScan.js +78 -0
  379. package/dist-ts/components/PixelatedScan/PixelatedScan.js.map +1 -0
  380. package/dist-ts/components/PixelatedScan/PixelatedScan.module.scss +86 -0
  381. package/dist-ts/components/PixelatedScan/index.d.ts +1 -0
  382. package/dist-ts/components/PixelatedScan/index.js +2 -0
  383. package/dist-ts/components/PixelatedScan/index.js.map +1 -0
  384. package/dist-ts/components/Portal/Portal.d.ts +11 -0
  385. package/dist-ts/components/Portal/Portal.js +31 -0
  386. package/dist-ts/components/Portal/Portal.js.map +1 -0
  387. package/dist-ts/components/Portal/Portal.module.scss +3 -0
  388. package/dist-ts/components/Portal/index.d.ts +1 -0
  389. package/dist-ts/components/Portal/index.js +2 -0
  390. package/dist-ts/components/Portal/index.js.map +1 -0
  391. package/dist-ts/components/ProgressBar/ProgressBar.d.ts +29 -0
  392. package/dist-ts/components/ProgressBar/ProgressBar.js +33 -0
  393. package/dist-ts/components/ProgressBar/ProgressBar.js.map +1 -0
  394. package/dist-ts/components/ProgressBar/ProgressBar.module.scss +44 -0
  395. package/dist-ts/components/ProgressBar/index.d.ts +1 -0
  396. package/dist-ts/components/ProgressBar/index.js +2 -0
  397. package/dist-ts/components/ProgressBar/index.js.map +1 -0
  398. package/dist-ts/components/ProgressTexts/ProgressTexts.d.ts +25 -0
  399. package/dist-ts/components/ProgressTexts/ProgressTexts.js +28 -0
  400. package/dist-ts/components/ProgressTexts/ProgressTexts.js.map +1 -0
  401. package/dist-ts/components/ProgressTexts/ProgressTexts.module.scss +37 -0
  402. package/dist-ts/components/ProgressTexts/index.d.ts +1 -0
  403. package/dist-ts/components/ProgressTexts/index.js +2 -0
  404. package/dist-ts/components/ProgressTexts/index.js.map +1 -0
  405. package/dist-ts/components/Radio/Radio.d.ts +13 -0
  406. package/dist-ts/components/Radio/Radio.js +14 -0
  407. package/dist-ts/components/Radio/Radio.js.map +1 -0
  408. package/dist-ts/components/Radio/Radio.module.scss +36 -0
  409. package/dist-ts/components/Radio/index.d.ts +1 -0
  410. package/dist-ts/components/Radio/index.js +2 -0
  411. package/dist-ts/components/Radio/index.js.map +1 -0
  412. package/dist-ts/components/SectionContainer/SectionContainer.d.ts +14 -0
  413. package/dist-ts/components/SectionContainer/SectionContainer.js +15 -0
  414. package/dist-ts/components/SectionContainer/SectionContainer.js.map +1 -0
  415. package/dist-ts/components/SectionContainer/SectionContainer.module.scss +30 -0
  416. package/dist-ts/components/SectionContainer/index.d.ts +1 -0
  417. package/dist-ts/components/SectionContainer/index.js +2 -0
  418. package/dist-ts/components/SectionContainer/index.js.map +1 -0
  419. package/dist-ts/components/Select/Select.d.ts +30 -0
  420. package/dist-ts/components/Select/Select.js +65 -0
  421. package/dist-ts/components/Select/Select.js.map +1 -0
  422. package/dist-ts/components/Select/Select.module.scss +58 -0
  423. package/dist-ts/components/Select/index.d.ts +1 -0
  424. package/dist-ts/components/Select/index.js +2 -0
  425. package/dist-ts/components/Select/index.js.map +1 -0
  426. package/dist-ts/components/Skeleton/Skeleton.d.ts +10 -0
  427. package/dist-ts/components/Skeleton/Skeleton.js +16 -0
  428. package/dist-ts/components/Skeleton/Skeleton.js.map +1 -0
  429. package/dist-ts/components/Skeleton/Skeleton.module.scss +21 -0
  430. package/dist-ts/components/Skeleton/index.d.ts +1 -0
  431. package/dist-ts/components/Skeleton/index.js +2 -0
  432. package/dist-ts/components/Skeleton/index.js.map +1 -0
  433. package/dist-ts/components/Spacing/Spacing.d.ts +6 -0
  434. package/dist-ts/components/Spacing/Spacing.js +16 -0
  435. package/dist-ts/components/Spacing/Spacing.js.map +1 -0
  436. package/dist-ts/components/Spacing/Spacing.module.scss +13 -0
  437. package/dist-ts/components/Spacing/index.d.ts +1 -0
  438. package/dist-ts/components/Spacing/index.js +2 -0
  439. package/dist-ts/components/Spacing/index.js.map +1 -0
  440. package/dist-ts/components/StaticScroller/StaticScroller.d.ts +6 -0
  441. package/dist-ts/components/StaticScroller/StaticScroller.js +50 -0
  442. package/dist-ts/components/StaticScroller/StaticScroller.js.map +1 -0
  443. package/dist-ts/components/StaticScroller/StaticScroller.module.scss +14 -0
  444. package/dist-ts/components/StaticScroller/index.d.ts +1 -0
  445. package/dist-ts/components/StaticScroller/index.js +2 -0
  446. package/dist-ts/components/StaticScroller/index.js.map +1 -0
  447. package/dist-ts/components/Switch/Switch.d.ts +10 -0
  448. package/dist-ts/components/Switch/Switch.js +9 -0
  449. package/dist-ts/components/Switch/Switch.js.map +1 -0
  450. package/dist-ts/components/Switch/Switch.module.scss +43 -0
  451. package/dist-ts/components/Switch/index.d.ts +1 -0
  452. package/dist-ts/components/Switch/index.js +2 -0
  453. package/dist-ts/components/Switch/index.js.map +1 -0
  454. package/dist-ts/components/Table/Table.d.ts +19 -0
  455. package/dist-ts/components/Table/Table.js +46 -0
  456. package/dist-ts/components/Table/Table.js.map +1 -0
  457. package/dist-ts/components/Table/Table.module.scss +76 -0
  458. package/dist-ts/components/Table/index.d.ts +1 -0
  459. package/dist-ts/components/Table/index.js +2 -0
  460. package/dist-ts/components/Table/index.js.map +1 -0
  461. package/dist-ts/components/Tabs/Tabs.d.ts +27 -0
  462. package/dist-ts/components/Tabs/Tabs.js +52 -0
  463. package/dist-ts/components/Tabs/Tabs.js.map +1 -0
  464. package/dist-ts/components/Tabs/Tabs.module.scss +40 -0
  465. package/dist-ts/components/Tabs/index.d.ts +1 -0
  466. package/dist-ts/components/Tabs/index.js +2 -0
  467. package/dist-ts/components/Tabs/index.js.map +1 -0
  468. package/dist-ts/components/Text/Text.d.ts +17 -0
  469. package/dist-ts/components/Text/Text.js +16 -0
  470. package/dist-ts/components/Text/Text.js.map +1 -0
  471. package/dist-ts/components/Text/Text.module.scss +81 -0
  472. package/dist-ts/components/Text/index.d.ts +1 -0
  473. package/dist-ts/components/Text/index.js +2 -0
  474. package/dist-ts/components/Text/index.js.map +1 -0
  475. package/dist-ts/components/Transition/MasksFactory/DiagonalReveal.d.ts +1 -0
  476. package/dist-ts/components/Transition/MasksFactory/DiagonalReveal.js +12 -0
  477. package/dist-ts/components/Transition/MasksFactory/DiagonalReveal.js.map +1 -0
  478. package/dist-ts/components/Transition/MasksFactory/DiagonalSquareToBalls.d.ts +5 -0
  479. package/dist-ts/components/Transition/MasksFactory/DiagonalSquareToBalls.js +30 -0
  480. package/dist-ts/components/Transition/MasksFactory/DiagonalSquareToBalls.js.map +1 -0
  481. package/dist-ts/components/Transition/MasksFactory/PhysicsSquares.d.ts +7 -0
  482. package/dist-ts/components/Transition/MasksFactory/PhysicsSquares.js +80 -0
  483. package/dist-ts/components/Transition/MasksFactory/PhysicsSquares.js.map +1 -0
  484. package/dist-ts/components/Transition/MasksFactory/SquareToBalls.d.ts +5 -0
  485. package/dist-ts/components/Transition/MasksFactory/SquareToBalls.js +22 -0
  486. package/dist-ts/components/Transition/MasksFactory/SquareToBalls.js.map +1 -0
  487. package/dist-ts/components/Transition/MasksFactory/utils.d.ts +8 -0
  488. package/dist-ts/components/Transition/MasksFactory/utils.js +27 -0
  489. package/dist-ts/components/Transition/MasksFactory/utils.js.map +1 -0
  490. package/dist-ts/components/Transition/Transition.d.ts +106 -0
  491. package/dist-ts/components/Transition/Transition.js +292 -0
  492. package/dist-ts/components/Transition/Transition.js.map +1 -0
  493. package/dist-ts/components/Transition/Transition.module.scss +211 -0
  494. package/dist-ts/components/Transition/index.d.ts +1 -0
  495. package/dist-ts/components/Transition/index.js +2 -0
  496. package/dist-ts/components/Transition/index.js.map +1 -0
  497. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.ai.md +9 -0
  498. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.d.ts +17 -0
  499. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.js +70 -0
  500. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.js.map +1 -0
  501. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.sample.d.ts +1 -0
  502. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.sample.js +18 -0
  503. package/dist-ts/components/UncontrolledTransition/UncontrolledTransition.sample.js.map +1 -0
  504. package/dist-ts/components/UncontrolledTransition/index.d.ts +2 -0
  505. package/dist-ts/components/UncontrolledTransition/index.js +3 -0
  506. package/dist-ts/components/UncontrolledTransition/index.js.map +1 -0
  507. package/dist-ts/components/WalletConnectionWrapper/WalletConnectionWrapper.d.ts +55 -0
  508. package/dist-ts/components/WalletConnectionWrapper/WalletConnectionWrapper.js +91 -0
  509. package/dist-ts/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +1 -0
  510. package/dist-ts/components/WalletConnectionWrapper/index.d.ts +1 -0
  511. package/dist-ts/components/WalletConnectionWrapper/index.js +2 -0
  512. package/dist-ts/components/WalletConnectionWrapper/index.js.map +1 -0
  513. package/dist-ts/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.d.ts +7 -0
  514. package/dist-ts/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +43 -0
  515. package/dist-ts/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js.map +1 -0
  516. package/dist-ts/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.module.scss +5 -0
  517. package/dist-ts/components/utilitary/ScrollAndFocusLock/index.d.ts +1 -0
  518. package/dist-ts/components/utilitary/ScrollAndFocusLock/index.js +2 -0
  519. package/dist-ts/components/utilitary/ScrollAndFocusLock/index.js.map +1 -0
  520. package/dist-ts/context/AsyncProcess.d.ts +20 -0
  521. package/dist-ts/context/AsyncProcess.js +43 -0
  522. package/dist-ts/context/AsyncProcess.js.map +1 -0
  523. package/dist-ts/context/ContextAsyncControl.d.ts +24 -0
  524. package/dist-ts/context/ContextAsyncControl.js +50 -0
  525. package/dist-ts/context/ContextAsyncControl.js.map +1 -0
  526. package/dist-ts/context/CustomBrowserRouter.d.ts +13 -0
  527. package/dist-ts/context/CustomBrowserRouter.js +29 -0
  528. package/dist-ts/context/CustomBrowserRouter.js.map +1 -0
  529. package/dist-ts/context/OneUIProvider.d.ts +154 -0
  530. package/dist-ts/context/OneUIProvider.js +113 -0
  531. package/dist-ts/context/OneUIProvider.js.map +1 -0
  532. package/dist-ts/hooks/logs/useDependencyChangeDetection.d.ts +1 -0
  533. package/dist-ts/hooks/logs/useDependencyChangeDetection.js +16 -0
  534. package/dist-ts/hooks/logs/useDependencyChangeDetection.js.map +1 -0
  535. package/dist-ts/hooks/logs/useIsMounting.d.ts +1 -0
  536. package/dist-ts/hooks/logs/useIsMounting.js +7 -0
  537. package/dist-ts/hooks/logs/useIsMounting.js.map +1 -0
  538. package/dist-ts/hooks/persistence/useLocalStorage.d.ts +2 -0
  539. package/dist-ts/hooks/persistence/useLocalStorage.js +44 -0
  540. package/dist-ts/hooks/persistence/useLocalStorage.js.map +1 -0
  541. package/dist-ts/hooks/shims/ObjectWatchShim.d.ts +1 -0
  542. package/dist-ts/hooks/shims/ObjectWatchShim.js +52 -0
  543. package/dist-ts/hooks/shims/ObjectWatchShim.js.map +1 -0
  544. package/dist-ts/hooks/ui/useAdaptiveImage.d.ts +7 -0
  545. package/dist-ts/hooks/ui/useAdaptiveImage.js +36 -0
  546. package/dist-ts/hooks/ui/useAdaptiveImage.js.map +1 -0
  547. package/dist-ts/hooks/ui/useAlternating.d.ts +4 -0
  548. package/dist-ts/hooks/ui/useAlternating.js +21 -0
  549. package/dist-ts/hooks/ui/useAlternating.js.map +1 -0
  550. package/dist-ts/hooks/ui/useBreakpoint.d.ts +5 -0
  551. package/dist-ts/hooks/ui/useBreakpoint.js +19 -0
  552. package/dist-ts/hooks/ui/useBreakpoint.js.map +1 -0
  553. package/dist-ts/hooks/ui/useCustomScrollbar.d.ts +8 -0
  554. package/dist-ts/hooks/ui/useCustomScrollbar.js +17 -0
  555. package/dist-ts/hooks/ui/useCustomScrollbar.js.map +1 -0
  556. package/dist-ts/hooks/ui/useCustomScrollbar.module.scss +20 -0
  557. package/dist-ts/hooks/ui/useEffectIf.d.ts +2 -0
  558. package/dist-ts/hooks/ui/useEffectIf.js +9 -0
  559. package/dist-ts/hooks/ui/useEffectIf.js.map +1 -0
  560. package/dist-ts/hooks/ui/useMouseHover.d.ts +11 -0
  561. package/dist-ts/hooks/ui/useMouseHover.js +22 -0
  562. package/dist-ts/hooks/ui/useMouseHover.js.map +1 -0
  563. package/dist-ts/hooks/ui/usePaginationControls.d.ts +14 -0
  564. package/dist-ts/hooks/ui/usePaginationControls.js +122 -0
  565. package/dist-ts/hooks/ui/usePaginationControls.js.map +1 -0
  566. package/dist-ts/hooks/ui/usePaginationControls.module.scss +16 -0
  567. package/dist-ts/hooks/ui/useSnapToViewport.d.ts +5 -0
  568. package/dist-ts/hooks/ui/useSnapToViewport.js +19 -0
  569. package/dist-ts/hooks/ui/useSnapToViewport.js.map +1 -0
  570. package/dist-ts/hooks/ui/useSnapToViewport.module.scss +6 -0
  571. package/dist-ts/hooks/ui/useTilt.d.ts +46 -0
  572. package/dist-ts/hooks/ui/useTilt.js +131 -0
  573. package/dist-ts/hooks/ui/useTilt.js.map +1 -0
  574. package/dist-ts/hooks/ui/useZoomable.d.ts +6 -0
  575. package/dist-ts/hooks/ui/useZoomable.js +122 -0
  576. package/dist-ts/hooks/ui/useZoomable.js.map +1 -0
  577. package/dist-ts/hooks/ui/useZoomable.module.scss +34 -0
  578. package/dist-ts/hooks/useAsyncControl.ai.md +25 -0
  579. package/dist-ts/hooks/useAsyncControl.d.ts +32 -0
  580. package/dist-ts/hooks/useAsyncControl.js +67 -0
  581. package/dist-ts/hooks/useAsyncControl.js.map +1 -0
  582. package/dist-ts/hooks/useContainedRepositioning.d.ts +15 -0
  583. package/dist-ts/hooks/useContainedRepositioning.js +73 -0
  584. package/dist-ts/hooks/useContainedRepositioning.js.map +1 -0
  585. package/dist-ts/hooks/useCustomHistory.d.ts +14 -0
  586. package/dist-ts/hooks/useCustomHistory.js +15 -0
  587. package/dist-ts/hooks/useCustomHistory.js.map +1 -0
  588. package/dist-ts/hooks/useElementFit.d.ts +18 -0
  589. package/dist-ts/hooks/useElementFit.js +57 -0
  590. package/dist-ts/hooks/useElementFit.js.map +1 -0
  591. package/dist-ts/hooks/useFirestoreWatch.d.ts +12 -0
  592. package/dist-ts/hooks/useFirestoreWatch.js +42 -0
  593. package/dist-ts/hooks/useFirestoreWatch.js.map +1 -0
  594. package/dist-ts/hooks/useForm.d.ts +16 -0
  595. package/dist-ts/hooks/useForm.js +27 -0
  596. package/dist-ts/hooks/useForm.js.map +1 -0
  597. package/dist-ts/hooks/useFreeze.d.ts +5 -0
  598. package/dist-ts/hooks/useFreeze.js +12 -0
  599. package/dist-ts/hooks/useFreeze.js.map +1 -0
  600. package/dist-ts/hooks/useHero.d.ts +68 -0
  601. package/dist-ts/hooks/useHero.js +287 -0
  602. package/dist-ts/hooks/useHero.js.map +1 -0
  603. package/dist-ts/hooks/useHero.module.scss +41 -0
  604. package/dist-ts/hooks/useIntersection.d.ts +4 -0
  605. package/dist-ts/hooks/useIntersection.js +27 -0
  606. package/dist-ts/hooks/useIntersection.js.map +1 -0
  607. package/dist-ts/hooks/useMergeRefs.d.ts +9 -0
  608. package/dist-ts/hooks/useMergeRefs.js +26 -0
  609. package/dist-ts/hooks/useMergeRefs.js.map +1 -0
  610. package/dist-ts/hooks/useObserve.d.ts +2 -0
  611. package/dist-ts/hooks/useObserve.js +15 -0
  612. package/dist-ts/hooks/useObserve.js.map +1 -0
  613. package/dist-ts/hooks/usePagination.d.ts +52 -0
  614. package/dist-ts/hooks/usePagination.js +147 -0
  615. package/dist-ts/hooks/usePagination.js.map +1 -0
  616. package/dist-ts/hooks/usePooledOperation.d.ts +15 -0
  617. package/dist-ts/hooks/usePooledOperation.js +49 -0
  618. package/dist-ts/hooks/usePooledOperation.js.map +1 -0
  619. package/dist-ts/hooks/usePooling.d.ts +17 -0
  620. package/dist-ts/hooks/usePooling.js +38 -0
  621. package/dist-ts/hooks/usePooling.js.map +1 -0
  622. package/dist-ts/hooks/useRebound.d.ts +9 -0
  623. package/dist-ts/hooks/useRebound.js +21 -0
  624. package/dist-ts/hooks/useRebound.js.map +1 -0
  625. package/dist-ts/hooks/useShortIntl.ai.md +5 -0
  626. package/dist-ts/hooks/useShortIntl.d.ts +16 -0
  627. package/dist-ts/hooks/useShortIntl.js +62 -0
  628. package/dist-ts/hooks/useShortIntl.js.map +1 -0
  629. package/dist-ts/hooks/utility/useAsyncMemo.d.ts +13 -0
  630. package/dist-ts/hooks/utility/useAsyncMemo.js +31 -0
  631. package/dist-ts/hooks/utility/useAsyncMemo.js.map +1 -0
  632. package/dist-ts/hooks/utility/useDepChange.d.ts +1 -0
  633. package/dist-ts/hooks/utility/useDepChange.js +12 -0
  634. package/dist-ts/hooks/utility/useDepChange.js.map +1 -0
  635. package/dist-ts/hooks/utility/useEvents.d.ts +9 -0
  636. package/dist-ts/hooks/utility/useEvents.js +25 -0
  637. package/dist-ts/hooks/utility/useEvents.js.map +1 -0
  638. package/dist-ts/hooks/utility/useImmediate.d.ts +4 -0
  639. package/dist-ts/hooks/utility/useImmediate.js +8 -0
  640. package/dist-ts/hooks/utility/useImmediate.js.map +1 -0
  641. package/dist-ts/hooks/utility/useManualInit.d.ts +4 -0
  642. package/dist-ts/hooks/utility/useManualInit.js +17 -0
  643. package/dist-ts/hooks/utility/useManualInit.js.map +1 -0
  644. package/dist-ts/hooks/utility/useModule.d.ts +4 -0
  645. package/dist-ts/hooks/utility/useModule.js +12 -0
  646. package/dist-ts/hooks/utility/useModule.js.map +1 -0
  647. package/dist-ts/hooks/utility/useQuery.d.ts +7 -0
  648. package/dist-ts/hooks/utility/useQuery.js +11 -0
  649. package/dist-ts/hooks/utility/useQuery.js.map +1 -0
  650. package/dist-ts/hooks/utility/useUniqueEffect.d.ts +1 -0
  651. package/dist-ts/hooks/utility/useUniqueEffect.js +17 -0
  652. package/dist-ts/hooks/utility/useUniqueEffect.js.map +1 -0
  653. package/dist-ts/index.d.ts +3 -0
  654. package/dist-ts/index.js +4 -0
  655. package/dist-ts/index.js.map +1 -0
  656. package/dist-ts/models/DebugLogger.d.ts +1 -0
  657. package/dist-ts/models/DebugLogger.js +7 -0
  658. package/dist-ts/models/DebugLogger.js.map +1 -0
  659. package/dist-ts/models/GenericContract.d.ts +79 -0
  660. package/dist-ts/models/GenericContract.js +14 -0
  661. package/dist-ts/models/GenericContract.js.map +1 -0
  662. package/dist-ts/models/Orbs.d.ts +35 -0
  663. package/dist-ts/models/Orbs.js +61 -0
  664. package/dist-ts/models/Orbs.js.map +1 -0
  665. package/dist-ts/storybook/assets/video/txt-reversed.mp4 +0 -0
  666. package/dist-ts/storybookUtils/index.d.ts +5 -0
  667. package/dist-ts/storybookUtils/index.js +33 -0
  668. package/dist-ts/storybookUtils/index.js.map +1 -0
  669. package/dist-ts/type-utils.d.ts +49 -0
  670. package/dist-ts/type-utils.js +2 -0
  671. package/dist-ts/type-utils.js.map +1 -0
  672. package/dist-ts/types.d.ts +79 -0
  673. package/dist-ts/types.js +2 -0
  674. package/dist-ts/types.js.map +1 -0
  675. package/dist-ts/utils/blockchain.d.ts +4 -0
  676. package/dist-ts/utils/blockchain.js +39 -0
  677. package/dist-ts/utils/blockchain.js.map +1 -0
  678. package/dist-ts/utils/e2e.d.ts +13 -0
  679. package/dist-ts/utils/e2e.js +25 -0
  680. package/dist-ts/utils/e2e.js.map +1 -0
  681. package/dist-ts/utils/flatten.d.ts +4 -0
  682. package/dist-ts/utils/flatten.js +11 -0
  683. package/dist-ts/utils/flatten.js.map +1 -0
  684. package/dist-ts/utils/formatters.d.ts +17 -0
  685. package/dist-ts/utils/formatters.js +33 -0
  686. package/dist-ts/utils/formatters.js.map +1 -0
  687. package/dist-ts/utils/html.utils.d.ts +1 -0
  688. package/dist-ts/utils/html.utils.js +4 -0
  689. package/dist-ts/utils/html.utils.js.map +1 -0
  690. package/dist-ts/utils/ownEvent.d.ts +4 -0
  691. package/dist-ts/utils/ownEvent.js +10 -0
  692. package/dist-ts/utils/ownEvent.js.map +1 -0
  693. package/dist-ts/utils/test.d.ts +5 -0
  694. package/dist-ts/utils/test.js +11 -0
  695. package/dist-ts/utils/test.js.map +1 -0
  696. package/package.json +5 -3
  697. package/src/utils/e2e.ts +52 -0
  698. package/tsconfig.prod.json +55 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.hook.js","sourceRoot":"","sources":["../../../../src/components/Form/v2/Form.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAEL,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAML,QAAQ,GACT,MAAM,6BAA6B,CAAC;AAIrC,MAAM,UAAU,cAAc,CAC5B,cAAiB,EACjB,IAAc;IAEd,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAI,GAAG,EAAE;QAC7C,MAAM,KAAK,GAAG;YACZ,GAAG,cAAc;SAClB,CAAC;QACF,IAAI,IAAI,KAAK,QAA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;QACL,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { forwardRef, useEffect, useImperativeHandle, } from "react";
3
+ import { FormMode } from "./Form.types";
4
+ import { useFieldErrors, useForm } from "./Form.hook";
5
+ import FormField from "./FormField";
6
+ function Form({ questions, initialAnswers = {}, ...props }, ref) {
7
+ const { mode = FormMode.WRITE } = props;
8
+ const { showAllErrors = false } = props;
9
+ const { answers, onAnswerAction, isQuestionsAnswered, isFilesUploaded } = useForm(questions, initialAnswers, mode);
10
+ const errors = useFieldErrors(questions, answers, showAllErrors);
11
+ useEffect(() => {
12
+ if (props.mode !== FormMode.READ_ONLY)
13
+ props.onFormUpdate(answers, isQuestionsAnswered && isFilesUploaded);
14
+ }, [answers, isQuestionsAnswered, isFilesUploaded]);
15
+ useImperativeHandle(ref, () => ({
16
+ setAnswer(id, val) {
17
+ onAnswerAction(questions.find((q) => q.id === id).type, id, val);
18
+ },
19
+ }), []);
20
+ return (_jsx(_Fragment, { children: questions.map((q) => (_jsx(FormField, { config: q, onAnswer: onAnswerAction, value: answers[q.id], error: errors[q.id], mode: mode }, q.id))) }));
21
+ }
22
+ /**
23
+ * Brainstorm:
24
+ * The answers must be externalized in some way because those answers will be manipulated
25
+ * There must be a way to disable non validation related errors
26
+ */
27
+ /**
28
+ * A new and improved version of the one-ui design form
29
+ **/
30
+ export default forwardRef(Form);
31
+ //# sourceMappingURL=Form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/components/Form/v2/Form.tsx"],"names":[],"mappings":";AAAA,OAAc,EAEZ,UAAU,EACV,SAAS,EACT,mBAAmB,GACpB,MAAM,OAAO,CAAC;AACf,OAAO,EAAgB,QAAQ,EAAiB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,OAA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AAK,EAAG,MAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5B,IAAI,EAAE,IAAI,IALL,CAAC,CAAC,EAAE,CAMT,CACH,CAAC,GACD,CACJ,CAAC;AACJ,CAAC;AAED;;;;GAIG;AAEH;;IAEI;AACJ,eAAe,UAAU,CAAC,IAAI,CAAC,CAAC"}
File without changes
@@ -0,0 +1,97 @@
1
+ import { AnswerByField, FormField } from "./FormField/FormField.types";
2
+ export type BaseQuestion = {
3
+ id: string;
4
+ type: FormField["type"];
5
+ };
6
+ export type FormState<Q extends BaseQuestion[] = []> = [
7
+ answers: AnswersMap<Q>,
8
+ isValid: boolean
9
+ ];
10
+ export declare enum DataStatus {
11
+ /** Form is empty */
12
+ PENDING = 0,
13
+ /** Form is partially filled */
14
+ INCOMPLETE = 1,
15
+ /** Form is completed */
16
+ COMPLETE = 2,
17
+ /** Form has error */
18
+ ERROR = 3
19
+ }
20
+ export declare enum StepStatus {
21
+ /** When the data is empty and needs to be filled */
22
+ INCOMPLETE = 0,
23
+ /** When data has already been filled */
24
+ COMPLETED = 1,
25
+ /** When the step is the current selected */
26
+ CURRENT = 2,
27
+ /** When the step has error */
28
+ ERROR = 3
29
+ }
30
+ export declare enum FormStep {
31
+ PERSONAL_DATA = 0,
32
+ ADDITIONAL_DATA = 1,
33
+ DOCUMENTS = 2,
34
+ INVEST_PROFILE = 3,
35
+ CONTRACTS = 4
36
+ }
37
+ export declare enum FormMode {
38
+ READ_ONLY = 0,
39
+ WRITE = 1
40
+ }
41
+ export type FormFieldView = FormField & {
42
+ title: string;
43
+ };
44
+ export type FormProps = {
45
+ onFormSubmitted: () => void;
46
+ savedAnswers: Partial<{
47
+ [questionId: string]: AnswerByField<FormField>;
48
+ }>;
49
+ startAt: FormStep;
50
+ onGoBack: () => void;
51
+ };
52
+ export type StepFormProps = Pick<FormProps, "savedAnswers"> & {
53
+ step: FormStep;
54
+ } & ModeProps;
55
+ export type ModeProps = {
56
+ mode: FormMode.READ_ONLY;
57
+ } | {
58
+ mode: FormMode.WRITE;
59
+ onFinish: () => void;
60
+ onCancel: () => void;
61
+ };
62
+ export type FormViewProps<Q extends BaseQuestion[]> = {
63
+ questions: Q;
64
+ } & ({
65
+ mode?: FormMode.WRITE;
66
+ initialAnswers?: AnswersMap;
67
+ onFormUpdate: (...args: FormState<Q>) => void;
68
+ /** When provided (true) show all current errors that are blocking the completion of the form */
69
+ showAllErrors?: boolean;
70
+ } | {
71
+ initialAnswers: AnswersMap;
72
+ mode: FormMode.READ_ONLY;
73
+ });
74
+ export type AnswersMap<Q extends Readonly<BaseQuestion[]> = [
75
+ {
76
+ type: BaseQuestion["type"];
77
+ id: string;
78
+ }
79
+ ]> = Partial<{
80
+ [questionId in Q[number]["id"]]: AnswerByField<Q[number] & {
81
+ id: questionId;
82
+ }>;
83
+ }>;
84
+ export declare enum INVESTOR_PROFILE {
85
+ /**
86
+ * User can only spend up to 20k
87
+ */
88
+ RESTRICTED = 0,
89
+ /**
90
+ * User can only spend up to 10% of it's income
91
+ */
92
+ LIMITED = 1,
93
+ /**
94
+ * User doesn't have restrictions
95
+ */
96
+ UNLIMITED = 2
97
+ }
@@ -0,0 +1,51 @@
1
+ export var DataStatus;
2
+ (function (DataStatus) {
3
+ /** Form is empty */
4
+ DataStatus[DataStatus["PENDING"] = 0] = "PENDING";
5
+ /** Form is partially filled */
6
+ DataStatus[DataStatus["INCOMPLETE"] = 1] = "INCOMPLETE";
7
+ /** Form is completed */
8
+ DataStatus[DataStatus["COMPLETE"] = 2] = "COMPLETE";
9
+ /** Form has error */
10
+ DataStatus[DataStatus["ERROR"] = 3] = "ERROR";
11
+ })(DataStatus || (DataStatus = {}));
12
+ export var StepStatus;
13
+ (function (StepStatus) {
14
+ /** When the data is empty and needs to be filled */
15
+ StepStatus[StepStatus["INCOMPLETE"] = 0] = "INCOMPLETE";
16
+ /** When data has already been filled */
17
+ StepStatus[StepStatus["COMPLETED"] = 1] = "COMPLETED";
18
+ /** When the step is the current selected */
19
+ StepStatus[StepStatus["CURRENT"] = 2] = "CURRENT";
20
+ /** When the step has error */
21
+ StepStatus[StepStatus["ERROR"] = 3] = "ERROR";
22
+ })(StepStatus || (StepStatus = {}));
23
+ export var FormStep;
24
+ (function (FormStep) {
25
+ FormStep[FormStep["PERSONAL_DATA"] = 0] = "PERSONAL_DATA";
26
+ FormStep[FormStep["ADDITIONAL_DATA"] = 1] = "ADDITIONAL_DATA";
27
+ FormStep[FormStep["DOCUMENTS"] = 2] = "DOCUMENTS";
28
+ FormStep[FormStep["INVEST_PROFILE"] = 3] = "INVEST_PROFILE";
29
+ FormStep[FormStep["CONTRACTS"] = 4] = "CONTRACTS";
30
+ })(FormStep || (FormStep = {}));
31
+ export var FormMode;
32
+ (function (FormMode) {
33
+ FormMode[FormMode["READ_ONLY"] = 0] = "READ_ONLY";
34
+ FormMode[FormMode["WRITE"] = 1] = "WRITE";
35
+ })(FormMode || (FormMode = {}));
36
+ export var INVESTOR_PROFILE;
37
+ (function (INVESTOR_PROFILE) {
38
+ /**
39
+ * User can only spend up to 20k
40
+ */
41
+ INVESTOR_PROFILE[INVESTOR_PROFILE["RESTRICTED"] = 0] = "RESTRICTED";
42
+ /**
43
+ * User can only spend up to 10% of it's income
44
+ */
45
+ INVESTOR_PROFILE[INVESTOR_PROFILE["LIMITED"] = 1] = "LIMITED";
46
+ /**
47
+ * User doesn't have restrictions
48
+ */
49
+ INVESTOR_PROFILE[INVESTOR_PROFILE["UNLIMITED"] = 2] = "UNLIMITED";
50
+ })(INVESTOR_PROFILE || (INVESTOR_PROFILE = {}));
51
+ //# sourceMappingURL=Form.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.types.js","sourceRoot":"","sources":["../../../../src/components/Form/v2/Form.types.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,oBAAoB;IACpB,iDAAO,CAAA;IACP,+BAA+B;IAC/B,uDAAU,CAAA;IACV,wBAAwB;IACxB,mDAAQ,CAAA;IACR,qBAAqB;IACrB,6CAAK,CAAA;AACP,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAED,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,oDAAoD;IACpD,uDAAU,CAAA;IACV,wCAAwC;IACxC,qDAAS,CAAA;IACT,4CAA4C;IAC5C,iDAAO,CAAA;IACP,8BAA8B;IAC9B,6CAAK,CAAA;AACP,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAED,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,yDAAa,CAAA;IACb,6DAAe,CAAA;IACf,iDAAS,CAAA;IACT,2DAAc,CAAA;IACd,iDAAS,CAAA;AACX,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,iDAAS,CAAA;IACT,yCAAK,CAAA;AACP,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAuDD,MAAM,CAAN,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,mEAAU,CAAA;IACV;;OAEG;IACH,6DAAO,CAAA;IACP;;OAEG;IACH,iEAAS,CAAA;AACX,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B"}
@@ -0,0 +1,11 @@
1
+ import { AnswerByField, GenericFormFieldProps } from "../../FormField.types";
2
+ /**
3
+ * Allows inputing a date
4
+ **/
5
+ export default function dateFieldFactory(dateFormat: string): ({ onAnswer, question, value, error, }: GenericFormFieldProps<"date">) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const dateFieldValidatorFactory: (invalidDateLabel: string, requiredFieldLabel: string) => (answer: AnswerByField<{
7
+ type: "date";
8
+ }>) => {
9
+ isValid: any;
10
+ error: any;
11
+ };
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import InputMask from "react-input-mask";
3
+ import Text from "../../../../../Text";
4
+ import { useOneUIConfig } from "../../../../../../context/OneUIProvider";
5
+ import Input from "../../../../../Input";
6
+ import { isValidated } from "../../../Form.hook";
7
+ /**
8
+ * Allows inputing a date
9
+ **/
10
+ export default function dateFieldFactory(dateFormat) {
11
+ return function DateField({ onAnswer, question, value, error, }) {
12
+ const { titleVariant } = useOneUIConfig("component.form");
13
+ return (_jsxs(_Fragment, { children: [_jsx(Text, { type: titleVariant, children: question.title }), _jsx(InputMask, { mask: dateFormat, value: value, onChange: ({ target: { value } }) => {
14
+ onAnswer("date", question.id, value);
15
+ }, children: ((inputProps) => (_jsx(Input, { ...inputProps, placeholder: question.title, error: error }))) })] }));
16
+ };
17
+ }
18
+ const parseDate = (formattedDate) => {
19
+ const providedDate = formattedDate;
20
+ const dateParts = providedDate.split("/").map(Number);
21
+ if (dateParts.length < 2)
22
+ return false;
23
+ const [day, month, year] = dateParts;
24
+ const parsedDate = new Date(year, month - 1, day);
25
+ return parsedDate;
26
+ };
27
+ export const dateFieldValidatorFactory = (invalidDateLabel, requiredFieldLabel) => (answer) => {
28
+ const providedDate = answer || "";
29
+ const parsedDate = parseDate(providedDate);
30
+ if (!parsedDate)
31
+ return {
32
+ isValid: false,
33
+ error: invalidDateLabel,
34
+ };
35
+ const dateValidation = isValidated(providedDate, false, undefined, requiredFieldLabel);
36
+ return dateValidation;
37
+ };
38
+ //# sourceMappingURL=DateField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../../../../../src/components/Form/v2/FormField/Extensions/DateField/DateField.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAEzC,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;IAEI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CAAC,gBAAwB,EAAE,kBAA0B,EAAE,EAAE,CACzD,CAAC,MAAuC,EAAE,EAAE;IAC1C,MAAM,YAAY,GAAG,MAAM,IAAI,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;IAC3C,IAAI,CAAC,UAAU;QACb,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,gBAAgB;SACxB,CAAC;IACJ,MAAM,cAAc,GAAG,WAAW,CAChC,YAAY,EACZ,KAAK,EACL,SAAS,EACT,kBAAkB,CACnB,CAAC;IACF,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export { default } from './DateField';
@@ -0,0 +1,2 @@
1
+ export { default } from './DateField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/components/Form/v2/FormField/Extensions/DateField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { GenericFormFieldProps } from "../../FormField.types";
2
+ /**
3
+ * An extra form field that enables the user to input a phone number
4
+ **/
5
+ export default function phoneFieldFactory(invalidPhoneLabel: string): ({ value, question, onAnswer, error, }: GenericFormFieldProps<"phone">) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const phoneFieldValidator: (answer: [phoneNumber: string, isValid: boolean, error: string | undefined]) => {
7
+ isValid: boolean;
8
+ error: string | undefined;
9
+ };
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo } from "react";
3
+ import useModule from "../../../../../../hooks/utility/useModule";
4
+ import Text from "../../../../../Text";
5
+ import Input from "../../../../../Input";
6
+ import { useOneUIConfig } from "../../../../../../context/OneUIProvider";
7
+ /**
8
+ * An extra form field that enables the user to input a phone number
9
+ **/
10
+ export default function phoneFieldFactory(invalidPhoneLabel) {
11
+ return function ({ value, question, onAnswer, error, }) {
12
+ const { country } = question;
13
+ const { titleVariant } = useOneUIConfig("component.form");
14
+ const [phone] = value || ["", false];
15
+ const phoneFormatter = useModule(() => import("google-libphonenumber").then((mod) => {
16
+ return mod.PhoneNumberUtil.getInstance();
17
+ }));
18
+ const { phoneFormat, valid, error: phoneError, } = useMemo(() => {
19
+ if (!phoneFormatter)
20
+ return {
21
+ phoneFormat: phone,
22
+ valid: false,
23
+ error: "",
24
+ };
25
+ try {
26
+ const phoneInstance = phoneFormatter.parseAndKeepRawInput(phone, country);
27
+ const isPhoneValid = phoneFormatter.isValidNumber(phoneInstance);
28
+ return {
29
+ phoneFormat: phoneFormatter.format(phoneInstance, 2),
30
+ valid: isPhoneValid,
31
+ error: isPhoneValid ? "" : invalidPhoneLabel,
32
+ };
33
+ }
34
+ catch (e) {
35
+ return {
36
+ phoneFormat: phone,
37
+ valid: false,
38
+ error: invalidPhoneLabel,
39
+ };
40
+ }
41
+ }, [phone, phoneFormatter]);
42
+ useEffect(() => {
43
+ onAnswer("phone", question.id, [phoneFormat, valid, phoneError]);
44
+ }, [phoneFormat, valid]);
45
+ return (_jsxs(_Fragment, { children: [_jsx(Text, { type: titleVariant, children: question.title }), _jsx(Input, { placeholder: question.title, value: phoneFormat, onChange: ({ target: { value } }) => {
46
+ onAnswer("phone", question.id, [value, false, phoneError]);
47
+ }, error: error })] }));
48
+ };
49
+ }
50
+ export const phoneFieldValidator = (answer) => {
51
+ const isValid = !!answer && !!answer[1];
52
+ return {
53
+ isValid,
54
+ error: answer[2],
55
+ };
56
+ };
57
+ //# sourceMappingURL=PhoneField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhoneField.js","sourceRoot":"","sources":["../../../../../../../src/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;A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@
1
+ export { default } from './PhoneField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/components/Form/v2/FormField/Extensions/PhoneField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FormFieldProps, FormFieldView } from "./FormField.types";
2
+ /**
3
+ * The logic for a field of the form
4
+ **/
5
+ export default function FormField<Q extends FormFieldView>({ config: c, value, ...props }: FormFieldProps<Q>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,133 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import debounce from "lodash/debounce";
4
+ import Styles from "./FormField.module.scss";
5
+ import { FormMode, } from "./FormField.types";
6
+ import Select from "../../../Select/Select";
7
+ import Input from "../../../Input";
8
+ import OneText from "../../../Text";
9
+ import Button from "../../../Button";
10
+ import Radio from "../../../Radio";
11
+ import { AnchoredTooltipAlignment } from "../../../AnchoredTooltip/AnchoredTooltip";
12
+ import FileInput from "../../../FileInput/FileInput";
13
+ import CheckBox from "../../../CheckBox/CheckBox";
14
+ import Spacing from "../../../Spacing";
15
+ import { useOneUIConfig } from "../../../../context/OneUIProvider";
16
+ // import InputMask from "react-input-mask";
17
+ /**
18
+ * The logic for a field of the form
19
+ **/
20
+ export default function FormField({ config: c, value, ...props }) {
21
+ const val = () => value;
22
+ const ans = (answer) => answer;
23
+ const type = c.type;
24
+ const { titleVariant, labelVariant, optionalLabel, extensions } = useOneUIConfig("component.form");
25
+ if (props.mode === FormMode.READ_ONLY) {
26
+ switch (type) {
27
+ case "check":
28
+ const checks = val() || [];
29
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), checks.includes(true) ? (checks.map((checked, i) => checked ? (_jsx(OneText, { type: labelVariant, children: c.options[i].value })) : null)) : (_jsx(OneText, { type: labelVariant, children: "-" })), _jsx(Spacing, { size: "small" })] }));
30
+ case "file":
31
+ const file = val();
32
+ return (_jsxs(_Fragment, { children: [_jsx(FileInput, { states: {
33
+ fileProvided: {
34
+ title: c.title,
35
+ description: c.fileUsageDescription,
36
+ },
37
+ waitingFile: {
38
+ title: c.title,
39
+ description: c.fileUsageDescription,
40
+ },
41
+ }, footer: c.footer, onFile: () => { }, file: file === true ? {} : undefined, progress: file === true ? 100 : undefined, disabled: true }), _jsx(Spacing, { size: "small" }), file === true && (_jsx(Button, { variant: "link", color: "primary", onClick: c.openFile.action, children: c.openFile.label })), _jsx(Spacing, { size: "large" })] }));
42
+ default:
43
+ const answer = val();
44
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), _jsx(OneText, { type: labelVariant, children: answer || "-" }), _jsx(Spacing, { size: "small" })] }));
45
+ }
46
+ }
47
+ const { onAnswer, error } = props;
48
+ switch (type) {
49
+ case "accept":
50
+ const checks = val() || [];
51
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: Styles.acceptInput, children: [_jsxs("div", { children: [_jsx(OneText, { type: titleVariant, children: c.title }), _jsx("br", {}), _jsx(Button, { variant: "link", color: "primary", onClick: c.contract.action, children: c.contract.label })] }), error && (_jsxs("div", { children: [_jsx(OneText, { type: "caption", color: "error", children: error }), _jsx("br", {})] })), _jsx("div", { children: c.accept.map((a, i) => (_jsx(OneText, { type: labelVariant, children: _jsx(CheckBox, { label: _jsx("span", { children: _jsxs(_Fragment, { children: [a.label, a.optional ? (_jsxs(_Fragment, { children: [_jsx("br", {}), _jsx(OneText, { type: "caption", children: optionalLabel })] })) : ("")] }) }), checked: checks[i], onToggle: (checked) => {
52
+ const clone = [...checks];
53
+ clone[i] = checked;
54
+ onAnswer(type, c.id, ans(clone));
55
+ }, groupId: c.id, value: a.label }) }))) })] }), _jsx(Spacing, { size: "small" })] }));
56
+ case "file":
57
+ const upload = val();
58
+ const [progress, setProgress] = useState(() => {
59
+ if (!upload)
60
+ return undefined;
61
+ if (upload === true)
62
+ return 100;
63
+ const s = upload.snapshot;
64
+ return (s.bytesTransferred * 100) / s.totalBytes;
65
+ });
66
+ useEffect(() => {
67
+ if (!upload)
68
+ return setProgress(undefined);
69
+ if (upload === true) {
70
+ setProgress(100);
71
+ return;
72
+ }
73
+ const throttleSetProgress = debounce(setProgress, 250);
74
+ const unsubscribe = upload.on("state_changed", (s) => {
75
+ const progress = (s.bytesTransferred * 100) / s.totalBytes;
76
+ throttleSetProgress(progress);
77
+ });
78
+ return () => {
79
+ unsubscribe();
80
+ };
81
+ }, [upload]);
82
+ return (_jsxs(_Fragment, { children: [_jsx(FileInput, { states: {
83
+ fileProvided: {
84
+ title: c.title,
85
+ description: c.fileUsageDescription,
86
+ },
87
+ waitingFile: {
88
+ title: c.title,
89
+ description: c.fileUsageDescription,
90
+ },
91
+ }, footer: c.footer, onFile: (file) => {
92
+ onAnswer(type, c.id, ans(file));
93
+ }, file: upload, progress: upload ? progress || 0 : undefined, accept: c.extensions.map((x) => `.${x}`).join(",") }), error ? (_jsx(OneText, { type: "caption", color: "error", children: error })) : null, _jsx(Spacing, { size: "large" })] }));
94
+ case "radio":
95
+ const selected = val();
96
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), error && (_jsx(OneText, { type: "caption", color: "error", children: error })), _jsx("br", {}), c.options.map((el) => (_jsxs(_Fragment, { children: [_jsx(OneText, { type: labelVariant, children: _jsx(Radio, { checked: selected === el.value, label: el.label, onToggle: () => onAnswer(type, c.id, el.value), groupId: c.id, value: el.value }) }), _jsx("br", {})] })))] }));
97
+ case "check":
98
+ const checkError = typeof error === "string" ? c.options.map(() => error) : error;
99
+ const checkmarks = val() || [];
100
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), _jsx("br", {}), c.options.map((el, i) => (_jsxs(_Fragment, { children: [_jsx(OneText, { type: labelVariant, children: _jsx(CheckBox, { checked: checkmarks[i], label: _jsxs(_Fragment, { children: [el.label, checkError?.[i] ? (_jsx(OneText, { type: "caption", color: "error", children: checkError[i] })) : null] }), onToggle: (checked) => {
101
+ const clone = [...checkmarks];
102
+ clone[i] = checked;
103
+ onAnswer(type, c.id, clone);
104
+ }, groupId: c.id, value: el.value }) }), _jsx("br", {})] })))] }));
105
+ case "rawcheck":
106
+ const rawCheckmarks = val() || [];
107
+ return (_jsxs(_Fragment, { children: [error && (_jsxs(_Fragment, { children: [_jsx(OneText, { type: "caption", color: "error", children: error }), _jsx("br", {})] })), c.options.map((el, i) => (_jsxs(_Fragment, { children: [_jsx(OneText, { type: labelVariant, children: _jsx(CheckBox, { checked: rawCheckmarks[i], label: el.label, onToggle: (checked) => {
108
+ const clone = [...rawCheckmarks];
109
+ clone[i] = checked;
110
+ onAnswer(type, c.id, clone);
111
+ }, groupId: c.id, value: el.value }) }), _jsx("br", {})] })))] }));
112
+ case "select":
113
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), _jsx(Select, { "data-testid": `cvm88-${c.id}`, alignTo: AnchoredTooltipAlignment.LEFT, items: c.options, selected: val(), onClick: (i) => {
114
+ onAnswer(type, c.id, i.value);
115
+ }, filter: c.filter, error: error })] }));
116
+ case "text":
117
+ case "number":
118
+ const filter = type === "number"
119
+ ? (val) => val.replace(/[^0-9]+/g, "")
120
+ : (val) => val;
121
+ return (_jsxs(_Fragment, { children: [_jsx(OneText, { type: titleVariant, children: c.title }), _jsx(Input, { multiline: "multiline" in c ? c.multiline : undefined, placeholder: c.title, value: val(), error: error, onChange: ({ target: { value } }) => {
122
+ onAnswer(type, c.id, filter(value));
123
+ } })] }));
124
+ default:
125
+ const registeredExtension = extensions?.[type];
126
+ if (registeredExtension) {
127
+ const { Input } = registeredExtension;
128
+ return (_jsx(Input, { onAnswer: onAnswer, question: c, value: value, error: error }));
129
+ }
130
+ throw new Error(`The form field "${type}" is not implemented yet. Please provide it using OneUIProvider config options for form extensions`);
131
+ }
132
+ }
133
+ //# sourceMappingURL=FormField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../../../src/components/Form/v2/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,OAAO,EAKL,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,SAAS,MAAM,8BAA8B,CAAC;AACrD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,4CAA4C;AAE5C;;IAEI;AACJ,MAAM,CAAC,OAAO,UAAU,SAAS,CAA0B,EACzD,MAAM,EAAE,CAAC,EACT,KAAK,EACL,GAAG,KAAK,EACU;IAClB,MAAM,GAAG,GAAG,GAAoC,EAAE,CAChD,KAIa,CAAC;IAChB,MAAM,GAAG,GAAG,CACV,MAIa,EACb,EAAE,CACF,MAEE,CAAC;IACL,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;IACpB,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,GAC7D,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC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C,OAAO,IAAC,IAAI,EAAE,YAAY,YAAG,CAAC,CAAC,KAAK,GAAW,EAChD,KAAC,KAAK,IACJ,SAAS,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACrD,WAAW,EAAE,CAAC,CAAC,KAAK,EACpB,KAAK,EAAE,GAAG,EAAe,EACzB,KAAK,EAAE,KAAe,EACtB,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;4BAClC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;wBACtC,CAAC,GACD,IACD,CACJ,CAAC;QACJ;YACE,MAAM,mBAAmB,GAAG,UAAU,EAAE,CAAC,IAAI,CAAQ,CAAC;YACtD,IAAI,mBAAmB,EAAE,CAAC;gBACxB,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC;gBACtC,OAAO,CACL,KAAC,KAAK,IACJ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAQ,EAClB,KAAK,EAAE,KAAY,EACnB,KAAK,EAAE,KAAY,GACnB,CACH,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,KAAK,CACb,mBAAmB,IAAI,oGAAoG,CAC5H,CAAC;IACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { ReactNode } from "react";
2
+ import { SelectItem } from "../../../Select/Select";
3
+ import { UploadTask } from "firebase/storage";
4
+ import { UnresolvableOr } from "../../../../type-utils";
5
+ export type GenericFormFieldProps<T extends FormField["type"]> = {
6
+ value: AnswerByField<{
7
+ type: T;
8
+ }>;
9
+ onAnswer: (FormFieldProps<{
10
+ type: T;
11
+ }> & {
12
+ mode: FormMode.WRITE;
13
+ })["onAnswer"];
14
+ question: FormFieldView & {
15
+ type: T;
16
+ };
17
+ error?: string;
18
+ };
19
+ export type FormFieldProps<Q extends Pick<FormFieldView, "type">> = {
20
+ config: Q;
21
+ value: AnswerByField<Q>;
22
+ } & ({
23
+ mode: FormMode.READ_ONLY;
24
+ } | {
25
+ mode?: FormMode.WRITE;
26
+ onAnswer: <T extends Q["type"]>(questionType: T, questionId: string, answer: AnswerAction<{
27
+ type: T;
28
+ }> | undefined) => void;
29
+ error?: string | string[];
30
+ });
31
+ export declare enum FormMode {
32
+ READ_ONLY = 0,
33
+ WRITE = 1
34
+ }
35
+ export type FormFieldView = FormField & {
36
+ title: string;
37
+ };
38
+ export type AnswerAction<F extends Pick<FormField, "type">> = F["type"] extends "file" ? File : AnswerByField<F>;
39
+ export type BasicFormFields = {
40
+ type: "select";
41
+ filter?: (item: SelectItem, term: string) => boolean;
42
+ options: SelectItem[];
43
+ } | {
44
+ type: "text";
45
+ multiline?: number;
46
+ } | {
47
+ type: "number";
48
+ };
49
+ type DistributeValidatorOverUnion<FormFieldTypes extends {
50
+ type: any;
51
+ }> = FormFieldTypes extends any ? FormFieldTypes & {
52
+ validator?: (val: AnswerAction<FormFieldTypes> | undefined) => boolean | string;
53
+ } : never;
54
+ export type FormField = {
55
+ optional?: boolean;
56
+ id: string;
57
+ } & DistributeValidatorOverUnion<BasicFormFields | {
58
+ type: "radio";
59
+ options: SelectItem[];
60
+ } | {
61
+ type: "check" | "rawcheck";
62
+ options: SelectItem[];
63
+ } | {
64
+ type: "file";
65
+ fileUsageDescription: string;
66
+ extensions: string[];
67
+ footer: string;
68
+ openFile?: {
69
+ action: () => void;
70
+ label: string | ReactNode;
71
+ };
72
+ } | {
73
+ type: "accept";
74
+ link: {
75
+ type: "file" | "route";
76
+ to: string;
77
+ };
78
+ contract: {
79
+ action: () => void;
80
+ label: string | ReactNode;
81
+ };
82
+ accept: {
83
+ label: string;
84
+ optional?: true;
85
+ }[];
86
+ } | UnresolvableOr<OnepercentUtility.UIElements.FormExtension["fields"], {}>>;
87
+ export type FormFieldTypes = FormField['type'] | 'accept';
88
+ type ExternalQuestionFields = UnresolvableOr<OnepercentUtility.UIElements.FormExtension["fieldAnswer"], {}>;
89
+ export type AnswerByField<F extends Pick<FormField, "type">> = F["type"] extends "file" ? UploadTask | true : F["type"] extends "accept" | "check" | "rawcheck" ? boolean[] : F["type"] extends "radio" | "text" | "select" | "number" ? string : F["type"] extends keyof ExternalQuestionFields ? OnepercentUtility.UIElements.FormExtension["fieldAnswer"][F["type"]] : unknown;
90
+ export {};
@@ -0,0 +1,6 @@
1
+ export var FormMode;
2
+ (function (FormMode) {
3
+ FormMode[FormMode["READ_ONLY"] = 0] = "READ_ONLY";
4
+ FormMode[FormMode["WRITE"] = 1] = "WRITE";
5
+ })(FormMode || (FormMode = {}));
6
+ //# sourceMappingURL=FormField.types.js.map