bmi-next-brokers 2.5.7 → 2.5.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.
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { SelectSize } from '../Select';
2
3
  export interface SearchableInputGroupField {
3
4
  key: string;
@@ -8,7 +9,7 @@ export interface SearchableInputGroupField {
8
9
  /** Cabecera de la columna en el dropdown. */
9
10
  columnHeader?: string;
10
11
  }
11
- export interface SearchableInputGroupProps {
12
+ export interface SearchableInputGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
12
13
  fields: SearchableInputGroupField[];
13
14
  /** Valores controlados que se muestran en los inputs. */
14
15
  values?: Record<string, string>;
@@ -25,5 +26,6 @@ export interface SearchableInputGroupProps {
25
26
  disabled?: boolean;
26
27
  size?: SelectSize;
27
28
  btc?: boolean;
29
+ containerClassName?: string;
28
30
  }
29
- export declare const SearchableInputGroup: ({ fields, values, options, onSearch, onSelect, noResultMessage, loading, disabled, btc, size, }: SearchableInputGroupProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const SearchableInputGroup: ({ fields, values, options, onSearch, onSelect, noResultMessage, loading, disabled, btc, size, className, containerClassName, ...rest }: SearchableInputGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,103 +1,120 @@
1
- import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
- import { useState as S, useRef as v, useEffect as T } from "react";
3
- import { createPortal as W } from "react-dom";
4
- import { Input as y } from "../Input/Input.js";
1
+ import { jsxs as v, jsx as o } from "react/jsx-runtime";
2
+ import { useState as W, useRef as N, useEffect as y } from "react";
3
+ import { createPortal as L } from "react-dom";
4
+ import { Input as O } from "../Input/Input.js";
5
5
  import { s as n } from "../../Select.module-D_7bjq9u.js";
6
- import { useBTC as B } from "../../hooks/btcContext/useBtcContext.js";
7
- import { useDropdownPosition as L } from "../../hooks/useDropdownPosition.js";
8
- import '../../assets/index4.css';const O = "_container_1kajw_1", k = "_inputs_1kajw_7", F = "_inputWrapper_1kajw_13", p = {
9
- container: O,
10
- inputs: k,
11
- inputWrapper: F
12
- }, K = ({
6
+ import { useBTC as k } from "../../hooks/btcContext/useBtcContext.js";
7
+ import { useDropdownPosition as F } from "../../hooks/useDropdownPosition.js";
8
+ import '../../assets/index4.css';const G = "_container_1kajw_1", M = "_inputs_1kajw_7", V = "_inputWrapper_1kajw_13", p = {
9
+ container: G,
10
+ inputs: M,
11
+ inputWrapper: V
12
+ }, X = ({
13
13
  fields: m,
14
- values: N = {},
14
+ values: _ = {},
15
15
  options: a = [],
16
- onSearch: _,
16
+ onSearch: b,
17
17
  onSelect: u,
18
- noResultMessage: b = "No se encontraron resultados",
19
- loading: C = !1,
18
+ noResultMessage: $ = "No se encontraron resultados",
19
+ loading: j = !1,
20
20
  disabled: f = !1,
21
- btc: j = !1,
22
- size: s = "medium"
21
+ btc: C = !1,
22
+ size: s = "medium",
23
+ className: h,
24
+ containerClassName: I,
25
+ ...R
23
26
  }) => {
24
- const { btc: I } = B(), $ = j ?? I, [h, c] = S(!1), l = v(null), i = v(null), R = h && !f, x = L({
25
- isOpen: h,
27
+ const { btc: x } = k(), B = C ?? x, [w, c] = W(!1), l = N(null), i = N(null), D = w && !f, E = F({
28
+ isOpen: w,
26
29
  containerRef: l,
27
30
  dropdownRef: i,
28
31
  size: s,
29
32
  optionsLength: a.length,
30
33
  isSearchable: !0
31
34
  });
32
- T(() => {
35
+ y(() => {
33
36
  const e = (t) => {
34
37
  l.current && !l.current.contains(t.target) && i.current && !i.current.contains(t.target) && c(!1);
35
38
  };
36
39
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
37
40
  }, []);
38
- const D = (e, t) => {
39
- _(e, t), t.trim() ? c(!0) : c(!1);
40
- }, E = (e) => {
41
+ const P = (e, t) => {
42
+ b(e, t), t.trim() ? c(!0) : c(!1);
43
+ }, S = (e) => {
41
44
  u == null || u(e), c(!1);
42
- }, P = !C && a.length === 0;
43
- return /* @__PURE__ */ g("div", { ref: l, className: p.container, children: [
44
- /* @__PURE__ */ o("div", { className: p.inputs, children: m.map(({ key: e, label: t, placeholder: r }) => /* @__PURE__ */ o("div", { className: p.inputWrapper, children: /* @__PURE__ */ o(
45
- y,
46
- {
47
- label: t,
48
- placeholder: r,
49
- value: N[e] ?? "",
50
- onChange: (d) => D(e, d.target.value),
51
- icon: "SearchIcon",
52
- size: s,
53
- disabled: f,
54
- btc: $
55
- }
56
- ) }, e)) }),
57
- R && W(
58
- /* @__PURE__ */ o(
59
- "div",
60
- {
61
- ref: i,
62
- className: [
63
- n.dropdown,
64
- n[s],
65
- n.dropdownPortal,
66
- n.dropdownTable
67
- ].join(" "),
68
- style: x,
69
- children: a.length > 0 ? a.map((e, t) => /* @__PURE__ */ o(
45
+ }, T = !j && a.length === 0;
46
+ return /* @__PURE__ */ v(
47
+ "div",
48
+ {
49
+ ref: l,
50
+ className: [p.container, I].filter(Boolean).join(" "),
51
+ children: [
52
+ /* @__PURE__ */ o(
53
+ "div",
54
+ {
55
+ className: `${p.inputs} ${h || ""}`,
56
+ ...R,
57
+ children: m.map(({ key: e, label: t, placeholder: r }) => /* @__PURE__ */ o("div", { className: p.inputWrapper, children: /* @__PURE__ */ o(
58
+ O,
59
+ {
60
+ label: t,
61
+ placeholder: r,
62
+ value: _[e] ?? "",
63
+ onChange: (d) => P(e, d.target.value),
64
+ icon: "SearchIcon",
65
+ size: s,
66
+ disabled: f,
67
+ btc: B
68
+ }
69
+ ) }, e))
70
+ }
71
+ ),
72
+ D && L(
73
+ /* @__PURE__ */ o(
70
74
  "div",
71
75
  {
72
- className: `${n.option} ${n.optionTable}`,
73
- onMouseDown: (r) => {
74
- r.preventDefault(), r.stopPropagation(), E(e);
75
- },
76
- children: m.map(({ key: r, columnKey: d, columnHeader: w }) => /* @__PURE__ */ g("div", { className: n.tableColumn, children: [
77
- w && /* @__PURE__ */ o(
78
- "div",
79
- {
80
- className: `${n.columnHeader} ${n[s]}`,
81
- children: w
82
- }
83
- ),
84
- /* @__PURE__ */ o(
85
- "div",
86
- {
87
- className: `${n.columnValue} ${n[s]}`,
88
- children: String(e[d ?? r] ?? "")
89
- }
90
- )
91
- ] }, r))
92
- },
93
- t
94
- )) : P && /* @__PURE__ */ o("span", { className: n.noResults, children: b })
95
- }
96
- ),
97
- document.getElementById("root") || document.body
98
- )
99
- ] });
76
+ ref: i,
77
+ className: [
78
+ n.dropdown,
79
+ n[s],
80
+ n.dropdownPortal,
81
+ n.dropdownTable
82
+ ].join(" "),
83
+ style: E,
84
+ children: a.length > 0 ? a.map((e, t) => /* @__PURE__ */ o(
85
+ "div",
86
+ {
87
+ className: `${n.option} ${n.optionTable}`,
88
+ onMouseDown: (r) => {
89
+ r.preventDefault(), r.stopPropagation(), S(e);
90
+ },
91
+ children: m.map(({ key: r, columnKey: d, columnHeader: g }) => /* @__PURE__ */ v("div", { className: n.tableColumn, children: [
92
+ g && /* @__PURE__ */ o(
93
+ "div",
94
+ {
95
+ className: `${n.columnHeader} ${n[s]}`,
96
+ children: g
97
+ }
98
+ ),
99
+ /* @__PURE__ */ o(
100
+ "div",
101
+ {
102
+ className: `${n.columnValue} ${n[s]}`,
103
+ children: String(e[d ?? r] ?? "")
104
+ }
105
+ )
106
+ ] }, r))
107
+ },
108
+ t
109
+ )) : T && /* @__PURE__ */ o("span", { className: n.noResults, children: $ })
110
+ }
111
+ ),
112
+ document.getElementById("root") || document.body
113
+ )
114
+ ]
115
+ }
116
+ );
100
117
  };
101
118
  export {
102
- K as SearchableInputGroup
119
+ X as SearchableInputGroup
103
120
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs as p, jsx as l, Fragment as G } from "react/jsx-runtime";
2
- import { useState as J, useRef as D, useEffect as K, useMemo as de } from "react";
2
+ import { useState as J, useRef as C, useEffect as K, useMemo as de } from "react";
3
3
  import { createPortal as Re } from "react-dom";
4
4
  import { s as e } from "../../Select.module-D_7bjq9u.js";
5
5
  import { Icon as W } from "../../icons/Icon.js";
6
6
  import { HelperText as We } from "../helperText/index.js";
7
7
  import { FieldError as xe } from "../fieldError/index.js";
8
8
  import { useIsMediaQuery as Pe } from "../../hooks/useMediaQuery.js";
9
- import { Drawer as Fe } from "../drawer/index.js";
10
- import { useClose as Ve } from "../../hooks/useClose.js";
9
+ import { Drawer as Ve } from "../drawer/index.js";
10
+ import { useClose as Fe } from "../../hooks/useClose.js";
11
11
  import { Input as je } from "../Input/Input.js";
12
12
  import { useBTC as Me } from "../../hooks/btcContext/useBtcContext.js";
13
13
  import { useDropdownPosition as Be } from "../../hooks/useDropdownPosition.js";
@@ -16,23 +16,23 @@ const nr = ({
16
16
  label: x,
17
17
  error: U,
18
18
  helperText: P,
19
- icon: C,
19
+ icon: L,
20
20
  className: ue,
21
21
  required: me,
22
- placeholder: F = "Seleccionar...",
23
- options: b = [],
24
- value: h,
22
+ placeholder: V = "Seleccionar...",
23
+ options: y = [],
24
+ value: f,
25
25
  onChange: i,
26
- onSearchInput: V,
27
- disabled: S = !1,
26
+ onSearchInput: F,
27
+ disabled: v = !1,
28
28
  inverted: g = !1,
29
- dynamicIcon: fe = !1,
30
- showPlaceholderIcon: he = !1,
29
+ dynamicIcon: he = !1,
30
+ showPlaceholderIcon: fe = !1,
31
31
  btc: X,
32
- columnHeaders: _,
32
+ columnHeaders: k,
33
33
  searchable: pe = !1,
34
34
  noSearchResult: Y = "No se encontraron resultados",
35
- searchAndCheckbox: k = !1,
35
+ searchAndCheckbox: E = !1,
36
36
  customBorderColor: Z,
37
37
  responsive: ge = !1,
38
38
  title: $e,
@@ -40,60 +40,65 @@ const nr = ({
40
40
  highlightMatch: Ne = !1,
41
41
  ...Se
42
42
  }) => {
43
- const j = !!V, { btc: ve } = Me(), be = X ?? ve, [a, v] = J(!1), [u, ye] = J(""), s = pe || k, $ = k, M = D(null), Oe = D(null), E = D(null), z = D(null), B = D(null), [y, w] = J([]), De = a && !S, Ce = Pe(`(max-width: ${we}px)`), A = ge && Ce && !S;
43
+ const j = !!F, { btc: ve } = Me(), be = X ?? ve, [a, b] = J(!1), [m, ye] = J(""), s = pe || E, $ = E, M = C(null), Oe = C(null), T = C(null), z = C(null), B = C(null), [O, w] = J([]), De = a && !v, Ce = Pe(`(max-width: ${we}px)`), A = ge && Ce && !v;
44
44
  K(() => {
45
45
  if ($)
46
- if (Array.isArray(h) && h.length > 0) {
47
- const r = b.filter((t) => h.includes(t.value)), n = r.map((t) => t.value);
48
- w(r), (n.length !== h.length || !n.every((t) => h.includes(t))) && i && i(n);
46
+ if (Array.isArray(f) && f.length > 0) {
47
+ const r = y.filter((n) => f.includes(n.value)), t = r.map((n) => n.value);
48
+ w((n) => {
49
+ const u = n.map((S) => S.value);
50
+ return u.length === r.length && r.every((S) => u.includes(S.value)) ? n : r;
51
+ }), (t.length !== f.length || !t.every((n) => f.includes(n))) && i && i(t);
49
52
  } else
50
- w([]);
51
- else if (h) {
52
- const r = b.find((n) => n.value === h);
53
- r ? w([r]) : (w([]), i && i(""));
53
+ w((r) => r.length === 0 ? r : []);
54
+ else if (f) {
55
+ const r = y.find((t) => t.value === f);
56
+ r ? w(
57
+ (t) => t.length === 1 && t[0].value === r.value ? t : [r]
58
+ ) : (w((t) => t.length === 0 ? t : []), i && i(""));
54
59
  } else
55
- w([]);
56
- }, [h, b, $]);
57
- const L = y.map((r) => r.value), o = y[0] ?? null, N = (r) => typeof r == "string" ? r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "").toLowerCase() : "", ee = D("");
60
+ w((r) => r.length === 0 ? r : []);
61
+ }, [f, y, $]);
62
+ const I = O.map((r) => r.value), o = O[0] ?? null, N = (r) => typeof r == "string" ? r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "").toLowerCase() : "", ee = C("");
58
63
  K(() => {
59
64
  if (!s) return;
60
- const r = u.trim(), n = ee.current.trim();
65
+ const r = m.trim(), t = ee.current.trim();
61
66
  if ($) {
62
67
  if (r.length > 0) {
63
- const d = y.filter(
64
- (m) => N(m.label).includes(N(r))
65
- ), t = d.map((m) => m.value);
66
- d.length !== y.length && (w(d), i && i(t));
68
+ const d = O.filter(
69
+ (u) => N(u.label).includes(N(r))
70
+ ), n = d.map((u) => u.value);
71
+ d.length !== O.length && (w(d), i && i(n));
67
72
  }
68
- r === "" && n.length > 0 && (w([]), i && i([]));
73
+ r === "" && t.length > 0 && (w([]), i && i([]));
69
74
  } else
70
- o && r.length > 0 && !N(o.label).includes(N(r)) && (w([]), i && i("")), r === "" && n.length > 0 && (w([]), i && i(""));
71
- ee.current = u;
75
+ o && r.length > 0 && !N(o.label).includes(N(r)) && (w([]), i && i("")), r === "" && t.length > 0 && (w([]), i && i(""));
76
+ ee.current = m;
72
77
  }, [
73
- u,
78
+ m,
74
79
  o,
75
- y,
80
+ O,
76
81
  $,
77
82
  s,
78
83
  i
79
84
  ]);
80
- const re = de(() => s ? a ? u : !$ && o ? o.label : $ && L.length > 0 ? `${L.length} ${L.length === 1 ? "seleccionado" : "seleccionados"}` : "" : "", [
85
+ const re = de(() => s ? a ? m : !$ && o ? o.label : $ && I.length > 0 ? `${I.length} ${I.length === 1 ? "seleccionado" : "seleccionados"}` : "" : "", [
81
86
  s,
82
87
  a,
83
- u,
88
+ m,
84
89
  o,
85
- L,
90
+ I,
86
91
  $
87
- ]), te = (r) => y.some((n) => n.value === r), T = de(() => !s || !u || j ? b : b.filter(
88
- (r) => N(r.label).includes(N(u))
89
- ), [b, u, s, j]), I = (() => {
92
+ ]), te = (r) => O.some((t) => t.value === r), Q = de(() => !s || !m || j ? y : y.filter(
93
+ (r) => N(r.label).includes(N(m))
94
+ ), [y, m, s, j]), _ = (() => {
90
95
  if (U) return U;
91
- if (s && u && u.trim().length > 0 && T.length === 0 && !a && !h)
96
+ if (s && m && m.trim().length > 0 && Q.length === 0 && !a && !f)
92
97
  return Y;
93
98
  })();
94
99
  K(() => {
95
- const r = (n) => {
96
- M.current && !M.current.contains(n.target) && E.current && !E.current.contains(n.target) && v(!1);
100
+ const r = (t) => {
101
+ M.current && !M.current.contains(t.target) && T.current && !T.current.contains(t.target) && b(!1);
97
102
  };
98
103
  return document.addEventListener("mousedown", r), () => {
99
104
  document.removeEventListener("mousedown", r);
@@ -103,130 +108,130 @@ const nr = ({
103
108
  e.select,
104
109
  be && e.btc,
105
110
  e[c],
106
- I ? e.error : "",
107
- S ? e.disabled : "",
111
+ _ ? e.error : "",
112
+ v ? e.disabled : "",
108
113
  a ? e.open : "",
109
114
  g ? e.inverted : "",
110
115
  ue
111
- ].filter(Boolean).join(" "), O = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, ne = fe && (o != null && o.icon) && !(s && a) ? o.icon : C, Ie = () => {
116
+ ].filter(Boolean).join(" "), D = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, ne = he && (o != null && o.icon) && !(s && a) ? o.icon : L, Ie = () => {
112
117
  var r;
113
- S || (v(!a), s && !a && (se(), (r = B.current) == null || r.focus()));
114
- }, q = (r, n = !0) => {
118
+ v || (b(!a), s && !a && (se(), (r = B.current) == null || r.focus()));
119
+ }, q = (r, t = !0) => {
115
120
  if (i)
116
121
  if ($) {
117
- const d = Array.isArray(h) ? h : [], m = d.includes(r) ? d.filter((f) => f !== r) : [...d, r];
118
- i(m);
122
+ const d = Array.isArray(f) ? f : [], u = d.includes(r) ? d.filter((h) => h !== r) : [...d, r];
123
+ i(u);
119
124
  } else
120
- i(r), n && v(!1);
125
+ i(r), t && b(!1);
121
126
  }, le = (r) => {
122
- const n = r.target.value;
123
- ye(n), a || v(!0), V && V(n);
127
+ const t = r.target.value;
128
+ ye(t), a || b(!0), F && F(t);
124
129
  }, se = () => {
125
- a || v(!0);
130
+ a || b(!0);
126
131
  }, _e = (r) => {
127
- A && (r.preventDefault(), r.stopPropagation()), s && (r.stopPropagation(), a || (v(!0), setTimeout(() => {
128
- var n;
129
- (n = B.current) == null || n.focus();
132
+ A && (r.preventDefault(), r.stopPropagation()), s && (r.stopPropagation(), a || (b(!0), setTimeout(() => {
133
+ var t;
134
+ (t = B.current) == null || t.focus();
130
135
  }, 0)));
131
- }, H = (r, n) => {
132
- if (!Ne || !n.trim()) return r;
133
- const d = N(r), t = N(n.trim());
134
- if (!d.includes(t)) return r;
135
- const m = [], f = [];
136
+ }, H = (r, t) => {
137
+ if (!Ne || !t.trim()) return r;
138
+ const d = N(r), n = N(t.trim());
139
+ if (!d.includes(n)) return r;
140
+ const u = [], h = [];
136
141
  for (let R = 0; R < r.length; R++) {
137
142
  const Qe = N(r[R]);
138
143
  for (let oe = 0; oe < Qe.length; oe++)
139
- f.push(R);
144
+ h.push(R);
140
145
  }
141
- const Q = d.indexOf(t), Te = Q + t.length - 1, ie = f[Q], ae = f[Te] + 1;
142
- return m.push(r.slice(0, ie)), m.push(
146
+ const S = d.indexOf(n), Te = S + n.length - 1, ie = h[S], ae = h[Te] + 1;
147
+ return u.push(r.slice(0, ie)), u.push(
143
148
  /* @__PURE__ */ l("mark", { className: e.highlight, children: r.slice(ie, ae) }, "highlight")
144
- ), m.push(r.slice(ae)), /* @__PURE__ */ l(G, { children: m });
149
+ ), u.push(r.slice(ae)), /* @__PURE__ */ l(G, { children: u });
145
150
  }, ke = Be({
146
151
  isOpen: a,
147
152
  containerRef: z,
148
- dropdownRef: E,
153
+ dropdownRef: T,
149
154
  size: c,
150
- optionsLength: T.length,
155
+ optionsLength: Q.length,
151
156
  isSearchable: s,
152
157
  label: x,
153
158
  helperText: P,
154
- displayError: I
159
+ displayError: _
155
160
  }), ce = ({
156
161
  insideDrawer: r = !1,
157
- handleOptionClickProp: n
162
+ handleOptionClickProp: t
158
163
  }) => {
159
- const d = (t) => {
160
- n ? n(t) : q(t);
164
+ const d = (n) => {
165
+ t ? t(n) : q(n);
161
166
  };
162
- return T.length > 0 ? T.map((t, m) => /* @__PURE__ */ p(
167
+ return Q.length > 0 ? Q.map((n, u) => /* @__PURE__ */ p(
163
168
  "div",
164
169
  {
165
- className: `${e.option} ${r ? e.isDrawer : ""} ${te(t.value) ? e.optionSelected : ""} ${g ? e.option_inverted : ""} ${t.columns ? e.optionTable : ""} ${k ? e.optionWithCheckbox : ""}`,
166
- onClick: (f) => {
167
- f.stopPropagation(), d(t.value);
170
+ className: `${e.option} ${r ? e.isDrawer : ""} ${te(n.value) ? e.optionSelected : ""} ${g ? e.option_inverted : ""} ${n.columns ? e.optionTable : ""} ${E ? e.optionWithCheckbox : ""}`,
171
+ onClick: (h) => {
172
+ h.stopPropagation(), d(n.value);
168
173
  },
169
174
  children: [
170
- k && /* @__PURE__ */ l(
175
+ E && /* @__PURE__ */ l(
171
176
  "input",
172
177
  {
173
178
  type: "checkbox",
174
- checked: te(t.value),
175
- onChange: () => q(t.value),
176
- onClick: (f) => f.stopPropagation(),
179
+ checked: te(n.value),
180
+ onChange: () => q(n.value),
181
+ onClick: (h) => h.stopPropagation(),
177
182
  className: e.optionCheckbox
178
183
  }
179
184
  ),
180
- t.columns ? /* @__PURE__ */ l(G, { children: _ && Object.entries(_).map(([f, Q]) => /* @__PURE__ */ p("div", { className: e.tableColumn, children: [
181
- /* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[c]}`, children: Q }),
185
+ n.columns ? /* @__PURE__ */ l(G, { children: k && Object.entries(k).map(([h, S]) => /* @__PURE__ */ p("div", { className: e.tableColumn, children: [
186
+ /* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[c]}`, children: S }),
182
187
  /* @__PURE__ */ l("div", { className: `${e.columnValue} ${e[c]}`, children: H(
183
- String(t.columns[f] ?? ""),
184
- u
188
+ String(n.columns[h] ?? ""),
189
+ m
185
190
  ) })
186
- ] }, f)) }) : (
191
+ ] }, h)) }) : (
187
192
  //opción tiene descripción
188
- t.description ? /* @__PURE__ */ p("div", { className: e.optionWithDescriptionWrapper, children: [
189
- (t.icon || C) && /* @__PURE__ */ l(
193
+ n.description ? /* @__PURE__ */ p("div", { className: e.optionWithDescriptionWrapper, children: [
194
+ (n.icon || L) && /* @__PURE__ */ l(
190
195
  W,
191
196
  {
192
- name: t.icon || C,
193
- width: O,
194
- height: O
197
+ name: n.icon || L,
198
+ width: D,
199
+ height: D
195
200
  }
196
201
  ),
197
202
  /* @__PURE__ */ p("div", { className: e.optionWithDescription, children: [
198
- /* @__PURE__ */ l("span", { className: e.optionWithDescriptionLabel, children: H(t.label, u) }),
199
- /* @__PURE__ */ l("span", { className: e.optionWithDescriptionValue, children: t.description })
203
+ /* @__PURE__ */ l("span", { className: e.optionWithDescriptionLabel, children: H(n.label, m) }),
204
+ /* @__PURE__ */ l("span", { className: e.optionWithDescriptionValue, children: n.description })
200
205
  ] })
201
206
  ] }) : /* @__PURE__ */ p(G, { children: [
202
- (t.icon || C) && /* @__PURE__ */ l("div", { className: e.optionIcon, children: /* @__PURE__ */ l(
207
+ (n.icon || L) && /* @__PURE__ */ l("div", { className: e.optionIcon, children: /* @__PURE__ */ l(
203
208
  W,
204
209
  {
205
- name: t.icon || C,
206
- width: O,
207
- height: O
210
+ name: n.icon || L,
211
+ width: D,
212
+ height: D
208
213
  }
209
214
  ) }),
210
- /* @__PURE__ */ l("div", { style: { whiteSpace: "pre-line", lineHeight: 1.25 }, children: H(t.label, u) })
215
+ /* @__PURE__ */ l("div", { style: { whiteSpace: "pre-line", lineHeight: 1.25 }, children: H(n.label, m) })
211
216
  ] })
212
217
  )
213
218
  ]
214
219
  },
215
- m
220
+ u
216
221
  )) : /* @__PURE__ */ l("span", { className: e.noResults, children: Y });
217
222
  }, Ee = () => {
218
- const r = Ve(), n = (d) => {
223
+ const r = Fe(), t = (d) => {
219
224
  q(d, !1), $ || r();
220
225
  };
221
226
  return /* @__PURE__ */ l(
222
227
  "div",
223
228
  {
224
- className: `${e.dropdown} ${e.isDrawer} ${e[c]} ${g ? e.dropdown_inverted : ""} ${_ ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
229
+ className: `${e.dropdown} ${e.isDrawer} ${e[c]} ${g ? e.dropdown_inverted : ""} ${k ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
225
230
  children: /* @__PURE__ */ l(
226
231
  ce,
227
232
  {
228
233
  insideDrawer: !0,
229
- handleOptionClickProp: n
234
+ handleOptionClickProp: t
230
235
  }
231
236
  )
232
237
  }
@@ -236,13 +241,13 @@ const nr = ({
236
241
  "div",
237
242
  {
238
243
  ref: z,
239
- className: `${e.selectContainer} ${c === "medium" ? e.selectContainer_medium : c === "large" ? e.selectContainer_large : c === "extraLarge" ? e.selectContainer_extraLarge : ""} ${S ? e.disabled : ""}`,
244
+ className: `${e.selectContainer} ${c === "medium" ? e.selectContainer_medium : c === "large" ? e.selectContainer_large : c === "extraLarge" ? e.selectContainer_extraLarge : ""} ${v ? e.disabled : ""}`,
240
245
  ...Se,
241
246
  children: [
242
247
  x && /* @__PURE__ */ p(
243
248
  "label",
244
249
  {
245
- className: `${e.label} ${c === "large" ? e.label_large : ""} ${c === "extraLarge" ? e.label_extraLarge : ""} ${g ? e.label_inverted : ""} ${S ? e.disabled : ""} `,
250
+ className: `${e.label} ${c === "large" ? e.label_large : ""} ${c === "extraLarge" ? e.label_extraLarge : ""} ${g ? e.label_inverted : ""} ${v ? e.disabled : ""} `,
246
251
  children: [
247
252
  x,
248
253
  /* @__PURE__ */ l(
@@ -265,7 +270,7 @@ const nr = ({
265
270
  style: Z ? { borderColor: Z } : void 0,
266
271
  children: [
267
272
  /* @__PURE__ */ p("div", { className: e.iconLabel, children: [
268
- (s || ne && he) && /* @__PURE__ */ l(
273
+ (s || ne && fe) && /* @__PURE__ */ l(
269
274
  "div",
270
275
  {
271
276
  className: `${e.icon} ${g ? e.icon_inverted : ""}`,
@@ -273,8 +278,8 @@ const nr = ({
273
278
  W,
274
279
  {
275
280
  name: s ? "SearchIcon" : ne,
276
- width: O,
277
- height: O
281
+ width: D,
282
+ height: D
278
283
  }
279
284
  )
280
285
  }
@@ -284,19 +289,19 @@ const nr = ({
284
289
  {
285
290
  ref: B,
286
291
  value: re,
287
- className: `${e.selectInput} ${!o && !a && L.length === 0 ? e.placeholder : ""}`,
288
- placeholder: F,
292
+ className: `${e.selectInput} ${!o && !a && I.length === 0 ? e.placeholder : ""}`,
293
+ placeholder: V,
289
294
  onChange: le,
290
295
  onFocus: se,
291
296
  onClick: _e,
292
- disabled: S,
297
+ disabled: v,
293
298
  readOnly: A || !a
294
299
  }
295
300
  ) : /* @__PURE__ */ l(
296
301
  "span",
297
302
  {
298
303
  className: `${e.selectValue} ${o ? "" : e.placeholder}`,
299
- children: o ? o.label : F
304
+ children: o ? o.label : V
300
305
  }
301
306
  )
302
307
  ] }),
@@ -313,19 +318,19 @@ const nr = ({
313
318
  }
314
319
  ),
315
320
  A ? /* @__PURE__ */ p(
316
- Fe,
321
+ Ve,
317
322
  {
318
323
  className: e.drawerSelect,
319
324
  headerClassName: e.drawerSelectHeader,
320
325
  isOpen: a,
321
- setIsOpen: v,
326
+ setIsOpen: b,
322
327
  title: $e,
323
328
  zIndex: 1,
324
329
  children: [
325
330
  s && /* @__PURE__ */ l("div", { className: e.drawerSearchInput, children: /* @__PURE__ */ l(
326
331
  je,
327
332
  {
328
- placeholder: F,
333
+ placeholder: V,
329
334
  icon: "SearchIcon",
330
335
  value: re,
331
336
  onChange: le,
@@ -339,8 +344,8 @@ const nr = ({
339
344
  /* @__PURE__ */ l(
340
345
  "div",
341
346
  {
342
- ref: E,
343
- className: `${e.dropdown} ${e[c]} ${e.dropdownPortal} ${g ? e.dropdown_inverted : ""} ${_ ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
347
+ ref: T,
348
+ className: `${e.dropdown} ${e[c]} ${e.dropdownPortal} ${g ? e.dropdown_inverted : ""} ${k ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
344
349
  style: ke,
345
350
  children: /* @__PURE__ */ l(ce, {})
346
351
  }
@@ -348,8 +353,8 @@ const nr = ({
348
353
  document.getElementById("root") || document.body
349
354
  )
350
355
  ] }),
351
- I && /* @__PURE__ */ l(xe, { message: I, size: c, inverted: g }),
352
- P && !I && /* @__PURE__ */ l(We, { message: P, size: c, inverted: g })
356
+ _ && /* @__PURE__ */ l(xe, { message: _, size: c, inverted: g }),
357
+ P && !_ && /* @__PURE__ */ l(We, { message: P, size: c, inverted: g })
353
358
  ]
354
359
  }
355
360
  );
package/dist/main.d.ts CHANGED
@@ -43,3 +43,4 @@ export type { SpinnerProps, SpinnerColor } from './components/Spinner';
43
43
  export type { Step } from './components/stepper';
44
44
  export type { ToastProps, ToastType, ToastPosition } from './components/Toast';
45
45
  export type { ModalProps } from './components/modal';
46
+ export type { SearchableInputGroupProps, SearchableInputGroupField, } from './components/SearchableInputGroup';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bmi-next-brokers",
3
3
  "description": "Componentes de UI para proyecto BMI Next Brokers",
4
- "version": "2.5.7",
4
+ "version": "2.5.9",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",