@nutui/nutui-react 2.6.2 → 2.6.4

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/dist/esm/Address/style/style.css +1 -1
  3. package/dist/esm/BackTop.js +0 -1
  4. package/dist/esm/Cascader/style/style.css +1 -1
  5. package/dist/esm/Cell.js +0 -1
  6. package/dist/esm/CellGroup.js +0 -1
  7. package/dist/esm/Col.js +0 -1
  8. package/dist/esm/Divider.js +0 -1
  9. package/dist/esm/Elevator.js +0 -1
  10. package/dist/esm/FixedNav.js +0 -1
  11. package/dist/esm/Grid.js +0 -1
  12. package/dist/esm/Image.js +2 -3
  13. package/dist/esm/ImagePreview.js +4 -3
  14. package/dist/esm/NavBar.js +0 -1
  15. package/dist/esm/Row.js +0 -1
  16. package/dist/esm/SideNavBar.js +4 -5
  17. package/dist/esm/Space.js +0 -1
  18. package/dist/esm/Sticky.js +0 -1
  19. package/dist/esm/TabPane/style/style.css +1 -1
  20. package/dist/esm/Tabbar.js +0 -1
  21. package/dist/esm/Tabs/style/style.css +1 -1
  22. package/dist/esm/griditem2.js +0 -1
  23. package/dist/esm/overlay2.js +1 -2
  24. package/dist/esm/safearea2.js +1 -0
  25. package/dist/esm/tabs2.js +14 -12
  26. package/dist/locales/base.js +1 -1
  27. package/dist/locales/en-US.js +1 -1
  28. package/dist/locales/id-ID.js +1 -1
  29. package/dist/locales/tr-TR.js +1 -1
  30. package/dist/locales/zh-CN.js +1 -1
  31. package/dist/locales/zh-TW.js +1 -1
  32. package/dist/locales/zh-UG.js +1 -1
  33. package/dist/nutui.react.es.js +28 -37
  34. package/dist/nutui.react.umd.js +28 -37
  35. package/dist/packages/tabpane/tabpane.scss +1 -1
  36. package/dist/style.css +1 -1
  37. package/dist/style.mjs +1 -1
  38. package/dist/styles/variables-jmapp.scss +1 -0
  39. package/dist/styles/variables.scss +1 -0
  40. package/dist/types/packages/configprovider/types.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/types/utils/use-lock-fn.d.ts +0 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.2 Fri Apr 26 2024 15:03:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:33 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 v2.6.2 Fri Apr 26 2024 15:03:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:33 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 v2.6.2 Fri Apr 26 2024 15:03:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:33 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 v2.6.2 Fri Apr 26 2024 15:03:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:33 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 v2.6.2 Fri Apr 26 2024 15:03:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:33 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 v2.6.2 Fri Apr 26 2024 15:03:22 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:06 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1242,7 +1242,6 @@ const CellGroup = (props) => {
1242
1242
  /* @__PURE__ */ React__default.createElement(CellGroupContext.Provider, { value: { divider } }, children)
1243
1243
  ));
1244
1244
  };
1245
- CellGroup.defaultProps = defaultProps$1t;
1246
1245
  CellGroup.displayName = "NutCellGroup";
