prometeo-design-system 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/Avatar.es.js +41 -40
  2. package/dist/CardProfile-C1F83KJV.js +280 -0
  3. package/dist/CardProfile.es.js +3 -291
  4. package/dist/CheckBox.es.js +21 -24
  5. package/dist/DialogModal.es.js +46 -52
  6. package/dist/Icons/UserAvatar.es.js +4 -4
  7. package/dist/Input.es.js +72 -73
  8. package/dist/NotificationCard.es.js +21 -28
  9. package/dist/PlainTooltip.es.js +19 -19
  10. package/dist/PyrionLayout.es.js +810 -916
  11. package/dist/Scrollable.es.js +177 -322
  12. package/dist/Select.es.js +47 -47
  13. package/dist/SelectSearch.es.js +103 -107
  14. package/dist/TabLinks.es.js +121 -2
  15. package/dist/TicketCard.es.js +2 -2
  16. package/dist/Toast.es.js +51 -95
  17. package/dist/badge-CbqYNrl4.js +87 -0
  18. package/dist/components/Avatar/Avatar.d.ts +4 -2
  19. package/dist/components/CardProfile/CardProfile.d.ts +4 -7
  20. package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
  21. package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
  22. package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
  23. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
  24. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
  25. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
  26. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
  27. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -4
  28. package/dist/components/Scrollable/Scrollable.d.ts +0 -29
  29. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
  30. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
  31. package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
  32. package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
  33. package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
  34. package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
  35. package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
  36. package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
  37. package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
  38. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
  39. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
  40. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
  41. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
  42. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
  43. package/dist/components/Sidebar/index.d.ts +12 -0
  44. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
  45. package/dist/components/TabLinks/TabLinks.d.ts +0 -19
  46. package/dist/components/Toaster/Toaster.d.ts +1 -13
  47. package/dist/components/UserCard/UserCard.d.ts +2 -3
  48. package/dist/hooks/useLabelBackground.d.ts +0 -1
  49. package/dist/index.d.ts +16 -0
  50. package/dist/prometeo-design-system.es.js +2906 -119
  51. package/dist/styles.css +1 -1
  52. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  53. package/package.json +2 -2
  54. package/dist/TabLinks-DxqprStp.js +0 -147
  55. package/dist/UserCard.d.ts +0 -6
  56. package/dist/UserCard.es.js +0 -28
  57. package/dist/badge-BEx-0Q-K.js +0 -35
  58. package/dist/exports/UserCard.d.ts +0 -2
  59. package/dist/useLabelBackground-D5SzHhl_.js +0 -32
