bmi-next-brokers 1.7.1 → 1.7.2
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/components/Input/Input.d.ts +1 -0
- package/dist/components/Input/Input.js +60 -48
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/Select.js +168 -158
- package/dist/icons/components/AddAlert.js +7 -36
- package/dist/icons/components/Aetna.js +1 -18
- package/dist/icons/components/AnchorEmpty.js +7 -36
- package/dist/icons/components/AnchorFill.js +8 -37
- package/dist/icons/components/ArrowForward.js +8 -37
- package/dist/icons/components/Assignment.js +8 -37
- package/dist/icons/components/CheckCircle.js +7 -36
- package/dist/icons/components/Comunicaciones.js +7 -36
- package/dist/icons/components/Facturas.js +7 -36
- package/dist/icons/components/Headset.js +8 -37
- package/dist/icons/components/Home.js +8 -37
- package/dist/icons/components/Hospital.js +4 -27
- package/dist/icons/components/Schedule.js +7 -36
- package/dist/icons/components/Stethoscope.js +6 -35
- package/dist/icons/components/Swich.js +8 -37
- package/package.json +1 -1
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as v, useRef as E, useEffect as R } from "react";
|
|
3
3
|
import { s as e } from "../../Input.module-33gMsaqf.js";
|
|
4
4
|
import { Icon as _ } from "../../icons/Icon.js";
|
|
5
|
-
const
|
|
5
|
+
const q = ({
|
|
6
6
|
size: t = "medium",
|
|
7
7
|
label: g,
|
|
8
8
|
error: i,
|
|
9
9
|
helperText: m,
|
|
10
10
|
icon: h,
|
|
11
|
-
className:
|
|
12
|
-
required:
|
|
11
|
+
className: w,
|
|
12
|
+
required: I,
|
|
13
13
|
inverted: a = !1,
|
|
14
|
-
btc:
|
|
14
|
+
btc: N = !1,
|
|
15
15
|
prefix: b,
|
|
16
16
|
type: r,
|
|
17
|
+
customBorderColor: f,
|
|
17
18
|
...l
|
|
18
19
|
}) => {
|
|
19
|
-
const [o,
|
|
20
|
+
const [o, y] = v(!1), x = r === "password", $ = r === "date", T = r === "textarea", u = E(null), C = () => {
|
|
20
21
|
if (r !== "textarea") return;
|
|
21
22
|
const d = u.current;
|
|
22
23
|
d && (d.style.height = "auto");
|
|
23
|
-
},
|
|
24
|
+
}, L = () => {
|
|
24
25
|
const d = u.current;
|
|
25
26
|
d && (d.style.height = "auto", d.style.height = d.scrollHeight + "px");
|
|
26
|
-
},
|
|
27
|
+
}, j = (d) => {
|
|
27
28
|
d.key === "Enter" && d.preventDefault();
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
R(() => {
|
|
31
|
+
C();
|
|
31
32
|
}, []);
|
|
32
|
-
const
|
|
33
|
+
const D = [
|
|
33
34
|
e.input,
|
|
34
35
|
e[t],
|
|
35
|
-
|
|
36
|
+
N && e.btc,
|
|
36
37
|
i ? e.error : "",
|
|
37
38
|
a ? e.inverted : "",
|
|
38
|
-
|
|
39
|
-
].filter(Boolean).join(" "),
|
|
39
|
+
w
|
|
40
|
+
].filter(Boolean).join(" "), M = [
|
|
40
41
|
e.hiddenInput,
|
|
41
42
|
i ? e.hiddenInputError : "",
|
|
42
43
|
$ ? e.dateInput : ""
|
|
43
|
-
].filter(Boolean).join(" "), n = t === "small" ? 16 : t === "large" ? 20 : t === "extraLarge" ? 24 : 18,
|
|
44
|
-
|
|
44
|
+
].filter(Boolean).join(" "), n = t === "small" ? 16 : t === "large" ? 20 : t === "extraLarge" ? 24 : 18, P = () => {
|
|
45
|
+
y(!o);
|
|
45
46
|
};
|
|
46
47
|
return /* @__PURE__ */ c(
|
|
47
48
|
"div",
|
|
@@ -58,47 +59,58 @@ const p = ({
|
|
|
58
59
|
"span",
|
|
59
60
|
{
|
|
60
61
|
className: `${e.required} ${a ? e.required_inverted : ""}`,
|
|
61
|
-
children:
|
|
62
|
+
children: I && "*"
|
|
62
63
|
}
|
|
63
64
|
)
|
|
64
65
|
]
|
|
65
66
|
}
|
|
66
67
|
),
|
|
67
68
|
/* @__PURE__ */ c("div", { className: e.inputWrapper, children: [
|
|
68
|
-
/* @__PURE__ */ c(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
69
|
+
/* @__PURE__ */ c(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: D,
|
|
73
|
+
ref: u,
|
|
74
|
+
style: {
|
|
75
|
+
...l.style,
|
|
76
|
+
...f && { borderColor: f }
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
(b || h) && /* @__PURE__ */ c("div", { className: e.prefixIcon, children: [
|
|
80
|
+
b && /* @__PURE__ */ s("span", { className: e.prefix, children: b }),
|
|
81
|
+
h && !$ && /* @__PURE__ */ s(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: `${e.icon} ${l.disabled && !a ? e.icon_disabled : ""} ${a && !l.disabled ? e.icon_inverted : ""} ${a && l.disabled ? e.icon_inverted_disabled : ""}`,
|
|
85
|
+
children: /* @__PURE__ */ s(_, { name: h, width: n, height: n })
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
T ? /* @__PURE__ */ s(
|
|
90
|
+
"textarea",
|
|
91
|
+
{
|
|
92
|
+
className: `${e.textArea} ${e[`textArea_${t}`]} ${e.hiddenInput}`,
|
|
93
|
+
onChange: L,
|
|
94
|
+
onKeyDown: j,
|
|
95
|
+
...l
|
|
96
|
+
}
|
|
97
|
+
) : /* @__PURE__ */ s(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
className: M,
|
|
101
|
+
type: x ? o ? "text" : "password" : r,
|
|
102
|
+
...l
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
x && /* @__PURE__ */ s(
|
|
97
109
|
"button",
|
|
98
110
|
{
|
|
99
111
|
type: "button",
|
|
100
112
|
className: `${e.passwordToggle} ${l.disabled && !a ? e.passwordToggle_disabled : ""} ${a && !l.disabled ? e.passwordToggle_inverted : ""} ${a && l.disabled ? e.passwordToggle_inverted_disabled : ""}`,
|
|
101
|
-
onClick:
|
|
113
|
+
onClick: P,
|
|
102
114
|
disabled: l.disabled,
|
|
103
115
|
"aria-label": o ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
104
116
|
children: /* @__PURE__ */ s(
|
|
@@ -145,5 +157,5 @@ const p = ({
|
|
|
145
157
|
);
|
|
146
158
|
};
|
|
147
159
|
export {
|
|
148
|
-
|
|
160
|
+
q as Input
|
|
149
161
|
};
|
|
@@ -1,108 +1,109 @@
|
|
|
1
|
-
import { jsxs as p, jsx as t, Fragment as
|
|
2
|
-
import { useState as M, useRef as k, useEffect as
|
|
3
|
-
import { r as
|
|
1
|
+
import { jsxs as p, jsx as t, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useRef as k, useEffect as xe, useLayoutEffect as ze } from "react";
|
|
3
|
+
import { r as we } from "../../index-CGDUIzcq.js";
|
|
4
4
|
import { Icon as P } from "../../icons/Icon.js";
|
|
5
|
-
import '../../assets/Select.css';const
|
|
6
|
-
selectContainer:
|
|
7
|
-
selectContainer_medium:
|
|
8
|
-
selectContainer_large:
|
|
9
|
-
selectContainer_extraLarge:
|
|
10
|
-
label:
|
|
11
|
-
label_large:
|
|
12
|
-
label_extraLarge:
|
|
13
|
-
label_disabled:
|
|
14
|
-
selectWrapper:
|
|
15
|
-
select:
|
|
16
|
-
large:
|
|
17
|
-
medium:
|
|
18
|
-
small:
|
|
19
|
-
btc:
|
|
20
|
-
open:
|
|
21
|
-
disabled:
|
|
22
|
-
placeholder:
|
|
23
|
-
selectValue:
|
|
24
|
-
selectInput:
|
|
25
|
-
inverted:
|
|
26
|
-
error:
|
|
27
|
-
chevron:
|
|
28
|
-
chevronOpen:
|
|
29
|
-
extraLarge:
|
|
30
|
-
errorShake:
|
|
31
|
-
errorMessage:
|
|
32
|
-
errorMessageSlide:
|
|
33
|
-
errorMessage_medium:
|
|
34
|
-
errorMessage_small:
|
|
35
|
-
errorMessage_large:
|
|
36
|
-
errorMessage_extraLarge:
|
|
37
|
-
errorMessage_inverted:
|
|
38
|
-
helperText:
|
|
39
|
-
helperText_medium:
|
|
40
|
-
helperText_small:
|
|
41
|
-
helperText_large:
|
|
42
|
-
helperText_extraLarge:
|
|
43
|
-
helperText_disabled:
|
|
44
|
-
iconLabel:
|
|
45
|
-
icon:
|
|
46
|
-
icon_disabled:
|
|
47
|
-
required:
|
|
48
|
-
required_inverted:
|
|
49
|
-
required_disabled:
|
|
50
|
-
required_inverted_disabled:
|
|
51
|
-
dropdown:
|
|
52
|
-
dropdownPortal:
|
|
53
|
-
option:
|
|
54
|
-
optionSelected:
|
|
55
|
-
optionWithCheckbox:
|
|
56
|
-
optionCheckbox:
|
|
57
|
-
dropdown_inverted:
|
|
58
|
-
option_inverted:
|
|
59
|
-
searchInputWrapper:
|
|
60
|
-
searchIcon:
|
|
61
|
-
searchInput:
|
|
62
|
-
noResults:
|
|
63
|
-
optionIcon:
|
|
64
|
-
label_inverted:
|
|
65
|
-
helperText_inverted:
|
|
66
|
-
icon_inverted:
|
|
67
|
-
dropdownTable:
|
|
68
|
-
optionTable:
|
|
69
|
-
tableColumn:
|
|
70
|
-
columnHeader:
|
|
71
|
-
columnValue:
|
|
72
|
-
label_inverted_disabled:
|
|
73
|
-
helperText_inverted_disabled:
|
|
74
|
-
icon_inverted_disabled:
|
|
75
|
-
},
|
|
5
|
+
import '../../assets/Select.css';const $e = "_selectContainer_knzy9_5", Te = "_selectContainer_medium_knzy9_21", Ce = "_selectContainer_large_knzy9_29", Le = "_selectContainer_extraLarge_knzy9_31", Se = "_label_knzy9_39", Me = "_label_large_knzy9_55", Ie = "_label_extraLarge_knzy9_57", Ne = "_label_disabled_knzy9_65", qe = "_selectWrapper_knzy9_73", Ee = "_select_knzy9_5", Oe = "_large_knzy9_125", We = "_medium_knzy9_133", Re = "_small_knzy9_141", He = "_btc_knzy9_173", Pe = "_open_knzy9_197", Be = "_disabled_knzy9_205", Ve = "_placeholder_knzy9_219", Ae = "_selectValue_knzy9_227", Fe = "_selectInput_knzy9_247", je = "_inverted_knzy9_329", De = "_error_knzy9_361", Qe = "_chevron_knzy9_385", Ye = "_chevronOpen_knzy9_395", Xe = "_extraLarge_knzy9_441", Ge = "_errorShake_knzy9_1", Je = "_errorMessage_knzy9_535", Ke = "_errorMessageSlide_knzy9_1", Ue = "_errorMessage_medium_knzy9_551", Ze = "_errorMessage_small_knzy9_553", en = "_errorMessage_large_knzy9_561", nn = "_errorMessage_extraLarge_knzy9_563", rn = "_errorMessage_inverted_knzy9_571", tn = "_helperText_knzy9_579", on = "_helperText_medium_knzy9_591", ln = "_helperText_small_knzy9_593", sn = "_helperText_large_knzy9_601", an = "_helperText_extraLarge_knzy9_603", cn = "_helperText_disabled_knzy9_611", _n = "_iconLabel_knzy9_619", dn = "_icon_knzy9_619", pn = "_icon_disabled_knzy9_659", un = "_required_knzy9_669", hn = "_required_inverted_knzy9_679", mn = "_required_disabled_knzy9_687", gn = "_required_inverted_disabled_knzy9_695", bn = "_dropdown_knzy9_705", yn = "_dropdownPortal_knzy9_755", kn = "_option_knzy9_771", fn = "_optionSelected_knzy9_797", vn = "_optionWithCheckbox_knzy9_815", xn = "_optionCheckbox_knzy9_827", zn = "_dropdown_inverted_knzy9_889", wn = "_option_inverted_knzy9_943", $n = "_searchInputWrapper_knzy9_961", Tn = "_searchIcon_knzy9_979", Cn = "_searchInput_knzy9_961", Ln = "_noResults_knzy9_1057", Sn = "_optionIcon_knzy9_1167", Mn = "_label_inverted_knzy9_1217", In = "_helperText_inverted_knzy9_1225", Nn = "_icon_inverted_knzy9_1233", qn = "_dropdownTable_knzy9_1355", En = "_optionTable_knzy9_1365", On = "_tableColumn_knzy9_1381", Wn = "_columnHeader_knzy9_1397", Rn = "_columnValue_knzy9_1419", Hn = "_label_inverted_disabled_knzy9_1543", Pn = "_helperText_inverted_disabled_knzy9_1551", Bn = "_icon_inverted_disabled_knzy9_1559", e = {
|
|
6
|
+
selectContainer: $e,
|
|
7
|
+
selectContainer_medium: Te,
|
|
8
|
+
selectContainer_large: Ce,
|
|
9
|
+
selectContainer_extraLarge: Le,
|
|
10
|
+
label: Se,
|
|
11
|
+
label_large: Me,
|
|
12
|
+
label_extraLarge: Ie,
|
|
13
|
+
label_disabled: Ne,
|
|
14
|
+
selectWrapper: qe,
|
|
15
|
+
select: Ee,
|
|
16
|
+
large: Oe,
|
|
17
|
+
medium: We,
|
|
18
|
+
small: Re,
|
|
19
|
+
btc: He,
|
|
20
|
+
open: Pe,
|
|
21
|
+
disabled: Be,
|
|
22
|
+
placeholder: Ve,
|
|
23
|
+
selectValue: Ae,
|
|
24
|
+
selectInput: Fe,
|
|
25
|
+
inverted: je,
|
|
26
|
+
error: De,
|
|
27
|
+
chevron: Qe,
|
|
28
|
+
chevronOpen: Ye,
|
|
29
|
+
extraLarge: Xe,
|
|
30
|
+
errorShake: Ge,
|
|
31
|
+
errorMessage: Je,
|
|
32
|
+
errorMessageSlide: Ke,
|
|
33
|
+
errorMessage_medium: Ue,
|
|
34
|
+
errorMessage_small: Ze,
|
|
35
|
+
errorMessage_large: en,
|
|
36
|
+
errorMessage_extraLarge: nn,
|
|
37
|
+
errorMessage_inverted: rn,
|
|
38
|
+
helperText: tn,
|
|
39
|
+
helperText_medium: on,
|
|
40
|
+
helperText_small: ln,
|
|
41
|
+
helperText_large: sn,
|
|
42
|
+
helperText_extraLarge: an,
|
|
43
|
+
helperText_disabled: cn,
|
|
44
|
+
iconLabel: _n,
|
|
45
|
+
icon: dn,
|
|
46
|
+
icon_disabled: pn,
|
|
47
|
+
required: un,
|
|
48
|
+
required_inverted: hn,
|
|
49
|
+
required_disabled: mn,
|
|
50
|
+
required_inverted_disabled: gn,
|
|
51
|
+
dropdown: bn,
|
|
52
|
+
dropdownPortal: yn,
|
|
53
|
+
option: kn,
|
|
54
|
+
optionSelected: fn,
|
|
55
|
+
optionWithCheckbox: vn,
|
|
56
|
+
optionCheckbox: xn,
|
|
57
|
+
dropdown_inverted: zn,
|
|
58
|
+
option_inverted: wn,
|
|
59
|
+
searchInputWrapper: $n,
|
|
60
|
+
searchIcon: Tn,
|
|
61
|
+
searchInput: Cn,
|
|
62
|
+
noResults: Ln,
|
|
63
|
+
optionIcon: Sn,
|
|
64
|
+
label_inverted: Mn,
|
|
65
|
+
helperText_inverted: In,
|
|
66
|
+
icon_inverted: Nn,
|
|
67
|
+
dropdownTable: qn,
|
|
68
|
+
optionTable: En,
|
|
69
|
+
tableColumn: On,
|
|
70
|
+
columnHeader: Wn,
|
|
71
|
+
columnValue: Rn,
|
|
72
|
+
label_inverted_disabled: Hn,
|
|
73
|
+
helperText_inverted_disabled: Pn,
|
|
74
|
+
icon_inverted_disabled: Bn
|
|
75
|
+
}, Gn = ({
|
|
76
76
|
size: a = "medium",
|
|
77
77
|
label: f,
|
|
78
78
|
error: B,
|
|
79
79
|
helperText: v,
|
|
80
80
|
icon: I,
|
|
81
|
-
className:
|
|
82
|
-
required:
|
|
81
|
+
className: U,
|
|
82
|
+
required: Z,
|
|
83
83
|
placeholder: V = "Seleccionar...",
|
|
84
84
|
options: x = [],
|
|
85
85
|
value: u,
|
|
86
86
|
onChange: N,
|
|
87
87
|
disabled: o = !1,
|
|
88
88
|
inverted: l = !1,
|
|
89
|
-
dynamicIcon:
|
|
90
|
-
showPlaceholderIcon:
|
|
91
|
-
btc:
|
|
89
|
+
dynamicIcon: ee = !1,
|
|
90
|
+
showPlaceholderIcon: ne = !1,
|
|
91
|
+
btc: re = !1,
|
|
92
92
|
columnHeaders: q,
|
|
93
|
-
searchable:
|
|
93
|
+
searchable: te = !1,
|
|
94
94
|
noSearchResult: A = "No se encontraron resultados",
|
|
95
95
|
searchAndCheckbox: z = !1,
|
|
96
|
-
|
|
96
|
+
customBorderColor: F,
|
|
97
|
+
...oe
|
|
97
98
|
}) => {
|
|
98
|
-
const [c, m] = M(!1), [b, w] = M(""), [
|
|
99
|
+
const [c, m] = M(!1), [b, w] = M(""), [le, $] = M(!1), _ = te || z, T = z, E = k(null), se = k(null), y = k(null), O = k(null), W = k(null), i = T ? void 0 : x.find((n) => n.value === u), j = T && Array.isArray(u) ? u : [], D = (n) => T ? j.includes(n) : u === n, C = _ && b ? x.filter(
|
|
99
100
|
(n) => n.label.toLowerCase().includes(b.toLowerCase())
|
|
100
101
|
) : x, g = (() => {
|
|
101
102
|
if (B) return B;
|
|
102
|
-
if (_ &&
|
|
103
|
+
if (_ && le && b && b.trim().length > 0 && C.length === 0 && !c && !u)
|
|
103
104
|
return A;
|
|
104
105
|
})();
|
|
105
|
-
|
|
106
|
+
xe(() => {
|
|
106
107
|
const n = (r) => {
|
|
107
108
|
E.current && !E.current.contains(r.target) && y.current && !y.current.contains(r.target) && (m(!1), _ && (setTimeout(() => {
|
|
108
109
|
$(!1);
|
|
@@ -112,14 +113,14 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
112
113
|
document.removeEventListener("mousedown", n);
|
|
113
114
|
};
|
|
114
115
|
}, [_, i]);
|
|
115
|
-
const [
|
|
116
|
-
|
|
116
|
+
const [ae, ce] = M();
|
|
117
|
+
ze(() => {
|
|
117
118
|
const n = document.body.style.overflow === "hidden", r = () => {
|
|
118
119
|
if (c && O.current && y.current) {
|
|
119
|
-
const d = O.current.getBoundingClientRect(), h = y.current.offsetHeight,
|
|
120
|
-
const { label:
|
|
121
|
-
return { top: _ && !
|
|
122
|
-
}, { top:
|
|
120
|
+
const d = O.current.getBoundingClientRect(), h = y.current.offsetHeight, ue = window.innerHeight, he = (ye) => {
|
|
121
|
+
const { label: ke, helperText: fe, displayError: ve } = ye;
|
|
122
|
+
return { top: _ && !ke ? 3 : 0, bottom: _ && !fe && !ve ? 3 : 0 };
|
|
123
|
+
}, { top: G, bottom: J } = he({
|
|
123
124
|
label: f,
|
|
124
125
|
helperText: v,
|
|
125
126
|
displayError: g
|
|
@@ -129,20 +130,20 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
129
130
|
medium: 2,
|
|
130
131
|
large: 4,
|
|
131
132
|
extraLarge: 4
|
|
132
|
-
}[a],
|
|
133
|
+
}[a], me = d.bottom + S + J, R = ue - me, H = d.top - S - G, ge = (
|
|
133
134
|
//si no hay espacio abajo pero sí arriba, se muestra arriba con separación dependiendo del size y tamaño del label
|
|
134
|
-
R < h && H >= h ? d.top + window.scrollY - h - S -
|
|
135
|
-
),
|
|
135
|
+
R < h && H >= h ? d.top + window.scrollY - h - S - G : d.bottom + window.scrollY + S + J
|
|
136
|
+
), be = R < h && H >= h ? (
|
|
136
137
|
//si no cabe abajo, pero si arriba, se coloca con el tamaño mas pequeño entre 300 px y el espacio que hay arriba -15 px de margen (para que cuadre con el margen de los overlays de los modales etc)
|
|
137
138
|
Math.min(H - 15, 300)
|
|
138
139
|
) : (
|
|
139
140
|
//si tiene espacio abajo, se calcula la altura igual que arriba pero teniendo en cuenta el espacio que tiene abajo
|
|
140
141
|
Math.min(R - 15, 300)
|
|
141
142
|
);
|
|
142
|
-
|
|
143
|
+
ce({
|
|
143
144
|
position: "absolute",
|
|
144
|
-
top:
|
|
145
|
-
maxHeight: n ?
|
|
145
|
+
top: ge,
|
|
146
|
+
maxHeight: n ? be : 300,
|
|
146
147
|
//si document tiene scroll bloqueado (está abierto este componente en un overlay de Modal, por ejemplo), se utiliza la altura máxima calculada, sino, 300px (de este modo, en overlays se ve siempre completo el listado, independientemente de la altura de la ventana, y en flujo normal tiene su altura máxima natural de 300px)
|
|
147
148
|
left: d.left + window.scrollX,
|
|
148
149
|
width: d.width,
|
|
@@ -166,19 +167,19 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
166
167
|
g,
|
|
167
168
|
v
|
|
168
169
|
]);
|
|
169
|
-
const
|
|
170
|
+
const _e = [
|
|
170
171
|
e.select,
|
|
171
|
-
|
|
172
|
+
re && e.btc,
|
|
172
173
|
e[a],
|
|
173
174
|
g ? e.error : "",
|
|
174
175
|
o ? e.disabled : "",
|
|
175
176
|
c ? e.open : "",
|
|
176
177
|
l ? e.inverted : "",
|
|
177
|
-
|
|
178
|
-
].filter(Boolean).join(" "), L = a === "small" ? 16 : a === "large" ? 20 : a === "extraLarge" ? 24 : 18,
|
|
178
|
+
U
|
|
179
|
+
].filter(Boolean).join(" "), L = a === "small" ? 16 : a === "large" ? 20 : a === "extraLarge" ? 24 : 18, Q = ee && (i != null && i.icon) ? i.icon : I, ie = () => {
|
|
179
180
|
var n;
|
|
180
|
-
o || (m(!c), _ && !c && (
|
|
181
|
-
},
|
|
181
|
+
o || (m(!c), _ && !c && (X(), (n = W.current) == null || n.focus()));
|
|
182
|
+
}, Y = (n) => {
|
|
182
183
|
const r = x.find((s) => s.value === n);
|
|
183
184
|
if (r && N)
|
|
184
185
|
if (T) {
|
|
@@ -186,12 +187,12 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
186
187
|
N(d);
|
|
187
188
|
} else
|
|
188
189
|
N(n), _ && w(r.label), m(!1), $(!1);
|
|
189
|
-
},
|
|
190
|
+
}, de = (n) => {
|
|
190
191
|
const r = n.target.value;
|
|
191
192
|
w(r), $(r.length > 0), c || m(!0);
|
|
192
|
-
},
|
|
193
|
+
}, X = () => {
|
|
193
194
|
c || (m(!0), w(""), $(!1));
|
|
194
|
-
},
|
|
195
|
+
}, pe = (n) => {
|
|
195
196
|
_ && (n.stopPropagation(), c || (m(!0), setTimeout(() => {
|
|
196
197
|
var r;
|
|
197
198
|
(r = W.current) == null || r.focus();
|
|
@@ -202,7 +203,7 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
202
203
|
{
|
|
203
204
|
ref: O,
|
|
204
205
|
className: `${e.selectContainer} ${a === "medium" ? e.selectContainer_medium : a === "large" ? e.selectContainer_large : a === "extraLarge" ? e.selectContainer_extraLarge : ""}`,
|
|
205
|
-
...
|
|
206
|
+
...oe,
|
|
206
207
|
children: [
|
|
207
208
|
f && /* @__PURE__ */ p(
|
|
208
209
|
"label",
|
|
@@ -214,83 +215,92 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
214
215
|
"span",
|
|
215
216
|
{
|
|
216
217
|
className: `${e.required} ${o && !l ? e.required_disabled : ""} ${l && !o ? e.required_inverted : ""} ${l && o ? e.required_inverted_disabled : ""}`,
|
|
217
|
-
children:
|
|
218
|
+
children: Z && "*"
|
|
218
219
|
}
|
|
219
220
|
)
|
|
220
221
|
]
|
|
221
222
|
}
|
|
222
223
|
),
|
|
223
|
-
/* @__PURE__ */ p("div", { className: e.selectWrapper, ref:
|
|
224
|
-
/* @__PURE__ */ p(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
224
|
+
/* @__PURE__ */ p("div", { className: e.selectWrapper, ref: se, children: [
|
|
225
|
+
/* @__PURE__ */ p(
|
|
226
|
+
"div",
|
|
227
|
+
{
|
|
228
|
+
className: _e,
|
|
229
|
+
onClick: ie,
|
|
230
|
+
ref: E,
|
|
231
|
+
style: F ? { borderColor: F } : void 0,
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ p("div", { className: e.iconLabel, children: [
|
|
234
|
+
Q && ne && /* @__PURE__ */ t(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: `${e.icon} ${o && !l ? e.icon_disabled : ""} ${l && !o ? e.icon_inverted : ""} ${l && o ? e.icon_inverted_disabled : ""}`,
|
|
238
|
+
children: /* @__PURE__ */ t(P, { name: Q, width: L, height: L })
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
_ ? /* @__PURE__ */ t(
|
|
242
|
+
"input",
|
|
243
|
+
{
|
|
244
|
+
ref: W,
|
|
245
|
+
type: "text",
|
|
246
|
+
value: b,
|
|
247
|
+
className: `${e.selectInput} ${!i && !c && j.length === 0 ? e.placeholder : ""}`,
|
|
248
|
+
placeholder: V,
|
|
249
|
+
onChange: de,
|
|
250
|
+
onFocus: X,
|
|
251
|
+
onClick: pe,
|
|
252
|
+
disabled: o,
|
|
253
|
+
readOnly: !c
|
|
254
|
+
}
|
|
255
|
+
) : /* @__PURE__ */ t(
|
|
256
|
+
"span",
|
|
257
|
+
{
|
|
258
|
+
className: `${e.selectValue} ${i ? "" : e.placeholder}`,
|
|
259
|
+
children: i ? i.label : V
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
] }),
|
|
263
|
+
/* @__PURE__ */ t(
|
|
264
|
+
P,
|
|
265
|
+
{
|
|
266
|
+
name: "ArrowDown",
|
|
267
|
+
width: 16,
|
|
268
|
+
height: 16,
|
|
269
|
+
className: `${e.chevron} ${c ? e.chevronOpen : ""}`
|
|
270
|
+
}
|
|
271
|
+
)
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
c && !o && we.createPortal(
|
|
266
276
|
/* @__PURE__ */ t(
|
|
267
277
|
"div",
|
|
268
278
|
{
|
|
269
279
|
ref: y,
|
|
270
280
|
className: `${e.dropdown} ${e.dropdownPortal} ${l ? e.dropdown_inverted : ""} ${q ? e.dropdownTable : ""} ${_ ? e.dropdownSearchable : ""}`,
|
|
271
|
-
style:
|
|
281
|
+
style: ae,
|
|
272
282
|
children: C.length > 0 ? C.map((n, r) => /* @__PURE__ */ p(
|
|
273
283
|
"div",
|
|
274
284
|
{
|
|
275
|
-
className: `${e.option} ${
|
|
285
|
+
className: `${e.option} ${D(n.value) ? e.optionSelected : ""} ${l ? e.option_inverted : ""} ${n.columns ? e.optionTable : ""} ${z ? e.optionWithCheckbox : ""}`,
|
|
276
286
|
onClick: (s) => {
|
|
277
|
-
s.stopPropagation(),
|
|
287
|
+
s.stopPropagation(), Y(n.value);
|
|
278
288
|
},
|
|
279
289
|
children: [
|
|
280
290
|
z && /* @__PURE__ */ t(
|
|
281
291
|
"input",
|
|
282
292
|
{
|
|
283
293
|
type: "checkbox",
|
|
284
|
-
checked:
|
|
285
|
-
onChange: () =>
|
|
294
|
+
checked: D(n.value),
|
|
295
|
+
onChange: () => Y(n.value),
|
|
286
296
|
onClick: (s) => s.stopPropagation(),
|
|
287
297
|
className: e.optionCheckbox
|
|
288
298
|
}
|
|
289
299
|
),
|
|
290
|
-
n.columns ? /* @__PURE__ */ t(
|
|
300
|
+
n.columns ? /* @__PURE__ */ t(K, { children: q && Object.entries(q).map(([s, d]) => /* @__PURE__ */ p("div", { className: e.tableColumn, children: [
|
|
291
301
|
/* @__PURE__ */ t("div", { className: e.columnHeader, children: d }),
|
|
292
302
|
/* @__PURE__ */ t("div", { className: e.columnValue, children: n.columns[s] || "" })
|
|
293
|
-
] }, s)) }) : /* @__PURE__ */ p(
|
|
303
|
+
] }, s)) }) : /* @__PURE__ */ p(K, { children: [
|
|
294
304
|
(n.icon || I) && /* @__PURE__ */ t("div", { className: e.optionIcon, children: /* @__PURE__ */ t(
|
|
295
305
|
P,
|
|
296
306
|
{
|
|
@@ -335,5 +345,5 @@ import '../../assets/Select.css';const we = "_selectContainer_knzy9_5", $e = "_s
|
|
|
335
345
|
);
|
|
336
346
|
};
|
|
337
347
|
export {
|
|
338
|
-
|
|
348
|
+
Gn as Select
|
|
339
349
|
};
|