@allbluecn/web-app 0.9.2 → 0.9.3
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 +32 -34
- package/src/__tests__/components/reference-inline.test.tsx +1 -1
- package/src/components/agents/agents-page.tsx +1 -1
- package/src/components/animated-icons/layout-panel-top.tsx +1 -1
- package/src/components/auth/auth-layout.tsx +1 -1
- package/src/components/knowledge/dialog/knowledge-form-dialog.tsx +1 -1
- package/src/components/knowledge/editor/doc-header.tsx +1 -1
- package/src/components/knowledge-public/sharers-avatar-group.tsx +1 -1
- package/src/components/layout/sidebar-03/__tests__/nav-workspace.test.tsx +1 -1
- package/src/components/layout/sidebar-03/app-sidebar.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-workspace.tsx +1 -1
- package/src/components/layout/sidebar-03/user-menu.tsx +1 -1
- package/src/components/magicui/animated-theme-toggler.tsx +1 -1
- package/src/components/magicui/grid-pattern.tsx +1 -1
- package/src/components/project/create-project-dialog.tsx +1 -1
- package/src/components/project/invite-member-dialog.tsx +1 -1
- package/src/components/project/project-activity-list.tsx +1 -1
- package/src/components/project/project-member-manager.tsx +1 -1
- package/src/components/settings/personal-team/account/avatar/notion-avatar.tsx +2 -2
- package/src/components/settings/personal-team/team/team-member-list.tsx +1 -1
- package/src/components/shadcn-space/blocks/hero-01/header.tsx +1 -1
- package/src/components/{ui-shared → shared-kit/auth}/auth-layout.tsx +1 -1
- package/src/components/{ui-shared → shared-kit/decorative}/grid-pattern.tsx +1 -1
- package/src/components/{ui-shared → shared-kit/dialogs}/name-confirm-dialog.tsx +6 -5
- package/src/components/{shared → shared-kit/icons}/__tests__/lucide-curated-icons.test.ts +2 -2
- package/src/components/{shared → shared-kit/icons}/__tests__/lucide-icon-data.test.ts +1 -1
- package/src/components/{shared → shared-kit/icons}/__tests__/lucide-icon-picker.test.tsx +5 -5
- package/src/components/{ui-shared → shared-kit}/index.ts +9 -6
- package/src/components/{ui-shared → shared-kit/layout}/layout-panel-top.tsx +1 -1
- package/src/components/{ui-shared → shared-kit/navigation}/nav-float-button.tsx +2 -2
- package/src/components/{ui-shared → shared-kit/theme}/animated-theme-toggler.tsx +1 -1
- package/src/components/story/columns.tsx +1 -1
- package/src/components/story/create-story-dialog.tsx +2 -2
- package/src/components/story/detail/__tests__/activity-timeline.test.tsx +1 -1
- package/src/components/story/detail/activity-timeline.tsx +2 -2
- package/src/components/story/detail/comment-item.tsx +1 -1
- package/src/components/story/detail/story-detail-body.tsx +2 -2
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +1 -1
- package/src/components/story/display/group-resolver.tsx +2 -2
- package/src/components/story/filters/applied-filters.tsx +1 -1
- package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/story/inline-editors/story-select-dialog.tsx +1 -1
- package/src/components/story/relations/story-ref-row.tsx +2 -2
- package/src/components/story/story-panel-header.tsx +1 -1
- package/src/components/story/story-toolbar.tsx +1 -1
- package/src/components/story/transfer-story-popover.tsx +1 -1
- package/src/components/story/views/create-view-dialog.tsx +1 -1
- package/src/components/story/views/kanban-card.tsx +1 -1
- package/src/components/story/views/story-list/index.tsx +1 -1
- package/src/components/story/views/story-list/inline-story-creator.tsx +1 -1
- package/src/components/tiptap/mindmap/mind-map.tsx +2 -2
- package/src/components/tiptap/mindmap/mindmap-fullscreen-dialog.tsx +1 -1
- package/src/components/tiptap/node/annotation-node/annotation-node-view.tsx +1 -1
- package/src/components/tiptap/node/doc-card-extension.tsx +2 -2
- package/src/components/tiptap/notion-like/notion-like-editor-header.tsx +2 -2
- package/src/components/tiptap/ui/doc-reference-interaction/doc-reference-interaction.tsx +2 -2
- package/src/components/tiptap/ui/mention-dropdown-menu/mention-dropdown-menu.tsx +2 -2
- package/src/components/tiptap/ui/reference-dropdown-menu/reference-dropdown-menu.tsx +1 -1
- package/src/components/tiptap/ui/slash-dropdown-menu/slash-dropdown-menu.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +216 -1
- package/src/components/ui/badge.tsx +66 -1
- package/src/components/ui/button.tsx +84 -1
- package/src/components/ui/card.tsx +120 -1
- package/src/components/ui/checkbox.tsx +50 -1
- package/src/components/ui/context-menu.tsx +280 -1
- package/src/components/ui/dialog.tsx +183 -1
- package/src/components/ui/dropdown-menu.tsx +286 -1
- package/src/components/ui/empty.tsx +121 -1
- package/src/components/ui/input.tsx +36 -1
- package/src/components/ui/label.tsx +39 -1
- package/src/components/ui/popover.tsx +106 -1
- package/src/components/ui/resizable.tsx +67 -1
- package/src/components/ui/select.tsx +207 -1
- package/src/components/ui/sidebar.tsx +708 -1
- package/src/components/ui/skeleton.tsx +30 -1
- package/src/components/ui/sonner.tsx +37 -1
- package/src/components/ui/switch.tsx +48 -1
- package/src/components/ui/textarea.tsx +35 -1
- package/src/components/ui/tooltip.tsx +72 -1
- package/src/components/workspace/create-workspace-dialog.tsx +1 -1
- package/src/lib/auth/auth-client.ts +1 -1
- package/src/lib/changelog/sdk-versions.ts +16 -2
- package/src/lib/utils.ts +6 -1
- package/src/plugins/core/inspiration/pages/inspiration-page.tsx +1 -1
- package/src/plugins/core/inspiration/ui.tsx +1 -1
- package/src/plugins/core/prd/components/agent-input.tsx +3 -3
- package/src/plugins/core/prd/components/component-editor/collapsible-section.tsx +1 -1
- package/src/plugins/core/prd/components/component-editor/content-section.tsx +3 -3
- package/src/plugins/core/prd/components/component-editor/style-fields.tsx +3 -3
- package/src/plugins/core/prd/components/component-thumbnail.tsx +1 -1
- package/src/plugins/core/prd/components/dialog/create-prd-dialog.tsx +3 -3
- package/src/plugins/core/prd/components/dialog/prd-detail-client.tsx +4 -4
- package/src/plugins/core/prd/components/page-version-panel/components/create-version-dialog.tsx +2 -2
- package/src/plugins/core/prd/components/page-version-panel/components/delete-version-dialog.tsx +2 -2
- package/src/plugins/core/prd/components/page-version-panel/components/edit-version-dialog.tsx +2 -2
- package/src/plugins/core/prd/components/page-version-panel.tsx +9 -9
- package/src/plugins/core/prd/components/page-version-tree.tsx +5 -5
- package/src/plugins/core/prd/components/prd-agent-panel.tsx +3 -3
- package/src/plugins/core/prd/components/prd-comment-review-panel.tsx +7 -7
- package/src/plugins/core/prd/components/prd-component-editor-content.tsx +2 -2
- package/src/plugins/core/prd/components/prd-dashboard.tsx +8 -8
- package/src/plugins/core/prd/components/prd-doc-panel.tsx +2 -2
- package/src/plugins/core/prd/components/prd-editor-layout.tsx +4 -4
- package/src/plugins/core/prd/components/prd-filter-bar.tsx +1 -1
- package/src/plugins/core/prd/components/prd-left-sidebar.tsx +4 -4
- package/src/plugins/core/prd/components/prd-navigation.tsx +6 -6
- package/src/plugins/core/prd/components/prd-prototype-panel.tsx +2 -2
- package/src/plugins/core/prd/components/prd-right-sidebar.tsx +3 -3
- package/src/plugins/core/prd/components/prd-share-panel/components/single-version-share-card.tsx +7 -7
- package/src/plugins/core/prd/components/prd-share-panel.tsx +10 -10
- package/src/plugins/core/prd/components/prd-tree-page-tab.tsx +5 -5
- package/src/plugins/core/prd/components/prototype/PrototypeCanvas.tsx +2 -2
- package/src/plugins/core/prd/components/restore-version-dialog.tsx +2 -2
- package/src/plugins/core/prd/components/share/prd-share-client.tsx +1 -1
- package/src/plugins/core/prd/components/share/share-comment-panel.tsx +6 -6
- package/src/plugins/core/prd/components/share/share-comment-review-panel.tsx +2 -2
- package/src/plugins/core/prd/components/share/share-layout.tsx +1 -1
- package/src/plugins/core/prd/components/share/share-nav-bar.tsx +4 -4
- package/src/plugins/core/prd/components/share/share-password-gate.tsx +4 -4
- package/src/plugins/core/prd/components/share/share-prototype-view.tsx +1 -1
- package/src/plugins/core/prd/components/share/share-review-panel.tsx +5 -5
- package/src/plugins/core/prd/components/share/share-theme-toggle.tsx +1 -1
- package/src/plugins/core/prd/components/share/version-share-client.tsx +1 -1
- package/src/plugins/core/prd/pages/prd-detail-page.tsx +2 -2
- package/src/plugins/core/prd/pages/share-prd-page.tsx +1 -1
- package/src/plugins/core/prd/prd-nav.tsx +1 -1
- package/src/plugins/core/tags/nav-tag.tsx +7 -7
- package/src/plugins/core/tags/pages/tag-detail-page.tsx +1 -1
- package/src/plugins/core/tags/tag-badge.tsx +2 -2
- package/src/plugins/core/tags/tag-color-picker.tsx +1 -1
- package/src/plugins/core/tags/tag-manager.tsx +6 -6
- package/src/plugins/core/tags/tag-selector.tsx +3 -3
- package/src/providers/index.tsx +1 -1
- package/src/providers/timezone-provider.tsx +1 -1
- package/src/routes/_nav/acceptance-criteria/route.tsx +1 -1
- package/src/routes/_nav/apps/anyhub/$id/route.tsx +1 -1
- package/src/routes/_nav/apps/anyhub/route.tsx +1 -1
- package/src/routes/_nav/bugs/route.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/avatar-group.tsx +1 -1
- package/src/routes/_nav/dashboard/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/index.lazy.tsx +1 -1
- package/src/routes/_nav/notion-like/route.tsx +1 -1
- package/src/routes/_nav/pricing-02/route.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/$storyId/route.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/index.lazy.tsx +3 -3
- package/src/routes/_nav/projects/$projectId/iterations/index.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/settings/route.lazy.tsx +3 -3
- package/src/routes/_nav/route.lazy.tsx +1 -1
- package/src/routes/_nav/settings/general/route.lazy.tsx +1 -1
- package/src/routes/_nav/test-cases/route.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/route.lazy.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.lazy.tsx +2 -2
- package/src/routes/_nav/workspaces/index.lazy.tsx +1 -1
- package/src/routes/invite/$token/route.lazy.tsx +1 -1
- package/src/server/__tests__/agent-client-graph.test.ts +1 -1
- package/src/components/shared/name-confirm-dialog.tsx +0 -1
- package/src/components/shared/nav-float-button.tsx +0 -1
- package/src/components/shared/placeholder-page.tsx +0 -1
- package/src/components/ui-shared/alert-dialog.tsx +0 -216
- package/src/components/ui-shared/avatar.tsx +0 -129
- package/src/components/ui-shared/badge.tsx +0 -66
- package/src/components/ui-shared/button.tsx +0 -84
- package/src/components/ui-shared/card.tsx +0 -120
- package/src/components/ui-shared/checkbox.tsx +0 -50
- package/src/components/ui-shared/context-menu.tsx +0 -280
- package/src/components/ui-shared/dialog.tsx +0 -183
- package/src/components/ui-shared/dropdown-menu.tsx +0 -286
- package/src/components/ui-shared/empty.tsx +0 -121
- package/src/components/ui-shared/input.tsx +0 -36
- package/src/components/ui-shared/item.tsx +0 -213
- package/src/components/ui-shared/kbd.tsx +0 -33
- package/src/components/ui-shared/label.tsx +0 -39
- package/src/components/ui-shared/popover.tsx +0 -106
- package/src/components/ui-shared/resizable.tsx +0 -67
- package/src/components/ui-shared/select.tsx +0 -207
- package/src/components/ui-shared/separator.tsx +0 -45
- package/src/components/ui-shared/sheet.tsx +0 -164
- package/src/components/ui-shared/sidebar.tsx +0 -708
- package/src/components/ui-shared/skeleton.tsx +0 -30
- package/src/components/ui-shared/sonner.tsx +0 -37
- package/src/components/ui-shared/switch.tsx +0 -48
- package/src/components/ui-shared/textarea.tsx +0 -35
- package/src/components/ui-shared/tooltip.tsx +0 -72
- package/src/components/ui-shared/utils.ts +0 -6
- package/src/lib/utils.d.ts +0 -1
- package/src/plugins/.gen-manifest.json +0 -13
- package/src/plugins/modules.gen.ts +0 -20
- package/src/plugins/plugins.gen.ts +0 -20
- package/src/plugins/ui.gen.ts +0 -8
- package/src/routes/_nav/inspiration/route.tsx +0 -8
- package/src/routes/_nav/prd/$id/route.tsx +0 -9
- package/src/routes/_nav/prd/index.tsx +0 -9
- package/src/routes/_nav/prd/route.tsx +0 -8
- package/src/routes/_nav/tags/$id/route.tsx +0 -8
- package/src/routes/_nav/tags/index.tsx +0 -8
- package/src/routes/_nav/tags/route.tsx +0 -8
- package/src/routes/_nav/tags/settings/route.tsx +0 -9
- package/src/routes/share/prd/$prdId/route.tsx +0 -10
- package/src/types/open-file-viewer.d.ts +0 -14
- /package/src/components/{ui-shared → shared-kit/ai}/ai-command-button.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/ai}/ai-stream-text.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/auth}/auth-client.ts +0 -0
- /package/src/components/{ui-shared → shared-kit/avatars}/notion-avatar.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/avatars}/user-avatar.tsx +0 -0
- /package/src/components/{shared → shared-kit/data-viz}/contribution-graph-tooltip.tsx +0 -0
- /package/src/components/{shared → shared-kit/dev}/component-preview.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/hooks}/use-mobile.ts +0 -0
- /package/src/components/{shared → shared-kit/i18n}/language-switcher.tsx +0 -0
- /package/src/components/{shared → shared-kit/i18n}/translator-text.tsx +0 -0
- /package/src/components/{shared → shared-kit/icons}/lucide-icon-picker/curated-icons.ts +0 -0
- /package/src/components/{shared → shared-kit/icons}/lucide-icon-picker/icon-data.ts +0 -0
- /package/src/components/{shared → shared-kit/icons}/lucide-icon-picker/index.tsx +0 -0
- /package/src/components/{shared → shared-kit/icons}/lucide-icon-picker/lucide-icon-by-name.tsx +0 -0
- /package/src/components/{shared → shared-kit/icons}/lucide-icon-picker/panel.tsx +0 -0
- /package/src/components/{shared → shared-kit/loading}/wave-physics-loader.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/pages}/placeholder-page.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/reference}/reference-inline.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/reference}/reference-search.tsx +0 -0
- /package/src/components/{shared → shared-kit/theme}/theme-toggle.tsx +0 -0
- /package/src/components/{shared → shared-kit/timezone}/timezone-bootstrap.tsx +0 -0
- /package/src/components/{ui-shared → shared-kit/timezone}/timezone-provider.tsx +0 -0
- /package/src/components/{shared → shared-kit/timezone}/timezone-select.tsx +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { Outlet, createFileRoute, useMatches } from '@tanstack/react-router'
|
|
19
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
19
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
20
20
|
import { Package } from 'lucide-react'
|
|
21
21
|
|
|
22
22
|
export const Route = createFileRoute('/_nav/apps/anyhub')({
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { createFileRoute } from '@tanstack/react-router'
|
|
19
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
19
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
20
20
|
import { Bug } from 'lucide-react'
|
|
21
21
|
|
|
22
22
|
export const Route = createFileRoute('/_nav/bugs')({
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
import { UserAvatar } from '@/components/
|
|
18
|
+
import { UserAvatar } from '@/components/shared-kit'
|
|
19
19
|
import type { AvatarConfig, ShapeType } from '@allbluecn/kernel'
|
|
20
20
|
|
|
21
21
|
interface TeamMember {
|
|
@@ -27,7 +27,7 @@ import LiquidEther from '@/components/react-bits/liquid-ether'
|
|
|
27
27
|
import { LightRays as MagicuiLightRays } from '@/components/magicui/light-rays'
|
|
28
28
|
import WebglLightRays from '@/components/react-bits/light-rays'
|
|
29
29
|
import { AiChatPrompt } from '@/components/ai/ai-chat-prompt'
|
|
30
|
-
import { ContributionGraphWithTooltip } from '@/components/shared/contribution-graph-tooltip'
|
|
30
|
+
import { ContributionGraphWithTooltip } from '@/components/shared-kit/data-viz/contribution-graph-tooltip'
|
|
31
31
|
import { PluginWidgets } from '@/components/plugin-slots/plugin-widgets'
|
|
32
32
|
|
|
33
33
|
export const Route = createLazyFileRoute('/_nav/dashboard')({
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { createLazyFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { useTranslation } from 'react-i18next'
|
|
20
20
|
import { FileText, Table } from 'lucide-react'
|
|
21
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
21
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
22
22
|
import { KnowledgeDocEditor, DOC_EDITOR_WIDTH_VARS } from '@/components/knowledge/editor/knowledge-doc-editor'
|
|
23
23
|
import { EDITOR_WIDTH_MAX_WIDTH, useEditorWidth } from '@/components/knowledge/editor/editor-width-context'
|
|
24
24
|
|
|
@@ -23,7 +23,7 @@ import { Button } from '@/components/ui/button'
|
|
|
23
23
|
import { Card } from '@/components/ui/card'
|
|
24
24
|
import { AnimatedGridPattern } from '@/components/magicui/animated-grid-pattern'
|
|
25
25
|
import { BookOpenTextIcon } from '@/components/animated-icons/book-open-text'
|
|
26
|
-
import { LucideIconByName } from '@/components/shared/lucide-icon-picker/lucide-icon-by-name'
|
|
26
|
+
import { LucideIconByName } from '@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name'
|
|
27
27
|
import { KnowledgeFormDialog } from '@/components/knowledge/dialog/knowledge-form-dialog'
|
|
28
28
|
|
|
29
29
|
type KnowledgeList = ReturnType<typeof import('@/server/serverFns/knowledge')['listKnowledgeFn']> extends Promise<infer T> ? T : never
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { createFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { useTranslation } from 'react-i18next'
|
|
20
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
20
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
21
21
|
import { FileText } from 'lucide-react'
|
|
22
22
|
|
|
23
23
|
function NotionLikePage() {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { createFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { useTranslation } from 'react-i18next'
|
|
20
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
20
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
21
21
|
import { CreditCard } from 'lucide-react'
|
|
22
22
|
|
|
23
23
|
function PricingPage() {
|
|
@@ -20,7 +20,7 @@ import { useTranslation } from "react-i18next";
|
|
|
20
20
|
import { ArrowLeft, ChevronRight } from "lucide-react";
|
|
21
21
|
import { Button } from "@/components/ui/button";
|
|
22
22
|
import { Badge } from "@/components/ui/badge";
|
|
23
|
-
import { LucideIconByName } from "@/components/shared/lucide-icon-picker/lucide-icon-by-name";
|
|
23
|
+
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
24
24
|
import { PROJECT_MODULE_META } from "@/lib/project-module-meta";
|
|
25
25
|
import type { ProjectModuleItem } from "@/types/project";
|
|
26
26
|
|
|
@@ -19,12 +19,12 @@ import { createLazyFileRoute, Link, useLoaderData } from "@tanstack/react-router
|
|
|
19
19
|
import { useTranslation } from "react-i18next";
|
|
20
20
|
import { Settings, LayoutGrid, Activity as ActivityIcon, CalendarRange } from "lucide-react";
|
|
21
21
|
import { useTheme } from "next-themes";
|
|
22
|
-
import { UserAvatar } from "@/components/
|
|
22
|
+
import { UserAvatar } from "@/components/shared-kit";
|
|
23
23
|
import type { AvatarConfig, ShapeType } from "@allbluecn/kernel";
|
|
24
24
|
import { Button } from "@/components/ui/button";
|
|
25
25
|
import { AvatarGroup } from "@/components/magicui/components/animate/avatar-group";
|
|
26
26
|
import { GlyphMatrix } from "@/components/magicui/glyph-matrix";
|
|
27
|
-
import { LucideIconByName } from "@/components/shared/lucide-icon-picker/lucide-icon-by-name";
|
|
27
|
+
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
28
28
|
import { ProjectModuleCard } from "@/components/project/project-module-card";
|
|
29
29
|
import { ProjectActivityList } from "@/components/project/project-activity-list";
|
|
30
30
|
import { PROJECT_MODULE_META, PROJECT_MODULE_KEYS } from "@/lib/project-module-meta";
|
|
@@ -32,7 +32,7 @@ import { useMemo } from "react";
|
|
|
32
32
|
import { formatInTimeZone } from "date-fns-tz";
|
|
33
33
|
import { subDays } from "date-fns";
|
|
34
34
|
import { useTimezone } from "@/providers/timezone-provider";
|
|
35
|
-
import { ContributionGraphWithTooltip } from "@/components/shared/contribution-graph-tooltip";
|
|
35
|
+
import { ContributionGraphWithTooltip } from "@/components/shared-kit/data-viz/contribution-graph-tooltip";
|
|
36
36
|
import type { Activity } from "@/components/kibo-ui/contribution-graph";
|
|
37
37
|
|
|
38
38
|
// 将项目活动按日聚合成贡献度数据(最近 12 周,level 按单日最高值相对映射 0-4)
|
|
@@ -20,7 +20,7 @@ import { createLazyFileRoute, Link, useLoaderData, useRouter } from "@tanstack/r
|
|
|
20
20
|
import { useTranslation } from "react-i18next";
|
|
21
21
|
import { CalendarRange, Plus, Settings } from "lucide-react";
|
|
22
22
|
import { Button } from "@/components/ui/button";
|
|
23
|
-
import { PlaceholderPage } from "@/components/shared/placeholder-page";
|
|
23
|
+
import { PlaceholderPage } from "@/components/shared-kit/pages/placeholder-page";
|
|
24
24
|
import { IterationCard } from "@/components/iteration/iteration-card";
|
|
25
25
|
import { CreateIterationDialog } from "@/components/iteration/create-iteration-dialog";
|
|
26
26
|
import { AutoScheduleDialog } from "@/components/iteration/auto-schedule-dialog";
|
|
@@ -28,14 +28,14 @@ import { Label } from "@/components/ui/label";
|
|
|
28
28
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
29
29
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
30
30
|
import { Badge } from "@/components/ui/badge";
|
|
31
|
-
import { LucideIconPicker } from "@/components/shared/lucide-icon-picker";
|
|
31
|
+
import { LucideIconPicker } from "@/components/shared-kit/icons/lucide-icon-picker";
|
|
32
32
|
|
|
33
|
-
import { NameConfirmDialog } from "@/components/shared/name-confirm-dialog";
|
|
33
|
+
import { NameConfirmDialog } from "@/components/shared-kit/dialogs/name-confirm-dialog";
|
|
34
34
|
import { ProjectMemberManager } from "@/components/project/project-member-manager";
|
|
35
35
|
import { extractDisplayId, validateDisplayId } from "@/lib/project-display-id";
|
|
36
36
|
import { checkDisplayIdAvailableFn, updateProjectFn, deleteProjectFn, setProjectKbsFn } from "@/server/serverFns/project";
|
|
37
37
|
import { useTimezone } from "@/providers/timezone-provider";
|
|
38
|
-
import { TimezoneSelect } from "@/components/shared/timezone-select";
|
|
38
|
+
import { TimezoneSelect } from "@/components/shared-kit/timezone/timezone-select";
|
|
39
39
|
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
|
40
40
|
|
|
41
41
|
function ProjectSettingsPage() {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { createLazyFileRoute, Outlet } from '@tanstack/react-router'
|
|
19
19
|
import Sidebar03 from '@/components/layout/sidebar-03'
|
|
20
20
|
import { GlobalChatPanel } from '@/components/ai/global-chat-panel'
|
|
21
|
-
import { TimezoneBootstrap } from '@/components/shared/timezone-bootstrap'
|
|
21
|
+
import { TimezoneBootstrap } from '@/components/shared-kit/timezone/timezone-bootstrap'
|
|
22
22
|
import { SubscriptionProvider } from '@/components/billing/subscription-provider'
|
|
23
23
|
import { CommandPalette } from '@/components/command/command-palette'
|
|
24
24
|
import type { Session } from '@/lib/auth/auth-client'
|
|
@@ -22,7 +22,7 @@ import { Globe, Languages, Loader2 } from 'lucide-react'
|
|
|
22
22
|
import { toast } from '@/components/ui/sonner'
|
|
23
23
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
|
24
24
|
import { Button } from '@/components/ui/button'
|
|
25
|
-
import { TimezoneSelect } from '@/components/shared/timezone-select'
|
|
25
|
+
import { TimezoneSelect } from '@/components/shared-kit/timezone/timezone-select'
|
|
26
26
|
import { updateUserTimezoneFn } from '@/server/serverFns/user/settings'
|
|
27
27
|
import { LanguageSelector } from '@/components/settings/language-selector'
|
|
28
28
|
import type { Session } from '@/lib/auth/auth-client'
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { createFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { useTranslation } from 'react-i18next'
|
|
20
|
-
import { PlaceholderPage } from '@/components/shared/placeholder-page'
|
|
20
|
+
import { PlaceholderPage } from '@/components/shared-kit/pages/placeholder-page'
|
|
21
21
|
import { FlaskConical } from 'lucide-react'
|
|
22
22
|
|
|
23
23
|
function TestCasesPage() {
|
|
@@ -23,7 +23,7 @@ import { useTranslation } from "react-i18next";
|
|
|
23
23
|
import { Button } from "@/components/ui/button";
|
|
24
24
|
import { Card } from "@/components/ui/card";
|
|
25
25
|
import { GlyphMatrix } from "@/components/magicui/glyph-matrix";
|
|
26
|
-
import { LucideIconByName } from "@/components/shared/lucide-icon-picker/lucide-icon-by-name";
|
|
26
|
+
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
27
27
|
import { CreateProjectDialog } from "@/components/project/create-project-dialog";
|
|
28
28
|
|
|
29
29
|
type DetailData = ReturnType<typeof import("@/server/serverFns/workspace")["getWorkspaceDetailFn"]> extends Promise<infer T>
|
|
@@ -26,9 +26,9 @@ import { Input } from "@/components/ui/input";
|
|
|
26
26
|
import { Textarea } from "@/components/ui/textarea";
|
|
27
27
|
import { Label } from "@/components/ui/label";
|
|
28
28
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
29
|
-
import { LucideIconPicker } from "@/components/shared/lucide-icon-picker";
|
|
29
|
+
import { LucideIconPicker } from "@/components/shared-kit/icons/lucide-icon-picker";
|
|
30
30
|
|
|
31
|
-
import { NameConfirmDialog } from "@/components/shared/name-confirm-dialog";
|
|
31
|
+
import { NameConfirmDialog } from "@/components/shared-kit/dialogs/name-confirm-dialog";
|
|
32
32
|
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
|
33
33
|
import {
|
|
34
34
|
updateWorkspaceFn,
|
|
@@ -23,7 +23,7 @@ import { useTranslation } from "react-i18next";
|
|
|
23
23
|
import { Button } from "@/components/ui/button";
|
|
24
24
|
import { Card } from "@/components/ui/card";
|
|
25
25
|
import { GlyphMatrix } from "@/components/magicui/glyph-matrix";
|
|
26
|
-
import { LucideIconByName } from "@/components/shared/lucide-icon-picker/lucide-icon-by-name";
|
|
26
|
+
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
27
27
|
import { CreateWorkspaceDialog } from "@/components/workspace/create-workspace-dialog";
|
|
28
28
|
|
|
29
29
|
type WorkspaceList = ReturnType<typeof import("@/server/serverFns/workspace")["listWorkspacesFn"]> extends Promise<infer T> ? T : never;
|
|
@@ -21,7 +21,7 @@ import { useMutation } from '@tanstack/react-query'
|
|
|
21
21
|
import { useTranslation } from 'react-i18next'
|
|
22
22
|
import { toast } from '@/components/ui/sonner'
|
|
23
23
|
import { RainbowButton } from '@/components/magicui/rainbow-button'
|
|
24
|
-
import { UserAvatar } from '@/components/
|
|
24
|
+
import { UserAvatar } from '@/components/shared-kit'
|
|
25
25
|
import { AuthLayout, AuthLayoutLeft, AuthLayoutRight } from '@/components/auth/auth-layout'
|
|
26
26
|
import { AuthBrandPanel } from '@/components/auth/auth-brand-panel'
|
|
27
27
|
import { IconInput } from '@/components/auth/icon-input'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@/components/ui-shared/name-confirm-dialog'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@/components/ui-shared/nav-float-button'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@/components/ui-shared/placeholder-page'
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
"use client"
|
|
19
|
-
|
|
20
|
-
import * as React from "react"
|
|
21
|
-
import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
|
|
22
|
-
|
|
23
|
-
import { cn } from "./utils"
|
|
24
|
-
import { Button } from "./button"
|
|
25
|
-
|
|
26
|
-
function AlertDialog({
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
29
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function AlertDialogTrigger({
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
35
|
-
return (
|
|
36
|
-
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function AlertDialogPortal({
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
43
|
-
return (
|
|
44
|
-
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function AlertDialogOverlay({
|
|
49
|
-
className,
|
|
50
|
-
...props
|
|
51
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
52
|
-
return (
|
|
53
|
-
<AlertDialogPrimitive.Overlay
|
|
54
|
-
data-slot="alert-dialog-overlay"
|
|
55
|
-
className={cn(
|
|
56
|
-
"fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function AlertDialogContent({
|
|
65
|
-
className,
|
|
66
|
-
size = "default",
|
|
67
|
-
...props
|
|
68
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
69
|
-
size?: "default" | "sm"
|
|
70
|
-
}) {
|
|
71
|
-
return (
|
|
72
|
-
<AlertDialogPortal>
|
|
73
|
-
<AlertDialogOverlay />
|
|
74
|
-
<AlertDialogPrimitive.Content
|
|
75
|
-
data-slot="alert-dialog-content"
|
|
76
|
-
data-size={size}
|
|
77
|
-
className={cn(
|
|
78
|
-
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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",
|
|
79
|
-
className
|
|
80
|
-
)}
|
|
81
|
-
{...props}
|
|
82
|
-
/>
|
|
83
|
-
</AlertDialogPortal>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function AlertDialogHeader({
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}: React.ComponentProps<"div">) {
|
|
91
|
-
return (
|
|
92
|
-
<div
|
|
93
|
-
data-slot="alert-dialog-header"
|
|
94
|
-
className={cn(
|
|
95
|
-
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
96
|
-
className
|
|
97
|
-
)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function AlertDialogFooter({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: React.ComponentProps<"div">) {
|
|
107
|
-
return (
|
|
108
|
-
<div
|
|
109
|
-
data-slot="alert-dialog-footer"
|
|
110
|
-
className={cn(
|
|
111
|
-
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
112
|
-
className
|
|
113
|
-
)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function AlertDialogMedia({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: React.ComponentProps<"div">) {
|
|
123
|
-
return (
|
|
124
|
-
<div
|
|
125
|
-
data-slot="alert-dialog-media"
|
|
126
|
-
className={cn(
|
|
127
|
-
"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
128
|
-
className
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function AlertDialogTitle({
|
|
136
|
-
className,
|
|
137
|
-
...props
|
|
138
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
139
|
-
return (
|
|
140
|
-
<AlertDialogPrimitive.Title
|
|
141
|
-
data-slot="alert-dialog-title"
|
|
142
|
-
className={cn(
|
|
143
|
-
"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
144
|
-
className
|
|
145
|
-
)}
|
|
146
|
-
{...props}
|
|
147
|
-
/>
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function AlertDialogDescription({
|
|
152
|
-
className,
|
|
153
|
-
...props
|
|
154
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
155
|
-
return (
|
|
156
|
-
<AlertDialogPrimitive.Description
|
|
157
|
-
data-slot="alert-dialog-description"
|
|
158
|
-
className={cn(
|
|
159
|
-
"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
160
|
-
className
|
|
161
|
-
)}
|
|
162
|
-
{...props}
|
|
163
|
-
/>
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function AlertDialogAction({
|
|
168
|
-
className,
|
|
169
|
-
variant = "default",
|
|
170
|
-
size = "default",
|
|
171
|
-
...props
|
|
172
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
|
|
173
|
-
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
174
|
-
return (
|
|
175
|
-
<Button variant={variant} size={size} asChild>
|
|
176
|
-
<AlertDialogPrimitive.Action
|
|
177
|
-
data-slot="alert-dialog-action"
|
|
178
|
-
className={cn(className)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
</Button>
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function AlertDialogCancel({
|
|
186
|
-
className,
|
|
187
|
-
variant = "outline",
|
|
188
|
-
size = "default",
|
|
189
|
-
...props
|
|
190
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
|
|
191
|
-
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
192
|
-
return (
|
|
193
|
-
<Button variant={variant} size={size} asChild>
|
|
194
|
-
<AlertDialogPrimitive.Cancel
|
|
195
|
-
data-slot="alert-dialog-cancel"
|
|
196
|
-
className={cn(className)}
|
|
197
|
-
{...props}
|
|
198
|
-
/>
|
|
199
|
-
</Button>
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export {
|
|
204
|
-
AlertDialog,
|
|
205
|
-
AlertDialogAction,
|
|
206
|
-
AlertDialogCancel,
|
|
207
|
-
AlertDialogContent,
|
|
208
|
-
AlertDialogDescription,
|
|
209
|
-
AlertDialogFooter,
|
|
210
|
-
AlertDialogHeader,
|
|
211
|
-
AlertDialogMedia,
|
|
212
|
-
AlertDialogOverlay,
|
|
213
|
-
AlertDialogPortal,
|
|
214
|
-
AlertDialogTitle,
|
|
215
|
-
AlertDialogTrigger,
|
|
216
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
"use client"
|
|
19
|
-
|
|
20
|
-
import * as React from "react"
|
|
21
|
-
import { Avatar as AvatarPrimitive } from "radix-ui"
|
|
22
|
-
|
|
23
|
-
import { cn } from "./utils"
|
|
24
|
-
|
|
25
|
-
function Avatar({
|
|
26
|
-
className,
|
|
27
|
-
size = "default",
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
30
|
-
size?: "default" | "sm" | "lg"
|
|
31
|
-
}) {
|
|
32
|
-
return (
|
|
33
|
-
<AvatarPrimitive.Root
|
|
34
|
-
data-slot="avatar"
|
|
35
|
-
data-size={size}
|
|
36
|
-
className={cn(
|
|
37
|
-
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
38
|
-
className
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function AvatarImage({
|
|
46
|
-
className,
|
|
47
|
-
...props
|
|
48
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
49
|
-
return (
|
|
50
|
-
<AvatarPrimitive.Image
|
|
51
|
-
data-slot="avatar-image"
|
|
52
|
-
className={cn(
|
|
53
|
-
"aspect-square size-full rounded-full object-cover",
|
|
54
|
-
className
|
|
55
|
-
)}
|
|
56
|
-
{...props}
|
|
57
|
-
/>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function AvatarFallback({
|
|
62
|
-
className,
|
|
63
|
-
...props
|
|
64
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
65
|
-
return (
|
|
66
|
-
<AvatarPrimitive.Fallback
|
|
67
|
-
data-slot="avatar-fallback"
|
|
68
|
-
className={cn(
|
|
69
|
-
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
70
|
-
className
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
|
|
78
|
-
return (
|
|
79
|
-
<span
|
|
80
|
-
data-slot="avatar-badge"
|
|
81
|
-
className={cn(
|
|
82
|
-
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
83
|
-
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
84
|
-
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
85
|
-
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
86
|
-
className
|
|
87
|
-
)}
|
|
88
|
-
{...props}
|
|
89
|
-
/>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
94
|
-
return (
|
|
95
|
-
<div
|
|
96
|
-
data-slot="avatar-group"
|
|
97
|
-
className={cn(
|
|
98
|
-
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
99
|
-
className
|
|
100
|
-
)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function AvatarGroupCount({
|
|
107
|
-
className,
|
|
108
|
-
...props
|
|
109
|
-
}: React.ComponentProps<"div">) {
|
|
110
|
-
return (
|
|
111
|
-
<div
|
|
112
|
-
data-slot="avatar-group-count"
|
|
113
|
-
className={cn(
|
|
114
|
-
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
115
|
-
className
|
|
116
|
-
)}
|
|
117
|
-
{...props}
|
|
118
|
-
/>
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export {
|
|
123
|
-
Avatar,
|
|
124
|
-
AvatarImage,
|
|
125
|
-
AvatarFallback,
|
|
126
|
-
AvatarGroup,
|
|
127
|
-
AvatarGroupCount,
|
|
128
|
-
AvatarBadge,
|
|
129
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
import * as React from "react"
|
|
19
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
20
|
-
import { Slot } from "radix-ui"
|
|
21
|
-
|
|
22
|
-
import { cn } from "./utils"
|
|
23
|
-
|
|
24
|
-
const badgeVariants = cva(
|
|
25
|
-
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
26
|
-
{
|
|
27
|
-
variants: {
|
|
28
|
-
variant: {
|
|
29
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
30
|
-
secondary:
|
|
31
|
-
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
32
|
-
destructive:
|
|
33
|
-
"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
34
|
-
outline:
|
|
35
|
-
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
36
|
-
ghost:
|
|
37
|
-
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
38
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
variant: "default",
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
function Badge({
|
|
48
|
-
className,
|
|
49
|
-
variant = "default",
|
|
50
|
-
asChild = false,
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<"span"> &
|
|
53
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
54
|
-
const Comp = asChild ? Slot.Root : "span"
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Comp
|
|
58
|
-
data-slot="badge"
|
|
59
|
-
data-variant={variant}
|
|
60
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { Badge, badgeVariants }
|