prometeo-design-system 4.3.1 → 4.3.3

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 (68) hide show
  1. package/dist/Avatar.es.js +40 -41
  2. package/dist/CardProfile.es.js +291 -3
  3. package/dist/CheckBox.es.js +24 -21
  4. package/dist/DialogModal.es.js +52 -46
  5. package/dist/Icons/ArrowDownward.d.ts +2 -0
  6. package/dist/Icons/ArrowDownward.es.js +9 -0
  7. package/dist/Icons/ArrowUpward.d.ts +2 -0
  8. package/dist/Icons/ArrowUpward.es.js +9 -0
  9. package/dist/Icons/UserAvatar.es.js +4 -4
  10. package/dist/Icons/components/ArrowDownward.d.ts +3 -0
  11. package/dist/Icons/components/ArrowUpward.d.ts +3 -0
  12. package/dist/Icons/index.d.ts +2 -0
  13. package/dist/Icons/types.d.ts +4 -0
  14. package/dist/Icons.es.js +124 -120
  15. package/dist/Input.es.js +73 -72
  16. package/dist/NotificationCard.es.js +28 -21
  17. package/dist/PlainTooltip.es.js +19 -19
  18. package/dist/PyrionLayout.es.js +916 -810
  19. package/dist/Scrollable.es.js +322 -177
  20. package/dist/Select.es.js +47 -47
  21. package/dist/SelectSearch.es.js +107 -103
  22. package/dist/TabLinks-DxqprStp.js +147 -0
  23. package/dist/TabLinks.es.js +2 -121
  24. package/dist/TicketCard.es.js +2 -2
  25. package/dist/Toast.es.js +95 -51
  26. package/dist/UserCard.d.ts +6 -0
  27. package/dist/UserCard.es.js +28 -0
  28. package/dist/badge-BEx-0Q-K.js +35 -0
  29. package/dist/components/Avatar/Avatar.d.ts +2 -4
  30. package/dist/components/CardProfile/CardProfile.d.ts +7 -4
  31. package/dist/components/DropZone/useFileDropzone.d.ts +9 -1
  32. package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
  33. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +5 -2
  34. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +3 -1
  35. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +2 -0
  36. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +2 -0
  37. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +4 -1
  38. package/dist/components/Scrollable/Scrollable.d.ts +29 -0
  39. package/dist/components/TabLinks/TabLinks.d.ts +19 -0
  40. package/dist/components/Toaster/Toaster.d.ts +13 -1
  41. package/dist/components/UserCard/UserCard.d.ts +3 -2
  42. package/dist/exports/UserCard.d.ts +2 -0
  43. package/dist/hooks/useLabelBackground.d.ts +1 -0
  44. package/dist/index.d.ts +0 -16
  45. package/dist/prometeo-design-system.es.js +119 -2906
  46. package/dist/styles.css +1 -1
  47. package/dist/useLabelBackground-D5SzHhl_.js +32 -0
  48. package/package.json +1 -2
  49. package/dist/CardProfile-C1F83KJV.js +0 -280
  50. package/dist/badge-CbqYNrl4.js +0 -87
  51. package/dist/components/Layout/LayoutGeneric.d.ts +0 -6
  52. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +0 -32
  53. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +0 -2
  54. package/dist/components/Sidebar/SecondaryBar/index.d.ts +0 -1
  55. package/dist/components/Sidebar/SidebarComposable.d.ts +0 -43
  56. package/dist/components/Sidebar/components/NavigationLink.d.ts +0 -11
  57. package/dist/components/Sidebar/components/company-logo.d.ts +0 -5
  58. package/dist/components/Sidebar/components/nav-actions.d.ts +0 -7
  59. package/dist/components/Sidebar/components/nav-links.d.ts +0 -7
  60. package/dist/components/Sidebar/context/SidebarContext.d.ts +0 -13
  61. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +0 -3
  62. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +0 -9
  63. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +0 -4
  64. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +0 -32
  65. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +0 -13
  66. package/dist/components/Sidebar/index.d.ts +0 -12
  67. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +0 -2
  68. package/dist/useLabelBackground-BDIHUdND.js +0 -26
