react-ecosistema-unp 1.2.6 → 1.2.7

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,76 +1,93 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as c, jsxs as x } from "react/jsx-runtime";
2
+ import { useNavigate as g } from "react-router-dom";
2
3
  import { u as o, c as u } from "../../ThemeProvider-Bs1j1Nwi.js";
3
4
  import * as b from "react";
4
- import { A as x } from "../../Anchor-D8f6vg0T.js";
5
+ import { A as k } from "../../Anchor-D8f6vg0T.js";
5
6
  import '../../assets/Breadcrumb.css';const i = /* @__PURE__ */ b.forwardRef(({
6
- bsPrefix: c,
7
- active: r = !1,
8
- children: e,
7
+ bsPrefix: e,
8
+ active: a = !1,
9
+ children: r,
9
10
  className: n,
10
11
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
11
12
  as: s = "li",
12
- linkAs: d = x,
13
+ linkAs: l = k,
13
14
  linkProps: m = {},
14
- href: l,
15
+ href: d,
15
16
  title: t,
16
17
  target: p,
17
- ...h
18
- }, N) => {
19
- const B = o(c, "breadcrumb-item");
20
- return /* @__PURE__ */ a(s, {
21
- ref: N,
22
- ...h,
18
+ ...N
19
+ }, h) => {
20
+ const B = o(e, "breadcrumb-item");
21
+ return /* @__PURE__ */ c(s, {
22
+ ref: h,
23
+ ...N,
23
24
  className: u(B, n, {
24
- active: r
25
+ active: a
25
26
  }),
26
- "aria-current": r ? "page" : void 0,
27
- children: r ? e : /* @__PURE__ */ a(d, {
27
+ "aria-current": a ? "page" : void 0,
28
+ children: a ? r : /* @__PURE__ */ c(l, {
28
29
  ...m,
29
- href: l,
30
+ href: d,
30
31
  title: t,
31
32
  target: p,
32
- children: e
33
+ children: r
33
34
  })
34
35
  });
35
36
  });
36
37
  i.displayName = "BreadcrumbItem";
37
38
  const f = /* @__PURE__ */ b.forwardRef(({
38
- bsPrefix: c,
39
- className: r,
40
- listProps: e = {},
39
+ bsPrefix: e,
40
+ className: a,
41
+ listProps: r = {},
41
42
  children: n,
42
43
  label: s = "breadcrumb",
43
44
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
44
- as: d = "nav",
45
+ as: l = "nav",
45
46
  ...m
46
- }, l) => {
47
- const t = o(c, "breadcrumb");
48
- return /* @__PURE__ */ a(d, {
47
+ }, d) => {
48
+ const t = o(e, "breadcrumb");
49
+ return /* @__PURE__ */ c(l, {
49
50
  "aria-label": s,
50
- className: r,
51
- ref: l,
51
+ className: a,
52
+ ref: d,
52
53
  ...m,
53
- children: /* @__PURE__ */ a("ol", {
54
- ...e,
55
- className: u(t, e == null ? void 0 : e.className),
54
+ children: /* @__PURE__ */ c("ol", {
55
+ ...r,
56
+ className: u(t, r == null ? void 0 : r.className),
56
57
  children: n
57
58
  })
58
59
  });
59
60
  });
60
61
  f.displayName = "Breadcrumb";
61
- const w = Object.assign(f, {
62
+ const v = Object.assign(f, {
62
63
  Item: i
63
- }), k = ({ items: c }) => /* @__PURE__ */ a("div", { className: "breadcrumb-container", children: /* @__PURE__ */ a(
64
- "div",
65
- {
66
- className: "breadcrumb-wrapper",
67
- style: {
68
- // Ajusta la posición de los elementos si se proporcionan links y hay un input extra
69
- justifyContent: c ? "space-between" : "end"
70
- },
71
- children: c && /* @__PURE__ */ a(w, { children: c.map((r, e) => /* @__PURE__ */ a(i, { href: r.link, active: !r.link, children: r.label }, e)) })
72
- }
73
- ) });
64
+ }), I = ({ items: e }) => {
65
+ const a = g();
66
+ return /* @__PURE__ */ c("div", { className: "breadcrumb-container", children: /* @__PURE__ */ c(
67
+ "div",
68
+ {
69
+ className: "breadcrumb-wrapper",
70
+ style: {
71
+ // Ajusta la posición de los elementos si se proporcionan links y hay un input extra
72
+ justifyContent: e ? "space-between" : "end"
73
+ },
74
+ children: e && /* @__PURE__ */ c(v, { children: e.map((r, n) => /* @__PURE__ */ x(
75
+ i,
76
+ {
77
+ active: !r.link,
78
+ ...r.link && {
79
+ onClick: () => a(r.link)
80
+ },
81
+ children: [
82
+ " ",
83
+ r.label
84
+ ]
85
+ },
86
+ n
87
+ )) })
88
+ }
89
+ ) });
90
+ };
74
91
  export {
75
- k as BreadcrumbNav
92
+ I as BreadcrumbNav
76
93
  };
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.2.6",
5
+ "version": "1.2.7",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {