@svadmin/ui 0.27.1 → 0.28.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/ui",
3
- "version": "0.27.1",
3
+ "version": "0.28.0",
4
4
  "description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -14,7 +14,9 @@
14
14
  import { Avatar } from './ui/avatar/index.js';
15
15
  import {
16
16
  LayoutDashboard, FileText, Users, Settings, Home,
17
- ChevronLeft, ChevronRight, ChevronDown, LogOut, Sun, Moon, Palette
17
+ ChevronLeft, ChevronRight, ChevronDown, LogOut, Sun, Moon, Palette,
18
+ Image as ImageIcon, Layout, Folder, Type, Video,
19
+ Download, ListTodo, TrendingUp, Sparkles, Images, Bot, Key, KeyRound, CreditCard, BookOpen, Wrench
18
20
  } from '@lucide/svelte';
19
21
 
20
22
  let { collapsed, identity, title, onToggle, onLogout, menu, routeMode = 'auto' }: {
@@ -37,11 +39,28 @@
37
39
  const resources = getResources();
38
40
 
39
41
  const iconMap: Record<string, typeof LayoutDashboard> = {
40
- dashboard: LayoutDashboard,
41
- posts: FileText,
42
- users: Users,
43
- settings: Settings,
44
- home: Home,
42
+ 'dashboard': LayoutDashboard,
43
+ 'posts': FileText,
44
+ 'users': Users,
45
+ 'settings': Settings,
46
+ 'home': Home,
47
+ 'palette': Palette,
48
+ 'image': ImageIcon,
49
+ 'layout': Layout,
50
+ 'folder': Folder,
51
+ 'type': Type,
52
+ 'video': Video,
53
+ 'download': Download,
54
+ 'list-todo': ListTodo,
55
+ 'trending-up': TrendingUp,
56
+ 'sparkles': Sparkles,
57
+ 'images': Images,
58
+ 'bot': Bot,
59
+ 'key': Key,
60
+ 'key-round': KeyRound,
61
+ 'credit-card': CreditCard,
62
+ 'book-open': BookOpen,
63
+ 'wrench': Wrench,
45
64
  };
46
65
 
47
66
  interface NavItem {
@@ -77,7 +96,7 @@
77
96
  items.push({
78
97
  path: `/${r.name}`,
79
98
  label: r.label,
80
- Icon: iconMap[r.name] ?? Settings,
99
+ Icon: iconMap[r.icon ?? r.name] ?? Settings,
81
100
  group: r.group,
82
101
  });
83
102
  }
@@ -205,7 +224,7 @@
205
224
  openGroups = next;
206
225
  }}>
207
226
  <Collapsible.Trigger
208
- class="flex w-full items-center justify-between px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider text-sidebar-foreground/40 hover:text-sidebar-foreground/60 transition-colors"
227
+ class="flex w-full items-center justify-between px-3 py-1.5 text-sm font-semibold tracking-wider text-sidebar-foreground/60 hover:text-sidebar-foreground transition-colors"
209
228
  >
210
229
  <span>{group.name}</span>
211
230
  <ChevronDown class="h-3 w-3 transition-transform {openGroups.has(group.name) ? 'rotate-180' : ''}" />