@m5kdev/web-ui 0.7.0 → 0.8.0

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 (377) hide show
  1. package/dist/src/animations/card.motion.d.ts +7 -2
  2. package/dist/src/animations/card.motion.js +25 -6
  3. package/dist/src/animations/card.motion.js.map +1 -0
  4. package/dist/src/components/AvatarUpload.d.ts +14 -5
  5. package/dist/src/components/AvatarUpload.js +105 -63
  6. package/dist/src/components/AvatarUpload.js.map +1 -0
  7. package/dist/src/components/Button.d.ts +14 -4
  8. package/dist/src/components/Button.js +13 -4
  9. package/dist/src/components/Button.js.map +1 -0
  10. package/dist/src/components/Calendar.d.ts +33 -31
  11. package/dist/src/components/Calendar.js +14 -6
  12. package/dist/src/components/Calendar.js.map +1 -0
  13. package/dist/src/components/{Calendar.css → Calendar2.css} +757 -684
  14. package/dist/src/components/CardsSelect.d.ts +25 -21
  15. package/dist/src/components/CardsSelect.js +75 -42
  16. package/dist/src/components/CardsSelect.js.map +1 -0
  17. package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +22 -9
  18. package/dist/src/components/CollapsibleSidebarMenuItem.js +31 -8
  19. package/dist/src/components/CollapsibleSidebarMenuItem.js.map +1 -0
  20. package/dist/src/components/ColorPicker.d.ts +15 -4
  21. package/dist/src/components/ColorPicker.js +46 -16
  22. package/dist/src/components/ColorPicker.js.map +1 -0
  23. package/dist/src/components/CopyButton.d.ts +18 -6
  24. package/dist/src/components/CopyButton.js +28 -19
  25. package/dist/src/components/CopyButton.js.map +1 -0
  26. package/dist/src/components/CropDialog.d.ts +20 -8
  27. package/dist/src/components/CropDialog.js +108 -62
  28. package/dist/src/components/CropDialog.js.map +1 -0
  29. package/dist/src/components/DialogProvider.d.ts +22 -14
  30. package/dist/src/components/DialogProvider.js +67 -45
  31. package/dist/src/components/DialogProvider.js.map +1 -0
  32. package/dist/src/components/ErrorFallback.d.ts +13 -4
  33. package/dist/src/components/ErrorFallback.js +29 -4
  34. package/dist/src/components/ErrorFallback.js.map +1 -0
  35. package/dist/src/components/FileDropzone.d.ts +12 -4
  36. package/dist/src/components/FileDropzone.js +98 -60
  37. package/dist/src/components/FileDropzone.js.map +1 -0
  38. package/dist/src/components/MultiSelectDropdown.d.ts +25 -22
  39. package/dist/src/components/MultiSelectDropdown.js +99 -49
  40. package/dist/src/components/MultiSelectDropdown.js.map +1 -0
  41. package/dist/src/components/Orb.d.ts +17 -6
  42. package/dist/src/components/Orb.js +263 -255
  43. package/dist/src/components/Orb.js.map +1 -0
  44. package/dist/src/components/PageAlert.d.ts +20 -15
  45. package/dist/src/components/PageAlert.js +67 -39
  46. package/dist/src/components/PageAlert.js.map +1 -0
  47. package/dist/src/components/SelectChips.d.ts +21 -10
  48. package/dist/src/components/SelectChips.js +21 -9
  49. package/dist/src/components/SelectChips.js.map +1 -0
  50. package/dist/src/components/SidebarItem.d.ts +18 -7
  51. package/dist/src/components/SidebarItem.js +16 -4
  52. package/dist/src/components/SidebarItem.js.map +1 -0
  53. package/dist/src/components/Steps.d.ts +21 -16
  54. package/dist/src/components/Steps.js +193 -27
  55. package/dist/src/components/Steps.js.map +1 -0
  56. package/dist/src/components/TablerIconPicker.d.ts +13 -2
  57. package/dist/src/components/TablerIconPicker.js +4254 -4234
  58. package/dist/src/components/TablerIconPicker.js.map +1 -0
  59. package/dist/src/components/app-header.d.ts +14 -6
  60. package/dist/src/components/app-header.js +27 -6
  61. package/dist/src/components/app-header.js.map +1 -0
  62. package/dist/src/components/blur-card.d.ts +25 -11
  63. package/dist/src/components/blur-card.js +134 -31
  64. package/dist/src/components/blur-card.js.map +1 -0
  65. package/dist/src/components/features-section-demo-1.d.ts +22 -6
  66. package/dist/src/components/features-section-demo-1.js +119 -47
  67. package/dist/src/components/features-section-demo-1.js.map +1 -0
  68. package/dist/src/components/features-section-demo-2.d.ts +7 -1
  69. package/dist/src/components/features-section-demo-2.js +80 -49
  70. package/dist/src/components/features-section-demo-2.js.map +1 -0
  71. package/dist/src/components/features-section-demo-3.d.ts +16 -8
  72. package/dist/src/components/features-section-demo-3.js +239 -103
  73. package/dist/src/components/features-section-demo-3.js.map +1 -0
  74. package/dist/src/components/mode-toggle.d.ts +7 -1
  75. package/dist/src/components/mode-toggle.js +42 -7
  76. package/dist/src/components/mode-toggle.js.map +1 -0
  77. package/dist/src/components/nav-main.d.ts +20 -12
  78. package/dist/src/components/nav-main.js +31 -5
  79. package/dist/src/components/nav-main.js.map +1 -0
  80. package/dist/src/components/pricing-cards.d.ts +7 -1
  81. package/dist/src/components/pricing-cards.js +125 -24
  82. package/dist/src/components/pricing-cards.js.map +1 -0
  83. package/dist/src/components/shared/ButtonCopy.d.ts +17 -6
  84. package/dist/src/components/shared/ButtonCopy.js +31 -20
  85. package/dist/src/components/shared/ButtonCopy.js.map +1 -0
  86. package/dist/src/components/team-switcher.d.ts +16 -8
  87. package/dist/src/components/team-switcher.js +70 -8
  88. package/dist/src/components/team-switcher.js.map +1 -0
  89. package/dist/src/components/theme-provider.d.ts +18 -8
  90. package/dist/src/components/theme-provider.js +42 -38
  91. package/dist/src/components/theme-provider.js.map +1 -0
  92. package/dist/src/components/typewriter.d.ts +35 -14
  93. package/dist/src/components/typewriter.js +45 -36
  94. package/dist/src/components/typewriter.js.map +1 -0
  95. package/dist/src/components/ui/alert-dialog.d.ts +48 -13
  96. package/dist/src/components/ui/alert-dialog.js +58 -15
  97. package/dist/src/components/ui/alert-dialog.js.map +1 -0
  98. package/dist/src/components/ui/alert.d.ts +24 -8
  99. package/dist/src/components/ui/alert.js +28 -15
  100. package/dist/src/components/ui/alert.js.map +1 -0
  101. package/dist/src/components/ui/avatar.d.ts +9 -5
  102. package/dist/src/components/ui/avatar.js +23 -7
  103. package/dist/src/components/ui/avatar.js.map +1 -0
  104. package/dist/src/components/ui/badge.d.ts +17 -8
  105. package/dist/src/components/ui/badge.js +17 -14
  106. package/dist/src/components/ui/badge.js.map +1 -0
  107. package/dist/src/components/ui/bento-grid.d.ts +26 -11
  108. package/dist/src/components/ui/bento-grid.js +30 -6
  109. package/dist/src/components/ui/bento-grid.js.map +1 -0
  110. package/dist/src/components/ui/bento-grid2.d.ts +30 -14
  111. package/dist/src/components/ui/bento-grid2.js +45 -9
  112. package/dist/src/components/ui/bento-grid2.js.map +1 -0
  113. package/dist/src/components/ui/breadcrumb.d.ts +27 -15
  114. package/dist/src/components/ui/breadcrumb.js +54 -14
  115. package/dist/src/components/ui/breadcrumb.js.map +1 -0
  116. package/dist/src/components/ui/button.d.ts +14 -9
  117. package/dist/src/components/ui/button.js +37 -26
  118. package/dist/src/components/ui/button.js.map +1 -0
  119. package/dist/src/components/ui/card.d.ts +12 -8
  120. package/dist/src/components/ui/card.js +38 -10
  121. package/dist/src/components/ui/card.js.map +1 -0
  122. package/dist/src/components/ui/checkbox.d.ts +6 -2
  123. package/dist/src/components/ui/checkbox.js +17 -5
  124. package/dist/src/components/ui/checkbox.js.map +1 -0
  125. package/dist/src/components/ui/collapsible.d.ts +9 -4
  126. package/dist/src/components/ui/collapsible.js +5 -1
  127. package/dist/src/components/ui/collapsible.js.map +1 -0
  128. package/dist/src/components/ui/dialog.d.ts +44 -12
  129. package/dist/src/components/ui/dialog.js +64 -14
  130. package/dist/src/components/ui/dialog.js.map +1 -0
  131. package/dist/src/components/ui/dropdown-menu.d.ts +32 -24
  132. package/dist/src/components/ui/dropdown-menu.js +64 -14
  133. package/dist/src/components/ui/dropdown-menu.js.map +1 -0
  134. package/dist/src/components/ui/floating-navbar.d.ts +18 -9
  135. package/dist/src/components/ui/floating-navbar.js +49 -35
  136. package/dist/src/components/ui/floating-navbar.js.map +1 -0
  137. package/dist/src/components/ui/form.d.ts +30 -21
  138. package/dist/src/components/ui/form.js +76 -44
  139. package/dist/src/components/ui/form.js.map +1 -0
  140. package/dist/src/components/ui/image.d.ts +6 -2
  141. package/dist/src/components/ui/image.js +51 -11
  142. package/dist/src/components/ui/image.js.map +1 -0
  143. package/dist/src/components/ui/input.d.ts +6 -2
  144. package/dist/src/components/ui/input.js +14 -5
  145. package/dist/src/components/ui/input.js.map +1 -0
  146. package/dist/src/components/ui/label.d.ts +8 -3
  147. package/dist/src/components/ui/label.js +13 -5
  148. package/dist/src/components/ui/label.js.map +1 -0
  149. package/dist/src/components/ui/pagination.d.ts +39 -12
  150. package/dist/src/components/ui/pagination.js +64 -14
  151. package/dist/src/components/ui/pagination.js.map +1 -0
  152. package/dist/src/components/ui/progress.d.ts +6 -2
  153. package/dist/src/components/ui/progress.js +16 -4
  154. package/dist/src/components/ui/progress.js.map +1 -0
  155. package/dist/src/components/ui/resizable-navbar.d.ts +84 -43
  156. package/dist/src/components/ui/resizable-navbar.js +126 -74
  157. package/dist/src/components/ui/resizable-navbar.js.map +1 -0
  158. package/dist/src/components/ui/segment-control.d.ts +10 -7
  159. package/dist/src/components/ui/segment-control.js +83 -38
  160. package/dist/src/components/ui/segment-control.js.map +1 -0
  161. package/dist/src/components/ui/select.d.ts +16 -12
  162. package/dist/src/components/ui/select.js +63 -14
  163. package/dist/src/components/ui/select.js.map +1 -0
  164. package/dist/src/components/ui/separator.d.ts +6 -2
  165. package/dist/src/components/ui/separator.js +14 -4
  166. package/dist/src/components/ui/separator.js.map +1 -0
  167. package/dist/src/components/ui/sheet.d.ts +30 -19
  168. package/dist/src/components/ui/sheet.js +52 -23
  169. package/dist/src/components/ui/sheet.js.map +1 -0
  170. package/dist/src/components/ui/sidebar.d.ts +69 -62
  171. package/dist/src/components/ui/sidebar.js +326 -171
  172. package/dist/src/components/ui/sidebar.js.map +1 -0
  173. package/dist/src/components/ui/skeleton.d.ts +9 -1
  174. package/dist/src/components/ui/skeleton.js +10 -3
  175. package/dist/src/components/ui/skeleton.js.map +1 -0
  176. package/dist/src/components/ui/slider.d.ts +6 -2
  177. package/dist/src/components/ui/slider.js +16 -4
  178. package/dist/src/components/ui/slider.js.map +1 -0
  179. package/dist/src/components/ui/sonner.d.ts +10 -3
  180. package/dist/src/components/ui/sonner.js +18 -11
  181. package/dist/src/components/ui/sonner.js.map +1 -0
  182. package/dist/src/components/ui/spinner.d.ts +21 -10
  183. package/dist/src/components/ui/spinner.js +24 -24
  184. package/dist/src/components/ui/spinner.js.map +1 -0
  185. package/dist/src/components/ui/switch.d.ts +6 -2
  186. package/dist/src/components/ui/switch.js +13 -4
  187. package/dist/src/components/ui/switch.js.map +1 -0
  188. package/dist/src/components/ui/table.d.ts +39 -10
  189. package/dist/src/components/ui/table.js +51 -11
  190. package/dist/src/components/ui/table.js.map +1 -0
  191. package/dist/src/components/ui/tabs.d.ts +23 -6
  192. package/dist/src/components/ui/tabs.js +27 -7
  193. package/dist/src/components/ui/tabs.js.map +1 -0
  194. package/dist/src/components/ui/textarea.d.ts +10 -2
  195. package/dist/src/components/ui/textarea.js +11 -3
  196. package/dist/src/components/ui/textarea.js.map +1 -0
  197. package/dist/src/components/ui/timeline.d.ts +16 -9
  198. package/dist/src/components/ui/timeline.js +87 -24
  199. package/dist/src/components/ui/timeline.js.map +1 -0
  200. package/dist/src/components/ui/toast.d.ts +19 -14
  201. package/dist/src/components/ui/toast.js +48 -22
  202. package/dist/src/components/ui/toast.js.map +1 -0
  203. package/dist/src/components/ui/tooltip.d.ts +23 -6
  204. package/dist/src/components/ui/tooltip.js +27 -7
  205. package/dist/src/components/ui/tooltip.js.map +1 -0
  206. package/dist/src/components/ui/typewriter-effect.d.ts +28 -14
  207. package/dist/src/components/ui/typewriter-effect.js +102 -72
  208. package/dist/src/components/ui/typewriter-effect.js.map +1 -0
  209. package/dist/src/hooks/use-mobile.d.ts +5 -1
  210. package/dist/src/hooks/use-mobile.js +18 -13
  211. package/dist/src/hooks/use-mobile.js.map +1 -0
  212. package/dist/src/hooks/useDialog.d.ts +8 -4
  213. package/dist/src/hooks/useDialog.js +24 -20
  214. package/dist/src/hooks/useDialog.js.map +1 -0
  215. package/dist/src/icons/GoogleIcon.d.ts +9 -5
  216. package/dist/src/icons/GoogleIcon.js +32 -3
  217. package/dist/src/icons/GoogleIcon.js.map +1 -0
  218. package/dist/src/icons/LinkedInIcon.d.ts +9 -5
  219. package/dist/src/icons/LinkedInIcon.js +27 -3
  220. package/dist/src/icons/LinkedInIcon.js.map +1 -0
  221. package/dist/src/icons/MicrosoftIcon.d.ts +9 -5
  222. package/dist/src/icons/MicrosoftIcon.js +31 -3
  223. package/dist/src/icons/MicrosoftIcon.js.map +1 -0
  224. package/dist/src/lib/chatwoot.d.ts +19 -10
  225. package/dist/src/lib/chatwoot.js +25 -27
  226. package/dist/src/lib/chatwoot.js.map +1 -0
  227. package/dist/src/lib/utils.d.ts +7 -2
  228. package/dist/src/lib/utils.js +7 -2
  229. package/dist/src/lib/utils.js.map +1 -0
  230. package/dist/src/modules/app/components/AppLoader.d.ts +8 -2
  231. package/dist/src/modules/app/components/AppLoader.js +14 -3
  232. package/dist/src/modules/app/components/AppLoader.js.map +1 -0
  233. package/dist/src/modules/app/components/AppShell.d.ts +15 -6
  234. package/dist/src/modules/app/components/AppShell.js +14 -5
  235. package/dist/src/modules/app/components/AppShell.js.map +1 -0
  236. package/dist/src/modules/app/components/AppSidebar.d.ts +16 -6
  237. package/dist/src/modules/app/components/AppSidebar.js +17 -4
  238. package/dist/src/modules/app/components/AppSidebar.js.map +1 -0
  239. package/dist/src/modules/app/components/AppSidebarContent.d.ts +22 -13
  240. package/dist/src/modules/app/components/AppSidebarContent.js +34 -5
  241. package/dist/src/modules/app/components/AppSidebarContent.js.map +1 -0
  242. package/dist/src/modules/app/components/AppSidebarHeader.d.ts +18 -8
  243. package/dist/src/modules/app/components/AppSidebarHeader.js +37 -6
  244. package/dist/src/modules/app/components/AppSidebarHeader.js.map +1 -0
  245. package/dist/src/modules/app/components/AppSidebarInvites.d.ts +11 -3
  246. package/dist/src/modules/app/components/AppSidebarInvites.js +39 -8
  247. package/dist/src/modules/app/components/AppSidebarInvites.js.map +1 -0
  248. package/dist/src/modules/app/components/AppSidebarUser.d.ts +20 -10
  249. package/dist/src/modules/app/components/AppSidebarUser.js +121 -12
  250. package/dist/src/modules/app/components/AppSidebarUser.js.map +1 -0
  251. package/dist/src/modules/auth/components/AdminUserManagement.d.ts +11 -4
  252. package/dist/src/modules/auth/components/AdminUserManagement.js +970 -418
  253. package/dist/src/modules/auth/components/AdminUserManagement.js.map +1 -0
  254. package/dist/src/modules/auth/components/AdminWaitlist.d.ts +11 -4
  255. package/dist/src/modules/auth/components/AdminWaitlist.js +284 -115
  256. package/dist/src/modules/auth/components/AdminWaitlist.js.map +1 -0
  257. package/dist/src/modules/auth/components/AuthLayout.d.ts +12 -4
  258. package/dist/src/modules/auth/components/AuthLayout.js +17 -3
  259. package/dist/src/modules/auth/components/AuthLayout.js.map +1 -0
  260. package/dist/src/modules/auth/components/AuthProviders.d.ts +17 -6
  261. package/dist/src/modules/auth/components/AuthProviders.js +80 -41
  262. package/dist/src/modules/auth/components/AuthProviders.js.map +1 -0
  263. package/dist/src/modules/auth/components/AuthRouter.d.ts +16 -7
  264. package/dist/src/modules/auth/components/AuthRouter.js +46 -10
  265. package/dist/src/modules/auth/components/AuthRouter.js.map +1 -0
  266. package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +12 -4
  267. package/dist/src/modules/auth/components/ClaimAccountRoute.js +202 -139
  268. package/dist/src/modules/auth/components/ClaimAccountRoute.js.map +1 -0
  269. package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +7 -1
  270. package/dist/src/modules/auth/components/ErrorAuthRoute.js +125 -89
  271. package/dist/src/modules/auth/components/ErrorAuthRoute.js.map +1 -0
  272. package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +7 -1
  273. package/dist/src/modules/auth/components/ForgotPasswordForm.js +49 -23
  274. package/dist/src/modules/auth/components/ForgotPasswordForm.js.map +1 -0
  275. package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +7 -1
  276. package/dist/src/modules/auth/components/ForgotPasswordRoute.js +34 -6
  277. package/dist/src/modules/auth/components/ForgotPasswordRoute.js.map +1 -0
  278. package/dist/src/modules/auth/components/InviteFriends.d.ts +12 -4
  279. package/dist/src/modules/auth/components/InviteFriends.js +275 -69
  280. package/dist/src/modules/auth/components/InviteFriends.js.map +1 -0
  281. package/dist/src/modules/auth/components/LastUsedBadge.d.ts +17 -5
  282. package/dist/src/modules/auth/components/LastUsedBadge.js +16 -6
  283. package/dist/src/modules/auth/components/LastUsedBadge.js.map +1 -0
  284. package/dist/src/modules/auth/components/LoginForm.d.ts +11 -3
  285. package/dist/src/modules/auth/components/LoginForm.js +107 -40
  286. package/dist/src/modules/auth/components/LoginForm.js.map +1 -0
  287. package/dist/src/modules/auth/components/LoginRoute.d.ts +11 -3
  288. package/dist/src/modules/auth/components/LoginRoute.js +41 -8
  289. package/dist/src/modules/auth/components/LoginRoute.js.map +1 -0
  290. package/dist/src/modules/auth/components/LogoutRoute.d.ts +7 -1
  291. package/dist/src/modules/auth/components/LogoutRoute.js +18 -12
  292. package/dist/src/modules/auth/components/LogoutRoute.js.map +1 -0
  293. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +21 -8
  294. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +107 -97
  295. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js.map +1 -0
  296. package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +58 -48
  297. package/dist/src/modules/auth/components/OrganizationMembersRoute.js +448 -349
  298. package/dist/src/modules/auth/components/OrganizationMembersRoute.js.map +1 -0
  299. package/dist/src/modules/auth/components/OrganizationPreferences.d.ts +27 -16
  300. package/dist/src/modules/auth/components/OrganizationPreferences.js +129 -124
  301. package/dist/src/modules/auth/components/OrganizationPreferences.js.map +1 -0
  302. package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +27 -18
  303. package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +184 -144
  304. package/dist/src/modules/auth/components/OrganizationSettingsRoute.js.map +1 -0
  305. package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +17 -6
  306. package/dist/src/modules/auth/components/OrganizationSwitcher.js +91 -69
  307. package/dist/src/modules/auth/components/OrganizationSwitcher.js.map +1 -0
  308. package/dist/src/modules/auth/components/PreferencesEditor.d.ts +44 -33
  309. package/dist/src/modules/auth/components/PreferencesEditor.js +82 -58
  310. package/dist/src/modules/auth/components/PreferencesEditor.js.map +1 -0
  311. package/dist/src/modules/auth/components/ProfileRoute.d.ts +7 -1
  312. package/dist/src/modules/auth/components/ProfileRoute.js +79 -36
  313. package/dist/src/modules/auth/components/ProfileRoute.js.map +1 -0
  314. package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +44 -30
  315. package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +234 -242
  316. package/dist/src/modules/auth/components/RangeNuqsDatePicker.js.map +1 -0
  317. package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +7 -1
  318. package/dist/src/modules/auth/components/ResetPasswordForm.js +97 -35
  319. package/dist/src/modules/auth/components/ResetPasswordForm.js.map +1 -0
  320. package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +7 -1
  321. package/dist/src/modules/auth/components/ResetPasswordRoute.js +34 -6
  322. package/dist/src/modules/auth/components/ResetPasswordRoute.js.map +1 -0
  323. package/dist/src/modules/auth/components/SignupFormRoute.d.ts +15 -5
  324. package/dist/src/modules/auth/components/SignupFormRoute.js +142 -99
  325. package/dist/src/modules/auth/components/SignupFormRoute.js.map +1 -0
  326. package/dist/src/modules/auth/components/SignupRoute.d.ts +13 -5
  327. package/dist/src/modules/auth/components/SignupRoute.js +59 -13
  328. package/dist/src/modules/auth/components/SignupRoute.js.map +1 -0
  329. package/dist/src/modules/auth/components/UserPreferences.d.ts +22 -11
  330. package/dist/src/modules/auth/components/UserPreferences.js +24 -12
  331. package/dist/src/modules/auth/components/UserPreferences.js.map +1 -0
  332. package/dist/src/modules/auth/components/WaitlistCard.d.ts +11 -4
  333. package/dist/src/modules/auth/components/WaitlistCard.js +63 -28
  334. package/dist/src/modules/auth/components/WaitlistCard.js.map +1 -0
  335. package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +13 -5
  336. package/dist/src/modules/auth/components/WaitlistCodeValidation.js +42 -40
  337. package/dist/src/modules/auth/components/WaitlistCodeValidation.js.map +1 -0
  338. package/dist/src/modules/billing/components/BillingBetaPage.d.ts +15 -6
  339. package/dist/src/modules/billing/components/BillingBetaPage.js +155 -8
  340. package/dist/src/modules/billing/components/BillingBetaPage.js.map +1 -0
  341. package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +13 -5
  342. package/dist/src/modules/billing/components/BillingInvoicePage.js +160 -30
  343. package/dist/src/modules/billing/components/BillingInvoicePage.js.map +1 -0
  344. package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +11 -4
  345. package/dist/src/modules/billing/components/BillingPlanSelect.js +10 -7
  346. package/dist/src/modules/billing/components/BillingPlanSelect.js.map +1 -0
  347. package/dist/src/modules/billing/components/BillingRouter.d.ts +15 -7
  348. package/dist/src/modules/billing/components/BillingRouter.js +19 -6
  349. package/dist/src/modules/billing/components/BillingRouter.js.map +1 -0
  350. package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +17 -7
  351. package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +163 -42
  352. package/dist/src/modules/billing/components/BillingSinglePlanSelect.js.map +1 -0
  353. package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +18 -8
  354. package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +81 -38
  355. package/dist/src/modules/table/components/ColumnOrderAndVisibility.js.map +1 -0
  356. package/dist/src/modules/table/components/NuqsTable.d.ts +33 -21
  357. package/dist/src/modules/table/components/NuqsTable.js +295 -221
  358. package/dist/src/modules/table/components/NuqsTable.js.map +1 -0
  359. package/dist/src/modules/table/components/TableFiltering.d.ts +33 -21
  360. package/dist/src/modules/table/components/TableFiltering.js +408 -226
  361. package/dist/src/modules/table/components/TableFiltering.js.map +1 -0
  362. package/dist/src/modules/table/components/TableGroupBy.d.ts +18 -8
  363. package/dist/src/modules/table/components/TableGroupBy.js +56 -16
  364. package/dist/src/modules/table/components/TableGroupBy.js.map +1 -0
  365. package/dist/src/modules/table/components/TablePagination.d.ts +17 -7
  366. package/dist/src/modules/table/components/TablePagination.js +64 -32
  367. package/dist/src/modules/table/components/TablePagination.js.map +1 -0
  368. package/dist/src/modules/table/components/table.types.d.ts +15 -10
  369. package/dist/src/modules/table/components/table.types.js +0 -1
  370. package/dist/src/modules/table/filterTransformers.d.ts +35 -30
  371. package/dist/src/modules/table/filterTransformers.js +198 -261
  372. package/dist/src/modules/table/filterTransformers.js.map +1 -0
  373. package/dist/src/types.d.ts +8 -3
  374. package/dist/src/types.js +0 -1
  375. package/package.json +8 -6
  376. package/dist/translations/en/web-ui.json +0 -209
  377. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -1,39 +1,101 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