1247
1246
  const defaultProps$1s = {
1248
1247
  ...ComponentDefaults,
@@ -1302,7 +1301,6 @@ const Cell = (props) => {
1302
1301
  (ctx2 == null ? void 0 : ctx2.divider) ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$q}-divider` }) : null
1303
1302
  );
1304
1303
  };
1305
- Cell.defaultProps = defaultProps$1s;
1306
1304
  Cell.displayName = "NutCell";
1307
1305
  Cell.Group = CellGroup;
1308
1306
  var INFINITY = 1 / 0;
@@ -2490,6 +2488,7 @@ const Image$1 = (props) => {
2490
2488
  error,
2491
2489
  loading,
2492
2490
  lazy,
2491
+ draggable,
2493
2492
  onClick,
2494
2493
  onLoad,
2495
2494
  onError
@@ -2618,7 +2617,7 @@ const Image$1 = (props) => {
2618
2617
  loading: "lazy",
2619
2618
  onLoad: handleLoad,
2620
2619
  onError: handleError,
2621
- draggable: props.draggable
2620
+ draggable
2622
2621
  }
2623
2622
  ) : /* @__PURE__ */ React__default.createElement(
2624
2623
  "img",
@@ -2630,14 +2629,13 @@ const Image$1 = (props) => {
2630
2629
  alt,
2631
2630
  onLoad: handleLoad,
2632
2631
  onError: handleError,
2633
- draggable: props.draggable
2632
+ draggable
2634
2633
  }
2635
2634
  ),
2636
2635
  renderLoading(),
2637
2636
  renderErrorImg()
2638
2637
  );
2639
2638
  };
2640
- Image$1.defaultProps = defaultProps$1r;
2641
2639
  Image$1.displayName = "NutImage";
2642
2640
  function _extends$4() {
2643
2641
  _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
@@ -4598,7 +4596,7 @@ const Overlay = (props) => {
4598
4596
  setInnerVisible(false);
4599
4597
  }
4600
4598
  }, [visible]);
4601
- useLockScroll(nodeRef, !!props.lockScroll && innerVisible);
4599
+ useLockScroll(nodeRef, !!lockScroll && innerVisible);
4602
4600
  const classes = classNames(classPrefix2, className);
4603
4601
  const styles = {
4604
4602
  ...style
@@ -4638,7 +4636,6 @@ const Overlay = (props) => {
4638
4636
  )
4639
4637
  ));
4640
4638
  };
4641
- Overlay.defaultProps = defaultOverlayProps;
4642
4639
  Overlay.displayName = "NutOverlay";
4643
4640
  const DataContext$1 = createContext({});
4644
4641
  const defaultProps$1q = {
@@ -4681,7 +4678,6 @@ const Col = (props) => {
4681
4678
  children
4682
4679
  );
4683
4680
  };
4684
- Col.defaultProps = defaultProps$1q;
4685
4681
  Col.displayName = "NutCol";
4686
4682
  const defaultProps$1p = {
4687
4683
  ...ComponentDefaults,
@@ -4706,7 +4702,6 @@ const Divider = (props) => {
4706
4702
  });
4707
4703
  return /* @__PURE__ */ React__default.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
4708
4704
  };
4709
- Divider.defaultProps = defaultProps$1p;
4710
4705
  Divider.displayName = "NutDivider";
4711
4706
  const gridContext = {
4712
4707
  onClick: (item, index) => {
@@ -4797,7 +4792,6 @@ const GridItem = (props) => {
4797
4792
  /* @__PURE__ */ React__default.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children), text && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-text` }, text))
4798
4793
  );
4799
4794
  };
4800
- GridItem.defaultProps = defaultProps$1o;
4801
4795
  GridItem.displayName = "NutGridItem";
4802
4796
  const defaultProps$1n = {
4803
4797
  columns: 4,
@@ -4854,7 +4848,6 @@ const Grid = (props) => {
4854
4848
  });
4855
4849
  })));
4856
4850
  };
4857
- Grid.defaultProps = defaultProps$1n;
4858
4851
  Grid.displayName = "NutGrid";
4859
4852
  Grid.Item = GridItem;
4860
4853
  const defaultProps$1m = {};
@@ -4917,7 +4910,6 @@ const Row = (props) => {
4917
4910
  children
4918
4911
  ));
4919
4912
  };
4920
- Row.defaultProps = defaultProps$1l;
4921
4913
  Row.displayName = "NutRow";
4922
4914
  const prefixCls$1 = "nut-space";
4923
4915
  const defaultProps$1k = {
@@ -4940,7 +4932,6 @@ const Space = (props) => {
4940
4932
  return child !== null && child !== void 0 && /* @__PURE__ */ React__default.createElement("div", { className: `${prefixCls$1}-item` }, child);
4941
4933
  }));
4942
4934
  };
4943
- Space.defaultProps = defaultProps$1k;
4944
4935
  Space.displayName = "NutSpace";
4945
4936
  function isWindow(val) {
4946
4937
  return val === window;
@@ -5128,7 +5119,6 @@ const Sticky = (props) => {
5128
5119
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-sticky-box", ref: stickyRef, style: stickyStyle }, children)
5129
5120
  );
5130
5121
  };
