@m5kdev/web-ui 0.1.4 → 0.2.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 (379) hide show
  1. package/dist/src/animations/card.motion.d.ts +0 -1
  2. package/dist/src/components/AvatarUpload.d.ts +0 -1
  3. package/dist/src/components/Button.d.ts +0 -1
  4. package/dist/src/components/Calendar.d.ts +0 -1
  5. package/dist/src/components/CardsSelect.d.ts +0 -1
  6. package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +0 -1
  7. package/dist/src/components/ColorPicker.d.ts +0 -1
  8. package/dist/src/components/CopyButton.d.ts +0 -1
  9. package/dist/src/components/CropDialog.d.ts +0 -1
  10. package/dist/src/components/DialogProvider.d.ts +0 -1
  11. package/dist/src/components/ErrorFallback.d.ts +0 -1
  12. package/dist/src/components/FileDropzone.d.ts +0 -1
  13. package/dist/src/components/MultiSelectDropdown.d.ts +0 -1
  14. package/dist/src/components/Orb.d.ts +0 -1
  15. package/dist/src/components/PageAlert.d.ts +0 -1
  16. package/dist/src/components/SelectChips.d.ts +0 -1
  17. package/dist/src/components/SidebarItem.d.ts +0 -1
  18. package/dist/src/components/Steps.d.ts +0 -1
  19. package/dist/src/components/TablerIconPicker.d.ts +0 -1
  20. package/dist/src/components/app-header.d.ts +0 -1
  21. package/dist/src/components/blur-card.d.ts +0 -1
  22. package/dist/src/components/features-section-demo-1.d.ts +0 -1
  23. package/dist/src/components/features-section-demo-2.d.ts +0 -1
  24. package/dist/src/components/features-section-demo-3.d.ts +0 -1
  25. package/dist/src/components/mode-toggle.d.ts +0 -1
  26. package/dist/src/components/nav-main.d.ts +0 -1
  27. package/dist/src/components/pricing-cards.d.ts +0 -1
  28. package/dist/src/components/shared/ButtonCopy.d.ts +0 -1
  29. package/dist/src/components/team-switcher.d.ts +0 -1
  30. package/dist/src/components/theme-provider.d.ts +0 -1
  31. package/dist/src/components/typewriter.d.ts +0 -1
  32. package/dist/src/components/ui/alert-dialog.d.ts +0 -1
  33. package/dist/src/components/ui/alert.d.ts +0 -1
  34. package/dist/src/components/ui/avatar.d.ts +0 -1
  35. package/dist/src/components/ui/badge.d.ts +0 -1
  36. package/dist/src/components/ui/bento-grid.d.ts +0 -1
  37. package/dist/src/components/ui/bento-grid2.d.ts +0 -1
  38. package/dist/src/components/ui/breadcrumb.d.ts +0 -1
  39. package/dist/src/components/ui/button.d.ts +0 -1
  40. package/dist/src/components/ui/card.d.ts +0 -1
  41. package/dist/src/components/ui/checkbox.d.ts +0 -1
  42. package/dist/src/components/ui/collapsible.d.ts +0 -1
  43. package/dist/src/components/ui/dialog.d.ts +0 -1
  44. package/dist/src/components/ui/dropdown-menu.d.ts +0 -1
  45. package/dist/src/components/ui/floating-navbar.d.ts +0 -1
  46. package/dist/src/components/ui/form.d.ts +0 -1
  47. package/dist/src/components/ui/image.d.ts +0 -1
  48. package/dist/src/components/ui/input.d.ts +0 -1
  49. package/dist/src/components/ui/label.d.ts +0 -1
  50. package/dist/src/components/ui/pagination.d.ts +0 -1
  51. package/dist/src/components/ui/progress.d.ts +0 -1
  52. package/dist/src/components/ui/resizable-navbar.d.ts +0 -1
  53. package/dist/src/components/ui/segment-control.d.ts +0 -1
  54. package/dist/src/components/ui/select.d.ts +0 -1
  55. package/dist/src/components/ui/separator.d.ts +0 -1
  56. package/dist/src/components/ui/sheet.d.ts +0 -1
  57. package/dist/src/components/ui/sidebar.d.ts +0 -1
  58. package/dist/src/components/ui/skeleton.d.ts +0 -1
  59. package/dist/src/components/ui/slider.d.ts +0 -1
  60. package/dist/src/components/ui/sonner.d.ts +0 -1
  61. package/dist/src/components/ui/spinner.d.ts +0 -1
  62. package/dist/src/components/ui/switch.d.ts +0 -1
  63. package/dist/src/components/ui/table.d.ts +0 -1
  64. package/dist/src/components/ui/tabs.d.ts +0 -1
  65. package/dist/src/components/ui/textarea.d.ts +0 -1
  66. package/dist/src/components/ui/timeline.d.ts +0 -1
  67. package/dist/src/components/ui/toast.d.ts +0 -1
  68. package/dist/src/components/ui/tooltip.d.ts +0 -1
  69. package/dist/src/components/ui/typewriter-effect.d.ts +0 -1
  70. package/dist/src/hooks/use-mobile.d.ts +0 -1
  71. package/dist/src/hooks/useDialog.d.ts +0 -1
  72. package/dist/src/icons/GoogleIcon.d.ts +0 -1
  73. package/dist/src/icons/LinkedInIcon.d.ts +0 -1
  74. package/dist/src/icons/MicrosoftIcon.d.ts +0 -1
  75. package/dist/src/lib/chatwoot.d.ts +0 -1
  76. package/dist/src/lib/utils.d.ts +0 -1
  77. package/dist/src/modules/app/components/AppLoader.d.ts +0 -1
  78. package/dist/src/modules/app/components/AppShell.d.ts +0 -1
  79. package/dist/src/modules/app/components/AppSidebar.d.ts +0 -1
  80. package/dist/src/modules/app/components/AppSidebarContent.d.ts +0 -1
  81. package/dist/src/modules/app/components/AppSidebarHeader.d.ts +0 -1
  82. package/dist/src/modules/app/components/AppSidebarInvites.d.ts +0 -1
  83. package/dist/src/modules/app/components/AppSidebarUser.d.ts +0 -1
  84. package/dist/src/modules/auth/components/AdminUserManagement.d.ts +0 -1
  85. package/dist/src/modules/auth/components/AdminWaitlist.d.ts +0 -1
  86. package/dist/src/modules/auth/components/AuthLayout.d.ts +0 -1
  87. package/dist/src/modules/auth/components/AuthProviders.d.ts +0 -1
  88. package/dist/src/modules/auth/components/AuthRouter.d.ts +0 -1
  89. package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +0 -1
  90. package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +0 -1
  91. package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +0 -1
  92. package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +0 -1
  93. package/dist/src/modules/auth/components/InviteFriends.d.ts +0 -1
  94. package/dist/src/modules/auth/components/LastUsedBadge.d.ts +0 -1
  95. package/dist/src/modules/auth/components/LoginForm.d.ts +0 -1
  96. package/dist/src/modules/auth/components/LoginRoute.d.ts +0 -1
  97. package/dist/src/modules/auth/components/LogoutRoute.d.ts +0 -1
  98. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +0 -1
  99. package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +0 -1
  100. package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +0 -1
  101. package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +0 -1
  102. package/dist/src/modules/auth/components/ProfileRoute.d.ts +0 -1
  103. package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +0 -1
  104. package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +0 -1
  105. package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +0 -1
  106. package/dist/src/modules/auth/components/SignupFormRoute.d.ts +0 -1
  107. package/dist/src/modules/auth/components/SignupRoute.d.ts +0 -1
  108. package/dist/src/modules/auth/components/UserPreferences.d.ts +0 -1
  109. package/dist/src/modules/auth/components/WaitlistCard.d.ts +0 -1
  110. package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +0 -1
  111. package/dist/src/modules/billing/components/BillingBetaPage.d.ts +0 -1
  112. package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +0 -1
  113. package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +0 -1
  114. package/dist/src/modules/billing/components/BillingRouter.d.ts +0 -1
  115. package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +0 -1
  116. package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +0 -1
  117. package/dist/src/modules/table/components/NuqsTable.d.ts +0 -1
  118. package/dist/src/modules/table/components/TableFiltering.d.ts +0 -1
  119. package/dist/src/modules/table/components/TablePagination.d.ts +0 -1
  120. package/dist/src/modules/table/components/table.types.d.ts +0 -1
  121. package/dist/src/modules/table/filterTransformers.d.ts +0 -1
  122. package/dist/src/types.d.ts +0 -1
  123. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  124. package/package.json +8 -5
  125. package/.cursor/rules/web-ui.mdc +0 -126
  126. package/.turbo/turbo-build.log +0 -5
  127. package/.turbo/turbo-check-types.log +0 -5
  128. package/.turbo/turbo-lint$colon$fix.log +0 -381
  129. package/.turbo/turbo-lint.log +0 -361
  130. package/CHANGELOG.md +0 -25
  131. package/components.json +0 -21
  132. package/dist/src/animations/card.motion.d.ts.map +0 -1
  133. package/dist/src/components/AvatarUpload.d.ts.map +0 -1
  134. package/dist/src/components/Button.d.ts.map +0 -1
  135. package/dist/src/components/Calendar.d.ts.map +0 -1
  136. package/dist/src/components/CardsSelect.d.ts.map +0 -1
  137. package/dist/src/components/CollapsibleSidebarMenuItem.d.ts.map +0 -1
  138. package/dist/src/components/ColorPicker.d.ts.map +0 -1
  139. package/dist/src/components/CopyButton.d.ts.map +0 -1
  140. package/dist/src/components/CropDialog.d.ts.map +0 -1
  141. package/dist/src/components/DialogProvider.d.ts.map +0 -1
  142. package/dist/src/components/ErrorFallback.d.ts.map +0 -1
  143. package/dist/src/components/FileDropzone.d.ts.map +0 -1
  144. package/dist/src/components/MultiSelectDropdown.d.ts.map +0 -1
  145. package/dist/src/components/Orb.d.ts.map +0 -1
  146. package/dist/src/components/PageAlert.d.ts.map +0 -1
  147. package/dist/src/components/SelectChips.d.ts.map +0 -1
  148. package/dist/src/components/SidebarItem.d.ts.map +0 -1
  149. package/dist/src/components/Steps.d.ts.map +0 -1
  150. package/dist/src/components/TablerIconPicker.d.ts.map +0 -1
  151. package/dist/src/components/app-header.d.ts.map +0 -1
  152. package/dist/src/components/blur-card.d.ts.map +0 -1
  153. package/dist/src/components/features-section-demo-1.d.ts.map +0 -1
  154. package/dist/src/components/features-section-demo-2.d.ts.map +0 -1
  155. package/dist/src/components/features-section-demo-3.d.ts.map +0 -1
  156. package/dist/src/components/mode-toggle.d.ts.map +0 -1
  157. package/dist/src/components/nav-main.d.ts.map +0 -1
  158. package/dist/src/components/pricing-cards.d.ts.map +0 -1
  159. package/dist/src/components/shared/ButtonCopy.d.ts.map +0 -1
  160. package/dist/src/components/team-switcher.d.ts.map +0 -1
  161. package/dist/src/components/theme-provider.d.ts.map +0 -1
  162. package/dist/src/components/typewriter.d.ts.map +0 -1
  163. package/dist/src/components/ui/alert-dialog.d.ts.map +0 -1
  164. package/dist/src/components/ui/alert.d.ts.map +0 -1
  165. package/dist/src/components/ui/avatar.d.ts.map +0 -1
  166. package/dist/src/components/ui/badge.d.ts.map +0 -1
  167. package/dist/src/components/ui/bento-grid.d.ts.map +0 -1
  168. package/dist/src/components/ui/bento-grid2.d.ts.map +0 -1
  169. package/dist/src/components/ui/breadcrumb.d.ts.map +0 -1
  170. package/dist/src/components/ui/button.d.ts.map +0 -1
  171. package/dist/src/components/ui/card.d.ts.map +0 -1
  172. package/dist/src/components/ui/checkbox.d.ts.map +0 -1
  173. package/dist/src/components/ui/collapsible.d.ts.map +0 -1
  174. package/dist/src/components/ui/dialog.d.ts.map +0 -1
  175. package/dist/src/components/ui/dropdown-menu.d.ts.map +0 -1
  176. package/dist/src/components/ui/floating-navbar.d.ts.map +0 -1
  177. package/dist/src/components/ui/form.d.ts.map +0 -1
  178. package/dist/src/components/ui/image.d.ts.map +0 -1
  179. package/dist/src/components/ui/input.d.ts.map +0 -1
  180. package/dist/src/components/ui/label.d.ts.map +0 -1
  181. package/dist/src/components/ui/pagination.d.ts.map +0 -1
  182. package/dist/src/components/ui/progress.d.ts.map +0 -1
  183. package/dist/src/components/ui/resizable-navbar.d.ts.map +0 -1
  184. package/dist/src/components/ui/segment-control.d.ts.map +0 -1
  185. package/dist/src/components/ui/select.d.ts.map +0 -1
  186. package/dist/src/components/ui/separator.d.ts.map +0 -1
  187. package/dist/src/components/ui/sheet.d.ts.map +0 -1
  188. package/dist/src/components/ui/sidebar.d.ts.map +0 -1
  189. package/dist/src/components/ui/skeleton.d.ts.map +0 -1
  190. package/dist/src/components/ui/slider.d.ts.map +0 -1
  191. package/dist/src/components/ui/sonner.d.ts.map +0 -1
  192. package/dist/src/components/ui/spinner.d.ts.map +0 -1
  193. package/dist/src/components/ui/switch.d.ts.map +0 -1
  194. package/dist/src/components/ui/table.d.ts.map +0 -1
  195. package/dist/src/components/ui/tabs.d.ts.map +0 -1
  196. package/dist/src/components/ui/textarea.d.ts.map +0 -1
  197. package/dist/src/components/ui/timeline.d.ts.map +0 -1
  198. package/dist/src/components/ui/toast.d.ts.map +0 -1
  199. package/dist/src/components/ui/tooltip.d.ts.map +0 -1
  200. package/dist/src/components/ui/typewriter-effect.d.ts.map +0 -1
  201. package/dist/src/hooks/use-mobile.d.ts.map +0 -1
  202. package/dist/src/hooks/useDialog.d.ts.map +0 -1
  203. package/dist/src/icons/GoogleIcon.d.ts.map +0 -1
  204. package/dist/src/icons/LinkedInIcon.d.ts.map +0 -1
  205. package/dist/src/icons/MicrosoftIcon.d.ts.map +0 -1
  206. package/dist/src/lib/chatwoot.d.ts.map +0 -1
  207. package/dist/src/lib/utils.d.ts.map +0 -1
  208. package/dist/src/modules/app/components/AppLoader.d.ts.map +0 -1
  209. package/dist/src/modules/app/components/AppShell.d.ts.map +0 -1
  210. package/dist/src/modules/app/components/AppSidebar.d.ts.map +0 -1
  211. package/dist/src/modules/app/components/AppSidebarContent.d.ts.map +0 -1
  212. package/dist/src/modules/app/components/AppSidebarHeader.d.ts.map +0 -1
  213. package/dist/src/modules/app/components/AppSidebarInvites.d.ts.map +0 -1
  214. package/dist/src/modules/app/components/AppSidebarUser.d.ts.map +0 -1
  215. package/dist/src/modules/auth/components/AdminUserManagement.d.ts.map +0 -1
  216. package/dist/src/modules/auth/components/AdminWaitlist.d.ts.map +0 -1
  217. package/dist/src/modules/auth/components/AuthLayout.d.ts.map +0 -1
  218. package/dist/src/modules/auth/components/AuthProviders.d.ts.map +0 -1
  219. package/dist/src/modules/auth/components/AuthRouter.d.ts.map +0 -1
  220. package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts.map +0 -1
  221. package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts.map +0 -1
  222. package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts.map +0 -1
  223. package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts.map +0 -1
  224. package/dist/src/modules/auth/components/InviteFriends.d.ts.map +0 -1
  225. package/dist/src/modules/auth/components/LastUsedBadge.d.ts.map +0 -1
  226. package/dist/src/modules/auth/components/LoginForm.d.ts.map +0 -1
  227. package/dist/src/modules/auth/components/LoginRoute.d.ts.map +0 -1
  228. package/dist/src/modules/auth/components/LogoutRoute.d.ts.map +0 -1
  229. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts.map +0 -1
  230. package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts.map +0 -1
  231. package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts.map +0 -1
  232. package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts.map +0 -1
  233. package/dist/src/modules/auth/components/ProfileRoute.d.ts.map +0 -1
  234. package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts.map +0 -1
  235. package/dist/src/modules/auth/components/ResetPasswordForm.d.ts.map +0 -1
  236. package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts.map +0 -1
  237. package/dist/src/modules/auth/components/SignupFormRoute.d.ts.map +0 -1
  238. package/dist/src/modules/auth/components/SignupRoute.d.ts.map +0 -1
  239. package/dist/src/modules/auth/components/UserPreferences.d.ts.map +0 -1
  240. package/dist/src/modules/auth/components/WaitlistCard.d.ts.map +0 -1
  241. package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts.map +0 -1
  242. package/dist/src/modules/billing/components/BillingBetaPage.d.ts.map +0 -1
  243. package/dist/src/modules/billing/components/BillingInvoicePage.d.ts.map +0 -1
  244. package/dist/src/modules/billing/components/BillingPlanSelect.d.ts.map +0 -1
  245. package/dist/src/modules/billing/components/BillingRouter.d.ts.map +0 -1
  246. package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts.map +0 -1
  247. package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts.map +0 -1
  248. package/dist/src/modules/table/components/NuqsTable.d.ts.map +0 -1
  249. package/dist/src/modules/table/components/TableFiltering.d.ts.map +0 -1
  250. package/dist/src/modules/table/components/TablePagination.d.ts.map +0 -1
  251. package/dist/src/modules/table/components/table.types.d.ts.map +0 -1
  252. package/dist/src/modules/table/filterTransformers.d.ts.map +0 -1
  253. package/dist/src/types.d.ts.map +0 -1
  254. package/src/animations/card.motion.ts +0 -9
  255. package/src/components/AvatarUpload.tsx +0 -133
  256. package/src/components/Button.tsx +0 -14
  257. package/src/components/Calendar.css +0 -684
  258. package/src/components/Calendar.tsx +0 -32
  259. package/src/components/CardsSelect.tsx +0 -155
  260. package/src/components/CollapsibleSidebarMenuItem.tsx +0 -57
  261. package/src/components/ColorPicker.tsx +0 -56
  262. package/src/components/CopyButton.tsx +0 -45
  263. package/src/components/CropDialog.tsx +0 -154
  264. package/src/components/DialogProvider.tsx +0 -105
  265. package/src/components/ErrorFallback.tsx +0 -17
  266. package/src/components/FileDropzone.tsx +0 -120
  267. package/src/components/MultiSelectDropdown.tsx +0 -233
  268. package/src/components/Orb.tsx +0 -288
  269. package/src/components/PageAlert.tsx +0 -121
  270. package/src/components/SelectChips.tsx +0 -40
  271. package/src/components/SidebarItem.tsx +0 -26
  272. package/src/components/Steps.tsx +0 -340
  273. package/src/components/TablerIconPicker.tsx +0 -4260
  274. package/src/components/app-header.tsx +0 -40
  275. package/src/components/blur-card.tsx +0 -132
  276. package/src/components/features-section-demo-1.tsx +0 -127
  277. package/src/components/features-section-demo-2.tsx +0 -102
  278. package/src/components/features-section-demo-3.tsx +0 -272
  279. package/src/components/mode-toggle.tsx +0 -31
  280. package/src/components/nav-main.tsx +0 -69
  281. package/src/components/pricing-cards.tsx +0 -133
  282. package/src/components/shared/ButtonCopy.tsx +0 -50
  283. package/src/components/team-switcher.tsx +0 -83
  284. package/src/components/theme-provider.tsx +0 -74
  285. package/src/components/typewriter.tsx +0 -90
  286. package/src/components/ui/alert-dialog.tsx +0 -133
  287. package/src/components/ui/alert.tsx +0 -60
  288. package/src/components/ui/avatar.tsx +0 -47
  289. package/src/components/ui/badge.tsx +0 -33
  290. package/src/components/ui/bento-grid.tsx +0 -54
  291. package/src/components/ui/bento-grid2.tsx +0 -66
  292. package/src/components/ui/breadcrumb.tsx +0 -101
  293. package/src/components/ui/button.tsx +0 -50
  294. package/src/components/ui/card.tsx +0 -55
  295. package/src/components/ui/checkbox.tsx +0 -26
  296. package/src/components/ui/collapsible.tsx +0 -9
  297. package/src/components/ui/dialog.tsx +0 -119
  298. package/src/components/ui/dropdown-menu.tsx +0 -186
  299. package/src/components/ui/floating-navbar.tsx +0 -78
  300. package/src/components/ui/form.tsx +0 -167
  301. package/src/components/ui/image.tsx +0 -55
  302. package/src/components/ui/input.tsx +0 -22
  303. package/src/components/ui/label.tsx +0 -19
  304. package/src/components/ui/pagination.tsx +0 -105
  305. package/src/components/ui/progress.tsx +0 -23
  306. package/src/components/ui/resizable-navbar.tsx +0 -260
  307. package/src/components/ui/segment-control.tsx +0 -143
  308. package/src/components/ui/select.tsx +0 -153
  309. package/src/components/ui/separator.tsx +0 -24
  310. package/src/components/ui/sheet.tsx +0 -121
  311. package/src/components/ui/sidebar.tsx +0 -736
  312. package/src/components/ui/skeleton.tsx +0 -7
  313. package/src/components/ui/slider.tsx +0 -23
  314. package/src/components/ui/sonner.tsx +0 -27
  315. package/src/components/ui/spinner.tsx +0 -45
  316. package/src/components/ui/switch.tsx +0 -27
  317. package/src/components/ui/table.tsx +0 -90
  318. package/src/components/ui/tabs.tsx +0 -52
  319. package/src/components/ui/textarea.tsx +0 -18
  320. package/src/components/ui/timeline.tsx +0 -95
  321. package/src/components/ui/toast.tsx +0 -126
  322. package/src/components/ui/tooltip.tsx +0 -55
  323. package/src/components/ui/typewriter-effect.tsx +0 -181
  324. package/src/hooks/use-mobile.ts +0 -19
  325. package/src/hooks/useDialog.ts +0 -25
  326. package/src/icons/GoogleIcon.tsx +0 -32
  327. package/src/icons/LinkedInIcon.tsx +0 -30
  328. package/src/icons/MicrosoftIcon.tsx +0 -21
  329. package/src/lib/chatwoot.ts +0 -51
  330. package/src/lib/utils.ts +0 -6
  331. package/src/modules/app/components/AppLoader.tsx +0 -9
  332. package/src/modules/app/components/AppShell.tsx +0 -21
  333. package/src/modules/app/components/AppSidebar.tsx +0 -26
  334. package/src/modules/app/components/AppSidebarContent.tsx +0 -73
  335. package/src/modules/app/components/AppSidebarHeader.tsx +0 -57
  336. package/src/modules/app/components/AppSidebarInvites.tsx +0 -32
  337. package/src/modules/app/components/AppSidebarUser.tsx +0 -128
  338. package/src/modules/auth/components/AdminUserManagement.tsx +0 -1136
  339. package/src/modules/auth/components/AdminWaitlist.tsx +0 -358
  340. package/src/modules/auth/components/AuthLayout.tsx +0 -13
  341. package/src/modules/auth/components/AuthProviders.tsx +0 -105
  342. package/src/modules/auth/components/AuthRouter.tsx +0 -29
  343. package/src/modules/auth/components/ClaimAccountRoute.tsx +0 -242
  344. package/src/modules/auth/components/ErrorAuthRoute.tsx +0 -121
  345. package/src/modules/auth/components/ForgotPasswordForm.tsx +0 -58
  346. package/src/modules/auth/components/ForgotPasswordRoute.tsx +0 -27
  347. package/src/modules/auth/components/InviteFriends.tsx +0 -273
  348. package/src/modules/auth/components/LastUsedBadge.tsx +0 -22
  349. package/src/modules/auth/components/LoginForm.tsx +0 -104
  350. package/src/modules/auth/components/LoginRoute.tsx +0 -31
  351. package/src/modules/auth/components/LogoutRoute.tsx +0 -21
  352. package/src/modules/auth/components/OrganizationAcceptInvitationRoute.tsx +0 -161
  353. package/src/modules/auth/components/OrganizationMembersRoute.tsx +0 -730
  354. package/src/modules/auth/components/OrganizationSettingsRoute.tsx +0 -280
  355. package/src/modules/auth/components/OrganizationSwitcher.tsx +0 -148
  356. package/src/modules/auth/components/ProfileRoute.tsx +0 -104
  357. package/src/modules/auth/components/RangeNuqsDatePicker.tsx +0 -365
  358. package/src/modules/auth/components/ResetPasswordForm.tsx +0 -103
  359. package/src/modules/auth/components/ResetPasswordRoute.tsx +0 -27
  360. package/src/modules/auth/components/SignupFormRoute.tsx +0 -189
  361. package/src/modules/auth/components/SignupRoute.tsx +0 -53
  362. package/src/modules/auth/components/UserPreferences.tsx +0 -144
  363. package/src/modules/auth/components/WaitlistCard.tsx +0 -78
  364. package/src/modules/auth/components/WaitlistCodeValidation.tsx +0 -79
  365. package/src/modules/billing/components/BillingBetaPage.tsx +0 -124
  366. package/src/modules/billing/components/BillingInvoicePage.tsx +0 -180
  367. package/src/modules/billing/components/BillingPlanSelect.tsx +0 -14
  368. package/src/modules/billing/components/BillingRouter.tsx +0 -20
  369. package/src/modules/billing/components/BillingSinglePlanSelect.tsx +0 -172
  370. package/src/modules/table/components/ColumnOrderAndVisibility.tsx +0 -127
  371. package/src/modules/table/components/NuqsTable.tsx +0 -396
  372. package/src/modules/table/components/TableFiltering.tsx +0 -520
  373. package/src/modules/table/components/TablePagination.tsx +0 -59
  374. package/src/modules/table/components/table.types.ts +0 -11
  375. package/src/modules/table/filterTransformers.ts +0 -323
  376. package/src/types.ts +0 -4
  377. package/src/vite-env.d.ts +0 -1
  378. package/translations/en/web-ui.json +0 -192
  379. package/tsconfig.json +0 -30
