react-ecosistema-unp 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/Anchor-D8f6vg0T.js +40 -0
  2. package/dist/Bootstrap-yLMFDuQq.js +1136 -0
  3. package/dist/Button-DD8y8HBa.js +78 -0
  4. package/dist/Button-DMwpnJlD.js +33 -0
  5. package/dist/{Card-aTqC9rSK.js → Card-BXqmurzN.js} +2 -2
  6. package/dist/{CardBody-B9vvCH8g.js → CardBody-RoDe1y90.js} +1 -1
  7. package/dist/{NotificacionUsuario-DRuxRQ6q.js → NotificacionUsuario-WGsdHnu2.js} +372 -402
  8. package/dist/TabContext-CdjYJzMB.js +125 -0
  9. package/dist/ThemeProvider-CFCmmLJC.js +69 -0
  10. package/dist/accessibility/barra-accesibilidad/BarraAccesibilidad.js +13 -13
  11. package/dist/assets/BarraAccesibilidad.css +1 -1
  12. package/dist/assets/Breadcrumb.css +1 -0
  13. package/dist/assets/MenuLateral.css +1 -1
  14. package/dist/assets/NotificacionUsuario.css +1 -1
  15. package/dist/assets/SeccionTarjeta.css +1 -1
  16. package/dist/assets/SeccionTarjetaLectura.css +1 -1
  17. package/dist/assets/Subtitulo.css +1 -0
  18. package/dist/assets/TabVentana.css +1 -1
  19. package/dist/assets/TarjetaLectura.css +1 -1
  20. package/dist/assets/VentanaLienzo.css +1 -0
  21. package/dist/auth/hooks/useFinalizarSesion.js +7 -7
  22. package/dist/{index-B-HWDQSx.js → index-Bk5C3cP1.js} +1 -1
  23. package/dist/{index-PYPwtOs4.js → index-DAgOFOds.js} +18 -14
  24. package/dist/lib/shared/breadcrumb/Breadcrumb.d.ts +11 -0
  25. package/dist/lib/shared/ventana-lienzo/VentanaLienzo.d.ts +3 -0
  26. package/dist/lib/shared.d.ts +1 -1
  27. package/dist/lib/tables/tabla-registros/TablaRegistros.d.ts +2 -2
  28. package/dist/lib/tables/tabla-registros/{encabezado → encabezado-tabla}/EncabezadoTabla.d.ts +3 -4
  29. package/dist/lib/tables.d.ts +0 -1
  30. package/dist/lib/ui/encabezado/Encabezado.d.ts +2 -2
  31. package/dist/lib/ui/icono-tooltip/IconoTooltip.d.ts +18 -0
  32. package/dist/lib/ui/{tarjeta-listado/TarjetaListado.d.ts → items-modal/ItemsModal.d.ts} +4 -4
  33. package/dist/lib/ui/paginador/Paginador.d.ts +1 -1
  34. package/dist/lib/ui/subtitulo/Subtitulo.d.ts +3 -2
  35. package/dist/lib/ui/tarjeta/Tarjeta.d.ts +1 -3
  36. package/dist/lib/ui/tarjeta/nuevo-elemento/NuevoElemento.d.ts +9 -0
  37. package/dist/lib/ui/tarjeta/seccion-tarjeta/SeccionTarjeta.d.ts +1 -1
  38. package/dist/lib/ui.d.ts +4 -3
  39. package/dist/shared/breadcrumb/Breadcrumb.js +79 -0
  40. package/dist/shared/menu-lateral/MenuLateral.js +127 -127
  41. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +1 -1
  42. package/dist/shared/{ventana-tabs → tab-ventana}/TabVentana.js +2 -2
  43. package/dist/shared/ventana-lienzo/VentanaLienzo.js +17 -11
  44. package/dist/shared/ventana-tabs/VentanaTabs.js +23 -23
  45. package/dist/shared.js +1 -1
  46. package/dist/tables/tabla-registros/TablaRegistros.js +5485 -3869
  47. package/dist/tables/tabla-registros/buscador/Buscador.js +4 -4
  48. package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +32 -0
  49. package/dist/tables/tabla-registros/tabla/Tabla.js +5 -5
  50. package/dist/tables.js +0 -2
  51. package/dist/{tables/tabla-registros → ui}/contenido-modal/ContenidoModal.js +2 -2
  52. package/dist/{tables/tabla-registros → ui}/contenido-modal/ContenidoModalv0.1.js +2 -2
  53. package/dist/ui/encabezado/Encabezado.js +1 -1
  54. package/dist/ui/icono-tooltip/IconoTooltip.js +95 -0
  55. package/dist/ui/items-modal/ItemsModal.js +40 -0
  56. package/dist/ui/logo/Logo.js +5 -9
  57. package/dist/ui/paginador/Paginador.js +16 -19
  58. package/dist/ui/subtitulo/Subtitulo.js +14 -24
  59. package/dist/ui/tarjeta/Tarjeta.js +28 -65
  60. package/dist/ui/tarjeta/{tarjeta-agregar/TarjetaAgregar.js → nuevo-elemento/NuevoElemento.js} +9 -8
  61. package/dist/ui/tarjeta/seccion-tarjeta/SeccionTarjeta.js +11 -5
  62. package/dist/ui/tarjeta-info/TarjetaInfo.js +1 -1
  63. package/dist/ui/tarjeta-lectura/TarjetaLectura.js +26 -27
  64. package/dist/ui/tarjeta-lectura/seccion-tarjeta-lectura/SeccionTarjetaLectura.js +10 -6
  65. package/dist/ui.js +20 -18
  66. package/dist/useEventCallback-Bfo0-hwZ.js +16 -0
  67. package/dist/utils/components/ProtectedRoute.js +6 -6
  68. package/dist/utils/components/UserRoute.js +4 -4
  69. package/dist/{warning-b8Ghk8WQ.js → warning-BMiIoRBk.js} +1 -1
  70. package/package.json +15 -16
  71. package/dist/Bootstrap-alDYHlwa.js +0 -19871
  72. package/dist/Button-Gn1tKaoW.js +0 -106
  73. package/dist/TabContext-BvNFEruk.js +0 -138
  74. package/dist/ThemeProvider-DwZMEupk.js +0 -83
  75. package/dist/lib/tables/tabla-registros/icono-tabla/IconoTabla.d.ts +0 -14
  76. package/dist/lib/ui/tarjeta/tarjeta-agregar/TarjetaAgregar.d.ts +0 -9
  77. package/dist/logo_escudo_blanco-DaOI8SGq.js +0 -4
  78. package/dist/tables/tabla-registros/encabezado/EncabezadoTabla.js +0 -30
  79. package/dist/tables/tabla-registros/icono-tabla/IconoTabla.js +0 -68
  80. package/dist/ui/tarjeta-listado/TarjetaListado.js +0 -40
  81. /package/dist/assets/{IconoTabla.css → IconoTooltip.css} +0 -0
  82. /package/dist/assets/{TarjetaListado.css → ItemsModal.css} +0 -0
  83. /package/dist/lib/shared/{ventana-tabs → tab-ventana}/TabVentana.d.ts +0 -0
  84. /package/dist/lib/{tables/tabla-registros → ui}/contenido-modal/ContenidoModal.d.ts +0 -0
  85. /package/dist/lib/{tables/tabla-registros → ui}/contenido-modal/ContenidoModalv0.1.d.ts +0 -0
