@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
  */
@@ -45,7 +45,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
45
45
  classname.exports = classname_production_min;
46
46
  }
47
47
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
48
- const defaultProps$1n = {
48
+ const defaultProps$1q = {
49
49
  name: "",
50
50
  size: "",
51
51
  classPrefix: "nut-icon",
@@ -73,7 +73,7 @@ function Icon$1(props) {
73
73
  onClick,
74
74
  ...rest
75
75
  } = {
76
- ...defaultProps$1n,
76
+ ...defaultProps$1q,
77
77
  ...props
78
78
  };
79
79
  const isImage = name ? name.indexOf("/") !== -1 : false;
@@ -107,13 +107,13 @@ function Icon$1(props) {
107
107
  children
108
108
  );
109
109
  }
110
- Icon$1.defaultProps = defaultProps$1n;
110
+ Icon$1.defaultProps = defaultProps$1q;
111
111
  Icon$1.displayName = "NutIcon";
112
112
  const ComponentDefaults = {
113
113
  iconClassPrefix: "nut-icon",
114
114
  iconFontClassName: "nutui-iconfont"
115
115
  };
116
- const defaultProps$1m = {
116
+ const defaultProps$1p = {
117
117
  ...ComponentDefaults,
118
118
  className: "",
119
119
  color: "",
@@ -149,7 +149,7 @@ const Button = (props) => {
149
149
  iconFontClassName,
150
150
  ...rest
151
151
  } = {
152
- ...defaultProps$1m,
152
+ ...defaultProps$1p,
153
153
  ...props
154
154
  };
155
155
  const getStyle = useCallback(() => {
@@ -227,7 +227,7 @@ const Button = (props) => {
227
227
  className: icon || loading ? "text" : ""
228
228
  }, children)));
229
229
  };
230
- Button.defaultProps = defaultProps$1m;
230
+ Button.defaultProps = defaultProps$1p;
231
231
  Button.displayName = "NutButton";
232
232
  function _setPrototypeOf$1(o, p2) {
233
233
  _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
@@ -1452,7 +1452,7 @@ var useContext = React__default.useContext;
1452
1452
  function useHistory() {
1453
1453
  return useContext(historyContext);
1454
1454
  }
1455
- const defaultProps$1l = {
1455
+ const defaultProps$1o = {
1456
1456
  ...ComponentDefaults,
1457
1457
  title: null,
1458
1458
  subTitle: null,
@@ -1498,7 +1498,7 @@ const Cell = (props) => {
1498
1498
  iconFontClassName,
1499
1499
  ...rest
1500
1500
  } = {
1501
- ...defaultProps$1l,
1501
+ ...defaultProps$1o,
1502
1502
  ...props
1503
1503
  };
1504
1504
  const b2 = cn("cell");
@@ -1552,9 +1552,9 @@ const Cell = (props) => {
1552
1552
  className: b2("link")
1553
1553
  }) : linkSlot));
1554
1554
  };
1555
- Cell.defaultProps = defaultProps$1l;
1555
+ Cell.defaultProps = defaultProps$1o;
1556
1556
  Cell.displayName = "NutCell";
1557
- const defaultProps$1k = {
1557
+ const defaultProps$1n = {
1558
1558
  title: "",
1559
1559
  desc: "",
1560
1560
  className: "",
@@ -1563,7 +1563,7 @@ const defaultProps$1k = {
1563
1563
  };
1564
1564
  const CellGroup = (props) => {
1565
1565
  const { children, className, title, desc, titleSlot, descSlot } = {
1566
- ...defaultProps$1k,
1566
+ ...defaultProps$1n,
1567
1567
  ...props
1568
1568
  };
1569
1569
  const b2 = cn("cell-group");
@@ -1577,7 +1577,7 @@ const CellGroup = (props) => {
1577
1577
  className: b2("wrap")
1578
1578
  }, children));
1579
1579
  };
1580
- CellGroup.defaultProps = defaultProps$1k;
1580
+ CellGroup.defaultProps = defaultProps$1n;
1581
1581
  CellGroup.displayName = "NutCellGroup";
1582
1582
  var classnames = { exports: {} };
1583
1583
  /*!
@@ -2130,7 +2130,7 @@ CSSTransition.defaultProps = {
2130
2130
  };
2131
2131
  CSSTransition.propTypes = {};
2132
2132
  var CSSTransition$1 = CSSTransition;
2133
- const defaultProps$1j = {
2133
+ const defaultProps$1m = {
2134
2134
  ...ComponentDefaults,
2135
2135
  position: "center",
2136
2136
  transition: "",
@@ -2316,7 +2316,7 @@ const Popup = (props) => {
2316
2316
  }, [position]);
2317
2317
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
2318
2318
  };
2319
- Popup.defaultProps = defaultProps$1j;
2319
+ Popup.defaultProps = defaultProps$1m;
2320
2320
  Popup.displayName = "NutPopup";
2321
2321
  const zhCN = {
2322
2322
  save: "\u4FDD\u5B58",
@@ -2441,9 +2441,12 @@ const zhCN = {
2441
2441
  canReleaseText: "\u677E\u5F00\u5237\u65B0",
2442
2442
  refreshingText: "\u52A0\u8F7D\u4E2D...",
2443
2443
  completeText: "\u5237\u65B0\u6210\u529F"
2444
+ },
2445
+ watermark: {
2446
+ errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
2444
2447
  }
2445
2448
  };
2446
- const defaultProps$1i = {
2449
+ const defaultProps$1l = {
2447
2450
  locale: zhCN
2448
2451
  };
2449
2452
  const defaultConfigRef = {
@@ -2460,7 +2463,7 @@ const useConfig = () => {
2460
2463
  };
2461
2464
  const ConfigContext = createContext$1(null);
2462
2465
  const ConfigProvider = (props) => {
2463
- const { children, ...config2 } = { ...defaultProps$1i, ...props };
2466
+ const { children, ...config2 } = { ...defaultProps$1l, ...props };
2464
2467
  const parentConfig = useConfig();
2465
2468
  return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
2466
2469
  value: {
@@ -2469,19 +2472,110 @@ const ConfigProvider = (props) => {
2469
2472
  }
2470
2473
  }, children);
2471
2474
  };
2472
- ConfigProvider.defaultProps = defaultProps$1i;
2475
+ ConfigProvider.defaultProps = defaultProps$1l;
2473
2476
  ConfigProvider.displayName = "NutConfigProvider";
2474
- const defaultProps$1h = {};
2477
+ const defaultProps$1k = {
2478
+ fit: "fill",
2479
+ position: "center",
2480
+ alt: "",
2481
+ width: "center",
2482
+ height: "",
2483
+ round: false,
2484
+ showError: true,
2485
+ showLoading: true
2486
+ };
2487
+ const Image$1 = (props) => {
2488
+ useConfig();
2489
+ const {
2490
+ children,
2491
+ className,
2492
+ style,
2493
+ src,
2494
+ fit,
2495
+ position,
2496
+ alt,
2497
+ width,
2498
+ height,
2499
+ round,
2500
+ radius,
2501
+ showError,
2502
+ showLoading,
2503
+ slotError,
2504
+ slotLoding,
2505
+ onClick,
2506
+ onLoad,
2507
+ onError
2508
+ } = { ...defaultProps$1k, ...props };
2509
+ const [loading, setLoading] = useState(true);
2510
+ const [isError, setIsError] = useState(false);
2511
+ useEffect(() => {
2512
+ if (src) {
2513
+ setIsError(false);
2514
+ setLoading(true);
2515
+ }
2516
+ }, [src]);
2517
+ const load = () => {
2518
+ setLoading(false);
2519
+ onLoad && onLoad();
2520
+ };
2521
+ const error = () => {
2522
+ setIsError(true);
2523
+ setLoading(false);
2524
+ onError && onError();
2525
+ };
2526
+ const pxCheck2 = (value) => {
2527
+ return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
2528
+ };
2529
+ const stylebox = {
2530
+ height: height ? pxCheck2(height) : "",
2531
+ width: width ? pxCheck2(width) : "",
2532
+ overflow: radius !== void 0 && radius !== null ? "hidden" : "",
2533
+ borderRadius: radius !== void 0 && radius !== null ? pxCheck2(radius) : ""
2534
+ };
2535
+ const styles = {
2536
+ objectFit: fit,
2537
+ objectPosition: position,
2538
+ ...style
2539
+ };
2540
+ const imageClick = (event) => {
2541
+ onClick && onClick(event);
2542
+ };
2543
+ return /* @__PURE__ */ React__default.createElement("div", {
2544
+ className: `nut-image ${round ? "nut-image-round" : ""} ${className || ""}`,
2545
+ style: stylebox,
2546
+ onClick: (e2) => {
2547
+ imageClick(e2);
2548
+ }
2549
+ }, /* @__PURE__ */ React__default.createElement("img", {
2550
+ className: "nut-img",
2551
+ style: styles,
2552
+ src,
2553
+ alt,
2554
+ onLoad: load,
2555
+ onError: error
2556
+ }), showLoading && loading ? /* @__PURE__ */ React__default.createElement("div", {
2557
+ className: "nut-img-loading"
2558
+ }, slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
2559
+ name: "image"
2560
+ })) : null, showError && isError && !loading ? /* @__PURE__ */ React__default.createElement("div", {
2561
+ className: "nut-img-error"
2562
+ }, slotError || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
2563
+ name: "image-error"
2564
+ })) : null);
2565
+ };
2566
+ Image$1.defaultProps = defaultProps$1k;
2567
+ Image$1.displayName = "NutImage";
2568
+ const defaultProps$1j = {};
2475
2569
  const Layout = (props) => {
2476
- ({ ...defaultProps$1h, ...props });
2570
+ ({ ...defaultProps$1j, ...props });
2477
2571
  return /* @__PURE__ */ React__default.createElement("div", {
2478
2572
  className: "nut-layout"
2479
2573
  }, "Layout");
2480
2574
  };
2481
- Layout.defaultProps = defaultProps$1h;
2575
+ Layout.defaultProps = defaultProps$1j;
2482
2576
  Layout.displayName = "NutLayout";
2483
2577
  const DataContext$2 = createContext$1({});
2484
- const defaultProps$1g = {
2578
+ const defaultProps$1i = {
2485
2579
  span: "24",
2486
2580
  offset: "0",
2487
2581
  gutter: "0"
@@ -2494,7 +2588,7 @@ const Col = (props) => {
2494
2588
  offset,
2495
2589
  children,
2496
2590
  onClick
2497
- } = { ...defaultProps$1g, ...props };
2591
+ } = { ...defaultProps$1i, ...props };
2498
2592
  const [colName, setColName] = useState("");
2499
2593
  const [colStyle, setColStyle] = useState({});
2500
2594
  const { gutter } = useContext$1(DataContext$2);
@@ -2520,9 +2614,9 @@ const Col = (props) => {
2520
2614
  }
2521
2615
  }, children);
2522
2616
  };
2523
- Col.defaultProps = defaultProps$1g;
2617
+ Col.defaultProps = defaultProps$1i;
2524
2618
  Col.displayName = "NutCol";
