@nutui/nutui-react-taro 1.3.2 → 1.3.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/esm/ActionSheet/style/index.js +2 -2
  3. package/dist/esm/ActionSheet.js +2 -2
  4. package/dist/esm/Address/style/index.js +4 -4
  5. package/dist/esm/AnimatingNumbers/style/index.js +2 -2
  6. package/dist/esm/Audio/style/index.js +4 -4
  7. package/dist/esm/Avatar/style/index.js +2 -2
  8. package/dist/esm/AvatarGroup/style/index.js +1 -1
  9. package/dist/esm/BackTop/style/index.js +2 -2
  10. package/dist/esm/Badge/style/index.js +1 -1
  11. package/dist/esm/Barrage/style/index.js +1 -1
  12. package/dist/esm/Button/style/index.js +2 -2
  13. package/dist/esm/Calendar/style/index.js +2 -2
  14. package/dist/esm/CalendarItem/style/index.js +1 -1
  15. package/dist/esm/Card/style/index.js +3 -3
  16. package/dist/esm/Cascader/style/index.js +2 -2
  17. package/dist/esm/Cell/style/index.js +2 -2
  18. package/dist/esm/CellGroup/style/index.js +1 -1
  19. package/dist/esm/Checkbox/style/index.js +2 -2
  20. package/dist/esm/CheckboxGroup/style/index.js +1 -1
  21. package/dist/esm/CircleProgress/style/index.js +1 -1
  22. package/dist/esm/Col/style/index.js +1 -1
  23. package/dist/esm/Collapse/style/index.js +2 -2
  24. package/dist/esm/CollapseItem/style/index.js +2 -2
  25. package/dist/esm/ConfigProvider/style/index.js +1 -1
  26. package/dist/esm/CountDown/style/index.js +1 -1
  27. package/dist/esm/DatePicker/style/index.js +2 -2
  28. package/dist/esm/Dialog/style/index.js +2 -2
  29. package/dist/esm/Divider/style/index.js +1 -1
  30. package/dist/esm/Drag/style/index.js +1 -1
  31. package/dist/esm/Elevator/style/index.js +1 -1
  32. package/dist/esm/Empty/style/index.js +1 -1
  33. package/dist/esm/FixedNav/style/index.js +3 -3
  34. package/dist/esm/FixedNav.js +2 -2
  35. package/dist/esm/Grid/style/index.js +1 -1
  36. package/dist/esm/GridItem/style/index.js +1 -1
  37. package/dist/esm/Icon/style/index.js +2 -1
  38. package/dist/esm/ImagePreview/style/index.js +1 -1
  39. package/dist/esm/Indicator/style/index.js +1 -1
  40. package/dist/esm/Infiniteloading/style/index.js +2 -2
  41. package/dist/esm/Input/style/index.js +2 -2
  42. package/dist/esm/InputNumber/style/index.js +2 -2
  43. package/dist/esm/Layout/style/index.js +1 -1
  44. package/dist/esm/Menu/style/index.js +2 -2
  45. package/dist/esm/MenuItem/style/index.js +3 -3
  46. package/dist/esm/NavBar/style/index.js +1 -1
  47. package/dist/esm/NoticeBar/style/index.js +2 -2
  48. package/dist/esm/NoticeBar.js +2 -2
  49. package/dist/esm/Notify/style/index.js +1 -1
  50. package/dist/esm/NumberKeyboard/style/index.js +1 -1
  51. package/dist/esm/Overlay/style/index.js +1 -1
  52. package/dist/esm/Pagination/style/index.js +1 -1
  53. package/dist/esm/Picker/style/index.js +2 -2
  54. package/dist/esm/Popover/style/index.js +2 -2
  55. package/dist/esm/Popup/style/index.js +3 -3
  56. package/dist/esm/Price/style/index.js +1 -1
  57. package/dist/esm/Progress/style/index.js +2 -2
  58. package/dist/esm/PullToRefresh/style/index.js +1 -1
  59. package/dist/esm/Radio/style/index.js +2 -2
  60. package/dist/esm/RadioGroup/style/index.js +1 -1
  61. package/dist/esm/Range/style/index.js +2 -2
  62. package/dist/esm/Rate/style/index.js +2 -2
  63. package/dist/esm/Rate.js +3 -3
  64. package/dist/esm/Row/style/index.js +1 -1
  65. package/dist/esm/SearchBar/style/index.js +1 -1
  66. package/dist/esm/ShortPassword/style/index.js +3 -3
  67. package/dist/esm/SideNavBar/style/index.js +1 -1
  68. package/dist/esm/SideNavBarItem/style/index.js +1 -1
  69. package/dist/esm/Signature/style/index.js +2 -2
  70. package/dist/esm/Skeleton/style/index.js +1 -1
  71. package/dist/esm/Step/style/index.js +2 -2
  72. package/dist/esm/Steps/style/index.js +1 -1
  73. package/dist/esm/SubSideNavBar/style/index.js +1 -1
  74. package/dist/esm/Swipe/style/index.js +1 -1
  75. package/dist/esm/Swiper/style/index.js +1 -1
  76. package/dist/esm/SwiperItem/style/index.js +1 -1
  77. package/dist/esm/Switch/style/index.js +1 -1
  78. package/dist/esm/TabPane/style/index.js +1 -1
  79. package/dist/esm/Tabbar/style/index.js +1 -1
  80. package/dist/esm/TabbarItem/style/index.js +2 -2
  81. package/dist/esm/Table/style/index.js +1 -1
  82. package/dist/esm/Tabs/style/index.js +2 -2
  83. package/dist/esm/Tag/style/index.js +2 -2
  84. package/dist/esm/TextArea/style/index.js +1 -1
  85. package/dist/esm/TimeDetail/style/index.js +1 -1
  86. package/dist/esm/TimePannel/style/index.js +1 -1
  87. package/dist/esm/TimeSelect/style/index.js +3 -3
  88. package/dist/esm/Toast/style/index.js +2 -2
  89. package/dist/esm/Uploader/style/index.js +2 -2
  90. package/dist/esm/Video/style/index.js +1 -1
  91. package/dist/esm/VirtualList/style/index.js +1 -1
  92. package/dist/esm/{actionsheet.taro-1b3e7972.js → actionsheet.taro-9d4ce0c8.js} +3 -2
  93. package/dist/esm/{fixednav.taro-6c0279ba.js → fixednav.taro-da09d1e7.js} +1 -8
  94. package/dist/esm/{noticebar.taro-f8bb6ae8.js → noticebar.taro-dcaf6497.js} +3 -5
  95. package/dist/esm/nutui-react.es.js +4 -4
  96. package/dist/esm/{rate.taro-bb2e6c87.js → rate.taro-6b1cbe5f.js} +14 -18
  97. package/dist/locales/base.js +1 -1
  98. package/dist/locales/en-US.js +1 -1
  99. package/dist/locales/id-ID.js +1 -1
  100. package/dist/locales/zh-CN.js +1 -1
  101. package/dist/locales/zh-TW.js +1 -1
  102. package/dist/nutui.react.es.js +17 -23
  103. package/dist/nutui.react.umd.js +17 -23
  104. package/dist/packages/icon/icon.scss +0 -1
  105. package/dist/style.es.js +1 -1
  106. package/dist/types/rate/rate.taro.d.ts +1 -1
  107. package/package.json +5 -3