5131
- Sticky.defaultProps = defaultProps$1j;
5132
5122
  Sticky.displayName = "NutSticky";
5133
5123
  const classPrefix$k = "nut-safe-area";
5134
5124
  const SafeArea = (props) => {
@@ -5142,6 +5132,7 @@ const SafeArea = (props) => {
5142
5132
  }
5143
5133
  );
5144
5134
  };
5135
+ SafeArea.displayName = "NutSafeArea";
5145
5136
  const defaultProps$1i = {
5146
5137
  ...ComponentDefaults,
5147
5138
  target: "",
@@ -5258,7 +5249,6 @@ const BackTop = (props) => {
5258
5249
  children || /* @__PURE__ */ React__default.createElement(e$1, { width: 19, height: 19, className: "nut-backtop-main" })
5259
5250
  );
5260
5251
  };
5261
- BackTop.defaultProps = defaultProps$1i;
5262
5252
  BackTop.displayName = "NutBackTop";
5263
5253
  function clamp$2(v, min, max) {
5264
5254
  return Math.max(min, Math.min(v, max));
@@ -10578,7 +10568,6 @@ const Elevator = (props) => {
10578
10568
  })
10579
10569
  ))) : null);
10580
10570
  };
10581
- Elevator.defaultProps = defaultProps$1h;
10582
10571
  Elevator.displayName = "NutElevator";
10583
10572
  Elevator.Context = elevatorContext;
10584
10573
  const defaultProps$1g = {
@@ -10661,7 +10650,6 @@ const FixedNav = (props) => {
10661
10650
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(e$d, { color: "#fff" }), /* @__PURE__ */ React__default.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
10662
10651
  );
10663
10652
  };
10664
- FixedNav.defaultProps = defaultProps$1g;
10665
10653
  FixedNav.displayName = "NutFixedNav";
10666
10654
  const defaultProps$1f = {
10667
10655
  ...ComponentDefaults,
@@ -10764,7 +10752,6 @@ const NavBar = (props) => {
10764
10752
  const cls = classNames(classPrefix2, classes, className);
10765
10753
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
10766
10754
  };
10767
- NavBar.defaultProps = defaultProps$1f;
10768
10755
  NavBar.displayName = "NutNavBar";
10769
10756
  const defaultProps$1e = {
10770
10757
  ...ComponentDefaults,
@@ -10991,12 +10978,13 @@ const SideNavBar = (props) => {
10991
10978
  children,
10992
10979
  className,
10993
10980
  onClose,
10981
+ indent,
10994
10982
  ...rest
10995
10983
  } = {
10996
10984
  ...defaultProps$1d,
10997
10985
  ...props
10998
10986
  };
10999
- const indent = props.indent ? Number(props.indent) : 20;
10987
+ const innerIndent = indent ? Number(indent) : 20;
11000
10988
  return /* @__PURE__ */ React__default.createElement(
11001
10989
  Popup,
11002
10990
  {
@@ -11015,17 +11003,16 @@ const SideNavBar = (props) => {
11015
11003
  "div",
11016
11004
  {
11017
11005
  className: `${classPrefix2}-title ${classPrefix2}-border-bt`,
11018
- style: { paddingLeft: `${indent}px` }
11006
+ style: { paddingLeft: `${innerIndent}px` }
11019
11007
  },
11020
11008
  title,
11021
11009
  " ",
11022
11010
  /* @__PURE__ */ React__default.createElement("i", { className: "arrow-icon arrow-down" })
11023
11011
  ),
11024
- /* @__PURE__ */ React__default.createElement(OffsetContext.Provider, { value: indent }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, children))
11012
+ /* @__PURE__ */ React__default.createElement(OffsetContext.Provider, { value: innerIndent }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, children))
11025
11013
  )))
11026
11014
  );
11027
11015
  };
11028
- SideNavBar.defaultProps = defaultProps$1d;
11029
11016
  SideNavBar.displayName = "NutSideNavBar";