package/dist/Toast.es.js CHANGED
@@ -1,59 +1,67 @@
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 = {
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 = {
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: b
16
+ icon: j,
17
+ loading: "bg-success-default-default"
17
18
  },
18
19
  error: {
19
20
  container: "border-b-[2px] border-error-default-default",
20
21
  iconClass: "text-error-medium-default",
21
- icon: f
22
+ icon: y,
23
+ loading: "bg-error-default-default"
22
24
  },
23
25
  warning: {
24
26
  container: "border-b-[2px] border-warning-default-default",
25
27
  iconClass: "text-warning-medium-default",
26
- icon: u
28
+ icon: v,
29
+ loading: "bg-warning-default-default"
27
30
  },
28
31
  info: {
29
32
  container: " border-b-[2px] border-primary-default-default",
30
33
  iconClass: "text-primary-default-default",
31
- icon: m
34
+ icon: w,
35
+ loading: "bg-primary-default-default"
32
36
  }
33
37
  },
34
38
  light: {
35
39
  success: {
36
40
  container: "",
37
41
  iconClass: "text-success-default-pressed",
38
- icon: b
42
+ icon: j,
43
+ loading: "bg-success-default-pressed"
39
44
  },
40
45
  error: {
41
46
  container: "",
42
47
  iconClass: "text-error-medium-pressed",
43
- icon: f
48
+ icon: y,
49
+ loading: "bg-error-medium-pressed"
44
50
  },
45
51
  warning: {
46
52
  container: "",
47
53
  iconClass: "text-warning-medium-pressed",
48
- icon: u
54
+ icon: v,
55
+ loading: "bg-warning-medium-pressed"
49
56
  },
50
57
  info: {
51
58
  container: "",
52
59
  iconClass: "text-primary-default-pressed",
53
- icon: m
60
+ icon: w,
61
+ loading: "bg-primary-default-pressed"
54
62
  }
55
63
  }
56
- }, l = {
64
+ }, x = {
57
65
  dark: {
58
66
  container: "bg-neutral-default-default",
59
67
  title: "text-neutral-strong-default",
@@ -66,85 +74,121 @@ const x = {
66
74
  description: "text-neutral-medium-focused",
67
75
  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"
68
76
  }
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(
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(
72
80
  "div",
73
81
  {
74
82
  style: {
75
- boxShadow: l[t].shadow
83
+ boxShadow: x[e].shadow
76
84
  },
77
- className: s(
85
+ className: l(
78
86
  "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",
79
- "w-[345px] max-w-[345px] min-w-[345px] h-[68px] max-h-[68px]",
80
- l[t].container,
81
- x[t][o].container
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"
82
91
  ),
83
92
  children: [
84
- /* @__PURE__ */ e.jsxs(
93
+ /* @__PURE__ */ t.jsxs(
85
94
  "div",
86
95
  {
87
96
  className: "flex items-center justify-start gap-2 max-h-[38px] h-[38px] overflow-hidden flex-1 ",
88
97
  children: [
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 })
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 })
93
102
  ] })
94
103
  ]
95
104
  }
96
105
  ),
97
- a?.label && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
98
- h,
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,
99
109
  {
100
110
  label: a?.label,
101
111
  onClick: () => {
102
- a?.onClick(), p.dismiss(n);
112
+ a?.onClick(), h.dismiss(i);
103
113
  },
104
114
  size: "small",
105
115
  color: "secondary"
106
116
  }
107
117
  ) }),