3
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
4
- import { useForm } from "react-hook-form";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
5
3
  import { useTranslation } from "react-i18next";
6
- import { Link, useSearchParams } from "react-router";
4
+ import { Link as Link$1, useSearchParams } from "react-router";
7
5
  import { toast } from "sonner";
8
- export function ResetPasswordForm() {
9
- const { t } = useTranslation();
10
- const { register, handleSubmit, setError, formState: { errors }, } = useForm();
11
- const [searchParams] = useSearchParams();
12
- const token = searchParams.get("token");
13
- const onSubmit = (data) => {
14
- if (data.password !== data.confirmPassword) {
15
- setError("confirmPassword", { message: t("web-ui:auth.resetPassword.passwordMismatch") });
16
- return;
17
- }
18
- if (!token) {
19
- throw new Error(t("web-ui:auth.resetPassword.tokenRequired"));
20
- }
21
- authClient
22
- .resetPassword({
23
- newPassword: data.password,
24
- token,
25
- })
26
- .then(() => {
27
- toast.success(t("web-ui:auth.resetPassword.success"));
28
- // Optionally, redirect
29
- })
30
- .catch(() => {
31
- toast.error(t("web-ui:auth.resetPassword.error"));
32
- });
33
- };
34
- return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "text-center flex flex-col gap-1", children: [_jsx("h2", { className: "text-xl font-semibold", children: t("web-ui:auth.resetPassword.title") }), _jsx("p", { className: "text-sm text-default-600", children: t("web-ui:auth.resetPassword.description") })] }), _jsx(CardBody, { className: "gap-6", children: _jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "grid gap-6", children: [_jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { labelPlacement: "outside", label: t("web-ui:auth.resetPassword.newPassword"), placeholder: t("web-ui:auth.resetPassword.newPassword"), type: "password", variant: "bordered", isRequired: true, ...register("password", {
35
- required: t("web-ui:auth.resetPassword.passwordRequired"),
36
- }) }), errors.password && (_jsx("span", { className: "text-red-500 text-xs", children: errors.password.message }))] }), _jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { labelPlacement: "outside", label: t("web-ui:auth.resetPassword.confirmPassword"), placeholder: t("web-ui:auth.resetPassword.confirmPassword"), type: "password", variant: "bordered", isRequired: true, ...register("confirmPassword", {
37
- required: t("web-ui:auth.resetPassword.confirmPasswordRequired"),
38
- }) }), errors.confirmPassword && (_jsx("span", { className: "text-red-500 text-xs", children: errors.confirmPassword.message }))] }), _jsx(Button, { type: "submit", className: "w-full", color: "primary", children: t("web-ui:auth.resetPassword.button") })] }) })] }), _jsxs("div", { className: "text-center text-xs text-muted-foreground", children: [t("web-ui:auth.forgotPassword.rememberPassword"), " ", _jsx(Link, { to: "/login", className: "underline underline-offset-4 hover:text-primary", children: t("web-ui:auth.login.button") })] })] }));
6
+ import { useForm } from "react-hook-form";
7
+ import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
8
+ //#region src/modules/auth/components/ResetPasswordForm.tsx
9
+ function ResetPasswordForm() {
10
+ const { t } = useTranslation();
11
+ const { register, handleSubmit, setError, formState: { errors } } = useForm();
12
+ const [searchParams] = useSearchParams();
13
+ const token = searchParams.get("token");
14
+ const onSubmit = (data) => {
15
+ if (data.password !== data.confirmPassword) {
16
+ setError("confirmPassword", { message: t("web-ui:auth.resetPassword.passwordMismatch") });
17
+ return;
18
+ }
19
+ if (!token) throw new Error(t("web-ui:auth.resetPassword.tokenRequired"));
20
+ authClient.resetPassword({
21
+ newPassword: data.password,
22
+ token
23
+ }).then(() => {
24
+ toast.success(t("web-ui:auth.resetPassword.success"));
25
+ }).catch(() => {
26
+ toast.error(t("web-ui:auth.resetPassword.error"));
27
+ });
28
+ };
29
+ return /* @__PURE__ */ jsxs("div", {
30
+ className: "flex flex-col gap-6",
31
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
32
+ className: "text-center flex flex-col gap-1",
33
+ children: [/* @__PURE__ */ jsx("h2", {
34
+ className: "text-xl font-semibold",
35
+ children: t("web-ui:auth.resetPassword.title")
36
+ }), /* @__PURE__ */ jsx("p", {
37
+ className: "text-sm text-default-600",
38
+ children: t("web-ui:auth.resetPassword.description")
39
+ })]
40
+ }), /* @__PURE__ */ jsx(CardBody, {
41
+ className: "gap-6",
42
+ children: /* @__PURE__ */ jsxs("form", {
43
+ onSubmit: handleSubmit(onSubmit),
44
+ className: "grid gap-6",
45
+ children: [
46
+ /* @__PURE__ */ jsxs("div", {
47
+ className: "grid gap-2",
48
+ children: [/* @__PURE__ */ jsx(Input, {
49
+ labelPlacement: "outside",
50
+ label: t("web-ui:auth.resetPassword.newPassword"),
51
+ placeholder: t("web-ui:auth.resetPassword.newPassword"),
52
+ type: "password",
53
+ variant: "bordered",
54
+ isRequired: true,
55
+ ...register("password", { required: t("web-ui:auth.resetPassword.passwordRequired") })
56
+ }), errors.password && /* @__PURE__ */ jsx("span", {
57
+ className: "text-red-500 text-xs",
58
+ children: errors.password.message
59
+ })]
60
+ }),
61
+ /* @__PURE__ */ jsxs("div", {
62
+ className: "grid gap-2",
63
+ children: [/* @__PURE__ */ jsx(Input, {
64
+ labelPlacement: "outside",
65
+ label: t("web-ui:auth.resetPassword.confirmPassword"),
66
+ placeholder: t("web-ui:auth.resetPassword.confirmPassword"),
67
+ type: "password",
68
+ variant: "bordered",
69
+ isRequired: true,
70
+ ...register("confirmPassword", { required: t("web-ui:auth.resetPassword.confirmPasswordRequired") })
71
+ }), errors.confirmPassword && /* @__PURE__ */ jsx("span", {
72
+ className: "text-red-500 text-xs",
73
+ children: errors.confirmPassword.message
74
+ })]
75
+ }),
76
+ /* @__PURE__ */ jsx(Button, {
77
+ type: "submit",
78
+ className: "w-full",
79
+ color: "primary",
80
+ children: t("web-ui:auth.resetPassword.button")
81
+ })
82
+ ]
83
+ })
84
+ })] }), /* @__PURE__ */ jsxs("div", {
85
+ className: "text-center text-xs text-muted-foreground",
86
+ children: [
87
+ t("web-ui:auth.forgotPassword.rememberPassword"),
88
+ " ",
89
+ /* @__PURE__ */ jsx(Link$1, {
90
+ to: "/login",
91
+ className: "underline underline-offset-4 hover:text-primary",
92
+ children: t("web-ui:auth.login.button")
93
+ })
94
+ ]
95
+ })]
96
+ });
39
97
  }
