@nutui/nutui-react-taro 1.3.10 → 1.3.11

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 (69) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +54 -46
  3. package/dist/esm/Audio.js +3 -3
  4. package/dist/esm/Avatar.js +3 -2
  5. package/dist/esm/Badge.js +2 -2
  6. package/dist/esm/Button.js +2 -2
  7. package/dist/esm/Calendar.js +3 -3
  8. package/dist/esm/CalendarItem.js +2 -2
  9. package/dist/esm/Card.js +3 -3
  10. package/dist/esm/Checkbox.js +2 -2
  11. package/dist/esm/CheckboxGroup.js +2 -2
  12. package/dist/esm/Col.js +2 -2
  13. package/dist/esm/Dialog.js +3 -3
  14. package/dist/esm/ImagePreview.js +3 -3
  15. package/dist/esm/Infiniteloading.js +2 -2
  16. package/dist/esm/Input.js +2 -2
  17. package/dist/esm/MenuItem.js +2 -2
  18. package/dist/esm/Radio.js +1 -1
  19. package/dist/esm/RadioGroup.js +2 -2
  20. package/dist/esm/Rate.js +2 -2
  21. package/dist/esm/Row.js +2 -2
  22. package/dist/esm/Signature.js +3 -3
  23. package/dist/esm/Skeleton.js +4 -3
  24. package/dist/esm/SwiperItem.js +2 -2
  25. package/dist/esm/TabbarItem.js +3 -3
  26. package/dist/esm/Tag.js +2 -2
  27. package/dist/esm/Uploader.js +3 -3
  28. package/dist/esm/{audio.taro-b42a082b.js → audio.taro-b4f71d1b.js} +1 -1
  29. package/dist/esm/{avatar.taro-deabe88a.js → avatar.taro-85ced995.js} +9 -7
  30. package/dist/esm/{badge.taro-38684262.js → badge.taro-9f72d846.js} +4 -1
  31. package/dist/esm/{button.taro-7e924b72.js → button.taro-4ce133b9.js} +26 -21
  32. package/dist/esm/{calendar.taro-533b3219.js → calendar.taro-a1f1a7f8.js} +1 -1
  33. package/dist/esm/{calendaritem.taro-fe5dd4bd.js → calendaritem.taro-3a12e7f2.js} +1 -1
  34. package/dist/esm/{card.taro-59f65b66.js → card.taro-a530dfb3.js} +1 -1
  35. package/dist/esm/{checkbox.taro-d8656076.js → checkbox.taro-0bda9796.js} +1 -1
  36. package/dist/esm/{col.taro-2a437387.js → col.taro-b61c7cba.js} +5 -2
  37. package/dist/esm/{dialog.taro-0c35b35f.js → dialog.taro-17e19e5e.js} +1 -1
  38. package/dist/esm/{imagepreview.taro-1199e977.js → imagepreview.taro-69d47ab0.js} +1 -1
  39. package/dist/esm/{index.taro-c092d216.js → index.taro-a36f96fb.js} +1 -1
  40. package/dist/esm/{infiniteloading.taro-b95e62bf.js → infiniteloading.taro-9701755f.js} +3 -1
  41. package/dist/esm/{input.taro-cc46bbc3.js → input.taro-14380bc6.js} +1 -3
  42. package/dist/esm/{menuitem.taro-06a135a5.js → menuitem.taro-bb55f482.js} +8 -3
  43. package/dist/esm/nutui-react.es.js +23 -23
  44. package/dist/esm/{rate.taro-69c85081.js → rate.taro-10197384.js} +4 -1
  45. package/dist/esm/{row.taro-cec13a7e.js → row.taro-37a895de.js} +5 -1
  46. package/dist/esm/{signature.taro-57f8de06.js → signature.taro-6589435b.js} +1 -1
  47. package/dist/esm/{skeleton.taro-acca102c.js → skeleton.taro-853ce460.js} +1 -1
  48. package/dist/esm/{swiperitem-d00e7513.js → swiperitem-86a3578a.js} +6 -4
  49. package/dist/esm/{tabbaritem.taro-fb90f659.js → tabbaritem.taro-8dfb8055.js} +5 -4
  50. package/dist/esm/{tag.taro-84d40117.js → tag.taro-bd900990.js} +1 -1
  51. package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -0
  52. package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +1 -1
  53. package/dist/esm/types/src/packages/button/button.taro.d.ts +4 -1
  54. package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +2 -2
  55. package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +2 -2
  56. package/dist/esm/{uploader.taro-a03bb003.js → uploader.taro-2e16bff6.js} +1 -1
  57. package/dist/locales/base.js +1 -1
  58. package/dist/locales/en-US.js +1 -1
  59. package/dist/locales/id-ID.js +1 -1
  60. package/dist/locales/zh-CN.js +1 -1
  61. package/dist/locales/zh-TW.js +1 -1
  62. package/dist/nutui.react.es.js +77 -46
  63. package/dist/nutui.react.umd.js +76 -45
  64. package/dist/packages/avatar/avatar.scss +1 -1
  65. package/dist/packages/button/button.scss +6 -0
  66. package/dist/style.css +1 -1
  67. package/dist/style.es.js +1 -1
  68. package/dist/types/index.d.ts +5 -3
  69. package/package.json +9 -3
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.10 Wed Nov 09 2022 13:51:43 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import * as React from "react";
7
- import React__default, { useCallback, useState, useEffect, useRef, createContext as createContext$1, useContext as useContext$1, useImperativeHandle, forwardRef, useLayoutEffect, useMemo, memo, Component } from "react";
7
+ import React__default, { useCallback, useState, useEffect, useRef, createContext as createContext$1, useContext as useContext$1, forwardRef, useImperativeHandle, useLayoutEffect, useMemo, memo, Component } from "react";
8
8
  import Taro, { usePageScroll, eventCenter, getCurrentInstance, nextTick, useReady, createSelectorQuery } from "@tarojs/taro";