2525
- const defaultProps$1f = {
2619
+ const defaultProps$1h = {
2526
2620
  type: "",
2527
2621
  justify: "start",
2528
2622
  align: "flex-start",
@@ -2541,7 +2635,7 @@ const Row = (props) => {
2541
2635
  gutter,
2542
2636
  onClick
2543
2637
  } = {
2544
- ...defaultProps$1f,
2638
+ ...defaultProps$1h,
2545
2639
  ...props
2546
2640
  };
2547
2641
  const prefixCls = "nut-row";
@@ -2576,9 +2670,9 @@ const Row = (props) => {
2576
2670
  children
2577
2671
  ));
2578
2672
  };
2579
- Row.defaultProps = defaultProps$1f;
2673
+ Row.defaultProps = defaultProps$1h;
2580
2674
  Row.displayName = "NutRow";
2581
- const defaultProps$1e = {
2675
+ const defaultProps$1g = {
2582
2676
  contentPosition: "center",
2583
2677
  dashed: false,
2584
2678
  hairline: true,
@@ -2595,7 +2689,7 @@ const Divider = (props) => {
2595
2689
  direction,
2596
2690
  ...rest
2597
2691
  } = {
2598
- ...defaultProps$1e,
2692
+ ...defaultProps$1g,
2599
2693
  ...props
2600
2694
  };
2601
2695
  const dividerBem = cn("divider");
@@ -2616,9 +2710,9 @@ const Divider = (props) => {
2616
2710
  ...rest
2617
2711
  }, children);
2618
2712
  };
2619
- Divider.defaultProps = defaultProps$1e;
2713
+ Divider.defaultProps = defaultProps$1g;
2620
2714
  Divider.displayName = "NutDivider";
2621
- const defaultProps$1d = {
2715
+ const defaultProps$1f = {
2622
2716
  columnNum: 4,
2623
2717
  border: true,
2624
2718
  gutter: 0,
@@ -2645,7 +2739,7 @@ const Grid = (props) => {
2645
2739
  iconColor,
2646
2740
  className,
2647
2741
  ...rest
2648
- } = { ...defaultProps$1d, ...props };
2742
+ } = { ...defaultProps$1f, ...props };
2649
2743
  const childrenDom = React__default.Children.toArray(children);
2650
2744
  const pxCheck2 = (value) => {
2651
2745
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -2684,9 +2778,9 @@ const Grid = (props) => {
2684
2778
  });
2685
2779
  }));
2686
2780
  };
2687
- Grid.defaultProps = defaultProps$1d;
2781
+ Grid.defaultProps = defaultProps$1f;
2688
2782
  Grid.displayName = "NutGrid";
2689
- const defaultProps$1c = {
2783
+ const defaultProps$1e = {
2690
2784
  ...ComponentDefaults,
2691
2785
  text: "",
2692
2786
  icon: "",
@@ -2725,7 +2819,7 @@ const GridItem = (props) => {
2725
2819
  onClick,
2726
2820
  ...rest
2727
2821
  } = {
2728
- ...defaultProps$1c,
2822
+ ...defaultProps$1e,
2729
2823
  ...props
2730
2824
  };
2731
2825
  const b2 = cn("grid-item");
@@ -2773,7 +2867,7 @@ const GridItem = (props) => {
2773
2867
  className: "nut-grid-item__text"
2774
2868
  }, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
2775
2869
  };
2776
- GridItem.defaultProps = defaultProps$1c;
2870
+ GridItem.defaultProps = defaultProps$1e;
2777
2871
  GridItem.displayName = "NutGridItem";
2778
2872
  const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2779
2873
  const defaultRoot = canUseDom ? window : void 0;
@@ -2987,7 +3081,7 @@ const Sticky = (props) => {
2987
3081
  }, children));
2988
3082
  };
2989
3083
  Sticky.displayName = "NutSticky";
2990
- const defaultProps$1b = {
3084
+ const defaultProps$1d = {
2991
3085
  ...ComponentDefaults,
2992
3086
  title: "",
2993
3087
  desc: "",
@@ -3023,7 +3117,7 @@ const NavBar = (props) => {
3023
3117
  iconClassPrefix,
3024
3118
  iconFontClassName
3025
3119
  } = {
3026
- ...defaultProps$1b,
3120
+ ...defaultProps$1d,
3027
3121
  ...props
3028
3122
  };
3029
3123
  const b2 = cn("navbar");
@@ -3092,9 +3186,9 @@ const NavBar = (props) => {
3092
3186
  className: `${b2("")}--placeholder`
3093
3187
  }, renderWrapper()) : renderWrapper());
3094
3188
  };
3095
- NavBar.defaultProps = defaultProps$1b;
3189
+ NavBar.defaultProps = defaultProps$1d;
3096
3190
  NavBar.displayName = "NutNavBar";
3097
- const defaultProps$1a = {
3191
+ const defaultProps$1c = {
3098
3192
  ...ComponentDefaults,
3099
3193
  fixednavClass: "nut-fixednav",
3100
3194
  activeText: "",
@@ -3124,7 +3218,7 @@ const FixedNav = (props) => {
3124
3218
  iconFontClassName,
3125
3219
  ...rest
3126
3220
  } = {
3127
- ...defaultProps$1a,
3221
+ ...defaultProps$1c,
3128
3222
  ...props
3129
3223
  };
3130
3224
  const b2 = cn("fixednav");
@@ -3179,9 +3273,9 @@ const FixedNav = (props) => {
3179
3273
  className: "text"
3180
3274
  }, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
3181
3275
  };
3182
- FixedNav.defaultProps = defaultProps$1a;
3276
+ FixedNav.defaultProps = defaultProps$1c;
3183
3277
  FixedNav.displayName = "NutFixedNav";
3184
- const defaultProps$19 = {
3278
+ const defaultProps$1b = {
3185
3279
  visible: 0,
3186
3280
  bottom: false,
3187
3281
  size: 20,
@@ -3209,7 +3303,7 @@ const Tabbar = (props) => {
3209
3303
  tabSwitch,
3210
3304
  onSwitch
3211
3305
  } = {
3212
- ...defaultProps$19,
3306
+ ...defaultProps$1b,
3213
3307
  ...props
3214
3308
  };
3215
3309
  const b2 = cn("tabbar");
@@ -3245,9 +3339,9 @@ const Tabbar = (props) => {
3245
3339
  return React__default.cloneElement(child, childProps);
3246
3340
  }));
3247
3341
  };
3248
- Tabbar.defaultProps = defaultProps$19;
3342
+ Tabbar.defaultProps = defaultProps$1b;
3249
3343
  Tabbar.displayName = "NutTabbar";
3250
- const defaultProps$18 = {
3344
+ const defaultProps$1a = {
3251
3345
  ...ComponentDefaults,
3252
3346
  dot: false,
3253
3347
  size: "",
@@ -3283,7 +3377,7 @@ const TabbarItem = (props) => {
3283
3377
  iconClassPrefix,
3284
3378
  iconFontClassName
3285
3379
  } = {
3286
- ...defaultProps$18,
3380
+ ...defaultProps$1a,
3287
3381
  ...props
3288
3382
  };
3289
3383
  const b2 = cn("tabbar-item");
@@ -8339,7 +8433,7 @@ const host = createHost(primitives, {
8339
8433
  });
8340
8434
  const animated = host.animated;
8341
8435
  const elevatorContext = createContext$1({});
8342
- const defaultProps$17 = {
8436
+ const defaultProps$19 = {
8343
8437
  height: "200px",
8344
8438
  acceptKey: "title",
8345
8439
  indexList: [],
@@ -8362,7 +8456,7 @@ const Elevator = (props) => {
8362
8456
  children,
8363
8457
  ...rest
8364
8458
  } = {
8365
- ...defaultProps$17,
8459
+ ...defaultProps$19,
8366
8460
  ...props
8367
8461
  };
8368
8462
  const b2 = cn("elevator");
@@ -8549,9 +8643,9 @@ const Elevator = (props) => {
8549
8643
  }, item[acceptKey]);
8550
8644
  }))));
8551
8645
  };
8552
- Elevator.defaultProps = defaultProps$17;
8646
+ Elevator.defaultProps = defaultProps$19;
8553
8647
  Elevator.displayName = "NutElevator";
8554
- const defaultProps$16 = {
8648
+ const defaultProps$18 = {
8555
8649
  defaultValue: 1,
8556
8650
  mode: "multi",
8557
8651
  prevText: "",
@@ -8568,7 +8662,7 @@ const defaultProps$16 = {
8568
8662
  };
8569
8663
  const Pagination = (props) => {
8570
8664
  const { locale } = useConfig();
8571
- ({ ...defaultProps$16, ...props });
8665
+ ({ ...defaultProps$18, ...props });
8572
8666
  const {
8573
8667
  modelValue,
8574
8668
  mode,
@@ -8685,7 +8779,7 @@ const Pagination = (props) => {
8685
8779
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
8686
8780
  }, nextText || locale.pagination.next));
8687
8781
  };
8688
- Pagination.defaultProps = defaultProps$16;
8782
+ Pagination.defaultProps = defaultProps$18;
8689
8783
  Pagination.displayName = "NutPagination";
8690
8784
  class Title {
8691
8785
  constructor() {
@@ -8695,7 +8789,7 @@ class Title {
8695
8789
  this.index = 0;
8696
8790
  }
8697
8791
  }
8698
- const defaultProps$15 = {
8792
+ const defaultProps$17 = {
8699
8793
  ...ComponentDefaults,
8700
8794
  tabStyle: {},
8701
8795
  value: 0,
@@ -8736,7 +8830,7 @@ const Tabs = (props) => {
8736
8830
  iconFontClassName,
8737
8831
  ...rest
8738
8832
  } = {
8739
- ...defaultProps$15,
8833
+ ...defaultProps$17,
8740
8834
  ...props
8741
8835
  };
8742
8836
  const [currentItem, setCurrentItem] = useState({ index: 0 });
@@ -8854,9 +8948,9 @@ const Tabs = (props) => {
8854
8948
  return React__default.cloneElement(child, childProps);
8855
8949
  }))));
8856
8950
  };
8857
- Tabs.defaultProps = defaultProps$15;
8951
+ Tabs.defaultProps = defaultProps$17;
8858
8952
  Tabs.displayName = "NutTabs";
