@nutui/nutui-react 1.3.12 → 1.3.13-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.
Files changed (110) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/esm/Cascader.js +13 -2
  3. package/dist/esm/Cell.js +108 -7
  4. package/dist/esm/ConfigProvider.js +3 -0
  5. package/dist/esm/Form.js +2 -4
  6. package/dist/esm/FormItem.js +3 -7
  7. package/dist/esm/Image/style/index.js +2 -0
  8. package/dist/esm/Image.js +105 -0
  9. package/dist/esm/TrendArrow/style/index.js +2 -0
  10. package/dist/esm/TrendArrow.js +101 -0
  11. package/dist/esm/WaterMark/style/index.js +2 -0
  12. package/dist/esm/WaterMark.js +113 -0
  13. package/dist/esm/{formitem-46d4aca3.js → formitem-5a7034ff.js} +1 -1
  14. package/dist/esm/nutui-react.es.js +3 -0
  15. package/dist/esm/types/src/locales/base.d.ts +3 -0
  16. package/dist/esm/types/src/packages/address/address.d.ts +2 -2
  17. package/dist/esm/types/src/packages/audio/audio.d.ts +2 -2
  18. package/dist/esm/types/src/packages/avatar/avatar.d.ts +2 -2
  19. package/dist/esm/types/src/packages/backtop/backtop.d.ts +2 -2
  20. package/dist/esm/types/src/packages/badge/badge.d.ts +2 -2
  21. package/dist/esm/types/src/packages/button/button.d.ts +2 -2
  22. package/dist/esm/types/src/packages/cascader/cascader.d.ts +2 -0
  23. package/dist/esm/types/src/packages/cascader/cascaderItem.d.ts +1 -0
  24. package/dist/esm/types/src/packages/cell/cell.d.ts +2 -2
  25. package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +2 -2
  26. package/dist/esm/types/src/packages/circleprogress/circleprogress.d.ts +1 -1
  27. package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +2 -2
  28. package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
  29. package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
  30. package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -2
  31. package/dist/esm/types/src/packages/form/form.d.ts +2 -2
  32. package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -2
  33. package/dist/esm/types/src/packages/formitem/index.taro.d.ts +2 -0
  34. package/dist/esm/types/src/packages/griditem/griditem.d.ts +2 -2
  35. package/dist/esm/types/src/packages/image/__test__/image.spec.d.ts +1 -0
  36. package/dist/esm/types/src/packages/image/demo.d.ts +3 -0
  37. package/dist/esm/types/src/packages/image/image.d.ts +23 -0
  38. package/dist/esm/types/src/packages/image/index.d.ts +2 -0
  39. package/dist/esm/types/src/packages/image/index.taro.d.ts +2 -0
  40. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +2 -2
  41. package/dist/esm/types/src/packages/input/input.d.ts +2 -2
  42. package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +2 -2
  43. package/dist/esm/types/src/packages/menu/menu.d.ts +2 -2
  44. package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +2 -2
  45. package/dist/esm/types/src/packages/navbar/navbar.d.ts +2 -2
  46. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -2
  47. package/dist/esm/types/src/packages/nutui.react.build.d.ts +4 -1
  48. package/dist/esm/types/src/packages/nutui.react.d.ts +7 -1
  49. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +3 -0
  50. package/dist/esm/types/src/packages/nutui.react.taro.d.ts +11 -1
  51. package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +5 -0
  52. package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +6 -1
  53. package/dist/esm/types/src/packages/picker/pickerSlot.d.ts +2 -2
  54. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
  55. package/dist/esm/types/src/packages/popup/popup.d.ts +2 -2
  56. package/dist/esm/types/src/packages/progress/progress.d.ts +2 -2
  57. package/dist/esm/types/src/packages/radio/radio.d.ts +2 -2
  58. package/dist/esm/types/src/packages/rate/rate.d.ts +2 -2
  59. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +2 -2
  60. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +2 -2
  61. package/dist/esm/types/src/packages/step/step.d.ts +2 -2
  62. package/dist/esm/types/src/packages/sticky/sticky.d.ts +2 -2
  63. package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +2 -2
  64. package/dist/esm/types/src/packages/table/table.d.ts +2 -2
  65. package/dist/esm/types/src/packages/table/types.d.ts +2 -2
  66. package/dist/esm/types/src/packages/tabs/tabs.d.ts +2 -2
  67. package/dist/esm/types/src/packages/tag/tag.d.ts +2 -2
  68. package/dist/esm/types/src/packages/trendarrow/__test__/trendarrow.spec.d.ts +1 -0
  69. package/dist/esm/types/src/packages/trendarrow/demo.d.ts +4 -0
  70. package/dist/esm/types/src/packages/trendarrow/index.d.ts +2 -0
  71. package/dist/esm/types/src/packages/trendarrow/index.taro.d.ts +2 -0
  72. package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +18 -0
  73. package/dist/esm/types/src/packages/uploader/uploader.d.ts +2 -2
  74. package/dist/esm/types/src/packages/virtuallist/type.d.ts +1 -1
  75. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +1 -1
  76. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
  77. package/dist/esm/types/src/packages/watermark/__tests__/watermark.spec.d.ts +2 -0
  78. package/dist/esm/types/src/packages/watermark/demo.d.ts +4 -0
  79. package/dist/esm/types/src/packages/watermark/index.d.ts +2 -0
  80. package/dist/esm/types/src/packages/watermark/index.taro.d.ts +2 -0
  81. package/dist/esm/types/src/packages/watermark/watermark.d.ts +22 -0
  82. package/dist/esm/types/src/utils/typings.d.ts +1 -1
  83. package/dist/locales/base.d.ts +3 -0
  84. package/dist/locales/base.js +1 -1
  85. package/dist/locales/en-US.js +4 -1
  86. package/dist/locales/id-ID.js +4 -1
  87. package/dist/locales/zh-CN.js +4 -1
  88. package/dist/locales/zh-TW.js +4 -1
  89. package/dist/nutui.react.es.js +535 -235
  90. package/dist/nutui.react.umd.js +537 -234
  91. package/dist/packages/cascader/cascader.scss +1 -1
  92. package/dist/packages/image/image.scss +51 -0
  93. package/dist/packages/trendarrow/trendarrow.scss +17 -0
  94. package/dist/packages/watermark/watermark.scss +13 -0
  95. package/dist/style.css +1 -1
  96. package/dist/style.es.js +1 -1
  97. package/dist/styles/font/config.json +4 -2
  98. package/dist/styles/font/demo_index.html +51 -5
  99. package/dist/styles/font/iconfont.css +11 -3
  100. package/dist/styles/font/iconfont.js +65 -62
  101. package/dist/styles/font/iconfont.json +14 -0
  102. package/dist/styles/font/iconfont.ttf +0 -0
  103. package/dist/styles/font/iconfont.woff +0 -0
  104. package/dist/styles/font/iconfont.woff2 +0 -0
  105. package/dist/styles/themes/default.scss +3 -0
  106. package/dist/styles/variables.scss +4 -0
  107. package/dist/types/index.d.ts +111 -43
  108. package/dist/types/nutui.react.build.ts +7 -1
  109. package/package.json +2 -2
  110. package/dist/esm/cell-c8781626.js +0 -108
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.3.12-beta.0 Wed Nov 23 2022 14:51:03 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.3.13-beta.0 Wed Nov 30 2022 17:47:10 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -72,7 +72,7 @@
72
72
  classname.exports = classname_production_min;
73
73
  }
74
74
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
75
- const defaultProps$1n = {
75
+ const defaultProps$1q = {
76
76
  name: "",
77
77
  size: "",
78
78
  classPrefix: "nut-icon",
@@ -100,7 +100,7 @@
100
100
  onClick,
101
101
  ...rest
102
102
  } = {
103
- ...defaultProps$1n,
103
+ ...defaultProps$1q,
104
104
  ...props
105
105
  };
106
106
  const isImage = name ? name.indexOf("/") !== -1 : false;
@@ -134,13 +134,13 @@
134
134
  children
135
135
  );
136
136
  }
137
- Icon$1.defaultProps = defaultProps$1n;
137
+ Icon$1.defaultProps = defaultProps$1q;
138
138
  Icon$1.displayName = "NutIcon";
139
139
  const ComponentDefaults = {
140
140
  iconClassPrefix: "nut-icon",
141
141
  iconFontClassName: "nutui-iconfont"
142
142
  };
143
- const defaultProps$1m = {
143
+ const defaultProps$1p = {
144
144
  ...ComponentDefaults,
145
145
  className: "",
146
146
  color: "",
@@ -176,7 +176,7 @@
176
176
  iconFontClassName,
177
177
  ...rest
178
178
  } = {
179
- ...defaultProps$1m,
179
+ ...defaultProps$1p,
180
180
  ...props
181
181
  };
182
182
  const getStyle = React.useCallback(() => {
@@ -254,7 +254,7 @@
254
254
  className: icon || loading ? "text" : ""
255
255
  }, children)));
256
256
  };
257
- Button.defaultProps = defaultProps$1m;
257
+ Button.defaultProps = defaultProps$1p;
258
258
  Button.displayName = "NutButton";
259
259
  function _setPrototypeOf$1(o, p2) {
260
260
  _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
@@ -1479,7 +1479,7 @@
1479
1479
  function useHistory() {
1480
1480
  return useContext(historyContext);
1481
1481
  }
1482
- const defaultProps$1l = {
1482
+ const defaultProps$1o = {
1483
1483
  ...ComponentDefaults,
1484
1484
  title: null,
1485
1485
  subTitle: null,
@@ -1525,7 +1525,7 @@
1525
1525
  iconFontClassName,
1526
1526
  ...rest
1527
1527
  } = {
1528
- ...defaultProps$1l,
1528
+ ...defaultProps$1o,
1529
1529
  ...props
1530
1530
  };
1531
1531
  const b2 = cn("cell");
@@ -1579,9 +1579,9 @@
1579
1579
  className: b2("link")
1580
1580
  }) : linkSlot));
1581
1581
  };
1582
- Cell.defaultProps = defaultProps$1l;
1582
+ Cell.defaultProps = defaultProps$1o;
1583
1583
  Cell.displayName = "NutCell";
1584
- const defaultProps$1k = {
1584
+ const defaultProps$1n = {
1585
1585
  title: "",
1586
1586
  desc: "",
1587
1587
  className: "",
@@ -1590,7 +1590,7 @@
1590
1590
  };
1591
1591
  const CellGroup = (props) => {
1592
1592
  const { children, className, title, desc, titleSlot, descSlot } = {
1593
- ...defaultProps$1k,
1593
+ ...defaultProps$1n,
1594
1594
  ...props
1595
1595
  };
1596
1596
  const b2 = cn("cell-group");
@@ -1604,7 +1604,7 @@
1604
1604
  className: b2("wrap")
1605
1605
  }, children));
1606
1606
  };
1607
- CellGroup.defaultProps = defaultProps$1k;
1607
+ CellGroup.defaultProps = defaultProps$1n;
1608
1608
  CellGroup.displayName = "NutCellGroup";
1609
1609
  var classnames = { exports: {} };
