@intlayer/design-system 3.1.0 → 3.2.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 (320) hide show
  1. package/dist/.vite/manifest.json +481 -455
  2. package/dist/TabSelector-BmkzVPXl.js +660 -0
  3. package/dist/TabSelector-BmkzVPXl.js.map +1 -0
  4. package/dist/TabSelector-o_NRBvPQ.cjs +659 -0
  5. package/dist/TabSelector-o_NRBvPQ.cjs.map +1 -0
  6. package/dist/components/Auth/AuthModal/index.cjs +17 -62
  7. package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
  8. package/dist/components/Auth/AuthModal/index.d.ts.map +1 -1
  9. package/dist/components/Auth/AuthModal/index.mjs +17 -62
  10. package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
  11. package/dist/components/Auth/AuthProvider/index.cjs.map +1 -1
  12. package/dist/components/Auth/AuthProvider/index.d.ts +3 -3
  13. package/dist/components/Auth/AuthProvider/index.d.ts.map +1 -1
  14. package/dist/components/Auth/AuthProvider/index.mjs.map +1 -1
  15. package/dist/components/Auth/AuthProvider/useSession.cjs +7 -8
  16. package/dist/components/Auth/AuthProvider/useSession.cjs.map +1 -1
  17. package/dist/components/Auth/AuthProvider/useSession.d.ts.map +1 -1
  18. package/dist/components/Auth/AuthProvider/useSession.mjs +7 -8
  19. package/dist/components/Auth/AuthProvider/useSession.mjs.map +1 -1
  20. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +2 -2
  21. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
  22. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +1 -1
  23. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
  24. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +1 -1
  25. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +2 -2
  26. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts.map +1 -1
  27. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +1 -1
  28. package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +1 -1
  29. package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +1 -1
  30. package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +1 -1
  31. package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +1 -1
  32. package/dist/components/Auth/AuthenticationBarrier/index.d.ts +3 -3
  33. package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +1 -1
  34. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -0
  35. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
  36. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +1 -1
  37. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
  38. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -0
  39. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
  40. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
  41. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +3 -2
  42. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  43. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
  44. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +3 -2
  45. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  46. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
  47. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -0
  48. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
  49. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +1 -1
  50. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
  51. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -0
  52. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
  53. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
  54. package/dist/components/Auth/SignInForm/SignInForm.cjs +4 -3
  55. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
  56. package/dist/components/Auth/SignInForm/SignInForm.d.ts +1 -1
  57. package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
  58. package/dist/components/Auth/SignInForm/SignInForm.mjs +4 -3
  59. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
  60. package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
  61. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +3 -3
  62. package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
  63. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +1 -1
  64. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
  65. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +3 -3
  66. package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
  67. package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
  68. package/dist/components/Auth/index.cjs +2 -4
  69. package/dist/components/Auth/index.cjs.map +1 -1
  70. package/dist/components/Auth/index.d.ts +1 -1
  71. package/dist/components/Auth/index.d.ts.map +1 -1
  72. package/dist/components/Auth/index.mjs +1 -3
  73. package/dist/components/Auth/useAuth/index.cjs +39 -0
  74. package/dist/components/Auth/useAuth/index.cjs.map +1 -0
  75. package/dist/components/Auth/useAuth/index.d.ts +24 -0
  76. package/dist/components/Auth/useAuth/index.d.ts.map +1 -0
  77. package/dist/components/Auth/useAuth/index.mjs +39 -0
  78. package/dist/components/Auth/useAuth/index.mjs.map +1 -0
  79. package/dist/components/Auth/useAuth/useCSRF.cjs +22 -0
  80. package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -0
  81. package/dist/components/Auth/useAuth/useCSRF.d.ts +5 -0
  82. package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -0
  83. package/dist/components/Auth/useAuth/useCSRF.mjs +22 -0
  84. package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -0
  85. package/dist/components/Auth/useAuth/useOAuth2.cjs +26 -0
  86. package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -0
  87. package/dist/components/Auth/useAuth/useOAuth2.d.ts +4 -0
  88. package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -0
  89. package/dist/components/Auth/useAuth/useOAuth2.mjs +26 -0
  90. package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -0
  91. package/dist/components/Auth/useAuth/useSession.cjs +60 -0
  92. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -0
  93. package/dist/components/Auth/useAuth/useSession.d.ts +8 -0
  94. package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -0
  95. package/dist/components/Auth/useAuth/useSession.mjs +60 -0
  96. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -0
  97. package/dist/components/Auth/useUser/index.cjs +3 -3
  98. package/dist/components/Auth/useUser/index.cjs.map +1 -1
  99. package/dist/components/Auth/useUser/index.d.ts.map +1 -1
  100. package/dist/components/Auth/useUser/index.mjs +3 -3
  101. package/dist/components/Auth/useUser/index.mjs.map +1 -1
  102. package/dist/components/Badge/index.d.ts +1 -1
  103. package/dist/components/Button/Button.cjs.map +1 -1
  104. package/dist/components/Button/Button.d.ts +1 -2
  105. package/dist/components/Button/Button.d.ts.map +1 -1
  106. package/dist/components/Button/Button.mjs.map +1 -1
  107. package/dist/components/Command/index.d.ts +2 -2
  108. package/dist/components/Command/index.d.ts.map +1 -1
  109. package/dist/components/Container/index.cjs +1 -0
  110. package/dist/components/Container/index.cjs.map +1 -1
  111. package/dist/components/Container/index.d.ts +8 -8
  112. package/dist/components/Container/index.d.ts.map +1 -1
  113. package/dist/components/Container/index.mjs +1 -0
  114. package/dist/components/Container/index.mjs.map +1 -1
  115. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +4 -17
  116. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  117. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  118. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +4 -17
  119. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  120. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +0 -21
  121. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
  122. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +0 -9
  123. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
  124. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +0 -21
  125. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +3 -2
  127. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +3 -2
  129. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  130. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +7 -24
  131. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  132. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
  133. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +6 -23
  134. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  135. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +0 -42
  136. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
  137. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +0 -18
  138. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
  139. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +0 -42
  140. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
  141. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -2
  142. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +4 -36
  143. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  144. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  145. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +3 -35
  146. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  147. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +4 -4
  148. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +0 -47
  149. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  150. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +0 -19
  151. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  152. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +0 -47
  153. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  154. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +3 -2
  155. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  156. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +3 -2
  157. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  158. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +3 -2
  159. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  160. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +3 -2
  161. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  162. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
  163. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
  164. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
  165. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
  166. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -2
  167. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -2
  168. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +4 -17
  169. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  170. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  171. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +4 -17
  172. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  173. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +0 -21
  174. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  175. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +0 -9
  176. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  177. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +0 -21
  178. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  179. package/dist/components/Form/FormBase.cjs +4 -1
  180. package/dist/components/Form/FormBase.cjs.map +1 -1
  181. package/dist/components/Form/FormBase.d.ts +1 -1
  182. package/dist/components/Form/FormBase.d.ts.map +1 -1
  183. package/dist/components/Form/FormBase.mjs +4 -1
  184. package/dist/components/Form/FormBase.mjs.map +1 -1
  185. package/dist/components/Input/Checkbox.d.ts +1 -1
  186. package/dist/components/Input/Input.cjs +8 -2
  187. package/dist/components/Input/Input.cjs.map +1 -1
  188. package/dist/components/Input/Input.d.ts +1 -0
  189. package/dist/components/Input/Input.d.ts.map +1 -1
  190. package/dist/components/Input/Input.mjs +8 -2
  191. package/dist/components/Input/Input.mjs.map +1 -1
  192. package/dist/components/Link/Link.d.ts +1 -1
  193. package/dist/components/Modal/Modal.cjs +3 -1
  194. package/dist/components/Modal/Modal.cjs.map +1 -1
  195. package/dist/components/Modal/Modal.mjs +3 -1
  196. package/dist/components/Modal/Modal.mjs.map +1 -1
  197. package/dist/components/Navbar/MobileNavbar.cjs +3 -1
  198. package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
  199. package/dist/components/Navbar/MobileNavbar.mjs +3 -1
  200. package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
  201. package/dist/components/Navbar/index.cjs +3 -1
  202. package/dist/components/Navbar/index.cjs.map +1 -1
  203. package/dist/components/Navbar/index.mjs +3 -1
  204. package/dist/components/Navbar/index.mjs.map +1 -1
  205. package/dist/components/Select/Multiselect.d.ts +1 -1
  206. package/dist/components/Select/Multiselect.d.ts.map +1 -1
  207. package/dist/components/SwitchSelector/index.cjs +3 -1
  208. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  209. package/dist/components/SwitchSelector/index.d.ts +1 -1
  210. package/dist/components/SwitchSelector/index.mjs +3 -1
  211. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  212. package/dist/components/TabSelector/TabSelector.cjs +13 -10
  213. package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
  214. package/dist/components/TabSelector/TabSelector.d.ts +1 -1
  215. package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
  216. package/dist/components/TabSelector/TabSelector.mjs +13 -10
  217. package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
  218. package/dist/components/Tag/index.cjs +79 -0
  219. package/dist/components/Tag/index.cjs.map +1 -0
  220. package/dist/components/Tag/index.d.ts +12 -0
  221. package/dist/components/Tag/index.d.ts.map +1 -0
  222. package/dist/components/Tag/index.mjs +79 -0
  223. package/dist/components/Tag/index.mjs.map +1 -0
  224. package/dist/components/Toaster/Toast.d.ts +1 -1
  225. package/dist/components/index.cjs +4 -4
  226. package/dist/components/index.d.ts +1 -0
  227. package/dist/components/index.d.ts.map +1 -1
  228. package/dist/components/index.mjs +3 -3
  229. package/dist/components/index.mjs.map +1 -1
  230. package/dist/hooks/index.cjs +4 -1
  231. package/dist/hooks/index.cjs.map +1 -1
  232. package/dist/hooks/index.d.ts +1 -0
  233. package/dist/hooks/index.d.ts.map +1 -1
  234. package/dist/hooks/index.mjs +5 -2
  235. package/dist/hooks/index.mjs.map +1 -1
  236. package/dist/hooks/intlayerAPIHooks.cjs +257 -126
  237. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  238. package/dist/hooks/intlayerAPIHooks.d.ts +43 -38
  239. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  240. package/dist/hooks/intlayerAPIHooks.mjs +258 -127
  241. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  242. package/dist/hooks/useAsync/useAsync.cjs +142 -104
  243. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  244. package/dist/hooks/useAsync/useAsync.d.ts +0 -2
  245. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  246. package/dist/hooks/useAsync/useAsync.mjs +143 -105
  247. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  248. package/dist/hooks/useAsync/useAsyncStateStore.cjs +50 -112
  249. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  250. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +3 -9
  251. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  252. package/dist/hooks/useAsync/useAsyncStateStore.mjs +50 -112
  253. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  254. package/dist/hooks/useAsync/useProxyState.d.ts +3 -0
  255. package/dist/hooks/useAsync/useProxyState.d.ts.map +1 -0
  256. package/dist/hooks/useIntlayerAPI.cjs +6 -5
  257. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  258. package/dist/hooks/useIntlayerAPI.d.ts +51 -45
  259. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  260. package/dist/hooks/useIntlayerAPI.mjs +5 -4
  261. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  262. package/dist/hooks/useItemSelector.cjs +11 -2
  263. package/dist/hooks/useItemSelector.cjs.map +1 -1
  264. package/dist/hooks/useItemSelector.d.ts +3 -2
  265. package/dist/hooks/useItemSelector.d.ts.map +1 -1
  266. package/dist/hooks/useItemSelector.mjs +11 -2
  267. package/dist/hooks/useItemSelector.mjs.map +1 -1
  268. package/dist/hooks/usePersistedStore.cjs +22 -0
  269. package/dist/hooks/usePersistedStore.cjs.map +1 -0
  270. package/dist/hooks/usePersistedStore.d.ts +2 -0
  271. package/dist/hooks/usePersistedStore.d.ts.map +1 -0
  272. package/dist/hooks/usePersistedStore.mjs +22 -0
  273. package/dist/hooks/usePersistedStore.mjs.map +1 -0
  274. package/dist/hooks/usePersistenceStore.cjs +22 -0
  275. package/dist/hooks/usePersistenceStore.cjs.map +1 -0
  276. package/dist/hooks/usePersistenceStore.d.ts +2 -0
  277. package/dist/hooks/usePersistenceStore.d.ts.map +1 -0
  278. package/dist/hooks/usePersistenceStore.mjs +22 -0
  279. package/dist/hooks/usePersistenceStore.mjs.map +1 -0
  280. package/dist/libs/intlayer-api/auth.cjs +14 -2
  281. package/dist/libs/intlayer-api/auth.cjs.map +1 -1
  282. package/dist/libs/intlayer-api/auth.d.ts +7 -3
  283. package/dist/libs/intlayer-api/auth.d.ts.map +1 -1
  284. package/dist/libs/intlayer-api/auth.mjs +14 -2
  285. package/dist/libs/intlayer-api/auth.mjs.map +1 -1
  286. package/dist/libs/intlayer-api/fetcher.cjs +7 -1
  287. package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
  288. package/dist/libs/intlayer-api/fetcher.d.ts.map +1 -1
  289. package/dist/libs/intlayer-api/fetcher.mjs +7 -1
  290. package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
  291. package/dist/libs/intlayer-api/index.cjs +3 -1
  292. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  293. package/dist/libs/intlayer-api/index.d.ts +12 -2
  294. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  295. package/dist/libs/intlayer-api/index.mjs +3 -1
  296. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  297. package/dist/libs/intlayer-api/stripe.cjs +22 -0
  298. package/dist/libs/intlayer-api/stripe.cjs.map +1 -0
  299. package/dist/libs/intlayer-api/stripe.d.ts +6 -0
  300. package/dist/libs/intlayer-api/stripe.d.ts.map +1 -0
  301. package/dist/libs/intlayer-api/stripe.mjs +22 -0
  302. package/dist/libs/intlayer-api/stripe.mjs.map +1 -0
  303. package/dist/stripe-BsI0lJWz.js +22 -0
  304. package/dist/stripe-BsI0lJWz.js.map +1 -0
  305. package/dist/stripe-C-u5RvGh.js +22 -0
  306. package/dist/stripe-C-u5RvGh.js.map +1 -0
  307. package/dist/stripe-CF_E65Vu.js +22 -0
  308. package/dist/stripe-CF_E65Vu.js.map +1 -0
  309. package/dist/stripe-CpGvfq6T.cjs +21 -0
  310. package/dist/stripe-CpGvfq6T.cjs.map +1 -0
  311. package/dist/stripe-DEv4DjAL.cjs +21 -0
  312. package/dist/stripe-DEv4DjAL.cjs.map +1 -0
  313. package/dist/stripe-DuG0uaEn.cjs +21 -0
  314. package/dist/stripe-DuG0uaEn.cjs.map +1 -0
  315. package/dist/tailwind.css +1 -1
  316. package/dist/useProxyState-D5GLrY2y.js +20 -0
  317. package/dist/useProxyState-D5GLrY2y.js.map +1 -0
  318. package/dist/useProxyState-DewdF3no.cjs +19 -0
  319. package/dist/useProxyState-DewdF3no.cjs.map +1 -0
  320. package/package.json +15 -11