11030
11017
  const SideNavBarItem = (props) => {
11031
11018
  const classPrefix2 = "nut-subsidenavbar";
@@ -11339,7 +11326,6 @@ const Tabbar = (props) => {
11339
11326
  (fixed || safeArea) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-safe-area` })
11340
11327
  );
11341
11328
  };
11342
- Tabbar.defaultProps = defaultProps$19;
11343
11329
  Tabbar.displayName = "NutTabbar";
11344
11330
  Tabbar.Item = TabbarItem;
11345
11331
  const defaultProps$18 = {
@@ -11388,18 +11374,19 @@ const Tabs = (props) => {
11388
11374
  onChange,
11389
11375
  className,
11390
11376
  autoHeight,
11377
+ value: outerValue,
11378
+ defaultValue: outerDefaultValue,
11391
11379
  ...rest
11392
11380
  } = {
11393
11381
  ...defaultProps$17,
11394
11382
  ...props
11395
11383
  };
11396
11384
  const [value, setValue] = usePropsValue({
11397
- value: props.value,
11398
- defaultValue: props.defaultValue,
11385
+ value: outerValue,
11386
+ defaultValue: outerDefaultValue,
11399
11387
  finalValue: 0,
11400
11388
  onChange
11401
11389
  });
11402
- const [contentStyle, setContentStyle] = useState({});
11403
11390
  const titleItemsRef = useRef([]);
11404
11391
  const navRef = useRef(null);
11405
11392
  const scrollDirection = (nav, to2, duration2, direction2) => {
@@ -11426,13 +11413,13 @@ const Tabs = (props) => {
11426
11413
  }
11427
11414
  const title2 = titleItem[index];
11428
11415
  let to2 = 0;
11429
- if (props.direction === "vertical") {
11416
+ if (direction === "vertical") {
11430
11417
  const runTop = title2.offsetTop - nav.offsetTop + 10;
11431
11418
  to2 = runTop - (nav.offsetHeight - title2.offsetHeight) / 2;
11432
11419
  } else {
11433
11420
  to2 = title2.offsetLeft - (nav.offsetWidth - title2.offsetWidth) / 2;
11434
11421
  }
11435
- scrollDirection(nav, to2, immediate ? 0 : 0.3, props.direction);
11422
+ scrollDirection(nav, to2, immediate ? 0 : 0.3, direction);
11436
11423
  };
11437
11424
  const getTitles = () => {
11438
11425
  const titles2 = [];
@@ -11480,13 +11467,17 @@ const Tabs = (props) => {
11480
11467
  color: activeType === "smile" ? activeColor : "",
11481
11468
  background: activeType === "line" ? activeColor : ""
11482
11469
  };
11483
- useEffect(() => {
11470
+ const getContentStyle = () => {
11484
11471
  let index = titles.current.findIndex((t2) => t2.value == value);
11485
11472
  index = index < 0 ? 0 : index;
11486
- setContentStyle({
11473
+ return {
11487
11474
  transform: direction === "horizontal" ? `translate3d(${rtl ? "" : "-"}${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
11488
11475
  transitionDuration: `${duration}ms`
11489
- });
11476
+ };
11477
+ };
11478
+ useEffect(() => {
11479
+ let index = titles.current.findIndex((t2) => t2.value == value);
11480
+ index = index < 0 ? 0 : index;
11490
11481
  setTimeout(() => {
11491
11482
  scrollIntoView(index);
11492
11483
  });
@@ -11541,7 +11532,7 @@ const Tabs = (props) => {
11541
11532
  item.title
11542
11533
  )
11543
11534
  );
11544
- })), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}-content-wrap` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}-content`, style: contentStyle }, React__default.Children.map(children, (child, idx) => {
11535
+ })), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}-content-wrap` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}-content`, style: getContentStyle() }, React__default.Children.map(children, (child, idx) => {
11545
11536
  if (!React__default.isValidElement(child)) {
11546
11537
  return null;
11547
11538
  }
@@ -11558,7 +11549,6 @@ const Tabs = (props) => {
11558
11549
  return React__default.cloneElement(child, childProps);
11559
11550
  }))));
11560
11551
  };
11561
- Tabs.defaultProps = defaultProps$17;
11562
11552
  Tabs.displayName = "NutTabs";
11563
11553
  Tabs.TabPane = TabPane;
