react-ecosistema-unp 0.9.15 → 0.9.16-pre-release

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,22 +1,21 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import s from "react";
3
- import { BrowserRouter as i } from "react-router-dom";
4
- import { IconosSistema as l } from "../iconos-sistema/IconosSistema.js";
5
- import { BreadcrumbNav as c } from "../breadcrumb/Breadcrumb.js";
2
+ import a from "react";
3
+ import { IconosSistema as c } from "../iconos-sistema/IconosSistema.js";
4
+ import { BreadcrumbNav as l } from "../breadcrumb/Breadcrumb.js";
6
5
  import { MenuLateral as p } from "../menu-lateral/MenuLateral.js";
7
- import '../../assets/VentanaLienzo.css';const x = ({ children: r, items: t, extraInput: a }) => {
8
- const [n, m] = s.useState(!1);
9
- return /* @__PURE__ */ o(i, { children: [
10
- /* @__PURE__ */ e(l, { elements: a }),
11
- /* @__PURE__ */ e(p, { onToggle: () => {
12
- m(!n);
13
- }, isOpen: n }),
6
+ import '../../assets/VentanaLienzo.css';const h = ({ children: t, items: r, extraInput: m }) => {
7
+ const [n, s] = a.useState(!1), i = () => {
8
+ s(!n);
9
+ };
10
+ return /* @__PURE__ */ o(a.Fragment, { children: [
11
+ /* @__PURE__ */ e(c, { elements: m }),
12
+ /* @__PURE__ */ e(p, { onToggle: i, isOpen: n }),
14
13
  /* @__PURE__ */ e("div", { className: `${n ? "menu-open" : ""}`, children: /* @__PURE__ */ o("div", { className: "main-section", children: [
15
- /* @__PURE__ */ e(c, { items: t }),
16
- /* @__PURE__ */ e("div", { className: "ventana-lienzo-container", children: r })
14
+ /* @__PURE__ */ e(l, { items: r }),
15
+ /* @__PURE__ */ e("div", { className: "ventana-lienzo-container", children: t })
17
16
  ] }) })
18
17
  ] });
19
18
  };
20
19
  export {
21
- x as VentanaLienzo
20
+ h as VentanaLienzo
22
21
  };
@@ -1,27 +1,26 @@
1
1
  import { jsx as r, jsxs as j } from "react/jsx-runtime";
2
2
  import * as b from "react";
3
- import T, { useRef as O, useContext as S, useEffect as M } from "react";
4
- import { BrowserRouter as H } from "react-router-dom";
3
+ import C, { useRef as O, useContext as S, useEffect as M } from "react";
5
4
  import { MenuLateral as F } from "../menu-lateral/MenuLateral.js";
6
- import { IconosSistema as W } from "../iconos-sistema/IconosSistema.js";
5
+ import { IconosSistema as H } from "../iconos-sistema/IconosSistema.js";
7
6
  import '../../assets/Bootstrap.css';/* empty css */
8
- import { a as Y, u as z, b as G, d as J, c as Q, q as X, e as D, f as B, g as Z } from "../../NotificacionUsuario-xD2pyELE.js";
9
- import { u as ee, T as te, g as ne, a as ae, b as re } from "../../TabPane-BvUHIFlv.js";
10
- import { u as L, c as k } from "../../ThemeProvider-CFCmmLJC.js";
11
- import { S as I, T as oe, m as se } from "../../TabContext-CdjYJzMB.js";
12
- import { c as le } from "../../CardHeaderContext-DVw0yHuy.js";
7
+ import { a as W, u as Y, b as z, d as G, c as J, q as Q, e as D, f as L, g as X } from "../../NotificacionUsuario-xD2pyELE.js";
8
+ import { u as Z, T as ee, g as te, a as ne, b as ae } from "../../TabPane-BvUHIFlv.js";
9
+ import { u as k, c as B } from "../../ThemeProvider-CFCmmLJC.js";
10
+ import { S as I, T as re, m as se } from "../../TabContext-CdjYJzMB.js";
11
+ import { c as oe } from "../../CardHeaderContext-DVw0yHuy.js";
13
12
  function P(n, e) {
14
13
  let a = 0;
15
14
  return b.Children.map(n, (t) => /* @__PURE__ */ b.isValidElement(t) ? e(t, a++) : t);
16
15
  }
17
- function ie(n, e) {
16
+ function le(n, e) {
18
17
  let a = 0;
19
18
  b.Children.forEach(n, (t) => {
20
19
  /* @__PURE__ */ b.isValidElement(t) && e(t, a++);
21
20
  });
22
21
  }
23
- const ce = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
24
- function de(n, e) {
22
+ const ie = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
23
+ function ce(n, e) {
25
24
  if (n == null) return {};
26
25
  var a = {};
27
26
  for (var t in n) if ({}.hasOwnProperty.call(n, t)) {
@@ -30,31 +29,31 @@ function de(n, e) {
30
29
  }
31
30
  return a;
32
31
  }
33
- const R = () => {
34
- }, A = J("event-key"), V = /* @__PURE__ */ b.forwardRef((n, e) => {
32
+ const A = () => {
33
+ }, R = G("event-key"), V = /* @__PURE__ */ b.forwardRef((n, e) => {
35
34
  let {
36
35
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
37
36
  as: a = "div",
38
37
  onSelect: t,
39
- activeKey: o,
38
+ activeKey: s,
40
39
  role: c,
41
40
  onKeyDown: u
42
- } = n, s = de(n, ce);
43
- const N = z(), m = O(!1), y = S(I), l = S(oe);
41
+ } = n, o = ce(n, ie);
42
+ const N = Y(), m = O(!1), y = S(I), l = S(re);
44
43
  let v, x;
45
- l && (c = c || "tablist", o = l.activeKey, v = l.getControlledId, x = l.getControllerId);
44
+ l && (c = c || "tablist", s = l.activeKey, v = l.getControlledId, x = l.getControllerId);
46
45
  const f = O(null), p = (i) => {
47
46
  const d = f.current;
48
47
  if (!d) return null;
49
- const K = X(d, `[${A}]:not([aria-disabled=true])`), E = d.querySelector("[aria-selected=true]");
48
+ const T = Q(d, `[${R}]:not([aria-disabled=true])`), E = d.querySelector("[aria-selected=true]");
50
49
  if (!E || E !== document.activeElement) return null;
51
- const w = K.indexOf(E);
50
+ const w = T.indexOf(E);
52
51
  if (w === -1) return null;
53
52
  let g = w + i;
54
- return g >= K.length && (g = 0), g < 0 && (g = K.length - 1), K[g];
53
+ return g >= T.length && (g = 0), g < 0 && (g = T.length - 1), T[g];
55
54
  }, h = (i, d) => {
56
55
  i != null && (t == null || t(i, d), y == null || y(i, d));
57
- }, C = (i) => {
56
+ }, K = (i) => {
58
57
  if (u == null || u(i), !l)
59
58
  return;
60
59
  let d;
@@ -70,28 +69,28 @@ const R = () => {
70
69
  default:
71
70
  return;
72
71
  }
73
- d && (i.preventDefault(), h(d.dataset[Q("EventKey")] || null, i), m.current = !0, N());
72
+ d && (i.preventDefault(), h(d.dataset[J("EventKey")] || null, i), m.current = !0, N());
74
73
  };
75
74
  M(() => {
76
75
  if (f.current && m.current) {
77
- const i = f.current.querySelector(`[${A}][aria-selected=true]`);
76
+ const i = f.current.querySelector(`[${R}][aria-selected=true]`);
78
77
  i == null || i.focus();
79
78
  }
80
79
  m.current = !1;
81
80
  });
82
- const U = ee(e, f);
81
+ const U = Z(e, f);
83
82
  return /* @__PURE__ */ r(I.Provider, {
84
83
  value: h,
85
- children: /* @__PURE__ */ r(G.Provider, {
84
+ children: /* @__PURE__ */ r(z.Provider, {
86
85
  value: {
87
86
  role: c,
88
87
  // used by NavLink to determine it's role
89
- activeKey: se(o),
90
- getControlledId: v || R,
91
- getControllerId: x || R
88
+ activeKey: se(s),
89
+ getControlledId: v || A,
90
+ getControllerId: x || A
92
91
  },
93
- children: /* @__PURE__ */ r(a, Object.assign({}, s, {
94
- onKeyDown: C,
92
+ children: /* @__PURE__ */ r(a, Object.assign({}, o, {
93
+ onKeyDown: K,
95
94
  ref: U,
96
95
  role: c
97
96
  }))
@@ -99,16 +98,16 @@ const R = () => {
99
98
  });
100
99
  });
101
100
  V.displayName = "Nav";
102
- const ue = Object.assign(V, {
103
- Item: Y
101
+ const de = Object.assign(V, {
102
+ Item: W
104
103
  }), $ = /* @__PURE__ */ b.forwardRef(({
105
104
  className: n,
106
105
  bsPrefix: e,
107
106
  as: a = "div",
108
107
  ...t
109
- }, o) => (e = L(e, "nav-item"), /* @__PURE__ */ r(a, {
110
- ref: o,
111
- className: k(n, e),
108
+ }, s) => (e = k(e, "nav-item"), /* @__PURE__ */ r(a, {
109
+ ref: s,
110
+ className: B(n, e),
112
111
  ...t
113
112
  })));
114
113
  $.displayName = "NavItem";
@@ -116,31 +115,31 @@ const _ = /* @__PURE__ */ b.forwardRef((n, e) => {
116
115
  const {
117
116
  as: a = "div",
118
117
  bsPrefix: t,
119
- variant: o,
118
+ variant: s,
120
119
  fill: c = !1,
121
120
  justify: u = !1,
122
- navbar: s,
121
+ navbar: o,
123
122
  navbarScroll: N,
124
123
  className: m,
125
124
  activeKey: y,
126
125
  ...l
127
- } = B(n, {
126
+ } = L(n, {
128
127
  activeKey: "onSelect"
129
- }), v = L(t, "nav");
128
+ }), v = k(t, "nav");
130
129
  let x, f, p = !1;
131
- const h = S(Z), C = S(le);
132
- return h ? (x = h.bsPrefix, p = s ?? !0) : C && ({
130
+ const h = S(X), K = S(oe);
131
+ return h ? (x = h.bsPrefix, p = o ?? !0) : K && ({
133
132
  cardHeaderBsPrefix: f
134
- } = C), /* @__PURE__ */ r(ue, {
133
+ } = K), /* @__PURE__ */ r(de, {
135
134
  as: a,
136
135
  ref: e,
137
136
  activeKey: y,
138
- className: k(m, {
137
+ className: B(m, {
139
138
  [v]: !p,
140
139
  [`${x}-nav`]: p,
141
140
  [`${x}-nav-scroll`]: p && N,
142
- [`${f}-${o}`]: !!f,
143
- [`${v}-${o}`]: !!o,
141
+ [`${f}-${s}`]: !!f,
142
+ [`${v}-${s}`]: !!s,
144
143
  [`${v}-fill`]: c,
145
144
  [`${v}-justified`]: u
146
145
  }),
@@ -148,22 +147,22 @@ const _ = /* @__PURE__ */ b.forwardRef((n, e) => {
148
147
  });
149
148
  });
150
149
  _.displayName = "Nav";
151
- const fe = Object.assign(_, {
150
+ const ue = Object.assign(_, {
152
151
  Item: $,
153
152
  Link: D
154
153
  });
155
- function me(n) {
154
+ function fe(n) {
156
155
  let e;
157
- return ie(n, (a) => {
156
+ return le(n, (a) => {
158
157
  e == null && (e = a.props.eventKey);
159
158
  }), e;
160
159
  }
161
- function ve(n) {
160
+ function me(n) {
162
161
  const {
163
162
  title: e,
164
163
  eventKey: a,
165
164
  disabled: t,
166
- tabClassName: o,
165
+ tabClassName: s,
167
166
  tabAttrs: c,
168
167
  id: u
169
168
  } = n.props;
@@ -176,7 +175,7 @@ function ve(n) {
176
175
  eventKey: a,
177
176
  disabled: t,
178
177
  id: u,
179
- className: o,
178
+ className: s,
180
179
  ...c,
181
180
  children: e
182
181
  })
@@ -187,35 +186,35 @@ const q = (n) => {
187
186
  id: e,
188
187
  onSelect: a,
189
188
  transition: t,
190
- mountOnEnter: o = !1,
189
+ mountOnEnter: s = !1,
191
190
  unmountOnExit: c = !1,
192
191
  variant: u = "tabs",
193
- children: s,
194
- activeKey: N = me(s),
192
+ children: o,
193
+ activeKey: N = fe(o),
195
194
  ...m
196
- } = B(n, {
195
+ } = L(n, {
197
196
  activeKey: "onSelect"
198
197
  });
199
- return /* @__PURE__ */ j(te, {
198
+ return /* @__PURE__ */ j(ee, {
200
199
  id: e,
201
200
  activeKey: N,
202
201
  onSelect: a,
203
- transition: ne(t),
204
- mountOnEnter: o,
202
+ transition: te(t),
203
+ mountOnEnter: s,
205
204
  unmountOnExit: c,
206
- children: [/* @__PURE__ */ r(fe, {
205
+ children: [/* @__PURE__ */ r(ue, {
207
206
  id: e,
208
207
  ...m,
209
208
  role: "tablist",
210
209
  as: "ul",
211
210
  variant: u,
212
- children: P(s, ve)
213
- }), /* @__PURE__ */ r(ae, {
214
- children: P(s, (y) => {
211
+ children: P(o, me)
212
+ }), /* @__PURE__ */ r(ne, {
213
+ children: P(o, (y) => {
215
214
  const l = {
216
215
  ...y.props
217
216
  };
218
- return delete l.title, delete l.disabled, delete l.tabClassName, delete l.tabAttrs, /* @__PURE__ */ r(re, {
217
+ return delete l.title, delete l.disabled, delete l.tabClassName, delete l.tabAttrs, /* @__PURE__ */ r(ae, {
219
218
  ...l
220
219
  });
221
220
  })
@@ -223,24 +222,24 @@ const q = (n) => {
223
222
  });
224
223
  };
225
224
  q.displayName = "Tabs";
226
- const Ee = ({ children: n, extraInput: e }) => {
227
- const [a, t] = T.useState(!1), [o, c] = T.useState(void 0);
228
- return /* @__PURE__ */ j(H, { children: [
229
- /* @__PURE__ */ r(W, { elements: e }),
230
- /* @__PURE__ */ r(F, { onToggle: () => {
231
- t(!a);
232
- }, isOpen: a }),
225
+ const Te = ({ children: n, extraInput: e }) => {
226
+ const [a, t] = C.useState(!1), [s, c] = C.useState(void 0), u = () => {
227
+ t(!a);
228
+ };
229
+ return /* @__PURE__ */ j(C.Fragment, { children: [
230
+ /* @__PURE__ */ r(H, { elements: e }),
231
+ /* @__PURE__ */ r(F, { onToggle: u, isOpen: a }),
233
232
  /* @__PURE__ */ r("div", { className: `${a ? "menu-open" : ""}`, children: /* @__PURE__ */ r("div", { className: "main-section", children: /* @__PURE__ */ r(
234
233
  q,
235
234
  {
236
235
  id: "controlled-tab",
237
- activeKey: o,
238
- onSelect: (s) => c(s !== null ? s : void 0),
239
- children: T.Children.map(n, (s) => T.isValidElement(s) ? s : null)
236
+ activeKey: s,
237
+ onSelect: (o) => c(o !== null ? o : void 0),
238
+ children: C.Children.map(n, (o) => C.isValidElement(o) ? o : null)
240
239
  }
241
240
  ) }) })
242
241
  ] });
243
242
  };
244
243
  export {
245
- Ee as VentanaTabs
244
+ Te as VentanaTabs
246
245
  };
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.9.15",
5
+ "version": "0.9.16-pre-release",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {