@allbluecn/admin-app 0.3.4 → 0.3.6

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 (140) hide show
  1. package/package.json +15 -15
  2. package/src/components/__tests__/user-avatar.test.tsx +39 -0
  3. package/src/components/admin/admin-user-menu.tsx +6 -6
  4. package/src/components/admin/developer-log.tsx +7 -7
  5. package/src/components/ai-memory/memory-facts-panel.tsx +9 -9
  6. package/src/components/ai-prompts/preview-panel.tsx +1 -1
  7. package/src/components/ai-prompts/prompt-editor.tsx +8 -8
  8. package/src/components/ai-prompts/prompt-table.tsx +6 -6
  9. package/src/components/ai-prompts/section-editor.tsx +3 -3
  10. package/src/components/ai-prompts/variable-panel.tsx +2 -2
  11. package/src/components/ai-prompts/version-history.tsx +5 -5
  12. package/src/components/ai-provider/model-list-editor.tsx +2 -2
  13. package/src/components/ai-provider/provider-form.tsx +7 -7
  14. package/src/components/ai-provider/provider-table.tsx +6 -6
  15. package/src/components/auth/admin-login-form.tsx +8 -8
  16. package/src/components/auth/icon-input.tsx +2 -2
  17. package/src/components/auth/password-input.tsx +2 -2
  18. package/src/components/component/component-form-dialog.tsx +8 -8
  19. package/src/components/component/component-import-dialog.tsx +6 -6
  20. package/src/components/component/component-table.tsx +3 -3
  21. package/{allblue-ui/src → src}/components/confirm-dialog.tsx +2 -2
  22. package/src/components/dependency/changelog-dialog.tsx +2 -2
  23. package/src/components/dependency/columns.tsx +3 -3
  24. package/src/components/dependency/dependency-table.tsx +7 -7
  25. package/src/components/dependency/edit-dialog.tsx +8 -8
  26. package/src/components/invitations/invitations-page.tsx +13 -13
  27. package/src/components/{knowledge-public → knowledge/public}/bookmark-form-dialog.tsx +10 -10
  28. package/src/components/{knowledge-public → knowledge/public}/compliance-form-dialog.tsx +10 -10
  29. package/src/components/{knowledge-public → knowledge/public}/legal-form-dialog.tsx +11 -11
  30. package/src/components/layout/sidebar-02/app-sidebar.tsx +1 -1
  31. package/src/components/layout/sidebar-02/index.tsx +1 -1
  32. package/src/components/layout/sidebar-02/nav-main.tsx +2 -2
  33. package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -3
  34. package/src/components/market/columns.tsx +4 -4
  35. package/src/components/market/market-app-form.tsx +6 -6
  36. package/src/components/market/market-app-list.tsx +4 -4
  37. package/src/components/monitoring/error-list.tsx +1 -1
  38. package/src/components/monitoring/metrics-stats.tsx +1 -1
  39. package/src/components/monitoring/request-log-table.tsx +1 -1
  40. package/src/components/oauth-providers/provider-page.tsx +9 -9
  41. package/src/components/permissions/assign-dialog.tsx +5 -5
  42. package/src/components/permissions/create-role-dialog.tsx +6 -6
  43. package/{allblue-ui/src → src/components}/ui/checkbox.tsx +4 -4
  44. package/{allblue-ui/src → src/components}/ui/sidebar.tsx +1 -1
  45. package/src/components/user/columns.tsx +5 -5
  46. package/src/components/user/settings-activity-log.tsx +7 -7
  47. package/src/components/user/settings-profile/avatar-uploader.tsx +2 -2
  48. package/src/components/user/settings-profile/social-links.tsx +2 -2
  49. package/src/components/user/settings-profile.tsx +6 -6
  50. package/src/components/user/user-create-dialog.tsx +6 -6
  51. package/src/components/user/user-detail/error-boundary.tsx +1 -1
  52. package/src/components/user/user-detail/user-detail-dialogs.tsx +6 -6
  53. package/src/components/user/user-filters.tsx +3 -3
  54. package/{allblue-ui/src → src}/components/user-avatar.tsx +7 -4
  55. package/src/lib/__tests__/avatar-shape.test.ts +44 -0
  56. package/src/lib/auth.config.ts +1 -1
  57. package/{allblue-ui/src/lib/avatar.ts → src/lib/avatar-shape.ts} +15 -21
  58. package/src/providers/index.tsx +1 -1
  59. package/src/routes/__root.tsx +1 -1
  60. package/src/routes/_nav/audit/route.lazy.tsx +1 -1
  61. package/src/routes/_nav/compliance/route.lazy.tsx +3 -3
  62. package/src/routes/_nav/components/route.lazy.tsx +4 -4
  63. package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +16 -16
  64. package/src/routes/_nav/knowledge-public/bookmarks/route.tsx +1 -1
  65. package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +14 -14
  66. package/src/routes/_nav/knowledge-public/compliance/route.tsx +1 -1
  67. package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +14 -14
  68. package/src/routes/_nav/knowledge-public/legal/route.tsx +1 -1
  69. package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +3 -3
  70. package/src/routes/_nav/licenses/new/route.lazy.tsx +5 -5
  71. package/src/routes/_nav/licenses/route.lazy.tsx +1 -1
  72. package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +2 -2
  73. package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
  74. package/src/routes/_nav/monitoring/health/route.lazy.tsx +3 -3
  75. package/src/routes/_nav/monitoring/logs/route.lazy.tsx +3 -3
  76. package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +3 -3
  77. package/src/routes/_nav/monitoring/route.lazy.tsx +2 -2
  78. package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
  79. package/src/routes/_nav/permissions/route.lazy.tsx +4 -4
  80. package/src/routes/_nav/sso/route.lazy.tsx +2 -2
  81. package/src/routes/_nav/users/$userId/route.lazy.tsx +9 -9
  82. package/src/routes/_nav/users/-components/users-table.tsx +1 -1
  83. package/src/routes/_nav/users/route.lazy.tsx +1 -1
  84. package/src/routes/login/route.lazy.tsx +1 -1
  85. package/src/routes/setup/route.lazy.tsx +2 -2
  86. package/src/server/dependency/helpers.ts +0 -1
  87. package/src/server/{knowledge-public → knowledge/public}/github-sync.ts +12 -2
  88. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/create.ts +1 -1
  89. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/list.ts +2 -1
  90. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/sync-all-github.ts +3 -2
  91. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/update.ts +3 -2
  92. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/create.ts +1 -1
  93. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/list.ts +2 -1
  94. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/update.ts +3 -2
  95. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/create.ts +1 -1
  96. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/list.ts +2 -1
  97. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/update.ts +3 -2
  98. package/src/styles/globals.css +3 -3
  99. package/allblue-ui/package.json +0 -6
  100. package/allblue-ui/src/components/infinite-scroll-sentinel.tsx +0 -37
  101. package/allblue-ui/src/hooks/use-load-more.ts +0 -57
  102. package/allblue-ui/src/index.ts +0 -31
  103. package/allblue-ui/src/lib/utils.ts +0 -1
  104. /package/{allblue-ui/src → src/components}/data-table/data-table-pagination.tsx +0 -0
  105. /package/{allblue-ui/src → src/components}/data-table/data-table.tsx +0 -0
  106. /package/{allblue-ui/src → src/components}/data-table/table-detail-layout.tsx +0 -0
  107. /package/{allblue-ui/src → src}/components/notion-avatar.tsx +0 -0
  108. /package/{allblue-ui/src → src/components}/ui/alert-dialog.tsx +0 -0
  109. /package/{allblue-ui/src → src/components}/ui/alert.tsx +0 -0
  110. /package/{allblue-ui/src → src/components}/ui/avatar.tsx +0 -0
  111. /package/{allblue-ui/src → src/components}/ui/badge.tsx +0 -0
  112. /package/{allblue-ui/src → src/components}/ui/button.tsx +0 -0
  113. /package/{allblue-ui/src → src/components}/ui/card.tsx +0 -0
  114. /package/{allblue-ui/src → src/components}/ui/collapsible.tsx +0 -0
  115. /package/{allblue-ui/src → src/components}/ui/dialog.tsx +0 -0
  116. /package/{allblue-ui/src → src/components}/ui/dropdown-menu.tsx +0 -0
  117. /package/{allblue-ui/src → src/components}/ui/field.tsx +0 -0
  118. /package/{allblue-ui/src → src/components}/ui/input-group.tsx +0 -0
  119. /package/{allblue-ui/src → src/components}/ui/input.tsx +0 -0
  120. /package/{allblue-ui/src → src/components}/ui/label.tsx +0 -0
  121. /package/{allblue-ui/src → src/components}/ui/pagination.tsx +0 -0
  122. /package/{allblue-ui/src → src/components}/ui/select.tsx +0 -0
  123. /package/{allblue-ui/src → src/components}/ui/separator.tsx +0 -0
  124. /package/{allblue-ui/src → src/components}/ui/sheet.tsx +0 -0
  125. /package/{allblue-ui/src → src/components}/ui/skeleton.tsx +0 -0
  126. /package/{allblue-ui/src → src/components}/ui/switch.tsx +0 -0
  127. /package/{allblue-ui/src → src/components}/ui/table.tsx +0 -0
  128. /package/{allblue-ui/src → src/components}/ui/textarea.tsx +0 -0
  129. /package/{allblue-ui/src → src/components}/ui/toast.tsx +0 -0
  130. /package/{allblue-ui/src → src/components}/ui/tooltip.tsx +0 -0
  131. /package/{allblue-ui/src → src}/hooks/use-mobile.ts +0 -0
  132. /package/{allblue-ui/src → src}/lib/datetime.ts +0 -0
  133. /package/{allblue-ui/src → src}/lib/sanitize.ts +0 -0
  134. /package/src/server/{knowledge-public → knowledge/public}/canonical-id.ts +0 -0
  135. /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/delete.ts +0 -0
  136. /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/detail.ts +0 -0
  137. /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/delete.ts +0 -0
  138. /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/detail.ts +0 -0
  139. /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/delete.ts +0 -0
  140. /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/detail.ts +0 -0
