bmi-next-brokers 1.2.5 → 1.2.7

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,82 +1,119 @@
1
- import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
- import { useState as T } from "react";
3
- import { s as e } from "../../Input.module-DEnV7xlj.js";
1
+ import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
+ import { useState as N } from "react";
3
+ import { s as a } from "../../Input.module-7cfiMD0m.js";
4
4
  import { Icon as $ } from "../../icons/Icon.js";
5
5
  const M = ({
6
6
  size: l = "medium",
7
7
  label: _,
8
8
  error: i,
9
- helperText: h,
10
- icon: o,
11
- className: g,
12
- required: w,
13
- inverted: a = !1,
14
- type: b,
9
+ helperText: m,
10
+ icon: c,
11
+ className: h,
12
+ required: u,
13
+ inverted: e = !1,
14
+ btc: w = !1,
15
+ type: o,
15
16
  ...d
16
17
  }) => {
17
- const [n, u] = T(!1), m = b === "password", c = b === "date", I = [
18
- e.input,
19
- e[l],
20
- o && !c ? e.withIcon : "",
21
- i ? e.error : "",
22
- a ? e.inverted : "",
23
- c ? e.dateInput : "",
24
- g
25
- ].filter(Boolean).join(" "), t = l === "small" ? 16 : l === "large" ? 20 : 18, N = () => {
26
- u(!n);
18
+ const [n, x] = N(!1), g = o === "password", r = o === "date", I = [
19
+ a.input,
20
+ a[l],
21
+ c && !r ? a.withIcon : "",
22
+ w && a.btc,
23
+ i ? a.error : "",
24
+ e ? a.inverted : "",
25
+ r ? a.dateInput : "",
26
+ h
27
+ ].filter(Boolean).join(" "), t = l === "small" ? 16 : l === "large" ? 20 : l === "extraLarge" ? 24 : 18, f = () => {
28
+ x(!n);
27
29
  };
28
- return /* @__PURE__ */ r("div", { className: e.inputContainer, children: [
29
- _ && /* @__PURE__ */ r("label", { className: `${e.label} ${l === "large" ? e.label_large : ""} ${d.disabled && !a ? e.label_disabled : ""} ${a && !d.disabled ? e.label_inverted : ""} ${a && d.disabled ? e.label_inverted_disabled : ""}`, children: [
30
- _,
31
- /* @__PURE__ */ s("span", { className: `${e.required} ${a ? e.required_inverted : ""}`, children: w && "*" })
32
- ] }),
33
- /* @__PURE__ */ r("div", { className: e.inputWrapper, children: [
34
- o && !c && /* @__PURE__ */ s("div", { className: `${e.icon} ${d.disabled && !a ? e.icon_disabled : ""} ${a && !d.disabled ? e.icon_inverted : ""} ${a && d.disabled ? e.icon_inverted_disabled : ""}`, children: /* @__PURE__ */ s(
35
- $,
36
- {
37
- name: o,
38
- width: t,
39
- height: t
40
- }
41
- ) }),
42
- /* @__PURE__ */ s(
43
- "input",
44
- {
45
- className: I,
46
- type: m ? n ? "text" : "password" : b,
47
- ...d
48
- }
49
- ),
50
- m && /* @__PURE__ */ s(
51
- "button",
52
- {
53
- type: "button",
54
- className: `${e.passwordToggle} ${d.disabled && !a ? e.passwordToggle_disabled : ""} ${a && !d.disabled ? e.passwordToggle_inverted : ""} ${a && d.disabled ? e.passwordToggle_inverted_disabled : ""}`,
55
- onClick: N,
56
- disabled: d.disabled,
57
- "aria-label": n ? "Ocultar contraseña" : "Mostrar contraseña",
58
- children: /* @__PURE__ */ s(
59
- $,
30
+ return /* @__PURE__ */ b(
31
+ "div",
32
+ {
33
+ className: `${a.inputContainer} ${l === "medium" ? a.inputContainer_medium : l === "large" ? a.inputContainer_large : l === "extraLarge" ? a.inputContainer_extraLarge : ""}`,
34
+ children: [
35
+ _ && /* @__PURE__ */ b(
36
+ "label",
37
+ {
38
+ className: `${a.label} ${l === "large" ? a.label_large : ""} ${l === "extraLarge" ? a.label_extraLarge : ""} ${d.disabled && !e ? a.label_disabled : ""} ${e && !d.disabled ? a.label_inverted : ""} ${e && d.disabled ? a.label_inverted_disabled : ""}`,
39
+ children: [
40
+ _,
41
+ /* @__PURE__ */ s(
42
+ "span",
43
+ {
44
+ className: `${a.required} ${e ? a.required_inverted : ""}`,
45
+ children: u && "*"
46
+ }
47
+ )
48
+ ]
49
+ }
50
+ ),
51
+ /* @__PURE__ */ b("div", { className: a.inputWrapper, children: [
52
+ c && !r && /* @__PURE__ */ s(
53
+ "div",
60
54
  {
61
- name: n ? "VisibilityOff" : "Visibility",
62
- width: t,
63
- height: t
55
+ className: `${a.icon} ${d.disabled && !e ? a.icon_disabled : ""} ${e && !d.disabled ? a.icon_inverted : ""} ${e && d.disabled ? a.icon_inverted_disabled : ""}`,
56
+ children: /* @__PURE__ */ s($, { name: c, width: t, height: t })
57
+ }
58
+ ),
59
+ /* @__PURE__ */ s(
60
+ "input",
61
+ {
62
+ className: I,
63
+ type: g ? n ? "text" : "password" : o,
64
+ ...d
65
+ }
66
+ ),
67
+ g && /* @__PURE__ */ s(
68
+ "button",
69
+ {
70
+ type: "button",
71
+ className: `${a.passwordToggle} ${d.disabled && !e ? a.passwordToggle_disabled : ""} ${e && !d.disabled ? a.passwordToggle_inverted : ""} ${e && d.disabled ? a.passwordToggle_inverted_disabled : ""}`,
72
+ onClick: f,
73
+ disabled: d.disabled,
74
+ "aria-label": n ? "Ocultar contraseña" : "Mostrar contraseña",
75
+ children: /* @__PURE__ */ s(
76
+ $,
77
+ {
78
+ name: n ? "VisibilityOff" : "Visibility",
79
+ width: t,
80
+ height: t
81
+ }
82
+ )
83
+ }
84
+ ),
85
+ r && /* @__PURE__ */ s(
86
+ "div",
87
+ {
88
+ className: `${a.dateIcon} ${d.disabled && !e ? a.dateIcon_disabled : ""} ${e && !d.disabled ? a.dateIcon_inverted : ""} ${e && d.disabled ? a.dateIcon_inverted_disabled : ""} ${i ? a.dateIcon_error : ""} ${i && e ? a.dateIcon_inverted_error : ""}`,
89
+ children: /* @__PURE__ */ s(
90
+ $,
91
+ {
92
+ name: "CalendarIcon",
93
+ width: t + 2,
94
+ height: t + 2
95
+ }
96
+ )
64
97
  }
65
98
  )
66
- }
67
- ),
68
- c && /* @__PURE__ */ s("div", { className: `${e.dateIcon} ${d.disabled && !a ? e.dateIcon_disabled : ""} ${a && !d.disabled ? e.dateIcon_inverted : ""} ${a && d.disabled ? e.dateIcon_inverted_disabled : ""} ${i ? e.dateIcon_error : ""} ${i && a ? e.dateIcon_inverted_error : ""}`, children: /* @__PURE__ */ s(
69
- $,
70
- {
71
- name: "CalendarIcon",
72
- width: t + 2,
73
- height: t + 2
74
- }
75
- ) })
76
- ] }),
77
- i && /* @__PURE__ */ s("span", { className: `${e.errorMessage} ${e[`errorMessage_${l}`]} ${a ? e.errorMessage_inverted : ""}`, children: i }),
78
- h && !i && /* @__PURE__ */ s("span", { className: `${e.helperText} ${e[`helperText_${l}`]} ${d.disabled && !a ? e.helperText_disabled : ""} ${a && !d.disabled ? e.helperText_inverted : ""} ${a && d.disabled ? e.helperText_inverted_disabled : ""}`, children: h })
79
- ] });
99
+ ] }),
100
+ i && /* @__PURE__ */ s(
101
+ "span",
102
+ {
103
+ className: `${a.errorMessage} ${a[`errorMessage_${l}`]} ${e ? a.errorMessage_inverted : ""}`,
104
+ children: i
105
+ }
106
+ ),
107
+ m && !i && /* @__PURE__ */ s(
108
+ "span",
109
+ {
110
+ className: `${a.helperText} ${a[`helperText_${l}`]} ${d.disabled && !e ? a.helperText_disabled : ""} ${e && !d.disabled ? a.helperText_inverted : ""} ${e && d.disabled ? a.helperText_inverted_disabled : ""}`,
111
+ children: m
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ );
80
117
  };
81
118
  export {
82
119
  M as Input
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export type InputSize = "small" | "medium" | "large";
2
+ export type InputSize = "small" | "medium" | "large" | "extraLarge";
3
3
  export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
4
4
  size?: InputSize;
5
5
  label?: string;
@@ -8,5 +8,6 @@ export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInp
8
8
  required?: boolean;
9
9
  error?: string;
10
10
  inverted?: boolean;
11
+ btc?: boolean;
11
12
  }
12
13
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1,101 +1,111 @@
1
- import { jsxs as n, jsx as _ } from "react/jsx-runtime";
2
- import { useRef as C } from "react";
3
- import { s as l } from "../../../Input.module-DEnV7xlj.js";
4
- const k = ({
5
- size: s = "medium",
6
- label: p,
7
- placeholder: i,
8
- helperText: t,
9
- required: m,
10
- error: r,
1
+ import { jsxs as s, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as P } from "react";
3
+ import { s as a } from "../../../Input.module-7cfiMD0m.js";
4
+ const T = ({
5
+ size: o = "medium",
6
+ label: c,
7
+ placeholder: p,
8
+ helperText: i,
9
+ required: h,
10
+ error: _,
11
11
  inverted: e = !1,
12
- disabled: a = !1,
13
- checked: o = !1,
14
- onClick: h,
12
+ disabled: l = !1,
13
+ checked: r = !1,
14
+ btc: u = !1,
15
+ onClick: m,
15
16
  ...$
16
17
  }) => {
17
- const c = C(null), u = (d) => {
18
- !a && c.current && c.current.click(), h && h(d);
18
+ const t = P(null), g = (d) => {
19
+ !l && t.current && t.current.click(), m && m(d);
19
20
  }, x = [
20
- l.inputWrapper,
21
- a ? l.inputCheckbox_disabled : l.inputCheckbox,
22
- s === "small" ? l.smallCheckbox : s === "large" ? l.largeCheckbox : l.mediumCheckbox,
23
- r ? l.error : "",
24
- e ? l.inverted : "",
25
- o && !r && !a && !e ? l.inputCheckbox_checked : "",
26
- o && !r && !a && e ? l.inputCheckbox_inverted_checked : "",
27
- o && r ? l.error_checked : "",
28
- o && a ? l.inputCheckbox_disabled_checked : ""
29
- ].filter(Boolean).join(" "), g = [
30
- a && !e ? l.passwordToggle_disabled : "",
31
- e && !a ? l.passwordToggle_inverted : "",
32
- e && a ? l.passwordToggle_inverted_disabled : ""
21
+ a.inputWrapper,
22
+ u && a.btc,
23
+ l ? a.inputCheckbox_disabled : a.inputCheckbox,
24
+ o === "small" ? a.smallCheckbox : o === "large" ? a.largeCheckbox : o === "extraLarge" ? a.extraLargeCheckbox : a.mediumCheckbox,
25
+ _ ? a.error : "",
26
+ e ? a.inverted : "",
27
+ r && !_ && !l && !e ? a.inputCheckbox_checked : "",
28
+ r && !_ && !l && e ? a.inputCheckbox_inverted_checked : "",
29
+ r && _ ? a.error_checked : "",
30
+ r && l ? a.inputCheckbox_disabled_checked : ""
33
31
  ].filter(Boolean).join(" "), f = [
34
- l.helperText,
35
- l[`helperText_${s}`],
36
- a && !e ? l.helperText_disabled : "",
37
- e && !a ? l.helperText_inverted : "",
38
- e && a ? l.helperText_inverted_disabled : ""
32
+ l && !e ? a.passwordToggle_disabled : "",
33
+ e && !l ? a.passwordToggle_inverted : "",
34
+ e && l ? a.passwordToggle_inverted_disabled : ""
35
+ ].filter(Boolean).join(" "), C = [
36
+ a.helperText,
37
+ a[`helperText_${o}`],
38
+ l && !e ? a.helperText_disabled : "",
39
+ e && !l ? a.helperText_inverted : "",
40
+ e && l ? a.helperText_inverted_disabled : ""
39
41
  ].filter(Boolean).join(" ");
40
- return /* @__PURE__ */ n("div", { className: l.inputContainer, children: [
41
- p && /* @__PURE__ */ n(
42
- "label",
43
- {
44
- className: `${l.label} ${s === "large" ? l.label_large : ""} ${a && !e ? l.label_disabled : ""} ${e && !a ? l.label_inverted : ""} ${e && a ? l.label_inverted_disabled : ""}`,
45
- children: [
46
- p,
47
- m && /* @__PURE__ */ _(
48
- "span",
49
- {
50
- className: `${l.required} ${a && !e ? l.required_disabled : ""} ${e && !a ? l.required_inverted : ""} ${e && a ? l.required_inverted_disabled : ""}`,
51
- children: "*"
52
- }
53
- )
54
- ]
55
- }
56
- ),
57
- /* @__PURE__ */ n(
58
- "div",
59
- {
60
- className: x,
61
- style: {
62
- display: "flex",
63
- alignItems: "center",
64
- cursor: a ? "not-allowed" : "pointer"
65
- },
66
- onClick: u,
67
- children: [
68
- /* @__PURE__ */ _(
69
- "input",
70
- {
71
- ref: c,
72
- type: "radio",
73
- className: g,
74
- disabled: a,
75
- checked: o,
76
- ...$,
77
- style: { marginTop: "-1px", flexShrink: 0 }
78
- }
79
- ),
80
- i && /* @__PURE__ */ _(
81
- "span",
82
- {
83
- className: `${l.radioPlaceholder} ${s === "small" ? l.smallRadio : s === "large" ? l.largeRadio : l.mediumRadio} ${a && !e && !o ? l.radioPlaceholder_disabled : ""} ${a && !e && o ? l.radioPlaceholder_disabled_checked : ""} ${e && !a && !o ? l.radioPlaceholder_inverted : ""} ${e && a ? l.radioPlaceholder_inverted_disabled : ""} ${o && !r && !a && !e ? l.radioPlaceholder_checked : ""} ${o && !r && !a && e ? l.radioPlaceholder_inverted_checked : ""} ${r && !o && !e ? l.radioPlaceholder_error : ""} ${r && !o && e ? l.radioPlaceholder_inverted_error : ""} ${r && o && !e ? l.radioPlaceholder_error_checked : ""} ${r && o && e ? l.radioPlaceholder_inverted_error_checked : ""}`,
84
- children: i
85
- }
86
- )
87
- ]
88
- }
89
- ),
90
- r ? /* @__PURE__ */ _(
91
- "span",
92
- {
93
- className: `${l.errorMessage} ${l[`errorMessage_${s}`]} ${e ? l.errorMessage_inverted : ""}`,
94
- children: r
95
- }
96
- ) : t && /* @__PURE__ */ _("span", { className: f, children: t })
97
- ] });
42
+ return /* @__PURE__ */ s(
43
+ "div",
44
+ {
45
+ className: `${a.inputContainer} ${o === "medium" ? a.inputContainer_medium : o === "large" ? a.inputContainer_large : o === "extraLarge" ? a.inputContainer_extraLarge : ""}`,
46
+ children: [
47
+ c && /* @__PURE__ */ s(
48
+ "label",
49
+ {
50
+ className: `${a.label} ${o === "large" ? a.label_large : ""}
51
+ ${o === "extraLarge" ? a.label_extraLarge : ""}
52
+ ${l && !e ? a.label_disabled : ""} ${e && !l ? a.label_inverted : ""} ${e && l ? a.label_inverted_disabled : ""}`,
53
+ children: [
54
+ c,
55
+ h && /* @__PURE__ */ n(
56
+ "span",
57
+ {
58
+ className: `${a.required} ${l && !e ? a.required_disabled : ""} ${e && !l ? a.required_inverted : ""} ${e && l ? a.required_inverted_disabled : ""}`,
59
+ children: "*"
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ ),
65
+ /* @__PURE__ */ s(
66
+ "div",
67
+ {
68
+ className: x,
69
+ style: {
70
+ display: "flex",
71
+ alignItems: "center",
72
+ cursor: l ? "not-allowed" : "pointer"
73
+ },
74
+ onClick: g,
75
+ children: [
76
+ /* @__PURE__ */ n(
77
+ "input",
78
+ {
79
+ ref: t,
80
+ type: "radio",
81
+ className: f,
82
+ disabled: l,
83
+ checked: r,
84
+ ...$,
85
+ style: { marginTop: "-1px", flexShrink: 0 }
86
+ }
87
+ ),
88
+ p && /* @__PURE__ */ n(
89
+ "span",
90
+ {
91
+ className: `${a.radioPlaceholder} ${o === "small" ? a.smallRadio : o === "large" ? a.largeRadio : o === "extraLarge" ? a.extraLargeRadio : a.mediumRadio} ${l && !e && !r ? a.radioPlaceholder_disabled : ""} ${l && !e && r ? a.radioPlaceholder_disabled_checked : ""} ${e && !l && !r ? a.radioPlaceholder_inverted : ""} ${e && l ? a.radioPlaceholder_inverted_disabled : ""} ${r && !_ && !l && !e ? a.radioPlaceholder_checked : ""} ${r && !_ && !l && e ? a.radioPlaceholder_inverted_checked : ""} ${_ && !r && !e ? a.radioPlaceholder_error : ""} ${_ && !r && e ? a.radioPlaceholder_inverted_error : ""} ${_ && r && !e ? a.radioPlaceholder_error_checked : ""} ${_ && r && e ? a.radioPlaceholder_inverted_error_checked : ""}`,
92
+ children: p
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ ),
98
+ _ ? /* @__PURE__ */ n(
99
+ "span",
100
+ {
101
+ className: `${a.errorMessage} ${a[`errorMessage_${o}`]} ${e ? a.errorMessage_inverted : ""}`,
102
+ children: _
103
+ }
104
+ ) : i && /* @__PURE__ */ n("span", { className: C, children: i })
105
+ ]
106
+ }
107
+ );
98
108
  };
99
109
  export {
100
- k as RadioButton
110
+ T as RadioButton
101
111
  };
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import * as Icons from "../../icons/index";
3
- export type SelectSize = "small" | "medium" | "large";
3
+ export type SelectSize = "small" | "medium" | "large" | "extraLarge";
4
4
  export type IconName = keyof typeof Icons;
5
5
  export interface SelectOption {
6
6
  value: string;
@@ -22,5 +22,6 @@ export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
22
22
  dynamicIcon?: boolean;
23
23
  showPlaceholderIcon?: boolean;
24
24
  required?: boolean;
25
+ btc?: boolean;
25
26
  }
26
27
  export declare const Select: React.FC<SelectProps>;