@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.
- package/dist/src/animations/card.motion.d.ts +2 -0
- package/dist/src/animations/card.motion.js +7 -0
- package/dist/src/components/AvatarUpload.d.ts +7 -0
- package/dist/src/components/AvatarUpload.js +67 -0
- package/dist/src/components/Button.d.ts +5 -0
- package/dist/src/components/Button.js +5 -0
- package/dist/src/components/Calendar.d.ts +35 -0
- package/dist/src/components/Calendar.js +10 -0
- package/dist/src/components/CardsSelect.d.ts +23 -0
- package/dist/src/components/CardsSelect.js +46 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +9 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.js +11 -0
- package/dist/src/components/ColorPicker.d.ts +4 -0
- package/dist/src/components/ColorPicker.js +21 -0
- package/dist/src/components/CopyButton.d.ts +6 -0
- package/dist/src/components/CopyButton.js +24 -0
- package/dist/src/components/CropDialog.d.ts +10 -0
- package/dist/src/components/CropDialog.js +67 -0
- package/dist/src/components/DialogProvider.d.ts +15 -0
- package/dist/src/components/DialogProvider.js +50 -0
- package/dist/src/components/ErrorFallback.d.ts +4 -0
- package/dist/src/components/ErrorFallback.js +5 -0
- package/dist/src/components/FileDropzone.d.ts +6 -0
- package/dist/src/components/FileDropzone.js +63 -0
- package/dist/src/components/MultiSelectDropdown.d.ts +26 -0
- package/dist/src/components/MultiSelectDropdown.js +53 -0
- package/dist/src/components/Orb.d.ts +6 -0
- package/{src/components/Orb.tsx → dist/src/components/Orb.js} +107 -136
- package/dist/src/components/PageAlert.d.ts +18 -0
- package/dist/src/components/PageAlert.js +48 -0
- package/dist/src/components/SelectChips.d.ts +10 -0
- package/dist/src/components/SelectChips.js +11 -0
- package/dist/src/components/SidebarItem.d.ts +7 -0
- package/dist/src/components/SidebarItem.js +6 -0
- package/dist/src/components/Steps.d.ts +19 -0
- package/dist/src/components/Steps.js +34 -0
- package/dist/src/components/TablerIconPicker.d.ts +2 -0
- package/dist/src/components/TablerIconPicker.js +4238 -0
- package/dist/src/components/app-header.d.ts +6 -0
- package/dist/src/components/app-header.js +8 -0
- package/dist/src/components/blur-card.d.ts +13 -0
- package/dist/src/components/blur-card.js +34 -0
- package/dist/src/components/features-section-demo-1.d.ts +6 -0
- package/dist/src/components/features-section-demo-1.js +53 -0
- package/dist/src/components/features-section-demo-2.d.ts +1 -0
- package/dist/src/components/features-section-demo-2.js +51 -0
- package/dist/src/components/features-section-demo-3.d.ts +8 -0
- package/dist/src/components/features-section-demo-3.js +116 -0
- package/dist/src/components/mode-toggle.d.ts +1 -0
- package/dist/src/components/mode-toggle.js +9 -0
- package/dist/src/components/nav-main.d.ts +13 -0
- package/dist/src/components/nav-main.js +9 -0
- package/dist/src/components/pricing-cards.d.ts +1 -0
- package/dist/src/components/pricing-cards.js +27 -0
- package/dist/src/components/shared/ButtonCopy.d.ts +6 -0
- package/dist/src/components/shared/ButtonCopy.js +24 -0
- package/dist/src/components/team-switcher.d.ts +8 -0
- package/dist/src/components/team-switcher.js +10 -0
- package/dist/src/components/theme-provider.d.ts +13 -0
- package/dist/src/components/theme-provider.js +41 -0
- package/dist/src/components/typewriter.d.ts +18 -0
- package/dist/src/components/typewriter.js +38 -0
- package/dist/src/components/ui/alert-dialog.d.ts +14 -0
- package/dist/src/components/ui/alert-dialog.js +38 -0
- package/dist/src/components/ui/alert.d.ts +9 -0
- package/dist/src/components/ui/alert.js +24 -0
- package/dist/src/components/ui/avatar.d.ts +6 -0
- package/dist/src/components/ui/avatar.js +12 -0
- package/dist/src/components/ui/badge.d.ts +9 -0
- package/dist/src/components/ui/badge.js +20 -0
- package/dist/src/components/ui/bento-grid.d.ts +11 -0
- package/dist/src/components/ui/bento-grid.js +8 -0
- package/dist/src/components/ui/bento-grid2.d.ts +15 -0
- package/dist/src/components/ui/bento-grid2.js +13 -0
- package/dist/src/components/ui/breadcrumb.d.ts +19 -0
- package/dist/src/components/ui/breadcrumb.js +23 -0
- package/dist/src/components/ui/button.d.ts +11 -0
- package/dist/src/components/ui/button.js +33 -0
- package/dist/src/components/ui/card.d.ts +8 -0
- package/dist/src/components/ui/card.js +16 -0
- package/dist/src/components/ui/checkbox.d.ts +4 -0
- package/dist/src/components/ui/checkbox.js +8 -0
- package/dist/src/components/ui/collapsible.d.ts +5 -0
- package/{src/components/ui/collapsible.tsx → dist/src/components/ui/collapsible.js} +5 -9
- package/dist/src/components/ui/dialog.d.ts +13 -0
- package/dist/src/components/ui/dialog.js +35 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/src/components/ui/dropdown-menu.js +32 -0
- package/dist/src/components/ui/floating-navbar.d.ts +9 -0
- package/dist/src/components/ui/floating-navbar.js +38 -0
- package/dist/src/components/ui/form.d.ts +23 -0
- package/dist/src/components/ui/form.js +60 -0
- package/dist/src/components/ui/image.d.ts +6 -0
- package/dist/src/components/ui/image.js +15 -0
- package/dist/src/components/ui/input.d.ts +3 -0
- package/dist/src/components/ui/input.js +8 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.js +9 -0
- package/dist/src/components/ui/pagination.d.ts +13 -0
- package/dist/src/components/ui/pagination.js +29 -0
- package/dist/src/components/ui/progress.d.ts +4 -0
- package/dist/src/components/ui/progress.js +7 -0
- package/dist/src/components/ui/resizable-navbar.d.ts +56 -0
- package/dist/src/components/ui/resizable-navbar.js +86 -0
- package/dist/src/components/ui/segment-control.d.ts +9 -0
- package/dist/src/components/ui/segment-control.js +42 -0
- package/dist/src/components/ui/select.d.ts +13 -0
- package/dist/src/components/ui/select.js +26 -0
- package/dist/src/components/ui/separator.d.ts +4 -0
- package/dist/src/components/ui/separator.js +7 -0
- package/dist/src/components/ui/sheet.d.ts +25 -0
- package/dist/src/components/ui/sheet.js +37 -0
- package/dist/src/components/ui/sidebar.d.ts +66 -0
- package/dist/src/components/ui/sidebar.js +222 -0
- package/dist/src/components/ui/skeleton.d.ts +2 -0
- package/dist/src/components/ui/skeleton.js +6 -0
- package/dist/src/components/ui/slider.d.ts +4 -0
- package/dist/src/components/ui/slider.js +7 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.js +15 -0
- package/dist/src/components/ui/spinner.d.ts +14 -0
- package/dist/src/components/ui/spinner.js +30 -0
- package/dist/src/components/ui/switch.d.ts +4 -0
- package/dist/src/components/ui/switch.js +7 -0
- package/dist/src/components/ui/table.d.ts +10 -0
- package/dist/src/components/ui/table.js +27 -0
- package/dist/src/components/ui/tabs.d.ts +7 -0
- package/dist/src/components/ui/tabs.js +16 -0
- package/dist/src/components/ui/textarea.d.ts +3 -0
- package/dist/src/components/ui/textarea.js +6 -0
- package/dist/src/components/ui/timeline.d.ts +11 -0
- package/dist/src/components/ui/timeline.js +27 -0
- package/dist/src/components/ui/toast.d.ts +15 -0
- package/dist/src/components/ui/toast.js +33 -0
- package/dist/src/components/ui/tooltip.d.ts +7 -0
- package/dist/src/components/ui/tooltip.js +16 -0
- package/dist/src/components/ui/typewriter-effect.d.ts +16 -0
- package/dist/src/components/ui/typewriter-effect.js +76 -0
- package/dist/src/hooks/use-mobile.d.ts +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/useDialog.d.ts +4 -0
- package/dist/src/hooks/useDialog.js +22 -0
- package/dist/src/icons/GoogleIcon.d.ts +5 -0
- package/dist/src/icons/GoogleIcon.js +4 -0
- package/dist/src/icons/LinkedInIcon.d.ts +5 -0
- package/dist/src/icons/LinkedInIcon.js +4 -0
- package/dist/src/icons/MicrosoftIcon.d.ts +5 -0
- package/dist/src/icons/MicrosoftIcon.js +4 -0
- package/dist/src/lib/chatwoot.d.ts +11 -0
- package/dist/src/lib/chatwoot.js +28 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/modules/app/components/AppLoader.d.ts +2 -0
- package/dist/src/modules/app/components/AppLoader.js +5 -0
- package/dist/src/modules/app/components/AppShell.d.ts +7 -0
- package/dist/src/modules/app/components/AppShell.js +7 -0
- package/dist/src/modules/app/components/AppSidebar.d.ts +7 -0
- package/dist/src/modules/app/components/AppSidebar.js +5 -0
- package/dist/src/modules/app/components/AppSidebarContent.d.ts +16 -0
- package/dist/src/modules/app/components/AppSidebarContent.js +7 -0
- package/dist/src/modules/app/components/AppSidebarHeader.d.ts +8 -0
- package/dist/src/modules/app/components/AppSidebarHeader.js +10 -0
- package/dist/src/modules/app/components/AppSidebarInvites.d.ts +3 -0
- package/dist/src/modules/app/components/AppSidebarInvites.js +12 -0
- package/dist/src/modules/app/components/AppSidebarUser.d.ts +11 -0
- package/dist/src/modules/app/components/AppSidebarUser.js +16 -0
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts +6 -0
- package/dist/src/modules/auth/components/AdminUserManagement.js +422 -0
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts +6 -0
- package/dist/src/modules/auth/components/AdminWaitlist.js +118 -0
- package/dist/src/modules/auth/components/AuthLayout.d.ts +4 -0
- package/dist/src/modules/auth/components/AuthLayout.js +5 -0
- package/dist/src/modules/auth/components/AuthProviders.d.ts +6 -0
- package/dist/src/modules/auth/components/AuthProviders.js +45 -0
- package/dist/src/modules/auth/components/AuthRouter.d.ts +9 -0
- package/dist/src/modules/auth/components/AuthRouter.js +12 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +4 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.js +143 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +1 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.js +93 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.js +27 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js +9 -0
- package/dist/src/modules/auth/components/InviteFriends.d.ts +5 -0
- package/dist/src/modules/auth/components/InviteFriends.js +74 -0
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts +5 -0
- package/dist/src/modules/auth/components/LastUsedBadge.js +9 -0
- package/dist/src/modules/auth/components/LoginForm.d.ts +3 -0
- package/dist/src/modules/auth/components/LoginForm.js +44 -0
- package/dist/src/modules/auth/components/LoginRoute.d.ts +3 -0
- package/dist/src/modules/auth/components/LoginRoute.js +11 -0
- package/dist/src/modules/auth/components/LogoutRoute.d.ts +1 -0
- package/dist/src/modules/auth/components/LogoutRoute.js +15 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +9 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +102 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +51 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js +359 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +20 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +153 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +7 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.js +74 -0
- package/dist/src/modules/auth/components/ProfileRoute.d.ts +1 -0
- package/dist/src/modules/auth/components/ProfileRoute.js +42 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +31 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +236 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +1 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.js +39 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +1 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.js +9 -0
- package/dist/src/modules/auth/components/SignupFormRoute.d.ts +5 -0
- package/dist/src/modules/auth/components/SignupFormRoute.js +106 -0
- package/dist/src/modules/auth/components/SignupRoute.d.ts +7 -0
- package/dist/src/modules/auth/components/SignupRoute.js +16 -0
- package/dist/src/modules/auth/components/UserPreferences.d.ts +30 -0
- package/dist/src/modules/auth/components/UserPreferences.js +60 -0
- package/dist/src/modules/auth/components/WaitlistCard.d.ts +6 -0
- package/dist/src/modules/auth/components/WaitlistCard.js +32 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +7 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js +43 -0
- package/dist/src/modules/billing/components/BillingBetaPage.d.ts +8 -0
- package/dist/src/modules/billing/components/BillingBetaPage.js +11 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +7 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.js +32 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +6 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.js +8 -0
- package/dist/src/modules/billing/components/BillingRouter.d.ts +9 -0
- package/dist/src/modules/billing/components/BillingRouter.js +8 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +8 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +46 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +10 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +42 -0
- package/dist/src/modules/table/components/NuqsTable.d.ts +23 -0
- package/dist/src/modules/table/components/NuqsTable.js +198 -0
- package/dist/src/modules/table/components/TableFiltering.d.ts +23 -0
- package/dist/src/modules/table/components/TableFiltering.js +236 -0
- package/dist/src/modules/table/components/TablePagination.d.ts +9 -0
- package/dist/src/modules/table/components/TablePagination.js +21 -0
- package/{src/modules/table/components/table.types.ts → dist/src/modules/table/components/table.types.d.ts} +12 -11
- package/dist/src/modules/table/components/table.types.js +1 -0
- package/dist/src/modules/table/filterTransformers.d.ts +53 -0
- package/dist/src/modules/table/filterTransformers.js +276 -0
- package/{src/types.ts → dist/src/types.d.ts} +3 -4
- package/dist/src/types.js +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +8 -5
- package/.cursor/rules/web-ui.mdc +0 -126
- package/.turbo/turbo-build.log +0 -5
- package/.turbo/turbo-check-types.log +0 -5
- package/.turbo/turbo-lint$colon$fix.log +0 -381
- package/.turbo/turbo-lint.log +0 -361
- package/CHANGELOG.md +0 -19
- package/components.json +0 -21
- package/src/animations/card.motion.ts +0 -9
- package/src/components/AvatarUpload.tsx +0 -133
- package/src/components/Button.tsx +0 -14
- package/src/components/Calendar.css +0 -684
- package/src/components/Calendar.tsx +0 -32
- package/src/components/CardsSelect.tsx +0 -155
- package/src/components/CollapsibleSidebarMenuItem.tsx +0 -57
- package/src/components/ColorPicker.tsx +0 -56
- package/src/components/CopyButton.tsx +0 -45
- package/src/components/CropDialog.tsx +0 -154
- package/src/components/DialogProvider.tsx +0 -105
- package/src/components/ErrorFallback.tsx +0 -17
- package/src/components/FileDropzone.tsx +0 -120
- package/src/components/MultiSelectDropdown.tsx +0 -233
- package/src/components/PageAlert.tsx +0 -121
- package/src/components/SelectChips.tsx +0 -40
- package/src/components/SidebarItem.tsx +0 -26
- package/src/components/Steps.tsx +0 -340
- package/src/components/TablerIconPicker.tsx +0 -4260
- package/src/components/app-header.tsx +0 -40
- package/src/components/blur-card.tsx +0 -132
- package/src/components/features-section-demo-1.tsx +0 -127
- package/src/components/features-section-demo-2.tsx +0 -102
- package/src/components/features-section-demo-3.tsx +0 -272
- package/src/components/mode-toggle.tsx +0 -31
- package/src/components/nav-main.tsx +0 -69
- package/src/components/pricing-cards.tsx +0 -133
- package/src/components/shared/ButtonCopy.tsx +0 -50
- package/src/components/team-switcher.tsx +0 -83
- package/src/components/theme-provider.tsx +0 -74
- package/src/components/typewriter.tsx +0 -90
- package/src/components/ui/alert-dialog.tsx +0 -133
- package/src/components/ui/alert.tsx +0 -60
- package/src/components/ui/avatar.tsx +0 -47
- package/src/components/ui/badge.tsx +0 -33
- package/src/components/ui/bento-grid.tsx +0 -54
- package/src/components/ui/bento-grid2.tsx +0 -66
- package/src/components/ui/breadcrumb.tsx +0 -101
- package/src/components/ui/button.tsx +0 -50
- package/src/components/ui/card.tsx +0 -55
- package/src/components/ui/checkbox.tsx +0 -26
- package/src/components/ui/dialog.tsx +0 -119
- package/src/components/ui/dropdown-menu.tsx +0 -186
- package/src/components/ui/floating-navbar.tsx +0 -78
- package/src/components/ui/form.tsx +0 -167
- package/src/components/ui/image.tsx +0 -55
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/pagination.tsx +0 -105
- package/src/components/ui/progress.tsx +0 -23
- package/src/components/ui/resizable-navbar.tsx +0 -260
- package/src/components/ui/segment-control.tsx +0 -143
- package/src/components/ui/select.tsx +0 -153
- package/src/components/ui/separator.tsx +0 -24
- package/src/components/ui/sheet.tsx +0 -121
- package/src/components/ui/sidebar.tsx +0 -736
- package/src/components/ui/skeleton.tsx +0 -7
- package/src/components/ui/slider.tsx +0 -23
- package/src/components/ui/sonner.tsx +0 -27
- package/src/components/ui/spinner.tsx +0 -45
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -90
- package/src/components/ui/tabs.tsx +0 -52
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/timeline.tsx +0 -95
- package/src/components/ui/toast.tsx +0 -126
- package/src/components/ui/tooltip.tsx +0 -55
- package/src/components/ui/typewriter-effect.tsx +0 -181
- package/src/hooks/use-mobile.ts +0 -19
- package/src/hooks/useDialog.ts +0 -25
- package/src/icons/GoogleIcon.tsx +0 -32
- package/src/icons/LinkedInIcon.tsx +0 -30
- package/src/icons/MicrosoftIcon.tsx +0 -21
- package/src/lib/chatwoot.ts +0 -51
- package/src/lib/utils.ts +0 -6
- package/src/modules/app/components/AppLoader.tsx +0 -9
- package/src/modules/app/components/AppShell.tsx +0 -21
- package/src/modules/app/components/AppSidebar.tsx +0 -26
- package/src/modules/app/components/AppSidebarContent.tsx +0 -73
- package/src/modules/app/components/AppSidebarHeader.tsx +0 -57
- package/src/modules/app/components/AppSidebarInvites.tsx +0 -32
- package/src/modules/app/components/AppSidebarUser.tsx +0 -128
- package/src/modules/auth/components/AdminUserManagement.tsx +0 -1136
- package/src/modules/auth/components/AdminWaitlist.tsx +0 -358
- package/src/modules/auth/components/AuthLayout.tsx +0 -13
- package/src/modules/auth/components/AuthProviders.tsx +0 -105
- package/src/modules/auth/components/AuthRouter.tsx +0 -29
- package/src/modules/auth/components/ClaimAccountRoute.tsx +0 -242
- package/src/modules/auth/components/ErrorAuthRoute.tsx +0 -121
- package/src/modules/auth/components/ForgotPasswordForm.tsx +0 -58
- package/src/modules/auth/components/ForgotPasswordRoute.tsx +0 -27
- package/src/modules/auth/components/InviteFriends.tsx +0 -273
- package/src/modules/auth/components/LastUsedBadge.tsx +0 -22
- package/src/modules/auth/components/LoginForm.tsx +0 -104
- package/src/modules/auth/components/LoginRoute.tsx +0 -31
- package/src/modules/auth/components/LogoutRoute.tsx +0 -21
- package/src/modules/auth/components/OrganizationAcceptInvitationRoute.tsx +0 -161
- package/src/modules/auth/components/OrganizationMembersRoute.tsx +0 -730
- package/src/modules/auth/components/OrganizationSettingsRoute.tsx +0 -280
- package/src/modules/auth/components/OrganizationSwitcher.tsx +0 -148
- package/src/modules/auth/components/ProfileRoute.tsx +0 -104
- package/src/modules/auth/components/RangeNuqsDatePicker.tsx +0 -365
- package/src/modules/auth/components/ResetPasswordForm.tsx +0 -103
- package/src/modules/auth/components/ResetPasswordRoute.tsx +0 -27
- package/src/modules/auth/components/SignupFormRoute.tsx +0 -189
- package/src/modules/auth/components/SignupRoute.tsx +0 -53
- package/src/modules/auth/components/UserPreferences.tsx +0 -144
- package/src/modules/auth/components/WaitlistCard.tsx +0 -78
- package/src/modules/auth/components/WaitlistCodeValidation.tsx +0 -79
- package/src/modules/billing/components/BillingBetaPage.tsx +0 -124
- package/src/modules/billing/components/BillingInvoicePage.tsx +0 -180
- package/src/modules/billing/components/BillingPlanSelect.tsx +0 -14
- package/src/modules/billing/components/BillingRouter.tsx +0 -20
- package/src/modules/billing/components/BillingSinglePlanSelect.tsx +0 -172
- package/src/modules/table/components/ColumnOrderAndVisibility.tsx +0 -127
- package/src/modules/table/components/NuqsTable.tsx +0 -396
- package/src/modules/table/components/TableFiltering.tsx +0 -520
- package/src/modules/table/components/TablePagination.tsx +0 -59
- package/src/modules/table/filterTransformers.ts +0 -323
- package/src/vite-env.d.ts +0 -1
- package/translations/en/web-ui.json +0 -192
- package/tsconfig.json +0 -30
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
import { buttonVariants } from "#components/ui/button";
|
|
4
|
+
import { cn } from "#utils";
|
|
5
|
+
function AlertDialog({ ...props }) {
|
|
6
|
+
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
7
|
+
}
|
|
8
|
+
function AlertDialogTrigger({ ...props }) {
|
|
9
|
+
return _jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function AlertDialogPortal({ ...props }) {
|
|
12
|
+
return _jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
13
|
+
}
|
|
14
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
15
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function AlertDialogContent({ className, ...props }) {
|
|
18
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props })] }));
|
|
19
|
+
}
|
|
20
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
21
|
+
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
24
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
27
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-semibold", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
30
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function AlertDialogAction({ className, ...props }) {
|
|
33
|
+
return _jsx(AlertDialogPrimitive.Action, { className: cn(buttonVariants(), className), ...props });
|
|
34
|
+
}
|
|
35
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
36
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { className: cn(buttonVariants({ variant: "outline" }), className), ...props }));
|
|
37
|
+
}
|
|
38
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "#utils";
|
|
4
|
+
const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
5
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
const Avatar = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })));
|
|
7
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
8
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })));
|
|
9
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
10
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Fallback, { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className), ...props })));
|
|
11
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
12
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "destructive" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "#utils";
|
|
4
|
+
const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
8
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
9
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
10
|
+
outline: "text-foreground",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
function Badge({ className, variant, ...props }) {
|
|
18
|
+
return _jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
19
|
+
}
|
|
20
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const BentoGrid: ({ className, children, }: {
|
|
2
|
+
className?: string;
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const BentoGridItem: ({ className, title, description, header, icon, }: {
|
|
6
|
+
className?: string;
|
|
7
|
+
title?: string | React.ReactNode;
|
|
8
|
+
description?: string | React.ReactNode;
|
|
9
|
+
header?: React.ReactNode;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "#utils";
|
|
3
|
+
export const BentoGrid = ({ className, children, }) => {
|
|
4
|
+
return (_jsx("div", { className: cn("mx-auto grid max-w-7xl grid-cols-1 gap-4 md:auto-rows-[20rem] md:grid-cols-4", className), children: children }));
|
|
5
|
+
};
|
|
6
|
+
export const BentoGridItem = ({ className, title, description, header, icon, }) => {
|
|
7
|
+
return (_jsxs("div", { className: cn("group/bento shadow-input row-span-1 flex flex-col justify-between space-y-4 rounded-xl border border-neutral-200 bg-white p-4 transition duration-200 hover:shadow-xl dark:border-white/[0.2] dark:bg-black dark:shadow-none", className), children: [header, _jsxs("div", { className: "transition duration-200 group-hover/bento:translate-x-2", children: [icon, _jsx("div", { className: "mt-2 mb-2 font-sans font-bold text-neutral-600 dark:text-neutral-200 text-lg", children: title }), _jsx("div", { className: "font-sans text-sm font-normal text-neutral-600 dark:text-neutral-300", children: description })] })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
declare const BentoGrid: ({ children, className }: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const BentoCard: ({ name, className, background, Icon, description, href, cta, }: {
|
|
7
|
+
name: string;
|
|
8
|
+
className: string;
|
|
9
|
+
background: ReactNode;
|
|
10
|
+
Icon: any;
|
|
11
|
+
description: string;
|
|
12
|
+
href: string;
|
|
13
|
+
cta: string;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { BentoCard, BentoGrid };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconArrowRight } from "@tabler/icons-react";
|
|
3
|
+
import { Button } from "#components/ui/button";
|
|
4
|
+
import { cn } from "#utils";
|
|
5
|
+
const BentoGrid = ({ children, className }) => {
|
|
6
|
+
return (_jsx("div", { className: cn("grid w-full auto-rows-[22rem] grid-cols-3 gap-4", className), children: children }));
|
|
7
|
+
};
|
|
8
|
+
const BentoCard = ({ name, className, background, Icon, description, href, cta, }) => (_jsxs("div", { className: cn("group relative flex flex-col justify-between overflow-hidden rounded-xl h-60",
|
|
9
|
+
// light styles
|
|
10
|
+
"bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]",
|
|
11
|
+
// dark styles
|
|
12
|
+
"transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]", className), children: [_jsx("div", { children: background }), _jsxs("div", { className: "pointer-events-none z-10 flex transform-gpu flex-col gap-1 p-6 transition-all duration-300 group-hover:-translate-y-10", children: [_jsx(Icon, { className: "h-12 w-12 origin-left transform-gpu text-neutral-700 transition-all duration-300 ease-in-out group-hover:scale-75" }), _jsx("h3", { className: "text-xl font-semibold text-neutral-700 dark:text-neutral-300", children: name }), _jsx("p", { className: "max-w-lg text-neutral-400", children: description })] }), _jsx("div", { className: cn("pointer-events-none absolute bottom-0 flex w-full translate-y-10 transform-gpu flex-row items-center p-4 opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100"), children: _jsx(Button, { variant: "ghost", asChild: true, size: "sm", className: "pointer-events-auto", children: _jsxs("a", { href: href, children: [cta, _jsx(IconArrowRight, { className: "ml-2 h-4 w-4" })] }) }) }), _jsx("div", { className: "pointer-events-none absolute inset-0 transform-gpu transition-all duration-300 group-hover:bg-black/[.03] group-hover:dark:bg-neutral-800/10" })] }, name));
|
|
13
|
+
export { BentoCard, BentoGrid };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const BreadcrumbSeparator: {
|
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BreadcrumbEllipsis: {
|
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
|
|
7
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
8
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
|
|
9
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
10
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
|
|
11
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
12
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
13
|
+
const Comp = asChild ? Slot : "a";
|
|
14
|
+
return (_jsx(Comp, { ref: ref, className: cn("transition-colors hover:text-foreground", className), ...props }));
|
|
15
|
+
});
|
|
16
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
17
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props })));
|
|
18
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
19
|
+
const BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
|
|
20
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
21
|
+
const BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
|
|
22
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
23
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
10
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
11
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
13
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-9 px-4 py-2",
|
|
18
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
19
|
+
lg: "h-10 rounded-md px-8",
|
|
20
|
+
icon: "h-9 w-9",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
size: "default",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
29
|
+
const Comp = asChild ? Slot : "button";
|
|
30
|
+
return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
31
|
+
});
|
|
32
|
+
Button.displayName = "Button";
|
|
33
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "#utils";
|
|
4
|
+
const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className), ...props })));
|
|
5
|
+
Card.displayName = "Card";
|
|
6
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
|
|
7
|
+
CardHeader.displayName = "CardHeader";
|
|
8
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })));
|
|
9
|
+
CardTitle.displayName = "CardTitle";
|
|
10
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
11
|
+
CardDescription.displayName = "CardDescription";
|
|
12
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props })));
|
|
13
|
+
CardContent.displayName = "CardContent";
|
|
14
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center p-6 pt-0", className), ...props })));
|
|
15
|
+
CardFooter.displayName = "CardFooter";
|
|
16
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
import { Check } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: _jsx(Check, { className: "h-4 w-4" }) }) })));
|
|
7
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
8
|
+
export { Checkbox };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
8
|
-
|
|
9
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
3
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
4
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import { cn } from "#utils";
|
|
5
|
+
function Dialog({ ...props }) {
|
|
6
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
7
|
+
}
|
|
8
|
+
function DialogTrigger({ ...props }) {
|
|
9
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function DialogPortal({ ...props }) {
|
|
12
|
+
return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
13
|
+
}
|
|
14
|
+
function DialogClose({ ...props }) {
|
|
15
|
+
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
16
|
+
}
|
|
17
|
+
function DialogOverlay({ className, ...props }) {
|
|
18
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function DialogContent({ className, children, ...props }) {
|
|
21
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
|
|
22
|
+
}
|
|
23
|
+
function DialogHeader({ className, ...props }) {
|
|
24
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function DialogFooter({ className, ...props }) {
|
|
27
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function DialogTitle({ className, ...props }) {
|
|
30
|
+
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function DialogDescription({ className, ...props }) {
|
|
33
|
+
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
7
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
8
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
9
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
10
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
11
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
12
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
|
|
13
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
14
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props })));
|
|
15
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
16
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
|
|
17
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
18
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className), ...props })));
|
|
19
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
20
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
21
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
22
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
23
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
24
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
|
|
25
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
26
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
27
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
28
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
29
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
|
|
30
|
+
};
|
|
31
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
32
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AnimatePresence, motion, useMotionValueEvent, useScroll } from "motion/react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { cn } from "#utils";
|
|
6
|
+
export const FloatingNav = ({ navItems, className, }) => {
|
|
7
|
+
const { scrollYProgress } = useScroll();
|
|
8
|
+
const [visible, setVisible] = useState(true);
|
|
9
|
+
useMotionValueEvent(scrollYProgress, "change", (current) => {
|
|
10
|
+
// Check if current is not undefined and is a number
|
|
11
|
+
if (typeof current === "number") {
|
|
12
|
+
const direction = current - scrollYProgress.getPrevious();
|
|
13
|
+
if (scrollYProgress.get() < 0.05) {
|
|
14
|
+
setVisible(false);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
if (direction < 0) {
|
|
18
|
+
setVisible(true);
|
|
19
|
+
}
|
|
20
|
+
else if (current === 1) {
|
|
21
|
+
setVisible(true);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
setVisible(false);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (_jsx(AnimatePresence, { mode: "wait", children: _jsxs(motion.div, { initial: {
|
|
30
|
+
opacity: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
}, animate: {
|
|
33
|
+
y: visible ? 0 : -100,
|
|
34
|
+
opacity: visible ? 1 : 0,
|
|
35
|
+
}, transition: {
|
|
36
|
+
duration: 0.2,
|
|
37
|
+
}, className: cn("flex max-w-fit fixed top-6 inset-x-0 mx-auto border border-transparent dark:border-white/[0.2] rounded-full dark:bg-black bg-white shadow-[0px_2px_3px_-1px_rgba(0,0,0,0.1),0px_1px_0px_0px_rgba(25,28,33,0.02),0px_0px_0px_1px_rgba(25,28,33,0.08)] z-[5000] pr-2 pl-8 py-2 items-center justify-center space-x-4", className), children: [navItems.map((navItem, idx) => (_jsxs("a", { href: navItem.link, className: cn("relative dark:text-neutral-50 items-center flex space-x-1 text-neutral-600 dark:hover:text-neutral-300 hover:text-neutral-500"), children: [_jsx("span", { className: "block sm:hidden", children: navItem.icon }), _jsx("span", { className: "hidden sm:block text-sm", children: navItem.name })] }, `link=${idx}`))), _jsx("button", { className: "text-sm font-medium relative text-black bg-white px-4 py-2 rounded-full", children: _jsx("span", { children: "Get in touch" }) })] }) }));
|
|
38
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const useFormField: () => {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import("react-hook-form").FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Controller, FormProvider, useFormContext, } from "react-hook-form";
|
|
5
|
+
import { Label } from "#components/ui/label";
|
|
6
|
+
import { cn } from "#utils";
|
|
7
|
+
const Form = FormProvider;
|
|
8
|
+
const FormFieldContext = React.createContext({});
|
|
9
|
+
const FormField = ({ ...props }) => {
|
|
10
|
+
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
|
|
11
|
+
};
|
|
12
|
+
const useFormField = () => {
|
|
13
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
14
|
+
const itemContext = React.useContext(FormItemContext);
|
|
15
|
+
const { getFieldState, formState } = useFormContext();
|
|
16
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
17
|
+
if (!fieldContext) {
|
|
18
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
19
|
+
}
|
|
20
|
+
const { id } = itemContext;
|
|
21
|
+
return {
|
|
22
|
+
id,
|
|
23
|
+
name: fieldContext.name,
|
|
24
|
+
formItemId: `${id}-form-item`,
|
|
25
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
26
|
+
formMessageId: `${id}-form-item-message`,
|
|
27
|
+
...fieldState,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const FormItemContext = React.createContext({});
|
|
31
|
+
const FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
32
|
+
const id = React.useId();
|
|
33
|
+
return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { ref: ref, className: cn("space-y-2", className), ...props }) }));
|
|
34
|
+
});
|
|
35
|
+
FormItem.displayName = "FormItem";
|
|
36
|
+
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
37
|
+
const { error, formItemId } = useFormField();
|
|
38
|
+
return (_jsx(Label, { ref: ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props }));
|
|
39
|
+
});
|
|
40
|
+
FormLabel.displayName = "FormLabel";
|
|
41
|
+
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
42
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
43
|
+
return (_jsx(Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
|
|
44
|
+
});
|
|
45
|
+
FormControl.displayName = "FormControl";
|
|
46
|
+
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
47
|
+
const { formDescriptionId } = useFormField();
|
|
48
|
+
return (_jsx("p", { ref: ref, id: formDescriptionId, className: cn("text-[0.8rem] text-muted-foreground", className), ...props }));
|
|
49
|
+
});
|
|
50
|
+
FormDescription.displayName = "FormDescription";
|
|
51
|
+
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
52
|
+
const { error, formMessageId } = useFormField();
|
|
53
|
+
const body = error ? String(error?.message) : children;
|
|
54
|
+
if (!body) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return (_jsx("p", { ref: ref, id: formMessageId, className: cn("text-[0.8rem] font-medium text-destructive", className), ...props, children: body }));
|
|
58
|
+
});
|
|
59
|
+
FormMessage.displayName = "FormMessage";
|
|
60
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|