@@ -17,7 +17,7 @@
17
17
 
18
18
  import { useState } from "react"
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { toast } from '@allbluecn/ui/toast'
20
+ import { toast } from '@/components/ui/toast'
21
21
  import { Loader2, Pencil } from "lucide-react"
22
22
  import {
23
23
  DEPENDENCY_CATEGORIES,
@@ -26,13 +26,13 @@ import {
26
26
  type ThirdPartyDependencyRow,
27
27
  } from "@allbluecn/kernel"
28
28
  import { updateDependencyFn } from "@/server/serverFns/dependency/update"
29
- import { Button } from "@allbluecn/ui/button"
30
- import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@allbluecn/ui/dialog"
31
- import { Input } from "@allbluecn/ui/input"
32
- import { Label } from "@allbluecn/ui/label"
33
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@allbluecn/ui/select"
34
- import { Textarea } from "@allbluecn/ui/textarea"
35
- import { Tooltip, TooltipContent, TooltipTrigger } from "@allbluecn/ui/tooltip"
29
+ import { Button } from "@/components/ui/button"
30
+ import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
31
+ import { Input } from "@/components/ui/input"
32
+ import { Label } from "@/components/ui/label"
33
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
34
+ import { Textarea } from "@/components/ui/textarea"
35
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
36
36
 
37
37
  export function EditDependencyDialog({
38
38
  row,
@@ -19,15 +19,15 @@ import { useState } from "react"
19
19
  import type React from "react"
20
20
  import { m } from "@/paraglide/messages.js"
21
21
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
22
- import { toast } from "@allbluecn/ui/toast"
22
+ import { toast } from "@/components/ui/toast"
23
23
  import { Ticket, Plus, Copy, Ban, CheckCircle2, Trash2, Users } from "lucide-react"
24
24
  import { PageHeader } from "@/components/common/page-header"
25
- import { Button } from "@allbluecn/ui/button"
26
- import { Badge } from "@allbluecn/ui/badge"
27
- import { Input } from "@allbluecn/ui/input"
28
- import { Label } from "@allbluecn/ui/label"
29
- import { Switch } from "@allbluecn/ui/switch"
30
- import { Skeleton } from "@allbluecn/ui/skeleton"
25
+ import { Button } from "@/components/ui/button"
26
+ import { Badge } from "@/components/ui/badge"
27
+ import { Input } from "@/components/ui/input"
28
+ import { Label } from "@/components/ui/label"
29
+ import { Switch } from "@/components/ui/switch"
30
+ import { Skeleton } from "@/components/ui/skeleton"
31
31
  import {
32
32
  Dialog,
33
33
  DialogContent,
@@ -35,8 +35,8 @@ import {
35
35
  DialogFooter,
36
36
  DialogHeader,
37
37
  DialogTitle,
38
- } from "@allbluecn/ui/dialog"
39
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
38
+ } from "@/components/ui/dialog"
39
+ import { ConfirmDialog } from "@/components/confirm-dialog"
40
40
  import {
41
41
  Table,
42
42
  TableBody,
@@ -44,13 +44,13 @@ import {
44
44
  TableHead,
45
45
  TableHeader,
46
46
  TableRow,
47
- } from "@allbluecn/ui/table"
47
+ } from "@/components/ui/table"
48
48
  import {
49
49
  Tooltip,
50
50
  TooltipContent,
51
51
  TooltipTrigger,
52
- } from "@allbluecn/ui/tooltip"
53
- import { Card, CardContent } from "@allbluecn/ui/card"
52
+ } from "@/components/ui/tooltip"
53
+ import { Card, CardContent } from "@/components/ui/card"
54
54
  import {
55
55
  listInvitationCodesFn,
56
56
  createInvitationCodeFn,
@@ -59,7 +59,7 @@ import {
59
59
  getRegistrationModeFn,
60
60
  setRegistrationModeFn,
61
61
  } from "@/server/serverFns/invitations"
62
- import { formatTimestamp } from "@allbluecn/ui/lib/datetime"
62
+ import { formatTimestamp } from "@/lib/datetime"
63
63
 
64
64
  type RegistrationMode = "invite" | "open"
65
65
 
@@ -17,21 +17,21 @@
17
17
 
18
18
  import { useState, useEffect } from 'react'
19
19
  import { Loader2 } from 'lucide-react'
20
- import { toast } from '@allbluecn/ui/toast'
21
- import { Button } from '@allbluecn/ui/button'
22
- import { Input } from '@allbluecn/ui/input'
23
- import { Label } from '@allbluecn/ui/label'
24
- import { Textarea } from '@allbluecn/ui/textarea'
20
+ import { toast } from '@/components/ui/toast'
21
+ import { Button } from '@/components/ui/button'
22
+ import { Input } from '@/components/ui/input'
23
+ import { Label } from '@/components/ui/label'
24
+ import { Textarea } from '@/components/ui/textarea'
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogFooter,
29
29
  DialogHeader,
30
30
  DialogTitle,
31
- } from '@allbluecn/ui/dialog'
32
- import { adminCreateBookmarkFn } from '@/server/serverFns/knowledge-public/bookmarks/create'
33
- import { adminUpdateBookmarkFn } from '@/server/serverFns/knowledge-public/bookmarks/update'
34
- import { adminGetBookmarkDetailFn } from '@/server/serverFns/knowledge-public/bookmarks/detail'
31
+ } from '@/components/ui/dialog'
32
+ import { adminCreateBookmarkFn } from '@/server/serverFns/knowledge/public/bookmarks/create'
33
+ import { adminUpdateBookmarkFn } from '@/server/serverFns/knowledge/public/bookmarks/update'
34
+ import { adminGetBookmarkDetailFn } from '@/server/serverFns/knowledge/public/bookmarks/detail'
35
35
 
36
36
  export interface BookmarkRow {
37
37
  id: string
@@ -80,7 +80,7 @@ export function BookmarkFormDialog({ open, onOpenChange, item, onSuccess }: Book
80
80
  if (item) {
81
81
  setLoading(true)
82
82
  adminGetBookmarkDetailFn({ data: { id: item.id } })
83
- .then((d: any) => {
83
+ .then((d: Awaited<ReturnType<typeof adminGetBookmarkDetailFn>>) => {
84
84
  setForm({
85
85
  title: d.title ?? '',
86
86
  url: d.url ?? '',
@@ -17,21 +17,21 @@
17
17
 
18
18
  import { useState, useEffect } from 'react'
19
19
  import { Loader2, PlusIcon, Trash2Icon } from 'lucide-react'
20
- import { toast } from '@allbluecn/ui/toast'
21
- import { Button } from '@allbluecn/ui/button'
22
- import { Input } from '@allbluecn/ui/input'
23
- import { Label } from '@allbluecn/ui/label'
24
- import { Textarea } from '@allbluecn/ui/textarea'
20
+ import { toast } from '@/components/ui/toast'
21
+ import { Button } from '@/components/ui/button'
22
+ import { Input } from '@/components/ui/input'
23
+ import { Label } from '@/components/ui/label'
24
+ import { Textarea } from '@/components/ui/textarea'
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogFooter,
29
29
  DialogHeader,
30
30
  DialogTitle,
31
- } from '@allbluecn/ui/dialog'
32
- import { adminCreateComplianceFn } from '@/server/serverFns/knowledge-public/compliance/create'
33
- import { adminUpdateComplianceFn } from '@/server/serverFns/knowledge-public/compliance/update'
34
- import { adminGetComplianceDetailFn } from '@/server/serverFns/knowledge-public/compliance/detail'
31
+ } from '@/components/ui/dialog'
32
+ import { adminCreateComplianceFn } from '@/server/serverFns/knowledge/public/compliance/create'
33
+ import { adminUpdateComplianceFn } from '@/server/serverFns/knowledge/public/compliance/update'
34
+ import { adminGetComplianceDetailFn } from '@/server/serverFns/knowledge/public/compliance/detail'
35
35
 
36
36
  export interface ComplianceRow {
37
37
  id: string
@@ -80,7 +80,7 @@ export function ComplianceFormDialog({ open, onOpenChange, item, onSuccess }: Co
80
80
  if (item) {
81
81
  setLoading(true)
82
82
  adminGetComplianceDetailFn({ data: { id: item.id } })
83
- .then((d: any) => {
83
+ .then((d: Awaited<ReturnType<typeof adminGetComplianceDetailFn>>) => {
84
84
  setForm({
85
85
  title: d.title ?? '',
86
86
  code: '',
@@ -18,28 +18,28 @@
18
18
  import { useState, useEffect } from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { Loader2 } from 'lucide-react'
21
- import { toast } from '@allbluecn/ui/toast'
22
- import { Button } from '@allbluecn/ui/button'
23
- import { Input } from '@allbluecn/ui/input'
24
- import { Label } from '@allbluecn/ui/label'
25
- import { Textarea } from '@allbluecn/ui/textarea'
21
+ import { toast } from '@/components/ui/toast'
22
+ import { Button } from '@/components/ui/button'
23
+ import { Input } from '@/components/ui/input'
24
+ import { Label } from '@/components/ui/label'
25
+ import { Textarea } from '@/components/ui/textarea'
26
26
  import {
27
27
  Select,
28
28
  SelectContent,
29
29
  SelectItem,
30
30
  SelectTrigger,
31
31
  SelectValue,
32
- } from '@allbluecn/ui/select'
32
+ } from '@/components/ui/select'
33
33
  import {
34
34
  Dialog,
35
35
  DialogContent,
36
36
  DialogFooter,
37
37
  DialogHeader,
38
38
  DialogTitle,
39
- } from '@allbluecn/ui/dialog'
40
- import { adminCreateLegalFn } from '@/server/serverFns/knowledge-public/legal/create'
41
- import { adminUpdateLegalFn } from '@/server/serverFns/knowledge-public/legal/update'
42
- import { adminGetLegalDetailFn } from '@/server/serverFns/knowledge-public/legal/detail'
39
+ } from '@/components/ui/dialog'
40
+ import { adminCreateLegalFn } from '@/server/serverFns/knowledge/public/legal/create'
41
+ import { adminUpdateLegalFn } from '@/server/serverFns/knowledge/public/legal/update'
42
+ import { adminGetLegalDetailFn } from '@/server/serverFns/knowledge/public/legal/detail'
43
43
 
44
44
  export interface LegalRow {
45
45
  id: string
@@ -106,7 +106,7 @@ export function LegalFormDialog({ open, onOpenChange, item, onSuccess }: LegalFo
106
106
  if (item) {
107
107
  setLoading(true)
108
108
  adminGetLegalDetailFn({ data: { id: item.id } })
109
- .then((d: any) => {
109
+ .then((d: Awaited<ReturnType<typeof adminGetLegalDetailFn>>) => {
110
110
  setForm({
111
111
  title: d.title ?? '',
112
112
  code: '',
@@ -22,7 +22,7 @@ import {
22
22
  SidebarHeader,
23
23
  SidebarTrigger,
24
24
  useSidebar,
25
- } from "@allbluecn/ui/sidebar";
25
+ } from "@/components/ui/sidebar";
26
26
  import { cn } from "@/lib/utils";
27
27
  import { m } from '@/paraglide/messages.js'
28
28
  import { motion } from "motion/react";
@@ -16,7 +16,7 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  import type { ReactNode } from "react"
19
- import { SidebarInset, SidebarProvider } from "@allbluecn/ui/sidebar";
19
+ import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
20
20
  import { DashboardSidebar } from "@/components/layout/sidebar-02/app-sidebar";
21
21
 
22
22
  export default function Sidebar02({ children }: { children?: ReactNode }) {
@@ -19,7 +19,7 @@
19
19
  import {
20
20
  Collapsible,
21
21
  CollapsibleContent,
22
- } from "@allbluecn/ui/collapsible";
22
+ } from "@/components/ui/collapsible";
23
23
  import {
24
24
  SidebarMenu,
25
25
  SidebarMenuButton,
@@ -28,7 +28,7 @@ import {
28
28
  SidebarMenuSubButton,
29
29
  SidebarMenuItem as SidebarMenuSubItem,
30
30
  useSidebar,
31
- } from "@allbluecn/ui/sidebar";
31
+ } from "@/components/ui/sidebar";
32
32
  import { cn } from "@/lib/utils";
33
33
  import { ChevronDown, ChevronUp } from "lucide-react";
34
34
  import { Link } from "@tanstack/react-router";
@@ -16,8 +16,8 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { Avatar, AvatarFallback, AvatarImage } from "@allbluecn/ui/avatar";
20
- import { Button } from "@allbluecn/ui/button";
19
+ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
20
+ import { Button } from "@/components/ui/button";
21
21
  import {
22
22
  DropdownMenu,
23
23
  DropdownMenuContent,
@@ -25,7 +25,7 @@ import {
25
25
  DropdownMenuLabel,
26
26
  DropdownMenuSeparator,
27
27
  DropdownMenuTrigger,
28
- } from "@allbluecn/ui/dropdown-menu";
28
+ } from "@/components/ui/dropdown-menu";
29
29
  import { BellIcon } from "lucide-react";
30
30
 
31
31
  type Notification = {
@@ -15,17 +15,17 @@
15
15
  // You should have received a copy of the GNU Affero General Public License
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
- import type { AdminColumnDef } from "@allbluecn/ui/data-table";
18
+ import type { AdminColumnDef } from "@/components/data-table/data-table";
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Badge } from "@allbluecn/ui/badge"
21
- import { Button } from "@allbluecn/ui/button"
20
+ import { Badge } from "@/components/ui/badge"
21
+ import { Button } from "@/components/ui/button"
22
22
  import {
23
23
  DropdownMenu,
24
24
  DropdownMenuContent,
25
25
  DropdownMenuItem,
26
26
  DropdownMenuSeparator,
27
27
  DropdownMenuTrigger,
28
- } from "@allbluecn/ui/dropdown-menu"
28
+ } from "@/components/ui/dropdown-menu"
29
29
  import { MoreHorizontalIcon, PencilIcon, TrashIcon, EyeIcon, EyeOffIcon } from "lucide-react"
30
30
 
31
31
  export type MarketAppRow = {
@@ -25,18 +25,18 @@ import {
25
25
  DialogFooter,
26
26
  DialogHeader,
27
27
  DialogTitle,
28
- } from "@allbluecn/ui/dialog"
29
- import { Button } from "@allbluecn/ui/button"
30
- import { Input } from "@allbluecn/ui/input"
31
- import { Label } from "@allbluecn/ui/label"
28
+ } from "@/components/ui/dialog"
29
+ import { Button } from "@/components/ui/button"
30
+ import { Input } from "@/components/ui/input"
31
+ import { Label } from "@/components/ui/label"
32
32
  import {
33
33
  Select,
34
34
  SelectContent,
35
35
  SelectItem,
36
36
  SelectTrigger,
37
37
  SelectValue,
38
- } from "@allbluecn/ui/select"
39
- import { toast } from '@allbluecn/ui/toast'
38
+ } from "@/components/ui/select"
39
+ import { toast } from '@/components/ui/toast'
40
40
 
41
41
  interface MarketAppFormProps {
42
42
  open: boolean
@@ -17,15 +17,15 @@
17
17
 
18
18
  import { useCallback, useEffect, useState } from "react"
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { DataTable } from "@allbluecn/ui/data-table"
20
+ import { DataTable } from "@/components/data-table/data-table"
21
21
  import { getMarketColumns, MarketAppRow } from "./columns"
22
22
  import { MarketAppForm } from "./market-app-form"
23
23
  import { MarketAppFormData } from "@/lib/anyhub/types"
24
- import { Button } from "@allbluecn/ui/button"
24
+ import { Button } from "@/components/ui/button"
25
25
  import { PlusIcon } from "lucide-react"
26
- import { toast } from '@allbluecn/ui/toast'
26
+ import { toast } from '@/components/ui/toast'
27
27
  import { listMarketAppsFn, updateMarketAppFn, deleteMarketAppFn } from "@/server/serverFns/anyhub/market"
28
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
28
+ import { ConfirmDialog } from "@/components/confirm-dialog"
29
29
 
30
30
  export function MarketAppList() {
31
31
  const [apps, setApps] = useState<MarketAppRow[]>([])
@@ -17,7 +17,7 @@
17
17
 
18
18
  import { useState } from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
20
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
21
21
 
22
22
  function formatRelativeTime(dateStr: string): string {
23
23
  const now = new Date()
@@ -15,7 +15,7 @@
15
15
  // You should have received a copy of the GNU Affero General Public License
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
18
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { describeMetric } from '@/lib/monitoring-descriptions'
21
21
  import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
@@ -17,7 +17,7 @@
17
17
 
18
18
  import type React from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
20
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
21
21
  import { describePath } from '@/lib/monitoring-descriptions'
22
22
  import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
23
23
  import { ArrowDown, ArrowUp, Info } from 'lucide-react'
@@ -19,17 +19,17 @@ import { useEffect, useState } from 'react'
19
19
  import type React from 'react'
20
20
  import { m } from '@/paraglide/messages.js'
21
21
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
22
- import { toast } from '@allbluecn/ui/toast'
22
+ import { toast } from '@/components/ui/toast'
23
23
  import { Eye, EyeOff, KeyRound, PlugZap, Save, Trash2 } from 'lucide-react'
24
24
  import { PageHeader } from '@/components/common/page-header'
25
- import { Button } from '@allbluecn/ui/button'
26
- import { Badge } from '@allbluecn/ui/badge'
27
- import { Card, CardContent } from '@allbluecn/ui/card'
28
- import { Input } from '@allbluecn/ui/input'
29
- import { Label } from '@allbluecn/ui/label'
30
- import { Switch } from '@allbluecn/ui/switch'
31
- import { Skeleton } from '@allbluecn/ui/skeleton'
32
- import { ConfirmDialog } from '@allbluecn/ui/components/confirm-dialog'
25
+ import { Button } from '@/components/ui/button'
26
+ import { Badge } from '@/components/ui/badge'
27
+ import { Card, CardContent } from '@/components/ui/card'
28
+ import { Input } from '@/components/ui/input'
29
+ import { Label } from '@/components/ui/label'
30
+ import { Switch } from '@/components/ui/switch'
31
+ import { Skeleton } from '@/components/ui/skeleton'
32
+ import { ConfirmDialog } from '@/components/confirm-dialog'
33
33
  import {
34
34
  deleteOAuthProviderFn,
35
35
  listOAuthProvidersFn,
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
2
2
  import type React from 'react'
3
3
  import { m } from '@/paraglide/messages.js'
4
4
  import { useServerFn } from '@tanstack/react-start'
5
- import { toast } from '@allbluecn/ui/toast'
5
+ import { toast } from '@/components/ui/toast'
6
6
  import {
7
7
  assignRoleFn,
8
8
  unassignRoleFn,
@@ -15,9 +15,9 @@ import {
15
15
  DialogFooter,
16
16
  DialogHeader,
17
17
  DialogTitle,
18
- } from '@allbluecn/ui/dialog'
19
- import { Button } from '@allbluecn/ui/button'
20
- import { Input } from '@allbluecn/ui/input'
18
+ } from '@/components/ui/dialog'
19
+ import { Button } from '@/components/ui/button'
20
+ import { Input } from '@/components/ui/input'
21
21
  import {
22
22
  Table,
23
23
  TableBody,
@@ -25,7 +25,7 @@ import {
25
25
  TableHead,
26
26
  TableHeader,
27
27
  TableRow,
28
- } from '@allbluecn/ui/table'
28
+ } from '@/components/ui/table'
29
29
  import type { AssignmentItem, RoleItem } from './types'
30
30
 
31
31
  export function AssignDialog({
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react'
2
2
  import type React from 'react'
3
3
  import { m } from '@/paraglide/messages.js'
4
4
  import { useServerFn } from '@tanstack/react-start'
5
- import { toast } from '@allbluecn/ui/toast'
5
+ import { toast } from '@/components/ui/toast'
6
6
  import { createRoleFn } from '@/server/serverFns/permissions'
7
7
  import {
8
8
  Dialog,
@@ -11,17 +11,17 @@ import {
11
11
  DialogFooter,
12
12
  DialogHeader,
13
13
  DialogTitle,
14
- } from '@allbluecn/ui/dialog'
15
- import { Button } from '@allbluecn/ui/button'
16
- import { Input } from '@allbluecn/ui/input'
17
- import { Label } from '@allbluecn/ui/label'
14
+ } from '@/components/ui/dialog'
15
+ import { Button } from '@/components/ui/button'
16
+ import { Input } from '@/components/ui/input'
17
+ import { Label } from '@/components/ui/label'
18
18
  import {
19
19
  Select,
20
20
  SelectContent,
21
21
  SelectItem,
22
22
  SelectTrigger,
23
23
  SelectValue,
24
- } from '@allbluecn/ui/select'
24
+ } from '@/components/ui/select'
25
25
  import { ALL_ACTIONS, ALL_RESOURCES, LEVELS, type ResourcePermission } from './types'
26
26
 
27
27
  export function CreateRoleDialog({
@@ -1,12 +1,13 @@
1
1
 
2
2
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
3
3
  import { cn } from "cn"
4
- import { CheckIcon } from "lucide-react"
4
+ import { CheckIcon, MinusIcon } from "lucide-react"
5
5
 
6
- function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
6
+ function Checkbox({ className, indeterminate, ...props }: CheckboxPrimitive.Root.Props) {
7
7
  return (
8
8
  <CheckboxPrimitive.Root
9
9
  data-slot="checkbox"
10
+ indeterminate={indeterminate}
10
11
  className={cn(
11
12
  "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
12
13
  className
@@ -17,8 +18,7 @@ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
17
18
  data-slot="checkbox-indicator"
18
19
  className="grid place-content-center text-current transition-none [&>svg]:size-3.5"
19
20
  >
20
- <CheckIcon
21
- />
21
+ {indeterminate ? <MinusIcon /> : <CheckIcon />}
22
22
  </CheckboxPrimitive.Indicator>
23
23
  </CheckboxPrimitive.Root>
24
24
  )
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
  import { cn } from "cn"
6
6
 
7
- import { useIsMobile } from "../hooks/use-mobile"
7
+ import { useIsMobile } from "@/hooks/use-mobile"
8
8
  import { Button } from "./button"
9
9
  import { Input } from "./input"
10
10
  import { Separator } from "./separator"
@@ -16,12 +16,12 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { Badge } from "@allbluecn/ui/badge";
20
- import { Button } from "@allbluecn/ui/button";
19
+ import { Badge } from "@/components/ui/badge";
20
+ import { Button } from "@/components/ui/button";
21
21
  import { EyeIcon } from "lucide-react";
22
- import { UserAvatar } from "@allbluecn/ui/components/user-avatar";
22
+ import { UserAvatar } from "@/components/user-avatar";
23
23
  import type { AvatarConfig } from "@allbluecn/kernel";
24
- import type { AdminColumnDef } from "@allbluecn/ui/data-table";
24
+ import type { AdminColumnDef } from "@/components/data-table/data-table";
25
25
 
26
26
  export type UserRow = {
27
27
  id: string;
@@ -79,7 +79,7 @@ export function getUserColumns(onView: (user: UserRow) => void): AdminColumnDef<
79
79
  <div className="flex items-center gap-2">
80
80
  <UserAvatar
81
81
  avatarConfig={user.avatarConfig as AvatarConfig | null}
82
- bgShape={user.bgShape as "square" | "rounded" | null}
82
+ bgShape={user.bgShape}
83
83
  bgColor={user.bgColor}
84
84
  name={user.username}
85
85
  size="md"
@@ -26,28 +26,28 @@ import {
26
26
  import { useState } from "react";
27
27
  import { m } from '@/paraglide/messages.js'
28
28
  import { cn } from "@/lib/utils";
29
- import { Badge } from "@allbluecn/ui/badge";
30
- import { Button } from "@allbluecn/ui/button";
29
+ import { Badge } from "@/components/ui/badge";
30
+ import { Button } from "@/components/ui/button";
31
31
  import {
32
32
  Card,
33
33
  CardContent,
34
34
  CardDescription,
35
35
  CardHeader,
36
36
  CardTitle,
37
- } from "@allbluecn/ui/card";
38
- import { FieldLabel } from "@allbluecn/ui/field";
37
+ } from "@/components/ui/card";
38
+ import { FieldLabel } from "@/components/ui/field";
39
39
  import {
40
40
  InputGroup,
41
41
  InputGroupInput,
42
- } from "@allbluecn/ui/input-group";
42
+ } from "@/components/ui/input-group";
43
43
  import {
44
44
  Select,
45
45
  SelectContent,
46
46
  SelectItem,
47
47
  SelectTrigger,
48
48
  SelectValue,
49
- } from "@allbluecn/ui/select";
50
- import { Separator } from "@allbluecn/ui/separator";
49
+ } from "@/components/ui/select";
50
+ import { Separator } from "@/components/ui/separator";
51
51
 
52
52
  export interface ActivityLogEntry {
53
53
  id: string;
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { Camera, Loader2, X } from "lucide-react";
4
4
  import { cn } from "@/lib/utils";
5
- import { FieldLabel } from "@allbluecn/ui/field";
6
- import { Button } from "@allbluecn/ui/button";
5
+ import { FieldLabel } from "@/components/ui/field";
6
+ import { Button } from "@/components/ui/button";
7
7
 
8
8
  /**
9
9
  * 头像上传区(纯展示):预览/拖拽/进度态由父组件持有——errors 是父级
@@ -4,11 +4,11 @@ import {
4
4
  Field,
5
5
  FieldContent,
6
6
  FieldLabel,
7
- } from "@allbluecn/ui/field";
7
+ } from "@/components/ui/field";
8
8
  import {
9
9
  InputGroup,
10
10
  InputGroupInput,
11
- } from "@allbluecn/ui/input-group";
11
+ } from "@/components/ui/input-group";
12
12
  import {
13
13
  defaultSocialPlatforms,
14
14
  socialPlatformLabels,
@@ -18,27 +18,27 @@
18
18
  import { Loader2, Save } from "lucide-react";
19
19
  import { useCallback, useRef, useState } from "react";
20
20
  import { cn } from "@/lib/utils";
21
- import { Button } from "@allbluecn/ui/button";
21
+ import { Button } from "@/components/ui/button";
22
22
  import {
23
23
  Card,
24
24
  CardContent,
25
25
  CardDescription,
26
26
  CardHeader,
27
27
  CardTitle,
28
- } from "@allbluecn/ui/card";
28
+ } from "@/components/ui/card";
29
29
  import {
30
30
  Field,
31
31
  FieldContent,
32
32
  FieldDescription,
33
33
  FieldError,
34
34
  FieldLabel,
35
- } from "@allbluecn/ui/field";
35
+ } from "@/components/ui/field";
36
36
  import {
37
37
  InputGroup,
38
38
  InputGroupInput,
39
- } from "@allbluecn/ui/input-group";
40
- import { Separator } from "@allbluecn/ui/separator";
41
- import { Textarea } from "@allbluecn/ui/textarea";
39
+ } from "@/components/ui/input-group";
40
+ import { Separator } from "@/components/ui/separator";
41
+ import { Textarea } from "@/components/ui/textarea";
42
42
  import { AvatarUploader } from "./settings-profile/avatar-uploader";
43
43
  import { SocialLinks } from "./settings-profile/social-links";
44
44
  import type {