8859
- const defaultProps$14 = {
8953
+ const defaultProps$16 = {
8860
8954
  title: "",
8861
8955
  paneKey: "",
8862
8956
  activeKey: "",
@@ -8864,7 +8958,7 @@ const defaultProps$14 = {
8864
8958
  };
8865
8959
  const TabPane = (props) => {
8866
8960
  const { children, paneKey, activeKey, autoHeightClassName, className } = {
8867
- ...defaultProps$14,
8961
+ ...defaultProps$16,
8868
8962
  ...props
8869
8963
  };
8870
8964
  const b2 = cn("tabpane");
@@ -8880,7 +8974,7 @@ const TabPane = (props) => {
8880
8974
  className: classes
8881
8975
  }, children);
8882
8976
  };
8883
- const defaultProps$13 = {
8977
+ const defaultProps$15 = {
8884
8978
  size: 3,
8885
8979
  current: 1,
8886
8980
  block: false,
@@ -8900,7 +8994,7 @@ const Indicator = (props) => {
8900
8994
  vertical,
8901
8995
  ...rest
8902
8996
  } = {
8903
- ...defaultProps$13,
8997
+ ...defaultProps$15,
8904
8998
  ...props
8905
8999
  };
8906
9000
  const b2 = cn("indicator");
@@ -8934,7 +9028,7 @@ const Indicator = (props) => {
8934
9028
  ...rest
8935
9029
  }, renderEles());
8936
9030
  };
8937
- Indicator.defaultProps = defaultProps$13;
9031
+ Indicator.defaultProps = defaultProps$15;
8938
9032
  Indicator.displayName = "NutIndicator";
8939
9033
  const handleClick = (e2) => {
8940
9034
  e2.stopPropagation();
@@ -8950,7 +9044,7 @@ const handleClick = (e2) => {
8950
9044
  }
8951
9045
  };
8952
9046
  const OffsetContext = createContext$1(20);
8953
- const defaultProps$12 = {
9047
+ const defaultProps$14 = {
8954
9048
  showhead: false,
8955
9049
  position: "left",
8956
9050
  width: "80%"
@@ -8968,7 +9062,7 @@ const SideNavBar = (props) => {
8968
9062
  onClose,
8969
9063
  ...rest
8970
9064
  } = {
8971
- ...defaultProps$12,
9065
+ ...defaultProps$14,
8972
9066
  ...props
8973
9067
  };
8974
9068
  const offset = props.offset ? Number(props.offset) : 20;
@@ -8996,14 +9090,14 @@ const SideNavBar = (props) => {
8996
9090
  className: "nut-sidenavbar__content"
8997
9091
  }, children))))));
8998
9092
  };
8999
- SideNavBar.defaultProps = defaultProps$12;
9093
+ SideNavBar.defaultProps = defaultProps$14;
9000
9094
  SideNavBar.displayName = "NutSideNavBar";
9001
- const defaultProps$11 = {
9095
+ const defaultProps$13 = {
9002
9096
  open: true
9003
9097
  };
9004
9098
  const SubSideNavBar = (props) => {
9005
9099
  const { title, ikey, children, onClick, open, ...rest } = {
9006
- ...defaultProps$11,
9100
+ ...defaultProps$13,
9007
9101
  ...props
9008
9102
  };
9009
9103
  const offset = useContext$1(OffsetContext);
@@ -9074,7 +9168,7 @@ const SideNavBarItem = (props) => {
9074
9168
  ...rest
9075
9169
  }, title);
9076
9170
  };
9077
- const defaultProps$10 = {
9171
+ const defaultProps$12 = {
9078
9172
  ...ComponentDefaults,
9079
9173
  className: "",
9080
9174
  style: {},
@@ -9097,7 +9191,7 @@ const Menu = (props) => {
9097
9191
  iconFontClassName,
9098
9192
  ...rest
9099
9193
  } = {
9100
- ...defaultProps$10,
9194
+ ...defaultProps$12,
9101
9195
  ...props
9102
9196
  };
9103
9197
  const parentRef = useRef(null);
@@ -9202,9 +9296,9 @@ const Menu = (props) => {
9202
9296
  })));
9203
9297
  })), cloneChildren()));
9204
9298
  };
9205
- Menu.defaultProps = defaultProps$10;
9299
+ Menu.defaultProps = defaultProps$12;
9206
9300
  Menu.displayName = "NutMenu";
9207
- const defaultProps$$ = {
9301
+ const defaultProps$11 = {
9208
9302
  ...ComponentDefaults,
9209
9303
  className: "",
9210
9304
  style: {},
@@ -9219,7 +9313,7 @@ const defaultProps$$ = {
9219
9313
  };
9220
9314
  const MenuItem = forwardRef((props, ref) => {
9221
9315
  useConfig();
9222
- const mergedProps = { ...defaultProps$$, ...props };
9316
+ const mergedProps = { ...defaultProps$11, ...props };
9223
9317
  const {
9224
9318
  style,
9225
9319
  options: options2,
@@ -9235,7 +9329,7 @@ const MenuItem = forwardRef((props, ref) => {
9235
9329
  iconClassPrefix,
9236
9330
  iconFontClassName
9237
9331
  } = {
9238
- ...defaultProps$$,
9332
+ ...defaultProps$11,
9239
9333
  ...props
9240
9334
  };
9241
9335
  const { activeColor, showPopup, parent, orderKey } = mergedProps;
@@ -9356,7 +9450,7 @@ const MenuItem = forwardRef((props, ref) => {
9356
9450
  }, item.text));
9357
9451
  }), children))));
9358
9452
  });
9359
- MenuItem.defaultProps = defaultProps$$;
9453
+ MenuItem.defaultProps = defaultProps$11;
9360
9454
  MenuItem.displayName = "NutMenuItem";
9361
9455
  const MIN_DISTANCE = 10;
9362
9456
  function getDirection(x2, y2) {
@@ -9654,7 +9748,7 @@ var Toast = {
9654
9748
  }
9655
9749
  }
9656
9750
  };
9657
- const defaultProps$_ = {
9751
+ const defaultProps$10 = {
9658
9752
  range: false,
9659
9753
  hiddenRange: false,
9660
9754
  hiddenTag: false,
@@ -9691,8 +9785,8 @@ const Range = (props) => {
9691
9785
  minDesc,
9692
9786
  maxDesc,
9693
9787
  curValueDesc
9694
- } = { ...defaultProps$_, ...props };
9695
- let { min, max, step } = { ...defaultProps$_, ...props };
9788
+ } = { ...defaultProps$10, ...props };
9789
+ let { min, max, step } = { ...defaultProps$10, ...props };
9696
9790
  min = Number(min);
9697
9791
  max = Number(max);
9698
9792
  step = Number(step);
@@ -10030,7 +10124,7 @@ const Range = (props) => {
10030
10124
  className: "max"
10031
10125
  }, maxDesc || +max) : null);
10032
10126
  };
10033
- Range.defaultProps = defaultProps$_;
10127
+ Range.defaultProps = defaultProps$10;
10034
10128
  Range.displayName = "NutRange";
10035
10129
  const Utils = {
10036
10130
  isLeapYear(y2) {
@@ -10124,7 +10218,7 @@ function requestAniFrame() {
10124
10218
  };
10125
10219
  }
10126
10220
  var requestAniFrame$1 = requestAniFrame();
10127
- const defaultProps$Z = {
10221
+ const defaultProps$$ = {
10128
10222
  type: "one",
10129
10223
  isAutoBackFill: false,
10130
10224
  poppable: true,
@@ -10173,7 +10267,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
10173
10267
  onChoose,
10174
10268
  onUpdate,
10175
10269
  onSelected
10176
- } = { ...defaultProps$Z, ...props };
10270
+ } = { ...defaultProps$$, ...props };
10177
10271
  const weeks = locale.calendaritem.weekdays;
10178
10272
  const [yearMonthTitle, setYearMonthTitle] = useState("");
10179
10273
  const [monthsData, setMonthsData] = useState([]);
@@ -10760,9 +10854,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
10760
10854
  onClick: confirm2
10761
10855
  }, confirmText || locale.confirm)) : ""));
10762
10856
  });
10763
- CalendarItem.defaultProps = defaultProps$Z;
10857
+ CalendarItem.defaultProps = defaultProps$$;
10764
10858
  CalendarItem.displayName = "NutCalendarItem";
10765
- const defaultProps$Y = {
10859
+ const defaultProps$_ = {
10766
10860
  type: "one",
10767
10861
  isAutoBackFill: false,
10768
10862
  poppable: true,
@@ -10814,7 +10908,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
10814
10908
  onClose,
10815
10909
  onChoose,
10816
10910
  onSelected
10817
- } = { ...defaultProps$Y, ...props };
10911
+ } = { ...defaultProps$_, ...props };
10818
10912
  const calendarRef = useRef(null);
10819
10913
  const close = () => {
10820
10914
  onClose && onClose();
@@ -10873,9 +10967,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
10873
10967
  style: { height: "85vh" }
10874
10968
  }, renderItem()) : renderItem());
10875
10969
  });
10876
- Calendar.defaultProps = defaultProps$Y;
10970
+ Calendar.defaultProps = defaultProps$_;
10877
10971
  Calendar.displayName = "NutCalendar";
10878
- const defaultProps$X = {
10972
+ const defaultProps$Z = {
10879
10973
  disabled: false,
10880
10974
  checkedValue: [],
10881
10975
  max: void 0,
@@ -10885,7 +10979,7 @@ const defaultProps$X = {
10885
10979
  };
10886
10980
  const CheckboxGroup = React__default.forwardRef(
10887
10981
  (props, ref) => {
10888
- const { children } = { ...defaultProps$X, ...props };
10982
+ const { children } = { ...defaultProps$Z, ...props };
10889
10983
  const b2 = cn("checkboxgroup");
10890
10984
  const {
10891
10985
  className,
@@ -10992,9 +11086,9 @@ const CheckboxGroup = React__default.forwardRef(
10992
11086
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren());
10993
11087
  }
10994
11088
  );
10995
- CheckboxGroup.defaultProps = defaultProps$X;
11089
+ CheckboxGroup.defaultProps = defaultProps$Z;
10996
11090
  CheckboxGroup.displayName = "NutCheckboxGroup";
10997
- const defaultProps$W = {
11091
+ const defaultProps$Y = {
10998
11092
  ...ComponentDefaults,
10999
11093
  checked: false,
11000
11094
  disabled: false,
@@ -11010,7 +11104,7 @@ const defaultProps$W = {
11010
11104
  };
11011
11105
  const Checkbox = (props) => {
11012
11106
  const { children } = {
11013
- ...defaultProps$W,
11107
+ ...defaultProps$Y,
11014
11108
  ...props
11015
11109
  };
11016
11110
  const b2 = cn("checkbox");
@@ -11092,7 +11186,7 @@ const Checkbox = (props) => {
11092
11186
  onClick: handleClick2
11093
11187
  }, renderIcon(), renderLabel());
11094
11188
  };
11095
- Checkbox.defaultProps = defaultProps$W;
11189
+ Checkbox.defaultProps = defaultProps$Y;
11096
11190
  Checkbox.displayName = "NutCheckBox";
11097
11191
  Checkbox.Group = CheckboxGroup;
11098
11192
  const InternalPickerSlot = (props, ref) => {
@@ -11517,7 +11611,7 @@ const InternalPicker = (props, ref) => {
11517
11611
  };
11518
11612
  const Picker = React__default.forwardRef(InternalPicker);
11519
11613
  const currentYear = new Date().getFullYear();
11520
- const defaultProps$V = {
11614
+ const defaultProps$X = {
11521
11615
  modelValue: null,
11522
11616
  visible: false,
11523
11617
  title: "",
@@ -11548,7 +11642,7 @@ const DatePicker = (props) => {
11548
11642
  style,
11549
11643
  ...rest
11550
11644
  } = {
11551
- ...defaultProps$V,
11645
+ ...defaultProps$X,
11552
11646
  ...props
11553
11647
  };
11554
11648
  const { locale } = useConfig();
@@ -11814,9 +11908,9 @@ const DatePicker = (props) => {
11814
11908
  ref: pickerRef
11815
11909
  }));
11816
11910
  };
11817
- DatePicker.defaultProps = defaultProps$V;
11911
+ DatePicker.defaultProps = defaultProps$X;
11818
11912
  DatePicker.displayName = "NutDatePicker";
11819
- const defaultProps$U = {
11913
+ const defaultProps$W = {
11820
11914
  ...ComponentDefaults,
11821
11915
  disabled: false,
11822
11916
  buttonSize: "",
@@ -11863,7 +11957,7 @@ const InputNumber = (props) => {
11863
11957
  iconFontClassName,
11864
11958
  ...restProps
11865
11959
  } = {
11866
- ...defaultProps$U,
11960
+ ...defaultProps$W,
11867
11961
  ...props
11868
11962
  };
11869
11963
  const [inputValue, setInputValue] = useState(modelValue);
@@ -12000,7 +12094,7 @@ const InputNumber = (props) => {
12000
12094
  onClick: addNumber
12001
12095
  }));
12002
12096
  };
12003
- InputNumber.defaultProps = defaultProps$U;
12097
+ InputNumber.defaultProps = defaultProps$W;
12004
12098
  InputNumber.displayName = "NutInputNumber";
12005
12099
  function trimExtraChar(value, char, regExp) {
12006
12100
  const index = value.indexOf(char);
@@ -12026,7 +12120,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
12026
12120
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
12027
12121
  return value.replace(regExp, "");
12028
12122
  }
12029
- const defaultProps$T = {
12123
+ const defaultProps$V = {
12030
12124
  ...ComponentDefaults,
12031
12125
  type: "text",
12032
12126
  name: "",
@@ -12123,7 +12217,7 @@ const Input = forwardRef((props, ref) => {
12123
12217
  iconFontClassName,
12124
12218
  ...rest
12125
12219
  } = {
12126
- ...defaultProps$T,
12220
+ ...defaultProps$V,
12127
12221
  ...props
12128
12222
  };
12129
12223
  locale.placeholder = placeholder || locale.placeholder;
@@ -12354,14 +12448,14 @@ const Input = forwardRef((props, ref) => {
12354
12448
  }
12355
12449
  }, errorMessage) : null)));
12356
12450
  });
