prometeo-design-system 1.0.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.
@@ -0,0 +1,162 @@
1
+ export declare const Icons: {
2
+ readonly Ticket: ({ size, className, ...props }: {
3
+ size: number;
4
+ className: string;
5
+ props?: React.SVGProps<SVGSVGElement>;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ readonly Home: ({ size, className, ...props }: {
8
+ size: number;
9
+ className: string;
10
+ props?: React.SVGProps<SVGSVGElement>;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ readonly Boards: ({ size, className, ...props }: {
13
+ size: number;
14
+ className: string;
15
+ props?: React.SVGProps<SVGSVGElement>;
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ readonly Notifications: ({ size, className, ...props }: {
18
+ size: number;
19
+ className: string;
20
+ props?: React.SVGProps<SVGSVGElement>;
21
+ }) => import("react/jsx-runtime").JSX.Element;
22
+ readonly Help: ({ size, className, ...props }: {
23
+ size: number;
24
+ className: string;
25
+ props?: React.SVGProps<SVGSVGElement>;
26
+ }) => import("react/jsx-runtime").JSX.Element;
27
+ readonly Settings: ({ size, className, ...props }: {
28
+ size: number;
29
+ className: string;
30
+ props?: React.SVGProps<SVGSVGElement>;
31
+ }) => import("react/jsx-runtime").JSX.Element;
32
+ readonly CrevronLeft: ({ size, className, ...props }: {
33
+ size: number;
34
+ className: string;
35
+ props?: React.SVGProps<SVGSVGElement>;
36
+ }) => import("react/jsx-runtime").JSX.Element;
37
+ readonly CrevronRight: ({ size, className, ...props }: {
38
+ size: number;
39
+ className: string;
40
+ props?: React.SVGProps<SVGSVGElement>;
41
+ }) => import("react/jsx-runtime").JSX.Element;
42
+ readonly ArrowLeft: ({ size, className, ...props }: {
43
+ size: number;
44
+ className: string;
45
+ props?: React.SVGProps<SVGSVGElement>;
46
+ }) => import("react/jsx-runtime").JSX.Element;
47
+ readonly Shared: ({ size, className, ...props }: {
48
+ size: number;
49
+ className: string;
50
+ props?: React.SVGProps<SVGSVGElement>;
51
+ }) => import("react/jsx-runtime").JSX.Element;
52
+ readonly ChevronDown: ({ size, className, ...props }: {
53
+ size: number;
54
+ className: string;
55
+ props?: React.SVGProps<SVGSVGElement>;
56
+ }) => import("react/jsx-runtime").JSX.Element;
57
+ readonly Collapse: ({ size, className, ...props }: {
58
+ size: number;
59
+ className: string;
60
+ props?: React.SVGProps<SVGSVGElement>;
61
+ }) => import("react/jsx-runtime").JSX.Element;
62
+ readonly Calendar: ({ size, className, ...props }: {
63
+ size: number;
64
+ className: string;
65
+ props?: React.SVGProps<SVGSVGElement>;
66
+ }) => import("react/jsx-runtime").JSX.Element;
67
+ readonly Close: ({ size, className, ...props }: {
68
+ size: number;
69
+ className: string;
70
+ props?: React.SVGProps<SVGSVGElement>;
71
+ }) => import("react/jsx-runtime").JSX.Element;
72
+ readonly UserPerson: ({ size, className, ...props }: {
73
+ size: number;
74
+ className: string;
75
+ props?: React.SVGProps<SVGSVGElement>;
76
+ }) => import("react/jsx-runtime").JSX.Element;
77
+ readonly Logout: ({ size, className, ...props }: {
78
+ size: number;
79
+ className: string;
80
+ props?: React.SVGProps<SVGSVGElement>;
81
+ }) => import("react/jsx-runtime").JSX.Element;
82
+ readonly ArrowUpDown: ({ size, className, ...props }: {
83
+ size: number;
84
+ className: string;
85
+ props?: React.SVGProps<SVGSVGElement>;
86
+ }) => import("react/jsx-runtime").JSX.Element;
87
+ readonly Filter: ({ size, className, ...props }: {
88
+ size: number;
89
+ className: string;
90
+ props?: React.SVGProps<SVGSVGElement>;
91
+ }) => import("react/jsx-runtime").JSX.Element;
92
+ readonly Search: ({ size, className, ...props }: {
93
+ size: number;
94
+ className: string;
95
+ props?: React.SVGProps<SVGSVGElement>;
96
+ }) => import("react/jsx-runtime").JSX.Element;
97
+ readonly Stars: ({ size, className, ...props }: {
98
+ size: number;
99
+ className: string;
100
+ props?: React.SVGProps<SVGSVGElement>;
101
+ }) => import("react/jsx-runtime").JSX.Element;
102
+ readonly MoreVert: ({ size, className, ...props }: {
103
+ size: number;
104
+ className: string;
105
+ props?: React.SVGProps<SVGSVGElement>;
106
+ }) => import("react/jsx-runtime").JSX.Element;
107
+ readonly Add: ({ size, className, ...props }: {
108
+ size: number;
109
+ className: string;
110
+ props?: React.SVGProps<SVGSVGElement>;
111
+ }) => import("react/jsx-runtime").JSX.Element;
112
+ readonly Edit: ({ size, className, ...props }: {
113
+ size: number;
114
+ className: string;
115
+ props?: React.SVGProps<SVGSVGElement>;
116
+ }) => import("react/jsx-runtime").JSX.Element;
117
+ readonly Upload: ({ size, className, ...props }: {
118
+ size: number;
119
+ className: string;
120
+ props?: React.SVGProps<SVGSVGElement>;
121
+ }) => import("react/jsx-runtime").JSX.Element;
122
+ readonly Copy: ({ size, className, ...props }: {
123
+ size: number;
124
+ className: string;
125
+ props?: React.SVGProps<SVGSVGElement>;
126
+ }) => import("react/jsx-runtime").JSX.Element;
127
+ readonly FaLock: ({ size, className, ...props }: {
128
+ size: number;
129
+ className: string;
130
+ props?: React.SVGProps<SVGSVGElement>;
131
+ }) => import("react/jsx-runtime").JSX.Element;
132
+ readonly AccountCircle: ({ size, className, ...props }: {
133
+ size: number;
134
+ className: string;
135
+ props?: React.SVGProps<SVGSVGElement>;
136
+ }) => import("react/jsx-runtime").JSX.Element;
137
+ readonly UserAdd: ({ size, className, ...props }: {
138
+ size: number;
139
+ className: string;
140
+ props?: React.SVGProps<SVGSVGElement>;
141
+ }) => import("react/jsx-runtime").JSX.Element;
142
+ readonly AttachFile: ({ size, className, ...props }: {
143
+ size: number;
144
+ className: string;
145
+ props?: React.SVGProps<SVGSVGElement>;
146
+ }) => import("react/jsx-runtime").JSX.Element;
147
+ readonly HistoryActivity: ({ size, className, ...props }: {
148
+ size: number;
149
+ className: string;
150
+ props?: React.SVGProps<SVGSVGElement>;
151
+ }) => import("react/jsx-runtime").JSX.Element;
152
+ readonly MessageSquare: ({ size, className, ...props }: {
153
+ size: number;
154
+ className: string;
155
+ props?: React.SVGProps<SVGSVGElement>;
156
+ }) => import("react/jsx-runtime").JSX.Element;
157
+ readonly CloseNavBarDesktop: ({ size, className, ...props }: {
158
+ size: number;
159
+ className: string;
160
+ props?: React.SVGProps<SVGSVGElement>;
161
+ }) => import("react/jsx-runtime").JSX.Element;
162
+ };
@@ -0,0 +1,24 @@
1
+ export type ButtonVariant = "filled" | "outline" | "text";
2
+ export type ButtonColor = "primary" | "secondary";
3
+ export type ButtonSize = "small" | "medium" | "large";
4
+ export type ButtonState = "enabled" | "hovered" | "focused" | "pressed" | "disabled";
5
+ interface IButton {
6
+ label?: string;
7
+ onClick?: () => void;
8
+ icon?: React.ReactNode;
9
+ classButton?: string;
10
+ classButtonText?: string;
11
+ animate?: boolean;
12
+ animateIcon?: boolean;
13
+ isLoading?: boolean;
14
+ disabled?: boolean;
15
+ type?: "button" | "submit" | "reset";
16
+ variant?: ButtonVariant;
17
+ color?: ButtonColor;
18
+ size?: ButtonSize;
19
+ children?: React.ReactNode;
20
+ Spinner?: React.ReactNode;
21
+ forceState?: ButtonState;
22
+ }
23
+ export default function Button({ label, onClick, icon, classButton, classButtonText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, forceState }: IButton): import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ interface InputProps {
3
+ label: string;
4
+ icon?: React.ReactNode;
5
+ isFetching?: boolean;
6
+ onChange: (value: string) => void;
7
+ id?: string;
8
+ value?: string;
9
+ debounceMs?: number;
10
+ width?: string;
11
+ className?: string;
12
+ height?: string;
13
+ name: string;
14
+ placeholder?: string;
15
+ disabled?: boolean;
16
+ required?: boolean;
17
+ error?: string;
18
+ type?: 'text' | 'email' | 'password' | 'tel' | 'url';
19
+ }
20
+ declare const _default: React.MemoExoticComponent<({ label, icon, onChange, value, debounceMs, name, width, height, className, id: providedId, isFetching, placeholder, disabled, required, error, type, }: InputProps) => import("react/jsx-runtime").JSX.Element>;
21
+ export default _default;
@@ -0,0 +1,5 @@
1
+ interface LayoutProps {
2
+ children: React.ReactNode;
3
+ }
4
+ export declare const LayoutGeneric: ({ children }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SessionLocalStorage } from '../../interfaces/User/SessionLocalStorage';
2
+ interface MenuProps {
3
+ sessionsShow: SessionLocalStorage[];
4
+ handleTokenLogin: (token: string) => void;
5
+ onClickLogout: () => void;
6
+ menuRef: React.RefObject<HTMLDivElement | null>;
7
+ onProfileClick?: () => void;
8
+ }
9
+ declare const Menu: ({ sessionsShow, handleTokenLogin, onClickLogout, menuRef, onProfileClick }: MenuProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default Menu;
@@ -0,0 +1,17 @@
1
+ import { SessionLocalStorage } from '../../interfaces/User/SessionLocalStorage';
2
+ import { IUser } from 'shared-dependencies-tickets';
3
+ import { INavLink } from './hooks/useNavLinks';
4
+ interface SidebarProps {
5
+ isNotificationModalOpen: boolean;
6
+ user: IUser;
7
+ sessions: SessionLocalStorage[];
8
+ handleLogout: (user: IUser) => void;
9
+ handleTokenLogin: (token: string) => void;
10
+ links: Record<"pages" | "utils", INavLink[]>;
11
+ setIsActiveModalNotification: (isActiveModalNotification: boolean) => void;
12
+ isActiveModalNotification: boolean;
13
+ handleNotificationClick: () => void;
14
+ handleProfileClick?: () => void;
15
+ }
16
+ declare const Sidebar: ({ user, sessions, handleLogout, handleTokenLogin, links, isActiveModalNotification, handleNotificationClick, handleProfileClick }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default Sidebar;
@@ -0,0 +1,5 @@
1
+ export default function AvatarProfile({ profileImage, size, sizeImage, }: {
2
+ profileImage: string;
3
+ size: number;
4
+ sizeImage?: number;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ type BadgeProps = {
2
+ notificationsCount: number;
3
+ };
4
+ export declare const Badge: ({ notificationsCount }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import { SessionLocalStorage } from '../../../interfaces/User/SessionLocalStorage';
2
+ export default function ChangeAccount({ sessions, handleTokenLogin }: {
3
+ sessions?: SessionLocalStorage[];
4
+ handleTokenLogin?: (token: string) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface NavbarCollapseButtonProps {
2
+ isCollapsed: boolean;
3
+ onToggle: () => void;
4
+ }
5
+ export declare const NavbarCollapseButton: ({ isCollapsed, onToggle, }: NavbarCollapseButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface CompanyLogoProps {
2
+ logoUrl: string;
3
+ companyName?: string;
4
+ }
5
+ export declare const CompanyLogo: ({ logoUrl, companyName }: CompanyLogoProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'react';
2
+ interface NavbarLinksProps {
3
+ links: Array<{
4
+ path: string;
5
+ icon: (props: {
6
+ size: number;
7
+ className: string;
8
+ }) => React.ReactNode;
9
+ title: string;
10
+ roles: string[];
11
+ isView?: boolean;
12
+ relatedPaths?: string[];
13
+ }>;
14
+ isLinkActive: (path: string) => boolean;
15
+ componentBadge?: () => JSX.Element;
16
+ onClick?: () => void;
17
+ activeModal?: boolean;
18
+ }
19
+ export declare const NavbarLinks: ({ links, isLinkActive, componentBadge, onClick, activeModal, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,14 @@
1
+ import { IUser } from 'shared-dependencies-tickets';
2
+ import { SessionLocalStorage } from '../../../interfaces/User/SessionLocalStorage';
3
+ interface UserProfileProps {
4
+ user: IUser;
5
+ isExpanded?: boolean;
6
+ onClick?: () => void;
7
+ onProfileClick?: () => void;
8
+ showOptions?: boolean;
9
+ onClickLogout?: () => void;
10
+ sessions?: SessionLocalStorage[];
11
+ handleTokenLogin?: (token: string) => void;
12
+ }
13
+ export declare const UserProfile: ({ user, isExpanded, onClick, onProfileClick, showOptions, onClickLogout, sessions, handleTokenLogin, }: UserProfileProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,9 @@
1
+ interface IRootState {
2
+ isActiveModalNotification: boolean;
3
+ setIsActiveModalNotification: (isActiveModalNotification: boolean) => void;
4
+ }
5
+ export declare const useActionsNavbar: ({ isActiveModalNotification, setIsActiveModalNotification, }: IRootState) => {
6
+ handleNotificationClick: () => void;
7
+ isActiveModalNotification: boolean;
8
+ };
9
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const useNavbarCollapse: (isCollapsed: boolean) => {
2
+ isCollapsed: boolean;
3
+ navbarRef: import('react').RefObject<HTMLDivElement | null>;
4
+ };
@@ -0,0 +1,20 @@
1
+ import { IUser } from 'shared-dependencies-tickets';
2
+ export type Role = "Developer" | "SuperAdmin" | "Admin" | "Regular";
3
+ export interface INavLink {
4
+ path: string;
5
+ title: string;
6
+ icon: (props: {
7
+ size: number;
8
+ className: string;
9
+ }) => React.ReactNode;
10
+ roles: Role[];
11
+ discover: "render" | "none";
12
+ isView?: boolean;
13
+ relatedPaths?: string[];
14
+ }
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
+ };
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useNavbarAnimations: (navbarRef: RefObject<HTMLDivElement>, isCollapsed: boolean) => void;
@@ -0,0 +1,8 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * Hook for detecting clicks outside of a specified element
4
+ * @param handler - Function to call when click outside is detected
5
+ * @param active - Whether the hook should be active (default: true)
6
+ * @returns ref - Ref to attach to the element you want to detect clicks outside of
7
+ */
8
+ export declare const useClickOutside: <T extends HTMLElement = HTMLElement>(handler: () => void, active?: boolean) => RefObject<T | null>;
@@ -0,0 +1,18 @@
1
+ export { default as Button } from './components/Button/Button';
2
+ export { default as Input } from './components/Input/Input';
3
+ export { default as Sidebar } from './components/Sidebar/Sidebar';
4
+ export { default as Menu } from './components/Menu/Menu';
5
+ export { LayoutGeneric } from './components/Layout/LayoutGeneric';
6
+ export { Badge } from './components/Sidebar/components/badge';
7
+ export { NavbarCollapseButton } from './components/Sidebar/components/collapse-button';
8
+ export { CompanyLogo } from './components/Sidebar/components/company-logo';
9
+ export { NavbarLinks } from './components/Sidebar/components/nav-links';
10
+ export { UserProfile } from './components/Sidebar/components/user-profile';
11
+ export { useNavbarCollapse } from './components/Sidebar/hooks/useNavBarCollapse';
12
+ export { useNavbarLinks } from './components/Sidebar/hooks/useNavLinks';
13
+ export { useNavbarAnimations } from './components/Sidebar/ui/useNavbarAnimation';
14
+ export { useClickOutside } from './hooks/useClickOutside';
15
+ export type { ButtonVariant, ButtonColor, ButtonSize, ButtonState } from './components/Button/Button';
16
+ export type { INavLink } from './components/Sidebar/hooks/useNavLinks';
17
+ export type { SessionLocalStorage } from './interfaces/User/SessionLocalStorage';
18
+ export { Icons } from './Icons/Icons';
@@ -0,0 +1,11 @@
1
+ import { ICompany } from 'shared-dependencies-tickets';
2
+ export interface SessionLocalStorage {
3
+ _id: string;
4
+ name: string;
5
+ email: string;
6
+ username: string;
7
+ company_id: ICompany;
8
+ expires_at: string;
9
+ logoutDate: string;
10
+ token: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;