@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.
@@ -74,7 +74,7 @@ var CollapseItem = function CollapseItem(props) {
74
74
  // 一开始content都有高度,在这里根据isOpen,改变其高度
75
75
  setTimeout(function () {
76
76
  if (domHeight !== -1) {
77
- isOpen ? setCurrHeight("".concat(domHeight, "px")) : setCurrHeight('0px');
77
+ isOpen ? setCurrHeight("auto") : setCurrHeight('0px');
78
78
  }
79
79
  var newIconStyle = isOpen ? {
80
80
  transform: "translateY(-50%) rotate(".concat(rotate, "deg)")
@@ -68,7 +68,7 @@ var Infiniteloading = function Infiniteloading(props) {
68
68
  return function () {
69
69
  scrollEl.current.removeEventListener('scroll', handleScroll, useCapture);
70
70
  };
71
- }, [hasMore, isInfiniting]);
71
+ }, [hasMore, isInfiniting, onLoadMore]);
72
72
  useEffect(function () {
73
73
  var element = scroller.current;
74
74
  element.addEventListener('touchmove', touchMove, {
@@ -143,6 +143,7 @@ var ShortPassword = function ShortPassword(props) {
143
143
  type: "number",
144
144
  style: systemStyle(),
145
145
  maxLength: 6,
146
+ pattern: "[0-9]*",
146
147
  value: inputValue,
147
148
  autoFocus: autoFocus,
148
149
  onChange: function onChange(e) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:20:30 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  var _a;
8
8
  /*!
9
- * @nutui/nutui-react v1.5.12 Wed Jul 12 2023 16:57:49 GMT+0800 (中国标准时间)
9
+ * @nutui/nutui-react v1.5.13 Mon Dec 11 2023 14:19:51 GMT+0800 (China Standard Time)
10
10
  * (c) 2023 @jdf2e.
11
11
  * Released under the MIT License.
12
12
  */
@@ -15,10 +15,15 @@ import React__default, { useCallback, useState, useEffect, createContext, useMem
15
15
  import * as ReactDOM from "react-dom";
16
16
  import ReactDOM__default, { createPortal, unstable_batchedUpdates } from "react-dom";
17
17
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
18
- function getDefaultExportFromCjs(x) {
19
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
20
- }
21
- var classname = { exports: {} };
18
+ var classnameExports = {};
19
+ var classname = {
20
+ get exports() {
21
+ return classnameExports;
22
+ },
23
+ set exports(v) {
24
+ classnameExports = v;
25
+ }
26
+ };
22
27
  var classname_production_min = {};
23
28
  var hasRequiredClassname_production_min;
24
29
  function requireClassname_production_min() {
@@ -122,12 +127,13 @@ function requireClassname_development() {
122
127
  classname_development.withNaming = withNaming;
123
128
  return classname_development;
124
129
  }
125
- if (process.env.NODE_ENV === "production") {
126
- classname.exports = requireClassname_production_min();
127
- } else {
128
- classname.exports = requireClassname_development();
129
- }
130
- var classnameExports = classname.exports;
130
+ (function(module) {
131
+ if (process.env.NODE_ENV === "production") {
132
+ module.exports = requireClassname_production_min();
133
+ } else {
134
+ module.exports = requireClassname_development();
135
+ }
136
+ })(classname);
131
137
  const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
132
138
  const defaultProps$1s = {
133
139
  name: "",
@@ -739,7 +745,6 @@ function words(string3, pattern4, guard) {
739
745
  return string3.match(pattern4) || [];
740
746
  }
741
747
  var lodash_kebabcase = kebabCase;
742
- const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
743
748
  const zhCN = {
744
749
  save: "保存",
745
750
  confirm: "确认",
@@ -887,7 +892,7 @@ const useConfig = () => {
887
892
  function convertThemeVarsToCSSVars(themeVars) {
888
893
  const cssVars = {};
889
894
  Object.keys(themeVars).forEach((key) => {
890
- cssVars[`--${kebabCase$1(key)}`] = themeVars[key];
895
+ cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
891
896
  });
892
897
  return cssVars;
893
898
  }
@@ -1065,7 +1070,15 @@ const Image$1 = (props) => {
1065
1070
  };
1066
1071
  Image$1.defaultProps = defaultProps$1n;
1067
1072
  Image$1.displayName = "NutImage";
1068
- var classnames = { exports: {} };
1073
+ var classnamesExports = {};
1074
+ var classnames = {
1075
+ get exports() {
1076
+ return classnamesExports;
1077
+ },
1078
+ set exports(v) {
1079
+ classnamesExports = v;
1080
+ }
1081
+ };
1069
1082
  /*!
1070
1083
  Copyright (c) 2018 Jed Watson.
1071
1084
  Licensed under the MIT License (MIT), see
@@ -1112,8 +1125,7 @@ var classnames = { exports: {} };
1112
1125
  }
1113
1126
  })();
1114
1127
  })(classnames);
1115
- var classnamesExports = classnames.exports;
1116
- const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
1128
+ const classNames = classnamesExports;
1117
1129
  const defaultOverlayProps = {
1118
1130
  zIndex: 1e3,
1119
1131
  duration: 0.3,
@@ -1228,8 +1240,24 @@ function _inheritsLoose$1(subClass, superClass) {
1228
1240
  subClass.prototype.constructor = subClass;
1229
1241
  _setPrototypeOf$1(subClass, superClass);
1230
1242
  }
1231
- var propTypes = { exports: {} };
1232
- var reactIs = { exports: {} };
1243
+ var propTypesExports = {};
1244
+ var propTypes = {
1245
+ get exports() {
1246
+ return propTypesExports;
1247
+ },
1248
+ set exports(v) {
1249
+ propTypesExports = v;
1250
+ }
1251
+ };
1252
+ var reactIsExports = {};
1253
+ var reactIs = {
1254
+ get exports() {
1255
+ return reactIsExports;
1256
+ },
1257
+ set exports(v) {
1258
+ reactIsExports = v;
1259
+ }
1260
+ };
1233
1261
  var reactIs_production_min = {};
1234
1262
  /** @license React v16.13.1
1235
1263
  * react-is.production.min.js
@@ -1500,14 +1528,16 @@ function requireReactIs_development() {
1500
1528
  var hasRequiredReactIs;
1501
1529
  function requireReactIs() {
1502
1530
  if (hasRequiredReactIs)
1503
- return reactIs.exports;
1531
+ return reactIsExports;
1504
1532
  hasRequiredReactIs = 1;
1505
- if (process.env.NODE_ENV === "production") {
1506
- reactIs.exports = requireReactIs_production_min();
1507
- } else {
1508
- reactIs.exports = requireReactIs_development();
1509
- }
1510
- return reactIs.exports;
1533
+ (function(module) {
1534
+ if (process.env.NODE_ENV === "production") {
1535
+ module.exports = requireReactIs_production_min();
1536
+ } else {
1537
+ module.exports = requireReactIs_development();
1538
+ }
1539
+ })(reactIs);
1540
+ return reactIsExports;
1511
1541
  }
1512
1542
  /*
1513
1543
  object-assign
@@ -2174,8 +2204,6 @@ if (process.env.NODE_ENV !== "production") {
2174
2204
  } else {
2175
2205
  propTypes.exports = requireFactoryWithThrowingShims()();
2176
2206
  }
2177
- var propTypesExports = propTypes.exports;
2178
- const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
2179
2207
  function hasClass(element, className) {
2180
2208
  if (element.classList)
2181
2209
  return !!className && element.classList.contains(className);
@@ -2205,22 +2233,22 @@ function removeClass$1(element, className) {
2205
2233
  const config$1 = {
2206
2234
  disabled: false
2207
2235
  };
2208
- var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
2209
- enter: PropTypes.number,
2210
- exit: PropTypes.number,
2211
- appear: PropTypes.number
2236
+ var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
2237
+ enter: propTypesExports.number,
2238
+ exit: propTypesExports.number,
2239
+ appear: propTypesExports.number
2212
2240
  }).isRequired]) : null;
2213
- var classNamesShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
2214
- enter: PropTypes.string,
2215
- exit: PropTypes.string,
2216
- active: PropTypes.string
2217
- }), PropTypes.shape({
2218
- enter: PropTypes.string,
2219
- enterDone: PropTypes.string,
2220
- enterActive: PropTypes.string,
2221
- exit: PropTypes.string,
2222
- exitDone: PropTypes.string,
2223
- exitActive: PropTypes.string
2241
+ var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
2242
+ enter: propTypesExports.string,
2243
+ exit: propTypesExports.string,
2244
+ active: propTypesExports.string
2245
+ }), propTypesExports.shape({
2246
+ enter: propTypesExports.string,
2247
+ enterDone: propTypesExports.string,
2248
+ enterActive: propTypesExports.string,
2249
+ exit: propTypesExports.string,
2250
+ exitDone: propTypesExports.string,
2251
+ exitActive: propTypesExports.string
2224
2252
  })]) : null;
2225
2253
  const TransitionGroupContext = React__default.createContext(null);
2226
2254
  var forceReflow = function forceReflow2(node) {
@@ -2470,10 +2498,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2470
2498
  * (see
2471
2499
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
2472
2500
  */
2473
- nodeRef: PropTypes.shape({
2474
- current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location, propFullName, secret) {
2501
+ nodeRef: propTypesExports.shape({
2502
+ current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
2475
2503
  var value = propValue[key];
2476
- return PropTypes.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2504
+ return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2477
2505
  }
2478
2506
  }),
2479
2507
  /**
@@ -2490,23 +2518,23 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2490
2518
  * </Transition>
2491
2519
  * ```
2492
2520
  */
2493
- children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
2521
+ children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
2494
2522
  /**
2495
2523
  * Show the component; triggers the enter or exit states
2496
2524
  */
2497
- in: PropTypes.bool,
2525
+ in: propTypesExports.bool,
2498
2526
  /**
2499
2527
  * By default the child component is mounted immediately along with
2500
2528
  * the parent `Transition` component. If you want to "lazy mount" the component on the
2501
2529
  * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
2502
2530
  * mounted, even on "exited", unless you also specify `unmountOnExit`.
2503
2531
  */
2504
- mountOnEnter: PropTypes.bool,
2532
+ mountOnEnter: propTypesExports.bool,
2505
2533
  /**
2506
2534
  * By default the child component stays mounted after it reaches the `'exited'` state.
2507
2535
  * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
2508
2536
  */
2509
- unmountOnExit: PropTypes.bool,
2537
+ unmountOnExit: propTypesExports.bool,
2510
2538
  /**
2511
2539
  * By default the child component does not perform the enter transition when
2512
2540
  * it first mounts, regardless of the value of `in`. If you want this
@@ -2518,15 +2546,15 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2518
2546
  * > additional `.appear-*` classes, that way you can choose to style it
2519
2547
  * > differently.
2520
2548
  */
2521
- appear: PropTypes.bool,
2549
+ appear: propTypesExports.bool,
2522
2550
  /**
2523
2551
  * Enable or disable enter transitions.
2524
2552
  */
2525
- enter: PropTypes.bool,
2553
+ enter: propTypesExports.bool,
2526
2554
  /**
2527
2555
  * Enable or disable exit transitions.
2528
2556
  */
2529
- exit: PropTypes.bool,
2557
+ exit: propTypesExports.bool,
2530
2558
  /**
2531
2559
  * The duration of the transition, in milliseconds.
2532
2560
  * Required unless `addEndListener` is provided.
@@ -2576,7 +2604,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2576
2604
  * }}
2577
2605
  * ```
2578
2606
  */
2579
- addEndListener: PropTypes.func,
2607
+ addEndListener: propTypesExports.func,
2580
2608
  /**
2581
2609
  * Callback fired before the "entering" status is applied. An extra parameter
2582
2610
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2585,7 +2613,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2585
2613
  *
2586
2614
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2587
2615
  */
2588
- onEnter: PropTypes.func,
2616
+ onEnter: propTypesExports.func,
2589
2617
  /**
2590
2618
  * Callback fired after the "entering" status is applied. An extra parameter
2591
2619
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2594,7 +2622,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2594
2622
  *
2595
2623
  * @type Function(node: HtmlElement, isAppearing: bool)
2596
2624
  */
2597
- onEntering: PropTypes.func,
2625
+ onEntering: propTypesExports.func,
2598
2626
  /**
2599
2627
  * Callback fired after the "entered" 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 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2603
2631
  *
2604
2632
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2605
2633
  */
2606
- onEntered: PropTypes.func,
2634
+ onEntered: propTypesExports.func,
2607
2635
  /**
2608
2636
  * Callback fired before the "exiting" status is applied.
2609
2637
  *
@@ -2611,7 +2639,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2611
2639
  *
2612
2640
  * @type Function(node: HtmlElement) -> void
2613
2641
  */
2614
- onExit: PropTypes.func,
2642
+ onExit: propTypesExports.func,
2615
2643
  /**
2616
2644
  * Callback fired after the "exiting" status is applied.
2617
2645
  *
@@ -2619,7 +2647,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2619
2647
  *
2620
2648
  * @type Function(node: HtmlElement) -> void
2621
2649
  */
2622
- onExiting: PropTypes.func,
2650
+ onExiting: propTypesExports.func,
2623
2651
  /**
2624
2652
  * Callback fired after the "exited" status is applied.
2625
2653
  *
@@ -2627,7 +2655,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2627
2655
  *
2628
2656
  * @type Function(node: HtmlElement) -> void
2629
2657
  */
2630
- onExited: PropTypes.func
2658
+ onExited: propTypesExports.func
2631
2659
  } : {};
2632
2660
  function noop$2() {
2633
2661
  }
@@ -2866,7 +2894,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2866
2894
  *
2867
2895
  * @type Function(node: HtmlElement, isAppearing: bool)
2868
2896
  */
2869
- onEnter: PropTypes.func,
2897
+ onEnter: propTypesExports.func,
2870
2898
  /**
2871
2899
  * A `<Transition>` callback fired immediately after the 'enter-active' or
2872
2900
  * 'appear-active' class is applied.
@@ -2875,7 +2903,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2875
2903
  *
2876
2904
  * @type Function(node: HtmlElement, isAppearing: bool)
2877
2905
  */
2878
- onEntering: PropTypes.func,
2906
+ onEntering: propTypesExports.func,
2879
2907
  /**
2880
2908
  * A `<Transition>` callback fired immediately after the 'enter' or
2881
2909
  * 'appear' classes are **removed** and the `done` class is added to the DOM node.
@@ -2884,7 +2912,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2884
2912
  *
2885
2913
  * @type Function(node: HtmlElement, isAppearing: bool)
2886
2914
  */
2887
- onEntered: PropTypes.func,
2915
+ onEntered: propTypesExports.func,
2888
2916
  /**
2889
2917
  * A `<Transition>` callback fired immediately after the 'exit' class is
2890
2918
  * applied.
@@ -2893,7 +2921,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2893
2921
  *
2894
2922
  * @type Function(node: HtmlElement)
2895
2923
  */
2896
- onExit: PropTypes.func,
2924
+ onExit: propTypesExports.func,
2897
2925
  /**
2898
2926
  * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
2899
2927
  *
@@ -2901,7 +2929,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2901
2929
  *
2902
2930
  * @type Function(node: HtmlElement)
2903
2931
  */
2904
- onExiting: PropTypes.func,
2932
+ onExiting: propTypesExports.func,
2905
2933
  /**
2906
2934
  * A `<Transition>` callback fired immediately after the 'exit' classes
2907
2935
  * are **removed** and the `exit-done` class is added to the DOM node.
@@ -2910,7 +2938,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
2910
2938
  *
2911
2939
  * @type Function(node: HtmlElement)
2912
2940
  */
2913
- onExited: PropTypes.func
2941
+ onExited: propTypesExports.func
2914
2942
  }) : {};
2915
2943
  const CSSTransition$1 = CSSTransition;
2916
2944
  const defaultProps$1m = {
@@ -16149,6 +16177,7 @@ const ShortPassword = (props) => {
16149
16177
  type: "number",
16150
16178
  style: systemStyle(),
16151
16179
  maxLength: 6,
16180
+ pattern: "[0-9]*",
16152
16181
  value: inputValue,
16153
16182
  autoFocus,
16154
16183
  onChange: (e) => changeValue(e)
@@ -17626,7 +17655,7 @@ const Infiniteloading = (props) => {
17626
17655
  return () => {
17627
17656
  scrollEl.current.removeEventListener("scroll", handleScroll, useCapture);
17628
17657
  };
17629
- }, [hasMore, isInfiniting]);
17658
+ }, [hasMore, isInfiniting, onLoadMore]);
17630
17659
  useEffect(() => {
17631
17660
  const element = scroller.current;
17632
17661
  element.addEventListener("touchmove", touchMove, { passive: false });
@@ -19233,7 +19262,7 @@ const CollapseItem = (props) => {
19233
19262
  useEffect(() => {
19234
19263
  setTimeout(() => {
19235
19264
  if (domHeight !== -1) {
19236
- isOpen ? setCurrHeight(`${domHeight}px`) : setCurrHeight("0px");
19265
+ isOpen ? setCurrHeight(`auto`) : setCurrHeight("0px");
19237
19266
  }
19238
19267
  const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
19239
19268
  setIconStyle(newIconStyle);