98
+ //#endregion
99
+ export { ResetPasswordForm };
100
+
101
+ //# sourceMappingURL=ResetPasswordForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResetPasswordForm.js","names":["Link"],"sources":["../../../../../src/modules/auth/components/ResetPasswordForm.tsx"],"sourcesContent":["import { Button, Card, CardBody, CardHeader, Input } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { type SubmitHandler, useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link, useSearchParams } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\n\r\ntype Inputs = {\r\n password: string;\r\n confirmPassword: string;\r\n};\r\n\r\nexport function ResetPasswordForm() {\r\n const { t } = useTranslation();\r\n const {\r\n register,\r\n handleSubmit,\r\n setError,\r\n formState: { errors },\r\n } = useForm<Inputs>();\r\n const [searchParams] = useSearchParams();\r\n const token = searchParams.get(\"token\");\r\n\r\n const onSubmit: SubmitHandler<Inputs> = (data) => {\r\n if (data.password !== data.confirmPassword) {\r\n setError(\"confirmPassword\", { message: t(\"web-ui:auth.resetPassword.passwordMismatch\") });\r\n return;\r\n }\r\n\r\n if (!token) {\r\n throw new Error(t(\"web-ui:auth.resetPassword.tokenRequired\"));\r\n }\r\n\r\n authClient\r\n .resetPassword({\r\n newPassword: data.password,\r\n token,\r\n })\r\n .then(() => {\r\n toast.success(t(\"web-ui:auth.resetPassword.success\"));\r\n // Optionally, redirect\r\n })\r\n .catch(() => {\r\n toast.error(t(\"web-ui:auth.resetPassword.error\"));\r\n });\r\n };\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody className=\"gap-6\">\r\n <form onSubmit={handleSubmit(onSubmit)} className=\"grid gap-6\">\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"password\", {\r\n required: t(\"web-ui:auth.resetPassword.passwordRequired\"),\r\n })}\r\n />\r\n {errors.password && (\r\n <span className=\"text-red-500 text-xs\">{errors.password.message}</span>\r\n )}\r\n </div>\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"confirmPassword\", {\r\n required: t(\"web-ui:auth.resetPassword.confirmPasswordRequired\"),\r\n })}\r\n />\r\n {errors.confirmPassword && (\r\n <span className=\"text-red-500 text-xs\">{errors.confirmPassword.message}</span>\r\n )}\r\n </div>\r\n <Button type=\"submit\" className=\"w-full\" color=\"primary\">\r\n {t(\"web-ui:auth.resetPassword.button\")}\r\n </Button>\r\n </form>\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAYA,SAAgB,oBAAoB;CAClC,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EACJ,UACA,cACA,UACA,WAAW,EAAE,aACX,SAAiB;CACrB,MAAM,CAAC,gBAAgB,iBAAiB;CACxC,MAAM,QAAQ,aAAa,IAAI,QAAQ;CAEvC,MAAM,YAAmC,SAAS;AAChD,MAAI,KAAK,aAAa,KAAK,iBAAiB;AAC1C,YAAS,mBAAmB,EAAE,SAAS,EAAE,6CAA6C,EAAE,CAAC;AACzF;;AAGF,MAAI,CAAC,MACH,OAAM,IAAI,MAAM,EAAE,0CAA0C,CAAC;AAG/D,aACG,cAAc;GACb,aAAa,KAAK;GAClB;GACD,CAAC,CACD,WAAW;AACV,SAAM,QAAQ,EAAE,oCAAoC,CAAC;IAErD,CACD,YAAY;AACX,SAAM,MAAM,EAAE,kCAAkC,CAAC;IACjD;;AAGN,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,MAAD;IAAI,WAAU;cAAyB,EAAE,kCAAkC;IAAM,CAAA,EACjF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,wCAAwC;IAAK,CAAA,CAC7E;MACb,oBAAC,UAAD;GAAU,WAAU;aAClB,qBAAC,QAAD;IAAM,UAAU,aAAa,SAAS;IAAE,WAAU;cAAlD;KACE,qBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,oBAAC,OAAD;OACE,gBAAe;OACf,OAAO,EAAE,wCAAwC;OACjD,aAAa,EAAE,wCAAwC;OACvD,MAAK;OACL,SAAQ;OACR,YAAA;OACA,GAAI,SAAS,YAAY,EACvB,UAAU,EAAE,6CAA6C,EAC1D,CAAC;OACF,CAAA,EACD,OAAO,YACN,oBAAC,QAAD;OAAM,WAAU;iBAAwB,OAAO,SAAS;OAAe,CAAA,CAErE;;KACN,qBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,oBAAC,OAAD;OACE,gBAAe;OACf,OAAO,EAAE,4CAA4C;OACrD,aAAa,EAAE,4CAA4C;OAC3D,MAAK;OACL,SAAQ;OACR,YAAA;OACA,GAAI,SAAS,mBAAmB,EAC9B,UAAU,EAAE,oDAAoD,EACjE,CAAC;OACF,CAAA,EACD,OAAO,mBACN,oBAAC,QAAD;OAAM,WAAU;iBAAwB,OAAO,gBAAgB;OAAe,CAAA,CAE5E;;KACN,oBAAC,QAAD;MAAQ,MAAK;MAAS,WAAU;MAAS,OAAM;gBAC5C,EAAE,mCAAmC;MAC/B,CAAA;KACJ;;GACE,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAACA,QAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
@@ -1 +1,7 @@
1
- export declare function ResetPasswordRoute(): import("react/jsx-runtime").JSX.Element;
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/modules/auth/components/ResetPasswordRoute.d.ts
4
+ declare function ResetPasswordRoute(): _$react_jsx_runtime0.JSX.Element;
5
+ //#endregion
6
+ export { ResetPasswordRoute };
7
+ //# sourceMappingURL=ResetPasswordRoute.d.ts.map
@@ -1,9 +1,37 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { ResetPasswordForm } from "./ResetPasswordForm.js";
2
2
  import { Card, CardBody, CardHeader } from "@heroui/react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { useTranslation } from "react-i18next";