package/dist/Toast.es.js CHANGED
@@ -1,67 +1,59 @@
1
- import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as l } from "./cn-B6yFEsav.js";
3
- import P, { useRef as b, useEffect as I } from "react";
4
- import { toast as h } from "sonner";
5
- import { Info as w } from "./Icons/Info.es.js";
6
- import { Error as v } from "./Icons/Error.es.js";
7
- import { Cancel as y } from "./Icons/Cancel.es.js";
8
- import { CheckCircle as j } from "./Icons/CheckCircle.es.js";
9
- import C from "./Button.es.js";
10
- import { Close as E } from "./Icons/Close.es.js";
11
- const p = {
1
+ import { j as e } from "./jsx-runtime-GkKLlHH4.js";
2
+ import w from "react";
3
+ import { toast as p } from "sonner";
4
+ import { c as s } from "./cn-B6yFEsav.js";
5
+ import { Info as m } from "./Icons/Info.es.js";
6
+ import { Error as u } from "./Icons/Error.es.js";
7
+ import { Cancel as f } from "./Icons/Cancel.es.js";
8
+ import { CheckCircle as b } from "./Icons/CheckCircle.es.js";
9
+ import h from "./Button.es.js";
10
+ import { Close as C } from "./Icons/Close.es.js";
11
+ const x = {
12
12
  dark: {
13
13
  success: {
14
14
  container: "border-b-[2px] border-success-default-default",
15
15
  iconClass: "text-success-medium-default",
16
- icon: j,
17
- loading: "bg-success-default-default"
16
+ icon: b
18
17
  },
19
18
  error: {
20
19
  container: "border-b-[2px] border-error-default-default",
21
20
  iconClass: "text-error-medium-default",
22
- icon: y,
23
- loading: "bg-error-default-default"
21
+ icon: f
24
22
  },
25
23
  warning: {
26
24
  container: "border-b-[2px] border-warning-default-default",
27
25
  iconClass: "text-warning-medium-default",
28
- icon: v,
29
- loading: "bg-warning-default-default"
26
+ icon: u
30
27
  },
31
28
  info: {
32
29
  container: " border-b-[2px] border-primary-default-default",
33
30
  iconClass: "text-primary-default-default",
34
- icon: w,
35
- loading: "bg-primary-default-default"
31
+ icon: m
36
32
  }
37
33
  },
38
34
  light: {
39
35
  success: {
40
36
  container: "",
41
37
  iconClass: "text-success-default-pressed",
42
- icon: j,
43
- loading: "bg-success-default-pressed"
38
+ icon: b
44
39
  },
45
40
  error: {
46
41
  container: "",
47
42
  iconClass: "text-error-medium-pressed",
48
- icon: y,
49
- loading: "bg-error-medium-pressed"
43
+ icon: f
50
44
  },
51
45
  warning: {
52
46
  container: "",
53
47
  iconClass: "text-warning-medium-pressed",
54
- icon: v,
55
- loading: "bg-warning-medium-pressed"
48
+ icon: u
56
49
  },
57
50
  info: {
58
51
  container: "",
59
52
  iconClass: "text-primary-default-pressed",
60
- icon: w,
61
- loading: "bg-primary-default-pressed"
53
+ icon: m
62
54
  }
63
55
  }
64
- }, x = {
56
+ }, l = {
65
57
  dark: {
66
58
  container: "bg-neutral-default-default",
67
59
  title: "text-neutral-strong-default",
@@ -74,121 +66,85 @@ const p = {
74
66
  description: "text-neutral-medium-focused",
75
67
  shadow: "0px 0px 2px 0px rgba(0, 0, 0, 0.35),8px 8px 20px 0px rgba(0, 0, 0, 0.3),0px 0px 15px 0px rgba(0, 0, 0, 0.2),0px 0px 20px 0px rgba(21, 21, 21, 0.3) inset,6px 0px 100px 0px rgba(0, 0, 0, 0.05) inset"
76
68
  }
77
- }, T = (d) => {
78
- const { title: r, description: n, button: a, id: i, icon: s, variant: o = "info", colorMode: e = "dark", showClose: m = !1, loading: c = !1, loadingTimeout: g = 2500, finishLoader: u = !1 } = d;
79
- return /* @__PURE__ */ t.jsxs(
69
+ }, v = (c) => {
70
+ const { title: r, description: i, button: a, id: n, icon: d, variant: o = "info", colorMode: t = "dark", showClose: g = !1 } = c;
71
+ return /* @__PURE__ */ e.jsxs(
80
72
  "div",
81
73
  {
82
74
  style: {
83
- boxShadow: x[e].shadow
75
+ boxShadow: l[t].shadow
84
76
  },
85
- className: l(
77
+ className: s(
86
78
  "flex p-3 pb-4 md:w-[485px] md:max-w-[485px] md:min-w-[485px] md:h-[68px] md:max-h-[68px] rounded-lg gap-2",
87
- "w-[345px] max-w-[345px] min-w-[345px] h-[68px] max-h-[68px] relative",
88
- x[e].container,
89
- p[e][o].container,
90
- c && "border-b-0"
79
+ "w-[345px] max-w-[345px] min-w-[345px] h-[68px] max-h-[68px]",
80
+ l[t].container,
81
+ x[t][o].container
91
82
  ),
92
83
  children: [
93
- /* @__PURE__ */ t.jsxs(
84
+ /* @__PURE__ */ e.jsxs(
94
85
  "div",
95
86
  {
96
87
  className: "flex items-center justify-start gap-2 max-h-[38px] h-[38px] overflow-hidden flex-1 ",
97
88
  children: [
98
- /* @__PURE__ */ t.jsx("div", { className: "f", style: { color: "inherit" }, children: P.createElement(s || p[e][o].icon, { size: 24, className: p[e][o].iconClass }) }),
99
- /* @__PURE__ */ t.jsxs("div", { className: "flex-1 flex flex-col gap-1", children: [
100
- /* @__PURE__ */ t.jsx("p", { className: l("select-none prometeo-fonts-label-medium md:prometeo-fonts-label-xlarge", x[e].title), children: r }),
101
- n && /* @__PURE__ */ t.jsx("p", { className: l("select-none prometeo-fonts-body-xsmall md:prometeo-fonts-body-small text-nowrap overflow-ellipsis ", x[e].description), children: n })
89
+ /* @__PURE__ */ e.jsx("div", { className: "f", style: { color: "inherit" }, children: w.createElement(d || x[t][o].icon, { size: 24, className: x[t][o].iconClass }) }),
90
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col gap-1", children: [
91
+ /* @__PURE__ */ e.jsx("p", { className: s("select-none prometeo-fonts-label-medium md:prometeo-fonts-label-xlarge", l[t].title), children: r }),
92
+ i && /* @__PURE__ */ e.jsx("p", { className: s("select-none prometeo-fonts-body-xsmall md:prometeo-fonts-body-small text-nowrap overflow-ellipsis ", l[t].description), children: i })
102
93
  ] })
103
94
  ]
104
95
  }
105
96
  ),
106
- c && /* @__PURE__ */ t.jsx(z, { color: o, timeOut: g, finished: u, colorMode: e }),
107
- a?.label && /* @__PURE__ */ t.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ t.jsx(
108
- C,
97
+ a?.label && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
98
+ h,
109
99
  {
110
100
  label: a?.label,
111
101
  onClick: () => {
112
- a?.onClick(), h.dismiss(i);
102
+ a?.onClick(), p.dismiss(n);
113
103
  },
114
104
  size: "small",
115
105
  color: "secondary"
116
106
  }
117
107
  ) }),
118
- m && /* @__PURE__ */ t.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ t.jsx(
119
- C,
108
+ g && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
109
+ h,
120
110
  {
121
111
  onClick: () => {
122
- h.dismiss(i);
112
+ p.dismiss(n);
123
113
  },
124
114
  label: "",
125
115
  size: "small",
126
116
  color: "secondary",
127
- icon: /* @__PURE__ */ t.jsx(E, { className: l(e === "light" ? "text-neutral-medium-focused " : "") }),
117
+ icon: /* @__PURE__ */ e.jsx(C, { className: s(t === "light" ? "text-neutral-medium-focused " : "") }),
128
118
  variant: "text",
129
119
  animate: !1,
130
- className: l(e === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
120
+ className: s(t === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
131
121
  }
132
122
  ) })
133
123
  ]
134
124
  }
135
125
  );
136
- }, z = ({ className: d, color: r, timeOut: n, finished: a, colorMode: i }) => {
137
- const s = b(0), o = b(Date.now()), e = b(null);
138
- I(() => {
139
- if (a) {
140
- s.current = 1, e.current && (e.current.style.width = "100%");
141
- return;
142
- }
143
- o.current = Date.now(), s.current = 0;
144
- const c = setInterval(() => {
145
- const g = Date.now() - o.current, u = Math.min(g / n, 1), N = u * 0.95, k = Math.sin(u * Math.PI * 2) * 0.15 + 0.05, M = Math.random() < k;
146
- let f;
147
- if (M)
148
- f = s.current;
149
- else {
150
- const R = (Math.random() - 0.5) * 0.25;
151
- f = Math.max(s.current, Math.min(0.95, N + R));
152
- }
153
- s.current = f, e.current && (e.current.style.width = `${f * 100}%`), (u >= 1 || a) && clearInterval(c);
154
- }, 50);
155
- return () => clearInterval(c);
156
- }, [n, a]);
157
- const m = p[i][r].loading;
158
- return /* @__PURE__ */ t.jsx("div", { className: l(
159
- "absolute bottom-0 translate-y-0 left-0 w-full h-2 overflow-hidden rounded-b-xl",
160
- 'after:content-[""] after:w-[calc(100%-0px)] after:absolute after:bottom-0 after:left-1/2 after:bg-neutral-default-default after:h-2 after:-translate-x-1/2 after:-translate-y-[2px] after:rounded-b-full after:overflow-hidden',
161
- d
162
- ), children: /* @__PURE__ */ t.jsx(
163
- "div",
164
- {
165
- ref: e,
166
- className: l("h-full transition-all duration-300 ease-out", m),
167
- style: { width: "0%" }
168
- }
169
- ) });
170
126
  };
171
- function G(d, r) {
172
- const { duration: n = 2500, showClose: a = !1, colorMode: i = "dark", position: s } = r || {};
173
- return h.custom((o) => /* @__PURE__ */ t.jsx(
174
- T,
127
+ function _(c, r) {
128
+ const { duration: i = 2500, showClose: a = !1, colorMode: n = "dark", position: d } = r || {};
129
+ return p.custom((o) => /* @__PURE__ */ e.jsx(
130
+ v,
175
131
  {
176
132
  id: o,
177
133
  variant: r?.variant || "success",
178
- title: d,
134
+ title: c,
179
135
  description: r?.description,
180
136
  icon: r?.icon,
181
137
  button: r?.button,
182
138
  showClose: a,
183
- colorMode: i
139
+ colorMode: n
184
140
  }
185
141
  ), {
186
- duration: n,
187
- position: s,
142
+ duration: i,
143
+ position: d,
188
144
  unstyled: !0
189
145
  });
190
146
  }
191
147
  export {
192
- T as default,
193
- G as toastpyrion
148
+ v as default,
149
+ _ as toastpyrion
194
150
  };
@@ -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, ScrollTargetConfig } from '../Scrollable/Scrollable';
7
6
  import { AllOptionAccessor } from '../Shared/types';
8
7
  import { TabSwitchElement } from '../TabSwitch/TabSwitch';
9
8
  import { subImageUrlAccessor } from './PLSystemSessions';
@@ -136,13 +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
- setNotificationsLoading?: (loading: boolean) => void;
145
- subscribeToNotificationsScroll?: (callback: (data: ScrollTargetData) => void, config?: ScrollTargetConfig) => () => void;
146
143
  };
147
144
  export declare const usePyrionLayout: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
148
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,33 +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
- type ScrollTopButtonTarget = string;
39
- type ScrollTopButtonProps = {
40
- target?: ScrollTopButtonTarget;
41
- icon?: React.ComponentType<{
42
- size?: number;
43
- className?: string;
44
- }>;
45
- className?: string;
46
- };
47
20
  export interface ScrollableProps {
48
21
  debugMode?: boolean;
49
22
  className?: string;
@@ -54,8 +27,6 @@ export interface ScrollableProps {
54
27
  disableMouseScroll?: boolean;
55
28
  defaultBehavior?: 'scroll-on-click' | 'scroll-on-hover' | 'none';
56
29
  persistScroll?: boolean | string;
57
- controls?: React.RefObject<ScrollableControlsHandler | null>;
58
- scrollTopButton?: ScrollTopButtonProps;
59
30
  }
60
31
  declare const Scrollable: (props: ScrollableProps) => import("react/jsx-runtime").JSX.Element;
61
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';