react-ecosistema-unp 0.3.1 → 0.4.5
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.
- package/dist/{Bootstrap-nyDWFTXk.js → Bootstrap-B6mAgGTS.js} +8144 -8806
- package/dist/{NotificacionUsuario-BAYfK-nd.js → NotificacionUsuario-BA4-axVh.js} +571 -609
- package/dist/TabContext-BvNFEruk.js +138 -0
- package/dist/ThemeProvider-CFCmmLJC.js +69 -0
- package/dist/assets/Buscador.css +1 -0
- package/dist/assets/Modal.css +1 -0
- package/dist/assets/NotificacionUsuario.css +1 -1
- package/dist/assets/Tabla.css +1 -0
- package/dist/assets/TablaRegistros.css +1 -0
- package/dist/assets/TituloModal.css +1 -0
- package/dist/index-Bk5C3cP1.js +667 -0
- package/dist/index-D3su-uEQ.js +15 -0
- package/dist/lib/tables/assets/animations/isLoading.json.d.ts +3 -0
- package/dist/lib/tables/assets/animations/noData.json.d.ts +5869 -0
- package/dist/lib/tables/assets/animations/noInfo.json.d.ts +2984 -0
- package/dist/lib/tables/components/Buscador.d.ts +6 -0
- package/dist/lib/tables/components/EncabezadoTabla.d.ts +9 -0
- package/dist/lib/tables/components/Modal.d.ts +10 -0
- package/dist/lib/tables/components/Tabla.d.ts +22 -0
- package/dist/lib/tables/components/TablaRegistros.d.ts +23 -0
- package/dist/lib/tables/components/TituloModal.d.ts +16 -0
- package/dist/lib/tables.d.ts +1 -0
- package/dist/shared/components/NotificacionUsuario.js +1 -1
- package/dist/shared/components/TabVentana.js +10 -9
- package/dist/shared/components/VentanaTabs.js +26 -25
- package/dist/tables/components/Buscador.js +103 -0
- package/dist/tables/components/EncabezadoTabla.js +27 -0
- package/dist/tables/components/Modal.js +43 -0
- package/dist/tables/components/Tabla.js +113 -0
- package/dist/tables/components/TablaRegistros.js +8171 -0
- package/dist/tables/components/TituloModal.js +51 -0
- package/dist/tables.js +4 -0
- package/dist/warning-BMiIoRBk.js +41 -0
- package/package.json +5 -2
- package/dist/TabContext-C1blj64Y.js +0 -204
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as t, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as p } from "react";
|
|
3
|
+
import { F as v } from "../../index-D3su-uEQ.js";
|
|
4
|
+
import '../../assets/TituloModal.css';const x = ({ title: m, children: h, buttons: i, isShowing: s, setIsShowing: u = () => {
|
|
5
|
+
} }) => {
|
|
6
|
+
const [a, o] = d(0), [r, c] = d(!0);
|
|
7
|
+
return p(() => {
|
|
8
|
+
}, [a]), /* @__PURE__ */ t(N, { children: [
|
|
9
|
+
/* @__PURE__ */ t("div", { style: { marginBottom: "2rem" }, children: [
|
|
10
|
+
/* @__PURE__ */ t("div", { className: "modal-title-container", children: [
|
|
11
|
+
/* @__PURE__ */ t("div", { className: "modal-subtitle-container-left", children: [
|
|
12
|
+
/* @__PURE__ */ e("div", { className: "red-item" }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "modal-subtitle", children: s && i && a ? i[a - 1].title : m })
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ e("div", { className: "modal-subtitle-container-right", children: /* @__PURE__ */ t("div", { className: "animation-wrapper", children: [
|
|
16
|
+
r && /* @__PURE__ */ e("div", { className: `buttons-group ${s ? "hide" : "show"}`, children: i && i.map((l, n) => /* @__PURE__ */ t("div", { className: "icon-container", children: [
|
|
17
|
+
/* @__PURE__ */ e(
|
|
18
|
+
l.icon,
|
|
19
|
+
{
|
|
20
|
+
className: "icon-registro",
|
|
21
|
+
onClick: () => {
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
c(!1);
|
|
24
|
+
}, 200), l.onShow(), o(n + 1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ e("span", { className: "tooltip-text", children: l.title })
|
|
29
|
+
] }, n)) }),
|
|
30
|
+
!r && /* @__PURE__ */ e("div", { className: `close-group ${s ? "show" : "hide"}`, children: /* @__PURE__ */ e(
|
|
31
|
+
v,
|
|
32
|
+
{
|
|
33
|
+
className: "icon-close-registro",
|
|
34
|
+
onClick: () => {
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
c(!0);
|
|
37
|
+
}, 200), u(!1), o(0);
|
|
38
|
+
},
|
|
39
|
+
style: { position: "absolute", right: 0 }
|
|
40
|
+
}
|
|
41
|
+
) })
|
|
42
|
+
] }) })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e("hr", { className: "modal-horizontal-line" })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "modal-title-body", children: h })
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
x as TituloModal
|
|
51
|
+
};
|
package/dist/tables.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { g as v } from "./ThemeProvider-CFCmmLJC.js";
|
|
2
|
+
var t, g;
|
|
3
|
+
function w() {
|
|
4
|
+
if (g) return t;
|
|
5
|
+
g = 1;
|
|
6
|
+
var f = process.env.NODE_ENV !== "production", i = function() {
|
|
7
|
+
};
|
|
8
|
+
if (f) {
|
|
9
|
+
var s = function(e, n) {
|
|
10
|
+
var a = arguments.length;
|
|
11
|
+
n = new Array(a > 1 ? a - 1 : 0);
|
|
12
|
+
for (var r = 1; r < a; r++)
|
|
13
|
+
n[r - 1] = arguments[r];
|
|
14
|
+
var c = 0, u = "Warning: " + e.replace(/%s/g, function() {
|
|
15
|
+
return n[c++];
|
|
16
|
+
});
|
|
17
|
+
typeof console < "u" && console.error(u);
|
|
18
|
+
try {
|
|
19
|
+
throw new Error(u);
|
|
20
|
+
} catch {
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
i = function(o, e, n) {
|
|
24
|
+
var a = arguments.length;
|
|
25
|
+
n = new Array(a > 2 ? a - 2 : 0);
|
|
26
|
+
for (var r = 2; r < a; r++)
|
|
27
|
+
n[r - 2] = arguments[r];
|
|
28
|
+
if (e === void 0)
|
|
29
|
+
throw new Error(
|
|
30
|
+
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
31
|
+
);
|
|
32
|
+
o || s.apply(null, [e].concat(n));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return t = i, t;
|
|
36
|
+
}
|
|
37
|
+
var l = w();
|
|
38
|
+
const d = /* @__PURE__ */ v(l);
|
|
39
|
+
export {
|
|
40
|
+
d as w
|
|
41
|
+
};
|
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.
|
|
5
|
+
"version": "0.4.5",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"types": "./dist/lib/ui.d.ts",
|
|
18
18
|
"default": "./dist/ui.js"
|
|
19
19
|
},
|
|
20
|
+
"./tables": {
|
|
21
|
+
"types": "./dist/lib/tables.d.ts",
|
|
22
|
+
"default": "./dist/tables.js"
|
|
23
|
+
},
|
|
20
24
|
"./utils": {
|
|
21
25
|
"types": "./dist/lib/utils.d.ts",
|
|
22
26
|
"default": "./dist/utils.js"
|
|
@@ -48,7 +52,6 @@
|
|
|
48
52
|
"react-dom": "^18.3.1"
|
|
49
53
|
},
|
|
50
54
|
"dependencies": {
|
|
51
|
-
"@storybook/addon-docs": "^8.5.3",
|
|
52
55
|
"bootstrap": "^5.3.3",
|
|
53
56
|
"jwt-decode": "^4.0.0",
|
|
54
57
|
"lottie-react": "^2.4.1",
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import * as x from "react";
|
|
2
|
-
import a, { useContext as i, useMemo as j, useRef as b, useEffect as L, useCallback as C, useState as g } from "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
function k(e) {
|
|
5
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
-
}
|
|
7
|
-
var d = { exports: {} };
|
|
8
|
-
/*!
|
|
9
|
-
Copyright (c) 2018 Jed Watson.
|
|
10
|
-
Licensed under the MIT License (MIT), see
|
|
11
|
-
http://jedwatson.github.io/classnames
|
|
12
|
-
*/
|
|
13
|
-
var w;
|
|
14
|
-
function D() {
|
|
15
|
-
return w || (w = 1, function(e) {
|
|
16
|
-
(function() {
|
|
17
|
-
var t = {}.hasOwnProperty;
|
|
18
|
-
function n() {
|
|
19
|
-
for (var o = "", s = 0; s < arguments.length; s++) {
|
|
20
|
-
var c = arguments[s];
|
|
21
|
-
c && (o = u(o, r(c)));
|
|
22
|
-
}
|
|
23
|
-
return o;
|
|
24
|
-
}
|
|
25
|
-
function r(o) {
|
|
26
|
-
if (typeof o == "string" || typeof o == "number")
|
|
27
|
-
return o;
|
|
28
|
-
if (typeof o != "object")
|
|
29
|
-
return "";
|
|
30
|
-
if (Array.isArray(o))
|
|
31
|
-
return n.apply(null, o);
|
|
32
|
-
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
|
|
33
|
-
return o.toString();
|
|
34
|
-
var s = "";
|
|
35
|
-
for (var c in o)
|
|
36
|
-
t.call(o, c) && o[c] && (s = u(s, c));
|
|
37
|
-
return s;
|
|
38
|
-
}
|
|
39
|
-
function u(o, s) {
|
|
40
|
-
return s ? o ? o + " " + s : o + s : o;
|
|
41
|
-
}
|
|
42
|
-
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
43
|
-
})();
|
|
44
|
-
}(d)), d.exports;
|
|
45
|
-
}
|
|
46
|
-
var q = D();
|
|
47
|
-
const N = /* @__PURE__ */ k(q);
|
|
48
|
-
function Y(e, t) {
|
|
49
|
-
if (e == null) return {};
|
|
50
|
-
var n = {};
|
|
51
|
-
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
52
|
-
if (t.indexOf(r) !== -1) continue;
|
|
53
|
-
n[r] = e[r];
|
|
54
|
-
}
|
|
55
|
-
return n;
|
|
56
|
-
}
|
|
57
|
-
const z = ["xxl", "xl", "lg", "md", "sm", "xs"], A = "xs", P = /* @__PURE__ */ x.createContext({
|
|
58
|
-
prefixes: {},
|
|
59
|
-
breakpoints: z,
|
|
60
|
-
minBreakpoint: A
|
|
61
|
-
});
|
|
62
|
-
function _(e, t) {
|
|
63
|
-
const {
|
|
64
|
-
prefixes: n
|
|
65
|
-
} = i(P);
|
|
66
|
-
return e || n[t] || t;
|
|
67
|
-
}
|
|
68
|
-
function ee() {
|
|
69
|
-
const {
|
|
70
|
-
dir: e
|
|
71
|
-
} = i(P);
|
|
72
|
-
return e === "rtl";
|
|
73
|
-
}
|
|
74
|
-
function te(e) {
|
|
75
|
-
return e && e.ownerDocument || document;
|
|
76
|
-
}
|
|
77
|
-
const K = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
78
|
-
var v = !1, m = !1;
|
|
79
|
-
try {
|
|
80
|
-
var p = {
|
|
81
|
-
get passive() {
|
|
82
|
-
return v = !0;
|
|
83
|
-
},
|
|
84
|
-
get once() {
|
|
85
|
-
return m = v = !0;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
K && (window.addEventListener("test", p, p), window.removeEventListener("test", p, !0));
|
|
89
|
-
} catch {
|
|
90
|
-
}
|
|
91
|
-
function V(e, t, n, r) {
|
|
92
|
-
if (r && typeof r != "boolean" && !m) {
|
|
93
|
-
var u = r.once, o = r.capture, s = n;
|
|
94
|
-
!m && u && (s = n.__once || function c(l) {
|
|
95
|
-
this.removeEventListener(t, c, o), n.call(this, l);
|
|
96
|
-
}, n.__once = s), e.addEventListener(t, s, v ? r : o);
|
|
97
|
-
}
|
|
98
|
-
e.addEventListener(t, n, r);
|
|
99
|
-
}
|
|
100
|
-
function B(e, t, n, r) {
|
|
101
|
-
var u = r && typeof r != "boolean" ? r.capture : r;
|
|
102
|
-
e.removeEventListener(t, n, u), n.__once && e.removeEventListener(t, n.__once, u);
|
|
103
|
-
}
|
|
104
|
-
function ne(e, t, n, r) {
|
|
105
|
-
return V(e, t, n, r), function() {
|
|
106
|
-
B(e, t, n, r);
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
const y = (e) => !e || typeof e == "function" ? e : (t) => {
|
|
110
|
-
e.current = t;
|
|
111
|
-
};
|
|
112
|
-
function F(e, t) {
|
|
113
|
-
const n = y(e), r = y(t);
|
|
114
|
-
return (u) => {
|
|
115
|
-
n && n(u), r && r(u);
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function re(e, t) {
|
|
119
|
-
return j(() => F(e, t), [e, t]);
|
|
120
|
-
}
|
|
121
|
-
function O(e) {
|
|
122
|
-
const t = b(e);
|
|
123
|
-
return L(() => {
|
|
124
|
-
t.current = e;
|
|
125
|
-
}, [e]), t;
|
|
126
|
-
}
|
|
127
|
-
function oe(e) {
|
|
128
|
-
const t = O(e);
|
|
129
|
-
return C(function(...n) {
|
|
130
|
-
return t.current && t.current(...n);
|
|
131
|
-
}, [t]);
|
|
132
|
-
}
|
|
133
|
-
function se(e, t, n) {
|
|
134
|
-
const r = b(e !== void 0), [u, o] = g(t), s = e !== void 0, c = r.current;
|
|
135
|
-
return r.current = s, !s && c && u !== t && o(t), [s ? e : u, C((...l) => {
|
|
136
|
-
const [S, ...M] = l;
|
|
137
|
-
let E = n == null ? void 0 : n(S, ...M);
|
|
138
|
-
return o(S), E;
|
|
139
|
-
}, [n])];
|
|
140
|
-
}
|
|
141
|
-
const f = {
|
|
142
|
-
prefix: String(Math.round(Math.random() * 1e10)),
|
|
143
|
-
current: 0
|
|
144
|
-
}, h = /* @__PURE__ */ a.createContext(f), R = /* @__PURE__ */ a.createContext(!1);
|
|
145
|
-
let G = !!(typeof window < "u" && window.document && window.document.createElement), $ = /* @__PURE__ */ new WeakMap();
|
|
146
|
-
function I(e = !1) {
|
|
147
|
-
let t = i(h), n = b(null);
|
|
148
|
-
if (n.current === null && !e) {
|
|
149
|
-
var r, u;
|
|
150
|
-
let o = (u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || u === void 0 || (r = u.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
151
|
-
if (o) {
|
|
152
|
-
let s = $.get(o);
|
|
153
|
-
s == null ? $.set(o, {
|
|
154
|
-
id: t.current,
|
|
155
|
-
state: o.memoizedState
|
|
156
|
-
}) : o.memoizedState !== s.state && (t.current = s.id, $.delete(o));
|
|
157
|
-
}
|
|
158
|
-
n.current = ++t.current;
|
|
159
|
-
}
|
|
160
|
-
return n.current;
|
|
161
|
-
}
|
|
162
|
-
function J(e) {
|
|
163
|
-
let t = i(h);
|
|
164
|
-
t === f && !G && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
165
|
-
let n = I(!!e), r = t === f && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
|
166
|
-
return e || `${r}-${n}`;
|
|
167
|
-
}
|
|
168
|
-
function Q(e) {
|
|
169
|
-
let t = a.useId(), [n] = g(H()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${f.prefix}`;
|
|
170
|
-
return e || `${r}-${t}`;
|
|
171
|
-
}
|
|
172
|
-
const ue = typeof a.useId == "function" ? Q : J;
|
|
173
|
-
function W() {
|
|
174
|
-
return !1;
|
|
175
|
-
}
|
|
176
|
-
function X() {
|
|
177
|
-
return !0;
|
|
178
|
-
}
|
|
179
|
-
function Z(e) {
|
|
180
|
-
return () => {
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function H() {
|
|
184
|
-
return typeof a.useSyncExternalStore == "function" ? a.useSyncExternalStore(Z, W, X) : i(R);
|
|
185
|
-
}
|
|
186
|
-
const ce = /* @__PURE__ */ x.createContext(null), ae = (e, t = null) => e != null ? String(e) : t || null, ie = /* @__PURE__ */ x.createContext(null);
|
|
187
|
-
export {
|
|
188
|
-
ue as $,
|
|
189
|
-
ce as S,
|
|
190
|
-
ie as T,
|
|
191
|
-
Y as _,
|
|
192
|
-
re as a,
|
|
193
|
-
oe as b,
|
|
194
|
-
N as c,
|
|
195
|
-
se as d,
|
|
196
|
-
K as e,
|
|
197
|
-
V as f,
|
|
198
|
-
k as g,
|
|
199
|
-
ee as h,
|
|
200
|
-
ne as l,
|
|
201
|
-
ae as m,
|
|
202
|
-
te as o,
|
|
203
|
-
_ as u
|
|
204
|
-
};
|