4
- import { Link } from "react-router";
5
- import { ResetPasswordForm } from "./ResetPasswordForm";
6
- export function ResetPasswordRoute() {
7
- const { t } = useTranslation();
8
- return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "text-center flex flex-col gap-1", children: [_jsx("h2", { className: "text-xl font-semibold", children: t("web-ui:auth.resetPassword.title") }), _jsx("p", { className: "text-sm text-default-600", children: t("web-ui:auth.resetPassword.description") })] }), _jsx(CardBody, { children: _jsx(ResetPasswordForm, {}) })] }), _jsxs("div", { className: "text-center text-xs text-muted-foreground", children: [t("web-ui:auth.forgotPassword.rememberPassword"), " ", _jsx(Link, { to: "/login", className: "underline underline-offset-4 hover:text-primary", children: t("web-ui:auth.login.button") })] })] }));
5
+ import { Link as Link$1 } from "react-router";
6
+ //#region src/modules/auth/components/ResetPasswordRoute.tsx
7
+ function ResetPasswordRoute() {
8
+ const { t } = useTranslation();
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: "flex flex-col gap-6",
11
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
12
+ className: "text-center flex flex-col gap-1",
13
+ children: [/* @__PURE__ */ jsx("h2", {
14
+ className: "text-xl font-semibold",
15
+ children: t("web-ui:auth.resetPassword.title")
16
+ }), /* @__PURE__ */ jsx("p", {
17
+ className: "text-sm text-default-600",
18
+ children: t("web-ui:auth.resetPassword.description")
19
+ })]
20
+ }), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(ResetPasswordForm, {}) })] }), /* @__PURE__ */ jsxs("div", {
21
+ className: "text-center text-xs text-muted-foreground",
22
+ children: [
23
+ t("web-ui:auth.forgotPassword.rememberPassword"),
24
+ " ",
25
+ /* @__PURE__ */ jsx(Link$1, {
26
+ to: "/login",
27
+ className: "underline underline-offset-4 hover:text-primary",
28
+ children: t("web-ui:auth.login.button")
29
+ })
30
+ ]
31
+ })]
32
+ });
9
33
  }
