bmi-next-brokers 2.5.7 → 2.5.8
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
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Input as
|
|
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
|
|
7
|
-
import { useDropdownPosition as
|
|
8
|
-
import '../../assets/index4.css';const
|
|
9
|
-
container:
|
|
10
|
-
inputs:
|
|
11
|
-
inputWrapper:
|
|
12
|
-
},
|
|
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:
|
|
14
|
+
values: _ = {},
|
|
15
15
|
options: a = [],
|
|
16
|
-
onSearch:
|
|
16
|
+
onSearch: b,
|
|
17
17
|
onSelect: u,
|
|
18
|
-
noResultMessage:
|
|
19
|
-
loading:
|
|
18
|
+
noResultMessage: $ = "No se encontraron resultados",
|
|
19
|
+
loading: j = !1,
|
|
20
20
|
disabled: f = !1,
|
|
21
|
-
btc:
|
|
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:
|
|
25
|
-
isOpen:
|
|
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
|
-
|
|
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
|
|
39
|
-
|
|
40
|
-
},
|
|
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
|
-
},
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
119
|
+
X as SearchableInputGroup
|
|
103
120
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as p, jsx as l, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import { useState as J, useRef as
|
|
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";
|
|
@@ -16,23 +16,23 @@ const nr = ({
|
|
|
16
16
|
label: x,
|
|
17
17
|
error: U,
|
|
18
18
|
helperText: P,
|
|
19
|
-
icon:
|
|
19
|
+
icon: L,
|
|
20
20
|
className: ue,
|
|
21
21
|
required: me,
|
|
22
22
|
placeholder: F = "Seleccionar...",
|
|
23
23
|
options: b = [],
|
|
24
|
-
value:
|
|
24
|
+
value: f,
|
|
25
25
|
onChange: i,
|
|
26
26
|
onSearchInput: V,
|
|
27
27
|
disabled: S = !1,
|
|
28
28
|
inverted: g = !1,
|
|
29
|
-
dynamicIcon:
|
|
30
|
-
showPlaceholderIcon:
|
|
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:
|
|
35
|
+
searchAndCheckbox: E = !1,
|
|
36
36
|
customBorderColor: Z,
|
|
37
37
|
responsive: ge = !1,
|
|
38
38
|
title: $e,
|
|
@@ -40,60 +40,62 @@ 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), [
|
|
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;
|
|
44
44
|
K(() => {
|
|
45
45
|
if ($)
|
|
46
|
-
if (Array.isArray(
|
|
47
|
-
const r = b.filter((
|
|
48
|
-
w(r), (
|
|
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);
|
|
49
49
|
} else
|
|
50
|
-
w([]);
|
|
51
|
-
else if (
|
|
52
|
-
const r = b.find((
|
|
53
|
-
r ? w(
|
|
50
|
+
w((r) => r.length === 0 ? r : []);
|
|
51
|
+
else if (f) {
|
|
52
|
+
const r = b.find((t) => t.value === f);
|
|
53
|
+
r ? w(
|
|
54
|
+
(t) => t.length === 1 && t[0].value === r.value ? t : [r]
|
|
55
|
+
) : (w((t) => t.length === 0 ? t : []), i && i(""));
|
|
54
56
|
} else
|
|
55
|
-
w([]);
|
|
56
|
-
}, [
|
|
57
|
-
const
|
|
57
|
+
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("");
|
|
58
60
|
K(() => {
|
|
59
61
|
if (!s) return;
|
|
60
|
-
const r =
|
|
62
|
+
const r = m.trim(), t = ee.current.trim();
|
|
61
63
|
if ($) {
|
|
62
64
|
if (r.length > 0) {
|
|
63
65
|
const d = y.filter(
|
|
64
|
-
(
|
|
65
|
-
),
|
|
66
|
-
d.length !== y.length && (w(d), i && i(
|
|
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));
|
|
67
69
|
}
|
|
68
|
-
r === "" &&
|
|
70
|
+
r === "" && t.length > 0 && (w([]), i && i([]));
|
|
69
71
|
} else
|
|
70
|
-
o && r.length > 0 && !N(o.label).includes(N(r)) && (w([]), i && i("")), r === "" &&
|
|
71
|
-
ee.current =
|
|
72
|
+
o && r.length > 0 && !N(o.label).includes(N(r)) && (w([]), i && i("")), r === "" && t.length > 0 && (w([]), i && i(""));
|
|
73
|
+
ee.current = m;
|
|
72
74
|
}, [
|
|
73
|
-
|
|
75
|
+
m,
|
|
74
76
|
o,
|
|
75
77
|
y,
|
|
76
78
|
$,
|
|
77
79
|
s,
|
|
78
80
|
i
|
|
79
81
|
]);
|
|
80
|
-
const re = de(() => s ? a ?
|
|
82
|
+
const re = de(() => s ? a ? m : !$ && o ? o.label : $ && I.length > 0 ? `${I.length} ${I.length === 1 ? "seleccionado" : "seleccionados"}` : "" : "", [
|
|
81
83
|
s,
|
|
82
84
|
a,
|
|
83
|
-
|
|
85
|
+
m,
|
|
84
86
|
o,
|
|
85
|
-
|
|
87
|
+
I,
|
|
86
88
|
$
|
|
87
|
-
]), te = (r) => y.some((
|
|
88
|
-
(r) => N(r.label).includes(N(
|
|
89
|
-
), [b,
|
|
89
|
+
]), te = (r) => y.some((t) => t.value === r), Q = de(() => !s || !m || j ? b : b.filter(
|
|
90
|
+
(r) => N(r.label).includes(N(m))
|
|
91
|
+
), [b, m, s, j]), _ = (() => {
|
|
90
92
|
if (U) return U;
|
|
91
|
-
if (s &&
|
|
93
|
+
if (s && m && m.trim().length > 0 && Q.length === 0 && !a && !f)
|
|
92
94
|
return Y;
|
|
93
95
|
})();
|
|
94
96
|
K(() => {
|
|
95
|
-
const r = (
|
|
96
|
-
M.current && !M.current.contains(
|
|
97
|
+
const r = (t) => {
|
|
98
|
+
M.current && !M.current.contains(t.target) && T.current && !T.current.contains(t.target) && v(!1);
|
|
97
99
|
};
|
|
98
100
|
return document.addEventListener("mousedown", r), () => {
|
|
99
101
|
document.removeEventListener("mousedown", r);
|
|
@@ -103,130 +105,130 @@ const nr = ({
|
|
|
103
105
|
e.select,
|
|
104
106
|
be && e.btc,
|
|
105
107
|
e[c],
|
|
106
|
-
|
|
108
|
+
_ ? e.error : "",
|
|
107
109
|
S ? e.disabled : "",
|
|
108
110
|
a ? e.open : "",
|
|
109
111
|
g ? e.inverted : "",
|
|
110
112
|
ue
|
|
111
|
-
].filter(Boolean).join(" "), O = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, ne =
|
|
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 = () => {
|
|
112
114
|
var r;
|
|
113
115
|
S || (v(!a), s && !a && (se(), (r = B.current) == null || r.focus()));
|
|
114
|
-
}, q = (r,
|
|
116
|
+
}, q = (r, t = !0) => {
|
|
115
117
|
if (i)
|
|
116
118
|
if ($) {
|
|
117
|
-
const d = Array.isArray(
|
|
118
|
-
i(
|
|
119
|
+
const d = Array.isArray(f) ? f : [], h = d.includes(r) ? d.filter((u) => u !== r) : [...d, r];
|
|
120
|
+
i(h);
|
|
119
121
|
} else
|
|
120
|
-
i(r),
|
|
122
|
+
i(r), t && v(!1);
|
|
121
123
|
}, le = (r) => {
|
|
122
|
-
const
|
|
123
|
-
ye(
|
|
124
|
+
const t = r.target.value;
|
|
125
|
+
ye(t), a || v(!0), V && V(t);
|
|
124
126
|
}, se = () => {
|
|
125
127
|
a || v(!0);
|
|
126
128
|
}, _e = (r) => {
|
|
127
129
|
A && (r.preventDefault(), r.stopPropagation()), s && (r.stopPropagation(), a || (v(!0), setTimeout(() => {
|
|
128
|
-
var
|
|
129
|
-
(
|
|
130
|
+
var t;
|
|
131
|
+
(t = B.current) == null || t.focus();
|
|
130
132
|
}, 0)));
|
|
131
|
-
}, H = (r,
|
|
132
|
-
if (!Ne || !
|
|
133
|
-
const d = N(r),
|
|
134
|
-
if (!d.includes(
|
|
135
|
-
const
|
|
133
|
+
}, H = (r, t) => {
|
|
134
|
+
if (!Ne || !t.trim()) return r;
|
|
135
|
+
const d = N(r), n = N(t.trim());
|
|
136
|
+
if (!d.includes(n)) return r;
|
|
137
|
+
const h = [], u = [];
|
|
136
138
|
for (let R = 0; R < r.length; R++) {
|
|
137
139
|
const Qe = N(r[R]);
|
|
138
140
|
for (let oe = 0; oe < Qe.length; oe++)
|
|
139
|
-
|
|
141
|
+
u.push(R);
|
|
140
142
|
}
|
|
141
|
-
const
|
|
142
|
-
return
|
|
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(
|
|
143
145
|
/* @__PURE__ */ l("mark", { className: e.highlight, children: r.slice(ie, ae) }, "highlight")
|
|
144
|
-
),
|
|
146
|
+
), h.push(r.slice(ae)), /* @__PURE__ */ l(G, { children: h });
|
|
145
147
|
}, ke = Be({
|
|
146
148
|
isOpen: a,
|
|
147
149
|
containerRef: z,
|
|
148
|
-
dropdownRef:
|
|
150
|
+
dropdownRef: T,
|
|
149
151
|
size: c,
|
|
150
|
-
optionsLength:
|
|
152
|
+
optionsLength: Q.length,
|
|
151
153
|
isSearchable: s,
|
|
152
154
|
label: x,
|
|
153
155
|
helperText: P,
|
|
154
|
-
displayError:
|
|
156
|
+
displayError: _
|
|
155
157
|
}), ce = ({
|
|
156
158
|
insideDrawer: r = !1,
|
|
157
|
-
handleOptionClickProp:
|
|
159
|
+
handleOptionClickProp: t
|
|
158
160
|
}) => {
|
|
159
|
-
const d = (
|
|
160
|
-
|
|
161
|
+
const d = (n) => {
|
|
162
|
+
t ? t(n) : q(n);
|
|
161
163
|
};
|
|
162
|
-
return
|
|
164
|
+
return Q.length > 0 ? Q.map((n, h) => /* @__PURE__ */ p(
|
|
163
165
|
"div",
|
|
164
166
|
{
|
|
165
|
-
className: `${e.option} ${r ? e.isDrawer : ""} ${te(
|
|
166
|
-
onClick: (
|
|
167
|
-
|
|
167
|
+
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);
|
|
168
170
|
},
|
|
169
171
|
children: [
|
|
170
|
-
|
|
172
|
+
E && /* @__PURE__ */ l(
|
|
171
173
|
"input",
|
|
172
174
|
{
|
|
173
175
|
type: "checkbox",
|
|
174
|
-
checked: te(
|
|
175
|
-
onChange: () => q(
|
|
176
|
-
onClick: (
|
|
176
|
+
checked: te(n.value),
|
|
177
|
+
onChange: () => q(n.value),
|
|
178
|
+
onClick: (u) => u.stopPropagation(),
|
|
177
179
|
className: e.optionCheckbox
|
|
178
180
|
}
|
|
179
181
|
),
|
|
180
|
-
|
|
181
|
-
/* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[c]}`, children:
|
|
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 }),
|
|
182
184
|
/* @__PURE__ */ l("div", { className: `${e.columnValue} ${e[c]}`, children: H(
|
|
183
|
-
String(
|
|
184
|
-
|
|
185
|
+
String(n.columns[u] ?? ""),
|
|
186
|
+
m
|
|
185
187
|
) })
|
|
186
|
-
] },
|
|
188
|
+
] }, u)) }) : (
|
|
187
189
|
//opción tiene descripción
|
|
188
|
-
|
|
189
|
-
(
|
|
190
|
+
n.description ? /* @__PURE__ */ p("div", { className: e.optionWithDescriptionWrapper, children: [
|
|
191
|
+
(n.icon || L) && /* @__PURE__ */ l(
|
|
190
192
|
W,
|
|
191
193
|
{
|
|
192
|
-
name:
|
|
194
|
+
name: n.icon || L,
|
|
193
195
|
width: O,
|
|
194
196
|
height: O
|
|
195
197
|
}
|
|
196
198
|
),
|
|
197
199
|
/* @__PURE__ */ p("div", { className: e.optionWithDescription, children: [
|
|
198
|
-
/* @__PURE__ */ l("span", { className: e.optionWithDescriptionLabel, children: H(
|
|
199
|
-
/* @__PURE__ */ l("span", { className: e.optionWithDescriptionValue, children:
|
|
200
|
+
/* @__PURE__ */ l("span", { className: e.optionWithDescriptionLabel, children: H(n.label, m) }),
|
|
201
|
+
/* @__PURE__ */ l("span", { className: e.optionWithDescriptionValue, children: n.description })
|
|
200
202
|
] })
|
|
201
203
|
] }) : /* @__PURE__ */ p(G, { children: [
|
|
202
|
-
(
|
|
204
|
+
(n.icon || L) && /* @__PURE__ */ l("div", { className: e.optionIcon, children: /* @__PURE__ */ l(
|
|
203
205
|
W,
|
|
204
206
|
{
|
|
205
|
-
name:
|
|
207
|
+
name: n.icon || L,
|
|
206
208
|
width: O,
|
|
207
209
|
height: O
|
|
208
210
|
}
|
|
209
211
|
) }),
|
|
210
|
-
/* @__PURE__ */ l("div", { style: { whiteSpace: "pre-line", lineHeight: 1.25 }, children: H(
|
|
212
|
+
/* @__PURE__ */ l("div", { style: { whiteSpace: "pre-line", lineHeight: 1.25 }, children: H(n.label, m) })
|
|
211
213
|
] })
|
|
212
214
|
)
|
|
213
215
|
]
|
|
214
216
|
},
|
|
215
|
-
|
|
217
|
+
h
|
|
216
218
|
)) : /* @__PURE__ */ l("span", { className: e.noResults, children: Y });
|
|
217
219
|
}, Ee = () => {
|
|
218
|
-
const r = Ve(),
|
|
220
|
+
const r = Ve(), t = (d) => {
|
|
219
221
|
q(d, !1), $ || r();
|
|
220
222
|
};
|
|
221
223
|
return /* @__PURE__ */ l(
|
|
222
224
|
"div",
|
|
223
225
|
{
|
|
224
|
-
className: `${e.dropdown} ${e.isDrawer} ${e[c]} ${g ? e.dropdown_inverted : ""} ${
|
|
226
|
+
className: `${e.dropdown} ${e.isDrawer} ${e[c]} ${g ? e.dropdown_inverted : ""} ${k ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
|
|
225
227
|
children: /* @__PURE__ */ l(
|
|
226
228
|
ce,
|
|
227
229
|
{
|
|
228
230
|
insideDrawer: !0,
|
|
229
|
-
handleOptionClickProp:
|
|
231
|
+
handleOptionClickProp: t
|
|
230
232
|
}
|
|
231
233
|
)
|
|
232
234
|
}
|
|
@@ -265,7 +267,7 @@ const nr = ({
|
|
|
265
267
|
style: Z ? { borderColor: Z } : void 0,
|
|
266
268
|
children: [
|
|
267
269
|
/* @__PURE__ */ p("div", { className: e.iconLabel, children: [
|
|
268
|
-
(s || ne &&
|
|
270
|
+
(s || ne && fe) && /* @__PURE__ */ l(
|
|
269
271
|
"div",
|
|
270
272
|
{
|
|
271
273
|
className: `${e.icon} ${g ? e.icon_inverted : ""}`,
|
|
@@ -284,7 +286,7 @@ const nr = ({
|
|
|
284
286
|
{
|
|
285
287
|
ref: B,
|
|
286
288
|
value: re,
|
|
287
|
-
className: `${e.selectInput} ${!o && !a &&
|
|
289
|
+
className: `${e.selectInput} ${!o && !a && I.length === 0 ? e.placeholder : ""}`,
|
|
288
290
|
placeholder: F,
|
|
289
291
|
onChange: le,
|
|
290
292
|
onFocus: se,
|
|
@@ -339,8 +341,8 @@ const nr = ({
|
|
|
339
341
|
/* @__PURE__ */ l(
|
|
340
342
|
"div",
|
|
341
343
|
{
|
|
342
|
-
ref:
|
|
343
|
-
className: `${e.dropdown} ${e[c]} ${e.dropdownPortal} ${g ? e.dropdown_inverted : ""} ${
|
|
344
|
+
ref: T,
|
|
345
|
+
className: `${e.dropdown} ${e[c]} ${e.dropdownPortal} ${g ? e.dropdown_inverted : ""} ${k ? e.dropdownTable : ""} ${s ? e.dropdownSearchable : ""}`,
|
|
344
346
|
style: ke,
|
|
345
347
|
children: /* @__PURE__ */ l(ce, {})
|
|
346
348
|
}
|
|
@@ -348,8 +350,8 @@ const nr = ({
|
|
|
348
350
|
document.getElementById("root") || document.body
|
|
349
351
|
)
|
|
350
352
|
] }),
|
|
351
|
-
|
|
352
|
-
P && !
|
|
353
|
+
_ && /* @__PURE__ */ l(xe, { message: _, size: c, inverted: g }),
|
|
354
|
+
P && !_ && /* @__PURE__ */ l(We, { message: P, size: c, inverted: g })
|
|
353
355
|
]
|
|
354
356
|
}
|
|
355
357
|
);
|
package/package.json
CHANGED