1610
1610
  /*!
@@ -2157,7 +2157,7 @@
2157
2157
  };
2158
2158
  CSSTransition.propTypes = {};
2159
2159
  var CSSTransition$1 = CSSTransition;
2160
- const defaultProps$1j = {
2160
+ const defaultProps$1m = {
2161
2161
  ...ComponentDefaults,
2162
2162
  position: "center",
2163
2163
  transition: "",
@@ -2343,7 +2343,7 @@
2343
2343
  }, [position]);
2344
2344
  return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
2345
2345
  };
2346
- Popup.defaultProps = defaultProps$1j;
2346
+ Popup.defaultProps = defaultProps$1m;
2347
2347
  Popup.displayName = "NutPopup";
2348
2348
  const zhCN = {
2349
2349
  save: "\u4FDD\u5B58",
@@ -2468,9 +2468,12 @@
2468
2468
  canReleaseText: "\u677E\u5F00\u5237\u65B0",
2469
2469
  refreshingText: "\u52A0\u8F7D\u4E2D...",
2470
2470
  completeText: "\u5237\u65B0\u6210\u529F"
2471
+ },
2472
+ watermark: {
2473
+ errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
2471
2474
  }
2472
2475
  };
2473
- const defaultProps$1i = {
2476
+ const defaultProps$1l = {
2474
2477
  locale: zhCN
2475
2478
  };
2476
2479
  const defaultConfigRef = {
@@ -2487,7 +2490,7 @@
2487
2490
  };
2488
2491
  const ConfigContext = React.createContext(null);
2489
2492
  const ConfigProvider = (props) => {
2490
- const { children, ...config2 } = { ...defaultProps$1i, ...props };
2493
+ const { children, ...config2 } = { ...defaultProps$1l, ...props };
2491
2494
  const parentConfig = useConfig();
2492
2495
  return /* @__PURE__ */ React__default["default"].createElement(ConfigContext.Provider, {
2493
2496
  value: {
@@ -2496,19 +2499,110 @@
2496
2499
  }
2497
2500
  }, children);
2498
2501
  };
2499
- ConfigProvider.defaultProps = defaultProps$1i;
2502
+ ConfigProvider.defaultProps = defaultProps$1l;
2500
2503
  ConfigProvider.displayName = "NutConfigProvider";
2501
- const defaultProps$1h = {};
2504
+ const defaultProps$1k = {
2505
+ fit: "fill",
2506
+ position: "center",
2507
+ alt: "",
2508
+ width: "center",
2509
+ height: "",
2510
+ round: false,
2511
+ showError: true,
2512
+ showLoading: true
2513
+ };
2514
+ const Image$1 = (props) => {
2515
+ useConfig();
2516
+ const {
2517
+ children,
2518
+ className,
2519
+ style,
2520
+ src,
2521
+ fit,
2522
+ position,
2523
+ alt,
2524
+ width,
2525
+ height,
2526
+ round,
2527
+ radius,
2528
+ showError,
2529
+ showLoading,
2530
+ slotError,
2531
+ slotLoding,
2532
+ onClick,
2533
+ onLoad,
2534
+ onError
2535
+ } = { ...defaultProps$1k, ...props };
2536
+ const [loading, setLoading] = React.useState(true);
2537
+ const [isError, setIsError] = React.useState(false);
2538
+ React.useEffect(() => {
2539
+ if (src) {
2540
+ setIsError(false);
2541
+ setLoading(true);
2542
+ }
2543
+ }, [src]);
2544
+ const load = () => {
2545
+ setLoading(false);
2546
+ onLoad && onLoad();
2547
+ };
2548
+ const error = () => {
2549
+ setIsError(true);
2550
+ setLoading(false);
2551
+ onError && onError();
2552
+ };
2553
+ const pxCheck2 = (value) => {
2554
+ return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
2555
+ };
2556
+ const stylebox = {
2557
+ height: height ? pxCheck2(height) : "",
2558
+ width: width ? pxCheck2(width) : "",
2559
+ overflow: radius !== void 0 && radius !== null ? "hidden" : "",
2560
+ borderRadius: radius !== void 0 && radius !== null ? pxCheck2(radius) : ""
2561
+ };
2562
+ const styles = {
2563
+ objectFit: fit,
2564
+ objectPosition: position,
2565
+ ...style
2566
+ };
2567
+ const imageClick = (event) => {
2568
+ onClick && onClick(event);
2569
+ };
2570
+ return /* @__PURE__ */ React__default["default"].createElement("div", {
2571
+ className: `nut-image ${round ? "nut-image-round" : ""} ${className || ""}`,
2572
+ style: stylebox,
2573
+ onClick: (e2) => {
2574
+ imageClick(e2);
2575
+ }
2576
+ }, /* @__PURE__ */ React__default["default"].createElement("img", {
2577
+ className: "nut-img",
2578
+ style: styles,
2579
+ src,
2580
+ alt,
2581
+ onLoad: load,
2582
+ onError: error
2583
+ }), showLoading && loading ? /* @__PURE__ */ React__default["default"].createElement("div", {
2584
+ className: "nut-img-loading"
2585
+ }, slotLoding || children || /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
2586
+ name: "image"
2587
+ })) : null, showError && isError && !loading ? /* @__PURE__ */ React__default["default"].createElement("div", {
2588
+ className: "nut-img-error"
2589
+ }, slotError || children || /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
2590
+ name: "image-error"
2591
+ })) : null);
2592
+ };
2593
+ Image$1.defaultProps = defaultProps$1k;
2594
+ Image$1.displayName = "NutImage";
2595
+ const defaultProps$1j = {};
2502
2596
  const Layout = (props) => {
2503
- ({ ...defaultProps$1h, ...props });
2597
+ ({ ...defaultProps$1j, ...props });
2504
2598
  return /* @__PURE__ */ React__default["default"].createElement("div", {
2505
2599
  className: "nut-layout"
2506
2600
  }, "Layout");
2507
2601
  };
2508
- Layout.defaultProps = defaultProps$1h;
2602
+ Layout.defaultProps = defaultProps$1j;
2509
2603
  Layout.displayName = "NutLayout";
2510
2604
  const DataContext$2 = React.createContext({});
2511
- const defaultProps$1g = {
2605
+ const defaultProps$1i = {
2512
2606
  span: "24",
2513
2607
  offset: "0",
2514
2608
  gutter: "0"
@@ -2521,7 +2615,7 @@
2521
2615
  offset,
2522
2616
  children,
2523
2617
  onClick
2524
- } = { ...defaultProps$1g, ...props };
2618
+ } = { ...defaultProps$1i, ...props };
2525
2619
  const [colName, setColName] = React.useState("");
2526
2620
  const [colStyle, setColStyle] = React.useState({});
2527
2621
  const { gutter } = React.useContext(DataContext$2);
@@ -2547,9 +2641,9 @@
2547
2641
  }
2548
2642
  }, children);
2549
2643
  };
2550
- Col.defaultProps = defaultProps$1g;
2644
+ Col.defaultProps = defaultProps$1i;
2551
2645
  Col.displayName = "NutCol";
2552
- const defaultProps$1f = {
2646
+ const defaultProps$1h = {
2553
2647
  type: "",
2554
2648
  justify: "start",
2555
2649
  align: "flex-start",
@@ -2568,7 +2662,7 @@
2568
2662
  gutter,
2569
2663
  onClick
2570
2664
  } = {
2571
- ...defaultProps$1f,
2665
+ ...defaultProps$1h,
2572
2666
  ...props
2573
2667
  };
2574
2668
  const prefixCls = "nut-row";
@@ -2603,9 +2697,9 @@
2603
2697
  children
2604
2698
  ));
2605
2699
  };
2606
- Row.defaultProps = defaultProps$1f;
2700
+ Row.defaultProps = defaultProps$1h;
2607
2701
  Row.displayName = "NutRow";
2608
- const defaultProps$1e = {
2702
+ const defaultProps$1g = {
2609
2703
  contentPosition: "center",
2610
2704
  dashed: false,
2611
2705
  hairline: true,
@@ -2622,7 +2716,7 @@
2622
2716
  direction,
2623
2717
  ...rest
2624
2718
  } = {
2625
- ...defaultProps$1e,
2719
+ ...defaultProps$1g,
2626
2720
  ...props
2627
2721
  };
2628
2722
  const dividerBem = cn("divider");
@@ -2643,9 +2737,9 @@
2643
2737
  ...rest
2644
2738
  }, children);
2645
2739
  };
2646
- Divider.defaultProps = defaultProps$1e;
2740
+ Divider.defaultProps = defaultProps$1g;
2647
2741
  Divider.displayName = "NutDivider";
2648
- const defaultProps$1d = {
2742
+ const defaultProps$1f = {
2649
2743
  columnNum: 4,
2650
2744
  border: true,
2651
2745
  gutter: 0,
@@ -2672,7 +2766,7 @@
2672
2766
  iconColor,
2673
2767
  className,
2674
2768
  ...rest
2675
- } = { ...defaultProps$1d, ...props };
2769
+ } = { ...defaultProps$1f, ...props };
2676
2770
  const childrenDom = React__default["default"].Children.toArray(children);
2677
2771
  const pxCheck2 = (value) => {
2678
2772
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -2711,9 +2805,9 @@
2711
2805
  });
2712
2806
  }));
2713
2807
  };
2714
- Grid.defaultProps = defaultProps$1d;
2808
+ Grid.defaultProps = defaultProps$1f;
2715
2809
  Grid.displayName = "NutGrid";
2716
- const defaultProps$1c = {
2810
+ const defaultProps$1e = {
2717
2811
  ...ComponentDefaults,
2718
2812
  text: "",
2719
2813
  icon: "",
@@ -2752,7 +2846,7 @@
2752
2846
  onClick,
2753
2847
  ...rest
2754
2848
  } = {
2755
- ...defaultProps$1c,
2849
+ ...defaultProps$1e,
2756
2850
  ...props
2757
2851
  };
2758
2852
  const b2 = cn("grid-item");
@@ -2800,7 +2894,7 @@
2800
2894
  className: "nut-grid-item__text"
2801
2895
  }, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
2802
2896
  };
2803
- GridItem.defaultProps = defaultProps$1c;
2897
+ GridItem.defaultProps = defaultProps$1e;
2804
2898
  GridItem.displayName = "NutGridItem";
2805
2899
  const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2806
2900
  const defaultRoot = canUseDom ? window : void 0;
@@ -3014,7 +3108,7 @@
3014
3108
  }, children));
3015
3109
  };
3016
3110
  Sticky.displayName = "NutSticky";
3017
- const defaultProps$1b = {
3111
+ const defaultProps$1d = {
3018
3112
  ...ComponentDefaults,
3019
3113
  title: "",
3020
3114
  desc: "",
@@ -3050,7 +3144,7 @@
3050
3144
  iconClassPrefix,
3051
3145
  iconFontClassName
3052
3146
  } = {
3053
- ...defaultProps$1b,
3147
+ ...defaultProps$1d,
3054
3148
  ...props
3055
3149
  };
3056
3150
  const b2 = cn("navbar");
@@ -3119,9 +3213,9 @@
3119
3213
  className: `${b2("")}--placeholder`
3120
3214
  }, renderWrapper()) : renderWrapper());
3121
3215
  };
3122
- NavBar.defaultProps = defaultProps$1b;
3216
+ NavBar.defaultProps = defaultProps$1d;
3123
3217
  NavBar.displayName = "NutNavBar";
3124
- const defaultProps$1a = {
3218
+ const defaultProps$1c = {
3125
3219
  ...ComponentDefaults,
3126
3220
  fixednavClass: "nut-fixednav",
3127
3221
  activeText: "",
@@ -3151,7 +3245,7 @@
3151
3245
  iconFontClassName,
3152
3246
  ...rest
3153
3247
  } = {
3154
- ...defaultProps$1a,
3248
+ ...defaultProps$1c,
3155
3249
  ...props
3156
3250
  };
3157
3251
  const b2 = cn("fixednav");
@@ -3206,9 +3300,9 @@
3206
3300
  className: "text"
3207
3301
  }, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
3208
3302
  };
