@nutui/nutui-react-taro 1.3.6 → 1.3.8

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 (107) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/esm/Audio.js +3 -3
  3. package/dist/esm/Avatar.js +2 -2
  4. package/dist/esm/Cascader.js +4 -4
  5. package/dist/esm/Cell.js +2 -2
  6. package/dist/esm/Collapse.js +2 -2
  7. package/dist/esm/Input.js +2 -2
  8. package/dist/esm/InputNumber.js +2 -2
  9. package/dist/esm/Menu.js +2 -2
  10. package/dist/esm/MenuItem.js +2 -2
  11. package/dist/esm/NoticeBar.js +2 -2
  12. package/dist/esm/Range.js +2 -2
  13. package/dist/esm/SideNavBar.js +2 -2
  14. package/dist/esm/SideNavBarItem.js +2 -2
  15. package/dist/esm/Signature.js +2 -2
  16. package/dist/esm/Skeleton.js +3 -3
  17. package/dist/esm/Step.js +2 -2
  18. package/dist/esm/Steps.js +2 -2
  19. package/dist/esm/SubSideNavBar.js +2 -2
  20. package/dist/esm/Switch.js +2 -2
  21. package/dist/esm/TabPane.js +2 -2
  22. package/dist/esm/Tabbar.js +2 -2
  23. package/dist/esm/Tabs.js +2 -2
  24. package/dist/esm/TimeSelect.js +2 -2
  25. package/dist/esm/Uploader.js +2 -2
  26. package/dist/esm/Video.js +2 -2
  27. package/dist/esm/VirtualList.js +2 -2
  28. package/dist/esm/{audio.taro-57d4f0da.js → audio.taro-c2f9948a.js} +1 -1
  29. package/dist/esm/{avatar.taro-ec620cdd.js → avatar.taro-deabe88a.js} +4 -4
  30. package/dist/esm/{cascader.taro-77100fb4.js → cascader.taro-8c9891b4.js} +2 -2
  31. package/dist/esm/{cell.taro-a4c3bb7b.js → cell.taro-6daf51a0.js} +5 -2
  32. package/dist/esm/{collapse.taro-72e58ba2.js → collapse.taro-13cde270.js} +6 -3
  33. package/dist/esm/{input.taro-2453d7c4.js → input.taro-40d7e7dd.js} +35 -19
  34. package/dist/esm/{inputnumber.taro-0cf7c1b7.js → inputnumber.taro-0a01f6e1.js} +15 -1
  35. package/dist/esm/{menu.taro-9345dcfd.js → menu.taro-f8ca86db.js} +3 -1
  36. package/dist/esm/{menuitem.taro-fc0961b7.js → menuitem.taro-7bf564c9.js} +3 -3
  37. package/dist/esm/{noticebar.taro-332691f9.js → noticebar.taro-77b5a2c9.js} +6 -0
  38. package/dist/esm/nutui-react.es.js +26 -26
  39. package/dist/esm/{range.taro-fc7c0b6a.js → range.taro-4232e6a7.js} +7 -1
  40. package/dist/esm/{sidenavbar.taro-87f056cd.js → sidenavbar.taro-4297f552.js} +3 -3
  41. package/dist/esm/{sidenavbaritem.taro-77e077f4.js → sidenavbaritem.taro-fee11d26.js} +3 -3
  42. package/dist/esm/{signature.taro-59b3b3ab.js → signature.taro-0b3abea5.js} +14 -8
  43. package/dist/esm/{skeleton.taro-b9ff84b9.js → skeleton.taro-acca102c.js} +1 -1
  44. package/dist/esm/{step.taro-f1057500.js → step.taro-1c94e067.js} +3 -5
  45. package/dist/esm/{steps.taro-943f4fbb.js → steps.taro-acf205a0.js} +2 -1
  46. package/dist/esm/{subsidenavbar.taro-2c1fcf16.js → subsidenavbar.taro-4c80ad38.js} +3 -3
  47. package/dist/esm/{switch.taro-be5eb823.js → switch.taro-bae2dca0.js} +2 -2
  48. package/dist/esm/{tabbar.taro-da72fa2c.js → tabbar.taro-86cece39.js} +5 -2
  49. package/dist/esm/{tabpane.taro-95aa185b.js → tabpane.taro-91cd6cf4.js} +3 -2
  50. package/dist/esm/{tabs.taro-86186dff.js → tabs.taro-e71875fa.js} +8 -4
  51. package/dist/esm/{timeselect.taro-73796bfc.js → timeselect.taro-8c4439a8.js} +20 -5
  52. package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -0
  53. package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +1 -0
  54. package/dist/esm/types/src/packages/cell/cell.d.ts +1 -0
  55. package/dist/esm/types/src/packages/cell/cell.taro.d.ts +1 -0
  56. package/dist/esm/types/src/packages/collapse/collapse.d.ts +3 -1
  57. package/dist/esm/types/src/packages/collapse/collapse.taro.d.ts +3 -1
  58. package/dist/esm/types/src/packages/input/input.d.ts +10 -2
  59. package/dist/esm/types/src/packages/input/input.taro.d.ts +10 -2
  60. package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +6 -0
  61. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +6 -0
  62. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +3 -1
  63. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +3 -1
  64. package/dist/esm/types/src/packages/range/range.d.ts +4 -1
  65. package/dist/esm/types/src/packages/range/range.taro.d.ts +4 -1
  66. package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +1 -1
  67. package/dist/esm/types/src/packages/sidenavbar/sidenavbar.taro.d.ts +1 -1
  68. package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
  69. package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +1 -1
  70. package/dist/esm/types/src/packages/signature/signature.d.ts +2 -0
  71. package/dist/esm/types/src/packages/signature/signature.taro.d.ts +2 -0
  72. package/dist/esm/types/src/packages/steps/steps.d.ts +1 -0
  73. package/dist/esm/types/src/packages/steps/steps.taro.d.ts +1 -0
  74. package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
  75. package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.taro.d.ts +1 -1
  76. package/dist/esm/types/src/packages/switch/switch.d.ts +1 -1
  77. package/dist/esm/types/src/packages/switch/switch.taro.d.ts +1 -1
  78. package/dist/esm/types/src/packages/tabbar/tabbar.d.ts +1 -0
  79. package/dist/esm/types/src/packages/tabbar/tabbar.taro.d.ts +1 -0
  80. package/dist/esm/types/src/packages/tabpane/tabpane.d.ts +6 -2
  81. package/dist/esm/types/src/packages/tabpane/tabpane.taro.d.ts +6 -1
  82. package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -0
  83. package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +1 -0
  84. package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +5 -1
  85. package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +5 -1
  86. package/dist/esm/types/src/packages/video/video.d.ts +3 -0
  87. package/dist/esm/types/src/packages/virtuallist/type.d.ts +3 -1
  88. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
  89. package/dist/esm/{uploader.taro-6184abe7.js → uploader.taro-63a36a30.js} +1 -1
  90. package/dist/esm/{video-c1090c92.js → video-8a3518c5.js} +7 -1
  91. package/dist/esm/{virtuallist.taro-6858f690.js → virtuallist.taro-e3035825.js} +11 -6
  92. package/dist/locales/base.js +1 -1
  93. package/dist/locales/en-US.js +1 -1
  94. package/dist/locales/id-ID.js +1 -1
  95. package/dist/locales/zh-CN.js +1 -1
  96. package/dist/locales/zh-TW.js +1 -1
  97. package/dist/nutui.react.es.js +156 -65
  98. package/dist/nutui.react.umd.js +156 -65
  99. package/dist/packages/divider/divider.scss +2 -1
  100. package/dist/packages/menu/menu.scss +4 -0
  101. package/dist/packages/menuitem/menuitem.scss +27 -2
  102. package/dist/packages/noticebar/noticebar.scss +4 -1
  103. package/dist/packages/tabs/tabs.scss +3 -1
  104. package/dist/style.css +1 -1
  105. package/dist/style.es.js +1 -1
  106. package/dist/types/index.d.ts +56 -12
  107. package/package.json +3 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.6 Wed Oct 12 2022 18:14:05 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.3.8 Wed Oct 26 2022 17:33:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1484,12 +1484,15 @@ const defaultProps$1m = {
1484
1484
  iconSlot: null,
1485
1485
  linkSlot: null,
1486
1486
  click: (event) => {
1487
+ },
1488
+ onClick: (event) => {
1487
1489
  }
1488
1490
  };