34
+ //#endregion
35
+ export { ResetPasswordRoute };
36
+
37
+ //# sourceMappingURL=ResetPasswordRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResetPasswordRoute.js","names":["Link"],"sources":["../../../../../src/modules/auth/components/ResetPasswordRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { ResetPasswordForm } from \"./ResetPasswordForm\";\r\n\r\nexport function ResetPasswordRoute() {\r\n const { t } = useTranslation();\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <ResetPasswordForm />\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAKA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,MAAD;IAAI,WAAU;cAAyB,EAAE,kCAAkC;IAAM,CAAA,EACjF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,wCAAwC;IAAK,CAAA,CAC7E;MACb,oBAAC,UAAD,EAAA,UACE,oBAAC,mBAAD,EAAqB,CAAA,EACZ,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAACA,QAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
@@ -1,5 +1,15 @@
1
- export declare function SignupForm({ code, email, waitlist, }: {
2
- code?: string | null;
3
- email?: string | null;
4
- waitlist?: boolean;
5
- }): import("react/jsx-runtime").JSX.Element;
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/modules/auth/components/SignupFormRoute.d.ts
4
+ declare function SignupForm({
5
+ code,
6
+ email,
7
+ waitlist
8
+ }: {
9
+ code?: string | null;
10
+ email?: string | null;
11
+ waitlist?: boolean;
12
+ }): _$react_jsx_runtime0.JSX.Element;
13
+ //#endregion
14
+ export { SignupForm };
15
+ //# sourceMappingURL=SignupFormRoute.d.ts.map
@@ -1,106 +1,149 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Alert, Button, Input } from "@heroui/react";
3
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
4
- import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
5
1
  import { useState } from "react";
6
- import { useForm } from "react-hook-form";
2
+ import { Alert, Button, Input } from "@heroui/react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
7
4
  import { useTranslation } from "react-i18next";
8
5
  import { useNavigate } from "react-router";
9
6
  import { toast } from "sonner";
