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,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 x from "./Avatar.es.js";
4
- import p from "./Button.es.js";
5
- const v = ({ user: i, body: t, date: a, actions: s, isNew: d, className: m, metadata: r }) => {
6
- const f = typeof t == "function" ? t(r) : t, c = 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;
7
- return /* @__PURE__ */ e.jsxs("article", { className: o("flex flex-col gap-3 p-3 rounded-md bg-neutral-default-default ", m), children: [
8
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
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-20" }),
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
- x,
19
+ b,
14
20
  {
15
- imageUrl: i.profile_picture,
16
- fallbackText: i.name,
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: f })
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: c })
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: s?.map((l, n) => {
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 u = () => {
30
- l.onClick(r);
35
+ const p = (g) => {
36
+ g.stopPropagation(), l.onClick?.(t);
31
37
  };
32
38
  return /* @__PURE__ */ e.jsx(
33
- p,
39
+ j,
34
40
  {
35
- className: o("flex-1 h-8", n === 0 && s.length > 1 && "order-2"),
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: u,
40
- variant: l.variant || s.length > 1 ? n === 0 ? "fill" : "text" : "fill",
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
- v as default
56
+ z as default
50
57
  };
@@ -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 a } from "react";
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), r = v(null), n = v(null), o = A(() => {
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 = r.current, i = s.current;
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 u = e.getBoundingClientRect(), I = window.innerWidth, N = window.innerHeight, b = Math.max(0, 0 - u.left), M = Math.max(0, u.right - I), L = Math.max(0, 0 - u.top), P = Math.max(0, u.bottom - N), O = b > 0 ? b + 16 : M > 0 ? -(M + 16) : 0, T = L > 0 ? L + 16 : P > 0 ? -(P + 16) : 0;
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 (a(() => {
20
- const t = s.current, e = r.current;
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
- n.current = setTimeout(() => {
24
+ r.current = setTimeout(() => {
25
25
  f();
26
26
  }, m);
27
27
  }, l = () => {
28
- n.current && clearTimeout(n.current), o(), i(x, () => {
29
- r.current?.classList.add("visible");
28
+ r.current && clearTimeout(r.current), o(), i(x, () => {
29
+ n.current?.classList.add("visible");
30
30
  });
31
31
  }, c = () => {
32
- n.current && clearTimeout(n.current), i(R, () => {
33
- r.current?.classList.remove("visible");
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]), a(() => {
39
+ }, [x, R, o]), u(() => {
40
40
  o();
41
- }, [o, w]), a(() => {
41
+ }, [o, w]), u(() => {
42
42
  if (typeof window > "u")
43
43
  return;
44
44
  const t = () => {
45
- r.current && r.current.classList.contains("visible") && o();
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]), a(() => () => {
51
- n.current && clearTimeout(n.current);
50
+ }, [o]), u(() => () => {
51
+ r.current && clearTimeout(r.current);
52
52
  }, []), D) return p;
53
- const g = /* @__PURE__ */ y.jsx("span", { ref: r, className: _(
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
- r.current?.innerText?.length && r.current?.innerText?.length > Math.floor(450 / 10) ? "w-max line-clamp-1" : "max-w-[200px] line-clamp-none"
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,