@@ -4,7 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../../jsx-runtime-DvCoRj5u.cjs");
5
5
  const require$$0 = require("react");
6
6
  const components_Loader_index = require("../../Loader/index.cjs");
7
- const components_Auth_AuthProvider_useSession = require("../AuthProvider/useSession.cjs");
7
+ const components_Auth_useAuth_useSession = require("../useAuth/useSession.cjs");
8
8
  const components_Auth_AuthenticationBarrier_accessValidation = require("./accessValidation.cjs");
9
9
  const AuthenticationBarrierClient = ({
10
10
  children,
@@ -13,7 +13,7 @@ const AuthenticationBarrierClient = ({
13
13
  session: sessionProp,
14
14
  redirectionFunction
15
15
  }) => {
16
- const { session: sessionClient, setSession } = components_Auth_AuthProvider_useSession.useSession(sessionProp);
16
+ const { session: sessionClient, setSession } = components_Auth_useAuth_useSession.useSession(sessionProp);
17
17
  const isLoading = sessionClient === void 0 && sessionProp === void 0;
18
18
  require$$0.useEffect(() => {
19
19
  if (!sessionClient && sessionProp) {
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationBarrierClient.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../AuthProvider/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":["useSession","useEffect","accessValidation","jsx","Loader"],"mappings":";;;;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAIA,wCAAAA,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjEC,aAAAA,UAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAChC;AAAA,EACC,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3CA,aAAAA,UAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxCC,6DAAA;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,KACC,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAC,2BAAA,kBAAA,IAACC,wBAAO,QAAA,EAAA,WAAuB,SAAS,CAAA;AACjD;;"}
1
+ {"version":3,"file":"AuthenticationBarrierClient.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../useAuth/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":["useSession","useEffect","accessValidation","jsx","Loader"],"mappings":";;;;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAIA,mCAAAA,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjEC,aAAAA,UAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAChC;AAAA,EACC,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3CA,aAAAA,UAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxCC,6DAAA;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,KACC,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAC,2BAAA,kBAAA,IAACC,wBAAO,QAAA,EAAA,WAAuB,SAAS,CAAA;AACjD;;"}
@@ -2,7 +2,7 @@
2
2
  import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
3
3
  import { useEffect } from "react";
4
4
  import { Loader } from "../../Loader/index.mjs";
5
- import { useSession } from "../AuthProvider/useSession.mjs";
5
+ import { useSession } from "../useAuth/useSession.mjs";
6
6
  import { accessValidation } from "./accessValidation.mjs";
7
7
  const AuthenticationBarrierClient = ({
8
8
  children,
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationBarrierClient.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../AuthProvider/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":["jsx"],"mappings":";;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAI,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjE,YAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAChC;AAAA,EACC,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3C,YAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxC;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,KACC,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAA,kCAAA,IAAC,QAAO,EAAA,WAAuB,SAAS,CAAA;AACjD;"}
1
+ {"version":3,"file":"AuthenticationBarrierClient.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../useAuth/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":["jsx"],"mappings":";;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAI,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjE,YAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAChC;AAAA,EACC,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3C,YAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxC;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,KACC,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAA,kCAAA,IAAC,QAAO,EAAA,WAAuB,SAAS,CAAA;AACjD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationBarrierServer.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { AuthProviderProps } from '../AuthProvider';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: AuthProviderProps['session'];\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":["accessValidation"],"mappings":";;;AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClCA,2DAAA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;;"}
1
+ {"version":3,"file":"AuthenticationBarrierServer.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { Session } from '../useAuth';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: Session;\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":["accessValidation"],"mappings":";;;AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClCA,2DAAA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;;"}
@@ -1,8 +1,8 @@
1
1
  import { FC } from 'react';
2
- import { AuthProviderProps } from '../AuthProvider';
2
+ import { Session } from '../useAuth';
3
3
  import { AuthenticationBarrierProps } from '.';
4
4
  export type AuthenticationBarrierClientProps = Omit<AuthenticationBarrierProps, 'sessionToken'> & {
5
- session: AuthProviderProps['session'];
5
+ session: Session;
6
6
  };
7
7
  export declare const AuthenticationBarrierServer: FC<AuthenticationBarrierProps>;
8
8
  //# sourceMappingURL=AuthenticationBarrierServer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationBarrierServer.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,0BAA0B,EAC1B,cAAc,CACf,GAAG;IACF,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,0BAA0B,CAiBtE,CAAC"}
1
+ {"version":3,"file":"AuthenticationBarrierServer.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,0BAA0B,EAC1B,cAAc,CACf,GAAG;IACF,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,0BAA0B,CAiBtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationBarrierServer.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { AuthProviderProps } from '../AuthProvider';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: AuthProviderProps['session'];\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":[],"mappings":";AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;"}
1
+ {"version":3,"file":"AuthenticationBarrierServer.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { Session } from '../useAuth';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: Session;\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":[],"mappings":";AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"accessValidation.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../AuthProvider';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":";;AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AAEI,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EACtC;AAGE,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AACF;;"}
1
+ {"version":3,"file":"accessValidation.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../useAuth';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":";;AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AAEI,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EACtC;AAGE,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AACF;;"}
@@ -1,4 +1,4 @@
1
- import { Session } from '../AuthProvider';
1
+ import { Session } from '../useAuth';
2
2
  import { AuthenticationBarrierProps } from '.';
3
3
  export declare const accessValidation: (accessRule: AuthenticationBarrierProps["accessRule"], session: Session | null, redirectionFunction: (redirectionRoute: string) => void, redirectionRoute: string) => void;
4
4
  //# sourceMappingURL=accessValidation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accessValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,eAAO,MAAM,gBAAgB,eACf,0BAA0B,CAAC,YAAY,CAAC,WAC3C,OAAO,GAAG,IAAI,uBACF,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,oBACrC,MAAM,SAoBzB,CAAC"}
1
+ {"version":3,"file":"accessValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,eAAO,MAAM,gBAAgB,eACf,0BAA0B,CAAC,YAAY,CAAC,WAC3C,OAAO,GAAG,IAAI,uBACF,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,oBACrC,MAAM,SAoBzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"accessValidation.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../AuthProvider';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":"AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AAEI,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EACtC;AAGE,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AACF;"}
1
+ {"version":3,"file":"accessValidation.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../useAuth';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":"AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AAEI,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EACtC;AAGE,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EACtC;AACF;"}
@@ -1,12 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
- import { AuthProviderProps } from '../AuthProvider';
2
+ import { Session } from '../useAuth';
3
3
  export { AuthenticationBarrierServer } from './AuthenticationBarrierServer';
4
4
  export { AuthenticationBarrierClient } from './AuthenticationBarrierClient';
5
- export type AuthenticationBarrierProps = AuthProviderProps & {
5
+ export type AuthenticationBarrierProps = {
6
6
  children?: ReactNode;
7
7
  accessRule?: 'public' | 'authenticated' | 'admin' | 'none-authenticated';
8
8
  redirectionRoute?: string;
9
- session?: AuthProviderProps['session'];
9
+ session?: Session;
10
10
  sessionToken?: string;
11
11
  /**
12
12
  * Function to replace for a nextjs redirection
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,GAAG;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,oBAAoB,CAAC;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,oBAAoB,CAAC;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD,CAAC"}
@@ -67,6 +67,7 @@ const ChangePasswordForm = ({
67
67
  {
68
68
  className: "mt-12 w-full",
69
69
  type: "submit",
70
+ color: "text",
70
71
  isLoading: isSubmitting,
71
72
  disabled: !isValid,
72
73
  variant: isSubmitted ? "outline" : "default",
@@ -1 +1 @@
1
- {"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onSubmitError: (error: Error) => void;\n onClickBackToHome: () => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getChangePasswordContent","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;AAcO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACEA,iDAAyB,yBAAA;AAC7B,QAAM,uBAAuBC,wDAAAA;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvCC,yBAAAA,QAAQ,oBAAoB;AAG5B,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB;AAAA,cACxB,aAAa,iBAAiB;AAAA,cAC9B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB;AAAA,YAE3B,UAAqB,qBAAA;AAAA,UAAA;AAAA,QACxB;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB;AAAA,YACxB,SAAS;AAAA,YAER,UAAiB,iBAAA;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
1
+ {"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getChangePasswordContent","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;AAcO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACEA,iDAAyB,yBAAA;AAC7B,QAAM,uBAAuBC,wDAAAA;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvCC,yBAAAA,QAAQ,oBAAoB;AAG5B,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB;AAAA,cACxB,aAAa,iBAAiB;AAAA,cAC9B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB;AAAA,YAE3B,UAAqB,qBAAA;AAAA,UAAA;AAAA,QACxB;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB;AAAA,YACxB,SAAS;AAAA,YAER,UAAiB,iBAAA;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
@@ -2,8 +2,8 @@ import { FC } from 'react';
2
2
  import { ChangePassword } from './ChangePasswordSchema';
3
3
  type ChangePasswordFormProps = {
4
4
  onSubmitSuccess: (data: ChangePassword) => Promise<void>;
5
- onSubmitError: (error: Error) => void;
6
5
  onClickBackToHome: () => void;
6
+ onSubmitError?: (error: Error) => void;
7
7
  };
8
8
  export declare const ChangePasswordForm: FC<ChangePasswordFormProps>;
9
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAGhC,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAuE1D,CAAC"}
1
+ {"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAGhC,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAwE1D,CAAC"}
@@ -65,6 +65,7 @@ const ChangePasswordForm = ({
65
65
  {
66
66
  className: "mt-12 w-full",
67
67
  type: "submit",
68
+ color: "text",
68
69
  isLoading: isSubmitting,
69
70
  disabled: !isValid,
70
71
  variant: isSubmitted ? "outline" : "default",
@@ -1 +1 @@
1
- {"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onSubmitError: (error: Error) => void;\n onClickBackToHome: () => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;AAcO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,yBAAyB;AAC7B,QAAM,uBAAuB;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvC,QAAQ,oBAAoB;AAG5B,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB;AAAA,cACxB,aAAa,iBAAiB;AAAA,cAC9B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB;AAAA,YAE3B,UAAqB,qBAAA;AAAA,UAAA;AAAA,QACxB;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB;AAAA,YACxB,SAAS;AAAA,YAER,UAAiB,iBAAA;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
1
+ {"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;AAcO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,yBAAyB;AAC7B,QAAM,uBAAuB;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvC,QAAQ,oBAAoB;AAG5B,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB;AAAA,cACxB,aAAa,iBAAiB;AAAA,cAC9B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB;AAAA,YAE3B,UAAqB,qBAAA;AAAA,UAAA;AAAA,QACxB;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB;AAAA,YACxB,SAAS;AAAA,YAER,UAAiB,iBAAA;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -1,23 +1,23 @@
1
1
  export declare const getChangePasswordContent: () => {
2
2
  currentPasswordInput: {
3
- label: string;
4
- placeholder: string;
3
+ label: any;
4
+ placeholder: any;
5
5
  };
6
6
  newPasswordInput: {
7
- label: string;
8
- placeholder: string;
7
+ label: any;
8
+ placeholder: any;
9
9
  };
10
10
  confirmPasswordInput: {
11
- label: string;
12
- placeholder: string;
11
+ label: any;
12
+ placeholder: any;
13
13
  };
14
14
  changePasswordButton: {
15
- text: string;
16
- ariaLabel: string;
15
+ text: any;
16
+ ariaLabel: any;
17
17
  };
18
18
  backToHomeButton: {
19
- text: string;
20
- ariaLabel: string;
19
+ text: any;
20
+ ariaLabel: any;
21
21
  };
22
22
  };
23
23
  //# sourceMappingURL=index.content.d.ts.map
@@ -10,8 +10,8 @@ const components_Auth_ExternalsLoginButtons_externalsLoginButtons_content = requ
10
10
  const GitHubLoginButton = () => {
11
11
  const externalsLoginButtonsContent = components_Auth_ExternalsLoginButtons_externalsLoginButtons_content.getExternalsLoginButtonsContent();
12
12
  const loginWithGitHub = () => {
13
- const origin2 = window.location.href;
14
- const authURL = libs_intlayerApi_index.intlayerAPI.auth.getLoginWithGitHubURL({ origin: origin2 });
13
+ const origin = window.location.href;
14
+ const authURL = libs_intlayerApi_index.intlayerAPI.auth.getLoginWithGitHubURL({ origin });
15
15
  window.location.href = authURL;
16
16
  };
17
17
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
@@ -28,6 +28,7 @@ const GitHubLoginButton = () => {
28
28
  const GoogleLoginButton = () => {
29
29
  const externalsLoginButtonsContent = components_Auth_ExternalsLoginButtons_externalsLoginButtons_content.getExternalsLoginButtonsContent();
30
30
  const loginWithGoogle = () => {
31
+ const origin = window.location.href;
31
32
  const authURL = libs_intlayerApi_index.intlayerAPI.auth.getLoginWithGoogleURL({ origin });
32
33
  window.location.href = authURL;
33
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalsLoginButtons.cjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { getExternalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtonsContent.github.label}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtonsContent.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n const loginWithGoogle = () => {\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtonsContent.google.label}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtonsContent.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtonsContent.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["getExternalsLoginButtonsContent","origin","intlayerAPI","jsx","Button","GithubLogo","GoogleLogo","jsxs"],"mappings":";;;;;;;;;AASO,MAAM,oBAAwB,MAAM;AACzC,QAAM,+BAA+BA,oEAAAA;AACrC,QAAM,kBAAkB,MAAM;AACtBC,UAAAA,UAAS,OAAO,SAAS;AAE/B,UAAM,UAAUC,uBAAAA,YAAY,KAAK,sBAAsB,EAAE,QAAAD,SAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EAAA;AAIvB,SAAAE,2BAAA,kBAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,OAAO,6BAA6B,OAAO;AAAA,MAC3C,MAAMC,wDAAA;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,uCAA6B,OAAO;AAAA,IAAA;AAAA,EAAA;AAG3C;AAEO,MAAM,oBAAwB,MAAM;AACzC,QAAM,+BAA+BL,oEAAAA;AAErC,QAAM,kBAAkB,MAAM;AAC5B,UAAM,UAAUE,uBAAAA,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EAAA;AAIvB,SAAAC,2BAAA,kBAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,6BAA6B,OAAO;AAAA,MAC3C,MAAME,wDAAA;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,uCAA6B,OAAO;AAAA,IAAA;AAAA,EAAA;AAG3C;AAEO,MAAM,wBAA4B,MAAM;AAC7C,QAAM,+BAA+BN,oEAAAA;AAGnC,SAAAO,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,iDACb,UAAA;AAAA,IAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,6DACb,UAAA;AAAA,MAACJ,2BAAAA,kBAAAA,IAAA,OAAA,EAAI,WAAU,iDAAiD,CAAA;AAAA,MAC/DA,2BAAA,kBAAA,IAAA,OAAA,EAAI,WAAU,uCACZ,uCAA6B,MAChC;AAAA,MACAA,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,iDAAiD,CAAA;AAAA,IAAA,GAClE;AAAA,qDACC,mBAAkB,EAAA;AAAA,qDAClB,mBAAkB,EAAA;AAAA,EACrB,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ExternalsLoginButtons.cjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { getExternalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtonsContent.github.label}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtonsContent.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n const loginWithGoogle = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtonsContent.google.label}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtonsContent.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtonsContent.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["getExternalsLoginButtonsContent","intlayerAPI","jsx","Button","GithubLogo","GoogleLogo","jsxs"],"mappings":";;;;;;;;;AASO,MAAM,oBAAwB,MAAM;AACzC,QAAM,+BAA+BA,oEAAAA;AACrC,QAAM,kBAAkB,MAAM;AACtB,UAAA,SAAS,OAAO,SAAS;AAE/B,UAAM,UAAUC,uBAAAA,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,E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../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,eAAO,MAAM,iBAAiB,EAAE,EAoB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAoB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAgBnC,CAAC"}
1
+ {"version":3,"file":"ExternalsLoginButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,eAAO,MAAM,iBAAiB,EAAE,EAoB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAsB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAgBnC,CAAC"}
@@ -8,8 +8,8 @@ import { getExternalsLoginButtonsContent } from "./externalsLoginButtons.content
8
8
  const GitHubLoginButton = () => {
9
9
  const externalsLoginButtonsContent = getExternalsLoginButtonsContent();
10
10
  const loginWithGitHub = () => {
11
- const origin2 = window.location.href;
12
- const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin: origin2 });
11
+ const origin = window.location.href;
12
+ const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });
13
13
  window.location.href = authURL;
14
14
  };
15
15
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -26,6 +26,7 @@ const GitHubLoginButton = () => {
26
26
  const GoogleLoginButton = () => {
27
27
  const externalsLoginButtonsContent = getExternalsLoginButtonsContent();
28
28
  const loginWithGoogle = () => {
29
+ const origin = window.location.href;
29
30
  const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });
30
31
  window.location.href = authURL;
31
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalsLoginButtons.mjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { getExternalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtonsContent.github.label}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtonsContent.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n const loginWithGoogle = () => {\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtonsContent.google.label}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtonsContent.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtonsContent.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["origin","jsx","jsxs"],"mappings":";;;;;;;AASO,MAAM,oBAAwB,MAAM;AACzC,QAA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/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { getExternalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtonsContent.github.label}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtonsContent.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n const loginWithGoogle = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtonsContent.google.label}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtonsContent.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtonsContent = getExternalsLoginButtonsContent();\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtonsContent.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-[1px] w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;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"}
@@ -1,12 +1,12 @@
1
1
  export declare const getExternalsLoginButtonsContent: () => {
2
- span: string;
2
+ span: any;
3
3
  github: {
4
- label: string;
5
- ariaLabel: string;
4
+ label: any;
5
+ ariaLabel: any;
6
6
  };
7
7
  google: {
8
- label: string;
9
- ariaLabel: string;
8
+ label: any;
9
+ ariaLabel: any;
10
10
  };
11
11
  };
12
12
  //# sourceMappingURL=externalsLoginButtons.content.d.ts.map
@@ -86,6 +86,7 @@ const ResetPasswordForm = ({
86
86
  {
87
87
  className: "mt-12 w-full",
88
88
  type: "submit",
89
+ color: "text",
89
90
  isLoading: isSubmitting,
90
91
  disabled: !isValid || submissionState.isFrozen,
91
92
  variant: isSubmitted ? "outline" : "default",
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordForm.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getResetPasswordContent } from './index.content';\nimport {\n getResetPasswordSchema,\n type ResetPassword,\n} from './ResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onSubmitError: (error: Error) => void;\n onClickBackToLogin: () => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = getResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = getResetPasswordContent();\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text\n : sendRecoveryEmailButton.text;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getResetPasswordSchema","getResetPasswordContent","useForm","useState","useEffect","jsxs","Form","jsx"],"mappings":";;;;;;;;;;AAiBO,MAAM,oBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EAC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MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC,2BAAAA,kBAAAA,IAAA,OAAA,EAAI,WAAU,yBACb,UAAAA,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,aAAa,WAAW;AAAA,YACxB,YAAU;AAAA,YACV,cAAa;AAAA,YACb,WAAW;AAAA,YACX,WAAW;AAAA,UAAA;AAAA,QAAA,GAEf;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,WAAW;AAAA,YACX,UAAU,CAAC,WAAW,gBAAgB;AAAA,YACtC,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,wBAAwB;AAAA,YAE9B,UAAoB,oBAAA;AAAA,UAAA;AAAA,QACvB;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,kBAAkB;AAAA,YACzB,SAAS;AAAA,YAER,UAAkB,kBAAA;AAAA,UAAA;AAAA,QACrB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
1
+ {"version":3,"file":"ResetPasswordForm.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getResetPasswordContent } from './index.content';\nimport {\n getResetPasswordSchema,\n type ResetPassword,\n} from './ResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onClickBackToLogin: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = getResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = getResetPasswordContent();\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text\n : sendRecoveryEmailButton.text;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getResetPasswordSchema","getResetPasswordContent","useForm","useState","useEffect","jsxs","Form","jsx"],"mappings":";;;;;;;;;;AAiBO,MAAM,oBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsBA,sDAAAA;AACtB,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACEC,gDAAwB,wBAAA;AAC5B,QAAM,EAAE,MAAM,cAAc,aAAa,QAAY,IAAAC,yBAAA;AAAA,IACnD;AAAA,IACA;AAAA,MACE,eAAe,EAAE,MAAM;AAAA,IACzB;AAAA,EAAA;AAEF,QAAM,CAAC,iBAAiB,kBAAkB,IAAIC,oBAAS;AAAA,IACrD,UAAU;AAAA,IACV,eAAe;AAAA,EAAA,CAChB;AAEDC,aAAAA,UAAU,MAAM;AAEV,QAAA,WAAW,CAAC,aAAa;AAC3B,yBAAmB,CAAC,eAAe;AAAA,QACjC,GAAG;AAAA,QACH,UAAU;AAAA,MACV,EAAA;AAAA,IACJ;AAAA,EAAA,GACC,CAAC,aAAa,OAAO,CAAC;AAEzBA,aAAAA,UAAU,MAAM;AAEd,QACE,WACA,gBAAgB,YAChB,gBAAgB,gBAAgB,GAChC;AACM,YAAA,WAAW,YAAY,MAAM;AACjC,2BAAmB,CAAC,cAAc;AAC5B,cAAA,UAAU,iBAAiB,GAAG;AAChC,0BAAc,QAAQ;AACtB,mBAAO,EAAE,GAAG,WAAW,UAAU,OAAO,eAAe;UACzD;AACA,iBAAO,EAA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B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
@@ -3,8 +3,8 @@ import { ResetPassword } from './ResetPasswordSchema';
3
3
  type ForgotPasswordFormProps = {
4
4
  email?: string;
5
5
  onSubmitSuccess: (data: ResetPassword) => Promise<void>;
6
- onSubmitError: (error: Error) => void;
7
6
  onClickBackToLogin: () => void;
7
+ onSubmitError?: (error: Error) => void;
8
8
  };
9
9
  export declare const ResetPasswordForm: FC<ForgotPasswordFormProps>;
10
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAA6B,MAAM,OAAO,CAAC;AAGrE,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,uBAAuB,CA0GzD,CAAC"}
1
+ {"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAA6B,MAAM,OAAO,CAAC;AAGrE,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,uBAAuB,CA2GzD,CAAC"}
@@ -84,6 +84,7 @@ const ResetPasswordForm = ({
84
84
  {
85
85
  className: "mt-12 w-full",
86
86
  type: "submit",
87
+ color: "text",
87
88
  isLoading: isSubmitting,
88
89
  disabled: !isValid || submissionState.isFrozen,
89
90
  variant: isSubmitted ? "outline" : "default",
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordForm.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getResetPasswordContent } from './index.content';\nimport {\n getResetPasswordSchema,\n type ResetPassword,\n} from './ResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onSubmitError: (error: Error) => void;\n onClickBackToLogin: () => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = getResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = getResetPasswordContent();\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text\n : sendRecoveryEmailButton.text;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;AAiBO,MAAM,oBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsB;AACtB,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,wBAAwB;AAC5B,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ACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,aAAa,WAAW;AAAA,YACxB,YAAU;AAAA,YACV,cAAa;AAAA,YACb,WAAW;AAAA,YACX,WAAW;AAAA,UAAA;AAAA,QAAA,GAEf;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,WAAW;AAAA,YACX,UAAU,CAAC,WAAW,gBAAgB;AAAA,YACtC,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,wBAAwB;AAAA,YAE9B,UAAoB,oBAAA;AAAA,UAAA;AAAA,QACvB;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,kBAAkB;AAAA,YACzB,SAAS;AAAA,YAER,UAAkB,kBAAA;AAAA,UAAA;AAAA,QACrB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
1
+ {"version":3,"file":"ResetPasswordForm.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getResetPasswordContent } from './index.content';\nimport {\n getResetPasswordSchema,\n type ResetPassword,\n} from './ResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onClickBackToLogin: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = getResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = getResetPasswordContent();\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text\n : sendRecoveryEmailButton.text;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text}\n </Form.Button>\n )}\n </Form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AA;AAI5B,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC,kCAAAA,IAAA,OAAA,EAAI,WAAU,yBACb,UAAAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW;AAAA,YAClB,aAAa,WAAW;AAAA,YACxB,YAAU;AAAA,YACV,cAAa;AAAA,YACb,WAAW;AAAA,YACX,WAAW;AAAA,UAAA;AAAA,QAAA,GAEf;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC,WAAW,gBAAgB;AAAA,YACtC,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,wBAAwB;AAAA,YAE9B,UAAoB,oBAAA;AAAA,UAAA;AAAA,QACvB;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,kBAAkB;AAAA,YACzB,SAAS;AAAA,YAER,UAAkB,kBAAA;AAAA,UAAA;AAAA,QACrB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -1,18 +1,18 @@
1
1
  export declare const getResetPasswordContent: () => {
2
2
  emailInput: {
3
- label: string;
4
- placeholder: string;
3
+ label: any;
4
+ placeholder: any;
5
5
  };
6
6
  sendRecoveryEmailButton: {
7
- text: string;
8
- ariaLabel: string;
7
+ text: any;
8
+ ariaLabel: any;
9
9
  };
10
10
  resendRecoveryEmailButton: {
11
- text: string;
11
+ text: any;
12
12
  };
13
- resendInText: string;
13
+ resendInText: any;
14
14
  backToLoginButton: {
15
- text: string;
15
+ text: any;
16
16
  };
17
17
  };
18
18
  //# sourceMappingURL=index.content.d.ts.map
@@ -56,7 +56,7 @@ const SignInForm = ({
56
56
  className: "ml-auto mt-2 block",
57
57
  variant: "link",
58
58
  label: signInContent.forgotPasswordLink.ariaLabel,
59
- color: "primary",
59
+ color: "text",
60
60
  onClick: onClickForgotPassword,
61
61
  children: signInContent.forgotPasswordLink.text
62
62
  }
@@ -66,19 +66,20 @@ const SignInForm = ({
66
66
  {
67
67
  className: "mt-12 w-full",
68
68
  type: "submit",
69
+ color: "text",
69
70
  isLoading: isSubmitting,
70
71
  label: signInContent.loginButton.ariaLabel,
71
72
  children: signInContent.loginButton.text
72
73
  }
73
74
  ),
74
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full justify-center text-xs", children: [
75
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs", children: [
75
76
  signInContent.signUpLink.message,
76
77
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
77
78
  components_Form_layout_FormItemLayout.Form.Button,
78
79
  {
79
80
  variant: "link",
80
81
  label: signInContent.signUpLink.ariaLabel,
81
- color: "primary",
82
+ color: "text",
82
83
  onClick: onClickSignUp,
83
84
  children: signInContent.signUpLink.text
84
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.cjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onSubmitError: (error: Error) => void;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"primary\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"primary\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["getSignInSchema","useForm","getSignInContent","jsxs","Fragment","Form","jsx","ExternalsLoginButtons"],"mappings":";;;;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAeA,wCAAAA;AACrB,QAAM,EAAE,MAAM,aAAa,IAAIC,iCAAQ,YAAY;AACnD,QAAM,gBAAgBC,yCAAAA;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C1BG,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,qDACCE,4DAAsB,uBAAA,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"SignInForm.cjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["getSignInSchema","useForm","getSignInContent","jsxs","Fragment","Form","jsx","ExternalsLoginButtons"],"mappings":";;;;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAeA,wCAAAA;AACrB,QAAM,EAAE,MAAM,aAAa,IAAIC,iCAAQ,YAAY;AACnD,QAAM,gBAAgBC,yCAAAA;AAEtB,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAD,2BAAA,kBAAA;AAAA,MAACE,sCAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY;AAAA,QACZ,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAA;AAAA,UAACF,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAAG,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,WAAW;AAAA,gBAChC,aAAa,cAAc,WAAW;AAAA,gBACtC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,YAEAC,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,cAAc;AAAA,gBACnC,aAAa,cAAc,cAAc;AAAA,gBACzC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,UAAA,GACF;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAO,cAAc,mBAAmB;AAAA,cACxC,OAAM;AAAA,cACN,SAAS;AAAA,cAER,wBAAc,mBAAmB;AAAA,YAAA;AAAA,UACpC;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAW;AAAA,cACX,OAAO,cAAc,YAAY;AAAA,cAEhC,wBAAc,YAAY;AAAA,YAAA;AAAA,UAC7B;AAAA,UAEAF,2BAAAA,kBAAAA,KAAC,QAAK,EAAA,WAAU,mGACb,UAAA;AAAA,YAAA,cAAc,WAAW;AAAA,YAC1BG,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,qDACCE,4DAAsB,uBAAA,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;;"}
@@ -2,9 +2,9 @@ import { FC } from 'react';
2
2
  import { SignIn } from './SignInSchema';
3
3
  type SignInFormProps = {
4
4
  onSubmitSuccess: (data: SignIn) => Promise<void>;
5
- onSubmitError: (error: Error) => void;
6
5
  onClickForgotPassword: () => void;
7
6
  onClickSignUp: () => void;
7
+ onSubmitError?: (error: Error) => void;
8
8
  };
9
9
  export declare const SignInForm: FC<SignInFormProps>;
10
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwE1C,CAAC"}
1
+ {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAyE1C,CAAC"}