3209
- FixedNav.defaultProps = defaultProps$1a;
3303
+ FixedNav.defaultProps = defaultProps$1c;
3210
3304
  FixedNav.displayName = "NutFixedNav";
3211
- const defaultProps$19 = {
3305
+ const defaultProps$1b = {
3212
3306
  visible: 0,
3213
3307
  bottom: false,
3214
3308
  size: 20,
@@ -3236,7 +3330,7 @@
3236
3330
  tabSwitch,
3237
3331
  onSwitch
3238
3332
  } = {
3239
- ...defaultProps$19,
3333
+ ...defaultProps$1b,
3240
3334
  ...props
3241
3335
  };
3242
3336
  const b2 = cn("tabbar");
@@ -3272,9 +3366,9 @@
3272
3366
  return React__default["default"].cloneElement(child, childProps);
3273
3367
  }));
3274
3368
  };
3275
- Tabbar.defaultProps = defaultProps$19;
3369
+ Tabbar.defaultProps = defaultProps$1b;
3276
3370
  Tabbar.displayName = "NutTabbar";
3277
- const defaultProps$18 = {
3371
+ const defaultProps$1a = {
3278
3372
  ...ComponentDefaults,
3279
3373
  dot: false,
3280
3374
  size: "",
@@ -3310,7 +3404,7 @@
3310
3404
  iconClassPrefix,
3311
3405
  iconFontClassName
3312
3406
  } = {
3313
- ...defaultProps$18,
3407
+ ...defaultProps$1a,
3314
3408
  ...props
3315
3409
  };
3316
3410
  const b2 = cn("tabbar-item");
@@ -8366,7 +8460,7 @@
8366
8460
  });
8367
8461
  const animated = host.animated;
8368
8462
  const elevatorContext = React.createContext({});
8369
- const defaultProps$17 = {
8463
+ const defaultProps$19 = {
8370
8464
  height: "200px",
8371
8465
  acceptKey: "title",
8372
8466
  indexList: [],
@@ -8389,7 +8483,7 @@
8389
8483
  children,
8390
8484
  ...rest
8391
8485
  } = {
8392
- ...defaultProps$17,
8486
+ ...defaultProps$19,
8393
8487
  ...props
8394
8488
  };
8395
8489
  const b2 = cn("elevator");
@@ -8576,9 +8670,9 @@
8576
8670
  }, item[acceptKey]);
8577
8671
  }))));
8578
8672
  };
8579
- Elevator.defaultProps = defaultProps$17;
8673
+ Elevator.defaultProps = defaultProps$19;
8580
8674
  Elevator.displayName = "NutElevator";
8581
- const defaultProps$16 = {
8675
+ const defaultProps$18 = {
8582
8676
  defaultValue: 1,
8583
8677
  mode: "multi",
8584
8678
  prevText: "",
@@ -8595,7 +8689,7 @@
8595
8689
  };
8596
8690
  const Pagination = (props) => {
8597
8691
  const { locale } = useConfig();
8598
- ({ ...defaultProps$16, ...props });
8692
+ ({ ...defaultProps$18, ...props });
8599
8693
  const {
8600
8694
  modelValue,
8601
8695
  mode,
@@ -8712,7 +8806,7 @@
8712
8806
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
8713
8807
  }, nextText || locale.pagination.next));
8714
8808
  };
8715
- Pagination.defaultProps = defaultProps$16;
8809
+ Pagination.defaultProps = defaultProps$18;
8716
8810
  Pagination.displayName = "NutPagination";
8717
8811
  class Title {
8718
8812
  constructor() {
@@ -8722,7 +8816,7 @@
8722
8816
  this.index = 0;
8723
8817
  }
8724
8818
  }
8725
- const defaultProps$15 = {
8819
+ const defaultProps$17 = {
8726
8820
  ...ComponentDefaults,
8727
8821
  tabStyle: {},
8728
8822
  value: 0,
@@ -8763,7 +8857,7 @@
8763
8857
  iconFontClassName,
8764
8858
  ...rest
8765
8859
  } = {
8766
- ...defaultProps$15,
8860
+ ...defaultProps$17,
8767
8861
  ...props
8768
8862
  };
8769
8863
  const [currentItem, setCurrentItem] = React.useState({ index: 0 });
@@ -8881,9 +8975,9 @@
8881
8975
  return React__default["default"].cloneElement(child, childProps);
8882
8976
  }))));
8883
8977
  };
8884
- Tabs.defaultProps = defaultProps$15;
8978
+ Tabs.defaultProps = defaultProps$17;
8885
8979
  Tabs.displayName = "NutTabs";
8886
- const defaultProps$14 = {
8980
+ const defaultProps$16 = {
8887
8981
  title: "",
8888
8982
  paneKey: "",
8889
8983
  activeKey: "",
@@ -8891,7 +8985,7 @@
8891
8985
  };
8892
8986
  const TabPane = (props) => {
8893
8987
  const { children, paneKey, activeKey, autoHeightClassName, className } = {
8894
- ...defaultProps$14,
8988
+ ...defaultProps$16,
8895
8989
  ...props
8896
8990
  };
8897
8991
  const b2 = cn("tabpane");
@@ -8907,7 +9001,7 @@
8907
9001
  className: classes
8908
9002
  }, children);
8909
9003
  };
8910
- const defaultProps$13 = {
9004
+ const defaultProps$15 = {
8911
9005
  size: 3,
8912
9006
  current: 1,
8913
9007
  block: false,
@@ -8927,7 +9021,7 @@
8927
9021
  vertical,
8928
9022
  ...rest
8929
9023
  } = {
8930
- ...defaultProps$13,
9024
+ ...defaultProps$15,
8931
9025
  ...props
8932
9026
  };
8933
9027
  const b2 = cn("indicator");
@@ -8961,7 +9055,7 @@
8961
9055
  ...rest
8962
9056
  }, renderEles());
8963
9057
  };
8964
- Indicator.defaultProps = defaultProps$13;
9058
+ Indicator.defaultProps = defaultProps$15;
8965
9059
  Indicator.displayName = "NutIndicator";
8966
9060
  const handleClick = (e2) => {
8967
9061
  e2.stopPropagation();
@@ -8977,7 +9071,7 @@
8977
9071
  }
8978
9072
  };
8979
9073
  const OffsetContext = React.createContext(20);
8980
- const defaultProps$12 = {
9074
+ const defaultProps$14 = {
8981
9075
  showhead: false,
8982
9076
  position: "left",
8983
9077
  width: "80%"
@@ -8995,7 +9089,7 @@
8995
9089
  onClose,
8996
9090
  ...rest
8997
9091
  } = {
8998
- ...defaultProps$12,
9092
+ ...defaultProps$14,
8999
9093
  ...props
9000
9094
  };
9001
9095
  const offset = props.offset ? Number(props.offset) : 20;
@@ -9023,14 +9117,14 @@
9023
9117
  className: "nut-sidenavbar__content"
9024
9118
  }, children))))));
9025
9119
  };
9026
- SideNavBar.defaultProps = defaultProps$12;
9120
+ SideNavBar.defaultProps = defaultProps$14;
9027
9121
  SideNavBar.displayName = "NutSideNavBar";
9028
- const defaultProps$11 = {
9122
+ const defaultProps$13 = {
9029
9123
  open: true
9030
9124
  };
9031
9125
  const SubSideNavBar = (props) => {
9032
9126
  const { title, ikey, children, onClick, open, ...rest } = {
9033
- ...defaultProps$11,
9127
+ ...defaultProps$13,
9034
9128
  ...props
9035
9129
  };
9036
9130
  const offset = React.useContext(OffsetContext);
@@ -9101,7 +9195,7 @@
9101
9195
  ...rest
9102
9196
  }, title);
9103
9197
  };
9104
- const defaultProps$10 = {
9198
+ const defaultProps$12 = {
9105
9199
  ...ComponentDefaults,
9106
9200
  className: "",
9107
9201
  style: {},
@@ -9124,7 +9218,7 @@
9124
9218
  iconFontClassName,
9125
9219
  ...rest
9126
9220
  } = {
9127
- ...defaultProps$10,
9221
+ ...defaultProps$12,
9128
9222
  ...props
9129
9223
  };
9130
9224
  const parentRef = React.useRef(null);
@@ -9229,9 +9323,9 @@
9229
9323
  })));
9230
9324
  })), cloneChildren()));
9231
9325
  };
9232
- Menu.defaultProps = defaultProps$10;
9326
+ Menu.defaultProps = defaultProps$12;
9233
9327
  Menu.displayName = "NutMenu";
9234
- const defaultProps$$ = {
9328
+ const defaultProps$11 = {
9235
9329
  ...ComponentDefaults,
9236
9330
  className: "",
9237
9331
  style: {},
@@ -9246,7 +9340,7 @@
9246
9340
  };
9247
9341
  const MenuItem = React.forwardRef((props, ref) => {
9248
9342
  useConfig();
9249
- const mergedProps = { ...defaultProps$$, ...props };
9343
+ const mergedProps = { ...defaultProps$11, ...props };
9250
9344
  const {
9251
9345
  style,
9252
9346
  options: options2,
@@ -9262,7 +9356,7 @@
9262
9356
  iconClassPrefix,
9263
9357
  iconFontClassName
9264
9358
  } = {
9265
- ...defaultProps$$,
9359
+ ...defaultProps$11,
9266
9360
  ...props
9267
9361
  };
9268
9362
  const { activeColor, showPopup, parent, orderKey } = mergedProps;
@@ -9383,7 +9477,7 @@
9383
9477
  }, item.text));
9384
9478
  }), children))));
9385
9479
  });
9386
- MenuItem.defaultProps = defaultProps$$;
9480
+ MenuItem.defaultProps = defaultProps$11;
9387
9481
  MenuItem.displayName = "NutMenuItem";
9388
9482
  const MIN_DISTANCE = 10;
9389
9483
  function getDirection(x2, y2) {
@@ -9681,7 +9775,7 @@
9681
9775
  }
9682
9776
  }
9683
9777
  };
9684
- const defaultProps$_ = {
9778
+ const defaultProps$10 = {
9685
9779
  range: false,
9686
9780
  hiddenRange: false,
9687
9781
  hiddenTag: false,
@@ -9718,8 +9812,8 @@
9718
9812
  minDesc,
9719
9813
  maxDesc,
9720
9814
  curValueDesc
9721
- } = { ...defaultProps$_, ...props };
9722
- let { min, max, step } = { ...defaultProps$_, ...props };
9815
+ } = { ...defaultProps$10, ...props };
9816
+ let { min, max, step } = { ...defaultProps$10, ...props };
9723
9817
  min = Number(min);
9724
9818
  max = Number(max);
9725
9819
  step = Number(step);
@@ -10057,7 +10151,7 @@
10057
10151
  className: "max"
10058
10152
  }, maxDesc || +max) : null);
10059
10153
  };
10060
- Range.defaultProps = defaultProps$_;
10154
+ Range.defaultProps = defaultProps$10;
10061
10155
  Range.displayName = "NutRange";
10062
10156
  const Utils = {
10063
10157
  isLeapYear(y2) {
@@ -10151,7 +10245,7 @@
10151
10245
  };
10152
10246
  }
10153
10247
  var requestAniFrame$1 = requestAniFrame();
10154
- const defaultProps$Z = {
10248
+ const defaultProps$$ = {
10155
10249
  type: "one",
10156
10250
  isAutoBackFill: false,
10157
10251
  poppable: true,
@@ -10200,7 +10294,7 @@
10200
10294
  onChoose,
10201
10295
  onUpdate,
10202
10296
  onSelected
10203
- } = { ...defaultProps$Z, ...props };
10297
+ } = { ...defaultProps$$, ...props };
10204
10298
  const weeks = locale.calendaritem.weekdays;
