@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,248 @@
|
|
|
1
|
+
import { useLanguage } from "@gostack-framework/react";
|
|
2
|
+
|
|
3
|
+
interface ErrorProps {
|
|
4
|
+
message: string;
|
|
5
|
+
variant?: "inline" | "card" | "banner";
|
|
6
|
+
showIcon?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
helpText?: string;
|
|
9
|
+
onRetry?: () => void;
|
|
10
|
+
onHelp?: () => void;
|
|
11
|
+
showButtons?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function ErrorComponent(props: ErrorProps | string) {
|
|
15
|
+
const { t } = useLanguage();
|
|
16
|
+
const config: ErrorProps =
|
|
17
|
+
typeof props === "string"
|
|
18
|
+
? {
|
|
19
|
+
message: props,
|
|
20
|
+
variant: "card",
|
|
21
|
+
showIcon: true,
|
|
22
|
+
showButtons: true,
|
|
23
|
+
}
|
|
24
|
+
: {
|
|
25
|
+
message: props.message,
|
|
26
|
+
variant: props.variant || "card",
|
|
27
|
+
showIcon: props.showIcon !== false,
|
|
28
|
+
title: props.title,
|
|
29
|
+
helpText: props.helpText,
|
|
30
|
+
onRetry: props.onRetry,
|
|
31
|
+
onHelp: props.onHelp,
|
|
32
|
+
showButtons: props.showButtons !== false,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
message,
|
|
37
|
+
variant,
|
|
38
|
+
showIcon,
|
|
39
|
+
title,
|
|
40
|
+
helpText,
|
|
41
|
+
onRetry,
|
|
42
|
+
onHelp,
|
|
43
|
+
showButtons,
|
|
44
|
+
} = config;
|
|
45
|
+
|
|
46
|
+
const ErrorIcon = () => (
|
|
47
|
+
<svg
|
|
48
|
+
className="w-6 h-6 shrink-0"
|
|
49
|
+
fill="none"
|
|
50
|
+
stroke="currentColor"
|
|
51
|
+
viewBox="0 0 24 24"
|
|
52
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
53
|
+
>
|
|
54
|
+
<path
|
|
55
|
+
strokeLinecap="round"
|
|
56
|
+
strokeLinejoin="round"
|
|
57
|
+
strokeWidth={2}
|
|
58
|
+
d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const InlineVariant = () => (
|
|
64
|
+
<div className="flex justify-center items-center gap-2 text-xs text-dashboard-destructive">
|
|
65
|
+
{showIcon && <ErrorIcon />}
|
|
66
|
+
<span>{message}</span>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const BannerVariant = () => (
|
|
71
|
+
<div className="bg-dashboard-destructive/10 border-l-4 border-dashboard-destructive p-3.5 rounded-lg">
|
|
72
|
+
<div className="flex items-start gap-2.5">
|
|
73
|
+
{showIcon && (
|
|
74
|
+
<div className="text-dashboard-destructive mt-0.5">
|
|
75
|
+
<ErrorIcon />
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
<div className="flex-1">
|
|
79
|
+
{title && (
|
|
80
|
+
<h4 className="text-xs font-semibold text-dashboard-destructive mb-1">
|
|
81
|
+
{title}
|
|
82
|
+
</h4>
|
|
83
|
+
)}
|
|
84
|
+
<p className="text-xs text-dashboard-muted-foreground">
|
|
85
|
+
{message}
|
|
86
|
+
</p>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const CardVariant = () => (
|
|
93
|
+
<div className="max-w-md w-full mx-4">
|
|
94
|
+
<div className="bg-dashboard-card border border-dashboard-border rounded-xl shadow-2xl p-6 transition-all duration-300">
|
|
95
|
+
{/* Header with Icon */}
|
|
96
|
+
<div className="flex flex-col items-center text-center mb-5">
|
|
97
|
+
{showIcon && (
|
|
98
|
+
<div className="w-12 h-12 rounded-xl bg-dashboard-destructive/15 flex items-center justify-center text-dashboard-destructive mb-3 ring-1 ring-dashboard-destructive/30">
|
|
99
|
+
<svg
|
|
100
|
+
className="w-6 h-6"
|
|
101
|
+
fill="none"
|
|
102
|
+
stroke="currentColor"
|
|
103
|
+
viewBox="0 0 24 24"
|
|
104
|
+
>
|
|
105
|
+
<path
|
|
106
|
+
strokeLinecap="round"
|
|
107
|
+
strokeLinejoin="round"
|
|
108
|
+
strokeWidth={2}
|
|
109
|
+
d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
110
|
+
/>
|
|
111
|
+
</svg>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
114
|
+
<h3 className="text-base font-bold text-dashboard-foreground mb-1.5">
|
|
115
|
+
{title || t("error.defaultTitle")}
|
|
116
|
+
</h3>
|
|
117
|
+
<p className="text-xs text-dashboard-muted-foreground leading-relaxed">
|
|
118
|
+
{message}
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
{/* Help Text Section */}
|
|
123
|
+
{helpText && (
|
|
124
|
+
<div className="mb-5 p-3.5 bg-dashboard-secondary/40 rounded-lg border border-dashboard-border">
|
|
125
|
+
<div className="flex items-start gap-2.5">
|
|
126
|
+
<svg
|
|
127
|
+
className="w-4 h-4 text-dashboard-primary shrink-0 mt-0.5"
|
|
128
|
+
fill="none"
|
|
129
|
+
stroke="currentColor"
|
|
130
|
+
viewBox="0 0 24 24"
|
|
131
|
+
>
|
|
132
|
+
<path
|
|
133
|
+
strokeLinecap="round"
|
|
134
|
+
strokeLinejoin="round"
|
|
135
|
+
strokeWidth={2}
|
|
136
|
+
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
137
|
+
/>
|
|
138
|
+
</svg>
|
|
139
|
+
<div className="flex-1">
|
|
140
|
+
<h4 className="text-xs font-semibold text-dashboard-foreground mb-0.5">
|
|
141
|
+
{t("error.howToFix")}
|
|
142
|
+
</h4>
|
|
143
|
+
<p className="text-xs text-dashboard-muted-foreground leading-relaxed">
|
|
144
|
+
{helpText}
|
|
145
|
+
</p>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
)}
|
|
150
|
+
|
|
151
|
+
{/* Action Buttons */}
|
|
152
|
+
{showButtons && (
|
|
153
|
+
<div className="flex flex-col sm:flex-row gap-2.5">
|
|
154
|
+
{onRetry && (
|
|
155
|
+
<button
|
|
156
|
+
onClick={onRetry}
|
|
157
|
+
className="flex-1 px-4 py-2 bg-dashboard-destructive hover:bg-dashboard-destructive/90 text-white font-medium text-xs rounded-lg transition-colors flex items-center justify-center gap-1.5 shadow-xs cursor-pointer"
|
|
158
|
+
>
|
|
159
|
+
<svg
|
|
160
|
+
className="w-3.5 h-3.5"
|
|
161
|
+
fill="none"
|
|
162
|
+
stroke="currentColor"
|
|
163
|
+
viewBox="0 0 24 24"
|
|
164
|
+
>
|
|
165
|
+
<path
|
|
166
|
+
strokeLinecap="round"
|
|
167
|
+
strokeLinejoin="round"
|
|
168
|
+
strokeWidth={2}
|
|
169
|
+
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
170
|
+
/>
|
|
171
|
+
</svg>
|
|
172
|
+
{t("error.tryAgain")}
|
|
173
|
+
</button>
|
|
174
|
+
)}
|
|
175
|
+
{onHelp && (
|
|
176
|
+
<button
|
|
177
|
+
onClick={onHelp}
|
|
178
|
+
className="flex-1 px-4 py-2 bg-dashboard-secondary/60 hover:bg-dashboard-secondary text-dashboard-foreground font-medium text-xs rounded-lg border border-dashboard-border transition-colors flex items-center justify-center gap-1.5 cursor-pointer"
|
|
179
|
+
>
|
|
180
|
+
<svg
|
|
181
|
+
className="w-3.5 h-3.5"
|
|
182
|
+
fill="none"
|
|
183
|
+
stroke="currentColor"
|
|
184
|
+
viewBox="0 0 24 24"
|
|
185
|
+
>
|
|
186
|
+
<path
|
|
187
|
+
strokeLinecap="round"
|
|
188
|
+
strokeLinejoin="round"
|
|
189
|
+
strokeWidth={2}
|
|
190
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
191
|
+
/>
|
|
192
|
+
</svg>
|
|
193
|
+
{t("error.getHelp")}
|
|
194
|
+
</button>
|
|
195
|
+
)}
|
|
196
|
+
{!onRetry && !onHelp && (
|
|
197
|
+
<button
|
|
198
|
+
onClick={() => window.location.reload()}
|
|
199
|
+
className="w-full px-4 py-2 bg-dashboard-primary hover:bg-dashboard-primary/90 text-white font-medium text-xs rounded-lg transition-colors flex items-center justify-center gap-1.5 shadow-xs cursor-pointer"
|
|
200
|
+
>
|
|
201
|
+
<svg
|
|
202
|
+
className="w-3.5 h-3.5"
|
|
203
|
+
fill="none"
|
|
204
|
+
stroke="currentColor"
|
|
205
|
+
viewBox="0 0 24 24"
|
|
206
|
+
>
|
|
207
|
+
<path
|
|
208
|
+
strokeLinecap="round"
|
|
209
|
+
strokeLinejoin="round"
|
|
210
|
+
strokeWidth={2}
|
|
211
|
+
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
212
|
+
/>
|
|
213
|
+
</svg>
|
|
214
|
+
{t("error.reloadPage")}
|
|
215
|
+
</button>
|
|
216
|
+
)}
|
|
217
|
+
</div>
|
|
218
|
+
)}
|
|
219
|
+
|
|
220
|
+
{/* Additional Info */}
|
|
221
|
+
<div className="mt-5 pt-3.5 border-t border-dashboard-border">
|
|
222
|
+
<p className="text-[11px] text-dashboard-muted-foreground text-center">
|
|
223
|
+
{t("error.contactSupport")}
|
|
224
|
+
</p>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
const variantRender = () => {
|
|
231
|
+
switch (variant) {
|
|
232
|
+
case "inline":
|
|
233
|
+
return <InlineVariant />;
|
|
234
|
+
case "banner":
|
|
235
|
+
return <BannerVariant />;
|
|
236
|
+
case "card":
|
|
237
|
+
return <CardVariant />;
|
|
238
|
+
default:
|
|
239
|
+
return <InlineVariant />;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
return (
|
|
244
|
+
<div className="w-full h-screen flex justify-center items-center bg-transparent">
|
|
245
|
+
{variantRender()}
|
|
246
|
+
</div>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorState — modern error UI for inline, card, and full-page contexts.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { cn } from "../support/utils";
|
|
6
|
+
import { AlertTriangle, Home, RefreshCw, WifiOff } from "lucide-react";
|
|
7
|
+
import { motion } from "motion/react";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
import { useNavigate } from "react-router";
|
|
10
|
+
import type { BaseComponentProps, ErrorStateProps } from "../types";
|
|
11
|
+
import { Button } from "./button";
|
|
12
|
+
import { ThemedText } from "../index";
|
|
13
|
+
|
|
14
|
+
interface Props extends ErrorStateProps, BaseComponentProps {}
|
|
15
|
+
|
|
16
|
+
/** Normalizes unknown errors into a display message. */
|
|
17
|
+
export function getErrorMessage(
|
|
18
|
+
error: unknown,
|
|
19
|
+
fallback = "Something went wrong. Please try again.",
|
|
20
|
+
): string {
|
|
21
|
+
if (error instanceof Error && error.message) return error.message;
|
|
22
|
+
if (typeof error === "string" && error.trim()) return error;
|
|
23
|
+
if (
|
|
24
|
+
error &&
|
|
25
|
+
typeof error === "object" &&
|
|
26
|
+
"message" in error &&
|
|
27
|
+
typeof (error as { message: unknown }).message === "string"
|
|
28
|
+
) {
|
|
29
|
+
return (error as { message: string }).message;
|
|
30
|
+
}
|
|
31
|
+
return fallback;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function ErrorState({
|
|
35
|
+
title,
|
|
36
|
+
message,
|
|
37
|
+
error,
|
|
38
|
+
onRetry,
|
|
39
|
+
showIcon = true,
|
|
40
|
+
variant = "fullPage",
|
|
41
|
+
primaryColor,
|
|
42
|
+
accentColor,
|
|
43
|
+
className = "",
|
|
44
|
+
testId,
|
|
45
|
+
}: Props) {
|
|
46
|
+
const { t } = useTranslation();
|
|
47
|
+
const navigate = useNavigate();
|
|
48
|
+
const resolvedMessage =
|
|
49
|
+
message ??
|
|
50
|
+
(error !== undefined
|
|
51
|
+
? getErrorMessage(error)
|
|
52
|
+
: t("errors.unexpected", "Something went wrong"));
|
|
53
|
+
const resolvedTitle =
|
|
54
|
+
title ?? t("errors.unexpected", "Something went wrong");
|
|
55
|
+
|
|
56
|
+
if (variant === "inline") {
|
|
57
|
+
return (
|
|
58
|
+
<motion.div
|
|
59
|
+
role="alert"
|
|
60
|
+
initial={{ opacity: 0, y: 4 }}
|
|
61
|
+
animate={{ opacity: 1, y: 0 }}
|
|
62
|
+
className={cn(
|
|
63
|
+
"inline-flex items-center gap-2.5 rounded-lg border border-dashboard-destructive/20 bg-dashboard-destructive/10 px-3 py-1.5 text-xs text-dashboard-destructive",
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
data-testid={testId}
|
|
67
|
+
>
|
|
68
|
+
{showIcon && (
|
|
69
|
+
<AlertTriangle className="size-3.5 shrink-0 text-dashboard-destructive" />
|
|
70
|
+
)}
|
|
71
|
+
<ThemedText as="span">{resolvedMessage}</ThemedText>
|
|
72
|
+
{onRetry && (
|
|
73
|
+
<button
|
|
74
|
+
type="button"
|
|
75
|
+
onClick={onRetry}
|
|
76
|
+
className="font-semibold text-dashboard-destructive/80 underline-offset-2 hover:underline cursor-pointer"
|
|
77
|
+
>
|
|
78
|
+
{t("actions.retry", "Retry")}
|
|
79
|
+
</button>
|
|
80
|
+
)}
|
|
81
|
+
</motion.div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const Icon = variant === "fullPage" ? WifiOff : AlertTriangle;
|
|
86
|
+
|
|
87
|
+
const card = (
|
|
88
|
+
<motion.div
|
|
89
|
+
role="alert"
|
|
90
|
+
initial={{ opacity: 0, y: 20, scale: 0.98 }}
|
|
91
|
+
animate={{ opacity: 1, y: 0, scale: 1 }}
|
|
92
|
+
transition={{ duration: 0.35, ease: [0.25, 0.1, 0.25, 1] }}
|
|
93
|
+
className={cn(
|
|
94
|
+
"relative w-full max-w-md overflow-hidden rounded-xl border border-dashboard-border bg-dashboard-card p-6 shadow-2xl md:p-8",
|
|
95
|
+
className,
|
|
96
|
+
)}
|
|
97
|
+
data-testid={testId}
|
|
98
|
+
>
|
|
99
|
+
<div
|
|
100
|
+
aria-hidden
|
|
101
|
+
className="pointer-events-none absolute -right-16 -top-16 size-48 rounded-full opacity-20 blur-3xl"
|
|
102
|
+
style={{
|
|
103
|
+
background: accentColor ?? "var(--color-dashboard-primary)",
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
<div
|
|
107
|
+
aria-hidden
|
|
108
|
+
className="pointer-events-none absolute -bottom-20 -left-16 size-56 rounded-full opacity-20 blur-3xl"
|
|
109
|
+
style={{
|
|
110
|
+
background:
|
|
111
|
+
primaryColor ?? "var(--color-dashboard-secondary)",
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<div className="relative z-10 flex flex-col items-center text-center">
|
|
116
|
+
{showIcon && (
|
|
117
|
+
<motion.div
|
|
118
|
+
initial={{ scale: 0.8, opacity: 0 }}
|
|
119
|
+
animate={{ scale: 1, opacity: 1 }}
|
|
120
|
+
transition={{ delay: 0.1, duration: 0.35 }}
|
|
121
|
+
className="mb-4 flex size-12 items-center justify-center rounded-xl bg-dashboard-destructive/15 ring-1 ring-dashboard-destructive/30"
|
|
122
|
+
>
|
|
123
|
+
<Icon
|
|
124
|
+
className="size-6 text-dashboard-destructive"
|
|
125
|
+
strokeWidth={2}
|
|
126
|
+
/>
|
|
127
|
+
</motion.div>
|
|
128
|
+
)}
|
|
129
|
+
|
|
130
|
+
<ThemedText variant="body" as="p" className="mb-1.5 font-bold uppercase tracking-wider text-dashboard-destructive">
|
|
131
|
+
{t("errors.errorLabel", "Error")}
|
|
132
|
+
</ThemedText>
|
|
133
|
+
<ThemedText as="h2" className="text-xl font-bold tracking-tight text-dashboard-foreground">
|
|
134
|
+
{resolvedTitle}
|
|
135
|
+
</ThemedText>
|
|
136
|
+
<ThemedText as="p" className="mt-2 max-w-sm text-xs leading-relaxed text-dashboard-muted-foreground">
|
|
137
|
+
{resolvedMessage}
|
|
138
|
+
</ThemedText>
|
|
139
|
+
|
|
140
|
+
<div className="mt-6 flex w-full flex-col gap-2.5 sm:flex-row sm:justify-center">
|
|
141
|
+
{onRetry && (
|
|
142
|
+
<Button
|
|
143
|
+
type="button"
|
|
144
|
+
onClick={onRetry}
|
|
145
|
+
className="h-9 gap-1.5 rounded-lg bg-dashboard-destructive px-4 text-xs font-medium text-white shadow-xs hover:bg-dashboard-destructive/90"
|
|
146
|
+
>
|
|
147
|
+
<RefreshCw className="size-3.5" />
|
|
148
|
+
{t("actions.tryAgain", "Try again")}
|
|
149
|
+
</Button>
|
|
150
|
+
)}
|
|
151
|
+
<Button
|
|
152
|
+
type="button"
|
|
153
|
+
variant="outline"
|
|
154
|
+
className="h-9 gap-1.5 rounded-lg border-dashboard-border bg-dashboard-card/50 px-4 text-xs font-medium hover:bg-dashboard-secondary text-dashboard-foreground"
|
|
155
|
+
onClick={() => {
|
|
156
|
+
navigate("/");
|
|
157
|
+
}}
|
|
158
|
+
>
|
|
159
|
+
<Home className="size-3.5" />
|
|
160
|
+
{t("actions.goHome", "Go home")}
|
|
161
|
+
</Button>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</motion.div>
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
if (variant === "fullPage") {
|
|
168
|
+
return (
|
|
169
|
+
<div
|
|
170
|
+
className={cn(
|
|
171
|
+
"relative flex h-[90vh] items-center justify-center overflow-hidden px-6 py-16",
|
|
172
|
+
className,
|
|
173
|
+
)}
|
|
174
|
+
data-testid={testId}
|
|
175
|
+
>
|
|
176
|
+
<motion.div
|
|
177
|
+
className="pointer-events-none absolute inset-0 opacity-40"
|
|
178
|
+
style={{
|
|
179
|
+
backgroundImage: `radial-gradient(circle at 20% 20%, ${accentColor ?? "var(--color-dashboard-accent)"}33 0%, transparent 45%), radial-gradient(circle at 80% 80%, ${primaryColor ?? "var(--color-dashboard-secondary)"}44 0%, transparent 50%)`,
|
|
180
|
+
}}
|
|
181
|
+
/>
|
|
182
|
+
<div className="relative z-10 w-full flex justify-center">
|
|
183
|
+
{card}
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<motion.div
|
|
191
|
+
className={cn("flex w-full justify-center p-4", className)}
|
|
192
|
+
data-testid={testId}
|
|
193
|
+
>
|
|
194
|
+
{card}
|
|
195
|
+
</motion.div>
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export default ErrorState;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cn } from "../support/utils";
|
|
2
|
+
import { Download, Paperclip, Trash2 } from "lucide-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export interface FileAttachmentChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
name: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
onDownload?: () => void;
|
|
10
|
+
onDelete?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function FileAttachmentChip({
|
|
14
|
+
name,
|
|
15
|
+
size,
|
|
16
|
+
url,
|
|
17
|
+
onDownload,
|
|
18
|
+
onDelete,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: FileAttachmentChipProps) {
|
|
22
|
+
const handleDownload = (e: React.MouseEvent) => {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
if (onDownload) {
|
|
25
|
+
onDownload();
|
|
26
|
+
} else if (url) {
|
|
27
|
+
window.open(url, "_blank");
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const handleDelete = (e: React.MouseEvent) => {
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
onDelete?.();
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
className={cn(
|
|
39
|
+
"group flex items-center justify-between gap-3 px-3 py-2 rounded-lg bg-dashboard-secondary/60 hover:bg-dashboard-secondary border border-dashboard-border transition-colors text-xs select-none",
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
<div className="flex items-center gap-2 min-w-0 flex-1">
|
|
45
|
+
<Paperclip className="w-3.5 h-3.5 text-dashboard-muted-foreground shrink-0" />
|
|
46
|
+
<span className="truncate font-medium text-dashboard-foreground">
|
|
47
|
+
{name}
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div className="flex items-center gap-2 shrink-0">
|
|
52
|
+
{size && (
|
|
53
|
+
<span className="text-[11px] text-dashboard-muted-foreground tabular-nums">
|
|
54
|
+
{size}
|
|
55
|
+
</span>
|
|
56
|
+
)}
|
|
57
|
+
|
|
58
|
+
{(onDownload || url) && (
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
onClick={handleDownload}
|
|
62
|
+
aria-label={`Download ${name}`}
|
|
63
|
+
className="p-1 text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-muted/30 rounded transition-colors"
|
|
64
|
+
>
|
|
65
|
+
<Download className="w-3.5 h-3.5" />
|
|
66
|
+
</button>
|
|
67
|
+
)}
|
|
68
|
+
|
|
69
|
+
{onDelete && (
|
|
70
|
+
<button
|
|
71
|
+
type="button"
|
|
72
|
+
onClick={handleDelete}
|
|
73
|
+
aria-label={`Delete ${name}`}
|
|
74
|
+
className="p-1 text-dashboard-muted-foreground hover:text-red-400 hover:bg-red-500/10 rounded transition-colors"
|
|
75
|
+
>
|
|
76
|
+
<Trash2 className="w-3.5 h-3.5" />
|
|
77
|
+
</button>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export default FileAttachmentChip;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn } from "../support/utils";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export interface FilterConditionChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
field: string;
|
|
7
|
+
operator?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
onRemove?: () => void;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function FilterConditionChip({
|
|
14
|
+
field,
|
|
15
|
+
operator = "=",
|
|
16
|
+
value,
|
|
17
|
+
onRemove,
|
|
18
|
+
onClick,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: FilterConditionChipProps) {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={cn(
|
|
25
|
+
"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-dashboard-secondary/80 hover:bg-dashboard-secondary border border-dashboard-border text-xs text-dashboard-foreground font-medium transition-colors select-none",
|
|
26
|
+
onClick && "cursor-pointer",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
<span className="text-dashboard-muted-foreground">{field}</span>
|
|
33
|
+
<span className="text-dashboard-primary font-mono text-[11px]">
|
|
34
|
+
{operator}
|
|
35
|
+
</span>
|
|
36
|
+
<span className="text-dashboard-foreground font-semibold">
|
|
37
|
+
{value}
|
|
38
|
+
</span>
|
|
39
|
+
{onRemove && (
|
|
40
|
+
<button
|
|
41
|
+
type="button"
|
|
42
|
+
aria-label={`Remove filter for ${field}`}
|
|
43
|
+
onClick={(e) => {
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
onRemove();
|
|
46
|
+
}}
|
|
47
|
+
className="ml-1 p-0.5 rounded-xs text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-muted/40 transition-colors"
|
|
48
|
+
>
|
|
49
|
+
<X className="w-3 h-3" />
|
|
50
|
+
</button>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default FilterConditionChip;
|