@sheinx/base 3.0.5 → 3.0.6

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":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;gCAsG8B,OAAO;;;;;;;gBAQnB,gBAAgB,CAAC,gBAAgB,CAAC;CAsBvE,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;gCAuG8B,OAAO;;;;;;;gBAQnB,gBAAgB,CAAC,gBAAgB,CAAC;CAsBvE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -91,7 +91,7 @@ var useInputCommon = function useInputCommon(props0) {
91
91
  delay: delay
92
92
  });
93
93
  var hasValue = function hasValue(value) {
94
- return value === 0 || value && value.length;
94
+ return _hooks.util.isNumber(value) && !_hooks.util.isNan(value) || value && value.length;
95
95
  };
96
96
  var renderInput = (0, _useInnerTitle.default)({
97
97
  innerTitle: innerTitle,
@@ -1 +1 @@
1
- {"version":3,"file":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;gCAsG8B,OAAO;;;;;;;gBAQnB,gBAAgB,CAAC,gBAAgB,CAAC;CAsBvE,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;gCAuG8B,OAAO;;;;;;;gBAQnB,gBAAgB,CAAC,gBAAgB,CAAC;CAsBvE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -14,7 +14,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
15
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
16
  import React, { useMemo } from 'react';
17
- import { useInputAble, usePersistFn } from '@sheinx/hooks';
17
+ import { useInputAble, usePersistFn, util } from '@sheinx/hooks';
18
18
  import useClear from "../common/use-clear";
19
19
  import useInnerTitle from "../common/use-inner-title";
20
20
  import useTip from "../common/use-tip";
@@ -83,7 +83,7 @@ var useInputCommon = function useInputCommon(props0) {
83
83
  delay: delay
84
84
  });
85
85
  var hasValue = function hasValue(value) {
86
- return value === 0 || value && value.length;
86
+ return util.isNumber(value) && !util.isNan(value) || value && value.length;
87
87
  };
88
88
  var renderInput = useInnerTitle({
89
89
  innerTitle: innerTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
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.0.5",
13
+ "@sheinx/hooks": "3.0.6",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.2"