10205
10299
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
10206
10300
  const [monthsData, setMonthsData] = React.useState([]);
@@ -10787,9 +10881,9 @@
10787
10881
  onClick: confirm2
10788
10882
  }, confirmText || locale.confirm)) : ""));
10789
10883
  });
10790
- CalendarItem.defaultProps = defaultProps$Z;
10884
+ CalendarItem.defaultProps = defaultProps$$;
10791
10885
  CalendarItem.displayName = "NutCalendarItem";
10792
- const defaultProps$Y = {
10886
+ const defaultProps$_ = {
10793
10887
  type: "one",
10794
10888
  isAutoBackFill: false,
10795
10889
  poppable: true,
@@ -10841,7 +10935,7 @@
10841
10935
  onClose,
10842
10936
  onChoose,
10843
10937
  onSelected
10844
- } = { ...defaultProps$Y, ...props };
10938
+ } = { ...defaultProps$_, ...props };
10845
10939
  const calendarRef = React.useRef(null);
10846
10940
  const close = () => {
10847
10941
  onClose && onClose();
@@ -10900,9 +10994,9 @@
10900
10994
  style: { height: "85vh" }
10901
10995
  }, renderItem()) : renderItem());
10902
10996
  });
10903
- Calendar.defaultProps = defaultProps$Y;
10997
+ Calendar.defaultProps = defaultProps$_;
10904
10998
  Calendar.displayName = "NutCalendar";
10905
- const defaultProps$X = {
10999
+ const defaultProps$Z = {
10906
11000
  disabled: false,
10907
11001
  checkedValue: [],
10908
11002
  max: void 0,
@@ -10912,7 +11006,7 @@
10912
11006
  };
10913
11007
  const CheckboxGroup = React__default["default"].forwardRef(
10914
11008
  (props, ref) => {
10915
- const { children } = { ...defaultProps$X, ...props };
11009
+ const { children } = { ...defaultProps$Z, ...props };
10916
11010
  const b2 = cn("checkboxgroup");
10917
11011
  const {
10918
11012
  className,
@@ -11019,9 +11113,9 @@
11019
11113
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren());
11020
11114
  }
11021
11115
  );
11022
- CheckboxGroup.defaultProps = defaultProps$X;
11116
+ CheckboxGroup.defaultProps = defaultProps$Z;
11023
11117
  CheckboxGroup.displayName = "NutCheckboxGroup";
11024
- const defaultProps$W = {
11118
+ const defaultProps$Y = {
11025
11119
  ...ComponentDefaults,
11026
11120
  checked: false,
11027
11121
  disabled: false,
@@ -11037,7 +11131,7 @@
11037
11131
  };
11038
11132
  const Checkbox = (props) => {
11039
11133
  const { children } = {
11040
- ...defaultProps$W,
11134
+ ...defaultProps$Y,
11041
11135
  ...props
11042
11136
  };
11043
11137
  const b2 = cn("checkbox");
@@ -11119,7 +11213,7 @@
11119
11213
  onClick: handleClick2
11120
11214
  }, renderIcon(), renderLabel());
11121
11215
  };
11122
- Checkbox.defaultProps = defaultProps$W;
11216
+ Checkbox.defaultProps = defaultProps$Y;
11123
11217
  Checkbox.displayName = "NutCheckBox";
11124
11218
  Checkbox.Group = CheckboxGroup;
11125
11219
  const InternalPickerSlot = (props, ref) => {
@@ -11544,7 +11638,7 @@
11544
11638
  };
11545
11639
  const Picker = React__default["default"].forwardRef(InternalPicker);
11546
11640
  const currentYear = new Date().getFullYear();
11547
- const defaultProps$V = {
11641
+ const defaultProps$X = {
11548
11642
  modelValue: null,
11549
11643
  visible: false,
11550
11644
  title: "",
@@ -11575,7 +11669,7 @@
11575
11669
  style,
11576
11670
  ...rest
11577
11671
  } = {
11578
- ...defaultProps$V,
11672
+ ...defaultProps$X,
11579
11673
  ...props
11580
11674
  };
11581
11675
  const { locale } = useConfig();
@@ -11841,9 +11935,9 @@
11841
11935
  ref: pickerRef
11842
11936
  }));
11843
11937
  };
11844
- DatePicker.defaultProps = defaultProps$V;
11938
+ DatePicker.defaultProps = defaultProps$X;
11845
11939
  DatePicker.displayName = "NutDatePicker";
11846
- const defaultProps$U = {
11940
+ const defaultProps$W = {
11847
11941
  ...ComponentDefaults,
11848
11942
  disabled: false,
11849
11943
  buttonSize: "",
@@ -11890,7 +11984,7 @@
11890
11984
  iconFontClassName,
11891
11985
  ...restProps
11892
11986
  } = {
11893
- ...defaultProps$U,
11987
+ ...defaultProps$W,
11894
11988
  ...props
11895
11989
  };
11896
11990
  const [inputValue, setInputValue] = React.useState(modelValue);
@@ -12027,7 +12121,7 @@
12027
12121
  onClick: addNumber
12028
12122
  }));
12029
12123
  };
12030
- InputNumber.defaultProps = defaultProps$U;
12124
+ InputNumber.defaultProps = defaultProps$W;
12031
12125
  InputNumber.displayName = "NutInputNumber";
12032
12126
  function trimExtraChar(value, char, regExp) {
12033
12127
  const index = value.indexOf(char);
@@ -12053,7 +12147,7 @@
12053
12147
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
12054
12148
  return value.replace(regExp, "");
12055
12149
  }
12056
- const defaultProps$T = {
12150
+ const defaultProps$V = {
12057
12151
  ...ComponentDefaults,
12058
12152
  type: "text",
12059
12153
  name: "",
@@ -12150,7 +12244,7 @@
12150
12244
  iconFontClassName,
12151
12245
  ...rest
12152
12246
  } = {
12153
- ...defaultProps$T,
12247
+ ...defaultProps$V,
12154
12248
  ...props
12155
12249
  };
12156
12250
  locale.placeholder = placeholder || locale.placeholder;
@@ -12381,14 +12475,14 @@
12381
12475
  }
12382
12476
  }, errorMessage) : null)));
12383
12477
  });
12384
- Input.defaultProps = defaultProps$T;
12478
+ Input.defaultProps = defaultProps$V;
12385
12479
  Input.displayName = "NutInput";
12386
12480
  const radioContext = {
12387
12481
  onChange: (val) => {
12388
12482
  }
12389
12483
  };
12390
12484
  var RadioContext = React__default["default"].createContext(radioContext);
12391
- const defaultProps$S = {
12485
+ const defaultProps$U = {
12392
12486
  value: null,
12393
12487
  textPosition: "right",
12394
12488
  onChange: (value) => {
@@ -12398,7 +12492,7 @@
12398
12492
  };
12399
12493
  const RadioGroup = React__default["default"].forwardRef(
12400
12494
  (props, ref) => {
12401
- const { children } = { ...defaultProps$S, ...props };
12495
+ const { children } = { ...defaultProps$U, ...props };
12402
12496
  cn("RadioGroup");
12403
12497
  const {
12404
12498
  className,
@@ -12463,9 +12557,9 @@
12463
12557
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren()));
12464
12558
  }
12465
12559
  );
12466
- RadioGroup.defaultProps = defaultProps$S;
12560
+ RadioGroup.defaultProps = defaultProps$U;
12467
12561
  RadioGroup.displayName = "NutRadioGroup";
12468
- const defaultProps$R = {
12562
+ const defaultProps$T = {
12469
12563
  ...ComponentDefaults,
12470
12564
  className: "",
12471
12565
  style: {},
@@ -12482,7 +12576,7 @@
12482
12576
  };
12483
12577
  const Radio = (props) => {
12484
12578
  const { children } = {
12485
- ...defaultProps$R,
12579
+ ...defaultProps$T,
12486
12580
  ...props
12487
12581
  };
12488
12582
  const {
@@ -12562,10 +12656,10 @@
12562
12656
  ...rest
12563
12657
  }, renderRadioItem());
12564
12658
  };
12565
- Radio.defaultProps = defaultProps$R;
12659
+ Radio.defaultProps = defaultProps$T;
12566
12660
  Radio.displayName = "NutRadio";
12567
12661
  Radio.RadioGroup = RadioGroup;
12568
- const defaultProps$Q = {
12662
+ const defaultProps$S = {
12569
12663
  ...ComponentDefaults,
12570
12664
  count: 5,
12571
12665
  modelValue: 0,
@@ -12600,7 +12694,7 @@
12600
12694
  iconClassPrefix,
12601
12695
  iconFontClassName
12602
12696
  } = {
12603
- ...defaultProps$Q,
12697
+ ...defaultProps$S,
12604
12698
  ...props
12605
12699
  };
12606
12700
  const b2 = cn("rate");
@@ -12673,9 +12767,9 @@
12673
12767
  }));
12674
12768
  }));
12675
12769
  };
12676
- Rate.defaultProps = defaultProps$Q;
12770
+ Rate.defaultProps = defaultProps$S;
12677
12771
  Rate.displayName = "NutRate";
12678
- const defaultProps$P = {
12772
+ const defaultProps$R = {
12679
12773
  ...ComponentDefaults,
12680
12774
  title: "",
12681
12775
  desc: "",
@@ -12843,9 +12937,9 @@
12843
12937
  onClick: () => sure()
12844
12938
  }, locale.confirm)) : null)));
12845
12939
  };
12846
- ShortPassword.defaultProps = defaultProps$P;
12940
+ ShortPassword.defaultProps = defaultProps$R;
12847
12941
  ShortPassword.displayName = "NutShortPassword";
12848
- const defaultProps$O = {
12942
+ const defaultProps$Q = {
12849
12943
  defaultValue: "",
12850
12944
  textAlign: "left",
12851
12945
  limitshow: false,
@@ -12873,7 +12967,7 @@
12873
12967
  onChange,
12874
12968
  onBlur,
12875
12969
  onFocus
12876
- } = { ...defaultProps$O, ...props };
12970
+ } = { ...defaultProps$Q, ...props };
12877
12971
  const textareaBem = cn("textarea");
12878
12972
  const [inputValue, SetInputValue] = React.useState("");
12879
12973
  const textareaRef = React.useRef(null);
@@ -12970,9 +13064,9 @@
12970
13064
  className: textareaBem("limit")
12971
13065
  }, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
12972
13066
  };
12973
- TextArea.defaultProps = defaultProps$O;
13067
+ TextArea.defaultProps = defaultProps$Q;
12974
13068
  TextArea.displayName = "NutTextArea";
12975
- const defaultProps$N = {
13069
+ const defaultProps$P = {
12976
13070
  name: "",
12977
13071
  size: "",
12978
13072
  classPrefix: "nut-icon",
@@ -13000,7 +13094,7 @@
13000
13094
  onClick,
13001
13095
  ...rest
13002
13096
  } = {
13003
- ...defaultProps$N,
13097
+ ...defaultProps$P,
13004
13098
  ...props
13005
13099
  };
13006
13100
  const isImage = name ? name.indexOf("/") !== -1 : false;
@@ -13034,9 +13128,9 @@
13034
13128
  children
13035
13129
  );
13036
13130
  }
13037
- Icon.defaultProps = defaultProps$N;
13131
+ Icon.defaultProps = defaultProps$P;
13038
13132
  Icon.displayName = "NutIcon";
