@intlayer/design-system 3.5.0 → 3.5.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 (344) hide show
  1. package/dist/Form-BDcoNTLV.cjs.map +1 -1
  2. package/dist/Form-DhsgC7kB.js.map +1 -1
  3. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  4. package/dist/components/Accordion/Accordion.mjs.map +1 -1
  5. package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
  6. package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
  7. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
  8. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
  9. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +1 -1
  10. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +1 -1
  11. package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +1 -1
  12. package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +1 -1
  13. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
  14. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
  15. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
  16. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
  17. package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
  18. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
  19. package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
  20. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  21. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  22. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +1 -1
  23. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +1 -1
  24. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
  25. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
  26. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
  27. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
  28. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
  29. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
  30. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
  31. package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
  32. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
  33. package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
  34. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
  35. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
  36. package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
  37. package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
  38. package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
  39. package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
  40. package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
  41. package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
  42. package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
  43. package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
  44. package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
  45. package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
  46. package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
  47. package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
  48. package/dist/components/Auth/useAuth/index.cjs.map +1 -1
  49. package/dist/components/Auth/useAuth/index.mjs.map +1 -1
  50. package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
  51. package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
  52. package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
  53. package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
  54. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  55. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  56. package/dist/components/Auth/useUser/index.cjs.map +1 -1
  57. package/dist/components/Auth/useUser/index.mjs.map +1 -1
  58. package/dist/components/Avatar/index.cjs.map +1 -1
  59. package/dist/components/Avatar/index.mjs.map +1 -1
  60. package/dist/components/Badge/index.cjs.map +1 -1
  61. package/dist/components/Badge/index.mjs.map +1 -1
  62. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  63. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  64. package/dist/components/Button/Button.cjs.map +1 -1
  65. package/dist/components/Button/Button.mjs.map +1 -1
  66. package/dist/components/Command/index.cjs.map +1 -1
  67. package/dist/components/Command/index.mjs.map +1 -1
  68. package/dist/components/Container/index.cjs.map +1 -1
  69. package/dist/components/Container/index.mjs.map +1 -1
  70. package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
  71. package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
  72. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  73. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  74. package/dist/components/CopyToClipboard/index.cjs.map +1 -1
  75. package/dist/components/CopyToClipboard/index.mjs.map +1 -1
  76. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  77. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  78. package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
  79. package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
  80. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  81. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  82. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  83. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  84. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  85. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  86. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  87. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  88. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
  89. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
  90. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -1
  91. package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +1 -1
  95. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
  99. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
  101. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  103. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
  105. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  107. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  109. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  110. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  111. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  112. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  114. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  115. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  116. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  117. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  118. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  119. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  120. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  121. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  122. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  123. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  124. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  125. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  127. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  129. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  130. package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.cjs.map +1 -1
  131. package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.mjs.map +1 -1
  132. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  133. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  134. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
  135. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
  136. package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
  137. package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
  138. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  139. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  140. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  141. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  142. package/dist/components/DropDown/index.cjs.map +1 -1
  143. package/dist/components/DropDown/index.mjs.map +1 -1
  144. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  145. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  146. package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
  147. package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
  148. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  149. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  150. package/dist/components/Footer/index.cjs.map +1 -1
  151. package/dist/components/Footer/index.mjs.map +1 -1
  152. package/dist/components/Form/FormBase.cjs.map +1 -1
  153. package/dist/components/Form/FormBase.mjs.map +1 -1
  154. package/dist/components/Form/FormControl.cjs.map +1 -1
  155. package/dist/components/Form/FormControl.mjs.map +1 -1
  156. package/dist/components/Form/FormDescription.cjs.map +1 -1
  157. package/dist/components/Form/FormDescription.mjs.map +1 -1
  158. package/dist/components/Form/FormField.cjs.map +1 -1
  159. package/dist/components/Form/FormField.mjs.map +1 -1
  160. package/dist/components/Form/FormItem.cjs.map +1 -1
  161. package/dist/components/Form/FormItem.mjs.map +1 -1
  162. package/dist/components/Form/FormLabel.cjs.map +1 -1
  163. package/dist/components/Form/FormLabel.mjs.map +1 -1
  164. package/dist/components/Form/FormMessage.cjs.map +1 -1
  165. package/dist/components/Form/FormMessage.mjs.map +1 -1
  166. package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
  167. package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
  168. package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
  169. package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
  170. package/dist/components/Headers/SectionScroller.cjs.map +1 -1
  171. package/dist/components/Headers/SectionScroller.mjs.map +1 -1
  172. package/dist/components/Headers/index.cjs.map +1 -1
  173. package/dist/components/Headers/index.mjs.map +1 -1
  174. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  175. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  176. package/dist/components/IDE/FileList.cjs.map +1 -1
  177. package/dist/components/IDE/FileList.mjs.map +1 -1
  178. package/dist/components/IDE/FileTree.cjs.map +1 -1
  179. package/dist/components/IDE/FileTree.mjs.map +1 -1
  180. package/dist/components/IDE/IDE.cjs +1 -1
  181. package/dist/components/IDE/IDE.cjs.map +1 -1
  182. package/dist/components/IDE/IDE.mjs +1 -1
  183. package/dist/components/IDE/IDE.mjs.map +1 -1
  184. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  185. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  186. package/dist/components/IDE/createFileTree.cjs.map +1 -1
  187. package/dist/components/IDE/createFileTree.mjs.map +1 -1
  188. package/dist/components/Input/Checkbox.cjs.map +1 -1
  189. package/dist/components/Input/Checkbox.mjs.map +1 -1
  190. package/dist/components/Input/Input.cjs.map +1 -1
  191. package/dist/components/Input/Input.mjs.map +1 -1
  192. package/dist/components/Input/InputPassword.cjs.map +1 -1
  193. package/dist/components/Input/InputPassword.mjs.map +1 -1
  194. package/dist/components/Link/Link.cjs.map +1 -1
  195. package/dist/components/Link/Link.mjs.map +1 -1
  196. package/dist/components/Loader/spinner.cjs.map +1 -1
  197. package/dist/components/Loader/spinner.mjs.map +1 -1
  198. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  199. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  200. package/dist/components/Logo/LogoCircle.cjs.map +1 -1
  201. package/dist/components/Logo/LogoCircle.mjs.map +1 -1
  202. package/dist/components/Logo/LogoNoFrame.cjs.map +1 -1
  203. package/dist/components/Logo/LogoNoFrame.mjs.map +1 -1
  204. package/dist/components/Logo/LogoSquare.cjs.map +1 -1
  205. package/dist/components/Logo/LogoSquare.mjs.map +1 -1
  206. package/dist/components/Logo/LogoSquircle.cjs.map +1 -1
  207. package/dist/components/Logo/LogoSquircle.mjs.map +1 -1
  208. package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
  209. package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
  210. package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +1 -1
  211. package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +1 -1
  212. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +1 -1
  213. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +1 -1
  214. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +1 -1
  215. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +1 -1
  216. package/dist/components/Logo/LogoWithTextCircle.cjs.map +1 -1
  217. package/dist/components/Logo/LogoWithTextCircle.mjs.map +1 -1
  218. package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +1 -1
  219. package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +1 -1
  220. package/dist/components/Logo/LogoWithTextSquircle.cjs.map +1 -1
  221. package/dist/components/Logo/LogoWithTextSquircle.mjs.map +1 -1
  222. package/dist/components/Logo/index.cjs.map +1 -1
  223. package/dist/components/Logo/index.mjs.map +1 -1
  224. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  225. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  226. package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
  227. package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
  228. package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
  229. package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
  230. package/dist/components/Modal/Modal.cjs.map +1 -1
  231. package/dist/components/Modal/Modal.mjs.map +1 -1
  232. package/dist/components/Navbar/Burger.cjs.map +1 -1
  233. package/dist/components/Navbar/Burger.mjs.map +1 -1
  234. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  235. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  236. package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
  237. package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
  238. package/dist/components/Navbar/index.cjs.map +1 -1
  239. package/dist/components/Navbar/index.mjs.map +1 -1
  240. package/dist/components/Navbar/useNavigation.cjs.map +1 -1
  241. package/dist/components/Navbar/useNavigation.mjs.map +1 -1
  242. package/dist/components/Pattern/DotPattern.cjs.map +1 -1
  243. package/dist/components/Pattern/DotPattern.mjs.map +1 -1
  244. package/dist/components/Pattern/GridPattern.cjs.map +1 -1
  245. package/dist/components/Pattern/GridPattern.mjs.map +1 -1
  246. package/dist/components/Pattern/SpotLight.cjs.map +1 -1
  247. package/dist/components/Pattern/SpotLight.mjs.map +1 -1
  248. package/dist/components/Popover/index.cjs.map +1 -1
  249. package/dist/components/Popover/index.mjs.map +1 -1
  250. package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
  251. package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
  252. package/dist/components/ProfileDropDown/index.cjs.map +1 -1
  253. package/dist/components/ProfileDropDown/index.mjs.map +1 -1
  254. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  255. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  256. package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
  257. package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
  258. package/dist/components/Select/Multiselect.cjs.map +1 -1
  259. package/dist/components/Select/Multiselect.mjs.map +1 -1
  260. package/dist/components/Select/Select.cjs.map +1 -1
  261. package/dist/components/Select/Select.mjs.map +1 -1
  262. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  263. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  264. package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
  265. package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
  266. package/dist/components/Tag/index.cjs.map +1 -1
  267. package/dist/components/Tag/index.mjs.map +1 -1
  268. package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
  269. package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
  270. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  271. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  272. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
  273. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
  274. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
  275. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
  276. package/dist/components/Toaster/Toast.cjs.map +1 -1
  277. package/dist/components/Toaster/Toast.mjs.map +1 -1
  278. package/dist/components/Toaster/Toaster.cjs.map +1 -1
  279. package/dist/components/Toaster/Toaster.mjs.map +1 -1
  280. package/dist/components/Toaster/useToast.cjs.map +1 -1
  281. package/dist/components/Toaster/useToast.mjs.map +1 -1
  282. package/dist/components/WithResizer/index.cjs.map +1 -1
  283. package/dist/components/WithResizer/index.mjs.map +1 -1
  284. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  285. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  286. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  287. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  288. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  289. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  290. package/dist/hooks/useDevice.cjs.map +1 -1
  291. package/dist/hooks/useDevice.mjs.map +1 -1
  292. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  293. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  294. package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
  295. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  296. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  297. package/dist/hooks/useIsMounted.cjs.map +1 -1
  298. package/dist/hooks/useIsMounted.mjs.map +1 -1
  299. package/dist/hooks/useItemSelector.cjs.map +1 -1
  300. package/dist/hooks/useItemSelector.mjs.map +1 -1
  301. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  302. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  303. package/dist/hooks/useScrollBlockage/index.cjs.map +1 -1
  304. package/dist/hooks/useScrollBlockage/index.mjs.map +1 -1
  305. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.map +1 -1
  306. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
  307. package/dist/hooks/useScrollDetection.cjs.map +1 -1
  308. package/dist/hooks/useScrollDetection.mjs.map +1 -1
  309. package/dist/index-BtZWYJhL.cjs.map +1 -1
  310. package/dist/index-D9oaKvKC.js.map +1 -1
  311. package/dist/jsx-runtime-DaNGiM0W.js.map +1 -1
  312. package/dist/jsx-runtime-XHKiWCTo.cjs.map +1 -1
  313. package/dist/libs/intlayer-api/auth.cjs.map +1 -1
  314. package/dist/libs/intlayer-api/auth.mjs.map +1 -1
  315. package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
  316. package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
  317. package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
  318. package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
  319. package/dist/libs/intlayer-api/organization.cjs.map +1 -1
  320. package/dist/libs/intlayer-api/organization.mjs.map +1 -1
  321. package/dist/libs/intlayer-api/project.cjs.map +1 -1
  322. package/dist/libs/intlayer-api/project.mjs.map +1 -1
  323. package/dist/libs/intlayer-api/stripe.cjs.map +1 -1
  324. package/dist/libs/intlayer-api/stripe.mjs.map +1 -1
  325. package/dist/libs/intlayer-api/user.cjs.map +1 -1
  326. package/dist/libs/intlayer-api/user.mjs.map +1 -1
  327. package/dist/shallow-lhDIFtEp.cjs.map +1 -1
  328. package/dist/shallow-m9BpCkKh.js.map +1 -1
  329. package/dist/tailwind.config.cjs.map +1 -1
  330. package/dist/tailwind.config.mjs.map +1 -1
  331. package/dist/tailwind.css +1 -1
  332. package/dist/utils/camelCase.cjs.map +1 -1
  333. package/dist/utils/camelCase.mjs.map +1 -1
  334. package/dist/utils/capitalize.cjs.map +1 -1
  335. package/dist/utils/capitalize.mjs.map +1 -1
  336. package/dist/utils/dictionary.cjs.map +1 -1
  337. package/dist/utils/dictionary.mjs.map +1 -1
  338. package/dist/utils/isElementAtTopAndNotCovered.cjs.map +1 -1
  339. package/dist/utils/isElementAtTopAndNotCovered.mjs.map +1 -1
  340. package/dist/utils/object.cjs.map +1 -1
  341. package/dist/utils/object.mjs.map +1 -1
  342. package/dist/zod-BV4nCGJE.js.map +1 -1
  343. package/dist/zod-DSrtTSD_.cjs.map +1 -1
  344. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"Form-BDcoNTLV.cjs","sources":["../src/components/Form/layout/FormItemLayout.tsx","../src/components/Form/elements/FormElement.tsx","../src/components/Form/elements/InputElement.tsx","../src/components/Form/elements/InputPasswordElement.tsx","../src/components/Form/elements/TextAreaElement.tsx","../src/components/Form/elements/EditableFieldInputElement.tsx","../src/components/Form/elements/EditableFieldTextAreaElement.tsx","../src/components/Form/elements/CheckboxElement.tsx","../src/components/Form/elements/MultiselectElement.tsx","../src/components/Form/elements/SelectElement.tsx","../src/components/Form/elements/SwitchSelectorElement.tsx","../src/components/Form/Form.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n}) => (\n <Form.Item className=\"w-full space-y-2\">\n <div className=\"space-y-1 leading-none\">\n <FormLabelLayout isRequired={isRequired} info={info} htmlFor={htmlFor}>\n {label}\n </FormLabelLayout>\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { ComponentProps, ElementType, ReactNode } from 'react';\nimport {\n useFormContext,\n type ControllerRenderProps,\n type FieldValues,\n} from 'react-hook-form';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout, FormItemLayoutProps } from '../layout';\n\nexport type FormElementProps<T extends ElementType> = {\n name: string;\n Element: T;\n label?: ReactNode;\n isRequired?: boolean;\n info?: string;\n showErrorMessage?: boolean;\n focus?: boolean;\n} & Omit<FormItemLayoutProps, 'children'>;\n\ntype FormFieldElementProps<T extends ElementType> = FormElementProps<T> &\n ComponentProps<T> & {\n field: ControllerRenderProps<FieldValues, string>;\n };\n\nconst FormFieldElement = <T extends ElementType>({\n field,\n name,\n label,\n Element,\n isRequired = false,\n info,\n description,\n showErrorMessage = true,\n ...props\n}: FormFieldElementProps<T>) => {\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Element data-testid=\"element\" id={name} {...field} {...props}>\n {props.children}\n </Element>\n </FormItemLayout>\n );\n};\n\n/**\n * FormElement is a component that allows you to create a form element with a label, description, error message, and validation.\n *\n * The Element prop is the type of the element that will be rendered.\n * This element will interact with the FormContext and will be controlled by the FormControl component.\n * The props used to control the element will be `value` and `onChange`.\n */\nexport const FormElement = <T extends ElementType>(\n props: FormElementProps<T> & ComponentProps<T>\n) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={props.name}\n render={({ field }) => <FormFieldElement {...props} field={field} />}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { Input } from '../../../components/Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputElementProps = Omit<FormElementProps<typeof Input>, 'Element'> &\n ComponentProps<typeof Input> & {\n name: string;\n };\n\nexport const InputElement: FC<InputElementProps> = (props) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={Input}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { InputPassword } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputPasswordElementProps = Omit<\n FormElementProps<typeof InputPassword>,\n 'Element'\n> &\n ComponentProps<typeof InputPassword> & {\n name: string;\n autoComplete: 'current-password' | 'new-password';\n };\n\nexport const InputPasswordElement: FC<InputPasswordElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={InputPassword}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { FC } from 'react';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype TextAreaElementsProps = Omit<\n FormElementProps<typeof TextArea>,\n 'Element'\n> &\n React.ComponentProps<typeof TextArea> & {\n name: string;\n };\n\nexport const TextAreaElement: FC<TextAreaElementsProps> = (props) => (\n <FormElement\n Element={TextArea}\n id={props.name}\n data-testid={props.name}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldInput } from '../../EditableField/EditableFieldInput';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldInputElementProps = Omit<\n FormElementProps<typeof EditableFieldInput>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldInput>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldInputElement = (\n props: EditableFieldInputElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldInput}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldTextArea } from '../../EditableField/EditableFieldTextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldTextAreaElementProps = Omit<\n FormElementProps<typeof EditableFieldTextArea>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldTextArea>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldTextAreaElement = (\n props: EditableFieldTextAreaElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldTextArea}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport { forwardRef, type ComponentProps, type FC } from 'react';\nimport { Checkbox } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype CheckboxElementProps = Omit<FormElementProps<typeof Checkbox>, 'Element'> &\n ComponentProps<typeof Checkbox> & {\n name: string;\n inputLabel?: string;\n };\n\ntype CheckboxComponentProps = Omit<ComponentProps<typeof Checkbox>, 'label'> & {\n name: string;\n inputLabel?: ComponentProps<typeof Checkbox>['label'];\n};\n\nconst CheckboxComponent = forwardRef<HTMLInputElement, CheckboxComponentProps>(\n ({ inputLabel, ...props }, ref) => (\n <Checkbox ref={ref} {...props} label={inputLabel} />\n )\n);\nCheckboxComponent.displayName = 'CheckboxComponent';\n\nexport const CheckboxElement: FC<CheckboxElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={CheckboxComponent}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelect } from '../../Select/Multiselect';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<\n FormElementProps<typeof MultiSelect>,\n 'Element'\n> &\n ComponentProps<typeof MultiSelect> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const MultiSelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <MultiSelect\n onValueChange={field.onChange}\n values={field.value}\n {...props}\n >\n {children}\n </MultiSelect>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../../Select/Select';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<FormElementProps<typeof Select>, 'Element'> &\n ComponentProps<typeof Select> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Select\n onValueChange={field.onChange}\n defaultValue={field.value}\n {...props}\n >\n {children}\n </Select>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SwitchSelector } from '../../SwitchSelector';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SwitchSelectorElementProps = Omit<\n FormElementProps<typeof SwitchSelector>,\n 'Element'\n> &\n ComponentProps<typeof SwitchSelector> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SwitchSelectorElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SwitchSelectorElementProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <SwitchSelector {...field} {...props}>\n {children}\n </SwitchSelector>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport { Button } from '../Button';\nimport {\n FormElement,\n InputElement,\n InputPasswordElement,\n TextAreaElement,\n} from './elements';\nimport { CheckboxElement } from './elements/CheckboxElement';\nimport { EditableFieldInputElement } from './elements/EditableFieldInputElement';\nimport { EditableFieldTextAreaElement } from './elements/EditableFieldTextAreaElement';\nimport { MultiSelectElement } from './elements/MultiselectElement';\nimport { SelectElement } from './elements/SelectElement';\nimport { SwitchSelectorElement } from './elements/SwitchSelectorElement';\nimport { Form as FormRoot } from './FormBase';\nimport { FormControl } from './FormControl';\nimport { FormDescription } from './FormDescription';\nimport { FormField } from './FormField';\nimport { FormItem } from './FormItem';\nimport { FormMessage } from './FormMessage';\nimport { FormLabelLayout } from './layout';\n\ntype FormType = typeof FormRoot & {\n Description: typeof FormDescription;\n Control: typeof FormControl;\n Field: typeof FormField;\n Item: typeof FormItem;\n Label: typeof FormLabelLayout;\n Message: typeof FormMessage;\n Element: typeof FormElement;\n Button: typeof Button;\n Input: typeof InputElement;\n InputPassword: typeof InputPasswordElement;\n Checkbox: typeof CheckboxElement;\n TextArea: typeof TextAreaElement;\n MultiSelect: typeof MultiSelectElement;\n Select: typeof SelectElement;\n EditableFieldInput: typeof EditableFieldInputElement;\n EditableFieldTextArea: typeof EditableFieldTextAreaElement;\n SwitchSelector: typeof SwitchSelectorElement;\n};\n\n/**\n * Form components\n *\n * Example of usage:\n * ```jsx\n * <Form\n * schema={ZodSchema}\n * onSubmitSuccess={onSubmitSuccess}\n * onSubmitError={onSubmitError}\n * autoComplete\n * >\n * <Form.Input name=\"name\" label=\"Name\" />\n * <Form.Button type=\"submit\" label=\"Click to submit\">\n * Submit\n * </Form.Button>\n * </Form>\n * ```\n */\nexport const Form = FormRoot as FormType;\nForm.Description = FormDescription;\nForm.Control = FormControl;\nForm.Field = FormField;\nForm.Item = FormItem;\nForm.Label = FormLabelLayout;\nForm.Message = FormMessage;\nForm.Element = FormElement;\nForm.Input = InputElement;\nForm.InputPassword = InputPasswordElement;\nForm.Checkbox = CheckboxElement;\nForm.TextArea = TextAreaElement;\nForm.Button = Button;\nForm.Select = SelectElement;\nForm.MultiSelect = MultiSelectElement;\nForm.EditableFieldInput = EditableFieldInputElement;\nForm.EditableFieldTextArea = EditableFieldTextAreaElement;\nForm.SwitchSelector = SwitchSelectorElement;\n"],"names":["jsxs","jsx","FormLabelLayout","useFormField","useFormContext","Input","InputPassword","TextArea","EditableFieldInput","EditableFieldTextArea","forwardRef","Checkbox","MultiSelect","Select","SwitchSelector","FormRoot","FormDescription","FormControl","FormField","FormItem","FormMessage","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,iBAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AACF,MACGA,2BAAAA,kBAAAA,KAAA,KAAK,MAAL,EAAU,WAAU,oBACnB,UAAA;AAAA,EAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI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B;AAC7B,KAAK,iBAAiB;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Form-BDcoNTLV.cjs","sources":["../src/components/Form/layout/FormItemLayout.tsx","../src/components/Form/elements/FormElement.tsx","../src/components/Form/elements/InputElement.tsx","../src/components/Form/elements/InputPasswordElement.tsx","../src/components/Form/elements/TextAreaElement.tsx","../src/components/Form/elements/EditableFieldInputElement.tsx","../src/components/Form/elements/EditableFieldTextAreaElement.tsx","../src/components/Form/elements/CheckboxElement.tsx","../src/components/Form/elements/MultiselectElement.tsx","../src/components/Form/elements/SelectElement.tsx","../src/components/Form/elements/SwitchSelectorElement.tsx","../src/components/Form/Form.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n}) => (\n <Form.Item className=\"w-full space-y-2\">\n <div className=\"space-y-1 leading-none\">\n <FormLabelLayout isRequired={isRequired} info={info} htmlFor={htmlFor}>\n {label}\n </FormLabelLayout>\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { ComponentProps, ElementType, ReactNode } from 'react';\nimport {\n useFormContext,\n type ControllerRenderProps,\n type FieldValues,\n} from 'react-hook-form';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout, FormItemLayoutProps } from '../layout';\n\nexport type FormElementProps<T extends ElementType> = {\n name: string;\n Element: T;\n label?: ReactNode;\n isRequired?: boolean;\n info?: string;\n showErrorMessage?: boolean;\n focus?: boolean;\n} & Omit<FormItemLayoutProps, 'children'>;\n\ntype FormFieldElementProps<T extends ElementType> = FormElementProps<T> &\n ComponentProps<T> & {\n field: ControllerRenderProps<FieldValues, string>;\n };\n\nconst FormFieldElement = <T extends ElementType>({\n field,\n name,\n label,\n Element,\n isRequired = false,\n info,\n description,\n showErrorMessage = true,\n ...props\n}: FormFieldElementProps<T>) => {\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Element data-testid=\"element\" id={name} {...field} {...props}>\n {props.children}\n </Element>\n </FormItemLayout>\n );\n};\n\n/**\n * FormElement is a component that allows you to create a form element with a label, description, error message, and validation.\n *\n * The Element prop is the type of the element that will be rendered.\n * This element will interact with the FormContext and will be controlled by the FormControl component.\n * The props used to control the element will be `value` and `onChange`.\n */\nexport const FormElement = <T extends ElementType>(\n props: FormElementProps<T> & ComponentProps<T>\n) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={props.name}\n render={({ field }) => <FormFieldElement {...props} field={field} />}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { Input } from '../../../components/Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputElementProps = Omit<FormElementProps<typeof Input>, 'Element'> &\n ComponentProps<typeof Input> & {\n name: string;\n };\n\nexport const InputElement: FC<InputElementProps> = (props) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={Input}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { InputPassword } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputPasswordElementProps = Omit<\n FormElementProps<typeof InputPassword>,\n 'Element'\n> &\n ComponentProps<typeof InputPassword> & {\n name: string;\n autoComplete: 'current-password' | 'new-password';\n };\n\nexport const InputPasswordElement: FC<InputPasswordElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={InputPassword}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { FC } from 'react';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype TextAreaElementsProps = Omit<\n FormElementProps<typeof TextArea>,\n 'Element'\n> &\n React.ComponentProps<typeof TextArea> & {\n name: string;\n };\n\nexport const TextAreaElement: FC<TextAreaElementsProps> = (props) => (\n <FormElement\n Element={TextArea}\n id={props.name}\n data-testid={props.name}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldInput } from '../../EditableField/EditableFieldInput';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldInputElementProps = Omit<\n FormElementProps<typeof EditableFieldInput>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldInput>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldInputElement = (\n props: EditableFieldInputElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldInput}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldTextArea } from '../../EditableField/EditableFieldTextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldTextAreaElementProps = Omit<\n FormElementProps<typeof EditableFieldTextArea>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldTextArea>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldTextAreaElement = (\n props: EditableFieldTextAreaElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldTextArea}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport { forwardRef, type ComponentProps, type FC } from 'react';\nimport { Checkbox } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype CheckboxElementProps = Omit<FormElementProps<typeof Checkbox>, 'Element'> &\n ComponentProps<typeof Checkbox> & {\n name: string;\n inputLabel?: string;\n };\n\ntype CheckboxComponentProps = Omit<ComponentProps<typeof Checkbox>, 'label'> & {\n name: string;\n inputLabel?: ComponentProps<typeof Checkbox>['label'];\n};\n\nconst CheckboxComponent = forwardRef<HTMLInputElement, CheckboxComponentProps>(\n ({ inputLabel, ...props }, ref) => (\n <Checkbox ref={ref} {...props} label={inputLabel} />\n )\n);\nCheckboxComponent.displayName = 'CheckboxComponent';\n\nexport const CheckboxElement: FC<CheckboxElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={CheckboxComponent}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelect } from '../../Select/Multiselect';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<\n FormElementProps<typeof MultiSelect>,\n 'Element'\n> &\n ComponentProps<typeof MultiSelect> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const MultiSelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <MultiSelect\n onValueChange={field.onChange}\n values={field.value}\n {...props}\n >\n {children}\n </MultiSelect>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../../Select/Select';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<FormElementProps<typeof Select>, 'Element'> &\n ComponentProps<typeof Select> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Select\n onValueChange={field.onChange}\n defaultValue={field.value}\n {...props}\n >\n {children}\n </Select>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SwitchSelector } from '../../SwitchSelector';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SwitchSelectorElementProps = Omit<\n FormElementProps<typeof SwitchSelector>,\n 'Element'\n> &\n ComponentProps<typeof SwitchSelector> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SwitchSelectorElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SwitchSelectorElementProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <SwitchSelector {...field} {...props}>\n {children}\n </SwitchSelector>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport { Button } from '../Button';\nimport {\n FormElement,\n InputElement,\n InputPasswordElement,\n TextAreaElement,\n} from './elements';\nimport { CheckboxElement } from './elements/CheckboxElement';\nimport { EditableFieldInputElement } from './elements/EditableFieldInputElement';\nimport { EditableFieldTextAreaElement } from './elements/EditableFieldTextAreaElement';\nimport { MultiSelectElement } from './elements/MultiselectElement';\nimport { SelectElement } from './elements/SelectElement';\nimport { SwitchSelectorElement } from './elements/SwitchSelectorElement';\nimport { Form as FormRoot } from './FormBase';\nimport { FormControl } from './FormControl';\nimport { FormDescription } from './FormDescription';\nimport { FormField } from './FormField';\nimport { FormItem } from './FormItem';\nimport { FormMessage } from './FormMessage';\nimport { FormLabelLayout } from './layout';\n\ntype FormType = typeof FormRoot & {\n Description: typeof FormDescription;\n Control: typeof FormControl;\n Field: typeof FormField;\n Item: typeof FormItem;\n Label: typeof FormLabelLayout;\n Message: typeof FormMessage;\n Element: typeof FormElement;\n Button: typeof Button;\n Input: typeof InputElement;\n InputPassword: typeof InputPasswordElement;\n Checkbox: typeof CheckboxElement;\n TextArea: typeof TextAreaElement;\n MultiSelect: typeof MultiSelectElement;\n Select: typeof SelectElement;\n EditableFieldInput: typeof EditableFieldInputElement;\n EditableFieldTextArea: typeof EditableFieldTextAreaElement;\n SwitchSelector: typeof SwitchSelectorElement;\n};\n\n/**\n * Form components\n *\n * Example of usage:\n * ```jsx\n * <Form\n * schema={ZodSchema}\n * onSubmitSuccess={onSubmitSuccess}\n * onSubmitError={onSubmitError}\n * autoComplete\n * >\n * <Form.Input name=\"name\" label=\"Name\" />\n * <Form.Button type=\"submit\" label=\"Click to submit\">\n * Submit\n * </Form.Button>\n * </Form>\n * ```\n */\nexport const Form = FormRoot as FormType;\nForm.Description = FormDescription;\nForm.Control = FormControl;\nForm.Field = FormField;\nForm.Item = FormItem;\nForm.Label = FormLabelLayout;\nForm.Message = FormMessage;\nForm.Element = FormElement;\nForm.Input = InputElement;\nForm.InputPassword = InputPasswordElement;\nForm.Checkbox = CheckboxElement;\nForm.TextArea = TextAreaElement;\nForm.Button = Button;\nForm.Select = SelectElement;\nForm.MultiSelect = MultiSelectElement;\nForm.EditableFieldInput = EditableFieldInputElement;\nForm.EditableFieldTextArea = EditableFieldTextAreaElement;\nForm.SwitchSelector = SwitchSelectorElement;\n"],"names":["jsxs","jsx","FormLabelLayout","useFormField","useFormContext","Input","InputPassword","TextArea","EditableFieldInput","EditableFieldTextArea","forwardRef","Checkbox","MultiSelect","Select","SwitchSelector","FormRoot","FormDescription","FormControl","FormField","FormItem","FormMessage","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,iBAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AACF,MACGA,2BAAAA,kBAAAA,KAAA,KAAK,MAAL,EAAU,WAAU,oBACnB,UAAA;AAAA,EAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,0BACb,UAAA;AAAA,IAAAC,2BAAA,kBAAA,IAACC,uCAAgB,iBAAA,EAAA,YAAwB,MAAY,SAClD,UACH,OAAA;AAAA,IACC,eAAeD,2BAAA,kBAAA,IAAC,KAAK,aAAL,EAAkB,UAAY,YAAA,CAAA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/FormItemLayout.tsx","../src/components/Form/elements/FormElement.tsx","../src/components/Form/elements/InputElement.tsx","../src/components/Form/elements/InputPasswordElement.tsx","../src/components/Form/elements/TextAreaElement.tsx","../src/components/Form/elements/EditableFieldInputElement.tsx","../src/components/Form/elements/EditableFieldTextAreaElement.tsx","../src/components/Form/elements/CheckboxElement.tsx","../src/components/Form/elements/MultiselectElement.tsx","../src/components/Form/elements/SelectElement.tsx","../src/components/Form/elements/SwitchSelectorElement.tsx","../src/components/Form/Form.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n}) => (\n <Form.Item className=\"w-full space-y-2\">\n <div className=\"space-y-1 leading-none\">\n <FormLabelLayout isRequired={isRequired} info={info} htmlFor={htmlFor}>\n {label}\n </FormLabelLayout>\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { ComponentProps, ElementType, ReactNode } from 'react';\nimport {\n useFormContext,\n type ControllerRenderProps,\n type FieldValues,\n} from 'react-hook-form';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout, FormItemLayoutProps } from '../layout';\n\nexport type FormElementProps<T extends ElementType> = {\n name: string;\n Element: T;\n label?: ReactNode;\n isRequired?: boolean;\n info?: string;\n showErrorMessage?: boolean;\n focus?: boolean;\n} & Omit<FormItemLayoutProps, 'children'>;\n\ntype FormFieldElementProps<T extends ElementType> = FormElementProps<T> &\n ComponentProps<T> & {\n field: ControllerRenderProps<FieldValues, string>;\n };\n\nconst FormFieldElement = <T extends ElementType>({\n field,\n name,\n label,\n Element,\n isRequired = false,\n info,\n description,\n showErrorMessage = true,\n ...props\n}: FormFieldElementProps<T>) => {\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Element data-testid=\"element\" id={name} {...field} {...props}>\n {props.children}\n </Element>\n </FormItemLayout>\n );\n};\n\n/**\n * FormElement is a component that allows you to create a form element with a label, description, error message, and validation.\n *\n * The Element prop is the type of the element that will be rendered.\n * This element will interact with the FormContext and will be controlled by the FormControl component.\n * The props used to control the element will be `value` and `onChange`.\n */\nexport const FormElement = <T extends ElementType>(\n props: FormElementProps<T> & ComponentProps<T>\n) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={props.name}\n render={({ field }) => <FormFieldElement {...props} field={field} />}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { Input } from '../../../components/Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputElementProps = Omit<FormElementProps<typeof Input>, 'Element'> &\n ComponentProps<typeof Input> & {\n name: string;\n };\n\nexport const InputElement: FC<InputElementProps> = (props) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={Input}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { InputPassword } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputPasswordElementProps = Omit<\n FormElementProps<typeof InputPassword>,\n 'Element'\n> &\n ComponentProps<typeof InputPassword> & {\n name: string;\n autoComplete: 'current-password' | 'new-password';\n };\n\nexport const InputPasswordElement: FC<InputPasswordElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={InputPassword}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { FC } from 'react';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype TextAreaElementsProps = Omit<\n FormElementProps<typeof TextArea>,\n 'Element'\n> &\n React.ComponentProps<typeof TextArea> & {\n name: string;\n };\n\nexport const TextAreaElement: FC<TextAreaElementsProps> = (props) => (\n <FormElement\n Element={TextArea}\n id={props.name}\n data-testid={props.name}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldInput } from '../../EditableField/EditableFieldInput';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldInputElementProps = Omit<\n FormElementProps<typeof EditableFieldInput>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldInput>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldInputElement = (\n props: EditableFieldInputElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldInput}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldTextArea } from '../../EditableField/EditableFieldTextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldTextAreaElementProps = Omit<\n FormElementProps<typeof EditableFieldTextArea>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldTextArea>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldTextAreaElement = (\n props: EditableFieldTextAreaElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldTextArea}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport { forwardRef, type ComponentProps, type FC } from 'react';\nimport { Checkbox } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype CheckboxElementProps = Omit<FormElementProps<typeof Checkbox>, 'Element'> &\n ComponentProps<typeof Checkbox> & {\n name: string;\n inputLabel?: string;\n };\n\ntype CheckboxComponentProps = Omit<ComponentProps<typeof Checkbox>, 'label'> & {\n name: string;\n inputLabel?: ComponentProps<typeof Checkbox>['label'];\n};\n\nconst CheckboxComponent = forwardRef<HTMLInputElement, CheckboxComponentProps>(\n ({ inputLabel, ...props }, ref) => (\n <Checkbox ref={ref} {...props} label={inputLabel} />\n )\n);\nCheckboxComponent.displayName = 'CheckboxComponent';\n\nexport const CheckboxElement: FC<CheckboxElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={CheckboxComponent}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelect } from '../../Select/Multiselect';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<\n FormElementProps<typeof MultiSelect>,\n 'Element'\n> &\n ComponentProps<typeof MultiSelect> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const MultiSelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <MultiSelect\n onValueChange={field.onChange}\n values={field.value}\n {...props}\n >\n {children}\n </MultiSelect>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../../Select/Select';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<FormElementProps<typeof Select>, 'Element'> &\n ComponentProps<typeof Select> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Select\n onValueChange={field.onChange}\n defaultValue={field.value}\n {...props}\n >\n {children}\n </Select>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SwitchSelector } from '../../SwitchSelector';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SwitchSelectorElementProps = Omit<\n FormElementProps<typeof SwitchSelector>,\n 'Element'\n> &\n ComponentProps<typeof SwitchSelector> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SwitchSelectorElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SwitchSelectorElementProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <SwitchSelector {...field} {...props}>\n {children}\n </SwitchSelector>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport { Button } from '../Button';\nimport {\n FormElement,\n InputElement,\n InputPasswordElement,\n TextAreaElement,\n} from './elements';\nimport { CheckboxElement } from './elements/CheckboxElement';\nimport { EditableFieldInputElement } from './elements/EditableFieldInputElement';\nimport { EditableFieldTextAreaElement } from './elements/EditableFieldTextAreaElement';\nimport { MultiSelectElement } from './elements/MultiselectElement';\nimport { SelectElement } from './elements/SelectElement';\nimport { SwitchSelectorElement } from './elements/SwitchSelectorElement';\nimport { Form as FormRoot } from './FormBase';\nimport { FormControl } from './FormControl';\nimport { FormDescription } from './FormDescription';\nimport { FormField } from './FormField';\nimport { FormItem } from './FormItem';\nimport { FormMessage } from './FormMessage';\nimport { FormLabelLayout } from './layout';\n\ntype FormType = typeof FormRoot & {\n Description: typeof FormDescription;\n Control: typeof FormControl;\n Field: typeof FormField;\n Item: typeof FormItem;\n Label: typeof FormLabelLayout;\n Message: typeof FormMessage;\n Element: typeof FormElement;\n Button: typeof Button;\n Input: typeof InputElement;\n InputPassword: typeof InputPasswordElement;\n Checkbox: typeof CheckboxElement;\n TextArea: typeof TextAreaElement;\n MultiSelect: typeof MultiSelectElement;\n Select: typeof SelectElement;\n EditableFieldInput: typeof EditableFieldInputElement;\n EditableFieldTextArea: typeof EditableFieldTextAreaElement;\n SwitchSelector: typeof SwitchSelectorElement;\n};\n\n/**\n * Form components\n *\n * Example of usage:\n * ```jsx\n * <Form\n * schema={ZodSchema}\n * onSubmitSuccess={onSubmitSuccess}\n * onSubmitError={onSubmitError}\n * autoComplete\n * >\n * <Form.Input name=\"name\" label=\"Name\" />\n * <Form.Button type=\"submit\" label=\"Click to submit\">\n * Submit\n * </Form.Button>\n * </Form>\n * ```\n */\nexport const Form = FormRoot as FormType;\nForm.Description = FormDescription;\nForm.Control = FormControl;\nForm.Field = FormField;\nForm.Item = FormItem;\nForm.Label = FormLabelLayout;\nForm.Message = FormMessage;\nForm.Element = FormElement;\nForm.Input = InputElement;\nForm.InputPassword = InputPasswordElement;\nForm.Checkbox = CheckboxElement;\nForm.TextArea = TextAreaElement;\nForm.Button = Button;\nForm.Select = SelectElement;\nForm.MultiSelect = MultiSelectElement;\nForm.EditableFieldInput = EditableFieldInputElement;\nForm.EditableFieldTextArea = EditableFieldTextAreaElement;\nForm.SwitchSelector = SwitchSelectorElement;\n"],"names":["jsxs","jsx","FormRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,iBAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AACF,MACGA,kCAAAA,KAAA,KAAK,MAAL,EAAU,WAAU,oBACnB,UAAA;AAAA,EAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,0BACb,UAAA;AAAA,IAAAC,kCAAA,IAAC,iBAAgB,EAAA,YAAwB,MAAY,SAClD,UACH,OAAA;AAAA,IACC,eAAeA,kCAAA,IAAC,KAAK,aAAL,EAAkB,UAAY,aAAA;AAAA,EAAA,GACjD;AAAA,EACCA,kCAAAA,IAAA,KAAK,SAAL,EAAc,SAAS,CAAA;AAAA,EAEvB,oBAAqBA,kCAAA,IAAA,KAAK,SAAL,EAAa,eAAY,iBAAgB;AAAA,EACjE,CAAA;ACHF,MAAM,mBAAmB,CAAwB;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AA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gBAAgB,EAAA,GAAG,OAAQ,GAAG,OAC5B,UACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAGN;AAAA,IAAA;AAAA,EAAA;AAGN;ACCO,MAAM,OAAOC;AACpB,KAAK,cAAc;AACnB,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,OAAO;AACZ,KAAK,QAAQ;AACb,KAAK,UAAU;AACf,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,gBAAgB;AACrB,KAAK,WAAW;AAChB,KAAK,WAAW;AAChB,KAAK,SAAS;AACd,KAAK,SAAS;AACd,KAAK,cAAc;AACnB,KAAK,qBAAqB;AAC1B,KAAK,wBAAwB;AAC7B,KAAK,iBAAiB;"}
1
+ {"version":3,"file":"Form-DhsgC7kB.js","sources":["../src/components/Form/layout/FormItemLayout.tsx","../src/components/Form/elements/FormElement.tsx","../src/components/Form/elements/InputElement.tsx","../src/components/Form/elements/InputPasswordElement.tsx","../src/components/Form/elements/TextAreaElement.tsx","../src/components/Form/elements/EditableFieldInputElement.tsx","../src/components/Form/elements/EditableFieldTextAreaElement.tsx","../src/components/Form/elements/CheckboxElement.tsx","../src/components/Form/elements/MultiselectElement.tsx","../src/components/Form/elements/SelectElement.tsx","../src/components/Form/elements/SwitchSelectorElement.tsx","../src/components/Form/Form.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n}) => (\n <Form.Item className=\"w-full space-y-2\">\n <div className=\"space-y-1 leading-none\">\n <FormLabelLayout isRequired={isRequired} info={info} htmlFor={htmlFor}>\n {label}\n </FormLabelLayout>\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { ComponentProps, ElementType, ReactNode } from 'react';\nimport {\n useFormContext,\n type ControllerRenderProps,\n type FieldValues,\n} from 'react-hook-form';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout, FormItemLayoutProps } from '../layout';\n\nexport type FormElementProps<T extends ElementType> = {\n name: string;\n Element: T;\n label?: ReactNode;\n isRequired?: boolean;\n info?: string;\n showErrorMessage?: boolean;\n focus?: boolean;\n} & Omit<FormItemLayoutProps, 'children'>;\n\ntype FormFieldElementProps<T extends ElementType> = FormElementProps<T> &\n ComponentProps<T> & {\n field: ControllerRenderProps<FieldValues, string>;\n };\n\nconst FormFieldElement = <T extends ElementType>({\n field,\n name,\n label,\n Element,\n isRequired = false,\n info,\n description,\n showErrorMessage = true,\n ...props\n}: FormFieldElementProps<T>) => {\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Element data-testid=\"element\" id={name} {...field} {...props}>\n {props.children}\n </Element>\n </FormItemLayout>\n );\n};\n\n/**\n * FormElement is a component that allows you to create a form element with a label, description, error message, and validation.\n *\n * The Element prop is the type of the element that will be rendered.\n * This element will interact with the FormContext and will be controlled by the FormControl component.\n * The props used to control the element will be `value` and `onChange`.\n */\nexport const FormElement = <T extends ElementType>(\n props: FormElementProps<T> & ComponentProps<T>\n) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={props.name}\n render={({ field }) => <FormFieldElement {...props} field={field} />}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { Input } from '../../../components/Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputElementProps = Omit<FormElementProps<typeof Input>, 'Element'> &\n ComponentProps<typeof Input> & {\n name: string;\n };\n\nexport const InputElement: FC<InputElementProps> = (props) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={Input}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { InputPassword } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputPasswordElementProps = Omit<\n FormElementProps<typeof InputPassword>,\n 'Element'\n> &\n ComponentProps<typeof InputPassword> & {\n name: string;\n autoComplete: 'current-password' | 'new-password';\n };\n\nexport const InputPasswordElement: FC<InputPasswordElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={InputPassword}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { FC } from 'react';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype TextAreaElementsProps = Omit<\n FormElementProps<typeof TextArea>,\n 'Element'\n> &\n React.ComponentProps<typeof TextArea> & {\n name: string;\n };\n\nexport const TextAreaElement: FC<TextAreaElementsProps> = (props) => (\n <FormElement\n Element={TextArea}\n id={props.name}\n data-testid={props.name}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldInput } from '../../EditableField/EditableFieldInput';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldInputElementProps = Omit<\n FormElementProps<typeof EditableFieldInput>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldInput>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldInputElement = (\n props: EditableFieldInputElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldInput}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldTextArea } from '../../EditableField/EditableFieldTextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldTextAreaElementProps = Omit<\n FormElementProps<typeof EditableFieldTextArea>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldTextArea>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldTextAreaElement = (\n props: EditableFieldTextAreaElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldTextArea}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport { forwardRef, type ComponentProps, type FC } from 'react';\nimport { Checkbox } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype CheckboxElementProps = Omit<FormElementProps<typeof Checkbox>, 'Element'> &\n ComponentProps<typeof Checkbox> & {\n name: string;\n inputLabel?: string;\n };\n\ntype CheckboxComponentProps = Omit<ComponentProps<typeof Checkbox>, 'label'> & {\n name: string;\n inputLabel?: ComponentProps<typeof Checkbox>['label'];\n};\n\nconst CheckboxComponent = forwardRef<HTMLInputElement, CheckboxComponentProps>(\n ({ inputLabel, ...props }, ref) => (\n <Checkbox ref={ref} {...props} label={inputLabel} />\n )\n);\nCheckboxComponent.displayName = 'CheckboxComponent';\n\nexport const CheckboxElement: FC<CheckboxElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={CheckboxComponent}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelect } from '../../Select/Multiselect';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<\n FormElementProps<typeof MultiSelect>,\n 'Element'\n> &\n ComponentProps<typeof MultiSelect> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const MultiSelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <MultiSelect\n onValueChange={field.onChange}\n values={field.value}\n {...props}\n >\n {children}\n </MultiSelect>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../../Select/Select';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<FormElementProps<typeof Select>, 'Element'> &\n ComponentProps<typeof Select> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Select\n onValueChange={field.onChange}\n defaultValue={field.value}\n {...props}\n >\n {children}\n </Select>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SwitchSelector } from '../../SwitchSelector';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SwitchSelectorElementProps = Omit<\n FormElementProps<typeof SwitchSelector>,\n 'Element'\n> &\n ComponentProps<typeof SwitchSelector> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SwitchSelectorElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SwitchSelectorElementProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <SwitchSelector {...field} {...props}>\n {children}\n </SwitchSelector>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport { Button } from '../Button';\nimport {\n FormElement,\n InputElement,\n InputPasswordElement,\n TextAreaElement,\n} from './elements';\nimport { CheckboxElement } from './elements/CheckboxElement';\nimport { EditableFieldInputElement } from './elements/EditableFieldInputElement';\nimport { EditableFieldTextAreaElement } from './elements/EditableFieldTextAreaElement';\nimport { MultiSelectElement } from './elements/MultiselectElement';\nimport { SelectElement } from './elements/SelectElement';\nimport { SwitchSelectorElement } from './elements/SwitchSelectorElement';\nimport { Form as FormRoot } from './FormBase';\nimport { FormControl } from './FormControl';\nimport { FormDescription } from './FormDescription';\nimport { FormField } from './FormField';\nimport { FormItem } from './FormItem';\nimport { FormMessage } from './FormMessage';\nimport { FormLabelLayout } from './layout';\n\ntype FormType = typeof FormRoot & {\n Description: typeof FormDescription;\n Control: typeof FormControl;\n Field: typeof FormField;\n Item: typeof FormItem;\n Label: typeof FormLabelLayout;\n Message: typeof FormMessage;\n Element: typeof FormElement;\n Button: typeof Button;\n Input: typeof InputElement;\n InputPassword: typeof InputPasswordElement;\n Checkbox: typeof CheckboxElement;\n TextArea: typeof TextAreaElement;\n MultiSelect: typeof MultiSelectElement;\n Select: typeof SelectElement;\n EditableFieldInput: typeof EditableFieldInputElement;\n EditableFieldTextArea: typeof EditableFieldTextAreaElement;\n SwitchSelector: typeof SwitchSelectorElement;\n};\n\n/**\n * Form components\n *\n * Example of usage:\n * ```jsx\n * <Form\n * schema={ZodSchema}\n * onSubmitSuccess={onSubmitSuccess}\n * onSubmitError={onSubmitError}\n * autoComplete\n * >\n * <Form.Input name=\"name\" label=\"Name\" />\n * <Form.Button type=\"submit\" label=\"Click to submit\">\n * Submit\n * </Form.Button>\n * </Form>\n * ```\n */\nexport const Form = FormRoot as FormType;\nForm.Description = FormDescription;\nForm.Control = FormControl;\nForm.Field = FormField;\nForm.Item = FormItem;\nForm.Label = FormLabelLayout;\nForm.Message = FormMessage;\nForm.Element = FormElement;\nForm.Input = InputElement;\nForm.InputPassword = InputPasswordElement;\nForm.Checkbox = CheckboxElement;\nForm.TextArea = TextAreaElement;\nForm.Button = Button;\nForm.Select = SelectElement;\nForm.MultiSelect = MultiSelectElement;\nForm.EditableFieldInput = EditableFieldInputElement;\nForm.EditableFieldTextArea = EditableFieldTextAreaElement;\nForm.SwitchSelector = SwitchSelectorElement;\n"],"names":["jsxs","jsx","FormRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,iBAA0C,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AACF,MACGA,kCAAAA,KAAA,KAAK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cAAc,MAAM;AAAA,gBACnB,GAAG;AAAA,gBAEH;AAAA,cAAA;AAAA,YAAA;AAAA,UACH;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AAEJ;ACvCO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAC1B,QAAA,EAAE,QAAQ,IAAI,eAAe;AAGjC,SAAAA,kCAAA;AAAA,IAAC,KAAK;AAAA,IAAL;AAAA,MACC;AAAA,MACA;AAAA,MACA,QAAQ,CAAC,EAAE,YAAY;AAEf,cAAA,EAAE,MAAM,IAAI,aAAa;AAG7B,eAAAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,gBAAc,CAAC,CAAC;AAAA,YAEhB,gDAAC,gBAAgB,EAAA,GAAG,OAAQ,GAAG,OAC5B,SACH,CAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AAEJ;ACCO,MAAM,OAAOC;AACpB,KAAK,cAAc;AACnB,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,OAAO;AACZ,KAAK,QAAQ;AACb,KAAK,UAAU;AACf,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,gBAAgB;AACrB,KAAK,WAAW;AAChB,KAAK,WAAW;AAChB,KAAK,SAAS;AACd,KAAK,SAAS;AACd,KAAK,cAAc;AACnB,KAAK,qBAAqB;AAC1B,KAAK,wBAAwB;AAC7B,KAAK,iBAAiB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.cjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { ChevronDown } from 'lucide-react';\nimport {\n useCallback,\n useEffect,\n useState,\n type FC,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonProps } from '../Button';\nimport { MaxHeightSmoother } from '../MaxHeightSmoother';\n\ntype AccordionProps = {\n identifier: string;\n header: ReactNode;\n children: ReactNode;\n isOpen?: boolean;\n} & ButtonProps;\n\n/**\n * Accordion component that allows the user to expand and collapse content.\n * It provides a header with a chevron icon that controls the visibility of the content.\n *\n * @param header - The content of the header.\n * @param children - The content to be expanded and collapsed.\n * @param isOpen - Whether the content is expanded or collapsed by default.\n *\n * @example\n * <Accordion header=\"Accordion Header\" isOpen={true}>\n * <p>Accordion content</p>\n * </Accordion>\n *\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n header,\n isOpen: isOpenDefault = false,\n onClick,\n ...props\n}) => {\n const [isOpen, setIsOpen] = useState(isOpenDefault);\n const isHidden = isOpen == undefined ? undefined : !isOpen;\n\n useEffect(() => {\n if (isOpenDefault != undefined) {\n setIsOpen(isOpenDefault);\n }\n }, [isOpenDefault]);\n\n const Icon = useCallback(\n () => (\n <ChevronDown\n size={16}\n className={cn(\n 'transform transition-transform duration-500 ease-in-out',\n isOpen ? 'rotate-0' : 'rotate-180'\n )}\n />\n ),\n [isOpen]\n );\n\n return (\n <>\n <Button\n variant=\"hoverable\"\n color=\"text\"\n onClick={(e) => {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n onClick?.(e);\n }}\n isFullWidth\n IconRight={Icon}\n {...props}\n >\n {header}\n </Button>\n\n <MaxHeightSmoother\n tabIndex={isHidden !== false ? undefined : -1}\n isHidden={isHidden}\n >\n {children}\n </MaxHeightSmoother>\n </>\n );\n};\n"],"names":["useState","useEffect","useCallback","jsx","ChevronDown","cn","jsxs","Fragment","Button","MaxHeightSmoother"],"mappings":";;;;;;;;;AAmCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,QAAQ,gBAAgB;AAAA,EACxB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAIA,oBAAS,aAAa;AAClD,QAAM,WAAW,UAAU,SAAY,SAAY,CAAC;AAEpDC,aAAAA,UAAU,MAAM;AACd,QAAI,iBAAiB,QAAW;AAC9B,gBAAU,aAAa;AAAA,IACzB;AAAA,EAAA,GACC,CAAC,aAAa,CAAC;AAElB,QAAM,OAAOC,WAAA;AAAA,IACX,MACEC,2BAAA,kBAAA;AAAA,MAACC,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,SAAS,aAAa;AAAA,QACxB;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,CAAC,MAAM;AAAA,EAAA;AAGT,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAJ,2BAAA,kBAAA;AAAA,MAACK,yBAAA;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAAS,CAAC,MAAM;AACJ,oBAAA,CAAC,eAAe,CAAC,UAAU;AACrC,oBAAU,CAAC;AAAA,QACb;AAAA,QACA,aAAW;AAAA,QACX,WAAW;AAAA,QACV,GAAG;AAAA,QAEH,UAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAEAL,2BAAA,kBAAA;AAAA,MAACM,mCAAA;AAAA,MAAA;AAAA,QACC,UAAU,aAAa,QAAQ,SAAY;AAAA,QAC3C;AAAA,QAEC;AAAA,MAAA;AAAA,IACH;AAAA,EACF,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"Accordion.cjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { ChevronDown } from 'lucide-react';\nimport {\n useCallback,\n useEffect,\n useState,\n type FC,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonProps } from '../Button';\nimport { MaxHeightSmoother } from '../MaxHeightSmoother';\n\ntype AccordionProps = {\n identifier: string;\n header: ReactNode;\n children: ReactNode;\n isOpen?: boolean;\n} & ButtonProps;\n\n/**\n * Accordion component that allows the user to expand and collapse content.\n * It provides a header with a chevron icon that controls the visibility of the content.\n *\n * @param header - The content of the header.\n * @param children - The content to be expanded and collapsed.\n * @param isOpen - Whether the content is expanded or collapsed by default.\n *\n * @example\n * <Accordion header=\"Accordion Header\" isOpen={true}>\n * <p>Accordion content</p>\n * </Accordion>\n *\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n header,\n isOpen: isOpenDefault = false,\n onClick,\n ...props\n}) => {\n const [isOpen, setIsOpen] = useState(isOpenDefault);\n const isHidden = isOpen == undefined ? undefined : !isOpen;\n\n useEffect(() => {\n if (isOpenDefault != undefined) {\n setIsOpen(isOpenDefault);\n }\n }, [isOpenDefault]);\n\n const Icon = useCallback(\n () => (\n <ChevronDown\n size={16}\n className={cn(\n 'transform transition-transform duration-500 ease-in-out',\n isOpen ? 'rotate-0' : 'rotate-180'\n )}\n />\n ),\n [isOpen]\n );\n\n return (\n <>\n <Button\n variant=\"hoverable\"\n color=\"text\"\n onClick={(e) => {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n onClick?.(e);\n }}\n isFullWidth\n IconRight={Icon}\n {...props}\n >\n {header}\n </Button>\n\n <MaxHeightSmoother\n tabIndex={isHidden !== false ? undefined : -1}\n isHidden={isHidden}\n >\n {children}\n </MaxHeightSmoother>\n </>\n );\n};\n"],"names":["useState","useEffect","useCallback","jsx","ChevronDown","cn","jsxs","Fragment","Button","MaxHeightSmoother"],"mappings":";;;;;;;;;AAmCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,QAAQ,gBAAgB;AAAA,EACxB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAIA,WAAAA,SAAS,aAAa;AAClD,QAAM,WAAW,UAAU,SAAY,SAAY,CAAC;AAEpDC,aAAAA,UAAU,MAAM;AACd,QAAI,iBAAiB,QAAW;AAC9B,gBAAU,aAAa;AAAA,IAAA;AAAA,EACzB,GACC,CAAC,aAAa,CAAC;AAElB,QAAM,OAAOC,WAAA;AAAA,IACX,MACEC,2BAAA,kBAAA;AAAA,MAACC,YAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,SAAS,aAAa;AAAA,QAAA;AAAA,MACxB;AAAA,IACF;AAAA,IAEF,CAAC,MAAM;AAAA,EACT;AAEA,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAJ,2BAAA,kBAAA;AAAA,MAACK,yBAAA;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAAS,CAAC,MAAM;AACJ,oBAAA,CAAC,eAAe,CAAC,UAAU;AACrC,oBAAU,CAAC;AAAA,QACb;AAAA,QACA,aAAW;AAAA,QACX,WAAW;AAAA,QACV,GAAG;AAAA,QAEH,UAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAEAL,2BAAA,kBAAA;AAAA,MAACM,mCAAA;AAAA,MAAA;AAAA,QACC,UAAU,aAAa,QAAQ,SAAY;AAAA,QAC3C;AAAA,QAEC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.mjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { ChevronDown } from 'lucide-react';\nimport {\n useCallback,\n useEffect,\n useState,\n type FC,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonProps } from '../Button';\nimport { MaxHeightSmoother } from '../MaxHeightSmoother';\n\ntype AccordionProps = {\n identifier: string;\n header: ReactNode;\n children: ReactNode;\n isOpen?: boolean;\n} & ButtonProps;\n\n/**\n * Accordion component that allows the user to expand and collapse content.\n * It provides a header with a chevron icon that controls the visibility of the content.\n *\n * @param header - The content of the header.\n * @param children - The content to be expanded and collapsed.\n * @param isOpen - Whether the content is expanded or collapsed by default.\n *\n * @example\n * <Accordion header=\"Accordion Header\" isOpen={true}>\n * <p>Accordion content</p>\n * </Accordion>\n *\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n header,\n isOpen: isOpenDefault = false,\n onClick,\n ...props\n}) => {\n const [isOpen, setIsOpen] = useState(isOpenDefault);\n const isHidden = isOpen == undefined ? undefined : !isOpen;\n\n useEffect(() => {\n if (isOpenDefault != undefined) {\n setIsOpen(isOpenDefault);\n }\n }, [isOpenDefault]);\n\n const Icon = useCallback(\n () => (\n <ChevronDown\n size={16}\n className={cn(\n 'transform transition-transform duration-500 ease-in-out',\n isOpen ? 'rotate-0' : 'rotate-180'\n )}\n />\n ),\n [isOpen]\n );\n\n return (\n <>\n <Button\n variant=\"hoverable\"\n color=\"text\"\n onClick={(e) => {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n onClick?.(e);\n }}\n isFullWidth\n IconRight={Icon}\n {...props}\n >\n {header}\n </Button>\n\n <MaxHeightSmoother\n tabIndex={isHidden !== false ? undefined : -1}\n isHidden={isHidden}\n >\n {children}\n </MaxHeightSmoother>\n </>\n );\n};\n"],"names":["jsx","jsxs","Fragment"],"mappings":";;;;;;;AAmCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,QAAQ,gBAAgB;AAAA,EACxB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,aAAa;AAClD,QAAM,WAAW,UAAU,SAAY,SAAY,CAAC;AAEpD,YAAU,MAAM;AACd,QAAI,iBAAiB,QAAW;AAC9B,gBAAU,aAAa;AAAA,IACzB;AAAA,EAAA,GACC,CAAC,aAAa,CAAC;AAElB,QAAM,OAAO;AAAA,IACX,MACEA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAW;AAAA,UACT;AAAA,UACA,SAAS,aAAa;AAAA,QACxB;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,CAAC,MAAM;AAAA,EAAA;AAGT,SAEIC,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAF,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAAS,CAAC,MAAM;AACJ,oBAAA,CAAC,eAAe,CAAC,UAAU;AACrC,oBAAU,CAAC;AAAA,QACb;AAAA,QACA,aAAW;AAAA,QACX,WAAW;AAAA,QACV,GAAG;AAAA,QAEH,UAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAEAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAU,aAAa,QAAQ,SAAY;AAAA,QAC3C;AAAA,QAEC;AAAA,MAAA;AAAA,IACH;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Accordion.mjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { ChevronDown } from 'lucide-react';\nimport {\n useCallback,\n useEffect,\n useState,\n type FC,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonProps } from '../Button';\nimport { MaxHeightSmoother } from '../MaxHeightSmoother';\n\ntype AccordionProps = {\n identifier: string;\n header: ReactNode;\n children: ReactNode;\n isOpen?: boolean;\n} & ButtonProps;\n\n/**\n * Accordion component that allows the user to expand and collapse content.\n * It provides a header with a chevron icon that controls the visibility of the content.\n *\n * @param header - The content of the header.\n * @param children - The content to be expanded and collapsed.\n * @param isOpen - Whether the content is expanded or collapsed by default.\n *\n * @example\n * <Accordion header=\"Accordion Header\" isOpen={true}>\n * <p>Accordion content</p>\n * </Accordion>\n *\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n header,\n isOpen: isOpenDefault = false,\n onClick,\n ...props\n}) => {\n const [isOpen, setIsOpen] = useState(isOpenDefault);\n const isHidden = isOpen == undefined ? undefined : !isOpen;\n\n useEffect(() => {\n if (isOpenDefault != undefined) {\n setIsOpen(isOpenDefault);\n }\n }, [isOpenDefault]);\n\n const Icon = useCallback(\n () => (\n <ChevronDown\n size={16}\n className={cn(\n 'transform transition-transform duration-500 ease-in-out',\n isOpen ? 'rotate-0' : 'rotate-180'\n )}\n />\n ),\n [isOpen]\n );\n\n return (\n <>\n <Button\n variant=\"hoverable\"\n color=\"text\"\n onClick={(e) => {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n onClick?.(e);\n }}\n isFullWidth\n IconRight={Icon}\n {...props}\n >\n {header}\n </Button>\n\n <MaxHeightSmoother\n tabIndex={isHidden !== false ? undefined : -1}\n isHidden={isHidden}\n >\n {children}\n </MaxHeightSmoother>\n </>\n );\n};\n"],"names":["jsx","jsxs","Fragment"],"mappings":";;;;;;;AAmCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,QAAQ,gBAAgB;AAAA,EACxB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,aAAa;AAClD,QAAM,WAAW,UAAU,SAAY,SAAY,CAAC;AAEpD,YAAU,MAAM;AACd,QAAI,iBAAiB,QAAW;AAC9B,gBAAU,aAAa;AAAA,IAAA;AAAA,EACzB,GACC,CAAC,aAAa,CAAC;AAElB,QAAM,OAAO;AAAA,IACX,MACEA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAW;AAAA,UACT;AAAA,UACA,SAAS,aAAa;AAAA,QAAA;AAAA,MACxB;AAAA,IACF;AAAA,IAEF,CAAC,MAAM;AAAA,EACT;AAEA,SAEIC,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAF,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAAS,CAAC,MAAM;AACJ,oBAAA,CAAC,eAAe,CAAC,UAAU;AACrC,oBAAU,CAAC;AAAA,QACb;AAAA,QACA,aAAW;AAAA,QACX,WAAW;AAAA,QACV,GAAG;AAAA,QAEH,UAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAEAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAU,aAAa,QAAQ,SAAY;AAAA,QAC3C;AAAA,QAEC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/Auth/AuthModal/index.tsx"],"sourcesContent":["'use client';\n\nimport type { UserAPI } from '@intlayer/backend';\nimport { useState, type FC } from 'react';\nimport {\n useAskResetPassword,\n useChangePassword,\n useLogin,\n useRegister,\n} from '../../../hooks';\nimport { Modal } from '../../Modal/Modal';\nimport { type ChangePassword, ChangePasswordForm } from '../ChangePasswordForm';\nimport { type ResetPassword, ResetPasswordForm } from '../ResetPasswordForm';\nimport { type SignIn, SignInForm } from '../SignInForm';\nimport { type SignUp, SignUpForm } from '../SignUpForm';\n\nenum AuthState {\n SignIn,\n SignUp,\n ResetPassword,\n ChangePassword,\n}\n\ntype AuthModalProps = {\n onClose: () => void;\n isOpen: boolean;\n state?: AuthState.SignIn;\n onSignInSuccess?: (data: UserAPI) => Promise<void>;\n onSignUpSuccess?: (data: UserAPI) => Promise<void>;\n onResetPasswordSuccess?: (data: UserAPI) => Promise<void>;\n onChangePasswordSuccess?: (data: UserAPI) => Promise<void>;\n};\n\nexport const AuthModal: FC<AuthModalProps> = ({\n onClose,\n isOpen,\n state: initialState = AuthState.SignIn,\n onSignInSuccess,\n onSignUpSuccess,\n onResetPasswordSuccess,\n onChangePasswordSuccess,\n}) => {\n const [state, setState] = useState<AuthState>(initialState);\n const { login } = useLogin();\n const { register } = useRegister();\n const { askResetPassword } = useAskResetPassword();\n const { changePassword } = useChangePassword();\n\n const onSubmitSignInSuccess = async ({ email, password }: SignIn) =>\n await login({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignInSuccess?.(response.data);\n }\n });\n\n const onSubmitSignUpSuccess = async ({ email, password }: SignUp) =>\n await register({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignUpSuccess?.(response.data);\n }\n });\n\n const onSubmitResetPasswordSuccess = async ({ email }: ResetPassword) =>\n await askResetPassword(email).then(async (response) => {\n if (response?.data) {\n await onResetPasswordSuccess?.(response.data);\n }\n });\n\n const onSubmitChangePasswordSuccess = async ({\n currentPassword,\n newPassword,\n }: ChangePassword) =>\n await changePassword({\n oldPassword: currentPassword,\n newPassword,\n }).then(async (response) => {\n if (response?.data) {\n await onChangePasswordSuccess?.(response.data);\n }\n });\n\n return (\n <Modal onClose={onClose} isOpen={isOpen}>\n {state === AuthState.SignIn && (\n <SignInForm\n onSubmitSuccess={onSubmitSignInSuccess}\n onClickForgotPassword={() => setState(AuthState.ResetPassword)}\n onClickSignUp={() => setState(AuthState.SignUp)}\n />\n )}\n {state === AuthState.SignUp && (\n <SignUpForm\n onSubmitSuccess={onSubmitSignUpSuccess}\n onClickBackToSignIn={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ResetPassword && (\n <ResetPasswordForm\n onSubmitSuccess={onSubmitResetPasswordSuccess}\n onClickBackToLogin={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ChangePassword && (\n <ChangePasswordForm\n onSubmitSuccess={onSubmitChangePasswordSuccess}\n onClickBackToHome={() => setState(AuthState.SignIn)}\n />\n )}\n </Modal>\n );\n};\n"],"names":["useState","useLogin","useRegister","useAskResetPassword","useChangePassword","jsxs","Modal","jsx","SignInForm","SignUpForm","ResetPasswordForm","ChangePasswordForm"],"mappings":";;;;;;;;;;;;;;;;;AAiCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAIA,oBAAoB,YAAY;AACpD,QAAA,E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AAAA,MAAA;AAAA,IAChD;AAAA,IAED,UAAU,KACTD,2BAAA,kBAAA;AAAA,MAACE,sCAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,qBAAqB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACtD;AAAA,IAED,UAAU,KACTF,2BAAA,kBAAA;AAAA,MAACG,oDAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,oBAAoB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACrD;AAAA,IAED,UAAU,KACTH,2BAAA,kBAAA;AAAA,MAACI,sDAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,mBAAmB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACpD;AAAA,EAEJ,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/Auth/AuthModal/index.tsx"],"sourcesContent":["'use client';\n\nimport type { UserAPI } from '@intlayer/backend';\nimport { useState, type FC } from 'react';\nimport {\n useAskResetPassword,\n useChangePassword,\n useLogin,\n useRegister,\n} from '../../../hooks';\nimport { Modal } from '../../Modal/Modal';\nimport { type ChangePassword, ChangePasswordForm } from '../ChangePasswordForm';\nimport { type ResetPassword, ResetPasswordForm } from '../ResetPasswordForm';\nimport { type SignIn, SignInForm } from '../SignInForm';\nimport { type SignUp, SignUpForm } from '../SignUpForm';\n\nenum AuthState {\n SignIn,\n SignUp,\n ResetPassword,\n ChangePassword,\n}\n\ntype AuthModalProps = {\n onClose: () => void;\n isOpen: boolean;\n state?: AuthState.SignIn;\n onSignInSuccess?: (data: UserAPI) => Promise<void>;\n onSignUpSuccess?: (data: UserAPI) => Promise<void>;\n onResetPasswordSuccess?: (data: UserAPI) => Promise<void>;\n onChangePasswordSuccess?: (data: UserAPI) => Promise<void>;\n};\n\nexport const AuthModal: FC<AuthModalProps> = ({\n onClose,\n isOpen,\n state: initialState = AuthState.SignIn,\n onSignInSuccess,\n onSignUpSuccess,\n onResetPasswordSuccess,\n onChangePasswordSuccess,\n}) => {\n const [state, setState] = useState<AuthState>(initialState);\n const { login } = useLogin();\n const { register } = useRegister();\n const { askResetPassword } = useAskResetPassword();\n const { changePassword } = useChangePassword();\n\n const onSubmitSignInSuccess = async ({ email, password }: SignIn) =>\n await login({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignInSuccess?.(response.data);\n }\n });\n\n const onSubmitSignUpSuccess = async ({ email, password }: SignUp) =>\n await register({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignUpSuccess?.(response.data);\n }\n });\n\n const onSubmitResetPasswordSuccess = async ({ email }: ResetPassword) =>\n await askResetPassword(email).then(async (response) => {\n if (response?.data) {\n await onResetPasswordSuccess?.(response.data);\n }\n });\n\n const onSubmitChangePasswordSuccess = async ({\n currentPassword,\n newPassword,\n }: ChangePassword) =>\n await changePassword({\n oldPassword: currentPassword,\n newPassword,\n }).then(async (response) => {\n if (response?.data) {\n await onChangePasswordSuccess?.(response.data);\n }\n });\n\n return (\n <Modal onClose={onClose} isOpen={isOpen}>\n {state === AuthState.SignIn && (\n <SignInForm\n onSubmitSuccess={onSubmitSignInSuccess}\n onClickForgotPassword={() => setState(AuthState.ResetPassword)}\n onClickSignUp={() => setState(AuthState.SignUp)}\n />\n )}\n {state === AuthState.SignUp && (\n <SignUpForm\n onSubmitSuccess={onSubmitSignUpSuccess}\n onClickBackToSignIn={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ResetPassword && (\n <ResetPasswordForm\n onSubmitSuccess={onSubmitResetPasswordSuccess}\n onClickBackToLogin={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ChangePassword && (\n <ChangePasswordForm\n onSubmitSuccess={onSubmitChangePasswordSuccess}\n onClickBackToHome={() => setState(AuthState.SignIn)}\n />\n )}\n </Modal>\n );\n};\n"],"names":["useState","useLogin","useRegister","useAskResetPassword","useChangePassword","jsxs","Modal","jsx","SignInForm","SignUpForm","ResetPasswordForm","ChangePasswordForm"],"mappings":";;;;;;;;;;;;;;;;;AAiCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAIA,WAAAA,SAAoB,YAAY;AACpD,QAAA,EAAE,MAAM,IAAIC,gCAAS;AACrB,QAAA,EAAE,SAAS,IAAIC,mCAAY;AAC3B,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAC3C,QAAA,EAAE,eAAe,IAAIC,yCAAkB;AAE7C,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,MAAM;AAAA,IACV;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IAAA;AAAA,EACvC,CACD;AAEH,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,SAAS;AAAA,IACb;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IAAA;AAAA,EACvC,CACD;AAEG,QAAA,+BAA+B,OAAO,EAAE,YAC5C,MAAM,iBAAiB,KAAK,EAAE,KAAK,OAAO,aAAa;AACrD,QAAI,UAAU,MAAM;AACZ,YAAA,yBAAyB,SAAS,IAAI;AAAA,IAAA;AAAA,EAC9C,CACD;AAEH,QAAM,gCAAgC,OAAO;AAAA,IAC3C;AAAA,IACA;AAAA,EACF,MACE,MAAM,eAAe;AAAA,IACnB,aAAa;AAAA,IACb;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,0BAA0B,SAAS,IAAI;AAAA,IAAA;AAAA,EAC/C,CACD;AAGD,SAAAC,2BAAA,kBAAA,KAACC,uBAAM,OAAA,EAAA,SAAkB,QACtB,UAAA;AAAA,IAAA,UAAU,KACTC,2BAAA,kBAAA;AAAA,MAACC,sCAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,uBAAuB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAuB;AAAA,QAC7D,eAAe,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IAChD;AAAA,IAED,UAAU,KACTD,2BAAA,kBAAA;AAAA,MAACE,sCAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,qBAAqB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACtD;AAAA,IAED,UAAU,KACTF,2BAAA,kBAAA;AAAA,MAACG,oDAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,oBAAoB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACrD;AAAA,IAED,UAAU,KACTH,2BAAA,kBAAA;AAAA,MAACI,sDAAA;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,mBAAmB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpD,GAEJ;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/AuthModal/index.tsx"],"sourcesContent":["'use client';\n\nimport type { UserAPI } from '@intlayer/backend';\nimport { useState, type FC } from 'react';\nimport {\n useAskResetPassword,\n useChangePassword,\n useLogin,\n useRegister,\n} from '../../../hooks';\nimport { Modal } from '../../Modal/Modal';\nimport { type ChangePassword, ChangePasswordForm } from '../ChangePasswordForm';\nimport { type ResetPassword, ResetPasswordForm } from '../ResetPasswordForm';\nimport { type SignIn, SignInForm } from '../SignInForm';\nimport { type SignUp, SignUpForm } from '../SignUpForm';\n\nenum AuthState {\n SignIn,\n SignUp,\n ResetPassword,\n ChangePassword,\n}\n\ntype AuthModalProps = {\n onClose: () => void;\n isOpen: boolean;\n state?: AuthState.SignIn;\n onSignInSuccess?: (data: UserAPI) => Promise<void>;\n onSignUpSuccess?: (data: UserAPI) => Promise<void>;\n onResetPasswordSuccess?: (data: UserAPI) => Promise<void>;\n onChangePasswordSuccess?: (data: UserAPI) => Promise<void>;\n};\n\nexport const AuthModal: FC<AuthModalProps> = ({\n onClose,\n isOpen,\n state: initialState = AuthState.SignIn,\n onSignInSuccess,\n onSignUpSuccess,\n onResetPasswordSuccess,\n onChangePasswordSuccess,\n}) => {\n const [state, setState] = useState<AuthState>(initialState);\n const { login } = useLogin();\n const { register } = useRegister();\n const { askResetPassword } = useAskResetPassword();\n const { changePassword } = useChangePassword();\n\n const onSubmitSignInSuccess = async ({ email, password }: SignIn) =>\n await login({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignInSuccess?.(response.data);\n }\n });\n\n const onSubmitSignUpSuccess = async ({ email, password }: SignUp) =>\n await register({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignUpSuccess?.(response.data);\n }\n });\n\n const onSubmitResetPasswordSuccess = async ({ email }: ResetPassword) =>\n await askResetPassword(email).then(async (response) => {\n if (response?.data) {\n await onResetPasswordSuccess?.(response.data);\n }\n });\n\n const onSubmitChangePasswordSuccess = async ({\n currentPassword,\n newPassword,\n }: ChangePassword) =>\n await changePassword({\n oldPassword: currentPassword,\n newPassword,\n }).then(async (response) => {\n if (response?.data) {\n await onChangePasswordSuccess?.(response.data);\n }\n });\n\n return (\n <Modal onClose={onClose} isOpen={isOpen}>\n {state === AuthState.SignIn && (\n <SignInForm\n onSubmitSuccess={onSubmitSignInSuccess}\n onClickForgotPassword={() => setState(AuthState.ResetPassword)}\n onClickSignUp={() => setState(AuthState.SignUp)}\n />\n )}\n {state === AuthState.SignUp && (\n <SignUpForm\n onSubmitSuccess={onSubmitSignUpSuccess}\n onClickBackToSignIn={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ResetPassword && (\n <ResetPasswordForm\n onSubmitSuccess={onSubmitResetPasswordSuccess}\n onClickBackToLogin={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ChangePassword && (\n <ChangePasswordForm\n onSubmitSuccess={onSubmitChangePasswordSuccess}\n onClickBackToHome={() => setState(AuthState.SignIn)}\n />\n )}\n </Modal>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;AAiCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAoB,YAAY;AACpD,QAAA,EAAE,UAAU;AACZ,QAAA,EAAE,aAAa;AACf,QAAA,EAAE,qBAAqB;AACvB,QAAA,EAAE,mBAAmB;AAE3B,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,MAAM;AAAA,IACV;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IACvC;AAAA,EAAA,CACD;AAEH,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,SAAS;AAAA,IACb;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IACvC;AAAA,EAAA,CACD;AAEG,QAAA,+BAA+B,OAAO,EAAE,YAC5C,MAAM,iBAAiB,KAAK,EAAE,KAAK,OAAO,aAAa;AACrD,QAAI,UAAU,MAAM;AACZ,YAAA,yBAAyB,SAAS,IAAI;AAAA,IAC9C;AAAA,EAAA,CACD;AAEH,QAAM,gCAAgC,OAAO;AAAA,IAC3C;AAAA,IACA;AAAA,EACF,MACE,MAAM,eAAe;AAAA,IACnB,aAAa;AAAA,IACb;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,0BAA0B,SAAS,IAAI;AAAA,IAC/C;AAAA,EAAA,CACD;AAGD,SAAAA,kCAAA,KAAC,OAAM,EAAA,SAAkB,QACtB,UAAA;AAAA,IAAA,UAAU,KACTC,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,uBAAuB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAuB;AAAA,QAC7D,eAAe,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IAChD;AAAA,IAED,UAAU,KACTA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,qBAAqB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACtD;AAAA,IAED,UAAU,KACTA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,oBAAoB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACrD;AAAA,IAED,UAAU,KACTA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,mBAAmB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACpD;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/AuthModal/index.tsx"],"sourcesContent":["'use client';\n\nimport type { UserAPI } from '@intlayer/backend';\nimport { useState, type FC } from 'react';\nimport {\n useAskResetPassword,\n useChangePassword,\n useLogin,\n useRegister,\n} from '../../../hooks';\nimport { Modal } from '../../Modal/Modal';\nimport { type ChangePassword, ChangePasswordForm } from '../ChangePasswordForm';\nimport { type ResetPassword, ResetPasswordForm } from '../ResetPasswordForm';\nimport { type SignIn, SignInForm } from '../SignInForm';\nimport { type SignUp, SignUpForm } from '../SignUpForm';\n\nenum AuthState {\n SignIn,\n SignUp,\n ResetPassword,\n ChangePassword,\n}\n\ntype AuthModalProps = {\n onClose: () => void;\n isOpen: boolean;\n state?: AuthState.SignIn;\n onSignInSuccess?: (data: UserAPI) => Promise<void>;\n onSignUpSuccess?: (data: UserAPI) => Promise<void>;\n onResetPasswordSuccess?: (data: UserAPI) => Promise<void>;\n onChangePasswordSuccess?: (data: UserAPI) => Promise<void>;\n};\n\nexport const AuthModal: FC<AuthModalProps> = ({\n onClose,\n isOpen,\n state: initialState = AuthState.SignIn,\n onSignInSuccess,\n onSignUpSuccess,\n onResetPasswordSuccess,\n onChangePasswordSuccess,\n}) => {\n const [state, setState] = useState<AuthState>(initialState);\n const { login } = useLogin();\n const { register } = useRegister();\n const { askResetPassword } = useAskResetPassword();\n const { changePassword } = useChangePassword();\n\n const onSubmitSignInSuccess = async ({ email, password }: SignIn) =>\n await login({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignInSuccess?.(response.data);\n }\n });\n\n const onSubmitSignUpSuccess = async ({ email, password }: SignUp) =>\n await register({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignUpSuccess?.(response.data);\n }\n });\n\n const onSubmitResetPasswordSuccess = async ({ email }: ResetPassword) =>\n await askResetPassword(email).then(async (response) => {\n if (response?.data) {\n await onResetPasswordSuccess?.(response.data);\n }\n });\n\n const onSubmitChangePasswordSuccess = async ({\n currentPassword,\n newPassword,\n }: ChangePassword) =>\n await changePassword({\n oldPassword: currentPassword,\n newPassword,\n }).then(async (response) => {\n if (response?.data) {\n await onChangePasswordSuccess?.(response.data);\n }\n });\n\n return (\n <Modal onClose={onClose} isOpen={isOpen}>\n {state === AuthState.SignIn && (\n <SignInForm\n onSubmitSuccess={onSubmitSignInSuccess}\n onClickForgotPassword={() => setState(AuthState.ResetPassword)}\n onClickSignUp={() => setState(AuthState.SignUp)}\n />\n )}\n {state === AuthState.SignUp && (\n <SignUpForm\n onSubmitSuccess={onSubmitSignUpSuccess}\n onClickBackToSignIn={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ResetPassword && (\n <ResetPasswordForm\n onSubmitSuccess={onSubmitResetPasswordSuccess}\n onClickBackToLogin={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ChangePassword && (\n <ChangePasswordForm\n onSubmitSuccess={onSubmitChangePasswordSuccess}\n onClickBackToHome={() => setState(AuthState.SignIn)}\n />\n )}\n </Modal>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;AAiCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAoB,YAAY;AACpD,QAAA,EAAE,MAAM,IAAI,SAAS;AACrB,QAAA,EAAE,SAAS,IAAI,YAAY;AAC3B,QAAA,EAAE,iBAAiB,IAAI,oBAAoB;AAC3C,QAAA,EAAE,eAAe,IAAI,kBAAkB;AAE7C,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,MAAM;AAAA,IACV;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IAAA;AAAA,EACvC,CACD;AAEH,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,SAAS;AAAA,IACb;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA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ticationBarrierClient.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;;"}
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,IAAA;AAAA,EAE/B,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,MACF;AAAA,IAAA;AAAA,KAED,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAC,2BAAA,kBAAA,IAACC,wBAAO,QAAA,EAAA,WAAuB,SAAS,CAAA;AACjD;;"}
@@ -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 '../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
+ {"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,IAAA;AAAA,EAE/B,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3C,YAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxC;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IAAA;AAAA,KAED,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 { 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
+ {"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,IACF;AAAA,EAAA;AAGK,SAAA;AACT;;"}
@@ -1 +1 @@
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
+ {"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,IACF;AAAA,EAAA;AAGK,SAAA;AACT;"}
@@ -1 +1 @@
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
+ {"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,EAAA;AAGlC,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EAAA;AAIpC,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAExC;;"}
@@ -1 +1 @@
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
+ {"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,EAAA;AAGlC,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EAAA;AAIpC,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAExC;"}
@@ -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 { useUser } from '../useUser';\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 { user } = useUser();\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.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\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","useUser","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;AAeO,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;AACvB,QAAA,EAAE,SAASC,8BAAAA;AACjB,QAAM,uBAAuBC,wDAAAA;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvCC,yBAAAA,QAAQ,o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AAS,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 { useUser } from '../useUser';\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 { user } = useUser();\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.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\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","useUser","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;AAeO,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,0EAAyB;AACvB,QAAA,EAAE,KAAK,IAAIC,sCAAQ;AACzB,QAAM,uBAAuBC,wDAAAA,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,aAAa,QAAQ,IAC/CC,iCAAQ,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,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"}
@@ -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 { useUser } from '../useUser';\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 { user } = useUser();\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.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\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":";;;;;;;AAeO,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;AACvB,QAAA,EAAE,SAAS;AACjB,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,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;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,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
+ {"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\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 { user } = useUser();\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.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\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":";;;;;;;AAeO,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;AACvB,QAAA,EAAE,KAAK,IAAI,QAAQ;AACzB,QAAM,uBAAuB,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,a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AA,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,QAAA;AAAA,MACpB;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChangePasswordSchema.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getChangePasswordSchema = () => {\n const requiredErrorPassword = t({\n en: 'Please enter your current password',\n fr: 'Veuillez saisir votre mot de passe actuel',\n es: 'Por favor, ingrese su contraseña actual',\n });\n\n const invalidTypeErrorPassword = t({\n en: 'Please enter a valid password',\n fr: 'Veuillez saisir un mot de passe valide',\n es: 'Por favor, ingrese una contraseña válida',\n });\n\n const invalidPasswordLengthError = t({\n en: 'Your password must be at least 8 characters',\n fr: 'Votre mot de passe doit comporter au moins 8 caractères',\n es: 'Su contraseña debe tener al menos 8 caracteres',\n });\n\n const requiredErrorNewPassword = t({\n en: 'Please enter your new password',\n fr: 'Veuillez saisir votre nouveau mot de passe',\n es: 'Por favor, ingrese su nueva contraseña',\n });\n\n const invalidTypeErrorNewPassword = t({\n en: 'Please enter a valid new password',\n fr: 'Veuillez saisir un nouveau mot de passe valide',\n es: 'Por favor, ingrese una nueva contraseña válida',\n });\n\n const requiredErrorNewPasswordConfirmation = t({\n en: 'Please enter your new password again',\n fr: 'Veuillez saisir votre nouveau mot de passe à nouveau',\n es: 'Por favor, ingrese su nueva contraseña nuevamente',\n });\n\n const invalidTypeErrorNewPasswordConfirmation = t({\n en: 'Please enter a valid new password again',\n es: 'Por favor, ingrese una nueva contraseña válida nuevamente',\n fr: 'Veuillez saisir un nouveau mot de passe valide à nouveau',\n });\n\n const passwordNotMatchError = t({\n en: 'New password and password confirmation must match',\n fr: 'Le nouveau mot de passe et la confirmation de mot de passe doivent correspondre',\n es: 'La nueva contraseña y la confirmación de la contraseña deben coincidir',\n });\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof getChangePasswordSchema>\n>;\n"],"names":["t","z"],"mappings":";;;;AAKO,MAAM,0BAA0B,MAAM;AAC3C,QAAM,wBAAwBA,cAAAA,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,2BAA2BA,cAAAA,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,6BAA6BA,cAAAA,EAAE;AAAA,IACnC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,2BAA2BA,cAAAA,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,8BAA8BA,cAAAA,EAAE;AAAA,IACpC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,uCAAuCA,cAAAA,EAAE;AAAA,IAC7C,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,0CAA0CA,cAAAA,EAAE;AAAA,IAChD,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,wBAAwBA,cAAAA,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAOC,IAAAA,EACJ,OAAO;AAAA,IACN,iBAAiBA,MACd,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,aAAaA,MACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,yBAAyBA,MACtB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,EAAA,CAClD,EACA,OAAO,CAAC,SAAS,KAAK,gBAAgB,KAAK,yBAAyB;AAAA,IACnE,SAAS;AAAA,IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;;"}
1
+ {"version":3,"file":"ChangePasswordSchema.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getChangePasswordSchema = () => {\n const requiredErrorPassword = t({\n en: 'Please enter your current password',\n fr: 'Veuillez saisir votre mot de passe actuel',\n es: 'Por favor, ingrese su contraseña actual',\n });\n\n const invalidTypeErrorPassword = t({\n en: 'Please enter a valid password',\n fr: 'Veuillez saisir un mot de passe valide',\n es: 'Por favor, ingrese una contraseña válida',\n });\n\n const invalidPasswordLengthError = t({\n en: 'Your password must be at least 8 characters',\n fr: 'Votre mot de passe doit comporter au moins 8 caractères',\n es: 'Su contraseña debe tener al menos 8 caracteres',\n });\n\n const requiredErrorNewPassword = t({\n en: 'Please enter your new password',\n fr: 'Veuillez saisir votre nouveau mot de passe',\n es: 'Por favor, ingrese su nueva contraseña',\n });\n\n const invalidTypeErrorNewPassword = t({\n en: 'Please enter a valid new password',\n fr: 'Veuillez saisir un nouveau mot de passe valide',\n es: 'Por favor, ingrese una nueva contraseña válida',\n });\n\n const requiredErrorNewPasswordConfirmation = t({\n en: 'Please enter your new password again',\n fr: 'Veuillez saisir votre nouveau mot de passe à nouveau',\n es: 'Por favor, ingrese su nueva contraseña nuevamente',\n });\n\n const invalidTypeErrorNewPasswordConfirmation = t({\n en: 'Please enter a valid new password again',\n es: 'Por favor, ingrese una nueva contraseña válida nuevamente',\n fr: 'Veuillez saisir un nouveau mot de passe valide à nouveau',\n });\n\n const passwordNotMatchError = t({\n en: 'New password and password confirmation must match',\n fr: 'Le nouveau mot de passe et la confirmation de mot de passe doivent correspondre',\n es: 'La nueva contraseña y la confirmación de la contraseña deben coincidir',\n });\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof getChangePasswordSchema>\n>;\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AAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,2BAA4B,CAAA;AAAA,EAAA,CAClD,EACA,OAAO,CAAC,SAAS,KAAK,gBAAgB,KAAK,yBAAyB;AAAA,IACnE,SAAS;AAAA,IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChangePasswordSchema.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getChangePasswordSchema = () => {\n const requiredErrorPassword = t({\n en: 'Please enter your current password',\n fr: 'Veuillez saisir votre mot de passe actuel',\n es: 'Por favor, ingrese su contraseña actual',\n });\n\n const invalidTypeErrorPassword = t({\n en: 'Please enter a valid password',\n fr: 'Veuillez saisir un mot de passe valide',\n es: 'Por favor, ingrese una contraseña válida',\n });\n\n const invalidPasswordLengthError = t({\n en: 'Your password must be at least 8 characters',\n fr: 'Votre mot de passe doit comporter au moins 8 caractères',\n es: 'Su contraseña debe tener al menos 8 caracteres',\n });\n\n const requiredErrorNewPassword = t({\n en: 'Please enter your new password',\n fr: 'Veuillez saisir votre nouveau mot de passe',\n es: 'Por favor, ingrese su nueva contraseña',\n });\n\n const invalidTypeErrorNewPassword = t({\n en: 'Please enter a valid new password',\n fr: 'Veuillez saisir un nouveau mot de passe valide',\n es: 'Por favor, ingrese una nueva contraseña válida',\n });\n\n const requiredErrorNewPasswordConfirmation = t({\n en: 'Please enter your new password again',\n fr: 'Veuillez saisir votre nouveau mot de passe à nouveau',\n es: 'Por favor, ingrese su nueva contraseña nuevamente',\n });\n\n const invalidTypeErrorNewPasswordConfirmation = t({\n en: 'Please enter a valid new password again',\n es: 'Por favor, ingrese una nueva contraseña válida nuevamente',\n fr: 'Veuillez saisir un nouveau mot de passe valide à nouveau',\n });\n\n const passwordNotMatchError = t({\n en: 'New password and password confirmation must match',\n fr: 'Le nouveau mot de passe et la confirmation de mot de passe doivent correspondre',\n es: 'La nueva contraseña y la confirmación de la contraseña deben coincidir',\n });\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof getChangePasswordSchema>\n>;\n"],"names":[],"mappings":";;AAKO,MAAM,0BAA0B,MAAM;AAC3C,QAAM,wBAAwB,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,2BAA2B,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,6BAA6B,EAAE;AAAA,IACnC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,2BAA2B,EAAE;AAAA,IACjC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,8BAA8B,EAAE;AAAA,IACpC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,uCAAuC,EAAE;AAAA,IAC7C,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,0CAA0C,EAAE;AAAA,IAChD,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,QAAM,wBAAwB,EAAE;AAAA,IAC9B,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACL;AAED,SAAO,EACJ,OAAO;AAAA,IACN,iBAAiB,EACd,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,aAAa,EACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,yBAAyB,EACtB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,EAAA,CAClD,EACA,OAAO,CAAC,SAAS,KAAK,gBAAgB,KAAK,yBAAyB;AAAA,IACnE,SAAS;AAAA,IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;"}
1
+ {"version":3,"file":"ChangePasswordSchema.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordSchema.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\nimport { z } from 'zod';\n\nexport const getChangePasswordSchema = () => {\n const requiredErrorPassword = t({\n en: 'Please enter your current password',\n fr: 'Veuillez saisir votre mot de passe actuel',\n es: 'Por favor, ingrese su contraseña actual',\n });\n\n const invalidTypeErrorPassword = t({\n en: 'Please enter a valid password',\n fr: 'Veuillez saisir un mot de passe valide',\n es: 'Por favor, ingrese una contraseña válida',\n });\n\n const invalidPasswordLengthError = t({\n en: 'Your password must be at least 8 characters',\n fr: 'Votre mot de passe doit comporter au moins 8 caractères',\n es: 'Su contraseña debe tener al menos 8 caracteres',\n });\n\n const requiredErrorNewPassword = t({\n en: 'Please enter your new password',\n fr: 'Veuillez saisir votre nouveau mot de passe',\n es: 'Por favor, ingrese su nueva contraseña',\n });\n\n const invalidTypeErrorNewPassword = t({\n en: 'Please enter a valid new password',\n fr: 'Veuillez saisir un nouveau mot de passe valide',\n es: 'Por favor, ingrese una nueva contraseña válida',\n });\n\n const requiredErrorNewPasswordConfirmation = t({\n en: 'Please enter your new password again',\n fr: 'Veuillez saisir votre nouveau mot de passe à nouveau',\n es: 'Por favor, ingrese su nueva contraseña nuevamente',\n });\n\n const invalidTypeErrorNewPasswordConfirmation = t({\n en: 'Please enter a valid new password again',\n es: 'Por favor, ingrese una nueva contraseña válida nuevamente',\n fr: 'Veuillez saisir un nouveau mot de passe valide à nouveau',\n });\n\n const passwordNotMatchError = t({\n en: 'New password and password confirmation must match',\n fr: 'Le nouveau mot de passe et la confirmation de mot de passe doivent correspondre',\n es: 'La nueva contraseña y la confirmación de la contraseña deben coincidir',\n });\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof getChangePasswordSchema>\n>;\n"],"names":[],"mappings":";;AAKO,MAAM,0BAA0B,MAAM;AAC3C,QAAM,wBAAwB,EAAE;AAAA,IAC9B,IA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IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.content.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/index.content.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\n\nexport const getChangePasswordContent = () => ({\n currentPasswordInput: {\n label: t({\n en: 'Current password',\n fr: 'Mot de passe actuel',\n es: 'Contraseña actual',\n }),\n placeholder: t({\n en: 'Enter actual password',\n fr: 'Entrez votre mot de passe actuel',\n es: 'Ingresa tu contraseña actual',\n }),\n },\n newPasswordInput: {\n label: t({\n en: 'New password',\n fr: 'Nouveau mot de passe',\n es: 'Nueva contraseña',\n }),\n placeholder: t({\n en: 'Enter new password',\n fr: 'Entrez votre nouveau mot de passe',\n es: 'Ingresa tu nueva contraseña',\n }),\n },\n confirmPasswordInput: {\n label: t({\n en: 'Confirm new password',\n fr: 'Confirmez le nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n placeholder: t({\n en: 'Confirm new password',\n fr: 'Confirmez votre nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n },\n changePasswordButton: {\n text: t({\n en: 'Change password',\n fr: 'Changer le mot de passe',\n es: 'Cambiar la contraseña',\n }),\n ariaLabel: t({\n en: 'Click to change password',\n fr: 'Cliquez pour changer le mot de passe',\n es: 'Haz clic para cambiar la contraseña',\n }),\n },\n backToHomeButton: {\n text: t({\n en: 'Back to home page',\n fr: 'Retour à la page d’accueil',\n es: 'Volver a la página de inicio',\n }),\n ariaLabel: t({\n en: 'Click to go back to the home page',\n fr: 'Cliquez pour revenir à la page d’accueil',\n es: 'Haz clic para volver a la página de inicio',\n }),\n },\n});\n"],"names":["t"],"mappings":";;;AAIO,MAAM,2BAA2B,OAAO;AAAA,EAC7C,sBAAsB;AAAA,IACpB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,MAAMA,cAAAA,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAWA,cAAAA,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,MAAMA,cAAAA,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAWA,cAAAA,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AACF;;"}
1
+ {"version":3,"file":"index.content.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/index.content.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\n\nexport const getChangePasswordContent = () => ({\n currentPasswordInput: {\n label: t({\n en: 'Current password',\n fr: 'Mot de passe actuel',\n es: 'Contraseña actual',\n }),\n placeholder: t({\n en: 'Enter actual password',\n fr: 'Entrez votre mot de passe actuel',\n es: 'Ingresa tu contraseña actual',\n }),\n },\n newPasswordInput: {\n label: t({\n en: 'New password',\n fr: 'Nouveau mot de passe',\n es: 'Nueva contraseña',\n }),\n placeholder: t({\n en: 'Enter new password',\n fr: 'Entrez votre nouveau mot de passe',\n es: 'Ingresa tu nueva contraseña',\n }),\n },\n confirmPasswordInput: {\n label: t({\n en: 'Confirm new password',\n fr: 'Confirmez le nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n placeholder: t({\n en: 'Confirm new password',\n fr: 'Confirmez votre nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n },\n changePasswordButton: {\n text: t({\n en: 'Change password',\n fr: 'Changer le mot de passe',\n es: 'Cambiar la contraseña',\n }),\n ariaLabel: t({\n en: 'Click to change password',\n fr: 'Cliquez pour changer le mot de passe',\n es: 'Haz clic para cambiar la contraseña',\n }),\n },\n backToHomeButton: {\n text: t({\n en: 'Back to home page',\n fr: 'Retour à la page d’accueil',\n es: 'Volver a la página de inicio',\n }),\n ariaLabel: t({\n en: 'Click to go back to the home page',\n fr: 'Cliquez pour revenir à la page d’accueil',\n es: 'Haz clic para volver a la página de inicio',\n }),\n },\n});\n"],"names":["t"],"mappings":";;;AAIO,MAAM,2BAA2B,OAAO;AAAA,EAC7C,sBAAsB;AAAA,IACpB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,OAAOA,cAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,cAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,MAAMA,cAAAA,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAWA,cAAAA,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,MAAMA,cAAAA,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAWA,cAAAA,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EAAA;AAEL;;"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"index.content.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/index.content.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\n\nexport const getChangePasswordContent = () => ({\n currentPasswordInput: {\n label: t({\n en: 'Current password',\n fr: 'Mot de passe actuel',\n es: 'Contraseña actual',\n }),\n placeholder: t({\n en: 'Enter actual password',\n fr: 'Entrez votre mot de passe actuel',\n es: 'Ingresa tu contraseña actual',\n }),\n },\n newPasswordInput: {\n label: t({\n en: 'New password',\n fr: 'Nouveau mot de passe',\n es: 'Nueva contraseña',\n }),\n placeholder: t({\n en: 'Enter new password',\n fr: 'Entrez votre nouveau mot de passe',\n es: 'Ingresa tu nueva contraseña',\n }),\n },\n confirmPasswordInput: {\n label: t({\n en: 'Confirm new password',\n fr: 'Confirmez le nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n placeholder: t({\n en: 'Confirm new password',\n fr: 'Confirmez votre nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n },\n changePasswordButton: {\n text: t({\n en: 'Change password',\n fr: 'Changer le mot de passe',\n es: 'Cambiar la contraseña',\n }),\n ariaLabel: t({\n en: 'Click to change password',\n fr: 'Cliquez pour changer le mot de passe',\n es: 'Haz clic para cambiar la contraseña',\n }),\n },\n backToHomeButton: {\n text: t({\n en: 'Back to home page',\n fr: 'Retour à la page d’accueil',\n es: 'Volver a la página de inicio',\n }),\n ariaLabel: t({\n en: 'Click to go back to the home page',\n fr: 'Cliquez pour revenir à la page d’accueil',\n es: 'Haz clic para volver a la página de inicio',\n }),\n },\n});\n"],"names":[],"mappings":";AAIO,MAAM,2BAA2B,OAAO;AAAA,EAC7C,sBAAsB;AAAA,IACpB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,MAAM,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAW,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,MAAM,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAW,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"index.content.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/index.content.ts"],"sourcesContent":["// @ts-ignore react-intlayer not build yet\n// @ts-ignore react-intlayer not build yet\nimport { t } from 'react-intlayer';\n\nexport const getChangePasswordContent = () => ({\n currentPasswordInput: {\n label: t({\n en: 'Current password',\n fr: 'Mot de passe actuel',\n es: 'Contraseña actual',\n }),\n placeholder: t({\n en: 'Enter actual password',\n fr: 'Entrez votre mot de passe actuel',\n es: 'Ingresa tu contraseña actual',\n }),\n },\n newPasswordInput: {\n label: t({\n en: 'New password',\n fr: 'Nouveau mot de passe',\n es: 'Nueva contraseña',\n }),\n placeholder: t({\n en: 'Enter new password',\n fr: 'Entrez votre nouveau mot de passe',\n es: 'Ingresa tu nueva contraseña',\n }),\n },\n confirmPasswordInput: {\n label: t({\n en: 'Confirm new password',\n fr: 'Confirmez le nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n placeholder: t({\n en: 'Confirm new password',\n fr: 'Confirmez votre nouveau mot de passe',\n es: 'Confirma tu nueva contraseña',\n }),\n },\n changePasswordButton: {\n text: t({\n en: 'Change password',\n fr: 'Changer le mot de passe',\n es: 'Cambiar la contraseña',\n }),\n ariaLabel: t({\n en: 'Click to change password',\n fr: 'Cliquez pour changer le mot de passe',\n es: 'Haz clic para cambiar la contraseña',\n }),\n },\n backToHomeButton: {\n text: t({\n en: 'Back to home page',\n fr: 'Retour à la page d’accueil',\n es: 'Volver a la página de inicio',\n }),\n ariaLabel: t({\n en: 'Click to go back to the home page',\n fr: 'Cliquez pour revenir à la page d’accueil',\n es: 'Haz clic para volver a la página de inicio',\n }),\n },\n});\n"],"names":[],"mappings":";AAIO,MAAM,2BAA2B,OAAO;AAAA,EAC7C,sBAAsB;AAAA,IACpB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,sBAAsB;AAAA,IACpB,MAAM,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAW,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EACH;AAAA,EACA,kBAAkB;AAAA,IAChB,MAAM,EAAE;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAW,EAAE;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EAAA;AAEL;"}