@nutui/nutui-react-taro 3.0.0-beta.12 → 3.0.0-beta.14

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 (253) hide show
  1. package/dist/cjs/{utils → hooks}/use-click-away.js +2 -2
  2. package/dist/cjs/{utils → hooks}/use-isomprphic-layout-effect.js +1 -1
  3. package/dist/cjs/{utils → hooks}/use-lock-scroll.js +2 -2
  4. package/dist/cjs/packages/address/address.d.ts +1 -1
  5. package/dist/cjs/packages/address/address.js +1 -1
  6. package/dist/cjs/packages/animate/animate.js +5 -6
  7. package/dist/cjs/packages/animate/style/animate.scss +63 -105
  8. package/dist/cjs/packages/animate/style/style.css +45 -44
  9. package/dist/cjs/packages/animate/style/style.harmony.css +45 -44
  10. package/dist/cjs/packages/avatarcropper/avatarcropper.js +3 -2
  11. package/dist/cjs/packages/badge/badge.js +10 -11
  12. package/dist/cjs/packages/calendar/style/calendar.scss +25 -31
  13. package/dist/cjs/packages/calendar/style/style.css +14 -20
  14. package/dist/cjs/packages/calendar/style/style.harmony.css +14 -20
  15. package/dist/cjs/packages/calendarcard/calendarcard.js +1 -1
  16. package/dist/cjs/packages/calendaritem/calendaritem.js +1 -2
  17. package/dist/cjs/packages/cascader/cascader.js +1 -1
  18. package/dist/cjs/packages/checkbox/checkbox.js +1 -1
  19. package/dist/cjs/packages/checkboxgroup/checkboxgroup.js +1 -1
  20. package/dist/cjs/packages/circleprogress/circleprogress.js +1 -1
  21. package/dist/cjs/packages/collapse/collapse.js +1 -1
  22. package/dist/cjs/packages/configprovider/configprovider.js +1 -1
  23. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  24. package/dist/cjs/packages/datepicker/datepicker.js +1 -1
  25. package/dist/cjs/packages/datepicker/style/style.css +2 -2
  26. package/dist/cjs/packages/dialog/dialog.js +2 -2
  27. package/dist/cjs/packages/drag/drag.js +3 -2
  28. package/dist/cjs/packages/elevator/elevator.js +1 -1
  29. package/dist/cjs/packages/imagepreview/imagepreview.js +1 -1
  30. package/dist/cjs/packages/input/input.js +1 -1
  31. package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
  32. package/dist/cjs/packages/lottie/mp.js +3 -2
  33. package/dist/cjs/packages/menuitem/menuitem.js +5 -4
  34. package/dist/cjs/packages/notify/notify.js +1 -1
  35. package/dist/cjs/packages/nutui.react.build.d.ts +3 -1
  36. package/dist/cjs/packages/nutui.react.build.js +122 -118
  37. package/dist/cjs/packages/nutui.react.d.ts +4 -1
  38. package/dist/cjs/packages/nutui.react.js +123 -118
  39. package/dist/cjs/packages/nutui.react.scss.d.ts +1 -0
  40. package/dist/cjs/packages/nutui.react.scss.js +1 -0
  41. package/dist/cjs/packages/overlay/overlay.js +1 -1
  42. package/dist/cjs/packages/pagination/pagination.js +1 -1
  43. package/dist/cjs/packages/picker/picker.js +2 -2
  44. package/dist/cjs/packages/picker/pickerpanel.js +1 -1
  45. package/dist/cjs/packages/picker/style/style.css +2 -2
  46. package/dist/cjs/packages/picker/style/style.harmony.css +2 -2
  47. package/dist/cjs/packages/pickerview/index.d.ts +3 -0
  48. package/dist/cjs/packages/pickerview/index.js +13 -0
  49. package/dist/cjs/packages/pickerview/pickerroller.d.ts +7 -0
  50. package/dist/cjs/packages/pickerview/pickerroller.js +186 -0
  51. package/dist/cjs/packages/pickerview/pickerview.d.ts +4 -0
  52. package/dist/cjs/packages/pickerview/pickerview.js +201 -0
  53. package/dist/cjs/packages/pickerview/style/css.js +1 -0
  54. package/dist/cjs/packages/pickerview/style/index.js +1 -0
  55. package/dist/cjs/packages/pickerview/style/pickerview.scss +79 -0
  56. package/dist/cjs/packages/pickerview/style/style.css +73 -0
  57. package/dist/cjs/packages/pickerview/style/style.harmony.css +83 -0
  58. package/dist/cjs/packages/pickerview/types.d.ts +32 -0
  59. package/dist/cjs/packages/pickerview/types.js +4 -0
  60. package/dist/cjs/packages/pickerview/utils.d.ts +14 -0
  61. package/dist/cjs/packages/pickerview/utils.js +46 -0
  62. package/dist/cjs/packages/popover/popover.d.ts +2 -2
  63. package/dist/cjs/packages/popover/popover.js +1 -1
  64. package/dist/cjs/packages/popover/types.d.ts +3 -2
  65. package/dist/cjs/packages/popup/popup.js +1 -1
  66. package/dist/cjs/packages/progress/progress.js +1 -1
  67. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +3 -2
  68. package/dist/cjs/packages/radio/radio.js +1 -1
  69. package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
  70. package/dist/cjs/packages/range/range.js +2 -2
  71. package/dist/cjs/packages/rate/rate.js +2 -2
  72. package/dist/cjs/packages/segmented/segmented.js +1 -1
  73. package/dist/cjs/packages/shortpassword/shortpassword.js +1 -1
  74. package/dist/cjs/packages/sidebar/sidebar.js +3 -3
  75. package/dist/cjs/packages/sticky/sticky.js +3 -2
  76. package/dist/cjs/packages/swipe/swipe.js +2 -2
  77. package/dist/cjs/packages/switch/switch.js +1 -1
  78. package/dist/cjs/packages/tabbar/style/style.css +2 -9
  79. package/dist/cjs/packages/tabbar/tabbar.js +1 -1
  80. package/dist/cjs/packages/tabbaritem/style/style.css +2 -9
  81. package/dist/cjs/packages/tabbaritem/style/style.harmony.css +1 -1
  82. package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +2 -10
  83. package/dist/cjs/packages/tabbaritem/tabbaritem.js +9 -11
  84. package/dist/cjs/packages/table/table.js +1 -1
  85. package/dist/cjs/packages/tabs/tabs.js +3 -3
  86. package/dist/cjs/packages/textarea/textarea.d.ts +3 -3
  87. package/dist/cjs/packages/textarea/textarea.js +19 -22
  88. package/dist/cjs/packages/toast/toast.js +2 -2
  89. package/dist/cjs/packages/tour/tour.d.ts +1 -1
  90. package/dist/cjs/packages/tour/tour.js +1 -1
  91. package/dist/cjs/packages/uploader/types.d.ts +2 -1
  92. package/dist/cjs/packages/uploader/uploader.js +1 -1
  93. package/dist/cjs/packages/virtuallist/virtuallist.js +2 -2
  94. package/dist/cjs/utils/get-rect-by-taro.js +1 -1
  95. package/dist/cjs/utils/get-system-info.d.ts +19 -0
  96. package/dist/cjs/utils/get-system-info.js +32 -0
  97. package/dist/es/{utils → hooks}/use-click-away.js +3 -2
  98. package/dist/es/{utils → hooks}/use-isomprphic-layout-effect.js +1 -1
  99. package/dist/es/{utils → hooks}/use-lock-scroll.js +2 -2
  100. package/dist/es/packages/address/address.d.ts +1 -1
  101. package/dist/es/packages/address/address.js +1 -1
  102. package/dist/es/packages/animate/animate.js +5 -6
  103. package/dist/es/packages/animate/style/animate.scss +63 -105
  104. package/dist/es/packages/animate/style/style.css +45 -44
  105. package/dist/es/packages/animate/style/style.harmony.css +45 -44
  106. package/dist/es/packages/audio/audio.d.ts +30 -10
  107. package/dist/es/packages/avatarcropper/avatarcropper.js +3 -2
  108. package/dist/es/packages/badge/badge.js +10 -11
  109. package/dist/es/packages/calendar/calendar.d.ts +27 -135
  110. package/dist/es/packages/calendar/style/calendar.scss +25 -31
  111. package/dist/es/packages/calendar/style/style.css +14 -20
  112. package/dist/es/packages/calendar/style/style.harmony.css +14 -20
  113. package/dist/es/packages/calendarcard/calendarcard.js +1 -1
  114. package/dist/es/packages/calendaritem/calendaritem.js +1 -2
  115. package/dist/es/packages/cascader/cascader.js +1 -1
  116. package/dist/es/packages/checkbox/checkbox.js +1 -1
  117. package/dist/es/packages/checkboxgroup/checkboxgroup.js +1 -1
  118. package/dist/es/packages/circleprogress/circleprogress.d.ts +1 -1
  119. package/dist/es/packages/circleprogress/circleprogress.js +1 -1
  120. package/dist/es/packages/collapse/collapse.js +1 -1
  121. package/dist/es/packages/configprovider/configprovider.js +1 -1
  122. package/dist/es/packages/configprovider/types.d.ts +1 -1
  123. package/dist/es/packages/datepicker/datepicker.js +1 -1
  124. package/dist/es/packages/datepicker/style/style.css +2 -2
  125. package/dist/es/packages/dialog/dialog.js +2 -2
  126. package/dist/es/packages/drag/drag.js +4 -3
  127. package/dist/es/packages/elevator/elevator.js +1 -1
  128. package/dist/es/packages/form/form.d.ts +1 -1
  129. package/dist/es/packages/imagepreview/imagepreview.js +1 -1
  130. package/dist/es/packages/input/input.js +1 -1
  131. package/dist/es/packages/inputnumber/inputnumber.js +1 -1
  132. package/dist/es/packages/lottie/mp.js +4 -3
  133. package/dist/es/packages/menuitem/menuitem.js +6 -5
  134. package/dist/es/packages/noticebar/noticebar.d.ts +1 -1
  135. package/dist/es/packages/notify/notify.js +1 -1
  136. package/dist/es/packages/nutui.react.build.d.ts +3 -1
  137. package/dist/es/packages/nutui.react.build.js +3 -1
  138. package/dist/es/packages/overlay/overlay.js +1 -1
  139. package/dist/es/packages/pagination/pagination.js +1 -1
  140. package/dist/es/packages/picker/picker.js +2 -2
  141. package/dist/es/packages/picker/pickerpanel.js +1 -1
  142. package/dist/es/packages/picker/style/style.css +2 -2
  143. package/dist/es/packages/picker/style/style.harmony.css +2 -2
  144. package/dist/es/packages/pickerview/index.d.ts +3 -0
  145. package/dist/es/packages/pickerview/index.js +2 -0
  146. package/dist/es/packages/pickerview/pickerroller.d.ts +7 -0
  147. package/dist/es/packages/pickerview/pickerroller.js +175 -0
  148. package/dist/es/packages/pickerview/pickerview.d.ts +4 -0
  149. package/dist/es/packages/pickerview/pickerview.js +189 -0
  150. package/dist/es/packages/pickerview/style/css.js +1 -0
  151. package/dist/es/packages/pickerview/style/index.js +1 -0
  152. package/dist/es/packages/pickerview/style/pickerview.scss +79 -0
  153. package/dist/es/packages/pickerview/style/style.css +73 -0
  154. package/dist/es/packages/pickerview/style/style.harmony.css +83 -0
  155. package/dist/es/packages/pickerview/types.d.ts +32 -0
  156. package/dist/es/packages/pickerview/types.js +1 -0
  157. package/dist/es/packages/pickerview/utils.d.ts +14 -0
  158. package/dist/es/packages/pickerview/utils.js +28 -0
  159. package/dist/es/packages/popover/popover.d.ts +2 -2
  160. package/dist/es/packages/popover/popover.js +1 -1
  161. package/dist/es/packages/popover/types.d.ts +3 -2
  162. package/dist/es/packages/popup/popup.js +1 -1
  163. package/dist/es/packages/progress/progress.js +1 -1
  164. package/dist/es/packages/pulltorefresh/pulltorefresh.js +3 -2
  165. package/dist/es/packages/radio/radio.js +1 -1
  166. package/dist/es/packages/radiogroup/radiogroup.js +1 -1
  167. package/dist/es/packages/range/range.js +2 -2
  168. package/dist/es/packages/rate/rate.js +2 -2
  169. package/dist/es/packages/segmented/segmented.js +1 -1
  170. package/dist/es/packages/shortpassword/shortpassword.js +1 -1
  171. package/dist/es/packages/sidebar/sidebar.js +3 -3
  172. package/dist/es/packages/sticky/sticky.js +4 -3
  173. package/dist/es/packages/swipe/swipe.js +2 -2
  174. package/dist/es/packages/switch/switch.js +1 -1
  175. package/dist/es/packages/tabbar/style/style.css +2 -9
  176. package/dist/es/packages/tabbar/tabbar.js +1 -1
  177. package/dist/es/packages/tabbaritem/style/style.css +2 -9
  178. package/dist/es/packages/tabbaritem/style/style.harmony.css +1 -1
  179. package/dist/es/packages/tabbaritem/style/tabbaritem.scss +2 -10
  180. package/dist/es/packages/tabbaritem/tabbaritem.js +9 -11
  181. package/dist/es/packages/table/table.js +1 -1
  182. package/dist/es/packages/tabs/tabs.js +3 -3
  183. package/dist/es/packages/textarea/textarea.d.ts +3 -3
  184. package/dist/es/packages/textarea/textarea.js +20 -23
  185. package/dist/es/packages/toast/toast.js +2 -2
  186. package/dist/es/packages/tour/tour.d.ts +1 -1
  187. package/dist/es/packages/tour/tour.js +1 -1
  188. package/dist/es/packages/uploader/types.d.ts +2 -1
  189. package/dist/es/packages/uploader/uploader.js +1 -1
  190. package/dist/es/packages/virtuallist/virtuallist.d.ts +1 -1
  191. package/dist/es/packages/virtuallist/virtuallist.js +2 -2
  192. package/dist/es/utils/get-rect-by-taro.js +1 -1
  193. package/dist/es/utils/get-system-info.d.ts +19 -0
  194. package/dist/es/utils/get-system-info.js +19 -0
  195. package/dist/nutui.react.umd.js +529 -172
  196. package/dist/style.css +1 -1
  197. package/dist/style.scss +24 -23
  198. package/dist/styles/variables.scss +3 -1
  199. package/package.json +1 -80
  200. /package/dist/cjs/{utils → hooks}/use-click-away.d.ts +0 -0
  201. /package/dist/cjs/{utils → hooks}/use-client-rect.d.ts +0 -0
  202. /package/dist/cjs/{utils → hooks}/use-client-rect.js +0 -0
  203. /package/dist/cjs/{utils → hooks}/use-custom-event.d.ts +0 -0
  204. /package/dist/cjs/{utils → hooks}/use-custom-event.js +0 -0
  205. /package/dist/cjs/{utils → hooks}/use-force-update.d.ts +0 -0
  206. /package/dist/cjs/{utils → hooks}/use-force-update.js +0 -0
  207. /package/dist/cjs/{utils → hooks}/use-isomprphic-layout-effect.d.ts +0 -0
  208. /package/dist/cjs/{utils → hooks}/use-lock-scoll-taro.d.ts +0 -0
  209. /package/dist/cjs/{utils → hooks}/use-lock-scoll-taro.js +0 -0
  210. /package/dist/cjs/{utils → hooks}/use-lock-scroll.d.ts +0 -0
  211. /package/dist/cjs/{utils → hooks}/use-memo.d.ts +0 -0
  212. /package/dist/cjs/{utils → hooks}/use-memo.js +0 -0
  213. /package/dist/cjs/{utils → hooks}/use-props-value.d.ts +0 -0
  214. /package/dist/cjs/{utils → hooks}/use-props-value.js +0 -0
  215. /package/dist/cjs/{utils → hooks}/use-ref-state.d.ts +0 -0
  216. /package/dist/cjs/{utils → hooks}/use-ref-state.js +0 -0
  217. /package/dist/cjs/{utils → hooks}/use-refs.d.ts +0 -0
  218. /package/dist/cjs/{utils → hooks}/use-refs.js +0 -0
  219. /package/dist/cjs/{utils → hooks}/use-taro-rect.d.ts +0 -0
  220. /package/dist/cjs/{utils → hooks}/use-taro-rect.js +0 -0
  221. /package/dist/cjs/{utils → hooks}/use-touch.d.ts +0 -0
  222. /package/dist/cjs/{utils → hooks}/use-touch.js +0 -0
  223. /package/dist/cjs/{utils → hooks}/use-uuid.d.ts +0 -0
  224. /package/dist/cjs/{utils → hooks}/use-uuid.js +0 -0
  225. /package/dist/cjs/{utils → hooks}/use-watch.d.ts +0 -0
  226. /package/dist/cjs/{utils → hooks}/use-watch.js +0 -0
  227. /package/dist/es/{utils → hooks}/use-click-away.d.ts +0 -0
  228. /package/dist/es/{utils → hooks}/use-client-rect.d.ts +0 -0
  229. /package/dist/es/{utils → hooks}/use-client-rect.js +0 -0
  230. /package/dist/es/{utils → hooks}/use-custom-event.d.ts +0 -0
  231. /package/dist/es/{utils → hooks}/use-custom-event.js +0 -0
  232. /package/dist/es/{utils → hooks}/use-force-update.d.ts +0 -0
  233. /package/dist/es/{utils → hooks}/use-force-update.js +0 -0
  234. /package/dist/es/{utils → hooks}/use-isomprphic-layout-effect.d.ts +0 -0
  235. /package/dist/es/{utils → hooks}/use-lock-scoll-taro.d.ts +0 -0
  236. /package/dist/es/{utils → hooks}/use-lock-scoll-taro.js +0 -0
  237. /package/dist/es/{utils → hooks}/use-lock-scroll.d.ts +0 -0
  238. /package/dist/es/{utils → hooks}/use-memo.d.ts +0 -0
  239. /package/dist/es/{utils → hooks}/use-memo.js +0 -0
  240. /package/dist/es/{utils → hooks}/use-props-value.d.ts +0 -0
  241. /package/dist/es/{utils → hooks}/use-props-value.js +0 -0
  242. /package/dist/es/{utils → hooks}/use-ref-state.d.ts +0 -0
  243. /package/dist/es/{utils → hooks}/use-ref-state.js +0 -0
  244. /package/dist/es/{utils → hooks}/use-refs.d.ts +0 -0
  245. /package/dist/es/{utils → hooks}/use-refs.js +0 -0
  246. /package/dist/es/{utils → hooks}/use-taro-rect.d.ts +0 -0
  247. /package/dist/es/{utils → hooks}/use-taro-rect.js +0 -0
  248. /package/dist/es/{utils → hooks}/use-touch.d.ts +0 -0
  249. /package/dist/es/{utils → hooks}/use-touch.js +0 -0
  250. /package/dist/es/{utils → hooks}/use-uuid.d.ts +0 -0
  251. /package/dist/es/{utils → hooks}/use-uuid.js +0 -0
  252. /package/dist/es/{utils → hooks}/use-watch.d.ts +0 -0
  253. /package/dist/es/{utils → hooks}/use-watch.js +0 -0