13039
- const defaultProps$M = {
13133
+ const defaultProps$O = {
13040
13134
  ...ComponentDefaults,
13041
13135
  className: "",
13042
13136
  style: {},
@@ -13084,7 +13178,7 @@
13084
13178
  iconFontClassName,
13085
13179
  ...rest
13086
13180
  } = {
13087
- ...defaultProps$M,
13181
+ ...defaultProps$O,
13088
13182
  ...props
13089
13183
  };
13090
13184
  const b2 = cn("progress");
@@ -13162,7 +13256,7 @@
13162
13256
  color: iconColor
13163
13257
  })));
13164
13258
  };
13165
- Progress.defaultProps = defaultProps$M;
13259
+ Progress.defaultProps = defaultProps$O;
13166
13260
  Progress.displayName = "NutProgress";
13167
13261
  class UploadOptions {
13168
13262
  constructor() {
@@ -13260,7 +13354,7 @@
13260
13354
  }
13261
13355
  }
13262
13356
  }
13263
- const defaultProps$L = {
13357
+ const defaultProps$N = {
13264
13358
  ...ComponentDefaults,
13265
13359
  url: "",
13266
13360
  maximum: 1,
@@ -13340,7 +13434,7 @@
13340
13434
  onBeforeXhrUpload,
13341
13435
  onBeforeDelete,
13342
13436
  ...restProps
13343
- } = { ...defaultProps$L, ...props };
13437
+ } = { ...defaultProps$N, ...props };
13344
13438
  const [fileList, setFileList] = React.useState([]);
13345
13439
  const [uploadQueue, setUploadQueue] = React.useState([]);
13346
13440
  React.useEffect(() => {
@@ -13661,9 +13755,9 @@
13661
13755
  })));
13662
13756
  };
13663
13757
  const Uploader = React__default["default"].forwardRef(InternalUploader);
13664
- Uploader.defaultProps = defaultProps$L;
13758
+ Uploader.defaultProps = defaultProps$N;
13665
13759
  Uploader.displayName = "NutUploader";
13666
- const defaultProps$K = {
13760
+ const defaultProps$M = {
13667
13761
  data: {
13668
13762
  text: "",
13669
13763
  value: "",
@@ -13672,13 +13766,14 @@
13672
13766
  loading: false,
13673
13767
  children: []
13674
13768
  },
13769
+ activeColor: "#fa2c19",
13675
13770
  checked: false,
13676
13771
  chooseItem: () => {
13677
13772
  }
13678
13773
  };
13679
13774
  const InternalCascaderItem = (props) => {
13680
- const { data, checked, chooseItem } = {
13681
- ...defaultProps$K,
13775
+ const { data, checked, chooseItem, activeColor } = {
13776
+ ...defaultProps$M,
13682
13777
  ...props
13683
13778
  };
13684
13779
  const b2 = cn("cascader-item");
@@ -13698,6 +13793,7 @@
13698
13793
  const initData = () => {
13699
13794
  };
13700
13795
  return /* @__PURE__ */ React__default["default"].createElement("div", {
13796
+ style: { color: checked ? activeColor : "" },
13701
13797
  className: classes,
13702
13798
  onClick: () => {
13703
13799
  chooseItem(data);
@@ -13714,7 +13810,7 @@
13714
13810
  }));
13715
13811
  };
13716
13812
  const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
13717
- CascaderItem.defaultProps = defaultProps$K;
13813
+ CascaderItem.defaultProps = defaultProps$M;
13718
13814
  CascaderItem.displayName = "NutCascaderItem";
13719
13815
  const formatTree = (tree, parent, config2) => tree.map((node) => {
13720
13816
  const {
@@ -13848,9 +13944,11 @@
13848
13944
  return pathNodes;
13849
13945
  }
13850
13946
  }
13851
- const defaultProps$J = {
13947
+ const defaultProps$L = {
13852
13948
  className: "",
13853
13949
  style: {},
13950
+ activeColor: "#fa2c19",
13951
+ tabsColor: "",
13854
13952
  poppable: true,
13855
13953
  visible: false,
13856
13954
  options: [],
@@ -13878,6 +13976,7 @@
13878
13976
  const {
13879
13977
  className,
13880
13978
  style,
13979
+ tabsColor,
13881
13980
  poppable,
13882
13981
  visible,
13883
13982
  options: options2,
@@ -13895,7 +13994,7 @@
13895
13994
  onClose,
13896
13995
  onChange,
13897
13996
  onPathChange
13898
- } = { ...defaultProps$J, ...props };
13997
+ } = { ...defaultProps$L, ...props };
13899
13998
  const [tabvalue, setTabvalue] = React.useState("c1");
13900
13999
  const [optiosData, setOptiosData] = React.useState([]);
13901
14000
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -14119,7 +14218,8 @@
14119
14218
  }, /* @__PURE__ */ React__default["default"].createElement("span", {
14120
14219
  className: "nut-tabs__titles-item__text"
14121
14220
  }, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "\u8BF7\u9009\u62E9", !(!state.initLoading && state.panes.length) && "Loading..."), /* @__PURE__ */ React__default["default"].createElement("span", {
14122
- className: "nut-tabs__titles-item__line"
14221
+ className: "nut-tabs__titles-item__line",
14222
+ style: { background: tabsColor }
14123
14223
  }));
14124
14224
  });
14125
14225
  }
@@ -14154,9 +14254,9 @@
14154
14254
  }, renderItem()) : renderItem());
14155
14255
  };
14156
14256
  const Cascader = React__default["default"].forwardRef(InternalCascader);
14157
- Cascader.defaultProps = defaultProps$J;
14257
+ Cascader.defaultProps = defaultProps$L;
14158
14258
  Cascader.displayName = "NutCascader";
14159
- const defaultProps$I = {
14259
+ const defaultProps$K = {
14160
14260
  ...ComponentDefaults,
14161
14261
  placeholder: "",
14162
14262
  shape: "square",
@@ -14207,7 +14307,7 @@
14207
14307
  iconClassPrefix,
14208
14308
  iconFontClassName
14209
14309
  } = {
14210
- ...defaultProps$I,
14310
+ ...defaultProps$K,
14211
14311
  ...props
14212
14312
  };
14213
14313
  const alignClass = `${align}`;
@@ -14356,9 +14456,9 @@
14356
14456
  className: `${searchbarBem("content")}`
14357
14457
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
14358
14458
  };
14359
- SearchBar.defaultProps = defaultProps$I;
14459
+ SearchBar.defaultProps = defaultProps$K;
14360
14460
  SearchBar.displayName = "NutSearchBar";
14361
- const defaultProps$H = {
14461
+ const defaultProps$J = {
14362
14462
  confirmText: "",
14363
14463
  title: "",
14364
14464
  visible: false,
@@ -14556,7 +14656,7 @@
14556
14656
  })
14557
14657
  }, confirmText || locale.done))) : null))));
14558
14658
  };
14559
- NumberKeyboard.defaultProps = defaultProps$H;
14659
+ NumberKeyboard.defaultProps = defaultProps$J;
14560
14660
  NumberKeyboard.displayName = "NutNumberKeyboard";
14561
14661
  const FormItemContext = React.createContext({});
14562
14662
  function _extends() {
@@ -15713,7 +15813,7 @@
15713
15813
  }
15714
15814
  return [formRef.current];
15715
15815
  };
15716
- const defaultProps$G = {
15816
+ const defaultProps$I = {
15717
15817
  ...ComponentDefaults,
15718
15818
  name: "",
15719
15819
  label: "",
@@ -15760,7 +15860,7 @@
15760
15860
  showErrorLine,
15761
15861
  showErrorMessage
15762
15862
  } = {
15763
- ...defaultProps$G,
15863
+ ...defaultProps$I,
15764
15864
  ...this.props
15765
15865
  };
15766
15866
  const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -15809,9 +15909,9 @@
15809
15909
  return this.renderLayout(returnChildNode);
15810
15910
  }
15811
15911
  }
15812
- FormItem.defaultProps = defaultProps$G;
15912
+ FormItem.defaultProps = defaultProps$I;
15813
15913
  FormItem.contextType = FormItemContext;
15814
- const defaultProps$F = {
15914
+ const defaultProps$H = {
15815
15915
  ...ComponentDefaults,
15816
15916
  className: "",
15817
15917
  style: void 0,
@@ -15838,7 +15938,7 @@
15838
15938
  starPositon,
15839
15939
  ...rest
15840
15940
  } = {
15841
- ...defaultProps$F,
15941
+ ...defaultProps$H,
15842
15942
  ...props
15843
15943
  };
15844
15944
  const [formInstance] = useForm();
@@ -15859,10 +15959,10 @@
15859
15959
  value: formInstance
15860
15960
  }, children)));
15861
15961
  };
15862
- Form.defaultProps = defaultProps$F;
15962
+ Form.defaultProps = defaultProps$H;
15863
15963
  Form.displayName = "NutForm";
15864
15964
  Form.Item = FormItem;
15865
- const defaultProps$E = {
15965
+ const defaultProps$G = {
15866
15966
  cancelTxt: "",
15867
15967
  optionTag: "name",
15868
15968
  optionSubTag: "subname",
@@ -15896,7 +15996,7 @@
15896
15996
  className,
15897
15997
  style,
15898
15998
  ...rest
15899
- } = { ...defaultProps$E, ...props };
15999
+ } = { ...defaultProps$G, ...props };
15900
16000
  const b2 = cn("actionsheet");
15901
16001
  const isHighlight = (item) => {
15902
16002
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
@@ -15940,9 +16040,9 @@
15940
16040
  onClick: () => cancelActionSheet()
15941
16041
  }, cancelTxt)));
15942
16042
  };
15943
- ActionSheet.defaultProps = defaultProps$E;
16043
+ ActionSheet.defaultProps = defaultProps$G;
15944
16044
  ActionSheet.displayName = "NutActionSheet";
15945
- const defaultProps$D = {
16045
+ const defaultProps$F = {
15946
16046
  ...ComponentDefaults,
15947
16047
  bottom: 20,
15948
16048
  right: 10,
@@ -15968,7 +16068,7 @@
15968
16068
  iconClassPrefix,
15969
16069
  iconFontClassName
15970
16070
  } = {
15971
- ...defaultProps$D,
16071
+ ...defaultProps$F,
15972
16072
  ...props
15973
16073
  };
15974
16074
  const [backTop, SetBackTop] = React.useState(false);
@@ -16059,9 +16159,9 @@
16059
16159
  name: "top"
16060
16160
  }));
16061
16161
  };
16062
- BackTop.defaultProps = defaultProps$D;
16162
+ BackTop.defaultProps = defaultProps$F;
16063
16163
  BackTop.displayName = "NutBackTop";
16064
- const defaultProps$C = {
16164
+ const defaultProps$E = {
16065
16165
  attract: false,
16066
16166
  direction: void 0,
16067
16167
  boundary: {
@@ -16074,7 +16174,7 @@
16074
16174
  };
16075
16175
  const Drag = (props) => {
16076
16176
  const { attract, direction, boundary, children, className, style, ...reset } = {
16077
- ...defaultProps$C,
16177
+ ...defaultProps$E,
16078
16178
  ...props
16079
16179
  };
16080
16180
  const b2 = cn("drag");
@@ -16136,7 +16236,7 @@
16136
16236
  ...bind()
16137
16237
  }, children));
16138
16238
  };
16139
- Drag.defaultProps = defaultProps$C;
16239
+ Drag.defaultProps = defaultProps$E;
16140
16240
  Drag.displayName = "NutDrag";
16141
16241
  const Content = (props) => {
16142
16242
  const {
@@ -16331,7 +16431,7 @@
16331
16431
  update: update2
16332
16432
  };
16333
16433
  }
