prometeo-design-system 1.4.4 → 1.4.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export default function AvatarProfile({ profileImage, sizeImage, fallbackText }: {
|
|
1
|
+
export default function AvatarProfile({ profileImage, sizeImage, sizeFallback, fallbackText }: {
|
|
2
2
|
profileImage?: string;
|
|
3
3
|
sizeImage?: string;
|
|
4
|
+
sizeFallback?: string;
|
|
4
5
|
fallbackText?: string;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,10 +28,12 @@ export { NavbarLinks } from './components/Sidebar/components/nav-links';
|
|
|
28
28
|
export { useDialogControl } from './components/Dialog/useDialogControl';
|
|
29
29
|
export { useDrawerDesktop } from './components/Drawer/useDrawerDesktop';
|
|
30
30
|
export { useDrawerMobile } from './components/Drawer/useDrawerMobile';
|
|
31
|
+
export { SidebarProvider as SidebarRefProvider, useSidebarContext, } from './components/Sidebar/context/SidebarContext';
|
|
31
32
|
export { SidebarProvider } from './components/Sidebar/hooks/SidebarProvider';
|
|
32
33
|
export { useSidebar } from './components/Sidebar/hooks/useSidebarHook';
|
|
33
34
|
export { useClickOutside } from './hooks/useClickOutside';
|
|
34
35
|
export type { ButtonProps } from './components/Button/Button';
|
|
36
|
+
export type { ISessionLocalStorage } from './components/CardProfile/CardProfile';
|
|
35
37
|
export type { ICheckboxFormik } from './components/CheckboxFormik/CheckboxFormik';
|
|
36
38
|
export type { IHeader } from './components/Header/Header';
|
|
37
39
|
export type { InputProps, InputSize, InputVariant, } from './components/Input/Input';
|
|
@@ -43,7 +45,6 @@ export type { NavbarCollapseButtonProps } from './components/Sidebar/components/
|
|
|
43
45
|
export type { CompanyLogoProps } from './components/Sidebar/components/company-logo';
|
|
44
46
|
export type { INavbarActionsProps } from './components/Sidebar/components/nav-actions';
|
|
45
47
|
export type { NavbarLinksProps } from './components/Sidebar/components/nav-links';
|
|
46
|
-
export type { ISessionLocalStorage } from './components/CardProfile/CardProfile';
|
|
47
48
|
export type { INavAction, INavLink, Role, RoleLevels, } from './components/Sidebar/hooks/useNavLinks';
|
|
48
49
|
export type { SidebarContextValue } from './components/Sidebar/hooks/useSidebarHook';
|
|
49
50
|
export type { SpinnerProps, SpinnerSize, SpinnerVariant, } from './components/Spinner/Spinner';
|
|
@@ -294,14 +294,15 @@ var p = ec();
|
|
|
294
294
|
function tc({
|
|
295
295
|
profileImage: n,
|
|
296
296
|
sizeImage: e = "w-36 h-36",
|
|
297
|
-
|
|
297
|
+
sizeFallback: t = "w-36 h-36",
|
|
298
|
+
fallbackText: r = "Matias tejerina"
|
|
298
299
|
}) {
|
|
299
|
-
const [
|
|
300
|
-
return /* @__PURE__ */ p.jsx(p.Fragment, { children:
|
|
300
|
+
const [i, a] = De(!1), o = n && n.trim() !== "" && !i, s = (l) => l.split(" ").map((c) => c.charAt(0)).join("").toUpperCase().slice(0, 2);
|
|
301
|
+
return /* @__PURE__ */ p.jsx(p.Fragment, { children: o ? /* @__PURE__ */ p.jsx(
|
|
301
302
|
"img",
|
|
302
303
|
{
|
|
303
304
|
onError: () => {
|
|
304
|
-
|
|
305
|
+
a(!0);
|
|
305
306
|
},
|
|
306
307
|
src: n,
|
|
307
308
|
className: `rounded-full object-cover ${e}`,
|
|
@@ -310,13 +311,13 @@ function tc({
|
|
|
310
311
|
) : /* @__PURE__ */ p.jsx(
|
|
311
312
|
oe.div,
|
|
312
313
|
{
|
|
313
|
-
className:
|
|
314
|
+
className: ` flex items-center justify-center rounded-full ${t}`,
|
|
314
315
|
style: { backgroundColor: "#8b5cf6" },
|
|
315
316
|
initial: { opacity: 0, scale: 1.1 },
|
|
316
317
|
animate: { opacity: 1, scale: 1 },
|
|
317
318
|
exit: { opacity: 0, scale: 0.9 },
|
|
318
319
|
transition: { duration: 0.3 },
|
|
319
|
-
children: /* @__PURE__ */ p.jsx("span", { className: " text-white font-semibold text-2xl", children:
|
|
320
|
+
children: /* @__PURE__ */ p.jsx("span", { className: " text-white font-semibold text-2xl", children: s(r) })
|
|
320
321
|
},
|
|
321
322
|
"initials"
|
|
322
323
|
) });
|
|
@@ -10803,6 +10804,7 @@ export {
|
|
|
10803
10804
|
nh as Select,
|
|
10804
10805
|
sh as Sidebar,
|
|
10805
10806
|
wm as SidebarProvider,
|
|
10807
|
+
Jp as SidebarRefProvider,
|
|
10806
10808
|
Cs as Spinner,
|
|
10807
10809
|
rh as TabLinks,
|
|
10808
10810
|
Wp as Table,
|
|
@@ -10820,5 +10822,6 @@ export {
|
|
|
10820
10822
|
gh as useDrawerDesktop,
|
|
10821
10823
|
xh as useDrawerMobile,
|
|
10822
10824
|
fh as useNavbarCollapse,
|
|
10823
|
-
bm as useSidebar
|
|
10825
|
+
bm as useSidebar,
|
|
10826
|
+
Rs as useSidebarContext
|
|
10824
10827
|
};
|