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
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
|
|
8
|
-
const [n,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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(
|
|
16
|
-
/* @__PURE__ */ e("div", { className: "ventana-lienzo-container", children:
|
|
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
|
-
|
|
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
|
|
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
|
|
5
|
+
import { IconosSistema as H } from "../iconos-sistema/IconosSistema.js";
|
|
7
6
|
import '../../assets/Bootstrap.css';/* empty css */
|
|
8
|
-
import { a as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { S as I, T as
|
|
12
|
-
import { c as
|
|
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
|
|
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
|
|
24
|
-
function
|
|
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
|
|
34
|
-
},
|
|
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:
|
|
38
|
+
activeKey: s,
|
|
40
39
|
role: c,
|
|
41
40
|
onKeyDown: u
|
|
42
|
-
} = n,
|
|
43
|
-
const N =
|
|
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",
|
|
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
|
|
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 =
|
|
50
|
+
const w = T.indexOf(E);
|
|
52
51
|
if (w === -1) return null;
|
|
53
52
|
let g = w + i;
|
|
54
|
-
return 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
|
-
},
|
|
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[
|
|
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(`[${
|
|
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 =
|
|
81
|
+
const U = Z(e, f);
|
|
83
82
|
return /* @__PURE__ */ r(I.Provider, {
|
|
84
83
|
value: h,
|
|
85
|
-
children: /* @__PURE__ */ r(
|
|
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(
|
|
90
|
-
getControlledId: v ||
|
|
91
|
-
getControllerId: x ||
|
|
88
|
+
activeKey: se(s),
|
|
89
|
+
getControlledId: v || A,
|
|
90
|
+
getControllerId: x || A
|
|
92
91
|
},
|
|
93
|
-
children: /* @__PURE__ */ r(a, Object.assign({},
|
|
94
|
-
onKeyDown:
|
|
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
|
|
103
|
-
Item:
|
|
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
|
-
},
|
|
110
|
-
ref:
|
|
111
|
-
className:
|
|
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:
|
|
118
|
+
variant: s,
|
|
120
119
|
fill: c = !1,
|
|
121
120
|
justify: u = !1,
|
|
122
|
-
navbar:
|
|
121
|
+
navbar: o,
|
|
123
122
|
navbarScroll: N,
|
|
124
123
|
className: m,
|
|
125
124
|
activeKey: y,
|
|
126
125
|
...l
|
|
127
|
-
} =
|
|
126
|
+
} = L(n, {
|
|
128
127
|
activeKey: "onSelect"
|
|
129
|
-
}), v =
|
|
128
|
+
}), v = k(t, "nav");
|
|
130
129
|
let x, f, p = !1;
|
|
131
|
-
const h = S(
|
|
132
|
-
return h ? (x = h.bsPrefix, p =
|
|
130
|
+
const h = S(X), K = S(oe);
|
|
131
|
+
return h ? (x = h.bsPrefix, p = o ?? !0) : K && ({
|
|
133
132
|
cardHeaderBsPrefix: f
|
|
134
|
-
} =
|
|
133
|
+
} = K), /* @__PURE__ */ r(de, {
|
|
135
134
|
as: a,
|
|
136
135
|
ref: e,
|
|
137
136
|
activeKey: y,
|
|
138
|
-
className:
|
|
137
|
+
className: B(m, {
|
|
139
138
|
[v]: !p,
|
|
140
139
|
[`${x}-nav`]: p,
|
|
141
140
|
[`${x}-nav-scroll`]: p && N,
|
|
142
|
-
[`${f}-${
|
|
143
|
-
[`${v}-${
|
|
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
|
|
150
|
+
const ue = Object.assign(_, {
|
|
152
151
|
Item: $,
|
|
153
152
|
Link: D
|
|
154
153
|
});
|
|
155
|
-
function
|
|
154
|
+
function fe(n) {
|
|
156
155
|
let e;
|
|
157
|
-
return
|
|
156
|
+
return le(n, (a) => {
|
|
158
157
|
e == null && (e = a.props.eventKey);
|
|
159
158
|
}), e;
|
|
160
159
|
}
|
|
161
|
-
function
|
|
160
|
+
function me(n) {
|
|
162
161
|
const {
|
|
163
162
|
title: e,
|
|
164
163
|
eventKey: a,
|
|
165
164
|
disabled: t,
|
|
166
|
-
tabClassName:
|
|
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:
|
|
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:
|
|
189
|
+
mountOnEnter: s = !1,
|
|
191
190
|
unmountOnExit: c = !1,
|
|
192
191
|
variant: u = "tabs",
|
|
193
|
-
children:
|
|
194
|
-
activeKey: N =
|
|
192
|
+
children: o,
|
|
193
|
+
activeKey: N = fe(o),
|
|
195
194
|
...m
|
|
196
|
-
} =
|
|
195
|
+
} = L(n, {
|
|
197
196
|
activeKey: "onSelect"
|
|
198
197
|
});
|
|
199
|
-
return /* @__PURE__ */ j(
|
|
198
|
+
return /* @__PURE__ */ j(ee, {
|
|
200
199
|
id: e,
|
|
201
200
|
activeKey: N,
|
|
202
201
|
onSelect: a,
|
|
203
|
-
transition:
|
|
204
|
-
mountOnEnter:
|
|
202
|
+
transition: te(t),
|
|
203
|
+
mountOnEnter: s,
|
|
205
204
|
unmountOnExit: c,
|
|
206
|
-
children: [/* @__PURE__ */ r(
|
|
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(
|
|
213
|
-
}), /* @__PURE__ */ r(
|
|
214
|
-
children: P(
|
|
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(
|
|
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
|
|
227
|
-
const [a, t] =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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:
|
|
238
|
-
onSelect: (
|
|
239
|
-
children:
|
|
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
|
-
|
|
244
|
+
Te as VentanaTabs
|
|
246
245
|
};
|