bmi-next-brokers 2.5.8 → 2.6.0

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.
@@ -11,21 +11,20 @@ export interface SearchableInputGroupField {
11
11
  }
12
12
  export interface SearchableInputGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
13
13
  fields: SearchableInputGroupField[];
14
- /** Valores controlados que se muestran en los inputs. */
15
- values?: Record<string, string>;
16
- /** Resultados de búsqueda actuales, provistos por el padre. */
14
+ /** Opción seleccionada actualmente. Controlado por el padre. */
15
+ selectedItem?: Record<string, unknown> | null;
16
+ /** Opciones del dropdown. Si no se pasa onSearch, el filtrado es interno. */
17
17
  options?: Record<string, unknown>[];
18
- /** Se llama al cambiar cualquier input, con la clave del campo y el nuevo valor. */
19
- onSearch: (key: string, value: string) => void;
18
+ /** Búsqueda remota: el padre filtra las opciones. Si se omite, el filtrado es interno. */
19
+ onSearch?: (key: string, value: string) => void;
20
20
  /** Se llama al seleccionar una fila del dropdown. */
21
21
  onSelect?: (item: Record<string, unknown>) => void;
22
- /** Mensaje cuando no hay resultados (solo visible si loading es false). */
22
+ /** Se llama cuando selectedItem ya no está en las opciones filtradas. */
23
+ onReset?: () => void;
23
24
  noResultMessage?: string;
24
- /** Mientras loading=true no se muestra el mensaje de sin resultados. */
25
- loading?: boolean;
26
25
  disabled?: boolean;
27
26
  size?: SelectSize;
28
27
  btc?: boolean;
29
28
  containerClassName?: string;
