@nutui/nutui-react-taro 3.0.19-cpp.5 → 3.0.19-cpp.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 (56) hide show
  1. package/dist/cjs/packages/address/style/style.harmony.css +0 -1
  2. package/dist/cjs/packages/cascader/style/style.harmony.css +0 -1
  3. package/dist/cjs/packages/input/style/input.scss +0 -1
  4. package/dist/cjs/packages/input/style/style.css +0 -1
  5. package/dist/cjs/packages/input/style/style.harmony.css +0 -1
  6. package/dist/cjs/packages/input/style-jmapp/input.scss +0 -1
  7. package/dist/cjs/packages/input/style-jmapp/style.css +0 -1
  8. package/dist/cjs/packages/input/style-jrkf/input.scss +0 -1
  9. package/dist/cjs/packages/input/style-jrkf/style.css +0 -1
  10. package/dist/cjs/packages/noticebar/noticebar.js +44 -38
  11. package/dist/cjs/packages/tabs/style/style.css +0 -1
  12. package/dist/cjs/packages/tabs/style/style.harmony.css +0 -1
  13. package/dist/cjs/packages/tabs/style/tabs.scss +1 -1
  14. package/dist/cjs/packages/tabs/style-jmapp/style.css +0 -1
  15. package/dist/cjs/packages/tabs/style-jmapp/tabs.scss +1 -1
  16. package/dist/cjs/packages/tabs/style-jrkf/style.css +0 -1
  17. package/dist/cjs/packages/tabs/style-jrkf/tabs.scss +1 -1
  18. package/dist/cjs/packages/textarea/style/style.css +0 -1
  19. package/dist/cjs/packages/textarea/style/style.harmony.css +0 -1
  20. package/dist/cjs/packages/textarea/style/textarea.scss +1 -1
  21. package/dist/cjs/packages/textarea/style-jmapp/style.css +0 -1
  22. package/dist/cjs/packages/textarea/style-jmapp/textarea.scss +1 -1
  23. package/dist/cjs/packages/textarea/style-jrkf/style.css +0 -1
  24. package/dist/cjs/packages/textarea/style-jrkf/textarea.scss +1 -1
  25. package/dist/es/packages/address/style/style.harmony.css +0 -1
  26. package/dist/es/packages/cascader/style/style.harmony.css +0 -1
  27. package/dist/es/packages/input/style/input.scss +0 -1
  28. package/dist/es/packages/input/style/style.css +0 -1
  29. package/dist/es/packages/input/style/style.harmony.css +0 -1
  30. package/dist/es/packages/input/style-jmapp/input.scss +0 -1
  31. package/dist/es/packages/input/style-jmapp/style.css +0 -1
  32. package/dist/es/packages/input/style-jrkf/input.scss +0 -1
  33. package/dist/es/packages/input/style-jrkf/style.css +0 -1
  34. package/dist/es/packages/noticebar/noticebar.js +77 -75
  35. package/dist/es/packages/tabs/style/style.css +0 -1
  36. package/dist/es/packages/tabs/style/style.harmony.css +0 -1
  37. package/dist/es/packages/tabs/style/tabs.scss +1 -1
  38. package/dist/es/packages/tabs/style-jmapp/style.css +0 -1
  39. package/dist/es/packages/tabs/style-jmapp/tabs.scss +1 -1
  40. package/dist/es/packages/tabs/style-jrkf/style.css +0 -1
  41. package/dist/es/packages/tabs/style-jrkf/tabs.scss +1 -1
  42. package/dist/es/packages/textarea/style/style.css +0 -1
  43. package/dist/es/packages/textarea/style/style.harmony.css +0 -1
  44. package/dist/es/packages/textarea/style/textarea.scss +1 -1
  45. package/dist/es/packages/textarea/style-jmapp/style.css +0 -1
  46. package/dist/es/packages/textarea/style-jmapp/textarea.scss +1 -1
  47. package/dist/es/packages/textarea/style-jrkf/style.css +0 -1
  48. package/dist/es/packages/textarea/style-jrkf/textarea.scss +1 -1
  49. package/dist/nutui.react.umd.js +51 -47
  50. package/dist/style-jmapp.css +1 -1
  51. package/dist/style-jmapp.scss +34 -34
  52. package/dist/style-jrkf.css +1 -1
  53. package/dist/style-jrkf.scss +30 -30
  54. package/dist/style.css +1 -1
  55. package/dist/style.scss +36 -36
  56. package/package.json +1 -1
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 44px);
53
- line-height: var(--nutui-tabs-titles-height, 44px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -65,7 +65,6 @@
65
65
  flex: 1 0 auto;
66
66
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
67
67
  height: var(--nutui-tabs-titles-height, 44px);
68
- line-height: var(--nutui-tabs-titles-height, 44px);
69
68
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
70
69
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
71
70
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 32px);
53
- line-height: var(--nutui-tabs-titles-height, 32px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-text));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 32px);
53
- line-height: var(--nutui-tabs-titles-height, 32px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-text));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-size-base, 14px);
25
- line-height: var(--nutui-font-size-base, 14px);
26
25
  margin-top: var(--nutui-spacing-base, 8px);