@@ -1,26 +1,25 @@
1
1
  import { jsxs as t, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import { useState as u, useRef as f, useEffect as h } from "react";
2
+ import { useState as f, useRef as u, useEffect as h } from "react";
3
3
  import '../../assets/Paginador.css';/* empty css */
4
- import { C as p } from "../../Card-aTqC9rSK.js";
5
- import { B as c } from "../../Button-Gn1tKaoW.js";
6
- const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
7
- const [r, l] = u(0), n = f(null);
4
+ import { C as p } from "../../Card-BXqmurzN.js";
5
+ import { B as c } from "../../Button-DMwpnJlD.js";
6
+ const b = ({ stepContent: a, onSubmit: s, canJump: o = !0 }) => {
7
+ const [r, l] = f(0), n = u(null);
8
8
  return h(() => {
9
- n.current && n.current.scrollIntoView({
10
- behavior: "smooth",
11
- block: "start"
9
+ n.current && r > 0 && n.current.scrollIntoView({
10
+ behavior: "smooth"
12
11
  });
13
12
  }, [r]), /* @__PURE__ */ t(m, { children: [
14
- /* @__PURE__ */ e(p, { ref: n, className: "border-0 paginador-card", children: /* @__PURE__ */ e("ul", { id: "progressbar", children: a.map((o, i) => /* @__PURE__ */ t(
13
+ /* @__PURE__ */ e(p, { ref: n, className: "border-0 paginador-card", children: /* @__PURE__ */ e("ul", { id: "progressbar", children: a.map((d, i) => /* @__PURE__ */ t(
15
14
  "li",
16
15
  {
17
16
  className: i <= r ? "active" : "",
18
17
  onClick: () => {
19
- s ? s && l(i) : (i === r + 1 || i < r) && l(i);
18
+ o ? o && l(i) : (i === r + 1 || i < r) && l(i);
20
19
  },
21
20
  children: [
22
- /* @__PURE__ */ e("div", { className: `step ${i <= r ? "active" : ""}`, children: /* @__PURE__ */ e(o.icon, {}) }),
23
- /* @__PURE__ */ e("strong", { children: o.label })
21
+ /* @__PURE__ */ e("div", { className: `step ${i <= r ? "active" : ""}`, children: /* @__PURE__ */ e(d.icon, { size: 18 }) }),
22
+ /* @__PURE__ */ e("strong", { children: d.label })
24
23
  ]
25
24
  },
26
25
  i
@@ -32,9 +31,6 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
32
31
  {
33
32
  variant: "unp_secondary",
34
33
  onClick: () => l(r - 1),
35
- style: {
36
- marginRight: "1rem"
37
- },
38
34
  children: "Anterior"
39
35
  }
40
36
  ),
@@ -42,19 +38,20 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
42
38
  c,
43
39
  {
44
40
  variant: "unp_primary",
45
- style: { justifySelf: "end" },
41
+ style: { justifySelf: "end", marginLeft: "1rem" },
46
42
  onClick: () => {
47
43
  a[r].handleNextClick && a[r].handleNextClick(), l(r + 1);
48
44
  },
49
45
  children: "Siguiente"
50
46
  }
51
47
  ),
52
- r === a.length - 1 && /* @__PURE__ */ e(
48
+ r === a.length - 1 && s && /* @__PURE__ */ e(
53
49
  c,
54
50
  {
55
51
  type: "submit",
56
52
  variant: "unp_send",
57
- onClick: d,
53
+ onClick: s,
54
+ style: { marginLeft: "1rem" },
58
55
  children: "Enviar"
59
56
  }
60
57
  )
@@ -62,5 +59,5 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
62
59
  ] });
63
60
  };
64
61
  export {
65
- N as Paginador
62
+ b as Paginador
66
63
  };
@@ -1,26 +1,16 @@
1
- import { jsx as t, Fragment as n, jsxs as r } from "react/jsx-runtime";
2
- const i = {
3
- display: "flex",
4
- justifyContent: "start",
5
- alignItems: "center",
6
- marginTop: "1.2rem",
7
- marginBottom: "0.9rem"
8
- }, l = {
9
- fontColor: "#303d50s",
10
- fontSize: "1.1rem",
11
- fontWeight: "700",
12
- marginLeft: "0.66rem",
13
- color: "#303d50"
14
- }, s = {
15
- fontSize: "1.25rem",
16
- color: "#303d50"
17
- }, c = ({
18
- subtitulo: e,
19
- icon: o
20
- }) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ r("div", { style: i, children: [
21
- /* @__PURE__ */ t(o, { style: s }),
22
- /* @__PURE__ */ t("span", { style: l, children: e })
23
- ] }) });
1
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
+ import '../../assets/Subtitulo.css';const o = ({
3
+ subtitle: l,
4
+ icon: t,
5
+ extraInput: e
6
+ }) => /* @__PURE__ */ s("div", { className: "subtitulo-contenedor-fila", children: [
7
+ /* @__PURE__ */ s("div", { className: "subtitulo-contenedor-icon-subtitle", children: [
8
+ t && /* @__PURE__ */ i(t, { className: "subtitulo-icon" }),
9
+ /* @__PURE__ */ i("span", { className: "subtitulo-subtitle", children: l })
10
+ ] }),
11
+ e
12
+ ] });
13
+ o.displayName = "Subtitulo";
24
14
  export {
25
- c as Subtitulo
15
+ o as Subtitulo
26
16
  };
@@ -1,69 +1,32 @@
1
- import { jsx as e, jsxs as m, Fragment as j } from "react/jsx-runtime";
1
+ import { jsxs as l, Fragment as u, jsx as r } from "react/jsx-runtime";
2
+ import e from "react";
2
3
  import '../../assets/Tarjeta.css';/* empty css */
3
- import { SeccionTarjeta as b } from "./seccion-tarjeta/SeccionTarjeta.js";
4
- import { C as N, a as g } from "../../Card-aTqC9rSK.js";
5
- import { C as w } from "../../CardBody-B9vvCH8g.js";
6
- import { u as C, a as E, b as T, c as $ } from "../../ThemeProvider-DwZMEupk.js";
7
- import * as v from "react";
8
- import { B as p } from "../../Button-Gn1tKaoW.js";
9
- const d = /* @__PURE__ */ v.forwardRef(({
10
- bsPrefix: c,
11
- className: r,
12
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
13
- as: t = "div",
14
- ...a
15
- }, l) => {
16
- const s = C(c, "row"), x = E(), h = T(), y = `${s}-cols`, f = [];
17
- return x.forEach((o) => {
18
- const n = a[o];
19
- delete a[o];
20
- let i;
21
- n != null && typeof n == "object" ? {
22
- cols: i
23
- } = n : i = n;
24
- const B = o !== h ? `-${o}` : "";
25
- i != null && f.push(`${y}${B}-${i}`);
26
- }), /* @__PURE__ */ e(t, {
27
- ref: l,
28
- ...a,
29
- className: $(r, s, ...f)
30
- });
31
- });
32
- d.displayName = "Row";
33
- const u = {
34
- color: "#f3f3f3",
35
- backgroundColor: "#38a729",
36
- borderColor: "#33a024",
37
- marginTop: "20px",
38
- marginBottom: "15px",
4
+ import { C as f, a as C } from "../../Card-BXqmurzN.js";
5
+ import { C as j } from "../../CardBody-RoDe1y90.js";
6
+ import { B as S } from "../../Button-DMwpnJlD.js";
7
+ const b = {
8
+ marginBottom: "20px",
39
9
  width: "100px"
40
- }, H = ({
41
- title: c,
42
- children: r,
43
- method: t = "GET",
44
- validated: a = !1,
45
- onSubmit: l = () => {
46
- },
47
- hasBody: s = !0
48
- }) => /* @__PURE__ */ m(N, { className: "border-0 mb-4 tarjeta-unp", children: [
49
- /* @__PURE__ */ e(g, { className: "d-flex justify-content-between align-items-center bg-unp text-light py-3 tarjeta-header-unp", children: c }),
50
- /* @__PURE__ */ e(
51
- "form",
52
- {
53
- method: t,
54
- onSubmit: l,
55
- noValidate: !0,
56
- className: a ? "was-validated" : "",
57
- children: s ? /* @__PURE__ */ m(w, { className: "pt-0", children: [
58
- r,
59
- t !== "GET" && /* @__PURE__ */ e(d, { className: "d-flex justify-content-end me-0", children: /* @__PURE__ */ e(p, { style: u, type: "submit", children: "Enviar" }) })
60
- ] }) : /* @__PURE__ */ m(j, { children: [
61
- r,
62
- t !== "GET" && /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(d, { className: "d-flex justify-content-end me-0", children: /* @__PURE__ */ e(p, { style: u, type: "submit", children: "Enviar" }) }) })
63
- ] })
64
- }
65
- )
66
- ] });
10
+ }, B = ({
11
+ title: p,
12
+ children: s,
13
+ method: n,
14
+ onSubmit: m
15
+ }) => {
16
+ const a = e.Children.toArray(s), c = a[0] && e.isValidElement(a[0]) && a[0].type.displayName === "Subtitulo", i = a.filter(
17
+ (t) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta"
18
+ ), d = i.length > 0, y = e.Children.map(s, (t, o) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta" ? e.cloneElement(t, {
19
+ isGray: t.props.isGray ?? o % 2 === 1,
20
+ isLast: t.props.isLast ?? o === i.length - 1
21
+ }) : t);
22
+ return /* @__PURE__ */ l(u, { children: [
23
+ /* @__PURE__ */ l(f, { className: "border-0 mb-4 tarjeta-unp", children: [
24
+ /* @__PURE__ */ r(C, { className: "d-flex justify-content-between align-items-center bg-unp text-light py-3 tarjeta-header-unp", children: p }),
25
+ d ? y : /* @__PURE__ */ r(j, { className: `${c ? "pt-0" : ""}`, children: s })
26
+ ] }),
27
+ n === "POST" || n === "post" && /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "end" }, children: /* @__PURE__ */ r(S, { variant: "unp_send", style: b, onClick: m, children: "Enviar" }) })
28
+ ] });
29
+ };
67
30
  export {
68
- H as Tarjeta
31
+ B as Tarjeta
69
32
  };
@@ -1,26 +1,27 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { b as a } from "../../../index-PYPwtOs4.js";
3
- import { B as s } from "../../../Button-Gn1tKaoW.js";
2
+ import { b as s } from "../../../index-DAgOFOds.js";
3
+ import { B as a } from "../../../Button-DMwpnJlD.js";
4
4
  const d = {
5
5
  fontColor: "#303d50s",
6
6
  fontSize: "1.1rem",
7
7
  fontWeight: "700",
8
8
  // marginBottom: '6.66rem',
9
9
  color: "#303d50"
10
- }, p = ({ title: o, children: e, onClose: t, isGray: n = !1 }) => /* @__PURE__ */ i(
10
+ }, p = ({ label: o, children: e, onClose: t, isGray: n = !1 }) => /* @__PURE__ */ i(
11
11
  "div",
12
12
  {
13
- className: "border border-gray-300 rounded-3",
13
+ className: "border border-gray-300",
14
14
  style: {
15
15
  position: "relative",
16
16
  padding: "1rem",
17
17
  marginTop: "0.5rem",
18
18
  marginBottom: "0.5rem",
19
- background: n ? "#f7f7f7" : "#ffffff"
19
+ background: n ? "#f7f7f7" : "#ffffff",
20
+ borderRadius: "10px"
20
21
  },
21
22
  children: [
22
23
  /* @__PURE__ */ r(
23
- s,
24
+ a,
24
25
  {
25
26
  variant: "link",
26
27
  onClick: t,
@@ -32,7 +33,7 @@ const d = {
32
33
  background: "transparent",
33
34
  border: "none"
34
35
  },
35
- children: /* @__PURE__ */ r(a, { size: 16, color: "red" })
36
+ children: /* @__PURE__ */ r(s, { size: 16, color: "red" })
36
37
  }
37
38
  ),
38
39
  o && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("span", { style: d, children: o }) }),
@@ -41,5 +42,5 @@ const d = {
41
42
  }
42
43
  );
43
44
  export {
44
- p as TarjetaAgregar
45
+ p as NuevoElemento
45
46
  };
@@ -1,7 +1,13 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import '../../../assets/SeccionTarjeta.css';/* empty css */
3
- import { C as o } from "../../../CardBody-B9vvCH8g.js";
4
- const i = ({ isGray: a = !1, children: t, isLast: r = !1 }) => /* @__PURE__ */ e(o, { className: `${a ? "tarjeta-container-section" : ""} ${r ? "tarjeta-container-last" : ""} tarjeta-container`, children: t });
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import e from "react";
3
+ import { C as l } from "../../../CardBody-RoDe1y90.js";
4
+ import '../../../assets/SeccionTarjeta.css';const n = ({ isGray: r = !1, children: a, isLast: o = !1 }) => {
5
+ const t = e.Children.toArray(a), i = t[0] && e.isValidElement(t[0]) && t[0].type.displayName === "Subtitulo";
6
+ return /* @__PURE__ */ s(l, { className: `${r ? "tarjeta-container-section" : ""}
7
+ ${o ? "tarjeta-container-last" : ""}
8
+ ${i ? "pt-0" : ""}`, children: a });
9
+ };
10
+ n.displayName = "SeccionTarjeta";
5
11
  export {
6
- i as SeccionTarjeta
12
+ n as SeccionTarjeta
7
13
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as s, useRef as m, useEffect as d } from "react";
3
- import { F as j, a as u } from "../../index-PYPwtOs4.js";
3
+ import { F as j, a as u } from "../../index-DAgOFOds.js";
4
4
  import '../../assets/TarjetaInfo.css';/* empty css */
5
5
  const C = ({ icon: r, label: c, show: l = !1, children: h }) => {
6
6
  const [t, o] = s(l), [f, i] = s(0), a = m(null);
@@ -1,48 +1,47 @@
1
- import { jsxs as i, Fragment as t, jsx as e } from "react/jsx-runtime";
2
- import { useState as f, useRef as p, useEffect as v } from "react";
1
+ import { jsxs as i, Fragment as l, jsx as e } from "react/jsx-runtime";
2
+ import { useState as v, useRef as d, useEffect as y } from "react";
3
3
  import '../../assets/TarjetaLectura.css';/* empty css */
4
- import { Logo as y } from "../logo/Logo.js";
5
- import { SeccionTarjetaLectura as _ } from "./seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
6
- import { B as d } from "../../Button-Gn1tKaoW.js";
7
- const k = ({ title: h, subtitle: m, headerContent: u, stepContent: n, children: o }) => {
8
- const [r, c] = f(0), l = p(null);
9
- return v(() => {
10
- l.current && l.current.scrollIntoView({
11
- behavior: "smooth",
12
- block: "start"
4
+ import { Logo as _ } from "../logo/Logo.js";
5
+ import { SeccionTarjetaLectura as g } from "./seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
6
+ import { B as h } from "../../Button-DMwpnJlD.js";
7
+ const k = ({ title: m, subtitle: u, headerContent: f, stepContent: n, children: o }) => {
8
+ const [r, t] = v(0), p = d(null), c = d(null);
9
+ return y(() => {
10
+ c.current && r > 0 && c.current.scrollIntoView({
11
+ behavior: "smooth"
13
12
  });
14
- }, [r]), /* @__PURE__ */ i(t, { children: [
15
- /* @__PURE__ */ i("form", { className: "form_qy", children: [
13
+ }, [r]), /* @__PURE__ */ i(l, { children: [
14
+ /* @__PURE__ */ i("form", { ref: p, className: "form_qy", children: [
16
15
  /* @__PURE__ */ i("div", { className: "main_title_container_qy", children: [
17
16
  /* @__PURE__ */ i("div", { className: "subtitle_container_qy", children: [
18
- /* @__PURE__ */ e("h3", { children: h }),
19
- /* @__PURE__ */ e("h5", { children: m })
17
+ /* @__PURE__ */ e("h3", { children: m }),
18
+ /* @__PURE__ */ e("h5", { children: u })
20
19
  ] }),
21
- /* @__PURE__ */ e("div", { className: "logo_container_qy", children: /* @__PURE__ */ e(y, { type: "entidad", variant: "unidad", color: "rojo", height: "80px" }) })
20
+ /* @__PURE__ */ e("div", { className: "logo_container_qy", children: /* @__PURE__ */ e(_, { type: "entidad", variant: "unidad", color: "rojo", height: "80px" }) })
22
21
  ] }),
23
- /* @__PURE__ */ e("div", { className: "section_header_container_qy", children: u }),
24
- n ? /* @__PURE__ */ i(t, { children: [
25
- /* @__PURE__ */ e(_, { title: "Secciones", children: /* @__PURE__ */ e("ul", { ref: l, id: "paginador-tarjeta-lectura", children: n.map((s, a) => /* @__PURE__ */ i(
22
+ /* @__PURE__ */ e("div", { className: "section_header_container_qy", children: f }),
23
+ n ? /* @__PURE__ */ i("div", { ref: c, children: [
24
+ /* @__PURE__ */ e(g, { title: "Secciones", children: /* @__PURE__ */ e("ul", { id: "paginador-tarjeta-lectura", children: n.map((s, a) => /* @__PURE__ */ i(
26
25
  "li",
27
26
  {
28
27
  className: a <= r ? "active" : "",
29
- onClick: () => c(a),
28
+ onClick: () => t(a),
30
29
  children: [
31
- /* @__PURE__ */ e("div", { className: `step ${a <= r ? "active" : ""}`, children: /* @__PURE__ */ e(s.icon, {}) }),
30
+ /* @__PURE__ */ e("div", { className: `step ${a <= r ? "active" : ""}`, children: /* @__PURE__ */ e(s.icon, { size: 18 }) }),
32
31
  /* @__PURE__ */ e("strong", { children: s.label })
33
32
  ]
34
33
  },
35
34
  a
36
35
  )) }) }),
37
36
  /* @__PURE__ */ e("div", { children: n[r].content })
38
- ] }) : o && /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("div", { children: o }) })
37
+ ] }) : o && /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { children: o }) })
39
38
  ] }),
40
- n && /* @__PURE__ */ e(t, { children: /* @__PURE__ */ i("div", { className: "paginador-buttons", style: { display: "flex", justifyContent: "end" }, children: [
39
+ n && /* @__PURE__ */ e(l, { children: /* @__PURE__ */ i("div", { className: "paginador-buttons", style: { display: "flex", justifyContent: "end" }, children: [
41
40
  r > 0 && /* @__PURE__ */ e(
42
- d,
41
+ h,
43
42
  {
44
43
  variant: "unp_secondary",
45
- onClick: () => c(r - 1),
44
+ onClick: () => t(r - 1),
46
45
  style: {
47
46
  marginRight: "1rem"
48
47
  },
@@ -50,11 +49,11 @@ const k = ({ title: h, subtitle: m, headerContent: u, stepContent: n, children:
50
49
  }
51
50
  ),
52
51
  r < n.length - 1 && /* @__PURE__ */ e(
53
- d,
52
+ h,
54
53
  {
55
54
  variant: "unp_primary",
56
55
  style: { justifySelf: "end" },
57
- onClick: () => c(r + 1),
56
+ onClick: () => t(r + 1),
58
57
  children: "Siguiente"
59
58
  }
60
59
  )
@@ -1,9 +1,13 @@
1
- import { jsxs as n, Fragment as a, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as m, Fragment as n, jsx as r } from "react/jsx-runtime";
2
+ import i from "react";
2
3
  import '../../../assets/SeccionTarjetaLectura.css';/* empty css */
3
- const t = ({ title: r, children: c }) => /* @__PURE__ */ n(a, { children: [
4
- /* @__PURE__ */ e("div", { className: "section_header_qy", children: /* @__PURE__ */ e("span", { children: r }) }),
5
- /* @__PURE__ */ e("div", { className: "section_container_qy", children: c })
6
- ] });
4
+ const c = ({ title: a, children: t }) => {
5
+ const e = i.Children.toArray(t), s = e[0] && i.isValidElement(e[0]) && e[0].type.displayName === "Subtitulo";
6
+ return /* @__PURE__ */ m(n, { children: [
7
+ /* @__PURE__ */ r("div", { className: "section_header_qy", children: /* @__PURE__ */ r("span", { children: a }) }),
8
+ /* @__PURE__ */ r("div", { style: { padding: `${s ? "0rem" : "1.25rem"} 1.25rem 1.25rem 1.25rem` }, children: t })
9
+ ] });
10
+ };
7
11
  export {
8
- t as SeccionTarjetaLectura
12
+ c as SeccionTarjetaLectura
9
13
  };
package/dist/ui.js CHANGED
@@ -1,28 +1,30 @@
1
1
  import { Encabezado as e } from "./ui/encabezado/Encabezado.js";
2
2
  import { Subtitulo as a } from "./ui/subtitulo/Subtitulo.js";
3
- import { ContenidoModal as m } from "./tables/tabla-registros/contenido-modal/ContenidoModal.js";
3
+ import { ContenidoModal as f } from "./ui/contenido-modal/ContenidoModal.js";
4
4
  import { Tarjeta as x } from "./ui/tarjeta/Tarjeta.js";
5
- import { SeccionTarjeta as j } from "./ui/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
6
- import { TarjetaAgregar as c } from "./ui/tarjeta/tarjeta-agregar/TarjetaAgregar.js";
7
- import { ContenedorTarjeta as i } from "./ui/tarjeta/contenedor-tarjeta/ContenedorTarjeta.js";
5
+ import { SeccionTarjeta as c } from "./ui/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
6
+ import { NuevoElemento as d } from "./ui/tarjeta/nuevo-elemento/NuevoElemento.js";
7
+ import { ContenedorTarjeta as j } from "./ui/tarjeta/contenedor-tarjeta/ContenedorTarjeta.js";
8
8
  import { Paginador as u } from "./ui/paginador/Paginador.js";
9
- import { Logo as S } from "./ui/logo/Logo.js";
10
- import { TarjetaLectura as l } from "./ui/tarjeta-lectura/TarjetaLectura.js";
11
- import { SeccionTarjetaLectura as s } from "./ui/tarjeta-lectura/seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
12
- import { TarjetaListado as A } from "./ui/tarjeta-listado/TarjetaListado.js";
13
- import { TarjetaInfo as I } from "./ui/tarjeta-info/TarjetaInfo.js";
9
+ import { Logo as L } from "./ui/logo/Logo.js";
10
+ import { TarjetaLectura as b } from "./ui/tarjeta-lectura/TarjetaLectura.js";
11
+ import { SeccionTarjetaLectura as C } from "./ui/tarjeta-lectura/seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
12
+ import { ItemsModal as M } from "./ui/items-modal/ItemsModal.js";
13
+ import { TarjetaInfo as v } from "./ui/tarjeta-info/TarjetaInfo.js";
14
+ import { IconoTooltip as N } from "./ui/icono-tooltip/IconoTooltip.js";
14
15
  export {
15
- i as ContenedorTarjeta,
16
- m as ContenidoModal,
16
+ j as ContenedorTarjeta,
17
+ f as ContenidoModal,
17
18
  e as Encabezado,
18
- S as Logo,
19
+ N as IconoTooltip,
20
+ M as ItemsModal,
21
+ L as Logo,
22
+ d as NuevoElemento,
19
23
  u as Paginador,
20
- j as SeccionTarjeta,
21
- s as SeccionTarjetaLectura,
24
+ c as SeccionTarjeta,
25
+ C as SeccionTarjetaLectura,
22
26
  a as Subtitulo,
23
27
  x as Tarjeta,
24
- c as TarjetaAgregar,
25
- I as TarjetaInfo,
26
- l as TarjetaLectura,
27
- A as TarjetaListado
28
+ v as TarjetaInfo,
29
+ b as TarjetaLectura
28
30
  };
@@ -0,0 +1,16 @@
1
+ import { useRef as n, useEffect as u, useCallback as c } from "react";
2
+ function f(r) {
3
+ const e = n(r);
4
+ return u(() => {
5
+ e.current = r;
6
+ }, [r]), e;
7
+ }
8
+ function s(r) {
9
+ const e = f(r);
10
+ return c(function(...t) {
11
+ return e.current && e.current(...t);
12
+ }, [e]);
13
+ }
14
+ export {
15
+ s as u
16
+ };
@@ -1,21 +1,21 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { u as d, N as r, O as p } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
3
- import { useAuthId as f } from "../../auth/hooks/AuthHook.js";
4
- import { j as h } from "../../index-CuHybtft.js";
2
+ import { useAuthId as d } from "../../auth/hooks/AuthHook.js";
3
+ import { j as p } from "../../index-CuHybtft.js";
4
+ import { u as f, N as r, O as h } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
5
5
  const T = () => {
6
- const { authToken: c, userToken: n } = f(), i = d(), a = n || localStorage.getItem("user_token");
6
+ const { authToken: c, userToken: n } = d(), i = f(), a = n || localStorage.getItem("user_token");
7
7
  if (!(c || localStorage.getItem("access_token")) || !a)
8
8
  return /* @__PURE__ */ e(r, { to: "/", replace: !0 });
9
9
  let s;
10
10
  try {
11
- s = h(a);
11
+ s = p(a);
12
12
  } catch (t) {
13
13
  return console.error("Error decoding token:", t), /* @__PURE__ */ e(r, { to: "/", replace: !0 });
14
14
  }
15
15
  const u = s.access_url, o = i.pathname, l = u.map(
16
16
  (t) => t.startsWith("/") ? t : `/${t}`
17
17
  ), m = o.startsWith("/") ? o : `/${o}`;
18
- return l.includes(m) ? /* @__PURE__ */ e(p, {}) : /* @__PURE__ */ e(r, { to: "/sistema/pagina-no-permitida", replace: !0 });
18
+ return l.includes(m) ? /* @__PURE__ */ e(h, {}) : /* @__PURE__ */ e(r, { to: "/sistema/pagina-no-permitida", replace: !0 });
19
19
  };
20
20
  export {
21
21
  T as ProtectedRoute
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { N as a, O as s } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
3
- import { useAuthId as n } from "../../auth/hooks/AuthHook.js";
2
+ import { useAuthId as a } from "../../auth/hooks/AuthHook.js";
3
+ import { N as s, O as n } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
4
4
  const p = () => {
5
- const { authToken: e, userToken: o } = n(), r = o || localStorage.getItem("user_token");
6
- return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(a, { to: "/sistema/pagina-no-permitida", replace: !0 }) : /* @__PURE__ */ t(s, {});
5
+ const { authToken: e, userToken: o } = a(), r = o || localStorage.getItem("user_token");
6
+ return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(s, { to: "/sistema/pagina-no-permitida", replace: !0 }) : /* @__PURE__ */ t(n, {});
7
7
  };
8
8
  export {
9
9
  p as UserRoute
@@ -1,4 +1,4 @@
1
- import { g as v } from "./ThemeProvider-DwZMEupk.js";
1
+ import { g as v } from "./ThemeProvider-CFCmmLJC.js";
2
2
  var t, g;
3
3
  function w() {
4
4
  if (g) return t;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "0.8.1",
5
+ "version": "0.9.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
@@ -52,30 +52,29 @@
52
52
  "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
53
53
  },
54
54
  "peerDependencies": {
55
- "react": "^18.3.1",
56
- "react-dom": "^18.3.1"
55
+ "react": "19.0.0",
56
+ "react-dom": "19.0.0"
57
57
  },
58
58
  "dependencies": {
59
59
  "bootstrap": "^5.3.3",
60
60
  "jwt-decode": "^4.0.0",
61
61
  "lottie-react": "^2.4.1",
62
- "react": "^18.3.1",
63
62
  "react-bootstrap": "^2.10.9",
64
- "react-dom": "^18.3.1",
65
63
  "react-icons": "^5.4.0",
66
- "react-router": "^7.1.5",
67
- "react-toastify": "^11.0.3"
64
+ "react-router-dom": "^7.1.5",
65
+ "react-toastify": "^11.0.3",
66
+ "sweetalert2": "^11.16.1"
68
67
  },
69
68
  "devDependencies": {
70
69
  "@chromatic-com/storybook": "^3.2.4",
71
70
  "@eslint/js": "^9.17.0",
72
- "@storybook/addon-essentials": "^8.5.3",
73
- "@storybook/addon-interactions": "^8.5.3",
74
- "@storybook/addon-onboarding": "^8.5.3",
75
- "@storybook/blocks": "^8.5.3",
76
- "@storybook/react": "^8.5.3",
77
- "@storybook/react-vite": "^8.5.3",
78
- "@storybook/test": "^8.5.3",
71
+ "@storybook/addon-essentials": "^8.5.5",
72
+ "@storybook/addon-interactions": "^8.5.5",
73
+ "@storybook/addon-onboarding": "^8.5.5",
74
+ "@storybook/blocks": "^8.5.5",
75
+ "@storybook/react": "^8.5.5",
76
+ "@storybook/react-vite": "^8.5.5",
77
+ "@storybook/test": "^8.5.5",
79
78
  "@types/node": "^22.10.10",
80
79
  "@types/react": "^18.3.18",
81
80
  "@types/react-dom": "^18.3.5",
@@ -87,10 +86,10 @@
87
86
  "gh-pages": "^6.3.0",
88
87
  "glob": "^11.0.1",
89
88
  "globals": "^15.14.0",
90
- "storybook": "^8.5.3",
89
+ "storybook": "^8.5.5",
91
90
  "typescript": "~5.6.2",
92
91
  "typescript-eslint": "^8.18.2",
93
- "vite": "^6.0.5",
92
+ "vite": "^6.1.0",
94
93
  "vite-plugin-dts": "^4.5.0",
95
94
  "vite-plugin-lib-inject-css": "^2.2.1"
96
95
  },