lkd-web-kit 0.7.7 → 0.7.8

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.
@@ -10,7 +10,13 @@ const FormCheckbox = withController.withController(({ field, props }) => /* @__P
10
10
  core.Checkbox,
11
11
  {
12
12
  ...field,
13
- checked: field.value,
13
+ checked: Boolean(field.value),
14
+ onChange: (e) => {
15
+ if (props.value)
16
+ field.onChange(e.currentTarget.checked ? props.value : "");
17
+ else
18
+ field.onChange(e.currentTarget.checked);
19
+ },
14
20
  ...props
15
21
  }
16
22
  ));
@@ -6,7 +6,13 @@ const FormCheckbox = withController(({ field, props }) => /* @__PURE__ */ jsx(
6
6
  Checkbox,
7
7
  {
8
8
  ...field,
9
- checked: field.value,
9
+ checked: Boolean(field.value),
10
+ onChange: (e) => {
11
+ if (props.value)
12
+ field.onChange(e.currentTarget.checked ? props.value : "");
13
+ else
14
+ field.onChange(e.currentTarget.checked);
15
+ },
10
16
  ...props
11
17
  }
12
18
  ));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkd-web-kit",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "A template for creating React component libraries with Vite.",
5
5
  "author": "LKD",
6
6
  "license": "MIT",