@m5kdev/web-ui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,222 +1,377 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { Input } from "./input.js";
|
|
6
|
+
import { Separator } from "./separator.js";
|
|
7
|
+
import { Sheet, SheetContent } from "./sheet.js";
|
|
8
|
+
import { Skeleton } from "./skeleton.js";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
10
|
+
import * as React$1 from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { PanelLeft } from "lucide-react";
|
|
3
13
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
14
|
import { cva } from "class-variance-authority";
|
|
5
|
-
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { Button } from "./button";
|
|
8
|
-
import { Input } from "./input";
|
|
9
|
-
import { Separator } from "./separator";
|
|
10
|
-
import { Sheet, SheetContent } from "./sheet";
|
|
11
|
-
import { Skeleton } from "./skeleton";
|
|
12
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
|
|
13
|
-
import { useIsMobile } from "../../hooks/use-mobile";
|
|
14
|
-
import { cn } from "../../lib/utils";
|
|
15
|
+
//#region src/components/ui/sidebar.tsx
|
|
15
16
|
const SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
16
|
-
const SIDEBAR_COOKIE_MAX_AGE =
|
|
17
|
+
const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
|
|
17
18
|
const SIDEBAR_WIDTH = "16rem";
|
|
18
19
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
19
20
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
20
21
|
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
21
|
-
const SidebarContext = React.createContext(null);
|
|
22
|
+
const SidebarContext = React$1.createContext(null);
|
|
22
23
|
function useSidebar() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
return context;
|
|
24
|
+
const context = React$1.useContext(SidebarContext);
|
|
25
|
+
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
26
|
+
return context;
|
|
28
27
|
}
|
|
29
|
-
const SidebarProvider = React.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
28
|
+
const SidebarProvider = React$1.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
29
|
+
const isMobile = useIsMobile();
|
|
30
|
+
const [openMobile, setOpenMobile] = React$1.useState(false);
|
|
31
|
+
const [_open, _setOpen] = React$1.useState(defaultOpen);
|
|
32
|
+
const open = openProp ?? _open;
|
|
33
|
+
const setOpen = React$1.useCallback((value) => {
|
|
34
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
35
|
+
if (setOpenProp) setOpenProp(openState);
|
|
36
|
+
else _setOpen(openState);
|
|
37
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
38
|
+
}, [setOpenProp, open]);
|
|
39
|
+
const toggleSidebar = React$1.useCallback(() => {
|
|
40
|
+
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
41
|
+
}, [
|
|
42
|
+
isMobile,
|
|
43
|
+
setOpen,
|
|
44
|
+
setOpenMobile
|
|
45
|
+
]);
|
|
46
|
+
React$1.useEffect(() => {
|
|
47
|
+
const handleKeyDown = (event) => {
|
|
48
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
toggleSidebar();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
54
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
55
|
+
}, [toggleSidebar]);
|
|
56
|
+
const state = open ? "expanded" : "collapsed";
|
|
57
|
+
const contextValue = React$1.useMemo(() => ({
|
|
58
|
+
state,
|
|
59
|
+
open,
|
|
60
|
+
setOpen,
|
|
61
|
+
isMobile,
|
|
62
|
+
openMobile,
|
|
63
|
+
setOpenMobile,
|
|
64
|
+
toggleSidebar
|
|
65
|
+
}), [
|
|
66
|
+
state,
|
|
67
|
+
open,
|
|
68
|
+
setOpen,
|
|
69
|
+
isMobile,
|
|
70
|
+
openMobile,
|
|
71
|
+
setOpenMobile,
|
|
72
|
+
toggleSidebar
|
|
73
|
+
]);
|
|
74
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
75
|
+
value: contextValue,
|
|
76
|
+
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
77
|
+
delayDuration: 0,
|
|
78
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
79
|
+
style: {
|
|
80
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
81
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
82
|
+
...style
|
|
83
|
+
},
|
|
84
|
+
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", className),
|
|
85
|
+
ref,
|
|
86
|
+
...props,
|
|
87
|
+
children
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
});
|
|
79
91
|
});
|
|
80
92
|
SidebarProvider.displayName = "SidebarProvider";
|
|
81
|
-
const Sidebar = React.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
const Sidebar = React$1.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
94
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
95
|
+
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
96
|
+
className: cn("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
97
|
+
ref,
|
|
98
|
+
...props,
|
|
99
|
+
children
|
|
100
|
+
});
|
|
101
|
+
if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
|
|
102
|
+
open: openMobile,
|
|
103
|
+
onOpenChange: setOpenMobile,
|
|
104
|
+
...props,
|
|
105
|
+
children: /* @__PURE__ */ jsx(SheetContent, {
|
|
106
|
+
"data-sidebar": "sidebar",
|
|
107
|
+
"data-mobile": "true",
|
|
108
|
+
className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
109
|
+
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
110
|
+
side,
|
|
111
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
112
|
+
className: "flex h-full w-full flex-col",
|
|
113
|
+
children
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
118
|
+
ref,
|
|
119
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
120
|
+
"data-state": state,
|
|
121
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
122
|
+
"data-variant": variant,
|
|
123
|
+
"data-side": side,
|
|
124
|
+
children: [/* @__PURE__ */ jsx("div", { className: cn("relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]") }), /* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
126
|
+
...props,
|
|
127
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
128
|
+
"data-sidebar": "sidebar",
|
|
129
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
130
|
+
children
|
|
131
|
+
})
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
100
134
|
});
|
|
101
135
|
Sidebar.displayName = "Sidebar";
|
|
102
|
-
const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
136
|
+
const SidebarTrigger = React$1.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
137
|
+
const { toggleSidebar } = useSidebar();
|
|
138
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
139
|
+
ref,
|
|
140
|
+
"data-sidebar": "trigger",
|
|
141
|
+
variant: "ghost",
|
|
142
|
+
size: "icon",
|
|
143
|
+
className: cn("h-7 w-7", className),
|
|
144
|
+
onClick: (event) => {
|
|
145
|
+
onClick?.(event);
|
|
146
|
+
toggleSidebar();
|
|
147
|
+
},
|
|
148
|
+
...props,
|
|
149
|
+
children: [/* @__PURE__ */ jsx(PanelLeft, {}), /* @__PURE__ */ jsx("span", {
|
|
150
|
+
className: "sr-only",
|
|
151
|
+
children: "Toggle Sidebar"
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
108
154
|
});
|
|
109
155
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
110
|
-
const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
const SidebarRail = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
157
|
+
const { toggleSidebar } = useSidebar();
|
|
158
|
+
return /* @__PURE__ */ jsx("button", {
|
|
159
|
+
ref,
|
|
160
|
+
"data-sidebar": "rail",
|
|
161
|
+
"aria-label": "Toggle Sidebar",
|
|
162
|
+
tabIndex: -1,
|
|
163
|
+
onClick: toggleSidebar,
|
|
164
|
+
title: "Toggle Sidebar",
|
|
165
|
+
className: cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex", "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
166
|
+
...props
|
|
167
|
+
});
|
|
113
168
|
});
|
|
114
169
|
SidebarRail.displayName = "SidebarRail";
|
|
115
|
-
const SidebarInset = React.forwardRef(({ className, ...props }, ref) => {
|
|
116
|
-
|
|
170
|
+
const SidebarInset = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
171
|
+
return /* @__PURE__ */ jsx("main", {
|
|
172
|
+
ref,
|
|
173
|
+
className: cn("relative flex min-h-svh flex-1 flex-col bg-background", "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow", className),
|
|
174
|
+
...props
|
|
175
|
+
});
|
|
117
176
|
});
|
|
118
177
|
SidebarInset.displayName = "SidebarInset";
|
|
119
|
-
const SidebarInput = React.forwardRef(({ className, ...props }, ref) => {
|
|
120
|
-
|
|
178
|
+
const SidebarInput = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
179
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
180
|
+
ref,
|
|
181
|
+
"data-sidebar": "input",
|
|
182
|
+
className: cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", className),
|
|
183
|
+
...props
|
|
184
|
+
});
|
|
121
185
|
});
|
|
122
186
|
SidebarInput.displayName = "SidebarInput";
|
|
123
|
-
const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => {
|
|
124
|
-
|
|
187
|
+
const SidebarHeader = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
188
|
+
return /* @__PURE__ */ jsx("div", {
|
|
189
|
+
ref,
|
|
190
|
+
"data-sidebar": "header",
|
|
191
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
192
|
+
...props
|
|
193
|
+
});
|
|
125
194
|
});
|
|
126
195
|
SidebarHeader.displayName = "SidebarHeader";
|
|
127
|
-
const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => {
|
|
128
|
-
|
|
196
|
+
const SidebarFooter = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
197
|
+
return /* @__PURE__ */ jsx("div", {
|
|
198
|
+
ref,
|
|
199
|
+
"data-sidebar": "footer",
|
|
200
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
201
|
+
...props
|
|
202
|
+
});
|
|
129
203
|
});
|
|
130
204
|
SidebarFooter.displayName = "SidebarFooter";
|
|
131
|
-
const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
|
|
132
|
-
|
|
205
|
+
const SidebarSeparator = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
206
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
207
|
+
ref,
|
|
208
|
+
"data-sidebar": "separator",
|
|
209
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
210
|
+
...props
|
|
211
|
+
});
|
|
133
212
|
});
|
|
134
213
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
135
|
-
const SidebarContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
136
|
-
|
|
214
|
+
const SidebarContent = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
215
|
+
return /* @__PURE__ */ jsx("div", {
|
|
216
|
+
ref,
|
|
217
|
+
"data-sidebar": "content",
|
|
218
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
219
|
+
...props
|
|
220
|
+
});
|
|
137
221
|
});
|
|
138
222
|
SidebarContent.displayName = "SidebarContent";
|
|
139
|
-
const SidebarGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
140
|
-
|
|
223
|
+
const SidebarGroup = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
224
|
+
return /* @__PURE__ */ jsx("div", {
|
|
225
|
+
ref,
|
|
226
|
+
"data-sidebar": "group",
|
|
227
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
228
|
+
...props
|
|
229
|
+
});
|
|
141
230
|
});
|
|
142
231
|
SidebarGroup.displayName = "SidebarGroup";
|
|
143
|
-
const SidebarGroupLabel = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
144
|
-
|
|
145
|
-
|
|
232
|
+
const SidebarGroupLabel = React$1.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
233
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
234
|
+
ref,
|
|
235
|
+
"data-sidebar": "group-label",
|
|
236
|
+
className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
|
|
237
|
+
...props
|
|
238
|
+
});
|
|
146
239
|
});
|
|
147
240
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
148
|
-
const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
241
|
+
const SidebarGroupAction = React$1.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
242
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
243
|
+
ref,
|
|
244
|
+
"data-sidebar": "group-action",
|
|
245
|
+
className: cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
246
|
+
...props
|
|
247
|
+
});
|
|
153
248
|
});
|
|
154
249
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
155
|
-
const SidebarGroupContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
250
|
+
const SidebarGroupContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
251
|
+
ref,
|
|
252
|
+
"data-sidebar": "group-content",
|
|
253
|
+
className: cn("w-full text-sm", className),
|
|
254
|
+
...props
|
|
255
|
+
}));
|
|
156
256
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
157
|
-
const SidebarMenu = React.forwardRef(({ className, ...props }, ref) =>
|
|
257
|
+
const SidebarMenu = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", {
|
|
258
|
+
ref,
|
|
259
|
+
"data-sidebar": "menu",
|
|
260
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
261
|
+
...props
|
|
262
|
+
}));
|
|
158
263
|
SidebarMenu.displayName = "SidebarMenu";
|
|
159
|
-
const SidebarMenuItem = React.forwardRef(({ className, ...props }, ref) =>
|
|
264
|
+
const SidebarMenuItem = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", {
|
|
265
|
+
ref,
|
|
266
|
+
"data-sidebar": "menu-item",
|
|
267
|
+
className: cn("group/menu-item relative", className),
|
|
268
|
+
...props
|
|
269
|
+
}));
|
|
160
270
|
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
161
271
|
const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
const SidebarMenuButton = React.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
272
|
+
variants: {
|
|
273
|
+
variant: {
|
|
274
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
275
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
276
|
+
},
|
|
277
|
+
size: {
|
|
278
|
+
default: "h-8 text-sm",
|
|
279
|
+
sm: "h-7 text-xs",
|
|
280
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
defaultVariants: {
|
|
284
|
+
variant: "default",
|
|
285
|
+
size: "default"
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
const SidebarMenuButton = React$1.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
289
|
+
const Comp = asChild ? Slot : "button";
|
|
290
|
+
const { isMobile, state } = useSidebar();
|
|
291
|
+
const button = /* @__PURE__ */ jsx(Comp, {
|
|
292
|
+
ref,
|
|
293
|
+
"data-sidebar": "menu-button",
|
|
294
|
+
"data-size": size,
|
|
295
|
+
"data-active": isActive,
|
|
296
|
+
className: cn(sidebarMenuButtonVariants({
|
|
297
|
+
variant,
|
|
298
|
+
size
|
|
299
|
+
}), className),
|
|
300
|
+
...props
|
|
301
|
+
});
|
|
302
|
+
if (!tooltip) return button;
|
|
303
|
+
if (typeof tooltip === "string") tooltip = { children: tooltip };
|
|
304
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
305
|
+
asChild: true,
|
|
306
|
+
children: button
|
|
307
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
308
|
+
side: "right",
|
|
309
|
+
align: "center",
|
|
310
|
+
hidden: state !== "collapsed" || isMobile,
|
|
311
|
+
...tooltip
|
|
312
|
+
})] });
|
|
191
313
|
});
|
|
192
314
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
193
|
-
const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
315
|
+
const SidebarMenuAction = React$1.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
316
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
317
|
+
ref,
|
|
318
|
+
"data-sidebar": "menu-action",
|
|
319
|
+
className: cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", className),
|
|
320
|
+
...props
|
|
321
|
+
});
|
|
199
322
|
});
|
|
200
323
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
201
|
-
const SidebarMenuBadge = React.forwardRef(({ className, ...props }, ref) =>
|
|
324
|
+
const SidebarMenuBadge = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
325
|
+
ref,
|
|
326
|
+
"data-sidebar": "menu-badge",
|
|
327
|
+
className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className),
|
|
328
|
+
...props
|
|
329
|
+
}));
|
|
202
330
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
203
|
-
const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
331
|
+
const SidebarMenuSkeleton = React$1.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
332
|
+
const width = React$1.useMemo(() => {
|
|
333
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
334
|
+
}, []);
|
|
335
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
336
|
+
ref,
|
|
337
|
+
"data-sidebar": "menu-skeleton",
|
|
338
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
339
|
+
...props,
|
|
340
|
+
children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
|
|
341
|
+
className: "size-4 rounded-md",
|
|
342
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
343
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
344
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
345
|
+
"data-sidebar": "menu-skeleton-text",
|
|
346
|
+
style: { "--skeleton-width": width }
|
|
347
|
+
})]
|
|
348
|
+
});
|
|
211
349
|
});
|
|
212
350
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
213
|
-
const SidebarMenuSub = React.forwardRef(({ className, ...props }, ref) =>
|
|
351
|
+
const SidebarMenuSub = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", {
|
|
352
|
+
ref,
|
|
353
|
+
"data-sidebar": "menu-sub",
|
|
354
|
+
className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
|
|
355
|
+
...props
|
|
356
|
+
}));
|
|
214
357
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
215
|
-
const SidebarMenuSubItem = React.forwardRef(({ ...props }, ref) =>
|
|
358
|
+
const SidebarMenuSubItem = React$1.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", {
|
|
359
|
+
ref,
|
|
360
|
+
...props
|
|
361
|
+
}));
|
|
216
362
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
217
|
-
const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
218
|
-
|
|
219
|
-
|
|
363
|
+
const SidebarMenuSubButton = React$1.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
364
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
365
|
+
ref,
|
|
366
|
+
"data-sidebar": "menu-sub-button",
|
|
367
|
+
"data-size": size,
|
|
368
|
+
"data-active": isActive,
|
|
369
|
+
className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
370
|
+
...props
|
|
371
|
+
});
|
|
220
372
|
});
|
|
221
373
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
222
|
-
|
|
374
|
+
//#endregion
|
|
375
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
376
|
+
|
|
377
|
+
//# sourceMappingURL=sidebar.js.map
|