@nutui/nutui-react 3.0.17 → 3.0.19-beta.2

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 (241) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
  3. package/dist/cjs/hooks/use-ref-state.js +3 -3
  4. package/dist/cjs/hooks/use-touch.js +1 -2
  5. package/dist/cjs/locales/ja-JP.d.ts +3 -0
  6. package/dist/cjs/locales/ja-JP.js +168 -0
  7. package/dist/cjs/packages/address/address.js +3 -3
  8. package/dist/cjs/packages/address/utils.js +3 -3
  9. package/dist/cjs/packages/avatarcropper/avatarcropper.js +4 -7
  10. package/dist/cjs/packages/badge/style/badge.scss +1 -1
  11. package/dist/cjs/packages/badge/style/style.css +1 -1
  12. package/dist/cjs/packages/badge/style-jmapp/badge.scss +1 -1
  13. package/dist/cjs/packages/badge/style-jmapp/style.css +1 -1
  14. package/dist/cjs/packages/badge/style-jrkf/badge.scss +1 -1
  15. package/dist/cjs/packages/badge/style-jrkf/style.css +1 -1
  16. package/dist/cjs/packages/calendar/utils.js +8 -8
  17. package/dist/cjs/packages/calendarcard/icon.js +5 -5
  18. package/dist/cjs/packages/calendarcard/utils.js +6 -6
  19. package/dist/cjs/packages/cascader/cascader.js +12 -21
  20. package/dist/cjs/packages/cascader/utils.js +3 -3
  21. package/dist/cjs/packages/col/col.js +16 -11
  22. package/dist/cjs/packages/collapseitem/collapseitem.js +4 -7
  23. package/dist/cjs/packages/configprovider/configprovider.js +7 -7
  24. package/dist/cjs/packages/configprovider/index.js +6 -6
  25. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  26. package/dist/cjs/packages/countdown/countdown.js +1 -2
  27. package/dist/cjs/packages/countdown/style/countdown.scss +1 -1
  28. package/dist/cjs/packages/countdown/style/style.css +1 -1
  29. package/dist/cjs/packages/countdown/style-jmapp/countdown.scss +1 -1
  30. package/dist/cjs/packages/countdown/style-jmapp/style.css +1 -1
  31. package/dist/cjs/packages/countdown/style-jrkf/countdown.scss +1 -1
  32. package/dist/cjs/packages/countdown/style-jrkf/style.css +1 -1
  33. package/dist/cjs/packages/datepicker/datepicker.js +1 -1
  34. package/dist/cjs/packages/datepicker/utils.js +9 -9
  35. package/dist/cjs/packages/dialog/content.js +3 -3
  36. package/dist/cjs/packages/dialog/dialog.js +4 -7
  37. package/dist/cjs/packages/dialog/style/dialog.scss +9 -1
  38. package/dist/cjs/packages/dialog/style/style.css +8 -1
  39. package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +9 -1
  40. package/dist/cjs/packages/dialog/style-jmapp/style.css +8 -1
  41. package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +9 -1
  42. package/dist/cjs/packages/dialog/style-jrkf/style.css +8 -1
  43. package/dist/cjs/packages/elevator/elevator.js +3 -3
  44. package/dist/cjs/packages/form/index.js +0 -2
  45. package/dist/cjs/packages/form/useform.js +50 -57
  46. package/dist/cjs/packages/infiniteloading/infiniteloading.js +8 -14
  47. package/dist/cjs/packages/inputnumber/inputnumber.js +16 -28
  48. package/dist/cjs/packages/lottie/animation/dark/global.gif +0 -0
  49. package/dist/cjs/packages/lottie/animation/dark/global.json +0 -0
  50. package/dist/cjs/packages/lottie/animation/dark/loading.gif +0 -0
  51. package/dist/cjs/packages/lottie/animation/dark/loading.json +0 -0
  52. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  53. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  54. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  55. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  56. package/dist/cjs/packages/lottie/animation/light/global.gif +0 -0
  57. package/dist/cjs/packages/lottie/animation/light/global.json +0 -0
  58. package/dist/cjs/packages/lottie/animation/light/loading.gif +0 -0
  59. package/dist/cjs/packages/lottie/animation/light/loading.json +0 -0
  60. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  61. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.json +0 -0
  62. package/dist/cjs/packages/lottie/types.js +0 -2
  63. package/dist/cjs/packages/noticebar/style/noticebar.scss +6 -0
  64. package/dist/cjs/packages/noticebar/style/style.css +6 -0
  65. package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  66. package/dist/cjs/packages/noticebar/style-jmapp/style.css +6 -0
  67. package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  68. package/dist/cjs/packages/noticebar/style-jrkf/style.css +6 -0
  69. package/dist/cjs/packages/notify/notify.d.ts +1 -1
  70. package/dist/cjs/packages/notify/notify.js +5 -2
  71. package/dist/cjs/packages/nutui.react.build.js +105 -105
  72. package/dist/cjs/packages/nutui.react.js +105 -105
  73. package/dist/cjs/packages/overlay/overlay.js +3 -3
  74. package/dist/cjs/packages/pickerview/pickerview.js +1 -2
  75. package/dist/cjs/packages/pickerview/utils.js +3 -3
  76. package/dist/cjs/packages/popup/popup.d.ts +1 -1
  77. package/dist/cjs/packages/popup/popup.js +59 -4
  78. package/dist/cjs/packages/popup/style/popup.scss +0 -5
  79. package/dist/cjs/packages/popup/style/style.css +0 -3
  80. package/dist/cjs/packages/popup/style-jmapp/popup.scss +0 -5
  81. package/dist/cjs/packages/popup/style-jmapp/style.css +0 -3
  82. package/dist/cjs/packages/popup/style-jrkf/popup.scss +0 -5
  83. package/dist/cjs/packages/popup/style-jrkf/style.css +0 -3
  84. package/dist/cjs/packages/price/price.js +42 -14
  85. package/dist/cjs/packages/price/style/price.scss +3 -3
  86. package/dist/cjs/packages/price/style/style.css +3 -3
  87. package/dist/cjs/packages/price/style-jmapp/price.scss +3 -3
  88. package/dist/cjs/packages/price/style-jmapp/style.css +3 -3
  89. package/dist/cjs/packages/price/style-jrkf/price.scss +3 -3
  90. package/dist/cjs/packages/price/style-jrkf/style.css +3 -3
  91. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +41 -51
  92. package/dist/cjs/packages/radio/index.js +0 -2
  93. package/dist/cjs/packages/range/utils.js +3 -3
  94. package/dist/cjs/packages/rate/style/rate.scss +1 -1
  95. package/dist/cjs/packages/rate/style/style.css +1 -1
  96. package/dist/cjs/packages/rate/style-jmapp/rate.scss +1 -1
  97. package/dist/cjs/packages/rate/style-jmapp/style.css +1 -1
  98. package/dist/cjs/packages/rate/style-jrkf/rate.scss +1 -1
  99. package/dist/cjs/packages/rate/style-jrkf/style.css +1 -1
  100. package/dist/cjs/packages/searchbar/searchbar.js +3 -3
  101. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  102. package/dist/cjs/packages/skeleton/skeleton.js +2 -4
  103. package/dist/cjs/packages/swiper/effects/focus.js +4 -4
  104. package/dist/cjs/packages/swiper/index.js +0 -1
  105. package/dist/cjs/packages/switch/switch.js +4 -7
  106. package/dist/cjs/packages/uploader/uploader.js +31 -39
  107. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  108. package/dist/cjs/packages/watermark/watermark.js +4 -8
  109. package/dist/cjs/types/spec/address/base.js +0 -2
  110. package/dist/cjs/types/spec/avatar/taro.d.ts +7 -1
  111. package/dist/cjs/types/spec/popup/base.d.ts +5 -0
  112. package/dist/cjs/types/spec/price/base.d.ts +8 -2
  113. package/dist/cjs/types/spec/price/base.js +12 -0
  114. package/dist/cjs/types/spec/searchbar/h5.d.ts +2 -1
  115. package/dist/cjs/types/spec/searchbar/taro.d.ts +1 -0
  116. package/dist/cjs/utils/date.js +5 -5
  117. package/dist/cjs/utils/event-mocker.js +10 -18
  118. package/dist/cjs/utils/get-rect.js +4 -4
  119. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  120. package/dist/cjs/utils/merge-props.js +3 -3
  121. package/dist/cjs/utils/merge.js +6 -6
  122. package/dist/cjs/utils/raf.js +3 -3
  123. package/dist/cjs/utils/render.js +5 -9
  124. package/dist/cjs/utils/rubberband.js +3 -3
  125. package/dist/cjs/utils/taro/get-rect.d.ts +1 -0
  126. package/dist/cjs/utils/taro/get-rect.js +39 -13
  127. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  128. package/dist/cjs/utils/taro/platform.js +5 -5
  129. package/dist/es/hooks/use-touch.js +1 -1
  130. package/dist/es/locales/ja-JP.d.ts +3 -0
  131. package/dist/es/locales/ja-JP.js +158 -0
  132. package/dist/es/packages/avatarcropper/avatarcropper.js +4 -7
  133. package/dist/es/packages/badge/style/badge.scss +1 -1
  134. package/dist/es/packages/badge/style/style.css +1 -1
  135. package/dist/es/packages/badge/style-jmapp/badge.scss +1 -1
  136. package/dist/es/packages/badge/style-jmapp/style.css +1 -1
  137. package/dist/es/packages/badge/style-jrkf/badge.scss +1 -1
  138. package/dist/es/packages/badge/style-jrkf/style.css +1 -1
  139. package/dist/es/packages/cascader/cascader.js +12 -21
  140. package/dist/es/packages/col/col.js +17 -12
  141. package/dist/es/packages/collapseitem/collapseitem.js +4 -7
  142. package/dist/es/packages/configprovider/types.d.ts +1 -1
  143. package/dist/es/packages/countdown/countdown.js +1 -2
  144. package/dist/es/packages/countdown/style/countdown.scss +1 -1
  145. package/dist/es/packages/countdown/style/style.css +1 -1
  146. package/dist/es/packages/countdown/style-jmapp/countdown.scss +1 -1
  147. package/dist/es/packages/countdown/style-jmapp/style.css +1 -1
  148. package/dist/es/packages/countdown/style-jrkf/countdown.scss +1 -1
  149. package/dist/es/packages/countdown/style-jrkf/style.css +1 -1
  150. package/dist/es/packages/datepicker/datepicker.js +1 -1
  151. package/dist/es/packages/dialog/dialog.js +4 -7
  152. package/dist/es/packages/dialog/style/dialog.scss +9 -1
  153. package/dist/es/packages/dialog/style/style.css +8 -1
  154. package/dist/es/packages/dialog/style-jmapp/dialog.scss +9 -1
  155. package/dist/es/packages/dialog/style-jmapp/style.css +8 -1
  156. package/dist/es/packages/dialog/style-jrkf/dialog.scss +9 -1
  157. package/dist/es/packages/dialog/style-jrkf/style.css +8 -1
  158. package/dist/es/packages/form/index.js +0 -1
  159. package/dist/es/packages/form/useform.js +46 -53
  160. package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
  161. package/dist/es/packages/inputnumber/inputnumber.js +16 -28
  162. package/dist/es/packages/lottie/animation/dark/global.gif +0 -0
  163. package/dist/es/packages/lottie/animation/dark/global.json +0 -0
  164. package/dist/es/packages/lottie/animation/dark/loading.gif +0 -0
  165. package/dist/es/packages/lottie/animation/dark/loading.json +0 -0
  166. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  167. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  168. package/dist/es/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  169. package/dist/es/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  170. package/dist/es/packages/lottie/animation/light/global.gif +0 -0
  171. package/dist/es/packages/lottie/animation/light/global.json +0 -0
  172. package/dist/es/packages/lottie/animation/light/loading.gif +0 -0
  173. package/dist/es/packages/lottie/animation/light/loading.json +0 -0
  174. package/dist/es/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  175. package/dist/es/packages/lottie/animation/light/pulltorefresh.json +0 -0
  176. package/dist/es/packages/lottie/types.js +1 -1
  177. package/dist/es/packages/noticebar/style/noticebar.scss +6 -0
  178. package/dist/es/packages/noticebar/style/style.css +6 -0
  179. package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  180. package/dist/es/packages/noticebar/style-jmapp/style.css +6 -0
  181. package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  182. package/dist/es/packages/noticebar/style-jrkf/style.css +6 -0
  183. package/dist/es/packages/notify/notify.d.ts +1 -1
  184. package/dist/es/packages/notify/notify.js +5 -2
  185. package/dist/es/packages/pickerview/pickerview.js +1 -2
  186. package/dist/es/packages/popup/popup.d.ts +1 -1
  187. package/dist/es/packages/popup/popup.js +60 -5
  188. package/dist/es/packages/popup/style/popup.scss +0 -5
  189. package/dist/es/packages/popup/style/style.css +0 -3
  190. package/dist/es/packages/popup/style-jmapp/popup.scss +0 -5
  191. package/dist/es/packages/popup/style-jmapp/style.css +0 -3
  192. package/dist/es/packages/popup/style-jrkf/popup.scss +0 -5
  193. package/dist/es/packages/popup/style-jrkf/style.css +0 -3
  194. package/dist/es/packages/price/price.js +41 -14
  195. package/dist/es/packages/price/style/price.scss +3 -3
  196. package/dist/es/packages/price/style/style.css +3 -3
  197. package/dist/es/packages/price/style-jmapp/price.scss +3 -3
  198. package/dist/es/packages/price/style-jmapp/style.css +3 -3
  199. package/dist/es/packages/price/style-jrkf/price.scss +3 -3
  200. package/dist/es/packages/price/style-jrkf/style.css +3 -3
  201. package/dist/es/packages/pulltorefresh/pulltorefresh.js +41 -51
  202. package/dist/es/packages/radio/index.js +0 -1
  203. package/dist/es/packages/rate/style/rate.scss +1 -1
  204. package/dist/es/packages/rate/style/style.css +1 -1
  205. package/dist/es/packages/rate/style-jmapp/rate.scss +1 -1
  206. package/dist/es/packages/rate/style-jmapp/style.css +1 -1
  207. package/dist/es/packages/rate/style-jrkf/rate.scss +1 -1
  208. package/dist/es/packages/rate/style-jrkf/style.css +1 -1
  209. package/dist/es/packages/searchbar/searchbar.js +3 -3
  210. package/dist/es/packages/skeleton/skeleton.js +2 -4
  211. package/dist/es/packages/swiper/index.js +0 -1
  212. package/dist/es/packages/switch/switch.js +4 -7
  213. package/dist/es/packages/uploader/uploader.js +31 -39
  214. package/dist/es/packages/watermark/watermark.js +4 -8
  215. package/dist/es/types/spec/address/base.js +1 -1
  216. package/dist/es/types/spec/avatar/taro.d.ts +7 -1
  217. package/dist/es/types/spec/popup/base.d.ts +20 -0
  218. package/dist/es/types/spec/price/base.d.ts +10 -4
  219. package/dist/es/types/spec/price/base.js +6 -1
  220. package/dist/es/types/spec/searchbar/h5.d.ts +2 -1
  221. package/dist/es/types/spec/searchbar/taro.d.ts +1 -0
  222. package/dist/es/utils/event-mocker.js +4 -12
  223. package/dist/es/utils/render.js +2 -6
  224. package/dist/es/utils/taro/get-rect.d.ts +1 -0
  225. package/dist/es/utils/taro/get-rect.js +34 -10
  226. package/dist/nutui.react.umd.js +1521 -1500
  227. package/dist/style-jmapp.css +1 -1
  228. package/dist/style-jmapp.scss +46 -46
  229. package/dist/style-jrkf.css +1 -1
  230. package/dist/style-jrkf.scss +31 -31
  231. package/dist/style.css +1 -1
  232. package/dist/style.scss +38 -38
  233. package/dist/styles/jd-font.scss +4 -4
  234. package/dist/styles/theme-dark.scss +90 -56
  235. package/dist/styles/theme-default.scss +94 -60
  236. package/dist/styles/themes/dark.css +1 -1
  237. package/dist/styles/themes/default.css +1 -1
  238. package/dist/styles/variables-jmapp.scss +4 -0
  239. package/dist/styles/variables-jrkf.scss +4 -0
  240. package/dist/styles/variables.scss +4 -0
  241. package/package.json +1 -72
