bmi-next 1.0.47 → 1.0.48

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
- ._errorMessage_d77gd_1{font-family:Poppins Medium;font-size:12px;color:var(--rojo);line-height:15px;display:flex;align-items:center;gap:3px;margin-left:9px}._errorMessage_d77gd_1>svg{flex-shrink:0}
1
+ ._errorMessage_1mpwp_1{font-family:Poppins Medium;font-size:12px;color:var(--rojo);line-height:15px;display:flex;align-items:center;gap:3px;margin-left:9px}._hintMessage_1mpwp_12{color:var(--negro-40)!important}._errorMessage_1mpwp_1>svg{flex-shrink:0}
@@ -1,5 +1,6 @@
1
1
  interface DivProps extends React.HTMLAttributes<HTMLDivElement> {
2
2
  error: string;
3
+ hint?: boolean;
3
4
  }
4
5
  export declare const FieldError: React.FC<DivProps>;
5
6
  export {};
@@ -1,11 +1,12 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { Exclamation as o } from "../../icons/icons.js";
3
- import '../../assets/index9.css';const a = "_errorMessage_d77gd_1", t = {
4
- errorMessage: a
5
- }, n = ({ error: e }) => /* @__PURE__ */ s("div", { className: t.errorMessage, children: [
6
- /* @__PURE__ */ r(o, { fill: "rgb(231 94 107)" }),
7
- /* @__PURE__ */ r("span", { children: e })
1
+ import { jsxs as a, jsx as s } from "react/jsx-runtime";
2
+ import { Exclamation as n } from "../../icons/icons.js";
3
+ import '../../assets/index9.css';const t = "_errorMessage_1mpwp_1", i = "_hintMessage_1mpwp_12", e = {
4
+ errorMessage: t,
5
+ hintMessage: i
6
+ }, c = ({ error: o, hint: r }) => /* @__PURE__ */ a("div", { className: r ? e.errorMessage + " " + e.hintMessage : e.errorMessage, children: [
7
+ /* @__PURE__ */ s(n, { fill: r ? "var(--negro-40)" : "var(--rojo)" }),
8
+ /* @__PURE__ */ s("span", { children: o })
8
9
  ] });
9
10
  export {
10
- n as FieldError
11
+ c as FieldError
11
12
  };
@@ -17,6 +17,7 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
17
17
  iconBefore?: IconPropsWithIconName | null;
18
18
  iconAfter?: IconPropsWithIconName | null;
19
19
  error?: string | null;
20
+ hint?: string | null;
20
21
  prefix?: string;
21
22
  suffix?: string;
22
23
  visibility?: true | null;
@@ -1,40 +1,41 @@
1
- import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
- import { Icon as e } from "../../icons/icons.js";
3
- import { FieldError as m } from "../FieldError/index.js";
4
- import { useState as b } from "react";
5
- import '../../assets/index8.css';const C = "_container_1l4wa_1", h = "_labelContainer_1l4wa_12", u = "_invalidLabel_1l4wa_25", w = "_visibilityContainer_1l4wa_29", y = "_inputContainer_1l4wa_40", N = "_invalid_1l4wa_25", x = "_input_1l4wa_40", f = "_prefix_1l4wa_99", n = {
1
+ import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
+ import { Icon as l } from "../../icons/icons.js";
3
+ import { FieldError as v } from "../FieldError/index.js";
4
+ import { useState as u } from "react";
5
+ import '../../assets/index8.css';const C = "_container_1l4wa_1", h = "_labelContainer_1l4wa_12", w = "_invalidLabel_1l4wa_25", y = "_visibilityContainer_1l4wa_29", N = "_inputContainer_1l4wa_40", x = "_invalid_1l4wa_25", f = "_input_1l4wa_40", L = "_prefix_1l4wa_99", n = {
6
6
  container: C,
7
7
  labelContainer: h,
8
- invalidLabel: u,
9
- visibilityContainer: w,
10
- inputContainer: y,
11
- invalid: N,
12
- input: x,
13
- prefix: f
14
- }, I = ({
8
+ invalidLabel: w,
9
+ visibilityContainer: y,
10
+ inputContainer: N,
11
+ invalid: x,
12
+ input: f,
13
+ prefix: L
14
+ }, S = ({
15
15
  label: s,
16
- iconBefore: o,
17
- iconAfter: r,
16
+ iconBefore: r,
17
+ iconAfter: o,
18
18
  error: a,
19
- prefix: c,
20
- suffix: _,
21
- visibility: p,
19
+ hint: c,
20
+ prefix: _,
21
+ suffix: d,
22
+ visibility: m,
22
23
  // className,
23
- ...d
24
+ ...p
24
25
  }) => {
25
- const [t, v] = b(!1);
26
- return /* @__PURE__ */ l("div", { className: n.container, children: [
27
- s && /* @__PURE__ */ l("div", { className: n.labelContainer, children: [
26
+ const [t, b] = u(!1);
27
+ return /* @__PURE__ */ e("div", { className: n.container, children: [
28
+ s && /* @__PURE__ */ e("div", { className: n.labelContainer, children: [
28
29
  /* @__PURE__ */ i("label", { className: a ? n.invalidLabel : "", children: s }),
29
- p && /* @__PURE__ */ l(
30
+ m && /* @__PURE__ */ e(
30
31
  "div",
31
32
  {
32
33
  className: n.visibilityContainer,
33
- onClick: () => v(!t),
34
+ onClick: () => b(!t),
34
35
  children: [
35
36
  /* @__PURE__ */ i("span", { children: t ? "Ocultar" : "Mostrar" }),
36
37
  /* @__PURE__ */ i(
37
- e,
38
+ l,
38
39
  {
39
40
  name: t ? "HideEye" : "ShowEye",
40
41
  width: 20,
@@ -46,29 +47,30 @@ import '../../assets/index8.css';const C = "_container_1l4wa_1", h = "_labelCont
46
47
  }
47
48
  )
48
49
  ] }),
49
- /* @__PURE__ */ l(
50
+ /* @__PURE__ */ e(
50
51
  "div",
51
52
  {
52
53
  className: `${n.inputContainer} ${a ? n.invalid : ""}`,
53
54
  children: [
54
- o && /* @__PURE__ */ i(e, { ...o }),
55
- c && /* @__PURE__ */ i("span", { className: n.prefix, children: c }),
55
+ r && /* @__PURE__ */ i(l, { ...r }),
56
+ _ && /* @__PURE__ */ i("span", { className: n.prefix, children: _ }),
56
57
  /* @__PURE__ */ i(
57
58
  "input",
58
59
  {
59
60
  className: n.input,
60
- ...d,
61
- type: t ? "text" : d.type
61
+ ...p,
62
+ type: t ? "text" : p.type
62
63
  }
63
64
  ),
64
- _ && /* @__PURE__ */ i("span", { children: _ }),
65
- r && /* @__PURE__ */ i(e, { ...r })
65
+ d && /* @__PURE__ */ i("span", { children: d }),
66
+ o && /* @__PURE__ */ i(l, { ...o })
66
67
  ]
67
68
  }
68
69
  ),
69
- a && /* @__PURE__ */ i(m, { error: a })
70
+ c && /* @__PURE__ */ i(v, { error: c, hint: !0 }),
71
+ a && /* @__PURE__ */ i(v, { error: a })
70
72
  ] });
71
73
  };
72
74
  export {
73
- I as Input
75
+ S as Input
74
76
  };
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.47",
4
+ "version": "1.0.48",
5
5
  "author": "David Fernández Bolaños <david@bmiahorro.com>",
6
6
  "contributors": [
7
7
  "Jorge Martín <jorge@bmiahorro.com>",