bmi-next-brokers 2.1.8 → 2.2.0

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 +1 @@
1
- ._overlay_1uxrl_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;display:flex;justify-content:center;align-items:center;z-index:2000;animation:_fadeIn_1uxrl_1 .25s ease-in-out;overflow:hidden}._overlay_1uxrl_1._closing_1uxrl_16{animation:_fadeOut_1uxrl_1 .25s ease-in-out forwards}._nav_1uxrl_20{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%;gap:10px;margin-block:16px;color:#2054a5}._arrowBack_1uxrl_31{cursor:pointer}._title_1uxrl_35{font-family:Poppins Medium;font-size:16px;font-weight:600;line-height:normal}._content_1uxrl_42{width:100%;display:flex;flex-direction:column;padding-bottom:calc(env(safe-area-inset-bottom) + 16px);background-color:#fff;padding-inline:16px}._mainContent_1uxrl_51{display:flex;height:100%;width:100%;animation:_slideIn_1uxrl_1 .45s cubic-bezier(.4,0,.2,1) forwards;transform:translate(0)}._closing_1uxrl_16{animation:_slideOut_1uxrl_1 .45s cubic-bezier(.4,0,.2,1) forwards}._contentInner_1uxrl_63{display:flex;flex-direction:column;align-items:center;box-sizing:border-box;overflow-y:auto;overscroll-behavior:none;flex:1}._contentInner_1uxrl_63::-webkit-scrollbar{display:none}@keyframes _fadeIn_1uxrl_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_1uxrl_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_1uxrl_1{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes _slideOut_1uxrl_1{0%{transform:translate(0)}to{transform:translate(-100%)}}
1
+ ._overlay_15ved_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;display:flex;justify-content:center;align-items:center;z-index:2000;animation:_fadeIn_15ved_1 .25s ease-in-out;overflow:hidden}._overlay_15ved_1._closing_15ved_16{animation:_fadeOut_15ved_1 .25s ease-in-out forwards}._nav_15ved_20{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%;gap:10px;margin-block:16px;color:#2054a5;padding-inline:16px}._arrowBack_15ved_32{cursor:pointer}._title_15ved_36{font-family:Poppins Medium;font-size:16px;font-weight:600;line-height:normal}._content_15ved_43{width:100%;display:flex;flex-direction:column;padding-bottom:calc(env(safe-area-inset-bottom) + 16px);background-color:#fff}._mainContent_15ved_51{display:flex;height:100%;width:100%;animation:_slideIn_15ved_1 .45s cubic-bezier(.4,0,.2,1) forwards;transform:translate(0)}._closing_15ved_16{animation:_slideOut_15ved_1 .45s cubic-bezier(.4,0,.2,1) forwards}._contentInner_15ved_63{display:flex;flex-direction:column;align-items:center;box-sizing:border-box;overflow-y:auto;overscroll-behavior:none;flex:1;padding-inline:16px}._contentInner_15ved_63::-webkit-scrollbar{display:none}@keyframes _fadeIn_15ved_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_15ved_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_15ved_1{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes _slideOut_15ved_1{0%{transform:translate(0)}to{transform:translate(-100%)}}
@@ -1 +1 @@
1
- ._stepsContainer_ma11p_1{display:flex;flex-direction:column;align-items:center}._stepWrapper_ma11p_7{display:flex;justify-content:center;align-items:center;width:100%}._step_ma11p_1{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px}._iconLine_ma11p_24{display:flex;justify-content:center;align-items:center;width:100%;gap:4px}._stepSeparator_ma11p_32{flex:1;height:4px;background:#2054a5}._stepSeparatorPending_ma11p_37{opacity:.3;background:#2054a5}._textWrapper_ma11p_42{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-right:4px;width:100%;box-sizing:border-box;transition:all .3s ease}._stepTitle_ma11p_53,._stepState_ma11p_54{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:Poppins Regular}._start_ma11p_62{text-align:start}._middle_ma11p_66{text-align:center}._end_ma11p_70{text-align:end}._stepTitle_ma11p_53{color:#000;font-size:16px;line-height:19.2px}._stepTitle_ma11p_53._stepInProgress_ma11p_80{font-family:Poppins Medium}._stepState_ma11p_54{color:#000;font-size:13px;line-height:15.6px}._stepTitle_ma11p_53._stepPending_ma11p_90{color:#cbd5e1}._stepState_ma11p_54._stepPending_ma11p_90{color:#e2e8f0}._stepState_ma11p_54._stepCompleted_ma11p_98{color:#65a30d}._stepState_ma11p_54._stepInProgress_ma11p_80,._stepState_ma11p_54._stepBlocked_ma11p_103{color:#2054a5}._iconDiv_ma11p_107{display:flex;justify-content:center;align-items:center;flex-shrink:0;aspect-ratio:1/1}._iconDiv_ma11p_107 svg{width:30px;height:30px}@media (max-width: 697px){._responsive_ma11p_121 ._textWrapper_ma11p_42{display:none}}@media (max-width: 1280px){._responsive_ma11p_121 ._iconDiv_ma11p_107 svg{width:22px;height:22px}}@media (max-width: 1280px){._responsive_ma11p_121 ._stepSeparator_ma11p_32{height:2px}._responsive_ma11p_121 ._stepTitle_ma11p_53{font-size:12px;line-height:14.4px}._responsive_ma11p_121 ._stepState_ma11p_54{font-size:11px;line-height:13.2px}}
1
+ ._stepsContainer_145x1_1{display:flex;flex-direction:column;align-items:center;width:100%}._stepWrapper_145x1_8{display:flex;justify-content:center;align-items:center;width:100%}._step_145x1_1{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px}._iconLine_145x1_25{display:flex;justify-content:center;align-items:center;width:100%;gap:4px}._stepSeparator_145x1_33{flex:1;height:4px;background:#2054a5}._stepSeparatorPending_145x1_38{opacity:.3;background:#2054a5}._textWrapper_145x1_43{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-right:4px;width:100%;box-sizing:border-box;transition:all .3s ease}._stepTitle_145x1_54,._stepState_145x1_55{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:Poppins Regular}._start_145x1_63{text-align:start}._middle_145x1_67{text-align:center}._end_145x1_71{text-align:end}._stepTitle_145x1_54{color:#000;font-size:16px;line-height:19.2px}._stepTitle_145x1_54._stepInProgress_145x1_81{font-family:Poppins Medium}._stepState_145x1_55{color:#000;font-size:13px;line-height:15.6px}._stepTitle_145x1_54._stepPending_145x1_91{color:#cbd5e1}._stepState_145x1_55._stepPending_145x1_91{color:#e2e8f0}._stepState_145x1_55._stepCompleted_145x1_99{color:#65a30d}._stepState_145x1_55._stepInProgress_145x1_81,._stepState_145x1_55._stepBlocked_145x1_104{color:#2054a5}._iconDiv_145x1_108{display:flex;justify-content:center;align-items:center;flex-shrink:0;aspect-ratio:1/1}._iconDiv_145x1_108 svg{width:30px;height:30px}@media (max-width: 697px){._responsive_145x1_122 ._textWrapper_145x1_43{display:none}}@media (max-width: 1280px){._responsive_145x1_122 ._iconDiv_145x1_108 svg{width:22px;height:22px}}@media (max-width: 1280px){._responsive_145x1_122 ._stepSeparator_145x1_33{height:2px}._responsive_145x1_122 ._stepTitle_145x1_54{font-size:12px;line-height:14.4px}._responsive_145x1_122 ._stepState_145x1_55{font-size:11px;line-height:13.2px}}
@@ -8,6 +8,7 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
8
8
  withAutoClose?: boolean;
9
9
  onBack?: (() => Promise<void> | void) | false;
10
10
  navIcon?: IconName;
11
+ navClassName?: string;
11
12
  }
12
13
  /**
13
14
  * Componente Sheet que renderiza un contenedor modal mediante un portal,
@@ -22,6 +23,7 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
22
23
  * @param onBack - Callback opcional al pulsar el icono del nav. Si se pasa `false`, no se renderiza el icono del nav.
23
24
  * @param withAutoClose Cerrar el sheet de manera automática (booleano -> por defecto false).
24
25
  * @param navIcon Icono de la barra de navegación del sheet.
26
+ * @param navClassName Clases CSS adicionales para personalizar el contenedor de navegación.
25
27
  * @param children Contenido que se renderiza dentro del Sheet.
26
28
  * @param className Clases CSS adicionales para personalizar el contenedor interno.
27
29
  * @param props Props HTML adicionales que se aplican al contenedor principal.
@@ -61,6 +63,8 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
61
63
  * isOpen={isOpen}
62
64
  * setIsOpen={setIsOpen}
63
65
  * title="Título del sheet"
66
+ * navClassName={{backgroundColor: "red"}}
67
+ * style={{paddingInline: "13px"}}
64
68
  * withAutoClose={false}
65
69
  * navIcon="Close" >
66
70
  *
@@ -74,4 +78,4 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
74
78
  * }
75
79
  * ```
76
80
  */
77
- export declare const Sheet: ({ isOpen, setIsOpen, title, children, className, withAutoClose, onBack, navIcon, ...props }: SheetProps) => import('react').ReactPortal | null;
81
+ export declare const Sheet: ({ isOpen, setIsOpen, title, children, navClassName, className, withAutoClose, onBack, navIcon, ...props }: SheetProps) => import('react').ReactPortal | null;
@@ -1,63 +1,64 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { useState as x } from "react";
3
- import { CloseContext as C } from "../../hooks/useClose.js";
4
- import { useScrollLock as h } from "../../hooks/useScrollLock.js";
5
- import { useCloseOnBack as p } from "../../hooks/useCloseOnBack.js";
6
- import { Icon as y } from "../../icons/Icon.js";
7
- import { r as g } from "../../index-CGDUIzcq.js";
8
- import '../../assets/index13.css';const I = "_overlay_1uxrl_1", N = "_closing_1uxrl_16", k = "_nav_1uxrl_20", w = "_arrowBack_1uxrl_31", $ = "_title_1uxrl_35", B = "_content_1uxrl_42", S = "_mainContent_1uxrl_51", j = "_contentInner_1uxrl_63", n = {
9
- overlay: I,
10
- closing: N,
11
- nav: k,
12
- arrowBack: w,
13
- title: $,
14
- content: B,
15
- mainContent: S,
16
- contentInner: j
17
- }, T = ({
1
+ import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
+ import { useState as h } from "react";
3
+ import { CloseContext as p } from "../../hooks/useClose.js";
4
+ import { useScrollLock as y } from "../../hooks/useScrollLock.js";
5
+ import { useCloseOnBack as g } from "../../hooks/useCloseOnBack.js";
6
+ import { Icon as I } from "../../icons/Icon.js";
7
+ import { r as N } from "../../index-CGDUIzcq.js";
8
+ import '../../assets/index13.css';const $ = "_overlay_15ved_1", k = "_closing_15ved_16", w = "_nav_15ved_20", x = "_arrowBack_15ved_32", B = "_title_15ved_36", S = "_content_15ved_43", j = "_mainContent_15ved_51", E = "_contentInner_15ved_63", e = {
9
+ overlay: $,
10
+ closing: k,
11
+ nav: w,
12
+ arrowBack: x,
13
+ title: B,
14
+ content: S,
15
+ mainContent: j,
16
+ contentInner: E
17
+ }, q = ({
18
18
  isOpen: o,
19
19
  setIsOpen: i,
20
20
  title: m,
21
- children: _,
22
- className: u,
23
- withAutoClose: d = !0,
24
- onBack: e,
25
- navIcon: f = "ArrowBackIosNew",
26
- ...v
21
+ children: d,
22
+ navClassName: _,
23
+ className: v,
24
+ withAutoClose: f = !0,
25
+ onBack: t,
26
+ navIcon: u = "ArrowBackIosNew",
27
+ ...C
27
28
  }) => {
28
- const [r, s] = x(!1);
29
- h(o);
30
- const l = () => {
31
- d && (s(!0), setTimeout(() => {
32
- i(!1), s(!1);
29
+ const [s, r] = h(!1);
30
+ y(o);
31
+ const c = () => {
32
+ f && (r(!0), setTimeout(() => {
33
+ i(!1), r(!1);
33
34
  }, 450));
34
- }, c = async () => {
35
- e !== !1 && (typeof e == "function" && await e(), l());
35
+ }, a = async () => {
36
+ t !== !1 && (typeof t == "function" && await t(), c());
36
37
  };
37
- return p({ isOpen: o, onClose: c }), o ? g.createPortal(
38
- /* @__PURE__ */ t("div", { className: `${n.overlay} ${r ? n.closing : ""}`, children: /* @__PURE__ */ t(
38
+ return g({ isOpen: o, onClose: a }), o ? N.createPortal(
39
+ /* @__PURE__ */ n("div", { className: `${e.overlay} ${s ? e.closing : ""}`, children: /* @__PURE__ */ n(
39
40
  "div",
40
41
  {
41
- className: `${n.mainContent} ${r ? n.closing : ""}`,
42
- children: /* @__PURE__ */ a("div", { className: n.content, children: [
43
- /* @__PURE__ */ a("div", { className: n.nav, children: [
44
- e !== !1 && /* @__PURE__ */ t(
45
- y,
42
+ className: `${e.mainContent} ${s ? e.closing : ""}`,
43
+ children: /* @__PURE__ */ l("div", { className: e.content, children: [
44
+ /* @__PURE__ */ l("div", { className: `${e.nav} ${_ || ""}`, children: [
45
+ t !== !1 && /* @__PURE__ */ n(
46
+ I,
46
47
  {
47
- name: f,
48
+ name: u,
48
49
  size: 24,
49
- className: n.arrowBack,
50
- onClick: c
50
+ className: e.arrowBack,
51
+ onClick: a
51
52
  }
52
53
  ),
53
- /* @__PURE__ */ t("span", { className: n.title, children: m })
54
+ /* @__PURE__ */ n("span", { className: e.title, children: m })
54
55
  ] }),
55
- /* @__PURE__ */ t(
56
+ /* @__PURE__ */ n(
56
57
  "div",
57
58
  {
58
- className: `${n.contentInner} ${u || ""}`,
59
- ...v,
60
- children: /* @__PURE__ */ t(C.Provider, { value: l, children: _ })
59
+ className: `${e.contentInner} ${v || ""}`,
60
+ ...C,
61
+ children: /* @__PURE__ */ n(p.Provider, { value: c, children: d })
61
62
  }
62
63
  )
63
64
  ] })
@@ -67,5 +68,5 @@ import '../../assets/index13.css';const I = "_overlay_1uxrl_1", N = "_closing_1u
67
68
  ) : null;
68
69
  };
69
70
  export {
70
- T as Sheet
71
+ q as Sheet
71
72
  };
@@ -1,15 +1,15 @@
1
- import { jsx as a, jsxs as _ } from "react/jsx-runtime";
2
- import { Icon as m } from "../../icons/Icon.js";
3
- import '../../assets/index4.css';const g = "_stepsContainer_ma11p_1", P = "_stepWrapper_ma11p_7", f = "_step_ma11p_1", v = "_iconLine_ma11p_24", h = "_stepSeparator_ma11p_32", $ = "_stepSeparatorPending_ma11p_37", C = "_textWrapper_ma11p_42", N = "_stepTitle_ma11p_53", S = "_stepState_ma11p_54", u = "_start_ma11p_62", T = "_middle_ma11p_66", W = "_end_ma11p_70", B = "_stepInProgress_ma11p_80", D = "_stepPending_ma11p_90", b = "_stepCompleted_ma11p_98", k = "_stepBlocked_ma11p_103", L = "_iconDiv_ma11p_107", I = "_responsive_ma11p_121", s = {
4
- stepsContainer: g,
5
- stepWrapper: P,
6
- step: f,
7
- iconLine: v,
8
- stepSeparator: h,
9
- stepSeparatorPending: $,
1
+ import { jsx as n, jsxs as _ } from "react/jsx-runtime";
2
+ import { Icon as g } from "../../icons/Icon.js";
3
+ import '../../assets/index4.css';const P = "_stepsContainer_145x1_1", f = "_stepWrapper_145x1_8", v = "_step_145x1_1", x = "_iconLine_145x1_25", $ = "_stepSeparator_145x1_33", h = "_stepSeparatorPending_145x1_38", C = "_textWrapper_145x1_43", S = "_stepTitle_145x1_54", N = "_stepState_145x1_55", u = "_start_145x1_63", T = "_middle_145x1_67", W = "_end_145x1_71", B = "_stepInProgress_145x1_81", D = "_stepPending_145x1_91", b = "_stepCompleted_145x1_99", k = "_stepBlocked_145x1_104", L = "_iconDiv_145x1_108", I = "_responsive_145x1_122", s = {
4
+ stepsContainer: P,
5
+ stepWrapper: f,
6
+ step: v,
7
+ iconLine: x,
8
+ stepSeparator: $,
9
+ stepSeparatorPending: h,
10
10
  textWrapper: C,
11
- stepTitle: N,
12
- stepState: S,
11
+ stepTitle: S,
12
+ stepState: N,
13
13
  start: u,
14
14
  middle: T,
15
15
  end: W,
@@ -19,45 +19,46 @@ import '../../assets/index4.css';const g = "_stepsContainer_ma11p_1", P = "_step
19
19
  stepBlocked: k,
20
20
  iconDiv: L,
21
21
  responsive: I
22
- }, j = (e, t, n) => n && e + 1 < t ? "StepBlocked" : e + 1 < t ? "StepDone" : e + 1 === t ? "StepInProgress" : "StepPending", y = (e, t, n) => n && e + 1 < t ? s.stepBlocked : e + 1 < t ? s.stepCompleted : e + 1 === t ? s.stepInProgress : s.stepPending, E = (e, t, n, o) => o && e + 1 < t ? "No aplica" : t > n || e + 1 < t ? "Completado" : e + 1 === t ? "En Proceso" : "Pendiente", q = (e, t) => e === 0 ? "start" : e === t - 1 ? "end" : "middle", A = ({
22
+ }, j = (e, t, r) => r && e + 1 < t ? "StepBlocked" : e + 1 < t ? "StepDone" : e + 1 === t ? "StepInProgress" : "StepPending", y = (e, t, r) => r && e + 1 < t ? s.stepBlocked : e + 1 < t ? s.stepCompleted : e + 1 === t ? s.stepInProgress : s.stepPending, E = (e, t, r, i) => i && e + 1 < t ? "No aplica" : t > r || e + 1 < t ? "Completado" : e + 1 === t ? "En Proceso" : "Pendiente", q = (e, t) => e === 0 ? "start" : e === t - 1 ? "end" : "middle", A = ({
23
23
  steps: e,
24
24
  currentStep: t,
25
- responsive: n = !1,
26
- ...o
27
- }) => e != null && e.length ? /* @__PURE__ */ a(
25
+ responsive: r = !1,
26
+ className: i,
27
+ ...l
28
+ }) => e != null && e.length ? /* @__PURE__ */ n(
28
29
  "div",
29
30
  {
30
- className: `${s.stepContainer} ${n ? s.responsive : ""}`,
31
- ...o,
32
- children: /* @__PURE__ */ a("div", { className: s.stepWrapper, children: e.map((p, r) => {
33
- const l = j(r, t, p.disabled), i = q(r, e.length), c = y(r, t, p.disabled), d = p.stateText ? p.stateText : E(r, t, e.length, p.disabled);
31
+ className: `${s.stepsContainer} ${r ? s.responsive : ""} ${i && i}`,
32
+ ...l,
33
+ children: /* @__PURE__ */ n("div", { className: s.stepWrapper, children: e.map((o, a) => {
34
+ const d = j(a, t, o.disabled), p = q(a, e.length), c = y(a, t, o.disabled), m = o.stateText ? o.stateText : E(a, t, e.length, o.disabled);
34
35
  return /* @__PURE__ */ _(
35
36
  "div",
36
37
  {
37
- className: `${s.step} ${s[i]} ${p.disabled ? s.stepDisabled : ""}`,
38
+ className: `${s.step} ${s[p]} ${o.disabled ? s.stepDisabled : ""}`,
38
39
  children: [
39
40
  /* @__PURE__ */ _("div", { className: s.iconLine, children: [
40
- i !== "start" && /* @__PURE__ */ a(
41
+ p !== "start" && /* @__PURE__ */ n(
41
42
  "div",
42
43
  {
43
- className: `${s.stepSeparator} ${t - 1 >= r ? "" : s.stepSeparatorPending}`
44
+ className: `${s.stepSeparator} ${t - 1 >= a ? "" : s.stepSeparatorPending}`
44
45
  }
45
46
  ),
46
- /* @__PURE__ */ a("div", { className: s.iconDiv, children: /* @__PURE__ */ a(m, { name: l }) }),
47
- i !== "end" && /* @__PURE__ */ a(
47
+ /* @__PURE__ */ n("div", { className: s.iconDiv, children: /* @__PURE__ */ n(g, { name: d }) }),
48
+ p !== "end" && /* @__PURE__ */ n(
48
49
  "div",
49
50
  {
50
- className: `${s.stepSeparator} ${t - 1 > r ? "" : s.stepSeparatorPending}`
51
+ className: `${s.stepSeparator} ${t - 1 > a ? "" : s.stepSeparatorPending}`
51
52
  }
52
53
  )
53
54
  ] }),
54
55
  /* @__PURE__ */ _("div", { className: s.textWrapper, children: [
55
- /* @__PURE__ */ a("span", { className: `${s.stepTitle} ${c}`, children: p.title }),
56
- /* @__PURE__ */ a("span", { className: `${s.stepState} ${c}`, children: d })
56
+ /* @__PURE__ */ n("span", { className: `${s.stepTitle} ${c}`, children: o.title }),
57
+ /* @__PURE__ */ n("span", { className: `${s.stepState} ${c}`, children: m })
57
58
  ] })
58
59
  ]
59
60
  },
60
- r
61
+ a
61
62
  );
62
63
  }) })
63
64
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bmi-next-brokers",
3
3
  "description": "Componentes de UI para proyecto BMI Next Brokers",
4
- "version": "2.1.8",
4
+ "version": "2.2.0",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",