108
- g && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
109
- h,
118
+ m && /* @__PURE__ */ t.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ t.jsx(
119
+ C,
110
120
  {
111
121
  onClick: () => {
112
- p.dismiss(n);
122
+ h.dismiss(i);
113
123
  },
114
124
  label: "",
115
125
  size: "small",
116
126
  color: "secondary",
117
- icon: /* @__PURE__ */ e.jsx(C, { className: s(t === "light" ? "text-neutral-medium-focused " : "") }),
127
+ icon: /* @__PURE__ */ t.jsx(E, { className: l(e === "light" ? "text-neutral-medium-focused " : "") }),
118
128
  variant: "text",
119
129
  animate: !1,
120
- className: s(t === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
130
+ className: l(e === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
121
131
  }
122
132
  ) })
123
133
  ]
124
134
  }
125
135
  );
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
+ ) });
126
170
  };
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,
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,
131
175
  {
132
176
  id: o,
133
177
  variant: r?.variant || "success",
134
- title: c,
178
+ title: d,
135
179
  description: r?.description,
136
180
  icon: r?.icon,
137
181
  button: r?.button,
138
182
  showClose: a,
139
- colorMode: n
183
+ colorMode: i
140
184
  }
141
185
  ), {
142
- duration: i,
143
- position: d,
186
+ duration: n,
187
+ position: s,
144
188
  unstyled: !0
145
189
  });
146
190
  }
147
191
  export {
148
- v as default,
149
- _ as toastpyrion
192
+ T as default,
193
+ G as toastpyrion
150
194
  };
@@ -0,0 +1,6 @@
1
+ export * from './exports/UserCard'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/UserCard'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/UserCard'
6
+ export {}
@@ -0,0 +1,28 @@
1
+ import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { memo as d, useCallback as a } from "react";
3
+ import { c as n } from "./cn-B6yFEsav.js";
4
+ import o from "./Avatar.es.js";
5
+ const m = ({ name: r, imageUrl: f, avatarSize: s = "xxs", subImageUrl: i, className: u, mainSlot: l = r, secondarySlot: e, avatarProps: c }) => {
6
+ const p = a(() => l ? typeof l == "string" ? /* @__PURE__ */ t.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1 select-text", children: l }) : typeof l == "function" ? l() : l : null, [l]), x = a(() => e ? typeof e == "string" ? /* @__PURE__ */ t.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis select-text", children: e }) : typeof e == "function" ? e() : e : null, [e]);
7
+ return /* @__PURE__ */ t.jsxs("div", { className: n("flex items-center gap-2 p-3 rounded-lg max-w-full max-h-full select-none ", u), children: [
8
+ /* @__PURE__ */ t.jsx(
9
+ o,
10
+ {
11
+ fallbackText: r,
12
+ sizeImage: s,
13
+ sizeFallback: s,
14
+ imageUrl: f,
15
+ subImageUrl: i,
16
+ ...c
17
+ }
18
+ ),
19
+ /* @__PURE__ */ t.jsxs("div", { className: n("usercard-content flex flex-col gap-0 flex-1 overflow-hidden w-full transition-all duration-300 ease-in-out ", e && "gap-1"), children: [
20
+ /* @__PURE__ */ t.jsx("div", { className: "w-full", children: p() }),
21
+ /* @__PURE__ */ t.jsx("div", { className: "flex gap-1 justify-between overflow-hidden relative w-full", children: x() })
22
+ ] })
23
+ ] });
24
+ }, h = d(m);
25
+ h.displayName = "UserCard";
26
+ export {
27
+ h as default
28
+ };
@@ -0,0 +1,35 @@
1
+ import { j as s } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { c } from "./cn-B6yFEsav.js";
3
+ const g = ({
4
+ count: r,
5
+ maxCount: t = 9,
6
+ className: a = "",
7
+ size: n = "medium",
8
+ variant: l = "primary",
9
+ showZero: i = !1,
10
+ disabled: d = !1
11
+ }) => {
12
+ const e = r, u = e > t ? `+${t}` : e;
13
+ if (e === 0 && !i) return null;
14
+ const m = {
15
+ small: "w-4.5 h-4.5 text-xs ",
16
+ medium: "w-5 h-5 text-xs",
17
+ large: "w-6 h-6 text-sm"
18
+ }, o = {
19
+ primary: "bg-primary-default-default text-neutral-strong-default",
20
+ secondary: "bg-neutral-medium-default text-neutral-strong-default",
21
+ success: "bg-green-500 text-white",
22
+ warning: "bg-yellow-500 text-black",
23
+ danger: "bg-red-500 text-white"
24
+ };
25
+ return /* @__PURE__ */ s.jsx("div", { className: c(
26
+ "rounded-full flex items-center justify-center font-medium select-none",
27
+ m[n],
28
+ o[l],
29
+ a,
30
+ d && "text-neutral-strong-disabled bg-primary-medium-disabled"
31
+ ), children: /* @__PURE__ */ s.jsx("span", { children: u }) });
32
+ };
33
+ export {
34
+ g as B
35
+ };
@@ -1,5 +1,5 @@
1
1
  export type SizeVariant = "xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