7
+ import { useForm } from "react-hook-form";
8
+ import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
9
+ import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
10
+ //#region src/modules/auth/components/SignupFormRoute.tsx
10
11
  function getEmailProviderUrl(email) {
11
- const domain = email.split("@")[1]?.toLowerCase();
12
- if (!domain)
13
- return null;
14
- const EMAIL_URLS = {
15
- GMAIL: "https://mail.google.com/mail/u/0/#inbox",
16
- OUTLOOK: "https://outlook.live.com/mail/0/inbox",
17
- YAHOO: "https://mail.yahoo.com",
18
- ICLOUD: "https://www.icloud.com/mail",
19
- PROTON: "https://mail.proton.me",
20
- };
21
- const domainMap = {
22
- "gmail.com": EMAIL_URLS.GMAIL,
23
- "googlemail.com": EMAIL_URLS.GMAIL,
24
- "outlook.com": EMAIL_URLS.OUTLOOK,
25
- "hotmail.com": EMAIL_URLS.OUTLOOK,
26
- "live.com": EMAIL_URLS.OUTLOOK,
27
- "msn.com": EMAIL_URLS.OUTLOOK,
28
- "yahoo.com": EMAIL_URLS.YAHOO,
29
- "yahoo.co.uk": EMAIL_URLS.YAHOO,
30
- "yahoo.fr": EMAIL_URLS.YAHOO,
31
- "ymail.com": EMAIL_URLS.YAHOO,
32
- "icloud.com": EMAIL_URLS.ICLOUD,
33
- "me.com": EMAIL_URLS.ICLOUD,
34
- "mac.com": EMAIL_URLS.ICLOUD,
35
- "protonmail.com": EMAIL_URLS.PROTON,
36
- "proton.me": EMAIL_URLS.PROTON,
37
- };
38
- return domainMap[domain] || null;
12
+ const domain = email.split("@")[1]?.toLowerCase();
13
+ if (!domain) return null;
14
+ const EMAIL_URLS = {
15
+ GMAIL: "https://mail.google.com/mail/u/0/#inbox",
16
+ OUTLOOK: "https://outlook.live.com/mail/0/inbox",
17
+ YAHOO: "https://mail.yahoo.com",
18
+ ICLOUD: "https://www.icloud.com/mail",
19
+ PROTON: "https://mail.proton.me"
20
+ };
21
+ return {
22
+ "gmail.com": EMAIL_URLS.GMAIL,
23
+ "googlemail.com": EMAIL_URLS.GMAIL,
24
+ "outlook.com": EMAIL_URLS.OUTLOOK,
25
+ "hotmail.com": EMAIL_URLS.OUTLOOK,
26
+ "live.com": EMAIL_URLS.OUTLOOK,
27
+ "msn.com": EMAIL_URLS.OUTLOOK,
28
+ "yahoo.com": EMAIL_URLS.YAHOO,
29
+ "yahoo.co.uk": EMAIL_URLS.YAHOO,
30
+ "yahoo.fr": EMAIL_URLS.YAHOO,
31
+ "ymail.com": EMAIL_URLS.YAHOO,
32
+ "icloud.com": EMAIL_URLS.ICLOUD,
33
+ "me.com": EMAIL_URLS.ICLOUD,
34
+ "mac.com": EMAIL_URLS.ICLOUD,
35
+ "protonmail.com": EMAIL_URLS.PROTON,
36
+ "proton.me": EMAIL_URLS.PROTON
37
+ }[domain] || null;
39
38
  }
40
- export function SignupForm({ code, email, waitlist, }) {
41
- const { t } = useTranslation();
42
- const [status, setStatus] = useState("start");
43
- const [userEmail, setUserEmail] = useState(email || "");
44
- const { registerSession } = useSession();
45
- const navigate = useNavigate();
46
- const { register, handleSubmit, formState: { errors }, } = useForm();
47
- const onSubmit = (data) => {
48
- console.log(data);
49
- setStatus("busy");
50
- setUserEmail(data.email);
51
- authClient.signUp
52
- .email({
53
- name: data.email,
54
- email: data.email,
55
- password: data.password,
56
- }, {
57
- headers: {
58
- "Waitlist-Invitation-Code": code || "",
59
- },
60
- })
61
- .then((result) => {
62
- console.log(result);
63
- if (result.error) {
64
- toast.error(t("web-ui:auth.errors.invitationCodeInvalid"));
65
- setStatus("start");
66
- return;
67
- }
68
- if (waitlist) {
69
- authClient.signIn
70
- .email({
71
- email: data.email,
72
- password: data.password,
73
- })
74
- .then((res) => {
75
- console.log(res);
76
- if (res.data?.user) {
77
- registerSession(() => {
78
- navigate("/");
79
- });
80
- }
81
- else if (res.error) {
82
- toast.error(t("web-ui:auth.errors.authentication"), {
83
- description: res.error.message,
84
- });
85
- }
86
- })
87
- .catch((error) => {
88
- toast.error(t("web-ui:auth.errors.server"), {
89
- description: error.message,
90
- });
91
- });
92
- }
93
- else
94
- setStatus("done");
95
- })
96
- .catch((error) => {
97
- toast.error(error.message);
98
- setStatus("start");
99
- });
100
- };
101
- if (status === "done") {
102
- const emailProviderUrl = userEmail ? getEmailProviderUrl(userEmail) : null;
103
- return (_jsx(Alert, { color: "primary", variant: "faded", title: t("web-ui:auth.signup.verificationEmailSent.title"), children: _jsxs("div", { className: "mt-2", children: [t("web-ui:auth.signup.verificationEmailSent.description"), emailProviderUrl && (_jsx("div", { className: "mt-3", children: _jsx("a", { href: emailProviderUrl, target: "_blank", rel: "noopener noreferrer", className: "font-medium underline underline-offset-4 hover:opacity-80 transition-opacity", children: t("web-ui:auth.signup.verificationEmailSent.openEmail") }) }))] }) }));
104
- }
105
- return (_jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "grid gap-6", children: [_jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { labelPlacement: "outside", label: t("web-ui:auth.login.email"), type: "email", placeholder: t("web-ui:auth.login.placeholder.email"), variant: "bordered", isRequired: true, isDisabled: !!email, defaultValue: email ?? "", ...register("email", { required: true }) }), errors.email && (_jsx("span", { className: "text-red-500 text-xs", children: t("web-ui:auth.signup.emailRequired") }))] }), _jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { labelPlacement: "outside", label: t("web-ui:auth.login.password"), placeholder: t("web-ui:auth.login.password"), type: "password", variant: "bordered", isRequired: true, ...register("password", { required: true }) }), errors.password && (_jsx("span", { className: "text-red-500 text-xs", children: t("web-ui:auth.signup.passwordRequired") }))] }), _jsx(Button, { type: "submit", className: "w-full", color: "primary", isDisabled: status === "busy", children: status === "busy" ? t("web-ui:auth.signup.signingUp") : t("web-ui:auth.signup.button") })] }));
39
+ function SignupForm({ code, email, waitlist }) {
40
+ const { t } = useTranslation();
41
+ const [status, setStatus] = useState("start");
42
+ const [userEmail, setUserEmail] = useState(email || "");
43
+ const { registerSession } = useSession();
44
+ const navigate = useNavigate();
45
+ const { register, handleSubmit, formState: { errors } } = useForm();
46
+ const onSubmit = (data) => {
47
+ console.log(data);
48
+ setStatus("busy");
49
+ setUserEmail(data.email);
50
+ authClient.signUp.email({
51
+ name: data.email,
52
+ email: data.email,
53
+ password: data.password
54
+ }, { headers: { "Waitlist-Invitation-Code": code || "" } }).then((result) => {
55
+ console.log(result);
56
+ if (result.error) {
57
+ toast.error(t("web-ui:auth.errors.invitationCodeInvalid"));
58
+ setStatus("start");
59
+ return;
60
+ }
61
+ if (waitlist) authClient.signIn.email({
62
+ email: data.email,
63
+ password: data.password
64
+ }).then((res) => {
65
+ console.log(res);
66
+ if (res.data?.user) registerSession(() => {
67
+ navigate("/");
68
+ });
69
+ else if (res.error) toast.error(t("web-ui:auth.errors.authentication"), { description: res.error.message });
70
+ }).catch((error) => {
71
+ toast.error(t("web-ui:auth.errors.server"), { description: error.message });
72
+ });
73
+ else setStatus("done");
74
+ }).catch((error) => {
75
+ toast.error(error.message);
76
+ setStatus("start");
77
+ });
78
+ };
79
+ if (status === "done") {
80
+ const emailProviderUrl = userEmail ? getEmailProviderUrl(userEmail) : null;
81
+ return /* @__PURE__ */ jsx(Alert, {
82
+ color: "primary",
83
+ variant: "faded",
84
+ title: t("web-ui:auth.signup.verificationEmailSent.title"),
85
+ children: /* @__PURE__ */ jsxs("div", {
86
+ className: "mt-2",
87
+ children: [t("web-ui:auth.signup.verificationEmailSent.description"), emailProviderUrl && /* @__PURE__ */ jsx("div", {
88
+ className: "mt-3",
89
+ children: /* @__PURE__ */ jsx("a", {
90
+ href: emailProviderUrl,
91
+ target: "_blank",
92
+ rel: "noopener noreferrer",
93
+ className: "font-medium underline underline-offset-4 hover:opacity-80 transition-opacity",
94
+ children: t("web-ui:auth.signup.verificationEmailSent.openEmail")
95
+ })
96
+ })]
97
+ })
98
+ });
99
+ }
100
+ return /* @__PURE__ */ jsxs("form", {
101
+ onSubmit: handleSubmit(onSubmit),
102
+ className: "grid gap-6",
103
+ children: [
104
+ /* @__PURE__ */ jsxs("div", {
105
+ className: "grid gap-2",
106
+ children: [/* @__PURE__ */ jsx(Input, {
107
+ labelPlacement: "outside",
108
+ label: t("web-ui:auth.login.email"),
109
+ type: "email",
110
+ placeholder: t("web-ui:auth.login.placeholder.email"),
111
+ variant: "bordered",
112
+ isRequired: true,
113
+ isDisabled: !!email,
114
+ defaultValue: email ?? "",
115
+ ...register("email", { required: true })
116
+ }), errors.email && /* @__PURE__ */ jsx("span", {
117
+ className: "text-red-500 text-xs",
118
+ children: t("web-ui:auth.signup.emailRequired")
119
+ })]
120
+ }),
121
+ /* @__PURE__ */ jsxs("div", {
122
+ className: "grid gap-2",
123
+ children: [/* @__PURE__ */ jsx(Input, {
124
+ labelPlacement: "outside",
125
+ label: t("web-ui:auth.login.password"),
126
+ placeholder: t("web-ui:auth.login.password"),
127
+ type: "password",
128
+ variant: "bordered",
129
+ isRequired: true,
130
+ ...register("password", { required: true })
131
+ }), errors.password && /* @__PURE__ */ jsx("span", {
132
+ className: "text-red-500 text-xs",
133
+ children: t("web-ui:auth.signup.passwordRequired")
134
+ })]
135
+ }),
136
+ /* @__PURE__ */ jsx(Button, {
137
+ type: "submit",
138
+ className: "w-full",
139
+ color: "primary",
140
+ isDisabled: status === "busy",
141
+ children: status === "busy" ? t("web-ui:auth.signup.signingUp") : t("web-ui:auth.signup.button")
142
+ })
143
+ ]
144
+ });
106
145
  }
