@nutui/nutui-react 1.5.12 → 1.5.13
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/dist/esm/CollapseItem.js +1 -1
- package/dist/esm/Infiniteloading.js +1 -1
- package/dist/esm/ShortPassword.js +1 -0
- 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/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.mjs +96 -67
- package/dist/nutui.react.umd.js +96 -67
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
return value;
|
|
10
10
|
};
|
|
11
11
|
/*!
|
|
12
|
-
* @nutui/nutui-react v1.5.
|
|
12
|
+
* @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:19:51 GMT+0800 (China Standard Time)
|
|
13
13
|
* (c) 2023 @jdf2e.
|
|
14
14
|
* Released under the MIT License.
|
|
15
15
|
*/
|
|
@@ -33,10 +33,15 @@ var __publicField = (obj, key, value) => {
|
|
|
33
33
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
34
34
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
35
35
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
var classnameExports = {};
|
|
37
|
+
var classname = {
|
|
38
|
+
get exports() {
|
|
39
|
+
return classnameExports;
|
|
40
|
+
},
|
|
41
|
+
set exports(v) {
|
|
42
|
+
classnameExports = v;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
40
45
|
var classname_production_min = {};
|
|
41
46
|
var hasRequiredClassname_production_min;
|
|
42
47
|
function requireClassname_production_min() {
|
|
@@ -140,12 +145,13 @@ var __publicField = (obj, key, value) => {
|
|
|
140
145
|
classname_development.withNaming = withNaming;
|
|
141
146
|
return classname_development;
|
|
142
147
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
(function(module2) {
|
|
149
|
+
if (process.env.NODE_ENV === "production") {
|
|
150
|
+
module2.exports = requireClassname_production_min();
|
|
151
|
+
} else {
|
|
152
|
+
module2.exports = requireClassname_development();
|
|
153
|
+
}
|
|
154
|
+
})(classname);
|
|
149
155
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
150
156
|
const defaultProps$1s = {
|
|
151
157
|
name: "",
|
|
@@ -757,7 +763,6 @@ var __publicField = (obj, key, value) => {
|
|
|
757
763
|
return string2.match(pattern2) || [];
|
|
758
764
|
}
|
|
759
765
|
var lodash_kebabcase = kebabCase;
|
|
760
|
-
const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
|
|
761
766
|
const zhCN = {
|
|
762
767
|
save: "保存",
|
|
763
768
|
confirm: "确认",
|
|
@@ -905,7 +910,7 @@ var __publicField = (obj, key, value) => {
|
|
|
905
910
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
906
911
|
const cssVars = {};
|
|
907
912
|
Object.keys(themeVars).forEach((key) => {
|
|
908
|
-
cssVars[`--${
|
|
913
|
+
cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
|
|
909
914
|
});
|
|
910
915
|
return cssVars;
|
|
911
916
|
}
|
|
@@ -1083,7 +1088,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1083
1088
|
};
|
|
1084
1089
|
Image$1.defaultProps = defaultProps$1n;
|
|
1085
1090
|
Image$1.displayName = "NutImage";
|
|
1086
|
-
var
|
|
1091
|
+
var classnamesExports = {};
|
|
1092
|
+
var classnames = {
|
|
1093
|
+
get exports() {
|
|
1094
|
+
return classnamesExports;
|
|
1095
|
+
},
|
|
1096
|
+
set exports(v) {
|
|
1097
|
+
classnamesExports = v;
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1087
1100
|
/*!
|
|
1088
1101
|
Copyright (c) 2018 Jed Watson.
|
|
1089
1102
|
Licensed under the MIT License (MIT), see
|
|
@@ -1130,8 +1143,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1130
1143
|
}
|
|
1131
1144
|
})();
|
|
1132
1145
|
})(classnames);
|
|
1133
|
-
|
|
1134
|
-
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
1146
|
+
const classNames = classnamesExports;
|
|
1135
1147
|
const defaultOverlayProps = {
|
|
1136
1148
|
zIndex: 1e3,
|
|
1137
1149
|
duration: 0.3,
|
|
@@ -1246,8 +1258,24 @@ var __publicField = (obj, key, value) => {
|
|
|
1246
1258
|
subClass.prototype.constructor = subClass;
|
|
1247
1259
|
_setPrototypeOf$1(subClass, superClass);
|
|
1248
1260
|
}
|
|
1249
|
-
var
|
|
1250
|
-
var
|
|
1261
|
+
var propTypesExports = {};
|
|
1262
|
+
var propTypes = {
|
|
1263
|
+
get exports() {
|
|
1264
|
+
return propTypesExports;
|
|
1265
|
+
},
|
|
1266
|
+
set exports(v) {
|
|
1267
|
+
propTypesExports = v;
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
var reactIsExports = {};
|
|
1271
|
+
var reactIs = {
|
|
1272
|
+
get exports() {
|
|
1273
|
+
return reactIsExports;
|
|
1274
|
+
},
|
|
1275
|
+
set exports(v) {
|
|
1276
|
+
reactIsExports = v;
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1251
1279
|
var reactIs_production_min = {};
|
|
1252
1280
|
/** @license React v16.13.1
|
|
1253
1281
|
* react-is.production.min.js
|
|
@@ -1518,14 +1546,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1518
1546
|
var hasRequiredReactIs;
|
|
1519
1547
|
function requireReactIs() {
|
|
1520
1548
|
if (hasRequiredReactIs)
|
|
1521
|
-
return
|
|
1549
|
+
return reactIsExports;
|
|
1522
1550
|
hasRequiredReactIs = 1;
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1551
|
+
(function(module2) {
|
|
1552
|
+
if (process.env.NODE_ENV === "production") {
|
|
1553
|
+
module2.exports = requireReactIs_production_min();
|
|
1554
|
+
} else {
|
|
1555
|
+
module2.exports = requireReactIs_development();
|
|
1556
|
+
}
|
|
1557
|
+
})(reactIs);
|
|
1558
|
+
return reactIsExports;
|
|
1529
1559
|
}
|
|
1530
1560
|
/*
|
|
1531
1561
|
object-assign
|
|
@@ -2192,8 +2222,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2192
2222
|
} else {
|
|
2193
2223
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
2194
2224
|
}
|
|
2195
|
-
var propTypesExports = propTypes.exports;
|
|
2196
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
2197
2225
|
function hasClass(element, className) {
|
|
2198
2226
|
if (element.classList)
|
|
2199
2227
|
return !!className && element.classList.contains(className);
|
|
@@ -2223,22 +2251,22 @@ var __publicField = (obj, key, value) => {
|
|
|
2223
2251
|
const config$1 = {
|
|
2224
2252
|
disabled: false
|
|
2225
2253
|
};
|
|
2226
|
-
var timeoutsShape = process.env.NODE_ENV !== "production" ?
|
|
2227
|
-
enter:
|
|
2228
|
-
exit:
|
|
2229
|
-
appear:
|
|
2254
|
+
var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
|
|
2255
|
+
enter: propTypesExports.number,
|
|
2256
|
+
exit: propTypesExports.number,
|
|
2257
|
+
appear: propTypesExports.number
|
|
2230
2258
|
}).isRequired]) : null;
|
|
2231
|
-
var classNamesShape = process.env.NODE_ENV !== "production" ?
|
|
2232
|
-
enter:
|
|
2233
|
-
exit:
|
|
2234
|
-
active:
|
|
2235
|
-
}),
|
|
2236
|
-
enter:
|
|
2237
|
-
enterDone:
|
|
2238
|
-
enterActive:
|
|
2239
|
-
exit:
|
|
2240
|
-
exitDone:
|
|
2241
|
-
exitActive:
|
|
2259
|
+
var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
|
|
2260
|
+
enter: propTypesExports.string,
|
|
2261
|
+
exit: propTypesExports.string,
|
|
2262
|
+
active: propTypesExports.string
|
|
2263
|
+
}), propTypesExports.shape({
|
|
2264
|
+
enter: propTypesExports.string,
|
|
2265
|
+
enterDone: propTypesExports.string,
|
|
2266
|
+
enterActive: propTypesExports.string,
|
|
2267
|
+
exit: propTypesExports.string,
|
|
2268
|
+
exitDone: propTypesExports.string,
|
|
2269
|
+
exitActive: propTypesExports.string
|
|
2242
2270
|
})]) : null;
|
|
2243
2271
|
const TransitionGroupContext = React.createContext(null);
|
|
2244
2272
|
var forceReflow = function forceReflow2(node) {
|
|
@@ -2488,10 +2516,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2488
2516
|
* (see
|
|
2489
2517
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
2490
2518
|
*/
|
|
2491
|
-
nodeRef:
|
|
2492
|
-
current: typeof Element === "undefined" ?
|
|
2519
|
+
nodeRef: propTypesExports.shape({
|
|
2520
|
+
current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
|
|
2493
2521
|
var value = propValue[key];
|
|
2494
|
-
return
|
|
2522
|
+
return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
2495
2523
|
}
|
|
2496
2524
|
}),
|
|
2497
2525
|
/**
|
|
@@ -2508,23 +2536,23 @@ var __publicField = (obj, key, value) => {
|
|
|
2508
2536
|
* </Transition>
|
|
2509
2537
|
* ```
|
|
2510
2538
|
*/
|
|
2511
|
-
children:
|
|
2539
|
+
children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
|
|
2512
2540
|
/**
|
|
2513
2541
|
* Show the component; triggers the enter or exit states
|
|
2514
2542
|
*/
|
|
2515
|
-
in:
|
|
2543
|
+
in: propTypesExports.bool,
|
|
2516
2544
|
/**
|
|
2517
2545
|
* By default the child component is mounted immediately along with
|
|
2518
2546
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
2519
2547
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
2520
2548
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
2521
2549
|
*/
|
|
2522
|
-
mountOnEnter:
|
|
2550
|
+
mountOnEnter: propTypesExports.bool,
|
|
2523
2551
|
/**
|
|
2524
2552
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
2525
2553
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
2526
2554
|
*/
|
|
2527
|
-
unmountOnExit:
|
|
2555
|
+
unmountOnExit: propTypesExports.bool,
|
|
2528
2556
|
/**
|
|
2529
2557
|
* By default the child component does not perform the enter transition when
|
|
2530
2558
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -2536,15 +2564,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2536
2564
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
2537
2565
|
* > differently.
|
|
2538
2566
|
*/
|
|
2539
|
-
appear:
|
|
2567
|
+
appear: propTypesExports.bool,
|
|
2540
2568
|
/**
|
|
2541
2569
|
* Enable or disable enter transitions.
|
|
2542
2570
|
*/
|
|
2543
|
-
enter:
|
|
2571
|
+
enter: propTypesExports.bool,
|
|
2544
2572
|
/**
|
|
2545
2573
|
* Enable or disable exit transitions.
|
|
2546
2574
|
*/
|
|
2547
|
-
exit:
|
|
2575
|
+
exit: propTypesExports.bool,
|
|
2548
2576
|
/**
|
|
2549
2577
|
* The duration of the transition, in milliseconds.
|
|
2550
2578
|
* Required unless `addEndListener` is provided.
|
|
@@ -2594,7 +2622,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2594
2622
|
* }}
|
|
2595
2623
|
* ```
|
|
2596
2624
|
*/
|
|
2597
|
-
addEndListener:
|
|
2625
|
+
addEndListener: propTypesExports.func,
|
|
2598
2626
|
/**
|
|
2599
2627
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
2600
2628
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2603,7 +2631,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2603
2631
|
*
|
|
2604
2632
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2605
2633
|
*/
|
|
2606
|
-
onEnter:
|
|
2634
|
+
onEnter: propTypesExports.func,
|
|
2607
2635
|
/**
|
|
2608
2636
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
2609
2637
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2612,7 +2640,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2612
2640
|
*
|
|
2613
2641
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2614
2642
|
*/
|
|
2615
|
-
onEntering:
|
|
2643
|
+
onEntering: propTypesExports.func,
|
|
2616
2644
|
/**
|
|
2617
2645
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
2618
2646
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2621,7 +2649,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2621
2649
|
*
|
|
2622
2650
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2623
2651
|
*/
|
|
2624
|
-
onEntered:
|
|
2652
|
+
onEntered: propTypesExports.func,
|
|
2625
2653
|
/**
|
|
2626
2654
|
* Callback fired before the "exiting" status is applied.
|
|
2627
2655
|
*
|
|
@@ -2629,7 +2657,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2629
2657
|
*
|
|
2630
2658
|
* @type Function(node: HtmlElement) -> void
|
|
2631
2659
|
*/
|
|
2632
|
-
onExit:
|
|
2660
|
+
onExit: propTypesExports.func,
|
|
2633
2661
|
/**
|
|
2634
2662
|
* Callback fired after the "exiting" status is applied.
|
|
2635
2663
|
*
|
|
@@ -2637,7 +2665,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2637
2665
|
*
|
|
2638
2666
|
* @type Function(node: HtmlElement) -> void
|
|
2639
2667
|
*/
|
|
2640
|
-
onExiting:
|
|
2668
|
+
onExiting: propTypesExports.func,
|
|
2641
2669
|
/**
|
|
2642
2670
|
* Callback fired after the "exited" status is applied.
|
|
2643
2671
|
*
|
|
@@ -2645,7 +2673,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2645
2673
|
*
|
|
2646
2674
|
* @type Function(node: HtmlElement) -> void
|
|
2647
2675
|
*/
|
|
2648
|
-
onExited:
|
|
2676
|
+
onExited: propTypesExports.func
|
|
2649
2677
|
} : {};
|
|
2650
2678
|
function noop$2() {
|
|
2651
2679
|
}
|
|
@@ -2884,7 +2912,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2884
2912
|
*
|
|
2885
2913
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2886
2914
|
*/
|
|
2887
|
-
onEnter:
|
|
2915
|
+
onEnter: propTypesExports.func,
|
|
2888
2916
|
/**
|
|
2889
2917
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
2890
2918
|
* 'appear-active' class is applied.
|
|
@@ -2893,7 +2921,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2893
2921
|
*
|
|
2894
2922
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2895
2923
|
*/
|
|
2896
|
-
onEntering:
|
|
2924
|
+
onEntering: propTypesExports.func,
|
|
2897
2925
|
/**
|
|
2898
2926
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
2899
2927
|
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
@@ -2902,7 +2930,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2902
2930
|
*
|
|
2903
2931
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2904
2932
|
*/
|
|
2905
|
-
onEntered:
|
|
2933
|
+
onEntered: propTypesExports.func,
|
|
2906
2934
|
/**
|
|
2907
2935
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
2908
2936
|
* applied.
|
|
@@ -2911,7 +2939,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2911
2939
|
*
|
|
2912
2940
|
* @type Function(node: HtmlElement)
|
|
2913
2941
|
*/
|
|
2914
|
-
onExit:
|
|
2942
|
+
onExit: propTypesExports.func,
|
|
2915
2943
|
/**
|
|
2916
2944
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
2917
2945
|
*
|
|
@@ -2919,7 +2947,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2919
2947
|
*
|
|
2920
2948
|
* @type Function(node: HtmlElement)
|
|
2921
2949
|
*/
|
|
2922
|
-
onExiting:
|
|
2950
|
+
onExiting: propTypesExports.func,
|
|
2923
2951
|
/**
|
|
2924
2952
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
2925
2953
|
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
@@ -2928,7 +2956,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2928
2956
|
*
|
|
2929
2957
|
* @type Function(node: HtmlElement)
|
|
2930
2958
|
*/
|
|
2931
|
-
onExited:
|
|
2959
|
+
onExited: propTypesExports.func
|
|
2932
2960
|
}) : {};
|
|
2933
2961
|
const CSSTransition$1 = CSSTransition;
|
|
2934
2962
|
const defaultProps$1m = {
|
|
@@ -16167,6 +16195,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16167
16195
|
type: "number",
|
|
16168
16196
|
style: systemStyle(),
|
|
16169
16197
|
maxLength: 6,
|
|
16198
|
+
pattern: "[0-9]*",
|
|
16170
16199
|
value: inputValue,
|
|
16171
16200
|
autoFocus,
|
|
16172
16201
|
onChange: (e) => changeValue(e)
|
|
@@ -17644,7 +17673,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17644
17673
|
return () => {
|
|
17645
17674
|
scrollEl.current.removeEventListener("scroll", handleScroll, useCapture);
|
|
17646
17675
|
};
|
|
17647
|
-
}, [hasMore, isInfiniting]);
|
|
17676
|
+
}, [hasMore, isInfiniting, onLoadMore]);
|
|
17648
17677
|
React.useEffect(() => {
|
|
17649
17678
|
const element = scroller.current;
|
|
17650
17679
|
element.addEventListener("touchmove", touchMove, { passive: false });
|
|
@@ -19251,7 +19280,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19251
19280
|
React.useEffect(() => {
|
|
19252
19281
|
setTimeout(() => {
|
|
19253
19282
|
if (domHeight !== -1) {
|
|
19254
|
-
isOpen ? setCurrHeight(
|
|
19283
|
+
isOpen ? setCurrHeight(`auto`) : setCurrHeight("0px");
|
|
19255
19284
|
}
|
|
19256
19285
|
const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
|
|
19257
19286
|
setIconStyle(newIconStyle);
|