@sheinx/base 3.0.5 → 3.0.7
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.
package/cjs/cascader/cascader.js
CHANGED
|
@@ -619,7 +619,7 @@ var Cascader = function Cascader(props0) {
|
|
|
619
619
|
minWidth: '100%'
|
|
620
620
|
} : {};
|
|
621
621
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({
|
|
622
|
-
tabIndex: disabled === true ?
|
|
622
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
623
623
|
}, _hooks.util.getDataAttribute(_defineProperty({}, 'input-border', 'true'))), {}, {
|
|
624
624
|
className: rootClass,
|
|
625
625
|
style: rootStyle,
|
|
@@ -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;;;;;;;;;;
|
|
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
|
|
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,
|
package/esm/cascader/cascader.js
CHANGED
|
@@ -612,7 +612,7 @@ var Cascader = function Cascader(props0) {
|
|
|
612
612
|
minWidth: '100%'
|
|
613
613
|
} : {};
|
|
614
614
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
615
|
-
tabIndex: disabled === true ?
|
|
615
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
616
616
|
}, util.getDataAttribute(_defineProperty({}, 'input-border', 'true'))), {}, {
|
|
617
617
|
className: rootClass,
|
|
618
618
|
style: rootStyle,
|
|
@@ -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;;;;;;;;;;
|
|
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
|
|
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.
|
|
3
|
+
"version": "3.0.7",
|
|
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.
|
|
13
|
+
"@sheinx/hooks": "3.0.7",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.2"
|