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.
- package/dist/assets/index8.css +1 -1
- package/dist/components/modal/index.js +99 -97
- package/package.json +1 -1
package/dist/assets/index8.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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
|
|
3
|
-
import { Icon as
|
|
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
|
|
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 = "
|
|
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:
|
|
11
|
-
modalLayout:
|
|
12
|
-
modal:
|
|
13
|
-
modalHeader:
|
|
14
|
-
withBorder:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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:
|
|
37
|
-
withScroll:
|
|
38
|
-
fullWidthFooter:
|
|
39
|
-
helperElement:
|
|
40
|
-
useBlueTitle:
|
|
41
|
-
icon:
|
|
42
|
-
...
|
|
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
|
|
45
|
-
U(
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
},
|
|
51
|
-
var
|
|
52
|
-
(
|
|
53
|
-
},
|
|
54
|
-
h !== !1 && (typeof h == "function" && await h(),
|
|
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
|
-
|
|
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
|
-
|
|
65
|
+
s != null && s.action && await s.action(), r();
|
|
64
66
|
} catch {
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
|
-
}, G =
|
|
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 (!
|
|
70
|
-
const d =
|
|
71
|
-
|
|
71
|
+
if (!y.current) return;
|
|
72
|
+
const d = y.current, i = () => {
|
|
73
|
+
V(d.scrollTop > 0), Y(d.scrollHeight > d.clientHeight);
|
|
72
74
|
};
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
return
|
|
76
|
-
d.removeEventListener("scroll",
|
|
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
|
-
}, [
|
|
80
|
+
}, [m]), b ? u(
|
|
79
81
|
/* @__PURE__ */ a(
|
|
80
82
|
"div",
|
|
81
83
|
{
|
|
82
|
-
className: `${l.modalOverlay} ${
|
|
83
|
-
style: { zIndex: 3e3 + (
|
|
84
|
-
onClick:
|
|
85
|
-
children: /* @__PURE__ */ o("div", { ref:
|
|
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:
|
|
91
|
-
...
|
|
92
|
+
style: { maxWidth: x, ...H },
|
|
93
|
+
...R,
|
|
92
94
|
children: [
|
|
93
95
|
/* @__PURE__ */ o(
|
|
94
96
|
"div",
|
|
95
97
|
{
|
|
96
|
-
className: `${l.modalHeader} ${
|
|
98
|
+
className: `${l.modalHeader} ${P ? l.withBorder : ""} `,
|
|
97
99
|
children: [
|
|
98
|
-
|
|
99
|
-
|
|
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} ${
|
|
105
|
+
className: `${l.modalTitle} ${w || ""} `,
|
|
104
106
|
style: {
|
|
105
|
-
color:
|
|
107
|
+
color: I ? "#2054A5" : "inherit"
|
|
106
108
|
},
|
|
107
|
-
children:
|
|
109
|
+
children: t
|
|
108
110
|
}
|
|
109
111
|
)
|
|
110
112
|
] }),
|
|
111
|
-
h !== !1 && /* @__PURE__ */ a("div", { className: l.closeIcon, onClick:
|
|
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:
|
|
122
|
+
overflowY: W ? "auto" : "hidden"
|
|
121
123
|
},
|
|
122
|
-
ref:
|
|
123
|
-
children: /* @__PURE__ */ a(n.Provider, { value:
|
|
124
|
+
ref: y,
|
|
125
|
+
children: /* @__PURE__ */ a(n.Provider, { value: r, children: m })
|
|
124
126
|
}
|
|
125
127
|
),
|
|
126
|
-
(
|
|
128
|
+
(D || E) && /* @__PURE__ */ a(
|
|
127
129
|
"div",
|
|
128
130
|
{
|
|
129
|
-
className: `${l.modalFooter} ${
|
|
131
|
+
className: `${l.modalFooter} ${j ? l.withBorder : ""}`,
|
|
130
132
|
children: /* @__PURE__ */ o(
|
|
131
133
|
"div",
|
|
132
134
|
{
|
|
133
|
-
className: `${l.buttonsDiv} ${
|
|
135
|
+
className: `${l.buttonsDiv} ${c ? l.fullWidthFooter : ""} ${$ || ""}`,
|
|
134
136
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
D && /* @__PURE__ */ a(
|
|
138
|
+
f,
|
|
137
139
|
{
|
|
138
|
-
variant: (
|
|
140
|
+
variant: (s == null ? void 0 : s.variant) || "outline",
|
|
139
141
|
onClick: q,
|
|
140
|
-
disabled: (
|
|
141
|
-
size: (
|
|
142
|
-
loading:
|
|
143
|
-
className:
|
|
144
|
-
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: (
|
|
148
|
+
children: (s == null ? void 0 : s.text) || "Cancelar"
|
|
147
149
|
}
|
|
148
150
|
),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
E && /* @__PURE__ */ a(
|
|
152
|
+
f,
|
|
151
153
|
{
|
|
152
154
|
type: "submit",
|
|
153
|
-
form:
|
|
154
|
-
variant: (
|
|
155
|
+
form: e == null ? void 0 : e.id,
|
|
156
|
+
variant: (e == null ? void 0 : e.variant) || "brand",
|
|
155
157
|
onClick: M,
|
|
156
|
-
disabled: (
|
|
157
|
-
size: (
|
|
158
|
-
loading:
|
|
159
|
-
className:
|
|
160
|
-
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: (
|
|
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
|
-
|
|
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
|
-
|
|
183
|
+
Ce as Modal
|
|
182
184
|
};
|
package/package.json
CHANGED