@@ -1,365 +0,0 @@
1
- import {
2
- DateRangePicker,
3
- type DateValue,
4
- type RangeValue,
5
- Select,
6
- SelectItem,
7
- } from "@heroui/react";
8
- import { CalendarDate, getLocalTimeZone, today } from "@internationalized/date";
9
- import type { QueryFilters } from "@m5kdev/commons/modules/schemas/query.schema";
10
- import { useNuqsQueryParams } from "@m5kdev/frontend/modules/table/hooks/useNuqsQueryParams";
11
- import {
12
- calendarDateToEndOfDayUTC,
13
- calendarDateToUTC,
14
- dateFilterToRangeValue,
15
- } from "@m5kdev/web-ui/modules/table/filterTransformers";
16
- import { DateTime } from "luxon";
17
- import { useEffect, useMemo, useState } from "react";
18
- import { useTranslation } from "react-i18next";
19
-
20
- type QuickRangeKey =
21
- | "today"
22
- | "yesterday"
23
- | "last7"
24
- | "last30"
25
- | "thisWeek"
26
- | "lastWeek"
27
- | "thisMonth"
28
- | "lastMonth"
29
- | "thisYear"
30
- | "lastYear";
31
-
32
- const toCalendarDate = (dt: DateTime): CalendarDate => new CalendarDate(dt.year, dt.month, dt.day);
33
-
34
- const isSameCalendarDate = (a: CalendarDate, b: CalendarDate) =>
35
- a.year === b.year && a.month === b.month && a.day === b.day;
36
-
37
- export interface RangeNuqsDatePickerProps {
38
- /**
39
- * The column ID to use for the date filter (e.g., "startedAt")
40
- */
41
- columnId?: string;
42
- /**
43
- * The end column ID for range filters (e.g., "endedAt")
44
- */
45
- endColumnId?: string;
46
- /**
47
- * Label for the date range picker
48
- */
49
- dateRangeLabel?: string;
50
- /**
51
- * Label for the quick range selector
52
- */
53
- quickRangeLabel?: string;
54
- /**
55
- * Translation namespace for i18n
56
- */
57
- translationNamespace?: string;
58
- /**
59
- * Whether to show quick range selector
60
- */
61
- showQuickRange?: boolean;
62
- /**
63
- * Custom className for the container
64
- */
65
- className?: string;
66
- }
67
-
68
- export const RangeNuqsDatePicker = ({
69
- columnId = "startedAt",
70
- endColumnId = "endedAt",
71
- dateRangeLabel,
72
- quickRangeLabel,
73
- translationNamespace = "horecaai-app",
74
- showQuickRange = true,
75
- className,
76
- }: RangeNuqsDatePickerProps) => {
77
- const { t } = useTranslation();
78
- const { filters, setFilters } = useNuqsQueryParams();
79
-
80
- const [quickRange, setQuickRange] = useState<QuickRangeKey | null>(null);
81
- const [hasInitialized, setHasInitialized] = useState(false);
82
-
83
- // Extract date range from filters using shared helper
84
- const dateRange = useMemo(() => {
85
- return dateFilterToRangeValue(filters, columnId);
86
- }, [filters, columnId]);
87
-
88
- const todayIso = DateTime.utc().toISODate();
89
-
90
- const quickRangeOptions = useMemo(() => {
91
- const now = DateTime.utc();
92
- const todayStart = now.startOf("day");
93
- const weekStart = todayStart.startOf("week");
94
- const monthStart = todayStart.startOf("month");
95
- const lastWeekStart = weekStart.minus({ weeks: 1 });
96
- const lastMonthStart = monthStart.minus({ months: 1 });
97
- const yearStart = todayStart.startOf("year");
98
- const lastYearStart = yearStart.minus({ years: 1 });
99
-
100
- const options: { key: QuickRangeKey; label: string; start: DateTime; end: DateTime }[] = [
101
- {
102
- key: "today",
103
- label: t(`${translationNamespace}:reports.quickRange.today`, { defaultValue: "Today" }),
104
- start: todayStart,
105
- end: todayStart,
106
- },
107
- {
108
- key: "yesterday",
109
- label: t(`${translationNamespace}:reports.quickRange.yesterday`, {
110
- defaultValue: "Yesterday",
111
- }),
112
- start: todayStart.minus({ days: 1 }),
113
- end: todayStart.minus({ days: 1 }),
114
- },
115
- {
116
- key: "last7",
117
- label: t(`${translationNamespace}:reports.quickRange.last7`, {
118
- defaultValue: "Last 7 days",
119
- }),
120
- start: todayStart.minus({ days: 6 }),
121
- end: todayStart,
122
- },
123
- {
124
- key: "last30",
125
- label: t(`${translationNamespace}:reports.quickRange.last30`, {
126
- defaultValue: "Last 30 days",
127
- }),
128
- start: todayStart.minus({ days: 29 }),
129
- end: todayStart,
130
- },
131
- {
132
- key: "thisWeek",
133
- label: t(`${translationNamespace}:reports.quickRange.thisWeek`, {
134
- defaultValue: "This week",
135
- }),
136
- start: weekStart,
137
- end: todayStart,
138
- },
139
- {
140
- key: "lastWeek",
141
- label: t(`${translationNamespace}:reports.quickRange.lastWeek`, {
142
- defaultValue: "Last week",
143
- }),
144
- start: lastWeekStart,
145
- end: lastWeekStart.plus({ days: 6 }),
146
- },
147
- {
148
- key: "thisMonth",
149
- label: t(`${translationNamespace}:reports.quickRange.thisMonth`, {
150
- defaultValue: "This month",
151
- }),
152
- start: monthStart,
153
- end: todayStart,
154
- },
155
- {
156
- key: "lastMonth",
157
- label: t(`${translationNamespace}:reports.quickRange.lastMonth`, {
158
- defaultValue: "Last month",
159
- }),
160
- start: lastMonthStart,
161
- end: lastMonthStart.endOf("month"),
162
- },
163
- {
164
- key: "thisYear",
165
- label: t(`${translationNamespace}:reports.quickRange.thisYear`, {
166
- defaultValue: "This year",
167
- }),
168
- start: yearStart,
169
- end: todayStart,
170
- },
171
- {
172
- key: "lastYear",
173
- label: t(`${translationNamespace}:reports.quickRange.lastYear`, {
174
- defaultValue: "Last year",
175
- }),
176
- start: lastYearStart,
177
- end: lastYearStart.endOf("year"),
178
- },
179
- ];
180
-
181
- return options.map((opt) => ({
182
- key: opt.key,
183
- label: opt.label,
184
- range: {
185
- start: toCalendarDate(opt.start),
186
- end: toCalendarDate(opt.end),
187
- },
188
- }));
189
- }, [t, todayIso, translationNamespace]);
190
-
191
- // Set default to "this month" on initial load if no date range is set
192
- useEffect(() => {
193
- if (hasInitialized || !setFilters) return;
194
-
195
- // Check if there's already a valid date range from URL
196
- if (dateRange) {
197
- setHasInitialized(true);
198
- return;
199
- }
200
-
201
- // No date range set, initialize to "this month"
202
- const thisMonthOption = quickRangeOptions.find((opt) => opt.key === "thisMonth");
203
- if (thisMonthOption) {
204
- setHasInitialized(true);
205
- setQuickRange("thisMonth");
206
-
207
- // Set filters directly for "this month" range
208
- const startDate = thisMonthOption.range.start;
209
- const endDate = thisMonthOption.range.end;
210
-
211
- const newFilters: QueryFilters = [
212
- ...(filters?.filter((f) => f.columnId !== columnId && f.columnId !== endColumnId) ?? []),
213
- {
214
- columnId,
215
- type: "date" as const,
216
- method: "intersect" as const,
217
- value: calendarDateToUTC(startDate),
218
- valueTo: calendarDateToEndOfDayUTC(endDate),
219
- endColumnId,
220
- },
221
- ];
222
-
223
- setFilters(newFilters);
224
- }
225
- }, [dateRange, columnId, endColumnId, quickRangeOptions, hasInitialized, setFilters]);
226
-
227
- useEffect(() => {
228
- // Don't sync quickRange if we're still initializing
229
- if (!hasInitialized) return;
230
-
231
- if (!dateRange?.start || !dateRange?.end) {
232
- setQuickRange(null);
233
- return;
234
- }
235
-
236
- const start = dateRange.start as unknown as CalendarDate;
237
- const end = dateRange.end as unknown as CalendarDate;
238
-
239
- const matches = quickRangeOptions.filter(
240
- (option) =>
241
- isSameCalendarDate(option.range.start, start) && isSameCalendarDate(option.range.end, end)
242
- );
243
-
244
- if (matches.length === 0) {
245
- setQuickRange(null);
246
- return;
247
- }
248
-
249
- // If the current quick range still matches, keep it
250
- const currentStillMatches = quickRange ? matches.find((m) => m.key === quickRange) : null;
251
- if (currentStillMatches) {
252
- return;
253
- }
254
-
255
- // Otherwise pick the highest-priority match to keep intent (week/month over last7 overlap)
256
- const priority: QuickRangeKey[] = [
257
- "today",
258
- "yesterday",
259
- "thisWeek",
260
- "lastWeek",
261
- "thisMonth",
262
- "lastMonth",
263
- "last7",
264
- "last30",
265
- ];
266
- const preferred =
267
- priority.map((key) => matches.find((m) => m.key === key)).find((m) => Boolean(m)) ??
268
- matches[0];
269
-
270
- setQuickRange(preferred?.key ?? null);
271
- }, [dateRange, quickRangeOptions, quickRange, hasInitialized]);
272
-
273
- // Handle date range changes
274
- const handleDateRangeChange = (range: RangeValue<DateValue> | null) => {
275
- if (!setFilters) return;
276
-
277
- if (!range?.start || !range?.end) {
278
- // Remove date filters
279
- const newFilters =
280
- filters?.filter((f) => f.columnId !== columnId && f.columnId !== endColumnId) ?? [];
281
- setFilters(newFilters);
282
- return;
283
- }
284
-
285
- // Use intersect to find records where [startedAt, endedAt] overlaps with the selected range
286
- // This includes ongoing records (endedAt = NULL) and records that overlap the range
287
- const startDate = range.start as unknown as CalendarDate;
288
- const endDate = range.end as unknown as CalendarDate;
289
-
290
- const newFilters: QueryFilters = [
291
- ...(filters?.filter((f) => f.columnId !== columnId && f.columnId !== endColumnId) ?? []),
292
- {
293
- columnId,
294
- type: "date" as const,
295
- method: "intersect" as const,
296
- value: calendarDateToUTC(startDate),
297
- valueTo: calendarDateToEndOfDayUTC(endDate),
298
- endColumnId,
299
- },
300
- ];
301
-
302
- setFilters(newFilters);
303
- };
304
-
305
- const handleQuickRangeChange = (key: QuickRangeKey | null) => {
306
- if (!key) {
307
- setQuickRange(null);
308
- return;
309
- }
310
-
311
- const option = quickRangeOptions.find((opt) => opt.key === key);
312
- if (!option) return;
313
-
314
- setQuickRange(key);
315
- handleDateRangeChange({
316
- start: option.range.start as unknown as DateValue,
317
- end: option.range.end as unknown as DateValue,
318
- });
319
- };
320
-
321
- return (
322
- <div className={`flex gap-4 flex-row ${className ?? ""}`}>
323
- <div className="flex flex-col gap-2">
324
- <span className="text-sm text-muted-foreground">
325
- {dateRangeLabel ??
326
- t(`${translationNamespace}:reports.dateRange`, { defaultValue: "Date range" })}
327
- </span>
328
- <DateRangePicker
329
- value={(dateRange as any) ?? undefined}
330
- onChange={handleDateRangeChange}
331
- className="w-[300px]"
332
- granularity="day"
333
- showMonthAndYearPickers
334
- maxValue={today(getLocalTimeZone()) as unknown as DateValue}
335
- popoverProps={{
336
- portalContainer: document.body,
337
- disableAnimation: true,
338
- }}
339
- />
340
- </div>
341
- {showQuickRange && (
342
- <div className="flex flex-col gap-2">
343
- <span className="text-sm text-muted-foreground">
344
- {quickRangeLabel ??
345
- t(`${translationNamespace}:reports.quickRange.label`, {
346
- defaultValue: "Quick range",
347
- })}
348
- </span>
349
- <Select
350
- selectedKeys={quickRange ? [quickRange] : []}
351
- onChange={(e) => handleQuickRangeChange((e.target.value as QuickRangeKey) ?? null)}
352
- className="w-[300px]"
353
- popoverProps={{
354
- portalContainer: document.body,
355
- }}
356
- >
357
- {quickRangeOptions.map((option) => (
358
- <SelectItem key={option.key}>{option.label}</SelectItem>
359
- ))}
360
- </Select>
361
- </div>
362
- )}
363
- </div>
364
- );
365
- };
@@ -1,103 +0,0 @@
1
- import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
2
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
3
- import { type SubmitHandler, useForm } from "react-hook-form";
4
- import { useTranslation } from "react-i18next";
5
- import { Link, useSearchParams } from "react-router";
6
- import { toast } from "sonner";
7
-
8
- type Inputs = {
9
- password: string;
10
- confirmPassword: string;
11
- };
12
-
13
- export function ResetPasswordForm() {
14
- const { t } = useTranslation();
15
- const {
16
- register,
17
- handleSubmit,
18
- setError,
19
- formState: { errors },
20
- } = useForm<Inputs>();
21
- const [searchParams] = useSearchParams();
22
- const token = searchParams.get("token");
23
-
24
- const onSubmit: SubmitHandler<Inputs> = (data) => {
25
- if (data.password !== data.confirmPassword) {
26
- setError("confirmPassword", { message: t("web-ui:auth.resetPassword.passwordMismatch") });
27
- return;
28
- }
29
-
30
- if (!token) {
31
- throw new Error(t("web-ui:auth.resetPassword.tokenRequired"));
32
- }
33
-
34
- authClient
35
- .resetPassword({
36
- newPassword: data.password,
37
- token,
38
- })
39
- .then(() => {
40
- toast.success(t("web-ui:auth.resetPassword.success"));
41
- // Optionally, redirect
42
- })
43
- .catch(() => {
44
- toast.error(t("web-ui:auth.resetPassword.error"));
45
- });
46
- };
47
-
48
- return (
49
- <div className="flex flex-col gap-6">
50
- <Card>
51
- <CardHeader className="text-center flex flex-col gap-1">
52
- <h2 className="text-xl font-semibold">{t("web-ui:auth.resetPassword.title")}</h2>
53
- <p className="text-sm text-default-600">{t("web-ui:auth.resetPassword.description")}</p>
54
- </CardHeader>
55
- <CardBody className="gap-6">
56
- <form onSubmit={handleSubmit(onSubmit)} className="grid gap-6">
57
- <div className="grid gap-2">
58
- <Input
59
- labelPlacement="outside"
60
- label={t("web-ui:auth.resetPassword.newPassword")}
61
- placeholder={t("web-ui:auth.resetPassword.newPassword")}
62
- type="password"
63
- variant="bordered"
64
- isRequired
65
- {...register("password", {
66
- required: t("web-ui:auth.resetPassword.passwordRequired"),
67
- })}
68
- />
69
- {errors.password && (
70
- <span className="text-red-500 text-xs">{errors.password.message}</span>
71
- )}
72
- </div>
73
- <div className="grid gap-2">
74
- <Input
75
- labelPlacement="outside"
76
- label={t("web-ui:auth.resetPassword.confirmPassword")}
77
- placeholder={t("web-ui:auth.resetPassword.confirmPassword")}
78
- type="password"
79
- variant="bordered"
80
- isRequired
81
- {...register("confirmPassword", {
82
- required: t("web-ui:auth.resetPassword.confirmPasswordRequired"),
83
- })}
84
- />
85
- {errors.confirmPassword && (
86
- <span className="text-red-500 text-xs">{errors.confirmPassword.message}</span>
87
- )}
88
- </div>
89
- <Button type="submit" className="w-full" color="primary">
90
- {t("web-ui:auth.resetPassword.button")}
91
- </Button>
92
- </form>
93
- </CardBody>
94
- </Card>
95
- <div className="text-center text-xs text-muted-foreground">
96
- {t("web-ui:auth.forgotPassword.rememberPassword")}{" "}
97
- <Link to="/login" className="underline underline-offset-4 hover:text-primary">
98
- {t("web-ui:auth.login.button")}
99
- </Link>
100
- </div>
101
- </div>
102
- );
103
- }
@@ -1,27 +0,0 @@
1
- import { Card, CardBody, CardHeader } from "@heroui/react";
2
- import { useTranslation } from "react-i18next";
3
- import { Link } from "react-router";
4
- import { ResetPasswordForm } from "#modules/auth/components/ResetPasswordForm";
5
-
6
- export function ResetPasswordRoute() {
7
- const { t } = useTranslation();
8
- return (
9
- <div className="flex flex-col gap-6">
10
- <Card>
11
- <CardHeader className="text-center flex flex-col gap-1">
12
- <h2 className="text-xl font-semibold">{t("web-ui:auth.resetPassword.title")}</h2>
13
- <p className="text-sm text-default-600">{t("web-ui:auth.resetPassword.description")}</p>
14
- </CardHeader>
15
- <CardBody>
16
- <ResetPasswordForm />
17
- </CardBody>
18
- </Card>
19
- <div className="text-center text-xs text-muted-foreground">
20
- {t("web-ui:auth.forgotPassword.rememberPassword")}{" "}
21
- <Link to="/login" className="underline underline-offset-4 hover:text-primary">
22
- {t("web-ui:auth.login.button")}
23
- </Link>
24
- </div>
25
- </div>
26
- );
27
- }
@@ -1,189 +0,0 @@
1
- import { Alert, Button, Input } from "@heroui/react";
2
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
3
- import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
4
- import { useState } from "react";
5
- import { type SubmitHandler, useForm } from "react-hook-form";
6
- import { useTranslation } from "react-i18next";
7
- import { useNavigate } from "react-router";
8
- import { toast } from "sonner";
9
-
10
- type Inputs = {
11
- email: string;
12
- password: string;
13
- };
14
-
15
- function getEmailProviderUrl(email: string): string | null {
16
- const domain = email.split("@")[1]?.toLowerCase();
17
- if (!domain) return null;
18
-
19
- const EMAIL_URLS = {
20
- GMAIL: "https://mail.google.com/mail/u/0/#inbox",
21
- OUTLOOK: "https://outlook.live.com/mail/0/inbox",
22
- YAHOO: "https://mail.yahoo.com",
23
- ICLOUD: "https://www.icloud.com/mail",
24
- PROTON: "https://mail.proton.me",
25
- } as const;
26
-
27
- const domainMap: Record<string, string> = {
28
- "gmail.com": EMAIL_URLS.GMAIL,
29
- "googlemail.com": EMAIL_URLS.GMAIL,
30
- "outlook.com": EMAIL_URLS.OUTLOOK,
31
- "hotmail.com": EMAIL_URLS.OUTLOOK,
32
- "live.com": EMAIL_URLS.OUTLOOK,
33
- "msn.com": EMAIL_URLS.OUTLOOK,
34
- "yahoo.com": EMAIL_URLS.YAHOO,
35
- "yahoo.co.uk": EMAIL_URLS.YAHOO,
36
- "yahoo.fr": EMAIL_URLS.YAHOO,
37
- "ymail.com": EMAIL_URLS.YAHOO,
38
- "icloud.com": EMAIL_URLS.ICLOUD,
39
- "me.com": EMAIL_URLS.ICLOUD,
40
- "mac.com": EMAIL_URLS.ICLOUD,
41
- "protonmail.com": EMAIL_URLS.PROTON,
42
- "proton.me": EMAIL_URLS.PROTON,
43
- };
44
-
45
- return domainMap[domain] || null;
46
- }
47
-
48
- export function SignupForm({
49
- code,
50
- email,
51
- waitlist,
52
- }: {
53
- code?: string | null;
54
- email?: string | null;
55
- waitlist?: boolean;
56
- }) {
57
- const { t } = useTranslation();
58
- const [status, setStatus] = useState("start");
59
- const [userEmail, setUserEmail] = useState<string>(email || "");
60
- const { registerSession } = useSession();
61
- const navigate = useNavigate();
62
- const {
63
- register,
64
- handleSubmit,
65
- formState: { errors },
66
- } = useForm<Inputs>();
67
-
68
- const onSubmit: SubmitHandler<Inputs> = (data) => {
69
- console.log(data);
70
- setStatus("busy");
71
- setUserEmail(data.email);
72
-
73
- authClient.signUp
74
- .email(
75
- {
76
- name: data.email,
77
- email: data.email,
78
- password: data.password,
79
- },
80
- {
81
- headers: {
82
- "Waitlist-Invitation-Code": code || "",
83
- },
84
- }
85
- )
86
- .then((result) => {
87
- console.log(result);
88
- if (result.error) {
89
- toast.error(t("web-ui:auth.errors.invitationCodeInvalid"));
90
- setStatus("start");
91
- return;
92
- }
93
- if (waitlist) {
94
- authClient.signIn
95
- .email({
96
- email: data.email,
97
- password: data.password,
98
- })
99
- .then((res) => {
100
- console.log(res);
101
- if (res.data?.user) {
102
- registerSession(() => {
103
- navigate("/");
104
- });
105
- } else if (res.error) {
106
- toast.error(t("web-ui:auth.errors.authentication"), {
107
- description: res.error.message,
108
- });
109
- }
110
- })
111
- .catch((error) => {
112
- toast.error(t("web-ui:auth.errors.server"), {
113
- description: error.message,
114
- });
115
- });
116
- } else setStatus("done");
117
- })
118
- .catch((error) => {
119
- toast.error(error.message);
120
- setStatus("start");
121
- });
122
- };
123
-
124
- if (status === "done") {
125
- const emailProviderUrl = userEmail ? getEmailProviderUrl(userEmail) : null;
126
-
127
- return (
128
- <Alert
129
- color="primary"
130
- variant="faded"
131
- title={t("web-ui:auth.signup.verificationEmailSent.title")}
132
- >
133
- <div className="mt-2">
134
- {t("web-ui:auth.signup.verificationEmailSent.description")}
135
- {emailProviderUrl && (
136
- <div className="mt-3">
137
- <a
138
- href={emailProviderUrl}
139
- target="_blank"
140
- rel="noopener noreferrer"
141
- className="font-medium underline underline-offset-4 hover:opacity-80 transition-opacity"
142
- >
143
- {t("web-ui:auth.signup.verificationEmailSent.openEmail")}
144
- </a>
145
- </div>
146
- )}
147
- </div>
148
- </Alert>
149
- );
150
- }
151
-
152
- return (
153
- <form onSubmit={handleSubmit(onSubmit)} className="grid gap-6">
154
- <div className="grid gap-2">
155
- <Input
156
- labelPlacement="outside"
157
- label={t("web-ui:auth.login.email")}
158
- type="email"
159
- placeholder={t("web-ui:auth.login.placeholder.email")}
160
- variant="bordered"
161
- isRequired
162
- isDisabled={!!email}
163
- defaultValue={email ?? ""}
164
- {...register("email", { required: true })}
165
- />
166
- {errors.email && (
167
- <span className="text-red-500 text-xs">{t("web-ui:auth.signup.emailRequired")}</span>
168
- )}
169
- </div>
170
- <div className="grid gap-2">
171
- <Input
172
- labelPlacement="outside"
173
- label={t("web-ui:auth.login.password")}
174
- placeholder={t("web-ui:auth.login.password")}
175
- type="password"
176
- variant="bordered"
177
- isRequired
178
- {...register("password", { required: true })}
179
- />
180
- {errors.password && (
181
- <span className="text-red-500 text-xs">{t("web-ui:auth.signup.passwordRequired")}</span>
182
- )}
183
- </div>
184
- <Button type="submit" className="w-full" color="primary" isDisabled={status === "busy"}>
185
- {status === "busy" ? t("web-ui:auth.signup.signingUp") : t("web-ui:auth.signup.button")}
186
- </Button>
187
- </form>
188
- );
189
- }