@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
|
@@ -1,55 +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 {
|
|
19
|
-
BookOpen,
|
|
20
|
-
FileText,
|
|
21
|
-
Library,
|
|
22
|
-
Archive,
|
|
23
|
-
Bookmark,
|
|
24
|
-
Tags,
|
|
25
|
-
Lightbulb,
|
|
26
|
-
GraduationCap,
|
|
27
|
-
Brain,
|
|
28
|
-
NotebookPen,
|
|
29
|
-
Files,
|
|
30
|
-
FolderOpen,
|
|
31
|
-
ScrollText,
|
|
32
|
-
Newspaper,
|
|
33
|
-
PencilLine,
|
|
34
|
-
Quote,
|
|
35
|
-
} from "lucide-react";
|
|
36
|
-
import type { IconItem } from "./index";
|
|
37
|
-
|
|
38
|
-
export const KNOWLEDGE_ICONS: IconItem[] = [
|
|
39
|
-
{ value: "bookOpen", icon: BookOpen },
|
|
40
|
-
{ value: "fileText", icon: FileText },
|
|
41
|
-
{ value: "library", icon: Library },
|
|
42
|
-
{ value: "archive", icon: Archive },
|
|
43
|
-
{ value: "bookmark", icon: Bookmark },
|
|
44
|
-
{ value: "tags", icon: Tags },
|
|
45
|
-
{ value: "lightbulb", icon: Lightbulb },
|
|
46
|
-
{ value: "graduationCap", icon: GraduationCap },
|
|
47
|
-
{ value: "brain", icon: Brain },
|
|
48
|
-
{ value: "notebookPen", icon: NotebookPen },
|
|
49
|
-
{ value: "files", icon: Files },
|
|
50
|
-
{ value: "folderOpen", icon: FolderOpen },
|
|
51
|
-
{ value: "scrollText", icon: ScrollText },
|
|
52
|
-
{ value: "newspaper", icon: Newspaper },
|
|
53
|
-
{ value: "pencilLine", icon: PencilLine },
|
|
54
|
-
{ value: "quote", icon: Quote },
|
|
55
|
-
];
|
package/src/icon-packs/prd.ts
DELETED
|
@@ -1,63 +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 {
|
|
19
|
-
FileText,
|
|
20
|
-
LayoutGrid,
|
|
21
|
-
MousePointerClick,
|
|
22
|
-
TextCursorInput,
|
|
23
|
-
Table2,
|
|
24
|
-
Image,
|
|
25
|
-
ShoppingCart,
|
|
26
|
-
User,
|
|
27
|
-
Settings2,
|
|
28
|
-
Mail,
|
|
29
|
-
Bell,
|
|
30
|
-
Search,
|
|
31
|
-
Calendar,
|
|
32
|
-
BarChart3,
|
|
33
|
-
MessageSquare,
|
|
34
|
-
Smile,
|
|
35
|
-
Monitor,
|
|
36
|
-
Smartphone,
|
|
37
|
-
Layout,
|
|
38
|
-
AppWindow,
|
|
39
|
-
} from "lucide-react";
|
|
40
|
-
import type { IconItem } from "./index";
|
|
41
|
-
|
|
42
|
-
export const PRD_ICONS: IconItem[] = [
|
|
43
|
-
{ value: "fileText", icon: FileText },
|
|
44
|
-
{ value: "layoutGrid", icon: LayoutGrid },
|
|
45
|
-
{ value: "mousePointerClick", icon: MousePointerClick },
|
|
46
|
-
{ value: "textCursorInput", icon: TextCursorInput },
|
|
47
|
-
{ value: "table2", icon: Table2 },
|
|
48
|
-
{ value: "image", icon: Image },
|
|
49
|
-
{ value: "shoppingCart", icon: ShoppingCart },
|
|
50
|
-
{ value: "user", icon: User },
|
|
51
|
-
{ value: "settings2", icon: Settings2 },
|
|
52
|
-
{ value: "mail", icon: Mail },
|
|
53
|
-
{ value: "bell", icon: Bell },
|
|
54
|
-
{ value: "search", icon: Search },
|
|
55
|
-
{ value: "calendar", icon: Calendar },
|
|
56
|
-
{ value: "barChart3", icon: BarChart3 },
|
|
57
|
-
{ value: "messageSquare", icon: MessageSquare },
|
|
58
|
-
{ value: "smile", icon: Smile },
|
|
59
|
-
{ value: "monitor", icon: Monitor },
|
|
60
|
-
{ value: "smartphone", icon: Smartphone },
|
|
61
|
-
{ value: "layout", icon: Layout },
|
|
62
|
-
{ value: "appWindow", icon: AppWindow },
|
|
63
|
-
];
|
|
@@ -1,59 +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 {
|
|
19
|
-
FolderKanban,
|
|
20
|
-
BriefcaseBusiness,
|
|
21
|
-
Rocket,
|
|
22
|
-
FlaskConical,
|
|
23
|
-
Terminal,
|
|
24
|
-
Contrast,
|
|
25
|
-
MessageSquare,
|
|
26
|
-
GraduationCap,
|
|
27
|
-
HeartPulse,
|
|
28
|
-
ShoppingCart,
|
|
29
|
-
Layers,
|
|
30
|
-
Users,
|
|
31
|
-
Globe,
|
|
32
|
-
Sparkles,
|
|
33
|
-
Compass,
|
|
34
|
-
ShieldCheck,
|
|
35
|
-
Sprout,
|
|
36
|
-
} from "lucide-react";
|
|
37
|
-
import type { IconItem } from "./index";
|
|
38
|
-
|
|
39
|
-
// 项目图标集(静态 lucide,用于 IconPicker 选择器、列表/侧边栏等静态展示)
|
|
40
|
-
// value 与 ProjectAnimatedIcon 的动画映射一一对应
|
|
41
|
-
export const PROJECT_ICONS: IconItem[] = [
|
|
42
|
-
{ value: "folder-kanban", icon: FolderKanban },
|
|
43
|
-
{ value: "briefcase-business", icon: BriefcaseBusiness },
|
|
44
|
-
{ value: "rocket", icon: Rocket },
|
|
45
|
-
{ value: "flask", icon: FlaskConical },
|
|
46
|
-
{ value: "terminal", icon: Terminal },
|
|
47
|
-
{ value: "contrast", icon: Contrast },
|
|
48
|
-
{ value: "message-square", icon: MessageSquare },
|
|
49
|
-
{ value: "graduation-cap", icon: GraduationCap },
|
|
50
|
-
{ value: "heart-pulse", icon: HeartPulse },
|
|
51
|
-
{ value: "cart", icon: ShoppingCart },
|
|
52
|
-
{ value: "layers", icon: Layers },
|
|
53
|
-
{ value: "users", icon: Users },
|
|
54
|
-
{ value: "earth", icon: Globe },
|
|
55
|
-
{ value: "sparkles", icon: Sparkles },
|
|
56
|
-
{ value: "compass", icon: Compass },
|
|
57
|
-
{ value: "shield-check", icon: ShieldCheck },
|
|
58
|
-
{ value: "sprout", icon: Sprout },
|
|
59
|
-
];
|
package/src/icon-picker.tsx
DELETED
|
@@ -1,68 +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 { IconItem } from "./icon-packs";
|
|
19
|
-
import { useTranslation } from "react-i18next";
|
|
20
|
-
import { cn } from "./utils";
|
|
21
|
-
|
|
22
|
-
interface IconPickerProps {
|
|
23
|
-
icons: IconItem[];
|
|
24
|
-
value?: string;
|
|
25
|
-
onChange: (value: string) => void;
|
|
26
|
-
className?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function IconPicker({
|
|
30
|
-
icons,
|
|
31
|
-
value,
|
|
32
|
-
onChange,
|
|
33
|
-
className,
|
|
34
|
-
}: IconPickerProps) {
|
|
35
|
-
const { t } = useTranslation('common')
|
|
36
|
-
const selectedIcon = icons.find((icon) => icon.value === value) ?? icons[0];
|
|
37
|
-
const SelectedComponent = selectedIcon.icon;
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<div className={cn("flex flex-col items-center gap-8", className)}>
|
|
41
|
-
<div className="flex items-center justify-center size-24 rounded-full border border-zinc-300 bg-primary/10">
|
|
42
|
-
<SelectedComponent size={40} className="text-primary" />
|
|
43
|
-
</div>
|
|
44
|
-
<span className="text-sm text-muted-foreground">{t('iconPicker.select')}</span>
|
|
45
|
-
<div className="flex flex-wrap justify-center gap-2 max-w-170">
|
|
46
|
-
{icons.map((item) => {
|
|
47
|
-
const Icon = item.icon;
|
|
48
|
-
const isSelected = item.value === value;
|
|
49
|
-
return (
|
|
50
|
-
<button
|
|
51
|
-
key={item.value}
|
|
52
|
-
type="button"
|
|
53
|
-
onClick={() => onChange(item.value)}
|
|
54
|
-
className={cn(
|
|
55
|
-
"flex items-center justify-center w-10 h-10 rounded-lg border transition-colors",
|
|
56
|
-
isSelected
|
|
57
|
-
? "border-primary bg-primary/10 text-primary"
|
|
58
|
-
: "border-border hover:bg-muted text-muted-foreground"
|
|
59
|
-
)}
|
|
60
|
-
>
|
|
61
|
-
<Icon size={20} />
|
|
62
|
-
</button>
|
|
63
|
-
);
|
|
64
|
-
})}
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,23 +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
|
-
export { ReferenceInline } from "./reference-inline";
|
|
19
|
-
export { ReferenceSearch } from "./reference-search";
|
|
20
|
-
export { AICommandButton } from "./ai-command-button";
|
|
21
|
-
export { AIStreamText } from "./ai-stream-text";
|
|
22
|
-
export { NotionAvatar } from "./notion-avatar";
|
|
23
|
-
export { UserAvatar } from "./user-avatar";
|
package/src/input.tsx
DELETED
|
@@ -1,36 +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
|
-
|
|
20
|
-
import { cn } from "./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 }
|
package/src/item.tsx
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
import * as React from "react"
|
|
19
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
20
|
-
import { Slot } from "radix-ui"
|
|
21
|
-
|
|
22
|
-
import { cn } from "./utils"
|
|
23
|
-
import { Separator } from "./separator"
|
|
24
|
-
|
|
25
|
-
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
26
|
-
return (
|
|
27
|
-
<div
|
|
28
|
-
role="list"
|
|
29
|
-
data-slot="item-group"
|
|
30
|
-
className={cn(
|
|
31
|
-
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function ItemSeparator({
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof Separator>) {
|
|
43
|
-
return (
|
|
44
|
-
<Separator
|
|
45
|
-
data-slot="item-separator"
|
|
46
|
-
orientation="horizontal"
|
|
47
|
-
className={cn("my-2", className)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const itemVariants = cva(
|
|
54
|
-
"group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
55
|
-
{
|
|
56
|
-
variants: {
|
|
57
|
-
variant: {
|
|
58
|
-
default: "border-transparent",
|
|
59
|
-
outline: "border-border",
|
|
60
|
-
muted: "border-transparent bg-muted/50",
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
default: "gap-2.5 px-3 py-2.5",
|
|
64
|
-
sm: "gap-2.5 px-3 py-2.5",
|
|
65
|
-
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
variant: "default",
|
|
70
|
-
size: "default",
|
|
71
|
-
},
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
function Item({
|
|
76
|
-
className,
|
|
77
|
-
variant = "default",
|
|
78
|
-
size = "default",
|
|
79
|
-
asChild = false,
|
|
80
|
-
...props
|
|
81
|
-
}: React.ComponentProps<"div"> &
|
|
82
|
-
VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
|
83
|
-
const Comp = asChild ? Slot.Root : "div"
|
|
84
|
-
return (
|
|
85
|
-
<Comp
|
|
86
|
-
data-slot="item"
|
|
87
|
-
data-variant={variant}
|
|
88
|
-
data-size={size}
|
|
89
|
-
className={cn(itemVariants({ variant, size, className }))}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const itemMediaVariants = cva(
|
|
96
|
-
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
97
|
-
{
|
|
98
|
-
variants: {
|
|
99
|
-
variant: {
|
|
100
|
-
default: "bg-transparent",
|
|
101
|
-
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
102
|
-
image:
|
|
103
|
-
"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
defaultVariants: {
|
|
107
|
-
variant: "default",
|
|
108
|
-
},
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
function ItemMedia({
|
|
113
|
-
className,
|
|
114
|
-
variant = "default",
|
|
115
|
-
...props
|
|
116
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
|
|
117
|
-
return (
|
|
118
|
-
<div
|
|
119
|
-
data-slot="item-media"
|
|
120
|
-
data-variant={variant}
|
|
121
|
-
className={cn(itemMediaVariants({ variant, className }))}
|
|
122
|
-
{...props}
|
|
123
|
-
/>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
128
|
-
return (
|
|
129
|
-
<div
|
|
130
|
-
data-slot="item-content"
|
|
131
|
-
className={cn(
|
|
132
|
-
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
133
|
-
className
|
|
134
|
-
)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
141
|
-
return (
|
|
142
|
-
<div
|
|
143
|
-
data-slot="item-title"
|
|
144
|
-
className={cn(
|
|
145
|
-
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
146
|
-
className
|
|
147
|
-
)}
|
|
148
|
-
{...props}
|
|
149
|
-
/>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
154
|
-
return (
|
|
155
|
-
<p
|
|
156
|
-
data-slot="item-description"
|
|
157
|
-
className={cn(
|
|
158
|
-
"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
159
|
-
className
|
|
160
|
-
)}
|
|
161
|
-
{...props}
|
|
162
|
-
/>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
|
|
167
|
-
return (
|
|
168
|
-
<div
|
|
169
|
-
data-slot="item-actions"
|
|
170
|
-
className={cn("flex items-center gap-2", className)}
|
|
171
|
-
{...props}
|
|
172
|
-
/>
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
177
|
-
return (
|
|
178
|
-
<div
|
|
179
|
-
data-slot="item-header"
|
|
180
|
-
className={cn(
|
|
181
|
-
"flex basis-full items-center justify-between gap-2",
|
|
182
|
-
className
|
|
183
|
-
)}
|
|
184
|
-
{...props}
|
|
185
|
-
/>
|
|
186
|
-
)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
190
|
-
return (
|
|
191
|
-
<div
|
|
192
|
-
data-slot="item-footer"
|
|
193
|
-
className={cn(
|
|
194
|
-
"flex basis-full items-center justify-between gap-2",
|
|
195
|
-
className
|
|
196
|
-
)}
|
|
197
|
-
{...props}
|
|
198
|
-
/>
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export {
|
|
203
|
-
Item,
|
|
204
|
-
ItemMedia,
|
|
205
|
-
ItemContent,
|
|
206
|
-
ItemActions,
|
|
207
|
-
ItemGroup,
|
|
208
|
-
ItemSeparator,
|
|
209
|
-
ItemTitle,
|
|
210
|
-
ItemDescription,
|
|
211
|
-
ItemHeader,
|
|
212
|
-
ItemFooter,
|
|
213
|
-
}
|
package/src/kbd.tsx
DELETED
|
@@ -1,33 +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 { cn } from "@/lib/utils"
|
|
19
|
-
|
|
20
|
-
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
|
|
21
|
-
return (
|
|
22
|
-
<kbd
|
|
23
|
-
data-slot="kbd"
|
|
24
|
-
className={cn(
|
|
25
|
-
"inline-flex items-center justify-center rounded bg-muted px-1.5 py-1 font-mono text-[10px] font-medium text-muted-foreground",
|
|
26
|
-
className
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { Kbd }
|
package/src/label.tsx
DELETED
|
@@ -1,39 +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 { Label as LabelPrimitive } from "radix-ui"
|
|
20
|
-
|
|
21
|
-
import { cn } from "./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 }
|