11564
11554
  const formatTree = (tree, parent, config2) => tree.map((node) => {
@@ -23406,7 +23396,8 @@ const ImagePreview = (props) => {
23406
23396
  setActive(page + 1);
23407
23397
  (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23408
23398
  };
23409
- const onCloseInner = () => {
23399
+ const onCloseInner = (e2) => {
23400
+ e2.stopPropagation();
23410
23401
  setShowPop(false);
23411
23402
  setActive(innerNo);
23412
23403
  scaleNow();
@@ -23416,9 +23407,9 @@ const ImagePreview = (props) => {
23416
23407
  scale: 1
23417
23408
  });
23418
23409
  };
23419
- const closeOnImg = () => {
23410
+ const closeOnImg = (e2) => {
23420
23411
  if (closeOnContentClick) {
23421
- onCloseInner();
23412
+ onCloseInner(e2);
23422
23413
  }
23423
23414
  };
23424
23415
  const duration = typeof autoPlay === "string" ? parseInt(autoPlay) : autoPlay;
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.ReactDOM));
3
3
  })(this, function(exports2, React, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react v2.6.2 Fri Apr 26 2024 15:03:22 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react v2.6.4 Fri May 10 2024 14:45:06 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -1260,7 +1260,6 @@ Check the top-level render call using <` + t2 + ">.");
1260
1260
  /* @__PURE__ */ React.createElement(CellGroupContext.Provider, { value: { divider } }, children)
1261
1261
  ));
1262
1262
  };
1263
- CellGroup.defaultProps = defaultProps$1t;
1264
1263
  CellGroup.displayName = "NutCellGroup";
1265
1264
  const defaultProps$1s = {
1266
1265
  ...ComponentDefaults,
@@ -1320,7 +1319,6 @@ Check the top-level render call using <` + t2 + ">.");
1320
1319
  (ctx2 == null ? void 0 : ctx2.divider) ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$q}-divider` }) : null
1321
1320
  );
1322
1321
  };
1323
- Cell.defaultProps = defaultProps$1s;
1324
1322
  Cell.displayName = "NutCell";
1325
1323
  Cell.Group = CellGroup;
1326
1324
  var INFINITY = 1 / 0;
@@ -2508,6 +2506,7 @@ Check the top-level render call using <` + t2 + ">.");
2508
2506
  error,
2509
2507
  loading,
2510
2508
  lazy,
2509
+ draggable,
2511
2510
  onClick,
2512
2511
  onLoad,
2513
2512
  onError
@@ -2636,7 +2635,7 @@ Check the top-level render call using <` + t2 + ">.");
2636
2635
  loading: "lazy",
2637
2636
  onLoad: handleLoad,
2638
2637
  onError: handleError,
2639
- draggable: props.draggable
2638
+ draggable
2640
2639
  }
2641
2640
  ) : /* @__PURE__ */ React.createElement(
2642
2641
  "img",
@@ -2648,14 +2647,13 @@ Check the top-level render call using <` + t2 + ">.");
2648
2647
  alt,
2649
2648
  onLoad: handleLoad,
2650
2649
  onError: handleError,
2651
- draggable: props.draggable
2650
+ draggable
2652
2651
  }
2653
2652
  ),
2654
2653
  renderLoading(),
2655
2654
  renderErrorImg()
2656
2655
  );
2657
2656
  };
2658
- Image$1.defaultProps = defaultProps$1r;
2659
2657
  Image$1.displayName = "NutImage";
2660
2658
  function _extends$4() {
2661
2659
  _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
@@ -4616,7 +4614,7 @@ Check the top-level render call using <` + t2 + ">.");
4616
4614
  setInnerVisible(false);
4617
4615
  }
4618
4616
  }, [visible]);
4619
- useLockScroll(nodeRef, !!props.lockScroll && innerVisible);
4617
+ useLockScroll(nodeRef, !!lockScroll && innerVisible);
4620
4618
  const classes = classNames(classPrefix2, className);
4621
4619
  const styles = {
4622
4620
  ...style
@@ -4656,7 +4654,6 @@ Check the top-level render call using <` + t2 + ">.");
4656
4654
  )
4657
4655
  ));
4658
4656
  };
4659
- Overlay.defaultProps = defaultOverlayProps;
4660
4657
  Overlay.displayName = "NutOverlay";
