react-ecosistema-unp 1.0.2 → 1.0.6

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 +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}
@@ -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[];
@@ -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,22 +1,22 @@
1
- import { jsx as s, jsxs as d } from "react/jsx-runtime";
2
- import { useState as n, useEffect as f } from "react";
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as n, useEffect as u } from "react";
3
3
  import '../../../assets/Modal.css';/* empty css */
4
4
  const N = ({
5
- show: o,
5
+ show: s,
6
6
  onHide: l,
7
7
  title: c,
8
8
  children: r,
9
9
  closeModalOut: m
10
10
  }) => {
11
- const [a, t] = n(!1), [i, e] = n(!1);
12
- return f(() => {
13
- o ? t(!0) : (e(!0), setTimeout(() => {
14
- t(!1), e(!1);
11
+ const [t, a] = n(!1), [i, e] = n(!1);
12
+ return u(() => {
13
+ s ? a(!0) : (e(!0), setTimeout(() => {
14
+ a(!1), e(!1);
15
15
  }, 200));
16
- }, [o]), /* @__PURE__ */ s(
16
+ }, [s]), /* @__PURE__ */ o(
17
17
  "div",
18
18
  {
19
- className: `modal-overlay ${a ? "show" : ""} ${i ? "hide" : ""}`,
19
+ className: `modal-overlay ${t ? "show" : ""} ${i ? "hide" : ""}`,
20
20
  onClick: () => {
21
21
  m && (e(!0), setTimeout(() => {
22
22
  l(), e(!1);
@@ -25,14 +25,14 @@ const N = ({
25
25
  children: /* @__PURE__ */ d(
26
26
  "div",
27
27
  {
28
- className: `modal-container ${a ? "show" : ""} ${i ? "hide" : ""}`,
28
+ className: `modal-container ${t ? "show" : ""} ${i ? "hide" : ""}`,
29
29
  onClick: (h) => h.stopPropagation(),
30
30
  children: [
31
31
  /* @__PURE__ */ d("div", { className: "modal_header", children: [
32
- /* @__PURE__ */ s("span", { children: c }),
33
- /* @__PURE__ */ s("button", { className: "close_button", onClick: l, children: "×" })
32
+ /* @__PURE__ */ o("span", { children: c }),
33
+ /* @__PURE__ */ o("button", { className: "close_button", onClick: l, type: "button", children: "×" })
34
34
  ] }),
35
- /* @__PURE__ */ s("div", { className: "modal_body", children: r })
35
+ /* @__PURE__ */ o("div", { className: "modal_body", children: r })
36
36
  ]
37
37
  }
38
38
  )
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.2",
5
+ "version": "1.0.6",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {