bmi-next-brokers 3.0.2 → 3.0.4
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/index5.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._stepsContainer_ojtx7_1{display:flex;flex-direction:column;align-items:center;width:100%}._stepWrapper_ojtx7_8{display:flex;justify-content:center;align-items:center;width:100%}._step_ojtx7_1{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px}._stepClickable_ojtx7_25{cursor:pointer}._stepDisabled_ojtx7_29{cursor:default}._iconLine_ojtx7_33{display:flex;justify-content:center;align-items:center;width:100%;gap:4px}._stepSeparator_ojtx7_41{flex:1;height:4px;background:#2054a5}._stepSeparatorPending_ojtx7_46{opacity:.3;background:#2054a5}._textWrapper_ojtx7_51{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_ojtx7_62,._stepState_ojtx7_63{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--font-regular)}._start_ojtx7_71{text-align:start}._middle_ojtx7_75{text-align:center}._end_ojtx7_79{text-align:end}._stepTitle_ojtx7_62{color:#000;font-size:16px;line-height:19.2px}._stepTitle_ojtx7_62._stepInProgress_ojtx7_89{font-family:var(--font-medium)}._stepState_ojtx7_63{color:#000;font-size:13px;line-height:15.6px}._stepTitle_ojtx7_62._stepPending_ojtx7_99{color:#cbd5e1}._stepState_ojtx7_63._stepPending_ojtx7_99{color:#e2e8f0}._stepState_ojtx7_63._stepCompleted_ojtx7_107{color:#65a30d}._stepState_ojtx7_63._stepInProgress_ojtx7_89,._stepState_ojtx7_63._stepBlocked_ojtx7_112{color:#2054a5}._iconDiv_ojtx7_116{display:flex;justify-content:center;align-items:center;flex-shrink:0;aspect-ratio:1/1}._iconDiv_ojtx7_116 svg{width:30px;height:30px}@media (max-width: 697px){._responsive_ojtx7_130 ._textWrapper_ojtx7_51{display:none}}@media (max-width: 1280px){._responsive_ojtx7_130 ._iconDiv_ojtx7_116 svg{width:22px;height:22px}}@media (max-width: 1280px){._responsive_ojtx7_130 ._stepSeparator_ojtx7_41{height:2px}._responsive_ojtx7_130 ._stepTitle_ojtx7_62{font-size:12px;line-height:14.4px}._responsive_ojtx7_130 ._stepState_ojtx7_63{font-size:11px;line-height:13.2px}}
|
|
@@ -27,5 +27,9 @@ export interface SwitchProps {
|
|
|
27
27
|
inactiveTextColor?: string;
|
|
28
28
|
/** color de fondo del contenedor (CSS var --switch-bg) */
|
|
29
29
|
background?: string;
|
|
30
|
+
/** si false, cada opción se adapta a su contenido; por defecto true (todas al ancho de la más larga) */
|
|
31
|
+
equalWidth?: boolean;
|
|
32
|
+
/** estilos inline aplicados a todos los botones de opción */
|
|
33
|
+
optionStyle?: React.CSSProperties;
|
|
30
34
|
}
|
|
31
|
-
export declare const Switch: ({ options, active, onChange, size, simpleAnimation, iconSize, className, activeColor, activeTextColor, inactiveTextColor, background, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const Switch: ({ options, active, onChange, size, simpleAnimation, iconSize, className, activeColor, activeTextColor, inactiveTextColor, background, equalWidth, optionStyle, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,102 +1,106 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as p, useState as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/Switch.css';const
|
|
1
|
+
import { jsxs as L, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useState as k, useLayoutEffect as D } from "react";
|
|
3
|
+
import { Icon as R } from "../../icons/Icon.js";
|
|
4
|
+
import '../../assets/Switch.css';const T = "_small_56b6x_29", Z = "_large_56b6x_40", z = "_indicator_56b6x_52", B = "_simple_56b6x_68", K = "_option_56b6x_74", O = "_active_56b6x_74", V = "_label_56b6x_74", X = "_pop_56b6x_1", r = {
|
|
5
5
|
switch: "_switch_56b6x_1",
|
|
6
|
-
small:
|
|
7
|
-
large:
|
|
8
|
-
indicator:
|
|
9
|
-
simple:
|
|
10
|
-
option:
|
|
11
|
-
active:
|
|
12
|
-
label:
|
|
13
|
-
pop:
|
|
14
|
-
},
|
|
6
|
+
small: T,
|
|
7
|
+
large: Z,
|
|
8
|
+
indicator: z,
|
|
9
|
+
simple: B,
|
|
10
|
+
option: K,
|
|
11
|
+
active: O,
|
|
12
|
+
label: V,
|
|
13
|
+
pop: X
|
|
14
|
+
}, Y = {
|
|
15
15
|
small: 12,
|
|
16
16
|
medium: 14,
|
|
17
17
|
large: 16
|
|
18
|
-
},
|
|
18
|
+
}, G = ({
|
|
19
19
|
options: d = [],
|
|
20
20
|
active: l = 0,
|
|
21
21
|
onChange: o,
|
|
22
22
|
size: h = "medium",
|
|
23
23
|
simpleAnimation: u = !1,
|
|
24
|
-
iconSize:
|
|
25
|
-
className:
|
|
24
|
+
iconSize: S,
|
|
25
|
+
className: N = "",
|
|
26
26
|
activeColor: b,
|
|
27
27
|
activeTextColor: w,
|
|
28
28
|
inactiveTextColor: x,
|
|
29
|
-
background: y
|
|
29
|
+
background: y,
|
|
30
|
+
equalWidth: $ = !0,
|
|
31
|
+
optionStyle: W
|
|
30
32
|
}) => {
|
|
31
|
-
const
|
|
33
|
+
const _ = p([]), v = p(l), n = p(null), [I, E] = k({
|
|
32
34
|
left: 0,
|
|
33
35
|
width: 0
|
|
34
36
|
});
|
|
35
|
-
|
|
36
|
-
const t =
|
|
37
|
+
D(() => {
|
|
38
|
+
const t = _.current[l], s = _.current[v.current];
|
|
37
39
|
if (!t) return;
|
|
38
|
-
const i =
|
|
39
|
-
(
|
|
40
|
+
const i = _.current.filter(
|
|
41
|
+
(e) => e !== null
|
|
40
42
|
);
|
|
41
|
-
i.forEach((
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
if (i.forEach((e) => e.style.width = "auto"), $) {
|
|
44
|
+
const e = Math.max(...i.map((c) => c.offsetWidth));
|
|
45
|
+
i.forEach((c) => c.style.width = `${e}px`);
|
|
46
|
+
}
|
|
47
|
+
const f = () => E({ left: t.offsetLeft, width: t.offsetWidth });
|
|
48
|
+
if (!u && s && s !== t) {
|
|
49
|
+
const e = Math.min(s.offsetLeft, t.offsetLeft), c = Math.max(
|
|
50
|
+
s.offsetLeft + s.offsetWidth,
|
|
48
51
|
t.offsetLeft + t.offsetWidth
|
|
49
52
|
);
|
|
50
|
-
|
|
53
|
+
E({ left: e, width: c - e }), n.current && clearTimeout(n.current), n.current = setTimeout(f, 160);
|
|
51
54
|
} else
|
|
52
55
|
f();
|
|
53
|
-
return
|
|
56
|
+
return v.current = l, () => {
|
|
54
57
|
n.current && clearTimeout(n.current);
|
|
55
58
|
};
|
|
56
|
-
}, [l, d, u]);
|
|
57
|
-
const
|
|
59
|
+
}, [l, d, u, $]);
|
|
60
|
+
const M = S ?? Y[h], j = {
|
|
58
61
|
...b && { "--switch-active-bg": b },
|
|
59
62
|
...w && { "--switch-active-text": w },
|
|
60
63
|
...x && { "--switch-inactive-text": x },
|
|
61
64
|
...y && { "--switch-bg": y }
|
|
62
65
|
};
|
|
63
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ L(
|
|
64
67
|
"div",
|
|
65
68
|
{
|
|
66
|
-
className: `${r.switch} ${r[h]} ${u ? r.simple : ""} ${
|
|
67
|
-
style:
|
|
69
|
+
className: `${r.switch} ${r[h]} ${u ? r.simple : ""} ${N}`,
|
|
70
|
+
style: j,
|
|
68
71
|
children: [
|
|
69
72
|
/* @__PURE__ */ m(
|
|
70
73
|
"span",
|
|
71
74
|
{
|
|
72
75
|
className: r.indicator,
|
|
73
76
|
style: {
|
|
74
|
-
transform: `translateX(${
|
|
75
|
-
width: `${
|
|
77
|
+
transform: `translateX(${I.left}px)`,
|
|
78
|
+
width: `${I.width}px`
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
),
|
|
79
|
-
d.map((t,
|
|
80
|
-
const i = typeof t == "string",
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
+
d.map((t, s) => {
|
|
83
|
+
const i = typeof t == "string", f = i ? t : t.label, e = i ? null : t.icon, c = l === s;
|
|
84
|
+
return /* @__PURE__ */ L(
|
|
82
85
|
"div",
|
|
83
86
|
{
|
|
84
|
-
ref: (
|
|
85
|
-
|
|
87
|
+
ref: (a) => {
|
|
88
|
+
_.current[s] = a;
|
|
86
89
|
},
|
|
87
90
|
role: "button",
|
|
88
91
|
tabIndex: 0,
|
|
89
|
-
onClick: () => o == null ? void 0 : o(
|
|
90
|
-
onKeyDown: (
|
|
91
|
-
(
|
|
92
|
+
onClick: () => o == null ? void 0 : o(s),
|
|
93
|
+
onKeyDown: (a) => {
|
|
94
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), o == null || o(s));
|
|
92
95
|
},
|
|
93
|
-
className: `${r.option} ${
|
|
96
|
+
className: `${r.option} ${c ? r.active : ""}`,
|
|
97
|
+
style: W,
|
|
94
98
|
children: [
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
e && /* @__PURE__ */ m(R, { name: e, size: M }),
|
|
100
|
+
f && /* @__PURE__ */ m("p", { className: r.label, children: f })
|
|
97
101
|
]
|
|
98
102
|
},
|
|
99
|
-
|
|
103
|
+
s
|
|
100
104
|
);
|
|
101
105
|
})
|
|
102
106
|
]
|
|
@@ -104,5 +108,5 @@ import '../../assets/Switch.css';const D = "_small_56b6x_29", R = "_large_56b6x_
|
|
|
104
108
|
);
|
|
105
109
|
};
|
|
106
110
|
export {
|
|
107
|
-
|
|
111
|
+
G as Switch
|
|
108
112
|
};
|
|
@@ -11,6 +11,7 @@ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
11
11
|
steps: Step[];
|
|
12
12
|
currentStep: number;
|
|
13
13
|
responsive?: boolean;
|
|
14
|
+
onStepClick?: (stepIndex: number) => void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Componente Stepper
|
|
@@ -30,6 +31,7 @@ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
30
31
|
* - `disabled` opcional, indica si el paso está deshabilitado.
|
|
31
32
|
* @param currentStep Número del paso actual (1-indexado). El icono y los separadores se ajustan según este valor.
|
|
32
33
|
* @param responsive Posibilidad de estado responsive. Por defecto false.
|
|
34
|
+
* @param onStepClick Callback invocado con el número de paso (1-indexado) al hacer click sobre un paso no deshabilitado.
|
|
33
35
|
*
|
|
34
36
|
* Ejemplo de uso:
|
|
35
37
|
*
|
|
@@ -43,8 +45,14 @@ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
43
45
|
*
|
|
44
46
|
* const [currentStep, setCurrentStep] = useState(1);
|
|
45
47
|
*
|
|
46
|
-
*
|
|
48
|
+
* <Stepper
|
|
49
|
+
* steps={steps}
|
|
50
|
+
* currentStep={currentStep}
|
|
51
|
+
* onStepClick={(index) => setCurrentStep(index)}
|
|
52
|
+
* responsive
|
|
53
|
+
* />
|
|
54
|
+
*
|
|
47
55
|
* ```
|
|
48
56
|
*/
|
|
49
|
-
export declare const Stepper: ({ steps, currentStep, responsive, className, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
57
|
+
export declare const Stepper: ({ steps, currentStep, responsive, onStepClick, className, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
50
58
|
export {};
|
|
@@ -1,68 +1,72 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { Icon as
|
|
3
|
-
import '../../assets/index5.css';const
|
|
4
|
-
stepsContainer:
|
|
5
|
-
stepWrapper:
|
|
6
|
-
step:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as f } from "../../icons/Icon.js";
|
|
3
|
+
import '../../assets/index5.css';const v = "_stepsContainer_ojtx7_1", x = "_stepWrapper_ojtx7_8", b = "_step_ojtx7_1", h = "_stepClickable_ojtx7_25", C = "_stepDisabled_ojtx7_29", $ = "_iconLine_ojtx7_33", N = "_stepSeparator_ojtx7_41", u = "_stepSeparatorPending_ojtx7_46", D = "_textWrapper_ojtx7_51", T = "_stepTitle_ojtx7_62", W = "_stepState_ojtx7_63", k = "_start_ojtx7_71", S = "_middle_ojtx7_75", B = "_end_ojtx7_79", L = "_stepInProgress_ojtx7_89", I = "_stepPending_ojtx7_99", y = "_stepCompleted_ojtx7_107", E = "_stepBlocked_ojtx7_112", R = "_iconDiv_ojtx7_116", q = "_responsive_ojtx7_130", s = {
|
|
4
|
+
stepsContainer: v,
|
|
5
|
+
stepWrapper: x,
|
|
6
|
+
step: b,
|
|
7
|
+
stepClickable: h,
|
|
8
|
+
stepDisabled: C,
|
|
9
|
+
iconLine: $,
|
|
10
|
+
stepSeparator: N,
|
|
11
|
+
stepSeparatorPending: u,
|
|
12
|
+
textWrapper: D,
|
|
13
|
+
stepTitle: T,
|
|
14
|
+
stepState: W,
|
|
15
|
+
start: k,
|
|
16
|
+
middle: S,
|
|
17
|
+
end: B,
|
|
18
|
+
stepInProgress: L,
|
|
19
|
+
stepPending: I,
|
|
20
|
+
stepCompleted: y,
|
|
21
|
+
stepBlocked: E,
|
|
22
|
+
iconDiv: R,
|
|
23
|
+
responsive: q
|
|
24
|
+
}, w = (e, t, a) => a && e + 1 < t ? "StepBlocked" : e + 1 < t ? "StepDone" : e + 1 === t ? "StepInProgress" : "StepPending", z = (e, t, a) => a && e + 1 < t ? s.stepBlocked : e + 1 < t ? s.stepCompleted : e + 1 === t ? s.stepInProgress : s.stepPending, A = (e, t, a, i) => i && e + 1 < t ? "No aplica" : t > a || e + 1 < t ? "Completado" : e + 1 === t ? "En Proceso" : "Pendiente", F = (e, t) => e === 0 ? "start" : e === t - 1 ? "end" : "middle", J = ({
|
|
23
25
|
steps: e,
|
|
24
26
|
currentStep: t,
|
|
25
|
-
responsive:
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
responsive: a = !1,
|
|
28
|
+
onStepClick: i,
|
|
29
|
+
className: _,
|
|
30
|
+
...m
|
|
28
31
|
}) => e != null && e.length ? /* @__PURE__ */ n(
|
|
29
32
|
"div",
|
|
30
33
|
{
|
|
31
|
-
className: `${s.stepsContainer} ${
|
|
32
|
-
...
|
|
33
|
-
children: /* @__PURE__ */ n("div", { className: s.stepWrapper, children: e.map((
|
|
34
|
-
const
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
className: `${s.stepsContainer} ${a ? s.responsive : ""} ${_ && _}`,
|
|
35
|
+
...m,
|
|
36
|
+
children: /* @__PURE__ */ n("div", { className: s.stepWrapper, children: e.map((r, o) => {
|
|
37
|
+
const g = w(o, t, r.disabled), p = F(o, e.length), c = z(o, t, r.disabled), j = r.stateText ? r.stateText : A(o, t, e.length, r.disabled), P = o + 1 <= t, d = !r.disabled && P;
|
|
38
|
+
return /* @__PURE__ */ l(
|
|
36
39
|
"div",
|
|
37
40
|
{
|
|
38
|
-
className: `${s.step} ${s[p]} ${
|
|
41
|
+
className: `${s.step} ${s[p]} ${d ? s.stepClickable : s.stepDisabled}`,
|
|
42
|
+
onClick: d ? () => i == null ? void 0 : i(o + 1) : void 0,
|
|
39
43
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ l("div", { className: s.iconLine, children: [
|
|
41
45
|
p !== "start" && /* @__PURE__ */ n(
|
|
42
46
|
"div",
|
|
43
47
|
{
|
|
44
|
-
className: `${s.stepSeparator} ${t - 1 >=
|
|
48
|
+
className: `${s.stepSeparator} ${t - 1 >= o ? "" : s.stepSeparatorPending}`
|
|
45
49
|
}
|
|
46
50
|
),
|
|
47
|
-
/* @__PURE__ */ n("div", { className: s.iconDiv, children: /* @__PURE__ */ n(
|
|
51
|
+
/* @__PURE__ */ n("div", { className: s.iconDiv, children: /* @__PURE__ */ n(f, { name: g }) }),
|
|
48
52
|
p !== "end" && /* @__PURE__ */ n(
|
|
49
53
|
"div",
|
|
50
54
|
{
|
|
51
|
-
className: `${s.stepSeparator} ${t - 1 >
|
|
55
|
+
className: `${s.stepSeparator} ${t - 1 > o ? "" : s.stepSeparatorPending}`
|
|
52
56
|
}
|
|
53
57
|
)
|
|
54
58
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */ n("span", { className: `${s.stepTitle} ${c}`, children:
|
|
57
|
-
/* @__PURE__ */ n("span", { className: `${s.stepState} ${c}`, children:
|
|
59
|
+
/* @__PURE__ */ l("div", { className: s.textWrapper, children: [
|
|
60
|
+
/* @__PURE__ */ n("span", { className: `${s.stepTitle} ${c}`, children: r.title }),
|
|
61
|
+
/* @__PURE__ */ n("span", { className: `${s.stepState} ${c}`, children: j })
|
|
58
62
|
] })
|
|
59
63
|
]
|
|
60
64
|
},
|
|
61
|
-
|
|
65
|
+
o
|
|
62
66
|
);
|
|
63
67
|
}) })
|
|
64
68
|
}
|
|
65
69
|
) : null;
|
|
66
70
|
export {
|
|
67
|
-
|
|
71
|
+
J as Stepper
|
|
68
72
|
};
|
package/package.json
CHANGED