27
26
  color: var(--nutui-color-text-help, #888b94);
28
27
  }
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-size-base, 14px);
25
- line-height: var(--nutui-font-size-base, 14px);
26
25
  margin-top: var(--nutui-spacing-base, 8px);
27
26
  color: var(--nutui-color-text-help, #888b94);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-text);
25
- line-height: var(--nutui-font-text);
26
25
  margin-top: var(--nutui-spacing-base);
27
26
  color: var(--nutui-color-text-help);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-text);
25
- line-height: var(--nutui-font-text);
26
25
  margin-top: var(--nutui-spacing-base);
27
26
  color: var(--nutui-color-text-help);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -15803,7 +15803,7 @@
15803
15803
  var classPrefix2 = "nut-noticebar";
15804
15804
  var wrapRef = React.useRef(null);
15805
15805
  var contentRef = React.useRef(null);
15806
- var _useState = _sliced_to_array(React.useState(true), 2), showNoticeBar = _useState[0], SetShowNoticeBar = _useState[1];
15806
+ var _useState = _sliced_to_array(React.useState(true), 2), showNoticeBar = _useState[0], setShowNoticeBar = _useState[1];
15807
15807
  var scrollList = React.useRef([]);
15808
15808
  var _useState1 = _sliced_to_array(React.useState(0), 2), wrapWidth = _useState1[0], SetWrapWidth = _useState1[1];
15809
15809
  var _useState2 = _sliced_to_array(React.useState(true), 2), firstRound = _useState2[0], SetFirstRound = _useState2[1];
@@ -15935,12 +15935,6 @@
15935
15935
  click && click(event);
15936
15936
  onClick && onClick(event);
15937
15937
  };
15938
- var onClickIcon = function(event) {
15939
- event.stopPropagation();
15940
- SetShowNoticeBar(!closeable);
15941
- close2 && close2(event);
15942
- onClose && onClose(event);
15943
- };
15944
15938
  var onAnimationEnd = function() {
15945
15939
  SetFirstRound(false);
15946
15940
  setTimeout(function() {
@@ -15963,12 +15957,16 @@
15963
15957
  SetAnimate(false);
15964
15958
  }, time2);
15965
15959
  };
