prometeo-design-system 4.7.2 → 4.7.4

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/Chip.es.js CHANGED
@@ -37,7 +37,7 @@ const m = {
37
37
  e || (s.stopPropagation(), s.preventDefault(), a && n?.(a));
38
38
  },
39
39
  className: r(
40
- "shrink-0 p-0.5 transition-all duration-200 hover:text-neutral-default-hover cursor-pointer z-50 text-neutral-default-default hover:scale-105",
40
+ "shrink-0 p-0.5 transition-all duration-200 hover:text-neutral-default-hover cursor-pointer z-10 text-neutral-default-default hover:scale-105",
41
41
  e && "cursor-default hover:scale-100"
42
42
  ),
43
43
  type: "button",
@@ -140,7 +140,7 @@ x.displayName = "DialogContent";
140
140
  const g = y(({ children: t, className: n, debugMode: o }) => /* @__PURE__ */ e.jsx("h1", { className: m("prometeo-fonts-headline-small text-neutral-strong-default w-max", o && 'bg-red-400/40 relative after:content-["TITLE"] after:absolute after:top-0 after:-translate-y-5 after:left-0 after:w-max after:h-full after:text-red-500 after:prometeo-fonts-label-large', n), children: t }));
141
141
  g.displayName = "DialogTitle";
