@craftzbay/ui 0.2.1 → 0.2.3

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.
@@ -1,9 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
+ export type AppShellNavKey = 'home' | 'projects' | 'inbox' | 'members' | 'insights' | 'bookmarks' | 'apps' | 'settings' | 'integrations' | 'help';
2
3
  export interface AppShellProps {
3
4
  /** Page content. */
4
5
  children: ReactNode;
5
- /** Logo / wordmark for the TopNav. */
6
+ /** Logo / wordmark rendered at the top of the sidebar. */
6
7
  brand: ReactNode;
8
+ /** Which sidebar item is active. Defaults to `home`. */
9
+ active?: AppShellNavKey;
7
10
  }
8
- export declare function AppShell({ children, brand }: AppShellProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function AppShell({ children, brand, active }: AppShellProps): import("react/jsx-runtime").JSX.Element;
9
12
  export declare function Dashboard(): import("react/jsx-runtime").JSX.Element;
@@ -8,10 +8,10 @@ declare const sizeMap: {
8
8
  readonly lg: "size-10 text-sm";
9
9
  readonly xl: "size-12 text-base";
10
10
  };
11
- declare const avatar: (props?: ({
11
+ declare const avatarWrapper: (props?: ({
12
12
  size?: "md" | "xs" | "sm" | "lg" | "xl" | null | undefined;
13
13
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
14
- export interface AvatarProps extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatar> {
14
+ export interface AvatarProps extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarWrapper> {
15
15
  /** Image URL. If absent or fails to load, fallback initials are shown. */
16
16
  src?: string;
17
17
  /** Alt text for the image; falls back to fallback when there's no `src`. */
@@ -1,4 +1,10 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ interface SidebarContextValue {
3
+ collapsed: boolean;
4
+ }
5
+ /** Read the parent Sidebar's collapsed state. Useful for brand/footer slots
6
+ * that need to swap between full and compact rendering. */
7
+ export declare function useSidebar(): SidebarContextValue;
2
8
  export interface SidebarProps extends HTMLAttributes<HTMLElement> {
3
9
  /** Default state on first mount. Use `defaultCollapsed` for uncontrolled. */
4
10
  defaultCollapsed?: boolean;
@@ -6,6 +12,8 @@ export interface SidebarProps extends HTMLAttributes<HTMLElement> {
6
12
  collapsed?: boolean;
7
13
  /** Called when the user toggles via the rail or keyboard. */
8
14
  onCollapsedChange?: (next: boolean) => void;
15
+ /** Header slot pinned to the top (brand, workspace switcher, etc.). */
16
+ header?: ReactNode;
9
17
  /** Footer slot pinned to the bottom (user card, version, etc.). */
10
18
  footer?: ReactNode;
11
19
  }
@@ -65,3 +73,4 @@ export declare function SidebarGroup({ icon, label, defaultOpen, children }: Sid
65
73
  export declare namespace SidebarGroup {
66
74
  var displayName: string;
67
75
  }
76
+ export {};
@@ -8,4 +8,4 @@
8
8
  * - 20px for use inside buttons
9
9
  * - strokeWidth 1.5
10
10
  */
11
- export { AlertCircle, AlertTriangle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bell, Calendar, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, Copy, CornerDownLeft, CreditCard, Download, Edit2, Ellipsis, Eye, EyeOff, Filter, Folder, GripVertical, Home, Lock, HelpCircle, Info, Link2, Loader2, Mail, Menu, Minus, MoreHorizontal, Plus, Search, Settings, Sun, Moon, Trash2, Upload, User, Users, X, XCircle, ExternalLink, type LucideIcon, type LucideProps, } from 'lucide-react';
11
+ export { AlertCircle, AlertTriangle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, BarChart3, Bell, Bookmark, Calendar, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, Copy, CornerDownLeft, CreditCard, Download, Edit2, Ellipsis, Eye, EyeOff, Filter, Folder, GripVertical, Home, Inbox, LayoutGrid, Lock, LogOut, HelpCircle, Info, Link2, Loader2, Mail, Menu, Minus, MoreHorizontal, Plug, Plus, Search, Sparkles, Settings, Sun, Moon, Trash2, Upload, User, Users, X, XCircle, ExternalLink, type LucideIcon, type LucideProps, } from 'lucide-react';