2
- interface IAvatar {
2
+ export interface IAvatar {
3
3
  imageUrl?: string;
4
4
  sizeImage?: SizeVariant;
5
5
  sizeFallback?: SizeVariant;
@@ -7,7 +7,5 @@ interface IAvatar {
7
7
  subImageUrl?: string;
8
8
  borderColor?: string;
9
9
  fallbackType?: "initials" | "defaultAvatar";
10
- sizeFallbackIcon?: number;
11
10
  }
12
- export default function Avatar({ imageUrl, sizeImage, sizeFallback, sizeFallbackIcon, fallbackText, subImageUrl, fallbackType, }: IAvatar): import("react/jsx-runtime").JSX.Element;
13
- export {};
11
+ export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl, fallbackType, }: IAvatar): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { IAvatar as AvatarProps } from '../Avatar/Avatar';
2
3
  interface ICardProfile {
3
4
  children: ReactNode;
4
5
  dropMenu?: ReactNode;
@@ -29,9 +30,10 @@ interface IDropMenu {
29
30
  handleTokenLogin: () => void;
30
31
  }
31
32
  interface ICardProfileImage {
32
- isExpanded: boolean;
33
+ isExpanded?: boolean;
33
34
  imageUrl?: string;
34
35
  fallbackText?: string;
36
+ avatarProps?: AvatarProps;
35
37
  }
36
38
  interface ICardProfileContent {
37
39
  isExpanded: boolean;
@@ -39,7 +41,8 @@ interface ICardProfileContent {
39
41
  nameCompany: string;
40
42
  nameArea: string;
41
43
  cardProfile: ReactNode;
42
- onClick: () => void;
44
+ onClick?: () => void;
45
+ unassigned?: boolean;
43
46
  }
44
47
  interface ICardProfileOptions {
45
48
  onClick: () => void;
@@ -47,8 +50,8 @@ interface ICardProfileOptions {
47
50
  }
48
51
  export declare const CardProfile: (({ children }: ICardProfile) => import("react/jsx-runtime").JSX.Element) & {
49
52
  Menu: ({ isExpanded, sessions, onClickLogout, handleTokenLogin, }: IDropMenu) => 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;
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;
52
55
  Separator: () => import("react/jsx-runtime").JSX.Element;
53
56
  Options: ({ isExpanded, onClick }: ICardProfileOptions) => import("react/jsx-runtime").JSX.Element;
54
57
  };
@@ -1,8 +1,15 @@
1
1
  import { default as React } from 'react';
2
2
  import { DropzoneOptions } from 'react-dropzone';
3
- export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop"> {
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"> {
4
5
  onFilesAccepted?: (files: File[]) => void;
5
6
  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[]>>;
6
13
  }
7
14
  export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...options }: UseFileDropzoneOptions): {
8
15
  hasErrors: boolean;
@@ -19,3 +26,4 @@ export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...o
19
26
  getRootProps: <T extends import('react-dropzone').DropzoneRootProps>(props?: T) => T;
20
27
  getInputProps: <T extends import('react-dropzone').DropzoneInputProps>(props?: T) => T;
21
28
  };