@@ -3,16 +3,22 @@
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
5
  .nut-animate {
6
- /* Animation css */
6
+ /* Animation CSS */
7
+ /* Slide Animations */
8
+ /* Shake Animation */
9
+ /* Ripple Animation */
10
+ /* Breath Animation */
11
+ /* Twinkle Animation */
12
+ /* Flicker Animation */
13
+ /* Jump Animation */
14
+ /* Float Animation */
15
+ /* Loop Animation */
7
16
  }
8
17
  .nut-animate [class*=nut-animate-] {
9
18
  animation-duration: 0.5s;
10
19
  animation-timing-function: ease-out;
11
20
  animation-fill-mode: both;
12
21
  }
13
- .nut-animate .nut-animate-slide-right {
14
- animation-name: slide-right;
15
- }
16
22
  @keyframes slide-right {
17
23
  0% {
18
24
  opacity: 0;
@@ -23,9 +29,6 @@
23
29
  transform: translateX(0);
24
30
  }
25
31
  }
26
- .nut-animate .nut-animate-slide-left {
27
- animation-name: slide-left;
28
- }
29
32
  @keyframes slide-left {
30
33
  0% {
31
34
  opacity: 0;
@@ -36,9 +39,6 @@
36
39
  transform: translateX(0);
37
40
  }
38
41
  }