1489
1491
  const Cell = (props) => {
1490
1492
  const {
1491
1493
  children,
1492
1494
  click,
1495
+ onClick,
1493
1496
  title,
1494
1497
  subTitle,
1495
1498
  desc,
@@ -1516,6 +1519,7 @@ const Cell = (props) => {
1516
1519
  const history = useHistory();
1517
1520
  const handleClick2 = (event) => {
1518
1521
  click(event);
1522
+ onClick(event);
1519
1523
  if (to2 && history) {
1520
1524
  history[replace ? "replace" : "push"](to2);
1521
1525
  } else if (url) {
@@ -2993,6 +2997,8 @@ const defaultProps$19 = {
2993
2997
  className: "",
2994
2998
  style: {},
2995
2999
  tabSwitch: () => {
3000
+ },
3001
+ onSwitch: () => {
2996
3002
  }
2997
3003
  };
2998
3004
  const Tabbar = (props) => {
@@ -3006,7 +3012,8 @@ const Tabbar = (props) => {
3006
3012
  safeAreaInsetBottom,
3007
3013
  className,
3008
3014
  style,
3009
- tabSwitch
3015
+ tabSwitch,
3016
+ onSwitch
3010
3017
  } = {
3011
3018
  ...defaultProps$19,
3012
3019
  ...props
@@ -3038,6 +3045,7 @@ const Tabbar = (props) => {
3038
3045
  handleClick: () => {
3039
3046
  handleClick2(idx);
3040
3047
  tabSwitch(child, idx);
3048
+ onSwitch(child, idx);
3041
3049
  }
3042
3050
  };
3043
3051
  return React__default.cloneElement(child, childProps);
@@ -3492,6 +3500,7 @@ class Title {
3492
3500
  }
3493
3501
  const defaultProps$15 = {
3494
3502
  ...ComponentDefaults,
3503
+ tabStyle: {},
3495
3504
  value: 0,
3496
3505
  color: "",
3497
3506
  background: "",
@@ -3511,6 +3520,7 @@ const Tabs = (props) => {
3511
3520
  const {
3512
3521
  value,
3513
3522
  color,
3523
+ tabStyle,
3514
3524
  background,
3515
3525
  direction,
3516
3526
  type,
@@ -3592,7 +3602,7 @@ const Tabs = (props) => {
3592
3602
  ...rest
3593
3603
  }, /* @__PURE__ */ React__default.createElement("div", {
3594
3604
  className: classesTitle,
3595
- style: { background }
3605
+ style: { ...tabStyle, background }
3596
3606
  }, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item, index2) => {
3597
3607
  return /* @__PURE__ */ React__default.createElement("div", {
3598
3608
  style: titleStyle,
@@ -3625,6 +3635,8 @@ const Tabs = (props) => {
3625
3635
  )
3626
3636
  }, item.title));
3627
3637
  })), /* @__PURE__ */ React__default.createElement("div", {
3638
+ className: `${b2("")}__content__wrap`
3639
+ }, /* @__PURE__ */ React__default.createElement("div", {
3628
3640
  className: `${b2("")}__content`,
3629
3641
  style: contentStyle
3630
3642
  }, React__default.Children.map(children, (child, idx) => {
@@ -3643,7 +3655,7 @@ const Tabs = (props) => {
3643
3655
  };
3644
3656
  }
3645
3657
  return React__default.cloneElement(child, childProps);
3646
- })));
3658
+ }))));
3647
3659
  };