12357
- Input.defaultProps = defaultProps$T;
12451
+ Input.defaultProps = defaultProps$V;
12358
12452
  Input.displayName = "NutInput";
12359
12453
  const radioContext = {
12360
12454
  onChange: (val) => {
12361
12455
  }
12362
12456
  };
12363
12457
  var RadioContext = React__default.createContext(radioContext);
12364
- const defaultProps$S = {
12458
+ const defaultProps$U = {
12365
12459
  value: null,
12366
12460
  textPosition: "right",
12367
12461
  onChange: (value) => {
@@ -12371,7 +12465,7 @@ const defaultProps$S = {
12371
12465
  };
12372
12466
  const RadioGroup = React__default.forwardRef(
12373
12467
  (props, ref) => {
12374
- const { children } = { ...defaultProps$S, ...props };
12468
+ const { children } = { ...defaultProps$U, ...props };
12375
12469
  cn("RadioGroup");
12376
12470
  const {
12377
12471
  className,
@@ -12436,9 +12530,9 @@ const RadioGroup = React__default.forwardRef(
12436
12530
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren()));
12437
12531
  }
12438
12532
  );
12439
- RadioGroup.defaultProps = defaultProps$S;
12533
+ RadioGroup.defaultProps = defaultProps$U;
12440
12534
  RadioGroup.displayName = "NutRadioGroup";
12441
- const defaultProps$R = {
12535
+ const defaultProps$T = {
12442
12536
  ...ComponentDefaults,
12443
12537
  className: "",
12444
12538
  style: {},
@@ -12455,7 +12549,7 @@ const defaultProps$R = {
12455
12549
  };
12456
12550
  const Radio = (props) => {
12457
12551
  const { children } = {
12458
- ...defaultProps$R,
12552
+ ...defaultProps$T,
12459
12553
  ...props
12460
12554
  };
12461
12555
  const {
@@ -12535,10 +12629,10 @@ const Radio = (props) => {
12535
12629
  ...rest
12536
12630
  }, renderRadioItem());
12537
12631
  };
12538
- Radio.defaultProps = defaultProps$R;
12632
+ Radio.defaultProps = defaultProps$T;
12539
12633
  Radio.displayName = "NutRadio";
12540
12634
  Radio.RadioGroup = RadioGroup;
12541
- const defaultProps$Q = {
12635
+ const defaultProps$S = {
12542
12636
  ...ComponentDefaults,
12543
12637
  count: 5,
12544
12638
  modelValue: 0,
@@ -12573,7 +12667,7 @@ const Rate = (props) => {
12573
12667
  iconClassPrefix,
12574
12668
  iconFontClassName
12575
12669
  } = {
12576
- ...defaultProps$Q,
12670
+ ...defaultProps$S,
12577
12671
  ...props
12578
12672
  };
12579
12673
  const b2 = cn("rate");
@@ -12646,9 +12740,9 @@ const Rate = (props) => {
12646
12740
  }));
12647
12741
  }));
12648
12742
  };
12649
- Rate.defaultProps = defaultProps$Q;
12743
+ Rate.defaultProps = defaultProps$S;
12650
12744
  Rate.displayName = "NutRate";
12651
- const defaultProps$P = {
12745
+ const defaultProps$R = {
12652
12746
  ...ComponentDefaults,
12653
12747
  title: "",
12654
12748
  desc: "",
@@ -12816,9 +12910,9 @@ const ShortPassword = (props) => {
12816
12910
  onClick: () => sure()
12817
12911
  }, locale.confirm)) : null)));
12818
12912
  };
12819
- ShortPassword.defaultProps = defaultProps$P;
12913
+ ShortPassword.defaultProps = defaultProps$R;
12820
12914
  ShortPassword.displayName = "NutShortPassword";
12821
- const defaultProps$O = {
12915
+ const defaultProps$Q = {
12822
12916
  defaultValue: "",
12823
12917
  textAlign: "left",
12824
12918
  limitshow: false,
@@ -12846,7 +12940,7 @@ const TextArea = (props) => {
12846
12940
  onChange,
12847
12941
  onBlur,
12848
12942
  onFocus
12849
- } = { ...defaultProps$O, ...props };
12943
+ } = { ...defaultProps$Q, ...props };
12850
12944
  const textareaBem = cn("textarea");
12851
12945
  const [inputValue, SetInputValue] = useState("");
12852
12946
  const textareaRef = useRef(null);
@@ -12943,9 +13037,9 @@ const TextArea = (props) => {
12943
13037
  className: textareaBem("limit")
12944
13038
  }, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
12945
13039
  };
12946
- TextArea.defaultProps = defaultProps$O;
13040
+ TextArea.defaultProps = defaultProps$Q;
12947
13041
  TextArea.displayName = "NutTextArea";
12948
- const defaultProps$N = {
13042
+ const defaultProps$P = {
12949
13043
  name: "",
12950
13044
  size: "",
12951
13045
  classPrefix: "nut-icon",
@@ -12973,7 +13067,7 @@ function Icon(props) {
12973
13067
  onClick,
12974
13068
  ...rest
12975
13069
  } = {
12976
- ...defaultProps$N,
13070
+ ...defaultProps$P,
12977
13071
  ...props
12978
13072
  };
12979
13073
  const isImage = name ? name.indexOf("/") !== -1 : false;
@@ -13007,9 +13101,9 @@ function Icon(props) {
13007
13101
  children
13008
13102
  );
13009
13103
  }
13010
- Icon.defaultProps = defaultProps$N;
13104
+ Icon.defaultProps = defaultProps$P;
13011
13105
  Icon.displayName = "NutIcon";
13012
- const defaultProps$M = {
13106
+ const defaultProps$O = {
13013
13107
  ...ComponentDefaults,
13014
13108
  className: "",
13015
13109
  style: {},
@@ -13057,7 +13151,7 @@ const Progress = (props) => {
13057
13151
  iconFontClassName,
13058
13152
  ...rest
13059
13153
  } = {
13060
- ...defaultProps$M,
13154
+ ...defaultProps$O,
13061
13155
  ...props
13062
13156
  };
13063
13157
  const b2 = cn("progress");
@@ -13135,7 +13229,7 @@ const Progress = (props) => {
13135
13229
  color: iconColor
13136
13230
  })));
13137
13231
  };
13138
- Progress.defaultProps = defaultProps$M;
13232
+ Progress.defaultProps = defaultProps$O;
13139
13233
  Progress.displayName = "NutProgress";
13140
13234
  class UploadOptions {
13141
13235
  constructor() {
@@ -13233,7 +13327,7 @@ class Upload {
13233
13327
  }
13234
13328
  }
13235
13329
  }
13236
- const defaultProps$L = {
13330
+ const defaultProps$N = {
13237
13331
  ...ComponentDefaults,
13238
13332
  url: "",
13239
13333
  maximum: 1,
@@ -13313,7 +13407,7 @@ const InternalUploader = (props, ref) => {
13313
13407
  onBeforeXhrUpload,
13314
13408
  onBeforeDelete,
13315
13409
  ...restProps
13316
- } = { ...defaultProps$L, ...props };
13410
+ } = { ...defaultProps$N, ...props };
13317
13411
  const [fileList, setFileList] = useState([]);
13318
13412
  const [uploadQueue, setUploadQueue] = useState([]);
13319
13413
  useEffect(() => {
@@ -13634,9 +13728,9 @@ const InternalUploader = (props, ref) => {
13634
13728
  })));
13635
13729
  };
13636
13730
  const Uploader = React__default.forwardRef(InternalUploader);
13637
- Uploader.defaultProps = defaultProps$L;
13731
+ Uploader.defaultProps = defaultProps$N;
13638
13732
  Uploader.displayName = "NutUploader";
