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.
Files changed (58) 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 -27
  9. package/dist/PlainTooltip.es.js +19 -19
  10. package/dist/PyrionLayout.es.js +786 -879
  11. package/dist/Scrollable.es.js +127 -201
  12. package/dist/Select.es.js +47 -47
  13. package/dist/SelectSearch.es.js +83 -85
  14. package/dist/TabLinks.es.js +121 -2
  15. package/dist/TicketCard.es.js +2 -2
  16. package/dist/badge-CbqYNrl4.js +87 -0
  17. package/dist/components/Avatar/Avatar.d.ts +4 -2
  18. package/dist/components/CardProfile/CardProfile.d.ts +4 -7
  19. package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
  20. package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
  21. package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
  22. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
  23. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
  24. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
  25. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
  26. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -3
  27. package/dist/components/Scrollable/Scrollable.d.ts +0 -19
  28. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
  29. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
  30. package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
  31. package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
  32. package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
  33. package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
  34. package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
  35. package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
  36. package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
  37. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
  38. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
  39. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
  40. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
  41. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
  42. package/dist/components/Sidebar/index.d.ts +12 -0
  43. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
  44. package/dist/components/TabLinks/TabLinks.d.ts +0 -19
  45. package/dist/components/UserCard/UserCard.d.ts +2 -3
  46. package/dist/hooks/useLabelBackground.d.ts +0 -1
  47. package/dist/index.d.ts +16 -0
  48. package/dist/prometeo-design-system.es.js +2906 -119
  49. package/dist/styles.css +1 -1
  50. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  51. package/package.json +2 -2
  52. package/src/styles/base.css +46 -0
  53. package/dist/TabLinks-DxqprStp.js +0 -147
  54. package/dist/UserCard.d.ts +0 -6
  55. package/dist/UserCard.es.js +0 -28
  56. package/dist/badge-BEx-0Q-K.js +0 -35
  57. package/dist/exports/UserCard.d.ts +0 -2
  58. package/dist/useLabelBackground-D5SzHhl_.js +0 -32
