@m5kdev/web-ui 0.6.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.
- package/dist/src/animations/card.motion.d.ts +7 -2
- package/dist/src/animations/card.motion.js +25 -6
- package/dist/src/animations/card.motion.js.map +1 -0
- package/dist/src/components/AvatarUpload.d.ts +14 -5
- package/dist/src/components/AvatarUpload.js +105 -63
- package/dist/src/components/AvatarUpload.js.map +1 -0
- package/dist/src/components/Button.d.ts +14 -4
- package/dist/src/components/Button.js +13 -4
- package/dist/src/components/Button.js.map +1 -0
- package/dist/src/components/Calendar.d.ts +33 -31
- package/dist/src/components/Calendar.js +14 -6
- package/dist/src/components/Calendar.js.map +1 -0
- package/dist/src/components/{Calendar.css → Calendar2.css} +757 -684
- package/dist/src/components/CardsSelect.d.ts +25 -21
- package/dist/src/components/CardsSelect.js +75 -42
- package/dist/src/components/CardsSelect.js.map +1 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +22 -9
- package/dist/src/components/CollapsibleSidebarMenuItem.js +31 -8
- package/dist/src/components/CollapsibleSidebarMenuItem.js.map +1 -0
- package/dist/src/components/ColorPicker.d.ts +15 -4
- package/dist/src/components/ColorPicker.js +46 -16
- package/dist/src/components/ColorPicker.js.map +1 -0
- package/dist/src/components/CopyButton.d.ts +18 -6
- package/dist/src/components/CopyButton.js +28 -19
- package/dist/src/components/CopyButton.js.map +1 -0
- package/dist/src/components/CropDialog.d.ts +20 -8
- package/dist/src/components/CropDialog.js +108 -62
- package/dist/src/components/CropDialog.js.map +1 -0
- package/dist/src/components/DialogProvider.d.ts +22 -14
- package/dist/src/components/DialogProvider.js +67 -45
- package/dist/src/components/DialogProvider.js.map +1 -0
- package/dist/src/components/ErrorFallback.d.ts +13 -4
- package/dist/src/components/ErrorFallback.js +29 -4
- package/dist/src/components/ErrorFallback.js.map +1 -0
- package/dist/src/components/FileDropzone.d.ts +12 -4
- package/dist/src/components/FileDropzone.js +98 -60
- package/dist/src/components/FileDropzone.js.map +1 -0
- package/dist/src/components/MultiSelectDropdown.d.ts +25 -22
- package/dist/src/components/MultiSelectDropdown.js +99 -49
- package/dist/src/components/MultiSelectDropdown.js.map +1 -0
- package/dist/src/components/Orb.d.ts +17 -6
- package/dist/src/components/Orb.js +263 -255
- package/dist/src/components/Orb.js.map +1 -0
- package/dist/src/components/PageAlert.d.ts +20 -15
- package/dist/src/components/PageAlert.js +67 -39
- package/dist/src/components/PageAlert.js.map +1 -0
- package/dist/src/components/SelectChips.d.ts +21 -10
- package/dist/src/components/SelectChips.js +21 -9
- package/dist/src/components/SelectChips.js.map +1 -0
- package/dist/src/components/SidebarItem.d.ts +18 -7
- package/dist/src/components/SidebarItem.js +16 -4
- package/dist/src/components/SidebarItem.js.map +1 -0
- package/dist/src/components/Steps.d.ts +21 -16
- package/dist/src/components/Steps.js +193 -27
- package/dist/src/components/Steps.js.map +1 -0
- package/dist/src/components/TablerIconPicker.d.ts +13 -2
- package/dist/src/components/TablerIconPicker.js +4254 -4234
- package/dist/src/components/TablerIconPicker.js.map +1 -0
- package/dist/src/components/app-header.d.ts +14 -6
- package/dist/src/components/app-header.js +27 -6
- package/dist/src/components/app-header.js.map +1 -0
- package/dist/src/components/blur-card.d.ts +25 -11
- package/dist/src/components/blur-card.js +134 -31
- package/dist/src/components/blur-card.js.map +1 -0
- package/dist/src/components/features-section-demo-1.d.ts +22 -6
- package/dist/src/components/features-section-demo-1.js +119 -47
- package/dist/src/components/features-section-demo-1.js.map +1 -0
- package/dist/src/components/features-section-demo-2.d.ts +7 -1
- package/dist/src/components/features-section-demo-2.js +80 -49
- package/dist/src/components/features-section-demo-2.js.map +1 -0
- package/dist/src/components/features-section-demo-3.d.ts +16 -8
- package/dist/src/components/features-section-demo-3.js +239 -103
- package/dist/src/components/features-section-demo-3.js.map +1 -0
- package/dist/src/components/mode-toggle.d.ts +7 -1
- package/dist/src/components/mode-toggle.js +42 -7
- package/dist/src/components/mode-toggle.js.map +1 -0
- package/dist/src/components/nav-main.d.ts +20 -12
- package/dist/src/components/nav-main.js +31 -5
- package/dist/src/components/nav-main.js.map +1 -0
- package/dist/src/components/pricing-cards.d.ts +7 -1
- package/dist/src/components/pricing-cards.js +125 -24
- package/dist/src/components/pricing-cards.js.map +1 -0
- package/dist/src/components/shared/ButtonCopy.d.ts +17 -6
- package/dist/src/components/shared/ButtonCopy.js +31 -20
- package/dist/src/components/shared/ButtonCopy.js.map +1 -0
- package/dist/src/components/team-switcher.d.ts +16 -8
- package/dist/src/components/team-switcher.js +70 -8
- package/dist/src/components/team-switcher.js.map +1 -0
- package/dist/src/components/theme-provider.d.ts +18 -8
- package/dist/src/components/theme-provider.js +42 -38
- package/dist/src/components/theme-provider.js.map +1 -0
- package/dist/src/components/typewriter.d.ts +35 -14
- package/dist/src/components/typewriter.js +45 -36
- package/dist/src/components/typewriter.js.map +1 -0
- package/dist/src/components/ui/alert-dialog.d.ts +48 -13
- package/dist/src/components/ui/alert-dialog.js +58 -15
- package/dist/src/components/ui/alert-dialog.js.map +1 -0
- package/dist/src/components/ui/alert.d.ts +24 -8
- package/dist/src/components/ui/alert.js +28 -15
- package/dist/src/components/ui/alert.js.map +1 -0
- package/dist/src/components/ui/avatar.d.ts +9 -5
- package/dist/src/components/ui/avatar.js +23 -7
- package/dist/src/components/ui/avatar.js.map +1 -0
- package/dist/src/components/ui/badge.d.ts +17 -8
- package/dist/src/components/ui/badge.js +17 -14
- package/dist/src/components/ui/badge.js.map +1 -0
- package/dist/src/components/ui/bento-grid.d.ts +26 -11
- package/dist/src/components/ui/bento-grid.js +30 -6
- package/dist/src/components/ui/bento-grid.js.map +1 -0
- package/dist/src/components/ui/bento-grid2.d.ts +30 -14
- package/dist/src/components/ui/bento-grid2.js +45 -9
- package/dist/src/components/ui/bento-grid2.js.map +1 -0
- package/dist/src/components/ui/breadcrumb.d.ts +27 -15
- package/dist/src/components/ui/breadcrumb.js +54 -14
- package/dist/src/components/ui/breadcrumb.js.map +1 -0
- package/dist/src/components/ui/button.d.ts +14 -9
- package/dist/src/components/ui/button.js +37 -26
- package/dist/src/components/ui/button.js.map +1 -0
- package/dist/src/components/ui/card.d.ts +12 -8
- package/dist/src/components/ui/card.js +38 -10
- package/dist/src/components/ui/card.js.map +1 -0
- package/dist/src/components/ui/checkbox.d.ts +6 -2
- package/dist/src/components/ui/checkbox.js +17 -5
- package/dist/src/components/ui/checkbox.js.map +1 -0
- package/dist/src/components/ui/collapsible.d.ts +9 -4
- package/dist/src/components/ui/collapsible.js +5 -1
- package/dist/src/components/ui/collapsible.js.map +1 -0
- package/dist/src/components/ui/dialog.d.ts +44 -12
- package/dist/src/components/ui/dialog.js +64 -14
- package/dist/src/components/ui/dialog.js.map +1 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +32 -24
- package/dist/src/components/ui/dropdown-menu.js +64 -14
- package/dist/src/components/ui/dropdown-menu.js.map +1 -0
- package/dist/src/components/ui/floating-navbar.d.ts +18 -9
- package/dist/src/components/ui/floating-navbar.js +49 -35
- package/dist/src/components/ui/floating-navbar.js.map +1 -0
- package/dist/src/components/ui/form.d.ts +30 -21
- package/dist/src/components/ui/form.js +76 -44
- package/dist/src/components/ui/form.js.map +1 -0
- package/dist/src/components/ui/image.d.ts +6 -2
- package/dist/src/components/ui/image.js +51 -11
- package/dist/src/components/ui/image.js.map +1 -0
- package/dist/src/components/ui/input.d.ts +6 -2
- package/dist/src/components/ui/input.js +14 -5
- package/dist/src/components/ui/input.js.map +1 -0
- package/dist/src/components/ui/label.d.ts +8 -3
- package/dist/src/components/ui/label.js +13 -5
- package/dist/src/components/ui/label.js.map +1 -0
- package/dist/src/components/ui/pagination.d.ts +39 -12
- package/dist/src/components/ui/pagination.js +64 -14
- package/dist/src/components/ui/pagination.js.map +1 -0
- package/dist/src/components/ui/progress.d.ts +6 -2
- package/dist/src/components/ui/progress.js +16 -4
- package/dist/src/components/ui/progress.js.map +1 -0
- package/dist/src/components/ui/resizable-navbar.d.ts +84 -43
- package/dist/src/components/ui/resizable-navbar.js +126 -74
- package/dist/src/components/ui/resizable-navbar.js.map +1 -0
- package/dist/src/components/ui/segment-control.d.ts +10 -7
- package/dist/src/components/ui/segment-control.js +83 -38
- package/dist/src/components/ui/segment-control.js.map +1 -0
- package/dist/src/components/ui/select.d.ts +16 -12
- package/dist/src/components/ui/select.js +63 -14
- package/dist/src/components/ui/select.js.map +1 -0
- package/dist/src/components/ui/separator.d.ts +6 -2
- package/dist/src/components/ui/separator.js +14 -4
- package/dist/src/components/ui/separator.js.map +1 -0
- package/dist/src/components/ui/sheet.d.ts +30 -19
- package/dist/src/components/ui/sheet.js +52 -23
- package/dist/src/components/ui/sheet.js.map +1 -0
- package/dist/src/components/ui/sidebar.d.ts +69 -62
- package/dist/src/components/ui/sidebar.js +326 -171
- package/dist/src/components/ui/sidebar.js.map +1 -0
- package/dist/src/components/ui/skeleton.d.ts +9 -1
- package/dist/src/components/ui/skeleton.js +10 -3
- package/dist/src/components/ui/skeleton.js.map +1 -0
- package/dist/src/components/ui/slider.d.ts +6 -2
- package/dist/src/components/ui/slider.js +16 -4
- package/dist/src/components/ui/slider.js.map +1 -0
- package/dist/src/components/ui/sonner.d.ts +10 -3
- package/dist/src/components/ui/sonner.js +18 -11
- package/dist/src/components/ui/sonner.js.map +1 -0
- package/dist/src/components/ui/spinner.d.ts +21 -10
- package/dist/src/components/ui/spinner.js +24 -24
- package/dist/src/components/ui/spinner.js.map +1 -0
- package/dist/src/components/ui/switch.d.ts +6 -2
- package/dist/src/components/ui/switch.js +13 -4
- package/dist/src/components/ui/switch.js.map +1 -0
- package/dist/src/components/ui/table.d.ts +39 -10
- package/dist/src/components/ui/table.js +51 -11
- package/dist/src/components/ui/table.js.map +1 -0
- package/dist/src/components/ui/tabs.d.ts +23 -6
- package/dist/src/components/ui/tabs.js +27 -7
- package/dist/src/components/ui/tabs.js.map +1 -0
- package/dist/src/components/ui/textarea.d.ts +10 -2
- package/dist/src/components/ui/textarea.js +11 -3
- package/dist/src/components/ui/textarea.js.map +1 -0
- package/dist/src/components/ui/timeline.d.ts +16 -9
- package/dist/src/components/ui/timeline.js +87 -24
- package/dist/src/components/ui/timeline.js.map +1 -0
- package/dist/src/components/ui/toast.d.ts +19 -14
- package/dist/src/components/ui/toast.js +48 -22
- package/dist/src/components/ui/toast.js.map +1 -0
- package/dist/src/components/ui/tooltip.d.ts +23 -6
- package/dist/src/components/ui/tooltip.js +27 -7
- package/dist/src/components/ui/tooltip.js.map +1 -0
- package/dist/src/components/ui/typewriter-effect.d.ts +28 -14
- package/dist/src/components/ui/typewriter-effect.js +102 -72
- package/dist/src/components/ui/typewriter-effect.js.map +1 -0
- package/dist/src/hooks/use-mobile.d.ts +5 -1
- package/dist/src/hooks/use-mobile.js +18 -13
- package/dist/src/hooks/use-mobile.js.map +1 -0
- package/dist/src/hooks/useDialog.d.ts +8 -4
- package/dist/src/hooks/useDialog.js +24 -20
- package/dist/src/hooks/useDialog.js.map +1 -0
- package/dist/src/icons/GoogleIcon.d.ts +9 -5
- package/dist/src/icons/GoogleIcon.js +32 -3
- package/dist/src/icons/GoogleIcon.js.map +1 -0
- package/dist/src/icons/LinkedInIcon.d.ts +9 -5
- package/dist/src/icons/LinkedInIcon.js +27 -3
- package/dist/src/icons/LinkedInIcon.js.map +1 -0
- package/dist/src/icons/MicrosoftIcon.d.ts +9 -5
- package/dist/src/icons/MicrosoftIcon.js +31 -3
- package/dist/src/icons/MicrosoftIcon.js.map +1 -0
- package/dist/src/lib/chatwoot.d.ts +19 -10
- package/dist/src/lib/chatwoot.js +25 -27
- package/dist/src/lib/chatwoot.js.map +1 -0
- package/dist/src/lib/utils.d.ts +7 -2
- package/dist/src/lib/utils.js +7 -2
- package/dist/src/lib/utils.js.map +1 -0
- package/dist/src/modules/app/components/AppLoader.d.ts +8 -2
- package/dist/src/modules/app/components/AppLoader.js +14 -3
- package/dist/src/modules/app/components/AppLoader.js.map +1 -0
- package/dist/src/modules/app/components/AppShell.d.ts +15 -6
- package/dist/src/modules/app/components/AppShell.js +14 -5
- package/dist/src/modules/app/components/AppShell.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebar.d.ts +16 -6
- package/dist/src/modules/app/components/AppSidebar.js +17 -4
- package/dist/src/modules/app/components/AppSidebar.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarContent.d.ts +22 -13
- package/dist/src/modules/app/components/AppSidebarContent.js +34 -5
- package/dist/src/modules/app/components/AppSidebarContent.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarHeader.d.ts +18 -8
- package/dist/src/modules/app/components/AppSidebarHeader.js +37 -6
- package/dist/src/modules/app/components/AppSidebarHeader.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarInvites.d.ts +11 -3
- package/dist/src/modules/app/components/AppSidebarInvites.js +39 -8
- package/dist/src/modules/app/components/AppSidebarInvites.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarUser.d.ts +20 -10
- package/dist/src/modules/app/components/AppSidebarUser.js +121 -12
- package/dist/src/modules/app/components/AppSidebarUser.js.map +1 -0
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts +11 -4
- package/dist/src/modules/auth/components/AdminUserManagement.js +970 -418
- package/dist/src/modules/auth/components/AdminUserManagement.js.map +1 -0
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts +11 -4
- package/dist/src/modules/auth/components/AdminWaitlist.js +284 -115
- package/dist/src/modules/auth/components/AdminWaitlist.js.map +1 -0
- package/dist/src/modules/auth/components/AuthLayout.d.ts +12 -4
- package/dist/src/modules/auth/components/AuthLayout.js +17 -3
- package/dist/src/modules/auth/components/AuthLayout.js.map +1 -0
- package/dist/src/modules/auth/components/AuthProviders.d.ts +17 -6
- package/dist/src/modules/auth/components/AuthProviders.js +80 -41
- package/dist/src/modules/auth/components/AuthProviders.js.map +1 -0
- package/dist/src/modules/auth/components/AuthRouter.d.ts +16 -7
- package/dist/src/modules/auth/components/AuthRouter.js +46 -10
- package/dist/src/modules/auth/components/AuthRouter.js.map +1 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +12 -4
- package/dist/src/modules/auth/components/ClaimAccountRoute.js +202 -139
- package/dist/src/modules/auth/components/ClaimAccountRoute.js.map +1 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ErrorAuthRoute.js +125 -89
- package/dist/src/modules/auth/components/ErrorAuthRoute.js.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +7 -1
- package/dist/src/modules/auth/components/ForgotPasswordForm.js +49 -23
- package/dist/src/modules/auth/components/ForgotPasswordForm.js.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js +34 -6
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js.map +1 -0
- package/dist/src/modules/auth/components/InviteFriends.d.ts +12 -4
- package/dist/src/modules/auth/components/InviteFriends.js +275 -69
- package/dist/src/modules/auth/components/InviteFriends.js.map +1 -0
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts +17 -5
- package/dist/src/modules/auth/components/LastUsedBadge.js +16 -6
- package/dist/src/modules/auth/components/LastUsedBadge.js.map +1 -0
- package/dist/src/modules/auth/components/LoginForm.d.ts +11 -3
- package/dist/src/modules/auth/components/LoginForm.js +107 -40
- package/dist/src/modules/auth/components/LoginForm.js.map +1 -0
- package/dist/src/modules/auth/components/LoginRoute.d.ts +11 -3
- package/dist/src/modules/auth/components/LoginRoute.js +41 -8
- package/dist/src/modules/auth/components/LoginRoute.js.map +1 -0
- package/dist/src/modules/auth/components/LogoutRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/LogoutRoute.js +18 -12
- package/dist/src/modules/auth/components/LogoutRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +21 -8
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +107 -97
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +58 -48
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js +448 -349
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationPreferences.d.ts +27 -16
- package/dist/src/modules/auth/components/OrganizationPreferences.js +129 -124
- package/dist/src/modules/auth/components/OrganizationPreferences.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +27 -18
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +184 -144
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +17 -6
- package/dist/src/modules/auth/components/OrganizationSwitcher.js +91 -69
- package/dist/src/modules/auth/components/OrganizationSwitcher.js.map +1 -0
- package/dist/src/modules/auth/components/PreferencesEditor.d.ts +44 -33
- package/dist/src/modules/auth/components/PreferencesEditor.js +82 -58
- package/dist/src/modules/auth/components/PreferencesEditor.js.map +1 -0
- package/dist/src/modules/auth/components/ProfileRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ProfileRoute.js +79 -36
- package/dist/src/modules/auth/components/ProfileRoute.js.map +1 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +44 -30
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +234 -242
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +7 -1
- package/dist/src/modules/auth/components/ResetPasswordForm.js +97 -35
- package/dist/src/modules/auth/components/ResetPasswordForm.js.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ResetPasswordRoute.js +34 -6
- package/dist/src/modules/auth/components/ResetPasswordRoute.js.map +1 -0
- package/dist/src/modules/auth/components/SignupFormRoute.d.ts +15 -5
- package/dist/src/modules/auth/components/SignupFormRoute.js +142 -99
- package/dist/src/modules/auth/components/SignupFormRoute.js.map +1 -0
- package/dist/src/modules/auth/components/SignupRoute.d.ts +13 -5
- package/dist/src/modules/auth/components/SignupRoute.js +59 -13
- package/dist/src/modules/auth/components/SignupRoute.js.map +1 -0
- package/dist/src/modules/auth/components/UserPreferences.d.ts +22 -11
- package/dist/src/modules/auth/components/UserPreferences.js +24 -12
- package/dist/src/modules/auth/components/UserPreferences.js.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCard.d.ts +11 -4
- package/dist/src/modules/auth/components/WaitlistCard.js +63 -28
- package/dist/src/modules/auth/components/WaitlistCard.js.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +13 -5
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js +42 -40
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js.map +1 -0
- package/dist/src/modules/billing/components/BillingBetaPage.d.ts +15 -6
- package/dist/src/modules/billing/components/BillingBetaPage.js +155 -8
- package/dist/src/modules/billing/components/BillingBetaPage.js.map +1 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +13 -5
- package/dist/src/modules/billing/components/BillingInvoicePage.js +160 -30
- package/dist/src/modules/billing/components/BillingInvoicePage.js.map +1 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +11 -4
- package/dist/src/modules/billing/components/BillingPlanSelect.js +10 -7
- package/dist/src/modules/billing/components/BillingPlanSelect.js.map +1 -0
- package/dist/src/modules/billing/components/BillingRouter.d.ts +15 -7
- package/dist/src/modules/billing/components/BillingRouter.js +19 -6
- package/dist/src/modules/billing/components/BillingRouter.js.map +1 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +17 -7
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +163 -42
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js.map +1 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +18 -8
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +81 -38
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js.map +1 -0
- package/dist/src/modules/table/components/NuqsTable.d.ts +33 -21
- package/dist/src/modules/table/components/NuqsTable.js +295 -221
- package/dist/src/modules/table/components/NuqsTable.js.map +1 -0
- package/dist/src/modules/table/components/TableFiltering.d.ts +33 -21
- package/dist/src/modules/table/components/TableFiltering.js +408 -226
- package/dist/src/modules/table/components/TableFiltering.js.map +1 -0
- package/dist/src/modules/table/components/TableGroupBy.d.ts +18 -8
- package/dist/src/modules/table/components/TableGroupBy.js +56 -16
- package/dist/src/modules/table/components/TableGroupBy.js.map +1 -0
- package/dist/src/modules/table/components/TablePagination.d.ts +17 -7
- package/dist/src/modules/table/components/TablePagination.js +64 -32
- package/dist/src/modules/table/components/TablePagination.js.map +1 -0
- package/dist/src/modules/table/components/table.types.d.ts +15 -10
- package/dist/src/modules/table/components/table.types.js +0 -1
- package/dist/src/modules/table/filterTransformers.d.ts +35 -30
- package/dist/src/modules/table/filterTransformers.js +198 -261
- package/dist/src/modules/table/filterTransformers.js.map +1 -0
- package/dist/src/types.d.ts +8 -3
- package/dist/src/types.js +0 -1
- package/package.json +8 -6
- package/dist/translations/en/web-ui.json +0 -209
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -1,38 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/modules/auth/components/PreferencesEditor.d.ts
|
|
5
|
+
type UpdatePreferencesOptions = {
|
|
6
|
+
noOptimisticUpdate?: boolean;
|
|
7
|
+
onSuccess?: () => void;
|
|
8
|
+
onError?: (error: unknown) => void;
|
|
7
9
|
};
|
|
8
|
-
|
|
10
|
+
interface ControlDefinition {
|
|
11
|
+
label: string;
|
|
12
|
+
element: "switch" | "select" | "number";
|
|
13
|
+
options?: {
|
|
9
14
|
label: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
min?: number;
|
|
16
|
-
max?: number;
|
|
17
|
-
step?: number;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
19
|
+
step?: number;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
type ControlsFor<Preferences> = { [K in keyof Preferences]: ControlDefinition };
|
|
22
|
+
type PreferenceEditorLabels = {
|
|
23
|
+
title: string;
|
|
24
|
+
submit: string;
|
|
25
|
+
updated: string;
|
|
26
|
+
updateError: string;
|
|
27
|
+
loading?: string;
|
|
21
28
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
type PreferenceEditorProps<S extends z.ZodObject<z.ZodRawShape>> = {
|
|
30
|
+
schema: S;
|
|
31
|
+
controls: ControlsFor<z.infer<S>>;
|
|
32
|
+
values: Partial<z.infer<S>>;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
isPending: boolean;
|
|
35
|
+
labels: PreferenceEditorLabels;
|
|
36
|
+
updateValues: (partialValues: Partial<z.infer<S>>, options: UpdatePreferencesOptions) => void;
|
|
28
37
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
|
|
38
|
+
declare function PreferencesEditor<S extends z.ZodObject<z.ZodRawShape>>({
|
|
39
|
+
schema,
|
|
40
|
+
controls,
|
|
41
|
+
values,
|
|
42
|
+
isLoading,
|
|
43
|
+
isPending,
|
|
44
|
+
labels,
|
|
45
|
+
updateValues
|
|
46
|
+
}: PreferenceEditorProps<S>): ReactElement;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ControlDefinition, ControlsFor, PreferenceEditorLabels, PreferenceEditorProps, PreferencesEditor, UpdatePreferencesOptions };
|
|
49
|
+
//# sourceMappingURL=PreferencesEditor.d.ts.map
|
|
@@ -1,61 +1,85 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { Button, Form, Input, Select, SelectItem, Switch } from "@heroui/react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { toast } from "sonner";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
4
|
+
//#region src/modules/auth/components/PreferencesEditor.tsx
|
|
5
|
+
function PreferencesEditor({ schema, controls, values, isLoading, isPending, labels, updateValues }) {
|
|
6
|
+
function handleSubmit(event) {
|
|
7
|
+
event.preventDefault();
|
|
8
|
+
const formData = new FormData(event.currentTarget);
|
|
9
|
+
const keys = Object.keys(controls);
|
|
10
|
+
const raw = {};
|
|
11
|
+
for (const key of keys) {
|
|
12
|
+
const control = controls[key];
|
|
13
|
+
if (control.element === "switch") raw[String(key)] = formData.get(String(key)) != null;
|
|
14
|
+
if (control.element === "select") raw[String(key)] = formData.get(String(key));
|
|
15
|
+
if (control.element === "number") {
|
|
16
|
+
const value = formData.get(String(key));
|
|
17
|
+
raw[String(key)] = value == null || value === "" ? void 0 : Number(value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const result = schema.safeParse(raw);
|
|
21
|
+
if (result.success) updateValues(result.data, {
|
|
22
|
+
noOptimisticUpdate: true,
|
|
23
|
+
onSuccess: () => {
|
|
24
|
+
toast.success(labels.updated);
|
|
25
|
+
},
|
|
26
|
+
onError: () => {
|
|
27
|
+
toast.error(labels.updateError);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
else console.error(result.error);
|
|
31
|
+
}
|
|
32
|
+
const keys = Object.keys(controls);
|
|
33
|
+
const formKey = keys.map((key) => `${String(key)}:${String(values[key])}`).join("|");
|
|
34
|
+
if (isLoading) return /* @__PURE__ */ jsx("div", { children: labels.loading ?? "Loading..." });
|
|
35
|
+
return /* @__PURE__ */ jsxs(Form, {
|
|
36
|
+
onSubmit: handleSubmit,
|
|
37
|
+
className: "flex flex-col gap-4 p-6",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx("h1", {
|
|
40
|
+
className: "text-2xl font-bold",
|
|
41
|
+
children: labels.title
|
|
42
|
+
}),
|
|
43
|
+
keys.map((key) => {
|
|
44
|
+
const control = controls[key];
|
|
45
|
+
const value = values[key];
|
|
46
|
+
switch (control.element) {
|
|
47
|
+
case "switch": return /* @__PURE__ */ jsx(Switch, {
|
|
48
|
+
name: String(key),
|
|
49
|
+
value: "on",
|
|
50
|
+
defaultSelected: Boolean(value),
|
|
51
|
+
children: control.label
|
|
52
|
+
}, String(key));
|
|
53
|
+
case "select": return /* @__PURE__ */ jsx(Select, {
|
|
54
|
+
name: String(key),
|
|
55
|
+
label: control.label,
|
|
56
|
+
labelPlacement: "outside-top",
|
|
57
|
+
defaultSelectedKeys: value == null || value === "" ? [] : [String(value)],
|
|
58
|
+
children: (control.options ?? []).map((option) => /* @__PURE__ */ jsx(SelectItem, { children: option.label }, option.value))
|
|
59
|
+
}, String(key));
|
|
60
|
+
case "number": return /* @__PURE__ */ jsx(Input, {
|
|
61
|
+
name: String(key),
|
|
62
|
+
type: "number",
|
|
63
|
+
label: control.label,
|
|
64
|
+
labelPlacement: "outside-top",
|
|
65
|
+
defaultValue: value == null ? "" : String(value),
|
|
66
|
+
min: control.min,
|
|
67
|
+
max: control.max,
|
|
68
|
+
step: control.step
|
|
69
|
+
}, String(key));
|
|
70
|
+
default: return /* @__PURE__ */ jsx("div", { children: "Invalid control" }, String(key));
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(Button, {
|
|
74
|
+
type: "submit",
|
|
75
|
+
color: "success",
|
|
76
|
+
isLoading: isPending,
|
|
77
|
+
children: labels.submit
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
}, formKey);
|
|
61
81
|
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { PreferencesEditor };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=PreferencesEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreferencesEditor.js","names":[],"sources":["../../../../../src/modules/auth/components/PreferencesEditor.tsx"],"sourcesContent":["import { Button, Form, Input, Select, SelectItem, Switch } from \"@heroui/react\";\r\nimport type { FormEvent, ReactElement } from \"react\";\r\nimport { toast } from \"sonner\";\r\nimport type { z } from \"zod\";\r\n\r\nexport type UpdatePreferencesOptions = {\r\n noOptimisticUpdate?: boolean;\r\n onSuccess?: () => void;\r\n onError?: (error: unknown) => void;\r\n};\r\n\r\nexport interface ControlDefinition {\r\n label: string;\r\n element: \"switch\" | \"select\" | \"number\";\r\n options?: { label: string; value: string }[];\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n}\r\n\r\nexport type ControlsFor<Preferences> = {\r\n [K in keyof Preferences]: ControlDefinition;\r\n};\r\n\r\nexport type PreferenceEditorLabels = {\r\n title: string;\r\n submit: string;\r\n updated: string;\r\n updateError: string;\r\n loading?: string;\r\n};\r\n\r\nexport type PreferenceEditorProps<S extends z.ZodObject<z.ZodRawShape>> = {\r\n schema: S;\r\n controls: ControlsFor<z.infer<S>>;\r\n values: Partial<z.infer<S>>;\r\n isLoading: boolean;\r\n isPending: boolean;\r\n labels: PreferenceEditorLabels;\r\n updateValues: (partialValues: Partial<z.infer<S>>, options: UpdatePreferencesOptions) => void;\r\n};\r\n\r\nexport function PreferencesEditor<S extends z.ZodObject<z.ZodRawShape>>({\r\n schema,\r\n controls,\r\n values,\r\n isLoading,\r\n isPending,\r\n labels,\r\n updateValues,\r\n}: PreferenceEditorProps<S>): ReactElement {\r\n function handleSubmit(event: FormEvent<HTMLFormElement>) {\r\n event.preventDefault();\r\n const formData = new FormData(event.currentTarget);\r\n\r\n const keys = Object.keys(controls) as Array<keyof typeof controls>;\r\n const raw: Record<string, unknown> = {};\r\n for (const key of keys) {\r\n const control = controls[key];\r\n if (control.element === \"switch\") {\r\n raw[String(key)] = formData.get(String(key)) != null;\r\n }\r\n if (control.element === \"select\") {\r\n raw[String(key)] = formData.get(String(key)) as string;\r\n }\r\n if (control.element === \"number\") {\r\n const value = formData.get(String(key));\r\n raw[String(key)] = value == null || value === \"\" ? undefined : Number(value);\r\n }\r\n }\r\n\r\n const result = schema.safeParse(raw);\r\n if (result.success) {\r\n updateValues(result.data as Partial<z.infer<S>>, {\r\n noOptimisticUpdate: true,\r\n onSuccess: () => {\r\n toast.success(labels.updated);\r\n },\r\n onError: () => {\r\n toast.error(labels.updateError);\r\n },\r\n });\r\n } else {\r\n // eslint-disable-next-line no-console\r\n console.error(result.error);\r\n }\r\n }\r\n\r\n const keys = Object.keys(controls) as Array<keyof typeof controls>;\r\n const formKey = keys\r\n .map((key) => `${String(key)}:${String(values[key as keyof typeof values])}`)\r\n .join(\"|\");\r\n\r\n if (isLoading) {\r\n return <div>{labels.loading ?? \"Loading...\"}</div>;\r\n }\r\n\r\n return (\r\n <Form key={formKey} onSubmit={handleSubmit} className=\"flex flex-col gap-4 p-6\">\r\n <h1 className=\"text-2xl font-bold\">{labels.title}</h1>\r\n {keys.map((key) => {\r\n const control = controls[key];\r\n const value = values[key as keyof typeof values];\r\n\r\n switch (control.element) {\r\n case \"switch\":\r\n return (\r\n <Switch\r\n key={String(key)}\r\n name={String(key)}\r\n value=\"on\"\r\n defaultSelected={Boolean(value)}\r\n >\r\n {control.label}\r\n </Switch>\r\n );\r\n case \"select\":\r\n return (\r\n <Select\r\n key={String(key)}\r\n name={String(key)}\r\n label={control.label}\r\n labelPlacement=\"outside-top\"\r\n defaultSelectedKeys={value == null || value === \"\" ? [] : [String(value)]}\r\n >\r\n {(control.options ?? []).map((option) => (\r\n <SelectItem key={option.value}>{option.label}</SelectItem>\r\n ))}\r\n </Select>\r\n );\r\n case \"number\":\r\n return (\r\n <Input\r\n key={String(key)}\r\n name={String(key)}\r\n type=\"number\"\r\n label={control.label}\r\n labelPlacement=\"outside-top\"\r\n defaultValue={value == null ? \"\" : String(value)}\r\n min={control.min}\r\n max={control.max}\r\n step={control.step}\r\n />\r\n );\r\n default:\r\n return <div key={String(key)}>Invalid control</div>;\r\n }\r\n })}\r\n <Button type=\"submit\" color=\"success\" isLoading={isPending}>\r\n {labels.submit}\r\n </Button>\r\n </Form>\r\n );\r\n}\r\n"],"mappings":";;;;AA0CA,SAAgB,kBAAwD,EACtE,QACA,UACA,QACA,WACA,WACA,QACA,gBACyC;CACzC,SAAS,aAAa,OAAmC;AACvD,QAAM,gBAAgB;EACtB,MAAM,WAAW,IAAI,SAAS,MAAM,cAAc;EAElD,MAAM,OAAO,OAAO,KAAK,SAAS;EAClC,MAAM,MAA+B,EAAE;AACvC,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,UAAU,SAAS;AACzB,OAAI,QAAQ,YAAY,SACtB,KAAI,OAAO,IAAI,IAAI,SAAS,IAAI,OAAO,IAAI,CAAC,IAAI;AAElD,OAAI,QAAQ,YAAY,SACtB,KAAI,OAAO,IAAI,IAAI,SAAS,IAAI,OAAO,IAAI,CAAC;AAE9C,OAAI,QAAQ,YAAY,UAAU;IAChC,MAAM,QAAQ,SAAS,IAAI,OAAO,IAAI,CAAC;AACvC,QAAI,OAAO,IAAI,IAAI,SAAS,QAAQ,UAAU,KAAK,KAAA,IAAY,OAAO,MAAM;;;EAIhF,MAAM,SAAS,OAAO,UAAU,IAAI;AACpC,MAAI,OAAO,QACT,cAAa,OAAO,MAA6B;GAC/C,oBAAoB;GACpB,iBAAiB;AACf,UAAM,QAAQ,OAAO,QAAQ;;GAE/B,eAAe;AACb,UAAM,MAAM,OAAO,YAAY;;GAElC,CAAC;MAGF,SAAQ,MAAM,OAAO,MAAM;;CAI/B,MAAM,OAAO,OAAO,KAAK,SAAS;CAClC,MAAM,UAAU,KACb,KAAK,QAAQ,GAAG,OAAO,IAAI,CAAC,GAAG,OAAO,OAAO,KAA4B,GAAG,CAC5E,KAAK,IAAI;AAEZ,KAAI,UACF,QAAO,oBAAC,OAAD,EAAA,UAAM,OAAO,WAAW,cAAmB,CAAA;AAGpD,QACE,qBAAC,MAAD;EAAoB,UAAU;EAAc,WAAU;YAAtD;GACE,oBAAC,MAAD;IAAI,WAAU;cAAsB,OAAO;IAAW,CAAA;GACrD,KAAK,KAAK,QAAQ;IACjB,MAAM,UAAU,SAAS;IACzB,MAAM,QAAQ,OAAO;AAErB,YAAQ,QAAQ,SAAhB;KACE,KAAK,SACH,QACE,oBAAC,QAAD;MAEE,MAAM,OAAO,IAAI;MACjB,OAAM;MACN,iBAAiB,QAAQ,MAAM;gBAE9B,QAAQ;MACF,EANF,OAAO,IAAI,CAMT;KAEb,KAAK,SACH,QACE,oBAAC,QAAD;MAEE,MAAM,OAAO,IAAI;MACjB,OAAO,QAAQ;MACf,gBAAe;MACf,qBAAqB,SAAS,QAAQ,UAAU,KAAK,EAAE,GAAG,CAAC,OAAO,MAAM,CAAC;iBAEvE,QAAQ,WAAW,EAAE,EAAE,KAAK,WAC5B,oBAAC,YAAD,EAAA,UAAgC,OAAO,OAAmB,EAAzC,OAAO,MAAkC,CAC1D;MACK,EATF,OAAO,IAAI,CAST;KAEb,KAAK,SACH,QACE,oBAAC,OAAD;MAEE,MAAM,OAAO,IAAI;MACjB,MAAK;MACL,OAAO,QAAQ;MACf,gBAAe;MACf,cAAc,SAAS,OAAO,KAAK,OAAO,MAAM;MAChD,KAAK,QAAQ;MACb,KAAK,QAAQ;MACb,MAAM,QAAQ;MACd,EATK,OAAO,IAAI,CAShB;KAEN,QACE,QAAO,oBAAC,OAAD,EAAA,UAAuB,mBAAqB,EAAlC,OAAO,IAAI,CAAuB;;KAEvD;GACF,oBAAC,QAAD;IAAQ,MAAK;IAAS,OAAM;IAAU,WAAW;cAC9C,OAAO;IACD,CAAA;GACJ;IArDI,QAqDJ"}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/auth/components/ProfileRoute.d.ts
|
|
4
|
+
declare function ProfileRoute(): _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ProfileRoute };
|
|
7
|
+
//# sourceMappingURL=ProfileRoute.d.ts.map
|
|
@@ -1,42 +1,85 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AvatarUpload } from "../../../components/AvatarUpload.js";
|
|
2
|
+
import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.js";
|
|
2
3
|
import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
3
|
-
import {
|
|
4
|
-
import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
|
|
5
|
-
import { useForm } from "react-hook-form";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { useTranslation } from "react-i18next";
|
|
7
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";
|
|
8
10
|
import { z } from "zod";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
image: z.string().nullable(),
|
|
11
|
+
//#region src/modules/auth/components/ProfileRoute.tsx
|
|
12
|
+
z.object({
|
|
13
|
+
name: z.string().min(2, "Name must be at least 2 characters"),
|
|
14
|
+
image: z.string().nullable()
|
|
14
15
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
16
|
+
function ProfileRoute() {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const { data: session } = useSession();
|
|
19
|
+
const form = useForm({ defaultValues: {
|
|
20
|
+
name: session?.user?.name || "",
|
|
21
|
+
image: session?.user?.image || null
|
|
22
|
+
} });
|
|
23
|
+
function onSubmit(data) {
|
|
24
|
+
authClient.updateUser(data).then(() => {
|
|
25
|
+
toast.success(t("web-ui:profile.updated"), { description: t("web-ui:profile.updateDescription") });
|
|
26
|
+
}).catch(() => {
|
|
27
|
+
toast.error(t("web-ui:profile.error"), { description: t("web-ui:profile.errorDescription") });
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: "container py-10 px-4",
|
|
32
|
+
children: /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
33
|
+
className: "flex flex-col gap-1",
|
|
34
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
35
|
+
className: "text-xl font-semibold",
|
|
36
|
+
children: t("web-ui:profile.settings.title")
|
|
37
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
38
|
+
className: "text-sm text-default-600",
|
|
39
|
+
children: t("web-ui:profile.settings.description")
|
|
40
|
+
})]
|
|
41
|
+
}), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Form$1, {
|
|
42
|
+
...form,
|
|
43
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
44
|
+
onSubmit: form.handleSubmit(onSubmit),
|
|
45
|
+
className: "space-y-6",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: "flex justify-center",
|
|
49
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
50
|
+
control: form.control,
|
|
51
|
+
name: "image",
|
|
52
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(AvatarUpload, {
|
|
53
|
+
currentAvatarUrl: field.value,
|
|
54
|
+
onUploadComplete: (url) => {
|
|
55
|
+
console.log(url);
|
|
56
|
+
field.onChange(url);
|
|
57
|
+
}
|
|
58
|
+
}) }), /* @__PURE__ */ jsx(FormMessage, {})] })
|
|
59
|
+
})
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx(FormField, {
|
|
62
|
+
control: form.control,
|
|
63
|
+
name: "name",
|
|
64
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
65
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Name" }),
|
|
66
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, {
|
|
67
|
+
placeholder: t("web-ui:profile.placeholders.name"),
|
|
68
|
+
...field
|
|
69
|
+
}) }),
|
|
70
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
71
|
+
] })
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(Button, {
|
|
74
|
+
type: "submit",
|
|
75
|
+
children: "Save Changes"
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
}) })] })
|
|
80
|
+
});
|
|
42
81
|
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { ProfileRoute };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=ProfileRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileRoute.js","names":["Form"],"sources":["../../../../../src/modules/auth/components/ProfileRoute.tsx"],"sourcesContent":["import { Button, Card, CardBody, CardHeader, Input } from \"@heroui/react\";\r\n\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { toast } from \"sonner\";\r\nimport { z } from \"zod\";\r\nimport { AvatarUpload } from \"../../../components/AvatarUpload\";\r\nimport {\r\n Form,\r\n FormControl,\r\n FormField,\r\n FormItem,\r\n FormLabel,\r\n FormMessage,\r\n} from \"../../../components/ui/form\";\r\n\r\nconst profileSchema = z.object({\r\n name: z.string().min(2, \"Name must be at least 2 characters\"),\r\n image: z.string().nullable(),\r\n});\r\n\r\ntype ProfileFormValues = z.infer<typeof profileSchema>;\r\n\r\nexport function ProfileRoute() {\r\n const { t } = useTranslation();\r\n const { data: session } = useSession();\r\n\r\n const form = useForm<ProfileFormValues>({\r\n defaultValues: {\r\n name: session?.user?.name || \"\",\r\n image: session?.user?.image || null,\r\n },\r\n });\r\n\r\n function onSubmit(data: ProfileFormValues) {\r\n authClient\r\n .updateUser(data)\r\n .then(() => {\r\n toast.success(t(\"web-ui:profile.updated\"), {\r\n description: t(\"web-ui:profile.updateDescription\"),\r\n });\r\n })\r\n .catch(() => {\r\n toast.error(t(\"web-ui:profile.error\"), {\r\n description: t(\"web-ui:profile.errorDescription\"),\r\n });\r\n });\r\n }\r\n\r\n return (\r\n <div className=\"container py-10 px-4\">\r\n <Card>\r\n <CardHeader className=\"flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">{t(\"web-ui:profile.settings.title\")}</p>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:profile.settings.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <Form {...form}>\r\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\r\n <div className=\"flex justify-center\">\r\n <FormField\r\n control={form.control}\r\n name=\"image\"\r\n render={({ field }) => (\r\n <FormItem>\r\n <FormControl>\r\n <AvatarUpload\r\n currentAvatarUrl={field.value}\r\n onUploadComplete={(url) => {\r\n console.log(url);\r\n field.onChange(url);\r\n }}\r\n />\r\n </FormControl>\r\n <FormMessage />\r\n </FormItem>\r\n )}\r\n />\r\n </div>\r\n\r\n <FormField\r\n control={form.control}\r\n name=\"name\"\r\n render={({ field }) => (\r\n <FormItem>\r\n <FormLabel>Name</FormLabel>\r\n <FormControl>\r\n <Input placeholder={t(\"web-ui:profile.placeholders.name\")} {...field} />\r\n </FormControl>\r\n <FormMessage />\r\n </FormItem>\r\n )}\r\n />\r\n\r\n <Button type=\"submit\">Save Changes</Button>\r\n </form>\r\n </Form>\r\n </CardBody>\r\n </Card>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;AAkBsB,EAAE,OAAO;CAC7B,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,qCAAqC;CAC7D,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;AAIF,SAAgB,eAAe;CAC7B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EAAE,MAAM,YAAY,YAAY;CAEtC,MAAM,OAAO,QAA2B,EACtC,eAAe;EACb,MAAM,SAAS,MAAM,QAAQ;EAC7B,OAAO,SAAS,MAAM,SAAS;EAChC,EACF,CAAC;CAEF,SAAS,SAAS,MAAyB;AACzC,aACG,WAAW,KAAK,CAChB,WAAW;AACV,SAAM,QAAQ,EAAE,yBAAyB,EAAE,EACzC,aAAa,EAAE,mCAAmC,EACnD,CAAC;IACF,CACD,YAAY;AACX,SAAM,MAAM,EAAE,uBAAuB,EAAE,EACrC,aAAa,EAAE,kCAAkC,EAClD,CAAC;IACF;;AAGN,QACE,oBAAC,OAAD;EAAK,WAAU;YACb,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,KAAD;IAAG,WAAU;cAAyB,EAAE,gCAAgC;IAAK,CAAA,EAC7E,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,sCAAsC;IAAK,CAAA,CAC3E;MACb,oBAAC,UAAD,EAAA,UACE,oBAACA,QAAD;GAAM,GAAI;aACR,qBAAC,QAAD;IAAM,UAAU,KAAK,aAAa,SAAS;IAAE,WAAU;cAAvD;KACE,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,WAAD;OACE,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC,UAAD,EAAA,UAAA,CACE,oBAAC,aAAD,EAAA,UACE,oBAAC,cAAD;QACE,kBAAkB,MAAM;QACxB,mBAAmB,QAAQ;AACzB,iBAAQ,IAAI,IAAI;AAChB,eAAM,SAAS,IAAI;;QAErB,CAAA,EACU,CAAA,EACd,oBAAC,aAAD,EAAe,CAAA,CACN,EAAA,CAAA;OAEb,CAAA;MACE,CAAA;KAEN,oBAAC,WAAD;MACE,SAAS,KAAK;MACd,MAAK;MACL,SAAS,EAAE,YACT,qBAAC,UAAD,EAAA,UAAA;OACE,oBAAC,WAAD,EAAA,UAAW,QAAgB,CAAA;OAC3B,oBAAC,aAAD,EAAA,UACE,oBAAC,OAAD;QAAO,aAAa,EAAE,mCAAmC;QAAE,GAAI;QAAS,CAAA,EAC5D,CAAA;OACd,oBAAC,aAAD,EAAe,CAAA;OACN,EAAA,CAAA;MAEb,CAAA;KAEF,oBAAC,QAAD;MAAQ,MAAK;gBAAS;MAAqB,CAAA;KACtC;;GACF,CAAA,EACE,CAAA,CACN,EAAA,CAAA;EACH,CAAA"}
|
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/auth/components/RangeNuqsDatePicker.d.ts
|
|
4
|
+
interface RangeNuqsDatePickerProps {
|
|
5
|
+
/**
|
|
6
|
+
* The column ID to use for the date filter (e.g., "startedAt")
|
|
7
|
+
*/
|
|
8
|
+
columnId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The end column ID for range filters (e.g., "endedAt")
|
|
11
|
+
*/
|
|
12
|
+
endColumnId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Label for the date range picker
|
|
15
|
+
*/
|
|
16
|
+
dateRangeLabel?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Label for the quick range selector
|
|
19
|
+
*/
|
|
20
|
+
quickRangeLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Translation namespace for i18n
|
|
23
|
+
*/
|
|
24
|
+
translationNamespace?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show quick range selector
|
|
27
|
+
*/
|
|
28
|
+
showQuickRange?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Custom className for the container
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
declare const RangeNuqsDatePicker: ({
|
|
35
|
+
columnId,
|
|
36
|
+
endColumnId,
|
|
37
|
+
dateRangeLabel,
|
|
38
|
+
quickRangeLabel,
|
|
39
|
+
translationNamespace,
|
|
40
|
+
showQuickRange,
|
|
41
|
+
className
|
|
42
|
+
}: RangeNuqsDatePickerProps) => _$react_jsx_runtime0.JSX.Element;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { RangeNuqsDatePicker, RangeNuqsDatePickerProps };
|
|
45
|
+
//# sourceMappingURL=RangeNuqsDatePicker.d.ts.map
|