reactive-bulma 4.3.1 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,51 +1,53 @@
1
- import { jsxs as C, jsx as l } from "react/jsx-runtime";
2
- import { parseClasses as y, parseTestId as t } from "../../../functions/parsers.js";
3
- const a = (e) => e ? "-with-component" : "", g = ({
1
+ import { jsxs as y, jsx as t } from "react/jsx-runtime";
2
+ import { parseClasses as f, parseTestId as c } from "../../../functions/parsers.js";
3
+ const l = (e) => e ? "-with-component" : "", v = ({
4
4
  testId: e = null,
5
- containerTestId: c = null,
6
- cssClasses: o = null,
5
+ containerTestId: o = null,
6
+ cssClasses: a = null,
7
7
  containerCssClasses: n = null,
8
8
  style: d = null,
9
9
  containerStyle: i = null,
10
- content: s = null,
11
- name: r,
12
- isDisabled: p = null,
10
+ label: s = null,
11
+ isChecked: r,
12
+ name: h,
13
+ isDisabled: p = !1,
13
14
  onClick: x,
14
- onChange: b,
15
- onBlur: h
15
+ onChange: k,
16
+ onBlur: b
16
17
  }) => {
17
- const k = y([
18
+ const u = f([
18
19
  "checkbox",
19
20
  n
20
- ]), u = c ?? t({
21
+ ]), C = o ?? c({
21
22
  tag: "checkbox-container",
22
- parsedClasses: a(s)
23
- }), m = e ?? t({
23
+ parsedClasses: l(s)
24
+ }), m = e ?? c({
24
25
  tag: "checkbox",
25
- parsedClasses: a(s)
26
+ parsedClasses: l(s)
26
27
  });
27
- return /* @__PURE__ */ C(
28
+ return /* @__PURE__ */ y(
28
29
  "label",
29
30
  {
30
- "data-testid": u,
31
- className: k,
31
+ "data-testid": C,
32
+ className: u,
32
33
  style: i ?? void 0,
33
34
  children: [
34
- /* @__PURE__ */ l(
35
+ /* @__PURE__ */ t(
35
36
  "input",
36
37
  {
37
38
  "data-testid": m,
38
39
  type: "checkbox",
39
- name: r,
40
- className: o ?? void 0,
40
+ name: h,
41
+ className: a ?? void 0,
41
42
  style: d ?? void 0,
42
- disabled: p ?? !1,
43
+ defaultChecked: r,
44
+ disabled: p,
43
45
  onClick: x,
44
- onChange: b,
45
- onBlur: h
46
+ onChange: k,
47
+ onBlur: b
46
48
  }
47
49
  ),
48
- /* @__PURE__ */ l("p", { style: {
50
+ /* @__PURE__ */ t("p", { style: {
49
51
  display: "inline-block",
50
52
  marginLeft: "5px"
51
53
  }, children: s })
@@ -54,5 +56,5 @@ const a = (e) => e ? "-with-component" : "", g = ({
54
56
  );
55
57
  };
56
58
  export {
57
- g as default
59
+ v as default
58
60
  };
@@ -3,4 +3,5 @@ import { default as Checkbox } from '.';
3
3
  declare const _default: Meta<typeof Checkbox>;
4
4
  export default _default;
5
5
  export declare const BasicExample: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').CheckBoxProps>;
6
+ export declare const Checked: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').CheckBoxProps>;
6
7
  export declare const Disabled: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').CheckBoxProps>;
@@ -1,7 +1,7 @@
1
- import { jsx as m, jsxs as f } from "react/jsx-runtime";
2
- import { useMemo as C } from "react";
3
- import { parseClasses as B, parseTestId as b } from "../../../functions/parsers.js";
4
- const h = (d, t) => {
1
+ import { jsx as m, jsxs as B } from "react/jsx-runtime";
2
+ import { useMemo as f } from "react";
3
+ import { parseClasses as y, parseTestId as C } from "../../../functions/parsers.js";
4
+ const b = (d, t) => {
5
5
  const {
6
6
  testId: r = null,
7
7
  label: e,
@@ -13,7 +13,7 @@ const h = (d, t) => {
13
13
  onChange: i,
14
14
  onBlur: u
15
15
  } = d, c = r ?? `test-radio-button-item-${t}`;
16
- return /* @__PURE__ */ f(
16
+ return /* @__PURE__ */ B(
17
17
  "label",
18
18
  {
19
19
  className: "radio",
@@ -32,12 +32,15 @@ const h = (d, t) => {
32
32
  onBlur: u
33
33
  }
34
34
  ),
35
- e
35
+ /* @__PURE__ */ m("p", { style: {
36
+ display: "inline-block",
37
+ marginLeft: "5px"
38
+ }, children: e })
36
39
  ]
37
40
  },
38
41
  t
39
42
  );
40
- }, T = ({
43
+ }, x = ({
41
44
  containerTestId: d = null,
42
45
  containerCssClasses: t = null,
43
46
  containerStyle: r = null,
@@ -47,15 +50,15 @@ const h = (d, t) => {
47
50
  onChange: o,
48
51
  onBlur: n
49
52
  }) => {
50
- const l = B([
53
+ const l = y([
51
54
  "control",
52
55
  t
53
- ]), i = d ?? b({
56
+ ]), i = d ?? C({
54
57
  tag: "container-",
55
58
  parsedClasses: l
56
- }), u = C(
59
+ }), u = f(
57
60
  () => e.map(
58
- (c, p) => h(
61
+ (c, p) => b(
59
62
  {
60
63
  ...c,
61
64
  name: s,
@@ -79,5 +82,5 @@ const h = (d, t) => {
79
82
  );
80
83
  };
81
84
  export {
82
- T as default
85
+ x as default
83
86
  };
@@ -198,15 +198,17 @@ export interface FileProps extends ComposedElementProps, InteractiveProps, Named
198
198
  size?: ElementSizeType;
199
199
  }
200
200
  export interface CheckBoxProps extends ComposedElementProps, InteractiveOnChangeProps, NamedInputProps {
201
+ /** `Attribute` Shows the checkbox as checked or unchecked */
202
+ isChecked?: boolean;
201
203
  /** `Attribute` Sets checkbox's text that will be shown next to its control */
202
- content?: string;
204
+ label?: string;
203
205
  /** `Attribute` Will disable the checkbox */
204
206
  isDisabled?: boolean;
205
207
  }
206
208
  export interface RadioButtonItemProps extends Pick<ElementProps, 'testId' | 'style'>, InteractiveOnChangeProps, NamedInputProps {
207
- /** `Attribute` `Required` Sets checkbox's text*/
209
+ /** `Attribute` `Required` Sets radiobutton's text*/
208
210
  label: string;
209
- /** `Attribute` Shows the checkbox as checked or unchecked */
211
+ /** `Attribute` Shows the radiobutton as checked or unchecked */
210
212
  isChecked?: boolean;
211
213
  /** `Attribute` Will disable the checkbox */
212
214
  isDisabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "type": "module",
5
5
  "description": "A component library based on React, Bulma, Typescript and Vite",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  "prettier": "prettier src/**/*.{tsx,ts} --write",
42
42
  "prettier:ci": "prettier src/**/*.{tsx,ts} --check",
43
43
  "lint-staged": "lint-staged -v",
44
- "setup": "npm ci && husky",
44
+ "setup": "npm ci",
45
45
  "compile": "tsc -b",
46
46
  "build": "npm run compile && vite build",
47
47
  "build:storybook": "storybook build",
@@ -102,7 +102,6 @@
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",
106
105
  "hygen": "^6.2.11",
107
106
  "jest": "^29.7.0",
108
107
  "jest-environment-jsdom": "^29.7.0",