bmi-next 1.0.45 → 1.0.47

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.
@@ -12,7 +12,8 @@ interface DrawerPortalBaseProps {
12
12
  title?: string;
13
13
  children: ReactNode;
14
14
  modal?: boolean;
15
+ hideCloseButon?: boolean;
15
16
  styles?: CSSProperties;
16
17
  }
17
- export declare const DrawerPortalBase: ({ isOpen, handleClose, dragPosition, setDragPosition, isClosing, title, children, modal, styles: customStyles, }: DrawerPortalBaseProps) => import('react').ReactPortal | null;
18
+ export declare const DrawerPortalBase: ({ isOpen, handleClose, dragPosition, setDragPosition, isClosing, title, children, modal, hideCloseButon, styles: customStyles, }: DrawerPortalBaseProps) => import('react').ReactPortal | null;
18
19
  export {};
@@ -1,71 +1,72 @@
1
- import { jsxs as m, Fragment as E, jsx as r } from "react/jsx-runtime";
2
- import { useRef as p } from "react";
3
- import { r as g } from "../../../index-Cp_B-Y3h.js";
4
- import { Icon as Y } from "../../../icons/icons.js";
5
- import '../../../assets/index6.css';const L = "_overlay_1anip_1", B = "_closing_1anip_12", I = "_bottomDrawer_1anip_36", N = "_drawerHeader_1anip_76", b = "_drawerIndicator_1anip_89", x = "_drawerContent_1anip_100", $ = "_closeButton_1anip_116", C = "_modalDrawer_1anip_129", e = {
6
- overlay: L,
7
- closing: B,
8
- bottomDrawer: I,
9
- drawerHeader: N,
10
- drawerIndicator: b,
11
- drawerContent: x,
12
- closeButton: $,
13
- modalDrawer: C
14
- }, M = ({
15
- isOpen: h,
1
+ import { jsxs as l, Fragment as p, jsx as t } from "react/jsx-runtime";
2
+ import { useRef as h } from "react";
3
+ import { r as Y } from "../../../index-Cp_B-Y3h.js";
4
+ import { Icon as L } from "../../../icons/icons.js";
5
+ import '../../../assets/index6.css';const B = "_overlay_1anip_1", I = "_closing_1anip_12", N = "_bottomDrawer_1anip_36", b = "_drawerHeader_1anip_76", x = "_drawerIndicator_1anip_89", $ = "_drawerContent_1anip_100", C = "_closeButton_1anip_116", H = "_modalDrawer_1anip_129", e = {
6
+ overlay: B,
7
+ closing: I,
8
+ bottomDrawer: N,
9
+ drawerHeader: b,
10
+ drawerIndicator: x,
11
+ drawerContent: $,
12
+ closeButton: C,
13
+ modalDrawer: H
14
+ }, F = ({
15
+ isOpen: D,
16
16
  handleClose: s,
17
- dragPosition: D,
18
- setDragPosition: l,
17
+ dragPosition: f,
18
+ setDragPosition: m,
19
19
  isClosing: u,
20
20
  title: v,
21
- children: f,
21
+ children: y,
22
22
  modal: o,
23
- styles: y
23
+ hideCloseButon: E = !1,
24
+ styles: g
24
25
  }) => {
25
- const d = p(0), i = p(0);
26
- if (!h) return null;
27
- const _ = (t) => {
26
+ const d = h(0), i = h(0);
27
+ if (!D) return null;
28
+ const _ = (r) => {
28
29
  if (o) return;
29
- const n = "touches" in t ? t.touches[0].clientY : t.clientY;
30
+ const n = "touches" in r ? r.touches[0].clientY : r.clientY;
30
31
  d.current = n, i.current = n, document.addEventListener("mousemove", c), document.addEventListener("touchmove", c), document.addEventListener("mouseup", a), document.addEventListener("touchend", a);
31
32
  }, a = () => {
32
- document.removeEventListener("mousemove", c), document.removeEventListener("touchmove", c), document.removeEventListener("mouseup", a), document.removeEventListener("touchend", a), i.current - d.current > 100 ? s() : l(0);
33
- }, c = (t) => {
34
- const n = "touches" in t ? t.touches[0].clientY : t.clientY, w = n - d.current;
35
- i.current = n, w > 0 && l(w);
33
+ document.removeEventListener("mousemove", c), document.removeEventListener("touchmove", c), document.removeEventListener("mouseup", a), document.removeEventListener("touchend", a), i.current - d.current > 100 ? s() : m(0);
34
+ }, c = (r) => {
35
+ const n = "touches" in r ? r.touches[0].clientY : r.clientY, w = n - d.current;
36
+ i.current = n, w > 0 && m(w);
36
37
  };
37
- return g.createPortal(
38
- /* @__PURE__ */ m(E, { children: [
39
- /* @__PURE__ */ r(
38
+ return Y.createPortal(
39
+ /* @__PURE__ */ l(p, { children: [
40
+ /* @__PURE__ */ t(
40
41
  "div",
41
42
  {
42
43
  className: `${e.overlay} ${u ? e.closing : ""}`,
43
44
  onClick: s
44
45
  }
45
46
  ),
46
- /* @__PURE__ */ m(
47
+ /* @__PURE__ */ l(
47
48
  "div",
48
49
  {
49
50
  className: `${o ? e.modalDrawer : e.bottomDrawer} ${u ? e.closing : ""}`,
50
51
  style: {
51
- transform: o ? void 0 : `translateY(${D}px)`,
52
- ...y
52
+ transform: o ? void 0 : `translateY(${f}px)`,
53
+ ...g
53
54
  },
54
55
  children: [
55
- /* @__PURE__ */ m(
56
+ !E && /* @__PURE__ */ t(p, { children: /* @__PURE__ */ l(
56
57
  "header",
57
58
  {
58
59
  className: e.drawerHeader,
59
60
  onMouseDown: _,
60
61
  onTouchStart: _,
61
62
  children: [
62
- !o && /* @__PURE__ */ r("div", { className: e.drawerIndicator }),
63
- /* @__PURE__ */ r("div", { className: e.closeButton, onClick: s, children: /* @__PURE__ */ r(Y, { name: "Close", fill: "#030c2466" }) }),
64
- v && /* @__PURE__ */ r("p", { children: v })
63
+ !o && /* @__PURE__ */ t("div", { className: e.drawerIndicator }),
64
+ /* @__PURE__ */ t("div", { className: e.closeButton, onClick: s, children: /* @__PURE__ */ t(L, { name: "Close", fill: "#030c2466" }) }),
65
+ v && /* @__PURE__ */ t("p", { children: v })
65
66
  ]
66
67
  }
67
- ),
68
- /* @__PURE__ */ r("div", { className: e.drawerContent, children: f })
68
+ ) }),
69
+ /* @__PURE__ */ t("div", { className: e.drawerContent, children: y })
69
70
  ]
70
71
  }
71
72
  )
@@ -74,5 +75,5 @@ import '../../../assets/index6.css';const L = "_overlay_1anip_1", B = "_closing_
74
75
  );
75
76
  };
76
77
  export {
77
- M as DrawerPortalBase
78
+ F as DrawerPortalBase
78
79
  };
@@ -14,6 +14,8 @@ export interface DrawerProps {
14
14
  children: ReactNode;
15
15
  /** Si es true, el drawer se muestra como un modal centrado */
16
16
  modal?: boolean;
17
+ /** Si es true, oculta el botón de cierre en la esquina superior derecha */
18
+ hideCloseButton?: boolean;
17
19
  /** Estilos personalizados para el drawer */
18
20
  style?: CSSProperties;
19
21
  }
@@ -40,4 +42,4 @@ export interface DrawerProps {
40
42
  * - Previene el desplazamiento del fondo cuando está abierto
41
43
  * - Animaciones suaves de entrada y salida
42
44
  */
43
- export declare function Drawer({ isOpen, onClose, title, children, modal, style }: DrawerProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function Drawer({ isOpen, onClose, title, children, modal, hideCloseButton, style }: DrawerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { useState as s, useEffect as u } from "react";
3
- import { DrawerPortalBase as c } from "./DrawerPortalBase/index.js";
4
- function C({ isOpen: o, onClose: r, title: l, children: n, modal: i, style: d }) {
5
- const [f, e] = s(!1), [a, t] = s(0);
6
- return u(() => (o ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
2
+ import { useState as s, useEffect as c } from "react";
3
+ import { DrawerPortalBase as y } from "./DrawerPortalBase/index.js";
4
+ function v({ isOpen: o, onClose: r, title: l, children: n, modal: i, hideCloseButton: d, style: f }) {
5
+ const [a, e] = s(!1), [u, t] = s(0);
6
+ return c(() => (o ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
7
7
  document.body.style.overflow = "";
8
8
  }), [o]), /* @__PURE__ */ m(
9
- c,
9
+ y,
10
10
  {
11
11
  isOpen: o,
12
12
  handleClose: () => {
@@ -14,16 +14,17 @@ function C({ isOpen: o, onClose: r, title: l, children: n, modal: i, style: d })
14
14
  r(), e(!1), t(0);
15
15
  }, 350);
16
16
  },
17
- dragPosition: a,
17
+ dragPosition: u,
18
18
  setDragPosition: t,
19
- isClosing: f,
19
+ isClosing: a,
20
20
  title: l || void 0,
21
21
  modal: i,
22
- styles: d,
22
+ hideCloseButon: d,
23
+ styles: f,
23
24
  children: n
24
25
  }
25
26
  );
26
27
  }
27
28
  export {
28
- C as Drawer
29
+ v as Drawer
29
30
  };
@@ -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";
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";
2
2
  interface IconProps {
3
3
  width?: number;
4
4
  height?: number;
@@ -94,4 +94,5 @@ export declare const Headset: React.FC<IconProps>;
94
94
  export declare const Internet: React.FC<IconProps>;
95
95
  export declare const Calendar: React.FC<IconProps>;
96
96
  export declare const Autorizaciones: React.FC<IconProps>;
97
+ export declare const Warning: React.FC<IconProps>;
97
98
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- const j1 = ({
2
+ const E1 = ({
3
3
  name: s,
4
4
  width: e,
5
5
  height: c,
@@ -176,6 +176,8 @@ const j1 = ({
176
176
  return /* @__PURE__ */ a(T1, { width: e, height: c, fill: n });
177
177
  case "Autorizaciones":
178
178
  return /* @__PURE__ */ a(b1, { width: e, height: c, fill: n });
179
+ case "Warning":
180
+ return /* @__PURE__ */ a(q1, { width: e, height: c, fill: n });
179
181
  default:
180
182
  return null;
181
183
  }
@@ -1522,7 +1524,7 @@ const j1 = ({
1522
1524
  ) })
1523
1525
  ]
1524
1526
  }
1525
- ), E1 = ({
1527
+ ), P1 = ({
1526
1528
  width: s = 20,
1527
1529
  height: e = 20,
1528
1530
  fill: c = "#749CFF"
@@ -2745,6 +2747,13 @@ const j1 = ({
2745
2747
  }) => /* @__PURE__ */ r("svg", { width: s, height: e, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2746
2748
  /* @__PURE__ */ a("mask", { id: "1yzgzagfta", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "32", height: "32", children: /* @__PURE__ */ a("path", { fill: "#D9D9D9", d: "M0 0h32v32H0z" }) }),
2747
2749
  /* @__PURE__ */ a("g", { mask: "url(#1yzgzagfta)", children: /* @__PURE__ */ a("path", { d: "m14.5 20.656-2.49-2.49a1.093 1.093 0 0 0-.341-.233.976.976 0 0 0-.775.006c-.13.056-.246.139-.35.25a1.038 1.038 0 0 0-.31.753c0 .29.103.54.31.747l3.19 3.2c.118.119.24.202.369.25.128.048.265.072.41.072.147 0 .283-.024.41-.072.125-.048.247-.131.366-.25l6.078-6.078c.207-.209.31-.46.31-.756s-.104-.548-.312-.755a1.032 1.032 0 0 0-.755-.31c-.296 0-.547.103-.754.31L14.5 20.656zm-6.944 8.677c-.6 0-1.12-.22-1.562-.66-.44-.441-.66-.962-.66-1.562V4.89c0-.6.22-1.12.66-1.561.441-.44.962-.661 1.562-.661H18.21c.303 0 .592.059.866.177.275.12.512.278.712.478l6.222 6.222a2.266 2.266 0 0 1 .656 1.578v15.99c0 .6-.22 1.12-.661 1.56-.441.441-.962.661-1.562.661H7.556zm10.466-19.2V4.89H7.556v22.222h16.888V11.244h-5.31c-.316 0-.58-.106-.792-.319a1.075 1.075 0 0 1-.32-.792z", fill: c }) })
2750
+ ] }), q1 = ({
2751
+ width: s = 19,
2752
+ height: e = 19,
2753
+ fill: c = "#CA8A04"
2754
+ }) => /* @__PURE__ */ r("svg", { width: s, height: e, viewBox: "0 0 19 19", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2755
+ /* @__PURE__ */ a("mask", { id: "s4x9j60iga", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "19", height: "19", children: /* @__PURE__ */ a("path", { fill: "#D9D9D9", d: "M0 0h19v19H0z" }) }),
2756
+ /* @__PURE__ */ a("g", { mask: "url(#s4x9j60iga)", children: /* @__PURE__ */ a("path", { d: "M2.267 16.23a.805.805 0 0 1-.726-.413.699.699 0 0 1-.104-.409.973.973 0 0 1 .123-.432L8.792 2.91a.672.672 0 0 1 .308-.297.933.933 0 0 1 .8 0c.13.06.233.16.308.297l7.231 12.067a.973.973 0 0 1 .123.432.7.7 0 0 1-.103.41.934.934 0 0 1-.295.297.788.788 0 0 1-.431.115H2.267zm1.315-1.571h11.836L9.5 4.803 3.582 14.66zm5.914-.898a.72.72 0 0 0 .523-.213.699.699 0 0 0 .217-.52.712.712 0 0 0-.213-.52.703.703 0 0 0-.519-.215.724.724 0 0 0-.523.21.692.692 0 0 0-.217.517.72.72 0 0 0 .213.523.7.7 0 0 0 .519.218zm0-2.361c.2 0 .37-.068.508-.205a.684.684 0 0 0 .208-.508V8.364a.691.691 0 0 0-.203-.507.683.683 0 0 0-.505-.205c-.2 0-.37.068-.509.205a.684.684 0 0 0-.208.507v2.323c0 .202.068.372.204.508a.683.683 0 0 0 .505.205z", fill: c }) })
2748
2757
  ] });
2749
2758
  export {
2750
2759
  K as Add,
@@ -2793,7 +2802,7 @@ export {
2793
2802
  b as Help,
2794
2803
  o as HideEye,
2795
2804
  o1 as History,
2796
- j1 as Icon,
2805
+ E1 as Icon,
2797
2806
  B as Impagos,
2798
2807
  O1 as Internet,
2799
2808
  f1 as Laboratorio,
@@ -2825,13 +2834,14 @@ export {
2825
2834
  g as SmokeOff,
2826
2835
  $ as Sort,
2827
2836
  y1 as Sthetoscope,
2828
- E1 as SwapVertical,
2837
+ P1 as SwapVertical,
2829
2838
  x as Telefono,
2830
2839
  Y as Trash,
2831
2840
  q as Unsubscribe,
2832
2841
  k as Upload,
2833
2842
  h1 as User,
2834
2843
  U as Users,
2844
+ q1 as Warning,
2835
2845
  w as Weight,
2836
2846
  y as Whatsapp
2837
2847
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bmi-next",
3
3
  "description": "Componentes de UI para proyecto BMI Next",
4
- "version": "1.0.45",
4
+ "version": "1.0.47",
5
5
  "author": "David Fernández Bolaños <david@bmiahorro.com>",
6
6
  "contributors": [
7
7
  "Jorge Martín <jorge@bmiahorro.com>",