16334
- const defaultProps$B = {
16434
+ const defaultProps$D = {
16335
16435
  okText: "\u786E\u8BA4",
16336
16436
  cancelText: "\u53D6\u6D88",
16337
16437
  mask: true,
@@ -16422,9 +16522,9 @@
16422
16522
  });
16423
16523
  };
16424
16524
  });
16425
- Dialog.defaultProps = defaultProps$B;
16525
+ Dialog.defaultProps = defaultProps$D;
16426
16526
  Dialog.displayName = "NutDialog";
16427
- const defaultProps$A = {
16527
+ const defaultProps$C = {
16428
16528
  ...ComponentDefaults,
16429
16529
  hasMore: true,
16430
16530
  threshold: 200,
@@ -16461,7 +16561,7 @@
16461
16561
  iconFontClassName,
16462
16562
  ...restProps
16463
16563
  } = {
16464
- ...defaultProps$A,
16564
+ ...defaultProps$C,
16465
16565
  ...props
16466
16566
  };
16467
16567
  const [isInfiniting, setIsInfiniting] = React.useState(false);
@@ -16625,7 +16725,7 @@
16625
16725
  className: "tips"
16626
16726
  }, loadMoreTxt || locale.infiniteloading.loadMoreText)));
16627
16727
  };
16628
- Infiniteloading.defaultProps = defaultProps$A;
16728
+ Infiniteloading.defaultProps = defaultProps$C;
16629
16729
  Infiniteloading.displayName = "NutInfiniteloading";
16630
16730
  class Notification extends React__namespace.PureComponent {
16631
16731
  constructor(props) {
@@ -16800,7 +16900,7 @@
16800
16900
  }
16801
16901
  }
16802
16902
  };
16803
- const defaultProps$z = {
16903
+ const defaultProps$B = {
16804
16904
  isAsync: false,
16805
16905
  checked: false,
16806
16906
  disable: false,
@@ -16823,7 +16923,7 @@
16823
16923
  className,
16824
16924
  style
16825
16925
  } = {
16826
- ...defaultProps$z,
16926
+ ...defaultProps$B,
16827
16927
  ...props
16828
16928
  };
16829
16929
  const [value, setValue] = React.useState(false);
@@ -16863,7 +16963,7 @@
16863
16963
  className: `${b2("label")} close`
16864
16964
  }, inactiveText))));
16865
16965
  };
16866
- Switch.defaultProps = defaultProps$z;
16966
+ Switch.defaultProps = defaultProps$B;
16867
16967
  Switch.displayName = "NutSwitch";
16868
16968
  function preventDefault(event, isStopPropagation) {
16869
16969
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
@@ -16873,7 +16973,7 @@
16873
16973
  event.stopPropagation();
16874
16974
  }
16875
16975
  }
16876
- const defaultProps$y = {
16976
+ const defaultProps$A = {
16877
16977
  name: "",
16878
16978
  leftWidth: 0,
16879
16979
  rightWidth: 0
@@ -16881,7 +16981,7 @@
16881
16981
  const Swipe = React.forwardRef((props, instanceRef) => {
16882
16982
  const swipeBem = cn("swipe");
16883
16983
  const touch = useTouch();
16884
- const { children, className, style } = { ...defaultProps$y, ...props };
16984
+ const { children, className, style } = { ...defaultProps$A, ...props };
16885
16985
  const root = React.useRef();
16886
16986
  const opened = React.useRef(false);
16887
16987
  const lockClick = React.useRef(false);
@@ -17047,7 +17147,7 @@
17047
17147
  style: wrapperStyle
17048
17148
  }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef)));
17049
17149
  });
17050
- Swipe.defaultProps = defaultProps$y;
17150
+ Swipe.defaultProps = defaultProps$A;
17051
17151
  Swipe.displayName = "NutSwipe";
17052
17152
  function bound(position, min, max) {
17053
17153
  let ret = position;
@@ -17085,7 +17185,7 @@
17085
17185
  console.log(e2);
17086
17186
  }
17087
17187
  }
17088
- const defaultProps$x = {
17188
+ const defaultProps$z = {
17089
17189
  className: "",
17090
17190
  style: {},
17091
17191
  pullingText: "",
@@ -17102,7 +17202,7 @@
17102
17202
  const PullToRefresh = (p2) => {
17103
17203
  const { locale } = useConfig();
17104
17204
  const props = {
17105
- ...defaultProps$x,
17205
+ ...defaultProps$z,
17106
17206
  ...p2,
17107
17207
  ...{
17108
17208
  pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
@@ -17241,10 +17341,10 @@
17241
17341
  className: "nut-pulltorefresh-content"
17242
17342
  }, props.children));
17243
17343
  };
17244
- PullToRefresh.defaultProps = defaultProps$x;
17344
+ PullToRefresh.defaultProps = defaultProps$z;
17245
17345
  PullToRefresh.displayName = "NutPullToRefresh";
17246
17346
  const isObject = (val) => val !== null && typeof val === "object";
17247
- const defaultProps$w = {
17347
+ const defaultProps$y = {
17248
17348
  strokeWidth: 5,
17249
17349
  radius: 50,
17250
17350
  strokeLinecap: "round",
@@ -17267,7 +17367,7 @@
17267
17367
  strokeLinecap,
17268
17368
  ...restProps
17269
17369
  } = {
17270
- ...defaultProps$w,
17370
+ ...defaultProps$y,
17271
17371
  ...props
17272
17372
  };
17273
17373
  const b2 = cn("circleprogress");
@@ -17353,9 +17453,9 @@
17353
17453
  className: "nut-circleprogress-text"
17354
17454
  }, children || /* @__PURE__ */ React__default["default"].createElement("div", null, progress, "%")));
17355
17455
  };
17356
- CircleProgress.defaultProps = defaultProps$w;
17456
+ CircleProgress.defaultProps = defaultProps$y;
17357
17457
  CircleProgress.displayName = "NutCircleProgress";
17358
- const defaultProps$v = {
17458
+ const defaultProps$x = {
17359
17459
  ...ComponentDefaults,
17360
17460
  direction: "across",
17361
17461
  list: [],
@@ -17399,7 +17499,7 @@
17399
17499
  iconClassPrefix,
17400
17500
  iconFontClassName
17401
17501
  } = {
17402
- ...defaultProps$v,
17502
+ ...defaultProps$x,
17403
17503
  ...props
17404
17504
  };
17405
17505
  const wrap = React.useRef(null);
@@ -17646,16 +17746,16 @@
17646
17746
  size: "11px"
17647
17747
  }) : null))) : null);
17648
17748
  };
17649
- NoticeBar.defaultProps = defaultProps$v;
17749
+ NoticeBar.defaultProps = defaultProps$x;
17650
17750
  NoticeBar.displayName = "NutNoticeBar";
17651
17751
  const DataContext$1 = React.createContext({});
17652
- const defaultProps$u = {
17752
+ const defaultProps$w = {
17653
17753
  current: 0,
17654
17754
  direction: "horizontal",
17655
17755
  progressDot: false
17656
17756
  };
17657
17757
  const Steps = (props) => {
17658
- const propSteps = { ...defaultProps$u, ...props };
17758
+ const propSteps = { ...defaultProps$w, ...props };
17659
17759
  const {
17660
17760
  children,
17661
17761
  current,
@@ -17689,9 +17789,9 @@
17689
17789
  children
17690
17790
  ));
17691
17791
  };
17692
- Steps.defaultProps = defaultProps$u;
17792
+ Steps.defaultProps = defaultProps$w;
17693
17793
  Steps.displayName = "NutSteps";
17694
- const defaultProps$t = {
17794
+ const defaultProps$v = {
17695
17795
  ...ComponentDefaults,
17696
17796
  title: "",
17697
17797
  content: "",
@@ -17715,7 +17815,7 @@
17715
17815
  iconFontClassName,
17716
17816
  ...restProps
17717
17817
  } = {
17718
- ...defaultProps$t,
17818
+ ...defaultProps$v,
17719
17819
  ...props
17720
17820
  };
17721
17821
  const parent = React.useContext(DataContext$1);
@@ -17777,10 +17877,10 @@
17777
17877
  className: "nut-step-content"
17778
17878
  }, renderContent())));
17779
17879
  };
17780
- Step.defaultProps = defaultProps$t;
17880
+ Step.defaultProps = defaultProps$v;
17781
17881
  Step.displayName = "NutStep";
17782
17882
  const DataContext = React.createContext({});
17783
- const defaultProps$s = {
17883
+ const defaultProps$u = {
17784
17884
  width: typeof window === "object" ? window.innerWidth : 375,
17785
17885
  height: 0,
17786
17886
  duration: 500,
@@ -17798,7 +17898,7 @@
17798
17898
  };
17799
17899
  const DISTANCE = 5;
17800
17900
  const Swiper = React__default["default"].forwardRef((props, ref) => {
17801
- const propSwiper = { ...defaultProps$s, ...props };
17901
+ const propSwiper = { ...defaultProps$u, ...props };
17802
17902
  const {
17803
17903
  children,
17804
17904
  direction,
@@ -18208,13 +18308,13 @@
18208
18308
  });
18209
18309
  })) : /* @__PURE__ */ React__default["default"].createElement("div", null, pageContent)));
18210
18310
  });
18211
- Swiper.defaultProps = defaultProps$s;
18311
+ Swiper.defaultProps = defaultProps$u;
18212
18312
  Swiper.displayName = "NutSwiper";
18213
- const defaultProps$r = {
18313
+ const defaultProps$t = {
18214
18314
  direction: "horizontal"
18215
18315
  };
18216
18316
  const SwiperItem = React__default["default"].forwardRef((props, ref) => {
18217
- const _props = { ...defaultProps$r, ...props };
18317
+ const _props = { ...defaultProps$t, ...props };
18218
18318
  const { className, style, children, direction, size } = _props;
18219
18319
  const parent = React.useContext(DataContext);
18220
18320
  const b2 = cn("swiper-item");
@@ -18233,10 +18333,10 @@
18233
18333
  style: { ...style, ...getStyle() }
18234
18334
  }, children);
18235
18335
  });
18236
- SwiperItem.defaultProps = defaultProps$r;
18336
+ SwiperItem.defaultProps = defaultProps$t;
18237
18337
  SwiperItem.displayName = "NutSwiperItem";
18238
18338
  const AvatarContext = React.createContext({});
