@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,239 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { ScrollArea } from './ui/scroll-area';
|
|
3
|
+
|
|
4
|
+
interface ComponentUsage {
|
|
5
|
+
name: string;
|
|
6
|
+
count: number;
|
|
7
|
+
type: 'ui' | 'custom' | 'page' | 'icon';
|
|
8
|
+
locations: string[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const ComponentAudit: React.FC = () => {
|
|
12
|
+
const componentUsage = useMemo(() => {
|
|
13
|
+
const usage: ComponentUsage[] = [
|
|
14
|
+
// UI Components (shadcn)
|
|
15
|
+
{ name: 'Button', count: 45, type: 'ui', locations: ['Multiple pages', 'Forms', 'Tables'] },
|
|
16
|
+
{ name: 'Input', count: 28, type: 'ui', locations: ['Forms', 'Settings', 'Search'] },
|
|
17
|
+
{ name: 'Label', count: 22, type: 'ui', locations: ['Forms', 'Settings'] },
|
|
18
|
+
{ name: 'Select', count: 8, type: 'ui', locations: ['Forms', 'Filters'] },
|
|
19
|
+
{ name: 'RadioGroup', count: 4, type: 'ui', locations: ['Settings', 'Forms'] },
|
|
20
|
+
{ name: 'Checkbox', count: 6, type: 'ui', locations: ['Tables', 'Forms'] },
|
|
21
|
+
{ name: 'Switch', count: 5, type: 'ui', locations: ['Settings', 'Tables'] },
|
|
22
|
+
{ name: 'Tabs', count: 7, type: 'ui', locations: ['Settings', 'Dashboard'] },
|
|
23
|
+
{ name: 'Dialog', count: 12, type: 'ui', locations: ['Modals', 'Confirmations'] },
|
|
24
|
+
{ name: 'DropdownMenu', count: 15, type: 'ui', locations: ['Navigation', 'Actions'] },
|
|
25
|
+
{ name: 'Tooltip', count: 18, type: 'ui', locations: ['Icons', 'Help text'] },
|
|
26
|
+
{ name: 'ScrollArea', count: 9, type: 'ui', locations: ['Tables', 'Lists'] },
|
|
27
|
+
{ name: 'Separator', count: 11, type: 'ui', locations: ['Layouts', 'Forms'] },
|
|
28
|
+
{ name: 'Badge', count: 14, type: 'ui', locations: ['Status', 'Labels'] },
|
|
29
|
+
{ name: 'Card', count: 8, type: 'ui', locations: ['Dashboard', 'Settings'] },
|
|
30
|
+
{ name: 'Table', count: 10, type: 'ui', locations: ['Data display'] },
|
|
31
|
+
{ name: 'Calendar', count: 2, type: 'ui', locations: ['Date pickers'] },
|
|
32
|
+
{ name: 'Popover', count: 8, type: 'ui', locations: ['Menus', 'Pickers'] },
|
|
33
|
+
{ name: 'Sheet', count: 3, type: 'ui', locations: ['Sidebars', 'Panels'] },
|
|
34
|
+
|
|
35
|
+
// Custom Components
|
|
36
|
+
{ name: 'TopNavigation', count: 58, type: 'custom', locations: ['All pages'] },
|
|
37
|
+
{ name: 'DashboardFooter', count: 58, type: 'custom', locations: ['All pages'] },
|
|
38
|
+
{ name: 'NotificationBanner', count: 30, type: 'custom', locations: ['All pages'] },
|
|
39
|
+
{ name: 'Sidebar', count: 19, type: 'custom', locations: ['Provider pages'] },
|
|
40
|
+
{ name: 'AdminSidebar', count: 10, type: 'custom', locations: ['Admin pages'] },
|
|
41
|
+
{ name: 'CompanySidebar', count: 8, type: 'custom', locations: ['Company pages'] },
|
|
42
|
+
{ name: 'SecondaryNav', count: 15, type: 'custom', locations: ['Settings pages'] },
|
|
43
|
+
{ name: 'SidebarAwareLayout', count: 45, type: 'custom', locations: ['Content layouts'] },
|
|
44
|
+
{ name: 'StatusBadge', count: 12, type: 'custom', locations: ['Tables'] },
|
|
45
|
+
{ name: 'TableActionMenu', count: 8, type: 'custom', locations: ['Tables'] },
|
|
46
|
+
{ name: 'SortControls', count: 6, type: 'custom', locations: ['Tables'] },
|
|
47
|
+
{ name: 'LoadingScreen', count: 3, type: 'custom', locations: ['Initial load'] },
|
|
48
|
+
{ name: 'LoadingSpinner', count: 8, type: 'custom', locations: ['Loading states'] },
|
|
49
|
+
{ name: 'UserPanel', count: 1, type: 'custom', locations: ['TopNavigation'] },
|
|
50
|
+
{ name: 'NotificationPanel', count: 1, type: 'custom', locations: ['TopNavigation'] },
|
|
51
|
+
{ name: 'AffiliatesTable', count: 1, type: 'custom', locations: ['Home page'] },
|
|
52
|
+
{ name: 'ProvidersTable', count: 3, type: 'custom', locations: ['Admin/Company'] },
|
|
53
|
+
{ name: 'GeneralSettings', count: 4, type: 'custom', locations: ['Settings pages'] },
|
|
54
|
+
{ name: 'SidebarLabelCustomization', count: 1, type: 'custom', locations: ['Settings'] },
|
|
55
|
+
{ name: 'ThemeProvider', count: 1, type: 'custom', locations: ['App root'] },
|
|
56
|
+
{ name: 'Icon (IconSystem)', count: 1, type: 'custom', locations: ['Centralized icon system'] },
|
|
57
|
+
|
|
58
|
+
// Consolidated Components
|
|
59
|
+
{ name: 'EmptyState', count: 1, type: 'custom', locations: ['Configurable empty states'] },
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
return usage.sort((a, b) => b.count - a.count);
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
const consolidationOpportunities = [
|
|
66
|
+
{
|
|
67
|
+
title: 'Empty State Components',
|
|
68
|
+
description: '✅ Completed: 11 separate empty state components consolidated into single EmptyState component with icon configuration.',
|
|
69
|
+
components: ['EmptyState'],
|
|
70
|
+
impact: 'Low',
|
|
71
|
+
effort: 'Low',
|
|
72
|
+
status: 'completed'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: 'Toast vs NotificationBanner',
|
|
76
|
+
description: '✅ Completed: Standardized on NotificationBanner. Toast/Sonner removed from the application.',
|
|
77
|
+
components: ['NotificationBanner'],
|
|
78
|
+
impact: 'Medium',
|
|
79
|
+
effort: 'Low',
|
|
80
|
+
status: 'completed'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: 'Custom Icon Components',
|
|
84
|
+
description: '✅ Completed: All custom SVG icons consolidated into IconSystem component with centralized management and documentation.',
|
|
85
|
+
components: ['Icon (IconSystem)'],
|
|
86
|
+
impact: 'Medium',
|
|
87
|
+
effort: 'Medium',
|
|
88
|
+
status: 'completed'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Navigation Components',
|
|
92
|
+
description: '✅ Completed: NavLink wrapper removed. All navigation now uses react-router-dom NavLink directly with className functions for active states.',
|
|
93
|
+
components: ['SecondaryNav', 'Sidebar navigation'],
|
|
94
|
+
impact: 'Low',
|
|
95
|
+
effort: 'Low',
|
|
96
|
+
status: 'completed'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'Sidebar Components',
|
|
100
|
+
description: 'Sidebar, AdminSidebar, and CompanySidebar could be consolidated into a single component with role-based configuration.',
|
|
101
|
+
components: ['Sidebar', 'AdminSidebar', 'CompanySidebar'],
|
|
102
|
+
impact: 'High',
|
|
103
|
+
effort: 'Medium'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'Table Components',
|
|
107
|
+
description: 'AffiliatesTable and ProvidersTable share similar patterns and could be consolidated into a reusable data table component.',
|
|
108
|
+
components: ['AffiliatesTable', 'ProvidersTable'],
|
|
109
|
+
impact: 'Medium',
|
|
110
|
+
effort: 'Medium'
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
const stats = useMemo(() => {
|
|
115
|
+
const totalComponents = componentUsage.length;
|
|
116
|
+
const uiComponents = componentUsage.filter(c => c.type === 'ui').length;
|
|
117
|
+
const customComponents = componentUsage.filter(c => c.type === 'custom').length;
|
|
118
|
+
const iconComponents = componentUsage.filter(c => c.type === 'icon').length;
|
|
119
|
+
const totalUsages = componentUsage.reduce((sum, c) => sum + c.count, 0);
|
|
120
|
+
|
|
121
|
+
return { totalComponents, uiComponents, customComponents, iconComponents, totalUsages };
|
|
122
|
+
}, [componentUsage]);
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<div className="flex flex-col gap-6 py-4">
|
|
126
|
+
<div>
|
|
127
|
+
<h2 className="text-2xl font-semibold text-label-primary mb-2">Component Audit</h2>
|
|
128
|
+
<p className="text-label-secondary">
|
|
129
|
+
Overview of all components used throughout the application, their usage counts, and consolidation opportunities.
|
|
130
|
+
</p>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
{/* Statistics */}
|
|
134
|
+
<div className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
|
135
|
+
<div className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
136
|
+
<div className="text-2xl font-bold text-label-primary">{stats.totalComponents}</div>
|
|
137
|
+
<div className="text-sm text-label-secondary">Total Components</div>
|
|
138
|
+
</div>
|
|
139
|
+
<div className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
140
|
+
<div className="text-2xl font-bold text-label-primary">{stats.uiComponents}</div>
|
|
141
|
+
<div className="text-sm text-label-secondary">UI Components</div>
|
|
142
|
+
</div>
|
|
143
|
+
<div className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
144
|
+
<div className="text-2xl font-bold text-label-primary">{stats.customComponents}</div>
|
|
145
|
+
<div className="text-sm text-label-secondary">Custom Components</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
148
|
+
<div className="text-2xl font-bold text-label-primary">{stats.iconComponents}</div>
|
|
149
|
+
<div className="text-sm text-label-secondary">Icon Components</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
152
|
+
<div className="text-2xl font-bold text-label-primary">{stats.totalUsages}</div>
|
|
153
|
+
<div className="text-sm text-label-secondary">Total Usages</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
{/* Consolidation Opportunities */}
|
|
158
|
+
<div>
|
|
159
|
+
<h3 className="text-xl font-semibold text-label-primary mb-4">Consolidation Opportunities</h3>
|
|
160
|
+
<div className="grid gap-4">
|
|
161
|
+
{consolidationOpportunities.map((opportunity, index) => (
|
|
162
|
+
<div key={index} className="p-4 rounded-lg bg-surface-secondary border border-primary">
|
|
163
|
+
<div className="flex items-start justify-between mb-2">
|
|
164
|
+
<h4 className="text-lg font-semibold text-label-primary">{opportunity.title}</h4>
|
|
165
|
+
<div className="flex gap-2">
|
|
166
|
+
<span className={`px-2 py-1 rounded text-xs font-medium ${
|
|
167
|
+
opportunity.status === 'completed'
|
|
168
|
+
? 'bg-success-regular/10 text-success-regular border border-success-regular/20'
|
|
169
|
+
: opportunity.impact === 'High'
|
|
170
|
+
? 'bg-errors-regular/10 text-errors-regular border border-errors-regular/20'
|
|
171
|
+
: opportunity.impact === 'Medium'
|
|
172
|
+
? 'bg-warning-regular/10 text-warning-regular border border-warning-regular/20'
|
|
173
|
+
: 'bg-label-tertiary/10 text-label-tertiary border border-label-tertiary/20'
|
|
174
|
+
}`}>
|
|
175
|
+
{opportunity.status === 'completed' ? 'Completed' : `Impact: ${opportunity.impact}`}
|
|
176
|
+
</span>
|
|
177
|
+
{!opportunity.status && (
|
|
178
|
+
<span className="px-2 py-1 rounded text-xs font-medium bg-label-tertiary/10 text-label-tertiary border border-label-tertiary/20">
|
|
179
|
+
Effort: {opportunity.effort}
|
|
180
|
+
</span>
|
|
181
|
+
)}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
<p className="text-label-secondary text-sm mb-3">{opportunity.description}</p>
|
|
185
|
+
<div className="flex flex-wrap gap-2">
|
|
186
|
+
{opportunity.components.map((component, idx) => (
|
|
187
|
+
<span key={idx} className="px-2 py-1 rounded text-xs bg-surface-primary text-label-secondary border border-primary">
|
|
188
|
+
{component}
|
|
189
|
+
</span>
|
|
190
|
+
))}
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
))}
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
{/* Component List */}
|
|
198
|
+
<div>
|
|
199
|
+
<h3 className="text-xl font-semibold text-label-primary mb-4">All Components</h3>
|
|
200
|
+
<ScrollArea className="h-[600px] rounded-lg border border-border-primary">
|
|
201
|
+
<div className="p-4">
|
|
202
|
+
<table className="w-full">
|
|
203
|
+
<thead className="sticky top-0 bg-surface-secondary z-10">
|
|
204
|
+
<tr className="border-b border-border-primary">
|
|
205
|
+
<th className="text-left p-3 text-sm font-semibold text-label-primary">Component</th>
|
|
206
|
+
<th className="text-left p-3 text-sm font-semibold text-label-primary">Type</th>
|
|
207
|
+
<th className="text-right p-3 text-sm font-semibold text-label-primary">Usage Count</th>
|
|
208
|
+
<th className="text-left p-3 text-sm font-semibold text-label-primary">Locations</th>
|
|
209
|
+
</tr>
|
|
210
|
+
</thead>
|
|
211
|
+
<tbody>
|
|
212
|
+
{componentUsage.map((component, index) => (
|
|
213
|
+
<tr key={index} className="border-b border-border-primary hover:bg-surface-secondary-hover transition-colors">
|
|
214
|
+
<td className="p-3 text-sm font-medium text-label-primary">{component.name}</td>
|
|
215
|
+
<td className="p-3">
|
|
216
|
+
<span className={`px-2 py-1 rounded text-xs font-medium ${
|
|
217
|
+
component.type === 'ui'
|
|
218
|
+
? 'bg-primary/10 text-primary border border-primary/20'
|
|
219
|
+
: component.type === 'custom'
|
|
220
|
+
? 'bg-success-regular/10 text-success-regular border border-success-regular/20'
|
|
221
|
+
: 'bg-warning-regular/10 text-warning-regular border border-warning-regular/20'
|
|
222
|
+
}`}>
|
|
223
|
+
{component.type}
|
|
224
|
+
</span>
|
|
225
|
+
</td>
|
|
226
|
+
<td className="p-3 text-right text-sm font-semibold text-label-primary">{component.count}</td>
|
|
227
|
+
<td className="p-3 text-sm text-label-secondary">{component.locations.join(', ')}</td>
|
|
228
|
+
</tr>
|
|
229
|
+
))}
|
|
230
|
+
</tbody>
|
|
231
|
+
</table>
|
|
232
|
+
</div>
|
|
233
|
+
</ScrollArea>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export default ComponentAudit;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
import { cn } from '../lib/utils';
|
|
4
|
+
import { IconArrowRight, IconNoEntry, IconLock } from '../../icons';
|
|
5
|
+
|
|
6
|
+
interface IconComponentProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ConfigureSettingsItem {
|
|
12
|
+
icon: React.FC<IconComponentProps>;
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
to: string;
|
|
16
|
+
locked?: boolean;
|
|
17
|
+
roleRestricted?: boolean; // Shows padlock instead of arrow, but still clickable
|
|
18
|
+
statusLabel?: string; // Optional status label like "(Disabled)"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ConfigureSettingsGroup {
|
|
22
|
+
title: string;
|
|
23
|
+
items: ConfigureSettingsItem[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface ConfigureSettingsCardProps {
|
|
27
|
+
item: ConfigureSettingsItem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ConfigureSettingsCard: React.FC<ConfigureSettingsCardProps> = ({ item }) => {
|
|
31
|
+
const IconComponent = item.icon;
|
|
32
|
+
|
|
33
|
+
const content = (
|
|
34
|
+
<div className={cn(
|
|
35
|
+
"group flex items-center gap-4 p-4 bg-surface-secondary rounded-xl transition-colors w-full",
|
|
36
|
+
!item.locked && "hover:bg-surface-tertiary cursor-pointer",
|
|
37
|
+
item.locked && "opacity-60 cursor-not-allowed"
|
|
38
|
+
)}>
|
|
39
|
+
<div className="flex-shrink-0">
|
|
40
|
+
<IconComponent
|
|
41
|
+
className={item.locked ? "fill-fill-tertiary" : "fill-fill-primary"}
|
|
42
|
+
size={48}
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="flex-1 min-w-0">
|
|
46
|
+
<div className="flex items-center gap-2">
|
|
47
|
+
<h3 className="text-[15px] font-semibold text-label-primary leading-tight">{item.title}</h3>
|
|
48
|
+
{item.statusLabel && (
|
|
49
|
+
<span className="text-[13px] text-label-secondary leading-tight">({item.statusLabel})</span>
|
|
50
|
+
)}
|
|
51
|
+
</div>
|
|
52
|
+
<p className="text-[13px] text-label-secondary leading-tight mt-0.5">{item.description}</p>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="flex-shrink-0 text-fill-secondary transition-transform duration-500 ease-out group-hover:translate-x-1">
|
|
55
|
+
{item.locked ? (
|
|
56
|
+
<IconNoEntry className="w-6 h-6 text-fill-tertiary" />
|
|
57
|
+
) : item.roleRestricted ? (
|
|
58
|
+
<IconLock className="w-6 h-6" />
|
|
59
|
+
) : (
|
|
60
|
+
<IconArrowRight className="w-6 h-6" />
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
// Locked or role-restricted items should not be clickable
|
|
67
|
+
if (item.locked || item.roleRestricted) {
|
|
68
|
+
return <div className="w-full">{content}</div>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Link to={item.to} className="block w-full">
|
|
73
|
+
{content}
|
|
74
|
+
</Link>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
interface ConfigureSettingsGroupProps {
|
|
79
|
+
group: ConfigureSettingsGroup;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const ConfigureSettingsGroupComponent: React.FC<ConfigureSettingsGroupProps> = ({ group }) => {
|
|
83
|
+
return (
|
|
84
|
+
<div className="flex flex-col gap-3 w-full">
|
|
85
|
+
<h2 className="text-lg font-semibold text-label-primary">{group.title}</h2>
|
|
86
|
+
<div className="grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 gap-2 w-full">
|
|
87
|
+
{group.items.map((item) => (
|
|
88
|
+
<ConfigureSettingsCard key={item.to} item={item} />
|
|
89
|
+
))}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default ConfigureSettingsCard;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '../lib/utils';
|
|
3
|
+
import { IconExclaim } from '../../icons';
|
|
4
|
+
|
|
5
|
+
interface CustomerCardProps {
|
|
6
|
+
customerName: string;
|
|
7
|
+
customerEmail: string;
|
|
8
|
+
customerId?: string;
|
|
9
|
+
age: number;
|
|
10
|
+
nextBookingDate?: string;
|
|
11
|
+
lastBookingDate?: string;
|
|
12
|
+
numberOfBookings?: number;
|
|
13
|
+
status: 'signed' | 'expired' | 'not_signed';
|
|
14
|
+
showWaiverStatus?: boolean;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const WaiverStatusBadge: React.FC<{ status: CustomerCardProps['status'] }> = ({ status }) => {
|
|
19
|
+
const getStatusClasses = () => {
|
|
20
|
+
switch (status) {
|
|
21
|
+
case 'signed':
|
|
22
|
+
return 'bg-surface-status-success text-label-primary border-border-status-success';
|
|
23
|
+
case 'expired':
|
|
24
|
+
return 'bg-surface-status-alert text-label-primary border-border-status-alert';
|
|
25
|
+
case 'not_signed':
|
|
26
|
+
return 'bg-surface-status-error text-label-primary border-border-status-error';
|
|
27
|
+
default:
|
|
28
|
+
return 'bg-surface-status-error text-label-primary border-border-status-error';
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const getLabel = () => {
|
|
33
|
+
switch (status) {
|
|
34
|
+
case 'signed':
|
|
35
|
+
return 'Signed';
|
|
36
|
+
case 'expired':
|
|
37
|
+
return 'Expired';
|
|
38
|
+
case 'not_signed':
|
|
39
|
+
return 'Not Signed';
|
|
40
|
+
default:
|
|
41
|
+
return status;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Expired and Not Signed have icons so use asymmetric padding; Signed uses symmetric
|
|
46
|
+
const hasIcon = status === 'expired' || status === 'not_signed';
|
|
47
|
+
const paddingClass = hasIcon ? 'pl-1.5 pr-2' : 'px-2';
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div className={cn(
|
|
51
|
+
"inline-flex justify-center items-center gap-1 border py-1 rounded-3xl",
|
|
52
|
+
paddingClass,
|
|
53
|
+
getStatusClasses()
|
|
54
|
+
)}>
|
|
55
|
+
{hasIcon && (
|
|
56
|
+
<IconExclaim size={16} className="text-label-primary" />
|
|
57
|
+
)}
|
|
58
|
+
<span className="text-[10px] font-mono font-medium leading-[13px] whitespace-nowrap">
|
|
59
|
+
{getLabel()}
|
|
60
|
+
</span>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const CustomerCard: React.FC<CustomerCardProps> = ({
|
|
66
|
+
customerName,
|
|
67
|
+
customerEmail,
|
|
68
|
+
customerId,
|
|
69
|
+
age,
|
|
70
|
+
nextBookingDate,
|
|
71
|
+
lastBookingDate,
|
|
72
|
+
numberOfBookings,
|
|
73
|
+
status,
|
|
74
|
+
showWaiverStatus = true,
|
|
75
|
+
onClick,
|
|
76
|
+
}) => {
|
|
77
|
+
return (
|
|
78
|
+
<button
|
|
79
|
+
onClick={onClick}
|
|
80
|
+
className={cn(
|
|
81
|
+
"flex flex-col rounded-lg border border-border-primary bg-surface-primary",
|
|
82
|
+
"hover:bg-surface-secondary transition-colors text-left w-full",
|
|
83
|
+
"focus:outline-none focus:ring-2 focus:ring-fill-highlight focus:ring-offset-2"
|
|
84
|
+
)}
|
|
85
|
+
>
|
|
86
|
+
{/* Header: Name, Email, and Age */}
|
|
87
|
+
<div className="w-full px-2">
|
|
88
|
+
<div className="flex items-start gap-3 px-2 pt-4 pb-3 border-b border-border-secondary">
|
|
89
|
+
<div className="flex flex-col gap-0.5 flex-1 min-w-0" style={{ flexBasis: '80%' }}>
|
|
90
|
+
<span className="text-label-primary text-[15px] font-semibold leading-5 truncate">
|
|
91
|
+
{customerName}
|
|
92
|
+
</span>
|
|
93
|
+
<span className="text-label-secondary text-[13px] font-normal leading-4 truncate">
|
|
94
|
+
{customerEmail}
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
<div className="flex flex-col gap-0.5 items-end" style={{ flexBasis: '20%' }}>
|
|
98
|
+
<span className="text-label-secondary text-[13px] font-medium leading-4">
|
|
99
|
+
Age
|
|
100
|
+
</span>
|
|
101
|
+
<span className="text-label-primary text-[13px] font-normal">
|
|
102
|
+
{age}
|
|
103
|
+
</span>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
{/* Details Row - Next Booking and Waiver side by side */}
|
|
109
|
+
{showWaiverStatus ? (
|
|
110
|
+
<div className="w-full px-2">
|
|
111
|
+
<div className="flex items-center justify-between px-2 py-3">
|
|
112
|
+
<div className="flex flex-col gap-0.5">
|
|
113
|
+
<span className="text-label-secondary text-[13px] font-medium leading-4">
|
|
114
|
+
Next Booking
|
|
115
|
+
</span>
|
|
116
|
+
<span className="text-label-primary text-[13px] font-normal">
|
|
117
|
+
{nextBookingDate || '—'}
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="flex flex-col items-end gap-1">
|
|
121
|
+
<span className="text-label-secondary text-[11px] font-medium leading-3">
|
|
122
|
+
Waiver
|
|
123
|
+
</span>
|
|
124
|
+
<WaiverStatusBadge status={status} />
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
) : (
|
|
129
|
+
<div className="w-full px-2">
|
|
130
|
+
<div className="grid grid-cols-2 gap-3 px-2 py-3">
|
|
131
|
+
<div className="flex flex-col gap-0.5">
|
|
132
|
+
<span className="text-label-secondary text-[13px] font-medium leading-4">
|
|
133
|
+
Next Booking
|
|
134
|
+
</span>
|
|
135
|
+
<span className="text-label-primary text-[13px] font-normal">
|
|
136
|
+
{nextBookingDate || '—'}
|
|
137
|
+
</span>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<div className="flex flex-col gap-0.5">
|
|
141
|
+
<span className="text-label-secondary text-[13px] font-medium leading-4">
|
|
142
|
+
Last Booking
|
|
143
|
+
</span>
|
|
144
|
+
<span className="text-label-primary text-[13px] font-normal">
|
|
145
|
+
{lastBookingDate || '—'}
|
|
146
|
+
</span>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
)}
|
|
151
|
+
</button>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export default CustomerCard;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconTrendUp, IconTrendDown } from '../../icons';
|
|
3
|
+
|
|
4
|
+
interface DashboardCardProps {
|
|
5
|
+
title: string;
|
|
6
|
+
value: string;
|
|
7
|
+
change: string;
|
|
8
|
+
trend: 'up' | 'down';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const DashboardCard: React.FC<DashboardCardProps> = ({ title, value, change, trend }) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className="bg-surface-secondary rounded-xl p-5 border border-border-primary">
|
|
14
|
+
<p className="text-label-secondary text-sm font-medium mb-2">{title}</p>
|
|
15
|
+
<p className="text-label-primary text-2xl font-semibold mb-2">{value}</p>
|
|
16
|
+
<div className="flex items-center gap-1.5">
|
|
17
|
+
{trend === 'up' ? (
|
|
18
|
+
<IconTrendUp size={16} />
|
|
19
|
+
) : (
|
|
20
|
+
<IconTrendDown size={16} />
|
|
21
|
+
)}
|
|
22
|
+
<span className={`text-sm font-medium ${trend === 'up' ? 'text-fill-status-success' : 'text-fill-status-error'}`}>
|
|
23
|
+
{change}
|
|
24
|
+
</span>
|
|
25
|
+
<span className="text-label-tertiary text-sm">vs last month</span>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const DashboardCards: React.FC = () => {
|
|
32
|
+
const cards: DashboardCardProps[] = [
|
|
33
|
+
{ title: 'Total Bookings', value: '1,234', change: '+12.5%', trend: 'up' },
|
|
34
|
+
{ title: 'Revenue', value: '£45,678', change: '+8.2%', trend: 'up' },
|
|
35
|
+
{ title: 'New Customers', value: '89', change: '-3.1%', trend: 'down' },
|
|
36
|
+
{ title: 'Avg. Booking Value', value: '£37.02', change: '+5.7%', trend: 'up' },
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className="mt-6">
|
|
41
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
42
|
+
{cards.map((card) => (
|
|
43
|
+
<DashboardCard key={card.title} {...card} />
|
|
44
|
+
))}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default DashboardCards;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const DashboardFooter: React.FC = () => {
|
|
2
|
+
const currentYear = new Date().getFullYear();
|
|
3
|
+
|
|
4
|
+
return (
|
|
5
|
+
<footer className="border-t border-border-primary p-4 mt-auto w-full">
|
|
6
|
+
<div className="flex items-center justify-between text-label-secondary w-full">
|
|
7
|
+
<div className="text-[10px] leading-3 font-mono">
|
|
8
|
+
Version: <span className="font-semibold">1.0.0</span>
|
|
9
|
+
</div>
|
|
10
|
+
<div className="text-[10px] leading-3 font-mono font-semibold">
|
|
11
|
+
© Booked it {currentYear}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</footer>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default DashboardFooter;
|