29
+ export {};
@@ -17,10 +17,11 @@ 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
- isNew?: boolean;
20
+ read?: boolean;
21
21
  className?: string;
22
22
  metadata?: NotificationMetadata;
23
+ onClick?: (metadata?: NotificationMetadata) => void;
23
24
  }
24
- declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, isNew, className, metadata }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
25
+ declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, read, className, metadata, onClick }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
25
26
  export default NotificationCard;
26
27
  export type NotificationCardComponent = typeof NotificationCard;
@@ -1,15 +1,18 @@
1
1
  import { NotificationCardProps } from '../NotificationCard/NotificationCard';
2
+ import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
2
3
  interface PLNotificationsDrawerProps<NotificationMetadata> {
3
4
  onCloseClick?: VoidFunction;
4
5
  onMarkAllAsRead?: () => void;
5
6
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<NotificationMetadata> | null>;
7
+ scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
6
8
  }
7
9
  export interface NotificationsListControlsHandler<NotificationMetadata> {
8
- addNewNotification: (notification: NotificationCardProps<NotificationMetadata> | NotificationCardProps<NotificationMetadata>[]) => void;
10
+ addNewNotification: (notification: NotificationCardProps<NotificationMetadata> | NotificationCardProps<NotificationMetadata>[], position?: 'top' | 'bottom') => void;
9
11
  subscribeToUpdates: (callback: (notifications: NotificationCardProps<NotificationMetadata>[], count: number) => void) => () => void;
10
12
  removeNotification: (id: string | string[]) => void;
11
13
  removeAllNotifications: () => void;
12
14
  setNotifications: (notifications: NotificationCardProps<NotificationMetadata>[]) => void;
15
+ setLoading: (loading: boolean) => void;
13
16
  }
