bmi-next-brokers 2.7.6 → 2.7.7

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
- ._modalOverlay_1ss8l_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;animation:_overlayFadeIn_1ss8l_1 .25s ease-in-out forwards;overflow:hidden}._modalOverlay_1ss8l_1._closing_1ss8l_15{animation:_overlayFadeOut_1ss8l_1 .25s ease-in-out forwards}@keyframes _overlayFadeIn_1ss8l_1{0%{opacity:0}to{opacity:1}}@keyframes _overlayFadeOut_1ss8l_1{0%{opacity:1}to{opacity:0}}._modalLayout_1ss8l_37{display:flex;gap:20px;justify-content:center;align-items:flex-start;width:100%}._modal_1ss8l_1{display:flex;flex-direction:column;border-radius:24px;background-color:#fff;box-shadow:0 4px 6px #0000001a;max-height:calc(100dvh - 15px);margin-inline:15px;width:100%}._modalHeader_1ss8l_57{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:8px}._modalHeader_1ss8l_57._withBorder_1ss8l_65{border-bottom:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._modalTitle_1ss8l_70{color:var(--Blacks-Black, #000);font-size:20px;font-style:normal;font-weight:600;line-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}._closeIcon_1ss8l_82{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}._modalBody_1ss8l_90{display:flex;flex-direction:column;flex:1;padding:0 16px 16px}._modalBody_1ss8l_90::-webkit-scrollbar{display:none}._modalFooter_1ss8l_101._withBorder_1ss8l_65{border-top:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._buttonsDiv_1ss8l_106{display:grid;grid-template-columns:1fr 1fr;margin-left:auto;width:fit-content;gap:19px;padding-inline:16px;margin-block:16px}._buttonsDiv_1ss8l_106._fullWidthFooter_1ss8l_116{width:100%}._buttonsDiv_1ss8l_106 :only-child{grid-column:2}
1
+ ._modalOverlay_2iytb_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;animation:_overlayFadeIn_2iytb_1 .25s ease-in-out forwards;overflow:hidden}._modalOverlay_2iytb_1._closing_2iytb_15{animation:_overlayFadeOut_2iytb_1 .25s ease-in-out forwards}@keyframes _overlayFadeIn_2iytb_1{0%{opacity:0}to{opacity:1}}@keyframes _overlayFadeOut_2iytb_1{0%{opacity:1}to{opacity:0}}._modalLayout_2iytb_37{display:flex;gap:20px;justify-content:center;align-items:flex-start;width:100%}._modal_2iytb_1{display:flex;flex-direction:column;border-radius:24px;background-color:#fff;box-shadow:0 4px 6px #0000001a;max-height:calc(100dvh - 15px);margin-inline:15px;width:100%}._modalHeader_2iytb_57{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:8px}._modalHeader_2iytb_57._withBorder_2iytb_65{border-bottom:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._titleDiv_2iytb_70{display:flex;justify-content:center;align-items:center;width:100%;gap:8px}._titleIcon_2iytb_78{display:flex;justify-content:center;align-items:center}._modalTitle_2iytb_84{color:var(--Blacks-Black, #000);font-size:20px;font-style:normal;font-weight:600;line-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}._closeIcon_2iytb_96{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}._modalBody_2iytb_104{display:flex;flex-direction:column;flex:1;padding:0 16px 16px}._modalBody_2iytb_104::-webkit-scrollbar{display:none}._modalFooter_2iytb_115._withBorder_2iytb_65{border-top:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._buttonsDiv_2iytb_120{display:grid;grid-template-columns:1fr 1fr;margin-left:auto;width:fit-content;gap:19px;padding-inline:16px;margin-block:16px}._buttonsDiv_2iytb_120._fullWidthFooter_2iytb_130{width:100%}._buttonsDiv_2iytb_120 :only-child{grid-column:2}
@@ -1,165 +1,167 @@
1
1
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
- import { useRef as f, useState as y, useEffect as Q } from "react";
3
- import { Icon as x } from "../../icons/Icon.js";
2
+ import { useRef as L, useState as v, useEffect as Q } from "react";
3
+ import { Icon as O } from "../../icons/Icon.js";
4
4
  import { useScrollLock as U } from "../../hooks/useScrollLock.js";
5
5
  import { CloseContext as n } from "../../hooks/useClose.js";
6
- import { Button as z } from "../Button/Button.js";
6
+ import { Button as f } from "../Button/Button.js";
7
7
  import { createPortal as u } from "react-dom";
8
- import '../../assets/index8.css';const B = "_modalOverlay_1ss8l_1", ss = "_closing_1ss8l_15", es = "_modalLayout_1ss8l_37", ls = "_modal_1ss8l_1", as = "_modalHeader_1ss8l_57", ds = "_withBorder_1ss8l_65", rs = "_modalTitle_1ss8l_70", is = "_closeIcon_1ss8l_82", os = "_modalBody_1ss8l_90", hs = "_modalFooter_1ss8l_101", _s = "_buttonsDiv_1ss8l_106", vs = "_fullWidthFooter_1ss8l_116", l = {
8
+ import '../../assets/index8.css';const B = "_modalOverlay_2iytb_1", ee = "_closing_2iytb_15", se = "_modalLayout_2iytb_37", le = "_modal_2iytb_1", ae = "_modalHeader_2iytb_57", de = "_withBorder_2iytb_65", ie = "_titleDiv_2iytb_70", re = "_titleIcon_2iytb_78", oe = "_modalTitle_2iytb_84", he = "_closeIcon_2iytb_96", _e = "_modalBody_2iytb_104", ye = "_modalFooter_2iytb_115", ve = "_buttonsDiv_2iytb_120", be = "_fullWidthFooter_2iytb_130", l = {
9
9
  modalOverlay: B,
10
- closing: ss,
11
- modalLayout: es,
12
- modal: ls,
13
- modalHeader: as,
14
- withBorder: ds,
15
- modalTitle: rs,
16
- closeIcon: is,
17
- modalBody: os,
18
- modalFooter: hs,
19
- buttonsDiv: _s,
20
- fullWidthFooter: vs
21
- }, Cs = ({
22
- isOpen: m,
23
- title: w,
24
- children: b,
25
- width: D = 752,
26
- confirmButton: s,
27
- cancelButton: e,
28
- zIndex: F,
29
- className: H,
30
- titleClassName: g,
31
- contentClassName: $,
32
- footerClassName: N,
33
- style: k,
10
+ closing: ee,
11
+ modalLayout: se,
12
+ modal: le,
13
+ modalHeader: ae,
14
+ withBorder: de,
15
+ titleDiv: ie,
16
+ titleIcon: re,
17
+ modalTitle: oe,
18
+ closeIcon: he,
19
+ modalBody: _e,
20
+ modalFooter: ye,
21
+ buttonsDiv: ve,
22
+ fullWidthFooter: be
23
+ }, Ce = ({
24
+ isOpen: b,
25
+ title: t,
26
+ children: m,
27
+ width: x = 752,
28
+ confirmButton: e,
29
+ cancelButton: s,
30
+ zIndex: z,
31
+ className: F,
32
+ titleClassName: w,
33
+ contentClassName: g,
34
+ footerClassName: $,
35
+ style: H,
34
36
  onClickOverlay: _,
35
37
  onClose: h,
36
- closeModal: W,
37
- withScroll: A = !0,
38
- fullWidthFooter: R = !1,
39
- helperElement: T,
40
- useBlueTitle: p = !1,
41
- icon: C,
42
- ...j
38
+ closeModal: k,
39
+ withScroll: W = !0,
40
+ fullWidthFooter: c = !1,
41
+ helperElement: A,
42
+ useBlueTitle: I = !1,
43
+ icon: N,
44
+ ...R
43
45
  }) => {
44
- const I = f(null), [Y, E] = y(!1), v = f(null), [P, V] = y(!1), [X, Z] = y(!1);
45
- U(m);
46
- const i = () => {
47
- E(!0), setTimeout(() => {
48
- W(), E(!1);
46
+ const p = L(null), [T, C] = v(!1), y = L(null), [j, Y] = v(!1), [P, V] = v(!1);
47
+ U(b);
48
+ const r = () => {
49
+ C(!0), setTimeout(() => {
50
+ k(), C(!1);
49
51
  }, 250);
50
- }, c = async (d) => {
51
- var r;
52
- (r = I.current) != null && r.contains(d.target) || _ !== !1 && (typeof _ == "function" && await _(), i());
53
- }, t = async () => {
54
- h !== !1 && (typeof h == "function" && await h(), i());
52
+ }, X = async (d) => {
53
+ var i;
54
+ (i = p.current) != null && i.contains(d.target) || _ !== !1 && (typeof _ == "function" && await _(), r());
55
+ }, Z = async () => {
56
+ h !== !1 && (typeof h == "function" && await h(), r());
55
57
  }, M = async () => {
56
58
  try {
57
- s != null && s.action && await s.action(), i();
59
+ e != null && e.action && await e.action(), r();
58
60
  } catch {
59
61
  return;
60
62
  }
61
63
  }, q = async () => {
62
64
  try {
63
- e != null && e.action && await e.action(), i();
65
+ s != null && s.action && await s.action(), r();
64
66
  } catch {
65
67
  return;
66
68
  }
67
- }, G = e && Object.keys(e).length > 0, J = s && Object.keys(s).length > 0, S = G && (e.show ?? !0), L = J && (s.show ?? !0), K = `${l.modal} ${H || ""}`;
69
+ }, G = s && Object.keys(s).length > 0, J = e && Object.keys(e).length > 0, D = G && (s.show ?? !0), E = J && (e.show ?? !0), K = `${l.modal} ${F || ""}`;
68
70
  return Q(() => {
69
- if (!v.current) return;
70
- const d = v.current, r = () => {
71
- Z(d.scrollTop > 0), V(d.scrollHeight > d.clientHeight);
71
+ if (!y.current) return;
72
+ const d = y.current, i = () => {
73
+ V(d.scrollTop > 0), Y(d.scrollHeight > d.clientHeight);
72
74
  };
73
- r(), d.addEventListener("scroll", r);
74
- const O = new ResizeObserver(r);
75
- return O.observe(d), () => {
76
- d.removeEventListener("scroll", r), O.disconnect();
75
+ i(), d.addEventListener("scroll", i);
76
+ const S = new ResizeObserver(i);
77
+ return S.observe(d), () => {
78
+ d.removeEventListener("scroll", i), S.disconnect();
77
79
  };
78
- }, [b]), m ? u(
80
+ }, [m]), b ? u(
79
81
  /* @__PURE__ */ a(
80
82
  "div",
81
83
  {
82
- className: `${l.modalOverlay} ${Y ? l.closing : ""}`,
83
- style: { zIndex: 3e3 + (F || 0) },
84
- onClick: c,
85
- children: /* @__PURE__ */ o("div", { ref: I, className: l.modalLayout, children: [
84
+ className: `${l.modalOverlay} ${T ? l.closing : ""}`,
85
+ style: { zIndex: 3e3 + (z || 0) },
86
+ onClick: X,
87
+ children: /* @__PURE__ */ o("div", { ref: p, className: l.modalLayout, children: [
86
88
  /* @__PURE__ */ o(
87
89
  "div",
88
90
  {
89
91
  className: K,
90
- style: { maxWidth: D, ...k },
91
- ...j,
92
+ style: { maxWidth: x, ...H },
93
+ ...R,
92
94
  children: [
93
95
  /* @__PURE__ */ o(
94
96
  "div",
95
97
  {
96
- className: `${l.modalHeader} ${X ? l.withBorder : ""} `,
98
+ className: `${l.modalHeader} ${P ? l.withBorder : ""} `,
97
99
  children: [
98
- w && /* @__PURE__ */ o("div", { className: l.titleDiv, children: [
99
- C && /* @__PURE__ */ a("div", { className: l.titleIcon, children: /* @__PURE__ */ a(x, { name: C, size: 24, fill: p ? "#2054A5" : "inherit" }) }),
100
+ t && /* @__PURE__ */ o("div", { className: l.titleDiv, children: [
101
+ N && /* @__PURE__ */ a("div", { className: l.titleIcon, children: /* @__PURE__ */ a(O, { name: N, size: 24, fill: I ? "#2054A5" : "inherit" }) }),
100
102
  /* @__PURE__ */ a(
101
103
  "span",
102
104
  {
103
- className: `${l.modalTitle} ${g || ""} `,
105
+ className: `${l.modalTitle} ${w || ""} `,
104
106
  style: {
105
- color: p ? "#2054A5" : "inherit"
107
+ color: I ? "#2054A5" : "inherit"
106
108
  },
107
- children: w
109
+ children: t
108
110
  }
109
111
  )
110
112
  ] }),
111
- h !== !1 && /* @__PURE__ */ a("div", { className: l.closeIcon, onClick: t, children: /* @__PURE__ */ a(x, { name: "CloseDrawer", size: 24 }) })
113
+ h !== !1 && /* @__PURE__ */ a("div", { className: l.closeIcon, onClick: Z, children: /* @__PURE__ */ a(O, { name: "CloseDrawer", size: 24 }) })
112
114
  ]
113
115
  }
114
116
  ),
115
117
  /* @__PURE__ */ a(
116
118
  "div",
117
119
  {
118
- className: `${l.modalBody} ${$ || ""}`,
120
+ className: `${l.modalBody} ${g || ""}`,
119
121
  style: {
120
- overflowY: A ? "auto" : "hidden"
122
+ overflowY: W ? "auto" : "hidden"
121
123
  },
122
- ref: v,
123
- children: /* @__PURE__ */ a(n.Provider, { value: i, children: b })
124
+ ref: y,
125
+ children: /* @__PURE__ */ a(n.Provider, { value: r, children: m })
124
126
  }
125
127
  ),
126
- (S || L) && /* @__PURE__ */ a(
128
+ (D || E) && /* @__PURE__ */ a(
127
129
  "div",
128
130
  {
129
- className: `${l.modalFooter} ${P ? l.withBorder : ""}`,
131
+ className: `${l.modalFooter} ${j ? l.withBorder : ""}`,
130
132
  children: /* @__PURE__ */ o(
131
133
  "div",
132
134
  {
133
- className: `${l.buttonsDiv} ${R ? l.fullWidthFooter : ""} ${N || ""}`,
135
+ className: `${l.buttonsDiv} ${c ? l.fullWidthFooter : ""} ${$ || ""}`,
134
136
  children: [
135
- S && /* @__PURE__ */ a(
136
- z,
137
+ D && /* @__PURE__ */ a(
138
+ f,
137
139
  {
138
- variant: (e == null ? void 0 : e.variant) || "outline",
140
+ variant: (s == null ? void 0 : s.variant) || "outline",
139
141
  onClick: q,
140
- disabled: (e == null ? void 0 : e.disabled) || !1,
141
- size: (e == null ? void 0 : e.size) || "small",
142
- loading: e == null ? void 0 : e.loading,
143
- className: e == null ? void 0 : e.className,
144
- icon: e.icon,
142
+ disabled: (s == null ? void 0 : s.disabled) || !1,
143
+ size: (s == null ? void 0 : s.size) || "small",
144
+ loading: s == null ? void 0 : s.loading,
145
+ className: s == null ? void 0 : s.className,
146
+ icon: s.icon,
145
147
  fullWidth: !0,
146
- children: (e == null ? void 0 : e.text) || "Cancelar"
148
+ children: (s == null ? void 0 : s.text) || "Cancelar"
147
149
  }
148
150
  ),
149
- L && /* @__PURE__ */ a(
150
- z,
151
+ E && /* @__PURE__ */ a(
152
+ f,
151
153
  {
152
154
  type: "submit",
153
- form: s == null ? void 0 : s.id,
154
- variant: (s == null ? void 0 : s.variant) || "brand",
155
+ form: e == null ? void 0 : e.id,
156
+ variant: (e == null ? void 0 : e.variant) || "brand",
155
157
  onClick: M,
156
- disabled: (s == null ? void 0 : s.disabled) || !1,
157
- size: (s == null ? void 0 : s.size) || "small",
158
- loading: s == null ? void 0 : s.loading,
159
- className: s == null ? void 0 : s.className,
160
- icon: s.icon,
158
+ disabled: (e == null ? void 0 : e.disabled) || !1,
159
+ size: (e == null ? void 0 : e.size) || "small",
160
+ loading: e == null ? void 0 : e.loading,
161
+ className: e == null ? void 0 : e.className,
162
+ icon: e.icon,
161
163
  fullWidth: !0,
162
- children: (s == null ? void 0 : s.text) || "Confirmar"
164
+ children: (e == null ? void 0 : e.text) || "Confirmar"
163
165
  }
164
166
  )
165
167
  ]
@@ -170,7 +172,7 @@ import '../../assets/index8.css';const B = "_modalOverlay_1ss8l_1", ss = "_closi
170
172
  ]
171
173
  }
172
174
  ),
173
- T
175
+ A
174
176
  ] })
175
177
  }
176
178
  ),
@@ -178,5 +180,5 @@ import '../../assets/index8.css';const B = "_modalOverlay_1ss8l_1", ss = "_closi
178
180
  ) : null;
179
181
  };
180
182
  export {
181
- Cs as Modal
183
+ Ce as Modal
182
184
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bmi-next-brokers",
3
3
  "description": "Componentes de UI para proyecto BMI Next Brokers",
4
- "version": "2.7.6",
4
+ "version": "2.7.7",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",