prometeo-design-system 3.1.2 → 3.1.4

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 (147) hide show
  1. package/dist/Avatar.es.js +44 -38
  2. package/dist/Button.es.js +27 -27
  3. package/dist/{CardProfile-Ct5Fs60N.js → CardProfile-y9Knsg26.js} +41 -40
  4. package/dist/CardProfile.es.js +1 -1
  5. package/dist/CheckBox.es.js +1 -1
  6. package/dist/DatePicker-CehTiXGa.js +3631 -0
  7. package/dist/DatePicker.es.js +1 -1
  8. package/dist/DialogModal.es.js +1 -1
  9. package/dist/DrawerDesktop.es.js +78 -72
  10. package/dist/DrawerMobile.es.js +1 -1
  11. package/dist/DropZone.es.js +1 -1
  12. package/dist/FAButton.es.js +1 -1
  13. package/dist/Header.es.js +4 -4
  14. package/dist/{HelperComponent-DhGU_ug-.js → HelperComponent-ljsn0xD6.js} +1 -1
  15. package/dist/Icons/AccountCircle.es.js +1 -1
  16. package/dist/Icons/Add.es.js +1 -1
  17. package/dist/Icons/ArrowLeft.es.js +1 -1
  18. package/dist/Icons/ArrowUpDown.es.js +1 -1
  19. package/dist/Icons/AttachFile.es.js +1 -1
  20. package/dist/Icons/Boards.es.js +1 -1
  21. package/dist/Icons/Calendar.es.js +1 -1
  22. package/dist/Icons/Cancel.es.js +1 -1
  23. package/dist/Icons/Check.es.js +1 -1
  24. package/dist/Icons/CheckCircle.es.js +1 -1
  25. package/dist/Icons/CheckList.es.js +1 -1
  26. package/dist/Icons/ChevronDown.es.js +1 -1
  27. package/dist/Icons/Clock.es.js +1 -1
  28. package/dist/Icons/Close.es.js +1 -1
  29. package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
  30. package/dist/Icons/Collapse.es.js +1 -1
  31. package/dist/Icons/Company.es.js +1 -1
  32. package/dist/Icons/Copy.es.js +1 -1
  33. package/dist/Icons/CrevronLeft.es.js +1 -1
  34. package/dist/Icons/CrevronRight.es.js +1 -1
  35. package/dist/Icons/DocumentFill.es.js +1 -1
  36. package/dist/Icons/Download.es.js +1 -1
  37. package/dist/Icons/Edit.es.js +1 -1
  38. package/dist/Icons/EditFill.es.js +1 -1
  39. package/dist/Icons/Email.es.js +1 -1
  40. package/dist/Icons/Error.es.js +1 -1
  41. package/dist/Icons/EyeVisibility.es.js +1 -1
  42. package/dist/Icons/EyeVisibilityOff.es.js +1 -1
  43. package/dist/Icons/FaLock.es.js +1 -1
  44. package/dist/Icons/FastForward.es.js +1 -1
  45. package/dist/Icons/File.es.js +1 -1
  46. package/dist/Icons/Filter.es.js +1 -1
  47. package/dist/Icons/FormatColorText.es.js +1 -1
  48. package/dist/Icons/Help.es.js +1 -1
  49. package/dist/Icons/HistoryActivity.es.js +1 -1
  50. package/dist/Icons/Home.es.js +1 -1
  51. package/dist/Icons/Image.es.js +1 -1
  52. package/dist/Icons/Info.es.js +1 -1
  53. package/dist/Icons/Logout.es.js +1 -1
  54. package/dist/Icons/MessageSquare.es.js +1 -1
  55. package/dist/Icons/MessageSquareFill.es.js +1 -1
  56. package/dist/Icons/MoreVert.es.js +1 -1
  57. package/dist/Icons/Notifications.es.js +1 -1
  58. package/dist/Icons/Pause.es.js +1 -1
  59. package/dist/Icons/Reload.es.js +1 -1
  60. package/dist/Icons/Search.es.js +1 -1
  61. package/dist/Icons/Settings.es.js +1 -1
  62. package/dist/Icons/Shared.es.js +1 -1
  63. package/dist/Icons/Sort.es.js +1 -1
  64. package/dist/Icons/Stars.es.js +1 -1
  65. package/dist/Icons/Ticket.es.js +1 -1
  66. package/dist/Icons/TicketFilled.es.js +1 -1
  67. package/dist/Icons/Trash.es.js +1 -1
  68. package/dist/Icons/TrashFill.es.js +1 -1
  69. package/dist/Icons/Upload.es.js +1 -1
  70. package/dist/Icons/UploadCloud.es.js +1 -1
  71. package/dist/Icons/UserAdd.es.js +1 -1
  72. package/dist/Icons/UserAddFill.es.js +1 -1
  73. package/dist/Icons/UserPerson.es.js +1 -1
  74. package/dist/Icons/WhatsApp.es.js +1 -1
  75. package/dist/Image.es.js +1 -1
  76. package/dist/{ImageGallery-4DdXqwRy.js → ImageGallery-DG9ovlQ-.js} +1 -1
  77. package/dist/ImageGallery.es.js +1 -1
  78. package/dist/Input.es.js +218 -2
  79. package/dist/InputMultiple.es.js +1 -1
  80. package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-CfWhV1ov.js} +6 -6
  81. package/dist/LayoutGeneric.es.js +1 -1
  82. package/dist/Logo.es.js +1 -1
  83. package/dist/Menu.es.js +1 -1
  84. package/dist/OtpInput.es.js +1 -1
  85. package/dist/Pagination.es.js +1 -1
  86. package/dist/ProfilePictureUpload.es.js +1 -1
  87. package/dist/ProgressBar.es.js +1 -1
  88. package/dist/RadioButton.es.js +2 -2
  89. package/dist/RecurrentDatePicker.es.js +7 -7
  90. package/dist/RecurrentDatePickerRRule.es.js +2 -4
  91. package/dist/Scrollable.d.ts +2 -0
  92. package/dist/Scrollable.es.js +260 -0
  93. package/dist/SegmentedButton.es.js +1 -1
  94. package/dist/{Select-DW30oGym.js → Select-BdxmkrjB.js} +14 -13
  95. package/dist/Select.es.js +1 -1
  96. package/dist/SelectSearch.d.ts +2 -0
  97. package/dist/SelectSearch.es.js +147 -131
  98. package/dist/Skeleton.es.js +1 -1
  99. package/dist/Spinner.es.js +1 -1
  100. package/dist/Steps.es.js +1 -1
  101. package/dist/SwipeContainer.es.js +1 -1
  102. package/dist/Switch.es.js +7 -7
  103. package/dist/TabLinks.es.js +9 -9
  104. package/dist/Table.es.js +1 -1
  105. package/dist/TextArea.es.js +1 -1
  106. package/dist/Toast.es.js +1 -1
  107. package/dist/ToastProvider.es.js +1 -1
  108. package/dist/Tooltip.es.js +1 -1
  109. package/dist/components/Avatar/Avatar.d.ts +1 -1
  110. package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
  111. package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +1 -0
  112. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +41 -21
  113. package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +16 -0
  114. package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +9 -0
  115. package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +18 -0
  116. package/dist/components/NavigationDrawer/{NavItem.d.ts → NavigationDrawerLinkItem.d.ts} +10 -4
  117. package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +11 -0
  118. package/dist/components/NotificationCard/NotificationCard.d.ts +25 -0
  119. package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +8 -0
  120. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +130 -0
  121. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerMobileAppSwitcher.d.ts +10 -0
  122. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerSystemLogo.d.ts +7 -0
  123. package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +8 -0
  124. package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +13 -0
  125. package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +12 -0
  126. package/dist/components/Scrollable/Scrollable.d.ts +31 -0
  127. package/dist/components/SelectSearch/SelectSearch.d.ts +6 -2
  128. package/dist/components/Sidebar/components/badge.d.ts +2 -1
  129. package/dist/components/TabSwitch/TabSwitch.d.ts +0 -20
  130. package/dist/components/TicketCard/TicketCard.d.ts +32 -0
  131. package/dist/components/UserCard/UserCard.d.ts +12 -0
  132. package/dist/exports/Scrollable.d.ts +2 -0
  133. package/dist/exports/SelectSearch.d.ts +2 -0
  134. package/dist/hooks/useLabelBackground.d.ts +1 -0
  135. package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-GkKLlHH4.js} +2 -20
  136. package/dist/lib/utils.d.ts +2 -2
  137. package/dist/prometeo-design-system.es.js +54 -51
  138. package/dist/styles.css +1 -1
  139. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  140. package/package.json +9 -5
  141. package/src/styles/base.css +47 -0
  142. package/src/styles/intellisense.css +1 -0
  143. package/src/styles/palette.css +3 -0
  144. package/src/styles/utilities.css +18 -0
  145. package/dist/DatePicker-D1EwMGIN.js +0 -3568
  146. package/dist/Input-EkMrxcNX.js +0 -241
  147. package/dist/components/PyrionNavigationDrawer/PyirionNavigationDrawer.d.ts +0 -40