13639
- const defaultProps$K = {
13733
+ const defaultProps$M = {
13640
13734
  data: {
13641
13735
  text: "",
13642
13736
  value: "",
@@ -13645,13 +13739,14 @@ const defaultProps$K = {
13645
13739
  loading: false,
13646
13740
  children: []
13647
13741
  },
13742
+ activeColor: "#fa2c19",
13648
13743
  checked: false,
13649
13744
  chooseItem: () => {
13650
13745
  }
13651
13746
  };
13652
13747
  const InternalCascaderItem = (props) => {
13653
- const { data, checked, chooseItem } = {
13654
- ...defaultProps$K,
13748
+ const { data, checked, chooseItem, activeColor } = {
13749
+ ...defaultProps$M,
13655
13750
  ...props
13656
13751
  };
13657
13752
  const b2 = cn("cascader-item");
@@ -13671,6 +13766,7 @@ const InternalCascaderItem = (props) => {
13671
13766
  const initData = () => {
13672
13767
  };
13673
13768
  return /* @__PURE__ */ React__default.createElement("div", {
13769
+ style: { color: checked ? activeColor : "" },
13674
13770
  className: classes,
13675
13771
  onClick: () => {
13676
13772
  chooseItem(data);
@@ -13687,7 +13783,7 @@ const InternalCascaderItem = (props) => {
13687
13783
  }));
13688
13784
  };
13689
13785
  const CascaderItem = React__default.forwardRef(InternalCascaderItem);
13690
- CascaderItem.defaultProps = defaultProps$K;
13786
+ CascaderItem.defaultProps = defaultProps$M;
13691
13787
  CascaderItem.displayName = "NutCascaderItem";
13692
13788
  const formatTree = (tree, parent, config2) => tree.map((node) => {
13693
13789
  const {
@@ -13821,9 +13917,11 @@ class Tree {
13821
13917
  return pathNodes;
13822
13918
  }
13823
13919
  }
13824
- const defaultProps$J = {
13920
+ const defaultProps$L = {
13825
13921
  className: "",
13826
13922
  style: {},
13923
+ activeColor: "#fa2c19",
13924
+ tabsColor: "",
13827
13925
  poppable: true,
13828
13926
  visible: false,
13829
13927
  options: [],
@@ -13851,6 +13949,7 @@ const InternalCascader = (props) => {
13851
13949
  const {
13852
13950
  className,
13853
13951
  style,
13952
+ tabsColor,
13854
13953
  poppable,
13855
13954
  visible,
13856
13955
  options: options2,
@@ -13868,7 +13967,7 @@ const InternalCascader = (props) => {
13868
13967
  onClose,
13869
13968
  onChange,
13870
13969
  onPathChange
13871
- } = { ...defaultProps$J, ...props };
13970
+ } = { ...defaultProps$L, ...props };
13872
13971
  const [tabvalue, setTabvalue] = useState("c1");
13873
13972
  const [optiosData, setOptiosData] = useState([]);
13874
13973
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -14092,7 +14191,8 @@ const InternalCascader = (props) => {
14092
14191
  }, /* @__PURE__ */ React__default.createElement("span", {
14093
14192
  className: "nut-tabs__titles-item__text"
14094
14193
  }, !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.createElement("span", {
14095
- className: "nut-tabs__titles-item__line"
14194
+ className: "nut-tabs__titles-item__line",
14195
+ style: { background: tabsColor }
14096
14196
  }));
14097
14197
  });
14098
14198
  }
@@ -14127,9 +14227,9 @@ const InternalCascader = (props) => {
14127
14227
  }, renderItem()) : renderItem());
14128
14228
  };
14129
14229
  const Cascader = React__default.forwardRef(InternalCascader);
14130
- Cascader.defaultProps = defaultProps$J;
14230
+ Cascader.defaultProps = defaultProps$L;
14131
14231
  Cascader.displayName = "NutCascader";
14132
- const defaultProps$I = {
14232
+ const defaultProps$K = {
14133
14233
  ...ComponentDefaults,
14134
14234
  placeholder: "",
14135
14235
  shape: "square",
@@ -14180,7 +14280,7 @@ const SearchBar = (props) => {
14180
14280
  iconClassPrefix,
14181
14281
  iconFontClassName
14182
14282
  } = {
14183
- ...defaultProps$I,
14283
+ ...defaultProps$K,
14184
14284
  ...props
14185
14285
  };
14186
14286
  const alignClass = `${align}`;
@@ -14329,9 +14429,9 @@ const SearchBar = (props) => {
14329
14429
  className: `${searchbarBem("content")}`
14330
14430
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
14331
14431
  };
14332
- SearchBar.defaultProps = defaultProps$I;
14432
+ SearchBar.defaultProps = defaultProps$K;
14333
14433
  SearchBar.displayName = "NutSearchBar";
14334
- const defaultProps$H = {
14434
+ const defaultProps$J = {
14335
14435
  confirmText: "",
14336
14436
  title: "",
14337
14437
  visible: false,
@@ -14529,7 +14629,7 @@ const NumberKeyboard = (props) => {
14529
14629
  })
14530
14630
  }, confirmText || locale.done))) : null))));
14531
14631
  };
14532
- NumberKeyboard.defaultProps = defaultProps$H;
14632
+ NumberKeyboard.defaultProps = defaultProps$J;
14533
14633
  NumberKeyboard.displayName = "NutNumberKeyboard";
14534
14634
  const FormItemContext = createContext$1({});
14535
14635
  function _extends() {
@@ -15686,7 +15786,7 @@ const useForm = (form) => {
15686
15786
  }
15687
15787
  return [formRef.current];
15688
15788
  };
15689
- const defaultProps$G = {
15789
+ const defaultProps$I = {
15690
15790
  ...ComponentDefaults,
15691
15791
  name: "",
15692
15792
  label: "",
@@ -15733,7 +15833,7 @@ class FormItem extends React__default.Component {
15733
15833
  showErrorLine,
15734
15834
  showErrorMessage
15735
15835
  } = {
15736
- ...defaultProps$G,
15836
+ ...defaultProps$I,
15737
15837
  ...this.props
15738
15838
  };
15739
15839
  const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -15782,9 +15882,9 @@ class FormItem extends React__default.Component {
15782
15882
  return this.renderLayout(returnChildNode);
15783
15883
  }
15784
15884
  }
15785
- FormItem.defaultProps = defaultProps$G;
15885
+ FormItem.defaultProps = defaultProps$I;
15786
15886
  FormItem.contextType = FormItemContext;
15787
- const defaultProps$F = {
15887
+ const defaultProps$H = {
15788
15888
  ...ComponentDefaults,
15789
15889
  className: "",
15790
15890
  style: void 0,
@@ -15811,7 +15911,7 @@ const Form = (props) => {
15811
15911
  starPositon,
15812
15912
  ...rest
15813
15913
  } = {
15814
- ...defaultProps$F,
15914
+ ...defaultProps$H,
15815
15915
  ...props
15816
15916
  };
15817
15917
  const [formInstance] = useForm();
@@ -15832,10 +15932,10 @@ const Form = (props) => {
15832
15932
  value: formInstance
15833
15933
  }, children)));
15834
15934
  };
15835
- Form.defaultProps = defaultProps$F;
15935
+ Form.defaultProps = defaultProps$H;
15836
15936
  Form.displayName = "NutForm";
15837
15937
  Form.Item = FormItem;
15838
- const defaultProps$E = {
15938
+ const defaultProps$G = {
15839
15939
  cancelTxt: "",
15840
15940
  optionTag: "name",
15841
15941
  optionSubTag: "subname",
@@ -15869,7 +15969,7 @@ const ActionSheet = (props) => {
15869
15969
  className,
15870
15970
  style,
15871
15971
  ...rest
15872
- } = { ...defaultProps$E, ...props };
15972
+ } = { ...defaultProps$G, ...props };
15873
15973
  const b2 = cn("actionsheet");
15874
15974
  const isHighlight = (item) => {
15875
15975
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
@@ -15913,9 +16013,9 @@ const ActionSheet = (props) => {
15913
16013
  onClick: () => cancelActionSheet()
15914
16014
  }, cancelTxt)));
15915
16015
  };
15916
- ActionSheet.defaultProps = defaultProps$E;
16016
+ ActionSheet.defaultProps = defaultProps$G;
15917
16017
  ActionSheet.displayName = "NutActionSheet";
15918
- const defaultProps$D = {
16018
+ const defaultProps$F = {
15919
16019
  ...ComponentDefaults,
15920
16020
  bottom: 20,
15921
16021
  right: 10,
@@ -15941,7 +16041,7 @@ const BackTop = (props) => {
15941
16041
  iconClassPrefix,
15942
16042
  iconFontClassName
15943
16043
  } = {
15944
- ...defaultProps$D,
16044
+ ...defaultProps$F,
15945
16045
  ...props
15946
16046
  };
15947
16047
  const [backTop, SetBackTop] = useState(false);
@@ -16032,9 +16132,9 @@ const BackTop = (props) => {
16032
16132
  name: "top"
16033
16133
  }));
16034
16134
  };
16035
- BackTop.defaultProps = defaultProps$D;
16135
+ BackTop.defaultProps = defaultProps$F;
16036
16136
  BackTop.displayName = "NutBackTop";
16037
- const defaultProps$C = {
16137
+ const defaultProps$E = {
16038
16138
  attract: false,
16039
16139
  direction: void 0,
16040
16140
  boundary: {
@@ -16047,7 +16147,7 @@ const defaultProps$C = {
16047
16147
  };
16048
16148
  const Drag = (props) => {
16049
16149
  const { attract, direction, boundary, children, className, style, ...reset } = {
16050
- ...defaultProps$C,
16150
+ ...defaultProps$E,
16051
16151
  ...props
16052
16152
  };
16053
16153
  const b2 = cn("drag");
@@ -16109,7 +16209,7 @@ const Drag = (props) => {
16109
16209
  ...bind()
16110
16210
  }, children));
16111
16211
  };
16112
- Drag.defaultProps = defaultProps$C;
16212
+ Drag.defaultProps = defaultProps$E;
16113
16213
  Drag.displayName = "NutDrag";
16114
16214
  const Content = (props) => {
16115
16215
  const {
@@ -16304,7 +16404,7 @@ function confirm(config2, renderFunc) {
16304
16404
  update: update2
16305
16405
  };
16306
16406
  }
16307
- const defaultProps$B = {
16407
+ const defaultProps$D = {
16308
16408
  okText: "\u786E\u8BA4",
16309
16409
  cancelText: "\u53D6\u6D88",
16310
16410
  mask: true,
@@ -16395,9 +16495,9 @@ Dialog.confirm = (props) => {
16395
16495
  });
16396
16496
  };
16397
16497
  });
16398
- Dialog.defaultProps = defaultProps$B;
16498
+ Dialog.defaultProps = defaultProps$D;
16399
16499
  Dialog.displayName = "NutDialog";
16400
- const defaultProps$A = {
16500
+ const defaultProps$C = {
16401
16501
  ...ComponentDefaults,
16402
16502
  hasMore: true,
16403
16503
  threshold: 200,
@@ -16434,7 +16534,7 @@ const Infiniteloading = (props) => {
16434
16534
  iconFontClassName,
16435
16535
  ...restProps
16436
16536
  } = {
16437
- ...defaultProps$A,
16537
+ ...defaultProps$C,
16438
16538
  ...props
16439
16539
  };
16440
16540
  const [isInfiniting, setIsInfiniting] = useState(false);
@@ -16598,7 +16698,7 @@ const Infiniteloading = (props) => {
16598
16698
  className: "tips"
16599
16699
  }, loadMoreTxt || locale.infiniteloading.loadMoreText)));
16600
16700
  };
16601
- Infiniteloading.defaultProps = defaultProps$A;
16701
+ Infiniteloading.defaultProps = defaultProps$C;
16602
16702
  Infiniteloading.displayName = "NutInfiniteloading";
16603
16703
  class Notification extends React.PureComponent {
16604
16704
  constructor(props) {
@@ -16773,7 +16873,7 @@ var Notify = {
16773
16873
  }
16774
16874
  }
16775
16875
  };
16776
- const defaultProps$z = {
16876
+ const defaultProps$B = {
16777
16877
  isAsync: false,
16778
16878
  checked: false,
16779
16879
  disable: false,
@@ -16796,7 +16896,7 @@ const Switch = (props) => {
16796
16896
  className,
16797
16897
  style
16798
16898
  } = {
16799
- ...defaultProps$z,
16899
+ ...defaultProps$B,
16800
16900
  ...props
16801
16901
  };
16802
16902
  const [value, setValue] = useState(false);
@@ -16836,7 +16936,7 @@ const Switch = (props) => {
16836
16936
  className: `${b2("label")} close`
16837
16937
  }, inactiveText))));
