prometeo-design-system 4.7.4 → 4.7.6
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.
- package/dist/Avatar.es.js +38 -36
- package/dist/PyrionLayout.es.js +774 -746
- package/dist/UserCard.es.js +22 -20
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +3 -0
- package/dist/components/TabSwitch/TabSwitch.d.ts +2 -0
- package/dist/components/UserCard/UserCard.d.ts +2 -1
- package/package.json +1 -1
package/dist/UserCard.es.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { memo as o, useCallback as f } from "react";
|
|
3
3
|
import { c as n } from "./cn-B6yFEsav.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import u from "./Skeleton.es.js";
|
|
5
|
+
import h from "./Avatar.es.js";
|
|
6
|
+
const j = ({ name: s, imageUrl: i, avatarSize: a = "xxs", subImageUrl: c, className: p, mainSlot: r = s, secondarySlot: l, avatarProps: x, isLoading: t = !1 }) => {
|
|
7
|
+
const d = f(() => r ? typeof r == "string" ? /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1 select-text", children: r }) : typeof r == "function" ? r() : r : null, [r]), m = f(() => l ? typeof l == "string" ? /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis select-text", children: l }) : typeof l == "function" ? l() : l : null, [l]);
|
|
8
|
+
return /* @__PURE__ */ e.jsxs("div", { className: n("flex items-center gap-2 p-3 rounded-lg max-w-full max-h-full select-none ", p), children: [
|
|
9
|
+
/* @__PURE__ */ e.jsx(
|
|
10
|
+
h,
|
|
10
11
|
{
|
|
11
|
-
fallbackText:
|
|
12
|
-
sizeImage:
|
|
13
|
-
sizeFallback:
|
|
14
|
-
imageUrl:
|
|
15
|
-
subImageUrl:
|
|
16
|
-
|
|
12
|
+
fallbackText: s,
|
|
13
|
+
sizeImage: a,
|
|
14
|
+
sizeFallback: a,
|
|
15
|
+
imageUrl: i,
|
|
16
|
+
subImageUrl: c,
|
|
17
|
+
isLoading: t,
|
|
18
|
+
...x
|
|
17
19
|
}
|
|
18
20
|
),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ e.jsxs("div", { className: n("usercard-content flex flex-col gap-0 flex-1 overflow-hidden w-full transition-all duration-300 ease-in-out ", l && "gap-1"), children: [
|
|
22
|
+
t ? /* @__PURE__ */ e.jsx(u, { shape: "rounded", className: "w-full h-4" }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: d() }),
|
|
23
|
+
t ? /* @__PURE__ */ e.jsx(u, { shape: "rounded", className: "w-full h-3 mt-1" }) : /* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-between overflow-hidden relative w-full", children: m() })
|
|
22
24
|
] })
|
|
23
25
|
] });
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
+
}, w = o(j);
|
|
27
|
+
w.displayName = "UserCard";
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
w as default
|
|
28
30
|
};
|
|
@@ -7,5 +7,6 @@ export interface IAvatar {
|
|
|
7
7
|
subImageUrl?: string;
|
|
8
8
|
borderColor?: string;
|
|
9
9
|
fallbackType?: "initials" | "defaultAvatar";
|
|
10
|
+
isLoading?: boolean;
|
|
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, fallbackText, subImageUrl, fallbackType, isLoading }: IAvatar): import("react/jsx-runtime").JSX.Element;
|
|
@@ -145,6 +145,9 @@ export type PyrionNavigationControls<TNotificationMetadata = unknown> = {
|
|
|
145
145
|
setNotificationsLoading?: (loading: boolean, type?: NotificationLoaderType) => void;
|
|
146
146
|
setNotificationsError?: (hasError: boolean, children?: React.ReactNode | (() => React.ReactNode)) => void;
|
|
147
147
|
subscribeToNotificationsScroll?: (callback: (data: ScrollTargetData) => void, config?: ScrollTargetConfig) => () => void;
|
|
148
|
+
userCardExpand?: () => void;
|
|
149
|
+
userCardCollapse?: () => void;
|
|
150
|
+
userCardToggle?: () => void;
|
|
148
151
|
};
|
|
149
152
|
export declare const usePyrionLayout: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
|
|
150
153
|
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;
|
|
@@ -6,6 +6,7 @@ export interface TabSwitchElement {
|
|
|
6
6
|
onClick?: (name: string) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
id?: string;
|
|
9
|
+
isLoading?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface TabsSwitchProps {
|
|
11
12
|
tabs: TabSwitchElement[];
|
|
@@ -13,6 +14,7 @@ export interface TabsSwitchProps {
|
|
|
13
14
|
currentTabName?: string;
|
|
14
15
|
currentSystemId?: string;
|
|
15
16
|
activeColor?: string;
|
|
17
|
+
isLoading?: boolean;
|
|
16
18
|
}
|
|
17
19
|
declare const TabsSwitch: import('react').ForwardRefExoticComponent<TabsSwitchProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
20
|
export default TabsSwitch;
|
|
@@ -8,6 +8,7 @@ export interface UserCardProps {
|
|
|
8
8
|
avatarSize?: SizeVariant;
|
|
9
9
|
className?: string;
|
|
10
10
|
avatarProps?: IAvatar;
|
|
11
|
+
isLoading?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot, avatarProps }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
+
declare const UserCard: import('react').MemoExoticComponent<({ name, imageUrl, avatarSize, subImageUrl, className, mainSlot, secondarySlot, avatarProps, isLoading }: UserCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
14
|
export default UserCard;
|