@@ -1,29 +1,49 @@
1
- import { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
+ type NavigationDrawerRenderContext = {
3
+ toggleCollapse: () => void;
4
+ getIsCollapsed: () => boolean;
5
+ subscribeToCollapse: (listener: (collapsed: boolean) => void) => () => void;
6
+ openSidebar: () => void;
7
+ closeSidebar: () => void;
8
+ toggleSidebar: () => void;
9
+ getIsSidebarOpen: () => boolean;
10
+ subscribeToSidebarOpen: (listener: (open: boolean) => void) => () => void;
11
+ };
12
+ type NavigationDrawerSlotChildren = ReactNode | ((context: NavigationDrawerRenderContext) => ReactNode);
2
13
  export interface NavigationDrawerProps {
3
- children?: ReactNode;
14
+ children?: NavigationDrawerSlotChildren;
15
+ classNameDrawer?: string;
16
+ classNameSidebar?: string;
4
17
  }
5
- declare const NavigationDrawer: import('react').NamedExoticComponent<NavigationDrawerProps> & {
18
+ type SlotBaseProps = {
19
+ children?: NavigationDrawerSlotChildren;
20
+ className?: string;
21
+ context?: NavigationDrawerRenderContext;
22
+ };
23
+ type ContentProps = SlotBaseProps & Omit<React.AllHTMLAttributes<HTMLDivElement>, "children">;
24
+ export type NavigationDrawerSidebarProps = {
25
+ children?: NavigationDrawerSlotChildren;
26
+ className?: string;
27
+ context?: NavigationDrawerRenderContext;
28
+ modal?: boolean;
29
+ closeOnOverlayClick?: boolean;
30
+ unmountChildrenOnClose?: boolean;
31
+ };
32
+ declare const NavigationDrawer: React.NamedExoticComponent<NavigationDrawerProps> & {
6
33
  readonly type: (props: NavigationDrawerProps) => import("react/jsx-runtime").JSX.Element;
7
34
  } & {
8
- Root: import('react').MemoExoticComponent<(props: NavigationDrawerProps) => import("react/jsx-runtime").JSX.Element>;
9
- Header: ({ children, className }: {
10
- children: ReactNode;
11
- className?: string;
12
- }) => import("react/jsx-runtime").JSX.Element;
13
- Content: ({ children, className }: {
14
- children: ReactNode;
15
- className?: string;
16
- }) => import("react/jsx-runtime").JSX.Element;
17
- Footer: ({ children, className }: {
18
- children: ReactNode;
19
- className?: string;
20
- }) => import("react/jsx-runtime").JSX.Element;
21
- Spacer: ({ className }: {
35
+ Root: React.MemoExoticComponent<(props: NavigationDrawerProps) => import("react/jsx-runtime").JSX.Element>;
36
+ Header: React.MemoExoticComponent<({ children, className, context }: SlotBaseProps) => import("react/jsx-runtime").JSX.Element>;
37
+ Content: React.MemoExoticComponent<({ children, className, context, ...props }: ContentProps) => import("react/jsx-runtime").JSX.Element>;
38
+ Footer: React.MemoExoticComponent<({ children, className, context }: SlotBaseProps) => import("react/jsx-runtime").JSX.Element>;
39
+ Spacer: React.MemoExoticComponent<({ className }: {
22
40
  className?: string;
23
- }) => import("react/jsx-runtime").JSX.Element;
24
- Outlet: ({ children, className }: {
25
- children: ReactNode;
41
+ }) => import("react/jsx-runtime").JSX.Element>;
42
+ Outlet: React.NamedExoticComponent<{
43
+ children?: NavigationDrawerSlotChildren;
26
44
  className?: string;
27
- }) => import("react/jsx-runtime").JSX.Element;
45
+ context?: NavigationDrawerRenderContext;
46
+ } & React.RefAttributes<HTMLDivElement>>;
47
+ Sidebar: React.NamedExoticComponent<NavigationDrawerSidebarProps & React.RefAttributes<HTMLDivElement>>;
28
48
  };
29
49
  export default NavigationDrawer;
@@ -0,0 +1,16 @@
1
+ import { IconComponent } from '../../Icons/types';
2
+ export interface NavigationDrawerActionItemProps {
3
+ id: string;
4
+ title: string;
5
+ icon?: IconComponent;
6
+ count?: number;
7
+ className?: string;
8
+ isActive?: boolean;
9
+ disabled?: boolean;
10
+ onClick?: () => void;
11
+ isView?: boolean | (() => boolean);
12
+ order?: number;
13
+ }
14
+ declare const NavigationDrawerActionItem: import('react').MemoExoticComponent<(props: NavigationDrawerActionItemProps) => import("react/jsx-runtime").JSX.Element | null>;
15
+ export default NavigationDrawerActionItem;
16
+ export type { NavigationDrawerActionItemProps as NavigationDrawerActionItemPropsType };
@@ -0,0 +1,9 @@
1
+ import { NavigationDrawerActionItemProps } from './NavigationDrawerActionItem';
2
+ export interface NavigationDrawerActionsProps {
3
+ actions?: NavigationDrawerActionItemProps[];
4
+ activeActionId?: string;
5
+ onActionClick?: (id: string) => void;
6
+ className?: string;
7
+ }
8
+ declare const NavigationDrawerActions: import('react').MemoExoticComponent<({ actions, activeActionId, onActionClick, className }: NavigationDrawerActionsProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export default NavigationDrawerActions;
@@ -0,0 +1,18 @@
1
+ import { IconComponent } from '../../Icons/types';
2
+ import { default as React } from 'react';
3
+ export interface NavigationDrawerItemBaseProps {
4
+ title: string;
5
+ icon?: IconComponent;
6
+ count?: number;
7
+ className?: string;
8
+ isSelected?: boolean;
9
+ hasSublinks?: boolean;
10
+ subLinksCollapsed?: boolean;
11
+ onToggleSublinks?: (event: React.MouseEvent<HTMLButtonElement>) => void;
12
+ as?: "a" | "button" | "div";
13
+ onClick?: React.MouseEventHandler;
14
+ onAuxClick?: React.MouseEventHandler;
15
+ disabled?: boolean;
16
+ }
17
+ declare const NavigationDrawerItemBase: React.MemoExoticComponent<(props: NavigationDrawerItemBaseProps) => import("react/jsx-runtime").JSX.Element>;
18
+ export default NavigationDrawerItemBase;
@@ -1,7 +1,7 @@
1
1
  import { IconComponent } from '../../Icons/types';
2
2
  import { ReactNode } from 'react';
3
3
  import { NavItemSecondaryProps } from './NavItemSecondary';
4
- export interface NavItemProps {
4
+ export interface NavigationDrawerLinkItemProps {
5
5
  path: string;
6
6
  title: string;
7
7
  icon?: IconComponent;
@@ -9,8 +9,11 @@ export interface NavItemProps {
9
9
  relatedPaths?: string[];
10
10
  count?: number;
11
11
  className?: string;
12
+ disabled?: boolean;
12
13
  isSelected?: boolean;
13
- isCollapsed?: boolean;
14
+ toggleCollapse?: () => void;
15
+ getIsCollapsed?: () => boolean;
16
+ subscribeToCollapse?: (listener: (collapsed: boolean) => void) => () => void;
14
17
  onClick?: (path: string) => void;
15
18
  sublinks?: NavItemSecondaryProps[];
16
19
  subLinksRender?: (sublinks: NavItemSecondaryProps[], controls: NavItemHandler) => ReactNode;
@@ -19,6 +22,9 @@ interface NavItemHandler {
19
22
  toggle: () => void;
20
23
  setIsCollapsed: (collapsed: boolean) => void;
21
24
  isCollapsed: boolean;
25
+ isDrawerCollapsed: boolean;
26
+ toggleDrawerCollapse?: () => void;
27
+ subscribeToCollapse?: (listener: (collapsed: boolean) => void) => () => void;
22
28
  }
23
- declare const NavItem: import('react').NamedExoticComponent<NavItemProps & import('react').RefAttributes<NavItemHandler>>;
24
- export default NavItem;
29
+ declare const NavigationDrawerLinkItem: import('react').NamedExoticComponent<NavigationDrawerLinkItemProps & import('react').RefAttributes<NavItemHandler>>;
30
+ export default NavigationDrawerLinkItem;
@@ -0,0 +1,11 @@
1
+ import { NavigationDrawerLinkItemProps } from './NavigationDrawerLinkItem';
2
+ export interface NavigationDrawerNavlinksProps {
3
+ navlinks?: NavigationDrawerLinkItemProps[];
4
+ handleNavigation: (path: string) => void;
5
+ className?: string;
6
+ getIsCollapsed?: () => boolean;
7
+ toggleCollapse?: () => void;
8
+ subscribeToCollapse?: (listener: (collapsed: boolean) => void) => () => void;
9
+ }
10
+ declare const NavigationDrawerNavlinks: import('react').MemoExoticComponent<({ navlinks, handleNavigation, className, getIsCollapsed, toggleCollapse, subscribeToCollapse }: NavigationDrawerNavlinksProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export default NavigationDrawerNavlinks;
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonVariant } from '../Shared/types';
3
+ export interface NotificationAction<NotificationMetadata = unknown> {
4
+ label: string;
5
+ onClick: (metadata?: NotificationMetadata) => void;
6
+ variant?: ButtonVariant;
7
+ disabled?: boolean;
8
+ hidden?: boolean;
9
+ }
10
+ export interface NoitificationUser {
11
+ name: string;
12
+ profile_picture?: string;
13
+ }
14
+ export interface NotificationCardProps<NotificationMetadata = unknown> {
15
+ user: NoitificationUser;
16
+ body: string | React.ReactNode | ((metadata?: NotificationMetadata) => React.ReactNode);
17
+ date: string | Date;
18
+ actions?: [NotificationAction<NotificationMetadata>, NotificationAction<NotificationMetadata>] | [NotificationAction<NotificationMetadata>];
19
+ isNew?: boolean;
20
+ className?: string;
21
+ metadata?: NotificationMetadata;
22
+ }
23
+ declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, isNew, className, metadata }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
24
+ export default NotificationCard;
25
+ export type NotificationCardComponent = typeof NotificationCard;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,130 @@
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;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { TabSwitchElement } from '../TabSwitch/TabSwitch';
3
+ import { TicketCardHandlerProps } from '../TicketCard/TicketCard';
4
+ export interface PyrionNavigationDrawerMobileAppSwitcherProps {
5
+ tabs: TabSwitchElement[];
6
+ content: React.ReactNode | (() => React.ReactNode);
7
+ controls?: React.RefObject<TicketCardHandlerProps | null>;
8
+ }
9
+ declare const PyrionNavigationDrawerMobileAppSwitcher: ({ tabs, content, controls }: PyrionNavigationDrawerMobileAppSwitcherProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PyrionNavigationDrawerMobileAppSwitcher;
@@ -0,0 +1,7 @@
1
+ import { TSystem } from './PyrionNavigationDrawer';
2
+ declare const SystemLogo: import('react').MemoExoticComponent<({ enabled_systems, onClick, currentSystemId }: {
3
+ enabled_systems?: TSystem[];
4
+ onClick?: () => void;
5
+ currentSystemId?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element>;
7
+ export default SystemLogo;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ type IndicatorType = 'icon' | 'shadow';
3
+ type IndicatorProps = {
4
+ show?: boolean;
5
+ className?: string;
6
+ type?: IndicatorType;
7
+ behavior?: 'scroll-on-click' | 'scroll-on-hover' | 'none';
8
+ };
9
+ interface IndicatorsProps {
10
+ top?: IndicatorProps;
11
+ bottom?: IndicatorProps;
12
+ left?: IndicatorProps;
13
+ right?: IndicatorProps;
14
+ }
15
+ type scrollableAxis = "x" | "y" | "both";
16
+ type ScrollbarProps = {
17
+ hide?: boolean;
18
+ size?: "small" | 'medium';
19
+ };
20
+ export interface ScrollableProps {
21
+ debugMode?: boolean;
22
+ className?: string;
23
+ indicators?: IndicatorsProps;
24
+ axis?: scrollableAxis;
25
+ children?: React.ReactNode;
26
+ scrollbarProps?: ScrollbarProps;
27
+ disableMouseScroll?: boolean;
28
+ defaultBehavior?: 'scroll-on-click' | 'scroll-on-hover' | 'none';
29
+ }
30
+ declare const Scrollable: (props: ScrollableProps) => import("react/jsx-runtime").JSX.Element;
31
+ export default Scrollable;
@@ -1,6 +1,10 @@
1
- import { ComponentType } from 'react';
1
+ import { ComponentType, RefObject } from 'react';
2
2
  import { CustomSelectionDisplayProps, CustomSelectOptionRendererProps, SelectControlsHandler, SelectProps } from '../Select/Select';
3
3
  import { OptionAccessor } from '../Shared/types';
4
+ export interface SelectSearchControlsHandler extends SelectControlsHandler {
5
+ cleanOptions: () => void;
6
+ }
7
+ export type SelectSearchControlsRef = RefObject<SelectSearchControlsHandler | SelectControlsHandler | null>;
4
8
  interface SimpleSelectSearchProps<T extends object> extends BaseSelectSearchProps<T> {
5
9
  multiple?: false;
6
10
  value?: T | undefined;
@@ -28,7 +32,7 @@ export interface BaseSelectSearchProps<T extends object> {
28
32
  className?: string;
29
33
  renderOption?: ComponentType<CustomSelectOptionRendererProps<T>>;
30
34
  renderSelection?: ComponentType<CustomSelectionDisplayProps<T>>;
31
- controls?: React.RefObject<SelectControlsHandler | null>;
35
+ controls?: SelectSearchControlsRef;
32
36
  selectComponentProps?: Partial<Omit<SelectProps<T>, 'controls'>>;
33
37
  }
34
38
  export type SelectSearchProps<T extends object> = SimpleSelectSearchProps<T> | MultipleSelectSearchProps<T>;
@@ -5,5 +5,6 @@ export type BadgeProps = {
5
5
  size?: 'small' | 'medium' | 'large';
6
6
  variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
7
7
  showZero?: boolean;
8
+ disabled?: boolean;
8
9
  };
9
- export declare const Badge: ({ count, maxCount, className, size, variant, showZero }: BadgeProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export declare const Badge: ({ count, maxCount, className, size, variant, showZero, disabled }: BadgeProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -6,31 +6,11 @@ export interface TabSwitchElement {
6
6
  onClick?: (name: string) => void;
7
7
  disabled?: boolean;
8
8
  }
9
- interface SeleneProduct {
10
- image: string;
11
- thumbnail: string;
12
- name: string;
13
- description: string;
14
- href: string;
15
- }
16
- interface SeleneSystems {
17
- name: string;
18
- image: string;
19
- thumbnail: string;
20
- href: string;
21
- }
22
- export interface SeleneHubUser {
23
- company: {
24
- products: SeleneProduct[];
25
- };
26
- enabled_systems: SeleneSystems[];
27
- }
28
9
  export interface TabsSwitchProps {
29
10
  tabs: TabSwitchElement[];
30
11
  className?: string;
31
12
  currentTabName?: string;
32
13
  activeColor?: string;
33
- user?: SeleneHubUser;
34
14
  }
35
15
  declare const TabsSwitch: import('react').ForwardRefExoticComponent<TabsSwitchProps & import('react').RefAttributes<HTMLDivElement>>;
36
16
  export default TabsSwitch;
@@ -0,0 +1,32 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ type TicketCardSlotChildren = ReactNode | ((context: TicketCardRenderContext) => ReactNode);
3
+ type SlotBaseProps = {
4
+ children?: TicketCardSlotChildren;
5
+ className?: string;
6
+ context?: TicketCardRenderContext;
7
+ };
8
+ export type TicketCardHandlerProps = {
9
+ open: () => void;
10
+ close: () => void;
11
+ toggle: () => void;
12
+ };
13
+ type TicketCardRenderContext = {
14
+ isCollapsed: boolean;
15
+ toggle: () => void;
16
+ };
17
+ export interface TicketCardProps {
18
+ children?: TicketCardSlotChildren;
19
+ className?: string;
20
+ controls?: RefObject<TicketCardHandlerProps | null>;
21
+ }
22
+ type ContentSlotProps = SlotBaseProps & {
23
+ onClick?: () => void;
24
+ };
25
+ declare const TicketCard: import('react').NamedExoticComponent<TicketCardProps> & {
26
+ readonly type: (props: TicketCardProps) => import("react/jsx-runtime").JSX.Element;
27
+ } & {
28
+ Root: import('react').MemoExoticComponent<(props: TicketCardProps) => import("react/jsx-runtime").JSX.Element>;
29
+ Content: (props: ContentSlotProps) => import("react/jsx-runtime").JSX.Element;
30
+ Options: (props: SlotBaseProps) => import("react/jsx-runtime").JSX.Element;
31
+ };
32
+ export default TicketCard;
@@ -0,0 +1,12 @@
1
+ import { SizeVariant } from '../Avatar/Avatar';
2
+ export interface UserCardProps {
3
+ name: string;
4
+ mainSlot?: string | React.ReactNode | (() => React.ReactNode);
5
+ secondarySlot?: string | React.ReactNode | (() => React.ReactNode) | null;
6
+ imageUrl?: string;
7
+ subImageUrl?: string;
8
+ avatarSize?: SizeVariant;
9
+ className?: string;
10
+ }
11
+ declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
12
+ export default UserCard;
@@ -0,0 +1,2 @@
1
+ export { default as Scrollable } from '../components/Scrollable/Scrollable';
2
+ export { type ScrollableProps } from '../components/Scrollable/Scrollable';
@@ -1 +1,3 @@
1
1
  export { default } from '../components/SelectSearch/SelectSearch';
2
+ export type { SelectSearchControlsRef } from '../components/SelectSearch/SelectSearch';
3
+ export type { SelectSearchProps } from '../components/SelectSearch/SelectSearch';
@@ -1,5 +1,6 @@
1
1
  interface UseLabelBackgroundResult<T extends HTMLElement> {
2
2
  ref: React.RefObject<T | null>;
3
3
  }
4
+ export declare const getActualBackgroundColor: (element: HTMLElement) => string;
4
5
  export declare function useLabelBackground<T extends HTMLElement = HTMLElement>(): UseLabelBackgroundResult<T>;
5
6
  export {};
@@ -1,19 +1,10 @@
1
1
  import K from "react";
2
2
  var v = { exports: {} }, m = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.js
6
- *
7
- * Copyright (c) Meta Platforms, Inc. and affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
3
  var I;
13
4
  function ee() {
14
5
  if (I) return m;
15
6
  I = 1;
16
- var l = Symbol.for("react.transitional.element"), b = Symbol.for("react.fragment");
7
+ var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.fragment");
17
8
  function c(i, o, s) {
18
9
  var f = null;
19
10
  if (s !== void 0 && (f = "" + s), o.key !== void 0 && (f = "" + o.key), "key" in o) {
@@ -32,15 +23,6 @@ function ee() {
32
23
  return m.Fragment = b, m.jsx = c, m.jsxs = c, m;
33
24
  }
34
25
  var _ = {};
35
- /**
36
- * @license React
37
- * react-jsx-runtime.development.js
38
- *
39
- * Copyright (c) Meta Platforms, Inc. and affiliates.
40
- *
41
- * This source code is licensed under the MIT license found in the
42
- * LICENSE file in the root directory of this source tree.
43
- */
44
26
  var $;
45
27
  function re() {
46
28
  return $ || ($ = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -236,7 +218,7 @@ React keys must be passed directly to JSX without using spread:
236
218
  function y(e) {
237
219
  return typeof e == "object" && e !== null && e.$$typeof === j;
238
220
  }
239
- var E = K, j = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), V = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), k = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Z = Array.isArray, O = console.createTask ? console.createTask : function() {
221
+ var E = K, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), p = /* @__PURE__ */ Symbol.for("react.fragment"), W = /* @__PURE__ */ Symbol.for("react.strict_mode"), U = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), q = /* @__PURE__ */ Symbol.for("react.forward_ref"), z = /* @__PURE__ */ Symbol.for("react.suspense"), G = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.activity"), H = /* @__PURE__ */ Symbol.for("react.client.reference"), k = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Z = Array.isArray, O = console.createTask ? console.createTask : function() {
240
222
  return null;
241
223
  };
242
224
  E = {
@@ -1,3 +1,3 @@
1
- import { OptionAccessor } from '../components/Shared/types';
2
- export declare function getAccessorValue<T, R>(option: T, accessor: OptionAccessor<T, R>): R;
1
+ import { AllOptionAccessor, OptionAccessor } from '../components/Shared/types';
2
+ export declare function getAccessorValue<T, R>(option: T, accessor: (AllOptionAccessor<T, R> | OptionAccessor<T, R>)): R;
3
3
  export declare const hasCoincidences: (option: string, inputValue: string) => boolean;