@@ -1,2 +1,2 @@
1
1
 
2
- require('../../../packages/virtuallist/virtuallist.scss')
2
+ import '../../../packages/virtuallist/virtuallist.scss'
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["cancelTxt", "optionTag", "optionSubTag", "chooseTagValue", "title", "color", "description", "menuItems", "onCancel", "onChoose", "visible", "className", "style"];
3
+ var _excluded = ["children", "cancelTxt", "optionTag", "optionSubTag", "chooseTagValue", "title", "color", "description", "menuItems", "onCancel", "onChoose", "visible", "className", "style"];
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -27,6 +27,7 @@ var defaultProps = {
27
27
 
28
28
  var ActionSheet = function ActionSheet(props) {
29
29
  var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
30
+ children = _defaultProps$props.children,
30
31
  cancelTxt = _defaultProps$props.cancelTxt,
31
32
  optionTag = _defaultProps$props.optionTag,
32
33
  optionSubTag = _defaultProps$props.optionSubTag,
@@ -87,7 +88,7 @@ var ActionSheet = function ActionSheet(props) {
87
88
  }, item[optionTag], React__default.createElement("div", {
88
89
  className: "subdesc"
89
90
  }, item[optionSubTag]));
90
- })) : null, cancelTxt && React__default.createElement("div", {
91
+ })) : children, cancelTxt && React__default.createElement("div", {
91
92
  className: b('cancel'),
92
93
  onClick: function onClick() {
93
94
  return cancelActionSheet();
@@ -54,14 +54,7 @@ var FixedNav = function FixedNav(props) {
54
54
  var onUpdateValue = function onUpdateValue() {
55
55
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !visible;
56
56
  onChange(value);
57
- }; // const [classNames, setClassNames] = useState('')
58
- // const classes = () => {
59
- // return `${fixednavClass} ${type} ${visible ? 'active' : ''}`
60
- // }
61
- // useEffect(() => {
62
- // setClassNames(classes())
63
- // }, [visible])
64
-
57
+ };
65
58
 
66
59
  return React__default.createElement("div", _objectSpread({
67
60
  className: classes,
@@ -54,7 +54,7 @@ var NoticeBar = function NoticeBar(props) {
54
54
  click = _defaultProps$props.click;
55
55
 
56
56
  var wrap = useRef(null);
57
- var content = useRef(null); // const [scrollList,SetScrollList] = useState([])
57
+ var content = useRef(null);
58
58
 
59
59
  var _useState = useState(true),
60
60
  _useState2 = _slicedToArray(_useState, 2),
@@ -108,7 +108,6 @@ var NoticeBar = function NoticeBar(props) {
108
108
  isCanScroll = _useState20[0],
109
109
  SetIsCanScroll = _useState20[1];
110
110
 
111
- useState(0);
112
111
  useEffect(function () {
113
112
  if (direction === 'vertical') {
114
113
  if (children) {
@@ -234,7 +233,7 @@ var NoticeBar = function NoticeBar(props) {
234
233
 
235
234
  var startRollEasy = function startRollEasy() {
236
235
  showhorseLamp();
237
- var timerCurr = window.setInterval(showhorseLamp, ~~(height / speed / 4) * 1000 + Number(standTime));
236
+ var timerCurr = setInterval(showhorseLamp, ~~(height / speed / 4) * 1000 + Number(standTime));
238
237
  SetTimer(timerCurr);
239
238
  };
240
239
 
@@ -313,7 +312,6 @@ var NoticeBar = function NoticeBar(props) {
313
312
  };
314
313
 
315
314
  var contentStyle = {
316
- // paddingLeft: firstRound ? 0 : `${wrapWidth}px`,
317
315
  animationDelay: "".concat(firstRound ? delay : 0, "s"),
318
316
  animationDuration: "".concat(duration, "s"),
319
317
  transform: "translateX(".concat(firstRound ? 0 : "".concat(wrapWidth, "px"), ")")
@@ -357,7 +355,7 @@ var NoticeBar = function NoticeBar(props) {
357
355
  className: "wrap"
358
356
  }, React__default.createElement("div", {
359
357
  ref: content,
360
- className: "content ".concat(animationClass, " ").concat(isEllipsis() && 'nut-ellipsis'),
358
+ className: "content ".concat(animationClass, " ").concat(isEllipsis() ? 'nut-ellipsis' : ''),
361
359
  style: contentStyle,
362
360
  onAnimationEnd: onAnimationEnd
363
361
  }, children, text)), closeMode || rightIcon ? React__default.createElement("div", {
@@ -12,7 +12,7 @@ export { D as Divider } from './divider.taro-5236fe6a.js';
12
12
  export { G as Grid } from './grid.taro-5d75c0ad.js';
13
13
  export { G as GridItem } from './griditem.taro-edb212e3.js';
14
14
  export { N as NavBar } from './navbar.taro-2e969a0f.js';
15
- export { F as FixedNav } from './fixednav.taro-6c0279ba.js';
15
+ export { F as FixedNav } from './fixednav.taro-da09d1e7.js';
16
16
  export { T as Tabbar } from './tabbar.taro-da72fa2c.js';
17
17
  export { T as TabbarItem } from './tabbaritem.taro-d0f2cec9.js';
18
18
  export { E as Elevator } from './elevator.taro-8e385785.js';
@@ -34,7 +34,7 @@ export { I as InputNumber } from './inputnumber.taro-102203f3.js';
34
34
  export { I as Input } from './input.taro-505632ac.js';
35
35
  export { R as Radio } from './radio.taro-1c63512f.js';
36
36
  export { R as RadioGroup } from './radiogroup.taro-b5dad516.js';
37
- export { R as Rate } from './rate.taro-bb2e6c87.js';
37
+ export { R as Rate } from './rate.taro-6b1cbe5f.js';
38
38
  export { C as CalendarItem } from './calendaritem.taro-11333579.js';
39
39
  export { P as Picker } from './picker.taro-62ce13e0.js';
40
40
  export { S as ShortPassword } from './shortpassword.taro-2db97cc8.js';
@@ -43,7 +43,7 @@ export { U as Uploader } from './uploader.taro-b232b2d3.js';
43
43
  export { C as Cascader } from './cascader.taro-d7e71bdf.js';
44
44
  export { S as SearchBar } from './searchbar.taro-81867286.js';
45
45
  export { N as NumberKeyboard } from './numberkeyboard.taro-cf7d06f4.js';
46
- export { A as ActionSheet } from './actionsheet.taro-1b3e7972.js';
46
+ export { A as ActionSheet } from './actionsheet.taro-9d4ce0c8.js';
47
47
  export { B as BackTop } from './backtop.taro-eb9359e8.js';
48
48
  export { D as Drag } from './drag.taro-56e8c87a.js';
49
49
  export { D as Dialog } from './dialog.taro-0e53ade9.js';
@@ -54,7 +54,7 @@ export { T as Toast } from './toast.taro-d4ecd6af.js';
54
54
  export { S as Swipe } from './swipe.taro-dfb9a049.js';
55
55
  export { P as PullToRefresh } from './pulltorefresh.taro-8846f019.js';
56
56
  export { C as CircleProgress } from './circleprogress.taro-1a38e1c6.js';
57
- export { N as NoticeBar } from './noticebar.taro-f8bb6ae8.js';
57
+ export { N as NoticeBar } from './noticebar.taro-dcaf6497.js';
58
58
  export { S as Steps } from './steps.taro-943f4fbb.js';
59
59
  export { S as Step } from './step-9a048771.js';
60
60
  export { S as Swiper } from './swiper.taro-448cd0ad.js';
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
 
8
8
  import React__default, { useState, useEffect } from 'react';
9
9
  import { c as cn } from './bem-893ad28d.js';
10
- import { I as Icon } from './icon.taro-1d0d4fb7.js';
10
+ import { I as Icon } from './icon-8dc4de10.js';
11
11
  var defaultProps = {
12
12
  count: 5,
13
13
  modelValue: 0,
@@ -37,7 +37,7 @@ var Rate = function Rate(props) {
37
37
  readonly = _defaultProps$props.readonly,
38
38
  allowHalf = _defaultProps$props.allowHalf,
39
39
  spacing = _defaultProps$props.spacing,
40
- change = _defaultProps$props.change;
40
+ onChange = _defaultProps$props.onChange;
41
41
 
42
42
  var b = cn('rate');
43
43
  var bi = cn('rate-item');
@@ -76,20 +76,18 @@ var Rate = function Rate(props) {
76
76
  var value = 0;
77
77
  if (index === 1 && score === index) ;else {
78
78
  value = index;
79
-
80
- if (allowHalf) {
81
- var _e$target, _e$target$className;
82
-
83
- console.log('e', e);
84
-
85
- if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && (_e$target$className = _e$target.className) !== null && _e$target$className !== void 0 && _e$target$className.includes('__icon--half')) {
86
- value -= 0.5;
87
- }
88
- }
89
79
  }
90
80
  value = Math.max(value, Number(minimizeValue));
91
81
  setScore(value);
92
- change && change(value);
82
+ onChange && onChange(value);
83
+ };
84
+
85
+ var onHalfClick = function onHalfClick(event, n) {
86
+ event.preventDefault();
87
+ event.stopPropagation();
88
+ var value = Math.max(Number(minimizeValue), n - 0.5);
89
+ setScore(value);
90
+ onChange && onChange(value);
93
91
  };
94
92
 
95
93
  return React__default.createElement("div", {
@@ -110,15 +108,13 @@ var Rate = function Rate(props) {
110
108
  name: n <= score ? checkedIcon : uncheckedIcon,
111
109
  color: n <= score ? activeColor : voidColor
112
110
  }), allowHalf && score > n - 1 && React__default.createElement(Icon, {
111
+ onClick: function onClick(event) {
112
+ return onHalfClick(event, n);
113
+ },
113
114
  className: "".concat(bi('icon'), " ").concat(bi('icon--half')),
114
115
  color: n <= score ? activeColor : voidColor,
115
116
  size: iconSize,
116
117
  name: checkedIcon
117
- }), allowHalf && score < n - 1 && React__default.createElement(Icon, {
118
- className: "".concat(bi('icon'), " ").concat(bi('icon--disabled'), " ").concat(bi('icon--half')),
119
- color: voidColor,
120
- size: iconSize,
121
- name: uncheckedIcon
122
118
  }));
123
119
  }));
124
120
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:58 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:22:17 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:58 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:22:17 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:58 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:22:17 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:58 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:22:17 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:58 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:22:17 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:26 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:21:06 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -11914,7 +11914,7 @@ const Rate = (props) => {
11914
11914
  readonly,
11915
11915
  allowHalf,
11916
11916
  spacing,
11917
- change
11917
+ onChange
11918
11918
  } = { ...defaultProps$Q, ...props };
11919
11919
  const b2 = cn("rate");
11920
11920
  const bi = cn("rate-item");
@@ -11934,7 +11934,6 @@ const Rate = (props) => {
11934
11934
  return isNaN(Number(value)) ? String(value) : `${value}px`;
11935
11935
  };
11936
11936
  const onClick = (e2, index2) => {
11937
- var _a, _b;
11938
11937
  e2.preventDefault();
11939
11938
  e2.stopPropagation();
11940
11939
  if (disabled || readonly)
@@ -11944,16 +11943,17 @@ const Rate = (props) => {
11944
11943
  ;
11945
11944
  else {
11946
11945
  value = index2;
11947
- if (allowHalf) {
11948
- console.log("e", e2);
11949
- if ((_b = (_a = e2 == null ? void 0 : e2.target) == null ? void 0 : _a.className) == null ? void 0 : _b.includes("__icon--half")) {
11950
- value -= 0.5;
11951
- }
11952
- }
11953
11946
  }
11954
11947
  value = Math.max(value, Number(minimizeValue));
11955
11948
  setScore(value);
11956
- change && change(value);
11949
+ onChange && onChange(value);
11950
+ };
11951
+ const onHalfClick = (event, n2) => {
11952
+ event.preventDefault();
11953
+ event.stopPropagation();
11954
+ const value = Math.max(Number(minimizeValue), n2 - 0.5);
11955
+ setScore(value);
11956
+ onChange && onChange(value);
11957
11957
  };
11958
11958
  return /* @__PURE__ */ React__default.createElement("div", {
11959
11959
  className: b2()
@@ -11963,23 +11963,17 @@ const Rate = (props) => {
11963
11963
  key: n2,
11964
11964
  onClick: (event) => onClick(event, n2),
11965
11965
  style: { marginRight: pxCheck2(spacing) }
11966
- }, /* @__PURE__ */ React__default.createElement(Icon$1, {
11966
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
11967
11967
  size: iconSize,
11968
11968
  className: `${bi("icon")} ${disabled || n2 > score ? bi("icon--disabled") : ""}`,
11969
11969
  name: n2 <= score ? checkedIcon : uncheckedIcon,
11970
11970
  color: n2 <= score ? activeColor : voidColor
11971
- }), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon$1, {
11971
+ }), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
11972
+ onClick: (event) => onHalfClick(event, n2),
11972
11973
  className: `${bi("icon")} ${bi("icon--half")}`,
11973
11974
  color: n2 <= score ? activeColor : voidColor,
11974
11975
  size: iconSize,
11975
11976
  name: checkedIcon
11976
- }), allowHalf && score < n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon$1, {
11977
- className: `${bi("icon")} ${bi("icon--disabled")} ${bi(
11978
- "icon--half"
11979
- )}`,
11980
- color: voidColor,
11981
- size: iconSize,
11982
- name: uncheckedIcon
11983
11977
  }));
11984
11978
  }));
11985
11979
  };
@@ -13561,6 +13555,7 @@ const defaultProps$I = {
13561
13555
  };
13562
13556
  const ActionSheet = (props) => {
13563
13557
  const {
13558
+ children,
13564
13559
  cancelTxt,
13565
13560
  optionTag,
13566
13561
  optionSubTag,
@@ -13614,7 +13609,7 @@ const ActionSheet = (props) => {
13614
13609
  }, item[optionTag], /* @__PURE__ */ React__default.createElement("div", {
13615
13610
  className: "subdesc"
13616
13611
  }, item[optionSubTag]));
13617
- })) : null, cancelTxt && /* @__PURE__ */ React__default.createElement("div", {
13612
+ })) : children, cancelTxt && /* @__PURE__ */ React__default.createElement("div", {
13618
13613
  className: b2("cancel"),
13619
13614
  onClick: () => cancelActionSheet()
13620
13615
  }, cancelTxt)));
@@ -15295,7 +15290,6 @@ const NoticeBar = (props) => {
15295
15290
  const [distance, SetDistance] = useState(0);
15296
15291
  const [timer, SetTimer] = useState(0);
15297
15292
  const [isCanScroll, SetIsCanScroll] = useState(null);
15298
- useState(0);
15299
15293
  useEffect(() => {
15300
15294
  if (direction === "vertical") {
15301
15295
  if (children) {
@@ -15379,7 +15373,7 @@ const NoticeBar = (props) => {
15379
15373
  };
15380
15374
  const startRollEasy = () => {
15381
15375
  showhorseLamp();
15382
- const timerCurr = window.setInterval(
15376
+ const timerCurr = setInterval(
15383
15377
  showhorseLamp,
15384
15378
  ~~(height / speed / 4) * 1e3 + Number(standTime)
15385
15379
  );
@@ -15483,7 +15477,7 @@ const NoticeBar = (props) => {
15483
15477
  className: "wrap"
15484
15478
  }, /* @__PURE__ */ React__default.createElement("div", {
15485
15479
  ref: content,
15486
- className: `content ${animationClass} ${isEllipsis() && "nut-ellipsis"}`,
15480
+ className: `content ${animationClass} ${isEllipsis() ? "nut-ellipsis" : ""}`,
15487
15481
  style: contentStyle,
15488
15482
  onAnimationEnd
15489
15483
  }, children, text)), closeMode || rightIcon ? /* @__PURE__ */ React__default.createElement("div", {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:26 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:21:06 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -11941,7 +11941,7 @@
11941
11941
  readonly,
11942
11942
  allowHalf,
11943
11943
  spacing,
11944
- change
11944
+ onChange
11945
11945
  } = { ...defaultProps$Q, ...props };
11946
11946
  const b2 = cn("rate");
11947
11947
  const bi = cn("rate-item");
@@ -11961,7 +11961,6 @@
11961
11961
  return isNaN(Number(value)) ? String(value) : `${value}px`;
11962
11962
  };
11963
11963
  const onClick = (e2, index2) => {
11964
- var _a, _b;
11965
11964
  e2.preventDefault();
11966
11965
  e2.stopPropagation();
11967
11966
  if (disabled || readonly)
@@ -11971,16 +11970,17 @@
11971
11970
  ;
11972
11971
  else {
11973
11972
  value = index2;
11974
- if (allowHalf) {
11975
- console.log("e", e2);
11976
- if ((_b = (_a = e2 == null ? void 0 : e2.target) == null ? void 0 : _a.className) == null ? void 0 : _b.includes("__icon--half")) {
11977
- value -= 0.5;
11978
- }
11979
- }
11980
11973
  }
11981
11974
  value = Math.max(value, Number(minimizeValue));
11982
11975
  setScore(value);
11983
- change && change(value);
11976
+ onChange && onChange(value);
11977
+ };
11978
+ const onHalfClick = (event, n2) => {
11979
+ event.preventDefault();
11980
+ event.stopPropagation();
11981
+ const value = Math.max(Number(minimizeValue), n2 - 0.5);
11982
+ setScore(value);
11983
+ onChange && onChange(value);
11984
11984
  };
11985
11985
  return /* @__PURE__ */ React__default["default"].createElement("div", {
11986
11986
  className: b2()
@@ -11990,23 +11990,17 @@
11990
11990
  key: n2,
11991
11991
  onClick: (event) => onClick(event, n2),
11992
11992
  style: { marginRight: pxCheck2(spacing) }
11993
- }, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
11993
+ }, /* @__PURE__ */ React__default["default"].createElement(Icon, {
11994
11994
  size: iconSize,
11995
11995
  className: `${bi("icon")} ${disabled || n2 > score ? bi("icon--disabled") : ""}`,
11996
11996
  name: n2 <= score ? checkedIcon : uncheckedIcon,
11997
11997
  color: n2 <= score ? activeColor : voidColor
11998
- }), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
11998
+ }), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default["default"].createElement(Icon, {
11999
+ onClick: (event) => onHalfClick(event, n2),
11999
12000
  className: `${bi("icon")} ${bi("icon--half")}`,
12000
12001
  color: n2 <= score ? activeColor : voidColor,
12001
12002
  size: iconSize,
12002
12003
  name: checkedIcon
12003
- }), allowHalf && score < n2 - 1 && /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
12004
- className: `${bi("icon")} ${bi("icon--disabled")} ${bi(
12005
- "icon--half"
12006
- )}`,
12007
- color: voidColor,
12008
- size: iconSize,
12009
- name: uncheckedIcon
12010
12004
  }));
12011
12005
  }));