9
9
  import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
10
10
  function getAugmentedNamespace(n2) {
@@ -223,7 +223,7 @@ const Button = (props) => {
223
223
  onClick(e2);
224
224
  }
225
225
  };
226
- return /* @__PURE__ */ React__default.createElement("div", {
226
+ return /* @__PURE__ */ React__default.createElement("button", {
227
227
  className: `${btnName} ${className}`,
228
228
  style: { ...btnStyle, ...style },
229
229
  ...rest,
@@ -239,8 +239,8 @@ const Button = (props) => {
239
239
  classPrefix: iconClassPrefix,
240
240
  fontClassName: iconFontClassName,
241
241
  name: icon
242
- }) : "", /* @__PURE__ */ React__default.createElement("div", {
243
- className: "text"
242
+ }) : "", children && /* @__PURE__ */ React__default.createElement("div", {
243
+ className: icon || loading ? "text" : ""
244
244
  }, children)));
245
245
  };
246
246
  Button.defaultProps = defaultProps$1n;
@@ -2507,7 +2507,17 @@ const defaultProps$1h = {
2507
2507
  gutter: "0"
2508
2508
  };
2509
2509
  const Col = (props) => {
2510
- const { span, offset, children, onClick } = { ...defaultProps$1h, ...props };
2510
+ const {
2511
+ className,
2512
+ style = {},
2513
+ span,
2514
+ offset,
2515
+ children,
2516
+ onClick
2517
+ } = {
2518
+ ...defaultProps$1h,
2519
+ ...props
2520
+ };
2511
2521
  const [colName, setColName] = useState("");
2512
2522
  const [colStyle, setColStyle] = useState({});
2513
2523
  const { gutter } = useContext$1(DataContext$2);
@@ -2516,18 +2526,18 @@ const Col = (props) => {
2516
2526
  return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
2517
2527
  };
2518
2528
  const getStyle = () => {
2519
- const style = {};
2520
- style.paddingLeft = `${gutter / 2}px`;
2521
- style.paddingRight = `${gutter / 2}px`;
2522
- return style;
2529
+ const style2 = {};
2530
+ style2.paddingLeft = `${gutter / 2}px`;
2531
+ style2.paddingRight = `${gutter / 2}px`;
2532
+ return style2;
2523
2533
  };
2524
2534
  useEffect(() => {
2525
2535
  setColName(classs);
2526
2536
  setColStyle(getStyle);
2527
2537
  }, [span, offset, gutter]);
2528
2538
  return /* @__PURE__ */ React__default.createElement("div", {
2529
- className: `${colName}`,
2530
- style: { ...colStyle },
2539
+ className: `${colName} ${className}`,
2540
+ style: { ...style, ...colStyle },
2531
2541
  onClick: (e2) => {
2532
2542
  onClick && onClick(e2, "col");
2533
2543
  }
@@ -2543,15 +2553,25 @@ const defaultProps$1g = {
2543
2553
  gutter: "0"
2544
2554
  };
2545
2555
  const Row = (props) => {
2546
- const { children, type, justify, align, wrap, gutter, onClick } = {
2556
+ const {
2557
+ className,
2558
+ style = {},
2559
+ children,
2560
+ type,
2561
+ justify,
2562
+ align,
2563
+ wrap,
2564
+ gutter,
2565
+ onClick
2566
+ } = {
2547
2567
  ...defaultProps$1g,
2548
2568
  ...props
2549
2569
  };
2550
2570
  const prefixCls = "nut-row";
2551
2571
  const getClass = (prefix2, type2) => {
2552
2572
  const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
2553
- const className = prefix2 ? classType : `nut-row-${type2}`;
2554
- return className;
2573
+ const className2 = prefix2 ? classType : `nut-row-${type2}`;
2574
+ return className2;
2555
2575
  };
2556
2576
  const getClasses = () => {
2557
2577
  return `
@@ -2570,7 +2590,8 @@ const Row = (props) => {
2570
2590
  }, React__default.createElement(
2571
2591
  "div",
2572
2592
  {
2573
- className: getClasses(),
2593
+ className: `${getClasses()} ${className}`,
2594
+ style,
2574
2595
  onClick: (e2) => {
2575
2596
  onClick && onClick(e2, "row");
2576
2597
  }
@@ -3101,16 +3122,17 @@ const TabbarItem = (props) => {
3101
3122
  };
3102
3123
  const b2 = cn("tabbar-item");
3103
3124
  const bIcon = cn("tabbar-item__icon-box");
3104
- const history = useHistory();
3105
3125
  useEffect(() => {
3106
3126
  if (active && href) {
3107
3127
  window.location.href = href;
3108
3128
  return;
3109
3129
  }
3110
3130
  if (active && to2) {
3111
- history.push(to2);
3131
+ Taro.navigateTo({
3132
+ url: to2
3133
+ });
3112
3134
  }
3113
- }, [active, history, href, to2]);
3135
+ }, [active, href, to2]);
3114
3136
  return /* @__PURE__ */ React__default.createElement("div", {
3115
3137
  className: `${b2({ active })} ${className}`,
3116
3138
  style: {
@@ -4028,7 +4050,7 @@ const defaultProps$$ = {
4028
4050
  fontClassName: "nutui-iconfont",
4029
4051
  onChange: (value) => void 0
4030
4052
  };
4031
- const MenuItem = (props) => {
4053
+ const MenuItem = forwardRef((props, ref) => {
4032
4054
  useConfig$1();
4033
4055
  const mergedProps = { ...defaultProps$$, ...props };
4034
4056
  const {
@@ -4058,6 +4080,9 @@ const MenuItem = (props) => {
4058
4080
  useEffect(() => {
4059
4081
  getParentOffset();
4060
4082
  }, [_showPopup]);
4083
+ useImperativeHandle(ref, () => ({
4084
+ toggle: parent.toggleItemShow
4085
+ }));
4061
4086
  const getIconCName = (optionVal, value2) => {
4062
4087
  return classNames({
4063
4088
  [activeTitleClass]: optionVal === value2,
@@ -4163,7 +4188,7 @@ const MenuItem = (props) => {
4163
4188
  }
4164
4189
  }, item.text));
4165
4190
  }), children))));
4166
- };
4191
+ });
4167
4192
  MenuItem.defaultProps = defaultProps$$;
4168
4193
  MenuItem.displayName = "NutMenuItem";
4169
4194
  const MIN_DISTANCE = 10;
@@ -5356,7 +5381,7 @@ const CalendarItem = (props) => {
5356
5381
  }, /* @__PURE__ */ React__default.createElement("div", {
5357
5382
  className: "calendar-day"
5358
5383
  }, day.type === "curr" ? day.day : ""), isCurrDay(month, day.day) ? /* @__PURE__ */ React__default.createElement("div", {
5359
- className: "calendar-curr-tips"
5384
+ className: "calendar-curr-tip-curr"
5360
5385
  }, locale.calendaritem.today) : "", isStartTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
5361
5386
  className: "calendar-day-tip"
5362
5387
  }, locale.calendaritem.start) : "", isEndTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
@@ -5553,7 +5578,7 @@ const CheckboxGroup = React__default.forwardRef(
5553
5578
  checked: childChecked
5554
5579
  });
5555
5580
  });
5556
- }, [innerValue]);
5581
+ }, [innerValue, options]);
5557
5582
  return /* @__PURE__ */ React__default.createElement("div", {
5558
5583
  className: `${b2()} ${className || ""}`,
5559
5584
  ...rest
@@ -6725,9 +6750,7 @@ const Input = forwardRef((props, ref) => {
6725
6750
  });
6726
6751
  useEffect(() => {
6727
6752
  setClasses(inputClass);
6728
- if (defaultValue) {
6729
- SetInputValue(defaultValue);
6730
- }
6753
+ SetInputValue(defaultValue);
6731
6754
  }, [defaultValue]);
6732
6755
  useEffect(() => {
6733
6756
  if (inputValue) {
@@ -7012,7 +7035,7 @@ const RadioGroup = React__default.forwardRef(
7012
7035
  checked: childChecked
7013
7036
  });
7014
7037
  });
7015
- }, [val2State]);
7038
+ }, [val2State, options]);
7016
7039
  return /* @__PURE__ */ React__default.createElement(RadioContext.Provider, {
7017
7040
  value: {
7018
7041
  onChange: (val) => {
@@ -7144,6 +7167,8 @@ const defaultProps$O = {
7144
7167
  };
7145
7168
  const Rate = (props) => {
7146
7169
  const {
7170
+ className,
7171
+ style,
7147
7172
  count,
7148
7173
  modelValue,
7149
7174
  minimizeValue,
@@ -7201,7 +7226,8 @@ const Rate = (props) => {
7201
7226
  onChange && onChange(value);
7202
7227
  };
7203
7228
  return /* @__PURE__ */ React__default.createElement("div", {
7204
- className: b2()
7229
+ className: `${b2()} ${className}`,
7230
+ style
7205
7231
  }, countArray.map((n2) => {
7206
7232
  return /* @__PURE__ */ React__default.createElement("div", {
7207
7233
  className: bi(),
@@ -9540,6 +9566,7 @@ const Infiniteloading = (props) => {
9540
9566
  className: classes,
9541
9567
  scrollY: true,
9542
9568
  id: "scroller",
9569
+ style: { height: "100%" },
9543
9570
  onScroll: scrollAction,
9544
9571
  onScrollToLower: lower,
9545
9572
  onTouchStart: touchStart,
@@ -15599,11 +15626,11 @@ const defaultProps$r = {
15599
15626
  };
15600
15627
  const SwiperItem = React__default.forwardRef((props, ref) => {
15601
15628
  const _props = { ...defaultProps$r, ...props };
15602
- const { children, direction, size } = _props;
15629
+ const { className, style, children, direction, size } = _props;
15603
15630
  const parent = useContext$1(DataContext);
15604
15631
  const b2 = cn("swiper-item");
15605
- const classes = classNames(b2(""));
15606
- const style = () => {
15632
+ const classes = classNames(b2(""), className);
15633
+ const getStyle = () => {
15607
15634
  const style2 = {};
15608
15635
  const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
15609
15636
  const _size = (parent == null ? void 0 : parent.size) || size;
@@ -15614,7 +15641,7 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
15614
15641
  };
15615
15642
  return /* @__PURE__ */ React__default.createElement("div", {
15616
15643
  className: classes,
15617
- style: style()
15644
+ style: { ...style, ...getStyle() }
15618
15645
  }, children);
15619
15646
  });
15620
15647
  SwiperItem.defaultProps = defaultProps$r;
@@ -15624,11 +15651,11 @@ const defaultProps$q = {
15624
15651
  ...ComponentDefaults,
15625
15652
  size: "",
15626
15653
  icon: "",
15654
+ iconSize: "",
15627
15655
  bgColor: "#eee",
15628
15656
  color: "#666",
15629
15657
  prefixCls: "nut-avatar",
15630
- url: "",
15631
- alt: ""
15658
+ url: ""
15632
15659
  };
15633
15660
  const Avatar = (props) => {
15634
15661
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
@@ -15640,8 +15667,8 @@ const Avatar = (props) => {
15640
15667
  bgColor,
15641
15668
  color,
15642
15669
  url,
15643
- alt,
15644
15670
  icon,
15671
+ iconSize,
15645
15672
  className,
15646
15673
  style,
15647
15674
  activeAvatar,
@@ -15722,15 +15749,16 @@ const Avatar = (props) => {
15722
15749
  style: !showMax ? styles : maxStyles,
15723
15750
  onClick: clickAvatar,
15724
15751
  ref: avatarRef
15725
- }, (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement("img", {
15752
+ }, (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement(index_cjs.Image, {
15753
+ className: "avatar-img",
15726
15754
  src: url,
15727
- alt,
15728
15755
  onError: errorEvent
15729
15756
  }), icon && /* @__PURE__ */ React__default.createElement(Icon$1, {
15730
15757
  classPrefix: iconClassPrefix,
15731
15758
  fontClassName: iconFontClassName,
15732
15759
  className: "icon",
15733
- name: iconStyles
15760
+ name: iconStyles,
15761
+ size: iconSize
15734
15762
  }), children && /* @__PURE__ */ React__default.createElement("span", {
15735
15763
  className: "text"
15736
15764
  }, children)), showMax && /* @__PURE__ */ React__default.createElement("div", {
@@ -15872,6 +15900,8 @@ const defaultProps$n = {
15872
15900
  };
15873
15901
  const Badge = (props) => {
15874
15902
  const {
15903
+ className,
15904
+ style,
15875
15905
  children,
15876
15906
  dot,
15877
15907
  top,
@@ -15896,15 +15926,16 @@ const Badge = (props) => {
15896
15926
  return value;
15897
15927
  }
15898
15928
  const getStyle = () => {
15899
- const style = {};
15900
- style.top = `${Number(top) || parseFloat(top) || 0}px`;
15901
- style.right = `${Number(right) || parseFloat(right) || 0}px`;
15902
- style.zIndex = zIndex;
15903
- style.backgroundColor = color;
15904
- return style;
15929
+ const style2 = {};
15930
+ style2.top = `${Number(top) || parseFloat(top) || 0}px`;
15931
+ style2.right = `${Number(right) || parseFloat(right) || 0}px`;
15932
+ style2.zIndex = zIndex;
15933
+ style2.backgroundColor = color;
15934
+ return style2;
15905
15935
  };
15906
15936
  return /* @__PURE__ */ React__default.createElement("div", {
15907
- className: "nut-badge"
15937
+ className: `nut-badge ${className}`,
15938
+ style
15908
15939
  }, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
15909
15940
  className: "slot-icons"
15910
15941
  }, /* @__PURE__ */ React__default.createElement(Icon$1, {
@@ -16002,7 +16033,7 @@ const Tag = (props) => {
16002
16033
  }
16003
16034
  return style2;
16004
16035
  };
16005
- return /* @__PURE__ */ React__default.createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
16036
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
16006
16037
  className: `${btnName} ${className}`,
16007
16038
  style: { ...style, ...getStyle() },
16008
16039
  onClick: (e2) => handleClick2(e2)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.10 Wed Nov 09 2022 13:51:43 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -250,7 +250,7 @@
250
250
  onClick(e2);
251
251
  }
252
252
  };
253
- return /* @__PURE__ */ React__default["default"].createElement("div", {
253
+ return /* @__PURE__ */ React__default["default"].createElement("button", {
254
254
  className: `${btnName} ${className}`,
255
255
  style: { ...btnStyle, ...style },
256
256
  ...rest,
@@ -266,8 +266,8 @@
266
266
  classPrefix: iconClassPrefix,
267
267
  fontClassName: iconFontClassName,
268
268
  name: icon
269
- }) : "", /* @__PURE__ */ React__default["default"].createElement("div", {
270
- className: "text"
269
+ }) : "", children && /* @__PURE__ */ React__default["default"].createElement("div", {
270
+ className: icon || loading ? "text" : ""
271
271
  }, children)));
272
272
  };
273
273
  Button.defaultProps = defaultProps$1n;
@@ -2534,7 +2534,17 @@
2534
2534
  gutter: "0"
2535
2535
  };
2536
2536
  const Col = (props) => {
2537
- const { span, offset, children, onClick } = { ...defaultProps$1h, ...props };
2537
+ const {
2538
+ className,
2539
+ style = {},
2540
+ span,
2541
+ offset,
2542
+ children,
2543
+ onClick
2544
+ } = {
2545
+ ...defaultProps$1h,
2546
+ ...props
2547
+ };
2538
2548
  const [colName, setColName] = React.useState("");
2539
2549
  const [colStyle, setColStyle] = React.useState({});
2540
2550
  const { gutter } = React.useContext(DataContext$2);
@@ -2543,18 +2553,18 @@
2543
2553
  return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
2544
2554
  };
2545
2555
  const getStyle = () => {
2546
- const style = {};
2547
- style.paddingLeft = `${gutter / 2}px`;
2548
- style.paddingRight = `${gutter / 2}px`;
2549
- return style;
2556
+ const style2 = {};
2557
+ style2.paddingLeft = `${gutter / 2}px`;
2558
+ style2.paddingRight = `${gutter / 2}px`;
2559
+ return style2;
2550
2560
  };
2551
2561
  React.useEffect(() => {
2552
2562
  setColName(classs);
2553
2563
  setColStyle(getStyle);
2554
2564
  }, [span, offset, gutter]);
2555
2565
  return /* @__PURE__ */ React__default["default"].createElement("div", {
2556
- className: `${colName}`,
2557
- style: { ...colStyle },
2566
+ className: `${colName} ${className}`,
2567
+ style: { ...style, ...colStyle },
2558
2568
  onClick: (e2) => {
2559
2569
  onClick && onClick(e2, "col");
2560
2570
  }
@@ -2570,15 +2580,25 @@
2570
2580
  gutter: "0"
2571
2581
  };
2572
2582
  const Row = (props) => {
2573
- const { children, type, justify, align, wrap, gutter, onClick } = {
2583
+ const {
2584
+ className,
2585
+ style = {},
2586
+ children,
2587
+ type,
2588
+ justify,
2589
+ align,
2590
+ wrap,
2591
+ gutter,
2592
+ onClick
2593
+ } = {
2574
2594
  ...defaultProps$1g,
2575
2595
  ...props
2576
2596
  };
2577
2597
  const prefixCls = "nut-row";
2578
2598
  const getClass = (prefix2, type2) => {
2579
2599
  const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
2580
- const className = prefix2 ? classType : `nut-row-${type2}`;
2581
- return className;
2600
+ const className2 = prefix2 ? classType : `nut-row-${type2}`;
2601
+ return className2;
2582
2602
  };
2583
2603
  const getClasses = () => {
2584
2604
  return `
@@ -2597,7 +2617,8 @@
2597
2617
  }, React__default["default"].createElement(
2598
2618
  "div",
2599
2619
  {
2600
- className: getClasses(),
2620
+ className: `${getClasses()} ${className}`,
2621
+ style,
2601
2622
  onClick: (e2) => {
2602
2623
  onClick && onClick(e2, "row");
2603
2624
  }
@@ -3128,16 +3149,17 @@
3128
3149
  };
3129
3150
  const b2 = cn("tabbar-item");
3130
3151
  const bIcon = cn("tabbar-item__icon-box");
3131
- const history = useHistory();
3132
3152
  React.useEffect(() => {
3133
3153
  if (active && href) {
3134
3154
  window.location.href = href;
3135
3155
  return;
3136
3156
  }
3137
3157
  if (active && to2) {
3138
- history.push(to2);
3158
+ Taro__default["default"].navigateTo({
3159
+ url: to2
3160
+ });
3139
3161
  }
3140
- }, [active, history, href, to2]);
3162
+ }, [active, href, to2]);
3141
3163
  return /* @__PURE__ */ React__default["default"].createElement("div", {
3142
3164
  className: `${b2({ active })} ${className}`,
3143
3165
  style: {
@@ -4055,7 +4077,7 @@
4055
4077
  fontClassName: "nutui-iconfont",
4056
4078
  onChange: (value) => void 0
4057
4079
  };
4058
- const MenuItem = (props) => {
4080
+ const MenuItem = React.forwardRef((props, ref) => {
4059
4081
  useConfig$1();
4060
4082
  const mergedProps = { ...defaultProps$$, ...props };
4061
4083
  const {
@@ -4085,6 +4107,9 @@
4085
4107
  React.useEffect(() => {
4086
4108
  getParentOffset();
4087
4109
  }, [_showPopup]);
4110
+ React.useImperativeHandle(ref, () => ({
4111
+ toggle: parent.toggleItemShow
4112
+ }));
4088
4113
  const getIconCName = (optionVal, value2) => {
4089
4114
  return classNames({
4090
4115
  [activeTitleClass]: optionVal === value2,
@@ -4190,7 +4215,7 @@
4190
4215
  }
4191
4216
  }, item.text));
4192
4217
  }), children))));
4193
- };
4218
+ });
4194
4219
  MenuItem.defaultProps = defaultProps$$;
