react-ecosistema-unp 0.2.3 → 0.3.0

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,9 +1,5 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { G as i } from "../../iconBase-LROS5hdG.js";
3
- function o(t) {
4
- return i({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z" }, child: [] }] })(t);
5
- }
6
- const e = () => /* @__PURE__ */ c(o, { style: { width: "25px", height: "25px" } });
1
+ import "react/jsx-runtime";
2
+ import { g as a } from "../../NotificacionUsuario-BAYfK-nd.js";
7
3
  export {
8
- e as default
4
+ a as default
9
5
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { T as i, g as b, a as p, b as T, P as t } from "../../Bootstrap-ByT3_uwe.js";
2
+ import { T as b, g as i, a as p, b as T, P as t } from "../../Bootstrap-nyDWFTXk.js";
3
3
  import "react";
4
- const o = ({
5
- transition: a,
6
- ...n
7
- }) => /* @__PURE__ */ e(i, {
8
- ...n,
9
- transition: b(a)
4
+ import '../../assets/TabVentana.css';const o = ({
5
+ transition: n,
6
+ ...a
7
+ }) => /* @__PURE__ */ e(b, {
8
+ ...a,
9
+ transition: i(n)
10
10
  });
11
11
  o.displayName = "TabContainer";
12
12
  const c = {
@@ -36,10 +36,12 @@ const m = Object.assign(s, {
36
36
  Content: p,
37
37
  Pane: T
38
38
  }), y = ({
39
- eventKey: a,
40
- title: n,
39
+ eventKey: n,
40
+ title: a,
41
41
  children: r
42
- }) => /* @__PURE__ */ e(m, { eventKey: a, title: n, children: r });
42
+ }) => /* @__PURE__ */ e(m, { eventKey: n, title: a, style: {
43
+ border: "50%"
44
+ }, children: r });
43
45
  export {
44
- y as default
46
+ y as TabVentana
45
47
  };
@@ -1,16 +1,15 @@
1
1
  import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
- import s from "react";
3
- import { B as a } from "../../useFinalizarSesion-COlHmXt5.js";
2
+ import t from "react";
4
3
  import { MenuLateral as m } from "./MenuLateral.js";
5
- const d = ({ children: o }) => {
6
- const [e, t] = s.useState(!1);
7
- return /* @__PURE__ */ r(a, { children: [
8
- /* @__PURE__ */ n(m, { onToggle: () => {
9
- t(!e);
10
- }, isOpen: e }),
11
- /* @__PURE__ */ n("div", { className: `${e ? "menu-open" : ""}`, children: /* @__PURE__ */ n("div", { className: "main-section", children: o }) })
4
+ const p = ({ children: a }) => {
5
+ const [e, o] = t.useState(!1), s = () => {
6
+ o(!e);
7
+ };
8
+ return /* @__PURE__ */ r(t.Fragment, { children: [
9
+ /* @__PURE__ */ n(m, { onToggle: s, isOpen: e }),
10
+ /* @__PURE__ */ n("div", { className: `${e ? "menu-open" : ""}`, children: /* @__PURE__ */ n("div", { className: "main-section", style: { padding: "0.5rem" }, children: a }) })
12
11
  ] });
13
12
  };
14
13
  export {
15
- d as VentanaLienzo
14
+ p as VentanaLienzo
16
15
  };
@@ -0,0 +1,243 @@
1
+ import { jsx as r, jsxs as j } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import g, { useRef as O, useContext as E, useEffect as M } from "react";
4
+ import { MenuLateral as F } from "./MenuLateral.js";
5
+ import { N as W, u as Y, a as z, d as G, b as J, q as Q, c as D, e as L, f as X, g as Z } from "../../NotificacionUsuario-BAYfK-nd.js";
6
+ import { u as ee, T as te, g as ne, a as ae, b as re } from "../../Bootstrap-nyDWFTXk.js";
7
+ import { S as P, T as se, m as le, u as k, c as B } from "../../TabContext-C1blj64Y.js";
8
+ const U = /* @__PURE__ */ m.createContext(null);
9
+ U.displayName = "CardHeaderContext";
10
+ function A(n, e) {
11
+ let a = 0;
12
+ return m.Children.map(n, (t) => /* @__PURE__ */ m.isValidElement(t) ? e(t, a++) : t);
13
+ }
14
+ function oe(n, e) {
15
+ let a = 0;
16
+ m.Children.forEach(n, (t) => {
17
+ /* @__PURE__ */ m.isValidElement(t) && e(t, a++);
18
+ });
19
+ }
20
+ const ie = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
21
+ function ce(n, e) {
22
+ if (n == null) return {};
23
+ var a = {};
24
+ for (var t in n) if ({}.hasOwnProperty.call(n, t)) {
25
+ if (e.indexOf(t) >= 0) continue;
26
+ a[t] = n[t];
27
+ }
28
+ return a;
29
+ }
30
+ const I = () => {
31
+ }, R = G("event-key"), V = /* @__PURE__ */ m.forwardRef((n, e) => {
32
+ let {
33
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
34
+ as: a = "div",
35
+ onSelect: t,
36
+ activeKey: s,
37
+ role: c,
38
+ onKeyDown: l
39
+ } = n, u = ce(n, ie);
40
+ const x = Y(), v = O(!1), y = E(P), o = E(se);
41
+ let p, N;
42
+ o && (c = c || "tablist", s = o.activeKey, p = o.getControlledId, N = o.getControllerId);
43
+ const f = O(null), b = (i) => {
44
+ const d = f.current;
45
+ if (!d) return null;
46
+ const T = Q(d, `[${R}]:not([aria-disabled=true])`), S = d.querySelector("[aria-selected=true]");
47
+ if (!S || S !== document.activeElement) return null;
48
+ const w = T.indexOf(S);
49
+ if (w === -1) return null;
50
+ let h = w + i;
51
+ return h >= T.length && (h = 0), h < 0 && (h = T.length - 1), T[h];
52
+ }, C = (i, d) => {
53
+ i != null && (t == null || t(i, d), y == null || y(i, d));
54
+ }, K = (i) => {
55
+ if (l == null || l(i), !o)
56
+ return;
57
+ let d;
58
+ switch (i.key) {
59
+ case "ArrowLeft":
60
+ case "ArrowUp":
61
+ d = b(-1);
62
+ break;
63
+ case "ArrowRight":
64
+ case "ArrowDown":
65
+ d = b(1);
66
+ break;
67
+ default:
68
+ return;
69
+ }
70
+ d && (i.preventDefault(), C(d.dataset[J("EventKey")] || null, i), v.current = !0, x());
71
+ };
72
+ M(() => {
73
+ if (f.current && v.current) {
74
+ const i = f.current.querySelector(`[${R}][aria-selected=true]`);
75
+ i == null || i.focus();
76
+ }
77
+ v.current = !1;
78
+ });
79
+ const H = ee(e, f);
80
+ return /* @__PURE__ */ r(P.Provider, {
81
+ value: C,
82
+ children: /* @__PURE__ */ r(z.Provider, {
83
+ value: {
84
+ role: c,
85
+ // used by NavLink to determine it's role
86
+ activeKey: le(s),
87
+ getControlledId: p || I,
88
+ getControllerId: N || I
89
+ },
90
+ children: /* @__PURE__ */ r(a, Object.assign({}, u, {
91
+ onKeyDown: K,
92
+ ref: H,
93
+ role: c
94
+ }))
95
+ })
96
+ });
97
+ });
98
+ V.displayName = "Nav";
99
+ const de = Object.assign(V, {
100
+ Item: W
101
+ }), $ = /* @__PURE__ */ m.forwardRef(({
102
+ className: n,
103
+ bsPrefix: e,
104
+ as: a = "div",
105
+ ...t
106
+ }, s) => (e = k(e, "nav-item"), /* @__PURE__ */ r(a, {
107
+ ref: s,
108
+ className: B(n, e),
109
+ ...t
110
+ })));
111
+ $.displayName = "NavItem";
112
+ const _ = /* @__PURE__ */ m.forwardRef((n, e) => {
113
+ const {
114
+ as: a = "div",
115
+ bsPrefix: t,
116
+ variant: s,
117
+ fill: c = !1,
118
+ justify: l = !1,
119
+ navbar: u,
120
+ navbarScroll: x,
121
+ className: v,
122
+ activeKey: y,
123
+ ...o
124
+ } = L(n, {
125
+ activeKey: "onSelect"
126
+ }), p = k(t, "nav");
127
+ let N, f, b = !1;
128
+ const C = E(X), K = E(U);
129
+ return C ? (N = C.bsPrefix, b = u ?? !0) : K && ({
130
+ cardHeaderBsPrefix: f
131
+ } = K), /* @__PURE__ */ r(de, {
132
+ as: a,
133
+ ref: e,
134
+ activeKey: y,
135
+ className: B(v, {
136
+ [p]: !b,
137
+ [`${N}-nav`]: b,
138
+ [`${N}-nav-scroll`]: b && x,
139
+ [`${f}-${s}`]: !!f,
140
+ [`${p}-${s}`]: !!s,
141
+ [`${p}-fill`]: c,
142
+ [`${p}-justified`]: l
143
+ }),
144
+ ...o
145
+ });
146
+ });
147
+ _.displayName = "Nav";
148
+ const ue = Object.assign(_, {
149
+ Item: $,
150
+ Link: D
151
+ });
152
+ function fe(n) {
153
+ let e;
154
+ return oe(n, (a) => {
155
+ e == null && (e = a.props.eventKey);
156
+ }), e;
157
+ }
158
+ function me(n) {
159
+ const {
160
+ title: e,
161
+ eventKey: a,
162
+ disabled: t,
163
+ tabClassName: s,
164
+ tabAttrs: c,
165
+ id: l
166
+ } = n.props;
167
+ return e == null ? null : /* @__PURE__ */ r($, {
168
+ as: "li",
169
+ role: "presentation",
170
+ children: /* @__PURE__ */ r(D, {
171
+ as: "button",
172
+ type: "button",
173
+ eventKey: a,
174
+ disabled: t,
175
+ id: l,
176
+ className: s,
177
+ ...c,
178
+ children: e
179
+ })
180
+ });
181
+ }
182
+ const q = (n) => {
183
+ const {
184
+ id: e,
185
+ onSelect: a,
186
+ transition: t,
187
+ mountOnEnter: s = !1,
188
+ unmountOnExit: c = !1,
189
+ variant: l = "tabs",
190
+ children: u,
191
+ activeKey: x = fe(u),
192
+ ...v
193
+ } = L(n, {
194
+ activeKey: "onSelect"
195
+ });
196
+ return /* @__PURE__ */ j(te, {
197
+ id: e,
198
+ activeKey: x,
199
+ onSelect: a,
200
+ transition: ne(t),
201
+ mountOnEnter: s,
202
+ unmountOnExit: c,
203
+ children: [/* @__PURE__ */ r(ue, {
204
+ id: e,
205
+ ...v,
206
+ role: "tablist",
207
+ as: "ul",
208
+ variant: l,
209
+ children: A(u, me)
210
+ }), /* @__PURE__ */ r(ae, {
211
+ children: A(u, (y) => {
212
+ const o = {
213
+ ...y.props
214
+ };
215
+ return delete o.title, delete o.disabled, delete o.tabClassName, delete o.tabAttrs, /* @__PURE__ */ r(re, {
216
+ ...o
217
+ });
218
+ })
219
+ })]
220
+ });
221
+ };
222
+ q.displayName = "Tabs";
223
+ const Ce = ({ children: n }) => {
224
+ const [e, a] = g.useState(!1), [t, s] = g.useState(void 0), c = () => {
225
+ a(!e);
226
+ };
227
+ return /* @__PURE__ */ j(g.Fragment, { children: [
228
+ /* @__PURE__ */ r(Z, {}),
229
+ /* @__PURE__ */ r(F, { onToggle: c, isOpen: e }),
230
+ /* @__PURE__ */ r("div", { className: `${e ? "menu-open" : ""}`, children: /* @__PURE__ */ r("div", { className: "main-section", children: /* @__PURE__ */ r(
231
+ q,
232
+ {
233
+ id: "controlled-tab",
234
+ activeKey: t,
235
+ onSelect: (l) => s(l !== null ? l : void 0),
236
+ children: g.Children.map(n, (l) => g.isValidElement(l) ? l : null)
237
+ }
238
+ ) }) })
239
+ ] });
240
+ };
241
+ export {
242
+ Ce as VentanaTabs
243
+ };
package/dist/shared.js CHANGED
@@ -1,4 +1,6 @@
1
- import { VentanaLienzo as o } from "./shared/components/VentanaLienzo.js";
1
+ import { VentanaLienzo as n } from "./shared/components/VentanaLienzo.js";
2
+ import { VentanaTabs as r } from "./shared/components/VentanaTabs.js";
2
3
  export {
3
- o as VentanaLienzo
4
+ n as VentanaLienzo,
5
+ r as VentanaTabs
4
6
  };
@@ -0,0 +1,34 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ const l = {
3
+ borderLeft: "8px solid",
4
+ borderLeftColor: "#d13c47",
5
+ height: "65px",
6
+ marginBottom: "20px",
7
+ display: "flex",
8
+ alignItems: "center",
9
+ marginLeft: "0px"
10
+ }, i = {
11
+ height: "60px",
12
+ marginLeft: "12px",
13
+ marginRight: "15px",
14
+ alignSelf: "center"
15
+ }, r = ({ dependencia: n }) => /* @__PURE__ */ e("div", { style: l, children: /* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "center" }, children: [
16
+ /* @__PURE__ */ e("img", { src: "https://i.imgur.com/MYXJbgg.png", style: i }),
17
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", justifyContent: "start" }, children: [
18
+ /* @__PURE__ */ e("h4", { className: "d-none d-md-block", style: { margin: "0px 0px 4px 0px", fontWeight: "700" }, children: " Unidad Nacional de Protección " }),
19
+ /* @__PURE__ */ e("h5", { className: "d-block d-md-none", style: { margin: "0px 0px 4px 0px", fontWeight: "700", fontSize: "1rem" }, children: " Unidad Nacional de Protección " }),
20
+ /* @__PURE__ */ t("h6", { className: "d-none d-md-block", style: { margin: "0px 0px 4px 0px", color: "#6b6b6b" }, children: [
21
+ " ",
22
+ n,
23
+ " "
24
+ ] }),
25
+ /* @__PURE__ */ t("h6", { className: "d-block d-md-none", style: { margin: "0px 0px 4px 0px", fontSize: "0.8rem", color: "#6b6b6b" }, children: [
26
+ " ",
27
+ n,
28
+ " "
29
+ ] })
30
+ ] })
31
+ ] }) });
32
+ export {
33
+ r as default
34
+ };