prometeo-design-system 4.1.0 → 4.1.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.
@@ -1,14 +1,14 @@
1
1
  import { j as e } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { u as We, g as ft } from "./useDevice-vwn4GLwK.js";
3
3
  import { g as xe } from "./utils-X4-h3cum.js";
4
- import Ue, { memo as T, forwardRef as Ne, useState as Z, useEffect as X, useContext as $e, createContext as Oe, useRef as I, useCallback as x, Children as mt, isValidElement as ge, useMemo as ue, useImperativeHandle as Le, use as pt } from "react";
4
+ import Ue, { memo as T, forwardRef as Ne, useState as Z, useEffect as X, useContext as $e, createContext as Le, useRef as I, useCallback as x, Children as mt, isValidElement as ge, useMemo as ue, useImperativeHandle as Oe, use as pt } from "react";
5
5
  import { createPortal as ze } from "react-dom";
6
6
  import { useLocation as ht, useNavigate as bt } from "react-router";
7
7
  import { B as xt, T as gt } from "./badge-CbqYNrl4.js";
8
8
  import { c as A } from "./cn-B6yFEsav.js";
9
- import { CloseNavBarDesktop as wt } from "./Icons/CloseNavBarDesktop.es.js";
9
+ import { CloseNavBarDesktop as vt } from "./Icons/CloseNavBarDesktop.es.js";
10
10
  import { c as Te } from "./index-BOQuZ0gG.js";
11
- import vt from "./PlainTooltip.es.js";
11
+ import wt from "./PlainTooltip.es.js";
12
12
  import { CrevronLeft as Nt } from "./Icons/CrevronLeft.es.js";
13
13
  import { Scrollable as ye } from "./Scrollable.es.js";
14
14
  import ee from "./TicketCard.es.js";
@@ -21,7 +21,7 @@ import { Close as Ie } from "./Icons/Close.es.js";
21
21
  import { Help as Ke } from "./Icons/Help.es.js";
22
22
  import { Settings as St } from "./Icons/Settings.es.js";
23
23
  const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOnOverlayClick: i = !1, unmountChildrenOnClose: n = !0 }, c) => {
24
- const m = me(t, s), d = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: h } = kt(), { closeSidebar: b } = ie(), [v, u] = Z(() => n ? h : !0), [N, y] = Z(!1);
24
+ const m = me(t, s), d = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: h } = kt(), { closeSidebar: b } = ie(), [w, u] = Z(() => n ? h : !0), [N, y] = Z(!1);
25
25
  return X(() => {
26
26
  n && s?.subscribeToSidebarOpen((f) => {
27
27
  f ? (y(!1), u(!0)) : y(!0);
@@ -46,10 +46,10 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
46
46
  ),
47
47
  /* @__PURE__ */ e.jsxs("div", { className: A("navigation-drawer-sidebar-inner"), children: [
48
48
  /* @__PURE__ */ e.jsx("div", { className: "secure-click-margin" }),
49
- v && m
49
+ w && m
50
50
  ] })
51
51
  ] });
52
- })), Xe = Oe(null), Je = Oe(null), kt = () => {
52
+ })), Xe = Le(null), Je = Le(null), kt = () => {
53
53
  const t = $e(Xe);
54
54
  if (!t) throw new Error("useDrawerState must be used within NavigationDrawer");
55
55
  return t;
@@ -72,7 +72,7 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
72
72
  } catch {
73
73
  }