18239
- const defaultProps$q = {
18339
+ const defaultProps$s = {
18240
18340
  ...ComponentDefaults,
18241
18341
  size: "",
18242
18342
  icon: "",
@@ -18269,7 +18369,7 @@
18269
18369
  iconFontClassName,
18270
18370
  ...rest
18271
18371
  } = {
18272
- ...defaultProps$q,
18372
+ ...defaultProps$s,
18273
18373
  ...props
18274
18374
  };
18275
18375
  const [maxSum, setMaxSum] = React.useState(0);
@@ -18352,9 +18452,9 @@
18352
18452
  className: "text"
18353
18453
  }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}`)));
18354
18454
  };
18355
- Avatar.defaultProps = defaultProps$q;
18455
+ Avatar.defaultProps = defaultProps$s;
18356
18456
  Avatar.displayName = "NutAvatar";
18357
- const defaultProps$p = {
18457
+ const defaultProps$r = {
18358
18458
  maxContent: "",
18359
18459
  maxCount: "",
18360
18460
  maxBgColor: "#eee",
@@ -18366,7 +18466,7 @@
18366
18466
  };
18367
18467
  const AvatarGroup = (props) => {
18368
18468
  useConfig();
18369
- const propAvatarGroup = { ...defaultProps$p, ...props };
18469
+ const propAvatarGroup = { ...defaultProps$r, ...props };
18370
18470
  const { className, style, children } = propAvatarGroup;
18371
18471
  const avatarGroupRef = React.useRef(null);
18372
18472
  const b2 = cn("avatar-group");
@@ -18383,9 +18483,9 @@
18383
18483
  ref: avatarGroupRef
18384
18484
  }, children));
18385
18485
  };
18386
- AvatarGroup.defaultProps = defaultProps$p;
18486
+ AvatarGroup.defaultProps = defaultProps$r;
18387
18487
  AvatarGroup.displayName = "NutAvatarGroup";
18388
- const defaultProps$o = {
18488
+ const defaultProps$q = {
18389
18489
  price: 0,
18390
18490
  needSymbol: true,
18391
18491
  symbol: "&yen;",
@@ -18407,7 +18507,7 @@
18407
18507
  className,
18408
18508
  ...rest
18409
18509
  } = {
18410
- ...defaultProps$o,
18510
+ ...defaultProps$q,
18411
18511
  ...props
18412
18512
  };
18413
18513
  const b2 = cn("price");
@@ -18463,9 +18563,9 @@
18463
18563
  className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
18464
18564
  }, formatDecimal(price)), needSymbol && position === "after" ? renderSymbol() : null);
18465
18565
  };
18466
- Price.defaultProps = defaultProps$o;
18566
+ Price.defaultProps = defaultProps$q;
18467
18567
  Price.displayName = "NutPrice";
18468
- const defaultProps$n = {
18568
+ const defaultProps$p = {
18469
18569
  ...ComponentDefaults,
18470
18570
  value: "",
18471
18571
  dot: false,
@@ -18490,7 +18590,7 @@
18490
18590
  iconClassPrefix,
18491
18591
  iconFontClassName
18492
18592
  } = {
18493
- ...defaultProps$n,
18593
+ ...defaultProps$p,
18494
18594
  ...props
18495
18595
  };
18496
18596
  function content() {
@@ -18528,9 +18628,9 @@
18528
18628
  style: getStyle()
18529
18629
  }, content()));
18530
18630
  };
18531
- Badge.defaultProps = defaultProps$n;
18631
+ Badge.defaultProps = defaultProps$p;
18532
18632
  Badge.displayName = "NutBadge";
18533
- const defaultProps$m = {
18633
+ const defaultProps$o = {
18534
18634
  ...ComponentDefaults,
18535
18635
  type: "default",
18536
18636
  color: "",
@@ -18563,7 +18663,7 @@
18563
18663
  iconClassPrefix,
18564
18664
  iconFontClassName
18565
18665
  } = {
18566
- ...defaultProps$m,
18666
+ ...defaultProps$o,
18567
18667
  ...props
18568
18668
  };
18569
18669
  const [btnName, setBtnName] = React.useState("");
@@ -18637,7 +18737,7 @@
18637
18737
  className: "text"
18638
18738
  }, children)));
18639
18739
  };
18640
- Tag.defaultProps = defaultProps$m;
18740
+ Tag.defaultProps = defaultProps$o;
18641
18741
  Tag.displayName = "NutTag";
18642
18742
  function fillRef(ref, node) {
18643
18743
  if (typeof ref === "function") {
@@ -18681,7 +18781,7 @@
18681
18781
  return trigger;
18682
18782
  }
18683
18783
  }
18684
- const defaultProps$l = {
18784
+ const defaultProps$n = {
18685
18785
  ...ComponentDefaults,
18686
18786
  list: [],
18687
18787
  theme: "light",
@@ -18710,7 +18810,7 @@
18710
18810
  iconFontClassName,
18711
18811
  ...reset
18712
18812
  } = {
18713
- ...defaultProps$l,
18813
+ ...defaultProps$n,
18714
18814
  ...props
18715
18815
  };
18716
18816
  const goodItem = React.useRef(null);
@@ -18804,9 +18904,9 @@
18804
18904
  style: { background: "transparent" }
18805
18905
  }) : "");
18806
18906
  };
18807
- Popover.defaultProps = defaultProps$l;
18907
+ Popover.defaultProps = defaultProps$n;
18808
18908
  Popover.displayName = "NutPopover";
18809
- const defaultProps$k = {
18909
+ const defaultProps$m = {
18810
18910
  width: "100px",
18811
18911
  height: "100px",
18812
18912
  row: 1,
@@ -18834,7 +18934,7 @@
18834
18934
  avatarShape,
18835
18935
  ...restProps
18836
18936
  } = {
18837
- ...defaultProps$k,
18937
+ ...defaultProps$m,
18838
18938
  ...props
18839
18939
  };
18840
18940
  const b2 = cn("skeleton");
@@ -18889,9 +18989,9 @@
18889
18989
  });
18890
18990
  })))));
18891
18991
  };
18892
- Skeleton.defaultProps = defaultProps$k;
18992
+ Skeleton.defaultProps = defaultProps$m;
18893
18993
  Skeleton.displayName = "NutSkeleton";
18894
- const defaultProps$j = {
18994
+ const defaultProps$l = {
18895
18995
  paused: false,
18896
18996
  startTime: Date.now(),
18897
18997
  endTime: Date.now(),
@@ -18918,7 +19018,7 @@
18918
19018
  onUpdate,
18919
19019
  children,
18920
19020
  ...rest
18921
- } = { ...defaultProps$j, ...props };
19021
+ } = { ...defaultProps$l, ...props };
18922
19022
  const b2 = cn("countdown");
18923
19023
  const [restTimeStamp, setRestTime] = React.useState(0);
18924
19024
  const stateRef = React.useRef({
@@ -19114,9 +19214,9 @@
19114
19214
  }));
19115
19215
  };
19116
19216
  const CountDown = React__default["default"].forwardRef(InternalCountDown);
19117
- CountDown.defaultProps = defaultProps$j;
19217
+ CountDown.defaultProps = defaultProps$l;
19118
19218
  CountDown.displayName = "NutCountDown";
19119
- const defaultProps$i = {
19219
+ const defaultProps$k = {
19120
19220
  style: {},
19121
19221
  activeName: ["0"],
19122
19222
  accordion: false,
@@ -19142,7 +19242,7 @@
19142
19242
  iconColor,
19143
19243
  onChange
19144
19244
  } = {
19145
- ...defaultProps$i,
19245
+ ...defaultProps$k,
19146
19246
  ...props
19147
19247
  };
19148
19248
  const childrenDom = React__default["default"].Children.toArray(children);
@@ -19201,9 +19301,9 @@
19201
19301
  },
19202
19302
  areEqual
19203
19303
  );
19204
- Collapse.defaultProps = defaultProps$i;
19304
+ Collapse.defaultProps = defaultProps$k;
19205
19305
  Collapse.displayName = "NutCollapse";
19206
- const defaultProps$h = {
19306
+ const defaultProps$j = {
19207
19307
  ...ComponentDefaults,
19208
19308
  title: "",
19209
19309
  name: "",
@@ -19242,7 +19342,7 @@
19242
19342
  iconFontClassName,
19243
19343
  ...rest
19244
19344
  } = {
19245
- ...defaultProps$h,
19345
+ ...defaultProps$j,
19246
19346
  ...props
19247
19347
  };
19248
19348
  const [domHeight, setDomHeight] = React.useState(-1);
@@ -19322,9 +19422,9 @@
19322
19422
  className: colBem("content-text")
19323
19423
  }, children)));
19324
19424
  };
19325
- CollapseItem.defaultProps = defaultProps$h;
19425
+ CollapseItem.defaultProps = defaultProps$j;
19326
19426
  CollapseItem.displayName = "NutCollapseItem";
19327
- const defaultProps$g = {
19427
+ const defaultProps$i = {
19328
19428
  maxLen: 0,
19329
19429
  endNumber: "",
19330
19430
  delaySpeed: 300,
@@ -19342,7 +19442,7 @@
19342
19442
  thousands,
19343
19443
  ...reset
19344
19444
  } = {
19345
- ...defaultProps$g,
19445
+ ...defaultProps$i,
19346
19446
  ...props
19347
19447
  };
19348
19448
  const b2 = cn("countup");
@@ -19412,9 +19512,9 @@
19412
19512
  }, item));
19413
19513
  })));
19414
19514
  };
19415
- CountUp.defaultProps = defaultProps$g;
19515
+ CountUp.defaultProps = defaultProps$i;
19416
19516
  CountUp.displayName = "NutCountUp";
19417
- const defaultProps$f = {};
19517
+ const defaultProps$h = {};
19418
19518
  class AnimatingNumbers extends React.Component {
19419
19519
  constructor(props) {
19420
19520
  super(props);
@@ -19426,7 +19526,7 @@
19426
19526
  });
19427
19527
  }
19428
19528
  }
19429
- AnimatingNumbers.defaultProps = defaultProps$f;
19529
+ AnimatingNumbers.defaultProps = defaultProps$h;
19430
19530
  AnimatingNumbers.displayName = "NutAnimatingNumbers";
19431
19531
  AnimatingNumbers.CountUp = CountUp;
19432
19532
  AnimatingNumbers.CountUp = CountUp;
@@ -19435,7 +19535,7 @@
19435
19535
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
19436
19536
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
19437
19537
  };
19438
- const defaultProps$e = {
19538
+ const defaultProps$g = {
19439
19539
  description: "\u65E0\u5185\u5BB9",
19440
19540
  image: "empty",
19441
19541
  imageSize: "",
@@ -19443,9 +19543,9 @@
19443
19543
  };
19444
19544
  const Empty = (props) => {
19445
19545
  const { locale } = useConfig();
19446
- defaultProps$e.description = locale.noData || defaultProps$e.description;
19546
+ defaultProps$g.description = locale.noData || defaultProps$g.description;
19447
19547
  const { image, imageSize, description, children, className, ...rest } = {
19448
- ...defaultProps$e,
19548
+ ...defaultProps$g,
19449
19549
  ...props
19450
19550
  };
19451
19551
  const [imgStyle, setImgStyle] = React.useState({});
@@ -19487,7 +19587,7 @@
19487
19587
  className: b2("description")
19488
19588
  }, description) : { description }, children));
19489
19589
  };
19490
- Empty.defaultProps = defaultProps$e;
19590
+ Empty.defaultProps = defaultProps$g;
19491
19591
  Empty.displayName = "NutEmpty";
19492
19592
  const initPositinoCache = (reaItemSize, length = 0) => {
19493
19593
  let index = 0;
@@ -19600,7 +19700,7 @@
19600
19700
  }
19601
19701
  });
19602
19702
  };
19603
- const defaultProps$d = {};
19703
+ const defaultProps$f = {};
19604
19704
  const VirtualList = (props) => {
19605
19705
  const {
19606
19706
  sourceData = [],
@@ -19764,9 +19864,9 @@
19764
19864
  }) : data);
19765
19865
  }))));
19766
19866
  };
19767
- VirtualList.defaultProps = defaultProps$d;
19867
+ VirtualList.defaultProps = defaultProps$f;
19768
19868
  VirtualList.displayName = "NutVirtualList";
19769
- const defaultProps$c = {
19869
+ const defaultProps$e = {
19770
19870
  ...ComponentDefaults,
19771
19871
  className: "",
19772
19872
  style: {},
@@ -19778,7 +19878,7 @@
19778
19878
  };
19779
19879
  const Table = (props) => {
19780
19880
  const { locale } = useConfig();
19781
- defaultProps$c.noData = locale.noData;
19881
+ defaultProps$e.noData = locale.noData;
19782
19882
  const {
19783
19883
  children,
19784
19884
  className,
@@ -19794,7 +19894,7 @@
19794
19894
  iconFontClassName,
19795
19895
  ...rest
19796
19896
  } = {
19797
- ...defaultProps$c,
19897
+ ...defaultProps$e,
19798
19898
  ...props
19799
19899
  };
19800
19900
  const [curData, setCurData] = React.useState(data);
@@ -19892,9 +19992,9 @@
19892
19992
  className: "nut-table__nodata__text"
19893
19993
  }, noData))));
19894
19994
  };
19895
- Table.defaultProps = defaultProps$c;
19995
+ Table.defaultProps = defaultProps$e;
19896
19996
  Table.displayName = "NutTable";
19897
- const defaultProps$b = {
19997
+ const defaultProps$d = {
19898
19998
  source: {
19899
19999
  type: {},
19900
20000
  src: ""
@@ -19922,7 +20022,7 @@
19922
20022
  onPlayend,
19923
20023
  ...restProps
19924
20024
  } = {
19925
- ...defaultProps$b,
20025
+ ...defaultProps$d,
19926
20026
  ...props
19927
20027
  };
19928
20028
  const rootRef = React.useRef(null);
@@ -19979,9 +20079,9 @@
19979
20079
  kind: "captions"
19980
20080
  })));
19981
20081
  };
19982
- Video.defaultProps = defaultProps$b;
20082
+ Video.defaultProps = defaultProps$d;
19983
20083
  Video.displayName = "NutVideo";
19984
- const defaultProps$a = {
20084
+ const defaultProps$c = {
19985
20085
  ...ComponentDefaults,
19986
20086
  className: "",
19987
20087
  url: "",
@@ -20026,7 +20126,7 @@
20026
20126
  iconFontClassName,
20027
20127
  ...rest
20028
20128
  } = {
20029
- ...defaultProps$a,
20129
+ ...defaultProps$c,
20030
20130
  ...props
20031
20131
  };
20032
20132
  const [playing, setPlaying] = React.useState(false);
@@ -20222,9 +20322,9 @@
20222
20322
  kind: "captions"
20223
20323
  })));
20224
20324
  };
20225
- Audio.defaultProps = defaultProps$a;
20325
+ Audio.defaultProps = defaultProps$c;
20226
20326
  Audio.displayName = "NutAudio";
20227
- const defaultProps$9 = {
20327
+ const defaultProps$b = {
20228
20328
  images: [],
20229
20329
  videos: [],
20230
20330
  show: false,
@@ -20416,8 +20516,208 @@
20416
20516
  className: "nut-imagepreview-index"
20417
20517
  }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
20418
20518
  };
20419
- ImagePreview.defaultProps = defaultProps$9;
20519
+ ImagePreview.defaultProps = defaultProps$b;
20420
20520
  ImagePreview.displayName = "NutImagePreview";
20521
+ const defaultProps$a = {
20522
+ rate: 0,
20523
+ digits: 2,
20524
+ showSign: false,
20525
+ showZero: false,
20526
+ arrowLeft: false,
20527
+ syncTextColor: true,
20528
+ textColor: "#333",
20529
+ riseColor: "#fa2c19",
20530
+ dropColor: "#64b578",
20531
+ iconSize: "12px",
20532
+ upIconName: "triangle-up",
20533
+ downIconName: "triangle-down",
20534
+ className: ""
20535
+ };
20536
+ const TrendArrow = (props) => {
20537
+ const {
20538
+ rate,
20539
+ digits,
20540
+ showSign,
20541
+ showZero,
20542
+ arrowLeft,
20543
+ syncTextColor,
20544
+ textColor,
20545
+ riseColor,
20546
+ dropColor,
20547
+ iconSize,
20548
+ upIconName,
20549
+ downIconName,
20550
+ className,
20551
+ children,
20552
+ ...rest
20553
+ } = { ...defaultProps$a, ...props };
20554
+ const b2 = cn("trendarrow");
20555
+ const handleClick2 = () => {
20556
+ };
20557
+ const rateTrend = React.useRef(rate > 0);
20558
+ const myFixed = (num, digit = 2) => {
20559
+ if (Object.is(parseFloat(num), NaN)) {
20560
+ return console.log(`\u4F20\u5165\u7684\u503C\uFF1A${num}\u4E0D\u662F\u4E00\u4E2A\u6570\u5B57`);
20561
+ }
20562
+ num = parseFloat(num);
20563
+ const numPow = Math.pow(10, digit);
20564
+ return (Math.round((num + Number.EPSILON) * numPow) / numPow).toFixed(digit);
20565
+ };
20566
+ const calcStyle = (() => {
20567
+ const arrowColor = rateTrend.current ? riseColor : dropColor;
20568
+ const textEquArrowColor = syncTextColor ? arrowColor : textColor;
20569
+ const style = {
20570
+ color: rate === 0 ? textColor : textEquArrowColor
20571
+ };
20572
+ return style;
20573
+ })();
20574
+ const calcRate = (() => {
20575
+ rateTrend.current = rate > 0;
20576
+ const absRate = Math.abs(rate);
20577
+ if (!showZero && rate === 0) {
20578
+ return "--";
20579
+ }
20580
+ const resultRate = `${showSign && rate !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
20581
+ return resultRate;
20582
+ })();
20583
+ const calcIconProps = (() => {
20584
+ const iconProps = {
20585
+ name: rateTrend.current ? upIconName : downIconName,
20586
+ color: rateTrend.current ? riseColor : dropColor,
20587
+ size: iconSize
20588
+ };
20589
+ return iconProps;
20590
+ })();
20591
+ const renderContent = (arrowLeft2) => {
20592
+ const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
20593
+ return /* @__PURE__ */ React__default["default"].createElement("span", {
20594
+ className: `${b2(classNameSuffix)} ${b2("rate")}`,
20595
+ style: calcStyle
20596
+ }, calcRate);
20597
+ };
20598
+ return /* @__PURE__ */ React__default["default"].createElement("div", {
20599
+ className: `${b2()} ${className}`,
20600
+ ...rest,
20601
+ onClick: handleClick2
20602
+ }, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
20603
+ size: calcIconProps.size,
20604
+ name: calcIconProps.name,
20605
+ color: calcIconProps.color
20606
+ })), arrowLeft && renderContent(!arrowLeft));
20607
+ };
20608
+ TrendArrow.defaultProps = defaultProps$a;
20609
+ TrendArrow.displayName = "NutTrendArrow";
20610
+ const defaultProps$9 = {
20611
+ content: "",
20612
+ fullPage: true,
20613
+ zIndex: 2e3,
20614
+ gapX: 24,
20615
+ gapY: 48,
20616
+ width: 120,
20617
+ height: 64,
20618
+ image: "",
20619
+ imageWidth: 120,
20620
+ imageHeight: 64,
20621
+ rotate: -22,
20622
+ fontColor: "rgba(0,0,0,.15)",
20623
+ fontStyle: "normal",
20624
+ fontFamily: "PingFang SC",
20625
+ fontWeight: "normal",
20626
+ fontSize: 14
20627
+ };
20628
+ const WaterMark = (props) => {
20629
+ const { locale } = useConfig();
20630
+ const {
20631
+ content,
20632
+ fullPage,
20633
+ zIndex,
20634
+ className,
20635
+ gapX,
20636
+ gapY,
20637
+ width,
20638
+ height,
20639
+ image,
20640
+ imageWidth,
20641
+ imageHeight,
20642
+ rotate,
20643
+ fontColor,
20644
+ fontStyle,
20645
+ fontFamily,
20646
+ fontWeight,
20647
+ fontSize,
20648
+ style,
20649
+ children
20650
+ } = {
20651
+ ...defaultProps$9,
20652
+ ...props
20653
+ };
20654
+ const [base64Url, setBase64Url] = React.useState("");
20655
+ const b2 = cn("watermark");
20656
+ const classes = classNames({
20657
+ [`${b2("")}`]: true,
20658
+ [`${b2("")}-full-page`]: fullPage
20659
+ });
20660
+ const cls = classNames(classes, className);
20661
+ React.useEffect(() => {
20662
+ init();
20663
+ }, []);
20664
+ const init = () => {
20665
+ const canvas = document.createElement("canvas");
20666
+ const ratio = window.devicePixelRatio;
20667
+ const ctx2 = canvas.getContext("2d");
20668
+ const canvasWidth = `${(gapX + width) * ratio}px`;
20669
+ const canvasHeight = `${(gapY + height) * ratio}px`;
20670
+ const markWidth = width * ratio;
20671
+ const markHeight = height * ratio;
20672
+ canvas.setAttribute("width", canvasWidth);
20673
+ canvas.setAttribute("height", canvasHeight);
20674
+ if (ctx2) {
20675
+ if (image) {
20676
+ ctx2.translate(markWidth / 2, markHeight / 2);
20677
+ ctx2.rotate(Math.PI / 180 * Number(rotate));
20678
+ const img = new Image();
20679
+ img.crossOrigin = "anonymous";
20680
+ img.referrerPolicy = "no-referrer";
20681
+ img.src = image;
20682
+ img.onload = () => {
20683
+ ctx2.drawImage(
20684
+ img,
20685
+ -imageWidth * ratio / 2,
20686
+ -imageHeight * ratio / 2,
20687
+ imageWidth * ratio,
20688
+ imageHeight * ratio
20689
+ );
20690
+ ctx2.restore();
20691
+ setBase64Url(canvas.toDataURL());
20692
+ };
20693
+ } else if (content) {
20694
+ ctx2.textBaseline = "middle";
20695
+ ctx2.textAlign = "center";
20696
+ ctx2.translate(markWidth / 2, markHeight / 2);
20697
+ ctx2.rotate(Math.PI / 180 * Number(rotate));
20698
+ const markSize = Number(fontSize) * ratio;
20699
+ ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
20700
+ ctx2.fillStyle = fontColor;
20701
+ ctx2.fillText(content, 0, 0);
20702
+ ctx2.restore();
20703
+ setBase64Url(canvas.toDataURL());
20704
+ }
20705
+ } else {
20706
+ throw new Error(locale.watermark.errorCanvasTips);
20707
+ }
20708
+ };
20709
+ return /* @__PURE__ */ React__default["default"].createElement("div", {
20710
+ className: cls,
20711
+ style: {
20712
+ zIndex,
20713
+ backgroundSize: `${gapX + width}px`,
20714
+ backgroundImage: `url('${base64Url}')`,
20715
+ ...style
20716
+ }
20717
+ });
20718
+ };
20719
+ WaterMark.defaultProps = defaultProps$9;
20720
+ WaterMark.displayName = "NutWaterMark";
20421
20721
  const defaultProps$8 = {
20422
20722
  type: "custom",
20423
20723
  existAddress: [],
@@ -21517,6 +21817,7 @@
21517
21817
  exports2.Grid = Grid;
21518
21818
  exports2.GridItem = GridItem;
21519
21819
  exports2.Icon = Icon$1;
21820
+ exports2.Image = Image$1;
21520
21821
  exports2.ImagePreview = ImagePreview;
21521
21822
  exports2.Indicator = Indicator;
21522
21823
  exports2.Infiniteloading = Infiniteloading;
@@ -21567,8 +21868,10 @@
21567
21868
  exports2.TimePannel = TimePannel;
21568
21869
  exports2.TimeSelect = TimeSelect;
21569
21870
  exports2.Toast = Toast;
21871
+ exports2.TrendArrow = TrendArrow;
21570
21872
  exports2.Uploader = Uploader;
21571
21873
  exports2.Video = Video;
21572
21874
  exports2.VirtualList = VirtualList;
21875
+ exports2.WaterMark = WaterMark;
21573
21876
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
21574
21877
  });