reactive-bulma 4.3.4 → 4.3.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.
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsxs as f, Fragment as p, jsx as
|
2
|
-
import { useMemo as
|
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__ */
|
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__ */
|
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
|
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__ */
|
31
|
+
return /* @__PURE__ */ o(
|
32
32
|
E,
|
33
33
|
{
|
34
34
|
...e,
|
35
|
-
...
|
35
|
+
...s
|
36
36
|
}
|
37
37
|
);
|
38
38
|
case l.SELECT:
|
39
|
-
return /* @__PURE__ */
|
39
|
+
return /* @__PURE__ */ o(
|
40
40
|
h,
|
41
41
|
{
|
42
42
|
...e,
|
43
|
-
...
|
43
|
+
...s
|
44
44
|
}
|
45
45
|
);
|
46
46
|
case l.CHECKBOX:
|
47
|
-
return /* @__PURE__ */
|
47
|
+
return /* @__PURE__ */ o(
|
48
48
|
b,
|
49
49
|
{
|
50
50
|
...e,
|
51
|
-
...
|
51
|
+
...s
|
52
52
|
}
|
53
53
|
);
|
54
54
|
case l.RADIOBUTTON:
|
55
|
-
return /* @__PURE__ */
|
55
|
+
return /* @__PURE__ */ o(
|
56
56
|
C,
|
57
57
|
{
|
58
58
|
...e,
|
59
|
-
...
|
59
|
+
...s
|
60
60
|
}
|
61
61
|
);
|
62
62
|
case l.TEXTAREA:
|
63
|
-
return /* @__PURE__ */
|
63
|
+
return /* @__PURE__ */ o(
|
64
64
|
T,
|
65
65
|
{
|
66
66
|
...e,
|
67
|
-
...
|
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__ */
|
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:
|
91
|
-
helper:
|
92
|
-
isHorizontal:
|
90
|
+
input: s,
|
91
|
+
helper: a,
|
92
|
+
isHorizontal: n
|
93
93
|
}) => {
|
94
|
-
const c =
|
95
|
-
() => x(t,
|
96
|
-
[t,
|
97
|
-
), d =
|
98
|
-
() => F({ testId: r ?? void 0, type: e, input:
|
99
|
-
[r, e,
|
100
|
-
), i =
|
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.
|
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",
|