12012
12006
  };
@@ -13588,6 +13582,7 @@
13588
13582
  };
13589
13583
  const ActionSheet = (props) => {
13590
13584
  const {
13585
+ children,
13591
13586
  cancelTxt,
13592
13587
  optionTag,
13593
13588
  optionSubTag,
@@ -13641,7 +13636,7 @@
13641
13636
  }, item[optionTag], /* @__PURE__ */ React__default["default"].createElement("div", {
13642
13637
  className: "subdesc"
13643
13638
  }, item[optionSubTag]));
13644
- })) : null, cancelTxt && /* @__PURE__ */ React__default["default"].createElement("div", {
13639
+ })) : children, cancelTxt && /* @__PURE__ */ React__default["default"].createElement("div", {
13645
13640
  className: b2("cancel"),
13646
13641
  onClick: () => cancelActionSheet()
13647
13642
  }, cancelTxt)));
@@ -15322,7 +15317,6 @@
15322
15317
  const [distance, SetDistance] = React.useState(0);
15323
15318
  const [timer, SetTimer] = React.useState(0);
15324
15319
  const [isCanScroll, SetIsCanScroll] = React.useState(null);
15325
- React.useState(0);
15326
15320
  React.useEffect(() => {
15327
15321
  if (direction === "vertical") {
15328
15322
  if (children) {
@@ -15406,7 +15400,7 @@
15406
15400
  };
15407
15401
  const startRollEasy = () => {
15408
15402
  showhorseLamp();
15409
- const timerCurr = window.setInterval(
15403
+ const timerCurr = setInterval(
15410
15404
  showhorseLamp,
15411
15405
  ~~(height / speed / 4) * 1e3 + Number(standTime)
15412
15406
  );
@@ -15510,7 +15504,7 @@
15510
15504
  className: "wrap"
15511
15505
  }, /* @__PURE__ */ React__default["default"].createElement("div", {
15512
15506
  ref: content,
15513
- className: `content ${animationClass} ${isEllipsis() && "nut-ellipsis"}`,
15507
+ className: `content ${animationClass} ${isEllipsis() ? "nut-ellipsis" : ""}`,
15514
15508
  style: contentStyle,
15515
15509
  onAnimationEnd
15516
15510
  }, children, text)), closeMode || rightIcon ? /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -1,4 +1,3 @@
1
- @import '../../styles/font/iconfont.css';
2
1
  @import '../../styles/animation/icon.scss';
3
2
 
4
3
  .nut-icon {
package/dist/style.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.2 Wed Sep 07 2022 14:48:41 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.3-beta.0 Tue Sep 13 2022 09:21:42 GMT+0800 (China Standard Time)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -12,6 +12,6 @@ export interface RateProps {
12
12
  readonly: boolean;
13
13
  allowHalf: boolean;
14
14
  spacing: string | number;
15
- change: (val: number) => void;
15
+ onChange: (val: number) => void;
16
16
  }
17
17
  export declare const Rate: FunctionComponent<Partial<RateProps>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "1.3.2",
3
+ "version": "1.3.3-beta.0",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",
@@ -8,7 +8,8 @@
8
8
  "sideEffects": [
9
9
  "*.scss",
10
10
  "dist/esm/**/style/*",
11
- "dist/style.css"
11
+ "dist/style.css",
12
+ "dist/styles/font/*"
12
13
  ],
13
14
  "description": "京东风格的轻量级移动端 React 组件库",
14
15
  "keywords": [
@@ -62,6 +63,7 @@
62
63
  "checked:taro": "npm run generate:file:taro && tsc --project ./tsconfig.taro.json",
63
64
  "generate:file:taro:pages": "node scripts/taro/generate-taro-pages.js",
64
65
  "dev:taro:weapp": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:weapp",
66
+ "dev:taro:jd": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:jd",
65
67
  "replace:taro:types": "node scripts/taro/replace-taro-types-alias.js",
66
68
  "build:taro:types": "tsc && npm run replace:taro:types",
67
69
  "build:taro:es": "npx rollup -c rollup.config.taro.es.js",
@@ -152,7 +154,7 @@
152
154
  "shelljs": "^0.8.4",
153
155
  "ts-jest": "^27.1.4",
154
156
  "ts-node": "^10.7.0",
155
- "typescript": "^4.1.2",
157
+ "typescript": "4.5.5",
156
158
  "unist-util-visit": "^4.1.0",
157
159
  "vinyl-fs": "^3.0.3",
158
160
  "vite": "^2.1.5",