@@ -18,7 +18,7 @@
18
18
  font-weight: var(--nutui-countdown-font-weight, 400);
19
19
  font-size: var(--nutui-countdown-font-size, 14px);
20
20
  line-height: calc(var(--nutui-countdown-font-size, 14px) + 2px);
21
- font-family: "JD";
21
+ font-family: "JDZH-Regular";
22
22
  }
23
23
  .nut-countdown-number, .nut-countdown-number-primary {
24
24
  position: relative;
@@ -16,7 +16,7 @@
16
16
  font-weight: $coutdown-font-weight;
17
17
  font-size: $countdown-font-size;
18
18
  line-height: calc($countdown-font-size + 2px);
19
- font-family: 'JD';
19
+ font-family: 'JDZH-Regular';
20
20
  }
21
21
  &-number,
22
22
  &-number-primary {
@@ -18,7 +18,7 @@
18
18
  font-weight: var(--nutui-countdown-font-weight, 400);
19
19
  font-size: var(--nutui-countdown-font-size, 14px);
20
20
  line-height: calc(var(--nutui-countdown-font-size, 14px) + 2px);
21
- font-family: "JD";
21
+ font-family: "JDZH-Regular";
22
22
  }
23
23
  .nut-countdown-number, .nut-countdown-number-primary {
24
24
  position: relative;
@@ -149,7 +149,7 @@ var InternalPicker = function(props, ref) {
149
149
  return /*#__PURE__*/ React.createElement(React.Fragment, null, typeof children === 'function' && children(selectedDate), /*#__PURE__*/ React.createElement("div", _object_spread({
150
150
  className: cls,
151
151
  style: style
152
- }, rest), pickerOptions.length && /*#__PURE__*/ React.createElement(Picker, _object_spread_props(_object_spread({}, pickerProps), {
152
+ }, rest), pickerOptions.length > 0 && /*#__PURE__*/ React.createElement(Picker, _object_spread_props(_object_spread({}, pickerProps), {
153
153
  title: title,
154
154
  visible: innerVisible,
155
155
  value: pickerValue,
@@ -58,8 +58,8 @@ var BaseDialog = function(props, ref) {
58
58
  if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel())) return;
59
59
  onCancel();
60
60
  };
61
- var handleOk = /*#__PURE__*/ function() {
62
- var _ref = _async_to_generator(function(e) {
61
+ var handleOk = function(e) {
62
+ return _async_to_generator(function() {
63
63
  var e1;
64
64
  return _ts_generator(this, function(_state) {
65
65
  switch(_state.label){
@@ -99,11 +99,8 @@ var BaseDialog = function(props, ref) {
99
99
  ];
100
100
  }
101
101
  });
102
- });
103
- return function handleOk(e) {
104
- return _ref.apply(this, arguments);
105
- };
106
- }();
102
+ })();
103
+ };
107
104
  var btnClass = hideCancelButton || hideConfirmButton ? "".concat(classPrefix, "-footer-block") : '';
108
105
  var renderCancelOfVertical = function() {
109
106
  return !hideCancelButton && /*#__PURE__*/ React.createElement("div", {
@@ -16,7 +16,7 @@
16
16
  &-outer {
17
17
  position: fixed;
18
18
  max-height: 100%;
19
- background-color: $white;
19
+ background-color: $dialog-background;
20
20
  transition:
21
21
  transform 0.2s,
22
22
  -webkit-transform 0.2s;
@@ -128,12 +128,20 @@
128
128
  &-cancel.nut-dialog-footer-cancel {
129
129
  margin-right: $dialog-footer-cancel-margin-right;
130
130
  background: $dialog-footer-cancel-bg;
131
+ color: $button-default-color;
132
+ .nut-button-children {
133
+ color: $button-default-color;
134
+ }
131
135
  }
132
136
 
133
137
  &-ok {
134
138
  max-width: $dialog-footer-ok-max-width;
135
139
  font-weight: $font-weight-bold;
140
+ .nut-button-children {
141
+ font-weight: $font-weight-bold;
142
+ }
136
143
  }
144
+
137
145
  &-block {
138
146
  &.nut-button {
139
147
  min-width: 100%;
@@ -18,7 +18,7 @@
18
18
  .nut-dialog-outer {
19
19
  position: fixed;
20
20
  max-height: 100%;
21
- background-color: #ffffff;
21
+ background-color: var(--nutui-dialog-background, var(--nutui-color-background-overlay, #ffffff));
22
22
  transition: transform 0.2s, -webkit-transform 0.2s;
23
23
  -webkit-overflow-scrolling: touch;
24
24
  top: 50%;
@@ -119,11 +119,18 @@
119
119
  .nut-dialog-footer-cancel.nut-dialog-footer-cancel {
120
120
  margin-right: var(--nutui-dialog-footer-cancel-margin-right, 12px);
121
121
  background: var(--nutui-dialog-footer-cancel-bg, var(--nutui-button-default-background-color, transparent));
122
+ color: var(--nutui-button-default-color, var(--nutui-color-title, #1a1a1a));
123
+ }
124
+ .nut-dialog-footer-cancel.nut-dialog-footer-cancel .nut-button-children {
125
+ color: var(--nutui-button-default-color, var(--nutui-color-title, #1a1a1a));
122
126
  }
123
127
  .nut-dialog-footer-ok {
124
128
  max-width: var(--nutui-dialog-footer-ok-max-width, 128px);
125
129
  font-weight: var(--nutui-font-weight-bold, 600);
126
130
  }
131
+ .nut-dialog-footer-ok .nut-button-children {
132
+ font-weight: var(--nutui-font-weight-bold, 600);
133
+ }
127
134
  .nut-dialog-footer-block.nut-button {
128
135
  min-width: 100%;
129
136
  }
@@ -16,7 +16,7 @@
16
16
  &-outer {
17
17
  position: fixed;
18
18
  max-height: 100%;
19
- background-color: $white;
19
+ background-color: $dialog-background;
20
20
  transition:
21
21
  transform 0.2s,
22
22
  -webkit-transform 0.2s;
@@ -128,12 +128,20 @@
128
128
  &-cancel.nut-dialog-footer-cancel {
129
129
  margin-right: $dialog-footer-cancel-margin-right;
130
130
  background: $dialog-footer-cancel-bg;
131
+ color: $button-default-color;
132
+ .nut-button-children {
133
+ color: $button-default-color;
134
+ }
131
135
  }
132
136
 
133
137
  &-ok {
134
138
  max-width: $dialog-footer-ok-max-width;
135
139
  font-weight: $font-weight-bold;
140
+ .nut-button-children {
141
+ font-weight: $font-weight-bold;
142
+ }
136
143
  }
144
+
137
145
  &-block {
138
146
  &.nut-button {
139
147
  min-width: 100%;
@@ -18,7 +18,7 @@
18
18
  .nut-dialog-outer {
19
19
  position: fixed;
20
20
  max-height: 100%;
21
- background-color: #ffffff;
21
+ background-color: var(--nutui-dialog-background, var(--nutui-color-surface-2));
22
22
  transition: transform 0.2s, -webkit-transform 0.2s;
23
23
  -webkit-overflow-scrolling: touch;
24
24
  top: 50%;
@@ -119,11 +119,18 @@
119
119
  .nut-dialog-footer-cancel.nut-dialog-footer-cancel {
120
120
  margin-right: var(--nutui-dialog-footer-cancel-margin-right, 12px);
121
121
  background: var(--nutui-dialog-footer-cancel-bg, transparent);
122
+ color: var(--nutui-button-default-color, var(--nutui-color-text));
123
+ }
124
+ .nut-dialog-footer-cancel.nut-dialog-footer-cancel .nut-button-children {
125
+ color: var(--nutui-button-default-color, var(--nutui-color-text));
122
126
  }
123
127
  .nut-dialog-footer-ok {
124
128
  max-width: var(--nutui-dialog-footer-ok-max-width, 128px);
125
129
  font-weight: var(--nutui-font-weight-bold);
126
130
  }
131
+ .nut-dialog-footer-ok .nut-button-children {
132
+ font-weight: var(--nutui-font-weight-bold);
133
+ }
127
134
  .nut-dialog-footer-block.nut-button {
128
135
  min-width: 100%;
129
136
  }
@@ -16,7 +16,7 @@
16
16
  &-outer {
17
17
  position: fixed;
18
18
  max-height: 100%;
19
- background-color: $white;
19
+ background-color: $dialog-background;
20
20
  transition:
21
21
  transform 0.2s,
22
22
  -webkit-transform 0.2s;
@@ -128,12 +128,20 @@
128
128
  &-cancel.nut-dialog-footer-cancel {
129
129
  margin-right: $dialog-footer-cancel-margin-right;
130
130
  background: $dialog-footer-cancel-bg;
131
+ color: $button-default-color;
132
+ .nut-button-children {
133
+ color: $button-default-color;
134
+ }
131
135
  }
132
136
 
133
137
  &-ok {
134
138
  max-width: $dialog-footer-ok-max-width;
135
139
  font-weight: $font-weight-bold;
140
+ .nut-button-children {
141
+ font-weight: $font-weight-bold;
142
+ }
136
143
  }
144
+
137
145
  &-block {
138
146
  &.nut-button {
139
147
  min-width: 100%;
@@ -18,7 +18,7 @@
18
18
  .nut-dialog-outer {
19
19
  position: fixed;
20
20
  max-height: 100%;
21
- background-color: #ffffff;
21
+ background-color: var(--nutui-dialog-background, var(--nutui-color-surface-2));
22
22
  transition: transform 0.2s, -webkit-transform 0.2s;
23
23
  -webkit-overflow-scrolling: touch;
24
24
  top: 50%;
@@ -119,11 +119,18 @@
119
119
  .nut-dialog-footer-cancel.nut-dialog-footer-cancel {
120
120
  margin-right: var(--nutui-dialog-footer-cancel-margin-right, 12px);
121
121
  background: var(--nutui-dialog-footer-cancel-bg, var(--nutui-button-default-background-color, var(--nutui-color-default)));
122
+ color: var(--nutui-button-default-color, var(--nutui-color-text));
123
+ }
124
+ .nut-dialog-footer-cancel.nut-dialog-footer-cancel .nut-button-children {
125
+ color: var(--nutui-button-default-color, var(--nutui-color-text));
122
126
  }
123
127
  .nut-dialog-footer-ok {
124
128
  max-width: var(--nutui-dialog-footer-ok-max-width, 128px);
125
129
  font-weight: var(--nutui-font-weight-bold);
126
130
  }
131
+ .nut-dialog-footer-ok .nut-button-children {
132
+ font-weight: var(--nutui-font-weight-bold);
133
+ }
127
134
  .nut-dialog-footer-block.nut-button {
128
135
  min-width: 100%;
129
136
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Form } from "./form";
3
2
  import { FormItem } from "../formitem/formitem";
4
3
  import { useForm, useWatch } from "./useform";
@@ -18,7 +18,6 @@ export var SECRET = 'NUT_FORM_INTERNAL';
18
18
  var _this = this;
19
19
  var _this1 = this;
20
20
  _class_call_check(this, FormStore);
21
- var _this2 = this;
22
21
  // 初始化数据
23
22
  _define_property(this, "initialValues", {});
24
23
  _define_property(this, "updateList", []);
@@ -106,8 +105,8 @@ export var SECRET = 'NUT_FORM_INTERNAL';
106
105
  _define_property(this, "setCallback", function(callback) {
107
106
  _this.callbacks = _object_spread({}, _this.callbacks, callback);
108
107
  });
109
- _define_property(this, "validateEntities", /*#__PURE__*/ function() {
110
- var _ref = _async_to_generator(function(entity, errs) {
108
+ _define_property(this, "validateEntities", function(entity, errs) {
109
+ return _async_to_generator(function() {
111
110
  var _entity_props, name, _entity_props_rules, rules, descriptor, validator, _this_store, param, errors, _errs;
112
111
  return _ts_generator(this, function(_state) {
113
112
  switch(_state.label){
@@ -142,7 +141,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
142
141
  ]);
143
142
  return [
144
143
  4,
145
- validator.validate(_define_property({}, name, (_this_store = _this2.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
144
+ validator.validate(_define_property({}, name, (_this_store = this.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
146
145
  ];
147
146
  case 2:
148
147
  _state.sent();
@@ -156,7 +155,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
156
155
  if (errors) {
157
156
  ;
158
157
  (_errs = errs).push.apply(_errs, _to_consumable_array(errors));
159
- _this2.errors[name] = errors;
158
+ this.errors[name] = errors;
160
159
  }
161
160
  return [
162
161
  3,
@@ -164,7 +163,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
164
163
  ];
165
164
  case 4:
166
165
  if (!errs || errs.length === 0) {
167
- _this2.errors[name] = [];
166
+ this.errors[name] = [];
168
167
  }
169
168
  return [
170
169
  7
@@ -176,23 +175,21 @@ export var SECRET = 'NUT_FORM_INTERNAL';
176
175
  ];
177
176
  }
178
177
  });
179
- });
180
- return function(entity, errs) {
181
- return _ref.apply(this, arguments);
182
- };
183
- }());
184
- _define_property(this, "validateFields", /*#__PURE__*/ function() {
185
- var _ref = _async_to_generator(function(nameList) {
186
- var filterEntities, errs;
178
+ }).call(_this);
179
+ });
180
+ _define_property(this, "validateFields", function(nameList) {
181
+ return _async_to_generator(function() {
182
+ var _this, filterEntities, errs;
187
183
  return _ts_generator(this, function(_state) {
188
184
  switch(_state.label){
189
185
  case 0:
186
+ _this = this;
190
187
  filterEntities = [];
191
188
  // this.errors.length = 0
192
189
  if (!nameList || nameList.length === 0) {
193
- filterEntities = _this2.fieldEntities;
190
+ filterEntities = this.fieldEntities;
194
191
  } else {
195
- filterEntities = _this2.fieldEntities.filter(function(param) {
192
+ filterEntities = this.fieldEntities.filter(function(param) {
196
193
  var name = param.props.name;
197
194
  return nameList.includes(name);
198
195
  });
@@ -200,14 +197,14 @@ export var SECRET = 'NUT_FORM_INTERNAL';
200
197
  errs = [];
201
198
  return [
202
199
  4,
203
- Promise.all(filterEntities.map(/*#__PURE__*/ function() {
204
- var _ref = _async_to_generator(function(entity) {
200
+ Promise.all(filterEntities.map(function(entity) {
201
+ return _async_to_generator(function() {
205
202
  return _ts_generator(this, function(_state) {
206
203
  switch(_state.label){
207
204
  case 0:
208
205
  return [
209
206
  4,
210
- _this2.validateEntities(entity, errs)
207
+ this.validateEntities(entity, errs)
211
208
  ];
212
209
  case 1:
213
210
  _state.sent();
@@ -216,11 +213,8 @@ export var SECRET = 'NUT_FORM_INTERNAL';
216
213
  ];
217
214
  }
218
215
  });
219
- });
220
- return function(entity) {
221
- return _ref.apply(this, arguments);
222
- };
223
- }()))
216
+ }).call(_this);
217
+ }))
224
218
  ];
225
219
  case 1:
226
220
  _state.sent();
@@ -230,35 +224,34 @@ export var SECRET = 'NUT_FORM_INTERNAL';
230
224
  ];
231
225
  }
232
226
  });
233
- });
234
- return function(nameList) {
235
- return _ref.apply(this, arguments);
236
- };
237
- }());
238
- _define_property(this, "submit", /*#__PURE__*/ _async_to_generator(function() {
239
- var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
240
- return _ts_generator(this, function(_state) {
241
- switch(_state.label){
242
- case 0:
243
- return [
244
- 4,
245
- _this2.validateFields()
246
- ];
247
- case 1:
248
- errors = _state.sent();
249
- if (errors.length === 0) {
250
- ;
251
- (_this_callbacks_onFinish = (_this_callbacks = _this2.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, _this2.store);
252
- } else if (errors.length > 0) {
253
- ;
254
- (_this_callbacks_onFinishFailed = (_this_callbacks1 = _this2.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, _this2.store, errors);
255
- }
256
- return [
257
- 2
258
- ];
259
- }
260
- });
261
- }));
227
+ }).call(_this);
228
+ });
229
+ _define_property(this, "submit", function() {
230
+ return _async_to_generator(function() {
231
+ var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
232
+ return _ts_generator(this, function(_state) {
233
+ switch(_state.label){
234
+ case 0:
235
+ return [
236
+ 4,
237
+ this.validateFields()
238
+ ];
239
+ case 1:
240
+ errors = _state.sent();
241
+ if (errors.length === 0) {
242
+ ;
243
+ (_this_callbacks_onFinish = (_this_callbacks = this.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, this.store);
244
+ } else if (errors.length > 0) {
245
+ ;
246
+ (_this_callbacks_onFinishFailed = (_this_callbacks1 = this.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, this.store, errors);
247
+ }
248
+ return [
249
+ 2
250
+ ];
251
+ }
252
+ });
253
+ }).call(_this);
254
+ });
262
255
  _define_property(this, "resetFields", function(namePaths) {
263
256
  if (namePaths && namePaths.length) {
264
257
  namePaths.forEach(function(path) {
@@ -88,8 +88,8 @@ export var InfiniteLoading = function(props) {
88
88
  transition: isTouching.current ? "height 0s cubic-bezier(0.25,0.1,0.25,1)" : "height 0.2s cubic-bezier(0.25,0.1,0.25,1)"
89
89
  };
90
90
  };
91
- var handleScroll = /*#__PURE__*/ function() {
92
- var _ref = _async_to_generator(function() {
91
+ var handleScroll = function() {
92
+ return _async_to_generator(function() {
93
93
  return _ts_generator(this, function(_state) {
94
94
  switch(_state.label){
95
95
  case 0:
@@ -111,11 +111,8 @@ export var InfiniteLoading = function(props) {
111
111
  ];
112
112
  }
113
113
  });
114
- });
115
- return function handleScroll() {
116
- return _ref.apply(this, arguments);
117
- };
118
- }();
114
+ })();
115
+ };
119
116
  var infiniteDone = function() {
120
117
  setIsInfiniting(false);
121
118
  };
@@ -151,8 +148,8 @@ export var InfiniteLoading = function(props) {
151
148
  isTouching.current = false;
152
149
  }
153
150
  };
154
- var touchEnd = /*#__PURE__*/ function() {
155
- var _ref = _async_to_generator(function() {
151
+ var touchEnd = function() {
152
+ return _async_to_generator(function() {
156
153
  return _ts_generator(this, function(_state) {
157
154
  switch(_state.label){
158
155
  case 0:
@@ -182,11 +179,8 @@ export var InfiniteLoading = function(props) {
182
179
  ];
183
180
  }
184
181
  });
185
- });
186
- return function touchEnd() {
187
- return _ref.apply(this, arguments);
188
- };
189
- }();
182
+ })();
183
+ };
190
184
  var getWindowScrollTop = function() {
191
185
  return window.scrollY !== undefined ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
192
186
  };
@@ -93,8 +93,8 @@ export var InputNumber = function(props) {
93
93
  var stepAmount = parseFloat(stepValue) * symbol;
94
94
  return (currentValue * dig + stepAmount * dig) / dig;
95
95
  };
96
- var update = /*#__PURE__*/ function() {
97
- var _ref = _async_to_generator(function(negative, e) {
96
+ var update = function(negative, e) {
97
+ return _async_to_generator(function() {
98
98
  var shouldOverBoundary, maybeResume, nextValue;
99
99
  return _ts_generator(this, function(_state) {
100
100
  switch(_state.label){
@@ -125,13 +125,10 @@ export var InputNumber = function(props) {
125
125
  ];
126
126
  }
127
127
  });
128
- });
129
- return function update(negative, e) {
130
- return _ref.apply(this, arguments);
131
- };
132
- }();
133
- var handleReduce = /*#__PURE__*/ function() {
134
- var _ref = _async_to_generator(function(e) {
128
+ })();
129
+ };
130
+ var handleReduce = function(e) {
131
+ return _async_to_generator(function() {
135
132
  return _ts_generator(this, function(_state) {
136
133
  switch(_state.label){
137
134
  case 0:
@@ -149,13 +146,10 @@ export var InputNumber = function(props) {
149
146
  ];
150
147
  }
151
148
  });
152
- });
153
- return function handleReduce(e) {
154
- return _ref.apply(this, arguments);
155
- };
156
- }();
157
- var handlePlus = /*#__PURE__*/ function() {
158
- var _ref = _async_to_generator(function(e) {
149
+ })();
150
+ };
151
+ var handlePlus = function(e) {
152
+ return _async_to_generator(function() {
159
153
  return _ts_generator(this, function(_state) {
160
154
  switch(_state.label){
161
155
  case 0:
@@ -173,18 +167,15 @@ export var InputNumber = function(props) {
173
167
  ];
174
168
  }
175
169
  });
176
- });
177
- return function handlePlus(e) {
178
- return _ref.apply(this, arguments);
179
- };
180
- }();
170
+ })();
171
+ };
181
172
  var parseValue = function(text) {
182
173
  if (text === '') return null;
183
174
  if (text === '-') return null;
184
175
  return text;
185
176
  };
186
- var handleInputChange = /*#__PURE__*/ function() {
187
- var _ref = _async_to_generator(function(e) {
177
+ var handleInputChange = function(e) {
178
+ return _async_to_generator(function() {
188
179
  var valueStr, maybeResume;
189
180
  return _ts_generator(this, function(_state) {
190
181
  switch(_state.label){
@@ -213,11 +204,8 @@ export var InputNumber = function(props) {
213
204
  ];
214
205
  }
215
206
  });
216
- });
217
- return function handleInputChange(e) {
218
- return _ref.apply(this, arguments);
219
- };
220
- }();
207
+ })();
208
+ };
221
209
  var handleFocus = function(e) {
222
210
  setFocused(true);
223
211
  setInputValue(shadowValue !== undefined && shadowValue !== null ? bound(Number(shadowValue), Number(min), Number(max)).toString() : '');
File without changes
@@ -1 +1 @@
1
- import React from "react";
1
+ export { };
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;