@@ -1,4 +1,123 @@
1
- import { T as f } from "./TabLinks-DxqprStp.js";
1
+ import { j as i } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { motion as C } from "framer-motion";
3
+ import { memo as N, isValidElement as I } from "react";
4
+ import { c as s } from "./cn-B6yFEsav.js";
5
+ import z from "./PlainTooltip.es.js";
6
+ const E = /* @__PURE__ */ Symbol.for("react.memo"), $ = (t, a, r) => {
7
+ if (!t)
8
+ return null;
9
+ if (typeof t == "function") {
10
+ const l = t;
11
+ return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
12
+ }
13
+ if (typeof t == "object") {
14
+ if (I(t))
15
+ return t;
16
+ if ("$$typeof" in t && t.$$typeof === E) {
17
+ const l = t;
18
+ return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
19
+ }
20
+ }
21
+ return t;
22
+ };
23
+ function p({
24
+ items: t,
25
+ activeTab: a,
26
+ onTabChange: r,
27
+ className: l,
28
+ tabClassName: o,
29
+ activeTabClassName: h,
30
+ indicatorClassName: g,
31
+ animated: y = !0,
32
+ renderTab: d
33
+ }) {
34
+ const j = (e) => {
35
+ e.disabled || r?.(e.id, e);
36
+ };
37
+ return /* @__PURE__ */ i.jsx(
38
+ "div",
39
+ {
40
+ className: s(
41
+ "flex flex-row justify-around items-end relative border-b border-neutral-strong-default w-full md:justify-start md:px-10 md:gap-5",
42
+ l
43
+ ),
44
+ role: "tablist",
45
+ children: t?.map((e) => {
46
+ const n = a === e.id, u = () => j(e), { iconPosition: f = "top", iconSize: T = 24 } = e, v = (c, m, b, k, x) => b ? /* @__PURE__ */ i.jsx(z, { title: b, ...k, children: /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c }) }) : /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c });
47
+ return d ? /* @__PURE__ */ i.jsx("div", { children: d(e, n, u, e.onIconClick, e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.iconSize) }, e.id) : /* @__PURE__ */ i.jsxs(
48
+ "button",
49
+ {
50
+ onClick: u,
51
+ disabled: e.disabled,
52
+ className: s(
53
+ "group/tablink-item",
54
+ "relative flex flex-col pb-3 justify-center items-center h-max px-4 font-medium focus:outline-none transition-colors",
55
+ !e.disabled && "hover:text-primary-default-default cursor-pointer",
56
+ e.disabled && "opacity-50 cursor-default",
57
+ o,
58
+ n && h
59
+ ),
60
+ tabIndex: e.disabled ? -1 : 0,
61
+ "aria-label": e.title,
62
+ role: "tab",
63
+ "aria-selected": n,
64
+ children: [
65
+ /* @__PURE__ */ i.jsxs("div", { className: s(
66
+ "flex items-center gap-0.5",
67
+ f === "left" && "flex-row-reverse",
68
+ f === "top" ? "flex-col-reverse" : "gap-1"
69
+ ), children: [
70
+ /* @__PURE__ */ i.jsx(
71
+ "label",
72
+ {
73
+ className: s(
74
+ "transition-all duration-300 ease-in-out relative z-10 group-hover/tablink-item:text-neutral-medium-hover ",
75
+ n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large cursor-pointer",
76
+ "leading-6! line-clamp-1"
77
+ ),
78
+ children: e.title
79
+ }
80
+ ),
81
+ v($(e.icon, s(
82
+ "transition-all duration-300 ease-in-out group-hover/tablink-item:text-neutral-medium-hover ",
83
+ n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
84
+ ), T), e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.onIconClick)
85
+ ] }),
86
+ n && y && /* @__PURE__ */ i.jsx(
87
+ C.div,
88
+ {
89
+ layoutId: "tab-indicator",
90
+ className: s(
91
+ "absolute -bottom-px left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
92
+ g
93
+ ),
94
+ transition: {
95
+ type: "spring",
96
+ stiffness: 250,
97
+ damping: 17
98
+ },
99
+ "aria-hidden": "true"
100
+ }
101
+ )
102
+ ]
103
+ },
104
+ e.id
105
+ );
106
+ })
107
+ }
108
+ );
109
+ }
110
+ p.displayName = "TabLinks";
111
+ const H = N(p, (t, a) => {
112
+ if (t.activeTab !== a.activeTab || t.className !== a.className || t.tabClassName !== a.tabClassName || t.activeTabClassName !== a.activeTabClassName || t.indicatorClassName !== a.indicatorClassName || t.animated !== a.animated || t.onTabChange !== a.onTabChange || t.renderTab !== a.renderTab || t.items.length !== a.items.length)
113
+ return !1;
114
+ for (let r = 0; r < t.items.length; r++) {
115
+ const l = t.items[r], o = a.items[r];
116
+ if (l.id !== o.id || l.title !== o.title || l.disabled !== o.disabled || l.description !== o.description)
117
+ return !1;
118
+ }
119
+ return !0;
120
+ });
2
121
  export {
3
- f as default
122
+ H as default
4
123
  };
@@ -1,5 +1,5 @@
1
1
  import { j as l } from "./jsx-runtime-GkKLlHH4.js";
2
- import { g as L } from "./useLabelBackground-D5SzHhl_.js";
2
+ import { g as L } from "./useLabelBackground-BDIHUdND.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import { memo as O, useState as y, useCallback as x, useImperativeHandle as S, Children as A, isValidElement as B, cloneElement as k, useRef as w, useLayoutEffect as N, useEffect as z } from "react";
5
5
  import { CrevronLeft as I } from "./Icons/CrevronLeft.es.js";
