prometeo-design-system 4.3.0 → 4.3.1

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.
Files changed (59) hide show
  1. package/dist/Avatar.es.js +41 -40
  2. package/dist/CardProfile-C1F83KJV.js +280 -0
  3. package/dist/CardProfile.es.js +3 -291
  4. package/dist/CheckBox.es.js +21 -24
  5. package/dist/DialogModal.es.js +46 -52
  6. package/dist/Icons/UserAvatar.es.js +4 -4
  7. package/dist/Input.es.js +72 -73
  8. package/dist/NotificationCard.es.js +21 -28
  9. package/dist/PlainTooltip.es.js +19 -19
  10. package/dist/PyrionLayout.es.js +810 -916
  11. package/dist/Scrollable.es.js +177 -322
  12. package/dist/Select.es.js +47 -47
  13. package/dist/SelectSearch.es.js +103 -107
  14. package/dist/TabLinks.es.js +121 -2
  15. package/dist/TicketCard.es.js +2 -2
  16. package/dist/Toast.es.js +51 -95
  17. package/dist/badge-CbqYNrl4.js +87 -0
  18. package/dist/components/Avatar/Avatar.d.ts +4 -2
  19. package/dist/components/CardProfile/CardProfile.d.ts +4 -7
  20. package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
  21. package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
  22. package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
  23. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
  24. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
  25. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
  26. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
  27. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -4
  28. package/dist/components/Scrollable/Scrollable.d.ts +0 -29
  29. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
  30. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
  31. package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
  32. package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
  33. package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
  34. package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
  35. package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
  36. package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
  37. package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
  38. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
  39. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
  40. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
  41. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
  42. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
  43. package/dist/components/Sidebar/index.d.ts +12 -0
  44. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
  45. package/dist/components/TabLinks/TabLinks.d.ts +0 -19
  46. package/dist/components/Toaster/Toaster.d.ts +1 -13
  47. package/dist/components/UserCard/UserCard.d.ts +2 -3
  48. package/dist/hooks/useLabelBackground.d.ts +0 -1
  49. package/dist/index.d.ts +16 -0
  50. package/dist/prometeo-design-system.es.js +2906 -119
  51. package/dist/styles.css +1 -1
  52. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  53. package/package.json +2 -2
  54. package/dist/TabLinks-DxqprStp.js +0 -147
  55. package/dist/UserCard.d.ts +0 -6
  56. package/dist/UserCard.es.js +0 -28
  57. package/dist/badge-BEx-0Q-K.js +0 -35
  58. package/dist/exports/UserCard.d.ts +0 -2
  59. package/dist/useLabelBackground-D5SzHhl_.js +0 -32
