bmi-next-brokers 2.6.7 → 2.6.9
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/assets/index8.css +1 -1
- package/dist/components/Input/Input.js +150 -136
- package/dist/components/modal/index.js +54 -62
- package/package.json +3 -2
package/dist/assets/index8.css
CHANGED
|
@@ -1 +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,239 +1,253 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsxs as v, jsx as r, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useRef as E, useEffect as T } from "react";
|
|
3
|
+
import { createPortal as U } from "react-dom";
|
|
4
4
|
import { s as e } from "../../Input.module-CvbQKI27.js";
|
|
5
5
|
import { Icon as _ } from "../../icons/Icon.js";
|
|
6
|
-
import { FieldError as
|
|
6
|
+
import { FieldError as W } from "../fieldError/index.js";
|
|
7
7
|
import { HelperText as X } from "../helperText/index.js";
|
|
8
8
|
import { useBTC as G } from "../../hooks/btcContext/useBtcContext.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const F = (a, h, s = !1) => {
|
|
10
|
+
let o = a.replace(
|
|
11
|
+
/{{([^}]+)}}/g,
|
|
12
|
+
(d, l) => `<span class="${h}" data-variable="${l}" contenteditable="false"></span>`
|
|
13
|
+
);
|
|
14
|
+
return s && (o = o.replace(/\n/g, "<br>")), o;
|
|
15
|
+
}, P = (a, h = !1) => {
|
|
16
|
+
let s = "", o = !0;
|
|
17
|
+
const d = (l, x = !1) => {
|
|
18
|
+
if (l.nodeType === Node.TEXT_NODE)
|
|
19
|
+
s += l.textContent ?? "";
|
|
20
|
+
else if (l instanceof HTMLElement) {
|
|
21
|
+
const i = l.tagName.toUpperCase();
|
|
22
|
+
l.dataset.variable ? s += `{{${l.dataset.variable}}}` : i === "BR" ? h && (s += `
|
|
23
|
+
`) : x && (i === "DIV" || i === "P") ? (h && !o && (s += `
|
|
24
|
+
`), o = !1, l.childNodes.forEach((c) => d(c, !1))) : l.childNodes.forEach((c) => d(c, !1));
|
|
25
|
+
}
|
|
16
26
|
};
|
|
17
|
-
return a.childNodes.forEach(l), s;
|
|
18
|
-
},
|
|
27
|
+
return a.childNodes.forEach((l) => d(l, !0)), s;
|
|
28
|
+
}, A = ({
|
|
19
29
|
value: a = "",
|
|
20
|
-
placeholder:
|
|
21
|
-
className:
|
|
22
|
-
style:
|
|
23
|
-
disabled:
|
|
24
|
-
onChange:
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
placeholder: h,
|
|
31
|
+
className: s,
|
|
32
|
+
style: o,
|
|
33
|
+
disabled: d,
|
|
34
|
+
onChange: l,
|
|
35
|
+
onFocus: x,
|
|
36
|
+
renderVariable: i,
|
|
37
|
+
multiline: c = !1
|
|
27
38
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
Array.from(
|
|
32
|
-
(
|
|
39
|
+
const g = E(null), m = E(!1), [N, I] = S([]), $ = (t) => {
|
|
40
|
+
const y = t.querySelectorAll("[data-variable]");
|
|
41
|
+
I(
|
|
42
|
+
Array.from(y).map(
|
|
43
|
+
(b) => U(/* @__PURE__ */ r(R, { children: i(b.dataset.variable) }), b)
|
|
33
44
|
)
|
|
34
45
|
);
|
|
35
46
|
};
|
|
36
|
-
return
|
|
37
|
-
const t =
|
|
38
|
-
t && (t.innerHTML =
|
|
39
|
-
}, []),
|
|
40
|
-
const t =
|
|
47
|
+
return T(() => {
|
|
48
|
+
const t = g.current;
|
|
49
|
+
t && (t.innerHTML = F(a, e.variableSpan, c), $(t));
|
|
50
|
+
}, []), T(() => {
|
|
51
|
+
const t = g.current;
|
|
41
52
|
if (!t) return;
|
|
42
|
-
if (
|
|
43
|
-
|
|
53
|
+
if (m.current) {
|
|
54
|
+
m.current = !1;
|
|
44
55
|
return;
|
|
45
56
|
}
|
|
46
|
-
if (P(t) !== a && (t.innerHTML =
|
|
47
|
-
const
|
|
48
|
-
|
|
57
|
+
if (P(t, c) !== a && (t.innerHTML = F(a, e.variableSpan, c), $(t), document.activeElement === t)) {
|
|
58
|
+
const b = document.createRange(), u = window.getSelection();
|
|
59
|
+
b.selectNodeContents(t), b.collapse(!1), u == null || u.removeAllRanges(), u == null || u.addRange(b);
|
|
49
60
|
}
|
|
50
|
-
}, [a]), /* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
61
|
+
}, [a]), /* @__PURE__ */ v(R, { children: [
|
|
62
|
+
/* @__PURE__ */ r(
|
|
52
63
|
"div",
|
|
53
64
|
{
|
|
54
|
-
ref:
|
|
55
|
-
contentEditable: !
|
|
65
|
+
ref: g,
|
|
66
|
+
contentEditable: !d,
|
|
56
67
|
suppressContentEditableWarning: !0,
|
|
57
|
-
"data-placeholder":
|
|
58
|
-
className:
|
|
59
|
-
style:
|
|
68
|
+
"data-placeholder": h,
|
|
69
|
+
className: s,
|
|
70
|
+
style: o,
|
|
60
71
|
onInput: () => {
|
|
61
|
-
|
|
62
|
-
const t =
|
|
63
|
-
t && (
|
|
64
|
-
target: { value: P(t) }
|
|
72
|
+
m.current = !0;
|
|
73
|
+
const t = g.current;
|
|
74
|
+
t && (l == null || l({
|
|
75
|
+
target: { value: P(t, c) }
|
|
65
76
|
}));
|
|
66
77
|
},
|
|
67
78
|
onKeyDown: (t) => {
|
|
68
|
-
t.key === "Enter" && !
|
|
79
|
+
t.key === "Enter" && !c && t.preventDefault();
|
|
69
80
|
},
|
|
81
|
+
onFocus: x,
|
|
70
82
|
role: "textbox",
|
|
71
83
|
"aria-multiline": "true"
|
|
72
84
|
}
|
|
73
85
|
),
|
|
74
|
-
|
|
86
|
+
N
|
|
75
87
|
] });
|
|
76
88
|
}, ne = ({
|
|
77
89
|
size: a = "medium",
|
|
78
|
-
label:
|
|
79
|
-
error:
|
|
80
|
-
helperText:
|
|
81
|
-
icon:
|
|
82
|
-
className:
|
|
83
|
-
required:
|
|
90
|
+
label: h,
|
|
91
|
+
error: s,
|
|
92
|
+
helperText: o,
|
|
93
|
+
icon: d,
|
|
94
|
+
className: l,
|
|
95
|
+
required: x,
|
|
84
96
|
inverted: i = !1,
|
|
85
|
-
btc:
|
|
86
|
-
prefix:
|
|
87
|
-
type:
|
|
88
|
-
customBorderColor:
|
|
89
|
-
variableMode:
|
|
90
|
-
renderVariable:
|
|
91
|
-
multiline:
|
|
92
|
-
...
|
|
97
|
+
btc: c,
|
|
98
|
+
prefix: g,
|
|
99
|
+
type: m,
|
|
100
|
+
customBorderColor: N,
|
|
101
|
+
variableMode: I,
|
|
102
|
+
renderVariable: $,
|
|
103
|
+
multiline: w = !1,
|
|
104
|
+
...n
|
|
93
105
|
}) => {
|
|
94
|
-
const [
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
|
|
106
|
+
const [t, y] = S(!1), b = m === "password", u = m === "date", H = m === "textarea", C = E(null), { btc: k } = G(), B = c ?? k, K = () => {
|
|
107
|
+
if (m !== "textarea") return;
|
|
108
|
+
const f = C.current;
|
|
109
|
+
f && (f.style.height = "auto");
|
|
98
110
|
}, V = () => {
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
|
|
111
|
+
const f = C.current;
|
|
112
|
+
f && (f.style.height = "auto", f.style.height = f.scrollHeight + "px");
|
|
113
|
+
}, j = (f) => {
|
|
114
|
+
f.key === "Enter" && !w && f.preventDefault();
|
|
103
115
|
};
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
T(() => {
|
|
117
|
+
K();
|
|
106
118
|
}, []);
|
|
107
|
-
const
|
|
119
|
+
const M = [
|
|
108
120
|
e.input,
|
|
109
121
|
e[a],
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
B && e.btc,
|
|
123
|
+
s ? e.error : "",
|
|
112
124
|
i ? e.inverted : "",
|
|
113
|
-
|
|
125
|
+
l
|
|
114
126
|
].filter(Boolean).join(" "), D = [
|
|
115
127
|
e.hiddenInput,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
].filter(Boolean).join(" "),
|
|
119
|
-
|
|
120
|
-
}, L = `${e.textArea} ${e[`textArea_${a}`]} ${e.hiddenInput} ${
|
|
121
|
-
return /* @__PURE__ */
|
|
128
|
+
s ? e.hiddenInputError : "",
|
|
129
|
+
u ? e.dateInput : ""
|
|
130
|
+
].filter(Boolean).join(" "), p = a === "small" ? 16 : a === "large" ? 20 : a === "extraLarge" ? 24 : 18, q = () => {
|
|
131
|
+
y(!t);
|
|
132
|
+
}, L = `${e.textArea} ${e[`textArea_${a}`]} ${e.hiddenInput} ${s ? e.hiddenInputError : ""} ${I ? ` ${e.textArea_variableMode}` : ""}`, O = `${D} ${e.variableInputDiv} ${e[a]}`;
|
|
133
|
+
return /* @__PURE__ */ v(
|
|
122
134
|
"div",
|
|
123
135
|
{
|
|
124
|
-
className: `${e.inputContainer} ${a === "medium" ? e.inputContainer_medium : a === "large" ? e.inputContainer_large : a === "extraLarge" ? e.inputContainer_extraLarge : ""} ${
|
|
136
|
+
className: `${e.inputContainer} ${a === "medium" ? e.inputContainer_medium : a === "large" ? e.inputContainer_large : a === "extraLarge" ? e.inputContainer_extraLarge : ""} ${n.disabled ? e.disabled : ""}`,
|
|
125
137
|
children: [
|
|
126
|
-
|
|
138
|
+
h && /* @__PURE__ */ v(
|
|
127
139
|
"label",
|
|
128
140
|
{
|
|
129
|
-
className: `${e.label} ${a === "large" ? e.label_large : ""} ${a === "extraLarge" ? e.label_extraLarge : ""} ${i ? e.label_inverted : ""} ${
|
|
141
|
+
className: `${e.label} ${a === "large" ? e.label_large : ""} ${a === "extraLarge" ? e.label_extraLarge : ""} ${i ? e.label_inverted : ""} ${n.disabled ? e.disabled : ""}`,
|
|
130
142
|
children: [
|
|
131
|
-
|
|
132
|
-
/* @__PURE__ */
|
|
143
|
+
h,
|
|
144
|
+
/* @__PURE__ */ r(
|
|
133
145
|
"span",
|
|
134
146
|
{
|
|
135
147
|
className: `${e.required} ${i ? e.required_inverted : ""}`,
|
|
136
|
-
children:
|
|
148
|
+
children: x && "*"
|
|
137
149
|
}
|
|
138
150
|
)
|
|
139
151
|
]
|
|
140
152
|
}
|
|
141
153
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ v(
|
|
143
155
|
"div",
|
|
144
156
|
{
|
|
145
|
-
className: `${e.inputWrapper} ${
|
|
157
|
+
className: `${e.inputWrapper} ${n.disabled ? e.disabled : ""}`,
|
|
146
158
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ v(
|
|
148
160
|
"div",
|
|
149
161
|
{
|
|
150
|
-
className:
|
|
162
|
+
className: M,
|
|
151
163
|
ref: C,
|
|
152
164
|
style: {
|
|
153
|
-
...
|
|
154
|
-
...
|
|
165
|
+
...n.style,
|
|
166
|
+
...N && { borderColor: N }
|
|
155
167
|
},
|
|
156
168
|
children: [
|
|
157
|
-
(
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
(g || d) && /* @__PURE__ */ v("div", { className: e.prefixIcon, children: [
|
|
170
|
+
g && /* @__PURE__ */ r("span", { className: e.prefix, children: g }),
|
|
171
|
+
d && !u && /* @__PURE__ */ r(
|
|
160
172
|
"div",
|
|
161
173
|
{
|
|
162
174
|
className: `${e.icon} ${i ? e.icon_inverted : ""} `,
|
|
163
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ r(_, { name: d, width: p, height: p })
|
|
164
176
|
}
|
|
165
177
|
)
|
|
166
178
|
] }),
|
|
167
|
-
|
|
168
|
-
|
|
179
|
+
H ? I && $ ? /* @__PURE__ */ r(
|
|
180
|
+
A,
|
|
169
181
|
{
|
|
170
182
|
className: L,
|
|
171
|
-
value:
|
|
172
|
-
placeholder:
|
|
173
|
-
style:
|
|
174
|
-
disabled:
|
|
175
|
-
onChange:
|
|
176
|
-
|
|
177
|
-
|
|
183
|
+
value: n.value,
|
|
184
|
+
placeholder: n.placeholder,
|
|
185
|
+
style: n.style,
|
|
186
|
+
disabled: n.disabled,
|
|
187
|
+
onChange: n.onChange,
|
|
188
|
+
onFocus: n.onFocus,
|
|
189
|
+
renderVariable: $,
|
|
190
|
+
multiline: w
|
|
178
191
|
}
|
|
179
|
-
) : /* @__PURE__ */
|
|
192
|
+
) : /* @__PURE__ */ r(
|
|
180
193
|
"textarea",
|
|
181
194
|
{
|
|
182
195
|
className: L,
|
|
183
196
|
onChange: V,
|
|
184
|
-
onKeyDown:
|
|
185
|
-
...
|
|
197
|
+
onKeyDown: j,
|
|
198
|
+
...n
|
|
186
199
|
}
|
|
187
|
-
) :
|
|
188
|
-
|
|
200
|
+
) : I && $ ? /* @__PURE__ */ r(
|
|
201
|
+
A,
|
|
189
202
|
{
|
|
190
203
|
className: O,
|
|
191
|
-
value:
|
|
192
|
-
placeholder:
|
|
193
|
-
disabled:
|
|
194
|
-
onChange:
|
|
195
|
-
|
|
196
|
-
|
|
204
|
+
value: n.value,
|
|
205
|
+
placeholder: n.placeholder,
|
|
206
|
+
disabled: n.disabled,
|
|
207
|
+
onChange: n.onChange,
|
|
208
|
+
onFocus: n.onFocus,
|
|
209
|
+
renderVariable: $,
|
|
210
|
+
multiline: w
|
|
197
211
|
}
|
|
198
|
-
) : /* @__PURE__ */
|
|
212
|
+
) : /* @__PURE__ */ r(
|
|
199
213
|
"input",
|
|
200
214
|
{
|
|
201
215
|
className: D,
|
|
202
|
-
type:
|
|
203
|
-
...
|
|
216
|
+
type: b ? t ? "text" : "password" : m,
|
|
217
|
+
...n
|
|
204
218
|
}
|
|
205
219
|
)
|
|
206
220
|
]
|
|
207
221
|
}
|
|
208
222
|
),
|
|
209
|
-
|
|
223
|
+
b && /* @__PURE__ */ r(
|
|
210
224
|
"button",
|
|
211
225
|
{
|
|
212
226
|
type: "button",
|
|
213
227
|
className: `${e.passwordToggle} ${i ? e.passwordToggle_inverted : ""}`,
|
|
214
|
-
onClick:
|
|
215
|
-
disabled:
|
|
216
|
-
"aria-label":
|
|
217
|
-
children: /* @__PURE__ */
|
|
228
|
+
onClick: q,
|
|
229
|
+
disabled: n.disabled,
|
|
230
|
+
"aria-label": t ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
231
|
+
children: /* @__PURE__ */ r(
|
|
218
232
|
_,
|
|
219
233
|
{
|
|
220
|
-
name:
|
|
221
|
-
width:
|
|
222
|
-
height:
|
|
234
|
+
name: t ? "VisibilityOff" : "Visibility",
|
|
235
|
+
width: p,
|
|
236
|
+
height: p
|
|
223
237
|
}
|
|
224
238
|
)
|
|
225
239
|
}
|
|
226
240
|
),
|
|
227
|
-
|
|
241
|
+
u && /* @__PURE__ */ r(
|
|
228
242
|
"div",
|
|
229
243
|
{
|
|
230
|
-
className: `${e.dateIcon} ${i ? e.dateIcon_inverted : ""} ${
|
|
231
|
-
children: /* @__PURE__ */
|
|
244
|
+
className: `${e.dateIcon} ${i ? e.dateIcon_inverted : ""} ${s ? e.dateIcon_error : ""} ${s && i ? e.dateIcon_inverted_error : ""}`,
|
|
245
|
+
children: /* @__PURE__ */ r(
|
|
232
246
|
_,
|
|
233
247
|
{
|
|
234
248
|
name: "CalendarIcon",
|
|
235
|
-
width:
|
|
236
|
-
height:
|
|
249
|
+
width: p + 2,
|
|
250
|
+
height: p + 2
|
|
237
251
|
}
|
|
238
252
|
)
|
|
239
253
|
}
|
|
@@ -241,8 +255,8 @@ const A = (a, s) => a.replace(
|
|
|
241
255
|
]
|
|
242
256
|
}
|
|
243
257
|
),
|
|
244
|
-
|
|
245
|
-
|
|
258
|
+
s && /* @__PURE__ */ r(W, { size: a, message: s }),
|
|
259
|
+
o && !s && /* @__PURE__ */ r(X, { message: o, size: a, inverted: i })
|
|
246
260
|
]
|
|
247
261
|
}
|
|
248
262
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useRef as
|
|
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
|
|
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 = "
|
|
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:
|
|
20
|
-
fullWidthFooter:
|
|
21
|
-
},
|
|
19
|
+
buttonsDiv: os,
|
|
20
|
+
fullWidthFooter: hs
|
|
21
|
+
}, ps = ({
|
|
22
22
|
isOpen: m,
|
|
23
|
-
title:
|
|
23
|
+
title: w,
|
|
24
24
|
children: b,
|
|
25
|
-
width:
|
|
25
|
+
width: x = 752,
|
|
26
26
|
confirmButton: s,
|
|
27
27
|
cancelButton: e,
|
|
28
|
-
zIndex:
|
|
29
|
-
className:
|
|
28
|
+
zIndex: F,
|
|
29
|
+
className: H,
|
|
30
30
|
titleClassName: g,
|
|
31
|
-
contentClassName:
|
|
32
|
-
footerClassName:
|
|
33
|
-
style:
|
|
34
|
-
onClickOverlay:
|
|
35
|
-
onClose:
|
|
36
|
-
closeModal:
|
|
37
|
-
withScroll:
|
|
38
|
-
fullWidthFooter:
|
|
39
|
-
helperElement:
|
|
40
|
-
...
|
|
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
|
|
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
|
-
|
|
46
|
-
|
|
45
|
+
N(!0), setTimeout(() => {
|
|
46
|
+
z(), N(!1);
|
|
47
47
|
}, 250);
|
|
48
48
|
}, V = async (d) => {
|
|
49
49
|
var r;
|
|
50
|
-
(r =
|
|
50
|
+
(r = C.current) != null && r.contains(d.target) || _ !== !1 && (typeof _ == "function" && await _(), i());
|
|
51
51
|
}, X = async () => {
|
|
52
|
-
|
|
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,
|
|
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 (!
|
|
68
|
-
const d =
|
|
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
|
|
73
|
-
return
|
|
74
|
-
d.removeEventListener("scroll", r),
|
|
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} ${
|
|
81
|
-
style: { zIndex: 3e3 + (
|
|
80
|
+
className: `${l.modalOverlay} ${T ? l.closing : ""}`,
|
|
81
|
+
style: { zIndex: 3e3 + (F || 0) },
|
|
82
82
|
onClick: V,
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
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:
|
|
89
|
-
...
|
|
88
|
+
style: { maxWidth: x, ...k },
|
|
89
|
+
...R,
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ h(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
94
|
className: `${l.modalHeader} ${Y ? l.withBorder : ""} `,
|
|
95
95
|
children: [
|
|
96
|
-
|
|
96
|
+
w && /* @__PURE__ */ a(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
className: `${l.modalTitle} ${g || ""}`,
|
|
100
|
-
children:
|
|
100
|
+
children: w
|
|
101
101
|
}
|
|
102
102
|
),
|
|
103
|
-
|
|
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} ${
|
|
110
|
+
className: `${l.modalBody} ${$ || ""}`,
|
|
119
111
|
style: {
|
|
120
|
-
overflowY:
|
|
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
|
-
(
|
|
118
|
+
(E || I) && /* @__PURE__ */ a(
|
|
127
119
|
"div",
|
|
128
120
|
{
|
|
129
121
|
className: `${l.modalFooter} ${j ? l.withBorder : ""}`,
|
|
130
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ h(
|
|
131
123
|
"div",
|
|
132
124
|
{
|
|
133
|
-
className: `${l.buttonsDiv} ${
|
|
125
|
+
className: `${l.buttonsDiv} ${W ? l.fullWidthFooter : ""} ${p || ""}`,
|
|
134
126
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
150
|
-
|
|
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
|
-
|
|
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
|
-
|
|
173
|
+
ps as Modal
|
|
182
174
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmi-next-brokers",
|
|
3
3
|
"description": "Componentes de UI para proyecto BMI Next Brokers",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.9",
|
|
5
5
|
"author": "BMI Ahorro España",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"José Ramón Jiménez <jrjimenez@bmicos.com>",
|
|
8
8
|
"David Fernández Bolaños <dafernandez@bmicos.com>",
|
|
9
9
|
"Jorge Martín <jmartin@bmicos.com>",
|
|
10
|
-
"Alonso Mangas <amangas@bmicos.com>"
|
|
10
|
+
"Alonso Mangas <amangas@bmicos.com>",
|
|
11
|
+
"Pablo Bejar <pbejar@bmicos.com>"
|
|
11
12
|
],
|
|
12
13
|
"license": "MIT",
|
|
13
14
|
"type": "module",
|