prometeo-design-system 1.0.2 → 1.0.5
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/components/Button/Button.d.ts +1 -3
- package/dist/components/Sidebar/Sidebar.d.ts +6 -3
- package/dist/components/Sidebar/components/badge.d.ts +1 -2
- package/dist/components/Sidebar/components/collapse-button.d.ts +1 -2
- package/dist/components/Sidebar/components/company-logo.d.ts +1 -2
- package/dist/components/Sidebar/components/nav-links.d.ts +6 -5
- package/dist/components/Sidebar/components/user-profile.d.ts +1 -2
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +10 -9
- package/dist/components/UserProfile/UserProfile.d.ts +2 -0
- package/dist/index.d.ts +9 -4
- package/dist/prometeo-design-system.es.js +647 -655
- package/dist/prometeo-design-system.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type ButtonVariant = "filled" | "outline" | "text";
|
|
2
2
|
export type ButtonColor = "primary" | "secondary";
|
|
3
3
|
export type ButtonSize = "small" | "medium" | "large";
|
|
4
|
-
export type ButtonState = "enabled" | "hovered" | "focused" | "pressed" | "disabled";
|
|
5
4
|
interface IButton {
|
|
6
5
|
label?: string;
|
|
7
6
|
onClick?: () => void;
|
|
@@ -18,7 +17,6 @@ interface IButton {
|
|
|
18
17
|
size?: ButtonSize;
|
|
19
18
|
children?: React.ReactNode;
|
|
20
19
|
Spinner?: React.ReactNode;
|
|
21
|
-
forceState?: ButtonState;
|
|
22
20
|
}
|
|
23
|
-
export default function Button({ label, onClick, icon, classButton, classButtonText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner,
|
|
21
|
+
export default function Button({ label, onClick, icon, classButton, classButtonText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, }: IButton): import("react/jsx-runtime").JSX.Element;
|
|
24
22
|
export {};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { SessionLocalStorage } from '../../interfaces/User/SessionLocalStorage';
|
|
2
2
|
import { IUser } from 'shared-dependencies-tickets';
|
|
3
3
|
import { INavLink } from './hooks/useNavLinks';
|
|
4
|
-
interface SidebarProps {
|
|
4
|
+
export interface SidebarProps {
|
|
5
5
|
isNotificationModalOpen: boolean;
|
|
6
6
|
user: IUser;
|
|
7
7
|
sessions: SessionLocalStorage[];
|
|
8
8
|
handleLogout: (user: IUser) => void;
|
|
9
9
|
handleTokenLogin: (token: string) => void;
|
|
10
|
-
|
|
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,
|
|
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;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
interface NavbarCollapseButtonProps {
|
|
1
|
+
export interface NavbarCollapseButtonProps {
|
|
2
2
|
isCollapsed: boolean;
|
|
3
3
|
onToggle: () => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const NavbarCollapseButton: ({ isCollapsed, onToggle, }: NavbarCollapseButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
interface NavbarLinksProps {
|
|
2
|
+
export interface NavbarLinksProps {
|
|
3
3
|
links: Array<{
|
|
4
4
|
path: string;
|
|
5
5
|
icon: (props: {
|
|
@@ -7,14 +7,15 @@ interface NavbarLinksProps {
|
|
|
7
7
|
className: string;
|
|
8
8
|
}) => React.ReactNode;
|
|
9
9
|
title: string;
|
|
10
|
-
roles: string[];
|
|
11
10
|
isView?: boolean;
|
|
11
|
+
viewAcess: () => boolean;
|
|
12
12
|
relatedPaths?: string[];
|
|
13
|
+
count?: number;
|
|
13
14
|
}>;
|
|
14
15
|
isLinkActive: (path: string) => boolean;
|
|
15
|
-
componentBadge?: () => JSX.Element;
|
|
16
|
+
componentBadge?: (count?: number) => JSX.Element;
|
|
16
17
|
onClick?: () => void;
|
|
17
18
|
activeModal?: boolean;
|
|
19
|
+
onLinkClick?: (path: string) => void;
|
|
18
20
|
}
|
|
19
|
-
export declare const NavbarLinks: ({ links, isLinkActive, componentBadge, onClick, activeModal, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
+
export declare const NavbarLinks: ({ links, isLinkActive, componentBadge, onClick, activeModal, onLinkClick, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IUser } from 'shared-dependencies-tickets';
|
|
2
2
|
import { SessionLocalStorage } from '../../../interfaces/User/SessionLocalStorage';
|
|
3
|
-
interface UserProfileProps {
|
|
3
|
+
export interface UserProfileProps {
|
|
4
4
|
user: IUser;
|
|
5
5
|
isExpanded?: boolean;
|
|
6
6
|
onClick?: () => void;
|
|
@@ -11,4 +11,3 @@ interface UserProfileProps {
|
|
|
11
11
|
handleTokenLogin?: (token: string) => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const UserProfile: ({ user, isExpanded, onClick, onProfileClick, showOptions, onClickLogout, sessions, handleTokenLogin, }: UserProfileProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { IUser } from 'shared-dependencies-tickets';
|
|
2
1
|
export type Role = "Developer" | "SuperAdmin" | "Admin" | "Regular";
|
|
2
|
+
export declare const Roles: {
|
|
3
|
+
levelOne: readonly ["Developer"];
|
|
4
|
+
levelTwo: Role[];
|
|
5
|
+
levelThree: Role[];
|
|
6
|
+
levelFour: Role[];
|
|
7
|
+
};
|
|
8
|
+
export type RoleLevels = typeof Roles;
|
|
3
9
|
export interface INavLink {
|
|
4
10
|
path: string;
|
|
5
11
|
title: string;
|
|
@@ -7,14 +13,9 @@ export interface INavLink {
|
|
|
7
13
|
size: number;
|
|
8
14
|
className: string;
|
|
9
15
|
}) => React.ReactNode;
|
|
10
|
-
|
|
11
|
-
discover
|
|
16
|
+
viewAcess: () => boolean;
|
|
17
|
+
discover?: "render" | "none";
|
|
12
18
|
isView?: boolean;
|
|
13
19
|
relatedPaths?: string[];
|
|
20
|
+
count?: number;
|
|
14
21
|
}
|
|
15
|
-
export declare const useNavbarLinks: (user: IUser, links: Record<"pages" | "utils", INavLink[]>) => {
|
|
16
|
-
pageLinks: INavLink[];
|
|
17
|
-
utilLinks: INavLink[];
|
|
18
|
-
isLinkActive: (linkPath: string) => boolean;
|
|
19
|
-
pathname: string;
|
|
20
|
-
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Button } from './components/Button/Button';
|
|
2
2
|
export { default as Input } from './components/Input/Input';
|
|
3
|
-
export { default as Sidebar } from './components/Sidebar/Sidebar';
|
|
4
3
|
export { default as Menu } from './components/Menu/Menu';
|
|
4
|
+
export { default as Sidebar } from './components/Sidebar/Sidebar';
|
|
5
5
|
export { LayoutGeneric } from './components/Layout/LayoutGeneric';
|
|
6
6
|
export { Badge } from './components/Sidebar/components/badge';
|
|
7
7
|
export { NavbarCollapseButton } from './components/Sidebar/components/collapse-button';
|
|
@@ -9,10 +9,15 @@ 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
|
-
export type {
|
|
16
|
-
export type {
|
|
14
|
+
export type { ButtonColor, ButtonSize, ButtonVariant, } from './components/Button/Button';
|
|
15
|
+
export type { SidebarProps } from './components/Sidebar/Sidebar';
|
|
16
|
+
export type { BadgeProps } from './components/Sidebar/components/badge';
|
|
17
|
+
export type { NavbarCollapseButtonProps } from './components/Sidebar/components/collapse-button';
|
|
18
|
+
export type { CompanyLogoProps } from './components/Sidebar/components/company-logo';
|
|
19
|
+
export type { NavbarLinksProps } from './components/Sidebar/components/nav-links';
|
|
20
|
+
export type { UserProfileProps } from './components/Sidebar/components/user-profile';
|
|
21
|
+
export type { INavLink, Role, RoleLevels, } from './components/Sidebar/hooks/useNavLinks';
|
|
17
22
|
export type { SessionLocalStorage } from './interfaces/User/SessionLocalStorage';
|
|
18
23
|
export { Icons } from './Icons/Icons';
|