@nutui/nutui-react-taro 3.0.5 → 3.0.6

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 (108) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/dist/cjs/packages/badge/badge.js +4 -3
  3. package/dist/cjs/packages/badge/style/badge.scss +4 -0
  4. package/dist/cjs/packages/badge/style/style.css +9 -6
  5. package/dist/cjs/packages/badge/style/style.harmony.css +3 -0
  6. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  7. package/dist/cjs/packages/datepicker/style/style.css +3 -0
  8. package/dist/cjs/packages/datepickerview/style/style.css +3 -0
  9. package/dist/cjs/packages/fixednav/style/style.css +9 -6
  10. package/dist/cjs/packages/indicator/indicator.js +1 -1
  11. package/dist/cjs/packages/lottie/index.js +5 -5
  12. package/dist/cjs/packages/lottie/{mp.js → lottiemp.js} +1 -1
  13. package/dist/cjs/packages/notify/notify.js +44 -13
  14. package/dist/cjs/packages/notify/style/notify.scss +39 -36
  15. package/dist/cjs/packages/notify/style/style.css +36 -31
  16. package/dist/cjs/packages/notify/style/style.harmony.css +36 -31
  17. package/dist/cjs/packages/picker/style/style.css +3 -0
  18. package/dist/cjs/packages/pickerview/pickerroller.js +7 -2
  19. package/dist/cjs/packages/pickerview/style/pickerview.scss +3 -0
  20. package/dist/cjs/packages/pickerview/style/style.css +3 -0
  21. package/dist/cjs/packages/pickerview/style/style.harmony.css +3 -0
  22. package/dist/cjs/packages/searchbar/searchbar.js +8 -2
  23. package/dist/cjs/packages/skeleton/skeleton.js +63 -52
  24. package/dist/cjs/packages/skeleton/style/index.js +0 -1
  25. package/dist/cjs/packages/skeleton/style/skeleton.scss +40 -46
  26. package/dist/cjs/packages/skeleton/style/style.css +32 -175
  27. package/dist/cjs/packages/skeleton/style/style.harmony.css +32 -42
  28. package/dist/cjs/packages/switch/style/style.css +5 -0
  29. package/dist/cjs/packages/switch/style/style.harmony.css +5 -0
  30. package/dist/cjs/packages/switch/style/switch.scss +5 -0
  31. package/dist/cjs/packages/switch/switch.js +22 -11
  32. package/dist/cjs/packages/tabbar/style/style.css +54 -45
  33. package/dist/cjs/packages/tabbar/style/style.harmony.css +24 -18
  34. package/dist/cjs/packages/tabbar/style/tabbar.scss +28 -19
  35. package/dist/cjs/packages/tabbar/tabbar.js +28 -10
  36. package/dist/cjs/packages/tabbaritem/style/style.css +30 -27
  37. package/dist/cjs/packages/tabbaritem/style/style.harmony.css +21 -21
  38. package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +32 -29
  39. package/dist/cjs/packages/tabbaritem/tabbaritem.js +38 -14
  40. package/dist/cjs/types/spec/badge/base.d.ts +1 -0
  41. package/dist/cjs/types/spec/indicator/base.d.ts +1 -1
  42. package/dist/cjs/types/spec/notify/base.d.ts +7 -2
  43. package/dist/cjs/types/spec/searchbar/taro.d.ts +10 -7
  44. package/dist/cjs/types/spec/skeleton/base.d.ts +7 -5
  45. package/dist/cjs/types/spec/switch/base.d.ts +3 -2
  46. package/dist/cjs/types/spec/switch/h5.d.ts +1 -1
  47. package/dist/cjs/types/spec/switch/taro.d.ts +1 -4
  48. package/dist/cjs/types/spec/tabbar/base.d.ts +7 -4
  49. package/dist/es/packages/badge/badge.js +4 -3
  50. package/dist/es/packages/badge/style/badge.scss +4 -0
  51. package/dist/es/packages/badge/style/style.css +9 -6
  52. package/dist/es/packages/badge/style/style.harmony.css +3 -0
  53. package/dist/es/packages/configprovider/types.d.ts +1 -1
  54. package/dist/es/packages/datepicker/style/style.css +3 -0
  55. package/dist/es/packages/datepickerview/style/style.css +3 -0
  56. package/dist/es/packages/fixednav/style/style.css +9 -6
  57. package/dist/es/packages/indicator/indicator.js +1 -1
  58. package/dist/es/packages/lottie/index.js +3 -3
  59. package/dist/es/packages/lottie/{mp.js → lottiemp.js} +1 -1
  60. package/dist/es/packages/notify/notify.js +45 -14
  61. package/dist/es/packages/notify/style/notify.scss +39 -36
  62. package/dist/es/packages/notify/style/style.css +36 -31
  63. package/dist/es/packages/notify/style/style.harmony.css +36 -31
  64. package/dist/es/packages/picker/style/style.css +3 -0
  65. package/dist/es/packages/pickerview/pickerroller.js +7 -2
  66. package/dist/es/packages/pickerview/style/pickerview.scss +3 -0
  67. package/dist/es/packages/pickerview/style/style.css +3 -0
  68. package/dist/es/packages/pickerview/style/style.harmony.css +3 -0
  69. package/dist/es/packages/searchbar/searchbar.js +7 -2
  70. package/dist/es/packages/skeleton/skeleton.js +62 -52
  71. package/dist/es/packages/skeleton/style/index.js +0 -1
  72. package/dist/es/packages/skeleton/style/skeleton.scss +40 -46
  73. package/dist/es/packages/skeleton/style/style.css +32 -175
  74. package/dist/es/packages/skeleton/style/style.harmony.css +32 -42
  75. package/dist/es/packages/switch/style/style.css +5 -0
  76. package/dist/es/packages/switch/style/style.harmony.css +5 -0
  77. package/dist/es/packages/switch/style/switch.scss +5 -0
  78. package/dist/es/packages/switch/switch.js +21 -11
  79. package/dist/es/packages/tabbar/style/style.css +54 -45
  80. package/dist/es/packages/tabbar/style/style.harmony.css +24 -18
  81. package/dist/es/packages/tabbar/style/tabbar.scss +28 -19
  82. package/dist/es/packages/tabbar/tabbar.js +27 -10
  83. package/dist/es/packages/tabbaritem/style/style.css +30 -27
  84. package/dist/es/packages/tabbaritem/style/style.harmony.css +21 -21
  85. package/dist/es/packages/tabbaritem/style/tabbaritem.scss +32 -29
  86. package/dist/es/packages/tabbaritem/tabbaritem.js +38 -14
  87. package/dist/es/types/spec/badge/base.d.ts +4 -0
  88. package/dist/es/types/spec/indicator/base.d.ts +1 -1
  89. package/dist/es/types/spec/notify/base.d.ts +22 -5
  90. package/dist/es/types/spec/searchbar/taro.d.ts +10 -7
  91. package/dist/es/types/spec/skeleton/base.d.ts +19 -14
  92. package/dist/es/types/spec/switch/base.d.ts +6 -2
  93. package/dist/es/types/spec/switch/h5.d.ts +1 -1
  94. package/dist/es/types/spec/switch/taro.d.ts +1 -4
  95. package/dist/es/types/spec/tabbar/base.d.ts +7 -4
  96. package/dist/nutui.react.umd.js +422 -297
  97. package/dist/style.css +1 -1
  98. package/dist/style.scss +47 -47
  99. package/dist/styles/variables-jmapp.scss +23 -1
  100. package/dist/styles/variables-jrkf.scss +23 -1
  101. package/dist/styles/variables.scss +35 -37
  102. package/package.json +1 -1
  103. /package/dist/cjs/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
  104. /package/dist/cjs/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
  105. /package/dist/cjs/packages/lottie/{web.js → lottieweb.js} +0 -0
  106. /package/dist/es/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
  107. /package/dist/es/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
  108. /package/dist/es/packages/lottie/{web.js → lottieweb.js} +0 -0
@@ -4454,7 +4454,8 @@
4454
4454
  top: 0,
4455
4455
  right: 0,
4456
4456
  fill: "solid",
4457
- size: "large"
4457
+ size: "large",
4458
+ disabled: false
4458
4459
  });
