@allbluecn/ui 0.3.13 → 0.4.0
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/dist/ai-command-button.d.ts +10 -0
- package/dist/ai-command-button.js +12 -0
- package/dist/ai-stream-text.d.ts +9 -0
- package/dist/ai-stream-text.js +12 -0
- package/dist/alert-dialog.d.ts +20 -0
- package/dist/alert-dialog.js +101 -0
- package/dist/animated-theme-toggler.d.ts +11 -0
- package/dist/animated-theme-toggler.js +169 -0
- package/dist/auth-client.d.ts +27 -0
- package/dist/auth-client.js +86 -0
- package/dist/auth-layout.d.ts +14 -0
- package/dist/auth-layout.js +43 -0
- package/dist/avatar.d.ts +13 -0
- package/dist/avatar.js +51 -0
- package/dist/badge.d.ts +11 -0
- package/dist/badge.js +28 -0
- package/dist/button.d.ts +12 -0
- package/dist/button.js +48 -0
- package/dist/card.d.ts +13 -0
- package/dist/card.js +56 -0
- package/dist/checkbox.d.ts +6 -0
- package/dist/checkbox.js +22 -0
- package/dist/context-menu.d.ts +33 -0
- package/dist/context-menu.js +125 -0
- package/dist/dialog.d.ts +19 -0
- package/dist/dialog.js +95 -0
- package/dist/dropdown-menu.d.ts +31 -0
- package/dist/dropdown-menu.js +128 -0
- package/dist/empty.d.ts +13 -0
- package/dist/empty.js +59 -0
- package/dist/grid-pattern.d.ts +14 -0
- package/dist/grid-pattern.js +47 -0
- package/dist/icon-packs/index.d.ts +2 -0
- package/dist/icon-packs/index.js +4 -0
- package/dist/icon-packs/knowledge.d.ts +2 -0
- package/dist/icon-packs/knowledge.js +70 -0
- package/dist/icon-packs/prd.d.ts +2 -0
- package/dist/icon-packs/prd.js +86 -0
- package/dist/icon-packs/project.d.ts +2 -0
- package/dist/icon-packs/project.js +74 -0
- package/dist/icon-picker.d.ts +11 -0
- package/dist/icon-picker.js +39 -0
- package/dist/index-CQsbeClc.d.ts +17 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/input.d.ts +5 -0
- package/dist/input.js +14 -0
- package/dist/item.d.ts +25 -0
- package/dist/item.js +118 -0
- package/dist/kbd.d.ts +4 -0
- package/dist/kbd.js +12 -0
- package/dist/label.d.ts +6 -0
- package/dist/label.js +14 -0
- package/dist/layout-panel-top.d.ts +12 -0
- package/dist/layout-panel-top.js +127 -0
- package/dist/name-confirm-dialog.d.ts +15 -0
- package/dist/name-confirm-dialog.js +105 -0
- package/dist/nav-float-button.d.ts +12 -0
- package/dist/nav-float-button.js +249 -0
- package/dist/notion-avatar.d.ts +13 -0
- package/dist/notion-avatar.js +83 -0
- package/dist/placeholder-page.d.ts +10 -0
- package/dist/placeholder-page.js +28 -0
- package/dist/popover.d.ts +12 -0
- package/dist/popover.js +56 -0
- package/dist/reference-inline.d.ts +10 -0
- package/dist/reference-inline.js +35 -0
- package/dist/reference-search.d.ts +12 -0
- package/dist/reference-search.js +26 -0
- package/dist/resizable.d.ts +9 -0
- package/dist/resizable.js +28 -0
- package/dist/select.d.ts +17 -0
- package/dist/select.js +99 -0
- package/dist/separator.d.ts +6 -0
- package/dist/separator.js +17 -0
- package/dist/sheet.d.ts +16 -0
- package/dist/sheet.js +90 -0
- package/dist/sidebar.d.ts +71 -0
- package/dist/sidebar.js +369 -0
- package/dist/skeleton.d.ts +4 -0
- package/dist/skeleton.js +12 -0
- package/dist/sonner.d.ts +5 -0
- package/dist/sonner.js +19 -0
- package/dist/switch.d.ts +8 -0
- package/dist/switch.js +19 -0
- package/dist/textarea.d.ts +5 -0
- package/dist/textarea.js +13 -0
- package/dist/timezone-provider.d.ts +18 -0
- package/dist/timezone-provider.js +29 -0
- package/dist/tooltip.d.ts +9 -0
- package/dist/tooltip.js +35 -0
- package/dist/use-mobile.d.ts +4 -0
- package/dist/use-mobile.js +18 -0
- package/dist/user-avatar.d.ts +14 -0
- package/dist/user-avatar.js +34 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +8 -0
- package/package.json +178 -49
- package/src/ai-command-button.tsx +0 -36
- package/src/ai-stream-text.tsx +0 -37
- package/src/alert-dialog.tsx +0 -216
- package/src/animated-theme-toggler.tsx +0 -272
- package/src/auth-client.ts +0 -108
- package/src/auth-layout.tsx +0 -66
- package/src/avatar.tsx +0 -129
- package/src/badge.tsx +0 -66
- package/src/button.tsx +0 -84
- package/src/card.tsx +0 -120
- package/src/checkbox.tsx +0 -50
- package/src/context-menu.tsx +0 -280
- package/src/dialog.tsx +0 -183
- package/src/dropdown-menu.tsx +0 -286
- package/src/empty.tsx +0 -121
- package/src/grid-pattern.tsx +0 -87
- package/src/icon-packs/index.ts +0 -27
- package/src/icon-packs/knowledge.ts +0 -55
- package/src/icon-packs/prd.ts +0 -63
- package/src/icon-packs/project.ts +0 -59
- package/src/icon-picker.tsx +0 -68
- package/src/index.ts +0 -23
- package/src/input.tsx +0 -36
- package/src/item.tsx +0 -213
- package/src/kbd.tsx +0 -33
- package/src/label.tsx +0 -39
- package/src/layout-panel-top.tsx +0 -160
- package/src/name-confirm-dialog.tsx +0 -153
- package/src/nav-float-button.tsx +0 -301
- package/src/notion-avatar.tsx +0 -126
- package/src/placeholder-page.tsx +0 -42
- package/src/popover.tsx +0 -106
- package/src/reference-inline.tsx +0 -53
- package/src/reference-search.tsx +0 -52
- package/src/resizable.tsx +0 -67
- package/src/select.tsx +0 -207
- package/src/separator.tsx +0 -45
- package/src/sheet.tsx +0 -164
- package/src/sidebar.tsx +0 -708
- package/src/skeleton.tsx +0 -30
- package/src/sonner.tsx +0 -37
- package/src/switch.tsx +0 -48
- package/src/textarea.tsx +0 -35
- package/src/timezone-provider.tsx +0 -55
- package/src/tooltip.tsx +0 -72
- package/src/use-mobile.ts +0 -36
- package/src/user-avatar.tsx +0 -79
- package/src/utils.ts +0 -6
package/src/dialog.tsx
DELETED
|
@@ -1,183 +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 { Dialog as DialogPrimitive } from "radix-ui"
|
|
20
|
-
|
|
21
|
-
import { cn } from "./utils"
|
|
22
|
-
import { Button } from "./button"
|
|
23
|
-
import { XIcon } from "lucide-react"
|
|
24
|
-
|
|
25
|
-
function Dialog({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
28
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function DialogTrigger({
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
34
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function DialogPortal({
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
40
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function DialogClose({
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
46
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function DialogOverlay({
|
|
50
|
-
className,
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
53
|
-
return (
|
|
54
|
-
<DialogPrimitive.Overlay
|
|
55
|
-
data-slot="dialog-overlay"
|
|
56
|
-
className={cn(
|
|
57
|
-
"fixed inset-0 isolate 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",
|
|
58
|
-
className
|
|
59
|
-
)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function DialogContent({
|
|
66
|
-
className,
|
|
67
|
-
children,
|
|
68
|
-
showCloseButton = true,
|
|
69
|
-
...props
|
|
70
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
71
|
-
showCloseButton?: boolean
|
|
72
|
-
}) {
|
|
73
|
-
return (
|
|
74
|
-
<DialogPortal>
|
|
75
|
-
<DialogOverlay />
|
|
76
|
-
<DialogPrimitive.Content
|
|
77
|
-
data-slot="dialog-content"
|
|
78
|
-
className={cn(
|
|
79
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none 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 dark:border dark:border-primary/15",
|
|
80
|
-
className
|
|
81
|
-
)}
|
|
82
|
-
{...props}
|
|
83
|
-
>
|
|
84
|
-
{children}
|
|
85
|
-
{showCloseButton && (
|
|
86
|
-
<DialogPrimitive.Close data-slot="dialog-close" asChild>
|
|
87
|
-
<Button
|
|
88
|
-
variant="ghost"
|
|
89
|
-
className="absolute top-2 right-2"
|
|
90
|
-
size="icon-sm"
|
|
91
|
-
>
|
|
92
|
-
<XIcon
|
|
93
|
-
/>
|
|
94
|
-
<span className="sr-only">Close</span>
|
|
95
|
-
</Button>
|
|
96
|
-
</DialogPrimitive.Close>
|
|
97
|
-
)}
|
|
98
|
-
</DialogPrimitive.Content>
|
|
99
|
-
</DialogPortal>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
104
|
-
return (
|
|
105
|
-
<div
|
|
106
|
-
data-slot="dialog-header"
|
|
107
|
-
className={cn("flex flex-col gap-2", className)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function DialogFooter({
|
|
114
|
-
className,
|
|
115
|
-
showCloseButton = false,
|
|
116
|
-
children,
|
|
117
|
-
...props
|
|
118
|
-
}: React.ComponentProps<"div"> & {
|
|
119
|
-
showCloseButton?: boolean
|
|
120
|
-
}) {
|
|
121
|
-
return (
|
|
122
|
-
<div
|
|
123
|
-
data-slot="dialog-footer"
|
|
124
|
-
className={cn(
|
|
125
|
-
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
|
|
126
|
-
className
|
|
127
|
-
)}
|
|
128
|
-
{...props}
|
|
129
|
-
>
|
|
130
|
-
{children}
|
|
131
|
-
{showCloseButton && (
|
|
132
|
-
<DialogPrimitive.Close asChild>
|
|
133
|
-
<Button variant="outline">Close</Button>
|
|
134
|
-
</DialogPrimitive.Close>
|
|
135
|
-
)}
|
|
136
|
-
</div>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function DialogTitle({
|
|
141
|
-
className,
|
|
142
|
-
...props
|
|
143
|
-
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
144
|
-
return (
|
|
145
|
-
<DialogPrimitive.Title
|
|
146
|
-
data-slot="dialog-title"
|
|
147
|
-
className={cn(
|
|
148
|
-
"font-heading text-base leading-none font-medium",
|
|
149
|
-
className
|
|
150
|
-
)}
|
|
151
|
-
{...props}
|
|
152
|
-
/>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function DialogDescription({
|
|
157
|
-
className,
|
|
158
|
-
...props
|
|
159
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
160
|
-
return (
|
|
161
|
-
<DialogPrimitive.Description
|
|
162
|
-
data-slot="dialog-description"
|
|
163
|
-
className={cn(
|
|
164
|
-
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
165
|
-
className
|
|
166
|
-
)}
|
|
167
|
-
{...props}
|
|
168
|
-
/>
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export {
|
|
173
|
-
Dialog,
|
|
174
|
-
DialogClose,
|
|
175
|
-
DialogContent,
|
|
176
|
-
DialogDescription,
|
|
177
|
-
DialogFooter,
|
|
178
|
-
DialogHeader,
|
|
179
|
-
DialogOverlay,
|
|
180
|
-
DialogPortal,
|
|
181
|
-
DialogTitle,
|
|
182
|
-
DialogTrigger,
|
|
183
|
-
}
|
package/src/dropdown-menu.tsx
DELETED
|
@@ -1,286 +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 { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
22
|
-
|
|
23
|
-
import { cn } from "./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
|
-
}
|
package/src/empty.tsx
DELETED
|
@@ -1,121 +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 { cva, type VariantProps } from "class-variance-authority"
|
|
19
|
-
|
|
20
|
-
import { cn } from "./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
|
-
}
|
package/src/grid-pattern.tsx
DELETED
|
@@ -1,87 +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 { useId } from "react"
|
|
19
|
-
|
|
20
|
-
import { cn } from "./utils"
|
|
21
|
-
|
|
22
|
-
interface GridPatternProps extends React.SVGProps<SVGSVGElement> {
|
|
23
|
-
width?: number
|
|
24
|
-
height?: number
|
|
25
|
-
x?: number
|
|
26
|
-
y?: number
|
|
27
|
-
squares?: Array<[x: number, y: number]>
|
|
28
|
-
strokeDasharray?: string
|
|
29
|
-
className?: string
|
|
30
|
-
[key: string]: unknown
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function GridPattern({
|
|
34
|
-
width = 40,
|
|
35
|
-
height = 40,
|
|
36
|
-
x = -1,
|
|
37
|
-
y = -1,
|
|
38
|
-
strokeDasharray = "0",
|
|
39
|
-
squares,
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: GridPatternProps) {
|
|
43
|
-
const id = useId()
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<svg
|
|
47
|
-
aria-hidden="true"
|
|
48
|
-
className={cn(
|
|
49
|
-
"pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30 stroke-gray-400/30",
|
|
50
|
-
className
|
|
51
|
-
)}
|
|
52
|
-
{...props}
|
|
53
|
-
>
|
|
54
|
-
<defs>
|
|
55
|
-
<pattern
|
|
56
|
-
id={id}
|
|
57
|
-
width={width}
|
|
58
|
-
height={height}
|
|
59
|
-
patternUnits="userSpaceOnUse"
|
|
60
|
-
x={x}
|
|
61
|
-
y={y}
|
|
62
|
-
>
|
|
63
|
-
<path
|
|
64
|
-
d={`M.5 ${height}V.5H${width}`}
|
|
65
|
-
fill="none"
|
|
66
|
-
strokeDasharray={strokeDasharray}
|
|
67
|
-
/>
|
|
68
|
-
</pattern>
|
|
69
|
-
</defs>
|
|
70
|
-
<rect width="100%" height="100%" strokeWidth={0} fill={`url(#${id})`} />
|
|
71
|
-
{squares && (
|
|
72
|
-
<svg x={x} y={y} className="overflow-visible">
|
|
73
|
-
{squares.map(([x, y], i) => (
|
|
74
|
-
<rect
|
|
75
|
-
strokeWidth="0"
|
|
76
|
-
key={`${i}-${x}-${y}`}
|
|
77
|
-
width={width - 1}
|
|
78
|
-
height={height - 1}
|
|
79
|
-
x={x * width + 1}
|
|
80
|
-
y={y * height + 1}
|
|
81
|
-
/>
|
|
82
|
-
))}
|
|
83
|
-
</svg>
|
|
84
|
-
)}
|
|
85
|
-
</svg>
|
|
86
|
-
)
|
|
87
|
-
}
|
package/src/icon-packs/index.ts
DELETED
|
@@ -1,27 +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 type { LucideIcon } from "lucide-react";
|
|
19
|
-
|
|
20
|
-
export interface IconItem {
|
|
21
|
-
value: string;
|
|
22
|
-
icon: LucideIcon;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { PROJECT_ICONS } from "./project";
|
|
26
|
-
export { PRD_ICONS } from "./prd";
|
|
27
|
-
export { KNOWLEDGE_ICONS } from "./knowledge";
|