reactive-bulma 4.3.4 → 4.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- import { jsxs as f, Fragment as p, jsx as s } from "react/jsx-runtime";
2
- import { useMemo as n } from "react";
1
+ import { jsxs as f, Fragment as p, jsx as o } from "react/jsx-runtime";
2
+ import { useMemo as m } from "react";
3
3
  import { parseClasses as u, parseTestId as I } from "../../../functions/parsers.js";
4
4
  import T from "../../atoms/TextArea/index.js";
5
5
  import h from "../../atoms/Select/index.js";
@@ -8,7 +8,7 @@ import C from "../../atoms/RadioButton/index.js";
8
8
  import E from "../InputControl/index.js";
9
9
  import { FormFieldType as l } from "../../../interfaces/moleculeProps.js";
10
10
  const x = (r, t) => {
11
- const e = r !== null ? /* @__PURE__ */ s(
11
+ const e = r !== null ? /* @__PURE__ */ o(
12
12
  "label",
13
13
  {
14
14
  "data-testid": "test-form-field-label",
@@ -16,55 +16,55 @@ const x = (r, t) => {
16
16
  children: r
17
17
  }
18
18
  ) : null;
19
- return t ? /* @__PURE__ */ s("section", { className: "field-label", children: e }) : e;
19
+ return t ? /* @__PURE__ */ o("section", { className: "field-label", children: e }) : e;
20
20
  }, F = ({
21
21
  testId: r,
22
22
  type: t,
23
23
  input: e
24
24
  }) => {
25
- const o = {
26
- testId: r ?? `test-form-field-${t}`,
25
+ const s = {
26
+ testId: (e == null ? void 0 : e.testId) ?? r ?? `test-form-field-${t}`,
27
27
  containerTestId: r ?? `test-form-field-container-${t}`
28
28
  };
29
29
  switch (t) {
30
30
  case l.INPUT:
31
- return /* @__PURE__ */ s(
31
+ return /* @__PURE__ */ o(
32
32
  E,
33
33
  {
34
34
  ...e,
35
- ...o
35
+ ...s
36
36
  }
37
37
  );
38
38
  case l.SELECT:
39
- return /* @__PURE__ */ s(
39
+ return /* @__PURE__ */ o(
40
40
  h,
41
41
  {
42
42
  ...e,
43
- ...o
43
+ ...s
44
44
  }
45
45
  );
46
46
  case l.CHECKBOX:
47
- return /* @__PURE__ */ s(
47
+ return /* @__PURE__ */ o(
48
48
  b,
49
49
  {
50
50
  ...e,
51
- ...o
51
+ ...s
52
52
  }
53
53
  );
54
54
  case l.RADIOBUTTON:
55
- return /* @__PURE__ */ s(
55
+ return /* @__PURE__ */ o(
56
56
  C,
57
57
  {
58
58
  ...e,
59
- ...o
59
+ ...s
60
60
  }
61
61
  );
62
62
  case l.TEXTAREA:
63
- return /* @__PURE__ */ s(
63
+ return /* @__PURE__ */ o(
64
64
  T,
65
65
  {
66
66
  ...e,
67
- ...o
67
+ ...s
68
68
  }
69
69
  );
70
70
  }
@@ -75,7 +75,7 @@ const x = (r, t) => {
75
75
  parsedClasses: t,
76
76
  rules: [{ regExp: /help|is/gm, replacer: "" }]
77
77
  });
78
- return /* @__PURE__ */ s(
78
+ return /* @__PURE__ */ o(
79
79
  "p",
80
80
  {
81
81
  "data-testid": e,
@@ -87,17 +87,17 @@ const x = (r, t) => {
87
87
  testId: r = null,
88
88
  labelText: t,
89
89
  type: e,
90
- input: o,
91
- helper: m,
92
- isHorizontal: a
90
+ input: s,
91
+ helper: a,
92
+ isHorizontal: n
93
93
  }) => {
94
- const c = n(
95
- () => x(t, a),
96
- [t, a]
97
- ), d = n(
98
- () => F({ testId: r ?? void 0, type: e, input: o }),
99
- [r, e, o]
100
- ), i = n(() => N(m), [m]);
94
+ const c = m(
95
+ () => x(t, n),
96
+ [t, n]
97
+ ), d = m(
98
+ () => F({ testId: r ?? void 0, type: e, input: s }),
99
+ [r, e, s]
100
+ ), i = m(() => N(a), [a]);
101
101
  return /* @__PURE__ */ f(p, { children: [
102
102
  c,
103
103
  d,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "4.3.4",
3
+ "version": "4.3.5",
4
4
  "type": "module",
5
5
  "description": "A component library based on React, Bulma, Typescript and Vite",
6
6
  "keywords": [
@@ -102,6 +102,7 @@
102
102
  "eslint-plugin-storybook": "^0.11.1",
103
103
  "glob": "^11.0.0",
104
104
  "globals": "^15.14.0",
105
+ "husky": "^9.1.7",
105
106
  "hygen": "^6.2.11",
106
107
  "jest": "^29.7.0",
107
108
  "jest-environment-jsdom": "^29.7.0",