@licklist/design 0.78.5-dev.107 → 0.78.5-dev.108
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,124 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import { ReorderRow } from './ReorderRow'
|
|
4
|
+
import { Badge } from '../Badge'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'v2/Components/ReorderRow',
|
|
8
|
+
component: ReorderRow,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'padded',
|
|
11
|
+
},
|
|
12
|
+
} as Meta<typeof ReorderRow>
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof ReorderRow>
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
label: 'Test Zone',
|
|
19
|
+
subtitle: '0 resources · Total capacity: 0',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const WithSubtitle: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
label: 'Bowling Alley',
|
|
26
|
+
subtitle: '3 resources · Total capacity: 12',
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const WithoutSubtitle: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
label: 'VIP Lounge',
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const NoDragHandle: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
label: 'Static Row',
|
|
39
|
+
subtitle: 'No drag handle shown',
|
|
40
|
+
hideDragHandle: true,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Clickable: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
label: 'Click me',
|
|
47
|
+
subtitle: 'Has hover state',
|
|
48
|
+
onClick: () => alert('Clicked!'),
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const MultipleRows: Story = {
|
|
53
|
+
render: () => (
|
|
54
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px', maxWidth: 500 }}>
|
|
55
|
+
<ReorderRow
|
|
56
|
+
label="Main Floor"
|
|
57
|
+
subtitle="5 resources · Total capacity: 20"
|
|
58
|
+
/>
|
|
59
|
+
<ReorderRow
|
|
60
|
+
label="VIP Lounge"
|
|
61
|
+
subtitle="2 resources · Total capacity: 8"
|
|
62
|
+
/>
|
|
63
|
+
<ReorderRow
|
|
64
|
+
label="Outdoor Area"
|
|
65
|
+
subtitle="3 resources · Total capacity: 15"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
),
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const ColorDot = ({ color }: { color: string }) => (
|
|
72
|
+
<span
|
|
73
|
+
style={{
|
|
74
|
+
width: 12,
|
|
75
|
+
height: 12,
|
|
76
|
+
borderRadius: '50%',
|
|
77
|
+
backgroundColor: color,
|
|
78
|
+
display: 'inline-block',
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
export const PriorityReorder: Story = {
|
|
84
|
+
render: () => (
|
|
85
|
+
<div style={{ maxWidth: 500 }}>
|
|
86
|
+
<div style={{ marginBottom: 16 }}>
|
|
87
|
+
<h3 style={{ margin: '0 0 4px', fontSize: 16, fontWeight: 600, color: '#121e52' }}>
|
|
88
|
+
Set a new priority order for your pricing periods
|
|
89
|
+
</h3>
|
|
90
|
+
<p style={{ margin: 0, fontSize: 13, color: '#6b7a99' }}>
|
|
91
|
+
Update the priority order of your pricing periods. The first period in the list has the highest priority and will take precedence when multiple periods overlap.
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
95
|
+
<ReorderRow
|
|
96
|
+
label="Peak"
|
|
97
|
+
subtitle="Peak Period"
|
|
98
|
+
leftContent={<ColorDot color="#ef4444" />}
|
|
99
|
+
rightContent={<Badge variant="neutral">Priority 1</Badge>}
|
|
100
|
+
/>
|
|
101
|
+
<ReorderRow
|
|
102
|
+
label="Xmas"
|
|
103
|
+
leftContent={<ColorDot color="#f97316" />}
|
|
104
|
+
rightContent={<Badge variant="neutral">Priority 2</Badge>}
|
|
105
|
+
/>
|
|
106
|
+
<ReorderRow
|
|
107
|
+
label="Off Peak"
|
|
108
|
+
subtitle="This is for when we're not busy."
|
|
109
|
+
leftContent={<ColorDot color="#3b82f6" />}
|
|
110
|
+
rightContent={<Badge variant="neutral">Priority 3</Badge>}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
),
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const WithLeftAndRightContent: Story = {
|
|
118
|
+
args: {
|
|
119
|
+
label: 'Peak',
|
|
120
|
+
subtitle: 'Peak Period',
|
|
121
|
+
leftContent: <ColorDot color="#ef4444" />,
|
|
122
|
+
rightContent: <Badge variant="neutral">Priority 1</Badge>,
|
|
123
|
+
},
|
|
124
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react'
|
|
2
|
+
import { GripVerticalIcon } from '../../icons'
|
|
3
|
+
import './ReorderRow.scss'
|
|
4
|
+
|
|
5
|
+
export interface DragHandleRenderProps {
|
|
6
|
+
/** Spread onto the drag handle element for dnd-kit or similar */
|
|
7
|
+
attributes?: HTMLAttributes<HTMLElement>
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
listeners?: Record<string, (...args: any[]) => void> | undefined
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ReorderRowProps {
|
|
13
|
+
label: string
|
|
14
|
+
subtitle?: string
|
|
15
|
+
/** Render prop for the drag handle — receives attributes/listeners to spread */
|
|
16
|
+
dragHandleProps?: DragHandleRenderProps
|
|
17
|
+
/** Hide the drag handle (e.g. when not in reorder mode) */
|
|
18
|
+
hideDragHandle?: boolean
|
|
19
|
+
/** Content between the drag handle and label (e.g. color dot, icon) */
|
|
20
|
+
leftContent?: React.ReactNode
|
|
21
|
+
/** Right-side content (e.g. action menu, capacity badge) */
|
|
22
|
+
rightContent?: React.ReactNode
|
|
23
|
+
onClick?: () => void
|
|
24
|
+
className?: string
|
|
25
|
+
style?: React.CSSProperties
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const ReorderRow = React.forwardRef<HTMLDivElement, ReorderRowProps>(
|
|
29
|
+
(
|
|
30
|
+
{
|
|
31
|
+
label,
|
|
32
|
+
subtitle,
|
|
33
|
+
dragHandleProps,
|
|
34
|
+
hideDragHandle = false,
|
|
35
|
+
leftContent,
|
|
36
|
+
rightContent,
|
|
37
|
+
onClick,
|
|
38
|
+
className = '',
|
|
39
|
+
style,
|
|
40
|
+
},
|
|
41
|
+
ref,
|
|
42
|
+
) => {
|
|
43
|
+
const handleKeyDown = onClick
|
|
44
|
+
? (e: React.KeyboardEvent) => {
|
|
45
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
46
|
+
e.preventDefault()
|
|
47
|
+
onClick()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
: undefined
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
ref={ref}
|
|
55
|
+
style={style}
|
|
56
|
+
className={`reorder-row ${onClick ? 'reorder-row--clickable' : ''} ${className}`}
|
|
57
|
+
onClick={onClick}
|
|
58
|
+
onKeyDown={handleKeyDown}
|
|
59
|
+
role={onClick ? 'button' : undefined}
|
|
60
|
+
tabIndex={onClick ? 0 : undefined}
|
|
61
|
+
>
|
|
62
|
+
{!hideDragHandle && (
|
|
63
|
+
<div
|
|
64
|
+
className="reorder-row__drag-handle"
|
|
65
|
+
{...dragHandleProps?.attributes}
|
|
66
|
+
{...dragHandleProps?.listeners}
|
|
67
|
+
>
|
|
68
|
+
{GripVerticalIcon({ width: 20, height: 20 })}
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
71
|
+
{leftContent && (
|
|
72
|
+
<div className="reorder-row__left">{leftContent}</div>
|
|
73
|
+
)}
|
|
74
|
+
<div className="reorder-row__content">
|
|
75
|
+
<span className="reorder-row__label">{label}</span>
|
|
76
|
+
{subtitle && (
|
|
77
|
+
<span className="reorder-row__subtitle">{subtitle}</span>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
{rightContent && (
|
|
81
|
+
<div className="reorder-row__right">{rightContent}</div>
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
85
|
+
},
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
ReorderRow.displayName = 'ReorderRow'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { Switch } from '../../shadcn/components/ui/switch'
|
|
2
3
|
import './Toggle.scss'
|
|
3
4
|
|
|
4
5
|
export interface ToggleProps {
|
|
@@ -9,13 +10,11 @@ export interface ToggleProps {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export const Toggle: React.FC<ToggleProps> = ({ checked, onChange, disabled = false, id }) => (
|
|
12
|
-
<
|
|
13
|
+
<Switch
|
|
13
14
|
id={id}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
aria-checked={checked}
|
|
15
|
+
checked={checked}
|
|
16
|
+
onCheckedChange={onChange}
|
|
17
17
|
disabled={disabled}
|
|
18
|
-
className=
|
|
19
|
-
onClick={() => onChange(!checked)}
|
|
18
|
+
className="toggle-switch"
|
|
20
19
|
/>
|
|
21
20
|
)
|
|
@@ -111,6 +111,12 @@ export type { RadioCardGroupProps, RadioCardOption } from './RadioCard'
|
|
|
111
111
|
export { ZoneCard, ZoneContainer, ZoneHeader, ResourceRow, AddResourceButton } from './ZoneCard'
|
|
112
112
|
export type { ZoneCardProps, ZoneResource, ZoneContainerProps, DragHandleProps, ZoneHeaderProps, ResourceRowProps, AddResourceButtonProps } from './ZoneCard'
|
|
113
113
|
|
|
114
|
+
export { PeriodCard, PeriodCardSection, PeriodCardTimeRange } from './PeriodCard'
|
|
115
|
+
|
|
116
|
+
export { ReorderRow } from './ReorderRow'
|
|
117
|
+
export type { ReorderRowProps, DragHandleRenderProps } from './ReorderRow'
|
|
118
|
+
export type { PeriodCardProps, PeriodCardValue, PeriodCardLabels, PeriodCardSectionProps, PeriodCardTimeRangeProps } from './PeriodCard'
|
|
119
|
+
|
|
114
120
|
// Icons
|
|
115
121
|
export {
|
|
116
122
|
InfoIcon,
|
package/src/v2/index.ts
CHANGED
|
@@ -58,6 +58,15 @@ export { SettingsSubPage } from './pages/SettingsSubPage'
|
|
|
58
58
|
export type { SettingsSubPageProps } from './pages/SettingsSubPage'
|
|
59
59
|
|
|
60
60
|
// ZonesResources Page (deprecated — use SettingsSubPage)
|
|
61
|
+
// PeriodCard Component
|
|
62
|
+
export { PeriodCard, PeriodCardSection, PeriodCardTimeRange } from './components/PeriodCard'
|
|
63
|
+
export type { PeriodCardProps, PeriodCardValue, PeriodCardLabels, PeriodCardSectionProps, PeriodCardTimeRangeProps } from './components/PeriodCard'
|
|
64
|
+
|
|
65
|
+
// ReorderRow Component
|
|
66
|
+
export { ReorderRow } from './components/ReorderRow'
|
|
67
|
+
export type { ReorderRowProps, DragHandleRenderProps } from './components/ReorderRow'
|
|
68
|
+
|
|
69
|
+
// ZonesResources Page
|
|
61
70
|
export { ZonesResourcesPage } from './pages/ZonesResources'
|
|
62
71
|
export type { ZonesResourcesPageProps } from './pages/ZonesResources'
|
|
63
72
|
|
|
@@ -219,5 +228,78 @@ export type { AuthLayoutProps, LoginPageProps, ResetPasswordPageProps, CreatePas
|
|
|
219
228
|
* - @/v2/styles/form/NewInput.scss
|
|
220
229
|
* - @/v2/styles/navigation/*.scss
|
|
221
230
|
*
|
|
231
|
+
* shadcn/ui components are available from:
|
|
232
|
+
* - @/v2/shadcn/components/ui/
|
|
222
233
|
*/
|
|
223
234
|
|
|
235
|
+
// shadcn/ui components
|
|
236
|
+
// Note: shadcn components with name collisions (Button, Checkbox) should be imported
|
|
237
|
+
// directly from '@licklist/design/v2/shadcn' to avoid ambiguity with native v2 components.
|
|
238
|
+
export {
|
|
239
|
+
cn,
|
|
240
|
+
buttonVariants,
|
|
241
|
+
Input,
|
|
242
|
+
Label,
|
|
243
|
+
Badge,
|
|
244
|
+
badgeVariants,
|
|
245
|
+
Card,
|
|
246
|
+
CardHeader,
|
|
247
|
+
CardFooter,
|
|
248
|
+
CardTitle,
|
|
249
|
+
CardDescription,
|
|
250
|
+
CardContent,
|
|
251
|
+
Separator,
|
|
252
|
+
Avatar,
|
|
253
|
+
AvatarImage,
|
|
254
|
+
AvatarFallback,
|
|
255
|
+
Select,
|
|
256
|
+
SelectGroup,
|
|
257
|
+
SelectValue,
|
|
258
|
+
SelectTrigger,
|
|
259
|
+
SelectContent,
|
|
260
|
+
SelectLabel,
|
|
261
|
+
SelectItem,
|
|
262
|
+
SelectSeparator,
|
|
263
|
+
SelectScrollUpButton,
|
|
264
|
+
SelectScrollDownButton,
|
|
265
|
+
Dialog,
|
|
266
|
+
DialogPortal,
|
|
267
|
+
DialogOverlay,
|
|
268
|
+
DialogTrigger,
|
|
269
|
+
DialogClose,
|
|
270
|
+
DialogContent,
|
|
271
|
+
DialogHeader,
|
|
272
|
+
DialogFooter,
|
|
273
|
+
DialogTitle,
|
|
274
|
+
DialogDescription,
|
|
275
|
+
DropdownMenu,
|
|
276
|
+
DropdownMenuTrigger,
|
|
277
|
+
DropdownMenuContent,
|
|
278
|
+
DropdownMenuItem,
|
|
279
|
+
DropdownMenuCheckboxItem,
|
|
280
|
+
DropdownMenuRadioItem,
|
|
281
|
+
DropdownMenuLabel,
|
|
282
|
+
DropdownMenuSeparator,
|
|
283
|
+
DropdownMenuShortcut,
|
|
284
|
+
DropdownMenuGroup,
|
|
285
|
+
DropdownMenuPortal,
|
|
286
|
+
DropdownMenuSub,
|
|
287
|
+
DropdownMenuSubContent,
|
|
288
|
+
DropdownMenuSubTrigger,
|
|
289
|
+
DropdownMenuRadioGroup,
|
|
290
|
+
Skeleton,
|
|
291
|
+
Switch,
|
|
292
|
+
Table,
|
|
293
|
+
TableHeader,
|
|
294
|
+
TableBody,
|
|
295
|
+
TableFooter,
|
|
296
|
+
TableHead,
|
|
297
|
+
TableRow,
|
|
298
|
+
TableCell,
|
|
299
|
+
TableCaption,
|
|
300
|
+
TooltipProvider as ShadcnTooltipProvider,
|
|
301
|
+
TooltipTrigger as ShadcnTooltipTrigger,
|
|
302
|
+
TooltipContent as ShadcnTooltipContent,
|
|
303
|
+
} from './shadcn'
|
|
304
|
+
// shadcn Button and Checkbox exported with Shadcn prefix to avoid collision with native v2 components
|
|
305
|
+
export { Button as ShadcnButton, Checkbox as ShadcnCheckbox, Tooltip as ShadcnTooltip } from './shadcn'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconTelephone, IconMail } from '../../icons';
|
|
3
|
+
|
|
4
|
+
interface AccountManagerCardProps {
|
|
5
|
+
fullName: string;
|
|
6
|
+
email: string;
|
|
7
|
+
avatarUrl: string | null;
|
|
8
|
+
companyPhone: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const AccountManagerCard: React.FC<AccountManagerCardProps> = ({
|
|
12
|
+
fullName,
|
|
13
|
+
email,
|
|
14
|
+
avatarUrl,
|
|
15
|
+
companyPhone,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<div className="flex items-center gap-4 p-4 bg-surface-secondary border border-border-primary rounded-lg">
|
|
19
|
+
<div className="w-12 h-12 rounded-full flex items-center justify-center flex-shrink-0 overflow-hidden bg-surface-tertiary border border-border-primary">
|
|
20
|
+
{avatarUrl ? (
|
|
21
|
+
<img src={avatarUrl} alt={fullName} className="w-full h-full object-cover" />
|
|
22
|
+
) : (
|
|
23
|
+
<span className="text-label-secondary font-bold text-sm">
|
|
24
|
+
{fullName[0]?.toUpperCase() || '?'}
|
|
25
|
+
</span>
|
|
26
|
+
)}
|
|
27
|
+
</div>
|
|
28
|
+
<div className="flex flex-col gap-1 flex-1 min-w-0">
|
|
29
|
+
<span className="text-label-primary text-sm font-semibold">{fullName}</span>
|
|
30
|
+
<div className="flex items-center gap-1.5">
|
|
31
|
+
<IconMail size={14} className="fill-fill-secondary flex-shrink-0" />
|
|
32
|
+
<span className="text-label-secondary text-xs truncate">{email}</span>
|
|
33
|
+
</div>
|
|
34
|
+
{companyPhone && (
|
|
35
|
+
<div className="flex items-center gap-1.5">
|
|
36
|
+
<IconTelephone size={14} className="fill-fill-secondary flex-shrink-0" />
|
|
37
|
+
<span className="text-label-secondary text-xs">{companyPhone}</span>
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default AccountManagerCard;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { DataTable } from './tables/DataTable';
|
|
3
|
+
import { ColumnConfig, RowAction } from './tables/types';
|
|
4
|
+
import StatusBadge from './StatusBadge';
|
|
5
|
+
import DeleteConfirmationDialog from './shared/DeleteConfirmationDialog';
|
|
6
|
+
import {
|
|
7
|
+
Tooltip,
|
|
8
|
+
TooltipContent,
|
|
9
|
+
TooltipProvider,
|
|
10
|
+
TooltipTrigger,
|
|
11
|
+
} from './ui/tooltip';
|
|
12
|
+
|
|
13
|
+
export interface Affiliate {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
views: number;
|
|
17
|
+
lastSeen: string;
|
|
18
|
+
status: 'active' | 'disabled';
|
|
19
|
+
destinationUrl: string;
|
|
20
|
+
affiliateCode: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface AffiliatesTableProps {
|
|
24
|
+
affiliates: Affiliate[];
|
|
25
|
+
onDelete: (id: string) => void;
|
|
26
|
+
onToggleStatus: (id: string) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const AffiliatesTable: React.FC<AffiliatesTableProps> = ({ affiliates, onDelete, onToggleStatus }) => {
|
|
30
|
+
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
|
|
31
|
+
const [selectedAffiliate, setSelectedAffiliate] = useState<Affiliate | null>(null);
|
|
32
|
+
const [copiedId, setCopiedId] = useState<string | null>(null);
|
|
33
|
+
|
|
34
|
+
const handleDeleteClick = (affiliate: Affiliate) => {
|
|
35
|
+
setSelectedAffiliate(affiliate);
|
|
36
|
+
setShowDeleteDialog(true);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const handleDeleteConfirm = () => {
|
|
40
|
+
if (selectedAffiliate) {
|
|
41
|
+
onDelete(selectedAffiliate.id);
|
|
42
|
+
}
|
|
43
|
+
setShowDeleteDialog(false);
|
|
44
|
+
setSelectedAffiliate(null);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const handleCopyLink = async (affiliate: Affiliate) => {
|
|
48
|
+
const affiliateLink = `${window.location.origin}/r/${affiliate.affiliateCode}`;
|
|
49
|
+
await navigator.clipboard.writeText(affiliateLink);
|
|
50
|
+
setCopiedId(affiliate.id);
|
|
51
|
+
setTimeout(() => setCopiedId(null), 1000);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const columns: ColumnConfig<Affiliate>[] = [
|
|
55
|
+
{
|
|
56
|
+
label: 'Affiliate',
|
|
57
|
+
render: (affiliate) => (
|
|
58
|
+
<div className="flex items-center gap-2 flex-1">
|
|
59
|
+
{/* Icon */}
|
|
60
|
+
<div className="flex w-8 h-8 justify-center items-center gap-2 rounded bg-surface-secondary flex-shrink-0">
|
|
61
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
62
|
+
<path d="M16.2424 14.1213L15.1818 13.0606L16.2424 12C17.414 10.8284 17.414 8.92892 16.2424 7.75734C15.0708 6.58577 13.1713 6.58577 11.9997 7.75734L10.9391 8.81801L9.87842 7.75734L10.9391 6.69668C12.6964 4.93932 15.5457 4.93932 17.3031 6.69668C19.0604 8.45405 19.0604 11.3033 17.3031 13.0606L16.2424 14.1213ZM14.121 16.2427L13.0604 17.3033C11.3031 19.0606 8.45379 19.0606 6.69644 17.3033C4.93908 15.5459 4.93908 12.6967 6.69644 10.9393L7.7571 9.87866L8.81775 10.9393L7.7571 12C6.58552 13.1716 6.58552 15.0711 7.7571 16.2427C8.92867 17.4142 10.8282 17.4142 11.9997 16.2427L13.0604 15.1819L14.121 16.2427ZM14.121 8.81801L15.1818 9.87866L9.87842 15.1819L8.81775 14.1213L14.121 8.81801Z" className="fill-label-secondary" />
|
|
63
|
+
</svg>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
{/* Name */}
|
|
67
|
+
<div className="flex flex-col justify-center items-start gap-0.5 flex-1 min-w-0">
|
|
68
|
+
<h3 className="text-label-primary text-sm font-semibold leading-4 truncate w-full">
|
|
69
|
+
{affiliate.name}
|
|
70
|
+
</h3>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'Views',
|
|
77
|
+
accessor: (affiliate) => affiliate.views.toLocaleString(),
|
|
78
|
+
width: 'w-[160px]'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: 'Last Seen',
|
|
82
|
+
accessor: 'lastSeen',
|
|
83
|
+
width: 'w-[140px]'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: 'Status',
|
|
87
|
+
render: (affiliate) => (
|
|
88
|
+
<div className="flex items-center gap-2">
|
|
89
|
+
<StatusBadge status={affiliate.status} />
|
|
90
|
+
|
|
91
|
+
{/* Copy Button */}
|
|
92
|
+
<TooltipProvider delayDuration={200}>
|
|
93
|
+
<Tooltip open={copiedId === affiliate.id ? true : undefined}>
|
|
94
|
+
<TooltipTrigger asChild>
|
|
95
|
+
<button
|
|
96
|
+
onClick={(e) => {
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
handleCopyLink(affiliate);
|
|
99
|
+
}}
|
|
100
|
+
className="w-8 h-8 relative flex items-center justify-center rounded-full hover:opacity-80 transition-all flex-shrink-0"
|
|
101
|
+
aria-label="Copy link"
|
|
102
|
+
>
|
|
103
|
+
<div className="absolute inset-0 w-8 h-8 rounded-full bg-surface-secondary"></div>
|
|
104
|
+
<div className="relative z-10 transition-opacity duration-300">
|
|
105
|
+
{copiedId === affiliate.id ? (
|
|
106
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" className="animate-fade-in">
|
|
107
|
+
<path d="M10 15.172L19.192 5.979L20.607 7.393L10 18L3.636 11.636L5.05 10.222L10 15.172Z" className="fill-fill-secondary" />
|
|
108
|
+
</svg>
|
|
109
|
+
) : (
|
|
110
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" className="animate-fade-in">
|
|
111
|
+
<path d="M7 6V3C7 2.44772 7.44772 2 8 2H20C20.5523 2 21 2.44772 21 3V17C21 17.5523 20.5523 18 20 18H17V21C17 21.5523 16.5523 22 16 22H4C3.44772 22 3 21.5523 3 21V7C3 6.44772 3.44772 6 4 6H7ZM5 8V20H15V8H5ZM9 6H17V16H19V4H9V6Z" className="fill-fill-secondary" />
|
|
112
|
+
</svg>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
</button>
|
|
116
|
+
</TooltipTrigger>
|
|
117
|
+
<TooltipContent>
|
|
118
|
+
<p>{copiedId === affiliate.id ? 'Copied!' : 'Copy affiliate link'}</p>
|
|
119
|
+
</TooltipContent>
|
|
120
|
+
</Tooltip>
|
|
121
|
+
</TooltipProvider>
|
|
122
|
+
</div>
|
|
123
|
+
),
|
|
124
|
+
width: 'w-[150px]',
|
|
125
|
+
className: 'flex justify-end'
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
const rowActions = (affiliate: Affiliate): RowAction<Affiliate>[] => [
|
|
130
|
+
{
|
|
131
|
+
label: 'Edit Affiliate',
|
|
132
|
+
onClick: () => {
|
|
133
|
+
window.location.href = `/marketing/affiliates/edit/${affiliate.id}`;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: affiliate.status === 'active' ? 'Disable' : 'Enable',
|
|
138
|
+
onClick: () => {
|
|
139
|
+
onToggleStatus(affiliate.id);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: 'Copy Link',
|
|
144
|
+
onClick: () => {
|
|
145
|
+
handleCopyLink(affiliate);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Delete',
|
|
150
|
+
onClick: () => {
|
|
151
|
+
handleDeleteClick(affiliate);
|
|
152
|
+
},
|
|
153
|
+
variant: 'danger'
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
<>
|
|
159
|
+
<DataTable
|
|
160
|
+
data={affiliates}
|
|
161
|
+
columns={columns}
|
|
162
|
+
keyExtractor={(affiliate) => affiliate.id}
|
|
163
|
+
rowActions={rowActions}
|
|
164
|
+
/>
|
|
165
|
+
|
|
166
|
+
{/* Delete Confirmation Dialog */}
|
|
167
|
+
<DeleteConfirmationDialog
|
|
168
|
+
open={showDeleteDialog}
|
|
169
|
+
onOpenChange={setShowDeleteDialog}
|
|
170
|
+
onConfirm={handleDeleteConfirm}
|
|
171
|
+
title={`Delete ${selectedAffiliate?.name}?`}
|
|
172
|
+
itemName={selectedAffiliate?.name}
|
|
173
|
+
/>
|
|
174
|
+
</>
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export default AffiliatesTable;
|