@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.
Files changed (146) hide show
  1. package/dist/ai-command-button.d.ts +10 -0
  2. package/dist/ai-command-button.js +12 -0
  3. package/dist/ai-stream-text.d.ts +9 -0
  4. package/dist/ai-stream-text.js +12 -0
  5. package/dist/alert-dialog.d.ts +20 -0
  6. package/dist/alert-dialog.js +101 -0
  7. package/dist/animated-theme-toggler.d.ts +11 -0
  8. package/dist/animated-theme-toggler.js +169 -0
  9. package/dist/auth-client.d.ts +27 -0
  10. package/dist/auth-client.js +86 -0
  11. package/dist/auth-layout.d.ts +14 -0
  12. package/dist/auth-layout.js +43 -0
  13. package/dist/avatar.d.ts +13 -0
  14. package/dist/avatar.js +51 -0
  15. package/dist/badge.d.ts +11 -0
  16. package/dist/badge.js +28 -0
  17. package/dist/button.d.ts +12 -0
  18. package/dist/button.js +48 -0
  19. package/dist/card.d.ts +13 -0
  20. package/dist/card.js +56 -0
  21. package/dist/checkbox.d.ts +6 -0
  22. package/dist/checkbox.js +22 -0
  23. package/dist/context-menu.d.ts +33 -0
  24. package/dist/context-menu.js +125 -0
  25. package/dist/dialog.d.ts +19 -0
  26. package/dist/dialog.js +95 -0
  27. package/dist/dropdown-menu.d.ts +31 -0
  28. package/dist/dropdown-menu.js +128 -0
  29. package/dist/empty.d.ts +13 -0
  30. package/dist/empty.js +59 -0
  31. package/dist/grid-pattern.d.ts +14 -0
  32. package/dist/grid-pattern.js +47 -0
  33. package/dist/icon-packs/index.d.ts +2 -0
  34. package/dist/icon-packs/index.js +4 -0
  35. package/dist/icon-packs/knowledge.d.ts +2 -0
  36. package/dist/icon-packs/knowledge.js +70 -0
  37. package/dist/icon-packs/prd.d.ts +2 -0
  38. package/dist/icon-packs/prd.js +86 -0
  39. package/dist/icon-packs/project.d.ts +2 -0
  40. package/dist/icon-packs/project.js +74 -0
  41. package/dist/icon-picker.d.ts +11 -0
  42. package/dist/icon-picker.js +39 -0
  43. package/dist/index-CQsbeClc.d.ts +17 -0
  44. package/dist/index.d.ts +7 -0
  45. package/dist/index.js +7 -0
  46. package/dist/input.d.ts +5 -0
  47. package/dist/input.js +14 -0
  48. package/dist/item.d.ts +25 -0
  49. package/dist/item.js +118 -0
  50. package/dist/kbd.d.ts +4 -0
  51. package/dist/kbd.js +12 -0
  52. package/dist/label.d.ts +6 -0
  53. package/dist/label.js +14 -0
  54. package/dist/layout-panel-top.d.ts +12 -0
  55. package/dist/layout-panel-top.js +127 -0
  56. package/dist/name-confirm-dialog.d.ts +15 -0
  57. package/dist/name-confirm-dialog.js +105 -0
  58. package/dist/nav-float-button.d.ts +12 -0
  59. package/dist/nav-float-button.js +249 -0
  60. package/dist/notion-avatar.d.ts +13 -0
  61. package/dist/notion-avatar.js +83 -0
  62. package/dist/placeholder-page.d.ts +10 -0
  63. package/dist/placeholder-page.js +28 -0
  64. package/dist/popover.d.ts +12 -0
  65. package/dist/popover.js +56 -0
  66. package/dist/reference-inline.d.ts +10 -0
  67. package/dist/reference-inline.js +35 -0
  68. package/dist/reference-search.d.ts +12 -0
  69. package/dist/reference-search.js +26 -0
  70. package/dist/resizable.d.ts +9 -0
  71. package/dist/resizable.js +28 -0
  72. package/dist/select.d.ts +17 -0
  73. package/dist/select.js +99 -0
  74. package/dist/separator.d.ts +6 -0
  75. package/dist/separator.js +17 -0
  76. package/dist/sheet.d.ts +16 -0
  77. package/dist/sheet.js +90 -0
  78. package/dist/sidebar.d.ts +71 -0
  79. package/dist/sidebar.js +369 -0
  80. package/dist/skeleton.d.ts +4 -0
  81. package/dist/skeleton.js +12 -0
  82. package/dist/sonner.d.ts +5 -0
  83. package/dist/sonner.js +19 -0
  84. package/dist/switch.d.ts +8 -0
  85. package/dist/switch.js +19 -0
  86. package/dist/textarea.d.ts +5 -0
  87. package/dist/textarea.js +13 -0
  88. package/dist/timezone-provider.d.ts +18 -0
  89. package/dist/timezone-provider.js +29 -0
  90. package/dist/tooltip.d.ts +9 -0
  91. package/dist/tooltip.js +35 -0
  92. package/dist/use-mobile.d.ts +4 -0
  93. package/dist/use-mobile.js +18 -0
  94. package/dist/user-avatar.d.ts +14 -0
  95. package/dist/user-avatar.js +34 -0
  96. package/dist/utils.d.ts +5 -0
  97. package/dist/utils.js +8 -0
  98. package/package.json +178 -49
  99. package/src/ai-command-button.tsx +0 -36
  100. package/src/ai-stream-text.tsx +0 -37
  101. package/src/alert-dialog.tsx +0 -216
  102. package/src/animated-theme-toggler.tsx +0 -272
  103. package/src/auth-client.ts +0 -108
  104. package/src/auth-layout.tsx +0 -66
  105. package/src/avatar.tsx +0 -129
  106. package/src/badge.tsx +0 -66
  107. package/src/button.tsx +0 -84
  108. package/src/card.tsx +0 -120
  109. package/src/checkbox.tsx +0 -50
  110. package/src/context-menu.tsx +0 -280
  111. package/src/dialog.tsx +0 -183
  112. package/src/dropdown-menu.tsx +0 -286
  113. package/src/empty.tsx +0 -121
  114. package/src/grid-pattern.tsx +0 -87
  115. package/src/icon-packs/index.ts +0 -27
  116. package/src/icon-packs/knowledge.ts +0 -55
  117. package/src/icon-packs/prd.ts +0 -63
  118. package/src/icon-packs/project.ts +0 -59
  119. package/src/icon-picker.tsx +0 -68
  120. package/src/index.ts +0 -23
  121. package/src/input.tsx +0 -36
  122. package/src/item.tsx +0 -213
  123. package/src/kbd.tsx +0 -33
  124. package/src/label.tsx +0 -39
  125. package/src/layout-panel-top.tsx +0 -160
  126. package/src/name-confirm-dialog.tsx +0 -153
  127. package/src/nav-float-button.tsx +0 -301
  128. package/src/notion-avatar.tsx +0 -126
  129. package/src/placeholder-page.tsx +0 -42
  130. package/src/popover.tsx +0 -106
  131. package/src/reference-inline.tsx +0 -53
  132. package/src/reference-search.tsx +0 -52
  133. package/src/resizable.tsx +0 -67
  134. package/src/select.tsx +0 -207
  135. package/src/separator.tsx +0 -45
  136. package/src/sheet.tsx +0 -164
  137. package/src/sidebar.tsx +0 -708
  138. package/src/skeleton.tsx +0 -30
  139. package/src/sonner.tsx +0 -37
  140. package/src/switch.tsx +0 -48
  141. package/src/textarea.tsx +0 -35
  142. package/src/timezone-provider.tsx +0 -55
  143. package/src/tooltip.tsx +0 -72
  144. package/src/use-mobile.ts +0 -36
  145. package/src/user-avatar.tsx +0 -79
  146. 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
- ];
@@ -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
- ];
@@ -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 }