react-ecosistema-unp 1.7.19 → 1.7.20

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,45 +1,48 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { useState as r, useRef as d, useEffect as u } from "react";
3
- import { o as j, p } from "../../index-DDjnZyBf.js";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { useState as c, useRef as u, useEffect as j } from "react";
3
+ import { o as p, p as N } from "../../index-DDjnZyBf.js";
4
4
  import '../../assets/UnpHistorico.css';/* empty css */
5
- const x = ({ icon: c, label: l, show: h = !1, children: o }) => {
6
- const [e, i] = r(h), [f, s] = r(0), a = d(null);
7
- return u(() => {
8
- if (!a.current) return;
9
- const m = a.current;
5
+ const b = ({ icon: l, label: h, show: f = !1, children: o, extraItem: i }) => {
6
+ const [e, s] = c(f), [m, r] = c(0), n = u(null);
7
+ return j(() => {
8
+ if (!n.current) return;
9
+ const d = n.current;
10
10
  (() => {
11
- s(e ? m.scrollHeight : 0);
11
+ r(e ? d.scrollHeight : 0);
12
12
  })();
13
- }, [e, o]), /* @__PURE__ */ n("div", { className: "tarjeta-info-container", children: [
14
- /* @__PURE__ */ n("div", { className: "tarjeta-info-titulo-container", children: [
15
- /* @__PURE__ */ n("div", { className: "tarjeta-info-label-container", children: [
16
- /* @__PURE__ */ t(c, { className: "tarjeta-info-icon" }),
17
- /* @__PURE__ */ t("span", { children: l })
13
+ }, [e, o]), /* @__PURE__ */ a("div", { className: "tarjeta-info-container", children: [
14
+ /* @__PURE__ */ a("div", { className: "tarjeta-info-titulo-container", children: [
15
+ /* @__PURE__ */ a("div", { className: "tarjeta-info-label-container", children: [
16
+ /* @__PURE__ */ t(l, { className: "tarjeta-info-icon" }),
17
+ /* @__PURE__ */ t("span", { children: h })
18
18
  ] }),
19
- /* @__PURE__ */ t("div", { className: "tarjeta-info-show-container", children: e ? /* @__PURE__ */ t(
20
- j,
21
- {
22
- className: "tarjeta-info-show-button",
23
- onClick: () => i(!e)
24
- }
25
- ) : /* @__PURE__ */ t(
26
- p,
27
- {
28
- className: "tarjeta-info-show-button",
29
- onClick: () => i(!e)
30
- }
31
- ) })
19
+ /* @__PURE__ */ a("div", { className: "tarjeta-info-show-container", children: [
20
+ i && i,
21
+ e ? /* @__PURE__ */ t(
22
+ p,
23
+ {
24
+ className: "tarjeta-info-show-button",
25
+ onClick: () => s(!e)
26
+ }
27
+ ) : /* @__PURE__ */ t(
28
+ N,
29
+ {
30
+ className: "tarjeta-info-show-button",
31
+ onClick: () => s(!e)
32
+ }
33
+ )
34
+ ] })
32
35
  ] }),
33
36
  /* @__PURE__ */ t(
34
37
  "div",
35
38
  {
36
39
  className: "tarjeta-info-children-container",
37
- style: { height: `${f}px` },
38
- children: /* @__PURE__ */ t("div", { className: "tarjeta-info-content", ref: a, children: o })
40
+ style: { height: `${m}px` },
41
+ children: /* @__PURE__ */ t("div", { className: "tarjeta-info-content", ref: n, children: o })
39
42
  }
40
43
  )
41
44
  ] });
42
45
  };
43
46
  export {
44
- x as TarjetaInfo
47
+ b as TarjetaInfo
45
48
  };
@@ -5,6 +5,7 @@ interface TarjetaInfoProps {
5
5
  label: string;
6
6
  children: React.ReactNode;
7
7
  show?: boolean;
8
+ extraItem?: React.ReactNode;
8
9
  }
9
10
  declare const TarjetaInfo: React.FC<TarjetaInfoProps>;
10
11
  export { TarjetaInfo };
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.7.19",
5
+ "version": "1.7.20",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {