@allbluecn/web-app 0.9.1 → 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 -35
- 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/devtools/ai-chat-panel.tsx +54 -0
- package/src/components/devtools/devtools-panel.tsx +100 -0
- package/src/components/{ui-shared/skeleton.tsx → devtools/index.ts} +3 -13
- package/src/components/devtools/session-panel.tsx +102 -0
- 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 +10 -3
- package/src/lib/perf.ts +1 -1
- 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/__root.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/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
|
@@ -1 +1,286 @@
|
|
|
1
|
-
|
|
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 { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
22
|
+
|
|
23
|
+
import { cn } from "@/lib/utils"
|
|
24
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
|
25
|
+
|
|
26
|
+
function DropdownMenu({
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
29
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function DropdownMenuPortal({
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
35
|
+
return (
|
|
36
|
+
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function DropdownMenuTrigger({
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
43
|
+
return (
|
|
44
|
+
<DropdownMenuPrimitive.Trigger
|
|
45
|
+
data-slot="dropdown-menu-trigger"
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function DropdownMenuContent({
|
|
52
|
+
className,
|
|
53
|
+
align = "start",
|
|
54
|
+
sideOffset = 4,
|
|
55
|
+
...props
|
|
56
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
57
|
+
return (
|
|
58
|
+
<DropdownMenuPrimitive.Portal>
|
|
59
|
+
<DropdownMenuPrimitive.Content
|
|
60
|
+
data-slot="dropdown-menu-content"
|
|
61
|
+
sideOffset={sideOffset}
|
|
62
|
+
align={align}
|
|
63
|
+
className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 dark:border dark:border-border dark:ring-0 duration-100 data-[side=bottom]:slide-in-from-top-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-[state=closed]:overflow-hidden 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 )}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
</DropdownMenuPrimitive.Portal>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function DropdownMenuGroup({
|
|
71
|
+
...props
|
|
72
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
73
|
+
return (
|
|
74
|
+
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function DropdownMenuItem({
|
|
79
|
+
className,
|
|
80
|
+
inset,
|
|
81
|
+
variant = "default",
|
|
82
|
+
...props
|
|
83
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
84
|
+
inset?: boolean
|
|
85
|
+
variant?: "default" | "destructive"
|
|
86
|
+
}) {
|
|
87
|
+
return (
|
|
88
|
+
<DropdownMenuPrimitive.Item
|
|
89
|
+
data-slot="dropdown-menu-item"
|
|
90
|
+
data-inset={inset}
|
|
91
|
+
data-variant={variant}
|
|
92
|
+
className={cn(
|
|
93
|
+
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:*:[svg]:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
94
|
+
className
|
|
95
|
+
)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function DropdownMenuCheckboxItem({
|
|
102
|
+
className,
|
|
103
|
+
children,
|
|
104
|
+
checked,
|
|
105
|
+
inset,
|
|
106
|
+
...props
|
|
107
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
108
|
+
inset?: boolean
|
|
109
|
+
}) {
|
|
110
|
+
return (
|
|
111
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
112
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
113
|
+
data-inset={inset}
|
|
114
|
+
className={cn(
|
|
115
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:*:[svg]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
116
|
+
className
|
|
117
|
+
)}
|
|
118
|
+
checked={checked}
|
|
119
|
+
{...props}
|
|
120
|
+
>
|
|
121
|
+
<span
|
|
122
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
123
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
124
|
+
>
|
|
125
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
126
|
+
<CheckIcon
|
|
127
|
+
/>
|
|
128
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
129
|
+
</span>
|
|
130
|
+
{children}
|
|
131
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function DropdownMenuRadioGroup({
|
|
136
|
+
...props
|
|
137
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
138
|
+
return (
|
|
139
|
+
<DropdownMenuPrimitive.RadioGroup
|
|
140
|
+
data-slot="dropdown-menu-radio-group"
|
|
141
|
+
{...props}
|
|
142
|
+
/>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function DropdownMenuRadioItem({
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
inset,
|
|
150
|
+
...props
|
|
151
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
152
|
+
inset?: boolean
|
|
153
|
+
}) {
|
|
154
|
+
return (
|
|
155
|
+
<DropdownMenuPrimitive.RadioItem
|
|
156
|
+
data-slot="dropdown-menu-radio-item"
|
|
157
|
+
data-inset={inset}
|
|
158
|
+
className={cn(
|
|
159
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:*:[svg]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
160
|
+
className
|
|
161
|
+
)}
|
|
162
|
+
{...props}
|
|
163
|
+
>
|
|
164
|
+
<span
|
|
165
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
166
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
167
|
+
>
|
|
168
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
169
|
+
<CheckIcon
|
|
170
|
+
/>
|
|
171
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
172
|
+
</span>
|
|
173
|
+
{children}
|
|
174
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function DropdownMenuLabel({
|
|
179
|
+
className,
|
|
180
|
+
inset,
|
|
181
|
+
...props
|
|
182
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
183
|
+
inset?: boolean
|
|
184
|
+
}) {
|
|
185
|
+
return (
|
|
186
|
+
<DropdownMenuPrimitive.Label
|
|
187
|
+
data-slot="dropdown-menu-label"
|
|
188
|
+
data-inset={inset}
|
|
189
|
+
className={cn(
|
|
190
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
191
|
+
className
|
|
192
|
+
)}
|
|
193
|
+
{...props}
|
|
194
|
+
/>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function DropdownMenuSeparator({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
202
|
+
return (
|
|
203
|
+
<DropdownMenuPrimitive.Separator
|
|
204
|
+
data-slot="dropdown-menu-separator"
|
|
205
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
206
|
+
{...props}
|
|
207
|
+
/>
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function DropdownMenuShortcut({
|
|
212
|
+
className,
|
|
213
|
+
...props
|
|
214
|
+
}: React.ComponentProps<"span">) {
|
|
215
|
+
return (
|
|
216
|
+
<span
|
|
217
|
+
data-slot="dropdown-menu-shortcut"
|
|
218
|
+
className={cn(
|
|
219
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
220
|
+
className
|
|
221
|
+
)}
|
|
222
|
+
{...props}
|
|
223
|
+
/>
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function DropdownMenuSub({
|
|
228
|
+
...props
|
|
229
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
230
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function DropdownMenuSubTrigger({
|
|
234
|
+
className,
|
|
235
|
+
inset,
|
|
236
|
+
children,
|
|
237
|
+
...props
|
|
238
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
239
|
+
inset?: boolean
|
|
240
|
+
}) {
|
|
241
|
+
return (
|
|
242
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
243
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
244
|
+
data-inset={inset}
|
|
245
|
+
className={cn(
|
|
246
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:*:[svg]:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
247
|
+
className
|
|
248
|
+
)}
|
|
249
|
+
{...props}
|
|
250
|
+
>
|
|
251
|
+
{children}
|
|
252
|
+
<ChevronRightIcon className="ml-auto" />
|
|
253
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function DropdownMenuSubContent({
|
|
258
|
+
className,
|
|
259
|
+
...props
|
|
260
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
261
|
+
return (
|
|
262
|
+
<DropdownMenuPrimitive.SubContent
|
|
263
|
+
data-slot="dropdown-menu-sub-content"
|
|
264
|
+
className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 dark:border dark:border-border dark:ring-0 duration-100 data-[side=bottom]:slide-in-from-top-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 )}
|
|
265
|
+
{...props}
|
|
266
|
+
/>
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export {
|
|
271
|
+
DropdownMenu,
|
|
272
|
+
DropdownMenuPortal,
|
|
273
|
+
DropdownMenuTrigger,
|
|
274
|
+
DropdownMenuContent,
|
|
275
|
+
DropdownMenuGroup,
|
|
276
|
+
DropdownMenuLabel,
|
|
277
|
+
DropdownMenuItem,
|
|
278
|
+
DropdownMenuCheckboxItem,
|
|
279
|
+
DropdownMenuRadioGroup,
|
|
280
|
+
DropdownMenuRadioItem,
|
|
281
|
+
DropdownMenuSeparator,
|
|
282
|
+
DropdownMenuShortcut,
|
|
283
|
+
DropdownMenuSub,
|
|
284
|
+
DropdownMenuSubTrigger,
|
|
285
|
+
DropdownMenuSubContent,
|
|
286
|
+
}
|
|
@@ -1 +1,121 @@
|
|
|
1
|
-
|
|
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 { cva, type VariantProps } from "class-variance-authority"
|
|
19
|
+
|
|
20
|
+
import { cn } from "@/lib/utils"
|
|
21
|
+
|
|
22
|
+
function Empty({ className, ...props }: React.ComponentProps<"div">) {
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
data-slot="empty"
|
|
26
|
+
className={cn(
|
|
27
|
+
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
data-slot="empty-header"
|
|
39
|
+
className={cn("flex max-w-sm flex-col items-center gap-2", className)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const emptyMediaVariants = cva(
|
|
46
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
47
|
+
{
|
|
48
|
+
variants: {
|
|
49
|
+
variant: {
|
|
50
|
+
default: "bg-transparent",
|
|
51
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
variant: "default",
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
function EmptyMedia({
|
|
61
|
+
className,
|
|
62
|
+
variant = "default",
|
|
63
|
+
...props
|
|
64
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
data-slot="empty-icon"
|
|
68
|
+
data-variant={variant}
|
|
69
|
+
className={cn(emptyMediaVariants({ variant, className }))}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
76
|
+
return (
|
|
77
|
+
<div
|
|
78
|
+
data-slot="empty-title"
|
|
79
|
+
className={cn(
|
|
80
|
+
"font-heading text-sm font-medium tracking-tight",
|
|
81
|
+
className
|
|
82
|
+
)}
|
|
83
|
+
{...props}
|
|
84
|
+
/>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
data-slot="empty-description"
|
|
92
|
+
className={cn(
|
|
93
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
94
|
+
className
|
|
95
|
+
)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
data-slot="empty-content"
|
|
105
|
+
className={cn(
|
|
106
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
|
|
107
|
+
className
|
|
108
|
+
)}
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
Empty,
|
|
116
|
+
EmptyHeader,
|
|
117
|
+
EmptyTitle,
|
|
118
|
+
EmptyDescription,
|
|
119
|
+
EmptyContent,
|
|
120
|
+
EmptyMedia,
|
|
121
|
+
}
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
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
|
+
|
|
20
|
+
import { cn } from "@/lib/utils"
|
|
21
|
+
|
|
22
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
23
|
+
return (
|
|
24
|
+
<input
|
|
25
|
+
type={type}
|
|
26
|
+
data-slot="input"
|
|
27
|
+
className={cn(
|
|
28
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 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:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 ",
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Input }
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
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 { Label as LabelPrimitive } from "radix-ui"
|
|
20
|
+
|
|
21
|
+
import { cn } from "@/lib/utils"
|
|
22
|
+
|
|
23
|
+
function Label({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
27
|
+
return (
|
|
28
|
+
<LabelPrimitive.Root
|
|
29
|
+
data-slot="label"
|
|
30
|
+
className={cn(
|
|
31
|
+
"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",
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Label }
|
|
@@ -1 +1,106 @@
|
|
|
1
|
-
|
|
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 { Popover as PopoverPrimitive } from "radix-ui"
|
|
22
|
+
|
|
23
|
+
import { cn } from "@/lib/utils"
|
|
24
|
+
|
|
25
|
+
function Popover({
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
28
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function PopoverTrigger({
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
34
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function PopoverContent({
|
|
38
|
+
className,
|
|
39
|
+
align = "center",
|
|
40
|
+
sideOffset = 4,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
43
|
+
return (
|
|
44
|
+
<PopoverPrimitive.Portal>
|
|
45
|
+
<PopoverPrimitive.Content
|
|
46
|
+
data-slot="popover-content"
|
|
47
|
+
align={align}
|
|
48
|
+
sideOffset={sideOffset}
|
|
49
|
+
className={cn(
|
|
50
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg dark:border dark:border-primary/15 bg-popover p-2.5 text-sm text-popover-foreground shadow-md outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-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",
|
|
51
|
+
className
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
</PopoverPrimitive.Portal>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function PopoverAnchor({
|
|
60
|
+
...props
|
|
61
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
62
|
+
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
66
|
+
return (
|
|
67
|
+
<div
|
|
68
|
+
data-slot="popover-header"
|
|
69
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">) {
|
|
76
|
+
return (
|
|
77
|
+
<div
|
|
78
|
+
data-slot="popover-title"
|
|
79
|
+
className={cn("font-medium", className)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function PopoverDescription({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentProps<"p">) {
|
|
89
|
+
return (
|
|
90
|
+
<p
|
|
91
|
+
data-slot="popover-description"
|
|
92
|
+
className={cn("text-muted-foreground", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
Popover,
|
|
100
|
+
PopoverAnchor,
|
|
101
|
+
PopoverContent,
|
|
102
|
+
PopoverDescription,
|
|
103
|
+
PopoverHeader,
|
|
104
|
+
PopoverTitle,
|
|
105
|
+
PopoverTrigger,
|
|
106
|
+
}
|
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
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 ResizablePrimitive from "react-resizable-panels"
|
|
21
|
+
|
|
22
|
+
import { cn } from "@/lib/utils"
|
|
23
|
+
|
|
24
|
+
function ResizablePanelGroup({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: ResizablePrimitive.GroupProps) {
|
|
28
|
+
return (
|
|
29
|
+
<ResizablePrimitive.Group
|
|
30
|
+
data-slot="resizable-panel-group"
|
|
31
|
+
className={cn(
|
|
32
|
+
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
33
|
+
className
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
41
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function ResizableHandle({
|
|
45
|
+
withHandle,
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: ResizablePrimitive.SeparatorProps & {
|
|
49
|
+
withHandle?: boolean
|
|
50
|
+
}) {
|
|
51
|
+
return (
|
|
52
|
+
<ResizablePrimitive.Separator
|
|
53
|
+
data-slot="resizable-handle"
|
|
54
|
+
className={cn(
|
|
55
|
+
"relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
56
|
+
className
|
|
57
|
+
)}
|
|
58
|
+
{...props}
|
|
59
|
+
>
|
|
60
|
+
{withHandle && (
|
|
61
|
+
<div className="z-10 flex h-6 w-1 shrink-0 rounded-full bg-muted-foreground/25" />
|
|
62
|
+
)}
|
|
63
|
+
</ResizablePrimitive.Separator>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|