bmi-next-brokers 2.6.6 → 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.
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}
|
|
@@ -16,5 +16,6 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
16
16
|
customBorderColor?: string;
|
|
17
17
|
variableMode?: boolean;
|
|
18
18
|
renderVariable?: (name: string) => React.ReactNode;
|
|
19
|
+
multiline?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const Input: ({ size, label, error, helperText, icon, className, required, inverted, btc, prefix, type, customBorderColor, variableMode, renderVariable, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const Input: ({ size, label, error, helperText, icon, className, required, inverted, btc, prefix, type, customBorderColor, variableMode, renderVariable, multiline, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,201 +1,205 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsxs as $, jsx as n, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { useState as H, useRef as T, useEffect as E } from "react";
|
|
3
|
+
import { createPortal as W } from "react-dom";
|
|
4
4
|
import { s as e } from "../../Input.module-CvbQKI27.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { FieldError as
|
|
7
|
-
import { HelperText as
|
|
8
|
-
import { useBTC as
|
|
9
|
-
const
|
|
5
|
+
import { Icon as _ } from "../../icons/Icon.js";
|
|
6
|
+
import { FieldError as U } from "../fieldError/index.js";
|
|
7
|
+
import { HelperText as X } from "../helperText/index.js";
|
|
8
|
+
import { useBTC as G } from "../../hooks/btcContext/useBtcContext.js";
|
|
9
|
+
const A = (a, s) => a.replace(
|
|
10
10
|
/{{([^}]+)}}/g,
|
|
11
|
-
(l, r) => `<span class="${
|
|
12
|
-
),
|
|
13
|
-
let
|
|
11
|
+
(l, r) => `<span class="${s}" data-variable="${r}" contenteditable="false"></span>`
|
|
12
|
+
), P = (a) => {
|
|
13
|
+
let s = "";
|
|
14
14
|
const l = (r) => {
|
|
15
|
-
r.nodeType === Node.TEXT_NODE ?
|
|
15
|
+
r.nodeType === Node.TEXT_NODE ? s += r.textContent ?? "" : r instanceof HTMLElement && (r.dataset.variable ? s += `{{${r.dataset.variable}}}` : r.childNodes.forEach(l));
|
|
16
16
|
};
|
|
17
|
-
return a.childNodes.forEach(l),
|
|
18
|
-
},
|
|
17
|
+
return a.childNodes.forEach(l), s;
|
|
18
|
+
}, S = ({
|
|
19
19
|
value: a = "",
|
|
20
|
-
placeholder:
|
|
20
|
+
placeholder: s,
|
|
21
21
|
className: l,
|
|
22
22
|
style: r,
|
|
23
|
-
disabled:
|
|
24
|
-
onChange:
|
|
25
|
-
renderVariable:
|
|
23
|
+
disabled: p,
|
|
24
|
+
onChange: v,
|
|
25
|
+
renderVariable: I,
|
|
26
|
+
multiline: i = !1
|
|
26
27
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
Array.from(
|
|
31
|
-
(d) =>
|
|
28
|
+
const f = T(null), u = T(!1), [h, w] = H([]), b = (t) => {
|
|
29
|
+
const m = t.querySelectorAll("[data-variable]");
|
|
30
|
+
w(
|
|
31
|
+
Array.from(m).map(
|
|
32
|
+
(d) => W(/* @__PURE__ */ n(R, { children: I(d.dataset.variable) }), d)
|
|
32
33
|
)
|
|
33
34
|
);
|
|
34
35
|
};
|
|
35
|
-
return
|
|
36
|
-
const t =
|
|
37
|
-
t && (t.innerHTML =
|
|
38
|
-
}, []),
|
|
39
|
-
const t =
|
|
36
|
+
return E(() => {
|
|
37
|
+
const t = f.current;
|
|
38
|
+
t && (t.innerHTML = A(a, e.variableSpan), b(t));
|
|
39
|
+
}, []), E(() => {
|
|
40
|
+
const t = f.current;
|
|
40
41
|
if (!t) return;
|
|
41
|
-
if (
|
|
42
|
-
|
|
42
|
+
if (u.current) {
|
|
43
|
+
u.current = !1;
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
if (
|
|
46
|
+
if (P(t) !== a && (t.innerHTML = A(a, e.variableSpan), b(t), document.activeElement === t)) {
|
|
46
47
|
const d = document.createRange(), c = window.getSelection();
|
|
47
48
|
d.selectNodeContents(t), d.collapse(!1), c == null || c.removeAllRanges(), c == null || c.addRange(d);
|
|
48
49
|
}
|
|
49
|
-
}, [a]), /* @__PURE__ */
|
|
50
|
+
}, [a]), /* @__PURE__ */ $(R, { children: [
|
|
50
51
|
/* @__PURE__ */ n(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
|
-
ref:
|
|
54
|
-
contentEditable: !
|
|
54
|
+
ref: f,
|
|
55
|
+
contentEditable: !p,
|
|
55
56
|
suppressContentEditableWarning: !0,
|
|
56
|
-
"data-placeholder":
|
|
57
|
+
"data-placeholder": s,
|
|
57
58
|
className: l,
|
|
58
59
|
style: r,
|
|
59
60
|
onInput: () => {
|
|
60
|
-
|
|
61
|
-
const t =
|
|
62
|
-
t && (
|
|
63
|
-
target: { value:
|
|
61
|
+
u.current = !0;
|
|
62
|
+
const t = f.current;
|
|
63
|
+
t && (v == null || v({
|
|
64
|
+
target: { value: P(t) }
|
|
64
65
|
}));
|
|
65
66
|
},
|
|
66
67
|
onKeyDown: (t) => {
|
|
67
|
-
t.key === "Enter" && t.preventDefault();
|
|
68
|
+
t.key === "Enter" && !i && t.preventDefault();
|
|
68
69
|
},
|
|
69
70
|
role: "textbox",
|
|
70
71
|
"aria-multiline": "true"
|
|
71
72
|
}
|
|
72
73
|
),
|
|
73
|
-
|
|
74
|
+
h
|
|
74
75
|
] });
|
|
75
|
-
},
|
|
76
|
+
}, ne = ({
|
|
76
77
|
size: a = "medium",
|
|
77
|
-
label:
|
|
78
|
+
label: s,
|
|
78
79
|
error: l,
|
|
79
80
|
helperText: r,
|
|
80
|
-
icon:
|
|
81
|
-
className:
|
|
82
|
-
required:
|
|
83
|
-
inverted:
|
|
84
|
-
btc:
|
|
85
|
-
prefix:
|
|
86
|
-
type:
|
|
87
|
-
customBorderColor:
|
|
88
|
-
variableMode:
|
|
81
|
+
icon: p,
|
|
82
|
+
className: v,
|
|
83
|
+
required: I,
|
|
84
|
+
inverted: i = !1,
|
|
85
|
+
btc: f,
|
|
86
|
+
prefix: u,
|
|
87
|
+
type: h,
|
|
88
|
+
customBorderColor: w,
|
|
89
|
+
variableMode: b,
|
|
89
90
|
renderVariable: x,
|
|
91
|
+
multiline: y = !1,
|
|
90
92
|
...t
|
|
91
93
|
}) => {
|
|
92
|
-
const [
|
|
93
|
-
if (
|
|
94
|
-
const o =
|
|
94
|
+
const [m, d] = H(!1), c = h === "password", N = h === "date", K = h === "textarea", C = T(null), { btc: j } = G(), k = f ?? j, M = () => {
|
|
95
|
+
if (h !== "textarea") return;
|
|
96
|
+
const o = C.current;
|
|
95
97
|
o && (o.style.height = "auto");
|
|
96
|
-
},
|
|
97
|
-
const o =
|
|
98
|
+
}, V = () => {
|
|
99
|
+
const o = C.current;
|
|
98
100
|
o && (o.style.height = "auto", o.style.height = o.scrollHeight + "px");
|
|
99
|
-
},
|
|
100
|
-
o.key === "Enter" && o.preventDefault();
|
|
101
|
+
}, q = (o) => {
|
|
102
|
+
o.key === "Enter" && !y && o.preventDefault();
|
|
101
103
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
E(() => {
|
|
105
|
+
M();
|
|
104
106
|
}, []);
|
|
105
|
-
const
|
|
107
|
+
const B = [
|
|
106
108
|
e.input,
|
|
107
109
|
e[a],
|
|
108
|
-
|
|
110
|
+
k && e.btc,
|
|
109
111
|
l ? e.error : "",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
].filter(Boolean).join(" "),
|
|
112
|
+
i ? e.inverted : "",
|
|
113
|
+
v
|
|
114
|
+
].filter(Boolean).join(" "), D = [
|
|
113
115
|
e.hiddenInput,
|
|
114
116
|
l ? e.hiddenInputError : "",
|
|
115
|
-
|
|
116
|
-
].filter(Boolean).join(" "),
|
|
117
|
-
d(!
|
|
118
|
-
},
|
|
119
|
-
return /* @__PURE__ */
|
|
117
|
+
N ? e.dateInput : ""
|
|
118
|
+
].filter(Boolean).join(" "), g = a === "small" ? 16 : a === "large" ? 20 : a === "extraLarge" ? 24 : 18, F = () => {
|
|
119
|
+
d(!m);
|
|
120
|
+
}, L = `${e.textArea} ${e[`textArea_${a}`]} ${e.hiddenInput} ${l ? e.hiddenInputError : ""} ${b ? ` ${e.textArea_variableMode}` : ""}`, O = `${D} ${e.variableInputDiv} ${e[a]}`;
|
|
121
|
+
return /* @__PURE__ */ $(
|
|
120
122
|
"div",
|
|
121
123
|
{
|
|
122
124
|
className: `${e.inputContainer} ${a === "medium" ? e.inputContainer_medium : a === "large" ? e.inputContainer_large : a === "extraLarge" ? e.inputContainer_extraLarge : ""} ${t.disabled ? e.disabled : ""}`,
|
|
123
125
|
children: [
|
|
124
|
-
|
|
126
|
+
s && /* @__PURE__ */ $(
|
|
125
127
|
"label",
|
|
126
128
|
{
|
|
127
|
-
className: `${e.label} ${a === "large" ? e.label_large : ""} ${a === "extraLarge" ? e.label_extraLarge : ""} ${
|
|
129
|
+
className: `${e.label} ${a === "large" ? e.label_large : ""} ${a === "extraLarge" ? e.label_extraLarge : ""} ${i ? e.label_inverted : ""} ${t.disabled ? e.disabled : ""}`,
|
|
128
130
|
children: [
|
|
129
|
-
|
|
131
|
+
s,
|
|
130
132
|
/* @__PURE__ */ n(
|
|
131
133
|
"span",
|
|
132
134
|
{
|
|
133
|
-
className: `${e.required} ${
|
|
134
|
-
children:
|
|
135
|
+
className: `${e.required} ${i ? e.required_inverted : ""}`,
|
|
136
|
+
children: I && "*"
|
|
135
137
|
}
|
|
136
138
|
)
|
|
137
139
|
]
|
|
138
140
|
}
|
|
139
141
|
),
|
|
140
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ $(
|
|
141
143
|
"div",
|
|
142
144
|
{
|
|
143
145
|
className: `${e.inputWrapper} ${t.disabled ? e.disabled : ""}`,
|
|
144
146
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ $(
|
|
146
148
|
"div",
|
|
147
149
|
{
|
|
148
|
-
className:
|
|
149
|
-
ref:
|
|
150
|
+
className: B,
|
|
151
|
+
ref: C,
|
|
150
152
|
style: {
|
|
151
153
|
...t.style,
|
|
152
|
-
...
|
|
154
|
+
...w && { borderColor: w }
|
|
153
155
|
},
|
|
154
156
|
children: [
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
(u || p) && /* @__PURE__ */ $("div", { className: e.prefixIcon, children: [
|
|
158
|
+
u && /* @__PURE__ */ n("span", { className: e.prefix, children: u }),
|
|
159
|
+
p && !N && /* @__PURE__ */ n(
|
|
158
160
|
"div",
|
|
159
161
|
{
|
|
160
|
-
className: `${e.icon} ${
|
|
161
|
-
children: /* @__PURE__ */ n(
|
|
162
|
+
className: `${e.icon} ${i ? e.icon_inverted : ""} `,
|
|
163
|
+
children: /* @__PURE__ */ n(_, { name: p, width: g, height: g })
|
|
162
164
|
}
|
|
163
165
|
)
|
|
164
166
|
] }),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
K ? b && x ? /* @__PURE__ */ n(
|
|
168
|
+
S,
|
|
167
169
|
{
|
|
168
|
-
className:
|
|
170
|
+
className: L,
|
|
169
171
|
value: t.value,
|
|
170
172
|
placeholder: t.placeholder,
|
|
171
173
|
style: t.style,
|
|
172
174
|
disabled: t.disabled,
|
|
173
175
|
onChange: t.onChange,
|
|
174
|
-
renderVariable: x
|
|
176
|
+
renderVariable: x,
|
|
177
|
+
multiline: y
|
|
175
178
|
}
|
|
176
179
|
) : /* @__PURE__ */ n(
|
|
177
180
|
"textarea",
|
|
178
181
|
{
|
|
179
|
-
className:
|
|
180
|
-
onChange:
|
|
181
|
-
onKeyDown:
|
|
182
|
+
className: L,
|
|
183
|
+
onChange: V,
|
|
184
|
+
onKeyDown: q,
|
|
182
185
|
...t
|
|
183
186
|
}
|
|
184
|
-
) :
|
|
185
|
-
|
|
187
|
+
) : b && x ? /* @__PURE__ */ n(
|
|
188
|
+
S,
|
|
186
189
|
{
|
|
187
|
-
className:
|
|
190
|
+
className: O,
|
|
188
191
|
value: t.value,
|
|
189
192
|
placeholder: t.placeholder,
|
|
190
193
|
disabled: t.disabled,
|
|
191
194
|
onChange: t.onChange,
|
|
192
|
-
renderVariable: x
|
|
195
|
+
renderVariable: x,
|
|
196
|
+
multiline: y
|
|
193
197
|
}
|
|
194
198
|
) : /* @__PURE__ */ n(
|
|
195
199
|
"input",
|
|
196
200
|
{
|
|
197
|
-
className:
|
|
198
|
-
type: c ?
|
|
201
|
+
className: D,
|
|
202
|
+
type: c ? m ? "text" : "password" : h,
|
|
199
203
|
...t
|
|
200
204
|
}
|
|
201
205
|
)
|
|
@@ -206,30 +210,30 @@ const R = (a, i) => a.replace(
|
|
|
206
210
|
"button",
|
|
207
211
|
{
|
|
208
212
|
type: "button",
|
|
209
|
-
className: `${e.passwordToggle} ${
|
|
210
|
-
onClick:
|
|
213
|
+
className: `${e.passwordToggle} ${i ? e.passwordToggle_inverted : ""}`,
|
|
214
|
+
onClick: F,
|
|
211
215
|
disabled: t.disabled,
|
|
212
|
-
"aria-label":
|
|
216
|
+
"aria-label": m ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
213
217
|
children: /* @__PURE__ */ n(
|
|
214
|
-
|
|
218
|
+
_,
|
|
215
219
|
{
|
|
216
|
-
name:
|
|
217
|
-
width:
|
|
218
|
-
height:
|
|
220
|
+
name: m ? "VisibilityOff" : "Visibility",
|
|
221
|
+
width: g,
|
|
222
|
+
height: g
|
|
219
223
|
}
|
|
220
224
|
)
|
|
221
225
|
}
|
|
222
226
|
),
|
|
223
|
-
|
|
227
|
+
N && /* @__PURE__ */ n(
|
|
224
228
|
"div",
|
|
225
229
|
{
|
|
226
|
-
className: `${e.dateIcon} ${
|
|
230
|
+
className: `${e.dateIcon} ${i ? e.dateIcon_inverted : ""} ${l ? e.dateIcon_error : ""} ${l && i ? e.dateIcon_inverted_error : ""}`,
|
|
227
231
|
children: /* @__PURE__ */ n(
|
|
228
|
-
|
|
232
|
+
_,
|
|
229
233
|
{
|
|
230
234
|
name: "CalendarIcon",
|
|
231
|
-
width:
|
|
232
|
-
height:
|
|
235
|
+
width: g + 2,
|
|
236
|
+
height: g + 2
|
|
233
237
|
}
|
|
234
238
|
)
|
|
235
239
|
}
|
|
@@ -237,12 +241,12 @@ const R = (a, i) => a.replace(
|
|
|
237
241
|
]
|
|
238
242
|
}
|
|
239
243
|
),
|
|
240
|
-
l && /* @__PURE__ */ n(
|
|
241
|
-
r && !l && /* @__PURE__ */ n(
|
|
244
|
+
l && /* @__PURE__ */ n(U, { size: a, message: l }),
|
|
245
|
+
r && !l && /* @__PURE__ */ n(X, { message: r, size: a, inverted: i })
|
|
242
246
|
]
|
|
243
247
|
}
|
|
244
248
|
);
|
|
245
249
|
};
|
|
246
250
|
export {
|
|
247
|
-
|
|
251
|
+
ne as Input
|
|
248
252
|
};
|
|
@@ -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