reactive-bulma 5.0.5 → 5.0.6

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,17 +1,17 @@
1
- import { jsxs as i, Fragment as p, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as i, Fragment as d, jsx as t } from "react/jsx-runtime";
2
2
  import { useMemo as l } from "react";
3
- import d from "../../atoms/Button/index.js";
3
+ import p from "../../atoms/Button/index.js";
4
4
  import T from "../../atoms/TextArea/index.js";
5
5
  import h from "../../atoms/Select/index.js";
6
- import N from "../../atoms/Checkbox/index.js";
7
- import g from "../../atoms/RadioButton/index.js";
6
+ import g from "../../atoms/Checkbox/index.js";
7
+ import N from "../../atoms/RadioButton/index.js";
8
8
  import b from "../InputControl/index.js";
9
- import { FormFieldType as n } from "../../../interfaces/moleculeProps.js";
9
+ import { FormFieldType as e } from "../../../interfaces/moleculeProps.js";
10
10
  const a = ({ testId: c, element: o, isHorizontal: s }) => {
11
11
  if (o === null) return null;
12
- const e = {
12
+ const n = {
13
13
  testId: o.config?.testId ?? c ?? `test-form-field-${o.type}`,
14
- containerTestId: c ?? `test-form-field-container-${o.type}`
14
+ containerTestId: o.config?.containerTestId ?? c ?? `test-form-field-container-${o.type}`
15
15
  }, r = o.fieldLabel ? /* @__PURE__ */ t(
16
16
  "label",
17
17
  {
@@ -21,67 +21,67 @@ const a = ({ testId: c, element: o, isHorizontal: s }) => {
21
21
  }
22
22
  ) : null;
23
23
  switch (o.type) {
24
- case n.INPUT:
24
+ case e.INPUT:
25
25
  return /* @__PURE__ */ t(
26
26
  b,
27
27
  {
28
28
  ...o.config,
29
- ...e,
29
+ ...n,
30
30
  isHorizontal: s
31
31
  }
32
32
  );
33
- case n.SELECT:
33
+ case e.SELECT:
34
34
  return /* @__PURE__ */ i("section", { className: "control", children: [
35
35
  r,
36
36
  /* @__PURE__ */ t(
37
37
  h,
38
38
  {
39
39
  ...o.config,
40
- ...e
40
+ ...n
41
41
  }
42
42
  )
43
43
  ] });
44
- case n.CHECKBOX:
44
+ case e.CHECKBOX:
45
45
  return /* @__PURE__ */ i("section", { className: "control", children: [
46
46
  r,
47
47
  /* @__PURE__ */ t(
48
- N,
48
+ g,
49
49
  {
50
50
  ...o.config,
51
- ...e
51
+ ...n
52
52
  }
53
53
  )
54
54
  ] });
55
- case n.RADIOBUTTON:
55
+ case e.RADIOBUTTON:
56
56
  return /* @__PURE__ */ i("section", { className: "control", children: [
57
57
  r,
58
58
  /* @__PURE__ */ t(
59
- g,
59
+ N,
60
60
  {
61
61
  ...o.config,
62
- ...e
62
+ ...n
63
63
  }
64
64
  )
65
65
  ] });
66
- case n.TEXTAREA:
66
+ case e.TEXTAREA:
67
67
  return /* @__PURE__ */ i("section", { className: "control", children: [
68
68
  r,
69
69
  /* @__PURE__ */ t(
70
70
  T,
71
71
  {
72
72
  ...o.config,
73
- ...e
73
+ ...n
74
74
  }
75
75
  )
76
76
  ] });
77
- case n.BUTTON:
77
+ case e.BUTTON:
78
78
  return /* @__PURE__ */ i("section", { className: "control", children: [
79
79
  r,
80
80
  /* @__PURE__ */ t(
81
- d,
81
+ p,
82
82
  {
83
83
  ...o.config,
84
- ...e
84
+ ...n
85
85
  }
86
86
  )
87
87
  ] });
@@ -90,7 +90,7 @@ const a = ({ testId: c, element: o, isHorizontal: s }) => {
90
90
  testId: c,
91
91
  mainInput: o,
92
92
  leftInput: s = null,
93
- rightInput: e = null,
93
+ rightInput: n = null,
94
94
  isHorizontal: r = !1
95
95
  }) => {
96
96
  const f = l(
@@ -100,10 +100,10 @@ const a = ({ testId: c, element: o, isHorizontal: s }) => {
100
100
  () => a({ testId: c, element: s, isHorizontal: r }),
101
101
  [c, s, r]
102
102
  ), u = l(
103
- () => a({ testId: c, element: e, isHorizontal: r }),
104
- [c, e, r]
103
+ () => a({ testId: c, element: n, isHorizontal: r }),
104
+ [c, n, r]
105
105
  );
106
- return /* @__PURE__ */ i(p, { children: [
106
+ return /* @__PURE__ */ i(d, { children: [
107
107
  m,
108
108
  f,
109
109
  u
@@ -1,65 +1,60 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useMemo as I } from "react";
3
- import t from "../../molecules/FormFieldInput/index.js";
4
- import { parseClasses as h, parseTestId as A } from "../../../functions/parsers.js";
5
- import { generateKey as m } from "../../../functions/generators.js";
6
- const N = ({
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useMemo as F } from "react";
3
+ import s from "../../molecules/FormFieldInput/index.js";
4
+ import { parseClasses as I, parseTestId as h } from "../../../functions/parsers.js";
5
+ import { generateKey as n } from "../../../functions/generators.js";
6
+ const K = ({
7
7
  testId: c = null,
8
- cssClasses: i = null,
9
- style: u = null,
8
+ cssClasses: u = null,
9
+ style: i = null,
10
10
  inputsConfig: e,
11
- isHorizontal: r = !1,
12
- isGrouped: s = !1,
13
- withAddons: p = !1
11
+ isHorizontal: l = !1,
12
+ isGrouped: o = !1,
13
+ withAddons: y = !1
14
14
  }) => {
15
- const a = h([
15
+ const a = I([
16
16
  "field",
17
- r ? "is-horizontal" : null,
18
- s ? "is-grouped" : null,
19
- p ? "has-addons" : null,
20
- i
21
- ]), y = c ?? A({ tag: "field", parsedClasses: a }), d = I(() => {
22
- const n = s ? `grouped-input-control-body-${m()}` : `input-control-body-${m()}`;
23
- if (s)
24
- return Array.isArray(e) ? e.map((l, f) => {
25
- const F = {
26
- ...l,
27
- isHorizontal: l.isHorizontal ?? r,
28
- testId: `test-grouped-input-control-${f}`
29
- };
30
- return /* @__PURE__ */ o(
31
- t,
32
- {
33
- ...F
34
- },
35
- n
36
- );
37
- }) : /* @__PURE__ */ o(
38
- t,
17
+ l ? "is-horizontal" : null,
18
+ o ? "is-grouped" : null,
19
+ y ? "has-addons" : null,
20
+ u
21
+ ]), p = c ?? h({ tag: "field", parsedClasses: a }), d = F(() => {
22
+ const m = o ? `grouped-input-control-body-${n()}` : `input-control-body-${n()}`;
23
+ if (o)
24
+ return Array.isArray(e) ? e.map((r, f) => /* @__PURE__ */ t(
25
+ s,
26
+ {
27
+ ...r,
28
+ isHorizontal: r.isHorizontal ?? l,
29
+ testId: r.testId ?? `test-grouped-input-control-${f}`
30
+ },
31
+ m
32
+ )) : /* @__PURE__ */ t(
33
+ s,
39
34
  {
40
35
  ...e,
41
- isHorizontal: e.isHorizontal ?? r
36
+ isHorizontal: e.isHorizontal ?? l
42
37
  },
43
- n
38
+ m
44
39
  );
45
40
  {
46
- const l = Array.isArray(e) ? null : {
41
+ const r = Array.isArray(e) ? null : {
47
42
  ...e,
48
- isHorizontal: e.isHorizontal ?? r
43
+ isHorizontal: e.isHorizontal ?? l
49
44
  };
50
- return l !== null ? /* @__PURE__ */ o(t, { ...l }) : null;
45
+ return r !== null ? /* @__PURE__ */ t(s, { ...r }) : null;
51
46
  }
52
- }, [e, s, r]);
53
- return /* @__PURE__ */ o(
47
+ }, [e, o, l]);
48
+ return /* @__PURE__ */ t(
54
49
  "section",
55
50
  {
56
- "data-testid": y,
51
+ "data-testid": p,
57
52
  className: a,
58
- style: u ?? void 0,
59
- children: r ? /* @__PURE__ */ o("section", { className: "field-body", children: d }) : d
53
+ style: i ?? void 0,
54
+ children: l ? /* @__PURE__ */ t("section", { className: "field-body", children: d }) : d
60
55
  }
61
56
  );
62
57
  };
63
58
  export {
64
- N as default
59
+ K as default
65
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "type": "module",
5
5
  "description": "A component library based on React, Bulma, Typescript and Vite",
6
6
  "keywords": [