16838
16938
  };
16839
- Switch.defaultProps = defaultProps$z;
16939
+ Switch.defaultProps = defaultProps$B;
16840
16940
  Switch.displayName = "NutSwitch";
16841
16941
  function preventDefault(event, isStopPropagation) {
16842
16942
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
@@ -16846,7 +16946,7 @@ function preventDefault(event, isStopPropagation) {
16846
16946
  event.stopPropagation();
16847
16947
  }
16848
16948
  }
16849
- const defaultProps$y = {
16949
+ const defaultProps$A = {
16850
16950
  name: "",
16851
16951
  leftWidth: 0,
16852
16952
  rightWidth: 0
@@ -16854,7 +16954,7 @@ const defaultProps$y = {
16854
16954
  const Swipe = forwardRef((props, instanceRef) => {
16855
16955
  const swipeBem = cn("swipe");
16856
16956
  const touch = useTouch();
16857
- const { children, className, style } = { ...defaultProps$y, ...props };
16957
+ const { children, className, style } = { ...defaultProps$A, ...props };
16858
16958
  const root = useRef();
16859
16959
  const opened = useRef(false);
16860
16960
  const lockClick = useRef(false);
@@ -17020,7 +17120,7 @@ const Swipe = forwardRef((props, instanceRef) => {
17020
17120
  style: wrapperStyle
17021
17121
  }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef)));
17022
17122
  });
17023
- Swipe.defaultProps = defaultProps$y;
17123
+ Swipe.defaultProps = defaultProps$A;
17024
17124
  Swipe.displayName = "NutSwipe";
17025
17125
  function bound(position, min, max) {
17026
17126
  let ret = position;
@@ -17058,7 +17158,7 @@ if (canUseDom) {
17058
17158
  console.log(e2);
17059
17159
  }
17060
17160
  }
17061
- const defaultProps$x = {
17161
+ const defaultProps$z = {
17062
17162
  className: "",
17063
17163
  style: {},
17064
17164
  pullingText: "",
@@ -17075,7 +17175,7 @@ const defaultProps$x = {
17075
17175
  const PullToRefresh = (p2) => {
17076
17176
  const { locale } = useConfig();
17077
17177
  const props = {
17078
- ...defaultProps$x,
17178
+ ...defaultProps$z,
17079
17179
  ...p2,
17080
17180
  ...{
17081
17181
  pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
@@ -17214,10 +17314,10 @@ const PullToRefresh = (p2) => {
17214
17314
  className: "nut-pulltorefresh-content"
17215
17315
  }, props.children));
17216
17316
  };
17217
- PullToRefresh.defaultProps = defaultProps$x;
17317
+ PullToRefresh.defaultProps = defaultProps$z;
17218
17318
  PullToRefresh.displayName = "NutPullToRefresh";
17219
17319
  const isObject = (val) => val !== null && typeof val === "object";
17220
- const defaultProps$w = {
17320
+ const defaultProps$y = {
17221
17321
  strokeWidth: 5,
17222
17322
  radius: 50,
17223
17323
  strokeLinecap: "round",
@@ -17240,7 +17340,7 @@ const CircleProgress = (props) => {
17240
17340
  strokeLinecap,
17241
17341
  ...restProps
17242
17342
  } = {
17243
- ...defaultProps$w,
17343
+ ...defaultProps$y,
17244
17344
  ...props
17245
17345
  };
17246
17346
  const b2 = cn("circleprogress");
@@ -17326,9 +17426,9 @@ const CircleProgress = (props) => {
17326
17426
  className: "nut-circleprogress-text"
17327
17427
  }, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
17328
17428
  };
17329
- CircleProgress.defaultProps = defaultProps$w;
17429
+ CircleProgress.defaultProps = defaultProps$y;
17330
17430
  CircleProgress.displayName = "NutCircleProgress";
17331
- const defaultProps$v = {
17431
+ const defaultProps$x = {
17332
17432
  ...ComponentDefaults,
17333
17433
  direction: "across",
17334
17434
  list: [],
@@ -17372,7 +17472,7 @@ const NoticeBar = (props) => {
17372
17472
  iconClassPrefix,
17373
17473
  iconFontClassName
17374
17474
  } = {
17375
- ...defaultProps$v,
17475
+ ...defaultProps$x,
17376
17476
  ...props
17377
17477
  };
17378
17478
  const wrap = useRef(null);
@@ -17619,16 +17719,16 @@ const NoticeBar = (props) => {
17619
17719
  size: "11px"
17620
17720
  }) : null))) : null);
17621
17721
  };
17622
- NoticeBar.defaultProps = defaultProps$v;
17722
+ NoticeBar.defaultProps = defaultProps$x;
17623
17723
  NoticeBar.displayName = "NutNoticeBar";
17624
17724
  const DataContext$1 = createContext$1({});
17625
- const defaultProps$u = {
17725
+ const defaultProps$w = {
17626
17726
  current: 0,
17627
17727
  direction: "horizontal",
17628
17728
  progressDot: false
17629
17729
  };
17630
17730
  const Steps = (props) => {
17631
- const propSteps = { ...defaultProps$u, ...props };
17731
+ const propSteps = { ...defaultProps$w, ...props };
17632
17732
  const {
17633
17733
  children,
17634
17734
  current,
@@ -17662,9 +17762,9 @@ const Steps = (props) => {
17662
17762
  children
17663
17763
  ));
17664
17764
  };
17665
- Steps.defaultProps = defaultProps$u;
17765
+ Steps.defaultProps = defaultProps$w;
17666
17766
  Steps.displayName = "NutSteps";
17667
- const defaultProps$t = {
17767
+ const defaultProps$v = {
17668
17768
  ...ComponentDefaults,
17669
17769
  title: "",
17670
17770
  content: "",
@@ -17688,7 +17788,7 @@ const Step = (props) => {
17688
17788
  iconFontClassName,
17689
17789
  ...restProps
17690
17790
  } = {
17691
- ...defaultProps$t,
17791
+ ...defaultProps$v,
17692
17792
  ...props
17693
17793
  };
17694
17794
  const parent = useContext$1(DataContext$1);
@@ -17750,10 +17850,10 @@ const Step = (props) => {
17750
17850
  className: "nut-step-content"
17751
17851
  }, renderContent())));
17752
17852
  };
17753
- Step.defaultProps = defaultProps$t;
17853
+ Step.defaultProps = defaultProps$v;
17754
17854
  Step.displayName = "NutStep";
17755
17855
  const DataContext = createContext$1({});
17756
- const defaultProps$s = {
17856
+ const defaultProps$u = {
17757
17857
  width: typeof window === "object" ? window.innerWidth : 375,
17758
17858
  height: 0,
17759
17859
  duration: 500,
@@ -17771,7 +17871,7 @@ const defaultProps$s = {
17771
17871
  };
17772
17872
  const DISTANCE = 5;
17773
17873
  const Swiper = React__default.forwardRef((props, ref) => {
17774
- const propSwiper = { ...defaultProps$s, ...props };
17874
+ const propSwiper = { ...defaultProps$u, ...props };
17775
17875
  const {
17776
17876
  children,
17777
17877
  direction,
@@ -18181,13 +18281,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
18181
18281
  });
18182
18282
  })) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
18183
18283
  });
18184
- Swiper.defaultProps = defaultProps$s;
18284
+ Swiper.defaultProps = defaultProps$u;
18185
18285
  Swiper.displayName = "NutSwiper";
18186
- const defaultProps$r = {
18286
+ const defaultProps$t = {
18187
18287
  direction: "horizontal"
18188
18288
  };
18189
18289
  const SwiperItem = React__default.forwardRef((props, ref) => {
18190
- const _props = { ...defaultProps$r, ...props };
18290
+ const _props = { ...defaultProps$t, ...props };
18191
18291
  const { className, style, children, direction, size } = _props;
18192
18292
  const parent = useContext$1(DataContext);
18193
18293
  const b2 = cn("swiper-item");
@@ -18206,10 +18306,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
18206
18306
  style: { ...style, ...getStyle() }
18207
18307
  }, children);
18208
18308
  });
18209
- SwiperItem.defaultProps = defaultProps$r;
18309
+ SwiperItem.defaultProps = defaultProps$t;
18210
18310
  SwiperItem.displayName = "NutSwiperItem";
18211
18311
  const AvatarContext = createContext$1({});
