reactive-bulma 5.0.3 → 5.0.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Nicolás Omar González Passerino
3
+ Copyright (c) 2025 Nicolás Omar González Passerino
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,67 +1,77 @@
1
- import { jsxs as C, jsx as l } from "react/jsx-runtime";
2
- import { useMemo as t } from "react";
3
- import { parseClasses as g, parseTestId as n } from "../../../functions/parsers.js";
4
- const a = (s) => s ? "-with-component" : "", I = ({
1
+ import { jsxs as g, jsx as n } from "react/jsx-runtime";
2
+ import { useMemo as o } from "react";
3
+ import { parseClasses as v, parseTestId as a } from "../../../functions/parsers.js";
4
+ const d = (s) => s ? "-with-component" : "", N = ({
5
5
  testId: s = null,
6
- containerTestId: o = null,
7
- cssClasses: d = null,
8
- containerCssClasses: c = null,
9
- style: i = null,
10
- containerStyle: r = null,
6
+ containerTestId: c = null,
7
+ cssClasses: i = null,
8
+ containerCssClasses: l = null,
9
+ style: r = null,
10
+ containerStyle: h = null,
11
11
  label: e = null,
12
12
  isChecked: p,
13
- name: h,
14
- isDisabled: x = !1,
15
- onClick: k,
16
- onChange: u,
17
- onBlur: m
13
+ name: t,
14
+ value: x,
15
+ isDisabled: k = !1,
16
+ onClick: u,
17
+ onChange: m,
18
+ onBlur: b
18
19
  }) => {
19
- const b = t(
20
- () => g(["checkbox", c]),
21
- [c]
22
- ), f = t(
23
- () => o ?? n({
20
+ const f = o(
21
+ () => v(["checkbox", l]),
22
+ [l]
23
+ ), y = o(
24
+ () => c ?? a({
24
25
  tag: "checkbox-container",
25
- parsedClasses: a(e)
26
+ parsedClasses: d(e)
26
27
  }),
27
- [o, e]
28
- ), y = t(
29
- () => s ?? n({
28
+ [c, e]
29
+ ), C = o(
30
+ () => s ?? a({
30
31
  tag: "checkbox",
31
- parsedClasses: a(e)
32
+ parsedClasses: d(e)
32
33
  }),
33
34
  [s, e]
34
35
  );
35
- return /* @__PURE__ */ C(
36
- "label",
36
+ return /* @__PURE__ */ g(
37
+ "section",
37
38
  {
38
- "data-testid": f,
39
- className: b,
40
- style: r ?? void 0,
39
+ "data-testid": y,
40
+ className: f,
41
+ style: h ?? void 0,
41
42
  children: [
42
- /* @__PURE__ */ l(
43
+ /* @__PURE__ */ n(
43
44
  "input",
44
45
  {
45
- "data-testid": y,
46
+ id: t,
47
+ "data-testid": C,
46
48
  type: "checkbox",
47
- name: h,
48
- className: d ?? void 0,
49
- style: i ?? void 0,
49
+ name: t,
50
+ value: x,
51
+ className: i ?? void 0,
52
+ style: r ?? void 0,
50
53
  defaultChecked: p,
51
- disabled: x,
52
- onClick: k,
53
- onChange: u,
54
- onBlur: m
54
+ disabled: k,
55
+ onClick: u,
56
+ onChange: m,
57
+ onBlur: b
55
58
  }
56
59
  ),
57
- /* @__PURE__ */ l("p", { style: {
58
- display: "inline-block",
59
- marginLeft: "5px"
60
- }, children: e })
60
+ /* @__PURE__ */ n(
61
+ "label",
62
+ {
63
+ style: {
64
+ display: "inline-block",
65
+ marginLeft: "5px"
66
+ },
67
+ htmlFor: t,
68
+ children: e
69
+ }
70
+ )
61
71
  ]
62
72
  }
63
73
  );
64
74
  };
65
75
  export {
66
- I as default
76
+ N as default
67
77
  };
@@ -1,21 +1,21 @@
1
1
  import { jsxs as B, jsx as e } from "react/jsx-runtime";
2
2
  import { useMemo as h } from "react";
3
- import { parseClasses as x, parseTestId as I } from "../../../functions/parsers.js";
4
- import { generateKey as f } from "../../../functions/generators.js";
3
+ import { parseClasses as v, parseTestId as x } from "../../../functions/parsers.js";
4
+ import { generateKey as I } from "../../../functions/generators.js";
5
5
  const N = ({
6
6
  containerTestId: o = null,
7
7
  containerCssClasses: n = null,
8
- containerStyle: c = null,
8
+ containerStyle: u = null,
9
9
  options: s,
10
10
  name: a,
11
11
  onClick: r,
12
12
  onChange: d,
13
13
  onBlur: l
14
14
  }) => {
15
- const i = x([
15
+ const i = v([
16
16
  "control",
17
17
  n
18
- ]), u = o ?? I({
18
+ ]), c = o ?? x({
19
19
  tag: "container-",
20
20
  parsedClasses: i
21
21
  }), m = h(
@@ -36,6 +36,7 @@ const N = ({
36
36
  type: "radio",
37
37
  style: t.style ?? void 0,
38
38
  name: a,
39
+ value: t.value,
39
40
  defaultChecked: t.isChecked,
40
41
  disabled: t.isDisabled,
41
42
  onClick: r,
@@ -46,7 +47,7 @@ const N = ({
46
47
  /* @__PURE__ */ e("p", { style: b, children: t.label })
47
48
  ]
48
49
  },
49
- `radio-button-item-${f()}`
50
+ `radio-button-item-${I()}`
50
51
  );
51
52
  }),
52
53
  [s, a, r, d, l]
@@ -54,9 +55,9 @@ const N = ({
54
55
  return /* @__PURE__ */ e(
55
56
  "section",
56
57
  {
57
- "data-testid": u,
58
+ "data-testid": c,
58
59
  className: i,
59
- style: c ?? void 0,
60
+ style: u ?? void 0,
60
61
  children: m
61
62
  }
62
63
  );
@@ -211,6 +211,8 @@ export interface FileProps extends ComposedElementProps, InteractiveProps, Named
211
211
  size?: SizeWithNormalType;
212
212
  }
213
213
  export interface CheckBoxProps extends ComposedElementProps, InteractiveOnChangeProps, NamedInputProps {
214
+ /** `Attribute` `Required` Sets checkbox's value */
215
+ value: string | number;
214
216
  /** `Attribute` Shows the checkbox as checked or unchecked */
215
217
  isChecked?: boolean;
216
218
  /** `Attribute` Sets checkbox's text that will be shown next to its control */
@@ -219,8 +221,10 @@ export interface CheckBoxProps extends ComposedElementProps, InteractiveOnChange
219
221
  isDisabled?: boolean;
220
222
  }
221
223
  export interface RadioButtonItemProps extends Pick<ElementProps, 'testId' | 'style'>, InteractiveOnChangeProps, NamedInputProps {
222
- /** `Attribute` `Required` Sets radiobutton's text*/
224
+ /** `Attribute` `Required` Sets radiobutton's text */
223
225
  label: string;
226
+ /** `Attribute` `Required` Sets radiobutton's value */
227
+ value: string | number;
224
228
  /** `Attribute` Shows the radiobutton as checked or unchecked */
225
229
  isChecked?: boolean;
226
230
  /** `Attribute` Will disable the checkbox */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "type": "module",
5
5
  "description": "A component library based on React, Bulma, Typescript and Vite",
6
6
  "keywords": [
@@ -59,40 +59,40 @@
59
59
  "@babel/preset-react": "^7.28.5",
60
60
  "@babel/preset-typescript": "^7.28.5",
61
61
  "@eslint/compat": "^2.0.0",
62
- "@eslint/js": "^9.39.1",
62
+ "@eslint/js": "^9.39.2",
63
63
  "@mdi/font": "^7.4.47",
64
64
  "@semantic-release/changelog": "^6.0.3",
65
65
  "@semantic-release/commit-analyzer": "^13.0.1",
66
66
  "@semantic-release/exec": "^7.1.0",
67
67
  "@semantic-release/git": "^10.0.1",
68
68
  "@semantic-release/github": "^12.0.2",
69
- "@semantic-release/npm": "^13.1.2",
69
+ "@semantic-release/npm": "^13.1.3",
70
70
  "@semantic-release/release-notes-generator": "^14.1.0",
71
- "@storybook/addon-docs": "^10.1.4",
72
- "@storybook/addon-links": "^10.1.4",
73
- "@storybook/addon-onboarding": "^10.1.4",
74
- "@storybook/addon-themes": "^10.1.4",
75
- "@storybook/react-vite": "^10.1.4",
71
+ "@storybook/addon-docs": "^10.1.8",
72
+ "@storybook/addon-links": "^10.1.8",
73
+ "@storybook/addon-onboarding": "^10.1.8",
74
+ "@storybook/addon-themes": "^10.1.8",
75
+ "@storybook/react-vite": "^10.1.8",
76
76
  "@testing-library/jest-dom": "^6.9.1",
77
77
  "@testing-library/react": "^16.3.0",
78
78
  "@testing-library/user-event": "^14.6.1",
79
79
  "@types/css-modules": "^1.0.5",
80
80
  "@types/jest": "^30.0.0",
81
- "@types/node": "^24.10.1",
81
+ "@types/node": "^25.0.2",
82
82
  "@types/react": "^19.2.7",
83
83
  "@types/react-dom": "^19.2.3",
84
- "@typescript-eslint/eslint-plugin": "^8.48.1",
85
- "@typescript-eslint/parser": "^8.48.1",
86
- "@vitejs/plugin-react": "^5.1.1",
84
+ "@typescript-eslint/eslint-plugin": "^8.49.0",
85
+ "@typescript-eslint/parser": "^8.49.0",
86
+ "@vitejs/plugin-react": "^5.1.2",
87
87
  "babel-jest": "^30.2.0",
88
88
  "babel-loader": "^10.0.0",
89
89
  "bulma": "^1.0.4",
90
- "eslint": "^9.39.1",
90
+ "eslint": "^9.39.2",
91
91
  "eslint-config-prettier": "^10.1.8",
92
92
  "eslint-plugin-react": "^7.37.5",
93
93
  "eslint-plugin-react-hooks": "^7.0.1",
94
94
  "eslint-plugin-react-refresh": "^0.4.24",
95
- "eslint-plugin-storybook": "^10.1.4",
95
+ "eslint-plugin-storybook": "^10.1.8",
96
96
  "glob": "^13.0.0",
97
97
  "globals": "^16.5.0",
98
98
  "husky": "^9.1.7",
@@ -100,16 +100,16 @@
100
100
  "jest": "^30.2.0",
101
101
  "jest-environment-jsdom": "^30.2.0",
102
102
  "lint-staged": "^16.2.7",
103
- "npm-check-updates": "^19.1.2",
103
+ "npm-check-updates": "^19.2.0",
104
104
  "prettier": "^3.7.4",
105
- "react": "^19.2.1",
106
- "react-dom": "^19.2.1",
105
+ "react": "^19.2.3",
106
+ "react-dom": "^19.2.3",
107
107
  "semantic-release": "^25.0.2",
108
- "storybook": "^10.1.4",
108
+ "storybook": "^10.1.8",
109
109
  "tslib": "^2.8.1",
110
110
  "typescript": "~5.9.3",
111
- "typescript-eslint": "^8.48.1",
112
- "vite": "^7.2.6",
111
+ "typescript-eslint": "^8.49.0",
112
+ "vite": "^7.2.7",
113
113
  "vite-plugin-dts": "^4.5.4"
114
114
  },
115
115
  "lint-staged": {