bmi-next 1.0.24 → 1.0.26
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/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._container_nqpxl_1{display:flex;flex-direction:column;gap:5px;width:100%}._textareaContainer_nqpxl_8{box-sizing:border-box;display:flex;align-items:flex-start;padding-inline:16px;border-radius:16px;border:solid 1px rgba(3,12,36,.2);gap:16px;padding-bottom:4px;background-color:#fff}._textareaContainer_nqpxl_8:has(textarea:invalid){border:solid 1px #f64c71;transition:all .3s ease}._textareaContainer_nqpxl_8:has(textarea:focus:not(:invalid)),._textareaContainer_nqpxl_8:hover:has(textarea:valid){border:solid 1px #45c2d6;box-shadow:3px 3px #45c2d6;transition:all .3s ease}._textarea_nqpxl_8{width:100%;font-size:16px;border:none;font-family:Poppins Regular;box-sizing:border-box;resize:none;min-height:140px;max-height:550px;padding-top:12px;padding-bottom:12px;line-height:24px;overflow-y:auto;field-sizing:content}._textarea_nqpxl_8:focus{outline:none}._prefix_nqpxl_52{opacity:.6;font-size:19px;font-family:Palaquin BMI}._textarea_nqpxl_8:invalid{color:#f64c71}._textarea_nqpxl_8:disabled{background-color:#fff}._labelContainer_nqpxl_66{display:flex;justify-content:space-between;align-items:center}._labelContainer_nqpxl_66>label{margin-left:9px;font-family:Poppins Medium;font-size:14px;line-height:16.8px}._invalidLabel_nqpxl_79{color:var(--rojo)}
|
|
@@ -1,95 +1,105 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as o, Fragment as D, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, Fragment as A } from "react";
|
|
3
3
|
import { r as I } from "../../../index-Cp_B-Y3h.js";
|
|
4
4
|
import { Icon as j } from "../../../icons/icons.js";
|
|
5
5
|
import { Image as H } from "../../images/index.js";
|
|
6
|
-
import '../../../assets/index3.css';const B = "_overlay_f1ngj_1", Y = "_closing_f1ngj_11", L = "_bottomDrawer_f1ngj_35", S = "_drawerHeader_f1ngj_73", C = "_drawerIndicator_f1ngj_87",
|
|
6
|
+
import '../../../assets/index3.css';const B = "_overlay_f1ngj_1", Y = "_closing_f1ngj_11", L = "_bottomDrawer_f1ngj_35", S = "_drawerHeader_f1ngj_73", C = "_drawerIndicator_f1ngj_87", R = "_drawerContent_f1ngj_98", X = "_optionCountry_f1ngj_106", $ = "_optionNormal_f1ngj_107", b = "_options_f1ngj_125", x = "_closeButton_f1ngj_137", M = "_separator_f1ngj_150", t = {
|
|
7
7
|
overlay: B,
|
|
8
8
|
closing: Y,
|
|
9
9
|
bottomDrawer: L,
|
|
10
10
|
drawerHeader: S,
|
|
11
11
|
drawerIndicator: C,
|
|
12
|
-
drawerContent:
|
|
13
|
-
optionCountry:
|
|
14
|
-
optionNormal:
|
|
15
|
-
options:
|
|
16
|
-
closeButton:
|
|
17
|
-
separator:
|
|
12
|
+
drawerContent: R,
|
|
13
|
+
optionCountry: X,
|
|
14
|
+
optionNormal: $,
|
|
15
|
+
options: b,
|
|
16
|
+
closeButton: x,
|
|
17
|
+
separator: M
|
|
18
18
|
}, P = ({
|
|
19
|
-
isOpen:
|
|
19
|
+
isOpen: E,
|
|
20
20
|
handleClose: s,
|
|
21
|
-
dragPosition:
|
|
22
|
-
setDragPosition:
|
|
23
|
-
isClosing:
|
|
24
|
-
title:
|
|
25
|
-
options:
|
|
26
|
-
handleOptionClick:
|
|
27
|
-
countries:
|
|
28
|
-
zIndex:
|
|
21
|
+
dragPosition: p,
|
|
22
|
+
setDragPosition: m,
|
|
23
|
+
isClosing: u,
|
|
24
|
+
title: f,
|
|
25
|
+
options: _,
|
|
26
|
+
handleOptionClick: y,
|
|
27
|
+
countries: w,
|
|
28
|
+
zIndex: l
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
const
|
|
30
|
+
const N = l ? 50 : 70, d = h(0), i = h(0);
|
|
31
|
+
if (!E) return null;
|
|
32
|
+
const g = (e) => {
|
|
33
33
|
const n = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
document.removeEventListener("mousemove",
|
|
37
|
-
},
|
|
38
|
-
const n = "touches" in e ? e.touches[0].clientY : e.clientY,
|
|
39
|
-
|
|
34
|
+
d.current = n, i.current = n, document.addEventListener("mousemove", a), document.addEventListener("touchmove", a), document.addEventListener("mouseup", c), document.addEventListener("touchend", c);
|
|
35
|
+
}, c = () => {
|
|
36
|
+
document.removeEventListener("mousemove", a), document.removeEventListener("touchmove", a), document.removeEventListener("mouseup", c), document.removeEventListener("touchend", c), i.current - d.current > 100 ? s() : m(0);
|
|
37
|
+
}, a = (e) => {
|
|
38
|
+
const n = "touches" in e ? e.touches[0].clientY : e.clientY, v = n - d.current;
|
|
39
|
+
i.current = n, v > 0 && m(v);
|
|
40
40
|
};
|
|
41
41
|
return I.createPortal(
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ o(D, { children: [
|
|
43
|
+
/* @__PURE__ */ r(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
style: { zIndex: 2e3 + (
|
|
47
|
-
className: `${t.overlay} ${
|
|
46
|
+
style: { zIndex: 2e3 + (l || 0) },
|
|
47
|
+
className: `${t.overlay} ${u ? t.closing : ""}`,
|
|
48
48
|
onClick: s
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
|
-
className: `${t.bottomDrawer} ${
|
|
54
|
+
className: `${t.bottomDrawer} ${u ? t.closing : ""}`,
|
|
55
55
|
style: {
|
|
56
|
-
transform: `translateY(${
|
|
57
|
-
zIndex: 2001 + (
|
|
56
|
+
transform: `translateY(${p ?? 0}px)`,
|
|
57
|
+
zIndex: 2001 + (l || 0)
|
|
58
58
|
},
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ o(
|
|
61
61
|
"header",
|
|
62
62
|
{
|
|
63
63
|
className: t.drawerHeader,
|
|
64
|
-
onMouseDown:
|
|
65
|
-
onTouchStart:
|
|
64
|
+
onMouseDown: g,
|
|
65
|
+
onTouchStart: g,
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ r("div", { className: t.drawerIndicator }),
|
|
68
|
+
/* @__PURE__ */ r("div", { className: t.closeButton, onClick: s, children: /* @__PURE__ */ r(j, { name: "Close", fill: "rgb(0 0 0/40%)" }) }),
|
|
69
|
+
/* @__PURE__ */ r("p", { children: f })
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ r(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
className: t.drawerContent,
|
|
77
|
-
style: { maxHeight: `${
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
-
(e, n) => e.hidden ? null : /* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
77
|
+
style: { maxHeight: `${N}vh` },
|
|
78
|
+
children: /* @__PURE__ */ r("div", { className: t.options, children: _.map(
|
|
79
|
+
(e, n) => e.hidden ? null : /* @__PURE__ */ o(A, { children: [
|
|
80
|
+
/* @__PURE__ */ o(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
className: `${
|
|
84
|
-
onClick: () =>
|
|
83
|
+
className: `${w ? t.optionCountry : t.optionNormal}`,
|
|
84
|
+
onClick: () => y(e),
|
|
85
85
|
children: [
|
|
86
|
-
e.image && /* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
e.image && /* @__PURE__ */ r(H, { width: 30, height: 30, src: e.image.src }),
|
|
87
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
88
|
+
/* @__PURE__ */ r("p", { style: { margin: 0 }, children: e.label }),
|
|
89
|
+
e.description && /* @__PURE__ */ r(
|
|
90
|
+
"p",
|
|
91
|
+
{
|
|
92
|
+
className: "small2Regular",
|
|
93
|
+
style: { margin: 0, opacity: 0.5 },
|
|
94
|
+
children: e.description
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] })
|
|
88
98
|
]
|
|
89
99
|
},
|
|
90
100
|
e.value
|
|
91
101
|
),
|
|
92
|
-
n <
|
|
102
|
+
n < _.length - 1 && /* @__PURE__ */ r("div", { className: t.separator })
|
|
93
103
|
] }, n)
|
|
94
104
|
) })
|
|
95
105
|
}
|
|
@@ -10,6 +10,7 @@ import { ImgProps } from '../images';
|
|
|
10
10
|
* @property {ImgProps} [image] - Imagen opcional para mostrar junto a la opción.
|
|
11
11
|
* @property {IconPropsWithIconName} [icon] - Icono opcional para mostrar junto a la opción.
|
|
12
12
|
* @property {boolean} [hidden] - Indica si la opción debe estar oculta en la lista.
|
|
13
|
+
* @property {string} [description] - Descripción opcional para mostrar junto a la opción.
|
|
13
14
|
*/
|
|
14
15
|
export interface Option {
|
|
15
16
|
/** El texto que se muestra para la opción */
|
|
@@ -22,6 +23,8 @@ export interface Option {
|
|
|
22
23
|
icon?: IconPropsWithIconName;
|
|
23
24
|
/** Indica si la opción debe estar oculta en la lista */
|
|
24
25
|
hidden?: boolean;
|
|
26
|
+
/** Descripción opcional para mostrar junto a la opción */
|
|
27
|
+
description?: string;
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
30
|
* Props del componente Select.
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Icon as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as f } from "../../icons/icons.js";
|
|
3
3
|
import { FieldError as h } from "../FieldError/index.js";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import '../../assets/index.css';const
|
|
6
|
-
container:
|
|
7
|
-
textareaContainer:
|
|
8
|
-
textarea:
|
|
9
|
-
prefix:
|
|
10
|
-
labelContainer:
|
|
11
|
-
invalidLabel:
|
|
12
|
-
},
|
|
4
|
+
import { useRef as b } from "react";
|
|
5
|
+
import '../../assets/index.css';const v = "_container_nqpxl_1", C = "_textareaContainer_nqpxl_8", q = "_textarea_nqpxl_8", y = "_prefix_nqpxl_52", N = "_labelContainer_nqpxl_66", L = "_invalidLabel_nqpxl_79", a = {
|
|
6
|
+
container: v,
|
|
7
|
+
textareaContainer: C,
|
|
8
|
+
textarea: q,
|
|
9
|
+
prefix: y,
|
|
10
|
+
labelContainer: N,
|
|
11
|
+
invalidLabel: L
|
|
12
|
+
}, T = ({
|
|
13
13
|
icon: t,
|
|
14
14
|
error: n,
|
|
15
|
-
prefix:
|
|
15
|
+
prefix: i,
|
|
16
16
|
className: r,
|
|
17
|
-
onChange:
|
|
17
|
+
onChange: l,
|
|
18
18
|
label: s,
|
|
19
19
|
...o
|
|
20
20
|
}) => {
|
|
21
|
-
var
|
|
22
|
-
const d =
|
|
23
|
-
|
|
21
|
+
var x;
|
|
22
|
+
const d = b(null), _ = `${a.textarea} ${r || ""}`, p = (m) => {
|
|
23
|
+
l == null || l(m);
|
|
24
24
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
className: a.container,
|
|
29
|
-
style: ((
|
|
29
|
+
style: ((x = o.style) == null ? void 0 : x.display) === "none" ? { display: "none" } : {},
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ e("div", { className: a.labelContainer, children: s && /* @__PURE__ */ e("label", { className: n ? a.invalidLabel : "", children: s }) }),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ c("div", { className: a.textareaContainer, children: [
|
|
33
33
|
t && /* @__PURE__ */ e("div", { style: { marginTop: "9px" }, children: /* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
f,
|
|
35
35
|
{
|
|
36
36
|
name: t.name,
|
|
37
37
|
fill: t.fill,
|
|
@@ -39,19 +39,19 @@ import '../../assets/index.css';const b = "_container_1y71m_1", v = "_textareaCo
|
|
|
39
39
|
height: t.height
|
|
40
40
|
}
|
|
41
41
|
) }),
|
|
42
|
-
|
|
42
|
+
i && /* @__PURE__ */ e(
|
|
43
43
|
"span",
|
|
44
44
|
{
|
|
45
45
|
className: a.prefix,
|
|
46
|
-
children:
|
|
46
|
+
children: i
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
49
|
/* @__PURE__ */ e(
|
|
50
50
|
"textarea",
|
|
51
51
|
{
|
|
52
52
|
ref: d,
|
|
53
|
-
className:
|
|
54
|
-
onChange:
|
|
53
|
+
className: _,
|
|
54
|
+
onChange: p,
|
|
55
55
|
...o
|
|
56
56
|
}
|
|
57
57
|
)
|
|
@@ -62,5 +62,5 @@ import '../../assets/index.css';const b = "_container_1y71m_1", v = "_textareaCo
|
|
|
62
62
|
);
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
T as TextArea
|
|
66
66
|
};
|
package/package.json
CHANGED