@@ -79,7 +79,7 @@ const C = (n, t) => typeof n == "function" ? t ? n(t) : null : n, q = (n) => {
79
79
  type: "button",
80
80
  onClick: t,
81
81
  className: d(
82
- "ticketcard-toggle-button text-neutral-default-default",
82
+ "ticketcard-toggle-button",
83
83
  "grid place-items-center cursor-pointer transition-transform rounded-lg w-8 max-w-8 min-w-8",
84
84
  "bg-neutral-default-default ",
85
85
  "transition-all duration-300 ease-in-out",
@@ -0,0 +1,87 @@
1
+ import { j as n } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { c as i } from "./cn-B6yFEsav.js";
3
+ import { forwardRef as b, useState as p, useRef as h, useEffect as v } from "react";
4
+ const N = b((t, s) => {
5
+ const [c, d] = p(t?.currentTabName || t.tabs[0].name), r = h(null), { tabs: l = [], className: u, activeColor: a = "var(--neutral-900)", currentSystemId: m } = t;
6
+ v(() => {
7
+ r.current?.style.setProperty("--tab-bg", a);
8
+ }, [a]);
9
+ const o = l.find((e) => e.id === m || e.name === (t?.currentTabName || c));
10
+ return /* @__PURE__ */ n.jsx(
11
+ "div",
12
+ {
13
+ ref: s,
14
+ className: i(
15
+ "select-none",
16
+ "flex flex-col gap-2",
17
+ "bg-neutral-strong-default",
18
+ "h-full w-14 max-w-14 pl-[6px] py-6",
19
+ "border-r border-neutral-default-default",
20
+ u
21
+ ),
22
+ children: l.map(
23
+ (e) => {
24
+ const f = e.name === o?.name, x = typeof e.thumbnail == "string" ? /* @__PURE__ */ n.jsx("img", { src: e.thumbnail, alt: e.description, className: "aspect-square object-contain rounded", draggable: !1 }) : e.thumbnail, g = () => {
25
+ e.disabled || (d(e.name), e.onClick && e.onClick(e.name));
26
+ };
27
+ return /* @__PURE__ */ n.jsx(
28
+ "div",
29
+ {
30
+ className: i(
31
+ "bg-[(--tab-bg)]",
32
+ "h-12 w-[50px] z-20",
33
+ "flex items-center pl-[6px] ",
34
+ "rounded-l-[8px]",
35
+ "tabswitch-element relative",
36
+ f && "active"
37
+ ),
38
+ onClick: g,
39
+ ref: r,
40
+ children: /* @__PURE__ */ n.jsx("div", { className: i(
41
+ "size-8 rounded-[4px]",
42
+ "grid place-items-center",
43
+ "tab-thumbnail-icon",
44
+ "bg-transparent text-neutral-default-default",
45
+ e?.className
46
+ ), children: x })
47
+ },
48
+ e.name
49
+ );
50
+ }
51
+ )
52
+ }
53
+ );
54
+ }), C = ({
55
+ count: t,
56
+ maxCount: s = 9,
57
+ className: c = "",
58
+ size: d = "medium",
59
+ variant: r = "primary",
60
+ showZero: l = !1,
61
+ disabled: u = !1
62
+ }) => {
63
+ const a = t, m = a > s ? `+${s}` : a;
64
+ if (a === 0 && !l) return null;
65
+ const o = {
66
+ small: "w-4.5 h-4.5 text-xs ",
67
+ medium: "w-5 h-5 text-xs",
68
+ large: "w-6 h-6 text-sm"
69
+ }, e = {
70
+ primary: "bg-primary-default-default text-neutral-strong-default",
71
+ secondary: "bg-neutral-medium-default text-neutral-strong-default",
72
+ success: "bg-green-500 text-white",
73
+ warning: "bg-yellow-500 text-black",
74
+ danger: "bg-red-500 text-white"
75
+ };
76
+ return /* @__PURE__ */ n.jsx("div", { className: i(
77
+ "rounded-full flex items-center justify-center font-medium select-none",
78
+ o[d],
79
+ e[r],
80
+ c,
81
+ u && "text-neutral-strong-disabled bg-primary-medium-disabled"
82
+ ), children: /* @__PURE__ */ n.jsx("span", { children: m }) });
83
+ };
84
+ export {
85
+ C as B,
86
+ N as T
87
+ };
@@ -1,5 +1,5 @@
1
1
  export type SizeVariant = "xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
2
- export interface IAvatar {
2
+ interface IAvatar {
3
3
  imageUrl?: string;
4
4
  sizeImage?: SizeVariant;
5
5
  sizeFallback?: SizeVariant;
@@ -7,5 +7,7 @@ export interface IAvatar {
7
7
  subImageUrl?: string;
8
8
  borderColor?: string;
9
9
  fallbackType?: "initials" | "defaultAvatar";
10
+ sizeFallbackIcon?: number;
10
11
  }
11
- export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl, fallbackType, }: IAvatar): import("react/jsx-runtime").JSX.Element;
12
+ export default function Avatar({ imageUrl, sizeImage, sizeFallback, sizeFallbackIcon, fallbackText, subImageUrl, fallbackType, }: IAvatar): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
- import { IAvatar as AvatarProps } from '../Avatar/Avatar';
3
2
  interface ICardProfile {
4
3
  children: ReactNode;
5
4
  dropMenu?: ReactNode;
@@ -30,10 +29,9 @@ interface IDropMenu {
30
29
  handleTokenLogin: () => void;
31
30
  }
32
31
  interface ICardProfileImage {
33
- isExpanded?: boolean;
32
+ isExpanded: boolean;
34
33
  imageUrl?: string;
35
34
  fallbackText?: string;
36
- avatarProps?: AvatarProps;
37
35
  }
38
36
  interface ICardProfileContent {
39
37
  isExpanded: boolean;
@@ -41,8 +39,7 @@ interface ICardProfileContent {
41
39
  nameCompany: string;
42
40
  nameArea: string;
43
41
  cardProfile: ReactNode;
44
- onClick?: () => void;
45
- unassigned?: boolean;
42
+ onClick: () => void;
46
43
  }
47
44
  interface ICardProfileOptions {
48
45
  onClick: () => void;
@@ -50,8 +47,8 @@ interface ICardProfileOptions {
50
47
  }
51
48
  export declare const CardProfile: (({ children }: ICardProfile) => import("react/jsx-runtime").JSX.Element) & {
52
49
  Menu: ({ isExpanded, sessions, onClickLogout, handleTokenLogin, }: IDropMenu) => import("react/jsx-runtime").JSX.Element;
53
- Image: ({ imageUrl, fallbackText, avatarProps }: ICardProfileImage) => import("react/jsx-runtime").JSX.Element;
54
- Content: ({ isExpanded, nameUser, nameCompany, nameArea, cardProfile, onClick, unassigned }: ICardProfileContent) => import("react/jsx-runtime").JSX.Element;
50
+ Image: ({ imageUrl, fallbackText }: ICardProfileImage) => import("react/jsx-runtime").JSX.Element;
51
+ Content: ({ isExpanded, nameUser, nameCompany, nameArea, cardProfile, onClick, }: ICardProfileContent) => import("react/jsx-runtime").JSX.Element;
55
52
  Separator: () => import("react/jsx-runtime").JSX.Element;
56
53
  Options: ({ isExpanded, onClick }: ICardProfileOptions) => import("react/jsx-runtime").JSX.Element;
57
54
  };
@@ -1,15 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { DropzoneOptions } from 'react-dropzone';
3
- type MIMETypeString = 'image/*' | 'image/png' | 'image/jpeg' | 'image/gif' | 'image/svg+xml' | 'image/webp' | 'image/vnd.dwg' | 'image/vnd.dxf' | 'text/plain' | 'text/markdown' | 'text/csv' | 'application/pdf' | 'application/postscript' | 'application/illustrator' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.ms-powerpoint' | 'application/vnd.visio' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/zip' | 'application/vnd.rar' | 'application/x-7z-compressed' | 'application/gzip' | 'application/x-tar' | 'video/*' | 'video/mp4' | 'video/x-msvideo' | 'video/quicktime' | 'video/webm' | 'video/x-matroska' | 'audio/*' | 'audio/mpeg' | 'audio/wav' | 'audio/mp4' | 'audio/ogg' | 'application/acad' | 'application/step' | 'application/iges' | 'model/stl' | 'message/rfc822' | 'application/vnd.ms-outlook' | 'application/mbox' | 'application/hl7-v2' | 'application/dicom' | 'application/octet-stream';
4
- export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop" | "accept"> {
3
+ export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop"> {
5
4
  onFilesAccepted?: (files: File[]) => void;
6
5
  onFilesRejected?: (rejectedFiles: unknown[]) => void;
7
- accept?: Partial<Record<MIMETypeString, string[]>>;
8
- }
9
- export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop" | "accept"> {
10
- onFilesAccepted?: (files: File[]) => void;
11
- onFilesRejected?: (rejectedFiles: unknown[]) => void;
12
- accept?: Partial<Record<MIMETypeString, string[]>>;
13
6
  }
14
7
  export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...options }: UseFileDropzoneOptions): {
15
8
  hasErrors: boolean;
@@ -26,4 +19,3 @@ export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...o
26
19
  getRootProps: <T extends import('react-dropzone').DropzoneRootProps>(props?: T) => T;
27
20
  getInputProps: <T extends import('react-dropzone').DropzoneInputProps>(props?: T) => T;
28
21
  };
29
- export {};
@@ -0,0 +1,6 @@
1
+ export interface LayoutGenericProps {
2
+ children: React.ReactNode;
3
+ sidebar?: React.ReactNode;
4
+ }
5
+ declare const _default: import('react').MemoExoticComponent<({ children, sidebar }: LayoutGenericProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export default _default;
@@ -17,11 +17,10 @@ export interface NotificationCardProps<NotificationMetadata = any> {
17
17
  body: string | React.ReactNode | ((metadata?: NotificationMetadata) => React.ReactNode);
18
18
  date: string | Date;
19
19
  actions?: [NotificationAction<NotificationMetadata>, NotificationAction<NotificationMetadata>] | [NotificationAction<NotificationMetadata>];
20
- read?: boolean;
20
+ isNew?: boolean;
21
21
  className?: string;
22
22
  metadata?: NotificationMetadata;
23
- onClick?: (metadata?: NotificationMetadata) => void;
24
23
  }
25
- declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, read, className, metadata, onClick }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
24
+ declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, isNew, className, metadata }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
26
25
  export default NotificationCard;
