@nutui/nutui-react 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +3 -2
  3. package/dist/esm/Address.js +7 -5
  4. package/dist/esm/Audio.js +7 -5
  5. package/dist/esm/Avatar.js +5 -3
  6. package/dist/esm/BackTop.js +5 -3
  7. package/dist/esm/Badge.js +5 -3
  8. package/dist/esm/Barrage.js +1 -1
  9. package/dist/esm/Button.js +7 -5
  10. package/dist/esm/Cascader.js +1 -1
  11. package/dist/esm/Cell.js +7 -5
  12. package/dist/esm/Checkbox.js +2 -2
  13. package/dist/esm/Collapse.js +2 -1
  14. package/dist/esm/CollapseItem.js +13 -9
  15. package/dist/esm/FixedNav.js +5 -3
  16. package/dist/esm/GridItem.js +5 -3
  17. package/dist/esm/Infiniteloading.js +13 -11
  18. package/dist/esm/Input.js +9 -7
  19. package/dist/esm/InputNumber.js +7 -5
  20. package/dist/esm/Menu.js +5 -3
  21. package/dist/esm/MenuItem.js +5 -5
  22. package/dist/esm/NavBar.js +7 -5
  23. package/dist/esm/NoticeBar.js +9 -7
  24. package/dist/esm/Notify.js +1 -1
  25. package/dist/esm/Popover.js +5 -3
  26. package/dist/esm/Popup.js +5 -3
  27. package/dist/esm/Progress.js +5 -3
  28. package/dist/esm/PullToRefresh.js +1 -30
  29. package/dist/esm/Radio.js +5 -3
  30. package/dist/esm/Rate.js +10 -8
  31. package/dist/esm/SearchBar.js +5 -3
  32. package/dist/esm/ShortPassword.js +5 -3
  33. package/dist/esm/Step.js +5 -3
  34. package/dist/esm/Sticky/style/index.js +2 -0
  35. package/dist/esm/Sticky.js +209 -0
  36. package/dist/esm/TabbarItem.js +5 -3
  37. package/dist/esm/Table.js +5 -3
  38. package/dist/esm/Tabs.js +2 -2
  39. package/dist/esm/Tag.js +5 -3
  40. package/dist/esm/Toast.js +1 -1
  41. package/dist/esm/Uploader.js +121 -44
  42. package/dist/esm/get-scroll-parent-3dcd3f53.js +32 -0
  43. package/dist/esm/nutui-react.es.js +1 -0
  44. package/dist/esm/render-18227751.js +43 -0
  45. package/dist/esm/{tabs-41234c2c.js → tabs-0896a61b.js} +5 -3
  46. package/dist/esm/types/src/packages/button/demo.d.ts +1 -0
  47. package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +1 -0
  48. package/dist/esm/types/src/packages/drag/drag.d.ts +1 -1
  49. package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +1 -1
  50. package/dist/esm/types/src/packages/griditem/griditem.d.ts +1 -1
  51. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +3 -3
  52. package/dist/esm/types/src/packages/input/input.d.ts +1 -1
  53. package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +1 -1
  54. package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -1
  55. package/dist/esm/types/src/packages/nutui.react.d.ts +3 -1
  56. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +1 -0
  57. package/dist/esm/types/src/packages/nutui.react.taro.d.ts +3 -1
  58. package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -1
  59. package/dist/esm/types/src/packages/popover/popover.d.ts +1 -1
  60. package/dist/esm/types/src/packages/progress/progress.d.ts +1 -1
  61. package/dist/esm/types/src/packages/radio/radio.d.ts +1 -1
  62. package/dist/esm/types/src/packages/sticky/__test__/sticky.spec.d.ts +1 -0
  63. package/dist/esm/types/src/packages/sticky/demo.d.ts +3 -0
  64. package/dist/esm/types/src/packages/sticky/index.d.ts +2 -0
  65. package/dist/esm/types/src/packages/sticky/index.taro.d.ts +2 -0
  66. package/dist/esm/types/src/packages/sticky/sticky.d.ts +13 -0
  67. package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -1
  68. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -1
  69. package/dist/esm/types/src/packages/uploader/demo.d.ts +1 -0
  70. package/dist/esm/types/src/packages/uploader/upload.d.ts +4 -0
  71. package/dist/esm/types/src/packages/uploader/uploader.d.ts +16 -12
  72. package/dist/esm/types/src/utils/date.d.ts +1 -1
  73. package/dist/esm/types/src/utils/useWatch.d.ts +6 -0
  74. package/dist/locales/base.js +1 -1
  75. package/dist/locales/en-US.js +1 -1
  76. package/dist/locales/id-ID.js +1 -1
  77. package/dist/locales/zh-CN.js +1 -1
  78. package/dist/locales/zh-TW.js +1 -1
  79. package/dist/nutui.react.es.js +1002 -616
  80. package/dist/nutui.react.umd.js +1002 -615
  81. package/dist/packages/barrage/barrage.scss +7 -2
  82. package/dist/packages/circleprogress/circleprogress.scss +3 -0
  83. package/dist/packages/sticky/sticky.scss +0 -0
  84. package/dist/style.css +1 -1
  85. package/dist/style.es.js +1 -1
  86. package/dist/styles/themes/default.scss +1 -0
  87. package/dist/types/index.d.ts +37 -24
  88. package/dist/types/nutui.react.build.ts +3 -1
  89. package/package.json +10 -5
  90. package/dist/esm/render-4a3856cb.js +0 -32
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.3.3 Wed Sep 14 2022 14:14:07 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.3.4-beta.0 Wed Sep 21 2022 14:27:51 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -145,6 +145,8 @@ const Button = (props) => {
145
145
  onClick,
146
146
  className,
147
147
  style,
148
+ iconClassPrefix,
149
+ iconFontClassName,
148
150
  ...rest
149
151
  } = {
150
152
  ...defaultProps$1k,
@@ -215,12 +217,12 @@ const Button = (props) => {
215
217
  className: "nut-button__warp",
216
218
  style: getStyle()
217
219
  }, loading && /* @__PURE__ */ React__default.createElement(Icon$1, {
218
- classPrefix: props.iconClassPrefix,
219
- fontClassName: props.iconFontClassName,
220
+ classPrefix: iconClassPrefix,
221
+ fontClassName: iconFontClassName,
220
222
  name: "loading"
221
223
  }), !loading && icon ? /* @__PURE__ */ React__default.createElement(Icon$1, {
222
- classPrefix: props.iconClassPrefix,
223
- fontClassName: props.iconFontClassName,
224
+ classPrefix: iconClassPrefix,
225
+ fontClassName: iconFontClassName,
224
226
  name: icon
225
227
  }) : "", children));
226
228
  };
@@ -1481,6 +1483,8 @@ const Cell = (props) => {
1481
1483
  className,
1482
1484
  iconSlot,
1483
1485
  linkSlot,
1486
+ iconClassPrefix,
1487
+ iconFontClassName,
1484
1488
  ...rest
1485
1489
  } = {
1486
1490
  ...defaultProps$1j,
@@ -1514,8 +1518,8 @@ const Cell = (props) => {
1514
1518
  }, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
1515
1519
  className: b2("icon")
1516
1520
  }, iconSlot || (icon ? /* @__PURE__ */ React__default.createElement(Icon$1, {
1517
- classPrefix: props.iconClassPrefix,
1518
- fontClassName: props.iconFontClassName,
1521
+ classPrefix: iconClassPrefix,
1522
+ fontClassName: iconFontClassName,
1519
1523
  name: icon,
1520
1524
  className: "icon"
1521
1525
  }) : null)) : null, title || subTitle ? /* @__PURE__ */ React__default.createElement("div", {
@@ -1530,8 +1534,8 @@ const Cell = (props) => {
1530
1534
  }),
1531
1535
  style: styles
1532
1536
  }, desc) : null, !linkSlot && (isLink || to2) ? /* @__PURE__ */ React__default.createElement(Icon$1, {
1533
- classPrefix: props.iconClassPrefix,
1534
- fontClassName: props.iconFontClassName,
1537
+ classPrefix: iconClassPrefix,
1538
+ fontClassName: iconFontClassName,
1535
1539
  name: "right",
1536
1540
  className: b2("link")
1537
1541
  }) : linkSlot));
@@ -1565,9 +1569,9 @@ CellGroup.defaultProps = defaultProps$1i;
1565
1569
  CellGroup.displayName = "NutCellGroup";
1566
1570
  var classnames = { exports: {} };
1567
1571
  /*!
1568
- Copyright (c) 2018 Jed Watson.
1569
- Licensed under the MIT License (MIT), see
1570
- http://jedwatson.github.io/classnames
1572
+ Copyright (c) 2018 Jed Watson.
1573
+ Licensed under the MIT License (MIT), see
1574
+ http://jedwatson.github.io/classnames
1571
1575
  */
1572
1576
  (function(module) {
1573
1577
  (function() {
@@ -1589,14 +1593,14 @@ var classnames = { exports: {} };
1589
1593
  }
1590
1594
  }
1591
1595
  } else if (argType === "object") {
1592
- if (arg.toString === Object.prototype.toString) {
1593
- for (var key in arg) {
1594
- if (hasOwn.call(arg, key) && arg[key]) {
1595
- classes.push(key);
1596
- }
1597
- }
1598
- } else {
1596
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
1599
1597
  classes.push(arg.toString());
1598
+ continue;
1599
+ }
1600
+ for (var key in arg) {
1601
+ if (hasOwn.call(arg, key) && arg[key]) {
1602
+ classes.push(key);
1603
+ }
1600
1604
  }
1601
1605
  }
1602
1606
  }
@@ -2172,7 +2176,9 @@ const Popup = (props) => {
2172
2176
  onClickCloseIcon,
2173
2177
  onOpened,
2174
2178
  onClosed,
2175
- onClick
2179
+ onClick,
2180
+ iconClassPrefix,
2181
+ iconFontClassName
2176
2182
  } = props;
2177
2183
  const [index2, setIndex] = useState(zIndex || _zIndex);
2178
2184
  const [innerVisible, setInnerVisible] = useState(visible);
@@ -2271,8 +2277,8 @@ const Popup = (props) => {
2271
2277
  className: closeClasses,
2272
2278
  onClick: onHandleClickCloseIcon
2273
2279
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
2274
- classPrefix: props.iconClassPrefix,
2275
- fontClassName: props.iconFontClassName,
2280
+ classPrefix: iconClassPrefix,
2281
+ fontClassName: iconFontClassName,
2276
2282
  name: closeIcon,
2277
2283
  size: "12px"
2278
2284
  })) : ""));
@@ -2684,8 +2690,13 @@ const GridItem = (props) => {
2684
2690
  center,
2685
2691
  reverse,
2686
2692
  direction,
2693
+ iconClassPrefix,
2694
+ iconFontClassName,
2687
2695
  ...rest
2688
- } = { ...defaultProps$1a, ...props };
2696
+ } = {
2697
+ ...defaultProps$1a,
2698
+ ...props
2699
+ };
2689
2700
  const b2 = cn("grid-item");
2690
2701
  const pxCheck2 = (value) => {
2691
2702
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -2718,8 +2729,8 @@ const GridItem = (props) => {
2718
2729
  }, /* @__PURE__ */ React__default.createElement("div", {
2719
2730
  className: contentClass()
2720
2731
  }, icon && isIconName() ? /* @__PURE__ */ React__default.createElement(Icon$1, {
2721
- classPrefix: props.iconClassPrefix,
2722
- fontClassName: props.iconFontClassName,
2732
+ classPrefix: iconClassPrefix,
2733
+ fontClassName: iconFontClassName,
2723
2734
  name: icon,
2724
2735
  size: iconSize || parentIconSize,
2725
2736
  color: iconColor || parentIconColor
@@ -2729,6 +2740,218 @@ const GridItem = (props) => {
2729
2740
  };
2730
2741
  GridItem.defaultProps = defaultProps$1a;
2731
2742
  GridItem.displayName = "NutGridItem";
2743
+ const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2744
+ const defaultRoot = canUseDom ? window : void 0;
2745
+ const overflowStylePatterns = ["scroll", "auto", "overlay"];
2746
+ function isElement(node) {
2747
+ const ELEMENT_NODE_TYPE = 1;
2748
+ return node.nodeType === ELEMENT_NODE_TYPE;
2749
+ }
2750
+ function getScrollParent(el, root = defaultRoot) {
2751
+ let node = el;
2752
+ while (node && node !== root && isElement(node)) {
2753
+ if (node === document.body) {
2754
+ return root;
2755
+ }
2756
+ const { overflowY } = window.getComputedStyle(node);
2757
+ if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
2758
+ return node;
2759
+ }
2760
+ node = node.parentNode;
2761
+ }
2762
+ return root;
2763
+ }
2764
+ function isWindow(val) {
2765
+ return val === window;
2766
+ }
2767
+ const getRect = (elementRef) => {
2768
+ const element = elementRef;
2769
+ if (isWindow(element)) {
2770
+ const width = element.innerWidth;
2771
+ const height = element.innerHeight;
2772
+ return {
2773
+ top: 0,
2774
+ left: 0,
2775
+ right: width,
2776
+ bottom: height,
2777
+ width,
2778
+ height
2779
+ };
2780
+ }
2781
+ if (element && element.getBoundingClientRect) {
2782
+ return element.getBoundingClientRect();
2783
+ }
2784
+ return {
2785
+ top: 0,
2786
+ left: 0,
2787
+ right: 0,
2788
+ bottom: 0,
2789
+ width: 0,
2790
+ height: 0
2791
+ };
2792
+ };
2793
+ function useWatch(dep, callback, config2 = { immediate: false }) {
2794
+ const { immediate } = config2;
2795
+ const prev = useRef();
2796
+ const inited = useRef(false);
2797
+ const stop2 = useRef(false);
2798
+ useEffect(() => {
2799
+ const execute = () => callback(prev.current);
2800
+ if (!stop2.current) {
2801
+ if (!inited.current) {
2802
+ inited.current = true;
2803
+ if (immediate) {
2804
+ execute();
2805
+ }
2806
+ } else {
2807
+ execute();
2808
+ }
2809
+ prev.current = dep;
2810
+ }
2811
+ }, [dep]);
2812
+ return () => {
2813
+ stop2.current = true;
2814
+ };
2815
+ }
2816
+ const Sticky = (props) => {
2817
+ const {
2818
+ position = "top",
2819
+ top = 0,
2820
+ bottom = 0,
2821
+ zIndex = 2e3,
2822
+ children,
2823
+ container,
2824
+ className,
2825
+ onChange,
2826
+ ...rest
2827
+ } = props;
2828
+ const stickyRef = useRef(null);
2829
+ const rootRef = useRef(null);
2830
+ const offset = position === "top" ? top : bottom;
2831
+ const [isFixed, setIsFixed] = useState(false);
2832
+ const [stickyStyle, setStickyStyle] = useState({
2833
+ [position]: `${offset}px`,
2834
+ zIndex
2835
+ });
2836
+ const [rootStyle, setRootStyle] = useState({});
2837
+ const getElement = useCallback(() => {
2838
+ return getScrollParent(rootRef.current);
2839
+ }, []);
2840
+ useEffect(() => {
2841
+ if (position === "top")
2842
+ return;
2843
+ const containerEle = container == null ? void 0 : container.current;
2844
+ if (!rootRef.current && !containerEle)
2845
+ return;
2846
+ const rootRect = getRect(rootRef.current);
2847
+ const containerRect = getRect(containerEle);
2848
+ const clientHeight = document.documentElement.clientHeight;
2849
+ const stCurrent = stickyRef.current;
2850
+ const stickyRect = getRect(stCurrent);
2851
+ let fixed = clientHeight - bottom < rootRect.bottom;
2852
+ if (containerEle) {
2853
+ fixed = containerRect.bottom > clientHeight - bottom - stickyRect.height && clientHeight - bottom - stickyRect.height > containerRect.top;
2854
+ }
2855
+ const defaultPostVal = fixed ? "fixed" : "inherit";
2856
+ setStickyStyle((prev) => {
2857
+ return {
2858
+ ...prev,
2859
+ position: defaultPostVal
2860
+ };
2861
+ });
2862
+ setIsFixed(fixed);
2863
+ }, [position, container, bottom]);
2864
+ const handleScroll = useCallback(() => {
2865
+ const containerEle = container == null ? void 0 : container.current;
2866
+ if (!rootRef.current && !containerEle)
2867
+ return;
2868
+ const rootRect = getRect(rootRef.current);
2869
+ const stCurrent = stickyRef.current;
2870
+ const stickyRect = getRect(stCurrent);
2871
+ const containerRect = getRect(containerEle);
2872
+ if (rootRect.height) {
2873
+ setRootStyle((prev) => {
2874
+ return {
2875
+ ...prev,
2876
+ height: rootRect.height
2877
+ };
2878
+ });
2879
+ }
2880
+ if (position === "top") {
2881
+ if (containerEle) {
2882
+ const fixed = top > rootRect.top && containerRect.bottom > 0;
2883
+ const positionVal = fixed ? "fixed" : "inherit";
2884
+ const diff = containerRect.bottom - top - stickyRect.height;
2885
+ const transform = diff < 0 ? diff : 0;
2886
+ setStickyStyle((prev) => {
2887
+ return {
2888
+ ...prev,
2889
+ position: positionVal,
2890
+ transform: `translate3d(0, ${transform}px, 0)`
2891
+ };
2892
+ });
2893
+ setIsFixed(fixed);
2894
+ } else {
2895
+ const fixed = top > rootRect.top;
2896
+ const positionVal = fixed ? "fixed" : "inherit";
2897
+ setStickyStyle((prev) => {
2898
+ return {
2899
+ ...prev,
2900
+ position: positionVal
2901
+ };
2902
+ });
2903
+ setIsFixed(fixed);
2904
+ }
2905
+ } else {
2906
+ const clientHeight = document.documentElement.clientHeight;
2907
+ if (containerEle) {
2908
+ const fixed = containerRect.bottom > 0 && clientHeight - bottom - stickyRect.height > containerRect.top;
2909
+ const positionVal = fixed ? "fixed" : "inherit";
2910
+ const diff = containerRect.bottom - (clientHeight - bottom);
2911
+ const transform = diff < 0 ? diff : 0;
2912
+ setStickyStyle((prev) => {
2913
+ return {
2914
+ ...prev,
2915
+ position: positionVal,
2916
+ transform: `translate3d(0, ${transform}px, 0)`
2917
+ };
2918
+ });
2919
+ setIsFixed(fixed);
2920
+ } else {
2921
+ const fixed = clientHeight - bottom < rootRect.bottom;
2922
+ const positionVal = fixed ? "fixed" : "inherit";
2923
+ setStickyStyle((prev) => {
2924
+ return {
2925
+ ...prev,
2926
+ position: positionVal
2927
+ };
2928
+ });
2929
+ setIsFixed(fixed);
2930
+ }
2931
+ }
2932
+ }, [position, bottom, container, top]);
2933
+ useWatch(isFixed, () => {
2934
+ onChange && onChange(isFixed);
2935
+ });
2936
+ useEffect(() => {
2937
+ const el = getElement();
2938
+ el.addEventListener("scroll", handleScroll, false);
2939
+ return () => {
2940
+ el.removeEventListener("tap", handleScroll);
2941
+ };
2942
+ }, [getElement, handleScroll]);
2943
+ return /* @__PURE__ */ React__default.createElement("div", {
2944
+ ref: rootRef,
2945
+ style: rootStyle,
2946
+ className: `nut-sticky ${className}`,
2947
+ ...rest
2948
+ }, /* @__PURE__ */ React__default.createElement("div", {
2949
+ className: "nut-sticky-box",
2950
+ ref: stickyRef,
2951
+ style: stickyStyle
2952
+ }, children));
2953
+ };
2954
+ Sticky.displayName = "NutSticky";
2732
2955
  const defaultProps$19 = {
2733
2956
  ...ComponentDefaults,
2734
2957
  title: "",
@@ -2761,7 +2984,9 @@ const NavBar = (props) => {
2761
2984
  onClickTitle,
2762
2985
  onClickIcon,
2763
2986
  onClickBack,
2764
- onClickRight
2987
+ onClickRight,
2988
+ iconClassPrefix,
2989
+ iconFontClassName
2765
2990
  } = {
2766
2991
  ...defaultProps$19,
2767
2992
  ...props
@@ -2786,8 +3011,8 @@ const NavBar = (props) => {
2786
3011
  className: `${b2("left")}`,
2787
3012
  onClick: (e2) => onClickBack(e2)
2788
3013
  }, leftShow && /* @__PURE__ */ React__default.createElement(Icon$1, {
2789
- classPrefix: props.iconClassPrefix,
2790
- fontClassName: props.iconFontClassName,
3014
+ classPrefix: iconClassPrefix,
3015
+ fontClassName: iconFontClassName,
2791
3016
  name: "left",
2792
3017
  color: "#979797"
2793
3018
  }), leftText && /* @__PURE__ */ React__default.createElement("div", {
@@ -2803,8 +3028,8 @@ const NavBar = (props) => {
2803
3028
  }, title), titIcon && /* @__PURE__ */ React__default.createElement("div", {
2804
3029
  onClick: (e2) => onClickIcon(e2)
2805
3030
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
2806
- classPrefix: props.iconClassPrefix,
2807
- fontClassName: props.iconFontClassName,
3031
+ classPrefix: iconClassPrefix,
3032
+ fontClassName: iconFontClassName,
2808
3033
  name: titIcon
2809
3034
  })), slot.content);
2810
3035
  };
@@ -2860,8 +3085,13 @@ const FixedNav = (props) => {
2860
3085
  type,
2861
3086
  slotList,
2862
3087
  slotBtn,
3088
+ iconClassPrefix,
3089
+ iconFontClassName,
2863
3090
  ...rest
2864
- } = { ...defaultProps$18, ...props };
3091
+ } = {
3092
+ ...defaultProps$18,
3093
+ ...props
3094
+ };
2865
3095
  const b2 = cn("fixednav");
2866
3096
  const classes = classNames(
2867
3097
  {
@@ -2906,8 +3136,8 @@ const FixedNav = (props) => {
2906
3136
  className: "nut-fixednav__btn",
2907
3137
  onClick: () => onUpdateValue()
2908
3138
  }, slotBtn || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon$1, {
2909
- classPrefix: props.iconClassPrefix,
2910
- fontClassName: props.iconFontClassName,
3139
+ classPrefix: iconClassPrefix,
3140
+ fontClassName: iconFontClassName,
2911
3141
  name: "left",
2912
3142
  color: "#fff"
2913
3143
  }), /* @__PURE__ */ React__default.createElement("div", {
@@ -3009,7 +3239,9 @@ const TabbarItem = (props) => {
3009
3239
  activeColor,
3010
3240
  unactiveColor,
3011
3241
  index: index2,
3012
- handleClick: handleClick2
3242
+ handleClick: handleClick2,
3243
+ iconClassPrefix,
3244
+ iconFontClassName
3013
3245
  } = {
3014
3246
  ...defaultProps$16,
3015
3247
  ...props
@@ -3043,8 +3275,8 @@ const TabbarItem = (props) => {
3043
3275
  }, "99+")) : /* @__PURE__ */ React__default.createElement("div", {
3044
3276
  className: `${bIcon("dot")}`
3045
3277
  }), icon && /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Icon$1, {
3046
- classPrefix: props.iconClassPrefix,
3047
- fontClassName: props.iconFontClassName,
3278
+ classPrefix: iconClassPrefix,
3279
+ fontClassName: iconFontClassName,
3048
3280
  size,
3049
3281
  name: icon
3050
3282
  })), /* @__PURE__ */ React__default.createElement("div", {
@@ -3156,10 +3388,14 @@ function capitalize(string) {
3156
3388
  return "";
3157
3389
  return string[0].toUpperCase() + string.slice(1);
3158
3390
  }
3391
+ const actionsWithoutCaptureSupported = ["enter", "leave"];
3392
+ function hasCapture(capture = false, actionKey) {
3393
+ return capture && !actionsWithoutCaptureSupported.includes(actionKey);
3394
+ }
3159
3395
  function toHandlerProp(device, action = "", capture = false) {
3160
3396
  const deviceProps = EVENT_TYPE_MAP[device];
3161
3397
  const actionKey = deviceProps ? deviceProps[action] || action : action;
3162
- return "on" + capitalize(device) + capitalize(actionKey) + (capture ? "Capture" : "");
3398
+ return "on" + capitalize(device) + capitalize(actionKey) + (hasCapture(capture, actionKey) ? "Capture" : "");
3163
3399
  }
3164
3400
  const pointerCaptureEvents = ["gotpointercapture", "lostpointercapture"];
3165
3401
  function parseProp(prop) {
@@ -3185,6 +3421,13 @@ function toDomEventType(device, action = "") {
3185
3421
  function isTouch(event) {
3186
3422
  return "touches" in event;
3187
3423
  }
3424
+ function getPointerType(event) {
3425
+ if (isTouch(event))
3426
+ return "touch";
3427
+ if ("pointerType" in event)
3428
+ return event.pointerType;
3429
+ return "mouse";
3430
+ }
3188
3431
  function getCurrentTargetTouchList(event) {
3189
3432
  return Array.from(event.touches).filter((e2) => {
3190
3433
  var _event$currentTarget, _event$currentTarget$;
@@ -3414,6 +3657,8 @@ class Engine {
3414
3657
  const _absoluteDelta = state._delta.map(Math.abs);
3415
3658
  V.addTo(state._distance, _absoluteDelta);
3416
3659
  }
3660
+ if (this.axisIntent)
3661
+ this.axisIntent(event);
3417
3662
  const [_m0, _m1] = state._movement;
3418
3663
  const [t0, t1] = config2.threshold;
3419
3664
  const {
@@ -3443,8 +3688,8 @@ class Engine {
3443
3688
  movement[0] = _step[0] !== false ? _m0 - _step[0] : 0;
3444
3689
  movement[1] = _step[1] !== false ? _m1 - _step[1] : 0;
3445
3690
  }
3446
- if (this.intent)
3447
- this.intent(movement);
3691
+ if (this.restrictToAxis && !state._blocked)
3692
+ this.restrictToAxis(movement);
3448
3693
  const previousOffset = state.offset;
3449
3694
  const gestureIsActive = state._active && !state._blocked || state.active;
3450
3695
  if (gestureIsActive) {
@@ -3501,23 +3746,16 @@ class Engine {
3501
3746
  this.timeoutStore.clean();
3502
3747
  }
3503
3748
  }
3504
- function selectAxis([dx, dy]) {
3505
- const d2 = Math.abs(dx) - Math.abs(dy);
3506
- if (d2 > 0)
3749
+ function selectAxis([dx, dy], threshold) {
3750
+ const absDx = Math.abs(dx);
3751
+ const absDy = Math.abs(dy);
3752
+ if (absDx > absDy && absDx > threshold) {
3507
3753
  return "x";
3508
- if (d2 < 0)
3754
+ }
3755
+ if (absDy > absDx && absDy > threshold) {
3509
3756
  return "y";
3510
- return void 0;
3511
- }
3512
- function restrictVectorToAxis(v2, axis) {
3513
- switch (axis) {
3514
- case "x":
3515
- v2[1] = 0;
3516
- break;
3517
- case "y":
3518
- v2[0] = 0;
3519
- break;
3520
3757
  }
3758
+ return void 0;
3521
3759
  }
3522
3760
  class CoordinatesEngine extends Engine {
3523
3761
  constructor(...args) {
@@ -3538,13 +3776,25 @@ class CoordinatesEngine extends Engine {
3538
3776
  computeMovement() {
3539
3777
  this.state.movement = V.sub(this.state.offset, this.state.lastOffset);
3540
3778
  }
3541
- intent(v2) {
3542
- this.state.axis = this.state.axis || selectAxis(v2);
3543
- this.state._blocked = (this.config.lockDirection || !!this.config.axis) && !this.state.axis || !!this.config.axis && this.config.axis !== this.state.axis;
3544
- if (this.state._blocked)
3545
- return;
3779
+ axisIntent(event) {
3780
+ const state = this.state;
3781
+ const config2 = this.config;
3782
+ if (!state.axis && event) {
3783
+ const threshold = typeof config2.axisThreshold === "object" ? config2.axisThreshold[getPointerType(event)] : config2.axisThreshold;
3784
+ state.axis = selectAxis(state._movement, threshold);
3785
+ }
3786
+ state._blocked = (config2.lockDirection || !!config2.axis) && !state.axis || !!config2.axis && config2.axis !== state.axis;
3787
+ }
3788
+ restrictToAxis(v2) {
3546
3789
  if (this.config.axis || this.config.lockDirection) {
3547
- restrictVectorToAxis(v2, this.state.axis);
3790
+ switch (this.state.axis) {
3791
+ case "x":
3792
+ v2[1] = 0;
3793
+ break;
3794
+ case "y":
3795
+ v2[0] = 0;
3796
+ break;
3797
+ }
3548
3798
  }
3549
3799
  }
3550
3800
  }
@@ -3554,6 +3804,9 @@ const commonConfigResolver = {
3554
3804
  enabled(value = true) {
3555
3805
  return value;
3556
3806
  },
3807
+ eventOptions(value, _k, config2) {
3808
+ return _objectSpread2(_objectSpread2({}, config2.shared.eventOptions), value);
3809
+ },
3557
3810
  preventDefault(value = false) {
3558
3811
  return value;
3559
3812
  },
@@ -3585,6 +3838,7 @@ const commonConfigResolver = {
3585
3838
  return V.toVector(value, 0);
3586
3839
  }
3587
3840
  };
3841
+ const DEFAULT_AXIS_THRESHOLD = 0;
3588
3842
  const coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
3589
3843
  axis(_v, _k, {
3590
3844
  axis
@@ -3593,6 +3847,9 @@ const coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfig
3593
3847
  if (!this.lockDirection)
3594
3848
  return axis;
3595
3849
  },
3850
+ axisThreshold(value = DEFAULT_AXIS_THRESHOLD) {
3851
+ return value;
3852
+ },
3596
3853
  bounds(value = {}) {
3597
3854
  if (typeof value === "function") {
3598
3855
  return (state) => coordinatesConfigResolver.bounds(value(state));
@@ -3676,11 +3933,11 @@ class DragEngine extends CoordinatesEngine {
3676
3933
  const state = this.state;
3677
3934
  if (event.buttons != null && (Array.isArray(config2.pointerButtons) ? !config2.pointerButtons.includes(event.buttons) : config2.pointerButtons !== -1 && config2.pointerButtons !== event.buttons))
3678
3935
  return;
3679
- this.ctrl.setEventIds(event);
3936
+ const ctrlIds = this.ctrl.setEventIds(event);
3680
3937
  if (config2.pointerCapture) {
3681
3938
  event.target.setPointerCapture(event.pointerId);
3682
3939
  }
3683
- if (state._pointerActive)
3940
+ if (ctrlIds && ctrlIds.size > 1 && state._pointerActive)
3684
3941
  return;
3685
3942
  this.start(event);
3686
3943
  this.setupPointer(event);
@@ -3688,10 +3945,15 @@ class DragEngine extends CoordinatesEngine {
3688
3945
  state._pointerActive = true;
3689
3946
  this.computeValues(pointerValues(event));
3690
3947
  this.computeInitial();
3691
- if (config2.preventScroll) {
3948
+ if (config2.preventScrollAxis && getPointerType(event) !== "mouse") {
3949
+ state._active = false;
3692
3950
  this.setupScrollPrevention(event);
3693
3951
  } else if (config2.delay > 0) {
3694
3952
  this.setupDelayTrigger(event);
3953
+ if (config2.triggerAllEvents) {
3954
+ this.compute(event);
3955
+ this.emit();
3956
+ }
3695
3957
  } else {
3696
3958
  this.startPointerDrag(event);
3697
3959
  }
@@ -3723,13 +3985,13 @@ class DragEngine extends CoordinatesEngine {
3723
3985
  }
3724
3986
  V.addTo(state._movement, state._delta);
3725
3987
  this.compute(event);
3726
- if (state._delayed) {
3988
+ if (state._delayed && state.intentional) {
3727
3989
  this.timeoutStore.remove("dragDelay");
3728
3990
  state.active = false;
3729
3991
  this.startPointerDrag(event);
3730
3992
  return;
3731
3993
  }
3732
- if (config2.preventScroll && !state._preventScroll) {
3994
+ if (config2.preventScrollAxis && !state._preventScroll) {
3733
3995
  if (state.axis) {
3734
3996
  if (state.axis === config2.preventScrollAxis || config2.preventScrollAxis === "xy") {
3735
3997
  state._active = false;
@@ -3757,7 +4019,7 @@ class DragEngine extends CoordinatesEngine {
3757
4019
  }
3758
4020
  const state = this.state;
3759
4021
  const config2 = this.config;
3760
- if (!state._pointerActive)
4022
+ if (!state._active || !state._pointerActive)
3761
4023
  return;
3762
4024
  const id = pointerId(event);
3763
4025
  if (state._pointerId !== void 0 && id !== state._pointerId)
@@ -3786,14 +4048,14 @@ class DragEngine extends CoordinatesEngine {
3786
4048
  this.emit();
3787
4049
  }
3788
4050
  pointerClick(event) {
3789
- if (!this.state.tap) {
4051
+ if (!this.state.tap && event.detail > 0) {
3790
4052
  event.preventDefault();
3791
4053
  event.stopPropagation();
3792
4054
  }
3793
4055
  }
3794
4056
  setupPointer(event) {
3795
4057
  const config2 = this.config;
3796
- let device = config2.device;
4058
+ const device = config2.device;
3797
4059
  if (config2.pointerLock) {
3798
4060
  event.currentTarget.requestPointerLock();
3799
4061
  }
@@ -3814,29 +4076,29 @@ class DragEngine extends CoordinatesEngine {
3814
4076
  }
3815
4077
  }
3816
4078
  setupScrollPrevention(event) {
4079
+ this.state._preventScroll = false;
3817
4080
  persistEvent(event);
3818
- this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
3819
- passive: false
3820
- });
3821
- this.eventStore.add(this.sharedConfig.window, "touch", "end", this.clean.bind(this), {
3822
- passive: false
3823
- });
3824
- this.eventStore.add(this.sharedConfig.window, "touch", "cancel", this.clean.bind(this), {
4081
+ const remove = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
3825
4082
  passive: false
3826
4083
  });
3827
- this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScroll, event);
4084
+ this.eventStore.add(this.sharedConfig.window, "touch", "end", remove);
4085
+ this.eventStore.add(this.sharedConfig.window, "touch", "cancel", remove);
4086
+ this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScrollDelay, event);
3828
4087
  }
3829
4088
  setupDelayTrigger(event) {
3830
4089
  this.state._delayed = true;
3831
- this.timeoutStore.add("dragDelay", this.startPointerDrag.bind(this), this.config.delay, event);
4090
+ this.timeoutStore.add("dragDelay", () => {
4091
+ this.state._step = [0, 0];
4092
+ this.startPointerDrag(event);
4093
+ }, this.config.delay);
3832
4094
  }
3833
4095
  keyDown(event) {
3834
4096
  const deltaFn = KEYS_DELTA_MAP[event.key];
3835
4097
  if (deltaFn) {
3836
4098
  const state = this.state;
3837
4099
  const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
3838
- state._delta = deltaFn(factor);
3839
4100
  this.start(event);
4101
+ state._delta = deltaFn(factor);
3840
4102
  state._keyboardActive = true;
3841
4103
  V.addTo(state._movement, state._delta);
3842
4104
  this.compute(event);
@@ -3860,8 +4122,10 @@ class DragEngine extends CoordinatesEngine {
3860
4122
  bindFunction(device, "cancel", this.pointerUp.bind(this));
3861
4123
  bindFunction("lostPointerCapture", "", this.pointerUp.bind(this));
3862
4124
  }
3863
- bindFunction("key", "down", this.keyDown.bind(this));
3864
- bindFunction("key", "up", this.keyUp.bind(this));
4125
+ if (this.config.keys) {
4126
+ bindFunction("key", "down", this.keyDown.bind(this));
4127
+ bindFunction("key", "up", this.keyUp.bind(this));
4128
+ }
3865
4129
  if (this.config.filterTaps) {
3866
4130
  bindFunction("click", "", this.pointerClick.bind(this), {
3867
4131
  capture: true,
@@ -3906,6 +4170,11 @@ const DEFAULT_DRAG_DELAY = 180;
3906
4170
  const DEFAULT_SWIPE_VELOCITY = 0.5;
3907
4171
  const DEFAULT_SWIPE_DISTANCE = 50;
3908
4172
  const DEFAULT_SWIPE_DURATION = 250;
4173
+ const DEFAULT_DRAG_AXIS_THRESHOLD = {
4174
+ mouse: 0,
4175
+ touch: 0,
4176
+ pen: 8
4177
+ };
3909
4178
  const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
3910
4179
  device(_v, _k, {
3911
4180
  pointer: {
@@ -3925,15 +4194,13 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
3925
4194
  return "touch";
3926
4195
  return "mouse";
3927
4196
  },
3928
- preventScroll(value = false, _k, {
3929
- preventScrollAxis = "y"
4197
+ preventScrollAxis(value, _k, {
4198
+ preventScroll
3930
4199
  }) {
3931
- this.preventScrollAxis = preventScrollAxis;
3932
- if (!SUPPORT.touchscreen)
3933
- return false;
3934
- if (typeof value === "number")
3935
- return value;
3936
- return value ? DEFAULT_PREVENT_SCROLL_DELAY : false;
4200
+ this.preventScrollDelay = typeof preventScroll === "number" ? preventScroll : preventScroll || preventScroll === void 0 && value ? DEFAULT_PREVENT_SCROLL_DELAY : void 0;
4201
+ if (!SUPPORT.touchscreen || preventScroll === false)
4202
+ return void 0;
4203
+ return value ? value : preventScroll !== void 0 ? "y" : void 0;
3937
4204
  },
3938
4205
  pointerCapture(_v, _k, {
3939
4206
  pointer: {
@@ -3944,6 +4211,9 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
3944
4211
  this.pointerButtons = buttons;
3945
4212
  return !this.pointerLock && this.device === "pointer" && capture;
3946
4213
  },
4214
+ keys(value = true) {
4215
+ return value;
4216
+ },
3947
4217
  threshold(value, _k, {
3948
4218
  filterTaps = false,
3949
4219
  tapsThreshold = 3,
@@ -3974,10 +4244,15 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
3974
4244
  default:
3975
4245
  return value;
3976
4246
  }
4247
+ },
4248
+ axisThreshold(value) {
4249
+ if (!value)
4250
+ return DEFAULT_DRAG_AXIS_THRESHOLD;
4251
+ return _objectSpread2(_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
3977
4252
  }
3978
4253
  });
3979
4254
  const SCALE_ANGLE_RATIO_INTENT_DEG = 30;
3980
- const PINCH_WHEEL_RATIO = 36;
4255
+ const PINCH_WHEEL_RATIO = 100;
3981
4256
  class PinchEngine extends Engine {
3982
4257
  constructor(...args) {
3983
4258
  super(...args);
@@ -4016,19 +4291,22 @@ class PinchEngine extends Engine {
4016
4291
  } = this.state;
4017
4292
  this.state.movement = [offset[0] / lastOffset[0], offset[1] - lastOffset[1]];
4018
4293
  }
4019
- intent(v2) {
4294
+ axisIntent() {
4020
4295
  const state = this.state;
4296
+ const [_m0, _m1] = state._movement;
4021
4297
  if (!state.axis) {
4022
- const axisMovementDifference = Math.abs(v2[0]) * SCALE_ANGLE_RATIO_INTENT_DEG - Math.abs(v2[1]);
4298
+ const axisMovementDifference = Math.abs(_m0) * SCALE_ANGLE_RATIO_INTENT_DEG - Math.abs(_m1);
4023
4299
  if (axisMovementDifference < 0)
4024
4300
  state.axis = "angle";
4025
4301
  else if (axisMovementDifference > 0)
4026
4302
  state.axis = "scale";
4027
4303
  }
4304
+ }
4305
+ restrictToAxis(v2) {
4028
4306
  if (this.config.lockDirection) {
4029
- if (state.axis === "scale")
4307
+ if (this.state.axis === "scale")
4030
4308
  v2[1] = 0;
4031
- else if (state.axis === "angle")
4309
+ else if (this.state.axis === "angle")
4032
4310
  v2[0] = 0;
4033
4311
  }
4034
4312
  }
@@ -4179,7 +4457,8 @@ class PinchEngine extends Engine {
4179
4457
  this.emit();
4180
4458
  }
4181
4459
  wheel(event) {
4182
- if (!event.ctrlKey)
4460
+ const modifierKey = this.config.modifierKey;
4461
+ if (modifierKey && !event[modifierKey])
4183
4462
  return;
4184
4463
  if (!this.state._active)
4185
4464
  this.wheelStart(event);
@@ -4219,11 +4498,10 @@ class PinchEngine extends Engine {
4219
4498
  bindFunction(device, "change", this[device + "Move"].bind(this));
4220
4499
  bindFunction(device, "end", this[device + "End"].bind(this));
4221
4500
  bindFunction(device, "cancel", this[device + "End"].bind(this));
4222
- } else {
4223
- bindFunction("wheel", "", this.wheel.bind(this), {
4224
- passive: false
4225
- });
4226
4501
  }
4502
+ bindFunction("wheel", "", this.wheel.bind(this), {
4503
+ passive: false
4504
+ });
4227
4505
  }
4228
4506
  }
4229
4507
  const pinchConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
@@ -4271,6 +4549,11 @@ const pinchConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolv
4271
4549
  this.lockDirection = config2.axis === "lock";
4272
4550
  const threshold = V.toVector(value, this.lockDirection ? [0.1, 3] : 0);
4273
4551
  return threshold;
4552
+ },
4553
+ modifierKey(value) {
4554
+ if (value === void 0)
4555
+ return "ctrlKey";
4556
+ return value;
4274
4557
  }
4275
4558
  });
4276
4559
  class MoveEngine extends CoordinatesEngine {
@@ -4578,19 +4861,27 @@ function parse(config2, gestureKey) {
4578
4861
  return _config;
4579
4862
  }
4580
4863
  class EventStore {
4581
- constructor(ctrl) {
4582
- _defineProperty(this, "_listeners", []);
4864
+ constructor(ctrl, gestureKey) {
4865
+ _defineProperty(this, "_listeners", /* @__PURE__ */ new Set());
4583
4866
  this._ctrl = ctrl;
4867
+ this._gestureKey = gestureKey;
4584
4868
  }
4585
4869
  add(element, device, action, handler, options2) {
4870
+ const listeners = this._listeners;
4586
4871
  const type = toDomEventType(device, action);
4587
- const eventOptions = _objectSpread2(_objectSpread2({}, this._ctrl.config.shared.eventOptions), options2);
4872
+ const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
4873
+ const eventOptions = _objectSpread2(_objectSpread2({}, _options), options2);
4588
4874
  element.addEventListener(type, handler, eventOptions);
4589
- this._listeners.push(() => element.removeEventListener(type, handler, eventOptions));
4875
+ const remove = () => {
4876
+ element.removeEventListener(type, handler, eventOptions);
4877
+ listeners.delete(remove);
4878
+ };
4879
+ listeners.add(remove);
4880
+ return remove;
4590
4881
  }
4591
4882
  clean() {
4592
4883
  this._listeners.forEach((remove) => remove());
4593
- this._listeners = [];
4884
+ this._listeners.clear();
4594
4885
  }
4595
4886
  }
4596
4887
  class TimeoutStore {
@@ -4634,11 +4925,13 @@ class Controller$1 {
4634
4925
  setEventIds(event) {
4635
4926
  if (isTouch(event)) {
4636
4927
  this.touchIds = new Set(touchIds(event));
4928
+ return this.touchIds;
4637
4929
  } else if ("pointerId" in event) {
4638
4930
  if (event.type === "pointerup" || event.type === "pointercancel")
4639
4931
  this.pointerIds.delete(event.pointerId);
4640
4932
  else if (event.type === "pointerdown")
4641
4933
  this.pointerIds.add(event.pointerId);
4934
+ return this.pointerIds;
4642
4935
  }
4643
4936
  }
4644
4937
  applyHandlers(handlers, nativeHandlers) {
@@ -4662,7 +4955,6 @@ class Controller$1 {
4662
4955
  }
4663
4956
  bind(...args) {
4664
4957
  const sharedConfig = this.config.shared;
4665
- const eventOptions = sharedConfig.eventOptions;
4666
4958
  const props = {};
4667
4959
  let target;
4668
4960
  if (sharedConfig.target) {
@@ -4670,16 +4962,18 @@ class Controller$1 {
4670
4962
  if (!target)
4671
4963
  return;
4672
4964
  }
4673
- const bindFunction = bindToProps(props, eventOptions, !!target);
4674
4965
  if (sharedConfig.enabled) {
4675
4966
  for (const gestureKey of this.gestures) {
4676
- if (this.config[gestureKey].enabled) {
4967
+ const gestureConfig = this.config[gestureKey];
4968
+ const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);
4969
+ if (gestureConfig.enabled) {
4677
4970
  const Engine2 = EngineMap.get(gestureKey);
4678
4971
  new Engine2(this, args, gestureKey).bind(bindFunction);
4679
4972
  }
4680
4973
  }
4974
+ const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
4681
4975
  for (const eventKey in this.nativeHandlers) {
4682
- bindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
4976
+ nativeBindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
4683
4977
  event,
4684
4978
  args
4685
4979
  })), void 0, true);
@@ -4705,7 +4999,7 @@ class Controller$1 {
4705
4999
  }
4706
5000
  function setupGesture(ctrl, gestureKey) {
4707
5001
  ctrl.gestures.add(gestureKey);
4708
- ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl);
5002
+ ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
4709
5003
  ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
4710
5004
  }
4711
5005
  function resolveGestures(ctrl, internalHandlers) {
@@ -4796,26 +5090,26 @@ function useRecognizers(handlers, config2 = {}, gestureKey, nativeHandlers) {
4796
5090
  }
4797
5091
  return void 0;
4798
5092
  }
4799
- function useDrag(handler, config2 = {}) {
5093
+ function useDrag(handler, config2) {
4800
5094
  registerAction(dragAction);
4801
5095
  return useRecognizers({
4802
5096
  drag: handler
4803
- }, config2, "drag");
5097
+ }, config2 || {}, "drag");
4804
5098
  }
4805
5099
  function createUseGesture(actions) {
4806
5100
  actions.forEach(registerAction);
4807
- return function useGesture2(_handlers, _config = {}) {
5101
+ return function useGesture2(_handlers, _config) {
4808
5102
  const {
4809
5103
  handlers,
4810
5104
  nativeHandlers,
4811
5105
  config: config2
4812
- } = parseMergedHandlers(_handlers, _config);
5106
+ } = parseMergedHandlers(_handlers, _config || {});
4813
5107
  return useRecognizers(handlers, config2, void 0, nativeHandlers);
4814
5108
  };
4815
5109
  }
4816
- function useGesture(handlers, config2 = {}) {
5110
+ function useGesture(handlers, config2) {
4817
5111
  const hook = createUseGesture([dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction]);
4818
- return hook(handlers, config2);
5112
+ return hook(handlers, config2 || {});
4819
5113
  }
4820
5114
  let updateQueue = makeQueue();
4821
5115
  const raf = (fn) => schedule(fn, updateQueue);
@@ -5458,7 +5752,7 @@ function findRange(input, inputRange) {
5458
5752
  return i - 1;
5459
5753
  }
5460
5754
  function _extends$2() {
5461
- _extends$2 = Object.assign || function(target) {
5755
+ _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
5462
5756
  for (var i = 1; i < arguments.length; i++) {
5463
5757
  var source = arguments[i];
5464
5758
  for (var key in source) {
@@ -5871,7 +6165,7 @@ function getAnimatedType(value) {
5871
6165
  return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
5872
6166
  }
5873
6167
  function _extends$1() {
5874
- _extends$1 = Object.assign || function(target) {
6168
+ _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
5875
6169
  for (var i = 1; i < arguments.length; i++) {
5876
6170
  var source = arguments[i];
5877
6171
  for (var key in source) {
@@ -5990,7 +6284,7 @@ const createHost = (components, {
5990
6284
  };
5991
6285
  const getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;
5992
6286
  function _extends() {
5993
- _extends = Object.assign || function(target) {
6287
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
5994
6288
  for (var i = 1; i < arguments.length; i++) {
5995
6289
  var source = arguments[i];
5996
6290
  for (var key in source) {
@@ -6623,6 +6917,7 @@ class SpringValue extends FrameValue {
6623
6917
  const from = anim.fromValues[i];
6624
6918
  const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i] : config2.velocity;
6625
6919
  let velocity;
6920
+ const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
6626
6921
  if (!is.und(config2.duration)) {
6627
6922
  let p2 = 1;
6628
6923
  if (config2.duration > 0) {
@@ -6644,11 +6939,10 @@ class SpringValue extends FrameValue {
6644
6939
  const decay = config2.decay === true ? 0.998 : config2.decay;
6645
6940
  const e2 = Math.exp(-(1 - decay) * elapsed);
6646
6941
  position = from + v0 / (1 - decay) * (1 - e2);
6647
- finished = Math.abs(node2.lastPosition - position) < 0.1;
6942
+ finished = Math.abs(node2.lastPosition - position) <= precision;
6648
6943
  velocity = v0 * e2;
6649
6944
  } else {
6650
6945
  velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
6651
- const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
6652
6946
  const restVelocity = config2.restVelocity || precision / 10;
6653
6947
  const bounceFactor = config2.clamp ? 0 : config2.bounce;
6654
6948
  const canBounce = !is.und(bounceFactor);
@@ -8382,8 +8676,13 @@ const Tabs = (props) => {
8382
8676
  onChange,
8383
8677
  className,
8384
8678
  autoHeight,
8679
+ iconClassPrefix,
8680
+ iconFontClassName,
8385
8681
  ...rest
8386
- } = { ...defaultProps$13, ...props };
8682
+ } = {
8683
+ ...defaultProps$13,
8684
+ ...props
8685
+ };
8387
8686
  const [currentItem, setCurrentItem] = useState({ index: 0 });
8388
8687
  const titles = useRef([]);
8389
8688
  useEffect(() => {
@@ -8464,8 +8763,8 @@ const Tabs = (props) => {
8464
8763
  className: `${b2("")}__titles-item__smile`,
8465
8764
  style: tabsActiveStyle
8466
8765
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
8467
- classPrefix: props.iconClassPrefix,
8468
- fontClassName: props.iconFontClassName,
8766
+ classPrefix: iconClassPrefix,
8767
+ fontClassName: iconFontClassName,
8469
8768
  color,
8470
8769
  name: "joy-smile"
8471
8770
  })), /* @__PURE__ */ React__default.createElement("div", {
@@ -8735,6 +9034,8 @@ const Menu = (props) => {
8735
9034
  closeOnClickOverlay,
8736
9035
  children,
8737
9036
  activeColor,
9037
+ iconClassPrefix,
9038
+ iconFontClassName,
8738
9039
  ...rest
8739
9040
  } = {
8740
9041
  ...defaultProps$_,
@@ -8834,8 +9135,8 @@ const Menu = (props) => {
8834
9135
  }, /* @__PURE__ */ React__default.createElement("div", {
8835
9136
  className: "nut-menu__title-text"
8836
9137
  }, finallyTitle()), /* @__PURE__ */ React__default.createElement(Icon$1, {
8837
- classPrefix: props.iconClassPrefix,
8838
- fontClassName: props.iconFontClassName,
9138
+ classPrefix: iconClassPrefix,
9139
+ fontClassName: iconFontClassName,
8839
9140
  className: "nut-menu__title-icon",
8840
9141
  size: "10",
8841
9142
  name: titleIcon || (direction === "up" ? "arrow-up" : "down-arrow")
@@ -8867,14 +9168,14 @@ const MenuItem = (props) => {
8867
9168
  value,
8868
9169
  columns,
8869
9170
  title,
8870
- iconClassPrefix,
8871
- fontClassName,
8872
9171
  optionsIcon,
8873
9172
  direction,
8874
9173
  onChange,
8875
9174
  activeTitleClass,
8876
9175
  inactiveTitleClass,
8877
- children
9176
+ children,
9177
+ iconClassPrefix,
9178
+ iconFontClassName
8878
9179
  } = {
8879
9180
  ...defaultProps$Z,
8880
9181
  ...props
@@ -8983,8 +9284,8 @@ const MenuItem = (props) => {
8983
9284
  handleClick2(item);
8984
9285
  }
8985
9286
  }, item.value === _value ? /* @__PURE__ */ React__default.createElement(Icon$1, {
8986
- classPrefix: props.iconClassPrefix,
8987
- fontClassName: props.iconFontClassName,
9287
+ classPrefix: iconClassPrefix,
9288
+ fontClassName: iconFontClassName,
8988
9289
  className: getIconCName(item.value, value),
8989
9290
  name: optionsIcon,
8990
9291
  color: activeColor
@@ -9063,40 +9364,15 @@ function useTouch() {
9063
9364
  isHorizontal
9064
9365
  };
9065
9366
  }
9066
- function isWindow(val) {
9067
- return val === window;
9068
- }
9069
- const getRect = (elementRef) => {
9070
- const element = elementRef;
9071
- if (isWindow(element)) {
9072
- const width = element.innerWidth;
9073
- const height = element.innerHeight;
9074
- return {
9075
- top: 0,
9076
- left: 0,
9077
- right: width,
9078
- bottom: height,
9079
- width,
9080
- height
9081
- };
9082
- }
9083
- if (element && element.getBoundingClientRect) {
9084
- return element.getBoundingClientRect();
9085
- }
9086
- return {
9087
- top: 0,
9088
- left: 0,
9089
- right: 0,
9090
- bottom: 0,
9091
- width: 0,
9092
- height: 0
9093
- };
9094
- };
9095
9367
  let createRoot;
9368
+ const { version } = ReactDOM;
9369
+ const reactDOMClone = {
9370
+ ...ReactDOM
9371
+ };
9096
9372
  try {
9097
- const mainVersion = Number((ReactDOM.version || "").split(".")[0]);
9098
- if (mainVersion >= 18 && ReactDOM.createRoot) {
9099
- createRoot = ReactDOM.createRoot;
9373
+ const mainVersion = Number((version || "").split(".")[0]);
9374
+ if (mainVersion >= 18) {
9375
+ createRoot = reactDOMClone.createRoot;
9100
9376
  }
9101
9377
  } catch (e2) {
9102
9378
  console.log(e2);
@@ -9105,8 +9381,10 @@ function legacyRender(node, container) {
9105
9381
  ReactDOM.render(node, container);
9106
9382
  }
9107
9383
  function concurrentRender(node, container) {
9108
- const root = ReactDOM.createRoot(container);
9109
- root.render(node);
9384
+ if (createRoot) {
9385
+ const root = createRoot(container);
9386
+ root.render(node);
9387
+ }
9110
9388
  }
9111
9389
  function render(node, container) {
9112
9390
  if (createRoot) {
@@ -10633,7 +10911,10 @@ const defaultProps$U = {
10633
10911
  }
10634
10912
  };
10635
10913
  const Checkbox = (props) => {
10636
- const { children } = { ...defaultProps$U, ...props };
10914
+ const { children } = {
10915
+ ...defaultProps$U,
10916
+ ...props
10917
+ };
10637
10918
  const b2 = cn("checkbox");
10638
10919
  const {
10639
10920
  iconName,
@@ -10674,8 +10955,8 @@ const Checkbox = (props) => {
10674
10955
  };
10675
10956
  const renderIcon = () => {
10676
10957
  return /* @__PURE__ */ React__default.createElement(Icon$1, {
10677
- classPrefix: props.iconClassPrefix,
10678
- fontClassName: props.iconFontClassName,
10958
+ classPrefix: iconClassPrefix,
10959
+ fontClassName: iconFontClassName,
10679
10960
  name: getIconName(),
10680
10961
  size: iconSize,
10681
10962
  className: color()
@@ -10950,7 +11231,7 @@ const InternalPicker = (props, ref) => {
10950
11231
  const [refs, setRefs] = useRefs();
10951
11232
  const [columnsList, setColumnsList] = useState([]);
10952
11233
  const b2 = cn("picker");
10953
- let isConfirmEvent = useRef(false);
11234
+ const isConfirmEvent = useRef(false);
10954
11235
  useEffect(() => {
10955
11236
  if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString()) {
10956
11237
  const data = [...defaultValueData];
@@ -11474,6 +11755,8 @@ const InputNumber = (props) => {
11474
11755
  overlimit,
11475
11756
  blur,
11476
11757
  focus,
11758
+ iconClassPrefix,
11759
+ iconFontClassName,
11477
11760
  ...restProps
11478
11761
  } = {
11479
11762
  ...defaultProps$S,
@@ -11579,8 +11862,8 @@ const InputNumber = (props) => {
11579
11862
  style: styles,
11580
11863
  ...restProps
11581
11864
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
11582
- classPrefix: props.iconClassPrefix,
11583
- fontClassName: props.iconFontClassName,
11865
+ classPrefix: iconClassPrefix,
11866
+ fontClassName: iconFontClassName,
11584
11867
  className: iconMinusClasses,
11585
11868
  size: buttonSize,
11586
11869
  name: "minus",
@@ -11597,8 +11880,8 @@ const InputNumber = (props) => {
11597
11880
  onBlur: burValue,
11598
11881
  onFocus: focusValue
11599
11882
  }), /* @__PURE__ */ React__default.createElement(Icon$1, {
11600
- classPrefix: props.iconClassPrefix,
11601
- fontClassName: props.iconFontClassName,
11883
+ classPrefix: iconClassPrefix,
11884
+ fontClassName: iconFontClassName,
11602
11885
  className: iconAddClasses,
11603
11886
  size: buttonSize,
11604
11887
  name: "plus",
@@ -11714,8 +11997,13 @@ const Input = (props) => {
11714
11997
  clickLeftIcon,
11715
11998
  clickRightIcon,
11716
11999
  click,
12000
+ iconClassPrefix,
12001
+ iconFontClassName,
11717
12002
  ...rest
11718
- } = { ...defaultProps$R, ...props };
12003
+ } = {
12004
+ ...defaultProps$R,
12005
+ ...props
12006
+ };
11719
12007
  locale.placeholder = placeholder || locale.placeholder;
11720
12008
  const [inputValue, SetInputValue] = useState("");
11721
12009
  const [active, SetActive] = useState(false);
@@ -11843,8 +12131,8 @@ const Input = (props) => {
11843
12131
  onClickLeftIcon(e2);
11844
12132
  }
11845
12133
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
11846
- classPrefix: props.iconClassPrefix,
11847
- fontClassName: props.iconFontClassName,
12134
+ classPrefix: iconClassPrefix,
12135
+ fontClassName: iconFontClassName,
11848
12136
  name: leftIcon,
11849
12137
  size: leftIconSize
11850
12138
  })) : null, /* @__PURE__ */ React__default.createElement("div", {
@@ -11902,8 +12190,8 @@ const Input = (props) => {
11902
12190
  onInput(e2);
11903
12191
  }
11904
12192
  }), clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ React__default.createElement(Icon$1, {
11905
- classPrefix: props.iconClassPrefix,
11906
- fontClassName: props.iconFontClassName,
12193
+ classPrefix: iconClassPrefix,
12194
+ fontClassName: iconFontClassName,
11907
12195
  className: "nut-input-clear",
11908
12196
  name: clearIcon,
11909
12197
  size: clearSize,
@@ -11916,8 +12204,8 @@ const Input = (props) => {
11916
12204
  onClickRightIcon(e2);
11917
12205
  }
11918
12206
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
11919
- classPrefix: props.iconClassPrefix,
11920
- fontClassName: props.iconFontClassName,
12207
+ classPrefix: iconClassPrefix,
12208
+ fontClassName: iconFontClassName,
11921
12209
  name: rightIcon,
11922
12210
  size: rightIconSize
11923
12211
  })) : null, slotButton ? /* @__PURE__ */ React__default.createElement("div", {
@@ -12004,7 +12292,10 @@ const defaultProps$P = {
12004
12292
  }
12005
12293
  };
12006
12294
  const Radio = (props) => {
12007
- const { children } = { ...defaultProps$P, ...props };
12295
+ const { children } = {
12296
+ ...defaultProps$P,
12297
+ ...props
12298
+ };
12008
12299
  const {
12009
12300
  className,
12010
12301
  disabled,
@@ -12016,6 +12307,8 @@ const Radio = (props) => {
12016
12307
  iconActiveName,
12017
12308
  iconSize,
12018
12309
  onChange,
12310
+ iconClassPrefix,
12311
+ iconFontClassName,
12019
12312
  ...rest
12020
12313
  } = props;
12021
12314
  const componentName = "nut-radio";
@@ -12050,8 +12343,8 @@ const Radio = (props) => {
12050
12343
  const renderIcon = () => {
12051
12344
  const { iconName: iconName2, iconSize: iconSize2, iconActiveName: iconActiveName2 } = props;
12052
12345
  return /* @__PURE__ */ React__default.createElement(Icon$1, {
12053
- classPrefix: props.iconClassPrefix,
12054
- fontClassName: props.iconFontClassName,
12346
+ classPrefix: iconClassPrefix,
12347
+ fontClassName: iconFontClassName,
12055
12348
  name: checkedStatement ? iconActiveName2 : iconName2,
12056
12349
  size: iconSize2,
12057
12350
  className: color()
@@ -12112,8 +12405,13 @@ const Rate = (props) => {
12112
12405
  readonly,
12113
12406
  allowHalf,
12114
12407
  spacing,
12115
- onChange
12116
- } = { ...defaultProps$O, ...props };
12408
+ onChange,
12409
+ iconClassPrefix,
12410
+ iconFontClassName
12411
+ } = {
12412
+ ...defaultProps$O,
12413
+ ...props
12414
+ };
12117
12415
  const b2 = cn("rate");
12118
12416
  const bi = cn("rate-item");
12119
12417
  const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
@@ -12160,22 +12458,22 @@ const Rate = (props) => {
12160
12458
  onClick: (event) => onClick(event, n2),
12161
12459
  style: { marginRight: pxCheck2(spacing) }
12162
12460
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12163
- classPrefix: props.iconClassPrefix,
12164
- fontClassName: props.iconFontClassName,
12461
+ classPrefix: iconClassPrefix,
12462
+ fontClassName: iconFontClassName,
12165
12463
  size: iconSize,
12166
12464
  className: `${bi("icon")} ${disabled || n2 > score ? bi("icon--disabled") : ""}`,
12167
12465
  name: n2 <= score ? checkedIcon : uncheckedIcon,
12168
12466
  color: n2 <= score ? activeColor : voidColor
12169
12467
  }), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon$1, {
12170
- classPrefix: props.iconClassPrefix,
12171
- fontClassName: props.iconFontClassName,
12468
+ classPrefix: iconClassPrefix,
12469
+ fontClassName: iconFontClassName,
12172
12470
  className: `${bi("icon")} ${bi("icon--half")}`,
12173
12471
  color: n2 <= score ? activeColor : voidColor,
12174
12472
  size: iconSize,
12175
12473
  name: checkedIcon
12176
12474
  }), allowHalf && score < n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon$1, {
12177
- classPrefix: props.iconClassPrefix,
12178
- fontClassName: props.iconFontClassName,
12475
+ classPrefix: iconClassPrefix,
12476
+ fontClassName: iconFontClassName,
12179
12477
  className: `${bi("icon")} ${bi("icon--disabled")} ${bi(
12180
12478
  "icon--half"
12181
12479
  )}`,
@@ -12232,6 +12530,8 @@ const ShortPassword = (props) => {
12232
12530
  onCancel,
12233
12531
  onClose,
12234
12532
  onComplete,
12533
+ iconClassPrefix,
12534
+ iconFontClassName,
12235
12535
  ...reset
12236
12536
  } = props;
12237
12537
  const b2 = cn("shortpassword");
@@ -12336,8 +12636,8 @@ const ShortPassword = (props) => {
12336
12636
  }, errorMsg2), tips || locale.shortpassword.tips ? /* @__PURE__ */ React__default.createElement("div", {
12337
12637
  className: b2("message__forget")
12338
12638
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12339
- classPrefix: props.iconClassPrefix,
12340
- fontClassName: props.iconFontClassName,
12639
+ classPrefix: iconClassPrefix,
12640
+ fontClassName: iconFontClassName,
12341
12641
  className: "icon",
12342
12642
  size: "11px",
12343
12643
  name: "tips"
@@ -12484,25 +12784,218 @@ const TextArea = (props) => {
12484
12784
  };
12485
12785
  TextArea.defaultProps = defaultProps$M;
12486
12786
  TextArea.displayName = "NutTextArea";
12487
- class UploadOptions {
12488
- constructor() {
12489
- this.url = "";
12490
- this.name = "file";
12491
- this.method = "post";
12492
- this.xhrState = 200;
12493
- this.timeout = 30 * 1e3;
12494
- this.headers = {};
12495
- this.withCredentials = false;
12496
- }
12497
- }
12498
- class Upload {
12499
- constructor(options2) {
12500
- this.options = options2;
12501
- }
12502
- upload() {
12503
- var _a;
12504
- const { options: options2 } = this;
12505
- const xhr = new XMLHttpRequest();
12787
+ const defaultProps$L = {
12788
+ name: "",
12789
+ size: "",
12790
+ classPrefix: "nut-icon",
12791
+ fontClassName: "nutui-iconfont",
12792
+ color: "",
12793
+ tag: "i",
12794
+ onClick: (e2) => {
12795
+ },
12796
+ className: ""
12797
+ };
12798
+ function pxCheck(value) {
12799
+ return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
12800
+ }
12801
+ function Icon(props) {
12802
+ const {
12803
+ name,
12804
+ size,
12805
+ classPrefix,
12806
+ color,
12807
+ tag,
12808
+ children,
12809
+ className,
12810
+ fontClassName,
12811
+ style,
12812
+ onClick,
12813
+ ...rest
12814
+ } = {
12815
+ ...defaultProps$L,
12816
+ ...props
12817
+ };
12818
+ const isImage = name ? name.indexOf("/") !== -1 : false;
12819
+ const type = isImage ? "img" : tag;
12820
+ const b2 = cn("icon");
12821
+ const handleClick2 = (e2) => {
12822
+ if (onClick) {
12823
+ onClick(e2);
12824
+ }
12825
+ };
12826
+ const hasSrc = () => {
12827
+ if (isImage)
12828
+ return { src: name };
12829
+ return {};
12830
+ };
12831
+ return React__default.createElement(
12832
+ type,
12833
+ {
12834
+ className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
12835
+ style: {
12836
+ color,
12837
+ fontSize: pxCheck(size),
12838
+ width: pxCheck(size),
12839
+ height: pxCheck(size),
12840
+ ...style
12841
+ },
12842
+ ...rest,
12843
+ onClick: handleClick2,
12844
+ ...hasSrc()
12845
+ },
12846
+ children
12847
+ );
12848
+ }
12849
+ Icon.defaultProps = defaultProps$L;
12850
+ Icon.displayName = "NutIcon";
12851
+ const defaultProps$K = {
12852
+ ...ComponentDefaults,
12853
+ className: "",
12854
+ style: {},
12855
+ isShowPercentage: true,
12856
+ percentage: 0,
12857
+ fillColor: "#f3f3f3",
12858
+ strokeColor: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
12859
+ strokeWidth: "",
12860
+ textColor: "",
12861
+ textWidth: "",
12862
+ showText: true,
12863
+ textInside: false,
12864
+ textBackground: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
12865
+ textType: "text",
12866
+ status: false,
12867
+ iconName: "checked",
12868
+ iconColor: "#439422",
12869
+ iconSize: "16px",
12870
+ rounded: true,
12871
+ children: void 0
12872
+ };
12873
+ const Progress = (props) => {
12874
+ const {
12875
+ className,
12876
+ style,
12877
+ isShowPercentage,
12878
+ percentage,
12879
+ fillColor,
12880
+ strokeColor,
12881
+ strokeWidth,
12882
+ size,
12883
+ textColor,
12884
+ textWidth,
12885
+ showText,
12886
+ textInside,
12887
+ textBackground,
12888
+ textType,
12889
+ status,
12890
+ iconName,
12891
+ iconColor,
12892
+ iconSize,
12893
+ rounded,
12894
+ children,
12895
+ iconClassPrefix,
12896
+ iconFontClassName,
12897
+ ...rest
12898
+ } = {
12899
+ ...defaultProps$K,
12900
+ ...props
12901
+ };
12902
+ const b2 = cn("progress");
12903
+ const classes = classNames(b2(""));
12904
+ const classesOuter = classNames({
12905
+ [`${b2("")}-outer`]: true,
12906
+ [`${b2("")}-${size || "base"}`]: true
12907
+ });
12908
+ const classesInner = classNames({
12909
+ [`${b2("")}-inner`]: true,
12910
+ [`${b2("")}-active`]: status
12911
+ });
12912
+ const classesText = classNames({
12913
+ [`${b2("")}-text`]: true
12914
+ });
12915
+ const classesInsideText = classNames({
12916
+ [`${b2("")}-text`]: true,
12917
+ [`${b2("")}-insidetext`]: true
12918
+ });
12919
+ const classesTextInner = classNames({
12920
+ [`${b2("")}-text__inner`]: true
12921
+ });
12922
+ const stylesOuter = {
12923
+ height: `${strokeWidth}px`,
12924
+ borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
12925
+ background: `${fillColor}`
12926
+ };
12927
+ const stylesInner = {
12928
+ width: `${percentage}%`,
12929
+ borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
12930
+ background: `${strokeColor}`
12931
+ };
12932
+ const stylesInsideText = {
12933
+ width: `${textWidth}px`,
12934
+ left: `${percentage}%`,
12935
+ background: textBackground || strokeColor
12936
+ };
12937
+ const stylesInsideIcon = {
12938
+ width: `${textWidth}px`,
12939
+ left: `${percentage}%`
12940
+ };
12941
+ const stylesText = {
12942
+ width: `${textWidth}px`
12943
+ };
12944
+ return /* @__PURE__ */ React__default.createElement("div", {
12945
+ className: `${classes} ${className}`,
12946
+ style,
12947
+ ...rest
12948
+ }, /* @__PURE__ */ React__default.createElement("div", {
12949
+ className: classesOuter,
12950
+ style: stylesOuter
12951
+ }, /* @__PURE__ */ React__default.createElement("div", {
12952
+ className: classesInner,
12953
+ style: stylesInner
12954
+ }, showText && textInside && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children ? /* @__PURE__ */ React__default.createElement("div", {
12955
+ className: classesInsideText,
12956
+ style: stylesInsideIcon
12957
+ }, children) : /* @__PURE__ */ React__default.createElement("div", {
12958
+ className: classesInsideText,
12959
+ style: stylesInsideText
12960
+ }, /* @__PURE__ */ React__default.createElement("span", {
12961
+ className: classesTextInner,
12962
+ style: { color: textColor || "#fff" }
12963
+ }, percentage, isShowPercentage ? "%" : ""))))), showText && !textInside && /* @__PURE__ */ React__default.createElement("div", {
12964
+ className: classesText,
12965
+ style: stylesText
12966
+ }, textType === "text" && /* @__PURE__ */ React__default.createElement("span", {
12967
+ className: classesTextInner,
12968
+ style: { color: textColor || "#333" }
12969
+ }, percentage, isShowPercentage ? "%" : ""), textType === "icon" && /* @__PURE__ */ React__default.createElement(Icon, {
12970
+ classPrefix: iconClassPrefix,
12971
+ fontClassName: iconFontClassName,
12972
+ size: iconSize,
12973
+ name: iconName,
12974
+ color: iconColor
12975
+ })));
12976
+ };
12977
+ Progress.defaultProps = defaultProps$K;
12978
+ Progress.displayName = "NutProgress";
12979
+ class UploadOptions {
12980
+ constructor() {
12981
+ this.url = "";
12982
+ this.name = "file";
12983
+ this.fileType = "image";
12984
+ this.method = "post";
12985
+ this.xhrState = 200;
12986
+ this.timeout = 30 * 1e3;
12987
+ this.headers = {};
12988
+ this.withCredentials = false;
12989
+ }
12990
+ }
12991
+ class Upload {
12992
+ constructor(options2) {
12993
+ this.options = options2;
12994
+ }
12995
+ upload() {
12996
+ var _a;
12997
+ const { options: options2 } = this;
12998
+ const xhr = new XMLHttpRequest();
12506
12999
  xhr.timeout = options2.timeout;
12507
13000
  if (xhr.upload) {
12508
13001
  xhr.upload.addEventListener(
@@ -12529,13 +13022,57 @@ class Upload {
12529
13022
  xhr.setRequestHeader(key, value);
12530
13023
  }
12531
13024
  (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
12532
- xhr.send(options2.formData);
13025
+ if (options2.beforeXhrUpload) {
13026
+ options2.beforeXhrUpload(xhr, options2);
13027
+ } else {
13028
+ xhr.send(options2.formData);
13029
+ }
12533
13030
  } else {
12534
13031
  console.warn("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 XMLHttpRequest");
12535
13032
  }
12536
13033
  }
13034
+ uploadTaro(uploadFile, env) {
13035
+ var _a;
13036
+ const options2 = this.options;
13037
+ if (env === "WEB") {
13038
+ this.upload();
13039
+ } else if (options2.beforeXhrUpload) {
13040
+ options2.beforeXhrUpload(uploadFile, options2);
13041
+ } else {
13042
+ const uploadTask = uploadFile({
13043
+ url: options2.url,
13044
+ filePath: options2.taroFilePath,
13045
+ fileType: options2.fileType,
13046
+ header: {
13047
+ "Content-Type": "multipart/form-data",
13048
+ ...options2.headers
13049
+ },
13050
+ formData: options2.formData,
13051
+ name: options2.name,
13052
+ success(response) {
13053
+ var _a2, _b;
13054
+ if (options2.xhrState == response.statusCode) {
13055
+ (_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, response, options2);
13056
+ } else {
13057
+ (_b = options2.onFailure) == null ? void 0 : _b.call(options2, response, options2);
13058
+ }
13059
+ },
13060
+ fail(e2) {
13061
+ var _a2;
13062
+ (_a2 = options2.onFailure) == null ? void 0 : _a2.call(options2, e2, options2);
13063
+ }
13064
+ });
13065
+ (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
13066
+ uploadTask.progress(
13067
+ (res) => {
13068
+ var _a2;
13069
+ (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, res, options2);
13070
+ }
13071
+ );
13072
+ }
13073
+ }
12537
13074
  }
12538
- const defaultProps$L = {
13075
+ const defaultProps$J = {
12539
13076
  ...ComponentDefaults,
12540
13077
  url: "",
12541
13078
  maximum: 1,
@@ -12555,11 +13092,11 @@ const defaultProps$L = {
12555
13092
  xhrState: 200,
12556
13093
  timeout: 1e3 * 30,
12557
13094
  withCredentials: false,
12558
- clearInput: false,
13095
+ clearInput: true,
12559
13096
  isPreview: true,
12560
13097
  isDeletable: true,
12561
13098
  capture: false,
12562
- beforeDelete: (file, files) => {
13099
+ onBeforeDelete: (file, files) => {
12563
13100
  return true;
12564
13101
  }
12565
13102
  };
@@ -12568,6 +13105,7 @@ class FileItem {
12568
13105
  this.status = "ready";
12569
13106
  this.message = "\u51C6\u5907\u4E2D..";
12570
13107
  this.uid = new Date().getTime().toString();
13108
+ this.percentage = 0;
12571
13109
  this.formData = new FormData();
12572
13110
  }
12573
13111
  }
@@ -12599,23 +13137,25 @@ const InternalUploader = (props, ref) => {
12599
13137
  className,
12600
13138
  autoUpload,
12601
13139
  clearInput,
12602
- start: start2,
12603
- removeImage,
12604
- change,
12605
- fileItemClick,
12606
- progress,
12607
- success,
12608
- update: update2,
12609
- failure,
12610
- oversize,
12611
- beforeUpload,
12612
- beforeDelete,
13140
+ iconClassPrefix,
13141
+ iconFontClassName,
13142
+ onStart,
13143
+ onRemove,
13144
+ onChange,
13145
+ onFileItemClick,
13146
+ onProgress,
13147
+ onSuccess,
13148
+ onUpdate,
13149
+ onFailure,
13150
+ onOversize,
13151
+ onBeforeUpload,
13152
+ onBeforeXhrUpload,
13153
+ onBeforeDelete,
12613
13154
  ...restProps
12614
- } = { ...defaultProps$L, ...props };
13155
+ } = { ...defaultProps$J, ...props };
12615
13156
  const [fileList, setFileList] = useState([]);
12616
13157
  const [uploadQueue, setUploadQueue] = useState([]);
12617
13158
  useEffect(() => {
12618
- console.log("defaultFileList", defaultFileList);
12619
13159
  if (defaultFileList) {
12620
13160
  setFileList(defaultFileList);
12621
13161
  }
@@ -12652,6 +13192,11 @@ const InternalUploader = (props, ref) => {
12652
13192
  uploadOption.xhrState = xhrState;
12653
13193
  uploadOption.headers = headers;
12654
13194
  uploadOption.withCredentials = withCredentials;
13195
+ uploadOption.beforeXhrUpload = onBeforeXhrUpload;
13196
+ try {
13197
+ uploadOption.sourceFile = fileItem.formData.get(name);
13198
+ } catch (error) {
13199
+ }
12655
13200
  uploadOption.onStart = (option) => {
12656
13201
  clearUploadQueue(index2);
12657
13202
  setFileList((fileList2) => {
@@ -12664,7 +13209,7 @@ const InternalUploader = (props, ref) => {
12664
13209
  });
12665
13210
  return [...fileList2];
12666
13211
  });
12667
- start2 && start2(option);
13212
+ onStart && onStart(option);
12668
13213
  };
12669
13214
  uploadOption.onProgress = (e2, option) => {
12670
13215
  setFileList((fileList2) => {
@@ -12672,16 +13217,17 @@ const InternalUploader = (props, ref) => {
12672
13217
  if (item.uid === fileItem.uid) {
12673
13218
  item.status = "uploading";
12674
13219
  item.message = locale.uploader.uploading;
13220
+ item.percentage = (e2.loaded / e2.total * 100).toFixed(0);
13221
+ onProgress && onProgress({ e: e2, option, percentage: item.percentage });
12675
13222
  }
12676
13223
  return item;
12677
13224
  });
12678
13225
  return [...fileList2];
12679
13226
  });
12680
- progress && progress({ e: e2, option });
12681
13227
  };
12682
13228
  uploadOption.onSuccess = (responseText, option) => {
12683
13229
  setFileList((fileList2) => {
12684
- update2 && update2(fileList2);
13230
+ onUpdate && onUpdate(fileList2);
12685
13231
  fileList2.map((item) => {
12686
13232
  if (item.uid === fileItem.uid) {
12687
13233
  item.status = "success";
@@ -12691,7 +13237,7 @@ const InternalUploader = (props, ref) => {
12691
13237
  });
12692
13238
  return [...fileList2];
12693
13239
  });
12694
- success && success({
13240
+ onSuccess && onSuccess({
12695
13241
  responseText,
12696
13242
  option
12697
13243
  });
@@ -12707,7 +13253,7 @@ const InternalUploader = (props, ref) => {
12707
13253
  });
12708
13254
  return [...fileList2];
12709
13255
  });
12710
- failure && failure({
13256
+ onFailure && onFailure({
12711
13257
  responseText,
12712
13258
  option
12713
13259
  });
@@ -12761,7 +13307,7 @@ const InternalUploader = (props, ref) => {
12761
13307
  return true;
12762
13308
  });
12763
13309
  if (oversizes.length) {
12764
- oversize && oversize(files);
13310
+ onOversize && onOversize(files);
12765
13311
  }
12766
13312
  if (filterFile.length > maximum2) {
12767
13313
  filterFile.splice(maximum2, filterFile.length - maximum2);
@@ -12774,9 +13320,9 @@ const InternalUploader = (props, ref) => {
12774
13320
  };
12775
13321
  const onDelete = (file, index2) => {
12776
13322
  clearUploadQueue(index2);
12777
- if (beforeDelete && beforeDelete(file, fileList)) {
13323
+ if (onBeforeDelete && onBeforeDelete(file, fileList)) {
12778
13324
  fileList.splice(index2, 1);
12779
- removeImage && removeImage(file, fileList);
13325
+ onRemove && onRemove(file, fileList);
12780
13326
  setFileList([...fileList]);
12781
13327
  } else {
12782
13328
  console.log(locale.uploader.deleteWord);
@@ -12788,8 +13334,8 @@ const InternalUploader = (props, ref) => {
12788
13334
  }
12789
13335
  const $el = event.target;
12790
13336
  const { files } = $el;
12791
- if (beforeUpload) {
12792
- beforeUpload(new Array().slice.call(files)).then(
13337
+ if (onBeforeUpload) {
13338
+ onBeforeUpload(new Array().slice.call(files)).then(
12793
13339
  (f2) => {
12794
13340
  const _files = filterFiles(new Array().slice.call(f2));
12795
13341
  readFile(_files);
@@ -12799,13 +13345,13 @@ const InternalUploader = (props, ref) => {
12799
13345
  const _files = filterFiles(new Array().slice.call(files));
12800
13346
  readFile(_files);
12801
13347
  }
12802
- props.change && props.change({ fileList, event });
13348
+ onChange && onChange({ fileList, event });
12803
13349
  if (clearInput) {
12804
13350
  clearInputValue($el);
12805
13351
  }
12806
13352
  };
12807
13353
  const handleItemClick = (file) => {
12808
- fileItemClick && fileItemClick(file);
13354
+ onFileItemClick && onFileItemClick(file);
12809
13355
  };
12810
13356
  return /* @__PURE__ */ React__default.createElement("div", {
12811
13357
  className: classes,
@@ -12842,15 +13388,15 @@ const InternalUploader = (props, ref) => {
12842
13388
  }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", {
12843
13389
  className: "nut-uploader__preview__progress"
12844
13390
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12845
- classPrefix: props.iconClassPrefix,
12846
- fontClassName: props.iconFontClassName,
13391
+ classPrefix: iconClassPrefix,
13392
+ fontClassName: iconFontClassName,
12847
13393
  color: "#fff",
12848
13394
  name: `${item.status === "error" ? "failure" : "loading"}`
12849
13395
  }), /* @__PURE__ */ React__default.createElement("div", {
12850
13396
  className: "nut-uploader__preview__progress__msg"
12851
13397
  }, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon$1, {
12852
- classPrefix: props.iconClassPrefix,
12853
- fontClassName: props.iconFontClassName,
13398
+ classPrefix: iconClassPrefix,
13399
+ fontClassName: iconFontClassName,
12854
13400
  color: "rgba(0,0,0,0.6)",
12855
13401
  className: "close",
12856
13402
  name: "failure",
@@ -12871,8 +13417,8 @@ const InternalUploader = (props, ref) => {
12871
13417
  onClick: () => handleItemClick(item),
12872
13418
  className: "nut-uploader__preview-img__file__name"
12873
13419
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12874
- classPrefix: props.iconClassPrefix,
12875
- fontClassName: props.iconFontClassName,
13420
+ classPrefix: iconClassPrefix,
13421
+ fontClassName: iconFontClassName,
12876
13422
  color: "#808080",
12877
13423
  name: "link"
12878
13424
  }), "\xA0", item.name))), /* @__PURE__ */ React__default.createElement("div", {
@@ -12883,22 +13429,27 @@ const InternalUploader = (props, ref) => {
12883
13429
  className: `nut-uploader__preview-img__file__name ${item.status}`,
12884
13430
  onClick: () => handleItemClick(item)
12885
13431
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12886
- classPrefix: props.iconClassPrefix,
12887
- fontClassName: props.iconFontClassName,
13432
+ classPrefix: iconClassPrefix,
13433
+ fontClassName: iconFontClassName,
12888
13434
  name: "link"
12889
13435
  }), "\xA0", item.name), /* @__PURE__ */ React__default.createElement(Icon$1, {
12890
- classPrefix: props.iconClassPrefix,
12891
- fontClassName: props.iconFontClassName,
13436
+ classPrefix: iconClassPrefix,
13437
+ fontClassName: iconFontClassName,
12892
13438
  color: "#808080",
12893
13439
  className: "nut-uploader__preview-img__file__del",
12894
13440
  name: "del",
12895
13441
  onClick: () => onDelete(item, index2)
13442
+ }), item.status === "uploading" && /* @__PURE__ */ React__default.createElement(Progress, {
13443
+ size: "small",
13444
+ percentage: item.percentage,
13445
+ strokeColor: "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
13446
+ showText: false
12896
13447
  })));
12897
13448
  }), maximum > fileList.length && listType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
12898
13449
  className: `nut-uploader__upload ${listType}`
12899
13450
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
12900
- classPrefix: props.iconClassPrefix,
12901
- fontClassName: props.iconFontClassName,
13451
+ classPrefix: iconClassPrefix,
13452
+ fontClassName: iconFontClassName,
12902
13453
  size: uploadIconSize,
12903
13454
  color: "#808080",
12904
13455
  name: uploadIcon
@@ -12922,9 +13473,9 @@ const InternalUploader = (props, ref) => {
12922
13473
  })));
12923
13474
  };
12924
13475
  const Uploader = React__default.forwardRef(InternalUploader);
12925
- Uploader.defaultProps = defaultProps$L;
13476
+ Uploader.defaultProps = defaultProps$J;
12926
13477
  Uploader.displayName = "NutUploader";
12927
- const defaultProps$K = {
13478
+ const defaultProps$I = {
12928
13479
  data: {
12929
13480
  text: "",
12930
13481
  value: "",
@@ -12939,7 +13490,7 @@ const defaultProps$K = {
12939
13490
  };
12940
13491
  const InternalCascaderItem = (props) => {
12941
13492
  const { data, checked, chooseItem } = {
12942
- ...defaultProps$K,
13493
+ ...defaultProps$I,
12943
13494
  ...props
12944
13495
  };
12945
13496
  const b2 = cn("cascader-item");
@@ -12975,7 +13526,7 @@ const InternalCascaderItem = (props) => {
12975
13526
  }));
12976
13527
  };
12977
13528
  const CascaderItem = React__default.forwardRef(InternalCascaderItem);
12978
- CascaderItem.defaultProps = defaultProps$K;
13529
+ CascaderItem.defaultProps = defaultProps$I;
12979
13530
  CascaderItem.displayName = "NutCascaderItem";
12980
13531
  const formatTree = (tree, parent, config2) => tree.map((node) => {
12981
13532
  const {
@@ -13109,7 +13660,7 @@ class Tree {
13109
13660
  return pathNodes;
13110
13661
  }
13111
13662
  }
13112
- const defaultProps$J = {
13663
+ const defaultProps$H = {
13113
13664
  className: "",
13114
13665
  style: {},
13115
13666
  visible: false,
@@ -13154,7 +13705,7 @@ const InternalCascader = (props) => {
13154
13705
  onClose,
13155
13706
  onChange,
13156
13707
  onPathChange
13157
- } = { ...defaultProps$J, ...props };
13708
+ } = { ...defaultProps$H, ...props };
13158
13709
  const [tabvalue, setTabvalue] = useState("c1");
13159
13710
  const [optiosData, setOptiosData] = useState([]);
13160
13711
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -13410,9 +13961,9 @@ const InternalCascader = (props) => {
13410
13961
  })))));
13411
13962
  };
13412
13963
  const Cascader = React__default.forwardRef(InternalCascader);
13413
- Cascader.defaultProps = defaultProps$J;
13964
+ Cascader.defaultProps = defaultProps$H;
13414
13965
  Cascader.displayName = "NutCascader";
13415
- const defaultProps$I = {
13966
+ const defaultProps$G = {
13416
13967
  ...ComponentDefaults,
13417
13968
  placeholder: "",
13418
13969
  shape: "square",
@@ -13458,9 +14009,11 @@ const SearchBar = (props) => {
13458
14009
  onClickLeftinIcon,
13459
14010
  onClickLeftoutIcon,
13460
14011
  onClickRightinIcon,
13461
- onClickRightoutIcon
14012
+ onClickRightoutIcon,
14013
+ iconClassPrefix,
14014
+ iconFontClassName
13462
14015
  } = {
13463
- ...defaultProps$I,
14016
+ ...defaultProps$G,
13464
14017
  ...props
13465
14018
  };
13466
14019
  const alignClass = `${align}`;
@@ -13558,8 +14111,8 @@ const SearchBar = (props) => {
13558
14111
  className: `${searchbarBem("clear")} ${rightinIcon ? "pos-right" : ""}`,
13559
14112
  onClick: (e2) => clearaVal(e2)
13560
14113
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
13561
- classPrefix: props.iconClassPrefix,
13562
- fontClassName: props.iconFontClassName,
14114
+ classPrefix: iconClassPrefix,
14115
+ fontClassName: iconFontClassName,
13563
14116
  name: "circle-close",
13564
14117
  size: "12",
13565
14118
  color: "#555"
@@ -13599,9 +14152,9 @@ const SearchBar = (props) => {
13599
14152
  className: `${searchbarBem("content")}`
13600
14153
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
13601
14154
  };
13602
- SearchBar.defaultProps = defaultProps$I;
14155
+ SearchBar.defaultProps = defaultProps$G;
13603
14156
  SearchBar.displayName = "NutSearchBar";
13604
- const defaultProps$H = {
14157
+ const defaultProps$F = {
13605
14158
  confirmText: "",
13606
14159
  title: "",
13607
14160
  visible: false,
@@ -13799,9 +14352,9 @@ const NumberKeyboard = (props) => {
13799
14352
  })
13800
14353
  }, confirmText || locale.done))) : null))));
13801
14354
  };
13802
- NumberKeyboard.defaultProps = defaultProps$H;
14355
+ NumberKeyboard.defaultProps = defaultProps$F;
13803
14356
  NumberKeyboard.displayName = "NutNumberKeyboard";
13804
- const defaultProps$G = {
14357
+ const defaultProps$E = {
13805
14358
  cancelTxt: "",
13806
14359
  optionTag: "name",
13807
14360
  optionSubTag: "subname",
@@ -13835,7 +14388,7 @@ const ActionSheet = (props) => {
13835
14388
  className,
13836
14389
  style,
13837
14390
  ...rest
13838
- } = { ...defaultProps$G, ...props };
14391
+ } = { ...defaultProps$E, ...props };
13839
14392
  const b2 = cn("actionsheet");
13840
14393
  const isHighlight = (item) => {
13841
14394
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
@@ -13879,9 +14432,9 @@ const ActionSheet = (props) => {
13879
14432
  onClick: () => cancelActionSheet()
13880
14433
  }, cancelTxt)));
13881
14434
  };
13882
- ActionSheet.defaultProps = defaultProps$G;
14435
+ ActionSheet.defaultProps = defaultProps$E;
13883
14436
  ActionSheet.displayName = "NutActionSheet";
13884
- const defaultProps$F = {
14437
+ const defaultProps$D = {
13885
14438
  ...ComponentDefaults,
13886
14439
  bottom: 20,
13887
14440
  right: 10,
@@ -13903,9 +14456,11 @@ const BackTop = (props) => {
13903
14456
  className,
13904
14457
  duration,
13905
14458
  style,
13906
- onClick
14459
+ onClick,
14460
+ iconClassPrefix,
14461
+ iconFontClassName
13907
14462
  } = {
13908
- ...defaultProps$F,
14463
+ ...defaultProps$D,
13909
14464
  ...props
13910
14465
  };
13911
14466
  const [backTop, SetBackTop] = useState(false);
@@ -13989,16 +14544,16 @@ const BackTop = (props) => {
13989
14544
  goTop(e2);
13990
14545
  }
13991
14546
  }, children || /* @__PURE__ */ React__default.createElement(Icon$1, {
13992
- classPrefix: props.iconClassPrefix,
13993
- fontClassName: props.iconFontClassName,
14547
+ classPrefix: iconClassPrefix,
14548
+ fontClassName: iconFontClassName,
13994
14549
  size: "19px",
13995
14550
  className: "nut-backtop-main",
13996
14551
  name: "top"
13997
14552
  }));
13998
14553
  };
13999
- BackTop.defaultProps = defaultProps$F;
14554
+ BackTop.defaultProps = defaultProps$D;
14000
14555
  BackTop.displayName = "NutBackTop";
14001
- const defaultProps$E = {
14556
+ const defaultProps$C = {
14002
14557
  attract: false,
14003
14558
  direction: void 0,
14004
14559
  boundary: {
@@ -14011,7 +14566,7 @@ const defaultProps$E = {
14011
14566
  };
14012
14567
  const Drag = (props) => {
14013
14568
  const { attract, direction, boundary, children, className, style, ...reset } = {
14014
- ...defaultProps$E,
14569
+ ...defaultProps$C,
14015
14570
  ...props
14016
14571
  };
14017
14572
  const b2 = cn("drag");
@@ -14073,7 +14628,7 @@ const Drag = (props) => {
14073
14628
  ...bind()
14074
14629
  }, children));
14075
14630
  };
14076
- Drag.defaultProps = defaultProps$E;
14631
+ Drag.defaultProps = defaultProps$C;
14077
14632
  Drag.displayName = "NutDrag";
14078
14633
  const Content = (props) => {
14079
14634
  const {
@@ -14268,7 +14823,7 @@ function confirm(config2, renderFunc) {
14268
14823
  update: update2
14269
14824
  };
14270
14825
  }
14271
- const defaultProps$D = {
14826
+ const defaultProps$B = {
14272
14827
  okText: "\u786E\u8BA4",
14273
14828
  cancelText: "\u53D6\u6D88",
14274
14829
  mask: true,
@@ -14359,9 +14914,9 @@ Dialog.confirm = (props) => {
14359
14914
  });
14360
14915
  };
14361
14916
  });
14362
- Dialog.defaultProps = defaultProps$D;
14917
+ Dialog.defaultProps = defaultProps$B;
14363
14918
  Dialog.displayName = "NutDialog";
14364
- const defaultProps$C = {
14919
+ const defaultProps$A = {
14365
14920
  ...ComponentDefaults,
14366
14921
  hasMore: true,
14367
14922
  threshold: 200,
@@ -14391,12 +14946,14 @@ const Infiniteloading = (props) => {
14391
14946
  loadTxt,
14392
14947
  loadMoreTxt,
14393
14948
  className,
14394
- refresh,
14395
- loadMore,
14396
- scrollChange,
14949
+ onRefresh,
14950
+ onLoadMore,
14951
+ onScrollChange,
14952
+ iconClassPrefix,
14953
+ iconFontClassName,
14397
14954
  ...restProps
14398
14955
  } = {
14399
- ...defaultProps$C,
14956
+ ...defaultProps$A,
14400
14957
  ...props
14401
14958
  };
14402
14959
  const [isInfiniting, setIsInfiniting] = useState(false);
@@ -14444,7 +15001,7 @@ const Infiniteloading = (props) => {
14444
15001
  return false;
14445
15002
  }
14446
15003
  setIsInfiniting(true);
14447
- loadMore && loadMore(infiniteDone);
15004
+ onLoadMore && onLoadMore(infiniteDone);
14448
15005
  return true;
14449
15006
  });
14450
15007
  };
@@ -14485,7 +15042,7 @@ const Infiniteloading = (props) => {
14485
15042
  distance.current = 0;
14486
15043
  refreshTop.current.style.height = `${distance.current}px`;
14487
15044
  } else {
14488
- refresh && refresh(refreshDone);
15045
+ onRefresh && onRefresh(refreshDone);
14489
15046
  }
14490
15047
  };
14491
15048
  const requestAniFrame2 = () => {
@@ -14520,7 +15077,7 @@ const Infiniteloading = (props) => {
14520
15077
  direction = "down";
14521
15078
  }
14522
15079
  beforeScrollTop.current = resScrollTop;
14523
- scrollChange && scrollChange(resScrollTop);
15080
+ onScrollChange && onScrollChange(resScrollTop);
14524
15081
  return offsetDistance <= threshold && direction === "down";
14525
15082
  };
14526
15083
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -14537,8 +15094,8 @@ const Infiniteloading = (props) => {
14537
15094
  }, /* @__PURE__ */ React__default.createElement("div", {
14538
15095
  className: "top-box"
14539
15096
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
14540
- classPrefix: props.iconClassPrefix,
14541
- fontClassName: props.iconFontClassName,
15097
+ classPrefix: iconClassPrefix,
15098
+ fontClassName: iconFontClassName,
14542
15099
  className: "top-img",
14543
15100
  name: pullIcon
14544
15101
  }), /* @__PURE__ */ React__default.createElement("span", {
@@ -14550,8 +15107,8 @@ const Infiniteloading = (props) => {
14550
15107
  }, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", {
14551
15108
  className: "bottom-box"
14552
15109
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
14553
- classPrefix: props.iconClassPrefix,
14554
- fontClassName: props.iconFontClassName,
15110
+ classPrefix: iconClassPrefix,
15111
+ fontClassName: iconFontClassName,
14555
15112
  className: "bottom-img",
14556
15113
  name: loadIcon
14557
15114
  }), /* @__PURE__ */ React__default.createElement("div", {
@@ -14560,7 +15117,7 @@ const Infiniteloading = (props) => {
14560
15117
  className: "tips"
14561
15118
  }, loadMoreTxt || locale.infiniteloading.loadMoreText)));
14562
15119
  };
14563
- Infiniteloading.defaultProps = defaultProps$C;
15120
+ Infiniteloading.defaultProps = defaultProps$A;
14564
15121
  Infiniteloading.displayName = "NutInfiniteloading";
14565
15122
  class Notification extends React.PureComponent {
14566
15123
  constructor(props) {
@@ -14735,7 +15292,7 @@ var Notify = {
14735
15292
  }
14736
15293
  }
14737
15294
  };
14738
- const defaultProps$B = {
15295
+ const defaultProps$z = {
14739
15296
  isAsync: false,
14740
15297
  checked: false,
14741
15298
  disable: false,
@@ -14758,7 +15315,7 @@ const Switch = (props) => {
14758
15315
  className,
14759
15316
  style
14760
15317
  } = {
14761
- ...defaultProps$B,
15318
+ ...defaultProps$z,
14762
15319
  ...props
14763
15320
  };
14764
15321
  const [value, setValue] = useState(false);
@@ -14798,7 +15355,7 @@ const Switch = (props) => {
14798
15355
  className: `${b2("label")} close`
14799
15356
  }, inactiveText))));
14800
15357
  };
14801
- Switch.defaultProps = defaultProps$B;
15358
+ Switch.defaultProps = defaultProps$z;
14802
15359
  Switch.displayName = "NutSwitch";
14803
15360
  function preventDefault(event, isStopPropagation) {
14804
15361
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
@@ -14808,7 +15365,7 @@ function preventDefault(event, isStopPropagation) {
14808
15365
  event.stopPropagation();
14809
15366
  }
14810
15367
  }
14811
- const defaultProps$A = {
15368
+ const defaultProps$y = {
14812
15369
  name: "",
14813
15370
  leftWidth: 0,
14814
15371
  rightWidth: 0
@@ -14816,7 +15373,7 @@ const defaultProps$A = {
14816
15373
  const Swipe = forwardRef((props, instanceRef) => {
14817
15374
  const swipeBem = cn("swipe");
14818
15375
  const touch = useTouch();
14819
- const { children, className, style } = { ...defaultProps$A, ...props };
15376
+ const { children, className, style } = { ...defaultProps$y, ...props };
14820
15377
  const root = useRef();
14821
15378
  const opened = useRef(false);
14822
15379
  const lockClick = useRef(false);
@@ -14982,29 +15539,8 @@ const Swipe = forwardRef((props, instanceRef) => {
14982
15539
  style: wrapperStyle
14983
15540
  }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef)));
14984
15541
  });
14985
- Swipe.defaultProps = defaultProps$A;
15542
+ Swipe.defaultProps = defaultProps$y;
14986
15543
  Swipe.displayName = "NutSwipe";
14987
- const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
14988
- const defaultRoot = canUseDom ? window : void 0;
14989
- const overflowStylePatterns = ["scroll", "auto", "overlay"];
14990
- function isElement(node) {
14991
- const ELEMENT_NODE_TYPE = 1;
14992
- return node.nodeType === ELEMENT_NODE_TYPE;
14993
- }
14994
- function getScrollParent(el, root = defaultRoot) {
14995
- let node = el;
14996
- while (node && node !== root && isElement(node)) {
14997
- if (node === document.body) {
14998
- return root;
14999
- }
15000
- const { overflowY } = window.getComputedStyle(node);
15001
- if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
15002
- return node;
15003
- }
15004
- node = node.parentNode;
15005
- }
15006
- return root;
15007
- }
15008
15544
  function bound(position, min, max) {
15009
15545
  let ret = position;
15010
15546
  if (min !== void 0) {
@@ -15041,7 +15577,7 @@ if (canUseDom) {
15041
15577
  console.log(e2);
15042
15578
  }
15043
15579
  }
15044
- const defaultProps$z = {
15580
+ const defaultProps$x = {
15045
15581
  className: "",
15046
15582
  style: {},
15047
15583
  pullingText: "",
@@ -15058,7 +15594,7 @@ const defaultProps$z = {
15058
15594
  const PullToRefresh = (p2) => {
15059
15595
  const { locale } = useConfig();
15060
15596
  const props = {
15061
- ...defaultProps$z,
15597
+ ...defaultProps$x,
15062
15598
  ...p2,
15063
15599
  ...{
15064
15600
  pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
@@ -15197,10 +15733,10 @@ const PullToRefresh = (p2) => {
15197
15733
  className: "nut-pulltorefresh-content"
15198
15734
  }, props.children));
15199
15735
  };
15200
- PullToRefresh.defaultProps = defaultProps$z;
15736
+ PullToRefresh.defaultProps = defaultProps$x;
15201
15737
  PullToRefresh.displayName = "NutPullToRefresh";
15202
15738
  const isObject = (val) => val !== null && typeof val === "object";
15203
- const defaultProps$y = {
15739
+ const defaultProps$w = {
15204
15740
  strokeWidth: 5,
15205
15741
  radius: 50,
15206
15742
  strokeLinecap: "round",
@@ -15223,7 +15759,7 @@ const CircleProgress = (props) => {
15223
15759
  strokeLinecap,
15224
15760
  ...restProps
15225
15761
  } = {
15226
- ...defaultProps$y,
15762
+ ...defaultProps$w,
15227
15763
  ...props
15228
15764
  };
15229
15765
  const b2 = cn("circleprogress");
@@ -15309,9 +15845,9 @@ const CircleProgress = (props) => {
15309
15845
  className: "nut-circleprogress-text"
15310
15846
  }, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
15311
15847
  };
15312
- CircleProgress.defaultProps = defaultProps$y;
15848
+ CircleProgress.defaultProps = defaultProps$w;
15313
15849
  CircleProgress.displayName = "NutCircleProgress";
15314
- const defaultProps$x = {
15850
+ const defaultProps$v = {
15315
15851
  ...ComponentDefaults,
15316
15852
  direction: "across",
15317
15853
  list: [],
@@ -15349,8 +15885,13 @@ const NoticeBar = (props) => {
15349
15885
  speed,
15350
15886
  rightIcon,
15351
15887
  close,
15352
- click
15353
- } = { ...defaultProps$x, ...props };
15888
+ click,
15889
+ iconClassPrefix,
15890
+ iconFontClassName
15891
+ } = {
15892
+ ...defaultProps$v,
15893
+ ...props
15894
+ };
15354
15895
  const wrap = useRef(null);
15355
15896
  const content = useRef(null);
15356
15897
  const [showNoticeBar, SetShowNoticeBar] = useState(true);
@@ -15541,8 +16082,8 @@ const NoticeBar = (props) => {
15541
16082
  className: "left-icon",
15542
16083
  style: { backgroundImage: `url(${iconBg() || ""})` }
15543
16084
  }, !iconBg() ? /* @__PURE__ */ React__default.createElement(Icon$1, {
15544
- classPrefix: props.iconClassPrefix,
15545
- fontClassName: props.iconFontClassName,
16085
+ classPrefix: iconClassPrefix,
16086
+ fontClassName: iconFontClassName,
15546
16087
  name: "notice",
15547
16088
  size: "16",
15548
16089
  color
@@ -15558,8 +16099,8 @@ const NoticeBar = (props) => {
15558
16099
  className: "right-icon",
15559
16100
  onClick: onClickIcon
15560
16101
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
15561
- classPrefix: props.iconClassPrefix,
15562
- fontClassName: props.iconFontClassName,
16102
+ classPrefix: iconClassPrefix,
16103
+ fontClassName: iconFontClassName,
15563
16104
  name: rightIcon || "close",
15564
16105
  color
15565
16106
  })) : null) : null, scrollList.current.length > 0 && direction === "vertical" ? /* @__PURE__ */ React__default.createElement("div", {
@@ -15588,23 +16129,23 @@ const NoticeBar = (props) => {
15588
16129
  handleClickIcon();
15589
16130
  }
15590
16131
  }, rightIcon || (closeMode ? /* @__PURE__ */ React__default.createElement(Icon$1, {
15591
- classPrefix: props.iconClassPrefix,
15592
- fontClassName: props.iconFontClassName,
16132
+ classPrefix: iconClassPrefix,
16133
+ fontClassName: iconFontClassName,
15593
16134
  name: "cross",
15594
16135
  color,
15595
16136
  size: "11px"
15596
16137
  }) : null))) : null);
15597
16138
  };
15598
- NoticeBar.defaultProps = defaultProps$x;
16139
+ NoticeBar.defaultProps = defaultProps$v;
15599
16140
  NoticeBar.displayName = "NutNoticeBar";
15600
16141
  const DataContext$1 = createContext({});
15601
- const defaultProps$w = {
16142
+ const defaultProps$u = {
15602
16143
  current: 0,
15603
16144
  direction: "horizontal",
15604
16145
  progressDot: false
15605
16146
  };
15606
16147
  const Steps = (props) => {
15607
- const propSteps = { ...defaultProps$w, ...props };
16148
+ const propSteps = { ...defaultProps$u, ...props };
15608
16149
  const {
15609
16150
  children,
15610
16151
  current,
@@ -15637,9 +16178,9 @@ const Steps = (props) => {
15637
16178
  children
15638
16179
  ));
15639
16180
  };
15640
- Steps.defaultProps = defaultProps$w;
16181
+ Steps.defaultProps = defaultProps$u;
15641
16182
  Steps.displayName = "NutSteps";
15642
- const defaultProps$v = {
16183
+ const defaultProps$t = {
15643
16184
  ...ComponentDefaults,
15644
16185
  title: "",
15645
16186
  content: "",
@@ -15659,9 +16200,11 @@ const Step = (props) => {
15659
16200
  size,
15660
16201
  className,
15661
16202
  renderContent,
16203
+ iconClassPrefix,
16204
+ iconFontClassName,
15662
16205
  ...restProps
15663
16206
  } = {
15664
- ...defaultProps$v,
16207
+ ...defaultProps$t,
15665
16208
  ...props
15666
16209
  };
15667
16210
  const parent = useContext$1(DataContext$1);
@@ -15706,8 +16249,8 @@ const Step = (props) => {
15706
16249
  }), /* @__PURE__ */ React__default.createElement("div", {
15707
16250
  className: renderIconClass()
15708
16251
  }, icon ? /* @__PURE__ */ React__default.createElement(Icon$1, {
15709
- classPrefix: props.iconClassPrefix,
15710
- fontClassName: props.iconFontClassName,
16252
+ classPrefix: iconClassPrefix,
16253
+ fontClassName: iconFontClassName,
15711
16254
  className: "nut-step-icon-inner",
15712
16255
  color: iconColor,
15713
16256
  name: icon,
@@ -15724,10 +16267,10 @@ const Step = (props) => {
15724
16267
  className: "nut-step-content"
15725
16268
  }, renderContent())));
15726
16269
  };
15727
- Step.defaultProps = defaultProps$v;
16270
+ Step.defaultProps = defaultProps$t;
15728
16271
  Step.displayName = "NutStep";
15729
16272
  const DataContext = createContext({});
15730
- const defaultProps$u = {
16273
+ const defaultProps$s = {
15731
16274
  width: typeof window === "object" ? window.innerWidth : 375,
15732
16275
  height: 0,
15733
16276
  duration: 500,
@@ -15745,7 +16288,7 @@ const defaultProps$u = {
15745
16288
  };
15746
16289
  const DISTANCE = 5;
15747
16290
  const Swiper = React__default.forwardRef((props, ref) => {
15748
- const propSwiper = { ...defaultProps$u, ...props };
16291
+ const propSwiper = { ...defaultProps$s, ...props };
15749
16292
  const {
15750
16293
  children,
15751
16294
  direction,
@@ -16155,13 +16698,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
16155
16698
  });
16156
16699
  })) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
16157
16700
  });
16158
- Swiper.defaultProps = defaultProps$u;
16701
+ Swiper.defaultProps = defaultProps$s;
16159
16702
  Swiper.displayName = "NutSwiper";
16160
- const defaultProps$t = {
16703
+ const defaultProps$r = {
16161
16704
  direction: "horizontal"
16162
16705
  };
16163
16706
  const SwiperItem = React__default.forwardRef((props, ref) => {
16164
- const _props = { ...defaultProps$t, ...props };
16707
+ const _props = { ...defaultProps$r, ...props };
16165
16708
  const { children, direction, size } = _props;
16166
16709
  const parent = useContext$1(DataContext);
16167
16710
  const b2 = cn("swiper-item");
@@ -16180,10 +16723,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
16180
16723
  style: style()
16181
16724
  }, children);
16182
16725
  });
16183
- SwiperItem.defaultProps = defaultProps$t;
16726
+ SwiperItem.defaultProps = defaultProps$r;
16184
16727
  SwiperItem.displayName = "NutSwiperItem";
16185
16728
  const AvatarContext = createContext({});
16186
- const defaultProps$s = {
16729
+ const defaultProps$q = {
16187
16730
  ...ComponentDefaults,
16188
16731
  size: "",
16189
16732
  icon: "",
@@ -16209,9 +16752,11 @@ const Avatar = (props) => {
16209
16752
  style,
16210
16753
  activeAvatar,
16211
16754
  onError,
16755
+ iconClassPrefix,
16756
+ iconFontClassName,
16212
16757
  ...rest
16213
16758
  } = {
16214
- ...defaultProps$s,
16759
+ ...defaultProps$q,
16215
16760
  ...props
16216
16761
  };
16217
16762
  const [maxSum, setMaxSum] = useState(0);
@@ -16284,8 +16829,8 @@ const Avatar = (props) => {
16284
16829
  alt,
16285
16830
  onError: errorEvent
16286
16831
  }), icon && /* @__PURE__ */ React__default.createElement(Icon$1, {
16287
- classPrefix: props.iconClassPrefix,
16288
- fontClassName: props.iconFontClassName,
16832
+ classPrefix: iconClassPrefix,
16833
+ fontClassName: iconFontClassName,
16289
16834
  className: "icon",
16290
16835
  name: iconStyles
16291
16836
  }), children && /* @__PURE__ */ React__default.createElement("span", {
@@ -16294,9 +16839,9 @@ const Avatar = (props) => {
16294
16839
  className: "text"
16295
16840
  }, ((_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)}`)));
16296
16841
  };
16297
- Avatar.defaultProps = defaultProps$s;
16842
+ Avatar.defaultProps = defaultProps$q;
16298
16843
  Avatar.displayName = "NutAvatar";
16299
- const defaultProps$r = {
16844
+ const defaultProps$p = {
16300
16845
  maxContent: "",
16301
16846
  maxCount: "",
16302
16847
  maxBgColor: "#eee",
@@ -16308,7 +16853,7 @@ const defaultProps$r = {
16308
16853
  };
16309
16854
  const AvatarGroup = (props) => {
16310
16855
  useConfig();
16311
- const propAvatarGroup = { ...defaultProps$r, ...props };
16856
+ const propAvatarGroup = { ...defaultProps$p, ...props };
16312
16857
  const { className, style, children } = propAvatarGroup;
16313
16858
  const avatarGroupRef = useRef(null);
16314
16859
  const b2 = cn("avatar-group");
@@ -16325,9 +16870,9 @@ const AvatarGroup = (props) => {
16325
16870
  ref: avatarGroupRef
16326
16871
  }, children));
16327
16872
  };
16328
- AvatarGroup.defaultProps = defaultProps$r;
16873
+ AvatarGroup.defaultProps = defaultProps$p;
16329
16874
  AvatarGroup.displayName = "NutAvatarGroup";
16330
- const defaultProps$q = {
16875
+ const defaultProps$o = {
16331
16876
  price: 0,
16332
16877
  needSymbol: true,
16333
16878
  symbol: "&yen;",
@@ -16345,7 +16890,7 @@ const Price = (props) => {
16345
16890
  className,
16346
16891
  ...rest
16347
16892
  } = {
16348
- ...defaultProps$q,
16893
+ ...defaultProps$o,
16349
16894
  ...props
16350
16895
  };
16351
16896
  const b2 = cn("price");
@@ -16408,9 +16953,9 @@ const Price = (props) => {
16408
16953
  className: `${b2("small")}`
16409
16954
  }, formatDecimal(price)));
16410
16955
  };
16411
- Price.defaultProps = defaultProps$q;
16956
+ Price.defaultProps = defaultProps$o;
16412
16957
  Price.displayName = "NutPrice";
16413
- const defaultProps$p = {
16958
+ const defaultProps$n = {
16414
16959
  ...ComponentDefaults,
16415
16960
  value: "",
16416
16961
  dot: false,
@@ -16422,8 +16967,18 @@ const defaultProps$p = {
16422
16967
  icons: ""
16423
16968
  };
16424
16969
  const Badge = (props) => {
16425
- const { children, dot, top, right, zIndex, color, icons } = {
16426
- ...defaultProps$p,
16970
+ const {
16971
+ children,
16972
+ dot,
16973
+ top,
16974
+ right,
16975
+ zIndex,
16976
+ color,
16977
+ icons,
16978
+ iconClassPrefix,
16979
+ iconFontClassName
16980
+ } = {
16981
+ ...defaultProps$n,
16427
16982
  ...props
16428
16983
  };
16429
16984
  function content() {
@@ -16449,8 +17004,8 @@ const Badge = (props) => {
16449
17004
  }, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
16450
17005
  className: "slot-icons"
16451
17006
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
16452
- classPrefix: props.iconClassPrefix,
16453
- fontClassName: props.iconFontClassName,
17007
+ classPrefix: iconClassPrefix,
17008
+ fontClassName: iconFontClassName,
16454
17009
  className: "_icon",
16455
17010
  name: icons,
16456
17011
  color: "#ffffff",
@@ -16460,9 +17015,9 @@ const Badge = (props) => {
16460
17015
  style: getStyle()
16461
17016
  }, content()));
16462
17017
  };
16463
- Badge.defaultProps = defaultProps$p;
17018
+ Badge.defaultProps = defaultProps$n;
16464
17019
  Badge.displayName = "NutBadge";
16465
- const defaultProps$o = {
17020
+ const defaultProps$m = {
16466
17021
  ...ComponentDefaults,
16467
17022
  type: "default",
16468
17023
  color: "",
@@ -16489,9 +17044,11 @@ const Tag = (props) => {
16489
17044
  closeable,
16490
17045
  textColor,
16491
17046
  onClick,
16492
- onClose
17047
+ onClose,
17048
+ iconClassPrefix,
17049
+ iconFontClassName
16493
17050
  } = {
16494
- ...defaultProps$o,
17051
+ ...defaultProps$m,
16495
17052
  ...props
16496
17053
  };
16497
17054
  const [btnName, setBtnName] = useState("");
@@ -16546,8 +17103,8 @@ const Tag = (props) => {
16546
17103
  }, children && /* @__PURE__ */ React__default.createElement("span", {
16547
17104
  className: "text"
16548
17105
  }, children), /* @__PURE__ */ React__default.createElement(Icon$1, {
16549
- classPrefix: props.iconClassPrefix,
16550
- fontClassName: props.iconFontClassName,
17106
+ classPrefix: iconClassPrefix,
17107
+ fontClassName: iconFontClassName,
16551
17108
  className: "_icon",
16552
17109
  name: "close",
16553
17110
  size: "12",
@@ -16565,7 +17122,7 @@ const Tag = (props) => {
16565
17122
  className: "text"
16566
17123
  }, children)));
16567
17124
  };
16568
- Tag.defaultProps = defaultProps$o;
17125
+ Tag.defaultProps = defaultProps$m;
16569
17126
  Tag.displayName = "NutTag";
16570
17127
  function fillRef(ref, node) {
16571
17128
  if (typeof ref === "function") {
@@ -16609,7 +17166,7 @@ class Trigger extends React__default.Component {
16609
17166
  return trigger;
16610
17167
  }
16611
17168
  }
16612
- const defaultProps$n = {
17169
+ const defaultProps$l = {
16613
17170
  ...ComponentDefaults,
16614
17171
  list: [],
16615
17172
  theme: "light",
@@ -16634,9 +17191,11 @@ const Popover = (props) => {
16634
17191
  style,
16635
17192
  onClick,
16636
17193
  onChoose,
17194
+ iconClassPrefix,
17195
+ iconFontClassName,
16637
17196
  ...reset
16638
17197
  } = {
16639
- ...defaultProps$n,
17198
+ ...defaultProps$l,
16640
17199
  ...props
16641
17200
  };
16642
17201
  const goodItem = useRef(null);
@@ -16717,8 +17276,8 @@ const Popover = (props) => {
16717
17276
  handleChoose(item, i);
16718
17277
  }
16719
17278
  }, item.icon ? /* @__PURE__ */ React__default.createElement(Icon$1, {
16720
- classPrefix: props.iconClassPrefix,
16721
- fontClassName: props.iconFontClassName,
17279
+ classPrefix: iconClassPrefix,
17280
+ fontClassName: iconFontClassName,
16722
17281
  className: "popover-menu-item-img",
16723
17282
  name: item.icon
16724
17283
  }) : "", /* @__PURE__ */ React__default.createElement("div", {
@@ -16730,9 +17289,9 @@ const Popover = (props) => {
16730
17289
  style: { background: "transparent" }
16731
17290
  }) : "");
16732
17291
  };
16733
- Popover.defaultProps = defaultProps$n;
17292
+ Popover.defaultProps = defaultProps$l;
16734
17293
  Popover.displayName = "NutPopover";
16735
- const defaultProps$m = {
17294
+ const defaultProps$k = {
16736
17295
  width: "100px",
16737
17296
  height: "100px",
16738
17297
  row: 1,
@@ -16760,7 +17319,7 @@ const Skeleton = (props) => {
16760
17319
  avatarShape,
16761
17320
  ...restProps
16762
17321
  } = {
16763
- ...defaultProps$m,
17322
+ ...defaultProps$k,
16764
17323
  ...props
16765
17324
  };
16766
17325
  const b2 = cn("skeleton");
@@ -16815,9 +17374,9 @@ const Skeleton = (props) => {
16815
17374
  });
16816
17375
  })))));
16817
17376
  };
16818
- Skeleton.defaultProps = defaultProps$m;
17377
+ Skeleton.defaultProps = defaultProps$k;
16819
17378
  Skeleton.displayName = "NutSkeleton";
16820
- const defaultProps$l = {
17379
+ const defaultProps$j = {
16821
17380
  paused: false,
16822
17381
  startTime: Date.now(),
16823
17382
  endTime: Date.now(),
@@ -16844,7 +17403,7 @@ const InternalCountDown = (props, ref) => {
16844
17403
  onUpdate,
16845
17404
  children,
16846
17405
  ...rest
16847
- } = { ...defaultProps$l, ...props };
17406
+ } = { ...defaultProps$j, ...props };
16848
17407
  const b2 = cn("countdown");
16849
17408
  const [restTimeStamp, setRestTime] = useState(0);
16850
17409
  const stateRef = useRef({
@@ -17040,9 +17599,9 @@ const InternalCountDown = (props, ref) => {
17040
17599
  }));
17041
17600
  };
17042
17601
  const CountDown = React__default.forwardRef(InternalCountDown);
17043
- CountDown.defaultProps = defaultProps$l;
17602
+ CountDown.defaultProps = defaultProps$j;
17044
17603
  CountDown.displayName = "NutCountDown";
17045
- const defaultProps$k = {
17604
+ const defaultProps$i = {
17046
17605
  activeName: ["0"],
17047
17606
  accordion: false,
17048
17607
  icon: "",
@@ -17065,7 +17624,7 @@ const Collapse = memo(
17065
17624
  iconColor,
17066
17625
  change
17067
17626
  } = {
17068
- ...defaultProps$k,
17627
+ ...defaultProps$i,
17069
17628
  ...props
17070
17629
  };
17071
17630
  const childrenDom = React__default.Children.toArray(children);
@@ -17116,15 +17675,16 @@ const Collapse = memo(
17116
17675
  icon,
17117
17676
  rotate,
17118
17677
  iconSize,
17119
- iconColor
17678
+ iconColor,
17679
+ childnull: !!item.props.children
17120
17680
  });
17121
17681
  }));
17122
17682
  },
17123
17683
  areEqual
17124
17684
  );
17125
- Collapse.defaultProps = defaultProps$k;
17685
+ Collapse.defaultProps = defaultProps$i;
17126
17686
  Collapse.displayName = "NutCollapse";
17127
- const defaultProps$j = {
17687
+ const defaultProps$h = {
17128
17688
  ...ComponentDefaults,
17129
17689
  title: "",
17130
17690
  name: "",
@@ -17138,7 +17698,8 @@ const defaultProps$j = {
17138
17698
  titleIcon: "",
17139
17699
  titleIconColor: "",
17140
17700
  titleIconPosition: "",
17141
- titleIconSize: ""
17701
+ titleIconSize: "",
17702
+ childnull: true
17142
17703
  };
17143
17704
  const CollapseItem = (props) => {
17144
17705
  const {
@@ -17157,9 +17718,12 @@ const CollapseItem = (props) => {
17157
17718
  titleIconSize,
17158
17719
  iconSize,
17159
17720
  iconColor,
17721
+ childnull,
17722
+ iconClassPrefix,
17723
+ iconFontClassName,
17160
17724
  ...rest
17161
17725
  } = {
17162
- ...defaultProps$j,
17726
+ ...defaultProps$h,
17163
17727
  ...props
17164
17728
  };
17165
17729
  const [domHeight, setDomHeight] = useState(-1);
@@ -17205,16 +17769,16 @@ const CollapseItem = (props) => {
17205
17769
  }, titleIcon && titleIconPosition === "left" && /* @__PURE__ */ React__default.createElement("b", {
17206
17770
  className: colBem("title-icon-left")
17207
17771
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
17208
- classPrefix: props.iconClassPrefix,
17209
- fontClassName: props.iconFontClassName,
17772
+ classPrefix: iconClassPrefix,
17773
+ fontClassName: iconFontClassName,
17210
17774
  name: titleIcon,
17211
17775
  size: titleIconSize,
17212
17776
  color: disabled ? "#C2C2C2" : titleIconColor
17213
17777
  })), title, titleIcon && titleIconPosition === "right" && /* @__PURE__ */ React__default.createElement("b", {
17214
17778
  className: colBem("title-icon-right")
17215
17779
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
17216
- classPrefix: props.iconClassPrefix,
17217
- fontClassName: props.iconFontClassName,
17780
+ classPrefix: iconClassPrefix,
17781
+ fontClassName: iconFontClassName,
17218
17782
  name: titleIcon,
17219
17783
  size: titleIconSize,
17220
17784
  color: disabled ? "#C2C2C2" : titleIconColor
@@ -17226,12 +17790,12 @@ const CollapseItem = (props) => {
17226
17790
  className: colBem("icon"),
17227
17791
  style: iconStyle
17228
17792
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
17229
- classPrefix: props.iconClassPrefix,
17230
- fontClassName: props.iconFontClassName,
17793
+ classPrefix: iconClassPrefix,
17794
+ fontClassName: iconFontClassName,
17231
17795
  name: icon,
17232
17796
  size: iconSize,
17233
17797
  color: disabled ? "#C2C2C2" : iconColor
17234
- })))), /* @__PURE__ */ React__default.createElement("div", {
17798
+ })))), childnull && /* @__PURE__ */ React__default.createElement("div", {
17235
17799
  className: colBem("content"),
17236
17800
  style: { height: currHeight },
17237
17801
  ref: measuredRef
@@ -17239,9 +17803,9 @@ const CollapseItem = (props) => {
17239
17803
  className: colBem("content-text")
17240
17804
  }, children)));
17241
17805
  };
17242
- CollapseItem.defaultProps = defaultProps$j;
17806
+ CollapseItem.defaultProps = defaultProps$h;
17243
17807
  CollapseItem.displayName = "NutCollapseItem";
17244
- const defaultProps$i = {
17808
+ const defaultProps$g = {
17245
17809
  maxLen: 0,
17246
17810
  endNumber: "",
17247
17811
  delaySpeed: 300,
@@ -17259,7 +17823,7 @@ const CountUp = (props) => {
17259
17823
  thousands,
17260
17824
  ...reset
17261
17825
  } = {
17262
- ...defaultProps$i,
17826
+ ...defaultProps$g,
17263
17827
  ...props
17264
17828
  };
17265
17829
  const b2 = cn("countup");
@@ -17329,9 +17893,9 @@ const CountUp = (props) => {
17329
17893
  }, item));
17330
17894
  })));
17331
17895
  };
17332
- CountUp.defaultProps = defaultProps$i;
17896
+ CountUp.defaultProps = defaultProps$g;
17333
17897
  CountUp.displayName = "NutCountUp";
17334
- const defaultProps$h = {};
17898
+ const defaultProps$f = {};
17335
17899
  class AnimatingNumbers extends Component {
17336
17900
  constructor(props) {
17337
17901
  super(props);
@@ -17343,7 +17907,7 @@ class AnimatingNumbers extends Component {
17343
17907
  });
17344
17908
  }
17345
17909
  }
17346
- AnimatingNumbers.defaultProps = defaultProps$h;
17910
+ AnimatingNumbers.defaultProps = defaultProps$f;
17347
17911
  AnimatingNumbers.displayName = "NutAnimatingNumbers";
17348
17912
  AnimatingNumbers.CountUp = CountUp;
17349
17913
  AnimatingNumbers.CountUp = CountUp;
@@ -17352,7 +17916,7 @@ const defaultStatus = {
17352
17916
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
17353
17917
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
17354
17918
  };
17355
- const defaultProps$g = {
17919
+ const defaultProps$e = {
17356
17920
  description: "\u65E0\u5185\u5BB9",
17357
17921
  image: "empty",
17358
17922
  imageSize: "",
@@ -17360,9 +17924,9 @@ const defaultProps$g = {
17360
17924
  };
17361
17925
  const Empty = (props) => {
17362
17926
  const { locale } = useConfig();
17363
- defaultProps$g.description = locale.noData || defaultProps$g.description;
17927
+ defaultProps$e.description = locale.noData || defaultProps$e.description;
17364
17928
  const { image, imageSize, description, children, className, ...rest } = {
17365
- ...defaultProps$g,
17929
+ ...defaultProps$e,
17366
17930
  ...props
17367
17931
  };
17368
17932
  const [imgStyle, setImgStyle] = useState({});
@@ -17404,7 +17968,7 @@ const Empty = (props) => {
17404
17968
  className: b2("description")
17405
17969
  }, description) : { description }, children));
17406
17970
  };
17407
- Empty.defaultProps = defaultProps$g;
17971
+ Empty.defaultProps = defaultProps$e;
17408
17972
  Empty.displayName = "NutEmpty";
17409
17973
  const initPositinoCache = (reaItemSize, length = 0) => {
17410
17974
  let index2 = 0;
@@ -17517,7 +18081,7 @@ const updateItemSize = (positions, items, sizeKey) => {
17517
18081
  }
17518
18082
  });
17519
18083
  };
17520
- const defaultProps$f = {};
18084
+ const defaultProps$d = {};
17521
18085
  const VirtualList = (props) => {
17522
18086
  const {
17523
18087
  sourceData = [],
@@ -17676,9 +18240,9 @@ const VirtualList = (props) => {
17676
18240
  }) : data);
17677
18241
  }))));
17678
18242
  };
17679
- VirtualList.defaultProps = defaultProps$f;
18243
+ VirtualList.defaultProps = defaultProps$d;
17680
18244
  VirtualList.displayName = "NutVirtualList";
17681
- const defaultProps$e = {
18245
+ const defaultProps$c = {
17682
18246
  ...ComponentDefaults,
17683
18247
  className: "",
17684
18248
  style: {},
@@ -17690,7 +18254,7 @@ const defaultProps$e = {
17690
18254
  };
17691
18255
  const Table = (props) => {
17692
18256
  const { locale } = useConfig();
17693
- defaultProps$e.noData = locale.noData;
18257
+ defaultProps$c.noData = locale.noData;
17694
18258
  const {
17695
18259
  children,
17696
18260
  className,
@@ -17702,9 +18266,11 @@ const Table = (props) => {
17702
18266
  striped,
17703
18267
  noData,
17704
18268
  onSorter,
18269
+ iconClassPrefix,
18270
+ iconFontClassName,
17705
18271
  ...rest
17706
18272
  } = {
17707
- ...defaultProps$e,
18273
+ ...defaultProps$c,
17708
18274
  ...props
17709
18275
  };
17710
18276
  const [curData, setCurData] = useState(data);
@@ -17745,8 +18311,8 @@ const Table = (props) => {
17745
18311
  key: item.key,
17746
18312
  onClick: () => handleSorterClick(item)
17747
18313
  }, item.title, item.sorter && /* @__PURE__ */ React__default.createElement(Icon$1, {
17748
- classPrefix: props.iconClassPrefix,
17749
- fontClassName: props.iconFontClassName,
18314
+ classPrefix: iconClassPrefix,
18315
+ fontClassName: iconFontClassName,
17750
18316
  name: "down-arrow",
17751
18317
  size: "12px"
17752
18318
  }));
@@ -17802,9 +18368,9 @@ const Table = (props) => {
17802
18368
  className: "nut-table__nodata__text"
17803
18369
  }, noData))));
17804
18370
  };
17805
- Table.defaultProps = defaultProps$e;
18371
+ Table.defaultProps = defaultProps$c;
17806
18372
  Table.displayName = "NutTable";
17807
- const defaultProps$d = {
18373
+ const defaultProps$b = {
17808
18374
  source: {
17809
18375
  type: {},
17810
18376
  src: ""
@@ -17829,7 +18395,7 @@ const Video = (props) => {
17829
18395
  playend,
17830
18396
  ...restProps
17831
18397
  } = {
17832
- ...defaultProps$d,
18398
+ ...defaultProps$b,
17833
18399
  ...props
17834
18400
  };
17835
18401
  const rootRef = useRef(null);
@@ -17883,195 +18449,8 @@ const Video = (props) => {
17883
18449
  kind: "captions"
17884
18450
  })));
17885
18451
  };
17886
- Video.defaultProps = defaultProps$d;
18452
+ Video.defaultProps = defaultProps$b;
17887
18453
  Video.displayName = "NutVideo";
17888
- const defaultProps$c = {
17889
- name: "",
17890
- size: "",
17891
- classPrefix: "nut-icon",
17892
- fontClassName: "nutui-iconfont",
17893
- color: "",
17894
- tag: "i",
17895
- onClick: (e2) => {
17896
- },
17897
- className: ""
17898
- };
17899
- function pxCheck(value) {
17900
- return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
17901
- }
17902
- function Icon(props) {
17903
- const {
17904
- name,
17905
- size,
17906
- classPrefix,
17907
- color,
17908
- tag,
17909
- children,
17910
- className,
17911
- fontClassName,
17912
- style,
17913
- onClick,
17914
- ...rest
17915
- } = {
17916
- ...defaultProps$c,
17917
- ...props
17918
- };
17919
- const isImage = name ? name.indexOf("/") !== -1 : false;
17920
- const type = isImage ? "img" : tag;
17921
- const b2 = cn("icon");
17922
- const handleClick2 = (e2) => {
17923
- if (onClick) {
17924
- onClick(e2);
17925
- }
17926
- };
17927
- const hasSrc = () => {
17928
- if (isImage)
17929
- return { src: name };
17930
- return {};
17931
- };
17932
- return React__default.createElement(
17933
- type,
17934
- {
17935
- className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
17936
- style: {
17937
- color,
17938
- fontSize: pxCheck(size),
17939
- width: pxCheck(size),
17940
- height: pxCheck(size),
17941
- ...style
17942
- },
17943
- ...rest,
17944
- onClick: handleClick2,
17945
- ...hasSrc()
17946
- },
17947
- children
17948
- );
17949
- }
17950
- Icon.defaultProps = defaultProps$c;
17951
- Icon.displayName = "NutIcon";
17952
- const defaultProps$b = {
17953
- ...ComponentDefaults,
17954
- className: "",
17955
- style: {},
17956
- isShowPercentage: true,
17957
- percentage: 0,
17958
- fillColor: "#f3f3f3",
17959
- strokeColor: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
17960
- strokeWidth: "",
17961
- textColor: "",
17962
- textWidth: "",
17963
- showText: true,
17964
- textInside: false,
17965
- textBackground: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
17966
- textType: "text",
17967
- status: false,
17968
- iconName: "checked",
17969
- iconColor: "#439422",
17970
- iconSize: "16px",
17971
- rounded: true,
17972
- children: void 0
17973
- };
17974
- const Progress = (props) => {
17975
- const {
17976
- className,
17977
- style,
17978
- isShowPercentage,
17979
- percentage,
17980
- fillColor,
17981
- strokeColor,
17982
- strokeWidth,
17983
- size,
17984
- textColor,
17985
- textWidth,
17986
- showText,
17987
- textInside,
17988
- textBackground,
17989
- textType,
17990
- status,
17991
- iconName,
17992
- iconColor,
17993
- iconSize,
17994
- rounded,
17995
- children,
17996
- ...rest
17997
- } = { ...defaultProps$b, ...props };
17998
- const b2 = cn("progress");
17999
- const classes = classNames(b2(""));
18000
- const classesOuter = classNames({
18001
- [`${b2("")}-outer`]: true,
18002
- [`${b2("")}-${size || "base"}`]: true
18003
- });
18004
- const classesInner = classNames({
18005
- [`${b2("")}-inner`]: true,
18006
- [`${b2("")}-active`]: status
18007
- });
18008
- const classesText = classNames({
18009
- [`${b2("")}-text`]: true
18010
- });
18011
- const classesInsideText = classNames({
18012
- [`${b2("")}-text`]: true,
18013
- [`${b2("")}-insidetext`]: true
18014
- });
18015
- const classesTextInner = classNames({
18016
- [`${b2("")}-text__inner`]: true
18017
- });
18018
- const stylesOuter = {
18019
- height: `${strokeWidth}px`,
18020
- borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
18021
- background: `${fillColor}`
18022
- };
18023
- const stylesInner = {
18024
- width: `${percentage}%`,
18025
- borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
18026
- background: `${strokeColor}`
18027
- };
18028
- const stylesInsideText = {
18029
- width: `${textWidth}px`,
18030
- left: `${percentage}%`,
18031
- background: textBackground || strokeColor
18032
- };
18033
- const stylesInsideIcon = {
18034
- width: `${textWidth}px`,
18035
- left: `${percentage}%`
18036
- };
18037
- const stylesText = {
18038
- width: `${textWidth}px`
18039
- };
18040
- return /* @__PURE__ */ React__default.createElement("div", {
18041
- className: `${classes} ${className}`,
18042
- style,
18043
- ...rest
18044
- }, /* @__PURE__ */ React__default.createElement("div", {
18045
- className: classesOuter,
18046
- style: stylesOuter
18047
- }, /* @__PURE__ */ React__default.createElement("div", {
18048
- className: classesInner,
18049
- style: stylesInner
18050
- }, showText && textInside && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children ? /* @__PURE__ */ React__default.createElement("div", {
18051
- className: classesInsideText,
18052
- style: stylesInsideIcon
18053
- }, children) : /* @__PURE__ */ React__default.createElement("div", {
18054
- className: classesInsideText,
18055
- style: stylesInsideText
18056
- }, /* @__PURE__ */ React__default.createElement("span", {
18057
- className: classesTextInner,
18058
- style: { color: textColor || "#fff" }
18059
- }, percentage, isShowPercentage ? "%" : ""))))), showText && !textInside && /* @__PURE__ */ React__default.createElement("div", {
18060
- className: classesText,
18061
- style: stylesText
18062
- }, textType === "text" && /* @__PURE__ */ React__default.createElement("span", {
18063
- className: classesTextInner,
18064
- style: { color: textColor || "#333" }
18065
- }, percentage, isShowPercentage ? "%" : ""), textType === "icon" && /* @__PURE__ */ React__default.createElement(Icon, {
18066
- classPrefix: props.iconClassPrefix,
18067
- fontClassName: props.iconFontClassName,
18068
- size: iconSize,
18069
- name: iconName,
18070
- color: iconColor
18071
- })));
18072
- };
18073
- Progress.defaultProps = defaultProps$b;
18074
- Progress.displayName = "NutProgress";
18075
18454
  const defaultProps$a = {
18076
18455
  ...ComponentDefaults,
18077
18456
  className: "",
@@ -18113,6 +18492,8 @@ const Audio = (props) => {
18113
18492
  onMute,
18114
18493
  onCanPlay,
18115
18494
  children,
18495
+ iconClassPrefix,
18496
+ iconFontClassName,
18116
18497
  ...rest
18117
18498
  } = {
18118
18499
  ...defaultProps$a,
@@ -18170,13 +18551,13 @@ const Audio = (props) => {
18170
18551
  className: `${b2("icon-box")} ${playing ? b2("icon-play") : b2("icon-stop")}`,
18171
18552
  onClick: handleStatusChange
18172
18553
  }, playing ? /* @__PURE__ */ React__default.createElement(Icon$1, {
18173
- classPrefix: props.iconClassPrefix,
18174
- fontClassName: props.iconFontClassName,
18554
+ classPrefix: iconClassPrefix,
18555
+ fontClassName: iconFontClassName,
18175
18556
  name: "service",
18176
18557
  className: "nut-icon-loading"
18177
18558
  }) : /* @__PURE__ */ React__default.createElement(Icon$1, {
18178
- classPrefix: props.iconClassPrefix,
18179
- fontClassName: props.iconFontClassName,
18559
+ classPrefix: iconClassPrefix,
18560
+ fontClassName: iconFontClassName,
18180
18561
  name: "service"
18181
18562
  }))));
18182
18563
  };
@@ -18913,8 +19294,13 @@ const Address = (props) => {
18913
19294
  onTabChecked,
18914
19295
  style,
18915
19296
  className,
19297
+ iconClassPrefix,
19298
+ iconFontClassName,
18916
19299
  ...rest
18917
- } = { ...defaultProps$6, ...props };
19300
+ } = {
19301
+ ...defaultProps$6,
19302
+ ...props
19303
+ };
18918
19304
  const b2 = cn("address");
18919
19305
  const [privateType, setPrivateType] = useState(type);
18920
19306
  const [tabName] = useState(["province", "city", "country", "town"]);
@@ -19007,8 +19393,8 @@ const Address = (props) => {
19007
19393
  className: "arrow-back",
19008
19394
  onClick: onSwitchModule
19009
19395
  }, privateType === "custom" && backBtnIcon && /* @__PURE__ */ React__default.createElement(Icon$1, {
19010
- classPrefix: props.iconClassPrefix,
19011
- fontClassName: props.iconFontClassName,
19396
+ classPrefix: iconClassPrefix,
19397
+ fontClassName: iconFontClassName,
19012
19398
  name: backBtnIcon,
19013
19399
  color: "#cccccc"
19014
19400
  })), /* @__PURE__ */ React__default.createElement("div", {
@@ -19016,8 +19402,8 @@ const Address = (props) => {
19016
19402
  }, privateType === "custom" ? locale.address.selectRegion || customAddressTitle : locale.address.deliveryTo || existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
19017
19403
  onClick: () => handClose()
19018
19404
  }, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon$1, {
19019
- classPrefix: props.iconClassPrefix,
19020
- fontClassName: props.iconFontClassName,
19405
+ classPrefix: iconClassPrefix,
19406
+ fontClassName: iconFontClassName,
19021
19407
  name: closeBtnIcon,
19022
19408
  color: "#cccccc",
19023
19409
  size: "18px"
@@ -19132,7 +19518,7 @@ const InternalBarrage = (props, ref) => {
19132
19518
  el.classList.add("move");
19133
19519
  el.style.animationDuration = `${speeds}ms`;
19134
19520
  el.style.top = `${_index % rows * (height + top) + 20}px`;
19135
- el.style.width = `${width + 20}px`;
19521
+ el.style.width = `${width}px`;
19136
19522
  el.style.setProperty("--move-distance", `-${barrageCWidth.current}px`);
19137
19523
  el.dataset.index = `${_index}`;
19138
19524
  el.addEventListener("animationend", () => {
@@ -19535,4 +19921,4 @@ const TimeSelect = (props) => {
19535
19921
  };
19536
19922
  TimeSelect.defaultProps = defaultProps;
19537
19923
  TimeSelect.displayName = "NutTimeSelect";
19538
- 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, 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, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
19924
+ 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, 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 };