4661
4658
  const DataContext$1 = React.createContext({});
4662
4659
  const defaultProps$1q = {
@@ -4699,7 +4696,6 @@ Check the top-level render call using <` + t2 + ">.");
4699
4696
  children
4700
4697
  );
4701
4698
  };
4702
- Col.defaultProps = defaultProps$1q;
4703
4699
  Col.displayName = "NutCol";
4704
4700
  const defaultProps$1p = {
4705
4701
  ...ComponentDefaults,
@@ -4724,7 +4720,6 @@ Check the top-level render call using <` + t2 + ">.");
4724
4720
  });
4725
4721
  return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
4726
4722
  };
4727
- Divider.defaultProps = defaultProps$1p;
4728
4723
  Divider.displayName = "NutDivider";
4729
4724
  const gridContext = {
4730
4725
  onClick: (item, index) => {
@@ -4815,7 +4810,6 @@ Check the top-level render call using <` + t2 + ">.");
4815
4810
  /* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-text` }, text))
4816
4811
  );
4817
4812
  };
4818
- GridItem.defaultProps = defaultProps$1o;
4819
4813
  GridItem.displayName = "NutGridItem";
4820
4814
  const defaultProps$1n = {
4821
4815
  columns: 4,
@@ -4872,7 +4866,6 @@ Check the top-level render call using <` + t2 + ">.");
4872
4866
  });
4873
4867
  })));
4874
4868
  };
4875
- Grid.defaultProps = defaultProps$1n;
4876
4869
  Grid.displayName = "NutGrid";
4877
4870
  Grid.Item = GridItem;
4878
4871
  const defaultProps$1m = {};
@@ -4935,7 +4928,6 @@ Check the top-level render call using <` + t2 + ">.");
4935
4928
  children
4936
4929
  ));
4937
4930
  };
4938
- Row.defaultProps = defaultProps$1l;
4939
4931
  Row.displayName = "NutRow";
4940
4932
  const prefixCls$1 = "nut-space";
4941
4933
  const defaultProps$1k = {
@@ -4958,7 +4950,6 @@ Check the top-level render call using <` + t2 + ">.");
4958
4950
  return child !== null && child !== void 0 && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls$1}-item` }, child);
4959
4951
  }));
4960
4952
  };
4961
- Space.defaultProps = defaultProps$1k;
4962
4953
  Space.displayName = "NutSpace";
4963
4954
  function isWindow(val) {
4964
4955
  return val === window;
@@ -5146,7 +5137,6 @@ Check the top-level render call using <` + t2 + ">.");
5146
5137
  /* @__PURE__ */ React.createElement("div", { className: "nut-sticky-box", ref: stickyRef, style: stickyStyle }, children)
5147
5138
  );
5148
5139
  };
5149
- Sticky.defaultProps = defaultProps$1j;
5150
5140
  Sticky.displayName = "NutSticky";
5151
5141
  const classPrefix$k = "nut-safe-area";
5152
5142
  const SafeArea = (props) => {
@@ -5160,6 +5150,7 @@ Check the top-level render call using <` + t2 + ">.");
5160
5150
  }
5161
5151
  );
5162
5152
  };
5153
+ SafeArea.displayName = "NutSafeArea";
5163
5154
  const defaultProps$1i = {
5164
5155
  ...ComponentDefaults,
5165
5156
  target: "",
@@ -5276,7 +5267,6 @@ Check the top-level render call using <` + t2 + ">.");
5276
5267
  children || /* @__PURE__ */ React.createElement(e$1, { width: 19, height: 19, className: "nut-backtop-main" })
5277
5268
  );
5278
5269
  };
5279
- BackTop.defaultProps = defaultProps$1i;
5280
5270
  BackTop.displayName = "NutBackTop";
5281
5271
  function clamp$2(v, min, max) {
5282
5272
  return Math.max(min, Math.min(v, max));
@@ -10596,7 +10586,6 @@ Please add \`${key}Action\` when creating your handler.`);
10596
10586
  })
10597
10587
  ))) : null);
10598
10588
  };
10599
- Elevator.defaultProps = defaultProps$1h;
10600
10589
  Elevator.displayName = "NutElevator";
