prometeo-design-system 1.0.4 → 1.0.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.
@@ -7,11 +7,14 @@ export interface SidebarProps {
7
7
  sessions: SessionLocalStorage[];
8
8
  handleLogout: (user: IUser) => void;
9
9
  handleTokenLogin: (token: string) => void;
10
- links: Record<"pages" | "utils", INavLink[]>;
10
+ pageLinks: INavLink[];
11
+ utilLinks: INavLink[];
11
12
  setIsActiveModalNotification: (isActiveModalNotification: boolean) => void;
12
13
  isActiveModalNotification: boolean;
13
14
  handleNotificationClick: () => void;
14
15
  handleProfileClick?: () => void;
16
+ onLinkClick?: (path: string) => void;
17
+ isLinkActive: (path: string) => boolean;
15
18
  }
16
- declare const Sidebar: ({ user, sessions, handleLogout, handleTokenLogin, links, isActiveModalNotification, handleNotificationClick, handleProfileClick }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const Sidebar: ({ user, sessions, handleLogout, handleTokenLogin, pageLinks, utilLinks, isActiveModalNotification, handleNotificationClick, handleProfileClick, onLinkClick, isLinkActive }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
17
20
  export default Sidebar;
@@ -7,8 +7,8 @@ export interface NavbarLinksProps {
7
7
  className: string;
8
8
  }) => React.ReactNode;
9
9
  title: string;
10
- roles: string[];
11
10
  isView?: boolean;
11
+ viewAccess: () => boolean;
12
12
  relatedPaths?: string[];
13
13
  count?: number;
14
14
  }>;
@@ -16,5 +16,6 @@ export interface NavbarLinksProps {
16
16
  componentBadge?: (count?: number) => JSX.Element;
17
17
  onClick?: () => void;
18
18
  activeModal?: boolean;
19
+ onLinkClick?: (path: string) => void;
19
20
  }
20
- export declare const NavbarLinks: ({ links, isLinkActive, componentBadge, onClick, activeModal, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const NavbarLinks: ({ links, isLinkActive, componentBadge, onClick, activeModal, onLinkClick, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import { IUser } from 'shared-dependencies-tickets';
2
1
  export type Role = "Developer" | "SuperAdmin" | "Admin" | "Regular";
3
2
  export declare const Roles: {
4
3
  levelOne: readonly ["Developer"];
@@ -14,15 +13,9 @@ export interface INavLink {
14
13
  size: number;
15
14
  className: string;
16
15
  }) => React.ReactNode;
17
- roles: Role[];
18
- discover: "render" | "none";
16
+ viewAccess: () => boolean;
17
+ discover?: "render" | "none";
19
18
  isView?: boolean;
20
19
  relatedPaths?: string[];
21
20
  count?: number;
22
21
  }
23
- export declare const useNavbarLinks: (user: IUser, links: Record<"pages" | "utils", INavLink[]>) => {
24
- pageLinks: INavLink[];
25
- utilLinks: INavLink[];
26
- isLinkActive: (linkPath: string) => boolean;
27
- pathname: string;
28
- };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,6 @@ export { CompanyLogo } from './components/Sidebar/components/company-logo';
9
9
  export { NavbarLinks } from './components/Sidebar/components/nav-links';
10
10
  export { UserProfile } from './components/Sidebar/components/user-profile';
11
11
  export { useNavbarCollapse } from './components/Sidebar/hooks/useNavBarCollapse';
12
- export { useNavbarLinks } from './components/Sidebar/hooks/useNavLinks';
13
12
  export { useNavbarAnimations } from './components/Sidebar/ui/useNavbarAnimation';
14
13
  export { useClickOutside } from './hooks/useClickOutside';
15
14
  export type { ButtonColor, ButtonSize, ButtonVariant, } from './components/Button/Button';