@licklist/design 0.78.5-dev.107 → 0.78.5-dev.109
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/bitbucket-pipelines.yml +4 -13
- package/dist/Maintenance/Maintenance.scss.js +1 -1
- package/dist/index.js +2 -0
- package/dist/product-set/form/ProductsControl.d.ts +1 -2
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +24 -0
- 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 +2 -86
- 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 +11 -13
- 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/PeriodCard/PeriodCard.d.ts +66 -0
- package/dist/v2/components/PeriodCard/PeriodCard.d.ts.map +1 -0
- package/dist/v2/components/PeriodCard/PeriodCard.js +351 -0
- package/dist/v2/components/PeriodCard/PeriodCard.scss.js +6 -0
- package/dist/v2/components/PeriodCard/index.d.ts +3 -0
- package/dist/v2/components/PeriodCard/index.d.ts.map +1 -0
- package/dist/v2/components/ReorderRow/ReorderRow.d.ts +24 -0
- package/dist/v2/components/ReorderRow/ReorderRow.d.ts.map +1 -0
- package/dist/v2/components/ReorderRow/ReorderRow.js +109 -0
- package/dist/v2/components/ReorderRow/ReorderRow.scss.js +6 -0
- package/dist/v2/components/ReorderRow/index.d.ts +3 -0
- package/dist/v2/components/ReorderRow/index.d.ts.map +1 -0
- 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 +5 -8
- 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/components/index.d.ts +4 -0
- package/dist/v2/components/index.d.ts.map +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 +16 -1
- package/dist/v2/index.d.ts +8 -0
- 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 +5 -0
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +5 -0
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.scss.js +1 -1
- package/dist/v2/shadcn/components/ui/accordion.d.ts +8 -0
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +21 -0
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/alert.d.ts +9 -0
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/avatar.d.ts +7 -0
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/badge.d.ts +10 -0
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +20 -0
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/button.d.ts +14 -0
- package/dist/v2/shadcn/components/ui/button.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/calendar.d.ts +9 -0
- package/dist/v2/shadcn/components/ui/calendar.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/card.d.ts +9 -0
- package/dist/v2/shadcn/components/ui/card.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/carousel.d.ts +19 -0
- package/dist/v2/shadcn/components/ui/carousel.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/checkbox.js +115 -0
- package/dist/v2/shadcn/components/ui/checkbox.scss.js +6 -0
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/command.d.ts +83 -0
- package/dist/v2/shadcn/components/ui/command.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +28 -0
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/dialog.d.ts +20 -0
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/dialog.js +169 -0
- package/dist/v2/shadcn/components/ui/drawer.d.ts +23 -0
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/form.d.ts +24 -0
- package/dist/v2/shadcn/components/ui/form.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +7 -0
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +35 -0
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/input.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/input.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/label.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/label.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/menubar.d.ts +34 -0
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +13 -0
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/pagination.d.ts +29 -0
- package/dist/v2/shadcn/components/ui/pagination.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/popover.d.ts +7 -0
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/progress.d.ts +5 -0
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/radio-card.d.ts +12 -0
- package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/select.d.ts +14 -0
- package/dist/v2/shadcn/components/ui/select.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/separator.d.ts +5 -0
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/sheet.d.ts +26 -0
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +67 -0
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/skeleton.d.ts +3 -0
- package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/slider.d.ts +5 -0
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/switch.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/switch.js +115 -0
- package/dist/v2/shadcn/components/ui/switch.scss.js +6 -0
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts +11 -0
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/table.d.ts +11 -0
- package/dist/v2/shadcn/components/ui/table.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/tabs.d.ts +8 -0
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/textarea.d.ts +6 -0
- package/dist/v2/shadcn/components/ui/textarea.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/toast.d.ts +16 -0
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/toaster.d.ts +2 -0
- package/dist/v2/shadcn/components/ui/toaster.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +13 -0
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/toggle.d.ts +13 -0
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/tooltip.d.ts +8 -0
- package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +1 -0
- package/dist/v2/shadcn/components/ui/use-toast.d.ts +3 -0
- package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +1 -0
- package/dist/v2/shadcn/hooks/use-mobile.d.ts +2 -0
- package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +1 -0
- package/dist/v2/shadcn/hooks/use-toast.d.ts +45 -0
- package/dist/v2/shadcn/hooks/use-toast.d.ts.map +1 -0
- package/dist/v2/shadcn/index.d.ts +20 -0
- package/dist/v2/shadcn/index.d.ts.map +1 -0
- package/dist/v2/shadcn/lib/utils.d.ts +3 -0
- package/dist/v2/shadcn/lib/utils.d.ts.map +1 -0
- package/dist/v2/shadcn/lib/utils.js +11 -0
- package/dist/v2/shadcn/styles/globals.css +112 -0
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/package.json +6 -6
- package/rollup.config.js +2 -16
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
- package/src/product-set/form/ProductsControl.tsx +1 -2
- package/src/v2/components/DataTable/DataTable.tsx +1 -23
- package/src/v2/components/Modal/DeleteModal.tsx +20 -12
- package/src/v2/components/PeriodCard/PeriodCard.scss +157 -0
- package/src/v2/components/PeriodCard/PeriodCard.stories.tsx +245 -0
- package/src/v2/components/PeriodCard/PeriodCard.tsx +350 -0
- package/src/v2/components/PeriodCard/index.ts +8 -0
- package/src/v2/components/ReorderRow/ReorderRow.scss +68 -0
- package/src/v2/components/ReorderRow/ReorderRow.stories.tsx +124 -0
- package/src/v2/components/ReorderRow/ReorderRow.tsx +88 -0
- package/src/v2/components/ReorderRow/index.ts +2 -0
- package/src/v2/components/Toggle/Toggle.tsx +5 -6
- package/src/v2/components/index.ts +6 -0
- package/src/v2/index.ts +82 -0
- package/src/v2/shadcn/_reference/AccountManagerCard.tsx +45 -0
- package/src/v2/shadcn/_reference/AffiliatesTable.tsx +178 -0
- package/src/v2/shadcn/_reference/AuditArchive.tsx +165 -0
- package/src/v2/shadcn/_reference/AuditContent.tsx +270 -0
- package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +251 -0
- package/src/v2/shadcn/_reference/AvatarUpload.tsx +150 -0
- package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +268 -0
- package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +274 -0
- package/src/v2/shadcn/_reference/CompaniesTable.tsx +387 -0
- package/src/v2/shadcn/_reference/ComponentAudit.tsx +239 -0
- package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +95 -0
- package/src/v2/shadcn/_reference/CustomerCard.tsx +155 -0
- package/src/v2/shadcn/_reference/DashboardCards.tsx +50 -0
- package/src/v2/shadcn/_reference/DashboardFooter.tsx +18 -0
- package/src/v2/shadcn/_reference/DiarySettings.tsx +187 -0
- package/src/v2/shadcn/_reference/DiaryView.tsx +998 -0
- package/src/v2/shadcn/_reference/EmptyState.tsx +76 -0
- package/src/v2/shadcn/_reference/EntityInfoCard.tsx +48 -0
- package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +131 -0
- package/src/v2/shadcn/_reference/FeatureToggle.tsx +72 -0
- package/src/v2/shadcn/_reference/FlowCard.tsx +170 -0
- package/src/v2/shadcn/_reference/FlowsContent.tsx +688 -0
- package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +27 -0
- package/src/v2/shadcn/_reference/GeneralSettings.tsx +33 -0
- package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +82 -0
- package/src/v2/shadcn/_reference/LanguageSelector.tsx +97 -0
- package/src/v2/shadcn/_reference/LoadingScreen.tsx +25 -0
- package/src/v2/shadcn/_reference/LoadingSpinner.tsx +41 -0
- package/src/v2/shadcn/_reference/ManagedClientsList.tsx +121 -0
- package/src/v2/shadcn/_reference/NPSScore.tsx +379 -0
- package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +181 -0
- package/src/v2/shadcn/_reference/NotificationBanner.tsx +129 -0
- package/src/v2/shadcn/_reference/NotificationPanel.tsx +208 -0
- package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +73 -0
- package/src/v2/shadcn/_reference/ProtectedRoute.tsx +39 -0
- package/src/v2/shadcn/_reference/ProvidersTable.tsx +353 -0
- package/src/v2/shadcn/_reference/QuickAddPanel.tsx +1057 -0
- package/src/v2/shadcn/_reference/QuickFilters.tsx +112 -0
- package/src/v2/shadcn/_reference/ScheduleView.tsx +410 -0
- package/src/v2/shadcn/_reference/ScrollToTop.tsx +14 -0
- package/src/v2/shadcn/_reference/SecondaryNav.tsx +50 -0
- package/src/v2/shadcn/_reference/SecuritySettings.tsx +258 -0
- package/src/v2/shadcn/_reference/SessionDetailView.tsx +294 -0
- package/src/v2/shadcn/_reference/Sidebar.tsx +14 -0
- package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +30 -0
- package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +285 -0
- package/src/v2/shadcn/_reference/SimulationBanner.tsx +57 -0
- package/src/v2/shadcn/_reference/SortControls.tsx +65 -0
- package/src/v2/shadcn/_reference/StatusBadge.tsx +49 -0
- package/src/v2/shadcn/_reference/StyleGuideContent.tsx +331 -0
- package/src/v2/shadcn/_reference/TableActionMenu.tsx +126 -0
- package/src/v2/shadcn/_reference/ThemeProvider.tsx +119 -0
- package/src/v2/shadcn/_reference/ThemeSettings.tsx +73 -0
- package/src/v2/shadcn/_reference/TopNavigation.tsx +332 -0
- package/src/v2/shadcn/_reference/UserActivityHistory.tsx +209 -0
- package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +94 -0
- package/src/v2/shadcn/_reference/UserPanel.tsx +472 -0
- package/src/v2/shadcn/_reference/UsersTable.tsx +1023 -0
- package/src/v2/shadcn/_reference/WaiverForm.tsx +301 -0
- package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +46 -0
- package/src/v2/shadcn/_reference/WaiversTable.tsx +290 -0
- package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +416 -0
- package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +313 -0
- package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +36 -0
- package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +298 -0
- package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +40 -0
- package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +142 -0
- package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +55 -0
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +285 -0
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +20 -0
- package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +14 -0
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +205 -0
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +41 -0
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +102 -0
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +20 -0
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +95 -0
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +20 -0
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +119 -0
- package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +92 -0
- package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +64 -0
- package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +41 -0
- package/src/v2/shadcn/_reference/email/emailTemplateData.ts +53 -0
- package/src/v2/shadcn/_reference/emptyStateIcons.tsx +103 -0
- package/src/v2/shadcn/_reference/games/MazeGame.tsx +394 -0
- package/src/v2/shadcn/_reference/games/RunnerGame.tsx +497 -0
- package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +36 -0
- package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +31 -0
- package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +36 -0
- package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +401 -0
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +77 -0
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +218 -0
- package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +810 -0
- package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +152 -0
- package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +377 -0
- package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +213 -0
- package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +39 -0
- package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +184 -0
- package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +677 -0
- package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +40 -0
- package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +238 -0
- package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +131 -0
- package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +192 -0
- package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +342 -0
- package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +322 -0
- package/src/v2/shadcn/_reference/products/PricingSection.tsx +173 -0
- package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +353 -0
- package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +95 -0
- package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +140 -0
- package/src/v2/shadcn/_reference/products/productTypeConfig.ts +182 -0
- package/src/v2/shadcn/_reference/shared/BackButton.tsx +50 -0
- package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +18 -0
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +136 -0
- package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +18 -0
- package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +221 -0
- package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +108 -0
- package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +722 -0
- package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +68 -0
- package/src/v2/shadcn/_reference/tables/DataTable.tsx +221 -0
- package/src/v2/shadcn/_reference/tables/TableControls.tsx +94 -0
- package/src/v2/shadcn/_reference/tables/index.ts +3 -0
- package/src/v2/shadcn/_reference/tables/types.ts +79 -0
- package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +299 -0
- package/src/v2/shadcn/components/ui/accordion.stories.tsx +63 -0
- package/src/v2/shadcn/components/ui/accordion.tsx +52 -0
- package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +44 -0
- package/src/v2/shadcn/components/ui/alert-dialog.tsx +104 -0
- package/src/v2/shadcn/components/ui/alert.stories.tsx +44 -0
- package/src/v2/shadcn/components/ui/alert.tsx +43 -0
- package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +46 -0
- package/src/v2/shadcn/components/ui/aspect-ratio.tsx +5 -0
- package/src/v2/shadcn/components/ui/avatar.stories.tsx +39 -0
- package/src/v2/shadcn/components/ui/avatar.tsx +38 -0
- package/src/v2/shadcn/components/ui/badge.stories.tsx +17 -0
- package/src/v2/shadcn/components/ui/badge.tsx +30 -0
- package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +91 -0
- package/src/v2/shadcn/components/ui/breadcrumb.tsx +90 -0
- package/src/v2/shadcn/components/ui/button.stories.tsx +20 -0
- package/src/v2/shadcn/components/ui/button.tsx +60 -0
- package/src/v2/shadcn/components/ui/calendar.stories.tsx +61 -0
- package/src/v2/shadcn/components/ui/calendar.tsx +54 -0
- package/src/v2/shadcn/components/ui/card.stories.tsx +37 -0
- package/src/v2/shadcn/components/ui/card.tsx +43 -0
- package/src/v2/shadcn/components/ui/carousel.stories.tsx +92 -0
- package/src/v2/shadcn/components/ui/carousel.tsx +224 -0
- package/src/v2/shadcn/components/ui/checkbox.scss +38 -0
- package/src/v2/shadcn/components/ui/checkbox.stories.tsx +23 -0
- package/src/v2/shadcn/components/ui/checkbox.tsx +24 -0
- package/src/v2/shadcn/components/ui/collapsible.stories.tsx +59 -0
- package/src/v2/shadcn/components/ui/collapsible.tsx +9 -0
- package/src/v2/shadcn/components/ui/command.stories.tsx +70 -0
- package/src/v2/shadcn/components/ui/command.tsx +132 -0
- package/src/v2/shadcn/components/ui/context-menu.stories.tsx +72 -0
- package/src/v2/shadcn/components/ui/context-menu.tsx +178 -0
- package/src/v2/shadcn/components/ui/dialog.stories.tsx +67 -0
- package/src/v2/shadcn/components/ui/dialog.tsx +95 -0
- package/src/v2/shadcn/components/ui/drawer.stories.tsx +50 -0
- package/src/v2/shadcn/components/ui/drawer.tsx +87 -0
- package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +73 -0
- package/src/v2/shadcn/components/ui/dropdown-menu.tsx +179 -0
- package/src/v2/shadcn/components/ui/form.stories.tsx +105 -0
- package/src/v2/shadcn/components/ui/form.tsx +129 -0
- package/src/v2/shadcn/components/ui/hover-card.stories.tsx +35 -0
- package/src/v2/shadcn/components/ui/hover-card.tsx +27 -0
- package/src/v2/shadcn/components/ui/input-otp.stories.tsx +72 -0
- package/src/v2/shadcn/components/ui/input-otp.tsx +61 -0
- package/src/v2/shadcn/components/ui/input.stories.tsx +16 -0
- package/src/v2/shadcn/components/ui/input.tsx +25 -0
- package/src/v2/shadcn/components/ui/label.stories.tsx +13 -0
- package/src/v2/shadcn/components/ui/label.tsx +17 -0
- package/src/v2/shadcn/components/ui/menubar.stories.tsx +86 -0
- package/src/v2/shadcn/components/ui/menubar.tsx +207 -0
- package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +68 -0
- package/src/v2/shadcn/components/ui/navigation-menu.tsx +120 -0
- package/src/v2/shadcn/components/ui/pagination.stories.tsx +78 -0
- package/src/v2/shadcn/components/ui/pagination.tsx +81 -0
- package/src/v2/shadcn/components/ui/popover.stories.tsx +44 -0
- package/src/v2/shadcn/components/ui/popover.tsx +29 -0
- package/src/v2/shadcn/components/ui/progress.stories.tsx +17 -0
- package/src/v2/shadcn/components/ui/progress.tsx +23 -0
- package/src/v2/shadcn/components/ui/radio-card.stories.tsx +68 -0
- package/src/v2/shadcn/components/ui/radio-card.tsx +52 -0
- package/src/v2/shadcn/components/ui/radio-group.stories.tsx +77 -0
- package/src/v2/shadcn/components/ui/radio-group.tsx +35 -0
- package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +56 -0
- package/src/v2/shadcn/components/ui/scroll-area.tsx +38 -0
- package/src/v2/shadcn/components/ui/select.stories.tsx +60 -0
- package/src/v2/shadcn/components/ui/select.tsx +148 -0
- package/src/v2/shadcn/components/ui/separator.stories.tsx +30 -0
- package/src/v2/shadcn/components/ui/separator.tsx +20 -0
- package/src/v2/shadcn/components/ui/sheet.stories.tsx +115 -0
- package/src/v2/shadcn/components/ui/sheet.tsx +107 -0
- package/src/v2/shadcn/components/ui/sidebar.stories.tsx +167 -0
- package/src/v2/shadcn/components/ui/sidebar.tsx +637 -0
- package/src/v2/shadcn/components/ui/skeleton.stories.tsx +36 -0
- package/src/v2/shadcn/components/ui/skeleton.tsx +7 -0
- package/src/v2/shadcn/components/ui/slider.stories.tsx +16 -0
- package/src/v2/shadcn/components/ui/slider.tsx +23 -0
- package/src/v2/shadcn/components/ui/switch.scss +63 -0
- package/src/v2/shadcn/components/ui/switch.stories.tsx +23 -0
- package/src/v2/shadcn/components/ui/switch.tsx +24 -0
- package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +81 -0
- package/src/v2/shadcn/components/ui/table-pagination.tsx +61 -0
- package/src/v2/shadcn/components/ui/table.stories.tsx +40 -0
- package/src/v2/shadcn/components/ui/table.tsx +72 -0
- package/src/v2/shadcn/components/ui/tabs.stories.tsx +85 -0
- package/src/v2/shadcn/components/ui/tabs.tsx +53 -0
- package/src/v2/shadcn/components/ui/textarea.stories.tsx +15 -0
- package/src/v2/shadcn/components/ui/textarea.tsx +21 -0
- package/src/v2/shadcn/components/ui/toast.stories.tsx +77 -0
- package/src/v2/shadcn/components/ui/toast.tsx +111 -0
- package/src/v2/shadcn/components/ui/toaster.stories.tsx +46 -0
- package/src/v2/shadcn/components/ui/toaster.tsx +24 -0
- package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +95 -0
- package/src/v2/shadcn/components/ui/toggle-group.tsx +49 -0
- package/src/v2/shadcn/components/ui/toggle.stories.tsx +18 -0
- package/src/v2/shadcn/components/ui/toggle.tsx +37 -0
- package/src/v2/shadcn/components/ui/tooltip.stories.tsx +57 -0
- package/src/v2/shadcn/components/ui/tooltip.tsx +28 -0
- package/src/v2/shadcn/components/ui/use-toast.ts +3 -0
- package/src/v2/shadcn/hooks/use-mobile.tsx +19 -0
- package/src/v2/shadcn/hooks/use-toast.ts +184 -0
- package/src/v2/shadcn/index.ts +76 -0
- package/src/v2/shadcn/lib/utils.ts +6 -0
- package/src/v2/shadcn/styles/globals.css +112 -0
- package/.vscode/settings.json +0 -3
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import {
|
|
4
|
+
Menubar,
|
|
5
|
+
MenubarMenu,
|
|
6
|
+
MenubarTrigger,
|
|
7
|
+
MenubarContent,
|
|
8
|
+
MenubarItem,
|
|
9
|
+
MenubarSeparator,
|
|
10
|
+
MenubarShortcut,
|
|
11
|
+
MenubarCheckboxItem,
|
|
12
|
+
MenubarRadioGroup,
|
|
13
|
+
MenubarRadioItem,
|
|
14
|
+
MenubarSub,
|
|
15
|
+
MenubarSubContent,
|
|
16
|
+
MenubarSubTrigger,
|
|
17
|
+
} from './menubar'
|
|
18
|
+
|
|
19
|
+
function MenubarDefault() {
|
|
20
|
+
return (
|
|
21
|
+
<Menubar>
|
|
22
|
+
<MenubarMenu>
|
|
23
|
+
<MenubarTrigger>File</MenubarTrigger>
|
|
24
|
+
<MenubarContent>
|
|
25
|
+
<MenubarItem>
|
|
26
|
+
New Tab <MenubarShortcut>Cmd+T</MenubarShortcut>
|
|
27
|
+
</MenubarItem>
|
|
28
|
+
<MenubarItem>
|
|
29
|
+
New Window <MenubarShortcut>Cmd+N</MenubarShortcut>
|
|
30
|
+
</MenubarItem>
|
|
31
|
+
<MenubarSeparator />
|
|
32
|
+
<MenubarSub>
|
|
33
|
+
<MenubarSubTrigger>Share</MenubarSubTrigger>
|
|
34
|
+
<MenubarSubContent>
|
|
35
|
+
<MenubarItem>Email link</MenubarItem>
|
|
36
|
+
<MenubarItem>Messages</MenubarItem>
|
|
37
|
+
</MenubarSubContent>
|
|
38
|
+
</MenubarSub>
|
|
39
|
+
<MenubarSeparator />
|
|
40
|
+
<MenubarItem>
|
|
41
|
+
Print <MenubarShortcut>Cmd+P</MenubarShortcut>
|
|
42
|
+
</MenubarItem>
|
|
43
|
+
</MenubarContent>
|
|
44
|
+
</MenubarMenu>
|
|
45
|
+
<MenubarMenu>
|
|
46
|
+
<MenubarTrigger>Edit</MenubarTrigger>
|
|
47
|
+
<MenubarContent>
|
|
48
|
+
<MenubarItem>
|
|
49
|
+
Undo <MenubarShortcut>Cmd+Z</MenubarShortcut>
|
|
50
|
+
</MenubarItem>
|
|
51
|
+
<MenubarItem>
|
|
52
|
+
Redo <MenubarShortcut>Shift+Cmd+Z</MenubarShortcut>
|
|
53
|
+
</MenubarItem>
|
|
54
|
+
<MenubarSeparator />
|
|
55
|
+
<MenubarItem>Cut</MenubarItem>
|
|
56
|
+
<MenubarItem>Copy</MenubarItem>
|
|
57
|
+
<MenubarItem>Paste</MenubarItem>
|
|
58
|
+
</MenubarContent>
|
|
59
|
+
</MenubarMenu>
|
|
60
|
+
<MenubarMenu>
|
|
61
|
+
<MenubarTrigger>View</MenubarTrigger>
|
|
62
|
+
<MenubarContent>
|
|
63
|
+
<MenubarCheckboxItem checked>Show Toolbar</MenubarCheckboxItem>
|
|
64
|
+
<MenubarCheckboxItem>Show Sidebar</MenubarCheckboxItem>
|
|
65
|
+
<MenubarSeparator />
|
|
66
|
+
<MenubarRadioGroup value="top">
|
|
67
|
+
<MenubarRadioItem value="top">Top</MenubarRadioItem>
|
|
68
|
+
<MenubarRadioItem value="bottom">Bottom</MenubarRadioItem>
|
|
69
|
+
</MenubarRadioGroup>
|
|
70
|
+
</MenubarContent>
|
|
71
|
+
</MenubarMenu>
|
|
72
|
+
</Menubar>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default {
|
|
77
|
+
title: 'v2/Shadcn/Menubar',
|
|
78
|
+
component: Menubar,
|
|
79
|
+
parameters: { layout: 'padded' },
|
|
80
|
+
} as Meta<typeof Menubar>
|
|
81
|
+
|
|
82
|
+
type Story = StoryObj<typeof Menubar>
|
|
83
|
+
|
|
84
|
+
export const Default: Story = {
|
|
85
|
+
render: () => React.createElement(MenubarDefault),
|
|
86
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
import { IconChevronRight, IconTick, IconRing } from "../../../icons";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
|
|
7
|
+
const MenubarMenu = MenubarPrimitive.Menu;
|
|
8
|
+
|
|
9
|
+
const MenubarGroup = MenubarPrimitive.Group;
|
|
10
|
+
|
|
11
|
+
const MenubarPortal = MenubarPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
const MenubarSub = MenubarPrimitive.Sub;
|
|
14
|
+
|
|
15
|
+
const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
16
|
+
|
|
17
|
+
const Menubar = React.forwardRef<
|
|
18
|
+
React.ElementRef<typeof MenubarPrimitive.Root>,
|
|
19
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
|
|
20
|
+
>(({ className, ...props }, ref) => (
|
|
21
|
+
<MenubarPrimitive.Root
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn("flex h-10 items-center space-x-1 rounded-md border border-border-primary bg-surface-primary p-1", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
));
|
|
27
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
28
|
+
|
|
29
|
+
const MenubarTrigger = React.forwardRef<
|
|
30
|
+
React.ElementRef<typeof MenubarPrimitive.Trigger>,
|
|
31
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
|
|
32
|
+
>(({ className, ...props }, ref) => (
|
|
33
|
+
<MenubarPrimitive.Trigger
|
|
34
|
+
ref={ref}
|
|
35
|
+
className={cn(
|
|
36
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[state=open]:bg-surface-primary-hover data-[state=open]:text-label-primary focus:bg-surface-primary-hover focus:text-label-primary",
|
|
37
|
+
className,
|
|
38
|
+
)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
));
|
|
42
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
43
|
+
|
|
44
|
+
const MenubarSubTrigger = React.forwardRef<
|
|
45
|
+
React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
|
|
46
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
|
|
47
|
+
inset?: boolean;
|
|
48
|
+
}
|
|
49
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
50
|
+
<MenubarPrimitive.SubTrigger
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn(
|
|
53
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-surface-primary-hover data-[state=open]:text-label-primary focus:bg-surface-primary-hover focus:text-label-primary",
|
|
54
|
+
inset && "pl-8",
|
|
55
|
+
className,
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
<IconChevronRight className="ml-auto h-4 w-4 fill-fill-primary" />
|
|
61
|
+
</MenubarPrimitive.SubTrigger>
|
|
62
|
+
));
|
|
63
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
64
|
+
|
|
65
|
+
const MenubarSubContent = React.forwardRef<
|
|
66
|
+
React.ElementRef<typeof MenubarPrimitive.SubContent>,
|
|
67
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
|
|
68
|
+
>(({ className, ...props }, ref) => (
|
|
69
|
+
<MenubarPrimitive.SubContent
|
|
70
|
+
ref={ref}
|
|
71
|
+
className={cn(
|
|
72
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-primary bg-surface-primary p-1 text-label-primary data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
73
|
+
className,
|
|
74
|
+
)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
));
|
|
78
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
79
|
+
|
|
80
|
+
const MenubarContent = React.forwardRef<
|
|
81
|
+
React.ElementRef<typeof MenubarPrimitive.Content>,
|
|
82
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
|
|
83
|
+
>(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (
|
|
84
|
+
<MenubarPrimitive.Portal>
|
|
85
|
+
<MenubarPrimitive.Content
|
|
86
|
+
ref={ref}
|
|
87
|
+
align={align}
|
|
88
|
+
alignOffset={alignOffset}
|
|
89
|
+
sideOffset={sideOffset}
|
|
90
|
+
className={cn(
|
|
91
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-md border border-border-primary bg-surface-primary p-1 text-label-primary shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
</MenubarPrimitive.Portal>
|
|
97
|
+
));
|
|
98
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
99
|
+
|
|
100
|
+
const MenubarItem = React.forwardRef<
|
|
101
|
+
React.ElementRef<typeof MenubarPrimitive.Item>,
|
|
102
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
|
|
103
|
+
inset?: boolean;
|
|
104
|
+
}
|
|
105
|
+
>(({ className, inset, ...props }, ref) => (
|
|
106
|
+
<MenubarPrimitive.Item
|
|
107
|
+
ref={ref}
|
|
108
|
+
className={cn(
|
|
109
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
|
|
110
|
+
inset && "pl-8",
|
|
111
|
+
className,
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
/>
|
|
115
|
+
));
|
|
116
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
117
|
+
|
|
118
|
+
const MenubarCheckboxItem = React.forwardRef<
|
|
119
|
+
React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
|
|
120
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
|
|
121
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
122
|
+
<MenubarPrimitive.CheckboxItem
|
|
123
|
+
ref={ref}
|
|
124
|
+
className={cn(
|
|
125
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
|
|
126
|
+
className,
|
|
127
|
+
)}
|
|
128
|
+
checked={checked}
|
|
129
|
+
{...props}
|
|
130
|
+
>
|
|
131
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
132
|
+
<MenubarPrimitive.ItemIndicator>
|
|
133
|
+
<IconTick className="h-4 w-4 fill-fill-primary" />
|
|
134
|
+
</MenubarPrimitive.ItemIndicator>
|
|
135
|
+
</span>
|
|
136
|
+
{children}
|
|
137
|
+
</MenubarPrimitive.CheckboxItem>
|
|
138
|
+
));
|
|
139
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
140
|
+
|
|
141
|
+
const MenubarRadioItem = React.forwardRef<
|
|
142
|
+
React.ElementRef<typeof MenubarPrimitive.RadioItem>,
|
|
143
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
|
|
144
|
+
>(({ className, children, ...props }, ref) => (
|
|
145
|
+
<MenubarPrimitive.RadioItem
|
|
146
|
+
ref={ref}
|
|
147
|
+
className={cn(
|
|
148
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
|
|
149
|
+
className,
|
|
150
|
+
)}
|
|
151
|
+
{...props}
|
|
152
|
+
>
|
|
153
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
154
|
+
<MenubarPrimitive.ItemIndicator>
|
|
155
|
+
<IconRing className="h-2 w-2 fill-current" />
|
|
156
|
+
</MenubarPrimitive.ItemIndicator>
|
|
157
|
+
</span>
|
|
158
|
+
{children}
|
|
159
|
+
</MenubarPrimitive.RadioItem>
|
|
160
|
+
));
|
|
161
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
162
|
+
|
|
163
|
+
const MenubarLabel = React.forwardRef<
|
|
164
|
+
React.ElementRef<typeof MenubarPrimitive.Label>,
|
|
165
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
|
|
166
|
+
inset?: boolean;
|
|
167
|
+
}
|
|
168
|
+
>(({ className, inset, ...props }, ref) => (
|
|
169
|
+
<MenubarPrimitive.Label
|
|
170
|
+
ref={ref}
|
|
171
|
+
className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
|
|
172
|
+
{...props}
|
|
173
|
+
/>
|
|
174
|
+
));
|
|
175
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
176
|
+
|
|
177
|
+
const MenubarSeparator = React.forwardRef<
|
|
178
|
+
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
179
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
|
|
180
|
+
>(({ className, ...props }, ref) => (
|
|
181
|
+
<MenubarPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border-primary", className)} {...props} />
|
|
182
|
+
));
|
|
183
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
184
|
+
|
|
185
|
+
const MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
186
|
+
return <span className={cn("ml-auto text-xs tracking-widest text-label-secondary", className)} {...props} />;
|
|
187
|
+
};
|
|
188
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
189
|
+
|
|
190
|
+
export {
|
|
191
|
+
Menubar,
|
|
192
|
+
MenubarMenu,
|
|
193
|
+
MenubarTrigger,
|
|
194
|
+
MenubarContent,
|
|
195
|
+
MenubarItem,
|
|
196
|
+
MenubarSeparator,
|
|
197
|
+
MenubarLabel,
|
|
198
|
+
MenubarCheckboxItem,
|
|
199
|
+
MenubarRadioGroup,
|
|
200
|
+
MenubarRadioItem,
|
|
201
|
+
MenubarPortal,
|
|
202
|
+
MenubarSubContent,
|
|
203
|
+
MenubarSubTrigger,
|
|
204
|
+
MenubarGroup,
|
|
205
|
+
MenubarSub,
|
|
206
|
+
MenubarShortcut,
|
|
207
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import {
|
|
4
|
+
NavigationMenu,
|
|
5
|
+
NavigationMenuList,
|
|
6
|
+
NavigationMenuItem,
|
|
7
|
+
NavigationMenuTrigger,
|
|
8
|
+
NavigationMenuContent,
|
|
9
|
+
NavigationMenuLink,
|
|
10
|
+
} from './navigation-menu'
|
|
11
|
+
|
|
12
|
+
function NavigationMenuDefault() {
|
|
13
|
+
return (
|
|
14
|
+
<NavigationMenu>
|
|
15
|
+
<NavigationMenuList>
|
|
16
|
+
<NavigationMenuItem>
|
|
17
|
+
<NavigationMenuTrigger>Getting started</NavigationMenuTrigger>
|
|
18
|
+
<NavigationMenuContent>
|
|
19
|
+
<div className="grid gap-3 p-4 w-[400px]">
|
|
20
|
+
<NavigationMenuLink href="#" className="block select-none rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-surface-primary-hover">
|
|
21
|
+
<div className="text-sm font-medium leading-none">Introduction</div>
|
|
22
|
+
<p className="line-clamp-2 text-sm leading-snug text-label-secondary mt-1">
|
|
23
|
+
Re-usable components built with Radix UI and Tailwind CSS.
|
|
24
|
+
</p>
|
|
25
|
+
</NavigationMenuLink>
|
|
26
|
+
<NavigationMenuLink href="#" className="block select-none rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-surface-primary-hover">
|
|
27
|
+
<div className="text-sm font-medium leading-none">Installation</div>
|
|
28
|
+
<p className="line-clamp-2 text-sm leading-snug text-label-secondary mt-1">
|
|
29
|
+
How to install dependencies and structure your app.
|
|
30
|
+
</p>
|
|
31
|
+
</NavigationMenuLink>
|
|
32
|
+
</div>
|
|
33
|
+
</NavigationMenuContent>
|
|
34
|
+
</NavigationMenuItem>
|
|
35
|
+
<NavigationMenuItem>
|
|
36
|
+
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
|
37
|
+
<NavigationMenuContent>
|
|
38
|
+
<div className="grid gap-3 p-4 w-[400px]">
|
|
39
|
+
<NavigationMenuLink href="#" className="block select-none rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-surface-primary-hover">
|
|
40
|
+
<div className="text-sm font-medium leading-none">Alert Dialog</div>
|
|
41
|
+
<p className="line-clamp-2 text-sm leading-snug text-label-secondary mt-1">
|
|
42
|
+
A modal dialog that interrupts the user.
|
|
43
|
+
</p>
|
|
44
|
+
</NavigationMenuLink>
|
|
45
|
+
</div>
|
|
46
|
+
</NavigationMenuContent>
|
|
47
|
+
</NavigationMenuItem>
|
|
48
|
+
<NavigationMenuItem>
|
|
49
|
+
<NavigationMenuLink href="#" className="block select-none rounded-md px-4 py-2 text-sm font-medium leading-none no-underline outline-none transition-colors hover:bg-surface-primary-hover">
|
|
50
|
+
Documentation
|
|
51
|
+
</NavigationMenuLink>
|
|
52
|
+
</NavigationMenuItem>
|
|
53
|
+
</NavigationMenuList>
|
|
54
|
+
</NavigationMenu>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
title: 'v2/Shadcn/NavigationMenu',
|
|
60
|
+
component: NavigationMenu,
|
|
61
|
+
parameters: { layout: 'padded' },
|
|
62
|
+
} as Meta<typeof NavigationMenu>
|
|
63
|
+
|
|
64
|
+
type Story = StoryObj<typeof NavigationMenu>
|
|
65
|
+
|
|
66
|
+
export const Default: Story = {
|
|
67
|
+
render: () => React.createElement(NavigationMenuDefault),
|
|
68
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { IconChevronDown } from "../../../icons";
|
|
5
|
+
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
|
|
8
|
+
const NavigationMenu = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
|
|
11
|
+
>(({ className, children, ...props }, ref) => (
|
|
12
|
+
<NavigationMenuPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
{children}
|
|
18
|
+
<NavigationMenuViewport />
|
|
19
|
+
</NavigationMenuPrimitive.Root>
|
|
20
|
+
));
|
|
21
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
22
|
+
|
|
23
|
+
const NavigationMenuList = React.forwardRef<
|
|
24
|
+
React.ElementRef<typeof NavigationMenuPrimitive.List>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
|
|
26
|
+
>(({ className, ...props }, ref) => (
|
|
27
|
+
<NavigationMenuPrimitive.List
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn("group flex flex-1 list-none items-center justify-center space-x-1", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
33
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
34
|
+
|
|
35
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
36
|
+
|
|
37
|
+
const navigationMenuTriggerStyle = cva(
|
|
38
|
+
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-surface-primary px-4 py-2 text-sm font-medium transition-colors hover:bg-surface-primary-hover hover:text-label-primary focus:bg-surface-primary-hover focus:text-label-primary focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-surface-primary-hover/50 data-[state=open]:bg-surface-primary-hover/50",
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const NavigationMenuTrigger = React.forwardRef<
|
|
42
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
|
|
44
|
+
>(({ className, children, ...props }, ref) => (
|
|
45
|
+
<NavigationMenuPrimitive.Trigger
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}{" "}
|
|
51
|
+
<IconChevronDown
|
|
52
|
+
className="relative top-[1px] ml-1 h-3 w-3 fill-fill-primary transition duration-200 group-data-[state=open]:rotate-180"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
/>
|
|
55
|
+
</NavigationMenuPrimitive.Trigger>
|
|
56
|
+
));
|
|
57
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
58
|
+
|
|
59
|
+
const NavigationMenuContent = React.forwardRef<
|
|
60
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Content>,
|
|
61
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
|
|
62
|
+
>(({ className, ...props }, ref) => (
|
|
63
|
+
<NavigationMenuPrimitive.Content
|
|
64
|
+
ref={ref}
|
|
65
|
+
className={cn(
|
|
66
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",
|
|
67
|
+
className,
|
|
68
|
+
)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
));
|
|
72
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
73
|
+
|
|
74
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
75
|
+
|
|
76
|
+
const NavigationMenuViewport = React.forwardRef<
|
|
77
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
78
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
|
|
79
|
+
>(({ className, ...props }, ref) => (
|
|
80
|
+
<div className={cn("absolute left-0 top-full flex justify-center")}>
|
|
81
|
+
<NavigationMenuPrimitive.Viewport
|
|
82
|
+
className={cn(
|
|
83
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-border-primary bg-surface-primary text-label-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
84
|
+
className,
|
|
85
|
+
)}
|
|
86
|
+
ref={ref}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
));
|
|
91
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
92
|
+
|
|
93
|
+
const NavigationMenuIndicator = React.forwardRef<
|
|
94
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
|
|
95
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
|
|
96
|
+
>(({ className, ...props }, ref) => (
|
|
97
|
+
<NavigationMenuPrimitive.Indicator
|
|
98
|
+
ref={ref}
|
|
99
|
+
className={cn(
|
|
100
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
101
|
+
className,
|
|
102
|
+
)}
|
|
103
|
+
{...props}
|
|
104
|
+
>
|
|
105
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border-primary shadow-md" />
|
|
106
|
+
</NavigationMenuPrimitive.Indicator>
|
|
107
|
+
));
|
|
108
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
navigationMenuTriggerStyle,
|
|
112
|
+
NavigationMenu,
|
|
113
|
+
NavigationMenuList,
|
|
114
|
+
NavigationMenuItem,
|
|
115
|
+
NavigationMenuContent,
|
|
116
|
+
NavigationMenuTrigger,
|
|
117
|
+
NavigationMenuLink,
|
|
118
|
+
NavigationMenuIndicator,
|
|
119
|
+
NavigationMenuViewport,
|
|
120
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import {
|
|
4
|
+
Pagination,
|
|
5
|
+
PaginationContent,
|
|
6
|
+
PaginationItem,
|
|
7
|
+
PaginationLink,
|
|
8
|
+
PaginationNext,
|
|
9
|
+
PaginationPrevious,
|
|
10
|
+
PaginationEllipsis,
|
|
11
|
+
} from './pagination'
|
|
12
|
+
|
|
13
|
+
function PaginationDefault() {
|
|
14
|
+
return (
|
|
15
|
+
<Pagination>
|
|
16
|
+
<PaginationContent>
|
|
17
|
+
<PaginationItem>
|
|
18
|
+
<PaginationPrevious href="#" />
|
|
19
|
+
</PaginationItem>
|
|
20
|
+
<PaginationItem>
|
|
21
|
+
<PaginationLink href="#">1</PaginationLink>
|
|
22
|
+
</PaginationItem>
|
|
23
|
+
<PaginationItem>
|
|
24
|
+
<PaginationLink href="#" isActive>2</PaginationLink>
|
|
25
|
+
</PaginationItem>
|
|
26
|
+
<PaginationItem>
|
|
27
|
+
<PaginationLink href="#">3</PaginationLink>
|
|
28
|
+
</PaginationItem>
|
|
29
|
+
<PaginationItem>
|
|
30
|
+
<PaginationEllipsis />
|
|
31
|
+
</PaginationItem>
|
|
32
|
+
<PaginationItem>
|
|
33
|
+
<PaginationNext href="#" />
|
|
34
|
+
</PaginationItem>
|
|
35
|
+
</PaginationContent>
|
|
36
|
+
</Pagination>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function PaginationFirstPage() {
|
|
41
|
+
return (
|
|
42
|
+
<Pagination>
|
|
43
|
+
<PaginationContent>
|
|
44
|
+
<PaginationItem>
|
|
45
|
+
<PaginationPrevious href="#" />
|
|
46
|
+
</PaginationItem>
|
|
47
|
+
<PaginationItem>
|
|
48
|
+
<PaginationLink href="#" isActive>1</PaginationLink>
|
|
49
|
+
</PaginationItem>
|
|
50
|
+
<PaginationItem>
|
|
51
|
+
<PaginationLink href="#">2</PaginationLink>
|
|
52
|
+
</PaginationItem>
|
|
53
|
+
<PaginationItem>
|
|
54
|
+
<PaginationLink href="#">3</PaginationLink>
|
|
55
|
+
</PaginationItem>
|
|
56
|
+
<PaginationItem>
|
|
57
|
+
<PaginationNext href="#" />
|
|
58
|
+
</PaginationItem>
|
|
59
|
+
</PaginationContent>
|
|
60
|
+
</Pagination>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
title: 'v2/Shadcn/Pagination',
|
|
66
|
+
component: Pagination,
|
|
67
|
+
parameters: { layout: 'padded' },
|
|
68
|
+
} as Meta<typeof Pagination>
|
|
69
|
+
|
|
70
|
+
type Story = StoryObj<typeof Pagination>
|
|
71
|
+
|
|
72
|
+
export const Default: Story = {
|
|
73
|
+
render: () => React.createElement(PaginationDefault),
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const FirstPage: Story = {
|
|
77
|
+
render: () => React.createElement(PaginationFirstPage),
|
|
78
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { IconChevronLeft, IconChevronRight, IconThreeDots } from "../../../icons";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
import { ButtonProps, buttonVariants } from "./button";
|
|
6
|
+
|
|
7
|
+
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
8
|
+
<nav
|
|
9
|
+
role="navigation"
|
|
10
|
+
aria-label="pagination"
|
|
11
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
Pagination.displayName = "Pagination";
|
|
16
|
+
|
|
17
|
+
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(
|
|
18
|
+
({ className, ...props }, ref) => (
|
|
19
|
+
<ul ref={ref} className={cn("flex flex-row items-center gap-1", className)} {...props} />
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
PaginationContent.displayName = "PaginationContent";
|
|
23
|
+
|
|
24
|
+
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({ className, ...props }, ref) => (
|
|
25
|
+
<li ref={ref} className={cn("", className)} {...props} />
|
|
26
|
+
));
|
|
27
|
+
PaginationItem.displayName = "PaginationItem";
|
|
28
|
+
|
|
29
|
+
type PaginationLinkProps = {
|
|
30
|
+
isActive?: boolean;
|
|
31
|
+
} & Pick<ButtonProps, "size"> &
|
|
32
|
+
React.ComponentProps<"a">;
|
|
33
|
+
|
|
34
|
+
const PaginationLink = ({ className, isActive, size = "icon", ...props }: PaginationLinkProps) => (
|
|
35
|
+
<a
|
|
36
|
+
aria-current={isActive ? "page" : undefined}
|
|
37
|
+
className={cn(
|
|
38
|
+
buttonVariants({
|
|
39
|
+
variant: isActive ? "outline" : "ghost",
|
|
40
|
+
size,
|
|
41
|
+
}),
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
PaginationLink.displayName = "PaginationLink";
|
|
48
|
+
|
|
49
|
+
const PaginationPrevious = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
50
|
+
<PaginationLink aria-label="Go to previous page" size="default" className={cn("gap-1 pl-2.5", className)} {...props}>
|
|
51
|
+
<IconChevronLeft className="h-4 w-4 fill-fill-primary" />
|
|
52
|
+
<span>Previous</span>
|
|
53
|
+
</PaginationLink>
|
|
54
|
+
);
|
|
55
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
56
|
+
|
|
57
|
+
const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
58
|
+
<PaginationLink aria-label="Go to next page" size="default" className={cn("gap-1 pr-2.5", className)} {...props}>
|
|
59
|
+
<span>Next</span>
|
|
60
|
+
<IconChevronRight className="h-4 w-4 fill-fill-primary" />
|
|
61
|
+
</PaginationLink>
|
|
62
|
+
);
|
|
63
|
+
PaginationNext.displayName = "PaginationNext";
|
|
64
|
+
|
|
65
|
+
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
|
|
66
|
+
<span aria-hidden className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
|
|
67
|
+
<IconThreeDots className="h-4 w-4 fill-fill-primary" />
|
|
68
|
+
<span className="sr-only">More pages</span>
|
|
69
|
+
</span>
|
|
70
|
+
);
|
|
71
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
Pagination,
|
|
75
|
+
PaginationContent,
|
|
76
|
+
PaginationEllipsis,
|
|
77
|
+
PaginationItem,
|
|
78
|
+
PaginationLink,
|
|
79
|
+
PaginationNext,
|
|
80
|
+
PaginationPrevious,
|
|
81
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import { Popover, PopoverTrigger, PopoverContent } from './popover'
|
|
4
|
+
import { Button } from './button'
|
|
5
|
+
|
|
6
|
+
function PopoverDefault() {
|
|
7
|
+
return (
|
|
8
|
+
<Popover>
|
|
9
|
+
<PopoverTrigger asChild>
|
|
10
|
+
<Button variant="outline">Open popover</Button>
|
|
11
|
+
</PopoverTrigger>
|
|
12
|
+
<PopoverContent>
|
|
13
|
+
<div className="grid gap-4">
|
|
14
|
+
<div className="space-y-2">
|
|
15
|
+
<h4 className="font-medium leading-none">Dimensions</h4>
|
|
16
|
+
<p className="text-sm text-label-secondary">Set the dimensions for the layer.</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div className="grid gap-2">
|
|
19
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
20
|
+
<span className="text-sm">Width</span>
|
|
21
|
+
<span className="col-span-2 text-sm text-label-secondary">100%</span>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
24
|
+
<span className="text-sm">Height</span>
|
|
25
|
+
<span className="col-span-2 text-sm text-label-secondary">25px</span>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</PopoverContent>
|
|
30
|
+
</Popover>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
title: 'v2/Shadcn/Popover',
|
|
36
|
+
component: Popover,
|
|
37
|
+
parameters: { layout: 'centered' },
|
|
38
|
+
} as Meta<typeof Popover>
|
|
39
|
+
|
|
40
|
+
type Story = StoryObj<typeof Popover>
|
|
41
|
+
|
|
42
|
+
export const Default: Story = {
|
|
43
|
+
render: () => React.createElement(PopoverDefault),
|
|
44
|
+
}
|