@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,433 @@
|
|
|
1
|
+
import { Button } from "../index";
|
|
2
|
+
import { useLanguage } from "@gostack-framework/react";
|
|
3
|
+
import { cn } from "../support/utils";
|
|
4
|
+
import { Highlight } from "@tiptap/extension-highlight";
|
|
5
|
+
import Image from "@tiptap/extension-image";
|
|
6
|
+
import Link from "@tiptap/extension-link";
|
|
7
|
+
import Placeholder from "@tiptap/extension-placeholder";
|
|
8
|
+
import Underline from "@tiptap/extension-underline";
|
|
9
|
+
import { EditorContent, useEditor } from "@tiptap/react";
|
|
10
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
11
|
+
import {
|
|
12
|
+
Bold,
|
|
13
|
+
Code,
|
|
14
|
+
Highlighter,
|
|
15
|
+
Image as ImageIcon,
|
|
16
|
+
Italic,
|
|
17
|
+
Link as LinkIcon,
|
|
18
|
+
List,
|
|
19
|
+
ListOrdered,
|
|
20
|
+
Quote,
|
|
21
|
+
Redo,
|
|
22
|
+
Underline as UnderlineIcon,
|
|
23
|
+
Undo,
|
|
24
|
+
} from "lucide-react";
|
|
25
|
+
import { useState } from "react";
|
|
26
|
+
|
|
27
|
+
interface RichTextEditorProps {
|
|
28
|
+
content: string;
|
|
29
|
+
onChange: (content: string) => void;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const MenuBar = ({
|
|
34
|
+
editor,
|
|
35
|
+
onLinkClick,
|
|
36
|
+
onImageClick,
|
|
37
|
+
}: {
|
|
38
|
+
editor: any;
|
|
39
|
+
onLinkClick: () => void;
|
|
40
|
+
onImageClick: () => void;
|
|
41
|
+
}) => {
|
|
42
|
+
if (!editor) return null;
|
|
43
|
+
|
|
44
|
+
const buttons = [
|
|
45
|
+
{
|
|
46
|
+
icon: Bold,
|
|
47
|
+
action: () => editor.chain().focus().toggleBold().run(),
|
|
48
|
+
isActive: editor.isActive("bold"),
|
|
49
|
+
label: "Bold",
|
|
50
|
+
group: 0,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
icon: Italic,
|
|
54
|
+
action: () => editor.chain().focus().toggleItalic().run(),
|
|
55
|
+
isActive: editor.isActive("italic"),
|
|
56
|
+
label: "Italic",
|
|
57
|
+
group: 0,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
icon: UnderlineIcon,
|
|
61
|
+
action: () => editor.chain().focus().toggleUnderline().run(),
|
|
62
|
+
isActive: editor.isActive("underline"),
|
|
63
|
+
label: "Underline",
|
|
64
|
+
group: 0,
|
|
65
|
+
},
|
|
66
|
+
// ── NEW: Highlight button in group 0 ──
|
|
67
|
+
{
|
|
68
|
+
icon: Highlighter,
|
|
69
|
+
action: () =>
|
|
70
|
+
editor
|
|
71
|
+
.chain()
|
|
72
|
+
.focus()
|
|
73
|
+
.toggleHighlight({ color: "rgba(105, 117, 226, 0.35)" })
|
|
74
|
+
.run(),
|
|
75
|
+
isActive: editor.isActive("highlight"),
|
|
76
|
+
label: "Highlight",
|
|
77
|
+
group: 0,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
icon: List,
|
|
81
|
+
action: () => editor.chain().focus().toggleBulletList().run(),
|
|
82
|
+
isActive: editor.isActive("bulletList"),
|
|
83
|
+
label: "Bullet List",
|
|
84
|
+
group: 1,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
icon: ListOrdered,
|
|
88
|
+
action: () => editor.chain().focus().toggleOrderedList().run(),
|
|
89
|
+
isActive: editor.isActive("orderedList"),
|
|
90
|
+
label: "Ordered List",
|
|
91
|
+
group: 1,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
icon: Quote,
|
|
95
|
+
action: () => editor.chain().focus().toggleBlockquote().run(),
|
|
96
|
+
isActive: editor.isActive("blockquote"),
|
|
97
|
+
label: "Quote",
|
|
98
|
+
group: 2,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
icon: Code,
|
|
102
|
+
action: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
103
|
+
isActive: editor.isActive("codeBlock"),
|
|
104
|
+
label: "Code Block",
|
|
105
|
+
group: 2,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
icon: LinkIcon,
|
|
109
|
+
action: onLinkClick,
|
|
110
|
+
isActive: editor.isActive("link"),
|
|
111
|
+
label: "Link",
|
|
112
|
+
group: 3,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
icon: ImageIcon,
|
|
116
|
+
action: onImageClick,
|
|
117
|
+
isActive: false,
|
|
118
|
+
label: "Image",
|
|
119
|
+
group: 3,
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
const groups = [0, 1, 2, 3];
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<div className="flex flex-wrap items-center gap-1 p-2 bg-dashboard-secondary/50 backdrop-blur-md border-b border-dashboard-border sticky top-0 z-10">
|
|
127
|
+
{groups.map((groupId, gi) => (
|
|
128
|
+
<div
|
|
129
|
+
key={groupId}
|
|
130
|
+
className={cn(
|
|
131
|
+
"flex items-center gap-1 px-2",
|
|
132
|
+
gi < groups.length - 1 &&
|
|
133
|
+
"border-r border-dashboard-border",
|
|
134
|
+
)}
|
|
135
|
+
>
|
|
136
|
+
{buttons
|
|
137
|
+
.filter((b) => b.group === groupId)
|
|
138
|
+
.map((btn, i) => (
|
|
139
|
+
<Button
|
|
140
|
+
key={i}
|
|
141
|
+
type="button"
|
|
142
|
+
variant="ghost"
|
|
143
|
+
size="sm"
|
|
144
|
+
onClick={btn.action}
|
|
145
|
+
className={cn(
|
|
146
|
+
"h-8 w-8 p-0 rounded-lg transition-all",
|
|
147
|
+
btn.isActive
|
|
148
|
+
? "bg-dashboard-primary text-dashboard-primary-foreground shadow-sm"
|
|
149
|
+
: "text-dashboard-muted-foreground hover:bg-dashboard-secondary hover:text-dashboard-foreground",
|
|
150
|
+
)}
|
|
151
|
+
title={btn.label}
|
|
152
|
+
>
|
|
153
|
+
<btn.icon className="h-3.5 w-3.5" />
|
|
154
|
+
</Button>
|
|
155
|
+
))}
|
|
156
|
+
</div>
|
|
157
|
+
))}
|
|
158
|
+
|
|
159
|
+
<div className="flex-1" />
|
|
160
|
+
|
|
161
|
+
<div className="flex items-center gap-1 border-l border-dashboard-border pl-2">
|
|
162
|
+
<Button
|
|
163
|
+
type="button"
|
|
164
|
+
variant="ghost"
|
|
165
|
+
size="sm"
|
|
166
|
+
onClick={() => editor.chain().focus().undo().run()}
|
|
167
|
+
disabled={!editor.can().undo()}
|
|
168
|
+
className="h-8 w-8 p-0 rounded-lg text-dashboard-muted-foreground hover:bg-dashboard-secondary hover:text-dashboard-foreground disabled:opacity-30"
|
|
169
|
+
>
|
|
170
|
+
<Undo className="h-3.5 w-3.5" />
|
|
171
|
+
</Button>
|
|
172
|
+
<Button
|
|
173
|
+
type="button"
|
|
174
|
+
variant="ghost"
|
|
175
|
+
size="sm"
|
|
176
|
+
onClick={() => editor.chain().focus().redo().run()}
|
|
177
|
+
disabled={!editor.can().redo()}
|
|
178
|
+
className="h-8 w-8 p-0 rounded-lg text-dashboard-muted-foreground hover:bg-dashboard-secondary hover:text-dashboard-foreground disabled:opacity-30"
|
|
179
|
+
>
|
|
180
|
+
<Redo className="h-3.5 w-3.5" />
|
|
181
|
+
</Button>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export default function RichTextEditor({
|
|
188
|
+
content,
|
|
189
|
+
onChange,
|
|
190
|
+
placeholder,
|
|
191
|
+
}: RichTextEditorProps) {
|
|
192
|
+
const { t } = useLanguage();
|
|
193
|
+
const [linkModalOpen, setLinkModalOpen] = useState(false);
|
|
194
|
+
const [imageModalOpen, setImageModalOpen] = useState(false);
|
|
195
|
+
const [linkUrl, setLinkUrl] = useState("");
|
|
196
|
+
const [imageUrl, setImageUrl] = useState("");
|
|
197
|
+
|
|
198
|
+
const editor = useEditor({
|
|
199
|
+
extensions: [
|
|
200
|
+
StarterKit.configure({
|
|
201
|
+
bulletList: { keepMarks: true, keepAttributes: false },
|
|
202
|
+
orderedList: { keepMarks: true, keepAttributes: false },
|
|
203
|
+
}),
|
|
204
|
+
Underline,
|
|
205
|
+
Highlight.configure({ multicolor: true }), // ← NEW
|
|
206
|
+
Link.configure({ openOnClick: false }),
|
|
207
|
+
Image.configure({ allowBase64: true }),
|
|
208
|
+
Placeholder.configure({
|
|
209
|
+
placeholder: placeholder || "Start writing...",
|
|
210
|
+
}),
|
|
211
|
+
],
|
|
212
|
+
content,
|
|
213
|
+
onUpdate: ({ editor }) => {
|
|
214
|
+
onChange(editor.getHTML());
|
|
215
|
+
},
|
|
216
|
+
editorProps: {
|
|
217
|
+
attributes: {
|
|
218
|
+
class: "focus:outline-none min-h-[400px] p-8 max-w-none",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
const handleLinkSubmit = () => {
|
|
224
|
+
if (linkUrl && editor) {
|
|
225
|
+
const url = linkUrl.startsWith("http")
|
|
226
|
+
? linkUrl
|
|
227
|
+
: `https://${linkUrl}`;
|
|
228
|
+
editor.chain().focus().setLink({ href: url }).run();
|
|
229
|
+
setLinkUrl("");
|
|
230
|
+
setLinkModalOpen(false);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const handleImageSubmit = () => {
|
|
235
|
+
if (imageUrl && editor) {
|
|
236
|
+
editor.chain().focus().setImage({ src: imageUrl }).run();
|
|
237
|
+
setImageUrl("");
|
|
238
|
+
setImageModalOpen(false);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const characterCount = editor ? editor.getText().length : 0;
|
|
243
|
+
|
|
244
|
+
return (
|
|
245
|
+
<div className="w-full border border-dashboard-border rounded-xl bg-dashboard-card overflow-hidden focus-within:border-dashboard-primary/50 transition-all shadow-xs">
|
|
246
|
+
<MenuBar
|
|
247
|
+
editor={editor}
|
|
248
|
+
onLinkClick={() => setLinkModalOpen(true)}
|
|
249
|
+
onImageClick={() => setImageModalOpen(true)}
|
|
250
|
+
/>
|
|
251
|
+
|
|
252
|
+
<EditorContent editor={editor} />
|
|
253
|
+
|
|
254
|
+
<div className="flex justify-between items-center px-4 py-2 bg-dashboard-secondary/30 border-t border-dashboard-border text-xs text-dashboard-muted-foreground">
|
|
255
|
+
<span>Characters: {characterCount}</span>
|
|
256
|
+
<span>Rich Text Editor</span>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
{/* Link Modal */}
|
|
260
|
+
{linkModalOpen && (
|
|
261
|
+
<div className="fixed inset-0 bg-black/75 flex items-center justify-center z-50 backdrop-blur-xs">
|
|
262
|
+
<div className="bg-dashboard-card border border-dashboard-border rounded-xl p-5 w-96 shadow-2xl animate-in fade-in zoom-in-95 duration-200">
|
|
263
|
+
<h3 className="text-sm font-bold text-dashboard-foreground mb-3">
|
|
264
|
+
Add Link
|
|
265
|
+
</h3>
|
|
266
|
+
<input
|
|
267
|
+
id="rich-text-link-url"
|
|
268
|
+
aria-label="Link URL"
|
|
269
|
+
type="url"
|
|
270
|
+
value={linkUrl}
|
|
271
|
+
onChange={(e) => setLinkUrl(e.target.value)}
|
|
272
|
+
onKeyDown={(e) =>
|
|
273
|
+
e.key === "Enter" && handleLinkSubmit()
|
|
274
|
+
}
|
|
275
|
+
placeholder="https://example.com"
|
|
276
|
+
className="w-full px-3 py-1.5 bg-dashboard-background/70 border border-dashboard-border rounded-lg focus:outline-none focus:ring-1 focus:ring-dashboard-primary/40 text-dashboard-foreground text-xs mb-3"
|
|
277
|
+
autoFocus
|
|
278
|
+
/>
|
|
279
|
+
<div className="flex gap-2 justify-end">
|
|
280
|
+
<Button
|
|
281
|
+
variant="ghost"
|
|
282
|
+
size="sm"
|
|
283
|
+
onClick={() => {
|
|
284
|
+
setLinkModalOpen(false);
|
|
285
|
+
setLinkUrl("");
|
|
286
|
+
}}
|
|
287
|
+
>
|
|
288
|
+
{t("dashboard:common.cancel")}
|
|
289
|
+
</Button>
|
|
290
|
+
<Button size="sm" onClick={handleLinkSubmit}>
|
|
291
|
+
Add Link
|
|
292
|
+
</Button>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
)}
|
|
297
|
+
|
|
298
|
+
{/* Image Modal */}
|
|
299
|
+
{imageModalOpen && (
|
|
300
|
+
<div className="fixed inset-0 bg-black/75 flex items-center justify-center z-50 backdrop-blur-xs">
|
|
301
|
+
<div className="bg-dashboard-card border border-dashboard-border rounded-xl p-5 w-96 shadow-2xl animate-in fade-in zoom-in-95 duration-200">
|
|
302
|
+
<h3 className="text-sm font-bold text-dashboard-foreground mb-3">
|
|
303
|
+
Add Image
|
|
304
|
+
</h3>
|
|
305
|
+
<input
|
|
306
|
+
id="rich-text-image-url"
|
|
307
|
+
aria-label="Image URL"
|
|
308
|
+
type="url"
|
|
309
|
+
value={imageUrl}
|
|
310
|
+
onChange={(e) => setImageUrl(e.target.value)}
|
|
311
|
+
onKeyDown={(e) =>
|
|
312
|
+
e.key === "Enter" && handleImageSubmit()
|
|
313
|
+
}
|
|
314
|
+
placeholder="https://example.com/image.jpg"
|
|
315
|
+
className="w-full px-3 py-1.5 bg-dashboard-background/70 border border-dashboard-border rounded-lg focus:outline-none focus:ring-1 focus:ring-dashboard-primary/40 text-dashboard-foreground text-xs mb-3"
|
|
316
|
+
autoFocus
|
|
317
|
+
/>
|
|
318
|
+
<div className="flex gap-2 justify-end">
|
|
319
|
+
<Button
|
|
320
|
+
variant="ghost"
|
|
321
|
+
onClick={() => {
|
|
322
|
+
setImageModalOpen(false);
|
|
323
|
+
setImageUrl("");
|
|
324
|
+
}}
|
|
325
|
+
>
|
|
326
|
+
{t("dashboard:common.cancel")}
|
|
327
|
+
</Button>
|
|
328
|
+
<Button onClick={handleImageSubmit}>
|
|
329
|
+
Add Image
|
|
330
|
+
</Button>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
)}
|
|
335
|
+
|
|
336
|
+
<style>{`
|
|
337
|
+
.ProseMirror p.is-editor-empty:first-child::before {
|
|
338
|
+
content: attr(data-placeholder);
|
|
339
|
+
float: left;
|
|
340
|
+
color: var(--color-dashboard-muted-foreground);
|
|
341
|
+
opacity: 0.6;
|
|
342
|
+
pointer-events: none;
|
|
343
|
+
height: 0;
|
|
344
|
+
}
|
|
345
|
+
.ProseMirror { outline: none !important; }
|
|
346
|
+
.ProseMirror p { margin: 0.5rem 0; color: var(--color-dashboard-foreground); opacity: 0.9; line-height: 1.75; }
|
|
347
|
+
.ProseMirror strong { color: var(--color-dashboard-foreground); font-weight: 700; }
|
|
348
|
+
.ProseMirror em { font-style: italic; color: var(--color-dashboard-foreground); opacity: 0.8; }
|
|
349
|
+
.ProseMirror u {
|
|
350
|
+
text-decoration: underline;
|
|
351
|
+
text-decoration-color: var(--color-dashboard-primary);
|
|
352
|
+
text-underline-offset: 3px;
|
|
353
|
+
opacity: 0.8;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* ── Highlight ── */
|
|
357
|
+
.ProseMirror mark {
|
|
358
|
+
background-color: var(--color-dashboard-primary);
|
|
359
|
+
color: var(--color-dashboard-primary-foreground);
|
|
360
|
+
border-radius: 3px;
|
|
361
|
+
padding: 0.05em 0.2em;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.ProseMirror ul {
|
|
365
|
+
list-style-type: disc !important;
|
|
366
|
+
padding-left: 1.5rem !important;
|
|
367
|
+
margin: 0.75rem 0 !important;
|
|
368
|
+
}
|
|
369
|
+
.ProseMirror ol {
|
|
370
|
+
list-style-type: decimal !important;
|
|
371
|
+
padding-left: 1.5rem !important;
|
|
372
|
+
margin: 0.75rem 0 !important;
|
|
373
|
+
}
|
|
374
|
+
.ProseMirror li {
|
|
375
|
+
display: list-item !important;
|
|
376
|
+
margin: 0.25rem 0 !important;
|
|
377
|
+
color: var(--color-dashboard-foreground);
|
|
378
|
+
opacity: 0.9;
|
|
379
|
+
}
|
|
380
|
+
.ProseMirror li p { margin: 0 !important; }
|
|
381
|
+
.ProseMirror blockquote {
|
|
382
|
+
border-left: 4px solid var(--color-dashboard-primary);
|
|
383
|
+
padding: 0.5rem 0 0.5rem 1rem;
|
|
384
|
+
margin: 1rem 0;
|
|
385
|
+
font-style: italic;
|
|
386
|
+
color: var(--color-dashboard-muted-foreground);
|
|
387
|
+
background: color-mix(in srgb, var(--color-dashboard-primary) 8%, transparent);
|
|
388
|
+
border-radius: 0 6px 6px 0;
|
|
389
|
+
}
|
|
390
|
+
.ProseMirror blockquote p { margin: 0.2rem 0 !important; }
|
|
391
|
+
.ProseMirror code {
|
|
392
|
+
background: var(--color-dashboard-secondary);
|
|
393
|
+
color: var(--color-dashboard-primary);
|
|
394
|
+
font-family: 'Courier New', monospace;
|
|
395
|
+
font-size: 0.88em;
|
|
396
|
+
padding: 0.15em 0.45em;
|
|
397
|
+
border-radius: 5px;
|
|
398
|
+
border: 1px solid var(--color-dashboard-border);
|
|
399
|
+
}
|
|
400
|
+
.ProseMirror pre {
|
|
401
|
+
background: var(--color-dashboard-background);
|
|
402
|
+
border: 1px solid var(--color-dashboard-border);
|
|
403
|
+
border-radius: 10px;
|
|
404
|
+
padding: 1.25rem;
|
|
405
|
+
margin: 1rem 0;
|
|
406
|
+
overflow-x: auto;
|
|
407
|
+
}
|
|
408
|
+
.ProseMirror pre code {
|
|
409
|
+
background: none;
|
|
410
|
+
border: none;
|
|
411
|
+
padding: 0;
|
|
412
|
+
color: var(--color-dashboard-foreground);
|
|
413
|
+
font-size: 0.9rem;
|
|
414
|
+
}
|
|
415
|
+
.ProseMirror a {
|
|
416
|
+
color: var(--color-dashboard-primary);
|
|
417
|
+
text-decoration: underline;
|
|
418
|
+
text-underline-offset: 3px;
|
|
419
|
+
text-decoration-color: var(--color-dashboard-primary);
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
}
|
|
422
|
+
.ProseMirror a:hover { opacity: 0.8; }
|
|
423
|
+
.ProseMirror img {
|
|
424
|
+
max-width: 100%;
|
|
425
|
+
height: auto;
|
|
426
|
+
border-radius: 1rem;
|
|
427
|
+
margin: 1.5rem 0;
|
|
428
|
+
border: 1px solid var(--color-dashboard-border);
|
|
429
|
+
}
|
|
430
|
+
`}</style>
|
|
431
|
+
</div>
|
|
432
|
+
);
|
|
433
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../support/utils";
|
|
3
|
+
|
|
4
|
+
export interface SLACountdownProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
stage: string;
|
|
6
|
+
remainingTime: string;
|
|
7
|
+
percentage: number;
|
|
8
|
+
isBreached?: boolean;
|
|
9
|
+
targetDate?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function SLADialIndicator({
|
|
13
|
+
percentage,
|
|
14
|
+
isBreached = false,
|
|
15
|
+
size = 18,
|
|
16
|
+
}: {
|
|
17
|
+
percentage: number;
|
|
18
|
+
isBreached?: boolean;
|
|
19
|
+
size?: number;
|
|
20
|
+
}) {
|
|
21
|
+
const radius = 7;
|
|
22
|
+
const circumference = 2 * Math.PI * radius;
|
|
23
|
+
const clampedPct = Math.min(Math.max(percentage, 0), 100);
|
|
24
|
+
const strokeDashoffset = circumference - (clampedPct / 100) * circumference;
|
|
25
|
+
|
|
26
|
+
const strokeColor = isBreached
|
|
27
|
+
? "text-red-500"
|
|
28
|
+
: percentage > 75
|
|
29
|
+
? "text-amber-500"
|
|
30
|
+
: "text-dashboard-muted-foreground";
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
className="relative inline-flex items-center justify-center shrink-0"
|
|
35
|
+
style={{ width: size, height: size }}
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
>
|
|
38
|
+
<svg
|
|
39
|
+
width={size}
|
|
40
|
+
height={size}
|
|
41
|
+
viewBox="0 0 20 20"
|
|
42
|
+
className="-rotate-90"
|
|
43
|
+
>
|
|
44
|
+
{/* Background track */}
|
|
45
|
+
<circle
|
|
46
|
+
cx="10"
|
|
47
|
+
cy="10"
|
|
48
|
+
r={radius}
|
|
49
|
+
className="stroke-dashboard-border"
|
|
50
|
+
strokeWidth="2.5"
|
|
51
|
+
fill="none"
|
|
52
|
+
/>
|
|
53
|
+
{/* Progress arc */}
|
|
54
|
+
<circle
|
|
55
|
+
cx="10"
|
|
56
|
+
cy="10"
|
|
57
|
+
r={radius}
|
|
58
|
+
className={cn(strokeColor, "transition-all duration-300")}
|
|
59
|
+
strokeWidth="2.5"
|
|
60
|
+
strokeDasharray={circumference}
|
|
61
|
+
strokeDashoffset={strokeDashoffset}
|
|
62
|
+
strokeLinecap="round"
|
|
63
|
+
fill={isBreached ? "currentColor" : "none"}
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SLACountdown({
|
|
71
|
+
stage,
|
|
72
|
+
remainingTime,
|
|
73
|
+
percentage,
|
|
74
|
+
isBreached = false,
|
|
75
|
+
targetDate,
|
|
76
|
+
className,
|
|
77
|
+
...props
|
|
78
|
+
}: SLACountdownProps) {
|
|
79
|
+
const breached = isBreached || percentage >= 100 || remainingTime.startsWith("-");
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<div
|
|
83
|
+
className={cn(
|
|
84
|
+
"flex items-center justify-between text-xs py-1 px-1 select-none",
|
|
85
|
+
className,
|
|
86
|
+
)}
|
|
87
|
+
{...props}
|
|
88
|
+
>
|
|
89
|
+
<span
|
|
90
|
+
className={cn(
|
|
91
|
+
"font-medium",
|
|
92
|
+
breached
|
|
93
|
+
? "text-red-500"
|
|
94
|
+
: "text-dashboard-muted-foreground",
|
|
95
|
+
)}
|
|
96
|
+
>
|
|
97
|
+
{stage}
|
|
98
|
+
</span>
|
|
99
|
+
|
|
100
|
+
<div className="flex items-center gap-2.5">
|
|
101
|
+
<span
|
|
102
|
+
className={cn(
|
|
103
|
+
"font-mono font-medium text-xs",
|
|
104
|
+
breached
|
|
105
|
+
? "text-red-500"
|
|
106
|
+
: "text-dashboard-foreground",
|
|
107
|
+
)}
|
|
108
|
+
>
|
|
109
|
+
{remainingTime}
|
|
110
|
+
</span>
|
|
111
|
+
|
|
112
|
+
<SLADialIndicator
|
|
113
|
+
percentage={percentage}
|
|
114
|
+
isBreached={breached}
|
|
115
|
+
size={16}
|
|
116
|
+
/>
|
|
117
|
+
|
|
118
|
+
<span
|
|
119
|
+
className={cn(
|
|
120
|
+
"text-[11px] font-mono w-9 text-right",
|
|
121
|
+
breached
|
|
122
|
+
? "text-red-500 font-semibold"
|
|
123
|
+
: "text-dashboard-muted-foreground",
|
|
124
|
+
)}
|
|
125
|
+
>
|
|
126
|
+
{Math.round(percentage)}%
|
|
127
|
+
</span>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export default SLACountdown;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { cn } from "../support/utils";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ThemedText } from "../index";
|
|
4
|
+
|
|
5
|
+
export type StatusBadgeVariant =
|
|
6
|
+
| "in-progress"
|
|
7
|
+
| "backlog"
|
|
8
|
+
| "review"
|
|
9
|
+
| "done"
|
|
10
|
+
| "resolved"
|
|
11
|
+
| "cancelled"
|
|
12
|
+
| "rejected"
|
|
13
|
+
| "warning"
|
|
14
|
+
| "pending"
|
|
15
|
+
| "neutral";
|
|
16
|
+
|
|
17
|
+
export interface StatusBadgeProps extends Omit<React.ComponentProps<typeof ThemedText>, "variant"> {
|
|
18
|
+
variant?: StatusBadgeVariant;
|
|
19
|
+
label?: string;
|
|
20
|
+
dotColor?: string;
|
|
21
|
+
pulse?: boolean;
|
|
22
|
+
size?: "xs" | "sm";
|
|
23
|
+
shape?: "default" | "pill";
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const variantStyles: Record<
|
|
28
|
+
StatusBadgeVariant,
|
|
29
|
+
{ badgeClass: string; dotClass: string }
|
|
30
|
+
> = {
|
|
31
|
+
"in-progress": {
|
|
32
|
+
badgeClass: "bg-sky-500/12 text-sky-400 border-sky-500/25",
|
|
33
|
+
dotClass: "bg-sky-400",
|
|
34
|
+
},
|
|
35
|
+
backlog: {
|
|
36
|
+
badgeClass:
|
|
37
|
+
"bg-dashboard-secondary text-dashboard-muted-foreground border-dashboard-border",
|
|
38
|
+
dotClass: "bg-dashboard-muted-foreground",
|
|
39
|
+
},
|
|
40
|
+
review: {
|
|
41
|
+
badgeClass: "bg-dashboard-primary/15 text-dashboard-primary border-dashboard-primary/30",
|
|
42
|
+
dotClass: "bg-dashboard-primary",
|
|
43
|
+
},
|
|
44
|
+
done: {
|
|
45
|
+
badgeClass: "bg-emerald-500/12 text-emerald-400 border-emerald-500/25",
|
|
46
|
+
dotClass: "bg-emerald-400",
|
|
47
|
+
},
|
|
48
|
+
resolved: {
|
|
49
|
+
badgeClass: "bg-emerald-500/12 text-emerald-400 border-emerald-500/25",
|
|
50
|
+
dotClass: "bg-emerald-400",
|
|
51
|
+
},
|
|
52
|
+
cancelled: {
|
|
53
|
+
badgeClass: "bg-red-500/12 text-red-400 border-red-500/25",
|
|
54
|
+
dotClass: "bg-red-400",
|
|
55
|
+
},
|
|
56
|
+
rejected: {
|
|
57
|
+
badgeClass: "bg-red-500/12 text-red-400 border-red-500/25",
|
|
58
|
+
dotClass: "bg-red-400",
|
|
59
|
+
},
|
|
60
|
+
warning: {
|
|
61
|
+
badgeClass: "bg-amber-500/12 text-amber-400 border-amber-500/25",
|
|
62
|
+
dotClass: "bg-amber-400",
|
|
63
|
+
},
|
|
64
|
+
pending: {
|
|
65
|
+
badgeClass: "bg-amber-500/12 text-amber-400 border-amber-500/25",
|
|
66
|
+
dotClass: "bg-amber-400",
|
|
67
|
+
},
|
|
68
|
+
neutral: {
|
|
69
|
+
badgeClass:
|
|
70
|
+
"bg-dashboard-secondary text-dashboard-muted-foreground border-dashboard-border",
|
|
71
|
+
dotClass: "bg-dashboard-muted-foreground",
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export function StatusBadge({
|
|
76
|
+
variant = "neutral",
|
|
77
|
+
label,
|
|
78
|
+
dotColor,
|
|
79
|
+
pulse = false,
|
|
80
|
+
size = "xs",
|
|
81
|
+
shape = "pill",
|
|
82
|
+
children,
|
|
83
|
+
className,
|
|
84
|
+
...props
|
|
85
|
+
}: StatusBadgeProps) {
|
|
86
|
+
const config = variantStyles[variant] ?? variantStyles.neutral;
|
|
87
|
+
const content = label ?? children;
|
|
88
|
+
|
|
89
|
+
const sizeClass =
|
|
90
|
+
size === "xs"
|
|
91
|
+
? "h-5 px-2 text-[10.5px] gap-1.5"
|
|
92
|
+
: "h-6 px-2.5 text-xs gap-1.5";
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<ThemedText
|
|
96
|
+
className={cn(
|
|
97
|
+
"inline-flex items-center font-semibold border transition-colors select-none shrink-0 whitespace-nowrap",
|
|
98
|
+
shape === "pill" ? "rounded-full" : "rounded-[5px]",
|
|
99
|
+
sizeClass,
|
|
100
|
+
config.badgeClass,
|
|
101
|
+
className,
|
|
102
|
+
)}
|
|
103
|
+
{...props}
|
|
104
|
+
>
|
|
105
|
+
<span
|
|
106
|
+
className={cn(
|
|
107
|
+
"rounded-full shrink-0",
|
|
108
|
+
size === "xs" ? "w-1.5 h-1.5" : "w-2 h-2",
|
|
109
|
+
dotColor ? undefined : config.dotClass,
|
|
110
|
+
pulse && "animate-pulse",
|
|
111
|
+
)}
|
|
112
|
+
style={dotColor ? { backgroundColor: dotColor } : undefined}
|
|
113
|
+
/>
|
|
114
|
+
{content && <span>{content}</span>}
|
|
115
|
+
</ThemedText>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default StatusBadge;
|