14
- declare const PLNotificationsList: <NotificationMetadata = unknown>({ onCloseClick, onMarkAllAsRead, notificationsListControls }: PLNotificationsDrawerProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
17
+ declare const PLNotificationsList: <NotificationMetadata = unknown>({ onCloseClick, onMarkAllAsRead, notificationsListControls, scrollableControls }: PLNotificationsDrawerProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
15
18
  export default PLNotificationsList;
@@ -1,12 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PLSidebarContentHandle } from './PLSidebarContent';
3
3
  import { NotificationsListControlsHandler } from './PLNotificationsList';
4
- declare const _DrawerSidebarWrapper: <TNotificationMetadata = unknown>({ options, helpSection, sidebarContentRef, initialSectionRef, notificationsListControls, }: {
4
+ import { ScrollableControlsHandler } from '../Scrollable/Scrollable';
5
+ declare const _DrawerSidebarWrapper: <TNotificationMetadata = unknown>({ options, helpSection, sidebarContentRef, initialSectionRef, notificationsListControls, scrollableControls, }: {
5
6
  options?: any;
6
7
  helpSection?: ReactNode | (() => ReactNode);
7
8
  sidebarContentRef: React.RefObject<PLSidebarContentHandle | null>;
8
9
  initialSectionRef: React.RefObject<"notifications" | "help">;
9
10
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
11
+ scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
10
12
  }) => import("react/jsx-runtime").JSX.Element;
11
13
  declare const DrawerSidebarWrapper: typeof _DrawerSidebarWrapper;
12
14
  export default DrawerSidebarWrapper;
@@ -1,6 +1,7 @@
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';
4
5
  export type PLSidebarContentHandle = {
5
6
  setActiveSection: (section: 'notifications' | 'help') => void;
6
7
  };
@@ -10,6 +11,7 @@ export type PLSidebarContentProps<TNotificationMetadata = unknown> = {
10
11
  helpSection?: ReactNode | (() => ReactNode);
11
12
  initialSection?: 'notifications' | 'help';
12
13
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
14
+ scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
13
15
  };
14
16
  declare const PLSidebarContent: <TNotificationMetadata = unknown>(props: PLSidebarContentProps<TNotificationMetadata> & {
15
17
  ref?: ForwardedRef<PLSidebarContentHandle>;
@@ -6,6 +6,7 @@ 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';
9
10
  export type TLayoutBaseProps<TAppMetadata = unknown, TNotificationMetadata = unknown> = {
10
11
  links?: PyrionLayoutLinkItemProps[];
11
12
  handleNavigation: (path: string) => void;
@@ -29,6 +30,7 @@ export type TLayoutBaseProps<TAppMetadata = unknown, TNotificationMetadata = unk
29
30
  initialSectionRef: React.RefObject<'notifications' | 'help'>;
30
31
  navigationControlsRef: React.RefObject<PyrionNavigationControls<TNotificationMetadata>>;
31
32
  notificationsListControls?: React.RefObject<NotificationsListControlsHandler<TNotificationMetadata> | null>;
33
+ scrollableControls?: React.RefObject<ScrollableControlsHandler | null>;
32
34
  outletRef: React.RefObject<HTMLDivElement | null>;
33
35
  onProfileClick?: (collapsed: boolean) => void;
34
36
  };
@@ -3,6 +3,7 @@ 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';
6
7
  import { AllOptionAccessor } from '../Shared/types';
7
8
  import { TabSwitchElement } from '../TabSwitch/TabSwitch';
8
9
  import { subImageUrlAccessor } from './PLSystemSessions';
@@ -135,11 +136,13 @@ export type PyrionNavigationControls<TNotificationMetadata = unknown> = {
135
136
  openNotifications?: () => void;
136
137
  showErrorModal?: (node: (ReactNode | (() => ReactNode)), disableDrawer: boolean, hideCloseButton?: boolean) => void;
137
138
  closeErrorModal?: () => void;
138
- addNewNotification?: (notification: NotificationCardProps<TNotificationMetadata> | NotificationCardProps<TNotificationMetadata>[]) => void;
139
+ addNewNotification?: (notification: NotificationCardProps<TNotificationMetadata> | NotificationCardProps<TNotificationMetadata>[], position?: 'top' | 'bottom') => void;
139
140
  subscribeToNotificationsUpdates?: (callback: (notifications: NotificationCardProps<TNotificationMetadata>[], count: number) => void) => () => void;
140
141
  setNotifications?: (notifications: NotificationCardProps<TNotificationMetadata>[]) => void;
141
142
  removeAllNotifications?: () => void;
142
143
  removeNotification?: (id: string | string[]) => void;
144
+ setNotificationsLoading?: (loading: boolean) => void;
145
+ subscribeToNotificationsScroll?: (callback: (data: ScrollTargetData) => void, config?: ScrollTargetConfig) => () => void;
143
146
  };
144
147
  export declare const usePyrionLayout: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
145
148
  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,6 +17,33 @@ 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
+ };
20
47
  export interface ScrollableProps {
21
48
  debugMode?: boolean;
22
49
  className?: string;
@@ -27,6 +54,8 @@ export interface ScrollableProps {
27
54
  disableMouseScroll?: boolean;
28
55
  defaultBehavior?: 'scroll-on-click' | 'scroll-on-hover' | 'none';
29
56
  persistScroll?: boolean | string;
57
+ controls?: React.RefObject<ScrollableControlsHandler | null>;
58
+ scrollTopButton?: ScrollTopButtonProps;
30
59
  }
31
60
  declare const Scrollable: (props: ScrollableProps) => import("react/jsx-runtime").JSX.Element;
32
61
  export default Scrollable;
@@ -30,3 +30,22 @@ declare namespace TabLinks {
30
30
  }
31
31
  declare const _default: import('react').MemoExoticComponent<typeof TabLinks>;
32
32
  export default _default;
33
+ interface TabLinkItemProps {
34
+ id: string | number;
35
+ title: string;
36
+ iconPosition?: "left" | "right" | "top" | "bottom";
37
+ onClick: () => void;
38
+ disabled?: boolean;
39
+ className?: string;
40
+ isActive?: boolean;
41
+ activeClassName?: string;
42
+ icon?: IconComponent | React.ReactNode | (() => React.ReactNode);
43
+ animated?: boolean;
44
+ indicatorClassName?: string;
45
+ onIconHover?: () => void;
46
+ onIconClick?: () => void;
47
+ iconTooltipTitle?: string;
48
+ iconTooltipProps?: PlainTooltipProps;
49
+ iconSize?: number;
50
+ }
51
+ export declare const TabLinkItem: ({ id, title, icon, iconPosition, onClick, disabled, className, isActive, activeClassName, animated, onIconHover, onIconClick, iconTooltipTitle, iconTooltipProps, iconSize, indicatorClassName }: TabLinkItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
- import { ColorMode } from '../Shared/types';
2
1
  import { IconComponent } from '../../Icons/types';
2
+ import { ColorMode } from '../Shared/types';
3
3
  type ToastElementsProps = {
4
4
  container: string;
5
5
  iconClass: string;
6
6
  icon: IconComponent;
7
+ loading: string;
7
8
  };
8
9
  type ToastVarians = 'success' | 'error' | 'warning' | 'info';
9
10
  type ToastVariantClassnames = {
@@ -30,7 +31,18 @@ export interface PyrionToastProps {
30
31
  colorMode?: ColorMode;
31
32
  showClose?: boolean;
32
33
  position?: ToastPosition;
34
+ loading?: boolean;
35
+ loadingTimeout?: number;
36
+ finishLoader?: boolean;
33
37
  }
34
38
  declare const PyrionToast: (props: PyrionToastProps) => import("react/jsx-runtime").JSX.Element;
35
39
  export default PyrionToast;
36
40
  export declare function toastpyrion(title: string, options?: Omit<PyrionToastProps, 'id'>): string | number;
41
+ export declare const toastPyrionPromise: (promise: Promise<any>, options?: {
42
+ loading?: Omit<PyrionToastProps, "id">;
43
+ success?: Omit<PyrionToastProps, "id">;
44
+ error?: Omit<PyrionToastProps, "id">;
45
+ colorMode?: ColorMode;
46
+ position?: ToastPosition;
47
+ timeOut?: number;
48
+ }) => Promise<any>;
@@ -1,4 +1,4 @@
1
- import { SizeVariant } from '../Avatar/Avatar';
1
+ import { IAvatar, SizeVariant } from '../Avatar/Avatar';
2
2
  export interface UserCardProps {
3
3
  name: string;
4
4
  mainSlot?: string | React.ReactNode | (() => React.ReactNode);
@@ -7,6 +7,7 @@ export interface UserCardProps {
7
7
  subImageUrl?: string;
8
8
  avatarSize?: SizeVariant;
9
9
  className?: string;
10
+ avatarProps?: IAvatar;
10
11
  }
11
- declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
12
+ declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot, avatarProps }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
12
13
  export default UserCard;
@@ -0,0 +1,2 @@
1
+ export { default } from '../components/UserCard/UserCard';
2
+ export type { UserCardProps } from '../components/UserCard/UserCard';
@@ -2,5 +2,6 @@ interface UseLabelBackgroundResult<T extends HTMLElement> {
2
2
  ref: React.RefObject<T | null>;
3
3
  }
4
4
  export declare const getActualBackgroundColor: (element: HTMLElement) => string;
5
+ export declare const rgbHueAlterate: (rgb: string, variation: number, opacity?: number) => string;
5
6
  export declare function useLabelBackground<T extends HTMLElement = HTMLElement>(): UseLabelBackgroundResult<T>;
6
7
  export {};