10601
10590
  Elevator.Context = elevatorContext;
10602
10591
  const defaultProps$1g = {
@@ -10679,7 +10668,6 @@ Please add \`${key}Action\` when creating your handler.`);
10679
10668
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(e$d, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
10680
10669
  );
10681
10670
  };
10682
- FixedNav.defaultProps = defaultProps$1g;
10683
10671
  FixedNav.displayName = "NutFixedNav";
10684
10672
  const defaultProps$1f = {
10685
10673
  ...ComponentDefaults,
@@ -10782,7 +10770,6 @@ Please add \`${key}Action\` when creating your handler.`);
10782
10770
  const cls = classNames(classPrefix2, classes, className);
10783
10771
  return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
10784
10772
  };
10785
- NavBar.defaultProps = defaultProps$1f;
10786
10773
  NavBar.displayName = "NutNavBar";
10787
10774
  const defaultProps$1e = {
10788
10775
  ...ComponentDefaults,
@@ -11009,12 +10996,13 @@ Please add \`${key}Action\` when creating your handler.`);
11009
10996
  children,
11010
10997
  className,
11011
10998
  onClose,
10999
+ indent,
11012
11000
  ...rest
11013
11001
  } = {
11014
11002
  ...defaultProps$1d,
11015
11003
  ...props
11016
11004
  };
11017
- const indent = props.indent ? Number(props.indent) : 20;
11005
+ const innerIndent = indent ? Number(indent) : 20;
11018
11006
  return /* @__PURE__ */ React.createElement(
11019
11007
  Popup,
11020
11008
  {
@@ -11033,17 +11021,16 @@ Please add \`${key}Action\` when creating your handler.`);
11033
11021
  "div",
11034
11022
  {
11035
11023
  className: `${classPrefix2}-title ${classPrefix2}-border-bt`,
11036
- style: { paddingLeft: `${indent}px` }
11024
+ style: { paddingLeft: `${innerIndent}px` }
11037
11025
  },
11038
11026
  title,
11039
11027
  " ",
11040
11028
  /* @__PURE__ */ React.createElement("i", { className: "arrow-icon arrow-down" })
11041
11029
  ),
11042
- /* @__PURE__ */ React.createElement(OffsetContext.Provider, { value: indent }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, children))
11030
+ /* @__PURE__ */ React.createElement(OffsetContext.Provider, { value: innerIndent }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, children))
11043
11031
  )))
11044
11032
  );
11045
11033
  };
11046
- SideNavBar.defaultProps = defaultProps$1d;
11047
11034
  SideNavBar.displayName = "NutSideNavBar";
11048
11035
  const SideNavBarItem = (props) => {
11049
11036
  const classPrefix2 = "nut-subsidenavbar";
@@ -11357,7 +11344,6 @@ Please add \`${key}Action\` when creating your handler.`);
11357
11344
  (fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-safe-area` })
11358
11345
  );
11359
11346
  };
11360
- Tabbar.defaultProps = defaultProps$19;
11361
11347
  Tabbar.displayName = "NutTabbar";
11362
11348
  Tabbar.Item = TabbarItem;
11363
11349
  const defaultProps$18 = {
@@ -11406,18 +11392,19 @@ Please add \`${key}Action\` when creating your handler.`);
11406
11392
  onChange,
11407
11393
  className,
11408
11394
  autoHeight,
11395
+ value: outerValue,
11396
+ defaultValue: outerDefaultValue,
11409
11397
  ...rest
11410
11398
  } = {
11411
11399
  ...defaultProps$17,
11412
11400
  ...props
11413
11401
  };
11414
11402
  const [value, setValue] = usePropsValue({
11415
- value: props.value,
11416
- defaultValue: props.defaultValue,
11403
+ value: outerValue,
11404
+ defaultValue: outerDefaultValue,
11417
11405
  finalValue: 0,
11418
11406
  onChange
11419
11407
  });
11420
- const [contentStyle, setContentStyle] = React.useState({});
11421
11408
  const titleItemsRef = React.useRef([]);
11422
11409
  const navRef = React.useRef(null);
