@m5kdev/web-ui 0.1.3 → 0.1.5

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 (375) hide show
  1. package/dist/src/animations/card.motion.d.ts +2 -0
  2. package/dist/src/animations/card.motion.js +7 -0
  3. package/dist/src/components/AvatarUpload.d.ts +7 -0
  4. package/dist/src/components/AvatarUpload.js +67 -0
  5. package/dist/src/components/Button.d.ts +5 -0
  6. package/dist/src/components/Button.js +5 -0
  7. package/dist/src/components/Calendar.d.ts +35 -0
  8. package/dist/src/components/Calendar.js +10 -0
  9. package/dist/src/components/CardsSelect.d.ts +23 -0
  10. package/dist/src/components/CardsSelect.js +46 -0
  11. package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +9 -0
  12. package/dist/src/components/CollapsibleSidebarMenuItem.js +11 -0
  13. package/dist/src/components/ColorPicker.d.ts +4 -0
  14. package/dist/src/components/ColorPicker.js +21 -0
  15. package/dist/src/components/CopyButton.d.ts +6 -0
  16. package/dist/src/components/CopyButton.js +24 -0
  17. package/dist/src/components/CropDialog.d.ts +10 -0
  18. package/dist/src/components/CropDialog.js +67 -0
  19. package/dist/src/components/DialogProvider.d.ts +15 -0
  20. package/dist/src/components/DialogProvider.js +50 -0
  21. package/dist/src/components/ErrorFallback.d.ts +4 -0
  22. package/dist/src/components/ErrorFallback.js +5 -0
  23. package/dist/src/components/FileDropzone.d.ts +6 -0
  24. package/dist/src/components/FileDropzone.js +63 -0
  25. package/dist/src/components/MultiSelectDropdown.d.ts +26 -0
  26. package/dist/src/components/MultiSelectDropdown.js +53 -0
  27. package/dist/src/components/Orb.d.ts +6 -0
  28. package/{src/components/Orb.tsx → dist/src/components/Orb.js} +107 -136
  29. package/dist/src/components/PageAlert.d.ts +18 -0
  30. package/dist/src/components/PageAlert.js +48 -0
  31. package/dist/src/components/SelectChips.d.ts +10 -0
  32. package/dist/src/components/SelectChips.js +11 -0
  33. package/dist/src/components/SidebarItem.d.ts +7 -0
  34. package/dist/src/components/SidebarItem.js +6 -0
  35. package/dist/src/components/Steps.d.ts +19 -0
  36. package/dist/src/components/Steps.js +34 -0
  37. package/dist/src/components/TablerIconPicker.d.ts +2 -0
  38. package/dist/src/components/TablerIconPicker.js +4238 -0
  39. package/dist/src/components/app-header.d.ts +6 -0
  40. package/dist/src/components/app-header.js +8 -0
  41. package/dist/src/components/blur-card.d.ts +13 -0
  42. package/dist/src/components/blur-card.js +34 -0
  43. package/dist/src/components/features-section-demo-1.d.ts +6 -0
  44. package/dist/src/components/features-section-demo-1.js +53 -0
  45. package/dist/src/components/features-section-demo-2.d.ts +1 -0
  46. package/dist/src/components/features-section-demo-2.js +51 -0
  47. package/dist/src/components/features-section-demo-3.d.ts +8 -0
  48. package/dist/src/components/features-section-demo-3.js +116 -0
  49. package/dist/src/components/mode-toggle.d.ts +1 -0
  50. package/dist/src/components/mode-toggle.js +9 -0
  51. package/dist/src/components/nav-main.d.ts +13 -0
  52. package/dist/src/components/nav-main.js +9 -0
  53. package/dist/src/components/pricing-cards.d.ts +1 -0
  54. package/dist/src/components/pricing-cards.js +27 -0
  55. package/dist/src/components/shared/ButtonCopy.d.ts +6 -0
  56. package/dist/src/components/shared/ButtonCopy.js +24 -0
  57. package/dist/src/components/team-switcher.d.ts +8 -0
  58. package/dist/src/components/team-switcher.js +10 -0
  59. package/dist/src/components/theme-provider.d.ts +13 -0
  60. package/dist/src/components/theme-provider.js +41 -0
  61. package/dist/src/components/typewriter.d.ts +18 -0
  62. package/dist/src/components/typewriter.js +38 -0
  63. package/dist/src/components/ui/alert-dialog.d.ts +14 -0
  64. package/dist/src/components/ui/alert-dialog.js +38 -0
  65. package/dist/src/components/ui/alert.d.ts +9 -0
  66. package/dist/src/components/ui/alert.js +24 -0
  67. package/dist/src/components/ui/avatar.d.ts +6 -0
  68. package/dist/src/components/ui/avatar.js +12 -0
  69. package/dist/src/components/ui/badge.d.ts +9 -0
  70. package/dist/src/components/ui/badge.js +20 -0
  71. package/dist/src/components/ui/bento-grid.d.ts +11 -0
  72. package/dist/src/components/ui/bento-grid.js +8 -0
  73. package/dist/src/components/ui/bento-grid2.d.ts +15 -0
  74. package/dist/src/components/ui/bento-grid2.js +13 -0
  75. package/dist/src/components/ui/breadcrumb.d.ts +19 -0
  76. package/dist/src/components/ui/breadcrumb.js +23 -0
  77. package/dist/src/components/ui/button.d.ts +11 -0
  78. package/dist/src/components/ui/button.js +33 -0
  79. package/dist/src/components/ui/card.d.ts +8 -0
  80. package/dist/src/components/ui/card.js +16 -0
  81. package/dist/src/components/ui/checkbox.d.ts +4 -0
  82. package/dist/src/components/ui/checkbox.js +8 -0
  83. package/dist/src/components/ui/collapsible.d.ts +5 -0
  84. package/{src/components/ui/collapsible.tsx → dist/src/components/ui/collapsible.js} +5 -9
  85. package/dist/src/components/ui/dialog.d.ts +13 -0
  86. package/dist/src/components/ui/dialog.js +35 -0
  87. package/dist/src/components/ui/dropdown-menu.d.ts +27 -0
  88. package/dist/src/components/ui/dropdown-menu.js +32 -0
  89. package/dist/src/components/ui/floating-navbar.d.ts +9 -0
  90. package/dist/src/components/ui/floating-navbar.js +38 -0
  91. package/dist/src/components/ui/form.d.ts +23 -0
  92. package/dist/src/components/ui/form.js +60 -0
  93. package/dist/src/components/ui/image.d.ts +6 -0
  94. package/dist/src/components/ui/image.js +15 -0
  95. package/dist/src/components/ui/input.d.ts +3 -0
  96. package/dist/src/components/ui/input.js +8 -0
  97. package/dist/src/components/ui/label.d.ts +5 -0
  98. package/dist/src/components/ui/label.js +9 -0
  99. package/dist/src/components/ui/pagination.d.ts +13 -0
  100. package/dist/src/components/ui/pagination.js +29 -0
  101. package/dist/src/components/ui/progress.d.ts +4 -0
  102. package/dist/src/components/ui/progress.js +7 -0
  103. package/dist/src/components/ui/resizable-navbar.d.ts +56 -0
  104. package/dist/src/components/ui/resizable-navbar.js +86 -0
  105. package/dist/src/components/ui/segment-control.d.ts +9 -0
  106. package/dist/src/components/ui/segment-control.js +42 -0
  107. package/dist/src/components/ui/select.d.ts +13 -0
  108. package/dist/src/components/ui/select.js +26 -0
  109. package/dist/src/components/ui/separator.d.ts +4 -0
  110. package/dist/src/components/ui/separator.js +7 -0
  111. package/dist/src/components/ui/sheet.d.ts +25 -0
  112. package/dist/src/components/ui/sheet.js +37 -0
  113. package/dist/src/components/ui/sidebar.d.ts +66 -0
  114. package/dist/src/components/ui/sidebar.js +222 -0
  115. package/dist/src/components/ui/skeleton.d.ts +2 -0
  116. package/dist/src/components/ui/skeleton.js +6 -0
  117. package/dist/src/components/ui/slider.d.ts +4 -0
  118. package/dist/src/components/ui/slider.js +7 -0
  119. package/dist/src/components/ui/sonner.d.ts +4 -0
  120. package/dist/src/components/ui/sonner.js +15 -0
  121. package/dist/src/components/ui/spinner.d.ts +14 -0
  122. package/dist/src/components/ui/spinner.js +30 -0
  123. package/dist/src/components/ui/switch.d.ts +4 -0
  124. package/dist/src/components/ui/switch.js +7 -0
  125. package/dist/src/components/ui/table.d.ts +10 -0
  126. package/dist/src/components/ui/table.js +27 -0
  127. package/dist/src/components/ui/tabs.d.ts +7 -0
  128. package/dist/src/components/ui/tabs.js +16 -0
  129. package/dist/src/components/ui/textarea.d.ts +3 -0
  130. package/dist/src/components/ui/textarea.js +6 -0
  131. package/dist/src/components/ui/timeline.d.ts +11 -0
  132. package/dist/src/components/ui/timeline.js +27 -0
  133. package/dist/src/components/ui/toast.d.ts +15 -0
  134. package/dist/src/components/ui/toast.js +33 -0
  135. package/dist/src/components/ui/tooltip.d.ts +7 -0
  136. package/dist/src/components/ui/tooltip.js +16 -0
  137. package/dist/src/components/ui/typewriter-effect.d.ts +16 -0
  138. package/dist/src/components/ui/typewriter-effect.js +76 -0
  139. package/dist/src/hooks/use-mobile.d.ts +1 -0
  140. package/dist/src/hooks/use-mobile.js +15 -0
  141. package/dist/src/hooks/useDialog.d.ts +4 -0
  142. package/dist/src/hooks/useDialog.js +22 -0
  143. package/dist/src/icons/GoogleIcon.d.ts +5 -0
  144. package/dist/src/icons/GoogleIcon.js +4 -0
  145. package/dist/src/icons/LinkedInIcon.d.ts +5 -0
  146. package/dist/src/icons/LinkedInIcon.js +4 -0
  147. package/dist/src/icons/MicrosoftIcon.d.ts +5 -0
  148. package/dist/src/icons/MicrosoftIcon.js +4 -0
  149. package/dist/src/lib/chatwoot.d.ts +11 -0
  150. package/dist/src/lib/chatwoot.js +28 -0
  151. package/dist/src/lib/utils.d.ts +2 -0
  152. package/dist/src/lib/utils.js +5 -0
  153. package/dist/src/modules/app/components/AppLoader.d.ts +2 -0
  154. package/dist/src/modules/app/components/AppLoader.js +5 -0
  155. package/dist/src/modules/app/components/AppShell.d.ts +7 -0
  156. package/dist/src/modules/app/components/AppShell.js +7 -0
  157. package/dist/src/modules/app/components/AppSidebar.d.ts +7 -0
  158. package/dist/src/modules/app/components/AppSidebar.js +5 -0
  159. package/dist/src/modules/app/components/AppSidebarContent.d.ts +16 -0
  160. package/dist/src/modules/app/components/AppSidebarContent.js +7 -0
  161. package/dist/src/modules/app/components/AppSidebarHeader.d.ts +8 -0
  162. package/dist/src/modules/app/components/AppSidebarHeader.js +10 -0
  163. package/dist/src/modules/app/components/AppSidebarInvites.d.ts +3 -0
  164. package/dist/src/modules/app/components/AppSidebarInvites.js +12 -0
  165. package/dist/src/modules/app/components/AppSidebarUser.d.ts +11 -0
  166. package/dist/src/modules/app/components/AppSidebarUser.js +16 -0
  167. package/dist/src/modules/auth/components/AdminUserManagement.d.ts +6 -0
  168. package/dist/src/modules/auth/components/AdminUserManagement.js +422 -0
  169. package/dist/src/modules/auth/components/AdminWaitlist.d.ts +6 -0
  170. package/dist/src/modules/auth/components/AdminWaitlist.js +118 -0
  171. package/dist/src/modules/auth/components/AuthLayout.d.ts +4 -0
  172. package/dist/src/modules/auth/components/AuthLayout.js +5 -0
  173. package/dist/src/modules/auth/components/AuthProviders.d.ts +6 -0
  174. package/dist/src/modules/auth/components/AuthProviders.js +45 -0
  175. package/dist/src/modules/auth/components/AuthRouter.d.ts +9 -0
  176. package/dist/src/modules/auth/components/AuthRouter.js +12 -0
  177. package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +4 -0
  178. package/dist/src/modules/auth/components/ClaimAccountRoute.js +143 -0
  179. package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +1 -0
  180. package/dist/src/modules/auth/components/ErrorAuthRoute.js +93 -0
  181. package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +1 -0
  182. package/dist/src/modules/auth/components/ForgotPasswordForm.js +27 -0
  183. package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +1 -0
  184. package/dist/src/modules/auth/components/ForgotPasswordRoute.js +9 -0
  185. package/dist/src/modules/auth/components/InviteFriends.d.ts +5 -0
  186. package/dist/src/modules/auth/components/InviteFriends.js +74 -0
  187. package/dist/src/modules/auth/components/LastUsedBadge.d.ts +5 -0
  188. package/dist/src/modules/auth/components/LastUsedBadge.js +9 -0
  189. package/dist/src/modules/auth/components/LoginForm.d.ts +3 -0
  190. package/dist/src/modules/auth/components/LoginForm.js +44 -0
  191. package/dist/src/modules/auth/components/LoginRoute.d.ts +3 -0
  192. package/dist/src/modules/auth/components/LoginRoute.js +11 -0
  193. package/dist/src/modules/auth/components/LogoutRoute.d.ts +1 -0
  194. package/dist/src/modules/auth/components/LogoutRoute.js +15 -0
  195. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +9 -0
  196. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +102 -0
  197. package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +51 -0
  198. package/dist/src/modules/auth/components/OrganizationMembersRoute.js +359 -0
  199. package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +20 -0
  200. package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +153 -0
  201. package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +7 -0
  202. package/dist/src/modules/auth/components/OrganizationSwitcher.js +74 -0
  203. package/dist/src/modules/auth/components/ProfileRoute.d.ts +1 -0
  204. package/dist/src/modules/auth/components/ProfileRoute.js +42 -0
  205. package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +31 -0
  206. package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +236 -0
  207. package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +1 -0
  208. package/dist/src/modules/auth/components/ResetPasswordForm.js +39 -0
  209. package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +1 -0
  210. package/dist/src/modules/auth/components/ResetPasswordRoute.js +9 -0
  211. package/dist/src/modules/auth/components/SignupFormRoute.d.ts +5 -0
  212. package/dist/src/modules/auth/components/SignupFormRoute.js +106 -0
  213. package/dist/src/modules/auth/components/SignupRoute.d.ts +7 -0
  214. package/dist/src/modules/auth/components/SignupRoute.js +16 -0
  215. package/dist/src/modules/auth/components/UserPreferences.d.ts +30 -0
  216. package/dist/src/modules/auth/components/UserPreferences.js +60 -0
  217. package/dist/src/modules/auth/components/WaitlistCard.d.ts +6 -0
  218. package/dist/src/modules/auth/components/WaitlistCard.js +32 -0
  219. package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +7 -0
  220. package/dist/src/modules/auth/components/WaitlistCodeValidation.js +43 -0
  221. package/dist/src/modules/billing/components/BillingBetaPage.d.ts +8 -0
  222. package/dist/src/modules/billing/components/BillingBetaPage.js +11 -0
  223. package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +7 -0
  224. package/dist/src/modules/billing/components/BillingInvoicePage.js +32 -0
  225. package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +6 -0
  226. package/dist/src/modules/billing/components/BillingPlanSelect.js +8 -0
  227. package/dist/src/modules/billing/components/BillingRouter.d.ts +9 -0
  228. package/dist/src/modules/billing/components/BillingRouter.js +8 -0
  229. package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +8 -0
  230. package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +46 -0
  231. package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +10 -0
  232. package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +42 -0
  233. package/dist/src/modules/table/components/NuqsTable.d.ts +23 -0
  234. package/dist/src/modules/table/components/NuqsTable.js +198 -0
  235. package/dist/src/modules/table/components/TableFiltering.d.ts +23 -0
  236. package/dist/src/modules/table/components/TableFiltering.js +236 -0
  237. package/dist/src/modules/table/components/TablePagination.d.ts +9 -0
  238. package/dist/src/modules/table/components/TablePagination.js +21 -0
  239. package/{src/modules/table/components/table.types.ts → dist/src/modules/table/components/table.types.d.ts} +12 -11
  240. package/dist/src/modules/table/components/table.types.js +1 -0
  241. package/dist/src/modules/table/filterTransformers.d.ts +53 -0
  242. package/dist/src/modules/table/filterTransformers.js +276 -0
  243. package/{src/types.ts → dist/src/types.d.ts} +3 -4
  244. package/dist/src/types.js +1 -0
  245. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  246. package/package.json +8 -5
  247. package/.cursor/rules/web-ui.mdc +0 -126
  248. package/.turbo/turbo-build.log +0 -5
  249. package/.turbo/turbo-check-types.log +0 -5
  250. package/.turbo/turbo-lint$colon$fix.log +0 -381
  251. package/.turbo/turbo-lint.log +0 -361
  252. package/CHANGELOG.md +0 -19
  253. package/components.json +0 -21
  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/PageAlert.tsx +0 -121
  269. package/src/components/SelectChips.tsx +0 -40
  270. package/src/components/SidebarItem.tsx +0 -26
  271. package/src/components/Steps.tsx +0 -340
  272. package/src/components/TablerIconPicker.tsx +0 -4260
  273. package/src/components/app-header.tsx +0 -40
  274. package/src/components/blur-card.tsx +0 -132
  275. package/src/components/features-section-demo-1.tsx +0 -127
  276. package/src/components/features-section-demo-2.tsx +0 -102
  277. package/src/components/features-section-demo-3.tsx +0 -272
  278. package/src/components/mode-toggle.tsx +0 -31
  279. package/src/components/nav-main.tsx +0 -69
  280. package/src/components/pricing-cards.tsx +0 -133
  281. package/src/components/shared/ButtonCopy.tsx +0 -50
  282. package/src/components/team-switcher.tsx +0 -83
  283. package/src/components/theme-provider.tsx +0 -74
  284. package/src/components/typewriter.tsx +0 -90
  285. package/src/components/ui/alert-dialog.tsx +0 -133
  286. package/src/components/ui/alert.tsx +0 -60
  287. package/src/components/ui/avatar.tsx +0 -47
  288. package/src/components/ui/badge.tsx +0 -33
  289. package/src/components/ui/bento-grid.tsx +0 -54
  290. package/src/components/ui/bento-grid2.tsx +0 -66
  291. package/src/components/ui/breadcrumb.tsx +0 -101
  292. package/src/components/ui/button.tsx +0 -50
  293. package/src/components/ui/card.tsx +0 -55
  294. package/src/components/ui/checkbox.tsx +0 -26
  295. package/src/components/ui/dialog.tsx +0 -119
  296. package/src/components/ui/dropdown-menu.tsx +0 -186
  297. package/src/components/ui/floating-navbar.tsx +0 -78
  298. package/src/components/ui/form.tsx +0 -167
  299. package/src/components/ui/image.tsx +0 -55
  300. package/src/components/ui/input.tsx +0 -22
  301. package/src/components/ui/label.tsx +0 -19
  302. package/src/components/ui/pagination.tsx +0 -105
  303. package/src/components/ui/progress.tsx +0 -23
  304. package/src/components/ui/resizable-navbar.tsx +0 -260
  305. package/src/components/ui/segment-control.tsx +0 -143
  306. package/src/components/ui/select.tsx +0 -153
  307. package/src/components/ui/separator.tsx +0 -24
  308. package/src/components/ui/sheet.tsx +0 -121
  309. package/src/components/ui/sidebar.tsx +0 -736
  310. package/src/components/ui/skeleton.tsx +0 -7
  311. package/src/components/ui/slider.tsx +0 -23
  312. package/src/components/ui/sonner.tsx +0 -27
  313. package/src/components/ui/spinner.tsx +0 -45
  314. package/src/components/ui/switch.tsx +0 -27
  315. package/src/components/ui/table.tsx +0 -90
  316. package/src/components/ui/tabs.tsx +0 -52
  317. package/src/components/ui/textarea.tsx +0 -18
  318. package/src/components/ui/timeline.tsx +0 -95
  319. package/src/components/ui/toast.tsx +0 -126
  320. package/src/components/ui/tooltip.tsx +0 -55
  321. package/src/components/ui/typewriter-effect.tsx +0 -181
  322. package/src/hooks/use-mobile.ts +0 -19
  323. package/src/hooks/useDialog.ts +0 -25
  324. package/src/icons/GoogleIcon.tsx +0 -32
  325. package/src/icons/LinkedInIcon.tsx +0 -30
  326. package/src/icons/MicrosoftIcon.tsx +0 -21
  327. package/src/lib/chatwoot.ts +0 -51
  328. package/src/lib/utils.ts +0 -6
  329. package/src/modules/app/components/AppLoader.tsx +0 -9
  330. package/src/modules/app/components/AppShell.tsx +0 -21
  331. package/src/modules/app/components/AppSidebar.tsx +0 -26
  332. package/src/modules/app/components/AppSidebarContent.tsx +0 -73
  333. package/src/modules/app/components/AppSidebarHeader.tsx +0 -57
  334. package/src/modules/app/components/AppSidebarInvites.tsx +0 -32
  335. package/src/modules/app/components/AppSidebarUser.tsx +0 -128
  336. package/src/modules/auth/components/AdminUserManagement.tsx +0 -1136
  337. package/src/modules/auth/components/AdminWaitlist.tsx +0 -358
  338. package/src/modules/auth/components/AuthLayout.tsx +0 -13
  339. package/src/modules/auth/components/AuthProviders.tsx +0 -105
  340. package/src/modules/auth/components/AuthRouter.tsx +0 -29
  341. package/src/modules/auth/components/ClaimAccountRoute.tsx +0 -242
  342. package/src/modules/auth/components/ErrorAuthRoute.tsx +0 -121
  343. package/src/modules/auth/components/ForgotPasswordForm.tsx +0 -58
  344. package/src/modules/auth/components/ForgotPasswordRoute.tsx +0 -27
  345. package/src/modules/auth/components/InviteFriends.tsx +0 -273
  346. package/src/modules/auth/components/LastUsedBadge.tsx +0 -22
  347. package/src/modules/auth/components/LoginForm.tsx +0 -104
  348. package/src/modules/auth/components/LoginRoute.tsx +0 -31
  349. package/src/modules/auth/components/LogoutRoute.tsx +0 -21
  350. package/src/modules/auth/components/OrganizationAcceptInvitationRoute.tsx +0 -161
  351. package/src/modules/auth/components/OrganizationMembersRoute.tsx +0 -730
  352. package/src/modules/auth/components/OrganizationSettingsRoute.tsx +0 -280
  353. package/src/modules/auth/components/OrganizationSwitcher.tsx +0 -148
  354. package/src/modules/auth/components/ProfileRoute.tsx +0 -104
  355. package/src/modules/auth/components/RangeNuqsDatePicker.tsx +0 -365
  356. package/src/modules/auth/components/ResetPasswordForm.tsx +0 -103
  357. package/src/modules/auth/components/ResetPasswordRoute.tsx +0 -27
  358. package/src/modules/auth/components/SignupFormRoute.tsx +0 -189
  359. package/src/modules/auth/components/SignupRoute.tsx +0 -53
  360. package/src/modules/auth/components/UserPreferences.tsx +0 -144
  361. package/src/modules/auth/components/WaitlistCard.tsx +0 -78
  362. package/src/modules/auth/components/WaitlistCodeValidation.tsx +0 -79
  363. package/src/modules/billing/components/BillingBetaPage.tsx +0 -124
  364. package/src/modules/billing/components/BillingInvoicePage.tsx +0 -180
  365. package/src/modules/billing/components/BillingPlanSelect.tsx +0 -14
  366. package/src/modules/billing/components/BillingRouter.tsx +0 -20
  367. package/src/modules/billing/components/BillingSinglePlanSelect.tsx +0 -172
  368. package/src/modules/table/components/ColumnOrderAndVisibility.tsx +0 -127
  369. package/src/modules/table/components/NuqsTable.tsx +0 -396
  370. package/src/modules/table/components/TableFiltering.tsx +0 -520
  371. package/src/modules/table/components/TablePagination.tsx +0 -59
  372. package/src/modules/table/filterTransformers.ts +0 -323
  373. package/src/vite-env.d.ts +0 -1
  374. package/translations/en/web-ui.json +0 -192
  375. package/tsconfig.json +0 -30
