@nutui/nutui-react 2.3.10 → 2.3.12-beta.0
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/CHANGELOG.md +9 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +3 -13
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +0 -13
- package/dist/esm/Animate/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers.js +9 -25
- package/dist/esm/Audio/style/style.css +1 -1
- package/dist/esm/BackTop.js +1 -1
- package/dist/esm/Badge/style/style.css +1 -1
- package/dist/esm/Badge.js +0 -3
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Button.js +0 -4
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +0 -17
- package/dist/esm/Checkbox/style/style.css +1 -1
- package/dist/esm/Checkbox.js +0 -6
- package/dist/esm/CheckboxGroup/style/style.css +1 -1
- package/dist/esm/CheckboxGroup.js +0 -3
- package/dist/esm/Col/style/style.css +1 -1
- package/dist/esm/Collapse/style/style.css +1 -1
- package/dist/esm/CollapseItem/style/style.css +1 -1
- package/dist/esm/CollapseItem.js +0 -3
- package/dist/esm/ConfigProvider.js +0 -2
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -8
- package/dist/esm/Divider/style/style.css +1 -1
- package/dist/esm/Elevator.js +2 -1
- package/dist/esm/Empty.js +0 -1
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/FormItem.js +0 -3
- package/dist/esm/Grid/style/style.css +1 -1
- package/dist/esm/Grid.js +0 -1
- package/dist/esm/GridItem/style/style.css +1 -1
- package/dist/esm/GridItem.js +0 -4
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/Indicator/style/style.css +1 -1
- package/dist/esm/Indicator.js +0 -2
- package/dist/esm/Input.js +4 -1
- package/dist/esm/InputNumber.js +107 -161
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/Menu.js +0 -9
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +0 -13
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NoticeBar/style/style.css +1 -1
- package/dist/esm/Notify.js +10 -27
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Overlay.js +0 -8
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Picker.js +0 -7
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +0 -1
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/Popup.js +0 -12
- package/dist/esm/Price/style/style.css +1 -1
- package/dist/esm/PullToRefresh.js +0 -1
- package/dist/esm/Radio/style/style.css +1 -1
- package/dist/esm/Radio.js +0 -6
- package/dist/esm/RadioGroup/style/style.css +1 -1
- package/dist/esm/RadioGroup.js +0 -3
- package/dist/esm/Range/style/style.css +1 -1
- package/dist/esm/SafeArea.js +0 -2
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +1 -4
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/Skeleton/style/style.css +1 -1
- package/dist/esm/Skeleton.js +2 -4
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/Sticky.js +0 -1
- package/dist/esm/Swipe/style/style.css +1 -1
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Switch/style/style.css +1 -1
- package/dist/esm/Tabbar/style/style.css +1 -1
- package/dist/esm/Tabbar.js +0 -1
- package/dist/esm/TabbarItem/style/style.css +1 -1
- package/dist/esm/TabbarItem.js +0 -4
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +0 -7
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/Toast.js +10 -32
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/cascader2.js +14 -15
- package/dist/esm/formitem2.js +10 -26
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +15 -15
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +15 -17
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +339 -367
- package/dist/nutui.react.umd.js +339 -367
- package/dist/packages/animate/animate.scss +0 -27
- package/dist/packages/audio/audio.scss +0 -5
- package/dist/packages/avatarcropper/avatarcropper.scss +0 -2
- package/dist/packages/badge/badge.scss +7 -0
- package/dist/packages/barrage/barrage.scss +22 -3
- package/dist/packages/button/button.scss +0 -1
- package/dist/packages/calendar/calendar.scss +4 -4
- package/dist/packages/calendarcard/calendarcard.scss +0 -1
- package/dist/packages/cascader/cascader.scss +0 -1
- package/dist/packages/checkbox/checkbox.scss +0 -2
- package/dist/packages/checkboxgroup/checkboxgroup.scss +1 -3
- package/dist/packages/col/col.scss +2 -2
- package/dist/packages/collapseitem/collapseitem.scss +2 -3
- package/dist/packages/dialog/dialog.scss +4 -0
- package/dist/packages/divider/divider.scss +1 -1
- package/dist/packages/fixednav/fixednav.scss +0 -2
- package/dist/packages/form/form.scss +24 -26
- package/dist/packages/formitem/formitem.scss +0 -1
- package/dist/packages/grid/grid.scss +1 -1
- package/dist/packages/griditem/griditem.scss +28 -26
- package/dist/packages/imagepreview/imagepreview.scss +0 -1
- package/dist/packages/indicator/indicator.scss +2 -3
- package/dist/packages/menu/menu.scss +0 -7
- package/dist/packages/menuitem/menuitem.scss +14 -10
- package/dist/packages/navbar/navbar.scss +3 -5
- package/dist/packages/noticebar/noticebar.scss +20 -0
- package/dist/packages/numberkeyboard/numberkeyboard.scss +25 -18
- package/dist/packages/pagination/pagination.scss +0 -2
- package/dist/packages/picker/picker.scss +9 -0
- package/dist/packages/popover/popover.scss +0 -4
- package/dist/packages/popup/popup.scss +3 -19
- package/dist/packages/price/price.scss +1 -0
- package/dist/packages/radio/radio.scss +0 -1
- package/dist/packages/radiogroup/radiogroup.scss +10 -1
- package/dist/packages/range/range.scss +127 -127
- package/dist/packages/rate/rate.scss +0 -1
- package/dist/packages/searchbar/searchbar.scss +3 -2
- package/dist/packages/shortpassword/shortpassword.scss +4 -0
- package/dist/packages/skeleton/skeleton.scss +13 -3
- package/dist/packages/space/space.scss +0 -1
- package/dist/packages/step/step.scss +21 -25
- package/dist/packages/swipe/swipe.scss +0 -15
- package/dist/packages/swiper/swiper.scss +0 -1
- package/dist/packages/switch/switch.scss +11 -0
- package/dist/packages/table/table.scss +4 -5
- package/dist/packages/tabs/tabs.scss +2 -4
- package/dist/packages/tag/tag.scss +0 -1
- package/dist/packages/textarea/textarea.scss +1 -6
- package/dist/packages/timeselect/timeselect.scss +1 -6
- package/dist/packages/tour/tour.scss +1 -5
- package/dist/packages/trendarrow/trendarrow.scss +0 -1
- package/dist/packages/uploader/uploader.scss +0 -1
- package/dist/packages/virtuallist/virtuallist.scss +12 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables.scss +11 -7
- package/dist/types/index.d.ts +98 -98
- package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
- package/dist/types/packages/address/address.d.ts +1 -1
- package/dist/types/packages/address/address.taro.d.ts +1 -1
- package/dist/types/packages/address/customRender.d.ts +1 -1
- package/dist/types/packages/address/customRender.taro.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +1 -1
- package/dist/types/packages/cell/cell.taro.d.ts +1 -1
- package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
- package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
- package/dist/types/packages/empty/empty.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
- package/dist/types/packages/form/form.d.ts +1 -1
- package/dist/types/packages/form/form.taro.d.ts +1 -1
- package/dist/types/packages/form/index.d.ts +1 -1
- package/dist/types/packages/form/index.taro.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.d.ts +28 -28
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +15 -17
- package/dist/types/packages/menu/menu.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
- package/dist/types/packages/nutui.react.d.ts +98 -98
- package/dist/types/packages/nutui.react.taro.d.ts +98 -98
- package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
- package/dist/types/packages/picker/picker.d.ts +1 -1
- package/dist/types/packages/picker/picker.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +1 -1
- package/dist/types/packages/popup/popup.d.ts +1 -1
- package/dist/types/packages/popup/popup.taro.d.ts +1 -1
- package/dist/types/packages/radio/radio.d.ts +2 -2
- package/dist/types/packages/radio/radio.taro.d.ts +2 -2
- package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
- package/dist/types/packages/swiper/index.d.ts +1 -1
- package/dist/types/packages/swiper/index.taro.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
- package/dist/types/packages/tour/tour.d.ts +1 -1
- package/dist/types/packages/tour/tour.taro.d.ts +1 -1
- package/package.json +5 -5
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react v2.3.
|
|
8
|
+
* @nutui/nutui-react v2.3.12-beta.0 Thu Feb 29 2024 14:38:01 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -28,34 +28,44 @@ var classnames = { exports: {} };
|
|
|
28
28
|
(function() {
|
|
29
29
|
var hasOwn = {}.hasOwnProperty;
|
|
30
30
|
function classNames2() {
|
|
31
|
-
var classes =
|
|
31
|
+
var classes = "";
|
|
32
32
|
for (var i = 0; i < arguments.length; i++) {
|
|
33
33
|
var arg = arguments[i];
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
if (arg) {
|
|
35
|
+
classes = appendClass(classes, parseValue(arg));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return classes;
|
|
39
|
+
}
|
|
40
|
+
function parseValue(arg) {
|
|
41
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
42
|
+
return arg;
|
|
43
|
+
}
|
|
44
|
+
if (typeof arg !== "object") {
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(arg)) {
|
|
48
|
+
return classNames2.apply(null, arg);
|
|
49
|
+
}
|
|
50
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
51
|
+
return arg.toString();
|
|
52
|
+
}
|
|
53
|
+
var classes = "";
|
|
54
|
+
for (var key in arg) {
|
|
55
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
56
|
+
classes = appendClass(classes, key);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
return classes
|
|
59
|
+
return classes;
|
|
60
|
+
}
|
|
61
|
+
function appendClass(value, newClass) {
|
|
62
|
+
if (!newClass) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
if (value) {
|
|
66
|
+
return value + " " + newClass;
|
|
67
|
+
}
|
|
68
|
+
return value + newClass;
|
|
59
69
|
}
|
|
60
70
|
if (module.exports) {
|
|
61
71
|
classNames2.default = classNames2;
|
|
@@ -2647,72 +2657,111 @@ function _inheritsLoose$1(subClass, superClass) {
|
|
|
2647
2657
|
_setPrototypeOf$1(subClass, superClass);
|
|
2648
2658
|
}
|
|
2649
2659
|
var propTypes = { exports: {} };
|
|
2650
|
-
var
|
|
2651
|
-
var
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
var
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2660
|
+
var reactIs = { exports: {} };
|
|
2661
|
+
var reactIs_production_min = {};
|
|
2662
|
+
/** @license React v16.13.1
|
|
2663
|
+
* react-is.production.min.js
|
|
2664
|
+
*
|
|
2665
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2666
|
+
*
|
|
2667
|
+
* This source code is licensed under the MIT license found in the
|
|
2668
|
+
* LICENSE file in the root directory of this source tree.
|
|
2669
|
+
*/
|
|
2670
|
+
var hasRequiredReactIs_production_min;
|
|
2671
|
+
function requireReactIs_production_min() {
|
|
2672
|
+
if (hasRequiredReactIs_production_min)
|
|
2673
|
+
return reactIs_production_min;
|
|
2674
|
+
hasRequiredReactIs_production_min = 1;
|
|
2675
|
+
var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
2676
|
+
function z(a2) {
|
|
2677
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
2678
|
+
var u = a2.$$typeof;
|
|
2679
|
+
switch (u) {
|
|
2680
|
+
case c6:
|
|
2681
|
+
switch (a2 = a2.type, a2) {
|
|
2682
|
+
case l2:
|
|
2683
|
+
case m:
|
|
2684
|
+
case e2:
|
|
2685
|
+
case g:
|
|
2686
|
+
case f:
|
|
2687
|
+
case p:
|
|
2688
|
+
return a2;
|
|
2689
|
+
default:
|
|
2690
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2691
|
+
case k:
|
|
2692
|
+
case n:
|
|
2693
|
+
case t2:
|
|
2694
|
+
case r2:
|
|
2695
|
+
case h:
|
|
2696
|
+
return a2;
|
|
2697
|
+
default:
|
|
2698
|
+
return u;
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
case d:
|
|
2702
|
+
return u;
|
|
2676
2703
|
}
|
|
2677
|
-
var err = new Error(
|
|
2678
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
2679
|
-
);
|
|
2680
|
-
err.name = "Invariant Violation";
|
|
2681
|
-
throw err;
|
|
2682
2704
|
}
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
objectOf: getShim,
|
|
2703
|
-
oneOf: getShim,
|
|
2704
|
-
oneOfType: getShim,
|
|
2705
|
-
shape: getShim,
|
|
2706
|
-
exact: getShim,
|
|
2707
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
2708
|
-
resetWarningCache: emptyFunction
|
|
2709
|
-
};
|
|
2710
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2711
|
-
return ReactPropTypes;
|
|
2705
|
+
}
|
|
2706
|
+
function A(a2) {
|
|
2707
|
+
return z(a2) === m;
|
|
2708
|
+
}
|
|
2709
|
+
reactIs_production_min.AsyncMode = l2;
|
|
2710
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
2711
|
+
reactIs_production_min.ContextConsumer = k;
|
|
2712
|
+
reactIs_production_min.ContextProvider = h;
|
|
2713
|
+
reactIs_production_min.Element = c6;
|
|
2714
|
+
reactIs_production_min.ForwardRef = n;
|
|
2715
|
+
reactIs_production_min.Fragment = e2;
|
|
2716
|
+
reactIs_production_min.Lazy = t2;
|
|
2717
|
+
reactIs_production_min.Memo = r2;
|
|
2718
|
+
reactIs_production_min.Portal = d;
|
|
2719
|
+
reactIs_production_min.Profiler = g;
|
|
2720
|
+
reactIs_production_min.StrictMode = f;
|
|
2721
|
+
reactIs_production_min.Suspense = p;
|
|
2722
|
+
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2723
|
+
return A(a2) || z(a2) === l2;
|
|
2712
2724
|
};
|
|
2713
|
-
|
|
2725
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
2726
|
+
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2727
|
+
return z(a2) === k;
|
|
2728
|
+
};
|
|
2729
|
+
reactIs_production_min.isContextProvider = function(a2) {
|
|
2730
|
+
return z(a2) === h;
|
|
2731
|
+
};
|
|
2732
|
+
reactIs_production_min.isElement = function(a2) {
|
|
2733
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2734
|
+
};
|
|
2735
|
+
reactIs_production_min.isForwardRef = function(a2) {
|
|
2736
|
+
return z(a2) === n;
|
|
2737
|
+
};
|
|
2738
|
+
reactIs_production_min.isFragment = function(a2) {
|
|
2739
|
+
return z(a2) === e2;
|
|
2740
|
+
};
|
|
2741
|
+
reactIs_production_min.isLazy = function(a2) {
|
|
2742
|
+
return z(a2) === t2;
|
|
2743
|
+
};
|
|
2744
|
+
reactIs_production_min.isMemo = function(a2) {
|
|
2745
|
+
return z(a2) === r2;
|
|
2746
|
+
};
|
|
2747
|
+
reactIs_production_min.isPortal = function(a2) {
|
|
2748
|
+
return z(a2) === d;
|
|
2749
|
+
};
|
|
2750
|
+
reactIs_production_min.isProfiler = function(a2) {
|
|
2751
|
+
return z(a2) === g;
|
|
2752
|
+
};
|
|
2753
|
+
reactIs_production_min.isStrictMode = function(a2) {
|
|
2754
|
+
return z(a2) === f;
|
|
2755
|
+
};
|
|
2756
|
+
reactIs_production_min.isSuspense = function(a2) {
|
|
2757
|
+
return z(a2) === p;
|
|
2758
|
+
};
|
|
2759
|
+
reactIs_production_min.isValidElementType = function(a2) {
|
|
2760
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
|
|
2761
|
+
};
|
|
2762
|
+
reactIs_production_min.typeOf = z;
|
|
2763
|
+
return reactIs_production_min;
|
|
2714
2764
|
}
|
|
2715
|
-
var reactIs = { exports: {} };
|
|
2716
2765
|
var reactIs_development = {};
|
|
2717
2766
|
/** @license React v16.13.1
|
|
2718
2767
|
* react-is.development.js
|
|
@@ -2876,110 +2925,6 @@ function requireReactIs_development() {
|
|
|
2876
2925
|
}
|
|
2877
2926
|
return reactIs_development;
|
|
2878
2927
|
}
|
|
2879
|
-
var reactIs_production_min = {};
|
|
2880
|
-
/** @license React v16.13.1
|
|
2881
|
-
* react-is.production.min.js
|
|
2882
|
-
*
|
|
2883
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2884
|
-
*
|
|
2885
|
-
* This source code is licensed under the MIT license found in the
|
|
2886
|
-
* LICENSE file in the root directory of this source tree.
|
|
2887
|
-
*/
|
|
2888
|
-
var hasRequiredReactIs_production_min;
|
|
2889
|
-
function requireReactIs_production_min() {
|
|
2890
|
-
if (hasRequiredReactIs_production_min)
|
|
2891
|
-
return reactIs_production_min;
|
|
2892
|
-
hasRequiredReactIs_production_min = 1;
|
|
2893
|
-
var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
2894
|
-
function z(a2) {
|
|
2895
|
-
if ("object" === typeof a2 && null !== a2) {
|
|
2896
|
-
var u = a2.$$typeof;
|
|
2897
|
-
switch (u) {
|
|
2898
|
-
case c6:
|
|
2899
|
-
switch (a2 = a2.type, a2) {
|
|
2900
|
-
case l2:
|
|
2901
|
-
case m:
|
|
2902
|
-
case e2:
|
|
2903
|
-
case g:
|
|
2904
|
-
case f:
|
|
2905
|
-
case p:
|
|
2906
|
-
return a2;
|
|
2907
|
-
default:
|
|
2908
|
-
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2909
|
-
case k:
|
|
2910
|
-
case n:
|
|
2911
|
-
case t2:
|
|
2912
|
-
case r2:
|
|
2913
|
-
case h:
|
|
2914
|
-
return a2;
|
|
2915
|
-
default:
|
|
2916
|
-
return u;
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
case d:
|
|
2920
|
-
return u;
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
function A(a2) {
|
|
2925
|
-
return z(a2) === m;
|
|
2926
|
-
}
|
|
2927
|
-
reactIs_production_min.AsyncMode = l2;
|
|
2928
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
2929
|
-
reactIs_production_min.ContextConsumer = k;
|
|
2930
|
-
reactIs_production_min.ContextProvider = h;
|
|
2931
|
-
reactIs_production_min.Element = c6;
|
|
2932
|
-
reactIs_production_min.ForwardRef = n;
|
|
2933
|
-
reactIs_production_min.Fragment = e2;
|
|
2934
|
-
reactIs_production_min.Lazy = t2;
|
|
2935
|
-
reactIs_production_min.Memo = r2;
|
|
2936
|
-
reactIs_production_min.Portal = d;
|
|
2937
|
-
reactIs_production_min.Profiler = g;
|
|
2938
|
-
reactIs_production_min.StrictMode = f;
|
|
2939
|
-
reactIs_production_min.Suspense = p;
|
|
2940
|
-
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2941
|
-
return A(a2) || z(a2) === l2;
|
|
2942
|
-
};
|
|
2943
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
2944
|
-
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2945
|
-
return z(a2) === k;
|
|
2946
|
-
};
|
|
2947
|
-
reactIs_production_min.isContextProvider = function(a2) {
|
|
2948
|
-
return z(a2) === h;
|
|
2949
|
-
};
|
|
2950
|
-
reactIs_production_min.isElement = function(a2) {
|
|
2951
|
-
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2952
|
-
};
|
|
2953
|
-
reactIs_production_min.isForwardRef = function(a2) {
|
|
2954
|
-
return z(a2) === n;
|
|
2955
|
-
};
|
|
2956
|
-
reactIs_production_min.isFragment = function(a2) {
|
|
2957
|
-
return z(a2) === e2;
|
|
2958
|
-
};
|
|
2959
|
-
reactIs_production_min.isLazy = function(a2) {
|
|
2960
|
-
return z(a2) === t2;
|
|
2961
|
-
};
|
|
2962
|
-
reactIs_production_min.isMemo = function(a2) {
|
|
2963
|
-
return z(a2) === r2;
|
|
2964
|
-
};
|
|
2965
|
-
reactIs_production_min.isPortal = function(a2) {
|
|
2966
|
-
return z(a2) === d;
|
|
2967
|
-
};
|
|
2968
|
-
reactIs_production_min.isProfiler = function(a2) {
|
|
2969
|
-
return z(a2) === g;
|
|
2970
|
-
};
|
|
2971
|
-
reactIs_production_min.isStrictMode = function(a2) {
|
|
2972
|
-
return z(a2) === f;
|
|
2973
|
-
};
|
|
2974
|
-
reactIs_production_min.isSuspense = function(a2) {
|
|
2975
|
-
return z(a2) === p;
|
|
2976
|
-
};
|
|
2977
|
-
reactIs_production_min.isValidElementType = function(a2) {
|
|
2978
|
-
return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
|
|
2979
|
-
};
|
|
2980
|
-
reactIs_production_min.typeOf = z;
|
|
2981
|
-
return reactIs_production_min;
|
|
2982
|
-
}
|
|
2983
2928
|
var hasRequiredReactIs;
|
|
2984
2929
|
function requireReactIs() {
|
|
2985
2930
|
if (hasRequiredReactIs)
|
|
@@ -3068,6 +3013,16 @@ function requireObjectAssign() {
|
|
|
3068
3013
|
};
|
|
3069
3014
|
return objectAssign;
|
|
3070
3015
|
}
|
|
3016
|
+
var ReactPropTypesSecret_1;
|
|
3017
|
+
var hasRequiredReactPropTypesSecret;
|
|
3018
|
+
function requireReactPropTypesSecret() {
|
|
3019
|
+
if (hasRequiredReactPropTypesSecret)
|
|
3020
|
+
return ReactPropTypesSecret_1;
|
|
3021
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
3022
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
3023
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
3024
|
+
return ReactPropTypesSecret_1;
|
|
3025
|
+
}
|
|
3071
3026
|
var has;
|
|
3072
3027
|
var hasRequiredHas;
|
|
3073
3028
|
function requireHas() {
|
|
@@ -3585,6 +3540,61 @@ function requireFactoryWithTypeCheckers() {
|
|
|
3585
3540
|
};
|
|
3586
3541
|
return factoryWithTypeCheckers;
|
|
3587
3542
|
}
|
|
3543
|
+
var factoryWithThrowingShims;
|
|
3544
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
3545
|
+
function requireFactoryWithThrowingShims() {
|
|
3546
|
+
if (hasRequiredFactoryWithThrowingShims)
|
|
3547
|
+
return factoryWithThrowingShims;
|
|
3548
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
3549
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
3550
|
+
function emptyFunction() {
|
|
3551
|
+
}
|
|
3552
|
+
function emptyFunctionWithReset() {
|
|
3553
|
+
}
|
|
3554
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3555
|
+
factoryWithThrowingShims = function() {
|
|
3556
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3557
|
+
if (secret === ReactPropTypesSecret) {
|
|
3558
|
+
return;
|
|
3559
|
+
}
|
|
3560
|
+
var err = new Error(
|
|
3561
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
3562
|
+
);
|
|
3563
|
+
err.name = "Invariant Violation";
|
|
3564
|
+
throw err;
|
|
3565
|
+
}
|
|
3566
|
+
shim.isRequired = shim;
|
|
3567
|
+
function getShim() {
|
|
3568
|
+
return shim;
|
|
3569
|
+
}
|
|
3570
|
+
var ReactPropTypes = {
|
|
3571
|
+
array: shim,
|
|
3572
|
+
bigint: shim,
|
|
3573
|
+
bool: shim,
|
|
3574
|
+
func: shim,
|
|
3575
|
+
number: shim,
|
|
3576
|
+
object: shim,
|
|
3577
|
+
string: shim,
|
|
3578
|
+
symbol: shim,
|
|
3579
|
+
any: shim,
|
|
3580
|
+
arrayOf: getShim,
|
|
3581
|
+
element: shim,
|
|
3582
|
+
elementType: shim,
|
|
3583
|
+
instanceOf: getShim,
|
|
3584
|
+
node: shim,
|
|
3585
|
+
objectOf: getShim,
|
|
3586
|
+
oneOf: getShim,
|
|
3587
|
+
oneOfType: getShim,
|
|
3588
|
+
shape: getShim,
|
|
3589
|
+
exact: getShim,
|
|
3590
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
3591
|
+
resetWarningCache: emptyFunction
|
|
3592
|
+
};
|
|
3593
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
3594
|
+
return ReactPropTypes;
|
|
3595
|
+
};
|
|
3596
|
+
return factoryWithThrowingShims;
|
|
3597
|
+
}
|
|
3588
3598
|
if (process.env.NODE_ENV !== "production") {
|
|
3589
3599
|
var ReactIs = requireReactIs();
|
|
3590
3600
|
var throwOnDirectAccess = true;
|
|
@@ -5200,7 +5210,7 @@ const BackTop = (props) => {
|
|
|
5200
5210
|
startTime = otime;
|
|
5201
5211
|
duration > 0 ? scrollAnimation() : scroll();
|
|
5202
5212
|
};
|
|
5203
|
-
const styles = style ? {
|
|
5213
|
+
const styles = Object.keys(style || {}).length !== 0 ? {
|
|
5204
5214
|
zIndex,
|
|
5205
5215
|
...style
|
|
5206
5216
|
} : {
|
|
@@ -10441,7 +10451,7 @@ const Elevator = (props) => {
|
|
|
10441
10451
|
onDragEnd: ({ offset }) => {
|
|
10442
10452
|
touchState.current.y2 = offset[1];
|
|
10443
10453
|
const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight || 0;
|
|
10444
|
-
const cacheIndex = state.current.anchorIndex + Math.
|
|
10454
|
+
const cacheIndex = state.current.anchorIndex + Math.round(delta);
|
|
10445
10455
|
setCodeIndex(cacheIndex);
|
|
10446
10456
|
scrollTo(cacheIndex);
|
|
10447
10457
|
resetScrollState();
|
|
@@ -10471,7 +10481,8 @@ const Elevator = (props) => {
|
|
|
10471
10481
|
calculateHeight();
|
|
10472
10482
|
}
|
|
10473
10483
|
const target = e2.target;
|
|
10474
|
-
|
|
10484
|
+
let { scrollTop } = target;
|
|
10485
|
+
scrollTop = Math.ceil(scrollTop);
|
|
10475
10486
|
state.current.scrollY = scrollTop;
|
|
10476
10487
|
setScrollY(scrollTop);
|
|
10477
10488
|
for (let i = 0; i < listHeight.length - 1; i++) {
|
|
@@ -11635,7 +11646,6 @@ class Tree {
|
|
|
11635
11646
|
return pathNodes;
|
|
11636
11647
|
}
|
|
11637
11648
|
}
|
|
11638
|
-
const Tree$1 = Tree;
|
|
11639
11649
|
const defaultProps$16 = {
|
|
11640
11650
|
...ComponentDefaults,
|
|
11641
11651
|
activeColor: "",
|
|
@@ -11711,7 +11721,7 @@ const InternalCascader = (props, ref) => {
|
|
|
11711
11721
|
paneKey: ""
|
|
11712
11722
|
}
|
|
11713
11723
|
],
|
|
11714
|
-
tree: new Tree
|
|
11724
|
+
tree: new Tree([], {}),
|
|
11715
11725
|
tabsCursor: 0,
|
|
11716
11726
|
// 选中的tab项
|
|
11717
11727
|
initLoading: false,
|
|
@@ -11741,7 +11751,7 @@ const InternalCascader = (props, ref) => {
|
|
|
11741
11751
|
} else {
|
|
11742
11752
|
state.optionsData = options2;
|
|
11743
11753
|
}
|
|
11744
|
-
state.tree = new Tree
|
|
11754
|
+
state.tree = new Tree(state.optionsData, {
|
|
11745
11755
|
value: state.configs.optionKey.valueKey,
|
|
11746
11756
|
text: state.configs.optionKey.textKey,
|
|
11747
11757
|
children: state.configs.optionKey.childrenKey
|
|
@@ -16397,7 +16407,10 @@ const Input = forwardRef(
|
|
|
16397
16407
|
name,
|
|
16398
16408
|
className: "nut-input-native",
|
|
16399
16409
|
ref: inputRef,
|
|
16400
|
-
style: {
|
|
16410
|
+
style: {
|
|
16411
|
+
textAlign: `${// eslint-disable-next-line no-nested-ternary
|
|
16412
|
+
align === "right" ? "end" : align === "left" ? "start" : "center"}`
|
|
16413
|
+
},
|
|
16401
16414
|
type: inputType(type4),
|
|
16402
16415
|
maxLength,
|
|
16403
16416
|
placeholder: placeholder || locale.placeholder,
|
|
@@ -16448,11 +16461,10 @@ Input.displayName = "NutInput";
|
|
|
16448
16461
|
const defaultProps$U = {
|
|
16449
16462
|
...ComponentDefaults,
|
|
16450
16463
|
disabled: false,
|
|
16451
|
-
min: 1,
|
|
16452
|
-
max: 9999,
|
|
16453
16464
|
readOnly: false,
|
|
16454
16465
|
allowEmpty: false,
|
|
16455
|
-
|
|
16466
|
+
min: 1,
|
|
16467
|
+
max: 9999,
|
|
16456
16468
|
step: 1,
|
|
16457
16469
|
digits: 0,
|
|
16458
16470
|
async: false
|
|
@@ -16485,199 +16497,159 @@ const InputNumber = (props) => {
|
|
|
16485
16497
|
...defaultProps$U,
|
|
16486
16498
|
...props
|
|
16487
16499
|
};
|
|
16488
|
-
const
|
|
16489
|
-
|
|
16490
|
-
value,
|
|
16491
|
-
defaultValue
|
|
16500
|
+
const classes = classNames(classPrefix$g, {
|
|
16501
|
+
[`${classPrefix$g}-disabled`]: disabled
|
|
16492
16502
|
});
|
|
16503
|
+
const [focused, setFocused] = useState(false);
|
|
16504
|
+
const inputRef = useRef(null);
|
|
16493
16505
|
useEffect(() => {
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
setChecked(formatter(_checked));
|
|
16498
|
-
}
|
|
16499
|
-
}
|
|
16500
|
-
}, []);
|
|
16501
|
-
const classes = classNames(
|
|
16502
|
-
{
|
|
16503
|
-
[`${classPrefix$g}`]: true,
|
|
16504
|
-
[`${classPrefix$g}-disabled`]: disabled
|
|
16505
|
-
},
|
|
16506
|
-
className
|
|
16507
|
-
);
|
|
16508
|
-
const styles = {
|
|
16509
|
-
...style
|
|
16510
|
-
};
|
|
16511
|
-
const addAllow = (value2 = _checked) => {
|
|
16512
|
-
if (formatter) {
|
|
16513
|
-
const numValue = String(value2).replace(/[^0-9|.]/gi, "");
|
|
16514
|
-
return Number(numValue) < Number(max) && !disabled;
|
|
16506
|
+
var _a2, _b;
|
|
16507
|
+
if (focused) {
|
|
16508
|
+
(_b = (_a2 = inputRef.current) == null ? void 0 : _a2.select) == null ? void 0 : _b.call(_a2);
|
|
16515
16509
|
}
|
|
16516
|
-
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
return Number(numValue) > Number(min) && !disabled;
|
|
16510
|
+
}, [focused]);
|
|
16511
|
+
const [shadowValue, setShadowValue] = usePropsValue({
|
|
16512
|
+
value: typeof value === "string" ? parseFloat(value) : value,
|
|
16513
|
+
defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
|
|
16514
|
+
onChange: (value2) => {
|
|
16522
16515
|
}
|
|
16523
|
-
return Number(value2) > Number(min) && !disabled;
|
|
16524
|
-
};
|
|
16525
|
-
const iconMinusClasses = classNames("nut-inputnumber-icon icon-minus", {
|
|
16526
|
-
"nut-inputnumber-icon-disabled": !reduceAllow()
|
|
16527
16516
|
});
|
|
16528
|
-
const
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
return Number(v).toFixed(Number(digits));
|
|
16533
|
-
};
|
|
16534
|
-
const emitChange = (value2, e2) => {
|
|
16535
|
-
const outputValue = fixedDecimalPlaces(value2);
|
|
16536
|
-
onChange && onChange(outputValue, e2);
|
|
16537
|
-
if (!async) {
|
|
16538
|
-
if (Number(outputValue) < Number(min)) {
|
|
16539
|
-
formatter ? setChecked(formatter(Number(min))) : setChecked(Number(min));
|
|
16540
|
-
} else if (Number(outputValue) > Number(max)) {
|
|
16541
|
-
formatter ? setChecked(formatter(Number(max))) : setChecked(Number(max));
|
|
16542
|
-
} else {
|
|
16543
|
-
formatter ? setChecked(formatter(outputValue)) : setChecked(outputValue);
|
|
16544
|
-
}
|
|
16517
|
+
const bound2 = (value2, min2, max2) => {
|
|
16518
|
+
let res = value2;
|
|
16519
|
+
if (min2 !== void 0) {
|
|
16520
|
+
res = Math.max(Number(min2), res);
|
|
16545
16521
|
}
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
onMinus && onMinus(e2);
|
|
16549
|
-
if (reduceAllow()) {
|
|
16550
|
-
if (formatter) {
|
|
16551
|
-
const numValue = String(_checked).replace(/[^0-9|.]/gi, "");
|
|
16552
|
-
const outputValue = Number(numValue) - Number(step);
|
|
16553
|
-
inputRef.current = formatter(outputValue);
|
|
16554
|
-
emitChange(outputValue, e2);
|
|
16555
|
-
} else {
|
|
16556
|
-
const outputValue = Number(_checked) - Number(step);
|
|
16557
|
-
emitChange(outputValue, e2);
|
|
16558
|
-
}
|
|
16559
|
-
} else {
|
|
16560
|
-
onOverlimit && onOverlimit(e2);
|
|
16522
|
+
if (max2 !== void 0) {
|
|
16523
|
+
res = Math.min(Number(max2), res);
|
|
16561
16524
|
}
|
|
16525
|
+
return res;
|
|
16562
16526
|
};
|
|
16563
|
-
const
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
} else {
|
|
16572
|
-
const outputValue = Number(_checked) + Number(step);
|
|
16573
|
-
emitChange(outputValue, e2);
|
|
16574
|
-
}
|
|
16575
|
-
} else {
|
|
16576
|
-
onOverlimit && onOverlimit(e2);
|
|
16527
|
+
const format2 = (value2) => {
|
|
16528
|
+
if (value2 === null)
|
|
16529
|
+
return "";
|
|
16530
|
+
if (typeof value2 === "string")
|
|
16531
|
+
value2 = parseFloat(value2);
|
|
16532
|
+
const fixedValue = bound2(value2, Number(min), Number(max));
|
|
16533
|
+
if (formatter) {
|
|
16534
|
+
return formatter(fixedValue);
|
|
16577
16535
|
}
|
|
16578
|
-
|
|
16579
|
-
|
|
16580
|
-
const input = e2.target;
|
|
16581
|
-
onChange && onChange(input.valueAsNumber, e2);
|
|
16582
|
-
if (!async) {
|
|
16583
|
-
if (Number.isNaN(input.valueAsNumber)) {
|
|
16584
|
-
setChecked("");
|
|
16585
|
-
} else {
|
|
16586
|
-
setChecked(input.valueAsNumber);
|
|
16587
|
-
}
|
|
16536
|
+
if (digits) {
|
|
16537
|
+
return fixedValue.toFixed(digits).toString();
|
|
16588
16538
|
}
|
|
16539
|
+
return fixedValue.toString();
|
|
16589
16540
|
};
|
|
16590
|
-
const
|
|
16591
|
-
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
if (!numReg.test(input[0]) && numValue) {
|
|
16596
|
-
setChecked(formatter(numValue));
|
|
16597
|
-
} else if (!numReg.test(input[0]) && !numValue) {
|
|
16598
|
-
setChecked(input);
|
|
16599
|
-
} else if (numReg.test(input[0])) {
|
|
16600
|
-
if (formatter(numValue) === inputRef.current) {
|
|
16601
|
-
setChecked(numValue);
|
|
16602
|
-
} else {
|
|
16603
|
-
setChecked(formatter(numValue));
|
|
16604
|
-
inputRef.current = formatter(numValue);
|
|
16605
|
-
}
|
|
16606
|
-
}
|
|
16541
|
+
const [inputValue, setInputValue] = useState(format2(shadowValue));
|
|
16542
|
+
useEffect(() => {
|
|
16543
|
+
if (!focused && !async) {
|
|
16544
|
+
setShadowValue(bound2(Number(shadowValue), Number(min), Number(max)));
|
|
16545
|
+
setInputValue(format2(shadowValue));
|
|
16607
16546
|
}
|
|
16608
|
-
};
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16547
|
+
}, [focused, shadowValue]);
|
|
16548
|
+
useEffect(() => {
|
|
16549
|
+
if (async) {
|
|
16550
|
+
setShadowValue(bound2(Number(value), Number(min), Number(max)));
|
|
16551
|
+
setInputValue(format2(value));
|
|
16552
|
+
}
|
|
16553
|
+
}, [value]);
|
|
16554
|
+
const calcNextValue = (current, step2, symbol) => {
|
|
16555
|
+
const dig = digits + 1;
|
|
16556
|
+
return (parseFloat(current || "0") * dig + parseFloat(step2) * dig * symbol) / dig;
|
|
16557
|
+
};
|
|
16558
|
+
const update2 = (negative, e2) => {
|
|
16559
|
+
if (step !== void 0) {
|
|
16560
|
+
const shouldOverBoundary = calcNextValue(
|
|
16561
|
+
shadowValue,
|
|
16562
|
+
step,
|
|
16563
|
+
negative ? -1 : 1
|
|
16564
|
+
);
|
|
16565
|
+
const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
|
|
16566
|
+
setShadowValue(nextValue);
|
|
16567
|
+
if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
|
|
16568
|
+
onOverlimit == null ? void 0 : onOverlimit(e2);
|
|
16569
|
+
} else {
|
|
16570
|
+
onChange == null ? void 0 : onChange(nextValue, e2);
|
|
16620
16571
|
}
|
|
16621
16572
|
}
|
|
16622
16573
|
};
|
|
16623
|
-
const
|
|
16574
|
+
const handleReduce = (e2) => {
|
|
16624
16575
|
if (disabled)
|
|
16625
16576
|
return;
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
onFocus && onFocus(e2);
|
|
16577
|
+
onMinus == null ? void 0 : onMinus(e2);
|
|
16578
|
+
update2(true, e2);
|
|
16629
16579
|
};
|
|
16630
|
-
const
|
|
16580
|
+
const handlePlus = (e2) => {
|
|
16631
16581
|
if (disabled)
|
|
16632
16582
|
return;
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
if (
|
|
16638
|
-
|
|
16583
|
+
onPlus == null ? void 0 : onPlus(e2);
|
|
16584
|
+
update2(false, e2);
|
|
16585
|
+
};
|
|
16586
|
+
const parseValue = (text) => {
|
|
16587
|
+
if (text === "")
|
|
16588
|
+
return null;
|
|
16589
|
+
if (text === "-")
|
|
16590
|
+
return null;
|
|
16591
|
+
return text;
|
|
16592
|
+
};
|
|
16593
|
+
const handleInputChange = (e2) => {
|
|
16594
|
+
setInputValue(e2.target.value);
|
|
16595
|
+
const valueStr = parseValue(e2.target.value);
|
|
16596
|
+
if (valueStr === null) {
|
|
16597
|
+
if (allowEmpty) {
|
|
16598
|
+
setShadowValue(null);
|
|
16599
|
+
} else {
|
|
16600
|
+
setShadowValue(defaultValue);
|
|
16601
|
+
}
|
|
16602
|
+
} else {
|
|
16603
|
+
setShadowValue(valueStr);
|
|
16639
16604
|
}
|
|
16640
|
-
if (
|
|
16641
|
-
|
|
16642
|
-
} else if (value2 > Number(max)) {
|
|
16643
|
-
value2 = Number(max);
|
|
16605
|
+
if (!async) {
|
|
16606
|
+
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
16644
16607
|
}
|
|
16645
|
-
|
|
16608
|
+
};
|
|
16609
|
+
const handleFocus = (e2) => {
|
|
16610
|
+
setFocused(true);
|
|
16611
|
+
setInputValue(
|
|
16612
|
+
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
16613
|
+
);
|
|
16614
|
+
onFocus && onFocus(e2);
|
|
16615
|
+
};
|
|
16616
|
+
const handleBlur = (e2) => {
|
|
16617
|
+
setFocused(false);
|
|
16646
16618
|
onBlur && onBlur(e2);
|
|
16619
|
+
if (async) {
|
|
16620
|
+
const valueStr = parseValue(e2.target.value);
|
|
16621
|
+
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
16622
|
+
}
|
|
16647
16623
|
};
|
|
16648
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style
|
|
16624
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-minus" }, /* @__PURE__ */ React__default.createElement(
|
|
16649
16625
|
o,
|
|
16650
16626
|
{
|
|
16651
|
-
className:
|
|
16652
|
-
|
|
16627
|
+
className: classNames("nut-inputnumber-icon icon-minus", {
|
|
16628
|
+
[`${classPrefix$g}-icon-disabled`]: shadowValue === min || disabled
|
|
16629
|
+
}),
|
|
16630
|
+
onClick: handleReduce
|
|
16653
16631
|
}
|
|
16654
|
-
)), /* @__PURE__ */ React__default.createElement(React__default.Fragment, null,
|
|
16632
|
+
)), /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
16655
16633
|
"input",
|
|
16656
16634
|
{
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
max,
|
|
16635
|
+
ref: inputRef,
|
|
16636
|
+
inputMode: "decimal",
|
|
16660
16637
|
disabled,
|
|
16661
16638
|
readOnly,
|
|
16662
|
-
value:
|
|
16663
|
-
onInput:
|
|
16664
|
-
onBlur:
|
|
16665
|
-
onFocus:
|
|
16639
|
+
value: inputValue,
|
|
16640
|
+
onInput: handleInputChange,
|
|
16641
|
+
onBlur: handleBlur,
|
|
16642
|
+
onFocus: handleFocus
|
|
16666
16643
|
}
|
|
16667
|
-
) : /* @__PURE__ */ React__default.createElement(
|
|
16668
|
-
|
|
16644
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React__default.createElement(
|
|
16645
|
+
l$2,
|
|
16669
16646
|
{
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
readOnly,
|
|
16675
|
-
value: _checked,
|
|
16676
|
-
onInput: changeValue,
|
|
16677
|
-
onBlur: burValue,
|
|
16678
|
-
onFocus: focusValue
|
|
16647
|
+
className: classNames("nut-inputnumber-icon icon-plus", {
|
|
16648
|
+
[`${classPrefix$g}-icon-disabled`]: shadowValue === max || disabled
|
|
16649
|
+
}),
|
|
16650
|
+
onClick: handlePlus
|
|
16679
16651
|
}
|
|
16680
|
-
))
|
|
16652
|
+
)));
|
|
16681
16653
|
};
|
|
16682
16654
|
InputNumber.defaultProps = defaultProps$U;
|
|
16683
16655
|
InputNumber.displayName = "NutInputNumber";
|
|
@@ -18229,7 +18201,7 @@ const InternalShortPassword = (props, ref) => {
|
|
|
18229
18201
|
},
|
|
18230
18202
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-title` }, title || locale.shortpassword.title), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-description` }, description || locale.shortpassword.description), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-input`, onClick: onFocus }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-input-site` }), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-input-fake` }, [...new Array(comLen).keys()].map((item, index) => {
|
|
18231
18203
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-input-fake-li`, key: index }, inputValue.length > index && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, plain ? inputValue[index] : /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-input-fake-li-icon` })));
|
|
18232
|
-
}))), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message-error` }, error), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message-forget`, onClick: onTips }, tips || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(s, { width: 11, height: 11
|
|
18204
|
+
}))), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message-error` }, error), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-message-forget`, onClick: onTips }, tips || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(s, { width: 11, height: 11 }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer-cancel`, onClick: onCancel }, locale.cancel), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer-sure`, onClick: sure }, locale.confirm)))
|
|
18233
18205
|
);
|
|
18234
18206
|
};
|
|
18235
18207
|
const ShortPassword = React__default.forwardRef(InternalShortPassword);
|
|
@@ -19208,6 +19180,7 @@ const ActionSheet = (props) => {
|
|
|
19208
19180
|
return /* @__PURE__ */ React__default.createElement(
|
|
19209
19181
|
Popup,
|
|
19210
19182
|
{
|
|
19183
|
+
...rest,
|
|
19211
19184
|
round: true,
|
|
19212
19185
|
visible,
|
|
19213
19186
|
position: "bottom",
|
|
@@ -19218,7 +19191,7 @@ const ActionSheet = (props) => {
|
|
|
19218
19191
|
onCancel && onCancel();
|
|
19219
19192
|
}
|
|
19220
19193
|
},
|
|
19221
|
-
/* @__PURE__ */ React__default.createElement("div", { className: `${className}`, style
|
|
19194
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${className}`, style }, options2.length ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-list` }, options2.map((item, index) => {
|
|
19222
19195
|
return /* @__PURE__ */ React__default.createElement(
|
|
19223
19196
|
"div",
|
|
19224
19197
|
{
|
|
@@ -19384,7 +19357,6 @@ const confirm = (config2, renderFunc) => {
|
|
|
19384
19357
|
update: update2
|
|
19385
19358
|
};
|
|
19386
19359
|
};
|
|
19387
|
-
const confirm$1 = confirm;
|
|
19388
19360
|
const Content = (props) => {
|
|
19389
19361
|
const {
|
|
19390
19362
|
visible,
|
|
@@ -19599,11 +19571,11 @@ const BaseDialog = (props, ref) => {
|
|
|
19599
19571
|
};
|
|
19600
19572
|
const Dialog = forwardRef(BaseDialog);
|
|
19601
19573
|
Dialog.confirm = (props) => {
|
|
19602
|
-
return confirm
|
|
19574
|
+
return confirm(props);
|
|
19603
19575
|
};
|
|
19604
19576
|
["alert"].forEach((type4) => {
|
|
19605
19577
|
Dialog[type4] = (props) => {
|
|
19606
|
-
return confirm
|
|
19578
|
+
return confirm({
|
|
19607
19579
|
...props,
|
|
19608
19580
|
isNotice: false,
|
|
19609
19581
|
noticeType: type4
|
|
@@ -21168,7 +21140,7 @@ const Skeleton = (props) => {
|
|
|
21168
21140
|
const classPrefix2 = "nut-skeleton";
|
|
21169
21141
|
const classes = classNames(classPrefix2, className);
|
|
21170
21142
|
const avatarClass = classNames({
|
|
21171
|
-
avatar: true,
|
|
21143
|
+
[`nut-avatar`]: true,
|
|
21172
21144
|
[`avatar-${avatarShape}`]: avatarShape
|
|
21173
21145
|
});
|
|
21174
21146
|
const repeatLines = (num) => {
|
|
@@ -21186,7 +21158,7 @@ const Skeleton = (props) => {
|
|
|
21186
21158
|
height: "50px"
|
|
21187
21159
|
};
|
|
21188
21160
|
};
|
|
21189
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, visible ? /* @__PURE__ */ React__default.createElement(
|
|
21161
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, visible ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children) : /* @__PURE__ */ React__default.createElement("div", { className: classes, ...rest }, animated2 && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-animation` }), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, avatar && /* @__PURE__ */ React__default.createElement(
|
|
21190
21162
|
Avatar,
|
|
21191
21163
|
{
|
|
21192
21164
|
className: avatarClass,
|