bmi-next-brokers 1.1.4 → 1.1.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/index7.css +1 -1
- package/dist/components/FileUpload/CompactFileUpload.d.ts +1 -0
- package/dist/components/FileUpload/CompactFileUpload.js +96 -95
- package/dist/components/FileUpload/FileUpload.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.js +129 -128
- package/dist/components/modal/index.d.ts +44 -29
- package/dist/components/modal/index.js +83 -65
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/ArrowForward.d.ts +3 -0
- package/dist/icons/components/ArrowForward.js +10 -0
- package/dist/icons/components/index.d.ts +3 -2
- package/dist/icons/components/index.js +172 -170
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +190 -188
- package/dist/index-CYre5lRF.js +214 -0
- package/package.json +1 -1
- package/dist/index-CFSpGUXZ.js +0 -212
package/dist/assets/index7.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._modalOverlay_1x735_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;animation:_overlayFadeIn_1x735_1 .25s ease-in-out forwards;overflow:hidden}._modalOverlay_1x735_1._closing_1x735_15{animation:_overlayFadeOut_1x735_1 .25s ease-in-out forwards}@keyframes _overlayFadeIn_1x735_1{0%{opacity:0}to{opacity:1}}@keyframes _overlayFadeOut_1x735_1{0%{opacity:1}to{opacity:0}}._modal_1x735_1{display:flex;flex-direction:column;border-radius:24px;background-color:#fff;box-shadow:0 4px 6px #0000001a;max-height:calc(100dvh - 15px)}._modalHeader_1x735_47{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:8px}._modalTitle_1x735_55{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}._closeIcon_1x735_66{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_1x735_79{flex:1;overflow-y:auto;padding:0 16px 16px}._modalBody_1x735_79::-webkit-scrollbar{display:none}._modalFooter_1x735_89{display:grid;grid-template-columns:1fr 1fr;margin-left:auto;width:fit-content;gap:19px;padding-inline:16px;margin-block:16px}._modalFooter_1x735_89 :only-child{grid-column:2}
|
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import { jsx as e, jsxs as _, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as e, jsxs as _, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { useState as D, useRef as j, useEffect as $ } from "react";
|
|
3
3
|
import { Icon as u } from "../../icons/Icon.js";
|
|
4
|
-
import { Spinner as
|
|
5
|
-
import '../../assets/CompactFileUpload.css';const
|
|
6
|
-
inputContainer:
|
|
7
|
-
compactFileUploadContainer:
|
|
8
|
-
dragOver:
|
|
9
|
-
variant_document:
|
|
10
|
-
icon:
|
|
11
|
-
variant_add:
|
|
12
|
-
disabled:
|
|
13
|
-
error:
|
|
14
|
-
success:
|
|
15
|
-
loading:
|
|
16
|
-
inverted:
|
|
17
|
-
uploadContent:
|
|
18
|
-
textContent:
|
|
19
|
-
dragText:
|
|
20
|
-
hiddenInput:
|
|
21
|
-
compactFileContent:
|
|
4
|
+
import { Spinner as z } from "../Spinner/Spinner.js";
|
|
5
|
+
import '../../assets/CompactFileUpload.css';const R = "_inputContainer_ta4er_1", q = "_compactFileUploadContainer_ta4er_8", H = "_dragOver_ta4er_26", M = "_variant_document_ta4er_32", S = "_icon_ta4er_32", Y = "_variant_add_ta4er_36", G = "_disabled_ta4er_41", J = "_error_ta4er_52", K = "_success_ta4er_60", P = "_loading_ta4er_68", Q = "_inverted_ta4er_77", X = "_uploadContent_ta4er_102", Z = "_textContent_ta4er_112", tt = "_dragText_ta4er_121", et = "_hiddenInput_ta4er_151", nt = "_compactFileContent_ta4er_164", at = "_compactFileIcon_ta4er_172", ct = "_compactIconBackground_ta4er_182", ot = "_compactErrorText_ta4er_191", it = "_compactSuccessText_ta4er_191", rt = "_compactLabel_ta4er_191", lt = "_compactFileText_ta4er_191", st = "_compactFileName_ta4er_203", dt = "_addIconWrapper_ta4er_239", pt = "_compactVisibilityIcon_ta4er_245", mt = "_compactActions_ta4er_261", _t = "_compactDeleteAction_ta4er_268", ht = "_deleteText_ta4er_279", t = {
|
|
6
|
+
inputContainer: R,
|
|
7
|
+
compactFileUploadContainer: q,
|
|
8
|
+
dragOver: H,
|
|
9
|
+
variant_document: M,
|
|
10
|
+
icon: S,
|
|
11
|
+
variant_add: Y,
|
|
12
|
+
disabled: G,
|
|
13
|
+
error: J,
|
|
14
|
+
success: K,
|
|
15
|
+
loading: P,
|
|
16
|
+
inverted: Q,
|
|
17
|
+
uploadContent: X,
|
|
18
|
+
textContent: Z,
|
|
19
|
+
dragText: tt,
|
|
20
|
+
hiddenInput: et,
|
|
21
|
+
compactFileContent: nt,
|
|
22
22
|
compactFileIcon: at,
|
|
23
|
-
compactIconBackground:
|
|
24
|
-
compactErrorText:
|
|
25
|
-
compactSuccessText:
|
|
26
|
-
compactLabel:
|
|
27
|
-
compactFileText:
|
|
28
|
-
compactFileName:
|
|
29
|
-
addIconWrapper:
|
|
30
|
-
compactVisibilityIcon:
|
|
31
|
-
compactActions:
|
|
32
|
-
compactDeleteAction:
|
|
33
|
-
deleteText:
|
|
34
|
-
},
|
|
35
|
-
variant:
|
|
23
|
+
compactIconBackground: ct,
|
|
24
|
+
compactErrorText: ot,
|
|
25
|
+
compactSuccessText: it,
|
|
26
|
+
compactLabel: rt,
|
|
27
|
+
compactFileText: lt,
|
|
28
|
+
compactFileName: st,
|
|
29
|
+
addIconWrapper: dt,
|
|
30
|
+
compactVisibilityIcon: pt,
|
|
31
|
+
compactActions: mt,
|
|
32
|
+
compactDeleteAction: _t,
|
|
33
|
+
deleteText: ht
|
|
34
|
+
}, xt = ({
|
|
35
|
+
variant: T = "document",
|
|
36
36
|
label: C,
|
|
37
|
-
error:
|
|
37
|
+
error: a,
|
|
38
38
|
success: c,
|
|
39
39
|
loading: o = !1,
|
|
40
|
+
defaultFile: g = null,
|
|
40
41
|
disabled: s = !1,
|
|
41
|
-
inverted:
|
|
42
|
-
browseText:
|
|
42
|
+
inverted: A = !1,
|
|
43
|
+
browseText: k = "Seleccionar archivo",
|
|
43
44
|
allowedTypes: d,
|
|
44
|
-
inspectFileFunction:
|
|
45
|
+
inspectFileFunction: y = () => {
|
|
45
46
|
console.warn("No hay función asignada para ver el archivo. Hay que pasarla al componente como prop inspectFileFunction.");
|
|
46
47
|
},
|
|
47
|
-
maxFileSize:
|
|
48
|
+
maxFileSize: x,
|
|
48
49
|
onFileSelect: p
|
|
49
50
|
}) => {
|
|
50
|
-
const [
|
|
51
|
-
|
|
51
|
+
const [b, f] = D(!1), [r, I] = D(g || null), h = j(null);
|
|
52
|
+
$(() => {
|
|
52
53
|
if (!r) return;
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
`⚠️ CompactFileUpload: Múltiples estados detectados (${
|
|
54
|
+
const n = [];
|
|
55
|
+
a && n.push("error"), c && n.push("success"), o && n.push("loading"), n.length > 1 && console.warn(
|
|
56
|
+
`⚠️ CompactFileUpload: Múltiples estados detectados (${n.join(", ")}). Solo un estado debe estar activo a la vez.`
|
|
56
57
|
);
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
66
|
-
const l =
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
const l =
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
if (!
|
|
58
|
+
}, [a, c, o, r]);
|
|
59
|
+
const E = (n) => {
|
|
60
|
+
n.preventDefault(), s || f(!0);
|
|
61
|
+
}, w = (n) => {
|
|
62
|
+
n.preventDefault(), f(!1);
|
|
63
|
+
}, L = (n) => {
|
|
64
|
+
n.preventDefault();
|
|
65
|
+
}, O = (n) => {
|
|
66
|
+
if (n.preventDefault(), f(!1), s) return;
|
|
67
|
+
const l = n.dataTransfer.files;
|
|
68
|
+
F(l);
|
|
69
|
+
}, B = (n) => {
|
|
70
|
+
const l = n.target.files;
|
|
71
|
+
F(l);
|
|
72
|
+
}, F = (n) => {
|
|
73
|
+
if (!n) return;
|
|
73
74
|
if (d && d.length > 0)
|
|
74
|
-
for (let i = 0; i <
|
|
75
|
-
const m =
|
|
75
|
+
for (let i = 0; i < n.length; i++) {
|
|
76
|
+
const m = n[i];
|
|
76
77
|
if (!d.some(
|
|
77
78
|
(v) => v.startsWith(".") ? m.name.toLowerCase().endsWith(v.toLowerCase()) : m.type === v
|
|
78
79
|
)) {
|
|
@@ -80,43 +81,43 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
if (
|
|
84
|
-
for (let i = 0; i <
|
|
85
|
-
const m =
|
|
86
|
-
if (m.size >
|
|
84
|
+
if (x)
|
|
85
|
+
for (let i = 0; i < n.length; i++) {
|
|
86
|
+
const m = n[i];
|
|
87
|
+
if (m.size > x) {
|
|
87
88
|
console.warn(`File ${m.name} exceeds maximum size`);
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
const l =
|
|
92
|
-
|
|
92
|
+
const l = n ? n[0] : null;
|
|
93
|
+
I(l), p == null || p(l ? (() => {
|
|
93
94
|
const i = new DataTransfer();
|
|
94
95
|
return i.items.add(l), i.files;
|
|
95
96
|
})() : null);
|
|
96
|
-
}, B = () => {
|
|
97
|
-
!s && h.current && h.current.click();
|
|
98
97
|
}, V = () => {
|
|
99
|
-
|
|
100
|
-
}, U =
|
|
98
|
+
!s && h.current && h.current.click();
|
|
99
|
+
}, U = () => {
|
|
100
|
+
I(null), h.current && (h.current.value = ""), p == null || p(null);
|
|
101
|
+
}, W = [
|
|
101
102
|
t.compactFileUploadContainer,
|
|
102
|
-
t[`variant_${
|
|
103
|
-
r &&
|
|
104
|
-
r && !
|
|
105
|
-
r && !
|
|
103
|
+
t[`variant_${T}`],
|
|
104
|
+
r && a ? t.error : "",
|
|
105
|
+
r && !a && o ? t.loading : "",
|
|
106
|
+
r && !a && !o && c ? t.success : "",
|
|
106
107
|
s ? t.disabled : "",
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
A ? t.inverted : "",
|
|
109
|
+
b ? t.dragOver : ""
|
|
109
110
|
].filter(Boolean).join(" ");
|
|
110
111
|
return /* @__PURE__ */ e("div", { className: t.inputContainer, children: /* @__PURE__ */ _(
|
|
111
112
|
"div",
|
|
112
113
|
{
|
|
113
|
-
className:
|
|
114
|
-
onDragEnter:
|
|
115
|
-
onDragLeave:
|
|
116
|
-
onDragOver:
|
|
117
|
-
onDrop:
|
|
114
|
+
className: W,
|
|
115
|
+
onDragEnter: E,
|
|
116
|
+
onDragLeave: w,
|
|
117
|
+
onDragOver: L,
|
|
118
|
+
onDrop: O,
|
|
118
119
|
onClick: r ? () => {
|
|
119
|
-
} :
|
|
120
|
+
} : V,
|
|
120
121
|
style: { cursor: s ? "not-allowed" : "pointer" },
|
|
121
122
|
children: [
|
|
122
123
|
/* @__PURE__ */ e(
|
|
@@ -125,7 +126,7 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
125
126
|
ref: h,
|
|
126
127
|
type: "file",
|
|
127
128
|
className: t.hiddenInput,
|
|
128
|
-
onChange:
|
|
129
|
+
onChange: B,
|
|
129
130
|
disabled: s,
|
|
130
131
|
accept: d == null ? void 0 : d.join(",")
|
|
131
132
|
}
|
|
@@ -134,24 +135,24 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
134
135
|
// Compact layout - simple text with left icon
|
|
135
136
|
/* @__PURE__ */ _("div", { className: t.compactFileContent, children: [
|
|
136
137
|
/* @__PURE__ */ e("div", { className: t.compactFileIcon, children: /* @__PURE__ */ e("div", { className: t.compactIconBackground, style: {
|
|
137
|
-
background:
|
|
138
|
-
}, children: o ? /* @__PURE__ */ e("div", { style: { marginTop: "5px" }, children: /* @__PURE__ */ e(
|
|
138
|
+
background: a ? "#DC2626" : o ? "#2054A5" : c ? "#65A30D" : "#2054A5"
|
|
139
|
+
}, children: o ? /* @__PURE__ */ e("div", { style: { marginTop: "5px" }, children: /* @__PURE__ */ e(z, { size: 10, color: "primary", backgroundColor: "#A2BFEC", highlightColor: "#EEF3FC", thickness: 3 }) }) : /* @__PURE__ */ e("div", { style: { marginTop: "6px" }, children: /* @__PURE__ */ e(
|
|
139
140
|
u,
|
|
140
141
|
{
|
|
141
|
-
name:
|
|
142
|
+
name: a ? "CancelIcon" : c ? "CheckIcon" : "Documentos",
|
|
142
143
|
fill: "white",
|
|
143
144
|
height: 22,
|
|
144
145
|
width: 22
|
|
145
146
|
}
|
|
146
147
|
) }) }) }),
|
|
147
148
|
/* @__PURE__ */ _("div", { className: t.compactFileText, children: [
|
|
148
|
-
!
|
|
149
|
+
!a && !o && !c && C && /* @__PURE__ */ e("span", { className: t.compactLabel, children: C }),
|
|
149
150
|
/* @__PURE__ */ e("span", { className: t.compactFileName, children: r.name }),
|
|
150
|
-
|
|
151
|
+
a && /* @__PURE__ */ e("span", { className: t.compactErrorText, children: a }),
|
|
151
152
|
!o && c && /* @__PURE__ */ e("span", { className: t.compactSuccessText, children: c })
|
|
152
153
|
] }),
|
|
153
154
|
/* @__PURE__ */ _("div", { className: t.compactActions, children: [
|
|
154
|
-
!
|
|
155
|
+
!a && !o && !c && /* @__PURE__ */ e("div", { className: t.compactVisibilityIcon, onClick: y, children: /* @__PURE__ */ e(
|
|
155
156
|
u,
|
|
156
157
|
{
|
|
157
158
|
name: "Visibility",
|
|
@@ -160,7 +161,7 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
160
161
|
width: 20
|
|
161
162
|
}
|
|
162
163
|
) }),
|
|
163
|
-
(
|
|
164
|
+
(a || c || o) && /* @__PURE__ */ e("div", { className: t.compactDeleteAction, onClick: U, children: a ? /* @__PURE__ */ e("span", { className: t.deleteText, children: "Eliminar" }) : c ? /* @__PURE__ */ e(
|
|
164
165
|
u,
|
|
165
166
|
{
|
|
166
167
|
name: "CancelIcon",
|
|
@@ -168,7 +169,7 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
168
169
|
height: 16,
|
|
169
170
|
width: 16
|
|
170
171
|
}
|
|
171
|
-
) : o ? /* @__PURE__ */ _(
|
|
172
|
+
) : o ? /* @__PURE__ */ _(N, { children: [
|
|
172
173
|
/* @__PURE__ */ e(
|
|
173
174
|
u,
|
|
174
175
|
{
|
|
@@ -184,7 +185,7 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
184
185
|
] }) : null })
|
|
185
186
|
] })
|
|
186
187
|
] })
|
|
187
|
-
) : /* @__PURE__ */ e(
|
|
188
|
+
) : /* @__PURE__ */ e(N, { children: /* @__PURE__ */ _("div", { className: t.textContent, children: [
|
|
188
189
|
/* @__PURE__ */ e(
|
|
189
190
|
"div",
|
|
190
191
|
{
|
|
@@ -203,12 +204,12 @@ import '../../assets/CompactFileUpload.css';const z = "_inputContainer_ta4er_1",
|
|
|
203
204
|
) })
|
|
204
205
|
}
|
|
205
206
|
),
|
|
206
|
-
/* @__PURE__ */ e("span", { children:
|
|
207
|
+
/* @__PURE__ */ e("span", { children: k })
|
|
207
208
|
] }) }) })
|
|
208
209
|
]
|
|
209
210
|
}
|
|
210
211
|
) });
|
|
211
212
|
};
|
|
212
213
|
export {
|
|
213
|
-
|
|
214
|
+
xt as CompactFileUpload
|
|
214
215
|
};
|