bmi-next-brokers 1.2.4 → 1.2.6

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.
Files changed (38) hide show
  1. package/dist/Input.module-DuUfwXwW.js +88 -0
  2. package/dist/assets/Button.css +1 -1
  3. package/dist/assets/Input.css +1 -1
  4. package/dist/assets/Select.css +1 -1
  5. package/dist/components/Button/Button.d.ts +1 -1
  6. package/dist/components/Button/Button.js +37 -36
  7. package/dist/components/FileUpload/CompactFileUpload.js +174 -136
  8. package/dist/components/Input/Checkbox/Checkbox.d.ts +2 -1
  9. package/dist/components/Input/Checkbox/Checkbox.js +102 -82
  10. package/dist/components/Input/Input.d.ts +3 -2
  11. package/dist/components/Input/Input.js +105 -68
  12. package/dist/components/Input/RadioButton/RadioButton.d.ts +2 -1
  13. package/dist/components/Input/RadioButton/RadioButton.js +103 -93
  14. package/dist/components/Select/Select.d.ts +2 -1
  15. package/dist/components/Select/Select.js +176 -159
  16. package/dist/icons/Icon.js +1 -1
  17. package/dist/icons/components/AmericanExpressRounded.d.ts +3 -0
  18. package/dist/icons/components/AmericanExpressRounded.js +12 -0
  19. package/dist/icons/components/DinersRounded.d.ts +3 -0
  20. package/dist/icons/components/DinersRounded.js +12 -0
  21. package/dist/icons/components/DiscoverRounded.d.ts +3 -0
  22. package/dist/icons/components/DiscoverRounded.js +12 -0
  23. package/dist/icons/components/FallbackCardRounded.d.ts +3 -0
  24. package/dist/icons/components/FallbackCardRounded.js +9 -0
  25. package/dist/icons/components/MastercardRounded.d.ts +3 -0
  26. package/dist/icons/components/MastercardRounded.js +10 -0
  27. package/dist/icons/components/PriceChange.d.ts +3 -0
  28. package/dist/icons/components/PriceChange.js +22 -0
  29. package/dist/icons/components/VisaRounded.d.ts +3 -0
  30. package/dist/icons/components/VisaRounded.js +8 -0
  31. package/dist/icons/components/index.d.ts +7 -0
  32. package/dist/icons/components/index.js +196 -182
  33. package/dist/icons/index.d.ts +7 -0
  34. package/dist/icons/index.js +230 -216
  35. package/dist/index-D2qcqwKe.js +248 -0
  36. package/package.json +1 -1
  37. package/dist/Input.module-DEnV7xlj.js +0 -78
  38. package/dist/index-DzpFRTwz.js +0 -234
