bmi-next-brokers 2.2.1 → 2.2.3
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/assets/Button.css +1 -1
- package/dist/components/Button/Button.js +59 -47
- package/dist/components/Select/Select.js +96 -96
- package/dist/icons/components/AddAlert.js +36 -7
- package/dist/icons/components/Aetna.js +18 -1
- package/dist/icons/components/AnchorEmpty.js +36 -7
- package/dist/icons/components/AnchorFill.js +37 -8
- package/dist/icons/components/ArrowForward.js +37 -8
- package/dist/icons/components/ArrowTree.js +1 -1
- package/dist/icons/components/ArrowTreeDown.js +4 -4
- package/dist/icons/components/ArrowTreeRight.js +3 -3
- package/dist/icons/components/Assignment.js +37 -8
- package/dist/icons/components/CheckCircle.js +36 -7
- package/dist/icons/components/ChevronLeft.js +6 -6
- package/dist/icons/components/Comunicaciones.js +36 -7
- package/dist/icons/components/Facturas.js +36 -7
- package/dist/icons/components/Headset.js +37 -8
- package/dist/icons/components/Home.js +37 -8
- package/dist/icons/components/Hospital.js +27 -4
- package/dist/icons/components/Schedule.js +36 -7
- package/dist/icons/components/Stethoscope.js +35 -6
- package/dist/icons/components/Swich.js +37 -8
- package/dist/icons/components/TrendingDown.js +37 -8
- package/dist/icons/components/WavingHand.js +36 -7
- package/package.json +1 -1
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_9lym1_1{border:none;border-radius:1000px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-family:Poppins Regular;font-weight:100;transition:all .2s ease-in-out;width:fit-content}._content_9lym1_14{display:inline-flex;align-items:center;justify-content:center;gap:8px}._button_9lym1_1:disabled{opacity:.6;cursor:not-allowed}._small_9lym1_27{padding:4px 12px;font-size:14px;height:30px}._medium_9lym1_33{padding:4px 10px;font-size:16px;height:36px}._large_9lym1_39{padding:4px 14px;font-size:18px;height:42px}._extraLarge_9lym1_45{padding:4px 16px;font-size:20px;height:48px}._brand_9lym1_52{background:var(--Fill-Brand-Inverted-Active, #2054a5);color:#fff}._brand_9lym1_52:hover:not(:disabled){background:var(--Fill-Brand-Inverted-Hover, #4f88d9)}._brand_9lym1_52:active:not(:disabled){box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--ui-blue-800, #16396f)}._brand_9lym1_52:disabled{background:var(--Fill-Brand-Inverted-Innactive, #e0e9f8);color:var(--Content-Brand-Inverted-Innactive, #a2bfec)}._outline_9lym1_70{background-color:transparent;color:var(--Stroke-Brand-Active, #2054a5);border:1px solid var(--Stroke-Brand-Active, #2054a5)}._outline_9lym1_70:hover:not(:disabled){border:2px solid var(--Stroke-Brand-Hover, #4f88d9);color:var(--Stroke-Brand-Hover, #4f88d9)}._outline_9lym1_70:active{background:var(--Content-Brand-Inverted-Active, #eef3fc);border:none!important;box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._outline_9lym1_70:disabled{border:1px solid var(--Stroke-Brand-Innactive, #a2bfec);color:var(--Stroke-Brand-Innactive, #a2bfec)}._ghost_9lym1_93{background-color:transparent;color:var(--Content-Brand-Default-Active, #2054a5);border:none}._ghost_9lym1_93:hover:not(:disabled){font-family:Poppins Medium}._ghost_9lym1_93:active:not(:disabled){background:var(--Fill-Disabled-Default, #f8fafc);box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._ghost_9lym1_93:disabled{color:var(--Content-Brand-Default-Innactive, #4f88d9)}._textLink_9lym1_114{background-color:transparent;color:var(--Content-Brand-Default-Active, #2054a5);border:none;text-decoration:underline}._textLink_9lym1_114:hover:not(:disabled){font-family:Poppins Medium}._textLink_9lym1_114:active:not(:disabled){background:var(--Fill-Disabled-Default, #f8fafc);box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._textLink_9lym1_114:disabled{color:var(--Content-Brand-Default-Innactive, #4f88d9)}._secondary_9lym1_135{background-color:var(--ui-blue-100);color:var(--Content-Brand-Default-Active, #2054a5);border:none}._button_9lym1_1._inverted_9lym1_142 svg path{fill:currentColor!important}._button_9lym1_1._inverted_9lym1_142._brand_9lym1_52{background:#fff!important;color:#2054a5!important}._button_9lym1_1._inverted_9lym1_142._brand_9lym1_52:hover:not(:disabled){background:#eef3fc!important;color:#1b468a!important}._button_9lym1_1._inverted_9lym1_142._brand_9lym1_52:active:not(:disabled){box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._button_9lym1_1._inverted_9lym1_142._brand_9lym1_52:disabled{background:#2054a5!important;color:#4f88d9!important}._button_9lym1_1._inverted_9lym1_142._outline_9lym1_70{background-color:transparent!important;border:1px solid var(--Stroke-Brand-Active, #fff)}._button_9lym1_1._inverted_9lym1_142._outline_9lym1_70:not(:disabled){border:1px solid var(--Stroke-Brand-Active, #fff);color:var(--Stroke-Brand-Active, #fff);background-color:transparent!important}._button_9lym1_1._inverted_9lym1_142._outline_9lym1_70:hover:not(:disabled){border:2px solid var(--Stroke-Brand-Active, #fff);color:#f8f9fa!important;background-color:transparent!important}._button_9lym1_1._inverted_9lym1_142._outline_9lym1_70:active:not(:disabled){border:2px solid var(--Stroke-Brand-Active, #fff);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._button_9lym1_1._inverted_9lym1_142._outline_9lym1_70:disabled{border:1px solid var(--Stroke-Brand-Innactive, #2054a5);color:var(--Stroke-Brand-Innactive, #2054a5)}._button_9lym1_1._inverted_9lym1_142._ghost_9lym1_93{background-color:transparent!important;color:#fff!important;border:none!important}._button_9lym1_1._inverted_9lym1_142._ghost_9lym1_93:hover:not(:disabled){background-color:#ffffff1a!important;color:var(--Stroke-Brand-Innactive, #2054a5)}._button_9lym1_1._inverted_9lym1_142._textLink_9lym1_114{background-color:transparent!important;color:#fff!important;border:none!important;text-decoration:underline!important}._button_9lym1_1._inverted_9lym1_142._textLink_9lym1_114:hover:not(:disabled){color:#f8f9fa!important;background-color:transparent!important}._fullWidth_9lym1_218{width:100%}._squaredBorder_9lym1_222{border-radius:12px!important}._spinner_9lym1_226{position:absolute;display:flex;justify-content:center;align-items:center}
|
|
@@ -1,67 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { Spinner as
|
|
4
|
-
import '../../assets/Button.css';const
|
|
5
|
-
button:
|
|
1
|
+
import { jsxs as _, jsx as n, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as v } from "../../icons/Icon.js";
|
|
3
|
+
import { Spinner as L } from "../Spinner/Spinner.js";
|
|
4
|
+
import '../../assets/Button.css';const B = "_button_9lym1_1", k = "_content_9lym1_14", q = "_small_9lym1_27", W = "_medium_9lym1_33", j = "_large_9lym1_39", C = "_extraLarge_9lym1_45", N = "_brand_9lym1_52", S = "_outline_9lym1_70", $ = "_ghost_9lym1_93", w = "_textLink_9lym1_114", E = "_secondary_9lym1_135", F = "_inverted_9lym1_142", I = "_fullWidth_9lym1_218", A = "_squaredBorder_9lym1_222", D = "_spinner_9lym1_226", t = {
|
|
5
|
+
button: B,
|
|
6
|
+
content: k,
|
|
6
7
|
small: q,
|
|
7
|
-
medium:
|
|
8
|
-
large:
|
|
9
|
-
extraLarge:
|
|
10
|
-
brand:
|
|
8
|
+
medium: W,
|
|
9
|
+
large: j,
|
|
10
|
+
extraLarge: C,
|
|
11
|
+
brand: N,
|
|
11
12
|
outline: S,
|
|
12
13
|
ghost: $,
|
|
13
14
|
textLink: w,
|
|
14
15
|
secondary: E,
|
|
15
16
|
inverted: F,
|
|
16
17
|
fullWidth: I,
|
|
17
|
-
squaredBorder:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
squaredBorder: A,
|
|
19
|
+
spinner: D
|
|
20
|
+
}, K = ({
|
|
21
|
+
children: s,
|
|
22
|
+
variant: m = "brand",
|
|
21
23
|
size: e = "medium",
|
|
22
|
-
disabled:
|
|
23
|
-
loading:
|
|
24
|
-
onClick:
|
|
25
|
-
className:
|
|
26
|
-
type:
|
|
27
|
-
icon:
|
|
28
|
-
inverted:
|
|
29
|
-
fullWidth:
|
|
30
|
-
squared:
|
|
31
|
-
...
|
|
24
|
+
disabled: c = !1,
|
|
25
|
+
loading: r = !1,
|
|
26
|
+
onClick: d,
|
|
27
|
+
className: u,
|
|
28
|
+
type: y = "button",
|
|
29
|
+
icon: o,
|
|
30
|
+
inverted: b = !1,
|
|
31
|
+
fullWidth: f = !1,
|
|
32
|
+
squared: h = !1,
|
|
33
|
+
...g
|
|
32
34
|
}) => {
|
|
33
|
-
const
|
|
35
|
+
const p = [
|
|
34
36
|
t.button,
|
|
35
|
-
t[
|
|
37
|
+
t[m],
|
|
36
38
|
t[e],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
].filter(Boolean).join(" "),
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
n,
|
|
50
|
-
_
|
|
39
|
+
b ? t.inverted : "",
|
|
40
|
+
f ? t.fullWidth : "",
|
|
41
|
+
u
|
|
42
|
+
].filter(Boolean).join(" "), l = e === "small" ? 16 : e === "large" ? 20 : e === "extraLarge" ? 24 : 18, x = () => {
|
|
43
|
+
if (!o) return s;
|
|
44
|
+
const a = /* @__PURE__ */ n(v, { name: o.name, width: l, height: l });
|
|
45
|
+
return o.position === "before" ? /* @__PURE__ */ _(i, { children: [
|
|
46
|
+
a,
|
|
47
|
+
s
|
|
48
|
+
] }) : /* @__PURE__ */ _(i, { children: [
|
|
49
|
+
s,
|
|
50
|
+
a
|
|
51
51
|
] });
|
|
52
52
|
};
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ _(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
type:
|
|
57
|
-
disabled:
|
|
58
|
-
onClick:
|
|
59
|
-
className: `${
|
|
60
|
-
...
|
|
61
|
-
children:
|
|
56
|
+
type: y,
|
|
57
|
+
disabled: c || r,
|
|
58
|
+
onClick: d,
|
|
59
|
+
className: `${p} ${h ? t.squaredBorder : ""}`,
|
|
60
|
+
...g,
|
|
61
|
+
children: [
|
|
62
|
+
r && /* @__PURE__ */ n("div", { className: t.spinner, children: /* @__PURE__ */ n(L, { thickness: 4, size: l, backgroundColor: "#9bd" }) }),
|
|
63
|
+
/* @__PURE__ */ n(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
style: {
|
|
67
|
+
visibility: r ? "hidden" : "visible"
|
|
68
|
+
},
|
|
69
|
+
className: t.content,
|
|
70
|
+
children: x()
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
62
74
|
}
|
|
63
75
|
);
|
|
64
76
|
};
|
|
65
77
|
export {
|
|
66
|
-
|
|
78
|
+
K as Button
|
|
67
79
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as h, jsx as o, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as h, jsx as o, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import { useState as H, useRef as D, useEffect as K, useMemo as _e, useLayoutEffect as Be } from "react";
|
|
3
3
|
import { r as Pe } from "../../index-CGDUIzcq.js";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as R } from "../../icons/Icon.js";
|
|
5
5
|
import { HelperText as Fe } from "../helperText/index.js";
|
|
6
6
|
import { FieldError as Qe } from "../fieldError/index.js";
|
|
7
7
|
import { useIsMediaQuery as Me } from "../../hooks/useMediaQuery.js";
|
|
@@ -9,7 +9,7 @@ import { Drawer as Ae } from "../drawer/index.js";
|
|
|
9
9
|
import { useClose as je } from "../../hooks/useClose.js";
|
|
10
10
|
import { Input as Ye } from "../Input/Input.js";
|
|
11
11
|
import { useBTC as Xe } from "../../hooks/btcContext/useBtcContext.js";
|
|
12
|
-
import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_selectContainer_medium_1xrg5_47", Ke = "_selectContainer_large_1xrg5_55", Ue = "_selectContainer_extraLarge_1xrg5_57", Ze = "_label_1xrg5_75", ze = "_label_large_1xrg5_89", er = "_label_extraLarge_1xrg5_91", rr = "_label_disabled_1xrg5_99", tr = "_label_inverted_1xrg5_107", nr = "_label_inverted_disabled_1xrg5_115", or = "_selectWrapper_1xrg5_133", lr = "_select_1xrg5_23", cr = "_open_1xrg5_213", ir = "_disabled_1xrg5_221", sr = "_placeholder_1xrg5_235", ar = "_small_1xrg5_257", dr = "_medium_1xrg5_279", _r = "_large_1xrg5_301", pr = "_extraLarge_1xrg5_323", ur = "_selectValue_1xrg5_351",
|
|
12
|
+
import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_selectContainer_medium_1xrg5_47", Ke = "_selectContainer_large_1xrg5_55", Ue = "_selectContainer_extraLarge_1xrg5_57", Ze = "_label_1xrg5_75", ze = "_label_large_1xrg5_89", er = "_label_extraLarge_1xrg5_91", rr = "_label_disabled_1xrg5_99", tr = "_label_inverted_1xrg5_107", nr = "_label_inverted_disabled_1xrg5_115", or = "_selectWrapper_1xrg5_133", lr = "_select_1xrg5_23", cr = "_open_1xrg5_213", ir = "_disabled_1xrg5_221", sr = "_placeholder_1xrg5_235", ar = "_small_1xrg5_257", dr = "_medium_1xrg5_279", _r = "_large_1xrg5_301", pr = "_extraLarge_1xrg5_323", ur = "_selectValue_1xrg5_351", mr = "_selectInput_1xrg5_371", gr = "_error_1xrg5_467", hr = "_btc_1xrg5_495", fr = "_errorShake_1xrg5_1", br = "_inverted_1xrg5_625", xr = "_chevron_1xrg5_685", wr = "_icon_inverted_1xrg5_693", vr = "_icon_inverted_disabled_1xrg5_825", $r = "_chevronOpen_1xrg5_893", Sr = "_icon_1xrg5_693", Cr = "_icon_disabled_1xrg5_927", Lr = "_iconLabel_1xrg5_945", Dr = "_optionIcon_1xrg5_967", yr = "_required_1xrg5_989", Wr = "_required_inverted_1xrg5_999", Nr = "_required_disabled_1xrg5_1007", Ir = "_required_inverted_disabled_1xrg5_1015", Or = "_dropdown_1xrg5_1033", kr = "_isDrawer_1xrg5_1065", qr = "_dropdownPortal_1xrg5_1111", Er = "_drawerSelect_1xrg5_1137", Tr = "_drawerSelectHeader_1xrg5_1145", Vr = "_drawerSearchInput_1xrg5_1153", Hr = "_option_1xrg5_967", Rr = "_optionSelected_1xrg5_1185", Br = "_optionWithCheckbox_1xrg5_1277", Pr = "_optionCheckbox_1xrg5_1289", Fr = "_optionWithDescriptionWrapper_1xrg5_1377", Qr = "_optionWithDescription_1xrg5_1377", Mr = "_optionWithDescriptionLabel_1xrg5_1409", Ar = "_optionWithDescriptionValue_1xrg5_1421", jr = "_dropdownTable_1xrg5_1441", Yr = "_optionTable_1xrg5_1451", Xr = "_tableColumn_1xrg5_1467", Gr = "_columnHeader_1xrg5_1483", Jr = "_columnValue_1xrg5_1499", Kr = "_noResults_1xrg5_1533", Ur = "_dropdown_inverted_1xrg5_1561", Zr = "_option_inverted_1xrg5_1607", e = {
|
|
13
13
|
selectContainer: Ge,
|
|
14
14
|
selectContainer_medium: Je,
|
|
15
15
|
selectContainer_large: Ke,
|
|
@@ -30,8 +30,8 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
30
30
|
large: _r,
|
|
31
31
|
extraLarge: pr,
|
|
32
32
|
selectValue: ur,
|
|
33
|
-
selectInput:
|
|
34
|
-
error:
|
|
33
|
+
selectInput: mr,
|
|
34
|
+
error: gr,
|
|
35
35
|
btc: hr,
|
|
36
36
|
errorShake: fr,
|
|
37
37
|
inverted: br,
|
|
@@ -69,52 +69,52 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
69
69
|
noResults: Kr,
|
|
70
70
|
dropdown_inverted: Ur,
|
|
71
71
|
option_inverted: Zr
|
|
72
|
-
},
|
|
72
|
+
}, mt = ({
|
|
73
73
|
size: c = "medium",
|
|
74
74
|
label: O,
|
|
75
|
-
error:
|
|
75
|
+
error: U,
|
|
76
76
|
helperText: k,
|
|
77
77
|
icon: y,
|
|
78
|
-
className:
|
|
79
|
-
required:
|
|
80
|
-
placeholder:
|
|
78
|
+
className: pe,
|
|
79
|
+
required: ue,
|
|
80
|
+
placeholder: B = "Seleccionar...",
|
|
81
81
|
options: w = [],
|
|
82
|
-
value:
|
|
82
|
+
value: m,
|
|
83
83
|
onChange: _,
|
|
84
84
|
onSearchInput: P,
|
|
85
85
|
disabled: s = !1,
|
|
86
86
|
inverted: a = !1,
|
|
87
|
-
dynamicIcon:
|
|
87
|
+
dynamicIcon: me = !1,
|
|
88
88
|
showPlaceholderIcon: ge = !1,
|
|
89
89
|
btc: Z,
|
|
90
90
|
columnHeaders: q,
|
|
91
|
-
searchable:
|
|
91
|
+
searchable: he = !1,
|
|
92
92
|
noSearchResult: z = "No se encontraron resultados",
|
|
93
93
|
searchAndCheckbox: E = !1,
|
|
94
94
|
customBorderColor: ee,
|
|
95
|
-
responsive:
|
|
96
|
-
title:
|
|
97
|
-
responsiveQuery:
|
|
98
|
-
...
|
|
95
|
+
responsive: fe = !1,
|
|
96
|
+
title: be,
|
|
97
|
+
responsiveQuery: xe = 1024,
|
|
98
|
+
...we
|
|
99
99
|
}) => {
|
|
100
|
-
const F = !!P, { btc:
|
|
101
|
-
|
|
100
|
+
const F = !!P, { btc: ve } = Xe(), $e = Z ?? ve, [i, v] = H(!1), [g, Q] = H(""), l = he || E, b = E, M = D(null), Se = D(null), W = D(null), A = D(null), j = D(null), [$, x] = H([]), Ce = i && !s, Le = Me(`(max-width: ${xe}px)`), Y = fe && Le && !s;
|
|
101
|
+
K(() => {
|
|
102
102
|
if (b)
|
|
103
|
-
if (Array.isArray(
|
|
104
|
-
const r = w.filter((t) =>
|
|
105
|
-
x(r), (n.length !==
|
|
103
|
+
if (Array.isArray(m) && m.length > 0) {
|
|
104
|
+
const r = w.filter((t) => m.includes(t.value)), n = r.map((t) => t.value);
|
|
105
|
+
x(r), (n.length !== m.length || !n.every((t) => m.includes(t))) && _ && _(n);
|
|
106
106
|
} else
|
|
107
107
|
x([]);
|
|
108
|
-
else if (
|
|
109
|
-
const r = w.find((n) => n.value ===
|
|
110
|
-
r ? (x([r]),
|
|
108
|
+
else if (m) {
|
|
109
|
+
const r = w.find((n) => n.value === m);
|
|
110
|
+
r ? (x([r]), Q(r.label)) : (x([]), _ && _(""));
|
|
111
111
|
} else
|
|
112
112
|
x([]);
|
|
113
|
-
}, [
|
|
113
|
+
}, [m, w, b]);
|
|
114
114
|
const N = $.map((r) => r.value), d = $[0] ?? null, S = (r) => typeof r == "string" ? r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "").toLowerCase() : "", re = D("");
|
|
115
|
-
|
|
115
|
+
K(() => {
|
|
116
116
|
if (!l) return;
|
|
117
|
-
const r =
|
|
117
|
+
const r = g.trim(), n = re.current.trim();
|
|
118
118
|
if (b) {
|
|
119
119
|
if (r.length > 0) {
|
|
120
120
|
const p = $.filter(
|
|
@@ -125,93 +125,93 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
125
125
|
r === "" && n.length > 0 && (x([]), _ && _([]));
|
|
126
126
|
} else
|
|
127
127
|
d && r.length > 0 && S(r) !== S(d.label) && (x([]), _ && _(""));
|
|
128
|
-
re.current =
|
|
128
|
+
re.current = g;
|
|
129
129
|
}, [
|
|
130
|
-
|
|
130
|
+
g,
|
|
131
131
|
d,
|
|
132
132
|
$,
|
|
133
133
|
b,
|
|
134
134
|
l,
|
|
135
135
|
_
|
|
136
136
|
]);
|
|
137
|
-
const te =
|
|
137
|
+
const te = _e(() => l ? i ? g : !b && d ? d.label : b && N.length > 0 ? `${N.length} ${N.length === 1 ? "seleccionado" : "seleccionados"}` : g : "", [
|
|
138
138
|
l,
|
|
139
139
|
i,
|
|
140
|
-
|
|
140
|
+
g,
|
|
141
141
|
d,
|
|
142
142
|
N,
|
|
143
143
|
b
|
|
144
|
-
]), ne = (r) => $.some((n) => n.value === r),
|
|
145
|
-
(r) => S(r.label).includes(S(
|
|
146
|
-
), [w,
|
|
147
|
-
if (
|
|
148
|
-
if (l &&
|
|
144
|
+
]), ne = (r) => $.some((n) => n.value === r), T = _e(() => !l || !g || F ? w : w.filter(
|
|
145
|
+
(r) => S(r.label).includes(S(g))
|
|
146
|
+
), [w, g, l, F]), C = (() => {
|
|
147
|
+
if (U) return U;
|
|
148
|
+
if (l && g && g.trim().length > 0 && T.length === 0 && !i && !m)
|
|
149
149
|
return z;
|
|
150
150
|
})();
|
|
151
|
-
|
|
151
|
+
K(() => {
|
|
152
152
|
const r = (n) => {
|
|
153
|
-
|
|
153
|
+
M.current && !M.current.contains(n.target) && W.current && !W.current.contains(n.target) && v(!1);
|
|
154
154
|
};
|
|
155
155
|
return document.addEventListener("mousedown", r), () => {
|
|
156
156
|
document.removeEventListener("mousedown", r);
|
|
157
157
|
};
|
|
158
158
|
}, [l, F, d]);
|
|
159
|
-
const
|
|
159
|
+
const De = [
|
|
160
160
|
e.select,
|
|
161
|
-
|
|
161
|
+
$e && e.btc,
|
|
162
162
|
e[c],
|
|
163
163
|
C ? e.error : "",
|
|
164
164
|
s ? e.disabled : "",
|
|
165
165
|
i ? e.open : "",
|
|
166
166
|
a ? e.inverted : "",
|
|
167
|
-
|
|
168
|
-
].filter(Boolean).join(" "), L = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, oe =
|
|
167
|
+
pe
|
|
168
|
+
].filter(Boolean).join(" "), L = c === "small" ? 16 : c === "large" ? 20 : c === "extraLarge" ? 24 : 18, oe = me && (d != null && d.icon) && !(l && i) ? d.icon : y, ye = () => {
|
|
169
169
|
var r;
|
|
170
|
-
s || (v(!i), l && !i && (
|
|
171
|
-
},
|
|
170
|
+
s || (v(!i), l && !i && (ce(), (r = j.current) == null || r.focus()));
|
|
171
|
+
}, X = (r, n = !0) => {
|
|
172
172
|
if (!_) return;
|
|
173
173
|
const p = w.find((t) => t.value === r);
|
|
174
174
|
if (b) {
|
|
175
|
-
const t = Array.isArray(
|
|
175
|
+
const t = Array.isArray(m) ? m : [], f = t.includes(r) ? t.filter((I) => I !== r) : [...t, r];
|
|
176
176
|
_(f);
|
|
177
177
|
} else
|
|
178
|
-
_(r), n && v(!1), p &&
|
|
179
|
-
},
|
|
178
|
+
_(r), n && v(!1), p && Q(p.label);
|
|
179
|
+
}, le = (r) => {
|
|
180
180
|
const n = r.target.value;
|
|
181
|
-
|
|
182
|
-
},
|
|
181
|
+
Q(n), i || v(!0), P && P(n);
|
|
182
|
+
}, ce = () => {
|
|
183
183
|
i || v(!0);
|
|
184
184
|
}, We = (r) => {
|
|
185
|
-
|
|
185
|
+
Y && (r.preventDefault(), r.stopPropagation()), l && (r.stopPropagation(), i || (v(!0), setTimeout(() => {
|
|
186
186
|
var n;
|
|
187
|
-
(n =
|
|
187
|
+
(n = j.current) == null || n.focus();
|
|
188
188
|
}, 0)));
|
|
189
|
-
}, [Ne, Ie] =
|
|
189
|
+
}, [Ne, Ie] = H();
|
|
190
190
|
Be(() => {
|
|
191
191
|
const r = document.body.style.overflow === "hidden", n = () => {
|
|
192
|
-
if (i &&
|
|
193
|
-
const t =
|
|
192
|
+
if (i && A.current && W.current) {
|
|
193
|
+
const t = A.current.getBoundingClientRect(), u = W.current.offsetHeight, f = window.innerHeight, I = (Te) => {
|
|
194
194
|
const { label: Ve, helperText: He, displayError: Re } = Te;
|
|
195
195
|
return { top: l && !Ve ? 3 : 0, bottom: l && !He && !Re ? 3 : 0 };
|
|
196
|
-
}, { top:
|
|
196
|
+
}, { top: se, bottom: ae } = I({
|
|
197
197
|
label: O,
|
|
198
198
|
helperText: k,
|
|
199
199
|
displayError: C
|
|
200
|
-
}),
|
|
200
|
+
}), V = {
|
|
201
201
|
small: 1,
|
|
202
202
|
//Meter gap en small
|
|
203
203
|
medium: 2,
|
|
204
204
|
large: 4,
|
|
205
205
|
extraLarge: 4
|
|
206
|
-
}[c], ke = t.bottom +
|
|
206
|
+
}[c], ke = t.bottom + V + ae, G = f - ke, J = t.top - V - se, qe = (
|
|
207
207
|
//si no hay espacio abajo pero sí arriba, se muestra arriba con separación dependiendo del size y tamaño del label
|
|
208
|
-
|
|
209
|
-
), Ee =
|
|
208
|
+
G < u && J >= u ? t.top + window.scrollY - u - V - se : t.bottom + window.scrollY + V + ae
|
|
209
|
+
), Ee = G < u && J >= u ? (
|
|
210
210
|
//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)
|
|
211
|
-
Math.min(
|
|
211
|
+
Math.min(J - 15, 300)
|
|
212
212
|
) : (
|
|
213
213
|
//si tiene espacio abajo, se calcula la altura igual que arriba pero teniendo en cuenta el espacio que tiene abajo
|
|
214
|
-
Math.min(
|
|
214
|
+
Math.min(G - 15, 300)
|
|
215
215
|
);
|
|
216
216
|
Ie({
|
|
217
217
|
position: "absolute",
|
|
@@ -234,20 +234,20 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
234
234
|
}, [
|
|
235
235
|
i,
|
|
236
236
|
c,
|
|
237
|
-
|
|
237
|
+
T.length,
|
|
238
238
|
l,
|
|
239
239
|
O,
|
|
240
240
|
C,
|
|
241
241
|
k
|
|
242
242
|
]);
|
|
243
|
-
const
|
|
243
|
+
const ie = ({
|
|
244
244
|
insideDrawer: r = !1,
|
|
245
245
|
handleOptionClickProp: n
|
|
246
246
|
}) => {
|
|
247
247
|
const p = (t) => {
|
|
248
|
-
n ? n(t) :
|
|
248
|
+
n ? n(t) : X(t);
|
|
249
249
|
};
|
|
250
|
-
return
|
|
250
|
+
return T.length > 0 ? T.map((t, u) => /* @__PURE__ */ h(
|
|
251
251
|
"div",
|
|
252
252
|
{
|
|
253
253
|
className: `${e.option} ${r ? e.isDrawer : ""} ${ne(t.value) ? e.optionSelected : ""} ${a ? e.option_inverted : ""} ${t.columns ? e.optionTable : ""} ${E ? e.optionWithCheckbox : ""}`,
|
|
@@ -260,19 +260,19 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
260
260
|
{
|
|
261
261
|
type: "checkbox",
|
|
262
262
|
checked: ne(t.value),
|
|
263
|
-
onChange: () =>
|
|
263
|
+
onChange: () => X(t.value),
|
|
264
264
|
onClick: (f) => f.stopPropagation(),
|
|
265
265
|
className: e.optionCheckbox
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
t.columns ? /* @__PURE__ */ o(
|
|
268
|
+
t.columns ? /* @__PURE__ */ o(de, { children: q && Object.entries(q).map(([f, I]) => /* @__PURE__ */ h("div", { className: e.tableColumn, children: [
|
|
269
269
|
/* @__PURE__ */ o("div", { className: `${e.columnHeader} ${e[c]}`, children: I }),
|
|
270
270
|
/* @__PURE__ */ o("div", { className: `${e.columnValue} ${e[c]}`, children: t.columns[f] || "" })
|
|
271
271
|
] }, f)) }) : (
|
|
272
272
|
//opción tiene descripción
|
|
273
273
|
t.description ? /* @__PURE__ */ h("div", { className: e.optionWithDescriptionWrapper, children: [
|
|
274
274
|
(t.icon || y) && /* @__PURE__ */ o(
|
|
275
|
-
|
|
275
|
+
R,
|
|
276
276
|
{
|
|
277
277
|
name: t.icon || y,
|
|
278
278
|
width: L,
|
|
@@ -283,9 +283,9 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
283
283
|
/* @__PURE__ */ o("span", { className: e.optionWithDescriptionLabel, children: t.label }),
|
|
284
284
|
/* @__PURE__ */ o("span", { className: e.optionWithDescriptionValue, children: t.description })
|
|
285
285
|
] })
|
|
286
|
-
] }) : /* @__PURE__ */ h(
|
|
286
|
+
] }) : /* @__PURE__ */ h(de, { children: [
|
|
287
287
|
(t.icon || y) && /* @__PURE__ */ o("div", { className: e.optionIcon, children: /* @__PURE__ */ o(
|
|
288
|
-
|
|
288
|
+
R,
|
|
289
289
|
{
|
|
290
290
|
name: t.icon || y,
|
|
291
291
|
width: L,
|
|
@@ -301,14 +301,14 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
301
301
|
)) : /* @__PURE__ */ o("span", { className: e.noResults, children: z });
|
|
302
302
|
}, Oe = () => {
|
|
303
303
|
const r = je(), n = (p) => {
|
|
304
|
-
|
|
304
|
+
X(p, !1), b || r();
|
|
305
305
|
};
|
|
306
306
|
return /* @__PURE__ */ o(
|
|
307
307
|
"div",
|
|
308
308
|
{
|
|
309
309
|
className: `${e.dropdown} ${e.isDrawer} ${e[c]} ${a ? e.dropdown_inverted : ""} ${q ? e.dropdownTable : ""} ${l ? e.dropdownSearchable : ""}`,
|
|
310
310
|
children: /* @__PURE__ */ o(
|
|
311
|
-
|
|
311
|
+
ie,
|
|
312
312
|
{
|
|
313
313
|
insideDrawer: !0,
|
|
314
314
|
handleOptionClickProp: n
|
|
@@ -320,9 +320,9 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
320
320
|
return /* @__PURE__ */ h(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
|
-
ref:
|
|
323
|
+
ref: A,
|
|
324
324
|
className: `${e.selectContainer} ${c === "medium" ? e.selectContainer_medium : c === "large" ? e.selectContainer_large : c === "extraLarge" ? e.selectContainer_extraLarge : ""}`,
|
|
325
|
-
...
|
|
325
|
+
...we,
|
|
326
326
|
children: [
|
|
327
327
|
O && /* @__PURE__ */ h(
|
|
328
328
|
"label",
|
|
@@ -334,19 +334,19 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
334
334
|
"span",
|
|
335
335
|
{
|
|
336
336
|
className: `${e.required} ${s && !a ? e.required_disabled : ""} ${a && !s ? e.required_inverted : ""} ${a && s ? e.required_inverted_disabled : ""}`,
|
|
337
|
-
children:
|
|
337
|
+
children: ue && "*"
|
|
338
338
|
}
|
|
339
339
|
)
|
|
340
340
|
]
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
/* @__PURE__ */ h("div", { className: e.selectWrapper, ref:
|
|
343
|
+
/* @__PURE__ */ h("div", { className: e.selectWrapper, ref: Se, children: [
|
|
344
344
|
/* @__PURE__ */ h(
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
|
-
className:
|
|
348
|
-
onClick:
|
|
349
|
-
ref:
|
|
347
|
+
className: De,
|
|
348
|
+
onClick: ye,
|
|
349
|
+
ref: M,
|
|
350
350
|
style: ee ? { borderColor: ee } : void 0,
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ h("div", { className: e.iconLabel, children: [
|
|
@@ -355,7 +355,7 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
355
355
|
{
|
|
356
356
|
className: `${e.icon} ${s && !a ? e.icon_disabled : ""} ${a && !s ? e.icon_inverted : ""} ${a && s ? e.icon_inverted_disabled : ""}`,
|
|
357
357
|
children: /* @__PURE__ */ o(
|
|
358
|
-
|
|
358
|
+
R,
|
|
359
359
|
{
|
|
360
360
|
name: l ? "SearchIcon" : oe,
|
|
361
361
|
width: L,
|
|
@@ -367,26 +367,26 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
367
367
|
l ? /* @__PURE__ */ o(
|
|
368
368
|
"input",
|
|
369
369
|
{
|
|
370
|
-
ref:
|
|
370
|
+
ref: j,
|
|
371
371
|
value: te,
|
|
372
372
|
className: `${e.selectInput} ${!d && !i && N.length === 0 ? e.placeholder : ""}`,
|
|
373
|
-
placeholder:
|
|
374
|
-
onChange:
|
|
375
|
-
onFocus:
|
|
373
|
+
placeholder: B,
|
|
374
|
+
onChange: le,
|
|
375
|
+
onFocus: ce,
|
|
376
376
|
onClick: We,
|
|
377
377
|
disabled: s,
|
|
378
|
-
readOnly:
|
|
378
|
+
readOnly: Y || !i
|
|
379
379
|
}
|
|
380
380
|
) : /* @__PURE__ */ o(
|
|
381
381
|
"span",
|
|
382
382
|
{
|
|
383
383
|
className: `${e.selectValue} ${d ? "" : e.placeholder}`,
|
|
384
|
-
children: d ? d.label :
|
|
384
|
+
children: d ? d.label : B
|
|
385
385
|
}
|
|
386
386
|
)
|
|
387
387
|
] }),
|
|
388
388
|
/* @__PURE__ */ o(
|
|
389
|
-
|
|
389
|
+
R,
|
|
390
390
|
{
|
|
391
391
|
name: "ArrowDown",
|
|
392
392
|
width: 16,
|
|
@@ -397,36 +397,36 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
397
397
|
]
|
|
398
398
|
}
|
|
399
399
|
),
|
|
400
|
-
|
|
400
|
+
Y ? /* @__PURE__ */ h(
|
|
401
401
|
Ae,
|
|
402
402
|
{
|
|
403
403
|
className: e.drawerSelect,
|
|
404
404
|
headerClassName: e.drawerSelectHeader,
|
|
405
405
|
isOpen: i,
|
|
406
406
|
setIsOpen: v,
|
|
407
|
-
title:
|
|
407
|
+
title: be,
|
|
408
408
|
children: [
|
|
409
409
|
l && /* @__PURE__ */ o("div", { className: e.drawerSearchInput, children: /* @__PURE__ */ o(
|
|
410
410
|
Ye,
|
|
411
411
|
{
|
|
412
|
-
placeholder:
|
|
412
|
+
placeholder: B,
|
|
413
413
|
icon: "SearchIcon",
|
|
414
414
|
value: te,
|
|
415
|
-
onChange:
|
|
415
|
+
onChange: le,
|
|
416
416
|
btc: Z
|
|
417
417
|
}
|
|
418
418
|
) }),
|
|
419
419
|
/* @__PURE__ */ o(Oe, {})
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
|
-
) :
|
|
422
|
+
) : Ce && Pe.createPortal(
|
|
423
423
|
/* @__PURE__ */ o(
|
|
424
424
|
"div",
|
|
425
425
|
{
|
|
426
426
|
ref: W,
|
|
427
427
|
className: `${e.dropdown} ${e[c]} ${e.dropdownPortal} ${a ? e.dropdown_inverted : ""} ${q ? e.dropdownTable : ""} ${l ? e.dropdownSearchable : ""}`,
|
|
428
428
|
style: Ne,
|
|
429
|
-
children: /* @__PURE__ */ o(
|
|
429
|
+
children: /* @__PURE__ */ o(ie, {})
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
432
|
document.getElementById("root") || document.body
|
|
@@ -447,5 +447,5 @@ import '../../assets/Select.css';const Ge = "_selectContainer_1xrg5_23", Je = "_
|
|
|
447
447
|
);
|
|
448
448
|
};
|
|
449
449
|
export {
|
|
450
|
-
|
|
450
|
+
mt as Select
|
|
451
451
|
};
|
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
import { jsxs as t, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const r = (e) => /* @__PURE__ */ t(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
fill: "none",
|
|
7
|
+
viewBox: "0 0 18 18",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em",
|
|
10
|
+
...e,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ h(
|
|
13
|
+
"mask",
|
|
14
|
+
{
|
|
15
|
+
id: "add_alert_svg__a",
|
|
16
|
+
width: 18,
|
|
17
|
+
height: 18,
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
maskUnits: "userSpaceOnUse",
|
|
21
|
+
style: {
|
|
22
|
+
maskType: "alpha"
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ h("path", { fill: "currentColor", d: "M0 0h18v18H0z" })
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ h("g", { mask: "url(#add_alert_svg__a)", children: /* @__PURE__ */ h(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
d: "M8.25 11.25h1.5v-1.5h1.5v-1.5h-1.5v-1.5h-1.5v1.5h-1.5v1.5h1.5zm-5.25 3v-1.5h1.5V7.5q0-1.556.938-2.766A4.33 4.33 0 0 1 7.874 3.15v-.525q0-.468.328-.797Q8.532 1.5 9 1.5t.797.328q.328.328.328.797v.525q1.5.375 2.438 1.584.937 1.21.937 2.766v5.25H15v1.5zm6 2.25q-.619 0-1.06-.44A1.45 1.45 0 0 1 7.5 15h3q0 .619-.44 1.06-.442.44-1.06.44m-3-3.75h6V7.5q0-1.237-.881-2.119A2.9 2.9 0 0 0 9 4.5q-1.237 0-2.119.881A2.9 2.9 0 0 0 6 7.5z"
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
8
37
|
export {
|
|
9
|
-
|
|
38
|
+
r as default
|
|
10
39
|
};
|