@sheinx/base 3.3.6 → 3.3.7-beta.1

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 +1 @@
1
- {"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["checkbox-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQ3D,QAAA,MAAM,KAAK;;;oBA2FG,GAAG;wBACC,GAAG;;CAHpB,CAAC;AAMF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["checkbox-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQ3D,QAAA,MAAM,KAAK;;;oBAiGG,GAAG;wBACC,GAAG;;CAHpB,CAAC;AAMF,eAAe,KAAK,CAAC"}
@@ -48,6 +48,10 @@ var Group = function Group(props0) {
48
48
  } else {
49
49
  datum.remove(raw);
50
50
  }
51
+ if (children && /*#__PURE__*/_react.default.isValidElement(children)) {
52
+ var _children$props$onCha, _children$props;
53
+ (_children$props$onCha = (_children$props = children.props).onChange) === null || _children$props$onCha === void 0 || _children$props$onCha.call(_children$props, checked ? children.props.htmlValue : undefined, checked, children.props.htmlValue);
54
+ }
51
55
  });
52
56
  var isChecked = (0, _hooks.usePersistFn)(function (d) {
53
57
  return datum.check(d);
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["checkbox-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQ3D,QAAA,MAAM,KAAK;;;oBA2FG,GAAG;wBACC,GAAG;;CAHpB,CAAC;AAMF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["checkbox-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQ3D,QAAA,MAAM,KAAK;;;oBAiGG,GAAG;wBACC,GAAG;;CAHpB,CAAC;AAMF,eAAe,KAAK,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useInputAble, useListSelectMultiple, usePersistFn, util } from '@sheinx/hooks';
2
- import groupContext from "./group-context";
2
+ import GroupContext from "./group-context";
3
3
  import Checkbox from "./checkbox";
4
4
  import React from 'react';
5
5
  import classNames from 'classnames';
@@ -42,6 +42,10 @@ var Group = function Group(props0) {
42
42
  } else {
43
43
  datum.remove(raw);
44
44
  }
45
+ if (children && /*#__PURE__*/React.isValidElement(children)) {
46
+ var _children$props$onCha, _children$props;
47
+ (_children$props$onCha = (_children$props = children.props).onChange) === null || _children$props$onCha === void 0 || _children$props$onCha.call(_children$props, checked ? children.props.htmlValue : undefined, checked, children.props.htmlValue);
48
+ }
45
49
  });
46
50
  var isChecked = usePersistFn(function (d) {
47
51
  return datum.check(d);
@@ -67,7 +71,7 @@ var Group = function Group(props0) {
67
71
  return /*#__PURE__*/_jsx("div", {
68
72
  className: groupClass,
69
73
  style: style,
70
- children: /*#__PURE__*/_jsx(groupContext.Provider, {
74
+ children: /*#__PURE__*/_jsx(GroupContext.Provider, {
71
75
  value: providerValue,
72
76
  children: children
73
77
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.3.6",
3
+ "version": "3.3.7-beta.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.3.6",
13
+ "@sheinx/hooks": "3.3.7-beta.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"