27
26
  export type NotificationCardComponent = typeof NotificationCard;
@@ -1,18 +1,15 @@
1
1
  import { NotificationCardProps } from '../NotificationCard/NotificationCard';
2
- import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
3
2
  interface PLNotificationsDrawerProps<NotificationMetadata> {
4
3
  onCloseClick?: VoidFunction;
5
4
  onMarkAllAsRead?: () => void;
6
5
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<NotificationMetadata> | null>;
7
- scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
8
6
  }
9
7
  export interface NotificationsListControlsHandler<NotificationMetadata> {
10
- addNewNotification: (notification: NotificationCardProps<NotificationMetadata> | NotificationCardProps<NotificationMetadata>[], position?: 'top' | 'bottom') => void;
8
+ addNewNotification: (notification: NotificationCardProps<NotificationMetadata> | NotificationCardProps<NotificationMetadata>[]) => void;
11
9
  subscribeToUpdates: (callback: (notifications: NotificationCardProps<NotificationMetadata>[], count: number) => void) => () => void;
12
10
  removeNotification: (id: string | string[]) => void;
13
11
  removeAllNotifications: () => void;
14
12
  setNotifications: (notifications: NotificationCardProps<NotificationMetadata>[]) => void;
15
- setLoading: (loading: boolean) => void;
16
13
  }
