bmi-next-brokers 3.1.4 → 3.1.5
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/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_efl15_1{position:relative;border:none;border-radius:1000px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-regular);font-weight:100;transition:all .2s ease-in-out;width:fit-content}._content_efl15_15{display:inline-flex;align-items:center;justify-content:center;gap:8px}._button_efl15_1:disabled{opacity:.3;cursor:not-allowed}._small_efl15_28{padding:4px 12px;font-size:14px;height:30px}._medium_efl15_34{padding:4px 10px;font-size:16px;height:36px}._large_efl15_40{padding:4px 14px;font-size:18px;height:42px}._extraLarge_efl15_46{padding:4px 16px;font-size:20px;height:48px}._brand_efl15_53{background:var(--Fill-Brand-Inverted-Active, #2054a5);color:#fff}._brand_efl15_53:hover:not(:disabled){background:var(--Fill-Brand-Inverted-Hover, #4f88d9)}._brand_efl15_53:active:not(:disabled){box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--ui-blue-800, #16396f)}._outline_efl15_66{background-color:transparent;color:var(--Stroke-Brand-Active, #2054a5);border:1px solid var(--Stroke-Brand-Active, #2054a5)}._outline_efl15_66:hover:not(:disabled){border:2px solid var(--Stroke-Brand-Hover, #4f88d9);color:var(--Stroke-Brand-Hover, #4f88d9)}._outline_efl15_66:active{background:var(--Content-Brand-Inverted-Active, #eef3fc);border:none!important;box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._outlineRed_efl15_84{background-color:transparent;color:var(--Stroke-Danger-Active, #c53030);border:1px solid var(--Stroke-Danger-Active, #c53030)}._outlineRed_efl15_84:hover:not(:disabled){border:2px solid var(--Stroke-Danger-Hover, #e53e3e);color:var(--Stroke-Danger-Hover, #e53e3e)}._outlineRed_efl15_84:active:not(:disabled){background:var(--Content-Danger-Inverted-Active, #fff5f5);border:none!important;box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--Stroke-Danger-Active, #c53030)}._ghost_efl15_102{background-color:transparent;color:var(--Content-Brand-Default-Active, #2054a5);border:none}._ghost_efl15_102:hover:not(:disabled){font-family:var(--font-medium)}._ghost_efl15_102:active:not(:disabled){background:var(--Fill-Disabled-Default, #f8fafc);box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._textLink_efl15_119{background-color:transparent;color:var(--Content-Brand-Default-Active, #2054a5);border:none;text-decoration:underline}._textLink_efl15_119:hover:not(:disabled){font-family:var(--font-medium)}._textLink_efl15_119:active:not(:disabled){background:var(--Fill-Disabled-Default, #f8fafc);box-shadow:0 0 0 var(--Focused_Stroke, 4px) var(--brand-Azul-digital-BMI-500, #2054a5)}._secondary_efl15_136{background-color:var(--ui-blue-100);color:var(--Content-Brand-Default-Active, #2054a5);border:none}._button_efl15_1._inverted_efl15_143 svg path{fill:currentColor!important}._button_efl15_1._inverted_efl15_143._brand_efl15_53{background:#fff!important;color:#2054a5!important}._button_efl15_1._inverted_efl15_143._brand_efl15_53:hover:not(:disabled){background:#eef3fc!important;color:#1b468a!important}._button_efl15_1._inverted_efl15_143._brand_efl15_53:active:not(:disabled){box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._button_efl15_1._inverted_efl15_143._outline_efl15_66{background-color:transparent!important;border:1px solid var(--Stroke-Brand-Active, #fff)}._button_efl15_1._inverted_efl15_143._outline_efl15_66:not(:disabled){border:1px solid var(--Stroke-Brand-Active, #fff);color:var(--Stroke-Brand-Active, #fff);background-color:transparent!important}._button_efl15_1._inverted_efl15_143._outline_efl15_66:hover:not(:disabled){border:2px solid var(--Stroke-Brand-Active, #fff);color:#f8f9fa!important;background-color:transparent!important}._button_efl15_1._inverted_efl15_143._outline_efl15_66:active:not(:disabled){border:2px solid var(--Stroke-Brand-Active, #fff);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._button_efl15_1._inverted_efl15_143._ghost_efl15_102{background-color:transparent!important;color:#fff!important;border:none!important}._button_efl15_1._inverted_efl15_143._ghost_efl15_102:hover:not(:disabled){background-color:#ffffff1a!important;color:var(--Stroke-Brand-Innactive, #2054a5)}._button_efl15_1._inverted_efl15_143._textLink_efl15_119{background-color:transparent!important;color:#fff!important;border:none!important;text-decoration:underline!important}._button_efl15_1._inverted_efl15_143._textLink_efl15_119:hover:not(:disabled){color:#f8f9fa!important;background-color:transparent!important}._fullWidth_efl15_209{width:100%}._squaredBorder_efl15_213{border-radius:12px!important}._stack_efl15_220{display:grid;place-items:center}._stack_efl15_220>*{grid-area:1 / 1}._spinner_efl15_225{display:flex;justify-content:center;align-items:center;white-space:nowrap}
|
|
@@ -7,12 +7,17 @@ export interface IconConfig {
|
|
|
7
7
|
name: IconName;
|
|
8
8
|
position: "before" | "after";
|
|
9
9
|
}
|
|
10
|
+
export interface LoadingMessageConfig {
|
|
11
|
+
text: string;
|
|
12
|
+
position?: "before" | "after";
|
|
13
|
+
}
|
|
10
14
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
15
|
children: React.ReactNode;
|
|
12
16
|
variant?: ButtonVariant;
|
|
13
17
|
size?: ButtonSize;
|
|
14
18
|
disabled?: boolean;
|
|
15
19
|
loading?: boolean;
|
|
20
|
+
loadingMessage?: LoadingMessageConfig;
|
|
16
21
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
17
22
|
className?: string;
|
|
18
23
|
type?: "button" | "submit" | "reset";
|
|
@@ -21,4 +26,4 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
21
26
|
fullWidth?: boolean;
|
|
22
27
|
squared?: boolean;
|
|
23
28
|
}
|
|
24
|
-
export declare const Button: ({ children, variant, size, disabled, loading, onClick, className, type, icon, inverted, fullWidth, squared, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const Button: ({ children, variant, size, disabled, loading, loadingMessage, onClick, className, type, icon, inverted, fullWidth, squared, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,80 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { Spinner as
|
|
4
|
-
import '../../assets/Button.css';const
|
|
5
|
-
button:
|
|
6
|
-
content:
|
|
7
|
-
small:
|
|
8
|
-
medium:
|
|
9
|
-
large:
|
|
1
|
+
import { jsx as n, jsxs as o, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as B } from "../../icons/Icon.js";
|
|
3
|
+
import { Spinner as v } from "../Spinner/Spinner.js";
|
|
4
|
+
import '../../assets/Button.css';const q = "_button_efl15_1", N = "_content_efl15_15", R = "_small_efl15_28", W = "_medium_efl15_34", $ = "_large_efl15_40", j = "_extraLarge_efl15_46", C = "_brand_efl15_53", E = "_outline_efl15_66", S = "_outlineRed_efl15_84", F = "_ghost_efl15_102", w = "_textLink_efl15_119", I = "_secondary_efl15_136", A = "_inverted_efl15_143", D = "_fullWidth_efl15_209", G = "_squaredBorder_efl15_213", H = "_stack_efl15_220", J = "_spinner_efl15_225", e = {
|
|
5
|
+
button: q,
|
|
6
|
+
content: N,
|
|
7
|
+
small: R,
|
|
8
|
+
medium: W,
|
|
9
|
+
large: $,
|
|
10
10
|
extraLarge: j,
|
|
11
11
|
brand: C,
|
|
12
|
-
outline:
|
|
12
|
+
outline: E,
|
|
13
13
|
outlineRed: S,
|
|
14
|
-
ghost:
|
|
14
|
+
ghost: F,
|
|
15
15
|
textLink: w,
|
|
16
|
-
secondary:
|
|
17
|
-
inverted:
|
|
18
|
-
fullWidth:
|
|
19
|
-
squaredBorder:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
secondary: I,
|
|
17
|
+
inverted: A,
|
|
18
|
+
fullWidth: D,
|
|
19
|
+
squaredBorder: G,
|
|
20
|
+
stack: H,
|
|
21
|
+
spinner: J
|
|
22
|
+
}, Q = ({
|
|
23
|
+
children: s,
|
|
24
|
+
variant: i = "brand",
|
|
25
|
+
size: r = "medium",
|
|
26
|
+
disabled: f = !1,
|
|
27
|
+
loading: l = !1,
|
|
28
|
+
loadingMessage: t,
|
|
29
|
+
onClick: u,
|
|
30
|
+
className: m,
|
|
29
31
|
type: b = "button",
|
|
30
|
-
icon:
|
|
31
|
-
inverted:
|
|
32
|
-
fullWidth:
|
|
33
|
-
squared:
|
|
34
|
-
...
|
|
32
|
+
icon: _,
|
|
33
|
+
inverted: h = !1,
|
|
34
|
+
fullWidth: p = !1,
|
|
35
|
+
squared: x = !1,
|
|
36
|
+
...k
|
|
35
37
|
}) => {
|
|
36
|
-
const
|
|
38
|
+
const L = [
|
|
37
39
|
e.button,
|
|
38
|
-
|
|
39
|
-
e[
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
].filter(Boolean).join(" "),
|
|
44
|
-
if (!
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
] }) : /* @__PURE__ */
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
i === "outline-red" ? e.outlineRed : e[i],
|
|
41
|
+
e[r],
|
|
42
|
+
h ? e.inverted : "",
|
|
43
|
+
p ? e.fullWidth : "",
|
|
44
|
+
m
|
|
45
|
+
].filter(Boolean).join(" "), c = r === "small" ? 16 : r === "large" ? 20 : r === "extraLarge" ? 24 : 18, y = () => {
|
|
46
|
+
if (!_) return s;
|
|
47
|
+
const d = /* @__PURE__ */ n(B, { name: _.name, width: c, height: c });
|
|
48
|
+
return _.position === "before" ? /* @__PURE__ */ o(a, { children: [
|
|
49
|
+
d,
|
|
50
|
+
s
|
|
51
|
+
] }) : /* @__PURE__ */ o(a, { children: [
|
|
52
|
+
s,
|
|
53
|
+
d
|
|
52
54
|
] });
|
|
53
55
|
};
|
|
54
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ n(
|
|
55
57
|
"button",
|
|
56
58
|
{
|
|
57
59
|
type: b,
|
|
58
|
-
disabled:
|
|
59
|
-
onClick:
|
|
60
|
-
className: `${
|
|
61
|
-
...
|
|
62
|
-
children: [
|
|
63
|
-
|
|
60
|
+
disabled: f || l,
|
|
61
|
+
onClick: u,
|
|
62
|
+
className: `${L} ${x ? e.squaredBorder : ""}`,
|
|
63
|
+
...k,
|
|
64
|
+
children: /* @__PURE__ */ o("span", { className: e.stack, children: [
|
|
65
|
+
l && /* @__PURE__ */ o("span", { className: `${e.spinner} ${e.content}`, children: [
|
|
66
|
+
(t == null ? void 0 : t.position) === "before" && /* @__PURE__ */ n("span", { children: t.text }),
|
|
67
|
+
/* @__PURE__ */ n(
|
|
68
|
+
v,
|
|
69
|
+
{
|
|
70
|
+
thickness: 1.5,
|
|
71
|
+
size: c,
|
|
72
|
+
backgroundColor: "#E2E8F0",
|
|
73
|
+
roundedStroke: !0
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
t && t.position !== "before" && /* @__PURE__ */ n("span", { children: t.text })
|
|
77
|
+
] }),
|
|
64
78
|
/* @__PURE__ */ n(
|
|
65
79
|
"span",
|
|
66
80
|
{
|
|
67
81
|
style: {
|
|
68
|
-
visibility:
|
|
82
|
+
visibility: l ? "hidden" : "visible"
|
|
69
83
|
},
|
|
70
84
|
className: e.content,
|
|
71
|
-
children:
|
|
85
|
+
children: y()
|
|
72
86
|
}
|
|
73
87
|
)
|
|
74
|
-
]
|
|
88
|
+
] })
|
|
75
89
|
}
|
|
76
90
|
);
|
|
77
91
|
};
|
|
78
92
|
export {
|
|
79
|
-
|
|
93
|
+
Q as Button
|
|
80
94
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Button } from './Button';
|
|
2
|
-
export type { ButtonProps, ButtonVariant, ButtonSize } from './Button';
|
|
2
|
+
export type { ButtonProps, ButtonVariant, ButtonSize, LoadingMessageConfig, } from './Button';
|
package/package.json
CHANGED