@licklist/design 0.78.5-dev.105 → 0.78.5-dev.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +3 -0
- package/bitbucket-pipelines.yml +13 -4
- package/dist/index.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +0 -24
- package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/v2/components/DataTable/DataTable.js +86 -2
- package/dist/v2/components/InputCheckbox/InputCheckbox.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +13 -11
- package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/v2/components/Toggle/Toggle.js +8 -5
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/components/index.d.ts +1 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/icons/index.d.ts +4 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/icons/index.js +47 -16
- package/dist/v2/index.d.ts +0 -4
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
- package/package.json +6 -6
- package/rollup.config.js +16 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
- package/src/product-set/form/ProductsControl.tsx +2 -1
- package/src/v2/components/DataTable/DataTable.tsx +23 -1
- package/src/v2/components/InputCheckbox/InputCheckbox.scss +6 -6
- package/src/v2/components/Modal/DeleteModal.tsx +12 -20
- package/src/v2/components/Toggle/Toggle.tsx +6 -5
- package/src/v2/components/ZoneCard/ZoneCard.scss +78 -0
- package/src/v2/components/index.ts +1 -0
- package/src/v2/icons/index.tsx +10 -0
- package/src/v2/index.ts +0 -73
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- package/dist/v2/shadcn/components/ui/accordion.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +0 -21
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +0 -4
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/avatar.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/badge.d.ts +0 -10
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/button.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/button.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/calendar.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/calendar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/card.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/carousel.d.ts +0 -19
- package/dist/v2/shadcn/components/ui/carousel.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.js +0 -115
- package/dist/v2/shadcn/components/ui/checkbox.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/command.d.ts +0 -83
- package/dist/v2/shadcn/components/ui/command.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.js +0 -169
- package/dist/v2/shadcn/components/ui/drawer.d.ts +0 -23
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/form.d.ts +0 -24
- package/dist/v2/shadcn/components/ui/form.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +0 -35
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/input.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/label.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/label.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/menubar.d.ts +0 -34
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/pagination.d.ts +0 -29
- package/dist/v2/shadcn/components/ui/pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/popover.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/progress.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-card.d.ts +0 -12
- package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/select.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/select.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/separator.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sheet.d.ts +0 -26
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +0 -67
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/skeleton.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/slider.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.js +0 -115
- package/dist/v2/shadcn/components/ui/switch.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/table.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tabs.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/textarea.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/textarea.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toast.d.ts +0 -16
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toaster.d.ts +0 -2
- package/dist/v2/shadcn/components/ui/toaster.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tooltip.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/use-toast.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-mobile.d.ts +0 -2
- package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-toast.d.ts +0 -45
- package/dist/v2/shadcn/hooks/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/index.d.ts +0 -20
- package/dist/v2/shadcn/index.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.d.ts +0 -3
- package/dist/v2/shadcn/lib/utils.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.js +0 -11
- package/dist/v2/shadcn/styles/globals.css +0 -112
- package/src/v2/shadcn/_reference/AccountManagerCard.tsx +0 -45
- package/src/v2/shadcn/_reference/AffiliatesTable.tsx +0 -178
- package/src/v2/shadcn/_reference/AuditArchive.tsx +0 -165
- package/src/v2/shadcn/_reference/AuditContent.tsx +0 -270
- package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +0 -251
- package/src/v2/shadcn/_reference/AvatarUpload.tsx +0 -150
- package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +0 -268
- package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +0 -274
- package/src/v2/shadcn/_reference/CompaniesTable.tsx +0 -387
- package/src/v2/shadcn/_reference/ComponentAudit.tsx +0 -239
- package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +0 -95
- package/src/v2/shadcn/_reference/CustomerCard.tsx +0 -155
- package/src/v2/shadcn/_reference/DashboardCards.tsx +0 -50
- package/src/v2/shadcn/_reference/DashboardFooter.tsx +0 -18
- package/src/v2/shadcn/_reference/DiarySettings.tsx +0 -187
- package/src/v2/shadcn/_reference/DiaryView.tsx +0 -998
- package/src/v2/shadcn/_reference/EmptyState.tsx +0 -76
- package/src/v2/shadcn/_reference/EntityInfoCard.tsx +0 -48
- package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +0 -131
- package/src/v2/shadcn/_reference/FeatureToggle.tsx +0 -72
- package/src/v2/shadcn/_reference/FlowCard.tsx +0 -170
- package/src/v2/shadcn/_reference/FlowsContent.tsx +0 -688
- package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +0 -27
- package/src/v2/shadcn/_reference/GeneralSettings.tsx +0 -33
- package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +0 -82
- package/src/v2/shadcn/_reference/LanguageSelector.tsx +0 -97
- package/src/v2/shadcn/_reference/LoadingScreen.tsx +0 -25
- package/src/v2/shadcn/_reference/LoadingSpinner.tsx +0 -41
- package/src/v2/shadcn/_reference/ManagedClientsList.tsx +0 -121
- package/src/v2/shadcn/_reference/NPSScore.tsx +0 -379
- package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +0 -181
- package/src/v2/shadcn/_reference/NotificationBanner.tsx +0 -129
- package/src/v2/shadcn/_reference/NotificationPanel.tsx +0 -208
- package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +0 -73
- package/src/v2/shadcn/_reference/ProtectedRoute.tsx +0 -39
- package/src/v2/shadcn/_reference/ProvidersTable.tsx +0 -353
- package/src/v2/shadcn/_reference/QuickAddPanel.tsx +0 -1057
- package/src/v2/shadcn/_reference/QuickFilters.tsx +0 -112
- package/src/v2/shadcn/_reference/ScheduleView.tsx +0 -410
- package/src/v2/shadcn/_reference/ScrollToTop.tsx +0 -14
- package/src/v2/shadcn/_reference/SecondaryNav.tsx +0 -50
- package/src/v2/shadcn/_reference/SecuritySettings.tsx +0 -258
- package/src/v2/shadcn/_reference/SessionDetailView.tsx +0 -294
- package/src/v2/shadcn/_reference/Sidebar.tsx +0 -14
- package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +0 -30
- package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +0 -285
- package/src/v2/shadcn/_reference/SimulationBanner.tsx +0 -57
- package/src/v2/shadcn/_reference/SortControls.tsx +0 -65
- package/src/v2/shadcn/_reference/StatusBadge.tsx +0 -49
- package/src/v2/shadcn/_reference/StyleGuideContent.tsx +0 -331
- package/src/v2/shadcn/_reference/TableActionMenu.tsx +0 -126
- package/src/v2/shadcn/_reference/ThemeProvider.tsx +0 -119
- package/src/v2/shadcn/_reference/ThemeSettings.tsx +0 -73
- package/src/v2/shadcn/_reference/TopNavigation.tsx +0 -332
- package/src/v2/shadcn/_reference/UserActivityHistory.tsx +0 -209
- package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +0 -94
- package/src/v2/shadcn/_reference/UserPanel.tsx +0 -472
- package/src/v2/shadcn/_reference/UsersTable.tsx +0 -1023
- package/src/v2/shadcn/_reference/WaiverForm.tsx +0 -301
- package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +0 -46
- package/src/v2/shadcn/_reference/WaiversTable.tsx +0 -290
- package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +0 -416
- package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +0 -313
- package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +0 -36
- package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +0 -298
- package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +0 -40
- package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +0 -142
- package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +0 -55
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +0 -285
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +0 -14
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +0 -205
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +0 -41
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +0 -102
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +0 -95
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +0 -119
- package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +0 -92
- package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +0 -64
- package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +0 -41
- package/src/v2/shadcn/_reference/email/emailTemplateData.ts +0 -53
- package/src/v2/shadcn/_reference/emptyStateIcons.tsx +0 -103
- package/src/v2/shadcn/_reference/games/MazeGame.tsx +0 -394
- package/src/v2/shadcn/_reference/games/RunnerGame.tsx +0 -497
- package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +0 -36
- package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +0 -31
- package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +0 -36
- package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +0 -401
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +0 -77
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +0 -218
- package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +0 -810
- package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +0 -152
- package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +0 -377
- package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +0 -213
- package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +0 -39
- package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +0 -184
- package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +0 -677
- package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +0 -40
- package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +0 -238
- package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +0 -131
- package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +0 -192
- package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +0 -342
- package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +0 -322
- package/src/v2/shadcn/_reference/products/PricingSection.tsx +0 -173
- package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +0 -353
- package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +0 -95
- package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +0 -140
- package/src/v2/shadcn/_reference/products/productTypeConfig.ts +0 -182
- package/src/v2/shadcn/_reference/shared/BackButton.tsx +0 -50
- package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +0 -136
- package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +0 -221
- package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +0 -108
- package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +0 -722
- package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +0 -68
- package/src/v2/shadcn/_reference/tables/DataTable.tsx +0 -221
- package/src/v2/shadcn/_reference/tables/TableControls.tsx +0 -94
- package/src/v2/shadcn/_reference/tables/index.ts +0 -3
- package/src/v2/shadcn/_reference/tables/types.ts +0 -79
- package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +0 -299
- package/src/v2/shadcn/components/ui/accordion.stories.tsx +0 -63
- package/src/v2/shadcn/components/ui/accordion.tsx +0 -52
- package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert-dialog.tsx +0 -104
- package/src/v2/shadcn/components/ui/alert.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert.tsx +0 -43
- package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/aspect-ratio.tsx +0 -5
- package/src/v2/shadcn/components/ui/avatar.stories.tsx +0 -39
- package/src/v2/shadcn/components/ui/avatar.tsx +0 -38
- package/src/v2/shadcn/components/ui/badge.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/badge.tsx +0 -30
- package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +0 -91
- package/src/v2/shadcn/components/ui/breadcrumb.tsx +0 -90
- package/src/v2/shadcn/components/ui/button.stories.tsx +0 -20
- package/src/v2/shadcn/components/ui/button.tsx +0 -60
- package/src/v2/shadcn/components/ui/calendar.stories.tsx +0 -61
- package/src/v2/shadcn/components/ui/calendar.tsx +0 -54
- package/src/v2/shadcn/components/ui/card.stories.tsx +0 -37
- package/src/v2/shadcn/components/ui/card.tsx +0 -43
- package/src/v2/shadcn/components/ui/carousel.stories.tsx +0 -92
- package/src/v2/shadcn/components/ui/carousel.tsx +0 -224
- package/src/v2/shadcn/components/ui/checkbox.scss +0 -38
- package/src/v2/shadcn/components/ui/checkbox.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/checkbox.tsx +0 -24
- package/src/v2/shadcn/components/ui/collapsible.stories.tsx +0 -59
- package/src/v2/shadcn/components/ui/collapsible.tsx +0 -9
- package/src/v2/shadcn/components/ui/command.stories.tsx +0 -70
- package/src/v2/shadcn/components/ui/command.tsx +0 -132
- package/src/v2/shadcn/components/ui/context-menu.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/context-menu.tsx +0 -178
- package/src/v2/shadcn/components/ui/dialog.stories.tsx +0 -67
- package/src/v2/shadcn/components/ui/dialog.tsx +0 -95
- package/src/v2/shadcn/components/ui/drawer.stories.tsx +0 -50
- package/src/v2/shadcn/components/ui/drawer.tsx +0 -87
- package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +0 -73
- package/src/v2/shadcn/components/ui/dropdown-menu.tsx +0 -179
- package/src/v2/shadcn/components/ui/form.stories.tsx +0 -105
- package/src/v2/shadcn/components/ui/form.tsx +0 -129
- package/src/v2/shadcn/components/ui/hover-card.stories.tsx +0 -35
- package/src/v2/shadcn/components/ui/hover-card.tsx +0 -27
- package/src/v2/shadcn/components/ui/input-otp.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/input-otp.tsx +0 -61
- package/src/v2/shadcn/components/ui/input.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/input.tsx +0 -25
- package/src/v2/shadcn/components/ui/label.stories.tsx +0 -13
- package/src/v2/shadcn/components/ui/label.tsx +0 -17
- package/src/v2/shadcn/components/ui/menubar.stories.tsx +0 -86
- package/src/v2/shadcn/components/ui/menubar.tsx +0 -207
- package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/navigation-menu.tsx +0 -120
- package/src/v2/shadcn/components/ui/pagination.stories.tsx +0 -78
- package/src/v2/shadcn/components/ui/pagination.tsx +0 -81
- package/src/v2/shadcn/components/ui/popover.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/popover.tsx +0 -29
- package/src/v2/shadcn/components/ui/progress.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/progress.tsx +0 -23
- package/src/v2/shadcn/components/ui/radio-card.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/radio-card.tsx +0 -52
- package/src/v2/shadcn/components/ui/radio-group.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/radio-group.tsx +0 -35
- package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +0 -56
- package/src/v2/shadcn/components/ui/scroll-area.tsx +0 -38
- package/src/v2/shadcn/components/ui/select.stories.tsx +0 -60
- package/src/v2/shadcn/components/ui/select.tsx +0 -148
- package/src/v2/shadcn/components/ui/separator.stories.tsx +0 -30
- package/src/v2/shadcn/components/ui/separator.tsx +0 -20
- package/src/v2/shadcn/components/ui/sheet.stories.tsx +0 -115
- package/src/v2/shadcn/components/ui/sheet.tsx +0 -107
- package/src/v2/shadcn/components/ui/sidebar.stories.tsx +0 -167
- package/src/v2/shadcn/components/ui/sidebar.tsx +0 -637
- package/src/v2/shadcn/components/ui/skeleton.stories.tsx +0 -36
- package/src/v2/shadcn/components/ui/skeleton.tsx +0 -7
- package/src/v2/shadcn/components/ui/slider.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/slider.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.scss +0 -63
- package/src/v2/shadcn/components/ui/switch.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.tsx +0 -24
- package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +0 -81
- package/src/v2/shadcn/components/ui/table-pagination.tsx +0 -61
- package/src/v2/shadcn/components/ui/table.stories.tsx +0 -40
- package/src/v2/shadcn/components/ui/table.tsx +0 -72
- package/src/v2/shadcn/components/ui/tabs.stories.tsx +0 -85
- package/src/v2/shadcn/components/ui/tabs.tsx +0 -53
- package/src/v2/shadcn/components/ui/textarea.stories.tsx +0 -15
- package/src/v2/shadcn/components/ui/textarea.tsx +0 -21
- package/src/v2/shadcn/components/ui/toast.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/toast.tsx +0 -111
- package/src/v2/shadcn/components/ui/toaster.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/toaster.tsx +0 -24
- package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +0 -95
- package/src/v2/shadcn/components/ui/toggle-group.tsx +0 -49
- package/src/v2/shadcn/components/ui/toggle.stories.tsx +0 -18
- package/src/v2/shadcn/components/ui/toggle.tsx +0 -37
- package/src/v2/shadcn/components/ui/tooltip.stories.tsx +0 -57
- package/src/v2/shadcn/components/ui/tooltip.tsx +0 -28
- package/src/v2/shadcn/components/ui/use-toast.ts +0 -3
- package/src/v2/shadcn/hooks/use-mobile.tsx +0 -19
- package/src/v2/shadcn/hooks/use-toast.ts +0 -184
- package/src/v2/shadcn/index.ts +0 -76
- package/src/v2/shadcn/lib/utils.ts +0 -6
- package/src/v2/shadcn/styles/globals.css +0 -112
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from '../ui/button';
|
|
3
|
-
import * as Icons from '../../../icons';
|
|
4
|
-
|
|
5
|
-
type IconName = 'arrow-left' | 'arrow-right' | 'update' | 'delete' | 'mail' | 'tick' | string;
|
|
6
|
-
|
|
7
|
-
const iconMap: Record<string, React.FC<{ className?: string }>> = {
|
|
8
|
-
'delete': Icons.IconDelete,
|
|
9
|
-
'mail': Icons.IconMail,
|
|
10
|
-
'tick': Icons.IconTick,
|
|
11
|
-
'update': Icons.IconUpdate,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
interface BulkAction {
|
|
15
|
-
label: string;
|
|
16
|
-
icon?: IconName;
|
|
17
|
-
onClick: () => void;
|
|
18
|
-
variant?: 'default' | 'ghost' | 'destructive';
|
|
19
|
-
dangerSoft?: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface BulkActionsBarProps {
|
|
23
|
-
selectedCount: number;
|
|
24
|
-
actions: BulkAction[];
|
|
25
|
-
onClearSelection: () => void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const BulkActionsBar: React.FC<BulkActionsBarProps> = ({
|
|
29
|
-
selectedCount,
|
|
30
|
-
actions,
|
|
31
|
-
onClearSelection,
|
|
32
|
-
}) => {
|
|
33
|
-
return (
|
|
34
|
-
<div className="flex items-center justify-between gap-4 w-full px-4 py-3 bg-surface-primary border-b border-border-primary">
|
|
35
|
-
<div className="flex items-center gap-3">
|
|
36
|
-
<span className="text-[13px] font-medium text-label-secondary">
|
|
37
|
-
{selectedCount} {selectedCount === 1 ? 'item' : 'items'} selected
|
|
38
|
-
</span>
|
|
39
|
-
<button
|
|
40
|
-
onClick={onClearSelection}
|
|
41
|
-
className="text-[13px] font-medium text-label-primary hover:text-label-secondary transition-colors"
|
|
42
|
-
>
|
|
43
|
-
Clear
|
|
44
|
-
</button>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div className="flex items-center gap-2">
|
|
48
|
-
{actions.map((action, index) => {
|
|
49
|
-
const IconComp = action.icon ? iconMap[action.icon] : null;
|
|
50
|
-
const isDangerSoft = action.icon === 'delete' || action.dangerSoft;
|
|
51
|
-
return (
|
|
52
|
-
<Button
|
|
53
|
-
key={index}
|
|
54
|
-
variant={action.variant || 'ghost'}
|
|
55
|
-
size="sm"
|
|
56
|
-
onClick={action.onClick}
|
|
57
|
-
withIcon={!!IconComp}
|
|
58
|
-
className={isDangerSoft ? 'bg-surface-danger-soft border-transparent [&_path]:fill-fill-danger text-label-danger hover:!bg-surface-danger-soft-hover' : ''}
|
|
59
|
-
>
|
|
60
|
-
{IconComp && <IconComp className="w-4 h-4 fill-current" />}
|
|
61
|
-
{action.label}
|
|
62
|
-
</Button>
|
|
63
|
-
);
|
|
64
|
-
})}
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import React, { useState, useMemo } from 'react';
|
|
2
|
-
import { DataTableProps } from './types';
|
|
3
|
-
import TableActionMenu, { MenuItem } from '../TableActionMenu';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { Checkbox } from '../ui/checkbox';
|
|
6
|
-
import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
7
|
-
import { TablePagination } from '../ui/table-pagination';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* DataTable - Generic, type-safe table component
|
|
11
|
-
* Supports optional row clicks, actions, icons, checkboxes, and custom rendering
|
|
12
|
-
*/
|
|
13
|
-
export function DataTable<T>({
|
|
14
|
-
data,
|
|
15
|
-
columns,
|
|
16
|
-
keyExtractor,
|
|
17
|
-
onRowClick,
|
|
18
|
-
rowActions,
|
|
19
|
-
rowQuickActions,
|
|
20
|
-
rowIcon,
|
|
21
|
-
emptyState,
|
|
22
|
-
className,
|
|
23
|
-
selectable = false,
|
|
24
|
-
selectedItems = [],
|
|
25
|
-
onSelectionChange,
|
|
26
|
-
sortKey,
|
|
27
|
-
sortDirection,
|
|
28
|
-
onSort,
|
|
29
|
-
pagination,
|
|
30
|
-
}: DataTableProps<T>) {
|
|
31
|
-
const [currentPage, setCurrentPage] = useState(1);
|
|
32
|
-
const itemsPerPage = 24;
|
|
33
|
-
|
|
34
|
-
// Calculate pagination
|
|
35
|
-
const paginatedData = useMemo(() => {
|
|
36
|
-
if (!pagination) return data;
|
|
37
|
-
const startIndex = (currentPage - 1) * itemsPerPage;
|
|
38
|
-
const endIndex = startIndex + itemsPerPage;
|
|
39
|
-
return data.slice(startIndex, endIndex);
|
|
40
|
-
}, [data, currentPage, pagination]);
|
|
41
|
-
|
|
42
|
-
const totalPages = Math.ceil(data.length / itemsPerPage);
|
|
43
|
-
|
|
44
|
-
const displayData = pagination ? paginatedData : data;
|
|
45
|
-
const allItemIds = displayData.map(keyExtractor);
|
|
46
|
-
const isAllSelected = displayData.length > 0 && selectedItems.length === displayData.length;
|
|
47
|
-
const isSomeSelected = selectedItems.length > 0 && selectedItems.length < displayData.length;
|
|
48
|
-
|
|
49
|
-
const handleSelectAll = () => {
|
|
50
|
-
if (isAllSelected) {
|
|
51
|
-
onSelectionChange?.([]);
|
|
52
|
-
} else {
|
|
53
|
-
onSelectionChange?.(allItemIds);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const handleSelectItem = (itemId: string) => {
|
|
58
|
-
if (selectedItems.includes(itemId)) {
|
|
59
|
-
onSelectionChange?.(selectedItems.filter(id => id !== itemId));
|
|
60
|
-
} else {
|
|
61
|
-
onSelectionChange?.([...selectedItems, itemId]);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<div className={cn("flex flex-col w-full overflow-hidden", className)}>
|
|
67
|
-
{/* Table Header */}
|
|
68
|
-
<div className="flex h-12 items-center self-stretch bg-surface-secondary px-4 border-b border-border-primary gap-4 min-w-0 overflow-hidden">
|
|
69
|
-
{selectable && (
|
|
70
|
-
<div className="flex-shrink-0 w-4">
|
|
71
|
-
<Checkbox
|
|
72
|
-
checked={isAllSelected}
|
|
73
|
-
onCheckedChange={handleSelectAll}
|
|
74
|
-
aria-label="Select all"
|
|
75
|
-
className={cn(isSomeSelected && "data-[state=checked]:bg-primary")}
|
|
76
|
-
/>
|
|
77
|
-
</div>
|
|
78
|
-
)}
|
|
79
|
-
{!selectable && rowIcon && <div className="flex-shrink-0 w-[20px]"></div>}
|
|
80
|
-
{columns.map((column, index) => {
|
|
81
|
-
const isSorted = column.sortKey && sortKey === column.sortKey;
|
|
82
|
-
const canSort = column.sortable && column.sortKey && onSort;
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<div
|
|
86
|
-
key={index}
|
|
87
|
-
className={cn(
|
|
88
|
-
"text-label-secondary text-[13px] font-medium leading-4 flex items-center gap-1",
|
|
89
|
-
column.width || (index === 0 ? "flex-1" : ""),
|
|
90
|
-
column.labelClassName,
|
|
91
|
-
column.className,
|
|
92
|
-
canSort && "cursor-pointer hover:text-label-primary transition-colors select-none"
|
|
93
|
-
)}
|
|
94
|
-
onClick={() => canSort && onSort(column.sortKey!)}
|
|
95
|
-
>
|
|
96
|
-
{column.label}
|
|
97
|
-
{canSort && (
|
|
98
|
-
<span className="flex-shrink-0">
|
|
99
|
-
{isSorted ? (
|
|
100
|
-
sortDirection === 'asc' ? (
|
|
101
|
-
<ChevronUp className="w-3.5 h-3.5" />
|
|
102
|
-
) : (
|
|
103
|
-
<ChevronDown className="w-3.5 h-3.5" />
|
|
104
|
-
)
|
|
105
|
-
) : (
|
|
106
|
-
<ChevronDown className="w-3.5 h-3.5 opacity-0 group-hover:opacity-40" />
|
|
107
|
-
)}
|
|
108
|
-
</span>
|
|
109
|
-
)}
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
})}
|
|
113
|
-
{(rowQuickActions || rowActions) && <div className={cn("flex-shrink-0", rowQuickActions ? "w-[80px]" : "w-[40px]")}></div>}
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
{/* Table Body */}
|
|
117
|
-
<div className="flex flex-col relative">
|
|
118
|
-
{displayData.length === 0 ? (
|
|
119
|
-
<div className="flex items-center justify-center">
|
|
120
|
-
{emptyState || (
|
|
121
|
-
<div className="py-12 text-label-secondary">No data found</div>
|
|
122
|
-
)}
|
|
123
|
-
</div>
|
|
124
|
-
) : (
|
|
125
|
-
displayData.map((item) => {
|
|
126
|
-
const key = keyExtractor(item);
|
|
127
|
-
const actions = rowActions?.(item);
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<div
|
|
131
|
-
key={key}
|
|
132
|
-
className={cn(
|
|
133
|
-
"group flex items-center self-stretch px-4 py-4 border-b border-border-primary last:border-b-0 hover:bg-surface-primary-hover transition-colors gap-4 min-w-0 overflow-hidden",
|
|
134
|
-
onRowClick && "cursor-pointer"
|
|
135
|
-
)}
|
|
136
|
-
onClick={() => onRowClick?.(item)}
|
|
137
|
-
>
|
|
138
|
-
{/* Checkbox or Icon */}
|
|
139
|
-
{selectable ? (
|
|
140
|
-
<div
|
|
141
|
-
className="flex-shrink-0 w-4"
|
|
142
|
-
onClick={(e) => e.stopPropagation()}
|
|
143
|
-
>
|
|
144
|
-
<Checkbox
|
|
145
|
-
checked={selectedItems.includes(key)}
|
|
146
|
-
onCheckedChange={() => handleSelectItem(key)}
|
|
147
|
-
aria-label={`Select item ${key}`}
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
) : rowIcon ? (
|
|
151
|
-
<div className="flex-shrink-0 w-[20px]">
|
|
152
|
-
{rowIcon(item)}
|
|
153
|
-
</div>
|
|
154
|
-
) : null}
|
|
155
|
-
|
|
156
|
-
{/* Column Values */}
|
|
157
|
-
{columns.map((column, colIndex) => {
|
|
158
|
-
let content: React.ReactNode;
|
|
159
|
-
|
|
160
|
-
if (column.render) {
|
|
161
|
-
content = column.render(item);
|
|
162
|
-
} else if (column.accessor) {
|
|
163
|
-
if (typeof column.accessor === 'function') {
|
|
164
|
-
content = column.accessor(item);
|
|
165
|
-
} else {
|
|
166
|
-
content = String(item[column.accessor] ?? '');
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return (
|
|
171
|
-
<div
|
|
172
|
-
key={colIndex}
|
|
173
|
-
className={cn(
|
|
174
|
-
"text-label-primary text-[13px] font-normal leading-4",
|
|
175
|
-
column.width || (colIndex === 0 ? "flex-1" : ""),
|
|
176
|
-
column.className
|
|
177
|
-
)}
|
|
178
|
-
>
|
|
179
|
-
{content}
|
|
180
|
-
</div>
|
|
181
|
-
);
|
|
182
|
-
})}
|
|
183
|
-
|
|
184
|
-
{/* Quick Actions & Action Menu */}
|
|
185
|
-
{(rowQuickActions || (actions && actions.length > 0)) && (
|
|
186
|
-
<div
|
|
187
|
-
className={cn("flex items-center justify-end gap-1 flex-shrink-0", rowQuickActions ? "w-[80px]" : "w-[40px]")}
|
|
188
|
-
onClick={(e) => e.stopPropagation()}
|
|
189
|
-
>
|
|
190
|
-
{rowQuickActions?.(item)}
|
|
191
|
-
{actions && actions.length > 0 && (
|
|
192
|
-
<TableActionMenu
|
|
193
|
-
items={actions.map(action => ({
|
|
194
|
-
label: action.label,
|
|
195
|
-
onClick: () => action.onClick(item),
|
|
196
|
-
variant: action.variant
|
|
197
|
-
}) as MenuItem)}
|
|
198
|
-
/>
|
|
199
|
-
)}
|
|
200
|
-
</div>
|
|
201
|
-
)}
|
|
202
|
-
</div>
|
|
203
|
-
);
|
|
204
|
-
})
|
|
205
|
-
)}
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
{/* Pagination */}
|
|
209
|
-
{pagination && data.length > itemsPerPage && (
|
|
210
|
-
<TablePagination
|
|
211
|
-
currentPage={currentPage}
|
|
212
|
-
totalPages={totalPages}
|
|
213
|
-
totalItems={data.length}
|
|
214
|
-
itemsPerPage={itemsPerPage}
|
|
215
|
-
onPageChange={setCurrentPage}
|
|
216
|
-
entityName={pagination.entityName}
|
|
217
|
-
/>
|
|
218
|
-
)}
|
|
219
|
-
</div>
|
|
220
|
-
);
|
|
221
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Input } from '../ui/input';
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { TableControlsProps } from './types';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* TableControls - Reusable search, filter, and action controls for tables
|
|
8
|
-
* Can be used independently or with DataTable component
|
|
9
|
-
*/
|
|
10
|
-
export const TableControls: React.FC<TableControlsProps> = ({
|
|
11
|
-
searchConfig,
|
|
12
|
-
filters,
|
|
13
|
-
actions,
|
|
14
|
-
filterLabel = 'Quick Filters:'
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<div className="flex flex-col gap-4">
|
|
18
|
-
{/* Search and Actions Row */}
|
|
19
|
-
{(searchConfig || actions) && (
|
|
20
|
-
<div className="flex justify-between items-start gap-4 flex-wrap">
|
|
21
|
-
{/* Search Input */}
|
|
22
|
-
{searchConfig && (
|
|
23
|
-
<div className="flex flex-col gap-2 flex-1 min-w-0 max-sm:w-full sm:min-w-[280px] sm:max-w-[480px]">
|
|
24
|
-
{searchConfig.label && (
|
|
25
|
-
<label className="text-label-primary text-[13px] font-medium">
|
|
26
|
-
{searchConfig.label}
|
|
27
|
-
</label>
|
|
28
|
-
)}
|
|
29
|
-
<Input
|
|
30
|
-
placeholder={searchConfig.placeholder || 'Search...'}
|
|
31
|
-
value={searchConfig.value}
|
|
32
|
-
onChange={(e) => searchConfig.onChange(e.target.value)}
|
|
33
|
-
className="w-full"
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
36
|
-
)}
|
|
37
|
-
|
|
38
|
-
{/* Header Actions */}
|
|
39
|
-
{actions && actions.length > 0 && (
|
|
40
|
-
<div className="flex gap-2 flex-shrink-0" style={{ marginTop: searchConfig?.label ? '22px' : '0' }}>
|
|
41
|
-
{actions.map((action, index) => (
|
|
42
|
-
<Button
|
|
43
|
-
key={index}
|
|
44
|
-
variant={action.variant || 'default'}
|
|
45
|
-
size={action.size || 'default'}
|
|
46
|
-
withIcon={action.withIcon ?? !!action.icon}
|
|
47
|
-
onClick={action.onClick}
|
|
48
|
-
className="max-sm:h-9 max-sm:px-3 max-sm:text-sm"
|
|
49
|
-
>
|
|
50
|
-
{action.icon}
|
|
51
|
-
{/* Show mobile label on small screens, full label on larger */}
|
|
52
|
-
{action.mobileLabel ? (
|
|
53
|
-
<>
|
|
54
|
-
<span className="hidden sm:inline">{action.label}</span>
|
|
55
|
-
<span className="sm:hidden">{action.mobileLabel}</span>
|
|
56
|
-
</>
|
|
57
|
-
) : (
|
|
58
|
-
action.label
|
|
59
|
-
)}
|
|
60
|
-
</Button>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
)}
|
|
66
|
-
|
|
67
|
-
{/* Quick Filters */}
|
|
68
|
-
{filters && filters.length > 0 && (
|
|
69
|
-
<div className="flex items-center gap-2 max-sm:overflow-x-auto max-sm:overflow-y-hidden max-sm:-mx-4 max-sm:px-4 max-sm:scrollbar-hide">
|
|
70
|
-
<span className="text-label-secondary text-[13px] font-medium whitespace-nowrap flex-shrink-0">
|
|
71
|
-
{filterLabel}
|
|
72
|
-
</span>
|
|
73
|
-
<div className="flex gap-2 flex-shrink-0">
|
|
74
|
-
{filters.map((filter, index) => (
|
|
75
|
-
<Button
|
|
76
|
-
key={index}
|
|
77
|
-
variant={filter.isActive ? 'default' : 'outline'}
|
|
78
|
-
size="sm"
|
|
79
|
-
onClick={filter.onClick}
|
|
80
|
-
className={`text-[11px] font-mono rounded-full px-3 whitespace-nowrap flex-shrink-0 h-8 min-w-0 border ${
|
|
81
|
-
filter.isActive
|
|
82
|
-
? 'bg-fill-primary hover:bg-fill-primary/90 active:bg-fill-primary/80 border-transparent border-0'
|
|
83
|
-
: 'border-border-primary'
|
|
84
|
-
}`}
|
|
85
|
-
>
|
|
86
|
-
{filter.label}
|
|
87
|
-
</Button>
|
|
88
|
-
))}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
)}
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
// Core column configuration
|
|
4
|
-
export interface ColumnConfig<T> {
|
|
5
|
-
label: string;
|
|
6
|
-
accessor?: keyof T | ((item: T) => any);
|
|
7
|
-
render?: (item: T) => ReactNode;
|
|
8
|
-
width?: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
labelClassName?: string;
|
|
11
|
-
sortKey?: string;
|
|
12
|
-
sortable?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Search configuration
|
|
16
|
-
export interface SearchConfig {
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
value: string;
|
|
19
|
-
onChange: (value: string) => void;
|
|
20
|
-
label?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Filter configuration
|
|
24
|
-
export interface FilterConfig {
|
|
25
|
-
label: string;
|
|
26
|
-
value: string;
|
|
27
|
-
onClick: () => void;
|
|
28
|
-
isActive: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Header action button
|
|
32
|
-
export interface HeaderAction {
|
|
33
|
-
label: string;
|
|
34
|
-
mobileLabel?: string; // Shorter label for mobile (e.g., "Add" instead of "Add Customer")
|
|
35
|
-
icon?: ReactNode;
|
|
36
|
-
onClick: () => void;
|
|
37
|
-
variant?: 'default' | 'outline' | 'ghost';
|
|
38
|
-
withIcon?: boolean;
|
|
39
|
-
size?: 'default' | 'sm' | 'lg';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Row action menu item
|
|
43
|
-
export interface RowAction<T> {
|
|
44
|
-
label: string;
|
|
45
|
-
onClick: (item: T) => void;
|
|
46
|
-
variant?: 'default' | 'danger';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Table controls props
|
|
50
|
-
export interface TableControlsProps {
|
|
51
|
-
searchConfig?: SearchConfig;
|
|
52
|
-
filters?: FilterConfig[];
|
|
53
|
-
actions?: HeaderAction[];
|
|
54
|
-
filterLabel?: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Data table props
|
|
58
|
-
export interface DataTableProps<T> {
|
|
59
|
-
data: T[];
|
|
60
|
-
columns: ColumnConfig<T>[];
|
|
61
|
-
keyExtractor: (item: T) => string;
|
|
62
|
-
|
|
63
|
-
// Optional features
|
|
64
|
-
onRowClick?: (item: T) => void;
|
|
65
|
-
rowActions?: (item: T) => RowAction<T>[];
|
|
66
|
-
rowQuickActions?: (item: T) => ReactNode;
|
|
67
|
-
rowIcon?: (item: T) => ReactNode;
|
|
68
|
-
emptyState?: ReactNode;
|
|
69
|
-
className?: string;
|
|
70
|
-
selectable?: boolean;
|
|
71
|
-
selectedItems?: string[];
|
|
72
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
73
|
-
sortKey?: string;
|
|
74
|
-
sortDirection?: 'asc' | 'desc';
|
|
75
|
-
onSort?: (key: string) => void;
|
|
76
|
-
pagination?: {
|
|
77
|
-
entityName: string;
|
|
78
|
-
};
|
|
79
|
-
}
|