prometeo-design-system 3.1.6 → 4.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.
Files changed (50) hide show
  1. package/dist/Icons/ReassignmentFill.es.js +1 -1
  2. package/dist/Icons/StarFill.d.ts +6 -0
  3. package/dist/Icons/StarFill.es.js +19 -0
  4. package/dist/Icons/components/StarFill.d.ts +4 -0
  5. package/dist/Icons/index.d.ts +1 -0
  6. package/dist/Icons/types.d.ts +4 -2
  7. package/dist/Icons.es.js +18 -16
  8. package/dist/Input.es.js +56 -52
  9. package/dist/PyrionLayout.d.ts +6 -0
  10. package/dist/PyrionLayout.es.js +1308 -0
  11. package/dist/RecurrentDatePicker.es.js +1 -1
  12. package/dist/Scrollable.es.js +118 -86
  13. package/dist/components/Input/Input.d.ts +1 -0
  14. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +18 -11
  15. package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +1 -0
  16. package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +3 -2
  17. package/dist/components/NavigationDrawer/NavigationDrawerSidebar.d.ts +11 -0
  18. package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
  19. package/dist/components/PyrionNavigationDrawer/PLContent.d.ts +10 -0
  20. package/dist/components/PyrionNavigationDrawer/PLFooter.d.ts +20 -0
  21. package/dist/components/PyrionNavigationDrawer/PLHeader.d.ts +10 -0
  22. package/dist/components/PyrionNavigationDrawer/PLHelpSection.d.ts +8 -0
  23. package/dist/components/PyrionNavigationDrawer/{PyrionNavigationDrawerMobileAppSwitcher.d.ts → PLMobileAppSwitcher.d.ts} +3 -3
  24. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +15 -0
  25. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +12 -0
  26. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +17 -0
  27. package/dist/components/PyrionNavigationDrawer/{PyrionNavigationDrawerSystemLogo.d.ts → PLSystemLogo.d.ts} +1 -1
  28. package/dist/components/PyrionNavigationDrawer/PLSystemSessions.d.ts +14 -0
  29. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +41 -0
  30. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +143 -0
  31. package/dist/components/PyrionNavigationDrawer/index.d.ts +3 -2
  32. package/dist/components/Scrollable/Scrollable.d.ts +1 -0
  33. package/dist/exports/PyrionLayout.d.ts +2 -0
  34. package/dist/exports/usePyrionNavigation.d.ts +1 -1
  35. package/dist/prometeo-design-system.es.js +2423 -402
  36. package/dist/styles.css +1 -1
  37. package/dist/usePyrionNavigation.es.js +1 -1
  38. package/package.json +5 -13
  39. package/dist/LayoutGeneric-CfWhV1ov.js +0 -26
  40. package/dist/LayoutGeneric.d.ts +0 -6
  41. package/dist/LayoutGeneric.es.js +0 -4
  42. package/dist/PyrionNavigationDrawer.d.ts +0 -6
  43. package/dist/PyrionNavigationDrawer.es.js +0 -962
  44. package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +0 -8
  45. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +0 -130
  46. package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +0 -8
  47. package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +0 -13
  48. package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +0 -12
  49. package/dist/exports/LayoutGeneric.d.ts +0 -2
  50. package/dist/exports/PyrionNavigationDrawer.d.ts +0 -2
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface PyrionHelpSectionProps {
3
- onCloseClick?: VoidFunction;
4
- children?: ReactNode;
5
- title?: string;
6
- }
7
- declare const PyrionHelpSection: ({ onCloseClick, children, title }: PyrionHelpSectionProps) => import("react/jsx-runtime").JSX.Element;
8
- export default PyrionHelpSection;
@@ -1,130 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { NavigationDrawerSidebarProps } from '../NavigationDrawer/NavigationDrawer';
3
- import { NavigationDrawerActionItemProps } from '../NavigationDrawer/NavigationDrawerActionItem';
4
- import { NavigationDrawerLinkItemProps } from '../NavigationDrawer/NavigationDrawerLinkItem';
5
- import { NotificationCardProps } from '../NotificationCard/NotificationCard';
6
- import { AllOptionAccessor } from '../Shared/types';
7
- import { TabSwitchElement } from '../TabSwitch/TabSwitch';
8
- import { subImageUrlAccessor } from './SystemSessions';
9
- type TProduct = {
10
- name: string;
11
- domain: string;
12
- active: boolean;
13
- coverImage?: string;
14
- thumbnail?: string;
15
- };
16
- type TCompany = {
17
- name: string;
18
- products?: TProduct[];
19
- icon?: string;
20
- };
21
- type TUser = {
22
- auth_id: string;
23
- name: string;
24
- surname?: string;
25
- email?: string;
26
- profile_picture?: string;
27
- };
28
- export type TSystem = {
29
- name: string;
30
- url: string;
31
- coverImage?: string;
32
- thumbnail?: string;
33
- system_id: string;
34
- };
35
- type TSystemSession<TSystemMetadata> = TSystem & {
36
- metadata?: TSystemMetadata;
37
- };
38
- export interface AuthSession<TSystemMetadata> {
39
- token: string;
40
- expires_at: string;
41
- logoutDate?: string;
42
- userHub: TUser;
43
- systems: TSystemSession<TSystemMetadata>[];
44
- }
45
- export interface NavigationDrawerTabsProps {
46
- currentTabName?: string;
47
- customTabs?: TabSwitchElement[];
48
- onTabClick?: (name: string) => void;
49
- }
50
- type AvailableData<TSystemMetadata> = {
51
- company: TCompany;
52
- user: TUser;
53
- system?: TSystem;
54
- metadata?: TSystemMetadata;
55
- };
56
- type SessionAvailableData<TSystemMetadata> = {
57
- company: TCompany;
58
- user: TUser;
59
- system?: TSystemSession<TSystemMetadata>;
60
- metadata?: TSystemMetadata;
61
- };
62
- type UserCardAccesors<TSystemMetadata> = AllOptionAccessor<AvailableData<TSystemMetadata>, string>;
63
- type SessionCardAccesors<TSystemMetadata> = AllOptionAccessor<SessionAvailableData<TSystemMetadata>, string>;
64
- interface UserCardOptions<TSystemMetadata> {
65
- secondarySlot: UserCardAccesors<TSystemMetadata> | [UserCardAccesors<TSystemMetadata>, UserCardAccesors<TSystemMetadata>] | ((data: AvailableData<TSystemMetadata>) => React.ReactNode);
66
- }
67
- interface SessionCardOptions<TSystemMetadata> {
68
- secondarySlot: SessionCardAccesors<TSystemMetadata> | [SessionCardAccesors<TSystemMetadata>, SessionCardAccesors<TSystemMetadata>] | ((data: SessionAvailableData<TSystemMetadata>) => React.ReactNode);
69
- subImageUrlAccessor?: subImageUrlAccessor<TSystemMetadata>;
70
- }
71
- export interface NotificationsDrawerOptions {
72
- hide?: boolean;
73
- hideActionButton?: boolean;
74
- onMarkAllAsRead?: () => void;
75
- }
76
- export interface HelpSectionDrawerOptions {
77
- hide?: boolean;
78
- hideActionButton?: boolean;
79
- }
80
- export interface ConfigurationActionOptions {
81
- hideActionButton?: boolean;
82
- onClick: VoidFunction;
83
- }
84
- export interface PyrionNavigationDrawerOptions<TSystemMetadata> {
85
- userCardOptions?: UserCardOptions<TSystemMetadata>;
86
- sessionCardOptions?: SessionCardOptions<TSystemMetadata>;
87
- notificationsDrawerOptions?: NotificationsDrawerOptions;
88
- helpSectionDrawerOptions?: HelpSectionDrawerOptions;
89
- configurationActionOptions?: ConfigurationActionOptions;
90
- sidebarOptions: Pick<NavigationDrawerSidebarProps, 'modal' | 'closeOnOverlayClick'>;
91
- }
92
- export interface PyrionNavigationDrawerProps<TSystemMetadata, NotificationMetadata = unknown> {
93
- links?: NavigationDrawerLinkItemProps[];
94
- actions?: NavigationDrawerActionItemProps[];
95
- tabsProps?: NavigationDrawerTabsProps;
96
- activeActionId?: string;
97
- currentSystemId: string;
98
- helpSection?: ReactNode | (() => ReactNode);
99
- children?: ReactNode;
100
- state: {
101
- company: TCompany;
102
- enabled_systems: TSystem[];
103
- user: TUser;
104
- sessions?: AuthSession<TSystemMetadata>[];
105
- metadata?: TSystemMetadata;
106
- notifications?: NotificationCardProps<NotificationMetadata>[];
107
- };
108
- options?: PyrionNavigationDrawerOptions<TSystemMetadata>;
109
- onActionClick?: (id: string) => void;
110
- onLinkClick?: (path: string) => void;
111
- onSessionClick?: (session: AuthSession<TSystemMetadata>) => void;
112
- onNavigate?: (from: string, to: string) => void;
113
- onSystemLogoClick?: (collapsed?: boolean) => void;
114
- onLogoutClick?: () => void;
115
- }
116
- type PyrionNavigationControls = {
117
- toggleCollapse?: () => void;
118
- getIsCollapsed?: () => boolean;
119
- subscribeToCollapse?: (listener: (collapsed: boolean) => void) => () => void;
120
- openSidebar?: () => void;
121
- closeSidebar?: () => void;
122
- toggleSidebar?: () => void;
123
- getIsSidebarOpen?: () => boolean;
124
- subscribeToSidebarOpen?: (listener: (open: boolean) => void) => () => void;
125
- openNotifications?: () => void;
126
- openHelp?: () => void;
127
- };
128
- export declare const usePyrionNavigation: () => PyrionNavigationControls;
129
- declare const PyrionNavigationDrawer: <TAppMetadata = unknown, NotificationMetadata = unknown>({ children, helpSection, state, links: navlinks, onLinkClick, onNavigate, onLogoutClick, actions, activeActionId, onActionClick, tabsProps, currentSystemId, onSessionClick, options, onSystemLogoClick }: PyrionNavigationDrawerProps<TAppMetadata, NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
130
- export default PyrionNavigationDrawer;
@@ -1,8 +0,0 @@
1
- import { NotificationCardProps } from '../NotificationCard/NotificationCard';
2
- interface PyrionNotificationsDrawerProps<NotificationMetadata> {
3
- onCloseClick?: VoidFunction;
4
- onMarkAllAsRead?: () => void;
5
- notifications?: NotificationCardProps<NotificationMetadata>[];
6
- }
7
- declare const PyrionNotificationsList: <NotificationMetadata = unknown>({ onCloseClick, onMarkAllAsRead, notifications }: PyrionNotificationsDrawerProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
8
- export default PyrionNotificationsList;
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { PyrionNavigationDrawerOptions, PyrionNavigationDrawerProps } from './PyrionNavigationDrawer';
3
- export type SidebarContentHandle = {
4
- setActiveSection: (section: 'notifications' | 'help') => void;
5
- };
6
- declare const SidebarContent: import('react').ForwardRefExoticComponent<{
7
- closeSidebar: () => void;
8
- options?: PyrionNavigationDrawerOptions<any>;
9
- state: PyrionNavigationDrawerProps<any, any>["state"];
10
- helpSection?: ReactNode | (() => ReactNode);
11
- initialSection?: "notifications" | "help";
12
- } & import('react').RefAttributes<SidebarContentHandle>>;
13
- export default SidebarContent;
@@ -1,12 +0,0 @@
1
- import { AllOptionAccessor } from '../Shared/types';
2
- import { AuthSession } from './PyrionNavigationDrawer';
3
- export interface SystemSessionsProps<TSystemMetadata> {
4
- sessions?: AuthSession<TSystemMetadata>[];
5
- onSessionClick?: (session: AuthSession<TSystemMetadata>) => void;
6
- secondarySlot?: React.ReactNode | string | ((session: AuthSession<TSystemMetadata>) => React.ReactNode | string | null) | null;
7
- subImageUrlAccessor?: subImageUrlAccessor<TSystemMetadata>;
8
- currentSystemId: string;
9
- }
10
- export type subImageUrlAccessor<TSystemMetadata> = AllOptionAccessor<TSystemMetadata, string>;
11
- declare const SystemSessions: <TSystemMetadata = unknown>(props: SystemSessionsProps<TSystemMetadata>) => import("react/jsx-runtime").JSX.Element | null;
12
- export default SystemSessions;
@@ -1,2 +0,0 @@
1
- export { default } from '../components/Layout/LayoutGeneric';
2
- export type { LayoutGenericProps } from '../components/Layout/LayoutGeneric';
@@ -1,2 +0,0 @@
1
- export { default } from '../components/PyrionNavigationDrawer';
2
- export { type PyrionNavigationDrawerProps, type PyrionNavigationDrawerOptions, type NavigationDrawerTabsProps, type AuthSession } from '../components/PyrionNavigationDrawer';