@@ -0,0 +1,43 @@
1
+ import { ReactNode } from 'react';
2
+ import { TabSwitchElement } from '../TabSwitch/TabSwitch';
3
+ interface SidebarRootProps {
4
+ children: ReactNode;
5
+ isCollapsed?: boolean;
6
+ className?: string;
7
+ tabs?: TabSwitchElement[];
8
+ currentTabName?: string;
9
+ }
10
+ interface CollapseButtonProps {
11
+ isCollapsed: boolean;
12
+ onToggleCollapse: () => void;
13
+ }
14
+ export declare const CollapseButton: ({ isCollapsed, onToggleCollapse }: CollapseButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ interface HeaderProps {
16
+ children: ReactNode;
17
+ className: string;
18
+ }
19
+ interface DividerProps {
20
+ className?: string;
21
+ }
22
+ interface ContentProps {
23
+ children: ReactNode;
24
+ className: string;
25
+ }
26
+ interface SpacerProps {
27
+ size?: 'auto' | 'small' | 'medium' | 'large' | string;
28
+ className?: string;
29
+ }
30
+ interface FooterProps {
31
+ children: ReactNode;
32
+ className?: string;
33
+ }
34
+ export declare const Sidebar: import('react').ForwardRefExoticComponent<SidebarRootProps & import('react').RefAttributes<HTMLDivElement>> & {
35
+ Root: import('react').ForwardRefExoticComponent<SidebarRootProps & import('react').RefAttributes<HTMLDivElement>>;
36
+ CollapseButton: ({ isCollapsed, onToggleCollapse }: CollapseButtonProps) => import("react/jsx-runtime").JSX.Element;
37
+ Header: ({ children, className }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
38
+ Divider: ({ className }: DividerProps) => import("react/jsx-runtime").JSX.Element;
39
+ Content: ({ children, className }: ContentProps) => import("react/jsx-runtime").JSX.Element;
40
+ Spacer: ({ className, size }: SpacerProps) => import("react/jsx-runtime").JSX.Element;
41
+ Footer: ({ children, className }: FooterProps) => import("react/jsx-runtime").JSX.Element;
42
+ };
43
+ export {};
@@ -0,0 +1,11 @@
1
+ interface NavigationLinkProps {
2
+ children: React.ReactNode;
3
+ icon?: React.ReactNode;
4
+ label?: string;
5
+ href?: string;
6
+ onClick?: () => void;
7
+ isActive?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare const NavigationLink: ({ children, icon, label, href, onClick, isActive, className }: NavigationLinkProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default NavigationLink;
@@ -0,0 +1,5 @@
1
+ export interface CompanyLogoProps {
2
+ logoUrl: string;
3
+ companyName?: string;
4
+ }
5
+ export declare const CompanyLogo: ({ logoUrl, companyName }: CompanyLogoProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { INavAction } from '../hooks/useNavLinks';
2
+ export interface INavbarActionsProps {
3
+ linkActions: INavAction[];
4
+ onClick?: (actionName: string) => void;
5
+ activeAction?: string;
6
+ }
7
+ export declare const NavBarActions: ({ linkActions, onClick, activeAction, }: INavbarActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { INavLink } from '../hooks/useNavLinks';
2
+ export interface NavbarLinksProps {
3
+ links: INavLink[];
4
+ isLinkActive: (path: string) => boolean;
5
+ onLinkClick?: (path: string) => void;
6
+ }
7
+ export declare const NavbarLinks: ({ links, isLinkActive, onLinkClick, }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ interface SidebarContextType {
3
+ primarySidebarRef: RefObject<HTMLDivElement | null>;
4
+ registerPrimarySidebar: (ref: RefObject<HTMLDivElement | null>) => void;
5
+ tabBarRef: RefObject<HTMLDivElement | null>;
6
+ registerTabBar: (ref: RefObject<HTMLDivElement | null>) => void;
7
+ }
8
+ interface SidebarProviderProps {
9
+ children: ReactNode;
10
+ }
11
+ export declare const SidebarProvider: ({ children }: SidebarProviderProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const useSidebarContext: () => SidebarContextType;
13
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const SidebarProvider: ({ children, }: {
2
+ children: React.ReactNode;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -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,32 @@
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;
9
+ export interface INavLink {
10
+ path: string;
11
+ title: string;
12
+ icon?: (props: {
13
+ size: number;
14
+ className: string;
15
+ }) => React.ReactNode;
16
+ viewAccess?: () => boolean;
17
+ discover?: "render" | "none";
18
+ isView?: boolean | (() => boolean);
19
+ relatedPaths?: string[];
20
+ count?: number;
21
+ }
22
+ export interface INavAction {
23
+ actionName: string;
24
+ title: string;
25
+ icon: (props: {
26
+ size: number;
27
+ className: string;
28
+ }) => React.ReactNode;
29
+ viewAccess: () => boolean;
30
+ isView?: boolean | (() => boolean);
31
+ count?: number;
32
+ }
@@ -0,0 +1,13 @@
1
+ import { RefObject } from 'react';
2
+ export interface SidebarContextValue {
3
+ isCollapsed: boolean;
4
+ setIsCollapsed: (collapsed: boolean) => void;
5
+ navbarRef: RefObject<HTMLDivElement | null>;
6
+ toggleCollapse: () => void;
7
+ activeSecondaryBar: string | null;
8
+ openSecondaryBar: (action: string) => void;
9
+ closeSecondaryBar: () => void;
10
+ toggleSecondaryBar: (action: string) => void;
11
+ }
12
+ export declare const SidebarContext: import('react').Context<SidebarContextValue | undefined>;
13
+ export declare const useSidebar: () => SidebarContextValue;
@@ -0,0 +1,12 @@
1
+ export { SecondaryBar } from './SecondaryBar/SecondaryBar';
2
+ export { Sidebar } from './SidebarComposable';
3
+ export { SidebarProvider } from './hooks/SidebarProvider';
4
+ export { useSidebar } from './hooks/useSidebarHook';
5
+ export { NavigationLink } from './components/NavigationLink';
6
+ export { Badge } from './components/badge';
7
+ export { NavBarActions } from './components/nav-actions';
8
+ export { NavbarLinks } from './components/nav-links';
9
+ export { useActionsNavbar } from './hooks/useNavBarActions';
10
+ export { useNavbarCollapse } from './hooks/useNavBarCollapse';
11
+ export type { BadgeProps } from './components/badge';
12
+ export type { NavbarLinksProps } from './components/nav-links';
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useNavbarAnimations: (navbarRef: RefObject<HTMLDivElement | null>, isCollapsed: boolean, isSecondaryBarOpen?: boolean) => void;
@@ -30,22 +30,3 @@ declare namespace TabLinks {
30
30
  }
31
31
  declare const _default: import('react').MemoExoticComponent<typeof TabLinks>;
32
32
  export default _default;
33
- interface TabLinkItemProps {
34
- id: string | number;
35
- title: string;
36
- iconPosition?: "left" | "right" | "top" | "bottom";
37
- onClick: () => void;
38
- disabled?: boolean;
39
- className?: string;
40
- isActive?: boolean;
41
- activeClassName?: string;
42
- icon?: IconComponent | React.ReactNode | (() => React.ReactNode);
43
- animated?: boolean;
44
- indicatorClassName?: string;
45
- onIconHover?: () => void;
46
- onIconClick?: () => void;
47
- iconTooltipTitle?: string;
48
- iconTooltipProps?: PlainTooltipProps;
49
- iconSize?: number;
50
- }
51
- export declare const TabLinkItem: ({ id, title, icon, iconPosition, onClick, disabled, className, isActive, activeClassName, animated, onIconHover, onIconClick, iconTooltipTitle, iconTooltipProps, iconSize, indicatorClassName }: TabLinkItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,9 @@
1
- import { IconComponent } from '../../Icons/types';
2
1
  import { ColorMode } from '../Shared/types';
2
+ import { IconComponent } from '../../Icons/types';
3
3
  type ToastElementsProps = {
4
4
  container: string;
5
5
  iconClass: string;
6
6
  icon: IconComponent;
7
- loading: string;
8
7
  };
9
8
  type ToastVarians = 'success' | 'error' | 'warning' | 'info';
10
9
  type ToastVariantClassnames = {
@@ -31,18 +30,7 @@ export interface PyrionToastProps {
31
30
  colorMode?: ColorMode;
32
31
  showClose?: boolean;
33
32
  position?: ToastPosition;
34
- loading?: boolean;
35
- loadingTimeout?: number;
36
- finishLoader?: boolean;
37
33
  }
38
34
  declare const PyrionToast: (props: PyrionToastProps) => import("react/jsx-runtime").JSX.Element;
39
35
  export default PyrionToast;
40
36
  export declare function toastpyrion(title: string, options?: Omit<PyrionToastProps, 'id'>): string | number;
41
- export declare const toastPyrionPromise: (promise: Promise<any>, options?: {
42
- loading?: Omit<PyrionToastProps, "id">;
43
- success?: Omit<PyrionToastProps, "id">;
44
- error?: Omit<PyrionToastProps, "id">;
45
- colorMode?: ColorMode;
46
- position?: ToastPosition;
47
- timeOut?: number;
48
- }) => Promise<any>;
@@ -1,4 +1,4 @@
1
- import { IAvatar, SizeVariant } from '../Avatar/Avatar';
1
+ import { SizeVariant } from '../Avatar/Avatar';
2
2
  export interface UserCardProps {
3
3
  name: string;
4
4
  mainSlot?: string | React.ReactNode | (() => React.ReactNode);
@@ -7,7 +7,6 @@ export interface UserCardProps {
7
7
  subImageUrl?: string;
8
8
  avatarSize?: SizeVariant;
9
9
  className?: string;
10
- avatarProps?: IAvatar;
11
10
  }
12
- declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot, avatarProps }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
11
+ declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
13
12
  export default UserCard;
@@ -2,6 +2,5 @@ interface UseLabelBackgroundResult<T extends HTMLElement> {
2
2
  ref: React.RefObject<T | null>;
3
3
  }
4
4
  export declare const getActualBackgroundColor: (element: HTMLElement) => string;
5
- export declare const rgbHueAlterate: (rgb: string, variation: number, opacity?: number) => string;
6
5
  export declare function useLabelBackground<T extends HTMLElement = HTMLElement>(): UseLabelBackgroundResult<T>;
7
6
  export {};
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { default as Pagination } from './components/Pagination/Pagination';
16
16
  export { ProfilePictureUpload } from './components/ProfilePictureUpload/ProfilePictureUpload';
17
17
  export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
18
18
  export { default as Select } from './components/Select/Select';
19
+ export { default as ChangueAccount } from './components/Sidebar/components/changue-account';
19
20
  export { default as Spinner } from './components/Spinner/Spinner';
20
21
  export { default as Steps } from './components/Steps/Steps';
21
22
  export { default as Switch } from './components/Switch/Switch';
@@ -28,6 +29,7 @@ export { default as TextArea } from './components/TextArea/TextArea';
28
29
  export { default as Tooltip } from './components/Tooltip/Tootip';
29
30
  export { default as Skeleton } from './components/Skeleton/Skeleton';
30
31
  export { default as SegmentedButton } from './components/SegmentedButton/SegmentedButton';
32
+ export { default as LayoutGeneric } from './components/Layout/LayoutGeneric';
31
33
  export { default as ImageGallery } from './components/Image/ImageGallery';
32
34
  export { default as Image } from './components/Image/Image';
33
35
  export { default as Toast } from './components/Toaster/Toaster';
@@ -36,11 +38,18 @@ export { toastpyrion } from './components/Toaster/Toaster';
36
38
  export { default as SelectSearch } from './components/SelectSearch/SelectSearch';
37
39
  export { default as FAButton } from './components/FAB/FAButton';
38
40
  export { default as RadioButton } from './components/RadioButton/RadioButton';
41
+ export * from './components/Sidebar';
42
+ export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
39
43
  export { Badge } from './components/Sidebar/components/badge';
40
44
  export { NavbarCollapseButton } from './components/Sidebar/components/collapse-button';
45
+ export { CompanyLogo } from './components/Sidebar/components/company-logo';
46
+ export { NavbarLinks } from './components/Sidebar/components/nav-links';
41
47
  export { default as OtpInput } from './components/OtpInput/OtpInput';
42
48
  export { useDialogControl } from './components/Dialog/useDialogControl';
43
49
  export { useFileDropzone } from './components/DropZone/useFileDropzone';
50
+ export { SidebarProvider as SidebarRefProvider, useSidebarContext, } from './components/Sidebar/context/SidebarContext';
51
+ export { SidebarProvider } from './components/Sidebar/hooks/SidebarProvider';
52
+ export { useSidebar } from './components/Sidebar/hooks/useSidebarHook';
44
53
  export { useClickOutside } from './hooks/useClickOutside';
45
54
  export { useIsMobile } from './hooks/useDevice';
46
55
  export type { ButtonProps } from './components/Button/Button';
@@ -53,6 +62,12 @@ export type { IMenuItems, IMenuRoot } from './components/Menu/MenuComposable';
53
62
  export type { OtpInputProps } from './components/OtpInput/OtpInput';
54
63
  export type { BadgeProps } from './components/Sidebar/components/badge';
55
64
  export type { NavbarCollapseButtonProps } from './components/Sidebar/components/collapse-button';
65
+ export type { CompanyLogoProps } from './components/Sidebar/components/company-logo';
66
+ export type { INavbarActionsProps } from './components/Sidebar/components/nav-actions';
67
+ export type { NavbarLinksProps } from './components/Sidebar/components/nav-links';
68
+ export type { INavAction, INavLink, Role, RoleLevels, } from './components/Sidebar/hooks/useNavLinks';
69
+ export type { ContentProps as SecondaryBarContentProps, FooterProps as SecondaryBarFooterProps, HeaderProps as SecondaryBarHeaderProps, SecondaryBarRootProps, SpacerProps as SecondaryBarSpacerProps, } from './components/Sidebar/SecondaryBar/SecondaryBar';
70
+ export type { SidebarContextValue } from './components/Sidebar/hooks/useSidebarHook';
56
71
  export type { SpinnerProps } from './components/Spinner/Spinner';
57
72
  export type { PaginationProps } from './components/Pagination/Pagination';
58
73
  export type { ProfilePictureUploadProps } from './components/ProfilePictureUpload/ProfilePictureUpload';
@@ -61,6 +76,7 @@ export type { SelectProps } from './components/Select/Select';
61
76
  export type { DialogHandle } from './components/Dialog/Dialog';
62
77
  export { DropZone } from './components/DropZone/DropZone';
63
78
  export type { PyrionToastProps as ToasterPrometeo } from './components/Toaster/Toaster';
79
+ export type { LayoutGenericProps } from './components/Layout/LayoutGeneric';
64
80
  export type { ProgressBarProps } from './components/ProgressBar/ProgressBar';
65
81
  export type { IToolTipProps } from './components/Tooltip/Tootip';
66
82
  export type { InputMultipleProps } from './components/InputMultiple/InputMultiple';