18212
- const defaultProps$q = {
18312
+ const defaultProps$s = {
18213
18313
  ...ComponentDefaults,
18214
18314
  size: "",
18215
18315
  icon: "",
@@ -18242,7 +18342,7 @@ const Avatar = (props) => {
18242
18342
  iconFontClassName,
18243
18343
  ...rest
18244
18344
  } = {
18245
- ...defaultProps$q,
18345
+ ...defaultProps$s,
18246
18346
  ...props
18247
18347
  };
18248
18348
  const [maxSum, setMaxSum] = useState(0);
@@ -18325,9 +18425,9 @@ const Avatar = (props) => {
18325
18425
  className: "text"
18326
18426
  }, ((_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)}`)));
18327
18427
  };
18328
- Avatar.defaultProps = defaultProps$q;
18428
+ Avatar.defaultProps = defaultProps$s;
18329
18429
  Avatar.displayName = "NutAvatar";
18330
- const defaultProps$p = {
18430
+ const defaultProps$r = {
18331
18431
  maxContent: "",
18332
18432
  maxCount: "",
18333
18433
  maxBgColor: "#eee",
@@ -18339,7 +18439,7 @@ const defaultProps$p = {
18339
18439
  };
18340
18440
  const AvatarGroup = (props) => {
18341
18441
  useConfig();
18342
- const propAvatarGroup = { ...defaultProps$p, ...props };
18442
+ const propAvatarGroup = { ...defaultProps$r, ...props };
18343
18443
  const { className, style, children } = propAvatarGroup;
18344
18444
  const avatarGroupRef = useRef(null);
18345
18445
  const b2 = cn("avatar-group");
@@ -18356,9 +18456,9 @@ const AvatarGroup = (props) => {
18356
18456
  ref: avatarGroupRef
18357
18457
  }, children));
18358
18458
  };
18359
- AvatarGroup.defaultProps = defaultProps$p;
18459
+ AvatarGroup.defaultProps = defaultProps$r;
18360
18460
  AvatarGroup.displayName = "NutAvatarGroup";
18361
- const defaultProps$o = {
18461
+ const defaultProps$q = {
18362
18462
  price: 0,
18363
18463
  needSymbol: true,
18364
18464
  symbol: "&yen;",
@@ -18380,7 +18480,7 @@ const Price = (props) => {
18380
18480
  className,
18381
18481
  ...rest
18382
18482
  } = {
18383
- ...defaultProps$o,
18483
+ ...defaultProps$q,
18384
18484
  ...props
18385
18485
  };
18386
18486
  const b2 = cn("price");
@@ -18436,9 +18536,9 @@ const Price = (props) => {
18436
18536
  className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
18437
18537
  }, formatDecimal(price)), needSymbol && position === "after" ? renderSymbol() : null);
18438
18538
  };
18439
- Price.defaultProps = defaultProps$o;
18539
+ Price.defaultProps = defaultProps$q;
18440
18540
  Price.displayName = "NutPrice";
18441
- const defaultProps$n = {
18541
+ const defaultProps$p = {
18442
18542
  ...ComponentDefaults,
18443
18543
  value: "",
18444
18544
  dot: false,
@@ -18463,7 +18563,7 @@ const Badge = (props) => {
18463
18563
  iconClassPrefix,
18464
18564
  iconFontClassName
18465
18565
  } = {
18466
- ...defaultProps$n,
18566
+ ...defaultProps$p,
18467
18567
  ...props
18468
18568
  };
18469
18569
  function content() {
@@ -18501,9 +18601,9 @@ const Badge = (props) => {
18501
18601
  style: getStyle()
18502
18602
  }, content()));
18503
18603
  };
18504
- Badge.defaultProps = defaultProps$n;
18604
+ Badge.defaultProps = defaultProps$p;
18505
18605
  Badge.displayName = "NutBadge";
18506
- const defaultProps$m = {
18606
+ const defaultProps$o = {
18507
18607
  ...ComponentDefaults,
18508
18608
  type: "default",
18509
18609
  color: "",
@@ -18536,7 +18636,7 @@ const Tag = (props) => {
18536
18636
  iconClassPrefix,
18537
18637
  iconFontClassName
18538
18638
  } = {
18539
- ...defaultProps$m,
18639
+ ...defaultProps$o,
18540
18640
  ...props
18541
18641
  };
18542
18642
  const [btnName, setBtnName] = useState("");
@@ -18610,7 +18710,7 @@ const Tag = (props) => {
18610
18710
  className: "text"
18611
18711
  }, children)));
18612
18712
  };
18613
- Tag.defaultProps = defaultProps$m;
18713
+ Tag.defaultProps = defaultProps$o;
18614
18714
  Tag.displayName = "NutTag";
18615
18715
  function fillRef(ref, node) {
18616
18716
  if (typeof ref === "function") {
@@ -18654,7 +18754,7 @@ class Trigger extends React__default.Component {
18654
18754
  return trigger;
18655
18755
  }
18656
18756
  }
18657
- const defaultProps$l = {
18757
+ const defaultProps$n = {
18658
18758
  ...ComponentDefaults,
18659
18759
  list: [],
18660
18760
  theme: "light",
@@ -18683,7 +18783,7 @@ const Popover = (props) => {
18683
18783
  iconFontClassName,
18684
18784
  ...reset
18685
18785
  } = {
18686
- ...defaultProps$l,
18786
+ ...defaultProps$n,
18687
18787
  ...props
18688
18788
  };
18689
18789
  const goodItem = useRef(null);
@@ -18777,9 +18877,9 @@ const Popover = (props) => {
18777
18877
  style: { background: "transparent" }
18778
18878
  }) : "");
18779
18879
  };
18780
- Popover.defaultProps = defaultProps$l;
18880
+ Popover.defaultProps = defaultProps$n;
18781
18881
  Popover.displayName = "NutPopover";
18782
- const defaultProps$k = {
18882
+ const defaultProps$m = {
18783
18883
  width: "100px",
18784
18884
  height: "100px",
18785
18885
  row: 1,
@@ -18807,7 +18907,7 @@ const Skeleton = (props) => {
18807
18907
  avatarShape,
18808
18908
  ...restProps
18809
18909
  } = {
18810
- ...defaultProps$k,
18910
+ ...defaultProps$m,
18811
18911
  ...props
18812
18912
  };
18813
18913
  const b2 = cn("skeleton");
@@ -18862,9 +18962,9 @@ const Skeleton = (props) => {
18862
18962
  });
18863
18963
  })))));
18864
18964
  };
18865
- Skeleton.defaultProps = defaultProps$k;
18965
+ Skeleton.defaultProps = defaultProps$m;
18866
18966
  Skeleton.displayName = "NutSkeleton";
18867
- const defaultProps$j = {
18967
+ const defaultProps$l = {
18868
18968
  paused: false,
18869
18969
  startTime: Date.now(),
18870
18970
  endTime: Date.now(),
@@ -18891,7 +18991,7 @@ const InternalCountDown = (props, ref) => {
18891
18991
  onUpdate,
18892
18992
  children,
18893
18993
  ...rest
18894
- } = { ...defaultProps$j, ...props };
18994
+ } = { ...defaultProps$l, ...props };
18895
18995
  const b2 = cn("countdown");
18896
18996
  const [restTimeStamp, setRestTime] = useState(0);
18897
18997
  const stateRef = useRef({
@@ -19087,9 +19187,9 @@ const InternalCountDown = (props, ref) => {
19087
19187
  }));
19088
19188
  };
19089
19189
  const CountDown = React__default.forwardRef(InternalCountDown);
19090
- CountDown.defaultProps = defaultProps$j;
19190
+ CountDown.defaultProps = defaultProps$l;
19091
19191
  CountDown.displayName = "NutCountDown";
19092
- const defaultProps$i = {
19192
+ const defaultProps$k = {
19093
19193
  style: {},
19094
19194
  activeName: ["0"],
19095
19195
  accordion: false,
@@ -19115,7 +19215,7 @@ const Collapse = memo(
19115
19215
  iconColor,
19116
19216
  onChange
19117
19217
  } = {
19118
- ...defaultProps$i,
19218
+ ...defaultProps$k,
19119
19219
  ...props
19120
19220
  };
19121
19221
  const childrenDom = React__default.Children.toArray(children);
@@ -19174,9 +19274,9 @@ const Collapse = memo(
19174
19274
  },
19175
19275
  areEqual
19176
19276
  );
19177
- Collapse.defaultProps = defaultProps$i;
19277
+ Collapse.defaultProps = defaultProps$k;
19178
19278
  Collapse.displayName = "NutCollapse";
19179
- const defaultProps$h = {
19279
+ const defaultProps$j = {
19180
19280
  ...ComponentDefaults,
19181
19281
  title: "",
19182
19282
  name: "",
@@ -19215,7 +19315,7 @@ const CollapseItem = (props) => {
19215
19315
  iconFontClassName,
19216
19316
  ...rest
19217
19317
  } = {
19218
- ...defaultProps$h,
19318
+ ...defaultProps$j,
19219
19319
  ...props
19220
19320
  };
19221
19321
  const [domHeight, setDomHeight] = useState(-1);
@@ -19295,9 +19395,9 @@ const CollapseItem = (props) => {
19295
19395
  className: colBem("content-text")
19296
19396
  }, children)));
19297
19397
  };
19298
- CollapseItem.defaultProps = defaultProps$h;
19398
+ CollapseItem.defaultProps = defaultProps$j;
19299
19399
  CollapseItem.displayName = "NutCollapseItem";
19300
- const defaultProps$g = {
19400
+ const defaultProps$i = {
19301
19401
  maxLen: 0,
19302
19402
  endNumber: "",
19303
19403
  delaySpeed: 300,
@@ -19315,7 +19415,7 @@ const CountUp = (props) => {
19315
19415
  thousands,
19316
19416
  ...reset
19317
19417
  } = {
19318
- ...defaultProps$g,
19418
+ ...defaultProps$i,
19319
19419
  ...props
19320
19420
  };
19321
19421
  const b2 = cn("countup");
@@ -19385,9 +19485,9 @@ const CountUp = (props) => {
19385
19485
  }, item));
19386
19486
  })));
19387
19487
  };
19388
- CountUp.defaultProps = defaultProps$g;
19488
+ CountUp.defaultProps = defaultProps$i;
19389
19489
  CountUp.displayName = "NutCountUp";
19390
- const defaultProps$f = {};
19490
+ const defaultProps$h = {};
19391
19491
  class AnimatingNumbers extends Component {
19392
19492
  constructor(props) {
19393
19493
  super(props);
@@ -19399,7 +19499,7 @@ class AnimatingNumbers extends Component {
19399
19499
  });
19400
19500
  }
19401
19501
  }
19402
- AnimatingNumbers.defaultProps = defaultProps$f;
19502
+ AnimatingNumbers.defaultProps = defaultProps$h;
19403
19503
  AnimatingNumbers.displayName = "NutAnimatingNumbers";
19404
19504
  AnimatingNumbers.CountUp = CountUp;
19405
19505
  AnimatingNumbers.CountUp = CountUp;
@@ -19408,7 +19508,7 @@ const defaultStatus = {
19408
19508
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
19409
19509
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
19410
19510
  };
19411
- const defaultProps$e = {
19511
+ const defaultProps$g = {
19412
19512
  description: "\u65E0\u5185\u5BB9",
19413
19513
  image: "empty",
19414
19514
  imageSize: "",
@@ -19416,9 +19516,9 @@ const defaultProps$e = {
19416
19516
  };
19417
19517
  const Empty = (props) => {
19418
19518
  const { locale } = useConfig();
19419
- defaultProps$e.description = locale.noData || defaultProps$e.description;
19519
+ defaultProps$g.description = locale.noData || defaultProps$g.description;
19420
19520
  const { image, imageSize, description, children, className, ...rest } = {
19421
- ...defaultProps$e,
19521
+ ...defaultProps$g,
19422
19522
  ...props
19423
19523
  };
19424
19524
  const [imgStyle, setImgStyle] = useState({});
@@ -19460,7 +19560,7 @@ const Empty = (props) => {
19460
19560
  className: b2("description")
19461
19561
  }, description) : { description }, children));
19462
19562
  };
19463
- Empty.defaultProps = defaultProps$e;
19563
+ Empty.defaultProps = defaultProps$g;
19464
19564
  Empty.displayName = "NutEmpty";
19465
19565
  const initPositinoCache = (reaItemSize, length = 0) => {
19466
19566
  let index = 0;
@@ -19573,7 +19673,7 @@ const updateItemSize = (positions, items, sizeKey) => {
19573
19673
  }
19574
19674
  });
19575
19675
  };
19576
- const defaultProps$d = {};
19676
+ const defaultProps$f = {};
19577
19677
  const VirtualList = (props) => {
19578
19678
  const {
19579
19679
  sourceData = [],
@@ -19737,9 +19837,9 @@ const VirtualList = (props) => {
19737
19837
  }) : data);
19738
19838
  }))));
19739
19839
  };
19740
- VirtualList.defaultProps = defaultProps$d;
19840
+ VirtualList.defaultProps = defaultProps$f;
19741
19841
  VirtualList.displayName = "NutVirtualList";
19742
- const defaultProps$c = {
19842
+ const defaultProps$e = {
19743
19843
  ...ComponentDefaults,
19744
19844
  className: "",
19745
19845
  style: {},
@@ -19751,7 +19851,7 @@ const defaultProps$c = {
19751
19851
  };
19752
19852
  const Table = (props) => {
19753
19853
  const { locale } = useConfig();
19754
- defaultProps$c.noData = locale.noData;
19854
+ defaultProps$e.noData = locale.noData;
19755
19855
  const {
19756
19856
  children,
19757
19857
  className,
@@ -19767,7 +19867,7 @@ const Table = (props) => {
19767
19867
  iconFontClassName,
19768
19868
  ...rest
19769
19869
  } = {
19770
- ...defaultProps$c,
19870
+ ...defaultProps$e,
19771
19871
  ...props
19772
19872
  };
19773
19873
  const [curData, setCurData] = useState(data);
@@ -19865,9 +19965,9 @@ const Table = (props) => {
19865
19965
  className: "nut-table__nodata__text"
19866
19966
  }, noData))));
19867
19967
  };
19868
- Table.defaultProps = defaultProps$c;
19968
+ Table.defaultProps = defaultProps$e;
19869
19969
  Table.displayName = "NutTable";
19870
- const defaultProps$b = {
19970
+ const defaultProps$d = {
19871
19971
  source: {
19872
19972
  type: {},
19873
19973
  src: ""
@@ -19895,7 +19995,7 @@ const Video = (props) => {
19895
19995
  onPlayend,
19896
19996
  ...restProps
19897
19997
  } = {
19898
- ...defaultProps$b,
19998
+ ...defaultProps$d,
19899
19999
  ...props
19900
20000
  };
19901
20001
  const rootRef = useRef(null);
@@ -19952,9 +20052,9 @@ const Video = (props) => {
19952
20052
  kind: "captions"
19953
20053
  })));
19954
20054
  };
19955
- Video.defaultProps = defaultProps$b;
20055
+ Video.defaultProps = defaultProps$d;
19956
20056
  Video.displayName = "NutVideo";
19957
- const defaultProps$a = {
20057
+ const defaultProps$c = {
19958
20058
  ...ComponentDefaults,
19959
20059
  className: "",
19960
20060
  url: "",
@@ -19999,7 +20099,7 @@ const Audio = (props) => {
19999
20099
  iconFontClassName,
20000
20100
  ...rest
20001
20101
  } = {
20002
- ...defaultProps$a,
20102
+ ...defaultProps$c,
20003
20103
  ...props
20004
20104
  };
20005
20105
  const [playing, setPlaying] = useState(false);
@@ -20195,9 +20295,9 @@ const Audio = (props) => {
20195
20295
  kind: "captions"
20196
20296
  })));
20197
20297
  };
20198
- Audio.defaultProps = defaultProps$a;
20298
+ Audio.defaultProps = defaultProps$c;
20199
20299
  Audio.displayName = "NutAudio";
20200
- const defaultProps$9 = {
20300
+ const defaultProps$b = {
20201
20301
  images: [],
20202
20302
  videos: [],
20203
20303
  show: false,
@@ -20389,8 +20489,208 @@ const ImagePreview = (props) => {
20389
20489
  className: "nut-imagepreview-index"
20390
20490
  }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
20391
20491
  };
20392
- ImagePreview.defaultProps = defaultProps$9;
20492
+ ImagePreview.defaultProps = defaultProps$b;
20393
20493
  ImagePreview.displayName = "NutImagePreview";
20494
+ const defaultProps$a = {
20495
+ rate: 0,
20496
+ digits: 2,
20497
+ showSign: false,
20498
+ showZero: false,
20499
+ arrowLeft: false,
20500
+ syncTextColor: true,
20501
+ textColor: "#333",
20502
+ riseColor: "#fa2c19",
20503
+ dropColor: "#64b578",
20504
+ iconSize: "12px",
20505
+ upIconName: "triangle-up",
20506
+ downIconName: "triangle-down",
20507
+ className: ""
20508
+ };
20509
+ const TrendArrow = (props) => {
20510
+ const {
20511
+ rate,
20512
+ digits,
20513
+ showSign,
20514
+ showZero,
20515
+ arrowLeft,
20516
+ syncTextColor,
20517
+ textColor,
20518
+ riseColor,
20519
+ dropColor,
20520
+ iconSize,
20521
+ upIconName,
20522
+ downIconName,
20523
+ className,
20524
+ children,
20525
+ ...rest
20526
+ } = { ...defaultProps$a, ...props };
20527
+ const b2 = cn("trendarrow");
20528
+ const handleClick2 = () => {
20529
+ };
20530
+ const rateTrend = useRef(rate > 0);
20531
+ const myFixed = (num, digit = 2) => {
20532
+ if (Object.is(parseFloat(num), NaN)) {
20533
+ return console.log(`\u4F20\u5165\u7684\u503C\uFF1A${num}\u4E0D\u662F\u4E00\u4E2A\u6570\u5B57`);
20534
+ }
20535
+ num = parseFloat(num);
20536
+ const numPow = Math.pow(10, digit);
20537
+ return (Math.round((num + Number.EPSILON) * numPow) / numPow).toFixed(digit);
20538
+ };
20539
+ const calcStyle = (() => {
20540
+ const arrowColor = rateTrend.current ? riseColor : dropColor;
20541
+ const textEquArrowColor = syncTextColor ? arrowColor : textColor;
20542
+ const style = {
20543
+ color: rate === 0 ? textColor : textEquArrowColor
20544
+ };
20545
+ return style;
20546
+ })();
20547
+ const calcRate = (() => {
20548
+ rateTrend.current = rate > 0;
20549
+ const absRate = Math.abs(rate);
20550
+ if (!showZero && rate === 0) {
20551
+ return "--";
20552
+ }
20553
+ const resultRate = `${showSign && rate !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
20554
+ return resultRate;
20555
+ })();
20556
+ const calcIconProps = (() => {
20557
+ const iconProps = {
20558
+ name: rateTrend.current ? upIconName : downIconName,
20559
+ color: rateTrend.current ? riseColor : dropColor,
20560
+ size: iconSize
20561
+ };
20562
+ return iconProps;
20563
+ })();
20564
+ const renderContent = (arrowLeft2) => {
20565
+ const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
20566
+ return /* @__PURE__ */ React__default.createElement("span", {
20567
+ className: `${b2(classNameSuffix)} ${b2("rate")}`,
20568
+ style: calcStyle
20569
+ }, calcRate);
20570
+ };
20571
+ return /* @__PURE__ */ React__default.createElement("div", {
20572
+ className: `${b2()} ${className}`,
20573
+ ...rest,
20574
+ onClick: handleClick2
20575
+ }, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default.createElement(Icon$1, {
20576
+ size: calcIconProps.size,
20577
+ name: calcIconProps.name,
20578
+ color: calcIconProps.color
20579
+ })), arrowLeft && renderContent(!arrowLeft));
20580
+ };
20581
+ TrendArrow.defaultProps = defaultProps$a;
20582
+ TrendArrow.displayName = "NutTrendArrow";
20583
+ const defaultProps$9 = {
20584
+ content: "",
20585
+ fullPage: true,
20586
+ zIndex: 2e3,
20587
+ gapX: 24,
20588
+ gapY: 48,
20589
+ width: 120,
20590
+ height: 64,
20591
+ image: "",
20592
+ imageWidth: 120,
20593
+ imageHeight: 64,
20594
+ rotate: -22,
20595
+ fontColor: "rgba(0,0,0,.15)",
20596
+ fontStyle: "normal",
20597
+ fontFamily: "PingFang SC",
20598
+ fontWeight: "normal",
20599
+ fontSize: 14
20600
+ };
20601
+ const WaterMark = (props) => {
20602
+ const { locale } = useConfig();
20603
+ const {
20604
+ content,
20605
+ fullPage,
20606
+ zIndex,
20607
+ className,
20608
+ gapX,
20609
+ gapY,
20610
+ width,
20611
+ height,
20612
+ image,
20613
+ imageWidth,
20614
+ imageHeight,
20615
+ rotate,
20616
+ fontColor,
20617
+ fontStyle,
20618
+ fontFamily,
20619
+ fontWeight,
20620
+ fontSize,
20621
+ style,
20622
+ children
20623
+ } = {
20624
+ ...defaultProps$9,
20625
+ ...props
20626
+ };
20627
+ const [base64Url, setBase64Url] = useState("");
20628
+ const b2 = cn("watermark");
20629
+ const classes = classNames({
20630
+ [`${b2("")}`]: true,
20631
+ [`${b2("")}-full-page`]: fullPage
20632
+ });
20633
+ const cls = classNames(classes, className);
20634
+ useEffect(() => {
20635
+ init();
20636
+ }, []);
20637
+ const init = () => {
20638
+ const canvas = document.createElement("canvas");
20639
+ const ratio = window.devicePixelRatio;
20640
+ const ctx2 = canvas.getContext("2d");
20641
+ const canvasWidth = `${(gapX + width) * ratio}px`;
20642
+ const canvasHeight = `${(gapY + height) * ratio}px`;
20643
+ const markWidth = width * ratio;
20644
+ const markHeight = height * ratio;
20645
+ canvas.setAttribute("width", canvasWidth);
20646
+ canvas.setAttribute("height", canvasHeight);
20647
+ if (ctx2) {
20648
+ if (image) {
20649
+ ctx2.translate(markWidth / 2, markHeight / 2);
20650
+ ctx2.rotate(Math.PI / 180 * Number(rotate));
20651
+ const img = new Image();
20652
+ img.crossOrigin = "anonymous";
20653
+ img.referrerPolicy = "no-referrer";
20654
+ img.src = image;
20655
+ img.onload = () => {
20656
+ ctx2.drawImage(
20657
+ img,
20658
+ -imageWidth * ratio / 2,
20659
+ -imageHeight * ratio / 2,
20660
+ imageWidth * ratio,
20661
+ imageHeight * ratio
20662
+ );
20663
+ ctx2.restore();
20664
+ setBase64Url(canvas.toDataURL());
20665
+ };
20666
+ } else if (content) {
20667
+ ctx2.textBaseline = "middle";
20668
+ ctx2.textAlign = "center";
20669
+ ctx2.translate(markWidth / 2, markHeight / 2);
20670
+ ctx2.rotate(Math.PI / 180 * Number(rotate));
20671
+ const markSize = Number(fontSize) * ratio;
20672
+ ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
20673
+ ctx2.fillStyle = fontColor;
20674
+ ctx2.fillText(content, 0, 0);
20675
+ ctx2.restore();
20676
+ setBase64Url(canvas.toDataURL());
20677
+ }
20678
+ } else {
20679
+ throw new Error(locale.watermark.errorCanvasTips);
20680
+ }
20681
+ };
20682
+ return /* @__PURE__ */ React__default.createElement("div", {
20683
+ className: cls,
20684
+ style: {
20685
+ zIndex,
20686
+ backgroundSize: `${gapX + width}px`,
20687
+ backgroundImage: `url('${base64Url}')`,
20688
+ ...style
20689
+ }
20690
+ });
20691
+ };
20692
+ WaterMark.defaultProps = defaultProps$9;
20693
+ WaterMark.displayName = "NutWaterMark";
20394
20694
  const defaultProps$8 = {
20395
20695
  type: "custom",
20396
20696
  existAddress: [],
@@ -21454,4 +21754,4 @@ const TimeSelect = (props) => {
21454
21754
  };
21455
21755
  TimeSelect.defaultProps = defaultProps;
21456
21756
  TimeSelect.displayName = "NutTimeSelect";
21457
- export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon$1 as Icon, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
21757
+ export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon$1 as Icon, Image$1 as Image, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, TrendArrow, Uploader, Video, VirtualList, WaterMark };