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.
- package/dist/Avatar.es.js +40 -41
- package/dist/CardProfile.es.js +291 -3
- package/dist/CheckBox.es.js +24 -21
- package/dist/DialogModal.es.js +52 -46
- package/dist/Icons/ArrowDownward.d.ts +6 -0
- package/dist/Icons/ArrowDownward.es.js +10 -0
- package/dist/Icons/ArrowUpward.d.ts +6 -0
- package/dist/Icons/ArrowUpward.es.js +10 -0
- package/dist/Icons/UserAvatar.es.js +4 -4
- package/dist/Icons/components/ArrowDownward.d.ts +4 -0
- package/dist/Icons/components/ArrowUpward.d.ts +4 -0
- package/dist/Icons/index.d.ts +2 -0
- package/dist/Icons/types.d.ts +4 -0
- package/dist/Icons.es.js +124 -120
- package/dist/Input.es.js +73 -72
- package/dist/NotificationCard.es.js +28 -21
- package/dist/PlainTooltip.es.js +19 -19
- package/dist/PyrionLayout.es.js +916 -810
- package/dist/Scrollable.es.js +322 -177
- package/dist/Select.es.js +47 -47
- package/dist/SelectSearch.es.js +107 -103
- package/dist/TabLinks-DxqprStp.js +147 -0
- package/dist/TabLinks.es.js +2 -121
- package/dist/TicketCard.es.js +2 -2
- package/dist/Toast.es.js +95 -51
- package/dist/UserCard.d.ts +6 -0
- package/dist/UserCard.es.js +28 -0
- package/dist/badge-BEx-0Q-K.js +35 -0
- package/dist/components/Avatar/Avatar.d.ts +2 -4
- package/dist/components/CardProfile/CardProfile.d.ts +7 -4
- package/dist/components/DropZone/useFileDropzone.d.ts +9 -1
- package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +5 -2
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +3 -1
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +4 -1
- package/dist/components/Scrollable/Scrollable.d.ts +29 -0
- package/dist/components/TabLinks/TabLinks.d.ts +19 -0
- package/dist/components/Toaster/Toaster.d.ts +13 -1
- package/dist/components/UserCard/UserCard.d.ts +3 -2
- package/dist/exports/UserCard.d.ts +2 -0
- package/dist/hooks/useLabelBackground.d.ts +1 -0
- package/dist/index.d.ts +0 -16
- package/dist/prometeo-design-system.es.js +119 -2906
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-D5SzHhl_.js +32 -0
- package/package.json +1 -2
- package/dist/CardProfile-C1F83KJV.js +0 -280
- package/dist/badge-CbqYNrl4.js +0 -87
- package/dist/components/Layout/LayoutGeneric.d.ts +0 -6
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +0 -32
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +0 -2
- package/dist/components/Sidebar/SecondaryBar/index.d.ts +0 -1
- package/dist/components/Sidebar/SidebarComposable.d.ts +0 -43
- package/dist/components/Sidebar/components/NavigationLink.d.ts +0 -11
- package/dist/components/Sidebar/components/company-logo.d.ts +0 -5
- package/dist/components/Sidebar/components/nav-actions.d.ts +0 -7
- package/dist/components/Sidebar/components/nav-links.d.ts +0 -7
- package/dist/components/Sidebar/context/SidebarContext.d.ts +0 -13
- package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +0 -3
- package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +0 -9
- package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +0 -4
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +0 -32
- package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +0 -13
- package/dist/components/Sidebar/index.d.ts +0 -12
- package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +0 -2
- package/dist/useLabelBackground-BDIHUdND.js +0 -26
|
@@ -1,50 +1,57 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { useCallback as h } from "react";
|
|
2
3
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import b from "./Avatar.es.js";
|
|
5
|
+
import j from "./Button.es.js";
|
|
6
|
+
const z = ({ user: m, body: s, date: a, actions: r, read: d, className: f, metadata: t, onClick: i }) => {
|
|
7
|
+
const c = typeof s == "function" ? s(t) : s, u = a instanceof Date ? `${a.toLocaleDateString("es-AR", { day: "2-digit", month: "2-digit", year: "numeric" })} a las ${a.toLocaleTimeString("es-AR", { hour: "2-digit", minute: "2-digit", hour12: !1 })}` : a, x = h(
|
|
8
|
+
() => {
|
|
9
|
+
i?.(t);
|
|
10
|
+
},
|
|
11
|
+
[i, t]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ e.jsxs("article", { className: o("flex flex-col gap-3 p-3 rounded-md bg-neutral-default-default ", f), onClick: x, children: [
|
|
14
|
+
/* @__PURE__ */ e.jsxs("div", { className: o("flex flex-col gap-2", i && "cursor-pointer"), children: [
|
|
9
15
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-start w-full", children: [
|
|
10
16
|
/* @__PURE__ */ e.jsxs("div", { className: " relative min-w-max", children: [
|
|
11
|
-
d && /* @__PURE__ */ e.jsx("div", { className: "size-3 border border-neutral-default bg-(--pyrion-orange-500) rounded-full absolute top-0 left-0 z-
|
|
17
|
+
!d && /* @__PURE__ */ e.jsx("div", { className: "size-3 border border-neutral-default bg-(--pyrion-orange-500) rounded-full absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2 z-10" }),
|
|
12
18
|
/* @__PURE__ */ e.jsx(
|
|
13
|
-
|
|
19
|
+
b,
|
|
14
20
|
{
|
|
15
|
-
imageUrl:
|
|
16
|
-
fallbackText:
|
|
21
|
+
imageUrl: m.profile_picture,
|
|
22
|
+
fallbackText: m.name,
|
|
17
23
|
sizeFallback: "xs",
|
|
18
24
|
sizeImage: "xs"
|
|
19
25
|
}
|
|
20
26
|
)
|
|
21
27
|
] }),
|
|
22
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-neutral-default-default prometeo-fonts-body-medium", children:
|
|
28
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-neutral-default-default prometeo-fonts-body-medium", children: c })
|
|
23
29
|
] }),
|
|
24
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-neutral-medium-default prometeo-fonts-body-xsmall text-right", children:
|
|
30
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-neutral-medium-default prometeo-fonts-body-xsmall text-right", children: u })
|
|
25
31
|
] }),
|
|
26
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 w-full", children:
|
|
32
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 w-full", children: r?.map((l, n) => {
|
|
27
33
|
if (l.hidden)
|
|
28
34
|
return null;
|
|
29
|
-
const
|
|
30
|
-
l.onClick(
|
|
35
|
+
const p = (g) => {
|
|
36
|
+
g.stopPropagation(), l.onClick?.(t);
|
|
31
37
|
};
|
|
32
38
|
return /* @__PURE__ */ e.jsx(
|
|
33
|
-
|
|
39
|
+
j,
|
|
34
40
|
{
|
|
35
|
-
className: o("flex-1 h-8", n === 0 &&
|
|
41
|
+
className: o("flex-1 h-8", n === 0 && r.length > 1 && "order-2"),
|
|
36
42
|
animate: !1,
|
|
37
43
|
animateIcon: !1,
|
|
38
44
|
label: l.label,
|
|
39
|
-
onClick:
|
|
40
|
-
variant: l.variant ||
|
|
45
|
+
onClick: p,
|
|
46
|
+
variant: l.variant || r.length > 1 ? n === 0 ? "fill" : "text" : "fill",
|
|
41
47
|
disabled: l.disabled,
|
|
42
48
|
size: "small"
|
|
43
|
-
}
|
|
49
|
+
},
|
|
50
|
+
l.label + n
|
|
44
51
|
);
|
|
45
52
|
}) })
|
|
46
53
|
] });
|
|
47
54
|
};
|
|
48
55
|
export {
|
|
49
|
-
|
|
56
|
+
z as default
|
|
50
57
|
};
|
package/dist/PlainTooltip.es.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { j as y } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as _ } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { memo as j, useRef as v, useCallback as A, useEffect as
|
|
3
|
+
import { memo as j, useRef as v, useCallback as A, useEffect as u } from "react";
|
|
4
4
|
import { createPortal as C } from "react-dom";
|
|
5
5
|
const G = ({ title: w, children: p, delayToShow: x = 500, delayToClose: R = 1e3, className: B, attachToParent: d = !1, disabled: D = !1 }) => {
|
|
6
|
-
const s = v(null),
|
|
6
|
+
const s = v(null), n = v(null), r = v(null), o = A(() => {
|
|
7
7
|
if (typeof window > "u")
|
|
8
8
|
return;
|
|
9
|
-
const e =
|
|
9
|
+
const e = n.current, i = s.current;
|
|
10
10
|
if (!e || !i)
|
|
11
11
|
return;
|
|
12
12
|
const l = window.getComputedStyle(e).display, c = e.style.display, m = e.style.visibility, f = e.style.translate, h = l === "none";
|
|
13
13
|
h && (e.style.visibility = "hidden", e.style.display = "block"), f && e.style.removeProperty("translate");
|
|
14
14
|
const E = i.getBoundingClientRect();
|
|
15
15
|
d ? (e.style.removeProperty("position"), e.style.removeProperty("left"), e.style.removeProperty("top")) : (e.style.setProperty("position", "fixed"), e.style.setProperty("left", `${E.right}px`), e.style.setProperty("top", `${E.bottom}px`));
|
|
16
|
-
const
|
|
16
|
+
const a = e.getBoundingClientRect(), I = window.innerWidth, N = window.innerHeight, b = Math.max(0, 0 - a.left), M = Math.max(0, a.right - I), L = Math.max(0, 0 - a.top), P = Math.max(0, a.bottom - N), O = b > 0 ? b + 16 : M > 0 ? -(M + 16) : 0, T = L > 0 ? L + 16 : P > 0 ? -(P + 16) : 0;
|
|
17
17
|
O === 0 && T === 0 ? e.style.removeProperty("translate") : e.style.setProperty("translate", `${O}px ${T}px`), h && (e.style.display = c, e.style.visibility = m);
|
|
18
18
|
}, [d]);
|
|
19
|
-
if (
|
|
20
|
-
const t = s.current, e =
|
|
19
|
+
if (u(() => {
|
|
20
|
+
const t = s.current, e = n.current;
|
|
21
21
|
if (!t || !e)
|
|
22
22
|
return;
|
|
23
23
|
const i = (m, f) => {
|
|
24
|
-
|
|
24
|
+
r.current = setTimeout(() => {
|
|
25
25
|
f();
|
|
26
26
|
}, m);
|
|
27
27
|
}, l = () => {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
r.current && clearTimeout(r.current), o(), i(x, () => {
|
|
29
|
+
n.current?.classList.add("visible");
|
|
30
30
|
});
|
|
31
31
|
}, c = () => {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
r.current && clearTimeout(r.current), i(R, () => {
|
|
33
|
+
n.current?.classList.remove("visible");
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
return t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", c), () => {
|
|
37
37
|
t.removeEventListener("mouseenter", l), t.removeEventListener("mouseleave", c);
|
|
38
38
|
};
|
|
39
|
-
}, [x, R, o]),
|
|
39
|
+
}, [x, R, o]), u(() => {
|
|
40
40
|
o();
|
|
41
|
-
}, [o, w]),
|
|
41
|
+
}, [o, w]), u(() => {
|
|
42
42
|
if (typeof window > "u")
|
|
43
43
|
return;
|
|
44
44
|
const t = () => {
|
|
45
|
-
|
|
45
|
+
n.current && n.current.classList.contains("visible") && o();
|
|
46
46
|
};
|
|
47
47
|
return window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
48
48
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
49
49
|
};
|
|
50
|
-
}, [o]),
|
|
51
|
-
|
|
50
|
+
}, [o]), u(() => () => {
|
|
51
|
+
r.current && clearTimeout(r.current);
|
|
52
52
|
}, []), D) return p;
|
|
53
|
-
const g = /* @__PURE__ */ y.jsx("span", { ref:
|
|
53
|
+
const g = /* @__PURE__ */ y.jsx("span", { ref: n, className: _(
|
|
54
54
|
"plain-tooltip ",
|
|
55
55
|
"absolute z-999",
|
|
56
56
|
"bg-neutral-weak-default px-2 py-1 rounded-lg w-max",
|
|
57
|
-
"text-neutral-strong-default prometeo-fonts-body-small ",
|
|
57
|
+
"text-neutral-strong-default prometeo-fonts-body-small text-balance ",
|
|
58
58
|
B,
|
|
59
|
-
|
|
59
|
+
n.current?.innerText?.length && n.current?.innerText?.length > Math.floor(450 / 10) ? "w-max line-clamp-1" : "max-w-[200px] line-clamp-none"
|
|
60
60
|
), children: w });
|
|
61
61
|
return !d && typeof document < "u" ? /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
|
|
62
62
|
p,
|