prometeo-design-system 4.3.1 → 4.3.2

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 +6 -0
  6. package/dist/Icons/ArrowDownward.es.js +10 -0
  7. package/dist/Icons/ArrowUpward.d.ts +6 -0
  8. package/dist/Icons/ArrowUpward.es.js +10 -0
  9. package/dist/Icons/UserAvatar.es.js +4 -4
  10. package/dist/Icons/components/ArrowDownward.d.ts +4 -0
  11. package/dist/Icons/components/ArrowUpward.d.ts +4 -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
@@ -1,87 +0,0 @@
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,6 +0,0 @@
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;
@@ -1,32 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare const useSecondaryBarAnimation: (secondaryBarRef: RefObject<HTMLDivElement | null>, isOpen: boolean) => void;
@@ -1 +0,0 @@
1
- export { SecondaryBar } from './SecondaryBar';
@@ -1,43 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1,13 +0,0 @@
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 {};
@@ -1,3 +0,0 @@
1
- export declare const SidebarProvider: ({ children, }: {
2
- children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
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 {};
@@ -1,4 +0,0 @@
1
- export declare const useNavbarCollapse: (isCollapsed: boolean) => {
2
- isCollapsed: boolean;
3
- navbarRef: import('react').RefObject<HTMLDivElement | null>;
4
- };
@@ -1,32 +0,0 @@
1
- export type Role = "Developer" | "SuperAdmin" | "Admin" | "Regular";
2
- export declare const Roles: {
3
- levelOne: readonly ["Developer"];
4
- levelTwo: Role[];
5
- levelThree: Role[];
6
- levelFour: Role[];
7
- };
8
- export type RoleLevels = typeof Roles;
9
- export interface INavLink {
10
- path: string;
11
- title: string;
12
- icon?: (props: {
13
- size: number;
14
- className: string;
15
- }) => React.ReactNode;
16
- viewAccess?: () => boolean;
17
- discover?: "render" | "none";
18
- isView?: boolean | (() => boolean);
19
- relatedPaths?: string[];
20
- count?: number;
21
- }
22
- export interface INavAction {
23
- actionName: string;
24
- title: string;
25
- icon: (props: {
26
- size: number;
27
- className: string;
28
- }) => React.ReactNode;
29
- viewAccess: () => boolean;
30
- isView?: boolean | (() => boolean);
31
- count?: number;
32
- }
@@ -1,13 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface SidebarContextValue {
3
- isCollapsed: boolean;
4
- setIsCollapsed: (collapsed: boolean) => void;
5
- navbarRef: RefObject<HTMLDivElement | null>;
6
- toggleCollapse: () => void;
7
- activeSecondaryBar: string | null;
8
- openSecondaryBar: (action: string) => void;
9
- closeSecondaryBar: () => void;
10
- toggleSecondaryBar: (action: string) => void;
11
- }
12
- export declare const SidebarContext: import('react').Context<SidebarContextValue | undefined>;
13
- export declare const useSidebar: () => SidebarContextValue;
@@ -1,12 +0,0 @@
1
- export { SecondaryBar } from './SecondaryBar/SecondaryBar';
2
- export { Sidebar } from './SidebarComposable';
3
- export { SidebarProvider } from './hooks/SidebarProvider';
4
- export { useSidebar } from './hooks/useSidebarHook';
5
- export { NavigationLink } from './components/NavigationLink';
6
- export { Badge } from './components/badge';
7
- export { NavBarActions } from './components/nav-actions';
8
- export { NavbarLinks } from './components/nav-links';
9
- export { useActionsNavbar } from './hooks/useNavBarActions';
10
- export { useNavbarCollapse } from './hooks/useNavBarCollapse';
11
- export type { BadgeProps } from './components/badge';
12
- export type { NavbarLinksProps } from './components/nav-links';
@@ -1,2 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare const useNavbarAnimations: (navbarRef: RefObject<HTMLDivElement | null>, isCollapsed: boolean, isSecondaryBarOpen?: boolean) => void;
@@ -1,26 +0,0 @@
1
- import { useRef as o, useLayoutEffect as u } from "react";
2
- const c = (e) => {
3
- let t = e;
4
- for (; t && t !== document.body; ) {
5
- const n = window.getComputedStyle(t).backgroundColor;
6
- if (n && n !== "transparent" && n !== "rgba(0, 0, 0, 0)")
7
- return n;
8
- t = t.parentElement;
9
- }
10
- const r = window.getComputedStyle(document.body).backgroundColor;
11
- return r && r !== "transparent" && r !== "rgba(0, 0, 0, 0)" ? r : "rgb(255, 255, 255)";
12
- };
13
- function d() {
14
- const e = o(null);
15
- return u(() => {
16
- if (!e.current || !e.current.parentElement) return;
17
- const t = c(e.current.parentElement);
18
- e.current.style.backgroundColor = t;
19
- }, []), {
20
- ref: e
21
- };
22
- }
23
- export {
24
- c as g,
25
- d as u
26
- };