11423
11410
  const scrollDirection = (nav, to2, duration2, direction2) => {
@@ -11444,13 +11431,13 @@ Please add \`${key}Action\` when creating your handler.`);
11444
11431
  }
11445
11432
  const title2 = titleItem[index];
11446
11433
  let to2 = 0;
11447
- if (props.direction === "vertical") {
11434
+ if (direction === "vertical") {
11448
11435
  const runTop = title2.offsetTop - nav.offsetTop + 10;
11449
11436
  to2 = runTop - (nav.offsetHeight - title2.offsetHeight) / 2;
11450
11437
  } else {
11451
11438
  to2 = title2.offsetLeft - (nav.offsetWidth - title2.offsetWidth) / 2;
11452
11439
  }
11453
- scrollDirection(nav, to2, immediate ? 0 : 0.3, props.direction);
11440
+ scrollDirection(nav, to2, immediate ? 0 : 0.3, direction);
11454
11441
  };
11455
11442
  const getTitles = () => {
11456
11443
  const titles2 = [];
@@ -11498,13 +11485,17 @@ Please add \`${key}Action\` when creating your handler.`);
11498
11485
  color: activeType === "smile" ? activeColor : "",
11499
11486
  background: activeType === "line" ? activeColor : ""
11500
11487
  };
11501
- React.useEffect(() => {
11488
+ const getContentStyle = () => {
11502
11489
  let index = titles.current.findIndex((t2) => t2.value == value);
11503
11490
  index = index < 0 ? 0 : index;
11504
- setContentStyle({
11491
+ return {
11505
11492
  transform: direction === "horizontal" ? `translate3d(${rtl ? "" : "-"}${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
11506
11493
  transitionDuration: `${duration}ms`
11507
- });
11494
+ };
11495
+ };
11496
+ React.useEffect(() => {
11497
+ let index = titles.current.findIndex((t2) => t2.value == value);
11498
+ index = index < 0 ? 0 : index;
11508
11499
  setTimeout(() => {
11509
11500
  scrollIntoView(index);
11510
11501
  });
@@ -11559,7 +11550,7 @@ Please add \`${key}Action\` when creating your handler.`);
11559
11550
  item.title
11560
11551
  )
11561
11552
  );
11562
- })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}-content-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}-content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
11553
+ })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}-content-wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}-content`, style: getContentStyle() }, React.Children.map(children, (child, idx) => {
11563
11554
  if (!React.isValidElement(child)) {
11564
11555
  return null;
11565
11556
  }
@@ -11576,7 +11567,6 @@ Please add \`${key}Action\` when creating your handler.`);
11576
11567
  return React.cloneElement(child, childProps);
11577
11568
  }))));
11578
11569
  };
11579
- Tabs.defaultProps = defaultProps$17;
11580
11570
  Tabs.displayName = "NutTabs";
11581
11571
  Tabs.TabPane = TabPane;
11582
11572
  const formatTree = (tree, parent, config2) => tree.map((node) => {
@@ -23424,7 +23414,8 @@ Please add \`${key}Action\` when creating your handler.`);
23424
23414
  setActive(page + 1);
23425
23415
  (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23426
23416
  };
23427
- const onCloseInner = () => {
23417
+ const onCloseInner = (e2) => {
23418
+ e2.stopPropagation();
23428
23419
  setShowPop(false);
23429
23420
  setActive(innerNo);
23430
23421
  scaleNow();
@@ -23434,9 +23425,9 @@ Please add \`${key}Action\` when creating your handler.`);
23434
23425
  scale: 1
23435
23426
  });
23436
23427
  };
23437
- const closeOnImg = () => {
23428
+ const closeOnImg = (e2) => {
23438
23429
  if (closeOnContentClick) {
23439
- onCloseInner();
23430
+ onCloseInner(e2);
23440
23431
  }
23441
23432
  };
23442
23433
  const duration = typeof autoPlay === "string" ? parseInt(autoPlay) : autoPlay;
@@ -4,7 +4,7 @@
4
4
  display: block;
5
5
  background-color: $color-background-overlay;
6
6
  color: $color-title;
7
- padding: 24px 20px;
7
+ padding: $tabs-tabpane-padding;
8
8
  box-sizing: border-box;
9
9
  overflow: auto;
10
10