15966
- var handleClickIcon = function(event) {
15960
+ var handleClickIcon = React.useCallback(function(event) {
15967
15961
  event.stopPropagation();
15968
- SetShowNoticeBar(!closeable);
15962
+ setShowNoticeBar(!closeable);
15969
15963
  close2 && close2(event);
15970
15964
  onClose && onClose(event);
15971
- };
15965
+ }, [
15966
+ close2,
15967
+ onClose,
15968
+ closeable
15969
+ ]);
15972
15970
  var isEllipsis = function() {
15973
15971
  if (isCanScroll == null && align === "left") {
15974
15972
  return wrap;
@@ -16107,10 +16105,11 @@
16107
16105
  target.style.transform = "translate3D(0,".concat(_offset, "px,0)");
16108
16106
  };
16109
16107
  var itemStyle = function(index2) {
16110
- var style2 = {};
16108
+ var style2 = {
16109
+ width: "100%"
16110
+ };
16111
16111
  if (height2) {
16112
16112
  style2.height = "".concat(height2, "px");
16113
- style2.lineHeight = "".concat(height2, "px");
16114
16113
  }
16115
16114
  var offset2 = childOffset[index2];
16116
16115
  if (offset2) {
@@ -16174,6 +16173,32 @@
16174
16173
  container.current = ref;
16175
16174
  setIsContainerReady(true);
16176
16175
  }, []);
16176
+ var renderLeftIcon = React.useCallback(function() {
16177
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, leftIcon ? /* @__PURE__ */ React.createElement(components.View, {
16178
+ className: "nut-noticebar-box-left-icon"
16179
+ }, leftIcon) : null);
16180
+ }, [
16181
+ leftIcon
16182
+ ]);
16183
+ var renderRight = React.useCallback(function() {
16184
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, right2 ? /* @__PURE__ */ React.createElement(components.View, {
16185
+ className: "nut-noticebar-box-right"
16186
+ }, right2) : null);
16187
+ }, [
16188
+ right2
16189
+ ]);
16190
+ var renderRightIcon = React.useCallback(function() {
16191
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, rightIcon || closeable ? /* @__PURE__ */ React.createElement(components.View, {
16192
+ className: "nut-noticebar-box-right-icon",
16193
+ onClick: handleClickIcon
16194
+ }, rightIcon || /* @__PURE__ */ React.createElement(IconSVG$p, {
16195
+ size: 12
16196
+ })) : null);
16197
+ }, [
16198
+ rightIcon,
16199
+ closeable,
16200
+ handleClickIcon
16201
+ ]);
16177
16202
  return /* @__PURE__ */ React.createElement(components.View, {
16178
16203
  className: cls,
16179
16204
  style
@@ -16181,9 +16206,7 @@
16181
16206
  className: noticebarClass,
16182
16207
  style: barStyle,
16183
16208
  onClick: handleClick
16184
- }, leftIcon ? /* @__PURE__ */ React.createElement(components.View, {
16185
- className: "nut-noticebar-box-left-icon"
16186
- }, leftIcon) : null, /* @__PURE__ */ React.createElement(components.View, {
16209
+ }, renderLeftIcon(), /* @__PURE__ */ React.createElement(components.View, {
16187
16210
  ref: wrapRef,
16188
16211
  className: "nut-noticebar-box-wrap"
16189
16212
  }, /* @__PURE__ */ React.createElement(components.View, {
@@ -16191,21 +16214,12 @@
16191
16214
  className: "nut-noticebar-box-wrap-content ".concat(animationClass, " ").concat(isEllipsis() ? "nut-ellipsis" : ""),
16192
16215
  style: contentStyle,
16193
16216
  onAnimationEnd
16194
- }, children, content2)), right2 ? /* @__PURE__ */ React.createElement(components.View, {
16195
- className: "nut-noticebar-box-right"
16196
- }, right2) : null, closeable || rightIcon ? /* @__PURE__ */ React.createElement(components.View, {
16197
- className: "nut-noticebar-box-right-icon",
16198
- onClick: onClickIcon
16199
- }, rightIcon || /* @__PURE__ */ React.createElement(IconSVG$p, {
16200
- size: 12
16201
- })) : null) : null, showNoticeBar && hasVerticalContent && isVertical ? /* @__PURE__ */ React.createElement(components.View, {
16217
+ }, children, content2)), renderRight(), renderRightIcon()) : null, showNoticeBar && hasVerticalContent && isVertical ? /* @__PURE__ */ React.createElement(components.View, {
16202
16218
  className: "nut-noticebar-vertical",
16203
16219
  style: barStyle,
16204
16220
  ref: containerRefCallback,
16205
16221
  onClick: handleClick
16206
- }, leftIcon ? /* @__PURE__ */ React.createElement(components.View, {
16207
- className: "nut-noticebar-box-left-icon"
16208
- }, leftIcon) : null, children ? /* @__PURE__ */ React.createElement(components.View, {
16222
+ }, renderLeftIcon(), children ? /* @__PURE__ */ React.createElement(components.View, {
16209
16223
  className: "nut-noticebar-box-wrap",
16210
16224
  ref: innerRef
16211
16225
  }, scrollList.current.map(function(item, index2) {
@@ -16220,27 +16234,17 @@
16220
16234
  className: "nut-noticebar-box-horseLamp-list",
16221
16235
  style: horseLampStyle
16222
16236
  }, scrollList.current.map(function(item, index2) {
16223
- return (
16224
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
16225
- /* @__PURE__ */ React.createElement(components.View, {
16226
- className: "nut-noticebar-box-horseLamp-list-item",
16227
- style: {
16228
- height: height2
16229
- },
16230
- key: index2,
16231
- onClick: function(e) {
16232
- handleItemClick(e, item);
16233
- }
16234
- }, item)
16235
- );
16236
- })), /* @__PURE__ */ React.createElement(components.View, {
16237
- className: "nut-noticebar-box-right-icon",
16238
- onClick: function(e) {
16239
- handleClickIcon(e);
16240
- }
16241
- }, rightIcon || (closeable ? /* @__PURE__ */ React.createElement(IconSVG$p, {
16242
- size: 12
16243
- }) : null))) : null);
16237
+ return /* @__PURE__ */ React.createElement(components.View, {
16238
+ className: "nut-noticebar-box-horseLamp-list-item",
16239
+ style: {
16240
+ height: height2
16241
+ },
16242
+ key: index2,
16243
+ onClick: function(e) {
16244
+ handleItemClick(e, item);
16245
+ }
16246
+ }, item);
16247
+ })), renderRight(), renderRightIcon()) : null);
16244
16248
  };
16245
16249
  NoticeBar.displayName = "NutNoticeBar";
16246
16250
  var defaultProps$B = _object_spread_props(_object_spread({}, ComponentDefaults), {