4459
4460
  var Badge = function(props) {
4460
4461
  var getContent = function getContent2() {
@@ -4475,14 +4476,14 @@
4475
4476
  };
4476
4477
  var _this;
4477
4478
  var rtl = useRtl();
4478
- var _$_object_spread = _object_spread({}, defaultProps$1l, props), className = _$_object_spread.className, style = _$_object_spread.style, value2 = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right2 = _$_object_spread.right, fill = _$_object_spread.fill, size = _$_object_spread.size;
4479
+ var _$_object_spread = _object_spread({}, defaultProps$1l, props), className = _$_object_spread.className, style = _$_object_spread.style, value2 = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right2 = _$_object_spread.right, fill = _$_object_spread.fill, size = _$_object_spread.size, disabled = _$_object_spread.disabled;
4479
4480
  var classPrefix2 = "nut-badge";
4480
4481
  var isHarmony2 = harmony();
4481
4482
  var classes = classNames(classPrefix2, className);
4482
4483
  var badgeRef = React.useRef(null);
4483
4484
  var _useState = _sliced_to_array(React.useState({}), 2), contentStyle = _useState[0], setContentStyle = _useState[1];
4484
4485
  var _obj;
4485
- var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix2, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix2, "-one"), typeof getContent() === "string" && ((_this = "".concat(getContent())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix2, "-dot"), dot), _define_property(_obj, "".concat(classPrefix2, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix2, "-").concat(fill), fill === "outline"), _define_property(_obj, "".concat(classPrefix2, "-content"), children), _obj));
4486
+ var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix2, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix2, "-one"), typeof getContent() === "string" && ((_this = "".concat(getContent())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix2, "-dot"), dot), _define_property(_obj, "".concat(classPrefix2, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix2, "-").concat(fill), fill === "outline"), _define_property(_obj, "".concat(classPrefix2, "-content"), children), _define_property(_obj, "".concat(classPrefix2, "-disabled"), disabled), _obj));
4486
4487
  React.useEffect(function() {
4487
4488
  if (badgeRef.current) {
4488
4489
  getPositionStyle();
@@ -4898,14 +4899,6 @@
4898
4899
  SideBar.displayName = "NutSideBar";
4899
4900
  SideBar.Item = SideBarItem;
4900
4901
  const TabbarContext = React.createContext(null);
4901
- function addColorForHarmony(maybeElement, color) {
4902
- if (React.isValidElement(maybeElement) && harmony()) {
4903
- return React.cloneElement(maybeElement, {
4904
- color
4905
- });
4906
- }
4907
- return maybeElement;
4908
- }
4909
4902
  var defaultProps$1g = _object_spread_props(_object_spread({}, ComponentDefaults), {
4910
4903
  title: "",
4911
4904
  icon: null,
@@ -4913,11 +4906,12 @@
4913
4906
  dot: false,
4914
4907
  max: 99,
4915
4908
  top: "0",
4916
- right: "0"
4909
+ right: "0",
4910
+ direction: "vertical"
4917
4911
  });
4918
4912
  var TabbarItem = function(props) {
4919
4913
  var ctx = React.useContext(TabbarContext);
4920
- var _ref = _object_spread({}, defaultProps$1g, props), className = _ref.className, style = _ref.style, title = _ref.title, icon = _ref.icon, value2 = _ref.value, dot = _ref.dot, max = _ref.max, top = _ref.top, right2 = _ref.right, index2 = _ref.index, rest = _object_without_properties(_ref, [
4914
+ var _ref = _object_spread({}, defaultProps$1g, props), className = _ref.className, style = _ref.style, title = _ref.title, icon = _ref.icon, value2 = _ref.value, dot = _ref.dot, max = _ref.max, top = _ref.top, right2 = _ref.right, index2 = _ref.index, direction = _ref.direction, onActiveClick = _ref.onActiveClick, rest = _object_without_properties(_ref, [
4921
4915
  "className",
4922
4916
  "style",
4923
4917
  "title",
@@ -4927,15 +4921,19 @@
4927
4921
  "max",
4928
4922
  "top",
4929
4923
  "right",
4930
- "index"
4924
+ "index",
4925
+ "direction",
4926
+ "onActiveClick"
4931
4927
  ]);
4932
4928
  var active2 = index2 === (ctx === null || ctx === void 0 ? void 0 : ctx.selectIndex);
4933
4929
  var classPrefix2 = "nut-tabbar-item";
4934
- var tabbarItemClass = classNames(classPrefix2, _define_property({}, "".concat(classPrefix2, "-active"), active2), className);
4935
- var boxPrefix = "".concat(classPrefix2, "-icon-box");
4936
- var titleClass = classNames(boxPrefix, "".concat(boxPrefix, "-nav"), _define_property({}, "".concat(boxPrefix, "-large"), !icon));
4930
+ var _obj;
4931
+ var tabbarItemClass = classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-active"), active2), _define_property(_obj, "".concat(classPrefix2, "-large"), !icon || !title), _obj), className);
4932
+ var renderNodeWithActive = function(node) {
4933
+ return node && typeof node === "function" ? node(active2) : node;
4934
+ };
4937
4935
  var badgeProps = {
4938
- value: value2,
4936
+ value: renderNodeWithActive(value2),
4939
4937
  dot,
4940
4938
  max,
4941
4939
  top,
@@ -4944,11 +4942,32 @@
4944
4942
  };
4945
4943
  var renderTitleText = function() {
4946
4944
  return title && /* @__PURE__ */ React.createElement(components.View, {
4947
- className: titleClass,
4945
+ className: "".concat(classPrefix2, "-text"),
4948
4946
  style: {
4949
4947
  color: active2 ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
4950
4948
  }
4951
- }, title);
4949
+ }, renderNodeWithActive(title));
4950
+ };
4951
+ var renderTitle = function() {
4952
+ return /* @__PURE__ */ React.createElement(Badge, _object_spread({
4953
+ size: "normal"
4954
+ }, badgeProps), renderTitleText());
4955
+ };
4956
+ var renderIcon = function() {
4957
+ var distIcon = renderNodeWithActive(icon);
4958
+ return /* @__PURE__ */ React.isValidElement(distIcon) ? /* @__PURE__ */ React.cloneElement(distIcon, _object_spread_props(_object_spread({}, distIcon.props), {
4959
+ color: active2 ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
4960
+ })) : null;
4961
+ };
4962
+ var renderIconAndTitle = function() {
4963
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, _object_spread_props(_object_spread({
4964
+ size: "normal"
4965
+ }, badgeProps), {
4966
+ top: 3
4967
+ }), renderIcon()), renderTitleText());
4968
+ };
4969
+ var renderDualItem = function() {
4970
+ return dot ? null : /* @__PURE__ */ React.createElement(React.Fragment, null, renderIcon(), renderTitleText(), /* @__PURE__ */ React.createElement(Badge, badgeProps));
4952
4971
  };
4953
4972
  return /* @__PURE__ */ React.createElement(components.View, _object_spread({
4954
4973
  className: tabbarItemClass,
@@ -4956,23 +4975,22 @@
4956
4975
  color: active2 ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
4957
4976
  }, style),
4958
4977
  onClick: function() {
4959
- return ctx === null || ctx === void 0 ? void 0 : ctx.handleClick(index2);
4978
+ return active2 ? onActiveClick === null || onActiveClick === void 0 ? void 0 : onActiveClick() : ctx === null || ctx === void 0 ? void 0 : ctx.handleClick(index2);
4960
4979
  }
4961
- }, rest), icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, badgeProps, /* @__PURE__ */ React.createElement(components.View, {
4962
- className: boxPrefix
4963
- }, addColorForHarmony(icon, active2 ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor))), renderTitleText()) : /* @__PURE__ */ React.createElement(Badge, badgeProps, renderTitleText()));
4980
+ }, rest), direction === "horizontal" && !dot ? renderDualItem() : /* @__PURE__ */ React.createElement(React.Fragment, null, icon && renderIconAndTitle(), !icon && renderTitle()));
4964
4981
  };
4965
4982
  var defaultProps$1f = _object_spread_props(_object_spread({}, ComponentDefaults), {
4966
4983
  defaultValue: 0,
4967
4984
  fixed: false,
4968
4985
  inactiveColor: "",
4969
4986
  activeColor: "",
4987
+ direction: "vertical",
4970
4988
  safeArea: false,
4971
- onSwitch: function(value2) {
4989
+ onSwitch: function() {
4972
4990
  }
4973
4991
  });
4974
4992
  var Tabbar = function(props) {
4975
- var _$_object_spread = _object_spread({}, defaultProps$1f, props), children = _$_object_spread.children, defaultValue = _$_object_spread.defaultValue, value2 = _$_object_spread.value, fixed = _$_object_spread.fixed, activeColor = _$_object_spread.activeColor, inactiveColor = _$_object_spread.inactiveColor, safeArea = _$_object_spread.safeArea, className = _$_object_spread.className, style = _$_object_spread.style, onSwitch = _$_object_spread.onSwitch;
4993
+ var _$_object_spread = _object_spread({}, defaultProps$1f, props), children = _$_object_spread.children, defaultValue = _$_object_spread.defaultValue, value2 = _$_object_spread.value, fixed = _$_object_spread.fixed, activeColor = _$_object_spread.activeColor, inactiveColor = _$_object_spread.inactiveColor, direction = _$_object_spread.direction, safeArea = _$_object_spread.safeArea, className = _$_object_spread.className, style = _$_object_spread.style, onSwitch = _$_object_spread.onSwitch;
4976
4994
  var classPrefix2 = "nut-tabbar";
4977
4995
  var _usePropsValue = _sliced_to_array(usePropsValue({
4978
4996
  value: value2,
@@ -4980,11 +4998,26 @@
4980
4998
  finalValue: 0,
4981
4999
  onChange: onSwitch
4982
5000
  }), 2), selectIndex = _usePropsValue[0], setSelectIndex = _usePropsValue[1];
5001
+ var sizeCls = React.useMemo(function() {
5002
+ var size = React.Children.count(children);
5003
+ var _obj;
5004
+ return size > 3 ? "" : classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-wrap-3"), size === 3), _define_property(_obj, "".concat(classPrefix2, "-wrap-2"), size === 2), _define_property(_obj, "".concat(classPrefix2, "-wrap-").concat(direction), size === 2 && direction !== "vertical"), _obj));
5005
+ }, [
5006
+ children,
5007
+ direction
5008
+ ]);
5009
+ var itemDirection = React.useMemo(function() {
5010
+ var size = React.Children.count(children);
5011
+ return size === 2 && direction !== "vertical" && direction;
5012
+ }, [
5013
+ direction,
5014
+ children
5015
+ ]);
4983
5016
  return /* @__PURE__ */ React.createElement(components.View, {
4984
5017
  className: classNames(classPrefix2, _define_property({}, "".concat(classPrefix2, "-fixed"), fixed), className),
4985
5018
  style
4986
5019
  }, /* @__PURE__ */ React.createElement(components.View, {
4987
- className: "".concat(classPrefix2, "-wrap")
5020
+ className: "".concat(classPrefix2, "-wrap ").concat(sizeCls)
4988
5021
  }, /* @__PURE__ */ React.createElement(TabbarContext.Provider, {
4989
5022
  value: {
4990
5023
  selectIndex,
@@ -4993,12 +5026,12 @@
4993
5026
  handleClick: setSelectIndex
4994
5027
  }
4995
5028
  }, React.Children.map(children, function(child, index2) {
4996
- if (!/* @__PURE__ */ React.isValidElement(child)) return null;
4997
- return /* @__PURE__ */ React.cloneElement(child, _object_spread_props(_object_spread({}, child.props), {
4998
- index: index2
4999
- }));
5000
- }))), (fixed || safeArea) && /* @__PURE__ */ React.createElement(components.View, {
5001
- className: "".concat(classPrefix2, "-safe-area")
5029
+ return /* @__PURE__ */ React.isValidElement(child) ? /* @__PURE__ */ React.cloneElement(child, _object_spread_props(_object_spread({}, child.props), {
5030
+ index: index2,
5031
+ direction: itemDirection
5032
+ })) : null;
5033
+ }))), (fixed || safeArea) && /* @__PURE__ */ React.createElement(SafeArea, {
5034
+ position: "bottom"
5002
5035
  }));
