@sheinx/base 3.4.4-beta.4 → 3.4.4-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;AAoC1B,wBAAiC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;AA6C1B,wBAAiC"}
@@ -39,7 +39,17 @@ var Input = function Input(props) {
39
39
  var forwardProps = _hooks.util.removeProps(commonProps, _objectSpread({}, inputFormatParams));
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_simpleInput.default, _objectSpread(_objectSpread(_objectSpread({}, forwardProps), inputFormatProps), {}, {
41
41
  value: (_inputFormatProps$val = inputFormatProps.value) !== null && _inputFormatProps$val !== void 0 ? _inputFormatProps$val : '',
42
- hasSuffix: !!props.suffix
42
+ hasSuffix: !!props.suffix,
43
+ onKeyDown: function onKeyDown(e) {
44
+ var _props$onKeyDown;
45
+ e.preventDefault();
46
+ if (e.key === 'Enter' && !e.defaultPrevented) {
47
+ var _props$onChange;
48
+ var value = e.target.value;
49
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, value);
50
+ }
51
+ (_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 || _props$onKeyDown.call(props, e);
52
+ }
43
53
  }));
44
54
  };
45
55
  var _default = exports.default = /*#__PURE__*/_react.default.memo(Input);
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;AAoC1B,wBAAiC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;AA6C1B,wBAAiC"}
@@ -32,7 +32,17 @@ var Input = function Input(props) {
32
32
  var forwardProps = util.removeProps(commonProps, _objectSpread({}, inputFormatParams));
33
33
  return /*#__PURE__*/_jsx(SimpleInputInput, _objectSpread(_objectSpread(_objectSpread({}, forwardProps), inputFormatProps), {}, {
34
34
  value: (_inputFormatProps$val = inputFormatProps.value) !== null && _inputFormatProps$val !== void 0 ? _inputFormatProps$val : '',
35
- hasSuffix: !!props.suffix
35
+ hasSuffix: !!props.suffix,
36
+ onKeyDown: function onKeyDown(e) {
37
+ var _props$onKeyDown;
38
+ e.preventDefault();
39
+ if (e.key === 'Enter' && !e.defaultPrevented) {
40
+ var _props$onChange;
41
+ var value = e.target.value;
42
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, value);
43
+ }
44
+ (_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 || _props$onKeyDown.call(props, e);
45
+ }
36
46
  }));
37
47
  };
38
48
  export default /*#__PURE__*/React.memo(Input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.4.4-beta.4",
3
+ "version": "3.4.4-beta.5",
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.4.4-beta.4",
13
+ "@sheinx/hooks": "3.4.4-beta.5",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"