146
+ //#endregion
147
+ export { SignupForm };
148
+
149
+ //# sourceMappingURL=SignupFormRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignupFormRoute.js","names":[],"sources":["../../../../../src/modules/auth/components/SignupFormRoute.tsx"],"sourcesContent":["import { Alert, Button, Input } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useState } from \"react\";\r\nimport { type SubmitHandler, useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { useNavigate } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\n\r\ntype Inputs = {\r\n email: string;\r\n password: string;\r\n};\r\n\r\nfunction getEmailProviderUrl(email: string): string | null {\r\n const domain = email.split(\"@\")[1]?.toLowerCase();\r\n if (!domain) return null;\r\n\r\n const EMAIL_URLS = {\r\n GMAIL: \"https://mail.google.com/mail/u/0/#inbox\",\r\n OUTLOOK: \"https://outlook.live.com/mail/0/inbox\",\r\n YAHOO: \"https://mail.yahoo.com\",\r\n ICLOUD: \"https://www.icloud.com/mail\",\r\n PROTON: \"https://mail.proton.me\",\r\n } as const;\r\n\r\n const domainMap: Record<string, string> = {\r\n \"gmail.com\": EMAIL_URLS.GMAIL,\r\n \"googlemail.com\": EMAIL_URLS.GMAIL,\r\n \"outlook.com\": EMAIL_URLS.OUTLOOK,\r\n \"hotmail.com\": EMAIL_URLS.OUTLOOK,\r\n \"live.com\": EMAIL_URLS.OUTLOOK,\r\n \"msn.com\": EMAIL_URLS.OUTLOOK,\r\n \"yahoo.com\": EMAIL_URLS.YAHOO,\r\n \"yahoo.co.uk\": EMAIL_URLS.YAHOO,\r\n \"yahoo.fr\": EMAIL_URLS.YAHOO,\r\n \"ymail.com\": EMAIL_URLS.YAHOO,\r\n \"icloud.com\": EMAIL_URLS.ICLOUD,\r\n \"me.com\": EMAIL_URLS.ICLOUD,\r\n \"mac.com\": EMAIL_URLS.ICLOUD,\r\n \"protonmail.com\": EMAIL_URLS.PROTON,\r\n \"proton.me\": EMAIL_URLS.PROTON,\r\n };\r\n\r\n return domainMap[domain] || null;\r\n}\r\n\r\nexport function SignupForm({\r\n code,\r\n email,\r\n waitlist,\r\n}: {\r\n code?: string | null;\r\n email?: string | null;\r\n waitlist?: boolean;\r\n}) {\r\n const { t } = useTranslation();\r\n const [status, setStatus] = useState(\"start\");\r\n const [userEmail, setUserEmail] = useState<string>(email || \"\");\r\n const { registerSession } = useSession();\r\n const navigate = useNavigate();\r\n const {\r\n register,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm<Inputs>();\r\n\r\n const onSubmit: SubmitHandler<Inputs> = (data) => {\r\n console.log(data);\r\n setStatus(\"busy\");\r\n setUserEmail(data.email);\r\n\r\n authClient.signUp\r\n .email(\r\n {\r\n name: data.email,\r\n email: data.email,\r\n password: data.password,\r\n },\r\n {\r\n headers: {\r\n \"Waitlist-Invitation-Code\": code || \"\",\r\n },\r\n }\r\n )\r\n .then((result) => {\r\n console.log(result);\r\n if (result.error) {\r\n toast.error(t(\"web-ui:auth.errors.invitationCodeInvalid\"));\r\n setStatus(\"start\");\r\n return;\r\n }\r\n if (waitlist) {\r\n authClient.signIn\r\n .email({\r\n email: data.email,\r\n password: data.password,\r\n })\r\n .then((res) => {\r\n console.log(res);\r\n if (res.data?.user) {\r\n registerSession(() => {\r\n navigate(\"/\");\r\n });\r\n } else if (res.error) {\r\n toast.error(t(\"web-ui:auth.errors.authentication\"), {\r\n description: res.error.message,\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n toast.error(t(\"web-ui:auth.errors.server\"), {\r\n description: error.message,\r\n });\r\n });\r\n } else setStatus(\"done\");\r\n })\r\n .catch((error) => {\r\n toast.error(error.message);\r\n setStatus(\"start\");\r\n });\r\n };\r\n\r\n if (status === \"done\") {\r\n const emailProviderUrl = userEmail ? getEmailProviderUrl(userEmail) : null;\r\n\r\n return (\r\n <Alert\r\n color=\"primary\"\r\n variant=\"faded\"\r\n title={t(\"web-ui:auth.signup.verificationEmailSent.title\")}\r\n >\r\n <div className=\"mt-2\">\r\n {t(\"web-ui:auth.signup.verificationEmailSent.description\")}\r\n {emailProviderUrl && (\r\n <div className=\"mt-3\">\r\n <a\r\n href={emailProviderUrl}\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n className=\"font-medium underline underline-offset-4 hover:opacity-80 transition-opacity\"\r\n >\r\n {t(\"web-ui:auth.signup.verificationEmailSent.openEmail\")}\r\n </a>\r\n </div>\r\n )}\r\n </div>\r\n </Alert>\r\n );\r\n }\r\n\r\n return (\r\n <form onSubmit={handleSubmit(onSubmit)} className=\"grid gap-6\">\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.login.email\")}\r\n type=\"email\"\r\n placeholder={t(\"web-ui:auth.login.placeholder.email\")}\r\n variant=\"bordered\"\r\n isRequired\r\n isDisabled={!!email}\r\n defaultValue={email ?? \"\"}\r\n {...register(\"email\", { required: true })}\r\n />\r\n {errors.email && (\r\n <span className=\"text-red-500 text-xs\">{t(\"web-ui:auth.signup.emailRequired\")}</span>\r\n )}\r\n </div>\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.login.password\")}\r\n placeholder={t(\"web-ui:auth.login.password\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"password\", { required: true })}\r\n />\r\n {errors.password && (\r\n <span className=\"text-red-500 text-xs\">{t(\"web-ui:auth.signup.passwordRequired\")}</span>\r\n )}\r\n </div>\r\n <Button type=\"submit\" className=\"w-full\" color=\"primary\" isDisabled={status === \"busy\"}>\r\n {status === \"busy\" ? t(\"web-ui:auth.signup.signingUp\") : t(\"web-ui:auth.signup.button\")}\r\n </Button>\r\n </form>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;AAcA,SAAS,oBAAoB,OAA8B;CACzD,MAAM,SAAS,MAAM,MAAM,IAAI,CAAC,IAAI,aAAa;AACjD,KAAI,CAAC,OAAQ,QAAO;CAEpB,MAAM,aAAa;EACjB,OAAO;EACP,SAAS;EACT,OAAO;EACP,QAAQ;EACR,QAAQ;EACT;AAoBD,QAlB0C;EACxC,aAAa,WAAW;EACxB,kBAAkB,WAAW;EAC7B,eAAe,WAAW;EAC1B,eAAe,WAAW;EAC1B,YAAY,WAAW;EACvB,WAAW,WAAW;EACtB,aAAa,WAAW;EACxB,eAAe,WAAW;EAC1B,YAAY,WAAW;EACvB,aAAa,WAAW;EACxB,cAAc,WAAW;EACzB,UAAU,WAAW;EACrB,WAAW,WAAW;EACtB,kBAAkB,WAAW;EAC7B,aAAa,WAAW;EACzB,CAEgB,WAAW;;AAG9B,SAAgB,WAAW,EACzB,MACA,OACA,YAKC;CACD,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,QAAQ,aAAa,SAAS,QAAQ;CAC7C,MAAM,CAAC,WAAW,gBAAgB,SAAiB,SAAS,GAAG;CAC/D,MAAM,EAAE,oBAAoB,YAAY;CACxC,MAAM,WAAW,aAAa;CAC9B,MAAM,EACJ,UACA,cACA,WAAW,EAAE,aACX,SAAiB;CAErB,MAAM,YAAmC,SAAS;AAChD,UAAQ,IAAI,KAAK;AACjB,YAAU,OAAO;AACjB,eAAa,KAAK,MAAM;AAExB,aAAW,OACR,MACC;GACE,MAAM,KAAK;GACX,OAAO,KAAK;GACZ,UAAU,KAAK;GAChB,EACD,EACE,SAAS,EACP,4BAA4B,QAAQ,IACrC,EACF,CACF,CACA,MAAM,WAAW;AAChB,WAAQ,IAAI,OAAO;AACnB,OAAI,OAAO,OAAO;AAChB,UAAM,MAAM,EAAE,2CAA2C,CAAC;AAC1D,cAAU,QAAQ;AAClB;;AAEF,OAAI,SACF,YAAW,OACR,MAAM;IACL,OAAO,KAAK;IACZ,UAAU,KAAK;IAChB,CAAC,CACD,MAAM,QAAQ;AACb,YAAQ,IAAI,IAAI;AAChB,QAAI,IAAI,MAAM,KACZ,uBAAsB;AACpB,cAAS,IAAI;MACb;aACO,IAAI,MACb,OAAM,MAAM,EAAE,oCAAoC,EAAE,EAClD,aAAa,IAAI,MAAM,SACxB,CAAC;KAEJ,CACD,OAAO,UAAU;AAChB,UAAM,MAAM,EAAE,4BAA4B,EAAE,EAC1C,aAAa,MAAM,SACpB,CAAC;KACF;OACC,WAAU,OAAO;IACxB,CACD,OAAO,UAAU;AAChB,SAAM,MAAM,MAAM,QAAQ;AAC1B,aAAU,QAAQ;IAClB;;AAGN,KAAI,WAAW,QAAQ;EACrB,MAAM,mBAAmB,YAAY,oBAAoB,UAAU,GAAG;AAEtE,SACE,oBAAC,OAAD;GACE,OAAM;GACN,SAAQ;GACR,OAAO,EAAE,iDAAiD;aAE1D,qBAAC,OAAD;IAAK,WAAU;cAAf,CACG,EAAE,uDAAuD,EACzD,oBACC,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,KAAD;MACE,MAAM;MACN,QAAO;MACP,KAAI;MACJ,WAAU;gBAET,EAAE,qDAAqD;MACtD,CAAA;KACA,CAAA,CAEJ;;GACA,CAAA;;AAIZ,QACE,qBAAC,QAAD;EAAM,UAAU,aAAa,SAAS;EAAE,WAAU;YAAlD;GACE,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KACE,gBAAe;KACf,OAAO,EAAE,0BAA0B;KACnC,MAAK;KACL,aAAa,EAAE,sCAAsC;KACrD,SAAQ;KACR,YAAA;KACA,YAAY,CAAC,CAAC;KACd,cAAc,SAAS;KACvB,GAAI,SAAS,SAAS,EAAE,UAAU,MAAM,CAAC;KACzC,CAAA,EACD,OAAO,SACN,oBAAC,QAAD;KAAM,WAAU;eAAwB,EAAE,mCAAmC;KAAQ,CAAA,CAEnF;;GACN,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KACE,gBAAe;KACf,OAAO,EAAE,6BAA6B;KACtC,aAAa,EAAE,6BAA6B;KAC5C,MAAK;KACL,SAAQ;KACR,YAAA;KACA,GAAI,SAAS,YAAY,EAAE,UAAU,MAAM,CAAC;KAC5C,CAAA,EACD,OAAO,YACN,oBAAC,QAAD;KAAM,WAAU;eAAwB,EAAE,sCAAsC;KAAQ,CAAA,CAEtF;;GACN,oBAAC,QAAD;IAAQ,MAAK;IAAS,WAAU;IAAS,OAAM;IAAU,YAAY,WAAW;cAC7E,WAAW,SAAS,EAAE,+BAA+B,GAAG,EAAE,4BAA4B;IAChF,CAAA;GACJ"}
@@ -1,7 +1,15 @@
1
- import type { UseBackendTRPC } from "../../../types";
1
+ import { UseBackendTRPC } from "../../../types.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/modules/auth/components/SignupRoute.d.ts
2
5
  interface SignupRouteProps {
3
- providers?: string[];
4
- useTRPC?: UseBackendTRPC;
6
+ providers?: string[];
7
+ useTRPC?: UseBackendTRPC;
5
8
  }
