bmi-next 1.0.62 → 1.0.64

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,89 +1,90 @@
1
- import { jsxs as o, Fragment as f, jsx as t } from "react/jsx-runtime";
2
- import { useRef as w, Fragment as I } from "react";
3
- import { r as A } from "../../../index-BVBERE6H.js";
4
- import { Icon as H } from "../../../icons/icons.js";
5
- import { Image as x } from "../../images/index.js";
6
- import '../../../assets/index4.css';const B = "_overlay_a96ws_1", Y = "_closing_a96ws_11", L = "_bottomDrawer_a96ws_35", S = "_drawerHeader_a96ws_73", C = "_drawerIndicator_a96ws_88", b = "_drawerContent_a96ws_99", R = "_optionCountry_a96ws_107", X = "_optionNormal_a96ws_108", $ = "_options_a96ws_126", M = "_closeButton_a96ws_138", F = "_separator_a96ws_152", r = {
1
+ import { jsxs as o, Fragment as I, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as w, Fragment as A } from "react";
3
+ import { r as x } from "../../../index-BVBERE6H.js";
4
+ import { Icon as E } from "../../../icons/icons.js";
5
+ import { Image as H } from "../../images/index.js";
6
+ import '../../../assets/index4.css';const B = "_overlay_a96ws_1", Y = "_closing_a96ws_11", L = "_bottomDrawer_a96ws_35", S = "_drawerHeader_a96ws_73", C = "_drawerIndicator_a96ws_88", R = "_drawerContent_a96ws_99", b = "_optionCountry_a96ws_107", X = "_optionNormal_a96ws_108", $ = "_options_a96ws_126", M = "_closeButton_a96ws_138", F = "_separator_a96ws_152", t = {
7
7
  overlay: B,
8
8
  closing: Y,
9
9
  bottomDrawer: L,
10
10
  drawerHeader: S,
11
11
  drawerIndicator: C,
12
- drawerContent: b,
13
- optionCountry: R,
12
+ drawerContent: R,
13
+ optionCountry: b,
14
14
  optionNormal: X,
15
15
  options: $,
16
16
  closeButton: M,
17
17
  separator: F
18
18
  }, W = ({
19
- isOpen: E,
20
- handleClose: c,
21
- dragPosition: p,
19
+ isOpen: g,
20
+ handleClose: s,
21
+ dragPosition: y,
22
22
  setDragPosition: m,
23
23
  isClosing: u,
24
- title: y,
24
+ title: p,
25
25
  options: _,
26
- handleOptionClick: g,
27
- countries: N,
26
+ handleOptionClick: N,
27
+ countries: D,
28
28
  zIndex: l
29
29
  }) => {
30
- const D = l ? 50 : 70, d = w(0), i = w(0);
31
- if (!E) return null;
30
+ const f = l ? 50 : 70, d = w(0), i = w(0);
31
+ if (!g) return null;
32
32
  const h = (e) => {
33
33
  const n = "touches" in e ? e.touches[0].clientY : e.clientY;
34
- d.current = n, i.current = n, document.addEventListener("mousemove", s), document.addEventListener("touchmove", s), document.addEventListener("mouseup", a), document.addEventListener("touchend", a);
34
+ d.current = n, i.current = n, document.addEventListener("mousemove", c), document.addEventListener("touchmove", c), document.addEventListener("mouseup", a), document.addEventListener("touchend", a);
35
35
  }, a = () => {
36
- document.removeEventListener("mousemove", s), document.removeEventListener("touchmove", s), document.removeEventListener("mouseup", a), document.removeEventListener("touchend", a), i.current - d.current > 100 ? c() : m(0);
37
- }, s = (e) => {
36
+ document.removeEventListener("mousemove", c), document.removeEventListener("touchmove", c), document.removeEventListener("mouseup", a), document.removeEventListener("touchend", a), i.current - d.current > 100 ? s() : m(0);
37
+ }, c = (e) => {
38
38
  const n = "touches" in e ? e.touches[0].clientY : e.clientY, v = n - d.current;
39
39
  i.current = n, v > 0 && m(v);
40
40
  };
41
- return A.createPortal(
42
- /* @__PURE__ */ o(f, { children: [
43
- /* @__PURE__ */ t(
41
+ return x.createPortal(
42
+ /* @__PURE__ */ o(I, { children: [
43
+ /* @__PURE__ */ r(
44
44
  "div",
45
45
  {
46
46
  style: { zIndex: 2e3 + (l || 0) },
47
- className: `${r.overlay} ${u ? r.closing : ""}`,
48
- onClick: c
47
+ className: `${t.overlay} ${u ? t.closing : ""}`,
48
+ onClick: s
49
49
  }
50
50
  ),
51
51
  /* @__PURE__ */ o(
52
52
  "div",
53
53
  {
54
- className: `${r.bottomDrawer} ${u ? r.closing : ""}`,
54
+ className: `${t.bottomDrawer} ${u ? t.closing : ""}`,
55
55
  style: {
56
- transform: `translateY(${p ?? 0}px)`,
56
+ transform: `translateY(${y ?? 0}px)`,
57
57
  zIndex: 2001 + (l || 0)
58
58
  },
59
59
  children: [
60
60
  /* @__PURE__ */ o(
61
61
  "header",
62
62
  {
63
- className: r.drawerHeader,
63
+ className: t.drawerHeader,
64
64
  onMouseDown: h,
65
65
  onTouchStart: h,
66
66
  children: [
67
- /* @__PURE__ */ t("div", { className: r.drawerIndicator }),
68
- /* @__PURE__ */ t("div", { className: r.closeButton, onClick: c, children: /* @__PURE__ */ t(H, { name: "Close", fill: "rgb(0 0 0/40%)" }) }),
69
- /* @__PURE__ */ t("p", { children: y })
67
+ /* @__PURE__ */ r("div", { className: t.drawerIndicator }),
68
+ /* @__PURE__ */ r("div", { className: t.closeButton, onClick: s, children: /* @__PURE__ */ r(E, { name: "Close", fill: "rgb(0 0 0/40%)" }) }),
69
+ /* @__PURE__ */ r("p", { children: p })
70
70
  ]
71
71
  }
72
72
  ),
73
- /* @__PURE__ */ t(
73
+ /* @__PURE__ */ r(
74
74
  "div",
75
75
  {
76
- className: r.drawerContent,
77
- style: { maxHeight: `${D}vh` },
78
- children: /* @__PURE__ */ t("div", { className: r.options, children: _.map(
79
- (e, n) => e.hidden ? null : /* @__PURE__ */ o(I, { children: [
76
+ className: t.drawerContent,
77
+ style: { maxHeight: `${f}vh` },
78
+ children: /* @__PURE__ */ r("div", { className: t.options, children: _.map(
79
+ (e, n) => e.hidden ? null : /* @__PURE__ */ o(A, { children: [
80
80
  /* @__PURE__ */ o(
81
81
  "div",
82
82
  {
83
- className: `${N ? r.optionCountry : r.optionNormal}`,
84
- onClick: () => g(e),
83
+ className: `${D ? t.optionCountry : t.optionNormal}`,
84
+ onClick: () => N(e),
85
85
  children: [
86
- e.image && /* @__PURE__ */ t(x, { width: 30, height: 30, src: e.image.src }),
86
+ e.image && /* @__PURE__ */ r(H, { width: 30, height: 30, src: e.image.src }),
87
+ e.icon && /* @__PURE__ */ r("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ r(E, { ...e.icon }) }),
87
88
  /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column" }, children: [
88
89
  /* @__PURE__ */ o(
89
90
  "div",
@@ -94,13 +95,13 @@ import '../../../assets/index4.css';const B = "_overlay_a96ws_1", Y = "_closing_
94
95
  gap: "10px"
95
96
  },
96
97
  children: [
97
- e.countryFlag && /* @__PURE__ */ t("span", { children: e.countryFlag }),
98
- /* @__PURE__ */ t("span", { children: e.label }),
99
- e.countryPrefix && /* @__PURE__ */ t("span", { style: { color: "rgb(0 0 0/60%)" }, children: e.countryPrefix })
98
+ e.countryFlag && /* @__PURE__ */ r("span", { children: e.countryFlag }),
99
+ /* @__PURE__ */ r("span", { children: e.label }),
100
+ e.countryPrefix && /* @__PURE__ */ r("span", { style: { color: "rgb(0 0 0/60%)" }, children: e.countryPrefix })
100
101
  ]
101
102
  }
102
103
  ),
103
- e.description && /* @__PURE__ */ t(
104
+ e.description && /* @__PURE__ */ r(
104
105
  "p",
105
106
  {
106
107
  className: "small2Regular",
@@ -113,7 +114,7 @@ import '../../../assets/index4.css';const B = "_overlay_a96ws_1", Y = "_closing_
113
114
  },
114
115
  e.value
115
116
  ),
116
- n < _.length - 1 && /* @__PURE__ */ t("div", { className: r.separator })
117
+ n < _.length - 1 && /* @__PURE__ */ r("div", { className: t.separator })
117
118
  ] }, n)
118
119
  ) })
119
120
  }
@@ -1,9 +1,9 @@
1
- import { jsxs as t, jsx as n, Fragment as E } from "react/jsx-runtime";
2
- import { Icon as D } from "../../icons/icons.js";
1
+ import { jsxs as t, jsx as n, Fragment as L } from "react/jsx-runtime";
2
+ import { Icon as u } from "../../icons/icons.js";
3
3
  import { useState as y, useRef as p, useEffect as C } from "react";
4
- import { Image as g } from "../images/index.js";
5
- import { DrawerPortal as R } from "./DrawerPortal/index.js";
6
- import '../../assets/index3.css';const I = "_selectDrawer_8m10f_1", z = "_label_8m10f_9", j = "_selected_8m10f_16", A = "_desktopSelectContainer_8m10f_41", T = "_desktopSelect_8m10f_41", q = "_desktopDropdown_8m10f_75", B = "_desktopOption_8m10f_89", a = {
4
+ import { Image as w } from "../images/index.js";
5
+ import { DrawerPortal as E } from "./DrawerPortal/index.js";
6
+ import '../../assets/index3.css';const I = "_selectDrawer_8m10f_1", z = "_label_8m10f_9", j = "_selected_8m10f_16", A = "_desktopSelectContainer_8m10f_41", T = "_desktopSelect_8m10f_41", q = "_desktopDropdown_8m10f_75", B = "_desktopOption_8m10f_89", i = {
7
7
  selectDrawer: I,
8
8
  label: z,
9
9
  selected: j,
@@ -13,78 +13,80 @@ import '../../assets/index3.css';const I = "_selectDrawer_8m10f_1", z = "_label_
13
13
  desktopOption: B
14
14
  };
15
15
  function Q({
16
- options: i,
16
+ options: a,
17
17
  selected: r,
18
- setSelected: m,
18
+ setSelected: h,
19
19
  title: S,
20
20
  countries: N,
21
- onChange: u,
21
+ onChange: f,
22
22
  zIndex: O,
23
- label: f,
24
- desktop: s = !1,
25
- ...w
23
+ label: m,
24
+ desktop: c = !1,
25
+ ..._
26
26
  }) {
27
- const [c, o] = y(!1), [P, _] = y(!1), F = p(null), [L, k] = y(0), d = p(null), h = p(null);
28
- C(() => (c && !s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
27
+ const [s, o] = y(!1), [P, x] = y(!1), R = p(null), [F, k] = y(0), d = p(null), v = p(null);
28
+ C(() => (s && !c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
29
29
  document.body.style.overflow = "";
30
- }), [c, s]), C(() => {
30
+ }), [s, c]), C(() => {
31
31
  const e = (l) => {
32
- s && h.current && !h.current.contains(l.target) && o(!1);
32
+ c && v.current && !v.current.contains(l.target) && o(!1);
33
33
  };
34
34
  return document.addEventListener("mousedown", e), () => {
35
35
  document.removeEventListener("mousedown", e);
36
36
  };
37
- }, [s]);
37
+ }, [c]);
38
38
  const b = () => {
39
- if (s) {
39
+ if (c) {
40
40
  o(!1);
41
41
  return;
42
42
  }
43
- _(!0), setTimeout(() => {
44
- o(!1), _(!1), k(0);
43
+ x(!0), setTimeout(() => {
44
+ o(!1), x(!1), k(0);
45
45
  }, 350);
46
- }, x = (e) => {
47
- if (m(e), d.current) {
46
+ }, D = (e) => {
47
+ if (h(e), d.current) {
48
48
  d.current.value = e.value;
49
49
  const l = new Event("change", { bubbles: !0 });
50
50
  d.current.dispatchEvent(l);
51
51
  }
52
52
  b();
53
53
  };
54
- return s ? /* @__PURE__ */ t("div", { className: a.selectDrawer, children: [
55
- f && /* @__PURE__ */ n("label", { className: a.label, children: f }),
56
- /* @__PURE__ */ t("div", { className: a.desktopSelectContainer, ref: h, children: [
54
+ return c ? /* @__PURE__ */ t("div", { className: i.selectDrawer, children: [
55
+ m && /* @__PURE__ */ n("label", { className: i.label, children: m }),
56
+ /* @__PURE__ */ t("div", { className: i.desktopSelectContainer, ref: v, children: [
57
57
  /* @__PURE__ */ n(
58
58
  "select",
59
59
  {
60
60
  ref: d,
61
61
  value: r.value,
62
62
  onChange: (e) => {
63
- const l = i.find((v) => v.value === e.target.value);
64
- l && m(l), u && u(e);
63
+ const l = a.find((g) => g.value === e.target.value);
64
+ l && h(l), f && f(e);
65
65
  },
66
66
  style: { display: "none" },
67
- ...w,
68
- children: i.map((e) => e.hidden ? null : /* @__PURE__ */ n("option", { value: e.value, children: e.label }, e.value))
67
+ ..._,
68
+ children: a.map((e) => e.hidden ? null : /* @__PURE__ */ n("option", { value: e.value, children: e.label }, e.value))
69
69
  }
70
70
  ),
71
- /* @__PURE__ */ t("div", { className: a.desktopSelect, onClick: () => o(!c), children: [
71
+ /* @__PURE__ */ t("div", { className: i.desktopSelect, onClick: () => o(!s), children: [
72
72
  r.countryFlag && /* @__PURE__ */ n("div", { style: { fontSize: "22px" }, children: r.countryFlag }),
73
- r.image && /* @__PURE__ */ n(g, { src: r.image.src, width: 30, height: 30 }),
73
+ r.image && /* @__PURE__ */ n(w, { src: r.image.src, width: 30, height: 30 }),
74
+ r.icon && /* @__PURE__ */ n("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ n(u, { ...r.icon }) }),
74
75
  /* @__PURE__ */ t("span", { children: [
75
76
  r.label,
76
77
  r.countryPrefix && /* @__PURE__ */ n("span", { style: { marginLeft: "4px", opacity: 0.5 }, children: r.countryPrefix })
77
78
  ] }),
78
- /* @__PURE__ */ n("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ n(D, { name: "ArrowDown" }) })
79
+ /* @__PURE__ */ n("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ n(u, { name: "ArrowDown" }) })
79
80
  ] }),
80
- c && /* @__PURE__ */ n("div", { className: a.desktopDropdown, children: i.filter((e) => !e.hidden).map((e) => /* @__PURE__ */ t(
81
+ s && /* @__PURE__ */ n("div", { className: i.desktopDropdown, children: a.filter((e) => !e.hidden).map((e) => /* @__PURE__ */ t(
81
82
  "div",
82
83
  {
83
- className: a.desktopOption,
84
- onClick: () => x(e),
84
+ className: i.desktopOption,
85
+ onClick: () => D(e),
85
86
  children: [
86
87
  e.countryFlag && /* @__PURE__ */ n("div", { style: { fontSize: "22px" }, children: e.countryFlag }),
87
- e.image && /* @__PURE__ */ n(g, { src: e.image.src, width: 30, height: 30 }),
88
+ e.image && /* @__PURE__ */ n(w, { src: e.image.src, width: 30, height: 30 }),
89
+ e.icon && /* @__PURE__ */ n("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ n(u, { ...e.icon }) }),
88
90
  /* @__PURE__ */ t("span", { children: [
89
91
  e.label,
90
92
  e.countryPrefix && /* @__PURE__ */ n("span", { style: { marginLeft: "4px", opacity: 0.5 }, children: e.countryPrefix })
@@ -94,41 +96,42 @@ function Q({
94
96
  e.value
95
97
  )) })
96
98
  ] })
97
- ] }) : /* @__PURE__ */ t(E, { children: [
99
+ ] }) : /* @__PURE__ */ t(L, { children: [
98
100
  /* @__PURE__ */ n(
99
101
  "select",
100
102
  {
101
103
  ref: d,
102
104
  value: r.value,
103
105
  onChange: (e) => {
104
- const l = i.find((v) => v.value === e.target.value);
105
- l && m(l), u && u(e);
106
+ const l = a.find((g) => g.value === e.target.value);
107
+ l && h(l), f && f(e);
106
108
  },
107
109
  style: { display: "none" },
108
- ...w,
109
- children: i.map((e) => /* @__PURE__ */ n("option", { value: e.value, children: e.label }, e.value))
110
+ ..._,
111
+ children: a.map((e) => /* @__PURE__ */ n("option", { value: e.value, children: e.label }, e.value))
110
112
  }
111
113
  ),
112
- /* @__PURE__ */ t("div", { ref: F, className: a.selectDrawer, children: [
113
- f && /* @__PURE__ */ n("label", { className: a.label, children: f }),
114
- /* @__PURE__ */ t("div", { className: a.selected, onClick: () => o(!c), children: [
114
+ /* @__PURE__ */ t("div", { ref: R, className: i.selectDrawer, children: [
115
+ m && /* @__PURE__ */ n("label", { className: i.label, children: m }),
116
+ /* @__PURE__ */ t("div", { className: i.selected, onClick: () => o(!s), children: [
115
117
  r.countryFlag && /* @__PURE__ */ n("div", { style: { marginRight: "auto", fontSize: "22px" }, children: r.countryFlag }),
116
- r.image && /* @__PURE__ */ n(g, { src: r.image.src, width: 30, height: 30 }),
118
+ r.image && /* @__PURE__ */ n(w, { src: r.image.src, width: 30, height: 30 }),
119
+ r.icon && /* @__PURE__ */ n("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ n(u, { ...r.icon }) }),
117
120
  /* @__PURE__ */ n("span", { children: r.countryPrefix ? r.countryPrefix : r.label }),
118
- /* @__PURE__ */ n("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ n(D, { name: "ArrowDown" }) })
121
+ /* @__PURE__ */ n("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ n(u, { name: "ArrowDown" }) })
119
122
  ] })
120
123
  ] }),
121
124
  /* @__PURE__ */ n(
122
- R,
125
+ E,
123
126
  {
124
- isOpen: c,
127
+ isOpen: s,
125
128
  handleClose: b,
126
- dragPosition: L,
129
+ dragPosition: F,
127
130
  setDragPosition: k,
128
131
  isClosing: P,
129
132
  title: S,
130
- options: i,
131
- handleOptionClick: x,
133
+ options: a,
134
+ handleOptionClick: D,
132
135
  countries: N,
133
136
  zIndex: O
134
137
  }
@@ -1,4 +1,4 @@
1
- export type IconName = "Exclamation" | "Email" | "Password" | "ShowEye" | "HideEye" | "ArrowDown" | "Search" | "Masculino" | "Femenino" | "Height" | "Weight" | "Smoke" | "SmokeOff" | "Upload" | "Telefono" | "EmailFill" | "Whatsapp" | "Close" | "Lock" | "Envelope" | "CollapseMenu" | "ExpandMenu" | "Notification" | "Users" | "Pagos" | "Impagos" | "Configuracion" | "LockPassword" | "Logout" | "AddCard" | "Add" | "Help" | "Unsubscribe" | "CheckCircle" | "Disable" | "Edit" | "Delete" | "Save" | "Eye" | "Mail" | "Resend" | "Reset" | "SwapVertical" | "Clip" | "Send" | "Trash" | "ReInit" | "CircleDolar" | "Sort" | "Pencil" | "Check" | "LogoBMI+" | "ArrowLeft" | "ArrowRight" | "AddDocument" | "Family" | "User" | "Carnet" | "Savings" | "History" | "Docs" | "Filters" | "DownloadDoc" | "Biometric" | "Aetna" | "BMI" | "CircleDenied" | "ArrowForwardBtn" | "Share" | "Gallery" | "Camera" | "Sthetoscope" | "Shield" | "LogoBMIHorizontal" | "LogoBMIVertical" | "Profesional" | "BusquedaCiudad" | "Medico" | "Laboratorio" | "CercaDeMi" | "CuadroMedico" | "Celular" | "Headset" | "Internet" | "Calendar" | "Autorizaciones" | "Warning" | "Person" | "StepInProgress" | "StepPending" | "StepDone" | "IconoVida" | "IconoSalud";
1
+ export type IconName = "Exclamation" | "Email" | "Password" | "ShowEye" | "HideEye" | "ArrowDown" | "Search" | "Masculino" | "Femenino" | "Height" | "Weight" | "Smoke" | "SmokeOff" | "Upload" | "Telefono" | "EmailFill" | "Whatsapp" | "Close" | "Lock" | "Envelope" | "CollapseMenu" | "ExpandMenu" | "Notification" | "Users" | "Pagos" | "Impagos" | "Configuracion" | "LockPassword" | "Logout" | "AddCard" | "Add" | "Help" | "Unsubscribe" | "CheckCircle" | "Disable" | "Edit" | "Delete" | "Save" | "Eye" | "Mail" | "Resend" | "Reset" | "SwapVertical" | "Clip" | "Send" | "Trash" | "ReInit" | "CircleDolar" | "Sort" | "Pencil" | "Check" | "LogoBMI+" | "ArrowLeft" | "ArrowRight" | "AddDocument" | "Family" | "User" | "Carnet" | "Savings" | "History" | "Docs" | "Filters" | "DownloadDoc" | "Biometric" | "Aetna" | "BMI" | "CircleDenied" | "ArrowForwardBtn" | "Share" | "Gallery" | "Camera" | "Sthetoscope" | "Shield" | "LogoBMIHorizontal" | "LogoBMIVertical" | "Profesional" | "BusquedaCiudad" | "Medico" | "Laboratorio" | "CercaDeMi" | "CuadroMedico" | "Celular" | "Headset" | "Internet" | "Calendar" | "Autorizaciones" | "Warning" | "Person" | "StepInProgress" | "StepPending" | "StepDone" | "IconoVida" | "IconoSalud" | "USD" | "GT" | "EUR" | "DO" | "CR" | "CO";
2
2
  interface IconProps {
3
3
  width?: number;
4
4
  height?: number;
@@ -101,4 +101,10 @@ export declare const StepInProgress: React.FC<IconProps>;
101
101
  export declare const StepPending: React.FC<IconProps>;
102
102
  export declare const IconoVida: React.FC<IconProps>;
103
103
  export declare const IconoSalud: React.FC<IconProps>;
104
+ export declare const USD: React.FC<IconProps>;
105
+ export declare const GT: React.FC<IconProps>;
106
+ export declare const EUR: React.FC<IconProps>;
107
+ export declare const DO: React.FC<IconProps>;
108
+ export declare const CR: React.FC<IconProps>;
109
+ export declare const CO: React.FC<IconProps>;
104
110
  export {};