@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,207 @@
|
|
|
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 { Select as SelectPrimitive } from "radix-ui"
|
|
20
|
+
|
|
21
|
+
import { cn } from "@/lib/utils"
|
|
22
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
23
|
+
|
|
24
|
+
function Select({
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
27
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function SelectGroup({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
34
|
+
return (
|
|
35
|
+
<SelectPrimitive.Group
|
|
36
|
+
data-slot="select-group"
|
|
37
|
+
className={cn("scroll-my-1 p-1", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function SelectValue({
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
46
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function SelectTrigger({
|
|
50
|
+
className,
|
|
51
|
+
size = "default",
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
55
|
+
size?: "sm" | "default"
|
|
56
|
+
}) {
|
|
57
|
+
return (
|
|
58
|
+
<SelectPrimitive.Trigger
|
|
59
|
+
data-slot="select-trigger"
|
|
60
|
+
data-size={size}
|
|
61
|
+
className={cn(
|
|
62
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-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-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *: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",
|
|
63
|
+
className
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
{children}
|
|
68
|
+
<SelectPrimitive.Icon asChild>
|
|
69
|
+
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
70
|
+
</SelectPrimitive.Icon>
|
|
71
|
+
</SelectPrimitive.Trigger>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function SelectContent({
|
|
76
|
+
className,
|
|
77
|
+
children,
|
|
78
|
+
position = "item-aligned",
|
|
79
|
+
align = "center",
|
|
80
|
+
...props
|
|
81
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
82
|
+
return (
|
|
83
|
+
<SelectPrimitive.Portal>
|
|
84
|
+
<SelectPrimitive.Content
|
|
85
|
+
data-slot="select-content"
|
|
86
|
+
data-align-trigger={position === "item-aligned"}
|
|
87
|
+
className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg 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=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", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}
|
|
88
|
+
position={position}
|
|
89
|
+
align={align}
|
|
90
|
+
{...props}
|
|
91
|
+
>
|
|
92
|
+
<SelectScrollUpButton />
|
|
93
|
+
<SelectPrimitive.Viewport
|
|
94
|
+
data-position={position}
|
|
95
|
+
className={cn(
|
|
96
|
+
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
97
|
+
position === "popper" && ""
|
|
98
|
+
)}
|
|
99
|
+
>
|
|
100
|
+
{children}
|
|
101
|
+
</SelectPrimitive.Viewport>
|
|
102
|
+
<SelectScrollDownButton />
|
|
103
|
+
</SelectPrimitive.Content>
|
|
104
|
+
</SelectPrimitive.Portal>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function SelectLabel({
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
112
|
+
return (
|
|
113
|
+
<SelectPrimitive.Label
|
|
114
|
+
data-slot="select-label"
|
|
115
|
+
className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
|
|
116
|
+
{...props}
|
|
117
|
+
/>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function SelectItem({
|
|
122
|
+
className,
|
|
123
|
+
children,
|
|
124
|
+
...props
|
|
125
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
126
|
+
return (
|
|
127
|
+
<SelectPrimitive.Item
|
|
128
|
+
data-slot="select-item"
|
|
129
|
+
className={cn(
|
|
130
|
+
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1.5 pr-8 pl-3.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:*:[svg]: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",
|
|
131
|
+
className
|
|
132
|
+
)}
|
|
133
|
+
{...props}
|
|
134
|
+
>
|
|
135
|
+
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
|
|
136
|
+
<SelectPrimitive.ItemIndicator>
|
|
137
|
+
<CheckIcon className="pointer-events-none" />
|
|
138
|
+
</SelectPrimitive.ItemIndicator>
|
|
139
|
+
</span>
|
|
140
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
141
|
+
</SelectPrimitive.Item>
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function SelectSeparator({
|
|
146
|
+
className,
|
|
147
|
+
...props
|
|
148
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
149
|
+
return (
|
|
150
|
+
<SelectPrimitive.Separator
|
|
151
|
+
data-slot="select-separator"
|
|
152
|
+
className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
|
|
153
|
+
{...props}
|
|
154
|
+
/>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function SelectScrollUpButton({
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
162
|
+
return (
|
|
163
|
+
<SelectPrimitive.ScrollUpButton
|
|
164
|
+
data-slot="select-scroll-up-button"
|
|
165
|
+
className={cn(
|
|
166
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
167
|
+
className
|
|
168
|
+
)}
|
|
169
|
+
{...props}
|
|
170
|
+
>
|
|
171
|
+
<ChevronUpIcon
|
|
172
|
+
/>
|
|
173
|
+
</SelectPrimitive.ScrollUpButton>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function SelectScrollDownButton({
|
|
178
|
+
className,
|
|
179
|
+
...props
|
|
180
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
181
|
+
return (
|
|
182
|
+
<SelectPrimitive.ScrollDownButton
|
|
183
|
+
data-slot="select-scroll-down-button"
|
|
184
|
+
className={cn(
|
|
185
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
186
|
+
className
|
|
187
|
+
)}
|
|
188
|
+
{...props}
|
|
189
|
+
>
|
|
190
|
+
<ChevronDownIcon
|
|
191
|
+
/>
|
|
192
|
+
</SelectPrimitive.ScrollDownButton>
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
Select,
|
|
198
|
+
SelectContent,
|
|
199
|
+
SelectGroup,
|
|
200
|
+
SelectItem,
|
|
201
|
+
SelectLabel,
|
|
202
|
+
SelectScrollDownButton,
|
|
203
|
+
SelectScrollUpButton,
|
|
204
|
+
SelectSeparator,
|
|
205
|
+
SelectTrigger,
|
|
206
|
+
SelectValue,
|
|
207
|
+
}
|