@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,157 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
+
import { cn } from "cn"
|
|
5
|
+
|
|
6
|
+
import { Button } from "./button"
|
|
7
|
+
import { Input } from "./input"
|
|
8
|
+
import { Textarea } from "./textarea"
|
|
9
|
+
|
|
10
|
+
function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
data-slot="input-group"
|
|
14
|
+
role="group"
|
|
15
|
+
className={cn(
|
|
16
|
+
"group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const inputGroupAddonVariants = cva(
|
|
25
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
26
|
+
{
|
|
27
|
+
variants: {
|
|
28
|
+
align: {
|
|
29
|
+
"inline-start":
|
|
30
|
+
"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
31
|
+
"inline-end":
|
|
32
|
+
"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
|
|
33
|
+
"block-start":
|
|
34
|
+
"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
35
|
+
"block-end":
|
|
36
|
+
"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
align: "inline-start",
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
function InputGroupAddon({
|
|
46
|
+
className,
|
|
47
|
+
align = "inline-start",
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
role="group"
|
|
53
|
+
data-slot="input-group-addon"
|
|
54
|
+
data-align={align}
|
|
55
|
+
className={cn(inputGroupAddonVariants({ align }), className)}
|
|
56
|
+
onClick={(e) => {
|
|
57
|
+
if ((e.target as HTMLElement).closest("button")) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus()
|
|
61
|
+
}}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const inputGroupButtonVariants = cva(
|
|
68
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
69
|
+
{
|
|
70
|
+
variants: {
|
|
71
|
+
size: {
|
|
72
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
73
|
+
sm: "",
|
|
74
|
+
"icon-xs":
|
|
75
|
+
"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
76
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
size: "xs",
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
function InputGroupButton({
|
|
86
|
+
className,
|
|
87
|
+
type = "button",
|
|
88
|
+
variant = "ghost",
|
|
89
|
+
size = "xs",
|
|
90
|
+
...props
|
|
91
|
+
}: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
|
|
92
|
+
VariantProps<typeof inputGroupButtonVariants> & {
|
|
93
|
+
type?: "button" | "submit" | "reset"
|
|
94
|
+
}) {
|
|
95
|
+
return (
|
|
96
|
+
<Button
|
|
97
|
+
type={type}
|
|
98
|
+
data-size={size}
|
|
99
|
+
variant={variant}
|
|
100
|
+
className={cn(inputGroupButtonVariants({ size }), className)}
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
|
|
107
|
+
return (
|
|
108
|
+
<span
|
|
109
|
+
className={cn(
|
|
110
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
/>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function InputGroupInput({
|
|
119
|
+
className,
|
|
120
|
+
...props
|
|
121
|
+
}: React.ComponentProps<"input">) {
|
|
122
|
+
return (
|
|
123
|
+
<Input
|
|
124
|
+
data-slot="input-group-control"
|
|
125
|
+
className={cn(
|
|
126
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
127
|
+
className
|
|
128
|
+
)}
|
|
129
|
+
{...props}
|
|
130
|
+
/>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function InputGroupTextarea({
|
|
135
|
+
className,
|
|
136
|
+
...props
|
|
137
|
+
}: React.ComponentProps<"textarea">) {
|
|
138
|
+
return (
|
|
139
|
+
<Textarea
|
|
140
|
+
data-slot="input-group-control"
|
|
141
|
+
className={cn(
|
|
142
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
143
|
+
className
|
|
144
|
+
)}
|
|
145
|
+
{...props}
|
|
146
|
+
/>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export {
|
|
151
|
+
InputGroup,
|
|
152
|
+
InputGroupAddon,
|
|
153
|
+
InputGroupButton,
|
|
154
|
+
InputGroupText,
|
|
155
|
+
InputGroupInput,
|
|
156
|
+
InputGroupTextarea,
|
|
157
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Input as InputPrimitive } from "@base-ui/react/input"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
|
|
5
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
+
return (
|
|
7
|
+
<InputPrimitive
|
|
8
|
+
type={type}
|
|
9
|
+
data-slot="input"
|
|
10
|
+
className={cn(
|
|
11
|
+
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none 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",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Input }
|
|
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render"
|
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
5
|
import { cn } from "cn"
|
|
6
6
|
|
|
7
|
-
import { Separator } from "
|
|
7
|
+
import { Separator } from "@/components/ui/separator"
|
|
8
8
|
|
|
9
9
|
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
10
10
|
return (
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "cn"
|
|
3
|
+
|
|
4
|
+
function Label({ className, ...props }: React.ComponentProps<"label">) {
|
|
5
|
+
return (
|
|
6
|
+
<label
|
|
7
|
+
data-slot="label"
|
|
8
|
+
className={cn(
|
|
9
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Label }
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@shadcn/react/message-scroller"
|
|
9
9
|
import { cn } from "cn"
|
|
10
10
|
|
|
11
|
-
import { Button } from "
|
|
11
|
+
import { Button } from "@/components/ui/button"
|
|
12
12
|
import { ArrowDownIcon } from "lucide-react"
|
|
13
13
|
|
|
14
14
|
function MessageScrollerProvider(
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "cn"
|
|
3
|
+
|
|
4
|
+
import { Button } from "./button"
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
8
|
+
return (
|
|
9
|
+
<nav
|
|
10
|
+
role="navigation"
|
|
11
|
+
aria-label="pagination"
|
|
12
|
+
data-slot="pagination"
|
|
13
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function PaginationContent({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<"ul">) {
|
|
23
|
+
return (
|
|
24
|
+
<ul
|
|
25
|
+
data-slot="pagination-content"
|
|
26
|
+
className={cn("flex items-center gap-1", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
33
|
+
return <li data-slot="pagination-item" {...props} />
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type PaginationLinkProps = {
|
|
37
|
+
isActive?: boolean
|
|
38
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> &
|
|
39
|
+
React.ComponentProps<"a">
|
|
40
|
+
|
|
41
|
+
function PaginationLink({
|
|
42
|
+
className,
|
|
43
|
+
isActive,
|
|
44
|
+
size = "icon",
|
|
45
|
+
...props
|
|
46
|
+
}: PaginationLinkProps) {
|
|
47
|
+
return (
|
|
48
|
+
<Button
|
|
49
|
+
variant={isActive ? "outline" : "ghost"}
|
|
50
|
+
size={size}
|
|
51
|
+
className={cn(className)}
|
|
52
|
+
nativeButton={false}
|
|
53
|
+
render={
|
|
54
|
+
<a
|
|
55
|
+
aria-current={isActive ? "page" : undefined}
|
|
56
|
+
data-slot="pagination-link"
|
|
57
|
+
data-active={isActive}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function PaginationPrevious({
|
|
66
|
+
className,
|
|
67
|
+
text = "Previous",
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
70
|
+
return (
|
|
71
|
+
<PaginationLink
|
|
72
|
+
aria-label="Go to previous page"
|
|
73
|
+
size="default"
|
|
74
|
+
className={cn("pl-2!", className)}
|
|
75
|
+
{...props}
|
|
76
|
+
>
|
|
77
|
+
<ChevronLeftIcon data-icon="inline-start" />
|
|
78
|
+
<span className="hidden sm:block">{text}</span>
|
|
79
|
+
</PaginationLink>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function PaginationNext({
|
|
84
|
+
className,
|
|
85
|
+
text = "Next",
|
|
86
|
+
...props
|
|
87
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
88
|
+
return (
|
|
89
|
+
<PaginationLink
|
|
90
|
+
aria-label="Go to next page"
|
|
91
|
+
size="default"
|
|
92
|
+
className={cn("pr-2!", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
>
|
|
95
|
+
<span className="hidden sm:block">{text}</span>
|
|
96
|
+
<ChevronRightIcon data-icon="inline-end" />
|
|
97
|
+
</PaginationLink>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function PaginationEllipsis({
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<"span">) {
|
|
105
|
+
return (
|
|
106
|
+
<span
|
|
107
|
+
aria-hidden
|
|
108
|
+
data-slot="pagination-ellipsis"
|
|
109
|
+
className={cn(
|
|
110
|
+
"flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
>
|
|
115
|
+
<MoreHorizontalIcon
|
|
116
|
+
/>
|
|
117
|
+
<span className="sr-only">More pages</span>
|
|
118
|
+
</span>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export {
|
|
123
|
+
Pagination,
|
|
124
|
+
PaginationContent,
|
|
125
|
+
PaginationEllipsis,
|
|
126
|
+
PaginationItem,
|
|
127
|
+
PaginationLink,
|
|
128
|
+
PaginationNext,
|
|
129
|
+
PaginationPrevious,
|
|
130
|
+
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
import { Questionnaire as QuestionnairePrimitive } from "@shadcn/react/questionnaire"
|
|
3
3
|
import { cn } from "cn"
|
|
4
4
|
|
|
5
|
-
import { buttonVariants, type Button } from "
|
|
5
|
+
import { buttonVariants, type Button } from "@/components/ui/button"
|
|
6
6
|
import { CheckIcon } from "lucide-react"
|
|
7
7
|
|
|
8
8
|
function Questionnaire({
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
5
|
+
|
|
6
|
+
type CollectedItem = {
|
|
7
|
+
label: React.ReactNode
|
|
8
|
+
value: any
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function collectItems(children: React.ReactNode, acc: CollectedItem[] = []): CollectedItem[] {
|
|
12
|
+
React.Children.forEach(children, child => {
|
|
13
|
+
if (!React.isValidElement(child)) {
|
|
14
|
+
return
|
|
15
|
+
}
|
|
16
|
+
const el = child as React.ReactElement<any>
|
|
17
|
+
if (el.type === SelectItem) {
|
|
18
|
+
const { value, children: label } = el.props
|
|
19
|
+
if (value !== undefined) {
|
|
20
|
+
acc.push({ value, label })
|
|
21
|
+
}
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
if (el.props?.children) {
|
|
25
|
+
collectItems(el.props.children, acc)
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
return acc
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function Select<Value, Multiple extends boolean | undefined = false>(
|
|
32
|
+
{ children, items, ...props }: SelectPrimitive.Root.Props<Value, Multiple>
|
|
33
|
+
) {
|
|
34
|
+
const resolvedItems = React.useMemo(() => items ?? collectItems(children), [items, children])
|
|
35
|
+
return (
|
|
36
|
+
<SelectPrimitive.Root items={resolvedItems} {...props}>
|
|
37
|
+
{children}
|
|
38
|
+
</SelectPrimitive.Root>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
43
|
+
return (
|
|
44
|
+
<SelectPrimitive.Group
|
|
45
|
+
data-slot="select-group"
|
|
46
|
+
className={cn("scroll-my-1 p-1", className)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
53
|
+
return (
|
|
54
|
+
<SelectPrimitive.Value
|
|
55
|
+
data-slot="select-value"
|
|
56
|
+
className={cn("flex flex-1 text-left", className)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function SelectTrigger({
|
|
63
|
+
className,
|
|
64
|
+
size = "default",
|
|
65
|
+
children,
|
|
66
|
+
...props
|
|
67
|
+
}: SelectPrimitive.Trigger.Props & {
|
|
68
|
+
size?: "sm" | "default"
|
|
69
|
+
}) {
|
|
70
|
+
return (
|
|
71
|
+
<SelectPrimitive.Trigger
|
|
72
|
+
data-slot="select-trigger"
|
|
73
|
+
data-size={size}
|
|
74
|
+
className={cn(
|
|
75
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
76
|
+
className
|
|
77
|
+
)}
|
|
78
|
+
{...props}
|
|
79
|
+
>
|
|
80
|
+
{children}
|
|
81
|
+
<SelectPrimitive.Icon
|
|
82
|
+
render={
|
|
83
|
+
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</SelectPrimitive.Trigger>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function SelectContent({
|
|
91
|
+
className,
|
|
92
|
+
children,
|
|
93
|
+
side = "bottom",
|
|
94
|
+
sideOffset = 4,
|
|
95
|
+
align = "center",
|
|
96
|
+
alignOffset = 0,
|
|
97
|
+
alignItemWithTrigger = true,
|
|
98
|
+
...props
|
|
99
|
+
}: SelectPrimitive.Popup.Props &
|
|
100
|
+
Pick<
|
|
101
|
+
SelectPrimitive.Positioner.Props,
|
|
102
|
+
"align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
|
|
103
|
+
>) {
|
|
104
|
+
return (
|
|
105
|
+
<SelectPrimitive.Portal>
|
|
106
|
+
<SelectPrimitive.Positioner
|
|
107
|
+
side={side}
|
|
108
|
+
sideOffset={sideOffset}
|
|
109
|
+
align={align}
|
|
110
|
+
alignOffset={alignOffset}
|
|
111
|
+
alignItemWithTrigger={alignItemWithTrigger}
|
|
112
|
+
className="isolate z-50"
|
|
113
|
+
>
|
|
114
|
+
<SelectPrimitive.Popup
|
|
115
|
+
data-slot="select-content"
|
|
116
|
+
data-align-trigger={alignItemWithTrigger}
|
|
117
|
+
className={cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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", className )}
|
|
118
|
+
{...props}
|
|
119
|
+
>
|
|
120
|
+
<SelectScrollUpButton />
|
|
121
|
+
<SelectPrimitive.List>{children}</SelectPrimitive.List>
|
|
122
|
+
<SelectScrollDownButton />
|
|
123
|
+
</SelectPrimitive.Popup>
|
|
124
|
+
</SelectPrimitive.Positioner>
|
|
125
|
+
</SelectPrimitive.Portal>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function SelectLabel({
|
|
130
|
+
className,
|
|
131
|
+
...props
|
|
132
|
+
}: SelectPrimitive.GroupLabel.Props) {
|
|
133
|
+
return (
|
|
134
|
+
<SelectPrimitive.GroupLabel
|
|
135
|
+
data-slot="select-label"
|
|
136
|
+
className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
|
|
137
|
+
{...props}
|
|
138
|
+
/>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function SelectItem({
|
|
143
|
+
className,
|
|
144
|
+
children,
|
|
145
|
+
...props
|
|
146
|
+
}: SelectPrimitive.Item.Props) {
|
|
147
|
+
return (
|
|
148
|
+
<SelectPrimitive.Item
|
|
149
|
+
data-slot="select-item"
|
|
150
|
+
className={cn(
|
|
151
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
152
|
+
className
|
|
153
|
+
)}
|
|
154
|
+
{...props}
|
|
155
|
+
>
|
|
156
|
+
<SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
|
|
157
|
+
{children}
|
|
158
|
+
</SelectPrimitive.ItemText>
|
|
159
|
+
<SelectPrimitive.ItemIndicator
|
|
160
|
+
render={
|
|
161
|
+
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
<CheckIcon className="pointer-events-none" />
|
|
165
|
+
</SelectPrimitive.ItemIndicator>
|
|
166
|
+
</SelectPrimitive.Item>
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function SelectSeparator({
|
|
171
|
+
className,
|
|
172
|
+
...props
|
|
173
|
+
}: SelectPrimitive.Separator.Props) {
|
|
174
|
+
return (
|
|
175
|
+
<SelectPrimitive.Separator
|
|
176
|
+
data-slot="select-separator"
|
|
177
|
+
className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
|
|
178
|
+
{...props}
|
|
179
|
+
/>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function SelectScrollUpButton({
|
|
184
|
+
className,
|
|
185
|
+
...props
|
|
186
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
187
|
+
return (
|
|
188
|
+
<SelectPrimitive.ScrollUpArrow
|
|
189
|
+
data-slot="select-scroll-up-button"
|
|
190
|
+
className={cn(
|
|
191
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
192
|
+
className
|
|
193
|
+
)}
|
|
194
|
+
{...props}
|
|
195
|
+
>
|
|
196
|
+
<ChevronUpIcon
|
|
197
|
+
/>
|
|
198
|
+
</SelectPrimitive.ScrollUpArrow>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function SelectScrollDownButton({
|
|
203
|
+
className,
|
|
204
|
+
...props
|
|
205
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
206
|
+
return (
|
|
207
|
+
<SelectPrimitive.ScrollDownArrow
|
|
208
|
+
data-slot="select-scroll-down-button"
|
|
209
|
+
className={cn(
|
|
210
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
211
|
+
className
|
|
212
|
+
)}
|
|
213
|
+
{...props}
|
|
214
|
+
>
|
|
215
|
+
<ChevronDownIcon
|
|
216
|
+
/>
|
|
217
|
+
</SelectPrimitive.ScrollDownArrow>
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export {
|
|
222
|
+
Select,
|
|
223
|
+
SelectContent,
|
|
224
|
+
SelectGroup,
|
|
225
|
+
SelectItem,
|
|
226
|
+
SelectLabel,
|
|
227
|
+
SelectScrollDownButton,
|
|
228
|
+
SelectScrollUpButton,
|
|
229
|
+
SelectSeparator,
|
|
230
|
+
SelectTrigger,
|
|
231
|
+
SelectValue,
|
|
232
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
|
|
5
|
+
function Separator({
|
|
6
|
+
className,
|
|
7
|
+
orientation = "horizontal",
|
|
8
|
+
...props
|
|
9
|
+
}: SeparatorPrimitive.Props) {
|
|
10
|
+
return (
|
|
11
|
+
<SeparatorPrimitive
|
|
12
|
+
data-slot="separator"
|
|
13
|
+
orientation={orientation}
|
|
14
|
+
className={cn(
|
|
15
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Separator }
|