gov-layout 1.0.0 → 1.1.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/index.d.mts CHANGED
@@ -40,30 +40,39 @@ interface StaffSidebarProps {
40
40
  width?: string;
41
41
  /** className เพิ่มเติม */
42
42
  className?: string;
43
+ /** เปิด/ปิด sidebar ได้ */
44
+ collapsible?: boolean;
45
+ /** สถานะเปิด/ปิด (controlled) */
46
+ isOpen?: boolean;
47
+ /** callback เมื่อกดเปิด/ปิด */
48
+ onToggle?: () => void;
43
49
  }
44
50
 
45
- declare function StaffSidebar({ orgLogo, orgName, orgSubtitle, menuItems, bottomMenuItems, user, roleLabel, onNavigate, onLogout, currentPath, width, className, }: StaffSidebarProps): react_jsx_runtime.JSX.Element;
51
+ declare function StaffSidebar({ orgLogo, orgName, orgSubtitle, menuItems, bottomMenuItems, user, roleLabel, onNavigate, onLogout, currentPath, width, className, collapsible, isOpen: controlledIsOpen, onToggle, }: StaffSidebarProps): react_jsx_runtime.JSX.Element;
46
52
 
47
53
  interface SidebarHeaderProps {
48
54
  orgLogo?: string;
49
55
  orgName: string;
50
56
  orgSubtitle?: string;
57
+ collapsed?: boolean;
51
58
  }
52
- declare function SidebarHeader({ orgLogo, orgName, orgSubtitle }: SidebarHeaderProps): react_jsx_runtime.JSX.Element;
59
+ declare function SidebarHeader({ orgLogo, orgName, orgSubtitle, collapsed }: SidebarHeaderProps): react_jsx_runtime.JSX.Element;
53
60
 
54
61
  interface SidebarMenuProps {
55
62
  menuItems: MenuItem[];
56
63
  onItemClick: (path: string) => void;
57
64
  currentPath?: string;
65
+ collapsed?: boolean;
58
66
  }
59
- declare function SidebarMenu({ menuItems, onItemClick, currentPath }: SidebarMenuProps): react_jsx_runtime.JSX.Element;
67
+ declare function SidebarMenu({ menuItems, onItemClick, currentPath, collapsed }: SidebarMenuProps): react_jsx_runtime.JSX.Element;
60
68
 
61
69
  interface SidebarUserProfileProps {
62
70
  user: User | null;
63
71
  roleLabel: string;
64
72
  onLogout: () => void;
73
+ collapsed?: boolean;
65
74
  }
66
- declare function SidebarUserProfile({ user, roleLabel, onLogout, }: SidebarUserProfileProps): react_jsx_runtime.JSX.Element | null;
75
+ declare function SidebarUserProfile({ user, roleLabel, onLogout, collapsed, }: SidebarUserProfileProps): react_jsx_runtime.JSX.Element | null;
67
76
 
68
77
  interface NotificationItem {
69
78
  id: string | number;
package/dist/index.d.ts CHANGED
@@ -40,30 +40,39 @@ interface StaffSidebarProps {
40
40
  width?: string;
41
41
  /** className เพิ่มเติม */
42
42
  className?: string;
43
+ /** เปิด/ปิด sidebar ได้ */
44
+ collapsible?: boolean;
45
+ /** สถานะเปิด/ปิด (controlled) */
46
+ isOpen?: boolean;
47
+ /** callback เมื่อกดเปิด/ปิด */
48
+ onToggle?: () => void;
43
49
  }
44
50
 
45
- declare function StaffSidebar({ orgLogo, orgName, orgSubtitle, menuItems, bottomMenuItems, user, roleLabel, onNavigate, onLogout, currentPath, width, className, }: StaffSidebarProps): react_jsx_runtime.JSX.Element;
51
+ declare function StaffSidebar({ orgLogo, orgName, orgSubtitle, menuItems, bottomMenuItems, user, roleLabel, onNavigate, onLogout, currentPath, width, className, collapsible, isOpen: controlledIsOpen, onToggle, }: StaffSidebarProps): react_jsx_runtime.JSX.Element;
46
52
 
47
53
  interface SidebarHeaderProps {
48
54
  orgLogo?: string;
49
55
  orgName: string;
50
56
  orgSubtitle?: string;
57
+ collapsed?: boolean;
51
58
  }
52
- declare function SidebarHeader({ orgLogo, orgName, orgSubtitle }: SidebarHeaderProps): react_jsx_runtime.JSX.Element;
59
+ declare function SidebarHeader({ orgLogo, orgName, orgSubtitle, collapsed }: SidebarHeaderProps): react_jsx_runtime.JSX.Element;
53
60
 
54
61
  interface SidebarMenuProps {
55
62
  menuItems: MenuItem[];
56
63
  onItemClick: (path: string) => void;
57
64
  currentPath?: string;
65
+ collapsed?: boolean;
58
66
  }
59
- declare function SidebarMenu({ menuItems, onItemClick, currentPath }: SidebarMenuProps): react_jsx_runtime.JSX.Element;
67
+ declare function SidebarMenu({ menuItems, onItemClick, currentPath, collapsed }: SidebarMenuProps): react_jsx_runtime.JSX.Element;
60
68
 
61
69
  interface SidebarUserProfileProps {
62
70
  user: User | null;
63
71
  roleLabel: string;
64
72
  onLogout: () => void;
73
+ collapsed?: boolean;
65
74
  }
66
- declare function SidebarUserProfile({ user, roleLabel, onLogout, }: SidebarUserProfileProps): react_jsx_runtime.JSX.Element | null;
75
+ declare function SidebarUserProfile({ user, roleLabel, onLogout, collapsed, }: SidebarUserProfileProps): react_jsx_runtime.JSX.Element | null;
67
76
 
68
77
  interface NotificationItem {
69
78
  id: string | number;