3648
3660
  Tabs.defaultProps = defaultProps$15;
3649
3661
  Tabs.displayName = "NutTabs";
@@ -3654,7 +3666,7 @@ const defaultProps$14 = {
3654
3666
  disabled: false
3655
3667
  };
3656
3668
  const TabPane = (props) => {
3657
- const { children, paneKey, activeKey, autoHeightClassName } = {
3669
+ const { children, paneKey, activeKey, autoHeightClassName, className } = {
3658
3670
  ...defaultProps$14,
3659
3671
  ...props
3660
3672
  };
@@ -3664,7 +3676,8 @@ const TabPane = (props) => {
3664
3676
  active: paneKey === activeKey
3665
3677
  },
3666
3678
  b2(""),
3667
- autoHeightClassName
3679
+ autoHeightClassName,
3680
+ className
3668
3681
  );
3669
3682
  return /* @__PURE__ */ React__default.createElement("div", {
3670
3683
  className: classes
@@ -3755,7 +3768,7 @@ const SideNavBar = (props) => {
3755
3768
  children,
3756
3769
  className,
3757
3770
  showhead,
3758
- handleClose,
3771
+ onClose,
3759
3772
  ...rest
3760
3773
  } = {
3761
3774
  ...defaultProps$12,
@@ -3766,7 +3779,7 @@ const SideNavBar = (props) => {
3766
3779
  visible,
3767
3780
  style: { width, height: "100%" },
3768
3781
  position,
3769
- onClose: handleClose
3782
+ onClose
3770
3783
  }, /* @__PURE__ */ React__default.createElement("div", {
3771
3784
  className: className ? `${className} nut-sidenavbar` : "nut-sidenavbar",
3772
3785
  ...rest
@@ -3792,7 +3805,7 @@ const defaultProps$11 = {
3792
3805
  open: true
3793
3806
  };
3794
3807
  const SubSideNavBar = (props) => {
3795
- const { title, ikey, children, titleClick, open, ...rest } = {
3808
+ const { title, ikey, children, onClick, open, ...rest } = {
3796
3809
  ...defaultProps$11,
3797
3810
  ...props
3798
3811
  };
@@ -3829,7 +3842,7 @@ const SubSideNavBar = (props) => {
3829
3842
  handleClick(e2);
3830
3843
  const currentClass = e2.currentTarget.className;
3831
3844
  const isShow = currentClass.includes("nutShow");
3832
- titleClick && titleClick({ title, ikey, isShow });
3845
+ onClick && onClick({ title, ikey, isShow });
3833
3846
  };
3834
3847
  useEffect(() => {
3835
3848
  var _a, _b;
@@ -3853,10 +3866,10 @@ const SubSideNavBar = (props) => {
3853
3866
  }, children));
3854
3867
  };
3855
3868
  const SideNavBarItem = (props) => {
3856
- const { title, ikey, children, click, ...rest } = props;
3869
+ const { title, ikey, children, onClick, ...rest } = props;
3857
3870
  const clickFn = (e2) => {
3858
3871
  e2.stopPropagation();
3859
- click && click({ title, ikey });
3872
+ onClick && onClick({ title, ikey });
3860
3873
  };
3861
3874
  return /* @__PURE__ */ React__default.createElement("div", {
3862
3875
  className: "nut-subsidenavbar__item border-bt",
@@ -3938,6 +3951,8 @@ const Menu = (props) => {
3938
3951
  className: `nut-menu ${className}`,
3939
3952
  ...rest,
3940
3953
  ref: parentRef
3954
+ }, /* @__PURE__ */ React__default.createElement("div", {
3955
+ className: "nut-menu-relative"
3941
3956
  }, /* @__PURE__ */ React__default.createElement("div", {
3942
3957
  className: `nut-menu__bar ${itemShow.includes(true) ? "opened" : ""} ${className}`
3943
3958
  }, React__default.Children.toArray(children).map((child, index) => {
@@ -3980,7 +3995,7 @@ const Menu = (props) => {
3980
3995
  size: "10",
3981
3996
  name: titleIcon || (direction === "up" ? "arrow-up" : "down-arrow")
3982
3997
  })));
3983
- })), cloneChildren());
3998
+ })), cloneChildren()));
3984
3999
  };
3985
4000
  Menu.defaultProps = defaultProps$10;
3986
4001
  Menu.displayName = "NutMenu";
@@ -4098,15 +4113,14 @@ const MenuItem = (props) => {
4098
4113
  parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
4099
4114
  }
4100
4115
  }), /* @__PURE__ */ React__default.createElement("div", {
4101
- className: "nut-menu-item__wrap",
4116
+ className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
4102
4117
  style: {
4103
- ...getPosition(),
4104
4118
  ...isShow()
4105
4119
  }
4106
4120
  }, /* @__PURE__ */ React__default.createElement(CSSTransition$1, {
4107
4121
  in: _showPopup,
4108
4122
  timeout: 100,
4109
- classNames: "menu-item"
4123
+ classNames: direction === "down" ? "menu-item" : "menu-item-up"
4110
4124
  }, /* @__PURE__ */ React__default.createElement("div", {
4111
4125
  className: "nut-menu-item__content"
4112
4126
  }, options == null ? void 0 : options.map((item, index) => {
@@ -4436,7 +4450,10 @@ const Range = (props) => {
4436
4450
  marks,
4437
4451
  change,
4438
4452
  dragStart,
4439
- dragEnd
4453
+ dragEnd,
4454
+ onChange,
4455
+ onDragStart,
4456
+ onDragEnd
4440
4457
  } = { ...defaultProps$Y, ...props };
4441
4458
  let { min, max, step } = { ...defaultProps$Y, ...props };
4442
4459
  min = Number(min);
@@ -4606,6 +4623,7 @@ const Range = (props) => {
4606
4623
  }
4607
4624
  if ((marks || end) && !isSameValue(value, startValue)) {
4608
4625
  change && change(value);
4626
+ onChange && onChange(value);
4609
4627
  }
4610
4628
  };
4611
4629
  const click = async (event) => {
@@ -4653,6 +4671,7 @@ const Range = (props) => {
4653
4671
  }
4654
4672
  if (dragStatus === "start") {
4655
4673
  dragStart && dragStart();
4674
+ onDragStart && onDragStart();
4656
4675
  }
4657
4676
  touch.move(event);
4658
4677
  SetDragStatus("draging");
@@ -4679,6 +4698,7 @@ const Range = (props) => {
4679
4698
  if (dragStatus === "draging") {
4680
4699
  updateValue(currentValue, true);
4681
4700
  dragEnd && dragEnd();
4701
+ onDragEnd && onDragEnd();
4682
4702
  }
4683
4703
  SetDragStatus("");
4684
4704
  };
@@ -6377,6 +6397,12 @@ const InputNumber = (props) => {
6377
6397
  overlimit,
6378
6398
  blur,
6379
6399
  focus,
6400
+ onAdd,
6401
+ onReduce,
6402
+ onOverlimit,
6403
+ onBlurFuc,
6404
+ onFocus,
6405
+ onChangeFuc,
6380
6406
  iconClassPrefix,
6381
6407
  iconFontClassName,
6382
6408
  ...restProps
@@ -6417,6 +6443,7 @@ const InputNumber = (props) => {
6417
6443
  };
6418
6444
  const emitChange = (value, e2) => {
6419
6445
  const outputValue = fixedDecimalPlaces(value);
6446
+ onChangeFuc && onChangeFuc(outputValue, e2);
6420
6447
  change && change(outputValue, e2);
6421
6448
  if (!isAsync) {
6422
6449
  if (Number(outputValue) < Number(min)) {
@@ -6429,26 +6456,31 @@ const InputNumber = (props) => {
6429
6456
  }
6430
6457
  };
6431
6458
  const reduceNumber = (e2) => {
6459
+ onReduce && onReduce(e2);
6432
6460
  reduce && reduce(e2);
6433
6461
  if (reduceAllow()) {
6434
6462
  const outputValue = Number(inputValue) - Number(step);
6435
6463
  emitChange(outputValue, e2);
6436
6464
  } else {
6465
+ onOverlimit && onOverlimit(e2);
6437
6466
  overlimit && overlimit(e2);
6438
6467
  }
6439
6468
  };
6440
6469
  const addNumber = (e2) => {
6470
+ onAdd && onAdd(e2);
6441
6471
  add && add(e2);
6442
6472
  if (addAllow()) {
6443
6473
  const outputValue = Number(inputValue) + Number(step);
6444
6474
  emitChange(outputValue, e2);
6445
6475
  } else {
6476
+ onOverlimit && onOverlimit(e2);
6446
6477
  overlimit && overlimit(e2);
6447
6478
  }
6448
6479
  };
6449
6480
  const changeValue = (e2) => {
6450
6481
  const value = Number(e2.detail.value);
6451
6482
  change && change(value, e2);
6483
+ onChangeFuc && onChangeFuc(value, e2);
6452
6484
  if (!isAsync) {
6453
6485
  if (Number.isNaN(value)) {
6454
6486
  setInputValue(inputValue);
@@ -6462,6 +6494,7 @@ const InputNumber = (props) => {
6462
6494
  return;
6463
6495
  if (readonly)
6464
6496
  return;
6497
+ onFocus && onFocus(e2);
6465
6498
  focus && focus(e2);
6466
6499
  };
6467
6500
  const burValue = (e2) => {
@@ -6476,6 +6509,7 @@ const InputNumber = (props) => {
6476
6509
  value = Number(max);
6477
6510
  }
6478
6511
  emitChange(value, e2);
6512
+ onBlurFuc && onBlurFuc(e2);
6479
6513
  blur && blur(e2);
6480
6514
  };
6481
6515
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -6608,12 +6642,20 @@ const Input = (props) => {
6608
6642
  rows,
6609
6643
  slotButton,
6610
6644
  slotInput,
6645
+ onChange,
6646
+ onBlur,
6647
+ onFocus,
6648
+ onClear,
6649
+ formatter,
6650
+ keypress,
6651
+ onClickInput,
6652
+ onClickLeftIcon,
6653
+ onClickRightIcon,
6654
+ onClick,
6611
6655
  change,
6612
6656
  blur,
6613
6657
  focus,
6614
6658
  clear,
6615
- formatter,
6616
- keypress,
6617
6659
  clickInput,
6618
6660
  clickLeftIcon,
6619
6661
  clickRightIcon,
@@ -6679,20 +6721,22 @@ const Input = (props) => {
6679
6721
  }
6680
6722
  SetInputValue(val);
6681
6723
  };
6682
- const onFocus = (event) => {
6724
+ const handleFocus = (event) => {
6683
6725
  const val = event.target.value;
6684
6726
  SetActive(true);
6727
+ onFocus && onFocus(val, event);
6685
6728
  focus && focus(val, event);
6686
6729
  };
6687
- const onInput = (event) => {
6730
+ const handleInput = (event) => {
6688
6731
  let val = event.target.value;
6689
6732
  if (maxlength && val.length > Number(maxlength)) {
6690
6733
  val = val.slice(0, Number(maxlength));
6691
6734
  }
6692
6735
  updateValue(val);
6736
+ onChange && onChange(val, event);
6693
6737
  change && change(val, event);
6694
6738
  };
6695
- const onBlur = (event) => {
6739
+ const handleBlur = (event) => {
6696
6740
  setTimeout(() => {
6697
6741
  SetActive(false);
6698
6742
  }, 200);
@@ -6701,15 +6745,19 @@ const Input = (props) => {
6701
6745
  val = val.slice(0, Number(maxlength));
6702
6746
  }
6703
6747
  updateValue(getModelValue(), "onBlur");
6748
+ onBlur && onBlur(val, event);
6704
6749
  blur && blur(val, event);
6705
6750
  };
6706
- const onClickInput = (event) => {
6751
+ const handleClickInput = (event) => {
6752
+ onClickInput && onClickInput(event);
6707
6753
  clickInput && clickInput(event);
6708
6754
  };
6709
- const onClickLeftIcon = (event) => {
6755
+ const handleClickLeftIcon = (event) => {
6756
+ onClickLeftIcon && onClickLeftIcon(event);
6710
6757
  clickLeftIcon && clickLeftIcon(event);
6711
6758
  };
6712
- const onClickRightIcon = (event) => {
6759
+ const handleClickRightIcon = (event) => {
6760
+ onClickRightIcon && onClickRightIcon(event);
6713
6761
  clickRightIcon && clickRightIcon(event);
6714
6762
  };
6715
6763
  const resetValidation = () => {
@@ -6725,6 +6773,7 @@ const Input = (props) => {
6725
6773
  };
6726
6774
  const handleClear = (event) => {
6727
6775
  updateValue("");
6776
+ onClear && onClear("", event);
6728
6777
  clear && clear("", event);
6729
6778
  };
6730
6779
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -6732,6 +6781,7 @@ const Input = (props) => {
6732
6781
  style,
6733
6782
  ...rest,
6734
6783
  onClick: (e2) => {
6784
+ onClick && onClick(e2);
6735
6785
  click && click(e2);
6736
6786
  }
6737
6787
  }, slotInput ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
@@ -6744,12 +6794,12 @@ const Input = (props) => {
6744
6794
  }, /* @__PURE__ */ React__default.createElement("div", {
6745
6795
  className: "nut-input-inner",
6746
6796
  onClick: (e2) => {
6747
- onClickInput(e2);
6797
+ handleClickInput(e2);
6748
6798
  }
6749
6799
  }, slotInput))) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, leftIcon && leftIcon.length > 0 ? /* @__PURE__ */ React__default.createElement("div", {
6750
6800
  className: "nut-input-left-icon",
6751
6801
  onClick: (e2) => {
6752
- onClickLeftIcon(e2);
6802
+ handleClickLeftIcon(e2);
6753
6803
  }
6754
6804
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
6755
6805
  classPrefix: iconClassPrefix,
@@ -6766,7 +6816,7 @@ const Input = (props) => {
6766
6816
  }, /* @__PURE__ */ React__default.createElement("div", {
6767
6817
  className: "nut-input-inner",
6768
6818
  onClick: (e2) => {
6769
- onClickInput(e2);
6819
+ handleClickInput(e2);
6770
6820
  }
6771
6821
  }, type === "textarea" ? /* @__PURE__ */ React__default.createElement("textarea", {
6772
6822
  className: "input-text",
@@ -6782,13 +6832,13 @@ const Input = (props) => {
6782
6832
  value: inputValue,
6783
6833
  autoFocus: autofocus,
6784
6834
  onBlur: (e2) => {
6785
- onBlur(e2);
6835
+ handleBlur(e2);
6786
6836
  },
6787
6837
  onFocus: (e2) => {
6788
- onFocus(e2);
6838
+ handleFocus(e2);
6789
6839
  },
6790
6840
  onInput: (e2) => {
6791
- onInput(e2);
6841
+ handleInput(e2);
6792
6842
  }
6793
6843
  }) : /* @__PURE__ */ React__default.createElement("input", {
6794
6844
  className: "input-text",
@@ -6802,13 +6852,13 @@ const Input = (props) => {
6802
6852
  value: inputValue,
6803
6853
  autoFocus: autofocus,
6804
6854
  onBlur: (e2) => {
6805
- onBlur(e2);
6855
+ handleBlur(e2);
6806
6856
  },
6807
6857
  onFocus: (e2) => {
6808
- onFocus(e2);
6858
+ handleFocus(e2);
6809
6859
  },
6810
6860
  onInput: (e2) => {
6811
- onInput(e2);
6861
+ handleInput(e2);
6812
6862
  }
6813
6863
  }), clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ React__default.createElement(Icon$1, {
6814
6864
  classPrefix: iconClassPrefix,
@@ -6822,7 +6872,7 @@ const Input = (props) => {
6822
6872
  }) : null, rightIcon && rightIcon.length > 0 ? /* @__PURE__ */ React__default.createElement("div", {
6823
6873
  className: "nut-input-right-icon",
6824
6874
  onClick: (e2) => {
6825
- onClickRightIcon(e2);
6875
+ handleClickRightIcon(e2);
6826
6876
  }
6827
6877
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
6828
6878
  classPrefix: iconClassPrefix,
@@ -7920,7 +7970,7 @@ const InternalUploader = (props, ref) => {
7920
7970
  classPrefix: props.iconClassPrefix,
7921
7971
  fontClassName: props.iconFontClassName,
7922
7972
  name: "link"
7923
- }), "\xA0", item.name), /* @__PURE__ */ React__default.createElement(Icon$1, {
7973
+ }), "\xA0", item.name), isDeletable && /* @__PURE__ */ React__default.createElement(Icon$1, {
7924
7974
  classPrefix: props.iconClassPrefix,
7925
7975
  fontClassName: props.iconFontClassName,
7926
7976
  color: "#808080",
@@ -9622,7 +9672,7 @@ const Switch = (props) => {
9622
9672
  inactiveColor,
9623
9673
  activeText,
9624
9674
  inactiveText,
9625
- change,
9675
+ onChange,
9626
9676
  className,
9627
9677
  style
9628
9678
  } = {
@@ -9650,7 +9700,7 @@ const Switch = (props) => {
9650
9700
  if (!isAsync) {
9651
9701
  setValue(!value);
9652
9702
  }
9653
- change && change(!value, event);
9703
+ onChange && onChange(!value, event);
9654
9704
  };
9655
9705
  return /* @__PURE__ */ React__default.createElement("div", {
9656
9706
  className: classes(),
@@ -14686,6 +14736,8 @@ const NoticeBar = (props) => {
14686
14736
  rightIcon,
14687
14737
  close,
14688
14738
  click,
14739
+ onClose,
14740
+ onClick,
14689
14741
  iconClassPrefix,
14690
14742
  iconFontClassName
14691
14743
  } = {
@@ -14773,11 +14825,13 @@ const NoticeBar = (props) => {
14773
14825
  };
14774
14826
  const handleClick2 = (event) => {
14775
14827
  click && click(event);
14828
+ onClick && onClick(event);
14776
14829
  };
14777
14830
  const onClickIcon = (event) => {
14778
14831
  event.stopPropagation();
14779
14832
  SetShowNoticeBar(!closeMode);
14780
14833
  close && close(event);
14834
+ onClose && onClose(event);
14781
14835
  };
14782
14836
  const onAnimationEnd = () => {
14783
14837
  SetFirstRound(false);
@@ -14827,9 +14881,11 @@ const NoticeBar = (props) => {
14827
14881
  };
14828
14882
  const go = (item) => {
14829
14883
  click && click(item);
14884
+ onClick && onClick(item);
14830
14885
  };
14831
14886
  const handleClickIcon = () => {
14832
14887
  close && close(scrollList[0]);
14888
+ onClose && onClose(scrollList[0]);
14833
14889
  };
14834
14890
  const iconShow = () => {
14835
14891
  if (leftIcon === "close") {
@@ -14955,6 +15011,7 @@ const Steps = (props) => {
14955
15011
  className,
14956
15012
  progressDot,
14957
15013
  clickStep,
15014
+ onClickStep,
14958
15015
  ...restProps
14959
15016
  } = propSteps;
14960
15017
  const parentSteps = {
@@ -15018,10 +15075,9 @@ const Step = (props) => {
15018
15075
  return index === +parent.propSteps.current ? "process" : "wait";
15019
15076
  };
15020
15077
  const handleClickStep = () => {
15021
- var _a, _b;
15022
- if ((_a = parent.propSteps) == null ? void 0 : _a.clickStep) {
15023
- (_b = parent.propSteps) == null ? void 0 : _b.clickStep(activeIndex);
15024
- }
15078
+ var _a, _b, _c, _d;
15079
+ ((_a = parent.propSteps) == null ? void 0 : _a.onClickStep) && ((_b = parent.propSteps) == null ? void 0 : _b.onClickStep(activeIndex));
15080
+ ((_c = parent.propSteps) == null ? void 0 : _c.clickStep) && ((_d = parent.propSteps) == null ? void 0 : _d.clickStep(activeIndex));
15025
15081
  };
15026
15082
  const b2 = cn("step");
15027
15083
  const classes = classNames(
@@ -15564,6 +15620,7 @@ const Avatar = (props) => {
15564
15620
  className,
15565
15621
  style,
15566
15622
  activeAvatar,
15623
+ onActiveAvatar,
15567
15624
  onError,
15568
15625
  iconClassPrefix,
15569
15626
  iconFontClassName,
@@ -15626,9 +15683,8 @@ const Avatar = (props) => {
15626
15683
  }
15627
15684
  };
15628
15685
  const clickAvatar = (e2) => {
15629
- if (props.activeAvatar) {
15630
- props.activeAvatar(e2);
15631
- }
15686
+ activeAvatar && activeAvatar(e2);
15687
+ onActiveAvatar && onActiveAvatar(e2);
15632
15688
  };
15633
15689
  console.log(
15634
15690
  "!parent?.propAvatarGroup?.maxCount",
@@ -16433,6 +16489,8 @@ function areEqual(prevProps, nextProps) {
16433
16489
  const Collapse = memo(
16434
16490
  (props) => {
16435
16491
  const {
16492
+ className,
16493
+ style,
16436
16494
  children,
16437
16495
  activeName,
16438
16496
  accordion,
@@ -16440,7 +16498,7 @@ const Collapse = memo(
16440
16498
  rotate,
16441
16499
  iconSize,
16442
16500
  iconColor,
16443
- change
16501
+ onChange
16444
16502
  } = {
16445
16503
  ...defaultProps$i,
16446
16504
  ...props
@@ -16482,10 +16540,11 @@ const Collapse = memo(
16482
16540
  }
16483
16541
  }
16484
16542
  setDefaultOpenIndex(newOpenIndex);
16485
- change && change(!isOpen, name);
16543
+ onChange && onChange(!isOpen, name);
16486
16544
  };
16487
16545
  return /* @__PURE__ */ React__default.createElement("div", {
16488
- className: colBem()
16546
+ className: `${colBem()} ${className}`,
16547
+ style
16489
16548
  }, childrenDom.map((item) => {
16490
16549
  return React__default.cloneElement(item, {
16491
16550
  isOpen: defaultOpenIndex.includes(item.props.name),
@@ -16915,6 +16974,7 @@ const VirtualList = (props) => {
16915
16974
  overscan = 2,
16916
16975
  key,
16917
16976
  handleScroll,
16977
+ onScroll,
16918
16978
  className,
16919
16979
  containerSize,
16920
16980
  ...rest
@@ -16981,7 +17041,7 @@ const VirtualList = (props) => {
16981
17041
  const totalSize = getListTotalSize(positions, horizontal);
16982
17042
  setListTotalSize(totalSize);
16983
17043
  }, [positions, sizeKey, horizontal]);
16984
- const onScroll = useCallback(() => {
17044
+ const scroll = useCallback(() => {
16985
17045
  requestAnimationFrame((e2) => {
16986
17046
  const scrollSize = getElement()[scrollKey];
16987
17047
  const startIndex = binarySearch(positions, scrollSize, horizontal);
@@ -17002,7 +17062,11 @@ const VirtualList = (props) => {
17002
17062
  const startOffset = positions[startIndex][offsetKey];
17003
17063
  setOptions({ startOffset, startIndex, overStart, endIndex });
17004
17064
  if (endIndex > sourceData.length - 1) {
17005
- handleScroll && handleScroll();
17065
+ if (onScroll) {
17066
+ onScroll();
17067
+ } else if (handleScroll) {
17068
+ handleScroll();
17069
+ }
17006
17070
  }
17007
17071
  });
17008
17072
  }, [
@@ -17022,11 +17086,11 @@ const VirtualList = (props) => {
17022
17086
  ]);
17023
17087
  useEffect(() => {
17024
17088
  const element = getElement();
17025
- element.addEventListener("scroll", onScroll, false);
17089
+ element.addEventListener("scroll", scroll, false);
17026
17090
  return () => {
17027
- element.removeEventListener("scroll", onScroll, false);
17091
+ element.removeEventListener("scroll", scroll, false);
17028
17092
  };
17029
- }, [getElement, onScroll]);
17093
+ }, [getElement, scroll]);
17030
17094
  return /* @__PURE__ */ React__default.createElement("div", {
17031
17095
  className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
17032
17096
  ...rest,
@@ -17216,6 +17280,9 @@ const Video = (props) => {
17216
17280
  play,
17217
17281
  pause,
17218
17282
  playend,
17283
+ onPlayFuc,
17284
+ onPauseFuc,
17285
+ onPlayend,
17219
17286
  ...restProps
17220
17287
  } = {
17221
17288
  ...defaultProps$b,
@@ -17242,13 +17309,16 @@ const Video = (props) => {
17242
17309
  videoRef.setAttribute("x5-video-player-fullscreen", "false");
17243
17310
  }
17244
17311
  videoRef.addEventListener("play", () => {
17312
+ onPlayFuc && onPlayFuc(videoRef);
17245
17313
  play && play(videoRef);
17246
17314
  });
17247
17315
  videoRef.addEventListener("pause", () => {
17316
+ onPauseFuc && onPauseFuc(videoRef);
17248
17317
  pause && pause(videoRef);
17249
17318
  });
17250
17319
  videoRef.addEventListener("ended", () => {
17251
17320
  videoRef.currentTime = 0;
17321
+ onPlayend && onPlayend(videoRef);
17252
17322
  playend && playend(videoRef);
17253
17323
  });
17254
17324
  }
@@ -18317,6 +18387,10 @@ const Signature = (props) => {
18317
18387
  strokeStyle,
18318
18388
  unSupportTpl,
18319
18389
  className,
18390
+ confirm,
18391
+ clear,
18392
+ onConfirm,
18393
+ onClear,
18320
18394
  ...rest
18321
18395
  } = {
18322
18396
  ...defaultProps$4,
@@ -18346,14 +18420,15 @@ const Signature = (props) => {
18346
18420
  const endEventHandler = (event) => {
18347
18421
  event.preventDefault();
18348
18422
  };
18349
- const clear = () => {
18423
+ const handleClearBtn = () => {
18350
18424
  if (ctx2.current) {
18351
18425
  ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
18352
18426
  ctx2.current.closePath();
18353
18427
  }
18354
- props.clear && props.clear();
18428
+ clear && clear();
18429
+ onClear && onClear();
18355
18430
  };
18356
- const confirm = () => {
18431
+ const handleConfirmBtn = () => {
18357
18432
  onSave();
18358
18433
  };
18359
18434
  const onSave = () => {
@@ -18365,8 +18440,9 @@ const Signature = (props) => {
18365
18440
  canvas: res[0].node,
18366
18441
  fileType: props.type,
18367
18442
  success: (res2) => {
18368
- clear();
18369
- props.confirm && props.confirm(res2.tempFilePath);
18443
+ handleClearBtn();
18444
+ confirm && confirm(res2.tempFilePath);
18445
+ onConfirm && onConfirm(res2.tempFilePath);
18370
18446
  },
18371
18447
  fail: (res2) => {
18372
18448
  console.log("\u4FDD\u5B58\u5931\u8D25");
@@ -18415,11 +18491,11 @@ const Signature = (props) => {
18415
18491
  })), /* @__PURE__ */ React__default.createElement(Button, {
18416
18492
  className: `${b2("btn")}`,
18417
18493
  type: "default",
18418
- onClick: () => clear()
18494
+ onClick: () => handleClearBtn()
18419
18495
  }, locale.signature.reSign), /* @__PURE__ */ React__default.createElement(Button, {
18420
18496
  className: `${b2("btn")}`,
18421
18497
  type: "primary",
18422
- onClick: () => confirm()
18498
+ onClick: () => handleConfirmBtn()
18423
18499
  }, locale.confirm));
18424
18500
  };
18425
18501
  Signature.defaultProps = defaultProps$4;
@@ -18546,6 +18622,7 @@ TimeDetail.defaultProps = defaultProps$1;
18546
18622
  TimeDetail.displayName = "NutTimeDetail";
18547
18623
  const defaultProps = {
18548
18624
  className: "",
18625
+ style: {},
18549
18626
  visible: false,
18550
18627
  height: "20%",
18551
18628
  multiple: false,
@@ -18558,7 +18635,6 @@ const defaultProps = {
18558
18635
  const TimeSelect = (props) => {
18559
18636
  useConfig$1();
18560
18637
  const {
18561
- children,
18562
18638
  visible,
18563
18639
  className,
18564
18640
  height,
@@ -18570,7 +18646,10 @@ const TimeSelect = (props) => {
18570
18646
  multiple,
18571
18647
  select,
18572
18648
  pannelChange,
18573
- timeChange
18649
+ timeChange,
18650
+ onSelect,
18651
+ onPannelChange,
18652
+ onTimeChange
18574
18653
  } = {
18575
18654
  ...defaultProps,
18576
18655
  ...props
@@ -18591,7 +18670,11 @@ const TimeSelect = (props) => {
18591
18670
  };
18592
18671
  const b2 = cn("timeselect");
18593
18672
  const closeFun = () => {
18594
- select && select(activeTime);
18673
+ if (onSelect) {
18674
+ onSelect(activeTime);
18675
+ } else if (select) {
18676
+ select(activeTime);
18677
+ }
18595
18678
  };
18596
18679
  const handleSelectTime = (time) => {
18597
18680
  let curTimeData = {};
@@ -18614,7 +18697,11 @@ const TimeSelect = (props) => {
18614
18697
  const resultTimeData = [...activeTime];
18615
18698
  resultTimeData.splice(curIndex, 1, curTimeData);
18616
18699
  setActiveTime(resultTimeData);
18617
- timeChange && timeChange(time, resultTimeData);
18700
+ if (onTimeChange) {
18701
+ onTimeChange(time, resultTimeData);
18702
+ } else if (timeChange) {
18703
+ timeChange(time, resultTimeData);
18704
+ }
18618
18705
  };
18619
18706
  const handleChange = (pannelKey) => {
18620
18707
  const resultTimeData = [...activeTime];
@@ -18640,7 +18727,11 @@ const TimeSelect = (props) => {
18640
18727
  ]);
18641
18728
  }
18642
18729
  }
18643
- pannelChange && pannelChange(pannelKey, resultTimeData);
18730
+ if (onPannelChange) {
18731
+ onPannelChange(pannelKey, resultTimeData);
18732
+ } else if (pannelChange) {
18733
+ pannelChange(pannelKey, resultTimeData);
18734
+ }
18644
18735
  };
18645
18736
  const getTimePannelClass = (dataItem) => {
18646
18737
  if (String(dataItem["pannel-key"]) === String(activeKey)) {