react-ecosistema-unp 1.7.6 → 1.7.8

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 +1 @@
1
- .table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}@media (max-height: 780px){.table-scroll{max-height:65vh!important}}@media (max-height: 670px){.table-scroll{max-height:60vh!important}}@media (max-height: 590px){.table-scroll{max-height:55vh!important}}@media (max-height: 520px){.table-scroll{max-height:50vh!important}}@media (max-height: 470px){.table-scroll{max-height:40vh!important}}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:16px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:40px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#3c2970;color:#fff;font-weight:600;cursor:pointer}
1
+ .table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}@media (max-height: 780px){.table-scroll{max-height:65vh!important}}@media (max-height: 670px){.table-scroll{max-height:60vh!important}}@media (max-height: 590px){.table-scroll{max-height:55vh!important}}@media (max-height: 520px){.table-scroll{max-height:50vh!important}}@media (max-height: 470px){.table-scroll{max-height:40vh!important}}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:16px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:25px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#3c2970;color:#fff;font-weight:600;cursor:pointer}
@@ -1 +1 @@
1
- .bg-unp{border-radius:6px 6px 0 0!important;background-color:#303d50!important}.tarjeta-unp{border-radius:12px!important;box-shadow:0 6px 10px #00000019;border-bottom-left-radius:12px;margin-bottom:1.5rem}.tarjeta-header-unp{border-top-left-radius:12px!important;border-top-right-radius:12px!important}.card-close-button{background:none;border:none;font-size:1.5em;cursor:pointer;color:#fff;margin-left:auto}.card-close-button:hover{color:#d36269}
1
+ .bg-unp{border-radius:6px 6px 0 0!important;background-color:#303d50!important}.tarjeta-unp{border-radius:12px!important;box-shadow:0 6px 10px #00000019;border-bottom-left-radius:12px;margin-bottom:1rem}.tarjeta-header-unp{border-top-left-radius:12px!important;border-top-right-radius:12px!important}.card-close-button{background:none;border:none;font-size:1.5em;cursor:pointer;color:#fff;margin-left:auto}.card-close-button:hover{color:#d36269}
@@ -1,43 +1,43 @@
1
- import { jsxs as o, jsx as e, Fragment as S } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as t, Fragment as c } from "react/jsx-runtime";
2
2
  import a from "react";
3
3
  import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';/* empty css */
4
4
  /* empty css */
5
- import { C as x, a as h } from "../../Card-DAsInpjB.js";
6
- import { C as B } from "../../CardBody-CqyD8ylW.js";
7
- import { B as E } from "../../Button-B87TJYml.js";
8
- const T = {
9
- marginBottom: "20px",
5
+ import { C as v, a as E } from "../../Card-DAsInpjB.js";
6
+ import { C as T } from "../../CardBody-CqyD8ylW.js";
7
+ import { B as x } from "../../Button-B87TJYml.js";
8
+ const V = {
10
9
  width: "100px"
11
- }, I = ({
12
- title: d,
10
+ }, k = ({
11
+ title: y,
13
12
  header: s = !1,
14
- children: n,
15
- method: l = "get",
16
- validated: c = !1,
17
- onSubmit: u,
18
- hasPaddingTop: y = !0,
13
+ children: i,
14
+ method: o = "get",
15
+ validated: u = !1,
16
+ onSubmit: f,
17
+ hasPaddingTop: g = !0,
19
18
  onClose: r,
20
- hasBody: f = !0,
21
- buttonLabel: g = "Enviar",
22
- isButtonDisabled: b = !1
19
+ hasBody: b = !0,
20
+ buttonLabel: j = "Enviar",
21
+ isButtonDisabled: h = !1,
22
+ extraButton: m
23
23
  }) => {
24
- const i = a.Children.toArray(n), j = i[0] && a.isValidElement(i[0]) && i[0].type.displayName === "Subtitulo", m = i.filter(
25
- (t) => a.isValidElement(t) && t.type.displayName === "SeccionTarjeta"
26
- ), C = m.length > 0, N = a.Children.map(n, (t, p) => a.isValidElement(t) && t.type.displayName === "SeccionTarjeta" ? a.cloneElement(t, {
27
- isGray: t.props.isGray ?? p % 2 === 1,
28
- isLast: t.props.isLast ?? p === m.length - 1
29
- }) : t);
30
- return /* @__PURE__ */ o(
24
+ const n = a.Children.toArray(i), C = n[0] && a.isValidElement(n[0]) && n[0].type.displayName === "Subtitulo", p = n.filter(
25
+ (e) => a.isValidElement(e) && e.type.displayName === "SeccionTarjeta"
26
+ ), N = p.length > 0, S = a.Children.map(i, (e, d) => a.isValidElement(e) && e.type.displayName === "SeccionTarjeta" ? a.cloneElement(e, {
27
+ isGray: e.props.isGray ?? d % 2 === 1,
28
+ isLast: e.props.isLast ?? d === p.length - 1
29
+ }) : e);
30
+ return /* @__PURE__ */ l(
31
31
  "form",
32
32
  {
33
- method: l,
33
+ method: o,
34
34
  noValidate: !0,
35
- onSubmit: u,
36
- className: c ? "was-validated" : "",
35
+ onSubmit: f,
36
+ className: u ? "was-validated" : "",
37
37
  children: [
38
- /* @__PURE__ */ o(x, { className: "border-0 tarjeta-unp", children: [
39
- /* @__PURE__ */ o(
40
- h,
38
+ /* @__PURE__ */ l(v, { className: "border-0 tarjeta-unp", children: [
39
+ /* @__PURE__ */ l(
40
+ E,
41
41
  {
42
42
  className: "bg-unp text-light tarjeta-header-unp",
43
43
  style: {
@@ -50,18 +50,21 @@ const T = {
50
50
  alignItems: "center"
51
51
  },
52
52
  children: [
53
- /* @__PURE__ */ e("span", { style: { marginLeft: s && r ? "auto" : "" }, children: d }),
54
- r && /* @__PURE__ */ e("button", { className: "card-close-button", onClick: r, type: "button", children: "×" })
53
+ /* @__PURE__ */ t("span", { style: { marginLeft: s && r ? "auto" : "" }, children: y }),
54
+ r && /* @__PURE__ */ t("button", { className: "card-close-button", onClick: r, type: "button", children: "×" })
55
55
  ]
56
56
  }
57
57
  ),
58
- C ? N : f ? /* @__PURE__ */ e(B, { className: `${j || !y ? "pt-0" : ""}`, children: n }) : /* @__PURE__ */ e(S, { children: n })
58
+ N ? S : b ? /* @__PURE__ */ t(T, { className: `${C || !g ? "pt-0" : ""}`, children: i }) : /* @__PURE__ */ t(c, { children: i })
59
59
  ] }),
60
- l === "post" && /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "end" }, children: /* @__PURE__ */ e(E, { variant: "unp_send", style: T, type: "submit", disabled: b, children: g }) })
60
+ (o === "post" || m) && /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "end", gap: "0.5rem", marginBottom: "1rem" }, children: [
61
+ /* @__PURE__ */ t("div", { children: o === "post" && /* @__PURE__ */ t(x, { variant: "unp_send", style: V, type: "submit", disabled: h, children: j }) }),
62
+ /* @__PURE__ */ t("div", { children: m && /* @__PURE__ */ t(c, { children: m }) })
63
+ ] })
61
64
  ]
62
65
  }
63
66
  );
64
67
  };
65
68
  export {
66
- I as Tarjeta
69
+ k as Tarjeta
67
70
  };
@@ -4,5 +4,8 @@ declare const AuthContext: React.Context<AuthContextType | undefined>;
4
4
  interface AuthProviderProps {
5
5
  children: ReactNode;
6
6
  }
7
+ /**
8
+ * @deprecated since version 1.7.7 — use `EcoProvider` instead.
9
+ */
7
10
  declare const AuthProvider: React.FC<AuthProviderProps>;
8
11
  export { AuthContext, AuthProvider };
@@ -12,6 +12,7 @@ interface TarjetaProps {
12
12
  hasBody?: boolean;
13
13
  buttonLabel?: string;
14
14
  isButtonDisabled?: boolean;
15
+ extraButton?: React.ReactNode;
15
16
  }
16
17
  declare const Tarjeta: React.FC<TarjetaProps>;
17
18
  export { Tarjeta };
@@ -22,6 +22,7 @@ interface TableProps {
22
22
  closeModalOut?: boolean;
23
23
  enableColumnSearch?: boolean;
24
24
  enableColumnSorter?: boolean;
25
+ disableClose?: boolean;
25
26
  }
26
27
  declare const TablaRegistros: React.FC<TableProps>;
27
28
  export { TablaRegistros };
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const EcoProvider: React.FC<{
3
+ children: ReactNode;
4
+ }>;
@@ -15,6 +15,9 @@ interface WebSocketContextType {
15
15
  */
16
16
  sendWebSocketMessage: (data: any) => void;
17
17
  }
18
+ /**
19
+ * @deprecated since version 1.7.7 — use `EcoProvider` instead.
20
+ */
18
21
  export declare const WebSocketProvider: React.FC<{
19
22
  children: ReactNode;
20
23
  }>;
@@ -1,3 +1,4 @@
1
+ export { EcoProvider } from './utils/eco-provider/EcoContext.js';
1
2
  export { AuthProvider } from './auth/contexts/AuthContex.js';
2
3
  export { ProtectedRoute } from './utils/components/ProtectedRoute.js';
3
4
  export { UserRoute } from './utils/components/UserRoute.js';