@@ -1,88 +1,88 @@
1
- import { jsx as e, jsxs as u, Fragment as b } from "react/jsx-runtime";
2
- import { useState as y, useRef as z, useEffect as q } from "react";
3
- import { Icon as g } from "../../icons/Icon.js";
4
- import { Spinner as H } from "../Spinner/Spinner.js";
5
- import { Button as D } from "../Button/Button.js";
6
- import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1", J = "_compactFileUploadContainer_84wrd_9", K = "_fullWidth_84wrd_26", P = "_dragOver_84wrd_35", Q = "_variant_document_84wrd_41", X = "_icon_84wrd_41", Y = "_variant_add_84wrd_45", Z = "_disabled_84wrd_50", tt = "_error_84wrd_61", nt = "_warning_84wrd_69", et = "_inverted_84wrd_78", at = "_uploadContent_84wrd_103", ct = "_textContent_84wrd_113", ot = "_dragText_84wrd_123", it = "_hiddenInput_84wrd_153", rt = "_compactFileContent_84wrd_166", lt = "_compactFileIcon_84wrd_174", st = "_compactIconBackground_84wrd_182", dt = "_compactFileText_84wrd_190", mt = "_compactLabel_84wrd_202", pt = "_compactFileName_84wrd_209", _t = "_compactStatusText_84wrd_210", ut = "_success_84wrd_221", ht = "_loading_84wrd_229", ft = "_addIconWrapper_84wrd_233", vt = "_browseText_84wrd_239", wt = "_compactVisibilityIcon_84wrd_246", Ct = "_compactActions_84wrd_255", gt = "_deleteText_84wrd_262", t = {
7
- inputContainer: G,
8
- compactFileUploadContainer: J,
9
- fullWidth: K,
10
- dragOver: P,
11
- variant_document: Q,
12
- icon: X,
13
- variant_add: Y,
14
- disabled: Z,
15
- error: tt,
16
- warning: nt,
17
- inverted: et,
18
- uploadContent: at,
19
- textContent: ct,
20
- dragText: ot,
21
- hiddenInput: it,
22
- compactFileContent: rt,
23
- compactFileIcon: lt,
24
- compactIconBackground: st,
25
- compactFileText: dt,
26
- compactLabel: mt,
27
- compactFileName: pt,
28
- compactStatusText: _t,
29
- success: ut,
1
+ import { jsx as n, jsxs as l, Fragment as y } from "react/jsx-runtime";
2
+ import { useState as b, useRef as S, useEffect as z } from "react";
3
+ import { Icon as u } from "../../icons/Icon.js";
4
+ import { Spinner as q } from "../Spinner/Spinner.js";
5
+ import { Button as T } from "../Button/Button.js";
6
+ import '../../assets/CompactFileUpload.css';const H = "_inputContainer_84wrd_1", G = "_compactFileUploadContainer_84wrd_9", J = "_fullWidth_84wrd_26", K = "_dragOver_84wrd_35", P = "_variant_document_84wrd_41", Q = "_icon_84wrd_41", X = "_variant_add_84wrd_45", Y = "_disabled_84wrd_50", Z = "_error_84wrd_61", tt = "_warning_84wrd_69", nt = "_inverted_84wrd_78", et = "_uploadContent_84wrd_103", at = "_textContent_84wrd_113", ct = "_dragText_84wrd_123", ot = "_hiddenInput_84wrd_153", it = "_compactFileContent_84wrd_166", rt = "_compactFileIcon_84wrd_174", lt = "_compactIconBackground_84wrd_182", st = "_compactFileText_84wrd_190", dt = "_compactLabel_84wrd_202", mt = "_compactFileName_84wrd_209", pt = "_compactStatusText_84wrd_210", _t = "_success_84wrd_221", ht = "_loading_84wrd_229", ut = "_addIconWrapper_84wrd_233", ft = "_browseText_84wrd_239", vt = "_compactVisibilityIcon_84wrd_246", wt = "_compactActions_84wrd_255", Ct = "_deleteText_84wrd_262", t = {
7
+ inputContainer: H,
8
+ compactFileUploadContainer: G,
9
+ fullWidth: J,
10
+ dragOver: K,
11
+ variant_document: P,
12
+ icon: Q,
13
+ variant_add: X,
14
+ disabled: Y,
15
+ error: Z,
16
+ warning: tt,
17
+ inverted: nt,
18
+ uploadContent: et,
19
+ textContent: at,
20
+ dragText: ct,
21
+ hiddenInput: ot,
22
+ compactFileContent: it,
23
+ compactFileIcon: rt,
24
+ compactIconBackground: lt,
25
+ compactFileText: st,
26
+ compactLabel: dt,
27
+ compactFileName: mt,
28
+ compactStatusText: pt,
29
+ success: _t,
30
30
  loading: ht,
31
- addIconWrapper: ft,
32
- browseText: vt,
33
- compactVisibilityIcon: wt,
34
- compactActions: Ct,
35
- deleteText: gt
36
- }, Dt = ({
37
- variant: T = "document",
38
- label: v,
31
+ addIconWrapper: ut,
32
+ browseText: ft,
33
+ compactVisibilityIcon: vt,
34
+ compactActions: wt,
35
+ deleteText: Ct
36
+ }, bt = ({
37
+ variant: D = "document",
38
+ label: f,
39
39
  error: a,
40
40
  success: c,
41
- warning: f,
41
+ warning: v,
42
42
  loading: o = !1,
43
- defaultFile: x = null,
43
+ defaultFile: g = null,
44
44
  disabled: d = !1,
45
- inverted: $ = !1,
46
- browseText: k = "Seleccionar archivo",
45
+ inverted: k = !1,
46
+ browseText: $ = "Seleccionar archivo",
47
47
  allowedTypes: m,
48
48
  inspectFileFunction: A = () => {
49
49
  console.warn(
50
50
  "No hay función asignada para ver el archivo. Hay que pasarla al componente como prop inspectFileFunction."
51
51
  );
52
52
  },
53
- maxFileSize: I,
53
+ maxFileSize: x,
54
54
  onFileSelect: p,
55
- statusIconBorderRadius: W = "50%",
56
- fullWidth: B = !1
55
+ statusIconBorderRadius: N = "50%",
56
+ fullWidth: W = !1
57
57
  }) => {
58
- const [E, w] = y(!1), [i, N] = y(
59
- x || null
60
- ), h = z(null);
61
- q(() => {
58
+ const [j, w] = b(!1), [i, I] = b(
59
+ g || null
60
+ ), h = S(null);
61
+ z(() => {
62
62
  if (!i) return;
63
- const n = [];
64
- a && n.push("error"), c && n.push("success"), o && n.push("loading"), n.length > 1 && console.warn(
65
- `⚠️ CompactFileUpload: Múltiples estados detectados (${n.join(", ")}). Solo un estado debe estar activo a la vez.`
63
+ const e = [];
64
+ a && e.push("error"), c && e.push("success"), o && e.push("loading"), e.length > 1 && console.warn(
65
+ `⚠️ CompactFileUpload: Múltiples estados detectados (${e.join(", ")}). Solo un estado debe estar activo a la vez.`
66
66
  );
67
67
  }, [a, c, o, i]);
68
- const L = (n) => {
69
- n.preventDefault(), d || w(!0);
70
- }, O = (n) => {
71
- n.preventDefault(), w(!1);
72
- }, j = (n) => {
73
- n.preventDefault();
74
- }, R = (n) => {
75
- if (n.preventDefault(), w(!1), d) return;
76
- const s = n.dataTransfer.files;
68
+ const B = (e) => {
69
+ e.preventDefault(), d || w(!0);
70
+ }, E = (e) => {
71
+ e.preventDefault(), w(!1);
72
+ }, L = (e) => {
73
+ e.preventDefault();
74
+ }, O = (e) => {
75
+ if (e.preventDefault(), w(!1), d) return;
76
+ const s = e.dataTransfer.files;
77
77
  F(s);
78
- }, U = async (n) => {
79
- const s = n.target.files;
78
+ }, R = async (e) => {
79
+ const s = e.target.files;
80
80
  F(s);
81
- }, F = async (n) => {
82
- if (!n) return;
81
+ }, F = async (e) => {
82
+ if (!e) return;
83
83
  if (m && m.length > 0)
84
- for (let r = 0; r < n.length; r++) {
85
- const _ = n[r];
84
+ for (let r = 0; r < e.length; r++) {
85
+ const _ = e[r];
86
86
  if (!m.some(
87
87
  (C) => C.startsWith(".") ? _.name.toLowerCase().endsWith(C.toLowerCase()) : _.type === C
88
88
  )) {
@@ -90,72 +90,72 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
90
90
  return;
91
91
  }
92
92
  }
93
- if (I)
94
- for (let r = 0; r < n.length; r++) {
95
- const _ = n[r];
96
- if (_.size > I) {
93
+ if (x)
94
+ for (let r = 0; r < e.length; r++) {
95
+ const _ = e[r];
96
+ if (_.size > x) {
97
97
  console.warn(`File ${_.name} exceeds maximum size`);
98
98
  return;
99
99
  }
100
100
  }
101
- const s = n ? n[0] : null;
102
- N(s), await (p == null ? void 0 : p(
101
+ const s = e ? e[0] : null;
102
+ I(s), await (p == null ? void 0 : p(
103
103
  s ? (() => {
104
104
  const r = new DataTransfer();
105
105
  return r.items.add(s), r.files;
106
106
  })() : null
107
107
  ));
108
- }, V = () => {
108
+ }, U = () => {
109
109
  !d && h.current && h.current.click();
110
- }, M = async () => {
111
- await (p == null ? void 0 : p(null)), N(null), h.current && (h.current.value = "");
112
- }, l = !i && f && !o && !c && !a, S = [
110
+ }, V = async () => {
111
+ await (p == null ? void 0 : p(null)), I(null), h.current && (h.current.value = "");
112
+ }, M = [
113
113
  t.compactFileUploadContainer,
114
- B && t.fullWidth,
115
- t[`variant_${T}`],
116
- l ? t.warning : "",
117
- i && a ? t.error : "",
118
- i && !a && o ? t.loading : "",
114
+ W && t.fullWidth,
115
+ t[`variant_${D}`],
116
+ !i && v ? t.warning : "",
117
+ i && !o && !c && a ? t.error : "",
118
+ i && !a && !c && o ? t.loading : "",
119
119
  i && !a && !o && c ? t.success : "",
120
120
  d ? t.disabled : "",
121
- $ ? t.inverted : "",
122
- E ? t.dragOver : ""
121
+ k ? t.inverted : "",
122
+ j ? t.dragOver : ""
123
123
  ].filter(Boolean).join(" ");
124
- return /* @__PURE__ */ e("div", { className: t.inputContainer, children: /* @__PURE__ */ u(
124
+ return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */ l(
125
125
  "div",
126
126
  {
127
- className: S,
128
- onDragEnter: L,
129
- onDragLeave: O,
130
- onDragOver: j,
131
- onDrop: R,
127
+ className: M,
128
+ onDragEnter: B,
129
+ onDragLeave: E,
130
+ onDragOver: L,
131
+ onDrop: O,
132
132
  onClick: i ? () => {
133
- } : V,
133
+ } : U,
134
134
  style: { cursor: d ? "not-allowed" : "pointer" },
135
135
  children: [
136
- /* @__PURE__ */ e(
136
+ /* @__PURE__ */ n(
137
137
  "input",
138
138
  {
139
139
  ref: h,
140
140
  type: "file",
141
141
  className: t.hiddenInput,
142
- onChange: U,
142
+ onChange: R,
143
143
  disabled: d,
144
144
  accept: m == null ? void 0 : m.join(",")
145
145
  }
146
146
  ),
147
- /* @__PURE__ */ e("div", { className: t.uploadContent, children: i || l ? (
147
+ /* @__PURE__ */ n("div", { className: t.uploadContent, children: i ? (
148
148
  // Compact layout - simple text with left icon
149
- /* @__PURE__ */ u("div", { className: t.compactFileContent, children: [
150
- /* @__PURE__ */ e("div", { className: t.compactFileIcon, children: /* @__PURE__ */ e(
149
+ /* @__PURE__ */ l("div", { className: t.compactFileContent, children: [
150
+ /* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
151
151
  "div",
152
152
  {
153
153
  className: t.compactIconBackground,
154
154
  style: {
155
- background: a ? "#DC2626" : o ? "#2054A5" : c ? "#65A30D" : f ? "#EA580C" : "#2054A5",
156
- borderRadius: W
155
+ background: a && !o ? "#DC2626" : o ? "#2054A5" : c ? "#65A30D" : "#2054A5",
156
+ borderRadius: N
157
157
  },
158
- children: o ? /* @__PURE__ */ e(
158
+ children: o ? /* @__PURE__ */ n(
159
159
  "div",
160
160
  {
161
161
  style: {
@@ -164,8 +164,8 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
164
164
  alignItems: "center",
165
165
  margin: "4px"
166
166
  },
167
- children: /* @__PURE__ */ e(
168
- H,
167
+ children: /* @__PURE__ */ n(
168
+ q,
169
169
  {
170
170
  size: 10,
171
171
  color: "primary",
@@ -175,7 +175,7 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
175
175
  }
176
176
  )
177
177
  }
178
- ) : /* @__PURE__ */ e(
178
+ ) : /* @__PURE__ */ n(
179
179
  "div",
180
180
  {
181
181
  style: {
@@ -183,10 +183,10 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
183
183
  justifyContent: "center",
184
184
  alignItems: "center"
185
185
  },
186
- children: /* @__PURE__ */ e(
187
- g,
186
+ children: /* @__PURE__ */ n(
187
+ u,
188
188
  {
189
- name: a ? "CancelIcon" : c ? "CheckIcon" : f ? "AlertIcon" : "Documentos",
189
+ name: a ? "CancelIcon" : c ? "CheckIcon" : "Documentos",
190
190
  fill: "white",
191
191
  height: 20,
192
192
  width: 20
@@ -196,12 +196,12 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
196
196
  )
197
197
  }
198
198
  ) }),
199
- /* @__PURE__ */ u("div", { className: t.compactFileText, children: [
200
- !a && !o && !c && !l && /* @__PURE__ */ u(b, { children: [
201
- v && /* @__PURE__ */ e("span", { className: `small1Medium ${t.compactLabel}`, children: v }),
202
- /* @__PURE__ */ e("span", { className: `small3Regular ${t.compactFileName}`, children: i == null ? void 0 : i.name })
199
+ /* @__PURE__ */ l("div", { className: t.compactFileText, children: [
200
+ !a && !o && !c && /* @__PURE__ */ l(y, { children: [
201
+ f && /* @__PURE__ */ n("span", { className: `small1Medium ${t.compactLabel}`, children: f }),
202
+ /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactFileName}`, children: i == null ? void 0 : i.name })
203
203
  ] }),
204
- (a || l || o || c) && /* @__PURE__ */ e(
204
+ (a || o || c) && /* @__PURE__ */ n(
205
205
  "span",
206
206
  {
207
207
  className: `
@@ -209,24 +209,22 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
209
209
  ${t.compactFileName}
210
210
  ${a && t.error}
211
211
  ${c && t.success}
212
- ${l && t.warning}
213
212
  ${o && t.loading}
214
213
  `,
215
- children: l ? v : i == null ? void 0 : i.name
214
+ children: i == null ? void 0 : i.name
216
215
  }
217
216
  ),
218
- a && /* @__PURE__ */ e("span", { className: `small3Regular ${t.compactStatusText}`, children: a }),
219
- l && /* @__PURE__ */ e("span", { className: `small3Regular ${t.compactStatusText}`, children: f }),
220
- c && !o && /* @__PURE__ */ e("span", { className: `small3Regular ${t.compactStatusText}`, children: c })
217
+ a && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: a }),
218
+ c && !o && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: c })
221
219
  ] }),
222
- /* @__PURE__ */ u("div", { className: t.compactActions, children: [
223
- !a && !o && !c && !l && /* @__PURE__ */ e(
220
+ /* @__PURE__ */ l("div", { className: t.compactActions, children: [
221
+ !a && !o && !c && /* @__PURE__ */ n(
224
222
  "div",
225
223
  {
226
224
  className: t.compactVisibilityIcon,
227
225
  onClick: A,
228
- children: /* @__PURE__ */ e(
229
- g,
226
+ children: /* @__PURE__ */ n(
227
+ u,
230
228
  {
231
229
  name: "Visibility",
232
230
  fill: "#2054A5",
@@ -236,48 +234,88 @@ import '../../assets/CompactFileUpload.css';const G = "_inputContainer_84wrd_1",
236
234
  )
237
235
  }
238
236
  ),
239
- (a || c || o) && /* @__PURE__ */ e(
240
- D,
237
+ (a || c || o) && /* @__PURE__ */ n(
238
+ T,
241
239
  {
242
240
  variant: c ? "ghost" : "outline",
243
241
  icon: {
244
242
  name: "CancelIcon",
245
243
  position: "before"
246
244
  },
247
- onClick: M,
245
+ onClick: V,
248
246
  children: a ? "Eliminar" : o ? "Cancelar" : ""
249
247
  }
250
- ),
251
- l && /* @__PURE__ */ e(
252
- D,
248
+ )
249
+ ] })
250
+ ] })
251
+ ) : v ? /* @__PURE__ */ l("div", { className: t.compactFileContent, children: [
252
+ /* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
253
+ "div",
254
+ {
255
+ className: t.compactIconBackground,
256
+ style: {
257
+ background: "#EA580C",
258
+ borderRadius: N
259
+ },
260
+ children: /* @__PURE__ */ n(
261
+ "div",
253
262
  {
254
- variant: "outline",
255
- icon: {
256
- name: "Upload",
257
- position: "before"
263
+ style: {
264
+ display: "flex",
265
+ justifyContent: "center",
266
+ alignItems: "center"
258
267
  },
259
- children: "Subir doc"
268
+ children: /* @__PURE__ */ n(
269
+ u,
270
+ {
271
+ name: "AlertIcon",
272
+ fill: "white",
273
+ height: 20,
274
+ width: 20
275
+ }
276
+ )
260
277
  }
261
278
  )
262
- ] })
263
- ] })
264
- ) : /* @__PURE__ */ e(b, { children: /* @__PURE__ */ u("div", { className: t.textContent, children: [
265
- /* @__PURE__ */ e(
279
+ }
280
+ ) }),
281
+ /* @__PURE__ */ l("div", { className: t.compactFileText, children: [
282
+ /* @__PURE__ */ n(
283
+ "span",
284
+ {
285
+ className: ` small1Medium ${t.compactFileName} ${t.warning}`,
286
+ children: f
287
+ }
288
+ ),
289
+ /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: v })
290
+ ] }),
291
+ /* @__PURE__ */ n("div", { className: t.compactActions, children: /* @__PURE__ */ n(
292
+ T,
293
+ {
294
+ variant: "outline",
295
+ icon: {
296
+ name: "Upload",
297
+ position: "before"
298
+ },
299
+ children: "Subir doc"
300
+ }
301
+ ) })
302
+ ] }) : /* @__PURE__ */ n(y, { children: /* @__PURE__ */ l("div", { className: t.textContent, children: [
303
+ /* @__PURE__ */ n(
266
304
  "div",
267
305
  {
268
306
  className: t.addIconWrapper,
269
307
  style: {
270
308
  background: "#2054A5"
271
309
  },
272
- children: /* @__PURE__ */ e("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ e(g, { name: "Add", fill: "white", height: 27, width: 27 }) })
310
+ children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(u, { name: "Add", fill: "white", height: 27, width: 27 }) })
273
311
  }
274
312
  ),
275
- /* @__PURE__ */ e("span", { className: `small1Medium ${t.browseText}`, children: k })
313
+ /* @__PURE__ */ n("span", { className: `small1Medium ${t.browseText}`, children: $ })
276
314
  ] }) }) })
277
315
  ]
278
316
  }
279
317
  ) });
280
318
  };
281
319
  export {
282
- Dt as CompactFileUpload
320
+ bt as CompactFileUpload
283
321
  };
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export type InputSize = "small" | "medium" | "large";
2
+ export type InputSize = "small" | "medium" | "large" | "extraLarge";
3
3
  export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
4
4
  size?: InputSize;
5
5
  label?: string;
@@ -8,5 +8,6 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
8
8
  required?: boolean;
9
9
  error?: string;
10
10
  inverted?: boolean;
11
+ btc?: boolean;
11
12
  }
12
13
  export declare const Checkbox: React.FC<CheckboxProps>;