30
29
  }
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;
30
+ export declare const SearchableInputGroup: ({ fields, selectedItem, options, onSearch, onSelect, onReset, noResultMessage, disabled, btc, size, className, containerClassName, ...rest }: SearchableInputGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,112 +1,157 @@
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
- import { s as n } from "../../Select.module-D_7bjq9u.js";
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
- fields: m,
14
- values: _ = {},
15
- options: a = [],
16
- onSearch: b,
17
- onSelect: u,
18
- noResultMessage: $ = "No se encontraron resultados",
19
- loading: j = !1,
20
- disabled: f = !1,
21
- btc: C = !1,
22
- size: s = "medium",
23
- className: h,
24
- containerClassName: I,
25
- ...R
1
+ import { jsxs as Q, jsx as c } from "react/jsx-runtime";
2
+ import { useState as N, useRef as S, useMemo as U, useEffect as B } from "react";
3
+ import { createPortal as X } from "react-dom";
4
+ import { Input as Y } from "../Input/Input.js";
5
+ import { s as t } from "../../Select.module-D_7bjq9u.js";
6
+ import { useBTC as Z } from "../../hooks/btcContext/useBtcContext.js";
7
+ import { useDropdownPosition as z } from "../../hooks/useDropdownPosition.js";
8
+ import '../../assets/index4.css';const R = "_container_1kajw_1", nn = "_inputs_1kajw_7", rn = "_inputWrapper_1kajw_13", _ = {
9
+ container: R,
10
+ inputs: nn,
11
+ inputWrapper: rn
12
+ }, ln = ({
13
+ fields: u,
14
+ selectedItem: s = null,
15
+ options: l = [],
16
+ onSearch: d,
17
+ onSelect: k,
18
+ onReset: a,
19
+ noResultMessage: O = "No se encontraron resultados",
20
+ disabled: $ = !1,
21
+ btc: F = !1,
22
+ size: p = "medium",
23
+ className: C,
24
+ containerClassName: L,
25
+ ...P
26
26
  }) => {
27
- const { btc: x } = k(), B = C ?? x, [w, c] = W(!1), l = N(null), i = N(null), D = w && !f, E = F({
27
+ const { btc: T } = Z(), W = F ?? T, j = !!d, [w, y] = N(!1), [K, M] = N(
28
+ {}
29
+ ), [o, g] = N(null), f = S(null), h = S(null), b = S({}), V = w && !$, i = o ? K[o] ?? "" : "", A = z({
28
30
  isOpen: w,
29
- containerRef: l,
30
- dropdownRef: i,
31
- size: s,
32
- optionsLength: a.length,
31
+ containerRef: f,
32
+ dropdownRef: h,
33
+ size: p,
34
+ optionsLength: l.length,
33
35
  isSearchable: !0
34
- });
35
- y(() => {
36
- const e = (t) => {
37
- l.current && !l.current.contains(t.target) && i.current && !i.current.contains(t.target) && c(!1);
36
+ }), D = (n) => typeof n == "string" ? n.normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/\s+/g, "").toLowerCase() : "", v = U(() => {
37
+ if (!o || !i || j) return l;
38
+ const n = u.find((e) => e.key === o);
39
+ if (!n) return l;
40
+ const r = n.columnKey ?? n.key;
41
+ return l.filter(
42
+ (e) => D(String(e[r] ?? "")).includes(D(i))
43
+ );
44
+ }, [l, i, o, j]);
45
+ B(() => {
46
+ const n = (r) => {
47
+ f.current && !f.current.contains(r.target) && h.current && !h.current.contains(r.target) && (y(!1), g(null));
38
48
  };
39
- return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
40
- }, []);
41
- const P = (e, t) => {
42
- b(e, t), t.trim() ? c(!0) : c(!1);
43
- }, S = (e) => {
44
- u == null || u(e), c(!1);
45
- }, T = !j && a.length === 0;
46
- return /* @__PURE__ */ v(
49
+ return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
50
+ }, []), B(() => {
51
+ if (!o) return;
52
+ const n = i.trim(), r = (b.current[o] ?? "").trim();
53
+ s && n.length > 0 && (v.some(
54
+ (x) => u.every((m) => {
55
+ const E = m.columnKey ?? m.key;
56
+ return String(x[E] ?? "") === String(s[E] ?? "");
57
+ })
58
+ ) || a == null || a()), n === "" && r.length > 0 && s && (a == null || a()), b.current = {
59
+ ...b.current,
60
+ [o]: i
61
+ };
62
+ }, [i, o, s, v]);
63
+ const G = (n, r) => {
64
+ M((e) => ({ ...e, [n]: r })), g(n), y(!0), d == null || d(n, r);
65
+ }, q = (n) => {
66
+ g(n), w || y(!0);
67
+ }, H = (n) => {
68
+ k == null || k(n), y(!1), g(null);
69
+ }, I = (n) => s ? u.every((r) => {
70
+ const e = r.columnKey ?? r.key;
71
+ return String(n[e] ?? "") === String(s[e] ?? "");
72
+ }) : !1, J = (n) => {
73
+ if (o === n.key)
74
+ return K[n.key] ?? "";
75
+ if (s) {
76
+ const r = n.columnKey ?? n.key;
77
+ return String(s[r] ?? "");
78
+ }
79
+ return "";
80
+ };
81
+ return /* @__PURE__ */ Q(
47
82
  "div",
48
83
  {
49
- ref: l,
50
- className: [p.container, I].filter(Boolean).join(" "),
84
+ ref: f,
85
+ className: [_.container, L].filter(Boolean).join(" "),
51
86
  children: [
52
- /* @__PURE__ */ o(
87
+ /* @__PURE__ */ c(
53
88
  "div",
54
89
  {
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,
90
+ className: `${_.inputs} ${C || ""}`,
91
+ ...P,
92
+ children: u.map((n) => /* @__PURE__ */ c("div", { className: _.inputWrapper, children: /* @__PURE__ */ c(
93
+ Y,
59
94
  {
60
- label: t,
61
- placeholder: r,
62
- value: _[e] ?? "",
63
- onChange: (d) => P(e, d.target.value),
95
+ label: n.label,
96
+ placeholder: n.placeholder,
97
+ value: J(n),
98
+ onChange: (r) => G(n.key, r.target.value),
99
+ onFocus: () => q(n.key),
64
100
  icon: "SearchIcon",
65
- size: s,
66
- disabled: f,
67
- btc: B
101
+ size: p,
102
+ disabled: $,
103
+ btc: W
68
104
  }
69
- ) }, e))
105
+ ) }, n.key))
70
106
  }
71
107
  ),
72
- D && L(
73
- /* @__PURE__ */ o(
108
+ V && X(
109
+ /* @__PURE__ */ c(
74
110
  "div",
75
111
  {
76
- ref: i,
112
+ ref: h,
77
113
  className: [
78
- n.dropdown,
79
- n[s],
80
- n.dropdownPortal,
81
- n.dropdownTable
114
+ t.dropdown,
115
+ t[p],
116
+ t.dropdownPortal,
117
+ t.dropdownTable
82
118
  ].join(" "),
83
- style: E,
84
- children: a.length > 0 ? a.map((e, t) => /* @__PURE__ */ o(
119
+ style: A,
120
+ children: v.length > 0 ? v.map((n, r) => /* @__PURE__ */ c(
85
121
  "div",
86
122
  {
87
- className: `${n.option} ${n.optionTable}`,
88
- onMouseDown: (r) => {
89
- r.preventDefault(), r.stopPropagation(), S(e);
123
+ className: `${t.option} ${t.optionTable} ${I(n) ? t.optionSelected : ""}`,
124
+ onMouseDown: (e) => {
125
+ e.preventDefault(), e.stopPropagation(), H(n);
90
126
  },
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))
127
+ style: { padding: 0, gap: 0 },
128
+ children: u.map(({ key: e, columnKey: x, columnHeader: m }) => /* @__PURE__ */ Q(
129
+ "div",
130
+ {
131
+ className: t.tableColumn,
132
+ style: { padding: "8px 12px 8px 18px" },
133
+ children: [
134
+ m && /* @__PURE__ */ c(
135
+ "div",
136
+ {
137
+ className: `${t.columnHeader} ${t[p]}`,
138
+ children: m
139
+ }
140
+ ),
141
+ /* @__PURE__ */ c(
142
+ "div",
143
+ {
144
+ className: `${t.columnValue} ${t[p]}`,
145
+ children: String(n[x ?? e] ?? "")
146
+ }
147
+ )
148
+ ]
149
+ },
150
+ e
151
+ ))
107
152
  },
108
- t
109
- )) : T && /* @__PURE__ */ o("span", { className: n.noResults, children: $ })
153
+ r
154
+ )) : /* @__PURE__ */ c("span", { className: t.noResults, children: O })
110
155
  }
111
156
  ),
112
157
  document.getElementById("root") || document.body
@@ -116,5 +161,5 @@ import '../../assets/index4.css';const G = "_container_1kajw_1", M = "_inputs_1k
116
161
  );
117
162
  };
118
163
  export {
119
- X as SearchableInputGroup
164
+ ln as SearchableInputGroup
120
165
  };
@@ -6,8 +6,8 @@ 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";
@@ -19,12 +19,12 @@ const nr = ({
19
19
  icon: L,
20
20
  className: ue,
21
21
  required: me,
22
- placeholder: F = "Seleccionar...",
23
- options: b = [],
22
+ placeholder: V = "Seleccionar...",
23
+ options: y = [],
24
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
29
  dynamicIcon: he = !1,
30
30
  showPlaceholderIcon: fe = !1,
@@ -40,32 +40,35 @@ 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), [m, ye] = J(""), s = pe || E, $ = E, M = C(null), Oe = C(null), T = C(null), z = C(null), B = C(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
46
  if (Array.isArray(f) && f.length > 0) {
47
- const r = b.filter((n) => f.includes(n.value)), t = r.map((n) => n.value);
48
- w((n) => n.length === r.length && n.every((u, D) => u.value === r[D].value) ? n : r), (t.length !== f.length || !t.every((n) => f.includes(n))) && i && i(t);
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
53
  w((r) => r.length === 0 ? r : []);
51
54
  else if (f) {
52
- const r = b.find((t) => t.value === f);
55
+ const r = y.find((t) => t.value === f);
53
56
  r ? w(
54
57
  (t) => t.length === 1 && t[0].value === r.value ? t : [r]
55
58
  ) : (w((t) => t.length === 0 ? t : []), i && i(""));
56
59
  } else
57
60
  w((r) => r.length === 0 ? r : []);
58
- }, [f, b, $]);
59
- const I = 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 = C("");
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("");
60
63
  K(() => {
61
64
  if (!s) return;
62
65
  const r = m.trim(), t = ee.current.trim();
63
66
  if ($) {
64
67
  if (r.length > 0) {
65
- const d = y.filter(
66
- (h) => N(h.label).includes(N(r))
67
- ), n = d.map((h) => h.value);
68
- d.length !== y.length && (w(d), i && i(n));
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));
69
72
  }
70
73
  r === "" && t.length > 0 && (w([]), i && i([]));
71
74
  } else
@@ -74,7 +77,7 @@ const nr = ({
74
77
  }, [
75
78
  m,
76
79
  o,
77
- y,
80
+ O,
78
81
  $,
79
82
  s,
80
83
  i
@@ -86,16 +89,16 @@ const nr = ({
86
89
  o,
87
90
  I,
88
91
  $
89
- ]), te = (r) => y.some((t) => t.value === r), Q = de(() => !s || !m || j ? b : b.filter(
92
+ ]), te = (r) => O.some((t) => t.value === r), Q = de(() => !s || !m || j ? y : y.filter(
90
93
  (r) => N(r.label).includes(N(m))
91
- ), [b, m, s, j]), _ = (() => {
94
+ ), [y, m, s, j]), _ = (() => {
92
95
  if (U) return U;
93
96
  if (s && m && m.trim().length > 0 && Q.length === 0 && !a && !f)
94
97
  return Y;
95
98
  })();
96
99
  K(() => {
97
100
  const r = (t) => {
98
- M.current && !M.current.contains(t.target) && T.current && !T.current.contains(t.target) && v(!1);
101
+ M.current && !M.current.contains(t.target) && T.current && !T.current.contains(t.target) && b(!1);
99
102
  };
100
103
  return document.addEventListener("mousedown", r), () => {
101
104
  document.removeEventListener("mousedown", r);
@@ -106,27 +109,27 @@ const nr = ({
106
109
  be && e.btc,
107
110
  e[c],
108
111
  _ ? e.error : "",
109
- S ? e.disabled : "",
112
+ v ? e.disabled : "",
110
113
  a ? e.open : "",
111
114
  g ? e.inverted : "",
112
115
  ue
113
- ].filter(Boolean).join(" "), O = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, ne = he && (o != null && o.icon) && !(s && a) ? o.icon : L, 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 = () => {
114
117
  var r;
115
- S || (v(!a), s && !a && (se(), (r = B.current) == null || r.focus()));
118
+ v || (b(!a), s && !a && (se(), (r = B.current) == null || r.focus()));
116
119
  }, q = (r, t = !0) => {
117
120
  if (i)
118
121
  if ($) {
119
- const d = Array.isArray(f) ? f : [], h = d.includes(r) ? d.filter((u) => u !== r) : [...d, r];
120
- i(h);
122
+ const d = Array.isArray(f) ? f : [], u = d.includes(r) ? d.filter((h) => h !== r) : [...d, r];
123
+ i(u);
121
124
  } else
122
- i(r), t && v(!1);
125
+ i(r), t && b(!1);
123
126
  }, le = (r) => {
124
127
  const t = r.target.value;
125
- ye(t), a || v(!0), V && V(t);
128
+ ye(t), a || b(!0), F && F(t);
126
129
  }, se = () => {
127
- a || v(!0);
130
+ a || b(!0);
128
131
  }, _e = (r) => {
129
- A && (r.preventDefault(), r.stopPropagation()), s && (r.stopPropagation(), a || (v(!0), setTimeout(() => {
132
+ A && (r.preventDefault(), r.stopPropagation()), s && (r.stopPropagation(), a || (b(!0), setTimeout(() => {
130
133
  var t;
131
134
  (t = B.current) == null || t.focus();
132
135
  }, 0)));
@@ -134,16 +137,16 @@ const nr = ({
134
137
  if (!Ne || !t.trim()) return r;
135
138
  const d = N(r), n = N(t.trim());
136
139
  if (!d.includes(n)) return r;
137
- const h = [], u = [];
140
+ const u = [], h = [];
138
141
  for (let R = 0; R < r.length; R++) {
139
142
  const Qe = N(r[R]);
140
143
  for (let oe = 0; oe < Qe.length; oe++)
141
- u.push(R);
144
+ h.push(R);
142
145
  }
143
- const D = d.indexOf(n), Te = D + n.length - 1, ie = u[D], ae = u[Te] + 1;
144
- return h.push(r.slice(0, ie)), h.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(
145
148
  /* @__PURE__ */ l("mark", { className: e.highlight, children: r.slice(ie, ae) }, "highlight")
146
- ), h.push(r.slice(ae)), /* @__PURE__ */ l(G, { children: h });
149
+ ), u.push(r.slice(ae)), /* @__PURE__ */ l(G, { children: u });
147
150
  }, ke = Be({
148
151
  isOpen: a,
149
152
  containerRef: z,
@@ -161,12 +164,12 @@ const nr = ({
161
164
  const d = (n) => {
162
165
  t ? t(n) : q(n);
163
166
  };
164
- return Q.length > 0 ? Q.map((n, h) => /* @__PURE__ */ p(
167
+ return Q.length > 0 ? Q.map((n, u) => /* @__PURE__ */ p(
165
168
  "div",
166
169
  {
167
170
  className: `${e.option} ${r ? e.isDrawer : ""} ${te(n.value) ? e.optionSelected : ""} ${g ? e.option_inverted : ""} ${n.columns ? e.optionTable : ""} ${E ? e.optionWithCheckbox : ""}`,
168
- onClick: (u) => {
169
- u.stopPropagation(), d(n.value);
171
+ onClick: (h) => {
172
+ h.stopPropagation(), d(n.value);
170
173
  },
171
174
  children: [
172
175
  E && /* @__PURE__ */ l(
@@ -175,25 +178,25 @@ const nr = ({
175
178
  type: "checkbox",
176
179
  checked: te(n.value),
177
180
  onChange: () => q(n.value),
178
- onClick: (u) => u.stopPropagation(),
181
+ onClick: (h) => h.stopPropagation(),
179
182
  className: e.optionCheckbox
180
183
  }
181
184
  ),
182
- n.columns ? /* @__PURE__ */ l(G, { children: k && Object.entries(k).map(([u, D]) => /* @__PURE__ */ p("div", { className: e.tableColumn, children: [
183
- /* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[c]}`, children: D }),
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 }),
184
187
  /* @__PURE__ */ l("div", { className: `${e.columnValue} ${e[c]}`, children: H(
185
- String(n.columns[u] ?? ""),
188
+ String(n.columns[h] ?? ""),
186
189
  m
187
190
  ) })
188
- ] }, u)) }) : (
191
+ ] }, h)) }) : (
189
192
  //opción tiene descripción
190
193
  n.description ? /* @__PURE__ */ p("div", { className: e.optionWithDescriptionWrapper, children: [
191
194
  (n.icon || L) && /* @__PURE__ */ l(
192
195
  W,
193
196
  {
194
197
  name: n.icon || L,
195
- width: O,
196
- height: O
198
+ width: D,
199
+ height: D
197
200
  }
198
201
  ),
199
202
  /* @__PURE__ */ p("div", { className: e.optionWithDescription, children: [
@@ -205,8 +208,8 @@ const nr = ({
205
208
  W,
206
209
  {
207
210
  name: n.icon || L,
208
- width: O,
209
- height: O
211
+ width: D,
212
+ height: D
210
213
  }
211
214
  ) }),
212
215
  /* @__PURE__ */ l("div", { style: { whiteSpace: "pre-line", lineHeight: 1.25 }, children: H(n.label, m) })
@@ -214,10 +217,10 @@ const nr = ({
214
217
  )
215
218
  ]
216
219
  },
217
- h
220
+ u
218
221
  )) : /* @__PURE__ */ l("span", { className: e.noResults, children: Y });
219
222
  }, Ee = () => {
220
- const r = Ve(), t = (d) => {
223
+ const r = Fe(), t = (d) => {
221
224
  q(d, !1), $ || r();
222
225
  };
223
226
  return /* @__PURE__ */ l(
@@ -238,13 +241,13 @@ const nr = ({
238
241
  "div",
239
242
  {
240
243
  ref: z,
241
- 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 : ""}`,
242
245
  ...Se,
243
246
  children: [
244
247
  x && /* @__PURE__ */ p(
245
248
  "label",
246
249
  {
247
- 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 : ""} `,
248
251
  children: [
249
252
  x,
250
253
  /* @__PURE__ */ l(
@@ -275,8 +278,8 @@ const nr = ({
275
278
  W,
276
279
  {
277
280
  name: s ? "SearchIcon" : ne,
278
- width: O,
279
- height: O
281
+ width: D,
282
+ height: D
280
283
  }
281
284
  )
282
285
  }
@@ -287,18 +290,18 @@ const nr = ({
287
290
  ref: B,
288
291
  value: re,
289
292
  className: `${e.selectInput} ${!o && !a && I.length === 0 ? e.placeholder : ""}`,
290
- placeholder: F,
293
+ placeholder: V,
291
294
  onChange: le,
292
295
  onFocus: se,
293
296
  onClick: _e,
294
- disabled: S,
297
+ disabled: v,
295
298
  readOnly: A || !a
296
299
  }
297
300
  ) : /* @__PURE__ */ l(
298
301
  "span",
299
302
  {
300
303
  className: `${e.selectValue} ${o ? "" : e.placeholder}`,
301
- children: o ? o.label : F
304
+ children: o ? o.label : V
302
305
  }
303
306
  )
304
307
  ] }),
@@ -315,19 +318,19 @@ const nr = ({
315
318
  }
316
319
  ),
317
320
  A ? /* @__PURE__ */ p(
318
- Fe,
321
+ Ve,
319
322
  {
320
323
  className: e.drawerSelect,
321
324
  headerClassName: e.drawerSelectHeader,
322
325
  isOpen: a,
323
- setIsOpen: v,
326
+ setIsOpen: b,
324
327
  title: $e,
325
328
  zIndex: 1,
326
329
  children: [
327
330
  s && /* @__PURE__ */ l("div", { className: e.drawerSearchInput, children: /* @__PURE__ */ l(
328
331
  je,
329
332
  {
330
- placeholder: F,
333
+ placeholder: V,
331
334
  icon: "SearchIcon",
332
335
  value: re,
333
336
  onChange: le,
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.8",
4
+ "version": "2.6.0",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",