39
- .nut-animate .nut-animate-slide-top {
40
- animation-name: slide-top;
41
- }
42
42
  @keyframes slide-top {
43
43
  0% {
44
44
  opacity: 0;
@@ -49,9 +49,6 @@
49
49
  transform: translateY(0);
50
50
  }
51
51
  }
52
- .nut-animate .nut-animate-slide-bottom {
53
- animation-name: slide-bottom;
54
- }
55
52
  @keyframes slide-bottom {
56
53
  0% {
57
54
  opacity: 0;
@@ -62,8 +59,17 @@
62
59
  transform: translateY(0);
63
60
  }
64
61
  }
65
- .nut-animate .nut-animate-shake {
66
- animation-name: shake;
62
+ .nut-animate .nut-animate-slide-right {
63
+ animation-name: slide-right;
64
+ }
65
+ .nut-animate .nut-animate-slide-left {
66
+ animation-name: slide-left;
67
+ }
68
+ .nut-animate .nut-animate-slide-top {
69
+ animation-name: slide-top;
70
+ }
71
+ .nut-animate .nut-animate-slide-bottom {
72
+ animation-name: slide-bottom;
67
73
  }
68
74
  @keyframes shake {
69
75
  0%, 100% {
@@ -97,8 +103,8 @@
97
103
  transform: translateX(-1px);
98
104
  }
99
105
  }
100
- .nut-animate .nut-animate-ripple {
101
- animation-name: ripple;
106
+ .nut-animate .nut-animate-shake {
107
+ animation-name: shake;
102
108
  }
103
109
  @keyframes ripple {
104
110
  0% {
@@ -108,22 +114,22 @@
108
114
  transform: scale(1.1);
109
115
  }
110
116
  }
111
- .nut-animate .nut-animate-breath {
112
- animation-name: breath;
113
- animation-duration: 2700ms;
114
- animation-timing-function: ease-in-out;
115
- animation-direction: alternate;
117
+ .nut-animate .nut-animate-ripple {
118
+ animation-name: ripple;
116
119
  }
117
120
  @keyframes breath {
118
- 0% {
121
+ 0%, 100% {
119
122
  transform: scale(1);
120
123
  }
121
124
  50% {
122
125
  transform: scale(1.1);
123
126
  }
124
- 100% {
125
- transform: scale(1);
126
- }
127
+ }
128
+ .nut-animate .nut-animate-breath {
129
+ animation-name: breath;
130
+ animation-duration: 2700ms;
131
+ animation-timing-function: ease-in-out;
132
+ animation-direction: alternate;
127
133
  }
128
134
  .nut-animate .nut-animate-twinkle {
129
135
  position: relative;
@@ -137,7 +143,7 @@
137
143
  position: absolute;
138
144
  border-radius: 30px;
139
145
  right: 50%;
140
- margin-top: -15px;
146
+ margin-top: -30px;
141
147
  margin-right: -30px;
142
148
  z-index: 1;
143
149
  transform: scale(0);
@@ -183,39 +189,30 @@
183
189
  transform: translateX(150px) skewX(-20deg);
184
190
  }
185
191
  }
186
- .nut-animate .nut-animate-jump {
187
- transform-origin: center center;
188
- animation: jump 0.7s linear;
189
- }
190
192
  @keyframes jump {
191
193
  0% {
192
- animation-timing-function: ease-in;
193
- transform: rotate(0deg) translateY(0);
194
+ transform: rotate(0) translateY(0);
194
195
  }
195
196
  25% {
196
- animation-timing-function: ease-out;
197
197
  transform: rotate(10deg) translateY(20px);
198
198
  }
199
199
  50% {
200
- animation-timing-function: ease-in;
201
- transform: rotate(0deg) translateY(-10px);
200
+ transform: rotate(0) translateY(-10px);
202
201
  }
203
202
  75% {
204
- animation-timing-function: ease-out;
205
203
  transform: rotate(-10deg) translateY(20px);
206
204
  }
207
205
  100% {
208
- animation-timing-function: ease-in;
209
- transform: rotate(0deg) translateY(0);
206
+ transform: rotate(0) translateY(0);
210
207
  }
211
208
  }
212
- .nut-animate .nut-animate-float {
213
- position: relative;
214
- animation-name: float-pop;
209
+ .nut-animate .nut-animate-jump {
210
+ transform-origin: center center;
211
+ animation: jump 0.7s linear;
215
212
  }
216
213
  @keyframes float-pop {
217
214
  0% {
218
- top: 0px;
215
+ top: 0;
219
216
  }
220
217
  25% {
221
218
  top: 1px;
@@ -227,9 +224,13 @@
227
224
  top: 1px;
228
225
  }
229
226
  100% {
230
- top: 0px;
227
+ top: 0;
231
228
  }
232
229
  }
230
+ .nut-animate .nut-animate-float {
231
+ position: relative;
232
+ animation-name: float-pop;
233
+ }
233
234
  .nut-animate .loop {
234
235
  animation-iteration-count: infinite;
235
236
  }
@@ -2,9 +2,21 @@ import React, { CSSProperties, FunctionComponent } from 'react';
2
2
  import { InnerAudioContext } from '@tarojs/taro';
3
3
  import { BasicComponent } from "../../utils/typings";
4
4
  export interface AudioProps extends BasicComponent {
5
- className?: string;
6
- style?: CSSProperties;
7
- url: string;
5
+ /**
6
+ * 类名
7
+ * @default -
8
+ */
9
+ className?: string
10
+ /**
11
+ * css样式
12
+ * @default {}
13
+ */
14
+ style?: CSSProperties
15
+ /**
16
+ * 语音资源链接
17
+ * @default -
18
+ */
19
+ url: string
8
20
  autoplay?: boolean;
9
21
  /**
10
22
  * 是否循环播放
@@ -13,25 +25,33 @@ export interface AudioProps extends BasicComponent {
13
25
  loop?: boolean
14
26
  /**
15
27
  * 展示形式,可选值:controls 控制面板 progress 进度条 icon 图标 none 自定义
16
- * @default progress
28
+ * @default 'progress'
17
29
  */
18
30
  type: string
19
- onFastBack?: (ctx: InnerAudioContext) => void;
20
31
  /**
21
- * 语音快进回调,type = progress 时生效
22
- * @default -
32
+ * 语音快退回调,type=progress时生效
33
+ * @default
34
+ */
35
+ onFastBack?: (ctx: InnerAudioContext) => void
36
+ /**
37
+ * 语音快进回调,type=progress时生效
38
+ * @default
23
39
  */
24
40
  onForward?: (ctx: InnerAudioContext) => void
25
41
  /**
26
42
  * 暂停回调
27
- * @default -
43
+ * @default
28
44
  */
29
45
  onPause?: any
30
46
  onPlay?: any;
31
- onPlayEnd?: (ctx: InnerAudioContext) => void;
47
+ /**
48
+ * 语音播放完成,loop=false时生效
49
+ * @default
50
+ */
51
+ onPlayEnd?: (ctx: InnerAudioContext) => void
32
52
  /**
33
53
  * 可以播放媒体时触发
34
- * @default -
54
+ * @default
35
55
  */
36
56
  onCanPlay?: (ctx: InnerAudioContext) => void
37
57
  }
@@ -8,10 +8,11 @@ import React, { useState, useEffect, useMemo, useCallback } from "react";
8
8
  import Taro, { useReady, createSelectorQuery } from "@tarojs/taro";
9
9
  import classNames from "classnames";
10
10
  import { Canvas, View } from "@tarojs/components";
11
+ import { getWindowInfo } from "../../utils/get-system-info";
11
12
  import { Button } from "../button/button";
12
13
  import { useConfig } from "../configprovider/index";
13
14
  import { ComponentDefaults } from "../../utils/typings";
14
- import { useTouch } from "../../utils/use-touch";
15
+ import { useTouch } from "../../hooks/use-touch";
15
16
  import { clamp, preventDefault } from "../../utils";
16
17
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
17
18
  maxZoom: 3,
@@ -84,7 +85,7 @@ export var AvatarCropper = function(props) {
84
85
  var _useState = _sliced_to_array(useState(false), 2), visible = _useState[0], setVisible = _useState[1];
85
86
  var _useState1 = _sliced_to_array(useState(false), 2), moving = _useState1[0], setMoving = _useState1[1];
86
87
  var _useState2 = _sliced_to_array(useState(false), 2), zooming = _useState2[0], setZooming = _useState2[1];
87
- var systemInfo = Taro.getSystemInfoSync();
88
+ var systemInfo = getWindowInfo();
88
89
  // 支付宝基础库2.7.0以上支持,需要开启支付宝小程序canvas2d
89
90
  var showAlipayCanvas2D = useMemo(function() {
90
91
  return Taro.getEnv() === 'ALIPAY' && parseInt(Taro.SDKVersion.replace(/\./g, '')) >= 270;
@@ -22,9 +22,9 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
22
22
  size: 'large'
23
23
  });
24
24
  export var Badge = function(props) {
25
- var content = function content() {
26
- if (dot || (typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' || value === 0) return null;
27
- if (typeof value === 'number' && typeof max === 'number') {
25
+ var getContent = function getContent() {
26
+ if (dot || value === 0) return null;
27
+ if (typeof value === 'number') {
28
28
  return max < value ? "".concat(max, "+") : "".concat(value);
29
29
  }
30
30
  return value;
@@ -47,7 +47,7 @@ export var Badge = function(props) {
47
47
  var badgeRef = useRef(null);
48
48
  var _useState = _sliced_to_array(useState({}), 2), contentStyle = _useState[0], setContentStyle = _useState[1];
49
49
  var _obj;
50
- var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix, "-one"), typeof content() === 'string' && ((_this = "".concat(content())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix, "-dot"), dot), _define_property(_obj, "".concat(classPrefix, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix, "-").concat(fill), fill === 'outline'), _define_property(_obj, "".concat(classPrefix, "-content"), children), _obj));
50
+ var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix, "-one"), typeof getContent() === 'string' && ((_this = "".concat(getContent())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix, "-dot"), dot), _define_property(_obj, "".concat(classPrefix, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix, "-").concat(fill), fill === 'outline'), _define_property(_obj, "".concat(classPrefix, "-content"), children), _obj));
51
51
  useEffect(function() {
52
52
  if (badgeRef.current) {
53
53
  getPositionStyle();
@@ -55,12 +55,11 @@ export var Badge = function(props) {
55
55
  }, []);
56
56
  var getPositionStyle = /*#__PURE__*/ function() {
57
57
  var _ref = _async_to_generator(function() {
58
- var style, dir;
58
+ var style;
59
59
  return _ts_generator(this, function(_state) {
60
- style = {};
61
- style.top = pxTransform(Number(top) || 0);
62
- dir = rtl ? 'left' : 'right';
63
- style[dir] = isHarmony ? pxTransform(Number(right)) : "".concat(Number(right) || 0, "px");
60
+ style = _define_property({
61
+ top: pxTransform(Number(top) || 0)
62
+ }, rtl ? 'left' : 'right', isHarmony ? pxTransform(Number(right)) : "".concat(Number(right) || 0, "px"));
64
63
  setContentStyle(style);
65
64
  return [
66
65
  2
@@ -79,9 +78,9 @@ export var Badge = function(props) {
79
78
  }, isIcon() && /*#__PURE__*/ React.createElement(View, {
80
79
  className: classNames("".concat(classPrefix, "-content"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix, "-icon"), true), _define_property(_obj1, "".concat(classPrefix, "-icon-rtl"), rtl), _obj1)),
81
80
  style: contentStyle
82
- }, value), children, !isIcon() && /*#__PURE__*/ React.createElement(View, {
81
+ }, value), children, !isIcon() && (getContent() || dot) && /*#__PURE__*/ React.createElement(View, {
83
82
  className: contentClasses,
84
83
  style: contentStyle
85
- }, content()));
84
+ }, getContent()));
86
85
  };
87
86
  Badge.displayName = 'NutBadge';
@@ -1,140 +1,32 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import type { CalendarDay, CalendarType, CalendarRef } from './types';
3
3
  export interface CalendarProps {
4
- /**
5
- * 类型,日期选择'single',区间选择'range'
6
- * @default single
7
- */
8
- type?: CalendarType
9
- /**
10
- * 自动回填
11
- * @default false
12
- */
13
- autoBackfill?: boolean
14
- /**
15
- * 是否弹窗状态展示
16
- * @default true
17
- */
18
- popup?: boolean
19
- /**
20
- * 是否可见
21
- * @default false
22
- */
23
- visible?: boolean
24
- /**
25
- * 显示标题
26
- * @default 日期选择
27
- */
28
- title?: string
29
- /**
30
- * 默认值,日期选择 string 格式,区间选择 Array 格式
31
- * @default -
32
- */
33
- defaultValue?: string | string[]
34
- /**
35
- * 开始日期, 如果不限制开始日期传 null
36
- * @default 今天
37
- */
38
- startDate?: string
39
- /**
40
- * 结束日期,如果不限制结束日期传 null
41
- * @default 距离今天 365 天
42
- */
43
- endDate?: string
44
- /**
45
- * 是否展示今天标记
46
- * @default true
47
- */
48
- showToday?: boolean
49
- /**
50
- * 范围选择,开始信息文案
51
- * @default 开始
52
- */
53
- startText?: ReactNode
54
- /**
55
- * 范围选择,结束信息文案
56
- * @default 结束
57
- */
58
- endText?: ReactNode
59
- /**
60
- * 底部确认按钮文案
61
- * @default 确认
62
- */
63
- confirmText?: ReactNode
64
- /**
65
- * 是否在展示日历标题
66
- * @default true
67
- */
68
- showTitle?: boolean
69
- /**
70
- * 是否展示日期标题
71
- * @default true
72
- */
73
- showSubTitle?: boolean
74
- /**
75
- * 是否启动滚动动画
76
- * @default true
77
- */
78
- scrollAnimation?: boolean
79
- /**
80
- * 设置周起始日
81
- * @default 0
82
- */
83
- firstDayOfWeek: number
84
- /**
85
- * 自定义 Icon
86
- * @default close
87
- */
88
- closeIcon?: ReactNode
89
- /**
90
- * 设置不可选日期
91
- * @default -
92
- */
93
- disableDate: (date: CalendarDay) => boolean
94
- /**
95
- * 自定义日历标题下部,可用以添加自定义操作
96
- * @default -
97
- */
98
- renderHeaderButtons?: () => string | JSX.Element
99
- /**
100
- * 自定义日历底部按钮
101
- * @default -
102
- */
103
- renderBottomButton?: () => string | JSX.Element
104
- /**
105
- * 日期信息
106
- * @default -
107
- */
108
- renderDay?: (date: CalendarDay) => string | JSX.Element
109
- /**
110
- * 日期顶部信息
111
- * @default -
112
- */
113
- renderDayTop?: (date: CalendarDay) => string | JSX.Element
114
- /**
115
- * 日期底部信息
116
- * @default -
117
- */
118
- renderDayBottom?: (date: CalendarDay) => string | JSX.Element
119
- /**
120
- * 关闭时触发
121
- * @default -
122
- */
123
- onClose?: () => void
124
- /**
125
- * 选择之后或是点击确认按钮触发
126
- * @default -
127
- */
128
- onConfirm?: (param: string) => void
129
- /**
130
- * 点击/选择后触发
131
- * @default -
132
- */
133
- onDayClick?: (data: string) => void
134
- /**
135
- * 年月子标题到达顶部时触发
136
- * @default -
137
- */
138
- onPageChange?: (param: string) => void
4
+ type?: CalendarType;
5
+ autoBackfill?: boolean;
6
+ popup?: boolean;
7
+ visible?: boolean;
8
+ title?: string;
9
+ defaultValue?: string | string[];
10
+ startDate?: string;
11
+ endDate?: string;
12
+ showToday?: boolean;
13
+ startText?: ReactNode;
14
+ endText?: ReactNode;
15
+ confirmText?: ReactNode;
16
+ showTitle?: boolean;
17
+ showSubTitle?: boolean;
18
+ scrollAnimation?: boolean;
19
+ firstDayOfWeek: number;
20
+ closeIcon?: ReactNode;
21
+ disableDate: (date: CalendarDay) => boolean;
22
+ renderHeaderButtons?: () => string | JSX.Element;
23
+ renderBottomButton?: () => string | JSX.Element;
24
+ renderDay?: (date: CalendarDay) => string | JSX.Element;
25
+ renderDayTop?: (date: CalendarDay) => string | JSX.Element;
26
+ renderDayBottom?: (date: CalendarDay) => string | JSX.Element;
27
+ onClose?: () => void;
28
+ onConfirm?: (param: string) => void;
29
+ onDayClick?: (data: string) => void;
30
+ onPageChange?: (param: string) => void;
139
31
  }
140
32
  export declare const Calendar: React.ForwardRefExoticComponent<Partial<CalendarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, ""> & React.RefAttributes<CalendarRef>>;
@@ -34,6 +34,10 @@
34
34
  display: flex;
35
35
  flex-direction: column;
36
36
  text-align: center;
37
+
38
+ &-buttons {
39
+ height: $calendar-header-height;
40
+ }
37
41
  }
38
42
 
39
43
  &-title {
@@ -49,10 +53,6 @@
49
53
  font-size: $calendar-sub-title-font-size;
50
54
  }
51
55
 
52
- &-header-buttons {
53
- height: $calendar-header-height;
54
- }
55
-
56
56
  &-weeks {
57
57
  display: flex;
58
58
  align-items: center;
@@ -101,12 +101,12 @@
101
101
  display: flex;
102
102
  flex-direction: column;
103
103
  text-align: center;
104
- }
105
104
 
106
- &-month-title {
107
- height: 23px;
108
- line-height: 23px;
109
- margin: 8px 0;
105
+ &-title {
106
+ height: 23px;
107
+ line-height: 23px;
108
+ margin: 8px 0;
109
+ }
110
110
  }
111
111
 
112
112
  &-days {
@@ -130,6 +130,7 @@
130
130
  color: $color-primary;
131
131
  }
132
132
 
133
+ &-info,
133
134
  &-info-curr {
134
135
  position: absolute;
135
136
  bottom: 5px;
@@ -138,14 +139,6 @@
138
139
  line-height: 14px;
139
140
  }
140
141
 
141
- &-info {
142
- position: absolute;
143
- bottom: 5px;
144
- width: 100%;
145
- font-size: 12px;
146
- line-height: 14px;
147
- }
148
-
149
142
  &-info-top {
150
143
  position: absolute;
151
144
  width: 100%;
@@ -188,18 +181,18 @@
188
181
  }
189
182
  }
190
183
 
191
- &-choose-disabled {
192
- background-color: $calendar-choose-disable-background-color;
193
- color: $calendar-disable-color !important;
194
-
195
- .nut-calendar-day-info-curr {
196
- display: none;
197
- }
198
- }
199
-
200
184
  &-choose {
201
185
  background-color: $calendar-choose-background-color;
202
186
  color: $calendar-choose-color;
187
+
188
+ &-disabled {
189
+ background-color: $calendar-choose-disable-background-color;
190
+ color: $calendar-disable-color !important;
191
+
192
+ .nut-calendar-day-info-curr {
193
+ display: none;
194
+ }
195
+ }
203
196
  }
204
197
  }
205
198
 
@@ -211,13 +204,14 @@
211
204
  background-color: $white;
212
205
 
213
206
  .calendar-confirm-btn {
214
- height: 44px;
215
- margin: 10px 18px;
216
- border-radius: 22px;
207
+ height: 40px;
208
+ line-height: 40px;
209
+ margin: 6px 16px;
210
+ text-align: center;
211
+ border-radius: $radius-base;
217
212
  background: $button-primary-background-color;
218
213
  color: $color-primary-text;
219
- text-align: center;
220
- line-height: 44px;
214
+ font-weight: $font-weight-bold;
221
215
  }
222
216
  }
223
217
  }
@@ -399,6 +399,9 @@
399
399
  flex-direction: column;
400
400
  text-align: center;
401
401
  }
402
+ .nut-calendar-header-buttons {
403
+ height: var(--nutui-calendar-header-height, 24px);
404
+ }
402
405
  .nut-calendar-title {
403
406
  color: var(--nutui-color-title, #1a1a1a);
404
407
  font-size: var(--nutui-calendar-title-font-size, var(--nutui-font-size-xl, 18px));
@@ -410,9 +413,6 @@
410
413
  line-height: 22px;
411
414
  font-size: var(--nutui-calendar-sub-title-font-size, var(--nutui-font-size-base, 14px));
412
415
  }
413
- .nut-calendar-header-buttons {
414
- height: var(--nutui-calendar-header-height, 24px);
415
- }
416
416
  .nut-calendar-weeks {
417
417
  display: flex;
418
418
  align-items: center;
@@ -476,14 +476,7 @@
476
476
  .nut-calendar-day:nth-child(7n+0), .nut-calendar-day:nth-child(7n+1) {
477
477
  color: var(--nutui-color-primary, #ff0f23);
478
478
  }
479
- .nut-calendar-day-info-curr {
480
- position: absolute;
481
- bottom: 5px;
482
- width: 100%;
483
- font-size: 12px;
484
- line-height: 14px;
485
- }
486
- .nut-calendar-day-info {
479
+ .nut-calendar-day-info, .nut-calendar-day-info-curr {
487
480
  position: absolute;
488
481
  bottom: 5px;
489
482
  width: 100%;
@@ -524,6 +517,10 @@
524
517
  .nut-calendar-day-disabled .nut-calendar-day-info-curr {
525
518
  display: none;
526
519
  }
520
+ .nut-calendar-day-choose {
521
+ background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
522
+ color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
523
+ }
527
524
  .nut-calendar-day-choose-disabled {
528
525
  background-color: var(--nutui-calendar-choose-disable-background-color, rgba(191, 191, 191, 0.09));
529
526
  color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc)) !important;
@@ -531,10 +528,6 @@
531
528
  .nut-calendar-day-choose-disabled .nut-calendar-day-info-curr {
532
529
  display: none;
533
530
  }
534
- .nut-calendar-day-choose {
535
- background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
536
- color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
537
- }
538
531
  .nut-calendar-footer {
539
532
  display: flex;
540
533
  width: 100%;
@@ -542,13 +535,14 @@
542
535
  background-color: #ffffff;
543
536
  }
544
537
  .nut-calendar-footer .calendar-confirm-btn {
545
- height: 44px;
546
- margin: 10px 18px;
547
- border-radius: 22px;
538
+ height: 40px;
539
+ line-height: 40px;
540
+ margin: 6px 16px;
541
+ text-align: center;
542
+ border-radius: var(--nutui-radius-base, 8px);
548
543
  background: linear-gradient(90deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%);
549
544
  color: #ffffff;
550
- text-align: center;
551
- line-height: 44px;
545
+ font-weight: var(--nutui-font-weight-bold, 600);
552
546
  }
553
547
 
554
548
  .nut-calendar-popup .nut-popup-title-right {