@gostack-framework/ui 0.0.0-stage → 0.1.0
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/NOTICE.md +5 -0
- package/dist/activity/index.d.ts +2 -0
- package/dist/activity/index.js +3 -0
- package/dist/activity/index.js.map +1 -0
- package/dist/clickup/common/InlineNameTab.d.ts +11 -0
- package/dist/clickup/common/InlineNameTab.js +50 -0
- package/dist/clickup/common/InlineNameTab.js.map +1 -0
- package/dist/clickup/common/TaskAssigneeAvatar.d.ts +14 -0
- package/dist/clickup/common/TaskAssigneeAvatar.js +32 -0
- package/dist/clickup/common/TaskAssigneeAvatar.js.map +1 -0
- package/dist/clickup/common/TaskBreadcrumb.d.ts +11 -0
- package/dist/clickup/common/TaskBreadcrumb.js +11 -0
- package/dist/clickup/common/TaskBreadcrumb.js.map +1 -0
- package/dist/clickup/common/TaskCheck.d.ts +10 -0
- package/dist/clickup/common/TaskCheck.js +17 -0
- package/dist/clickup/common/TaskCheck.js.map +1 -0
- package/dist/clickup/common/TaskContextMenu.d.ts +10 -0
- package/dist/clickup/common/TaskContextMenu.js +22 -0
- package/dist/clickup/common/TaskContextMenu.js.map +1 -0
- package/dist/clickup/common/TaskIcon.d.ts +29 -0
- package/dist/clickup/common/TaskIcon.js +30 -0
- package/dist/clickup/common/TaskIcon.js.map +1 -0
- package/dist/clickup/common/TaskPriorityBadge.d.ts +11 -0
- package/dist/clickup/common/TaskPriorityBadge.js +11 -0
- package/dist/clickup/common/TaskPriorityBadge.js.map +1 -0
- package/dist/clickup/common/TaskRowActionMenu.d.ts +6 -0
- package/dist/clickup/common/TaskRowActionMenu.js +10 -0
- package/dist/clickup/common/TaskRowActionMenu.js.map +1 -0
- package/dist/clickup/common/TaskStatusPill.d.ts +12 -0
- package/dist/clickup/common/TaskStatusPill.js +24 -0
- package/dist/clickup/common/TaskStatusPill.js.map +1 -0
- package/dist/clickup/common/WorkspaceButton.d.ts +3 -0
- package/dist/clickup/common/WorkspaceButton.js +8 -0
- package/dist/clickup/common/WorkspaceButton.js.map +1 -0
- package/dist/clickup/common/WorkspaceHeader.d.ts +9 -0
- package/dist/clickup/common/WorkspaceHeader.js +7 -0
- package/dist/clickup/common/WorkspaceHeader.js.map +1 -0
- package/dist/clickup/common/WorkspaceMenus.d.ts +17 -0
- package/dist/clickup/common/WorkspaceMenus.js +15 -0
- package/dist/clickup/common/WorkspaceMenus.js.map +1 -0
- package/dist/clickup/common/WorkspaceMessage.d.ts +7 -0
- package/dist/clickup/common/WorkspaceMessage.js +6 -0
- package/dist/clickup/common/WorkspaceMessage.js.map +1 -0
- package/dist/clickup/common/WorkspaceMetricStrip.d.ts +10 -0
- package/dist/clickup/common/WorkspaceMetricStrip.js +6 -0
- package/dist/clickup/common/WorkspaceMetricStrip.js.map +1 -0
- package/dist/clickup/common/WorkspacePanel.d.ts +7 -0
- package/dist/clickup/common/WorkspacePanel.js +7 -0
- package/dist/clickup/common/WorkspacePanel.js.map +1 -0
- package/dist/clickup/common/WorkspaceSelect.d.ts +5 -0
- package/dist/clickup/common/WorkspaceSelect.js +64 -0
- package/dist/clickup/common/WorkspaceSelect.js.map +1 -0
- package/dist/clickup/common/WorkspaceTable.d.ts +16 -0
- package/dist/clickup/common/WorkspaceTable.js +7 -0
- package/dist/clickup/common/WorkspaceTable.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.d.ts +9 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.js +35 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.d.ts +8 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.js +10 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.d.ts +7 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.js +12 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.d.ts +12 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.js +12 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.d.ts +27 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.js +35 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.d.ts +11 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.js +29 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.d.ts +24 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.js +26 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.d.ts +17 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.js +26 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.js.map +1 -0
- package/dist/clickup/elements/TaskCalendarCell.d.ts +14 -0
- package/dist/clickup/elements/TaskCalendarCell.js +19 -0
- package/dist/clickup/elements/TaskCalendarCell.js.map +1 -0
- package/dist/clickup/elements/TaskCard.d.ts +16 -0
- package/dist/clickup/elements/TaskCard.js +51 -0
- package/dist/clickup/elements/TaskCard.js.map +1 -0
- package/dist/clickup/elements/TaskGroup.d.ts +24 -0
- package/dist/clickup/elements/TaskGroup.js +50 -0
- package/dist/clickup/elements/TaskGroup.js.map +1 -0
- package/dist/clickup/elements/TaskRow.d.ts +19 -0
- package/dist/clickup/elements/TaskRow.js +60 -0
- package/dist/clickup/elements/TaskRow.js.map +1 -0
- package/dist/clickup/elements/TaskTableHead.d.ts +1 -0
- package/dist/clickup/elements/TaskTableHead.js +15 -0
- package/dist/clickup/elements/TaskTableHead.js.map +1 -0
- package/dist/clickup/elements/TaskTimelineRow.d.ts +12 -0
- package/dist/clickup/elements/TaskTimelineRow.js +16 -0
- package/dist/clickup/elements/TaskTimelineRow.js.map +1 -0
- package/dist/clickup/index.d.ts +41 -0
- package/dist/clickup/index.js +48 -0
- package/dist/clickup/index.js.map +1 -0
- package/dist/clickup/task-ui.css +864 -0
- package/dist/clickup/toolbar/TaskToolbar.d.ts +20 -0
- package/dist/clickup/toolbar/TaskToolbar.js +16 -0
- package/dist/clickup/toolbar/TaskToolbar.js.map +1 -0
- package/dist/clickup/toolbar/TaskViewPicker.d.ts +8 -0
- package/dist/clickup/toolbar/TaskViewPicker.js +48 -0
- package/dist/clickup/toolbar/TaskViewPicker.js.map +1 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.d.ts +21 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.js +55 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.js.map +1 -0
- package/dist/clickup/types.d.ts +66 -0
- package/dist/clickup/types.js +2 -0
- package/dist/clickup/types.js.map +1 -0
- package/dist/clickup/views/TaskBoardView.d.ts +21 -0
- package/dist/clickup/views/TaskBoardView.js +75 -0
- package/dist/clickup/views/TaskBoardView.js.map +1 -0
- package/dist/clickup/views/TaskCalendarView.d.ts +12 -0
- package/dist/clickup/views/TaskCalendarView.js +197 -0
- package/dist/clickup/views/TaskCalendarView.js.map +1 -0
- package/dist/clickup/views/TaskGanttView.d.ts +12 -0
- package/dist/clickup/views/TaskGanttView.js +64 -0
- package/dist/clickup/views/TaskGanttView.js.map +1 -0
- package/dist/clickup/views/TaskListView.d.ts +22 -0
- package/dist/clickup/views/TaskListView.js +17 -0
- package/dist/clickup/views/TaskListView.js.map +1 -0
- package/dist/clickup/views/TaskTableView.d.ts +21 -0
- package/dist/clickup/views/TaskTableView.js +50 -0
- package/dist/clickup/views/TaskTableView.js.map +1 -0
- package/dist/components/ActivityFeed.d.ts +48 -0
- package/dist/components/ActivityFeed.js +60 -0
- package/dist/components/ActivityFeed.js.map +1 -0
- package/dist/components/AudioPlayer.d.ts +8 -0
- package/dist/components/AudioPlayer.js +96 -0
- package/dist/components/AudioPlayer.js.map +1 -0
- package/dist/components/BulkActionBar.d.ts +10 -0
- package/dist/components/BulkActionBar.js +10 -0
- package/dist/components/BulkActionBar.js.map +1 -0
- package/dist/components/Carousel.d.ts +8 -0
- package/dist/components/Carousel.js +38 -0
- package/dist/components/Carousel.js.map +1 -0
- package/dist/components/ChatBot.d.ts +6 -0
- package/dist/components/ChatBot.js +52 -0
- package/dist/components/ChatBot.js.map +1 -0
- package/dist/components/CheckboxCustom.d.ts +9 -0
- package/dist/components/CheckboxCustom.js +42 -0
- package/dist/components/CheckboxCustom.js.map +1 -0
- package/dist/components/ClickUpTaskModal.d.ts +36 -0
- package/dist/components/ClickUpTaskModal.js +180 -0
- package/dist/components/ClickUpTaskModal.js.map +1 -0
- package/dist/components/ConditionBuilder.d.ts +28 -0
- package/dist/components/ConditionBuilder.js +63 -0
- package/dist/components/ConditionBuilder.js.map +1 -0
- package/dist/components/ConfirmDialog.d.ts +21 -0
- package/dist/components/ConfirmDialog.js +51 -0
- package/dist/components/ConfirmDialog.js.map +1 -0
- package/dist/components/DataCard.d.ts +43 -0
- package/dist/components/DataCard.js +30 -0
- package/dist/components/DataCard.js.map +1 -0
- package/dist/components/DataTable.d.ts +107 -0
- package/dist/components/DataTable.js +153 -0
- package/dist/components/DataTable.js.map +1 -0
- package/dist/components/DatePicker.d.ts +16 -0
- package/dist/components/DatePicker.js +184 -0
- package/dist/components/DatePicker.js.map +1 -0
- package/dist/components/EmptyState.d.ts +26 -0
- package/dist/components/EmptyState.js +37 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/Error.d.ts +12 -0
- package/dist/components/Error.js +41 -0
- package/dist/components/Error.js.map +1 -0
- package/dist/components/ErrorState.d.ts +10 -0
- package/dist/components/ErrorState.js +53 -0
- package/dist/components/ErrorState.js.map +1 -0
- package/dist/components/FileAttachmentChip.d.ts +10 -0
- package/dist/components/FileAttachmentChip.js +21 -0
- package/dist/components/FileAttachmentChip.js.map +1 -0
- package/dist/components/FilterConditionChip.d.ts +10 -0
- package/dist/components/FilterConditionChip.js +11 -0
- package/dist/components/FilterConditionChip.js.map +1 -0
- package/dist/components/GalleryCarouselDialog.d.ts +14 -0
- package/dist/components/GalleryCarouselDialog.js +167 -0
- package/dist/components/GalleryCarouselDialog.js.map +1 -0
- package/dist/components/HierarchicalSelectionMenu.d.ts +21 -0
- package/dist/components/HierarchicalSelectionMenu.js +168 -0
- package/dist/components/HierarchicalSelectionMenu.js.map +1 -0
- package/dist/components/InfiniteSelect.d.ts +44 -0
- package/dist/components/InfiniteSelect.js +121 -0
- package/dist/components/InfiniteSelect.js.map +1 -0
- package/dist/components/LoadingState.d.ts +28 -0
- package/dist/components/LoadingState.js +24 -0
- package/dist/components/LoadingState.js.map +1 -0
- package/dist/components/LucidIconRender.d.ts +9 -0
- package/dist/components/LucidIconRender.js +7 -0
- package/dist/components/LucidIconRender.js.map +1 -0
- package/dist/components/MasterDetailLayout.d.ts +67 -0
- package/dist/components/MasterDetailLayout.js +79 -0
- package/dist/components/MasterDetailLayout.js.map +1 -0
- package/dist/components/PinnedAttributeRow.d.ts +12 -0
- package/dist/components/PinnedAttributeRow.js +11 -0
- package/dist/components/PinnedAttributeRow.js.map +1 -0
- package/dist/components/PopUp.d.ts +11 -0
- package/dist/components/PopUp.js +83 -0
- package/dist/components/PopUp.js.map +1 -0
- package/dist/components/PrioritySignal.d.ts +10 -0
- package/dist/components/PrioritySignal.js +54 -0
- package/dist/components/PrioritySignal.js.map +1 -0
- package/dist/components/RichTextEditor.d.ts +7 -0
- package/dist/components/RichTextEditor.js +252 -0
- package/dist/components/RichTextEditor.js.map +1 -0
- package/dist/components/SLACountdown.d.ts +15 -0
- package/dist/components/SLACountdown.js +26 -0
- package/dist/components/SLACountdown.js.map +1 -0
- package/dist/components/StatusBadge.d.ts +14 -0
- package/dist/components/StatusBadge.js +55 -0
- package/dist/components/StatusBadge.js.map +1 -0
- package/dist/components/StatusCards.d.ts +12 -0
- package/dist/components/StatusCards.js +12 -0
- package/dist/components/StatusCards.js.map +1 -0
- package/dist/components/StatusProgressBar.d.ts +18 -0
- package/dist/components/StatusProgressBar.js +50 -0
- package/dist/components/StatusProgressBar.js.map +1 -0
- package/dist/components/TableActions.d.ts +26 -0
- package/dist/components/TableActions.js +49 -0
- package/dist/components/TableActions.js.map +1 -0
- package/dist/components/TaskDetailsModal.d.ts +3 -0
- package/dist/components/TaskDetailsModal.js +8 -0
- package/dist/components/TaskDetailsModal.js.map +1 -0
- package/dist/components/ThemedText.d.ts +24 -0
- package/dist/components/ThemedText.js +103 -0
- package/dist/components/ThemedText.js.map +1 -0
- package/dist/components/TicketWorkspaceLayout.d.ts +11 -0
- package/dist/components/TicketWorkspaceLayout.js +7 -0
- package/dist/components/TicketWorkspaceLayout.js.map +1 -0
- package/dist/components/TimePicker.d.ts +15 -0
- package/dist/components/TimePicker.js +96 -0
- package/dist/components/TimePicker.js.map +1 -0
- package/dist/components/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip.js +75 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/TreeView.d.ts +33 -0
- package/dist/components/TreeView.js +55 -0
- package/dist/components/TreeView.js.map +1 -0
- package/dist/components/accordion.d.ts +6 -0
- package/dist/components/accordion.js +18 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/avatar.d.ts +11 -0
- package/dist/components/avatar.js +23 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +44 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.js +47 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +11 -0
- package/dist/components/card.js +25 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/context menu core/context-menu.d.ts +28 -0
- package/dist/components/context menu core/context-menu.js +91 -0
- package/dist/components/context menu core/context-menu.js.map +1 -0
- package/dist/components/context menu core/contextMenuAdvanced.d.ts +46 -0
- package/dist/components/context menu core/contextMenuAdvanced.js +34 -0
- package/dist/components/context menu core/contextMenuAdvanced.js.map +1 -0
- package/dist/components/dialog.d.ts +18 -0
- package/dist/components/dialog.js +42 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/filter/AdvancedFilters.d.ts +14 -0
- package/dist/components/filter/AdvancedFilters.js +220 -0
- package/dist/components/filter/AdvancedFilters.js.map +1 -0
- package/dist/components/filter/Filter.d.ts +48 -0
- package/dist/components/filter/Filter.js +153 -0
- package/dist/components/filter/Filter.js.map +1 -0
- package/dist/components/filter/FilterButton.d.ts +10 -0
- package/dist/components/filter/FilterButton.js +9 -0
- package/dist/components/filter/FilterButton.js.map +1 -0
- package/dist/components/filter/NormalFilters.d.ts +14 -0
- package/dist/components/filter/NormalFilters.js +40 -0
- package/dist/components/filter/NormalFilters.js.map +1 -0
- package/dist/components/filter/index.d.ts +5 -0
- package/dist/components/filter/index.js +6 -0
- package/dist/components/filter/index.js.map +1 -0
- package/dist/components/filter/types.d.ts +32 -0
- package/dist/components/filter/types.js +2 -0
- package/dist/components/filter/types.js.map +1 -0
- package/dist/components/form-error.d.ts +42 -0
- package/dist/components/form-error.js +103 -0
- package/dist/components/form-error.js.map +1 -0
- package/dist/components/icons.d.ts +19 -0
- package/dist/components/icons.js +21 -0
- package/dist/components/icons.js.map +1 -0
- package/dist/components/image.d.ts +12 -0
- package/dist/components/image.js +18 -0
- package/dist/components/image.js.map +1 -0
- package/dist/components/index.d.ts +59 -0
- package/dist/components/index.js +60 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input.d.ts +22 -0
- package/dist/components/input.js +102 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +7 -0
- package/dist/components/label.js +8 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layout/FeatureLayout.d.ts +131 -0
- package/dist/components/layout/FeatureLayout.js +113 -0
- package/dist/components/layout/FeatureLayout.js.map +1 -0
- package/dist/components/layout/FeatureLayoutExportButton.d.ts +10 -0
- package/dist/components/layout/FeatureLayoutExportButton.js +21 -0
- package/dist/components/layout/FeatureLayoutExportButton.js.map +1 -0
- package/dist/components/layout/FeatureLayoutTabs.d.ts +36 -0
- package/dist/components/layout/FeatureLayoutTabs.js +192 -0
- package/dist/components/layout/FeatureLayoutTabs.js.map +1 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.d.ts +6 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.js +195 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.js.map +1 -0
- package/dist/components/layout/kanban/KanbanCard.d.ts +12 -0
- package/dist/components/layout/kanban/KanbanCard.js +43 -0
- package/dist/components/layout/kanban/KanbanCard.js.map +1 -0
- package/dist/components/layout/kanban/KanbanColumn.d.ts +23 -0
- package/dist/components/layout/kanban/KanbanColumn.js +30 -0
- package/dist/components/layout/kanban/KanbanColumn.js.map +1 -0
- package/dist/components/layout/kanban/KanbanToolbar.d.ts +11 -0
- package/dist/components/layout/kanban/KanbanToolbar.js +10 -0
- package/dist/components/layout/kanban/KanbanToolbar.js.map +1 -0
- package/dist/components/layout/kanban/index.d.ts +6 -0
- package/dist/components/layout/kanban/index.js +7 -0
- package/dist/components/layout/kanban/index.js.map +1 -0
- package/dist/components/layout/kanban/types.d.ts +67 -0
- package/dist/components/layout/kanban/types.js +2 -0
- package/dist/components/layout/kanban/types.js.map +1 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +20 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/react-flow/FlowGraphHeader.d.ts +2 -0
- package/dist/components/react-flow/FlowGraphHeader.js +10 -0
- package/dist/components/react-flow/FlowGraphHeader.js.map +1 -0
- package/dist/components/react-flow/GlowEdge.d.ts +3 -0
- package/dist/components/react-flow/GlowEdge.js +100 -0
- package/dist/components/react-flow/GlowEdge.js.map +1 -0
- package/dist/components/react-flow/ReactFlowCanvas.d.ts +7 -0
- package/dist/components/react-flow/ReactFlowCanvas.js +44 -0
- package/dist/components/react-flow/ReactFlowCanvas.js.map +1 -0
- package/dist/components/react-flow/RelationshipFlow.d.ts +2 -0
- package/dist/components/react-flow/RelationshipFlow.js +9 -0
- package/dist/components/react-flow/RelationshipFlow.js.map +1 -0
- package/dist/components/react-flow/TreeFlowLayout.d.ts +29 -0
- package/dist/components/react-flow/TreeFlowLayout.js +14 -0
- package/dist/components/react-flow/TreeFlowLayout.js.map +1 -0
- package/dist/components/react-flow/edges.d.ts +8 -0
- package/dist/components/react-flow/edges.js +21 -0
- package/dist/components/react-flow/edges.js.map +1 -0
- package/dist/components/react-flow/index.d.ts +9 -0
- package/dist/components/react-flow/index.js +10 -0
- package/dist/components/react-flow/index.js.map +1 -0
- package/dist/components/react-flow/layout.d.ts +5 -0
- package/dist/components/react-flow/layout.js +11 -0
- package/dist/components/react-flow/layout.js.map +1 -0
- package/dist/components/react-flow/types.d.ts +82 -0
- package/dist/components/react-flow/types.js +6 -0
- package/dist/components/react-flow/types.js.map +1 -0
- package/dist/components/react-flow/useFlowGraph.d.ts +3 -0
- package/dist/components/react-flow/useFlowGraph.js +22 -0
- package/dist/components/react-flow/useFlowGraph.js.map +1 -0
- package/dist/components/react-flow/useFlowGraphSync.d.ts +4 -0
- package/dist/components/react-flow/useFlowGraphSync.js +43 -0
- package/dist/components/react-flow/useFlowGraphSync.js.map +1 -0
- package/dist/components/select.d.ts +23 -0
- package/dist/components/select.js +109 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.js +29 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/stepper.d.ts +12 -0
- package/dist/components/stepper.js +22 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.js +16 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +52 -0
- package/dist/components/table.js +112 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +29 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +17 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/condition-builder/index.d.ts +2 -0
- package/dist/condition-builder/index.js +3 -0
- package/dist/condition-builder/index.js.map +1 -0
- package/dist/context-menu/index.d.ts +2 -0
- package/dist/context-menu/index.js +3 -0
- package/dist/context-menu/index.js.map +1 -0
- package/dist/dropdown/SearchDropdown.d.ts +19 -0
- package/dist/dropdown/SearchDropdown.js +27 -0
- package/dist/dropdown/SearchDropdown.js.map +1 -0
- package/dist/dropdown/index.d.ts +2 -0
- package/dist/dropdown/index.js +3 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/editor.d.ts +1 -0
- package/dist/editor.js +2 -0
- package/dist/editor.js.map +1 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/feedback/index.js +7 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/flow.d.ts +1 -0
- package/dist/flow.js +2 -0
- package/dist/flow.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useContextMenuActions.d.ts +16 -0
- package/dist/hooks/useContextMenuActions.js +35 -0
- package/dist/hooks/useContextMenuActions.js.map +1 -0
- package/dist/hooks/useFeatureLayout.d.ts +14 -0
- package/dist/hooks/useFeatureLayout.js +21 -0
- package/dist/hooks/useFeatureLayout.js.map +1 -0
- package/dist/hooks/useTableActions.d.ts +46 -0
- package/dist/hooks/useTableActions.js +71 -0
- package/dist/hooks/useTableActions.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations.d.ts +42 -0
- package/dist/integrations.js +9 -0
- package/dist/integrations.js.map +1 -0
- package/dist/itsm/index.d.ts +7 -0
- package/dist/itsm/index.js +8 -0
- package/dist/itsm/index.js.map +1 -0
- package/dist/locales/ar.json +149 -0
- package/dist/locales/en.json +149 -0
- package/dist/primitives/index.d.ts +11 -0
- package/dist/primitives/index.js +12 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/progress.d.ts +7 -0
- package/dist/progress.js +20 -0
- package/dist/progress.js.map +1 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/index.js +4 -0
- package/dist/select/index.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/support/api.d.ts +8 -0
- package/dist/support/api.js +2 -0
- package/dist/support/api.js.map +1 -0
- package/dist/support/types/file.types.d.ts +12 -0
- package/dist/support/types/file.types.js +2 -0
- package/dist/support/types/file.types.js.map +1 -0
- package/dist/support/types/gallery.types.d.ts +22 -0
- package/dist/support/types/gallery.types.js +2 -0
- package/dist/support/types/gallery.types.js.map +1 -0
- package/dist/support/types/governorates.types.d.ts +12 -0
- package/dist/support/types/governorates.types.js +2 -0
- package/dist/support/types/governorates.types.js.map +1 -0
- package/dist/support/types/grade.types.d.ts +7 -0
- package/dist/support/types/grade.types.js +2 -0
- package/dist/support/types/grade.types.js.map +1 -0
- package/dist/support/types/index.d.ts +13 -0
- package/dist/support/types/index.js +14 -0
- package/dist/support/types/index.js.map +1 -0
- package/dist/support/types/metadata.types.d.ts +61 -0
- package/dist/support/types/metadata.types.js +3 -0
- package/dist/support/types/metadata.types.js.map +1 -0
- package/dist/support/types/table.types.d.ts +33 -0
- package/dist/support/types/table.types.js +2 -0
- package/dist/support/types/table.types.js.map +1 -0
- package/dist/support/types/viewCard.types.d.ts +78 -0
- package/dist/support/types/viewCard.types.js +3 -0
- package/dist/support/types/viewCard.types.js.map +1 -0
- package/dist/support/utils/fileUtils.d.ts +1 -0
- package/dist/support/utils/fileUtils.js +2 -0
- package/dist/support/utils/fileUtils.js.map +1 -0
- package/dist/support/utils.d.ts +5 -0
- package/dist/support/utils.js +4 -0
- package/dist/support/utils.js.map +1 -0
- package/dist/table/index.d.ts +6 -0
- package/dist/table/index.js +7 -0
- package/dist/table/index.js.map +1 -0
- package/dist/tasks.d.ts +3 -0
- package/dist/tasks.js +4 -0
- package/dist/tasks.js.map +1 -0
- package/dist/tours/TourContext.d.ts +33 -0
- package/dist/tours/TourContext.js +98 -0
- package/dist/tours/TourContext.js.map +1 -0
- package/dist/tours/TourOverlay.d.ts +7 -0
- package/dist/tours/TourOverlay.js +129 -0
- package/dist/tours/TourOverlay.js.map +1 -0
- package/dist/tours.d.ts +2 -0
- package/dist/tours.js +3 -0
- package/dist/tours.js.map +1 -0
- package/dist/types.d.ts +91 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/typography/index.d.ts +4 -0
- package/dist/typography/index.js +5 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/typography.adapter.d.ts +18 -0
- package/dist/typography/typography.adapter.js +113 -0
- package/dist/typography/typography.adapter.js.map +1 -0
- package/dist/typography/typography.constants.d.ts +56 -0
- package/dist/typography/typography.constants.js +649 -0
- package/dist/typography/typography.constants.js.map +1 -0
- package/dist/typography/typography.types.d.ts +62 -0
- package/dist/typography/typography.types.js +6 -0
- package/dist/typography/typography.types.js.map +1 -0
- package/dist/typography/useTypography.d.ts +25 -0
- package/dist/typography/useTypography.js +158 -0
- package/dist/typography/useTypography.js.map +1 -0
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.js +18 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/avatar.d.ts +11 -0
- package/dist/ui/avatar.js +23 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.js +33 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.js +41 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.js +25 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/dialog.d.ts +17 -0
- package/dist/ui/dialog.js +37 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +25 -0
- package/dist/ui/dropdown-menu.js +51 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/index.d.ts +15 -0
- package/dist/ui/index.js +16 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +26 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +38 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +28 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +11 -0
- package/dist/ui/tabs.js +29 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +17 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/workspace/index.d.ts +2 -0
- package/dist/workspace/index.js +3 -0
- package/dist/workspace/index.js.map +1 -0
- package/package.json +61 -4
- package/src/activity/index.ts +2 -0
- package/src/clickup/common/InlineNameTab.tsx +122 -0
- package/src/clickup/common/TaskAssigneeAvatar.tsx +127 -0
- package/src/clickup/common/TaskBreadcrumb.tsx +91 -0
- package/src/clickup/common/TaskCheck.tsx +51 -0
- package/src/clickup/common/TaskContextMenu.tsx +42 -0
- package/src/clickup/common/TaskIcon.tsx +145 -0
- package/src/clickup/common/TaskPriorityBadge.tsx +52 -0
- package/src/clickup/common/TaskRowActionMenu.tsx +43 -0
- package/src/clickup/common/TaskStatusPill.tsx +73 -0
- package/src/clickup/common/WorkspaceButton.tsx +22 -0
- package/src/clickup/common/WorkspaceHeader.tsx +41 -0
- package/src/clickup/common/WorkspaceMenus.tsx +92 -0
- package/src/clickup/common/WorkspaceMessage.tsx +39 -0
- package/src/clickup/common/WorkspaceMetricStrip.tsx +49 -0
- package/src/clickup/common/WorkspacePanel.tsx +27 -0
- package/src/clickup/common/WorkspaceSelect.tsx +173 -0
- package/src/clickup/common/WorkspaceTable.tsx +78 -0
- package/src/clickup/dialogs/ClickUpCommentComposer.tsx +93 -0
- package/src/clickup/dialogs/ClickUpTaskActions.tsx +73 -0
- package/src/clickup/dialogs/ClickUpTaskAssignee.tsx +86 -0
- package/src/clickup/dialogs/ClickUpTaskDescription.tsx +67 -0
- package/src/clickup/dialogs/ClickUpTaskDialog.tsx +187 -0
- package/src/clickup/dialogs/ClickUpTaskDiscussion.tsx +136 -0
- package/src/clickup/dialogs/ClickUpTaskMain.tsx +156 -0
- package/src/clickup/dialogs/ClickUpTaskProperties.tsx +214 -0
- package/src/clickup/elements/TaskCalendarCell.tsx +91 -0
- package/src/clickup/elements/TaskCard.tsx +154 -0
- package/src/clickup/elements/TaskGroup.tsx +208 -0
- package/src/clickup/elements/TaskRow.tsx +172 -0
- package/src/clickup/elements/TaskTableHead.tsx +29 -0
- package/src/clickup/elements/TaskTimelineRow.tsx +77 -0
- package/src/clickup/index.ts +63 -0
- package/src/clickup/task-ui.css +864 -0
- package/src/clickup/toolbar/TaskToolbar.tsx +130 -0
- package/src/clickup/toolbar/TaskViewPicker.tsx +148 -0
- package/src/clickup/toolbar/TaskViewSwitcher.tsx +129 -0
- package/src/clickup/types.ts +79 -0
- package/src/clickup/views/TaskBoardView.tsx +259 -0
- package/src/clickup/views/TaskCalendarView.tsx +410 -0
- package/src/clickup/views/TaskGanttView.tsx +178 -0
- package/src/clickup/views/TaskListView.tsx +95 -0
- package/src/clickup/views/TaskTableView.tsx +192 -0
- package/src/components/ActivityFeed.tsx +440 -0
- package/src/components/AudioPlayer.tsx +179 -0
- package/src/components/BulkActionBar.tsx +72 -0
- package/src/components/Carousel.tsx +107 -0
- package/src/components/ChatBot.tsx +205 -0
- package/src/components/CheckboxCustom.tsx +106 -0
- package/src/components/ClickUpTaskModal.tsx +661 -0
- package/src/components/ConditionBuilder.tsx +322 -0
- package/src/components/ConfirmDialog.tsx +157 -0
- package/src/components/DataCard.tsx +203 -0
- package/src/components/DataTable.tsx +609 -0
- package/src/components/DatePicker.tsx +397 -0
- package/src/components/EmptyState.tsx +105 -0
- package/src/components/Error.tsx +248 -0
- package/src/components/ErrorState.tsx +199 -0
- package/src/components/FileAttachmentChip.tsx +84 -0
- package/src/components/FilterConditionChip.tsx +56 -0
- package/src/components/GalleryCarouselDialog.tsx +439 -0
- package/src/components/HierarchicalSelectionMenu.tsx +432 -0
- package/src/components/InfiniteSelect.tsx +397 -0
- package/src/components/LoadingState.tsx +105 -0
- package/src/components/LucidIconRender.tsx +25 -0
- package/src/components/MasterDetailLayout.tsx +442 -0
- package/src/components/PinnedAttributeRow.tsx +70 -0
- package/src/components/PopUp.tsx +309 -0
- package/src/components/PrioritySignal.tsx +131 -0
- package/src/components/RichTextEditor.tsx +433 -0
- package/src/components/SLACountdown.tsx +133 -0
- package/src/components/StatusBadge.tsx +119 -0
- package/src/components/StatusCards.tsx +78 -0
- package/src/components/StatusProgressBar.tsx +158 -0
- package/src/components/TableActions.tsx +182 -0
- package/src/components/TaskDetailsModal.tsx +7 -0
- package/src/components/ThemedText.tsx +181 -0
- package/src/components/TicketWorkspaceLayout.tsx +63 -0
- package/src/components/TimePicker.tsx +283 -0
- package/src/components/Tooltip.tsx +128 -0
- package/src/components/TreeView.tsx +297 -0
- package/src/components/accordion.tsx +78 -0
- package/src/components/avatar.tsx +107 -0
- package/src/components/badge.tsx +72 -0
- package/src/components/button.tsx +93 -0
- package/src/components/card.tsx +103 -0
- package/src/components/context menu core/context-menu.tsx +304 -0
- package/src/components/context menu core/contextMenuAdvanced.tsx +130 -0
- package/src/components/dialog.tsx +186 -0
- package/src/components/dropdown-menu.tsx +274 -0
- package/src/components/filter/AdvancedFilters.tsx +834 -0
- package/src/components/filter/Filter.tsx +233 -0
- package/src/components/filter/FilterButton.tsx +38 -0
- package/src/components/filter/NormalFilters.tsx +109 -0
- package/src/components/filter/index.ts +5 -0
- package/src/components/filter/types.ts +36 -0
- package/src/components/form-error.tsx +172 -0
- package/src/components/icons.tsx +468 -0
- package/src/components/image.tsx +85 -0
- package/src/components/index.ts +59 -0
- package/src/components/input.tsx +260 -0
- package/src/components/label.tsx +27 -0
- package/src/components/layout/FeatureLayout.tsx +739 -0
- package/src/components/layout/FeatureLayoutExportButton.tsx +93 -0
- package/src/components/layout/FeatureLayoutTabs.tsx +413 -0
- package/src/components/layout/kanban/FeatureLayoutKanban.tsx +386 -0
- package/src/components/layout/kanban/KanbanCard.tsx +132 -0
- package/src/components/layout/kanban/KanbanColumn.tsx +241 -0
- package/src/components/layout/kanban/KanbanToolbar.tsx +77 -0
- package/src/components/layout/kanban/index.ts +6 -0
- package/src/components/layout/kanban/types.ts +96 -0
- package/src/components/popover.tsx +66 -0
- package/src/components/react-flow/FlowGraphHeader.tsx +68 -0
- package/src/components/react-flow/GlowEdge.tsx +238 -0
- package/src/components/react-flow/ReactFlowCanvas.tsx +112 -0
- package/src/components/react-flow/RelationshipFlow.tsx +50 -0
- package/src/components/react-flow/TreeFlowLayout.tsx +187 -0
- package/src/components/react-flow/edges.ts +39 -0
- package/src/components/react-flow/index.ts +9 -0
- package/src/components/react-flow/layout.ts +16 -0
- package/src/components/react-flow/types.ts +103 -0
- package/src/components/react-flow/useFlowGraph.ts +36 -0
- package/src/components/react-flow/useFlowGraphSync.ts +67 -0
- package/src/components/select.tsx +386 -0
- package/src/components/sonner.tsx +58 -0
- package/src/components/stepper.tsx +97 -0
- package/src/components/switch.tsx +46 -0
- package/src/components/table.tsx +577 -0
- package/src/components/tabs.tsx +81 -0
- package/src/components/textarea.tsx +67 -0
- package/src/condition-builder/index.ts +2 -0
- package/src/context-menu/index.ts +2 -0
- package/src/dropdown/SearchDropdown.tsx +145 -0
- package/src/dropdown/index.ts +2 -0
- package/src/editor.ts +1 -0
- package/src/feedback/index.ts +6 -0
- package/src/flow.ts +1 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useContextMenuActions.ts +69 -0
- package/src/hooks/useFeatureLayout.ts +44 -0
- package/src/hooks/useTableActions.ts +146 -0
- package/src/index.ts +27 -0
- package/src/integrations.tsx +11 -0
- package/src/itsm/index.ts +7 -0
- package/src/locales/ar.json +149 -0
- package/src/locales/en.json +149 -0
- package/src/primitives/index.ts +11 -0
- package/src/progress.tsx +87 -0
- package/src/select/index.ts +3 -0
- package/src/support/api.ts +1 -0
- package/src/support/types/file.types.ts +13 -0
- package/src/support/types/gallery.types.ts +22 -0
- package/src/support/types/governorates.types.ts +13 -0
- package/src/support/types/grade.types.ts +7 -0
- package/src/support/types/index.ts +14 -0
- package/src/support/types/metadata.types.ts +93 -0
- package/src/support/types/table.types.ts +45 -0
- package/src/support/types/viewCard.types.ts +100 -0
- package/src/support/utils/fileUtils.ts +1 -0
- package/src/support/utils.ts +3 -0
- package/src/table/index.ts +6 -0
- package/src/tasks.ts +3 -0
- package/src/tours/TourContext.tsx +142 -0
- package/src/tours/TourOverlay.tsx +281 -0
- package/src/tours.ts +2 -0
- package/src/types.ts +138 -0
- package/src/typography/index.ts +4 -0
- package/src/typography/typography.adapter.ts +131 -0
- package/src/typography/typography.constants.ts +700 -0
- package/src/typography/typography.types.ts +156 -0
- package/src/typography/useTypography.ts +211 -0
- package/src/ui/accordion.tsx +66 -0
- package/src/ui/avatar.tsx +106 -0
- package/src/ui/badge.tsx +58 -0
- package/src/ui/button.tsx +69 -0
- package/src/ui/card.tsx +97 -0
- package/src/ui/dialog.tsx +165 -0
- package/src/ui/dropdown-menu.tsx +262 -0
- package/src/ui/index.ts +15 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/popover.tsx +86 -0
- package/src/ui/select.tsx +193 -0
- package/src/ui/switch.tsx +32 -0
- package/src/ui/table.tsx +119 -0
- package/src/ui/tabs.tsx +89 -0
- package/src/ui/textarea.tsx +21 -0
- package/src/ui/tooltip.tsx +54 -0
- package/src/workspace/index.ts +2 -0
- package/styles.css +532 -0
- package/README.md +0 -3
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { PaginatedData } from "../support/api";
|
|
2
|
+
import { useLanguage } from "@gostack-framework/react";
|
|
3
|
+
import { cn } from "../support/utils";
|
|
4
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
5
|
+
import {
|
|
6
|
+
ChevronDown,
|
|
7
|
+
ChevronLeft,
|
|
8
|
+
ChevronRight,
|
|
9
|
+
Filter,
|
|
10
|
+
Search,
|
|
11
|
+
SortDesc,
|
|
12
|
+
} from "lucide-react";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { Button, buttonVariants } from "./button";
|
|
15
|
+
import {
|
|
16
|
+
ContextMenu,
|
|
17
|
+
ContextMenuContent,
|
|
18
|
+
ContextMenuTrigger,
|
|
19
|
+
} from "./context menu core/context-menu";
|
|
20
|
+
import {
|
|
21
|
+
DropdownMenu,
|
|
22
|
+
DropdownMenuContent,
|
|
23
|
+
DropdownMenuTrigger,
|
|
24
|
+
} from "./dropdown-menu";
|
|
25
|
+
import { AdvancedFilters } from "./filter/AdvancedFilters";
|
|
26
|
+
import type { FilterMetadata, FilterValue } from "./filter/types";
|
|
27
|
+
import { Input } from "./input";
|
|
28
|
+
import LoadingState from "./LoadingState";
|
|
29
|
+
import ThemedText from "./ThemedText";
|
|
30
|
+
|
|
31
|
+
interface TableProps extends Omit<React.ComponentProps<"table">, "data"> {
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
view?: "list" | "grid";
|
|
34
|
+
defaultView?: "list" | "grid";
|
|
35
|
+
hideViewToggle?: boolean;
|
|
36
|
+
gridView?: React.ReactNode;
|
|
37
|
+
toolbarContent?: React.ReactNode;
|
|
38
|
+
showSearch?: boolean;
|
|
39
|
+
searchValue?: string;
|
|
40
|
+
onSearchChange?: (value: string) => void;
|
|
41
|
+
searchPlaceholder?: string;
|
|
42
|
+
filters?: { label: string; value: string; count?: number }[];
|
|
43
|
+
selectedFilter?: string;
|
|
44
|
+
onFilterChange?: (filter: string) => void;
|
|
45
|
+
advancedFilterMetadata?: FilterMetadata<any>;
|
|
46
|
+
onAdvancedFilterApply?: (filters: FilterValue<any>[]) => void;
|
|
47
|
+
|
|
48
|
+
// Grid Props
|
|
49
|
+
data?: any[];
|
|
50
|
+
renderGridItem?: (item: any, index: number) => React.ReactNode;
|
|
51
|
+
gridClassName?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function Table({
|
|
55
|
+
className,
|
|
56
|
+
view: controlledView,
|
|
57
|
+
defaultView = "list",
|
|
58
|
+
hideViewToggle,
|
|
59
|
+
gridView,
|
|
60
|
+
toolbarContent,
|
|
61
|
+
showSearch,
|
|
62
|
+
searchValue,
|
|
63
|
+
onSearchChange,
|
|
64
|
+
searchPlaceholder,
|
|
65
|
+
filters,
|
|
66
|
+
selectedFilter,
|
|
67
|
+
onFilterChange,
|
|
68
|
+
advancedFilterMetadata,
|
|
69
|
+
onAdvancedFilterApply,
|
|
70
|
+
data,
|
|
71
|
+
renderGridItem,
|
|
72
|
+
isLoading,
|
|
73
|
+
gridClassName = "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
|
|
74
|
+
...props
|
|
75
|
+
}: TableProps) {
|
|
76
|
+
const [internalView, setInternalView] = React.useState<"list" | "grid">(
|
|
77
|
+
defaultView,
|
|
78
|
+
);
|
|
79
|
+
const view = controlledView ?? internalView;
|
|
80
|
+
const [isAdvancedFilterOpen, setIsAdvancedFilterOpen] =
|
|
81
|
+
React.useState(false);
|
|
82
|
+
const [advancedFilters, setAdvancedFilters] = React.useState<
|
|
83
|
+
FilterValue<any>[]
|
|
84
|
+
>([]);
|
|
85
|
+
|
|
86
|
+
const isGrid = view === "grid" && (gridView || (data && renderGridItem));
|
|
87
|
+
const hasToolbar =
|
|
88
|
+
toolbarContent ||
|
|
89
|
+
isGrid ||
|
|
90
|
+
showSearch ||
|
|
91
|
+
(filters && filters.length > 0);
|
|
92
|
+
|
|
93
|
+
if (isLoading) {
|
|
94
|
+
return (
|
|
95
|
+
<div className="flex items-center justify-center h-64">
|
|
96
|
+
<LoadingState />
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return (
|
|
101
|
+
<div
|
|
102
|
+
className={cn(
|
|
103
|
+
"w-full flex flex-col",
|
|
104
|
+
hasToolbar && "gap-4 min-h-[50vh]",
|
|
105
|
+
)}
|
|
106
|
+
>
|
|
107
|
+
{hasToolbar && (
|
|
108
|
+
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-2">
|
|
109
|
+
<div className="flex-1 flex flex-col sm:flex-row items-start sm:items-center gap-4 w-full">
|
|
110
|
+
{showSearch && (
|
|
111
|
+
<div className="ml-1 relative w-70 shrink-0">
|
|
112
|
+
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-dashboard-muted-foreground" />
|
|
113
|
+
<Input
|
|
114
|
+
value={searchValue}
|
|
115
|
+
onChange={(e) =>
|
|
116
|
+
onSearchChange?.(e.target.value)
|
|
117
|
+
}
|
|
118
|
+
placeholder={
|
|
119
|
+
searchPlaceholder || "Search..."
|
|
120
|
+
}
|
|
121
|
+
className="bg-dashboard-secondary/40 border-transparent hover:bg-dashboard-secondary/60 pl-9 h-10 focus-visible:ring-1 focus-visible:ring-dashboard-primary text-dashboard-foreground w-full rounded-dashboard-radius transition-colors"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
)}
|
|
125
|
+
{filters && filters.length > 0 && (
|
|
126
|
+
<div className="shrink-0">
|
|
127
|
+
<DropdownMenu>
|
|
128
|
+
<DropdownMenuTrigger
|
|
129
|
+
className={buttonVariants({
|
|
130
|
+
variant: "outline",
|
|
131
|
+
className:
|
|
132
|
+
"h-10 px-5 bg-dashboard-primary/10 hover:bg-dashboard-primary/20 border-dashboard-primary/40 rounded-dashboard-radius border flex items-center gap-2 transition-colors",
|
|
133
|
+
})}
|
|
134
|
+
>
|
|
135
|
+
<Filter className="w-4 h-4 text-dashboard-primary" />
|
|
136
|
+
<span className="text-dashboard-primary font-medium text-sm">
|
|
137
|
+
Filter:{" "}
|
|
138
|
+
<span className="font-bold text-dashboard-foreground ml-1">
|
|
139
|
+
{filters.find(
|
|
140
|
+
(f) =>
|
|
141
|
+
f.value ===
|
|
142
|
+
selectedFilter,
|
|
143
|
+
)?.label || "All"}
|
|
144
|
+
</span>
|
|
145
|
+
</span>
|
|
146
|
+
</DropdownMenuTrigger>
|
|
147
|
+
<DropdownMenuContent
|
|
148
|
+
align="end"
|
|
149
|
+
className="w-64 p-3 bg-dashboard-card rounded-xl border border-dashboard-border shadow-2xl"
|
|
150
|
+
>
|
|
151
|
+
<div className="flex flex-col gap-3">
|
|
152
|
+
<div className="flex items-center justify-between px-1">
|
|
153
|
+
<span className="text-xs font-medium text-dashboard-muted-foreground">
|
|
154
|
+
Ordering
|
|
155
|
+
</span>
|
|
156
|
+
<div className="flex items-center gap-2">
|
|
157
|
+
<SortDesc className="w-3.5 h-3.5 text-dashboard-muted-foreground" />
|
|
158
|
+
<button className="flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-md bg-dashboard-secondary/80 border border-dashboard-border text-dashboard-foreground hover:bg-dashboard-secondary transition-colors cursor-pointer outline-none">
|
|
159
|
+
Name{" "}
|
|
160
|
+
<ChevronDown className="w-3 h-3 opacity-70" />
|
|
161
|
+
</button>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<hr className="border-dashboard-border" />
|
|
166
|
+
|
|
167
|
+
<div className="flex flex-col px-1">
|
|
168
|
+
<span className="text-xs font-medium text-dashboard-muted-foreground mb-2">
|
|
169
|
+
Display properties
|
|
170
|
+
</span>
|
|
171
|
+
<div className="flex flex-wrap gap-2">
|
|
172
|
+
{filters.map((filter) => (
|
|
173
|
+
<button
|
|
174
|
+
key={filter.value}
|
|
175
|
+
onClick={() =>
|
|
176
|
+
onFilterChange?.(
|
|
177
|
+
filter.value,
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
className={cn(
|
|
181
|
+
"px-3 py-1 text-xs font-medium rounded-full border transition-colors cursor-pointer",
|
|
182
|
+
selectedFilter ===
|
|
183
|
+
filter.value
|
|
184
|
+
? "border-dashboard-primary/50 bg-dashboard-primary/10 text-dashboard-primary font-semibold"
|
|
185
|
+
: "border-dashboard-border bg-dashboard-card/50 text-dashboard-muted-foreground hover:bg-dashboard-secondary hover:text-dashboard-foreground",
|
|
186
|
+
)}
|
|
187
|
+
>
|
|
188
|
+
{filter.label}{" "}
|
|
189
|
+
{filter.count !==
|
|
190
|
+
undefined &&
|
|
191
|
+
`(${filter.count})`}
|
|
192
|
+
</button>
|
|
193
|
+
))}
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
{advancedFilterMetadata && (
|
|
197
|
+
<>
|
|
198
|
+
<hr className="border-dashboard-border mt-1" />
|
|
199
|
+
<button
|
|
200
|
+
onClick={() =>
|
|
201
|
+
setIsAdvancedFilterOpen(
|
|
202
|
+
true,
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
className="w-full text-left text-xs font-medium text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-secondary py-1.5 px-2 rounded-md transition-colors cursor-pointer outline-none"
|
|
206
|
+
>
|
|
207
|
+
Advanced Filters
|
|
208
|
+
</button>
|
|
209
|
+
</>
|
|
210
|
+
)}
|
|
211
|
+
</div>
|
|
212
|
+
</DropdownMenuContent>
|
|
213
|
+
</DropdownMenu>
|
|
214
|
+
</div>
|
|
215
|
+
)}
|
|
216
|
+
{toolbarContent && (
|
|
217
|
+
<div className="flex-1">{toolbarContent}</div>
|
|
218
|
+
)}
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
)}
|
|
222
|
+
|
|
223
|
+
<div className="relative">
|
|
224
|
+
<AnimatePresence mode="wait">
|
|
225
|
+
{isGrid ? (
|
|
226
|
+
<motion.div
|
|
227
|
+
key="grid"
|
|
228
|
+
initial={{ opacity: 0, y: 10 }}
|
|
229
|
+
animate={{ opacity: 1, y: 0 }}
|
|
230
|
+
exit={{ opacity: 0, y: -10 }}
|
|
231
|
+
transition={{ duration: 0.2 }}
|
|
232
|
+
className={
|
|
233
|
+
data && renderGridItem ? gridClassName : ""
|
|
234
|
+
}
|
|
235
|
+
>
|
|
236
|
+
{data && renderGridItem
|
|
237
|
+
? data.map((item, index) =>
|
|
238
|
+
renderGridItem(item, index),
|
|
239
|
+
)
|
|
240
|
+
: gridView}
|
|
241
|
+
</motion.div>
|
|
242
|
+
) : (
|
|
243
|
+
<motion.div
|
|
244
|
+
key="list"
|
|
245
|
+
initial={{ opacity: 0, y: 10 }}
|
|
246
|
+
animate={{ opacity: 1, y: 0 }}
|
|
247
|
+
exit={{ opacity: 0, y: -10 }}
|
|
248
|
+
transition={{ duration: 0.2 }}
|
|
249
|
+
data-slot="table-container"
|
|
250
|
+
className="relative w-full overflow-x-auto rounded-lg border border-dashboard-border bg-dashboard-card dark:bg-dashboard-card/40 shadow-xs"
|
|
251
|
+
>
|
|
252
|
+
<table
|
|
253
|
+
data-slot="table"
|
|
254
|
+
className={cn(
|
|
255
|
+
"w-full caption-bottom text-sm",
|
|
256
|
+
className,
|
|
257
|
+
)}
|
|
258
|
+
{...props}
|
|
259
|
+
/>
|
|
260
|
+
</motion.div>
|
|
261
|
+
)}
|
|
262
|
+
</AnimatePresence>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
{advancedFilterMetadata && (
|
|
266
|
+
<AdvancedFilters
|
|
267
|
+
isOpen={isAdvancedFilterOpen}
|
|
268
|
+
onClose={() => setIsAdvancedFilterOpen(false)}
|
|
269
|
+
metadata={advancedFilterMetadata}
|
|
270
|
+
localFilters={advancedFilters}
|
|
271
|
+
setLocalFilters={setAdvancedFilters}
|
|
272
|
+
onApply={() => {
|
|
273
|
+
onAdvancedFilterApply?.(advancedFilters);
|
|
274
|
+
}}
|
|
275
|
+
onReset={() => {
|
|
276
|
+
setAdvancedFilters([]);
|
|
277
|
+
onAdvancedFilterApply?.([]);
|
|
278
|
+
}}
|
|
279
|
+
/>
|
|
280
|
+
)}
|
|
281
|
+
</div>
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface TableGridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
286
|
+
contextMenuItems?: React.ReactNode;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function TableGridItem({
|
|
290
|
+
className,
|
|
291
|
+
contextMenuItems,
|
|
292
|
+
children,
|
|
293
|
+
...props
|
|
294
|
+
}: TableGridItemProps) {
|
|
295
|
+
const itemContent = (
|
|
296
|
+
<div className={className} {...props}>
|
|
297
|
+
{children}
|
|
298
|
+
</div>
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
if (contextMenuItems) {
|
|
302
|
+
return (
|
|
303
|
+
<ContextMenu>
|
|
304
|
+
<ContextMenuTrigger asChild>{itemContent}</ContextMenuTrigger>
|
|
305
|
+
<ContextMenuContent className="w-fit min-w-32">
|
|
306
|
+
{contextMenuItems}
|
|
307
|
+
</ContextMenuContent>
|
|
308
|
+
</ContextMenu>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return itemContent;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
316
|
+
return (
|
|
317
|
+
<thead
|
|
318
|
+
data-slot="table-header"
|
|
319
|
+
className={cn("[&_tr]:border-b", className)}
|
|
320
|
+
{...props}
|
|
321
|
+
/>
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
326
|
+
return (
|
|
327
|
+
<tbody
|
|
328
|
+
data-slot="table-body"
|
|
329
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
330
|
+
{...props}
|
|
331
|
+
/>
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
336
|
+
return (
|
|
337
|
+
<tfoot
|
|
338
|
+
data-slot="table-footer"
|
|
339
|
+
className={cn(
|
|
340
|
+
"border-t bg-dashboard-secondary/50 font-medium [&>tr]:last:border-b-0",
|
|
341
|
+
className,
|
|
342
|
+
)}
|
|
343
|
+
{...props}
|
|
344
|
+
/>
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface TableRowProps extends React.ComponentProps<"tr"> {
|
|
349
|
+
contextMenuItems?: React.ReactNode;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function TableRow({ className, contextMenuItems, ...props }: TableRowProps) {
|
|
353
|
+
const rowContent = (
|
|
354
|
+
<tr
|
|
355
|
+
data-slot="table-row"
|
|
356
|
+
className={cn(
|
|
357
|
+
"border-b border-dashboard-border transition-colors hover:bg-dashboard-secondary has-aria-expanded:bg-dashboard-secondary/40 data-[state=selected]:bg-dashboard-secondary/50",
|
|
358
|
+
className,
|
|
359
|
+
)}
|
|
360
|
+
{...props}
|
|
361
|
+
/>
|
|
362
|
+
);
|
|
363
|
+
|
|
364
|
+
if (contextMenuItems) {
|
|
365
|
+
return (
|
|
366
|
+
<ContextMenu>
|
|
367
|
+
<ContextMenuTrigger asChild>{rowContent}</ContextMenuTrigger>
|
|
368
|
+
<ContextMenuContent className="w-fit min-w-32">
|
|
369
|
+
{contextMenuItems}
|
|
370
|
+
</ContextMenuContent>
|
|
371
|
+
</ContextMenu>
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return rowContent;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
379
|
+
return (
|
|
380
|
+
<th
|
|
381
|
+
data-slot="table-head"
|
|
382
|
+
className={cn(
|
|
383
|
+
"h-8 px-3 py-1.5 text-left align-middle whitespace-nowrap bg-dashboard-secondary/40 border-b border-dashboard-border text-[10.5px] font-semibold uppercase tracking-wider text-dashboard-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
384
|
+
className,
|
|
385
|
+
)}
|
|
386
|
+
{...props}
|
|
387
|
+
>
|
|
388
|
+
{" "}
|
|
389
|
+
<ThemedText variant="label">{props.children}</ThemedText>
|
|
390
|
+
</th>
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
395
|
+
return (
|
|
396
|
+
<td
|
|
397
|
+
data-slot="table-cell"
|
|
398
|
+
className={cn(
|
|
399
|
+
"h-9 px-3 py-1.5 align-middle whitespace-nowrap text-xs text-dashboard-foreground border-b border-dashboard-border/60 [&:has([role=checkbox])]:pr-0",
|
|
400
|
+
className,
|
|
401
|
+
)}
|
|
402
|
+
{...props}
|
|
403
|
+
/>
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function TableCaption({
|
|
408
|
+
className,
|
|
409
|
+
...props
|
|
410
|
+
}: React.ComponentProps<"caption">) {
|
|
411
|
+
return (
|
|
412
|
+
<caption
|
|
413
|
+
data-slot="table-caption"
|
|
414
|
+
className={cn(
|
|
415
|
+
"mt-4 text-sm text-[12px] text-dashboard-muted-foreground",
|
|
416
|
+
className,
|
|
417
|
+
)}
|
|
418
|
+
{...props}
|
|
419
|
+
/>
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// ============================================================================
|
|
424
|
+
// Pagination
|
|
425
|
+
// ============================================================================
|
|
426
|
+
|
|
427
|
+
interface TablePaginationProps<T> {
|
|
428
|
+
data: PaginatedData<T> | undefined;
|
|
429
|
+
onPageChange: (page: number) => void;
|
|
430
|
+
className?: string;
|
|
431
|
+
showPageNumbers?: boolean;
|
|
432
|
+
showInfo?: boolean;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function TablePagination<T>({
|
|
436
|
+
data,
|
|
437
|
+
onPageChange,
|
|
438
|
+
className,
|
|
439
|
+
showPageNumbers = true,
|
|
440
|
+
showInfo = true,
|
|
441
|
+
}: TablePaginationProps<T>) {
|
|
442
|
+
const { t } = useLanguage("shared");
|
|
443
|
+
const currentPage = data?.currentPage ?? 1;
|
|
444
|
+
const totalPages = data?.lastPage ?? 1;
|
|
445
|
+
const pageSize = data?.perPage ?? 10;
|
|
446
|
+
const totalItems = data?.total ?? totalPages * pageSize;
|
|
447
|
+
const items = data?.items ?? [];
|
|
448
|
+
|
|
449
|
+
const canGoPrevious = currentPage > 1;
|
|
450
|
+
const canGoNext = currentPage < totalPages;
|
|
451
|
+
|
|
452
|
+
const getPageNumbers = () => {
|
|
453
|
+
const pages: (number | string)[] = [];
|
|
454
|
+
if (totalPages <= 5) {
|
|
455
|
+
for (let i = 1; i <= totalPages; i++) pages.push(i);
|
|
456
|
+
} else if (currentPage <= 3) {
|
|
457
|
+
pages.push(1, 2, 3, 4, "...", totalPages);
|
|
458
|
+
} else if (currentPage >= totalPages - 2) {
|
|
459
|
+
pages.push(1, "...", totalPages - 3, totalPages - 2, totalPages - 1, totalPages);
|
|
460
|
+
} else {
|
|
461
|
+
pages.push(1, "...", currentPage - 1, currentPage, currentPage + 1, "...", totalPages);
|
|
462
|
+
}
|
|
463
|
+
return pages;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
const startItem = items.length > 0 ? (currentPage - 1) * pageSize + 1 : 0;
|
|
467
|
+
const endItem = items.length > 0 ? startItem + items.length - 1 : 0;
|
|
468
|
+
|
|
469
|
+
return (
|
|
470
|
+
<div
|
|
471
|
+
className={cn(
|
|
472
|
+
"flex flex-col sm:flex-row items-center justify-between gap-3 px-2 py-3",
|
|
473
|
+
className
|
|
474
|
+
)}
|
|
475
|
+
>
|
|
476
|
+
{showInfo && (
|
|
477
|
+
<div className="text-xs text-dashboard-muted-foreground font-medium">
|
|
478
|
+
{items.length > 0 ? (
|
|
479
|
+
<>
|
|
480
|
+
{t("common.table.showing", "Showing")}{" "}
|
|
481
|
+
<span className="font-semibold text-dashboard-foreground">
|
|
482
|
+
{startItem}
|
|
483
|
+
</span>{" "}
|
|
484
|
+
{t("common.table.to", "to")}{" "}
|
|
485
|
+
<span className="font-semibold text-dashboard-foreground">
|
|
486
|
+
{endItem}
|
|
487
|
+
</span>{" "}
|
|
488
|
+
{t("common.table.of", "of")}{" "}
|
|
489
|
+
<span className="font-semibold text-dashboard-foreground">
|
|
490
|
+
{totalItems}
|
|
491
|
+
</span>{" "}
|
|
492
|
+
{t("common.table.entries", "entries")}
|
|
493
|
+
</>
|
|
494
|
+
) : (
|
|
495
|
+
<span className="text-dashboard-muted-foreground">
|
|
496
|
+
{t("common.table.noEntries", "No entries to show")}
|
|
497
|
+
</span>
|
|
498
|
+
)}
|
|
499
|
+
</div>
|
|
500
|
+
)}
|
|
501
|
+
|
|
502
|
+
<div className="flex items-center gap-1.5">
|
|
503
|
+
<Button
|
|
504
|
+
variant="ghost"
|
|
505
|
+
size="sm"
|
|
506
|
+
aria-label="Previous page"
|
|
507
|
+
onClick={() => onPageChange(currentPage - 1)}
|
|
508
|
+
disabled={!canGoPrevious}
|
|
509
|
+
className="h-8 w-8 p-0 hover:bg-dashboard-secondary text-dashboard-muted-foreground hover:text-dashboard-foreground disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer"
|
|
510
|
+
>
|
|
511
|
+
<ChevronLeft className="h-4 w-4 rtl:rotate-180" />
|
|
512
|
+
</Button>
|
|
513
|
+
|
|
514
|
+
{showPageNumbers && (
|
|
515
|
+
<div className="flex items-center gap-1">
|
|
516
|
+
{getPageNumbers().map((page, index) =>
|
|
517
|
+
page === "..." ? (
|
|
518
|
+
<span
|
|
519
|
+
key={`ellipsis-${index}`}
|
|
520
|
+
className="w-8 h-8 flex items-center justify-center text-xs text-dashboard-muted-foreground"
|
|
521
|
+
>
|
|
522
|
+
...
|
|
523
|
+
</span>
|
|
524
|
+
) : (
|
|
525
|
+
<Button
|
|
526
|
+
key={page}
|
|
527
|
+
variant={
|
|
528
|
+
currentPage === page
|
|
529
|
+
? "default"
|
|
530
|
+
: "ghost"
|
|
531
|
+
}
|
|
532
|
+
size="sm"
|
|
533
|
+
aria-label={`Page ${page}`}
|
|
534
|
+
onClick={() => onPageChange(page as number)}
|
|
535
|
+
className={cn(
|
|
536
|
+
"h-8 w-8 p-0 rounded-dashboard-radius text-sm font-semibold transition-all cursor-pointer",
|
|
537
|
+
currentPage === page
|
|
538
|
+
? "bg-dashboard-primary text-white"
|
|
539
|
+
: "hover:bg-dashboard-secondary text-dashboard-muted-foreground hover:text-dashboard-foreground bg-transparent",
|
|
540
|
+
)}
|
|
541
|
+
>
|
|
542
|
+
{page}
|
|
543
|
+
</Button>
|
|
544
|
+
),
|
|
545
|
+
)}
|
|
546
|
+
</div>
|
|
547
|
+
)}
|
|
548
|
+
|
|
549
|
+
<Button
|
|
550
|
+
variant="ghost"
|
|
551
|
+
size="sm"
|
|
552
|
+
aria-label="Next page"
|
|
553
|
+
onClick={() => onPageChange(currentPage + 1)}
|
|
554
|
+
disabled={!canGoNext}
|
|
555
|
+
className="h-8 w-8 p-0 hover:bg-dashboard-secondary text-dashboard-muted-foreground hover:text-dashboard-foreground disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer"
|
|
556
|
+
>
|
|
557
|
+
<ChevronRight className="h-4 w-4 rtl:rotate-180" />
|
|
558
|
+
</Button>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export {
|
|
565
|
+
Table,
|
|
566
|
+
TableBody,
|
|
567
|
+
TableCaption,
|
|
568
|
+
TableCell,
|
|
569
|
+
TableFooter,
|
|
570
|
+
TableGridItem,
|
|
571
|
+
TableHead,
|
|
572
|
+
TableHeader,
|
|
573
|
+
TablePagination,
|
|
574
|
+
TableRow,
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
export type { TablePaginationProps };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../support/utils";
|
|
5
|
+
|
|
6
|
+
function Tabs({
|
|
7
|
+
className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
...props
|
|
10
|
+
}: TabsPrimitive.Root.Props) {
|
|
11
|
+
return (
|
|
12
|
+
<TabsPrimitive.Root
|
|
13
|
+
data-slot="tabs"
|
|
14
|
+
data-orientation={orientation}
|
|
15
|
+
className={cn(
|
|
16
|
+
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const tabsListVariants = cva(
|
|
25
|
+
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-0.5 text-dashboard-muted-foreground group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
|
|
26
|
+
{
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default:
|
|
30
|
+
"bg-dashboard-card border border-dashboard-border h-8.5",
|
|
31
|
+
line: "gap-1 bg-transparent border-b border-dashboard-border h-8.5 rounded-none",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
function TabsList({
|
|
41
|
+
className,
|
|
42
|
+
variant = "default",
|
|
43
|
+
...props
|
|
44
|
+
}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {
|
|
45
|
+
return (
|
|
46
|
+
<TabsPrimitive.List
|
|
47
|
+
data-slot="tabs-list"
|
|
48
|
+
data-variant={variant}
|
|
49
|
+
className={cn(tabsListVariants({ variant }), className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
|
|
56
|
+
return (
|
|
57
|
+
<TabsPrimitive.Tab
|
|
58
|
+
data-slot="tabs-trigger"
|
|
59
|
+
className={cn(
|
|
60
|
+
"relative inline-flex items-center justify-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium whitespace-nowrap text-dashboard-muted-foreground transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-dashboard-foreground hover:bg-dashboard-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-dashboard-primary/40 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
61
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent group-data-[variant=line]/tabs-list:data-active:border-transparent",
|
|
62
|
+
"data-active:bg-dashboard-secondary data-active:text-dashboard-primary data-active:font-semibold",
|
|
63
|
+
"after:absolute after:bg-dashboard-primary after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-2px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
|
|
72
|
+
return (
|
|
73
|
+
<TabsPrimitive.Panel
|
|
74
|
+
data-slot="tabs-content"
|
|
75
|
+
className={cn("flex-1 text-xs outline-none", className)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { Tabs, TabsContent, TabsList, tabsListVariants, TabsTrigger };
|