142
142
  const p = y(({ children: t, className: n, title: o, debugMode: s }) => /* @__PURE__ */ e.jsxs("div", { className: m(
143
- "p-4",
143
+ "px-6 pt-8 pb-4",
144
144
  s && "border-2 border-dashed border-red-600 bg-red-200/40! relative after:content-['HEADER'] after:absolute after:top-1 after:left-1/2 after:w-max after:h-full after:text-red-500",
145
145
  n
146
146
  ), children: [
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { u as Ke, g as gt } from "./useDevice-vwn4GLwK.js";
3
3
  import { c as T } from "./cn-B6yFEsav.js";
4
4
  import { g as ye } from "./utils-X4-h3cum.js";
5
- import He, { forwardRef as he, useState as G, useRef as O, useEffect as ne, memo as R, useContext as Ye, createContext as Ee, useCallback as x, Children as vt, isValidElement as Se, useMemo as me, useImperativeHandle as _e, useLayoutEffect as wt, use as Nt } from "react";
5
+ import He, { forwardRef as he, useState as G, useRef as I, useEffect as ne, memo as R, useContext as Ye, createContext as Ee, useCallback as x, Children as vt, isValidElement as Se, useMemo as me, useImperativeHandle as _e, useLayoutEffect as wt, use as Nt } from "react";
6
6
  import { createPortal as Ve } from "react-dom";
7
7
  import { useLocation as yt, useNavigate as St } from "react-router";
8
8
  import { CloseNavBarDesktop as Ct } from "./Icons/CloseNavBarDesktop.es.js";
@@ -23,7 +23,7 @@ import { Close as Me } from "./Icons/Close.es.js";
23
23
  import { Help as Qe } from "./Icons/Help.es.js";
24
24
  import { Settings as Ot } from "./Icons/Settings.es.js";
25
25
  const It = he((t, r) => {
26
- const [s, o] = G(t?.currentTabName || t.tabs[0].name), c = O(null), { tabs: l = [], className: u, activeColor: i = "var(--neutral-900)", currentSystemId: m } = t;
26
+ const [s, a] = G(t?.currentTabName || t.tabs[0].name), c = I(null), { tabs: l = [], className: u, activeColor: i = "var(--neutral-900)", currentSystemId: m } = t;
27
27
  ne(() => {
28
28
  c.current?.style.setProperty("--tab-bg", i);
29
29
  }, [i]);
@@ -43,7 +43,7 @@ const It = he((t, r) => {
43
43
  children: l.map(
44
44
  (d) => {
45
45
  const w = d.name === p?.name, h = typeof d.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: d.thumbnail, alt: d.description, className: "aspect-square object-contain rounded", draggable: !1 }) : d.thumbnail, C = () => {
46
- d.disabled || (o(d.name), d.onClick && d.onClick(d.name));
46
+ d.disabled || (a(d.name), d.onClick && d.onClick(d.name));
47
47
  };
48
48
  return /* @__PURE__ */ e.jsx(
49
49
  "div",
@@ -72,7 +72,7 @@ const It = he((t, r) => {
72
72
  )
73
73
  }
74
74
  );
75
- }), Ze = R(he(({ children: t, className: r, context: s, modal: o = !1, closeOnOverlayClick: c = !1, unmountChildrenOnClose: l = !0 }, u) => {
75
+ }), Ze = R(he(({ children: t, className: r, context: s, modal: a = !1, closeOnOverlayClick: c = !1, unmountChildrenOnClose: l = !0 }, u) => {
76
76
  const i = xe(t, s), m = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: p } = Et(), { closeSidebar: d } = ce(), [w, h] = G(() => l ? p : !0), [C, A] = G(!1);
77
77
  return ne(() => {
78
78
  l && s?.subscribeToSidebarOpen((N) => {
@@ -85,8 +85,8 @@ const It = he((t, r) => {
85
85
  C && (h(!1), A(!1));
86
86
  };
87
87
  return N.addEventListener("transitionend", y), () => N.removeEventListener("transitionend", y);
88
- }, [C]), /* @__PURE__ */ e.jsxs("div", { ref: u, className: T("sidebar", m ? "collapsed" : "expanded", "h-full overflow-auto", r), "aria-modal": o || void 0, children: [
89
- o && m && /* @__PURE__ */ e.jsx(
88
+ }, [C]), /* @__PURE__ */ e.jsxs("div", { ref: u, className: T("sidebar", m ? "collapsed" : "expanded", "h-full overflow-auto", r), "aria-modal": a || void 0, children: [
89
+ a && m && /* @__PURE__ */ e.jsx(
90
90
  "div",
91
91
  {
92
92
  className: T("navigation-drawer-sidebar-overlay"),
@@ -124,7 +124,7 @@ const It = he((t, r) => {
124
124
  } catch {
125
125
  }
126
126
  }, Pt = (t) => {
127
- const { children: r, classNameDrawer: s, classNameSidebar: o, disableDragOpen: c, modal: l = !0, closeOnOutsideClick: u = !0 } = t, i = O(null), m = O(null), p = t.outletRef ?? O(null), d = O(null), w = O(We()), h = O(!1), C = O("drawer"), A = O(/* @__PURE__ */ new Set()), N = O(/* @__PURE__ */ new Set()), y = O(!1), D = O(null), W = x((n) => {
127
+ const { children: r, classNameDrawer: s, classNameSidebar: a, disableDragOpen: c, modal: l = !0, closeOnOutsideClick: u = !0 } = t, i = I(null), m = I(null), p = t.outletRef ?? I(null), d = I(null), w = I(We()), h = I(!1), C = I("drawer"), A = I(/* @__PURE__ */ new Set()), N = I(/* @__PURE__ */ new Set()), y = I(!1), D = I(null), W = x((n) => {
128
128
  const f = m.current;
129
129
  f && (f.classList.toggle("collapsed", n), f.classList.toggle("expanded", !n));
130
130
  }, []), q = x((n) => {
@@ -136,31 +136,31 @@ const It = he((t, r) => {
136
136
  }, []), j = x(
137
137
  (n, { notify: f = !0 } = {}) => {
138
138
  const g = w.current !== n;
139
- w.current = n, _t(n), W(n), f && g && A.current.forEach((I) => I(n));
139
+ w.current = n, _t(n), W(n), f && g && A.current.forEach((E) => E(n));
140
140
  },
141
141
  [W]
142
142
  ), U = x(
143
143
  (n, { notify: f = !0 } = {}) => {
144
144
  const g = h.current !== n;
145
145
  if (h.current = n, q(n), f && g) {
146
- const I = !n;
147
- N.current.forEach((H) => H(I));
146
+ const E = !n;
147
+ N.current.forEach((H) => H(E));
148
148
  }
149
149
  },
150
150
  [q]
151
151
  ), S = x(
152
152
  (n, { notify: f = !0 } = {}) => {
153
- const g = C.current, I = g !== n;
153
+ const g = C.current, E = g !== n;
154
154
  C.current = n, window.matchMedia("(min-width: 768px)").matches || j(n !== "drawer", { notify: f });
155
155
  const H = g === "sidebar", F = n === "sidebar";
156
- f && I && H !== F && N.current.forEach((re) => re(F)), U(n !== "sidebar", { notify: f }), j(n !== "drawer", { notify: f });
156
+ f && E && H !== F && N.current.forEach((re) => re(F)), U(n !== "sidebar", { notify: f }), j(n !== "drawer", { notify: f });
157
157
  },
158
158
  [j, U]
159
159
  ), $ = x((n) => {
160
160
  const f = i.current;
161
161
  if (!f || window.matchMedia("(min-width: 768px)").matches) return;
162
162
  y.current = !0;
163
- const g = p.current?.offsetLeft ?? 0, I = d.current?.offsetLeft ?? g, H = n === "drawer" ? 0 : n === "sidebar" ? I : g;
163
+ const g = p.current?.offsetLeft ?? 0, E = d.current?.offsetLeft ?? g, H = n === "drawer" ? 0 : n === "sidebar" ? E : g;
164
164
  D.current = H, f.scrollTo({ left: H, behavior: "smooth" });
165
165
  const F = () => {
166
166
  y.current = !1, D.current = null, f.removeEventListener("scrollend", F);
@@ -174,13 +174,13 @@ const It = he((t, r) => {
174
174
  const g = [
175
175
  { panel: "drawer", offset: 0 },
176
176
  { panel: "outlet", offset: f.offsetLeft }
177
- ], I = d.current;
178
- I && g.push({ panel: "sidebar", offset: I.offsetLeft });
177
+ ], E = d.current;
178
+ E && g.push({ panel: "sidebar", offset: E.offsetLeft });
179
179
  const H = n.scrollLeft;
180
180
  let F = g[0], re = Math.abs(H - F.offset);
181
- for (let oe = 1; oe < g.length; oe++) {
182
- const fe = Math.abs(H - g[oe].offset);
183
- fe < re && (F = g[oe], re = fe);
181
+ for (let ae = 1; ae < g.length; ae++) {
182
+ const fe = Math.abs(H - g[ae].offset);
183
+ fe < re && (F = g[ae], re = fe);
184
184
  }
185
185
  S(F.panel);
186
186
  }, [S]);
@@ -191,8 +191,8 @@ const It = he((t, r) => {
191
191
  const n = i.current, f = p.current;
192
192
  if (!n || !f) return;
193
193
  if (window.matchMedia("(min-width: 768px)").matches) {
194
- const I = We();
195
- j(I, { notify: !1 }), U(!0, { notify: !1 });
194
+ const E = We();
195
+ j(E, { notify: !1 }), U(!0, { notify: !1 });
196
196
  return;
197
197
  }
198
198
  requestAnimationFrame(() => {
@@ -201,13 +201,13 @@ const It = he((t, r) => {
201
201
  }, [S, j, U]), ne(() => {
202
202
  const n = i.current;
203
203
  if (!n || !p.current) return;
204
- let g = !1, I = 0, H = 0;
204
+ let g = !1, E = 0, H = 0;
205
205
  const F = (L) => {
206
- I = L.touches[0].clientX, H = L.touches[0].clientY;
206
+ E = L.touches[0].clientX, H = L.touches[0].clientY;
207
207
  }, re = (L, K) => {
208
208
  const V = window.getComputedStyle(L), le = K === "x" ? V.overflowX : V.overflowY;
209
209
  return /(auto|scroll|overlay)/.test(le) ? K === "x" ? L.scrollWidth > L.clientWidth : L.scrollHeight > L.clientHeight : !1;
210
- }, oe = (L, K) => {
210
+ }, ae = (L, K) => {
211
211
  let V = L;
212
212
  for (; V && V !== n; ) {
213
213
  if (re(V, K))
@@ -217,8 +217,8 @@ const It = he((t, r) => {
217
217
  return null;
218
218
  }, fe = (L, K, V) => V === 0 ? !1 : K === "x" ? V < 0 ? L.scrollLeft + L.clientWidth < L.scrollWidth : L.scrollLeft > 0 : V < 0 ? L.scrollTop + L.clientHeight < L.scrollHeight : L.scrollTop > 0, we = (L) => {
219
219
  if (!(L.target instanceof HTMLElement)) return;
220
- const K = L.touches[0].clientX - I, V = L.touches[0].clientY - H, le = Math.abs(K) > Math.abs(V) ? "x" : "y", a = le === "x" ? K : V, v = oe(L.target, le);
221
- if (v && fe(v, le, a))
220
+ const K = L.touches[0].clientX - E, V = L.touches[0].clientY - H, le = Math.abs(K) > Math.abs(V) ? "x" : "y", o = le === "x" ? K : V, v = ae(L.target, le);
221
+ if (v && fe(v, le, o))
222
222
  return;
223
223
  const P = n.classList.contains("disabled-dragopen"), k = n.classList.contains("disabled-dragopen-sidebar"), J = () => L.cancelable ? (L.preventDefault(), !0) : !1;
224
224
  if (le === "x") {
@@ -260,14 +260,14 @@ const It = he((t, r) => {
260
260
  }
261
261
  const g = f ? "outlet" : "drawer";
262
262
  S(g), $(g);
263
- }, [$, S, j]), X = O(null);
263
+ }, [$, S, j]), X = I(null);
264
264
  X.current || (X.current = {
265
265
  toggleCollapse: () => Y(),
266
266
  getIsCollapsed: () => {
267
267
  if (!window.matchMedia("(min-width: 768px)").matches) {
268
268
  const f = i.current, g = p.current;
269
269
  if (f && g) {
270
- const I = f.scrollLeft, H = g.offsetLeft, F = Math.abs(I - H) < Math.abs(I - 0);
270
+ const E = f.scrollLeft, H = g.offsetLeft, F = Math.abs(E - H) < Math.abs(E - 0);
271
271
  return F !== w.current && (w.current = F, W(F)), F;
272
272
  }
273
273
  }
@@ -310,10 +310,10 @@ const It = he((t, r) => {
310
310
  if (!f) return;
311
311
  const g = f.scrollLeft;
312
312
  if (n) {
313
- const I = f.style.scrollBehavior;
313
+ const E = f.style.scrollBehavior;
314
314
  f.style.scrollBehavior = "auto", f.classList.remove("disabled-dragopen"), requestAnimationFrame(() => {
315
315
  f.scrollLeft = g, requestAnimationFrame(() => {
316
- f.style.scrollBehavior = I;
316
+ f.style.scrollBehavior = E;
317
317
  });
318
318
  });
319
319
  } else
@@ -323,20 +323,20 @@ const It = he((t, r) => {
323
323
  const f = i.current;
324
324
  if (f)
325
325
  if (n) {
326
- const g = f.scrollLeft, I = f.style.scrollBehavior;
326
+ const g = f.scrollLeft, E = f.style.scrollBehavior;
327
327
  f.style.scrollBehavior = "auto", f.classList.remove("disabled-dragopen-sidebar"), requestAnimationFrame(() => {
328
328
  f.scrollLeft = g, requestAnimationFrame(() => {
329
- f.style.scrollBehavior = I;
329
+ f.style.scrollBehavior = E;
330
330
  });
331
331
  });
332
332
  } else
333
333
  f.classList.add("disabled-dragopen-sidebar");
334
334
  }
335
335
  });
336
- const E = X.current, _ = typeof r == "function" ? r(E) : r, b = vt.toArray(_);
336
+ const O = X.current, _ = typeof r == "function" ? r(O) : r, b = vt.toArray(_);
337
337
  let M = null, B = null, z = null;
338
338
  const Z = [];
339
- let ae = null, ee = null;
339
+ let oe = null, ee = null;
340
340
  b.forEach((n) => {
341
341
  if (!Se(n)) {
342
342
  Z.push(n);
@@ -354,8 +354,8 @@ const It = he((t, r) => {
354
354
  z = n;
355
355
  return;
356
356
  }
357
- if (n.type === Oe && !ae) {
358
- ae = n;
357
+ if (n.type === Oe && !oe) {
358
+ oe = n;
359
359
  return;
360
360
  }
361
361
  if (n.type === Ze && !ee) {
@@ -364,11 +364,11 @@ const It = he((t, r) => {
364
364
  }
365
365
  Z.push(n);
366
366
  });
367
- const ge = !!B, ve = B ?? (Z.length ? /* @__PURE__ */ e.jsx(je, { children: Z }) : null), Le = ge ? Z : [], de = ae ?? (!!ae ? /* @__PURE__ */ e.jsx(Oe, { children: _, context: E, modal: l, closeOnOutsideClick: u }) : null), De = z ?? (!!z ? /* @__PURE__ */ e.jsx(ke, { children: z }) : null), Ae = !!ee, te = ee, ue = me(() => ({
367
+ const ge = !!B, ve = B ?? (Z.length ? /* @__PURE__ */ e.jsx(je, { children: Z }) : null), Le = ge ? Z : [], de = oe ?? (!!oe ? /* @__PURE__ */ e.jsx(Oe, { children: _, context: O, modal: l, closeOnOutsideClick: u }) : null), De = z ?? (!!z ? /* @__PURE__ */ e.jsx(ke, { children: z }) : null), Ae = !!ee, te = ee, ue = me(() => ({
368
368
  isCollapsed: w.current,
369
369
  isSidebarOpen: !h.current
370
370
  }), [w.current, h.current]);
371
- return /* @__PURE__ */ e.jsx(et.Provider, { value: ue, children: /* @__PURE__ */ e.jsx(tt.Provider, { value: E, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: i, className: T(
371
+ return /* @__PURE__ */ e.jsx(et.Provider, { value: ue, children: /* @__PURE__ */ e.jsx(tt.Provider, { value: O, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: i, className: T(
372
372
  "w-full h-full max-h-dvh overflow-y-hidden",
373
373
  Ae ? "navigation-drawer-with-sidebar" : "navigation-drawer",
374
374
  c?.drawer ? "disabled-dragopen" : "",
@@ -401,7 +401,7 @@ const It = he((t, r) => {
401
401
  de && Se(de) ? He.cloneElement(de, { ref: p, modal: l, closeOnOutsideClick: u }) : de,
402
402
  te && Se(te) ? He.cloneElement(te, {
403
403
  ref: d,
404
- className: T("sidebar", te.props?.className, o)
404
+ className: T("sidebar", te.props?.className, a)
405
405
  }) : te
406
406
  ] }) }) });
407
407
  }, qe = R(Pt), st = R(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
@@ -415,28 +415,28 @@ const It = he((t, r) => {
415
415
  ), (t, r) => t.onToggleCollapse === r.onToggleCollapse);
416
416
  st.displayName = "NavigationDrawerCollapseButton";
417
417
  const Re = R(({ children: t, className: r, context: s }) => {
418
- const o = xe(t, s);
419
- return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
418
+ const a = xe(t, s);
419
+ return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: a });
420
420
  });
421
421
  Re.displayName = "NavigationDrawerHeader";
422
- const je = R(({ children: t, className: r, context: s, ...o }) => {
422
+ const je = R(({ children: t, className: r, context: s, ...a }) => {
423
423
  const c = xe(t, s);
424
- return /* @__PURE__ */ e.jsx("div", { ...o, className: T("w-full flex-1 drawer-content select-none", r), children: c });
424
+ return /* @__PURE__ */ e.jsx("div", { ...a, className: T("w-full flex-1 drawer-content select-none", r), children: c });
425
425
  });
426
426
  je.displayName = "NavigationDrawerContent";
427
427
  const ke = R(({ children: t, className: r, context: s }) => {
428
- const o = xe(t, s);
429
- return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
428
+ const a = xe(t, s);
429
+ return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: a });
430
430
  });
431
431
  ke.displayName = "NavigationDrawerFooter";
432
432
  const nt = R(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: T("w-full border-t border-neutral-strong-default ", t) }));
433
433
  nt.displayName = "NavigationDrawerSpacer";
434
- const Oe = R(he(({ children: t, className: r, context: s, modal: o, closeOnOutsideClick: c }, l) => {
434
+ const Oe = R(he(({ children: t, className: r, context: s, modal: a, closeOnOutsideClick: c }, l) => {
435
435
  const u = xe(t, s), i = ce(), m = () => {
436
436
  c && (i.toggleCollapse(), i.closeSidebar());
437
437
  };
438
438
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: l, className: T("flex-1 overflow-auto relative h-full max-h-dvh", r), children: [
439
- o && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick: m }),
439
+ a && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick: m }),
440
440
  u
441
441
  ] }) });
442
442
  }), (t, r) => t.children === r.children && t.className === r.className), se = Object.assign(qe, {
@@ -509,7 +509,7 @@ const Mt = "hover:bg-neutral-medium-hover", Rt = Pe("", {
509
509
  const {
510
510
  title: r,
511
511
  icon: s,
512
- count: o,
512
+ count: a,
513
513
  className: c,
514
514
  isSelected: l = !1,
515
515
  hasSublinks: u,
@@ -528,7 +528,7 @@ const Mt = "hover:bg-neutral-medium-hover", Rt = Pe("", {
528
528
  /* @__PURE__ */ e.jsx("label", { className: Bt({ disabled: h, isSelected: l }), children: r })
529
529
  ] }),
530
530
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
531
- o && o ? /* @__PURE__ */ e.jsx(Xe, { count: o, maxCount: 9, className: "badge", disabled: h }) : "",
531
+ a && a ? /* @__PURE__ */ e.jsx(Xe, { count: a, maxCount: 9, className: "badge", disabled: h }) : "",
532
532
  u && /* @__PURE__ */ e.jsx(
533
533
  "div",
534
534
  {
@@ -584,14 +584,14 @@ const Mt = "hover:bg-neutral-medium-hover", Rt = Pe("", {
584
584
  }, Be = R(Ft);
585
585
  Be.displayName = "NavigationDrawerItemBase";
586
586
  const zt = (t) => {
587
- const { title: r, icon: s, count: o, className: c, isActive: l, onClick: u, isView: i = !0, disabled: m, tooltipText: p } = t;
587
+ const { title: r, icon: s, count: a, className: c, isActive: l, onClick: u, isView: i = !0, disabled: m, tooltipText: p } = t;
588
588
  return i ? /* @__PURE__ */ e.jsx(
589
589
  Be,
590
590
  {
591
591
  as: "button",
592
592
  title: r,
593
593
  icon: s,
594
- count: o,
594
+ count: a,
595
595
  className: c,
596
596
  isSelected: l,
597
597
  onClick: u,
@@ -599,9 +599,9 @@ const zt = (t) => {
599
599
  tooltipText: p
600
600
  }
601
601
  ) : null;
602
- }, at = R(zt);
603
- at.displayName = "NavigationDrawerActionItem";
604
- const Ut = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) => /* @__PURE__ */ e.jsx(be, { className: T("flex flex-col gap-2 w-full ", o), scrollbarProps: { hide: !0 }, persistScroll: "navigation-actions", indicators: {
602
+ }, ot = R(zt);
603
+ ot.displayName = "NavigationDrawerActionItem";
604
+ const Ut = ({ actions: t, activeActionId: r, onActionClick: s, className: a }) => /* @__PURE__ */ e.jsx(be, { className: T("flex flex-col gap-2 w-full ", a), scrollbarProps: { hide: !0 }, persistScroll: "navigation-actions", indicators: {
605
605
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
606
606
  bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
607
607
  }, children: t?.map((c) => {
@@ -609,7 +609,7 @@ const Ut = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) =
609
609
  s?.(l, m), u?.();
610
610
  };
611
611
  return i ? /* @__PURE__ */ e.jsx(
612
- at,
612
+ ot,
613
613
  {
614
614
  ...p,
615
615
  id: l,
@@ -618,19 +618,19 @@ const Ut = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) =
618
618
  },
619
619
  l
620
620
  ) : null;
621
- }) }), ot = R(Ut);
622
- ot.displayName = "NavigationDrawerActions";
621
+ }) }), at = R(Ut);
622
+ at.displayName = "NavigationDrawerActions";
623
623
  const Ht = (t) => {
624
- const { className: r, title: s, path: o, onClick: c, isSelected: l, parentPath: u } = t, i = x(() => {
625
- c?.(o);
626
- }, [o]), m = x(() => {
627
- if (o.startsWith("./")) {
624
+ const { className: r, title: s, path: a, onClick: c, isSelected: l, parentPath: u } = t, i = x(() => {
625
+ c?.(a);
626
+ }, [a]), m = x(() => {
627
+ if (a.startsWith("./")) {
628
628
  if (!u) return;
629
- const p = u + o.slice(2);
629
+ const p = u + a.slice(2);
630
630
  window.open(p, "_blank");
631
631
  } else
632
- window.open(o, "_blank");
633
- }, [o]);
632
+ window.open(a, "_blank");
633
+ }, [a]);
634
634
  return /* @__PURE__ */ e.jsx(
635
635
  "a",
636
636
  {
@@ -654,14 +654,14 @@ const Ht = (t) => {
654
654
  }, lt = R(Ht);
655
655
  lt.displayName = "NavItemSecondary";
656
656
  const Vt = he((t, r) => {
657
- const [s, o] = G(!0), c = O(null), { path: l, title: u, icon: i, count: m, className: p, isSelected: d = !1, onClick: w, sublinks: h, toggleCollapse: C, getIsCollapsed: A, subscribeToCollapse: N, isView: y = !0, disabled: D, tooltipText: W } = t;
657
+ const [s, a] = G(!0), c = I(null), { path: l, title: u, icon: i, count: m, className: p, isSelected: d = !1, onClick: w, sublinks: h, toggleCollapse: C, getIsCollapsed: A, subscribeToCollapse: N, isView: y = !0, disabled: D, tooltipText: W } = t;
658
658
  ne(() => N ? N((_) => {
659
- _ && o(!0);
659
+ _ && a(!0);
660
660
  }) : void 0, [N]);
661
661
  const q = x(() => {
662
- o((E) => !E);
663
- }, []), j = x((E) => {
664
- o(E);
662
+ a((O) => !O);
663
+ }, []), j = x((O) => {
664
+ a(O);
665
665
  }, []), U = {
666
666
  toggle: q,
667
667
  setIsCollapsed: j,
@@ -676,8 +676,8 @@ const Vt = he((t, r) => {
676
676
  };
677
677
  _e(r, () => U, [U, s, A, C]);
678
678
  const S = i, $ = x(() => {
679
- const E = A?.() ?? !1;
680
- if (h && h.length > 0 && E) {
679
+ const O = A?.() ?? !1;
680
+ if (h && h.length > 0 && O) {
681
681
  j(!1), C?.();
682
682
  return;
683
683
  }
@@ -688,7 +688,7 @@ const Vt = he((t, r) => {
688
688
  if (!h || D) return null;
689
689
  if (t.subLinksRender && h)
690
690
  return t.subLinksRender(h, U);
691
- const E = x((_) => {
691
+ const O = x((_) => {
692
692
  if (_.startsWith("./")) {
693
693
  const b = l + _.slice(2);
694
694
  w?.(b);
@@ -700,9 +700,9 @@ const Vt = he((t, r) => {
700
700
  if (!_) return;
701
701
  const b = _.scrollHeight;
702
702
  _.style.setProperty("--sublinks-max-height", `${b}px`);
703
- }, []), /* @__PURE__ */ e.jsx("div", { ref: c, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: h.map((_) => /* @__PURE__ */ e.jsx(lt, { ..._, onClick: E, parentPath: l }, `${_.title}-${_.path}`)) });
704
- }, X = (E) => {
705
- E.stopPropagation(), E.preventDefault(), q();
703
+ }, []), /* @__PURE__ */ e.jsx("div", { ref: c, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: h.map((_) => /* @__PURE__ */ e.jsx(lt, { ..._, onClick: O, parentPath: l }, `${_.title}-${_.path}`)) });
704
+ }, X = (O) => {
705
+ O.stopPropagation(), O.preventDefault(), q();
706
706
  };
707
707
  return y ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 ", children: [
708
708
  /* @__PURE__ */ e.jsx(
@@ -727,7 +727,7 @@ const Vt = he((t, r) => {
727
727
  ] }) : null;
728
728
  }), it = R(Vt);
729
729
  it.displayName = "NavigationDrawerLinkItem";
730
- const Wt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o, toggleCollapse: c, subscribeToCollapse: l }) => {
730
+ const Wt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: a, toggleCollapse: c, subscribeToCollapse: l }) => {
731
731
  const { pathname: u } = yt();
732
732
  return /* @__PURE__ */ e.jsx(be, { className: T("flex flex-col gap-2 w-full ", s), scrollbarProps: { hide: !0 }, persistScroll: "navigation-links", indicators: {
733
733
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
@@ -741,7 +741,7 @@ const Wt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o,
741
741
  isSelected: p,
742
742
  onClick: r,
743
743
  toggleCollapse: c,
744
- getIsCollapsed: o,
744
+ getIsCollapsed: a,
745
745
  subscribeToCollapse: l,
746
746
  disabled: i.disabled,
747
747
  isView: i.isView
@@ -751,7 +751,7 @@ const Wt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o,
751
751
  }) });
752
752
  }, ct = R(Wt);
753
753
  ct.displayName = "NavigationDrawerNavlinks";
754
- const dt = R(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: o, onActionClick: c }) => {
754
+ const dt = R(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: a, onActionClick: c }) => {
755
755
  const { getIsCollapsed: l, toggleCollapse: u, subscribeToCollapse: i } = ce();
756
756
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
757
757
  /* @__PURE__ */ e.jsx(se.Spacer, { className: "pb-3" }),
@@ -768,10 +768,10 @@ const dt = R(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
768
768
  }
769
769
  ),
770
770
  /* @__PURE__ */ e.jsx(
771
- ot,
771
+ at,
772
772
  {
773
773
  actions: s,
774
- activeActionId: o,
774
+ activeActionId: a,
775
775
  onActionClick: c,
776
776
  className: "max-h-[30dvh]"
777
777
  }
@@ -781,7 +781,7 @@ const dt = R(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
781
781
  }, (t, r) => t.navlinks === r.navlinks && t.handleNavigation === r.handleNavigation && t.allActions === r.allActions && t.activeActionId === r.activeActionId && t.onActionClick === r.onActionClick);
782
782
  dt.displayName = "PyrionNavigationDrawer.Content";
783
783
  const qt = (t) => {
784
- const { sessions: r, onSessionClick: s, secondarySlot: o, subImageUrlAccessor: c } = t;
784
+ const { sessions: r, onSessionClick: s, secondarySlot: a, subImageUrlAccessor: c } = t;
785
785
  if (!r || r.length === 0)
786
786
  return null;
787
787
  const l = (m) => {
@@ -795,7 +795,7 @@ const qt = (t) => {
795
795
  const d = ye({ metadata: p }, c);
796
796
  if (d != null)
797
797
  return typeof d == "string" ? d : String(d);
798
- }, i = x((m) => typeof o == "function" ? o(m) : o, [o]);
798
+ }, i = x((m) => typeof a == "function" ? a(m) : a, [a]);
799
799
  return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-2", children: r?.map((m) => {
800
800
  const { auth_id: p } = m;
801
801
  return /* @__PURE__ */ e.jsx(ie, { className: " shrink-0 h-max", children: /* @__PURE__ */ e.jsx(ie.Content, { onClick: () => l(m), className: "p-0 group-data-[expanded=true]/ticketcard:border-none", children: /* @__PURE__ */ e.jsx(
@@ -815,7 +815,7 @@ const qt = (t) => {
815
815
  state: t,
816
816
  currentAppSessions: r,
817
817
  resolveUserSecondarySlot: s,
818
- resolveSessionSecondarySlot: o,
818
+ resolveSessionSecondarySlot: a,
819
819
  onSessionClick: c,
820
820
  onLogoutClick: l,
821
821
  onProfileClick: u,
@@ -852,7 +852,7 @@ const qt = (t) => {
852
852
  {
853
853
  sessions: r,
854
854
  onSessionClick: c,
855
- secondarySlot: o,
855
+ secondarySlot: a,
856
856
  subImageUrlAccessor: i?.sessionCardOptions?.subImageUrlAccessor,
857
857
  currentSystemId: m
858
858
  }
@@ -879,8 +879,8 @@ const qt = (t) => {
879
879
  ] })
880
880
  ] });
881
881
  }, ut = R($t, (t, r) => {
882
- const s = Object.keys(t), o = Object.keys(r);
883
- if (s.length !== o.length)
882
+ const s = Object.keys(t), a = Object.keys(r);
883
+ if (s.length !== a.length)
884
884
  return !1;
885
885
  for (const c of s) {
886
886
  if (!Object.prototype.hasOwnProperty.call(r, c))
@@ -897,23 +897,23 @@ const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie,
897
897
  /* @__PURE__ */ e.jsxs(ie.Options, { children: [
898
898
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col p-2 pl-4 gap-2", children: [
899
899
  /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-label-medium text-neutral-medium-default", children: "Cambiar módulo" }),
900
- /* @__PURE__ */ e.jsx(be, { className: "max-h-52", scrollbarProps: { hide: !0 }, children: t?.map((o) => {
901
- const c = typeof o.thumbnail == "string" ? /* @__PURE__ */ e.jsx(
900
+ /* @__PURE__ */ e.jsx(be, { className: "max-h-52", scrollbarProps: { hide: !0 }, children: t?.map((a) => {
901
+ const c = typeof a.thumbnail == "string" ? /* @__PURE__ */ e.jsx(
902
902
  "img",
903
903
  {
904
- src: o.thumbnail,
905
- alt: o.description,
904
+ src: a.thumbnail,
905
+ alt: a.description,
906
906
  className: "size-8 aspect-square rounded",
907
907
  draggable: !1
908
908
  }
909
- ) : o.thumbnail, l = () => {
910
- o.disabled || o.onClick && o.onClick(o.name);
909
+ ) : a.thumbnail, l = () => {
910
+ a.disabled || a.onClick && a.onClick(a.name);
911
911
  };
912
912
  return /* @__PURE__ */ e.jsxs("div", { onClick: l, className: "flex gap-2 p-2 rounded-lg h-12", children: [
913
913
  c,
914
914
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center h-full justify-center ", children: [
915
- /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1", children: o.name }),
916
- o.description && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-medium-default line-clamp-1", children: o.description })
915
+ /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1", children: a.name }),
916
+ a.description && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-medium-default line-clamp-1", children: a.description })
917
917
  ] })
918
918
  ] });
919
919
  }) })
@@ -921,7 +921,7 @@ const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie,
921
921
  /* @__PURE__ */ e.jsx("div", {})
922
922
  ] })
923
923
  ] }), Ie = R(({ enabled_systems: t, onClick: r, currentSystemId: s }) => {
924
- const o = x(() => {
924
+ const a = x(() => {
925
925
  if (t) {
926
926
  if (s) {
927
927
  const i = t.find((m) => m._id === s);
@@ -936,7 +936,7 @@ const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie,
936
936
  /* @__PURE__ */ e.jsx(
937
937
  "img",
938
938
  {
939
- src: o().coverImage,
939
+ src: a().coverImage,
940
940
  alt: "System Logo",
941
941
  className: T("w-full h-12 rounded object-contain system-cover-image ", c && "cursor-pointer"),
942
942
  draggable: !1,
@@ -946,7 +946,7 @@ const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie,
946
946
  /* @__PURE__ */ e.jsx(
947
947
  "img",
948
948
  {
949
- src: o().thumbnail,
949
+ src: a().thumbnail,
950
950
  alt: "System Logo",
951
951
  className: T("w-12 h-12 rounded object-cover system-thumbnail ", c && "cursor-pointer"),
952
952
  draggable: !1,
@@ -956,7 +956,7 @@ const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie,
956
956
  ] });
957
957
  }, (t, r) => t.enabled_systems === r.enabled_systems && t.onClick === r.onClick && t.currentSystemId === r.currentSystemId);
958
958
  Ie.displayName = "PyrionNavigationDrawer.SystemLogo";
959
- const ft = R(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mobileAppSwitcherControls: c }) => {
959
+ const ft = R(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: a, mobileAppSwitcherControls: c }) => {
960
960
  const { getIsCollapsed: l } = ce(), u = Ke(), i = x(() => {
961
961
  if (t) {
962
962
  const m = l();
@@ -967,7 +967,7 @@ const ft = R(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mob
967
967
  Kt,
968
968
  {
969
969
  controls: c,
970
- tabs: o,
970
+ tabs: a,
971
971
  content: /* @__PURE__ */ e.jsx(
972
972
  Ie,
973
973
  {
@@ -996,8 +996,8 @@ const $e = ({ type: t }) => {
996
996
  /* @__PURE__ */ e.jsx(Ce, { shape: "rounded", className: "w-full h-12 min-h-12" })
997
997
  ] }),
998
998
  /* @__PURE__ */ e.jsx(Ce, { shape: "rounded", className: "w-20 h-3" })
999
- ] }), Xt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s, scrollableControls: o }) => {
1000
- const [c, l] = G([]), [u, i] = G("NO_LEIDAS"), [m, p] = G({ isLoading: !1, type: "load_more" }), [d, w] = G({ hasError: !1 }), h = O(/* @__PURE__ */ new Set()), C = O(null), A = O(null), N = x((b, M = "top") => {
999
+ ] }), Xt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s, scrollableControls: a }) => {
1000
+ const [c, l] = G([]), [u, i] = G("NO_LEIDAS"), [m, p] = G({ isLoading: !1, type: "load_more" }), [d, w] = G({ hasError: !1 }), h = I(/* @__PURE__ */ new Set()), C = I(null), A = I(null), N = x((b, M = "top") => {
1001
1001
  l((B) => {
1002
1002
  const z = Array.isArray(b) ? M === "bottom" ? [...B, ...b] : [...b, ...B] : M === "bottom" ? [...B, b] : [b, ...B];
1003
1003
  return queueMicrotask(() => {
@@ -1044,8 +1044,8 @@ const $e = ({ type: t }) => {
1044
1044
  A.current.style.setProperty("height", `calc(100vh - ${b}px - 20px)`);
1045
1045
  }
1046
1046
  }, [C?.current]);
1047
- const Q = c.filter((b) => !b.read).length, { isLoading: Y, type: X } = m, { hasError: E, children: _ } = d;
1048
- return /* @__PURE__ */ e.jsx(
1047
+ const Q = c.filter((b) => !b.read).length, { isLoading: Y, type: X } = m, { hasError: O, children: _ } = d;
1048
+ return console.log("hasError", O), console.log("listenersRef", Array.from(h.current)), /* @__PURE__ */ e.jsx(
1049
1049
  "section",
1050
1050
  {
1051
1051
  className: "w-full md:w-[479px] bg-neutral-default-default flex flex-col border-l-0 md:border-l border-neutral-strong-default min-h-full h-full max-h-full overflow-hidden",
@@ -1068,7 +1068,7 @@ const $e = ({ type: t }) => {
1068
1068
  { id: "ALL", title: "Todas" },
1069
1069
  { id: "NO_LEIDAS", title: "Sin leer" }
1070
1070
  ],
1071
- renderTab: (b, M, B, z, Z, ae, ee, ge) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1071
+ renderTab: (b, M, B, z, Z, oe, ee, ge) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1072
1072
  /* @__PURE__ */ e.jsx(
1073
1073
  Tt,
1074
1074
  {
@@ -1079,7 +1079,7 @@ const $e = ({ type: t }) => {
1079
1079
  onIconClick: z,
1080
1080
  onIconHover: Z,
1081
1081
  iconTooltipProps: ee,
1082
- iconTooltipTitle: ae,
1082
+ iconTooltipTitle: oe,
1083
1083
  iconSize: ge
1084
1084
  }
1085
1085
  ),
@@ -1087,9 +1087,9 @@ const $e = ({ type: t }) => {
1087
1087
  ] })
1088
1088
  }
1089
1089
  ),
1090
- r && $ && u === "NO_LEIDAS" && !E && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(pe, { disabled: Y, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
1090
+ r && $ && u === "NO_LEIDAS" && !O && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(pe, { disabled: Y, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
1091
1091
  ] }),
1092
- E ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full grid place-items-center", children: typeof _ == "function" ? _() : _ }) : /* @__PURE__ */ e.jsx("div", { ref: A, className: "", children: /* @__PURE__ */ e.jsxs(
1092
+ /* @__PURE__ */ e.jsx("div", { ref: A, className: "", children: /* @__PURE__ */ e.jsxs(
1093
1093
  be,
1094
1094
  {
1095
1095
  className: "px-4 md:px-2 py-0 md:py-0 flex flex-col gap-3 h-full",
@@ -1097,7 +1097,7 @@ const $e = ({ type: t }) => {
1097
1097
  scrollbarProps: { hide: !0, size: "small" },
1098
1098
  axis: "y",
1099
1099
  disableMouseScroll: !1,
1100
- controls: o,
1100
+ controls: a,
1101
1101
  scrollTopButton: {
1102
1102
  target: "2000px"
1103
1103
  },
@@ -1106,8 +1106,11 @@ const $e = ({ type: t }) => {
1106
1106
  isLoading: Y
1107
1107
  },
1108
1108
  children: [
1109
- Y && X === "skeletons" ? /* @__PURE__ */ e.jsx($e, { type: X }) : $ ? c?.filter((b) => u === "NO_LEIDAS" ? !b.read : b)?.map((b, M) => /* @__PURE__ */ e.jsx(Dt, { ...b, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, M)) : /* @__PURE__ */ e.jsx("p", { className: "flex-1 grid place-items-center prometeo-fonts-headline-xsmall text-neutral-default-default text-center py-8 text-balance", children: "No tienes notificaciones nuevas por el momento" }),
1110
- Y && X === "load_more" && /* @__PURE__ */ e.jsx($e, { type: X })
1109
+ O && /* @__PURE__ */ e.jsx("div", { className: "w-full h-full grid place-items-center", children: typeof _ == "function" ? _() : _ }),
1110
+ !O && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1111
+ Y && X === "skeletons" ? /* @__PURE__ */ e.jsx($e, { type: X }) : $ ? c?.filter((b) => u === "NO_LEIDAS" ? !b.read : b)?.map((b, M) => /* @__PURE__ */ e.jsx(Dt, { ...b, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, M)) : /* @__PURE__ */ e.jsx("p", { className: "flex-1 grid place-items-center prometeo-fonts-headline-xsmall text-neutral-default-default text-center py-8 text-balance", children: "No tienes notificaciones nuevas por el momento" }),
1112
+ Y && X === "load_more" && /* @__PURE__ */ e.jsx($e, { type: X })
1113
+ ] })
1111
1114
  ]
1112
1115
  }
1113
1116
  ) })
@@ -1129,8 +1132,8 @@ const $e = ({ type: t }) => {
1129
1132
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-8 pt-4 px-4 ", children: r })
1130
1133
  ]
1131
1134
  }
1132
- ), Gt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: o, notificationsListControls: c, scrollableControls: l }, u) => {
1133
- const [i, m] = G(o ?? "notifications");
1135
+ ), Gt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: a, notificationsListControls: c, scrollableControls: l }, u) => {
1136
+ const [i, m] = G(a ?? "notifications");
1134
1137
  _e(u, () => ({
1135
1138
  setActiveSection: m
1136
1139
  }));
@@ -1155,7 +1158,7 @@ const Qt = ({
1155
1158
  options: t,
1156
1159
  helpSection: r,
1157
1160
  sidebarContentRef: s,
1158
- initialSectionRef: o,
1161
+ initialSectionRef: a,
1159
1162
  notificationsListControls: c,
1160
1163
  scrollableControls: l
1161
1164
  }) => {
@@ -1167,7 +1170,7 @@ const Qt = ({
1167
1170
  closeSidebar: u,
1168
1171
  options: t,
1169
1172
  helpSection: r,
1170
- initialSection: o.current,
1173
+ initialSection: a.current,
1171
1174
  notificationsListControls: c,
1172
1175
  scrollableControls: l
1173
1176
  }
@@ -1178,7 +1181,7 @@ const Zt = ({ navigationControlsRef: t }) => {
1178
1181
  const r = ce();
1179
1182
  return t.current.toggleCollapse = r.toggleCollapse, t.current.getIsCollapsed = r.getIsCollapsed, t.current.subscribeToCollapse = r.subscribeToCollapse, t.current.openSidebar = r.openSidebar, t.current.closeSidebar = r.closeSidebar, t.current.toggleSidebar = r.toggleSidebar, t.current.getIsSidebarOpen = r.getIsSidebarOpen, t.current.subscribeToSidebarOpen = r.subscribeToSidebarOpen, t.current.setDrawerDragEnabled = r.setDrawerDragEnabled, t.current.setSidebarDragEnabled = r.setSidebarDragEnabled, null;
1180
1183
  }, er = (t) => {
1181
- const { children: r, currentAppSessions: s, resolveUserSecondarySlot: o, resolveSessionSecondarySlot: c, handleNavigation: l, allActions: u, tabs: i, navigationControlsRef: m, sidebarContentRef: p, initialSectionRef: d, userOptionsControls: w, mobileAppSwitcherControls: h, notificationsListControls: C, scrollableControls: A, outletRef: N, ...y } = t;
1184
+ const { children: r, currentAppSessions: s, resolveUserSecondarySlot: a, resolveSessionSecondarySlot: c, handleNavigation: l, allActions: u, tabs: i, navigationControlsRef: m, sidebarContentRef: p, initialSectionRef: d, userOptionsControls: w, mobileAppSwitcherControls: h, notificationsListControls: C, scrollableControls: A, outletRef: N, ...y } = t;
1182
1185
  return /* @__PURE__ */ e.jsxs(se, { disableDragOpen: y.options?.disableDragOpen, outletRef: N, children: [
1183
1186
  /* @__PURE__ */ e.jsx(Zt, { navigationControlsRef: m }),
1184
1187
  /* @__PURE__ */ e.jsx(se.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
@@ -1206,7 +1209,7 @@ const Zt = ({ navigationControlsRef: t }) => {
1206
1209
  {
1207
1210
  state: y.state,
1208
1211
  currentAppSessions: s,
1209
- resolveUserSecondarySlot: o,
1212
+ resolveUserSecondarySlot: a,
1210
1213
  resolveSessionSecondarySlot: c,
1211
1214
  onSessionClick: y.onSessionClick,
1212
1215
  onLogoutClick: y.onLogoutClick,
@@ -1239,13 +1242,13 @@ const Zt = ({ navigationControlsRef: t }) => {
1239
1242
  )
1240
1243
  ] });
1241
1244
  }, ht = R(er, (t, r) => {
1242
- const { children: s, ...o } = t, { children: c, ...l } = r, u = Object.keys(o), i = Object.keys(l);
1245
+ const { children: s, ...a } = t, { children: c, ...l } = r, u = Object.keys(a), i = Object.keys(l);
1243
1246
  if (u.length !== i.length)
1244
1247
  return !1;
1245
1248
  for (const m of u) {
1246
1249
  if (!Object.prototype.hasOwnProperty.call(l, m))
1247
1250
  return !1;
1248
- const p = o[m], d = l[m];
1251
+ const p = a[m], d = l[m];
1249
1252
  if (p !== d)
1250
1253
  return !1;
1251
1254
  }
@@ -1259,62 +1262,62 @@ const xt = Ee(null), jr = () => {
1259
1262
  if (!t)
1260
1263
  throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
1261
1264
  return t;
1262
- }, kr = ({ children: t, helpSection: r, state: s, links: o, onLinkClick: c, onNavigate: l, onLogoutClick: u, actions: i, activeActionId: m, onActionClick: p, tabsProps: d, currentSystemId: w, onSessionClick: h, onSystemLogoClick: C, onProfileClick: A, ...N }) => {
1265
+ }, kr = ({ children: t, helpSection: r, state: s, links: a, onLinkClick: c, onNavigate: l, onLogoutClick: u, actions: i, activeActionId: m, onActionClick: p, tabsProps: d, currentSystemId: w, onSessionClick: h, onSystemLogoClick: C, onProfileClick: A, ...N }) => {
1263
1266
  const D = Object.assign({
1264
1267
  closeDrawerOnNavigate: !0,
1265
1268
  disableDragOpen: {
1266
1269
  sidebar: !0,
1267
1270
  drawer: !1
1268
1271
  }
1269
- }, N.options), W = St(), q = Ke(), j = O(null), U = O(null), S = O({}), $ = O(null), Q = O("notifications"), Y = O(null), X = O(null), E = O(null), [_, b] = G(0), [M, B] = G(!1), [z, Z] = G(null), ae = x((a) => {
1272
+ }, N.options), W = St(), q = Ke(), j = I(null), U = I(null), S = I({}), $ = I(null), Q = I("notifications"), Y = I(null), X = I(null), O = I(null), [_, b] = G(0), [M, B] = G(!1), [z, Z] = G(null), oe = x((o) => {
1270
1273
  if (B(!1), c) {
1271
- c(a);
1274
+ c(o);
1272
1275
  return;
1273
1276
  }
1274
1277
  const v = window.location.pathname;
1275
- W(a), D.closeDrawerOnNavigate && gt() && !S.current?.getIsCollapsed?.() && S.current?.toggleCollapse?.(), l && l(v, a);
1276
- }, [c, l, W]), ee = (a) => {
1277
- a && window.open(a, "_blank");
1278
+ W(o), D.closeDrawerOnNavigate && gt() && !S.current?.getIsCollapsed?.() && S.current?.toggleCollapse?.(), l && l(v, o);
1279
+ }, [c, l, W]), ee = (o) => {
1280
+ o && window.open(o, "_blank");
1278
1281
  }, ve = {
1279
1282
  system: {
1280
1283
  mobile: ee,
1281
- desktop: (a) => {
1282
- typeof window < "u" && a && (window.location.href = a);
1284
+ desktop: (o) => {
1285
+ typeof window < "u" && o && (window.location.href = o);
1283
1286
  }
1284
1287
  },
1285
1288
  product: {
1286
1289
  mobile: ee,
1287
1290
  desktop: ee
1288
1291
  }
1289
- }, Le = x((a) => {
1290
- const v = q ? "mobile" : "desktop", P = s.enabled_systems.find((k) => k.name === a)?.url;
1291
- ve.system[v](P), d?.onTabClick?.(a);
1292
- }, [q, s.enabled_systems, d?.onTabClick]), Fe = x((a) => {
1293
- const v = q ? "mobile" : "desktop", P = s.company.products?.find((k) => k.name === a)?.domain;
1294
- ve.product[v](P), d?.onTabClick?.(a);
1295
- }, [q, s.company.products, d?.onTabClick]), de = x((a, v) => {
1292
+ }, Le = x((o) => {
1293
+ const v = q ? "mobile" : "desktop", P = s.enabled_systems.find((k) => k.name === o)?.url;
1294
+ ve.system[v](P), d?.onTabClick?.(o);
1295
+ }, [q, s.enabled_systems, d?.onTabClick]), Fe = x((o) => {
1296
+ const v = q ? "mobile" : "desktop", P = s.company.products?.find((k) => k.name === o)?.domain;
1297
+ ve.product[v](P), d?.onTabClick?.(o);
1298
+ }, [q, s.company.products, d?.onTabClick]), de = x((o, v) => {
1296
1299
  if (v) {
1297
- v(a), d?.onTabClick?.(a);
1300
+ v(o), d?.onTabClick?.(o);
1298
1301
  return;
1299
1302
  } else
1300
- d?.onTabClick?.(a);
1303
+ d?.onTabClick?.(o);
1301
1304
  }, [d?.onTabClick]), ze = x(() => {
1302
- const a = {};
1305
+ const o = {};
1303
1306
  s.enabled_systems.forEach((P) => {
1304
- a[P.url] = P.name;
1307
+ o[P.url] = P.name;
1305
1308
  });
1306
1309
  const v = window.location.origin;
1307
- for (const [P, k] of Object.entries(a))
1310
+ for (const [P, k] of Object.entries(o))
1308
1311
  if (v === P)
1309
1312
  return k;
1310
1313
  return "";
1311
1314
  }, [s.enabled_systems]), De = d?.currentTabName || ze(), Ae = me(
1312
1315
  () => s.sessions || [],
1313
1316
  [s.sessions]
1314
- ), te = (a) => a == null ? null : typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? String(a) : Se(a) ? a : typeof a == "object" ? JSON.stringify(a) : null, ue = x((a, v) => {
1315
- if (!a) return null;
1316
- if (Array.isArray(a)) {
1317
- const P = a?.[0] ? ye(v, a[0]) : null, k = a?.[1] ? ye(v, a[1]) : null, J = te(P), Ue = te(k);
1317
+ ), te = (o) => o == null ? null : typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? String(o) : Se(o) ? o : typeof o == "object" ? JSON.stringify(o) : null, ue = x((o, v) => {
1318
+ if (!o) return null;
1319
+ if (Array.isArray(o)) {
1320
+ const P = o?.[0] ? ye(v, o[0]) : null, k = o?.[1] ? ye(v, o[1]) : null, J = te(P), Ue = te(k);
1318
1321
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1319
1322
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 min-w-[40%] text-nowrap wrap-break-word overflow-hidden text-ellipsis", children: J }),
1320
1323
  Ue && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 flex-1 grow shrink-0 min-w-max max-w-2/3 overflow-visible ", children: [
@@ -1323,55 +1326,55 @@ const xt = Ee(null), jr = () => {
1323
1326
  ] })
1324
1327
  ] });
1325
1328
  }
1326
- if (typeof a == "string") {
1327
- const P = ye(v, a);
1329
+ if (typeof o == "string") {
1330
+ const P = ye(v, o);
1328
1331
  return te(P);
1329
1332
  }
1330
- return typeof a == "function" ? te(a(v)) : null;
1333
+ return typeof o == "function" ? te(o(v)) : null;
1331
1334
  }, []), n = x(
1332
- (a) => {
1335
+ (o) => {
1333
1336
  const v = D?.userCardOptions?.secondarySlot;
1334
1337
  if (!v) return null;
1335
- const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: s.user, system: P, metadata: a };
1338
+ const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: s.user, system: P, metadata: o };
1336
1339
  return ue(v, k);
1337
1340
  },
1338
1341
  [w, D?.userCardOptions?.secondarySlot, ue, s.company, s.enabled_systems, s.user]
1339
1342
  ), f = x(
1340
- (a) => {
1343
+ (o) => {
1341
1344
  const v = D?.sessionCardOptions?.secondarySlot || D?.userCardOptions?.secondarySlot;
1342
1345
  if (!v) return null;
1343
- const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: a.auth_id, metadata: a?.metadata, system: P };
1346
+ const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: o.auth_id, metadata: o?.metadata, system: P };
1344
1347
  return ue(v, k);
1345
1348
  },
1346
1349
  [w, D?.sessionCardOptions?.secondarySlot, D?.userCardOptions?.secondarySlot, ue, s.company]
1347
1350
  ), g = me(() => {
1348
- const a = [];
1351
+ const o = [];
1349
1352
  return S.current.openNotifications = () => {
1350
1353
  Q.current = "notifications", S.current.openSidebar?.(), $.current?.setActiveSection("notifications");
1351
1354
  }, S.current.openHelp = () => {
1352
1355
  Q.current = "help", S.current.openSidebar?.(), $.current?.setActiveSection("help");
1353
- }, !D?.notificationsDrawerOptions?.hideActionButton && !D?.notificationsDrawerOptions?.hide && a.push({
1356
+ }, !D?.notificationsDrawerOptions?.hideActionButton && !D?.notificationsDrawerOptions?.hide && o.push({
1354
1357
  id: "notifications",
1355
1358
  title: "Notificaciones",
1356
1359
  icon: Ge,
1357
1360
  onClick: S.current.openNotifications,
1358
1361
  count: _
1359
- }), !D?.helpSectionDrawerOptions?.hideActionButton && r && !D?.helpSectionDrawerOptions?.hide && a.push({
1362
+ }), !D?.helpSectionDrawerOptions?.hideActionButton && r && !D?.helpSectionDrawerOptions?.hide && o.push({
1360
1363
  id: "help",
1361
1364
  title: "Ayuda",
1362
1365
  icon: Qe,
1363
1366
  onClick: S.current.openHelp
1364
- }), D?.configurationActionOptions?.onClick && !D?.configurationActionOptions?.hideActionButton && a.push({
1367
+ }), D?.configurationActionOptions?.onClick && !D?.configurationActionOptions?.hideActionButton && o.push({
1365
1368
  id: "configuration",
1366
1369
  title: "Configuracion",
1367
1370
  icon: Ot,
1368
1371
  onClick: D.configurationActionOptions?.onClick
1369
- }), a;
1370
- }, [D, r, p, _]), I = me(
1372
+ }), o;
1373
+ }, [D, r, p, _]), E = me(
1371
1374
  () => [...g, ...i || []],
1372
1375
  [g, i]
1373
1376
  ), H = me(() => {
1374
- const a = s.enabled_systems.map((k) => ({
1377
+ const o = s.enabled_systems.map((k) => ({
1375
1378
  name: k.name,
1376
1379
  thumbnail: k.thumbnail,
1377
1380
  onClick: Le,
@@ -1384,33 +1387,33 @@ const xt = Ee(null), jr = () => {
1384
1387
  thumbnail: k.thumbnail,
1385
1388
  onClick: Fe
1386
1389
  })) || [];
1387
- return [...a, ...v, ...P];
1388
- }, [s.enabled_systems, s.company.products, d?.customTabs]), F = x((a, v) => {
1389
- j.current?.addNewNotification ? j.current.addNewNotification(a, v) : console.warn("Notifications controls not ready yet");
1390
- }, []), re = x((a) => j.current?.subscribeToUpdates ? j.current.subscribeToUpdates(a) : (console.warn("Notifications controls not ready yet"), () => {
1391
- }), []), oe = x((a) => {
1392
- j.current?.removeNotification ? j.current.removeNotification(a) : console.warn("Notifications controls not ready yet");
1390
+ return [...o, ...v, ...P];
1391
+ }, [s.enabled_systems, s.company.products, d?.customTabs]), F = x((o, v) => {
1392
+ j.current?.addNewNotification ? j.current.addNewNotification(o, v) : console.warn("Notifications controls not ready yet");
1393
+ }, []), re = x((o) => j.current?.subscribeToUpdates ? j.current.subscribeToUpdates(o) : (console.warn("Notifications controls not ready yet"), () => {
1394
+ }), []), ae = x((o) => {
1395
+ j.current?.removeNotification ? j.current.removeNotification(o) : console.warn("Notifications controls not ready yet");
1393
1396
  }, []), fe = x(() => {
1394
1397
  j.current?.removeAllNotifications ? j.current.removeAllNotifications() : console.warn("Notifications controls not ready yet");
1395
- }, []), we = x((a) => {
1396
- j.current?.setNotifications ? j.current.setNotifications(a) : console.warn("Notifications controls not ready yet");
1397
- }, []), Ne = x((a, v) => U.current?.subscribeToScrollTarget ? U.current.subscribeToScrollTarget(a, v) : (console.warn("Scrollable controls not ready yet"), () => {
1398
- }), []), L = x((a, v = "load_more") => {
1399
- j.current?.setLoading ? j.current.setLoading(a, v) : console.warn("Notifications controls not ready yet");
1400
- }, []), K = x((a, v) => {
1401
- j.current?.setError ? j.current.setError(a, v) : console.warn("Notifications controls not ready yet");
1402
- }, []), V = x((a, v, P) => {
1398
+ }, []), we = x((o) => {
1399
+ j.current?.setNotifications ? j.current.setNotifications(o) : console.warn("Notifications controls not ready yet");
1400
+ }, []), Ne = x((o, v) => U.current?.subscribeToScrollTarget ? U.current.subscribeToScrollTarget(o, v) : (console.warn("Scrollable controls not ready yet"), () => {
1401
+ }), []), L = x((o, v = "load_more") => {
1402
+ j.current?.setLoading ? j.current.setLoading(o, v) : console.warn("Notifications controls not ready yet");
1403
+ }, []), K = x((o, v) => {
1404
+ j.current?.setError ? j.current.setError(o, v) : console.warn("Notifications controls not ready yet");
1405
+ }, []), V = x((o, v, P) => {
1403
1406
  const k = /* @__PURE__ */ e.jsxs("div", { className: T(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", v ? "fixed" : "sticky"), children: [
1404
1407
  !P && /* @__PURE__ */ e.jsx(pe, { label: "", icon: /* @__PURE__ */ e.jsx(Me, {}), onClick: () => B(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
1405
- typeof a == "function" ? a() : a
1408
+ typeof o == "function" ? o() : o
1406
1409
  ] });
1407
1410
  let J;
1408
- return v ? J = Ve(k, document.body, `modal-error-${Date.now()}`) : E.current && (J = Ve(k, E.current, `modal-error-${Date.now()}`)), Z(J), B(!0), k;
1409
- }, [E]), le = x(() => {
1411
+ return v ? J = Ve(k, document.body, `modal-error-${Date.now()}`) : O.current && (J = Ve(k, O.current, `modal-error-${Date.now()}`)), Z(J), B(!0), k;
1412
+ }, [O]), le = x(() => {
1410
1413
  B(!1);
1411
1414
  }, []);
1412
- return S.current.addNewNotification = F, S.current.subscribeToNotificationsUpdates = re, S.current.removeNotification = oe, S.current.removeAllNotifications = fe, S.current.setNotifications = we, S.current.setNotificationsError = K, S.current.setNotificationsLoading = L, S.current.subscribeToNotificationsScroll = Ne, S.current.showErrorModal = V, S.current.closeErrorModal = le, ne(() => {
1413
- re((a, v) => {
1415
+ return S.current.addNewNotification = F, S.current.subscribeToNotificationsUpdates = re, S.current.removeNotification = ae, S.current.removeAllNotifications = fe, S.current.setNotifications = we, S.current.setNotificationsError = K, S.current.setNotificationsLoading = L, S.current.subscribeToNotificationsScroll = Ne, S.current.showErrorModal = V, S.current.closeErrorModal = le, ne(() => {
1416
+ re((o, v) => {
1414
1417
  b(v);
1415
1418
  });
1416
1419
  }, [re]), /* @__PURE__ */ e.jsxs(xt.Provider, { value: S.current, children: [
@@ -1429,9 +1432,9 @@ const xt = Ee(null), jr = () => {
1429
1432
  /* @__PURE__ */ e.jsx(
1430
1433
  ht,
1431
1434
  {
1432
- links: o,
1433
- handleNavigation: ae,
1434
- allActions: I,
1435
+ links: a,
1436
+ handleNavigation: oe,
1437
+ allActions: E,
1435
1438
  activeActionId: m,
1436
1439
  onActionClick: p,
1437
1440
  state: s,
@@ -1452,7 +1455,7 @@ const xt = Ee(null), jr = () => {
1452
1455
  navigationControlsRef: S,
1453
1456
  notificationsListControls: j,
1454
1457
  scrollableControls: U,
1455
- outletRef: E,
1458
+ outletRef: O,
1456
1459
  onProfileClick: A,
1457
1460
  children: t
1458
1461
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "4.7.2",
4
+ "version": "4.7.4",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",