bmi-next-brokers 2.6.7 → 2.6.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
- ._modalOverlay_1hyzx_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;animation:_overlayFadeIn_1hyzx_1 .25s ease-in-out forwards;overflow:hidden}._modalOverlay_1hyzx_1._closing_1hyzx_15{animation:_overlayFadeOut_1hyzx_1 .25s ease-in-out forwards}@keyframes _overlayFadeIn_1hyzx_1{0%{opacity:0}to{opacity:1}}@keyframes _overlayFadeOut_1hyzx_1{0%{opacity:1}to{opacity:0}}._modalLayout_1hyzx_37{display:flex;gap:20px;justify-content:center;align-items:flex-start;width:100%}._modal_1hyzx_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_1hyzx_57{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:8px}._modalHeader_1hyzx_57._withBorder_1hyzx_65{border-bottom:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._modalTitle_1hyzx_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_1hyzx_82{display:flex;flex-direction:column;border-radius:50%;background-color:#d9d9d9;align-items:center;justify-content:center;aspect-ratio:1/1;padding:6.2px;cursor:pointer;margin-left:auto}._modalBody_1hyzx_95{display:flex;flex-direction:column;flex:1;padding:0 16px 16px}._modalBody_1hyzx_95::-webkit-scrollbar{display:none}._modalFooter_1hyzx_106._withBorder_1hyzx_65{border-top:1px solid var(--Blacks-Transparencias-Black-20, rgba(0, 0, 0, .2))}._buttonsDiv_1hyzx_111{display:grid;grid-template-columns:1fr 1fr;margin-left:auto;width:fit-content;gap:19px;padding-inline:16px;margin-block:16px}._buttonsDiv_1hyzx_111._fullWidthFooter_1hyzx_121{width:100%}._buttonsDiv_1hyzx_111 :only-child{grid-column:2}
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,11 +1,11 @@
1
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
- import { useRef as I, useState as v, useEffect as K } from "react";
1
+ import { jsx as a, jsxs as h } from "react/jsx-runtime";
2
+ import { useRef as L, useState as y, useEffect as K } from "react";
3
3
  import { Icon as Q } from "../../icons/Icon.js";
4
4
  import { useScrollLock as U } from "../../hooks/useScrollLock.js";
5
5
  import { CloseContext as c } from "../../hooks/useClose.js";
6
- import { Button as S } from "../Button/Button.js";
6
+ import { Button as O } from "../Button/Button.js";
7
7
  import { createPortal as t } from "react-dom";
8
- import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closing_1hyzx_15", B = "_modalLayout_1hyzx_37", ss = "_modal_1hyzx_1", es = "_modalHeader_1hyzx_57", ls = "_withBorder_1hyzx_65", as = "_modalTitle_1hyzx_70", ds = "_closeIcon_1hyzx_82", rs = "_modalBody_1hyzx_95", is = "_modalFooter_1hyzx_106", hs = "_buttonsDiv_1hyzx_111", os = "_fullWidthFooter_1hyzx_121", l = {
8
+ import '../../assets/index8.css';const u = "_modalOverlay_1ss8l_1", n = "_closing_1ss8l_15", B = "_modalLayout_1ss8l_37", ss = "_modal_1ss8l_1", es = "_modalHeader_1ss8l_57", ls = "_withBorder_1ss8l_65", as = "_modalTitle_1ss8l_70", ds = "_closeIcon_1ss8l_82", rs = "_modalBody_1ss8l_90", is = "_modalFooter_1ss8l_101", os = "_buttonsDiv_1ss8l_106", hs = "_fullWidthFooter_1ss8l_116", l = {
9
9
  modalOverlay: u,
10
10
  closing: n,
11
11
  modalLayout: B,
@@ -16,40 +16,40 @@ import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closin
16
16
  closeIcon: ds,
17
17
  modalBody: rs,
18
18
  modalFooter: is,
19
- buttonsDiv: hs,
20
- fullWidthFooter: os
21
- }, zs = ({
19
+ buttonsDiv: os,
20
+ fullWidthFooter: hs
21
+ }, ps = ({
22
22
  isOpen: m,
23
- title: x,
23
+ title: w,
24
24
  children: b,
25
- width: k = 752,
25
+ width: x = 752,
26
26
  confirmButton: s,
27
27
  cancelButton: e,
28
- zIndex: L,
29
- className: O,
28
+ zIndex: F,
29
+ className: H,
30
30
  titleClassName: g,
31
- contentClassName: w,
32
- footerClassName: z,
33
- style: F,
34
- onClickOverlay: y,
35
- onClose: h,
36
- closeModal: H,
37
- withScroll: f = !0,
38
- fullWidthFooter: T = !1,
39
- helperElement: W,
40
- ...D
31
+ contentClassName: $,
32
+ footerClassName: p,
33
+ style: k,
34
+ onClickOverlay: _,
35
+ onClose: o,
36
+ closeModal: z,
37
+ withScroll: D = !0,
38
+ fullWidthFooter: W = !1,
39
+ helperElement: f,
40
+ ...R
41
41
  }) => {
42
- const $ = I(null), [R, p] = v(!1), _ = I(null), [j, A] = v(!1), [Y, P] = v(!1);
42
+ const C = L(null), [T, N] = y(!1), v = L(null), [j, A] = y(!1), [Y, P] = y(!1);
43
43
  U(m);
44
44
  const i = () => {
45
- p(!0), setTimeout(() => {
46
- H(), p(!1);
45
+ N(!0), setTimeout(() => {
46
+ z(), N(!1);
47
47
  }, 250);
48
48
  }, V = async (d) => {
49
49
  var r;
50
- (r = $.current) != null && r.contains(d.target) || y !== !1 && (typeof y == "function" && await y(), i());
50
+ (r = C.current) != null && r.contains(d.target) || _ !== !1 && (typeof _ == "function" && await _(), i());
51
51
  }, X = async () => {
52
- h !== !1 && (typeof h == "function" && await h(), i());
52
+ o !== !1 && (typeof o == "function" && await o(), i());
53
53
  }, Z = async () => {
54
54
  try {
55
55
  s != null && s.action && await s.action(), i();
@@ -62,78 +62,70 @@ import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closin
62
62
  } catch {
63
63
  return;
64
64
  }
65
- }, q = e && Object.keys(e).length > 0, G = s && Object.keys(s).length > 0, C = q && (e.show ?? !0), N = G && (s.show ?? !0), J = `${l.modal} ${O || ""}`;
65
+ }, q = e && Object.keys(e).length > 0, G = s && Object.keys(s).length > 0, E = q && (e.show ?? !0), I = G && (s.show ?? !0), J = `${l.modal} ${H || ""}`;
66
66
  return K(() => {
67
- if (!_.current) return;
68
- const d = _.current, r = () => {
67
+ if (!v.current) return;
68
+ const d = v.current, r = () => {
69
69
  P(d.scrollTop > 0), A(d.scrollHeight > d.clientHeight);
70
70
  };
71
71
  r(), d.addEventListener("scroll", r);
72
- const E = new ResizeObserver(r);
73
- return E.observe(d), () => {
74
- d.removeEventListener("scroll", r), E.disconnect();
72
+ const S = new ResizeObserver(r);
73
+ return S.observe(d), () => {
74
+ d.removeEventListener("scroll", r), S.disconnect();
75
75
  };
76
76
  }, [b]), m ? t(
77
77
  /* @__PURE__ */ a(
78
78
  "div",
79
79
  {
80
- className: `${l.modalOverlay} ${R ? l.closing : ""}`,
81
- style: { zIndex: 3e3 + (L || 0) },
80
+ className: `${l.modalOverlay} ${T ? l.closing : ""}`,
81
+ style: { zIndex: 3e3 + (F || 0) },
82
82
  onClick: V,
83
- children: /* @__PURE__ */ o("div", { ref: $, className: l.modalLayout, children: [
84
- /* @__PURE__ */ o(
83
+ children: /* @__PURE__ */ h("div", { ref: C, className: l.modalLayout, children: [
84
+ /* @__PURE__ */ h(
85
85
  "div",
86
86
  {
87
87
  className: J,
88
- style: { maxWidth: k, ...F },
89
- ...D,
88
+ style: { maxWidth: x, ...k },
89
+ ...R,
90
90
  children: [
91
- /* @__PURE__ */ o(
91
+ /* @__PURE__ */ h(
92
92
  "div",
93
93
  {
94
94
  className: `${l.modalHeader} ${Y ? l.withBorder : ""} `,
95
95
  children: [
96
- x && /* @__PURE__ */ a(
96
+ w && /* @__PURE__ */ a(
97
97
  "span",
98
98
  {
99
99
  className: `${l.modalTitle} ${g || ""}`,
100
- children: x
100
+ children: w
101
101
  }
102
102
  ),
103
- h !== !1 && /* @__PURE__ */ a("div", { className: l.closeIcon, onClick: X, children: /* @__PURE__ */ a(
104
- Q,
105
- {
106
- name: "Close",
107
- width: 12,
108
- height: 12,
109
- fill: "var(--Blacks-Transparencias-Black-40, rgba(0, 0, 0, 0.40)"
110
- }
111
- ) })
103
+ o !== !1 && /* @__PURE__ */ a("div", { className: l.closeIcon, onClick: X, children: /* @__PURE__ */ a(Q, { name: "CloseDrawer", size: 24 }) })
112
104
  ]
113
105
  }
114
106
  ),
115
107
  /* @__PURE__ */ a(
116
108
  "div",
117
109
  {
118
- className: `${l.modalBody} ${w || ""}`,
110
+ className: `${l.modalBody} ${$ || ""}`,
119
111
  style: {
120
- overflowY: f ? "auto" : "hidden"
112
+ overflowY: D ? "auto" : "hidden"
121
113
  },
122
- ref: _,
114
+ ref: v,
123
115
  children: /* @__PURE__ */ a(c.Provider, { value: i, children: b })
124
116
  }
125
117
  ),
126
- (C || N) && /* @__PURE__ */ a(
118
+ (E || I) && /* @__PURE__ */ a(
127
119
  "div",
128
120
  {
129
121
  className: `${l.modalFooter} ${j ? l.withBorder : ""}`,
130
- children: /* @__PURE__ */ o(
122
+ children: /* @__PURE__ */ h(
131
123
  "div",
132
124
  {
133
- className: `${l.buttonsDiv} ${T ? l.fullWidthFooter : ""} ${z || ""}`,
125
+ className: `${l.buttonsDiv} ${W ? l.fullWidthFooter : ""} ${p || ""}`,
134
126
  children: [
135
- C && /* @__PURE__ */ a(
136
- S,
127
+ E && /* @__PURE__ */ a(
128
+ O,
137
129
  {
138
130
  variant: (e == null ? void 0 : e.variant) || "outline",
139
131
  onClick: M,
@@ -146,8 +138,8 @@ import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closin
146
138
  children: (e == null ? void 0 : e.text) || "Cancelar"
147
139
  }
148
140
  ),
149
- N && /* @__PURE__ */ a(
150
- S,
141
+ I && /* @__PURE__ */ a(
142
+ O,
151
143
  {
152
144
  type: "submit",
153
145
  form: s == null ? void 0 : s.id,
@@ -170,7 +162,7 @@ import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closin
170
162
  ]
171
163
  }
172
164
  ),
173
- W
165
+ f
174
166
  ] })
175
167
  }
176
168
  ),
@@ -178,5 +170,5 @@ import '../../assets/index8.css';const u = "_modalOverlay_1hyzx_1", n = "_closin
178
170
  ) : null;
179
171
  };
180
172
  export {
181
- zs as Modal
173
+ ps as Modal
182
174
  };
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.6.7",
4
+ "version": "2.6.8",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",