@@ -1,520 +0,0 @@
1
- import {
2
- DatePicker,
3
- DateRangePicker,
4
- type DateValue,
5
- Input,
6
- Select,
7
- SelectItem,
8
- type SharedSelection,
9
- } from "@heroui/react";
10
- import { getLocalTimeZone, today } from "@internationalized/date";
11
- import type { QueryFilters } from "@m5kdev/commons/modules/schemas/query.schema";
12
- import type {
13
- ColumnDataType,
14
- ComponentForFilterMethod,
15
- FilterMethod,
16
- FilterMethods,
17
- } from "@m5kdev/commons/modules/table/filter.types";
18
- import { PlusIcon, XIcon } from "lucide-react";
19
- import type { ReactNode } from "react";
20
- import { useCallback, useEffect, useMemo, useState } from "react";
21
- import { Button } from "#components/ui/button";
22
- import {
23
- type FilterValue,
24
- type HeroUIFilter,
25
- transformFiltersFromHeroUI,
26
- transformFiltersToHeroUI,
27
- } from "../filterTransformers";
28
-
29
- type ComponentRenderer = (
30
- value: FilterValue,
31
- onChange: (value: FilterValue) => void,
32
- options?: { label: string; value: string }[]
33
- ) => ReactNode;
34
-
35
- const componentForFilterMethod: Record<ComponentForFilterMethod, ComponentRenderer> = {
36
- text: (value, onChange) => (
37
- <Input
38
- size="sm"
39
- aria-label="Select Value"
40
- className="flex-1 min-w-0 text-sm"
41
- value={(value as string) ?? ""}
42
- onChange={(e) => onChange(e.target.value)}
43
- />
44
- ),
45
- number: (value, onChange) => (
46
- <Input
47
- size="sm"
48
- aria-label="Select Value"
49
- type="number"
50
- className="flex-1 min-w-0 text-sm"
51
- value={(value as number | null)?.toString() ?? ""}
52
- onChange={(e) => onChange(Number.parseFloat(e.target.value) || 0)}
53
- />
54
- ),
55
- date: (value, onChange) => (
56
- <DatePicker
57
- size="sm"
58
- aria-label="Select Value"
59
- className="flex-1 min-w-0 text-sm"
60
- value={(value as any) ?? undefined}
61
- onChange={(date) => date && onChange(date as FilterValue)}
62
- maxValue={today(getLocalTimeZone()) as unknown as DateValue}
63
- />
64
- ),
65
- range: (value, onChange) => (
66
- <DateRangePicker
67
- size="sm"
68
- aria-label="Select Value"
69
- className="flex-1 min-w-0 text-sm"
70
- value={(value as any) ?? undefined}
71
- onChange={(range) => range && onChange(range as FilterValue)}
72
- maxValue={today(getLocalTimeZone()) as unknown as DateValue}
73
- />
74
- ),
75
- radio: (value, onChange) => (
76
- <Select
77
- size="sm"
78
- aria-label="Select Value"
79
- className="flex-1 min-w-0 text-sm"
80
- selectedKeys={(value as boolean | null) ? ["true"] : ["false"]}
81
- onSelectionChange={(keys) => onChange(keys.currentKey === "true")}
82
- >
83
- <SelectItem key="true" className="text-sm">
84
- True
85
- </SelectItem>
86
- <SelectItem key="false" className="text-sm">
87
- False
88
- </SelectItem>
89
- </Select>
90
- ),
91
- select: (value, onChange, options = []) => (
92
- <Select
93
- size="sm"
94
- aria-label="Select Value"
95
- className="flex-1 min-w-0 text-sm"
96
- selectedKeys={(value as SharedSelection) ?? new Set()}
97
- onSelectionChange={(keys) => keys && onChange(keys as FilterValue)}
98
- >
99
- {options.map((option) => (
100
- <SelectItem key={option.value} className="text-sm">
101
- {option.label}
102
- </SelectItem>
103
- ))}
104
- </Select>
105
- ),
106
- multiSelect: (value, onChange, options = []) => (
107
- <Select
108
- size="sm"
109
- aria-label="Select Value"
110
- selectionMode="multiple"
111
- className="flex-1 min-w-0 text-sm"
112
- selectedKeys={value ? new Set(value as SharedSelection) : new Set()}
113
- onSelectionChange={(keys) => onChange(keys as FilterValue)}
114
- >
115
- {options.map((option) => (
116
- <SelectItem key={option.value} className="text-sm">
117
- {option.label}
118
- </SelectItem>
119
- ))}
120
- </Select>
121
- ),
122
- };
123
-
124
- const defaultFilterMethods: FilterMethods = {
125
- string: [
126
- { value: "contains", label: "Contains", component: "text" },
127
- { value: "equals", label: "Equals", component: "text" },
128
- { value: "starts_with", label: "Starts With", component: "text" },
129
- { value: "ends_with", label: "Ends With", component: "text" },
130
- ],
131
- number: [
132
- { value: "equals", label: "Equals", component: "number" },
133
- { value: "greater_than", label: "Greater Than", component: "number" },
134
- { value: "less_than", label: "Less Than", component: "number" },
135
- ],
136
- date: [
137
- { value: "on", label: "On", component: "date" },
138
- { value: "between", label: "Between", component: "range" },
139
- { value: "before", label: "Before", component: "date" },
140
- { value: "after", label: "After", component: "date" },
141
- { value: "intersect", label: "During", component: "range" },
142
- ],
143
- boolean: [{ value: "equals", label: "Equals", component: "radio" }],
144
- enum: [
145
- { value: "oneOf", label: "One Of", component: "multiSelect" },
146
- { value: "equals", label: "Equals", component: "select" },
147
- ],
148
- };
149
-
150
- const SINGLE_FILTER_KEY = "single-filter";
151
-
152
- type TableFilteringProps = {
153
- columns: {
154
- id: string;
155
- label: string;
156
- type?: ColumnDataType | null;
157
- options?: { label: string; value: string }[] | null;
158
- endColumnId?: string | null;
159
- periodStartColumnId?: string | null;
160
- periodEndColumnId?: string | null;
161
- }[];
162
- onFiltersChange: (filters: QueryFilters) => void;
163
- filters: QueryFilters;
164
- onClose?: () => void;
165
- singleFilter?: boolean;
166
- filterMethods?: Partial<FilterMethods>;
167
- };
168
-
169
- const mergeFilterMethods = (overrides?: Partial<FilterMethods>): FilterMethods => ({
170
- string:
171
- overrides?.string && overrides.string.length > 0
172
- ? overrides.string
173
- : defaultFilterMethods.string,
174
- number:
175
- overrides?.number && overrides.number.length > 0
176
- ? overrides.number
177
- : defaultFilterMethods.number,
178
- date: overrides?.date && overrides.date.length > 0 ? overrides.date : defaultFilterMethods.date,
179
- boolean:
180
- overrides?.boolean && overrides.boolean.length > 0
181
- ? overrides.boolean
182
- : defaultFilterMethods.boolean,
183
- enum: overrides?.enum && overrides.enum.length > 0 ? overrides.enum : defaultFilterMethods.enum,
184
- });
185
-
186
- export const TableFiltering = ({
187
- columns,
188
- onFiltersChange,
189
- filters: initialFilters = [],
190
- onClose,
191
- singleFilter = false,
192
- filterMethods,
193
- }: TableFilteringProps) => {
194
- const [filters, setFilters] = useState<Record<string, HeroUIFilter>>({});
195
- const effectiveFilterMethods = useMemo(() => mergeFilterMethods(filterMethods), [filterMethods]);
196
-
197
- const createEmptyFilter = useCallback(
198
- (): HeroUIFilter => ({
199
- columnId: "",
200
- type: null,
201
- value: null,
202
- method: null,
203
- options: null,
204
- endColumnId: null,
205
- periodStartColumnId: null,
206
- periodEndColumnId: null,
207
- }),
208
- []
209
- );
210
-
211
- const addFilter = useCallback(() => {
212
- setFilters((prev) => {
213
- if (!singleFilter) {
214
- const filterId = crypto.randomUUID();
215
- return {
216
- ...prev,
217
- [filterId]: createEmptyFilter(),
218
- };
219
- }
220
-
221
- // single filter mode
222
- return Object.keys(prev).length > 0 ? prev : { [SINGLE_FILTER_KEY]: createEmptyFilter() };
223
- });
224
- }, [createEmptyFilter, singleFilter]);
225
-
226
- const removeFilter = useCallback(
227
- (filterId: string) => {
228
- setFilters((prev) => {
229
- if (!singleFilter) {
230
- const { [filterId]: _, ...rest } = prev;
231
- return rest;
232
- }
233
-
234
- // single filter mode resets the lone filter
235
- return { [SINGLE_FILTER_KEY]: createEmptyFilter() };
236
- });
237
- },
238
- [createEmptyFilter, singleFilter]
239
- );
240
-
241
- const columnsMap = useMemo(
242
- () => new Map(columns.map((column) => [column.id, column])),
243
- [columns]
244
- );
245
-
246
- useEffect(() => {
247
- // Transform initialFilters from FiltersToApply format to HeroUIFilter format
248
- const transformedFilters = transformFiltersToHeroUI(
249
- initialFilters,
250
- columnsMap,
251
- effectiveFilterMethods
252
- );
253
-
254
- if (!singleFilter) {
255
- setFilters(Object.fromEntries(transformedFilters.map((filter) => [filter.columnId, filter])));
256
- return;
257
- }
258
-
259
- const firstFilter = transformedFilters[0];
260
- setFilters({
261
- [SINGLE_FILTER_KEY]: firstFilter ?? createEmptyFilter(),
262
- });
263
- }, [createEmptyFilter, initialFilters, singleFilter, columnsMap, effectiveFilterMethods]);
264
-
265
- const selectColumn = useCallback(
266
- (filterId: string, columnId: string) => {
267
- setFilters((prev) => {
268
- const oldFilter = prev[filterId];
269
- if (!oldFilter) return prev;
270
- const column = columnsMap.get(columnId);
271
- if (!column) return prev;
272
-
273
- // If Period column, auto-set intersect method
274
- const isPeriodColumn = columnId.endsWith("__period");
275
- const intersectMethod = isPeriodColumn
276
- ? (effectiveFilterMethods.date.find((m) => m.value === "intersect") ?? null)
277
- : null;
278
-
279
- return {
280
- ...prev,
281
- [filterId]: {
282
- ...oldFilter,
283
- columnId,
284
- type: column.type ?? null,
285
- options: column.options ?? null,
286
- endColumnId: column.endColumnId ?? null,
287
- periodStartColumnId: column.periodStartColumnId ?? null,
288
- periodEndColumnId: column.periodEndColumnId ?? null,
289
- method: intersectMethod,
290
- value: null,
291
- },
292
- };
293
- });
294
- },
295
- [columnsMap, effectiveFilterMethods]
296
- );
297
-
298
- const selectMethod = useCallback((filterId: string, method: FilterMethod) => {
299
- setFilters((prev) => {
300
- const oldFilter = prev[filterId];
301
- if (!oldFilter) return prev;
302
- return {
303
- ...prev,
304
- [filterId]: { ...oldFilter, method, value: null },
305
- };
306
- });
307
- }, []);
308
-
309
- const selectValue = useCallback((filterId: string, value: FilterValue) => {
310
- setFilters((prev) => {
311
- const oldFilter = prev[filterId];
312
- if (!oldFilter) return prev;
313
- return {
314
- ...prev,
315
- [filterId]: { ...oldFilter, value },
316
- };
317
- });
318
- }, []);
319
-
320
- const filterEntries = useMemo(() => Object.entries(filters), [filters]);
321
-
322
- const availableColumnsMap = useMemo(() => {
323
- const map = new Map<string, typeof columns>();
324
- filterEntries.forEach(([filterId]) => {
325
- const columnsUsedByOtherFilters = new Set(
326
- filterEntries
327
- .filter(([id]) => id !== filterId)
328
- .map(([_, f]) => f.columnId)
329
- .filter((id) => id !== "")
330
- );
331
- map.set(
332
- filterId,
333
- columns.filter((column) => !columnsUsedByOtherFilters.has(column.id))
334
- );
335
- });
336
- return map;
337
- }, [filterEntries, columns]);
338
-
339
- const applyFilters = useCallback(() => {
340
- const heroUIFilters = Object.values(filters);
341
- const filtersToApply = transformFiltersFromHeroUI(heroUIFilters);
342
- onFiltersChange(filtersToApply);
343
- onClose?.();
344
- }, [filters, onFiltersChange, onClose]);
345
-
346
- return (
347
- <div className="flex flex-col gap-2 p-1 min-w-[600px]">
348
- {filterEntries.map(([filterId, filter]) => {
349
- const availableColumns = availableColumnsMap.get(filterId) ?? columns;
350
- return (
351
- <TableFilteringItem
352
- key={filterId}
353
- id={filterId}
354
- filter={filter}
355
- columns={availableColumns}
356
- selectColumn={selectColumn}
357
- selectMethod={selectMethod}
358
- removeFilter={removeFilter}
359
- selectValue={selectValue}
360
- filterMethods={effectiveFilterMethods}
361
- />
362
- );
363
- })}
364
- {!singleFilter && (
365
- <Button variant="outline" size="sm" onClick={addFilter}>
366
- <PlusIcon className="h-4 w-4" />
367
- Add Filter
368
- </Button>
369
- )}
370
- <Button onClick={applyFilters}>{singleFilter ? "Apply Filter" : "Apply Filters"}</Button>
371
- </div>
372
- );
373
- };
374
-
375
- const TableFilteringItem = ({
376
- id,
377
- filter,
378
- columns,
379
- selectColumn,
380
- selectMethod,
381
- selectValue,
382
- removeFilter,
383
- filterMethods,
384
- }: {
385
- id: string;
386
- filter: HeroUIFilter;
387
- columns: {
388
- id: string;
389
- label: string;
390
- type?: ColumnDataType | null;
391
- options?: { label: string; value: string }[] | null;
392
- endColumnId?: string | null;
393
- periodStartColumnId?: string | null;
394
- periodEndColumnId?: string | null;
395
- }[];
396
- selectColumn: (filterId: string, columnId: string) => void;
397
- selectMethod: (filterId: string, method: FilterMethod) => void;
398
- selectValue: (filterId: string, value: FilterValue) => void;
399
- removeFilter: (filterId: string) => void;
400
- filterMethods: FilterMethods;
401
- }) => {
402
- const handleColumnChange = useCallback(
403
- (keys: any) => {
404
- const columnId = String(keys.currentKey);
405
- selectColumn(id, columnId);
406
- },
407
- [id, selectColumn]
408
- );
409
-
410
- const methodsForType = useMemo(() => {
411
- if (!filter.type) return [];
412
-
413
- // Period columns only support intersect method
414
- const isPeriodColumn = filter.columnId.endsWith("__period");
415
- if (isPeriodColumn) {
416
- const intersectMethod = filterMethods.date.find((m) => m.value === "intersect");
417
- return intersectMethod ? [intersectMethod] : [];
418
- }
419
-
420
- const baseMethods = filterMethods[filter.type as ColumnDataType] ?? [];
421
- const emptyMethods: FilterMethod[] = [
422
- { value: "isEmpty", label: "Is Empty", component: null },
423
- { value: "isNotEmpty", label: "Is Not Empty", component: null },
424
- ];
425
-
426
- if (filter.type !== "boolean" && filter.type !== "date") {
427
- return [...baseMethods, ...emptyMethods];
428
- }
429
-
430
- return baseMethods;
431
- }, [filter.type, filter.columnId, filter.method?.value, filterMethods]);
432
-
433
- const handleMethodChange = useCallback(
434
- (keys: any) => {
435
- if (!filter.type) return;
436
- // Use methodsForType instead of filterMethods to include dynamically added methods
437
- const method = methodsForType.find(
438
- (currentMethod: FilterMethod) => currentMethod.value === String(keys.currentKey)
439
- );
440
- if (method) {
441
- selectMethod(id, method);
442
- }
443
- },
444
- [id, filter.type, selectMethod, methodsForType]
445
- );
446
-
447
- const handleValueChange = useCallback(
448
- (value: FilterValue) => {
449
- selectValue(id, value);
450
- },
451
- [id, selectValue]
452
- );
453
-
454
- const methodSelect = useMemo(() => {
455
- if (!filter.type) return null;
456
- return (
457
- <Select
458
- size="sm"
459
- aria-label="Select Method"
460
- className="w-40 flex-shrink-0 text-sm"
461
- selectedKeys={filter.method?.value ? [filter.method.value] : []}
462
- onSelectionChange={handleMethodChange}
463
- popoverProps={{
464
- className: "w-auto min-w-max",
465
- }}
466
- >
467
- {methodsForType.map((method: FilterMethod) => (
468
- <SelectItem key={method.value} className="text-sm">
469
- {method.label}
470
- </SelectItem>
471
- ))}
472
- </Select>
473
- );
474
- }, [filter.type, filter.method?.value, methodsForType, handleMethodChange]);
475
-
476
- const filterValueComponent = useMemo(() => {
477
- if (!filter.method?.component) {
478
- return <div className="flex-1 min-w-0" />;
479
- }
480
- const component = filter.method.component as ComponentForFilterMethod;
481
- const ComponentFn =
482
- componentForFilterMethod[component as keyof typeof componentForFilterMethod];
483
- if (!ComponentFn) return <div className="flex-1 min-w-0" />;
484
- return ComponentFn(filter.value as any, handleValueChange, filter.options ?? []);
485
- }, [filter.method?.component, filter.value, filter.options, handleValueChange]);
486
-
487
- const columnSelectItems = useMemo(
488
- () =>
489
- columns.map((column) => (
490
- <SelectItem key={column.id} className="text-sm">
491
- {String(column.label)}
492
- </SelectItem>
493
- )),
494
- [columns]
495
- );
496
-
497
- return (
498
- <div className="flex items-center gap-2 w-full">
499
- <div className="flex flex-1 items-center gap-2 min-w-0">
500
- <Select
501
- size="sm"
502
- aria-label="Select Column"
503
- className="w-40 flex-shrink-0 text-sm"
504
- selectedKeys={filter.columnId ? [filter.columnId] : []}
505
- onSelectionChange={handleColumnChange}
506
- popoverProps={{
507
- className: "w-auto min-w-max",
508
- }}
509
- >
510
- {columnSelectItems}
511
- </Select>
512
- {methodSelect}
513
- {filterValueComponent}
514
- </div>
515
- <Button variant="outline" size="sm" onClick={() => removeFilter(id)}>
516
- <XIcon className="h-4 w-4" />
517
- </Button>
518
- </div>
519
- );
520
- };
@@ -1,59 +0,0 @@
1
- import type { TableProps } from "@m5kdev/frontend/modules/table/hooks/useNuqsTable";
2
- import { Input } from "#components/ui/input";
3
- import {
4
- Pagination,
5
- PaginationContent,
6
- PaginationNext,
7
- PaginationPrevious,
8
- } from "#components/ui/pagination";
9
-
10
- interface TablePaginationProps {
11
- pageCount: number;
12
- page: TableProps["page"];
13
- limit: TableProps["limit"];
14
- setPagination: TableProps["setPagination"];
15
- }
16
-
17
- export const TablePagination = ({
18
- pageCount,
19
- page = 1,
20
- limit = 10,
21
- setPagination,
22
- }: TablePaginationProps) => {
23
- const isFirstPage = page === 1;
24
- const isLastPage = page >= pageCount;
25
- return (
26
- <Pagination>
27
- <PaginationContent>
28
- <PaginationPrevious
29
- isActive={!isFirstPage}
30
- onClick={() => {
31
- if (!isFirstPage) {
32
- setPagination?.({ pageIndex: page - 2, pageSize: limit });
33
- }
34
- }}
35
- />
36
- <Input
37
- type="number"
38
- value={page}
39
- min={1}
40
- max={pageCount}
41
- onChange={(e) => {
42
- const newPage = e.target.valueAsNumber;
43
- if (newPage >= 1 && newPage <= pageCount) {
44
- setPagination?.({ pageIndex: newPage - 1, pageSize: limit });
45
- }
46
- }}
47
- />
48
- <PaginationNext
49
- isActive={!isLastPage}
50
- onClick={() => {
51
- if (!isLastPage) {
52
- setPagination?.({ pageIndex: page, pageSize: limit });
53
- }
54
- }}
55
- />
56
- </PaginationContent>
57
- </Pagination>
58
- );
59
- };