6
- export declare function SignupRoute({ providers, useTRPC }: SignupRouteProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
9
+ declare function SignupRoute({
10
+ providers,
11
+ useTRPC
12
+ }: SignupRouteProps): _$react_jsx_runtime0.JSX.Element;
13
+ //#endregion
14
+ export { SignupRoute };
15
+ //# sourceMappingURL=SignupRoute.d.ts.map
@@ -1,16 +1,62 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { AuthProviders } from "./AuthProviders.js";
2
+ import { SignupForm } from "./SignupFormRoute.js";
3
+ import { WaitlistCard } from "./WaitlistCard.js";
4
+ import { WaitlistCodeValidation } from "./WaitlistCodeValidation.js";
2
5
  import { Card, CardBody, CardHeader } from "@heroui/react";
3
- import { useQueryState } from "nuqs";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
4
7
  import { useTranslation } from "react-i18next";
5
- import { Link } from "react-router";
6
- import { SignupForm } from "./SignupFormRoute";
7
- import { AuthProviders } from "./AuthProviders";
8
- import { WaitlistCard } from "./WaitlistCard";
9
- import { WaitlistCodeValidation } from "./WaitlistCodeValidation";
10
- export function SignupRoute({ providers, useTRPC }) {
11
- const { t } = useTranslation();
12
- const [code] = useQueryState("code");
13
- const [email] = useQueryState("email");
14
- const hasWaitlist = !!useTRPC;
15
- return (_jsxs("div", { className: "flex flex-col gap-6", children: [hasWaitlist && !code ? (_jsx(WaitlistCard, { useTRPC: useTRPC })) : (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "text-center flex flex-col gap-1", children: [_jsx("p", { className: "text-xl font-semibold", children: t("web-ui:auth.signup.createAccount") }), _jsx("p", { className: "text-sm text-default-600", children: t("web-ui:auth.signup.description") })] }), _jsx(CardBody, { children: _jsxs("div", { className: "grid gap-6", children: [hasWaitlist && code && useTRPC && (_jsx(WaitlistCodeValidation, { code: code, useTRPC: useTRPC })), _jsx(AuthProviders, { providers: providers, code: code, requestSignUp: true }), _jsx(SignupForm, { code: code, email: email, waitlist: hasWaitlist })] }) })] })), _jsxs("div", { className: "text-center text-xs text-muted-foreground", children: [t("web-ui:auth.signup.alreadyHaveAccount"), " ", _jsx(Link, { to: "/login", className: "underline underline-offset-4 hover:text-primary", children: t("web-ui:auth.login.button") })] })] }));
8
+ import { Link as Link$1 } from "react-router";
9
+ import { useQueryState } from "nuqs";
10
+ //#region src/modules/auth/components/SignupRoute.tsx
11
+ function SignupRoute({ providers, useTRPC }) {
12
+ const { t } = useTranslation();
13
+ const [code] = useQueryState("code");
14
+ const [email] = useQueryState("email");
15
+ const hasWaitlist = !!useTRPC;
16
+ return /* @__PURE__ */ jsxs("div", {
17
+ className: "flex flex-col gap-6",
18
+ children: [hasWaitlist && !code ? /* @__PURE__ */ jsx(WaitlistCard, { useTRPC }) : /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
19
+ className: "text-center flex flex-col gap-1",
20
+ children: [/* @__PURE__ */ jsx("p", {
21
+ className: "text-xl font-semibold",
22
+ children: t("web-ui:auth.signup.createAccount")
23
+ }), /* @__PURE__ */ jsx("p", {
24
+ className: "text-sm text-default-600",
25
+ children: t("web-ui:auth.signup.description")
26
+ })]
27
+ }), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsxs("div", {
28
+ className: "grid gap-6",
29
+ children: [
30
+ hasWaitlist && code && useTRPC && /* @__PURE__ */ jsx(WaitlistCodeValidation, {
31
+ code,
32
+ useTRPC
33
+ }),
34
+ /* @__PURE__ */ jsx(AuthProviders, {
35
+ providers,
36
+ code,
37
+ requestSignUp: true
38
+ }),
39
+ /* @__PURE__ */ jsx(SignupForm, {
40
+ code,
41
+ email,
42
+ waitlist: hasWaitlist
43
+ })
44
+ ]
45
+ }) })] }), /* @__PURE__ */ jsxs("div", {
46
+ className: "text-center text-xs text-muted-foreground",
47
+ children: [
48
+ t("web-ui:auth.signup.alreadyHaveAccount"),
49
+ " ",
50
+ /* @__PURE__ */ jsx(Link$1, {
51
+ to: "/login",
52
+ className: "underline underline-offset-4 hover:text-primary",
53
+ children: t("web-ui:auth.login.button")
54
+ })
55
+ ]
56
+ })]
57
+ });
16
58
  }
59
+ //#endregion
60
+ export { SignupRoute };
61
+
62
+ //# sourceMappingURL=SignupRoute.js.map