@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,299 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Input } from '../ui/input';
|
|
3
|
-
import { Label } from '../ui/label';
|
|
4
|
-
import { Textarea } from '../ui/textarea';
|
|
5
|
-
import { RadioGroup } from '../ui/radio-group';
|
|
6
|
-
import { RadioCard } from '../ui/radio-card';
|
|
7
|
-
import { Switch } from '../ui/switch';
|
|
8
|
-
import { Button } from '../ui/button';
|
|
9
|
-
import { Checkbox } from '../ui/checkbox';
|
|
10
|
-
import { useAppSettings } from '@/contexts/AppSettingsContext';
|
|
11
|
-
import { IconPlus, IconDelete } from '../../../icons';
|
|
12
|
-
|
|
13
|
-
const DAY_OPTIONS = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
14
|
-
|
|
15
|
-
export interface StartTimePeriod {
|
|
16
|
-
intervalMinutes: string;
|
|
17
|
-
fromTime: string;
|
|
18
|
-
toTime: string;
|
|
19
|
-
days?: string[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface LegacyZoneSettingsData {
|
|
23
|
-
zoneType: string;
|
|
24
|
-
avgResourceCapacity: string;
|
|
25
|
-
avgSlotDuration: string;
|
|
26
|
-
zoneServiceTime: string;
|
|
27
|
-
description: string;
|
|
28
|
-
sameStartTimesEveryDay: boolean;
|
|
29
|
-
startTimePeriods: StartTimePeriod[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface LegacyZoneSettingsProps {
|
|
33
|
-
data: LegacyZoneSettingsData;
|
|
34
|
-
onChange: (data: LegacyZoneSettingsData) => void;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const LegacyZoneSettings: React.FC<LegacyZoneSettingsProps> = ({ data, onChange }) => {
|
|
38
|
-
const { settings } = useAppSettings();
|
|
39
|
-
|
|
40
|
-
if (!settings.legacySystemEnabled) return null;
|
|
41
|
-
|
|
42
|
-
const update = (partial: Partial<LegacyZoneSettingsData>) => {
|
|
43
|
-
onChange({ ...data, ...partial });
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const addPeriod = () => {
|
|
47
|
-
update({
|
|
48
|
-
startTimePeriods: [
|
|
49
|
-
...data.startTimePeriods,
|
|
50
|
-
{ intervalMinutes: '15', fromTime: '09:00', toTime: '17:00', days: data.sameStartTimesEveryDay ? undefined : [] },
|
|
51
|
-
],
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const removePeriod = (index: number) => {
|
|
56
|
-
update({
|
|
57
|
-
startTimePeriods: data.startTimePeriods.filter((_, i) => i !== index),
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const updatePeriod = (index: number, partial: Partial<StartTimePeriod>) => {
|
|
62
|
-
const updated = data.startTimePeriods.map((p, i) =>
|
|
63
|
-
i === index ? { ...p, ...partial } : p
|
|
64
|
-
);
|
|
65
|
-
update({ startTimePeriods: updated });
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const togglePeriodDay = (index: number, day: string) => {
|
|
69
|
-
const period = data.startTimePeriods[index];
|
|
70
|
-
const currentDays = period.days || [];
|
|
71
|
-
const updatedDays = currentDays.includes(day)
|
|
72
|
-
? currentDays.filter(d => d !== day)
|
|
73
|
-
: [...currentDays, day];
|
|
74
|
-
updatePeriod(index, { days: updatedDays });
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const getPeriodsOrDefault = () => {
|
|
78
|
-
if (data.startTimePeriods.length > 0) return data.startTimePeriods;
|
|
79
|
-
const defaultPeriods = [{ intervalMinutes: '15', fromTime: '09:00', toTime: '17:00', days: data.sameStartTimesEveryDay ? undefined : [] as string[] }];
|
|
80
|
-
// Sync default to parent state
|
|
81
|
-
onChange({ ...data, startTimePeriods: defaultPeriods });
|
|
82
|
-
return defaultPeriods;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<>
|
|
87
|
-
{/* Legacy Settings Section */}
|
|
88
|
-
<div className="flex flex-col gap-6">
|
|
89
|
-
<div className="flex flex-col gap-1">
|
|
90
|
-
<h2 className="text-label-primary text-xl font-semibold">Legacy Settings</h2>
|
|
91
|
-
<p className="text-label-secondary text-sm">Configuration for legacy system integration</p>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
{/* Zone Type */}
|
|
96
|
-
<div className="flex flex-col gap-2">
|
|
97
|
-
<Label className="text-sm font-semibold">Zone Type</Label>
|
|
98
|
-
<RadioGroup
|
|
99
|
-
value={data.zoneType}
|
|
100
|
-
onValueChange={(value) => update({ zoneType: value })}
|
|
101
|
-
className="flex flex-col gap-1"
|
|
102
|
-
>
|
|
103
|
-
<RadioCard
|
|
104
|
-
value="regular"
|
|
105
|
-
id="zone-type-regular"
|
|
106
|
-
title="Regular"
|
|
107
|
-
subtitle="Standard zone configuration"
|
|
108
|
-
/>
|
|
109
|
-
<RadioCard
|
|
110
|
-
value="bowling"
|
|
111
|
-
id="zone-type-bowling"
|
|
112
|
-
title="Bowling"
|
|
113
|
-
subtitle="Bowling-specific zone configuration"
|
|
114
|
-
/>
|
|
115
|
-
</RadioGroup>
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
{/* Average Resource Capacity */}
|
|
119
|
-
<div className="flex flex-col gap-2">
|
|
120
|
-
<Label htmlFor="avgResourceCapacity">Average Resource Capacity</Label>
|
|
121
|
-
<Input
|
|
122
|
-
id="avgResourceCapacity"
|
|
123
|
-
type="number"
|
|
124
|
-
value={data.avgResourceCapacity}
|
|
125
|
-
onChange={(e) => update({ avgResourceCapacity: e.target.value })}
|
|
126
|
-
/>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
{/* Average Slot Duration */}
|
|
130
|
-
<div className="flex flex-col gap-2">
|
|
131
|
-
<Label htmlFor="avgSlotDuration">Average Slot Duration</Label>
|
|
132
|
-
<Input
|
|
133
|
-
id="avgSlotDuration"
|
|
134
|
-
type="number"
|
|
135
|
-
value={data.avgSlotDuration}
|
|
136
|
-
onChange={(e) => update({ avgSlotDuration: e.target.value })}
|
|
137
|
-
/>
|
|
138
|
-
<span className="text-label-secondary text-xs">Duration in minutes</span>
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
{/* Service Time */}
|
|
142
|
-
<div className="flex flex-col gap-2">
|
|
143
|
-
<Label htmlFor="zoneServiceTime">Service Time</Label>
|
|
144
|
-
<Input
|
|
145
|
-
id="zoneServiceTime"
|
|
146
|
-
type="number"
|
|
147
|
-
value={data.zoneServiceTime}
|
|
148
|
-
onChange={(e) => update({ zoneServiceTime: e.target.value })}
|
|
149
|
-
/>
|
|
150
|
-
<span className="text-label-secondary text-xs">Service time in minutes</span>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
{/* Description */}
|
|
154
|
-
<div className="flex flex-col gap-2">
|
|
155
|
-
<div className="flex items-center justify-between">
|
|
156
|
-
<Label htmlFor="legacyDescription">Description</Label>
|
|
157
|
-
<span className="text-label-secondary text-xs">(optional)</span>
|
|
158
|
-
</div>
|
|
159
|
-
<Textarea
|
|
160
|
-
id="legacyDescription"
|
|
161
|
-
value={data.description}
|
|
162
|
-
onChange={(e) => update({ description: e.target.value })}
|
|
163
|
-
rows={3}
|
|
164
|
-
/>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
{/* Start Times */}
|
|
168
|
-
<div className="flex flex-col gap-1">
|
|
169
|
-
<Label className="text-sm font-semibold">Start Times</Label>
|
|
170
|
-
<p className="text-label-secondary text-sm">Configure session start time intervals</p>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<label className="flex items-center gap-2 cursor-pointer">
|
|
174
|
-
<Switch
|
|
175
|
-
checked={data.sameStartTimesEveryDay}
|
|
176
|
-
onCheckedChange={(checked) => {
|
|
177
|
-
const periods = getPeriodsOrDefault().map(p => ({
|
|
178
|
-
...p,
|
|
179
|
-
days: checked ? undefined : (p.days || []),
|
|
180
|
-
}));
|
|
181
|
-
update({
|
|
182
|
-
sameStartTimesEveryDay: checked,
|
|
183
|
-
startTimePeriods: periods,
|
|
184
|
-
});
|
|
185
|
-
}}
|
|
186
|
-
/>
|
|
187
|
-
<span className="text-sm font-medium leading-none">Same start times every day</span>
|
|
188
|
-
</label>
|
|
189
|
-
|
|
190
|
-
<div className="flex flex-col gap-4">
|
|
191
|
-
{getPeriodsOrDefault().map((period, index) => (
|
|
192
|
-
<div key={index} className="flex flex-col gap-3 p-4 rounded-lg bg-surface-secondary">
|
|
193
|
-
<div className="flex items-center justify-between">
|
|
194
|
-
<span className="text-label-primary text-sm font-semibold">Period {index + 1}</span>
|
|
195
|
-
{data.startTimePeriods.length > 1 && (
|
|
196
|
-
<Button
|
|
197
|
-
type="button"
|
|
198
|
-
variant="ghost"
|
|
199
|
-
size="icon"
|
|
200
|
-
onClick={() => removePeriod(index)}
|
|
201
|
-
className="h-8 w-8 bg-surface-danger-soft border-transparent hover:!bg-surface-danger-soft-hover [&_path]:fill-fill-danger"
|
|
202
|
-
>
|
|
203
|
-
<IconDelete className="w-4 h-4" />
|
|
204
|
-
</Button>
|
|
205
|
-
)}
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<div className="flex flex-col gap-2">
|
|
209
|
-
<Label>Sessions every</Label>
|
|
210
|
-
<div className="flex items-center gap-2">
|
|
211
|
-
<Input
|
|
212
|
-
type="number"
|
|
213
|
-
min={5}
|
|
214
|
-
value={period.intervalMinutes}
|
|
215
|
-
onChange={(e) => updatePeriod(index, { intervalMinutes: e.target.value })}
|
|
216
|
-
className="w-24"
|
|
217
|
-
/>
|
|
218
|
-
<span className="text-label-secondary text-sm">minutes</span>
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<div className="grid grid-cols-2 gap-4">
|
|
223
|
-
<div className="flex flex-col gap-2">
|
|
224
|
-
<Label>From</Label>
|
|
225
|
-
<Input
|
|
226
|
-
type="time"
|
|
227
|
-
value={period.fromTime}
|
|
228
|
-
onChange={(e) => updatePeriod(index, { fromTime: e.target.value })}
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
<div className="flex flex-col gap-2">
|
|
232
|
-
<Label>To</Label>
|
|
233
|
-
<Input
|
|
234
|
-
type="time"
|
|
235
|
-
value={period.toTime}
|
|
236
|
-
onChange={(e) => updatePeriod(index, { toTime: e.target.value })}
|
|
237
|
-
/>
|
|
238
|
-
</div>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
{/* Day checkboxes when not same every day */}
|
|
242
|
-
{!data.sameStartTimesEveryDay && (
|
|
243
|
-
<div className="flex flex-col gap-2">
|
|
244
|
-
<Label className="text-sm font-semibold">Days</Label>
|
|
245
|
-
<div className="grid grid-cols-2 gap-2">
|
|
246
|
-
<div className="flex flex-col gap-2">
|
|
247
|
-
{DAY_OPTIONS.slice(0, 4).map(day => (
|
|
248
|
-
<label key={day} className="flex items-center gap-1.5">
|
|
249
|
-
<Checkbox
|
|
250
|
-
checked={(period.days || []).includes(day)}
|
|
251
|
-
onCheckedChange={() => togglePeriodDay(index, day)}
|
|
252
|
-
/>
|
|
253
|
-
<span className="text-label-primary text-sm">{day}</span>
|
|
254
|
-
</label>
|
|
255
|
-
))}
|
|
256
|
-
</div>
|
|
257
|
-
<div className="flex flex-col gap-2">
|
|
258
|
-
{DAY_OPTIONS.slice(4).map(day => (
|
|
259
|
-
<label key={day} className="flex items-center gap-1.5">
|
|
260
|
-
<Checkbox
|
|
261
|
-
checked={(period.days || []).includes(day)}
|
|
262
|
-
onCheckedChange={() => togglePeriodDay(index, day)}
|
|
263
|
-
/>
|
|
264
|
-
<span className="text-label-primary text-sm">{day}</span>
|
|
265
|
-
</label>
|
|
266
|
-
))}
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
)}
|
|
271
|
-
</div>
|
|
272
|
-
))}
|
|
273
|
-
|
|
274
|
-
<Button
|
|
275
|
-
type="button"
|
|
276
|
-
variant="ghost"
|
|
277
|
-
withIcon
|
|
278
|
-
onClick={addPeriod}
|
|
279
|
-
className="self-start"
|
|
280
|
-
>
|
|
281
|
-
<IconPlus size={16} />
|
|
282
|
-
Add Time Period
|
|
283
|
-
</Button>
|
|
284
|
-
</div>
|
|
285
|
-
</>
|
|
286
|
-
);
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export const getDefaultLegacyData = (): LegacyZoneSettingsData => ({
|
|
290
|
-
zoneType: 'regular',
|
|
291
|
-
avgResourceCapacity: '',
|
|
292
|
-
avgSlotDuration: '',
|
|
293
|
-
zoneServiceTime: '',
|
|
294
|
-
description: '',
|
|
295
|
-
sameStartTimesEveryDay: true,
|
|
296
|
-
startTimePeriods: [{ intervalMinutes: '15', fromTime: '09:00', toTime: '17:00' }],
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
export default LegacyZoneSettings;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'v2/Shadcn/Accordion',
|
|
6
|
-
component: Accordion,
|
|
7
|
-
parameters: { layout: 'padded' },
|
|
8
|
-
} as Meta<typeof Accordion>
|
|
9
|
-
|
|
10
|
-
type Story = StoryObj<typeof Accordion>
|
|
11
|
-
|
|
12
|
-
export const Default: Story = {
|
|
13
|
-
render: () => (
|
|
14
|
-
<Accordion type="single" collapsible className="w-full max-w-md">
|
|
15
|
-
<AccordionItem value="item-1">
|
|
16
|
-
<AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
17
|
-
<AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
|
|
18
|
-
</AccordionItem>
|
|
19
|
-
<AccordionItem value="item-2">
|
|
20
|
-
<AccordionTrigger>Is it styled?</AccordionTrigger>
|
|
21
|
-
<AccordionContent>Yes. It comes with default styles that match your design system.</AccordionContent>
|
|
22
|
-
</AccordionItem>
|
|
23
|
-
<AccordionItem value="item-3">
|
|
24
|
-
<AccordionTrigger>Is it animated?</AccordionTrigger>
|
|
25
|
-
<AccordionContent>Yes. It uses CSS animations for smooth open/close transitions.</AccordionContent>
|
|
26
|
-
</AccordionItem>
|
|
27
|
-
</Accordion>
|
|
28
|
-
),
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const Multiple: Story = {
|
|
32
|
-
render: () => (
|
|
33
|
-
<Accordion type="multiple" className="w-full max-w-md">
|
|
34
|
-
<AccordionItem value="item-1">
|
|
35
|
-
<AccordionTrigger>First section</AccordionTrigger>
|
|
36
|
-
<AccordionContent>Content for the first section.</AccordionContent>
|
|
37
|
-
</AccordionItem>
|
|
38
|
-
<AccordionItem value="item-2">
|
|
39
|
-
<AccordionTrigger>Second section</AccordionTrigger>
|
|
40
|
-
<AccordionContent>Content for the second section.</AccordionContent>
|
|
41
|
-
</AccordionItem>
|
|
42
|
-
<AccordionItem value="item-3">
|
|
43
|
-
<AccordionTrigger>Third section</AccordionTrigger>
|
|
44
|
-
<AccordionContent>Content for the third section.</AccordionContent>
|
|
45
|
-
</AccordionItem>
|
|
46
|
-
</Accordion>
|
|
47
|
-
),
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const DefaultOpen: Story = {
|
|
51
|
-
render: () => (
|
|
52
|
-
<Accordion type="single" collapsible defaultValue="item-1" className="w-full max-w-md">
|
|
53
|
-
<AccordionItem value="item-1">
|
|
54
|
-
<AccordionTrigger>Open by default</AccordionTrigger>
|
|
55
|
-
<AccordionContent>This accordion item is open by default.</AccordionContent>
|
|
56
|
-
</AccordionItem>
|
|
57
|
-
<AccordionItem value="item-2">
|
|
58
|
-
<AccordionTrigger>Closed by default</AccordionTrigger>
|
|
59
|
-
<AccordionContent>This accordion item starts closed.</AccordionContent>
|
|
60
|
-
</AccordionItem>
|
|
61
|
-
</Accordion>
|
|
62
|
-
),
|
|
63
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
import { IconChevronDown } from "../../../icons";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const Accordion = AccordionPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const AccordionItem = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
12
|
-
>(({ className, ...props }, ref) => (
|
|
13
|
-
<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
|
|
14
|
-
));
|
|
15
|
-
AccordionItem.displayName = "AccordionItem";
|
|
16
|
-
|
|
17
|
-
const AccordionTrigger = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
20
|
-
>(({ className, children, ...props }, ref) => (
|
|
21
|
-
<AccordionPrimitive.Header className="flex">
|
|
22
|
-
<AccordionPrimitive.Trigger
|
|
23
|
-
ref={ref}
|
|
24
|
-
className={cn(
|
|
25
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
26
|
-
className,
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
>
|
|
30
|
-
{children}
|
|
31
|
-
<IconChevronDown className="h-4 w-4 shrink-0 fill-fill-primary transition-transform duration-200" />
|
|
32
|
-
</AccordionPrimitive.Trigger>
|
|
33
|
-
</AccordionPrimitive.Header>
|
|
34
|
-
));
|
|
35
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
36
|
-
|
|
37
|
-
const AccordionContent = React.forwardRef<
|
|
38
|
-
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
39
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
40
|
-
>(({ className, children, ...props }, ref) => (
|
|
41
|
-
<AccordionPrimitive.Content
|
|
42
|
-
ref={ref}
|
|
43
|
-
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
47
|
-
</AccordionPrimitive.Content>
|
|
48
|
-
));
|
|
49
|
-
|
|
50
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
51
|
-
|
|
52
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import {
|
|
3
|
-
AlertDialog,
|
|
4
|
-
AlertDialogTrigger,
|
|
5
|
-
AlertDialogContent,
|
|
6
|
-
AlertDialogHeader,
|
|
7
|
-
AlertDialogFooter,
|
|
8
|
-
AlertDialogTitle,
|
|
9
|
-
AlertDialogDescription,
|
|
10
|
-
AlertDialogAction,
|
|
11
|
-
AlertDialogCancel,
|
|
12
|
-
} from './alert-dialog'
|
|
13
|
-
import { Button } from './button'
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
title: 'v2/Shadcn/AlertDialog',
|
|
17
|
-
component: AlertDialog,
|
|
18
|
-
parameters: { layout: 'padded' },
|
|
19
|
-
} as Meta<typeof AlertDialog>
|
|
20
|
-
|
|
21
|
-
type Story = StoryObj<typeof AlertDialog>
|
|
22
|
-
|
|
23
|
-
export const Default: Story = {
|
|
24
|
-
render: () => (
|
|
25
|
-
<AlertDialog>
|
|
26
|
-
<AlertDialogTrigger asChild>
|
|
27
|
-
<Button variant="outline">Delete Account</Button>
|
|
28
|
-
</AlertDialogTrigger>
|
|
29
|
-
<AlertDialogContent>
|
|
30
|
-
<AlertDialogHeader>
|
|
31
|
-
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
|
32
|
-
<AlertDialogDescription>
|
|
33
|
-
This action cannot be undone. This will permanently delete your account and remove your data from our
|
|
34
|
-
servers.
|
|
35
|
-
</AlertDialogDescription>
|
|
36
|
-
</AlertDialogHeader>
|
|
37
|
-
<AlertDialogFooter>
|
|
38
|
-
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
39
|
-
<AlertDialogAction>Continue</AlertDialogAction>
|
|
40
|
-
</AlertDialogFooter>
|
|
41
|
-
</AlertDialogContent>
|
|
42
|
-
</AlertDialog>
|
|
43
|
-
),
|
|
44
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { buttonVariants } from "./button";
|
|
6
|
-
|
|
7
|
-
const AlertDialog = AlertDialogPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
|
-
|
|
11
|
-
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
12
|
-
|
|
13
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
16
|
-
>(({ className, ...props }, ref) => (
|
|
17
|
-
<AlertDialogPrimitive.Overlay
|
|
18
|
-
className={cn(
|
|
19
|
-
"fixed inset-0 z-50 bg-shade-darker/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
ref={ref}
|
|
24
|
-
/>
|
|
25
|
-
));
|
|
26
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
27
|
-
|
|
28
|
-
const AlertDialogContent = React.forwardRef<
|
|
29
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
30
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
31
|
-
>(({ className, ...props }, ref) => (
|
|
32
|
-
<AlertDialogPortal>
|
|
33
|
-
<AlertDialogOverlay />
|
|
34
|
-
<AlertDialogPrimitive.Content
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={cn(
|
|
37
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border-primary bg-surface-primary p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
</AlertDialogPortal>
|
|
43
|
-
));
|
|
44
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
45
|
-
|
|
46
|
-
const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
47
|
-
<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
|
|
48
|
-
);
|
|
49
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
50
|
-
|
|
51
|
-
const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
52
|
-
<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
|
|
53
|
-
);
|
|
54
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
55
|
-
|
|
56
|
-
const AlertDialogTitle = React.forwardRef<
|
|
57
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
58
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
59
|
-
>(({ className, ...props }, ref) => (
|
|
60
|
-
<AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-label-primary", className)} {...props} />
|
|
61
|
-
));
|
|
62
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
63
|
-
|
|
64
|
-
const AlertDialogDescription = React.forwardRef<
|
|
65
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
66
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
67
|
-
>(({ className, ...props }, ref) => (
|
|
68
|
-
<AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-label-secondary", className)} {...props} />
|
|
69
|
-
));
|
|
70
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
71
|
-
|
|
72
|
-
const AlertDialogAction = React.forwardRef<
|
|
73
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
74
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
75
|
-
>(({ className, ...props }, ref) => (
|
|
76
|
-
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
77
|
-
));
|
|
78
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
79
|
-
|
|
80
|
-
const AlertDialogCancel = React.forwardRef<
|
|
81
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
82
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
83
|
-
>(({ className, ...props }, ref) => (
|
|
84
|
-
<AlertDialogPrimitive.Cancel
|
|
85
|
-
ref={ref}
|
|
86
|
-
className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
));
|
|
90
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
AlertDialog,
|
|
94
|
-
AlertDialogPortal,
|
|
95
|
-
AlertDialogOverlay,
|
|
96
|
-
AlertDialogTrigger,
|
|
97
|
-
AlertDialogContent,
|
|
98
|
-
AlertDialogHeader,
|
|
99
|
-
AlertDialogFooter,
|
|
100
|
-
AlertDialogTitle,
|
|
101
|
-
AlertDialogDescription,
|
|
102
|
-
AlertDialogAction,
|
|
103
|
-
AlertDialogCancel,
|
|
104
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Alert, AlertTitle, AlertDescription } from './alert'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'v2/Shadcn/Alert',
|
|
6
|
-
component: Alert,
|
|
7
|
-
parameters: { layout: 'padded' },
|
|
8
|
-
} as Meta<typeof Alert>
|
|
9
|
-
|
|
10
|
-
type Story = StoryObj<typeof Alert>
|
|
11
|
-
|
|
12
|
-
export const Default: Story = {
|
|
13
|
-
render: () => (
|
|
14
|
-
<Alert>
|
|
15
|
-
<AlertTitle>Heads up!</AlertTitle>
|
|
16
|
-
<AlertDescription>You can add components to your app using the CLI.</AlertDescription>
|
|
17
|
-
</Alert>
|
|
18
|
-
),
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const Destructive: Story = {
|
|
22
|
-
render: () => (
|
|
23
|
-
<Alert variant="destructive">
|
|
24
|
-
<AlertTitle>Error</AlertTitle>
|
|
25
|
-
<AlertDescription>Your session has expired. Please log in again.</AlertDescription>
|
|
26
|
-
</Alert>
|
|
27
|
-
),
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const TitleOnly: Story = {
|
|
31
|
-
render: () => (
|
|
32
|
-
<Alert>
|
|
33
|
-
<AlertTitle>Note: This action cannot be undone.</AlertTitle>
|
|
34
|
-
</Alert>
|
|
35
|
-
),
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const DescriptionOnly: Story = {
|
|
39
|
-
render: () => (
|
|
40
|
-
<Alert>
|
|
41
|
-
<AlertDescription>Your changes have been saved successfully.</AlertDescription>
|
|
42
|
-
</Alert>
|
|
43
|
-
),
|
|
44
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border border-border-primary p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-label-primary",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-surface-primary text-label-primary",
|
|
12
|
-
destructive: "border-fill-danger/50 text-label-danger dark:border-fill-danger [&>svg]:text-label-danger",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "default",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const Alert = React.forwardRef<
|
|
22
|
-
HTMLDivElement,
|
|
23
|
-
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
24
|
-
>(({ className, variant, ...props }, ref) => (
|
|
25
|
-
<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
|
|
26
|
-
));
|
|
27
|
-
Alert.displayName = "Alert";
|
|
28
|
-
|
|
29
|
-
const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
|
30
|
-
({ className, ...props }, ref) => (
|
|
31
|
-
<h5 ref={ref} className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props} />
|
|
32
|
-
),
|
|
33
|
-
);
|
|
34
|
-
AlertTitle.displayName = "AlertTitle";
|
|
35
|
-
|
|
36
|
-
const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
|
37
|
-
({ className, ...props }, ref) => (
|
|
38
|
-
<div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
|
|
39
|
-
),
|
|
40
|
-
);
|
|
41
|
-
AlertDescription.displayName = "AlertDescription";
|
|
42
|
-
|
|
43
|
-
export { Alert, AlertTitle, AlertDescription };
|