74
74
  }, At = (t) => {
75
- const { children: r, classNameDrawer: s, classNameSidebar: l, disableDragOpen: i } = t, n = I(null), c = I(null), m = t.outletRef ?? I(null), d = I(null), h = I(He()), b = I(!1), v = I("drawer"), u = I(/* @__PURE__ */ new Set()), N = I(/* @__PURE__ */ new Set()), y = I(!1), f = I(null), F = x((o) => {
75
+ const { children: r, classNameDrawer: s, classNameSidebar: l, disableDragOpen: i } = t, n = I(null), c = I(null), m = t.outletRef ?? I(null), d = I(null), h = I(He()), b = I(!1), w = I("drawer"), u = I(/* @__PURE__ */ new Set()), N = I(/* @__PURE__ */ new Set()), y = I(!1), f = I(null), F = x((o) => {
76
76
  const p = c.current;
77
77
  p && (p.classList.toggle("collapsed", o), p.classList.toggle("expanded", !o));
78
78
  }, []), D = x((o) => {
@@ -84,31 +84,31 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
84
84
  }, []), P = x(
85
85
  (o, { notify: p = !0 } = {}) => {
86
86
  const g = h.current !== o;
87
- h.current = o, Dt(o), F(o), p && g && u.current.forEach((O) => O(o));
87
+ h.current = o, Dt(o), F(o), p && g && u.current.forEach((L) => L(o));
88
88
  },
89
89
  [F]
90
90
  ), R = x(
91
91
  (o, { notify: p = !0 } = {}) => {
92
92
  const g = b.current !== o;
93
93
  if (b.current = o, D(o), p && g) {
94
- const O = !o;
95
- N.current.forEach((B) => B(O));
94
+ const L = !o;
95
+ N.current.forEach((B) => B(L));
96
96
  }
97
97
  },
98
98
  [D]
99
99
  ), k = x(
100
100
  (o, { notify: p = !0 } = {}) => {
101
- const g = v.current, O = g !== o;
102
- v.current = o, window.matchMedia("(min-width: 768px)").matches || P(o !== "drawer", { notify: p });
101
+ const g = w.current, L = g !== o;
102
+ w.current = o, window.matchMedia("(min-width: 768px)").matches || P(o !== "drawer", { notify: p });
103
103
  const B = g === "sidebar", _ = o === "sidebar";
104
- p && O && B !== _ && N.current.forEach((Q) => Q(_)), R(o !== "sidebar", { notify: p }), P(o !== "drawer", { notify: p });
104
+ p && L && B !== _ && N.current.forEach((Q) => Q(_)), R(o !== "sidebar", { notify: p }), P(o !== "drawer", { notify: p });
105
105
  },
106
106
  [P, R]
107
107
  ), j = x((o) => {
108
108
  const p = n.current;
109
109
  if (!p || window.matchMedia("(min-width: 768px)").matches) return;
110
110
  y.current = !0;
111
- const g = m.current?.offsetLeft ?? 0, O = d.current?.offsetLeft ?? g, B = o === "drawer" ? 0 : o === "sidebar" ? O : g;
111
+ const g = m.current?.offsetLeft ?? 0, L = d.current?.offsetLeft ?? g, B = o === "drawer" ? 0 : o === "sidebar" ? L : g;
112
112
  f.current = B, p.scrollTo({ left: B, behavior: "smooth" });
113
113
  const _ = () => {
114
114
  y.current = !1, f.current = null, p.removeEventListener("scrollend", _);
@@ -122,8 +122,8 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
122
122
  const g = [
123
123
  { panel: "drawer", offset: 0 },
124
124
  { panel: "outlet", offset: p.offsetLeft }
125
- ], O = d.current;
126
- O && g.push({ panel: "sidebar", offset: O.offsetLeft });
125
+ ], L = d.current;
126
+ L && g.push({ panel: "sidebar", offset: L.offsetLeft });
127
127
  const B = o.scrollLeft;
128
128
  let _ = g[0], Q = Math.abs(B - _.offset);
129
129
  for (let $ = 1; $ < g.length; $++) {
@@ -139,8 +139,8 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
139
139
  const o = n.current, p = m.current;
140
140
  if (!o || !p) return;
141
141
  if (window.matchMedia("(min-width: 768px)").matches) {
142
- const O = He();
143
- P(O, { notify: !1 }), R(!0, { notify: !1 });
142
+ const L = He();
143
+ P(L, { notify: !1 }), R(!0, { notify: !1 });
144
144
  return;
145
145
  }
146
146
  requestAnimationFrame(() => {
@@ -149,12 +149,12 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
149
149
  }, [k, P, R]), X(() => {
150
150
  const o = n.current;
151
151
  if (!o || !m.current) return;
152
- let g = !1, O = 0, B = 0;
152
+ let g = !1, L = 0, B = 0;
153
153
  const _ = (S) => {
154
- O = S.touches[0].clientX, B = S.touches[0].clientY;
154
+ L = S.touches[0].clientX, B = S.touches[0].clientY;
155
155
  }, Q = (S, U) => {
156
- const a = window.getComputedStyle(S), w = U === "x" ? a.overflowX : a.overflowY;
157
- return /(auto|scroll|overlay)/.test(w) ? U === "x" ? S.scrollWidth > S.clientWidth : S.scrollHeight > S.clientHeight : !1;
156
+ const a = window.getComputedStyle(S), v = U === "x" ? a.overflowX : a.overflowY;
157
+ return /(auto|scroll|overlay)/.test(v) ? U === "x" ? S.scrollWidth > S.clientWidth : S.scrollHeight > S.clientHeight : !1;
158
158
  }, $ = (S, U) => {
159
159
  let a = S;
160
160
  for (; a && a !== o; ) {
@@ -165,13 +165,13 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
165
165
  return null;
166
166
  }, le = (S, U, a) => a === 0 ? !1 : U === "x" ? a < 0 ? S.scrollLeft + S.clientWidth < S.scrollWidth : S.scrollLeft > 0 : a < 0 ? S.scrollTop + S.clientHeight < S.scrollHeight : S.scrollTop > 0, he = (S) => {
167
167
  if (!(S.target instanceof HTMLElement)) return;
168
- const U = S.touches[0].clientX - O, a = S.touches[0].clientY - B, w = Math.abs(U) > Math.abs(a) ? "x" : "y", L = w === "x" ? U : a, C = $(S.target, w);
169
- if (C && le(C, w, L))
168
+ const U = S.touches[0].clientX - L, a = S.touches[0].clientY - B, v = Math.abs(U) > Math.abs(a) ? "x" : "y", O = v === "x" ? U : a, C = $(S.target, v);
169
+ if (C && le(C, v, O))
170
170
  return;
171
171
  const z = o.classList.contains("disabled-dragopen"), de = o.classList.contains("disabled-dragopen-sidebar"), Fe = () => S.cancelable ? (S.preventDefault(), !0) : !1;
172
- if (w === "x") {
172
+ if (v === "x") {
173
173
  if (U > 0) {
174
- if (v.current === "sidebar" && !de) {
174
+ if (w.current === "sidebar" && !de) {
175
175
  g = !0;
176
176
  return;
177
177
  }
@@ -180,7 +180,7 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
180
180
  return;
181
181
  }
182
182
  } else if (U < 0) {
183
- if (v.current === "drawer" && !z) {
183
+ if (w.current === "drawer" && !z) {
184
184
  g = !0;
185
185
  return;
186
186
  }
@@ -237,10 +237,10 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
237
237
  R(!b.current);
238
238
  return;
239
239
  }
240
- const o = v.current === "sidebar" ? "outlet" : "sidebar";
240
+ const o = w.current === "sidebar" ? "outlet" : "sidebar";
241
241
  k(o), j(o);
242
242
  },
243
- getIsSidebarOpen: () => d.current ? window.matchMedia("(min-width: 768px)").matches ? !b.current : v.current === "sidebar" : !1,
243
+ getIsSidebarOpen: () => d.current ? window.matchMedia("(min-width: 768px)").matches ? !b.current : w.current === "sidebar" : !1,
244
244
  subscribeToSidebarOpen: (o) => (N.current.add(o), () => {
245
245
  N.current.delete(o);
246
246
  }),
@@ -249,10 +249,10 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
249
249
  if (!p) return;
250
250
  const g = p.scrollLeft;
251
251
  if (o) {
252
- const O = p.style.scrollBehavior;
252
+ const L = p.style.scrollBehavior;
253
253
  p.style.scrollBehavior = "auto", p.classList.remove("disabled-dragopen"), requestAnimationFrame(() => {
254
254
  p.scrollLeft = g, requestAnimationFrame(() => {
255
- p.style.scrollBehavior = O;
255
+ p.style.scrollBehavior = L;
256
256
  });
257
257
  });
258
258
  } else
@@ -262,10 +262,10 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
262
262
  const p = n.current;
263
263
  if (p)
264
264
  if (o) {
265
- const g = p.scrollLeft, O = p.style.scrollBehavior;
265
+ const g = p.scrollLeft, L = p.style.scrollBehavior;
266
266
  p.style.scrollBehavior = "auto", p.classList.remove("disabled-dragopen-sidebar"), requestAnimationFrame(() => {
267
267
  p.scrollLeft = g, requestAnimationFrame(() => {
268
- p.style.scrollBehavior = O;
268
+ p.style.scrollBehavior = L;
269
269
  });
270
270
  });
271
271
  } else
@@ -285,11 +285,11 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
285
285
  E = o;
286
286
  return;
287
287
  }
288
- if (o.type === we && !V) {
288
+ if (o.type === ve && !V) {
289
289
  V = o;
290
290
  return;
291
291
  }
292
- if (o.type === ve && !W) {
292
+ if (o.type === we && !W) {
293
293
  W = o;
294
294
  return;
295
295
  }
@@ -303,7 +303,7 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
303
303
  }
304
304
  re.push(o);
305
305
  });
306
- const ce = !!V, Re = V ?? (re.length ? /* @__PURE__ */ e.jsx(we, { children: re }) : null), pe = ce ? re : [], ae = ne ?? (!!ne ? /* @__PURE__ */ e.jsx(ke, { children: H }) : null), Ce = W ?? (!!W ? /* @__PURE__ */ e.jsx(ve, { children: W }) : null), je = !!se, G = se, oe = ue(() => ({
306
+ const ce = !!V, Re = V ?? (re.length ? /* @__PURE__ */ e.jsx(ve, { children: re }) : null), pe = ce ? re : [], ae = ne ?? (!!ne ? /* @__PURE__ */ e.jsx(ke, { children: H }) : null), Ce = W ?? (!!W ? /* @__PURE__ */ e.jsx(we, { children: W }) : null), je = !!se, G = se, oe = ue(() => ({
307
307
  isCollapsed: h.current,
308
308
  isSidebarOpen: !b.current
309
309
  }), [h.current, b.current]);
@@ -349,7 +349,7 @@ const Ye = T(Ne(({ children: t, className: r, context: s, modal: l = !1, closeOn
349
349
  type: "button",
350
350
  onClick: t,
351
351
  className: "collapse-button cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300 w-max",
352
- children: /* @__PURE__ */ e.jsx(wt, { size: 32, className: "transition-transform duration-300 p-1" })
352
+ children: /* @__PURE__ */ e.jsx(vt, { size: 32, className: "transition-transform duration-300 p-1" })
353
353
  }
354
354
  ), (t, r) => t.onToggleCollapse === r.onToggleCollapse);
355
355
  Qe.displayName = "NavigationDrawerCollapseButton";
@@ -358,16 +358,16 @@ const Ee = T(({ children: t, className: r, context: s }) => {
358
358
  return /* @__PURE__ */ e.jsx("div", { className: A("flex items-center justify-between", r), children: l });
359
359
  });
360
360
  Ee.displayName = "NavigationDrawerHeader";
361
- const we = T(({ children: t, className: r, context: s, ...l }) => {
361
+ const ve = T(({ children: t, className: r, context: s, ...l }) => {
362
362
  const i = me(t, s);
363
363
  return /* @__PURE__ */ e.jsx("div", { ...l, className: A("w-full flex-1 drawer-content", r), children: i });
364
364
  });
365
- we.displayName = "NavigationDrawerContent";
366
- const ve = T(({ children: t, className: r, context: s }) => {
365
+ ve.displayName = "NavigationDrawerContent";
366
+ const we = T(({ children: t, className: r, context: s }) => {
367
367
  const l = me(t, s);
368
368
  return /* @__PURE__ */ e.jsx("div", { className: A("flex items-center justify-between", r), children: l });
369
369
  });
370
- ve.displayName = "NavigationDrawerFooter";
370
+ we.displayName = "NavigationDrawerFooter";
371
371
  const Ze = T(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: A("w-full border-t border-neutral-strong-default ", t) }));
372
372
  Ze.displayName = "NavigationDrawerSpacer";
373
373
  const ke = T(Ne(({ children: t, className: r, context: s }, l) => {
@@ -376,14 +376,14 @@ const ke = T(Ne(({ children: t, className: r, context: s }, l) => {
376
376
  }), (t, r) => t.children === r.children && t.className === r.className), q = Object.assign(Ve, {
377
377
  Root: Ve,
378
378
  Header: Ee,
379
- Content: we,
380
- Footer: ve,
379
+ Content: ve,
380
+ Footer: we,
381
381
  Spacer: Ze,
382
382
  Outlet: ke,
383
383
  Sidebar: Ye
384
384
  });
385
385
  q.displayName = "NavigationDrawer";
386
- const Ot = "hover:bg-neutral-medium-hover", Lt = Te("", {
386
+ const Lt = "hover:bg-neutral-medium-hover", Ot = Te("", {
387
387
  variants: {
388
388
  isSelected: {
389
389
  true: "bg-neutral-medium-selected ",
@@ -411,10 +411,10 @@ const Ot = "hover:bg-neutral-medium-hover", Lt = Te("", {
411
411
  }
412
412
  },
413
413
  compoundVariants: [
414
- { isSelected: !0, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
415
- { isSelected: !1, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
416
- { isSelected: !0, disabled: !1, className: " text-primary-default-default group-active:text-neutral-default-pressed group-focus:text-neutral-default-pressed" },
417
- { isSelected: !1, disabled: !1, className: " text-neutral-default-default group-active:text-neutral-default-pressed group-focus:text-neutral-default-pressed" }
414
+ { isSelected: !0, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus-visible:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
415
+ { isSelected: !1, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus-visible:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
416
+ { isSelected: !0, disabled: !1, className: " text-primary-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" },
417
+ { isSelected: !1, disabled: !1, className: " text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
418
418
  ]
419
419
  }
420
420
  ), Se = Te(
@@ -433,10 +433,10 @@ const Ot = "hover:bg-neutral-medium-hover", Lt = Te("", {
433
433
  }
434
434
  },
435
435
  compoundVariants: [
436
- { isSelected: !0, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
437
- { isSelected: !1, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
438
- { isSelected: !0, disabled: !1, className: "text-primary-default-default group-active:text-neutral-default-pressed group-focus:text-neutral-default-pressed" },
439
- { isSelected: !1, disabled: !1, className: "text-neutral-default-default group-active:text-neutral-default-pressed group-focus:text-neutral-default-pressed" }
436
+ { isSelected: !0, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus-visible:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
437
+ { isSelected: !1, disabled: !0, className: "text-neutral-strong-disabled hover:text-neutral-strong-disabled focus-visible:text-neutral-strong-disabled active:text-neutral-strong-disabled" },
438
+ { isSelected: !0, disabled: !1, className: "text-primary-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" },
439
+ { isSelected: !1, disabled: !1, className: "text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
440
440
  ]
441
441
  }
442
442
  ), It = (t) => {
@@ -451,14 +451,14 @@ const Ot = "hover:bg-neutral-medium-hover", Lt = Te("", {
451
451
  onToggleSublinks: d,
452
452
  as: h = "div",
453
453
  onClick: b,
454
- onAuxClick: v,
454
+ onAuxClick: w,
455
455
  disabled: u = !1,
456
456
  tooltipText: N
457
457
  } = t, y = (P) => {
458
458
  u || b?.(P);
459
459
  }, f = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
460
460
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center flex-nowrap", children: [
461
- s && (N ? /* @__PURE__ */ e.jsx(vt, { title: N, disabled: u, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: Se({ disabled: u, isSelected: n }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: Se({ disabled: u, isSelected: n }) })),
461
+ s && (N ? /* @__PURE__ */ e.jsx(wt, { title: N, disabled: u, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: Se({ disabled: u, isSelected: n }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: Se({ disabled: u, isSelected: n }) })),
462
462
  /* @__PURE__ */ e.jsx("label", { className: Tt({ disabled: u, isSelected: n }), children: r })
463
463
  ] }),
464
464
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
@@ -490,14 +490,14 @@ const Ot = "hover:bg-neutral-medium-hover", Lt = Te("", {
490
490
  "group navitem",
491
491
  "h-12 flex-1 flex items-center p-3 rounded-lg justify-between w-full",
492
492
  "transition-all duration-300",
493
- Ot,
494
- Lt({ isSelected: n, disabled: u }),
493
+ Lt,
494
+ Ot({ isSelected: n, disabled: u }),
495
495
  i
496
496
  );
497
497
  if (h === "a") {
498
498
  const P = {
499
499
  onClick: y,
500
- onAuxClick: v,
500
+ onAuxClick: w,
501
501
  className: F
502
502
  };
503
503
  return /* @__PURE__ */ e.jsx("a", { ...P, children: f });
@@ -539,7 +539,7 @@ const Pt = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) =
539
539
  top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
540
540
  bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
541
541
  }, children: t?.map((i) => {
542
- const { id: n, onClick: c, isView: m = !0, payload: d, ...h } = i, b = n === r, v = () => {
542
+ const { id: n, onClick: c, isView: m = !0, payload: d, ...h } = i, b = n === r, w = () => {
543
543
  s?.(n, d), c?.();
544
544
  };
545
545
  return m ? /* @__PURE__ */ e.jsx(
@@ -548,7 +548,7 @@ const Pt = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) =
548
548
  ...h,
549
549
  id: n,
550
550
  isActive: b,
551
- onClick: v
551
+ onClick: w
552
552
  },
553
553
  n
554
554
  ) : null;
@@ -588,7 +588,7 @@ const _t = (t) => {
588
588
  }, rt = T(_t);
589
589
  rt.displayName = "NavItemSecondary";
590
590
  const Rt = Ne((t, r) => {
591
- const [s, l] = Z(!0), i = I(null), { path: n, title: c, icon: m, count: d, className: h, isSelected: b = !1, onClick: v, sublinks: u, toggleCollapse: N, getIsCollapsed: y, subscribeToCollapse: f, isView: F = !0, disabled: D, tooltipText: P } = t;
591
+ const [s, l] = Z(!0), i = I(null), { path: n, title: c, icon: m, count: d, className: h, isSelected: b = !1, onClick: w, sublinks: u, toggleCollapse: N, getIsCollapsed: y, subscribeToCollapse: f, isView: F = !0, disabled: D, tooltipText: P } = t;
592
592
  X(() => f ? f((E) => {
593
593
  E && l(!0);
594
594
  }) : void 0, [f]);
@@ -608,15 +608,15 @@ const Rt = Ne((t, r) => {
608
608
  toggleDrawerCollapse: N,
609
609
  subscribeToCollapse: f
610
610
  };
611
- Le(r, () => j, [j, s, y, N]);
611
+ Oe(r, () => j, [j, s, y, N]);
612
612
  const K = m, Y = x(() => {
613
613
  const M = y?.() ?? !1;
614
614
  if (u && u.length > 0 && M) {
615
615
  k(!1), N?.();
616
616
  return;
617
617
  }
618
- v?.(n);
619
- }, [n, v, u, N, k, y]), J = x(() => {
618
+ w?.(n);
619
+ }, [n, w, u, N, k, y]), J = x(() => {
620
620
  window.open(n, "_blank");
621
621
  }, [n]), te = () => {
622
622
  if (!u || D) return null;
@@ -625,9 +625,9 @@ const Rt = Ne((t, r) => {
625
625
  const M = x((E) => {
626
626
  if (E.startsWith("./")) {
627
627
  const V = n + E.slice(2);
628
- v?.(V);
628
+ w?.(V);
629
629
  } else
630
- v?.(E);
630
+ w?.(E);
631
631
  }, [n]);
632
632
  return X(() => {
633
633
  const E = i.current;
@@ -779,10 +779,10 @@ const Ft = (t) => {
779
779
  userOptionsControls: h,
780
780
  mobileAppSwitcherControls: b
781
781
  }) => {
782
- const { getIsCollapsed: v, toggleCollapse: u, subscribeToCollapse: N } = ie(), y = x(() => {
783
- const f = v();
782
+ const { getIsCollapsed: w, toggleCollapse: u, subscribeToCollapse: N } = ie(), y = x(() => {
783
+ const f = w();
784
784
  f ? (u(), h.current?.open()) : c?.(f);
785
- }, [v, u, h, c]);
785
+ }, [w, u, h, c]);
786
786
  return X(() => N((f) => {
787
787
  f && (h.current?.close(), b.current?.close());
788
788
  }), [N, h, b]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -959,14 +959,14 @@ const Ht = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s
959
959
  }, []), b = x((u) => {
960
960
  i(u), n.current.forEach((N) => N(u, u.length));
961
961
  }, []);
962
- Le(s, () => ({
962
+ Oe(s, () => ({
963
963
  addNewNotification: c,
964
964
  subscribeToUpdates: m,
965
965
  setNotifications: b,
966
966
  removeNotification: d,
967
967
  removeAllNotifications: h
968
968
  }), [c, m, b, d, h]);
969
- const v = l.length > 0;
969
+ const w = l.length > 0;
970
970
  return /* @__PURE__ */ e.jsxs(
971
971
  "section",
972
972
  {
@@ -980,8 +980,8 @@ const Ht = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s
980
980
  /* @__PURE__ */ e.jsx(fe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(Ie, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
981
981
  ] }),
982
982
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-8 pt-4 px-4", children: [
983
- r && v && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(fe, { onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) }),
984
- v ? l?.map((u, N) => /* @__PURE__ */ e.jsx(jt, { ...u, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, N)) : /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-body-medium text-neutral-default-hover text-center py-8", children: "No hay notificaciones" })
983
+ r && w && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(fe, { onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) }),
984
+ w ? l?.map((u, N) => /* @__PURE__ */ e.jsx(jt, { ...u, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, N)) : /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-body-medium text-neutral-default-hover text-center py-8", children: "No hay notificaciones" })
985
985
  ] })
986
986
  ]
987
987
  }
@@ -1003,7 +1003,7 @@ const Ht = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s
1003
1003
  }
1004
1004
  ), Wt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: l, notificationsListControls: i }, n) => {
1005
1005
  const [c, m] = Z(l ?? "notifications");
1006
- Le(n, () => ({
1006
+ Oe(n, () => ({
1007
1007
  setActiveSection: m
1008
1008
  }));
1009
1009
  const d = () => {
@@ -1047,7 +1047,7 @@ const qt = ({ navigationControlsRef: t }) => {
1047
1047
  const r = ie();
1048
1048
  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;
1049
1049
  }, Kt = (t) => {
1050
- const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot: i, handleNavigation: n, allActions: c, tabs: m, navigationControlsRef: d, sidebarContentRef: h, initialSectionRef: b, userOptionsControls: v, mobileAppSwitcherControls: u, notificationsListControls: N, outletRef: y, ...f } = t;
1050
+ const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot: i, handleNavigation: n, allActions: c, tabs: m, navigationControlsRef: d, sidebarContentRef: h, initialSectionRef: b, userOptionsControls: w, mobileAppSwitcherControls: u, notificationsListControls: N, outletRef: y, ...f } = t;
1051
1051
  return /* @__PURE__ */ e.jsxs(q, { disableDragOpen: f.options?.disableDragOpen, outletRef: y, children: [
1052
1052
  /* @__PURE__ */ e.jsx(qt, { navigationControlsRef: d }),
1053
1053
  /* @__PURE__ */ e.jsx(q.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
@@ -1081,7 +1081,7 @@ const qt = ({ navigationControlsRef: t }) => {
1081
1081
  onLogoutClick: f.onLogoutClick,
1082
1082
  options: f.options,
1083
1083
  currentSystemId: f.currentSystemId,
1084
- userOptionsControls: v,
1084
+ userOptionsControls: w,
1085
1085
  mobileAppSwitcherControls: u,
1086
1086
  onProfileClick: f.onProfileClick
1087
1087
  }
@@ -1122,12 +1122,12 @@ const qt = ({ navigationControlsRef: t }) => {
1122
1122
  Ae.displayName = "PyrionNavigationDrawer.LayoutBase";
1123
1123
  const dt = T(({ children: t }) => /* @__PURE__ */ e.jsx(q.Outlet, { children: t }));
1124
1124
  dt.displayName = "PyrionNavigationDrawer.IsolatedOutlet";
1125
- const ut = Oe(null), br = () => {
1125
+ const ut = Le(null), br = () => {
1126
1126
  const t = pt(ut);
1127
1127
  if (!t)
1128
- throw new Error("usePyrionNavigation debe usarse dentro de PyrionNavigationDrawer");
1128
+ throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
1129
1129
  return t;
1130
- }, xr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick: i, onNavigate: n, onLogoutClick: c, actions: m, activeActionId: d, onActionClick: h, tabsProps: b, currentSystemId: v, onSessionClick: u, onSystemLogoClick: N, onProfileClick: y, ...f }) => {
1130
+ }, xr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick: i, onNavigate: n, onLogoutClick: c, actions: m, activeActionId: d, onActionClick: h, tabsProps: b, currentSystemId: w, onSessionClick: u, onSystemLogoClick: N, onProfileClick: y, ...f }) => {
1131
1131
  const D = Object.assign({
1132
1132
  closeDrawerOnNavigate: !0,
1133
1133
  disableDragOpen: {
@@ -1139,8 +1139,8 @@ const ut = Oe(null), br = () => {
1139
1139
  i(a);
1140
1140
  return;
1141
1141
  }
1142
- const w = window.location.pathname;
1143
- P(a), D.closeDrawerOnNavigate && ft() && !j.current?.getIsCollapsed?.() && j.current?.toggleCollapse?.(), n && n(w, a);
1142
+ const v = window.location.pathname;
1143
+ P(a), D.closeDrawerOnNavigate && ft() && !j.current?.getIsCollapsed?.() && j.current?.toggleCollapse?.(), n && n(v, a);
1144
1144
  }, [i, n, P]), ce = (a) => {
1145
1145
  a && window.open(a, "_blank");
1146
1146
  }, pe = {
@@ -1155,34 +1155,34 @@ const ut = Oe(null), br = () => {
1155
1155
  desktop: ce
1156
1156
  }
1157
1157
  }, Me = x((a) => {
1158
- const w = R ? "mobile" : "desktop", L = s.enabled_systems.find((C) => C.name === a)?.url;
1159
- pe.system[w](L), b?.onTabClick?.(a);
1158
+ const v = R ? "mobile" : "desktop", O = s.enabled_systems.find((C) => C.name === a)?.url;
1159
+ pe.system[v](O), b?.onTabClick?.(a);
1160
1160
  }, [R, s.enabled_systems, b?.onTabClick]), ae = x((a) => {
1161
- const w = R ? "mobile" : "desktop", L = s.company.products?.find((C) => C.name === a)?.domain;
1162
- pe.product[w](L), b?.onTabClick?.(a);
1163
- }, [R, s.company.products, b?.onTabClick]), Be = x((a, w) => {
1164
- if (w) {
1165
- w(a), b?.onTabClick?.(a);
1161
+ const v = R ? "mobile" : "desktop", O = s.company.products?.find((C) => C.name === a)?.domain;
1162
+ pe.product[v](O), b?.onTabClick?.(a);
1163
+ }, [R, s.company.products, b?.onTabClick]), Be = x((a, v) => {
1164
+ if (v) {
1165
+ v(a), b?.onTabClick?.(a);
1166
1166
  return;
1167
1167
  } else
1168
1168
  b?.onTabClick?.(a);
1169
1169
  }, [b?.onTabClick]), Ce = x(() => {
1170
1170
  const a = {};
1171
- s.enabled_systems.forEach((L) => {
1172
- a[L.url] = L.name;
1171
+ s.enabled_systems.forEach((O) => {
1172
+ a[O.url] = O.name;
1173
1173
  });
1174
- const w = window.location.origin;
1175
- for (const [L, C] of Object.entries(a))
1176
- if (w === L)
1174
+ const v = window.location.origin;
1175
+ for (const [O, C] of Object.entries(a))
1176
+ if (v === O)
1177
1177
  return C;
1178
1178
  return "";
1179
1179
  }, [s.enabled_systems]), je = b?.currentTabName || Ce(), G = ue(
1180
1180
  () => s.sessions || [],
1181
1181
  [s.sessions]
1182
- ), oe = (a) => a == null ? null : typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? String(a) : ge(a) ? a : typeof a == "object" ? JSON.stringify(a) : null, o = x((a, w) => {
1182
+ ), oe = (a) => a == null ? null : typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? String(a) : ge(a) ? a : typeof a == "object" ? JSON.stringify(a) : null, o = x((a, v) => {
1183
1183
  if (!a) return null;
1184
1184
  if (Array.isArray(a)) {
1185
- const L = a?.[0] ? xe(w, a[0]) : null, C = a?.[1] ? xe(w, a[1]) : null, z = oe(L), de = oe(C);
1185
+ const O = a?.[0] ? xe(v, a[0]) : null, C = a?.[1] ? xe(v, a[1]) : null, z = oe(O), de = oe(C);
1186
1186
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1187
1187
  /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-break-spaces min-w-1/2", children: z }),
1188
1188
  de && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 flex-1 grow shrink-0 min-w-[40%] overflow-hidden", children: [
@@ -1192,27 +1192,27 @@ const ut = Oe(null), br = () => {
1192
1192
  ] });
1193
1193
  }
1194
1194
  if (typeof a == "string") {
1195
- const L = xe(w, a);
1196
- return oe(L);
1195
+ const O = xe(v, a);
1196
+ return oe(O);
1197
1197
  }
1198
- return typeof a == "function" ? oe(a(w)) : null;
1198
+ return typeof a == "function" ? oe(a(v)) : null;
1199
1199
  }, []), p = x(
1200
1200
  (a) => {
1201
- const w = D?.userCardOptions?.secondarySlot;
1202
- if (!w) return null;
1203
- const L = s.enabled_systems?.find((z) => z._id === v), C = { company: s.company, user: s.user, system: L, metadata: a };
1204
- return o(w, C);
1201
+ const v = D?.userCardOptions?.secondarySlot;
1202
+ if (!v) return null;
1203
+ const O = s.enabled_systems?.find((z) => z._id === w), C = { company: s.company, user: s.user, system: O, metadata: a };
1204
+ return o(v, C);
1205
1205
  },
1206
- [v, D?.userCardOptions?.secondarySlot, o, s.company, s.enabled_systems, s.user]
1206
+ [w, D?.userCardOptions?.secondarySlot, o, s.company, s.enabled_systems, s.user]
1207
1207
  ), g = x(
1208
1208
  (a) => {
1209
- const w = D?.sessionCardOptions?.secondarySlot || D?.userCardOptions?.secondarySlot;
1210
- if (!w) return null;
1211
- const L = s.enabled_systems?.find((z) => z._id === v), C = { company: s.company, user: a.auth_id, metadata: a?.metadata, system: L };
1212
- return o(w, C);
1209
+ const v = D?.sessionCardOptions?.secondarySlot || D?.userCardOptions?.secondarySlot;
1210
+ if (!v) return null;
1211
+ const O = s.enabled_systems?.find((z) => z._id === w), C = { company: s.company, user: a.auth_id, metadata: a?.metadata, system: O };
1212
+ return o(v, C);
1213
1213
  },
1214
- [v, D?.sessionCardOptions?.secondarySlot, D?.userCardOptions?.secondarySlot, o, s.company]
1215
- ), O = ue(() => {
1214
+ [w, D?.sessionCardOptions?.secondarySlot, D?.userCardOptions?.secondarySlot, o, s.company]
1215
+ ), L = ue(() => {
1216
1216
  const a = [];
1217
1217
  return j.current.openNotifications = () => {
1218
1218
  Y.current = "notifications", j.current.openSidebar?.(), K.current?.setActiveSection("notifications");
@@ -1236,23 +1236,23 @@ const ut = Oe(null), br = () => {
1236
1236
  onClick: D.configurationActionOptions?.onClick
1237
1237
  }), a;
1238
1238
  }, [D, r, h, M]), B = ue(
1239
- () => [...O, ...m || []],
1240
- [O, m]
1239
+ () => [...L, ...m || []],
1240
+ [L, m]
1241
1241
  ), _ = ue(() => {
1242
1242
  const a = s.enabled_systems.map((C) => ({
1243
1243
  name: C.name,
1244
1244
  thumbnail: C.thumbnail,
1245
1245
  onClick: Me,
1246
1246
  id: C._id
1247
- })) || [], w = b?.customTabs?.map((C) => ({
1247
+ })) || [], v = b?.customTabs?.map((C) => ({
1248
1248
  ...C,
1249
1249
  onClick: () => Be(C.name, C?.onClick)
1250
- })) || [], L = s.company.products?.map((C) => ({
1250
+ })) || [], O = s.company.products?.map((C) => ({
1251
1251
  name: C.name,
1252
1252
  thumbnail: C.thumbnail,
1253
1253
  onClick: ae
1254
1254
  })) || [];
1255
- return [...a, ...w, ...L];
1255
+ return [...a, ...v, ...O];
1256
1256
  }, [s.enabled_systems, s.company.products, b?.customTabs]), Q = x((a) => {
1257
1257
  k.current?.addNewNotification ? k.current.addNewNotification(a) : console.warn("Notifications controls not ready yet");
1258
1258
  }, []), $ = x((a) => k.current?.subscribeToUpdates ? k.current.subscribeToUpdates(a) : (console.warn("Notifications controls not ready yet"), () => {
@@ -1262,19 +1262,19 @@ const ut = Oe(null), br = () => {
1262
1262
  k.current?.removeAllNotifications ? k.current.removeAllNotifications() : console.warn("Notifications controls not ready yet");
1263
1263
  }, []), be = x((a) => {
1264
1264
  k.current?.setNotifications ? k.current.setNotifications(a) : console.warn("Notifications controls not ready yet");
1265
- }, []), S = x((a, w, L) => {
1266
- const C = /* @__PURE__ */ e.jsxs("div", { className: A(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", w ? "fixed" : "sticky"), children: [
1267
- !L && /* @__PURE__ */ e.jsx(fe, { label: "", icon: /* @__PURE__ */ e.jsx(Ie, {}), onClick: () => W(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
1265
+ }, []), S = x((a, v, O) => {
1266
+ const C = /* @__PURE__ */ e.jsxs("div", { className: A(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", v ? "fixed" : "sticky"), children: [
1267
+ !O && /* @__PURE__ */ e.jsx(fe, { label: "", icon: /* @__PURE__ */ e.jsx(Ie, {}), onClick: () => W(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
1268
1268
  typeof a == "function" ? a() : a
1269
1269
  ] });
1270
1270
  let z;
1271
- return w ? z = ze(C, document.body, `modal-error-${Date.now()}`) : H.current && (z = ze(C, H.current, `modal-error-${Date.now()}`)), ne(z), W(!0), C;
1271
+ return v ? z = ze(C, document.body, `modal-error-${Date.now()}`) : H.current && (z = ze(C, H.current, `modal-error-${Date.now()}`)), ne(z), W(!0), C;
1272
1272
  }, [H]), U = x(() => {
1273
1273
  W(!1);
1274
1274
  }, []);
1275
1275
  return j.current.addNewNotification = Q, j.current.subscribeToNotificationsUpdates = $, j.current.removeNotification = le, j.current.removeAllNotifications = he, j.current.setNotifications = be, j.current.showErrorModal = S, j.current.closeErrorModal = U, X(() => {
1276
- $((a, w) => {
1277
- E(w);
1276
+ $((a, v) => {
1277
+ E(v);
1278
1278
  });
1279
1279
  }, [$]), /* @__PURE__ */ e.jsxs(ut.Provider, { value: j.current, children: [
1280
1280
  V && re,
@@ -1293,7 +1293,7 @@ const ut = Oe(null), br = () => {
1293
1293
  onSessionClick: u,
1294
1294
  onLogoutClick: c,
1295
1295
  options: D,
1296
- currentSystemId: v,
1296
+ currentSystemId: w,
1297
1297
  userOptionsControls: J,
1298
1298
  mobileAppSwitcherControls: te,
1299
1299
  onSystemLogoClick: N,
@@ -1315,7 +1315,7 @@ const ut = Oe(null), br = () => {
1315
1315
  tabs: _,
1316
1316
  activeColor: "var(--neutral-900)",
1317
1317
  currentTabName: je,
1318
- currentSystemId: v
1318
+ currentSystemId: w
1319
1319
  }
1320
1320
  ),
1321
1321
  /* @__PURE__ */ e.jsx(
@@ -1333,7 +1333,7 @@ const ut = Oe(null), br = () => {
1333
1333
  onSessionClick: u,
1334
1334
  onLogoutClick: c,
1335
1335
  options: D,
1336
- currentSystemId: v,
1336
+ currentSystemId: w,
1337
1337
  userOptionsControls: J,
1338
1338
  mobileAppSwitcherControls: te,
1339
1339
  onSystemLogoClick: N,
@@ -1,4 +1,6 @@
1
+ export * from './exports/TabLinks'
1
2
  export {}
2
3
  import PrometeoDesignSystem from './exports/TabLinks'
3
4
  export default PrometeoDesignSystem
5
+ export * from './exports/TabLinks'
4
6
  export {}
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TicketCardHandlerProps } from '../TicketCard';
3
- import { AuthSession, PyrionLayoutOptions, PyrionNavigationDrawerProps } from './PyrionLayout';
3
+ import { AuthSession, PyrionLayoutOptions, PyrionLayoutProps } from './PyrionLayout';
4
4
  export interface DrawerFooterProps<TAppMetadata> {
5
- state: PyrionNavigationDrawerProps<TAppMetadata>['state'];
5
+ state: PyrionLayoutProps<TAppMetadata>['state'];
6
6
  currentAppSessions: AuthSession<TAppMetadata>[];
7
7
  resolveUserSecondarySlot: (metadata?: TAppMetadata) => ReactNode | string | null;
8
8
  resolveSessionSecondarySlot: (session: AuthSession<TAppMetadata>) => ReactNode | string | null;
@@ -5,14 +5,14 @@ import { TabSwitchElement } from '../TabSwitch/TabSwitch';
5
5
  import { TicketCardHandlerProps } from '../TicketCard';
6
6
  import { NotificationsListControlsHandler } from './PLNotificationsList';
7
7
  import { PLSidebarContentHandle } from './PLSidebarContent';
8
- import { AuthSession, PyrionNavigationControls, PyrionLayoutOptions, PyrionNavigationDrawerProps } from './PyrionLayout';
8
+ import { AuthSession, PyrionNavigationControls, PyrionLayoutOptions, PyrionLayoutProps } from './PyrionLayout';
9
9
  export type TLayoutBaseProps<TAppMetadata = unknown, TNotificationMetadata = unknown> = {
10
10
  links?: PyrionLayoutLinkItemProps[];
11
11
  handleNavigation: (path: string) => void;
12
12
  allActions: PyrionLayoutActionItemProps[];
13
13
  activeActionId?: string;
14
14
  onActionClick?: (id: string, payload?: any) => void;
15
- state: PyrionNavigationDrawerProps<TAppMetadata, TNotificationMetadata>['state'];
15
+ state: PyrionLayoutProps<TAppMetadata, TNotificationMetadata>['state'];
16
16
  currentAppSessions: AuthSession<TAppMetadata>[];
17
17
  resolveUserSecondarySlot: (metadata?: TAppMetadata) => ReactNode | string | null;
18
18
  resolveSessionSecondarySlot: (session: AuthSession<TAppMetadata>) => ReactNode | string | null;
@@ -96,7 +96,7 @@ export interface PyrionLayoutOptions<TAppMetadata> {
96
96
  sidebar?: boolean;
97
97
  };
98
98
  }
99
- export interface PyrionNavigationDrawerProps<TAppMetadata, TNotificationMetadata = unknown> {
99
+ export interface PyrionLayoutProps<TAppMetadata, TNotificationMetadata = unknown> {
100
100
  links?: PyrionLayoutLinkItemProps[];
101
101
  actions?: PyrionLayoutActionItemProps[];
102
102
  tabsProps?: PyrionLayoutTabsProps;
@@ -141,6 +141,6 @@ export type PyrionNavigationControls<TNotificationMetadata = unknown> = {
141
141
  removeAllNotifications?: () => void;
142
142
  removeNotification?: (id: string | string[]) => void;
143
143
  };
144
- export declare const usePyrionNavigation: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
145
- declare const PyrionNavigationDrawer: <TAppMetadata = unknown, TNotificationMetadata = unknown>({ children, helpSection, state, links: navlinks, onLinkClick, onNavigate, onLogoutClick, actions, activeActionId, onActionClick, tabsProps, currentSystemId, onSessionClick, onSystemLogoClick, onProfileClick, ...props }: PyrionNavigationDrawerProps<TAppMetadata, TNotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
146
- export default PyrionNavigationDrawer;
144
+ export declare const usePyrionLayout: <TNotificationMetadata = unknown>() => PyrionNavigationControls<TNotificationMetadata>;
145
+ 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;
146
+ export default PyrionLayout;
@@ -1,4 +1,6 @@
1
- import { default as PyrionNavigationDrawer, PyrionNavigationDrawerProps, PyrionLayoutOptions, PyrionLayoutTabsProps, AuthSession } from './PyrionLayout';
1
+ import { default as PyrionLayout, PyrionLayoutProps, PyrionLayoutOptions, PyrionLayoutTabsProps, AuthSession } from './PyrionLayout';
2
+ import { PyrionLayoutLinkItemProps } from '../NavigationDrawer/NavigationDrawerLinkItem';
3
+ import { PyrionLayoutActionItemProps } from '../NavigationDrawer/NavigationDrawerActionItem';
2
4
  import { NotificationCardProps } from '../NotificationCard';
3
- export { type PyrionNavigationDrawerProps, type PyrionLayoutOptions as PyrionNavigationDrawerOptions, type PyrionLayoutTabsProps as NavigationDrawerTabsProps, type AuthSession, type NotificationCardProps };
4
- export default PyrionNavigationDrawer;
5
+ export { type PyrionLayoutProps, type PyrionLayoutOptions, type PyrionLayoutTabsProps, type AuthSession, type NotificationCardProps, type PyrionLayoutLinkItemProps, type PyrionLayoutActionItemProps };
6
+ export default PyrionLayout;
@@ -1,2 +1,2 @@
1
1
  export { default } from '../components/PyrionNavigationDrawer';
2
- export { type PyrionNavigationDrawerProps, type PyrionNavigationDrawerOptions, type NavigationDrawerTabsProps, type AuthSession, type NotificationCardProps } from '../components/PyrionNavigationDrawer';
2
+ export { type PyrionLayoutProps, type PyrionLayoutOptions, type PyrionLayoutTabsProps, type AuthSession, type NotificationCardProps } from '../components/PyrionNavigationDrawer';
@@ -1 +1,2 @@
1
1
  export { default } from '../components/TabLinks/TabLinks';
2
+ export type { TabLinksProps, TabItem } from '../components/TabLinks/TabLinks';
@@ -1 +1 @@
1
- export { usePyrionNavigation as default } from '../components/PyrionNavigationDrawer/PyrionLayout';
1
+ export { usePyrionLayout as default } from '../components/PyrionNavigationDrawer/PyrionLayout';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "4.1.0",
4
+ "version": "4.1.2",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",