@licklist/design 0.78.5-dev.106 → 0.78.5-dev.107
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/.vscode/settings.json +3 -0
- package/bitbucket-pipelines.yml +13 -4
- package/dist/Maintenance/Maintenance.scss.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +0 -24
- package/dist/v2/components/ActionMenu/ActionMenu.scss.js +1 -1
- package/dist/v2/components/Badge/Badge.scss.js +1 -1
- package/dist/v2/components/Button/Button.scss.js +1 -1
- package/dist/v2/components/Button/GhostButton.scss.js +1 -1
- package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
- package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/v2/components/DataTable/DataTable.js +86 -2
- package/dist/v2/components/IconButton/IconButton.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +13 -11
- package/dist/v2/components/Modal/DeleteModal.scss.js +1 -1
- package/dist/v2/components/NPSScore/NPSScore.scss.js +1 -1
- package/dist/v2/components/NewTabs/NewTabs.scss.js +1 -1
- package/dist/v2/components/Select/Select.scss.js +1 -1
- package/dist/v2/components/StatusBadge/StatusBadge.scss.js +1 -1
- package/dist/v2/components/StepIndicator/StepIndicator.scss.js +1 -1
- package/dist/v2/components/Tabs/Tabs.scss.js +1 -1
- package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/v2/components/Toggle/Toggle.js +8 -5
- package/dist/v2/components/Tooltip/Tooltip.scss.js +1 -1
- package/dist/v2/components/UserAvatar/UserAvatar.scss.js +1 -1
- package/dist/v2/components/UserPanel/UserPanel.scss.js +1 -1
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/chart/Chart.scss.js +1 -1
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss.js +1 -1
- package/dist/v2/icons/index.js +1 -16
- package/dist/v2/index.d.ts +0 -4
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +1 -1
- package/dist/v2/pages/Settings/SettingsTabs.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.scss.js +1 -1
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/package.json +6 -6
- package/rollup.config.js +16 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
- package/src/product-set/form/ProductsControl.tsx +2 -1
- package/src/v2/components/DataTable/DataTable.tsx +23 -1
- package/src/v2/components/Modal/DeleteModal.tsx +12 -20
- package/src/v2/components/Toggle/Toggle.tsx +6 -5
- package/src/v2/index.ts +0 -73
- package/dist/v2/shadcn/components/ui/accordion.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +0 -21
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +0 -4
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/avatar.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/badge.d.ts +0 -10
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/button.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/button.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/calendar.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/calendar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/card.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/carousel.d.ts +0 -19
- package/dist/v2/shadcn/components/ui/carousel.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.js +0 -115
- package/dist/v2/shadcn/components/ui/checkbox.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/command.d.ts +0 -83
- package/dist/v2/shadcn/components/ui/command.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.js +0 -169
- package/dist/v2/shadcn/components/ui/drawer.d.ts +0 -23
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/form.d.ts +0 -24
- package/dist/v2/shadcn/components/ui/form.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +0 -35
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/input.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/label.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/label.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/menubar.d.ts +0 -34
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/pagination.d.ts +0 -29
- package/dist/v2/shadcn/components/ui/pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/popover.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/progress.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-card.d.ts +0 -12
- package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/select.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/select.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/separator.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sheet.d.ts +0 -26
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +0 -67
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/skeleton.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/slider.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.js +0 -115
- package/dist/v2/shadcn/components/ui/switch.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/table.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tabs.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/textarea.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/textarea.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toast.d.ts +0 -16
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toaster.d.ts +0 -2
- package/dist/v2/shadcn/components/ui/toaster.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tooltip.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/use-toast.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-mobile.d.ts +0 -2
- package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-toast.d.ts +0 -45
- package/dist/v2/shadcn/hooks/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/index.d.ts +0 -20
- package/dist/v2/shadcn/index.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.d.ts +0 -3
- package/dist/v2/shadcn/lib/utils.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.js +0 -11
- package/dist/v2/shadcn/styles/globals.css +0 -112
- package/src/v2/shadcn/_reference/AccountManagerCard.tsx +0 -45
- package/src/v2/shadcn/_reference/AffiliatesTable.tsx +0 -178
- package/src/v2/shadcn/_reference/AuditArchive.tsx +0 -165
- package/src/v2/shadcn/_reference/AuditContent.tsx +0 -270
- package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +0 -251
- package/src/v2/shadcn/_reference/AvatarUpload.tsx +0 -150
- package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +0 -268
- package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +0 -274
- package/src/v2/shadcn/_reference/CompaniesTable.tsx +0 -387
- package/src/v2/shadcn/_reference/ComponentAudit.tsx +0 -239
- package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +0 -95
- package/src/v2/shadcn/_reference/CustomerCard.tsx +0 -155
- package/src/v2/shadcn/_reference/DashboardCards.tsx +0 -50
- package/src/v2/shadcn/_reference/DashboardFooter.tsx +0 -18
- package/src/v2/shadcn/_reference/DiarySettings.tsx +0 -187
- package/src/v2/shadcn/_reference/DiaryView.tsx +0 -998
- package/src/v2/shadcn/_reference/EmptyState.tsx +0 -76
- package/src/v2/shadcn/_reference/EntityInfoCard.tsx +0 -48
- package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +0 -131
- package/src/v2/shadcn/_reference/FeatureToggle.tsx +0 -72
- package/src/v2/shadcn/_reference/FlowCard.tsx +0 -170
- package/src/v2/shadcn/_reference/FlowsContent.tsx +0 -688
- package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +0 -27
- package/src/v2/shadcn/_reference/GeneralSettings.tsx +0 -33
- package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +0 -82
- package/src/v2/shadcn/_reference/LanguageSelector.tsx +0 -97
- package/src/v2/shadcn/_reference/LoadingScreen.tsx +0 -25
- package/src/v2/shadcn/_reference/LoadingSpinner.tsx +0 -41
- package/src/v2/shadcn/_reference/ManagedClientsList.tsx +0 -121
- package/src/v2/shadcn/_reference/NPSScore.tsx +0 -379
- package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +0 -181
- package/src/v2/shadcn/_reference/NotificationBanner.tsx +0 -129
- package/src/v2/shadcn/_reference/NotificationPanel.tsx +0 -208
- package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +0 -73
- package/src/v2/shadcn/_reference/ProtectedRoute.tsx +0 -39
- package/src/v2/shadcn/_reference/ProvidersTable.tsx +0 -353
- package/src/v2/shadcn/_reference/QuickAddPanel.tsx +0 -1057
- package/src/v2/shadcn/_reference/QuickFilters.tsx +0 -112
- package/src/v2/shadcn/_reference/ScheduleView.tsx +0 -410
- package/src/v2/shadcn/_reference/ScrollToTop.tsx +0 -14
- package/src/v2/shadcn/_reference/SecondaryNav.tsx +0 -50
- package/src/v2/shadcn/_reference/SecuritySettings.tsx +0 -258
- package/src/v2/shadcn/_reference/SessionDetailView.tsx +0 -294
- package/src/v2/shadcn/_reference/Sidebar.tsx +0 -14
- package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +0 -30
- package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +0 -285
- package/src/v2/shadcn/_reference/SimulationBanner.tsx +0 -57
- package/src/v2/shadcn/_reference/SortControls.tsx +0 -65
- package/src/v2/shadcn/_reference/StatusBadge.tsx +0 -49
- package/src/v2/shadcn/_reference/StyleGuideContent.tsx +0 -331
- package/src/v2/shadcn/_reference/TableActionMenu.tsx +0 -126
- package/src/v2/shadcn/_reference/ThemeProvider.tsx +0 -119
- package/src/v2/shadcn/_reference/ThemeSettings.tsx +0 -73
- package/src/v2/shadcn/_reference/TopNavigation.tsx +0 -332
- package/src/v2/shadcn/_reference/UserActivityHistory.tsx +0 -209
- package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +0 -94
- package/src/v2/shadcn/_reference/UserPanel.tsx +0 -472
- package/src/v2/shadcn/_reference/UsersTable.tsx +0 -1023
- package/src/v2/shadcn/_reference/WaiverForm.tsx +0 -301
- package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +0 -46
- package/src/v2/shadcn/_reference/WaiversTable.tsx +0 -290
- package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +0 -416
- package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +0 -313
- package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +0 -36
- package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +0 -298
- package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +0 -40
- package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +0 -142
- package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +0 -55
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +0 -285
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +0 -14
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +0 -205
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +0 -41
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +0 -102
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +0 -95
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +0 -119
- package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +0 -92
- package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +0 -64
- package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +0 -41
- package/src/v2/shadcn/_reference/email/emailTemplateData.ts +0 -53
- package/src/v2/shadcn/_reference/emptyStateIcons.tsx +0 -103
- package/src/v2/shadcn/_reference/games/MazeGame.tsx +0 -394
- package/src/v2/shadcn/_reference/games/RunnerGame.tsx +0 -497
- package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +0 -36
- package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +0 -31
- package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +0 -36
- package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +0 -401
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +0 -77
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +0 -218
- package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +0 -810
- package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +0 -152
- package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +0 -377
- package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +0 -213
- package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +0 -39
- package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +0 -184
- package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +0 -677
- package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +0 -40
- package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +0 -238
- package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +0 -131
- package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +0 -192
- package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +0 -342
- package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +0 -322
- package/src/v2/shadcn/_reference/products/PricingSection.tsx +0 -173
- package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +0 -353
- package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +0 -95
- package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +0 -140
- package/src/v2/shadcn/_reference/products/productTypeConfig.ts +0 -182
- package/src/v2/shadcn/_reference/shared/BackButton.tsx +0 -50
- package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +0 -136
- package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +0 -221
- package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +0 -108
- package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +0 -722
- package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +0 -68
- package/src/v2/shadcn/_reference/tables/DataTable.tsx +0 -221
- package/src/v2/shadcn/_reference/tables/TableControls.tsx +0 -94
- package/src/v2/shadcn/_reference/tables/index.ts +0 -3
- package/src/v2/shadcn/_reference/tables/types.ts +0 -79
- package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +0 -299
- package/src/v2/shadcn/components/ui/accordion.stories.tsx +0 -63
- package/src/v2/shadcn/components/ui/accordion.tsx +0 -52
- package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert-dialog.tsx +0 -104
- package/src/v2/shadcn/components/ui/alert.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert.tsx +0 -43
- package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/aspect-ratio.tsx +0 -5
- package/src/v2/shadcn/components/ui/avatar.stories.tsx +0 -39
- package/src/v2/shadcn/components/ui/avatar.tsx +0 -38
- package/src/v2/shadcn/components/ui/badge.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/badge.tsx +0 -30
- package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +0 -91
- package/src/v2/shadcn/components/ui/breadcrumb.tsx +0 -90
- package/src/v2/shadcn/components/ui/button.stories.tsx +0 -20
- package/src/v2/shadcn/components/ui/button.tsx +0 -60
- package/src/v2/shadcn/components/ui/calendar.stories.tsx +0 -61
- package/src/v2/shadcn/components/ui/calendar.tsx +0 -54
- package/src/v2/shadcn/components/ui/card.stories.tsx +0 -37
- package/src/v2/shadcn/components/ui/card.tsx +0 -43
- package/src/v2/shadcn/components/ui/carousel.stories.tsx +0 -92
- package/src/v2/shadcn/components/ui/carousel.tsx +0 -224
- package/src/v2/shadcn/components/ui/checkbox.scss +0 -38
- package/src/v2/shadcn/components/ui/checkbox.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/checkbox.tsx +0 -24
- package/src/v2/shadcn/components/ui/collapsible.stories.tsx +0 -59
- package/src/v2/shadcn/components/ui/collapsible.tsx +0 -9
- package/src/v2/shadcn/components/ui/command.stories.tsx +0 -70
- package/src/v2/shadcn/components/ui/command.tsx +0 -132
- package/src/v2/shadcn/components/ui/context-menu.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/context-menu.tsx +0 -178
- package/src/v2/shadcn/components/ui/dialog.stories.tsx +0 -67
- package/src/v2/shadcn/components/ui/dialog.tsx +0 -95
- package/src/v2/shadcn/components/ui/drawer.stories.tsx +0 -50
- package/src/v2/shadcn/components/ui/drawer.tsx +0 -87
- package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +0 -73
- package/src/v2/shadcn/components/ui/dropdown-menu.tsx +0 -179
- package/src/v2/shadcn/components/ui/form.stories.tsx +0 -105
- package/src/v2/shadcn/components/ui/form.tsx +0 -129
- package/src/v2/shadcn/components/ui/hover-card.stories.tsx +0 -35
- package/src/v2/shadcn/components/ui/hover-card.tsx +0 -27
- package/src/v2/shadcn/components/ui/input-otp.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/input-otp.tsx +0 -61
- package/src/v2/shadcn/components/ui/input.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/input.tsx +0 -25
- package/src/v2/shadcn/components/ui/label.stories.tsx +0 -13
- package/src/v2/shadcn/components/ui/label.tsx +0 -17
- package/src/v2/shadcn/components/ui/menubar.stories.tsx +0 -86
- package/src/v2/shadcn/components/ui/menubar.tsx +0 -207
- package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/navigation-menu.tsx +0 -120
- package/src/v2/shadcn/components/ui/pagination.stories.tsx +0 -78
- package/src/v2/shadcn/components/ui/pagination.tsx +0 -81
- package/src/v2/shadcn/components/ui/popover.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/popover.tsx +0 -29
- package/src/v2/shadcn/components/ui/progress.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/progress.tsx +0 -23
- package/src/v2/shadcn/components/ui/radio-card.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/radio-card.tsx +0 -52
- package/src/v2/shadcn/components/ui/radio-group.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/radio-group.tsx +0 -35
- package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +0 -56
- package/src/v2/shadcn/components/ui/scroll-area.tsx +0 -38
- package/src/v2/shadcn/components/ui/select.stories.tsx +0 -60
- package/src/v2/shadcn/components/ui/select.tsx +0 -148
- package/src/v2/shadcn/components/ui/separator.stories.tsx +0 -30
- package/src/v2/shadcn/components/ui/separator.tsx +0 -20
- package/src/v2/shadcn/components/ui/sheet.stories.tsx +0 -115
- package/src/v2/shadcn/components/ui/sheet.tsx +0 -107
- package/src/v2/shadcn/components/ui/sidebar.stories.tsx +0 -167
- package/src/v2/shadcn/components/ui/sidebar.tsx +0 -637
- package/src/v2/shadcn/components/ui/skeleton.stories.tsx +0 -36
- package/src/v2/shadcn/components/ui/skeleton.tsx +0 -7
- package/src/v2/shadcn/components/ui/slider.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/slider.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.scss +0 -63
- package/src/v2/shadcn/components/ui/switch.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.tsx +0 -24
- package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +0 -81
- package/src/v2/shadcn/components/ui/table-pagination.tsx +0 -61
- package/src/v2/shadcn/components/ui/table.stories.tsx +0 -40
- package/src/v2/shadcn/components/ui/table.tsx +0 -72
- package/src/v2/shadcn/components/ui/tabs.stories.tsx +0 -85
- package/src/v2/shadcn/components/ui/tabs.tsx +0 -53
- package/src/v2/shadcn/components/ui/textarea.stories.tsx +0 -15
- package/src/v2/shadcn/components/ui/textarea.tsx +0 -21
- package/src/v2/shadcn/components/ui/toast.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/toast.tsx +0 -111
- package/src/v2/shadcn/components/ui/toaster.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/toaster.tsx +0 -24
- package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +0 -95
- package/src/v2/shadcn/components/ui/toggle-group.tsx +0 -49
- package/src/v2/shadcn/components/ui/toggle.stories.tsx +0 -18
- package/src/v2/shadcn/components/ui/toggle.tsx +0 -37
- package/src/v2/shadcn/components/ui/tooltip.stories.tsx +0 -57
- package/src/v2/shadcn/components/ui/tooltip.tsx +0 -28
- package/src/v2/shadcn/components/ui/use-toast.ts +0 -3
- package/src/v2/shadcn/hooks/use-mobile.tsx +0 -19
- package/src/v2/shadcn/hooks/use-toast.ts +0 -184
- package/src/v2/shadcn/index.ts +0 -76
- package/src/v2/shadcn/lib/utils.ts +0 -6
- package/src/v2/shadcn/styles/globals.css +0 -112
|
@@ -1,637 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { VariantProps, cva } from "class-variance-authority";
|
|
4
|
-
import { IconChevronLeft } from "../../../icons";
|
|
5
|
-
|
|
6
|
-
import { useIsMobile } from "../../hooks/use-mobile";
|
|
7
|
-
import { cn } from "../../lib/utils";
|
|
8
|
-
import { Button } from "./button";
|
|
9
|
-
import { Input } from "./input";
|
|
10
|
-
import { Separator } from "./separator";
|
|
11
|
-
import { Sheet, SheetContent } from "./sheet";
|
|
12
|
-
import { Skeleton } from "./skeleton";
|
|
13
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
|
|
14
|
-
|
|
15
|
-
const SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
16
|
-
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
17
|
-
const SIDEBAR_WIDTH = "16rem";
|
|
18
|
-
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
19
|
-
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
20
|
-
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
21
|
-
|
|
22
|
-
type SidebarContext = {
|
|
23
|
-
state: "expanded" | "collapsed";
|
|
24
|
-
open: boolean;
|
|
25
|
-
setOpen: (open: boolean) => void;
|
|
26
|
-
openMobile: boolean;
|
|
27
|
-
setOpenMobile: (open: boolean) => void;
|
|
28
|
-
isMobile: boolean;
|
|
29
|
-
toggleSidebar: () => void;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const SidebarContext = React.createContext<SidebarContext | null>(null);
|
|
33
|
-
|
|
34
|
-
function useSidebar() {
|
|
35
|
-
const context = React.useContext(SidebarContext);
|
|
36
|
-
if (!context) {
|
|
37
|
-
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return context;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const SidebarProvider = React.forwardRef<
|
|
44
|
-
HTMLDivElement,
|
|
45
|
-
React.ComponentProps<"div"> & {
|
|
46
|
-
defaultOpen?: boolean;
|
|
47
|
-
open?: boolean;
|
|
48
|
-
onOpenChange?: (open: boolean) => void;
|
|
49
|
-
}
|
|
50
|
-
>(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
51
|
-
const isMobile = useIsMobile();
|
|
52
|
-
const [openMobile, setOpenMobile] = React.useState(false);
|
|
53
|
-
|
|
54
|
-
// This is the internal state of the sidebar.
|
|
55
|
-
// We use openProp and setOpenProp for control from outside the component.
|
|
56
|
-
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
57
|
-
const open = openProp ?? _open;
|
|
58
|
-
const setOpen = React.useCallback(
|
|
59
|
-
(value: boolean | ((value: boolean) => boolean)) => {
|
|
60
|
-
const openState = typeof value === "function" ? value(open) : value;
|
|
61
|
-
if (setOpenProp) {
|
|
62
|
-
setOpenProp(openState);
|
|
63
|
-
} else {
|
|
64
|
-
_setOpen(openState);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// This sets the cookie to keep the sidebar state.
|
|
68
|
-
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
69
|
-
},
|
|
70
|
-
[setOpenProp, open],
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
// Helper to toggle the sidebar.
|
|
74
|
-
const toggleSidebar = React.useCallback(() => {
|
|
75
|
-
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
76
|
-
}, [isMobile, setOpen, setOpenMobile]);
|
|
77
|
-
|
|
78
|
-
// Adds a keyboard shortcut to toggle the sidebar.
|
|
79
|
-
React.useEffect(() => {
|
|
80
|
-
const handleKeyDown = (event: KeyboardEvent) => {
|
|
81
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
toggleSidebar();
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
88
|
-
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
89
|
-
}, [toggleSidebar]);
|
|
90
|
-
|
|
91
|
-
// We add a state so that we can do data-state="expanded" or "collapsed".
|
|
92
|
-
// This makes it easier to style the sidebar with Tailwind classes.
|
|
93
|
-
const state = open ? "expanded" : "collapsed";
|
|
94
|
-
|
|
95
|
-
const contextValue = React.useMemo<SidebarContext>(
|
|
96
|
-
() => ({
|
|
97
|
-
state,
|
|
98
|
-
open,
|
|
99
|
-
setOpen,
|
|
100
|
-
isMobile,
|
|
101
|
-
openMobile,
|
|
102
|
-
setOpenMobile,
|
|
103
|
-
toggleSidebar,
|
|
104
|
-
}),
|
|
105
|
-
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<SidebarContext.Provider value={contextValue}>
|
|
110
|
-
<TooltipProvider delayDuration={0}>
|
|
111
|
-
<div
|
|
112
|
-
style={
|
|
113
|
-
{
|
|
114
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
115
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
116
|
-
...style,
|
|
117
|
-
} as React.CSSProperties
|
|
118
|
-
}
|
|
119
|
-
className={cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", className)}
|
|
120
|
-
ref={ref}
|
|
121
|
-
{...props}
|
|
122
|
-
>
|
|
123
|
-
{children}
|
|
124
|
-
</div>
|
|
125
|
-
</TooltipProvider>
|
|
126
|
-
</SidebarContext.Provider>
|
|
127
|
-
);
|
|
128
|
-
});
|
|
129
|
-
SidebarProvider.displayName = "SidebarProvider";
|
|
130
|
-
|
|
131
|
-
const Sidebar = React.forwardRef<
|
|
132
|
-
HTMLDivElement,
|
|
133
|
-
React.ComponentProps<"div"> & {
|
|
134
|
-
side?: "left" | "right";
|
|
135
|
-
variant?: "sidebar" | "floating" | "inset";
|
|
136
|
-
collapsible?: "offcanvas" | "icon" | "none";
|
|
137
|
-
}
|
|
138
|
-
>(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
139
|
-
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
140
|
-
|
|
141
|
-
if (collapsible === "none") {
|
|
142
|
-
return (
|
|
143
|
-
<div
|
|
144
|
-
className={cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className)}
|
|
145
|
-
ref={ref}
|
|
146
|
-
{...props}
|
|
147
|
-
>
|
|
148
|
-
{children}
|
|
149
|
-
</div>
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (isMobile) {
|
|
154
|
-
return (
|
|
155
|
-
<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>
|
|
156
|
-
<SheetContent
|
|
157
|
-
data-sidebar="sidebar"
|
|
158
|
-
data-mobile="true"
|
|
159
|
-
className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"
|
|
160
|
-
style={
|
|
161
|
-
{
|
|
162
|
-
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
163
|
-
} as React.CSSProperties
|
|
164
|
-
}
|
|
165
|
-
side={side}
|
|
166
|
-
>
|
|
167
|
-
<div className="flex h-full w-full flex-col">{children}</div>
|
|
168
|
-
</SheetContent>
|
|
169
|
-
</Sheet>
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
<div
|
|
175
|
-
ref={ref}
|
|
176
|
-
className="group peer hidden text-sidebar-foreground md:block"
|
|
177
|
-
data-state={state}
|
|
178
|
-
data-collapsible={state === "collapsed" ? collapsible : ""}
|
|
179
|
-
data-variant={variant}
|
|
180
|
-
data-side={side}
|
|
181
|
-
>
|
|
182
|
-
{/* This is what handles the sidebar gap on desktop */}
|
|
183
|
-
<div
|
|
184
|
-
className={cn(
|
|
185
|
-
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
186
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
187
|
-
"group-data-[side=right]:rotate-180",
|
|
188
|
-
variant === "floating" || variant === "inset"
|
|
189
|
-
? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]"
|
|
190
|
-
: "group-data-[collapsible=icon]:w-[--sidebar-width-icon]",
|
|
191
|
-
)}
|
|
192
|
-
/>
|
|
193
|
-
<div
|
|
194
|
-
className={cn(
|
|
195
|
-
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
196
|
-
side === "left"
|
|
197
|
-
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
|
198
|
-
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
199
|
-
// Adjust the padding for floating and inset variants.
|
|
200
|
-
variant === "floating" || variant === "inset"
|
|
201
|
-
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]"
|
|
202
|
-
: "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
203
|
-
className,
|
|
204
|
-
)}
|
|
205
|
-
{...props}
|
|
206
|
-
>
|
|
207
|
-
<div
|
|
208
|
-
data-sidebar="sidebar"
|
|
209
|
-
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"
|
|
210
|
-
>
|
|
211
|
-
{children}
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
);
|
|
216
|
-
});
|
|
217
|
-
Sidebar.displayName = "Sidebar";
|
|
218
|
-
|
|
219
|
-
const SidebarTrigger = React.forwardRef<React.ElementRef<typeof Button>, React.ComponentProps<typeof Button>>(
|
|
220
|
-
({ className, onClick, ...props }, ref) => {
|
|
221
|
-
const { toggleSidebar } = useSidebar();
|
|
222
|
-
|
|
223
|
-
return (
|
|
224
|
-
<Button
|
|
225
|
-
ref={ref}
|
|
226
|
-
data-sidebar="trigger"
|
|
227
|
-
variant="ghost"
|
|
228
|
-
size="icon"
|
|
229
|
-
className={cn("h-7 w-7", className)}
|
|
230
|
-
onClick={(event) => {
|
|
231
|
-
onClick?.(event);
|
|
232
|
-
toggleSidebar();
|
|
233
|
-
}}
|
|
234
|
-
{...props}
|
|
235
|
-
>
|
|
236
|
-
<IconChevronLeft className="fill-fill-primary" />
|
|
237
|
-
<span className="sr-only">Toggle Sidebar</span>
|
|
238
|
-
</Button>
|
|
239
|
-
);
|
|
240
|
-
},
|
|
241
|
-
);
|
|
242
|
-
SidebarTrigger.displayName = "SidebarTrigger";
|
|
243
|
-
|
|
244
|
-
const SidebarRail = React.forwardRef<HTMLButtonElement, React.ComponentProps<"button">>(
|
|
245
|
-
({ className, ...props }, ref) => {
|
|
246
|
-
const { toggleSidebar } = useSidebar();
|
|
247
|
-
|
|
248
|
-
return (
|
|
249
|
-
<button
|
|
250
|
-
ref={ref}
|
|
251
|
-
data-sidebar="rail"
|
|
252
|
-
aria-label="Toggle Sidebar"
|
|
253
|
-
tabIndex={-1}
|
|
254
|
-
onClick={toggleSidebar}
|
|
255
|
-
title="Toggle Sidebar"
|
|
256
|
-
className={cn(
|
|
257
|
-
"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] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex",
|
|
258
|
-
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
259
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
260
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
261
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
262
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
263
|
-
className,
|
|
264
|
-
)}
|
|
265
|
-
{...props}
|
|
266
|
-
/>
|
|
267
|
-
);
|
|
268
|
-
},
|
|
269
|
-
);
|
|
270
|
-
SidebarRail.displayName = "SidebarRail";
|
|
271
|
-
|
|
272
|
-
const SidebarInset = React.forwardRef<HTMLDivElement, React.ComponentProps<"main">>(({ className, ...props }, ref) => {
|
|
273
|
-
return (
|
|
274
|
-
<main
|
|
275
|
-
ref={ref}
|
|
276
|
-
className={cn(
|
|
277
|
-
"relative flex min-h-svh flex-1 flex-col bg-surface-primary",
|
|
278
|
-
"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",
|
|
279
|
-
className,
|
|
280
|
-
)}
|
|
281
|
-
{...props}
|
|
282
|
-
/>
|
|
283
|
-
);
|
|
284
|
-
});
|
|
285
|
-
SidebarInset.displayName = "SidebarInset";
|
|
286
|
-
|
|
287
|
-
const SidebarInput = React.forwardRef<React.ElementRef<typeof Input>, React.ComponentProps<typeof Input>>(
|
|
288
|
-
({ className, ...props }, ref) => {
|
|
289
|
-
return (
|
|
290
|
-
<Input
|
|
291
|
-
ref={ref}
|
|
292
|
-
data-sidebar="input"
|
|
293
|
-
className={cn(
|
|
294
|
-
"h-8 w-full bg-surface-primary shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
295
|
-
className,
|
|
296
|
-
)}
|
|
297
|
-
{...props}
|
|
298
|
-
/>
|
|
299
|
-
);
|
|
300
|
-
},
|
|
301
|
-
);
|
|
302
|
-
SidebarInput.displayName = "SidebarInput";
|
|
303
|
-
|
|
304
|
-
const SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(({ className, ...props }, ref) => {
|
|
305
|
-
return <div ref={ref} data-sidebar="header" className={cn("flex flex-col gap-2 p-2", className)} {...props} />;
|
|
306
|
-
});
|
|
307
|
-
SidebarHeader.displayName = "SidebarHeader";
|
|
308
|
-
|
|
309
|
-
const SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(({ className, ...props }, ref) => {
|
|
310
|
-
return <div ref={ref} data-sidebar="footer" className={cn("flex flex-col gap-2 p-2", className)} {...props} />;
|
|
311
|
-
});
|
|
312
|
-
SidebarFooter.displayName = "SidebarFooter";
|
|
313
|
-
|
|
314
|
-
const SidebarSeparator = React.forwardRef<React.ElementRef<typeof Separator>, React.ComponentProps<typeof Separator>>(
|
|
315
|
-
({ className, ...props }, ref) => {
|
|
316
|
-
return (
|
|
317
|
-
<Separator
|
|
318
|
-
ref={ref}
|
|
319
|
-
data-sidebar="separator"
|
|
320
|
-
className={cn("mx-2 w-auto bg-sidebar-border", className)}
|
|
321
|
-
{...props}
|
|
322
|
-
/>
|
|
323
|
-
);
|
|
324
|
-
},
|
|
325
|
-
);
|
|
326
|
-
SidebarSeparator.displayName = "SidebarSeparator";
|
|
327
|
-
|
|
328
|
-
const SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(({ className, ...props }, ref) => {
|
|
329
|
-
return (
|
|
330
|
-
<div
|
|
331
|
-
ref={ref}
|
|
332
|
-
data-sidebar="content"
|
|
333
|
-
className={cn(
|
|
334
|
-
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
335
|
-
className,
|
|
336
|
-
)}
|
|
337
|
-
{...props}
|
|
338
|
-
/>
|
|
339
|
-
);
|
|
340
|
-
});
|
|
341
|
-
SidebarContent.displayName = "SidebarContent";
|
|
342
|
-
|
|
343
|
-
const SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(({ className, ...props }, ref) => {
|
|
344
|
-
return (
|
|
345
|
-
<div
|
|
346
|
-
ref={ref}
|
|
347
|
-
data-sidebar="group"
|
|
348
|
-
className={cn("relative flex w-full min-w-0 flex-col p-2", className)}
|
|
349
|
-
{...props}
|
|
350
|
-
/>
|
|
351
|
-
);
|
|
352
|
-
});
|
|
353
|
-
SidebarGroup.displayName = "SidebarGroup";
|
|
354
|
-
|
|
355
|
-
const SidebarGroupLabel = React.forwardRef<HTMLDivElement, React.ComponentProps<"div"> & { asChild?: boolean }>(
|
|
356
|
-
({ className, asChild = false, ...props }, ref) => {
|
|
357
|
-
const Comp = asChild ? Slot : "div";
|
|
358
|
-
|
|
359
|
-
return (
|
|
360
|
-
<Comp
|
|
361
|
-
ref={ref}
|
|
362
|
-
data-sidebar="group-label"
|
|
363
|
-
className={cn(
|
|
364
|
-
"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",
|
|
365
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
366
|
-
className,
|
|
367
|
-
)}
|
|
368
|
-
{...props}
|
|
369
|
-
/>
|
|
370
|
-
);
|
|
371
|
-
},
|
|
372
|
-
);
|
|
373
|
-
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
374
|
-
|
|
375
|
-
const SidebarGroupAction = React.forwardRef<HTMLButtonElement, React.ComponentProps<"button"> & { asChild?: boolean }>(
|
|
376
|
-
({ className, asChild = false, ...props }, ref) => {
|
|
377
|
-
const Comp = asChild ? Slot : "button";
|
|
378
|
-
|
|
379
|
-
return (
|
|
380
|
-
<Comp
|
|
381
|
-
ref={ref}
|
|
382
|
-
data-sidebar="group-action"
|
|
383
|
-
className={cn(
|
|
384
|
-
"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",
|
|
385
|
-
// Increases the hit area of the button on mobile.
|
|
386
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
387
|
-
"group-data-[collapsible=icon]:hidden",
|
|
388
|
-
className,
|
|
389
|
-
)}
|
|
390
|
-
{...props}
|
|
391
|
-
/>
|
|
392
|
-
);
|
|
393
|
-
},
|
|
394
|
-
);
|
|
395
|
-
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
396
|
-
|
|
397
|
-
const SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(
|
|
398
|
-
({ className, ...props }, ref) => (
|
|
399
|
-
<div ref={ref} data-sidebar="group-content" className={cn("w-full text-sm", className)} {...props} />
|
|
400
|
-
),
|
|
401
|
-
);
|
|
402
|
-
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
403
|
-
|
|
404
|
-
const SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(({ className, ...props }, ref) => (
|
|
405
|
-
<ul ref={ref} data-sidebar="menu" className={cn("flex w-full min-w-0 flex-col gap-1", className)} {...props} />
|
|
406
|
-
));
|
|
407
|
-
SidebarMenu.displayName = "SidebarMenu";
|
|
408
|
-
|
|
409
|
-
const SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({ className, ...props }, ref) => (
|
|
410
|
-
<li ref={ref} data-sidebar="menu-item" className={cn("group/menu-item relative", className)} {...props} />
|
|
411
|
-
));
|
|
412
|
-
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
413
|
-
|
|
414
|
-
const sidebarMenuButtonVariants = cva(
|
|
415
|
-
"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",
|
|
416
|
-
{
|
|
417
|
-
variants: {
|
|
418
|
-
variant: {
|
|
419
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
420
|
-
outline:
|
|
421
|
-
"bg-surface-primary shadow-[0_0_0_1px_var(--border-secondary)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--surface-action)]",
|
|
422
|
-
},
|
|
423
|
-
size: {
|
|
424
|
-
default: "h-8 text-sm",
|
|
425
|
-
sm: "h-7 text-xs",
|
|
426
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0",
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
defaultVariants: {
|
|
430
|
-
variant: "default",
|
|
431
|
-
size: "default",
|
|
432
|
-
},
|
|
433
|
-
},
|
|
434
|
-
);
|
|
435
|
-
|
|
436
|
-
const SidebarMenuButton = React.forwardRef<
|
|
437
|
-
HTMLButtonElement,
|
|
438
|
-
React.ComponentProps<"button"> & {
|
|
439
|
-
asChild?: boolean;
|
|
440
|
-
isActive?: boolean;
|
|
441
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
442
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>
|
|
443
|
-
>(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
444
|
-
const Comp = asChild ? Slot : "button";
|
|
445
|
-
const { isMobile, state } = useSidebar();
|
|
446
|
-
|
|
447
|
-
const button = (
|
|
448
|
-
<Comp
|
|
449
|
-
ref={ref}
|
|
450
|
-
data-sidebar="menu-button"
|
|
451
|
-
data-size={size}
|
|
452
|
-
data-active={isActive}
|
|
453
|
-
className={cn(sidebarMenuButtonVariants({ variant, size }), className)}
|
|
454
|
-
{...props}
|
|
455
|
-
/>
|
|
456
|
-
);
|
|
457
|
-
|
|
458
|
-
if (!tooltip) {
|
|
459
|
-
return button;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
if (typeof tooltip === "string") {
|
|
463
|
-
tooltip = {
|
|
464
|
-
children: tooltip,
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
return (
|
|
469
|
-
<Tooltip>
|
|
470
|
-
<TooltipTrigger asChild>{button}</TooltipTrigger>
|
|
471
|
-
<TooltipContent side="right" align="center" hidden={state !== "collapsed" || isMobile} {...tooltip} />
|
|
472
|
-
</Tooltip>
|
|
473
|
-
);
|
|
474
|
-
});
|
|
475
|
-
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
476
|
-
|
|
477
|
-
const SidebarMenuAction = React.forwardRef<
|
|
478
|
-
HTMLButtonElement,
|
|
479
|
-
React.ComponentProps<"button"> & {
|
|
480
|
-
asChild?: boolean;
|
|
481
|
-
showOnHover?: boolean;
|
|
482
|
-
}
|
|
483
|
-
>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
484
|
-
const Comp = asChild ? Slot : "button";
|
|
485
|
-
|
|
486
|
-
return (
|
|
487
|
-
<Comp
|
|
488
|
-
ref={ref}
|
|
489
|
-
data-sidebar="menu-action"
|
|
490
|
-
className={cn(
|
|
491
|
-
"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 peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
492
|
-
// Increases the hit area of the button on mobile.
|
|
493
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
494
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
495
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
496
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
497
|
-
"group-data-[collapsible=icon]:hidden",
|
|
498
|
-
showOnHover &&
|
|
499
|
-
"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",
|
|
500
|
-
className,
|
|
501
|
-
)}
|
|
502
|
-
{...props}
|
|
503
|
-
/>
|
|
504
|
-
);
|
|
505
|
-
});
|
|
506
|
-
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
507
|
-
|
|
508
|
-
const SidebarMenuBadge = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(
|
|
509
|
-
({ className, ...props }, ref) => (
|
|
510
|
-
<div
|
|
511
|
-
ref={ref}
|
|
512
|
-
data-sidebar="menu-badge"
|
|
513
|
-
className={cn(
|
|
514
|
-
"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",
|
|
515
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
516
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
517
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
518
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
519
|
-
"group-data-[collapsible=icon]:hidden",
|
|
520
|
-
className,
|
|
521
|
-
)}
|
|
522
|
-
{...props}
|
|
523
|
-
/>
|
|
524
|
-
),
|
|
525
|
-
);
|
|
526
|
-
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
527
|
-
|
|
528
|
-
const SidebarMenuSkeleton = React.forwardRef<
|
|
529
|
-
HTMLDivElement,
|
|
530
|
-
React.ComponentProps<"div"> & {
|
|
531
|
-
showIcon?: boolean;
|
|
532
|
-
}
|
|
533
|
-
>(({ className, showIcon = false, ...props }, ref) => {
|
|
534
|
-
// Random width between 50 to 90%.
|
|
535
|
-
const width = React.useMemo(() => {
|
|
536
|
-
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
537
|
-
}, []);
|
|
538
|
-
|
|
539
|
-
return (
|
|
540
|
-
<div
|
|
541
|
-
ref={ref}
|
|
542
|
-
data-sidebar="menu-skeleton"
|
|
543
|
-
className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)}
|
|
544
|
-
{...props}
|
|
545
|
-
>
|
|
546
|
-
{showIcon && <Skeleton className="size-4 rounded-md" data-sidebar="menu-skeleton-icon" />}
|
|
547
|
-
<Skeleton
|
|
548
|
-
className="h-4 max-w-[--skeleton-width] flex-1"
|
|
549
|
-
data-sidebar="menu-skeleton-text"
|
|
550
|
-
style={
|
|
551
|
-
{
|
|
552
|
-
"--skeleton-width": width,
|
|
553
|
-
} as React.CSSProperties
|
|
554
|
-
}
|
|
555
|
-
/>
|
|
556
|
-
</div>
|
|
557
|
-
);
|
|
558
|
-
});
|
|
559
|
-
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
560
|
-
|
|
561
|
-
const SidebarMenuSub = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(
|
|
562
|
-
({ className, ...props }, ref) => (
|
|
563
|
-
<ul
|
|
564
|
-
ref={ref}
|
|
565
|
-
data-sidebar="menu-sub"
|
|
566
|
-
className={cn(
|
|
567
|
-
"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",
|
|
568
|
-
"group-data-[collapsible=icon]:hidden",
|
|
569
|
-
className,
|
|
570
|
-
)}
|
|
571
|
-
{...props}
|
|
572
|
-
/>
|
|
573
|
-
),
|
|
574
|
-
);
|
|
575
|
-
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
576
|
-
|
|
577
|
-
const SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({ ...props }, ref) => (
|
|
578
|
-
<li ref={ref} {...props} />
|
|
579
|
-
));
|
|
580
|
-
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
581
|
-
|
|
582
|
-
const SidebarMenuSubButton = React.forwardRef<
|
|
583
|
-
HTMLAnchorElement,
|
|
584
|
-
React.ComponentProps<"a"> & {
|
|
585
|
-
asChild?: boolean;
|
|
586
|
-
size?: "sm" | "md";
|
|
587
|
-
isActive?: boolean;
|
|
588
|
-
}
|
|
589
|
-
>(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
590
|
-
const Comp = asChild ? Slot : "a";
|
|
591
|
-
|
|
592
|
-
return (
|
|
593
|
-
<Comp
|
|
594
|
-
ref={ref}
|
|
595
|
-
data-sidebar="menu-sub-button"
|
|
596
|
-
data-size={size}
|
|
597
|
-
data-active={isActive}
|
|
598
|
-
className={cn(
|
|
599
|
-
"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 aria-disabled:pointer-events-none aria-disabled:opacity-50 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
600
|
-
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
601
|
-
size === "sm" && "text-xs",
|
|
602
|
-
size === "md" && "text-sm",
|
|
603
|
-
"group-data-[collapsible=icon]:hidden",
|
|
604
|
-
className,
|
|
605
|
-
)}
|
|
606
|
-
{...props}
|
|
607
|
-
/>
|
|
608
|
-
);
|
|
609
|
-
});
|
|
610
|
-
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
611
|
-
|
|
612
|
-
export {
|
|
613
|
-
Sidebar,
|
|
614
|
-
SidebarContent,
|
|
615
|
-
SidebarFooter,
|
|
616
|
-
SidebarGroup,
|
|
617
|
-
SidebarGroupAction,
|
|
618
|
-
SidebarGroupContent,
|
|
619
|
-
SidebarGroupLabel,
|
|
620
|
-
SidebarHeader,
|
|
621
|
-
SidebarInput,
|
|
622
|
-
SidebarInset,
|
|
623
|
-
SidebarMenu,
|
|
624
|
-
SidebarMenuAction,
|
|
625
|
-
SidebarMenuBadge,
|
|
626
|
-
SidebarMenuButton,
|
|
627
|
-
SidebarMenuItem,
|
|
628
|
-
SidebarMenuSkeleton,
|
|
629
|
-
SidebarMenuSub,
|
|
630
|
-
SidebarMenuSubButton,
|
|
631
|
-
SidebarMenuSubItem,
|
|
632
|
-
SidebarProvider,
|
|
633
|
-
SidebarRail,
|
|
634
|
-
SidebarSeparator,
|
|
635
|
-
SidebarTrigger,
|
|
636
|
-
useSidebar,
|
|
637
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Skeleton } from './skeleton'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'v2/Shadcn/Skeleton',
|
|
6
|
-
component: Skeleton,
|
|
7
|
-
parameters: { layout: 'padded' },
|
|
8
|
-
} as Meta<typeof Skeleton>
|
|
9
|
-
|
|
10
|
-
type Story = StoryObj<typeof Skeleton>
|
|
11
|
-
|
|
12
|
-
export const Default: Story = { args: { className: 'h-4 w-48' } }
|
|
13
|
-
|
|
14
|
-
export const CardSkeleton: Story = {
|
|
15
|
-
render: () => (
|
|
16
|
-
<div className="flex flex-col gap-3 w-72">
|
|
17
|
-
<Skeleton className="h-32 w-full rounded-xl" />
|
|
18
|
-
<div className="space-y-2">
|
|
19
|
-
<Skeleton className="h-4 w-full" />
|
|
20
|
-
<Skeleton className="h-4 w-4/5" />
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
),
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const AvatarWithText: Story = {
|
|
27
|
-
render: () => (
|
|
28
|
-
<div className="flex items-center gap-3">
|
|
29
|
-
<Skeleton className="h-10 w-10 rounded-full" />
|
|
30
|
-
<div className="space-y-2">
|
|
31
|
-
<Skeleton className="h-4 w-32" />
|
|
32
|
-
<Skeleton className="h-3 w-24" />
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
),
|
|
36
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Slider } from './slider'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'v2/Shadcn/Slider',
|
|
6
|
-
component: Slider,
|
|
7
|
-
parameters: { layout: 'padded' },
|
|
8
|
-
} as Meta<typeof Slider>
|
|
9
|
-
|
|
10
|
-
type Story = StoryObj<typeof Slider>
|
|
11
|
-
|
|
12
|
-
export const Default: Story = { args: { defaultValue: [50], max: 100, step: 1, className: 'w-[60%]' } }
|
|
13
|
-
export const SmallStep: Story = { args: { defaultValue: [25], max: 100, step: 5, className: 'w-[60%]' } }
|
|
14
|
-
export const Disabled: Story = { args: { defaultValue: [50], max: 100, step: 1, disabled: true, className: 'w-[60%]' } }
|
|
15
|
-
export const LowValue: Story = { args: { defaultValue: [10], max: 100, step: 1, className: 'w-[60%]' } }
|
|
16
|
-
export const HighValue: Story = { args: { defaultValue: [90], max: 100, step: 1, className: 'w-[60%]' } }
|