17
- declare const PLNotificationsList: <NotificationMetadata = unknown>({ onCloseClick, onMarkAllAsRead, notificationsListControls, scrollableControls }: PLNotificationsDrawerProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
14
+ declare const PLNotificationsList: <NotificationMetadata = unknown>({ onCloseClick, onMarkAllAsRead, notificationsListControls }: PLNotificationsDrawerProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
18
15
  export default PLNotificationsList;
@@ -1,14 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PLSidebarContentHandle } from './PLSidebarContent';
3
3
  import { NotificationsListControlsHandler } from './PLNotificationsList';
4
- import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
5
- declare const _DrawerSidebarWrapper: <TNotificationMetadata = unknown>({ options, helpSection, sidebarContentRef, initialSectionRef, notificationsListControls, scrollableControls, }: {
4
+ declare const _DrawerSidebarWrapper: <TNotificationMetadata = unknown>({ options, helpSection, sidebarContentRef, initialSectionRef, notificationsListControls, }: {
6
5
  options?: any;
7
6
  helpSection?: ReactNode | (() => ReactNode);
8
7
  sidebarContentRef: React.RefObject<PLSidebarContentHandle | null>;
9
8
  initialSectionRef: React.RefObject<"notifications" | "help">;
10
9
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
11
- scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
12
10
  }) => import("react/jsx-runtime").JSX.Element;
13
11
  declare const DrawerSidebarWrapper: typeof _DrawerSidebarWrapper;
14
12
  export default DrawerSidebarWrapper;
@@ -1,7 +1,6 @@
1
1
  import { ReactElement, ReactNode, ForwardedRef } from 'react';
2
2
  import { PyrionLayoutOptions } from './PyrionLayout';
3
3
  import { NotificationsListControlsHandler } from './PLNotificationsList';
4
- import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
5
4
  export type PLSidebarContentHandle = {
6
5
  setActiveSection: (section: 'notifications' | 'help') => void;
7
6
  };
@@ -11,7 +10,6 @@ export type PLSidebarContentProps<TNotificationMetadata = unknown> = {
11
10
  helpSection?: ReactNode | (() => ReactNode);
12
11
  initialSection?: 'notifications' | 'help';
13
12
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
14
- scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
15
13
  };
16
14
  declare const PLSidebarContent: <TNotificationMetadata = unknown>(props: PLSidebarContentProps<TNotificationMetadata> & {
17
15
  ref?: ForwardedRef<PLSidebarContentHandle>;
@@ -6,7 +6,6 @@ import { TicketCardHandlerProps } from '../TicketCard';
6
6
  import { NotificationsListControlsHandler } from './PLNotificationsList';
7
7
  import { PLSidebarContentHandle } from './PLSidebarContent';
8
8
  import { AuthSession, PyrionNavigationControls, PyrionLayoutOptions, PyrionLayoutProps } from './PyrionLayout';
9
- import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
10
9
  export type TLayoutBaseProps<TAppMetadata = unknown, TNotificationMetadata = unknown> = {
11
10
  links?: PyrionLayoutLinkItemProps[];
12
11
  handleNavigation: (path: string) => void;
@@ -30,7 +29,6 @@ export type TLayoutBaseProps<TAppMetadata = unknown, TNotificationMetadata = unk
30
29
  initialSectionRef: React.RefObject<'notifications' | 'help'>;
31
30
  navigationControlsRef: React.RefObject<PyrionNavigationControls<TNotificationMetadata>>;
32
31
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
33
- scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
34
32
  outletRef: React.RefObject<HTMLDivElement | null>;
35
33
  onProfileClick?: (collapsed: boolean) => void;
36
34
  };
@@ -3,7 +3,6 @@ import { PyrionLayoutActionItemProps } from '../NavigationDrawer/NavigationDrawe
3
3
  import { PyrionLayoutLinkItemProps } from '../NavigationDrawer/NavigationDrawerLinkItem';
4
4
  import { NavigationDrawerSidebarProps } from '../NavigationDrawer/NavigationDrawerSidebar';
5
5
  import { NotificationCardProps } from '../NotificationCard/NotificationCard';
6
- import { ScrollTargetData } from '../Scrollable/Scrollable';
7
6
  import { AllOptionAccessor } from '../Shared/types';
8
7
  import { TabSwitchElement } from '../TabSwitch/TabSwitch';
9
8
  import { subImageUrlAccessor } from './PLSystemSessions';
@@ -136,12 +135,11 @@ export type PyrionNavigationControls<TNotificationMetadata = unknown> = {
136
135
  openNotifications?: () => void;
137
136
  showErrorModal?: (node: (ReactNode | (() => ReactNode)), disableDrawer: boolean, hideCloseButton?: boolean) => void;
138
137
  closeErrorModal?: () => void;
139
- addNewNotification?: (notification: NotificationCardProps<TNotificationMetadata> | NotificationCardProps<TNotificationMetadata>[], position?: 'top' | 'bottom') => void;
138
+ addNewNotification?: (notification: NotificationCardProps<TNotificationMetadata> | NotificationCardProps<TNotificationMetadata>[]) => void;
140
139
  subscribeToNotificationsUpdates?: (callback: (notifications: NotificationCardProps<TNotificationMetadata>[], count: number) => void) => () => void;
141
140
  setNotifications?: (notifications: NotificationCardProps<TNotificationMetadata>[]) => void;
142
141
  removeAllNotifications?: () => void;
143
142
  removeNotification?: (id: string | string[]) => void;
144
- subscribeToNotificationsScroll?: (callback: (data: ScrollTargetData) => void) => () => void;
145
143
  };
146
144
  export declare const usePyrionLayout: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
147
145
  declare const PyrionLayout: <TAppMetadata = unknown, TNotificationMetadata = unknown>({ children, helpSection, state, links: navlinks, onLinkClick, onNavigate, onLogoutClick, actions, activeActionId, onActionClick, tabsProps, currentSystemId, onSessionClick, onSystemLogoClick, onProfileClick, ...props }: PyrionLayoutProps<TAppMetadata, TNotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
@@ -17,24 +17,6 @@ type ScrollbarProps = {
17
17
  hide?: boolean;
18
18
  size?: "small" | 'medium';
19
19
  };
20
- export interface ScrollTargetData {
21
- percentage: number;
22
- direction: 'up' | 'down' | 'left' | 'right';
23
- scrollTop: number;
24
- scrollLeft: number;
25
- scrollHeight: number;
26
- scrollWidth: number;
27
- clientHeight: number;
28
- clientWidth: number;
29
- }
30
- export interface ScrollTargetConfig {
31
- target: number;
32
- direction?: 'x' | 'y' | 'both';
33
- trip?: 'forth' | 'back' | 'round-trip';
34
- }
35
- export interface ScrollableControlsHandler {
36
- subscribeToScrollTarget: (callback: (data: ScrollTargetData) => void, config?: ScrollTargetConfig) => () => void;
37
- }
38
20
  export interface ScrollableProps {
39
21
  debugMode?: boolean;
40
22
  className?: string;
@@ -45,7 +27,6 @@ export interface ScrollableProps {
45
27
  disableMouseScroll?: boolean;
46
28
  defaultBehavior?: 'scroll-on-click' | 'scroll-on-hover' | 'none';
47
29
  persistScroll?: boolean | string;
48
- controls?: React.RefObject<ScrollableControlsHandler | null>;
49
30
  }
50
31
  declare const Scrollable: (props: ScrollableProps) => import("react/jsx-runtime").JSX.Element;
51
32
  export default Scrollable;
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SecondaryBarRootProps {
3
+ children: ReactNode;
4
+ isOpen?: boolean;
5
+ className?: string;
6
+ width?: string;
7
+ action?: string;
8
+ primarySidebarCollapsed?: boolean;
9
+ onClose?: () => void;
10
+ }
11
+ export interface HeaderProps {
12
+ children: ReactNode;
13
+ className?: string;
14
+ }
15
+ export interface ContentProps {
16
+ children: ReactNode;
17
+ className?: string;
18
+ }
19
+ export interface FooterProps {
20
+ children: ReactNode;
21
+ className?: string;
22
+ }
23
+ export interface SpacerProps {
24
+ className?: string;
25
+ }
26
+ export declare const SecondaryBar: (({ children, isOpen, className, width, action, primarySidebarCollapsed, onClose, }: SecondaryBarRootProps) => import("react/jsx-runtime").JSX.Element) & {
27
+ Root: ({ children, isOpen, className, width, action, primarySidebarCollapsed, onClose, }: SecondaryBarRootProps) => import("react/jsx-runtime").JSX.Element;
28
+ Header: ({ children, className }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
29
+ Content: ({ children, className }: ContentProps) => import("react/jsx-runtime").JSX.Element;
30
+ Footer: ({ children, className }: FooterProps) => import("react/jsx-runtime").JSX.Element;
31
+ Spacer: ({ className }: SpacerProps) => import("react/jsx-runtime").JSX.Element;
32
+ };
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useSecondaryBarAnimation: (secondaryBarRef: RefObject<HTMLDivElement | null>, isOpen: boolean) => void;
@@ -0,0 +1 @@
1
+ export { SecondaryBar } from './SecondaryBar';
@@ -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
+ };