@allbluecn/web-app 0.18.0 → 0.18.2
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/package.json +2 -3
- package/src/__tests__/visual/theme-surface.vrt.test.tsx +1 -1
- package/src/components/agents/agent-bindings-tab.tsx +3 -3
- package/src/components/agents/agent-card.tsx +4 -4
- package/src/components/agents/agent-form-dialog.tsx +9 -9
- package/src/components/agents/agent-selector.tsx +1 -1
- package/src/components/agents/agents-page.tsx +1 -1
- package/src/components/agents/skill-card.tsx +1 -1
- package/src/components/agents/skill-form-dialog.tsx +5 -5
- package/src/components/agents/use-agent-handlers.ts +1 -1
- package/src/components/ai/__tests__/prompt-input-actions.test.tsx +1 -1
- package/src/components/ai/ai-chat-prompt.tsx +3 -3
- package/src/components/ai/ai-prompt-input/components/action-buttons.tsx +3 -3
- package/src/components/ai/ai-prompt-input/components/agent-mode-select.tsx +1 -1
- package/src/components/ai/ai-prompt-input/components/model-select.tsx +1 -1
- package/src/components/ai/ai-prompt-input/index.tsx +3 -3
- package/src/components/ai/ai-suggested-prompts.tsx +5 -5
- package/src/components/ai/global-harness-sidebar/index.tsx +5 -5
- package/src/components/ai/tool-parts/tool-call-part.tsx +1 -1
- package/src/components/ai/tool-parts/tool-result-part.tsx +1 -1
- package/src/components/anyhub/anyhub-app-card.tsx +5 -5
- package/src/components/anyhub/anyhub-install-dialog.tsx +4 -4
- package/src/components/anyhub/anyhub-management-view.tsx +1 -1
- package/src/components/anyhub/anyhub-marketplace-view.tsx +4 -4
- package/src/components/anyhub/anyhub-permission-panel.tsx +4 -4
- package/src/components/anyhub/anyhub-top-nav.tsx +2 -2
- package/src/components/auth/icon-input.tsx +2 -2
- package/src/components/auth/oauth-section.tsx +2 -2
- package/src/components/auth/password-input.tsx +2 -2
- package/src/components/auth/sso-section.tsx +1 -1
- package/src/components/billing/__tests__/seats-manager.test.tsx +1 -1
- package/src/components/billing/checkout-redirect.ts +1 -1
- package/src/components/billing/login-prompt-dialog.tsx +3 -3
- package/src/components/billing/seats-manager.tsx +2 -2
- package/src/components/bug/__tests__/bug-display-dropdown.test.tsx +1 -1
- package/src/components/bug/__tests__/bug-toolbar.test.tsx +1 -1
- package/src/components/bug/__tests__/create-bug-dialog.test.tsx +2 -2
- package/src/components/bug/__tests__/use-paged-bug-groups.test.tsx +1 -1
- package/src/components/bug/bug-list-table.tsx +1 -1
- package/src/components/bug/bug-list-view.tsx +1 -1
- package/src/components/bug/bug-panel-header.tsx +5 -5
- package/src/components/bug/bug-toolbar.tsx +3 -3
- package/src/components/bug/collect/__tests__/collect-form.test.tsx +1 -1
- package/src/components/bug/collect/collect-form.tsx +5 -5
- package/src/components/bug/columns.tsx +1 -1
- package/src/components/bug/create-bug-dialog.tsx +4 -4
- package/src/components/bug/detail/__tests__/error-context.test.tsx +1 -1
- package/src/components/bug/detail/activity-tabs.tsx +1 -1
- package/src/components/bug/detail/bug-detail-body.tsx +6 -6
- package/src/components/bug/detail/comment-input.tsx +3 -3
- package/src/components/bug/detail/comment-item.tsx +5 -5
- package/src/components/bug/detail/events-timeline.tsx +1 -1
- package/src/components/bug/detail/fix-timeline.tsx +3 -3
- package/src/components/bug/detail/props-section.tsx +2 -2
- package/src/components/bug/detail/regression-section.tsx +3 -3
- package/src/components/bug/detail/repro-report-card.tsx +5 -5
- package/src/components/bug/display/display-dropdown.tsx +2 -2
- package/src/components/bug/filters/add-filter-dropdown.tsx +1 -1
- package/src/components/bug/filters/applied-filters.tsx +1 -1
- package/src/components/bug/filters/filter-row.tsx +1 -1
- package/src/components/bug/filters/filter-toggle.tsx +2 -2
- package/src/components/bug/filters/filter-value-input.tsx +1 -1
- package/src/components/bug/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/bug/inline-editors/date-editor.tsx +1 -1
- package/src/components/bug/inline-editors/inline-trigger.tsx +2 -2
- package/src/components/bug/peek-panel.tsx +1 -1
- package/src/components/bug/reproduce-steps-editor.tsx +3 -3
- package/src/components/bug/settings/bug-settings-panel.tsx +4 -4
- package/src/components/bug/settings/collect-page-manager.tsx +9 -9
- package/src/components/bug/settings/install-commands.tsx +3 -3
- package/src/components/bug/settings/token-list.tsx +7 -7
- package/src/components/bug/settings/webhook-manager.tsx +9 -9
- package/src/components/bug/views/bug-list/batch-toolbar.tsx +4 -4
- package/src/components/bug/views/bug-list/group.tsx +2 -2
- package/src/components/bug/views/bug-list/index.tsx +1 -1
- package/src/components/bug/views/bug-list/inline-bug-creator.tsx +1 -1
- package/src/components/bug/views/bug-list/row.tsx +2 -2
- package/src/components/bug/views/view-switcher.tsx +1 -1
- package/src/components/changelog/changelog-page.tsx +1 -1
- package/src/components/confirm-dialog.tsx +94 -0
- package/src/components/design/canvas/panels/appearance-text-panel.tsx +3 -3
- package/src/components/design/canvas/panels/controls/add-button.tsx +1 -1
- package/src/components/design/canvas/panels/controls/constraint-select.tsx +1 -1
- package/src/components/design/canvas/panels/controls/gradient-editor.tsx +1 -1
- package/src/components/design/canvas/panels/controls/pattern-params.tsx +2 -2
- package/src/components/design/canvas/panels/controls/rows.tsx +3 -3
- package/src/components/design/canvas/panels/controls/shader-picker.tsx +3 -3
- package/src/components/design/canvas/panels/controls/text-style-button.tsx +1 -1
- package/src/components/design/canvas/panels/controls/toolbar-button.tsx +2 -2
- package/src/components/design/canvas/panels/frame-property-panel.tsx +3 -3
- package/src/components/design/canvas/panels/layer-panel.tsx +2 -2
- package/src/components/design/canvas/panels/paint-lists-panel.tsx +1 -1
- package/src/components/design/canvas/panels/property-panel.tsx +3 -3
- package/src/components/design/canvas/panels/shape-corners-panel.tsx +2 -2
- package/src/components/design/canvas/panels/toolbar.tsx +4 -4
- package/src/components/design/canvas/panels/transform-layout-panel.tsx +3 -3
- package/src/components/design/canvas/react/__tests__/hooks.test.tsx +2 -2
- package/src/components/design/canvas/react/hooks.ts +1 -1
- package/src/components/design/canvas/react/workbench.tsx +2 -2
- package/src/components/design/editor/annotation/annotation-node/annotation-node-view.tsx +1 -1
- package/src/components/design/editor/collaboration/__tests__/design-agent-panel-regenerate.test.tsx +1 -1
- package/src/components/design/editor/collaboration/__tests__/design-agent-panel-stream.test.tsx +2 -2
- package/src/components/design/editor/collaboration/agent-input.tsx +2 -2
- package/src/components/design/editor/collaboration/design-agent-panel.tsx +2 -2
- package/src/components/design/editor/collaboration/design-comment-review-panel.tsx +4 -4
- package/src/components/design/editor/dashboard/create-design-dialog.tsx +3 -3
- package/src/components/design/editor/dashboard/design-dashboard.tsx +4 -4
- package/src/components/design/editor/layout/__tests__/context-menu.test.tsx +1 -1
- package/src/components/design/editor/layout/__tests__/no-page-save-toast.test.tsx +2 -2
- package/src/components/design/editor/layout/__tests__/persistence-restore.test.tsx +1 -1
- package/src/components/design/editor/layout/__tests__/ssr-localstorage-smoke.test.tsx +1 -1
- package/src/components/design/editor/layout/context-menu.tsx +1 -1
- package/src/components/design/editor/layout/design-doc-panel.tsx +2 -2
- package/src/components/design/editor/layout/design-editor-layout.tsx +1 -1
- package/src/components/design/editor/layout/design-navigation.tsx +4 -4
- package/src/components/design/editor/layout/design-right-sidebar.tsx +2 -2
- package/src/components/design/editor/layout/hooks/use-design-auto-save.ts +1 -1
- package/src/components/design/editor/pages/design-detail-page.tsx +1 -1
- package/src/components/design/editor/pages/share-design-page.tsx +1 -1
- package/src/components/design/editor/pages-tree/design-tree-page-tab.tsx +3 -3
- package/src/components/design/editor/share/design-share-panel/components/single-version-share-card.tsx +6 -6
- package/src/components/design/editor/share/design-share-panel/index.tsx +9 -9
- package/src/components/design/editor/share/share-comment-panel.tsx +4 -4
- package/src/components/design/editor/share/share-nav-bar.tsx +3 -3
- package/src/components/design/editor/share/share-password-gate.tsx +3 -3
- package/src/components/design/editor/share/share-review-panel.tsx +4 -4
- package/src/components/design/editor/versions/components/create-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/delete-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/edit-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/page-tree-selector.tsx +4 -4
- package/src/components/design/editor/versions/components/page-version-timeline.tsx +2 -2
- package/src/components/design/editor/versions/page-version-panel.tsx +5 -5
- package/src/components/design/editor/versions/page-version-tree.tsx +3 -3
- package/src/components/design/editor/versions/restore-version-dialog.tsx +2 -2
- package/src/components/error/global-error-boundary.tsx +1 -1
- package/src/components/forms/app-array-field.tsx +1 -1
- package/src/components/forms/app-checkbox.tsx +1 -1
- package/src/components/forms/app-combobox.tsx +1 -1
- package/src/components/forms/app-date-picker.tsx +1 -1
- package/src/components/forms/app-field.tsx +1 -1
- package/src/components/forms/app-form-dialog.tsx +2 -2
- package/src/components/forms/app-input.tsx +1 -1
- package/src/components/forms/app-section.tsx +1 -1
- package/src/components/forms/app-select.tsx +1 -1
- package/src/components/forms/app-switch.tsx +1 -1
- package/src/components/forms/app-textarea.tsx +1 -1
- package/src/components/forms/hooks/use-form-submit.ts +1 -1
- package/src/components/harness/__tests__/media-route.test.tsx +1 -1
- package/src/components/harness/agent-preset-picker.tsx +3 -3
- package/src/components/harness/ai-chat-history/components/conversation-header.tsx +2 -2
- package/src/components/harness/ai-chat-history/components/conversation-item.tsx +3 -3
- package/src/components/harness/ai-chat-history/components/conversation-search.tsx +1 -1
- package/src/components/harness/ai-chat-history/components/empty-state.tsx +1 -1
- package/src/components/harness/ai-chat-history/index.tsx +2 -2
- package/src/components/harness/ai-citations/components/citation-item.tsx +1 -1
- package/src/components/harness/ai-citations/components/source-components.tsx +1 -1
- package/src/components/harness/ai-citations/index.tsx +1 -1
- package/src/components/harness/ai-thinking.tsx +1 -1
- package/src/components/harness/code/file-tree.tsx +1 -1
- package/src/components/harness/code/preview-panel.tsx +2 -2
- package/src/components/harness/code/workspace-picker.tsx +3 -3
- package/src/components/harness/composer/harness-composer.tsx +3 -3
- package/src/components/harness/composer/model-select.tsx +1 -1
- package/src/components/harness/connection-indicator.tsx +1 -1
- package/src/components/harness/gallery/gallery-card.tsx +5 -5
- package/src/components/harness/gallery/gallery-grid.tsx +5 -5
- package/src/components/harness/gallery/lightbox-viewer.tsx +2 -2
- package/src/components/harness/gallery/retranscribe-dialog.tsx +5 -5
- package/src/components/harness/harness-workbench-page.tsx +2 -2
- package/src/components/harness/image-lightbox.tsx +1 -1
- package/src/components/harness/interrupt-approval.tsx +2 -2
- package/src/components/harness/message-actions.tsx +2 -2
- package/src/components/harness/plan-approval-card.tsx +2 -2
- package/src/components/harness/plugin-define-approval.tsx +2 -2
- package/src/components/harness/plugin-panel.tsx +3 -3
- package/src/components/harness/queue-bar.tsx +1 -1
- package/src/components/harness/queue-item.tsx +1 -1
- package/src/components/harness/retry-countdown-bar.tsx +1 -1
- package/src/components/hextaui/ai-citations.tsx +1 -1
- package/src/components/hextaui/ai-file-upload.tsx +2 -2
- package/src/components/hextaui/ai-message.tsx +2 -2
- package/src/components/hextaui/ai-thinking.tsx +1 -1
- package/src/components/hotkeys/shortcuts-panel.tsx +2 -2
- package/src/components/infinite-scroll-sentinel.tsx +37 -0
- package/src/components/iteration/auto-schedule-dialog.tsx +5 -5
- package/src/components/iteration/create-iteration-dialog.tsx +5 -5
- package/src/components/iteration/iteration-editor.tsx +3 -3
- package/src/components/knowledge/dialog/knowledge-form-dialog.tsx +3 -3
- package/src/components/knowledge/doc-properties.tsx +2 -2
- package/src/components/knowledge/kb-filter-popover.tsx +2 -2
- package/src/components/knowledge/knowledge-tag-input.tsx +2 -2
- package/src/components/knowledge/knowledge-toolbar.tsx +9 -9
- package/src/components/knowledge/knowledge-tree-item.tsx +5 -5
- package/src/components/knowledge/knowledge-tree.tsx +3 -3
- package/src/components/knowledge-public/bookmark-card.tsx +3 -3
- package/src/components/knowledge-public/bookmark-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/knowledge-card.tsx +1 -1
- package/src/components/knowledge-public/knowledge-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/knowledge-search-bar.tsx +2 -2
- package/src/components/knowledge-public/legal-compliance-editor.tsx +1 -1
- package/src/components/knowledge-public/markdown-editor.tsx +2 -2
- package/src/components/knowledge-public/sharers-avatar-group.tsx +1 -1
- package/src/components/layout/sidebar-03/__tests__/nav-workspace.test.tsx +2 -2
- package/src/components/layout/sidebar-03/__tests__/user-menu-anonymous.test.tsx +3 -3
- package/src/components/layout/sidebar-03/app-sidebar.tsx +1 -1
- package/src/components/layout/sidebar-03/index.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-anyhub.tsx +2 -2
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +4 -4
- package/src/components/layout/sidebar-03/nav-main.tsx +4 -4
- package/src/components/layout/sidebar-03/nav-notifications.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-search-trigger.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-secondary.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-workspace.tsx +2 -2
- package/src/components/layout/sidebar-03/team-switcher.tsx +2 -2
- package/src/components/layout/sidebar-03/user-menu.tsx +3 -3
- package/src/components/notifications/settings-notifications.tsx +6 -6
- package/src/components/notifications/team-notifications.tsx +6 -6
- package/src/components/project/create-project-dialog.tsx +4 -4
- package/src/components/project/invite-member-dialog.tsx +6 -6
- package/src/components/project/project-member-manager.tsx +5 -5
- package/src/components/project/project-module-card.tsx +1 -1
- package/src/components/settings/ai/api-key-field.tsx +3 -3
- package/src/components/settings/ai/byok-section.tsx +2 -2
- package/src/components/settings/ai/create-custom-model-dialog.tsx +5 -5
- package/src/components/settings/ai/create-custom-provider-dialog.tsx +5 -5
- package/src/components/settings/ai/local-agent-panel.tsx +3 -3
- package/src/components/settings/ai/model-card.tsx +2 -2
- package/src/components/settings/ai/model-manager.tsx +4 -4
- package/src/components/settings/ai/provider-card.tsx +1 -1
- package/src/components/settings/ai/provider-detail-form.tsx +6 -6
- package/src/components/settings/ai/provider-grid.tsx +3 -3
- package/src/components/settings/ai/source/model-source-picker.tsx +2 -2
- package/src/components/settings/language-selector.tsx +2 -2
- package/src/components/settings/personal-team/account/account-client.tsx +2 -2
- package/src/components/settings/personal-team/account/avatar/notion-avatar-editor.tsx +3 -3
- package/src/components/settings/personal-team/account/settings-profile.tsx +8 -8
- package/src/components/settings/personal-team/team/invitation-cards/invitation-badges.tsx +1 -1
- package/src/components/settings/personal-team/team/invitation-cards/invitation-history-list.tsx +5 -5
- package/src/components/settings/personal-team/team/invitation-cards/invite-email-card.tsx +5 -5
- package/src/components/settings/personal-team/team/invitation-cards/invite-link-card.tsx +3 -3
- package/src/components/settings/personal-team/team/team-client.tsx +6 -6
- package/src/components/settings/personal-team/team/team-invitations.tsx +1 -1
- package/src/components/settings/personal-team/team/team-member-list.tsx +7 -7
- package/src/components/shared-kit/avatars/notion-avatar.tsx +109 -3
- package/src/components/shared-kit/avatars/user-avatar.tsx +65 -3
- package/src/components/shared-kit/data-viz/contribution-graph-tooltip.tsx +1 -1
- package/src/components/shared-kit/dialogs/name-confirm-dialog.tsx +5 -5
- package/src/components/shared-kit/i18n/language-switcher.tsx +2 -2
- package/src/components/shared-kit/icons/lucide-icon-picker/index.tsx +1 -1
- package/src/components/shared-kit/icons/lucide-icon-picker/panel.tsx +1 -1
- package/src/components/shared-kit/theme/theme-surface.tsx +4 -4
- package/src/components/shared-kit/theme/theme-toggle.tsx +1 -1
- package/src/components/shared-kit/timezone/timezone-select.tsx +1 -1
- package/src/components/story/__tests__/story-list-view-restore.test.tsx +2 -2
- package/src/components/story/__tests__/story-list-view-ssr.test.tsx +2 -2
- package/src/components/story/ai/handlers/more-popover.tsx +2 -2
- package/src/components/story/ai/handlers/stream-text.ts +1 -1
- package/src/components/story/ai/prototype-dialog.tsx +4 -4
- package/src/components/story/ai/split-dialog.tsx +6 -6
- package/src/components/story/ai/story-ai-panel.tsx +4 -4
- package/src/components/story/ai/story-ai-preview-list.tsx +4 -4
- package/src/components/story/ai/story-ai-toolbar.tsx +3 -3
- package/src/components/story/columns.tsx +1 -1
- package/src/components/story/create-story-dialog.tsx +4 -4
- package/src/components/story/detail/__tests__/associated-attachments-panel.test.tsx +1 -1
- package/src/components/story/detail/__tests__/categories.test.tsx +1 -1
- package/src/components/story/detail/__tests__/dependencies-button.test.tsx +1 -1
- package/src/components/story/detail/comment-input.tsx +3 -3
- package/src/components/story/detail/comment-item.tsx +3 -3
- package/src/components/story/detail/reaction-bar.tsx +1 -1
- package/src/components/story/detail/story-detail-body.tsx +5 -5
- package/src/components/story/detail/story-detail-toolbar/__tests__/related-test-cases.test.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +4 -4
- package/src/components/story/detail/story-detail-toolbar/categories.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/children.tsx +5 -5
- package/src/components/story/detail/story-detail-toolbar/dependencies.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +3 -3
- package/src/components/story/detail/story-detail-toolbar/related-test-cases.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar.tsx +2 -2
- package/src/components/story/detail/story-properties.tsx +1 -1
- package/src/components/story/display/__tests__/display-dropdown.test.tsx +1 -1
- package/src/components/story/display/display-dropdown.tsx +3 -3
- package/src/components/story/filters/add-filter-dropdown.tsx +1 -1
- package/src/components/story/filters/applied-filters.tsx +1 -1
- package/src/components/story/filters/filter-row.tsx +1 -1
- package/src/components/story/filters/filter-toggle.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/dependency-type-select.test.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/labels-editor.test.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/priority-editor.test.tsx +1 -1
- package/src/components/story/inline-editors/__tests__/state-editor.test.tsx +1 -1
- package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/story/inline-editors/date-editor.tsx +1 -1
- package/src/components/story/inline-editors/dependency-type-select.tsx +2 -2
- package/src/components/story/inline-editors/inline-trigger.tsx +2 -2
- package/src/components/story/inline-editors/labels-editor.tsx +2 -2
- package/src/components/story/inline-editors/parent-story-editor.tsx +1 -1
- package/src/components/story/inline-editors/story-select-dialog.tsx +6 -6
- package/src/components/story/peek-panel.tsx +2 -2
- package/src/components/story/relations/__tests__/attachment-manage-dialog.test.tsx +4 -4
- package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +2 -2
- package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/attachment-manage-dialog.tsx +4 -4
- package/src/components/story/relations/knowledge-select-dialog.tsx +5 -5
- package/src/components/story/relations/link-manage-dialog.tsx +5 -5
- package/src/components/story/relations/story-ref-row.tsx +5 -5
- package/src/components/story/search-popover.tsx +1 -1
- package/src/components/story/story-list-table.tsx +1 -1
- package/src/components/story/story-list-view.tsx +2 -2
- package/src/components/story/story-panel-header.tsx +5 -5
- package/src/components/story/story-toolbar.tsx +4 -4
- package/src/components/story/transfer-story-popover.tsx +4 -4
- package/src/components/story/views/calendar-view.tsx +3 -3
- package/src/components/story/views/create-view-dialog.tsx +2 -2
- package/src/components/story/views/kanban-board.tsx +2 -2
- package/src/components/story/views/story-list/__tests__/batch-toolbar.test.tsx +1 -1
- package/src/components/story/views/story-list/__tests__/group-header.test.tsx +1 -1
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +7 -7
- package/src/components/story/views/story-list/batch-toolbar.tsx +3 -3
- package/src/components/story/views/story-list/group.tsx +2 -2
- package/src/components/story/views/story-list/index.tsx +1 -1
- package/src/components/story/views/story-list/row.tsx +1 -1
- package/src/components/story/views/timeline-view.tsx +3 -3
- package/src/components/story/views/view-list-section.tsx +1 -1
- package/src/components/story/views/view-selector-button.tsx +2 -2
- package/src/components/story/views/view-switcher.tsx +1 -1
- package/src/components/tags/nav-tag.tsx +6 -6
- package/src/components/tags/tag-badge.tsx +1 -1
- package/src/components/tags/tag-manager.tsx +5 -5
- package/src/components/tags/tag-selector.tsx +1 -1
- package/src/components/testcase/__tests__/artifact-panel.test.tsx +1 -1
- package/src/components/testcase/__tests__/case-row.test.tsx +2 -2
- package/src/components/testcase/__tests__/convert-bug.test.tsx +2 -2
- package/src/components/testcase/__tests__/folder-tree.test.tsx +2 -2
- package/src/components/testcase/__tests__/generate-dialog.test.tsx +1 -1
- package/src/components/testcase/__tests__/review-layout.test.tsx +1 -1
- package/src/components/testcase/__tests__/step-editor.test.tsx +2 -2
- package/src/components/testcase/ai/generate-dialog.tsx +4 -4
- package/src/components/testcase/automation/artifact-diff.tsx +1 -1
- package/src/components/testcase/automation/artifact-panel.tsx +6 -6
- package/src/components/testcase/automation/verify-report.tsx +1 -1
- package/src/components/testcase/create-testcase-dialog.tsx +5 -5
- package/src/components/testcase/detail/case-detail-body.tsx +1 -1
- package/src/components/testcase/detail/properties.tsx +1 -1
- package/src/components/testcase/detail/story-link-editor.tsx +1 -1
- package/src/components/testcase/filters/index.tsx +2 -2
- package/src/components/testcase/folder-tree.tsx +2 -2
- package/src/components/testcase/generation/batch-actions.tsx +1 -1
- package/src/components/testcase/generation/draft-card.tsx +5 -5
- package/src/components/testcase/generation/review-layout.tsx +2 -2
- package/src/components/testcase/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/testcase/list/case-row.tsx +1 -1
- package/src/components/testcase/list/grouped-list.tsx +1 -1
- package/src/components/testcase/list-view.tsx +1 -1
- package/src/components/testcase/peek-panel.tsx +4 -4
- package/src/components/testcase/plans/add-to-plan-bar.tsx +2 -2
- package/src/components/testcase/plans/add-to-plan-dialog.tsx +4 -4
- package/src/components/testcase/plans/create-plan-dialog.tsx +5 -5
- package/src/components/testcase/plans/plan-detail.tsx +7 -7
- package/src/components/testcase/plans/plan-list.tsx +3 -3
- package/src/components/testcase/plans/plan-state-badge.tsx +1 -1
- package/src/components/testcase/runs/case-checklist.tsx +3 -3
- package/src/components/testcase/runs/convert-bug-button.tsx +1 -1
- package/src/components/testcase/runs/failure-list.tsx +2 -2
- package/src/components/testcase/runs/pending-bugs.tsx +3 -3
- package/src/components/testcase/runs/run-header.tsx +1 -1
- package/src/components/testcase/runs/step-row.tsx +2 -2
- package/src/components/testcase/step-editor.tsx +2 -2
- package/src/components/testcase/table/table-view.tsx +1 -1
- package/src/components/testcase/testcase-toolbar.tsx +3 -3
- package/src/components/testcase/views/create-view-dialog.tsx +2 -2
- package/src/components/testcase/views/view-selector-button.tsx +2 -2
- package/src/components/testcase/views/view-switcher.tsx +1 -1
- package/src/components/tiptap/mindmap/mind-map-context-menu.tsx +1 -1
- package/src/components/tiptap/mindmap/mind-map-controls.tsx +2 -2
- package/src/components/tiptap/mindmap/mindmap-fullscreen-dialog.tsx +1 -1
- package/src/components/tiptap/notion-like/notion-like-editor-header.tsx +2 -2
- package/src/components/tiptap/ui/ai-menu/ai-menu.tsx +1 -1
- package/src/components/tiptap/ui/mention-dropdown-menu/mention-dropdown-menu.tsx +1 -1
- package/src/components/ui/__tests__/select.test.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +75 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +51 -0
- package/src/components/ui/button-group.tsx +1 -1
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/command.tsx +2 -2
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/dropdown-menu.tsx +265 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/input-group.tsx +157 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +1 -1
- package/src/components/ui/label.tsx +17 -0
- package/src/components/ui/message-scroller.tsx +1 -1
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/questionnaire.tsx +1 -1
- package/src/components/ui/select.tsx +232 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +134 -0
- package/src/components/ui/sidebar.tsx +721 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/switch.tsx +30 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toast.tsx +308 -0
- package/src/components/ui/tooltip.tsx +64 -0
- package/src/components/workspace/__tests__/dialogs/create-workspace-dialog.test.tsx +3 -3
- package/src/components/workspace/__tests__/dialogs/delete-workspace-options.test.tsx +3 -3
- package/src/components/workspace/__tests__/dialogs/edit-workspace-dialog.test.tsx +3 -3
- package/src/components/workspace/__tests__/header/workspace-header.test.tsx +3 -3
- package/src/components/workspace/__tests__/kb/workspace-kb-card.test.tsx +2 -2
- package/src/components/workspace/__tests__/members/workspace-members-manager.test.tsx +5 -5
- package/src/components/workspace/__tests__/projects/workspace-project-list.test.tsx +2 -2
- package/src/components/workspace/dialogs/create-workspace-dialog.tsx +3 -3
- package/src/components/workspace/dialogs/delete-workspace-options.tsx +3 -3
- package/src/components/workspace/dialogs/edit-workspace-dialog.tsx +3 -3
- package/src/components/workspace/header/workspace-header.tsx +3 -3
- package/src/components/workspace/kb/workspace-kb-card.tsx +6 -6
- package/src/components/workspace/kb/workspace-kb-manage-dialog.tsx +5 -5
- package/src/components/workspace/kb/workspace-quick-doc-dialog.tsx +6 -6
- package/src/components/workspace/members/workspace-members-manager.tsx +6 -6
- package/src/components/workspace/projects/workspace-project-list.tsx +2 -2
- package/src/hooks/use-load-more.ts +57 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-notifications.ts +1 -1
- package/src/lib/changelog/sdk-versions.ts +1 -1
- package/src/lib/datetime.ts +209 -4
- package/src/lib/sanitize.ts +17 -19
- package/src/lib/toast-error.ts +1 -1
- package/src/providers/index.tsx +2 -2
- package/src/routes/__desktop/onboarding/route.lazy.tsx +6 -6
- package/src/routes/__root.tsx +2 -2
- package/src/routes/_login/forgot-password/route.lazy.tsx +1 -1
- package/src/routes/_login/login/route.lazy.tsx +4 -4
- package/src/routes/_login/register/route.lazy.tsx +2 -2
- package/src/routes/_login/reset-password/route.lazy.tsx +1 -1
- package/src/routes/_login/verify-email/route.lazy.tsx +1 -1
- package/src/routes/_nav/-components/nav-not-found.tsx +1 -1
- package/src/routes/_nav/bugs/$bugId/route.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/activity-feed.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/quick-actions.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/stats-grid.tsx +1 -1
- package/src/routes/_nav/dashboard/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/-components/knowledge-workspace-pending.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/bookmarks/$id.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge/bookmarks/index.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/compliance/$id.lazy.tsx +5 -5
- package/src/routes/_nav/knowledge/dictionaries/$id.lazy.tsx +3 -3
- package/src/routes/_nav/knowledge/index.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge/laws/$id.lazy.tsx +5 -5
- package/src/routes/_nav/projects/$projectId/$storyId/route.lazy.tsx +2 -2
- package/src/routes/_nav/projects/$projectId/index.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +5 -5
- package/src/routes/_nav/projects/$projectId/iterations/index.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/settings/route.lazy.tsx +8 -8
- package/src/routes/_nav/settings/ai/hosted/route.lazy.tsx +2 -2
- package/src/routes/_nav/settings/ai/index/route.lazy.tsx +1 -1
- package/src/routes/_nav/settings/billing/route.lazy.tsx +1 -1
- package/src/routes/_nav/settings/connection/route.lazy.tsx +3 -3
- package/src/routes/_nav/settings/general/route.lazy.tsx +3 -3
- package/src/routes/_nav/settings/privacy/route.lazy.tsx +5 -5
- package/src/routes/_nav/settings/route.tsx +1 -1
- package/src/routes/_nav/stories/-components/story-detail-skeleton.tsx +1 -1
- package/src/routes/_nav/test-cases/$caseId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/generation/$generationId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/plans/$planId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/runs/$runId/route.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/activities/route.lazy.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.lazy.tsx +6 -6
- package/src/routes/_nav/workspaces/index.lazy.tsx +5 -5
- package/src/routes/invite/$token/route.lazy.tsx +2 -2
- package/src/routes/share/compliance/$id/route.lazy.tsx +3 -3
- package/src/routes/share/law/$id/route.lazy.tsx +3 -3
- package/src/server/__tests__/agent-client-graph.test.ts +1 -1
- package/src/styles/globals.css +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn } from "cn"
|
|
2
|
+
|
|
3
|
+
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
data-slot="skeleton"
|
|
7
|
+
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Skeleton }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { Switch as SwitchPrimitive } from "@base-ui/react/switch"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
|
|
5
|
+
function Switch({
|
|
6
|
+
className,
|
|
7
|
+
size = "default",
|
|
8
|
+
...props
|
|
9
|
+
}: SwitchPrimitive.Root.Props & {
|
|
10
|
+
size?: "sm" | "default"
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<SwitchPrimitive.Root
|
|
14
|
+
data-slot="switch"
|
|
15
|
+
data-size={size}
|
|
16
|
+
className={cn(
|
|
17
|
+
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
<SwitchPrimitive.Thumb
|
|
23
|
+
data-slot="switch-thumb"
|
|
24
|
+
className="pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
25
|
+
/>
|
|
26
|
+
</SwitchPrimitive.Root>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Switch }
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "cn"
|
|
3
|
+
|
|
4
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
data-slot="table-container"
|
|
8
|
+
className="relative w-full overflow-x-auto"
|
|
9
|
+
>
|
|
10
|
+
<table
|
|
11
|
+
data-slot="table"
|
|
12
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
20
|
+
return (
|
|
21
|
+
<thead
|
|
22
|
+
data-slot="table-header"
|
|
23
|
+
className={cn("[&_tr]:border-b", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
30
|
+
return (
|
|
31
|
+
<tbody
|
|
32
|
+
data-slot="table-body"
|
|
33
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
40
|
+
return (
|
|
41
|
+
<tfoot
|
|
42
|
+
data-slot="table-footer"
|
|
43
|
+
className={cn(
|
|
44
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
45
|
+
className
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
53
|
+
return (
|
|
54
|
+
<tr
|
|
55
|
+
data-slot="table-row"
|
|
56
|
+
className={cn(
|
|
57
|
+
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
66
|
+
return (
|
|
67
|
+
<th
|
|
68
|
+
data-slot="table-head"
|
|
69
|
+
className={cn(
|
|
70
|
+
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
71
|
+
className
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
79
|
+
return (
|
|
80
|
+
<td
|
|
81
|
+
data-slot="table-cell"
|
|
82
|
+
className={cn(
|
|
83
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
84
|
+
className
|
|
85
|
+
)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function TableCaption({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"caption">) {
|
|
95
|
+
return (
|
|
96
|
+
<caption
|
|
97
|
+
data-slot="table-caption"
|
|
98
|
+
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
99
|
+
{...props}
|
|
100
|
+
/>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
Table,
|
|
106
|
+
TableHeader,
|
|
107
|
+
TableBody,
|
|
108
|
+
TableFooter,
|
|
109
|
+
TableHead,
|
|
110
|
+
TableRow,
|
|
111
|
+
TableCell,
|
|
112
|
+
TableCaption,
|
|
113
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "cn"
|
|
3
|
+
|
|
4
|
+
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
5
|
+
return (
|
|
6
|
+
<textarea
|
|
7
|
+
data-slot="textarea"
|
|
8
|
+
className={cn(
|
|
9
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Textarea }
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Toast as ToastPrimitive } from "@base-ui/react/toast"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
|
|
5
|
+
import { Button } from "./button"
|
|
6
|
+
import { XIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
|
|
7
|
+
|
|
8
|
+
const toastManager = ToastPrimitive.createToastManager()
|
|
9
|
+
|
|
10
|
+
// 双端历史分叉:web 顶部居中堆叠(top-center),admin 右下角堆叠(bottom-right)。
|
|
11
|
+
// 差异为纯 class 组 + swipeDirection,通过 position 参数承载,行为逐字节等价于原实现。
|
|
12
|
+
type ToasterPosition = "top-center" | "bottom-right"
|
|
13
|
+
|
|
14
|
+
const ToastPositionContext = React.createContext<ToasterPosition>("top-center")
|
|
15
|
+
|
|
16
|
+
interface SonnerToastOptions {
|
|
17
|
+
description?: React.ReactNode
|
|
18
|
+
duration?: number
|
|
19
|
+
action?: { label: React.ReactNode; onClick?: () => void }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function buildOptions(message: React.ReactNode, type: string | undefined, opts?: SonnerToastOptions) {
|
|
23
|
+
return {
|
|
24
|
+
type,
|
|
25
|
+
title: message,
|
|
26
|
+
description: opts?.description,
|
|
27
|
+
timeout: opts?.duration,
|
|
28
|
+
actionProps: opts?.action
|
|
29
|
+
? { children: opts.action.label, onClick: opts.action.onClick }
|
|
30
|
+
: undefined,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const toast = Object.assign(
|
|
35
|
+
(message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
36
|
+
toastManager.add(buildOptions(message, undefined, opts)),
|
|
37
|
+
{
|
|
38
|
+
success: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
39
|
+
toastManager.add(buildOptions(message, "success", opts)),
|
|
40
|
+
error: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
41
|
+
toastManager.add(buildOptions(message, "error", opts)),
|
|
42
|
+
warning: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
43
|
+
toastManager.add(buildOptions(message, "warning", opts)),
|
|
44
|
+
info: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
45
|
+
toastManager.add(buildOptions(message, "info", opts)),
|
|
46
|
+
loading: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
47
|
+
toastManager.add(buildOptions(message, "loading", { ...opts, duration: 0 })),
|
|
48
|
+
message: (message: React.ReactNode, opts?: SonnerToastOptions) =>
|
|
49
|
+
toastManager.add(buildOptions(message, undefined, opts)),
|
|
50
|
+
dismiss: (id?: string) => toastManager.close(id),
|
|
51
|
+
promise: <Value,>(
|
|
52
|
+
promiseValue: Promise<Value>,
|
|
53
|
+
options: {
|
|
54
|
+
loading: string
|
|
55
|
+
success: string | ((result: Value) => string)
|
|
56
|
+
error: string | ((error: unknown) => string)
|
|
57
|
+
},
|
|
58
|
+
) =>
|
|
59
|
+
toastManager.promise(promiseValue, {
|
|
60
|
+
loading: options.loading,
|
|
61
|
+
success: options.success,
|
|
62
|
+
error: options.error,
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
function ToastProvider({ ...props }: ToastPrimitive.Provider.Props) {
|
|
68
|
+
return <ToastPrimitive.Provider {...props} />
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function ToastPortal({ ...props }: ToastPrimitive.Portal.Props) {
|
|
72
|
+
return <ToastPrimitive.Portal data-slot="toast-portal" {...props} />
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function ToastViewport({ className, ...props }: ToastPrimitive.Viewport.Props) {
|
|
76
|
+
const top = React.useContext(ToastPositionContext) === "top-center"
|
|
77
|
+
return (
|
|
78
|
+
<ToastPrimitive.Viewport
|
|
79
|
+
data-slot="toast-viewport"
|
|
80
|
+
className={cn(
|
|
81
|
+
top
|
|
82
|
+
? "pointer-events-none fixed top-4 left-0 right-0 z-50 mx-auto w-full max-w-sm outline-none sm:top-6"
|
|
83
|
+
: "pointer-events-none fixed bottom-4 right-4 z-50 w-full max-w-sm outline-none sm:bottom-6 sm:right-6",
|
|
84
|
+
className
|
|
85
|
+
)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function Toast({ className, ...props }: ToastPrimitive.Root.Props) {
|
|
92
|
+
const top = React.useContext(ToastPositionContext) === "top-center"
|
|
93
|
+
return (
|
|
94
|
+
<ToastPrimitive.Root
|
|
95
|
+
data-slot="toast"
|
|
96
|
+
className={cn(
|
|
97
|
+
top
|
|
98
|
+
? "group/toast pointer-events-auto absolute top-0 right-0 left-0 z-[calc(1000-var(--toast-index))] mx-auto w-full origin-top rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
|
|
99
|
+
: "group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
100
|
+
top
|
|
101
|
+
? "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)+calc(var(--toast-index)*var(--gap))+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]"
|
|
102
|
+
: "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]",
|
|
103
|
+
top
|
|
104
|
+
? "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--peek))+(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]"
|
|
105
|
+
: "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]",
|
|
106
|
+
top
|
|
107
|
+
? "after:absolute after:bottom-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']"
|
|
108
|
+
: "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']",
|
|
109
|
+
"data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]",
|
|
110
|
+
top
|
|
111
|
+
? "data-limited:opacity-0 data-starting-style:[transform:translateY(-150%)]"
|
|
112
|
+
: "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]",
|
|
113
|
+
top
|
|
114
|
+
? "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(-150%)]"
|
|
115
|
+
: "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]",
|
|
116
|
+
"data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
117
|
+
"data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
|
|
118
|
+
"data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
|
|
119
|
+
"data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
120
|
+
"data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
121
|
+
"data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
|
|
122
|
+
"data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
|
|
123
|
+
"data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
124
|
+
className
|
|
125
|
+
)}
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function ToastContent({ className, ...props }: ToastPrimitive.Content.Props) {
|
|
132
|
+
return (
|
|
133
|
+
<ToastPrimitive.Content
|
|
134
|
+
data-slot="toast-content"
|
|
135
|
+
className={cn(
|
|
136
|
+
"flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",
|
|
137
|
+
className
|
|
138
|
+
)}
|
|
139
|
+
{...props}
|
|
140
|
+
/>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function ToastTitle({ className, ...props }: ToastPrimitive.Title.Props) {
|
|
145
|
+
return (
|
|
146
|
+
<ToastPrimitive.Title
|
|
147
|
+
data-slot="toast-title"
|
|
148
|
+
className={cn("text-sm font-medium", className)}
|
|
149
|
+
{...props}
|
|
150
|
+
/>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function ToastDescription({
|
|
155
|
+
className,
|
|
156
|
+
...props
|
|
157
|
+
}: ToastPrimitive.Description.Props) {
|
|
158
|
+
return (
|
|
159
|
+
<ToastPrimitive.Description
|
|
160
|
+
data-slot="toast-description"
|
|
161
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
162
|
+
{...props}
|
|
163
|
+
/>
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function ToastAction({
|
|
168
|
+
className,
|
|
169
|
+
render = <Button variant="outline" size="sm" />,
|
|
170
|
+
...props
|
|
171
|
+
}: ToastPrimitive.Action.Props) {
|
|
172
|
+
return (
|
|
173
|
+
<ToastPrimitive.Action
|
|
174
|
+
data-slot="toast-action"
|
|
175
|
+
render={render}
|
|
176
|
+
className={cn("shrink-0", className)}
|
|
177
|
+
{...props}
|
|
178
|
+
/>
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function ToastClose({
|
|
183
|
+
className,
|
|
184
|
+
children,
|
|
185
|
+
render = <Button variant="ghost" size="icon-sm" />,
|
|
186
|
+
...props
|
|
187
|
+
}: ToastPrimitive.Close.Props) {
|
|
188
|
+
return (
|
|
189
|
+
<ToastPrimitive.Close
|
|
190
|
+
data-slot="toast-close"
|
|
191
|
+
aria-label="Close toast"
|
|
192
|
+
render={render}
|
|
193
|
+
className={cn(
|
|
194
|
+
"relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground",
|
|
195
|
+
className
|
|
196
|
+
)}
|
|
197
|
+
{...props}
|
|
198
|
+
>
|
|
199
|
+
{children ?? (
|
|
200
|
+
<XIcon aria-hidden="true" />
|
|
201
|
+
)}
|
|
202
|
+
</ToastPrimitive.Close>
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function ToastIcon({ type }: { type: string | undefined }) {
|
|
207
|
+
let icon: React.ReactNode = null
|
|
208
|
+
|
|
209
|
+
if (type === "success") {
|
|
210
|
+
icon = (
|
|
211
|
+
<CircleCheckIcon aria-hidden="true" />
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (type === "info") {
|
|
216
|
+
icon = (
|
|
217
|
+
<InfoIcon aria-hidden="true" />
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (type === "warning") {
|
|
222
|
+
icon = (
|
|
223
|
+
<TriangleAlertIcon aria-hidden="true" />
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (type === "error") {
|
|
228
|
+
icon = (
|
|
229
|
+
<OctagonXIcon className="text-destructive" aria-hidden="true" />
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (type === "loading") {
|
|
234
|
+
icon = (
|
|
235
|
+
<Loader2Icon className="animate-spin" aria-hidden="true" />
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (!icon) {
|
|
240
|
+
return null
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return (
|
|
244
|
+
<span
|
|
245
|
+
data-slot="toast-icon"
|
|
246
|
+
className="shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
|
|
247
|
+
>
|
|
248
|
+
{icon}
|
|
249
|
+
</span>
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function ToastList() {
|
|
254
|
+
const { toasts } = ToastPrimitive.useToastManager()
|
|
255
|
+
const top = React.useContext(ToastPositionContext) === "top-center"
|
|
256
|
+
|
|
257
|
+
return toasts.map((toastItem) => (
|
|
258
|
+
<Toast key={toastItem.id} toast={toastItem} swipeDirection={top ? "up" : undefined}>
|
|
259
|
+
<ToastContent>
|
|
260
|
+
<ToastIcon type={toastItem.type} />
|
|
261
|
+
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
262
|
+
<ToastTitle />
|
|
263
|
+
<ToastDescription />
|
|
264
|
+
</div>
|
|
265
|
+
<ToastAction />
|
|
266
|
+
<ToastClose />
|
|
267
|
+
</ToastContent>
|
|
268
|
+
</Toast>
|
|
269
|
+
))
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function Toaster({
|
|
273
|
+
children,
|
|
274
|
+
position = "top-center",
|
|
275
|
+
...props
|
|
276
|
+
}: ToastPrimitive.Provider.Props & { position?: ToasterPosition }) {
|
|
277
|
+
return (
|
|
278
|
+
<ToastPositionContext.Provider value={position}>
|
|
279
|
+
<ToastProvider toastManager={toastManager} {...props}>
|
|
280
|
+
{children}
|
|
281
|
+
<ToastPortal>
|
|
282
|
+
<ToastViewport>
|
|
283
|
+
<ToastList />
|
|
284
|
+
</ToastViewport>
|
|
285
|
+
</ToastPortal>
|
|
286
|
+
</ToastProvider>
|
|
287
|
+
</ToastPositionContext.Provider>
|
|
288
|
+
)
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const createToastManager = ToastPrimitive.createToastManager
|
|
292
|
+
const useToastManager = ToastPrimitive.useToastManager
|
|
293
|
+
|
|
294
|
+
export {
|
|
295
|
+
Toaster,
|
|
296
|
+
Toast,
|
|
297
|
+
ToastAction,
|
|
298
|
+
ToastClose,
|
|
299
|
+
ToastContent,
|
|
300
|
+
ToastDescription,
|
|
301
|
+
ToastPortal,
|
|
302
|
+
ToastProvider,
|
|
303
|
+
ToastTitle,
|
|
304
|
+
ToastViewport,
|
|
305
|
+
createToastManager,
|
|
306
|
+
toast,
|
|
307
|
+
useToastManager,
|
|
308
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
|
|
5
|
+
function TooltipProvider({
|
|
6
|
+
delay = 0,
|
|
7
|
+
...props
|
|
8
|
+
}: TooltipPrimitive.Provider.Props) {
|
|
9
|
+
return (
|
|
10
|
+
<TooltipPrimitive.Provider
|
|
11
|
+
data-slot="tooltip-provider"
|
|
12
|
+
delay={delay}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function Tooltip({ ...props }: TooltipPrimitive.Root.Props) {
|
|
19
|
+
return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {
|
|
23
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function TooltipContent({
|
|
27
|
+
className,
|
|
28
|
+
side = "top",
|
|
29
|
+
sideOffset = 4,
|
|
30
|
+
align = "center",
|
|
31
|
+
alignOffset = 0,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
}: TooltipPrimitive.Popup.Props &
|
|
35
|
+
Pick<
|
|
36
|
+
TooltipPrimitive.Positioner.Props,
|
|
37
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
38
|
+
>) {
|
|
39
|
+
return (
|
|
40
|
+
<TooltipPrimitive.Portal>
|
|
41
|
+
<TooltipPrimitive.Positioner
|
|
42
|
+
align={align}
|
|
43
|
+
alignOffset={alignOffset}
|
|
44
|
+
side={side}
|
|
45
|
+
sideOffset={sideOffset}
|
|
46
|
+
className="isolate z-50"
|
|
47
|
+
>
|
|
48
|
+
<TooltipPrimitive.Popup
|
|
49
|
+
data-slot="tooltip-content"
|
|
50
|
+
className={cn(
|
|
51
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
52
|
+
className
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
|
|
58
|
+
</TooltipPrimitive.Popup>
|
|
59
|
+
</TooltipPrimitive.Positioner>
|
|
60
|
+
</TooltipPrimitive.Portal>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -2,15 +2,15 @@ import { describe, it, expect, vi } from "vitest";
|
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
3
|
import { CreateWorkspaceDialog } from "../../dialogs/create-workspace-dialog";
|
|
4
4
|
|
|
5
|
-
vi.mock("
|
|
5
|
+
vi.mock("@/components/ui/button", () => ({
|
|
6
6
|
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
vi.mock("
|
|
9
|
+
vi.mock("@/components/ui/input", () => ({
|
|
10
10
|
Input: (props: any) => <input {...props} />,
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
|
-
vi.mock("
|
|
13
|
+
vi.mock("@/components/ui/dialog", () => ({
|
|
14
14
|
Dialog: ({ children }: any) => <div>{children}</div>,
|
|
15
15
|
DialogContent: ({ children }: any) => <div>{children}</div>,
|
|
16
16
|
DialogFooter: ({ children }: any) => <div>{children}</div>,
|
|
@@ -5,7 +5,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
5
5
|
|
|
6
6
|
import { DeleteWorkspaceOptions } from "../../dialogs/delete-workspace-options";
|
|
7
7
|
|
|
8
|
-
vi.mock("
|
|
8
|
+
vi.mock("@/components/ui/field", () => ({
|
|
9
9
|
Field: ({ children }: { children: ReactNode }) => <div>{children}</div>,
|
|
10
10
|
FieldContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,
|
|
11
11
|
FieldDescription: ({ children }: { children: ReactNode }) => (
|
|
@@ -22,7 +22,7 @@ vi.mock("@/components/ui/radio-group", () => ({
|
|
|
22
22
|
RadioGroupItem: () => <input type="radio" />,
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
vi.mock("
|
|
25
|
+
vi.mock("@/components/ui/select", () => ({
|
|
26
26
|
Select: ({ children }: { children: ReactNode }) => <div>{children}</div>,
|
|
27
27
|
SelectContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,
|
|
28
28
|
SelectItem: ({ children }: { children: ReactNode }) => <div>{children}</div>,
|
|
@@ -32,7 +32,7 @@ vi.mock("@allbluecn/ui/select", () => ({
|
|
|
32
32
|
SelectValue: () => <span />,
|
|
33
33
|
}));
|
|
34
34
|
|
|
35
|
-
vi.mock("
|
|
35
|
+
vi.mock("@/components/ui/separator", () => ({
|
|
36
36
|
Separator: () => <hr />,
|
|
37
37
|
}));
|
|
38
38
|
|
|
@@ -2,15 +2,15 @@ import { describe, it, expect, vi } from "vitest";
|
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
3
|
import { EditWorkspaceDialog } from "../../dialogs/edit-workspace-dialog";
|
|
4
4
|
|
|
5
|
-
vi.mock("
|
|
5
|
+
vi.mock("@/components/ui/button", () => ({
|
|
6
6
|
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
vi.mock("
|
|
9
|
+
vi.mock("@/components/ui/input", () => ({
|
|
10
10
|
Input: (props: any) => <input {...props} />,
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
|
-
vi.mock("
|
|
13
|
+
vi.mock("@/components/ui/dialog", () => ({
|
|
14
14
|
Dialog: ({ children }: any) => <div>{children}</div>,
|
|
15
15
|
DialogContent: ({ children }: any) => <div>{children}</div>,
|
|
16
16
|
DialogFooter: ({ children }: any) => <div>{children}</div>,
|
|
@@ -2,18 +2,18 @@ import { describe, it, expect, vi } from "vitest";
|
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
3
|
import { WorkspaceHeader } from "../../header/workspace-header";
|
|
4
4
|
|
|
5
|
-
vi.mock("
|
|
5
|
+
vi.mock("@/components/ui/button", () => ({
|
|
6
6
|
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
vi.mock("
|
|
9
|
+
vi.mock("@/components/ui/dropdown-menu", () => ({
|
|
10
10
|
DropdownMenu: ({ children }: any) => <div>{children}</div>,
|
|
11
11
|
DropdownMenuTrigger: ({ children }: any) => <div>{children}</div>,
|
|
12
12
|
DropdownMenuContent: ({ children }: any) => <div>{children}</div>,
|
|
13
13
|
DropdownMenuItem: ({ children }: any) => <div>{children}</div>,
|
|
14
14
|
}));
|
|
15
15
|
|
|
16
|
-
vi.mock("
|
|
16
|
+
vi.mock("@/components/ui/separator", () => ({
|
|
17
17
|
Separator: () => <div data-testid="separator" />,
|
|
18
18
|
}));
|
|
19
19
|
|
|
@@ -35,7 +35,7 @@ vi.mock("@dnd-kit/react", () => ({
|
|
|
35
35
|
vi.mock("@dnd-kit/react/sortable", () => ({
|
|
36
36
|
useSortable: () => ({ ref: undefined, handleRef: undefined, isDragging: false }),
|
|
37
37
|
}));
|
|
38
|
-
vi.mock("
|
|
38
|
+
vi.mock("@/components/ui/toast", () => ({
|
|
39
39
|
toast: { error: vi.fn(), success: vi.fn(), warning: vi.fn() },
|
|
40
40
|
}));
|
|
41
41
|
vi.mock("../workspace-kb-manage-dialog", () => ({
|
|
@@ -44,7 +44,7 @@ vi.mock("../workspace-kb-manage-dialog", () => ({
|
|
|
44
44
|
vi.mock("../workspace-quick-doc-dialog", () => ({
|
|
45
45
|
WorkspaceQuickDocDialog: () => null,
|
|
46
46
|
}));
|
|
47
|
-
vi.mock("
|
|
47
|
+
vi.mock("@/components/ui/tooltip", () => ({
|
|
48
48
|
Tooltip: ({ children }: any) => <span data-testid="tooltip-wrapper">{children}</span>,
|
|
49
49
|
TooltipContent: ({ children }: any) => <span>{children}</span>,
|
|
50
50
|
TooltipTrigger: ({ children, render: renderProp }: any) => (
|