@nutui/nutui-react-taro 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.
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v1.5.12 Wed Jul 12 2023 16:54:56 GMT+0800 (中国标准时间)
11
+ * @nutui/nutui-react-taro v1.5.13 Mon Dec 11 2023 14:53:27 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -31,10 +31,15 @@ var __publicField = (obj, key, value) => {
31
31
  }
32
32
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
33
33
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
34
- function getDefaultExportFromCjs(x) {
35
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
36
- }
37
- var classname = { exports: {} };
34
+ var classnameExports = {};
35
+ var classname = {
36
+ get exports() {
37
+ return classnameExports;
38
+ },
39
+ set exports(v) {
40
+ classnameExports = v;
41
+ }
42
+ };
38
43
  var classname_production_min = {};
39
44
  var hasRequiredClassname_production_min;
40
45
  function requireClassname_production_min() {
@@ -138,12 +143,13 @@ var __publicField = (obj, key, value) => {
138
143
  classname_development.withNaming = withNaming;
139
144
  return classname_development;
140
145
  }
141
- if (process.env.NODE_ENV === "production") {
142
- classname.exports = requireClassname_production_min();
143
- } else {
144
- classname.exports = requireClassname_development();
145
- }
146
- var classnameExports = classname.exports;
146
+ (function(module2) {
147
+ if (process.env.NODE_ENV === "production") {
148
+ module2.exports = requireClassname_production_min();
149
+ } else {
150
+ module2.exports = requireClassname_development();
151
+ }
152
+ })(classname);
147
153
  const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
148
154
  const defaultProps$1v = {
149
155
  name: "",
@@ -759,7 +765,6 @@ var __publicField = (obj, key, value) => {
759
765
  return string.match(pattern) || [];
760
766
  }
761
767
  var lodash_kebabcase = kebabCase;
762
- const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
763
768
  const zhCN = {
764
769
  save: "保存",
765
770
  confirm: "确认",
@@ -907,7 +912,7 @@ var __publicField = (obj, key, value) => {
907
912
  function convertThemeVarsToCSSVars(themeVars) {
908
913
  const cssVars = {};
909
914
  Object.keys(themeVars).forEach((key) => {
910
- cssVars[`--${kebabCase$1(key)}`] = themeVars[key];
915
+ cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
911
916
  });
912
917
  return cssVars;
913
918
  }
@@ -1024,7 +1029,15 @@ var __publicField = (obj, key, value) => {
1024
1029
  };
1025
1030
  Image$1.defaultProps = defaultProps$1q;
1026
1031
  Image$1.displayName = "NutImage";
1027
- var classnames = { exports: {} };
1032
+ var classnamesExports = {};
1033
+ var classnames = {
1034
+ get exports() {
1035
+ return classnamesExports;
1036
+ },
1037
+ set exports(v) {
1038
+ classnamesExports = v;
1039
+ }
1040
+ };
1028
1041
  /*!
1029
1042
  Copyright (c) 2018 Jed Watson.
1030
1043
  Licensed under the MIT License (MIT), see
@@ -1071,8 +1084,7 @@ var __publicField = (obj, key, value) => {
1071
1084
  }
1072
1085
  })();
1073
1086
  })(classnames);
1074
- var classnamesExports = classnames.exports;
1075
- const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
1087
+ const classNames = classnamesExports;
1076
1088
  const defaultOverlayProps = {
1077
1089
  zIndex: 2e3,
1078
1090
  duration: 0.3,
@@ -1198,8 +1210,24 @@ var __publicField = (obj, key, value) => {
1198
1210
  subClass.prototype.constructor = subClass;
1199
1211
  _setPrototypeOf(subClass, superClass);
1200
1212
  }
1201
- var propTypes = { exports: {} };
1202
- var reactIs = { exports: {} };
1213
+ var propTypesExports = {};
1214
+ var propTypes = {
1215
+ get exports() {
1216
+ return propTypesExports;
1217
+ },
1218
+ set exports(v) {
1219
+ propTypesExports = v;
1220
+ }
1221
+ };
1222
+ var reactIsExports = {};
1223
+ var reactIs = {
1224
+ get exports() {
1225
+ return reactIsExports;
1226
+ },
1227
+ set exports(v) {
1228
+ reactIsExports = v;
1229
+ }
1230
+ };
1203
1231
  var reactIs_production_min = {};
1204
1232
  /** @license React v16.13.1
1205
1233
  * react-is.production.min.js
@@ -1470,14 +1498,16 @@ var __publicField = (obj, key, value) => {
1470
1498
  var hasRequiredReactIs;
1471
1499
  function requireReactIs() {
1472
1500
  if (hasRequiredReactIs)
1473
- return reactIs.exports;
1501
+ return reactIsExports;
1474
1502
  hasRequiredReactIs = 1;
1475
- if (process.env.NODE_ENV === "production") {
1476
- reactIs.exports = requireReactIs_production_min();
1477
- } else {
1478
- reactIs.exports = requireReactIs_development();
1479
- }
1480
- return reactIs.exports;
1503
+ (function(module2) {
1504
+ if (process.env.NODE_ENV === "production") {
1505
+ module2.exports = requireReactIs_production_min();
1506
+ } else {
1507
+ module2.exports = requireReactIs_development();
1508
+ }
1509
+ })(reactIs);
1510
+ return reactIsExports;
1481
1511
  }
1482
1512
  /*
1483
1513
  object-assign
@@ -2144,8 +2174,6 @@ var __publicField = (obj, key, value) => {
2144
2174
  } else {
2145
2175
  propTypes.exports = requireFactoryWithThrowingShims()();
2146
2176
  }
2147
- var propTypesExports = propTypes.exports;
2148
- const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
2149
2177
  function hasClass(element, className) {
2150
2178
  if (element.classList)
2151
2179
  return !!className && element.classList.contains(className);
@@ -2175,22 +2203,22 @@ var __publicField = (obj, key, value) => {
2175
2203
  const config$1 = {
2176
2204
  disabled: false
2177
2205
  };
2178
- var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
2179
- enter: PropTypes.number,
2180
- exit: PropTypes.number,
2181
- appear: PropTypes.number
2206
+ var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
2207
+ enter: propTypesExports.number,
2208
+ exit: propTypesExports.number,
2209
+ appear: propTypesExports.number
2182
2210
  }).isRequired]) : null;
2183
- var classNamesShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
2184
- enter: PropTypes.string,
2185
- exit: PropTypes.string,
2186
- active: PropTypes.string
2187
- }), PropTypes.shape({
2188
- enter: PropTypes.string,
2189
- enterDone: PropTypes.string,
2190
- enterActive: PropTypes.string,
2191
- exit: PropTypes.string,
2192
- exitDone: PropTypes.string,
2193
- exitActive: PropTypes.string
2211
+ var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
2212
+ enter: propTypesExports.string,
2213
+ exit: propTypesExports.string,
2214
+ active: propTypesExports.string
2215
+ }), propTypesExports.shape({
2216
+ enter: propTypesExports.string,
2217
+ enterDone: propTypesExports.string,
2218
+ enterActive: propTypesExports.string,
2219
+ exit: propTypesExports.string,
2220
+ exitDone: propTypesExports.string,
2221
+ exitActive: propTypesExports.string
2194
2222
  })]) : null;
2195
2223
  const TransitionGroupContext = React.createContext(null);
2196
2224
  var forceReflow = function forceReflow2(node) {
@@ -2440,10 +2468,10 @@ var __publicField = (obj, key, value) => {
2440
2468
  * (see
2441
2469
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
2442
2470
  */
2443
- nodeRef: PropTypes.shape({
2444
- current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location, propFullName, secret) {
2471
+ nodeRef: propTypesExports.shape({
2472
+ current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
2445
2473
  var value = propValue[key];
2446
- return PropTypes.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2474
+ return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2447
2475
  }
2448
2476
  }),
2449
2477
  /**
@@ -2460,23 +2488,23 @@ var __publicField = (obj, key, value) => {
2460
2488
  * </Transition>
2461
2489
  * ```
2462
2490
  */
2463
- children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
2491
+ children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
2464
2492
  /**
2465
2493
  * Show the component; triggers the enter or exit states
2466
2494
  */
2467
- in: PropTypes.bool,
2495
+ in: propTypesExports.bool,
2468
2496
  /**
2469
2497
  * By default the child component is mounted immediately along with
2470
2498
  * the parent `Transition` component. If you want to "lazy mount" the component on the
2471
2499
  * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
2472
2500
  * mounted, even on "exited", unless you also specify `unmountOnExit`.
2473
2501
  */
2474
- mountOnEnter: PropTypes.bool,
2502
+ mountOnEnter: propTypesExports.bool,
2475
2503
  /**
2476
2504
  * By default the child component stays mounted after it reaches the `'exited'` state.
2477
2505
  * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
2478
2506
  */
2479
- unmountOnExit: PropTypes.bool,
2507
+ unmountOnExit: propTypesExports.bool,
2480
2508
  /**
2481
2509
  * By default the child component does not perform the enter transition when
2482
2510
  * it first mounts, regardless of the value of `in`. If you want this
@@ -2488,15 +2516,15 @@ var __publicField = (obj, key, value) => {
2488
2516
  * > additional `.appear-*` classes, that way you can choose to style it
2489
2517
  * > differently.
2490
2518
  */
2491
- appear: PropTypes.bool,
2519
+ appear: propTypesExports.bool,
2492
2520
  /**
2493
2521
  * Enable or disable enter transitions.
2494
2522
  */
2495
- enter: PropTypes.bool,
2523
+ enter: propTypesExports.bool,
2496
2524
  /**
2497
2525
  * Enable or disable exit transitions.
2498
2526
  */
2499
- exit: PropTypes.bool,
2527
+ exit: propTypesExports.bool,
2500
2528
  /**
2501
2529
  * The duration of the transition, in milliseconds.
2502
2530
  * Required unless `addEndListener` is provided.
@@ -2546,7 +2574,7 @@ var __publicField = (obj, key, value) => {
2546
2574
  * }}
2547
2575
  * ```
2548
2576
  */
2549
- addEndListener: PropTypes.func,
2577
+ addEndListener: propTypesExports.func,
2550
2578
  /**
2551
2579
  * Callback fired before the "entering" status is applied. An extra parameter
2552
2580
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2555,7 +2583,7 @@ var __publicField = (obj, key, value) => {
2555
2583
  *
2556
2584
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2557
2585
  */
2558
- onEnter: PropTypes.func,
2586
+ onEnter: propTypesExports.func,
2559
2587
  /**
2560
2588
  * Callback fired after the "entering" status is applied. An extra parameter
2561
2589
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2564,7 +2592,7 @@ var __publicField = (obj, key, value) => {
2564
2592
  *
2565
2593
  * @type Function(node: HtmlElement, isAppearing: bool)
2566
2594
  */
2567
- onEntering: PropTypes.func,
2595
+ onEntering: propTypesExports.func,
2568
2596
  /**
2569
2597
  * Callback fired after the "entered" status is applied. An extra parameter
2570
2598
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2573,7 +2601,7 @@ var __publicField = (obj, key, value) => {
2573
2601
  *
2574
2602
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2575
2603
  */
2576
- onEntered: PropTypes.func,
2604
+ onEntered: propTypesExports.func,
2577
2605
  /**
2578
2606
  * Callback fired before the "exiting" status is applied.
2579
2607
  *
@@ -2581,7 +2609,7 @@ var __publicField = (obj, key, value) => {
2581
2609
  *
2582
2610
  * @type Function(node: HtmlElement) -> void
2583
2611
  */
2584
- onExit: PropTypes.func,
2612
+ onExit: propTypesExports.func,
2585
2613
  /**
2586
2614
  * Callback fired after the "exiting" status is applied.
2587
2615
  *
@@ -2589,7 +2617,7 @@ var __publicField = (obj, key, value) => {
2589
2617
  *
2590
2618
  * @type Function(node: HtmlElement) -> void
2591
2619
  */
2592
- onExiting: PropTypes.func,
2620
+ onExiting: propTypesExports.func,
2593
2621
  /**
2594
2622
  * Callback fired after the "exited" status is applied.
2595
2623
  *
@@ -2597,7 +2625,7 @@ var __publicField = (obj, key, value) => {
2597
2625
  *
2598
2626
  * @type Function(node: HtmlElement) -> void
2599
2627
  */
2600
- onExited: PropTypes.func
2628
+ onExited: propTypesExports.func
2601
2629
  } : {};
2602
2630
  function noop$2() {
2603
2631
  }
@@ -2836,7 +2864,7 @@ var __publicField = (obj, key, value) => {
2836
2864
  *
2837
2865
  * @type Function(node: HtmlElement, isAppearing: bool)
2838
2866
  */
2839
- onEnter: PropTypes.func,
2867
+ onEnter: propTypesExports.func,
2840
2868
  /**
2841
2869
  * A `<Transition>` callback fired immediately after the 'enter-active' or
2842
2870
  * 'appear-active' class is applied.
@@ -2845,7 +2873,7 @@ var __publicField = (obj, key, value) => {
2845
2873
  *
2846
2874
  * @type Function(node: HtmlElement, isAppearing: bool)
2847
2875
  */
2848
- onEntering: PropTypes.func,
2876
+ onEntering: propTypesExports.func,
2849
2877
  /**
2850
2878
  * A `<Transition>` callback fired immediately after the 'enter' or
2851
2879
  * 'appear' classes are **removed** and the `done` class is added to the DOM node.
@@ -2854,7 +2882,7 @@ var __publicField = (obj, key, value) => {
2854
2882
  *
2855
2883
  * @type Function(node: HtmlElement, isAppearing: bool)
2856
2884
  */
2857
- onEntered: PropTypes.func,
2885
+ onEntered: propTypesExports.func,
2858
2886
  /**
2859
2887
  * A `<Transition>` callback fired immediately after the 'exit' class is
2860
2888
  * applied.
@@ -2863,7 +2891,7 @@ var __publicField = (obj, key, value) => {
2863
2891
  *
2864
2892
  * @type Function(node: HtmlElement)
2865
2893
  */
2866
- onExit: PropTypes.func,
2894
+ onExit: propTypesExports.func,
2867
2895
  /**
2868
2896
  * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
2869
2897
  *
@@ -2871,7 +2899,7 @@ var __publicField = (obj, key, value) => {
2871
2899
  *
2872
2900
  * @type Function(node: HtmlElement)
2873
2901
  */
2874
- onExiting: PropTypes.func,
2902
+ onExiting: propTypesExports.func,
2875
2903
  /**
2876
2904
  * A `<Transition>` callback fired immediately after the 'exit' classes
2877
2905
  * are **removed** and the `exit-done` class is added to the DOM node.
@@ -2880,7 +2908,7 @@ var __publicField = (obj, key, value) => {
2880
2908
  *
2881
2909
  * @type Function(node: HtmlElement)
2882
2910
  */
2883
- onExited: PropTypes.func
2911
+ onExited: propTypesExports.func
2884
2912
  }) : {};
2885
2913
  const CSSTransition$1 = CSSTransition;
2886
2914
  const defaultProps$1p = {
@@ -8809,9 +8837,9 @@ var __publicField = (obj, key, value) => {
8809
8837
  return renderButton();
8810
8838
  }
8811
8839
  if (reverseState) {
8812
- return [renderLabel(), renderIcon()];
8840
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, renderLabel(), renderIcon());
8813
8841
  }
8814
- return [renderIcon(), renderLabel()];
8842
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, renderIcon(), renderLabel());
8815
8843
  };
8816
8844
  const handleClick = (e) => {
8817
8845
  if (disabledStatement || checkedStatement)
@@ -9924,6 +9952,7 @@ var __publicField = (obj, key, value) => {
9924
9952
  type: "number",
9925
9953
  style: systemStyle(),
9926
9954
  maxLength: 6,
9955
+ pattern: "[0-9]*",
9927
9956
  value: inputValue,
9928
9957
  autoFocus,
9929
9958
  onChange: (e) => changeValue(e)
@@ -17303,7 +17332,7 @@ This message will only show in development mode. It won't appear in production.
17303
17332
  React.useEffect(() => {
17304
17333
  setTimeout(() => {
17305
17334
  if (domHeight !== -1) {
17306
- isOpen ? setCurrHeight(`${domHeight}px`) : setCurrHeight("0px");
17335
+ isOpen ? setCurrHeight(`auto`) : setCurrHeight("0px");
17307
17336
  }
17308
17337
  const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
17309
17338
  setIconStyle(newIconStyle);