5003
5036
  };
5004
5037
  Tabbar.displayName = "NutTabbar";
@@ -7870,6 +7903,7 @@
7870
7903
  var isMoving = React.useRef(false);
7871
7904
  var rollerRef = React.useRef(null);
7872
7905
  var pickerRollerRef = React.useRef(null);
7906
+ var placeholderRef = React.useRef(null);
7873
7907
  var _useState3 = _sliced_to_array(React.useState(0), 2), startTime = _useState3[0], setStartTime = _useState3[1];
7874
7908
  var _useState4 = _sliced_to_array(React.useState(0), 2), startY = _useState4[0], setStartY = _useState4[1];
7875
7909
  var transformY = React.useRef(0);
@@ -7962,7 +7996,7 @@
7962
7996
  ]);
7963
7997
  return [
7964
7998
  4,
7965
- getRectByTaro(rollerRef.current)
7999
+ getRectByTaro(placeholderRef.current)
7966
8000
  ];
7967
8001
  case 1:
7968
8002
  placeholder = _state.sent();
@@ -8009,7 +8043,7 @@
8009
8043
  }
8010
8044
  }, [
8011
8045
  pickerRollerRef.current,
8012
- rollerRef.current
8046
+ placeholderRef.current
8013
8047
  ]);
8014
8048
  React.useEffect(function() {
8015
8049
  isMoving.current = false;
@@ -8051,6 +8085,10 @@
8051
8085
  className: "nut-pickerview-list",
8052
8086
  ref: pickerRollerRef
8053
8087
  }, /* @__PURE__ */ React.createElement(components.View, {
8088
+ className: "".concat(classPrefix2, "-placeholder"),
8089
+ ref: placeholderRef,
8090
+ id: "".concat(classPrefix2, "-placeholder-").concat(uuid)
8091
+ }), /* @__PURE__ */ React.createElement(components.View, {
8054
8092
  className: classPrefix2,
8055
8093
  id: "".concat(classPrefix2, "-").concat(uuid),
8056
8094
  ref: rollerRef,
@@ -12659,7 +12697,9 @@
12659
12697
  outerValue
12660
12698
  ]);
12661
12699
  React.useEffect(function() {
12662
- autoFocus && forceFocus();
12700
+ if (Taro.getEnv() === "WEB") {
12701
+ autoFocus && forceFocus();
12702
+ }
12663
12703
  }, [
12664
12704
  autoFocus
12665
12705
  ]);
@@ -12667,10 +12707,12 @@
12667
12707
  return /* @__PURE__ */ React.createElement(components.Input, {
12668
12708
  className: "".concat(classPrefix2, "-input ").concat(clearable ? "".concat(classPrefix2, "-input-clear") : ""),
12669
12709
  ref: searchRef,
12670
- value: value2 || "",
12710
+ style,
12711
+ value: (value2 || "").toString(),
12671
12712
  placeholder: placeholder || locale.placeholder,
12672
12713
  disabled: disabled || readOnly,
12673
12714
  maxlength: maxLength,
12715
+ autoFocus,
12674
12716
  onInput,
12675
12717
  onFocus: focus,
12676
12718
  onBlur: blur,
@@ -13041,15 +13083,19 @@
13041
13083
  var defaultProps$M = _object_spread_props(_object_spread({}, ComponentDefaults), {
13042
13084
  disabled: false,
13043
13085
  activeText: "",
13044
- inactiveText: ""
13086
+ inactiveText: "",
13087
+ loadingIcon: /* @__PURE__ */ React.createElement(IconSVG$h, null)
13045
13088
  });
13046
13089
  var Switch = function(props) {
13047
- var _ref = _object_spread({}, defaultProps$M, props), checked = _ref.checked, defaultChecked = _ref.defaultChecked, disabled = _ref.disabled, activeText = _ref.activeText, inactiveText = _ref.inactiveText, className = _ref.className, style = _ref.style, onChange = _ref.onChange, rest = _object_without_properties(_ref, [
13090
+ var _ref = _object_spread({}, defaultProps$M, props), checked = _ref.checked, defaultChecked = _ref.defaultChecked, disabled = _ref.disabled, activeText = _ref.activeText, inactiveText = _ref.inactiveText, loadingIcon = _ref.loadingIcon, className = _ref.className, style = _ref.style;
13091
+ _ref.onChange;
13092
+ var rest = _object_without_properties(_ref, [
13048
13093
  "checked",
13049
13094
  "defaultChecked",
13050
13095
  "disabled",
13051
13096
  "activeText",
13052
13097
  "inactiveText",
13098
+ "loadingIcon",
13053
13099
  "className",
13054
13100
  "style",
13055
13101
  "onChange"
@@ -13060,6 +13106,12 @@
13060
13106
  value: checked,
13061
13107
  defaultValue: defaultChecked
13062
13108
  }), 2), value2 = _usePropsValue[0], setValue = _usePropsValue[1];
13109
+ React.useEffect(function() {
13110
+ changing && setChanging(false);
13111
+ }, [
13112
+ value2
13113
+ ]);
13114
+ var _useState = _sliced_to_array(React.useState(false), 2), changing = _useState[0], setChanging = _useState[1];
13063
13115
  var classes = function() {
13064
13116
  var _obj2;
13065
13117
  return classNames([
@@ -13068,17 +13120,18 @@
13068
13120
  (_obj2 = {}, _define_property(_obj2, "".concat(classPrefix2, "-close"), !value2), _define_property(_obj2, "".concat(classPrefix2, "-disabled"), disabled), _define_property(_obj2, "".concat(classPrefix2, "-disabled-close"), disabled && !value2), _obj2)
13069
13121
  ]);
13070
13122
  };
13071
- var onClick = function(event) {
13072
- if (disabled) return;
13073
- onChange && onChange(!value2, event);
13123
+ var onClick = function() {
13124
+ if (disabled || changing) return;
13125
+ if (props.onChange) {
13126
+ setChanging(true);
13127
+ props.onChange(!value2);
13128
+ }
13074
13129
  setValue(!value2);
13075
13130
  };
13076
13131
  var _obj, _obj1;
13077
13132
  return /* @__PURE__ */ React.createElement(components.View, _object_spread({
13078
13133
  className: classes(),
13079
- onClick: function(e) {
13080
- return onClick(e);
13081
- },
13134
+ onClick,
13082
13135
  style
13083
13136
  }, rest), /* @__PURE__ */ React.createElement(components.View, {
13084
13137
  className: classNames([
@@ -13090,9 +13143,9 @@
13090
13143
  ],
13091
13144
  (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-button-open-rtl"), rtl && value2), _define_property(_obj, "".concat(classPrefix2, "-button-close-rtl"), rtl && !value2), _obj)
13092
13145
  ])
13093
- }, !value2 && !activeText && /* @__PURE__ */ React.createElement(components.View, {
13146
+ }, changing && loadingIcon ? /* @__PURE__ */ React.createElement(React.Fragment, null, loadingIcon) : /* @__PURE__ */ React.createElement(React.Fragment, null, !value2 && !activeText && /* @__PURE__ */ React.createElement(components.View, {
13094
13147
  className: "".concat(classPrefix2, "-close-line")
13095
- })), activeText && /* @__PURE__ */ React.createElement(components.View, {
13148
+ }))), activeText && /* @__PURE__ */ React.createElement(components.View, {
13096
13149
  className: classNames("".concat(classPrefix2, "-label"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix2, "-label-open"), value2), _define_property(_obj1, "".concat(classPrefix2, "-label-close"), !value2), _define_property(_obj1, "".concat(classPrefix2, "-label-open-rtl"), rtl && value2), _define_property(_obj1, "".concat(classPrefix2, "-label-close-rtl"), rtl && !value2), _define_property(_obj1, "".concat(classPrefix2, "-label-close-disabled"), disabled && !value2), _obj1))
13097
13150
  }, value2 ? activeText : inactiveText));
13098
13151
  };
@@ -31578,83 +31631,110 @@
31578
31631
  return Object.prototype.hasOwnProperty.call(t2, e2);
31579
31632
  }, r.p = "", r(r.s = 1);
31580
31633
  }([function(t, e, r) {
31581
- function i2(t2, e2) {
31634
+ function i2() {
31635
+ var t2 = { request: function() {
31636
+ }, getSystemInfoSync: function() {
31637
+ return {};
31638
+ } };
31639
+ return "undefined" != typeof wx && (t2 = wx), "undefined" != typeof jd && (t2 = jd), t2;
31640
+ }
31641
+ function s(t2) {
31642
+ return (s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) {
31643
+ return typeof t3;
31644
+ } : function(t3) {
31645
+ return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
31646
+ })(t2);
31647
+ }
31648
+ function a(t2, e2) {
31582
31649
  for (var r2 = 0; r2 < e2.length; r2++) {
31583
31650
  var i3 = e2[r2];
31584
- i3.enumerable = i3.enumerable || false, i3.configurable = true, "value" in i3 && (i3.writable = true), Object.defineProperty(t2, i3.key, i3);
31651
+ i3.enumerable = i3.enumerable || false, i3.configurable = true, "value" in i3 && (i3.writable = true), Object.defineProperty(t2, o(i3.key), i3);
31585
31652
  }
31586
31653
  }
31587
- function s(t2, e2, r2) {
31588
- return e2 in t2 ? Object.defineProperty(t2, e2, { value: r2, enumerable: true, configurable: true, writable: true }) : t2[e2] = r2, t2;
31654
+ function n(t2, e2, r2) {
31655
+ return (e2 = o(e2)) in t2 ? Object.defineProperty(t2, e2, { value: r2, enumerable: true, configurable: true, writable: true }) : t2[e2] = r2, t2;
31656
+ }
31657
+ function o(t2) {
31658
+ var e2 = function(t3, e3) {
31659
+ if ("object" != s(t3) || !t3) return t3;
31660
+ var r2 = t3[Symbol.toPrimitive];
31661
+ if (void 0 !== r2) {
31662
+ var i3 = r2.call(t3, e3 || "default");
31663
+ if ("object" != s(i3)) return i3;
31664
+ throw new TypeError("@@toPrimitive must return a primitive value.");
31665
+ }
31666
+ return ("string" === e3 ? String : Number)(t3);
31667
+ }(t2, "string");
31668
+ return "symbol" == s(e2) ? e2 : e2 + "";
31589
31669
  }
31590
31670
  r.d(e, "c", function() {
31591
- return _;
31671
+ return E;
31592
31672
  }), r.d(e, "b", function() {
31593
- return x;
31673
+ return T;
31594
31674
  }), r.d(e, "a", function() {
31595
- return P;
31675
+ return S;
31596
31676
  });
31597
- var a = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap();
31598
- function p(t2) {
31677
+ var h = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
31678
+ function c(t2) {
31599
31679
  if ("function" == typeof this["on".concat(t2)]) {
31600
31680
  for (var e2 = arguments.length, r2 = new Array(e2 > 1 ? e2 - 1 : 0), i3 = 1; i3 < e2; i3++) r2[i3 - 1] = arguments[i3];
31601
31681
  this["on".concat(t2)].apply(this, r2);
31602
31682
  }
31603
31683
  }
31604
- function f(t2) {
31605
- this.readyState = t2, p.call(this, "readystatechange");
31684
+ function d(t2) {
31685
+ this.readyState = t2, c.call(this, "readystatechange");
31606
31686
  }
31607
- var m = function() {
31687
+ var u = function() {
31608
31688
  function t2() {
31609
31689
  !function(t3, e3) {
31610
31690
  if (!(t3 instanceof e3)) throw new TypeError("Cannot call a class as a function");
31611
- }(this, t2), s(this, "onabort", null), s(this, "onerror", null), s(this, "onload", null), s(this, "onloadstart", null), s(this, "onprogress", null), s(this, "ontimeout", null), s(this, "onloadend", null), s(this, "onreadystatechange", null), s(this, "readyState", 0), s(this, "response", null), s(this, "responseText", null), s(this, "responseType", ""), s(this, "responseXML", null), s(this, "status", 0), s(this, "statusText", ""), s(this, "upload", {}), s(this, "withCredentials", false), o.set(this, { "content-type": "application/x-www-form-urlencoded" }), h.set(this, {});
31691
+ }(this, t2), n(this, "onabort", null), n(this, "onerror", null), n(this, "onload", null), n(this, "onloadstart", null), n(this, "onprogress", null), n(this, "ontimeout", null), n(this, "onloadend", null), n(this, "onreadystatechange", null), n(this, "readyState", 0), n(this, "response", null), n(this, "responseText", null), n(this, "responseType", ""), n(this, "responseXML", null), n(this, "status", 0), n(this, "statusText", ""), n(this, "upload", {}), n(this, "withCredentials", false), p.set(this, { "content-type": "application/x-www-form-urlencoded" }), f.set(this, {});
31612
31692
  }
31613
- var e2, r2;
31614
31693
  return e2 = t2, (r2 = [{ key: "abort", value: function() {
31615
- var t3 = l.get(this);
31694
+ var t3 = m.get(this);
31616
31695
  t3 && t3.abort();
31617
31696
  } }, { key: "getAllResponseHeaders", value: function() {
31618
- var t3 = h.get(this);
31697
+ var t3 = f.get(this);
31619
31698
  return Object.keys(t3).map(function(e3) {
31620
31699
  return "".concat(e3, ": ").concat(t3[e3]);
31621
31700
  }).join("\n");
31622
31701
  } }, { key: "getResponseHeader", value: function(t3) {
31623
- return h.get(this)[t3];
31702
+ return f.get(this)[t3];
31624
31703
  } }, { key: "open", value: function(e3, r3) {
31625
- n.set(this, e3), a.set(this, r3), f.call(this, t2.OPENED);
31704
+ l.set(this, e3), h.set(this, r3), d.call(this, t2.OPENED);
31626
31705
  } }, { key: "overrideMimeType", value: function() {
31627
31706
  } }, { key: "send", value: function() {
31628
31707
  var e3 = this, r3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
31629
31708
  if (this.readyState !== t2.OPENED) throw new Error("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.");
31630
- wx.request({ data: r3, url: a.get(this), method: n.get(this), header: o.get(this), success: function(r4) {
31631
- var i3 = r4.data, s2 = r4.statusCode, a2 = r4.header;
31709
+ i2().request({ data: r3, url: h.get(this), method: l.get(this), header: p.get(this), success: function(r4) {
31710
+ var i3 = r4.data, s3 = r4.statusCode, a2 = r4.header;
31632
31711
  if ("string" != typeof i3 && !(i3 instanceof ArrayBuffer)) try {
31633
31712
  i3 = JSON.stringify(i3);
31634
31713
  } catch (t3) {
31635
31714
  }
31636
- if (e3.status = s2, h.set(e3, a2), p.call(e3, "loadstart"), f.call(e3, t2.HEADERS_RECEIVED), f.call(e3, t2.LOADING), e3.response = i3, i3 instanceof ArrayBuffer) {
31715
+ if (e3.status = s3, f.set(e3, a2), c.call(e3, "loadstart"), d.call(e3, t2.HEADERS_RECEIVED), d.call(e3, t2.LOADING), e3.response = i3, i3 instanceof ArrayBuffer) {
31637
31716
  e3.responseText = "";
31638
- for (var n2 = new Uint8Array(i3), o2 = n2.byteLength, l2 = 0; l2 < o2; l2++) e3.responseText += String.fromCharCode(n2[l2]);
31717
+ for (var n2 = new Uint8Array(i3), o2 = n2.byteLength, h2 = 0; h2 < o2; h2++) e3.responseText += String.fromCharCode(n2[h2]);
31639
31718
  } else e3.responseText = i3;
31640
- f.call(e3, t2.DONE), p.call(e3, "load"), p.call(e3, "loadend");
31719
+ d.call(e3, t2.DONE), c.call(e3, "load"), c.call(e3, "loadend");
31641
31720
  }, fail: function(t3) {
31642
31721
  var r4 = t3.errMsg;
31643
- -1 !== r4.indexOf("abort") ? p.call(e3, "abort") : p.call(e3, "error", r4), p.call(e3, "loadend");
31722
+ -1 !== r4.indexOf("abort") ? c.call(e3, "abort") : c.call(e3, "error", r4), c.call(e3, "loadend");
31644
31723
  } });
31645
31724
  } }, { key: "setRequestHeader", value: function(t3, e3) {
31646
- var r3 = o.get(this);
31647
- r3[t3] = e3, o.set(this, r3);
31648
- } }]) && i2(e2.prototype, r2), t2;
31725
+ var r3 = p.get(this);
31726
+ r3[t3] = e3, p.set(this, r3);
31727
+ } }]) && a(e2.prototype, r2), s2 && a(e2, s2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
31728
+ var e2, r2, s2;
31649
31729
  }();
31650
- function c() {
31730
+ function y() {
31651
31731
  }
31652
- function d() {
31732
+ function g() {
31653
31733
  console.error("小程序由于不支持动态创建 canvas 的能力,故 lottie 中有关图片处理的操作无法支持,请保持图片的原始宽高与 JSON 描述的一致,避免需要对图片处理");
31654
31734
  }
31655
- function u(t2) {
31735
+ function v(t2) {
31656
31736
  return "canvas" === t2 ? (console.warn("发现 Lottie 动态创建 canvas 组件,但小程序不支持动态创建组件,接下来可能会出现异常"), { getContext: function() {
31657
- return { fillRect: c, createImage: d, drawImage: d };
31737
+ return { fillRect: y, createImage: g, drawImage: g };
31658
31738
  } }) : "img" === t2 ? function(t3) {
31659
31739
  if (void 0 === t3.createImage) return {};
31660
31740
  var e2 = t3.createImage();
@@ -31665,42 +31745,42 @@
31665
31745
  }, e2;
31666
31746
  }(this) : void 0;
31667
31747
  }
31668
- function y(t2, e2) {
31748
+ function b(t2, e2) {
31669
31749
  return function(r2) {
31670
31750
  return e2.call(t2, Array.from(r2));
31671
31751
  };
31672
31752
  }
31673
- function g(t2, e2) {
31753
+ function P(t2, e2) {
31674
31754
  return function() {
31675
31755
  return e2.call(t2);
31676
31756
  };
31677
31757
  }
31678
- function v(t2, e2, r2) {
31758
+ function _(t2, e2, r2) {
31679
31759
  var i3 = t2[e2];
31680
31760
  t2[e2] = r2(t2, i3);
31681
31761
  }
31682
- s(m, "UNSEND", 0), s(m, "OPENED", 1), s(m, "HEADERS_RECEIVED", 2), s(m, "LOADING", 3), s(m, "DONE", 4);
31683
- var b = wx.getSystemInfoSync(), P = { requestAnimationFrame: function(t2) {
31762
+ n(u, "UNSEND", 0), n(u, "OPENED", 1), n(u, "HEADERS_RECEIVED", 2), n(u, "LOADING", 3), n(u, "DONE", 4);
31763
+ var x = i2().getSystemInfoSync(), S = { requestAnimationFrame: function(t2) {
31684
31764
  setTimeout(function() {
31685
31765
  "function" == typeof t2 && t2(Date.now());
31686
31766
  }, 16);
31687
31767
  } };
31688
- P.window = { devicePixelRatio: b.pixelRatio }, P.document = P.window.document = { body: {}, createElement: u }, P.navigator = P.window.navigator = { userAgent: "" }, XMLHttpRequest = m;
31689
- var _ = function(t2) {
31690
- var e2 = P.window, r2 = P.document;
31691
- P._requestAnimationFrame = e2.requestAnimationFrame, P._cancelAnimationFrame = e2.cancelAnimationFrame, e2.requestAnimationFrame = function(e3) {
31768
+ S.window = { devicePixelRatio: x.pixelRatio }, S.document = S.window.document = { body: {}, createElement: v }, S.navigator = S.window.navigator = { userAgent: "" }, XMLHttpRequest = u;
31769
+ var E = function(t2) {
31770
+ var e2 = S.window, r2 = S.document;
31771
+ S._requestAnimationFrame = e2.requestAnimationFrame, S._cancelAnimationFrame = e2.cancelAnimationFrame, e2.requestAnimationFrame = function(e3) {
31692
31772
  var r3 = false;
31693
31773
  setTimeout(function() {
31694
31774
  r3 || (r3 = true, "function" == typeof e3 && e3(Date.now()));
31695
31775
  }, 100), t2.requestAnimationFrame(function(t3) {
31696
31776
  r3 || (r3 = true, "function" == typeof e3 && e3(t3));
31697
31777
  });
31698
- }, e2.cancelAnimationFrame = t2.cancelAnimationFrame.bind(t2), P._body = r2.body, P._createElement = r2.createElement, r2.body = {}, r2.createElement = u.bind(t2);
31778
+ }, e2.cancelAnimationFrame = t2.cancelAnimationFrame.bind(t2), S._body = r2.body, S._createElement = r2.createElement, r2.body = {}, r2.createElement = v.bind(t2);
31699
31779
  var i3 = t2.getContext("2d");
31700
- i3.canvas || (i3.canvas = t2), v(i3, "setLineDash", y), v(i3, "fill", g);
31701
- }, x = function() {
31702
- var t2 = P.window, e2 = P.document;
31703
- t2.requestAnimationFrame = P._requestAnimationFrame, t2.cancelAnimationFrame = P._cancelAnimationFrame, e2.body = P._body, e2.createElement = P._createElement;
31780
+ i3.canvas || (i3.canvas = t2), _(i3, "setLineDash", b), _(i3, "fill", P);
31781
+ }, T = function() {
31782
+ var t2 = S.window, e2 = S.document;
31783
+ t2.requestAnimationFrame = S._requestAnimationFrame, t2.cancelAnimationFrame = S._cancelAnimationFrame, e2.body = S._body, e2.createElement = S._createElement;
31704
31784
  };
31705
31785
  }, function(module, __webpack_exports__, __webpack_require__) {
31706
31786
  __webpack_require__.r(__webpack_exports__), (function(module) {
@@ -35259,7 +35339,7 @@
35259
35339
  var implementation;
35260
35340
  if (process.env.TARO_ENV === "h5") {
35261
35341
  implementation = Lottie$2;
35262
- } else if (process.env.TARO_ENV === "weapp") {
35342
+ } else if (process.env.TARO_ENV === "weapp" || process.env.TARO_ENV === "jd") {
35263
35343
  implementation = Lottie$1;
35264
35344
  } else {
35265
35345
  implementation = function(props) {
@@ -35759,10 +35839,14 @@
35759
35839
  NoticeBar.displayName = "NutNoticeBar";
35760
35840
  var defaultProps$B = _object_spread_props(_object_spread({}, ComponentDefaults), {
35761
35841
  id: "",
35762
- duration: 3e3,
35763
- type: "danger",
35842
+ distance: 8,
35843
+ navHeight: 57,
35764
35844
  position: "top",
35765
35845
  visible: false,
35846
+ closeable: false,
35847
+ leftIcon: null,
35848
+ rightIcon: null,
35849
+ duration: 3e3,
35766
35850
  onClose: function() {
35767
35851
  },
35768
35852
  onClick: function() {
@@ -35770,13 +35854,12 @@
35770
35854
  });
35771
35855
  var classPrefix$c = "nut-notify";
35772
35856
  var Notify = function(props) {
35773
- var _mergeProps = mergeProps(defaultProps$B, props), id = _mergeProps.id, children = _mergeProps.children, style = _mergeProps.style, type2 = _mergeProps.type, className = _mergeProps.className, position2 = _mergeProps.position, visible = _mergeProps.visible, duration = _mergeProps.duration, onClose = _mergeProps.onClose, onClick = _mergeProps.onClick;
35857
+ var _mergeProps = mergeProps(defaultProps$B, props), id = _mergeProps.id, style = _mergeProps.style, children = _mergeProps.children, distance = _mergeProps.distance, navHeight = _mergeProps.navHeight, closeable = _mergeProps.closeable, leftIcon = _mergeProps.leftIcon, rightIcon = _mergeProps.rightIcon, position2 = _mergeProps.position, visible = _mergeProps.visible, duration = _mergeProps.duration, className = _mergeProps.className, onClose = _mergeProps.onClose, onClick = _mergeProps.onClick;
35774
35858
  useCustomEvent(id, function(status) {
35775
35859
  status ? show2() : hide2();
35776
35860
  });
35777
35861
  var timer;
35778
35862
  var _useState = _sliced_to_array(React.useState(false), 2), showNotify = _useState[0], setShowNotify = _useState[1];
35779
- var cssRef = React.useRef(null);
35780
35863
  React.useEffect(function() {
35781
35864
  if (visible) {
35782
35865
  show2();
@@ -35786,9 +35869,6 @@
35786
35869
  }, [
35787
35870
  visible
35788
35871
  ]);
35789
- var clickHandle = function() {
35790
- onClick();
35791
- };
35792
35872
  var show2 = function() {
35793
35873
  setShowNotify(true);
35794
35874
  clearTimer();
@@ -35808,10 +35888,29 @@
35808
35888
  setShowNotify(false);
35809
35889
  onClose();
35810
35890
  };
35891
+ var getDistance = React.useMemo(function() {
35892
+ if (position2 === "top") {
35893
+ return {
35894
+ top: pxTransform(web() ? Number(distance) + navHeight : Number(distance))
35895
+ };
35896
+ }
35897
+ return {
35898
+ bottom: pxTransform(Number(distance))
35899
+ };
35900
+ }, [
35901
+ distance,
35902
+ position2
35903
+ ]);
35811
35904
  var _obj;
35812
- var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix$c, "-popup-top"), position2 === "top"), _define_property(_obj, "".concat(classPrefix$c, "-popup-bottom"), position2 === "bottom"), _define_property(_obj, "".concat(classPrefix$c), true), _define_property(_obj, "".concat(classPrefix$c, "-").concat(type2), true), _obj));
35905
+ var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix$c), true), _define_property(_obj, "".concat(className), true), _obj));
35906
+ var handleClick = function() {
35907
+ onClick === null || onClick === void 0 ? void 0 : onClick();
35908
+ };
35909
+ var handleClickIcon = function() {
35910
+ hide2();
35911
+ };
35912
+ var _obj1;
35813
35913
  return /* @__PURE__ */ React.createElement(CSSTransition, {
35814
- nodeRef: cssRef,
35815
35914
  in: showNotify,
35816
35915
  timeout: 300,
35817
35916
  classNames: "fade",
@@ -35820,10 +35919,19 @@
35820
35919
  position: position2,
35821
35920
  id
35822
35921
  }, /* @__PURE__ */ React.createElement(components.View, {
35823
- className: "".concat(classes, " ").concat(className),
35824
- style,
35825
- onClick: clickHandle
35826
- }, children));
35922
+ className: classes,
35923
+ style: _object_spread({}, style, getDistance),
35924
+ onClick: handleClick
35925
+ }, leftIcon ? /* @__PURE__ */ React.createElement(components.View, {
35926
+ className: "".concat(classPrefix$c, "-left-icon")
35927
+ }, leftIcon) : null, /* @__PURE__ */ React.createElement(components.View, {
35928
+ className: classNames((_obj1 = {}, _define_property(_obj1, "".concat(classPrefix$c, "-content"), true), _define_property(_obj1, "".concat(classPrefix$c, "-ellipsis"), closeable || rightIcon), _define_property(_obj1, "".concat(classPrefix$c, "-layout-left"), leftIcon || rightIcon), _obj1))
35929
+ }, children), rightIcon || closeable ? /* @__PURE__ */ React.createElement(components.View, {
35930
+ className: "".concat(classPrefix$c, "-right-icon"),
35931
+ onClick: handleClickIcon
35932
+ }, rightIcon || (closeable ? /* @__PURE__ */ React.createElement(IconSVG$p, {
35933
+ size: 12
35934
+ }) : null)) : null));
35827
35935
  };
35828
35936
  function open(selector) {
35829
35937
  var path = useCustomEventsPath(selector);
@@ -36423,203 +36531,83 @@
36423
36531
  })) : null, children);
36424
36532
  };
36425
36533
  ResultPage.displayName = "NutResultPage";
36426
- var AvatarContext = React.createContext({});
36427
36534
  var defaultProps$x = _object_spread_props(_object_spread({}, ComponentDefaults), {
36428
- maxContent: "",
36429
- max: "",
36430
- maxBackground: "#eee",
36431
- maxColor: "#666",
36432
- gap: "-8",
36433
- level: "left"
36434
- });
36435
- var classPrefix$a = "nut-avatar-group";
36436
- var AvatarGroup = function(props) {
36437
- var propAvatarGroup = _object_spread({}, defaultProps$x, props);
36438
- var className = propAvatarGroup.className, style = propAvatarGroup.style, children = propAvatarGroup.children;
36439
- var avatarGroupRef = React.useRef(null);
36440
- var cls = classNames(classPrefix$a, className);
36441
- var parentAvatar = {
36442
- propAvatarGroup: _object_spread({
36443
- avatarCount: React.Children.count(children) || 0
36444
- }, propAvatarGroup),
36445
- avatarGroupRef
36446
- };
36447
- return /* @__PURE__ */ React.createElement(AvatarContext.Provider, {
36448
- value: parentAvatar
36449
- }, /* @__PURE__ */ React.createElement(components.View, {
36450
- className: cls,
36451
- style,
36452
- ref: avatarGroupRef
36453
- }, React.Children.map(children, function(child, index2) {
36454
- var _child_type;
36455
- return (child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "NutAvatar" ? /* @__PURE__ */ React.cloneElement(child, {
36456
- avatarIndex: index2 + 1,
36457
- className: "nut-avatar-group-avatar"
36458
- }) : child;
36459
- })));
36460
- };
36461
- AvatarGroup.displayName = "NutAvatarGroup";
36462
- var defaultProps$w = _object_spread_props(_object_spread({}, ComponentDefaults), {
36463
- size: harmony() ? "40" : "",
36464
- shape: "round",
36465
- icon: "",
36466
- background: "#eee",
36467
- color: "#666",
36468
- fit: "cover",
36469
- src: "",
36470
- alt: "",
36471
- avatarIndex: 0
36472
- });
36473
- var classPrefix$9 = "nut-avatar";
36474
- var Avatar = function(props) {
36475
- var _$_object_spread = _object_spread({}, defaultProps$w, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, icon = _$_object_spread.icon, fit = _$_object_spread.fit, avatarIndex = _$_object_spread.avatarIndex, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError;
36476
- var _useState = _sliced_to_array(React.useState(false), 2), showMax = _useState[0], setShowMax = _useState[1];
36477
- var avatarRef = React.useRef(null);
36478
- var parent2 = React.useContext(AvatarContext);
36479
- var sizeValue = [
36480
- "large",
36481
- "normal",
36482
- "small"
36483
- ];
36484
- var propAvatarGroup = parent2.propAvatarGroup;
36485
- var groupSize = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.size;
36486
- var groupShape = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.shape;
36487
- var groupCount = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.avatarCount;
36488
- var groupMax = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.max;
36489
- var _obj;
36490
- var classes = classNames((_obj = {}, _define_property(_obj, "nut-avatar-".concat(groupSize || size || "normal"), true), _define_property(_obj, "nut-avatar-".concat(groupShape || shape), true), _define_property(_obj, "nut-avatar-".concat(groupSize || size || "normal", "-round"), shape === "round" && true), _obj));
36491
- var nativeClasses = classNames(_define_property({}, "nut-avatar-first-child", avatarIndex === 1));
36492
- var cls = classNames(classPrefix$9, classes, className, nativeClasses);
36493
- var _obj1;
36494
- var styles = _object_spread((_obj1 = {
36495
- width: sizeValue.indexOf(size) > -1 ? "" : pxTransform(parseInt(size)),
36496
- height: sizeValue.indexOf(size) > -1 ? "" : pxTransform(parseInt(size)),
36497
- backgroundColor: "".concat(background),
36498
- color
36499
- }, _define_property(_obj1, harmony() ? "marginRight" : "marginLeft", avatarIndex !== 1 && (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.gap) ? "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.gap, "px") : ""), _define_property(_obj1, "zIndex", (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.level) === "right" ? Math.abs(groupCount - avatarIndex) : ""), _obj1), style);
36500
- var maxStyles = {
36501
- backgroundColor: "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxBackground),
36502
- color: "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxColor)
36503
- };
36504
- React.useEffect(function() {
36505
- var maxCount = groupMax || groupCount;
36506
- if (avatarIndex === groupCount && avatarIndex !== maxCount && groupCount > maxCount) {
36507
- setShowMax(true);
36508
- }
36509
- }, [
36510
- avatarIndex,
36511
- groupCount
36512
- ]);
36513
- var errorEvent = function() {
36514
- onError && onError();
36515
- };
36516
- var clickAvatar = function(e) {
36517
- onClick && onClick(e);
36518
- };
36519
- return /* @__PURE__ */ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /* @__PURE__ */ React.createElement(components.View, {
36520
- className: cls,
36521
- style: !showMax ? styles : maxStyles,
36522
- onClick: clickAvatar,
36523
- ref: avatarRef
36524
- }, (!groupMax || avatarIndex <= groupMax) && /* @__PURE__ */ React.createElement(React.Fragment, null, src && /* @__PURE__ */ React.createElement(components.Image, {
36525
- className: "nut-avatar-img nut-avatar-".concat(groupSize || size || "normal", "-img"),
36526
- src,
36527
- style: {
36528
- objectFit: fit
36529
- },
36530
- onError: errorEvent
36531
- }), /* @__PURE__ */ React.isValidElement(icon) ? /* @__PURE__ */ React.createElement(components.View, {
36532
- className: "nut-avatar-text"
36533
- }, /* @__PURE__ */ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
36534
- color,
36535
- className: "".concat(icon.props.className || "", " nut-avatar-icon nut-avatar-").concat(groupSize || size || "normal", "-icon")
36536
- }))) : null, children && /* @__PURE__ */ React.createElement(components.View, {
36537
- style: {
36538
- color
36539
- },
36540
- className: "nut-avatar-text nut-avatar-".concat(groupSize || size || "normal", "-text")
36541
- }, children), !src && !icon && !children && /* @__PURE__ */ React.createElement(components.View, {
36542
- className: "nut-avatar-text"
36543
- }, /* @__PURE__ */ React.createElement(IconSVG$1, {
36544
- style: {
36545
- color
36546
- },
36547
- className: "nut-avatar-icon nut-avatar-".concat(groupSize || size || "normal", "-icon")
36548
- }))), showMax && /* @__PURE__ */ React.createElement(components.View, {
36549
- className: "nut-avatar-text nut-avatar-".concat(groupSize || "normal", "-text"),
36550
- style: _object_spread({}, maxStyles)
36551
- }, (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxContent) ? propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxContent : "+ ".concat(avatarIndex - Number(groupMax || 0)))));
36552
- };
36553
- Avatar.displayName = "NutAvatar";
36554
- Avatar.Group = AvatarGroup;
36555
- var defaultProps$v = _object_spread_props(_object_spread({}, ComponentDefaults), {
36556
36535
  rows: 1,
36557
- animated: false,
36558
- title: false,
36559
- avatar: false,
36560
- avatarSize: "50px",
36536
+ animated: true,
36561
36537
  visible: false,
36562
- avatarShape: "round"
36538
+ size: "normal",
36539
+ shape: "round",
36540
+ duration: 0.6,
36541
+ inline: false
36563
36542
  });
36564
36543
  var Skeleton = function(props) {
36565
- var _ref = _object_spread({}, defaultProps$v, props), className = _ref.className, animated = _ref.animated, rows = _ref.rows, title = _ref.title, avatar = _ref.avatar, avatarSize = _ref.avatarSize, visible = _ref.visible, children = _ref.children, avatarShape = _ref.avatarShape, rest = _object_without_properties(_ref, [
36544
+ var shapeStyle = function shapeStyle2() {
36545
+ if (shape === "circle") return {
36546
+ borderRadius: "50%"
36547
+ };
36548
+ if (shape === "square") return {
36549
+ borderRadius: "0"
36550
+ };
36551
+ return {};
36552
+ };
36553
+ var durationStyle = function durationStyle2() {
36554
+ if (typeof duration !== "undefined") return {
36555
+ animationDuration: "".concat(duration, "s")
36556
+ };
36557
+ return {};
36558
+ };
36559
+ var _ref = _object_spread({}, defaultProps$x, props), className = _ref.className, width2 = _ref.width, height2 = _ref.height, shape = _ref.shape, animated = _ref.animated, rows = _ref.rows, visible = _ref.visible, size = _ref.size, duration = _ref.duration, children = _ref.children, rest = _object_without_properties(_ref, [
36566
36560
  "className",
36561
+ "width",
36562
+ "height",
36563
+ "shape",
36567
36564
  "animated",
36568
36565
  "rows",
36569
- "title",
36570
- "avatar",
36571
- "avatarSize",
36572
36566
  "visible",
36573
- "children",
36574
- "avatarShape"
36567
+ "size",
36568
+ "duration",
36569
+ "children"
36575
36570
  ]);
36576
36571
  var classPrefix2 = "nut-skeleton";
36577
36572
  var classes = classNames(classPrefix2, className);
36578
- var _obj;
36579
- var avatarClass = classNames((_obj = {}, _define_property(_obj, "nut-avatar", true), _define_property(_obj, "nut-skeleton-content-avatar", true), _define_property(_obj, "avatar-".concat(avatarShape), avatarShape), _obj));
36580
- var repeatLines = function(num) {
36573
+ var repeatCount = function(num) {
36581
36574
  return Array.from({
36582
36575
  length: num
36583
36576
  }, function(v, i2) {
36584
36577
  return i2;
36585
36578
  });
36586
36579
  };
36587
- var getStyle = function() {
36588
- if (avatarSize) {
36589
- return {
36590
- width: pxTransform(parseInt(avatarSize)),
36591
- height: pxTransform(parseInt(avatarSize))
36592
- };
36593
- }
36594
- return {
36595
- width: pxTransform(50),
36596
- height: pxTransform(50)
36597
- };
36580
+ var _useState = _sliced_to_array(React.useState(false), 2), animate = _useState[0], setAnimate = _useState[1];
36581
+ var playAnimation = function() {
36582
+ setAnimate(false);
36583
+ setTimeout(function() {
36584
+ setAnimate(true);
36585
+ }, 10);
36598
36586
  };
36599
- return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement(components.View, _object_spread({
36587
+ React.useEffect(function() {
36588
+ if (!animated) return;
36589
+ playAnimation();
36590
+ var intervalId = setInterval(playAnimation, 1e3 + duration * 1e3);
36591
+ return function() {
36592
+ return clearInterval(intervalId);
36593
+ };
36594
+ }, []);
36595
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? children : /* @__PURE__ */ React.createElement(components.View, _object_spread({
36600
36596
  className: classes
36601
- }, rest), animated && /* @__PURE__ */ React.createElement(components.View, {
36602
- className: "".concat(classPrefix2, "-animation")
36603
- }), /* @__PURE__ */ React.createElement(components.View, {
36604
- className: "".concat(classPrefix2, "-content")
36605
- }, avatar && /* @__PURE__ */ React.createElement(Avatar, {
36606
- className: avatarClass,
36607
- background: "rgb(239, 239, 239)",
36608
- shape: avatarShape,
36609
- style: getStyle(),
36610
- icon: "null"
36611
- }), rows === 1 ? /* @__PURE__ */ React.createElement(components.View, {
36612
- className: "".concat(classPrefix2, "-content-block")
36613
- }) : /* @__PURE__ */ React.createElement(components.View, {
36614
- className: "".concat(classPrefix2, "-content-line")
36615
- }, title && /* @__PURE__ */ React.createElement(components.View, {
36616
- className: "".concat(classPrefix2, "-content-title")
36617
- }), repeatLines(rows).map(function(item, index2) {
36597
+ }, rest), repeatCount(rows).map(function(item, index2) {
36598
+ var contentClass = "".concat(classPrefix2, "-content ").concat(classPrefix2, "-content-").concat(size, " ").concat(classPrefix2, "-content-").concat(size, "-").concat(index2);
36618
36599
  return /* @__PURE__ */ React.createElement(components.View, {
36619
- className: "".concat(classPrefix2, "-content-block ").concat(index2 === repeatLines(rows).length - 1 ? "".concat(classPrefix2, "-content-block-last-child") : ""),
36620
- key: index2
36621
- });
36622
- })))));
36600
+ className: "".concat(contentClass),
36601
+ key: index2,
36602
+ style: _object_spread({
36603
+ width: width2,
36604
+ height: height2
36605
+ }, shapeStyle())
36606
+ }, animated && /* @__PURE__ */ React.createElement(components.View, {
36607
+ className: "".concat(classPrefix2, "-animated ").concat(animate ? "".concat(classPrefix2, "-animation") : ""),
36608
+ style: durationStyle()
36609
+ }));
36610
+ })));
36623
36611
  };
36624
36612
  Skeleton.displayName = "NutSkeleton";
36625
36613
  function preventDefault(event, isStopPropagation) {
@@ -36630,7 +36618,7 @@
36630
36618
  event.stopPropagation();
36631
36619
  }
36632
36620
  }
36633
- var defaultProps$u = _object_spread_props(_object_spread({}, ComponentDefaults), {
36621
+ var defaultProps$w = _object_spread_props(_object_spread({}, ComponentDefaults), {
36634
36622
  name: ""
36635
36623
  });
36636
36624
  var Swipe = /* @__PURE__ */ React.forwardRef(function(props, instanceRef) {
@@ -36694,7 +36682,7 @@
36694
36682
  return getWidth();
36695
36683
  });
36696
36684
  });
36697
- var _$_object_spread = _object_spread({}, defaultProps$u, props), children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style;
36685
+ var _$_object_spread = _object_spread({}, defaultProps$w, props), children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style;
36698
36686
  var root2 = React.useRef();
36699
36687
  var opened = React.useRef(false);
36700
36688
  var lockClick = React.useRef(false);
@@ -36928,7 +36916,7 @@
36928
36916
  }, renderActionContent("left"), children, renderActionContent("right")));
36929
36917
  });
36930
36918
  Swipe.displayName = "NutSwipe";
36931
- var defaultProps$t = _object_spread_props(_object_spread({}, defaultOverlayProps), {
36919
+ var defaultProps$v = _object_spread_props(_object_spread({}, defaultOverlayProps), {
36932
36920
  id: "",
36933
36921
  duration: 2,
36934
36922
  position: "middle",
@@ -36947,7 +36935,7 @@
36947
36935
  }
36948
36936
  });
36949
36937
  var Toast = function(props) {
36950
- var _useParams = useParams(mergeProps(defaultProps$t, props)), _useParams_params = _useParams.params, id = _useParams_params.id, position2 = _useParams_params.position, contentStyle = _useParams_params.contentStyle, icon = _useParams_params.icon, content2 = _useParams_params.content, duration = _useParams_params.duration, title = _useParams_params.title, closeOnOverlayClick = _useParams_params.closeOnOverlayClick, lockScroll = _useParams_params.lockScroll, contentClassName = _useParams_params.contentClassName, visible = _useParams_params.visible, size = _useParams_params.size, className = _useParams_params.className, style = _useParams_params.style, wordBreak = _useParams_params.wordBreak, zIndex = _useParams_params.zIndex, onClose = _useParams_params.onClose, setParams = _useParams.setParams;
36938
+ var _useParams = useParams(mergeProps(defaultProps$v, props)), _useParams_params = _useParams.params, id = _useParams_params.id, position2 = _useParams_params.position, contentStyle = _useParams_params.contentStyle, icon = _useParams_params.icon, content2 = _useParams_params.content, duration = _useParams_params.duration, title = _useParams_params.title, closeOnOverlayClick = _useParams_params.closeOnOverlayClick, lockScroll = _useParams_params.lockScroll, contentClassName = _useParams_params.contentClassName, visible = _useParams_params.visible, size = _useParams_params.size, className = _useParams_params.className, style = _useParams_params.style, wordBreak = _useParams_params.wordBreak, zIndex = _useParams_params.zIndex, onClose = _useParams_params.onClose, setParams = _useParams.setParams;
36951
36939
  var classPrefix2 = "nut-toast";
36952
36940
  var timer = React.useRef(-1);
36953
36941
  var rtl = useRtl();
@@ -37071,21 +37059,21 @@
37071
37059
  Toast.displayName = "NutToast";
37072
37060
  Toast.show = show;
37073
37061
  Toast.hide = hide;
37074
- var defaultProps$s = _object_spread_props(_object_spread({}, ComponentDefaults), {
37062
+ var defaultProps$u = _object_spread_props(_object_spread({}, ComponentDefaults), {
37075
37063
  type: "shake",
37076
37064
  action: "initial",
37077
37065
  loop: false,
37078
37066
  onClick: function(event) {
37079
37067
  }
37080
37068
  });
37081
- var classPrefix$8 = "nut-animate";
37069
+ var classPrefix$a = "nut-animate";
37082
37070
  var Animate = function(props) {
37083
- var _$_object_spread = _object_spread({}, defaultProps$s, props), className = _$_object_spread.className, type2 = _$_object_spread.type, action = _$_object_spread.action, loop = _$_object_spread.loop, onClick = _$_object_spread.onClick, children = _$_object_spread.children, style = _$_object_spread.style;
37071
+ var _$_object_spread = _object_spread({}, defaultProps$u, props), className = _$_object_spread.className, type2 = _$_object_spread.type, action = _$_object_spread.action, loop = _$_object_spread.loop, onClick = _$_object_spread.onClick, children = _$_object_spread.children, style = _$_object_spread.style;
37084
37072
  var _useState = _sliced_to_array(React.useState(false), 2), clicked = _useState[0], setClicked = _useState[1];
37085
37073
  var _obj;
37086
37074
  var classes = classNames((_obj = {
37087
37075
  "nut-ani-container": true
37088
- }, _define_property(_obj, "".concat(classPrefix$8, "-").concat(type2), action === "initial" || clicked), _define_property(_obj, "loop", loop), _obj), className);
37076
+ }, _define_property(_obj, "".concat(classPrefix$a, "-").concat(type2), action === "initial" || clicked), _define_property(_obj, "loop", loop), _obj), className);
37089
37077
  var handleClick = function(event) {
37090
37078
  setClicked(true);
37091
37079
  if (!loop) {
@@ -37104,7 +37092,7 @@
37104
37092
  }, children));
37105
37093
  };
37106
37094
  Animate.displayName = "NutAnimate";
37107
- var defaultProps$r = _object_spread_props(_object_spread({}, ComponentDefaults), {
37095
+ var defaultProps$t = _object_spread_props(_object_spread({}, ComponentDefaults), {
37108
37096
  length: 0,
37109
37097
  value: "",
37110
37098
  delay: 300,
@@ -37112,7 +37100,7 @@
37112
37100
  thousands: false
37113
37101
  });
37114
37102
  var CountUp = function(props) {
37115
- var _mergeProps = mergeProps(defaultProps$r, props), length2 = _mergeProps.length, value2 = _mergeProps.value, delay = _mergeProps.delay, duration = _mergeProps.duration, className = _mergeProps.className, thousands = _mergeProps.thousands;
37103
+ var _mergeProps = mergeProps(defaultProps$t, props), length2 = _mergeProps.length, value2 = _mergeProps.value, delay = _mergeProps.delay, duration = _mergeProps.duration, className = _mergeProps.className, thousands = _mergeProps.thousands;
37116
37104
  _mergeProps.style;
37117
37105
  var rest = _object_without_properties(_mergeProps, [
37118
37106
  "length",
@@ -37215,7 +37203,7 @@
37215
37203
  })));
37216
37204
  };
37217
37205
  CountUp.displayName = "NutCountUp";
37218
- var defaultProps$q = {};
37206
+ var defaultProps$s = {};
37219
37207
  var AnimatingNumbers = /* @__PURE__ */ function(Component) {
37220
37208
  _inherits(AnimatingNumbers2, Component);
37221
37209
  function AnimatingNumbers2(props) {
@@ -37239,11 +37227,11 @@
37239
37227
  ]);
37240
37228
  return AnimatingNumbers2;
37241
37229
  }(React.Component);
37242
- _define_property(AnimatingNumbers, "defaultProps", defaultProps$q);
37230
+ _define_property(AnimatingNumbers, "defaultProps", defaultProps$s);
37243
37231
  _define_property(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
37244
37232
  _define_property(AnimatingNumbers, "CountUp", CountUp);
37245
37233
  AnimatingNumbers.CountUp = CountUp;
37246
- var defaultProps$p = _object_spread_props(_object_spread({}, ComponentDefaults), {
37234
+ var defaultProps$r = _object_spread_props(_object_spread({}, ComponentDefaults), {
37247
37235
  className: "",
37248
37236
  src: "",
37249
37237
  style: {},
@@ -37280,7 +37268,7 @@
37280
37268
  };
37281
37269
  var classPrefix2 = "nut-audio";
37282
37270
  var locale = useConfig().locale;
37283
- var _ref = _object_spread({}, defaultProps$p, props), className = _ref.className, src = _ref.src, style = _ref.style, autoplay = _ref.autoplay, loop = _ref.loop, type2 = _ref.type, onFastBack = _ref.onFastBack, onForward = _ref.onForward, onPause = _ref.onPause, onPlay = _ref.onPlay, onPlayEnd = _ref.onPlayEnd, onCanPlay = _ref.onCanPlay, children = _ref.children;
37271
+ var _ref = _object_spread({}, defaultProps$r, props), className = _ref.className, src = _ref.src, style = _ref.style, autoplay = _ref.autoplay, loop = _ref.loop, type2 = _ref.type, onFastBack = _ref.onFastBack, onForward = _ref.onForward, onPause = _ref.onPause, onPlay = _ref.onPlay, onPlayEnd = _ref.onPlayEnd, onCanPlay = _ref.onCanPlay, children = _ref.children;
37284
37272
  _ref.iconClassPrefix;
37285
37273
  _ref.iconFontClassName;
37286
37274
  var rest = _object_without_properties(_ref, [
@@ -37443,6 +37431,135 @@
37443
37431
  }, rest), renderAudio());
37444
37432
  };
37445
37433
  Audio.displayName = "NutAudio";
37434
+ var AvatarContext = React.createContext({});
37435
+ var defaultProps$q = _object_spread_props(_object_spread({}, ComponentDefaults), {
37436
+ maxContent: "",
37437
+ max: "",
37438
+ maxBackground: "#eee",
37439
+ maxColor: "#666",
37440
+ gap: "-8",
37441
+ level: "left"
37442
+ });
37443
+ var classPrefix$9 = "nut-avatar-group";
37444
+ var AvatarGroup = function(props) {
37445
+ var propAvatarGroup = _object_spread({}, defaultProps$q, props);
37446
+ var className = propAvatarGroup.className, style = propAvatarGroup.style, children = propAvatarGroup.children;
37447
+ var avatarGroupRef = React.useRef(null);
37448
+ var cls = classNames(classPrefix$9, className);
37449
+ var parentAvatar = {
37450
+ propAvatarGroup: _object_spread({
37451
+ avatarCount: React.Children.count(children) || 0
37452
+ }, propAvatarGroup),
37453
+ avatarGroupRef
37454
+ };
37455
+ return /* @__PURE__ */ React.createElement(AvatarContext.Provider, {
37456
+ value: parentAvatar
37457
+ }, /* @__PURE__ */ React.createElement(components.View, {
37458
+ className: cls,
37459
+ style,
37460
+ ref: avatarGroupRef
37461
+ }, React.Children.map(children, function(child, index2) {
37462
+ var _child_type;
37463
+ return (child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "NutAvatar" ? /* @__PURE__ */ React.cloneElement(child, {
37464
+ avatarIndex: index2 + 1,
37465
+ className: "nut-avatar-group-avatar"
37466
+ }) : child;
37467
+ })));
37468
+ };
37469
+ AvatarGroup.displayName = "NutAvatarGroup";
37470
+ var defaultProps$p = _object_spread_props(_object_spread({}, ComponentDefaults), {
37471
+ size: harmony() ? "40" : "",
37472
+ shape: "round",
37473
+ icon: "",
37474
+ background: "#eee",
37475
+ color: "#666",
37476
+ fit: "cover",
37477
+ src: "",
37478
+ alt: "",
37479
+ avatarIndex: 0
37480
+ });
37481
+ var classPrefix$8 = "nut-avatar";
37482
+ var Avatar = function(props) {
37483
+ var _$_object_spread = _object_spread({}, defaultProps$p, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, icon = _$_object_spread.icon, fit = _$_object_spread.fit, avatarIndex = _$_object_spread.avatarIndex, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError;
37484
+ var _useState = _sliced_to_array(React.useState(false), 2), showMax = _useState[0], setShowMax = _useState[1];
37485
+ var avatarRef = React.useRef(null);
37486
+ var parent2 = React.useContext(AvatarContext);
37487
+ var sizeValue = [
37488
+ "large",
37489
+ "normal",
37490
+ "small"
37491
+ ];
37492
+ var propAvatarGroup = parent2.propAvatarGroup;
37493
+ var groupSize = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.size;
37494
+ var groupShape = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.shape;
37495
+ var groupCount = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.avatarCount;
37496
+ var groupMax = propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.max;
37497
+ var _obj;
37498
+ var classes = classNames((_obj = {}, _define_property(_obj, "nut-avatar-".concat(groupSize || size || "normal"), true), _define_property(_obj, "nut-avatar-".concat(groupShape || shape), true), _define_property(_obj, "nut-avatar-".concat(groupSize || size || "normal", "-round"), shape === "round" && true), _obj));
37499
+ var nativeClasses = classNames(_define_property({}, "nut-avatar-first-child", avatarIndex === 1));
37500
+ var cls = classNames(classPrefix$8, classes, className, nativeClasses);
37501
+ var _obj1;
37502
+ var styles = _object_spread((_obj1 = {
37503
+ width: sizeValue.indexOf(size) > -1 ? "" : pxTransform(parseInt(size)),
37504
+ height: sizeValue.indexOf(size) > -1 ? "" : pxTransform(parseInt(size)),
37505
+ backgroundColor: "".concat(background),
37506
+ color
37507
+ }, _define_property(_obj1, harmony() ? "marginRight" : "marginLeft", avatarIndex !== 1 && (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.gap) ? "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.gap, "px") : ""), _define_property(_obj1, "zIndex", (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.level) === "right" ? Math.abs(groupCount - avatarIndex) : ""), _obj1), style);
37508
+ var maxStyles = {
37509
+ backgroundColor: "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxBackground),
37510
+ color: "".concat(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxColor)
37511
+ };
37512
+ React.useEffect(function() {
37513
+ var maxCount = groupMax || groupCount;
37514
+ if (avatarIndex === groupCount && avatarIndex !== maxCount && groupCount > maxCount) {
37515
+ setShowMax(true);
37516
+ }
37517
+ }, [
37518
+ avatarIndex,
37519
+ groupCount
37520
+ ]);
37521
+ var errorEvent = function() {
37522
+ onError && onError();
37523
+ };
37524
+ var clickAvatar = function(e) {
37525
+ onClick && onClick(e);
37526
+ };
37527
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /* @__PURE__ */ React.createElement(components.View, {
37528
+ className: cls,
37529
+ style: !showMax ? styles : maxStyles,
37530
+ onClick: clickAvatar,
37531
+ ref: avatarRef
37532
+ }, (!groupMax || avatarIndex <= groupMax) && /* @__PURE__ */ React.createElement(React.Fragment, null, src && /* @__PURE__ */ React.createElement(components.Image, {
37533
+ className: "nut-avatar-img nut-avatar-".concat(groupSize || size || "normal", "-img"),
37534
+ src,
37535
+ style: {
37536
+ objectFit: fit
37537
+ },
37538
+ onError: errorEvent
37539
+ }), /* @__PURE__ */ React.isValidElement(icon) ? /* @__PURE__ */ React.createElement(components.View, {
37540
+ className: "nut-avatar-text"
37541
+ }, /* @__PURE__ */ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
37542
+ color,
37543
+ className: "".concat(icon.props.className || "", " nut-avatar-icon nut-avatar-").concat(groupSize || size || "normal", "-icon")
37544
+ }))) : null, children && /* @__PURE__ */ React.createElement(components.View, {
37545
+ style: {
37546
+ color
37547
+ },
37548
+ className: "nut-avatar-text nut-avatar-".concat(groupSize || size || "normal", "-text")
37549
+ }, children), !src && !icon && !children && /* @__PURE__ */ React.createElement(components.View, {
37550
+ className: "nut-avatar-text"
37551
+ }, /* @__PURE__ */ React.createElement(IconSVG$1, {
37552
+ style: {
37553
+ color
37554
+ },
37555
+ className: "nut-avatar-icon nut-avatar-".concat(groupSize || size || "normal", "-icon")
37556
+ }))), showMax && /* @__PURE__ */ React.createElement(components.View, {
37557
+ className: "nut-avatar-text nut-avatar-".concat(groupSize || "normal", "-text"),
37558
+ style: _object_spread({}, maxStyles)
37559
+ }, (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxContent) ? propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.maxContent : "+ ".concat(avatarIndex - Number(groupMax || 0)))));
37560
+ };
37561
+ Avatar.displayName = "NutAvatar";
37562
+ Avatar.Group = AvatarGroup;
37446
37563
  var defaultProps$o = _object_spread_props(_object_spread({}, ComponentDefaults), {
37447
37564
  strokeWidth: 5,
37448
37565
  radius: 50,
@@ -38337,7 +38454,7 @@
38337
38454
  var classPrefix$5 = "nut-indicator";
38338
38455
  var Indicator = function(props) {
38339
38456
  var maybeFixedWidth = function maybeFixedWidth2() {
38340
- if (total === 2 || type2 === "slide") {
38457
+ if (type2 === "dualScreen" || type2 === "slide") {
38341
38458
  return "".concat(classPrefix$5, "-fixed-width");
38342
38459
  }
38343
38460
  return "";
@@ -38731,6 +38848,14 @@
38731
38848
  }, closeIcon === true ? /* @__PURE__ */ React.createElement(IconSVG$p, null) : closeIcon));
38732
38849
  };
38733
38850
  ImagePreview.displayName = "NutImagePreview";
38851
+ function addColorForHarmony(maybeElement, color) {
38852
+ if (React.isValidElement(maybeElement) && harmony()) {
38853
+ return React.cloneElement(maybeElement, {
38854
+ color
38855
+ });
38856
+ }
38857
+ return maybeElement;
38858
+ }
38734
38859
  var defaultPaginationOptions = {
38735
38860
  current: 0,
38736
38861
  itemsPerPage: 10,