react-ecosistema-unp 1.0.1 → 1.0.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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  La Librería del Ecosistema de Información es una colección de componentes reutilizables y modulares para crear y gestionar el entorno digital de la Unidad Nacional de Protección. Esta librería proporciona componentes para facilitar la integración de diversas funcionalidades dentro de las aplicaciones del ecosistema.
9
9
 
10
10
 
11
- ### Migración
11
+ #### Migración
12
12
 
13
13
  Todos los proyectos que utilizan la librería [eco-unp](https://www.npmjs.com/package/eco-unp) deben realizar la migración a [react-ecosistema-unp](https://www.npmjs.com/package/react-ecosistema-unp). Para ello deben seguir los siguientes pasos:
14
14
  * Desinstalar eco-unp: ```npm uninstall eco-unp```
@@ -16,18 +16,18 @@ Todos los proyectos que utilizan la librería [eco-unp](https://www.npmjs.com/pa
16
16
  * Instalar la última versión de react-ecosistema-unp: ```npm install react-ecosistema-unp@latest```
17
17
  * Realizar el cambio en las siguientes importaciones:
18
18
  ```tsx
19
- import { AuthProvider } from 'eco-unp/Utils'; -> import { AuthProvider } from 'react-ecosistema-unp/utils';
20
- import { UserRoute, ProtectedRoute } from 'eco-unp/Utils'; -> import { ProtectedRoute, UserRoute } from 'react-ecosistema-unp/utils';
19
+ import { AuthProvider } from 'eco-unp/Utils'; -> import { AuthProvider } from 'react-ecosistema-unp/utils';
20
+ import { UserRoute, ProtectedRoute } from 'eco-unp/Utils'; -> import { ProtectedRoute, UserRoute } from 'react-ecosistema-unp/utils';
21
21
 
22
- import { VentanaLienzo } from 'eco-unp/Ui'; -> import { VentanaLienzo } from 'react-ecosistema-unp/shared';
23
- import { VentanaUsuario } from 'eco-unp/Ui'; -> import { VentanaTabs } from 'react-ecosistema-unp/shared';
24
- import { TabVentana } from 'eco-unp/Ui'; -> import { VentanaTabs } from 'react-ecosistema-unp/shared';
22
+ import { VentanaLienzo } from 'eco-unp/Ui'; -> import { VentanaLienzo } from 'react-ecosistema-unp/shared';
23
+ import { VentanaUsuario } from 'eco-unp/Ui'; -> import { VentanaTabs } from 'react-ecosistema-unp/shared';
24
+ import { TabVentana } from 'eco-unp/Ui'; -> import { VentanaTabs } from 'react-ecosistema-unp/shared';
25
25
 
26
- import { SubtituloForm } from 'eco-unp/Ui'; -> import { Subtitulo } from "react-ecosistema-unp/ui";
26
+ import { SubtituloForm } from 'eco-unp/Ui'; -> import { Subtitulo } from "react-ecosistema-unp/ui";
27
27
 
28
- import { CardForm } from 'eco-unp/Ui'; -> import { Tarjeta } from 'react-ecosistema-unp/cards';
28
+ import { CardForm } from 'eco-unp/Ui'; -> import { Tarjeta } from 'react-ecosistema-unp/cards';
29
29
 
30
- import { BootstrapTable } from 'eco-unp/Tables'; -> import { TablaRegistros } from 'react-ecosistema-unp/tables';
30
+ import { BootstrapTable } from 'eco-unp/Tables'; -> import { TablaRegistros } from 'react-ecosistema-unp/tables';
31
31
  ```
32
32
 
33
33
  > El componente Subtitulo cambia el prop subtitulo a subtitle
@@ -44,9 +44,19 @@ npm install react-ecosistema-unp@latest
44
44
  ```
45
45
 
46
46
 
47
- ## Uso
47
+ ## Documentación
48
+
49
+ *En desarrollo*
48
50
 
49
51
  * [Elementos UI](docs/ui.md)
50
52
  * [Tarjetas](docs/cards.md)
51
53
  * [Tabla y modal](docs/table.md)
52
- * [Utilidades](docs/utils.md)
54
+ * [Utilidades](docs/utils.md)
55
+
56
+ <br>
57
+
58
+ * [Accesibilidad](docs/accessibility.md)
59
+
60
+ <br>
61
+
62
+ * [Estilos]()
@@ -1 +1 @@
1
- .title-container{display:flex;gap:1rem;align-items:center;align-content:center;margin-top:1.75rem;margin-bottom:1.75rem}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
1
+ .title-container{display:flex;gap:1rem;align-items:center;align-content:center}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
@@ -1 +1 @@
1
- .iconos-sistema-container{position:absolute;top:0;right:0;margin-top:6px;display:flex;justify-content:end;gap:1rem}.iconos-sistema-icon{margin-top:.5rem;font-size:25px;color:#303d50;cursor:pointer}
1
+ .iconos-sistema-container{position:absolute;top:0;right:0;margin-top:6px;display:flex;justify-content:end;gap:1rem}.iconos-sistema-icon{margin-top:.5rem;font-size:25px;color:#303d50;cursor:pointer}.icono-sistema-tooltip-container{position:relative;display:inline-block}.icono-sistema-tooltip-text{z-index:9999;visibility:hidden;width:max-content;background-color:#5f6265ef;color:#fff;text-align:center;border-radius:10px;padding:7px 11px;position:absolute;z-index:1000;top:100%;right:0;margin-top:8px;opacity:0;transition:opacity .1s;pointer-events:none;transition:all .1s ease-in-out}.icono-sistema-tooltip-container:hover .icono-sistema-tooltip-text{visibility:visible;opacity:1}
@@ -1 +1 @@
1
- .subtitulo-contenedor-fila{display:flex;justify-content:space-between;align-items:center;margin-top:1.2rem;margin-bottom:.9rem}.subtitulo-contenedor-icon-subtitle{display:flex;justify-content:start;align-items:center}.subtitulo-icon{font-size:1.25rem;color:#303d50;margin-right:.66rem}.subtitulo-subtitle{font-size:1.1rem;font-weight:700;color:#303d50}
1
+ .subtitulo-contenedor-fila{display:flex;justify-content:space-between;align-items:center}.subtitulo-contenedor-icon-subtitle{display:flex;justify-content:start;align-items:center}.subtitulo-icon{font-size:1.25rem;color:#303d50;margin-right:.66rem}.subtitulo-subtitle{font-size:1.1rem;font-weight:700;color:#303d50}
@@ -3,6 +3,7 @@ import { IconType } from 'react-icons';
3
3
  export interface IconoSistema {
4
4
  icon: IconType;
5
5
  action: (...args: any[]) => any;
6
+ label?: string;
6
7
  }
7
8
  interface IconosSistemaProps {
8
9
  elements?: IconoSistema[];
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  interface EncabezadoProps {
3
3
  title?: string;
4
4
  subtitle: string;
5
+ hasMargin?: boolean;
5
6
  }
6
7
  declare const Encabezado: React.FC<EncabezadoProps>;
7
8
  export { Encabezado };
@@ -4,6 +4,7 @@ interface SubtituloProps {
4
4
  subtitle: string;
5
5
  icon?: IconType;
6
6
  extraInput?: React.ReactNode;
7
+ hasMargin?: boolean;
7
8
  }
8
9
  declare const Subtitulo: React.FC<SubtituloProps>;
9
10
  export { Subtitulo };
@@ -1,16 +1,30 @@
1
1
  import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
- import { N as n } from "../../NotificacionUsuario-xD2pyELE.js";
3
- import '../../assets/IconosSistema.css';const m = ({ elements: o }) => /* @__PURE__ */ a("div", { className: "iconos-sistema-container", children: [
4
- o && o.slice(0, 5).map((s, c) => /* @__PURE__ */ i(
5
- s.icon,
2
+ import { N as r } from "../../NotificacionUsuario-xD2pyELE.js";
3
+ import '../../assets/IconosSistema.css';const l = ({ elements: s }) => /* @__PURE__ */ a("div", { className: "iconos-sistema-container", children: [
4
+ s && s.slice(0, 5).map((o, c) => /* @__PURE__ */ a("div", { className: "icono-sistema-tooltip-container", children: [
5
+ /* @__PURE__ */ i(
6
+ o.icon,
7
+ {
8
+ className: "iconos-sistema-icon",
9
+ onClick: o.action
10
+ },
11
+ c
12
+ ),
13
+ o.label && /* @__PURE__ */ i("span", { className: "icono-sistema-tooltip-text", children: o.label })
14
+ ] })),
15
+ s && /* @__PURE__ */ i(
16
+ "div",
6
17
  {
7
- className: "iconos-sistema-icon",
8
- onClick: s.action
9
- },
10
- c
11
- )),
12
- /* @__PURE__ */ i("div", { style: { marginLeft: "1rem" }, children: /* @__PURE__ */ i(n, {}) })
18
+ style: {
19
+ border: "1px #ebebeb solid",
20
+ marginTop: "9px",
21
+ marginBottom: "2px",
22
+ borderRadius: "10px"
23
+ }
24
+ }
25
+ ),
26
+ /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(r, {}) })
13
27
  ] });
14
28
  export {
15
- m as IconosSistema
29
+ l as IconosSistema
16
30
  };
@@ -1,15 +1,29 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { Logo as s } from "../logo/Logo.js";
3
- import '../../assets/Encabezado.css';const r = ({ title: a = "", subtitle: n = "" }) => /* @__PURE__ */ i("div", { className: "title-container", children: [
4
- /* @__PURE__ */ i("div", { className: "logo-subtitle-container", children: [
5
- /* @__PURE__ */ e("div", { className: "red-section" }),
6
- /* @__PURE__ */ e(s, { type: "entidad", variant: "unp", color: "gris", height: "62" })
7
- ] }),
8
- /* @__PURE__ */ i("div", { className: "subtitle-container", children: [
9
- /* @__PURE__ */ e("span", { className: "title", children: a || "Unidad Nacional de Protección" }),
10
- /* @__PURE__ */ e("span", { className: "subtitle", children: n })
11
- ] })
12
- ] });
2
+ import { Logo as r } from "../logo/Logo.js";
3
+ import '../../assets/Encabezado.css';const c = ({
4
+ title: t = "",
5
+ subtitle: n = "",
6
+ hasMargin: a = !0
7
+ }) => /* @__PURE__ */ i(
8
+ "div",
9
+ {
10
+ className: "title-container",
11
+ style: {
12
+ marginTop: a ? "1.75rem" : "",
13
+ marginBottom: a ? "1.75rem" : ""
14
+ },
15
+ children: [
16
+ /* @__PURE__ */ i("div", { className: "logo-subtitle-container", children: [
17
+ /* @__PURE__ */ e("div", { className: "red-section" }),
18
+ /* @__PURE__ */ e(r, { type: "entidad", variant: "unp", color: "gris", height: "62" })
19
+ ] }),
20
+ /* @__PURE__ */ i("div", { className: "subtitle-container", children: [
21
+ /* @__PURE__ */ e("span", { className: "title", children: t || "Unidad Nacional de Protección" }),
22
+ /* @__PURE__ */ e("span", { className: "subtitle", children: n })
23
+ ] })
24
+ ]
25
+ }
26
+ );
13
27
  export {
14
- r as Encabezado
28
+ c as Encabezado
15
29
  };
@@ -1,16 +1,27 @@
1
- import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
- import '../../assets/Subtitulo.css';const o = ({
3
- subtitle: l,
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import '../../assets/Subtitulo.css';const u = ({
3
+ subtitle: o,
4
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";
5
+ extraInput: l,
6
+ hasMargin: e = !0
7
+ }) => /* @__PURE__ */ i(
8
+ "div",
9
+ {
10
+ className: "subtitulo-contenedor-fila",
11
+ style: {
12
+ marginTop: e ? "1.2rem" : "",
13
+ marginBottom: e ? "0.9rem" : ""
14
+ },
15
+ children: [
16
+ /* @__PURE__ */ i("div", { className: "subtitulo-contenedor-icon-subtitle", children: [
17
+ t && /* @__PURE__ */ s(t, { className: "subtitulo-icon" }),
18
+ /* @__PURE__ */ s("span", { className: "subtitulo-subtitle", children: o })
19
+ ] }),
20
+ l
21
+ ]
22
+ }
23
+ );
24
+ u.displayName = "Subtitulo";
14
25
  export {
15
- o as Subtitulo
26
+ u as Subtitulo
16
27
  };
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": "1.0.1",
5
+ "version": "1.0.4",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {