@nutui/nutui-react 2.6.15 → 2.6.17

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 (53) hide show
  1. package/CHANGELOG.md +45 -14
  2. package/README.md +2 -2
  3. package/dist/esm/Cell/style/style.css +1 -1
  4. package/dist/esm/Cell.js +3 -3
  5. package/dist/esm/Form/style/style.css +1 -1
  6. package/dist/esm/ImagePreview.js +22 -13
  7. package/dist/esm/InputNumber.js +26 -9
  8. package/dist/esm/Menu.js +9 -2
  9. package/dist/esm/NumberKeyboard.js +38 -27
  10. package/dist/esm/Uploader.js +5 -3
  11. package/dist/esm/formitem2.js +5 -5
  12. package/dist/esm/menuitem2.js +1 -1
  13. package/dist/locales/base.js +1 -1
  14. package/dist/locales/en-US.js +1 -1
  15. package/dist/locales/id-ID.js +1 -1
  16. package/dist/locales/tr-TR.js +1 -1
  17. package/dist/locales/zh-CN.js +1 -1
  18. package/dist/locales/zh-TW.js +1 -1
  19. package/dist/locales/zh-UG.js +1 -1
  20. package/dist/nutui.react.es.js +212 -150
  21. package/dist/nutui.react.umd.js +212 -150
  22. package/dist/packages/cell/cell.scss +20 -0
  23. package/dist/style.css +1 -1
  24. package/dist/types/packages/avatargroup/context.d.ts +0 -1
  25. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  26. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  27. package/dist/types/packages/cell/cell.d.ts +7 -2
  28. package/dist/types/packages/cell/cell.taro.d.ts +2 -1
  29. package/dist/types/packages/cellgroup/context.d.ts +0 -1
  30. package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
  31. package/dist/types/packages/collapse/context.d.ts +0 -1
  32. package/dist/types/packages/form/context.d.ts +0 -1
  33. package/dist/types/packages/formitem/formitem.d.ts +5 -0
  34. package/dist/types/packages/formitem/formitem.taro.d.ts +1 -0
  35. package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
  36. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
  37. package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
  38. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
  39. package/dist/types/packages/menuitem/menuitem.d.ts +5 -0
  40. package/dist/types/packages/menuitem/menuitem.taro.d.ts +1 -0
  41. package/dist/types/packages/popover/types.d.ts +0 -1
  42. package/dist/types/packages/radiogroup/context.d.ts +1 -1
  43. package/dist/types/packages/row/UserContext.d.ts +0 -1
  44. package/dist/types/packages/sidenavbar/context.d.ts +0 -1
  45. package/dist/types/packages/steps/context.d.ts +0 -1
  46. package/dist/types/packages/swiper/context.d.ts +0 -1
  47. package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
  48. package/dist/types/packages/uploader/uploader.d.ts +1 -1
  49. package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
  50. package/dist/types/packages/virtuallist/utils.d.ts +2 -2
  51. package/dist/types/utils/index.d.ts +0 -1
  52. package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.15 Fri Jul 26 2024 15:20:57 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:24 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -530,7 +530,7 @@ const ComponentDefaults = {
530
530
  style: {}
531
531
  };
532
532
  const prefixCls$2 = "nut-button";
533
- const defaultProps$1t = {
533
+ const defaultProps$1u = {
534
534
  ...ComponentDefaults,
535
535
  color: "",
536
536
  type: "default",
@@ -566,7 +566,7 @@ const Button = React__default.forwardRef(
566
566
  onClick,
567
567
  ...rest
568
568
  } = {
569
- ...defaultProps$1t,
569
+ ...defaultProps$1u,
570
570
  ...props
571
571
  };
572
572
  const getStyle = useCallback(() => {
@@ -625,7 +625,7 @@ const Button = React__default.forwardRef(
625
625
  );
626
626
  Button.displayName = "NutButton";
627
627
  const CellGroupContext = createContext(null);
628
- const defaultProps$1s = {
628
+ const defaultProps$1t = {
629
629
  ...ComponentDefaults,
630
630
  title: "",
631
631
  description: "",
@@ -634,7 +634,7 @@ const defaultProps$1s = {
634
634
  const classPrefix$r = "nut-cell-group";
635
635
  const CellGroup = (props) => {
636
636
  const { children, className, title, description, divider, ...rest } = {
637
- ...defaultProps$1s,
637
+ ...defaultProps$1t,
638
638
  ...props
639
639
  };
640
640
  return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React__default.createElement(
@@ -646,13 +646,14 @@ const CellGroup = (props) => {
646
646
  ));
647
647
  };
648
648
  CellGroup.displayName = "NutCellGroup";
649
- const defaultProps$1r = {
649
+ const defaultProps$1s = {
650
650
  ...ComponentDefaults,
651
651
  title: null,
652
652
  description: null,
653
653
  extra: null,
654
654
  radius: "6px",
655
655
  align: "flex-start",
656
+ clickable: false,
656
657
  onClick: (event) => {
657
658
  }
658
659
  };
@@ -661,6 +662,7 @@ const Cell = (props) => {
661
662
  const ctx2 = useContext(CellGroupContext);
662
663
  const {
663
664
  children,
665
+ clickable,
664
666
  onClick,
665
667
  title,
666
668
  description,
@@ -671,7 +673,7 @@ const Cell = (props) => {
671
673
  style,
672
674
  ...rest
673
675
  } = {
674
- ...defaultProps$1r,
676
+ ...defaultProps$1s,
675
677
  ...props
676
678
  };
677
679
  const handleClick2 = (event) => {
@@ -688,7 +690,7 @@ const Cell = (props) => {
688
690
  return /* @__PURE__ */ React__default.createElement(
689
691
  "div",
690
692
  {
691
- className: classNames(classPrefix$q, className),
693
+ className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
692
694
  onClick: (event) => handleClick2(event),
693
695
  style: baseStyle,
694
696
  ...rest
@@ -1862,7 +1864,7 @@ ConfigProvider.displayName = "NutConfigProvider";
1862
1864
  const pxCheck = (value) => {
1863
1865
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
1864
1866
  };
1865
- const defaultProps$1q = {
1867
+ const defaultProps$1r = {
1866
1868
  ...ComponentDefaults,
1867
1869
  fit: "fill",
1868
1870
  position: "center",
@@ -1892,7 +1894,7 @@ const Image$1 = (props) => {
1892
1894
  onClick,
1893
1895
  onLoad,
1894
1896
  onError
1895
- } = { ...defaultProps$1q, ...props };
1897
+ } = { ...defaultProps$1r, ...props };
1896
1898
  const [innerLoading, setInnerLoading] = useState(false);
1897
1899
  const [isError, setIsError] = useState(false);
1898
1900
  const [complete, setComplete] = useState(false);
@@ -2048,7 +2050,7 @@ function _objectWithoutPropertiesLoose$3(r, e2) {
2048
2050
  if (null == r) return {};
2049
2051
  var t2 = {};
2050
2052
  for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
2051
- if (e2.indexOf(n2) >= 0) continue;
2053
+ if (e2.includes(n2)) continue;
2052
2054
  t2[n2] = r[n2];
2053
2055
  }
2054
2056
  return t2;
@@ -2754,7 +2756,7 @@ const Overlay = (props) => {
2754
2756
  };
2755
2757
  Overlay.displayName = "NutOverlay";
2756
2758
  const DataContext$1 = createContext({});
2757
- const defaultProps$1p = {
2759
+ const defaultProps$1q = {
2758
2760
  ...ComponentDefaults,
2759
2761
  span: "24",
2760
2762
  offset: "0",
@@ -2762,7 +2764,7 @@ const defaultProps$1p = {
2762
2764
  };
2763
2765
  const Col = (props) => {
2764
2766
  const { className, style, span, offset, children, onClick } = {
2765
- ...defaultProps$1p,
2767
+ ...defaultProps$1q,
2766
2768
  ...props
2767
2769
  };
2768
2770
  const [colName, setColName] = useState("");
@@ -2795,7 +2797,7 @@ const Col = (props) => {
2795
2797
  );
2796
2798
  };
2797
2799
  Col.displayName = "NutCol";
2798
- const defaultProps$1o = {
2800
+ const defaultProps$1p = {
2799
2801
  ...ComponentDefaults,
2800
2802
  contentPosition: "center",
2801
2803
  direction: "horizontal"
@@ -2803,7 +2805,7 @@ const defaultProps$1o = {
2803
2805
  const classPrefix$n = `nut-divider`;
2804
2806
  const Divider = (props) => {
2805
2807
  const { children, contentPosition, style, className, direction, ...rest } = {
2806
- ...defaultProps$1o,
2808
+ ...defaultProps$1p,
2807
2809
  ...props
2808
2810
  };
2809
2811
  const classes = direction === "horizontal" ? classNames({
@@ -2824,7 +2826,7 @@ const gridContext = {
2824
2826
  }
2825
2827
  };
2826
2828
  const GridContext = React__default.createContext(gridContext);
2827
- const defaultProps$1n = {
2829
+ const defaultProps$1o = {
2828
2830
  text: "",
2829
2831
  columns: 4,
2830
2832
  gap: 0,
@@ -2850,7 +2852,7 @@ const GridItem = (props) => {
2850
2852
  onClick,
2851
2853
  ...rest
2852
2854
  } = {
2853
- ...defaultProps$1n,
2855
+ ...defaultProps$1o,
2854
2856
  ...props
2855
2857
  };
2856
2858
  const classPrefix2 = "nut-grid-item";
@@ -2909,7 +2911,7 @@ const GridItem = (props) => {
2909
2911
  );
2910
2912
  };
2911
2913
  GridItem.displayName = "NutGridItem";
2912
- const defaultProps$1m = {
2914
+ const defaultProps$1n = {
2913
2915
  columns: 4,
2914
2916
  gap: 0,
2915
2917
  center: true,
@@ -2930,7 +2932,7 @@ const Grid = (props) => {
2930
2932
  className,
2931
2933
  onClick,
2932
2934
  ...rest
2933
- } = { ...defaultProps$1m, ...props };
2935
+ } = { ...defaultProps$1n, ...props };
2934
2936
  const childrenDom = React__default.Children.toArray(children);
2935
2937
  const classPrefix2 = "nut-grid";
2936
2938
  const rootClass = () => {
@@ -2966,14 +2968,14 @@ const Grid = (props) => {
2966
2968
  };
2967
2969
  Grid.displayName = "NutGrid";
2968
2970
  Grid.Item = GridItem;
2969
- const defaultProps$1l = {};
2971
+ const defaultProps$1m = {};
2970
2972
  const Layout = (props) => {
2971
- ({ ...defaultProps$1l, ...props });
2973
+ ({ ...defaultProps$1m, ...props });
2972
2974
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
2973
2975
  };
2974
2976
  Layout.displayName = "NutLayout";
2975
2977
  const classPrefix$m = "nut-row";
2976
- const defaultProps$1k = {
2978
+ const defaultProps$1l = {
2977
2979
  ...ComponentDefaults,
2978
2980
  type: "",
2979
2981
  justify: "start",
@@ -2993,7 +2995,7 @@ const Row = (props) => {
2993
2995
  gutter,
2994
2996
  onClick
2995
2997
  } = {
2996
- ...defaultProps$1k,
2998
+ ...defaultProps$1l,
2997
2999
  ...props
2998
3000
  };
2999
3001
  const getClass = (prefix2, type22) => {
@@ -3027,12 +3029,12 @@ const Row = (props) => {
3027
3029
  };
3028
3030
  Row.displayName = "NutRow";
3029
3031
  const prefixCls$1 = "nut-space";
3030
- const defaultProps$1j = {
3032
+ const defaultProps$1k = {
3031
3033
  direction: "horizontal"
3032
3034
  };
3033
3035
  const Space = (props) => {
3034
3036
  const { className, style, children, wrap, align, direction, justify } = {
3035
- ...defaultProps$1j,
3037
+ ...defaultProps$1k,
3036
3038
  ...props
3037
3039
  };
3038
3040
  const cls = classNames(
@@ -3100,7 +3102,7 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
3100
3102
  stop2.current = true;
3101
3103
  };
3102
3104
  }
3103
- const defaultProps$1i = {
3105
+ const defaultProps$1j = {
3104
3106
  ...ComponentDefaults,
3105
3107
  position: "top",
3106
3108
  threshold: 0,
@@ -3118,7 +3120,7 @@ const Sticky = (props) => {
3118
3120
  threshold,
3119
3121
  onChange,
3120
3122
  ...rest
3121
- } = { ...defaultProps$1i, ...props };
3123
+ } = { ...defaultProps$1j, ...props };
3122
3124
  const stickyRef = useRef(null);
3123
3125
  const rootRef = useRef(null);
3124
3126
  const [isFixed, setIsFixed] = useState(false);
@@ -3239,7 +3241,7 @@ const SafeArea = (props) => {
3239
3241
  );
3240
3242
  };
3241
3243
  SafeArea.displayName = "NutSafeArea";
3242
- const defaultProps$1h = {
3244
+ const defaultProps$1i = {
3243
3245
  ...ComponentDefaults,
3244
3246
  target: "",
3245
3247
  threshold: 200,
@@ -3258,7 +3260,7 @@ const BackTop = (props) => {
3258
3260
  style,
3259
3261
  onClick
3260
3262
  } = {
3261
- ...defaultProps$1h,
3263
+ ...defaultProps$1i,
3262
3264
  ...props
3263
3265
  };
3264
3266
  const classPrefix2 = "nut-backtop";
@@ -8176,7 +8178,7 @@ const host = createHost(primitives, {
8176
8178
  });
8177
8179
  const animated = host.animated;
8178
8180
  const elevatorContext = createContext({});
8179
- const defaultProps$1g = {
8181
+ const defaultProps$1h = {
8180
8182
  ...ComponentDefaults,
8181
8183
  height: "200px",
8182
8184
  floorKey: "title",
@@ -8202,7 +8204,7 @@ const Elevator = (props) => {
8202
8204
  children,
8203
8205
  ...rest
8204
8206
  } = {
8205
- ...defaultProps$1g,
8207
+ ...defaultProps$1h,
8206
8208
  ...props
8207
8209
  };
8208
8210
  const classPrefix2 = "nut-elevator";
@@ -8380,7 +8382,7 @@ const Elevator = (props) => {
8380
8382
  };
8381
8383
  Elevator.displayName = "NutElevator";
8382
8384
  Elevator.Context = elevatorContext;
8383
- const defaultProps$1f = {
8385
+ const defaultProps$1g = {
8384
8386
  ...ComponentDefaults,
8385
8387
  activeText: "",
8386
8388
  inactiveText: "",
@@ -8408,7 +8410,7 @@ const FixedNav = (props) => {
8408
8410
  content,
8409
8411
  ...rest
8410
8412
  } = {
8411
- ...defaultProps$1f,
8413
+ ...defaultProps$1g,
8412
8414
  ...props
8413
8415
  };
8414
8416
  const classPrefix2 = "nut-fixednav";
@@ -8461,7 +8463,7 @@ const FixedNav = (props) => {
8461
8463
  );
8462
8464
  };
8463
8465
  FixedNav.displayName = "NutFixedNav";
8464
- const defaultProps$1e = {
8466
+ const defaultProps$1f = {
8465
8467
  ...ComponentDefaults,
8466
8468
  left: "",
8467
8469
  right: "",
@@ -8486,7 +8488,7 @@ const NavBar = (props) => {
8486
8488
  zIndex,
8487
8489
  onBackClick
8488
8490
  } = {
8489
- ...defaultProps$1e,
8491
+ ...defaultProps$1f,
8490
8492
  ...props
8491
8493
  };
8492
8494
  const classPrefix2 = "nut-navbar";
@@ -8563,7 +8565,7 @@ const NavBar = (props) => {
8563
8565
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
8564
8566
  };
8565
8567
  NavBar.displayName = "NutNavBar";
8566
- const defaultProps$1d = {
8568
+ const defaultProps$1e = {
8567
8569
  ...ComponentDefaults,
8568
8570
  position: "center",
8569
8571
  transition: "",
@@ -8616,7 +8618,7 @@ const Popup = (props) => {
8616
8618
  afterShow,
8617
8619
  afterClose,
8618
8620
  onClick
8619
- } = { ...defaultProps$1d, ...props };
8621
+ } = { ...defaultProps$1e, ...props };
8620
8622
  const nodeRef = React__default.useRef(null);
8621
8623
  let innerIndex = zIndex || _zIndex;
8622
8624
  const [index, setIndex] = useState(innerIndex);
@@ -8772,7 +8774,7 @@ const handleClick = (e2) => {
8772
8774
  }
8773
8775
  };
8774
8776
  const OffsetContext = createContext(20);
8775
- const defaultProps$1c = {
8777
+ const defaultProps$1d = {
8776
8778
  ...ComponentDefaults,
8777
8779
  position: "left",
8778
8780
  width: "80%"
@@ -8790,7 +8792,7 @@ const SideNavBar = (props) => {
8790
8792
  indent,
8791
8793
  ...rest
8792
8794
  } = {
8793
- ...defaultProps$1c,
8795
+ ...defaultProps$1d,
8794
8796
  ...props
8795
8797
  };
8796
8798
  const innerIndent = indent ? Number(indent) : 20;
@@ -8840,13 +8842,13 @@ const SideNavBarItem = (props) => {
8840
8842
  title
8841
8843
  );
8842
8844
  };
8843
- const defaultProps$1b = {
8845
+ const defaultProps$1c = {
8844
8846
  open: true
8845
8847
  };
8846
8848
  const SubSideNavBar = (props) => {
8847
8849
  const classPrefix2 = "nut-subsidenavbar";
8848
8850
  const { title, value, children, onClick, open, ...rest } = {
8849
- ...defaultProps$1b,
8851
+ ...defaultProps$1c,
8850
8852
  ...props
8851
8853
  };
8852
8854
  const offset = useContext(OffsetContext);
@@ -8923,7 +8925,7 @@ function usePropsValue({
8923
8925
  );
8924
8926
  return [stateRef.current, setState];
8925
8927
  }
8926
- const defaultProps$1a = {
8928
+ const defaultProps$1b = {
8927
8929
  ...ComponentDefaults,
8928
8930
  value: "",
8929
8931
  dot: false,
@@ -8948,7 +8950,7 @@ const Badge = (props) => {
8948
8950
  color,
8949
8951
  fill
8950
8952
  } = {
8951
- ...defaultProps$1a,
8953
+ ...defaultProps$1b,
8952
8954
  ...props
8953
8955
  };
8954
8956
  const classPrefix2 = "nut-badge";
@@ -9002,7 +9004,7 @@ const Badge = (props) => {
9002
9004
  };
9003
9005
  Badge.displayName = "NutBadge";
9004
9006
  const TabbarContext = React__default.createContext(null);
9005
- const defaultProps$19 = {
9007
+ const defaultProps$1a = {
9006
9008
  ...ComponentDefaults,
9007
9009
  title: "",
9008
9010
  icon: null,
@@ -9028,7 +9030,7 @@ const TabbarItem = (props) => {
9028
9030
  index,
9029
9031
  ...rest
9030
9032
  } = {
9031
- ...defaultProps$19,
9033
+ ...defaultProps$1a,
9032
9034
  ...props
9033
9035
  };
9034
9036
  const active = index === (ctx2 == null ? void 0 : ctx2.selectIndex);
@@ -9066,7 +9068,7 @@ const TabbarItem = (props) => {
9066
9068
  icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
9067
9069
  );
9068
9070
  };
9069
- const defaultProps$18 = {
9071
+ const defaultProps$19 = {
9070
9072
  ...ComponentDefaults,
9071
9073
  defaultValue: 0,
9072
9074
  fixed: false,
@@ -9089,7 +9091,7 @@ const Tabbar = (props) => {
9089
9091
  style,
9090
9092
  onSwitch
9091
9093
  } = {
9092
- ...defaultProps$18,
9094
+ ...defaultProps$19,
9093
9095
  ...props
9094
9096
  };
9095
9097
  const classPrefix2 = "nut-tabbar";
@@ -9131,14 +9133,14 @@ const Tabbar = (props) => {
9131
9133
  };
9132
9134
  Tabbar.displayName = "NutTabbar";
9133
9135
  Tabbar.Item = TabbarItem;
9134
- const defaultProps$17 = {
9136
+ const defaultProps$18 = {
9135
9137
  title: "",
9136
9138
  value: "",
9137
9139
  disabled: false
9138
9140
  };
9139
9141
  const TabPane = (props) => {
9140
9142
  const { children, autoHeightClassName, className, disabled } = {
9141
- ...defaultProps$17,
9143
+ ...defaultProps$18,
9142
9144
  ...props
9143
9145
  };
9144
9146
  const classPrefix2 = "nut-tabpane";
@@ -9152,7 +9154,7 @@ const TabPane = (props) => {
9152
9154
  );
9153
9155
  return children ? /* @__PURE__ */ React__default.createElement("div", { className: classes }, !disabled && children) : null;
9154
9156
  };
9155
- const defaultProps$16 = {
9157
+ const defaultProps$17 = {
9156
9158
  ...ComponentDefaults,
9157
9159
  tabStyle: {},
9158
9160
  activeColor: "",
@@ -9181,7 +9183,7 @@ const Tabs = (props) => {
9181
9183
  defaultValue: outerDefaultValue,
9182
9184
  ...rest
9183
9185
  } = {
9184
- ...defaultProps$16,
9186
+ ...defaultProps$17,
9185
9187
  ...props
9186
9188
  };
9187
9189
  const [value, setValue] = usePropsValue({
@@ -9489,7 +9491,7 @@ class Tree {
9489
9491
  return pathNodes;
9490
9492
  }
9491
9493
  }
9492
- const defaultProps$15 = {
9494
+ const defaultProps$16 = {
9493
9495
  ...ComponentDefaults,
9494
9496
  activeColor: "",
9495
9497
  activeIcon: "checklist",
@@ -9534,7 +9536,7 @@ const InternalCascader = (props, ref) => {
9534
9536
  onClose,
9535
9537
  onChange,
9536
9538
  onPathChange
9537
- } = { ...defaultProps$15, ...props };
9539
+ } = { ...defaultProps$16, ...props };
9538
9540
  const [tabvalue, setTabvalue] = useState("c1");
9539
9541
  const [optionsData, setOptionsData] = useState([]);
9540
9542
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
@@ -9841,7 +9843,7 @@ const InternalCascader = (props, ref) => {
9841
9843
  };
9842
9844
  const Cascader = React__default.forwardRef(InternalCascader);
9843
9845
  Cascader.displayName = "NutCascader";
9844
- const defaultProps$14 = {
9846
+ const defaultProps$15 = {
9845
9847
  ...ComponentDefaults,
9846
9848
  visible: false,
9847
9849
  type: "custom",
@@ -9868,7 +9870,7 @@ const CustomRender = (props) => {
9868
9870
  onPathChange,
9869
9871
  ...rest
9870
9872
  } = {
9871
- ...defaultProps$14,
9873
+ ...defaultProps$15,
9872
9874
  ...props
9873
9875
  };
9874
9876
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
@@ -9893,7 +9895,7 @@ const CustomRender = (props) => {
9893
9895
  }
9894
9896
  ));
9895
9897
  };
9896
- const defaultProps$13 = {
9898
+ const defaultProps$14 = {
9897
9899
  type: "custom",
9898
9900
  existList: [],
9899
9901
  defaultIcon: null,
@@ -9912,7 +9914,7 @@ const ExistRender = (props) => {
9912
9914
  onSelect,
9913
9915
  onSwitch,
9914
9916
  ...rest
9915
- } = { ...defaultProps$13, ...props };
9917
+ } = { ...defaultProps$14, ...props };
9916
9918
  const classPrefix2 = "nut-address";
9917
9919
  const selectedExist = (item) => {
9918
9920
  existList.forEach((list, index) => {
@@ -9941,7 +9943,7 @@ const ExistRender = (props) => {
9941
9943
  );
9942
9944
  })), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
9943
9945
  };
9944
- const defaultProps$12 = {
9946
+ const defaultProps$13 = {
9945
9947
  ...ComponentDefaults,
9946
9948
  defaultValue: [],
9947
9949
  type: "custom",
@@ -9983,7 +9985,7 @@ const InternalAddress = (props, ref) => {
9983
9985
  onSwitch,
9984
9986
  ...rest
9985
9987
  } = {
9986
- ...defaultProps$12,
9988
+ ...defaultProps$13,
9987
9989
  ...props
9988
9990
  };
9989
9991
  const classPrefix2 = "nut-address";
@@ -10321,7 +10323,7 @@ const isEnd = (day, days) => {
10321
10323
  const isStartAndEnd = (days) => {
10322
10324
  return days.length >= 2 && Utils.isEqual(days[0], days[1]);
10323
10325
  };
10324
- const defaultProps$11 = {
10326
+ const defaultProps$12 = {
10325
10327
  ...ComponentDefaults,
10326
10328
  type: "single",
10327
10329
  autoBackfill: false,
@@ -10382,7 +10384,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
10382
10384
  onUpdate,
10383
10385
  onDayClick,
10384
10386
  onPageChange
10385
- } = { ...defaultProps$11, ...props };
10387
+ } = { ...defaultProps$12, ...props };
10386
10388
  const weekdays = locale.calendaritem.weekdays;
10387
10389
  const weeks = [
10388
10390
  ...weekdays.slice(firstDayOfWeek, 7),
@@ -10921,7 +10923,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
10921
10923
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
10922
10924
  });
10923
10925
  CalendarItem.displayName = "NutCalendarItem";
10924
- const defaultProps$10 = {
10926
+ const defaultProps$11 = {
10925
10927
  ...ComponentDefaults,
10926
10928
  type: "single",
10927
10929
  autoBackfill: false,
@@ -10984,7 +10986,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
10984
10986
  onConfirm,
10985
10987
  onDayClick,
10986
10988
  onPageChange
10987
- } = { ...defaultProps$10, ...props };
10989
+ } = { ...defaultProps$11, ...props };
10988
10990
  const calendarRef = useRef(null);
10989
10991
  const close = () => {
10990
10992
  onClose && onClose();
@@ -11164,7 +11166,7 @@ const getCurrentWeekDays = (day, firstDayOfWeek) => {
11164
11166
  )
11165
11167
  ];
11166
11168
  };
11167
- const defaultProps$$ = {
11169
+ const defaultProps$10 = {
11168
11170
  ...ComponentDefaults,
11169
11171
  type: "single",
11170
11172
  firstDayOfWeek: 0
@@ -11188,7 +11190,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
11188
11190
  onDayClick,
11189
11191
  onPageChange,
11190
11192
  onChange
11191
- } = { ...defaultProps$$, ...props };
11193
+ } = { ...defaultProps$10, ...props };
11192
11194
  const [month, setMonth] = useState(() => {
11193
11195
  let date4 = new Date(Date.now());
11194
11196
  const val = value || defaultValue;
@@ -11492,7 +11494,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
11492
11494
  });
11493
11495
  CalendarCard.displayName = "NutCalendarCard";
11494
11496
  const CheckboxGroupContext = createContext(null);
11495
- const defaultProps$_ = {
11497
+ const defaultProps$$ = {
11496
11498
  max: void 0,
11497
11499
  min: void 0,
11498
11500
  list: false,
@@ -11522,7 +11524,7 @@ const CheckboxGroup = React__default.forwardRef(
11522
11524
  onChange,
11523
11525
  onLimit,
11524
11526
  ...rest
11525
- } = { ...defaultProps$_, ...props };
11527
+ } = { ...defaultProps$$, ...props };
11526
11528
  useImperativeHandle(ref, () => ({
11527
11529
  toggle(state) {
11528
11530
  if (state === false) {
@@ -11615,7 +11617,7 @@ const CheckboxGroup = React__default.forwardRef(
11615
11617
  }
11616
11618
  );
11617
11619
  CheckboxGroup.displayName = "NutCheckboxGroup";
11618
- const defaultProps$Z = {
11620
+ const defaultProps$_ = {
11619
11621
  ...ComponentDefaults,
11620
11622
  disabled: false,
11621
11623
  shape: "round",
@@ -11629,7 +11631,7 @@ const defaultProps$Z = {
11629
11631
  const classPrefix$h = "nut-checkbox";
11630
11632
  const Checkbox = (props) => {
11631
11633
  const { children } = {
11632
- ...defaultProps$Z,
11634
+ ...defaultProps$_,
11633
11635
  ...props
11634
11636
  };
11635
11637
  const {
@@ -12006,7 +12008,7 @@ function useRefs() {
12006
12008
  }, []);
12007
12009
  return [refs.current, setRefs, reset];
12008
12010
  }
12009
- const defaultProps$Y = {
12011
+ const defaultProps$Z = {
12010
12012
  ...ComponentDefaults,
12011
12013
  title: "",
12012
12014
  options: [],
@@ -12036,7 +12038,7 @@ const InternalPicker = (props, ref) => {
12036
12038
  afterClose,
12037
12039
  onChange,
12038
12040
  ...rest
12039
- } = { ...defaultProps$Y, ...props };
12041
+ } = { ...defaultProps$Z, ...props };
12040
12042
  const classPrefix2 = "nut-picker";
12041
12043
  const classes = classNames(classPrefix2, className);
12042
12044
  const [selectedValue, setSelectedValue] = usePropsValue({
@@ -12277,7 +12279,7 @@ const padZero = (num, targetLength = 2) => {
12277
12279
  return str;
12278
12280
  };
12279
12281
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
12280
- const defaultProps$X = {
12282
+ const defaultProps$Y = {
12281
12283
  ...ComponentDefaults,
12282
12284
  visible: false,
12283
12285
  title: "",
@@ -12310,7 +12312,7 @@ const DatePicker = (props) => {
12310
12312
  style,
12311
12313
  ...rest
12312
12314
  } = {
12313
- ...defaultProps$X,
12315
+ ...defaultProps$Y,
12314
12316
  ...props
12315
12317
  };
12316
12318
  const { locale } = useConfig();
@@ -13821,7 +13823,7 @@ const useForm = (form) => {
13821
13823
  }
13822
13824
  return [formRef.current];
13823
13825
  };
13824
- const defaultProps$W = {
13826
+ const defaultProps$X = {
13825
13827
  ...ComponentDefaults,
13826
13828
  labelPosition: "right",
13827
13829
  starPosition: "left",
@@ -13852,7 +13854,7 @@ const Form = React__default.forwardRef(
13852
13854
  starPosition,
13853
13855
  form
13854
13856
  } = {
13855
- ...defaultProps$W,
13857
+ ...defaultProps$X,
13856
13858
  ...props
13857
13859
  };
13858
13860
  let formInstance;
@@ -13908,7 +13910,7 @@ function isForwardRefComponent(component) {
13908
13910
  }
13909
13911
  ).$$typeof === component.type.$$typeof;
13910
13912
  }
13911
- const defaultProps$V = {
13913
+ const defaultProps$W = {
13912
13914
  ...ComponentDefaults,
13913
13915
  required: false,
13914
13916
  name: "",
@@ -14001,9 +14003,10 @@ const _FormItem = class _FormItem extends React__default.Component {
14001
14003
  rules: rules2,
14002
14004
  className,
14003
14005
  style,
14004
- errorMessageAlign
14006
+ errorMessageAlign,
14007
+ align
14005
14008
  } = {
14006
- ...defaultProps$V,
14009
+ ...defaultProps$W,
14007
14010
  ...this.props
14008
14011
  };
14009
14012
  const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
@@ -14016,6 +14019,7 @@ const _FormItem = class _FormItem extends React__default.Component {
14016
14019
  {
14017
14020
  className: `nut-form-item ${className}`,
14018
14021
  style,
14022
+ align,
14019
14023
  onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
14020
14024
  },
14021
14025
  label ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
@@ -14069,7 +14073,7 @@ const _FormItem = class _FormItem extends React__default.Component {
14069
14073
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
14070
14074
  }
14071
14075
  };
14072
- _FormItem.defaultProps = defaultProps$V;
14076
+ _FormItem.defaultProps = defaultProps$W;
14073
14077
  _FormItem.contextType = Context;
14074
14078
  let FormItem = _FormItem;
14075
14079
  const InnerForm = Form;
@@ -14099,7 +14103,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
14099
14103
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
14100
14104
  return value.replace(regExp, "");
14101
14105
  }
14102
- const defaultProps$U = {
14106
+ const defaultProps$V = {
14103
14107
  ...ComponentDefaults,
14104
14108
  type: "text",
14105
14109
  name: "",
@@ -14145,7 +14149,7 @@ const Input = forwardRef(
14145
14149
  onCompositionEnd,
14146
14150
  ...rest
14147
14151
  } = {
14148
- ...defaultProps$U,
14152
+ ...defaultProps$V,
14149
14153
  ...props
14150
14154
  };
14151
14155
  const [value, setValue] = usePropsValue({
@@ -14290,7 +14294,7 @@ const Input = forwardRef(
14290
14294
  }
14291
14295
  );
14292
14296
  Input.displayName = "NutInput";
14293
- const defaultProps$T = {
14297
+ const defaultProps$U = {
14294
14298
  ...ComponentDefaults,
14295
14299
  disabled: false,
14296
14300
  readOnly: false,
@@ -14326,7 +14330,7 @@ const InputNumber = (props) => {
14326
14330
  onChange,
14327
14331
  ...restProps
14328
14332
  } = {
14329
- ...defaultProps$T,
14333
+ ...defaultProps$U,
14330
14334
  ...props
14331
14335
  };
14332
14336
  const classes = classNames(classPrefix$g, className, {
@@ -14417,6 +14421,17 @@ const InputNumber = (props) => {
14417
14421
  if (text === "-") return null;
14418
14422
  return text;
14419
14423
  };
14424
+ const clampValue = (valueStr) => {
14425
+ if (valueStr === null) return defaultValue;
14426
+ const val = Number(parseFloat(valueStr || "0").toFixed(digits));
14427
+ return Math.max(Number(min), Math.min(Number(max), val));
14428
+ };
14429
+ const handleValueChange = (valueStr, e2) => {
14430
+ const val = clampValue(valueStr);
14431
+ if (val !== Number(shadowValue)) {
14432
+ onChange == null ? void 0 : onChange(val, e2);
14433
+ }
14434
+ };
14420
14435
  const handleInputChange = (e2) => {
14421
14436
  setInputValue(e2.target.value);
14422
14437
  const valueStr = parseValue(e2.target.value);
@@ -14427,26 +14442,31 @@ const InputNumber = (props) => {
14427
14442
  setShadowValue(defaultValue);
14428
14443
  }
14429
14444
  } else {
14430
- setShadowValue(valueStr);
14431
- }
14432
- if (!async) {
14433
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
14445
+ setShadowValue(clampValue(valueStr));
14434
14446
  }
14447
+ !async && handleValueChange(valueStr, e2);
14435
14448
  };
14436
14449
  const handleFocus = (e2) => {
14437
14450
  setFocused(true);
14438
14451
  setInputValue(
14439
14452
  shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
14440
14453
  );
14441
- onFocus && onFocus(e2);
14454
+ onFocus == null ? void 0 : onFocus(e2);
14442
14455
  };
14443
14456
  const handleBlur = (e2) => {
14444
14457
  setFocused(false);
14445
- onBlur && onBlur(e2);
14446
- if (async) {
14447
- const valueStr = parseValue(e2.target.value);
14448
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
14458
+ onBlur == null ? void 0 : onBlur(e2);
14459
+ const valueStr = parseValue(e2.target.value);
14460
+ if (valueStr === null) {
14461
+ if (allowEmpty) {
14462
+ setShadowValue(null);
14463
+ } else {
14464
+ setShadowValue(defaultValue);
14465
+ }
14466
+ } else {
14467
+ setShadowValue(clampValue(valueStr));
14449
14468
  }
14469
+ async && handleValueChange(valueStr, e2);
14450
14470
  };
14451
14471
  return /* @__PURE__ */ React__default.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React__default.createElement(
14452
14472
  e$6,
@@ -14526,8 +14546,9 @@ function useClickAway(onClickAway, target, eventName = "click", useCapture, isLi
14526
14546
  };
14527
14547
  }, [target]);
14528
14548
  }
14529
- const defaultProps$S = {
14549
+ const defaultProps$T = {
14530
14550
  ...ComponentDefaults,
14551
+ titleIcon: null,
14531
14552
  columns: 1,
14532
14553
  direction: "down",
14533
14554
  icon: null,
@@ -14557,7 +14578,7 @@ const MenuItem = forwardRef((props, ref) => {
14557
14578
  parent,
14558
14579
  index
14559
14580
  } = {
14560
- ...defaultProps$S,
14581
+ ...defaultProps$T,
14561
14582
  ...props
14562
14583
  };
14563
14584
  const [showPopup, setShowPopup] = useState(show2);
@@ -14726,7 +14747,7 @@ const MenuItem = forwardRef((props, ref) => {
14726
14747
  ));
14727
14748
  });
14728
14749
  MenuItem.displayName = "NutMenuItem";
14729
- const defaultProps$R = {
14750
+ const defaultProps$S = {
14730
14751
  ...ComponentDefaults,
14731
14752
  activeColor: "",
14732
14753
  closeOnOverlayClick: true,
@@ -14753,7 +14774,7 @@ const Menu = (props) => {
14753
14774
  onOpen,
14754
14775
  ...rest
14755
14776
  } = {
14756
- ...defaultProps$R,
14777
+ ...defaultProps$S,
14757
14778
  ...props
14758
14779
  };
14759
14780
  const menuRef = useRef(null);
@@ -14818,7 +14839,15 @@ const Menu = (props) => {
14818
14839
  const menuTitle = () => {
14819
14840
  return React__default.Children.map(children, (child, index) => {
14820
14841
  if (React__default.isValidElement(child)) {
14821
- const { title, options: options2, value, defaultValue, disabled, direction } = child.props;
14842
+ const {
14843
+ title,
14844
+ titleIcon,
14845
+ options: options2,
14846
+ value,
14847
+ defaultValue,
14848
+ disabled,
14849
+ direction
14850
+ } = child.props;
14822
14851
  const selected = options2 == null ? void 0 : options2.filter(
14823
14852
  (option) => option.value === (value !== void 0 ? value : defaultValue)
14824
14853
  );
@@ -14829,6 +14858,25 @@ const Menu = (props) => {
14829
14858
  return selected[0].text;
14830
14859
  return "";
14831
14860
  };
14861
+ const finallyIcon = () => {
14862
+ if (titleIcon) return titleIcon;
14863
+ if (icon) return icon;
14864
+ return direction === "up" ? /* @__PURE__ */ React__default.createElement(
14865
+ l$2,
14866
+ {
14867
+ className: "nut-menu-title-icon",
14868
+ width: "12px",
14869
+ height: "12px"
14870
+ }
14871
+ ) : /* @__PURE__ */ React__default.createElement(
14872
+ l$3,
14873
+ {
14874
+ className: "nut-menu-title-icon",
14875
+ width: "12px",
14876
+ height: "12px"
14877
+ }
14878
+ );
14879
+ };
14832
14880
  return /* @__PURE__ */ React__default.createElement(
14833
14881
  "div",
14834
14882
  {
@@ -14845,21 +14893,7 @@ const Menu = (props) => {
14845
14893
  }
14846
14894
  },
14847
14895
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
14848
- icon || (direction === "up" ? /* @__PURE__ */ React__default.createElement(
14849
- l$2,
14850
- {
14851
- className: "nut-menu-title-icon",
14852
- width: "12px",
14853
- height: "12px"
14854
- }
14855
- ) : /* @__PURE__ */ React__default.createElement(
14856
- l$3,
14857
- {
14858
- className: "nut-menu-title-icon",
14859
- width: "12px",
14860
- height: "12px"
14861
- }
14862
- ))
14896
+ finallyIcon()
14863
14897
  );
14864
14898
  }
14865
14899
  return null;
@@ -14888,6 +14922,16 @@ const Menu = (props) => {
14888
14922
  };
14889
14923
  Menu.displayName = "NutMenu";
14890
14924
  Menu.Item = MenuItem;
14925
+ const defaultProps$R = {
14926
+ ...ComponentDefaults,
14927
+ visible: false,
14928
+ rightActions: "",
14929
+ type: "default",
14930
+ custom: [],
14931
+ random: false,
14932
+ onClose: () => {
14933
+ }
14934
+ };
14891
14935
  const NumberKeyboard = (props) => {
14892
14936
  const { locale } = useConfig();
14893
14937
  const {
@@ -14905,7 +14949,7 @@ const NumberKeyboard = (props) => {
14905
14949
  onClose,
14906
14950
  onConfirm,
14907
14951
  ...rest
14908
- } = props;
14952
+ } = { ...defaultProps$R, ...props };
14909
14953
  const classPrefix2 = "nut-numberkeyboard";
14910
14954
  const getBasicKeys = () => {
14911
14955
  const keys = new Array(9).fill(0).map((_, index) => {
@@ -14957,17 +15001,35 @@ const NumberKeyboard = (props) => {
14957
15001
  };
14958
15002
  const onTouchEnd = (item2) => {
14959
15003
  setActive(false);
14960
- if (item2.type === "num" || item2.type === "custom") {
14961
- onChange && onChange(item2.id);
14962
- }
14963
- if (item2.type === "close") {
14964
- onClose && onClose();
14965
- }
14966
- if (item2.type === "delete") {
14967
- onDelete && onDelete();
15004
+ switch (item2.type) {
15005
+ case "num":
15006
+ case "custom":
15007
+ onChange == null ? void 0 : onChange(item2.id);
15008
+ break;
15009
+ case "close":
15010
+ onClose == null ? void 0 : onClose();
15011
+ break;
15012
+ case "delete":
15013
+ onDelete == null ? void 0 : onDelete();
15014
+ break;
15015
+ case "confirm":
15016
+ onConfirm == null ? void 0 : onConfirm();
15017
+ break;
14968
15018
  }
14969
- if (item2.type === "confirm") {
14970
- onConfirm && onConfirm();
15019
+ };
15020
+ const renderContent = (item2) => {
15021
+ switch (item2.type) {
15022
+ case "num":
15023
+ case "custom":
15024
+ return /* @__PURE__ */ React__default.createElement("div", null, item2.id);
15025
+ case "delete":
15026
+ return /* @__PURE__ */ React__default.createElement(DeleteIcon, null);
15027
+ case "close":
15028
+ return /* @__PURE__ */ React__default.createElement(l$3, { width: 18, height: 18 });
15029
+ case "confirm":
15030
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done);
15031
+ default:
15032
+ return null;
14971
15033
  }
14972
15034
  };
14973
15035
  return /* @__PURE__ */ React__default.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React__default.createElement(
@@ -14984,22 +15046,19 @@ const NumberKeyboard = (props) => {
14984
15046
  onTouchEnd: () => onTouchEnd(item),
14985
15047
  onTouchCancel: () => onTouchEnd(item)
14986
15048
  },
14987
- (item.type === "num" || item.type === "custom") && /* @__PURE__ */ React__default.createElement("div", null, item.id),
14988
- item.type === "delete" && /* @__PURE__ */ React__default.createElement(DeleteIcon, null),
14989
- item.type === "close" && /* @__PURE__ */ React__default.createElement(l$3, { width: 18, height: 18 }),
14990
- item.type === "confirm" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done)
15049
+ renderContent(item)
14991
15050
  ));
14992
15051
  };
14993
15052
  return /* @__PURE__ */ React__default.createElement(
14994
15053
  Popup,
14995
15054
  {
15055
+ ...rest,
14996
15056
  visible,
14997
15057
  position: "bottom",
14998
15058
  onOverlayClick: onClose,
14999
15059
  onCloseIconClick: onClose,
15000
15060
  zIndex: 9999,
15001
- overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" },
15002
- ...rest
15061
+ overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
15003
15062
  },
15004
15063
  /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header-title` }, title), type4 === "default" && /* @__PURE__ */ React__default.createElement(
15005
15064
  "span",
@@ -16528,7 +16587,7 @@ const Preview = ({
16528
16587
  }
16529
16588
  ),
16530
16589
  previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement(
16531
- "img",
16590
+ Image$1,
16532
16591
  {
16533
16592
  className: "nut-uploader-preview-img-c",
16534
16593
  style: { objectFit: "fill" },
@@ -16537,7 +16596,7 @@ const Preview = ({
16537
16596
  onClick: () => handleItemClick(item, index)
16538
16597
  }
16539
16598
  )) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, previewUrl ? /* @__PURE__ */ React__default.createElement(
16540
- "img",
16599
+ Image$1,
16541
16600
  {
16542
16601
  className: "nut-uploader-preview-img-c",
16543
16602
  src: previewUrl,
@@ -16843,15 +16902,14 @@ const InternalUploader = (props, ref) => {
16843
16902
  });
16844
16903
  };
16845
16904
  const fileChange = (event) => {
16846
- if (disabled) {
16847
- return;
16848
- }
16905
+ if (disabled) return;
16849
16906
  const $el = event.target;
16850
16907
  const { files } = $el;
16851
16908
  if (beforeUpload) {
16852
16909
  beforeUpload(new Array().slice.call(files)).then(
16853
16910
  (f) => {
16854
16911
  const _files = filterFiles(new Array().slice.call(f));
16912
+ if (!_files.length) $el.value = "";
16855
16913
  readFile(_files);
16856
16914
  }
16857
16915
  );
@@ -21144,27 +21202,31 @@ const ImagePreview = (props) => {
21144
21202
  defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
21145
21203
  indicator
21146
21204
  },
21147
- (videos && videos.length > 0 ? videos.map((item, index) => {
21148
- return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(
21149
- Video,
21150
- {
21151
- source: item.source,
21152
- options: item.options,
21153
- onClick: closeOnImg
21154
- }
21155
- ));
21156
- }) : []).concat(
21157
- images && images.length > 0 ? images.map((item, index) => {
21205
+ (videos ?? []).map(
21206
+ (item) => ({ type: "video", data: item })
21207
+ ).concat(
21208
+ (images ?? []).map((item) => ({ type: "image", data: item }))
21209
+ ).sort((a2, b) => {
21210
+ var _a, _b;
21211
+ return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
21212
+ }).map((item, index) => {
21213
+ if (item.type === "video") {
21214
+ const { source, options: options2 } = item.data;
21158
21215
  return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(
21159
- Image$1,
21216
+ Video,
21160
21217
  {
21161
- src: item.src,
21162
- draggable: false,
21218
+ source,
21219
+ options: options2,
21163
21220
  onClick: closeOnImg
21164
21221
  }
21165
21222
  ));
21166
- }) : []
21167
- )
21223
+ }
21224
+ if (item.type === "image") {
21225
+ const { src } = item.data;
21226
+ return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(Image$1, { src, draggable: false, onClick: closeOnImg }));
21227
+ }
21228
+ return null;
21229
+ })
21168
21230
  ) : null
21169
21231
  ),
21170
21232
  pagination ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,