4195
4220
  MenuItem.displayName = "NutMenuItem";
4196
4221
  const MIN_DISTANCE = 10;
@@ -5383,7 +5408,7 @@
5383
5408
  }, /* @__PURE__ */ React__default["default"].createElement("div", {
5384
5409
  className: "calendar-day"
5385
5410
  }, day.type === "curr" ? day.day : ""), isCurrDay(month, day.day) ? /* @__PURE__ */ React__default["default"].createElement("div", {
5386
- className: "calendar-curr-tips"
5411
+ className: "calendar-curr-tip-curr"
5387
5412
  }, locale.calendaritem.today) : "", isStartTip(day, month) ? /* @__PURE__ */ React__default["default"].createElement("div", {
5388
5413
  className: "calendar-day-tip"
5389
5414
  }, locale.calendaritem.start) : "", isEndTip(day, month) ? /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -5580,7 +5605,7 @@
5580
5605
  checked: childChecked
5581
5606
  });
5582
5607
  });
5583
- }, [innerValue]);
5608
+ }, [innerValue, options]);
5584
5609
  return /* @__PURE__ */ React__default["default"].createElement("div", {
5585
5610
  className: `${b2()} ${className || ""}`,
5586
5611
  ...rest
@@ -6752,9 +6777,7 @@
6752
6777
  });
