prometeo-design-system 4.2.5 → 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.
- package/dist/Avatar.es.js +41 -40
- package/dist/CardProfile-C1F83KJV.js +280 -0
- package/dist/CardProfile.es.js +3 -291
- package/dist/CheckBox.es.js +21 -24
- package/dist/DialogModal.es.js +46 -52
- package/dist/Icons/UserAvatar.es.js +4 -4
- package/dist/Input.es.js +72 -73
- package/dist/NotificationCard.es.js +21 -27
- package/dist/PlainTooltip.es.js +19 -19
- package/dist/PyrionLayout.es.js +786 -879
- package/dist/Scrollable.es.js +127 -201
- package/dist/Select.es.js +47 -47
- package/dist/SelectSearch.es.js +83 -85
- package/dist/TabLinks.es.js +121 -2
- package/dist/TicketCard.es.js +2 -2
- package/dist/badge-CbqYNrl4.js +87 -0
- package/dist/components/Avatar/Avatar.d.ts +4 -2
- package/dist/components/CardProfile/CardProfile.d.ts +4 -7
- package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
- package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -3
- package/dist/components/Scrollable/Scrollable.d.ts +0 -19
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
- package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
- package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
- package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
- package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
- package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
- package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
- package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
- package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
- package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
- package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
- package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
- package/dist/components/Sidebar/index.d.ts +12 -0
- package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
- package/dist/components/TabLinks/TabLinks.d.ts +0 -19
- package/dist/components/UserCard/UserCard.d.ts +2 -3
- package/dist/hooks/useLabelBackground.d.ts +0 -1
- package/dist/index.d.ts +16 -0
- package/dist/prometeo-design-system.es.js +2906 -119
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-BDIHUdND.js +26 -0
- package/package.json +2 -2
- package/src/styles/base.css +46 -0
- package/dist/TabLinks-DxqprStp.js +0 -147
- package/dist/UserCard.d.ts +0 -6
- package/dist/UserCard.es.js +0 -28
- package/dist/badge-BEx-0Q-K.js +0 -35
- package/dist/exports/UserCard.d.ts +0 -2
- package/dist/useLabelBackground-D5SzHhl_.js +0 -32
|
@@ -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';
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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';
|