6753
6778
  React.useEffect(() => {
6754
6779
  setClasses(inputClass);
6755
- if (defaultValue) {
6756
- SetInputValue(defaultValue);
6757
- }
6780
+ SetInputValue(defaultValue);
6758
6781
  }, [defaultValue]);
6759
6782
  React.useEffect(() => {
6760
6783
  if (inputValue) {
@@ -7039,7 +7062,7 @@
7039
7062
  checked: childChecked
7040
7063
  });
7041
7064
  });
7042
- }, [val2State]);
7065
+ }, [val2State, options]);
7043
7066
  return /* @__PURE__ */ React__default["default"].createElement(RadioContext.Provider, {
7044
7067
  value: {
7045
7068
  onChange: (val) => {
@@ -7171,6 +7194,8 @@
7171
7194
  };
7172
7195
  const Rate = (props) => {
7173
7196
  const {
7197
+ className,
7198
+ style,
7174
7199
  count,
7175
7200
  modelValue,
7176
7201
  minimizeValue,
@@ -7228,7 +7253,8 @@
7228
7253
  onChange && onChange(value);
7229
7254
  };
7230
7255
  return /* @__PURE__ */ React__default["default"].createElement("div", {
7231
- className: b2()
7256
+ className: `${b2()} ${className}`,
7257
+ style
7232
7258
  }, countArray.map((n2) => {
7233
7259
  return /* @__PURE__ */ React__default["default"].createElement("div", {
7234
7260
  className: bi(),
@@ -9567,6 +9593,7 @@
9567
9593
  className: classes,
9568
9594
  scrollY: true,
9569
9595
  id: "scroller",
9596
+ style: { height: "100%" },
9570
9597
  onScroll: scrollAction,
9571
9598
  onScrollToLower: lower,
9572
9599
  onTouchStart: touchStart,
@@ -15626,11 +15653,11 @@
15626
15653
  };
15627
15654
  const SwiperItem = React__default["default"].forwardRef((props, ref) => {
15628
15655
  const _props = { ...defaultProps$r, ...props };
15629
- const { children, direction, size } = _props;
15656
+ const { className, style, children, direction, size } = _props;
15630
15657
  const parent = React.useContext(DataContext);
15631
15658
  const b2 = cn("swiper-item");
15632
- const classes = classNames(b2(""));
15633
- const style = () => {
15659
+ const classes = classNames(b2(""), className);
15660
+ const getStyle = () => {
15634
15661
  const style2 = {};
15635
15662
  const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
15636
15663
  const _size = (parent == null ? void 0 : parent.size) || size;
@@ -15641,7 +15668,7 @@
15641
15668
  };
15642
15669
  return /* @__PURE__ */ React__default["default"].createElement("div", {
15643
15670
  className: classes,
15644
- style: style()
15671
+ style: { ...style, ...getStyle() }
15645
15672
  }, children);
15646
15673
  });
15647
15674
  SwiperItem.defaultProps = defaultProps$r;
@@ -15651,11 +15678,11 @@
15651
15678
  ...ComponentDefaults,
15652
15679
  size: "",
15653
15680
  icon: "",
15681
+ iconSize: "",
15654
15682
  bgColor: "#eee",
15655
15683
  color: "#666",
15656
15684
  prefixCls: "nut-avatar",
15657
- url: "",
15658
- alt: ""
15685
+ url: ""
15659
15686
  };
15660
15687
  const Avatar = (props) => {
15661
15688
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
@@ -15667,8 +15694,8 @@
15667
15694
  bgColor,
15668
15695
  color,
15669
15696
  url,
15670
- alt,
15671
15697
  icon,
15698
+ iconSize,
15672
15699
  className,
15673
15700
  style,
15674
15701
  activeAvatar,
@@ -15749,15 +15776,16 @@
15749
15776
  style: !showMax ? styles : maxStyles,
15750
15777
  onClick: clickAvatar,
15751
15778
  ref: avatarRef
15752
- }, (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, url && /* @__PURE__ */ React__default["default"].createElement("img", {
15779
+ }, (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, url && /* @__PURE__ */ React__default["default"].createElement(index_cjs.Image, {
15780
+ className: "avatar-img",
15753
15781
  src: url,
15754
- alt,
15755
15782
  onError: errorEvent
15756
15783
  }), icon && /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
15757
15784
  classPrefix: iconClassPrefix,
15758
15785
  fontClassName: iconFontClassName,
15759
15786
  className: "icon",
15760
- name: iconStyles
15787
+ name: iconStyles,
15788
+ size: iconSize
15761
15789
  }), children && /* @__PURE__ */ React__default["default"].createElement("span", {
15762
15790
  className: "text"
15763
15791
  }, children)), showMax && /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -15899,6 +15927,8 @@
15899
15927
  };
15900
15928
  const Badge = (props) => {
15901
15929
  const {
15930
+ className,
15931
+ style,
15902
15932
  children,
15903
15933
  dot,
15904
15934
  top,
@@ -15923,15 +15953,16 @@
15923
15953
  return value;
15924
15954
  }
15925
15955
  const getStyle = () => {
15926
- const style = {};
15927
- style.top = `${Number(top) || parseFloat(top) || 0}px`;
15928
- style.right = `${Number(right) || parseFloat(right) || 0}px`;
15929
- style.zIndex = zIndex;
15930
- style.backgroundColor = color;
15931
- return style;
15956
+ const style2 = {};
15957
+ style2.top = `${Number(top) || parseFloat(top) || 0}px`;
15958
+ style2.right = `${Number(right) || parseFloat(right) || 0}px`;
15959
+ style2.zIndex = zIndex;
15960
+ style2.backgroundColor = color;
15961
+ return style2;
15932
15962
  };
15933
15963
  return /* @__PURE__ */ React__default["default"].createElement("div", {
15934
- className: "nut-badge"
15964
+ className: `nut-badge ${className}`,
15965
+ style
15935
15966
  }, icons !== "" && /* @__PURE__ */ React__default["default"].createElement("div", {
15936
15967
  className: "slot-icons"
15937
15968
  }, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
@@ -16029,7 +16060,7 @@
16029
16060
  }
16030
16061
  return style2;
16031
16062
  };
16032
- return /* @__PURE__ */ React__default["default"].createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default["default"].createElement("div", {
16063
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, closeable ? isTagShow && /* @__PURE__ */ React__default["default"].createElement("div", {
16033
16064
  className: `${btnName} ${className}`,
16034
16065
  style: { ...style, ...getStyle() },
16035
16066
  onClick: (e2) => handleClick2(e2)
@@ -6,7 +6,7 @@
6
6
  position: relative;
7
7
  flex: 0 0 auto; // 防止被压缩
8
8
  text-align: center;
9
- img {
9
+ .avatar-img {
10
10
  position: absolute;
11
11
  width: 100%;
12
12
  height: 100%;